From 1766a917e87e06094301250df3b689db766f724d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 22 Jun 2015 16:43:43 -0700 Subject: [PATCH 0001/1894] Executor sketch --- src/core/transport/chttp2/internal.h | 36 +++- src/core/transport/chttp2_transport.c | 251 +++++++++++++++++--------- 2 files changed, 193 insertions(+), 94 deletions(-) diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 3d1cd56e618..784c85ec4f7 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -290,24 +290,39 @@ struct grpc_chttp2_transport_parsing { grpc_chttp2_outstanding_ping pings; }; +typedef struct grpc_chttp2_executor_action_header { + grpc_chttp2_stream *stream; + void (*action)(grpc_chttp2_transport *t, grpc_chttp2_stream *s, void *arg); + struct grpc_chttp2_executor_action_header *next; + void *arg; +} grpc_chttp2_executor_action_header; + struct grpc_chttp2_transport { grpc_transport base; /* must be first */ + gpr_refcount refs; grpc_endpoint *ep; grpc_mdctx *metadata_context; - gpr_refcount refs; - gpr_mu mu; + struct { + gpr_mu mu; + + /** is a thread currently in the global lock */ + gpr_uint8 global_active; + /** is a thread currently writing */ + gpr_uint8 writing_active; + /** is a thread currently parsing */ + gpr_uint8 parsing_active; + /** is a thread currently executing channel callbacks */ + gpr_uint8 channel_callback_active; + + grpc_chttp2_executor_action_header *pending_actions; + } executor; /** is the transport destroying itself? */ gpr_uint8 destroying; /** has the upper layer closed the transport? */ gpr_uint8 closed; - /** is a thread currently writing */ - gpr_uint8 writing_active; - /** is a thread currently parsing */ - gpr_uint8 parsing_active; - /** is there a read request to the endpoint outstanding? */ gpr_uint8 endpoint_reading; @@ -343,8 +358,6 @@ struct grpc_chttp2_transport { grpc_chttp2_stream **accepting_stream; struct { - /** is a thread currently performing channel callbacks */ - gpr_uint8 executing; /** transport channel-level callback */ const grpc_transport_callbacks *cb; /** user data for cb calls */ @@ -615,6 +628,11 @@ void grpc_chttp2_for_all_streams( void grpc_chttp2_parsing_become_skip_parser( grpc_chttp2_transport_parsing *transport_parsing); +void grpc_chttp2_run_with_global_lock( + grpc_chttp2_transport *transport, grpc_chttp2_stream *optional_stream, + void (*action)(grpc_chttp2_transport *t, grpc_chttp2_stream *s, void *arg), + void *arg, size_t sizeof_arg); + #define GRPC_CHTTP2_CLIENT_CONNECT_STRING "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" #define GRPC_CHTTP2_CLIENT_CONNECT_STRLEN \ (sizeof(GRPC_CHTTP2_CLIENT_CONNECT_STRING) - 1) diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 0032ef1d4da..b32d9f0a71d 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -78,8 +78,10 @@ int grpc_flowctl_trace = 0; static const grpc_transport_vtable vtable; +#if 0 static void lock(grpc_chttp2_transport *t); static void unlock(grpc_chttp2_transport *t); +#endif static void unlock_check_channel_callbacks(grpc_chttp2_transport *t); static void unlock_check_read_write_state(grpc_chttp2_transport *t); @@ -101,9 +103,9 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, static void drop_connection(grpc_chttp2_transport *t); /** Perform a transport_op */ -static void perform_op_locked(grpc_chttp2_transport_global *transport_global, - grpc_chttp2_stream_global *stream_global, - grpc_transport_op *op); +static void perform_op_locked(grpc_chttp2_transport *t, + grpc_chttp2_stream *s, + void *transport_op); /** Cancel a stream: coming from the transport API */ static void cancel_from_api(grpc_chttp2_transport_global *transport_global, @@ -112,12 +114,15 @@ static void cancel_from_api(grpc_chttp2_transport_global *transport_global, /** Add endpoint from this transport to pollset */ static void add_to_pollset_locked(grpc_chttp2_transport *t, - grpc_pollset *pollset); + grpc_chttp2_stream *s_ignored, + void *pollset); /** Start new streams that have been created if we can */ static void maybe_start_some_streams( grpc_chttp2_transport_global *transport_global); +static void finish_global_actions(grpc_chttp2_transport *t); + /* * CONSTRUCTION/DESTRUCTION/REFCOUNTING */ @@ -125,7 +130,7 @@ static void maybe_start_some_streams( static void destruct_transport(grpc_chttp2_transport *t) { size_t i; - gpr_mu_lock(&t->mu); + gpr_mu_lock(&t->executor.mu); GPR_ASSERT(t->ep == NULL); @@ -151,8 +156,8 @@ static void destruct_transport(grpc_chttp2_transport *t) { grpc_chttp2_stream_map_destroy(&t->parsing_stream_map); grpc_chttp2_stream_map_destroy(&t->new_stream_map); - gpr_mu_unlock(&t->mu); - gpr_mu_destroy(&t->mu); + gpr_mu_unlock(&t->executor.mu); + gpr_mu_destroy(&t->executor.mu); /* callback remaining pings: they're not allowed to call into the transpot, and maybe they hold resources that need to be freed */ @@ -215,7 +220,7 @@ static void init_transport(grpc_chttp2_transport *t, t->ep = ep; /* one ref is for destroy, the other for when ep becomes NULL */ gpr_ref_init(&t->refs, 2); - gpr_mu_init(&t->mu); + gpr_mu_init(&t->executor.mu); grpc_mdctx_ref(mdctx); t->metadata_context = mdctx; t->endpoint_reading = 1; @@ -311,18 +316,19 @@ static void init_transport(grpc_chttp2_transport *t, } } - gpr_mu_lock(&t->mu); - t->channel_callback.executing = 1; + gpr_mu_lock(&t->executor.mu); + t->executor.channel_callback_active = 1; + t->executor.global_active = 1; REF_TRANSPORT(t, "init"); /* matches unref at end of this function */ - gpr_mu_unlock(&t->mu); + gpr_mu_unlock(&t->executor.mu); sr = setup(arg, &t->base, t->metadata_context); - lock(t); t->channel_callback.cb = sr.callbacks; t->channel_callback.cb_user_data = sr.user_data; - t->channel_callback.executing = 0; - unlock(t); + t->executor.channel_callback_active = 0; + + finish_global_actions(t); REF_TRANSPORT(t, "recv_data"); /* matches unref inside recv_data */ recv_data(t, slices, nslices, GRPC_ENDPOINT_CB_OK); @@ -330,18 +336,18 @@ static void init_transport(grpc_chttp2_transport *t, UNREF_TRANSPORT(t, "init"); } -static void destroy_transport(grpc_transport *gt) { - grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; - - lock(t); +static void destroy_transport_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s_ignored, void *arg_ignored) { t->destroying = 1; drop_connection(t); - unlock(t); +} +static void destroy_transport(grpc_transport *gt) { + grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; + grpc_chttp2_run_with_global_lock(t, NULL, destroy_transport_locked, NULL, 0); UNREF_TRANSPORT(t, "destroy"); } -static void close_transport_locked(grpc_chttp2_transport *t) { +static void close_transport_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s_ignored, void *arg_ignored) { if (!t->closed) { t->closed = 1; if (t->ep) { @@ -352,19 +358,32 @@ static void close_transport_locked(grpc_chttp2_transport *t) { static void close_transport(grpc_transport *gt) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; - gpr_mu_lock(&t->mu); - close_transport_locked(t); - gpr_mu_unlock(&t->mu); + grpc_chttp2_run_with_global_lock(t, NULL, close_transport_locked, NULL, 0); +} + +typedef struct { + grpc_status_code status; + gpr_slice debug_data; +} goaway_arg; + +static void goaway_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s_ignored, void *a) { + goaway_arg *arg = a; + grpc_chttp2_goaway_append(t->global.last_incoming_stream_id, + grpc_chttp2_grpc_status_to_http2_error(arg->status), + arg->debug_data, &t->global.qbuf); } static void goaway(grpc_transport *gt, grpc_status_code status, gpr_slice debug_data) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; - lock(t); - grpc_chttp2_goaway_append(t->global.last_incoming_stream_id, - grpc_chttp2_grpc_status_to_http2_error(status), - debug_data, &t->global.qbuf); - unlock(t); + goaway_arg arg; + arg.status = status; + arg.debug_data = debug_data; + grpc_chttp2_run_with_global_lock(t, NULL, goaway_locked, &arg, sizeof(arg)); +} + +static void finish_init_stream_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s, void *arg_ignored) { + grpc_chttp2_register_stream(t, s); } static int init_stream(grpc_transport *gt, grpc_stream *gs, @@ -382,10 +401,8 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, REF_TRANSPORT(t, "stream"); - lock(t); - grpc_chttp2_register_stream(t, s); if (server_data) { - GPR_ASSERT(t->parsing_active); + GPR_ASSERT(t->executor.parsing_active); s->global.id = (gpr_uint32)(gpr_uintptr)server_data; s->global.outgoing_window = t->global @@ -398,8 +415,8 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, s->global.in_stream_map = 1; } - if (initial_op) perform_op_locked(&t->global, &s->global, initial_op); - unlock(t); + grpc_chttp2_run_with_global_lock(t, s, finish_init_stream_locked, NULL, 0); + if (initial_op) grpc_chttp2_run_with_global_lock(t, s, perform_op_locked, initial_op, sizeof(*initial_op)); return 0; } @@ -407,8 +424,10 @@ static int init_stream(grpc_transport *gt, grpc_stream *gs, static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; grpc_chttp2_stream *s = (grpc_chttp2_stream *)gs; + int i; +#if 0 gpr_mu_lock(&t->mu); GPR_ASSERT(s->global.published_state == GRPC_STREAM_CLOSED || @@ -424,6 +443,7 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { grpc_chttp2_list_remove_writable_window_update_stream(&t->global, &s->global); gpr_mu_unlock(&t->mu); +#endif for (i = 0; i < STREAM_LIST_COUNT; i++) { GPR_ASSERT(!s->included[i]); @@ -474,36 +494,92 @@ static void remove_from_stream_map(grpc_chttp2_transport *t, grpc_chttp2_stream * LOCK MANAGEMENT */ -/* We take a grpc_chttp2_transport-global lock in response to calls coming in - from above, - and in response to data being received from below. New data to be written - is always queued, as are callbacks to process data. During unlock() we - check our todo lists and initiate callbacks and flush writes. */ +static void finish_global_actions(grpc_chttp2_transport *t) { + grpc_chttp2_executor_action_header *hdr; + grpc_chttp2_executor_action_header *next; + grpc_iomgr_closure *run_closures; -static void lock(grpc_chttp2_transport *t) { gpr_mu_lock(&t->mu); } + for (;;) { + unlock_check_read_write_state(t); + if (!t->executor.writing_active && t->global.error_state == GRPC_CHTTP2_ERROR_STATE_NONE && + grpc_chttp2_unlocking_check_writes(&t->global, &t->writing)) { + t->executor.writing_active = 1; + REF_TRANSPORT(t, "writing"); + grpc_chttp2_schedule_closure(&t->global, &t->writing_action, 1); + } + unlock_check_channel_callbacks(t); -static void unlock(grpc_chttp2_transport *t) { - grpc_iomgr_closure *run_closures; + run_closures = t->global.pending_closures; + t->global.pending_closures = NULL; + + gpr_mu_lock(&t->executor.mu); + t->executor.global_active = 0; + gpr_mu_unlock(&t->executor.mu); - unlock_check_read_write_state(t); - if (!t->writing_active && t->global.error_state == GRPC_CHTTP2_ERROR_STATE_NONE && - grpc_chttp2_unlocking_check_writes(&t->global, &t->writing)) { - t->writing_active = 1; - REF_TRANSPORT(t, "writing"); - grpc_chttp2_schedule_closure(&t->global, &t->writing_action, 1); + while (run_closures) { + grpc_iomgr_closure *next = run_closures->next; + run_closures->cb(run_closures->cb_arg, run_closures->success); + run_closures = next; + } + + gpr_mu_lock(&t->executor.mu); + if (!t->executor.global_active && t->executor.pending_actions) { + t->executor.global_active = 1; + hdr = t->executor.pending_actions; + t->executor.pending_actions = NULL; + gpr_mu_unlock(&t->executor.mu); + while (hdr != NULL) { + hdr->action(t, hdr->stream, hdr->arg); + next = hdr->next; + gpr_free(hdr); + hdr = next; + } + continue; + } + gpr_mu_unlock(&t->executor.mu); + break; } - /* unlock_check_parser(t); */ - unlock_check_channel_callbacks(t); +} - run_closures = t->global.pending_closures; - t->global.pending_closures = NULL; +void grpc_chttp2_run_with_global_lock(grpc_chttp2_transport *t, grpc_chttp2_stream *optional_stream, + void (*action)(grpc_chttp2_transport *t, grpc_chttp2_stream *s, void *arg), + void *arg, size_t sizeof_arg) { + grpc_chttp2_executor_action_header *hdr; - gpr_mu_unlock(&t->mu); + gpr_mu_lock(&t->executor.mu); + + for (;;) { + if (!t->executor.global_active) { + t->executor.global_active = 1; + GPR_ASSERT(t->executor.pending_actions == NULL); + gpr_mu_unlock(&t->executor.mu); + + action(t, optional_stream, arg); + + finish_global_actions(t); + } else { + gpr_mu_unlock(&t->executor.mu); + + hdr = gpr_malloc(sizeof(*hdr) + sizeof_arg); + hdr->stream = optional_stream; + hdr->action = action; + if (sizeof_arg == 0) { + hdr->arg = arg; + } else { + hdr->arg = hdr + 1; + memcpy(hdr->arg, arg, sizeof_arg); + } - while (run_closures) { - grpc_iomgr_closure *next = run_closures->next; - run_closures->cb(run_closures->cb_arg, run_closures->success); - run_closures = next; + gpr_mu_lock(&t->executor.mu); + if (!t->executor.global_active) { + gpr_free(hdr); + continue; + } + hdr->next = t->executor.pending_actions; + t->executor.pending_actions = hdr; + gpr_mu_unlock(&t->executor.mu); + } + break; } } @@ -526,6 +602,7 @@ static void push_setting(grpc_chttp2_transport *t, grpc_chttp2_setting_id id, } } +#if 0 void grpc_chttp2_terminate_writing( grpc_chttp2_transport_writing *transport_writing, int success) { grpc_chttp2_transport *t = TRANSPORT_FROM_WRITING(transport_writing); @@ -553,6 +630,7 @@ void grpc_chttp2_terminate_writing( UNREF_TRANSPORT(t, "writing"); } +#endif static void writing_action(void *gt, int iomgr_success_ignored) { grpc_chttp2_transport *t = gt; @@ -622,9 +700,13 @@ static void maybe_start_some_streams( } } -static void perform_op_locked(grpc_chttp2_transport_global *transport_global, - grpc_chttp2_stream_global *stream_global, - grpc_transport_op *op) { +static void perform_op_locked(grpc_chttp2_transport *t, + grpc_chttp2_stream *s, + void *transport_op) { + grpc_chttp2_transport_global *transport_global = &t->global; + grpc_chttp2_stream_global *stream_global = &s->global; + grpc_transport_op *op = transport_op; + if (op->cancel_with_status != GRPC_STATUS_OK) { cancel_from_api(transport_global, stream_global, op->cancel_with_status); } @@ -671,7 +753,7 @@ static void perform_op_locked(grpc_chttp2_transport_global *transport_global, } if (op->bind_pollset) { - add_to_pollset_locked(TRANSPORT_FROM_GLOBAL(transport_global), + add_to_pollset_locked(TRANSPORT_FROM_GLOBAL(transport_global), NULL, op->bind_pollset); } @@ -684,17 +766,11 @@ static void perform_op(grpc_transport *gt, grpc_stream *gs, grpc_transport_op *op) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; grpc_chttp2_stream *s = (grpc_chttp2_stream *)gs; - - lock(t); - perform_op_locked(&t->global, &s->global, op); - unlock(t); + grpc_chttp2_run_with_global_lock(t, s, perform_op_locked, op, sizeof(*op)); } -static void send_ping(grpc_transport *gt, grpc_iomgr_closure *on_recv) { - grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; +static void send_ping_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s_ignored, void *a) { grpc_chttp2_outstanding_ping *p = gpr_malloc(sizeof(*p)); - - lock(t); p->next = &t->global.pings; p->prev = p->next->prev; p->prev->next = p->next->prev = p; @@ -706,9 +782,13 @@ static void send_ping(grpc_transport *gt, grpc_iomgr_closure *on_recv) { p->id[5] = (t->global.ping_counter >> 16) & 0xff; p->id[6] = (t->global.ping_counter >> 8) & 0xff; p->id[7] = t->global.ping_counter & 0xff; - p->on_recv = on_recv; + p->on_recv = *(grpc_iomgr_closure**)a; gpr_slice_buffer_add(&t->global.qbuf, grpc_chttp2_ping_create(0, p->id)); - unlock(t); +} + +static void send_ping(grpc_transport *gt, grpc_iomgr_closure *on_recv) { + grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; + grpc_chttp2_run_with_global_lock(t, NULL, send_ping_locked, &on_recv, sizeof(on_recv)); } /* @@ -751,7 +831,7 @@ static void unlock_check_read_write_state(grpc_chttp2_transport *t) { grpc_chttp2_stream_global *stream_global; grpc_stream_state state; - if (!t->parsing_active) { + if (!t->executor.parsing_active) { /* if a stream is in the stream map, and gets cancelled, we need to ensure we are not parsing before continuing the cancellation to keep things in a sane state */ @@ -784,7 +864,7 @@ static void unlock_check_read_write_state(grpc_chttp2_transport *t) { } if (stream_global->write_state == WRITE_STATE_SENT_CLOSE && stream_global->read_closed && stream_global->in_stream_map) { - if (t->parsing_active) { + if (t->executor.parsing_active) { grpc_chttp2_list_add_closed_waiting_for_parsing(transport_global, stream_global); } else { @@ -934,7 +1014,7 @@ static void drop_connection(grpc_chttp2_transport *t) { if (t->global.error_state == GRPC_CHTTP2_ERROR_STATE_NONE) { t->global.error_state = GRPC_CHTTP2_ERROR_STATE_SEEN; } - close_transport_locked(t); + close_transport_locked(t, NULL, NULL); end_all_the_calls(t); } @@ -968,6 +1048,7 @@ static grpc_chttp2_stream *lookup_stream(grpc_chttp2_transport *t, gpr_uint32 id #endif /* tcp read callback */ +#if 0 static void recv_data(void *tp, gpr_slice *slices, size_t nslices, grpc_endpoint_cb_status error) { grpc_chttp2_transport *t = tp; @@ -1025,6 +1106,7 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, break; } } +#endif static void reading_action(void *pt, int iomgr_success_ignored) { grpc_chttp2_transport *t = pt; @@ -1042,6 +1124,10 @@ typedef struct { grpc_iomgr_closure closure; } notify_goaways_args; +static void finished_channel_callbacks_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s_ignored, void *arg_ignored) { + t->executor.channel_callback_active = 0; +} + static void notify_goaways(void *p, int iomgr_success_ignored) { notify_goaways_args *a = p; grpc_chttp2_transport *t = a->t; @@ -1051,10 +1137,7 @@ static void notify_goaways(void *p, int iomgr_success_ignored) { gpr_free(a); - lock(t); - t->channel_callback.executing = 0; - unlock(t); - + grpc_chttp2_run_with_global_lock(t, NULL, finished_channel_callbacks_locked, NULL, 0); UNREF_TRANSPORT(t, "notify_goaways"); } @@ -1062,13 +1145,11 @@ static void notify_closed(void *gt, int iomgr_success_ignored) { grpc_chttp2_transport *t = gt; t->channel_callback.cb->closed(t->channel_callback.cb_user_data, &t->base); - lock(t); - t->channel_callback.executing = 0; - unlock(t); - + grpc_chttp2_run_with_global_lock(t, NULL, finished_channel_callbacks_locked, NULL, 0); UNREF_TRANSPORT(t, "notify_closed"); } +#if 0 static void unlock_check_channel_callbacks(grpc_chttp2_transport *t) { if (t->channel_callback.executing) { return; @@ -1098,6 +1179,7 @@ static void unlock_check_channel_callbacks(grpc_chttp2_transport *t) { 1); } } +#endif void grpc_chttp2_schedule_closure( grpc_chttp2_transport_global *transport_global, grpc_iomgr_closure *closure, @@ -1112,7 +1194,8 @@ void grpc_chttp2_schedule_closure( */ static void add_to_pollset_locked(grpc_chttp2_transport *t, - grpc_pollset *pollset) { + grpc_chttp2_stream *s, + void *pollset) { if (t->ep) { grpc_endpoint_add_to_pollset(t->ep, pollset); } @@ -1120,9 +1203,7 @@ static void add_to_pollset_locked(grpc_chttp2_transport *t, static void add_to_pollset(grpc_transport *gt, grpc_pollset *pollset) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; - lock(t); - add_to_pollset_locked(t, pollset); - unlock(t); + grpc_chttp2_run_with_global_lock(t, NULL, add_to_pollset_locked, pollset, 0); } /* From 4b074d5274af7f1c2b2067181b398c9d09e4443c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 23 Jun 2015 07:48:21 -0700 Subject: [PATCH 0002/1894] CHTTP2 executor --- src/core/transport/chttp2/internal.h | 7 ++ src/core/transport/chttp2_transport.c | 167 ++++++++++++++------------ 2 files changed, 94 insertions(+), 80 deletions(-) diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 784c85ec4f7..61947f73958 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -351,6 +351,13 @@ struct grpc_chttp2_transport { grpc_iomgr_closure writing_action; /** closure to start reading from the endpoint */ grpc_iomgr_closure reading_action; + /** closure to actually do parsing */ + grpc_iomgr_closure parsing_action; + + struct { + size_t nslices; + gpr_slice *slices; + } executor_parsing; /** address to place a newly accepted stream - set and unset by grpc_chttp2_parsing_accept_stream; used by init_stream to diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 3cf08e17721..159072eab4c 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -89,6 +89,7 @@ static void unlock_check_read_write_state(grpc_chttp2_transport *t); /* forward declarations of various callbacks that we'll build closures around */ static void writing_action(void *t, int iomgr_success_ignored); static void reading_action(void *t, int iomgr_success_ignored); +static void parsing_action(void *t, int iomgr_success_ignored); static void notify_closed(void *t, int iomgr_success_ignored); /** Set a transport level setting, and push it to our peer */ @@ -244,6 +245,7 @@ static void init_transport(grpc_chttp2_transport *t, grpc_chttp2_hpack_compressor_init(&t->writing.hpack_compressor, mdctx); grpc_iomgr_closure_init(&t->writing_action, writing_action, t); grpc_iomgr_closure_init(&t->reading_action, reading_action, t); + grpc_iomgr_closure_init(&t->parsing_action, parsing_action, t); gpr_slice_buffer_init(&t->parsing.qbuf); grpc_chttp2_goaway_parser_init(&t->parsing.goaway_parser); @@ -427,24 +429,6 @@ static void destroy_stream(grpc_transport *gt, grpc_stream *gs) { int i; -#if 0 - gpr_mu_lock(&t->mu); - - GPR_ASSERT(s->global.published_state == GRPC_STREAM_CLOSED || - s->global.id == 0); - GPR_ASSERT(!s->global.in_stream_map); - grpc_chttp2_unregister_stream(t, s); - if (!t->parsing_active && s->global.id) { - GPR_ASSERT(grpc_chttp2_stream_map_find(&t->parsing_stream_map, - s->global.id) == NULL); - } - - grpc_chttp2_list_remove_incoming_window_updated(&t->global, &s->global); - grpc_chttp2_list_remove_writable_window_update_stream(&t->global, &s->global); - - gpr_mu_unlock(&t->mu); -#endif - for (i = 0; i < STREAM_LIST_COUNT; i++) { GPR_ASSERT(!s->included[i]); } @@ -540,7 +524,6 @@ void grpc_chttp2_run_with_global_lock(grpc_chttp2_transport *t, grpc_chttp2_stre for (;;) { if (!t->executor.global_active) { t->executor.global_active = 1; - GPR_ASSERT(t->executor.pending_actions == NULL); gpr_mu_unlock(&t->executor.mu); action(t, optional_stream, arg); @@ -591,12 +574,8 @@ static void push_setting(grpc_chttp2_transport *t, grpc_chttp2_setting_id id, } } -#if 0 -void grpc_chttp2_terminate_writing( - grpc_chttp2_transport_writing *transport_writing, int success) { - grpc_chttp2_transport *t = TRANSPORT_FROM_WRITING(transport_writing); - - lock(t); +static void terminate_writing_with_lock(grpc_chttp2_transport *t, grpc_chttp2_stream *s_ignored, void *a) { + int success = *(int*)a; if (!success) { drop_connection(t); @@ -607,7 +586,7 @@ void grpc_chttp2_terminate_writing( /* leave the writing flag up on shutdown to prevent further writes in unlock() from starting */ - t->writing_active = 0; + t->executor.writing_active = 0; if (t->ep && !t->endpoint_reading) { grpc_endpoint_destroy(t->ep); t->ep = NULL; @@ -615,11 +594,14 @@ void grpc_chttp2_terminate_writing( t, "disconnect"); /* safe because we'll still have the ref for write */ } - unlock(t); - UNREF_TRANSPORT(t, "writing"); } -#endif + +void grpc_chttp2_terminate_writing( + grpc_chttp2_transport_writing *transport_writing, int success) { + grpc_chttp2_transport *t = TRANSPORT_FROM_WRITING(transport_writing); + grpc_chttp2_run_with_global_lock(t, NULL, terminate_writing_with_lock, &success, sizeof(success)); +} static void writing_action(void *gt, int iomgr_success_ignored) { grpc_chttp2_transport *t = gt; @@ -879,6 +861,12 @@ static void unlock_check_read_write_state(grpc_chttp2_transport *t) { grpc_chttp2_incoming_metadata_buffer_postprocess_sopb_and_begin_live_op( &stream_global->incoming_metadata, &stream_global->incoming_sopb, &stream_global->outstanding_metadata); + if (state == GRPC_STREAM_CLOSED) { + GPR_ASSERT(!stream_global->in_stream_map); + grpc_chttp2_unregister_stream(TRANSPORT_FROM_GLOBAL(transport_global), STREAM_FROM_GLOBAL(stream_global)); + grpc_chttp2_list_remove_incoming_window_updated(transport_global, stream_global); + grpc_chttp2_list_remove_writable_window_update_stream(transport_global, stream_global); + } grpc_sopb_swap(stream_global->publish_sopb, &stream_global->incoming_sopb); stream_global->published_state = *stream_global->publish_state = state; grpc_chttp2_schedule_closure(transport_global, @@ -922,66 +910,87 @@ static void drop_connection(grpc_chttp2_transport *t) { end_all_the_calls(t); } +static void recv_data_error_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s, void *a) { + size_t i; + + drop_connection(t); + t->endpoint_reading = 0; + if (!t->executor.writing_active && t->ep) { + grpc_endpoint_destroy(t->ep); + t->ep = NULL; + UNREF_TRANSPORT( + t, "disconnect"); /* safe as we still have a ref for read */ + } + UNREF_TRANSPORT(t, "recv_data"); + for (i = 0; i < t->executor_parsing.nslices; i++) gpr_slice_unref(t->executor_parsing.slices[i]); +} + +static void finish_parsing_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s_ignored, void *a) { + size_t i = *(size_t *)a; + + if (i != t->executor_parsing.nslices) { + drop_connection(t); + } + /* merge stream lists */ + grpc_chttp2_stream_map_move_into(&t->new_stream_map, + &t->parsing_stream_map); + t->global.concurrent_stream_count = grpc_chttp2_stream_map_size(&t->parsing_stream_map); + /* handle higher level things */ + grpc_chttp2_publish_reads(&t->global, &t->parsing); + t->executor.parsing_active = 0; + + for (; i < t->executor_parsing.nslices; i++) gpr_slice_unref(t->executor_parsing.slices[i]); + + if (i == t->executor_parsing.nslices) { + grpc_chttp2_schedule_closure(&t->global, &t->reading_action, 1); + } +} + +static void parsing_action(void *pt, int iomgr_success_ignored) { + size_t i; + grpc_chttp2_transport *t = pt; + for (i = 0; i < t->executor_parsing.nslices && grpc_chttp2_perform_read(&t->parsing, t->executor_parsing.slices[i]); + i++) { + gpr_slice_unref(t->executor_parsing.slices[i]); + } + grpc_chttp2_run_with_global_lock(t, NULL, finish_parsing_locked, &i, sizeof(i)); +} + +static void recv_data_ok_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s, void *a) { + size_t i; + GPR_ASSERT(!t->executor.parsing_active); + if (t->global.error_state == GRPC_CHTTP2_ERROR_STATE_NONE) { + t->executor.parsing_active = 1; + /* merge stream lists */ + grpc_chttp2_stream_map_move_into(&t->new_stream_map, + &t->parsing_stream_map); + grpc_chttp2_prepare_to_read(&t->global, &t->parsing); + /* schedule more work to do unlocked */ + grpc_chttp2_schedule_closure(&t->global, &t->parsing_action, 1); + } else { + for (i = 0; i < t->executor_parsing.nslices; i++) gpr_slice_unref(t->executor_parsing.slices[i]); + } +} + /* tcp read callback */ -#if 0 static void recv_data(void *tp, gpr_slice *slices, size_t nslices, grpc_endpoint_cb_status error) { grpc_chttp2_transport *t = tp; - size_t i; + + t->executor_parsing.slices = slices; + t->executor_parsing.nslices = nslices; switch (error) { case GRPC_ENDPOINT_CB_SHUTDOWN: case GRPC_ENDPOINT_CB_EOF: case GRPC_ENDPOINT_CB_ERROR: - lock(t); - drop_connection(t); - t->endpoint_reading = 0; - if (!t->writing_active && t->ep) { - grpc_endpoint_destroy(t->ep); - t->ep = NULL; - UNREF_TRANSPORT( - t, "disconnect"); /* safe as we still have a ref for read */ - } - unlock(t); - UNREF_TRANSPORT(t, "recv_data"); - for (i = 0; i < nslices; i++) gpr_slice_unref(slices[i]); + grpc_chttp2_run_with_global_lock(t, NULL, recv_data_error_locked, NULL, 0); break; case GRPC_ENDPOINT_CB_OK: - lock(t); - i = 0; - GPR_ASSERT(!t->parsing_active); - if (t->global.error_state == GRPC_CHTTP2_ERROR_STATE_NONE) { - t->parsing_active = 1; - /* merge stream lists */ - grpc_chttp2_stream_map_move_into(&t->new_stream_map, - &t->parsing_stream_map); - grpc_chttp2_prepare_to_read(&t->global, &t->parsing); - gpr_mu_unlock(&t->mu); - for (; i < nslices && grpc_chttp2_perform_read(&t->parsing, slices[i]); - i++) { - gpr_slice_unref(slices[i]); - } - gpr_mu_lock(&t->mu); - if (i != nslices) { - drop_connection(t); - } - /* merge stream lists */ - grpc_chttp2_stream_map_move_into(&t->new_stream_map, - &t->parsing_stream_map); - t->global.concurrent_stream_count = grpc_chttp2_stream_map_size(&t->parsing_stream_map); - /* handle higher level things */ - grpc_chttp2_publish_reads(&t->global, &t->parsing); - t->parsing_active = 0; - } - if (i == nslices) { - grpc_chttp2_schedule_closure(&t->global, &t->reading_action, 1); - } - unlock(t); - for (; i < nslices; i++) gpr_slice_unref(slices[i]); + grpc_chttp2_run_with_global_lock(t, NULL, recv_data_ok_locked, NULL, 0); break; } } -#endif static void reading_action(void *pt, int iomgr_success_ignored) { grpc_chttp2_transport *t = pt; @@ -1024,9 +1033,8 @@ static void notify_closed(void *gt, int iomgr_success_ignored) { UNREF_TRANSPORT(t, "notify_closed"); } -#if 0 static void unlock_check_channel_callbacks(grpc_chttp2_transport *t) { - if (t->channel_callback.executing) { + if (t->executor.channel_callback_active) { return; } if (t->global.goaway_state != GRPC_CHTTP2_ERROR_STATE_NONE) { @@ -1037,7 +1045,7 @@ static void unlock_check_channel_callbacks(grpc_chttp2_transport *t) { a->error = t->global.goaway_error; a->text = t->global.goaway_text; t->global.goaway_state = GRPC_CHTTP2_ERROR_STATE_NOTIFIED; - t->channel_callback.executing = 1; + t->executor.channel_callback_active = 1; grpc_iomgr_closure_init(&a->closure, notify_goaways, a); REF_TRANSPORT(t, "notify_goaways"); grpc_chttp2_schedule_closure(&t->global, &a->closure, 1); @@ -1048,13 +1056,12 @@ static void unlock_check_channel_callbacks(grpc_chttp2_transport *t) { } if (t->global.error_state == GRPC_CHTTP2_ERROR_STATE_SEEN) { t->global.error_state = GRPC_CHTTP2_ERROR_STATE_NOTIFIED; - t->channel_callback.executing = 1; + t->executor.channel_callback_active = 1; REF_TRANSPORT(t, "notify_closed"); grpc_chttp2_schedule_closure(&t->global, &t->channel_callback.notify_closed, 1); } } -#endif void grpc_chttp2_schedule_closure( grpc_chttp2_transport_global *transport_global, grpc_iomgr_closure *closure, From 55e9953d949755e651a7320b854bead6dbcc2b64 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 23 Jun 2015 12:25:55 -0700 Subject: [PATCH 0003/1894] Fix some memory issues --- src/core/transport/chttp2_transport.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 159072eab4c..0aae67a2c0b 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -505,6 +505,7 @@ static void finish_global_actions(grpc_chttp2_transport *t) { hdr->action(t, hdr->stream, hdr->arg); next = hdr->next; gpr_free(hdr); + UNREF_TRANSPORT(t, "pending_action"); hdr = next; } continue; @@ -519,6 +520,7 @@ void grpc_chttp2_run_with_global_lock(grpc_chttp2_transport *t, grpc_chttp2_stre void *arg, size_t sizeof_arg) { grpc_chttp2_executor_action_header *hdr; + REF_TRANSPORT(t, "run_global"); gpr_mu_lock(&t->executor.mu); for (;;) { @@ -549,10 +551,13 @@ void grpc_chttp2_run_with_global_lock(grpc_chttp2_transport *t, grpc_chttp2_stre } hdr->next = t->executor.pending_actions; t->executor.pending_actions = hdr; + REF_TRANSPORT(t, "pending_action"); gpr_mu_unlock(&t->executor.mu); } break; } + + UNREF_TRANSPORT(t, "run_global"); } /* @@ -921,8 +926,9 @@ static void recv_data_error_locked(grpc_chttp2_transport *t, grpc_chttp2_stream UNREF_TRANSPORT( t, "disconnect"); /* safe as we still have a ref for read */ } - UNREF_TRANSPORT(t, "recv_data"); for (i = 0; i < t->executor_parsing.nslices; i++) gpr_slice_unref(t->executor_parsing.slices[i]); + memset(&t->executor_parsing, 0, sizeof(t->executor_parsing)); + UNREF_TRANSPORT(t, "recv_data"); } static void finish_parsing_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s_ignored, void *a) { @@ -944,6 +950,7 @@ static void finish_parsing_locked(grpc_chttp2_transport *t, grpc_chttp2_stream * if (i == t->executor_parsing.nslices) { grpc_chttp2_schedule_closure(&t->global, &t->reading_action, 1); } + memset(&t->executor_parsing, 0, sizeof(t->executor_parsing)); } static void parsing_action(void *pt, int iomgr_success_ignored) { @@ -969,6 +976,7 @@ static void recv_data_ok_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s, grpc_chttp2_schedule_closure(&t->global, &t->parsing_action, 1); } else { for (i = 0; i < t->executor_parsing.nslices; i++) gpr_slice_unref(t->executor_parsing.slices[i]); + memset(&t->executor_parsing, 0, sizeof(t->executor_parsing)); } } From 0cd216cd160926d70f3566bf21f212e3c56a7e89 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 1 Jul 2015 16:11:25 -0700 Subject: [PATCH 0004/1894] Merge with latest --- src/core/transport/chttp2_transport.c | 37 ++++++++++++++------------- 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 09d1a8cb390..53c1898843e 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -940,6 +940,19 @@ static void recv_data_error_locked(grpc_chttp2_transport *t, grpc_chttp2_stream UNREF_TRANSPORT(t, "recv_data"); } +/** update window from a settings change */ +static void update_global_window(void *args, gpr_uint32 id, void *stream) { + grpc_chttp2_transport *t = args; + grpc_chttp2_stream *s = stream; + grpc_chttp2_transport_global *transport_global = &t->global; + grpc_chttp2_stream_global *stream_global = &s->global; + + GRPC_CHTTP2_FLOWCTL_TRACE_STREAM("settings", transport_global, stream_global, + outgoing_window, + t->parsing.initial_window_update); + stream_global->outgoing_window += t->parsing.initial_window_update; +} + static void finish_parsing_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s_ignored, void *a) { size_t i = *(size_t *)a; @@ -950,20 +963,24 @@ static void finish_parsing_locked(grpc_chttp2_transport *t, grpc_chttp2_stream * grpc_chttp2_stream_map_move_into(&t->new_stream_map, &t->parsing_stream_map); t->global.concurrent_stream_count = grpc_chttp2_stream_map_size(&t->parsing_stream_map); + if (t->parsing.initial_window_update != 0) { + grpc_chttp2_stream_map_for_each(&t->parsing_stream_map, + update_global_window, t); + } /* handle higher level things */ grpc_chttp2_publish_reads(&t->global, &t->parsing); t->executor.parsing_active = 0; for (; i < t->executor_parsing.nslices; i++) gpr_slice_unref(t->executor_parsing.slices[i]); - memset(&t->executor_parsing, 0, sizeof(t->executor_parsing)); - if (i == t->executor_parsing.nslices) { grpc_chttp2_schedule_closure(&t->global, &t->reading_action, 1); } else { read_error_locked(t); UNREF_TRANSPORT(t, "recv_data"); } + + memset(&t->executor_parsing, 0, sizeof(t->executor_parsing)); } static void parsing_action(void *pt, int iomgr_success_ignored) { @@ -993,19 +1010,6 @@ static void recv_data_ok_locked(grpc_chttp2_transport *t, grpc_chttp2_stream *s, } } -/** update window from a settings change */ -static void update_global_window(void *args, gpr_uint32 id, void *stream) { - grpc_chttp2_transport *t = args; - grpc_chttp2_stream *s = stream; - grpc_chttp2_transport_global *transport_global = &t->global; - grpc_chttp2_stream_global *stream_global = &s->global; - - GRPC_CHTTP2_FLOWCTL_TRACE_STREAM("settings", transport_global, stream_global, - outgoing_window, - t->parsing.initial_window_update); - stream_global->outgoing_window += t->parsing.initial_window_update; -} - /* tcp read callback */ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, grpc_endpoint_cb_status error) { @@ -1024,9 +1028,6 @@ static void recv_data(void *tp, gpr_slice *slices, size_t nslices, grpc_chttp2_run_with_global_lock(t, NULL, recv_data_ok_locked, NULL, 0); break; } - if (unref) { - UNREF_TRANSPORT(t, "recv_data"); - } } static void reading_action(void *pt, int iomgr_success_ignored) { From 2961e57007eb74b653a5ebc647dca869ac96ce03 Mon Sep 17 00:00:00 2001 From: Tamihiro Yuzawa Date: Tue, 16 Feb 2016 17:03:18 +0900 Subject: [PATCH 0005/1894] Fix variable assignment in the example script --- examples/python/route_guide/route_guide_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/python/route_guide/route_guide_server.py b/examples/python/route_guide/route_guide_server.py index f23b98bf367..eb186838b50 100644 --- a/examples/python/route_guide/route_guide_server.py +++ b/examples/python/route_guide/route_guide_server.py @@ -51,7 +51,7 @@ def get_distance(start, end): coord_factor = 10000000.0 lat_1 = start.latitude / coord_factor lat_2 = end.latitude / coord_factor - lon_1 = start.latitude / coord_factor + lon_1 = start.longitude / coord_factor lon_2 = end.longitude / coord_factor lat_rad_1 = math.radians(lat_1) lat_rad_2 = math.radians(lat_2) From 253bd5016709f5a070ac792597ccf9f11cd29852 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 25 Feb 2016 12:30:23 -0800 Subject: [PATCH 0006/1894] Allow selecting poll strategy, start to stub ev_poll_posix.c --- src/core/iomgr/ev_poll_posix.c | 1645 ++ src/core/iomgr/ev_poll_posix.h | 41 + src/core/iomgr/ev_posix.c | 83 +- test/core/end2end/gen_build_yaml.py | 24 +- tools/run_tests/run_tests.py | 12 +- tools/run_tests/tests.json | 36589 +++++++++++++++++++++++--- 6 files changed, 34282 insertions(+), 4112 deletions(-) create mode 100644 src/core/iomgr/ev_poll_posix.c create mode 100644 src/core/iomgr/ev_poll_posix.h diff --git a/src/core/iomgr/ev_poll_posix.c b/src/core/iomgr/ev_poll_posix.c new file mode 100644 index 00000000000..3693e137299 --- /dev/null +++ b/src/core/iomgr/ev_poll_posix.c @@ -0,0 +1,1645 @@ +/* + * + * Copyright 2015-2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* This file will be removed shortly: it's here to keep refactoring + * steps simple and auditable. + * It's the combination of the old files: + * - fd_posix.{h,c} + * - pollset_posix.{h,c} + * - pullset_multipoller_with_{poll,epoll}.{h,c} + * The new version will be split into: + * - ev_poll_posix.{h,c} + * - ev_epoll_posix.{h,c} + */ + +#include + +#ifdef GPR_POSIX_SOCKET + +#include "src/core/iomgr/ev_poll_and_epoll_posix.h" + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +#include "src/core/iomgr/iomgr_internal.h" +#include "src/core/iomgr/wakeup_fd_posix.h" +#include "src/core/profiling/timers.h" +#include "src/core/support/block_annotate.h" + +/******************************************************************************* + * FD declarations + */ + +typedef struct grpc_fd_watcher { + struct grpc_fd_watcher *next; + struct grpc_fd_watcher *prev; + grpc_pollset *pollset; + grpc_pollset_worker *worker; + grpc_fd *fd; +} grpc_fd_watcher; + +struct grpc_fd { + int fd; + /* refst format: + bit0: 1=active/0=orphaned + bit1-n: refcount + meaning that mostly we ref by two to avoid altering the orphaned bit, + and just unref by 1 when we're ready to flag the object as orphaned */ + gpr_atm refst; + + gpr_mu mu; + int shutdown; + int closed; + int released; + + /* The watcher list. + + The following watcher related fields are protected by watcher_mu. + + An fd_watcher is an ephemeral object created when an fd wants to + begin polling, and destroyed after the poll. + + It denotes the fd's interest in whether to read poll or write poll + or both or neither on this fd. + + If a watcher is asked to poll for reads or writes, the read_watcher + or write_watcher fields are set respectively. A watcher may be asked + to poll for both, in which case both fields will be set. + + read_watcher and write_watcher may be NULL if no watcher has been + asked to poll for reads or writes. + + If an fd_watcher is not asked to poll for reads or writes, it's added + to a linked list of inactive watchers, rooted at inactive_watcher_root. + If at a later time there becomes need of a poller to poll, one of + the inactive pollers may be kicked out of their poll loops to take + that responsibility. */ + grpc_fd_watcher inactive_watcher_root; + grpc_fd_watcher *read_watcher; + grpc_fd_watcher *write_watcher; + + grpc_closure *read_closure; + grpc_closure *write_closure; + + struct grpc_fd *freelist_next; + + grpc_closure *on_done_closure; + + grpc_iomgr_object iomgr_object; +}; + +/* Begin polling on an fd. + Registers that the given pollset is interested in this fd - so that if read + or writability interest changes, the pollset can be kicked to pick up that + new interest. + Return value is: + (fd_needs_read? read_mask : 0) | (fd_needs_write? write_mask : 0) + i.e. a combination of read_mask and write_mask determined by the fd's current + interest in said events. + Polling strategies that do not need to alter their behavior depending on the + fd's current interest (such as epoll) do not need to call this function. + MUST NOT be called with a pollset lock taken */ +static uint32_t fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset, + grpc_pollset_worker *worker, uint32_t read_mask, + uint32_t write_mask, grpc_fd_watcher *rec); +/* Complete polling previously started with fd_begin_poll + MUST NOT be called with a pollset lock taken + if got_read or got_write are 1, also does the become_{readable,writable} as + appropriate. */ +static void fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *rec, + int got_read, int got_write); + +/* Return 1 if this fd is orphaned, 0 otherwise */ +static bool fd_is_orphaned(grpc_fd *fd); + +/* Notification from the poller to an fd that it has become readable or + writable. + If allow_synchronous_callback is 1, allow running the fd callback inline + in this callstack, otherwise register an asynchronous callback and return */ +static void fd_become_readable(grpc_exec_ctx *exec_ctx, grpc_fd *fd); +static void fd_become_writable(grpc_exec_ctx *exec_ctx, grpc_fd *fd); + +/* Reference counting for fds */ +/*#define GRPC_FD_REF_COUNT_DEBUG*/ +#ifdef GRPC_FD_REF_COUNT_DEBUG +static void fd_ref(grpc_fd *fd, const char *reason, const char *file, int line); +static void fd_unref(grpc_fd *fd, const char *reason, const char *file, + int line); +#define GRPC_FD_REF(fd, reason) fd_ref(fd, reason, __FILE__, __LINE__) +#define GRPC_FD_UNREF(fd, reason) fd_unref(fd, reason, __FILE__, __LINE__) +#else +static void fd_ref(grpc_fd *fd); +static void fd_unref(grpc_fd *fd); +#define GRPC_FD_REF(fd, reason) fd_ref(fd) +#define GRPC_FD_UNREF(fd, reason) fd_unref(fd) +#endif + +static void fd_global_init(void); +static void fd_global_shutdown(void); + +#define CLOSURE_NOT_READY ((grpc_closure *)0) +#define CLOSURE_READY ((grpc_closure *)1) + +/******************************************************************************* + * pollset declarations + */ + +typedef struct grpc_pollset_vtable grpc_pollset_vtable; + +typedef struct grpc_cached_wakeup_fd { + grpc_wakeup_fd fd; + struct grpc_cached_wakeup_fd *next; +} grpc_cached_wakeup_fd; + +struct grpc_pollset_worker { + grpc_cached_wakeup_fd *wakeup_fd; + int reevaluate_polling_on_wakeup; + int kicked_specifically; + struct grpc_pollset_worker *next; + struct grpc_pollset_worker *prev; +}; + +struct grpc_pollset { + /* pollsets under posix can mutate representation as fds are added and + removed. + For example, we may choose a poll() based implementation on linux for + few fds, and an epoll() based implementation for many fds */ + const grpc_pollset_vtable *vtable; + gpr_mu *mu; + grpc_pollset_worker root_worker; + int in_flight_cbs; + int shutting_down; + int called_shutdown; + int kicked_without_pollers; + grpc_closure *shutdown_done; + grpc_closure_list idle_jobs; + union { + int fd; + void *ptr; + } data; + /* Local cache of eventfds for workers */ + grpc_cached_wakeup_fd *local_wakeup_cache; +}; + +struct grpc_pollset_vtable { + void (*add_fd)(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, + struct grpc_fd *fd, int and_unlock_pollset); + void (*maybe_work_and_unlock)(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, + grpc_pollset_worker *worker, + gpr_timespec deadline, gpr_timespec now); + void (*finish_shutdown)(grpc_pollset *pollset); + void (*destroy)(grpc_pollset *pollset); +}; + +/* Add an fd to a pollset */ +static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, + struct grpc_fd *fd); + +static void pollset_set_add_fd(grpc_exec_ctx *exec_ctx, + grpc_pollset_set *pollset_set, grpc_fd *fd); + +/* Convert a timespec to milliseconds: + - very small or negative poll times are clamped to zero to do a + non-blocking poll (which becomes spin polling) + - other small values are rounded up to one millisecond + - longer than a millisecond polls are rounded up to the next nearest + millisecond to avoid spinning + - infinite timeouts are converted to -1 */ +static int poll_deadline_to_millis_timeout(gpr_timespec deadline, + gpr_timespec now); + +/* Allow kick to wakeup the currently polling worker */ +#define GRPC_POLLSET_CAN_KICK_SELF 1 +/* Force the wakee to repoll when awoken */ +#define GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP 2 +/* As per pollset_kick, with an extended set of flags (defined above) + -- mostly for fd_posix's use. */ +static void pollset_kick_ext(grpc_pollset *p, + grpc_pollset_worker *specific_worker, + uint32_t flags); + +/* turn a pollset into a multipoller: platform specific */ +typedef void (*platform_become_multipoller_type)(grpc_exec_ctx *exec_ctx, + grpc_pollset *pollset, + struct grpc_fd **fds, + size_t fd_count); +static platform_become_multipoller_type platform_become_multipoller; + +/* Return 1 if the pollset has active threads in pollset_work (pollset must + * be locked) */ +static int pollset_has_workers(grpc_pollset *pollset); + +static void remove_fd_from_all_epoll_sets(int fd); + +/* override to allow tests to hook poll() usage */ +typedef int (*grpc_poll_function_type)(struct pollfd *, nfds_t, int); +extern grpc_poll_function_type grpc_poll_function; +extern grpc_wakeup_fd grpc_global_wakeup_fd; + +/******************************************************************************* + * pollset_set definitions + */ + +struct grpc_pollset_set { + gpr_mu mu; + + size_t pollset_count; + size_t pollset_capacity; + grpc_pollset **pollsets; + + size_t pollset_set_count; + size_t pollset_set_capacity; + struct grpc_pollset_set **pollset_sets; + + size_t fd_count; + size_t fd_capacity; + grpc_fd **fds; +}; + +/******************************************************************************* + * fd_posix.c + */ + +/* We need to keep a freelist not because of any concerns of malloc performance + * but instead so that implementations with multiple threads in (for example) + * epoll_wait deal with the race between pollset removal and incoming poll + * notifications. + * + * The problem is that the poller ultimately holds a reference to this + * object, so it is very difficult to know when is safe to free it, at least + * without some expensive synchronization. + * + * If we keep the object freelisted, in the worst case losing this race just + * becomes a spurious read notification on a reused fd. + */ +/* TODO(klempner): We could use some form of polling generation count to know + * when these are safe to free. */ +/* TODO(klempner): Consider disabling freelisting if we don't have multiple + * threads in poll on the same fd */ +/* TODO(klempner): Batch these allocations to reduce fragmentation */ +static grpc_fd *fd_freelist = NULL; +static gpr_mu fd_freelist_mu; + +static void freelist_fd(grpc_fd *fd) { + gpr_mu_lock(&fd_freelist_mu); + fd->freelist_next = fd_freelist; + fd_freelist = fd; + grpc_iomgr_unregister_object(&fd->iomgr_object); + gpr_mu_unlock(&fd_freelist_mu); +} + +static grpc_fd *alloc_fd(int fd) { + grpc_fd *r = NULL; + gpr_mu_lock(&fd_freelist_mu); + if (fd_freelist != NULL) { + r = fd_freelist; + fd_freelist = fd_freelist->freelist_next; + } + gpr_mu_unlock(&fd_freelist_mu); + if (r == NULL) { + r = gpr_malloc(sizeof(grpc_fd)); + gpr_mu_init(&r->mu); + } + + gpr_atm_rel_store(&r->refst, 1); + r->shutdown = 0; + r->read_closure = CLOSURE_NOT_READY; + r->write_closure = CLOSURE_NOT_READY; + r->fd = fd; + r->inactive_watcher_root.next = r->inactive_watcher_root.prev = + &r->inactive_watcher_root; + r->freelist_next = NULL; + r->read_watcher = r->write_watcher = NULL; + r->on_done_closure = NULL; + r->closed = 0; + r->released = 0; + return r; +} + +static void destroy(grpc_fd *fd) { + gpr_mu_destroy(&fd->mu); + gpr_free(fd); +} + +#ifdef GRPC_FD_REF_COUNT_DEBUG +#define REF_BY(fd, n, reason) ref_by(fd, n, reason, __FILE__, __LINE__) +#define UNREF_BY(fd, n, reason) unref_by(fd, n, reason, __FILE__, __LINE__) +static void ref_by(grpc_fd *fd, int n, const char *reason, const char *file, + int line) { + gpr_log(GPR_DEBUG, "FD %d %p ref %d %d -> %d [%s; %s:%d]", fd->fd, fd, n, + gpr_atm_no_barrier_load(&fd->refst), + gpr_atm_no_barrier_load(&fd->refst) + n, reason, file, line); +#else +#define REF_BY(fd, n, reason) ref_by(fd, n) +#define UNREF_BY(fd, n, reason) unref_by(fd, n) +static void ref_by(grpc_fd *fd, int n) { +#endif + GPR_ASSERT(gpr_atm_no_barrier_fetch_add(&fd->refst, n) > 0); +} + +#ifdef GRPC_FD_REF_COUNT_DEBUG +static void unref_by(grpc_fd *fd, int n, const char *reason, const char *file, + int line) { + gpr_atm old; + gpr_log(GPR_DEBUG, "FD %d %p unref %d %d -> %d [%s; %s:%d]", fd->fd, fd, n, + gpr_atm_no_barrier_load(&fd->refst), + gpr_atm_no_barrier_load(&fd->refst) - n, reason, file, line); +#else +static void unref_by(grpc_fd *fd, int n) { + gpr_atm old; +#endif + old = gpr_atm_full_fetch_add(&fd->refst, -n); + if (old == n) { + freelist_fd(fd); + } else { + GPR_ASSERT(old > n); + } +} + +static void fd_global_init(void) { gpr_mu_init(&fd_freelist_mu); } + +static void fd_global_shutdown(void) { + gpr_mu_lock(&fd_freelist_mu); + gpr_mu_unlock(&fd_freelist_mu); + while (fd_freelist != NULL) { + grpc_fd *fd = fd_freelist; + fd_freelist = fd_freelist->freelist_next; + destroy(fd); + } + gpr_mu_destroy(&fd_freelist_mu); +} + +static grpc_fd *fd_create(int fd, const char *name) { + grpc_fd *r = alloc_fd(fd); + char *name2; + gpr_asprintf(&name2, "%s fd=%d", name, fd); + grpc_iomgr_register_object(&r->iomgr_object, name2); + gpr_free(name2); +#ifdef GRPC_FD_REF_COUNT_DEBUG + gpr_log(GPR_DEBUG, "FD %d %p create %s", fd, r, name); +#endif + return r; +} + +static bool fd_is_orphaned(grpc_fd *fd) { + return (gpr_atm_acq_load(&fd->refst) & 1) == 0; +} + +static void pollset_kick_locked(grpc_fd_watcher *watcher) { + gpr_mu_lock(watcher->pollset->mu); + GPR_ASSERT(watcher->worker); + pollset_kick_ext(watcher->pollset, watcher->worker, + GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP); + gpr_mu_unlock(watcher->pollset->mu); +} + +static void maybe_wake_one_watcher_locked(grpc_fd *fd) { + if (fd->inactive_watcher_root.next != &fd->inactive_watcher_root) { + pollset_kick_locked(fd->inactive_watcher_root.next); + } else if (fd->read_watcher) { + pollset_kick_locked(fd->read_watcher); + } else if (fd->write_watcher) { + pollset_kick_locked(fd->write_watcher); + } +} + +static void wake_all_watchers_locked(grpc_fd *fd) { + grpc_fd_watcher *watcher; + for (watcher = fd->inactive_watcher_root.next; + watcher != &fd->inactive_watcher_root; watcher = watcher->next) { + pollset_kick_locked(watcher); + } + if (fd->read_watcher) { + pollset_kick_locked(fd->read_watcher); + } + if (fd->write_watcher && fd->write_watcher != fd->read_watcher) { + pollset_kick_locked(fd->write_watcher); + } +} + +static int has_watchers(grpc_fd *fd) { + return fd->read_watcher != NULL || fd->write_watcher != NULL || + fd->inactive_watcher_root.next != &fd->inactive_watcher_root; +} + +static void close_fd_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { + fd->closed = 1; + if (!fd->released) { + close(fd->fd); + } else { + remove_fd_from_all_epoll_sets(fd->fd); + } + grpc_exec_ctx_enqueue(exec_ctx, fd->on_done_closure, true, NULL); +} + +static int fd_wrapped_fd(grpc_fd *fd) { + if (fd->released || fd->closed) { + return -1; + } else { + return fd->fd; + } +} + +static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, + grpc_closure *on_done, int *release_fd, + const char *reason) { + fd->on_done_closure = on_done; + fd->released = release_fd != NULL; + if (!fd->released) { + shutdown(fd->fd, SHUT_RDWR); + } else { + *release_fd = fd->fd; + } + gpr_mu_lock(&fd->mu); + REF_BY(fd, 1, reason); /* remove active status, but keep referenced */ + if (!has_watchers(fd)) { + close_fd_locked(exec_ctx, fd); + } else { + wake_all_watchers_locked(fd); + } + gpr_mu_unlock(&fd->mu); + UNREF_BY(fd, 2, reason); /* drop the reference */ +} + +/* increment refcount by two to avoid changing the orphan bit */ +#ifdef GRPC_FD_REF_COUNT_DEBUG +static void fd_ref(grpc_fd *fd, const char *reason, const char *file, + int line) { + ref_by(fd, 2, reason, file, line); +} + +static void fd_unref(grpc_fd *fd, const char *reason, const char *file, + int line) { + unref_by(fd, 2, reason, file, line); +} +#else +static void fd_ref(grpc_fd *fd) { ref_by(fd, 2); } + +static void fd_unref(grpc_fd *fd) { unref_by(fd, 2); } +#endif + +static void notify_on_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, + grpc_closure **st, grpc_closure *closure) { + if (*st == CLOSURE_NOT_READY) { + /* not ready ==> switch to a waiting state by setting the closure */ + *st = closure; + } else if (*st == CLOSURE_READY) { + /* already ready ==> queue the closure to run immediately */ + *st = CLOSURE_NOT_READY; + grpc_exec_ctx_enqueue(exec_ctx, closure, !fd->shutdown, NULL); + maybe_wake_one_watcher_locked(fd); + } else { + /* upcallptr was set to a different closure. This is an error! */ + gpr_log(GPR_ERROR, + "User called a notify_on function with a previous callback still " + "pending"); + abort(); + } +} + +/* returns 1 if state becomes not ready */ +static int set_ready_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, + grpc_closure **st) { + if (*st == CLOSURE_READY) { + /* duplicate ready ==> ignore */ + return 0; + } else if (*st == CLOSURE_NOT_READY) { + /* not ready, and not waiting ==> flag ready */ + *st = CLOSURE_READY; + return 0; + } else { + /* waiting ==> queue closure */ + grpc_exec_ctx_enqueue(exec_ctx, *st, !fd->shutdown, NULL); + *st = CLOSURE_NOT_READY; + return 1; + } +} + +static void set_ready(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st) { + /* only one set_ready can be active at once (but there may be a racing + notify_on) */ + gpr_mu_lock(&fd->mu); + set_ready_locked(exec_ctx, fd, st); + gpr_mu_unlock(&fd->mu); +} + +static void fd_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { + gpr_mu_lock(&fd->mu); + GPR_ASSERT(!fd->shutdown); + fd->shutdown = 1; + set_ready_locked(exec_ctx, fd, &fd->read_closure); + set_ready_locked(exec_ctx, fd, &fd->write_closure); + gpr_mu_unlock(&fd->mu); +} + +static void fd_notify_on_read(grpc_exec_ctx *exec_ctx, grpc_fd *fd, + grpc_closure *closure) { + gpr_mu_lock(&fd->mu); + notify_on_locked(exec_ctx, fd, &fd->read_closure, closure); + gpr_mu_unlock(&fd->mu); +} + +static void fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, + grpc_closure *closure) { + gpr_mu_lock(&fd->mu); + notify_on_locked(exec_ctx, fd, &fd->write_closure, closure); + gpr_mu_unlock(&fd->mu); +} + +static uint32_t fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset, + grpc_pollset_worker *worker, uint32_t read_mask, + uint32_t write_mask, grpc_fd_watcher *watcher) { + uint32_t mask = 0; + grpc_closure *cur; + int requested; + /* keep track of pollers that have requested our events, in case they change + */ + GRPC_FD_REF(fd, "poll"); + + gpr_mu_lock(&fd->mu); + + /* if we are shutdown, then don't add to the watcher set */ + if (fd->shutdown) { + watcher->fd = NULL; + watcher->pollset = NULL; + watcher->worker = NULL; + gpr_mu_unlock(&fd->mu); + GRPC_FD_UNREF(fd, "poll"); + return 0; + } + + /* if there is nobody polling for read, but we need to, then start doing so */ + cur = fd->read_closure; + requested = cur != CLOSURE_READY; + if (read_mask && fd->read_watcher == NULL && requested) { + fd->read_watcher = watcher; + mask |= read_mask; + } + /* if there is nobody polling for write, but we need to, then start doing so + */ + cur = fd->write_closure; + requested = cur != CLOSURE_READY; + if (write_mask && fd->write_watcher == NULL && requested) { + fd->write_watcher = watcher; + mask |= write_mask; + } + /* if not polling, remember this watcher in case we need someone to later */ + if (mask == 0 && worker != NULL) { + watcher->next = &fd->inactive_watcher_root; + watcher->prev = watcher->next->prev; + watcher->next->prev = watcher->prev->next = watcher; + } + watcher->pollset = pollset; + watcher->worker = worker; + watcher->fd = fd; + gpr_mu_unlock(&fd->mu); + + return mask; +} + +static void fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *watcher, + int got_read, int got_write) { + int was_polling = 0; + int kick = 0; + grpc_fd *fd = watcher->fd; + + if (fd == NULL) { + return; + } + + gpr_mu_lock(&fd->mu); + + if (watcher == fd->read_watcher) { + /* remove read watcher, kick if we still need a read */ + was_polling = 1; + if (!got_read) { + kick = 1; + } + fd->read_watcher = NULL; + } + if (watcher == fd->write_watcher) { + /* remove write watcher, kick if we still need a write */ + was_polling = 1; + if (!got_write) { + kick = 1; + } + fd->write_watcher = NULL; + } + if (!was_polling && watcher->worker != NULL) { + /* remove from inactive list */ + watcher->next->prev = watcher->prev; + watcher->prev->next = watcher->next; + } + if (got_read) { + if (set_ready_locked(exec_ctx, fd, &fd->read_closure)) { + kick = 1; + } + } + if (got_write) { + if (set_ready_locked(exec_ctx, fd, &fd->write_closure)) { + kick = 1; + } + } + if (kick) { + maybe_wake_one_watcher_locked(fd); + } + if (fd_is_orphaned(fd) && !has_watchers(fd) && !fd->closed) { + close_fd_locked(exec_ctx, fd); + } + gpr_mu_unlock(&fd->mu); + + GRPC_FD_UNREF(fd, "poll"); +} + +static void fd_become_readable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { + set_ready(exec_ctx, fd, &fd->read_closure); +} + +static void fd_become_writable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { + set_ready(exec_ctx, fd, &fd->write_closure); +} + +/******************************************************************************* + * pollset_posix.c + */ + +GPR_TLS_DECL(g_current_thread_poller); +GPR_TLS_DECL(g_current_thread_worker); + +/** Default poll() function - a pointer so that it can be overridden by some + * tests */ +grpc_poll_function_type grpc_poll_function = poll; + +/** The alarm system needs to be able to wakeup 'some poller' sometimes + * (specifically when a new alarm needs to be triggered earlier than the next + * alarm 'epoch'). + * This wakeup_fd gives us something to alert on when such a case occurs. */ +grpc_wakeup_fd grpc_global_wakeup_fd; + +static void remove_worker(grpc_pollset *p, grpc_pollset_worker *worker) { + worker->prev->next = worker->next; + worker->next->prev = worker->prev; +} + +static int pollset_has_workers(grpc_pollset *p) { + return p->root_worker.next != &p->root_worker; +} + +static grpc_pollset_worker *pop_front_worker(grpc_pollset *p) { + if (pollset_has_workers(p)) { + grpc_pollset_worker *w = p->root_worker.next; + remove_worker(p, w); + return w; + } else { + return NULL; + } +} + +static void push_back_worker(grpc_pollset *p, grpc_pollset_worker *worker) { + worker->next = &p->root_worker; + worker->prev = worker->next->prev; + worker->prev->next = worker->next->prev = worker; +} + +static void push_front_worker(grpc_pollset *p, grpc_pollset_worker *worker) { + worker->prev = &p->root_worker; + worker->next = worker->prev->next; + worker->prev->next = worker->next->prev = worker; +} + +static void pollset_kick_ext(grpc_pollset *p, + grpc_pollset_worker *specific_worker, + uint32_t flags) { + GPR_TIMER_BEGIN("pollset_kick_ext", 0); + + /* pollset->mu already held */ + if (specific_worker != NULL) { + if (specific_worker == GRPC_POLLSET_KICK_BROADCAST) { + GPR_TIMER_BEGIN("pollset_kick_ext.broadcast", 0); + GPR_ASSERT((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) == 0); + for (specific_worker = p->root_worker.next; + specific_worker != &p->root_worker; + specific_worker = specific_worker->next) { + grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd); + } + p->kicked_without_pollers = 1; + GPR_TIMER_END("pollset_kick_ext.broadcast", 0); + } else if (gpr_tls_get(&g_current_thread_worker) != + (intptr_t)specific_worker) { + GPR_TIMER_MARK("different_thread_worker", 0); + if ((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) != 0) { + specific_worker->reevaluate_polling_on_wakeup = 1; + } + specific_worker->kicked_specifically = 1; + grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd); + } else if ((flags & GRPC_POLLSET_CAN_KICK_SELF) != 0) { + GPR_TIMER_MARK("kick_yoself", 0); + if ((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) != 0) { + specific_worker->reevaluate_polling_on_wakeup = 1; + } + specific_worker->kicked_specifically = 1; + grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd); + } + } else if (gpr_tls_get(&g_current_thread_poller) != (intptr_t)p) { + GPR_ASSERT((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) == 0); + GPR_TIMER_MARK("kick_anonymous", 0); + specific_worker = pop_front_worker(p); + if (specific_worker != NULL) { + if (gpr_tls_get(&g_current_thread_worker) == (intptr_t)specific_worker) { + GPR_TIMER_MARK("kick_anonymous_not_self", 0); + push_back_worker(p, specific_worker); + specific_worker = pop_front_worker(p); + if ((flags & GRPC_POLLSET_CAN_KICK_SELF) == 0 && + gpr_tls_get(&g_current_thread_worker) == + (intptr_t)specific_worker) { + push_back_worker(p, specific_worker); + specific_worker = NULL; + } + } + if (specific_worker != NULL) { + GPR_TIMER_MARK("finally_kick", 0); + push_back_worker(p, specific_worker); + grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd); + } + } else { + GPR_TIMER_MARK("kicked_no_pollers", 0); + p->kicked_without_pollers = 1; + } + } + + GPR_TIMER_END("pollset_kick_ext", 0); +} + +static void pollset_kick(grpc_pollset *p, + grpc_pollset_worker *specific_worker) { + pollset_kick_ext(p, specific_worker, 0); +} + +/* global state management */ + +static void pollset_global_init(void) { + gpr_tls_init(&g_current_thread_poller); + gpr_tls_init(&g_current_thread_worker); + grpc_wakeup_fd_global_init(); + grpc_wakeup_fd_init(&grpc_global_wakeup_fd); +} + +static void pollset_global_shutdown(void) { + grpc_wakeup_fd_destroy(&grpc_global_wakeup_fd); + gpr_tls_destroy(&g_current_thread_poller); + gpr_tls_destroy(&g_current_thread_worker); + grpc_wakeup_fd_global_destroy(); +} + +static void kick_poller(void) { grpc_wakeup_fd_wakeup(&grpc_global_wakeup_fd); } + +/* main interface */ + +static void become_basic_pollset(grpc_pollset *pollset, grpc_fd *fd_or_null); + +static void pollset_init(grpc_pollset *pollset, gpr_mu *mu) { + pollset->mu = mu; + pollset->root_worker.next = pollset->root_worker.prev = &pollset->root_worker; + pollset->in_flight_cbs = 0; + pollset->shutting_down = 0; + pollset->called_shutdown = 0; + pollset->kicked_without_pollers = 0; + pollset->idle_jobs.head = pollset->idle_jobs.tail = NULL; + pollset->local_wakeup_cache = NULL; + pollset->kicked_without_pollers = 0; + become_basic_pollset(pollset, NULL); +} + +static void pollset_destroy(grpc_pollset *pollset) { + GPR_ASSERT(pollset->in_flight_cbs == 0); + GPR_ASSERT(!pollset_has_workers(pollset)); + GPR_ASSERT(pollset->idle_jobs.head == pollset->idle_jobs.tail); + pollset->vtable->destroy(pollset); + while (pollset->local_wakeup_cache) { + grpc_cached_wakeup_fd *next = pollset->local_wakeup_cache->next; + grpc_wakeup_fd_destroy(&pollset->local_wakeup_cache->fd); + gpr_free(pollset->local_wakeup_cache); + pollset->local_wakeup_cache = next; + } +} + +static void pollset_reset(grpc_pollset *pollset) { + GPR_ASSERT(pollset->shutting_down); + GPR_ASSERT(pollset->in_flight_cbs == 0); + GPR_ASSERT(!pollset_has_workers(pollset)); + GPR_ASSERT(pollset->idle_jobs.head == pollset->idle_jobs.tail); + pollset->vtable->destroy(pollset); + pollset->shutting_down = 0; + pollset->called_shutdown = 0; + pollset->kicked_without_pollers = 0; + become_basic_pollset(pollset, NULL); +} + +static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, + grpc_fd *fd) { + gpr_mu_lock(pollset->mu); + pollset->vtable->add_fd(exec_ctx, pollset, fd, 1); +/* the following (enabled only in debug) will reacquire and then release + our lock - meaning that if the unlocking flag passed to add_fd above is + not respected, the code will deadlock (in a way that we have a chance of + debugging) */ +#ifndef NDEBUG + gpr_mu_lock(pollset->mu); + gpr_mu_unlock(pollset->mu); +#endif +} + +static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset) { + GPR_ASSERT(grpc_closure_list_empty(pollset->idle_jobs)); + pollset->vtable->finish_shutdown(pollset); + grpc_exec_ctx_enqueue(exec_ctx, pollset->shutdown_done, true, NULL); +} + +static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, + grpc_pollset_worker **worker_hdl, gpr_timespec now, + gpr_timespec deadline) { + grpc_pollset_worker worker; + *worker_hdl = &worker; + + /* pollset->mu already held */ + int added_worker = 0; + int locked = 1; + int queued_work = 0; + int keep_polling = 0; + GPR_TIMER_BEGIN("pollset_work", 0); + /* this must happen before we (potentially) drop pollset->mu */ + worker.next = worker.prev = NULL; + worker.reevaluate_polling_on_wakeup = 0; + if (pollset->local_wakeup_cache != NULL) { + worker.wakeup_fd = pollset->local_wakeup_cache; + pollset->local_wakeup_cache = worker.wakeup_fd->next; + } else { + worker.wakeup_fd = gpr_malloc(sizeof(*worker.wakeup_fd)); + grpc_wakeup_fd_init(&worker.wakeup_fd->fd); + } + worker.kicked_specifically = 0; + /* If there's work waiting for the pollset to be idle, and the + pollset is idle, then do that work */ + if (!pollset_has_workers(pollset) && + !grpc_closure_list_empty(pollset->idle_jobs)) { + GPR_TIMER_MARK("pollset_work.idle_jobs", 0); + grpc_exec_ctx_enqueue_list(exec_ctx, &pollset->idle_jobs, NULL); + goto done; + } + /* If we're shutting down then we don't execute any extended work */ + if (pollset->shutting_down) { + GPR_TIMER_MARK("pollset_work.shutting_down", 0); + goto done; + } + /* Give do_promote priority so we don't starve it out */ + if (pollset->in_flight_cbs) { + GPR_TIMER_MARK("pollset_work.in_flight_cbs", 0); + gpr_mu_unlock(pollset->mu); + locked = 0; + goto done; + } + /* Start polling, and keep doing so while we're being asked to + re-evaluate our pollers (this allows poll() based pollers to + ensure they don't miss wakeups) */ + keep_polling = 1; + while (keep_polling) { + keep_polling = 0; + if (!pollset->kicked_without_pollers) { + if (!added_worker) { + push_front_worker(pollset, &worker); + added_worker = 1; + gpr_tls_set(&g_current_thread_worker, (intptr_t)&worker); + } + gpr_tls_set(&g_current_thread_poller, (intptr_t)pollset); + GPR_TIMER_BEGIN("maybe_work_and_unlock", 0); + pollset->vtable->maybe_work_and_unlock(exec_ctx, pollset, &worker, + deadline, now); + GPR_TIMER_END("maybe_work_and_unlock", 0); + locked = 0; + gpr_tls_set(&g_current_thread_poller, 0); + } else { + GPR_TIMER_MARK("pollset_work.kicked_without_pollers", 0); + pollset->kicked_without_pollers = 0; + } + /* Finished execution - start cleaning up. + Note that we may arrive here from outside the enclosing while() loop. + In that case we won't loop though as we haven't added worker to the + worker list, which means nobody could ask us to re-evaluate polling). */ + done: + if (!locked) { + queued_work |= grpc_exec_ctx_flush(exec_ctx); + gpr_mu_lock(pollset->mu); + locked = 1; + } + /* If we're forced to re-evaluate polling (via pollset_kick with + GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) then we land here and force + a loop */ + if (worker.reevaluate_polling_on_wakeup) { + worker.reevaluate_polling_on_wakeup = 0; + pollset->kicked_without_pollers = 0; + if (queued_work || worker.kicked_specifically) { + /* If there's queued work on the list, then set the deadline to be + immediate so we get back out of the polling loop quickly */ + deadline = gpr_inf_past(GPR_CLOCK_MONOTONIC); + } + keep_polling = 1; + } + } + if (added_worker) { + remove_worker(pollset, &worker); + gpr_tls_set(&g_current_thread_worker, 0); + } + /* release wakeup fd to the local pool */ + worker.wakeup_fd->next = pollset->local_wakeup_cache; + pollset->local_wakeup_cache = worker.wakeup_fd; + /* check shutdown conditions */ + if (pollset->shutting_down) { + if (pollset_has_workers(pollset)) { + pollset_kick(pollset, NULL); + } else if (!pollset->called_shutdown && pollset->in_flight_cbs == 0) { + pollset->called_shutdown = 1; + gpr_mu_unlock(pollset->mu); + finish_shutdown(exec_ctx, pollset); + grpc_exec_ctx_flush(exec_ctx); + /* Continuing to access pollset here is safe -- it is the caller's + * responsibility to not destroy when it has outstanding calls to + * pollset_work. + * TODO(dklempner): Can we refactor the shutdown logic to avoid this? */ + gpr_mu_lock(pollset->mu); + } else if (!grpc_closure_list_empty(pollset->idle_jobs)) { + grpc_exec_ctx_enqueue_list(exec_ctx, &pollset->idle_jobs, NULL); + gpr_mu_unlock(pollset->mu); + grpc_exec_ctx_flush(exec_ctx); + gpr_mu_lock(pollset->mu); + } + } + *worker_hdl = NULL; + GPR_TIMER_END("pollset_work", 0); +} + +static void pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, + grpc_closure *closure) { + GPR_ASSERT(!pollset->shutting_down); + pollset->shutting_down = 1; + pollset->shutdown_done = closure; + pollset_kick(pollset, GRPC_POLLSET_KICK_BROADCAST); + if (!pollset_has_workers(pollset)) { + grpc_exec_ctx_enqueue_list(exec_ctx, &pollset->idle_jobs, NULL); + } + if (!pollset->called_shutdown && pollset->in_flight_cbs == 0 && + !pollset_has_workers(pollset)) { + pollset->called_shutdown = 1; + finish_shutdown(exec_ctx, pollset); + } +} + +static int poll_deadline_to_millis_timeout(gpr_timespec deadline, + gpr_timespec now) { + gpr_timespec timeout; + static const int64_t max_spin_polling_us = 10; + if (gpr_time_cmp(deadline, gpr_inf_future(deadline.clock_type)) == 0) { + return -1; + } + if (gpr_time_cmp(deadline, gpr_time_add(now, gpr_time_from_micros( + max_spin_polling_us, + GPR_TIMESPAN))) <= 0) { + return 0; + } + timeout = gpr_time_sub(deadline, now); + return gpr_time_to_millis(gpr_time_add( + timeout, gpr_time_from_nanos(GPR_NS_PER_MS - 1, GPR_TIMESPAN))); +} + +/* + * basic_pollset - a vtable that provides polling for zero or one file + * descriptor via poll() + */ + +typedef struct grpc_unary_promote_args { + const grpc_pollset_vtable *original_vtable; + grpc_pollset *pollset; + grpc_fd *fd; + grpc_closure promotion_closure; +} grpc_unary_promote_args; + +static void basic_do_promote(grpc_exec_ctx *exec_ctx, void *args, + bool success) { + grpc_unary_promote_args *up_args = args; + const grpc_pollset_vtable *original_vtable = up_args->original_vtable; + grpc_pollset *pollset = up_args->pollset; + grpc_fd *fd = up_args->fd; + + /* + * This is quite tricky. There are a number of cases to keep in mind here: + * 1. fd may have been orphaned + * 2. The pollset may no longer be a unary poller (and we can't let case #1 + * leak to other pollset types!) + * 3. pollset's fd (which may have changed) may have been orphaned + * 4. The pollset may be shutting down. + */ + + gpr_mu_lock(pollset->mu); + /* First we need to ensure that nobody is polling concurrently */ + GPR_ASSERT(!pollset_has_workers(pollset)); + + gpr_free(up_args); + /* At this point the pollset may no longer be a unary poller. In that case + * we should just call the right add function and be done. */ + /* TODO(klempner): If we're not careful this could cause infinite recursion. + * That's not a problem for now because empty_pollset has a trivial poller + * and we don't have any mechanism to unbecome multipoller. */ + pollset->in_flight_cbs--; + if (pollset->shutting_down) { + /* We don't care about this pollset anymore. */ + if (pollset->in_flight_cbs == 0 && !pollset->called_shutdown) { + pollset->called_shutdown = 1; + finish_shutdown(exec_ctx, pollset); + } + } else if (fd_is_orphaned(fd)) { + /* Don't try to add it to anything, we'll drop our ref on it below */ + } else if (pollset->vtable != original_vtable) { + pollset->vtable->add_fd(exec_ctx, pollset, fd, 0); + } else if (fd != pollset->data.ptr) { + grpc_fd *fds[2]; + fds[0] = pollset->data.ptr; + fds[1] = fd; + + if (fds[0] && !fd_is_orphaned(fds[0])) { + platform_become_multipoller(exec_ctx, pollset, fds, GPR_ARRAY_SIZE(fds)); + GRPC_FD_UNREF(fds[0], "basicpoll"); + } else { + /* old fd is orphaned and we haven't cleaned it up until now, so remain a + * unary poller */ + /* Note that it is possible that fds[1] is also orphaned at this point. + * That's okay, we'll correct it at the next add or poll. */ + if (fds[0]) GRPC_FD_UNREF(fds[0], "basicpoll"); + pollset->data.ptr = fd; + GRPC_FD_REF(fd, "basicpoll"); + } + } + + gpr_mu_unlock(pollset->mu); + + /* Matching ref in basic_pollset_add_fd */ + GRPC_FD_UNREF(fd, "basicpoll_add"); +} + +static void basic_pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, + grpc_fd *fd, int and_unlock_pollset) { + grpc_unary_promote_args *up_args; + GPR_ASSERT(fd); + if (fd == pollset->data.ptr) goto exit; + + if (!pollset_has_workers(pollset)) { + /* Fast path -- no in flight cbs */ + /* TODO(klempner): Comment this out and fix any test failures or establish + * they are due to timing issues */ + grpc_fd *fds[2]; + fds[0] = pollset->data.ptr; + fds[1] = fd; + + if (fds[0] == NULL) { + pollset->data.ptr = fd; + GRPC_FD_REF(fd, "basicpoll"); + } else if (!fd_is_orphaned(fds[0])) { + platform_become_multipoller(exec_ctx, pollset, fds, GPR_ARRAY_SIZE(fds)); + GRPC_FD_UNREF(fds[0], "basicpoll"); + } else { + /* old fd is orphaned and we haven't cleaned it up until now, so remain a + * unary poller */ + GRPC_FD_UNREF(fds[0], "basicpoll"); + pollset->data.ptr = fd; + GRPC_FD_REF(fd, "basicpoll"); + } + goto exit; + } + + /* Now we need to promote. This needs to happen when we're not polling. Since + * this may be called from poll, the wait needs to happen asynchronously. */ + GRPC_FD_REF(fd, "basicpoll_add"); + pollset->in_flight_cbs++; + up_args = gpr_malloc(sizeof(*up_args)); + up_args->fd = fd; + up_args->original_vtable = pollset->vtable; + up_args->pollset = pollset; + up_args->promotion_closure.cb = basic_do_promote; + up_args->promotion_closure.cb_arg = up_args; + + grpc_closure_list_add(&pollset->idle_jobs, &up_args->promotion_closure, 1); + pollset_kick(pollset, GRPC_POLLSET_KICK_BROADCAST); + +exit: + if (and_unlock_pollset) { + gpr_mu_unlock(pollset->mu); + } +} + +static void basic_pollset_maybe_work_and_unlock(grpc_exec_ctx *exec_ctx, + grpc_pollset *pollset, + grpc_pollset_worker *worker, + gpr_timespec deadline, + gpr_timespec now) { +#define POLLOUT_CHECK (POLLOUT | POLLHUP | POLLERR) +#define POLLIN_CHECK (POLLIN | POLLHUP | POLLERR) + + struct pollfd pfd[3]; + grpc_fd *fd; + grpc_fd_watcher fd_watcher; + int timeout; + int r; + nfds_t nfds; + + fd = pollset->data.ptr; + if (fd && fd_is_orphaned(fd)) { + GRPC_FD_UNREF(fd, "basicpoll"); + fd = pollset->data.ptr = NULL; + } + timeout = poll_deadline_to_millis_timeout(deadline, now); + pfd[0].fd = GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd); + pfd[0].events = POLLIN; + pfd[0].revents = 0; + pfd[1].fd = GRPC_WAKEUP_FD_GET_READ_FD(&worker->wakeup_fd->fd); + pfd[1].events = POLLIN; + pfd[1].revents = 0; + nfds = 2; + if (fd) { + pfd[2].fd = fd->fd; + pfd[2].revents = 0; + GRPC_FD_REF(fd, "basicpoll_begin"); + gpr_mu_unlock(pollset->mu); + pfd[2].events = + (short)fd_begin_poll(fd, pollset, worker, POLLIN, POLLOUT, &fd_watcher); + if (pfd[2].events != 0) { + nfds++; + } + } else { + gpr_mu_unlock(pollset->mu); + } + + /* TODO(vpai): Consider first doing a 0 timeout poll here to avoid + even going into the blocking annotation if possible */ + /* poll fd count (argument 2) is shortened by one if we have no events + to poll on - such that it only includes the kicker */ + GPR_TIMER_BEGIN("poll", 0); + GRPC_SCHEDULING_START_BLOCKING_REGION; + r = grpc_poll_function(pfd, nfds, timeout); + GRPC_SCHEDULING_END_BLOCKING_REGION; + GPR_TIMER_END("poll", 0); + + if (r < 0) { + if (errno != EINTR) { + gpr_log(GPR_ERROR, "poll() failed: %s", strerror(errno)); + } + if (fd) { + fd_end_poll(exec_ctx, &fd_watcher, 0, 0); + } + } else if (r == 0) { + if (fd) { + fd_end_poll(exec_ctx, &fd_watcher, 0, 0); + } + } else { + if (pfd[0].revents & POLLIN_CHECK) { + grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); + } + if (pfd[1].revents & POLLIN_CHECK) { + grpc_wakeup_fd_consume_wakeup(&worker->wakeup_fd->fd); + } + if (nfds > 2) { + fd_end_poll(exec_ctx, &fd_watcher, pfd[2].revents & POLLIN_CHECK, + pfd[2].revents & POLLOUT_CHECK); + } else if (fd) { + fd_end_poll(exec_ctx, &fd_watcher, 0, 0); + } + } + + if (fd) { + GRPC_FD_UNREF(fd, "basicpoll_begin"); + } +} + +static void basic_pollset_destroy(grpc_pollset *pollset) { + if (pollset->data.ptr != NULL) { + GRPC_FD_UNREF(pollset->data.ptr, "basicpoll"); + pollset->data.ptr = NULL; + } +} + +static const grpc_pollset_vtable basic_pollset = { + basic_pollset_add_fd, basic_pollset_maybe_work_and_unlock, + basic_pollset_destroy, basic_pollset_destroy}; + +static void become_basic_pollset(grpc_pollset *pollset, grpc_fd *fd_or_null) { + pollset->vtable = &basic_pollset; + pollset->data.ptr = fd_or_null; + if (fd_or_null != NULL) { + GRPC_FD_REF(fd_or_null, "basicpoll"); + } +} + +/******************************************************************************* + * pollset_multipoller_with_poll_posix.c + */ + +typedef struct { + /* all polled fds */ + size_t fd_count; + size_t fd_capacity; + grpc_fd **fds; + /* fds that have been removed from the pollset explicitly */ + size_t del_count; + size_t del_capacity; + grpc_fd **dels; +} poll_hdr; + +static void multipoll_with_poll_pollset_add_fd(grpc_exec_ctx *exec_ctx, + grpc_pollset *pollset, + grpc_fd *fd, + int and_unlock_pollset) { + size_t i; + poll_hdr *h = pollset->data.ptr; + /* TODO(ctiller): this is O(num_fds^2); maybe switch to a hash set here */ + for (i = 0; i < h->fd_count; i++) { + if (h->fds[i] == fd) goto exit; + } + if (h->fd_count == h->fd_capacity) { + h->fd_capacity = GPR_MAX(h->fd_capacity + 8, h->fd_count * 3 / 2); + h->fds = gpr_realloc(h->fds, sizeof(grpc_fd *) * h->fd_capacity); + } + h->fds[h->fd_count++] = fd; + GRPC_FD_REF(fd, "multipoller"); +exit: + if (and_unlock_pollset) { + gpr_mu_unlock(pollset->mu); + } +} + +static void multipoll_with_poll_pollset_maybe_work_and_unlock( + grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_pollset_worker *worker, + gpr_timespec deadline, gpr_timespec now) { +#define POLLOUT_CHECK (POLLOUT | POLLHUP | POLLERR) +#define POLLIN_CHECK (POLLIN | POLLHUP | POLLERR) + + int timeout; + int r; + size_t i, j, fd_count; + nfds_t pfd_count; + poll_hdr *h; + /* TODO(ctiller): inline some elements to avoid an allocation */ + grpc_fd_watcher *watchers; + struct pollfd *pfds; + + h = pollset->data.ptr; + timeout = poll_deadline_to_millis_timeout(deadline, now); + /* TODO(ctiller): perform just one malloc here if we exceed the inline case */ + pfds = gpr_malloc(sizeof(*pfds) * (h->fd_count + 2)); + watchers = gpr_malloc(sizeof(*watchers) * (h->fd_count + 2)); + fd_count = 0; + pfd_count = 2; + pfds[0].fd = GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd); + pfds[0].events = POLLIN; + pfds[0].revents = 0; + pfds[1].fd = GRPC_WAKEUP_FD_GET_READ_FD(&worker->wakeup_fd->fd); + pfds[1].events = POLLIN; + pfds[1].revents = 0; + for (i = 0; i < h->fd_count; i++) { + int remove = fd_is_orphaned(h->fds[i]); + for (j = 0; !remove && j < h->del_count; j++) { + if (h->fds[i] == h->dels[j]) remove = 1; + } + if (remove) { + GRPC_FD_UNREF(h->fds[i], "multipoller"); + } else { + h->fds[fd_count++] = h->fds[i]; + watchers[pfd_count].fd = h->fds[i]; + pfds[pfd_count].fd = h->fds[i]->fd; + pfds[pfd_count].revents = 0; + pfd_count++; + } + } + for (j = 0; j < h->del_count; j++) { + GRPC_FD_UNREF(h->dels[j], "multipoller_del"); + } + h->del_count = 0; + h->fd_count = fd_count; + gpr_mu_unlock(pollset->mu); + + for (i = 2; i < pfd_count; i++) { + pfds[i].events = (short)fd_begin_poll(watchers[i].fd, pollset, worker, + POLLIN, POLLOUT, &watchers[i]); + } + + /* TODO(vpai): Consider first doing a 0 timeout poll here to avoid + even going into the blocking annotation if possible */ + GRPC_SCHEDULING_START_BLOCKING_REGION; + r = grpc_poll_function(pfds, pfd_count, timeout); + GRPC_SCHEDULING_END_BLOCKING_REGION; + + if (r < 0) { + if (errno != EINTR) { + gpr_log(GPR_ERROR, "poll() failed: %s", strerror(errno)); + } + for (i = 2; i < pfd_count; i++) { + fd_end_poll(exec_ctx, &watchers[i], 0, 0); + } + } else if (r == 0) { + for (i = 2; i < pfd_count; i++) { + fd_end_poll(exec_ctx, &watchers[i], 0, 0); + } + } else { + if (pfds[0].revents & POLLIN_CHECK) { + grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); + } + if (pfds[1].revents & POLLIN_CHECK) { + grpc_wakeup_fd_consume_wakeup(&worker->wakeup_fd->fd); + } + for (i = 2; i < pfd_count; i++) { + if (watchers[i].fd == NULL) { + fd_end_poll(exec_ctx, &watchers[i], 0, 0); + continue; + } + fd_end_poll(exec_ctx, &watchers[i], pfds[i].revents & POLLIN_CHECK, + pfds[i].revents & POLLOUT_CHECK); + } + } + + gpr_free(pfds); + gpr_free(watchers); +} + +static void multipoll_with_poll_pollset_finish_shutdown(grpc_pollset *pollset) { + size_t i; + poll_hdr *h = pollset->data.ptr; + for (i = 0; i < h->fd_count; i++) { + GRPC_FD_UNREF(h->fds[i], "multipoller"); + } + for (i = 0; i < h->del_count; i++) { + GRPC_FD_UNREF(h->dels[i], "multipoller_del"); + } + h->fd_count = 0; + h->del_count = 0; +} + +static void multipoll_with_poll_pollset_destroy(grpc_pollset *pollset) { + poll_hdr *h = pollset->data.ptr; + multipoll_with_poll_pollset_finish_shutdown(pollset); + gpr_free(h->fds); + gpr_free(h->dels); + gpr_free(h); +} + +static const grpc_pollset_vtable multipoll_with_poll_pollset = { + multipoll_with_poll_pollset_add_fd, + multipoll_with_poll_pollset_maybe_work_and_unlock, + multipoll_with_poll_pollset_finish_shutdown, + multipoll_with_poll_pollset_destroy}; + +static void poll_become_multipoller(grpc_exec_ctx *exec_ctx, + grpc_pollset *pollset, grpc_fd **fds, + size_t nfds) { + size_t i; + poll_hdr *h = gpr_malloc(sizeof(poll_hdr)); + pollset->vtable = &multipoll_with_poll_pollset; + pollset->data.ptr = h; + h->fd_count = nfds; + h->fd_capacity = nfds; + h->fds = gpr_malloc(nfds * sizeof(grpc_fd *)); + h->del_count = 0; + h->del_capacity = 0; + h->dels = NULL; + for (i = 0; i < nfds; i++) { + h->fds[i] = fds[i]; + GRPC_FD_REF(fds[i], "multipoller"); + } +} + +/******************************************************************************* + * pollset_set_posix.c + */ + +static grpc_pollset_set *pollset_set_create(void) { + grpc_pollset_set *pollset_set = gpr_malloc(sizeof(*pollset_set)); + memset(pollset_set, 0, sizeof(*pollset_set)); + gpr_mu_init(&pollset_set->mu); + return pollset_set; +} + +static void pollset_set_destroy(grpc_pollset_set *pollset_set) { + size_t i; + gpr_mu_destroy(&pollset_set->mu); + for (i = 0; i < pollset_set->fd_count; i++) { + GRPC_FD_UNREF(pollset_set->fds[i], "pollset_set"); + } + gpr_free(pollset_set->pollsets); + gpr_free(pollset_set->pollset_sets); + gpr_free(pollset_set->fds); + gpr_free(pollset_set); +} + +static void pollset_set_add_pollset(grpc_exec_ctx *exec_ctx, + grpc_pollset_set *pollset_set, + grpc_pollset *pollset) { + size_t i, j; + gpr_mu_lock(&pollset_set->mu); + if (pollset_set->pollset_count == pollset_set->pollset_capacity) { + pollset_set->pollset_capacity = + GPR_MAX(8, 2 * pollset_set->pollset_capacity); + pollset_set->pollsets = + gpr_realloc(pollset_set->pollsets, pollset_set->pollset_capacity * + sizeof(*pollset_set->pollsets)); + } + pollset_set->pollsets[pollset_set->pollset_count++] = pollset; + for (i = 0, j = 0; i < pollset_set->fd_count; i++) { + if (fd_is_orphaned(pollset_set->fds[i])) { + GRPC_FD_UNREF(pollset_set->fds[i], "pollset_set"); + } else { + pollset_add_fd(exec_ctx, pollset, pollset_set->fds[i]); + pollset_set->fds[j++] = pollset_set->fds[i]; + } + } + pollset_set->fd_count = j; + gpr_mu_unlock(&pollset_set->mu); +} + +static void pollset_set_del_pollset(grpc_exec_ctx *exec_ctx, + grpc_pollset_set *pollset_set, + grpc_pollset *pollset) { + size_t i; + gpr_mu_lock(&pollset_set->mu); + for (i = 0; i < pollset_set->pollset_count; i++) { + if (pollset_set->pollsets[i] == pollset) { + pollset_set->pollset_count--; + GPR_SWAP(grpc_pollset *, pollset_set->pollsets[i], + pollset_set->pollsets[pollset_set->pollset_count]); + break; + } + } + gpr_mu_unlock(&pollset_set->mu); +} + +static void pollset_set_add_pollset_set(grpc_exec_ctx *exec_ctx, + grpc_pollset_set *bag, + grpc_pollset_set *item) { + size_t i, j; + gpr_mu_lock(&bag->mu); + if (bag->pollset_set_count == bag->pollset_set_capacity) { + bag->pollset_set_capacity = GPR_MAX(8, 2 * bag->pollset_set_capacity); + bag->pollset_sets = + gpr_realloc(bag->pollset_sets, + bag->pollset_set_capacity * sizeof(*bag->pollset_sets)); + } + bag->pollset_sets[bag->pollset_set_count++] = item; + for (i = 0, j = 0; i < bag->fd_count; i++) { + if (fd_is_orphaned(bag->fds[i])) { + GRPC_FD_UNREF(bag->fds[i], "pollset_set"); + } else { + pollset_set_add_fd(exec_ctx, item, bag->fds[i]); + bag->fds[j++] = bag->fds[i]; + } + } + bag->fd_count = j; + gpr_mu_unlock(&bag->mu); +} + +static void pollset_set_del_pollset_set(grpc_exec_ctx *exec_ctx, + grpc_pollset_set *bag, + grpc_pollset_set *item) { + size_t i; + gpr_mu_lock(&bag->mu); + for (i = 0; i < bag->pollset_set_count; i++) { + if (bag->pollset_sets[i] == item) { + bag->pollset_set_count--; + GPR_SWAP(grpc_pollset_set *, bag->pollset_sets[i], + bag->pollset_sets[bag->pollset_set_count]); + break; + } + } + gpr_mu_unlock(&bag->mu); +} + +static void pollset_set_add_fd(grpc_exec_ctx *exec_ctx, + grpc_pollset_set *pollset_set, grpc_fd *fd) { + size_t i; + gpr_mu_lock(&pollset_set->mu); + if (pollset_set->fd_count == pollset_set->fd_capacity) { + pollset_set->fd_capacity = GPR_MAX(8, 2 * pollset_set->fd_capacity); + pollset_set->fds = gpr_realloc( + pollset_set->fds, pollset_set->fd_capacity * sizeof(*pollset_set->fds)); + } + GRPC_FD_REF(fd, "pollset_set"); + pollset_set->fds[pollset_set->fd_count++] = fd; + for (i = 0; i < pollset_set->pollset_count; i++) { + pollset_add_fd(exec_ctx, pollset_set->pollsets[i], fd); + } + for (i = 0; i < pollset_set->pollset_set_count; i++) { + pollset_set_add_fd(exec_ctx, pollset_set->pollset_sets[i], fd); + } + gpr_mu_unlock(&pollset_set->mu); +} + +static void pollset_set_del_fd(grpc_exec_ctx *exec_ctx, + grpc_pollset_set *pollset_set, grpc_fd *fd) { + size_t i; + gpr_mu_lock(&pollset_set->mu); + for (i = 0; i < pollset_set->fd_count; i++) { + if (pollset_set->fds[i] == fd) { + pollset_set->fd_count--; + GPR_SWAP(grpc_fd *, pollset_set->fds[i], + pollset_set->fds[pollset_set->fd_count]); + GRPC_FD_UNREF(fd, "pollset_set"); + break; + } + } + for (i = 0; i < pollset_set->pollset_set_count; i++) { + pollset_set_del_fd(exec_ctx, pollset_set->pollset_sets[i], fd); + } + gpr_mu_unlock(&pollset_set->mu); +} + +/******************************************************************************* + * event engine binding + */ + +static void shutdown_engine(void) { + fd_global_shutdown(); + pollset_global_shutdown(); +} + +static const grpc_event_engine_vtable vtable = { + .pollset_size = sizeof(grpc_pollset), + + .fd_create = fd_create, + .fd_wrapped_fd = fd_wrapped_fd, + .fd_orphan = fd_orphan, + .fd_shutdown = fd_shutdown, + .fd_notify_on_read = fd_notify_on_read, + .fd_notify_on_write = fd_notify_on_write, + + .pollset_init = pollset_init, + .pollset_shutdown = pollset_shutdown, + .pollset_reset = pollset_reset, + .pollset_destroy = pollset_destroy, + .pollset_work = pollset_work, + .pollset_kick = pollset_kick, + .pollset_add_fd = pollset_add_fd, + + .pollset_set_create = pollset_set_create, + .pollset_set_destroy = pollset_set_destroy, + .pollset_set_add_pollset = pollset_set_add_pollset, + .pollset_set_del_pollset = pollset_set_del_pollset, + .pollset_set_add_pollset_set = pollset_set_add_pollset_set, + .pollset_set_del_pollset_set = pollset_set_del_pollset_set, + .pollset_set_add_fd = pollset_set_add_fd, + .pollset_set_del_fd = pollset_set_del_fd, + + .kick_poller = kick_poller, + + .shutdown_engine = shutdown_engine, +}; + +const grpc_event_engine_vtable *grpc_init_poll_posix(void) { + fd_global_init(); + pollset_global_init(); + return &vtable; +} + +#endif diff --git a/src/core/iomgr/ev_poll_posix.h b/src/core/iomgr/ev_poll_posix.h new file mode 100644 index 00000000000..39dbc164426 --- /dev/null +++ b/src/core/iomgr/ev_poll_posix.h @@ -0,0 +1,41 @@ +/* + * + * Copyright 2015-2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_INTERNAL_CORE_IOMGR_EV_POLL_POSIX_H +#define GRPC_INTERNAL_CORE_IOMGR_EV_POLL_POSIX_H + +#include "src/core/iomgr/ev_posix.h" + +const grpc_event_engine_vtable *grpc_init_poll_posix(void); + +#endif // GRPC_INTERNAL_CORE_IOMGR_EV_POLL_AND_EPOLL_POSIX_H diff --git a/src/core/iomgr/ev_posix.c b/src/core/iomgr/ev_posix.c index 4229d8d2e4d..127ab4b1812 100644 --- a/src/core/iomgr/ev_posix.c +++ b/src/core/iomgr/ev_posix.c @@ -33,18 +33,93 @@ #include "src/core/iomgr/ev_posix.h" +#include + +#include #include +#include +#include #include "src/core/iomgr/ev_poll_and_epoll_posix.h" +#include "src/core/iomgr/ev_poll_posix.h" +#include "src/core/support/env.h" static const grpc_event_engine_vtable *g_event_engine; +typedef const grpc_event_engine_vtable *(*event_engine_factory_fn)(void); + +typedef struct { + const char *name; + event_engine_factory_fn factory; +} event_engine_factory; + +static const event_engine_factory g_factories[] = { + {"poll", grpc_init_poll_posix}, {"legacy", grpc_init_poll_and_epoll_posix}, +}; + +static void add(const char *beg, const char *end, char ***ss, size_t *ns) { + size_t n = *ns; + size_t np = n + 1; + char *s; + size_t len; + GPR_ASSERT(end >= beg); + len = (size_t)(end - beg); + s = gpr_malloc(len + 1); + memcpy(s, beg, len); + s[len] = 0; + *ss = gpr_realloc(*ss, sizeof(char **) * np); + (*ss)[n] = s; + *ns = np; +} + +static void split(const char *s, char ***ss, size_t *ns) { + const char *c = strchr(s, ','); + if (c == NULL) { + add(s, s + strlen(s), ss, ns); + } else { + add(s, c, ss, ns); + split(c + 1, ss, ns); + } +} + +static bool is(const char *want, const char *have) { + return 0 == strcmp(want, "all") || 0 == strcmp(want, have); +} + +static void try_engine(const char *engine) { + for (size_t i = 0; i < GPR_ARRAY_SIZE(g_factories); i++) { + if (is(engine, g_factories[i].name)) { + if ((g_event_engine = g_factories[i].factory())) { + return; + } + } + } +} + void grpc_event_engine_init(void) { - if ((g_event_engine = grpc_init_poll_and_epoll_posix())) { - return; + char *s = gpr_getenv("GRPC_POLL_STRATEGY"); + if (s == NULL) { + s = gpr_strdup("all"); + } + + char **strings = NULL; + size_t nstrings = 0; + split(s, &strings, &nstrings); + + for (size_t i = 0; g_event_engine == NULL && i < nstrings; i++) { + try_engine(strings[i]); + } + + for (size_t i = 0; i < nstrings; i++) { + gpr_free(strings[i]); + } + gpr_free(strings); + gpr_free(s); + + if (g_event_engine == NULL) { + gpr_log(GPR_ERROR, "No event engine could be initialized"); + abort(); } - gpr_log(GPR_ERROR, "No event engine could be initialized"); - abort(); } void grpc_event_engine_shutdown(void) { g_event_engine->shutdown_engine(); } diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index 330d1534155..971457ddcf7 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -47,6 +47,15 @@ default_secure_fixture_options = default_unsecure_fixture_options._replace(secur uds_fixture_options = default_unsecure_fixture_options._replace(dns_resolver=False, platforms=['linux', 'mac', 'posix']) +# map a platform to available polling strategies +POLLING_STRATEGY = { +'windows': ['all'], +'linux': ['poll', 'legacy'], +'mac': ['poll'], +'posix': ['poll'], +} + + # maps fixture name to whether it requires the security library END2END_FIXTURES = { 'h2_compress': default_unsecure_fixture_options, @@ -241,17 +250,22 @@ def main(): { 'name': '%s_test' % f, 'args': [t], + 'env': { + 'GRPC_POLL_STRATEGY': poll_strategy + }, 'exclude_configs': [], - 'platforms': END2END_FIXTURES[f].platforms, - 'ci_platforms': (END2END_FIXTURES[f].platforms - if END2END_FIXTURES[f].ci_mac else without( - END2END_FIXTURES[f].platforms, 'mac')), + 'platforms': [platform], + 'ci_platforms': [platform], 'flaky': False, 'language': 'c', 'cpu_cost': END2END_TESTS[t].cpu_cost, } for f in sorted(END2END_FIXTURES.keys()) - for t in sorted(END2END_TESTS.keys()) if compatible(f, t) + for t in sorted(END2END_TESTS.keys()) + for platform in sorted(END2END_FIXTURES[f].platforms) + for poll_strategy in POLLING_STRATEGY[platform] + if compatible(f, t) + and (END2END_FIXTURES[f].ci_mac or platform != 'mac') ] + [ { 'name': '%s_nosec_test' % f, diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 7b2bc537162..b6810e83a20 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -159,13 +159,21 @@ class CLanguage(object): target['name']) else: binary = 'bins/%s/%s' % (self.config.build_config, target['name']) + env = {} + shortname = ' '.join(cmdline) + if 'env' in target: + tenv = target['env'] + env.update(tenv) + shortname += ' ' + shortname += ' '.join('%s=%s' % (key, tenv[key]) for key in sorted(tenv.keys())) + env['GRPC_DEFAULT_SSL_ROOTS_FILE_PATH'] = ( + _ROOT + '/src/core/tsi/test_creds/ca.pem') if os.path.isfile(binary): cmdline = [binary] + target['args'] out.append(self.config.job_spec(cmdline, [binary], shortname=' '.join(cmdline), cpu_cost=target['cpu_cost'], - environ={'GRPC_DEFAULT_SSL_ROOTS_FILE_PATH': - _ROOT + '/src/core/tsi/test_creds/ca.pem'})) + environ=env)) elif self.args.regex == '.*' or self.platform == 'windows': print '\nWARNING: binary not found, skipping', binary return sorted(out) diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 2f514bfc00c..a3195277b67 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -4042,966 +4042,834 @@ "bad_hostname" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "binary_metadata" + "bad_hostname" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "call_creds" + "bad_hostname" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "cancel_after_accept" + "bad_hostname" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "cancel_after_client_done" + "bad_hostname" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "cancel_after_invoke" + "binary_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_before_invoke" + "binary_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_in_a_vacuum" + "binary_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "cancel_with_status" + "binary_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "compressed_payload" + "binary_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "connectivity" + "call_creds" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "default_host" + "call_creds" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "disappearing_server" + "call_creds" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "empty_batch" + "call_creds" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "graceful_server_shutdown" + "call_creds" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "high_initial_seqno" + "cancel_after_accept" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "hpack_size" + "cancel_after_accept" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "invoke_large_request" + "cancel_after_accept" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "large_metadata" + "cancel_after_accept" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "max_concurrent_streams" + "cancel_after_accept" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "max_message_length" + "cancel_after_client_done" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "negative_deadline" + "cancel_after_client_done" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "no_op" + "cancel_after_client_done" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "payload" + "cancel_after_client_done" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "ping" + "cancel_after_client_done" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "ping_pong_streaming" + "cancel_after_invoke" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "registered_call" + "cancel_after_invoke" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "request_with_flags" + "cancel_after_invoke" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "request_with_payload" + "cancel_after_invoke" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "server_finishes_request" + "cancel_after_invoke" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "shutdown_finishes_calls" + "cancel_before_invoke" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "shutdown_finishes_tags" + "cancel_before_invoke" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "simple_delayed_request" + "cancel_before_invoke" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "simple_metadata" + "cancel_before_invoke" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "simple_request" + "cancel_before_invoke" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "trailing_metadata" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "bad_hostname" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "binary_metadata" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "call_creds" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "cancel_after_accept" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "cancel_after_client_done" + "cancel_with_status" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_after_invoke" + "cancel_with_status" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_before_invoke" + "cancel_with_status" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "cancel_in_a_vacuum" + "cancel_with_status" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, @@ -5010,21 +4878,18 @@ "cancel_with_status" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { @@ -5032,949 +4897,834 @@ "compressed_payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "connectivity" + "compressed_payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "default_host" + "compressed_payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "disappearing_server" + "compressed_payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "empty_batch" + "compressed_payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "graceful_server_shutdown" + "connectivity" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "high_initial_seqno" + "connectivity" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "hpack_size" + "connectivity" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "invoke_large_request" + "connectivity" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "large_metadata" + "connectivity" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "max_concurrent_streams" + "default_host" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "max_message_length" + "default_host" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "negative_deadline" + "default_host" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "no_op" + "default_host" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "payload" + "default_host" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "ping" + "disappearing_server" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "ping_pong_streaming" + "disappearing_server" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "registered_call" + "disappearing_server" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "request_with_flags" + "disappearing_server" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "request_with_payload" + "disappearing_server" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "server_finishes_request" + "empty_batch" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "shutdown_finishes_calls" + "empty_batch" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "shutdown_finishes_tags" + "empty_batch" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "simple_delayed_request" + "empty_batch" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "simple_metadata" + "empty_batch" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "simple_request" + "graceful_server_shutdown" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "trailing_metadata" + "graceful_server_shutdown" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "bad_hostname" + "graceful_server_shutdown" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "binary_metadata" + "graceful_server_shutdown" ], "ci_platforms": [ - "windows", - "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "call_creds" + "graceful_server_shutdown" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "cancel_after_accept" + "high_initial_seqno" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_after_client_done" + "high_initial_seqno" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_after_invoke" + "high_initial_seqno" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "cancel_before_invoke" + "high_initial_seqno" ], "ci_platforms": [ - "windows", - "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "cancel_in_a_vacuum" + "high_initial_seqno" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "cancel_with_status" + "hpack_size" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "compressed_payload" + "hpack_size" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "connectivity" + "hpack_size" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "default_host" + "hpack_size" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "disappearing_server" + "hpack_size" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "empty_batch" + "invoke_large_request" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "graceful_server_shutdown" + "invoke_large_request" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "high_initial_seqno" + "invoke_large_request" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "hpack_size" + "invoke_large_request" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, @@ -5983,20 +5733,18 @@ "invoke_large_request" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { @@ -6004,948 +5752,834 @@ "large_metadata" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "max_concurrent_streams" + "large_metadata" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "max_message_length" + "large_metadata" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "negative_deadline" + "large_metadata" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "no_op" + "large_metadata" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "payload" + "max_concurrent_streams" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "ping" + "max_concurrent_streams" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "ping_pong_streaming" + "max_concurrent_streams" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "registered_call" + "max_concurrent_streams" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "request_with_flags" + "max_concurrent_streams" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "request_with_payload" + "max_message_length" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "server_finishes_request" + "max_message_length" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "shutdown_finishes_calls" + "max_message_length" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "shutdown_finishes_tags" + "max_message_length" ], "ci_platforms": [ - "windows", - "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "simple_delayed_request" + "max_message_length" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "simple_metadata" + "negative_deadline" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "simple_request" + "negative_deadline" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "trailing_metadata" + "negative_deadline" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_fakesec_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "bad_hostname" + "negative_deadline" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "binary_metadata" + "negative_deadline" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "call_creds" + "no_op" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_after_accept" + "no_op" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_after_client_done" + "no_op" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "cancel_after_invoke" + "no_op" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "cancel_before_invoke" + "no_op" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "cancel_in_a_vacuum" + "payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_with_status" + "payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "compressed_payload" + "payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "connectivity" + "payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "default_host" + "payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "disappearing_server" + "ping" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "empty_batch" + "ping" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "graceful_server_shutdown" + "ping" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "high_initial_seqno" + "ping" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "hpack_size" + "ping" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "invoke_large_request" + "ping_pong_streaming" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "large_metadata" + "ping_pong_streaming" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "max_concurrent_streams" + "ping_pong_streaming" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "max_message_length" + "ping_pong_streaming" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "negative_deadline" + "ping_pong_streaming" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "no_op" + "registered_call" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "payload" + "registered_call" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "ping" + "registered_call" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "ping_pong_streaming" + "registered_call" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, @@ -6954,21 +6588,18 @@ "registered_call" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { @@ -6976,757 +6607,835 @@ "request_with_flags" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "request_with_payload" + "request_with_flags" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "server_finishes_request" + "request_with_flags" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "shutdown_finishes_calls" + "request_with_flags" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "shutdown_finishes_tags" + "request_with_flags" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "simple_delayed_request" + "request_with_payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "simple_metadata" + "request_with_payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "simple_request" + "request_with_payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "trailing_metadata" + "request_with_payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_census_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "bad_hostname" + "request_with_payload" ], "ci_platforms": [ - "linux" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "windows" ] }, { "args": [ - "binary_metadata" + "server_finishes_request" ], "ci_platforms": [ "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ "linux" ] }, { "args": [ - "call_creds" + "server_finishes_request" ], "ci_platforms": [ "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ "linux" ] }, { "args": [ - "cancel_after_accept" + "server_finishes_request" ], "ci_platforms": [ - "linux" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "mac" ] }, { "args": [ - "cancel_after_client_done" + "server_finishes_request" ], "ci_platforms": [ - "linux" + "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "posix" ] }, { "args": [ - "cancel_after_invoke" + "server_finishes_request" ], "ci_platforms": [ - "linux" + "windows" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "windows" ] }, { "args": [ - "cancel_before_invoke" + "shutdown_finishes_calls" ], "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ "linux" ] }, { "args": [ - "cancel_in_a_vacuum" + "shutdown_finishes_calls" ], "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ "linux" ] }, { "args": [ - "cancel_with_status" + "shutdown_finishes_calls" ], "ci_platforms": [ - "linux" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "mac" ] }, { "args": [ - "compressed_payload" + "shutdown_finishes_calls" ], "ci_platforms": [ - "linux" + "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "posix" ] }, { "args": [ - "connectivity" + "shutdown_finishes_calls" ], "ci_platforms": [ - "linux" + "windows" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "windows" ] }, { "args": [ - "default_host" + "shutdown_finishes_tags" ], "ci_platforms": [ "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ "linux" ] }, { "args": [ - "disappearing_server" + "shutdown_finishes_tags" ], "ci_platforms": [ "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ "linux" ] }, { "args": [ - "empty_batch" + "shutdown_finishes_tags" ], "ci_platforms": [ - "linux" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "mac" ] }, { "args": [ - "graceful_server_shutdown" + "shutdown_finishes_tags" ], "ci_platforms": [ - "linux" + "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "posix" ] }, { "args": [ - "high_initial_seqno" + "shutdown_finishes_tags" ], "ci_platforms": [ - "linux" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "windows" ] }, { "args": [ - "hpack_size" + "simple_delayed_request" ], "ci_platforms": [ "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ "linux" ] }, { "args": [ - "invoke_large_request" + "simple_delayed_request" ], "ci_platforms": [ "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ "linux" ] }, { "args": [ - "large_metadata" + "simple_delayed_request" ], "ci_platforms": [ - "linux" + "mac" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "mac" ] }, { "args": [ - "max_concurrent_streams" + "simple_delayed_request" ], "ci_platforms": [ - "linux" + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "posix" ] }, { "args": [ - "max_message_length" + "simple_delayed_request" ], "ci_platforms": [ - "linux" + "windows" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "windows" ] }, { "args": [ - "negative_deadline" + "simple_metadata" ], "ci_platforms": [ "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ "linux" ] }, { "args": [ - "no_op" + "simple_metadata" ], "ci_platforms": [ "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ "linux" ] }, { "args": [ - "payload" + "simple_metadata" ], "ci_platforms": [ - "linux" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "mac" ] }, { "args": [ - "ping" + "simple_metadata" ], "ci_platforms": [ - "linux" + "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "posix" ] }, { "args": [ - "ping_pong_streaming" + "simple_metadata" ], "ci_platforms": [ - "linux" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "windows" ] }, { "args": [ - "registered_call" + "simple_request" ], "ci_platforms": [ "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ "linux" ] }, { "args": [ - "request_with_flags" + "simple_request" ], "ci_platforms": [ "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ "linux" ] }, { "args": [ - "request_with_payload" + "simple_request" ], "ci_platforms": [ - "linux" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "mac" ] }, { "args": [ - "server_finishes_request" + "simple_request" ], "ci_platforms": [ - "linux" + "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "posix" ] }, { "args": [ - "shutdown_finishes_calls" + "simple_request" ], "ci_platforms": [ - "linux" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "windows" ] }, { "args": [ - "shutdown_finishes_tags" + "trailing_metadata" ], "ci_platforms": [ "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ "linux" ] }, { "args": [ - "simple_delayed_request" + "trailing_metadata" ], "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ "linux" ] }, { "args": [ - "simple_metadata" + "trailing_metadata" ], "ci_platforms": [ - "linux" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "mac" ] }, { "args": [ - "simple_request" + "trailing_metadata" ], "ci_platforms": [ - "linux" + "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "posix" ] }, { @@ -7734,15 +7443,18 @@ "trailing_metadata" ], "ci_platforms": [ - "linux" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_census_test", "platforms": [ - "linux" + "windows" ] }, { @@ -7750,922 +7462,834 @@ "bad_hostname" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "binary_metadata" + "bad_hostname" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "call_creds" + "bad_hostname" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "cancel_after_accept" + "bad_hostname" ], "ci_platforms": [ - "windows", - "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "cancel_after_client_done" + "bad_hostname" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "cancel_after_invoke" + "binary_metadata" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_before_invoke" + "binary_metadata" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_in_a_vacuum" + "binary_metadata" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "cancel_with_status" + "binary_metadata" ], "ci_platforms": [ - "windows", - "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "compressed_payload" + "binary_metadata" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "connectivity" + "call_creds" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "default_host" + "call_creds" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "disappearing_server" + "call_creds" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "empty_batch" + "call_creds" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "graceful_server_shutdown" + "call_creds" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "high_initial_seqno" + "cancel_after_accept" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "hpack_size" + "cancel_after_accept" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "invoke_large_request" + "cancel_after_accept" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "large_metadata" + "cancel_after_accept" ], "ci_platforms": [ - "windows", - "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "max_concurrent_streams" + "cancel_after_accept" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "max_message_length" + "cancel_after_client_done" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "negative_deadline" + "cancel_after_client_done" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "no_op" + "cancel_after_client_done" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "payload" + "cancel_after_client_done" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "ping" + "cancel_after_client_done" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "ping_pong_streaming" + "cancel_after_invoke" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "registered_call" + "cancel_after_invoke" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "request_with_flags" + "cancel_after_invoke" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "request_with_payload" + "cancel_after_invoke" ], "ci_platforms": [ - "windows", - "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "server_finishes_request" + "cancel_after_invoke" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "shutdown_finishes_calls" + "cancel_before_invoke" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "shutdown_finishes_tags" + "cancel_before_invoke" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "simple_delayed_request" + "cancel_before_invoke" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "simple_metadata" + "cancel_before_invoke" ], "ci_platforms": [ - "windows", - "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "simple_request" + "cancel_before_invoke" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "trailing_metadata" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "bad_hostname" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "binary_metadata" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "call_creds" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", - "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "cancel_after_accept" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "cancel_after_client_done" + "cancel_with_status" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_after_invoke" + "cancel_with_status" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_before_invoke" + "cancel_with_status" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "cancel_in_a_vacuum" + "cancel_with_status" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, @@ -8674,713 +8298,645 @@ "cancel_with_status" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "default_host" + "compressed_payload" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "disappearing_server" + "compressed_payload" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "empty_batch" + "compressed_payload" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "graceful_server_shutdown" + "compressed_payload" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "high_initial_seqno" + "compressed_payload" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "invoke_large_request" + "connectivity" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "large_metadata" + "connectivity" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "max_message_length" + "connectivity" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "negative_deadline" + "connectivity" ], "ci_platforms": [ - "windows", - "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "no_op" + "connectivity" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "payload" + "default_host" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "ping_pong_streaming" + "default_host" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "registered_call" + "default_host" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "request_with_payload" + "default_host" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "server_finishes_request" + "default_host" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "shutdown_finishes_calls" + "disappearing_server" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "shutdown_finishes_tags" + "disappearing_server" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "simple_delayed_request" + "disappearing_server" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "simple_metadata" + "disappearing_server" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "simple_request" + "disappearing_server" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "trailing_metadata" + "empty_batch" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "bad_hostname" + "empty_batch" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "binary_metadata" + "empty_batch" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "call_creds" + "empty_batch" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "cancel_after_accept" + "empty_batch" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "cancel_after_client_done" + "graceful_server_shutdown" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_after_invoke" + "graceful_server_shutdown" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_before_invoke" + "graceful_server_shutdown" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "cancel_in_a_vacuum" + "graceful_server_shutdown" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "cancel_with_status" + "graceful_server_shutdown" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "compressed_payload" + "high_initial_seqno" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "empty_batch" + "high_initial_seqno" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "graceful_server_shutdown" + "high_initial_seqno" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { @@ -9388,816 +8944,721 @@ "high_initial_seqno" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "hpack_size" + "high_initial_seqno" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "invoke_large_request" + "hpack_size" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "large_metadata" + "hpack_size" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "max_concurrent_streams" + "hpack_size" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "max_message_length" + "hpack_size" ], "ci_platforms": [ - "windows", - "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "negative_deadline" + "hpack_size" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "no_op" + "invoke_large_request" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "payload" + "invoke_large_request" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "ping_pong_streaming" + "invoke_large_request" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "registered_call" + "invoke_large_request" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "request_with_flags" + "invoke_large_request" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "request_with_payload" + "large_metadata" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "server_finishes_request" + "large_metadata" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "shutdown_finishes_calls" + "large_metadata" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "shutdown_finishes_tags" + "large_metadata" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "simple_metadata" + "large_metadata" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "simple_request" + "max_concurrent_streams" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "trailing_metadata" + "max_concurrent_streams" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "bad_hostname" + "max_concurrent_streams" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "binary_metadata" + "max_concurrent_streams" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "call_creds" + "max_concurrent_streams" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "cancel_after_accept" + "max_message_length" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_after_client_done" + "max_message_length" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_after_invoke" + "max_message_length" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "cancel_before_invoke" + "max_message_length" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "cancel_in_a_vacuum" + "max_message_length" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "cancel_with_status" + "negative_deadline" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "compressed_payload" + "negative_deadline" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "empty_batch" + "negative_deadline" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "graceful_server_shutdown" + "negative_deadline" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "high_initial_seqno" + "negative_deadline" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "invoke_large_request" + "no_op" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "large_metadata" + "no_op" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "max_concurrent_streams" + "no_op" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "max_message_length" + "no_op" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "negative_deadline" + "no_op" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "no_op" + "payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { @@ -10205,787 +9666,702 @@ "payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "ping_pong_streaming" + "payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "registered_call" + "payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "request_with_flags" + "payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "request_with_payload" + "ping" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "server_finishes_request" + "ping" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "shutdown_finishes_calls" + "ping" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "shutdown_finishes_tags" + "ping" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "simple_metadata" + "ping" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "simple_request" + "ping_pong_streaming" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "trailing_metadata" + "ping_pong_streaming" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "bad_hostname" + "ping_pong_streaming" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "binary_metadata" + "ping_pong_streaming" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "call_creds" + "ping_pong_streaming" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "cancel_after_accept" + "registered_call" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_after_client_done" + "registered_call" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_after_invoke" + "registered_call" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "cancel_before_invoke" + "registered_call" ], "ci_platforms": [ - "windows", - "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "cancel_in_a_vacuum" + "registered_call" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "cancel_with_status" + "request_with_flags" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "compressed_payload" + "request_with_flags" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "empty_batch" + "request_with_flags" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "graceful_server_shutdown" + "request_with_flags" ], "ci_platforms": [ - "windows", - "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "high_initial_seqno" + "request_with_flags" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "hpack_size" + "request_with_payload" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "invoke_large_request" + "request_with_payload" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "large_metadata" + "request_with_payload" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "max_concurrent_streams" + "request_with_payload" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "max_message_length" + "request_with_payload" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "negative_deadline" + "server_finishes_request" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "no_op" + "server_finishes_request" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "payload" + "server_finishes_request" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "ping_pong_streaming" + "server_finishes_request" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "registered_call" + "server_finishes_request" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "request_with_flags" + "shutdown_finishes_calls" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "request_with_payload" + "shutdown_finishes_calls" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "server_finishes_request" + "shutdown_finishes_calls" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { @@ -10993,1148 +10369,30304 @@ "shutdown_finishes_calls" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "simple_metadata" + "shutdown_finishes_tags" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "simple_request" + "shutdown_finishes_tags" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "trailing_metadata" + "shutdown_finishes_tags" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "bad_hostname" + "shutdown_finishes_tags" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "binary_metadata" + "shutdown_finishes_tags" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "call_creds" + "simple_delayed_request" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_after_accept" + "simple_delayed_request" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_after_client_done" + "simple_delayed_request" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "cancel_after_invoke" + "simple_delayed_request" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "cancel_before_invoke" + "simple_delayed_request" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "cancel_in_a_vacuum" + "simple_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_with_status" + "simple_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "compressed_payload" + "simple_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "connectivity" + "simple_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "default_host" + "simple_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "disappearing_server" + "simple_request" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "empty_batch" + "simple_request" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "graceful_server_shutdown" + "simple_request" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "high_initial_seqno" + "simple_request" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "hpack_size" + "simple_request" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "invoke_large_request" + "trailing_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "large_metadata" + "trailing_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "max_concurrent_streams" + "trailing_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "max_message_length" + "trailing_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "negative_deadline" + "trailing_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_compress_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "no_op" + "bad_hostname" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_fakesec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "payload" + "bad_hostname" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_fakesec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "ping" + "bad_hostname" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_fakesec_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "ping_pong_streaming" + "bad_hostname" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_fakesec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "registered_call" + "binary_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_fakesec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "request_with_flags" + "binary_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_fakesec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "request_with_payload" + "binary_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_fakesec_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "server_finishes_request" + "binary_metadata" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_fakesec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "shutdown_finishes_calls" + "call_creds" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_fakesec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "shutdown_finishes_tags" + "call_creds" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_fakesec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "simple_delayed_request" + "call_creds" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_fakesec_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "simple_metadata" + "call_creds" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_fakesec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" ] }, { "args": [ - "simple_request" + "cancel_after_accept" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_fakesec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "trailing_metadata" + "cancel_after_accept" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_fakesec_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "bad_hostname" + "cancel_after_accept" ], "ci_platforms": [ - "windows", - "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_ssl_proxy_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "windows" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "windows" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "all" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uchannel_test", + "platforms": [ + "windows" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "posix" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "posix" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "mac" ] }, { "args": [ - "binary_metadata" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", - "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "call_creds" + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "cancel_with_status" ], "ci_platforms": [ - "windows", - "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "cancel_after_accept" + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "compressed_payload" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "cancel_after_client_done" + "connectivity" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "connectivity" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "cancel_after_invoke" + "disappearing_server" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "mac" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "mac" + ] + }, + { + "args": [ + "disappearing_server" ], "ci_platforms": [ - "windows", - "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "cancel_before_invoke" + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_in_a_vacuum" + "empty_batch" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "cancel_with_status" + "empty_batch" ], "ci_platforms": [ - "windows", - "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "default_host" + "graceful_server_shutdown" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "disappearing_server" + "graceful_server_shutdown" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "empty_batch" + "graceful_server_shutdown" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { @@ -12142,19 +40674,17 @@ "graceful_server_shutdown" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, @@ -12163,1718 +40693,1576 @@ "high_initial_seqno" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "invoke_large_request" + "high_initial_seqno" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "large_metadata" + "high_initial_seqno" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "max_message_length" + "high_initial_seqno" ], "ci_platforms": [ - "windows", - "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "negative_deadline" + "hpack_size" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "no_op" + "hpack_size" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "payload" + "hpack_size" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "ping_pong_streaming" + "hpack_size" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "registered_call" + "invoke_large_request" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "request_with_payload" + "invoke_large_request" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "server_finishes_request" + "invoke_large_request" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "shutdown_finishes_calls" + "invoke_large_request" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "shutdown_finishes_tags" + "large_metadata" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "simple_delayed_request" + "large_metadata" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "simple_metadata" + "large_metadata" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "simple_request" + "large_metadata" ], "ci_platforms": [ - "windows", - "linux", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "trailing_metadata" + "max_concurrent_streams" ], "ci_platforms": [ - "windows", - "linux", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "bad_hostname" + "max_concurrent_streams" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "binary_metadata" + "max_concurrent_streams" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "call_creds" + "max_concurrent_streams" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "cancel_after_accept" + "max_message_length" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_after_client_done" + "max_message_length" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_after_invoke" + "max_message_length" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "cancel_before_invoke" + "max_message_length" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "cancel_in_a_vacuum" + "negative_deadline" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_with_status" + "negative_deadline" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "compressed_payload" + "negative_deadline" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "empty_batch" + "negative_deadline" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "graceful_server_shutdown" + "no_op" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "high_initial_seqno" + "no_op" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "hpack_size" + "no_op" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "invoke_large_request" + "no_op" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "large_metadata" + "payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux" ] }, { "args": [ - "max_concurrent_streams" + "payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "max_message_length" + "payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "negative_deadline" + "ping" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "no_op" + "ping" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "payload" + "ping" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "ping_pong_streaming" + "ping" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "registered_call" + "ping_pong_streaming" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "request_with_flags" + "ping_pong_streaming" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "request_with_payload" + "ping_pong_streaming" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "server_finishes_request" + "ping_pong_streaming" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "shutdown_finishes_calls" + "registered_call" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "shutdown_finishes_tags" + "registered_call" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "simple_metadata" + "registered_call" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "simple_request" + "registered_call" ], "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", "posix" ] }, { "args": [ - "trailing_metadata" + "request_with_flags" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_uds_test", "platforms": [ - "windows", - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "bad_hostname" + "request_with_flags" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "binary_metadata" + "request_with_flags" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "call_creds" + "request_with_flags" ], "ci_platforms": [ - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", "posix" ] }, { "args": [ - "cancel_after_accept" + "request_with_payload" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_after_client_done" + "request_with_payload" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_after_invoke" + "request_with_payload" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "cancel_before_invoke" + "request_with_payload" ], "ci_platforms": [ - "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", "posix" ] }, { "args": [ - "cancel_in_a_vacuum" + "server_finishes_request" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "cancel_with_status" + "server_finishes_request" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "compressed_payload" + "server_finishes_request" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "connectivity" + "server_finishes_request" ], "ci_platforms": [ - "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", "posix" ] }, { "args": [ - "disappearing_server" + "shutdown_finishes_calls" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "empty_batch" + "shutdown_finishes_calls" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "graceful_server_shutdown" + "shutdown_finishes_calls" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "mac" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "high_initial_seqno" + "shutdown_finishes_calls" ], "ci_platforms": [ - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", "posix" ] }, { "args": [ - "hpack_size" + "shutdown_finishes_tags" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "invoke_large_request" + "shutdown_finishes_tags" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "large_metadata" + "shutdown_finishes_tags" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "max_concurrent_streams" + "shutdown_finishes_tags" ], "ci_platforms": [ - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", "posix" ] }, { "args": [ - "max_message_length" + "simple_delayed_request" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "negative_deadline" + "simple_delayed_request" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "no_op" + "simple_delayed_request" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "mac" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "payload" + "simple_delayed_request" ], "ci_platforms": [ - "linux", - "mac", "posix" ], "cpu_cost": 0.1, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", "posix" ] }, { "args": [ - "ping" + "simple_metadata" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "ping_pong_streaming" + "simple_metadata" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "registered_call" + "simple_metadata" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "request_with_flags" + "simple_metadata" ], "ci_platforms": [ - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", "posix" ] }, { "args": [ - "request_with_payload" + "simple_request" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "server_finishes_request" + "simple_request" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "shutdown_finishes_calls" + "simple_request" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "mac" ] }, { "args": [ - "shutdown_finishes_tags" + "simple_request" ], "ci_platforms": [ - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", "posix" ] }, { "args": [ - "simple_delayed_request" + "trailing_metadata" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "simple_metadata" + "trailing_metadata" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "linux" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "legacy" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "linux" ] }, { "args": [ - "simple_request" + "trailing_metadata" ], "ci_platforms": [ - "linux", - "mac", - "posix" + "mac" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", - "posix" + "mac" ] }, { @@ -13882,18 +42270,17 @@ "trailing_metadata" ], "ci_platforms": [ - "linux", - "mac", "posix" ], "cpu_cost": 1.0, + "env": { + "GRPC_POLL_STRATEGY": "poll" + }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux", - "mac", "posix" ] }, From 7ac6bf07a90ce8921c3b24aa69644c9d581cfeea Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 25 Feb 2016 12:54:59 -0800 Subject: [PATCH 0007/1894] Finish porting rough implementation of poll() event strategy --- BUILD | 6 + Makefile | 2 + binding.gyp | 1 + build.yaml | 2 + config.m4 | 1 + gRPC.podspec | 3 + grpc.gemspec | 2 + package.json | 2 + package.xml | 2 + src/core/iomgr/ev_poll_and_epoll_posix.c | 9 - src/core/iomgr/ev_poll_posix.c | 708 ++++-------------- src/core/iomgr/ev_posix.c | 10 + src/core/iomgr/ev_posix.h | 8 + src/python/grpcio/grpc_core_dependencies.py | 1 + tools/doxygen/Doxyfile.core.internal | 2 + tools/run_tests/sources_and_headers.json | 6 + vsprojects/vcxproj/grpc/grpc.vcxproj | 3 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 6 + .../grpc_unsecure/grpc_unsecure.vcxproj | 3 + .../grpc_unsecure.vcxproj.filters | 6 + 20 files changed, 209 insertions(+), 574 deletions(-) diff --git a/BUILD b/BUILD index 1898b4231b4..e0fc55e5f7e 100644 --- a/BUILD +++ b/BUILD @@ -194,6 +194,7 @@ cc_library( "src/core/iomgr/endpoint.h", "src/core/iomgr/endpoint_pair.h", "src/core/iomgr/ev_poll_and_epoll_posix.h", + "src/core/iomgr/ev_poll_posix.h", "src/core/iomgr/ev_posix.h", "src/core/iomgr/exec_ctx.h", "src/core/iomgr/executor.h", @@ -331,6 +332,7 @@ cc_library( "src/core/iomgr/endpoint_pair_posix.c", "src/core/iomgr/endpoint_pair_windows.c", "src/core/iomgr/ev_poll_and_epoll_posix.c", + "src/core/iomgr/ev_poll_posix.c", "src/core/iomgr/ev_posix.c", "src/core/iomgr/exec_ctx.c", "src/core/iomgr/executor.c", @@ -520,6 +522,7 @@ cc_library( "src/core/iomgr/endpoint.h", "src/core/iomgr/endpoint_pair.h", "src/core/iomgr/ev_poll_and_epoll_posix.h", + "src/core/iomgr/ev_poll_posix.h", "src/core/iomgr/ev_posix.h", "src/core/iomgr/exec_ctx.h", "src/core/iomgr/executor.h", @@ -644,6 +647,7 @@ cc_library( "src/core/iomgr/endpoint_pair_posix.c", "src/core/iomgr/endpoint_pair_windows.c", "src/core/iomgr/ev_poll_and_epoll_posix.c", + "src/core/iomgr/ev_poll_posix.c", "src/core/iomgr/ev_posix.c", "src/core/iomgr/exec_ctx.c", "src/core/iomgr/executor.c", @@ -1304,6 +1308,7 @@ objc_library( "src/core/iomgr/endpoint_pair_posix.c", "src/core/iomgr/endpoint_pair_windows.c", "src/core/iomgr/ev_poll_and_epoll_posix.c", + "src/core/iomgr/ev_poll_posix.c", "src/core/iomgr/ev_posix.c", "src/core/iomgr/exec_ctx.c", "src/core/iomgr/executor.c", @@ -1474,6 +1479,7 @@ objc_library( "src/core/iomgr/endpoint.h", "src/core/iomgr/endpoint_pair.h", "src/core/iomgr/ev_poll_and_epoll_posix.h", + "src/core/iomgr/ev_poll_posix.h", "src/core/iomgr/ev_posix.h", "src/core/iomgr/exec_ctx.h", "src/core/iomgr/executor.h", diff --git a/Makefile b/Makefile index 2cbb34d85e2..11b2bfbb4db 100644 --- a/Makefile +++ b/Makefile @@ -2381,6 +2381,7 @@ LIBGRPC_SRC = \ src/core/iomgr/endpoint_pair_posix.c \ src/core/iomgr/endpoint_pair_windows.c \ src/core/iomgr/ev_poll_and_epoll_posix.c \ + src/core/iomgr/ev_poll_posix.c \ src/core/iomgr/ev_posix.c \ src/core/iomgr/exec_ctx.c \ src/core/iomgr/executor.c \ @@ -2690,6 +2691,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/iomgr/endpoint_pair_posix.c \ src/core/iomgr/endpoint_pair_windows.c \ src/core/iomgr/ev_poll_and_epoll_posix.c \ + src/core/iomgr/ev_poll_posix.c \ src/core/iomgr/ev_posix.c \ src/core/iomgr/exec_ctx.c \ src/core/iomgr/executor.c \ diff --git a/binding.gyp b/binding.gyp index ee2b361f142..18df0122575 100644 --- a/binding.gyp +++ b/binding.gyp @@ -598,6 +598,7 @@ 'src/core/iomgr/endpoint_pair_posix.c', 'src/core/iomgr/endpoint_pair_windows.c', 'src/core/iomgr/ev_poll_and_epoll_posix.c', + 'src/core/iomgr/ev_poll_posix.c', 'src/core/iomgr/ev_posix.c', 'src/core/iomgr/exec_ctx.c', 'src/core/iomgr/executor.c', diff --git a/build.yaml b/build.yaml index e7afc03db40..d19bf67d523 100644 --- a/build.yaml +++ b/build.yaml @@ -284,6 +284,7 @@ filegroups: - src/core/iomgr/endpoint.h - src/core/iomgr/endpoint_pair.h - src/core/iomgr/ev_poll_and_epoll_posix.h + - src/core/iomgr/ev_poll_posix.h - src/core/iomgr/ev_posix.h - src/core/iomgr/exec_ctx.h - src/core/iomgr/executor.h @@ -401,6 +402,7 @@ filegroups: - src/core/iomgr/endpoint_pair_posix.c - src/core/iomgr/endpoint_pair_windows.c - src/core/iomgr/ev_poll_and_epoll_posix.c + - src/core/iomgr/ev_poll_posix.c - src/core/iomgr/ev_posix.c - src/core/iomgr/exec_ctx.c - src/core/iomgr/executor.c diff --git a/config.m4 b/config.m4 index ac2c2cb1abc..25d3cb0e9fc 100644 --- a/config.m4 +++ b/config.m4 @@ -120,6 +120,7 @@ if test "$PHP_GRPC" != "no"; then src/core/iomgr/endpoint_pair_posix.c \ src/core/iomgr/endpoint_pair_windows.c \ src/core/iomgr/ev_poll_and_epoll_posix.c \ + src/core/iomgr/ev_poll_posix.c \ src/core/iomgr/ev_posix.c \ src/core/iomgr/exec_ctx.c \ src/core/iomgr/executor.c \ diff --git a/gRPC.podspec b/gRPC.podspec index 0f56518d6bc..e3db1668810 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -198,6 +198,7 @@ Pod::Spec.new do |s| 'src/core/iomgr/endpoint.h', 'src/core/iomgr/endpoint_pair.h', 'src/core/iomgr/ev_poll_and_epoll_posix.h', + 'src/core/iomgr/ev_poll_posix.h', 'src/core/iomgr/ev_posix.h', 'src/core/iomgr/exec_ctx.h', 'src/core/iomgr/executor.h', @@ -348,6 +349,7 @@ Pod::Spec.new do |s| 'src/core/iomgr/endpoint_pair_posix.c', 'src/core/iomgr/endpoint_pair_windows.c', 'src/core/iomgr/ev_poll_and_epoll_posix.c', + 'src/core/iomgr/ev_poll_posix.c', 'src/core/iomgr/ev_posix.c', 'src/core/iomgr/exec_ctx.c', 'src/core/iomgr/executor.c', @@ -515,6 +517,7 @@ Pod::Spec.new do |s| 'src/core/iomgr/endpoint.h', 'src/core/iomgr/endpoint_pair.h', 'src/core/iomgr/ev_poll_and_epoll_posix.h', + 'src/core/iomgr/ev_poll_posix.h', 'src/core/iomgr/ev_posix.h', 'src/core/iomgr/exec_ctx.h', 'src/core/iomgr/executor.h', diff --git a/grpc.gemspec b/grpc.gemspec index de41947c095..4f95d4cc9ae 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -194,6 +194,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/iomgr/endpoint.h ) s.files += %w( src/core/iomgr/endpoint_pair.h ) s.files += %w( src/core/iomgr/ev_poll_and_epoll_posix.h ) + s.files += %w( src/core/iomgr/ev_poll_posix.h ) s.files += %w( src/core/iomgr/ev_posix.h ) s.files += %w( src/core/iomgr/exec_ctx.h ) s.files += %w( src/core/iomgr/executor.h ) @@ -331,6 +332,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/iomgr/endpoint_pair_posix.c ) s.files += %w( src/core/iomgr/endpoint_pair_windows.c ) s.files += %w( src/core/iomgr/ev_poll_and_epoll_posix.c ) + s.files += %w( src/core/iomgr/ev_poll_posix.c ) s.files += %w( src/core/iomgr/ev_posix.c ) s.files += %w( src/core/iomgr/exec_ctx.c ) s.files += %w( src/core/iomgr/executor.c ) diff --git a/package.json b/package.json index 1741d0cf202..e6c18bf1e12 100644 --- a/package.json +++ b/package.json @@ -138,6 +138,7 @@ "src/core/iomgr/endpoint.h", "src/core/iomgr/endpoint_pair.h", "src/core/iomgr/ev_poll_and_epoll_posix.h", + "src/core/iomgr/ev_poll_posix.h", "src/core/iomgr/ev_posix.h", "src/core/iomgr/exec_ctx.h", "src/core/iomgr/executor.h", @@ -275,6 +276,7 @@ "src/core/iomgr/endpoint_pair_posix.c", "src/core/iomgr/endpoint_pair_windows.c", "src/core/iomgr/ev_poll_and_epoll_posix.c", + "src/core/iomgr/ev_poll_posix.c", "src/core/iomgr/ev_posix.c", "src/core/iomgr/exec_ctx.c", "src/core/iomgr/executor.c", diff --git a/package.xml b/package.xml index 316cc34519f..28287c6fa7d 100644 --- a/package.xml +++ b/package.xml @@ -198,6 +198,7 @@ + @@ -335,6 +336,7 @@ + diff --git a/src/core/iomgr/ev_poll_and_epoll_posix.c b/src/core/iomgr/ev_poll_and_epoll_posix.c index 72a8f9f9697..7de8c665e23 100644 --- a/src/core/iomgr/ev_poll_and_epoll_posix.c +++ b/src/core/iomgr/ev_poll_and_epoll_posix.c @@ -271,11 +271,6 @@ static int pollset_has_workers(grpc_pollset *pollset); static void remove_fd_from_all_epoll_sets(int fd); -/* override to allow tests to hook poll() usage */ -typedef int (*grpc_poll_function_type)(struct pollfd *, nfds_t, int); -extern grpc_poll_function_type grpc_poll_function; -extern grpc_wakeup_fd grpc_global_wakeup_fd; - /******************************************************************************* * pollset_set definitions */ @@ -706,10 +701,6 @@ static void fd_become_writable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { GPR_TLS_DECL(g_current_thread_poller); GPR_TLS_DECL(g_current_thread_worker); -/** Default poll() function - a pointer so that it can be overridden by some - * tests */ -grpc_poll_function_type grpc_poll_function = poll; - /** The alarm system needs to be able to wakeup 'some poller' sometimes * (specifically when a new alarm needs to be triggered earlier than the next * alarm 'epoch'). diff --git a/src/core/iomgr/ev_poll_posix.c b/src/core/iomgr/ev_poll_posix.c index 3693e137299..e2b0b08ac34 100644 --- a/src/core/iomgr/ev_poll_posix.c +++ b/src/core/iomgr/ev_poll_posix.c @@ -121,8 +121,6 @@ struct grpc_fd { grpc_closure *read_closure; grpc_closure *write_closure; - struct grpc_fd *freelist_next; - grpc_closure *on_done_closure; grpc_iomgr_object iomgr_object; @@ -152,13 +150,6 @@ static void fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *rec, /* Return 1 if this fd is orphaned, 0 otherwise */ static bool fd_is_orphaned(grpc_fd *fd); -/* Notification from the poller to an fd that it has become readable or - writable. - If allow_synchronous_callback is 1, allow running the fd callback inline - in this callstack, otherwise register an asynchronous callback and return */ -static void fd_become_readable(grpc_exec_ctx *exec_ctx, grpc_fd *fd); -static void fd_become_writable(grpc_exec_ctx *exec_ctx, grpc_fd *fd); - /* Reference counting for fds */ /*#define GRPC_FD_REF_COUNT_DEBUG*/ #ifdef GRPC_FD_REF_COUNT_DEBUG @@ -174,9 +165,6 @@ static void fd_unref(grpc_fd *fd); #define GRPC_FD_UNREF(fd, reason) fd_unref(fd) #endif -static void fd_global_init(void); -static void fd_global_shutdown(void); - #define CLOSURE_NOT_READY ((grpc_closure *)0) #define CLOSURE_READY ((grpc_closure *)1) @@ -184,8 +172,6 @@ static void fd_global_shutdown(void); * pollset declarations */ -typedef struct grpc_pollset_vtable grpc_pollset_vtable; - typedef struct grpc_cached_wakeup_fd { grpc_wakeup_fd fd; struct grpc_cached_wakeup_fd *next; @@ -200,11 +186,6 @@ struct grpc_pollset_worker { }; struct grpc_pollset { - /* pollsets under posix can mutate representation as fds are added and - removed. - For example, we may choose a poll() based implementation on linux for - few fds, and an epoll() based implementation for many fds */ - const grpc_pollset_vtable *vtable; gpr_mu *mu; grpc_pollset_worker root_worker; int in_flight_cbs; @@ -213,10 +194,14 @@ struct grpc_pollset { int kicked_without_pollers; grpc_closure *shutdown_done; grpc_closure_list idle_jobs; - union { - int fd; - void *ptr; - } data; + /* all polled fds */ + size_t fd_count; + size_t fd_capacity; + grpc_fd **fds; + /* fds that have been removed from the pollset explicitly */ + size_t del_count; + size_t del_capacity; + grpc_fd **dels; /* Local cache of eventfds for workers */ grpc_cached_wakeup_fd *local_wakeup_cache; }; @@ -258,24 +243,10 @@ static void pollset_kick_ext(grpc_pollset *p, grpc_pollset_worker *specific_worker, uint32_t flags); -/* turn a pollset into a multipoller: platform specific */ -typedef void (*platform_become_multipoller_type)(grpc_exec_ctx *exec_ctx, - grpc_pollset *pollset, - struct grpc_fd **fds, - size_t fd_count); -static platform_become_multipoller_type platform_become_multipoller; - /* Return 1 if the pollset has active threads in pollset_work (pollset must * be locked) */ static int pollset_has_workers(grpc_pollset *pollset); -static void remove_fd_from_all_epoll_sets(int fd); - -/* override to allow tests to hook poll() usage */ -typedef int (*grpc_poll_function_type)(struct pollfd *, nfds_t, int); -extern grpc_poll_function_type grpc_poll_function; -extern grpc_wakeup_fd grpc_global_wakeup_fd; - /******************************************************************************* * pollset_set definitions */ @@ -300,67 +271,6 @@ struct grpc_pollset_set { * fd_posix.c */ -/* We need to keep a freelist not because of any concerns of malloc performance - * but instead so that implementations with multiple threads in (for example) - * epoll_wait deal with the race between pollset removal and incoming poll - * notifications. - * - * The problem is that the poller ultimately holds a reference to this - * object, so it is very difficult to know when is safe to free it, at least - * without some expensive synchronization. - * - * If we keep the object freelisted, in the worst case losing this race just - * becomes a spurious read notification on a reused fd. - */ -/* TODO(klempner): We could use some form of polling generation count to know - * when these are safe to free. */ -/* TODO(klempner): Consider disabling freelisting if we don't have multiple - * threads in poll on the same fd */ -/* TODO(klempner): Batch these allocations to reduce fragmentation */ -static grpc_fd *fd_freelist = NULL; -static gpr_mu fd_freelist_mu; - -static void freelist_fd(grpc_fd *fd) { - gpr_mu_lock(&fd_freelist_mu); - fd->freelist_next = fd_freelist; - fd_freelist = fd; - grpc_iomgr_unregister_object(&fd->iomgr_object); - gpr_mu_unlock(&fd_freelist_mu); -} - -static grpc_fd *alloc_fd(int fd) { - grpc_fd *r = NULL; - gpr_mu_lock(&fd_freelist_mu); - if (fd_freelist != NULL) { - r = fd_freelist; - fd_freelist = fd_freelist->freelist_next; - } - gpr_mu_unlock(&fd_freelist_mu); - if (r == NULL) { - r = gpr_malloc(sizeof(grpc_fd)); - gpr_mu_init(&r->mu); - } - - gpr_atm_rel_store(&r->refst, 1); - r->shutdown = 0; - r->read_closure = CLOSURE_NOT_READY; - r->write_closure = CLOSURE_NOT_READY; - r->fd = fd; - r->inactive_watcher_root.next = r->inactive_watcher_root.prev = - &r->inactive_watcher_root; - r->freelist_next = NULL; - r->read_watcher = r->write_watcher = NULL; - r->on_done_closure = NULL; - r->closed = 0; - r->released = 0; - return r; -} - -static void destroy(grpc_fd *fd) { - gpr_mu_destroy(&fd->mu); - gpr_free(fd); -} - #ifdef GRPC_FD_REF_COUNT_DEBUG #define REF_BY(fd, n, reason) ref_by(fd, n, reason, __FILE__, __LINE__) #define UNREF_BY(fd, n, reason) unref_by(fd, n, reason, __FILE__, __LINE__) @@ -390,27 +300,28 @@ static void unref_by(grpc_fd *fd, int n) { #endif old = gpr_atm_full_fetch_add(&fd->refst, -n); if (old == n) { - freelist_fd(fd); + gpr_mu_destroy(&fd->mu); + gpr_free(fd); } else { GPR_ASSERT(old > n); } } -static void fd_global_init(void) { gpr_mu_init(&fd_freelist_mu); } - -static void fd_global_shutdown(void) { - gpr_mu_lock(&fd_freelist_mu); - gpr_mu_unlock(&fd_freelist_mu); - while (fd_freelist != NULL) { - grpc_fd *fd = fd_freelist; - fd_freelist = fd_freelist->freelist_next; - destroy(fd); - } - gpr_mu_destroy(&fd_freelist_mu); -} - static grpc_fd *fd_create(int fd, const char *name) { - grpc_fd *r = alloc_fd(fd); + grpc_fd *r = gpr_malloc(sizeof(*r)); + gpr_mu_init(&r->mu); + gpr_atm_rel_store(&r->refst, 1); + r->shutdown = 0; + r->read_closure = CLOSURE_NOT_READY; + r->write_closure = CLOSURE_NOT_READY; + r->fd = fd; + r->inactive_watcher_root.next = r->inactive_watcher_root.prev = + &r->inactive_watcher_root; + r->read_watcher = r->write_watcher = NULL; + r->on_done_closure = NULL; + r->closed = 0; + r->released = 0; + char *name2; gpr_asprintf(&name2, "%s fd=%d", name, fd); grpc_iomgr_register_object(&r->iomgr_object, name2); @@ -466,8 +377,6 @@ static void close_fd_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { fd->closed = 1; if (!fd->released) { close(fd->fd); - } else { - remove_fd_from_all_epoll_sets(fd->fd); } grpc_exec_ctx_enqueue(exec_ctx, fd->on_done_closure, true, NULL); } @@ -555,14 +464,6 @@ static int set_ready_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, } } -static void set_ready(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st) { - /* only one set_ready can be active at once (but there may be a racing - notify_on) */ - gpr_mu_lock(&fd->mu); - set_ready_locked(exec_ctx, fd, st); - gpr_mu_unlock(&fd->mu); -} - static void fd_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { gpr_mu_lock(&fd->mu); GPR_ASSERT(!fd->shutdown); @@ -691,14 +592,6 @@ static void fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *watcher, GRPC_FD_UNREF(fd, "poll"); } -static void fd_become_readable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { - set_ready(exec_ctx, fd, &fd->read_closure); -} - -static void fd_become_writable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { - set_ready(exec_ctx, fd, &fd->write_closure); -} - /******************************************************************************* * pollset_posix.c */ @@ -706,16 +599,6 @@ static void fd_become_writable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { GPR_TLS_DECL(g_current_thread_poller); GPR_TLS_DECL(g_current_thread_worker); -/** Default poll() function - a pointer so that it can be overridden by some - * tests */ -grpc_poll_function_type grpc_poll_function = poll; - -/** The alarm system needs to be able to wakeup 'some poller' sometimes - * (specifically when a new alarm needs to be triggered earlier than the next - * alarm 'epoch'). - * This wakeup_fd gives us something to alert on when such a case occurs. */ -grpc_wakeup_fd grpc_global_wakeup_fd; - static void remove_worker(grpc_pollset *p, grpc_pollset_worker *worker) { worker->prev->next = worker->next; worker->next->prev = worker->prev; @@ -835,8 +718,6 @@ static void kick_poller(void) { grpc_wakeup_fd_wakeup(&grpc_global_wakeup_fd); } /* main interface */ -static void become_basic_pollset(grpc_pollset *pollset, grpc_fd *fd_or_null); - static void pollset_init(grpc_pollset *pollset, gpr_mu *mu) { pollset->mu = mu; pollset->root_worker.next = pollset->root_worker.prev = &pollset->root_worker; @@ -847,20 +728,24 @@ static void pollset_init(grpc_pollset *pollset, gpr_mu *mu) { pollset->idle_jobs.head = pollset->idle_jobs.tail = NULL; pollset->local_wakeup_cache = NULL; pollset->kicked_without_pollers = 0; - become_basic_pollset(pollset, NULL); + pollset->fd_count = 0; + pollset->del_count = 0; + pollset->fds = NULL; + pollset->dels = NULL; } static void pollset_destroy(grpc_pollset *pollset) { GPR_ASSERT(pollset->in_flight_cbs == 0); GPR_ASSERT(!pollset_has_workers(pollset)); GPR_ASSERT(pollset->idle_jobs.head == pollset->idle_jobs.tail); - pollset->vtable->destroy(pollset); while (pollset->local_wakeup_cache) { grpc_cached_wakeup_fd *next = pollset->local_wakeup_cache->next; grpc_wakeup_fd_destroy(&pollset->local_wakeup_cache->fd); gpr_free(pollset->local_wakeup_cache); pollset->local_wakeup_cache = next; } + gpr_free(pollset->fds); + gpr_free(pollset->dels); } static void pollset_reset(grpc_pollset *pollset) { @@ -868,30 +753,44 @@ static void pollset_reset(grpc_pollset *pollset) { GPR_ASSERT(pollset->in_flight_cbs == 0); GPR_ASSERT(!pollset_has_workers(pollset)); GPR_ASSERT(pollset->idle_jobs.head == pollset->idle_jobs.tail); - pollset->vtable->destroy(pollset); + GPR_ASSERT(pollset->fd_count == 0); + GPR_ASSERT(pollset->del_count == 0); pollset->shutting_down = 0; pollset->called_shutdown = 0; pollset->kicked_without_pollers = 0; - become_basic_pollset(pollset, NULL); } static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_fd *fd) { gpr_mu_lock(pollset->mu); - pollset->vtable->add_fd(exec_ctx, pollset, fd, 1); -/* the following (enabled only in debug) will reacquire and then release - our lock - meaning that if the unlocking flag passed to add_fd above is - not respected, the code will deadlock (in a way that we have a chance of - debugging) */ -#ifndef NDEBUG - gpr_mu_lock(pollset->mu); + size_t i; + /* TODO(ctiller): this is O(num_fds^2); maybe switch to a hash set here */ + for (i = 0; i < pollset->fd_count; i++) { + if (pollset->fds[i] == fd) goto exit; + } + if (pollset->fd_count == pollset->fd_capacity) { + pollset->fd_capacity = + GPR_MAX(pollset->fd_capacity + 8, pollset->fd_count * 3 / 2); + pollset->fds = + gpr_realloc(pollset->fds, sizeof(grpc_fd *) * pollset->fd_capacity); + } + pollset->fds[pollset->fd_count++] = fd; + GRPC_FD_REF(fd, "multipoller"); +exit: gpr_mu_unlock(pollset->mu); -#endif } static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset) { GPR_ASSERT(grpc_closure_list_empty(pollset->idle_jobs)); - pollset->vtable->finish_shutdown(pollset); + size_t i; + for (i = 0; i < pollset->fd_count; i++) { + GRPC_FD_UNREF(pollset->fds[i], "multipoller"); + } + for (i = 0; i < pollset->del_count; i++) { + GRPC_FD_UNREF(pollset->dels[i], "multipoller_del"); + } + pollset->fd_count = 0; + pollset->del_count = 0; grpc_exec_ctx_enqueue(exec_ctx, pollset->shutdown_done, true, NULL); } @@ -952,8 +851,93 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, } gpr_tls_set(&g_current_thread_poller, (intptr_t)pollset); GPR_TIMER_BEGIN("maybe_work_and_unlock", 0); - pollset->vtable->maybe_work_and_unlock(exec_ctx, pollset, &worker, - deadline, now); +#define POLLOUT_CHECK (POLLOUT | POLLHUP | POLLERR) +#define POLLIN_CHECK (POLLIN | POLLHUP | POLLERR) + + int timeout; + int r; + size_t i, j, fd_count; + nfds_t pfd_count; + /* TODO(ctiller): inline some elements to avoid an allocation */ + grpc_fd_watcher *watchers; + struct pollfd *pfds; + + timeout = poll_deadline_to_millis_timeout(deadline, now); + /* TODO(ctiller): perform just one malloc here if we exceed the inline + * case */ + pfds = gpr_malloc(sizeof(*pfds) * (pollset->fd_count + 2)); + watchers = gpr_malloc(sizeof(*watchers) * (pollset->fd_count + 2)); + fd_count = 0; + pfd_count = 2; + pfds[0].fd = GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd); + pfds[0].events = POLLIN; + pfds[0].revents = 0; + pfds[1].fd = GRPC_WAKEUP_FD_GET_READ_FD(&worker.wakeup_fd->fd); + pfds[1].events = POLLIN; + pfds[1].revents = 0; + for (i = 0; i < pollset->fd_count; i++) { + int remove = fd_is_orphaned(pollset->fds[i]); + for (j = 0; !remove && j < pollset->del_count; j++) { + if (pollset->fds[i] == pollset->dels[j]) remove = 1; + } + if (remove) { + GRPC_FD_UNREF(pollset->fds[i], "multipoller"); + } else { + pollset->fds[fd_count++] = pollset->fds[i]; + watchers[pfd_count].fd = pollset->fds[i]; + pfds[pfd_count].fd = pollset->fds[i]->fd; + pfds[pfd_count].revents = 0; + pfd_count++; + } + } + for (j = 0; j < pollset->del_count; j++) { + GRPC_FD_UNREF(pollset->dels[j], "multipoller_del"); + } + pollset->del_count = 0; + pollset->fd_count = fd_count; + gpr_mu_unlock(pollset->mu); + + for (i = 2; i < pfd_count; i++) { + pfds[i].events = (short)fd_begin_poll(watchers[i].fd, pollset, &worker, + POLLIN, POLLOUT, &watchers[i]); + } + + /* TODO(vpai): Consider first doing a 0 timeout poll here to avoid + even going into the blocking annotation if possible */ + GRPC_SCHEDULING_START_BLOCKING_REGION; + r = grpc_poll_function(pfds, pfd_count, timeout); + GRPC_SCHEDULING_END_BLOCKING_REGION; + + if (r < 0) { + if (errno != EINTR) { + gpr_log(GPR_ERROR, "poll() failed: %s", strerror(errno)); + } + for (i = 2; i < pfd_count; i++) { + fd_end_poll(exec_ctx, &watchers[i], 0, 0); + } + } else if (r == 0) { + for (i = 2; i < pfd_count; i++) { + fd_end_poll(exec_ctx, &watchers[i], 0, 0); + } + } else { + if (pfds[0].revents & POLLIN_CHECK) { + grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); + } + if (pfds[1].revents & POLLIN_CHECK) { + grpc_wakeup_fd_consume_wakeup(&worker.wakeup_fd->fd); + } + for (i = 2; i < pfd_count; i++) { + if (watchers[i].fd == NULL) { + fd_end_poll(exec_ctx, &watchers[i], 0, 0); + continue; + } + fd_end_poll(exec_ctx, &watchers[i], pfds[i].revents & POLLIN_CHECK, + pfds[i].revents & POLLOUT_CHECK); + } + } + + gpr_free(pfds); + gpr_free(watchers); GPR_TIMER_END("maybe_work_and_unlock", 0); locked = 0; gpr_tls_set(&g_current_thread_poller, 0); @@ -1050,408 +1034,6 @@ static int poll_deadline_to_millis_timeout(gpr_timespec deadline, timeout, gpr_time_from_nanos(GPR_NS_PER_MS - 1, GPR_TIMESPAN))); } -/* - * basic_pollset - a vtable that provides polling for zero or one file - * descriptor via poll() - */ - -typedef struct grpc_unary_promote_args { - const grpc_pollset_vtable *original_vtable; - grpc_pollset *pollset; - grpc_fd *fd; - grpc_closure promotion_closure; -} grpc_unary_promote_args; - -static void basic_do_promote(grpc_exec_ctx *exec_ctx, void *args, - bool success) { - grpc_unary_promote_args *up_args = args; - const grpc_pollset_vtable *original_vtable = up_args->original_vtable; - grpc_pollset *pollset = up_args->pollset; - grpc_fd *fd = up_args->fd; - - /* - * This is quite tricky. There are a number of cases to keep in mind here: - * 1. fd may have been orphaned - * 2. The pollset may no longer be a unary poller (and we can't let case #1 - * leak to other pollset types!) - * 3. pollset's fd (which may have changed) may have been orphaned - * 4. The pollset may be shutting down. - */ - - gpr_mu_lock(pollset->mu); - /* First we need to ensure that nobody is polling concurrently */ - GPR_ASSERT(!pollset_has_workers(pollset)); - - gpr_free(up_args); - /* At this point the pollset may no longer be a unary poller. In that case - * we should just call the right add function and be done. */ - /* TODO(klempner): If we're not careful this could cause infinite recursion. - * That's not a problem for now because empty_pollset has a trivial poller - * and we don't have any mechanism to unbecome multipoller. */ - pollset->in_flight_cbs--; - if (pollset->shutting_down) { - /* We don't care about this pollset anymore. */ - if (pollset->in_flight_cbs == 0 && !pollset->called_shutdown) { - pollset->called_shutdown = 1; - finish_shutdown(exec_ctx, pollset); - } - } else if (fd_is_orphaned(fd)) { - /* Don't try to add it to anything, we'll drop our ref on it below */ - } else if (pollset->vtable != original_vtable) { - pollset->vtable->add_fd(exec_ctx, pollset, fd, 0); - } else if (fd != pollset->data.ptr) { - grpc_fd *fds[2]; - fds[0] = pollset->data.ptr; - fds[1] = fd; - - if (fds[0] && !fd_is_orphaned(fds[0])) { - platform_become_multipoller(exec_ctx, pollset, fds, GPR_ARRAY_SIZE(fds)); - GRPC_FD_UNREF(fds[0], "basicpoll"); - } else { - /* old fd is orphaned and we haven't cleaned it up until now, so remain a - * unary poller */ - /* Note that it is possible that fds[1] is also orphaned at this point. - * That's okay, we'll correct it at the next add or poll. */ - if (fds[0]) GRPC_FD_UNREF(fds[0], "basicpoll"); - pollset->data.ptr = fd; - GRPC_FD_REF(fd, "basicpoll"); - } - } - - gpr_mu_unlock(pollset->mu); - - /* Matching ref in basic_pollset_add_fd */ - GRPC_FD_UNREF(fd, "basicpoll_add"); -} - -static void basic_pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_fd *fd, int and_unlock_pollset) { - grpc_unary_promote_args *up_args; - GPR_ASSERT(fd); - if (fd == pollset->data.ptr) goto exit; - - if (!pollset_has_workers(pollset)) { - /* Fast path -- no in flight cbs */ - /* TODO(klempner): Comment this out and fix any test failures or establish - * they are due to timing issues */ - grpc_fd *fds[2]; - fds[0] = pollset->data.ptr; - fds[1] = fd; - - if (fds[0] == NULL) { - pollset->data.ptr = fd; - GRPC_FD_REF(fd, "basicpoll"); - } else if (!fd_is_orphaned(fds[0])) { - platform_become_multipoller(exec_ctx, pollset, fds, GPR_ARRAY_SIZE(fds)); - GRPC_FD_UNREF(fds[0], "basicpoll"); - } else { - /* old fd is orphaned and we haven't cleaned it up until now, so remain a - * unary poller */ - GRPC_FD_UNREF(fds[0], "basicpoll"); - pollset->data.ptr = fd; - GRPC_FD_REF(fd, "basicpoll"); - } - goto exit; - } - - /* Now we need to promote. This needs to happen when we're not polling. Since - * this may be called from poll, the wait needs to happen asynchronously. */ - GRPC_FD_REF(fd, "basicpoll_add"); - pollset->in_flight_cbs++; - up_args = gpr_malloc(sizeof(*up_args)); - up_args->fd = fd; - up_args->original_vtable = pollset->vtable; - up_args->pollset = pollset; - up_args->promotion_closure.cb = basic_do_promote; - up_args->promotion_closure.cb_arg = up_args; - - grpc_closure_list_add(&pollset->idle_jobs, &up_args->promotion_closure, 1); - pollset_kick(pollset, GRPC_POLLSET_KICK_BROADCAST); - -exit: - if (and_unlock_pollset) { - gpr_mu_unlock(pollset->mu); - } -} - -static void basic_pollset_maybe_work_and_unlock(grpc_exec_ctx *exec_ctx, - grpc_pollset *pollset, - grpc_pollset_worker *worker, - gpr_timespec deadline, - gpr_timespec now) { -#define POLLOUT_CHECK (POLLOUT | POLLHUP | POLLERR) -#define POLLIN_CHECK (POLLIN | POLLHUP | POLLERR) - - struct pollfd pfd[3]; - grpc_fd *fd; - grpc_fd_watcher fd_watcher; - int timeout; - int r; - nfds_t nfds; - - fd = pollset->data.ptr; - if (fd && fd_is_orphaned(fd)) { - GRPC_FD_UNREF(fd, "basicpoll"); - fd = pollset->data.ptr = NULL; - } - timeout = poll_deadline_to_millis_timeout(deadline, now); - pfd[0].fd = GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd); - pfd[0].events = POLLIN; - pfd[0].revents = 0; - pfd[1].fd = GRPC_WAKEUP_FD_GET_READ_FD(&worker->wakeup_fd->fd); - pfd[1].events = POLLIN; - pfd[1].revents = 0; - nfds = 2; - if (fd) { - pfd[2].fd = fd->fd; - pfd[2].revents = 0; - GRPC_FD_REF(fd, "basicpoll_begin"); - gpr_mu_unlock(pollset->mu); - pfd[2].events = - (short)fd_begin_poll(fd, pollset, worker, POLLIN, POLLOUT, &fd_watcher); - if (pfd[2].events != 0) { - nfds++; - } - } else { - gpr_mu_unlock(pollset->mu); - } - - /* TODO(vpai): Consider first doing a 0 timeout poll here to avoid - even going into the blocking annotation if possible */ - /* poll fd count (argument 2) is shortened by one if we have no events - to poll on - such that it only includes the kicker */ - GPR_TIMER_BEGIN("poll", 0); - GRPC_SCHEDULING_START_BLOCKING_REGION; - r = grpc_poll_function(pfd, nfds, timeout); - GRPC_SCHEDULING_END_BLOCKING_REGION; - GPR_TIMER_END("poll", 0); - - if (r < 0) { - if (errno != EINTR) { - gpr_log(GPR_ERROR, "poll() failed: %s", strerror(errno)); - } - if (fd) { - fd_end_poll(exec_ctx, &fd_watcher, 0, 0); - } - } else if (r == 0) { - if (fd) { - fd_end_poll(exec_ctx, &fd_watcher, 0, 0); - } - } else { - if (pfd[0].revents & POLLIN_CHECK) { - grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); - } - if (pfd[1].revents & POLLIN_CHECK) { - grpc_wakeup_fd_consume_wakeup(&worker->wakeup_fd->fd); - } - if (nfds > 2) { - fd_end_poll(exec_ctx, &fd_watcher, pfd[2].revents & POLLIN_CHECK, - pfd[2].revents & POLLOUT_CHECK); - } else if (fd) { - fd_end_poll(exec_ctx, &fd_watcher, 0, 0); - } - } - - if (fd) { - GRPC_FD_UNREF(fd, "basicpoll_begin"); - } -} - -static void basic_pollset_destroy(grpc_pollset *pollset) { - if (pollset->data.ptr != NULL) { - GRPC_FD_UNREF(pollset->data.ptr, "basicpoll"); - pollset->data.ptr = NULL; - } -} - -static const grpc_pollset_vtable basic_pollset = { - basic_pollset_add_fd, basic_pollset_maybe_work_and_unlock, - basic_pollset_destroy, basic_pollset_destroy}; - -static void become_basic_pollset(grpc_pollset *pollset, grpc_fd *fd_or_null) { - pollset->vtable = &basic_pollset; - pollset->data.ptr = fd_or_null; - if (fd_or_null != NULL) { - GRPC_FD_REF(fd_or_null, "basicpoll"); - } -} - -/******************************************************************************* - * pollset_multipoller_with_poll_posix.c - */ - -typedef struct { - /* all polled fds */ - size_t fd_count; - size_t fd_capacity; - grpc_fd **fds; - /* fds that have been removed from the pollset explicitly */ - size_t del_count; - size_t del_capacity; - grpc_fd **dels; -} poll_hdr; - -static void multipoll_with_poll_pollset_add_fd(grpc_exec_ctx *exec_ctx, - grpc_pollset *pollset, - grpc_fd *fd, - int and_unlock_pollset) { - size_t i; - poll_hdr *h = pollset->data.ptr; - /* TODO(ctiller): this is O(num_fds^2); maybe switch to a hash set here */ - for (i = 0; i < h->fd_count; i++) { - if (h->fds[i] == fd) goto exit; - } - if (h->fd_count == h->fd_capacity) { - h->fd_capacity = GPR_MAX(h->fd_capacity + 8, h->fd_count * 3 / 2); - h->fds = gpr_realloc(h->fds, sizeof(grpc_fd *) * h->fd_capacity); - } - h->fds[h->fd_count++] = fd; - GRPC_FD_REF(fd, "multipoller"); -exit: - if (and_unlock_pollset) { - gpr_mu_unlock(pollset->mu); - } -} - -static void multipoll_with_poll_pollset_maybe_work_and_unlock( - grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_pollset_worker *worker, - gpr_timespec deadline, gpr_timespec now) { -#define POLLOUT_CHECK (POLLOUT | POLLHUP | POLLERR) -#define POLLIN_CHECK (POLLIN | POLLHUP | POLLERR) - - int timeout; - int r; - size_t i, j, fd_count; - nfds_t pfd_count; - poll_hdr *h; - /* TODO(ctiller): inline some elements to avoid an allocation */ - grpc_fd_watcher *watchers; - struct pollfd *pfds; - - h = pollset->data.ptr; - timeout = poll_deadline_to_millis_timeout(deadline, now); - /* TODO(ctiller): perform just one malloc here if we exceed the inline case */ - pfds = gpr_malloc(sizeof(*pfds) * (h->fd_count + 2)); - watchers = gpr_malloc(sizeof(*watchers) * (h->fd_count + 2)); - fd_count = 0; - pfd_count = 2; - pfds[0].fd = GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd); - pfds[0].events = POLLIN; - pfds[0].revents = 0; - pfds[1].fd = GRPC_WAKEUP_FD_GET_READ_FD(&worker->wakeup_fd->fd); - pfds[1].events = POLLIN; - pfds[1].revents = 0; - for (i = 0; i < h->fd_count; i++) { - int remove = fd_is_orphaned(h->fds[i]); - for (j = 0; !remove && j < h->del_count; j++) { - if (h->fds[i] == h->dels[j]) remove = 1; - } - if (remove) { - GRPC_FD_UNREF(h->fds[i], "multipoller"); - } else { - h->fds[fd_count++] = h->fds[i]; - watchers[pfd_count].fd = h->fds[i]; - pfds[pfd_count].fd = h->fds[i]->fd; - pfds[pfd_count].revents = 0; - pfd_count++; - } - } - for (j = 0; j < h->del_count; j++) { - GRPC_FD_UNREF(h->dels[j], "multipoller_del"); - } - h->del_count = 0; - h->fd_count = fd_count; - gpr_mu_unlock(pollset->mu); - - for (i = 2; i < pfd_count; i++) { - pfds[i].events = (short)fd_begin_poll(watchers[i].fd, pollset, worker, - POLLIN, POLLOUT, &watchers[i]); - } - - /* TODO(vpai): Consider first doing a 0 timeout poll here to avoid - even going into the blocking annotation if possible */ - GRPC_SCHEDULING_START_BLOCKING_REGION; - r = grpc_poll_function(pfds, pfd_count, timeout); - GRPC_SCHEDULING_END_BLOCKING_REGION; - - if (r < 0) { - if (errno != EINTR) { - gpr_log(GPR_ERROR, "poll() failed: %s", strerror(errno)); - } - for (i = 2; i < pfd_count; i++) { - fd_end_poll(exec_ctx, &watchers[i], 0, 0); - } - } else if (r == 0) { - for (i = 2; i < pfd_count; i++) { - fd_end_poll(exec_ctx, &watchers[i], 0, 0); - } - } else { - if (pfds[0].revents & POLLIN_CHECK) { - grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); - } - if (pfds[1].revents & POLLIN_CHECK) { - grpc_wakeup_fd_consume_wakeup(&worker->wakeup_fd->fd); - } - for (i = 2; i < pfd_count; i++) { - if (watchers[i].fd == NULL) { - fd_end_poll(exec_ctx, &watchers[i], 0, 0); - continue; - } - fd_end_poll(exec_ctx, &watchers[i], pfds[i].revents & POLLIN_CHECK, - pfds[i].revents & POLLOUT_CHECK); - } - } - - gpr_free(pfds); - gpr_free(watchers); -} - -static void multipoll_with_poll_pollset_finish_shutdown(grpc_pollset *pollset) { - size_t i; - poll_hdr *h = pollset->data.ptr; - for (i = 0; i < h->fd_count; i++) { - GRPC_FD_UNREF(h->fds[i], "multipoller"); - } - for (i = 0; i < h->del_count; i++) { - GRPC_FD_UNREF(h->dels[i], "multipoller_del"); - } - h->fd_count = 0; - h->del_count = 0; -} - -static void multipoll_with_poll_pollset_destroy(grpc_pollset *pollset) { - poll_hdr *h = pollset->data.ptr; - multipoll_with_poll_pollset_finish_shutdown(pollset); - gpr_free(h->fds); - gpr_free(h->dels); - gpr_free(h); -} - -static const grpc_pollset_vtable multipoll_with_poll_pollset = { - multipoll_with_poll_pollset_add_fd, - multipoll_with_poll_pollset_maybe_work_and_unlock, - multipoll_with_poll_pollset_finish_shutdown, - multipoll_with_poll_pollset_destroy}; - -static void poll_become_multipoller(grpc_exec_ctx *exec_ctx, - grpc_pollset *pollset, grpc_fd **fds, - size_t nfds) { - size_t i; - poll_hdr *h = gpr_malloc(sizeof(poll_hdr)); - pollset->vtable = &multipoll_with_poll_pollset; - pollset->data.ptr = h; - h->fd_count = nfds; - h->fd_capacity = nfds; - h->fds = gpr_malloc(nfds * sizeof(grpc_fd *)); - h->del_count = 0; - h->del_capacity = 0; - h->dels = NULL; - for (i = 0; i < nfds; i++) { - h->fds[i] = fds[i]; - GRPC_FD_REF(fds[i], "multipoller"); - } -} - /******************************************************************************* * pollset_set_posix.c */ @@ -1599,10 +1181,7 @@ static void pollset_set_del_fd(grpc_exec_ctx *exec_ctx, * event engine binding */ -static void shutdown_engine(void) { - fd_global_shutdown(); - pollset_global_shutdown(); -} +static void shutdown_engine(void) { pollset_global_shutdown(); } static const grpc_event_engine_vtable vtable = { .pollset_size = sizeof(grpc_pollset), @@ -1637,7 +1216,6 @@ static const grpc_event_engine_vtable vtable = { }; const grpc_event_engine_vtable *grpc_init_poll_posix(void) { - fd_global_init(); pollset_global_init(); return &vtable; } diff --git a/src/core/iomgr/ev_posix.c b/src/core/iomgr/ev_posix.c index 127ab4b1812..d7681769c3d 100644 --- a/src/core/iomgr/ev_posix.c +++ b/src/core/iomgr/ev_posix.c @@ -44,6 +44,16 @@ #include "src/core/iomgr/ev_poll_posix.h" #include "src/core/support/env.h" +/** Default poll() function - a pointer so that it can be overridden by some + * tests */ +grpc_poll_function_type grpc_poll_function = poll; + +/** The alarm system needs to be able to wakeup 'some poller' sometimes + * (specifically when a new alarm needs to be triggered earlier than the next + * alarm 'epoch'). + * This wakeup_fd gives us something to alert on when such a case occurs. */ +grpc_wakeup_fd grpc_global_wakeup_fd; + static const grpc_event_engine_vtable *g_event_engine; typedef const grpc_event_engine_vtable *(*event_engine_factory_fn)(void); diff --git a/src/core/iomgr/ev_posix.h b/src/core/iomgr/ev_posix.h index bfd216d3f31..9d1f64652dc 100644 --- a/src/core/iomgr/ev_posix.h +++ b/src/core/iomgr/ev_posix.h @@ -34,9 +34,12 @@ #ifndef GRPC_INTERNAL_CORE_IOMGR_EV_POSIX_H #define GRPC_INTERNAL_CORE_IOMGR_EV_POSIX_H +#include + #include "src/core/iomgr/exec_ctx.h" #include "src/core/iomgr/pollset.h" #include "src/core/iomgr/pollset_set.h" +#include "src/core/iomgr/wakeup_fd_posix.h" typedef struct grpc_fd grpc_fd; @@ -147,4 +150,9 @@ void grpc_pollset_set_add_fd(grpc_exec_ctx *exec_ctx, void grpc_pollset_set_del_fd(grpc_exec_ctx *exec_ctx, grpc_pollset_set *pollset_set, grpc_fd *fd); +/* override to allow tests to hook poll() usage */ +typedef int (*grpc_poll_function_type)(struct pollfd *, nfds_t, int); +extern grpc_poll_function_type grpc_poll_function; +extern grpc_wakeup_fd grpc_global_wakeup_fd; + #endif // GRPC_INTERNAL_CORE_IOMGR_EV_POSIX_H diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 46b748ef366..2629b82aff9 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -114,6 +114,7 @@ CORE_SOURCE_FILES = [ 'src/core/iomgr/endpoint_pair_posix.c', 'src/core/iomgr/endpoint_pair_windows.c', 'src/core/iomgr/ev_poll_and_epoll_posix.c', + 'src/core/iomgr/ev_poll_posix.c', 'src/core/iomgr/ev_posix.c', 'src/core/iomgr/exec_ctx.c', 'src/core/iomgr/executor.c', diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 863f8113afa..544106eefcf 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -812,6 +812,7 @@ src/core/iomgr/closure.h \ src/core/iomgr/endpoint.h \ src/core/iomgr/endpoint_pair.h \ src/core/iomgr/ev_poll_and_epoll_posix.h \ +src/core/iomgr/ev_poll_posix.h \ src/core/iomgr/ev_posix.h \ src/core/iomgr/exec_ctx.h \ src/core/iomgr/executor.h \ @@ -949,6 +950,7 @@ src/core/iomgr/endpoint.c \ src/core/iomgr/endpoint_pair_posix.c \ src/core/iomgr/endpoint_pair_windows.c \ src/core/iomgr/ev_poll_and_epoll_posix.c \ +src/core/iomgr/ev_poll_posix.c \ src/core/iomgr/ev_posix.c \ src/core/iomgr/exec_ctx.c \ src/core/iomgr/executor.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index e0c31db75e3..0d3d97a8294 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -3773,6 +3773,7 @@ "src/core/iomgr/endpoint.h", "src/core/iomgr/endpoint_pair.h", "src/core/iomgr/ev_poll_and_epoll_posix.h", + "src/core/iomgr/ev_poll_posix.h", "src/core/iomgr/ev_posix.h", "src/core/iomgr/exec_ctx.h", "src/core/iomgr/executor.h", @@ -3973,6 +3974,8 @@ "src/core/iomgr/endpoint_pair_windows.c", "src/core/iomgr/ev_poll_and_epoll_posix.c", "src/core/iomgr/ev_poll_and_epoll_posix.h", + "src/core/iomgr/ev_poll_posix.c", + "src/core/iomgr/ev_poll_posix.h", "src/core/iomgr/ev_posix.c", "src/core/iomgr/ev_posix.h", "src/core/iomgr/exec_ctx.c", @@ -4325,6 +4328,7 @@ "src/core/iomgr/endpoint.h", "src/core/iomgr/endpoint_pair.h", "src/core/iomgr/ev_poll_and_epoll_posix.h", + "src/core/iomgr/ev_poll_posix.h", "src/core/iomgr/ev_posix.h", "src/core/iomgr/exec_ctx.h", "src/core/iomgr/executor.h", @@ -4509,6 +4513,8 @@ "src/core/iomgr/endpoint_pair_windows.c", "src/core/iomgr/ev_poll_and_epoll_posix.c", "src/core/iomgr/ev_poll_and_epoll_posix.h", + "src/core/iomgr/ev_poll_posix.c", + "src/core/iomgr/ev_poll_posix.h", "src/core/iomgr/ev_posix.c", "src/core/iomgr/ev_posix.h", "src/core/iomgr/exec_ctx.c", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 8e0a5e8b94c..fe77cea9332 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -321,6 +321,7 @@ + @@ -501,6 +502,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 002379de624..0ecb2c636a0 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -124,6 +124,9 @@ src\core\iomgr + + src\core\iomgr + src\core\iomgr @@ -632,6 +635,9 @@ src\core\iomgr + + src\core\iomgr + src\core\iomgr diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 770eae403b7..545aabb0613 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -311,6 +311,7 @@ + @@ -479,6 +480,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 09167ab0500..f6a69a307e3 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -127,6 +127,9 @@ src\core\iomgr + + src\core\iomgr + src\core\iomgr @@ -569,6 +572,9 @@ src\core\iomgr + + src\core\iomgr + src\core\iomgr From b38197e0ccd1af098855f4a036ff55b58ceced38 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 26 Feb 2016 10:14:54 -0800 Subject: [PATCH 0008/1894] Progress on poll() based poller --- src/core/iomgr/ev_poll_and_epoll_posix.c | 4 +- src/core/iomgr/ev_poll_posix.c | 5 +- src/core/iomgr/iomgr_posix.c | 4 +- test/core/end2end/gen_build_yaml.py | 24 +- test/core/util/port_posix.c | 3 +- tools/run_tests/run_tests.py | 104 +- tools/run_tests/tests.json | 36637 +++------------------ 7 files changed, 4192 insertions(+), 32589 deletions(-) diff --git a/src/core/iomgr/ev_poll_and_epoll_posix.c b/src/core/iomgr/ev_poll_and_epoll_posix.c index 5ff02bb2164..a1e0442a42f 100644 --- a/src/core/iomgr/ev_poll_and_epoll_posix.c +++ b/src/core/iomgr/ev_poll_and_epoll_posix.c @@ -788,7 +788,6 @@ static void pollset_kick(grpc_pollset *p, static void pollset_global_init(void) { gpr_tls_init(&g_current_thread_poller); gpr_tls_init(&g_current_thread_worker); - grpc_wakeup_fd_global_init(); grpc_wakeup_fd_init(&grpc_global_wakeup_fd); } @@ -796,7 +795,6 @@ static void pollset_global_shutdown(void) { grpc_wakeup_fd_destroy(&grpc_global_wakeup_fd); gpr_tls_destroy(&g_current_thread_poller); gpr_tls_destroy(&g_current_thread_worker); - grpc_wakeup_fd_global_destroy(); } static void kick_poller(void) { grpc_wakeup_fd_wakeup(&grpc_global_wakeup_fd); } @@ -1881,8 +1879,8 @@ static void pollset_set_del_fd(grpc_exec_ctx *exec_ctx, */ static void shutdown_engine(void) { - fd_global_shutdown(); pollset_global_shutdown(); + fd_global_shutdown(); } static const grpc_event_engine_vtable vtable = { diff --git a/src/core/iomgr/ev_poll_posix.c b/src/core/iomgr/ev_poll_posix.c index 989461f2ae6..8878aa61bca 100644 --- a/src/core/iomgr/ev_poll_posix.c +++ b/src/core/iomgr/ev_poll_posix.c @@ -290,6 +290,7 @@ static void unref_by(grpc_fd *fd, int n) { old = gpr_atm_full_fetch_add(&fd->refst, -n); if (old == n) { gpr_mu_destroy(&fd->mu); + grpc_iomgr_unregister_object(&fd->iomgr_object); gpr_free(fd); } else { GPR_ASSERT(old > n); @@ -692,7 +693,6 @@ static void pollset_kick(grpc_pollset *p, static void pollset_global_init(void) { gpr_tls_init(&g_current_thread_poller); gpr_tls_init(&g_current_thread_worker); - grpc_wakeup_fd_global_init(); grpc_wakeup_fd_init(&grpc_global_wakeup_fd); } @@ -700,7 +700,6 @@ static void pollset_global_shutdown(void) { grpc_wakeup_fd_destroy(&grpc_global_wakeup_fd); gpr_tls_destroy(&g_current_thread_poller); gpr_tls_destroy(&g_current_thread_worker); - grpc_wakeup_fd_global_destroy(); } static void kick_poller(void) { grpc_wakeup_fd_wakeup(&grpc_global_wakeup_fd); } @@ -719,7 +718,9 @@ static void pollset_init(grpc_pollset *pollset, gpr_mu **mu) { pollset->local_wakeup_cache = NULL; pollset->kicked_without_pollers = 0; pollset->fd_count = 0; + pollset->fd_capacity = 0; pollset->del_count = 0; + pollset->del_capacity = 0; pollset->fds = NULL; pollset->dels = NULL; } diff --git a/src/core/iomgr/iomgr_posix.c b/src/core/iomgr/iomgr_posix.c index baf3bd5db8f..e56f415493f 100644 --- a/src/core/iomgr/iomgr_posix.c +++ b/src/core/iomgr/iomgr_posix.c @@ -39,14 +39,16 @@ #include "src/core/iomgr/ev_posix.h" #include "src/core/iomgr/iomgr_posix.h" #include "src/core/iomgr/tcp_posix.h" +#include "src/core/iomgr/wakeup_fd_posix.h" void grpc_iomgr_platform_init(void) { + grpc_wakeup_fd_global_init(); grpc_event_engine_init(); grpc_register_tracer("tcp", &grpc_tcp_trace); } void grpc_iomgr_platform_flush(void) {} -void grpc_iomgr_platform_shutdown(void) { grpc_event_engine_shutdown(); } +void grpc_iomgr_platform_shutdown(void) { grpc_event_engine_shutdown(); grpc_wakeup_fd_global_destroy(); } #endif /* GRPC_POSIX_SOCKET */ diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index 971457ddcf7..330d1534155 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -47,15 +47,6 @@ default_secure_fixture_options = default_unsecure_fixture_options._replace(secur uds_fixture_options = default_unsecure_fixture_options._replace(dns_resolver=False, platforms=['linux', 'mac', 'posix']) -# map a platform to available polling strategies -POLLING_STRATEGY = { -'windows': ['all'], -'linux': ['poll', 'legacy'], -'mac': ['poll'], -'posix': ['poll'], -} - - # maps fixture name to whether it requires the security library END2END_FIXTURES = { 'h2_compress': default_unsecure_fixture_options, @@ -250,22 +241,17 @@ def main(): { 'name': '%s_test' % f, 'args': [t], - 'env': { - 'GRPC_POLL_STRATEGY': poll_strategy - }, 'exclude_configs': [], - 'platforms': [platform], - 'ci_platforms': [platform], + 'platforms': END2END_FIXTURES[f].platforms, + 'ci_platforms': (END2END_FIXTURES[f].platforms + if END2END_FIXTURES[f].ci_mac else without( + END2END_FIXTURES[f].platforms, 'mac')), 'flaky': False, 'language': 'c', 'cpu_cost': END2END_TESTS[t].cpu_cost, } for f in sorted(END2END_FIXTURES.keys()) - for t in sorted(END2END_TESTS.keys()) - for platform in sorted(END2END_FIXTURES[f].platforms) - for poll_strategy in POLLING_STRATEGY[platform] - if compatible(f, t) - and (END2END_FIXTURES[f].ci_mac or platform != 'mac') + for t in sorted(END2END_TESTS.keys()) if compatible(f, t) ] + [ { 'name': '%s_nosec_test' % f, diff --git a/test/core/util/port_posix.c b/test/core/util/port_posix.c index ba382d242a3..7b6429572eb 100644 --- a/test/core/util/port_posix.c +++ b/test/core/util/port_posix.c @@ -77,7 +77,6 @@ typedef struct freereq { static void destroy_pollset_and_shutdown(grpc_exec_ctx *exec_ctx, void *p, bool success) { grpc_pollset_destroy(p); - grpc_shutdown(); } static void freed_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, @@ -130,6 +129,8 @@ static void free_port_using_server(char *server, int port) { grpc_exec_ctx_finish(&exec_ctx); gpr_free(pr.pollset); gpr_free(path); + + grpc_shutdown(); } static void free_chosen_ports() { diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 30a398e3fcd..106f6bea390 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -149,58 +149,60 @@ class CLanguage(object): def test_specs(self): out = [] binaries = get_c_tests(self.args.travis, self.test_lang) - for target in binaries: - if self.config.build_config in target['exclude_configs']: - continue - if self.platform == 'windows': - binary = 'vsprojects/%s%s/%s.exe' % ( - 'x64/' if self.args.arch == 'x64' else '', - _MSBUILD_CONFIG[self.config.build_config], - target['name']) - else: - binary = 'bins/%s/%s' % (self.config.build_config, target['name']) - env = {} - shortname_ext = '' - if 'env' in target: - tenv = target['env'] - env.update(tenv) - shortname_ext += ' ' - shortname_ext += ' '.join('%s=%s' % (key, tenv[key]) for key in sorted(tenv.keys())) - env['GRPC_DEFAULT_SSL_ROOTS_FILE_PATH'] = ( - _ROOT + '/src/core/tsi/test_creds/ca.pem') - if os.path.isfile(binary): - if 'gtest' in target and target['gtest']: - # here we parse the output of --gtest_list_tests to build up a - # complete list of the tests contained in a binary - # for each test, we then add a job to run, filtering for just that - # test - with open(os.devnull, 'w') as fnull: - tests = subprocess.check_output([binary, '--gtest_list_tests'], - stderr=fnull) - base = None - for line in tests.split('\n'): - i = line.find('#') - if i >= 0: line = line[:i] - if not line: continue - if line[0] != ' ': - base = line.strip() - else: - assert base is not None - assert line[1] == ' ' - test = base + line.strip() - cmdline = [binary] + ['--gtest_filter=%s' % test] - out.append(self.config.job_spec(cmdline, [binary], - shortname='%s:%s %s' % (binary, test, shortname_ext), - cpu_cost=target['cpu_cost'], - environ=env)) + POLLING_STRATEGIES = { + 'windows': ['all'], + 'mac': ['all'], + 'posix': ['all'], + 'linux': ['poll', 'legacy'] + } + for polling_strategy in POLLING_STRATEGIES[self.platform]: + env={'GRPC_DEFAULT_SSL_ROOTS_FILE_PATH': + _ROOT + '/src/core/tsi/test_creds/ca.pem', + 'GRPC_POLLING_STRATEGY': polling_strategy} + shortname_ext = '' if polling_strategy=='all' else ' polling=%s' % polling_strategy + for target in binaries: + if self.config.build_config in target['exclude_configs']: + continue + if self.platform == 'windows': + binary = 'vsprojects/%s%s/%s.exe' % ( + 'x64/' if self.args.arch == 'x64' else '', + _MSBUILD_CONFIG[self.config.build_config], + target['name']) else: - cmdline = [binary] + target['args'] - out.append(self.config.job_spec(cmdline, [binary], - shortname=' '.join(cmdline) + shortname_ext, - cpu_cost=target['cpu_cost'], - environ=env)) - elif self.args.regex == '.*' or self.platform == 'windows': - print '\nWARNING: binary not found, skipping', binary + binary = 'bins/%s/%s' % (self.config.build_config, target['name']) + if os.path.isfile(binary): + if 'gtest' in target and target['gtest']: + # here we parse the output of --gtest_list_tests to build up a + # complete list of the tests contained in a binary + # for each test, we then add a job to run, filtering for just that + # test + with open(os.devnull, 'w') as fnull: + tests = subprocess.check_output([binary, '--gtest_list_tests'], + stderr=fnull) + base = None + for line in tests.split('\n'): + i = line.find('#') + if i >= 0: line = line[:i] + if not line: continue + if line[0] != ' ': + base = line.strip() + else: + assert base is not None + assert line[1] == ' ' + test = base + line.strip() + cmdline = [binary] + ['--gtest_filter=%s' % test] + out.append(self.config.job_spec(cmdline, [binary], + shortname='%s:%s' % (binary, test, shortname_ext), + cpu_cost=target['cpu_cost'], + environ=env)) + else: + cmdline = [binary] + target['args'] + out.append(self.config.job_spec(cmdline, [binary], + shortname=' '.join(cmdline) + shortname_ext, + cpu_cost=target['cpu_cost'], + environ=env)) + elif self.args.regex == '.*' or self.platform == 'windows': + print '\nWARNING: binary not found, skipping', binary return sorted(out) def make_targets(self): diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index dbc24462b67..629891a8479 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -4172,834 +4172,966 @@ "bad_hostname" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "bad_hostname" + "binary_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "bad_hostname" + "call_creds" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "bad_hostname" + "cancel_after_accept" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "bad_hostname" + "cancel_after_client_done" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "binary_metadata" + "cancel_after_invoke" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "binary_metadata" + "cancel_before_invoke" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "binary_metadata" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "binary_metadata" + "cancel_with_status" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "binary_metadata" + "compressed_payload" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "call_creds" + "connectivity" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "call_creds" + "default_host" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "call_creds" + "disappearing_server" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "call_creds" + "empty_batch" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "call_creds" + "graceful_server_shutdown" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_accept" + "high_initial_seqno" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_accept" + "hpack_size" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_accept" + "invoke_large_request" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_accept" + "large_metadata" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "cancel_after_accept" + "max_concurrent_streams" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_client_done" + "max_message_length" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_client_done" + "negative_deadline" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_client_done" + "no_op" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_client_done" + "payload" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "cancel_after_client_done" + "ping" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_invoke" + "ping_pong_streaming" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_invoke" + "registered_call" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_invoke" + "request_with_flags" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_invoke" + "request_with_payload" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "cancel_after_invoke" + "server_finishes_request" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_before_invoke" + "shutdown_finishes_calls" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_before_invoke" + "shutdown_finishes_tags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_before_invoke" + "simple_delayed_request" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_before_invoke" + "simple_metadata" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "cancel_before_invoke" + "simple_request" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_in_a_vacuum" + "trailing_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_census_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_in_a_vacuum" + "bad_hostname" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_in_a_vacuum" + "binary_metadata" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_in_a_vacuum" + "call_creds" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "cancel_in_a_vacuum" + "cancel_after_accept" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_with_status" + "cancel_after_client_done" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_with_status" + "cancel_after_invoke" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_with_status" + "cancel_before_invoke" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_with_status" + "cancel_in_a_vacuum" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, @@ -5008,18 +5140,21 @@ "cancel_with_status" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -5027,834 +5162,949 @@ "compressed_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "compressed_payload" + "connectivity" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "compressed_payload" + "default_host" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "compressed_payload" + "disappearing_server" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "compressed_payload" + "empty_batch" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "connectivity" + "graceful_server_shutdown" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "connectivity" + "high_initial_seqno" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "connectivity" + "hpack_size" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "connectivity" + "invoke_large_request" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "connectivity" + "large_metadata" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "default_host" + "max_concurrent_streams" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "default_host" + "max_message_length" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "default_host" + "negative_deadline" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "default_host" + "no_op" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "default_host" + "payload" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "disappearing_server" + "ping" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "disappearing_server" + "ping_pong_streaming" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "disappearing_server" + "registered_call" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "disappearing_server" + "request_with_flags" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "disappearing_server" + "request_with_payload" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "empty_batch" + "server_finishes_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "empty_batch" + "shutdown_finishes_calls" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "empty_batch" + "shutdown_finishes_tags" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "empty_batch" + "simple_delayed_request" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "empty_batch" + "simple_metadata" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "graceful_server_shutdown" + "simple_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "graceful_server_shutdown" + "trailing_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_compress_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "graceful_server_shutdown" + "bad_hostname" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "graceful_server_shutdown" + "binary_metadata" ], "ci_platforms": [ + "windows", + "linux", "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "graceful_server_shutdown" + "call_creds" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "high_initial_seqno" + "cancel_after_accept" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "high_initial_seqno" + "cancel_after_client_done" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "high_initial_seqno" + "cancel_after_invoke" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "high_initial_seqno" + "cancel_before_invoke" ], "ci_platforms": [ + "windows", + "linux", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "high_initial_seqno" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "hpack_size" + "cancel_with_status" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "hpack_size" + "compressed_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "hpack_size" + "connectivity" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "hpack_size" + "default_host" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "hpack_size" + "disappearing_server" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "invoke_large_request" + "empty_batch" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "invoke_large_request" + "graceful_server_shutdown" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "invoke_large_request" + "high_initial_seqno" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "invoke_large_request" + "hpack_size" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, @@ -5863,18 +6113,20 @@ "invoke_large_request" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -5882,834 +6134,948 @@ "large_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "large_metadata" + "max_concurrent_streams" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "large_metadata" + "max_message_length" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "large_metadata" + "negative_deadline" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "large_metadata" + "no_op" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_concurrent_streams" + "payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_concurrent_streams" + "ping" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_concurrent_streams" + "ping_pong_streaming" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_concurrent_streams" + "registered_call" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "max_concurrent_streams" + "request_with_flags" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "windows" - ] - }, + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ - "max_message_length" + "request_with_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_message_length" + "server_finishes_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_message_length" + "shutdown_finishes_calls" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_message_length" + "shutdown_finishes_tags" ], "ci_platforms": [ + "windows", + "linux", "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "max_message_length" + "simple_delayed_request" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "negative_deadline" + "simple_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "negative_deadline" + "simple_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "negative_deadline" + "trailing_metadata" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_fakesec_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "negative_deadline" + "bad_hostname" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "negative_deadline" + "binary_metadata" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "no_op" + "call_creds" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "no_op" + "cancel_after_accept" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "no_op" + "cancel_after_client_done" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "no_op" + "cancel_after_invoke" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "no_op" + "cancel_before_invoke" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "payload" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "payload" + "cancel_with_status" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "payload" + "compressed_payload" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "payload" + "connectivity" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "payload" + "default_host" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping" + "disappearing_server" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping" + "empty_batch" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping" + "graceful_server_shutdown" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping" + "high_initial_seqno" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "ping" + "hpack_size" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping_pong_streaming" + "invoke_large_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping_pong_streaming" + "large_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping_pong_streaming" + "max_concurrent_streams" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping_pong_streaming" + "max_message_length" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "ping_pong_streaming" + "negative_deadline" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "registered_call" + "no_op" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "registered_call" + "payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "registered_call" + "ping" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "registered_call" + "ping_pong_streaming" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, @@ -6718,18 +7084,21 @@ "registered_call" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -6737,835 +7106,757 @@ "request_with_flags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_flags" + "request_with_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_flags" + "server_finishes_request" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_flags" + "shutdown_finishes_calls" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "request_with_flags" + "shutdown_finishes_tags" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_payload" + "simple_delayed_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_payload" + "simple_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_payload" + "simple_request" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_payload" + "trailing_metadata" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "request_with_payload" + "bad_hostname" ], "ci_platforms": [ - "windows" + "linux" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows" + "linux" ] }, { "args": [ - "server_finishes_request" + "binary_metadata" ], "ci_platforms": [ "linux" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ "linux" ] }, { "args": [ - "server_finishes_request" + "call_creds" ], "ci_platforms": [ "linux" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ "linux" ] }, { "args": [ - "server_finishes_request" + "cancel_after_accept" ], "ci_platforms": [ - "mac" + "linux" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "mac" + "linux" ] }, { "args": [ - "server_finishes_request" + "cancel_after_client_done" ], "ci_platforms": [ - "posix" + "linux" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "posix" + "linux" ] }, { "args": [ - "server_finishes_request" + "cancel_after_invoke" ], "ci_platforms": [ - "windows" + "linux" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows" + "linux" ] }, { "args": [ - "shutdown_finishes_calls" + "cancel_before_invoke" ], "ci_platforms": [ "linux" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ "linux" ] }, { "args": [ - "shutdown_finishes_calls" + "cancel_in_a_vacuum" ], "ci_platforms": [ "linux" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ "linux" ] }, { "args": [ - "shutdown_finishes_calls" + "cancel_with_status" ], "ci_platforms": [ - "mac" + "linux" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "mac" + "linux" ] }, { "args": [ - "shutdown_finishes_calls" + "compressed_payload" ], "ci_platforms": [ - "posix" + "linux" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "posix" + "linux" ] }, { "args": [ - "shutdown_finishes_calls" + "connectivity" ], "ci_platforms": [ - "windows" + "linux" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows" + "linux" ] }, { "args": [ - "shutdown_finishes_tags" + "default_host" ], "ci_platforms": [ "linux" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ "linux" ] }, { "args": [ - "shutdown_finishes_tags" + "disappearing_server" ], "ci_platforms": [ "linux" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ "linux" ] }, { "args": [ - "shutdown_finishes_tags" + "empty_batch" ], "ci_platforms": [ - "mac" + "linux" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "mac" + "linux" ] }, { "args": [ - "shutdown_finishes_tags" + "graceful_server_shutdown" ], "ci_platforms": [ - "posix" + "linux" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "posix" + "linux" ] }, { "args": [ - "shutdown_finishes_tags" + "high_initial_seqno" ], "ci_platforms": [ - "windows" + "linux" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows" + "linux" ] }, { "args": [ - "simple_delayed_request" + "hpack_size" ], "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ "linux" ] }, { "args": [ - "simple_delayed_request" + "invoke_large_request" ], "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ "linux" ] }, { "args": [ - "simple_delayed_request" + "large_metadata" ], "ci_platforms": [ - "mac" + "linux" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "mac" + "linux" ] }, { "args": [ - "simple_delayed_request" + "max_concurrent_streams" ], "ci_platforms": [ - "posix" + "linux" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "posix" + "linux" ] }, { "args": [ - "simple_delayed_request" + "max_message_length" ], "ci_platforms": [ - "windows" + "linux" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows" + "linux" ] }, { "args": [ - "simple_metadata" + "negative_deadline" ], "ci_platforms": [ "linux" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ "linux" ] }, { "args": [ - "simple_metadata" + "no_op" ], "ci_platforms": [ "linux" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ "linux" ] }, { "args": [ - "simple_metadata" + "payload" ], "ci_platforms": [ - "mac" + "linux" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "mac" + "linux" ] }, { "args": [ - "simple_metadata" + "ping" ], "ci_platforms": [ - "posix" + "linux" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "posix" + "linux" ] }, { "args": [ - "simple_metadata" + "ping_pong_streaming" ], "ci_platforms": [ - "windows" + "linux" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows" + "linux" ] }, { "args": [ - "simple_request" + "registered_call" ], "ci_platforms": [ "linux" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ "linux" ] }, { "args": [ - "simple_request" + "request_with_flags" ], "ci_platforms": [ "linux" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ "linux" ] }, { "args": [ - "simple_request" + "request_with_payload" ], "ci_platforms": [ - "mac" + "linux" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "mac" + "linux" ] }, { "args": [ - "simple_request" + "server_finishes_request" ], "ci_platforms": [ - "posix" + "linux" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "posix" + "linux" ] }, { "args": [ - "simple_request" + "shutdown_finishes_calls" ], "ci_platforms": [ - "windows" + "linux" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows" + "linux" ] }, { "args": [ - "trailing_metadata" + "shutdown_finishes_tags" ], "ci_platforms": [ "linux" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ "linux" ] }, { "args": [ - "trailing_metadata" + "simple_delayed_request" ], "ci_platforms": [ "linux" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ "linux" ] }, { "args": [ - "trailing_metadata" + "simple_metadata" ], "ci_platforms": [ - "mac" + "linux" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "mac" + "linux" ] }, { "args": [ - "trailing_metadata" + "simple_request" ], "ci_platforms": [ - "posix" + "linux" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "posix" + "linux" ] }, { @@ -7573,18 +7864,15 @@ "trailing_metadata" ], "ci_platforms": [ - "windows" + "linux" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_test", + "name": "h2_full+pipe_test", "platforms": [ - "windows" + "linux" ] }, { @@ -7592,30209 +7880,986 @@ "bad_hostname" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_oauth2_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "bad_hostname" + "binary_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_oauth2_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "bad_hostname" + "call_creds" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_oauth2_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "bad_hostname" + "cancel_after_accept" ], "ci_platforms": [ + "windows", + "linux", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_oauth2_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "bad_hostname" + "cancel_after_client_done" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_oauth2_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "binary_metadata" + "cancel_after_invoke" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_oauth2_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "binary_metadata" + "cancel_before_invoke" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_oauth2_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "binary_metadata" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_oauth2_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "binary_metadata" + "cancel_with_status" ], "ci_platforms": [ + "windows", + "linux", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_oauth2_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "binary_metadata" + "compressed_payload" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_oauth2_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "call_creds" + "connectivity" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_oauth2_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "call_creds" + "default_host" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_oauth2_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "call_creds" + "disappearing_server" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_oauth2_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "call_creds" + "empty_batch" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_oauth2_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "call_creds" + "graceful_server_shutdown" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_test", + "name": "h2_oauth2_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_accept" + "high_initial_seqno" ], "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_fakesec_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair+trace_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "request_with_flags" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_before_invoke" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_in_a_vacuum" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "cancel_with_status" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "graceful_server_shutdown" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "invoke_large_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "large_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "max_message_length" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "negative_deadline" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "ping_pong_streaming" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "registered_call" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "server_finishes_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "shutdown_finishes_calls" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "shutdown_finishes_tags" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "simple_request" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "trailing_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_proxy_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uchannel_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uchannel_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uchannel_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uchannel_test", - "platforms": [ - "posix" - ] - }, - { - "args": [ - "bad_hostname" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uchannel_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uchannel_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uchannel_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uchannel_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "posix" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uchannel_test", - "platforms": [ + "windows", + "linux", "posix" - ] - }, - { - "args": [ - "binary_metadata" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uchannel_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "call_creds" - ], - "ci_platforms": [ - "linux" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_oauth2_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "call_creds" + "hpack_size" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_oauth2_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "call_creds" + "invoke_large_request" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_oauth2_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "call_creds" + "large_metadata" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_oauth2_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "call_creds" + "max_concurrent_streams" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uchannel_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uchannel_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uchannel_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_oauth2_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_accept" + "max_message_length" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_oauth2_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "cancel_after_accept" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uchannel_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uchannel_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uchannel_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "mac" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uchannel_test", - "platforms": [ - "mac" - ] - }, - { - "args": [ - "cancel_after_client_done" + "negative_deadline" ], "ci_platforms": [ + "windows", + "linux", "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_oauth2_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "cancel_after_client_done" - ], - "ci_platforms": [ - "windows" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uchannel_test", - "platforms": [ - "windows" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uchannel_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_uchannel_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "cancel_after_invoke" + "no_op" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_oauth2_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_invoke" + "payload" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_oauth2_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "cancel_after_invoke" + "ping" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_oauth2_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_before_invoke" + "ping_pong_streaming" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_oauth2_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_before_invoke" + "registered_call" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_oauth2_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_before_invoke" + "request_with_flags" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_oauth2_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_before_invoke" + "request_with_payload" ], "ci_platforms": [ + "windows", + "linux", "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_oauth2_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "cancel_before_invoke" + "server_finishes_request" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_oauth2_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_in_a_vacuum" + "shutdown_finishes_calls" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_oauth2_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_in_a_vacuum" + "shutdown_finishes_tags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_oauth2_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_in_a_vacuum" + "simple_delayed_request" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_oauth2_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_in_a_vacuum" + "simple_metadata" ], "ci_platforms": [ + "windows", + "linux", "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_oauth2_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "cancel_in_a_vacuum" + "simple_request" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_oauth2_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_with_status" + "trailing_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_oauth2_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_with_status" + "bad_hostname" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_with_status" + "binary_metadata" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_with_status" + "call_creds" ], "ci_platforms": [ + "windows", + "linux", "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "cancel_with_status" + "cancel_after_accept" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "compressed_payload" + "cancel_after_client_done" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "compressed_payload" + "cancel_after_invoke" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "compressed_payload" + "cancel_before_invoke" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "compressed_payload" + "cancel_in_a_vacuum" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "compressed_payload" + "cancel_with_status" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "empty_batch" + "default_host" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "empty_batch" + "disappearing_server" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -37802,683 +8867,755 @@ "empty_batch" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "empty_batch" + "graceful_server_shutdown" ], "ci_platforms": [ + "windows", + "linux", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "empty_batch" + "high_initial_seqno" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "graceful_server_shutdown" + "invoke_large_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "graceful_server_shutdown" + "large_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "graceful_server_shutdown" + "max_message_length" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "graceful_server_shutdown" + "negative_deadline" ], "ci_platforms": [ + "windows", + "linux", "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "graceful_server_shutdown" + "no_op" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "high_initial_seqno" + "payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "high_initial_seqno" + "ping_pong_streaming" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "high_initial_seqno" + "registered_call" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "high_initial_seqno" + "request_with_payload" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "high_initial_seqno" + "server_finishes_request" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "hpack_size" + "shutdown_finishes_calls" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "hpack_size" + "shutdown_finishes_tags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "hpack_size" + "simple_delayed_request" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "hpack_size" + "simple_metadata" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "hpack_size" + "simple_request" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "invoke_large_request" + "trailing_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "invoke_large_request" + "bad_hostname" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "invoke_large_request" + "binary_metadata" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "invoke_large_request" + "call_creds" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "invoke_large_request" + "cancel_after_accept" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "large_metadata" + "cancel_after_client_done" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "large_metadata" + "cancel_after_invoke" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "large_metadata" + "cancel_before_invoke" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "large_metadata" + "cancel_in_a_vacuum" ], "ci_platforms": [ + "windows", + "linux", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "large_metadata" + "cancel_with_status" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_concurrent_streams" + "compressed_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_concurrent_streams" + "empty_batch" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_concurrent_streams" + "graceful_server_shutdown" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_concurrent_streams" + "high_initial_seqno" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "max_concurrent_streams" + "hpack_size" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_message_length" + "invoke_large_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_message_length" + "large_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_message_length" + "max_concurrent_streams" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -38486,721 +9623,821 @@ "max_message_length" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "max_message_length" + "negative_deadline" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "negative_deadline" + "no_op" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "negative_deadline" + "payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "negative_deadline" + "ping_pong_streaming" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "negative_deadline" + "registered_call" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "negative_deadline" + "request_with_flags" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "no_op" + "request_with_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "no_op" + "server_finishes_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "no_op" + "shutdown_finishes_calls" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "no_op" + "shutdown_finishes_tags" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "no_op" + "simple_metadata" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "payload" + "simple_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "payload" + "trailing_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "payload" + "bad_hostname" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "payload" + "binary_metadata" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "payload" + "call_creds" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping_pong_streaming" + "cancel_after_accept" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping_pong_streaming" + "cancel_after_client_done" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping_pong_streaming" + "cancel_after_invoke" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping_pong_streaming" + "cancel_before_invoke" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "ping_pong_streaming" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "registered_call" + "cancel_with_status" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "registered_call" + "compressed_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "registered_call" + "empty_batch" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "registered_call" + "graceful_server_shutdown" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "registered_call" + "high_initial_seqno" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_flags" + "invoke_large_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_flags" + "large_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_flags" + "max_concurrent_streams" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_flags" + "max_message_length" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "request_with_flags" + "negative_deadline" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_payload" + "no_op" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_payload" + "payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_payload" + "ping_pong_streaming" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_payload" + "registered_call" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "request_with_payload" + "request_with_flags" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "server_finishes_request" + "request_with_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -39208,740 +10445,826 @@ "server_finishes_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "server_finishes_request" + "shutdown_finishes_calls" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "server_finishes_request" + "shutdown_finishes_tags" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "server_finishes_request" + "simple_metadata" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "shutdown_finishes_calls" + "simple_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "shutdown_finishes_calls" + "trailing_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "shutdown_finishes_calls" + "bad_hostname" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "shutdown_finishes_calls" + "binary_metadata" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "shutdown_finishes_calls" + "call_creds" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "shutdown_finishes_tags" + "cancel_after_accept" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "shutdown_finishes_tags" + "cancel_after_client_done" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "shutdown_finishes_tags" + "cancel_after_invoke" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "shutdown_finishes_tags" + "cancel_before_invoke" ], "ci_platforms": [ + "windows", + "linux", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "shutdown_finishes_tags" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "simple_metadata" + "cancel_with_status" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "simple_metadata" + "compressed_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "simple_metadata" + "empty_batch" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "simple_metadata" + "graceful_server_shutdown" ], "ci_platforms": [ + "windows", + "linux", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "simple_metadata" + "high_initial_seqno" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "simple_request" + "hpack_size" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "simple_request" + "invoke_large_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "simple_request" + "large_metadata" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "simple_request" + "max_concurrent_streams" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "simple_request" + "max_message_length" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "trailing_metadata" + "negative_deadline" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "trailing_metadata" + "no_op" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "trailing_metadata" + "payload" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "trailing_metadata" + "ping_pong_streaming" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "trailing_metadata" + "registered_call" ], "ci_platforms": [ - "windows" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "all" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uchannel_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "windows" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "bad_hostname" + "request_with_flags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "bad_hostname" + "request_with_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "bad_hostname" + "server_finishes_request" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "bad_hostname" + "shutdown_finishes_calls" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "binary_metadata" + "shutdown_finishes_tags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "binary_metadata" + "simple_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "binary_metadata" + "simple_request" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "binary_metadata" + "trailing_metadata" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_sockpair_1byte_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "call_creds" + "bad_hostname" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "call_creds" + "binary_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -39949,892 +11272,1020 @@ "call_creds" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "call_creds" + "cancel_after_accept" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "cancel_after_accept" + "cancel_after_client_done" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_accept" + "cancel_after_invoke" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_accept" + "cancel_before_invoke" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_accept" + "cancel_in_a_vacuum" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "cancel_after_client_done" + "cancel_with_status" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_client_done" + "compressed_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_client_done" + "connectivity" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_client_done" + "default_host" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "cancel_after_invoke" + "disappearing_server" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_invoke" + "empty_batch" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_invoke" + "graceful_server_shutdown" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_invoke" + "high_initial_seqno" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "cancel_before_invoke" + "hpack_size" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_before_invoke" + "invoke_large_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_before_invoke" + "large_metadata" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_before_invoke" + "max_concurrent_streams" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "cancel_in_a_vacuum" + "max_message_length" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_in_a_vacuum" + "negative_deadline" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_in_a_vacuum" + "no_op" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_in_a_vacuum" + "payload" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "cancel_with_status" + "ping" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_with_status" + "ping_pong_streaming" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_with_status" + "registered_call" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_with_status" + "request_with_flags" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "compressed_payload" + "request_with_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "compressed_payload" + "server_finishes_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "compressed_payload" + "shutdown_finishes_calls" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "compressed_payload" + "shutdown_finishes_tags" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "connectivity" + "simple_delayed_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "connectivity" + "simple_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "connectivity" + "simple_request" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "connectivity" + "trailing_metadata" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "disappearing_server" + "bad_hostname" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "disappearing_server" + "binary_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "disappearing_server" + "call_creds" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "disappearing_server" + "cancel_after_accept" ], "ci_platforms": [ + "windows", + "linux", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "empty_batch" + "cancel_after_client_done" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "empty_batch" + "cancel_after_invoke" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "empty_batch" + "cancel_before_invoke" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "empty_batch" + "cancel_in_a_vacuum" ], "ci_platforms": [ + "windows", + "linux", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "graceful_server_shutdown" + "cancel_with_status" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "graceful_server_shutdown" + "default_host" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "graceful_server_shutdown" + "disappearing_server" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "graceful_server_shutdown" + "empty_batch" ], "ci_platforms": [ + "windows", + "linux", "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "high_initial_seqno" + "graceful_server_shutdown" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -40842,1557 +12293,1718 @@ "high_initial_seqno" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "high_initial_seqno" + "invoke_large_request" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "high_initial_seqno" + "large_metadata" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "hpack_size" + "max_message_length" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "hpack_size" + "negative_deadline" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "hpack_size" + "no_op" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "hpack_size" + "payload" ], "ci_platforms": [ + "windows", + "linux", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "invoke_large_request" + "ping_pong_streaming" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "invoke_large_request" + "registered_call" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "invoke_large_request" + "request_with_payload" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "invoke_large_request" + "server_finishes_request" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "large_metadata" + "shutdown_finishes_calls" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "large_metadata" + "shutdown_finishes_tags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "large_metadata" + "simple_delayed_request" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "large_metadata" + "simple_metadata" ], "ci_platforms": [ + "windows", + "linux", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "max_concurrent_streams" + "simple_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_concurrent_streams" + "trailing_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_concurrent_streams" + "bad_hostname" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_concurrent_streams" + "binary_metadata" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "max_message_length" + "call_creds" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_message_length" + "cancel_after_accept" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_message_length" + "cancel_after_client_done" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "max_message_length" + "cancel_after_invoke" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "negative_deadline" + "cancel_before_invoke" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "negative_deadline" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "negative_deadline" + "cancel_with_status" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "negative_deadline" + "compressed_payload" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "no_op" + "empty_batch" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "no_op" + "graceful_server_shutdown" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "no_op" + "high_initial_seqno" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "no_op" + "hpack_size" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "payload" + "invoke_large_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "payload" + "large_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "payload" + "max_concurrent_streams" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "payload" + "max_message_length" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "ping" + "negative_deadline" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping" + "no_op" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping" + "payload" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping" + "ping_pong_streaming" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "ping_pong_streaming" + "registered_call" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping_pong_streaming" + "request_with_flags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping_pong_streaming" + "request_with_payload" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "ping_pong_streaming" + "server_finishes_request" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "registered_call" + "shutdown_finishes_calls" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "registered_call" + "shutdown_finishes_tags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "registered_call" + "simple_metadata" ], "ci_platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "mac" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "registered_call" + "simple_request" ], "ci_platforms": [ + "windows", + "linux", + "mac", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ + "windows", + "linux", + "mac", "posix" ] }, { "args": [ - "request_with_flags" + "trailing_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_uchannel_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_flags" + "bad_hostname" ], "ci_platforms": [ - "linux" + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux" + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_flags" + "binary_metadata" ], "ci_platforms": [ - "mac" + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "mac" + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_flags" + "call_creds" ], "ci_platforms": [ + "linux", + "mac", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ + "linux", + "mac", "posix" ] }, { "args": [ - "request_with_payload" + "cancel_after_accept" ], "ci_platforms": [ - "linux" + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux" + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_payload" + "cancel_after_client_done" ], "ci_platforms": [ - "linux" + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux" + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_payload" + "cancel_after_invoke" ], "ci_platforms": [ - "mac" + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "mac" + "linux", + "mac", + "posix" ] }, { "args": [ - "request_with_payload" + "cancel_before_invoke" ], "ci_platforms": [ + "linux", + "mac", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ + "linux", + "mac", "posix" ] }, { "args": [ - "server_finishes_request" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "linux" + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux" + "linux", + "mac", + "posix" ] }, { "args": [ - "server_finishes_request" + "cancel_with_status" ], "ci_platforms": [ - "linux" + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux" + "linux", + "mac", + "posix" ] }, { "args": [ - "server_finishes_request" + "compressed_payload" ], "ci_platforms": [ - "mac" + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "mac" + "linux", + "mac", + "posix" ] }, { "args": [ - "server_finishes_request" + "connectivity" ], "ci_platforms": [ + "linux", + "mac", "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ + "linux", + "mac", "posix" ] }, { "args": [ - "shutdown_finishes_calls" + "disappearing_server" ], "ci_platforms": [ - "linux" + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux" + "linux", + "mac", + "posix" ] }, { "args": [ - "shutdown_finishes_calls" + "empty_batch" ], "ci_platforms": [ - "linux" + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux" + "linux", + "mac", + "posix" ] }, { "args": [ - "shutdown_finishes_calls" + "graceful_server_shutdown" ], "ci_platforms": [ - "mac" + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "mac" + "linux", + "mac", + "posix" ] }, { "args": [ - "shutdown_finishes_calls" + "high_initial_seqno" ], "ci_platforms": [ + "linux", + "mac", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ + "linux", + "mac", "posix" ] }, { "args": [ - "shutdown_finishes_tags" + "hpack_size" ], "ci_platforms": [ - "linux" + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux" + "linux", + "mac", + "posix" ] }, { "args": [ - "shutdown_finishes_tags" + "invoke_large_request" ], "ci_platforms": [ - "linux" + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux" + "linux", + "mac", + "posix" ] }, { "args": [ - "shutdown_finishes_tags" + "large_metadata" ], "ci_platforms": [ - "mac" + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "mac" + "linux", + "mac", + "posix" ] }, { "args": [ - "shutdown_finishes_tags" + "max_concurrent_streams" ], "ci_platforms": [ + "linux", + "mac", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ + "linux", + "mac", "posix" ] }, { "args": [ - "simple_delayed_request" + "max_message_length" ], "ci_platforms": [ - "linux" + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux" + "linux", + "mac", + "posix" ] }, { "args": [ - "simple_delayed_request" + "negative_deadline" ], "ci_platforms": [ - "linux" + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux" + "linux", + "mac", + "posix" ] }, { "args": [ - "simple_delayed_request" + "no_op" ], "ci_platforms": [ - "mac" + "linux", + "mac", + "posix" ], - "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "mac" + "linux", + "mac", + "posix" ] }, { "args": [ - "simple_delayed_request" + "payload" ], "ci_platforms": [ + "linux", + "mac", "posix" ], "cpu_cost": 0.1, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ + "linux", + "mac", "posix" ] }, { "args": [ - "simple_metadata" + "ping" ], "ci_platforms": [ - "linux" + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux" + "linux", + "mac", + "posix" ] }, { "args": [ - "simple_metadata" + "ping_pong_streaming" ], "ci_platforms": [ - "linux" + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux" + "linux", + "mac", + "posix" ] }, { "args": [ - "simple_metadata" + "registered_call" ], "ci_platforms": [ - "mac" + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "mac" + "linux", + "mac", + "posix" ] }, { "args": [ - "simple_metadata" + "request_with_flags" ], "ci_platforms": [ + "linux", + "mac", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ + "linux", + "mac", "posix" ] }, { "args": [ - "simple_request" + "request_with_payload" ], "ci_platforms": [ - "linux" + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux" + "linux", + "mac", + "posix" ] }, { "args": [ - "simple_request" + "server_finishes_request" ], "ci_platforms": [ - "linux" + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux" + "linux", + "mac", + "posix" ] }, { "args": [ - "simple_request" + "shutdown_finishes_calls" ], "ci_platforms": [ - "mac" + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "mac" + "linux", + "mac", + "posix" ] }, { "args": [ - "simple_request" + "shutdown_finishes_tags" ], "ci_platforms": [ + "linux", + "mac", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ + "linux", + "mac", "posix" ] }, { "args": [ - "trailing_metadata" + "simple_delayed_request" ], "ci_platforms": [ - "linux" + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux" + "linux", + "mac", + "posix" ] }, { "args": [ - "trailing_metadata" + "simple_metadata" ], "ci_platforms": [ - "linux" + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "legacy" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "linux" + "linux", + "mac", + "posix" ] }, { "args": [ - "trailing_metadata" + "simple_request" ], "ci_platforms": [ - "mac" + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ - "mac" + "linux", + "mac", + "posix" ] }, { @@ -42400,17 +14012,18 @@ "trailing_metadata" ], "ci_platforms": [ + "linux", + "mac", "posix" ], "cpu_cost": 1.0, - "env": { - "GRPC_POLL_STRATEGY": "poll" - }, "exclude_configs": [], "flaky": false, "language": "c", "name": "h2_uds_test", "platforms": [ + "linux", + "mac", "posix" ] }, From e6dd0cb9f7233822fae6986b3e39d0ee6c825db9 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 26 Feb 2016 14:39:35 -0800 Subject: [PATCH 0009/1894] Revert unnecessary change --- src/core/iomgr/ev_poll_and_epoll_posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/iomgr/ev_poll_and_epoll_posix.c b/src/core/iomgr/ev_poll_and_epoll_posix.c index a1e0442a42f..ead99b1497f 100644 --- a/src/core/iomgr/ev_poll_and_epoll_posix.c +++ b/src/core/iomgr/ev_poll_and_epoll_posix.c @@ -1879,8 +1879,8 @@ static void pollset_set_del_fd(grpc_exec_ctx *exec_ctx, */ static void shutdown_engine(void) { - pollset_global_shutdown(); fd_global_shutdown(); + pollset_global_shutdown(); } static const grpc_event_engine_vtable vtable = { From c31256537045f1ad45bda9b8bbbdfad7f64f4607 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 26 Feb 2016 14:56:35 -0800 Subject: [PATCH 0010/1894] Fix crash --- src/core/iomgr/ev_posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/iomgr/ev_posix.c b/src/core/iomgr/ev_posix.c index fbfa13c3479..0c0c9be9ad5 100644 --- a/src/core/iomgr/ev_posix.c +++ b/src/core/iomgr/ev_posix.c @@ -132,7 +132,7 @@ void grpc_event_engine_init(void) { } } -void grpc_event_engine_shutdown(void) { g_event_engine->shutdown_engine(); } +void grpc_event_engine_shutdown(void) { g_event_engine->shutdown_engine(); g_event_engine = NULL; } grpc_fd *grpc_fd_create(int fd, const char *name) { return g_event_engine->fd_create(fd, name); From 334db35498fbe69a1f272880073ee4052df1009c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 26 Feb 2016 15:19:49 -0800 Subject: [PATCH 0011/1894] Fix runtests --- tools/run_tests/run_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 106f6bea390..b8a7f476bf2 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -192,7 +192,7 @@ class CLanguage(object): test = base + line.strip() cmdline = [binary] + ['--gtest_filter=%s' % test] out.append(self.config.job_spec(cmdline, [binary], - shortname='%s:%s' % (binary, test, shortname_ext), + shortname='%s:%s %s' % (binary, test, shortname_ext), cpu_cost=target['cpu_cost'], environ=env)) else: From 88e0bb1b34d210a5def7164ed4a7cc66824df69d Mon Sep 17 00:00:00 2001 From: Paul Querna Date: Thu, 3 Mar 2016 23:42:17 -0800 Subject: [PATCH 0012/1894] Update Podfile for CocoaPods 1.0 changes requiring more fields and the removal of link_with in podspec. --- src/objective-c/tests/Podfile | 22 ++++++++++--------- .../tests/RemoteTestClient/RemoteTest.podspec | 4 ++++ 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile index 7ec7a258982..30725a0f781 100644 --- a/src/objective-c/tests/Podfile +++ b/src/objective-c/tests/Podfile @@ -1,31 +1,33 @@ source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' -pod 'Protobuf', :path => "../../../third_party/protobuf" -pod 'BoringSSL', :podspec => ".." -pod 'gRPC', :path => "../../.." -pod 'RemoteTest', :path => "RemoteTestClient" - -link_with 'AllTests', - 'RxLibraryUnitTests', - 'InteropTests', - 'InteropTestsLocalSSL', - 'InteropTestsLocalCleartext' +def shared_pods + pod 'Protobuf', :path => "../../../third_party/protobuf" + pod 'BoringSSL', :podspec => ".." + pod 'gRPC', :path => "../../.." + pod 'RemoteTest', :path => "RemoteTestClient" +end target 'Tests' do + shared_pods end target 'AllTests' do + shared_pods end target 'RxLibraryUnitTests' do + shared_pods end target 'InteropTestsRemote' do + shared_pods end target 'InteropTestsLocalSSL' do + shared_pods end target 'InteropTestsLocalCleartext' do + shared_pods end diff --git a/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec b/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec index 6ecef0593b7..e1fd9910389 100644 --- a/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec +++ b/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec @@ -2,6 +2,10 @@ Pod::Spec.new do |s| s.name = "RemoteTest" s.version = "0.0.1" s.license = "New BSD" + s.authors = { 'gRPC contributors' => 'grpc-io@googlegroups.com' } + s.homepage = "http://www.grpc.io/" + s.summary = "RemoteTest example" + s.source = { :git => 'https://github.com/grpc/grpc.git' } s.ios.deployment_target = '7.1' s.osx.deployment_target = '10.9' From aed11dd7562fd689f11723e5d2385e1c6dcf7197 Mon Sep 17 00:00:00 2001 From: Paul Querna Date: Fri, 4 Mar 2016 08:21:58 -0800 Subject: [PATCH 0013/1894] Update cocoapods in travis to 1.0.0beta4 --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index 004d44f3a55..feee271383b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -6,6 +6,7 @@ env: - TEST=objc - JOBS=1 before_install: + - gem install cocoapods -v '1.0.0.beta.4' - brew install gflags # Pod install does this too, but we don't want the output. - pod repo update --silent From 8ee9c7e85c502d3716e256176fce6942fb26b2c0 Mon Sep 17 00:00:00 2001 From: Paul Querna Date: Fri, 4 Mar 2016 09:00:29 -0800 Subject: [PATCH 0014/1894] print cocoapods version before pod install --- .travis.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.travis.yml b/.travis.yml index feee271383b..1966d30f74d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -15,6 +15,7 @@ install: - pushd src/objective-c/tests # Needs to be verbose, or otherwise OpenSSL's prepare_command makes Travis # time out: + - pod --version - pod install --verbose - popd before_script: From 3165ff3d95d46e3e8f091bc64ad88e7e52dd8a65 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 8 Mar 2016 00:53:53 -0800 Subject: [PATCH 0015/1894] Added compression spec --- doc/PROTOCOL-HTTP2.md | 4 +- doc/compression.md | 105 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 107 insertions(+), 2 deletions(-) create mode 100644 doc/compression.md diff --git a/doc/PROTOCOL-HTTP2.md b/doc/PROTOCOL-HTTP2.md index 357ea72571b..31d694b803d 100644 --- a/doc/PROTOCOL-HTTP2.md +++ b/doc/PROTOCOL-HTTP2.md @@ -38,7 +38,7 @@ Request-Headers are delivered as HTTP2 headers in HEADERS + CONTINUATION frames. * **Nanosecond** → "n" * **Content-Type** → "content-type" "application/grpc" [("+proto" / "+json" / {_custom_})] * **Content-Coding** → "identity" / "gzip" / "deflate" / "snappy" / {_custom_} -* **Message-Encoding** → "grpc-encoding" Content-Coding +* **Message-Encoding** → "grpc-encoding" Content-Coding * **Message-Accept-Encoding** → "grpc-accept-encoding" Content-Coding \*("," Content-Coding) * **User-Agent** → "user-agent" {_structured user-agent string_} * **Message-Type** → "grpc-message-type" {_type name for message schema_} @@ -83,7 +83,7 @@ binary values' lengths being post-Base64. The repeated sequence of **Length-Prefixed-Message** items is delivered in DATA frames * **Length-Prefixed-Message** → Compressed-Flag Message-Length Message -* **Compressed-Flag** → 0 / 1 # encoded as 1 byte unsigned integer +* **Compressed-Flag** → 0 / 1 # encoded as 1 byte unsigned integer * **Message-Length** → {_length of Message_} # encoded as 4 byte unsigned integer * **Message** → \*{binary octet} diff --git a/doc/compression.md b/doc/compression.md new file mode 100644 index 00000000000..ddbbff1c541 --- /dev/null +++ b/doc/compression.md @@ -0,0 +1,105 @@ +## **gRPC Compression** + +The keywords "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", +"SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be +interpreted as described in [RFC 2119](http://www.ietf.org/rfc/rfc2119.txt). + +### Intent + +Compression is used to reduce the amount of bandwidth used between peers. The +compression supported by gRPC acts _at the individual message level_, taking +_message_ [as defined in the wire format +document](PROTOCOL-HTTP2.md). + +The implementation supports different compression algorithms. A _default +compression level_, to be used in the absence of message-specific settings, MAY +be specified for during channel creation. + +The ability to control compression settings per call and to enable/disable +compression on a per message basis MAY be used to prevent CRIME/BEAST attacks. +It also allows for asymmetric compression communication, whereby a response MAY +be compressed differently, if at all. + +### Specification + +Compression MAY be configured by the Client Application by calling the +appropriate API method. There are two scenarios where compression MAY be +configured: + ++ At channel creation time, which sets the channel default compression and + therefore the compression that SHALL be used in the absence of per-RPC + compression configuration. ++ At response time, via: + + For unary RPCs, the {Client,Server}Context instance. + + For streaming RPCs, the {Client,Server}Writer instance. In this case, + configuration is reduced to disabling compression altogether. + +### Compression Method Asymmetry Between Peers + +A gRPC peer MAY choose to respond using a different compression method to that +of the request, including not performing any compression, regardless of channel +and RPC settings (for example, if compression would result in small or negative +gains). + +A compressed message from a client with an algorithm unsupported by a server, +WILL result in an INVALID\_ARGUMENT error, alongside the receiving peer's +`grpc-accept-encoding` header specifying the algorithms it accepts. If an +INTERNAL error is returned from the server despite having used one of the +algorithms from the `grpc-accept-encoding h`eader, the cause MUST NOT be related +to compression. Data sent from a server compressed with an algorithm not +supported by the client will also result in an INTERNAL error. + +Note that a peer MAY choose to not disclose all the encodings it supports. +However, if it receives a message compressed in an undisclosed but supported +encoding, it MUST include said encoding in the response's `grpc-accept-encoding +h`eader. + +For every message a server is requested to compress using an algorithm it knows +the client doesn't support (as indicated by the last `grpc-accept-encoding` +header received from the client), it SHALL send the message uncompressed. + +### Specific Disabling of Compression + +If the user (through the previously described mechanisms) requests to disable +compression the next message MUST be sent uncompressed. This is instrumental in +preventing BEAST/CRIME attacks. This applies to both the the unary and streaming +cases. + +### Compression Levels and Algorithms + +We currently (as of July 2015) support _gzip_ and _deflate_ as algorithms (with +the possible future addition of snappy). In order to simplify the public API, +it's intended to abstract the algorithms as _compression levels_ (such as "low", +"medium", "high") that'd map to concrete algorithms and/or their settings (such +as "low" mapping to "gzip -3" and "high" mapping to "gzip -9"). However, we +can't presently (July 2015) implement said compression levels at the client side +without either a initial negotiation of capabilities or an automatic retry +mechanism. Therefore, compression levels are only supported at the server side, +which is aware of the client's capabilities by virtue of the incoming +Message-Accept-Encoding header. + +### Propagation to child RPCs + +The inheritance of the compression configuration by child RPCs is left up to the +implementation. Note that in the absence of changes to the parent channel, its +configuration will be used. + +### Test cases + +1. When a compression level is not specified for either the channel or the +message, the default channel level _none_ is considered: data MUST NOT be +compressed. +1. When per-RPC compression configuration isn't present for a message, the +channel compression configuration MUST be used. +1. When a compression method (including no compression) is specified for an +outgoing message, the message MUST be compressed accordingly. +1. A message compressed in a way not supported by its endpoint MUST fail with +INVALID\_ARGUMENT status, its associated description indicating the unsupported +condition as well as the supported ones. The returned `grpc-accept-encoding` +header MUST NOT contain the compression method (encoding) used. +1. An ill-constructed message with its [Compressed-Flag +bit](PROTOCOL-HTTP2.md#compressed-flag) +set but lacking a +"[grpc-encoding](PROTOCOL-HTTP2.md#message-encoding)" +entry different from _identity_ in its metadata MUST fail with INTERNAL status, +its associated description indicating the invalid Compressed-Flag condition. From 2fad50d214b1b394c3b1a9f0d0ad9af1256c20b3 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 8 Mar 2016 07:52:42 -0800 Subject: [PATCH 0016/1894] Port forward changes --- src/core/iomgr/ev_poll_and_epoll_posix.c | 2 +- src/core/iomgr/ev_poll_posix.c | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/core/iomgr/ev_poll_and_epoll_posix.c b/src/core/iomgr/ev_poll_and_epoll_posix.c index 080f22396ac..fd554107bf0 100644 --- a/src/core/iomgr/ev_poll_and_epoll_posix.c +++ b/src/core/iomgr/ev_poll_and_epoll_posix.c @@ -1336,7 +1336,7 @@ static void multipoll_with_poll_pollset_maybe_work_and_unlock( for (i = 2; i < pfd_count; i++) { grpc_fd *fd = watchers[i].fd; - pfds[i].events = (short)grpc_fd_begin_poll(fd, pollset, worker, POLLIN, + pfds[i].events = (short)fd_begin_poll(fd, pollset, worker, POLLIN, POLLOUT, &watchers[i]); GRPC_FD_UNREF(fd, "multipoller_start"); } diff --git a/src/core/iomgr/ev_poll_posix.c b/src/core/iomgr/ev_poll_posix.c index 8878aa61bca..5cc5bc3c68f 100644 --- a/src/core/iomgr/ev_poll_posix.c +++ b/src/core/iomgr/ev_poll_posix.c @@ -877,6 +877,7 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, } else { pollset->fds[fd_count++] = pollset->fds[i]; watchers[pfd_count].fd = pollset->fds[i]; + GRPC_FD_REF(watchers[pfd_count].fd, "multipoller_start"); pfds[pfd_count].fd = pollset->fds[i]->fd; pfds[pfd_count].revents = 0; pfd_count++; @@ -890,8 +891,10 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, gpr_mu_unlock(&pollset->mu); for (i = 2; i < pfd_count; i++) { - pfds[i].events = (short)fd_begin_poll(watchers[i].fd, pollset, &worker, - POLLIN, POLLOUT, &watchers[i]); + grpc_fd *fd = watchers[i].fd; + pfds[i].events = (short)fd_begin_poll(fd, pollset, &worker, POLLIN, + POLLOUT, &watchers[i]); + GRPC_FD_UNREF(fd, "multipoller_start"); } /* TODO(vpai): Consider first doing a 0 timeout poll here to avoid From 75743efcfc96fdeb78695ecb6480b936e17d6659 Mon Sep 17 00:00:00 2001 From: Chris Bacon Date: Mon, 14 Mar 2016 15:10:44 +0000 Subject: [PATCH 0017/1894] Make flags field readonly --- src/csharp/Grpc.Core/WriteOptions.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/csharp/Grpc.Core/WriteOptions.cs b/src/csharp/Grpc.Core/WriteOptions.cs index 7523ada84a8..4c9706d966f 100644 --- a/src/csharp/Grpc.Core/WriteOptions.cs +++ b/src/csharp/Grpc.Core/WriteOptions.cs @@ -1,6 +1,6 @@ #region Copyright notice and license -// Copyright 2015, Google Inc. +// Copyright 2015-2016, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -64,7 +64,7 @@ namespace Grpc.Core /// public static readonly WriteOptions Default = new WriteOptions(); - private WriteFlags flags; + private readonly WriteFlags flags; /// /// Initializes a new instance of WriteOptions class. From e73e9e1a98600dfbf405c9bcbbfdcd4bd05d78f4 Mon Sep 17 00:00:00 2001 From: Christian Svensson Date: Thu, 10 Mar 2016 17:04:11 +0100 Subject: [PATCH 0018/1894] Allow directly specifiying connection path Make insecure_channel / secure_channel accept port=None and only use the 'host' argument. This enables using UNIX sockets without mangling the path of the socket. Signed-off-by: Christian Svensson --- src/python/grpcio/grpc/beta/implementations.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/python/grpcio/grpc/beta/implementations.py b/src/python/grpcio/grpc/beta/implementations.py index a0ca330d2c0..6f1ca2bb5ed 100644 --- a/src/python/grpcio/grpc/beta/implementations.py +++ b/src/python/grpcio/grpc/beta/implementations.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -187,12 +187,13 @@ def insecure_channel(host, port): Args: host: The name of the remote host to which to connect. port: The port of the remote host to which to connect. + If None only the 'host' part will be used. Returns: A Channel to the remote host through which RPCs may be conducted. """ intermediary_low_channel = _intermediary_low.Channel( - '%s:%d' % (host, port), None) + '%s:%d' % (host, port) if port else host, None) return Channel(intermediary_low_channel._internal, intermediary_low_channel) # pylint: disable=protected-access @@ -202,13 +203,15 @@ def secure_channel(host, port, channel_credentials): Args: host: The name of the remote host to which to connect. port: The port of the remote host to which to connect. + If None only the 'host' part will be used. channel_credentials: A ChannelCredentials. Returns: A secure Channel to the remote host through which RPCs may be conducted. """ intermediary_low_channel = _intermediary_low.Channel( - '%s:%d' % (host, port), channel_credentials._low_credentials) + '%s:%d' % (host, port) if port else host, + channel_credentials._low_credentials) return Channel(intermediary_low_channel._internal, intermediary_low_channel) # pylint: disable=protected-access From 45b135e2f56ade45ecb9e6dc040edda595eb99c0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 22 Mar 2016 16:02:39 -0700 Subject: [PATCH 0019/1894] Bring chttp2 executor code back up to compiling --- src/core/transport/chttp2/internal.h | 29 +- src/core/transport/chttp2_transport.c | 479 ++++++++++++-------------- 2 files changed, 240 insertions(+), 268 deletions(-) diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index c2977c7b3f1..7489cc67fbc 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -291,9 +291,13 @@ struct grpc_chttp2_transport_parsing { int64_t outgoing_window; }; +typedef void (*grpc_chttp2_locked_action)(grpc_exec_ctx *ctx, + grpc_chttp2_transport *t, + grpc_chttp2_stream *s, void *arg); + typedef struct grpc_chttp2_executor_action_header { grpc_chttp2_stream *stream; - void (*action)(grpc_chttp2_transport *t, grpc_chttp2_stream *s, void *arg); + grpc_chttp2_locked_action action; struct grpc_chttp2_executor_action_header *next; void *arg; } grpc_chttp2_executor_action_header; @@ -311,13 +315,11 @@ struct grpc_chttp2_transport { gpr_mu mu; /** is a thread currently in the global lock */ - uint8_t global_active; + bool global_active; /** is a thread currently writing */ - uint8_t writing_active; + bool writing_active; /** is a thread currently parsing */ - uint8_t parsing_active; - /** is a thread currently executing channel callbacks */ - uint8_t channel_callback_active; + bool parsing_active; grpc_chttp2_executor_action_header *pending_actions; } executor; @@ -352,11 +354,11 @@ struct grpc_chttp2_transport { grpc_chttp2_stream_map new_stream_map; /** closure to execute writing */ - grpc_iomgr_closure writing_action; + grpc_closure writing_action; /** closure to start reading from the endpoint */ - grpc_iomgr_closure reading_action; + grpc_closure reading_action; /** closure to actually do parsing */ - grpc_iomgr_closure parsing_action; + grpc_closure parsing_action; struct { size_t nslices; @@ -659,10 +661,11 @@ void grpc_chttp2_parsing_become_skip_parser( void grpc_chttp2_complete_closure_step(grpc_exec_ctx *exec_ctx, grpc_closure **pclosure, int success); -void grpc_chttp2_run_with_global_lock( - grpc_chttp2_transport *transport, grpc_chttp2_stream *optional_stream, - void (*action)(grpc_chttp2_transport *t, grpc_chttp2_stream *s, void *arg), - void *arg, size_t sizeof_arg); +void grpc_chttp2_run_with_global_lock(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *transport, + grpc_chttp2_stream *optional_stream, + grpc_chttp2_locked_action action, + void *arg, size_t sizeof_arg); #define GRPC_CHTTP2_CLIENT_CONNECT_STRING "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" #define GRPC_CHTTP2_CLIENT_CONNECT_STRLEN \ diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index a7844ea8e53..eb9f7a23650 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -81,9 +81,6 @@ int grpc_flowctl_trace = 0; static const grpc_transport_vtable vtable; -static void unlock_check_channel_callbacks(grpc_chttp2_transport *t); -static void unlock_check_read_write_state(grpc_chttp2_transport *t); - /* forward declarations of various callbacks that we'll build closures around */ static void writing_action(grpc_exec_ctx *exec_ctx, void *t, bool iomgr_success_ignored); @@ -96,9 +93,6 @@ static void parsing_action(grpc_exec_ctx *exec_ctx, void *t, static void push_setting(grpc_chttp2_transport *t, grpc_chttp2_setting_id id, uint32_t value); -/** Endpoint callback to process incoming data */ -static void recv_data(grpc_exec_ctx *exec_ctx, void *tp, bool success); - /** Start disconnection chain */ static void drop_connection(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t); @@ -132,7 +126,8 @@ static void add_to_pollset_set_locked(grpc_exec_ctx *exec_ctx, static void maybe_start_some_streams( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global); -static void finish_global_actions(grpc_chttp2_transport *t); +static void finish_global_actions(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t); static void connectivity_state_set( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, @@ -246,9 +241,7 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, /* ref is dropped at transport close() */ gpr_ref_init(&t->shutdown_ep_refs, 1); gpr_mu_init(&t->executor.mu); - grpc_mdctx_ref(mdctx); t->peer_string = grpc_endpoint_get_peer(ep); - t->metadata_context = mdctx; t->endpoint_reading = 1; t->global.next_stream_id = is_client ? 1 : 2; t->global.is_client = is_client; @@ -280,7 +273,6 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_closure_init(&t->writing.done_cb, grpc_chttp2_terminate_writing, &t->writing); - grpc_closure_init(&t->recv_data, recv_data, t); gpr_slice_buffer_init(&t->read_buffer); if (is_client) { @@ -395,17 +387,19 @@ static void prevent_endpoint_shutdown(grpc_chttp2_transport *t) { gpr_ref(&t->shutdown_ep_refs); } -static void destroy_transport_locked(grpc_chttp2_transport *t, +static void destroy_transport_locked(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, grpc_chttp2_stream *s_ignored, void *arg_ignored) { t->destroying = 1; - drop_connection(t); + drop_connection(exec_ctx, t); } -static void destroy_transport(grpc_transport *gt) { +static void destroy_transport(grpc_exec_ctx *exec_ctx, grpc_transport *gt) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; - grpc_chttp2_run_with_global_lock(t, NULL, destroy_transport_locked, NULL, 0); - UNREF_TRANSPORT(t, "destroy"); + grpc_chttp2_run_with_global_lock(exec_ctx, t, NULL, destroy_transport_locked, + NULL, 0); + UNREF_TRANSPORT(exec_ctx, t, "destroy"); } static void allow_endpoint_shutdown_locked(grpc_exec_ctx *exec_ctx, @@ -417,17 +411,6 @@ static void allow_endpoint_shutdown_locked(grpc_exec_ctx *exec_ctx, } } -static void allow_endpoint_shutdown_unlocked(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport *t) { - if (gpr_unref(&t->shutdown_ep_refs)) { - gpr_mu_lock(&t->mu); - if (t->ep) { - grpc_endpoint_shutdown(exec_ctx, t->ep); - } - gpr_mu_unlock(&t->mu); - } -} - static void destroy_endpoint(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) { grpc_endpoint_destroy(exec_ctx, t->ep); @@ -479,34 +462,8 @@ void grpc_chttp2_stream_unref(grpc_exec_ctx *exec_ctx, } #endif -static void close_transport(grpc_transport *gt) { - grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; - grpc_chttp2_run_with_global_lock(t, NULL, close_transport_locked, NULL, 0); -} - -typedef struct { - grpc_status_code status; - gpr_slice debug_data; -} goaway_arg; - -static void goaway_locked(grpc_chttp2_transport *t, - grpc_chttp2_stream *s_ignored, void *a) { - goaway_arg *arg = a; - grpc_chttp2_goaway_append(t->global.last_incoming_stream_id, - grpc_chttp2_grpc_status_to_http2_error(arg->status), - arg->debug_data, &t->global.qbuf); -} - -static void goaway(grpc_transport *gt, grpc_status_code status, - gpr_slice debug_data) { - grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; - goaway_arg arg; - arg.status = status; - arg.debug_data = debug_data; - grpc_chttp2_run_with_global_lock(t, NULL, goaway_locked, &arg, sizeof(arg)); -} - -static void finish_init_stream_locked(grpc_chttp2_transport *t, +static void finish_init_stream_locked(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, grpc_chttp2_stream *s, void *arg_ignored) { grpc_chttp2_register_stream(t, s); @@ -549,7 +506,8 @@ static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, s->global.in_stream_map = 1; } - grpc_chttp2_run_with_global_lock(t, s, finish_init_stream_locked, NULL, 0); + grpc_chttp2_run_with_global_lock(exec_ctx, t, s, finish_init_stream_locked, + NULL, 0); return 0; } @@ -558,10 +516,10 @@ static void destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, grpc_stream *gs) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; grpc_chttp2_stream *s = (grpc_chttp2_stream *)gs; + grpc_byte_stream *bs; #if 0 int i; - grpc_byte_stream *bs; GPR_TIMER_BEGIN("destroy_stream", 0); @@ -644,60 +602,48 @@ grpc_chttp2_stream_parsing *grpc_chttp2_parsing_accept_stream( * LOCK MANAGEMENT */ -static void finish_global_actions(grpc_chttp2_transport *t) { +static void finish_global_actions(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t) { grpc_chttp2_executor_action_header *hdr; grpc_chttp2_executor_action_header *next; - grpc_iomgr_closure *run_closures; for (;;) { - unlock_check_read_write_state(t); if (!t->executor.writing_active && !t->closed && - grpc_chttp2_unlocking_check_writes(&t->global, &t->writing)) { + grpc_chttp2_unlocking_check_writes(exec_ctx, &t->global, &t->writing, + t->executor.parsing_active)) { t->executor.writing_active = 1; REF_TRANSPORT(t, "writing"); prevent_endpoint_shutdown(t); - grpc_chttp2_schedule_closure(&t->global, &t->writing_action, 1); + grpc_exec_ctx_enqueue(exec_ctx, &t->writing_action, true, NULL); } check_read_ops(exec_ctx, &t->global); - unlock_check_channel_callbacks(t); - - run_closures = t->global.pending_closures; - t->global.pending_closures = NULL; - - gpr_mu_lock(&t->executor.mu); - t->executor.global_active = 0; - gpr_mu_unlock(&t->executor.mu); - - while (run_closures) { - grpc_iomgr_closure *next = run_closures->next; - run_closures->cb(run_closures->cb_arg, run_closures->success); - run_closures = next; - } gpr_mu_lock(&t->executor.mu); - if (!t->executor.global_active && t->executor.pending_actions) { - t->executor.global_active = 1; + if (t->executor.pending_actions != NULL) { hdr = t->executor.pending_actions; t->executor.pending_actions = NULL; gpr_mu_unlock(&t->executor.mu); while (hdr != NULL) { - hdr->action(t, hdr->stream, hdr->arg); + hdr->action(exec_ctx, t, hdr->stream, hdr->arg); next = hdr->next; gpr_free(hdr); - UNREF_TRANSPORT(t, "pending_action"); + UNREF_TRANSPORT(exec_ctx, t, "pending_action"); hdr = next; } continue; + } else { + t->executor.global_active = false; } gpr_mu_unlock(&t->executor.mu); break; } } -void grpc_chttp2_run_with_global_lock( - grpc_chttp2_transport *t, grpc_chttp2_stream *optional_stream, - void (*action)(grpc_chttp2_transport *t, grpc_chttp2_stream *s, void *arg), - void *arg, size_t sizeof_arg) { +void grpc_chttp2_run_with_global_lock(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, + grpc_chttp2_stream *optional_stream, + grpc_chttp2_locked_action action, + void *arg, size_t sizeof_arg) { grpc_chttp2_executor_action_header *hdr; REF_TRANSPORT(t, "run_global"); @@ -708,9 +654,9 @@ void grpc_chttp2_run_with_global_lock( t->executor.global_active = 1; gpr_mu_unlock(&t->executor.mu); - action(t, optional_stream, arg); + action(exec_ctx, t, optional_stream, arg); - finish_global_actions(t); + finish_global_actions(exec_ctx, t); } else { gpr_mu_unlock(&t->executor.mu); @@ -726,6 +672,7 @@ void grpc_chttp2_run_with_global_lock( gpr_mu_lock(&t->executor.mu); if (!t->executor.global_active) { + /* global lock was released while allocating memory: release & retry */ gpr_free(hdr); continue; } @@ -737,7 +684,7 @@ void grpc_chttp2_run_with_global_lock( break; } - UNREF_TRANSPORT(t, "run_global"); + UNREF_TRANSPORT(exec_ctx, t, "run_global"); } /******************************************************************************* @@ -767,7 +714,8 @@ static void push_setting(grpc_chttp2_transport *t, grpc_chttp2_setting_id id, } } -static void terminate_writing_with_lock(grpc_chttp2_transport *t, +static void terminate_writing_with_lock(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, grpc_chttp2_stream *s_ignored, void *a) { int success = *(int *)a; @@ -780,6 +728,7 @@ static void terminate_writing_with_lock(grpc_chttp2_transport *t, grpc_chttp2_cleanup_writing(exec_ctx, &t->global, &t->writing); + grpc_chttp2_stream_global *stream_global; while (grpc_chttp2_list_pop_closed_waiting_for_writing(&t->global, &stream_global)) { fail_pending_writes(exec_ctx, stream_global); @@ -794,14 +743,15 @@ static void terminate_writing_with_lock(grpc_chttp2_transport *t, destroy_endpoint(exec_ctx, t); } - UNREF_TRANSPORT(t, "writing"); + UNREF_TRANSPORT(exec_ctx, t, "writing"); } -void grpc_chttp2_terminate_writing( - grpc_chttp2_transport_writing *transport_writing, int success) { +void grpc_chttp2_terminate_writing(grpc_exec_ctx *exec_ctx, + void *transport_writing, bool success) { grpc_chttp2_transport *t = TRANSPORT_FROM_WRITING(transport_writing); - grpc_chttp2_run_with_global_lock(t, NULL, terminate_writing_with_lock, - &success, sizeof(success)); + grpc_chttp2_run_with_global_lock(exec_ctx, t, NULL, + terminate_writing_with_lock, &success, + sizeof(success)); } static void writing_action(grpc_exec_ctx *exec_ctx, void *gt, @@ -915,14 +865,16 @@ static int contains_non_ok_status( static void do_nothing(grpc_exec_ctx *exec_ctx, void *arg, bool success) {} -static void perform_stream_op_locked( - grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, - grpc_chttp2_stream_global *stream_global, grpc_transport_stream_op *op) { - grpc_closure *on_complete; - +static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, + grpc_chttp2_stream *s, void *stream_op) { GPR_TIMER_BEGIN("perform_stream_op_locked", 0); - on_complete = op->on_complete; + grpc_transport_stream_op *op = stream_op; + grpc_chttp2_transport_global *transport_global = &t->global; + grpc_chttp2_stream_global *stream_global = &s->global; + + grpc_closure *on_complete = op->on_complete; if (on_complete == NULL) { on_complete = grpc_closure_create(do_nothing, NULL); } @@ -1039,12 +991,11 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, grpc_stream *gs, grpc_transport_stream_op *op) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; grpc_chttp2_stream *s = (grpc_chttp2_stream *)gs; - grpc_chttp2_run_with_global_lock(t, s, perform_stream_op_locked, op, + grpc_chttp2_run_with_global_lock(exec_ctx, t, s, perform_stream_op_locked, op, sizeof(*op)); } -static void send_ping_locked(grpc_chttp2_transport *t, - grpc_chttp2_stream *s_ignored, void *a) { +static void send_ping_locked(grpc_chttp2_transport *t, grpc_closure *on_recv) { grpc_chttp2_outstanding_ping *p = gpr_malloc(sizeof(*p)); p->next = &t->global.pings; p->prev = p->next->prev; @@ -1057,23 +1008,14 @@ static void send_ping_locked(grpc_chttp2_transport *t, p->id[5] = (t->global.ping_counter >> 16) & 0xff; p->id[6] = (t->global.ping_counter >> 8) & 0xff; p->id[7] = t->global.ping_counter & 0xff; - p->on_recv = *(grpc_iomgr_closure **)a; + p->on_recv = on_recv; gpr_slice_buffer_add(&t->global.qbuf, grpc_chttp2_ping_create(0, p->id)); } -static void send_ping(grpc_transport *gt, grpc_iomgr_closure *on_recv) { - grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; - grpc_chttp2_run_with_global_lock(t, NULL, send_ping_locked, &on_recv, - sizeof(on_recv)); -} - -void grpc_chttp2_ack_ping(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport_parsing *transport_parsing, - const uint8_t *opaque_8bytes) { +static void ack_ping_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, + grpc_chttp2_stream *s, void *opaque_8bytes) { grpc_chttp2_outstanding_ping *ping; - grpc_chttp2_transport *t = TRANSPORT_FROM_PARSING(transport_parsing); grpc_chttp2_transport_global *transport_global = &t->global; - lock(t); for (ping = transport_global->pings.next; ping != &transport_global->pings; ping = ping->next) { if (0 == memcmp(opaque_8bytes, ping->id, 8)) { @@ -1084,13 +1026,30 @@ void grpc_chttp2_ack_ping(grpc_exec_ctx *exec_ctx, break; } } - unlock(exec_ctx, t); +} + +void grpc_chttp2_ack_ping(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport_parsing *transport_parsing, + const uint8_t *opaque_8bytes) { + grpc_chttp2_run_with_global_lock( + exec_ctx, TRANSPORT_FROM_PARSING(transport_parsing), NULL, + ack_ping_locked, (void *)opaque_8bytes, 8); } static void perform_transport_op_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, - grpc_transport_op *op) { - bool close_transport = false; + grpc_chttp2_stream *s_unused, + void *stream_op) { + grpc_transport_op *op = stream_op; + bool close_transport = op->disconnect; + + /* If there's a set_accept_stream ensure that we're not parsing + to avoid changing things out from underneath */ + if (t->executor.parsing_active && op->set_accept_stream) { + GPR_ASSERT(t->post_parsing_op == NULL); + t->post_parsing_op = gpr_malloc(sizeof(*op)); + memcpy(t->post_parsing_op, op, sizeof(*op)); + } grpc_exec_ctx_enqueue(exec_ctx, op->on_consumed, true, NULL); @@ -1116,47 +1075,31 @@ static void perform_transport_op_locked(grpc_exec_ctx *exec_ctx, } if (op->bind_pollset) { - add_to_pollset_locked(exec_ctx, t, op->bind_pollset); + add_to_pollset_locked(exec_ctx, t, NULL, op->bind_pollset); } if (op->bind_pollset_set) { - add_to_pollset_set_locked(exec_ctx, t, op->bind_pollset_set); + add_to_pollset_set_locked(exec_ctx, t, NULL, op->bind_pollset_set); } if (op->send_ping) { send_ping_locked(t, op->send_ping); } - if (op->disconnect) { - close_transport_locked(exec_ctx, t); - } - if (close_transport) { - close_transport_locked(exec_ctx, t); + close_transport_locked(exec_ctx, t, NULL, NULL); } } static void perform_transport_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, grpc_transport_op *op) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; - - lock(t); - - /* If there's a set_accept_stream ensure that we're not parsing - to avoid changing things out from underneath */ - if (t->parsing_active && op->set_accept_stream) { - GPR_ASSERT(t->post_parsing_op == NULL); - t->post_parsing_op = gpr_malloc(sizeof(*op)); - memcpy(t->post_parsing_op, op, sizeof(*op)); - } else { - perform_transport_op_locked(exec_ctx, t, op); - } - - unlock(exec_ctx, t); + grpc_chttp2_run_with_global_lock( + exec_ctx, t, NULL, perform_transport_op_locked, op, sizeof(*op)); } /******************************************************************************* - * INPUT PROCESSING + * INPUT PROCESSING - GENERAL */ static void check_read_ops(grpc_exec_ctx *exec_ctx, @@ -1233,7 +1176,7 @@ static void remove_stream(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, } if (grpc_chttp2_unregister_stream(t, s) && t->global.sent_goaway) { - close_transport_locked(exec_ctx, t); + close_transport_locked(exec_ctx, t, NULL, NULL); } if (grpc_chttp2_list_remove_writable_stream(&t->global, &s->global)) { GRPC_CHTTP2_STREAM_UNREF(exec_ctx, &s->global, "chttp2_writing"); @@ -1328,7 +1271,7 @@ void grpc_chttp2_mark_stream_closed( } if (close_writes && !stream_global->write_closed) { stream_global->write_closed = 1; - if (TRANSPORT_FROM_GLOBAL(transport_global)->writing_active) { + if (TRANSPORT_FROM_GLOBAL(transport_global)->executor.writing_active) { GRPC_CHTTP2_STREAM_REF(stream_global, "finish_writes"); grpc_chttp2_list_add_closed_waiting_for_writing(transport_global, stream_global); @@ -1338,7 +1281,7 @@ void grpc_chttp2_mark_stream_closed( } if (stream_global->read_closed && stream_global->write_closed) { if (stream_global->id != 0 && - TRANSPORT_FROM_GLOBAL(transport_global)->parsing_active) { + TRANSPORT_FROM_GLOBAL(transport_global)->executor.parsing_active) { grpc_chttp2_list_add_closed_waiting_for_parsing(transport_global, stream_global); } else { @@ -1469,35 +1412,10 @@ static void end_all_the_calls(grpc_exec_ctx *exec_ctx, } static void drop_connection(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) { - if (t->global.error_state == GRPC_CHTTP2_ERROR_STATE_NONE) { - t->global.error_state = GRPC_CHTTP2_ERROR_STATE_SEEN; - } close_transport_locked(exec_ctx, t, NULL, NULL); end_all_the_calls(exec_ctx, t); } -static void read_error_locked(grpc_chttp2_transport *t) { - t->endpoint_reading = 0; - if (!t->executor.writing_active && t->ep) { - grpc_endpoint_destroy(t->ep); - t->ep = NULL; - /* safe as we still have a ref for read */ - UNREF_TRANSPORT(t, "disconnect"); - } -} - -static void recv_data_error_locked(grpc_chttp2_transport *t, - grpc_chttp2_stream *s, void *a) { - size_t i; - - drop_connection(t); - read_error_locked(t); - for (i = 0; i < t->executor_parsing.nslices; i++) - gpr_slice_unref(t->executor_parsing.slices[i]); - memset(&t->executor_parsing, 0, sizeof(t->executor_parsing)); - UNREF_TRANSPORT(t, "recv_data"); -} - /** update window from a settings change */ static void update_global_window(void *args, uint32_t id, void *stream) { grpc_chttp2_transport *t = args; @@ -1518,58 +1436,72 @@ static void update_global_window(void *args, uint32_t id, void *stream) { } } -static void recv_data(grpc_exec_ctx *exec_ctx, void *tp, bool success) { - grpc_chttp2_run_with_global_lock(t, NULL, recv_data_locked, - (void *)(uintptr_t)success, 0); +/******************************************************************************* + * INPUT PROCESSING - PARSING + */ + +static void reading_action_locked(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, + grpc_chttp2_stream *s_unused, void *arg); +static void parsing_action(grpc_exec_ctx *exec_ctx, void *arg, bool success); +static void post_reading_action_locked(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, + grpc_chttp2_stream *s_unused, void *arg); +static void post_parse_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, + grpc_chttp2_stream *s_unused, void *arg); + +static void reading_action(grpc_exec_ctx *exec_ctx, void *tp, bool success) { /* Control flow: - recv_data_locked -> + reading_action_locked -> (parse_unlocked -> post_parse_locked)? -> - post_recv_data_locked */ + post_reading_action_locked */ + grpc_chttp2_run_with_global_lock(exec_ctx, tp, NULL, reading_action_locked, + (void *)(uintptr_t)success, 0); } -static void recv_data_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, - grpc_chttp2_stream *s_unused, void *arg) { - size_t i; - int keep_reading = 0; +static void reading_action_locked(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, + grpc_chttp2_stream *s_unused, void *arg) { grpc_chttp2_transport_global *transport_global = &t->global; grpc_chttp2_transport_parsing *transport_parsing = &t->parsing; - grpc_chttp2_stream_global *stream_global; bool success = (bool)(uintptr_t)arg; - i = 0; - GPR_ASSERT(!t->parsing_active); + GPR_ASSERT(!t->executor.parsing_active); if (!t->closed) { t->executor.parsing_active = 1; /* merge stream lists */ grpc_chttp2_stream_map_move_into(&t->new_stream_map, &t->parsing_stream_map); grpc_chttp2_prepare_to_read(transport_global, transport_parsing); - grpc_exec_ctx_enqueue(exec_ctx, parse_locked, t, NULL); + grpc_exec_ctx_enqueue(exec_ctx, &t->parsing_action, success, NULL); } else { - post_recv_data_locked(exec_ctx, t, s_unused, arg); + post_reading_action_locked(exec_ctx, t, s_unused, arg); } } -static void parse_locked(grpc_exec_ctx *exec_ctx, void *arg, bool success) { - GPR_TIMER_BEGIN("recv_data.parse", 0); +static void parsing_action(grpc_exec_ctx *exec_ctx, void *arg, bool success) { + grpc_chttp2_transport *t = arg; + GPR_TIMER_BEGIN("reading_action.parse", 0); + size_t i = 0; for (; i < t->read_buffer.count && - grpc_chttp2_perform_read(exec_ctx, transport_parsing, + grpc_chttp2_perform_read(exec_ctx, &t->parsing, t->read_buffer.slices[i]); i++) ; - GPR_TIMER_END("recv_data.parse", 0); - grpc_chttp2_run_with_global_lock(t, s_unused, post_parse_locked, arg, 0) + if (i != t->read_buffer.count) { + success = false; + } + GPR_TIMER_END("reading_action.parse", 0); + grpc_chttp2_run_with_global_lock(exec_ctx, t, NULL, post_parse_locked, + (void *)(uintptr_t)success, 0); } static void post_parse_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s_unused, void *arg) { + grpc_chttp2_transport_global *transport_global = &t->global; + grpc_chttp2_transport_parsing *transport_parsing = &t->parsing; /* copy parsing qbuf to global qbuf */ gpr_slice_buffer_move_into(&t->parsing.qbuf, &t->global.qbuf); - if (i != t->read_buffer.count) { - unlock(exec_ctx, t); - lock(t); - drop_connection(exec_ctx, t); - } /* merge stream lists */ grpc_chttp2_stream_map_move_into(&t->new_stream_map, &t->parsing_stream_map); transport_global->concurrent_stream_count = @@ -1581,20 +1513,18 @@ static void post_parse_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, } /* handle higher level things */ grpc_chttp2_publish_reads(exec_ctx, transport_global, transport_parsing); - t->parsing_active = 0; + t->executor.parsing_active = 0; /* handle delayed transport ops (if there is one) */ if (t->post_parsing_op) { grpc_transport_op *op = t->post_parsing_op; t->post_parsing_op = NULL; - perform_transport_op_locked(exec_ctx, t, op); + perform_transport_op_locked(exec_ctx, t, NULL, op); gpr_free(op); } /* if a stream is in the stream map, and gets cancelled, we need to - * ensure - * we are not parsing before continuing the cancellation to keep - * things - * in - * a sane state */ + * ensure we are not parsing before continuing the cancellation to keep + * things in a sane state */ + grpc_chttp2_stream_global *stream_global; while (grpc_chttp2_list_pop_closed_waiting_for_parsing(transport_global, &stream_global)) { GPR_ASSERT(stream_global->in_stream_map); @@ -1604,28 +1534,37 @@ static void post_parse_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, GRPC_CHTTP2_STREAM_UNREF(exec_ctx, stream_global, "chttp2"); } - post_recv_data_locked(exec_ctx, t, s_unused, arg); + post_reading_action_locked(exec_ctx, t, s_unused, arg); } -static void post_recv_data_locked(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport *t, - grpc_chttp2_stream *s_unused, void *arg) { - if (!success || i != t->read_buffer.count || t->closed) { +static void post_reading_action_locked(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, + grpc_chttp2_stream *s_unused, + void *arg) { + bool success = (bool)(uintptr_t)arg; + bool keep_reading = false; + if (!success || t->closed) { drop_connection(exec_ctx, t); - read_error_locked(exec_ctx, t); + t->endpoint_reading = 0; + if (!t->executor.writing_active && t->ep) { + grpc_endpoint_destroy(exec_ctx, t->ep); + t->ep = NULL; + /* safe as we still have a ref for read */ + UNREF_TRANSPORT(exec_ctx, t, "disconnect"); + } } else if (!t->closed) { - keep_reading = 1; + keep_reading = true; REF_TRANSPORT(t, "keep_reading"); prevent_endpoint_shutdown(t); } gpr_slice_buffer_reset_and_unref(&t->read_buffer); if (keep_reading) { - grpc_endpoint_read(exec_ctx, t->ep, &t->read_buffer, &t->recv_data); + grpc_endpoint_read(exec_ctx, t->ep, &t->read_buffer, &t->reading_action); allow_endpoint_shutdown_locked(exec_ctx, t); UNREF_TRANSPORT(exec_ctx, t, "keep_reading"); } else { - UNREF_TRANSPORT(exec_ctx, t, "recv_data"); + UNREF_TRANSPORT(exec_ctx, t, "reading_action"); } } @@ -1650,7 +1589,7 @@ static void connectivity_state_set( static void add_to_pollset_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, - grpc_pollset *pollset) { + grpc_chttp2_stream *s_unused, void *pollset) { if (t->ep) { grpc_endpoint_add_to_pollset(exec_ctx, t->ep, pollset); } @@ -1658,7 +1597,8 @@ static void add_to_pollset_locked(grpc_exec_ctx *exec_ctx, static void add_to_pollset_set_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, - grpc_pollset_set *pollset_set) { + grpc_chttp2_stream *s_unused, + void *pollset_set) { if (t->ep) { grpc_endpoint_add_to_pollset_set(exec_ctx, t->ep, pollset_set); } @@ -1666,10 +1606,10 @@ static void add_to_pollset_set_locked(grpc_exec_ctx *exec_ctx, static void set_pollset(grpc_exec_ctx *exec_ctx, grpc_transport *gt, grpc_stream *gs, grpc_pollset *pollset) { - grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; /* TODO(ctiller): keep pollset alive */ - grpc_chttp2_run_with_global_lock(gt, gs, add_to_pollset_locked, pollset, - NULL); + grpc_chttp2_run_with_global_lock(exec_ctx, (grpc_chttp2_transport *)gt, + (grpc_chttp2_stream *)gs, + add_to_pollset_locked, pollset, 0); } /******************************************************************************* @@ -1716,36 +1656,51 @@ static void incoming_byte_stream_update_flow_control( } } -static int incoming_byte_stream_next(grpc_exec_ctx *exec_ctx, - grpc_byte_stream *byte_stream, - gpr_slice *slice, size_t max_size_hint, - grpc_closure *on_complete) { +typedef struct { + grpc_chttp2_incoming_byte_stream *byte_stream; + gpr_slice *slice; + size_t max_size_hint; + grpc_closure *on_complete; +} incoming_byte_stream_next_arg; + +static void incoming_byte_stream_next_locked(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, + grpc_chttp2_stream *s, + void *argp) { + incoming_byte_stream_next_arg *arg = argp; grpc_chttp2_incoming_byte_stream *bs = - (grpc_chttp2_incoming_byte_stream *)byte_stream; + (grpc_chttp2_incoming_byte_stream *)arg->byte_stream; grpc_chttp2_transport_global *transport_global = &bs->transport->global; grpc_chttp2_stream_global *stream_global = &bs->stream->global; - lock(bs->transport); if (bs->is_tail) { - incoming_byte_stream_update_flow_control(transport_global, stream_global, - max_size_hint, bs->slices.length); + incoming_byte_stream_update_flow_control( + transport_global, stream_global, arg->max_size_hint, bs->slices.length); } if (bs->slices.count > 0) { - *slice = gpr_slice_buffer_take_first(&bs->slices); - unlock(exec_ctx, bs->transport); - return 1; + *arg->slice = gpr_slice_buffer_take_first(&bs->slices); + grpc_exec_ctx_enqueue(exec_ctx, arg->on_complete, true, NULL); } else if (bs->failed) { - grpc_exec_ctx_enqueue(exec_ctx, on_complete, false, NULL); - unlock(exec_ctx, bs->transport); - return 0; + grpc_exec_ctx_enqueue(exec_ctx, arg->on_complete, false, NULL); } else { - bs->on_next = on_complete; - bs->next = slice; - unlock(exec_ctx, bs->transport); - return 0; + bs->on_next = arg->on_complete; + bs->next = arg->slice; } } +static int incoming_byte_stream_next(grpc_exec_ctx *exec_ctx, + grpc_byte_stream *byte_stream, + gpr_slice *slice, size_t max_size_hint, + grpc_closure *on_complete) { + grpc_chttp2_incoming_byte_stream *bs = + (grpc_chttp2_incoming_byte_stream *)byte_stream; + incoming_byte_stream_next_arg arg = {bs, slice, max_size_hint, on_complete}; + grpc_chttp2_run_with_global_lock(exec_ctx, bs->transport, bs->stream, + incoming_byte_stream_next_locked, &arg, + sizeof(arg)); + return 0; +} + static void incoming_byte_stream_unref(grpc_chttp2_incoming_byte_stream *bs) { if (gpr_unref(&bs->refs)) { gpr_slice_buffer_destroy(&bs->slices); @@ -1758,18 +1713,43 @@ static void incoming_byte_stream_destroy(grpc_exec_ctx *exec_ctx, incoming_byte_stream_unref((grpc_chttp2_incoming_byte_stream *)byte_stream); } -void grpc_chttp2_incoming_byte_stream_push(grpc_exec_ctx *exec_ctx, - grpc_chttp2_incoming_byte_stream *bs, - gpr_slice slice) { - gpr_mu_lock(&bs->transport->mu); +typedef struct { + grpc_chttp2_incoming_byte_stream *byte_stream; + gpr_slice slice; +} incoming_byte_stream_push_arg; + +static void incoming_byte_stream_push_locked(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, + grpc_chttp2_stream *s, + void *argp) { + incoming_byte_stream_push_arg *arg = argp; + grpc_chttp2_incoming_byte_stream *bs = arg->byte_stream; if (bs->on_next != NULL) { - *bs->next = slice; + *bs->next = arg->slice; grpc_exec_ctx_enqueue(exec_ctx, bs->on_next, true, NULL); bs->on_next = NULL; } else { - gpr_slice_buffer_add(&bs->slices, slice); + gpr_slice_buffer_add(&bs->slices, arg->slice); } - gpr_mu_unlock(&bs->transport->mu); +} + +void grpc_chttp2_incoming_byte_stream_push(grpc_exec_ctx *exec_ctx, + grpc_chttp2_incoming_byte_stream *bs, + gpr_slice slice) { + incoming_byte_stream_push_arg arg = {bs, slice}; + grpc_chttp2_run_with_global_lock(exec_ctx, bs->transport, bs->stream, + incoming_byte_stream_push_locked, &arg, + sizeof(arg)); +} + +static void incoming_byte_stream_finished_locked(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, + grpc_chttp2_stream *s, + void *argp) { + grpc_chttp2_incoming_byte_stream *bs = argp; + grpc_exec_ctx_enqueue(exec_ctx, bs->on_next, false, NULL); + bs->on_next = NULL; + bs->failed = 1; } void grpc_chttp2_incoming_byte_stream_finished( @@ -1777,24 +1757,13 @@ void grpc_chttp2_incoming_byte_stream_finished( int from_parsing_thread) { if (!success) { if (from_parsing_thread) { - gpr_mu_lock(&bs->transport->mu); - } - grpc_exec_ctx_enqueue(exec_ctx, bs->on_next, false, NULL); - bs->on_next = NULL; - bs->failed = 1; - if (from_parsing_thread) { - gpr_mu_unlock(&bs->transport->mu); - } - } else { -#ifndef NDEBUG - if (from_parsing_thread) { - gpr_mu_lock(&bs->transport->mu); - } - GPR_ASSERT(bs->on_next == NULL); - if (from_parsing_thread) { - gpr_mu_unlock(&bs->transport->mu); + grpc_chttp2_run_with_global_lock(exec_ctx, bs->transport, bs->stream, + incoming_byte_stream_finished_locked, bs, + 0); + } else { + incoming_byte_stream_finished_locked(exec_ctx, bs->transport, bs->stream, + bs); } -#endif } incoming_byte_stream_unref(bs); } @@ -1943,7 +1912,7 @@ void grpc_chttp2_transport_start_reading(grpc_exec_ctx *exec_ctx, grpc_transport *transport, gpr_slice *slices, size_t nslices) { grpc_chttp2_transport *t = (grpc_chttp2_transport *)transport; - REF_TRANSPORT(t, "recv_data"); /* matches unref inside recv_data */ + REF_TRANSPORT(t, "reading_action"); /* matches unref inside reading_action */ gpr_slice_buffer_addn(&t->read_buffer, slices, nslices); - recv_data(exec_ctx, t, 1); + reading_action(exec_ctx, t, 1); } From 0027de17fc5e75af5ab5379f0e689223d0c81a3e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 22 Mar 2016 16:04:40 -0700 Subject: [PATCH 0020/1894] Remove unused declaration --- src/core/transport/chttp2/internal.h | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 7489cc67fbc..7c97c7e33d9 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -360,11 +360,6 @@ struct grpc_chttp2_transport { /** closure to actually do parsing */ grpc_closure parsing_action; - struct { - size_t nslices; - gpr_slice *slices; - } executor_parsing; - /** incoming read bytes */ gpr_slice_buffer read_buffer; From 1907fc6ee9b26880f781eeee5459971d79d7337e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 22 Mar 2016 16:05:54 -0700 Subject: [PATCH 0021/1894] Swap order of functions to reduce diff --- src/core/transport/chttp2_transport.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index eb9f7a23650..596e01f5c92 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -380,13 +380,6 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, } } -/** block grpc_endpoint_shutdown being called until a paired - allow_endpoint_shutdown is made */ -static void prevent_endpoint_shutdown(grpc_chttp2_transport *t) { - GPR_ASSERT(t->ep); - gpr_ref(&t->shutdown_ep_refs); -} - static void destroy_transport_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s_ignored, @@ -402,6 +395,13 @@ static void destroy_transport(grpc_exec_ctx *exec_ctx, grpc_transport *gt) { UNREF_TRANSPORT(exec_ctx, t, "destroy"); } +/** block grpc_endpoint_shutdown being called until a paired + allow_endpoint_shutdown is made */ +static void prevent_endpoint_shutdown(grpc_chttp2_transport *t) { + GPR_ASSERT(t->ep); + gpr_ref(&t->shutdown_ep_refs); +} + static void allow_endpoint_shutdown_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) { if (gpr_unref(&t->shutdown_ep_refs)) { From 223ae1c682dc56eefaae40f3fa28dd2b38d624d5 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 22 Mar 2016 16:08:35 -0700 Subject: [PATCH 0022/1894] Fix inadvertently reverted code --- src/core/transport/chttp2_transport.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 596e01f5c92..a82440701dc 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -1000,14 +1000,14 @@ static void send_ping_locked(grpc_chttp2_transport *t, grpc_closure *on_recv) { p->next = &t->global.pings; p->prev = p->next->prev; p->prev->next = p->next->prev = p; - p->id[0] = (t->global.ping_counter >> 56) & 0xff; - p->id[1] = (t->global.ping_counter >> 48) & 0xff; - p->id[2] = (t->global.ping_counter >> 40) & 0xff; - p->id[3] = (t->global.ping_counter >> 32) & 0xff; - p->id[4] = (t->global.ping_counter >> 24) & 0xff; - p->id[5] = (t->global.ping_counter >> 16) & 0xff; - p->id[6] = (t->global.ping_counter >> 8) & 0xff; - p->id[7] = t->global.ping_counter & 0xff; + p->id[0] = (uint8_t)((t->global.ping_counter >> 56) & 0xff); + p->id[1] = (uint8_t)((t->global.ping_counter >> 48) & 0xff); + p->id[2] = (uint8_t)((t->global.ping_counter >> 40) & 0xff); + p->id[3] = (uint8_t)((t->global.ping_counter >> 32) & 0xff); + p->id[4] = (uint8_t)((t->global.ping_counter >> 24) & 0xff); + p->id[5] = (uint8_t)((t->global.ping_counter >> 16) & 0xff); + p->id[6] = (uint8_t)((t->global.ping_counter >> 8) & 0xff); + p->id[7] = (uint8_t)(t->global.ping_counter & 0xff); p->on_recv = on_recv; gpr_slice_buffer_add(&t->global.qbuf, grpc_chttp2_ping_create(0, p->id)); } From b4f7cbd339ea89e1f736aa22c86ad72ad69decec Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 22 Mar 2016 16:22:37 -0700 Subject: [PATCH 0023/1894] Fix stack corruption --- src/core/transport/chttp2_transport.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index a82440701dc..83739db1e2f 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -718,7 +718,7 @@ static void terminate_writing_with_lock(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s_ignored, void *a) { - int success = *(int *)a; + bool success = (bool)(uintptr_t)a; allow_endpoint_shutdown_locked(exec_ctx, t); @@ -750,8 +750,8 @@ void grpc_chttp2_terminate_writing(grpc_exec_ctx *exec_ctx, void *transport_writing, bool success) { grpc_chttp2_transport *t = TRANSPORT_FROM_WRITING(transport_writing); grpc_chttp2_run_with_global_lock(exec_ctx, t, NULL, - terminate_writing_with_lock, &success, - sizeof(success)); + terminate_writing_with_lock, + (void *)(uintptr_t)success, 0); } static void writing_action(grpc_exec_ctx *exec_ctx, void *gt, From a67a83ebde2ab47b230857d47330ac63c7ab62b1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 22 Mar 2016 21:43:59 -0700 Subject: [PATCH 0024/1894] Move the most important member first --- src/core/transport/transport.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/transport/transport.h b/src/core/transport/transport.h index 56ac927e365..908ef0bda45 100644 --- a/src/core/transport/transport.h +++ b/src/core/transport/transport.h @@ -98,6 +98,11 @@ void grpc_transport_move_stats(grpc_transport_stream_stats *from, /* Transport stream op: a set of operations to perform on a transport against a single stream */ typedef struct grpc_transport_stream_op { + /** Should be enqueued when all requested operations (excluding recv_message + and recv_initial_metadata which have their own closures) in a given batch + have been completed. */ + grpc_closure *on_complete; + /** Send initial metadata to the peer, from the provided metadata batch. */ grpc_metadata_batch *send_initial_metadata; @@ -124,11 +129,6 @@ typedef struct grpc_transport_stream_op { /** Collect any stats into provided buffer, zero internal stat counters */ grpc_transport_stream_stats *collect_stats; - /** Should be enqueued when all requested operations (excluding recv_message - and recv_initial_metadata which have their own closures) in a given batch - have been completed. */ - grpc_closure *on_complete; - /** If != GRPC_STATUS_OK, cancel this stream */ grpc_status_code cancel_with_status; From 2c8063cc7200789da67a10c53d98d0d15b1ad378 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 22 Mar 2016 22:12:15 -0700 Subject: [PATCH 0025/1894] Introduce a new memory reclamation scheme for channel stacks Allows the bottom member of the stack to schedule the actual deallocation, allowing a final transport lock to be entered when destroying a call. --- src/core/census/grpc_filter.c | 4 +- src/core/channel/channel_stack.c | 6 ++- src/core/channel/channel_stack.h | 11 +++-- src/core/channel/client_channel.c | 5 ++- src/core/channel/compress_filter.c | 4 +- src/core/channel/connected_channel.c | 13 +++--- src/core/channel/http_client_filter.c | 4 +- src/core/channel/http_server_filter.c | 4 +- src/core/client_config/subchannel.c | 6 +-- src/core/security/client_auth_filter.c | 4 +- src/core/security/server_auth_filter.c | 4 +- src/core/surface/call.c | 3 +- src/core/surface/lame_client.c | 12 +++--- src/core/surface/server.c | 4 +- src/core/transport/chttp2_transport.c | 57 +++++++++++++------------- src/core/transport/transport.c | 5 ++- src/core/transport/transport.h | 2 +- src/core/transport/transport_impl.h | 2 +- test/core/channel/channel_stack_test.c | 6 +-- 19 files changed, 83 insertions(+), 73 deletions(-) diff --git a/src/core/census/grpc_filter.c b/src/core/census/grpc_filter.c index c8aaf31e2d3..987407f050e 100644 --- a/src/core/census/grpc_filter.c +++ b/src/core/census/grpc_filter.c @@ -134,7 +134,7 @@ static void client_init_call_elem(grpc_exec_ctx *exec_ctx, } static void client_destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) { + grpc_call_element *elem, void *ignored) { call_data *d = elem->call_data; GPR_ASSERT(d != NULL); /* TODO(hongyu): record rpc client stats and census_rpc_end_op here */ @@ -152,7 +152,7 @@ static void server_init_call_elem(grpc_exec_ctx *exec_ctx, } static void server_destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) { + grpc_call_element *elem, void *ignored) { call_data *d = elem->call_data; GPR_ASSERT(d != NULL); /* TODO(hongyu): record rpc server stats and census_tracing_end_op here */ diff --git a/src/core/channel/channel_stack.c b/src/core/channel/channel_stack.c index 3e616883640..1869597975f 100644 --- a/src/core/channel/channel_stack.c +++ b/src/core/channel/channel_stack.c @@ -213,14 +213,16 @@ void grpc_call_stack_ignore_set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_pollset *pollset) {} -void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack) { +void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack, + void *and_free_memory) { grpc_call_element *elems = CALL_ELEMS_FROM_STACK(stack); size_t count = stack->count; size_t i; /* destroy per-filter data */ for (i = 0; i < count; i++) { - elems[i].filter->destroy_call_elem(exec_ctx, &elems[i]); + elems[i].filter->destroy_call_elem(exec_ctx, &elems[i], + i == count - 1 ? and_free_memory : NULL); } } diff --git a/src/core/channel/channel_stack.h b/src/core/channel/channel_stack.h index 52362f0b20e..4407333affe 100644 --- a/src/core/channel/channel_stack.h +++ b/src/core/channel/channel_stack.h @@ -104,8 +104,12 @@ typedef struct { void (*set_pollset)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_pollset *pollset); /* Destroy per call data. - The filter does not need to do any chaining */ - void (*destroy_call_elem)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem); + The filter does not need to do any chaining. + The bottom filter of a stack will be passed a non-NULL pointer to + \a and_free_memory that should be passed to gpr_free when destruction + is complete. */ + void (*destroy_call_elem)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + void *and_free_memory); /* sizeof(per channel data) */ size_t sizeof_channel_data; @@ -223,7 +227,8 @@ void grpc_call_stack_set_pollset(grpc_exec_ctx *exec_ctx, #endif /* Destroy a call stack */ -void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack); +void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack, + void *and_free_memory); /* Ignore set pollset - used by filters to implement the set_pollset method if they don't care about pollsets at all. Does nothing. */ diff --git a/src/core/channel/client_channel.c b/src/core/channel/client_channel.c index f021a8ae329..27d6e03d286 100644 --- a/src/core/channel/client_channel.c +++ b/src/core/channel/client_channel.c @@ -379,9 +379,10 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Destructor for call_data */ -static void destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) { +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + void *and_free_memory) { grpc_subchannel_call_holder_destroy(exec_ctx, elem->call_data); + gpr_free(and_free_memory); } /* Constructor for channel_data */ diff --git a/src/core/channel/compress_filter.c b/src/core/channel/compress_filter.c index 3e7ca08fd29..d5d5fc2e350 100644 --- a/src/core/channel/compress_filter.c +++ b/src/core/channel/compress_filter.c @@ -246,8 +246,8 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Destructor for call_data */ -static void destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) { +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + void *ignored) { /* grab pointers to our data from the call element */ call_data *calld = elem->call_data; gpr_slice_buffer_destroy(&calld->slices); diff --git a/src/core/channel/connected_channel.c b/src/core/channel/connected_channel.c index e7ed3ccfebe..e6e9daa4522 100644 --- a/src/core/channel/connected_channel.c +++ b/src/core/channel/connected_channel.c @@ -37,13 +37,13 @@ #include #include -#include "src/core/support/string.h" -#include "src/core/transport/transport.h" -#include "src/core/profiling/timers.h" #include #include #include #include +#include "src/core/profiling/timers.h" +#include "src/core/support/string.h" +#include "src/core/transport/transport.h" #define MAX_BUFFER_LENGTH 8192 @@ -102,12 +102,13 @@ static void set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Destructor for call_data */ -static void destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) { +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + void *and_free_memory) { call_data *calld = elem->call_data; channel_data *chand = elem->channel_data; grpc_transport_destroy_stream(exec_ctx, chand->transport, - TRANSPORT_STREAM_FROM_CALL_DATA(calld)); + TRANSPORT_STREAM_FROM_CALL_DATA(calld), + and_free_memory); } /* Constructor for channel_data */ diff --git a/src/core/channel/http_client_filter.c b/src/core/channel/http_client_filter.c index 1aa27208c2e..26f1110ac47 100644 --- a/src/core/channel/http_client_filter.c +++ b/src/core/channel/http_client_filter.c @@ -151,8 +151,8 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Destructor for call_data */ -static void destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) {} +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + void *ignored) {} static grpc_mdelem *scheme_from_args(const grpc_channel_args *args) { unsigned i; diff --git a/src/core/channel/http_server_filter.c b/src/core/channel/http_server_filter.c index 370f8dbe423..6c97a0762d3 100644 --- a/src/core/channel/http_server_filter.c +++ b/src/core/channel/http_server_filter.c @@ -212,8 +212,8 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Destructor for call_data */ -static void destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) {} +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + void *ignored) {} /* Constructor for channel_data */ static void init_channel_elem(grpc_exec_ctx *exec_ctx, diff --git a/src/core/client_config/subchannel.c b/src/core/client_config/subchannel.c index 8f150a8d81d..7a61df40df7 100644 --- a/src/core/client_config/subchannel.c +++ b/src/core/client_config/subchannel.c @@ -620,9 +620,9 @@ static void subchannel_call_destroy(grpc_exec_ctx *exec_ctx, void *call, bool success) { grpc_subchannel_call *c = call; GPR_TIMER_BEGIN("grpc_subchannel_call_unref.destroy", 0); - grpc_call_stack_destroy(exec_ctx, SUBCHANNEL_CALL_TO_CALL_STACK(c)); - GRPC_CONNECTED_SUBCHANNEL_UNREF(exec_ctx, c->connection, "subchannel_call"); - gpr_free(c); + grpc_connected_subchannel *connection = c->connection; + grpc_call_stack_destroy(exec_ctx, SUBCHANNEL_CALL_TO_CALL_STACK(c), c); + GRPC_CONNECTED_SUBCHANNEL_UNREF(exec_ctx, connection, "subchannel_call"); GPR_TIMER_END("grpc_subchannel_call_unref.destroy", 0); } diff --git a/src/core/security/client_auth_filter.c b/src/core/security/client_auth_filter.c index 332d4259d28..c72bfc40e68 100644 --- a/src/core/security/client_auth_filter.c +++ b/src/core/security/client_auth_filter.c @@ -277,8 +277,8 @@ static void set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Destructor for call_data */ -static void destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) { +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + void *ignored) { call_data *calld = elem->call_data; grpc_call_credentials_unref(calld->creds); if (calld->host != NULL) { diff --git a/src/core/security/server_auth_filter.c b/src/core/security/server_auth_filter.c index 3d8e5e8d35d..3d348c8266e 100644 --- a/src/core/security/server_auth_filter.c +++ b/src/core/security/server_auth_filter.c @@ -224,8 +224,8 @@ static void set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_pollset *pollset) {} /* Destructor for call_data */ -static void destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) {} +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + void *ignored) {} /* Constructor for channel_data */ static void init_channel_elem(grpc_exec_ctx *exec_ctx, diff --git a/src/core/surface/call.c b/src/core/surface/call.c index d9808e6f4cc..e7861b8e3bd 100644 --- a/src/core/surface/call.c +++ b/src/core/surface/call.c @@ -375,7 +375,6 @@ static void destroy_call(grpc_exec_ctx *exec_ctx, void *call, bool success) { if (c->receiving_stream != NULL) { grpc_byte_stream_destroy(exec_ctx, c->receiving_stream); } - grpc_call_stack_destroy(exec_ctx, CALL_STACK_FROM_CALL(c)); GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, c->channel, "call"); gpr_mu_destroy(&c->mu); for (i = 0; i < STATUS_SOURCE_COUNT; i++) { @@ -394,7 +393,7 @@ static void destroy_call(grpc_exec_ctx *exec_ctx, void *call, bool success) { if (c->cq) { GRPC_CQ_INTERNAL_UNREF(c->cq, "bind"); } - gpr_free(c); + grpc_call_stack_destroy(exec_ctx, CALL_STACK_FROM_CALL(c), c); GPR_TIMER_END("destroy_call", 0); } diff --git a/src/core/surface/lame_client.c b/src/core/surface/lame_client.c index 58f89946d22..9ef88bba652 100644 --- a/src/core/surface/lame_client.c +++ b/src/core/surface/lame_client.c @@ -37,13 +37,13 @@ #include +#include +#include #include "src/core/channel/channel_stack.h" #include "src/core/support/string.h" #include "src/core/surface/api_trace.h" -#include "src/core/surface/channel.h" #include "src/core/surface/call.h" -#include -#include +#include "src/core/surface/channel.h" typedef struct { grpc_linked_mdelem status; @@ -104,8 +104,10 @@ static void lame_start_transport_op(grpc_exec_ctx *exec_ctx, static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) {} -static void destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) {} +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + void *and_free_memory) { + gpr_free(and_free_memory); +} static void init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, diff --git a/src/core/surface/server.c b/src/core/surface/server.c index da93474b261..88554e4224c 100644 --- a/src/core/surface/server.c +++ b/src/core/surface/server.c @@ -692,8 +692,8 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, server_ref(chand->server); } -static void destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) { +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + void *ignored) { channel_data *chand = elem->channel_data; call_data *calld = elem->call_data; diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 182c713ee78..3a73826c3aa 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -512,26 +512,20 @@ static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, return 0; } -static void destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, - grpc_stream *gs) { - grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; - grpc_chttp2_stream *s = (grpc_chttp2_stream *)gs; +static void destroy_stream_locked(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, + grpc_chttp2_stream *s, void *arg) { grpc_byte_stream *bs; -#if 0 - int i; - GPR_TIMER_BEGIN("destroy_stream", 0); - gpr_mu_lock(&t->mu); - GPR_ASSERT((s->global.write_closed && s->global.read_closed) || s->global.id == 0); GPR_ASSERT(!s->global.in_stream_map); if (grpc_chttp2_unregister_stream(t, s) && t->global.sent_goaway) { - close_transport_locked(exec_ctx, t); + close_transport_locked(exec_ctx, t, NULL, NULL); } - if (!t->parsing_active && s->global.id) { + if (!t->executor.parsing_active && s->global.id) { GPR_ASSERT(grpc_chttp2_stream_map_find(&t->parsing_stream_map, s->global.id) == NULL); } @@ -539,11 +533,11 @@ static void destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, grpc_chttp2_list_remove_unannounced_incoming_window_available(&t->global, &s->global); grpc_chttp2_list_remove_stalled_by_transport(&t->global, &s->global); -#endif - int i; + /* TODO(ctiller): the remainder of this function could be done without the + global lock */ - for (i = 0; i < STREAM_LIST_COUNT; i++) { + for (int i = 0; i < STREAM_LIST_COUNT; i++) { if (s->included[i]) { gpr_log(GPR_ERROR, "%s stream %d still included in list %d", t->global.is_client ? "client" : "server", s->global.id, i); @@ -574,6 +568,17 @@ static void destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, UNREF_TRANSPORT(exec_ctx, t, "stream"); GPR_TIMER_END("destroy_stream", 0); + + gpr_free(arg); +} + +static void destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, + grpc_stream *gs, void *and_free_memory) { + grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; + grpc_chttp2_stream *s = (grpc_chttp2_stream *)gs; + + grpc_chttp2_run_with_global_lock(exec_ctx, t, s, destroy_stream_locked, + and_free_memory, 0); } grpc_chttp2_stream_parsing *grpc_chttp2_parsing_lookup_stream( @@ -1509,8 +1514,8 @@ static void parsing_action(grpc_exec_ctx *exec_ctx, void *arg, bool success) { GPR_TIMER_BEGIN("reading_action.parse", 0); size_t i = 0; for (; i < t->read_buffer.count && - grpc_chttp2_perform_read(exec_ctx, &t->parsing, - t->read_buffer.slices[i]); + grpc_chttp2_perform_read(exec_ctx, &t->parsing, + t->read_buffer.slices[i]); i++) ; if (i != t->read_buffer.count) { @@ -1602,10 +1607,9 @@ static void connectivity_state_set( grpc_connectivity_state state, const char *reason) { GRPC_CHTTP2_IF_TRACING( gpr_log(GPR_DEBUG, "set connectivity_state=%d", state)); - grpc_connectivity_state_set( - exec_ctx, - &TRANSPORT_FROM_GLOBAL(transport_global)->channel_callback.state_tracker, - state, reason); + grpc_connectivity_state_set(exec_ctx, &TRANSPORT_FROM_GLOBAL(transport_global) + ->channel_callback.state_tracker, + state, reason); } /******************************************************************************* @@ -1915,15 +1919,10 @@ static char *chttp2_get_peer(grpc_exec_ctx *exec_ctx, grpc_transport *t) { return gpr_strdup(((grpc_chttp2_transport *)t)->peer_string); } -static const grpc_transport_vtable vtable = {sizeof(grpc_chttp2_stream), - "chttp2", - init_stream, - set_pollset, - perform_stream_op, - perform_transport_op, - destroy_stream, - destroy_transport, - chttp2_get_peer}; +static const grpc_transport_vtable vtable = { + sizeof(grpc_chttp2_stream), "chttp2", init_stream, set_pollset, + perform_stream_op, perform_transport_op, destroy_stream, destroy_transport, + chttp2_get_peer}; grpc_transport *grpc_create_chttp2_transport( grpc_exec_ctx *exec_ctx, const grpc_channel_args *channel_args, diff --git a/src/core/transport/transport.c b/src/core/transport/transport.c index 5b5af0e7d0b..b42980431a3 100644 --- a/src/core/transport/transport.c +++ b/src/core/transport/transport.c @@ -133,8 +133,9 @@ void grpc_transport_set_pollset(grpc_exec_ctx *exec_ctx, void grpc_transport_destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *transport, - grpc_stream *stream) { - transport->vtable->destroy_stream(exec_ctx, transport, stream); + grpc_stream *stream, void *and_free_memory) { + transport->vtable->destroy_stream(exec_ctx, transport, stream, + and_free_memory); } char *grpc_transport_get_peer(grpc_exec_ctx *exec_ctx, diff --git a/src/core/transport/transport.h b/src/core/transport/transport.h index 908ef0bda45..ddb81f9a34b 100644 --- a/src/core/transport/transport.h +++ b/src/core/transport/transport.h @@ -208,7 +208,7 @@ void grpc_transport_set_pollset(grpc_exec_ctx *exec_ctx, caller, but any child memory must be cleaned up) */ void grpc_transport_destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *transport, - grpc_stream *stream); + grpc_stream *stream, void *and_free_memory); void grpc_transport_stream_op_finish_with_failure(grpc_exec_ctx *exec_ctx, grpc_transport_stream_op *op); diff --git a/src/core/transport/transport_impl.h b/src/core/transport/transport_impl.h index d9ecc4d2ba2..9d53971f4d5 100644 --- a/src/core/transport/transport_impl.h +++ b/src/core/transport/transport_impl.h @@ -63,7 +63,7 @@ typedef struct grpc_transport_vtable { /* implementation of grpc_transport_destroy_stream */ void (*destroy_stream)(grpc_exec_ctx *exec_ctx, grpc_transport *self, - grpc_stream *stream); + grpc_stream *stream, void *and_free_memory); /* implementation of grpc_transport_destroy */ void (*destroy)(grpc_exec_ctx *exec_ctx, grpc_transport *self); diff --git a/test/core/channel/channel_stack_test.c b/test/core/channel/channel_stack_test.c index e19e9a57aed..ca7c57c94e8 100644 --- a/test/core/channel/channel_stack_test.c +++ b/test/core/channel/channel_stack_test.c @@ -62,8 +62,8 @@ static void call_init_func(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, static void channel_destroy_func(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem) {} -static void call_destroy_func(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) { +static void call_destroy_func(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + void *ignored) { ++*(int *)(elem->channel_data); } @@ -87,7 +87,7 @@ static void free_channel(grpc_exec_ctx *exec_ctx, void *arg, bool success) { } static void free_call(grpc_exec_ctx *exec_ctx, void *arg, bool success) { - grpc_call_stack_destroy(exec_ctx, arg); + grpc_call_stack_destroy(exec_ctx, arg, NULL); gpr_free(arg); } From 414217e22c019d8c23e528fb010091244506d896 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 25 Mar 2016 13:31:06 -0700 Subject: [PATCH 0026/1894] Fix ordering problem: trailing metadata could come before the last message was read --- src/core/surface/completion_queue.c | 4 ++ src/core/transport/chttp2/internal.h | 19 ++++--- src/core/transport/chttp2_transport.c | 74 ++++++++++++++++++++++----- 3 files changed, 76 insertions(+), 21 deletions(-) diff --git a/src/core/surface/completion_queue.c b/src/core/surface/completion_queue.c index b22818ea87d..1e7d1b0028d 100644 --- a/src/core/surface/completion_queue.c +++ b/src/core/surface/completion_queue.c @@ -227,6 +227,10 @@ void grpc_cq_end_op(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc, #endif GPR_TIMER_BEGIN("grpc_cq_end_op", 0); + GRPC_API_TRACE( + "grpc_cq_end_op(exec_ctx=%p, cc=%p, tag=%p, success=%d, done=%p, " + "done_arg=%p, storage=%p)", + 7, (exec_ctx, cc, tag, success, done, done_arg, storage)); storage->tag = tag; storage->done = done; diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 8c5ed6532b1..7f6c4d3de22 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -416,21 +416,26 @@ typedef struct { grpc_transport_stream_stats *collecting_stats; grpc_transport_stream_stats stats; + /** number of streams that are currently being read */ + gpr_refcount active_streams; + /** when the application requests writes be closed, the write_closed is 'queued'; when the close is flow controlled into the send path, we are 'sending' it; when the write has been performed it is 'sent' */ - uint8_t write_closed; + bool write_closed; /** is this stream reading half-closed (boolean) */ - uint8_t read_closed; + bool read_closed; + /** are all published incoming byte streams closed */ + bool all_incoming_byte_streams_finished; /** is this stream in the stream map? (boolean) */ - uint8_t in_stream_map; + bool in_stream_map; /** has this stream seen an error? if 1, then pending incoming frames can be thrown away */ - uint8_t seen_error; + bool seen_error; - uint8_t published_initial_metadata; - uint8_t published_trailing_metadata; - uint8_t faked_trailing_metadata; + bool published_initial_metadata; + bool published_trailing_metadata; + bool faked_trailing_metadata; grpc_chttp2_incoming_metadata_buffer received_initial_metadata; grpc_chttp2_incoming_metadata_buffer received_trailing_metadata; diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 3a73826c3aa..8f660a537fd 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -478,6 +478,10 @@ static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, memset(s, 0, sizeof(*s)); s->refcount = refcount; + /* We reserve one 'active stream' that's dropped when the stream is + read-closed. The others are for incoming_byte_streams that are actively + reading */ + gpr_ref_init(&s->global.active_streams, 1); GRPC_CHTTP2_STREAM_REF(&s->global, "chttp2"); grpc_chttp2_incoming_metadata_buffer_init(&s->parsing.metadata_buffer[0]); @@ -1169,7 +1173,7 @@ static void check_read_ops(grpc_exec_ctx *exec_ctx, &stream_global->incoming_frames)) != NULL) { grpc_byte_stream_destroy(exec_ctx, bs); } - if (stream_global->incoming_frames.head == NULL) { + if (stream_global->all_incoming_byte_streams_finished) { grpc_chttp2_incoming_metadata_buffer_publish( &stream_global->received_trailing_metadata, stream_global->recv_trailing_metadata); @@ -1181,6 +1185,15 @@ static void check_read_ops(grpc_exec_ctx *exec_ctx, } } +static void decrement_active_streams_locked( + grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global) { + if ((stream_global->all_incoming_byte_streams_finished = + gpr_unref(&stream_global->active_streams))) { + grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); + } +} + static void remove_stream(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, uint32_t id) { size_t new_stream_count; @@ -1297,6 +1310,7 @@ void grpc_chttp2_mark_stream_closed( stream_global->read_closed = 1; stream_global->published_initial_metadata = 1; stream_global->published_trailing_metadata = 1; + decrement_active_streams_locked(exec_ctx, transport_global, stream_global); } if (close_writes && !stream_global->write_closed) { stream_global->write_closed = 1; @@ -1730,8 +1744,14 @@ static int incoming_byte_stream_next(grpc_exec_ctx *exec_ctx, return 0; } -static void incoming_byte_stream_unref(grpc_chttp2_incoming_byte_stream *bs) { +static void incoming_byte_stream_unref_locked(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, + grpc_chttp2_stream *s, + void *argp) { + grpc_chttp2_incoming_byte_stream *bs = argp; if (gpr_unref(&bs->refs)) { + decrement_active_streams_locked(exec_ctx, &bs->transport->global, + &bs->stream->global); gpr_slice_buffer_destroy(&bs->slices); gpr_free(bs); } @@ -1739,7 +1759,10 @@ static void incoming_byte_stream_unref(grpc_chttp2_incoming_byte_stream *bs) { static void incoming_byte_stream_destroy(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream) { - incoming_byte_stream_unref((grpc_chttp2_incoming_byte_stream *)byte_stream); + grpc_chttp2_incoming_byte_stream *bs = + (grpc_chttp2_incoming_byte_stream *)byte_stream; + grpc_chttp2_run_with_global_lock(exec_ctx, bs->transport, bs->stream, + incoming_byte_stream_unref_locked, bs, 0); } typedef struct { @@ -1771,30 +1794,52 @@ void grpc_chttp2_incoming_byte_stream_push(grpc_exec_ctx *exec_ctx, sizeof(arg)); } -static void incoming_byte_stream_finished_locked(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport *t, - grpc_chttp2_stream *s, - void *argp) { +static void incoming_byte_stream_deactivate_locked( + grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, + grpc_chttp2_incoming_byte_stream *bs) { + incoming_byte_stream_unref_locked(exec_ctx, t, s, bs); +} + +static void incoming_byte_stream_finished_failed_locked( + grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, + void *argp) { grpc_chttp2_incoming_byte_stream *bs = argp; grpc_exec_ctx_enqueue(exec_ctx, bs->on_next, false, NULL); bs->on_next = NULL; bs->failed = 1; + incoming_byte_stream_deactivate_locked(exec_ctx, t, s, bs); +} + +static void incoming_byte_stream_finished_ok_locked(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, + grpc_chttp2_stream *s, + void *argp) { + grpc_chttp2_incoming_byte_stream *bs = argp; + incoming_byte_stream_deactivate_locked(exec_ctx, t, s, bs); } void grpc_chttp2_incoming_byte_stream_finished( grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_byte_stream *bs, int success, int from_parsing_thread) { - if (!success) { - if (from_parsing_thread) { + if (from_parsing_thread) { + if (success) { grpc_chttp2_run_with_global_lock(exec_ctx, bs->transport, bs->stream, - incoming_byte_stream_finished_locked, bs, - 0); + incoming_byte_stream_finished_ok_locked, + bs, 0); + } else { + incoming_byte_stream_finished_ok_locked(exec_ctx, bs->transport, + bs->stream, bs); + } + } else { + if (success) { + grpc_chttp2_run_with_global_lock( + exec_ctx, bs->transport, bs->stream, + incoming_byte_stream_finished_failed_locked, bs, 0); } else { - incoming_byte_stream_finished_locked(exec_ctx, bs->transport, bs->stream, - bs); + incoming_byte_stream_finished_failed_locked(exec_ctx, bs->transport, + bs->stream, bs); } } - incoming_byte_stream_unref(bs); } grpc_chttp2_incoming_byte_stream *grpc_chttp2_incoming_byte_stream_create( @@ -1811,6 +1856,7 @@ grpc_chttp2_incoming_byte_stream *grpc_chttp2_incoming_byte_stream_create( incoming_byte_stream->next_message = NULL; incoming_byte_stream->transport = TRANSPORT_FROM_PARSING(transport_parsing); incoming_byte_stream->stream = STREAM_FROM_PARSING(stream_parsing); + gpr_ref(&incoming_byte_stream->stream->global.active_streams); gpr_slice_buffer_init(&incoming_byte_stream->slices); incoming_byte_stream->on_next = NULL; incoming_byte_stream->is_tail = 1; From a3b54cdff87181193bf66022d204635ddb24cd80 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 25 Mar 2016 15:59:55 -0700 Subject: [PATCH 0027/1894] Get asan passing with new locking scheme --- src/core/iomgr/iomgr.c | 6 +- src/core/transport/chttp2/internal.h | 3 + src/core/transport/chttp2/stream_lists.c | 8 +++ src/core/transport/chttp2_transport.c | 82 +++++++++++++----------- src/core/transport/transport.h | 2 +- 5 files changed, 62 insertions(+), 39 deletions(-) diff --git a/src/core/iomgr/iomgr.c b/src/core/iomgr/iomgr.c index 3ab4430668e..5a617e1e485 100644 --- a/src/core/iomgr/iomgr.c +++ b/src/core/iomgr/iomgr.c @@ -168,8 +168,10 @@ bool grpc_iomgr_abort_on_leaks(void) { if (env == NULL) return false; static const char *truthy[] = {"yes", "Yes", "YES", "true", "True", "TRUE", "1"}; + bool should_we = false; for (size_t i = 0; i < GPR_ARRAY_SIZE(truthy); i++) { - if (0 == strcmp(env, truthy[i])) return true; + if (0 == strcmp(env, truthy[i])) should_we = true; } - return false; + gpr_free(env); + return should_we; } diff --git a/src/core/transport/chttp2/internal.h b/src/core/transport/chttp2/internal.h index 7f6c4d3de22..e447b0d4226 100644 --- a/src/core/transport/chttp2/internal.h +++ b/src/core/transport/chttp2/internal.h @@ -594,6 +594,9 @@ int grpc_chttp2_list_pop_waiting_for_concurrency( void grpc_chttp2_list_add_check_read_ops( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global); +bool grpc_chttp2_list_remove_check_read_ops( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global); int grpc_chttp2_list_pop_check_read_ops( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global **stream_global); diff --git a/src/core/transport/chttp2/stream_lists.c b/src/core/transport/chttp2/stream_lists.c index 60fe735cfce..053ded1bc34 100644 --- a/src/core/transport/chttp2/stream_lists.c +++ b/src/core/transport/chttp2/stream_lists.c @@ -305,6 +305,14 @@ void grpc_chttp2_list_add_check_read_ops( GRPC_CHTTP2_LIST_CHECK_READ_OPS); } +bool grpc_chttp2_list_remove_check_read_ops( + grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global) { + return stream_list_maybe_remove(TRANSPORT_FROM_GLOBAL(transport_global), + STREAM_FROM_GLOBAL(stream_global), + GRPC_CHTTP2_LIST_CHECK_READ_OPS); +} + int grpc_chttp2_list_pop_check_read_ops( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global **stream_global) { diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index 8f660a537fd..d71061452ac 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -140,7 +140,10 @@ static void incoming_byte_stream_update_flow_control( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, size_t max_size_hint, size_t have_already); - +static void incoming_byte_stream_destroy_locked(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, + grpc_chttp2_stream *s, + void *byte_stream); static void fail_pending_writes(grpc_exec_ctx *exec_ctx, grpc_chttp2_stream_global *stream_global); @@ -534,12 +537,15 @@ static void destroy_stream_locked(grpc_exec_ctx *exec_ctx, s->global.id) == NULL); } + while ( + (bs = grpc_chttp2_incoming_frame_queue_pop(&s->global.incoming_frames))) { + incoming_byte_stream_destroy_locked(exec_ctx, NULL, NULL, bs); + } + grpc_chttp2_list_remove_unannounced_incoming_window_available(&t->global, &s->global); grpc_chttp2_list_remove_stalled_by_transport(&t->global, &s->global); - - /* TODO(ctiller): the remainder of this function could be done without the - global lock */ + grpc_chttp2_list_remove_check_read_ops(&t->global, &s->global); for (int i = 0; i < STREAM_LIST_COUNT; i++) { if (s->included[i]) { @@ -549,11 +555,6 @@ static void destroy_stream_locked(grpc_exec_ctx *exec_ctx, } } - while ( - (bs = grpc_chttp2_incoming_frame_queue_pop(&s->global.incoming_frames))) { - grpc_byte_stream_destroy(exec_ctx, bs); - } - GPR_ASSERT(s->global.send_initial_metadata_finished == NULL); GPR_ASSERT(s->global.send_message_finished == NULL); GPR_ASSERT(s->global.send_trailing_metadata_finished == NULL); @@ -1150,7 +1151,7 @@ static void check_read_ops(grpc_exec_ctx *exec_ctx, while (stream_global->seen_error && (bs = grpc_chttp2_incoming_frame_queue_pop( &stream_global->incoming_frames)) != NULL) { - grpc_byte_stream_destroy(exec_ctx, bs); + incoming_byte_stream_destroy_locked(exec_ctx, NULL, NULL, bs); } if (stream_global->incoming_frames.head != NULL) { *stream_global->recv_message = grpc_chttp2_incoming_frame_queue_pop( @@ -1171,7 +1172,7 @@ static void check_read_ops(grpc_exec_ctx *exec_ctx, while (stream_global->seen_error && (bs = grpc_chttp2_incoming_frame_queue_pop( &stream_global->incoming_frames)) != NULL) { - grpc_byte_stream_destroy(exec_ctx, bs); + incoming_byte_stream_destroy_locked(exec_ctx, NULL, NULL, bs); } if (stream_global->all_incoming_byte_streams_finished) { grpc_chttp2_incoming_metadata_buffer_publish( @@ -1528,8 +1529,8 @@ static void parsing_action(grpc_exec_ctx *exec_ctx, void *arg, bool success) { GPR_TIMER_BEGIN("reading_action.parse", 0); size_t i = 0; for (; i < t->read_buffer.count && - grpc_chttp2_perform_read(exec_ctx, &t->parsing, - t->read_buffer.slices[i]); + grpc_chttp2_perform_read(exec_ctx, &t->parsing, + t->read_buffer.slices[i]); i++) ; if (i != t->read_buffer.count) { @@ -1621,9 +1622,10 @@ static void connectivity_state_set( grpc_connectivity_state state, const char *reason) { GRPC_CHTTP2_IF_TRACING( gpr_log(GPR_DEBUG, "set connectivity_state=%d", state)); - grpc_connectivity_state_set(exec_ctx, &TRANSPORT_FROM_GLOBAL(transport_global) - ->channel_callback.state_tracker, - state, reason); + grpc_connectivity_state_set( + exec_ctx, + &TRANSPORT_FROM_GLOBAL(transport_global)->channel_callback.state_tracker, + state, reason); } /******************************************************************************* @@ -1744,25 +1746,34 @@ static int incoming_byte_stream_next(grpc_exec_ctx *exec_ctx, return 0; } -static void incoming_byte_stream_unref_locked(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport *t, - grpc_chttp2_stream *s, - void *argp) { - grpc_chttp2_incoming_byte_stream *bs = argp; +static void incoming_byte_stream_unref(grpc_exec_ctx *exec_ctx, + grpc_chttp2_incoming_byte_stream *bs) { if (gpr_unref(&bs->refs)) { - decrement_active_streams_locked(exec_ctx, &bs->transport->global, - &bs->stream->global); gpr_slice_buffer_destroy(&bs->slices); gpr_free(bs); } } +static void incoming_byte_stream_destroy(grpc_exec_ctx *exec_ctx, + grpc_byte_stream *byte_stream); + +static void incoming_byte_stream_destroy_locked(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t, + grpc_chttp2_stream *s, + void *byte_stream) { + grpc_chttp2_incoming_byte_stream *bs = byte_stream; + GPR_ASSERT(bs->base.destroy == incoming_byte_stream_destroy); + decrement_active_streams_locked(exec_ctx, &bs->transport->global, + &bs->stream->global); + incoming_byte_stream_unref(exec_ctx, bs); +} + static void incoming_byte_stream_destroy(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream) { grpc_chttp2_incoming_byte_stream *bs = (grpc_chttp2_incoming_byte_stream *)byte_stream; grpc_chttp2_run_with_global_lock(exec_ctx, bs->transport, bs->stream, - incoming_byte_stream_unref_locked, bs, 0); + incoming_byte_stream_destroy_locked, bs, 0); } typedef struct { @@ -1794,12 +1805,6 @@ void grpc_chttp2_incoming_byte_stream_push(grpc_exec_ctx *exec_ctx, sizeof(arg)); } -static void incoming_byte_stream_deactivate_locked( - grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, - grpc_chttp2_incoming_byte_stream *bs) { - incoming_byte_stream_unref_locked(exec_ctx, t, s, bs); -} - static void incoming_byte_stream_finished_failed_locked( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, void *argp) { @@ -1807,7 +1812,7 @@ static void incoming_byte_stream_finished_failed_locked( grpc_exec_ctx_enqueue(exec_ctx, bs->on_next, false, NULL); bs->on_next = NULL; bs->failed = 1; - incoming_byte_stream_deactivate_locked(exec_ctx, t, s, bs); + incoming_byte_stream_unref(exec_ctx, bs); } static void incoming_byte_stream_finished_ok_locked(grpc_exec_ctx *exec_ctx, @@ -1815,7 +1820,7 @@ static void incoming_byte_stream_finished_ok_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_stream *s, void *argp) { grpc_chttp2_incoming_byte_stream *bs = argp; - incoming_byte_stream_deactivate_locked(exec_ctx, t, s, bs); + incoming_byte_stream_unref(exec_ctx, bs); } void grpc_chttp2_incoming_byte_stream_finished( @@ -1965,10 +1970,15 @@ static char *chttp2_get_peer(grpc_exec_ctx *exec_ctx, grpc_transport *t) { return gpr_strdup(((grpc_chttp2_transport *)t)->peer_string); } -static const grpc_transport_vtable vtable = { - sizeof(grpc_chttp2_stream), "chttp2", init_stream, set_pollset, - perform_stream_op, perform_transport_op, destroy_stream, destroy_transport, - chttp2_get_peer}; +static const grpc_transport_vtable vtable = {sizeof(grpc_chttp2_stream), + "chttp2", + init_stream, + set_pollset, + perform_stream_op, + perform_transport_op, + destroy_stream, + destroy_transport, + chttp2_get_peer}; grpc_transport *grpc_create_chttp2_transport( grpc_exec_ctx *exec_ctx, const grpc_channel_args *channel_args, diff --git a/src/core/transport/transport.h b/src/core/transport/transport.h index ddb81f9a34b..c7778df47df 100644 --- a/src/core/transport/transport.h +++ b/src/core/transport/transport.h @@ -50,7 +50,7 @@ typedef struct grpc_transport grpc_transport; for a stream. */ typedef struct grpc_stream grpc_stream; -/*#define GRPC_STREAM_REFCOUNT_DEBUG*/ +#define GRPC_STREAM_REFCOUNT_DEBUG typedef struct grpc_stream_refcount { gpr_refcount refs; From 489b4744bee765e11825f0918c4f75bc9d09f1f1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 26 Mar 2016 13:38:29 -0700 Subject: [PATCH 0028/1894] Fix copyrights --- src/core/channel/channel_stack.c | 2 +- src/core/transport/chttp2/frame_rst_stream.c | 2 +- src/core/transport/chttp2/frame_window_update.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/channel/channel_stack.c b/src/core/channel/channel_stack.c index 1869597975f..8fbf8438f66 100644 --- a/src/core/channel/channel_stack.c +++ b/src/core/channel/channel_stack.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/transport/chttp2/frame_rst_stream.c b/src/core/transport/chttp2/frame_rst_stream.c index 8063dfbb211..a5655ce79ba 100644 --- a/src/core/transport/chttp2/frame_rst_stream.c +++ b/src/core/transport/chttp2/frame_rst_stream.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/transport/chttp2/frame_window_update.c b/src/core/transport/chttp2/frame_window_update.c index 4a6944eef78..f7ae6003c84 100644 --- a/src/core/transport/chttp2/frame_window_update.c +++ b/src/core/transport/chttp2/frame_window_update.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without From d12bdd11cb9e320fe9be2ab13c43d7c4f27094e0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 26 Mar 2016 16:01:00 -0700 Subject: [PATCH 0029/1894] Fix inadvertent race --- src/core/transport/chttp2_transport.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/transport/chttp2_transport.c b/src/core/transport/chttp2_transport.c index d71061452ac..227591bf18b 100644 --- a/src/core/transport/chttp2_transport.c +++ b/src/core/transport/chttp2_transport.c @@ -1079,6 +1079,7 @@ static void perform_transport_op_locked(grpc_exec_ctx *exec_ctx, GPR_ASSERT(t->post_parsing_op == NULL); t->post_parsing_op = gpr_malloc(sizeof(*op)); memcpy(t->post_parsing_op, op, sizeof(*op)); + return; } grpc_exec_ctx_enqueue(exec_ctx, op->on_consumed, true, NULL); From caf606f0794818930ff9e531567d95cf8b20b9f8 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 26 Mar 2016 18:09:56 -0700 Subject: [PATCH 0030/1894] Turn off debug --- src/core/transport/transport.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/transport/transport.h b/src/core/transport/transport.h index c7778df47df..ddb81f9a34b 100644 --- a/src/core/transport/transport.h +++ b/src/core/transport/transport.h @@ -50,7 +50,7 @@ typedef struct grpc_transport grpc_transport; for a stream. */ typedef struct grpc_stream grpc_stream; -#define GRPC_STREAM_REFCOUNT_DEBUG +/*#define GRPC_STREAM_REFCOUNT_DEBUG*/ typedef struct grpc_stream_refcount { gpr_refcount refs; From 086f91cab6d32dc5b0609cf3735937309f04b18d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 4 Apr 2016 23:23:08 -0700 Subject: [PATCH 0031/1894] Fix include guards --- src/core/lib/iomgr/ev_poll_posix.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/lib/iomgr/ev_poll_posix.h b/src/core/lib/iomgr/ev_poll_posix.h index 6acf50db082..291736a2dbe 100644 --- a/src/core/lib/iomgr/ev_poll_posix.h +++ b/src/core/lib/iomgr/ev_poll_posix.h @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_INTERNAL_CORE_IOMGR_EV_POLL_POSIX_H -#define GRPC_INTERNAL_CORE_IOMGR_EV_POLL_POSIX_H +#ifndef GRPC_CORE_LIB_IOMGR_EV_POLL_POSIX_H +#define GRPC_CORE_LIB_IOMGR_EV_POLL_POSIX_H #include "src/core/lib/iomgr/ev_posix.h" const grpc_event_engine_vtable *grpc_init_poll_posix(void); -#endif // GRPC_INTERNAL_CORE_IOMGR_EV_POLL_AND_EPOLL_POSIX_H +#endif /* GRPC_CORE_LIB_IOMGR_EV_POLL_POSIX_H */ From cc719a4dfff61fdb7c78225d4f5f79a966717e13 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 5 Apr 2016 21:42:03 -0700 Subject: [PATCH 0032/1894] x --- tools/gource/gource.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/gource/gource.sh b/tools/gource/gource.sh index e759c4ee604..ed0d1a93825 100755 --- a/tools/gource/gource.sh +++ b/tools/gource/gource.sh @@ -28,4 +28,4 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -gource --multi-sampling -c 4 -s 0.1 --max-file-lag 0.05 --max-files 0 -e 0.05 --hide filenames,dirnames $* +gource --multi-sampling -s 0.1 --max-file-lag 0.05 --max-files 0 -e 0.05 --hide filenames,dirnames $* From 946ce7a46a7409196d563360ddf8a4139a9bde4b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 6 Apr 2016 10:35:58 -0700 Subject: [PATCH 0033/1894] Allow flagging tests that arent dependent on polling strategy --- tools/buildgen/plugins/make_fuzzer_tests.py | 1 + tools/run_tests/run_tests.py | 15 +- tools/run_tests/tests.json | 3345 ++++++++++++------- 3 files changed, 2240 insertions(+), 1121 deletions(-) diff --git a/tools/buildgen/plugins/make_fuzzer_tests.py b/tools/buildgen/plugins/make_fuzzer_tests.py index 806489bcd20..d5c18a687be 100644 --- a/tools/buildgen/plugins/make_fuzzer_tests.py +++ b/tools/buildgen/plugins/make_fuzzer_tests.py @@ -51,6 +51,7 @@ def mako_plugin(dictionary): 'exclude_configs': [], 'platforms': ['linux', 'mac', 'windows', 'posix'], 'ci_platforms': ['linux', 'mac', 'windows', 'posix'], + 'uses_polling': False, 'flaky': False, 'language': 'c', 'cpu_cost': 0.1, diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index a8fc45780ad..b064ed67756 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -159,12 +159,15 @@ class CLanguage(object): 'posix': ['all'], 'linux': ['poll', 'legacy'] } - for polling_strategy in POLLING_STRATEGIES[self.platform]: - env={'GRPC_DEFAULT_SSL_ROOTS_FILE_PATH': - _ROOT + '/src/core/lib/tsi/test_creds/ca.pem', - 'GRPC_POLLING_STRATEGY': polling_strategy} - shortname_ext = '' if polling_strategy=='all' else ' polling=%s' % polling_strategy - for target in binaries: + for target in binaries: + polling_strategies = (POLLING_STRATEGIES[self.platform] + if target.get('uses_polling', True) + else ['all']) + for polling_strategy in polling_strategies: + env={'GRPC_DEFAULT_SSL_ROOTS_FILE_PATH': + _ROOT + '/src/core/lib/tsi/test_creds/ca.pem', + 'GRPC_POLLING_STRATEGY': polling_strategy} + shortname_ext = '' if polling_strategy=='all' else ' polling=%s' % polling_strategy if self.config.build_config in target['exclude_configs']: continue if self.platform == 'windows': diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 88aae70aef5..7b83346b457 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -21530,7 +21530,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -21552,7 +21553,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -21574,7 +21576,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -21596,7 +21599,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -21618,7 +21622,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -21640,7 +21645,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -21662,7 +21668,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -21684,7 +21691,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -21706,7 +21714,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -21728,7 +21737,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -21750,7 +21760,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -21772,7 +21783,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -21794,7 +21806,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -21816,7 +21829,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -21838,7 +21852,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -21860,7 +21875,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -21882,7 +21898,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -21904,7 +21921,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -21926,7 +21944,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -21948,7 +21967,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -21970,7 +21990,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -21992,7 +22013,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22014,7 +22036,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22036,7 +22059,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22058,7 +22082,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22080,7 +22105,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22102,7 +22128,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22124,7 +22151,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22146,7 +22174,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22168,7 +22197,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22190,7 +22220,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22212,7 +22243,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22234,7 +22266,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22256,7 +22289,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22278,7 +22312,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22300,7 +22335,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22322,7 +22358,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22344,7 +22381,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22366,7 +22404,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22388,7 +22427,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22410,7 +22450,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22432,7 +22473,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22454,7 +22496,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22476,7 +22519,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22498,7 +22542,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22520,7 +22565,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22542,7 +22588,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22564,7 +22611,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22586,7 +22634,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22608,7 +22657,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22630,7 +22680,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22652,7 +22703,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22674,7 +22726,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22696,7 +22749,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22718,7 +22772,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22740,7 +22795,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22762,7 +22818,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22784,7 +22841,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22806,7 +22864,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22828,7 +22887,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22850,7 +22910,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22872,7 +22933,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22894,7 +22956,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22916,7 +22979,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22938,7 +23002,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22960,7 +23025,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -22982,7 +23048,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23004,7 +23071,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23026,7 +23094,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23048,7 +23117,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23070,7 +23140,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23092,7 +23163,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23114,7 +23186,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23136,7 +23209,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23158,7 +23232,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23180,7 +23255,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23202,7 +23278,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23224,7 +23301,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23246,7 +23324,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23268,7 +23347,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23290,7 +23370,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23312,7 +23393,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23334,7 +23416,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23356,7 +23439,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23378,7 +23462,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23400,7 +23485,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23422,7 +23508,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23444,7 +23531,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23466,7 +23554,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23488,7 +23577,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23510,7 +23600,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23532,7 +23623,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23554,7 +23646,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23576,7 +23669,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23598,7 +23692,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23620,7 +23715,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23642,7 +23738,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23664,7 +23761,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23686,7 +23784,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23708,7 +23807,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23730,7 +23830,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23752,7 +23853,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23774,7 +23876,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23796,7 +23899,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23818,7 +23922,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23840,7 +23945,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23862,7 +23968,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23884,7 +23991,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23906,7 +24014,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23928,7 +24037,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23950,7 +24060,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23972,7 +24083,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -23994,7 +24106,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24016,7 +24129,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24038,7 +24152,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24060,7 +24175,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24082,7 +24198,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24104,7 +24221,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24126,7 +24244,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24148,7 +24267,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24170,7 +24290,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24192,7 +24313,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24214,7 +24336,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24236,7 +24359,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24258,7 +24382,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24280,7 +24405,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24302,7 +24428,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24324,7 +24451,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24346,7 +24474,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24368,7 +24497,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24390,7 +24520,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24412,7 +24543,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24434,7 +24566,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24456,7 +24589,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24478,7 +24612,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24500,7 +24635,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24522,7 +24658,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24544,7 +24681,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24566,7 +24704,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24588,7 +24727,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24610,7 +24750,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24632,7 +24773,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24654,7 +24796,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24676,7 +24819,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24698,7 +24842,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24720,7 +24865,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24742,7 +24888,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24764,7 +24911,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24786,7 +24934,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24808,7 +24957,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24830,7 +24980,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24852,7 +25003,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24874,7 +25026,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24896,7 +25049,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24918,7 +25072,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24940,7 +25095,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24962,7 +25118,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -24984,7 +25141,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25006,7 +25164,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25028,7 +25187,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25050,7 +25210,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25072,7 +25233,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25094,7 +25256,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25116,7 +25279,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25138,7 +25302,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25160,7 +25325,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25182,7 +25348,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25204,7 +25371,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25226,7 +25394,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25248,7 +25417,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25270,7 +25440,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25292,7 +25463,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25314,7 +25486,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25336,7 +25509,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25358,7 +25532,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25380,7 +25555,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25402,7 +25578,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25424,7 +25601,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25446,7 +25624,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25468,7 +25647,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25490,7 +25670,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25512,7 +25693,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25534,7 +25716,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25556,7 +25739,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25578,7 +25762,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25600,7 +25785,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25622,7 +25808,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25644,7 +25831,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25666,7 +25854,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25688,7 +25877,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25710,7 +25900,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25732,7 +25923,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25754,7 +25946,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25776,7 +25969,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25798,7 +25992,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25820,7 +26015,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25842,7 +26038,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25864,7 +26061,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25886,7 +26084,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25908,7 +26107,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25930,7 +26130,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25952,7 +26153,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25974,7 +26176,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -25996,7 +26199,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26018,7 +26222,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26040,7 +26245,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26062,7 +26268,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26084,7 +26291,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26106,7 +26314,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26128,7 +26337,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26150,7 +26360,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26172,7 +26383,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26194,7 +26406,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26216,7 +26429,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26238,7 +26452,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26260,7 +26475,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26282,7 +26498,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26304,7 +26521,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26326,7 +26544,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26348,7 +26567,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26370,7 +26590,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26392,7 +26613,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26414,7 +26636,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26436,7 +26659,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26458,7 +26682,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26480,7 +26705,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26502,7 +26728,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26524,7 +26751,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26546,7 +26774,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26568,7 +26797,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26590,7 +26820,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26612,7 +26843,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26634,7 +26866,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26656,7 +26889,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26678,7 +26912,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26700,7 +26935,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26722,7 +26958,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26744,7 +26981,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26766,7 +27004,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26788,7 +27027,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26810,7 +27050,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26832,7 +27073,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26854,7 +27096,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26876,7 +27119,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26898,7 +27142,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26920,7 +27165,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26942,7 +27188,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26964,7 +27211,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -26986,7 +27234,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27008,7 +27257,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27030,7 +27280,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27052,7 +27303,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27074,7 +27326,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27096,7 +27349,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27118,7 +27372,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27140,7 +27395,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27162,7 +27418,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27184,7 +27441,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27206,7 +27464,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27228,7 +27487,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27250,7 +27510,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27272,7 +27533,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27294,7 +27556,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27316,7 +27579,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27338,7 +27602,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27360,7 +27625,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27382,7 +27648,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27404,7 +27671,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27426,7 +27694,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27448,7 +27717,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27470,7 +27740,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27492,7 +27763,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27514,7 +27786,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27536,7 +27809,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27558,7 +27832,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27580,7 +27855,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27602,7 +27878,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27624,7 +27901,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27646,7 +27924,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27668,7 +27947,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27690,7 +27970,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27712,7 +27993,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27734,7 +28016,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27756,7 +28039,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27778,7 +28062,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27800,7 +28085,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27822,7 +28108,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27844,7 +28131,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27866,7 +28154,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27888,7 +28177,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27910,7 +28200,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27932,7 +28223,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27954,7 +28246,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27976,7 +28269,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -27998,7 +28292,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28020,7 +28315,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28042,7 +28338,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28064,7 +28361,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28086,7 +28384,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28108,7 +28407,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28130,7 +28430,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28152,7 +28453,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28174,7 +28476,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28196,7 +28499,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28218,7 +28522,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28240,7 +28545,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28262,7 +28568,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28284,7 +28591,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28306,7 +28614,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28328,7 +28637,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28350,7 +28660,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28372,7 +28683,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28394,7 +28706,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28416,7 +28729,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28438,7 +28752,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28460,7 +28775,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28482,7 +28798,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28504,7 +28821,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28526,7 +28844,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28548,7 +28867,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28570,7 +28890,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28592,7 +28913,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28614,7 +28936,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28636,7 +28959,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28658,7 +28982,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28680,7 +29005,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28702,7 +29028,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28724,7 +29051,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28746,7 +29074,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28768,7 +29097,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28790,7 +29120,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28812,7 +29143,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28834,7 +29166,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28856,7 +29189,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28878,7 +29212,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28900,7 +29235,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28922,7 +29258,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28944,7 +29281,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28966,7 +29304,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -28988,7 +29327,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29010,7 +29350,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29032,7 +29373,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29054,7 +29396,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29076,7 +29419,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29098,7 +29442,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29120,7 +29465,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29142,7 +29488,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29164,7 +29511,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29186,7 +29534,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29208,7 +29557,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29230,7 +29580,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29252,7 +29603,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29274,7 +29626,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29296,7 +29649,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29318,7 +29672,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29340,7 +29695,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29362,7 +29718,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29384,7 +29741,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29406,7 +29764,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29428,7 +29787,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29450,7 +29810,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29472,7 +29833,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29494,7 +29856,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29516,7 +29879,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29538,7 +29902,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29560,7 +29925,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29582,7 +29948,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29604,7 +29971,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29626,7 +29994,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29648,7 +30017,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29670,7 +30040,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29692,7 +30063,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29714,7 +30086,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29736,7 +30109,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29758,7 +30132,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29780,7 +30155,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29802,7 +30178,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29824,7 +30201,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29846,7 +30224,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29868,7 +30247,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29890,7 +30270,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29912,7 +30293,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29934,7 +30316,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29956,7 +30339,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -29978,7 +30362,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30000,7 +30385,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30022,7 +30408,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30044,7 +30431,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30066,7 +30454,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30088,7 +30477,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30110,7 +30500,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30132,7 +30523,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30154,7 +30546,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30176,7 +30569,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30198,7 +30592,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30220,7 +30615,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30242,7 +30638,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30264,7 +30661,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30286,7 +30684,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30308,7 +30707,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30330,7 +30730,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30352,7 +30753,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30374,7 +30776,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30396,7 +30799,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30418,7 +30822,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30440,7 +30845,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30462,7 +30868,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30484,7 +30891,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30506,7 +30914,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30528,7 +30937,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30550,7 +30960,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30572,7 +30983,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30594,7 +31006,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30616,7 +31029,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30638,7 +31052,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30660,7 +31075,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30682,7 +31098,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30704,7 +31121,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30726,7 +31144,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30748,7 +31167,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30770,7 +31190,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30792,7 +31213,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30814,7 +31236,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30836,7 +31259,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30858,7 +31282,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30880,7 +31305,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30902,7 +31328,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30924,7 +31351,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30946,7 +31374,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30968,7 +31397,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -30990,7 +31420,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31012,7 +31443,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31034,7 +31466,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31056,7 +31489,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31078,7 +31512,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31100,7 +31535,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31122,7 +31558,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31144,7 +31581,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31166,7 +31604,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31188,7 +31627,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31210,7 +31650,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31232,7 +31673,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31254,7 +31696,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31276,7 +31719,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31298,7 +31742,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31320,7 +31765,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31342,7 +31788,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31364,7 +31811,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31386,7 +31834,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31408,7 +31857,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31430,7 +31880,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31452,7 +31903,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31474,7 +31926,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31496,7 +31949,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31518,7 +31972,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31540,7 +31995,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31562,7 +32018,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31584,7 +32041,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31606,7 +32064,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31628,7 +32087,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31650,7 +32110,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31672,7 +32133,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31694,7 +32156,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31716,7 +32179,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31738,7 +32202,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31760,7 +32225,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31782,7 +32248,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31804,7 +32271,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31826,7 +32294,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31848,7 +32317,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31870,7 +32340,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31892,7 +32363,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31914,7 +32386,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31936,7 +32409,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31958,7 +32432,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -31980,7 +32455,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32002,7 +32478,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32024,7 +32501,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32046,7 +32524,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32068,7 +32547,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32090,7 +32570,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32112,7 +32593,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32134,7 +32616,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32156,7 +32639,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32178,7 +32662,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32200,7 +32685,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32222,7 +32708,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32244,7 +32731,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32266,7 +32754,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32288,7 +32777,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32310,7 +32800,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32332,7 +32823,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32354,7 +32846,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32376,7 +32869,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32398,7 +32892,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32420,7 +32915,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32442,7 +32938,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32464,7 +32961,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32486,7 +32984,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32508,7 +33007,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32530,7 +33030,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32552,7 +33053,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32574,7 +33076,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32596,7 +33099,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32618,7 +33122,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32640,7 +33145,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32662,7 +33168,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32684,7 +33191,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32706,7 +33214,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32728,7 +33237,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32750,7 +33260,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32772,7 +33283,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32794,7 +33306,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32816,7 +33329,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32838,7 +33352,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32860,7 +33375,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32882,7 +33398,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32904,7 +33421,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32926,7 +33444,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32948,7 +33467,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32970,7 +33490,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -32992,7 +33513,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33014,7 +33536,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33036,7 +33559,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33058,7 +33582,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33080,7 +33605,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33102,7 +33628,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33124,7 +33651,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33146,7 +33674,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33168,7 +33697,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33190,7 +33720,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33212,7 +33743,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33234,7 +33766,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33256,7 +33789,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33278,7 +33812,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33300,7 +33835,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33322,7 +33858,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33344,7 +33881,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33366,7 +33904,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33388,7 +33927,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33410,7 +33950,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33432,7 +33973,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33454,7 +33996,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33476,7 +34019,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33498,7 +34042,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33520,7 +34065,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33542,7 +34088,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33564,7 +34111,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33586,7 +34134,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33608,7 +34157,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33630,7 +34180,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33652,7 +34203,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33674,7 +34226,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33696,7 +34249,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33718,7 +34272,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33740,7 +34295,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33762,7 +34318,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33784,7 +34341,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33806,7 +34364,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33828,7 +34387,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33850,7 +34410,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33872,7 +34433,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33894,7 +34456,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33916,7 +34479,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33938,7 +34502,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33960,7 +34525,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -33982,7 +34548,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34004,7 +34571,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34026,7 +34594,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34048,7 +34617,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34070,7 +34640,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34092,7 +34663,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34114,7 +34686,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34136,7 +34709,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34158,7 +34732,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34180,7 +34755,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34202,7 +34778,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34224,7 +34801,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34246,7 +34824,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34268,7 +34847,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34290,7 +34870,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34312,7 +34893,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34334,7 +34916,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34356,7 +34939,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34378,7 +34962,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34400,7 +34985,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34422,7 +35008,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34444,7 +35031,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34466,7 +35054,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34488,7 +35077,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34510,7 +35100,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34532,7 +35123,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34554,7 +35146,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34576,7 +35169,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34598,7 +35192,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34620,7 +35215,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34642,7 +35238,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34664,7 +35261,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34686,7 +35284,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34708,7 +35307,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34730,7 +35330,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34752,7 +35353,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34774,7 +35376,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34796,7 +35399,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34818,7 +35422,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34840,7 +35445,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34862,7 +35468,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34884,7 +35491,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34906,7 +35514,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34928,7 +35537,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34950,7 +35560,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34972,7 +35583,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -34994,7 +35606,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35016,7 +35629,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35038,7 +35652,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35060,7 +35675,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35082,7 +35698,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35104,7 +35721,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35126,7 +35744,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35148,7 +35767,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35170,7 +35790,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35192,7 +35813,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35214,7 +35836,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35236,7 +35859,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35258,7 +35882,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35280,7 +35905,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35302,7 +35928,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35324,7 +35951,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35346,7 +35974,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35368,7 +35997,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35390,7 +36020,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35412,7 +36043,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35434,7 +36066,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35456,7 +36089,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35478,7 +36112,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35500,7 +36135,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35522,7 +36158,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35544,7 +36181,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35566,7 +36204,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35588,7 +36227,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35610,7 +36250,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35632,7 +36273,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35654,7 +36296,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35676,7 +36319,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35698,7 +36342,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35720,7 +36365,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35742,7 +36388,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35764,7 +36411,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35786,7 +36434,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35808,7 +36457,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35830,7 +36480,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35852,7 +36503,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35874,7 +36526,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35896,7 +36549,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35918,7 +36572,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35940,7 +36595,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35962,7 +36618,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -35984,7 +36641,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36006,7 +36664,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36028,7 +36687,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36050,7 +36710,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36072,7 +36733,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36094,7 +36756,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36116,7 +36779,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36138,7 +36802,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36160,7 +36825,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36182,7 +36848,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36204,7 +36871,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36226,7 +36894,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36248,7 +36917,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36270,7 +36940,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36292,7 +36963,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36314,7 +36986,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36336,7 +37009,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36358,7 +37032,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36380,7 +37055,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36402,7 +37078,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36424,7 +37101,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36446,7 +37124,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36468,7 +37147,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36490,7 +37170,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36512,7 +37193,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36534,7 +37216,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36556,7 +37239,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36578,7 +37262,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36600,7 +37285,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36622,7 +37308,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36644,7 +37331,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36666,7 +37354,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36688,7 +37377,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36710,7 +37400,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36732,7 +37423,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36754,7 +37446,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36776,7 +37469,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36798,7 +37492,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36820,7 +37515,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36842,7 +37538,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36864,7 +37561,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36886,7 +37584,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36908,7 +37607,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36930,7 +37630,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36952,7 +37653,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36974,7 +37676,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -36996,7 +37699,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37018,7 +37722,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37040,7 +37745,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37062,7 +37768,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37084,7 +37791,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37106,7 +37814,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37128,7 +37837,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37150,7 +37860,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37172,7 +37883,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37194,7 +37906,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37216,7 +37929,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37238,7 +37952,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37260,7 +37975,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37282,7 +37998,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37304,7 +38021,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37326,7 +38044,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37348,7 +38067,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37370,7 +38090,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37392,7 +38113,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37414,7 +38136,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37436,7 +38159,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37458,7 +38182,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37480,7 +38205,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37502,7 +38228,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37524,7 +38251,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37546,7 +38274,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37568,7 +38297,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37590,7 +38320,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37612,7 +38343,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37634,7 +38366,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37656,7 +38389,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37678,7 +38412,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37700,7 +38435,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37722,7 +38458,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37744,7 +38481,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37766,7 +38504,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37788,7 +38527,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37810,7 +38550,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37832,7 +38573,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37854,7 +38596,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37876,7 +38619,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37898,7 +38642,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37920,7 +38665,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37942,7 +38688,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37964,7 +38711,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -37986,7 +38734,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38008,7 +38757,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38030,7 +38780,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38052,7 +38803,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38074,7 +38826,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38096,7 +38849,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38118,7 +38872,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38140,7 +38895,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38162,7 +38918,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38184,7 +38941,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38206,7 +38964,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38228,7 +38987,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38250,7 +39010,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38272,7 +39033,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38294,7 +39056,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38316,7 +39079,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38338,7 +39102,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38360,7 +39125,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38382,7 +39148,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38404,7 +39171,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38426,7 +39194,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38448,7 +39217,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38470,7 +39240,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38492,7 +39263,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38514,7 +39286,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38536,7 +39309,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38558,7 +39332,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38580,7 +39355,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38602,7 +39378,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38624,7 +39401,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38646,7 +39424,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38668,7 +39447,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38690,7 +39470,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38712,7 +39493,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38734,7 +39516,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38756,7 +39539,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38778,7 +39562,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38800,7 +39585,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38822,7 +39608,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38844,7 +39631,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38866,7 +39654,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38888,7 +39677,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38910,7 +39700,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38932,7 +39723,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38954,7 +39746,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38976,7 +39769,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -38998,7 +39792,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39020,7 +39815,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39042,7 +39838,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39064,7 +39861,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39086,7 +39884,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39108,7 +39907,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39130,7 +39930,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39152,7 +39953,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39174,7 +39976,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39196,7 +39999,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39218,7 +40022,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39240,7 +40045,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39262,7 +40068,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39284,7 +40091,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39306,7 +40114,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39328,7 +40137,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39350,7 +40160,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39372,7 +40183,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39394,7 +40206,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39416,7 +40229,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39438,7 +40252,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39460,7 +40275,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39482,7 +40298,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39504,7 +40321,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39526,7 +40344,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39548,7 +40367,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39570,7 +40390,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39592,7 +40413,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39614,7 +40436,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39636,7 +40459,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39658,7 +40482,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39680,7 +40505,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39702,7 +40528,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39724,7 +40551,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39746,7 +40574,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39768,7 +40597,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39790,7 +40620,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39812,7 +40643,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39834,7 +40666,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39856,7 +40689,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39878,7 +40712,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39900,7 +40735,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39922,7 +40758,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39944,7 +40781,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39966,7 +40804,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -39988,7 +40827,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40010,7 +40850,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40032,7 +40873,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40054,7 +40896,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40076,7 +40919,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40098,7 +40942,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40120,7 +40965,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40142,7 +40988,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40164,7 +41011,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40186,7 +41034,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40208,7 +41057,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40230,7 +41080,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40252,7 +41103,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40274,7 +41126,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40296,7 +41149,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40318,7 +41172,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40340,7 +41195,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40362,7 +41218,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40384,7 +41241,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40406,7 +41264,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40428,7 +41287,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40450,7 +41310,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40472,7 +41333,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40494,7 +41356,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40516,7 +41379,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40538,7 +41402,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40560,7 +41425,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40582,7 +41448,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40604,7 +41471,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40626,7 +41494,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40648,7 +41517,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40670,7 +41540,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40692,7 +41563,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40714,7 +41586,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40736,7 +41609,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40758,7 +41632,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40780,7 +41655,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40802,7 +41678,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40824,7 +41701,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40846,7 +41724,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40868,7 +41747,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40890,7 +41770,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40912,7 +41793,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40934,7 +41816,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40956,7 +41839,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -40978,7 +41862,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41000,7 +41885,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41022,7 +41908,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41044,7 +41931,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41066,7 +41954,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41088,7 +41977,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41110,7 +42000,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41132,7 +42023,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41154,7 +42046,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41176,7 +42069,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41198,7 +42092,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41220,7 +42115,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41242,7 +42138,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41264,7 +42161,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41286,7 +42184,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41308,7 +42207,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41330,7 +42230,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41352,7 +42253,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41374,7 +42276,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41396,7 +42299,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41418,7 +42322,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41440,7 +42345,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41462,7 +42368,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41484,7 +42391,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41506,7 +42414,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41528,7 +42437,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41550,7 +42460,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41572,7 +42483,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41594,7 +42506,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41616,7 +42529,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41638,7 +42552,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41660,7 +42575,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41682,7 +42598,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41704,7 +42621,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41726,7 +42644,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41748,7 +42667,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41770,7 +42690,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41792,7 +42713,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41814,7 +42736,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41836,7 +42759,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41858,7 +42782,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41880,7 +42805,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41902,7 +42828,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41924,7 +42851,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41946,7 +42874,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41968,7 +42897,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -41990,7 +42920,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42012,7 +42943,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42034,7 +42966,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42056,7 +42989,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42078,7 +43012,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42100,7 +43035,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42122,7 +43058,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42144,7 +43081,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42166,7 +43104,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42188,7 +43127,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42210,7 +43150,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42232,7 +43173,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42254,7 +43196,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42276,7 +43219,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42298,7 +43242,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42320,7 +43265,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42342,7 +43288,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42364,7 +43311,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42386,7 +43334,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42408,7 +43357,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42430,7 +43380,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42452,7 +43403,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42474,7 +43426,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42496,7 +43449,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42518,7 +43472,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42540,7 +43495,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42562,7 +43518,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42584,7 +43541,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42606,7 +43564,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42628,7 +43587,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42650,7 +43610,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42672,7 +43633,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42694,7 +43656,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42716,7 +43679,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42738,7 +43702,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42760,7 +43725,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42782,7 +43748,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42804,7 +43771,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42826,7 +43794,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42848,7 +43817,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42870,7 +43840,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42892,7 +43863,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42914,7 +43886,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42936,7 +43909,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42958,7 +43932,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -42980,7 +43955,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43002,7 +43978,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43024,7 +44001,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43046,7 +44024,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43068,7 +44047,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43090,7 +44070,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43112,7 +44093,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43134,7 +44116,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43156,7 +44139,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43178,7 +44162,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43200,7 +44185,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43222,7 +44208,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43244,7 +44231,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43266,7 +44254,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43288,7 +44277,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43310,7 +44300,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43332,7 +44323,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43354,7 +44346,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43376,7 +44369,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43398,7 +44392,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43420,7 +44415,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43442,7 +44438,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43464,7 +44461,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43486,7 +44484,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43508,7 +44507,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43530,7 +44530,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43552,7 +44553,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43574,7 +44576,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43596,7 +44599,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43618,7 +44622,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43640,7 +44645,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43662,7 +44668,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43684,7 +44691,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43706,7 +44714,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43728,7 +44737,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43750,7 +44760,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43772,7 +44783,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43794,7 +44806,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43816,7 +44829,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43838,7 +44852,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43860,7 +44875,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43882,7 +44898,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43904,7 +44921,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43926,7 +44944,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43948,7 +44967,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43970,7 +44990,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -43992,7 +45013,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44014,7 +45036,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44036,7 +45059,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44058,7 +45082,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44080,7 +45105,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44102,7 +45128,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44124,7 +45151,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44146,7 +45174,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44168,7 +45197,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44190,7 +45220,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44212,7 +45243,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44234,7 +45266,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44256,7 +45289,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44278,7 +45312,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44300,7 +45335,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44322,7 +45358,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44344,7 +45381,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44366,7 +45404,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44388,7 +45427,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44410,7 +45450,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44432,7 +45473,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44454,7 +45496,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44476,7 +45519,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44498,7 +45542,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44520,7 +45565,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44542,7 +45588,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44564,7 +45611,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44586,7 +45634,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44608,7 +45657,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44630,7 +45680,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44652,7 +45703,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44674,7 +45726,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44696,7 +45749,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44718,7 +45772,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44740,7 +45795,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44762,7 +45818,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44784,7 +45841,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44806,7 +45864,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44828,7 +45887,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44850,7 +45910,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44872,7 +45933,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44894,7 +45956,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44916,7 +45979,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44938,7 +46002,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44960,7 +46025,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -44982,7 +46048,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45004,7 +46071,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45026,7 +46094,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45048,7 +46117,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45070,7 +46140,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45092,7 +46163,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45114,7 +46186,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45136,7 +46209,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45158,7 +46232,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45180,7 +46255,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45202,7 +46278,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45224,7 +46301,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45246,7 +46324,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45268,7 +46347,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45290,7 +46370,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45312,7 +46393,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45334,7 +46416,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45356,7 +46439,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45378,7 +46462,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45400,7 +46485,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45422,7 +46508,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45444,7 +46531,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45466,7 +46554,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45488,7 +46577,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45510,7 +46600,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45532,7 +46623,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45554,7 +46646,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45576,7 +46669,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45598,7 +46692,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45620,7 +46715,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45642,7 +46738,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45664,7 +46761,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45686,7 +46784,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45708,7 +46807,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45730,7 +46830,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45752,7 +46853,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45774,7 +46876,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45796,7 +46899,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45818,7 +46922,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45840,7 +46945,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45862,7 +46968,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45884,7 +46991,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45906,7 +47014,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45928,7 +47037,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45950,7 +47060,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45972,7 +47083,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -45994,7 +47106,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -46016,7 +47129,8 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false }, { "args": [ @@ -46038,6 +47152,7 @@ "mac", "windows", "posix" - ] + ], + "uses_polling": false } ] From ed73510413579bcaf07aea363da1dc238bcb8c4e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 6 Apr 2016 12:59:23 -0700 Subject: [PATCH 0034/1894] Small tweaks --- src/core/lib/iomgr/ev_posix.c | 1 + tools/run_tests/jobset.py | 8 +++++++- tools/run_tests/run_tests.py | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index 973e40ca1e8..79b5ceebe33 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -104,6 +104,7 @@ static void try_engine(const char *engine) { for (size_t i = 0; i < GPR_ARRAY_SIZE(g_factories); i++) { if (is(engine, g_factories[i].name)) { if ((g_event_engine = g_factories[i].factory())) { + gpr_log(GPR_DEBUG, "Using polling engine: %s", g_factories[i].name); return; } } diff --git a/tools/run_tests/jobset.py b/tools/run_tests/jobset.py index e9675fb785b..d3259e724df 100755 --- a/tools/run_tests/jobset.py +++ b/tools/run_tests/jobset.py @@ -344,6 +344,7 @@ class Jobset(object): self._add_env = add_env self.resultset = {} self._remaining = None + self._start_time = time.time() def set_remaining(self, remaining): self._remaining = remaining @@ -413,6 +414,11 @@ class Jobset(object): if dead: return if (not self._travis): rstr = '' if self._remaining is None else '%d queued, ' % self._remaining + if self._remaining is not None and self._completed > 0: + now = time.time() + sofar = now - self._start_time + remaining = sofar / self._completed * (self._remaining + len(self._running)) + rstr = 'ETA %.1f sec; %s' % (remaining, rstr) message('WAITING', '%s%d jobs running, %d complete, %d failed' % ( rstr, len(self._running), self._completed, self._failures)) if platform_string() == 'windows': @@ -457,7 +463,7 @@ def tag_remaining(xs): staging = [] for x in xs: staging.append(x) - if len(staging) > 1000: + if len(staging) > 5000: yield (staging.pop(0), None) n = len(staging) for i, x in enumerate(staging): diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index b064ed67756..537655804ab 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -166,7 +166,7 @@ class CLanguage(object): for polling_strategy in polling_strategies: env={'GRPC_DEFAULT_SSL_ROOTS_FILE_PATH': _ROOT + '/src/core/lib/tsi/test_creds/ca.pem', - 'GRPC_POLLING_STRATEGY': polling_strategy} + 'GRPC_POLL_STRATEGY': polling_strategy} shortname_ext = '' if polling_strategy=='all' else ' polling=%s' % polling_strategy if self.config.build_config in target['exclude_configs']: continue From 6c8ae9aad5f1aaaf9c043817e184ec26bee75c86 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 6 Apr 2016 15:50:38 -0700 Subject: [PATCH 0035/1894] Fix new test --- test/core/end2end/tests/filter_causes_close.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c index ca54167b205..2de03a3b078 100644 --- a/test/core/end2end/tests/filter_causes_close.c +++ b/test/core/end2end/tests/filter_causes_close.c @@ -102,7 +102,7 @@ static void end_test(grpc_end2end_test_fixture *f) { grpc_completion_queue_destroy(f->cq); } -/* Request with a large amount of metadata.*/ +/* Simple request via a server filter that always closes the stream.*/ static void test_request(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; @@ -235,8 +235,8 @@ static void start_transport_stream_op(grpc_exec_ctx *exec_ctx, static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) {} -static void destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) {} +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + void *and_free_memory) {} static void init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, From 862c8e9e50f9832b97745baeaf954e346e43f832 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 6 Apr 2016 16:30:51 -0700 Subject: [PATCH 0036/1894] Load Reporting hook and filter skeleton --- BUILD | 12 ++ Makefile | 40 ++++ binding.gyp | 2 + build.yaml | 14 ++ config.m4 | 4 + gRPC.podspec | 6 + grpc.gemspec | 4 + package.json | 4 + package.xml | 4 + .../load_reporting/load_reporting_filter.c | 99 +++++++++ .../load_reporting/load_reporting_filter.h | 41 ++++ src/core/lib/load_reporting/load_reporting.c | 48 +++++ src/core/lib/load_reporting/load_reporting.h | 46 ++++ src/python/grpcio/grpc_core_dependencies.py | 2 + .../load_reporting_registration.c | 73 +++++++ tools/doxygen/Doxyfile.core.internal | 4 + tools/run_tests/sources_and_headers.json | 28 +++ tools/run_tests/tests.json | 21 ++ vsprojects/buildtests_c.sln | 27 +++ vsprojects/vcxproj/grpc/grpc.vcxproj | 6 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 18 ++ .../grpc_unsecure/grpc_unsecure.vcxproj | 6 + .../grpc_unsecure.vcxproj.filters | 18 ++ .../load_reporting_registration_test.vcxproj | 199 ++++++++++++++++++ ...eporting_registration_test.vcxproj.filters | 21 ++ 25 files changed, 747 insertions(+) create mode 100644 src/core/ext/load_reporting/load_reporting_filter.c create mode 100644 src/core/ext/load_reporting/load_reporting_filter.h create mode 100644 src/core/lib/load_reporting/load_reporting.c create mode 100644 src/core/lib/load_reporting/load_reporting.h create mode 100644 test/core/load_reporting/load_reporting_registration.c create mode 100644 vsprojects/vcxproj/test/load_reporting_registration_test/load_reporting_registration_test.vcxproj create mode 100644 vsprojects/vcxproj/test/load_reporting_registration_test/load_reporting_registration_test.vcxproj.filters diff --git a/BUILD b/BUILD index 1335bdeb34c..5b21c5c653a 100644 --- a/BUILD +++ b/BUILD @@ -182,6 +182,7 @@ cc_library( "src/core/ext/client_config/uri_parser.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/ext/load_reporting/load_reporting_filter.h", "src/core/ext/transport/chttp2/transport/alpn.h", "src/core/ext/transport/chttp2/transport/bin_encoder.h", "src/core/ext/transport/chttp2/transport/chttp2_transport.h", @@ -257,6 +258,7 @@ cc_library( "src/core/lib/json/json_common.h", "src/core/lib/json/json_reader.h", "src/core/lib/json/json_writer.h", + "src/core/lib/load_reporting/load_reporting.h", "src/core/lib/security/auth_filters.h", "src/core/lib/security/b64.h", "src/core/lib/security/credentials.h", @@ -320,6 +322,7 @@ cc_library( "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/round_robin/round_robin.c", + "src/core/ext/load_reporting/load_reporting_filter.c", "src/core/ext/resolver/dns/native/dns_resolver.c", "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", @@ -404,6 +407,7 @@ cc_library( "src/core/lib/json/json_reader.c", "src/core/lib/json/json_string.c", "src/core/lib/json/json_writer.c", + "src/core/lib/load_reporting/load_reporting.c", "src/core/lib/security/b64.c", "src/core/lib/security/client_auth_filter.c", "src/core/lib/security/credentials.c", @@ -545,6 +549,7 @@ cc_library( "src/core/ext/client_config/uri_parser.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/ext/load_reporting/load_reporting_filter.h", "src/core/ext/transport/chttp2/transport/alpn.h", "src/core/ext/transport/chttp2/transport/bin_encoder.h", "src/core/ext/transport/chttp2/transport/chttp2_transport.h", @@ -620,6 +625,7 @@ cc_library( "src/core/lib/json/json_common.h", "src/core/lib/json/json_reader.h", "src/core/lib/json/json_writer.h", + "src/core/lib/load_reporting/load_reporting.h", "src/core/lib/surface/api_trace.h", "src/core/lib/surface/call.h", "src/core/lib/surface/call_test_only.h", @@ -669,6 +675,7 @@ cc_library( "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/round_robin/round_robin.c", + "src/core/ext/load_reporting/load_reporting_filter.c", "src/core/ext/resolver/dns/native/dns_resolver.c", "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", @@ -750,6 +757,7 @@ cc_library( "src/core/lib/json/json_reader.c", "src/core/lib/json/json_string.c", "src/core/lib/json/json_writer.c", + "src/core/lib/load_reporting/load_reporting.c", "src/core/lib/surface/alarm.c", "src/core/lib/surface/api_trace.c", "src/core/lib/surface/byte_buffer.c", @@ -1374,6 +1382,7 @@ objc_library( "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/round_robin/round_robin.c", + "src/core/ext/load_reporting/load_reporting_filter.c", "src/core/ext/resolver/dns/native/dns_resolver.c", "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", @@ -1458,6 +1467,7 @@ objc_library( "src/core/lib/json/json_reader.c", "src/core/lib/json/json_string.c", "src/core/lib/json/json_writer.c", + "src/core/lib/load_reporting/load_reporting.c", "src/core/lib/security/b64.c", "src/core/lib/security/client_auth_filter.c", "src/core/lib/security/credentials.c", @@ -1541,6 +1551,7 @@ objc_library( "src/core/ext/client_config/uri_parser.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/ext/load_reporting/load_reporting_filter.h", "src/core/ext/transport/chttp2/transport/alpn.h", "src/core/ext/transport/chttp2/transport/bin_encoder.h", "src/core/ext/transport/chttp2/transport/chttp2_transport.h", @@ -1616,6 +1627,7 @@ objc_library( "src/core/lib/json/json_common.h", "src/core/lib/json/json_reader.h", "src/core/lib/json/json_writer.h", + "src/core/lib/load_reporting/load_reporting.h", "src/core/lib/security/auth_filters.h", "src/core/lib/security/b64.h", "src/core/lib/security/credentials.h", diff --git a/Makefile b/Makefile index 1d78e65e9a0..4df2e0cc4f0 100644 --- a/Makefile +++ b/Makefile @@ -956,6 +956,7 @@ json_stream_error_test: $(BINDIR)/$(CONFIG)/json_stream_error_test json_test: $(BINDIR)/$(CONFIG)/json_test lame_client_test: $(BINDIR)/$(CONFIG)/lame_client_test lb_policies_test: $(BINDIR)/$(CONFIG)/lb_policies_test +load_reporting_registration_test: $(BINDIR)/$(CONFIG)/load_reporting_registration_test low_level_ping_pong_benchmark: $(BINDIR)/$(CONFIG)/low_level_ping_pong_benchmark message_compress_test: $(BINDIR)/$(CONFIG)/message_compress_test mlog_test: $(BINDIR)/$(CONFIG)/mlog_test @@ -1276,6 +1277,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/json_test \ $(BINDIR)/$(CONFIG)/lame_client_test \ $(BINDIR)/$(CONFIG)/lb_policies_test \ + $(BINDIR)/$(CONFIG)/load_reporting_registration_test \ $(BINDIR)/$(CONFIG)/message_compress_test \ $(BINDIR)/$(CONFIG)/mlog_test \ $(BINDIR)/$(CONFIG)/multiple_server_queues_test \ @@ -1576,6 +1578,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/json_test || ( echo test json_test failed ; exit 1 ) $(E) "[RUN] Testing lame_client_test" $(Q) $(BINDIR)/$(CONFIG)/lame_client_test || ( echo test lame_client_test failed ; exit 1 ) + $(E) "[RUN] Testing load_reporting_registration_test" + $(Q) $(BINDIR)/$(CONFIG)/load_reporting_registration_test || ( echo test load_reporting_registration_test failed ; exit 1 ) $(E) "[RUN] Testing message_compress_test" $(Q) $(BINDIR)/$(CONFIG)/message_compress_test || ( echo test message_compress_test failed ; exit 1 ) $(E) "[RUN] Testing multiple_server_queues_test" @@ -2486,6 +2490,7 @@ LIBGRPC_SRC = \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c \ src/core/ext/lb_policy/pick_first/pick_first.c \ src/core/ext/lb_policy/round_robin/round_robin.c \ + src/core/ext/load_reporting/load_reporting_filter.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ src/core/ext/resolver/sockaddr/sockaddr_resolver.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ @@ -2570,6 +2575,7 @@ LIBGRPC_SRC = \ src/core/lib/json/json_reader.c \ src/core/lib/json/json_string.c \ src/core/lib/json/json_writer.c \ + src/core/lib/load_reporting/load_reporting.c \ src/core/lib/security/b64.c \ src/core/lib/security/client_auth_filter.c \ src/core/lib/security/credentials.c \ @@ -2847,6 +2853,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c \ src/core/ext/lb_policy/pick_first/pick_first.c \ src/core/ext/lb_policy/round_robin/round_robin.c \ + src/core/ext/load_reporting/load_reporting_filter.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ src/core/ext/resolver/sockaddr/sockaddr_resolver.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ @@ -2928,6 +2935,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/json/json_reader.c \ src/core/lib/json/json_string.c \ src/core/lib/json/json_writer.c \ + src/core/lib/load_reporting/load_reporting.c \ src/core/lib/surface/alarm.c \ src/core/lib/surface/api_trace.c \ src/core/lib/surface/byte_buffer.c \ @@ -8521,6 +8529,38 @@ endif endif +LOAD_REPORTING_REGISTRATION_TEST_SRC = \ + test/core/load_reporting/load_reporting_registration.c \ + +LOAD_REPORTING_REGISTRATION_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LOAD_REPORTING_REGISTRATION_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/load_reporting_registration_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/load_reporting_registration_test: $(LOAD_REPORTING_REGISTRATION_TEST_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) $(LOAD_REPORTING_REGISTRATION_TEST_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)/load_reporting_registration_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/load_reporting/load_reporting_registration.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_load_reporting_registration_test: $(LOAD_REPORTING_REGISTRATION_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(LOAD_REPORTING_REGISTRATION_TEST_OBJS:.o=.dep) +endif +endif + + LOW_LEVEL_PING_PONG_BENCHMARK_SRC = \ test/core/network_benchmarks/low_level_ping_pong.c \ diff --git a/binding.gyp b/binding.gyp index d6d559dd583..f99ce39057c 100644 --- a/binding.gyp +++ b/binding.gyp @@ -588,6 +588,7 @@ 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c', 'src/core/ext/lb_policy/pick_first/pick_first.c', 'src/core/ext/lb_policy/round_robin/round_robin.c', + 'src/core/ext/load_reporting/load_reporting_filter.c', 'src/core/ext/resolver/dns/native/dns_resolver.c', 'src/core/ext/resolver/sockaddr/sockaddr_resolver.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', @@ -672,6 +673,7 @@ 'src/core/lib/json/json_reader.c', 'src/core/lib/json/json_string.c', 'src/core/lib/json/json_writer.c', + 'src/core/lib/load_reporting/load_reporting.c', 'src/core/lib/security/b64.c', 'src/core/lib/security/client_auth_filter.c', 'src/core/lib/security/credentials.c', diff --git a/build.yaml b/build.yaml index 76e512c6d01..6d1941967db 100644 --- a/build.yaml +++ b/build.yaml @@ -254,6 +254,7 @@ filegroups: - include/grpc/grpc.h - include/grpc/status.h headers: + - src/core/ext/load_reporting/load_reporting_filter.h - src/core/lib/channel/channel_args.h - src/core/lib/channel/channel_stack.h - src/core/lib/channel/channel_stack_builder.h @@ -308,6 +309,7 @@ filegroups: - src/core/lib/json/json_common.h - src/core/lib/json/json_reader.h - src/core/lib/json/json_writer.h + - src/core/lib/load_reporting/load_reporting.h - src/core/lib/surface/api_trace.h - src/core/lib/surface/call.h - src/core/lib/surface/call_test_only.h @@ -328,6 +330,7 @@ filegroups: - src/core/lib/transport/transport.h - src/core/lib/transport/transport_impl.h src: + - src/core/ext/load_reporting/load_reporting_filter.c - src/core/lib/channel/channel_args.c - src/core/lib/channel/channel_stack.c - src/core/lib/channel/channel_stack_builder.c @@ -384,6 +387,7 @@ filegroups: - src/core/lib/json/json_reader.c - src/core/lib/json/json_string.c - src/core/lib/json/json_writer.c + - src/core/lib/load_reporting/load_reporting.c - src/core/lib/surface/alarm.c - src/core/lib/surface/api_trace.c - src/core/lib/surface/byte_buffer.c @@ -1855,6 +1859,16 @@ targets: - grpc - gpr_test_util - gpr +- name: load_reporting_registration_test + build: test + language: c + src: + - test/core/load_reporting/load_reporting_registration.c + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr - name: low_level_ping_pong_benchmark build: benchmark language: c diff --git a/config.m4 b/config.m4 index dae142dd402..caa7c7b91af 100644 --- a/config.m4 +++ b/config.m4 @@ -110,6 +110,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c \ src/core/ext/lb_policy/pick_first/pick_first.c \ src/core/ext/lb_policy/round_robin/round_robin.c \ + src/core/ext/load_reporting/load_reporting_filter.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ src/core/ext/resolver/sockaddr/sockaddr_resolver.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ @@ -194,6 +195,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/json/json_reader.c \ src/core/lib/json/json_string.c \ src/core/lib/json/json_writer.c \ + src/core/lib/load_reporting/load_reporting.c \ src/core/lib/security/b64.c \ src/core/lib/security/client_auth_filter.c \ src/core/lib/security/credentials.c \ @@ -550,6 +552,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/pick_first) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/round_robin) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/load_reporting) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/resolver/dns/native) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/resolver/sockaddr) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/client/insecure) @@ -563,6 +566,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/http) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/iomgr) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/json) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/load_reporting) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/profiling) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/support) diff --git a/gRPC.podspec b/gRPC.podspec index 93346df3824..ca9a1227be8 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -184,6 +184,7 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/uri_parser.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h', + 'src/core/ext/load_reporting/load_reporting_filter.h', 'src/core/ext/transport/chttp2/transport/alpn.h', 'src/core/ext/transport/chttp2/transport/bin_encoder.h', 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', @@ -259,6 +260,7 @@ Pod::Spec.new do |s| 'src/core/lib/json/json_common.h', 'src/core/lib/json/json_reader.h', 'src/core/lib/json/json_writer.h', + 'src/core/lib/load_reporting/load_reporting.h', 'src/core/lib/security/auth_filters.h', 'src/core/lib/security/b64.h', 'src/core/lib/security/credentials.h', @@ -339,6 +341,7 @@ Pod::Spec.new do |s| 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c', 'src/core/ext/lb_policy/pick_first/pick_first.c', 'src/core/ext/lb_policy/round_robin/round_robin.c', + 'src/core/ext/load_reporting/load_reporting_filter.c', 'src/core/ext/resolver/dns/native/dns_resolver.c', 'src/core/ext/resolver/sockaddr/sockaddr_resolver.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', @@ -423,6 +426,7 @@ Pod::Spec.new do |s| 'src/core/lib/json/json_reader.c', 'src/core/lib/json/json_string.c', 'src/core/lib/json/json_writer.c', + 'src/core/lib/load_reporting/load_reporting.c', 'src/core/lib/security/b64.c', 'src/core/lib/security/client_auth_filter.c', 'src/core/lib/security/credentials.c', @@ -507,6 +511,7 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/uri_parser.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h', + 'src/core/ext/load_reporting/load_reporting_filter.h', 'src/core/ext/transport/chttp2/transport/alpn.h', 'src/core/ext/transport/chttp2/transport/bin_encoder.h', 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', @@ -582,6 +587,7 @@ Pod::Spec.new do |s| 'src/core/lib/json/json_common.h', 'src/core/lib/json/json_reader.h', 'src/core/lib/json/json_writer.h', + 'src/core/lib/load_reporting/load_reporting.h', 'src/core/lib/security/auth_filters.h', 'src/core/lib/security/b64.h', 'src/core/lib/security/credentials.h', diff --git a/grpc.gemspec b/grpc.gemspec index 03192c42ddd..ebcf5aa8f5e 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -180,6 +180,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_config/uri_parser.h ) s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.h ) s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h ) + s.files += %w( src/core/ext/load_reporting/load_reporting_filter.h ) s.files += %w( src/core/ext/transport/chttp2/transport/alpn.h ) s.files += %w( src/core/ext/transport/chttp2/transport/bin_encoder.h ) s.files += %w( src/core/ext/transport/chttp2/transport/chttp2_transport.h ) @@ -255,6 +256,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/json/json_common.h ) s.files += %w( src/core/lib/json/json_reader.h ) s.files += %w( src/core/lib/json/json_writer.h ) + s.files += %w( src/core/lib/load_reporting/load_reporting.h ) s.files += %w( src/core/lib/security/auth_filters.h ) s.files += %w( src/core/lib/security/b64.h ) s.files += %w( src/core/lib/security/credentials.h ) @@ -322,6 +324,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c ) s.files += %w( src/core/ext/lb_policy/pick_first/pick_first.c ) s.files += %w( src/core/ext/lb_policy/round_robin/round_robin.c ) + s.files += %w( src/core/ext/load_reporting/load_reporting_filter.c ) s.files += %w( src/core/ext/resolver/dns/native/dns_resolver.c ) s.files += %w( src/core/ext/resolver/sockaddr/sockaddr_resolver.c ) s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create.c ) @@ -406,6 +409,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/json/json_reader.c ) s.files += %w( src/core/lib/json/json_string.c ) s.files += %w( src/core/lib/json/json_writer.c ) + s.files += %w( src/core/lib/load_reporting/load_reporting.c ) s.files += %w( src/core/lib/security/b64.c ) s.files += %w( src/core/lib/security/client_auth_filter.c ) s.files += %w( src/core/lib/security/credentials.c ) diff --git a/package.json b/package.json index 11f703f3f3c..ddbe4bf227f 100644 --- a/package.json +++ b/package.json @@ -123,6 +123,7 @@ "src/core/ext/client_config/uri_parser.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/ext/load_reporting/load_reporting_filter.h", "src/core/ext/transport/chttp2/transport/alpn.h", "src/core/ext/transport/chttp2/transport/bin_encoder.h", "src/core/ext/transport/chttp2/transport/chttp2_transport.h", @@ -198,6 +199,7 @@ "src/core/lib/json/json_common.h", "src/core/lib/json/json_reader.h", "src/core/lib/json/json_writer.h", + "src/core/lib/load_reporting/load_reporting.h", "src/core/lib/security/auth_filters.h", "src/core/lib/security/b64.h", "src/core/lib/security/credentials.h", @@ -265,6 +267,7 @@ "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/round_robin/round_robin.c", + "src/core/ext/load_reporting/load_reporting_filter.c", "src/core/ext/resolver/dns/native/dns_resolver.c", "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", @@ -349,6 +352,7 @@ "src/core/lib/json/json_reader.c", "src/core/lib/json/json_string.c", "src/core/lib/json/json_writer.c", + "src/core/lib/load_reporting/load_reporting.c", "src/core/lib/security/b64.c", "src/core/lib/security/client_auth_filter.c", "src/core/lib/security/credentials.c", diff --git a/package.xml b/package.xml index 7730187ba1e..e68d44d085c 100644 --- a/package.xml +++ b/package.xml @@ -184,6 +184,7 @@ + @@ -259,6 +260,7 @@ + @@ -326,6 +328,7 @@ + @@ -410,6 +413,7 @@ + diff --git a/src/core/ext/load_reporting/load_reporting_filter.c b/src/core/ext/load_reporting/load_reporting_filter.c new file mode 100644 index 00000000000..7b029ae3eed --- /dev/null +++ b/src/core/ext/load_reporting/load_reporting_filter.c @@ -0,0 +1,99 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#include + +#include "src/core/ext/load_reporting/load_reporting_filter.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/load_reporting/load_reporting.h" +#include "src/core/lib/profiling/timers.h" +#include "src/core/lib/support/string.h" + +typedef struct call_data { load_reporting_data lr_data; } call_data; + +typedef struct channel_data { void *dummy; } channel_data; + +static void load_reporting_start_transport_stream_op( + grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + grpc_transport_stream_op *op) { + call_data *calld = elem->call_data; + + GPR_TIMER_BEGIN("load_reporting_start_transport_stream_op", 0); + grpc_load_reporting_call(&calld->lr_data); + grpc_call_next_op(exec_ctx, elem, op); + GPR_TIMER_END("load_reporting_start_transport_stream_op", 0); +} + +/* Constructor for call_data */ +static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + grpc_call_element_args *args) { + /* grab pointers to our data from the call element */ + call_data *calld = elem->call_data; + + /* initialize members */ + memset(&calld->lr_data, 0, sizeof(load_reporting_data)); +} + +/* Destructor for call_data */ +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem) { + /* grab pointers to our data from the call element */ + /*call_data *calld = elem->call_data;*/ +} + +/* Constructor for channel_data */ +static void init_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args) { + /*channel_data *channeld = elem->channel_data;*/ + GPR_ASSERT(!args->is_last); +} + +/* Destructor for channel data */ +static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem) {} + +const grpc_channel_filter grpc_load_reporting_filter = { + load_reporting_start_transport_stream_op, + grpc_channel_next_op, + sizeof(call_data), + init_call_elem, + grpc_call_stack_ignore_set_pollset, + destroy_call_elem, + sizeof(channel_data), + init_channel_elem, + destroy_channel_elem, + grpc_call_next_get_peer, + "load_reporting"}; diff --git a/src/core/ext/load_reporting/load_reporting_filter.h b/src/core/ext/load_reporting/load_reporting_filter.h new file mode 100644 index 00000000000..f69cd6fdc6d --- /dev/null +++ b/src/core/ext/load_reporting/load_reporting_filter.h @@ -0,0 +1,41 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_EXT_LOAD_REPORTING_LOAD_REPORTING_FILTER_H +#define GRPC_CORE_EXT_LOAD_REPORTING_LOAD_REPORTING_FILTER_H + +#include "src/core/lib/channel/channel_stack.h" + +extern const grpc_channel_filter grpc_load_reporting_filter; + +#endif /* GRPC_CORE_EXT_LOAD_REPORTING_LOAD_REPORTING_FILTER_H */ diff --git a/src/core/lib/load_reporting/load_reporting.c b/src/core/lib/load_reporting/load_reporting.c new file mode 100644 index 00000000000..2ac8b97efcf --- /dev/null +++ b/src/core/lib/load_reporting/load_reporting.c @@ -0,0 +1,48 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/load_reporting/load_reporting.h" + +#include + +static load_reporting_fn g_load_reporting_fn; + +void grpc_load_reporting_init(load_reporting_fn fn) { + g_load_reporting_fn = fn; +} + +void grpc_load_reporting_call(load_reporting_data *lr_data) { + if (g_load_reporting_fn != NULL) { + g_load_reporting_fn(lr_data); + } +} diff --git a/src/core/lib/load_reporting/load_reporting.h b/src/core/lib/load_reporting/load_reporting.h new file mode 100644 index 00000000000..65465ef940a --- /dev/null +++ b/src/core/lib/load_reporting/load_reporting.h @@ -0,0 +1,46 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_LIB_LOAD_REPORTING_LOAD_REPORTING_H +#define GRPC_CORE_LIB_LOAD_REPORTING_LOAD_REPORTING_H + +typedef struct load_reporting_data { void *data; } load_reporting_data; + +typedef void (*load_reporting_fn)(load_reporting_data *lr_data); + +/** To be called only from a plugin init function */ +void grpc_load_reporting_init(load_reporting_fn fn); + +void grpc_load_reporting_call(load_reporting_data *lr_data); + +#endif /* GRPC_CORE_LIB_LOAD_REPORTING_LOAD_REPORTING_H */ diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 2ed0b1e520c..d02a4cd57c0 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -104,6 +104,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c', 'src/core/ext/lb_policy/pick_first/pick_first.c', 'src/core/ext/lb_policy/round_robin/round_robin.c', + 'src/core/ext/load_reporting/load_reporting_filter.c', 'src/core/ext/resolver/dns/native/dns_resolver.c', 'src/core/ext/resolver/sockaddr/sockaddr_resolver.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', @@ -188,6 +189,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/json/json_reader.c', 'src/core/lib/json/json_string.c', 'src/core/lib/json/json_writer.c', + 'src/core/lib/load_reporting/load_reporting.c', 'src/core/lib/security/b64.c', 'src/core/lib/security/client_auth_filter.c', 'src/core/lib/security/credentials.c', diff --git a/test/core/load_reporting/load_reporting_registration.c b/test/core/load_reporting/load_reporting_registration.c new file mode 100644 index 00000000000..fa3b5687812 --- /dev/null +++ b/test/core/load_reporting/load_reporting_registration.c @@ -0,0 +1,73 @@ +/* + * + * Copyright 2015-2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include + +#include "src/core/lib/load_reporting/load_reporting.h" +#include "src/core/lib/surface/api_trace.h" +#include "test/core/util/test_config.h" + +static void noop(load_reporting_data *lr_data) { + uintptr_t *d = (uintptr_t *)(lr_data->data); + *d = 0xdeadbeef; +} + +static void lr_plugin_init(void) { grpc_load_reporting_init(noop); } + +static void lr_plugin_destroy(void) {} + +static void load_reporting_register() { + grpc_register_plugin(lr_plugin_init, lr_plugin_destroy); +} + +static void test_load_reporter_registration(void) { + load_reporting_data lr_data; + lr_data.data = gpr_malloc(sizeof(uint32_t)); + grpc_load_reporting_call(&lr_data); + + GPR_ASSERT(*((uintptr_t *)lr_data.data) == 0xdeadbeef); + + gpr_free(lr_data.data); +} + +int main(int argc, char **argv) { + load_reporting_register(); + grpc_init(); + test_load_reporter_registration(); + grpc_shutdown(); + + return 0; +} diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index bbb464d8656..7d802c6e37e 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -796,6 +796,7 @@ src/core/ext/client_config/subchannel_index.h \ src/core/ext/client_config/uri_parser.h \ src/core/ext/lb_policy/grpclb/load_balancer_api.h \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h \ +src/core/ext/load_reporting/load_reporting_filter.h \ src/core/ext/transport/chttp2/transport/alpn.h \ src/core/ext/transport/chttp2/transport/bin_encoder.h \ src/core/ext/transport/chttp2/transport/chttp2_transport.h \ @@ -871,6 +872,7 @@ src/core/lib/json/json.h \ src/core/lib/json/json_common.h \ src/core/lib/json/json_reader.h \ src/core/lib/json/json_writer.h \ +src/core/lib/load_reporting/load_reporting.h \ src/core/lib/security/auth_filters.h \ src/core/lib/security/b64.h \ src/core/lib/security/credentials.h \ @@ -938,6 +940,7 @@ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c \ src/core/ext/lb_policy/pick_first/pick_first.c \ src/core/ext/lb_policy/round_robin/round_robin.c \ +src/core/ext/load_reporting/load_reporting_filter.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ src/core/ext/resolver/sockaddr/sockaddr_resolver.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ @@ -1022,6 +1025,7 @@ src/core/lib/json/json.c \ src/core/lib/json/json_reader.c \ src/core/lib/json/json_string.c \ src/core/lib/json/json_writer.c \ +src/core/lib/load_reporting/load_reporting.c \ src/core/lib/security/b64.c \ src/core/lib/security/client_auth_filter.c \ src/core/lib/security/credentials.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 96f63556575..da6c2ce308d 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -1216,6 +1216,22 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "load_reporting_registration_test", + "src": [ + "test/core/load_reporting/load_reporting_registration.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", @@ -4179,6 +4195,7 @@ "src/core/ext/client_config/uri_parser.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/ext/load_reporting/load_reporting_filter.h", "src/core/ext/transport/chttp2/transport/alpn.h", "src/core/ext/transport/chttp2/transport/bin_encoder.h", "src/core/ext/transport/chttp2/transport/chttp2_transport.h", @@ -4254,6 +4271,7 @@ "src/core/lib/json/json_common.h", "src/core/lib/json/json_reader.h", "src/core/lib/json/json_writer.h", + "src/core/lib/load_reporting/load_reporting.h", "src/core/lib/security/auth_filters.h", "src/core/lib/security/b64.h", "src/core/lib/security/credentials.h", @@ -4361,6 +4379,8 @@ "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", "src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/round_robin/round_robin.c", + "src/core/ext/load_reporting/load_reporting_filter.c", + "src/core/ext/load_reporting/load_reporting_filter.h", "src/core/ext/resolver/dns/native/dns_resolver.c", "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", @@ -4520,6 +4540,8 @@ "src/core/lib/json/json_string.c", "src/core/lib/json/json_writer.c", "src/core/lib/json/json_writer.h", + "src/core/lib/load_reporting/load_reporting.c", + "src/core/lib/load_reporting/load_reporting.h", "src/core/lib/security/auth_filters.h", "src/core/lib/security/b64.c", "src/core/lib/security/b64.h", @@ -4799,6 +4821,7 @@ "src/core/ext/client_config/uri_parser.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/ext/load_reporting/load_reporting_filter.h", "src/core/ext/transport/chttp2/transport/alpn.h", "src/core/ext/transport/chttp2/transport/bin_encoder.h", "src/core/ext/transport/chttp2/transport/chttp2_transport.h", @@ -4874,6 +4897,7 @@ "src/core/lib/json/json_common.h", "src/core/lib/json/json_reader.h", "src/core/lib/json/json_writer.h", + "src/core/lib/load_reporting/load_reporting.h", "src/core/lib/surface/api_trace.h", "src/core/lib/surface/call.h", "src/core/lib/surface/call_test_only.h", @@ -4966,6 +4990,8 @@ "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", "src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/round_robin/round_robin.c", + "src/core/ext/load_reporting/load_reporting_filter.c", + "src/core/ext/load_reporting/load_reporting_filter.h", "src/core/ext/resolver/dns/native/dns_resolver.c", "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", @@ -5122,6 +5148,8 @@ "src/core/lib/json/json_string.c", "src/core/lib/json/json_writer.c", "src/core/lib/json/json_writer.h", + "src/core/lib/load_reporting/load_reporting.c", + "src/core/lib/load_reporting/load_reporting.h", "src/core/lib/surface/alarm.c", "src/core/lib/surface/api_trace.c", "src/core/lib/surface/api_trace.h", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index ebf82186450..a29a6eccaea 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -1323,6 +1323,27 @@ "windows" ] }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "load_reporting_registration_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index a582f2b7196..25f332059ff 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -812,6 +812,17 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lb_policies_test", "vcxproj {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "load_reporting_registration_test", "vcxproj\test\load_reporting_registration_test\load_reporting_registration_test.vcxproj", "{2C80EA2B-46FC-0997-E01A-F29EC3968799}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "message_compress_test", "vcxproj\test\message_compress_test\message_compress_test.vcxproj", "{07170557-CCB0-D23C-8018-C2909D115DF9}" ProjectSection(myProperties) = preProject lib = "False" @@ -2682,6 +2693,22 @@ Global {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Release-DLL|Win32.Build.0 = Release|Win32 {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Release-DLL|x64.ActiveCfg = Release|x64 {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Release-DLL|x64.Build.0 = Release|x64 + {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Debug|Win32.ActiveCfg = Debug|Win32 + {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Debug|x64.ActiveCfg = Debug|x64 + {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Release|Win32.ActiveCfg = Release|Win32 + {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Release|x64.ActiveCfg = Release|x64 + {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Debug|Win32.Build.0 = Debug|Win32 + {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Debug|x64.Build.0 = Debug|x64 + {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Release|Win32.Build.0 = Release|Win32 + {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Release|x64.Build.0 = Release|x64 + {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Debug-DLL|x64.Build.0 = Debug|x64 + {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Release-DLL|Win32.Build.0 = Release|Win32 + {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Release-DLL|x64.ActiveCfg = Release|x64 + {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Release-DLL|x64.Build.0 = Release|x64 {07170557-CCB0-D23C-8018-C2909D115DF9}.Debug|Win32.ActiveCfg = Debug|Win32 {07170557-CCB0-D23C-8018-C2909D115DF9}.Debug|x64.ActiveCfg = Debug|x64 {07170557-CCB0-D23C-8018-C2909D115DF9}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 5599e0ecd6a..defc6fe8288 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -305,6 +305,7 @@ + @@ -380,6 +381,7 @@ + @@ -479,6 +481,8 @@ + + @@ -647,6 +651,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index e49b8447d87..189fd7142fa 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -91,6 +91,9 @@ src\core\ext\lb_policy\round_robin + + src\core\ext\load_reporting + src\core\ext\resolver\dns\native @@ -343,6 +346,9 @@ src\core\lib\json + + src\core\lib\load_reporting + src\core\lib\security @@ -599,6 +605,9 @@ src\core\ext\lb_policy\grpclb\proto\grpc\lb\v0 + + src\core\ext\load_reporting + src\core\ext\transport\chttp2\transport @@ -824,6 +833,9 @@ src\core\lib\json + + src\core\lib\load_reporting + src\core\lib\security @@ -989,6 +1001,9 @@ {2472d352-cf94-f317-646e-72b769cea846} + + {b6c863cd-a135-32e8-df03-02365f526f0d} + {6bfa6808-9dcb-8990-deed-5cf58a149dda} @@ -1049,6 +1064,9 @@ {cb2b0073-f2a7-5c63-d182-8874b24bdf36} + + {0048bb64-a4b2-9f8e-c029-b43c8c207264} + {c4661d64-349f-01c1-1ba8-0602f9047595} diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index ad9589d3475..d74b755f36b 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -295,6 +295,7 @@ + @@ -370,6 +371,7 @@ + @@ -455,6 +457,8 @@ + + @@ -617,6 +621,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index c26b8befd8a..c669a243c86 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -91,6 +91,9 @@ src\core\ext\lb_policy\round_robin + + src\core\ext\load_reporting + src\core\ext\resolver\dns\native @@ -334,6 +337,9 @@ src\core\lib\json + + src\core\lib\load_reporting + src\core\lib\surface @@ -536,6 +542,9 @@ src\core\ext\lb_policy\grpclb\proto\grpc\lb\v0 + + src\core\ext\load_reporting + src\core\ext\transport\chttp2\transport @@ -761,6 +770,9 @@ src\core\lib\json + + src\core\lib\load_reporting + src\core\lib\surface @@ -884,6 +896,9 @@ {e5fc1091-5d60-404f-775b-686ef4b3266f} + + {2d6e3879-24c7-06e2-b415-40ab18a3b918} + {88c78e27-267a-95df-07c5-50e5fbc2f40c} @@ -938,6 +953,9 @@ {681cdaeb-c47f-8853-d985-bf13c2873947} + + {2d492e12-b2aa-48d8-8e90-c55a605fb34a} + {506dc3b3-d884-2b59-0dfa-57ed6affa2d3} diff --git a/vsprojects/vcxproj/test/load_reporting_registration_test/load_reporting_registration_test.vcxproj b/vsprojects/vcxproj/test/load_reporting_registration_test/load_reporting_registration_test.vcxproj new file mode 100644 index 00000000000..d1e3d703c72 --- /dev/null +++ b/vsprojects/vcxproj/test/load_reporting_registration_test/load_reporting_registration_test.vcxproj @@ -0,0 +1,199 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {2C80EA2B-46FC-0997-E01A-F29EC3968799} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + load_reporting_registration_test + static + Debug + static + Debug + + + load_reporting_registration_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/load_reporting_registration_test/load_reporting_registration_test.vcxproj.filters b/vsprojects/vcxproj/test/load_reporting_registration_test/load_reporting_registration_test.vcxproj.filters new file mode 100644 index 00000000000..69b5cd5af4b --- /dev/null +++ b/vsprojects/vcxproj/test/load_reporting_registration_test/load_reporting_registration_test.vcxproj.filters @@ -0,0 +1,21 @@ + + + + + test\core\load_reporting + + + + + + {950938ee-82ca-61f1-2c15-25af9a3cae2f} + + + {23ff812e-a51d-2d43-3a02-fd70dce0f5cf} + + + {0ddb1f19-8a9e-1216-4470-3449d37480db} + + + + From d658b4c926182ab0affe986e1fe03bbc44d93224 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 6 Apr 2016 18:17:00 -0700 Subject: [PATCH 0037/1894] fixed test --- test/core/load_reporting/load_reporting_registration.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/core/load_reporting/load_reporting_registration.c b/test/core/load_reporting/load_reporting_registration.c index fa3b5687812..43616827817 100644 --- a/test/core/load_reporting/load_reporting_registration.c +++ b/test/core/load_reporting/load_reporting_registration.c @@ -41,7 +41,7 @@ #include "test/core/util/test_config.h" static void noop(load_reporting_data *lr_data) { - uintptr_t *d = (uintptr_t *)(lr_data->data); + uint32_t *d = (uint32_t *)(lr_data->data); *d = 0xdeadbeef; } @@ -58,7 +58,7 @@ static void test_load_reporter_registration(void) { lr_data.data = gpr_malloc(sizeof(uint32_t)); grpc_load_reporting_call(&lr_data); - GPR_ASSERT(*((uintptr_t *)lr_data.data) == 0xdeadbeef); + GPR_ASSERT(*((uint32_t *)lr_data.data) == 0xdeadbeef); gpr_free(lr_data.data); } From 76cfc6ac97cd542f331aff60aaa273fccdaed815 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 7 Apr 2016 18:32:44 -0700 Subject: [PATCH 0038/1894] Some comments --- src/core/lib/iomgr/ev_poll_and_epoll_posix.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c index 3c8127e1a8c..306d312dc4e 100644 --- a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c +++ b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c @@ -756,9 +756,14 @@ static void pollset_kick_ext(grpc_pollset *p, specific_worker = pop_front_worker(p); if (specific_worker != NULL) { if (gpr_tls_get(&g_current_thread_worker) == (intptr_t)specific_worker) { + /* Prefer not to kick self. Push the worker to the end of the list and + * pop the one from front */ GPR_TIMER_MARK("kick_anonymous_not_self", 0); push_back_worker(p, specific_worker); specific_worker = pop_front_worker(p); + /* If there was only one worker on the pollset, we would get the same + * worker we pushed (the one set on current thread local) back. If so, + * kick it only if GRPC_POLLSET_CAN_KICK_SELF flag is set */ if ((flags & GRPC_POLLSET_CAN_KICK_SELF) == 0 && gpr_tls_get(&g_current_thread_worker) == (intptr_t)specific_worker) { From 42b004a2a5f785094f6c9bccaf4090e2c7c6e9b5 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 8 Apr 2016 14:41:49 -0700 Subject: [PATCH 0039/1894] first cut of changes --- src/core/lib/iomgr/ev_poll_and_epoll_posix.c | 130 ++++++++++++++++--- src/core/lib/iomgr/ev_posix.c | 4 + src/core/lib/iomgr/ev_posix.h | 6 + src/core/lib/iomgr/tcp_server_posix.c | 29 ++++- src/core/lib/surface/server.c | 5 +- 5 files changed, 151 insertions(+), 23 deletions(-) diff --git a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c index 306d312dc4e..77a67d20078 100644 --- a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c +++ b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c @@ -126,6 +126,9 @@ struct grpc_fd { grpc_closure *on_done_closure; grpc_iomgr_object iomgr_object; + + /* The pollset that last noticed and notified that the fd is readable */ + grpc_pollset *read_notifier_pollset; }; /* Begin polling on an fd. @@ -147,7 +150,8 @@ static uint32_t fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset, if got_read or got_write are 1, also does the become_{readable,writable} as appropriate. */ static void fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *rec, - int got_read, int got_write); + int got_read, int got_write, + grpc_pollset *read_notifier_pollset); /* Return 1 if this fd is orphaned, 0 otherwise */ static bool fd_is_orphaned(grpc_fd *fd); @@ -342,6 +346,7 @@ static grpc_fd *alloc_fd(int fd) { r->on_done_closure = NULL; r->closed = 0; r->released = 0; + r->read_notifier_pollset = NULL; gpr_mu_unlock(&r->mu); return r; } @@ -511,9 +516,17 @@ static void fd_unref(grpc_fd *fd) { unref_by(fd, 2); } static void notify_on_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st, grpc_closure *closure) { if (*st == CLOSURE_NOT_READY) { + /* TODO (sreek): Remove following log line */ + gpr_log(GPR_INFO, "\t>> notify_on_locked: (fd:%d) CLOSURE_NOT_READY -> %p", + fd->fd, closure); /* not ready ==> switch to a waiting state by setting the closure */ *st = closure; } else if (*st == CLOSURE_READY) { + /* TODO (sreek): Remove following log line */ + gpr_log(GPR_INFO, + "\t>> notify_on_locked: (fd:%d) CLOSURE_READY -> CLOSURE_NOT_READY " + "(enqueue: %p)", + fd->fd, closure); /* already ready ==> queue the closure to run immediately */ *st = CLOSURE_NOT_READY; grpc_exec_ctx_enqueue(exec_ctx, closure, !fd->shutdown, NULL); @@ -532,19 +545,41 @@ static int set_ready_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st) { if (*st == CLOSURE_READY) { /* duplicate ready ==> ignore */ + /* TODO (sreek): Remove following log line */ + gpr_log(GPR_INFO, + "\t>> set_ready_locked: (fd:%d) CLOSURE_READY -> CLOSURE_READY (no " + "change)", + fd->fd); return 0; } else if (*st == CLOSURE_NOT_READY) { /* not ready, and not waiting ==> flag ready */ + /* TODO (sreek): Remove following log line */ + gpr_log(GPR_INFO, + "\t>> set_ready_locked: (fd:%d) CLOSURE_NOT_READY -> CLOSURE_READY", + fd->fd); *st = CLOSURE_READY; return 0; } else { /* waiting ==> queue closure */ + /* TODO (sreek): Remove following log line */ + gpr_log(GPR_INFO, + "\t>> set_ready_locked: (fd:%d) Enqueue %p -> CLOSURE_NOT_READY", + fd->fd, *st); grpc_exec_ctx_enqueue(exec_ctx, *st, !fd->shutdown, NULL); *st = CLOSURE_NOT_READY; return 1; } } +static void set_read_notifier_pollset_locked( + grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_pollset *read_notifier_pollset) { + /* TODO(sreek): Remove the following log line */ + gpr_log(GPR_INFO, "\t>> Set read notifier (fd:%d): %p --> %p", fd->fd, + fd->read_notifier_pollset, read_notifier_pollset); + + fd->read_notifier_pollset = read_notifier_pollset; +} + static void fd_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { gpr_mu_lock(&fd->mu); GPR_ASSERT(!fd->shutdown); @@ -568,6 +603,18 @@ static void fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, gpr_mu_unlock(&fd->mu); } +/* Return the read-notifier pollset */ +static grpc_pollset *fd_get_read_notifier_pollset(grpc_exec_ctx *exec_ctx, + grpc_fd *fd) { + grpc_pollset *notifier = NULL; + + gpr_mu_lock(&fd->mu); + notifier = fd->read_notifier_pollset; + gpr_mu_unlock(&fd->mu); + + return notifier; +} + static uint32_t fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset, grpc_pollset_worker *worker, uint32_t read_mask, uint32_t write_mask, grpc_fd_watcher *watcher) { @@ -620,7 +667,8 @@ static uint32_t fd_begin_poll(grpc_fd *fd, grpc_pollset *pollset, } static void fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *watcher, - int got_read, int got_write) { + int got_read, int got_write, + grpc_pollset *read_notifier_pollset) { int was_polling = 0; int kick = 0; grpc_fd *fd = watcher->fd; @@ -653,11 +701,27 @@ static void fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *watcher, watcher->prev->next = watcher->next; } if (got_read) { + /*TODO(sreek): Delete this log line */ + gpr_log(GPR_INFO, + "\t>> fd_end_poll(): GOT READ Calling set_ready_locked. fd: %d, " + "fd->read_closure: %p, " + "notifier_pollset: %p", + fd->fd, fd->read_closure, read_notifier_pollset); + if (set_ready_locked(exec_ctx, fd, &fd->read_closure)) { kick = 1; } + + if (read_notifier_pollset != NULL) { + set_read_notifier_pollset_locked(exec_ctx, fd, read_notifier_pollset); + } } if (got_write) { + /*TODO(sreek): Delete this log line */ + gpr_log(GPR_INFO, + "\t>> fd_end_poll(): GOT WRITE set_ready_locked. fd: %d, " + "fd->write_closure: %p", + fd->fd, fd->write_closure); if (set_ready_locked(exec_ctx, fd, &fd->write_closure)) { kick = 1; } @@ -1208,11 +1272,11 @@ static void basic_pollset_maybe_work_and_unlock(grpc_exec_ctx *exec_ctx, gpr_log(GPR_ERROR, "poll() failed: %s", strerror(errno)); } if (fd) { - fd_end_poll(exec_ctx, &fd_watcher, 0, 0); + fd_end_poll(exec_ctx, &fd_watcher, 0, 0, NULL); } } else if (r == 0) { if (fd) { - fd_end_poll(exec_ctx, &fd_watcher, 0, 0); + fd_end_poll(exec_ctx, &fd_watcher, 0, 0, NULL); } } else { if (pfd[0].revents & POLLIN_CHECK) { @@ -1222,10 +1286,16 @@ static void basic_pollset_maybe_work_and_unlock(grpc_exec_ctx *exec_ctx, grpc_wakeup_fd_consume_wakeup(&worker->wakeup_fd->fd); } if (nfds > 2) { + /* TODO(sreek): delete the following comment line */ + gpr_log( + GPR_INFO, + "\t>> basic_pollset_maybe_work_and_unlock(): fd->fd: %d, pollset: %p " + "is readable (calling fd_end_poll()) -------------------------------", + pfd[2].fd, pollset); fd_end_poll(exec_ctx, &fd_watcher, pfd[2].revents & POLLIN_CHECK, - pfd[2].revents & POLLOUT_CHECK); + pfd[2].revents & POLLOUT_CHECK, pollset); } else if (fd) { - fd_end_poll(exec_ctx, &fd_watcher, 0, 0); + fd_end_poll(exec_ctx, &fd_watcher, 0, 0, NULL); } } @@ -1361,11 +1431,11 @@ static void multipoll_with_poll_pollset_maybe_work_and_unlock( gpr_log(GPR_ERROR, "poll() failed: %s", strerror(errno)); } for (i = 2; i < pfd_count; i++) { - fd_end_poll(exec_ctx, &watchers[i], 0, 0); + fd_end_poll(exec_ctx, &watchers[i], 0, 0, NULL); } } else if (r == 0) { for (i = 2; i < pfd_count; i++) { - fd_end_poll(exec_ctx, &watchers[i], 0, 0); + fd_end_poll(exec_ctx, &watchers[i], 0, 0, NULL); } } else { if (pfds[0].revents & POLLIN_CHECK) { @@ -1376,11 +1446,16 @@ static void multipoll_with_poll_pollset_maybe_work_and_unlock( } for (i = 2; i < pfd_count; i++) { if (watchers[i].fd == NULL) { - fd_end_poll(exec_ctx, &watchers[i], 0, 0); + fd_end_poll(exec_ctx, &watchers[i], 0, 0, NULL); continue; } + /*TODO(sree) - Delete this log line*/ + gpr_log(GPR_INFO, + "multipoll_with_poll_pollset(). fd: %d became redable. Pollset: " + "%p (calling fd_end_poll())*************", + pfds[i].fd, pollset); fd_end_poll(exec_ctx, &watchers[i], pfds[i].revents & POLLIN_CHECK, - pfds[i].revents & POLLOUT_CHECK); + pfds[i].revents & POLLOUT_CHECK, pollset); } } @@ -1456,20 +1531,31 @@ static void poll_become_multipoller(grpc_exec_ctx *exec_ctx, #include "src/core/lib/profiling/timers.h" #include "src/core/lib/support/block_annotate.h" -static void set_ready(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st) { +static void set_ready(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st, + grpc_pollset *read_notifier_pollset) { /* only one set_ready can be active at once (but there may be a racing notify_on) */ gpr_mu_lock(&fd->mu); set_ready_locked(exec_ctx, fd, st); + + /* A non-NULL read_notifier_pollset means that the fd is readable. */ + if (read_notifier_pollset != NULL) { + /* Note: Since the fd might be a part of multiple pollsets, this might be + * called multiple times (for each time the fd becomes readable) and it is + * okay to set the fd's read-notifier pollset to anyone of these pollsets */ + set_read_notifier_pollset_locked(exec_ctx, fd, read_notifier_pollset); + } + gpr_mu_unlock(&fd->mu); } -static void fd_become_readable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { - set_ready(exec_ctx, fd, &fd->read_closure); +static void fd_become_readable(grpc_exec_ctx *exec_ctx, grpc_fd *fd, + grpc_pollset *notifier_pollset) { + set_ready(exec_ctx, fd, &fd->read_closure, notifier_pollset); } static void fd_become_writable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { - set_ready(exec_ctx, fd, &fd->write_closure); + set_ready(exec_ctx, fd, &fd->write_closure, NULL); } struct epoll_fd_list { @@ -1561,7 +1647,7 @@ static void finally_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, } } } - fd_end_poll(exec_ctx, &watcher, 0, 0); + fd_end_poll(exec_ctx, &watcher, 0, 0, NULL); } static void perform_delayed_add(grpc_exec_ctx *exec_ctx, void *arg, @@ -1675,9 +1761,20 @@ static void multipoll_with_epoll_pollset_maybe_work_and_unlock( grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); } else { if (read_ev || cancel) { - fd_become_readable(exec_ctx, fd); + /* TODO(sreek): Delete this once the issue #5470 is resolved */ + gpr_log( + GPR_INFO, + "\t>> multipoll_with_epoll_pollset: Calling " + "fd_become_readable(fd->fd: %d, pollset: %p) ++++++++++++", + fd->fd, pollset); + fd_become_readable(exec_ctx, fd, pollset); } if (write_ev || cancel) { + /* TODO(sreek): Delete the following log line */ + gpr_log(GPR_INFO, + "\t>> multipoll_with_epoll_pollset: Calling " + "fd_become_writable(fd: %d)", + fd->fd); fd_become_writable(exec_ctx, fd); } } @@ -1904,6 +2001,7 @@ static const grpc_event_engine_vtable vtable = { .fd_shutdown = fd_shutdown, .fd_notify_on_read = fd_notify_on_read, .fd_notify_on_write = fd_notify_on_write, + .fd_get_read_notifier_pollset = fd_get_read_notifier_pollset, .pollset_init = pollset_init, .pollset_shutdown = pollset_shutdown, diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index 0eb95a2e091..af4126c900c 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -83,6 +83,10 @@ void grpc_fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, g_event_engine->fd_notify_on_write(exec_ctx, fd, closure); } +grpc_pollset *grpc_fd_get_read_notifier_pollset(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { + return g_event_engine->fd_get_read_notifier_pollset(exec_ctx, fd); +} + size_t grpc_pollset_size(void) { return g_event_engine->pollset_size; } void grpc_pollset_init(grpc_pollset *pollset, gpr_mu **mu) { diff --git a/src/core/lib/iomgr/ev_posix.h b/src/core/lib/iomgr/ev_posix.h index 1fa9f5ef2d6..4cfa83e6a23 100644 --- a/src/core/lib/iomgr/ev_posix.h +++ b/src/core/lib/iomgr/ev_posix.h @@ -55,6 +55,8 @@ typedef struct grpc_event_engine_vtable { grpc_closure *closure); void (*fd_notify_on_write)(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *closure); + grpc_pollset *(*fd_get_read_notifier_pollset)(grpc_exec_ctx *exec_ctx, + grpc_fd *fd); void (*pollset_init)(grpc_pollset *pollset, gpr_mu **mu); void (*pollset_shutdown)(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, @@ -137,6 +139,10 @@ void grpc_fd_notify_on_read(grpc_exec_ctx *exec_ctx, grpc_fd *fd, void grpc_fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *closure); +/* Return the read notifier pollset from the fd */ +grpc_pollset *grpc_fd_get_read_notifier_pollset(grpc_exec_ctx *exec_ctx, + grpc_fd *fd); + /* pollset_posix functions */ /* Add an fd to a pollset */ diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index cfb52516845..03318151ccf 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -310,13 +310,20 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, bool success) { grpc_tcp_listener *sp = arg; grpc_tcp_server_acceptor acceptor = {sp->server, sp->port_index, sp->fd_index}; + grpc_pollset *read_notifier_pollset = NULL; grpc_fd *fdobj; - size_t i; if (!success) { goto error; } + /* TODO(sreek): Delete the following log line */ + gpr_log(GPR_INFO, "\t\t** tcp_server_posix.on_read(): Getting read notifier"); + read_notifier_pollset = grpc_fd_get_read_notifier_pollset(exec_ctx, sp->emfd); + /* TODO(sreek): Delete the following log line */ + gpr_log(GPR_INFO, "\t\t** tcp_server_posix.on_read(): Got read notifier: %p", + read_notifier_pollset); + /* loop until accept4 returns EAGAIN, and then re-arm notification */ for (;;) { struct sockaddr_storage addr; @@ -349,12 +356,22 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, bool success) { } fdobj = grpc_fd_create(fd, name); - /* TODO(ctiller): revise this when we have server-side sharding - of channels -- we certainly should not be automatically adding every - incoming channel to every pollset owned by the server */ - for (i = 0; i < sp->server->pollset_count; i++) { - grpc_pollset_add_fd(exec_ctx, sp->server->pollsets[i], fdobj); + + if (read_notifier_pollset == NULL) { + /* TODO(sreek): Check when this would happen - Ideally this should not + * happen. Remove the next log-line once this is resolved */ + gpr_log(GPR_INFO, "\t** *******!!! tcp_server_posix.on_read(): " + "read_notifier_pollset is NULL. !!!**********************"); + + gpr_log(GPR_ERROR, "Read notifier pollset is not set on the fd"); + goto error; } + + /* TODO(sreek): Delete the following log line */ + gpr_log(GPR_INFO, "\t\t** tcp_server_posix.on_read(): Adding fd %d *only* to pollset %p", + fd, read_notifier_pollset); + grpc_pollset_add_fd(exec_ctx, read_notifier_pollset, fdobj); + sp->server->on_accept_cb( exec_ctx, sp->server->on_accept_cb_arg, grpc_tcp_create(fdobj, GRPC_TCP_DEFAULT_READ_SLICE_SIZE, addr_str), diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index ad8ee8c7a99..25b6886f241 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -1018,7 +1018,6 @@ void grpc_server_start(grpc_server *server) { void grpc_server_setup_transport(grpc_exec_ctx *exec_ctx, grpc_server *s, grpc_transport *transport, const grpc_channel_args *args) { - size_t i; size_t num_registered_methods; size_t alloc; registered_method *rm; @@ -1033,11 +1032,15 @@ void grpc_server_setup_transport(grpc_exec_ctx *exec_ctx, grpc_server *s, uint32_t max_probes = 0; grpc_transport_op op; + /* TODO(sreek): Delete this commented block once issue #5470 is resolved */ + /* + size_t i; for (i = 0; i < s->cq_count; i++) { memset(&op, 0, sizeof(op)); op.bind_pollset = grpc_cq_pollset(s->cqs[i]); grpc_transport_perform_op(exec_ctx, transport, &op); } + */ channel = grpc_channel_create(exec_ctx, NULL, args, GRPC_SERVER_CHANNEL, transport); From 47ef37a9ad495a09ffe4820c9b46963796ff3370 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Mon, 11 Apr 2016 18:59:23 -0700 Subject: [PATCH 0040/1894] test cases --- test/core/iomgr/fd_posix_test.c | 98 +++++++++++++++++++++++++++++++++ 1 file changed, 98 insertions(+) diff --git a/test/core/iomgr/fd_posix_test.c b/test/core/iomgr/fd_posix_test.c index f97f33712eb..18cd825df00 100644 --- a/test/core/iomgr/fd_posix_test.c +++ b/test/core/iomgr/fd_posix_test.c @@ -518,6 +518,103 @@ static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) { grpc_pollset_destroy(p); } +typedef struct read_notifier_test_fd_context { + grpc_fd *fd; + bool is_cb_called; +} read_notifier_test_fd_context; + +static void read_notifier_test_callback( + grpc_exec_ctx *exec_ctx, void *arg /* (read_notifier_test_fd_context *) */, + bool success) { + read_notifier_test_fd_context *fd_context = arg; + grpc_fd *fd = fd_context->fd; + + /* Verify that the read notifier pollset is set */ + GPR_ASSERT(grpc_fd_get_read_notifier_pollset(exec_ctx, fd) != NULL); + fd_context->is_cb_called = true; +} + +/* sv MUST to be an array of size 2 */ +static void get_socket_pair(int sv[]) { + int flags = 0; + GPR_ASSERT(socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == 0); + flags = fcntl(sv[0], F_GETFL, 0); + GPR_ASSERT(fcntl(sv[0], F_SETFL, flags | O_NONBLOCK) == 0); + flags = fcntl(sv[1], F_GETFL, 0); + GPR_ASSERT(fcntl(sv[1], F_SETFL, flags | O_NONBLOCK) == 0); +} + +static grpc_pollset *create_grpc_pollset(gpr_mu **mu) { + grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); + grpc_pollset_init(pollset, mu); + return pollset; +} + +static void free_grpc_pollset(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset) { + grpc_closure destroyed; + grpc_closure_init(&destroyed, destroy_pollset, pollset); + grpc_pollset_shutdown(exec_ctx, pollset, &destroyed); + grpc_exec_ctx_finish(exec_ctx); + gpr_free(pollset); +} + +static void test_grpc_fd_read_notifier_pollset(void) { + grpc_fd *em_fd[2]; + read_notifier_test_fd_context fd_context; + int sv[2][2]; + char data; + ssize_t result; + int i; + grpc_closure on_read_closure; + gpr_mu *mu; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + + grpc_pollset *pollset = create_grpc_pollset(&mu); + + for (i = 0; i < 2; i++) { + get_socket_pair(sv[i]); + + em_fd[i] = grpc_fd_create(sv[i][0], "test_grpc_fd_1_read_notifier_pollset"); + + grpc_pollset_add_fd(&exec_ctx, pollset, em_fd[i]); + + on_read_closure.cb = read_notifier_test_callback; + fd_context.fd = em_fd[i]; + fd_context.is_cb_called = false; + on_read_closure.cb_arg = &fd_context; + grpc_fd_notify_on_read(&exec_ctx, em_fd[i], &on_read_closure); + + data = 0; + result = write(sv[i][1], &data, sizeof(data)); + GPR_ASSERT(result == 1); + + gpr_mu_lock(mu); + while (!fd_context.is_cb_called) { + grpc_pollset_worker *worker = NULL; + grpc_pollset_work(&exec_ctx, pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), + gpr_inf_future(GPR_CLOCK_MONOTONIC)); + gpr_mu_unlock(mu); + grpc_exec_ctx_finish(&exec_ctx); + gpr_mu_lock(mu); + } + gpr_mu_unlock(mu); + + /* Drain the socket (Not really needed for the test) */ + result = read(sv[i][0], &data, 1); + GPR_ASSERT(result == 1); + } + + + for (i = 0; i < 2; i++) { + grpc_fd_orphan(&exec_ctx, em_fd[i], NULL, NULL, ""); + close(sv[i][1]); + } + + free_grpc_pollset(&exec_ctx, pollset); + grpc_exec_ctx_finish(&exec_ctx); +} + int main(int argc, char **argv) { grpc_closure destroyed; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -527,6 +624,7 @@ int main(int argc, char **argv) { grpc_pollset_init(g_pollset, &g_mu); test_grpc_fd(); test_grpc_fd_change(); + test_grpc_fd_read_notifier_pollset(); grpc_closure_init(&destroyed, destroy_pollset, g_pollset); grpc_pollset_shutdown(&exec_ctx, g_pollset, &destroyed); grpc_exec_ctx_finish(&exec_ctx); From 89bbc7817a7e68d9bbc6207af34614e1610c70e6 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Mon, 11 Apr 2016 23:10:13 -0700 Subject: [PATCH 0041/1894] Rewrite test case to handle more scenarios --- test/core/iomgr/fd_posix_test.c | 78 +++++++++++++++++++++++---------- 1 file changed, 55 insertions(+), 23 deletions(-) diff --git a/test/core/iomgr/fd_posix_test.c b/test/core/iomgr/fd_posix_test.c index 18cd825df00..187720e1de2 100644 --- a/test/core/iomgr/fd_posix_test.c +++ b/test/core/iomgr/fd_posix_test.c @@ -554,64 +554,95 @@ static void free_grpc_pollset(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset) { grpc_closure destroyed; grpc_closure_init(&destroyed, destroy_pollset, pollset); grpc_pollset_shutdown(exec_ctx, pollset, &destroyed); - grpc_exec_ctx_finish(exec_ctx); + grpc_exec_ctx_flush(exec_ctx); gpr_free(pollset); } -static void test_grpc_fd_read_notifier_pollset(void) { +/* This tests that the read_notifier_pollset field of a grpc_fd is properly + set when the grpc_fd becomes readable + - This tests both basic and multi pollsets + - The parameter register_cb_after_read_event controls whether the on-read + callback registration (i.e the one done by grpc_fd_notify_on_read()) is + done either before or after the fd becomes readable + */ +static void test_grpc_fd_read_notifier_pollset( + bool register_cb_after_read_event) { grpc_fd *em_fd[2]; - read_notifier_test_fd_context fd_context; int sv[2][2]; + gpr_mu *mu[2]; + grpc_pollset *pollset[2]; char data; ssize_t result; int i; + grpc_pollset_worker *worker; + read_notifier_test_fd_context fd_context; grpc_closure on_read_closure; - gpr_mu *mu; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_pollset *pollset = create_grpc_pollset(&mu); - for (i = 0; i < 2; i++) { - get_socket_pair(sv[i]); + pollset[i] = create_grpc_pollset(&mu[i]); + get_socket_pair(sv[i]); /* sv[i][0] & sv[i][1] will have the socket pair */ + em_fd[i] = grpc_fd_create(sv[i][0], "test_grpc_fd_read_notifier_pollset"); + grpc_pollset_add_fd(&exec_ctx, pollset[i], em_fd[i]); + } - em_fd[i] = grpc_fd_create(sv[i][0], "test_grpc_fd_1_read_notifier_pollset"); + /* At this point pollset[0] has em_fd[0] and pollset[1] has em_fd[1] and both + are basic pollsets. Make pollset[1] a multi-pollset by adding em_fd[0] to + it */ + grpc_pollset_add_fd(&exec_ctx, pollset[1], em_fd[0]); + grpc_exec_ctx_flush(&exec_ctx); - grpc_pollset_add_fd(&exec_ctx, pollset, em_fd[i]); + /* The following tests that the read_notifier_pollset is correctly set on the + grpc_fd structure in both basic pollset and multi pollset cases. + pollset[0] is a basic pollset containing just em_fd[0] + pollset[1] is a multi pollset containing em_fd[0] and em_fd[1] */ + for (i = 0; i < 2; i++) { on_read_closure.cb = read_notifier_test_callback; fd_context.fd = em_fd[i]; fd_context.is_cb_called = false; on_read_closure.cb_arg = &fd_context; - grpc_fd_notify_on_read(&exec_ctx, em_fd[i], &on_read_closure); + + if (!register_cb_after_read_event) { + /* Registering the callback BEFORE the fd is readable */ + grpc_fd_notify_on_read(&exec_ctx, em_fd[i], &on_read_closure); + } data = 0; result = write(sv[i][1], &data, sizeof(data)); GPR_ASSERT(result == 1); - gpr_mu_lock(mu); - while (!fd_context.is_cb_called) { - grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), - gpr_inf_future(GPR_CLOCK_MONOTONIC)); - gpr_mu_unlock(mu); - grpc_exec_ctx_finish(&exec_ctx); - gpr_mu_lock(mu); + /* grpc_pollset_work requires the caller to hold the pollset mutex */ + gpr_mu_lock(mu[i]); + worker = NULL; + grpc_pollset_work(&exec_ctx, pollset[i], &worker, + gpr_now(GPR_CLOCK_MONOTONIC), + gpr_inf_future(GPR_CLOCK_MONOTONIC)); + gpr_mu_unlock(mu[i]); + grpc_exec_ctx_flush(&exec_ctx); + + if (register_cb_after_read_event) { + /* Registering the callback after the fd is readable. In this case, the + callback should be executed right away. */ + grpc_fd_notify_on_read(&exec_ctx, em_fd[i], &on_read_closure); + grpc_exec_ctx_flush(&exec_ctx); } - gpr_mu_unlock(mu); + + /* The callback should have been called by now */ + GPR_ASSERT(fd_context.is_cb_called); /* Drain the socket (Not really needed for the test) */ result = read(sv[i][0], &data, 1); GPR_ASSERT(result == 1); } - + /* Clean up */ for (i = 0; i < 2; i++) { grpc_fd_orphan(&exec_ctx, em_fd[i], NULL, NULL, ""); close(sv[i][1]); + free_grpc_pollset(&exec_ctx, pollset[i]); } - free_grpc_pollset(&exec_ctx, pollset); grpc_exec_ctx_finish(&exec_ctx); } @@ -624,7 +655,8 @@ int main(int argc, char **argv) { grpc_pollset_init(g_pollset, &g_mu); test_grpc_fd(); test_grpc_fd_change(); - test_grpc_fd_read_notifier_pollset(); + test_grpc_fd_read_notifier_pollset(false); + test_grpc_fd_read_notifier_pollset(true); grpc_closure_init(&destroyed, destroy_pollset, g_pollset); grpc_pollset_shutdown(&exec_ctx, g_pollset, &destroyed); grpc_exec_ctx_finish(&exec_ctx); From fe115892d52b96946f3e661616468de059347e5c Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Tue, 12 Apr 2016 09:24:38 -0700 Subject: [PATCH 0042/1894] Delete debug log lines --- src/core/lib/iomgr/ev_poll_and_epoll_posix.c | 59 -------------------- src/core/lib/iomgr/tcp_server_posix.c | 13 ----- src/core/lib/surface/server.c | 10 ---- 3 files changed, 82 deletions(-) diff --git a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c index 77a67d20078..5800b372106 100644 --- a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c +++ b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c @@ -516,17 +516,9 @@ static void fd_unref(grpc_fd *fd) { unref_by(fd, 2); } static void notify_on_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st, grpc_closure *closure) { if (*st == CLOSURE_NOT_READY) { - /* TODO (sreek): Remove following log line */ - gpr_log(GPR_INFO, "\t>> notify_on_locked: (fd:%d) CLOSURE_NOT_READY -> %p", - fd->fd, closure); /* not ready ==> switch to a waiting state by setting the closure */ *st = closure; } else if (*st == CLOSURE_READY) { - /* TODO (sreek): Remove following log line */ - gpr_log(GPR_INFO, - "\t>> notify_on_locked: (fd:%d) CLOSURE_READY -> CLOSURE_NOT_READY " - "(enqueue: %p)", - fd->fd, closure); /* already ready ==> queue the closure to run immediately */ *st = CLOSURE_NOT_READY; grpc_exec_ctx_enqueue(exec_ctx, closure, !fd->shutdown, NULL); @@ -545,26 +537,13 @@ static int set_ready_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st) { if (*st == CLOSURE_READY) { /* duplicate ready ==> ignore */ - /* TODO (sreek): Remove following log line */ - gpr_log(GPR_INFO, - "\t>> set_ready_locked: (fd:%d) CLOSURE_READY -> CLOSURE_READY (no " - "change)", - fd->fd); return 0; } else if (*st == CLOSURE_NOT_READY) { /* not ready, and not waiting ==> flag ready */ - /* TODO (sreek): Remove following log line */ - gpr_log(GPR_INFO, - "\t>> set_ready_locked: (fd:%d) CLOSURE_NOT_READY -> CLOSURE_READY", - fd->fd); *st = CLOSURE_READY; return 0; } else { /* waiting ==> queue closure */ - /* TODO (sreek): Remove following log line */ - gpr_log(GPR_INFO, - "\t>> set_ready_locked: (fd:%d) Enqueue %p -> CLOSURE_NOT_READY", - fd->fd, *st); grpc_exec_ctx_enqueue(exec_ctx, *st, !fd->shutdown, NULL); *st = CLOSURE_NOT_READY; return 1; @@ -573,10 +552,6 @@ static int set_ready_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, static void set_read_notifier_pollset_locked( grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_pollset *read_notifier_pollset) { - /* TODO(sreek): Remove the following log line */ - gpr_log(GPR_INFO, "\t>> Set read notifier (fd:%d): %p --> %p", fd->fd, - fd->read_notifier_pollset, read_notifier_pollset); - fd->read_notifier_pollset = read_notifier_pollset; } @@ -701,13 +676,6 @@ static void fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *watcher, watcher->prev->next = watcher->next; } if (got_read) { - /*TODO(sreek): Delete this log line */ - gpr_log(GPR_INFO, - "\t>> fd_end_poll(): GOT READ Calling set_ready_locked. fd: %d, " - "fd->read_closure: %p, " - "notifier_pollset: %p", - fd->fd, fd->read_closure, read_notifier_pollset); - if (set_ready_locked(exec_ctx, fd, &fd->read_closure)) { kick = 1; } @@ -717,11 +685,6 @@ static void fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *watcher, } } if (got_write) { - /*TODO(sreek): Delete this log line */ - gpr_log(GPR_INFO, - "\t>> fd_end_poll(): GOT WRITE set_ready_locked. fd: %d, " - "fd->write_closure: %p", - fd->fd, fd->write_closure); if (set_ready_locked(exec_ctx, fd, &fd->write_closure)) { kick = 1; } @@ -1286,12 +1249,6 @@ static void basic_pollset_maybe_work_and_unlock(grpc_exec_ctx *exec_ctx, grpc_wakeup_fd_consume_wakeup(&worker->wakeup_fd->fd); } if (nfds > 2) { - /* TODO(sreek): delete the following comment line */ - gpr_log( - GPR_INFO, - "\t>> basic_pollset_maybe_work_and_unlock(): fd->fd: %d, pollset: %p " - "is readable (calling fd_end_poll()) -------------------------------", - pfd[2].fd, pollset); fd_end_poll(exec_ctx, &fd_watcher, pfd[2].revents & POLLIN_CHECK, pfd[2].revents & POLLOUT_CHECK, pollset); } else if (fd) { @@ -1449,11 +1406,6 @@ static void multipoll_with_poll_pollset_maybe_work_and_unlock( fd_end_poll(exec_ctx, &watchers[i], 0, 0, NULL); continue; } - /*TODO(sree) - Delete this log line*/ - gpr_log(GPR_INFO, - "multipoll_with_poll_pollset(). fd: %d became redable. Pollset: " - "%p (calling fd_end_poll())*************", - pfds[i].fd, pollset); fd_end_poll(exec_ctx, &watchers[i], pfds[i].revents & POLLIN_CHECK, pfds[i].revents & POLLOUT_CHECK, pollset); } @@ -1761,20 +1713,9 @@ static void multipoll_with_epoll_pollset_maybe_work_and_unlock( grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); } else { if (read_ev || cancel) { - /* TODO(sreek): Delete this once the issue #5470 is resolved */ - gpr_log( - GPR_INFO, - "\t>> multipoll_with_epoll_pollset: Calling " - "fd_become_readable(fd->fd: %d, pollset: %p) ++++++++++++", - fd->fd, pollset); fd_become_readable(exec_ctx, fd, pollset); } if (write_ev || cancel) { - /* TODO(sreek): Delete the following log line */ - gpr_log(GPR_INFO, - "\t>> multipoll_with_epoll_pollset: Calling " - "fd_become_writable(fd: %d)", - fd->fd); fd_become_writable(exec_ctx, fd); } } diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 03318151ccf..7045a260520 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -317,12 +317,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, bool success) { goto error; } - /* TODO(sreek): Delete the following log line */ - gpr_log(GPR_INFO, "\t\t** tcp_server_posix.on_read(): Getting read notifier"); read_notifier_pollset = grpc_fd_get_read_notifier_pollset(exec_ctx, sp->emfd); - /* TODO(sreek): Delete the following log line */ - gpr_log(GPR_INFO, "\t\t** tcp_server_posix.on_read(): Got read notifier: %p", - read_notifier_pollset); /* loop until accept4 returns EAGAIN, and then re-arm notification */ for (;;) { @@ -358,18 +353,10 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, bool success) { fdobj = grpc_fd_create(fd, name); if (read_notifier_pollset == NULL) { - /* TODO(sreek): Check when this would happen - Ideally this should not - * happen. Remove the next log-line once this is resolved */ - gpr_log(GPR_INFO, "\t** *******!!! tcp_server_posix.on_read(): " - "read_notifier_pollset is NULL. !!!**********************"); - gpr_log(GPR_ERROR, "Read notifier pollset is not set on the fd"); goto error; } - /* TODO(sreek): Delete the following log line */ - gpr_log(GPR_INFO, "\t\t** tcp_server_posix.on_read(): Adding fd %d *only* to pollset %p", - fd, read_notifier_pollset); grpc_pollset_add_fd(exec_ctx, read_notifier_pollset, fdobj); sp->server->on_accept_cb( diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 25b6886f241..cbfd2458741 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -1032,16 +1032,6 @@ void grpc_server_setup_transport(grpc_exec_ctx *exec_ctx, grpc_server *s, uint32_t max_probes = 0; grpc_transport_op op; - /* TODO(sreek): Delete this commented block once issue #5470 is resolved */ - /* - size_t i; - for (i = 0; i < s->cq_count; i++) { - memset(&op, 0, sizeof(op)); - op.bind_pollset = grpc_cq_pollset(s->cqs[i]); - grpc_transport_perform_op(exec_ctx, transport, &op); - } - */ - channel = grpc_channel_create(exec_ctx, NULL, args, GRPC_SERVER_CHANNEL, transport); chand = (channel_data *)grpc_channel_stack_element( From 25720efec5173dc2a6b70841edcc0e56962567e9 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 12 Apr 2016 19:30:19 +0200 Subject: [PATCH 0043/1894] Sanitizing repository. --- src/proto/grpc/binary_log/v1alpha/log.proto | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/proto/grpc/binary_log/v1alpha/log.proto b/src/proto/grpc/binary_log/v1alpha/log.proto index 6cc473be74e..83166cd4104 100644 --- a/src/proto/grpc/binary_log/v1alpha/log.proto +++ b/src/proto/grpc/binary_log/v1alpha/log.proto @@ -105,4 +105,4 @@ message Message { // The contents of the message. May be a prefix instead of the complete // message. bytes data = 5; -} \ No newline at end of file +} From 5e28d71f3de6e4edc72b703e07b43709d8cc783f Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Tue, 12 Apr 2016 10:45:07 -0700 Subject: [PATCH 0044/1894] fix formatting --- src/core/lib/iomgr/ev_posix.c | 3 ++- src/core/lib/iomgr/ev_posix.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index af4126c900c..8c6ec90684f 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -83,7 +83,8 @@ void grpc_fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, g_event_engine->fd_notify_on_write(exec_ctx, fd, closure); } -grpc_pollset *grpc_fd_get_read_notifier_pollset(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { +grpc_pollset *grpc_fd_get_read_notifier_pollset(grpc_exec_ctx *exec_ctx, + grpc_fd *fd) { return g_event_engine->fd_get_read_notifier_pollset(exec_ctx, fd); } diff --git a/src/core/lib/iomgr/ev_posix.h b/src/core/lib/iomgr/ev_posix.h index 4cfa83e6a23..344bf63438a 100644 --- a/src/core/lib/iomgr/ev_posix.h +++ b/src/core/lib/iomgr/ev_posix.h @@ -56,7 +56,7 @@ typedef struct grpc_event_engine_vtable { void (*fd_notify_on_write)(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *closure); grpc_pollset *(*fd_get_read_notifier_pollset)(grpc_exec_ctx *exec_ctx, - grpc_fd *fd); + grpc_fd *fd); void (*pollset_init)(grpc_pollset *pollset, gpr_mu **mu); void (*pollset_shutdown)(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, @@ -141,7 +141,7 @@ void grpc_fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, /* Return the read notifier pollset from the fd */ grpc_pollset *grpc_fd_get_read_notifier_pollset(grpc_exec_ctx *exec_ctx, - grpc_fd *fd); + grpc_fd *fd); /* pollset_posix functions */ From 9e926e8408803fcfdb5380caa28bdef73a6ddb5f Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 14 Apr 2016 10:54:14 -0700 Subject: [PATCH 0045/1894] Test failures fix --- test/core/end2end/fixtures/h2_sockpair+trace.c | 3 +++ test/core/end2end/fixtures/h2_sockpair.c | 3 +++ test/core/end2end/fixtures/h2_sockpair_1byte.c | 3 +++ 3 files changed, 9 insertions(+) diff --git a/test/core/end2end/fixtures/h2_sockpair+trace.c b/test/core/end2end/fixtures/h2_sockpair+trace.c index 87533a9b7f3..b730df753ca 100644 --- a/test/core/end2end/fixtures/h2_sockpair+trace.c +++ b/test/core/end2end/fixtures/h2_sockpair+trace.c @@ -50,6 +50,7 @@ #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/support/env.h" #include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/completion_queue.h" #include "src/core/lib/surface/server.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" @@ -60,6 +61,8 @@ static void server_setup_transport(void *ts, grpc_transport *transport) { grpc_end2end_test_fixture *f = ts; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_endpoint_pair *sfd = f->fixture_data; + grpc_endpoint_add_to_pollset(&exec_ctx, sfd->server, grpc_cq_pollset(f->cq)); grpc_server_setup_transport(&exec_ctx, f->server, transport, grpc_server_get_channel_args(f->server)); grpc_exec_ctx_finish(&exec_ctx); diff --git a/test/core/end2end/fixtures/h2_sockpair.c b/test/core/end2end/fixtures/h2_sockpair.c index f28147cf40a..41fcc1d6313 100644 --- a/test/core/end2end/fixtures/h2_sockpair.c +++ b/test/core/end2end/fixtures/h2_sockpair.c @@ -49,6 +49,7 @@ #include "src/core/lib/iomgr/endpoint_pair.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/completion_queue.h" #include "src/core/lib/surface/server.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" @@ -59,6 +60,8 @@ static void server_setup_transport(void *ts, grpc_transport *transport) { grpc_end2end_test_fixture *f = ts; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_endpoint_pair *sfd = f->fixture_data; + grpc_endpoint_add_to_pollset(&exec_ctx, sfd->server, grpc_cq_pollset(f->cq)); grpc_server_setup_transport(&exec_ctx, f->server, transport, grpc_server_get_channel_args(f->server)); grpc_exec_ctx_finish(&exec_ctx); diff --git a/test/core/end2end/fixtures/h2_sockpair_1byte.c b/test/core/end2end/fixtures/h2_sockpair_1byte.c index 302b16b372d..4c805c43706 100644 --- a/test/core/end2end/fixtures/h2_sockpair_1byte.c +++ b/test/core/end2end/fixtures/h2_sockpair_1byte.c @@ -49,6 +49,7 @@ #include "src/core/lib/iomgr/endpoint_pair.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/completion_queue.h" #include "src/core/lib/surface/server.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" @@ -59,6 +60,8 @@ static void server_setup_transport(void *ts, grpc_transport *transport) { grpc_end2end_test_fixture *f = ts; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_endpoint_pair* sfd = f->fixture_data; + grpc_endpoint_add_to_pollset(&exec_ctx, sfd->server, grpc_cq_pollset(f->cq)); grpc_server_setup_transport(&exec_ctx, f->server, transport, grpc_server_get_channel_args(f->server)); grpc_exec_ctx_finish(&exec_ctx); From 9ef0e1cfd4116b901f55410cad1c4425e59eaac1 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 14 Apr 2016 12:44:30 -0700 Subject: [PATCH 0046/1894] Added grpc_call_stats to the call stack --- src/core/ext/census/grpc_filter.c | 6 ++++-- src/core/ext/client_config/client_channel.c | 4 ++-- src/core/lib/channel/channel_stack.c | 3 ++- src/core/lib/channel/channel_stack.h | 13 ++++++++++++- src/core/lib/channel/compress_filter.c | 4 ++-- src/core/lib/channel/connected_channel.c | 4 ++-- src/core/lib/channel/http_client_filter.c | 4 ++-- src/core/lib/channel/http_server_filter.c | 4 ++-- src/core/lib/security/client_auth_filter.c | 4 ++-- src/core/lib/security/server_auth_filter.c | 4 ++-- src/core/lib/surface/lame_client.c | 4 ++-- src/core/lib/surface/server.c | 4 ++-- test/core/channel/channel_stack_test.c | 4 ++-- test/core/end2end/tests/filter_causes_close.c | 4 ++-- 14 files changed, 40 insertions(+), 26 deletions(-) diff --git a/src/core/ext/census/grpc_filter.c b/src/core/ext/census/grpc_filter.c index abfb3bb5f0e..f1dc0eab61b 100644 --- a/src/core/ext/census/grpc_filter.c +++ b/src/core/ext/census/grpc_filter.c @@ -134,7 +134,8 @@ static void client_init_call_elem(grpc_exec_ctx *exec_ctx, } static void client_destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) { + grpc_call_element *elem, + const grpc_call_stats *stats) { call_data *d = elem->call_data; GPR_ASSERT(d != NULL); /* TODO(hongyu): record rpc client stats and census_rpc_end_op here */ @@ -152,7 +153,8 @@ static void server_init_call_elem(grpc_exec_ctx *exec_ctx, } static void server_destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) { + grpc_call_element *elem, + const grpc_call_stats *stats) { call_data *d = elem->call_data; GPR_ASSERT(d != NULL); /* TODO(hongyu): record rpc server stats and census_tracing_end_op here */ diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index 93d54fdcfeb..3ec0ab43876 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -401,8 +401,8 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Destructor for call_data */ -static void destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) { +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + const grpc_call_stats *stats) { grpc_subchannel_call_holder_destroy(exec_ctx, elem->call_data); } diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index e36066d8639..cc8d413d1d3 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -169,6 +169,7 @@ void grpc_call_stack_init(grpc_exec_ctx *exec_ctx, size_t i; call_stack->count = count; + memset(&call_stack->stats, 0, sizeof(grpc_call_stats)); GRPC_STREAM_REF_INIT(&call_stack->refcount, initial_refs, destroy, destroy_arg, "CALL_STACK"); call_elems = CALL_ELEMS_FROM_STACK(call_stack); @@ -220,7 +221,7 @@ void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack) { /* destroy per-filter data */ for (i = 0; i < count; i++) { - elems[i].filter->destroy_call_elem(exec_ctx, &elems[i]); + elems[i].filter->destroy_call_elem(exec_ctx, &elems[i], &stack->stats); } } diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 9e3a25a152d..3d9e72ef16c 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -45,6 +45,8 @@ #include #include +#include + #include "src/core/lib/debug/trace.h" #include "src/core/lib/transport/transport.h" @@ -67,6 +69,13 @@ typedef struct { grpc_call_context_element *context; } grpc_call_element_args; +typedef struct { + uint64_t bytes_in; + uint64_t bytes_out; + gpr_timespec latency; /* TODO(dgq): per op? */ + grpc_status_code final_status; +} grpc_call_stats; + /* Channel filters specify: 1. the amount of memory needed in the channel & call (via the sizeof_XXX members) @@ -105,7 +114,8 @@ typedef struct { grpc_pollset *pollset); /* Destroy per call data. The filter does not need to do any chaining */ - void (*destroy_call_elem)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem); + void (*destroy_call_elem)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + const grpc_call_stats *stats); /* sizeof(per channel data) */ size_t sizeof_channel_data; @@ -164,6 +174,7 @@ struct grpc_call_stack { about the address of the call stack itself. */ grpc_stream_refcount refcount; size_t count; + grpc_call_stats stats; }; /* Get a channel element given a channel stack and its index */ diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 229fdb5ef60..31f1ac43fe9 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -246,8 +246,8 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Destructor for call_data */ -static void destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) { +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + const grpc_call_stats *stats) { /* grab pointers to our data from the call element */ call_data *calld = elem->call_data; gpr_slice_buffer_destroy(&calld->slices); diff --git a/src/core/lib/channel/connected_channel.c b/src/core/lib/channel/connected_channel.c index c1debab4c62..eb699a63e46 100644 --- a/src/core/lib/channel/connected_channel.c +++ b/src/core/lib/channel/connected_channel.c @@ -102,8 +102,8 @@ static void set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Destructor for call_data */ -static void destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) { +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + const grpc_call_stats *stats) { call_data *calld = elem->call_data; channel_data *chand = elem->channel_data; grpc_transport_destroy_stream(exec_ctx, chand->transport, diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c index 211f537c691..e1afaf51864 100644 --- a/src/core/lib/channel/http_client_filter.c +++ b/src/core/lib/channel/http_client_filter.c @@ -155,8 +155,8 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Destructor for call_data */ -static void destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) {} +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + const grpc_call_stats *stats) {} static grpc_mdelem *scheme_from_args(const grpc_channel_args *args) { unsigned i; diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index c140c61b8f3..d4bac1493d8 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -220,8 +220,8 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Destructor for call_data */ -static void destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) {} +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + const grpc_call_stats *stats) {} /* Constructor for channel_data */ static void init_channel_elem(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/security/client_auth_filter.c b/src/core/lib/security/client_auth_filter.c index 943b1da85c6..aa025d477eb 100644 --- a/src/core/lib/security/client_auth_filter.c +++ b/src/core/lib/security/client_auth_filter.c @@ -277,8 +277,8 @@ static void set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } /* Destructor for call_data */ -static void destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) { +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + const grpc_call_stats *stats) { call_data *calld = elem->call_data; grpc_call_credentials_unref(calld->creds); if (calld->host != NULL) { diff --git a/src/core/lib/security/server_auth_filter.c b/src/core/lib/security/server_auth_filter.c index 7844dc87cb5..0ca39cc3e34 100644 --- a/src/core/lib/security/server_auth_filter.c +++ b/src/core/lib/security/server_auth_filter.c @@ -224,8 +224,8 @@ static void set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_pollset *pollset) {} /* Destructor for call_data */ -static void destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) {} +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + const grpc_call_stats *stats) {} /* Constructor for channel_data */ static void init_channel_elem(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/surface/lame_client.c b/src/core/lib/surface/lame_client.c index c1f6812c4e1..596e142860d 100644 --- a/src/core/lib/surface/lame_client.c +++ b/src/core/lib/surface/lame_client.c @@ -104,8 +104,8 @@ static void lame_start_transport_op(grpc_exec_ctx *exec_ctx, static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) {} -static void destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) {} +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + const grpc_call_stats *stats) {} static void init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index ad8ee8c7a99..e7cdaf1f62d 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -820,8 +820,8 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, server_ref(chand->server); } -static void destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) { +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + const grpc_call_stats *stats) { channel_data *chand = elem->channel_data; call_data *calld = elem->call_data; diff --git a/test/core/channel/channel_stack_test.c b/test/core/channel/channel_stack_test.c index 81e3927a006..cce35ec58f7 100644 --- a/test/core/channel/channel_stack_test.c +++ b/test/core/channel/channel_stack_test.c @@ -62,8 +62,8 @@ static void call_init_func(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, static void channel_destroy_func(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem) {} -static void call_destroy_func(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) { +static void call_destroy_func(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + const grpc_call_stats *stats) { ++*(int *)(elem->channel_data); } diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c index e74d3239de9..3f503f9a0a8 100644 --- a/test/core/end2end/tests/filter_causes_close.c +++ b/test/core/end2end/tests/filter_causes_close.c @@ -235,8 +235,8 @@ static void start_transport_stream_op(grpc_exec_ctx *exec_ctx, static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) {} -static void destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) {} +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + const grpc_call_stats *stats) {} static void init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, From c9bb983c9c50be37bae9bf6a79bd9e70fbbe8b23 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 14 Apr 2016 12:52:31 -0700 Subject: [PATCH 0047/1894] pr comments --- src/core/lib/channel/channel_stack.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 3d9e72ef16c..f5f57fac0ea 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -70,9 +70,8 @@ typedef struct { } grpc_call_element_args; typedef struct { - uint64_t bytes_in; - uint64_t bytes_out; - gpr_timespec latency; /* TODO(dgq): per op? */ + grpc_transport_stream_stats transport_stream_stats; + gpr_timespec latency; /* From call creating to enqueing of received status */ grpc_status_code final_status; } grpc_call_stats; From da0beaf408c037d2c17379aee6f04cd8c69664d6 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 14 Apr 2016 14:37:06 -0700 Subject: [PATCH 0048/1894] Done right this time... --- src/core/ext/client_config/subchannel.c | 2 +- src/core/lib/channel/channel_stack.c | 6 +++--- src/core/lib/channel/channel_stack.h | 4 ++-- src/core/lib/surface/call.c | 8 ++++---- test/core/channel/channel_stack_test.c | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c index 125a291f211..0aa94ca8fb5 100644 --- a/src/core/ext/client_config/subchannel.c +++ b/src/core/ext/client_config/subchannel.c @@ -651,7 +651,7 @@ static void subchannel_call_destroy(grpc_exec_ctx *exec_ctx, void *call, bool success) { grpc_subchannel_call *c = call; GPR_TIMER_BEGIN("grpc_subchannel_call_unref.destroy", 0); - grpc_call_stack_destroy(exec_ctx, SUBCHANNEL_CALL_TO_CALL_STACK(c)); + grpc_call_stack_destroy(exec_ctx, SUBCHANNEL_CALL_TO_CALL_STACK(c), NULL); GRPC_CONNECTED_SUBCHANNEL_UNREF(exec_ctx, c->connection, "subchannel_call"); gpr_free(c); GPR_TIMER_END("grpc_subchannel_call_unref.destroy", 0); diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index cc8d413d1d3..5c1086a03f5 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -169,7 +169,6 @@ void grpc_call_stack_init(grpc_exec_ctx *exec_ctx, size_t i; call_stack->count = count; - memset(&call_stack->stats, 0, sizeof(grpc_call_stats)); GRPC_STREAM_REF_INIT(&call_stack->refcount, initial_refs, destroy, destroy_arg, "CALL_STACK"); call_elems = CALL_ELEMS_FROM_STACK(call_stack); @@ -214,14 +213,15 @@ void grpc_call_stack_ignore_set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_pollset *pollset) {} -void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack) { +void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack, + const grpc_call_stats *call_stats) { grpc_call_element *elems = CALL_ELEMS_FROM_STACK(stack); size_t count = stack->count; size_t i; /* destroy per-filter data */ for (i = 0; i < count; i++) { - elems[i].filter->destroy_call_elem(exec_ctx, &elems[i], &stack->stats); + elems[i].filter->destroy_call_elem(exec_ctx, &elems[i], call_stats); } } diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index f5f57fac0ea..3c7c65ab3f4 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -173,7 +173,6 @@ struct grpc_call_stack { about the address of the call stack itself. */ grpc_stream_refcount refcount; size_t count; - grpc_call_stats stats; }; /* Get a channel element given a channel stack and its index */ @@ -233,7 +232,8 @@ void grpc_call_stack_set_pollset(grpc_exec_ctx *exec_ctx, #endif /* Destroy a call stack */ -void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack); +void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack, + const grpc_call_stats *call_stats); /* Ignore set pollset - used by filters to implement the set_pollset method if they don't care about pollsets at all. Does nothing. */ diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 6581bbd3d1d..a60f93f25e7 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -175,7 +175,7 @@ struct grpc_call { received_status status[STATUS_SOURCE_COUNT]; /* Call stats: only valid after trailing metadata received */ - grpc_transport_stream_stats stats; + grpc_call_stats stats; /* Compression algorithm for the call */ grpc_compression_algorithm compression_algorithm; @@ -375,7 +375,7 @@ static void destroy_call(grpc_exec_ctx *exec_ctx, void *call, bool success) { if (c->receiving_stream != NULL) { grpc_byte_stream_destroy(exec_ctx, c->receiving_stream); } - grpc_call_stack_destroy(exec_ctx, CALL_STACK_FROM_CALL(c)); + grpc_call_stack_destroy(exec_ctx, CALL_STACK_FROM_CALL(c), &c->stats); GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, c->channel, "call"); gpr_mu_destroy(&c->mu); for (i = 0; i < STATUS_SOURCE_COUNT; i++) { @@ -1392,7 +1392,7 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, bctl->recv_final_op = 1; stream_op.recv_trailing_metadata = &call->metadata_batch[1 /* is_receiving */][1 /* is_trailing */]; - stream_op.collect_stats = &call->stats; + stream_op.collect_stats = &call->stats.transport_stream_stats; break; case GRPC_OP_RECV_CLOSE_ON_SERVER: /* Flag validation: currently allow no flags */ @@ -1414,7 +1414,7 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, bctl->recv_final_op = 1; stream_op.recv_trailing_metadata = &call->metadata_batch[1 /* is_receiving */][1 /* is_trailing */]; - stream_op.collect_stats = &call->stats; + stream_op.collect_stats = &call->stats.transport_stream_stats; break; } } diff --git a/test/core/channel/channel_stack_test.c b/test/core/channel/channel_stack_test.c index cce35ec58f7..54f9fce14ba 100644 --- a/test/core/channel/channel_stack_test.c +++ b/test/core/channel/channel_stack_test.c @@ -87,7 +87,7 @@ static void free_channel(grpc_exec_ctx *exec_ctx, void *arg, bool success) { } static void free_call(grpc_exec_ctx *exec_ctx, void *arg, bool success) { - grpc_call_stack_destroy(exec_ctx, arg); + grpc_call_stack_destroy(exec_ctx, arg, NULL); gpr_free(arg); } From c4b18a50de3ab04b189c9f0e2b56cb08a9f15542 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 15 Apr 2016 04:53:54 +0200 Subject: [PATCH 0049/1894] Adding support for msys. --- BUILD | 4 + Makefile | 2 + binding.gyp | 2 + build.yaml | 2 + config.m4 | 2 + gRPC.podspec | 2 + grpc.gemspec | 2 + include/grpc/impl/codegen/port_platform.h | 44 +++++----- package.xml | 2 + src/core/lib/iomgr/tcp_server_windows.c | 27 ++---- src/core/lib/iomgr/tcp_windows.c | 14 +++- src/core/lib/support/env_win32.c | 44 +++++----- src/core/lib/support/log_linux.c | 4 +- src/core/lib/support/log_win32.c | 18 +--- src/core/lib/support/string_util_win32.c | 91 +++++++++++++++++++++ src/core/lib/support/string_win32.c | 41 +++------- src/core/lib/support/time_win32.c | 4 +- src/core/lib/support/tmpfile_msys.c | 75 +++++++++++++++++ src/core/lib/support/tmpfile_posix.c | 4 +- src/core/lib/support/tmpfile_win32.c | 4 +- src/python/grpcio/grpc_core_dependencies.py | 2 + test/core/util/port_windows.c | 9 +- test/core/util/test_config.c | 2 +- tools/doxygen/Doxyfile.core.internal | 2 + tools/run_tests/sources_and_headers.json | 2 + vsprojects/vcxproj/gpr/gpr.vcxproj | 4 + vsprojects/vcxproj/gpr/gpr.vcxproj.filters | 6 ++ 27 files changed, 296 insertions(+), 119 deletions(-) create mode 100644 src/core/lib/support/string_util_win32.c create mode 100644 src/core/lib/support/tmpfile_msys.c diff --git a/BUILD b/BUILD index fa9a1209899..237322a5e10 100644 --- a/BUILD +++ b/BUILD @@ -84,6 +84,7 @@ cc_library( "src/core/lib/support/stack_lockfree.c", "src/core/lib/support/string.c", "src/core/lib/support/string_posix.c", + "src/core/lib/support/string_util_win32.c", "src/core/lib/support/string_win32.c", "src/core/lib/support/subprocess_posix.c", "src/core/lib/support/subprocess_windows.c", @@ -98,6 +99,7 @@ cc_library( "src/core/lib/support/time_precise.c", "src/core/lib/support/time_win32.c", "src/core/lib/support/tls_pthread.c", + "src/core/lib/support/tmpfile_msys.c", "src/core/lib/support/tmpfile_posix.c", "src/core/lib/support/tmpfile_win32.c", "src/core/lib/support/wrap_memcpy.c", @@ -1211,6 +1213,7 @@ objc_library( "src/core/lib/support/stack_lockfree.c", "src/core/lib/support/string.c", "src/core/lib/support/string_posix.c", + "src/core/lib/support/string_util_win32.c", "src/core/lib/support/string_win32.c", "src/core/lib/support/subprocess_posix.c", "src/core/lib/support/subprocess_windows.c", @@ -1225,6 +1228,7 @@ objc_library( "src/core/lib/support/time_precise.c", "src/core/lib/support/time_win32.c", "src/core/lib/support/tls_pthread.c", + "src/core/lib/support/tmpfile_msys.c", "src/core/lib/support/tmpfile_posix.c", "src/core/lib/support/tmpfile_win32.c", "src/core/lib/support/wrap_memcpy.c", diff --git a/Makefile b/Makefile index 488d6f4dcec..fdc523907d3 100644 --- a/Makefile +++ b/Makefile @@ -2322,6 +2322,7 @@ LIBGPR_SRC = \ src/core/lib/support/stack_lockfree.c \ src/core/lib/support/string.c \ src/core/lib/support/string_posix.c \ + src/core/lib/support/string_util_win32.c \ src/core/lib/support/string_win32.c \ src/core/lib/support/subprocess_posix.c \ src/core/lib/support/subprocess_windows.c \ @@ -2336,6 +2337,7 @@ LIBGPR_SRC = \ src/core/lib/support/time_precise.c \ src/core/lib/support/time_win32.c \ src/core/lib/support/tls_pthread.c \ + src/core/lib/support/tmpfile_msys.c \ src/core/lib/support/tmpfile_posix.c \ src/core/lib/support/tmpfile_win32.c \ src/core/lib/support/wrap_memcpy.c \ diff --git a/binding.gyp b/binding.gyp index 8efc8a2b8e6..492b75f8fd4 100644 --- a/binding.gyp +++ b/binding.gyp @@ -519,6 +519,7 @@ 'src/core/lib/support/stack_lockfree.c', 'src/core/lib/support/string.c', 'src/core/lib/support/string_posix.c', + 'src/core/lib/support/string_util_win32.c', 'src/core/lib/support/string_win32.c', 'src/core/lib/support/subprocess_posix.c', 'src/core/lib/support/subprocess_windows.c', @@ -533,6 +534,7 @@ 'src/core/lib/support/time_precise.c', 'src/core/lib/support/time_win32.c', 'src/core/lib/support/tls_pthread.c', + 'src/core/lib/support/tmpfile_msys.c', 'src/core/lib/support/tmpfile_posix.c', 'src/core/lib/support/tmpfile_win32.c', 'src/core/lib/support/wrap_memcpy.c', diff --git a/build.yaml b/build.yaml index a6feea50746..4a0663452d8 100644 --- a/build.yaml +++ b/build.yaml @@ -103,6 +103,7 @@ filegroups: - src/core/lib/support/stack_lockfree.c - src/core/lib/support/string.c - src/core/lib/support/string_posix.c + - src/core/lib/support/string_util_win32.c - src/core/lib/support/string_win32.c - src/core/lib/support/subprocess_posix.c - src/core/lib/support/subprocess_windows.c @@ -117,6 +118,7 @@ filegroups: - src/core/lib/support/time_precise.c - src/core/lib/support/time_win32.c - src/core/lib/support/tls_pthread.c + - src/core/lib/support/tmpfile_msys.c - src/core/lib/support/tmpfile_posix.c - src/core/lib/support/tmpfile_win32.c - src/core/lib/support/wrap_memcpy.c diff --git a/config.m4 b/config.m4 index 7d3d899a405..acd798741fb 100644 --- a/config.m4 +++ b/config.m4 @@ -63,6 +63,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/support/stack_lockfree.c \ src/core/lib/support/string.c \ src/core/lib/support/string_posix.c \ + src/core/lib/support/string_util_win32.c \ src/core/lib/support/string_win32.c \ src/core/lib/support/subprocess_posix.c \ src/core/lib/support/subprocess_windows.c \ @@ -77,6 +78,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/support/time_precise.c \ src/core/lib/support/time_win32.c \ src/core/lib/support/tls_pthread.c \ + src/core/lib/support/tmpfile_msys.c \ src/core/lib/support/tmpfile_posix.c \ src/core/lib/support/tmpfile_win32.c \ src/core/lib/support/wrap_memcpy.c \ diff --git a/gRPC.podspec b/gRPC.podspec index 82c5eaac411..b3122dd272e 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -144,6 +144,7 @@ Pod::Spec.new do |s| 'src/core/lib/support/stack_lockfree.c', 'src/core/lib/support/string.c', 'src/core/lib/support/string_posix.c', + 'src/core/lib/support/string_util_win32.c', 'src/core/lib/support/string_win32.c', 'src/core/lib/support/subprocess_posix.c', 'src/core/lib/support/subprocess_windows.c', @@ -158,6 +159,7 @@ Pod::Spec.new do |s| 'src/core/lib/support/time_precise.c', 'src/core/lib/support/time_win32.c', 'src/core/lib/support/tls_pthread.c', + 'src/core/lib/support/tmpfile_msys.c', 'src/core/lib/support/tmpfile_posix.c', 'src/core/lib/support/tmpfile_win32.c', 'src/core/lib/support/wrap_memcpy.c', diff --git a/grpc.gemspec b/grpc.gemspec index b8cfc4e6c4e..3e0677ebdcb 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -128,6 +128,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/support/stack_lockfree.c ) s.files += %w( src/core/lib/support/string.c ) s.files += %w( src/core/lib/support/string_posix.c ) + s.files += %w( src/core/lib/support/string_util_win32.c ) s.files += %w( src/core/lib/support/string_win32.c ) s.files += %w( src/core/lib/support/subprocess_posix.c ) s.files += %w( src/core/lib/support/subprocess_windows.c ) @@ -142,6 +143,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/support/time_precise.c ) s.files += %w( src/core/lib/support/time_win32.c ) s.files += %w( src/core/lib/support/tls_pthread.c ) + s.files += %w( src/core/lib/support/tmpfile_msys.c ) s.files += %w( src/core/lib/support/tmpfile_posix.c ) s.files += %w( src/core/lib/support/tmpfile_win32.c ) s.files += %w( src/core/lib/support/wrap_memcpy.c ) diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index 3242f07599b..bbcb4098e3a 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -82,28 +82,31 @@ things. */ #if !defined(GPR_NO_AUTODETECT_PLATFORM) +#if defined(_WIN64) || defined(WIN64) || defined(_WIN32) || defined(WIN32) #if defined(_WIN64) || defined(WIN64) -#define GPR_PLATFORM_STRING "windows" -#define GPR_WIN32 1 #define GPR_ARCH_64 1 -#define GPR_GETPID_IN_PROCESS_H 1 -#define GPR_WINSOCK_SOCKET 1 -#define GPR_WINDOWS_SUBPROCESS 1 -#ifdef __GNUC__ -#define GPR_GCC_ATOMIC 1 -#define GPR_GCC_TLS 1 #else -#define GPR_WIN32_ATOMIC 1 -#define GPR_MSVC_TLS 1 +#define GPR_ARCH_32 1 #endif -#define GPR_WINDOWS_CRASH_HANDLER 1 -#elif defined(_WIN32) || defined(WIN32) #define GPR_PLATFORM_STRING "windows" -#define GPR_ARCH_32 1 #define GPR_WIN32 1 -#define GPR_GETPID_IN_PROCESS_H 1 #define GPR_WINSOCK_SOCKET 1 #define GPR_WINDOWS_SUBPROCESS 1 +#define GPR_WIN32_ENV +#ifdef __MSYS__ +#define GPR_GETPID_IN_UNISTD_H 1 +#define GPR_MSYS_TMPFILE +#define GPR_POSIX_LOG +#define GPR_POSIX_STRING +#define GPR_POSIX_TIME +#else +#define GPR_GETPID_IN_PROCESS_H 1 +#define GPR_WIN32_TMPFILE +#define GPR_WIN32_LOG +#define GPR_WINDOWS_CRASH_HANDLER 1 +#define GPR_WIN32_STRING +#define GPR_WIN32_TIME +#endif #ifdef __GNUC__ #define GPR_GCC_ATOMIC 1 #define GPR_GCC_TLS 1 @@ -111,7 +114,6 @@ #define GPR_WIN32_ATOMIC 1 #define GPR_MSVC_TLS 1 #endif -#define GPR_WINDOWS_CRASH_HANDLER 1 #elif defined(ANDROID) || defined(__ANDROID__) #define GPR_PLATFORM_STRING "android" #define GPR_ANDROID 1 @@ -126,7 +128,8 @@ #define GPR_POSIX_SOCKETADDR 1 #define GPR_POSIX_SOCKETUTILS 1 #define GPR_POSIX_ENV 1 -#define GPR_POSIX_FILE 1 +#define GPR_POSIX_TMPFILE 1 +#define GPR_POSIX_LOG #define GPR_POSIX_STRING 1 #define GPR_POSIX_SUBPROCESS 1 #define GPR_POSIX_SYNC 1 @@ -153,6 +156,7 @@ #define GPR_GCC_ATOMIC 1 #define GPR_GCC_TLS 1 #define GPR_LINUX 1 +#define GPR_LINUX_LOG #define GPR_LINUX_MULTIPOLL_WITH_EPOLL 1 #define GPR_POSIX_WAKEUP_FD 1 #define GPR_POSIX_SOCKET 1 @@ -175,7 +179,7 @@ #ifndef GPR_LINUX_SOCKETUTILS #define GPR_POSIX_SOCKETUTILS #endif -#define GPR_POSIX_FILE 1 +#define GPR_POSIX_TMPFILE 1 #define GPR_POSIX_STRING 1 #define GPR_POSIX_SUBPROCESS 1 #define GPR_POSIX_SYNC 1 @@ -213,7 +217,7 @@ #define GPR_POSIX_SOCKETADDR 1 #define GPR_POSIX_SOCKETUTILS 1 #define GPR_POSIX_ENV 1 -#define GPR_POSIX_FILE 1 +#define GPR_POSIX_TMPFILE 1 #define GPR_POSIX_STRING 1 #define GPR_POSIX_SUBPROCESS 1 #define GPR_POSIX_SYNC 1 @@ -243,7 +247,7 @@ #define GPR_POSIX_SOCKETADDR 1 #define GPR_POSIX_SOCKETUTILS 1 #define GPR_POSIX_ENV 1 -#define GPR_POSIX_FILE 1 +#define GPR_POSIX_TMPFILE 1 #define GPR_POSIX_STRING 1 #define GPR_POSIX_SUBPROCESS 1 #define GPR_POSIX_SYNC 1 @@ -280,7 +284,7 @@ #define GPR_POSIX_SOCKETADDR 1 #define GPR_POSIX_SOCKETUTILS 1 #define GPR_POSIX_ENV 1 -#define GPR_POSIX_FILE 1 +#define GPR_POSIX_TMPFILE 1 #define GPR_POSIX_STRING 1 #define GPR_POSIX_SUBPROCESS 1 #define GPR_POSIX_SYNC 1 diff --git a/package.xml b/package.xml index 2f4c6255394..b21e974c8ef 100644 --- a/package.xml +++ b/package.xml @@ -131,6 +131,7 @@ + @@ -145,6 +146,7 @@ + diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index 6940dec7b02..53f58477a4a 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -510,30 +510,17 @@ int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, unsigned grpc_tcp_server_port_fd_count(grpc_tcp_server *s, unsigned port_index) { - grpc_tcp_listener *sp; - for (sp = s->head; sp && port_index != 0; sp = sp->next, --port_index) - ; - if (sp) { - return 1; - } else { - return 0; - } + (void)s; + (void)port_index; + abort(); } int grpc_tcp_server_port_fd(grpc_tcp_server *s, unsigned port_index, unsigned fd_index) { - grpc_tcp_listener *sp; - if (fd_index != 0) { - /* Windows implementation has only one fd per port_index. */ - return -1; - } - for (sp = s->head; sp && port_index != 0; sp = sp->next, --port_index) - ; - if (sp) { - return _open_osfhandle((intptr_t)sp->socket->socket, 0); - } else { - return -1; - } + (void)s; + (void)port_index; + (void)fd_index; + abort(); } void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 7ee689a7e46..39968239334 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -35,6 +35,8 @@ #ifdef GPR_WINSOCK_SOCKET +#include + #include "src/core/lib/iomgr/sockaddr_win32.h" #include @@ -51,12 +53,20 @@ #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/iomgr/timer.h" +#if defined(__MSYS__) && defined(GPR_ARCH_64) +/* Nasty workaround for nasty bug when using the 64 bits msys compiler + in conjunction with Microsoft Windows headers. */ +#define GRPC_FIONBIO _IOW('f', 126, uint32_t) +#else +#define GRPC_FIONBIO FIONBIO +#endif + static int set_non_block(SOCKET sock) { int status; - unsigned long param = 1; + uint32_t param = 1; DWORD ret; status = - WSAIoctl(sock, FIONBIO, ¶m, sizeof(param), NULL, 0, &ret, NULL, NULL); + WSAIoctl(sock, GRPC_FIONBIO, ¶m, sizeof(param), NULL, 0, &ret, NULL, NULL); return status == 0; } diff --git a/src/core/lib/support/env_win32.c b/src/core/lib/support/env_win32.c index ef84c941df6..e670e1e8d03 100644 --- a/src/core/lib/support/env_win32.c +++ b/src/core/lib/support/env_win32.c @@ -33,41 +33,47 @@ #include -#ifdef GPR_WIN32 +#ifdef GPR_WIN32_ENV + +#include #include "src/core/lib/support/env.h" #include "src/core/lib/support/string.h" - -#ifdef __MINGW32__ -errno_t getenv_s(size_t *size_needed, char *buffer, size_t size, - const char *varname); -#else -#include -#endif +#include "src/core/lib/support/string_win32.h" #include #include #include char *gpr_getenv(const char *name) { - size_t size; char *result = NULL; - errno_t err; + DWORD size; + LPTSTR tresult = NULL; + LPTSTR tname = gpr_char_to_tchar(name); + DWORD ret; - err = getenv_s(&size, NULL, 0, name); - if (err || (size == 0)) return NULL; - result = gpr_malloc(size); - err = getenv_s(&size, result, size, name); - if (err) { - gpr_free(result); + ret = GetEnvironmentVariable(tname, NULL, 0); + if (ret == 0) return NULL; + size = ret * (DWORD)sizeof(TCHAR); + tresult = gpr_malloc(size); + ret = GetEnvironmentVariable(tname, tresult, size); + gpr_free(tname); + if (ret == 0) { + gpr_free(tresult); return NULL; } + result = gpr_tchar_to_char(tresult); + gpr_free(tresult); return result; } void gpr_setenv(const char *name, const char *value) { - errno_t res = _putenv_s(name, value); - GPR_ASSERT(res == 0); + LPTSTR tname = gpr_char_to_tchar(name); + LPTSTR tvalue = gpr_char_to_tchar(value); + BOOL res = SetEnvironmentVariable(tname, tvalue); + gpr_free(tname); + gpr_free(tvalue); + GPR_ASSERT(res); } -#endif /* GPR_WIN32 */ +#endif /* GPR_WIN32_ENV */ diff --git a/src/core/lib/support/log_linux.c b/src/core/lib/support/log_linux.c index ff3febb38eb..ca04c022e3f 100644 --- a/src/core/lib/support/log_linux.c +++ b/src/core/lib/support/log_linux.c @@ -41,7 +41,7 @@ #include -#ifdef GPR_LINUX +#ifdef GPR_LINUX_LOG #include #include @@ -103,4 +103,4 @@ void gpr_default_log(gpr_log_func_args *args) { gpr_free(prefix); } -#endif +#endif /* GPR_LINUX_LOG */ diff --git a/src/core/lib/support/log_win32.c b/src/core/lib/support/log_win32.c index ba78497a0a4..29735bd18c7 100644 --- a/src/core/lib/support/log_win32.c +++ b/src/core/lib/support/log_win32.c @@ -33,7 +33,7 @@ #include -#ifdef GPR_WIN32 +#ifdef GPR_WIN32_LOG #include #include @@ -109,18 +109,4 @@ void gpr_default_log(gpr_log_func_args *args) { fflush(stderr); } -char *gpr_format_message(int messageid) { - LPTSTR tmessage; - char *message; - DWORD status = FormatMessage( - FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | - FORMAT_MESSAGE_IGNORE_INSERTS, - NULL, (DWORD)messageid, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), - (LPTSTR)(&tmessage), 0, NULL); - if (status == 0) return gpr_strdup("Unable to retrieve error string"); - message = gpr_tchar_to_char(tmessage); - LocalFree(tmessage); - return message; -} - -#endif /* GPR_WIN32 */ +#endif /* GPR_WIN32_LOG */ diff --git a/src/core/lib/support/string_util_win32.c b/src/core/lib/support/string_util_win32.c new file mode 100644 index 00000000000..fd14ce54e43 --- /dev/null +++ b/src/core/lib/support/string_util_win32.c @@ -0,0 +1,91 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* Posix code for gpr snprintf support. */ + +#include + +#ifdef GPR_WIN32 + +#include +#include +#include +#include +#include + +#include +#include + +#include "src/core/lib/support/string.h" + +#if defined UNICODE || defined _UNICODE +LPTSTR +gpr_char_to_tchar(LPCSTR input) { + LPTSTR ret; + int needed = MultiByteToWideChar(CP_UTF8, 0, input, -1, NULL, 0); + if (needed <= 0) return NULL; + ret = gpr_malloc((unsigned)needed * sizeof(TCHAR)); + MultiByteToWideChar(CP_UTF8, 0, input, -1, ret, needed); + return ret; +} + +LPSTR +gpr_tchar_to_char(LPCTSTR input) { + LPSTR ret; + int needed = WideCharToMultiByte(CP_UTF8, 0, input, -1, NULL, 0, NULL, NULL); + if (needed <= 0) return NULL; + ret = gpr_malloc((unsigned)needed); + WideCharToMultiByte(CP_UTF8, 0, input, -1, ret, needed, NULL, NULL); + return ret; +} +#else +char *gpr_tchar_to_char(LPTSTR input) { return gpr_strdup(input); } + +char *gpr_char_to_tchar(LPTSTR input) { return gpr_strdup(input); } +#endif + +char *gpr_format_message(int messageid) { + LPTSTR tmessage; + char *message; + DWORD status = FormatMessage( + FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | + FORMAT_MESSAGE_IGNORE_INSERTS, + NULL, (DWORD)messageid, MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT), + (LPTSTR)(&tmessage), 0, NULL); + if (status == 0) return gpr_strdup("Unable to retrieve error string"); + message = gpr_tchar_to_char(tmessage); + LocalFree(tmessage); + return message; +} + +#endif /* GPR_WIN32 */ diff --git a/src/core/lib/support/string_win32.c b/src/core/lib/support/string_win32.c index a2f9857356a..8382cde15a4 100644 --- a/src/core/lib/support/string_win32.c +++ b/src/core/lib/support/string_win32.c @@ -31,23 +31,28 @@ * */ -/* Posix code for gpr snprintf support. */ +/* Windows code for gpr snprintf support. */ #include -#ifdef GPR_WIN32 +#ifdef GPR_WIN32_STRING #include #include #include +#include +#include #include +#include #include "src/core/lib/support/string.h" int gpr_asprintf(char **strp, const char *format, ...) { va_list args; int ret; + + HRESULT success; size_t strp_buflen; /* Determine the length. */ @@ -68,9 +73,9 @@ int gpr_asprintf(char **strp, const char *format, ...) { /* Print to the buffer. */ va_start(args, format); - ret = vsnprintf_s(*strp, strp_buflen, _TRUNCATE, format, args); + success = StringCbVPrintfA(*strp, strp_buflen, format, args); va_end(args); - if ((size_t)ret == strp_buflen - 1) { + if (success == S_OK) { return ret; } @@ -80,30 +85,4 @@ int gpr_asprintf(char **strp, const char *format, ...) { return -1; } -#if defined UNICODE || defined _UNICODE -LPTSTR -gpr_char_to_tchar(LPCSTR input) { - LPTSTR ret; - int needed = MultiByteToWideChar(CP_UTF8, 0, input, -1, NULL, 0); - if (needed <= 0) return NULL; - ret = gpr_malloc((unsigned)needed * sizeof(TCHAR)); - MultiByteToWideChar(CP_UTF8, 0, input, -1, ret, needed); - return ret; -} - -LPSTR -gpr_tchar_to_char(LPCTSTR input) { - LPSTR ret; - int needed = WideCharToMultiByte(CP_UTF8, 0, input, -1, NULL, 0, NULL, NULL); - if (needed <= 0) return NULL; - ret = gpr_malloc((unsigned)needed); - WideCharToMultiByte(CP_UTF8, 0, input, -1, ret, needed, NULL, NULL); - return ret; -} -#else -char *gpr_tchar_to_char(LPTSTR input) { return gpr_strdup(input); } - -char *gpr_char_to_tchar(LPTSTR input) { return gpr_strdup(input); } -#endif - -#endif /* GPR_WIN32 */ +#endif /* GPR_WIN32_STRING */ diff --git a/src/core/lib/support/time_win32.c b/src/core/lib/support/time_win32.c index f7acbd14a67..9e924ab3f4a 100644 --- a/src/core/lib/support/time_win32.c +++ b/src/core/lib/support/time_win32.c @@ -35,7 +35,7 @@ #include -#ifdef GPR_WIN32 +#ifdef GPR_WIN32_TIME #include #include @@ -107,4 +107,4 @@ void gpr_sleep_until(gpr_timespec until) { } } -#endif /* GPR_WIN32 */ +#endif /* GPR_WIN32_TIME */ diff --git a/src/core/lib/support/tmpfile_msys.c b/src/core/lib/support/tmpfile_msys.c new file mode 100644 index 00000000000..f0f803aa754 --- /dev/null +++ b/src/core/lib/support/tmpfile_msys.c @@ -0,0 +1,75 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#ifdef GPR_MSYS_TMPFILE + +#include +#include +#include +#include + +#include +#include +#include + +#include "src/core/lib/support/string_win32.h" +#include "src/core/lib/support/tmpfile.h" + +FILE *gpr_tmpfile(const char *prefix, char **tmp_filename_out) { + FILE *result = NULL; + char tmp_filename[MAX_PATH]; + UINT success; + + if (tmp_filename_out != NULL) *tmp_filename_out = NULL; + + /* Generate a unique filename with our template + temporary path. */ + success = GetTempFileNameA(".", prefix, 0, tmp_filename); + fprintf(stderr, "success = %d\n", success); + if (!success) goto end; + + /* Open a file there. */ + result = fopen(tmp_filename, "wb+"); + fprintf(stderr, "result = %p\n", result); + if (result == NULL) goto end; + +end: + if (result && tmp_filename_out) { + *tmp_filename_out = gpr_strdup(tmp_filename); + } + + return result; +} + +#endif /* GPR_MSYS_TMPFILE */ diff --git a/src/core/lib/support/tmpfile_posix.c b/src/core/lib/support/tmpfile_posix.c index 9e0e7ad8080..0cd4bb6fc3c 100644 --- a/src/core/lib/support/tmpfile_posix.c +++ b/src/core/lib/support/tmpfile_posix.c @@ -33,7 +33,7 @@ #include -#ifdef GPR_POSIX_FILE +#ifdef GPR_POSIX_TMPFILE #include "src/core/lib/support/tmpfile.h" @@ -82,4 +82,4 @@ end: return result; } -#endif /* GPR_POSIX_FILE */ +#endif /* GPR_POSIX_TMPFILE */ diff --git a/src/core/lib/support/tmpfile_win32.c b/src/core/lib/support/tmpfile_win32.c index 0cb2904f8de..9ac73128c39 100644 --- a/src/core/lib/support/tmpfile_win32.c +++ b/src/core/lib/support/tmpfile_win32.c @@ -33,7 +33,7 @@ #include -#ifdef GPR_WIN32 +#ifdef GPR_WIN32_TMPFILE #include #include @@ -81,4 +81,4 @@ end: return result; } -#endif /* GPR_WIN32 */ +#endif /* GPR_WIN32_TMPFILE */ diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 1f7f2a196be..e389782b47f 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -57,6 +57,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/support/stack_lockfree.c', 'src/core/lib/support/string.c', 'src/core/lib/support/string_posix.c', + 'src/core/lib/support/string_util_win32.c', 'src/core/lib/support/string_win32.c', 'src/core/lib/support/subprocess_posix.c', 'src/core/lib/support/subprocess_windows.c', @@ -71,6 +72,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/support/time_precise.c', 'src/core/lib/support/time_win32.c', 'src/core/lib/support/tls_pthread.c', + 'src/core/lib/support/tmpfile_msys.c', 'src/core/lib/support/tmpfile_posix.c', 'src/core/lib/support/tmpfile_win32.c', 'src/core/lib/support/wrap_memcpy.c', diff --git a/test/core/util/port_windows.c b/test/core/util/port_windows.c index 2b6d3dd223c..154d607ec7c 100644 --- a/test/core/util/port_windows.c +++ b/test/core/util/port_windows.c @@ -51,6 +51,11 @@ #include "src/core/lib/support/env.h" #include "test/core/util/port_server_client.h" +#if GPR_GETPID_IN_UNISTD_H +#include +static int _getpid() { return getpid(); } +#endif + #define NUM_RANDOM_PORTS_TO_PICK 100 static int *chosen_ports = NULL; @@ -114,7 +119,7 @@ static int is_port_available(int *port, int is_tcp) { /* Try binding to port */ addr.sin_family = AF_INET; addr.sin_addr.s_addr = INADDR_ANY; - addr.sin_port = htons(*port); + addr.sin_port = htons((u_short)*port); if (bind(fd, (struct sockaddr *)&addr, sizeof(addr)) < 0) { gpr_log(GPR_DEBUG, "bind(port=%d) failed: %s", *port, strerror(errno)); closesocket(fd); @@ -127,7 +132,7 @@ static int is_port_available(int *port, int is_tcp) { closesocket(fd); return 0; } - GPR_ASSERT(alen <= sizeof(addr)); + GPR_ASSERT(alen <= (socklen_t)sizeof(addr)); actual_port = ntohs(addr.sin_port); GPR_ASSERT(actual_port > 0); if (*port == 0) { diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c index 3155a4ece6a..62468a5a61a 100644 --- a/test/core/util/test_config.c +++ b/test/core/util/test_config.c @@ -50,7 +50,7 @@ static unsigned seed(void) { return (unsigned)getpid(); } #if GPR_GETPID_IN_PROCESS_H #include -static unsigned seed(void) { return _getpid(); } +static unsigned seed(void) { return (unsigned)_getpid(); } #endif #if GPR_WINDOWS_CRASH_HANDLER diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index b131a55b592..e0d97148281 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -1167,6 +1167,7 @@ src/core/lib/support/slice_buffer.c \ src/core/lib/support/stack_lockfree.c \ src/core/lib/support/string.c \ src/core/lib/support/string_posix.c \ +src/core/lib/support/string_util_win32.c \ src/core/lib/support/string_win32.c \ src/core/lib/support/subprocess_posix.c \ src/core/lib/support/subprocess_windows.c \ @@ -1181,6 +1182,7 @@ src/core/lib/support/time_posix.c \ src/core/lib/support/time_precise.c \ src/core/lib/support/time_win32.c \ src/core/lib/support/tls_pthread.c \ +src/core/lib/support/tmpfile_msys.c \ src/core/lib/support/tmpfile_posix.c \ src/core/lib/support/tmpfile_win32.c \ src/core/lib/support/wrap_memcpy.c diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 0b68315c82a..b9a004423cb 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5429,6 +5429,7 @@ "src/core/lib/support/string.c", "src/core/lib/support/string.h", "src/core/lib/support/string_posix.c", + "src/core/lib/support/string_util_win32.c", "src/core/lib/support/string_win32.c", "src/core/lib/support/string_win32.h", "src/core/lib/support/subprocess_posix.c", @@ -5447,6 +5448,7 @@ "src/core/lib/support/time_win32.c", "src/core/lib/support/tls_pthread.c", "src/core/lib/support/tmpfile.h", + "src/core/lib/support/tmpfile_msys.c", "src/core/lib/support/tmpfile_posix.c", "src/core/lib/support/tmpfile_win32.c", "src/core/lib/support/wrap_memcpy.c" diff --git a/vsprojects/vcxproj/gpr/gpr.vcxproj b/vsprojects/vcxproj/gpr/gpr.vcxproj index cdb128e48ef..26195bb5417 100644 --- a/vsprojects/vcxproj/gpr/gpr.vcxproj +++ b/vsprojects/vcxproj/gpr/gpr.vcxproj @@ -259,6 +259,8 @@ + + @@ -287,6 +289,8 @@ + + diff --git a/vsprojects/vcxproj/gpr/gpr.vcxproj.filters b/vsprojects/vcxproj/gpr/gpr.vcxproj.filters index 8af6fdd44cb..be15391b092 100644 --- a/vsprojects/vcxproj/gpr/gpr.vcxproj.filters +++ b/vsprojects/vcxproj/gpr/gpr.vcxproj.filters @@ -82,6 +82,9 @@ src\core\lib\support + + src\core\lib\support + src\core\lib\support @@ -124,6 +127,9 @@ src\core\lib\support + + src\core\lib\support + src\core\lib\support From b7c34a50f1e0e529e7446158f6e6eb54e37b3fa8 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 15 Apr 2016 07:40:44 +0200 Subject: [PATCH 0050/1894] Removing grpc_tcp_server_port_fd* from the Windows implementation. --- src/core/lib/iomgr/tcp_server_windows.c | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index 53f58477a4a..125f521d87e 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -508,21 +508,6 @@ int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, } } -unsigned grpc_tcp_server_port_fd_count(grpc_tcp_server *s, - unsigned port_index) { - (void)s; - (void)port_index; - abort(); -} - -int grpc_tcp_server_port_fd(grpc_tcp_server *s, unsigned port_index, - unsigned fd_index) { - (void)s; - (void)port_index; - (void)fd_index; - abort(); -} - void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s, grpc_pollset **pollset, size_t pollset_count, grpc_tcp_server_cb on_accept_cb, From a0091cba8957591be6a41c8e381a674874f6bc63 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 15 Apr 2016 07:47:50 +0200 Subject: [PATCH 0051/1894] Re-adding GPR_POSIX_FILE. --- include/grpc/impl/codegen/port_platform.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index bbcb4098e3a..1229d488edb 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -128,6 +128,7 @@ #define GPR_POSIX_SOCKETADDR 1 #define GPR_POSIX_SOCKETUTILS 1 #define GPR_POSIX_ENV 1 +#define GPR_POSIX_FILE 1 #define GPR_POSIX_TMPFILE 1 #define GPR_POSIX_LOG #define GPR_POSIX_STRING 1 @@ -179,6 +180,7 @@ #ifndef GPR_LINUX_SOCKETUTILS #define GPR_POSIX_SOCKETUTILS #endif +#define GPR_POSIX_FILE 1 #define GPR_POSIX_TMPFILE 1 #define GPR_POSIX_STRING 1 #define GPR_POSIX_SUBPROCESS 1 @@ -217,6 +219,7 @@ #define GPR_POSIX_SOCKETADDR 1 #define GPR_POSIX_SOCKETUTILS 1 #define GPR_POSIX_ENV 1 +#define GPR_POSIX_FILE 1 #define GPR_POSIX_TMPFILE 1 #define GPR_POSIX_STRING 1 #define GPR_POSIX_SUBPROCESS 1 @@ -247,6 +250,7 @@ #define GPR_POSIX_SOCKETADDR 1 #define GPR_POSIX_SOCKETUTILS 1 #define GPR_POSIX_ENV 1 +#define GPR_POSIX_FILE 1 #define GPR_POSIX_TMPFILE 1 #define GPR_POSIX_STRING 1 #define GPR_POSIX_SUBPROCESS 1 @@ -284,6 +288,7 @@ #define GPR_POSIX_SOCKETADDR 1 #define GPR_POSIX_SOCKETUTILS 1 #define GPR_POSIX_ENV 1 +#define GPR_POSIX_FILE 1 #define GPR_POSIX_TMPFILE 1 #define GPR_POSIX_STRING 1 #define GPR_POSIX_SUBPROCESS 1 From 344f55b7baad4fce6be0d5c7007b43f5f270e359 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 15 Apr 2016 07:52:25 +0200 Subject: [PATCH 0052/1894] clang-format. --- src/core/lib/iomgr/tcp_windows.c | 4 ++-- src/core/lib/support/string_util_win32.c | 2 +- src/core/lib/support/string_win32.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 39968239334..551149e1a62 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -65,8 +65,8 @@ static int set_non_block(SOCKET sock) { int status; uint32_t param = 1; DWORD ret; - status = - WSAIoctl(sock, GRPC_FIONBIO, ¶m, sizeof(param), NULL, 0, &ret, NULL, NULL); + status = WSAIoctl(sock, GRPC_FIONBIO, ¶m, sizeof(param), NULL, 0, &ret, + NULL, NULL); return status == 0; } diff --git a/src/core/lib/support/string_util_win32.c b/src/core/lib/support/string_util_win32.c index fd14ce54e43..c0586a3fbbf 100644 --- a/src/core/lib/support/string_util_win32.c +++ b/src/core/lib/support/string_util_win32.c @@ -40,8 +40,8 @@ #include #include #include -#include #include +#include #include #include diff --git a/src/core/lib/support/string_win32.c b/src/core/lib/support/string_win32.c index 8382cde15a4..eabd9c6883e 100644 --- a/src/core/lib/support/string_win32.c +++ b/src/core/lib/support/string_win32.c @@ -40,8 +40,8 @@ #include #include #include -#include #include +#include #include #include From 95953bfd7f71c1555aaf7d9a158295c4720fa9da Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 15 Apr 2016 07:58:22 +0200 Subject: [PATCH 0053/1894] Moving headers around. --- src/core/lib/support/string_util_win32.c | 5 ++++- src/core/lib/support/string_win32.c | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/core/lib/support/string_util_win32.c b/src/core/lib/support/string_util_win32.c index c0586a3fbbf..f3cb0c050f9 100644 --- a/src/core/lib/support/string_util_win32.c +++ b/src/core/lib/support/string_util_win32.c @@ -37,11 +37,14 @@ #ifdef GPR_WIN32 +/* Some platforms (namely msys) need wchar to be included BEFORE + anything else, especially strsafe.h. */ +#include + #include #include #include #include -#include #include #include diff --git a/src/core/lib/support/string_win32.c b/src/core/lib/support/string_win32.c index eabd9c6883e..9b398b89c56 100644 --- a/src/core/lib/support/string_win32.c +++ b/src/core/lib/support/string_win32.c @@ -37,11 +37,14 @@ #ifdef GPR_WIN32_STRING +/* Some platforms (namely msys) need wchar to be included BEFORE + anything else, especially strsafe.h. */ +#include + #include #include #include #include -#include #include #include From 94a353aa460e618071572cd42f2106353fda6abe Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 16 Apr 2016 01:21:05 +0200 Subject: [PATCH 0054/1894] Reverting changes in string_win32.c, as we're going to use posix strings for msys. --- src/core/lib/support/string_win32.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/core/lib/support/string_win32.c b/src/core/lib/support/string_win32.c index 9b398b89c56..6b92f792534 100644 --- a/src/core/lib/support/string_win32.c +++ b/src/core/lib/support/string_win32.c @@ -37,25 +37,17 @@ #ifdef GPR_WIN32_STRING -/* Some platforms (namely msys) need wchar to be included BEFORE - anything else, especially strsafe.h. */ -#include - #include #include #include -#include #include -#include #include "src/core/lib/support/string.h" int gpr_asprintf(char **strp, const char *format, ...) { va_list args; int ret; - - HRESULT success; size_t strp_buflen; /* Determine the length. */ @@ -76,9 +68,9 @@ int gpr_asprintf(char **strp, const char *format, ...) { /* Print to the buffer. */ va_start(args, format); - success = StringCbVPrintfA(*strp, strp_buflen, format, args); + ret = vsnprintf_s(*strp, strp_buflen, _TRUNCATE, format, args); va_end(args); - if (success == S_OK) { + if ((size_t)ret == strp_buflen - 1) { return ret; } From 2e7d957a63c9bcfe0235f8b5d55fd9a372a32ced Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 15 Apr 2016 17:29:57 -0700 Subject: [PATCH 0055/1894] Provide a function that converts grpc_call_error values into a string --- grpc.def | 1 + include/grpc/grpc.h | 3 ++ src/core/lib/surface/call.c | 37 +++++++++++++++++++ .../grpcio/grpc/_cython/imports.generated.c | 2 + .../grpcio/grpc/_cython/imports.generated.h | 3 ++ src/ruby/ext/grpc/rb_grpc_imports.generated.c | 2 + src/ruby/ext/grpc/rb_grpc_imports.generated.h | 3 ++ 7 files changed, 51 insertions(+) diff --git a/grpc.def b/grpc.def index f81aa1b05a6..5e2de0ad2a9 100644 --- a/grpc.def +++ b/grpc.def @@ -86,6 +86,7 @@ EXPORTS grpc_header_key_is_legal grpc_header_nonbin_value_is_legal grpc_is_binary_header + grpc_call_error_to_string grpc_auth_property_iterator_next grpc_auth_context_property_iterator grpc_auth_context_peer_identity diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 5c868aece37..0ca28c0fef1 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -384,6 +384,9 @@ GRPCAPI int grpc_header_nonbin_value_is_legal(const char *value, size_t length); /** Check whether a metadata key corresponds to a binary value */ GRPCAPI int grpc_is_binary_header(const char *key, size_t length); +/** Convert grpc_call_error values to a string */ +GRPCAPI const char *grpc_call_error_to_string(grpc_call_error error); + #ifdef __cplusplus } #endif diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 6581bbd3d1d..8deb3442de4 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1512,3 +1512,40 @@ grpc_compression_algorithm grpc_call_compression_for_level( gpr_mu_unlock(&call->mu); return grpc_compression_algorithm_for_level(level, accepted_encodings); } + +const char *grpc_call_error_to_string(grpc_call_error error) { + switch (error) { + case GRPC_CALL_ERROR: + return "GRPC_CALL_ERROR"; + case GRPC_CALL_ERROR_ALREADY_ACCEPTED: + return "GRPC_CALL_ERROR_ALREADY_ACCEPTED"; + case GRPC_CALL_ERROR_ALREADY_FINISHED: + return "GRPC_CALL_ERROR_ALREADY_FINISHED"; + case GRPC_CALL_ERROR_ALREADY_INVOKED: + return "GRPC_CALL_ERROR_ALREADY_INVOKED"; + case GRPC_CALL_ERROR_BATCH_TOO_BIG: + return "GRPC_CALL_ERROR_BATCH_TOO_BIG"; + case GRPC_CALL_ERROR_INVALID_FLAGS: + return "GRPC_CALL_ERROR_INVALID_FLAGS"; + case GRPC_CALL_ERROR_INVALID_MESSAGE: + return "GRPC_CALL_ERROR_INVALID_MESSAGE"; + case GRPC_CALL_ERROR_INVALID_METADATA: + return "GRPC_CALL_ERROR_INVALID_METADATA"; + case GRPC_CALL_ERROR_NOT_INVOKED: + return "GRPC_CALL_ERROR_NOT_INVOKED"; + case GRPC_CALL_ERROR_NOT_ON_CLIENT: + return "GRPC_CALL_ERROR_NOT_ON_CLIENT"; + case GRPC_CALL_ERROR_NOT_ON_SERVER: + return "GRPC_CALL_ERROR_NOT_ON_SERVER"; + case GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE: + return "GRPC_CALL_ERROR_NOT_SERVER_COMPLETION_QUEUE"; + case GRPC_CALL_ERROR_PAYLOAD_TYPE_MISMATCH: + return "GRPC_CALL_ERROR_PAYLOAD_TYPE_MISMATCH"; + case GRPC_CALL_ERROR_TOO_MANY_OPERATIONS: + return "GRPC_CALL_ERROR_TOO_MANY_OPERATIONS"; + case GRPC_CALL_OK: + return "GRPC_CALL_OK"; + default: + return "GRPC_CALL_ERROR_UNKNOW"; + } +} diff --git a/src/python/grpcio/grpc/_cython/imports.generated.c b/src/python/grpcio/grpc/_cython/imports.generated.c index 8bd6ae6372b..37e7930a559 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.c +++ b/src/python/grpcio/grpc/_cython/imports.generated.c @@ -124,6 +124,7 @@ grpc_tracer_set_enabled_type grpc_tracer_set_enabled_import; grpc_header_key_is_legal_type grpc_header_key_is_legal_import; grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_import; grpc_is_binary_header_type grpc_is_binary_header_import; +grpc_call_error_to_string_type grpc_call_error_to_string_import; grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import; grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import; @@ -390,6 +391,7 @@ void pygrpc_load_imports(HMODULE library) { grpc_header_key_is_legal_import = (grpc_header_key_is_legal_type) GetProcAddress(library, "grpc_header_key_is_legal"); grpc_header_nonbin_value_is_legal_import = (grpc_header_nonbin_value_is_legal_type) GetProcAddress(library, "grpc_header_nonbin_value_is_legal"); grpc_is_binary_header_import = (grpc_is_binary_header_type) GetProcAddress(library, "grpc_is_binary_header"); + grpc_call_error_to_string_import = (grpc_call_error_to_string_type) GetProcAddress(library, "grpc_call_error_to_string"); grpc_auth_property_iterator_next_import = (grpc_auth_property_iterator_next_type) GetProcAddress(library, "grpc_auth_property_iterator_next"); grpc_auth_context_property_iterator_import = (grpc_auth_context_property_iterator_type) GetProcAddress(library, "grpc_auth_context_property_iterator"); grpc_auth_context_peer_identity_import = (grpc_auth_context_peer_identity_type) GetProcAddress(library, "grpc_auth_context_peer_identity"); diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index 272e85b4857..380b0657333 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -322,6 +322,9 @@ extern grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_ typedef int(*grpc_is_binary_header_type)(const char *key, size_t length); extern grpc_is_binary_header_type grpc_is_binary_header_import; #define grpc_is_binary_header grpc_is_binary_header_import +typedef const char *(*grpc_call_error_to_string_type)(grpc_call_error error); +extern grpc_call_error_to_string_type grpc_call_error_to_string_import; +#define grpc_call_error_to_string grpc_call_error_to_string_import typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); extern grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; #define grpc_auth_property_iterator_next grpc_auth_property_iterator_next_import diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index 56db4ec686b..8633f9347cc 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -124,6 +124,7 @@ grpc_tracer_set_enabled_type grpc_tracer_set_enabled_import; grpc_header_key_is_legal_type grpc_header_key_is_legal_import; grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_import; grpc_is_binary_header_type grpc_is_binary_header_import; +grpc_call_error_to_string_type grpc_call_error_to_string_import; grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import; grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import; @@ -386,6 +387,7 @@ void grpc_rb_load_imports(HMODULE library) { grpc_header_key_is_legal_import = (grpc_header_key_is_legal_type) GetProcAddress(library, "grpc_header_key_is_legal"); grpc_header_nonbin_value_is_legal_import = (grpc_header_nonbin_value_is_legal_type) GetProcAddress(library, "grpc_header_nonbin_value_is_legal"); grpc_is_binary_header_import = (grpc_is_binary_header_type) GetProcAddress(library, "grpc_is_binary_header"); + grpc_call_error_to_string_import = (grpc_call_error_to_string_type) GetProcAddress(library, "grpc_call_error_to_string"); grpc_auth_property_iterator_next_import = (grpc_auth_property_iterator_next_type) GetProcAddress(library, "grpc_auth_property_iterator_next"); grpc_auth_context_property_iterator_import = (grpc_auth_context_property_iterator_type) GetProcAddress(library, "grpc_auth_context_property_iterator"); grpc_auth_context_peer_identity_import = (grpc_auth_context_peer_identity_type) GetProcAddress(library, "grpc_auth_context_peer_identity"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index c526f434c61..da328367d5c 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -322,6 +322,9 @@ extern grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_ typedef int(*grpc_is_binary_header_type)(const char *key, size_t length); extern grpc_is_binary_header_type grpc_is_binary_header_import; #define grpc_is_binary_header grpc_is_binary_header_import +typedef const char *(*grpc_call_error_to_string_type)(grpc_call_error error); +extern grpc_call_error_to_string_type grpc_call_error_to_string_import; +#define grpc_call_error_to_string grpc_call_error_to_string_import typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); extern grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; #define grpc_auth_property_iterator_next grpc_auth_property_iterator_next_import From a52348625a4e802e5275b609d257375dac9f5274 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 14 Apr 2016 15:08:43 -0700 Subject: [PATCH 0056/1894] After addition of grpc_call_stats --- .../load_reporting/load_reporting_filter.c | 37 ++++-------------- src/core/lib/load_reporting/load_reporting.c | 38 +++++++++++++++---- src/core/lib/load_reporting/load_reporting.h | 29 +++++++++++--- .../load_reporting_registration.c | 28 +++++++++----- 4 files changed, 81 insertions(+), 51 deletions(-) diff --git a/src/core/ext/load_reporting/load_reporting_filter.c b/src/core/ext/load_reporting/load_reporting_filter.c index 7b029ae3eed..fc62a4dd0a8 100644 --- a/src/core/ext/load_reporting/load_reporting_filter.c +++ b/src/core/ext/load_reporting/load_reporting_filter.c @@ -31,53 +31,32 @@ * */ -#include - #include #include "src/core/ext/load_reporting/load_reporting_filter.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/load_reporting/load_reporting.h" #include "src/core/lib/profiling/timers.h" -#include "src/core/lib/support/string.h" - -typedef struct call_data { load_reporting_data lr_data; } call_data; +typedef struct call_data { void *dummy; } call_data; typedef struct channel_data { void *dummy; } channel_data; -static void load_reporting_start_transport_stream_op( - grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_transport_stream_op *op) { - call_data *calld = elem->call_data; - - GPR_TIMER_BEGIN("load_reporting_start_transport_stream_op", 0); - grpc_load_reporting_call(&calld->lr_data); - grpc_call_next_op(exec_ctx, elem, op); - GPR_TIMER_END("load_reporting_start_transport_stream_op", 0); -} - /* Constructor for call_data */ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_call_element_args *args) { - /* grab pointers to our data from the call element */ - call_data *calld = elem->call_data; - - /* initialize members */ - memset(&calld->lr_data, 0, sizeof(load_reporting_data)); -} + grpc_call_element_args *args) {} /* Destructor for call_data */ -static void destroy_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem) { - /* grab pointers to our data from the call element */ - /*call_data *calld = elem->call_data;*/ +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + const grpc_call_stats *stats) { + GPR_TIMER_BEGIN("load_reporting_filter", 0); + grpc_load_reporting_call(stats); + GPR_TIMER_END("load_reporting_filter", 0); } /* Constructor for channel_data */ static void init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_channel_element_args *args) { - /*channel_data *channeld = elem->channel_data;*/ GPR_ASSERT(!args->is_last); } @@ -86,7 +65,7 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem) {} const grpc_channel_filter grpc_load_reporting_filter = { - load_reporting_start_transport_stream_op, + grpc_call_next_op, grpc_channel_next_op, sizeof(call_data), init_call_elem, diff --git a/src/core/lib/load_reporting/load_reporting.c b/src/core/lib/load_reporting/load_reporting.c index 2ac8b97efcf..dbb1ba5c631 100644 --- a/src/core/lib/load_reporting/load_reporting.c +++ b/src/core/lib/load_reporting/load_reporting.c @@ -31,18 +31,42 @@ * */ +#include +#include + #include "src/core/lib/load_reporting/load_reporting.h" -#include +typedef struct load_reporting { + gpr_mu mu; + load_reporting_fn fn; + void *data; +} load_reporting; + +static load_reporting g_load_reporting; -static load_reporting_fn g_load_reporting_fn; +void grpc_load_reporting_init(load_reporting_fn fn, void *data) { + gpr_mu_init(&g_load_reporting.mu); + g_load_reporting.fn = fn; + g_load_reporting.data = data; +} -void grpc_load_reporting_init(load_reporting_fn fn) { - g_load_reporting_fn = fn; +void grpc_load_reporting_destroy() { + gpr_free(g_load_reporting.data); + g_load_reporting.data = NULL; + gpr_mu_destroy(&g_load_reporting.mu); } -void grpc_load_reporting_call(load_reporting_data *lr_data) { - if (g_load_reporting_fn != NULL) { - g_load_reporting_fn(lr_data); +void grpc_load_reporting_call(const grpc_call_stats *stats) { + if (g_load_reporting.fn != NULL) { + gpr_mu_lock(&g_load_reporting.mu); + g_load_reporting.fn(g_load_reporting.data, stats); + gpr_mu_unlock(&g_load_reporting.mu); } } + +void *grpc_load_reporting_data() { + gpr_mu_lock(&g_load_reporting.mu); + void *data = g_load_reporting.data; + gpr_mu_unlock(&g_load_reporting.mu); + return data; +} diff --git a/src/core/lib/load_reporting/load_reporting.h b/src/core/lib/load_reporting/load_reporting.h index 65465ef940a..afc9090d0cf 100644 --- a/src/core/lib/load_reporting/load_reporting.h +++ b/src/core/lib/load_reporting/load_reporting.h @@ -34,13 +34,32 @@ #ifndef GRPC_CORE_LIB_LOAD_REPORTING_LOAD_REPORTING_H #define GRPC_CORE_LIB_LOAD_REPORTING_LOAD_REPORTING_H -typedef struct load_reporting_data { void *data; } load_reporting_data; +#include "src/core/lib/iomgr/closure.h" +#include "src/core/lib/surface/call.h" -typedef void (*load_reporting_fn)(load_reporting_data *lr_data); +/** Custom function to be called by the load reporting filter. + * + * The \a data pointer is the same as the one passed to \a + * grpc_load_reporting_init. \a stats are the final per-call statistics gathered + * by the gRPC runtime. */ +typedef void (*load_reporting_fn)(void *data, const grpc_call_stats *stats); + +/** Register \a fn as the function to be invoked by the load reporting filter, + * passing \a data as its namesake argument. To be called only from a plugin + * init function. */ +void grpc_load_reporting_init(load_reporting_fn fn, void *data); + +/** Takes care of freeing the memory allocated for \a data (see \a + * grpc_load_reporting_init), if any. To be called only from a plugin destroy + * function. */ +void grpc_load_reporting_destroy(); -/** To be called only from a plugin init function */ -void grpc_load_reporting_init(load_reporting_fn fn); +/** Invoke the function registered by \a grpc_load_reporting_init, passing it \a + * stats as one of the arguments (see \a load_reporting_fn). */ +void grpc_load_reporting_call(const grpc_call_stats *stats); -void grpc_load_reporting_call(load_reporting_data *lr_data); +/** Returns the custom load reporting data, as registered in \a + * grpc_load_reporting_init. */ +void *grpc_load_reporting_data(); #endif /* GRPC_CORE_LIB_LOAD_REPORTING_LOAD_REPORTING_H */ diff --git a/test/core/load_reporting/load_reporting_registration.c b/test/core/load_reporting/load_reporting_registration.c index 43616827817..e3d52b250c5 100644 --- a/test/core/load_reporting/load_reporting_registration.c +++ b/test/core/load_reporting/load_reporting_registration.c @@ -40,27 +40,35 @@ #include "src/core/lib/surface/api_trace.h" #include "test/core/util/test_config.h" -static void noop(load_reporting_data *lr_data) { - uint32_t *d = (uint32_t *)(lr_data->data); - *d = 0xdeadbeef; +typedef struct { uint64_t total_bytes; } aggregated_bw_stats; + +static void sample_fn(void *lr_data, const grpc_call_stats *stats) { + aggregated_bw_stats *custom_stats = (aggregated_bw_stats *)lr_data; + custom_stats->total_bytes = + stats->transport_stream_stats.outgoing.data_bytes + + stats->transport_stream_stats.incoming.data_bytes; } -static void lr_plugin_init(void) { grpc_load_reporting_init(noop); } +static void lr_plugin_init(void) { + aggregated_bw_stats *data = gpr_malloc(sizeof(aggregated_bw_stats)); + grpc_load_reporting_init(sample_fn, data); +} -static void lr_plugin_destroy(void) {} +static void lr_plugin_destroy(void) { grpc_load_reporting_destroy(); } static void load_reporting_register() { grpc_register_plugin(lr_plugin_init, lr_plugin_destroy); } static void test_load_reporter_registration(void) { - load_reporting_data lr_data; - lr_data.data = gpr_malloc(sizeof(uint32_t)); - grpc_load_reporting_call(&lr_data); + grpc_call_stats stats; + stats.transport_stream_stats.outgoing.data_bytes = 123; + stats.transport_stream_stats.incoming.data_bytes = 456; - GPR_ASSERT(*((uint32_t *)lr_data.data) == 0xdeadbeef); + grpc_load_reporting_call(&stats); - gpr_free(lr_data.data); + GPR_ASSERT(((aggregated_bw_stats *)grpc_load_reporting_data())->total_bytes == + 123 + 456); } int main(int argc, char **argv) { From 208795c0fe7a2783c370adfa9b4ff3f73101961a Mon Sep 17 00:00:00 2001 From: Benjamin Herzog Date: Mon, 18 Apr 2016 18:10:14 +0200 Subject: [PATCH 0057/1894] Added nullability to service declaration in objc --- src/compiler/objective_c_generator.cc | 6 +++--- src/compiler/objective_c_plugin.cc | 7 +++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/compiler/objective_c_generator.cc b/src/compiler/objective_c_generator.cc index ff092053ad0..465491e385f 100644 --- a/src/compiler/objective_c_generator.cc +++ b/src/compiler/objective_c_generator.cc @@ -75,11 +75,11 @@ void PrintMethodSignature(Printer *printer, const MethodDescriptor *method, if (method->server_streaming()) { printer->Print(vars, " eventHandler:(void(^)(BOOL done, " - "$response_class$ *response, NSError *error))eventHandler"); + "$response_class$ *_Nullable response, NSError *_Nullable error))eventHandler"); } else { printer->Print(vars, - " handler:(void(^)($response_class$ *response, " - "NSError *error))handler"); + " handler:(void(^)($response_class$ *_Nullable response, " + "NSError *_Nullable error))handler"); } } diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index 17440358bb8..f62faa52610 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -64,7 +64,8 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { ".pbobjc.h\"\n\n" "#import \n" "#import \n" - "#import \n"; + "#import \n\n" + "NS_ASSUME_NONNULL_BEGIN\n\n"; // TODO(jcanizales): Instead forward-declare the input and output types // and import the files in the .pbrpc.m @@ -81,8 +82,10 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { declarations += grpc_objective_c_generator::GetHeader(service); } + ::grpc::string nonNullEnd = "\nNS_ASSUME_NONNULL_END\n"; + Write(context, file_name + ".pbrpc.h", - imports + '\n' + proto_imports + '\n' + declarations); + imports + '\n' + proto_imports + '\n' + declarations + nonNullEnd); } { From 4afce7e66ff9ea3d3118a386442cb9d2577e1926 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 18 Apr 2016 16:25:17 -0700 Subject: [PATCH 0058/1894] Changes across the board from pollset to pollset_set --- src/core/ext/census/grpc_filter.c | 4 +- src/core/ext/client_config/client_channel.c | 22 +++++++-- src/core/ext/client_config/lb_policy.c | 4 +- src/core/ext/client_config/lb_policy.h | 5 +- src/core/ext/client_config/subchannel.c | 2 +- .../client_config/subchannel_call_holder.c | 2 + .../client_config/subchannel_call_holder.h | 1 + .../ext/lb_policy/pick_first/pick_first.c | 26 +++++----- .../ext/lb_policy/round_robin/round_robin.c | 22 +++++---- .../chttp2/transport/chttp2_transport.c | 9 ++++ src/core/lib/channel/channel_stack.c | 17 ++++--- src/core/lib/channel/channel_stack.h | 26 +++++----- src/core/lib/channel/compress_filter.c | 2 +- src/core/lib/channel/connected_channel.c | 21 ++++++-- src/core/lib/channel/http_client_filter.c | 2 +- src/core/lib/channel/http_server_filter.c | 2 +- src/core/lib/http/httpcli.c | 22 ++++----- src/core/lib/http/httpcli.h | 4 +- src/core/lib/security/client_auth_filter.c | 48 +++++++++++++------ src/core/lib/security/credentials.c | 36 +++++++------- src/core/lib/security/credentials.h | 7 +-- .../lib/security/google_default_credentials.c | 7 ++- src/core/lib/security/jwt_verifier.c | 12 +++-- src/core/lib/security/server_auth_filter.c | 18 ++++--- src/core/lib/surface/call.c | 33 ++++++++----- src/core/lib/surface/call.h | 2 + src/core/lib/surface/channel.c | 30 +++++++++--- src/core/lib/surface/channel.h | 5 ++ src/core/lib/surface/lame_client.c | 2 +- src/core/lib/surface/server.c | 8 ++-- src/core/lib/transport/transport.c | 7 +++ src/core/lib/transport/transport.h | 5 ++ src/core/lib/transport/transport_impl.h | 4 ++ test/core/channel/channel_stack_test.c | 23 ++++----- test/core/end2end/tests/filter_causes_close.c | 2 +- test/core/http/httpcli_test.c | 9 ++-- test/core/http/httpscli_test.c | 10 ++-- test/core/security/oauth2_utils.c | 10 ++-- .../print_google_default_creds_token.c | 6 ++- test/core/util/port_server_client.c | 14 ++++-- 40 files changed, 323 insertions(+), 168 deletions(-) diff --git a/src/core/ext/census/grpc_filter.c b/src/core/ext/census/grpc_filter.c index abfb3bb5f0e..42cda4637c9 100644 --- a/src/core/ext/census/grpc_filter.c +++ b/src/core/ext/census/grpc_filter.c @@ -176,7 +176,7 @@ const grpc_channel_filter grpc_client_census_filter = { grpc_channel_next_op, sizeof(call_data), client_init_call_elem, - grpc_call_stack_ignore_set_pollset, + grpc_call_stack_ignore_set_pollset_or_pollset_set, client_destroy_call_elem, sizeof(channel_data), init_channel_elem, @@ -189,7 +189,7 @@ const grpc_channel_filter grpc_server_census_filter = { grpc_channel_next_op, sizeof(call_data), server_init_call_elem, - grpc_call_stack_ignore_set_pollset, + grpc_call_stack_ignore_set_pollset_or_pollset_set, server_destroy_call_elem, sizeof(channel_data), init_channel_elem, diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index 93d54fdcfeb..5e9b02be376 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -368,7 +368,7 @@ static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *elemp, int r; GRPC_LB_POLICY_REF(lb_policy, "cc_pick_subchannel"); gpr_mu_unlock(&chand->mu_config); - r = grpc_lb_policy_pick(exec_ctx, lb_policy, calld->pollset, + r = grpc_lb_policy_pick(exec_ctx, lb_policy, calld->pollset_set, initial_metadata, initial_metadata_flags, connected_subchannel, on_ready); GRPC_LB_POLICY_UNREF(exec_ctx, lb_policy, "cc_pick_subchannel"); @@ -446,10 +446,22 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, gpr_mu_destroy(&chand->mu_config); } -static void cc_set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_pollset *pollset) { +static void cc_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_pollset *pollset, + grpc_pollset_set *or_pollset_set) { + GPR_ASSERT(!(pollset != NULL && or_pollset_set != NULL)); + GPR_ASSERT(pollset != NULL || or_pollset_set != NULL); + call_data *calld = elem->call_data; - calld->pollset = pollset; + if (pollset != NULL) { + calld->pollset = pollset; + grpc_pollset_set_add_pollset(exec_ctx, calld->pollset_set, pollset); + } else if (or_pollset_set != NULL) { + calld->pollset = NULL; + grpc_pollset_set_add_pollset_set(exec_ctx, calld->pollset_set, + or_pollset_set); + } } const grpc_channel_filter grpc_client_channel_filter = { @@ -457,7 +469,7 @@ const grpc_channel_filter grpc_client_channel_filter = { cc_start_transport_op, sizeof(call_data), init_call_elem, - cc_set_pollset, + cc_set_pollset_or_pollset_set, destroy_call_elem, sizeof(channel_data), init_channel_elem, diff --git a/src/core/ext/client_config/lb_policy.c b/src/core/ext/client_config/lb_policy.c index a7ad9842dc3..1e4e0077e60 100644 --- a/src/core/ext/client_config/lb_policy.c +++ b/src/core/ext/client_config/lb_policy.c @@ -99,12 +99,12 @@ void grpc_lb_policy_weak_unref(grpc_exec_ctx *exec_ctx, } int grpc_lb_policy_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, - grpc_pollset *pollset, + grpc_pollset_set *pollset_set, grpc_metadata_batch *initial_metadata, uint32_t initial_metadata_flags, grpc_connected_subchannel **target, grpc_closure *on_complete) { - return policy->vtable->pick(exec_ctx, policy, pollset, initial_metadata, + return policy->vtable->pick(exec_ctx, policy, pollset_set, initial_metadata, initial_metadata_flags, target, on_complete); } diff --git a/src/core/ext/client_config/lb_policy.h b/src/core/ext/client_config/lb_policy.h index 0384e0b2ebe..d5c578836b9 100644 --- a/src/core/ext/client_config/lb_policy.h +++ b/src/core/ext/client_config/lb_policy.h @@ -59,7 +59,8 @@ struct grpc_lb_policy_vtable { /** implement grpc_lb_policy_pick */ int (*pick)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, - grpc_pollset *pollset, grpc_metadata_batch *initial_metadata, + grpc_pollset_set *pollset_set, + grpc_metadata_batch *initial_metadata, uint32_t initial_metadata_flags, grpc_connected_subchannel **target, grpc_closure *on_complete); void (*cancel_pick)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, @@ -124,7 +125,7 @@ void grpc_lb_policy_init(grpc_lb_policy *policy, \a target. Picking can be asynchronous. Any IO should be done under \a pollset. */ int grpc_lb_policy_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, - grpc_pollset *pollset, + grpc_pollset_set *pollset_set, grpc_metadata_batch *initial_metadata, uint32_t initial_metadata_flags, grpc_connected_subchannel **target, diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c index 125a291f211..cd9f4e122c4 100644 --- a/src/core/ext/client_config/subchannel.c +++ b/src/core/ext/client_config/subchannel.c @@ -699,7 +699,7 @@ grpc_subchannel_call *grpc_connected_subchannel_create_call( GRPC_CONNECTED_SUBCHANNEL_REF(con, "subchannel_call"); grpc_call_stack_init(exec_ctx, chanstk, 1, subchannel_call_destroy, call, NULL, NULL, callstk); - grpc_call_stack_set_pollset(exec_ctx, callstk, pollset); + grpc_call_stack_set_pollset_or_pollset_set(exec_ctx, callstk, pollset, NULL); return call; } diff --git a/src/core/ext/client_config/subchannel_call_holder.c b/src/core/ext/client_config/subchannel_call_holder.c index 3db462b2465..c6f4b8f373c 100644 --- a/src/core/ext/client_config/subchannel_call_holder.c +++ b/src/core/ext/client_config/subchannel_call_holder.c @@ -68,6 +68,7 @@ void grpc_subchannel_call_holder_init( holder->waiting_ops_capacity = 0; holder->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING; holder->owning_call = owning_call; + holder->pollset_set = grpc_pollset_set_create(); } void grpc_subchannel_call_holder_destroy(grpc_exec_ctx *exec_ctx, @@ -81,6 +82,7 @@ void grpc_subchannel_call_holder_destroy(grpc_exec_ctx *exec_ctx, gpr_mu_destroy(&holder->mu); GPR_ASSERT(holder->waiting_ops_count == 0); gpr_free(holder->waiting_ops); + grpc_pollset_set_destroy(holder->pollset_set); } void grpc_subchannel_call_holder_perform_op(grpc_exec_ctx *exec_ctx, diff --git a/src/core/ext/client_config/subchannel_call_holder.h b/src/core/ext/client_config/subchannel_call_holder.h index 92999087884..6ed011ff880 100644 --- a/src/core/ext/client_config/subchannel_call_holder.h +++ b/src/core/ext/client_config/subchannel_call_holder.h @@ -72,6 +72,7 @@ typedef struct grpc_subchannel_call_holder { grpc_subchannel_call_holder_creation_phase creation_phase; grpc_connected_subchannel *connected_subchannel; grpc_pollset *pollset; + grpc_pollset_set *pollset_set; grpc_transport_stream_op *waiting_ops; size_t waiting_ops_count; diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c index 5926f9d70bf..454efd011ac 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -39,7 +39,7 @@ typedef struct pending_pick { struct pending_pick *next; - grpc_pollset *pollset; + grpc_pollset_set *pollset_set; uint32_t initial_metadata_flags; grpc_connected_subchannel **target; grpc_closure *on_complete; @@ -118,8 +118,8 @@ static void pf_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { while (pp != NULL) { pending_pick *next = pp->next; *pp->target = NULL; - grpc_pollset_set_del_pollset(exec_ctx, p->base.interested_parties, - pp->pollset); + grpc_pollset_set_del_pollset_set(exec_ctx, p->base.interested_parties, + pp->pollset_set); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); gpr_free(pp); pp = next; @@ -136,8 +136,8 @@ static void pf_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, while (pp != NULL) { pending_pick *next = pp->next; if (pp->target == target) { - grpc_pollset_set_del_pollset(exec_ctx, p->base.interested_parties, - pp->pollset); + grpc_pollset_set_del_pollset_set(exec_ctx, p->base.interested_parties, + pp->pollset_set); *target = NULL; grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); gpr_free(pp); @@ -162,8 +162,8 @@ static void pf_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, pending_pick *next = pp->next; if ((pp->initial_metadata_flags & initial_metadata_flags_mask) == initial_metadata_flags_eq) { - grpc_pollset_set_del_pollset(exec_ctx, p->base.interested_parties, - pp->pollset); + grpc_pollset_set_del_pollset_set(exec_ctx, p->base.interested_parties, + pp->pollset_set); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); gpr_free(pp); } else { @@ -196,7 +196,8 @@ static void pf_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { } static int pf_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, - grpc_pollset *pollset, grpc_metadata_batch *initial_metadata, + grpc_pollset_set *pollset_set, + grpc_metadata_batch *initial_metadata, uint32_t initial_metadata_flags, grpc_connected_subchannel **target, grpc_closure *on_complete) { @@ -221,10 +222,11 @@ static int pf_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, if (!p->started_picking) { start_picking(exec_ctx, p); } - grpc_pollset_set_add_pollset(exec_ctx, p->base.interested_parties, pollset); + grpc_pollset_set_add_pollset_set(exec_ctx, p->base.interested_parties, + pollset_set); pp = gpr_malloc(sizeof(*pp)); pp->next = p->pending_picks; - pp->pollset = pollset; + pp->pollset_set = pollset_set; pp->target = target; pp->initial_metadata_flags = initial_metadata_flags; pp->on_complete = on_complete; @@ -304,8 +306,8 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, while ((pp = p->pending_picks)) { p->pending_picks = pp->next; *pp->target = selected; - grpc_pollset_set_del_pollset(exec_ctx, p->base.interested_parties, - pp->pollset); + grpc_pollset_set_del_pollset_set(exec_ctx, p->base.interested_parties, + pp->pollset_set); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); gpr_free(pp); } diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index 3f6051b8925..78ac61923f9 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -48,7 +48,7 @@ int grpc_lb_round_robin_trace = 0; * Once a pick is available, \a target is updated and \a on_complete called. */ typedef struct pending_pick { struct pending_pick *next; - grpc_pollset *pollset; + grpc_pollset_set *pollset_set; uint32_t initial_metadata_flags; grpc_connected_subchannel **target; grpc_closure *on_complete; @@ -262,8 +262,8 @@ static void rr_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, while (pp != NULL) { pending_pick *next = pp->next; if (pp->target == target) { - grpc_pollset_set_del_pollset(exec_ctx, p->base.interested_parties, - pp->pollset); + grpc_pollset_set_del_pollset_set(exec_ctx, p->base.interested_parties, + pp->pollset_set); *target = NULL; grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); gpr_free(pp); @@ -288,8 +288,8 @@ static void rr_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, pending_pick *next = pp->next; if ((pp->initial_metadata_flags & initial_metadata_flags_mask) == initial_metadata_flags_eq) { - grpc_pollset_set_del_pollset(exec_ctx, p->base.interested_parties, - pp->pollset); + grpc_pollset_set_del_pollset_set(exec_ctx, p->base.interested_parties, + pp->pollset_set); *pp->target = NULL; grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); gpr_free(pp); @@ -329,7 +329,8 @@ static void rr_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { } static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, - grpc_pollset *pollset, grpc_metadata_batch *initial_metadata, + grpc_pollset_set *pollset_set, + grpc_metadata_batch *initial_metadata, uint32_t initial_metadata_flags, grpc_connected_subchannel **target, grpc_closure *on_complete) { @@ -352,10 +353,11 @@ static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, if (!p->started_picking) { start_picking(exec_ctx, p); } - grpc_pollset_set_add_pollset(exec_ctx, p->base.interested_parties, pollset); + grpc_pollset_set_add_pollset_set(exec_ctx, p->base.interested_parties, + pollset_set); pp = gpr_malloc(sizeof(*pp)); pp->next = p->pending_picks; - pp->pollset = pollset; + pp->pollset_set = pollset_set; pp->target = target; pp->on_complete = on_complete; pp->initial_metadata_flags = initial_metadata_flags; @@ -404,8 +406,8 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, "[RR CONN CHANGED] TARGET <-- SUBCHANNEL %p (NODE %p)", selected->subchannel, selected); } - grpc_pollset_set_del_pollset(exec_ctx, p->base.interested_parties, - pp->pollset); + grpc_pollset_set_del_pollset_set(exec_ctx, p->base.interested_parties, + pp->pollset_set); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); gpr_free(pp); } diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 01507f5ca6f..5bba0567414 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1539,6 +1539,14 @@ static void set_pollset(grpc_exec_ctx *exec_ctx, grpc_transport *gt, unlock(exec_ctx, t); } +static void set_pollset_set(grpc_exec_ctx *exec_ctx, grpc_transport *gt, + grpc_stream *gs, grpc_pollset_set *pollset_set) { + grpc_chttp2_transport *t = (grpc_chttp2_transport *)gt; + lock(t); + add_to_pollset_set_locked(exec_ctx, t, pollset_set); + unlock(exec_ctx, t); +} + /******************************************************************************* * BYTE STREAM */ @@ -1792,6 +1800,7 @@ static const grpc_transport_vtable vtable = {sizeof(grpc_chttp2_stream), "chttp2", init_stream, set_pollset, + set_pollset_set, perform_stream_op, perform_transport_op, destroy_stream, diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index e36066d8639..0d0260d19e8 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -189,29 +189,32 @@ void grpc_call_stack_init(grpc_exec_ctx *exec_ctx, } } -void grpc_call_stack_set_pollset(grpc_exec_ctx *exec_ctx, - grpc_call_stack *call_stack, - grpc_pollset *pollset) { +void grpc_call_stack_set_pollset_or_pollset_set( + grpc_exec_ctx *exec_ctx, grpc_call_stack *call_stack, grpc_pollset *pollset, + grpc_pollset_set *or_pollset_set) { size_t count = call_stack->count; grpc_call_element *call_elems; char *user_data; size_t i; + GPR_ASSERT(!(pollset != NULL && or_pollset_set != NULL)); + GPR_ASSERT(pollset != NULL || or_pollset_set != NULL); call_elems = CALL_ELEMS_FROM_STACK(call_stack); user_data = ((char *)call_elems) + ROUND_UP_TO_ALIGNMENT_SIZE(count * sizeof(grpc_call_element)); /* init per-filter data */ for (i = 0; i < count; i++) { - call_elems[i].filter->set_pollset(exec_ctx, &call_elems[i], pollset); + call_elems[i].filter->set_pollset_or_pollset_set(exec_ctx, &call_elems[i], + pollset, or_pollset_set); user_data += ROUND_UP_TO_ALIGNMENT_SIZE(call_elems[i].filter->sizeof_call_data); } } -void grpc_call_stack_ignore_set_pollset(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem, - grpc_pollset *pollset) {} +void grpc_call_stack_ignore_set_pollset_or_pollset_set( + grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_pollset *pollset, + grpc_pollset_set *or_pollset_set) {} void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack) { grpc_call_element *elems = CALL_ELEMS_FROM_STACK(stack); diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 9e3a25a152d..f349939117d 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -101,8 +101,10 @@ typedef struct { argument. */ void (*init_call_elem)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args); - void (*set_pollset)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_pollset *pollset); + void (*set_pollset_or_pollset_set)(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_pollset *pollset, + grpc_pollset_set *or_pollset_set); /* Destroy per call data. The filter does not need to do any chaining */ void (*destroy_call_elem)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem); @@ -197,10 +199,11 @@ void grpc_call_stack_init(grpc_exec_ctx *exec_ctx, grpc_call_context_element *context, const void *transport_server_data, grpc_call_stack *call_stack); -/* Set a pollset for a call stack: must occur before the first op is started */ -void grpc_call_stack_set_pollset(grpc_exec_ctx *exec_ctx, - grpc_call_stack *call_stack, - grpc_pollset *pollset); +/* Set a pollset or a pollset_set for a call stack: must occur before the first + * op is started */ +void grpc_call_stack_set_pollset_or_pollset_set( + grpc_exec_ctx *exec_ctx, grpc_call_stack *call_stack, grpc_pollset *pollset, + grpc_pollset_set *or_pollset_set); #ifdef GRPC_STREAM_REFCOUNT_DEBUG #define GRPC_CALL_STACK_REF(call_stack, reason) \ @@ -225,11 +228,12 @@ void grpc_call_stack_set_pollset(grpc_exec_ctx *exec_ctx, /* Destroy a call stack */ void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack); -/* Ignore set pollset - used by filters to implement the set_pollset method - if they don't care about pollsets at all. Does nothing. */ -void grpc_call_stack_ignore_set_pollset(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem, - grpc_pollset *pollset); +/* Ignore set pollset{_set} - used by filters to implement the + * set_pollset_or_pollset_set method if they don't care about pollsets at all. + * Does nothing. */ +void grpc_call_stack_ignore_set_pollset_or_pollset_set( + grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_pollset *pollset, + grpc_pollset_set *or_pollset_set); /* Call the next operation in a call stack */ void grpc_call_next_op(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_transport_stream_op *op); diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 229fdb5ef60..3eb62d3b5f4 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -295,7 +295,7 @@ const grpc_channel_filter grpc_compress_filter = { grpc_channel_next_op, sizeof(call_data), init_call_elem, - grpc_call_stack_ignore_set_pollset, + grpc_call_stack_ignore_set_pollset_or_pollset_set, destroy_call_elem, sizeof(channel_data), init_channel_elem, diff --git a/src/core/lib/channel/connected_channel.c b/src/core/lib/channel/connected_channel.c index c1debab4c62..f445f59d0bf 100644 --- a/src/core/lib/channel/connected_channel.c +++ b/src/core/lib/channel/connected_channel.c @@ -93,12 +93,23 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, GPR_ASSERT(r == 0); } -static void set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_pollset *pollset) { +static void set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_pollset *pollset, + grpc_pollset_set *or_pollset_set) { + GPR_ASSERT(!(pollset != NULL && or_pollset_set != NULL)); + GPR_ASSERT(pollset != NULL || or_pollset_set != NULL); + call_data *calld = elem->call_data; channel_data *chand = elem->channel_data; - grpc_transport_set_pollset(exec_ctx, chand->transport, - TRANSPORT_STREAM_FROM_CALL_DATA(calld), pollset); + if (pollset != NULL) { + grpc_transport_set_pollset(exec_ctx, chand->transport, + TRANSPORT_STREAM_FROM_CALL_DATA(calld), pollset); + } else if (or_pollset_set != NULL) { + grpc_transport_set_pollset_set(exec_ctx, chand->transport, + TRANSPORT_STREAM_FROM_CALL_DATA(calld), + or_pollset_set); + } } /* Destructor for call_data */ @@ -136,7 +147,7 @@ static const grpc_channel_filter connected_channel_filter = { con_start_transport_op, sizeof(call_data), init_call_elem, - set_pollset, + set_pollset_or_pollset_set, destroy_call_elem, sizeof(channel_data), init_channel_elem, diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c index 211f537c691..740c302f831 100644 --- a/src/core/lib/channel/http_client_filter.c +++ b/src/core/lib/channel/http_client_filter.c @@ -250,7 +250,7 @@ const grpc_channel_filter grpc_http_client_filter = { grpc_channel_next_op, sizeof(call_data), init_call_elem, - grpc_call_stack_ignore_set_pollset, + grpc_call_stack_ignore_set_pollset_or_pollset_set, destroy_call_elem, sizeof(channel_data), init_channel_elem, diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index c140c61b8f3..24af184696e 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -239,7 +239,7 @@ const grpc_channel_filter grpc_http_server_filter = { grpc_channel_next_op, sizeof(call_data), init_call_elem, - grpc_call_stack_ignore_set_pollset, + grpc_call_stack_ignore_set_pollset_or_pollset_set, destroy_call_elem, sizeof(channel_data), init_channel_elem, diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index 76bd1b64dc9..9a7a00a2beb 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -62,7 +62,7 @@ typedef struct { grpc_httpcli_response_cb on_response; void *user_data; grpc_httpcli_context *context; - grpc_pollset *pollset; + grpc_pollset_set *pollset_set; grpc_iomgr_object iomgr_obj; gpr_slice_buffer incoming; gpr_slice_buffer outgoing; @@ -97,8 +97,8 @@ static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req); static void finish(grpc_exec_ctx *exec_ctx, internal_request *req, int success) { - grpc_pollset_set_del_pollset(exec_ctx, req->context->pollset_set, - req->pollset); + grpc_pollset_set_del_pollset_set(exec_ctx, req->context->pollset_set, + req->pollset_set); req->on_response(exec_ctx, req->user_data, success ? &req->parser.http.response : NULL); grpc_http_parser_destroy(&req->parser); @@ -222,7 +222,7 @@ static void on_resolved(grpc_exec_ctx *exec_ctx, void *arg, static void internal_request_begin( grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, - grpc_pollset *pollset, const grpc_httpcli_request *request, + grpc_pollset_set *pollset_set, const grpc_httpcli_request *request, gpr_timespec deadline, grpc_httpcli_response_cb on_response, void *user_data, const char *name, gpr_slice request_text) { internal_request *req = gpr_malloc(sizeof(internal_request)); @@ -235,7 +235,7 @@ static void internal_request_begin( req->handshaker = request->handshaker ? request->handshaker : &grpc_httpcli_plaintext; req->context = context; - req->pollset = pollset; + req->pollset_set = pollset_set; grpc_closure_init(&req->on_read, on_read, req); grpc_closure_init(&req->done_write, done_write, req); gpr_slice_buffer_init(&req->incoming); @@ -244,14 +244,14 @@ static void internal_request_begin( req->host = gpr_strdup(request->host); req->ssl_host_override = gpr_strdup(request->ssl_host_override); - grpc_pollset_set_add_pollset(exec_ctx, req->context->pollset_set, - req->pollset); + grpc_pollset_set_add_pollset_set(exec_ctx, req->context->pollset_set, + req->pollset_set); grpc_resolve_address(request->host, req->handshaker->default_port, on_resolved, req); } void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, - grpc_pollset *pollset, + grpc_pollset_set *pollset_set, const grpc_httpcli_request *request, gpr_timespec deadline, grpc_httpcli_response_cb on_response, void *user_data) { @@ -261,14 +261,14 @@ void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, return; } gpr_asprintf(&name, "HTTP:GET:%s:%s", request->host, request->http.path); - internal_request_begin(exec_ctx, context, pollset, request, deadline, + internal_request_begin(exec_ctx, context, pollset_set, request, deadline, on_response, user_data, name, grpc_httpcli_format_get_request(request)); gpr_free(name); } void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, - grpc_pollset *pollset, + grpc_pollset_set *pollset_set, const grpc_httpcli_request *request, const char *body_bytes, size_t body_size, gpr_timespec deadline, @@ -281,7 +281,7 @@ void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, } gpr_asprintf(&name, "HTTP:POST:%s:%s", request->host, request->http.path); internal_request_begin( - exec_ctx, context, pollset, request, deadline, on_response, user_data, + exec_ctx, context, pollset_set, request, deadline, on_response, user_data, name, grpc_httpcli_format_post_request(request, body_bytes, body_size)); gpr_free(name); } diff --git a/src/core/lib/http/httpcli.h b/src/core/lib/http/httpcli.h index 11a32a125c8..040b5f47613 100644 --- a/src/core/lib/http/httpcli.h +++ b/src/core/lib/http/httpcli.h @@ -100,7 +100,7 @@ void grpc_httpcli_context_destroy(grpc_httpcli_context *context); 'on_response' is a callback to report results to (and 'user_data' is a user supplied pointer to pass to said call) */ void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, - grpc_pollset *pollset, + grpc_pollset_set *pollset_set, const grpc_httpcli_request *request, gpr_timespec deadline, grpc_httpcli_response_cb on_response, void *user_data); @@ -121,7 +121,7 @@ void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, supplied pointer to pass to said call) Does not support ?var1=val1&var2=val2 in the path. */ void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, - grpc_pollset *pollset, + grpc_pollset_set *pollset_set, const grpc_httpcli_request *request, const char *body_bytes, size_t body_size, gpr_timespec deadline, diff --git a/src/core/lib/security/client_auth_filter.c b/src/core/lib/security/client_auth_filter.c index 943b1da85c6..6cdbaae4921 100644 --- a/src/core/lib/security/client_auth_filter.c +++ b/src/core/lib/security/client_auth_filter.c @@ -54,11 +54,11 @@ typedef struct { grpc_call_credentials *creds; grpc_mdstr *host; grpc_mdstr *method; - /* pollset bound to this call; if we need to make external - network requests, they should be done under this pollset - so that work can progress when this call wants work to - progress */ - grpc_pollset *pollset; + /* pollset_set bound to this call; if we need to make external + network requests, they should be done under a pollset added to this + pollset_set so that work can progress when this call wants work to progress + */ + grpc_pollset_set *pollset_set; grpc_transport_stream_op op; uint8_t security_context_set; grpc_linked_mdelem md_links[MAX_CREDENTIALS_METADATA_COUNT]; @@ -184,9 +184,9 @@ static void send_security_metadata(grpc_exec_ctx *exec_ctx, build_auth_metadata_context(&chand->security_connector->base, chand->auth_context, calld); calld->op = *op; /* Copy op (originates from the caller's stack). */ - GPR_ASSERT(calld->pollset); + GPR_ASSERT(calld->pollset_set); grpc_call_credentials_get_request_metadata( - exec_ctx, calld->creds, calld->pollset, calld->auth_md_context, + exec_ctx, calld->creds, calld->pollset_set, calld->auth_md_context, on_credentials_metadata, elem); } @@ -268,12 +268,23 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) { call_data *calld = elem->call_data; memset(calld, 0, sizeof(*calld)); + calld->pollset_set = grpc_pollset_set_create(); } -static void set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_pollset *pollset) { +static void set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_pollset *pollset, + grpc_pollset_set *or_pollset_set) { + GPR_ASSERT(!(pollset != NULL && or_pollset_set != NULL)); + GPR_ASSERT(pollset != NULL || or_pollset_set != NULL); + call_data *calld = elem->call_data; - calld->pollset = pollset; + if (pollset != NULL) { + grpc_pollset_set_add_pollset(exec_ctx, calld->pollset_set, pollset); + } else if (or_pollset_set != NULL) { + grpc_pollset_set_add_pollset_set(exec_ctx, calld->pollset_set, + or_pollset_set); + } } /* Destructor for call_data */ @@ -288,6 +299,7 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, GRPC_MDSTR_UNREF(calld->method); } reset_auth_metadata_context(&calld->auth_md_context); + grpc_pollset_set_destroy(calld->pollset_set); } /* Constructor for channel_data */ @@ -329,8 +341,14 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, GRPC_AUTH_CONTEXT_UNREF(chand->auth_context, "client_auth_filter"); } -const grpc_channel_filter grpc_client_auth_filter = { - auth_start_transport_op, grpc_channel_next_op, sizeof(call_data), - init_call_elem, set_pollset, destroy_call_elem, - sizeof(channel_data), init_channel_elem, destroy_channel_elem, - grpc_call_next_get_peer, "client-auth"}; +const grpc_channel_filter grpc_client_auth_filter = {auth_start_transport_op, + grpc_channel_next_op, + sizeof(call_data), + init_call_elem, + set_pollset_or_pollset_set, + destroy_call_elem, + sizeof(channel_data), + init_channel_elem, + destroy_channel_elem, + grpc_call_next_get_peer, + "client-auth"}; diff --git a/src/core/lib/security/credentials.c b/src/core/lib/security/credentials.c index 2c7d31519c7..4471a16e490 100644 --- a/src/core/lib/security/credentials.c +++ b/src/core/lib/security/credentials.c @@ -118,7 +118,7 @@ void grpc_call_credentials_release(grpc_call_credentials *creds) { void grpc_call_credentials_get_request_metadata( grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset *pollset, grpc_auth_metadata_context context, + grpc_pollset_set *pollset_set, grpc_auth_metadata_context context, grpc_credentials_metadata_cb cb, void *user_data) { if (creds == NULL || creds->vtable->get_request_metadata == NULL) { if (cb != NULL) { @@ -126,7 +126,7 @@ void grpc_call_credentials_get_request_metadata( } return; } - creds->vtable->get_request_metadata(exec_ctx, creds, pollset, context, cb, + creds->vtable->get_request_metadata(exec_ctx, creds, pollset_set, context, cb, user_data); } @@ -433,7 +433,7 @@ static void jwt_destruct(grpc_call_credentials *creds) { static void jwt_get_request_metadata(grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset *pollset, + grpc_pollset_set *pollset_set, grpc_auth_metadata_context context, grpc_credentials_metadata_cb cb, void *user_data) { @@ -656,7 +656,7 @@ static void on_oauth2_token_fetcher_http_response( static void oauth2_token_fetcher_get_request_metadata( grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset *pollset, grpc_auth_metadata_context context, + grpc_pollset_set *pollset_set, grpc_auth_metadata_context context, grpc_credentials_metadata_cb cb, void *user_data) { grpc_oauth2_token_fetcher_credentials *c = (grpc_oauth2_token_fetcher_credentials *)creds; @@ -682,7 +682,7 @@ static void oauth2_token_fetcher_get_request_metadata( c->fetch_func( exec_ctx, grpc_credentials_metadata_request_create(creds, cb, user_data), - &c->httpcli_context, pollset, on_oauth2_token_fetcher_http_response, + &c->httpcli_context, pollset_set, on_oauth2_token_fetcher_http_response, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), refresh_threshold)); } } @@ -705,7 +705,7 @@ static grpc_call_credentials_vtable compute_engine_vtable = { static void compute_engine_fetch_oauth2( grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *metadata_req, - grpc_httpcli_context *httpcli_context, grpc_pollset *pollset, + grpc_httpcli_context *httpcli_context, grpc_pollset_set *pollset_set, grpc_httpcli_response_cb response_cb, gpr_timespec deadline) { grpc_http_header header = {"Metadata-Flavor", "Google"}; grpc_httpcli_request request; @@ -714,7 +714,7 @@ static void compute_engine_fetch_oauth2( request.http.path = GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH; request.http.hdr_count = 1; request.http.hdrs = &header; - grpc_httpcli_get(exec_ctx, httpcli_context, pollset, &request, deadline, + grpc_httpcli_get(exec_ctx, httpcli_context, pollset_set, &request, deadline, response_cb, metadata_req); } @@ -744,7 +744,7 @@ static grpc_call_credentials_vtable refresh_token_vtable = { static void refresh_token_fetch_oauth2( grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *metadata_req, - grpc_httpcli_context *httpcli_context, grpc_pollset *pollset, + grpc_httpcli_context *httpcli_context, grpc_pollset_set *pollset_set, grpc_httpcli_response_cb response_cb, gpr_timespec deadline) { grpc_google_refresh_token_credentials *c = (grpc_google_refresh_token_credentials *)metadata_req->creds; @@ -761,7 +761,7 @@ static void refresh_token_fetch_oauth2( request.http.hdr_count = 1; request.http.hdrs = &header; request.handshaker = &grpc_httpcli_ssl; - grpc_httpcli_post(exec_ctx, httpcli_context, pollset, &request, body, + grpc_httpcli_post(exec_ctx, httpcli_context, pollset_set, &request, body, strlen(body), deadline, response_cb, metadata_req); gpr_free(body); } @@ -812,7 +812,7 @@ static void on_simulated_token_fetch_done(grpc_exec_ctx *exec_ctx, static void md_only_test_get_request_metadata( grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset *pollset, grpc_auth_metadata_context context, + grpc_pollset_set *pollset_set, grpc_auth_metadata_context context, grpc_credentials_metadata_cb cb, void *user_data) { grpc_md_only_test_credentials *c = (grpc_md_only_test_credentials *)creds; @@ -852,7 +852,7 @@ static void access_token_destruct(grpc_call_credentials *creds) { static void access_token_get_request_metadata( grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset *pollset, grpc_auth_metadata_context context, + grpc_pollset_set *pollset_set, grpc_auth_metadata_context context, grpc_credentials_metadata_cb cb, void *user_data) { grpc_access_token_credentials *c = (grpc_access_token_credentials *)creds; cb(exec_ctx, user_data, c->access_token_md->entries, 1, GRPC_CREDENTIALS_OK); @@ -936,7 +936,7 @@ typedef struct { grpc_credentials_md_store *md_elems; grpc_auth_metadata_context auth_md_context; void *user_data; - grpc_pollset *pollset; + grpc_pollset_set *pollset_set; grpc_credentials_metadata_cb cb; } grpc_composite_call_credentials_metadata_context; @@ -980,7 +980,7 @@ static void composite_call_metadata_cb(grpc_exec_ctx *exec_ctx, void *user_data, grpc_call_credentials *inner_creds = ctx->composite_creds->inner.creds_array[ctx->creds_index++]; grpc_call_credentials_get_request_metadata( - exec_ctx, inner_creds, ctx->pollset, ctx->auth_md_context, + exec_ctx, inner_creds, ctx->pollset_set, ctx->auth_md_context, composite_call_metadata_cb, ctx); return; } @@ -993,7 +993,7 @@ static void composite_call_metadata_cb(grpc_exec_ctx *exec_ctx, void *user_data, static void composite_call_get_request_metadata( grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset *pollset, grpc_auth_metadata_context auth_md_context, + grpc_pollset_set *pollset_set, grpc_auth_metadata_context auth_md_context, grpc_credentials_metadata_cb cb, void *user_data) { grpc_composite_call_credentials *c = (grpc_composite_call_credentials *)creds; grpc_composite_call_credentials_metadata_context *ctx; @@ -1004,10 +1004,10 @@ static void composite_call_get_request_metadata( ctx->user_data = user_data; ctx->cb = cb; ctx->composite_creds = c; - ctx->pollset = pollset; + ctx->pollset_set = pollset_set; ctx->md_elems = grpc_credentials_md_store_create(c->inner.num_creds); grpc_call_credentials_get_request_metadata( - exec_ctx, c->inner.creds_array[ctx->creds_index++], pollset, + exec_ctx, c->inner.creds_array[ctx->creds_index++], pollset_set, auth_md_context, composite_call_metadata_cb, ctx); } @@ -1101,7 +1101,7 @@ static void iam_destruct(grpc_call_credentials *creds) { static void iam_get_request_metadata(grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset *pollset, + grpc_pollset_set *pollset_set, grpc_auth_metadata_context context, grpc_credentials_metadata_cb cb, void *user_data) { @@ -1190,7 +1190,7 @@ static void plugin_md_request_metadata_ready(void *request, static void plugin_get_request_metadata(grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset *pollset, + grpc_pollset_set *pollset_set, grpc_auth_metadata_context context, grpc_credentials_metadata_cb cb, void *user_data) { diff --git a/src/core/lib/security/credentials.h b/src/core/lib/security/credentials.h index 0373ceaa3fc..9512e8e028e 100644 --- a/src/core/lib/security/credentials.h +++ b/src/core/lib/security/credentials.h @@ -169,7 +169,8 @@ typedef void (*grpc_credentials_metadata_cb)(grpc_exec_ctx *exec_ctx, typedef struct { void (*destruct)(grpc_call_credentials *c); void (*get_request_metadata)(grpc_exec_ctx *exec_ctx, - grpc_call_credentials *c, grpc_pollset *pollset, + grpc_call_credentials *c, + grpc_pollset_set *pollset_set, grpc_auth_metadata_context context, grpc_credentials_metadata_cb cb, void *user_data); @@ -185,7 +186,7 @@ grpc_call_credentials *grpc_call_credentials_ref(grpc_call_credentials *creds); void grpc_call_credentials_unref(grpc_call_credentials *creds); void grpc_call_credentials_get_request_metadata( grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset *pollset, grpc_auth_metadata_context context, + grpc_pollset_set *pollset_set, grpc_auth_metadata_context context, grpc_credentials_metadata_cb cb, void *user_data); typedef struct { @@ -317,7 +318,7 @@ typedef struct grpc_credentials_metadata_request typedef void (*grpc_fetch_oauth2_func)(grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *req, grpc_httpcli_context *http_context, - grpc_pollset *pollset, + grpc_pollset_set *pollset_set, grpc_httpcli_response_cb response_cb, gpr_timespec deadline); diff --git a/src/core/lib/security/google_default_credentials.c b/src/core/lib/security/google_default_credentials.c index 236f1d7fa7e..d831a986b27 100644 --- a/src/core/lib/security/google_default_credentials.c +++ b/src/core/lib/security/google_default_credentials.c @@ -61,6 +61,7 @@ static void init_default_credentials(void) { gpr_mu_init(&g_state_mu); } typedef struct { grpc_pollset *pollset; + grpc_pollset_set *pollset_set; int is_done; int success; } compute_engine_detector; @@ -105,6 +106,9 @@ static int is_stack_running_on_compute_engine(void) { detector.pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(detector.pollset, &g_polling_mu); + detector.pollset_set = grpc_pollset_set_create(); + grpc_pollset_set_add_pollset(&exec_ctx, detector.pollset_set, + detector.pollset); detector.is_done = 0; detector.success = 0; @@ -115,7 +119,7 @@ static int is_stack_running_on_compute_engine(void) { grpc_httpcli_context_init(&context); grpc_httpcli_get( - &exec_ctx, &context, detector.pollset, &request, + &exec_ctx, &context, detector.pollset_set, &request, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), max_detection_delay), on_compute_engine_detection_http_response, &detector); @@ -135,6 +139,7 @@ static int is_stack_running_on_compute_engine(void) { grpc_httpcli_context_destroy(&context); grpc_closure_init(&destroy_closure, destroy_pollset, detector.pollset); grpc_pollset_shutdown(&exec_ctx, detector.pollset, &destroy_closure); + grpc_pollset_set_destroy(detector.pollset_set); grpc_exec_ctx_finish(&exec_ctx); g_polling_mu = NULL; diff --git a/src/core/lib/security/jwt_verifier.c b/src/core/lib/security/jwt_verifier.c index 0e012294de7..f764596aa9e 100644 --- a/src/core/lib/security/jwt_verifier.c +++ b/src/core/lib/security/jwt_verifier.c @@ -321,7 +321,7 @@ grpc_jwt_verifier_status grpc_jwt_claims_check(const grpc_jwt_claims *claims, typedef struct { grpc_jwt_verifier *verifier; - grpc_pollset *pollset; + grpc_pollset_set *pollset_set; jose_header *header; grpc_jwt_claims *claims; char *audience; @@ -337,10 +337,12 @@ static verifier_cb_ctx *verifier_cb_ctx_create( grpc_jwt_claims *claims, const char *audience, gpr_slice signature, const char *signed_jwt, size_t signed_jwt_len, void *user_data, grpc_jwt_verification_done_cb cb) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; verifier_cb_ctx *ctx = gpr_malloc(sizeof(verifier_cb_ctx)); memset(ctx, 0, sizeof(verifier_cb_ctx)); ctx->verifier = verifier; - ctx->pollset = pollset; + ctx->pollset_set = grpc_pollset_set_create(); + grpc_pollset_set_add_pollset(&exec_ctx, ctx->pollset_set, pollset); ctx->header = header; ctx->audience = gpr_strdup(audience); ctx->claims = claims; @@ -348,6 +350,7 @@ static verifier_cb_ctx *verifier_cb_ctx_create( ctx->signed_data = gpr_slice_from_copied_buffer(signed_jwt, signed_jwt_len); ctx->user_data = user_data; ctx->user_cb = cb; + grpc_exec_ctx_finish(&exec_ctx); return ctx; } @@ -357,6 +360,7 @@ void verifier_cb_ctx_destroy(verifier_cb_ctx *ctx) { gpr_slice_unref(ctx->signature); gpr_slice_unref(ctx->signed_data); jose_header_destroy(ctx->header); + grpc_pollset_set_destroy(ctx->pollset_set); /* TODO: see what to do with claims... */ gpr_free(ctx); } @@ -642,7 +646,7 @@ static void on_openid_config_retrieved(grpc_exec_ctx *exec_ctx, void *user_data, *(req.host + (req.http.path - jwks_uri)) = '\0'; } grpc_httpcli_get( - exec_ctx, &ctx->verifier->http_ctx, ctx->pollset, &req, + exec_ctx, &ctx->verifier->http_ctx, ctx->pollset_set, &req, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay), on_keys_retrieved, ctx); grpc_json_destroy(json); @@ -745,7 +749,7 @@ static void retrieve_key_and_verify(grpc_exec_ctx *exec_ctx, } grpc_httpcli_get( - exec_ctx, &ctx->verifier->http_ctx, ctx->pollset, &req, + exec_ctx, &ctx->verifier->http_ctx, ctx->pollset_set, &req, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay), http_cb, ctx); gpr_free(req.host); diff --git a/src/core/lib/security/server_auth_filter.c b/src/core/lib/security/server_auth_filter.c index 7844dc87cb5..99a428f3426 100644 --- a/src/core/lib/security/server_auth_filter.c +++ b/src/core/lib/security/server_auth_filter.c @@ -220,9 +220,6 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_server_security_context_destroy; } -static void set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_pollset *pollset) {} - /* Destructor for call_data */ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) {} @@ -258,7 +255,14 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, } const grpc_channel_filter grpc_server_auth_filter = { - auth_start_transport_op, grpc_channel_next_op, sizeof(call_data), - init_call_elem, set_pollset, destroy_call_elem, - sizeof(channel_data), init_channel_elem, destroy_channel_elem, - grpc_call_next_get_peer, "server-auth"}; + auth_start_transport_op, + grpc_channel_next_op, + sizeof(call_data), + init_call_elem, + grpc_call_stack_ignore_set_pollset_or_pollset_set, + destroy_call_elem, + sizeof(channel_data), + init_channel_elem, + destroy_channel_elem, + grpc_call_next_get_peer, + "server-auth"}; diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 6581bbd3d1d..d2935bedc19 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -135,6 +135,7 @@ typedef struct batch_control { struct grpc_call { grpc_completion_queue *cq; + grpc_pollset_set *pollset_set; grpc_channel *channel; grpc_call *parent; grpc_call *first_child; @@ -245,13 +246,11 @@ static void destroy_call(grpc_exec_ctx *exec_ctx, void *call_stack, static void receiving_slice_ready(grpc_exec_ctx *exec_ctx, void *bctlp, bool success); -grpc_call *grpc_call_create(grpc_channel *channel, grpc_call *parent_call, - uint32_t propagation_mask, - grpc_completion_queue *cq, - const void *server_transport_data, - grpc_mdelem **add_initial_metadata, - size_t add_initial_metadata_count, - gpr_timespec send_deadline) { +grpc_call *grpc_call_create( + grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, + grpc_completion_queue *cq, grpc_pollset_set *or_pollset_set, + const void *server_transport_data, grpc_mdelem **add_initial_metadata, + size_t add_initial_metadata_count, gpr_timespec send_deadline) { size_t i, j; grpc_channel_stack *channel_stack = grpc_channel_get_channel_stack(channel); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -262,6 +261,12 @@ grpc_call *grpc_call_create(grpc_channel *channel, grpc_call *parent_call, gpr_mu_init(&call->mu); call->channel = channel; call->cq = cq; + if (cq != NULL && or_pollset_set != NULL) { + gpr_log(GPR_ERROR, + "Only one of 'cq' and 'or_pollset_set' should be non-NULL."); + abort(); + } + call->pollset_set = or_pollset_set; call->parent = parent_call; call->is_client = server_transport_data == NULL; if (call->is_client) { @@ -287,8 +292,13 @@ grpc_call *grpc_call_create(grpc_channel *channel, grpc_call *parent_call, CALL_STACK_FROM_CALL(call)); if (cq != NULL) { GRPC_CQ_INTERNAL_REF(cq, "bind"); - grpc_call_stack_set_pollset(&exec_ctx, CALL_STACK_FROM_CALL(call), - grpc_cq_pollset(cq)); + grpc_call_stack_set_pollset_or_pollset_set( + &exec_ctx, CALL_STACK_FROM_CALL(call), grpc_cq_pollset(cq), NULL); + } + if (or_pollset_set != NULL) { + GPR_ASSERT(cq == NULL); + grpc_call_stack_set_pollset_or_pollset_set( + &exec_ctx, CALL_STACK_FROM_CALL(call), NULL, or_pollset_set); } if (parent_call != NULL) { GRPC_CALL_INTERNAL_REF(parent_call, "child"); @@ -343,10 +353,11 @@ grpc_call *grpc_call_create(grpc_channel *channel, grpc_call *parent_call, void grpc_call_set_completion_queue(grpc_exec_ctx *exec_ctx, grpc_call *call, grpc_completion_queue *cq) { GPR_ASSERT(cq); + GPR_ASSERT(call->pollset_set == NULL); call->cq = cq; GRPC_CQ_INTERNAL_REF(cq, "bind"); - grpc_call_stack_set_pollset(exec_ctx, CALL_STACK_FROM_CALL(call), - grpc_cq_pollset(cq)); + grpc_call_stack_set_pollset_or_pollset_set( + exec_ctx, CALL_STACK_FROM_CALL(call), grpc_cq_pollset(cq), NULL); } #ifdef GRPC_STREAM_REFCOUNT_DEBUG diff --git a/src/core/lib/surface/call.h b/src/core/lib/surface/call.h index 2725e060b86..ba72a0ad3bb 100644 --- a/src/core/lib/surface/call.h +++ b/src/core/lib/surface/call.h @@ -53,6 +53,8 @@ typedef void (*grpc_ioreq_completion_func)(grpc_exec_ctx *exec_ctx, grpc_call *grpc_call_create(grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, grpc_completion_queue *cq, + /* if not NULL, it'll be used in lieu of \a cq */ + grpc_pollset_set *or_pollset_set, const void *server_transport_data, grpc_mdelem **add_initial_metadata, size_t add_initial_metadata_count, diff --git a/src/core/lib/surface/channel.c b/src/core/lib/surface/channel.c index b6b760b5d8d..7e8959b7425 100644 --- a/src/core/lib/surface/channel.c +++ b/src/core/lib/surface/channel.c @@ -166,12 +166,14 @@ char *grpc_channel_get_target(grpc_channel *channel) { static grpc_call *grpc_channel_create_call_internal( grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, - grpc_completion_queue *cq, grpc_mdelem *path_mdelem, - grpc_mdelem *authority_mdelem, gpr_timespec deadline) { + grpc_completion_queue *cq, grpc_pollset_set *or_pollset_set, + grpc_mdelem *path_mdelem, grpc_mdelem *authority_mdelem, + gpr_timespec deadline) { grpc_mdelem *send_metadata[2]; size_t num_metadata = 0; GPR_ASSERT(channel->is_client); + GPR_ASSERT(!(cq != NULL && or_pollset_set != NULL)); send_metadata[num_metadata++] = path_mdelem; if (authority_mdelem != NULL) { @@ -180,8 +182,9 @@ static grpc_call *grpc_channel_create_call_internal( send_metadata[num_metadata++] = GRPC_MDELEM_REF(channel->default_authority); } - return grpc_call_create(channel, parent_call, propagation_mask, cq, NULL, - send_metadata, num_metadata, deadline); + return grpc_call_create(channel, parent_call, propagation_mask, cq, + or_pollset_set, NULL, send_metadata, num_metadata, + deadline); } grpc_call *grpc_channel_create_call(grpc_channel *channel, @@ -201,7 +204,22 @@ grpc_call *grpc_channel_create_call(grpc_channel *channel, (int)deadline.clock_type, reserved)); GPR_ASSERT(!reserved); return grpc_channel_create_call_internal( - channel, parent_call, propagation_mask, cq, + channel, parent_call, propagation_mask, cq, NULL, + grpc_mdelem_from_metadata_strings(GRPC_MDSTR_PATH, + grpc_mdstr_from_string(method)), + host ? grpc_mdelem_from_metadata_strings(GRPC_MDSTR_AUTHORITY, + grpc_mdstr_from_string(host)) + : NULL, + deadline); +} + +grpc_call *grpc_channel_create_pollset_set_call( + grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, + grpc_pollset_set *pollset_set, const char *method, const char *host, + gpr_timespec deadline, void *reserved) { + GPR_ASSERT(!reserved); + return grpc_channel_create_call_internal( + channel, parent_call, propagation_mask, NULL, pollset_set, grpc_mdelem_from_metadata_strings(GRPC_MDSTR_PATH, grpc_mdstr_from_string(method)), host ? grpc_mdelem_from_metadata_strings(GRPC_MDSTR_AUTHORITY, @@ -245,7 +263,7 @@ grpc_call *grpc_channel_create_registered_call( (int)deadline.tv_nsec, (int)deadline.clock_type, reserved)); GPR_ASSERT(!reserved); return grpc_channel_create_call_internal( - channel, parent_call, propagation_mask, completion_queue, + channel, parent_call, propagation_mask, completion_queue, NULL, GRPC_MDELEM_REF(rc->path), rc->authority ? GRPC_MDELEM_REF(rc->authority) : NULL, deadline); } diff --git a/src/core/lib/surface/channel.h b/src/core/lib/surface/channel.h index 22dae930e4c..ff3debc31f2 100644 --- a/src/core/lib/surface/channel.h +++ b/src/core/lib/surface/channel.h @@ -42,6 +42,11 @@ grpc_channel *grpc_channel_create(grpc_exec_ctx *exec_ctx, const char *target, grpc_channel_stack_type channel_stack_type, grpc_transport *optional_transport); +grpc_call *grpc_channel_create_pollset_set_call( + grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, + grpc_pollset_set *pollset_set, const char *method, const char *host, + gpr_timespec deadline, void *reserved); + /** Get a (borrowed) pointer to this channels underlying channel stack */ grpc_channel_stack *grpc_channel_get_channel_stack(grpc_channel *channel); diff --git a/src/core/lib/surface/lame_client.c b/src/core/lib/surface/lame_client.c index c1f6812c4e1..99a880fbfc4 100644 --- a/src/core/lib/surface/lame_client.c +++ b/src/core/lib/surface/lame_client.c @@ -122,7 +122,7 @@ const grpc_channel_filter grpc_lame_filter = { lame_start_transport_op, sizeof(call_data), init_call_elem, - grpc_call_stack_ignore_set_pollset, + grpc_call_stack_ignore_set_pollset_or_pollset_set, destroy_call_elem, sizeof(channel_data), init_channel_elem, diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index ad8ee8c7a99..aff01f8ae49 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -769,9 +769,9 @@ static void accept_stream(grpc_exec_ctx *exec_ctx, void *cd, const void *transport_server_data) { channel_data *chand = cd; /* create a call */ - grpc_call *call = - grpc_call_create(chand->channel, NULL, 0, NULL, transport_server_data, - NULL, 0, gpr_inf_future(GPR_CLOCK_MONOTONIC)); + grpc_call *call = grpc_call_create(chand->channel, NULL, 0, NULL, NULL, + transport_server_data, NULL, 0, + gpr_inf_future(GPR_CLOCK_MONOTONIC)); grpc_call_element *elem = grpc_call_stack_element(grpc_call_get_call_stack(call), 0); call_data *calld = elem->call_data; @@ -886,7 +886,7 @@ const grpc_channel_filter grpc_server_top_filter = { grpc_channel_next_op, sizeof(call_data), init_call_elem, - grpc_call_stack_ignore_set_pollset, + grpc_call_stack_ignore_set_pollset_or_pollset_set, destroy_call_elem, sizeof(channel_data), init_channel_elem, diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c index 53c634adca6..7f2ae5f52e8 100644 --- a/src/core/lib/transport/transport.c +++ b/src/core/lib/transport/transport.c @@ -131,6 +131,13 @@ void grpc_transport_set_pollset(grpc_exec_ctx *exec_ctx, transport->vtable->set_pollset(exec_ctx, transport, stream, pollset); } +void grpc_transport_set_pollset_set(grpc_exec_ctx *exec_ctx, + grpc_transport *transport, + grpc_stream *stream, + grpc_pollset_set *pollset_set) { + transport->vtable->set_pollset_set(exec_ctx, transport, stream, pollset_set); +} + void grpc_transport_destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *transport, grpc_stream *stream) { diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index 1eb446312bf..8f0c2d9023a 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -201,6 +201,11 @@ void grpc_transport_set_pollset(grpc_exec_ctx *exec_ctx, grpc_transport *transport, grpc_stream *stream, grpc_pollset *pollset); +void grpc_transport_set_pollset_set(grpc_exec_ctx *exec_ctx, + grpc_transport *transport, + grpc_stream *stream, + grpc_pollset_set *pollset_set); + /* Destroy transport data for a stream. Requires: a recv_batch with final_state == GRPC_STREAM_CLOSED has been diff --git a/src/core/lib/transport/transport_impl.h b/src/core/lib/transport/transport_impl.h index 2ff67073aff..78fac88e4f2 100644 --- a/src/core/lib/transport/transport_impl.h +++ b/src/core/lib/transport/transport_impl.h @@ -53,6 +53,10 @@ typedef struct grpc_transport_vtable { void (*set_pollset)(grpc_exec_ctx *exec_ctx, grpc_transport *self, grpc_stream *stream, grpc_pollset *pollset); + /* implementation of grpc_transport_set_pollset */ + void (*set_pollset_set)(grpc_exec_ctx *exec_ctx, grpc_transport *self, + grpc_stream *stream, grpc_pollset_set *pollset_set); + /* implementation of grpc_transport_perform_stream_op */ void (*perform_stream_op)(grpc_exec_ctx *exec_ctx, grpc_transport *self, grpc_stream *stream, grpc_transport_stream_op *op); diff --git a/test/core/channel/channel_stack_test.c b/test/core/channel/channel_stack_test.c index 81e3927a006..34180ed2796 100644 --- a/test/core/channel/channel_stack_test.c +++ b/test/core/channel/channel_stack_test.c @@ -92,17 +92,18 @@ static void free_call(grpc_exec_ctx *exec_ctx, void *arg, bool success) { } static void test_create_channel_stack(void) { - const grpc_channel_filter filter = {call_func, - channel_func, - sizeof(int), - call_init_func, - grpc_call_stack_ignore_set_pollset, - call_destroy_func, - sizeof(int), - channel_init_func, - channel_destroy_func, - get_peer, - "some_test_filter"}; + const grpc_channel_filter filter = { + call_func, + channel_func, + sizeof(int), + call_init_func, + grpc_call_stack_ignore_set_pollset_or_pollset_set, + call_destroy_func, + sizeof(int), + channel_init_func, + channel_destroy_func, + get_peer, + "some_test_filter"}; const grpc_channel_filter *filters = &filter; grpc_channel_stack *channel_stack; grpc_call_stack *call_stack; diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c index e74d3239de9..002ddf77ec9 100644 --- a/test/core/end2end/tests/filter_causes_close.c +++ b/test/core/end2end/tests/filter_causes_close.c @@ -250,7 +250,7 @@ static const grpc_channel_filter test_filter = { grpc_channel_next_op, sizeof(call_data), init_call_elem, - grpc_call_stack_ignore_set_pollset, + grpc_call_stack_ignore_set_pollset_or_pollset_set, destroy_call_elem, sizeof(channel_data), init_channel_elem, diff --git a/test/core/http/httpcli_test.c b/test/core/http/httpcli_test.c index d3a68d0eb87..36e43b8de87 100644 --- a/test/core/http/httpcli_test.c +++ b/test/core/http/httpcli_test.c @@ -49,6 +49,7 @@ static int g_done = 0; static grpc_httpcli_context g_context; static gpr_mu *g_mu; static grpc_pollset *g_pollset; +static grpc_pollset_set *g_pollset_set; static gpr_timespec n_seconds_time(int seconds) { return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(seconds); @@ -86,8 +87,8 @@ static void test_get(int port) { req.http.path = "/get"; req.handshaker = &grpc_httpcli_plaintext; - grpc_httpcli_get(&exec_ctx, &g_context, g_pollset, &req, n_seconds_time(15), - on_finish, (void *)42); + grpc_httpcli_get(&exec_ctx, &g_context, g_pollset_set, &req, + n_seconds_time(15), on_finish, (void *)42); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; @@ -117,7 +118,7 @@ static void test_post(int port) { req.http.path = "/post"; req.handshaker = &grpc_httpcli_plaintext; - grpc_httpcli_post(&exec_ctx, &g_context, g_pollset, &req, "hello", 5, + grpc_httpcli_post(&exec_ctx, &g_context, g_pollset_set, &req, "hello", 5, n_seconds_time(15), on_finish, (void *)42); gpr_mu_lock(g_mu); while (!g_done) { @@ -182,6 +183,8 @@ int main(int argc, char **argv) { grpc_httpcli_context_init(&g_context); g_pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(g_pollset, &g_mu); + g_pollset_set = grpc_pollset_set_create(); + grpc_pollset_set_add_pollset(&exec_ctx, g_pollset_set, g_pollset); test_get(port); test_post(port); diff --git a/test/core/http/httpscli_test.c b/test/core/http/httpscli_test.c index d8073369046..1aeaf2cf10f 100644 --- a/test/core/http/httpscli_test.c +++ b/test/core/http/httpscli_test.c @@ -49,6 +49,7 @@ static int g_done = 0; static grpc_httpcli_context g_context; static gpr_mu *g_mu; static grpc_pollset *g_pollset; +static grpc_pollset_set *g_pollset_set; static gpr_timespec n_seconds_time(int seconds) { return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(seconds); @@ -87,8 +88,8 @@ static void test_get(int port) { req.http.path = "/get"; req.handshaker = &grpc_httpcli_ssl; - grpc_httpcli_get(&exec_ctx, &g_context, g_pollset, &req, n_seconds_time(15), - on_finish, (void *)42); + grpc_httpcli_get(&exec_ctx, &g_context, g_pollset_set, &req, + n_seconds_time(15), on_finish, (void *)42); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; @@ -119,7 +120,7 @@ static void test_post(int port) { req.http.path = "/post"; req.handshaker = &grpc_httpcli_ssl; - grpc_httpcli_post(&exec_ctx, &g_context, g_pollset, &req, "hello", 5, + grpc_httpcli_post(&exec_ctx, &g_context, g_pollset_set, &req, "hello", 5, n_seconds_time(15), on_finish, (void *)42); gpr_mu_lock(g_mu); while (!g_done) { @@ -185,6 +186,8 @@ int main(int argc, char **argv) { grpc_httpcli_context_init(&g_context); g_pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(g_pollset, &g_mu); + g_pollset_set = grpc_pollset_set_create(); + grpc_pollset_set_add_pollset(&exec_ctx, g_pollset_set, g_pollset); test_get(port); test_post(port); @@ -193,6 +196,7 @@ int main(int argc, char **argv) { grpc_closure_init(&destroyed, destroy_pollset, g_pollset); grpc_pollset_shutdown(&exec_ctx, g_pollset, &destroyed); grpc_exec_ctx_finish(&exec_ctx); + grpc_pollset_set_destroy(g_pollset_set); grpc_shutdown(); gpr_free(g_pollset); diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c index 20815d184cd..94d35026f1c 100644 --- a/test/core/security/oauth2_utils.c +++ b/test/core/security/oauth2_utils.c @@ -47,6 +47,7 @@ typedef struct { gpr_mu *mu; grpc_pollset *pollset; + grpc_pollset_set *pollset_set; int is_done; char *token; } oauth2_request; @@ -85,13 +86,15 @@ char *grpc_test_fetch_oauth2_token_with_credentials( request.pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(request.pollset, &request.mu); + request.pollset_set = grpc_pollset_set_create(); + grpc_pollset_set_add_pollset(&exec_ctx, request.pollset_set, request.pollset); request.is_done = 0; grpc_closure_init(&do_nothing_closure, do_nothing, NULL); - grpc_call_credentials_get_request_metadata(&exec_ctx, creds, request.pollset, - null_ctx, on_oauth2_response, - &request); + grpc_call_credentials_get_request_metadata(&exec_ctx, creds, + request.pollset_set, null_ctx, + on_oauth2_response, &request); grpc_exec_ctx_finish(&exec_ctx); @@ -107,6 +110,7 @@ char *grpc_test_fetch_oauth2_token_with_credentials( grpc_pollset_shutdown(&exec_ctx, request.pollset, &do_nothing_closure); grpc_exec_ctx_finish(&exec_ctx); grpc_pollset_destroy(request.pollset); + grpc_pollset_set_destroy(request.pollset_set); gpr_free(request.pollset); return request.token; } diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c index 99bce4fbdfb..2c292bc80b5 100644 --- a/test/core/security/print_google_default_creds_token.c +++ b/test/core/security/print_google_default_creds_token.c @@ -48,6 +48,7 @@ typedef struct { gpr_mu *mu; grpc_pollset *pollset; + grpc_pollset_set *pollset_set; int is_done; } synchronizer; @@ -95,11 +96,13 @@ int main(int argc, char **argv) { sync.pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(sync.pollset, &sync.mu); + sync.pollset_set = grpc_pollset_set_create(); + grpc_pollset_set_add_pollset(&exec_ctx, sync.pollset_set, sync.pollset); sync.is_done = 0; grpc_call_credentials_get_request_metadata( &exec_ctx, ((grpc_composite_channel_credentials *)creds)->call_creds, - sync.pollset, context, on_metadata_response, &sync); + sync.pollset_set, context, on_metadata_response, &sync); gpr_mu_lock(sync.mu); while (!sync.is_done) { @@ -116,6 +119,7 @@ int main(int argc, char **argv) { grpc_exec_ctx_finish(&exec_ctx); grpc_channel_credentials_release(creds); + grpc_pollset_set_destroy(sync.pollset_set); gpr_free(sync.pollset); end: diff --git a/test/core/util/port_server_client.c b/test/core/util/port_server_client.c index 84e90547aa9..25a14f513e4 100644 --- a/test/core/util/port_server_client.c +++ b/test/core/util/port_server_client.c @@ -52,6 +52,7 @@ typedef struct freereq { gpr_mu *mu; grpc_pollset *pollset; + grpc_pollset_set *pollset_set; int done; } freereq; @@ -86,6 +87,8 @@ void grpc_free_port_using_server(char *server, int port) { pr.pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(pr.pollset, &pr.mu); + pr.pollset_set = grpc_pollset_set_create(); + grpc_pollset_set_add_pollset(&exec_ctx, pr.pollset_set, pr.pollset); shutdown_closure = grpc_closure_create(destroy_pollset_and_shutdown, pr.pollset); @@ -94,7 +97,7 @@ void grpc_free_port_using_server(char *server, int port) { req.http.path = path; grpc_httpcli_context_init(&context); - grpc_httpcli_get(&exec_ctx, &context, pr.pollset, &req, + grpc_httpcli_get(&exec_ctx, &context, pr.pollset_set, &req, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), freed_port_from_server, &pr); gpr_mu_lock(pr.mu); @@ -110,12 +113,14 @@ void grpc_free_port_using_server(char *server, int port) { grpc_exec_ctx_finish(&exec_ctx); grpc_pollset_shutdown(&exec_ctx, pr.pollset, shutdown_closure); grpc_exec_ctx_finish(&exec_ctx); + grpc_pollset_set_destroy(pr.pollset_set); gpr_free(path); } typedef struct portreq { gpr_mu *mu; grpc_pollset *pollset; + grpc_pollset_set *pollset_set; int port; int retries; char *server; @@ -151,7 +156,7 @@ static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, pr->retries++; req.host = pr->server; req.http.path = "/get"; - grpc_httpcli_get(exec_ctx, pr->ctx, pr->pollset, &req, + grpc_httpcli_get(exec_ctx, pr->ctx, pr->pollset_set, &req, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), got_port_from_server, pr); return; @@ -182,6 +187,8 @@ int grpc_pick_port_using_server(char *server) { memset(&req, 0, sizeof(req)); pr.pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(pr.pollset, &pr.mu); + pr.pollset_set = grpc_pollset_set_create(); + grpc_pollset_set_add_pollset(&exec_ctx, pr.pollset_set, pr.pollset); shutdown_closure = grpc_closure_create(destroy_pollset_and_shutdown, pr.pollset); pr.port = -1; @@ -192,7 +199,7 @@ int grpc_pick_port_using_server(char *server) { req.http.path = "/get"; grpc_httpcli_context_init(&context); - grpc_httpcli_get(&exec_ctx, &context, pr.pollset, &req, + grpc_httpcli_get(&exec_ctx, &context, pr.pollset_set, &req, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), got_port_from_server, &pr); grpc_exec_ctx_finish(&exec_ctx); @@ -208,6 +215,7 @@ int grpc_pick_port_using_server(char *server) { grpc_httpcli_context_destroy(&context); grpc_pollset_shutdown(&exec_ctx, pr.pollset, shutdown_closure); grpc_exec_ctx_finish(&exec_ctx); + grpc_pollset_set_destroy(pr.pollset_set); return pr.port; } From e3e6050bf47724f168b7b03b8ee9194c266204fd Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 19 Apr 2016 12:55:24 -0700 Subject: [PATCH 0059/1894] Add a script to generate a gource log for all grpc repos --- tools/gource/gen-all-logs.sh | 47 ++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 tools/gource/gen-all-logs.sh diff --git a/tools/gource/gen-all-logs.sh b/tools/gource/gen-all-logs.sh new file mode 100755 index 00000000000..85352c514e9 --- /dev/null +++ b/tools/gource/gen-all-logs.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -ex + +outdir=`pwd` + +tmpdir=`mktemp -d` +mkdir -p $tmpdir/logs +repos="grpc grpc-common grpc-go grpc-java grpc.github.io grpc-tools homebrew-grpc grpc-docker-library" +for repo in $repos +do + cd $tmpdir + git clone https://github.com/grpc/$repo.git + cd $repo + gource --output-custom-log $tmpdir/logs/$repo + sed -i .backup "s,\|/,\|/$repo/,g" $tmpdir/logs/$repo +done +rm $tmpdir/logs/*.backup +cat $tmpdir/logs/* | sort -n > $outdir/all-logs.txt From c3ec3f55d93e530a2c344812e734c02d49e5e7c0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 19 Apr 2016 13:01:51 -0700 Subject: [PATCH 0060/1894] Clean up output --- tools/gource/gource.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/gource/gource.sh b/tools/gource/gource.sh index fb3598b7bc1..8e658d2737a 100755 --- a/tools/gource/gource.sh +++ b/tools/gource/gource.sh @@ -28,5 +28,4 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -gource --multi-sampling -s 0.1 --max-file-lag 0.05 --max-files 0 -e 0.05 --hide filenames,dirnames $* - +gource --multi-sampling -s 0.1 --max-file-lag 0.05 --max-files 0 -e 0.01 --hide filenames,dirnames $* --disable-auto-rotate --file-filter '/grpc/doc/ref' From b345528e982b3fa3ceb455f23c7270c7f8f3f67a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 19 Apr 2016 13:40:00 -0700 Subject: [PATCH 0061/1894] Make videos --- tools/gource/create_auth_context.h | 42 ++++++++++++++++++++++++++ tools/gource/gource.sh | 11 ++++++- tools/gource/make-video.sh | 47 ++++++++++++++++++++++++++++++ 3 files changed, 99 insertions(+), 1 deletion(-) create mode 100644 tools/gource/create_auth_context.h create mode 100755 tools/gource/make-video.sh diff --git a/tools/gource/create_auth_context.h b/tools/gource/create_auth_context.h new file mode 100644 index 00000000000..387407bfec5 --- /dev/null +++ b/tools/gource/create_auth_context.h @@ -0,0 +1,42 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ +#include + +#include +#include + +namespace grpc { + +std::shared_ptr CreateAuthContext(grpc_call* call); + +} // namespace grpc diff --git a/tools/gource/gource.sh b/tools/gource/gource.sh index 8e658d2737a..b3dad5d7c7a 100755 --- a/tools/gource/gource.sh +++ b/tools/gource/gource.sh @@ -28,4 +28,13 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -gource --multi-sampling -s 0.1 --max-file-lag 0.05 --max-files 0 -e 0.01 --hide filenames,dirnames $* --disable-auto-rotate --file-filter '/grpc/doc/ref' +gource \ + --multi-sampling \ + -s 0.1 \ + --max-file-lag 0.05 \ + --max-files 0 \ + -e 0.01 \ + --hide filenames,dirnames \ + --disable-auto-rotate \ + --file-filter '/grpc/doc/ref' \ + $* diff --git a/tools/gource/make-video.sh b/tools/gource/make-video.sh new file mode 100755 index 00000000000..02d79df81bf --- /dev/null +++ b/tools/gource/make-video.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -ex + +dst=$1 +shift +$(dirname $0)/gource.sh \ + --disable-progress \ + --stop-at-end \ + --output-ppm-stream - \ + $@ | \ +ffmpeg \ + -y \ + -r 60 \ + -f image2pipe \ + -vcodec ppm \ + -i - \ + -vcodec libx264 \ + $dst From f02bada24fc67bc1a6e93108ce466d969a04afd1 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Tue, 19 Apr 2016 14:12:27 -0700 Subject: [PATCH 0062/1894] remove defaut case in grpc_call_error_to_string --- src/core/lib/surface/call.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 8deb3442de4..02bc0193320 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1545,7 +1545,6 @@ const char *grpc_call_error_to_string(grpc_call_error error) { return "GRPC_CALL_ERROR_TOO_MANY_OPERATIONS"; case GRPC_CALL_OK: return "GRPC_CALL_OK"; - default: - return "GRPC_CALL_ERROR_UNKNOW"; } + GPR_UNREACHABLE_CODE(return "GRPC_CALL_ERROR_UNKNOW"); } From e5c485d47d742600a61b2f6ac0bd47bfa762bb5c Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 19 Apr 2016 16:08:03 -0700 Subject: [PATCH 0063/1894] changed value of pollset_set instance for windows to non-null value --- src/core/lib/iomgr/pollset_set_windows.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/lib/iomgr/pollset_set_windows.c b/src/core/lib/iomgr/pollset_set_windows.c index 89f60b92fb8..a35a9766fc0 100644 --- a/src/core/lib/iomgr/pollset_set_windows.c +++ b/src/core/lib/iomgr/pollset_set_windows.c @@ -32,12 +32,15 @@ */ #include +#include #ifdef GPR_WINSOCK_SOCKET #include "src/core/lib/iomgr/pollset_set_windows.h" -grpc_pollset_set* grpc_pollset_set_create(void) { return NULL; } +grpc_pollset_set* grpc_pollset_set_create(void) { + return (grpc_pollset_set*)((intptr_t)0xdeafbeef); +} void grpc_pollset_set_destroy(grpc_pollset_set* pollset_set) {} From 1f5e262589c84c2b5eb9416211bffd1f32998009 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 21 Apr 2016 12:28:09 -0700 Subject: [PATCH 0064/1894] Add the option of adding a non-listening server completion queue. This makes writing certain test cases (like hybrid_end2end tests) easier --- .../grpc++/impl/codegen/completion_queue.h | 11 ++++- include/grpc++/server_builder.h | 10 ++++- include/grpc/grpc.h | 9 ++++ src/core/lib/surface/completion_queue.c | 11 +++++ src/core/lib/surface/completion_queue.h | 2 + src/core/lib/surface/server.c | 44 ++++++++++++++----- src/cpp/server/server_builder.cc | 18 ++++++-- test/cpp/end2end/hybrid_end2end_test.cc | 2 +- 8 files changed, 89 insertions(+), 18 deletions(-) diff --git a/include/grpc++/impl/codegen/completion_queue.h b/include/grpc++/impl/codegen/completion_queue.h index 56864d6d536..d489a90c69c 100644 --- a/include/grpc++/impl/codegen/completion_queue.h +++ b/include/grpc++/impl/codegen/completion_queue.h @@ -222,9 +222,18 @@ class CompletionQueue : private GrpcLibraryCodegen { /// A specific type of completion queue used by the processing of notifications /// by servers. Instantiated by \a ServerBuilder. class ServerCompletionQueue : public CompletionQueue { + public: + bool IsFrequentlyPolled() { return is_frequently_polled_; } + private: + bool is_frequently_polled_; friend class ServerBuilder; - ServerCompletionQueue() {} + /// \param is_frequently_polled Informs the GPRC library about whether the + /// server completion queue would be actively polled (by calling Next() or + /// AsyncNext()). By default all server completion queues are assumed to be + /// frequently polled. + ServerCompletionQueue(bool is_frequently_polled = true) + : is_frequently_polled_(is_frequently_polled) {} }; } // namespace grpc diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index 86c7fecef59..85af9aa57fb 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -102,7 +102,15 @@ class ServerBuilder { /// Add a completion queue for handling asynchronous services /// Caller is required to keep this completion queue live until /// the server is destroyed. - std::unique_ptr AddCompletionQueue(); + /// + /// \param is_frequently_polled This is an optional parameter to inform GRPC + /// library about whether this completion queue would be frequently polled + /// (i.e by calling Next() or AsyncNext()). The default value is 'true' and is + /// the recommended setting. Setting this to 'false' (i.e not polling the + /// completion queue frequently) will have a significantly negative + /// performance impact and hence should not be used in production use cases. + std::unique_ptr AddCompletionQueue( + bool is_frequently_polled = true); /// Return a running server which is ready for processing calls. std::unique_ptr BuildAndStart(); diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 5c868aece37..059bd2ebc74 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -334,6 +334,15 @@ GRPCAPI void grpc_server_register_completion_queue(grpc_server *server, grpc_completion_queue *cq, void *reserved); +/** Register a non-listening completion queue with the server. This API is + similar to grpc_server_register_completion_queue except that the server will + not use this completion_queue to listen to any incoming channels. + + Registering a non-listening completion queue will have negative performance + impact and hence this API is not recommended for production use cases. */ +GRPCAPI void grpc_server_register_non_listening_completion_queue( + grpc_server *server, grpc_completion_queue *q, void *reserved); + /** Add a HTTP2 over plaintext over tcp listener. Returns bound port number on success, 0 on failure. REQUIRES: server not started */ diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index 5ec8808b508..f6f7ac880cc 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -70,6 +70,8 @@ struct grpc_completion_queue { int shutdown; int shutdown_called; int is_server_cq; + /** Can the server cq accept incoming channels */ + int is_non_listening_server_cq; int num_pluckers; plucker pluckers[GRPC_MAX_COMPLETION_QUEUE_PLUCKERS]; grpc_closure pollset_shutdown_done; @@ -149,6 +151,7 @@ grpc_completion_queue *grpc_completion_queue_create(void *reserved) { cc->shutdown = 0; cc->shutdown_called = 0; cc->is_server_cq = 0; + cc->is_non_listening_server_cq = 0; cc->num_pluckers = 0; #ifndef NDEBUG cc->outstanding_tag_count = 0; @@ -507,6 +510,14 @@ grpc_pollset *grpc_cq_pollset(grpc_completion_queue *cc) { return POLLSET_FROM_CQ(cc); } +void grpc_cq_mark_non_listening_server_cq(grpc_completion_queue *cc) { + cc->is_non_listening_server_cq = 1; +} + +bool grpc_cq_is_non_listening_server_cq(grpc_completion_queue *cc) { + return (cc->is_non_listening_server_cq == 1); +} + void grpc_cq_mark_server_cq(grpc_completion_queue *cc) { cc->is_server_cq = 1; } int grpc_cq_is_server_cq(grpc_completion_queue *cc) { return cc->is_server_cq; } diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index eef82cf0148..ee3e0448401 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -82,6 +82,8 @@ void grpc_cq_end_op(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc, grpc_pollset *grpc_cq_pollset(grpc_completion_queue *cc); +void grpc_cq_mark_non_listening_server_cq(grpc_completion_queue *cc); +bool grpc_cq_is_non_listening_server_cq(grpc_completion_queue *cc); void grpc_cq_mark_server_cq(grpc_completion_queue *cc); int grpc_cq_is_server_cq(grpc_completion_queue *cc); diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index cbfd2458741..c34ec04d2d3 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -895,23 +895,45 @@ const grpc_channel_filter grpc_server_top_filter = { "server", }; -void grpc_server_register_completion_queue(grpc_server *server, - grpc_completion_queue *cq, - void *reserved) { +static void register_completion_queue(grpc_server *server, + grpc_completion_queue *cq, + bool is_non_listening, void *reserved) { size_t i, n; - GRPC_API_TRACE( - "grpc_server_register_completion_queue(server=%p, cq=%p, reserved=%p)", 3, - (server, cq, reserved)); GPR_ASSERT(!reserved); for (i = 0; i < server->cq_count; i++) { if (server->cqs[i] == cq) return; } - GRPC_CQ_INTERNAL_REF(cq, "server"); + grpc_cq_mark_server_cq(cq); - n = server->cq_count++; - server->cqs = gpr_realloc(server->cqs, - server->cq_count * sizeof(grpc_completion_queue *)); - server->cqs[n] = cq; + + /* Non-listening completion queues are not added to server->cqs */ + if (is_non_listening) { + grpc_cq_mark_non_listening_server_cq(cq); + } else { + GRPC_CQ_INTERNAL_REF(cq, "server"); + n = server->cq_count++; + server->cqs = gpr_realloc( + server->cqs, server->cq_count * sizeof(grpc_completion_queue *)); + server->cqs[n] = cq; + } +} + +void grpc_server_register_completion_queue(grpc_server *server, + grpc_completion_queue *cq, + void *reserved) { + GRPC_API_TRACE( + "grpc_server_register_completion_queue(server=%p, cq=%p, reserved=%p)", 3, + (server, cq, reserved)); + register_completion_queue(server, cq, false, reserved); +} + +void grpc_server_register_non_listening_completion_queue( + grpc_server *server, grpc_completion_queue *cq, void *reserved) { + GRPC_API_TRACE( + "grpc_server_register_non_listening_completion_queue(server=%p, cq=%p, " + "reserved=%p)", + 3, (server, cq, reserved)); + register_completion_queue(server, cq, true, reserved); } grpc_server *grpc_server_create(const grpc_channel_args *args, void *reserved) { diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index 68cc38258cf..5445d3e13bc 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -46,8 +46,9 @@ ServerBuilder::ServerBuilder() grpc_compression_options_init(&compression_options_); } -std::unique_ptr ServerBuilder::AddCompletionQueue() { - ServerCompletionQueue* cq = new ServerCompletionQueue(); +std::unique_ptr ServerBuilder::AddCompletionQueue( + bool is_frequently_polled) { + ServerCompletionQueue* cq = new ServerCompletionQueue(is_frequently_polled); cqs_.push_back(cq); return std::unique_ptr(cq); } @@ -105,8 +106,17 @@ std::unique_ptr ServerBuilder::BuildAndStart() { std::unique_ptr server( new Server(thread_pool.release(), true, max_message_size_, &args)); for (auto cq = cqs_.begin(); cq != cqs_.end(); ++cq) { - grpc_server_register_completion_queue(server->server_, (*cq)->cq(), - nullptr); + // A completion queue that is not polled frequently (by calling Next() or + // AsyncNext()) is not safe to use for listening to incoming channels. + // Register all such completion queues as non-listening completion queues + // with the GRPC core library. + if ((*cq)->IsFrequentlyPolled()) { + grpc_server_register_completion_queue(server->server_, (*cq)->cq(), + nullptr); + } else { + grpc_server_register_non_listening_completion_queue(server->server_, + (*cq)->cq(), nullptr); + } } for (auto service = services_.begin(); service != services_.end(); service++) { diff --git a/test/cpp/end2end/hybrid_end2end_test.cc b/test/cpp/end2end/hybrid_end2end_test.cc index 02043a89d3a..0423448154d 100644 --- a/test/cpp/end2end/hybrid_end2end_test.cc +++ b/test/cpp/end2end/hybrid_end2end_test.cc @@ -216,7 +216,7 @@ class HybridEnd2endTest : public ::testing::Test { } // Create a separate cq for each potential handler. for (int i = 0; i < 5; i++) { - cqs_.push_back(builder.AddCompletionQueue()); + cqs_.push_back(builder.AddCompletionQueue(false)); } server_ = builder.BuildAndStart(); } From 7def036085bbbe61a908668da0e92c11eb4b921a Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 21 Apr 2016 14:54:32 -0700 Subject: [PATCH 0065/1894] Add a safety check to ensure atleast one of the completion queues is listening completion queue (i.e frequently polled) --- src/cpp/server/server_builder.cc | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index 5445d3e13bc..c0d13951d70 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -86,8 +86,11 @@ void ServerBuilder::AddListeningPort(const grpc::string& addr, std::unique_ptr ServerBuilder::BuildAndStart() { std::unique_ptr thread_pool; + // Does this server have atleast one sync method + bool has_sync_methods = false; for (auto it = services_.begin(); it != services_.end(); ++it) { if ((*it)->service->has_synchronous_methods()) { + has_sync_methods = true; if (thread_pool == nullptr) { thread_pool.reset(CreateDefaultThreadPool()); break; @@ -105,6 +108,12 @@ std::unique_ptr ServerBuilder::BuildAndStart() { compression_options_.enabled_algorithms_bitset); std::unique_ptr server( new Server(thread_pool.release(), true, max_message_size_, &args)); + + // If the server has atleast one sync methods, we know that this is a Sync + // server or a Hybrid server and the completion queue (server->cq_) would be + // frequently polled. + int num_frequently_polled_cqs = has_sync_methods ? 1 : 0; + for (auto cq = cqs_.begin(); cq != cqs_.end(); ++cq) { // A completion queue that is not polled frequently (by calling Next() or // AsyncNext()) is not safe to use for listening to incoming channels. @@ -113,11 +122,19 @@ std::unique_ptr ServerBuilder::BuildAndStart() { if ((*cq)->IsFrequentlyPolled()) { grpc_server_register_completion_queue(server->server_, (*cq)->cq(), nullptr); + num_frequently_polled_cqs++; } else { grpc_server_register_non_listening_completion_queue(server->server_, (*cq)->cq(), nullptr); } } + + if (num_frequently_polled_cqs == 0) { + gpr_log(GPR_ERROR, + "Atleast one of the completion queues must be frequently polled"); + return nullptr; + } + for (auto service = services_.begin(); service != services_.end(); service++) { if (!server->RegisterService((*service)->host.get(), (*service)->service)) { From 01907123f6323a7494551e7a45e342dcdc068864 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 21 Apr 2016 15:09:13 -0700 Subject: [PATCH 0066/1894] generate_projects.sh and fix copyright year --- grpc.def | 1 + include/grpc++/impl/codegen/completion_queue.h | 2 +- include/grpc++/server_builder.h | 2 +- include/grpc/grpc.h | 2 +- src/core/lib/surface/completion_queue.c | 2 +- src/core/lib/surface/completion_queue.h | 2 +- src/core/lib/surface/server.c | 2 +- src/cpp/server/server_builder.cc | 2 +- src/proto/grpc/binary_log/v1alpha/log.proto | 2 +- src/python/grpcio/grpc/_cython/imports.generated.c | 2 ++ src/python/grpcio/grpc/_cython/imports.generated.h | 3 +++ src/ruby/ext/grpc/rb_grpc_imports.generated.c | 2 ++ src/ruby/ext/grpc/rb_grpc_imports.generated.h | 3 +++ tools/fuzzer/runners/client_fuzzer.sh | 2 +- tools/fuzzer/runners/hpack_parser_fuzzer_test.sh | 2 +- tools/fuzzer/runners/http_fuzzer_test.sh | 2 +- tools/fuzzer/runners/json_fuzzer_test.sh | 2 +- tools/fuzzer/runners/nanopb_fuzzer_response_test.sh | 2 +- tools/fuzzer/runners/nanopb_fuzzer_serverlist_test.sh | 2 +- tools/fuzzer/runners/server_fuzzer.sh | 2 +- tools/fuzzer/runners/uri_fuzzer_test.sh | 2 +- 21 files changed, 27 insertions(+), 16 deletions(-) diff --git a/grpc.def b/grpc.def index f81aa1b05a6..943b464c31f 100644 --- a/grpc.def +++ b/grpc.def @@ -77,6 +77,7 @@ EXPORTS grpc_server_request_registered_call grpc_server_create grpc_server_register_completion_queue + grpc_server_register_non_listening_completion_queue grpc_server_add_insecure_http2_port grpc_server_start grpc_server_shutdown_and_notify diff --git a/include/grpc++/impl/codegen/completion_queue.h b/include/grpc++/impl/codegen/completion_queue.h index d489a90c69c..1b84b447050 100644 --- a/include/grpc++/impl/codegen/completion_queue.h +++ b/include/grpc++/impl/codegen/completion_queue.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index 85af9aa57fb..5275bd3ac16 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 059bd2ebc74..ee15b9d88df 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index f6f7ac880cc..d5eb24270e3 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index ee3e0448401..1528ca4ad8f 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index c34ec04d2d3..0a84d8e7cda 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index c0d13951d70..9cd7cb2da37 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without diff --git a/src/proto/grpc/binary_log/v1alpha/log.proto b/src/proto/grpc/binary_log/v1alpha/log.proto index 6cc473be74e..83166cd4104 100644 --- a/src/proto/grpc/binary_log/v1alpha/log.proto +++ b/src/proto/grpc/binary_log/v1alpha/log.proto @@ -105,4 +105,4 @@ message Message { // The contents of the message. May be a prefix instead of the complete // message. bytes data = 5; -} \ No newline at end of file +} diff --git a/src/python/grpcio/grpc/_cython/imports.generated.c b/src/python/grpcio/grpc/_cython/imports.generated.c index 8bd6ae6372b..edad9a3131a 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.c +++ b/src/python/grpcio/grpc/_cython/imports.generated.c @@ -115,6 +115,7 @@ grpc_server_register_method_type grpc_server_register_method_import; grpc_server_request_registered_call_type grpc_server_request_registered_call_import; grpc_server_create_type grpc_server_create_import; grpc_server_register_completion_queue_type grpc_server_register_completion_queue_import; +grpc_server_register_non_listening_completion_queue_type grpc_server_register_non_listening_completion_queue_import; grpc_server_add_insecure_http2_port_type grpc_server_add_insecure_http2_port_import; grpc_server_start_type grpc_server_start_import; grpc_server_shutdown_and_notify_type grpc_server_shutdown_and_notify_import; @@ -381,6 +382,7 @@ void pygrpc_load_imports(HMODULE library) { grpc_server_request_registered_call_import = (grpc_server_request_registered_call_type) GetProcAddress(library, "grpc_server_request_registered_call"); grpc_server_create_import = (grpc_server_create_type) GetProcAddress(library, "grpc_server_create"); grpc_server_register_completion_queue_import = (grpc_server_register_completion_queue_type) GetProcAddress(library, "grpc_server_register_completion_queue"); + grpc_server_register_non_listening_completion_queue_import = (grpc_server_register_non_listening_completion_queue_type) GetProcAddress(library, "grpc_server_register_non_listening_completion_queue"); grpc_server_add_insecure_http2_port_import = (grpc_server_add_insecure_http2_port_type) GetProcAddress(library, "grpc_server_add_insecure_http2_port"); grpc_server_start_import = (grpc_server_start_type) GetProcAddress(library, "grpc_server_start"); grpc_server_shutdown_and_notify_import = (grpc_server_shutdown_and_notify_type) GetProcAddress(library, "grpc_server_shutdown_and_notify"); diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index 272e85b4857..7354de4ba29 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -295,6 +295,9 @@ extern grpc_server_create_type grpc_server_create_import; typedef void(*grpc_server_register_completion_queue_type)(grpc_server *server, grpc_completion_queue *cq, void *reserved); extern grpc_server_register_completion_queue_type grpc_server_register_completion_queue_import; #define grpc_server_register_completion_queue grpc_server_register_completion_queue_import +typedef void(*grpc_server_register_non_listening_completion_queue_type)(grpc_server *server, grpc_completion_queue *q, void *reserved); +extern grpc_server_register_non_listening_completion_queue_type grpc_server_register_non_listening_completion_queue_import; +#define grpc_server_register_non_listening_completion_queue grpc_server_register_non_listening_completion_queue_import typedef int(*grpc_server_add_insecure_http2_port_type)(grpc_server *server, const char *addr); extern grpc_server_add_insecure_http2_port_type grpc_server_add_insecure_http2_port_import; #define grpc_server_add_insecure_http2_port grpc_server_add_insecure_http2_port_import diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index 56db4ec686b..149ce6c48a4 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -115,6 +115,7 @@ grpc_server_register_method_type grpc_server_register_method_import; grpc_server_request_registered_call_type grpc_server_request_registered_call_import; grpc_server_create_type grpc_server_create_import; grpc_server_register_completion_queue_type grpc_server_register_completion_queue_import; +grpc_server_register_non_listening_completion_queue_type grpc_server_register_non_listening_completion_queue_import; grpc_server_add_insecure_http2_port_type grpc_server_add_insecure_http2_port_import; grpc_server_start_type grpc_server_start_import; grpc_server_shutdown_and_notify_type grpc_server_shutdown_and_notify_import; @@ -377,6 +378,7 @@ void grpc_rb_load_imports(HMODULE library) { grpc_server_request_registered_call_import = (grpc_server_request_registered_call_type) GetProcAddress(library, "grpc_server_request_registered_call"); grpc_server_create_import = (grpc_server_create_type) GetProcAddress(library, "grpc_server_create"); grpc_server_register_completion_queue_import = (grpc_server_register_completion_queue_type) GetProcAddress(library, "grpc_server_register_completion_queue"); + grpc_server_register_non_listening_completion_queue_import = (grpc_server_register_non_listening_completion_queue_type) GetProcAddress(library, "grpc_server_register_non_listening_completion_queue"); grpc_server_add_insecure_http2_port_import = (grpc_server_add_insecure_http2_port_type) GetProcAddress(library, "grpc_server_add_insecure_http2_port"); grpc_server_start_import = (grpc_server_start_type) GetProcAddress(library, "grpc_server_start"); grpc_server_shutdown_and_notify_import = (grpc_server_shutdown_and_notify_type) GetProcAddress(library, "grpc_server_shutdown_and_notify"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index c526f434c61..098319db77c 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -295,6 +295,9 @@ extern grpc_server_create_type grpc_server_create_import; typedef void(*grpc_server_register_completion_queue_type)(grpc_server *server, grpc_completion_queue *cq, void *reserved); extern grpc_server_register_completion_queue_type grpc_server_register_completion_queue_import; #define grpc_server_register_completion_queue grpc_server_register_completion_queue_import +typedef void(*grpc_server_register_non_listening_completion_queue_type)(grpc_server *server, grpc_completion_queue *q, void *reserved); +extern grpc_server_register_non_listening_completion_queue_type grpc_server_register_non_listening_completion_queue_import; +#define grpc_server_register_non_listening_completion_queue grpc_server_register_non_listening_completion_queue_import typedef int(*grpc_server_add_insecure_http2_port_type)(grpc_server *server, const char *addr); extern grpc_server_add_insecure_http2_port_type grpc_server_add_insecure_http2_port_import; #define grpc_server_add_insecure_http2_port grpc_server_add_insecure_http2_port_import diff --git a/tools/fuzzer/runners/client_fuzzer.sh b/tools/fuzzer/runners/client_fuzzer.sh index 239d552c57d..97d4e60d908 100644 --- a/tools/fuzzer/runners/client_fuzzer.sh +++ b/tools/fuzzer/runners/client_fuzzer.sh @@ -33,7 +33,7 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=2048" if [ "$jobs" != "1" ] then - flags="-jobs=$jobs -workers=$jobs" + flags="-jobs=$jobs -workers=$jobs $flags" fi if [ "$config" == "asan-trace-cmp" ] diff --git a/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh b/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh index e69b4b4dfe2..c6f70a623dc 100644 --- a/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh +++ b/tools/fuzzer/runners/hpack_parser_fuzzer_test.sh @@ -33,7 +33,7 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=512" if [ "$jobs" != "1" ] then - flags="-jobs=$jobs -workers=$jobs" + flags="-jobs=$jobs -workers=$jobs $flags" fi if [ "$config" == "asan-trace-cmp" ] diff --git a/tools/fuzzer/runners/http_fuzzer_test.sh b/tools/fuzzer/runners/http_fuzzer_test.sh index c190ba40b60..bb54a238145 100644 --- a/tools/fuzzer/runners/http_fuzzer_test.sh +++ b/tools/fuzzer/runners/http_fuzzer_test.sh @@ -33,7 +33,7 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=2048" if [ "$jobs" != "1" ] then - flags="-jobs=$jobs -workers=$jobs" + flags="-jobs=$jobs -workers=$jobs $flags" fi if [ "$config" == "asan-trace-cmp" ] diff --git a/tools/fuzzer/runners/json_fuzzer_test.sh b/tools/fuzzer/runners/json_fuzzer_test.sh index 9fc6271976b..e11e25dc097 100644 --- a/tools/fuzzer/runners/json_fuzzer_test.sh +++ b/tools/fuzzer/runners/json_fuzzer_test.sh @@ -33,7 +33,7 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=512" if [ "$jobs" != "1" ] then - flags="-jobs=$jobs -workers=$jobs" + flags="-jobs=$jobs -workers=$jobs $flags" fi if [ "$config" == "asan-trace-cmp" ] diff --git a/tools/fuzzer/runners/nanopb_fuzzer_response_test.sh b/tools/fuzzer/runners/nanopb_fuzzer_response_test.sh index bbcebf11cce..97359277ce2 100644 --- a/tools/fuzzer/runners/nanopb_fuzzer_response_test.sh +++ b/tools/fuzzer/runners/nanopb_fuzzer_response_test.sh @@ -33,7 +33,7 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=128" if [ "$jobs" != "1" ] then - flags="-jobs=$jobs -workers=$jobs" + flags="-jobs=$jobs -workers=$jobs $flags" fi if [ "$config" == "asan-trace-cmp" ] diff --git a/tools/fuzzer/runners/nanopb_fuzzer_serverlist_test.sh b/tools/fuzzer/runners/nanopb_fuzzer_serverlist_test.sh index e9099bac046..2dfaa2372fc 100644 --- a/tools/fuzzer/runners/nanopb_fuzzer_serverlist_test.sh +++ b/tools/fuzzer/runners/nanopb_fuzzer_serverlist_test.sh @@ -33,7 +33,7 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=128" if [ "$jobs" != "1" ] then - flags="-jobs=$jobs -workers=$jobs" + flags="-jobs=$jobs -workers=$jobs $flags" fi if [ "$config" == "asan-trace-cmp" ] diff --git a/tools/fuzzer/runners/server_fuzzer.sh b/tools/fuzzer/runners/server_fuzzer.sh index 28ca8b32719..fc0567f670b 100644 --- a/tools/fuzzer/runners/server_fuzzer.sh +++ b/tools/fuzzer/runners/server_fuzzer.sh @@ -33,7 +33,7 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=2048" if [ "$jobs" != "1" ] then - flags="-jobs=$jobs -workers=$jobs" + flags="-jobs=$jobs -workers=$jobs $flags" fi if [ "$config" == "asan-trace-cmp" ] diff --git a/tools/fuzzer/runners/uri_fuzzer_test.sh b/tools/fuzzer/runners/uri_fuzzer_test.sh index 7dac54ec518..5f33e734654 100644 --- a/tools/fuzzer/runners/uri_fuzzer_test.sh +++ b/tools/fuzzer/runners/uri_fuzzer_test.sh @@ -33,7 +33,7 @@ flags="-max_total_time=$runtime -artifact_prefix=fuzzer_output/ -max_len=128" if [ "$jobs" != "1" ] then - flags="-jobs=$jobs -workers=$jobs" + flags="-jobs=$jobs -workers=$jobs $flags" fi if [ "$config" == "asan-trace-cmp" ] From a5b7df924276744f900850014e0ae63fac29a9a4 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Thu, 21 Apr 2016 16:49:25 -0700 Subject: [PATCH 0067/1894] fix buildgen plugin file comment --- tools/buildgen/plugins/expand_version.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/buildgen/plugins/expand_version.py b/tools/buildgen/plugins/expand_version.py index dd77f7af125..c6cc5621c97 100755 --- a/tools/buildgen/plugins/expand_version.py +++ b/tools/buildgen/plugins/expand_version.py @@ -27,10 +27,10 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -"""Buildgen .proto files list plugin. +"""Buildgen package version plugin This parses the list of targets from the yaml build file, and creates -a list called "protos" that contains all of the proto file names. +a custom version string for each language's package. """ From 0b9fdd8adc4b2d167e33a6d39e7ff4a46ef9a65c Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 21 Apr 2016 17:27:41 -0700 Subject: [PATCH 0068/1894] clang format fix --- test/core/end2end/fixtures/h2_sockpair_1byte.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/end2end/fixtures/h2_sockpair_1byte.c b/test/core/end2end/fixtures/h2_sockpair_1byte.c index 4c805c43706..16ffb6ec13f 100644 --- a/test/core/end2end/fixtures/h2_sockpair_1byte.c +++ b/test/core/end2end/fixtures/h2_sockpair_1byte.c @@ -60,7 +60,7 @@ static void server_setup_transport(void *ts, grpc_transport *transport) { grpc_end2end_test_fixture *f = ts; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_endpoint_pair* sfd = f->fixture_data; + grpc_endpoint_pair *sfd = f->fixture_data; grpc_endpoint_add_to_pollset(&exec_ctx, sfd->server, grpc_cq_pollset(f->cq)); grpc_server_setup_transport(&exec_ctx, f->server, transport, grpc_server_get_channel_args(f->server)); From 79a75e25c450d0f86c268578d81014dafd173ed2 Mon Sep 17 00:00:00 2001 From: Dmitry Kovalev Date: Thu, 21 Apr 2016 23:32:30 -0700 Subject: [PATCH 0069/1894] Fixing invalid usage of getProtobufServiceAttrs() function. getProtobufServiceAttrs(service, options) must be called with 2 arguments. --- src/node/src/client.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/node/src/client.js b/src/node/src/client.js index 5e07046fc61..f75f951eb8d 100644 --- a/src/node/src/client.js +++ b/src/node/src/client.js @@ -815,8 +815,7 @@ exports.waitForClientReady = function(client, deadline, callback) { * @return {function(string, Object)} New client constructor */ exports.makeProtobufClientConstructor = function(service, options) { - var method_attrs = common.getProtobufServiceAttrs(service, service.name, - options); + var method_attrs = common.getProtobufServiceAttrs(service, options); var deprecatedArgumentOrder = false; if (options) { deprecatedArgumentOrder = options.deprecatedArgumentOrder; From ee6de9365b9d2a79cd7874b4976372c681fb257d Mon Sep 17 00:00:00 2001 From: Benjamin Herzog Date: Fri, 22 Apr 2016 11:17:43 +0200 Subject: [PATCH 0070/1894] Move nonnull begin to correct position --- src/compiler/objective_c_plugin.cc | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index f62faa52610..9522956fdeb 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -64,8 +64,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { ".pbobjc.h\"\n\n" "#import \n" "#import \n" - "#import \n\n" - "NS_ASSUME_NONNULL_BEGIN\n\n"; + "#import \n"; // TODO(jcanizales): Instead forward-declare the input and output types // and import the files in the .pbrpc.m @@ -82,10 +81,12 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { declarations += grpc_objective_c_generator::GetHeader(service); } + ::grpc::string nonNullBegin = "\nNS_ASSUME_NONNULL_BEGIN\n\n"; ::grpc::string nonNullEnd = "\nNS_ASSUME_NONNULL_END\n"; Write(context, file_name + ".pbrpc.h", - imports + '\n' + proto_imports + '\n' + declarations + nonNullEnd); + imports + '\n' + proto_imports + '\n' + nonNullBegin + + declarations + nonNullEnd); } { From 3714e302c06a907b7af42a478beae3321b07c70a Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 22 Apr 2016 09:50:46 -0700 Subject: [PATCH 0071/1894] Simplify QPS Metrics collection --- test/cpp/interop/stress_interop_client.cc | 40 ++++++----------- test/cpp/interop/stress_interop_client.h | 8 ++-- test/cpp/interop/stress_test.cc | 13 +++--- test/cpp/util/metrics_server.cc | 45 ++++++++++++------- test/cpp/util/metrics_server.h | 39 ++++++++++------ .../stress_test/STRESS_CLIENT_SPEC.md | 4 +- tools/run_tests/stress_test/configs/asan.json | 3 +- .../stress_test/configs/opt-tsan-asan.json | 3 +- tools/run_tests/stress_test/configs/opt.json | 3 +- tools/run_tests/stress_test/configs/tsan.json | 3 +- 10 files changed, 81 insertions(+), 80 deletions(-) diff --git a/test/cpp/interop/stress_interop_client.cc b/test/cpp/interop/stress_interop_client.cc index 04671fb935e..f287a5aa3b4 100644 --- a/test/cpp/interop/stress_interop_client.cc +++ b/test/cpp/interop/stress_interop_client.cc @@ -84,49 +84,37 @@ StressTestInteropClient::StressTestInteropClient( int test_id, const grpc::string& server_address, std::shared_ptr channel, const WeightedRandomTestSelector& test_selector, long test_duration_secs, - long sleep_duration_ms, long metrics_collection_interval_secs) + long sleep_duration_ms) : test_id_(test_id), server_address_(server_address), channel_(channel), interop_client_(new InteropClient(channel, false)), test_selector_(test_selector), test_duration_secs_(test_duration_secs), - sleep_duration_ms_(sleep_duration_ms), - metrics_collection_interval_secs_(metrics_collection_interval_secs) {} + sleep_duration_ms_(sleep_duration_ms) {} -void StressTestInteropClient::MainLoop(std::shared_ptr qps_gauge) { +void StressTestInteropClient::MainLoop(std::shared_ptr qps_gauge) { gpr_log(GPR_INFO, "Running test %d. ServerAddr: %s", test_id_, server_address_.c_str()); - gpr_timespec test_end_time = - gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), - gpr_time_from_seconds(test_duration_secs_, GPR_TIMESPAN)); + gpr_timespec test_end_time; + if (test_duration_secs_ < 0) { + test_end_time = gpr_inf_future(GPR_CLOCK_REALTIME); + } else { + test_end_time = + gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), + gpr_time_from_seconds(test_duration_secs_, GPR_TIMESPAN)); + } - gpr_timespec current_time = gpr_now(GPR_CLOCK_REALTIME); - gpr_timespec next_stat_collection_time = current_time; - gpr_timespec collection_interval = - gpr_time_from_seconds(metrics_collection_interval_secs_, GPR_TIMESPAN); - long num_calls_per_interval = 0; + qps_gauge->Reset(); - while (test_duration_secs_ < 0 || - gpr_time_cmp(gpr_now(GPR_CLOCK_REALTIME), test_end_time) < 0) { + while (gpr_time_cmp(gpr_now(GPR_CLOCK_REALTIME), test_end_time) < 0) { // Select the test case to execute based on the weights and execute it TestCaseType test_case = test_selector_.GetNextTest(); gpr_log(GPR_DEBUG, "%d - Executing the test case %d", test_id_, test_case); RunTest(test_case); - num_calls_per_interval++; - - // See if its time to collect stats yet - current_time = gpr_now(GPR_CLOCK_REALTIME); - if (gpr_time_cmp(next_stat_collection_time, current_time) < 0) { - qps_gauge->Set(num_calls_per_interval / - metrics_collection_interval_secs_); - - num_calls_per_interval = 0; - next_stat_collection_time = - gpr_time_add(current_time, collection_interval); - } + qps_gauge->Incr(); // Sleep between successive calls if needed if (sleep_duration_ms_ > 0) { diff --git a/test/cpp/interop/stress_interop_client.h b/test/cpp/interop/stress_interop_client.h index 6fd303d6b79..cb0cd988214 100644 --- a/test/cpp/interop/stress_interop_client.h +++ b/test/cpp/interop/stress_interop_client.h @@ -87,12 +87,11 @@ class StressTestInteropClient { StressTestInteropClient(int test_id, const grpc::string& server_address, std::shared_ptr channel, const WeightedRandomTestSelector& test_selector, - long test_duration_secs, long sleep_duration_ms, - long metrics_collection_interval_secs); + long test_duration_secs, long sleep_duration_ms); // The main function. Use this as the thread entry point. - // qps_gauge is the Gauge to record the requests per second metric - void MainLoop(std::shared_ptr qps_gauge); + // qps_gauge is the QpsGauge to record the requests per second metric + void MainLoop(std::shared_ptr qps_gauge); private: void RunTest(TestCaseType test_case); @@ -104,7 +103,6 @@ class StressTestInteropClient { const WeightedRandomTestSelector& test_selector_; long test_duration_secs_; long sleep_duration_ms_; - long metrics_collection_interval_secs_; }; } // namespace testing diff --git a/test/cpp/interop/stress_test.cc b/test/cpp/interop/stress_test.cc index 38caf31b76a..d9e3fd25c51 100644 --- a/test/cpp/interop/stress_test.cc +++ b/test/cpp/interop/stress_test.cc @@ -56,9 +56,6 @@ extern void gpr_default_log(gpr_log_func_args* args); DEFINE_int32(metrics_port, 8081, "The metrics server port."); -DEFINE_int32(metrics_collection_interval_secs, 5, - "How often (in seconds) should metrics be recorded."); - DEFINE_int32(sleep_duration_ms, 0, "The duration (in millisec) between two" " consecutive test calls (per server) issued by the server."); @@ -275,19 +272,19 @@ int main(int argc, char** argv) { stub_idx++) { StressTestInteropClient* client = new StressTestInteropClient( ++thread_idx, *it, channel, test_selector, FLAGS_test_duration_secs, - FLAGS_sleep_duration_ms, FLAGS_metrics_collection_interval_secs); + FLAGS_sleep_duration_ms); - bool is_already_created; - // Gauge name + bool is_already_created = false; + // QpsGauge name std::snprintf(buffer, sizeof(buffer), "/stress_test/server_%d/channel_%d/stub_%d/qps", server_idx, channel_idx, stub_idx); test_threads.emplace_back(grpc::thread( &StressTestInteropClient::MainLoop, client, - metrics_service.CreateGauge(buffer, &is_already_created))); + metrics_service.CreateQpsGauge(buffer, &is_already_created))); - // The Gauge should not have been already created + // The QpsGauge should not have been already created GPR_ASSERT(!is_already_created); } } diff --git a/test/cpp/util/metrics_server.cc b/test/cpp/util/metrics_server.cc index d9b44a6a925..cc6b39b7532 100644 --- a/test/cpp/util/metrics_server.cc +++ b/test/cpp/util/metrics_server.cc @@ -42,16 +42,26 @@ namespace grpc { namespace testing { -Gauge::Gauge(long initial_val) : val_(initial_val) {} +QpsGauge::QpsGauge() + : start_time_(gpr_now(GPR_CLOCK_REALTIME)), num_queries_(0) {} -void Gauge::Set(long new_val) { - std::lock_guard lock(val_mu_); - val_ = new_val; +void QpsGauge::Reset() { + std::lock_guard lock(num_queries_mu_); + num_queries_ = 0; + start_time_ = gpr_now(GPR_CLOCK_REALTIME); } -long Gauge::Get() { - std::lock_guard lock(val_mu_); - return val_; +void QpsGauge::Incr() { + std::lock_guard lock(num_queries_mu_); + num_queries_++; +} + +long QpsGauge::Get() { + std::lock_guard lock(num_queries_mu_); + gpr_timespec time_diff = + gpr_time_sub(gpr_now(GPR_CLOCK_REALTIME), start_time_); + long duration_secs = time_diff.tv_sec > 0 ? time_diff.tv_sec : 1; + return num_queries_ / duration_secs; } grpc::Status MetricsServiceImpl::GetAllGauges( @@ -60,7 +70,7 @@ grpc::Status MetricsServiceImpl::GetAllGauges( gpr_log(GPR_DEBUG, "GetAllGauges called"); std::lock_guard lock(mu_); - for (auto it = gauges_.begin(); it != gauges_.end(); it++) { + for (auto it = qps_gauges_.begin(); it != qps_gauges_.end(); it++) { GaugeResponse resp; resp.set_name(it->first); // Gauge name resp.set_long_value(it->second->Get()); // Gauge value @@ -75,8 +85,8 @@ grpc::Status MetricsServiceImpl::GetGauge(ServerContext* context, GaugeResponse* response) { std::lock_guard lock(mu_); - const auto it = gauges_.find(request->name()); - if (it != gauges_.end()) { + const auto it = qps_gauges_.find(request->name()); + if (it != qps_gauges_.end()) { response->set_name(it->first); response->set_long_value(it->second->Get()); } @@ -84,16 +94,17 @@ grpc::Status MetricsServiceImpl::GetGauge(ServerContext* context, return Status::OK; } -std::shared_ptr MetricsServiceImpl::CreateGauge(const grpc::string& name, - bool* already_present) { +std::shared_ptr MetricsServiceImpl::CreateQpsGauge( + const grpc::string& name, bool* already_present) { std::lock_guard lock(mu_); - std::shared_ptr gauge(new Gauge(0)); - const auto p = gauges_.emplace(name, gauge); + std::shared_ptr qps_gauge(new QpsGauge()); + const auto p = qps_gauges_.emplace(name, qps_gauge); - // p.first is an iterator pointing to > pair. p.second - // is a boolean which is set to 'true' if the Gauge is inserted in the guages_ - // map and 'false' if it is already present in the map + // p.first is an iterator pointing to > pair. + // p.second is a boolean which is set to 'true' if the QpsGauge is + // successfully inserted in the guages_ map and 'false' if it is already + // present in the map *already_present = !p.second; return p.first->second; } diff --git a/test/cpp/util/metrics_server.h b/test/cpp/util/metrics_server.h index ce05e0be64c..b04879c5e69 100644 --- a/test/cpp/util/metrics_server.h +++ b/test/cpp/util/metrics_server.h @@ -36,6 +36,7 @@ #include #include +#include "grpc/support/time.h" #include "src/proto/grpc/testing/metrics.grpc.pb.h" #include "src/proto/grpc/testing/metrics.pb.h" @@ -48,10 +49,13 @@ * Example: * MetricsServiceImpl metricsImpl; * .. - * // Create Gauge(s). Note: Gauges can be created even after calling + * // Create QpsGauge(s). Note: QpsGauges can be created even after calling * // 'StartServer'. - * Gauge gauge1 = metricsImpl.CreateGauge("foo",is_present); - * // gauge1 can now be used anywhere in the program to set values. + * QpsGauge qps_gauge1 = metricsImpl.CreateQpsGauge("foo", is_present); + * // qps_gauge1 can now be used anywhere in the program by first making a + * // one-time call qps_gauge1.Reset() and then calling qps_gauge1.Incr() + * // every time to increment a query counter + * * ... * // Create the metrics server * std::unique_ptr server = metricsImpl.StartServer(port); @@ -60,17 +64,24 @@ namespace grpc { namespace testing { -// TODO(sreek): Add support for other types of Gauges like Double, String in -// future -class Gauge { +class QpsGauge { public: - Gauge(long initial_val); - void Set(long new_val); + QpsGauge(); + + // Initialize the internal timer and reset the query count to 0 + void Reset(); + + // Increment the query count by 1 + void Incr(); + + // Return the current qps (i.e query count divided by the time since this + // QpsGauge object created (or Reset() was called)) long Get(); private: - long val_; - std::mutex val_mu_; + gpr_timespec start_time_; + long num_queries_; + std::mutex num_queries_mu_; }; class MetricsServiceImpl GRPC_FINAL : public MetricsService::Service { @@ -81,17 +92,17 @@ class MetricsServiceImpl GRPC_FINAL : public MetricsService::Service { grpc::Status GetGauge(ServerContext* context, const GaugeRequest* request, GaugeResponse* response) GRPC_OVERRIDE; - // Create a Gauge with name 'name'. is_present is set to true if the Gauge + // Create a QpsGauge with name 'name'. is_present is set to true if the Gauge // is already present in the map. - // NOTE: CreateGauge can be called anytime (i.e before or after calling + // NOTE: CreateQpsGauge can be called anytime (i.e before or after calling // StartServer). - std::shared_ptr CreateGauge(const grpc::string& name, + std::shared_ptr CreateQpsGauge(const grpc::string& name, bool* already_present); std::unique_ptr StartServer(int port); private: - std::map> gauges_; + std::map> qps_gauges_; std::mutex mu_; }; diff --git a/tools/run_tests/stress_test/STRESS_CLIENT_SPEC.md b/tools/run_tests/stress_test/STRESS_CLIENT_SPEC.md index 62ca8aff2cd..9f079beebc0 100644 --- a/tools/run_tests/stress_test/STRESS_CLIENT_SPEC.md +++ b/tools/run_tests/stress_test/STRESS_CLIENT_SPEC.md @@ -6,8 +6,8 @@ This document specifies the features a stress test client should implement in or -------------- **1.** A stress test client should be able to repeatedly execute one or more of the existing 'interop test cases'. It may just be a wrapper around the existing interop test client. The exact command line arguments the client should support are listed in _Table 1_ below. -**2.** The stress test client must implement a metrics server defined by _[metrics.proto](https://github.com/grpc/grpc/blob/master/src/proto/grpc/testing/metrics.proto)_ and must expose _qps_ as a long-valued Gauge. The client can track the overall _qps_ in one Gauge or in multiple Gauges (for example: One per Channel or Stub). - The framework periodically queries the _qps_ by calling the `GetAllGauges()` method (the framework assumes that all the returned Gauges are _qps_ Gauges) and uses this to determine if the stress test client is running or crashed or stalled. +**2.** The stress test client must implement a metrics server defined by _[metrics.proto](https://github.com/grpc/grpc/blob/master/src/proto/grpc/testing/metrics.proto)_ and must expose _qps_ as a `Long`-valued Gauge. The client can track the overall _qps_ in one Gauge or in multiple Gauges (for example: One per Channel or Stub). + The framework periodically queries the _qps_ by calling the `GetAllGauges()` method (the framework assumes that all the returned Gauges are _qps_ Gauges and adds them up to determine the final qps) and uses this to determine if the stress test client is running or crashed or stalled. > *Note:* In this context, the term _**qps**_ means _interop test cases per second_ (not _messages per second_ or _rpc calls per second_) diff --git a/tools/run_tests/stress_test/configs/asan.json b/tools/run_tests/stress_test/configs/asan.json index c5588553147..cb9f55763b1 100644 --- a/tools/run_tests/stress_test/configs/asan.json +++ b/tools/run_tests/stress_test/configs/asan.json @@ -16,8 +16,7 @@ "num_channels_per_server":5, "num_stubs_per_channel":10, "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1", - "metrics_port": 8081, - "metrics_collection_interval_secs":120 + "metrics_port": 8081 }, "metricsPort": 8081, "metricsArgs": { diff --git a/tools/run_tests/stress_test/configs/opt-tsan-asan.json b/tools/run_tests/stress_test/configs/opt-tsan-asan.json index 4f172ef30bc..936d15169e1 100644 --- a/tools/run_tests/stress_test/configs/opt-tsan-asan.json +++ b/tools/run_tests/stress_test/configs/opt-tsan-asan.json @@ -26,8 +26,7 @@ "num_channels_per_server":5, "num_stubs_per_channel":10, "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1", - "metrics_port": 8081, - "metrics_collection_interval_secs": 60 + "metrics_port": 8081 }, "metricsPort": 8081, "metricsArgs": { diff --git a/tools/run_tests/stress_test/configs/opt.json b/tools/run_tests/stress_test/configs/opt.json index 75505186f20..f45b8240487 100644 --- a/tools/run_tests/stress_test/configs/opt.json +++ b/tools/run_tests/stress_test/configs/opt.json @@ -16,8 +16,7 @@ "num_channels_per_server":5, "num_stubs_per_channel":10, "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1", - "metrics_port": 8081, - "metrics_collection_interval_secs": 60 + "metrics_port": 8081 }, "metricsPort": 8081, "metricsArgs": { diff --git a/tools/run_tests/stress_test/configs/tsan.json b/tools/run_tests/stress_test/configs/tsan.json index a7ec08313d6..6ef3bdf7ea7 100644 --- a/tools/run_tests/stress_test/configs/tsan.json +++ b/tools/run_tests/stress_test/configs/tsan.json @@ -16,8 +16,7 @@ "num_channels_per_server":5, "num_stubs_per_channel":10, "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1", - "metrics_port": 8081, - "metrics_collection_interval_secs":120 + "metrics_port": 8081 }, "metricsPort": 8081, "metricsArgs": { From 81159e5adcfd4bbbf5862e05f65344045ea5aea3 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 23 Apr 2016 00:42:03 +0200 Subject: [PATCH 0072/1894] Fixing examples. --- examples/cpp/helloworld/Makefile | 2 +- examples/cpp/route_guide/Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/cpp/helloworld/Makefile b/examples/cpp/helloworld/Makefile index 4b1867e2920..470b83573e4 100644 --- a/examples/cpp/helloworld/Makefile +++ b/examples/cpp/helloworld/Makefile @@ -32,7 +32,7 @@ CXX = g++ CPPFLAGS += -I/usr/local/include -pthread CXXFLAGS += -std=c++11 -LDFLAGS += -L/usr/local/lib -lgrpc++_unsecure -lgrpc -lprotobuf -lpthread -ldl +LDFLAGS += -L/usr/local/lib `pkg-config --libs grpc++` -lprotobuf -lpthread -ldl PROTOC = protoc GRPC_CPP_PLUGIN = grpc_cpp_plugin GRPC_CPP_PLUGIN_PATH ?= `which $(GRPC_CPP_PLUGIN)` diff --git a/examples/cpp/route_guide/Makefile b/examples/cpp/route_guide/Makefile index 0fbb0a89298..11f2a00cc89 100644 --- a/examples/cpp/route_guide/Makefile +++ b/examples/cpp/route_guide/Makefile @@ -32,7 +32,7 @@ CXX = g++ CPPFLAGS += -I/usr/local/include -pthread CXXFLAGS += -std=c++11 -LDFLAGS += -L/usr/local/lib -lgrpc++_unsecure -lgrpc -lprotobuf -lpthread -ldl +LDFLAGS += -L/usr/local/lib `pkg-config --libs grpc++` -lprotobuf -lpthread -ldl PROTOC = protoc GRPC_CPP_PLUGIN = grpc_cpp_plugin GRPC_CPP_PLUGIN_PATH ?= `which $(GRPC_CPP_PLUGIN)` From f5df6472b4028166ea1d51f15bb8ed1455fde472 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 23 Apr 2016 01:53:46 +0200 Subject: [PATCH 0073/1894] Refactor. --- src/core/lib/support/tmpfile_msys.c | 14 ++++++-------- third_party/boringssl | 2 +- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/core/lib/support/tmpfile_msys.c b/src/core/lib/support/tmpfile_msys.c index f0f803aa754..2fdc89a64f2 100644 --- a/src/core/lib/support/tmpfile_msys.c +++ b/src/core/lib/support/tmpfile_msys.c @@ -57,15 +57,13 @@ FILE *gpr_tmpfile(const char *prefix, char **tmp_filename_out) { /* Generate a unique filename with our template + temporary path. */ success = GetTempFileNameA(".", prefix, 0, tmp_filename); fprintf(stderr, "success = %d\n", success); - if (!success) goto end; - /* Open a file there. */ - result = fopen(tmp_filename, "wb+"); - fprintf(stderr, "result = %p\n", result); - if (result == NULL) goto end; - -end: - if (result && tmp_filename_out) { + if (success) { + /* Open a file there. */ + result = fopen(tmp_filename, "wb+"); + fprintf(stderr, "result = %p\n", result); + } + if (result != NULL && tmp_filename_out) { *tmp_filename_out = gpr_strdup(tmp_filename); } diff --git a/third_party/boringssl b/third_party/boringssl index 907ae62b9d8..c880e42ba1c 160000 --- a/third_party/boringssl +++ b/third_party/boringssl @@ -1 +1 @@ -Subproject commit 907ae62b9d81121cb86b604f83e6b811a43f7a87 +Subproject commit c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9 From 73dcbda5b006fac4651480f7692b30db993b79b9 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Sat, 23 Apr 2016 00:17:05 -0700 Subject: [PATCH 0074/1894] Validation for incoming compressed data --- include/grpc/compression.h | 3 +- src/core/lib/channel/channel_args.c | 12 +- src/core/lib/surface/call.c | 133 +++++++++++--- src/core/lib/surface/channel.c | 16 +- src/core/lib/surface/channel.h | 4 + test/core/channel/channel_args_test.c | 2 + test/core/end2end/tests/compressed_payload.c | 178 ++++++++++++++++++- 7 files changed, 318 insertions(+), 30 deletions(-) diff --git a/include/grpc/compression.h b/include/grpc/compression.h index 8de4b133d4c..22bcf0e3020 100644 --- a/include/grpc/compression.h +++ b/include/grpc/compression.h @@ -51,7 +51,8 @@ GRPCAPI int grpc_compression_algorithm_parse( grpc_compression_algorithm *algorithm); /** Updates \a name with the encoding name corresponding to a valid \a - * algorithm. Returns 1 upon success, 0 otherwise. */ + * algorithm. Note that \a name is statically allocated and must *not* be freed. + * Returns 1 upon success, 0 otherwise. */ GRPCAPI int grpc_compression_algorithm_name( grpc_compression_algorithm algorithm, char **name); diff --git a/src/core/lib/channel/channel_args.c b/src/core/lib/channel/channel_args.c index 28d2d78d00f..d6b95fe6449 100644 --- a/src/core/lib/channel/channel_args.c +++ b/src/core/lib/channel/channel_args.c @@ -35,6 +35,7 @@ #include #include "src/core/lib/support/string.h" +#include #include #include #include @@ -180,6 +181,7 @@ grpc_compression_algorithm grpc_channel_args_get_compression_algorithm( grpc_channel_args *grpc_channel_args_set_compression_algorithm( grpc_channel_args *a, grpc_compression_algorithm algorithm) { + GPR_ASSERT(algorithm < GRPC_COMPRESS_ALGORITHMS_COUNT); grpc_arg tmp; tmp.type = GRPC_ARG_INTEGER; tmp.key = GRPC_COMPRESSION_ALGORITHM_ARG; @@ -212,7 +214,15 @@ grpc_channel_args *grpc_channel_args_compression_algorithm_set_state( const int states_arg_found = find_compression_algorithm_states_bitset(*a, &states_arg); - if (states_arg_found) { + if (grpc_channel_args_get_compression_algorithm(*a) == algorithm && + state == 0) { + char *algo_name = NULL; + GPR_ASSERT(grpc_compression_algorithm_name(algorithm, &algo_name) != 0); + gpr_log(GPR_ERROR, + "Tried to disable default compression algorithm '%s'. The " + "operation has been ignored.", + algo_name); + } else if (states_arg_found) { if (state != 0) { GPR_BITSET((unsigned *)states_arg, algorithm); } else { diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 6581bbd3d1d..2462adc26a0 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -52,7 +53,9 @@ #include "src/core/lib/surface/call.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/surface/completion_queue.h" +#include "src/core/lib/transport/metadata.h" #include "src/core/lib/transport/static_metadata.h" +#include "src/core/lib/transport/transport.h" /** The maximum number of concurrent batches possible. Based upon the maximum number of individually queueable ops in the batch @@ -240,6 +243,9 @@ static void execute_op(grpc_exec_ctx *exec_ctx, grpc_call *call, static grpc_call_error cancel_with_status(grpc_exec_ctx *exec_ctx, grpc_call *c, grpc_status_code status, const char *description); +static grpc_call_error close_with_status(grpc_exec_ctx *exec_ctx, grpc_call *c, + grpc_status_code status, + const char *description); static void destroy_call(grpc_exec_ctx *exec_ctx, void *call_stack, bool success); static void receiving_slice_ready(grpc_exec_ctx *exec_ctx, void *bctlp, @@ -410,7 +416,30 @@ static void set_status_code(grpc_call *call, status_source source, static void set_compression_algorithm(grpc_call *call, grpc_compression_algorithm algo) { - call->compression_algorithm = algo; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + char *error_msg = NULL; + const grpc_compression_options compression_options = + grpc_channel_get_compression_options(call->channel); + + /* check if algorithm is known */ + if (algo >= GRPC_COMPRESS_ALGORITHMS_COUNT) { + gpr_asprintf(&error_msg, "Invalid compression algorithm value '%d'.", algo); + gpr_log(GPR_ERROR, error_msg); + close_with_status(&exec_ctx, call, GRPC_STATUS_INTERNAL, error_msg); + } else if (grpc_compression_options_is_algorithm_enabled(&compression_options, + algo) == 0) { + /* check if algorithm is supported by current channel config */ + char *algo_name; + grpc_compression_algorithm_name(algo, &algo_name); + gpr_asprintf(&error_msg, "Compression algorithm '%s' is disabled.", + algo_name); + gpr_log(GPR_ERROR, error_msg); + close_with_status(&exec_ctx, call, GRPC_STATUS_INTERNAL, error_msg); + } else { + call->compression_algorithm = algo; + } + gpr_free(error_msg); + grpc_exec_ctx_finish(&exec_ctx); } grpc_compression_algorithm grpc_call_test_only_get_compression_algorithm( @@ -694,48 +723,102 @@ grpc_call_error grpc_call_cancel_with_status(grpc_call *c, return r; } -typedef struct cancel_closure { +typedef struct termination_closure { grpc_closure closure; grpc_call *call; grpc_status_code status; -} cancel_closure; + gpr_slice optional_message; + grpc_closure *op_closure; + enum { TC_CANCEL, TC_CLOSE } type; +} termination_closure; + +static void done_termination(grpc_exec_ctx *exec_ctx, void *tcp, bool success) { + termination_closure *tc = tcp; + if (tc->type == TC_CANCEL) { + GRPC_CALL_INTERNAL_UNREF(exec_ctx, tc->call, "cancel"); + } + if (tc->type == TC_CLOSE) { + GRPC_CALL_INTERNAL_UNREF(exec_ctx, tc->call, "close"); + } + gpr_slice_unref(tc->optional_message); + if (tc->op_closure != NULL) { + grpc_exec_ctx_enqueue(exec_ctx, tc->op_closure, false, NULL); + } + gpr_free(tc); +} -static void done_cancel(grpc_exec_ctx *exec_ctx, void *ccp, bool success) { - cancel_closure *cc = ccp; - GRPC_CALL_INTERNAL_UNREF(exec_ctx, cc->call, "cancel"); - gpr_free(cc); +static void send_cancel(grpc_exec_ctx *exec_ctx, void *tcp, bool success) { + grpc_transport_stream_op op; + termination_closure *tc = tcp; + memset(&op, 0, sizeof(op)); + op.cancel_with_status = tc->status; + /* reuse closure to catch completion */ + grpc_closure_init(&tc->closure, done_termination, tc); + op.on_complete = &tc->closure; + execute_op(exec_ctx, tc->call, &op); } -static void send_cancel(grpc_exec_ctx *exec_ctx, void *ccp, bool success) { +static void send_close(grpc_exec_ctx *exec_ctx, void *tcp, bool success) { grpc_transport_stream_op op; - cancel_closure *cc = ccp; + termination_closure *tc = tcp; memset(&op, 0, sizeof(op)); - op.cancel_with_status = cc->status; + tc->optional_message = gpr_slice_ref(tc->optional_message); + grpc_transport_stream_op_add_close(&op, tc->status, &tc->optional_message); /* reuse closure to catch completion */ - grpc_closure_init(&cc->closure, done_cancel, cc); - op.on_complete = &cc->closure; - execute_op(exec_ctx, cc->call, &op); + grpc_closure_init(&tc->closure, done_termination, tc); + tc->op_closure = op.on_complete; + op.on_complete = &tc->closure; + execute_op(exec_ctx, tc->call, &op); +} + +static grpc_call_error terminate_with_status(grpc_exec_ctx *exec_ctx, + termination_closure *tc) { + grpc_mdstr *details = NULL; + if (GPR_SLICE_LENGTH(tc->optional_message) > 0) { + tc->optional_message = gpr_slice_ref(tc->optional_message); + details = grpc_mdstr_from_slice(tc->optional_message); + } + + set_status_code(tc->call, STATUS_FROM_API_OVERRIDE, (uint32_t)tc->status); + set_status_details(tc->call, STATUS_FROM_API_OVERRIDE, details); + + if (tc->type == TC_CANCEL) { + grpc_closure_init(&tc->closure, send_cancel, tc); + GRPC_CALL_INTERNAL_REF(tc->call, "cancel"); + } else if (tc->type == TC_CLOSE) { + grpc_closure_init(&tc->closure, send_close, tc); + GRPC_CALL_INTERNAL_REF(tc->call, "close"); + } + grpc_exec_ctx_enqueue(exec_ctx, &tc->closure, true, NULL); + return GRPC_CALL_OK; } static grpc_call_error cancel_with_status(grpc_exec_ctx *exec_ctx, grpc_call *c, grpc_status_code status, const char *description) { - grpc_mdstr *details = - description ? grpc_mdstr_from_string(description) : NULL; - cancel_closure *cc = gpr_malloc(sizeof(*cc)); - + termination_closure *tc = gpr_malloc(sizeof(*tc)); + memset(tc, 0, sizeof(termination_closure)); + tc->type = TC_CANCEL; + tc->call = c; + tc->optional_message = gpr_slice_from_copied_string(description); GPR_ASSERT(status != GRPC_STATUS_OK); + tc->status = status; - set_status_code(c, STATUS_FROM_API_OVERRIDE, (uint32_t)status); - set_status_details(c, STATUS_FROM_API_OVERRIDE, details); + return terminate_with_status(exec_ctx, tc); +} - grpc_closure_init(&cc->closure, send_cancel, cc); - cc->call = c; - cc->status = status; - GRPC_CALL_INTERNAL_REF(c, "cancel"); - grpc_exec_ctx_enqueue(exec_ctx, &cc->closure, true, NULL); +static grpc_call_error close_with_status(grpc_exec_ctx *exec_ctx, grpc_call *c, + grpc_status_code status, + const char *description) { + termination_closure *tc = gpr_malloc(sizeof(*tc)); + memset(tc, 0, sizeof(termination_closure)); + tc->type = TC_CLOSE; + tc->call = c; + tc->optional_message = gpr_slice_from_copied_string(description); + GPR_ASSERT(status != GRPC_STATUS_OK); + tc->status = status; - return GRPC_CALL_OK; + return terminate_with_status(exec_ctx, tc); } static void execute_op(grpc_exec_ctx *exec_ctx, grpc_call *call, diff --git a/src/core/lib/surface/channel.c b/src/core/lib/surface/channel.c index b6b760b5d8d..72d0cfab2b0 100644 --- a/src/core/lib/surface/channel.c +++ b/src/core/lib/surface/channel.c @@ -36,16 +36,17 @@ #include #include +#include #include #include #include +#include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/iomgr.h" #include "src/core/lib/support/string.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/call.h" #include "src/core/lib/surface/channel_init.h" -#include "src/core/lib/surface/init.h" #include "src/core/lib/transport/static_metadata.h" /** Cache grpc-status: X mdelems for X = 0..NUM_CACHED_STATUS_ELEMS. @@ -64,6 +65,7 @@ typedef struct registered_call { struct grpc_channel { int is_client; uint32_t max_message_length; + grpc_compression_options compression_options; grpc_mdelem *default_authority; gpr_mu registered_call_mu; @@ -111,6 +113,7 @@ grpc_channel *grpc_channel_create(grpc_exec_ctx *exec_ctx, const char *target, channel->registered_calls = NULL; channel->max_message_length = DEFAULT_MAX_MESSAGE_LENGTH; + grpc_compression_options_init(&channel->compression_options); if (args) { for (size_t i = 0; i < args->num_args; i++) { if (0 == strcmp(args->args[i].key, GRPC_ARG_MAX_MESSAGE_LENGTH)) { @@ -153,6 +156,12 @@ grpc_channel *grpc_channel_create(grpc_exec_ctx *exec_ctx, const char *target, } } } + /* extract compression options */ + channel->compression_options.enabled_algorithms_bitset = + (uint32_t)grpc_channel_args_compression_algorithm_get_states(args); + channel->compression_options.default_compression_algorithm = + grpc_channel_args_get_compression_algorithm(args); + grpc_channel_args_destroy(args); } @@ -306,6 +315,11 @@ grpc_channel_stack *grpc_channel_get_channel_stack(grpc_channel *channel) { return CHANNEL_STACK_FROM_CHANNEL(channel); } +grpc_compression_options grpc_channel_get_compression_options( + const grpc_channel *channel) { + return channel->compression_options; +} + grpc_mdelem *grpc_channel_get_reffed_status_elem(grpc_channel *channel, int i) { char tmp[GPR_LTOA_MIN_BUFSIZE]; switch (i) { diff --git a/src/core/lib/surface/channel.h b/src/core/lib/surface/channel.h index 22dae930e4c..8f153fbc558 100644 --- a/src/core/lib/surface/channel.h +++ b/src/core/lib/surface/channel.h @@ -45,6 +45,10 @@ grpc_channel *grpc_channel_create(grpc_exec_ctx *exec_ctx, const char *target, /** Get a (borrowed) pointer to this channels underlying channel stack */ grpc_channel_stack *grpc_channel_get_channel_stack(grpc_channel *channel); +/** Return the compression options for \a channel */ +grpc_compression_options grpc_channel_get_compression_options( + const grpc_channel *channel); + /** Get a grpc_mdelem of grpc-status: X where X is the numeric value of status_code. diff --git a/test/core/channel/channel_args_test.c b/test/core/channel/channel_args_test.c index c7fc25960c0..1aa8c5dd2ae 100644 --- a/test/core/channel/channel_args_test.c +++ b/test/core/channel/channel_args_test.c @@ -135,8 +135,10 @@ static void test_compression_algorithm_states(void) { int main(int argc, char **argv) { grpc_test_init(argc, argv); + grpc_init(); test_create(); test_set_compression_algorithm(); test_compression_algorithm_states(); + grpc_shutdown(); return 0; } diff --git a/test/core/end2end/tests/compressed_payload.c b/test/core/end2end/tests/compressed_payload.c index 589bc314f8e..b713d399c0c 100644 --- a/test/core/end2end/tests/compressed_payload.c +++ b/test/core/end2end/tests/compressed_payload.c @@ -38,8 +38,10 @@ #include #include +#include #include #include +#include #include #include @@ -102,6 +104,170 @@ static void end_test(grpc_end2end_test_fixture *f) { grpc_completion_queue_destroy(f->cq); } +static void request_for_disabled_algorithm( + grpc_end2end_test_config config, const char *test_name, + uint32_t send_flags_bitmask, + grpc_compression_algorithm algorithm_to_disable, + grpc_compression_algorithm requested_client_compression_algorithm, + grpc_status_code expected_error, grpc_metadata *client_metadata) { + grpc_call *c; + grpc_call *s; + gpr_slice request_payload_slice; + grpc_byte_buffer *request_payload; + gpr_timespec deadline = five_seconds_time(); + grpc_channel_args *client_args; + grpc_channel_args *server_args; + grpc_end2end_test_fixture f; + 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_byte_buffer *request_payload_recv = NULL; + grpc_call_details call_details; + grpc_status_code status; + grpc_call_error error; + char *details = NULL; + size_t details_capacity = 0; + int was_cancelled = 2; + cq_verifier *cqv; + char str[1024]; + + memset(str, 'x', 1023); + str[1023] = '\0'; + request_payload_slice = gpr_slice_from_copied_string(str); + request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); + + client_args = grpc_channel_args_set_compression_algorithm( + NULL, requested_client_compression_algorithm); + server_args = + grpc_channel_args_set_compression_algorithm(NULL, GRPC_COMPRESS_NONE); + server_args = grpc_channel_args_compression_algorithm_set_state( + &server_args, algorithm_to_disable, false); + + f = begin_test(config, test_name, client_args, server_args); + cqv = cq_verifier_create(f.cq); + + c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, + "/foo", "foo.test.google.fr", deadline, NULL); + GPR_ASSERT(c); + + 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); + + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + if (client_metadata != NULL) { + op->data.send_initial_metadata.count = 1; + op->data.send_initial_metadata.metadata = client_metadata; + } else { + op->data.send_initial_metadata.count = 0; + } + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message = request_payload; + op->flags = send_flags_bitmask; + op->reserved = NULL; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata = &initial_metadata_recv; + op->flags = 0; + op->reserved = NULL; + op++; + 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->data.recv_status_on_client.status_details_capacity = &details_capacity; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + 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), 1); + cq_verify(cqv); + + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &request_payload_recv; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + cq_expect_completion(cqv, tag(102), 0); + cq_verify(cqv); + + op = ops; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + cq_expect_completion(cqv, tag(103), 1); + cq_expect_completion(cqv, tag(1), 1); + cq_verify(cqv); + + /* call was cancelled (closed) ... */ + GPR_ASSERT(was_cancelled != 0); + /* with a certain error */ + GPR_ASSERT(status == expected_error); + + char *algo_name = NULL; + GPR_ASSERT(grpc_compression_algorithm_name(algorithm_to_disable, &algo_name)); + char *expected_details = NULL; + gpr_asprintf(&expected_details, "Compression algorithm '%s' is disabled.", + algo_name); + /* and we expect a specific reason for it */ + GPR_ASSERT(0 == strcmp(details, expected_details)); + gpr_free(expected_details); + GPR_ASSERT(0 == strcmp(call_details.method, "/foo")); + GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr")); + + gpr_free(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_call_destroy(c); + grpc_call_destroy(s); + + cq_verifier_destroy(cqv); + + gpr_slice_unref(request_payload_slice); + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(request_payload_recv); + + grpc_channel_args_destroy(client_args); + grpc_channel_args_destroy(server_args); + + end_test(&f); + config.tear_down_data(&f); +} + static void request_with_payload_template( grpc_end2end_test_config config, const char *test_name, uint32_t send_flags_bitmask, @@ -196,8 +362,8 @@ static void request_with_payload_template( cq_expect_completion(cqv, tag(101), 1); cq_verify(cqv); - GPR_ASSERT( - GPR_BITCOUNT(grpc_call_test_only_get_encodings_accepted_by_peer(s)) == 3); + GPR_ASSERT(GPR_BITCOUNT(grpc_call_test_only_get_encodings_accepted_by_peer( + s)) == GRPC_COMPRESS_ALGORITHMS_COUNT); GPR_ASSERT(GPR_BITGET(grpc_call_test_only_get_encodings_accepted_by_peer(s), GRPC_COMPRESS_NONE) != 0); GPR_ASSERT(GPR_BITGET(grpc_call_test_only_get_encodings_accepted_by_peer(s), @@ -330,11 +496,19 @@ static void test_invoke_request_with_compressed_payload_md_override( GRPC_COMPRESS_DEFLATE, GRPC_COMPRESS_NONE, &none_compression_override); } +static void test_invoke_request_with_invalid_algorithm( + grpc_end2end_test_config config) { + request_for_disabled_algorithm( + config, "test_invoke_request_with_invalid_algorithm", 0, + GRPC_COMPRESS_GZIP, GRPC_COMPRESS_GZIP, GRPC_STATUS_INTERNAL, NULL); +} + void compressed_payload(grpc_end2end_test_config config) { test_invoke_request_with_exceptionally_uncompressed_payload(config); test_invoke_request_with_uncompressed_payload(config); test_invoke_request_with_compressed_payload(config); test_invoke_request_with_compressed_payload_md_override(config); + test_invoke_request_with_invalid_algorithm(config); } void compressed_payload_pre_init(void) {} From 879b3b9efa634ab683fccc96261af6e7838e6b31 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 25 Apr 2016 11:23:38 -0700 Subject: [PATCH 0075/1894] PR comments --- src/core/ext/client_config/client_channel.c | 15 +++++++-------- src/core/lib/channel/channel_stack.c | 12 ++++++------ src/core/lib/channel/channel_stack.h | 6 +++--- src/core/lib/channel/connected_channel.c | 15 +++++++-------- src/core/lib/security/client_auth_filter.c | 15 +++++++-------- src/core/lib/surface/call.c | 15 ++++++++------- src/core/lib/surface/call.h | 2 +- src/core/lib/surface/channel.c | 8 ++++---- 8 files changed, 43 insertions(+), 45 deletions(-) diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index 5e9b02be376..87abfea5ff3 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -446,21 +446,20 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, gpr_mu_destroy(&chand->mu_config); } -static void cc_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem, - grpc_pollset *pollset, - grpc_pollset_set *or_pollset_set) { - GPR_ASSERT(!(pollset != NULL && or_pollset_set != NULL)); - GPR_ASSERT(pollset != NULL || or_pollset_set != NULL); +static void cc_set_pollset_or_pollset_set( + grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_pollset *pollset, + grpc_pollset_set *pollset_set_alternative) { + GPR_ASSERT((pollset == NULL) + (pollset_set_alternative == NULL) == 1); + GPR_ASSERT(pollset != NULL || pollset_set_alternative != NULL); call_data *calld = elem->call_data; if (pollset != NULL) { calld->pollset = pollset; grpc_pollset_set_add_pollset(exec_ctx, calld->pollset_set, pollset); - } else if (or_pollset_set != NULL) { + } else if (pollset_set_alternative != NULL) { calld->pollset = NULL; grpc_pollset_set_add_pollset_set(exec_ctx, calld->pollset_set, - or_pollset_set); + pollset_set_alternative); } } diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index 0d0260d19e8..e02c164aaf0 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -191,22 +191,22 @@ void grpc_call_stack_init(grpc_exec_ctx *exec_ctx, void grpc_call_stack_set_pollset_or_pollset_set( grpc_exec_ctx *exec_ctx, grpc_call_stack *call_stack, grpc_pollset *pollset, - grpc_pollset_set *or_pollset_set) { + grpc_pollset_set *pollset_set_alternative) { size_t count = call_stack->count; grpc_call_element *call_elems; char *user_data; size_t i; - GPR_ASSERT(!(pollset != NULL && or_pollset_set != NULL)); - GPR_ASSERT(pollset != NULL || or_pollset_set != NULL); + GPR_ASSERT((pollset == NULL) + (pollset_set_alternative == NULL) == 1); + GPR_ASSERT(pollset != NULL || pollset_set_alternative != NULL); call_elems = CALL_ELEMS_FROM_STACK(call_stack); user_data = ((char *)call_elems) + ROUND_UP_TO_ALIGNMENT_SIZE(count * sizeof(grpc_call_element)); /* init per-filter data */ for (i = 0; i < count; i++) { - call_elems[i].filter->set_pollset_or_pollset_set(exec_ctx, &call_elems[i], - pollset, or_pollset_set); + call_elems[i].filter->set_pollset_or_pollset_set( + exec_ctx, &call_elems[i], pollset, pollset_set_alternative); user_data += ROUND_UP_TO_ALIGNMENT_SIZE(call_elems[i].filter->sizeof_call_data); } @@ -214,7 +214,7 @@ void grpc_call_stack_set_pollset_or_pollset_set( void grpc_call_stack_ignore_set_pollset_or_pollset_set( grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_pollset *pollset, - grpc_pollset_set *or_pollset_set) {} + grpc_pollset_set *pollset_set_alternative) {} void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack) { grpc_call_element *elems = CALL_ELEMS_FROM_STACK(stack); diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index f349939117d..027bb23c1dd 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -104,7 +104,7 @@ typedef struct { void (*set_pollset_or_pollset_set)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_pollset *pollset, - grpc_pollset_set *or_pollset_set); + grpc_pollset_set *pollset_set_alternative); /* Destroy per call data. The filter does not need to do any chaining */ void (*destroy_call_elem)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem); @@ -203,7 +203,7 @@ void grpc_call_stack_init(grpc_exec_ctx *exec_ctx, * op is started */ void grpc_call_stack_set_pollset_or_pollset_set( grpc_exec_ctx *exec_ctx, grpc_call_stack *call_stack, grpc_pollset *pollset, - grpc_pollset_set *or_pollset_set); + grpc_pollset_set *pollset_set_alternative); #ifdef GRPC_STREAM_REFCOUNT_DEBUG #define GRPC_CALL_STACK_REF(call_stack, reason) \ @@ -233,7 +233,7 @@ void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack); * Does nothing. */ void grpc_call_stack_ignore_set_pollset_or_pollset_set( grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_pollset *pollset, - grpc_pollset_set *or_pollset_set); + grpc_pollset_set *pollset_set_alternative); /* Call the next operation in a call stack */ void grpc_call_next_op(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_transport_stream_op *op); diff --git a/src/core/lib/channel/connected_channel.c b/src/core/lib/channel/connected_channel.c index f445f59d0bf..405f0a2ecd6 100644 --- a/src/core/lib/channel/connected_channel.c +++ b/src/core/lib/channel/connected_channel.c @@ -93,22 +93,21 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, GPR_ASSERT(r == 0); } -static void set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem, - grpc_pollset *pollset, - grpc_pollset_set *or_pollset_set) { - GPR_ASSERT(!(pollset != NULL && or_pollset_set != NULL)); - GPR_ASSERT(pollset != NULL || or_pollset_set != NULL); +static void set_pollset_or_pollset_set( + grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_pollset *pollset, + grpc_pollset_set *pollset_set_alternative) { + GPR_ASSERT((pollset == NULL) + (pollset_set_alternative == NULL) == 1); + GPR_ASSERT(pollset != NULL || pollset_set_alternative != NULL); call_data *calld = elem->call_data; channel_data *chand = elem->channel_data; if (pollset != NULL) { grpc_transport_set_pollset(exec_ctx, chand->transport, TRANSPORT_STREAM_FROM_CALL_DATA(calld), pollset); - } else if (or_pollset_set != NULL) { + } else if (pollset_set_alternative != NULL) { grpc_transport_set_pollset_set(exec_ctx, chand->transport, TRANSPORT_STREAM_FROM_CALL_DATA(calld), - or_pollset_set); + pollset_set_alternative); } } diff --git a/src/core/lib/security/client_auth_filter.c b/src/core/lib/security/client_auth_filter.c index 6cdbaae4921..5db9755c2be 100644 --- a/src/core/lib/security/client_auth_filter.c +++ b/src/core/lib/security/client_auth_filter.c @@ -271,19 +271,18 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, calld->pollset_set = grpc_pollset_set_create(); } -static void set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem, - grpc_pollset *pollset, - grpc_pollset_set *or_pollset_set) { - GPR_ASSERT(!(pollset != NULL && or_pollset_set != NULL)); - GPR_ASSERT(pollset != NULL || or_pollset_set != NULL); +static void set_pollset_or_pollset_set( + grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_pollset *pollset, + grpc_pollset_set *pollset_set_alternative) { + GPR_ASSERT((pollset == NULL) + (pollset_set_alternative == NULL) == 1); + GPR_ASSERT(pollset != NULL || pollset_set_alternative != NULL); call_data *calld = elem->call_data; if (pollset != NULL) { grpc_pollset_set_add_pollset(exec_ctx, calld->pollset_set, pollset); - } else if (or_pollset_set != NULL) { + } else if (pollset_set_alternative != NULL) { grpc_pollset_set_add_pollset_set(exec_ctx, calld->pollset_set, - or_pollset_set); + pollset_set_alternative); } } diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index d2935bedc19..4854f17dbc2 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -248,7 +248,7 @@ static void receiving_slice_ready(grpc_exec_ctx *exec_ctx, void *bctlp, grpc_call *grpc_call_create( grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, - grpc_completion_queue *cq, grpc_pollset_set *or_pollset_set, + grpc_completion_queue *cq, grpc_pollset_set *pollset_set_alternative, const void *server_transport_data, grpc_mdelem **add_initial_metadata, size_t add_initial_metadata_count, gpr_timespec send_deadline) { size_t i, j; @@ -261,12 +261,13 @@ grpc_call *grpc_call_create( gpr_mu_init(&call->mu); call->channel = channel; call->cq = cq; - if (cq != NULL && or_pollset_set != NULL) { - gpr_log(GPR_ERROR, - "Only one of 'cq' and 'or_pollset_set' should be non-NULL."); + if (cq != NULL && pollset_set_alternative != NULL) { + gpr_log( + GPR_ERROR, + "Only one of 'cq' and 'pollset_set_alternative' should be non-NULL."); abort(); } - call->pollset_set = or_pollset_set; + call->pollset_set = pollset_set_alternative; call->parent = parent_call; call->is_client = server_transport_data == NULL; if (call->is_client) { @@ -295,10 +296,10 @@ grpc_call *grpc_call_create( grpc_call_stack_set_pollset_or_pollset_set( &exec_ctx, CALL_STACK_FROM_CALL(call), grpc_cq_pollset(cq), NULL); } - if (or_pollset_set != NULL) { + if (pollset_set_alternative != NULL) { GPR_ASSERT(cq == NULL); grpc_call_stack_set_pollset_or_pollset_set( - &exec_ctx, CALL_STACK_FROM_CALL(call), NULL, or_pollset_set); + &exec_ctx, CALL_STACK_FROM_CALL(call), NULL, pollset_set_alternative); } if (parent_call != NULL) { GRPC_CALL_INTERNAL_REF(parent_call, "child"); diff --git a/src/core/lib/surface/call.h b/src/core/lib/surface/call.h index ba72a0ad3bb..b640345c21d 100644 --- a/src/core/lib/surface/call.h +++ b/src/core/lib/surface/call.h @@ -54,7 +54,7 @@ grpc_call *grpc_call_create(grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, grpc_completion_queue *cq, /* if not NULL, it'll be used in lieu of \a cq */ - grpc_pollset_set *or_pollset_set, + grpc_pollset_set *pollset_set_alternative, const void *server_transport_data, grpc_mdelem **add_initial_metadata, size_t add_initial_metadata_count, diff --git a/src/core/lib/surface/channel.c b/src/core/lib/surface/channel.c index 7e8959b7425..a7ea6fa1f08 100644 --- a/src/core/lib/surface/channel.c +++ b/src/core/lib/surface/channel.c @@ -166,14 +166,14 @@ char *grpc_channel_get_target(grpc_channel *channel) { static grpc_call *grpc_channel_create_call_internal( grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, - grpc_completion_queue *cq, grpc_pollset_set *or_pollset_set, + grpc_completion_queue *cq, grpc_pollset_set *pollset_set_alternative, grpc_mdelem *path_mdelem, grpc_mdelem *authority_mdelem, gpr_timespec deadline) { grpc_mdelem *send_metadata[2]; size_t num_metadata = 0; GPR_ASSERT(channel->is_client); - GPR_ASSERT(!(cq != NULL && or_pollset_set != NULL)); + GPR_ASSERT(!(cq != NULL && pollset_set_alternative != NULL)); send_metadata[num_metadata++] = path_mdelem; if (authority_mdelem != NULL) { @@ -183,8 +183,8 @@ static grpc_call *grpc_channel_create_call_internal( } return grpc_call_create(channel, parent_call, propagation_mask, cq, - or_pollset_set, NULL, send_metadata, num_metadata, - deadline); + pollset_set_alternative, NULL, send_metadata, + num_metadata, deadline); } grpc_call *grpc_channel_create_call(grpc_channel *channel, From 7f0793ad623ae1dd2b175306a0e7eb060d53511b Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 25 Apr 2016 12:35:58 -0700 Subject: [PATCH 0076/1894] Updated load balancer proto to v1 --- BUILD | 12 +- Makefile | 18 +- binding.gyp | 2 +- build.yaml | 6 +- config.m4 | 4 +- gRPC.podspec | 6 +- grpc.gemspec | 4 +- package.xml | 4 +- .../ext/lb_policy/grpclb/load_balancer_api.c | 14 +- .../ext/lb_policy/grpclb/load_balancer_api.h | 10 +- .../proto/grpc/lb/v0/load_balancer.pb.h | 182 ------------------ .../grpc/lb/{v0 => v1}/load_balancer.pb.c | 59 +++--- .../proto/grpc/lb/v1/load_balancer.pb.h | 178 +++++++++++++++++ src/proto/grpc/lb/v0/load_balancer.options | 6 - src/proto/grpc/lb/v1/load_balancer.options | 6 + .../grpc/lb/{v0 => v1}/load_balancer.proto | 11 +- src/python/grpcio/grpc_core_dependencies.py | 2 +- test/cpp/grpclb/grpclb_api_test.cc | 11 +- tools/codegen/core/gen_nano_proto.sh | 6 +- tools/distrib/check_include_guards.py | 2 +- tools/distrib/check_nanopb_output.sh | 6 +- tools/doxygen/Doxyfile.core.internal | 4 +- tools/run_tests/sources_and_headers.json | 10 +- vsprojects/vcxproj/grpc/grpc.vcxproj | 4 +- vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 12 +- .../grpc_unsecure/grpc_unsecure.vcxproj | 4 +- .../grpc_unsecure.vcxproj.filters | 12 +- .../grpclb_api_test/grpclb_api_test.vcxproj | 8 +- .../grpclb_api_test.vcxproj.filters | 8 +- 29 files changed, 299 insertions(+), 312 deletions(-) delete mode 100644 src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h rename src/core/ext/lb_policy/grpclb/proto/grpc/lb/{v0 => v1}/load_balancer.pb.c (55%) create mode 100644 src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h delete mode 100644 src/proto/grpc/lb/v0/load_balancer.options create mode 100644 src/proto/grpc/lb/v1/load_balancer.options rename src/proto/grpc/lb/{v0 => v1}/load_balancer.proto (94%) diff --git a/BUILD b/BUILD index f8e7661ad46..ff5220bc8ed 100644 --- a/BUILD +++ b/BUILD @@ -284,7 +284,7 @@ cc_library( "src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/uri_parser.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", "src/core/ext/census/aggregation.h", "src/core/ext/census/census_interface.h", "src/core/ext/census/census_rpc_stats.h", @@ -438,7 +438,7 @@ cc_library( "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c", + "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/round_robin/round_robin.c", "src/core/ext/resolver/dns/native/dns_resolver.c", @@ -615,7 +615,7 @@ cc_library( "src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/uri_parser.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", "src/core/ext/census/aggregation.h", "src/core/ext/census/census_interface.h", "src/core/ext/census/census_rpc_stats.h", @@ -751,7 +751,7 @@ cc_library( "src/core/ext/resolver/dns/native/dns_resolver.c", "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c", + "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/round_robin/round_robin.c", "src/core/ext/census/context.c", @@ -1450,7 +1450,7 @@ objc_library( "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c", + "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/round_robin/round_robin.c", "src/core/ext/resolver/dns/native/dns_resolver.c", @@ -1620,7 +1620,7 @@ objc_library( "src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/uri_parser.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", "src/core/ext/census/aggregation.h", "src/core/ext/census/census_interface.h", "src/core/ext/census/census_rpc_stats.h", diff --git a/Makefile b/Makefile index 12022c2dd95..027a24664a8 100644 --- a/Makefile +++ b/Makefile @@ -1862,15 +1862,15 @@ $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc: $(Q) echo "$(GRPCXX_UNSECURE_PC_FILE)" | tr , '\n' >$@ ifeq ($(NO_PROTOC),true) -$(GENDIR)/src/proto/grpc/lb/v0/load_balancer.pb.cc: protoc_dep_error -$(GENDIR)/src/proto/grpc/lb/v0/load_balancer.grpc.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/lb/v1/load_balancer.pb.cc: protoc_dep_error +$(GENDIR)/src/proto/grpc/lb/v1/load_balancer.grpc.pb.cc: protoc_dep_error else -$(GENDIR)/src/proto/grpc/lb/v0/load_balancer.pb.cc: src/proto/grpc/lb/v0/load_balancer.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/lb/v1/load_balancer.pb.cc: src/proto/grpc/lb/v1/load_balancer.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< -$(GENDIR)/src/proto/grpc/lb/v0/load_balancer.grpc.pb.cc: src/proto/grpc/lb/v0/load_balancer.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) +$(GENDIR)/src/proto/grpc/lb/v1/load_balancer.grpc.pb.cc: src/proto/grpc/lb/v1/load_balancer.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< @@ -2597,7 +2597,7 @@ LIBGRPC_SRC = \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ - src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c \ + src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ @@ -2917,7 +2917,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/resolver/dns/native/dns_resolver.c \ src/core/ext/resolver/sockaddr/sockaddr_resolver.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ - src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c \ + src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ @@ -10602,7 +10602,7 @@ endif GRPCLB_API_TEST_SRC = \ - $(GENDIR)/src/proto/grpc/lb/v0/load_balancer.pb.cc $(GENDIR)/src/proto/grpc/lb/v0/load_balancer.grpc.pb.cc \ + $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.pb.cc $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.grpc.pb.cc \ test/cpp/grpclb/grpclb_api_test.cc \ GRPCLB_API_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPCLB_API_TEST_SRC)))) @@ -10634,7 +10634,7 @@ endif endif -$(OBJDIR)/$(CONFIG)/src/proto/grpc/lb/v0/load_balancer.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a +$(OBJDIR)/$(CONFIG)/src/proto/grpc/lb/v1/load_balancer.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(OBJDIR)/$(CONFIG)/test/cpp/grpclb/grpclb_api_test.o: $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a @@ -10645,7 +10645,7 @@ ifneq ($(NO_DEPS),true) -include $(GRPCLB_API_TEST_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/grpclb/grpclb_api_test.o: $(GENDIR)/src/proto/grpc/lb/v0/load_balancer.pb.cc $(GENDIR)/src/proto/grpc/lb/v0/load_balancer.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/grpclb/grpclb_api_test.o: $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.pb.cc $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.grpc.pb.cc HYBRID_END2END_TEST_SRC = \ diff --git a/binding.gyp b/binding.gyp index 058743edbf8..0fecc66c460 100644 --- a/binding.gyp +++ b/binding.gyp @@ -708,7 +708,7 @@ 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', - 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c', + 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c', 'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c', diff --git a/build.yaml b/build.yaml index 26308e8db5d..d5cfb3c2d61 100644 --- a/build.yaml +++ b/build.yaml @@ -359,10 +359,10 @@ filegroups: - name: grpc_lb_policy_grpclb headers: - src/core/ext/lb_policy/grpclb/load_balancer_api.h - - src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h + - src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h src: - src/core/ext/lb_policy/grpclb/load_balancer_api.c - - src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c + - src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c uses: - grpc_base - grpc_client_config @@ -2601,7 +2601,7 @@ targets: build: test language: c++ src: - - src/proto/grpc/lb/v0/load_balancer.proto + - src/proto/grpc/lb/v1/load_balancer.proto - test/cpp/grpclb/grpclb_api_test.cc deps: - grpc++_test_util diff --git a/config.m4 b/config.m4 index 2d930a648e1..c60297213d2 100644 --- a/config.m4 +++ b/config.m4 @@ -227,7 +227,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ - src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c \ + src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ @@ -553,7 +553,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/census) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/client_config) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/grpclb) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/pick_first) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/round_robin) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/resolver/dns/native) diff --git a/gRPC.podspec b/gRPC.podspec index d66e03354bb..6f631c1c558 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -286,7 +286,7 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/subchannel_index.h', 'src/core/ext/client_config/uri_parser.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', - 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h', + 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h', 'third_party/nanopb/pb.h', 'third_party/nanopb/pb_common.h', 'third_party/nanopb/pb_decode.h', @@ -472,7 +472,7 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', - 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c', + 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c', 'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c', @@ -628,7 +628,7 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/subchannel_index.h', 'src/core/ext/client_config/uri_parser.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', - 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h', + 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h', 'third_party/nanopb/pb.h', 'third_party/nanopb/pb_common.h', 'third_party/nanopb/pb_decode.h', diff --git a/grpc.gemspec b/grpc.gemspec index f83b7d35872..1512da6b569 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -298,7 +298,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_config/subchannel_index.h ) s.files += %w( src/core/ext/client_config/uri_parser.h ) s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.h ) - s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h ) + s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h ) s.files += %w( third_party/nanopb/pb.h ) s.files += %w( third_party/nanopb/pb_common.h ) s.files += %w( third_party/nanopb/pb_decode.h ) @@ -456,7 +456,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2.c ) s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create.c ) s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.c ) - s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c ) + s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c ) s.files += %w( third_party/nanopb/pb_common.c ) s.files += %w( third_party/nanopb/pb_decode.c ) s.files += %w( third_party/nanopb/pb_encode.c ) diff --git a/package.xml b/package.xml index d192ebde2cc..295901aaffe 100644 --- a/package.xml +++ b/package.xml @@ -301,7 +301,7 @@ - + @@ -459,7 +459,7 @@ - + diff --git a/src/core/ext/lb_policy/grpclb/load_balancer_api.c b/src/core/ext/lb_policy/grpclb/load_balancer_api.c index 459d6d9954d..59b89997dd9 100644 --- a/src/core/ext/lb_policy/grpclb/load_balancer_api.c +++ b/src/core/ext/lb_policy/grpclb/load_balancer_api.c @@ -50,7 +50,7 @@ static bool decode_serverlist(pb_istream_t *stream, const pb_field_t *field, decode_serverlist_arg *dec_arg = *arg; if (dec_arg->first_pass != 0) { /* first pass */ grpc_grpclb_server server; - if (!pb_decode(stream, grpc_lb_v0_Server_fields, &server)) { + if (!pb_decode(stream, grpc_lb_v1_Server_fields, &server)) { return false; } dec_arg->num_servers++; @@ -61,7 +61,7 @@ static bool decode_serverlist(pb_istream_t *stream, const pb_field_t *field, dec_arg->servers = gpr_malloc(sizeof(grpc_grpclb_server *) * dec_arg->num_servers); } - if (!pb_decode(stream, grpc_lb_v0_Server_fields, server)) { + if (!pb_decode(stream, grpc_lb_v1_Server_fields, server)) { return false; } dec_arg->servers[dec_arg->i++] = server; @@ -87,13 +87,13 @@ gpr_slice grpc_grpclb_request_encode(const grpc_grpclb_request *request) { pb_ostream_t outputstream; gpr_slice slice; memset(&sizestream, 0, sizeof(pb_ostream_t)); - pb_encode(&sizestream, grpc_lb_v0_LoadBalanceRequest_fields, request); + pb_encode(&sizestream, grpc_lb_v1_LoadBalanceRequest_fields, request); encoded_length = sizestream.bytes_written; slice = gpr_slice_malloc(encoded_length); outputstream = pb_ostream_from_buffer(GPR_SLICE_START_PTR(slice), encoded_length); - GPR_ASSERT(pb_encode(&outputstream, grpc_lb_v0_LoadBalanceRequest_fields, + GPR_ASSERT(pb_encode(&outputstream, grpc_lb_v1_LoadBalanceRequest_fields, request) != 0); return slice; } @@ -109,7 +109,7 @@ grpc_grpclb_response *grpc_grpclb_response_parse(gpr_slice encoded_response) { GPR_SLICE_LENGTH(encoded_response)); grpc_grpclb_response *res = gpr_malloc(sizeof(grpc_grpclb_response)); memset(res, 0, sizeof(*res)); - status = pb_decode(&stream, grpc_lb_v0_LoadBalanceResponse_fields, res); + status = pb_decode(&stream, grpc_lb_v1_LoadBalanceResponse_fields, res); if (!status) { grpc_grpclb_response_destroy(res); return NULL; @@ -132,7 +132,7 @@ grpc_grpclb_serverlist *grpc_grpclb_response_parse_serverlist( res->server_list.servers.funcs.decode = decode_serverlist; res->server_list.servers.arg = &arg; arg.first_pass = 1; - status = pb_decode(&stream, grpc_lb_v0_LoadBalanceResponse_fields, res); + status = pb_decode(&stream, grpc_lb_v1_LoadBalanceResponse_fields, res); if (!status) { grpc_grpclb_response_destroy(res); return NULL; @@ -140,7 +140,7 @@ grpc_grpclb_serverlist *grpc_grpclb_response_parse_serverlist( arg.first_pass = 0; status = - pb_decode(&stream_at_start, grpc_lb_v0_LoadBalanceResponse_fields, res); + pb_decode(&stream_at_start, grpc_lb_v1_LoadBalanceResponse_fields, res); if (!status) { grpc_grpclb_response_destroy(res); return NULL; diff --git a/src/core/ext/lb_policy/grpclb/load_balancer_api.h b/src/core/ext/lb_policy/grpclb/load_balancer_api.h index 968f7d278ae..71b5616d0c8 100644 --- a/src/core/ext/lb_policy/grpclb/load_balancer_api.h +++ b/src/core/ext/lb_policy/grpclb/load_balancer_api.h @@ -37,7 +37,7 @@ #include #include "src/core/ext/client_config/lb_policy_factory.h" -#include "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h" +#include "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h" #ifdef __cplusplus extern "C" { @@ -45,10 +45,10 @@ extern "C" { #define GRPC_GRPCLB_SERVICE_NAME_MAX_LENGTH 128 -typedef grpc_lb_v0_LoadBalanceRequest grpc_grpclb_request; -typedef grpc_lb_v0_LoadBalanceResponse grpc_grpclb_response; -typedef grpc_lb_v0_Server grpc_grpclb_server; -typedef grpc_lb_v0_Duration grpc_grpclb_duration; +typedef grpc_lb_v1_LoadBalanceRequest grpc_grpclb_request; +typedef grpc_lb_v1_LoadBalanceResponse grpc_grpclb_response; +typedef grpc_lb_v1_Server grpc_grpclb_server; +typedef grpc_lb_v1_Duration grpc_grpclb_duration; typedef struct grpc_grpclb_serverlist { grpc_grpclb_server **servers; size_t num_servers; diff --git a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h deleted file mode 100644 index 3599f881bb1..00000000000 --- a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h +++ /dev/null @@ -1,182 +0,0 @@ -/* - * - * Copyright 2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ -/* Automatically generated nanopb header */ -/* Generated by nanopb-0.3.5-dev */ - -#ifndef PB_LOAD_BALANCER_PB_H_INCLUDED -#define PB_LOAD_BALANCER_PB_H_INCLUDED -#include "third_party/nanopb/pb.h" -#if PB_PROTO_HEADER_VERSION != 30 -#error Regenerate this file with the current version of nanopb generator. -#endif - -#ifdef __cplusplus -extern "C" { -#endif - -/* Struct definitions */ -typedef struct _grpc_lb_v0_ClientStats { - bool has_total_requests; - int64_t total_requests; - bool has_client_rpc_errors; - int64_t client_rpc_errors; - bool has_dropped_requests; - int64_t dropped_requests; -} grpc_lb_v0_ClientStats; - -typedef struct _grpc_lb_v0_Duration { - bool has_seconds; - int64_t seconds; - bool has_nanos; - int32_t nanos; -} grpc_lb_v0_Duration; - -typedef struct _grpc_lb_v0_InitialLoadBalanceRequest { - bool has_name; - char name[128]; -} grpc_lb_v0_InitialLoadBalanceRequest; - -typedef PB_BYTES_ARRAY_T(64) grpc_lb_v0_Server_load_balance_token_t; -typedef struct _grpc_lb_v0_Server { - bool has_ip_address; - char ip_address[46]; - bool has_port; - int32_t port; - bool has_load_balance_token; - grpc_lb_v0_Server_load_balance_token_t load_balance_token; - bool has_drop_request; - bool drop_request; -} grpc_lb_v0_Server; - -typedef struct _grpc_lb_v0_InitialLoadBalanceResponse { - bool has_client_config; - char client_config[64]; - bool has_load_balancer_delegate; - char load_balancer_delegate[64]; - bool has_client_stats_report_interval; - grpc_lb_v0_Duration client_stats_report_interval; -} grpc_lb_v0_InitialLoadBalanceResponse; - -typedef struct _grpc_lb_v0_LoadBalanceRequest { - bool has_initial_request; - grpc_lb_v0_InitialLoadBalanceRequest initial_request; - bool has_client_stats; - grpc_lb_v0_ClientStats client_stats; -} grpc_lb_v0_LoadBalanceRequest; - -typedef struct _grpc_lb_v0_ServerList { - pb_callback_t servers; - bool has_expiration_interval; - grpc_lb_v0_Duration expiration_interval; -} grpc_lb_v0_ServerList; - -typedef struct _grpc_lb_v0_LoadBalanceResponse { - bool has_initial_response; - grpc_lb_v0_InitialLoadBalanceResponse initial_response; - bool has_server_list; - grpc_lb_v0_ServerList server_list; -} grpc_lb_v0_LoadBalanceResponse; - -/* Default values for struct fields */ - -/* Initializer values for message structs */ -#define grpc_lb_v0_Duration_init_default {false, 0, false, 0} -#define grpc_lb_v0_LoadBalanceRequest_init_default {false, grpc_lb_v0_InitialLoadBalanceRequest_init_default, false, grpc_lb_v0_ClientStats_init_default} -#define grpc_lb_v0_InitialLoadBalanceRequest_init_default {false, ""} -#define grpc_lb_v0_ClientStats_init_default {false, 0, false, 0, false, 0} -#define grpc_lb_v0_LoadBalanceResponse_init_default {false, grpc_lb_v0_InitialLoadBalanceResponse_init_default, false, grpc_lb_v0_ServerList_init_default} -#define grpc_lb_v0_InitialLoadBalanceResponse_init_default {false, "", false, "", false, grpc_lb_v0_Duration_init_default} -#define grpc_lb_v0_ServerList_init_default {{{NULL}, NULL}, false, grpc_lb_v0_Duration_init_default} -#define grpc_lb_v0_Server_init_default {false, "", false, 0, false, {0, {0}}, false, 0} -#define grpc_lb_v0_Duration_init_zero {false, 0, false, 0} -#define grpc_lb_v0_LoadBalanceRequest_init_zero {false, grpc_lb_v0_InitialLoadBalanceRequest_init_zero, false, grpc_lb_v0_ClientStats_init_zero} -#define grpc_lb_v0_InitialLoadBalanceRequest_init_zero {false, ""} -#define grpc_lb_v0_ClientStats_init_zero {false, 0, false, 0, false, 0} -#define grpc_lb_v0_LoadBalanceResponse_init_zero {false, grpc_lb_v0_InitialLoadBalanceResponse_init_zero, false, grpc_lb_v0_ServerList_init_zero} -#define grpc_lb_v0_InitialLoadBalanceResponse_init_zero {false, "", false, "", false, grpc_lb_v0_Duration_init_zero} -#define grpc_lb_v0_ServerList_init_zero {{{NULL}, NULL}, false, grpc_lb_v0_Duration_init_zero} -#define grpc_lb_v0_Server_init_zero {false, "", false, 0, false, {0, {0}}, false, 0} - -/* Field tags (for use in manual encoding/decoding) */ -#define grpc_lb_v0_ClientStats_total_requests_tag 1 -#define grpc_lb_v0_ClientStats_client_rpc_errors_tag 2 -#define grpc_lb_v0_ClientStats_dropped_requests_tag 3 -#define grpc_lb_v0_Duration_seconds_tag 1 -#define grpc_lb_v0_Duration_nanos_tag 2 -#define grpc_lb_v0_InitialLoadBalanceRequest_name_tag 1 -#define grpc_lb_v0_Server_ip_address_tag 1 -#define grpc_lb_v0_Server_port_tag 2 -#define grpc_lb_v0_Server_load_balance_token_tag 3 -#define grpc_lb_v0_Server_drop_request_tag 4 -#define grpc_lb_v0_InitialLoadBalanceResponse_client_config_tag 1 -#define grpc_lb_v0_InitialLoadBalanceResponse_load_balancer_delegate_tag 2 -#define grpc_lb_v0_InitialLoadBalanceResponse_client_stats_report_interval_tag 3 -#define grpc_lb_v0_LoadBalanceRequest_initial_request_tag 1 -#define grpc_lb_v0_LoadBalanceRequest_client_stats_tag 2 -#define grpc_lb_v0_ServerList_servers_tag 1 -#define grpc_lb_v0_ServerList_expiration_interval_tag 3 -#define grpc_lb_v0_LoadBalanceResponse_initial_response_tag 1 -#define grpc_lb_v0_LoadBalanceResponse_server_list_tag 2 - -/* Struct field encoding specification for nanopb */ -extern const pb_field_t grpc_lb_v0_Duration_fields[3]; -extern const pb_field_t grpc_lb_v0_LoadBalanceRequest_fields[3]; -extern const pb_field_t grpc_lb_v0_InitialLoadBalanceRequest_fields[2]; -extern const pb_field_t grpc_lb_v0_ClientStats_fields[4]; -extern const pb_field_t grpc_lb_v0_LoadBalanceResponse_fields[3]; -extern const pb_field_t grpc_lb_v0_InitialLoadBalanceResponse_fields[4]; -extern const pb_field_t grpc_lb_v0_ServerList_fields[3]; -extern const pb_field_t grpc_lb_v0_Server_fields[5]; - -/* Maximum encoded size of messages (where known) */ -#define grpc_lb_v0_Duration_size 22 -#define grpc_lb_v0_LoadBalanceRequest_size 169 -#define grpc_lb_v0_InitialLoadBalanceRequest_size 131 -#define grpc_lb_v0_ClientStats_size 33 -#define grpc_lb_v0_LoadBalanceResponse_size (165 + grpc_lb_v0_ServerList_size) -#define grpc_lb_v0_InitialLoadBalanceResponse_size 156 -#define grpc_lb_v0_Server_size 127 - -/* Message IDs (where set with "msgid" option) */ -#ifdef PB_MSGID - -#define LOAD_BALANCER_MESSAGES \ - - -#endif - -#ifdef __cplusplus -} /* extern "C" */ -#endif - -#endif diff --git a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c similarity index 55% rename from src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c rename to src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c index 97196731810..52e11c40bb0 100644 --- a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c +++ b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c @@ -33,7 +33,7 @@ /* Automatically generated nanopb constant definitions */ /* Generated by nanopb-0.3.5-dev */ -#include "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h" +#include "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h" #if PB_PROTO_HEADER_VERSION != 30 #error Regenerate this file with the current version of nanopb generator. @@ -41,54 +41,53 @@ -const pb_field_t grpc_lb_v0_Duration_fields[3] = { - PB_FIELD( 1, INT64 , OPTIONAL, STATIC , FIRST, grpc_lb_v0_Duration, seconds, seconds, 0), - PB_FIELD( 2, INT32 , OPTIONAL, STATIC , OTHER, grpc_lb_v0_Duration, nanos, seconds, 0), +const pb_field_t grpc_lb_v1_Duration_fields[3] = { + PB_FIELD( 1, INT64 , OPTIONAL, STATIC , FIRST, grpc_lb_v1_Duration, seconds, seconds, 0), + PB_FIELD( 2, INT32 , OPTIONAL, STATIC , OTHER, grpc_lb_v1_Duration, nanos, seconds, 0), PB_LAST_FIELD }; -const pb_field_t grpc_lb_v0_LoadBalanceRequest_fields[3] = { - PB_FIELD( 1, MESSAGE , OPTIONAL, STATIC , FIRST, grpc_lb_v0_LoadBalanceRequest, initial_request, initial_request, &grpc_lb_v0_InitialLoadBalanceRequest_fields), - PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_lb_v0_LoadBalanceRequest, client_stats, initial_request, &grpc_lb_v0_ClientStats_fields), +const pb_field_t grpc_lb_v1_LoadBalanceRequest_fields[3] = { + PB_FIELD( 1, MESSAGE , OPTIONAL, STATIC , FIRST, grpc_lb_v1_LoadBalanceRequest, initial_request, initial_request, &grpc_lb_v1_InitialLoadBalanceRequest_fields), + PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_lb_v1_LoadBalanceRequest, client_stats, initial_request, &grpc_lb_v1_ClientStats_fields), PB_LAST_FIELD }; -const pb_field_t grpc_lb_v0_InitialLoadBalanceRequest_fields[2] = { - PB_FIELD( 1, STRING , OPTIONAL, STATIC , FIRST, grpc_lb_v0_InitialLoadBalanceRequest, name, name, 0), +const pb_field_t grpc_lb_v1_InitialLoadBalanceRequest_fields[2] = { + PB_FIELD( 1, STRING , OPTIONAL, STATIC , FIRST, grpc_lb_v1_InitialLoadBalanceRequest, name, name, 0), PB_LAST_FIELD }; -const pb_field_t grpc_lb_v0_ClientStats_fields[4] = { - PB_FIELD( 1, INT64 , OPTIONAL, STATIC , FIRST, grpc_lb_v0_ClientStats, total_requests, total_requests, 0), - PB_FIELD( 2, INT64 , OPTIONAL, STATIC , OTHER, grpc_lb_v0_ClientStats, client_rpc_errors, total_requests, 0), - PB_FIELD( 3, INT64 , OPTIONAL, STATIC , OTHER, grpc_lb_v0_ClientStats, dropped_requests, client_rpc_errors, 0), +const pb_field_t grpc_lb_v1_ClientStats_fields[4] = { + PB_FIELD( 1, INT64 , OPTIONAL, STATIC , FIRST, grpc_lb_v1_ClientStats, total_requests, total_requests, 0), + PB_FIELD( 2, INT64 , OPTIONAL, STATIC , OTHER, grpc_lb_v1_ClientStats, client_rpc_errors, total_requests, 0), + PB_FIELD( 3, INT64 , OPTIONAL, STATIC , OTHER, grpc_lb_v1_ClientStats, dropped_requests, client_rpc_errors, 0), PB_LAST_FIELD }; -const pb_field_t grpc_lb_v0_LoadBalanceResponse_fields[3] = { - PB_FIELD( 1, MESSAGE , OPTIONAL, STATIC , FIRST, grpc_lb_v0_LoadBalanceResponse, initial_response, initial_response, &grpc_lb_v0_InitialLoadBalanceResponse_fields), - PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_lb_v0_LoadBalanceResponse, server_list, initial_response, &grpc_lb_v0_ServerList_fields), +const pb_field_t grpc_lb_v1_LoadBalanceResponse_fields[3] = { + PB_FIELD( 1, MESSAGE , OPTIONAL, STATIC , FIRST, grpc_lb_v1_LoadBalanceResponse, initial_response, initial_response, &grpc_lb_v1_InitialLoadBalanceResponse_fields), + PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_lb_v1_LoadBalanceResponse, server_list, initial_response, &grpc_lb_v1_ServerList_fields), PB_LAST_FIELD }; -const pb_field_t grpc_lb_v0_InitialLoadBalanceResponse_fields[4] = { - PB_FIELD( 1, STRING , OPTIONAL, STATIC , FIRST, grpc_lb_v0_InitialLoadBalanceResponse, client_config, client_config, 0), - PB_FIELD( 2, STRING , OPTIONAL, STATIC , OTHER, grpc_lb_v0_InitialLoadBalanceResponse, load_balancer_delegate, client_config, 0), - PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_lb_v0_InitialLoadBalanceResponse, client_stats_report_interval, load_balancer_delegate, &grpc_lb_v0_Duration_fields), +const pb_field_t grpc_lb_v1_InitialLoadBalanceResponse_fields[3] = { + PB_FIELD( 2, STRING , OPTIONAL, STATIC , FIRST, grpc_lb_v1_InitialLoadBalanceResponse, load_balancer_delegate, load_balancer_delegate, 0), + PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_lb_v1_InitialLoadBalanceResponse, client_stats_report_interval, load_balancer_delegate, &grpc_lb_v1_Duration_fields), PB_LAST_FIELD }; -const pb_field_t grpc_lb_v0_ServerList_fields[3] = { - PB_FIELD( 1, MESSAGE , REPEATED, CALLBACK, FIRST, grpc_lb_v0_ServerList, servers, servers, &grpc_lb_v0_Server_fields), - PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_lb_v0_ServerList, expiration_interval, servers, &grpc_lb_v0_Duration_fields), +const pb_field_t grpc_lb_v1_ServerList_fields[3] = { + PB_FIELD( 1, MESSAGE , REPEATED, CALLBACK, FIRST, grpc_lb_v1_ServerList, servers, servers, &grpc_lb_v1_Server_fields), + PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, grpc_lb_v1_ServerList, expiration_interval, servers, &grpc_lb_v1_Duration_fields), PB_LAST_FIELD }; -const pb_field_t grpc_lb_v0_Server_fields[5] = { - PB_FIELD( 1, STRING , OPTIONAL, STATIC , FIRST, grpc_lb_v0_Server, ip_address, ip_address, 0), - PB_FIELD( 2, INT32 , OPTIONAL, STATIC , OTHER, grpc_lb_v0_Server, port, ip_address, 0), - PB_FIELD( 3, BYTES , OPTIONAL, STATIC , OTHER, grpc_lb_v0_Server, load_balance_token, port, 0), - PB_FIELD( 4, BOOL , OPTIONAL, STATIC , OTHER, grpc_lb_v0_Server, drop_request, load_balance_token, 0), +const pb_field_t grpc_lb_v1_Server_fields[5] = { + PB_FIELD( 1, STRING , OPTIONAL, STATIC , FIRST, grpc_lb_v1_Server, ip_address, ip_address, 0), + PB_FIELD( 2, INT32 , OPTIONAL, STATIC , OTHER, grpc_lb_v1_Server, port, ip_address, 0), + PB_FIELD( 3, STRING , OPTIONAL, STATIC , OTHER, grpc_lb_v1_Server, load_balance_token, port, 0), + PB_FIELD( 4, BOOL , OPTIONAL, STATIC , OTHER, grpc_lb_v1_Server, drop_request, load_balance_token, 0), PB_LAST_FIELD }; @@ -102,7 +101,7 @@ const pb_field_t grpc_lb_v0_Server_fields[5] = { * numbers or field sizes that are larger than what can fit in 8 or 16 bit * field descriptors. */ -PB_STATIC_ASSERT((pb_membersize(grpc_lb_v0_LoadBalanceRequest, initial_request) < 65536 && pb_membersize(grpc_lb_v0_LoadBalanceRequest, client_stats) < 65536 && pb_membersize(grpc_lb_v0_LoadBalanceResponse, initial_response) < 65536 && pb_membersize(grpc_lb_v0_LoadBalanceResponse, server_list) < 65536 && pb_membersize(grpc_lb_v0_InitialLoadBalanceResponse, client_stats_report_interval) < 65536 && pb_membersize(grpc_lb_v0_ServerList, servers) < 65536 && pb_membersize(grpc_lb_v0_ServerList, expiration_interval) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_grpc_lb_v0_Duration_grpc_lb_v0_LoadBalanceRequest_grpc_lb_v0_InitialLoadBalanceRequest_grpc_lb_v0_ClientStats_grpc_lb_v0_LoadBalanceResponse_grpc_lb_v0_InitialLoadBalanceResponse_grpc_lb_v0_ServerList_grpc_lb_v0_Server) +PB_STATIC_ASSERT((pb_membersize(grpc_lb_v1_LoadBalanceRequest, initial_request) < 65536 && pb_membersize(grpc_lb_v1_LoadBalanceRequest, client_stats) < 65536 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, initial_response) < 65536 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, server_list) < 65536 && pb_membersize(grpc_lb_v1_InitialLoadBalanceResponse, client_stats_report_interval) < 65536 && pb_membersize(grpc_lb_v1_ServerList, servers) < 65536 && pb_membersize(grpc_lb_v1_ServerList, expiration_interval) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_grpc_lb_v1_Duration_grpc_lb_v1_LoadBalanceRequest_grpc_lb_v1_InitialLoadBalanceRequest_grpc_lb_v1_ClientStats_grpc_lb_v1_LoadBalanceResponse_grpc_lb_v1_InitialLoadBalanceResponse_grpc_lb_v1_ServerList_grpc_lb_v1_Server) #endif #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) @@ -113,7 +112,7 @@ PB_STATIC_ASSERT((pb_membersize(grpc_lb_v0_LoadBalanceRequest, initial_request) * numbers or field sizes that are larger than what can fit in the default * 8 bit descriptors. */ -PB_STATIC_ASSERT((pb_membersize(grpc_lb_v0_LoadBalanceRequest, initial_request) < 256 && pb_membersize(grpc_lb_v0_LoadBalanceRequest, client_stats) < 256 && pb_membersize(grpc_lb_v0_LoadBalanceResponse, initial_response) < 256 && pb_membersize(grpc_lb_v0_LoadBalanceResponse, server_list) < 256 && pb_membersize(grpc_lb_v0_InitialLoadBalanceResponse, client_stats_report_interval) < 256 && pb_membersize(grpc_lb_v0_ServerList, servers) < 256 && pb_membersize(grpc_lb_v0_ServerList, expiration_interval) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_grpc_lb_v0_Duration_grpc_lb_v0_LoadBalanceRequest_grpc_lb_v0_InitialLoadBalanceRequest_grpc_lb_v0_ClientStats_grpc_lb_v0_LoadBalanceResponse_grpc_lb_v0_InitialLoadBalanceResponse_grpc_lb_v0_ServerList_grpc_lb_v0_Server) +PB_STATIC_ASSERT((pb_membersize(grpc_lb_v1_LoadBalanceRequest, initial_request) < 256 && pb_membersize(grpc_lb_v1_LoadBalanceRequest, client_stats) < 256 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, initial_response) < 256 && pb_membersize(grpc_lb_v1_LoadBalanceResponse, server_list) < 256 && pb_membersize(grpc_lb_v1_InitialLoadBalanceResponse, client_stats_report_interval) < 256 && pb_membersize(grpc_lb_v1_ServerList, servers) < 256 && pb_membersize(grpc_lb_v1_ServerList, expiration_interval) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_grpc_lb_v1_Duration_grpc_lb_v1_LoadBalanceRequest_grpc_lb_v1_InitialLoadBalanceRequest_grpc_lb_v1_ClientStats_grpc_lb_v1_LoadBalanceResponse_grpc_lb_v1_InitialLoadBalanceResponse_grpc_lb_v1_ServerList_grpc_lb_v1_Server) #endif diff --git a/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h new file mode 100644 index 00000000000..d5dc39ab94f --- /dev/null +++ b/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h @@ -0,0 +1,178 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ +/* Automatically generated nanopb header */ +/* Generated by nanopb-0.3.5-dev */ + +#ifndef PB_LOAD_BALANCER_PB_H_INCLUDED +#define PB_LOAD_BALANCER_PB_H_INCLUDED +#include "third_party/nanopb/pb.h" +#if PB_PROTO_HEADER_VERSION != 30 +#error Regenerate this file with the current version of nanopb generator. +#endif + +#ifdef __cplusplus +extern "C" { +#endif + +/* Struct definitions */ +typedef struct _grpc_lb_v1_ClientStats { + bool has_total_requests; + int64_t total_requests; + bool has_client_rpc_errors; + int64_t client_rpc_errors; + bool has_dropped_requests; + int64_t dropped_requests; +} grpc_lb_v1_ClientStats; + +typedef struct _grpc_lb_v1_Duration { + bool has_seconds; + int64_t seconds; + bool has_nanos; + int32_t nanos; +} grpc_lb_v1_Duration; + +typedef struct _grpc_lb_v1_InitialLoadBalanceRequest { + bool has_name; + char name[128]; +} grpc_lb_v1_InitialLoadBalanceRequest; + +typedef struct _grpc_lb_v1_Server { + bool has_ip_address; + char ip_address[46]; + bool has_port; + int32_t port; + bool has_load_balance_token; + char load_balance_token[64]; + bool has_drop_request; + bool drop_request; +} grpc_lb_v1_Server; + +typedef struct _grpc_lb_v1_InitialLoadBalanceResponse { + bool has_load_balancer_delegate; + char load_balancer_delegate[64]; + bool has_client_stats_report_interval; + grpc_lb_v1_Duration client_stats_report_interval; +} grpc_lb_v1_InitialLoadBalanceResponse; + +typedef struct _grpc_lb_v1_LoadBalanceRequest { + bool has_initial_request; + grpc_lb_v1_InitialLoadBalanceRequest initial_request; + bool has_client_stats; + grpc_lb_v1_ClientStats client_stats; +} grpc_lb_v1_LoadBalanceRequest; + +typedef struct _grpc_lb_v1_ServerList { + pb_callback_t servers; + bool has_expiration_interval; + grpc_lb_v1_Duration expiration_interval; +} grpc_lb_v1_ServerList; + +typedef struct _grpc_lb_v1_LoadBalanceResponse { + bool has_initial_response; + grpc_lb_v1_InitialLoadBalanceResponse initial_response; + bool has_server_list; + grpc_lb_v1_ServerList server_list; +} grpc_lb_v1_LoadBalanceResponse; + +/* Default values for struct fields */ + +/* Initializer values for message structs */ +#define grpc_lb_v1_Duration_init_default {false, 0, false, 0} +#define grpc_lb_v1_LoadBalanceRequest_init_default {false, grpc_lb_v1_InitialLoadBalanceRequest_init_default, false, grpc_lb_v1_ClientStats_init_default} +#define grpc_lb_v1_InitialLoadBalanceRequest_init_default {false, ""} +#define grpc_lb_v1_ClientStats_init_default {false, 0, false, 0, false, 0} +#define grpc_lb_v1_LoadBalanceResponse_init_default {false, grpc_lb_v1_InitialLoadBalanceResponse_init_default, false, grpc_lb_v1_ServerList_init_default} +#define grpc_lb_v1_InitialLoadBalanceResponse_init_default {false, "", false, grpc_lb_v1_Duration_init_default} +#define grpc_lb_v1_ServerList_init_default {{{NULL}, NULL}, false, grpc_lb_v1_Duration_init_default} +#define grpc_lb_v1_Server_init_default {false, "", false, 0, false, "", false, 0} +#define grpc_lb_v1_Duration_init_zero {false, 0, false, 0} +#define grpc_lb_v1_LoadBalanceRequest_init_zero {false, grpc_lb_v1_InitialLoadBalanceRequest_init_zero, false, grpc_lb_v1_ClientStats_init_zero} +#define grpc_lb_v1_InitialLoadBalanceRequest_init_zero {false, ""} +#define grpc_lb_v1_ClientStats_init_zero {false, 0, false, 0, false, 0} +#define grpc_lb_v1_LoadBalanceResponse_init_zero {false, grpc_lb_v1_InitialLoadBalanceResponse_init_zero, false, grpc_lb_v1_ServerList_init_zero} +#define grpc_lb_v1_InitialLoadBalanceResponse_init_zero {false, "", false, grpc_lb_v1_Duration_init_zero} +#define grpc_lb_v1_ServerList_init_zero {{{NULL}, NULL}, false, grpc_lb_v1_Duration_init_zero} +#define grpc_lb_v1_Server_init_zero {false, "", false, 0, false, "", false, 0} + +/* Field tags (for use in manual encoding/decoding) */ +#define grpc_lb_v1_ClientStats_total_requests_tag 1 +#define grpc_lb_v1_ClientStats_client_rpc_errors_tag 2 +#define grpc_lb_v1_ClientStats_dropped_requests_tag 3 +#define grpc_lb_v1_Duration_seconds_tag 1 +#define grpc_lb_v1_Duration_nanos_tag 2 +#define grpc_lb_v1_InitialLoadBalanceRequest_name_tag 1 +#define grpc_lb_v1_Server_ip_address_tag 1 +#define grpc_lb_v1_Server_port_tag 2 +#define grpc_lb_v1_Server_load_balance_token_tag 3 +#define grpc_lb_v1_Server_drop_request_tag 4 +#define grpc_lb_v1_InitialLoadBalanceResponse_load_balancer_delegate_tag 2 +#define grpc_lb_v1_InitialLoadBalanceResponse_client_stats_report_interval_tag 3 +#define grpc_lb_v1_LoadBalanceRequest_initial_request_tag 1 +#define grpc_lb_v1_LoadBalanceRequest_client_stats_tag 2 +#define grpc_lb_v1_ServerList_servers_tag 1 +#define grpc_lb_v1_ServerList_expiration_interval_tag 3 +#define grpc_lb_v1_LoadBalanceResponse_initial_response_tag 1 +#define grpc_lb_v1_LoadBalanceResponse_server_list_tag 2 + +/* Struct field encoding specification for nanopb */ +extern const pb_field_t grpc_lb_v1_Duration_fields[3]; +extern const pb_field_t grpc_lb_v1_LoadBalanceRequest_fields[3]; +extern const pb_field_t grpc_lb_v1_InitialLoadBalanceRequest_fields[2]; +extern const pb_field_t grpc_lb_v1_ClientStats_fields[4]; +extern const pb_field_t grpc_lb_v1_LoadBalanceResponse_fields[3]; +extern const pb_field_t grpc_lb_v1_InitialLoadBalanceResponse_fields[3]; +extern const pb_field_t grpc_lb_v1_ServerList_fields[3]; +extern const pb_field_t grpc_lb_v1_Server_fields[5]; + +/* Maximum encoded size of messages (where known) */ +#define grpc_lb_v1_Duration_size 22 +#define grpc_lb_v1_LoadBalanceRequest_size 169 +#define grpc_lb_v1_InitialLoadBalanceRequest_size 131 +#define grpc_lb_v1_ClientStats_size 33 +#define grpc_lb_v1_LoadBalanceResponse_size (98 + grpc_lb_v1_ServerList_size) +#define grpc_lb_v1_InitialLoadBalanceResponse_size 90 +#define grpc_lb_v1_Server_size 127 + +/* Message IDs (where set with "msgid" option) */ +#ifdef PB_MSGID + +#define LOAD_BALANCER_MESSAGES \ + + +#endif + +#ifdef __cplusplus +} /* extern "C" */ +#endif + +#endif diff --git a/src/proto/grpc/lb/v0/load_balancer.options b/src/proto/grpc/lb/v0/load_balancer.options deleted file mode 100644 index 6d4528f838a..00000000000 --- a/src/proto/grpc/lb/v0/load_balancer.options +++ /dev/null @@ -1,6 +0,0 @@ -grpc.lb.v0.InitialLoadBalanceRequest.name max_size:128 -grpc.lb.v0.InitialLoadBalanceResponse.client_config max_size:64 -grpc.lb.v0.InitialLoadBalanceResponse.load_balancer_delegate max_size:64 -grpc.lb.v0.Server.ip_address max_size:46 -grpc.lb.v0.Server.load_balance_token max_size:64 -load_balancer.proto no_unions:true diff --git a/src/proto/grpc/lb/v1/load_balancer.options b/src/proto/grpc/lb/v1/load_balancer.options new file mode 100644 index 00000000000..d90366996e7 --- /dev/null +++ b/src/proto/grpc/lb/v1/load_balancer.options @@ -0,0 +1,6 @@ +grpc.lb.v1.InitialLoadBalanceRequest.name max_size:128 +grpc.lb.v1.InitialLoadBalanceResponse.client_config max_size:64 +grpc.lb.v1.InitialLoadBalanceResponse.load_balancer_delegate max_size:64 +grpc.lb.v1.Server.ip_address max_size:46 +grpc.lb.v1.Server.load_balance_token max_size:64 +load_balancer.proto no_unions:true diff --git a/src/proto/grpc/lb/v0/load_balancer.proto b/src/proto/grpc/lb/v1/load_balancer.proto similarity index 94% rename from src/proto/grpc/lb/v0/load_balancer.proto rename to src/proto/grpc/lb/v1/load_balancer.proto index e88a4f8c4a7..1bcad0b1d4b 100644 --- a/src/proto/grpc/lb/v0/load_balancer.proto +++ b/src/proto/grpc/lb/v1/load_balancer.proto @@ -29,7 +29,7 @@ syntax = "proto3"; -package grpc.lb.v0; +package grpc.lb.v1; message Duration { @@ -94,9 +94,8 @@ message LoadBalanceResponse { message InitialLoadBalanceResponse { oneof initial_response_type { - // Contains gRPC config options like RPC deadline or flow control. - // TODO(yetianx): Change to ClientConfig after it is defined. - string client_config = 1; + // TODO(zhangkun83): ClientConfig not yet defined + //ClientConfig client_config = 1; // This is an application layer redirect that indicates the client should // use the specified server for load balancing. When this field is set in @@ -134,9 +133,7 @@ message Server { // An opaque token that is passed from the client to the server in metadata. // The server may expect this token to indicate that the request from the // client was load balanced. - // TODO(yetianx): Not used right now, and will be used after implementing - // load report. - bytes load_balance_token = 3; + string load_balance_token = 3; // Indicates whether this particular request should be dropped by the client // when this server is chosen from the list. diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index c5a0a398b43..e1fe5fc1f67 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -221,7 +221,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', - 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c', + 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c', 'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c', diff --git a/test/cpp/grpclb/grpclb_api_test.cc b/test/cpp/grpclb/grpclb_api_test.cc index 92f93c869c7..bf77878e0a6 100644 --- a/test/cpp/grpclb/grpclb_api_test.cc +++ b/test/cpp/grpclb/grpclb_api_test.cc @@ -35,13 +35,13 @@ #include #include "src/core/ext/lb_policy/grpclb/load_balancer_api.h" -#include "src/proto/grpc/lb/v0/load_balancer.pb.h" // C++ version +#include "src/proto/grpc/lb/v1/load_balancer.pb.h" // C++ version namespace grpc { namespace { -using grpc::lb::v0::LoadBalanceRequest; -using grpc::lb::v0::LoadBalanceResponse; +using grpc::lb::v1::LoadBalanceRequest; +using grpc::lb::v1::LoadBalanceResponse; class GrpclbTest : public ::testing::Test {}; @@ -60,9 +60,7 @@ TEST_F(GrpclbTest, CreateRequest) { TEST_F(GrpclbTest, ParseResponse) { LoadBalanceResponse response; - const std::string client_config_str = "I'm a client config"; auto* initial_response = response.mutable_initial_response(); - initial_response->set_client_config(client_config_str); auto* client_stats_report_interval = initial_response->mutable_client_stats_report_interval(); client_stats_report_interval->set_seconds(123); @@ -73,10 +71,7 @@ TEST_F(GrpclbTest, ParseResponse) { gpr_slice_from_copied_string(encoded_response.c_str()); grpc_grpclb_response* c_response = grpc_grpclb_response_parse(encoded_slice); EXPECT_TRUE(c_response->has_initial_response); - EXPECT_TRUE(c_response->initial_response.has_client_config); EXPECT_FALSE(c_response->initial_response.has_load_balancer_delegate); - EXPECT_TRUE(strcmp(c_response->initial_response.client_config, - client_config_str.c_str()) == 0); EXPECT_EQ(c_response->initial_response.client_stats_report_interval.seconds, 123); EXPECT_EQ(c_response->initial_response.client_stats_report_interval.nanos, diff --git a/tools/codegen/core/gen_nano_proto.sh b/tools/codegen/core/gen_nano_proto.sh index e2d2f672e93..b216a20379e 100755 --- a/tools/codegen/core/gen_nano_proto.sh +++ b/tools/codegen/core/gen_nano_proto.sh @@ -29,11 +29,11 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# # Example usage: # tools/codegen/core/gen_nano_proto.sh \ -# src/proto/grpc/lb/v0/load_balancer.proto -# $PWD/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0 +# src/proto/grpc/lb/v1/load_balancer.proto \ +# $PWD/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1 \ +# src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1 # # Exit statuses: # 1: Incorrect number of arguments diff --git a/tools/distrib/check_include_guards.py b/tools/distrib/check_include_guards.py index 897a899e7ed..b1fdb942cda 100755 --- a/tools/distrib/check_include_guards.py +++ b/tools/distrib/check_include_guards.py @@ -169,7 +169,7 @@ argp.add_argument('--precommit', args = argp.parse_args() KNOWN_BAD = set([ - 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h', + 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h', ]) diff --git a/tools/distrib/check_nanopb_output.sh b/tools/distrib/check_nanopb_output.sh index 92cb8ecbb49..c0707051a60 100755 --- a/tools/distrib/check_nanopb_output.sh +++ b/tools/distrib/check_nanopb_output.sh @@ -58,15 +58,15 @@ popd # # Checks for load_balancer.proto # -readonly LOAD_BALANCER_GRPC_OUTPUT_PATH='src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0' +readonly LOAD_BALANCER_GRPC_OUTPUT_PATH='src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1' # nanopb-compile the proto to a temp location ./tools/codegen/core/gen_nano_proto.sh \ - src/proto/grpc/lb/v0/load_balancer.proto \ + src/proto/grpc/lb/v1/load_balancer.proto \ "$NANOPB_TMP_OUTPUT" \ "$LOAD_BALANCER_GRPC_OUTPUT_PATH" # compare outputs to checked compiled code -if ! diff -r $NANOPB_TMP_OUTPUT src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0; then +if ! diff -r $NANOPB_TMP_OUTPUT src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1; then echo "Outputs differ: $NANOPB_TMP_OUTPUT vs $LOAD_BALANCER_GRPC_OUTPUT_PATH" exit 2 fi diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 3a774a70d6b..ebf573d3b20 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -913,7 +913,7 @@ src/core/ext/client_config/subchannel_call_holder.h \ src/core/ext/client_config/subchannel_index.h \ src/core/ext/client_config/uri_parser.h \ src/core/ext/lb_policy/grpclb/load_balancer_api.h \ -src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h \ +src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h \ third_party/nanopb/pb.h \ third_party/nanopb/pb_common.h \ third_party/nanopb/pb_decode.h \ @@ -1071,7 +1071,7 @@ src/core/ext/client_config/uri_parser.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ -src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c \ +src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 38e68f3b1a1..2599df23039 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -2201,8 +2201,8 @@ "grpc_test_util" ], "headers": [ - "src/proto/grpc/lb/v0/load_balancer.grpc.pb.h", - "src/proto/grpc/lb/v0/load_balancer.pb.h" + "src/proto/grpc/lb/v1/load_balancer.grpc.pb.h", + "src/proto/grpc/lb/v1/load_balancer.pb.h" ], "language": "c++", "name": "grpclb_api_test", @@ -5860,15 +5860,15 @@ ], "headers": [ "src/core/ext/lb_policy/grpclb/load_balancer_api.h", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h" + "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h" ], "language": "c", "name": "grpc_lb_policy_grpclb", "src": [ "src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c", - "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h" + "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", + "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h" ], "third_party": false, "type": "filegroup" diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 4eec05a3b1f..26109c71020 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -422,7 +422,7 @@ - + @@ -729,7 +729,7 @@ - + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 17c88c4805e..8d7072b04a5 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -442,8 +442,8 @@ src\core\ext\lb_policy\grpclb - - src\core\ext\lb_policy\grpclb\proto\grpc\lb\v0 + + src\core\ext\lb_policy\grpclb\proto\grpc\lb\v1 third_party\nanopb @@ -959,8 +959,8 @@ src\core\ext\lb_policy\grpclb - - src\core\ext\lb_policy\grpclb\proto\grpc\lb\v0 + + src\core\ext\lb_policy\grpclb\proto\grpc\lb\v1 third_party\nanopb @@ -1037,8 +1037,8 @@ {adf7e553-94ef-14fd-e845-03104f00a06f} - - {0406d191-8817-38c3-a562-e3541201f424} + + {bc357e2d-8ddd-a688-88a3-255228fc0818} {b63ded00-b24f-708e-333f-ce199e421875} diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 26050dcf74e..31ab8f4ba4c 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -397,7 +397,7 @@ - + @@ -668,7 +668,7 @@ - + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index a4acf513bc1..869d92c7382 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -388,8 +388,8 @@ src\core\ext\lb_policy\grpclb - - src\core\ext\lb_policy\grpclb\proto\grpc\lb\v0 + + src\core\ext\lb_policy\grpclb\proto\grpc\lb\v1 third_party\nanopb @@ -851,8 +851,8 @@ src\core\ext\lb_policy\grpclb - - src\core\ext\lb_policy\grpclb\proto\grpc\lb\v0 + + src\core\ext\lb_policy\grpclb\proto\grpc\lb\v1 third_party\nanopb @@ -929,8 +929,8 @@ {21858d9d-30b5-8847-5882-6b47df0fa293} - - {1795a20b-3e7c-e27d-eae1-96582fa9a958} + + {e9256e96-ea3d-c1fd-6426-9d53d9f08f66} {e27f9ecf-97bb-1a2e-3135-a41f732dcf55} diff --git a/vsprojects/vcxproj/test/grpclb_api_test/grpclb_api_test.vcxproj b/vsprojects/vcxproj/test/grpclb_api_test/grpclb_api_test.vcxproj index 1509ece9f96..91b11a1f0f4 100644 --- a/vsprojects/vcxproj/test/grpclb_api_test/grpclb_api_test.vcxproj +++ b/vsprojects/vcxproj/test/grpclb_api_test/grpclb_api_test.vcxproj @@ -160,13 +160,13 @@ - + - + - + - + diff --git a/vsprojects/vcxproj/test/grpclb_api_test/grpclb_api_test.vcxproj.filters b/vsprojects/vcxproj/test/grpclb_api_test/grpclb_api_test.vcxproj.filters index 6c57b8c162a..50f0a3eac25 100644 --- a/vsprojects/vcxproj/test/grpclb_api_test/grpclb_api_test.vcxproj.filters +++ b/vsprojects/vcxproj/test/grpclb_api_test/grpclb_api_test.vcxproj.filters @@ -1,8 +1,8 @@ - - src\proto\grpc\lb\v0 + + src\proto\grpc\lb\v1 test\cpp\grpclb @@ -22,8 +22,8 @@ {2981699e-c196-c599-bc17-c177770f89ee} - - {3d04774a-1c2f-e100-435e-08af5d539250} + + {6cce8ddf-d9a9-1d71-0810-d1e6f8685d76} {64736e1d-eb77-664f-34ab-6cf41263d3d8} From eb913107f75073f24e0ade0fd18f526195db78b7 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 25 Apr 2016 17:30:04 -0700 Subject: [PATCH 0077/1894] Init tracers after plugin registration --- src/core/lib/surface/init.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/surface/init.c b/src/core/lib/surface/init.c index 03f379aba88..d7ee122f87d 100644 --- a/src/core/lib/surface/init.c +++ b/src/core/lib/surface/init.c @@ -167,7 +167,6 @@ void grpc_init(void) { grpc_security_pre_init(); grpc_iomgr_init(); grpc_executor_init(); - grpc_tracer_init("GRPC_TRACE"); gpr_timers_global_init(); grpc_cq_global_init(); for (i = 0; i < g_number_of_plugins; i++) { @@ -179,6 +178,7 @@ void grpc_init(void) { * at the appropriate time */ grpc_register_security_filters(); register_builtin_channel_init(); + grpc_tracer_init("GRPC_TRACE"); /* no more changes to channel init pipelines */ grpc_channel_init_finalize(); } From 8c065a7b22dfe803cd03be24ae3cabaefeb6d59d Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Tue, 26 Apr 2016 12:11:42 -0700 Subject: [PATCH 0078/1894] clang format --- test/cpp/util/metrics_server.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cpp/util/metrics_server.h b/test/cpp/util/metrics_server.h index b04879c5e69..2caacad5f3d 100644 --- a/test/cpp/util/metrics_server.h +++ b/test/cpp/util/metrics_server.h @@ -97,7 +97,7 @@ class MetricsServiceImpl GRPC_FINAL : public MetricsService::Service { // NOTE: CreateQpsGauge can be called anytime (i.e before or after calling // StartServer). std::shared_ptr CreateQpsGauge(const grpc::string& name, - bool* already_present); + bool* already_present); std::unique_ptr StartServer(int port); From 44b9cd75847baa6cf275536264ab156c7f3e4518 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Tue, 26 Apr 2016 12:15:48 -0700 Subject: [PATCH 0079/1894] Fix the sanity error reported by check_sources_and_headers.py --- test/cpp/util/metrics_server.h | 1 - 1 file changed, 1 deletion(-) diff --git a/test/cpp/util/metrics_server.h b/test/cpp/util/metrics_server.h index 2caacad5f3d..aa9bfed23d8 100644 --- a/test/cpp/util/metrics_server.h +++ b/test/cpp/util/metrics_server.h @@ -36,7 +36,6 @@ #include #include -#include "grpc/support/time.h" #include "src/proto/grpc/testing/metrics.grpc.pb.h" #include "src/proto/grpc/testing/metrics.pb.h" From c5b1eef8b1e6d56a9f3c25962d815ae6579c78ee Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 26 Apr 2016 14:16:20 -0700 Subject: [PATCH 0080/1894] Change C implementation to not log an "Unexpected content-type" message when the header includes a semicolon. --- src/core/lib/channel/http_server_filter.c | 9 ++++---- .../tests/server_registered_method.headers | 2 +- test/core/bad_client/tests/simple_request.c | 22 +++++++++++++++++++ .../tests/simple_request_unusual2.headers | 13 +++++++++++ 4 files changed, 41 insertions(+), 5 deletions(-) create mode 100644 test/core/bad_client/tests/simple_request_unusual2.headers diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index c140c61b8f3..ad3462bff4f 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -92,8 +92,10 @@ static grpc_mdelem *server_filter(void *user_data, grpc_mdelem *md) { require */ return NULL; } else if (md->key == GRPC_MDSTR_CONTENT_TYPE) { - if (strncmp(grpc_mdstr_as_c_string(md->value), "application/grpc+", 17) == - 0) { + const char* value_str = grpc_mdstr_as_c_string(md->value); + if (strncmp(value_str, "application/grpc", 16) == 0 && + (strlen(value_str) == 16 || + value_str[16] == '+' || value_str[16] == ';')) { /* Although the C implementation doesn't (currently) generate them, any custom +-suffix is explicitly valid. */ /* TODO(klempner): We should consider preallocating common values such @@ -102,8 +104,7 @@ static grpc_mdelem *server_filter(void *user_data, grpc_mdelem *md) { } else { /* TODO(klempner): We're currently allowing this, but we shouldn't see it without a proxy so log for now. */ - gpr_log(GPR_INFO, "Unexpected content-type %s", - grpc_mdstr_as_c_string(md->value)); + gpr_log(GPR_INFO, "Unexpected content-type %s", value_str); } return NULL; } else if (md->key == GRPC_MDSTR_TE || md->key == GRPC_MDSTR_METHOD || diff --git a/test/core/bad_client/tests/server_registered_method.headers b/test/core/bad_client/tests/server_registered_method.headers index 06ee73c82ee..2640cc9cb8d 100644 --- a/test/core/bad_client/tests/server_registered_method.headers +++ b/test/core/bad_client/tests/server_registered_method.headers @@ -1,4 +1,4 @@ -# headers used in simple_request.c +# headers used in server_registered_method.c # use tools/codegen/core/gen_header_frame.py to generate the binary strings # contained in the source code :path: /registered/bar diff --git a/test/core/bad_client/tests/simple_request.c b/test/core/bad_client/tests/simple_request.c index ac0fdde876f..d6b85aefb58 100644 --- a/test/core/bad_client/tests/simple_request.c +++ b/test/core/bad_client/tests/simple_request.c @@ -77,6 +77,27 @@ "\x10\x0cgrpc-timeout\x02" \ "5S" +#define PFX_STR_UNUSUAL2 \ + "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" \ + "\x00\x00\x00\x04\x00\x00\x00\x00\x00" /* settings frame */ \ + "\x00\x00\xf4\x01\x04\x00\x00\x00\x01" /* headers: generated from \ + simple_request_unusual2.headers \ + in this directory */ \ + "\x10\x05:path\x08/foo/bar" \ + "\x10\x07:scheme\x04http" \ + "\x10\x07:method\x04POST" \ + "\x10\x04host\x09localhost" \ + "\x10\x0c" \ + "content-type\x1e" \ + "application/grpc;this-is-valid" \ + "\x10\x14grpc-accept-encoding\x15identity,deflate,gzip" \ + "\x10\x02te\x08trailers" \ + "\x10\x0auser-agent\"bad-client grpc-c/0.12.0.0 (linux)" \ + "\x10\x0cgrpc-timeout\x03" \ + "10S" \ + "\x10\x0cgrpc-timeout\x02" \ + "5S" + static void *tag(intptr_t t) { return (void *)t; } static void verifier(grpc_server *server, grpc_completion_queue *cq, @@ -120,6 +141,7 @@ int main(int argc, char **argv) { /* basic request: check that things are working */ GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR, 0); GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR_UNUSUAL, 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR_UNUSUAL2, 0); /* push an illegal data frame */ GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR diff --git a/test/core/bad_client/tests/simple_request_unusual2.headers b/test/core/bad_client/tests/simple_request_unusual2.headers new file mode 100644 index 00000000000..f70920f3725 --- /dev/null +++ b/test/core/bad_client/tests/simple_request_unusual2.headers @@ -0,0 +1,13 @@ +# headers used in simple_request.c +# use tools/codegen/core/gen_header_frame.py to generate the binary strings +# contained in the source code +:path: /foo/bar +:scheme: http +:method: POST +host: localhost +content-type: application/grpc;this-is-valid +grpc-accept-encoding: deflate,identity,gzip +te: trailers +user-agent: bad-client grpc-c/0.12.0.0 (linux) +grpc-timeout: 10S +grpc-timeout: 5S From 85c3ab0b0b1c3abf7f8b2c7538e5ca147c88d557 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 26 Apr 2016 17:17:02 -0700 Subject: [PATCH 0081/1894] fix #5912 --- src/csharp/Grpc.IntegrationTesting/InteropClient.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs index 54365179603..b3b1abf1bca 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs @@ -494,7 +494,8 @@ namespace Grpc.IntegrationTesting } var ex = Assert.ThrowsAsync(async () => await call.ResponseStream.MoveNext()); - Assert.AreEqual(StatusCode.DeadlineExceeded, ex.Status.StatusCode); + // We can't guarantee the status code always DeadlineExceeded. See issue #2685. + Assert.Contains(ex.Status.StatusCode, new[] { StatusCode.DeadlineExceeded, StatusCode.Internal }); } Console.WriteLine("Passed!"); } From 110e07af8de2fbdbdac531195bffab29988e246c Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 26 Apr 2016 17:20:10 -0700 Subject: [PATCH 0082/1894] Added node plugin to grpc-tools npm package, updated build_package_node --- src/node/tools/bin/protoc_plugin.js | 54 +++++++++++++++++++ src/node/tools/package.json | 4 +- .../src/node/tools/package.json.template | 4 +- tools/run_tests/build_package_node.sh | 45 ++++++++++++++-- 4 files changed, 102 insertions(+), 5 deletions(-) create mode 100755 src/node/tools/bin/protoc_plugin.js diff --git a/src/node/tools/bin/protoc_plugin.js b/src/node/tools/bin/protoc_plugin.js new file mode 100755 index 00000000000..0e0bb9406e1 --- /dev/null +++ b/src/node/tools/bin/protoc_plugin.js @@ -0,0 +1,54 @@ +#!/usr/bin/env node +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/** + * This file is required because package.json cannot reference a file that + * is not distributed with the package, and we use node-pre-gyp to distribute + * the plugin binary + */ + +'use strict'; + +var path = require('path'); +var execFile = require('child_process').execFile; + +var protoc = path.resolve(__dirname, 'grpc_node_plugin'); + +execFile(protoc, process.argv.slice(2), function(error, stdout, stderr) { + if (error) { + throw error; + } + console.log(stdout); + console.log(stderr); +}); diff --git a/src/node/tools/package.json b/src/node/tools/package.json index 4b3499f2f9e..d98ed0b1fc3 100644 --- a/src/node/tools/package.json +++ b/src/node/tools/package.json @@ -16,7 +16,8 @@ } ], "bin": { - "grpc-tools-protoc": "./bin/protoc.js" + "grpc-tools-protoc": "./bin/protoc.js", + "grpc-tools-plugin": "./bin/protoc_plugin.js" }, "scripts": { "install": "./node_modules/.bin/node-pre-gyp install" @@ -32,6 +33,7 @@ "files": [ "index.js", "bin/protoc.js", + "bin/protoc_plugin.js", "LICENSE" ], "main": "index.js" diff --git a/templates/src/node/tools/package.json.template b/templates/src/node/tools/package.json.template index c69de7c989f..4f673c48d1c 100644 --- a/templates/src/node/tools/package.json.template +++ b/templates/src/node/tools/package.json.template @@ -18,7 +18,8 @@ } ], "bin": { - "grpc-tools-protoc": "./bin/protoc.js" + "grpc-tools-protoc": "./bin/protoc.js", + "grpc-tools-plugin": "./bin/protoc_plugin.js" }, "scripts": { "install": "./node_modules/.bin/node-pre-gyp install" @@ -34,6 +35,7 @@ "files": [ "index.js", "bin/protoc.js", + "bin/protoc_plugin.js", "LICENSE" ], "main": "index.js" diff --git a/tools/run_tests/build_package_node.sh b/tools/run_tests/build_package_node.sh index 540c8263117..137c8e77bca 100755 --- a/tools/run_tests/build_package_node.sh +++ b/tools/run_tests/build_package_node.sh @@ -35,10 +35,49 @@ set -ex cd $(dirname $0)/../.. -mkdir -p artifacts/ -cp -r $EXTERNAL_GIT_ROOT/architecture={x86,x64},language=node,platform={windows,linux,macos}/artifacts/* artifacts/ || true +artifacts=$cwd/artifacts + +mkdir -p $artifacts +cp -r $EXTERNAL_GIT_ROOT/architecture={x86,x64},language=node,platform={windows,linux,macos}/artifacts/* $artifacts/ || true npm update npm pack -cp grpc-*.tgz artifacts/grpc.tgz +cp grpc-*.tgz $artifacts/grpc.tgz + +mkdir -p bin + +for arch in {x86,x64}; do + case arch in + x86) + node_arch=ia32 + ;; + *) + node_arch=$arch + ;; + esac + for plat in {windows,linux,macos}; do + case plat in + windows) + node_plat=win32 + ;; + macos) + node_plat=darwin + ;; + *) + node_plat=$plat + esac + input_dir="$EXTERNAL_GIT_ROOT/architecture=$arch,language=protoc,platform=$plat/artifacts" + cp $input_dir/protoc bin/ + cp $input_dir/grpc_node_plugin bin/ + # For now, this will have to be manually uploaded to a folder with the + # correct package version + output_dir=$artifacts/grpc-precompiled-binaries/node/grpc-tools/ + tar -czf $output_dir/$node_plat-$node_arch.tar.gz bin/ + done +done + +cd src/node/tools +npm update +npm pack +cp grpc-tools-*.tgz $artifacts/ From f8fb955e154c20d1ac70de408ab917e24b45007f Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 26 Apr 2016 17:50:24 -0700 Subject: [PATCH 0083/1894] Account for windows file names --- tools/run_tests/build_package_node.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/run_tests/build_package_node.sh b/tools/run_tests/build_package_node.sh index 137c8e77bca..292408a7039 100755 --- a/tools/run_tests/build_package_node.sh +++ b/tools/run_tests/build_package_node.sh @@ -68,8 +68,8 @@ for arch in {x86,x64}; do node_plat=$plat esac input_dir="$EXTERNAL_GIT_ROOT/architecture=$arch,language=protoc,platform=$plat/artifacts" - cp $input_dir/protoc bin/ - cp $input_dir/grpc_node_plugin bin/ + cp $input_dir/protoc* bin/ + cp $input_dir/grpc_node_plugin* bin/ # For now, this will have to be manually uploaded to a folder with the # correct package version output_dir=$artifacts/grpc-precompiled-binaries/node/grpc-tools/ From 44f7c54847d4f733c681c87952afb95be8c54eb6 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 25 Apr 2016 14:50:27 -0700 Subject: [PATCH 0084/1894] params for generating only client/server --- src/compiler/csharp_generator.cc | 28 +++++++++++++++++++--------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/src/compiler/csharp_generator.cc b/src/compiler/csharp_generator.cc index 4def6c5e31f..08cd41dee7d 100644 --- a/src/compiler/csharp_generator.cc +++ b/src/compiler/csharp_generator.cc @@ -527,7 +527,8 @@ void GenerateNewStubMethods(Printer* out, const ServiceDescriptor *service) { out->Print("\n"); } -void GenerateService(Printer* out, const ServiceDescriptor *service) { +void GenerateService(Printer* out, const ServiceDescriptor *service, + bool generate_client, bool generate_server) { out->Print("public static class $classname$\n", "classname", GetServiceClassName(service)); out->Print("{\n"); @@ -542,13 +543,22 @@ void GenerateService(Printer* out, const ServiceDescriptor *service) { GenerateStaticMethodField(out, service->method(i)); } GenerateServiceDescriptorProperty(out, service); - GenerateClientInterface(out, service); - GenerateServerInterface(out, service); - GenerateServerClass(out, service); - GenerateClientStub(out, service); - GenerateBindServiceMethod(out, service, false); - GenerateBindServiceMethod(out, service, true); - GenerateNewStubMethods(out, service); + + if (generate_client) { + GenerateClientInterface(out, service); + } + if (generate_server) { + GenerateServerInterface(out, service); + GenerateServerClass(out, service); + } + if (generate_client) { + GenerateClientStub(out, service); + GenerateNewStubMethods(out, service); + } + if (generate_server) { + GenerateBindServiceMethod(out, service, false); + GenerateBindServiceMethod(out, service, true); + } out->Outdent(); out->Print("}\n"); @@ -584,7 +594,7 @@ grpc::string GetServices(const FileDescriptor *file) { out.Print("namespace $namespace$ {\n", "namespace", GetFileNamespace(file)); out.Indent(); for (int i = 0; i < file->service_count(); i++) { - GenerateService(&out, file->service(i)); + GenerateService(&out, file->service(i), true, true); } out.Outdent(); out.Print("}\n"); From a967ee567e24c998b45560ba3e32032d7791649b Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 25 Apr 2016 14:51:05 -0700 Subject: [PATCH 0085/1894] support custom parsegeneratorparameter --- src/compiler/config.h | 10 ++++++++++ src/compiler/csharp_plugin.cc | 3 +++ 2 files changed, 13 insertions(+) diff --git a/src/compiler/config.h b/src/compiler/config.h index fea976c3181..a31dc24f6de 100644 --- a/src/compiler/config.h +++ b/src/compiler/config.h @@ -68,6 +68,11 @@ #define GRPC_CUSTOM_PLUGINMAIN ::google::protobuf::compiler::PluginMain #endif +#ifndef GRPC_CUSTOM_PARSEGENERATORPARAMETER +#include +#define GRPC_CUSTOM_PARSEGENERATORPARAMETER ::google::protobuf::compiler::ParseGeneratorParameter +#endif + namespace grpc { namespace protobuf { typedef GRPC_CUSTOM_DESCRIPTOR Descriptor; @@ -81,6 +86,11 @@ static inline int PluginMain(int argc, char* argv[], const CodeGenerator* generator) { return GRPC_CUSTOM_PLUGINMAIN(argc, argv, generator); } +static inline void ParseGeneratorParameter(const string& parameter, + std::vector >* options) { + GRPC_CUSTOM_PARSEGENERATORPARAMETER(parameter, options); +} + } // namespace compiler namespace io { typedef GRPC_CUSTOM_PRINTER Printer; diff --git a/src/compiler/csharp_plugin.cc b/src/compiler/csharp_plugin.cc index 8b9395f9e2b..bc86fbd616d 100644 --- a/src/compiler/csharp_plugin.cc +++ b/src/compiler/csharp_plugin.cc @@ -48,6 +48,9 @@ class CSharpGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { const grpc::string ¶meter, grpc::protobuf::compiler::GeneratorContext *context, grpc::string *error) const { + std::vector > options; + grpc::protobuf::compiler::ParseGeneratorParameter(parameter, &options); + grpc::string code = grpc_csharp_generator::GetServices(file); if (code.size() == 0) { return true; // don't generate a file if there are no services From 5f8872f8995cd45d86feb361bfa9b8084c51b85e Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 25 Apr 2016 15:57:10 -0700 Subject: [PATCH 0086/1894] introduce c# generator options --- src/compiler/csharp_generator.cc | 5 +++-- src/compiler/csharp_generator.h | 3 ++- src/compiler/csharp_plugin.cc | 17 ++++++++++++++++- 3 files changed, 21 insertions(+), 4 deletions(-) diff --git a/src/compiler/csharp_generator.cc b/src/compiler/csharp_generator.cc index 08cd41dee7d..5744d7c96a9 100644 --- a/src/compiler/csharp_generator.cc +++ b/src/compiler/csharp_generator.cc @@ -566,7 +566,8 @@ void GenerateService(Printer* out, const ServiceDescriptor *service, } // anonymous namespace -grpc::string GetServices(const FileDescriptor *file) { +grpc::string GetServices(const FileDescriptor *file, bool generate_client, + bool generate_server) { grpc::string output; { // Scope the output stream so it closes and finalizes output to the string. @@ -594,7 +595,7 @@ grpc::string GetServices(const FileDescriptor *file) { out.Print("namespace $namespace$ {\n", "namespace", GetFileNamespace(file)); out.Indent(); for (int i = 0; i < file->service_count(); i++) { - GenerateService(&out, file->service(i), true, true); + GenerateService(&out, file->service(i), generate_client, generate_server); } out.Outdent(); out.Print("}\n"); diff --git a/src/compiler/csharp_generator.h b/src/compiler/csharp_generator.h index 90eb7e29846..79c2e57266e 100644 --- a/src/compiler/csharp_generator.h +++ b/src/compiler/csharp_generator.h @@ -40,7 +40,8 @@ namespace grpc_csharp_generator { -grpc::string GetServices(const grpc::protobuf::FileDescriptor *file); +grpc::string GetServices(const grpc::protobuf::FileDescriptor *file, + bool generate_client, bool generate_server); } // namespace grpc_csharp_generator diff --git a/src/compiler/csharp_plugin.cc b/src/compiler/csharp_plugin.cc index bc86fbd616d..fd1ec99e2b2 100644 --- a/src/compiler/csharp_plugin.cc +++ b/src/compiler/csharp_plugin.cc @@ -51,7 +51,22 @@ class CSharpGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { std::vector > options; grpc::protobuf::compiler::ParseGeneratorParameter(parameter, &options); - grpc::string code = grpc_csharp_generator::GetServices(file); + bool generate_client = true; + bool generate_server = true; + for (size_t i = 0; i < options.size(); i++) { + if (options[i].first == "no_client") { + generate_client = false; + } else if (options[i].first == "no_server") { + generate_server = false; + } else { + *error = "Unknown generator option: " + options[i].first; + return false; + } + } + + grpc::string code = grpc_csharp_generator::GetServices(file, + generate_client, + generate_server); if (code.size() == 0) { return true; // don't generate a file if there are no services } From 4e0f73cddbebdeae1cf96b9d63ec7af37396a665 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 25 Apr 2016 16:11:03 -0700 Subject: [PATCH 0087/1894] add internal_access option for C# codegen --- src/compiler/csharp_generator.cc | 15 +++++++++++---- src/compiler/csharp_generator.h | 3 ++- src/compiler/csharp_plugin.cc | 6 +++++- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/src/compiler/csharp_generator.cc b/src/compiler/csharp_generator.cc index 5744d7c96a9..0d1404341d2 100644 --- a/src/compiler/csharp_generator.cc +++ b/src/compiler/csharp_generator.cc @@ -123,6 +123,10 @@ std::string GetMethodRequestParamMaybe(const MethodDescriptor *method, return GetClassName(method->input_type()) + " request, "; } +std::string GetAccessLevel(bool internal_access) { + return internal_access ? "internal" : "public"; +} + std::string GetMethodReturnTypeClient(const MethodDescriptor *method) { switch (GetMethodType(method)) { case METHODTYPE_NO_STREAMING: @@ -528,8 +532,10 @@ void GenerateNewStubMethods(Printer* out, const ServiceDescriptor *service) { } void GenerateService(Printer* out, const ServiceDescriptor *service, - bool generate_client, bool generate_server) { - out->Print("public static class $classname$\n", "classname", + bool generate_client, bool generate_server, + bool internal_access) { + out->Print("$access_level$ static class $classname$\n", "access_level", + GetAccessLevel(internal_access), "classname", GetServiceClassName(service)); out->Print("{\n"); out->Indent(); @@ -567,7 +573,7 @@ void GenerateService(Printer* out, const ServiceDescriptor *service, } // anonymous namespace grpc::string GetServices(const FileDescriptor *file, bool generate_client, - bool generate_server) { + bool generate_server, bool internal_access) { grpc::string output; { // Scope the output stream so it closes and finalizes output to the string. @@ -595,7 +601,8 @@ grpc::string GetServices(const FileDescriptor *file, bool generate_client, out.Print("namespace $namespace$ {\n", "namespace", GetFileNamespace(file)); out.Indent(); for (int i = 0; i < file->service_count(); i++) { - GenerateService(&out, file->service(i), generate_client, generate_server); + GenerateService(&out, file->service(i), generate_client, generate_server, + internal_access); } out.Outdent(); out.Print("}\n"); diff --git a/src/compiler/csharp_generator.h b/src/compiler/csharp_generator.h index 79c2e57266e..f0585af4fd7 100644 --- a/src/compiler/csharp_generator.h +++ b/src/compiler/csharp_generator.h @@ -41,7 +41,8 @@ namespace grpc_csharp_generator { grpc::string GetServices(const grpc::protobuf::FileDescriptor *file, - bool generate_client, bool generate_server); + bool generate_client, bool generate_server, + bool internal_access); } // namespace grpc_csharp_generator diff --git a/src/compiler/csharp_plugin.cc b/src/compiler/csharp_plugin.cc index fd1ec99e2b2..5350e73f108 100644 --- a/src/compiler/csharp_plugin.cc +++ b/src/compiler/csharp_plugin.cc @@ -53,11 +53,14 @@ class CSharpGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { bool generate_client = true; bool generate_server = true; + bool internal_access = false; for (size_t i = 0; i < options.size(); i++) { if (options[i].first == "no_client") { generate_client = false; } else if (options[i].first == "no_server") { generate_server = false; + } else if (options[i].first == "internal_access") { + internal_access = true; } else { *error = "Unknown generator option: " + options[i].first; return false; @@ -66,7 +69,8 @@ class CSharpGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { grpc::string code = grpc_csharp_generator::GetServices(file, generate_client, - generate_server); + generate_server, + internal_access); if (code.size() == 0) { return true; // don't generate a file if there are no services } From 7c0e1eec85d74c5b1c8d9565f0bc28194aebae4f Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 25 Apr 2016 16:00:34 -0700 Subject: [PATCH 0088/1894] regenerate code --- src/csharp/Grpc.Examples/MathGrpc.cs | 12 +++---- src/csharp/Grpc.HealthCheck/HealthGrpc.cs | 12 +++---- .../Grpc.IntegrationTesting/MetricsGrpc.cs | 12 +++---- .../Grpc.IntegrationTesting/ServicesGrpc.cs | 24 ++++++------- .../Grpc.IntegrationTesting/TestGrpc.cs | 36 +++++++++---------- 5 files changed, 48 insertions(+), 48 deletions(-) diff --git a/src/csharp/Grpc.Examples/MathGrpc.cs b/src/csharp/Grpc.Examples/MathGrpc.cs index 1a6482df90e..edbce913b89 100644 --- a/src/csharp/Grpc.Examples/MathGrpc.cs +++ b/src/csharp/Grpc.Examples/MathGrpc.cs @@ -168,6 +168,12 @@ namespace Math { } } + // creates a new client + public static MathClient NewClient(Channel channel) + { + return new MathClient(channel); + } + // creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(IMath serviceImpl) @@ -192,12 +198,6 @@ namespace Math { .AddMethod(__Method_Sum, serviceImpl.Sum).Build(); } - // creates a new client - public static MathClient NewClient(Channel channel) - { - return new MathClient(channel); - } - } } #endregion diff --git a/src/csharp/Grpc.HealthCheck/HealthGrpc.cs b/src/csharp/Grpc.HealthCheck/HealthGrpc.cs index e7f779753d7..e2cdabf011d 100644 --- a/src/csharp/Grpc.HealthCheck/HealthGrpc.cs +++ b/src/csharp/Grpc.HealthCheck/HealthGrpc.cs @@ -97,6 +97,12 @@ namespace Grpc.Health.V1 { } } + // creates a new client + public static HealthClient NewClient(Channel channel) + { + return new HealthClient(channel); + } + // creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(IHealth serviceImpl) @@ -115,12 +121,6 @@ namespace Grpc.Health.V1 { .AddMethod(__Method_Check, serviceImpl.Check).Build(); } - // creates a new client - public static HealthClient NewClient(Channel channel) - { - return new HealthClient(channel); - } - } } #endregion diff --git a/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs b/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs index 11c1572c194..0f701a837f4 100644 --- a/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs @@ -121,6 +121,12 @@ namespace Grpc.Testing { } } + // creates a new client + public static MetricsServiceClient NewClient(Channel channel) + { + return new MetricsServiceClient(channel); + } + // creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(IMetricsService serviceImpl) @@ -141,12 +147,6 @@ namespace Grpc.Testing { .AddMethod(__Method_GetGauge, serviceImpl.GetGauge).Build(); } - // creates a new client - public static MetricsServiceClient NewClient(Channel channel) - { - return new MetricsServiceClient(channel); - } - } } #endregion diff --git a/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs b/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs index 18cf0672e30..3f07a7aeb63 100644 --- a/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs @@ -120,6 +120,12 @@ namespace Grpc.Testing { } } + // creates a new client + public static BenchmarkServiceClient NewClient(Channel channel) + { + return new BenchmarkServiceClient(channel); + } + // creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(IBenchmarkService serviceImpl) @@ -140,12 +146,6 @@ namespace Grpc.Testing { .AddMethod(__Method_StreamingCall, serviceImpl.StreamingCall).Build(); } - // creates a new client - public static BenchmarkServiceClient NewClient(Channel channel) - { - return new BenchmarkServiceClient(channel); - } - } public static class WorkerService { @@ -320,6 +320,12 @@ namespace Grpc.Testing { } } + // creates a new client + public static WorkerServiceClient NewClient(Channel channel) + { + return new WorkerServiceClient(channel); + } + // creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(IWorkerService serviceImpl) @@ -344,12 +350,6 @@ namespace Grpc.Testing { .AddMethod(__Method_QuitWorker, serviceImpl.QuitWorker).Build(); } - // creates a new client - public static WorkerServiceClient NewClient(Channel channel) - { - return new WorkerServiceClient(channel); - } - } } #endregion diff --git a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs index 3b915f6df12..4efd35f81fd 100644 --- a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs @@ -227,6 +227,12 @@ namespace Grpc.Testing { } } + // creates a new client + public static TestServiceClient NewClient(Channel channel) + { + return new TestServiceClient(channel); + } + // creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(ITestService serviceImpl) @@ -255,12 +261,6 @@ namespace Grpc.Testing { .AddMethod(__Method_HalfDuplexCall, serviceImpl.HalfDuplexCall).Build(); } - // creates a new client - public static TestServiceClient NewClient(Channel channel) - { - return new TestServiceClient(channel); - } - } public static class UnimplementedService { @@ -350,6 +350,12 @@ namespace Grpc.Testing { } } + // creates a new client + public static UnimplementedServiceClient NewClient(Channel channel) + { + return new UnimplementedServiceClient(channel); + } + // creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(IUnimplementedService serviceImpl) @@ -368,12 +374,6 @@ namespace Grpc.Testing { .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build(); } - // creates a new client - public static UnimplementedServiceClient NewClient(Channel channel) - { - return new UnimplementedServiceClient(channel); - } - } public static class ReconnectService { @@ -498,6 +498,12 @@ namespace Grpc.Testing { } } + // creates a new client + public static ReconnectServiceClient NewClient(Channel channel) + { + return new ReconnectServiceClient(channel); + } + // creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(IReconnectService serviceImpl) @@ -518,12 +524,6 @@ namespace Grpc.Testing { .AddMethod(__Method_Stop, serviceImpl.Stop).Build(); } - // creates a new client - public static ReconnectServiceClient NewClient(Channel channel) - { - return new ReconnectServiceClient(channel); - } - } } #endregion From a4c1644d56b8cdd09d1ebcc0b0f9bd46cc106ffe Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 26 Apr 2016 18:04:36 -0700 Subject: [PATCH 0089/1894] Actually make the output directories --- tools/run_tests/build_package_node.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/run_tests/build_package_node.sh b/tools/run_tests/build_package_node.sh index 292408a7039..8297b701889 100755 --- a/tools/run_tests/build_package_node.sh +++ b/tools/run_tests/build_package_node.sh @@ -72,7 +72,8 @@ for arch in {x86,x64}; do cp $input_dir/grpc_node_plugin* bin/ # For now, this will have to be manually uploaded to a folder with the # correct package version - output_dir=$artifacts/grpc-precompiled-binaries/node/grpc-tools/ + output_dir=$artifacts/grpc-precompiled-binaries/node/grpc-tools + mkdir -p $output_dir tar -czf $output_dir/$node_plat-$node_arch.tar.gz bin/ done done From 24947de3d28f13164ab627be61cb534bf7b59b83 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 26 Apr 2016 18:09:04 -0700 Subject: [PATCH 0090/1894] Fixed working directory path --- tools/run_tests/build_package_node.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/build_package_node.sh b/tools/run_tests/build_package_node.sh index 8297b701889..53dbed76d04 100755 --- a/tools/run_tests/build_package_node.sh +++ b/tools/run_tests/build_package_node.sh @@ -35,7 +35,7 @@ set -ex cd $(dirname $0)/../.. -artifacts=$cwd/artifacts +artifacts=$(pwd)/artifacts mkdir -p $artifacts cp -r $EXTERNAL_GIT_ROOT/architecture={x86,x64},language=node,platform={windows,linux,macos}/artifacts/* $artifacts/ || true From 825471c38718a770b4ce763f8fad45b26ebe1766 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 25 Apr 2016 16:52:25 -0700 Subject: [PATCH 0091/1894] Add --compiler python3.4 option to run_tests.py --- tools/run_tests/build_python.sh | 12 +++++++----- tools/run_tests/run_python.sh | 6 ++++-- tools/run_tests/run_tests.py | 34 ++++++++++++++------------------- tox.ini | 2 +- 4 files changed, 26 insertions(+), 28 deletions(-) diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh index 30d121007fb..594c20b14c3 100755 --- a/tools/run_tests/build_python.sh +++ b/tools/run_tests/build_python.sh @@ -33,6 +33,8 @@ set -ex # change to grpc repo root cd $(dirname $0)/../.. +TOX_PYTHON_ENV="$1" + ROOT=`pwd` export LD_LIBRARY_PATH=$ROOT/libs/$CONFIG export DYLD_LIBRARY_PATH=$ROOT/libs/$CONFIG @@ -47,9 +49,9 @@ then export GRPC_PYTHON_ENABLE_CYTHON_TRACING=1 fi -tox --notest +tox -e ${TOX_PYTHON_ENV} --notest -$ROOT/.tox/py27/bin/python $ROOT/setup.py build -$ROOT/.tox/py27/bin/python $ROOT/setup.py build_py -$ROOT/.tox/py27/bin/python $ROOT/setup.py build_ext --inplace -$ROOT/.tox/py27/bin/python $ROOT/setup.py gather --test +$ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/setup.py build +$ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/setup.py build_py +$ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/setup.py build_ext --inplace +$ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/setup.py gather --test diff --git a/tools/run_tests/run_python.sh b/tools/run_tests/run_python.sh index a93ef2576db..7a3ce6b821a 100755 --- a/tools/run_tests/run_python.sh +++ b/tools/run_tests/run_python.sh @@ -33,6 +33,8 @@ set -ex # change to grpc repo root cd $(dirname $0)/../.. +TOX_PYTHON_ENV="$1" + ROOT=`pwd` export LD_LIBRARY_PATH=$ROOT/libs/$CONFIG export DYLD_LIBRARY_PATH=$ROOT/libs/$CONFIG @@ -45,9 +47,9 @@ export GRPC_PYTHON_USE_PRECOMPILED_BINARIES=0 if [ "$CONFIG" = "gcov" ] then export GRPC_PYTHON_ENABLE_CYTHON_TRACING=1 - tox + tox -e ${TOX_PYTHON_ENV} else - $ROOT/.tox/py27/bin/python $ROOT/setup.py test_lite + $ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/setup.py test_lite fi mkdir -p $ROOT/reports diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 4b9898539d5..dea481ef90d 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -356,25 +356,20 @@ class PhpLanguage(object): class PythonLanguage(object): - def __init__(self): - self._build_python_versions = ['2.7'] - self._has_python_versions = [] - def configure(self, config, args): self.config = config self.args = args - _check_compiler(self.args.compiler, ['default']) + self._tox_env = self._get_tox_env(self.args.compiler) def test_specs(self): # load list of known test suites with open('src/python/grpcio/tests/tests.json') as tests_json_file: tests_json = json.load(tests_json_file) environment = dict(_FORCE_ENVIRON_FOR_WRAPPERS) - environment['PYVER'] = '2.7' environment['PYTHONPATH'] = os.path.abspath('src/python/gens') if self.config.build_config != 'gcov': return [self.config.job_spec( - ['tools/run_tests/run_python.sh'], + ['tools/run_tests/run_python.sh', self._tox_env], None, environ=dict(environment.items() + [('GRPC_PYTHON_TESTRUNNER_FILTER', suite_name)]), @@ -399,18 +394,7 @@ class PythonLanguage(object): return [] def build_steps(self): - commands = [] - for python_version in self._build_python_versions: - try: - with open(os.devnull, 'w') as output: - subprocess.check_call(['which', 'python' + python_version], - stdout=output, stderr=output) - commands.append(['tools/run_tests/build_python.sh', python_version]) - self._has_python_versions.append(python_version) - except: - jobset.message('WARNING', 'Missing Python ' + python_version, - do_newline=True) - return commands + return [['tools/run_tests/build_python.sh', self._tox_env]] def post_tests_steps(self): return [] @@ -421,6 +405,15 @@ class PythonLanguage(object): def dockerfile_dir(self): return 'tools/dockerfile/test/python_jessie_%s' % _docker_arch_suffix(self.args.arch) + def _get_tox_env(self, compiler): + """Returns name of tox environment based on selected compiler.""" + if compiler == 'python2.7' or compiler == 'default': + return 'py27' + elif compiler == 'python3.4': + return 'py34' + else: + raise Exception('Compiler %s not supported.' % compiler) + def __str__(self): return 'python' @@ -808,7 +801,8 @@ argp.add_argument('--compiler', choices=['default', 'gcc4.4', 'gcc4.9', 'gcc5.3', 'clang3.4', 'clang3.6', - 'vs2010', 'vs2013', 'vs2015'], + 'vs2010', 'vs2013', 'vs2015', + 'python2.7', 'python3.4'], default='default', help='Selects compiler to use. Allowed values depend on the platform and language.') argp.add_argument('--build_only', diff --git a/tox.ini b/tox.ini index a655935219f..66b74a32db0 100644 --- a/tox.ini +++ b/tox.ini @@ -1,7 +1,7 @@ # GRPC Python tox (test environment) settings [tox] skipsdist = true -envlist = py27 +envlist = py27,py34 [testenv] setenv = From 63753077c504178182d1911f1c66f636ecd7da2b Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 26 Apr 2016 18:23:09 -0700 Subject: [PATCH 0092/1894] Get version explicitly --- tools/run_tests/build_package_node.sh | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/tools/run_tests/build_package_node.sh b/tools/run_tests/build_package_node.sh index 53dbed76d04..4a21104e289 100755 --- a/tools/run_tests/build_package_node.sh +++ b/tools/run_tests/build_package_node.sh @@ -35,7 +35,9 @@ set -ex cd $(dirname $0)/../.. -artifacts=$(pwd)/artifacts +base=$(pwd) + +artifacts=$base/artifacts mkdir -p $artifacts cp -r $EXTERNAL_GIT_ROOT/architecture={x86,x64},language=node,platform={windows,linux,macos}/artifacts/* $artifacts/ || true @@ -47,6 +49,15 @@ cp grpc-*.tgz $artifacts/grpc.tgz mkdir -p bin +cd src/node/tools +npm update +npm pack +cp grpc-tools-*.tgz $artifacts/ +tools_version=$(npm list | grep -oP '(?<=grpc-tools@)\\S+') + +output_dir=$artifacts/grpc-precompiled-binaries/node/grpc-tools/$tools_version +mkdir -p $output_dir + for arch in {x86,x64}; do case arch in x86) @@ -70,15 +81,6 @@ for arch in {x86,x64}; do input_dir="$EXTERNAL_GIT_ROOT/architecture=$arch,language=protoc,platform=$plat/artifacts" cp $input_dir/protoc* bin/ cp $input_dir/grpc_node_plugin* bin/ - # For now, this will have to be manually uploaded to a folder with the - # correct package version - output_dir=$artifacts/grpc-precompiled-binaries/node/grpc-tools - mkdir -p $output_dir tar -czf $output_dir/$node_plat-$node_arch.tar.gz bin/ done done - -cd src/node/tools -npm update -npm pack -cp grpc-tools-*.tgz $artifacts/ From d9062b98a3662298f685a7dfe8207053af4f2424 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 26 Apr 2016 18:25:49 -0700 Subject: [PATCH 0093/1894] Get version explicitly --- tools/run_tests/build_package_node.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/build_package_node.sh b/tools/run_tests/build_package_node.sh index 4a21104e289..e98fabbc5f0 100755 --- a/tools/run_tests/build_package_node.sh +++ b/tools/run_tests/build_package_node.sh @@ -53,7 +53,7 @@ cd src/node/tools npm update npm pack cp grpc-tools-*.tgz $artifacts/ -tools_version=$(npm list | grep -oP '(?<=grpc-tools@)\\S+') +tools_version=$(npm list | grep -oP '(?<=grpc-tools@)\S+') output_dir=$artifacts/grpc-precompiled-binaries/node/grpc-tools/$tools_version mkdir -p $output_dir From ee9de2faeed5c7505ee4a34227a97485abd7d5dc Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 26 Apr 2016 18:59:47 -0700 Subject: [PATCH 0094/1894] cleanup build_interop.sh for python --- tools/dockerfile/grpc_interop_python/build_interop.sh | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tools/dockerfile/grpc_interop_python/build_interop.sh b/tools/dockerfile/grpc_interop_python/build_interop.sh index 6454a4f5e25..f29c59da8e8 100755 --- a/tools/dockerfile/grpc_interop_python/build_interop.sh +++ b/tools/dockerfile/grpc_interop_python/build_interop.sh @@ -39,8 +39,4 @@ cp -r /var/local/jenkins/service_account $HOME || true cd /var/local/git/grpc -make - -# build Python interop client and server -CONFIG=opt ./tools/run_tests/build_python.sh - +tools/run_tests/run_tests.py -l python -c opt --build_only From 068d143c8e93f0db051e2a216b2f46b382a2a0ff Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 26 Apr 2016 20:37:10 -0700 Subject: [PATCH 0095/1894] Expand corpora --- .../04a5f10d2ebc712cf13c05b5ed0fafb31b42737c | Bin 0 -> 570 bytes .../38a55e83e685617cdf72e95f1303857b627ae346 | Bin 0 -> 98 bytes .../40b4b92460c4e76a39af9042fb3d86d491a98e16 | Bin 0 -> 337 bytes .../6914f5f380c83ff9e3e90fc60d5048e47e5e77d9 | Bin 0 -> 367 bytes .../7abe8c414aa1418157c2d7ae5e70a84ffb61c027 | Bin 0 -> 405 bytes .../8c5bbcc6935d43c94a0c4ce4a5da01c04fd223d8 | Bin 0 -> 233 bytes .../b5bcc7f39420e997ec6f8e3c70ef49b8f1afb361 | Bin 0 -> 232 bytes .../f755b44ff2221c971ca2bfaffc69e002ba982730 | Bin 0 -> 375 bytes .../1e64080289ea4168304417f3fbd86b01d7d6f431 | Bin 0 -> 229 bytes .../20ee437b7f456ebb19d98d94d9feb1d5e9174c65 | Bin 0 -> 142 bytes .../2c1ecf05c5dde692ed16502294e9570ac3b02600 | Bin 0 -> 22 bytes .../aa878edb0100e876e00e310ae221b220fdb5e028 | Bin 0 -> 131 bytes ...t-53cf4d25741d5f6e7ad9147b286ff0b40cb500a9 | Bin 0 -> 25 bytes .../03a304b82629155af693978c2b53439e553f6450 | Bin 0 -> 225 bytes .../052c8f28e5884bb48f0d504461272cd3a5893215 | Bin 0 -> 286 bytes .../2c4c7e2ed6d977ec119b040b328ad09808909a70 | Bin 0 -> 287 bytes .../4d982c41efad2242f8c06630c23c68146153b47b | Bin 0 -> 287 bytes .../830e3f794c53f7b284eb5c635b2943db9ee9aaee | Bin 0 -> 287 bytes ...t-0aa52e00ddd54f8e129430852c2da95650c354b0 | Bin 0 -> 2048 bytes ...t-3cec540a680b108dda1e0a8e0bfb2d44e5a4a4e8 | Bin 0 -> 2047 bytes ...t-84f22ffca68c6e1590a44aa9f6dd0cef1f680c77 | Bin 0 -> 2048 bytes ...t-adaac86cf1aa1e98e95240c5f92c3708456c3624 | Bin 0 -> 2047 bytes ...t-b281f018cc919301131cf3ed28449cfbd24b6bbf | Bin 0 -> 2047 bytes ...t-ba0016a62a8576a57f000b90c364847ef6b12dcc | Bin 0 -> 2046 bytes ...t-ba17346b8e46e6a05aaa7342a959a7c5ab0f1471 | Bin 0 -> 2048 bytes ...t-ccafab6afdc6474610023b47bd7b3e1b9ea4647b | Bin 0 -> 2047 bytes ...t-dc57e96cd02ba32fa4a99c97b6490e9879d30be5 | Bin 0 -> 2047 bytes ...t-f6c1042f96e15183dcc13b9658d971cc29426d53 | Bin 0 -> 2047 bytes ...t-f9a2773d6502fd4b1ffa73df3c550b0da63af833 | Bin 0 -> 2046 bytes tools/run_tests/tests.json | 464 ++++++++++++++++++ 30 files changed, 464 insertions(+) create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/04a5f10d2ebc712cf13c05b5ed0fafb31b42737c create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/38a55e83e685617cdf72e95f1303857b627ae346 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/40b4b92460c4e76a39af9042fb3d86d491a98e16 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/6914f5f380c83ff9e3e90fc60d5048e47e5e77d9 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/7abe8c414aa1418157c2d7ae5e70a84ffb61c027 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/8c5bbcc6935d43c94a0c4ce4a5da01c04fd223d8 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/b5bcc7f39420e997ec6f8e3c70ef49b8f1afb361 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/f755b44ff2221c971ca2bfaffc69e002ba982730 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/1e64080289ea4168304417f3fbd86b01d7d6f431 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/20ee437b7f456ebb19d98d94d9feb1d5e9174c65 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/2c1ecf05c5dde692ed16502294e9570ac3b02600 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/aa878edb0100e876e00e310ae221b220fdb5e028 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/slow-unit-53cf4d25741d5f6e7ad9147b286ff0b40cb500a9 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/03a304b82629155af693978c2b53439e553f6450 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/052c8f28e5884bb48f0d504461272cd3a5893215 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/2c4c7e2ed6d977ec119b040b328ad09808909a70 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/4d982c41efad2242f8c06630c23c68146153b47b create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/830e3f794c53f7b284eb5c635b2943db9ee9aaee create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-0aa52e00ddd54f8e129430852c2da95650c354b0 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-3cec540a680b108dda1e0a8e0bfb2d44e5a4a4e8 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-84f22ffca68c6e1590a44aa9f6dd0cef1f680c77 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-adaac86cf1aa1e98e95240c5f92c3708456c3624 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-b281f018cc919301131cf3ed28449cfbd24b6bbf create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-ba0016a62a8576a57f000b90c364847ef6b12dcc create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-ba17346b8e46e6a05aaa7342a959a7c5ab0f1471 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-ccafab6afdc6474610023b47bd7b3e1b9ea4647b create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-dc57e96cd02ba32fa4a99c97b6490e9879d30be5 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-f6c1042f96e15183dcc13b9658d971cc29426d53 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-f9a2773d6502fd4b1ffa73df3c550b0da63af833 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/04a5f10d2ebc712cf13c05b5ed0fafb31b42737c b/test/core/end2end/fuzzers/api_fuzzer_corpus/04a5f10d2ebc712cf13c05b5ed0fafb31b42737c new file mode 100644 index 0000000000000000000000000000000000000000..d46856deb1aca93384f486786efdef63284a482b GIT binary patch literal 570 zcmZvZy-EW?6ot=Rb(lnnC>E9x!Ne`1wu-FaBZSmpU9JlLG8=d8T~Ms8?QDdtZ0rQ_ z5o~R?5%D3$I~(E;IMd7wch33lxij&8bbQQ*poDG87RHgz8f=VB+kqp3+zf|Ho22Vm zC^gh*LIZpDH0~Tl=Y7lZi73Q_{!SDhob2xQj}ov`QVC_}K-%lhLzS=kw=|%zVA6S6WNgywt!ayD z)e9(IpP+_b&K$ps;TaTyx)6d;HZh4Q8uz8+sF|8z$%YagxmUdoiNsENiKUme@1{%)hU}lu@H;<JBn}PnMuD0&keD970Qs<)Q2+n{ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/38a55e83e685617cdf72e95f1303857b627ae346 b/test/core/end2end/fuzzers/api_fuzzer_corpus/38a55e83e685617cdf72e95f1303857b627ae346 new file mode 100644 index 0000000000000000000000000000000000000000..3c8c2c1c84922d0bed209730139d36a8cc13353e GIT binary patch literal 98 scmZQ#E9cWpPx# literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/40b4b92460c4e76a39af9042fb3d86d491a98e16 b/test/core/end2end/fuzzers/api_fuzzer_corpus/40b4b92460c4e76a39af9042fb3d86d491a98e16 new file mode 100644 index 0000000000000000000000000000000000000000..44a2b9e30ff9c9d351bc7be555944c7f73f16ffb GIT binary patch literal 337 zcmXAlu}Z{15QhI9&t(%Opq1qv!g;39J|YqB5e^^VkO2$tkPRkaWf9N^@D*%?R5sTM z;v?AFY$M_$Sge1%EtZ*KzK@yNxwxD!mwE-M)Yt0aqKIvZOr5VMITP3>b6Sp1#imWk zCdpv2h@XsL{Nzq-5AMN)4@;Ef8iiR)EIBQEZb(r7!EW?(V0?Rz=$>nsw{x0uIc~#9 zVsx`3v0A;T*fw;Hy86rmFhB~U#inHTu!;KRuIn3C^E4U{K^S5S+Z>p0fQ0Qx9DhRz z^Qmg(<-MPFHv literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/6914f5f380c83ff9e3e90fc60d5048e47e5e77d9 b/test/core/end2end/fuzzers/api_fuzzer_corpus/6914f5f380c83ff9e3e90fc60d5048e47e5e77d9 new file mode 100644 index 0000000000000000000000000000000000000000..da0c78ebc07c6f4b42058e62aea8716b3e473166 GIT binary patch literal 367 zcmXAlu}T9$5QhI9^vQ1$@Mh7%G0H_oG+%u z!g7)oD90fi>xPjiq07*4JUAiUEn^|fD1=7lKdd7tJG>>`V)vk$cTJ*Zv-U!*DO!vi zi#qIyk^hZ#|NB7M>JHvKIjGljAw_glHGT5lOh%-+cxKX7^HZ{Mrxt($x==jcq);E0 zoZy|N%QJ#1lH5=(Uuh#Y~DS5-|d^BHqt>8(xZyhMzKjN__Fpk%dyP)>^@ u-=ZFx$6vhMs7iiH)LDDZE`4bMdhXQwf(=%2JsI2!T4M}@8i6%|G^;=5KxM7~ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/7abe8c414aa1418157c2d7ae5e70a84ffb61c027 b/test/core/end2end/fuzzers/api_fuzzer_corpus/7abe8c414aa1418157c2d7ae5e70a84ffb61c027 new file mode 100644 index 0000000000000000000000000000000000000000..6b06ce291a5e7f07e95cabe10f25d6b9457c9c0a GIT binary patch literal 405 zcmXX?yGjE=6g_i^!)(-GZIvJxlOhqzSgfUeuwLRiNg>(DO|nsJ7Yu^u5CO@&Jw=NzaWRwFcoLoV;`33z9}UOIUw^&#OHGj^U7p!cXqA5(u0q55dr_*9 zt9{oMXTS}-fx0_^;wH7ToV+*P7HKrY3LP0 ze0{TAoCtXp>)0SwUvgBIy9Pv{1gPxGm9Y6??U?C>68Sx~HF>)e?sr>r7DHpwq7C3M z%X?6(=xO-if3}}locE)Wnrijc}1cm`XWG!~vg z)?F?9)BJ&X!*n;>^?on29rz%|ih*{l%2bOsc9=UxFdZodQ&ve?_zb5R6vUCS1ZD#j zxE`oc_kfE2p#TNrYXT|7pM3bY?!RbJo#6Dvf^I92$$3&W>ctl^m|Zs%q*|v^~!a ozL(S>c{@(ksB}+XeFPy-{1h;n3@x-d3dsnuj{N{HkZ+0b0rLYq+W-In literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/b5bcc7f39420e997ec6f8e3c70ef49b8f1afb361 b/test/core/end2end/fuzzers/api_fuzzer_corpus/b5bcc7f39420e997ec6f8e3c70ef49b8f1afb361 new file mode 100644 index 0000000000000000000000000000000000000000..80aa9b8a3d92444102d081272b5aed3093752bd3 GIT binary patch literal 232 zcmYL@F=_%)5QhI5mdA6W3wD;K3CR|wvy=4(79j@^8AuTzx|<2_YRAn3H1H!rkWqS!7M&4ILP5kICMkb tN=zSX#ov@YNPdm0@X*@X)o&owrB?xCnBxXxF7juAQ5<;zUyxf0TmXZ3JY4_) literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/f755b44ff2221c971ca2bfaffc69e002ba982730 b/test/core/end2end/fuzzers/api_fuzzer_corpus/f755b44ff2221c971ca2bfaffc69e002ba982730 new file mode 100644 index 0000000000000000000000000000000000000000..32dab3be54740cd1b8178d2e21bda6e0771310fe GIT binary patch literal 375 zcmXAlze>YU6o-HJST8qKf;u_22(@O2;8>9eK06FKylx@Zq#t~^;*kl-vX0zlV93}DaYA}n> z#ym(b=N$5MczrINdCzBKvu+>+bnY9DI!C0Nc_b$Cp)qkEa)PqmThg_C8>)KOB+YD= zD4>=WEg(lV*but88%xXPz>s*Hcjiv|m(ha?bQa(wsi?uXC=<*<{BS|J8)z z-YWTeFL(TDlI#WwLDMMB{oLYLTBW6xA23^KsQN>X5 zv;tp7ivm}x9;(M5yv$W0KPKIidY&!%(js)+D0f8bEuymDxfiuYZ^NL3XN?Dg#UG{y BY6}1W literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/1e64080289ea4168304417f3fbd86b01d7d6f431 b/test/core/end2end/fuzzers/client_fuzzer_corpus/1e64080289ea4168304417f3fbd86b01d7d6f431 new file mode 100644 index 0000000000000000000000000000000000000000..374b283186cb2fc5f9d5af3719728057b26308bc GIT binary patch literal 229 zcmYL@K?=e^3`G+uDB{u!WL2lw3wVg!p|oQum|CP4`3u3VJ3W^d@CarKGJ%Aj5C0`Z z6&EWarhR{#+PZ1mIL&n&Ki6&;&#~)wmzfG$ikZyBg!K*xOrTmKRBzykY^n1|Y(ro% z<7G&S-#02+_|VVKq_6AGt0Hp5B~2SCO9>-PfGv+7Fq;m46aaAS)m+1|NMs@2Qa EA6m0XKL7v# literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/20ee437b7f456ebb19d98d94d9feb1d5e9174c65 b/test/core/end2end/fuzzers/client_fuzzer_corpus/20ee437b7f456ebb19d98d94d9feb1d5e9174c65 new file mode 100644 index 0000000000000000000000000000000000000000..29243f999626e72e2f64aad3f36ef406173dca84 GIT binary patch literal 142 zcmXAi%ME}q3`0TX#1=kP9RzXni3J!S!}!o;Is~&Y0#1n(M|sW%5e1A`mo7m8WT75b wn1WNImGii^u*u9!ar{Hsd<=**RR910 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/2c1ecf05c5dde692ed16502294e9570ac3b02600 b/test/core/end2end/fuzzers/client_fuzzer_corpus/2c1ecf05c5dde692ed16502294e9570ac3b02600 new file mode 100644 index 0000000000000000000000000000000000000000..0f30385492e93c1eef80915d82fb364a1f5fb5bb GIT binary patch literal 22 ecmY$$wf@gIajGAK;IIGx|Eo`&s4>%TnjZjjfeL{D literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/aa878edb0100e876e00e310ae221b220fdb5e028 b/test/core/end2end/fuzzers/client_fuzzer_corpus/aa878edb0100e876e00e310ae221b220fdb5e028 new file mode 100644 index 0000000000000000000000000000000000000000..bc6a44485273bf3b4b1f77dcaf439759afcbedd3 GIT binary patch literal 131 zcmY$)&F5fXRLsp~1QS~srcRtVF;{V-pC5l>a&l@xiEe6Ma(+r?Ub^~3O|6L&fzpZ) vdB2H%ip`oVxr&TH)d*prvWY+$ApQU}M027a&^(}0KZrQj#6%Dmh!Fq)t?DnV literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/slow-unit-53cf4d25741d5f6e7ad9147b286ff0b40cb500a9 b/test/core/end2end/fuzzers/client_fuzzer_corpus/slow-unit-53cf4d25741d5f6e7ad9147b286ff0b40cb500a9 new file mode 100644 index 0000000000000000000000000000000000000000..997b3d360b14675a7a4d6006619af2187c431234 GIT binary patch literal 25 bcmZo*RAkT1&1KB>Q{0=#z^Ir5;(<5-SI-Aw literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/03a304b82629155af693978c2b53439e553f6450 b/test/core/end2end/fuzzers/server_fuzzer_corpus/03a304b82629155af693978c2b53439e553f6450 new file mode 100644 index 0000000000000000000000000000000000000000..d4072c69216efd1baabae8515fcea67703600252 GIT binary patch literal 225 zcmWFt@>I}L@CXSB&^OXE;N{}w3ibt&0ocSD7#LW97z`MJEJmP0AO|KU2@+#qMAIt3 zlU`JitXqg@r0NRNQmTi6Z zZ`p3&Uy8@#x$oPm+1BfPop-NuPLd>>Vz!@jrc^BV9$2rcqjS{(g1FpAsd2PmLtXp1Kxr6h9odKTg}1~Yl`LMA8A8M+?Qn)VhfAy}6U_hGknn z|NW3$eZHkn>1)$e#WpWj$ttPeryNC59AdKH*+esOx%0q!Q5>Bs4$zCM-5@n~7;9!9 zst#E@6;~g1BVz3azBW#RnMf?9vy7HAK6$(Y?+r;{a<*uDFP~Y{kOlt&LrUCCS_V?0 zXPcpPifnsJD(n-V)(VdX7}xC&c`;{Pa1Ug#A4D<^*k{m&!TSTKy)+asJ)e`sOTGy& c=4JX|$d2ESVtH;bb?8RE*pyxUUz%_0Kbz24IsgCw literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/4d982c41efad2242f8c06630c23c68146153b47b b/test/core/end2end/fuzzers/server_fuzzer_corpus/4d982c41efad2242f8c06630c23c68146153b47b new file mode 100644 index 0000000000000000000000000000000000000000..fa1d5f081e4e59fcf3d9b0836eb8fcee2ab1a9ff GIT binary patch literal 287 zcmY+9%}&EG49B-o#HcnY2e_h&6CX?4?YJjk2Si2t0$$=ZmeM3@UBq~A?xee6+1Ag0 ze@L!A57|rh)-+YI%gc4TPV4t6&t|hE#$>IdR zNmO2wYwtG?Hyu@oPrAgGfi1FXtNx5O!*7JL| zrB{8t=1=)c(^SP_SFW>lR=-U>Ns=_y6hE^G&BXOF0GmZ|_P#hlFK&*5GT32im_wX8 zWaD*Oz1NLMjURZaj0JBa5-a5$qhraJfcFrBB?V006>T5XGaDLY%uleS#qGoupcDpn z5|!8F+B?$mp7^rWc(#Bo)Au%rIpczRAdCGVvT?v(LK_z!PN1c-6k$HSlPdb#M~k~M a-&k_v*P~ed2}~XOk+1e;SO2Hxhx!+p1XwEo literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-0aa52e00ddd54f8e129430852c2da95650c354b0 b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-0aa52e00ddd54f8e129430852c2da95650c354b0 new file mode 100644 index 0000000000000000000000000000000000000000..15d6f17cd386af5d553052a0a29d390ef739ec00 GIT binary patch literal 2048 zcmeHDJx{|h5Oq)xC8ClC*dr!D%?FHGSYbd!Bx1kX*Tj-*Th2wI{6qc|15S5_E*+{Y z@9v~~@9Dkz<28LqU)r`Vp7L^;ER*JKLdICkSQ-ZViNeMreqK4Ceo<_!E!N=qMKy>X zw;1j^Uu z0v%;&gq6y4Hxf4*2vntN)$;0NkKU%K!iX literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-3cec540a680b108dda1e0a8e0bfb2d44e5a4a4e8 b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-3cec540a680b108dda1e0a8e0bfb2d44e5a4a4e8 new file mode 100644 index 0000000000000000000000000000000000000000..ca94f4b84365f1b07bac8982f266c477ccc9564b GIT binary patch literal 2047 zcmeHDO-sZu5KY~RYjGt9z4xfH{m^4CUiGk8Z2v%*j7=b$gzhZ3{&j_#7W@HwT{|$3 zdGO}Jd-eNk`jEb~ZCyO&N(q@0ZFx2EMuCH8^!nhux7fiTMLh+l!TgqAWoc;v!+qd|~%w&;2f{AR>V0HCJ~ zEjX!dcPsJ32*S0N;WPNHyD#ne8R3$8p$)R@KUagcBgJF}Mh9&=*+Eg}k0DxKrgui$ j{pUS<{+WVB6V5OLz6{h>@P literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-84f22ffca68c6e1590a44aa9f6dd0cef1f680c77 b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-84f22ffca68c6e1590a44aa9f6dd0cef1f680c77 new file mode 100644 index 0000000000000000000000000000000000000000..9e7b0022381185ac6afc7b52c155ee91d126d51f GIT binary patch literal 2048 zcmeHDJx{|h5KT}JB_fgs*dr!DbrKk}u)=^^k%--OF0m!Yww#MZ`G@=`2Ar&&I>1on zqx1An`bWqpb4-w>#EQuA~ps`5e!S?9o%p ziu6uNJ$~K?&p$J-aK;4|1x`?b>I6A0l#W%PJa%E3|33vj4qhd)rP^qqJwq-I+J8~_ E1@^O0o&W#< literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-adaac86cf1aa1e98e95240c5f92c3708456c3624 b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-adaac86cf1aa1e98e95240c5f92c3708456c3624 new file mode 100644 index 0000000000000000000000000000000000000000..c525f76ce3cb9ae6637a942c04214db0ef6d633d GIT binary patch literal 2047 zcmeHDO-sW-5KSav8!YTW@4=Hw^P$IFyy`&=CiFhtohA$0-DNWY>p%2Ad2o{-AoS8h z$-q2jVBQ$g2pXGBze)D4SE82siW9hS;)P@UGjs_x3uhna6t~FLf5l+=+ULn`h&YIh?Fbo$7GV@d67MN vYgv)pE2)RChv4OR@)b@v!<@kRB~YKArP3^>^tx^$>= z(mmZt@80RX>hmpmOkSI&%Ad1h6|ds@eZ(LLBHv^EgyR&l%hCdMi+pEHz6Hmw%AR+) z$EYK+e%m8;Mnu&|-LSZX!Ea8|VW|uU)tR2yH8+}2Q%VPm46Id>14*Ov)>+POMofWo zw3MReMo8V>3fw6mTub3Ez23V0mX=)*F35pY=z10pJ-QTHPq^EHNV$@JOeQ&=7ul1y umKDjpl6v@h2wr|CU*Uu^%n6)f0`(bsnk^lfKzSs8rk^l@%?W?~`|1ysHcP7j literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-ba0016a62a8576a57f000b90c364847ef6b12dcc b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-ba0016a62a8576a57f000b90c364847ef6b12dcc new file mode 100644 index 0000000000000000000000000000000000000000..cbd18291f10c97dfef925dbcaf1751bc65daf17b GIT binary patch literal 2046 zcmeHD!Ait16il_^T3pCM@5PhKrmY@(@v4W#V*3LzdD{lENl0J8_16_@+CSLq+6Ql# z2X6*us*ktyF@0^CDu2$3b+S(C?SzDoIBb}65=|_k7p3Fat@54y8OPDn%d!_8>>=(D zUAXpuot1I*UNh;3Ls+5bN`vodGW6gXZ^OggCzniU6=*u!iM+_3LbR+% m@3k_+*8_R^or6U)F0eFkdJWX47imd!bOYtlibe3R8u$Y+q)jFO literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-ba17346b8e46e6a05aaa7342a959a7c5ab0f1471 b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-ba17346b8e46e6a05aaa7342a959a7c5ab0f1471 new file mode 100644 index 0000000000000000000000000000000000000000..3f5b83987ce833cabbe398606a8498bd07db3c6b GIT binary patch literal 2048 zcmeH@u};H442Ba3qC`}>0rrRqP?HOcSy;<}h)BflUfkrQ>)q+%NR&6^ofvw_6Lf^A zmi)_>ep~)re!M1+$-1sf{+#8@co|o3qXt0``5faX9IKFB6c(sk@U1a?1CCu5z36a< zQAcEbw?pbo6P52(&Ef(E-#JP9D`fDk1mDQ8}2sHq(VtwCeu2>^X$o^ uWqES1q#nK=f|uWkE1dKsrw`2V1Jw+fjzu~@);N1#F?+&)4EXsMZa)C&)l04b literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-ccafab6afdc6474610023b47bd7b3e1b9ea4647b b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-ccafab6afdc6474610023b47bd7b3e1b9ea4647b new file mode 100644 index 0000000000000000000000000000000000000000..65737bfeacfc7dcc8a4d28cc46fb237b920a7782 GIT binary patch literal 2047 zcmeHDJx{|h5Ort}C8ClC*dr#2nhzMWu)X`Ke5aqcX@8{USA3lel6&VzLVS0fWs-y8r+H literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-dc57e96cd02ba32fa4a99c97b6490e9879d30be5 b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-dc57e96cd02ba32fa4a99c97b6490e9879d30be5 new file mode 100644 index 0000000000000000000000000000000000000000..6c4ed6d13e132724e518133cb292889647330355 GIT binary patch literal 2047 zcmeHDO;5ux3~gBvqheAHaId%w(E0(#UbwOYqFVb0ywqzWWl5B}663dXAniZcWt&hf z`N@`^{p?q4*3nD!QB_6ymSl@?5tg3=dY%`!bTRY%q4L>vZh+c(y3;z{f@L>($6MTE z&=MKf?U7nt2gO%eu`q|;bym>fR%#Bi)g7@rt`(u8m<|RR7$XG-5?ZB=HJsfK7z5{M zC`QF~EmZSR<4ywMO4M%B?OQcJ!mumCIav@AZO6jCLmNZm2#;H+V=jd&qj4Qiv*gvi ymSoYB6srGz_TGQT$NUi|IL?9DarB9O9tX*PP&(* z6g4-k)ZJZ+I|YOr+4@a?Z_|BA%gzWFSNb*^ZVyqfa{Tto$hJ!D^HX5%=)h!_yN_HP$U2V literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-f9a2773d6502fd4b1ffa73df3c550b0da63af833 b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-f9a2773d6502fd4b1ffa73df3c550b0da63af833 new file mode 100644 index 0000000000000000000000000000000000000000..bf38fac345d5abf9b2e29bec704d8077b3fc2691 GIT binary patch literal 2046 zcmeHDO-sZu5N)+$EiUAs_u^@lZBsq=;#Ch~vHb(H>1-RwCLx`I>u>j9+UuTO5IZoB zH^Y4JUiI;sKBO;AQ}L&~SS72Zew#1|g2<{h4Bvudm*pUO++)-e zSzqmudecVLd)=_4gwa<{(&0)O0jf6xv1?&8p{9%u78zKpqyUme^UhhpZYIn?2(*-; z7N(WDyKQl&fN&#Qzv=I7x-V(j8DUHgq(V2aWE{|C(D{M8Ewq_X($jQ4CwP%RdTDu) su9ei|=Y8<}JqrtGTwrnFuR9PQ3#gA Date: Tue, 26 Apr 2016 21:07:53 -0700 Subject: [PATCH 0096/1894] Fix use-after-free --- src/core/lib/surface/call.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index f33688beef0..3f31e77247f 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -373,7 +373,6 @@ static void destroy_call(grpc_exec_ctx *exec_ctx, void *call, bool success) { if (c->receiving_stream != NULL) { grpc_byte_stream_destroy(exec_ctx, c->receiving_stream); } - GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, c->channel, "call"); gpr_mu_destroy(&c->mu); for (i = 0; i < STATUS_SOURCE_COUNT; i++) { if (c->status[i].details) { @@ -391,7 +390,9 @@ static void destroy_call(grpc_exec_ctx *exec_ctx, void *call, bool success) { if (c->cq) { GRPC_CQ_INTERNAL_UNREF(c->cq, "bind"); } + grpc_channel *channel = c->channel; grpc_call_stack_destroy(exec_ctx, CALL_STACK_FROM_CALL(c), c); + GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, channel, "call"); GPR_TIMER_END("destroy_call", 0); } From cce51fe5ac8a394ed6e3ca5b1d9c504148bbf345 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 26 Apr 2016 21:36:29 -0700 Subject: [PATCH 0097/1894] Added compression tracer --- src/core/lib/channel/compress_filter.c | 22 ++++++++++++++++++++++ src/core/lib/channel/compress_filter.h | 2 ++ src/core/lib/surface/init.c | 1 + 3 files changed, 25 insertions(+) diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 3d42d0e6161..d423aa464ee 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -47,6 +47,8 @@ #include "src/core/lib/support/string.h" #include "src/core/lib/transport/static_metadata.h" +int grpc_compress_filter_trace = 0; + typedef struct call_data { gpr_slice_buffer slices; /**< Buffers up input slices to be compressed */ grpc_linked_mdelem compression_algorithm_storage; @@ -169,9 +171,29 @@ static void finish_send_message(grpc_exec_ctx *exec_ctx, did_compress = grpc_msg_compress(calld->compression_algorithm, &calld->slices, &tmp); if (did_compress) { + if (grpc_compress_filter_trace) { + char *algo_name; + const size_t before_size = calld->slices.length; + const size_t after_size = tmp.length; + const float savings_ratio = 1.0f - (float)after_size / (float)before_size; + GPR_ASSERT(grpc_compression_algorithm_name(calld->compression_algorithm, + &algo_name)); + gpr_log(GPR_DEBUG, + "Compressed[%s] %d bytes vs. %d bytes (%.2f%% savings)", + algo_name, before_size, after_size, 100 * savings_ratio); + } gpr_slice_buffer_swap(&calld->slices, &tmp); calld->send_flags |= GRPC_WRITE_INTERNAL_COMPRESS; + } else { + if (grpc_compress_filter_trace) { + char *algo_name; + GPR_ASSERT(grpc_compression_algorithm_name(calld->compression_algorithm, + &algo_name)); + gpr_log(GPR_DEBUG, "Algorithm '%s' enabled but decided not to compress.", + algo_name); + } } + gpr_slice_buffer_destroy(&tmp); grpc_slice_buffer_stream_init(&calld->replacement_stream, &calld->slices, diff --git a/src/core/lib/channel/compress_filter.h b/src/core/lib/channel/compress_filter.h index 0d973329c44..cf5879d82ef 100644 --- a/src/core/lib/channel/compress_filter.h +++ b/src/core/lib/channel/compress_filter.h @@ -38,6 +38,8 @@ #define GRPC_COMPRESS_REQUEST_ALGORITHM_KEY "grpc-internal-encoding-request" +extern int grpc_compress_filter_trace; + /** Compression filter for outgoing data. * * See for the available compression settings. diff --git a/src/core/lib/surface/init.c b/src/core/lib/surface/init.c index 03f379aba88..736e8b296fb 100644 --- a/src/core/lib/surface/init.c +++ b/src/core/lib/surface/init.c @@ -164,6 +164,7 @@ void grpc_init(void) { grpc_register_tracer("channel_stack_builder", &grpc_trace_channel_stack_builder); grpc_register_tracer("http1", &grpc_http1_trace); + grpc_register_tracer("compression", &grpc_compress_filter_trace); grpc_security_pre_init(); grpc_iomgr_init(); grpc_executor_init(); From a93e5a49e3d04c2f72e320040a15121e4d88b5d3 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 26 Apr 2016 21:47:49 -0700 Subject: [PATCH 0098/1894] Fix use-after-free --- .../chttp2/transport/chttp2_transport.c | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 24448714a8d..fcf2abfe66e 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1668,6 +1668,14 @@ static void set_pollset(grpc_exec_ctx *exec_ctx, grpc_transport *gt, * BYTE STREAM */ +static void incoming_byte_stream_unref(grpc_exec_ctx *exec_ctx, + grpc_chttp2_incoming_byte_stream *bs) { + if (gpr_unref(&bs->refs)) { + gpr_slice_buffer_destroy(&bs->slices); + gpr_free(bs); + } +} + static void incoming_byte_stream_update_flow_control( grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, size_t max_size_hint, @@ -1738,6 +1746,7 @@ static void incoming_byte_stream_next_locked(grpc_exec_ctx *exec_ctx, bs->on_next = arg->on_complete; bs->next = arg->slice; } + incoming_byte_stream_unref(exec_ctx, bs); } static int incoming_byte_stream_next(grpc_exec_ctx *exec_ctx, @@ -1747,20 +1756,13 @@ static int incoming_byte_stream_next(grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_byte_stream *bs = (grpc_chttp2_incoming_byte_stream *)byte_stream; incoming_byte_stream_next_arg arg = {bs, slice, max_size_hint, on_complete}; + gpr_ref(&bs->refs); grpc_chttp2_run_with_global_lock(exec_ctx, bs->transport, bs->stream, incoming_byte_stream_next_locked, &arg, sizeof(arg)); return 0; } -static void incoming_byte_stream_unref(grpc_exec_ctx *exec_ctx, - grpc_chttp2_incoming_byte_stream *bs) { - if (gpr_unref(&bs->refs)) { - gpr_slice_buffer_destroy(&bs->slices); - gpr_free(bs); - } -} - static void incoming_byte_stream_destroy(grpc_exec_ctx *exec_ctx, grpc_byte_stream *byte_stream); @@ -1801,12 +1803,14 @@ static void incoming_byte_stream_push_locked(grpc_exec_ctx *exec_ctx, } else { gpr_slice_buffer_add(&bs->slices, arg->slice); } + incoming_byte_stream_unref(exec_ctx, bs); } void grpc_chttp2_incoming_byte_stream_push(grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_byte_stream *bs, gpr_slice slice) { incoming_byte_stream_push_arg arg = {bs, slice}; + gpr_ref(&bs->refs); grpc_chttp2_run_with_global_lock(exec_ctx, bs->transport, bs->stream, incoming_byte_stream_push_locked, &arg, sizeof(arg)); From 12dfdc3c27a14910f389fa1b1ac5ec0d54b9435c Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Tue, 26 Apr 2016 22:05:41 -0700 Subject: [PATCH 0099/1894] Change win32 file suffix --- BUILD | 82 +++++++++---------- Makefile | 44 +++++----- binding.gyp | 16 ++-- build.yaml | 30 +++---- config.m4 | 16 ++-- gRPC.podspec | 38 ++++----- grpc.gemspec | 34 ++++---- include/grpc/impl/codegen/atm.h | 4 +- .../codegen/{atm_win32.h => atm_windows.h} | 6 +- include/grpc/impl/codegen/port_platform.h | 16 ++-- include/grpc/impl/codegen/sync.h | 4 +- .../codegen/{sync_win32.h => sync_windows.h} | 6 +- .../support/{sync_win32.h => atm_windows.h} | 8 +- .../support/{log_win32.h => log_windows.h} | 6 +- .../support/{atm_win32.h => sync_windows.h} | 8 +- package.xml | 34 ++++---- src/core/lib/iomgr/iocp_windows.c | 2 +- src/core/lib/iomgr/iomgr_windows.c | 2 +- src/core/lib/iomgr/resolve_address_windows.c | 2 +- src/core/lib/iomgr/sockaddr.h | 4 +- .../{sockaddr_win32.h => sockaddr_windows.h} | 6 +- src/core/lib/iomgr/socket_windows.c | 2 +- src/core/lib/iomgr/tcp_client_windows.c | 4 +- src/core/lib/iomgr/tcp_server_windows.c | 2 +- src/core/lib/iomgr/tcp_windows.c | 4 +- src/core/lib/iomgr/workqueue.h | 2 +- src/core/lib/iomgr/workqueue_windows.c | 4 +- ...dentials_win32.c => credentials_windows.c} | 4 +- src/core/lib/support/cpu_windows.c | 4 +- .../support/{env_win32.c => env_windows.c} | 4 +- .../support/{log_win32.c => log_windows.c} | 8 +- .../{string_win32.c => string_windows.c} | 4 +- .../{string_win32.h => string_windows.h} | 10 +-- src/core/lib/support/subprocess_windows.c | 2 +- .../support/{sync_win32.c => sync_windows.c} | 4 +- .../support/{thd_win32.c => thd_windows.c} | 4 +- .../support/{time_win32.c => time_windows.c} | 4 +- .../{tmpfile_win32.c => tmpfile_windows.c} | 6 +- src/csharp/ext/grpc_csharp_ext.c | 2 +- .../grpcio/grpc/_cython/imports.generated.c | 4 +- .../grpcio/grpc/_cython/imports.generated.h | 8 +- src/python/grpcio/grpc/_cython/loader.c | 4 +- src/python/grpcio/grpc_core_dependencies.py | 16 ++-- src/ruby/ext/grpc/rb_grpc_imports.generated.c | 4 +- src/ruby/ext/grpc/rb_grpc_imports.generated.h | 6 +- src/ruby/ext/grpc/rb_loader.c | 2 +- .../grpc/_cython/imports.generated.c.template | 4 +- .../grpc/_cython/imports.generated.h.template | 6 +- .../grpc/rb_grpc_imports.generated.c.template | 4 +- .../grpc/rb_grpc_imports.generated.h.template | 4 +- tools/doxygen/Doxyfile.c++ | 4 +- tools/doxygen/Doxyfile.c++.internal | 4 +- tools/doxygen/Doxyfile.core | 14 ++-- tools/doxygen/Doxyfile.core.internal | 34 ++++---- tools/run_tests/sources_and_headers.json | 44 +++++----- vsprojects/coapp/openssl/libeay32.vcxproj | 2 +- vsprojects/vcxproj/gpr/gpr.vcxproj | 26 +++--- vsprojects/vcxproj/gpr/gpr.vcxproj.filters | 26 +++--- vsprojects/vcxproj/grpc++/grpc++.vcxproj | 4 +- .../vcxproj/grpc++/grpc++.vcxproj.filters | 4 +- .../grpc++_unsecure/grpc++_unsecure.vcxproj | 4 +- .../grpc++_unsecure.vcxproj.filters | 4 +- vsprojects/vcxproj/grpc/grpc.vcxproj | 8 +- vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 8 +- .../grpc_unsecure/grpc_unsecure.vcxproj | 6 +- .../grpc_unsecure.vcxproj.filters | 6 +- .../codegen_test_full.vcxproj | 4 +- .../codegen_test_full.vcxproj.filters | 4 +- .../codegen_test_minimal.vcxproj | 4 +- .../codegen_test_minimal.vcxproj.filters | 4 +- 70 files changed, 359 insertions(+), 359 deletions(-) rename include/grpc/impl/codegen/{atm_win32.h => atm_windows.h} (97%) rename include/grpc/impl/codegen/{sync_win32.h => sync_windows.h} (93%) rename include/grpc/support/{sync_win32.h => atm_windows.h} (91%) rename include/grpc/support/{log_win32.h => log_windows.h} (94%) rename include/grpc/support/{atm_win32.h => sync_windows.h} (90%) rename src/core/lib/iomgr/{sockaddr_win32.h => sockaddr_windows.h} (91%) rename src/core/lib/security/{credentials_win32.c => credentials_windows.c} (98%) rename src/core/lib/support/{env_win32.c => env_windows.c} (98%) rename src/core/lib/support/{log_win32.c => log_windows.c} (96%) rename src/core/lib/support/{string_win32.c => string_windows.c} (98%) rename src/core/lib/support/{string_win32.h => string_windows.h} (90%) rename src/core/lib/support/{sync_win32.c => sync_windows.c} (98%) rename src/core/lib/support/{thd_win32.c => thd_windows.c} (98%) rename src/core/lib/support/{time_win32.c => time_windows.c} (98%) rename src/core/lib/support/{tmpfile_win32.c => tmpfile_windows.c} (96%) diff --git a/BUILD b/BUILD index b69c9404113..64e60302aa6 100644 --- a/BUILD +++ b/BUILD @@ -53,7 +53,7 @@ cc_library( "src/core/lib/support/murmur_hash.h", "src/core/lib/support/stack_lockfree.h", "src/core/lib/support/string.h", - "src/core/lib/support/string_win32.h", + "src/core/lib/support/string_windows.h", "src/core/lib/support/thd_internal.h", "src/core/lib/support/time_precise.h", "src/core/lib/support/tmpfile.h", @@ -69,7 +69,7 @@ cc_library( "src/core/lib/support/cpu_windows.c", "src/core/lib/support/env_linux.c", "src/core/lib/support/env_posix.c", - "src/core/lib/support/env_win32.c", + "src/core/lib/support/env_windows.c", "src/core/lib/support/histogram.c", "src/core/lib/support/host_port.c", "src/core/lib/support/load_file.c", @@ -77,29 +77,29 @@ cc_library( "src/core/lib/support/log_android.c", "src/core/lib/support/log_linux.c", "src/core/lib/support/log_posix.c", - "src/core/lib/support/log_win32.c", + "src/core/lib/support/log_windows.c", "src/core/lib/support/murmur_hash.c", "src/core/lib/support/slice.c", "src/core/lib/support/slice_buffer.c", "src/core/lib/support/stack_lockfree.c", "src/core/lib/support/string.c", "src/core/lib/support/string_posix.c", - "src/core/lib/support/string_win32.c", + "src/core/lib/support/string_windows.c", "src/core/lib/support/subprocess_posix.c", "src/core/lib/support/subprocess_windows.c", "src/core/lib/support/sync.c", "src/core/lib/support/sync_posix.c", - "src/core/lib/support/sync_win32.c", + "src/core/lib/support/sync_windows.c", "src/core/lib/support/thd.c", "src/core/lib/support/thd_posix.c", - "src/core/lib/support/thd_win32.c", + "src/core/lib/support/thd_windows.c", "src/core/lib/support/time.c", "src/core/lib/support/time_posix.c", "src/core/lib/support/time_precise.c", - "src/core/lib/support/time_win32.c", + "src/core/lib/support/time_windows.c", "src/core/lib/support/tls_pthread.c", "src/core/lib/support/tmpfile_posix.c", - "src/core/lib/support/tmpfile_win32.c", + "src/core/lib/support/tmpfile_windows.c", "src/core/lib/support/wrap_memcpy.c", ], hdrs = [ @@ -107,14 +107,14 @@ cc_library( "include/grpc/support/atm.h", "include/grpc/support/atm_gcc_atomic.h", "include/grpc/support/atm_gcc_sync.h", - "include/grpc/support/atm_win32.h", + "include/grpc/support/atm_windows.h", "include/grpc/support/avl.h", "include/grpc/support/cmdline.h", "include/grpc/support/cpu.h", "include/grpc/support/histogram.h", "include/grpc/support/host_port.h", "include/grpc/support/log.h", - "include/grpc/support/log_win32.h", + "include/grpc/support/log_windows.h", "include/grpc/support/port_platform.h", "include/grpc/support/slice.h", "include/grpc/support/slice_buffer.h", @@ -123,7 +123,7 @@ cc_library( "include/grpc/support/sync.h", "include/grpc/support/sync_generic.h", "include/grpc/support/sync_posix.h", - "include/grpc/support/sync_win32.h", + "include/grpc/support/sync_windows.h", "include/grpc/support/thd.h", "include/grpc/support/time.h", "include/grpc/support/tls.h", @@ -135,7 +135,7 @@ cc_library( "include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/atm_windows.h", "include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -143,7 +143,7 @@ cc_library( "include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/sync_windows.h", "include/grpc/impl/codegen/time.h", ], includes = [ @@ -192,7 +192,7 @@ cc_library( "src/core/lib/iomgr/sockaddr.h", "src/core/lib/iomgr/sockaddr_posix.h", "src/core/lib/iomgr/sockaddr_utils.h", - "src/core/lib/iomgr/sockaddr_win32.h", + "src/core/lib/iomgr/sockaddr_windows.h", "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", @@ -402,7 +402,7 @@ cc_library( "src/core/lib/security/credentials.c", "src/core/lib/security/credentials_metadata.c", "src/core/lib/security/credentials_posix.c", - "src/core/lib/security/credentials_win32.c", + "src/core/lib/security/credentials_windows.c", "src/core/lib/security/google_default_credentials.c", "src/core/lib/security/handshake.c", "src/core/lib/security/json_token.c", @@ -470,7 +470,7 @@ cc_library( "include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/atm_windows.h", "include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -478,7 +478,7 @@ cc_library( "include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/sync_windows.h", "include/grpc/impl/codegen/time.h", "include/grpc/grpc_security.h", "include/grpc/grpc_security_constants.h", @@ -537,7 +537,7 @@ cc_library( "src/core/lib/iomgr/sockaddr.h", "src/core/lib/iomgr/sockaddr_posix.h", "src/core/lib/iomgr/sockaddr_utils.h", - "src/core/lib/iomgr/sockaddr_win32.h", + "src/core/lib/iomgr/sockaddr_windows.h", "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", @@ -781,7 +781,7 @@ cc_library( "include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/atm_windows.h", "include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -789,7 +789,7 @@ cc_library( "include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/sync_windows.h", "include/grpc/impl/codegen/time.h", "include/grpc/census.h", ], @@ -953,7 +953,7 @@ cc_library( "include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/atm_windows.h", "include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -961,7 +961,7 @@ cc_library( "include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/sync_windows.h", "include/grpc/impl/codegen/time.h", "include/grpc++/impl/codegen/config.h", "include/grpc++/impl/codegen/config_protobuf.h", @@ -1098,7 +1098,7 @@ cc_library( "include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/atm_windows.h", "include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -1106,7 +1106,7 @@ cc_library( "include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/sync_windows.h", "include/grpc/impl/codegen/time.h", "include/grpc++/impl/codegen/config.h", "include/grpc++/impl/codegen/config_protobuf.h", @@ -1204,7 +1204,7 @@ objc_library( "src/core/lib/support/cpu_windows.c", "src/core/lib/support/env_linux.c", "src/core/lib/support/env_posix.c", - "src/core/lib/support/env_win32.c", + "src/core/lib/support/env_windows.c", "src/core/lib/support/histogram.c", "src/core/lib/support/host_port.c", "src/core/lib/support/load_file.c", @@ -1212,29 +1212,29 @@ objc_library( "src/core/lib/support/log_android.c", "src/core/lib/support/log_linux.c", "src/core/lib/support/log_posix.c", - "src/core/lib/support/log_win32.c", + "src/core/lib/support/log_windows.c", "src/core/lib/support/murmur_hash.c", "src/core/lib/support/slice.c", "src/core/lib/support/slice_buffer.c", "src/core/lib/support/stack_lockfree.c", "src/core/lib/support/string.c", "src/core/lib/support/string_posix.c", - "src/core/lib/support/string_win32.c", + "src/core/lib/support/string_windows.c", "src/core/lib/support/subprocess_posix.c", "src/core/lib/support/subprocess_windows.c", "src/core/lib/support/sync.c", "src/core/lib/support/sync_posix.c", - "src/core/lib/support/sync_win32.c", + "src/core/lib/support/sync_windows.c", "src/core/lib/support/thd.c", "src/core/lib/support/thd_posix.c", - "src/core/lib/support/thd_win32.c", + "src/core/lib/support/thd_windows.c", "src/core/lib/support/time.c", "src/core/lib/support/time_posix.c", "src/core/lib/support/time_precise.c", - "src/core/lib/support/time_win32.c", + "src/core/lib/support/time_windows.c", "src/core/lib/support/tls_pthread.c", "src/core/lib/support/tmpfile_posix.c", - "src/core/lib/support/tmpfile_win32.c", + "src/core/lib/support/tmpfile_windows.c", "src/core/lib/support/wrap_memcpy.c", ], hdrs = [ @@ -1242,14 +1242,14 @@ objc_library( "include/grpc/support/atm.h", "include/grpc/support/atm_gcc_atomic.h", "include/grpc/support/atm_gcc_sync.h", - "include/grpc/support/atm_win32.h", + "include/grpc/support/atm_windows.h", "include/grpc/support/avl.h", "include/grpc/support/cmdline.h", "include/grpc/support/cpu.h", "include/grpc/support/histogram.h", "include/grpc/support/host_port.h", "include/grpc/support/log.h", - "include/grpc/support/log_win32.h", + "include/grpc/support/log_windows.h", "include/grpc/support/port_platform.h", "include/grpc/support/slice.h", "include/grpc/support/slice_buffer.h", @@ -1258,7 +1258,7 @@ objc_library( "include/grpc/support/sync.h", "include/grpc/support/sync_generic.h", "include/grpc/support/sync_posix.h", - "include/grpc/support/sync_win32.h", + "include/grpc/support/sync_windows.h", "include/grpc/support/thd.h", "include/grpc/support/time.h", "include/grpc/support/tls.h", @@ -1270,7 +1270,7 @@ objc_library( "include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/atm_windows.h", "include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -1278,7 +1278,7 @@ objc_library( "include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/sync_windows.h", "include/grpc/impl/codegen/time.h", "src/core/lib/profiling/timers.h", "src/core/lib/support/backoff.h", @@ -1288,7 +1288,7 @@ objc_library( "src/core/lib/support/murmur_hash.h", "src/core/lib/support/stack_lockfree.h", "src/core/lib/support/string.h", - "src/core/lib/support/string_win32.h", + "src/core/lib/support/string_windows.h", "src/core/lib/support/thd_internal.h", "src/core/lib/support/time_precise.h", "src/core/lib/support/tmpfile.h", @@ -1417,7 +1417,7 @@ objc_library( "src/core/lib/security/credentials.c", "src/core/lib/security/credentials_metadata.c", "src/core/lib/security/credentials_posix.c", - "src/core/lib/security/credentials_win32.c", + "src/core/lib/security/credentials_windows.c", "src/core/lib/security/google_default_credentials.c", "src/core/lib/security/handshake.c", "src/core/lib/security/json_token.c", @@ -1485,7 +1485,7 @@ objc_library( "include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/atm_windows.h", "include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -1493,7 +1493,7 @@ objc_library( "include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/sync_windows.h", "include/grpc/impl/codegen/time.h", "include/grpc/grpc_security.h", "include/grpc/grpc_security_constants.h", @@ -1531,7 +1531,7 @@ objc_library( "src/core/lib/iomgr/sockaddr.h", "src/core/lib/iomgr/sockaddr_posix.h", "src/core/lib/iomgr/sockaddr_utils.h", - "src/core/lib/iomgr/sockaddr_win32.h", + "src/core/lib/iomgr/sockaddr_windows.h", "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", diff --git a/Makefile b/Makefile index 3b7dbd9638a..91360ad9707 100644 --- a/Makefile +++ b/Makefile @@ -2316,7 +2316,7 @@ LIBGPR_SRC = \ src/core/lib/support/cpu_windows.c \ src/core/lib/support/env_linux.c \ src/core/lib/support/env_posix.c \ - src/core/lib/support/env_win32.c \ + src/core/lib/support/env_windows.c \ src/core/lib/support/histogram.c \ src/core/lib/support/host_port.c \ src/core/lib/support/load_file.c \ @@ -2324,29 +2324,29 @@ LIBGPR_SRC = \ src/core/lib/support/log_android.c \ src/core/lib/support/log_linux.c \ src/core/lib/support/log_posix.c \ - src/core/lib/support/log_win32.c \ + src/core/lib/support/log_windows.c \ src/core/lib/support/murmur_hash.c \ src/core/lib/support/slice.c \ src/core/lib/support/slice_buffer.c \ src/core/lib/support/stack_lockfree.c \ src/core/lib/support/string.c \ src/core/lib/support/string_posix.c \ - src/core/lib/support/string_win32.c \ + src/core/lib/support/string_windows.c \ src/core/lib/support/subprocess_posix.c \ src/core/lib/support/subprocess_windows.c \ src/core/lib/support/sync.c \ src/core/lib/support/sync_posix.c \ - src/core/lib/support/sync_win32.c \ + src/core/lib/support/sync_windows.c \ src/core/lib/support/thd.c \ src/core/lib/support/thd_posix.c \ - src/core/lib/support/thd_win32.c \ + src/core/lib/support/thd_windows.c \ src/core/lib/support/time.c \ src/core/lib/support/time_posix.c \ src/core/lib/support/time_precise.c \ - src/core/lib/support/time_win32.c \ + src/core/lib/support/time_windows.c \ src/core/lib/support/tls_pthread.c \ src/core/lib/support/tmpfile_posix.c \ - src/core/lib/support/tmpfile_win32.c \ + src/core/lib/support/tmpfile_windows.c \ src/core/lib/support/wrap_memcpy.c \ PUBLIC_HEADERS_C += \ @@ -2354,14 +2354,14 @@ PUBLIC_HEADERS_C += \ include/grpc/support/atm.h \ include/grpc/support/atm_gcc_atomic.h \ include/grpc/support/atm_gcc_sync.h \ - include/grpc/support/atm_win32.h \ + include/grpc/support/atm_windows.h \ include/grpc/support/avl.h \ include/grpc/support/cmdline.h \ include/grpc/support/cpu.h \ include/grpc/support/histogram.h \ include/grpc/support/host_port.h \ include/grpc/support/log.h \ - include/grpc/support/log_win32.h \ + include/grpc/support/log_windows.h \ include/grpc/support/port_platform.h \ include/grpc/support/slice.h \ include/grpc/support/slice_buffer.h \ @@ -2370,7 +2370,7 @@ PUBLIC_HEADERS_C += \ include/grpc/support/sync.h \ include/grpc/support/sync_generic.h \ include/grpc/support/sync_posix.h \ - include/grpc/support/sync_win32.h \ + include/grpc/support/sync_windows.h \ include/grpc/support/thd.h \ include/grpc/support/time.h \ include/grpc/support/tls.h \ @@ -2382,7 +2382,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ - include/grpc/impl/codegen/atm_win32.h \ + include/grpc/impl/codegen/atm_windows.h \ include/grpc/impl/codegen/log.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -2390,7 +2390,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ - include/grpc/impl/codegen/sync_win32.h \ + include/grpc/impl/codegen/sync_windows.h \ include/grpc/impl/codegen/time.h \ LIBGPR_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGPR_SRC)))) @@ -2567,7 +2567,7 @@ LIBGRPC_SRC = \ src/core/lib/security/credentials.c \ src/core/lib/security/credentials_metadata.c \ src/core/lib/security/credentials_posix.c \ - src/core/lib/security/credentials_win32.c \ + src/core/lib/security/credentials_windows.c \ src/core/lib/security/google_default_credentials.c \ src/core/lib/security/handshake.c \ src/core/lib/security/json_token.c \ @@ -2638,7 +2638,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ - include/grpc/impl/codegen/atm_win32.h \ + include/grpc/impl/codegen/atm_windows.h \ include/grpc/impl/codegen/log.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -2646,7 +2646,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ - include/grpc/impl/codegen/sync_win32.h \ + include/grpc/impl/codegen/sync_windows.h \ include/grpc/impl/codegen/time.h \ include/grpc/grpc_security.h \ include/grpc/grpc_security_constants.h \ @@ -2958,7 +2958,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ - include/grpc/impl/codegen/atm_win32.h \ + include/grpc/impl/codegen/atm_windows.h \ include/grpc/impl/codegen/log.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -2966,7 +2966,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ - include/grpc/impl/codegen/sync_win32.h \ + include/grpc/impl/codegen/sync_windows.h \ include/grpc/impl/codegen/time.h \ include/grpc/census.h \ @@ -3244,7 +3244,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ - include/grpc/impl/codegen/atm_win32.h \ + include/grpc/impl/codegen/atm_windows.h \ include/grpc/impl/codegen/log.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -3252,7 +3252,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ - include/grpc/impl/codegen/sync_win32.h \ + include/grpc/impl/codegen/sync_windows.h \ include/grpc/impl/codegen/time.h \ include/grpc++/impl/codegen/config.h \ include/grpc++/impl/codegen/config_protobuf.h \ @@ -3547,7 +3547,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ - include/grpc/impl/codegen/atm_win32.h \ + include/grpc/impl/codegen/atm_windows.h \ include/grpc/impl/codegen/log.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -3555,7 +3555,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ - include/grpc/impl/codegen/sync_win32.h \ + include/grpc/impl/codegen/sync_windows.h \ include/grpc/impl/codegen/time.h \ include/grpc++/impl/codegen/config.h \ include/grpc++/impl/codegen/config_protobuf.h \ @@ -14251,7 +14251,7 @@ src/core/lib/security/client_auth_filter.c: $(OPENSSL_DEP) src/core/lib/security/credentials.c: $(OPENSSL_DEP) src/core/lib/security/credentials_metadata.c: $(OPENSSL_DEP) src/core/lib/security/credentials_posix.c: $(OPENSSL_DEP) -src/core/lib/security/credentials_win32.c: $(OPENSSL_DEP) +src/core/lib/security/credentials_windows.c: $(OPENSSL_DEP) src/core/lib/security/google_default_credentials.c: $(OPENSSL_DEP) src/core/lib/security/handshake.c: $(OPENSSL_DEP) src/core/lib/security/json_token.c: $(OPENSSL_DEP) diff --git a/binding.gyp b/binding.gyp index 058743edbf8..fa77848ee6f 100644 --- a/binding.gyp +++ b/binding.gyp @@ -507,7 +507,7 @@ 'src/core/lib/support/cpu_windows.c', 'src/core/lib/support/env_linux.c', 'src/core/lib/support/env_posix.c', - 'src/core/lib/support/env_win32.c', + 'src/core/lib/support/env_windows.c', 'src/core/lib/support/histogram.c', 'src/core/lib/support/host_port.c', 'src/core/lib/support/load_file.c', @@ -515,29 +515,29 @@ 'src/core/lib/support/log_android.c', 'src/core/lib/support/log_linux.c', 'src/core/lib/support/log_posix.c', - 'src/core/lib/support/log_win32.c', + 'src/core/lib/support/log_windows.c', 'src/core/lib/support/murmur_hash.c', 'src/core/lib/support/slice.c', 'src/core/lib/support/slice_buffer.c', 'src/core/lib/support/stack_lockfree.c', 'src/core/lib/support/string.c', 'src/core/lib/support/string_posix.c', - 'src/core/lib/support/string_win32.c', + 'src/core/lib/support/string_windows.c', 'src/core/lib/support/subprocess_posix.c', 'src/core/lib/support/subprocess_windows.c', 'src/core/lib/support/sync.c', 'src/core/lib/support/sync_posix.c', - 'src/core/lib/support/sync_win32.c', + 'src/core/lib/support/sync_windows.c', 'src/core/lib/support/thd.c', 'src/core/lib/support/thd_posix.c', - 'src/core/lib/support/thd_win32.c', + 'src/core/lib/support/thd_windows.c', 'src/core/lib/support/time.c', 'src/core/lib/support/time_posix.c', 'src/core/lib/support/time_precise.c', - 'src/core/lib/support/time_win32.c', + 'src/core/lib/support/time_windows.c', 'src/core/lib/support/tls_pthread.c', 'src/core/lib/support/tmpfile_posix.c', - 'src/core/lib/support/tmpfile_win32.c', + 'src/core/lib/support/tmpfile_windows.c', 'src/core/lib/support/wrap_memcpy.c', ], "conditions": [ @@ -672,7 +672,7 @@ 'src/core/lib/security/credentials.c', 'src/core/lib/security/credentials_metadata.c', 'src/core/lib/security/credentials_posix.c', - 'src/core/lib/security/credentials_win32.c', + 'src/core/lib/security/credentials_windows.c', 'src/core/lib/security/google_default_credentials.c', 'src/core/lib/security/handshake.c', 'src/core/lib/security/json_token.c', diff --git a/build.yaml b/build.yaml index 6c00b42a1e7..9620416a588 100644 --- a/build.yaml +++ b/build.yaml @@ -38,14 +38,14 @@ filegroups: - include/grpc/support/atm.h - include/grpc/support/atm_gcc_atomic.h - include/grpc/support/atm_gcc_sync.h - - include/grpc/support/atm_win32.h + - include/grpc/support/atm_windows.h - include/grpc/support/avl.h - include/grpc/support/cmdline.h - include/grpc/support/cpu.h - include/grpc/support/histogram.h - include/grpc/support/host_port.h - include/grpc/support/log.h - - include/grpc/support/log_win32.h + - include/grpc/support/log_windows.h - include/grpc/support/port_platform.h - include/grpc/support/slice.h - include/grpc/support/slice_buffer.h @@ -54,7 +54,7 @@ filegroups: - include/grpc/support/sync.h - include/grpc/support/sync_generic.h - include/grpc/support/sync_posix.h - - include/grpc/support/sync_win32.h + - include/grpc/support/sync_windows.h - include/grpc/support/thd.h - include/grpc/support/time.h - include/grpc/support/tls.h @@ -71,7 +71,7 @@ filegroups: - src/core/lib/support/murmur_hash.h - src/core/lib/support/stack_lockfree.h - src/core/lib/support/string.h - - src/core/lib/support/string_win32.h + - src/core/lib/support/string_windows.h - src/core/lib/support/thd_internal.h - src/core/lib/support/time_precise.h - src/core/lib/support/tmpfile.h @@ -88,7 +88,7 @@ filegroups: - src/core/lib/support/cpu_windows.c - src/core/lib/support/env_linux.c - src/core/lib/support/env_posix.c - - src/core/lib/support/env_win32.c + - src/core/lib/support/env_windows.c - src/core/lib/support/histogram.c - src/core/lib/support/host_port.c - src/core/lib/support/load_file.c @@ -96,29 +96,29 @@ filegroups: - src/core/lib/support/log_android.c - src/core/lib/support/log_linux.c - src/core/lib/support/log_posix.c - - src/core/lib/support/log_win32.c + - src/core/lib/support/log_windows.c - src/core/lib/support/murmur_hash.c - src/core/lib/support/slice.c - src/core/lib/support/slice_buffer.c - src/core/lib/support/stack_lockfree.c - src/core/lib/support/string.c - src/core/lib/support/string_posix.c - - src/core/lib/support/string_win32.c + - src/core/lib/support/string_windows.c - src/core/lib/support/subprocess_posix.c - src/core/lib/support/subprocess_windows.c - src/core/lib/support/sync.c - src/core/lib/support/sync_posix.c - - src/core/lib/support/sync_win32.c + - src/core/lib/support/sync_windows.c - src/core/lib/support/thd.c - src/core/lib/support/thd_posix.c - - src/core/lib/support/thd_win32.c + - src/core/lib/support/thd_windows.c - src/core/lib/support/time.c - src/core/lib/support/time_posix.c - src/core/lib/support/time_precise.c - - src/core/lib/support/time_win32.c + - src/core/lib/support/time_windows.c - src/core/lib/support/tls_pthread.c - src/core/lib/support/tmpfile_posix.c - - src/core/lib/support/tmpfile_win32.c + - src/core/lib/support/tmpfile_windows.c - src/core/lib/support/wrap_memcpy.c uses: - gpr_codegen @@ -128,7 +128,7 @@ filegroups: - include/grpc/impl/codegen/atm.h - include/grpc/impl/codegen/atm_gcc_atomic.h - include/grpc/impl/codegen/atm_gcc_sync.h - - include/grpc/impl/codegen/atm_win32.h + - include/grpc/impl/codegen/atm_windows.h - include/grpc/impl/codegen/log.h - include/grpc/impl/codegen/port_platform.h - include/grpc/impl/codegen/slice.h @@ -136,7 +136,7 @@ filegroups: - include/grpc/impl/codegen/sync.h - include/grpc/impl/codegen/sync_generic.h - include/grpc/impl/codegen/sync_posix.h - - include/grpc/impl/codegen/sync_win32.h + - include/grpc/impl/codegen/sync_windows.h - include/grpc/impl/codegen/time.h - name: grpc_base public_headers: @@ -179,7 +179,7 @@ filegroups: - src/core/lib/iomgr/sockaddr.h - src/core/lib/iomgr/sockaddr_posix.h - src/core/lib/iomgr/sockaddr_utils.h - - src/core/lib/iomgr/sockaddr_win32.h + - src/core/lib/iomgr/sockaddr_windows.h - src/core/lib/iomgr/socket_utils_posix.h - src/core/lib/iomgr/socket_windows.h - src/core/lib/iomgr/tcp_client.h @@ -416,7 +416,7 @@ filegroups: - src/core/lib/security/credentials.c - src/core/lib/security/credentials_metadata.c - src/core/lib/security/credentials_posix.c - - src/core/lib/security/credentials_win32.c + - src/core/lib/security/credentials_windows.c - src/core/lib/security/google_default_credentials.c - src/core/lib/security/handshake.c - src/core/lib/security/json_token.c diff --git a/config.m4 b/config.m4 index 2d930a648e1..02798a8fedb 100644 --- a/config.m4 +++ b/config.m4 @@ -48,7 +48,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/support/cpu_windows.c \ src/core/lib/support/env_linux.c \ src/core/lib/support/env_posix.c \ - src/core/lib/support/env_win32.c \ + src/core/lib/support/env_windows.c \ src/core/lib/support/histogram.c \ src/core/lib/support/host_port.c \ src/core/lib/support/load_file.c \ @@ -56,29 +56,29 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/support/log_android.c \ src/core/lib/support/log_linux.c \ src/core/lib/support/log_posix.c \ - src/core/lib/support/log_win32.c \ + src/core/lib/support/log_windows.c \ src/core/lib/support/murmur_hash.c \ src/core/lib/support/slice.c \ src/core/lib/support/slice_buffer.c \ src/core/lib/support/stack_lockfree.c \ src/core/lib/support/string.c \ src/core/lib/support/string_posix.c \ - src/core/lib/support/string_win32.c \ + src/core/lib/support/string_windows.c \ src/core/lib/support/subprocess_posix.c \ src/core/lib/support/subprocess_windows.c \ src/core/lib/support/sync.c \ src/core/lib/support/sync_posix.c \ - src/core/lib/support/sync_win32.c \ + src/core/lib/support/sync_windows.c \ src/core/lib/support/thd.c \ src/core/lib/support/thd_posix.c \ - src/core/lib/support/thd_win32.c \ + src/core/lib/support/thd_windows.c \ src/core/lib/support/time.c \ src/core/lib/support/time_posix.c \ src/core/lib/support/time_precise.c \ - src/core/lib/support/time_win32.c \ + src/core/lib/support/time_windows.c \ src/core/lib/support/tls_pthread.c \ src/core/lib/support/tmpfile_posix.c \ - src/core/lib/support/tmpfile_win32.c \ + src/core/lib/support/tmpfile_windows.c \ src/core/lib/support/wrap_memcpy.c \ src/core/lib/surface/init.c \ src/core/lib/channel/channel_args.c \ @@ -191,7 +191,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/security/credentials.c \ src/core/lib/security/credentials_metadata.c \ src/core/lib/security/credentials_posix.c \ - src/core/lib/security/credentials_win32.c \ + src/core/lib/security/credentials_windows.c \ src/core/lib/security/google_default_credentials.c \ src/core/lib/security/handshake.c \ src/core/lib/security/json_token.c \ diff --git a/gRPC.podspec b/gRPC.podspec index d66e03354bb..b63112ffbbb 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -71,7 +71,7 @@ Pod::Spec.new do |s| 'src/core/lib/support/murmur_hash.h', 'src/core/lib/support/stack_lockfree.h', 'src/core/lib/support/string.h', - 'src/core/lib/support/string_win32.h', + 'src/core/lib/support/string_windows.h', 'src/core/lib/support/thd_internal.h', 'src/core/lib/support/time_precise.h', 'src/core/lib/support/tmpfile.h', @@ -79,14 +79,14 @@ Pod::Spec.new do |s| 'include/grpc/support/atm.h', 'include/grpc/support/atm_gcc_atomic.h', 'include/grpc/support/atm_gcc_sync.h', - 'include/grpc/support/atm_win32.h', + 'include/grpc/support/atm_windows.h', 'include/grpc/support/avl.h', 'include/grpc/support/cmdline.h', 'include/grpc/support/cpu.h', 'include/grpc/support/histogram.h', 'include/grpc/support/host_port.h', 'include/grpc/support/log.h', - 'include/grpc/support/log_win32.h', + 'include/grpc/support/log_windows.h', 'include/grpc/support/port_platform.h', 'include/grpc/support/slice.h', 'include/grpc/support/slice_buffer.h', @@ -95,7 +95,7 @@ Pod::Spec.new do |s| 'include/grpc/support/sync.h', 'include/grpc/support/sync_generic.h', 'include/grpc/support/sync_posix.h', - 'include/grpc/support/sync_win32.h', + 'include/grpc/support/sync_windows.h', 'include/grpc/support/thd.h', 'include/grpc/support/time.h', 'include/grpc/support/tls.h', @@ -107,7 +107,7 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/atm.h', 'include/grpc/impl/codegen/atm_gcc_atomic.h', 'include/grpc/impl/codegen/atm_gcc_sync.h', - 'include/grpc/impl/codegen/atm_win32.h', + 'include/grpc/impl/codegen/atm_windows.h', 'include/grpc/impl/codegen/log.h', 'include/grpc/impl/codegen/port_platform.h', 'include/grpc/impl/codegen/slice.h', @@ -115,7 +115,7 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/sync.h', 'include/grpc/impl/codegen/sync_generic.h', 'include/grpc/impl/codegen/sync_posix.h', - 'include/grpc/impl/codegen/sync_win32.h', + 'include/grpc/impl/codegen/sync_windows.h', 'include/grpc/impl/codegen/time.h', 'src/core/lib/profiling/basic_timers.c', 'src/core/lib/profiling/stap_timers.c', @@ -129,7 +129,7 @@ Pod::Spec.new do |s| 'src/core/lib/support/cpu_windows.c', 'src/core/lib/support/env_linux.c', 'src/core/lib/support/env_posix.c', - 'src/core/lib/support/env_win32.c', + 'src/core/lib/support/env_windows.c', 'src/core/lib/support/histogram.c', 'src/core/lib/support/host_port.c', 'src/core/lib/support/load_file.c', @@ -137,29 +137,29 @@ Pod::Spec.new do |s| 'src/core/lib/support/log_android.c', 'src/core/lib/support/log_linux.c', 'src/core/lib/support/log_posix.c', - 'src/core/lib/support/log_win32.c', + 'src/core/lib/support/log_windows.c', 'src/core/lib/support/murmur_hash.c', 'src/core/lib/support/slice.c', 'src/core/lib/support/slice_buffer.c', 'src/core/lib/support/stack_lockfree.c', 'src/core/lib/support/string.c', 'src/core/lib/support/string_posix.c', - 'src/core/lib/support/string_win32.c', + 'src/core/lib/support/string_windows.c', 'src/core/lib/support/subprocess_posix.c', 'src/core/lib/support/subprocess_windows.c', 'src/core/lib/support/sync.c', 'src/core/lib/support/sync_posix.c', - 'src/core/lib/support/sync_win32.c', + 'src/core/lib/support/sync_windows.c', 'src/core/lib/support/thd.c', 'src/core/lib/support/thd_posix.c', - 'src/core/lib/support/thd_win32.c', + 'src/core/lib/support/thd_windows.c', 'src/core/lib/support/time.c', 'src/core/lib/support/time_posix.c', 'src/core/lib/support/time_precise.c', - 'src/core/lib/support/time_win32.c', + 'src/core/lib/support/time_windows.c', 'src/core/lib/support/tls_pthread.c', 'src/core/lib/support/tmpfile_posix.c', - 'src/core/lib/support/tmpfile_win32.c', + 'src/core/lib/support/tmpfile_windows.c', 'src/core/lib/support/wrap_memcpy.c', 'src/core/lib/channel/channel_args.h', 'src/core/lib/channel/channel_stack.h', @@ -194,7 +194,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/sockaddr.h', 'src/core/lib/iomgr/sockaddr_posix.h', 'src/core/lib/iomgr/sockaddr_utils.h', - 'src/core/lib/iomgr/sockaddr_win32.h', + 'src/core/lib/iomgr/sockaddr_windows.h', 'src/core/lib/iomgr/socket_utils_posix.h', 'src/core/lib/iomgr/socket_windows.h', 'src/core/lib/iomgr/tcp_client.h', @@ -312,7 +312,7 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/atm.h', 'include/grpc/impl/codegen/atm_gcc_atomic.h', 'include/grpc/impl/codegen/atm_gcc_sync.h', - 'include/grpc/impl/codegen/atm_win32.h', + 'include/grpc/impl/codegen/atm_windows.h', 'include/grpc/impl/codegen/log.h', 'include/grpc/impl/codegen/port_platform.h', 'include/grpc/impl/codegen/slice.h', @@ -320,7 +320,7 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/sync.h', 'include/grpc/impl/codegen/sync_generic.h', 'include/grpc/impl/codegen/sync_posix.h', - 'include/grpc/impl/codegen/sync_win32.h', + 'include/grpc/impl/codegen/sync_windows.h', 'include/grpc/impl/codegen/time.h', 'include/grpc/grpc_security.h', 'include/grpc/grpc_security_constants.h', @@ -436,7 +436,7 @@ Pod::Spec.new do |s| 'src/core/lib/security/credentials.c', 'src/core/lib/security/credentials_metadata.c', 'src/core/lib/security/credentials_posix.c', - 'src/core/lib/security/credentials_win32.c', + 'src/core/lib/security/credentials_windows.c', 'src/core/lib/security/google_default_credentials.c', 'src/core/lib/security/handshake.c', 'src/core/lib/security/json_token.c', @@ -499,7 +499,7 @@ Pod::Spec.new do |s| 'src/core/lib/support/murmur_hash.h', 'src/core/lib/support/stack_lockfree.h', 'src/core/lib/support/string.h', - 'src/core/lib/support/string_win32.h', + 'src/core/lib/support/string_windows.h', 'src/core/lib/support/thd_internal.h', 'src/core/lib/support/time_precise.h', 'src/core/lib/support/tmpfile.h', @@ -536,7 +536,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/sockaddr.h', 'src/core/lib/iomgr/sockaddr_posix.h', 'src/core/lib/iomgr/sockaddr_utils.h', - 'src/core/lib/iomgr/sockaddr_win32.h', + 'src/core/lib/iomgr/sockaddr_windows.h', 'src/core/lib/iomgr/socket_utils_posix.h', 'src/core/lib/iomgr/socket_windows.h', 'src/core/lib/iomgr/tcp_client.h', diff --git a/grpc.gemspec b/grpc.gemspec index a9f0f681df0..ddc828b34e4 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -47,14 +47,14 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/support/atm.h ) s.files += %w( include/grpc/support/atm_gcc_atomic.h ) s.files += %w( include/grpc/support/atm_gcc_sync.h ) - s.files += %w( include/grpc/support/atm_win32.h ) + s.files += %w( include/grpc/support/atm_windows.h ) s.files += %w( include/grpc/support/avl.h ) s.files += %w( include/grpc/support/cmdline.h ) s.files += %w( include/grpc/support/cpu.h ) s.files += %w( include/grpc/support/histogram.h ) s.files += %w( include/grpc/support/host_port.h ) s.files += %w( include/grpc/support/log.h ) - s.files += %w( include/grpc/support/log_win32.h ) + s.files += %w( include/grpc/support/log_windows.h ) s.files += %w( include/grpc/support/port_platform.h ) s.files += %w( include/grpc/support/slice.h ) s.files += %w( include/grpc/support/slice_buffer.h ) @@ -63,7 +63,7 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/support/sync.h ) s.files += %w( include/grpc/support/sync_generic.h ) s.files += %w( include/grpc/support/sync_posix.h ) - s.files += %w( include/grpc/support/sync_win32.h ) + s.files += %w( include/grpc/support/sync_windows.h ) s.files += %w( include/grpc/support/thd.h ) s.files += %w( include/grpc/support/time.h ) s.files += %w( include/grpc/support/tls.h ) @@ -75,7 +75,7 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/impl/codegen/atm.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h ) - s.files += %w( include/grpc/impl/codegen/atm_win32.h ) + s.files += %w( include/grpc/impl/codegen/atm_windows.h ) s.files += %w( include/grpc/impl/codegen/log.h ) s.files += %w( include/grpc/impl/codegen/port_platform.h ) s.files += %w( include/grpc/impl/codegen/slice.h ) @@ -83,7 +83,7 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/impl/codegen/sync.h ) s.files += %w( include/grpc/impl/codegen/sync_generic.h ) s.files += %w( include/grpc/impl/codegen/sync_posix.h ) - s.files += %w( include/grpc/impl/codegen/sync_win32.h ) + s.files += %w( include/grpc/impl/codegen/sync_windows.h ) s.files += %w( include/grpc/impl/codegen/time.h ) s.files += %w( src/core/lib/profiling/timers.h ) s.files += %w( src/core/lib/support/backoff.h ) @@ -93,7 +93,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/support/murmur_hash.h ) s.files += %w( src/core/lib/support/stack_lockfree.h ) s.files += %w( src/core/lib/support/string.h ) - s.files += %w( src/core/lib/support/string_win32.h ) + s.files += %w( src/core/lib/support/string_windows.h ) s.files += %w( src/core/lib/support/thd_internal.h ) s.files += %w( src/core/lib/support/time_precise.h ) s.files += %w( src/core/lib/support/tmpfile.h ) @@ -109,7 +109,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/support/cpu_windows.c ) s.files += %w( src/core/lib/support/env_linux.c ) s.files += %w( src/core/lib/support/env_posix.c ) - s.files += %w( src/core/lib/support/env_win32.c ) + s.files += %w( src/core/lib/support/env_windows.c ) s.files += %w( src/core/lib/support/histogram.c ) s.files += %w( src/core/lib/support/host_port.c ) s.files += %w( src/core/lib/support/load_file.c ) @@ -117,29 +117,29 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/support/log_android.c ) s.files += %w( src/core/lib/support/log_linux.c ) s.files += %w( src/core/lib/support/log_posix.c ) - s.files += %w( src/core/lib/support/log_win32.c ) + s.files += %w( src/core/lib/support/log_windows.c ) s.files += %w( src/core/lib/support/murmur_hash.c ) s.files += %w( src/core/lib/support/slice.c ) s.files += %w( src/core/lib/support/slice_buffer.c ) s.files += %w( src/core/lib/support/stack_lockfree.c ) s.files += %w( src/core/lib/support/string.c ) s.files += %w( src/core/lib/support/string_posix.c ) - s.files += %w( src/core/lib/support/string_win32.c ) + s.files += %w( src/core/lib/support/string_windows.c ) s.files += %w( src/core/lib/support/subprocess_posix.c ) s.files += %w( src/core/lib/support/subprocess_windows.c ) s.files += %w( src/core/lib/support/sync.c ) s.files += %w( src/core/lib/support/sync_posix.c ) - s.files += %w( src/core/lib/support/sync_win32.c ) + s.files += %w( src/core/lib/support/sync_windows.c ) s.files += %w( src/core/lib/support/thd.c ) s.files += %w( src/core/lib/support/thd_posix.c ) - s.files += %w( src/core/lib/support/thd_win32.c ) + s.files += %w( src/core/lib/support/thd_windows.c ) s.files += %w( src/core/lib/support/time.c ) s.files += %w( src/core/lib/support/time_posix.c ) s.files += %w( src/core/lib/support/time_precise.c ) - s.files += %w( src/core/lib/support/time_win32.c ) + s.files += %w( src/core/lib/support/time_windows.c ) s.files += %w( src/core/lib/support/tls_pthread.c ) s.files += %w( src/core/lib/support/tmpfile_posix.c ) - s.files += %w( src/core/lib/support/tmpfile_win32.c ) + s.files += %w( src/core/lib/support/tmpfile_windows.c ) s.files += %w( src/core/lib/support/wrap_memcpy.c ) s.files += %w( include/grpc/byte_buffer.h ) s.files += %w( include/grpc/byte_buffer_reader.h ) @@ -156,7 +156,7 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/impl/codegen/atm.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h ) s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h ) - s.files += %w( include/grpc/impl/codegen/atm_win32.h ) + s.files += %w( include/grpc/impl/codegen/atm_windows.h ) s.files += %w( include/grpc/impl/codegen/log.h ) s.files += %w( include/grpc/impl/codegen/port_platform.h ) s.files += %w( include/grpc/impl/codegen/slice.h ) @@ -164,7 +164,7 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/impl/codegen/sync.h ) s.files += %w( include/grpc/impl/codegen/sync_generic.h ) s.files += %w( include/grpc/impl/codegen/sync_posix.h ) - s.files += %w( include/grpc/impl/codegen/sync_win32.h ) + s.files += %w( include/grpc/impl/codegen/sync_windows.h ) s.files += %w( include/grpc/impl/codegen/time.h ) s.files += %w( include/grpc/grpc_security.h ) s.files += %w( include/grpc/grpc_security_constants.h ) @@ -202,7 +202,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/sockaddr.h ) s.files += %w( src/core/lib/iomgr/sockaddr_posix.h ) s.files += %w( src/core/lib/iomgr/sockaddr_utils.h ) - s.files += %w( src/core/lib/iomgr/sockaddr_win32.h ) + s.files += %w( src/core/lib/iomgr/sockaddr_windows.h ) s.files += %w( src/core/lib/iomgr/socket_utils_posix.h ) s.files += %w( src/core/lib/iomgr/socket_windows.h ) s.files += %w( src/core/lib/iomgr/tcp_client.h ) @@ -416,7 +416,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/security/credentials.c ) s.files += %w( src/core/lib/security/credentials_metadata.c ) s.files += %w( src/core/lib/security/credentials_posix.c ) - s.files += %w( src/core/lib/security/credentials_win32.c ) + s.files += %w( src/core/lib/security/credentials_windows.c ) s.files += %w( src/core/lib/security/google_default_credentials.c ) s.files += %w( src/core/lib/security/handshake.c ) s.files += %w( src/core/lib/security/json_token.c ) diff --git a/include/grpc/impl/codegen/atm.h b/include/grpc/impl/codegen/atm.h index 5376026dde2..5589d5d4119 100644 --- a/include/grpc/impl/codegen/atm.h +++ b/include/grpc/impl/codegen/atm.h @@ -83,8 +83,8 @@ #include #elif defined(GPR_GCC_SYNC) #include -#elif defined(GPR_WIN32_ATOMIC) -#include +#elif defined(GPR_WINDOWS_ATOMIC) +#include #else #error could not determine platform for atm #endif diff --git a/include/grpc/impl/codegen/atm_win32.h b/include/grpc/impl/codegen/atm_windows.h similarity index 97% rename from include/grpc/impl/codegen/atm_win32.h rename to include/grpc/impl/codegen/atm_windows.h index 7c1ccaf8e20..d5fa8c0f623 100644 --- a/include/grpc/impl/codegen/atm_win32.h +++ b/include/grpc/impl/codegen/atm_windows.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_IMPL_CODEGEN_ATM_WIN32_H -#define GRPC_IMPL_CODEGEN_ATM_WIN32_H +#ifndef GRPC_IMPL_CODEGEN_ATM_WINDOWS_H +#define GRPC_IMPL_CODEGEN_ATM_WINDOWS_H /* Win32 variant of atm_platform.h */ #include @@ -122,4 +122,4 @@ static __inline gpr_atm gpr_atm_full_fetch_add(gpr_atm *p, gpr_atm delta) { return old; } -#endif /* GRPC_IMPL_CODEGEN_ATM_WIN32_H */ +#endif /* GRPC_IMPL_CODEGEN_ATM_WINDOWS_H */ diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index 3242f07599b..b21a1120f11 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -84,7 +84,7 @@ #if !defined(GPR_NO_AUTODETECT_PLATFORM) #if defined(_WIN64) || defined(WIN64) #define GPR_PLATFORM_STRING "windows" -#define GPR_WIN32 1 +#define GPR_WINDOWS 1 #define GPR_ARCH_64 1 #define GPR_GETPID_IN_PROCESS_H 1 #define GPR_WINSOCK_SOCKET 1 @@ -93,14 +93,14 @@ #define GPR_GCC_ATOMIC 1 #define GPR_GCC_TLS 1 #else -#define GPR_WIN32_ATOMIC 1 +#define GPR_WINDOWS_ATOMIC 1 #define GPR_MSVC_TLS 1 #endif #define GPR_WINDOWS_CRASH_HANDLER 1 #elif defined(_WIN32) || defined(WIN32) #define GPR_PLATFORM_STRING "windows" #define GPR_ARCH_32 1 -#define GPR_WIN32 1 +#define GPR_WINDOWS 1 #define GPR_GETPID_IN_PROCESS_H 1 #define GPR_WINSOCK_SOCKET 1 #define GPR_WINDOWS_SUBPROCESS 1 @@ -108,7 +108,7 @@ #define GPR_GCC_ATOMIC 1 #define GPR_GCC_TLS 1 #else -#define GPR_WIN32_ATOMIC 1 +#define GPR_WINDOWS_ATOMIC 1 #define GPR_MSVC_TLS 1 #endif #define GPR_WINDOWS_CRASH_HANDLER 1 @@ -345,19 +345,19 @@ typedef unsigned __int64 uint64_t; /* Validate platform combinations */ #if defined(GPR_GCC_ATOMIC) + defined(GPR_GCC_SYNC) + \ - defined(GPR_WIN32_ATOMIC) != \ + defined(GPR_WINDOWS_ATOMIC) != \ 1 -#error Must define exactly one of GPR_GCC_ATOMIC, GPR_GCC_SYNC, GPR_WIN32_ATOMIC +#error Must define exactly one of GPR_GCC_ATOMIC, GPR_GCC_SYNC, GPR_WINDOWS_ATOMIC #endif #if defined(GPR_ARCH_32) + defined(GPR_ARCH_64) != 1 #error Must define exactly one of GPR_ARCH_32, GPR_ARCH_64 #endif -#if defined(GPR_CPU_LINUX) + defined(GPR_CPU_POSIX) + defined(GPR_WIN32) + \ +#if defined(GPR_CPU_LINUX) + defined(GPR_CPU_POSIX) + defined(GPR_WINDOWS) + \ defined(GPR_CPU_IPHONE) + defined(GPR_CPU_CUSTOM) != \ 1 -#error Must define exactly one of GPR_CPU_LINUX, GPR_CPU_POSIX, GPR_WIN32, GPR_CPU_IPHONE, GPR_CPU_CUSTOM +#error Must define exactly one of GPR_CPU_LINUX, GPR_CPU_POSIX, GPR_WINDOWS, GPR_CPU_IPHONE, GPR_CPU_CUSTOM #endif #if defined(GPR_POSIX_MULTIPOLL_WITH_POLL) && !defined(GPR_POSIX_SOCKET) diff --git a/include/grpc/impl/codegen/sync.h b/include/grpc/impl/codegen/sync.h index 6fd7d64b299..5542482ed80 100644 --- a/include/grpc/impl/codegen/sync.h +++ b/include/grpc/impl/codegen/sync.h @@ -58,8 +58,8 @@ #if defined(GPR_POSIX_SYNC) #include -#elif defined(GPR_WIN32) -#include +#elif defined(GPR_WINDOWS) +#include #elif !defined(GPR_CUSTOM_SYNC) #error Unable to determine platform for sync #endif diff --git a/include/grpc/impl/codegen/sync_win32.h b/include/grpc/impl/codegen/sync_windows.h similarity index 93% rename from include/grpc/impl/codegen/sync_win32.h rename to include/grpc/impl/codegen/sync_windows.h index bdc43dd99a3..aa4e5153da7 100644 --- a/include/grpc/impl/codegen/sync_win32.h +++ b/include/grpc/impl/codegen/sync_windows.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_IMPL_CODEGEN_SYNC_WIN32_H -#define GRPC_IMPL_CODEGEN_SYNC_WIN32_H +#ifndef GRPC_IMPL_CODEGEN_SYNC_WINDOWS_H +#define GRPC_IMPL_CODEGEN_SYNC_WINDOWS_H #include @@ -46,4 +46,4 @@ typedef CONDITION_VARIABLE gpr_cv; typedef INIT_ONCE gpr_once; #define GPR_ONCE_INIT INIT_ONCE_STATIC_INIT -#endif /* GRPC_IMPL_CODEGEN_SYNC_WIN32_H */ +#endif /* GRPC_IMPL_CODEGEN_SYNC_WINDOWS_H */ diff --git a/include/grpc/support/sync_win32.h b/include/grpc/support/atm_windows.h similarity index 91% rename from include/grpc/support/sync_win32.h rename to include/grpc/support/atm_windows.h index 5631c529744..6aec5b72128 100644 --- a/include/grpc/support/sync_win32.h +++ b/include/grpc/support/atm_windows.h @@ -31,9 +31,9 @@ * */ -#ifndef GRPC_SUPPORT_SYNC_WIN32_H -#define GRPC_SUPPORT_SYNC_WIN32_H +#ifndef GRPC_SUPPORT_ATM_WINDOWS_H +#define GRPC_SUPPORT_ATM_WINDOWS_H -#include +#include -#endif /* GRPC_SUPPORT_SYNC_WIN32_H */ +#endif /* GRPC_SUPPORT_ATM_WINDOWS_H */ diff --git a/include/grpc/support/log_win32.h b/include/grpc/support/log_windows.h similarity index 94% rename from include/grpc/support/log_win32.h rename to include/grpc/support/log_windows.h index e5c25e06fc7..12bf8cc1f5e 100644 --- a/include/grpc/support/log_win32.h +++ b/include/grpc/support/log_windows.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_SUPPORT_LOG_WIN32_H -#define GRPC_SUPPORT_LOG_WIN32_H +#ifndef GRPC_SUPPORT_LOG_WINDOWS_H +#define GRPC_SUPPORT_LOG_WINDOWS_H #ifdef __cplusplus extern "C" { @@ -48,4 +48,4 @@ GPRAPI char *gpr_format_message(int messageid); } #endif -#endif /* GRPC_SUPPORT_LOG_WIN32_H */ +#endif /* GRPC_SUPPORT_LOG_WINDOWS_H */ diff --git a/include/grpc/support/atm_win32.h b/include/grpc/support/sync_windows.h similarity index 90% rename from include/grpc/support/atm_win32.h rename to include/grpc/support/sync_windows.h index 13526d9f3e3..0624e0c3b5c 100644 --- a/include/grpc/support/atm_win32.h +++ b/include/grpc/support/sync_windows.h @@ -31,9 +31,9 @@ * */ -#ifndef GRPC_SUPPORT_ATM_WIN32_H -#define GRPC_SUPPORT_ATM_WIN32_H +#ifndef GRPC_SUPPORT_SYNC_WINDOWS_H +#define GRPC_SUPPORT_SYNC_WINDOWS_H -#include +#include -#endif /* GRPC_SUPPORT_ATM_WIN32_H */ +#endif /* GRPC_SUPPORT_SYNC_WINDOWS_H */ diff --git a/package.xml b/package.xml index 3ae810df5eb..ec54030a5c6 100644 --- a/package.xml +++ b/package.xml @@ -54,14 +54,14 @@ - + - + @@ -70,7 +70,7 @@ - + @@ -82,7 +82,7 @@ - + @@ -90,7 +90,7 @@ - + @@ -100,7 +100,7 @@ - + @@ -116,7 +116,7 @@ - + @@ -124,29 +124,29 @@ - + - + - + - + - + - + @@ -163,7 +163,7 @@ - + @@ -171,7 +171,7 @@ - + @@ -209,7 +209,7 @@ - + @@ -423,7 +423,7 @@ - + diff --git a/src/core/lib/iomgr/iocp_windows.c b/src/core/lib/iomgr/iocp_windows.c index d46558ab1b1..708232295e9 100644 --- a/src/core/lib/iomgr/iocp_windows.c +++ b/src/core/lib/iomgr/iocp_windows.c @@ -39,7 +39,7 @@ #include #include -#include +#include #include #include "src/core/lib/iomgr/iocp_windows.h" diff --git a/src/core/lib/iomgr/iomgr_windows.c b/src/core/lib/iomgr/iomgr_windows.c index 398517fc759..7653f6e6354 100644 --- a/src/core/lib/iomgr/iomgr_windows.c +++ b/src/core/lib/iomgr/iomgr_windows.c @@ -35,7 +35,7 @@ #ifdef GPR_WINSOCK_SOCKET -#include "src/core/lib/iomgr/sockaddr_win32.h" +#include "src/core/lib/iomgr/sockaddr_windows.h" #include diff --git a/src/core/lib/iomgr/resolve_address_windows.c b/src/core/lib/iomgr/resolve_address_windows.c index 914736234da..c1bbb3db6b3 100644 --- a/src/core/lib/iomgr/resolve_address_windows.c +++ b/src/core/lib/iomgr/resolve_address_windows.c @@ -43,7 +43,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/core/lib/iomgr/sockaddr.h b/src/core/lib/iomgr/sockaddr.h index 891a2f094f5..5563d0b8a6c 100644 --- a/src/core/lib/iomgr/sockaddr.h +++ b/src/core/lib/iomgr/sockaddr.h @@ -36,8 +36,8 @@ #include -#ifdef GPR_WIN32 -#include "src/core/lib/iomgr/sockaddr_win32.h" +#ifdef GPR_WINDOWS +#include "src/core/lib/iomgr/sockaddr_windows.h" #endif #ifdef GPR_POSIX_SOCKETADDR diff --git a/src/core/lib/iomgr/sockaddr_win32.h b/src/core/lib/iomgr/sockaddr_windows.h similarity index 91% rename from src/core/lib/iomgr/sockaddr_win32.h rename to src/core/lib/iomgr/sockaddr_windows.h index 02aeae76190..971db5b32b2 100644 --- a/src/core/lib/iomgr/sockaddr_win32.h +++ b/src/core/lib/iomgr/sockaddr_windows.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_IOMGR_SOCKADDR_WIN32_H -#define GRPC_CORE_LIB_IOMGR_SOCKADDR_WIN32_H +#ifndef GRPC_CORE_LIB_IOMGR_SOCKADDR_WINDOWS_H +#define GRPC_CORE_LIB_IOMGR_SOCKADDR_WINDOWS_H #include #include @@ -40,4 +40,4 @@ // must be included after the above #include -#endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_WIN32_H */ +#endif /* GRPC_CORE_LIB_IOMGR_SOCKADDR_WINDOWS_H */ diff --git a/src/core/lib/iomgr/socket_windows.c b/src/core/lib/iomgr/socket_windows.c index ebd77e03724..7d8f9f761d0 100644 --- a/src/core/lib/iomgr/socket_windows.c +++ b/src/core/lib/iomgr/socket_windows.c @@ -42,7 +42,7 @@ #include #include -#include +#include #include #include "src/core/lib/iomgr/iocp_windows.h" diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index 7d78beb15ad..e41f67a04c2 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -35,11 +35,11 @@ #ifdef GPR_WINSOCK_SOCKET -#include "src/core/lib/iomgr/sockaddr_win32.h" +#include "src/core/lib/iomgr/sockaddr_windows.h" #include #include -#include +#include #include #include diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index 6940dec7b02..f32d53d240a 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -41,7 +41,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 7ee689a7e46..a6715df5c9a 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -35,11 +35,11 @@ #ifdef GPR_WINSOCK_SOCKET -#include "src/core/lib/iomgr/sockaddr_win32.h" +#include "src/core/lib/iomgr/sockaddr_windows.h" #include #include -#include +#include #include #include #include diff --git a/src/core/lib/iomgr/workqueue.h b/src/core/lib/iomgr/workqueue.h index 3e2b2236704..eeca8c0bf24 100644 --- a/src/core/lib/iomgr/workqueue.h +++ b/src/core/lib/iomgr/workqueue.h @@ -43,7 +43,7 @@ #include "src/core/lib/iomgr/workqueue_posix.h" #endif -#ifdef GPR_WIN32 +#ifdef GPR_WINDOWS #include "src/core/lib/iomgr/workqueue_windows.h" #endif diff --git a/src/core/lib/iomgr/workqueue_windows.c b/src/core/lib/iomgr/workqueue_windows.c index c3c0446a57d..275f040b1cc 100644 --- a/src/core/lib/iomgr/workqueue_windows.c +++ b/src/core/lib/iomgr/workqueue_windows.c @@ -33,8 +33,8 @@ #include -#ifdef GPR_WIN32 +#ifdef GPR_WINDOWS #include "src/core/lib/iomgr/workqueue.h" -#endif /* GPR_WIN32 */ +#endif /* GPR_WINDOWS */ diff --git a/src/core/lib/security/credentials_win32.c b/src/core/lib/security/credentials_windows.c similarity index 98% rename from src/core/lib/security/credentials_win32.c rename to src/core/lib/security/credentials_windows.c index d29847af38a..4b5e94f6888 100644 --- a/src/core/lib/security/credentials_win32.c +++ b/src/core/lib/security/credentials_windows.c @@ -33,7 +33,7 @@ #include -#ifdef GPR_WIN32 +#ifdef GPR_WINDOWS #include "src/core/lib/security/credentials.h" @@ -58,4 +58,4 @@ char *grpc_get_well_known_google_credentials_file_path_impl(void) { return result; } -#endif /* GPR_WIN32 */ +#endif /* GPR_WINDOWS */ diff --git a/src/core/lib/support/cpu_windows.c b/src/core/lib/support/cpu_windows.c index ce32eb0a9d6..34d006bfc88 100644 --- a/src/core/lib/support/cpu_windows.c +++ b/src/core/lib/support/cpu_windows.c @@ -33,7 +33,7 @@ #include -#ifdef GPR_WIN32 +#ifdef GPR_WINDOWS #include unsigned gpr_cpu_num_cores(void) { @@ -44,4 +44,4 @@ unsigned gpr_cpu_num_cores(void) { unsigned gpr_cpu_current_cpu(void) { return GetCurrentProcessorNumber(); } -#endif /* GPR_WIN32 */ +#endif /* GPR_WINDOWS */ diff --git a/src/core/lib/support/env_win32.c b/src/core/lib/support/env_windows.c similarity index 98% rename from src/core/lib/support/env_win32.c rename to src/core/lib/support/env_windows.c index ef84c941df6..796b93f19e1 100644 --- a/src/core/lib/support/env_win32.c +++ b/src/core/lib/support/env_windows.c @@ -33,7 +33,7 @@ #include -#ifdef GPR_WIN32 +#ifdef GPR_WINDOWS #include "src/core/lib/support/env.h" #include "src/core/lib/support/string.h" @@ -70,4 +70,4 @@ void gpr_setenv(const char *name, const char *value) { GPR_ASSERT(res == 0); } -#endif /* GPR_WIN32 */ +#endif /* GPR_WINDOWS */ diff --git a/src/core/lib/support/log_win32.c b/src/core/lib/support/log_windows.c similarity index 96% rename from src/core/lib/support/log_win32.c rename to src/core/lib/support/log_windows.c index ba78497a0a4..801042f39d6 100644 --- a/src/core/lib/support/log_win32.c +++ b/src/core/lib/support/log_windows.c @@ -33,19 +33,19 @@ #include -#ifdef GPR_WIN32 +#ifdef GPR_WINDOWS #include #include #include #include -#include +#include #include #include #include "src/core/lib/support/string.h" -#include "src/core/lib/support/string_win32.h" +#include "src/core/lib/support/string_windows.h" void gpr_log(const char *file, int line, gpr_log_severity severity, const char *format, ...) { @@ -123,4 +123,4 @@ char *gpr_format_message(int messageid) { return message; } -#endif /* GPR_WIN32 */ +#endif /* GPR_WINDOWS */ diff --git a/src/core/lib/support/string_win32.c b/src/core/lib/support/string_windows.c similarity index 98% rename from src/core/lib/support/string_win32.c rename to src/core/lib/support/string_windows.c index a2f9857356a..c89c89f4286 100644 --- a/src/core/lib/support/string_win32.c +++ b/src/core/lib/support/string_windows.c @@ -35,7 +35,7 @@ #include -#ifdef GPR_WIN32 +#ifdef GPR_WINDOWS #include #include @@ -106,4 +106,4 @@ char *gpr_tchar_to_char(LPTSTR input) { return gpr_strdup(input); } char *gpr_char_to_tchar(LPTSTR input) { return gpr_strdup(input); } #endif -#endif /* GPR_WIN32 */ +#endif /* GPR_WINDOWS */ diff --git a/src/core/lib/support/string_win32.h b/src/core/lib/support/string_windows.h similarity index 90% rename from src/core/lib/support/string_win32.h rename to src/core/lib/support/string_windows.h index ff4a694ca9d..899563b72dd 100644 --- a/src/core/lib/support/string_win32.h +++ b/src/core/lib/support/string_windows.h @@ -31,17 +31,17 @@ * */ -#ifndef GRPC_CORE_LIB_SUPPORT_STRING_WIN32_H -#define GRPC_CORE_LIB_SUPPORT_STRING_WIN32_H +#ifndef GRPC_CORE_LIB_SUPPORT_STRING_WINDOWS_H +#define GRPC_CORE_LIB_SUPPORT_STRING_WINDOWS_H #include -#ifdef GPR_WIN32 +#ifdef GPR_WINDOWS /* These allocate new strings using gpr_malloc to convert from and to utf-8. */ LPTSTR gpr_char_to_tchar(LPCSTR input); LPSTR gpr_tchar_to_char(LPCTSTR input); -#endif /* GPR_WIN32 */ +#endif /* GPR_WINDOWS */ -#endif /* GRPC_CORE_LIB_SUPPORT_STRING_WIN32_H */ +#endif /* GRPC_CORE_LIB_SUPPORT_STRING_WINDOWS_H */ diff --git a/src/core/lib/support/subprocess_windows.c b/src/core/lib/support/subprocess_windows.c index 264306f1bda..dee8c44ac14 100644 --- a/src/core/lib/support/subprocess_windows.c +++ b/src/core/lib/support/subprocess_windows.c @@ -43,7 +43,7 @@ #include #include #include "src/core/lib/support/string.h" -#include "src/core/lib/support/string_win32.h" +#include "src/core/lib/support/string_windows.h" struct gpr_subprocess { PROCESS_INFORMATION pi; diff --git a/src/core/lib/support/sync_win32.c b/src/core/lib/support/sync_windows.c similarity index 98% rename from src/core/lib/support/sync_win32.c rename to src/core/lib/support/sync_windows.c index 470a9f9704b..8f0e8ff69f7 100644 --- a/src/core/lib/support/sync_win32.c +++ b/src/core/lib/support/sync_windows.c @@ -35,7 +35,7 @@ #include -#ifdef GPR_WIN32 +#ifdef GPR_WINDOWS #include #include @@ -130,4 +130,4 @@ void gpr_once_init(gpr_once *once, void (*init_function)(void)) { InitOnceExecuteOnce(once, run_once_func, &arg, &dummy); } -#endif /* GPR_WIN32 */ +#endif /* GPR_WINDOWS */ diff --git a/src/core/lib/support/thd_win32.c b/src/core/lib/support/thd_windows.c similarity index 98% rename from src/core/lib/support/thd_win32.c rename to src/core/lib/support/thd_windows.c index 6deb3140ebd..74d2250df4f 100644 --- a/src/core/lib/support/thd_win32.c +++ b/src/core/lib/support/thd_windows.c @@ -35,7 +35,7 @@ #include -#ifdef GPR_WIN32 +#ifdef GPR_WINDOWS #include #include @@ -114,4 +114,4 @@ void gpr_thd_join(gpr_thd_id t) { destroy_thread(info); } -#endif /* GPR_WIN32 */ +#endif /* GPR_WINDOWS */ diff --git a/src/core/lib/support/time_win32.c b/src/core/lib/support/time_windows.c similarity index 98% rename from src/core/lib/support/time_win32.c rename to src/core/lib/support/time_windows.c index f7acbd14a67..5ba62b3196f 100644 --- a/src/core/lib/support/time_win32.c +++ b/src/core/lib/support/time_windows.c @@ -35,7 +35,7 @@ #include -#ifdef GPR_WIN32 +#ifdef GPR_WINDOWS #include #include @@ -107,4 +107,4 @@ void gpr_sleep_until(gpr_timespec until) { } } -#endif /* GPR_WIN32 */ +#endif /* GPR_WINDOWS */ diff --git a/src/core/lib/support/tmpfile_win32.c b/src/core/lib/support/tmpfile_windows.c similarity index 96% rename from src/core/lib/support/tmpfile_win32.c rename to src/core/lib/support/tmpfile_windows.c index 0cb2904f8de..11d05a65ce7 100644 --- a/src/core/lib/support/tmpfile_win32.c +++ b/src/core/lib/support/tmpfile_windows.c @@ -33,7 +33,7 @@ #include -#ifdef GPR_WIN32 +#ifdef GPR_WINDOWS #include #include @@ -44,7 +44,7 @@ #include #include -#include "src/core/lib/support/string_win32.h" +#include "src/core/lib/support/string_windows.h" #include "src/core/lib/support/tmpfile.h" FILE *gpr_tmpfile(const char *prefix, char **tmp_filename_out) { @@ -81,4 +81,4 @@ end: return result; } -#endif /* GPR_WIN32 */ +#endif /* GPR_WINDOWS */ diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index aeef8a79e99..deb52cf5abf 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -45,7 +45,7 @@ #include -#ifdef GPR_WIN32 +#ifdef GPR_WINDOWS #define GPR_EXPORT __declspec(dllexport) #define GPR_CALLTYPE __stdcall #endif diff --git a/src/python/grpcio/grpc/_cython/imports.generated.c b/src/python/grpcio/grpc/_cython/imports.generated.c index 9ab0696702a..73b80a5b1df 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.c +++ b/src/python/grpcio/grpc/_cython/imports.generated.c @@ -35,7 +35,7 @@ #include "imports.generated.h" -#ifdef GPR_WIN32 +#ifdef GPR_WINDOWS census_initialize_type census_initialize_import; census_shutdown_type census_shutdown_import; @@ -575,4 +575,4 @@ void pygrpc_load_imports(HMODULE library) { } #endif /* __cpluslus */ -#endif /* !GPR_WIN32 */ +#endif /* !GPR_WINDOWS */ diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index e50051ddc75..04fbca8033b 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -36,7 +36,7 @@ #include -#ifdef GPR_WIN32 +#ifdef GPR_WINDOWS #include @@ -56,7 +56,7 @@ #include #include #include -#include +#include #include #include #include @@ -861,7 +861,7 @@ void pygrpc_load_imports(HMODULE library); } #endif /* __cpluslus */ -#else /* !GPR_WIN32 */ +#else /* !GPR_WINDOWS */ #include #include @@ -872,6 +872,6 @@ void pygrpc_load_imports(HMODULE library); #include #include -#endif /* !GPR_WIN32 */ +#endif /* !GPR_WINDOWS */ #endif diff --git a/src/python/grpcio/grpc/_cython/loader.c b/src/python/grpcio/grpc/_cython/loader.c index 3b72806ea18..b909ad594ed 100644 --- a/src/python/grpcio/grpc/_cython/loader.c +++ b/src/python/grpcio/grpc/_cython/loader.c @@ -37,7 +37,7 @@ extern "C" { #endif /* __cpluslus */ -#if GPR_WIN32 +#if GPR_WINDOWS int pygrpc_load_core(char *path) { HMODULE grpc_c; @@ -60,7 +60,7 @@ int pygrpc_load_core(char *path) { int pygrpc_load_core(char *path) { return 1; } -#endif /* !GPR_WIN32 */ +#endif /* !GPR_WINDOWS */ #ifdef __cplusplus } diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index c5a0a398b43..00bec5d1cb6 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -42,7 +42,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/support/cpu_windows.c', 'src/core/lib/support/env_linux.c', 'src/core/lib/support/env_posix.c', - 'src/core/lib/support/env_win32.c', + 'src/core/lib/support/env_windows.c', 'src/core/lib/support/histogram.c', 'src/core/lib/support/host_port.c', 'src/core/lib/support/load_file.c', @@ -50,29 +50,29 @@ CORE_SOURCE_FILES = [ 'src/core/lib/support/log_android.c', 'src/core/lib/support/log_linux.c', 'src/core/lib/support/log_posix.c', - 'src/core/lib/support/log_win32.c', + 'src/core/lib/support/log_windows.c', 'src/core/lib/support/murmur_hash.c', 'src/core/lib/support/slice.c', 'src/core/lib/support/slice_buffer.c', 'src/core/lib/support/stack_lockfree.c', 'src/core/lib/support/string.c', 'src/core/lib/support/string_posix.c', - 'src/core/lib/support/string_win32.c', + 'src/core/lib/support/string_windows.c', 'src/core/lib/support/subprocess_posix.c', 'src/core/lib/support/subprocess_windows.c', 'src/core/lib/support/sync.c', 'src/core/lib/support/sync_posix.c', - 'src/core/lib/support/sync_win32.c', + 'src/core/lib/support/sync_windows.c', 'src/core/lib/support/thd.c', 'src/core/lib/support/thd_posix.c', - 'src/core/lib/support/thd_win32.c', + 'src/core/lib/support/thd_windows.c', 'src/core/lib/support/time.c', 'src/core/lib/support/time_posix.c', 'src/core/lib/support/time_precise.c', - 'src/core/lib/support/time_win32.c', + 'src/core/lib/support/time_windows.c', 'src/core/lib/support/tls_pthread.c', 'src/core/lib/support/tmpfile_posix.c', - 'src/core/lib/support/tmpfile_win32.c', + 'src/core/lib/support/tmpfile_windows.c', 'src/core/lib/support/wrap_memcpy.c', 'src/core/lib/surface/init.c', 'src/core/lib/channel/channel_args.c', @@ -185,7 +185,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/security/credentials.c', 'src/core/lib/security/credentials_metadata.c', 'src/core/lib/security/credentials_posix.c', - 'src/core/lib/security/credentials_win32.c', + 'src/core/lib/security/credentials_windows.c', 'src/core/lib/security/google_default_credentials.c', 'src/core/lib/security/handshake.c', 'src/core/lib/security/json_token.c', diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index e2068d752ab..183bfcb199f 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -33,7 +33,7 @@ #include -#ifdef GPR_WIN32 +#ifdef GPR_WINDOWS #include "rb_grpc_imports.generated.h" @@ -567,4 +567,4 @@ void grpc_rb_load_imports(HMODULE library) { gpr_thd_join_import = (gpr_thd_join_type) GetProcAddress(library, "gpr_thd_join"); } -#endif /* GPR_WIN32 */ +#endif /* GPR_WINDOWS */ diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index c8d21333ba2..f9ceb593e58 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -36,7 +36,7 @@ #include -#ifdef GPR_WIN32 +#ifdef GPR_WINDOWS #include @@ -56,7 +56,7 @@ #include #include #include -#include +#include #include #include #include @@ -853,6 +853,6 @@ extern gpr_thd_join_type gpr_thd_join_import; void grpc_rb_load_imports(HMODULE library); -#endif /* GPR_WIN32 */ +#endif /* GPR_WINDOWS */ #endif diff --git a/src/ruby/ext/grpc/rb_loader.c b/src/ruby/ext/grpc/rb_loader.c index 242535f164e..19a6b33c29d 100644 --- a/src/ruby/ext/grpc/rb_loader.c +++ b/src/ruby/ext/grpc/rb_loader.c @@ -33,7 +33,7 @@ #include "rb_grpc_imports.generated.h" -#if GPR_WIN32 +#if GPR_WINDOWS #include int grpc_rb_load_core() { diff --git a/templates/src/python/grpcio/grpc/_cython/imports.generated.c.template b/templates/src/python/grpcio/grpc/_cython/imports.generated.c.template index 62fe0947d25..84fa5e62bfe 100644 --- a/templates/src/python/grpcio/grpc/_cython/imports.generated.c.template +++ b/templates/src/python/grpcio/grpc/_cython/imports.generated.c.template @@ -37,7 +37,7 @@ #include "imports.generated.h" - #ifdef GPR_WIN32 + #ifdef GPR_WINDOWS %for api in c_apis: ${api.name}_type ${api.name}_import; @@ -57,5 +57,5 @@ } #endif /* __cpluslus */ - #endif /* !GPR_WIN32 */ + #endif /* !GPR_WINDOWS */ diff --git a/templates/src/python/grpcio/grpc/_cython/imports.generated.h.template b/templates/src/python/grpcio/grpc/_cython/imports.generated.h.template index 8e7c1831800..5625dccfc5e 100644 --- a/templates/src/python/grpcio/grpc/_cython/imports.generated.h.template +++ b/templates/src/python/grpcio/grpc/_cython/imports.generated.h.template @@ -38,7 +38,7 @@ #include - #ifdef GPR_WIN32 + #ifdef GPR_WINDOWS #include @@ -62,7 +62,7 @@ } #endif /* __cpluslus */ - #else /* !GPR_WIN32 */ + #else /* !GPR_WINDOWS */ #include #include @@ -73,6 +73,6 @@ #include #include - #endif /* !GPR_WIN32 */ + #endif /* !GPR_WINDOWS */ #endif diff --git a/templates/src/ruby/ext/grpc/rb_grpc_imports.generated.c.template b/templates/src/ruby/ext/grpc/rb_grpc_imports.generated.c.template index e09a58781da..232f3e75eba 100644 --- a/templates/src/ruby/ext/grpc/rb_grpc_imports.generated.c.template +++ b/templates/src/ruby/ext/grpc/rb_grpc_imports.generated.c.template @@ -35,7 +35,7 @@ #include - #ifdef GPR_WIN32 + #ifdef GPR_WINDOWS #include "rb_grpc_imports.generated.h" @@ -49,4 +49,4 @@ %endfor } - #endif /* GPR_WIN32 */ + #endif /* GPR_WINDOWS */ diff --git a/templates/src/ruby/ext/grpc/rb_grpc_imports.generated.h.template b/templates/src/ruby/ext/grpc/rb_grpc_imports.generated.h.template index 9f17edeec01..68172fcb9cf 100644 --- a/templates/src/ruby/ext/grpc/rb_grpc_imports.generated.h.template +++ b/templates/src/ruby/ext/grpc/rb_grpc_imports.generated.h.template @@ -38,7 +38,7 @@ #include - #ifdef GPR_WIN32 + #ifdef GPR_WINDOWS #include @@ -54,6 +54,6 @@ void grpc_rb_load_imports(HMODULE library); - #endif /* GPR_WIN32 */ + #endif /* GPR_WINDOWS */ #endif diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 7dc04960475..11363d23915 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -842,7 +842,7 @@ include/grpc/impl/codegen/alloc.h \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ -include/grpc/impl/codegen/atm_win32.h \ +include/grpc/impl/codegen/atm_windows.h \ include/grpc/impl/codegen/log.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -850,7 +850,7 @@ include/grpc/impl/codegen/slice_buffer.h \ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ -include/grpc/impl/codegen/sync_win32.h \ +include/grpc/impl/codegen/sync_windows.h \ include/grpc/impl/codegen/time.h \ include/grpc++/impl/codegen/config.h \ include/grpc++/impl/codegen/config_protobuf.h \ diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 312fd17cb22..b097c37efaa 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -842,7 +842,7 @@ include/grpc/impl/codegen/alloc.h \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ -include/grpc/impl/codegen/atm_win32.h \ +include/grpc/impl/codegen/atm_windows.h \ include/grpc/impl/codegen/log.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -850,7 +850,7 @@ include/grpc/impl/codegen/slice_buffer.h \ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ -include/grpc/impl/codegen/sync_win32.h \ +include/grpc/impl/codegen/sync_windows.h \ include/grpc/impl/codegen/time.h \ include/grpc++/impl/codegen/config.h \ include/grpc++/impl/codegen/config_protobuf.h \ diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index 034d9c6e6f4..0ad33b342f2 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -775,7 +775,7 @@ include/grpc/impl/codegen/alloc.h \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ -include/grpc/impl/codegen/atm_win32.h \ +include/grpc/impl/codegen/atm_windows.h \ include/grpc/impl/codegen/log.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -783,7 +783,7 @@ include/grpc/impl/codegen/slice_buffer.h \ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ -include/grpc/impl/codegen/sync_win32.h \ +include/grpc/impl/codegen/sync_windows.h \ include/grpc/impl/codegen/time.h \ include/grpc/grpc_security.h \ include/grpc/grpc_security_constants.h \ @@ -792,14 +792,14 @@ include/grpc/support/alloc.h \ include/grpc/support/atm.h \ include/grpc/support/atm_gcc_atomic.h \ include/grpc/support/atm_gcc_sync.h \ -include/grpc/support/atm_win32.h \ +include/grpc/support/atm_windows.h \ include/grpc/support/avl.h \ include/grpc/support/cmdline.h \ include/grpc/support/cpu.h \ include/grpc/support/histogram.h \ include/grpc/support/host_port.h \ include/grpc/support/log.h \ -include/grpc/support/log_win32.h \ +include/grpc/support/log_windows.h \ include/grpc/support/port_platform.h \ include/grpc/support/slice.h \ include/grpc/support/slice_buffer.h \ @@ -808,7 +808,7 @@ include/grpc/support/subprocess.h \ include/grpc/support/sync.h \ include/grpc/support/sync_generic.h \ include/grpc/support/sync_posix.h \ -include/grpc/support/sync_win32.h \ +include/grpc/support/sync_windows.h \ include/grpc/support/thd.h \ include/grpc/support/time.h \ include/grpc/support/tls.h \ @@ -820,7 +820,7 @@ include/grpc/impl/codegen/alloc.h \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ -include/grpc/impl/codegen/atm_win32.h \ +include/grpc/impl/codegen/atm_windows.h \ include/grpc/impl/codegen/log.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -828,7 +828,7 @@ include/grpc/impl/codegen/slice_buffer.h \ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ -include/grpc/impl/codegen/sync_win32.h \ +include/grpc/impl/codegen/sync_windows.h \ include/grpc/impl/codegen/time.h # This tag can be used to specify the character encoding of the source files diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 3a774a70d6b..5973c5ac5bd 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -775,7 +775,7 @@ include/grpc/impl/codegen/alloc.h \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ -include/grpc/impl/codegen/atm_win32.h \ +include/grpc/impl/codegen/atm_windows.h \ include/grpc/impl/codegen/log.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -783,7 +783,7 @@ include/grpc/impl/codegen/slice_buffer.h \ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ -include/grpc/impl/codegen/sync_win32.h \ +include/grpc/impl/codegen/sync_windows.h \ include/grpc/impl/codegen/time.h \ include/grpc/grpc_security.h \ include/grpc/grpc_security_constants.h \ @@ -821,7 +821,7 @@ src/core/lib/iomgr/resolve_address.h \ src/core/lib/iomgr/sockaddr.h \ src/core/lib/iomgr/sockaddr_posix.h \ src/core/lib/iomgr/sockaddr_utils.h \ -src/core/lib/iomgr/sockaddr_win32.h \ +src/core/lib/iomgr/sockaddr_windows.h \ src/core/lib/iomgr/socket_utils_posix.h \ src/core/lib/iomgr/socket_windows.h \ src/core/lib/iomgr/tcp_client.h \ @@ -1035,7 +1035,7 @@ src/core/lib/security/client_auth_filter.c \ src/core/lib/security/credentials.c \ src/core/lib/security/credentials_metadata.c \ src/core/lib/security/credentials_posix.c \ -src/core/lib/security/credentials_win32.c \ +src/core/lib/security/credentials_windows.c \ src/core/lib/security/google_default_credentials.c \ src/core/lib/security/handshake.c \ src/core/lib/security/json_token.c \ @@ -1093,14 +1093,14 @@ include/grpc/support/alloc.h \ include/grpc/support/atm.h \ include/grpc/support/atm_gcc_atomic.h \ include/grpc/support/atm_gcc_sync.h \ -include/grpc/support/atm_win32.h \ +include/grpc/support/atm_windows.h \ include/grpc/support/avl.h \ include/grpc/support/cmdline.h \ include/grpc/support/cpu.h \ include/grpc/support/histogram.h \ include/grpc/support/host_port.h \ include/grpc/support/log.h \ -include/grpc/support/log_win32.h \ +include/grpc/support/log_windows.h \ include/grpc/support/port_platform.h \ include/grpc/support/slice.h \ include/grpc/support/slice_buffer.h \ @@ -1109,7 +1109,7 @@ include/grpc/support/subprocess.h \ include/grpc/support/sync.h \ include/grpc/support/sync_generic.h \ include/grpc/support/sync_posix.h \ -include/grpc/support/sync_win32.h \ +include/grpc/support/sync_windows.h \ include/grpc/support/thd.h \ include/grpc/support/time.h \ include/grpc/support/tls.h \ @@ -1121,7 +1121,7 @@ include/grpc/impl/codegen/alloc.h \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ -include/grpc/impl/codegen/atm_win32.h \ +include/grpc/impl/codegen/atm_windows.h \ include/grpc/impl/codegen/log.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -1129,7 +1129,7 @@ include/grpc/impl/codegen/slice_buffer.h \ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ -include/grpc/impl/codegen/sync_win32.h \ +include/grpc/impl/codegen/sync_windows.h \ include/grpc/impl/codegen/time.h \ src/core/lib/profiling/timers.h \ src/core/lib/support/backoff.h \ @@ -1139,7 +1139,7 @@ src/core/lib/support/load_file.h \ src/core/lib/support/murmur_hash.h \ src/core/lib/support/stack_lockfree.h \ src/core/lib/support/string.h \ -src/core/lib/support/string_win32.h \ +src/core/lib/support/string_windows.h \ src/core/lib/support/thd_internal.h \ src/core/lib/support/time_precise.h \ src/core/lib/support/tmpfile.h \ @@ -1155,7 +1155,7 @@ src/core/lib/support/cpu_posix.c \ src/core/lib/support/cpu_windows.c \ src/core/lib/support/env_linux.c \ src/core/lib/support/env_posix.c \ -src/core/lib/support/env_win32.c \ +src/core/lib/support/env_windows.c \ src/core/lib/support/histogram.c \ src/core/lib/support/host_port.c \ src/core/lib/support/load_file.c \ @@ -1163,29 +1163,29 @@ src/core/lib/support/log.c \ src/core/lib/support/log_android.c \ src/core/lib/support/log_linux.c \ src/core/lib/support/log_posix.c \ -src/core/lib/support/log_win32.c \ +src/core/lib/support/log_windows.c \ src/core/lib/support/murmur_hash.c \ src/core/lib/support/slice.c \ src/core/lib/support/slice_buffer.c \ src/core/lib/support/stack_lockfree.c \ src/core/lib/support/string.c \ src/core/lib/support/string_posix.c \ -src/core/lib/support/string_win32.c \ +src/core/lib/support/string_windows.c \ src/core/lib/support/subprocess_posix.c \ src/core/lib/support/subprocess_windows.c \ src/core/lib/support/sync.c \ src/core/lib/support/sync_posix.c \ -src/core/lib/support/sync_win32.c \ +src/core/lib/support/sync_windows.c \ src/core/lib/support/thd.c \ src/core/lib/support/thd_posix.c \ -src/core/lib/support/thd_win32.c \ +src/core/lib/support/thd_windows.c \ src/core/lib/support/time.c \ src/core/lib/support/time_posix.c \ src/core/lib/support/time_precise.c \ -src/core/lib/support/time_win32.c \ +src/core/lib/support/time_windows.c \ src/core/lib/support/tls_pthread.c \ src/core/lib/support/tmpfile_posix.c \ -src/core/lib/support/tmpfile_win32.c \ +src/core/lib/support/tmpfile_windows.c \ src/core/lib/support/wrap_memcpy.c # This tag can be used to specify the character encoding of the source files diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index e94387cb4d7..5e9e7f4ec74 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5394,14 +5394,14 @@ "include/grpc/support/atm.h", "include/grpc/support/atm_gcc_atomic.h", "include/grpc/support/atm_gcc_sync.h", - "include/grpc/support/atm_win32.h", + "include/grpc/support/atm_windows.h", "include/grpc/support/avl.h", "include/grpc/support/cmdline.h", "include/grpc/support/cpu.h", "include/grpc/support/histogram.h", "include/grpc/support/host_port.h", "include/grpc/support/log.h", - "include/grpc/support/log_win32.h", + "include/grpc/support/log_windows.h", "include/grpc/support/port_platform.h", "include/grpc/support/slice.h", "include/grpc/support/slice_buffer.h", @@ -5410,7 +5410,7 @@ "include/grpc/support/sync.h", "include/grpc/support/sync_generic.h", "include/grpc/support/sync_posix.h", - "include/grpc/support/sync_win32.h", + "include/grpc/support/sync_windows.h", "include/grpc/support/thd.h", "include/grpc/support/time.h", "include/grpc/support/tls.h", @@ -5426,7 +5426,7 @@ "src/core/lib/support/murmur_hash.h", "src/core/lib/support/stack_lockfree.h", "src/core/lib/support/string.h", - "src/core/lib/support/string_win32.h", + "src/core/lib/support/string_windows.h", "src/core/lib/support/thd_internal.h", "src/core/lib/support/time_precise.h", "src/core/lib/support/tmpfile.h" @@ -5438,14 +5438,14 @@ "include/grpc/support/atm.h", "include/grpc/support/atm_gcc_atomic.h", "include/grpc/support/atm_gcc_sync.h", - "include/grpc/support/atm_win32.h", + "include/grpc/support/atm_windows.h", "include/grpc/support/avl.h", "include/grpc/support/cmdline.h", "include/grpc/support/cpu.h", "include/grpc/support/histogram.h", "include/grpc/support/host_port.h", "include/grpc/support/log.h", - "include/grpc/support/log_win32.h", + "include/grpc/support/log_windows.h", "include/grpc/support/port_platform.h", "include/grpc/support/slice.h", "include/grpc/support/slice_buffer.h", @@ -5454,7 +5454,7 @@ "include/grpc/support/sync.h", "include/grpc/support/sync_generic.h", "include/grpc/support/sync_posix.h", - "include/grpc/support/sync_win32.h", + "include/grpc/support/sync_windows.h", "include/grpc/support/thd.h", "include/grpc/support/time.h", "include/grpc/support/tls.h", @@ -5478,7 +5478,7 @@ "src/core/lib/support/env.h", "src/core/lib/support/env_linux.c", "src/core/lib/support/env_posix.c", - "src/core/lib/support/env_win32.c", + "src/core/lib/support/env_windows.c", "src/core/lib/support/histogram.c", "src/core/lib/support/host_port.c", "src/core/lib/support/load_file.c", @@ -5487,7 +5487,7 @@ "src/core/lib/support/log_android.c", "src/core/lib/support/log_linux.c", "src/core/lib/support/log_posix.c", - "src/core/lib/support/log_win32.c", + "src/core/lib/support/log_windows.c", "src/core/lib/support/murmur_hash.c", "src/core/lib/support/murmur_hash.h", "src/core/lib/support/slice.c", @@ -5497,26 +5497,26 @@ "src/core/lib/support/string.c", "src/core/lib/support/string.h", "src/core/lib/support/string_posix.c", - "src/core/lib/support/string_win32.c", - "src/core/lib/support/string_win32.h", + "src/core/lib/support/string_windows.c", + "src/core/lib/support/string_windows.h", "src/core/lib/support/subprocess_posix.c", "src/core/lib/support/subprocess_windows.c", "src/core/lib/support/sync.c", "src/core/lib/support/sync_posix.c", - "src/core/lib/support/sync_win32.c", + "src/core/lib/support/sync_windows.c", "src/core/lib/support/thd.c", "src/core/lib/support/thd_internal.h", "src/core/lib/support/thd_posix.c", - "src/core/lib/support/thd_win32.c", + "src/core/lib/support/thd_windows.c", "src/core/lib/support/time.c", "src/core/lib/support/time_posix.c", "src/core/lib/support/time_precise.c", "src/core/lib/support/time_precise.h", - "src/core/lib/support/time_win32.c", + "src/core/lib/support/time_windows.c", "src/core/lib/support/tls_pthread.c", "src/core/lib/support/tmpfile.h", "src/core/lib/support/tmpfile_posix.c", - "src/core/lib/support/tmpfile_win32.c", + "src/core/lib/support/tmpfile_windows.c", "src/core/lib/support/wrap_memcpy.c" ], "third_party": false, @@ -5529,7 +5529,7 @@ "include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/atm_windows.h", "include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -5537,7 +5537,7 @@ "include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/sync_windows.h", "include/grpc/impl/codegen/time.h" ], "language": "c", @@ -5547,7 +5547,7 @@ "include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/atm_windows.h", "include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -5555,7 +5555,7 @@ "include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/sync_windows.h", "include/grpc/impl/codegen/time.h" ], "third_party": false, @@ -5605,7 +5605,7 @@ "src/core/lib/iomgr/sockaddr.h", "src/core/lib/iomgr/sockaddr_posix.h", "src/core/lib/iomgr/sockaddr_utils.h", - "src/core/lib/iomgr/sockaddr_win32.h", + "src/core/lib/iomgr/sockaddr_windows.h", "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", @@ -5717,7 +5717,7 @@ "src/core/lib/iomgr/sockaddr_posix.h", "src/core/lib/iomgr/sockaddr_utils.c", "src/core/lib/iomgr/sockaddr_utils.h", - "src/core/lib/iomgr/sockaddr_win32.h", + "src/core/lib/iomgr/sockaddr_windows.h", "src/core/lib/iomgr/socket_utils_common_posix.c", "src/core/lib/iomgr/socket_utils_linux.c", "src/core/lib/iomgr/socket_utils_posix.c", @@ -6018,7 +6018,7 @@ "src/core/lib/security/credentials.h", "src/core/lib/security/credentials_metadata.c", "src/core/lib/security/credentials_posix.c", - "src/core/lib/security/credentials_win32.c", + "src/core/lib/security/credentials_windows.c", "src/core/lib/security/google_default_credentials.c", "src/core/lib/security/handshake.c", "src/core/lib/security/handshake.h", diff --git a/vsprojects/coapp/openssl/libeay32.vcxproj b/vsprojects/coapp/openssl/libeay32.vcxproj index ea63162110f..46ddbde6185 100644 --- a/vsprojects/coapp/openssl/libeay32.vcxproj +++ b/vsprojects/coapp/openssl/libeay32.vcxproj @@ -609,7 +609,7 @@ - + diff --git a/vsprojects/vcxproj/gpr/gpr.vcxproj b/vsprojects/vcxproj/gpr/gpr.vcxproj index cdb128e48ef..64a943afba6 100644 --- a/vsprojects/vcxproj/gpr/gpr.vcxproj +++ b/vsprojects/vcxproj/gpr/gpr.vcxproj @@ -151,14 +151,14 @@ - + - + @@ -167,7 +167,7 @@ - + @@ -179,7 +179,7 @@ - + @@ -187,7 +187,7 @@ - + @@ -199,7 +199,7 @@ - + @@ -229,7 +229,7 @@ - + @@ -245,7 +245,7 @@ - + @@ -259,7 +259,7 @@ - + @@ -269,13 +269,13 @@ - + - + @@ -283,13 +283,13 @@ - + - + diff --git a/vsprojects/vcxproj/gpr/gpr.vcxproj.filters b/vsprojects/vcxproj/gpr/gpr.vcxproj.filters index 8af6fdd44cb..edafec7f530 100644 --- a/vsprojects/vcxproj/gpr/gpr.vcxproj.filters +++ b/vsprojects/vcxproj/gpr/gpr.vcxproj.filters @@ -37,7 +37,7 @@ src\core\lib\support - + src\core\lib\support @@ -61,7 +61,7 @@ src\core\lib\support - + src\core\lib\support @@ -82,7 +82,7 @@ src\core\lib\support - + src\core\lib\support @@ -97,7 +97,7 @@ src\core\lib\support - + src\core\lib\support @@ -106,7 +106,7 @@ src\core\lib\support - + src\core\lib\support @@ -118,7 +118,7 @@ src\core\lib\support - + src\core\lib\support @@ -127,7 +127,7 @@ src\core\lib\support - + src\core\lib\support @@ -147,7 +147,7 @@ include\grpc\support - + include\grpc\support @@ -168,7 +168,7 @@ include\grpc\support - + include\grpc\support @@ -195,7 +195,7 @@ include\grpc\support - + include\grpc\support @@ -231,7 +231,7 @@ include\grpc\impl\codegen - + include\grpc\impl\codegen @@ -255,7 +255,7 @@ include\grpc\impl\codegen - + include\grpc\impl\codegen @@ -287,7 +287,7 @@ src\core\lib\support - + src\core\lib\support diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index 29cab37d521..0a2deef7bbe 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -340,7 +340,7 @@ - + @@ -348,7 +348,7 @@ - + diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index 15e2807fd41..80a92636d88 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -342,7 +342,7 @@ include\grpc\impl\codegen - + include\grpc\impl\codegen @@ -366,7 +366,7 @@ include\grpc\impl\codegen - + include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index fcda361ef19..91899855e57 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -340,7 +340,7 @@ - + @@ -348,7 +348,7 @@ - + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 1dc95f985ad..bce49a037b1 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -327,7 +327,7 @@ include\grpc\impl\codegen - + include\grpc\impl\codegen @@ -351,7 +351,7 @@ include\grpc\impl\codegen - + include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 4eec05a3b1f..40db381c883 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -282,7 +282,7 @@ - + @@ -290,7 +290,7 @@ - + @@ -330,7 +330,7 @@ - + @@ -657,7 +657,7 @@ - + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 17c88c4805e..ee34cabc7ff 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -334,7 +334,7 @@ src\core\lib\security - + src\core\lib\security @@ -543,7 +543,7 @@ include\grpc\impl\codegen - + include\grpc\impl\codegen @@ -567,7 +567,7 @@ include\grpc\impl\codegen - + include\grpc\impl\codegen @@ -683,7 +683,7 @@ src\core\lib\iomgr - + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 26050dcf74e..46a8c7850ff 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -273,7 +273,7 @@ - + @@ -281,7 +281,7 @@ - + @@ -319,7 +319,7 @@ - + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index a4acf513bc1..f1e01f6d762 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -483,7 +483,7 @@ include\grpc\impl\codegen - + include\grpc\impl\codegen @@ -507,7 +507,7 @@ include\grpc\impl\codegen - + include\grpc\impl\codegen @@ -617,7 +617,7 @@ src\core\lib\iomgr - + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj index cd0b40c8730..cce39612ab5 100644 --- a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj +++ b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj @@ -200,7 +200,7 @@ - + @@ -208,7 +208,7 @@ - + diff --git a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters index 029b8ef7741..475c4394048 100644 --- a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters +++ b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters @@ -147,7 +147,7 @@ include\grpc\impl\codegen - + include\grpc\impl\codegen @@ -171,7 +171,7 @@ include\grpc\impl\codegen - + include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj index 6d138fae1cb..0cae4ff70f9 100644 --- a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj +++ b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj @@ -200,7 +200,7 @@ - + @@ -208,7 +208,7 @@ - + diff --git a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters index dc3f0b2d040..06bad184fe6 100644 --- a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters +++ b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters @@ -147,7 +147,7 @@ include\grpc\impl\codegen - + include\grpc\impl\codegen @@ -171,7 +171,7 @@ include\grpc\impl\codegen - + include\grpc\impl\codegen From d04376d1e868670625a3e03986ba6fd5488e26ba Mon Sep 17 00:00:00 2001 From: thinkerou Date: Wed, 27 Apr 2016 19:58:49 +0800 Subject: [PATCH 0100/1894] PHP Extension: add owned assignment --- src/php/ext/grpc/call.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/php/ext/grpc/call.c b/src/php/ext/grpc/call.c index a0f3d160c64..a2c1c08169f 100644 --- a/src/php/ext/grpc/call.c +++ b/src/php/ext/grpc/call.c @@ -96,6 +96,7 @@ zval *grpc_php_wrap_call(grpc_call *wrapped, bool owned) { wrapped_grpc_call *call = (wrapped_grpc_call *)zend_object_store_get_object(call_object TSRMLS_CC); call->wrapped = wrapped; + call->owned = owned; return call_object; } From 640d71dda90fee3dbb66f1b50c9b42058d063244 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 27 Apr 2016 07:17:58 -0700 Subject: [PATCH 0101/1894] Use cpp macros for the "application/grpc" string and its length. Also remove unnecessary strlen() call. --- src/core/lib/channel/http_server_filter.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index ad3462bff4f..192783f4ed7 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -39,6 +39,9 @@ #include "src/core/lib/profiling/timers.h" #include "src/core/lib/transport/static_metadata.h" +#define EXPECTED_CONTENT_TYPE "application/grpc" +#define EXPECTED_CONTENT_TYPE_LENGTH sizeof(EXPECTED_CONTENT_TYPE) - 1 + typedef struct call_data { uint8_t seen_path; uint8_t seen_method; @@ -93,9 +96,10 @@ static grpc_mdelem *server_filter(void *user_data, grpc_mdelem *md) { return NULL; } else if (md->key == GRPC_MDSTR_CONTENT_TYPE) { const char* value_str = grpc_mdstr_as_c_string(md->value); - if (strncmp(value_str, "application/grpc", 16) == 0 && - (strlen(value_str) == 16 || - value_str[16] == '+' || value_str[16] == ';')) { + if (strncmp(value_str, EXPECTED_CONTENT_TYPE, + EXPECTED_CONTENT_TYPE_LENGTH) == 0 && + (value_str[EXPECTED_CONTENT_TYPE_LENGTH] == '+' || + value_str[EXPECTED_CONTENT_TYPE_LENGTH] == ';')) { /* Although the C implementation doesn't (currently) generate them, any custom +-suffix is explicitly valid. */ /* TODO(klempner): We should consider preallocating common values such From 1843ccb226c477798ed7dd25287cb9ef3a87c754 Mon Sep 17 00:00:00 2001 From: Benjamin Herzog Date: Wed, 27 Apr 2016 17:39:26 +0200 Subject: [PATCH 0102/1894] Use static const strings --- src/compiler/objective_c_plugin.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index 9522956fdeb..3ccfd5b037c 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -81,12 +81,12 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { declarations += grpc_objective_c_generator::GetHeader(service); } - ::grpc::string nonNullBegin = "\nNS_ASSUME_NONNULL_BEGIN\n\n"; - ::grpc::string nonNullEnd = "\nNS_ASSUME_NONNULL_END\n"; + static const ::grpc::string kNonNullBegin = "\nNS_ASSUME_NONNULL_BEGIN\n\n"; + static const ::grpc::string kNonNullEnd = "\nNS_ASSUME_NONNULL_END\n"; Write(context, file_name + ".pbrpc.h", - imports + '\n' + proto_imports + '\n' + nonNullBegin + - declarations + nonNullEnd); + imports + '\n' + proto_imports + '\n' + kNonNullBegin + + declarations + kNonNullEnd); } { From c0ad0bd485d0d7358e1378e8e8e79098888094c2 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 27 Apr 2016 09:53:06 -0700 Subject: [PATCH 0103/1894] Clear bin directory after generating each tarball --- tools/run_tests/build_package_node.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/run_tests/build_package_node.sh b/tools/run_tests/build_package_node.sh index e98fabbc5f0..e945f2a00e9 100755 --- a/tools/run_tests/build_package_node.sh +++ b/tools/run_tests/build_package_node.sh @@ -78,6 +78,7 @@ for arch in {x86,x64}; do *) node_plat=$plat esac + rm bin/* input_dir="$EXTERNAL_GIT_ROOT/architecture=$arch,language=protoc,platform=$plat/artifacts" cp $input_dir/protoc* bin/ cp $input_dir/grpc_node_plugin* bin/ From 3c6ace6969e506cc3917c389342ab2535afa41b4 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 27 Apr 2016 10:16:54 -0700 Subject: [PATCH 0104/1894] Fixed case statement in build_package_node --- tools/run_tests/build_package_node.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/run_tests/build_package_node.sh b/tools/run_tests/build_package_node.sh index e945f2a00e9..6bc9466b633 100755 --- a/tools/run_tests/build_package_node.sh +++ b/tools/run_tests/build_package_node.sh @@ -77,6 +77,7 @@ for arch in {x86,x64}; do ;; *) node_plat=$plat + ;; esac rm bin/* input_dir="$EXTERNAL_GIT_ROOT/architecture=$arch,language=protoc,platform=$plat/artifacts" From 886b3441441768216d8cb61ec63b8f974833c931 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Wed, 27 Apr 2016 10:51:18 -0700 Subject: [PATCH 0105/1894] Modified the template of public_headers_must_be_c89.c --- include/grpc/impl/codegen/port_platform.h | 4 ++-- .../test/core/surface/public_headers_must_be_c89.c.template | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index b21a1120f11..297631a3607 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -345,7 +345,7 @@ typedef unsigned __int64 uint64_t; /* Validate platform combinations */ #if defined(GPR_GCC_ATOMIC) + defined(GPR_GCC_SYNC) + \ - defined(GPR_WINDOWS_ATOMIC) != \ + defined(GPR_WINDOWS_ATOMIC) != \ 1 #error Must define exactly one of GPR_GCC_ATOMIC, GPR_GCC_SYNC, GPR_WINDOWS_ATOMIC #endif @@ -355,7 +355,7 @@ typedef unsigned __int64 uint64_t; #endif #if defined(GPR_CPU_LINUX) + defined(GPR_CPU_POSIX) + defined(GPR_WINDOWS) + \ - defined(GPR_CPU_IPHONE) + defined(GPR_CPU_CUSTOM) != \ + defined(GPR_CPU_IPHONE) + defined(GPR_CPU_CUSTOM) != \ 1 #error Must define exactly one of GPR_CPU_LINUX, GPR_CPU_POSIX, GPR_WINDOWS, GPR_CPU_IPHONE, GPR_CPU_CUSTOM #endif diff --git a/templates/test/core/surface/public_headers_must_be_c89.c.template b/templates/test/core/surface/public_headers_must_be_c89.c.template index e132256cb8f..f02ef9590d1 100644 --- a/templates/test/core/surface/public_headers_must_be_c89.c.template +++ b/templates/test/core/surface/public_headers_must_be_c89.c.template @@ -35,7 +35,7 @@ <% def is_platform_header(hdr): - for platform_identifier in ['_gcc', '_win32', '_pthread', + for platform_identifier in ['_gcc', '_windows', '_pthread', '_zookeeper', '_msvc', '_posix']: if platform_identifier in hdr: return True From 1f3319bc88009355a07cbc757e007a659c5beaf8 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 27 Apr 2016 10:59:19 -0700 Subject: [PATCH 0106/1894] Fixed clang formatting problems. --- src/core/lib/channel/http_server_filter.c | 2 +- test/core/bad_client/tests/simple_request.c | 36 ++++++++++----------- 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index 192783f4ed7..59dded63428 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -95,7 +95,7 @@ static grpc_mdelem *server_filter(void *user_data, grpc_mdelem *md) { require */ return NULL; } else if (md->key == GRPC_MDSTR_CONTENT_TYPE) { - const char* value_str = grpc_mdstr_as_c_string(md->value); + const char *value_str = grpc_mdstr_as_c_string(md->value); if (strncmp(value_str, EXPECTED_CONTENT_TYPE, EXPECTED_CONTENT_TYPE_LENGTH) == 0 && (value_str[EXPECTED_CONTENT_TYPE_LENGTH] == '+' || diff --git a/test/core/bad_client/tests/simple_request.c b/test/core/bad_client/tests/simple_request.c index d6b85aefb58..3ae6eb3592d 100644 --- a/test/core/bad_client/tests/simple_request.c +++ b/test/core/bad_client/tests/simple_request.c @@ -77,25 +77,25 @@ "\x10\x0cgrpc-timeout\x02" \ "5S" -#define PFX_STR_UNUSUAL2 \ - "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" \ - "\x00\x00\x00\x04\x00\x00\x00\x00\x00" /* settings frame */ \ - "\x00\x00\xf4\x01\x04\x00\x00\x00\x01" /* headers: generated from \ +#define PFX_STR_UNUSUAL2 \ + "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" \ + "\x00\x00\x00\x04\x00\x00\x00\x00\x00" /* settings frame */ \ + "\x00\x00\xf4\x01\x04\x00\x00\x00\x01" /* headers: generated from \ simple_request_unusual2.headers \ - in this directory */ \ - "\x10\x05:path\x08/foo/bar" \ - "\x10\x07:scheme\x04http" \ - "\x10\x07:method\x04POST" \ - "\x10\x04host\x09localhost" \ - "\x10\x0c" \ - "content-type\x1e" \ - "application/grpc;this-is-valid" \ - "\x10\x14grpc-accept-encoding\x15identity,deflate,gzip" \ - "\x10\x02te\x08trailers" \ - "\x10\x0auser-agent\"bad-client grpc-c/0.12.0.0 (linux)" \ - "\x10\x0cgrpc-timeout\x03" \ - "10S" \ - "\x10\x0cgrpc-timeout\x02" \ + in this directory */ \ + "\x10\x05:path\x08/foo/bar" \ + "\x10\x07:scheme\x04http" \ + "\x10\x07:method\x04POST" \ + "\x10\x04host\x09localhost" \ + "\x10\x0c" \ + "content-type\x1e" \ + "application/grpc;this-is-valid" \ + "\x10\x14grpc-accept-encoding\x15identity,deflate,gzip" \ + "\x10\x02te\x08trailers" \ + "\x10\x0auser-agent\"bad-client grpc-c/0.12.0.0 (linux)" \ + "\x10\x0cgrpc-timeout\x03" \ + "10S" \ + "\x10\x0cgrpc-timeout\x02" \ "5S" static void *tag(intptr_t t) { return (void *)t; } From ac2e88f9567c7e90f615738fb759537385dcc858 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 27 Apr 2016 14:13:27 -0700 Subject: [PATCH 0107/1894] Initial attempt at adding support for max metadata size. Currently, the code does not seem to be properly causing the RPC to fail when the max size is exceeded. --- include/grpc/impl/codegen/grpc_types.h | 2 ++ .../chttp2/transport/chttp2_transport.c | 15 ++++++++++ .../chttp2/transport/incoming_metadata.c | 1 + .../chttp2/transport/incoming_metadata.h | 1 + .../ext/transport/chttp2/transport/internal.h | 3 ++ .../ext/transport/chttp2/transport/parsing.c | 22 +++++++++++--- src/core/lib/transport/metadata.h | 2 ++ test/core/end2end/cq_verifier.c | 8 +++++ test/core/end2end/cq_verifier.h | 1 + test/core/end2end/tests/large_metadata.c | 29 ++++++++++++++----- 10 files changed, 73 insertions(+), 11 deletions(-) diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index 4c7373006b2..b5203b6e4d2 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -152,6 +152,8 @@ typedef struct { channel). If this parameter is specified and the underlying is not an SSL channel, it will just be ignored. */ #define GRPC_SSL_TARGET_NAME_OVERRIDE_ARG "grpc.ssl_target_name_override" +/* Maximum metadata size */ +#define GRPC_ARG_MAX_METADATA_SIZE "grpc.max_metadata_size" /** Result of a grpc call. If the caller satisfies the prerequisites of a particular operation, the grpc_call_error returned will be GRPC_CALL_OK. diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 01507f5ca6f..c24950a1890 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -56,6 +56,8 @@ #define DEFAULT_CONNECTION_WINDOW_TARGET (1024 * 1024) #define MAX_WINDOW 0x7fffffffu +#define DEFAULT_MAX_METADATA_SIZE 16 * 1024 + #define MAX_CLIENT_STREAM_ID 0x7fffffffu int grpc_http_trace = 0; @@ -250,6 +252,7 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, t->global.ping_counter = 1; t->global.pings.next = t->global.pings.prev = &t->global.pings; t->parsing.is_client = is_client; + t->parsing.max_metadata_size = DEFAULT_MAX_METADATA_SIZE; t->parsing.deframe_state = is_client ? GRPC_DTS_FH_0 : GRPC_DTS_CLIENT_PREFIX_0; t->writing.is_client = is_client; @@ -372,6 +375,18 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, &t->writing.hpack_compressor, (uint32_t)channel_args->args[i].value.integer); } + } else if (0 == strcmp(channel_args->args[i].key, + GRPC_ARG_MAX_METADATA_SIZE)) { + if (channel_args->args[i].type != GRPC_ARG_INTEGER) { + gpr_log(GPR_ERROR, "%s: must be an integer", + GRPC_ARG_MAX_METADATA_SIZE); + } else if (channel_args->args[i].value.integer < 0) { + gpr_log(GPR_ERROR, "%s: must be non-negative", + GRPC_ARG_MAX_METADATA_SIZE); + } else { + t->parsing.max_metadata_size = + (uint32_t)channel_args->args[i].value.integer; + } } } } diff --git a/src/core/ext/transport/chttp2/transport/incoming_metadata.c b/src/core/ext/transport/chttp2/transport/incoming_metadata.c index db21744f0c0..3e463a79957 100644 --- a/src/core/ext/transport/chttp2/transport/incoming_metadata.c +++ b/src/core/ext/transport/chttp2/transport/incoming_metadata.c @@ -65,6 +65,7 @@ void grpc_chttp2_incoming_metadata_buffer_add( gpr_realloc(buffer->elems, sizeof(*buffer->elems) * buffer->capacity); } buffer->elems[buffer->count++].md = elem; + buffer->size += GRPC_MDELEM_LENGTH(elem); } void grpc_chttp2_incoming_metadata_buffer_set_deadline( diff --git a/src/core/ext/transport/chttp2/transport/incoming_metadata.h b/src/core/ext/transport/chttp2/transport/incoming_metadata.h index 17ecf8e1811..7db5db8de05 100644 --- a/src/core/ext/transport/chttp2/transport/incoming_metadata.h +++ b/src/core/ext/transport/chttp2/transport/incoming_metadata.h @@ -42,6 +42,7 @@ typedef struct { size_t capacity; gpr_timespec deadline; int published; + size_t size; /* total size of metadata */ } grpc_chttp2_incoming_metadata_buffer; /** assumes everything initially zeroed */ diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 98cd38abd43..d547a6e9c11 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -229,6 +229,9 @@ struct grpc_chttp2_transport_parsing { /** is this transport a client? (boolean) */ uint8_t is_client; + /** max metadata size */ + uint32_t max_metadata_size; + /** were settings updated? */ uint8_t settings_updated; /** was a settings ack received? */ diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index e827a43f7a4..0cf4d87f3c0 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -624,8 +624,15 @@ static void on_initial_header(void *tp, grpc_mdelem *md) { gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), *cached_timeout)); GRPC_MDELEM_UNREF(md); } else { - grpc_chttp2_incoming_metadata_buffer_add( - &stream_parsing->metadata_buffer[0], md); + const size_t new_size = stream_parsing->metadata_buffer[0].size + + GRPC_MDELEM_LENGTH(md); + if (new_size > transport_parsing->max_metadata_size) { + stream_parsing->seen_error = 1; + GRPC_MDELEM_UNREF(md); + } else { + grpc_chttp2_incoming_metadata_buffer_add( + &stream_parsing->metadata_buffer[0], md); + } } grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, stream_parsing); @@ -652,8 +659,15 @@ static void on_trailing_header(void *tp, grpc_mdelem *md) { stream_parsing->seen_error = 1; } - grpc_chttp2_incoming_metadata_buffer_add(&stream_parsing->metadata_buffer[1], - md); + const size_t new_size = stream_parsing->metadata_buffer[1].size + + GRPC_MDELEM_LENGTH(md); + if (new_size > transport_parsing->max_metadata_size) { + stream_parsing->seen_error = 1; + GRPC_MDELEM_UNREF(md); + } else { + grpc_chttp2_incoming_metadata_buffer_add( + &stream_parsing->metadata_buffer[1], md); + } grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, stream_parsing); diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h index 713d9e6782c..277c2579338 100644 --- a/src/core/lib/transport/metadata.h +++ b/src/core/lib/transport/metadata.h @@ -146,6 +146,8 @@ void grpc_mdelem_unref(grpc_mdelem *md); const char *grpc_mdstr_as_c_string(grpc_mdstr *s); #define GRPC_MDSTR_LENGTH(s) (GPR_SLICE_LENGTH(s->slice)) +#define GRPC_MDELEM_LENGTH(e) (GRPC_MDSTR_LENGTH(e->key) + \ + GRPC_MDSTR_LENGTH(e->value)) int grpc_mdstr_is_legal_header(grpc_mdstr *s); int grpc_mdstr_is_legal_nonbin_header(grpc_mdstr *s); diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c index 77afe588d79..5f1a33242ee 100644 --- a/test/core/end2end/cq_verifier.c +++ b/test/core/end2end/cq_verifier.c @@ -107,6 +107,14 @@ int contains_metadata(grpc_metadata_array *array, const char *key, return has_metadata(array->metadata, array->count, key, value); } +int contains_metadata_key(grpc_metadata_array *array, const char *key) { + for (size_t i = 0; i < array->count; ++i) { + if (strcmp(array->metadata[i].key, key) == 0) + return 1; + } + return 0; +} + static gpr_slice merge_slices(gpr_slice *slices, size_t nslices) { size_t i; size_t len = 0; diff --git a/test/core/end2end/cq_verifier.h b/test/core/end2end/cq_verifier.h index b3e07c45a58..a54065950d2 100644 --- a/test/core/end2end/cq_verifier.h +++ b/test/core/end2end/cq_verifier.h @@ -62,5 +62,6 @@ void cq_expect_completion(cq_verifier *v, void *tag, int success); int byte_buffer_eq_string(grpc_byte_buffer *byte_buffer, const char *string); int contains_metadata(grpc_metadata_array *array, const char *key, const char *value); +int contains_metadata_key(grpc_metadata_array *array, const char *key); #endif /* GRPC_TEST_CORE_END2END_CQ_VERIFIER_H */ diff --git a/test/core/end2end/tests/large_metadata.c b/test/core/end2end/tests/large_metadata.c index 0e5d6b4fe01..f09b55a2c0c 100644 --- a/test/core/end2end/tests/large_metadata.c +++ b/test/core/end2end/tests/large_metadata.c @@ -98,7 +98,8 @@ static void end_test(grpc_end2end_test_fixture *f) { } /* Request with a large amount of metadata.*/ -static void test_request_with_large_metadata(grpc_end2end_test_config config) { +static void test_request_with_large_metadata(grpc_end2end_test_config config, + int allow_large_metadata) { grpc_call *c; grpc_call *s; gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); @@ -106,8 +107,16 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) { grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); grpc_metadata meta; - grpc_end2end_test_fixture f = - begin_test(config, "test_request_with_large_metadata", NULL, NULL); + const char *test_name = allow_large_metadata + ? "test_request_with_large_metadata_allowed" + : "test_request_with_large_metadata_not_allowed"; + const size_t large_size = 64 * 1024; + grpc_arg arg = { GRPC_ARG_INTEGER, GRPC_ARG_MAX_METADATA_SIZE, + { .integer=(int)large_size + 1024 } }; + grpc_channel_args args = { 1, &arg }; + grpc_channel_args* use_args = allow_large_metadata ? &args : NULL; + grpc_end2end_test_fixture f = begin_test( + config, test_name, use_args, use_args); cq_verifier *cqv = cq_verifier_create(f.cq); grpc_op ops[6]; grpc_op *op; @@ -121,7 +130,6 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) { char *details = NULL; size_t details_capacity = 0; int was_cancelled = 2; - const size_t large_size = 64 * 1024; c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo", "foo.test.google.fr", deadline, NULL); @@ -214,13 +222,19 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) { cq_expect_completion(cqv, tag(1), 1); cq_verify(cqv); +// FIXME: why is this assert passing with allow_large_metadata=false? GPR_ASSERT(status == GRPC_STATUS_OK); GPR_ASSERT(0 == strcmp(details, "xyz")); GPR_ASSERT(0 == strcmp(call_details.method, "/foo")); GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr")); GPR_ASSERT(was_cancelled == 0); - GPR_ASSERT(byte_buffer_eq_string(request_payload_recv, "hello world")); - GPR_ASSERT(contains_metadata(&request_metadata_recv, "key", meta.value)); + if (allow_large_metadata) { + GPR_ASSERT(byte_buffer_eq_string(request_payload_recv, "hello world")); + GPR_ASSERT(contains_metadata(&request_metadata_recv, "key", meta.value)); + } else { + GPR_ASSERT(request_payload_recv == NULL); + GPR_ASSERT(!contains_metadata_key(&request_metadata_recv, "key")); + } gpr_free(details); grpc_metadata_array_destroy(&initial_metadata_recv); @@ -243,7 +257,8 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) { } void large_metadata(grpc_end2end_test_config config) { - test_request_with_large_metadata(config); + test_request_with_large_metadata(config, 1); + test_request_with_large_metadata(config, 0); } void large_metadata_pre_init(void) {} From 8658b1786628c8cb10ea0a74e7a11733f66a20ab Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 27 Apr 2016 14:54:40 -0700 Subject: [PATCH 0108/1894] Fixed minor Node compilation issue --- src/node/ext/server_credentials.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/node/ext/server_credentials.cc b/src/node/ext/server_credentials.cc index cff821aafcd..a817ade5183 100644 --- a/src/node/ext/server_credentials.cc +++ b/src/node/ext/server_credentials.cc @@ -146,7 +146,9 @@ NAN_METHOD(ServerCredentials::CreateSsl) { "createSsl's second argument must be a list of objects"); } - grpc_ssl_client_certificate_request_type client_certificate_request; + // Default to not requesting the client certificate + grpc_ssl_client_certificate_request_type client_certificate_request = + GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE; if (info[2]->IsBoolean()) { client_certificate_request = Nan::To(info[2]).FromJust() From 92b8decaff5dae78531af309b241babe03c54f01 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 27 Apr 2016 14:55:13 -0700 Subject: [PATCH 0109/1894] Make Node servers warn instead of fail when a method is missing a handler --- src/node/src/server.js | 34 +++++++++++++++++---- src/node/test/surface_test.js | 56 +++++++++++++++++++++++++++++------ 2 files changed, 75 insertions(+), 15 deletions(-) diff --git a/src/node/src/server.js b/src/node/src/server.js index 22128343a9d..fd5153f1244 100644 --- a/src/node/src/server.js +++ b/src/node/src/server.js @@ -684,6 +684,26 @@ Server.prototype.register = function(name, handler, serialize, deserialize, return true; }; +var unimplementedStatusResponse = { + code: grpc.status.UNIMPLEMENTED, + details: 'The server does not implement this method' +}; + +var defaultHandler = { + unary: function(call, callback) { + callback(unimplementedStatusResponse); + }, + client_stream: function(call, callback) { + callback(unimplementedStatusResponse); + }, + server_stream: function(call) { + call.emit('error', unimplementedStatusResponse); + }, + bidi: function(call) { + call.emit('error', unimplementedStatusResponse); + } +}; + /** * Add a service to the server, with a corresponding implementation. If you are * generating this from a proto file, you should instead use @@ -713,16 +733,18 @@ Server.prototype.addService = function(service, implementation) { method_type = 'unary'; } } + var impl; if (implementation[name] === undefined) { - throw new Error('Method handler for ' + attrs.path + - ' not provided.'); + console.warn('Method handler for %s expected but not provided', + attrs.path); + impl = defaultHandler[method_type]; + } else { + impl = _.bind(implementation[name], implementation); } var serialize = attrs.responseSerialize; var deserialize = attrs.requestDeserialize; - var register_success = self.register(attrs.path, - _.bind(implementation[name], - implementation), - serialize, deserialize, method_type); + var register_success = self.register(attrs.path, impl, serialize, + deserialize, method_type); if (!register_success) { throw new Error('Method handler for ' + attrs.path + ' already provided.'); diff --git a/src/node/test/surface_test.js b/src/node/test/surface_test.js index b96e8e487cc..d8b36dc55cb 100644 --- a/src/node/test/surface_test.js +++ b/src/node/test/surface_test.js @@ -143,21 +143,59 @@ describe('Server.prototype.addProtoService', function() { server.addProtoService(mathService, dummyImpls); }); }); - it('Should fail with missing handlers', function() { - assert.throws(function() { - server.addProtoService(mathService, { - 'div': function() {}, - 'divMany': function() {}, - 'fib': function() {} - }); - }, /math.Math.Sum/); - }); it('Should fail if the server has been started', function() { server.start(); assert.throws(function() { server.addProtoService(mathService, dummyImpls); }); }); + describe('Default handlers', function() { + var client; + beforeEach(function() { + server.addProtoService(mathService, {}); + var port = server.bind('localhost:0', server_insecure_creds); + var Client = surface_client.makeProtobufClientConstructor(mathService); + client = new Client('localhost:' + port, + grpc.credentials.createInsecure()); + server.start(); + }); + it('should respond to a unary call with UNIMPLEMENTED', function(done) { + client.div({divisor: 4, dividend: 3}, function(error, response) { + assert(error); + assert.strictEqual(error.code, grpc.status.UNIMPLEMENTED); + done(); + }); + }); + it('should respond to a client stream with UNIMPLEMENTED', function(done) { + var call = client.sum(function(error, respones) { + assert(error); + assert.strictEqual(error.code, grpc.status.UNIMPLEMENTED); + done(); + }); + call.end(); + }); + it('should respond to a server stream with UNIMPLEMENTED', function(done) { + var call = client.fib({limit: 5}); + call.on('data', function(value) { + assert.fail('No messages expected'); + }); + call.on('status', function(status) { + assert.strictEqual(status.code, grpc.status.UNIMPLEMENTED); + done(); + }); + }); + it('should respond to a bidi call with UNIMPLEMENTED', function(done) { + var call = client.divMany(); + call.on('data', function(value) { + assert.fail('No messages expected'); + }); + call.on('status', function(status) { + assert.strictEqual(status.code, grpc.status.UNIMPLEMENTED); + done(); + }); + call.end(); + }); + }); }); describe('Client constructor building', function() { var illegal_service_attrs = { From d06e9291cb10c5757e1b7852248af341c2cd3390 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Wed, 27 Apr 2016 14:59:17 -0700 Subject: [PATCH 0110/1894] Add Windows-specifics to Python docs --- examples/python/README.md | 11 +++++++++-- src/python/grpcio/README.rst | 13 +++++++++++++ 2 files changed, 22 insertions(+), 2 deletions(-) diff --git a/examples/python/README.md b/examples/python/README.md index b57da8f6428..9992baa8421 100644 --- a/examples/python/README.md +++ b/examples/python/README.md @@ -8,12 +8,19 @@ For this sample, we've already generated the server and client stubs from Install gRPC: - ```sh +```sh $ pip install grpcio ``` Or, to install it system wide: ```sh - $ sudo pip install grpcio + $ sudo pip install grpcio +``` + +If you're on Windows, make sure you installed the `pip.exe` component when you +installed Python. Invoke as above but with `pip.exe` instead of `pip` (you may +also need to invoke from a `cmd.exe` ran as administrator): +```sh + $ pip.exe install grpcio ``` Download the example diff --git a/src/python/grpcio/README.rst b/src/python/grpcio/README.rst index 33a462b66f8..cb3f6b87fe4 100644 --- a/src/python/grpcio/README.rst +++ b/src/python/grpcio/README.rst @@ -23,6 +23,16 @@ Else system wide (on Ubuntu)... $ sudo pip install grpcio +If you're on Windows make sure that you installed the :code:`pip.exe` component +when you installed Python (if not go back and install it!) then invoke: + +:: + + $ pip.exe install grpcio + +Windows users may need to invoke :code:`pip.exe` from a command line ran as +administrator. + n.b. On Windows and on Mac OS X one *must* have a recent release of :code:`pip` to retrieve the proper wheel from PyPI. Be sure to upgrade to the latest version! @@ -43,6 +53,9 @@ package named :code:`python-dev`). $ pip install -rrequirements.txt $ GRPC_PYTHON_BUILD_WITH_CYTHON=1 pip install . +You cannot currently install Python from source on Windows. Things might work +out for you in MSYS2 (follow the Linux instructions), but it isn't officially +supported at the moment. Troubleshooting ~~~~~~~~~~~~~~~ From 1b2db6333d4783e18b8d72db7893a758c4fcd2b9 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 27 Apr 2016 15:06:54 -0700 Subject: [PATCH 0111/1894] Moved protos out of core_codegen interface --- BUILD | 5 + Makefile | 4 + build.yaml | 1 + gRPC.podspec | 1 + grpc.gemspec | 1 + .../impl/codegen/core_codegen_interface.h | 32 +-- include/grpc++/impl/codegen/proto_utils.h | 161 +++++++++++++- include/grpc/byte_buffer_reader.h | 21 +- .../grpc/impl/codegen/byte_buffer_reader.h | 57 +++++ package.xml | 1 + src/compiler/csharp_generator.cc | 4 + src/core/lib/transport/metadata.c | 29 ++- src/cpp/common/core_codegen.cc | 204 ++++-------------- src/cpp/common/core_codegen.h | 26 ++- src/csharp/Grpc.Examples/MathGrpc.cs | 6 + src/csharp/Grpc.HealthCheck/HealthGrpc.cs | 6 + .../Grpc.IntegrationTesting/MetricsGrpc.cs | 6 + .../Grpc.IntegrationTesting/ServicesGrpc.cs | 12 ++ .../Grpc.IntegrationTesting/TestGrpc.cs | 18 ++ .../core/surface/public_headers_must_be_c89.c | 1 + tools/doxygen/Doxyfile.c++ | 1 + tools/doxygen/Doxyfile.c++.internal | 1 + tools/doxygen/Doxyfile.core | 1 + tools/doxygen/Doxyfile.core.internal | 1 + tools/run_tests/sources_and_headers.json | 2 + vsprojects/vcxproj/grpc++/grpc++.vcxproj | 1 + .../vcxproj/grpc++/grpc++.vcxproj.filters | 3 + .../grpc++_unsecure/grpc++_unsecure.vcxproj | 1 + .../grpc++_unsecure.vcxproj.filters | 3 + vsprojects/vcxproj/grpc/grpc.vcxproj | 1 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 3 + .../grpc_unsecure/grpc_unsecure.vcxproj | 1 + .../grpc_unsecure.vcxproj.filters | 3 + .../codegen_test_full.vcxproj | 1 + .../codegen_test_full.vcxproj.filters | 3 + .../codegen_test_minimal.vcxproj | 1 + .../codegen_test_minimal.vcxproj.filters | 3 + 37 files changed, 410 insertions(+), 216 deletions(-) create mode 100644 include/grpc/impl/codegen/byte_buffer_reader.h diff --git a/BUILD b/BUILD index b69c9404113..aa06678ffd1 100644 --- a/BUILD +++ b/BUILD @@ -461,6 +461,7 @@ cc_library( "include/grpc/grpc.h", "include/grpc/status.h", "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/byte_buffer_reader.h", "include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/grpc_types.h", @@ -772,6 +773,7 @@ cc_library( "include/grpc/grpc.h", "include/grpc/status.h", "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/byte_buffer_reader.h", "include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/grpc_types.h", @@ -944,6 +946,7 @@ cc_library( "include/grpc++/impl/codegen/sync_stream.h", "include/grpc++/impl/codegen/time.h", "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/byte_buffer_reader.h", "include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/grpc_types.h", @@ -1089,6 +1092,7 @@ cc_library( "include/grpc++/impl/codegen/sync_stream.h", "include/grpc++/impl/codegen/time.h", "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/byte_buffer_reader.h", "include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/grpc_types.h", @@ -1476,6 +1480,7 @@ objc_library( "include/grpc/grpc.h", "include/grpc/status.h", "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/byte_buffer_reader.h", "include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/grpc_types.h", diff --git a/Makefile b/Makefile index 3b7dbd9638a..89cfd4136ab 100644 --- a/Makefile +++ b/Makefile @@ -2629,6 +2629,7 @@ PUBLIC_HEADERS_C += \ include/grpc/grpc.h \ include/grpc/status.h \ include/grpc/impl/codegen/byte_buffer.h \ + include/grpc/impl/codegen/byte_buffer_reader.h \ include/grpc/impl/codegen/compression_types.h \ include/grpc/impl/codegen/connectivity_state.h \ include/grpc/impl/codegen/grpc_types.h \ @@ -2949,6 +2950,7 @@ PUBLIC_HEADERS_C += \ include/grpc/grpc.h \ include/grpc/status.h \ include/grpc/impl/codegen/byte_buffer.h \ + include/grpc/impl/codegen/byte_buffer_reader.h \ include/grpc/impl/codegen/compression_types.h \ include/grpc/impl/codegen/connectivity_state.h \ include/grpc/impl/codegen/grpc_types.h \ @@ -3235,6 +3237,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/codegen/sync_stream.h \ include/grpc++/impl/codegen/time.h \ include/grpc/impl/codegen/byte_buffer.h \ + include/grpc/impl/codegen/byte_buffer_reader.h \ include/grpc/impl/codegen/compression_types.h \ include/grpc/impl/codegen/connectivity_state.h \ include/grpc/impl/codegen/grpc_types.h \ @@ -3538,6 +3541,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/codegen/sync_stream.h \ include/grpc++/impl/codegen/time.h \ include/grpc/impl/codegen/byte_buffer.h \ + include/grpc/impl/codegen/byte_buffer_reader.h \ include/grpc/impl/codegen/compression_types.h \ include/grpc/impl/codegen/connectivity_state.h \ include/grpc/impl/codegen/grpc_types.h \ diff --git a/build.yaml b/build.yaml index 6c00b42a1e7..daa8c6aa95a 100644 --- a/build.yaml +++ b/build.yaml @@ -349,6 +349,7 @@ filegroups: - name: grpc_codegen public_headers: - include/grpc/impl/codegen/byte_buffer.h + - include/grpc/impl/codegen/byte_buffer_reader.h - include/grpc/impl/codegen/compression_types.h - include/grpc/impl/codegen/connectivity_state.h - include/grpc/impl/codegen/grpc_types.h diff --git a/gRPC.podspec b/gRPC.podspec index d66e03354bb..ace137f104b 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -303,6 +303,7 @@ Pod::Spec.new do |s| 'include/grpc/grpc.h', 'include/grpc/status.h', 'include/grpc/impl/codegen/byte_buffer.h', + 'include/grpc/impl/codegen/byte_buffer_reader.h', 'include/grpc/impl/codegen/compression_types.h', 'include/grpc/impl/codegen/connectivity_state.h', 'include/grpc/impl/codegen/grpc_types.h', diff --git a/grpc.gemspec b/grpc.gemspec index a9f0f681df0..2f72e02152c 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -147,6 +147,7 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/grpc.h ) s.files += %w( include/grpc/status.h ) s.files += %w( include/grpc/impl/codegen/byte_buffer.h ) + s.files += %w( include/grpc/impl/codegen/byte_buffer_reader.h ) s.files += %w( include/grpc/impl/codegen/compression_types.h ) s.files += %w( include/grpc/impl/codegen/connectivity_state.h ) s.files += %w( include/grpc/impl/codegen/grpc_types.h ) diff --git a/include/grpc++/impl/codegen/core_codegen_interface.h b/include/grpc++/impl/codegen/core_codegen_interface.h index 16424bab358..aa9013c4cec 100644 --- a/include/grpc++/impl/codegen/core_codegen_interface.h +++ b/include/grpc++/impl/codegen/core_codegen_interface.h @@ -49,18 +49,6 @@ namespace grpc { /// \warning This interface should be considered internal and private. class CoreCodegenInterface { public: - // Serialize the msg into a buffer created inside the function. The caller - // should destroy the returned buffer when done with it. If serialization - // fails, - // false is returned and buffer is left unchanged. - virtual Status SerializeProto(const grpc::protobuf::Message& msg, - grpc_byte_buffer** buffer) = 0; - - // The caller keeps ownership of buffer and msg. - virtual Status DeserializeProto(grpc_byte_buffer* buffer, - grpc::protobuf::Message* msg, - int max_message_size) = 0; - /// Upon a failed assertion, log the error. virtual void assert_fail(const char* failed_assertion) = 0; @@ -76,9 +64,29 @@ class CoreCodegenInterface { virtual void gpr_free(void* p) = 0; virtual void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) = 0; + + virtual void grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader, + grpc_byte_buffer* buffer) = 0; + virtual void grpc_byte_buffer_reader_destroy( + grpc_byte_buffer_reader* reader) = 0; + virtual int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader, + gpr_slice* slice) = 0; + + virtual grpc_byte_buffer* grpc_raw_byte_buffer_create(gpr_slice* slice, + size_t nslices) = 0; + + virtual gpr_slice gpr_slice_malloc(size_t length) = 0; + virtual void gpr_slice_unref(gpr_slice slice) = 0; + virtual gpr_slice gpr_slice_split_tail(gpr_slice* s, size_t split) = 0; + virtual void gpr_slice_buffer_add(gpr_slice_buffer* sb, gpr_slice slice) = 0; + virtual void gpr_slice_buffer_pop(gpr_slice_buffer* sb) = 0; + virtual void grpc_metadata_array_init(grpc_metadata_array* array) = 0; virtual void grpc_metadata_array_destroy(grpc_metadata_array* array) = 0; + virtual const Status& ok() = 0; + virtual const Status& cancelled() = 0; + virtual gpr_timespec gpr_inf_future(gpr_clock_type type) = 0; }; diff --git a/include/grpc++/impl/codegen/proto_utils.h b/include/grpc++/impl/codegen/proto_utils.h index 2aaa3c3b300..d044ddc642d 100644 --- a/include/grpc++/impl/codegen/proto_utils.h +++ b/include/grpc++/impl/codegen/proto_utils.h @@ -41,26 +41,179 @@ #include #include #include +#include #include +#include namespace grpc { extern CoreCodegenInterface* g_core_codegen_interface; +namespace { + +const int kGrpcBufferWriterMaxBufferLength = 8192; + +class GrpcBufferWriter GRPC_FINAL + : public ::grpc::protobuf::io::ZeroCopyOutputStream { + public: + explicit GrpcBufferWriter(grpc_byte_buffer** bp, int block_size) + : block_size_(block_size), byte_count_(0), have_backup_(false) { + *bp = g_core_codegen_interface->grpc_raw_byte_buffer_create(NULL, 0); + slice_buffer_ = &(*bp)->data.raw.slice_buffer; + } + + ~GrpcBufferWriter() GRPC_OVERRIDE { + if (have_backup_) { + g_core_codegen_interface->gpr_slice_unref(backup_slice_); + } + } + + bool Next(void** data, int* size) GRPC_OVERRIDE { + if (have_backup_) { + slice_ = backup_slice_; + have_backup_ = false; + } else { + slice_ = g_core_codegen_interface->gpr_slice_malloc(block_size_); + } + *data = GPR_SLICE_START_PTR(slice_); + // On win x64, int is only 32bit + GPR_CODEGEN_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX); + byte_count_ += * size = (int)GPR_SLICE_LENGTH(slice_); + g_core_codegen_interface->gpr_slice_buffer_add(slice_buffer_, slice_); + return true; + } + + void BackUp(int count) GRPC_OVERRIDE { + g_core_codegen_interface->gpr_slice_buffer_pop(slice_buffer_); + if (count == block_size_) { + backup_slice_ = slice_; + } else { + backup_slice_ = g_core_codegen_interface->gpr_slice_split_tail( + &slice_, GPR_SLICE_LENGTH(slice_) - count); + g_core_codegen_interface->gpr_slice_buffer_add(slice_buffer_, slice_); + } + have_backup_ = true; + byte_count_ -= count; + } + + grpc::protobuf::int64 ByteCount() const GRPC_OVERRIDE { return byte_count_; } + + private: + const int block_size_; + int64_t byte_count_; + gpr_slice_buffer* slice_buffer_; + bool have_backup_; + gpr_slice backup_slice_; + gpr_slice slice_; +}; + +class GrpcBufferReader GRPC_FINAL + : public ::grpc::protobuf::io::ZeroCopyInputStream { + public: + explicit GrpcBufferReader(grpc_byte_buffer* buffer) + : byte_count_(0), backup_count_(0) { + g_core_codegen_interface->grpc_byte_buffer_reader_init(&reader_, buffer); + } + ~GrpcBufferReader() GRPC_OVERRIDE { + g_core_codegen_interface->grpc_byte_buffer_reader_destroy(&reader_); + } + + bool Next(const void** data, int* size) GRPC_OVERRIDE { + if (backup_count_ > 0) { + *data = GPR_SLICE_START_PTR(slice_) + GPR_SLICE_LENGTH(slice_) - + backup_count_; + GPR_CODEGEN_ASSERT(backup_count_ <= INT_MAX); + *size = (int)backup_count_; + backup_count_ = 0; + return true; + } + if (!g_core_codegen_interface->grpc_byte_buffer_reader_next(&reader_, + &slice_)) { + return false; + } + g_core_codegen_interface->gpr_slice_unref(slice_); + *data = GPR_SLICE_START_PTR(slice_); + // On win x64, int is only 32bit + GPR_CODEGEN_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX); + byte_count_ += * size = (int)GPR_SLICE_LENGTH(slice_); + return true; + } + + void BackUp(int count) GRPC_OVERRIDE { backup_count_ = count; } + + bool Skip(int count) GRPC_OVERRIDE { + const void* data; + int size; + while (Next(&data, &size)) { + if (size >= count) { + BackUp(size - count); + return true; + } + // size < count; + count -= size; + } + // error or we have too large count; + return false; + } + + grpc::protobuf::int64 ByteCount() const GRPC_OVERRIDE { + return byte_count_ - backup_count_; + } + + private: + int64_t byte_count_; + int64_t backup_count_; + grpc_byte_buffer_reader reader_; + gpr_slice slice_; +}; +} // namespace + template class SerializationTraits::value>::type> { public: static Status Serialize(const grpc::protobuf::Message& msg, - grpc_byte_buffer** buffer, bool* own_buffer) { + grpc_byte_buffer** bp, bool* own_buffer) { *own_buffer = true; - return g_core_codegen_interface->SerializeProto(msg, buffer); + int byte_size = msg.ByteSize(); + if (byte_size <= kGrpcBufferWriterMaxBufferLength) { + gpr_slice slice = g_core_codegen_interface->gpr_slice_malloc(byte_size); + GPR_CODEGEN_ASSERT( + GPR_SLICE_END_PTR(slice) == + msg.SerializeWithCachedSizesToArray(GPR_SLICE_START_PTR(slice))); + *bp = g_core_codegen_interface->grpc_raw_byte_buffer_create(&slice, 1); + g_core_codegen_interface->gpr_slice_unref(slice); + return g_core_codegen_interface->ok(); + } else { + GrpcBufferWriter writer(bp, kGrpcBufferWriterMaxBufferLength); + return msg.SerializeToZeroCopyStream(&writer) + ? g_core_codegen_interface->ok() + : Status(StatusCode::INTERNAL, "Failed to serialize message"); + } } + static Status Deserialize(grpc_byte_buffer* buffer, grpc::protobuf::Message* msg, int max_message_size) { - return g_core_codegen_interface->DeserializeProto(buffer, msg, - max_message_size); + if (buffer == nullptr) { + return Status(StatusCode::INTERNAL, "No payload"); + } + Status result = g_core_codegen_interface->ok(); + { + GrpcBufferReader reader(buffer); + ::grpc::protobuf::io::CodedInputStream decoder(&reader); + if (max_message_size > 0) { + decoder.SetTotalBytesLimit(max_message_size, max_message_size); + } + if (!msg->ParseFromCodedStream(&decoder)) { + result = Status(StatusCode::INTERNAL, msg->InitializationErrorString()); + } + if (!decoder.ConsumedEntireMessage()) { + result = Status(StatusCode::INTERNAL, "Did not read entire message"); + } + } + g_core_codegen_interface->grpc_byte_buffer_destroy(buffer); + return result; } }; diff --git a/include/grpc/byte_buffer_reader.h b/include/grpc/byte_buffer_reader.h index 9a1c6178ab6..e95bf2f80dc 100644 --- a/include/grpc/byte_buffer_reader.h +++ b/include/grpc/byte_buffer_reader.h @@ -34,25 +34,6 @@ #ifndef GRPC_BYTE_BUFFER_READER_H #define GRPC_BYTE_BUFFER_READER_H -#include -#include - -#ifdef __cplusplus -extern "C" { -#endif - -struct grpc_byte_buffer_reader { - grpc_byte_buffer *buffer_in; - grpc_byte_buffer *buffer_out; - /* Different current objects correspond to different types of byte buffers */ - union { - /* Index into a slice buffer's array of slices */ - unsigned index; - } current; -}; - -#ifdef __cplusplus -} -#endif +#include #endif /* GRPC_BYTE_BUFFER_READER_H */ diff --git a/include/grpc/impl/codegen/byte_buffer_reader.h b/include/grpc/impl/codegen/byte_buffer_reader.h new file mode 100644 index 00000000000..10c382924ec --- /dev/null +++ b/include/grpc/impl/codegen/byte_buffer_reader.h @@ -0,0 +1,57 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_IMPL_CODEGEN_BYTE_BUFFER_READER_H +#define GRPC_IMPL_CODEGEN_BYTE_BUFFER_READER_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +struct grpc_byte_buffer_reader { + grpc_byte_buffer *buffer_in; + grpc_byte_buffer *buffer_out; + /* Different current objects correspond to different types of byte buffers */ + union { + /* Index into a slice buffer's array of slices */ + unsigned index; + } current; +}; + +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_IMPL_CODEGEN_BYTE_BUFFER_READER_H */ diff --git a/package.xml b/package.xml index 3ae810df5eb..b9b8f0297f7 100644 --- a/package.xml +++ b/package.xml @@ -154,6 +154,7 @@ + diff --git a/src/compiler/csharp_generator.cc b/src/compiler/csharp_generator.cc index 69e2738d53d..4def6c5e31f 100644 --- a/src/compiler/csharp_generator.cc +++ b/src/compiler/csharp_generator.cc @@ -350,10 +350,12 @@ void GenerateServerClass(Printer* out, const ServiceDescriptor *service) { void GenerateClientStub(Printer* out, const ServiceDescriptor *service) { out->Print("// client stub\n"); + out->Print("#pragma warning disable 0618\n"); out->Print( "public class $name$ : ClientBase<$name$>, $interface$\n", "name", GetClientClassName(service), "interface", GetClientInterfaceName(service)); + out->Print("#pragma warning restore 0618\n"); out->Print("{\n"); out->Indent(); @@ -480,10 +482,12 @@ void GenerateBindServiceMethod(Printer* out, const ServiceDescriptor *service, bool use_server_class) { out->Print( "// creates service definition that can be registered with a server\n"); + out->Print("#pragma warning disable 0618\n"); out->Print( "public static ServerServiceDefinition BindService($interface$ serviceImpl)\n", "interface", use_server_class ? GetServerClassName(service) : GetServerInterfaceName(service)); + out->Print("#pragma warning restore 0618\n"); out->Print("{\n"); out->Indent(); diff --git a/src/core/lib/transport/metadata.c b/src/core/lib/transport/metadata.c index 779efbb97d5..5847ec9053d 100644 --- a/src/core/lib/transport/metadata.c +++ b/src/core/lib/transport/metadata.c @@ -386,10 +386,18 @@ grpc_mdstr *grpc_mdstr_from_buffer(const uint8_t *buf, size_t length) { for (s = shard->strs[idx]; s; s = s->bucket_next) { if (s->hash == hash && GPR_SLICE_LENGTH(s->slice) == length && 0 == memcmp(buf, GPR_SLICE_START_PTR(s->slice), length)) { - GRPC_MDSTR_REF((grpc_mdstr *)s); - gpr_mu_unlock(&shard->mu); - GPR_TIMER_END("grpc_mdstr_from_buffer", 0); - return (grpc_mdstr *)s; + if (gpr_atm_full_fetch_add(&s->refcnt, 1) == 0) { + /* If we get here, we've added a ref to something that was about to + * die - drop it immediately. + * The *only* possible path here (given the shard mutex) should be to + * drop from one ref back to zero - assert that with a CAS */ + GPR_ASSERT(gpr_atm_rel_cas(&s->refcnt, 1, 0)); + /* and treat this as if we were never here... sshhh */ + } else { + gpr_mu_unlock(&shard->mu); + GPR_TIMER_END("grpc_mdstr_from_buffer", 0); + return (grpc_mdstr *)s; + } } } @@ -397,7 +405,7 @@ grpc_mdstr *grpc_mdstr_from_buffer(const uint8_t *buf, size_t length) { if (length + 1 < GPR_SLICE_INLINED_SIZE) { /* string data goes directly into the slice */ s = gpr_malloc(sizeof(internal_string)); - gpr_atm_rel_store(&s->refcnt, 2); + gpr_atm_rel_store(&s->refcnt, 1); s->slice.refcount = NULL; memcpy(s->slice.data.inlined.bytes, buf, length); s->slice.data.inlined.bytes[length] = 0; @@ -406,7 +414,7 @@ grpc_mdstr *grpc_mdstr_from_buffer(const uint8_t *buf, size_t length) { /* string data goes after the internal_string header, and we +1 for null terminator */ s = gpr_malloc(sizeof(internal_string) + length + 1); - gpr_atm_rel_store(&s->refcnt, 2); + gpr_atm_rel_store(&s->refcnt, 1); s->refcount.ref = slice_ref; s->refcount.unref = slice_unref; s->slice.refcount = &s->refcount; @@ -675,20 +683,19 @@ const char *grpc_mdstr_as_c_string(grpc_mdstr *s) { grpc_mdstr *grpc_mdstr_ref(grpc_mdstr *gs DEBUG_ARGS) { internal_string *s = (internal_string *)gs; if (is_mdstr_static(gs)) return gs; - GPR_ASSERT(gpr_atm_full_fetch_add(&s->refcnt, 1) != 0); + GPR_ASSERT(gpr_atm_full_fetch_add(&s->refcnt, 1) > 0); return gs; } void grpc_mdstr_unref(grpc_mdstr *gs DEBUG_ARGS) { internal_string *s = (internal_string *)gs; if (is_mdstr_static(gs)) return; - if (2 == gpr_atm_full_fetch_add(&s->refcnt, -1)) { + if (1 == gpr_atm_full_fetch_add(&s->refcnt, -1)) { strtab_shard *shard = &g_strtab_shard[SHARD_IDX(s->hash, LOG2_STRTAB_SHARD_COUNT)]; gpr_mu_lock(&shard->mu); - if (1 == gpr_atm_no_barrier_load(&s->refcnt)) { - internal_destroy_string(shard, s); - } + GPR_ASSERT(0 == gpr_atm_no_barrier_load(&s->refcnt)); + internal_destroy_string(shard, s); gpr_mu_unlock(&shard->mu); } } diff --git a/src/cpp/common/core_codegen.cc b/src/cpp/common/core_codegen.cc index 33a8f755e69..8e8d42eb294 100644 --- a/src/cpp/common/core_codegen.cc +++ b/src/cpp/common/core_codegen.cc @@ -48,124 +48,6 @@ #include "src/core/lib/profiling/timers.h" -namespace { - -const int kGrpcBufferWriterMaxBufferLength = 8192; - -class GrpcBufferWriter GRPC_FINAL - : public ::grpc::protobuf::io::ZeroCopyOutputStream { - public: - explicit GrpcBufferWriter(grpc_byte_buffer** bp, int block_size) - : block_size_(block_size), byte_count_(0), have_backup_(false) { - *bp = grpc_raw_byte_buffer_create(NULL, 0); - slice_buffer_ = &(*bp)->data.raw.slice_buffer; - } - - ~GrpcBufferWriter() GRPC_OVERRIDE { - if (have_backup_) { - gpr_slice_unref(backup_slice_); - } - } - - bool Next(void** data, int* size) GRPC_OVERRIDE { - if (have_backup_) { - slice_ = backup_slice_; - have_backup_ = false; - } else { - slice_ = gpr_slice_malloc(block_size_); - } - *data = GPR_SLICE_START_PTR(slice_); - // On win x64, int is only 32bit - GPR_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX); - byte_count_ += * size = (int)GPR_SLICE_LENGTH(slice_); - gpr_slice_buffer_add(slice_buffer_, slice_); - return true; - } - - void BackUp(int count) GRPC_OVERRIDE { - gpr_slice_buffer_pop(slice_buffer_); - if (count == block_size_) { - backup_slice_ = slice_; - } else { - backup_slice_ = - gpr_slice_split_tail(&slice_, GPR_SLICE_LENGTH(slice_) - count); - gpr_slice_buffer_add(slice_buffer_, slice_); - } - have_backup_ = true; - byte_count_ -= count; - } - - grpc::protobuf::int64 ByteCount() const GRPC_OVERRIDE { return byte_count_; } - - private: - const int block_size_; - int64_t byte_count_; - gpr_slice_buffer* slice_buffer_; - bool have_backup_; - gpr_slice backup_slice_; - gpr_slice slice_; -}; - -class GrpcBufferReader GRPC_FINAL - : public ::grpc::protobuf::io::ZeroCopyInputStream { - public: - explicit GrpcBufferReader(grpc_byte_buffer* buffer) - : byte_count_(0), backup_count_(0) { - grpc_byte_buffer_reader_init(&reader_, buffer); - } - ~GrpcBufferReader() GRPC_OVERRIDE { - grpc_byte_buffer_reader_destroy(&reader_); - } - - bool Next(const void** data, int* size) GRPC_OVERRIDE { - if (backup_count_ > 0) { - *data = GPR_SLICE_START_PTR(slice_) + GPR_SLICE_LENGTH(slice_) - - backup_count_; - GPR_ASSERT(backup_count_ <= INT_MAX); - *size = (int)backup_count_; - backup_count_ = 0; - return true; - } - if (!grpc_byte_buffer_reader_next(&reader_, &slice_)) { - return false; - } - gpr_slice_unref(slice_); - *data = GPR_SLICE_START_PTR(slice_); - // On win x64, int is only 32bit - GPR_ASSERT(GPR_SLICE_LENGTH(slice_) <= INT_MAX); - byte_count_ += * size = (int)GPR_SLICE_LENGTH(slice_); - return true; - } - - void BackUp(int count) GRPC_OVERRIDE { backup_count_ = count; } - - bool Skip(int count) GRPC_OVERRIDE { - const void* data; - int size; - while (Next(&data, &size)) { - if (size >= count) { - BackUp(size - count); - return true; - } - // size < count; - count -= size; - } - // error or we have too large count; - return false; - } - - grpc::protobuf::int64 ByteCount() const GRPC_OVERRIDE { - return byte_count_ - backup_count_; - } - - private: - int64_t byte_count_; - int64_t backup_count_; - grpc_byte_buffer_reader reader_; - gpr_slice slice_; -}; -} // namespace - namespace grpc { grpc_completion_queue* CoreCodegen::grpc_completion_queue_create( @@ -192,6 +74,44 @@ void CoreCodegen::grpc_byte_buffer_destroy(grpc_byte_buffer* bb) { ::grpc_byte_buffer_destroy(bb); } +void CoreCodegen::grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader, + grpc_byte_buffer* buffer) { + ::grpc_byte_buffer_reader_init(reader, buffer); +} + +void CoreCodegen::grpc_byte_buffer_reader_destroy( + grpc_byte_buffer_reader* reader) { + ::grpc_byte_buffer_reader_destroy(reader); +} + +int CoreCodegen::grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader, + gpr_slice* slice) { + return ::grpc_byte_buffer_reader_next(reader, slice); +} + +grpc_byte_buffer* CoreCodegen::grpc_raw_byte_buffer_create(gpr_slice* slice, + size_t nslices) { + return ::grpc_raw_byte_buffer_create(slice, nslices); +} + +gpr_slice CoreCodegen::gpr_slice_malloc(size_t length) { + return ::gpr_slice_malloc(length); +} + +void CoreCodegen::gpr_slice_unref(gpr_slice slice) { ::gpr_slice_unref(slice); } + +gpr_slice CoreCodegen::gpr_slice_split_tail(gpr_slice* s, size_t split) { + return ::gpr_slice_split_tail(s, split); +} + +void CoreCodegen::gpr_slice_buffer_add(gpr_slice_buffer* sb, gpr_slice slice) { + ::gpr_slice_buffer_add(sb, slice); +} + +void CoreCodegen::gpr_slice_buffer_pop(gpr_slice_buffer* sb) { + ::gpr_slice_buffer_pop(sb); +} + void CoreCodegen::grpc_metadata_array_init(grpc_metadata_array* array) { ::grpc_metadata_array_init(array); } @@ -200,6 +120,10 @@ void CoreCodegen::grpc_metadata_array_destroy(grpc_metadata_array* array) { ::grpc_metadata_array_destroy(array); } +const Status& CoreCodegen::ok() { return grpc::Status::OK; } + +const Status& CoreCodegen::cancelled() { return grpc::Status::CANCELLED; } + gpr_timespec CoreCodegen::gpr_inf_future(gpr_clock_type type) { return ::gpr_inf_future(type); } @@ -209,48 +133,4 @@ void CoreCodegen::assert_fail(const char* failed_assertion) { abort(); } -Status CoreCodegen::SerializeProto(const grpc::protobuf::Message& msg, - grpc_byte_buffer** bp) { - GPR_TIMER_SCOPE("SerializeProto", 0); - int byte_size = msg.ByteSize(); - if (byte_size <= kGrpcBufferWriterMaxBufferLength) { - gpr_slice slice = gpr_slice_malloc(byte_size); - GPR_ASSERT(GPR_SLICE_END_PTR(slice) == - msg.SerializeWithCachedSizesToArray(GPR_SLICE_START_PTR(slice))); - *bp = grpc_raw_byte_buffer_create(&slice, 1); - gpr_slice_unref(slice); - return Status::OK; - } else { - GrpcBufferWriter writer(bp, kGrpcBufferWriterMaxBufferLength); - return msg.SerializeToZeroCopyStream(&writer) - ? Status::OK - : Status(StatusCode::INTERNAL, "Failed to serialize message"); - } -} - -Status CoreCodegen::DeserializeProto(grpc_byte_buffer* buffer, - grpc::protobuf::Message* msg, - int max_message_size) { - GPR_TIMER_SCOPE("DeserializeProto", 0); - if (buffer == nullptr) { - return Status(StatusCode::INTERNAL, "No payload"); - } - Status result = Status::OK; - { - GrpcBufferReader reader(buffer); - ::grpc::protobuf::io::CodedInputStream decoder(&reader); - if (max_message_size > 0) { - decoder.SetTotalBytesLimit(max_message_size, max_message_size); - } - if (!msg->ParseFromCodedStream(&decoder)) { - result = Status(StatusCode::INTERNAL, msg->InitializationErrorString()); - } - if (!decoder.ConsumedEntireMessage()) { - result = Status(StatusCode::INTERNAL, "Did not read entire message"); - } - } - grpc_byte_buffer_destroy(buffer); - return result; -} - } // namespace grpc diff --git a/src/cpp/common/core_codegen.h b/src/cpp/common/core_codegen.h index e15cb4c34aa..656b11e7e72 100644 --- a/src/cpp/common/core_codegen.h +++ b/src/cpp/common/core_codegen.h @@ -42,13 +42,6 @@ namespace grpc { /// Implementation of the core codegen interface. class CoreCodegen : public CoreCodegenInterface { private: - Status SerializeProto(const grpc::protobuf::Message& msg, - grpc_byte_buffer** bp) override; - - Status DeserializeProto(grpc_byte_buffer* buffer, - grpc::protobuf::Message* msg, - int max_message_size) override; - grpc_completion_queue* grpc_completion_queue_create(void* reserved) override; void grpc_completion_queue_destroy(grpc_completion_queue* cq) override; grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, void* tag, @@ -60,11 +53,30 @@ class CoreCodegen : public CoreCodegenInterface { void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) override; + void grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader, + grpc_byte_buffer* buffer) override; + void grpc_byte_buffer_reader_destroy( + grpc_byte_buffer_reader* reader) override; + int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader, + gpr_slice* slice) override; + + grpc_byte_buffer* grpc_raw_byte_buffer_create(gpr_slice* slice, + size_t nslices) override; + + gpr_slice gpr_slice_malloc(size_t length) override; + void gpr_slice_unref(gpr_slice slice) override; + gpr_slice gpr_slice_split_tail(gpr_slice* s, size_t split) override; + void gpr_slice_buffer_add(gpr_slice_buffer* sb, gpr_slice slice) override; + void gpr_slice_buffer_pop(gpr_slice_buffer* sb) override; + void grpc_metadata_array_init(grpc_metadata_array* array) override; void grpc_metadata_array_destroy(grpc_metadata_array* array) override; gpr_timespec gpr_inf_future(gpr_clock_type type) override; + virtual const Status& ok() override; + virtual const Status& cancelled() override; + void assert_fail(const char* failed_assertion) override; }; diff --git a/src/csharp/Grpc.Examples/MathGrpc.cs b/src/csharp/Grpc.Examples/MathGrpc.cs index f3bb0d1cdcb..1a6482df90e 100644 --- a/src/csharp/Grpc.Examples/MathGrpc.cs +++ b/src/csharp/Grpc.Examples/MathGrpc.cs @@ -103,7 +103,9 @@ namespace Math { } // client stub + #pragma warning disable 0618 public class MathClient : ClientBase, IMathClient + #pragma warning restore 0618 { public MathClient(Channel channel) : base(channel) { @@ -167,7 +169,9 @@ namespace Math { } // creates service definition that can be registered with a server + #pragma warning disable 0618 public static ServerServiceDefinition BindService(IMath serviceImpl) + #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder(__ServiceName) .AddMethod(__Method_Div, serviceImpl.Div) @@ -177,7 +181,9 @@ namespace Math { } // creates service definition that can be registered with a server + #pragma warning disable 0618 public static ServerServiceDefinition BindService(MathBase serviceImpl) + #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder(__ServiceName) .AddMethod(__Method_Div, serviceImpl.Div) diff --git a/src/csharp/Grpc.HealthCheck/HealthGrpc.cs b/src/csharp/Grpc.HealthCheck/HealthGrpc.cs index 72e11cca3a1..e7f779753d7 100644 --- a/src/csharp/Grpc.HealthCheck/HealthGrpc.cs +++ b/src/csharp/Grpc.HealthCheck/HealthGrpc.cs @@ -56,7 +56,9 @@ namespace Grpc.Health.V1 { } // client stub + #pragma warning disable 0618 public class HealthClient : ClientBase, IHealthClient + #pragma warning restore 0618 { public HealthClient(Channel channel) : base(channel) { @@ -96,14 +98,18 @@ namespace Grpc.Health.V1 { } // creates service definition that can be registered with a server + #pragma warning disable 0618 public static ServerServiceDefinition BindService(IHealth serviceImpl) + #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder(__ServiceName) .AddMethod(__Method_Check, serviceImpl.Check).Build(); } // creates service definition that can be registered with a server + #pragma warning disable 0618 public static ServerServiceDefinition BindService(HealthBase serviceImpl) + #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder(__ServiceName) .AddMethod(__Method_Check, serviceImpl.Check).Build(); diff --git a/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs b/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs index cc01ae91a14..11c1572c194 100644 --- a/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs @@ -72,7 +72,9 @@ namespace Grpc.Testing { } // client stub + #pragma warning disable 0618 public class MetricsServiceClient : ClientBase, IMetricsServiceClient + #pragma warning restore 0618 { public MetricsServiceClient(Channel channel) : base(channel) { @@ -120,7 +122,9 @@ namespace Grpc.Testing { } // creates service definition that can be registered with a server + #pragma warning disable 0618 public static ServerServiceDefinition BindService(IMetricsService serviceImpl) + #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder(__ServiceName) .AddMethod(__Method_GetAllGauges, serviceImpl.GetAllGauges) @@ -128,7 +132,9 @@ namespace Grpc.Testing { } // creates service definition that can be registered with a server + #pragma warning disable 0618 public static ServerServiceDefinition BindService(MetricsServiceBase serviceImpl) + #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder(__ServiceName) .AddMethod(__Method_GetAllGauges, serviceImpl.GetAllGauges) diff --git a/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs b/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs index 46b16cf202d..18cf0672e30 100644 --- a/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs @@ -71,7 +71,9 @@ namespace Grpc.Testing { } // client stub + #pragma warning disable 0618 public class BenchmarkServiceClient : ClientBase, IBenchmarkServiceClient + #pragma warning restore 0618 { public BenchmarkServiceClient(Channel channel) : base(channel) { @@ -119,7 +121,9 @@ namespace Grpc.Testing { } // creates service definition that can be registered with a server + #pragma warning disable 0618 public static ServerServiceDefinition BindService(IBenchmarkService serviceImpl) + #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder(__ServiceName) .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall) @@ -127,7 +131,9 @@ namespace Grpc.Testing { } // creates service definition that can be registered with a server + #pragma warning disable 0618 public static ServerServiceDefinition BindService(BenchmarkServiceBase serviceImpl) + #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder(__ServiceName) .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall) @@ -241,7 +247,9 @@ namespace Grpc.Testing { } // client stub + #pragma warning disable 0618 public class WorkerServiceClient : ClientBase, IWorkerServiceClient + #pragma warning restore 0618 { public WorkerServiceClient(Channel channel) : base(channel) { @@ -313,7 +321,9 @@ namespace Grpc.Testing { } // creates service definition that can be registered with a server + #pragma warning disable 0618 public static ServerServiceDefinition BindService(IWorkerService serviceImpl) + #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder(__ServiceName) .AddMethod(__Method_RunServer, serviceImpl.RunServer) @@ -323,7 +333,9 @@ namespace Grpc.Testing { } // creates service definition that can be registered with a server + #pragma warning disable 0618 public static ServerServiceDefinition BindService(WorkerServiceBase serviceImpl) + #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder(__ServiceName) .AddMethod(__Method_RunServer, serviceImpl.RunServer) diff --git a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs index 31746cbe715..3b915f6df12 100644 --- a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs @@ -138,7 +138,9 @@ namespace Grpc.Testing { } // client stub + #pragma warning disable 0618 public class TestServiceClient : ClientBase, ITestServiceClient + #pragma warning restore 0618 { public TestServiceClient(Channel channel) : base(channel) { @@ -226,7 +228,9 @@ namespace Grpc.Testing { } // creates service definition that can be registered with a server + #pragma warning disable 0618 public static ServerServiceDefinition BindService(ITestService serviceImpl) + #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder(__ServiceName) .AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall) @@ -238,7 +242,9 @@ namespace Grpc.Testing { } // creates service definition that can be registered with a server + #pragma warning disable 0618 public static ServerServiceDefinition BindService(TestServiceBase serviceImpl) + #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder(__ServiceName) .AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall) @@ -303,7 +309,9 @@ namespace Grpc.Testing { } // client stub + #pragma warning disable 0618 public class UnimplementedServiceClient : ClientBase, IUnimplementedServiceClient + #pragma warning restore 0618 { public UnimplementedServiceClient(Channel channel) : base(channel) { @@ -343,14 +351,18 @@ namespace Grpc.Testing { } // creates service definition that can be registered with a server + #pragma warning disable 0618 public static ServerServiceDefinition BindService(IUnimplementedService serviceImpl) + #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder(__ServiceName) .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build(); } // creates service definition that can be registered with a server + #pragma warning disable 0618 public static ServerServiceDefinition BindService(UnimplementedServiceBase serviceImpl) + #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder(__ServiceName) .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build(); @@ -429,7 +441,9 @@ namespace Grpc.Testing { } // client stub + #pragma warning disable 0618 public class ReconnectServiceClient : ClientBase, IReconnectServiceClient + #pragma warning restore 0618 { public ReconnectServiceClient(Channel channel) : base(channel) { @@ -485,7 +499,9 @@ namespace Grpc.Testing { } // creates service definition that can be registered with a server + #pragma warning disable 0618 public static ServerServiceDefinition BindService(IReconnectService serviceImpl) + #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder(__ServiceName) .AddMethod(__Method_Start, serviceImpl.Start) @@ -493,7 +509,9 @@ namespace Grpc.Testing { } // creates service definition that can be registered with a server + #pragma warning disable 0618 public static ServerServiceDefinition BindService(ReconnectServiceBase serviceImpl) + #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder(__ServiceName) .AddMethod(__Method_Start, serviceImpl.Start) diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c index 0eede6c23bd..3eeb55d033d 100644 --- a/test/core/surface/public_headers_must_be_c89.c +++ b/test/core/surface/public_headers_must_be_c89.c @@ -41,6 +41,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 7dc04960475..664ca03d978 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -833,6 +833,7 @@ include/grpc++/impl/codegen/sync_no_cxx11.h \ include/grpc++/impl/codegen/sync_stream.h \ include/grpc++/impl/codegen/time.h \ include/grpc/impl/codegen/byte_buffer.h \ +include/grpc/impl/codegen/byte_buffer_reader.h \ include/grpc/impl/codegen/compression_types.h \ include/grpc/impl/codegen/connectivity_state.h \ include/grpc/impl/codegen/grpc_types.h \ diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 312fd17cb22..5188ef1e8da 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -833,6 +833,7 @@ include/grpc++/impl/codegen/sync_no_cxx11.h \ include/grpc++/impl/codegen/sync_stream.h \ include/grpc++/impl/codegen/time.h \ include/grpc/impl/codegen/byte_buffer.h \ +include/grpc/impl/codegen/byte_buffer_reader.h \ include/grpc/impl/codegen/compression_types.h \ include/grpc/impl/codegen/connectivity_state.h \ include/grpc/impl/codegen/grpc_types.h \ diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index 034d9c6e6f4..42bdb2f0433 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -766,6 +766,7 @@ include/grpc/compression.h \ include/grpc/grpc.h \ include/grpc/status.h \ include/grpc/impl/codegen/byte_buffer.h \ +include/grpc/impl/codegen/byte_buffer_reader.h \ include/grpc/impl/codegen/compression_types.h \ include/grpc/impl/codegen/connectivity_state.h \ include/grpc/impl/codegen/grpc_types.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 3a774a70d6b..7a99598e055 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -766,6 +766,7 @@ include/grpc/compression.h \ include/grpc/grpc.h \ include/grpc/status.h \ include/grpc/impl/codegen/byte_buffer.h \ +include/grpc/impl/codegen/byte_buffer_reader.h \ include/grpc/impl/codegen/compression_types.h \ include/grpc/impl/codegen/connectivity_state.h \ include/grpc/impl/codegen/grpc_types.h \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index e94387cb4d7..cfe204840d5 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5883,6 +5883,7 @@ ], "headers": [ "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/byte_buffer_reader.h", "include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/grpc_types.h", @@ -5893,6 +5894,7 @@ "name": "grpc_codegen", "src": [ "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/byte_buffer_reader.h", "include/grpc/impl/codegen/compression_types.h", "include/grpc/impl/codegen/connectivity_state.h", "include/grpc/impl/codegen/grpc_types.h", diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index 29cab37d521..0ec53acf655 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -331,6 +331,7 @@ + diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index 15e2807fd41..491aeaeb678 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -315,6 +315,9 @@ include\grpc\impl\codegen + + include\grpc\impl\codegen + include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index fcda361ef19..96bee4101c8 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -331,6 +331,7 @@ + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 1dc95f985ad..fe9eed781c7 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -300,6 +300,9 @@ include\grpc\impl\codegen + + include\grpc\impl\codegen + include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 4eec05a3b1f..03f4eaa5bec 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -273,6 +273,7 @@ + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 17c88c4805e..4617e3de0d7 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -516,6 +516,9 @@ include\grpc\impl\codegen + + include\grpc\impl\codegen + include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 26050dcf74e..0eb6535c6bb 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -264,6 +264,7 @@ + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index a4acf513bc1..f544fe6158a 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -456,6 +456,9 @@ include\grpc\impl\codegen + + include\grpc\impl\codegen + include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj index cd0b40c8730..34e939cf845 100644 --- a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj +++ b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj @@ -191,6 +191,7 @@ + diff --git a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters index 029b8ef7741..d66236580c2 100644 --- a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters +++ b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters @@ -120,6 +120,9 @@ include\grpc\impl\codegen + + include\grpc\impl\codegen + include\grpc\impl\codegen diff --git a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj index 6d138fae1cb..890d77df22c 100644 --- a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj +++ b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj @@ -191,6 +191,7 @@ + diff --git a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters index dc3f0b2d040..4e0ba656fc7 100644 --- a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters +++ b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters @@ -120,6 +120,9 @@ include\grpc\impl\codegen + + include\grpc\impl\codegen + include\grpc\impl\codegen From 6da28b26bf7c96dbf714558bff46046c2efb0f91 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 27 Apr 2016 11:05:34 -0700 Subject: [PATCH 0112/1894] cleanup interop test scripts --- tools/dockerfile/grpc_interop_node/build_interop.sh | 2 -- tools/dockerfile/grpc_interop_ruby/build_interop.sh | 2 -- 2 files changed, 4 deletions(-) diff --git a/tools/dockerfile/grpc_interop_node/build_interop.sh b/tools/dockerfile/grpc_interop_node/build_interop.sh index 4d4290d0b41..b99fd444eea 100755 --- a/tools/dockerfile/grpc_interop_node/build_interop.sh +++ b/tools/dockerfile/grpc_interop_node/build_interop.sh @@ -41,8 +41,6 @@ cd /var/local/git/grpc nvm use 0.12 nvm alias default 0.12 # prevent the need to run 'nvm use' in every shell -make install-certs - # build Node interop client & server npm install -g node-gyp npm install --unsafe-perm --build-from-source diff --git a/tools/dockerfile/grpc_interop_ruby/build_interop.sh b/tools/dockerfile/grpc_interop_ruby/build_interop.sh index 685397bac2d..97b3860f981 100755 --- a/tools/dockerfile/grpc_interop_ruby/build_interop.sh +++ b/tools/dockerfile/grpc_interop_ruby/build_interop.sh @@ -40,7 +40,5 @@ cp -r /var/local/jenkins/service_account $HOME || true cd /var/local/git/grpc rvm --default use ruby-2.1 -make install-certs - # build Ruby interop client and server (cd src/ruby && gem update bundler && bundle && rake compile) From a6316693bcadadb87e4c189007e69dc4ad87c79c Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 27 Apr 2016 11:08:06 -0700 Subject: [PATCH 0113/1894] get rid of the old homebrew/linuxbrew tests --- tools/dockerfile/grpc_linuxbrew/Dockerfile | 62 --------- tools/jenkins/run_distribution.sh | 144 --------------------- 2 files changed, 206 deletions(-) delete mode 100644 tools/dockerfile/grpc_linuxbrew/Dockerfile delete mode 100755 tools/jenkins/run_distribution.sh diff --git a/tools/dockerfile/grpc_linuxbrew/Dockerfile b/tools/dockerfile/grpc_linuxbrew/Dockerfile deleted file mode 100644 index 848489e091c..00000000000 --- a/tools/dockerfile/grpc_linuxbrew/Dockerfile +++ /dev/null @@ -1,62 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# A work-in-progress Dockerfile that allows running gRPC homebrew -# installations inside docker containers -FROM debian:jessie - -# Core dependencies -RUN apt-get update && apt-get install -y \ - bzip2 curl git ruby wget - -# Install linuxbrew -ENV PATH /home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH -RUN git clone https://github.com/Homebrew/linuxbrew.git /home/linuxbrew/.linuxbrew -RUN brew doctor || true - -# Python dependency -RUN apt-get update && apt-get install -y python-dev -RUN curl https://bootstrap.pypa.io/get-pip.py | python - -# NodeJS dependency -RUN touch .profile -RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash -RUN /bin/bash -l -c "nvm install 0.12" - -# Ruby dependency -RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 -RUN /bin/bash -l -c "\curl -sSL https://get.rvm.io | bash -s stable" -RUN /bin/bash -l -c "rvm install ruby-2.1" - -# PHP dependency -RUN apt-get update && apt-get install -y php5 php5-dev php-pear phpunit unzip - -RUN /bin/bash -l -c "echo 'export PATH=/home/linuxbrew/.linuxbrew/bin:\$PATH' >> ~/.bashrc" - -CMD ["bash"] diff --git a/tools/jenkins/run_distribution.sh b/tools/jenkins/run_distribution.sh deleted file mode 100755 index 306b85b045c..00000000000 --- a/tools/jenkins/run_distribution.sh +++ /dev/null @@ -1,144 +0,0 @@ -#!/bin/bash -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# -# This script is invoked by Jenkins and triggers a test run of -# linuxbrew installation of a selected language -set -ex - -# Our homebrew installation script command, per language -# Can be used in both linux and macos -if [ "$language" == "core" ]; then - command="curl -fsSL https://goo.gl/getgrpc | bash -" -elif [[ "python nodejs ruby php" =~ "$language" ]]; then - command="curl -fsSL https://goo.gl/getgrpc | bash -s $language" -else - echo "unsupported language $language" - exit 1 -fi - -if [ "$platform" == "linux" ]; then - - if [ "$dist_channel" == "homebrew" ]; then - - sha1=$(sha1sum tools/dockerfile/grpc_linuxbrew/Dockerfile | cut -f1 -d\ ) - DOCKER_IMAGE_NAME=grpc_linuxbrew_$sha1 - - # build docker image, contains all pre-requisites - docker build -t $DOCKER_IMAGE_NAME tools/dockerfile/grpc_linuxbrew - - # run per-language homebrew installation script - docker run --rm=true $DOCKER_IMAGE_NAME bash -l \ - -c "nvm use 0.12; \ - npm set unsafe-perm true; \ - rvm use ruby-2.1; \ - $command" - - else - echo "Unsupported $platform dist_channel $dist_channel" - exit 1 - fi - -elif [ "$platform" == "macos" ]; then - - if [ "$dist_channel" == "homebrew" ]; then - - echo "Formulas installed by system-wide homebrew (before)" - brew list -l - - # Save the original PATH so that we can run the system `brew` command - # again at the end of the script - export ORIGINAL_PATH=$PATH - - # Set up temp directories for test installation of homebrew - brew_root=/tmp/homebrew-test-$language - rm -rf $brew_root - mkdir -p $brew_root - git clone https://github.com/Homebrew/homebrew.git $brew_root - - # Make sure we are operating at the right copy of temp homebrew - # installation - export PATH=$brew_root/bin:$PATH - - # Set up right environment for each language - case $language in - *python*) - rm -rf jenkins_python_venv - virtualenv jenkins_python_venv - source jenkins_python_venv/bin/activate - ;; - *nodejs*) - export PATH=$HOME/.nvm/versions/node/v0.12.7/bin:$PATH - ;; - *ruby*) - export PATH=/usr/local/rvm/rubies/ruby-2.2.1/bin:$PATH - ;; - *php*) - export CFLAGS="-Wno-parentheses-equality" - ;; - esac - - # Run our homebrew installation script - bash -c "$command" - - # Uninstall / clean up per-language modules/extensions after the test - case $language in - *python*) - deactivate - rm -rf jenkins_python_venv - ;; - *nodejs*) - npm list -g | grep grpc - npm uninstall -g grpc - ;; - *ruby*) - gem list | grep grpc - gem uninstall grpc - ;; - *php*) - rm grpc.so - ;; - esac - - # Clean up - rm -rf $brew_root - - echo "Formulas installed by system-wide homebrew (after, should be unaffected)" - export PATH=$ORIGINAL_PATH - brew list -l - - else - echo "Unsupported $platform dist_channel $dist_channel" - exit 1 - fi - -else - echo "unsupported platform $platform" - exit 1 -fi From 85a93831ddf98632d8156bcebee92069b634ef06 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 27 Apr 2016 11:11:41 -0700 Subject: [PATCH 0114/1894] run all implemented C# interop tests --- tools/run_tests/run_interop_tests.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index 18d4c1072b8..758be9304d6 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -111,8 +111,7 @@ class CSharpLanguage: return {} def unimplemented_test_cases(self): - # TODO: status_code_and_message doesn't work against node_server - return _SKIP_COMPRESSION + ['status_code_and_message'] + return _SKIP_COMPRESSION def unimplemented_test_cases_server(self): return _SKIP_COMPRESSION From 31bad328b335597e898583199d43f2016934fd1b Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 27 Apr 2016 11:15:04 -0700 Subject: [PATCH 0115/1894] get rid of the unused grpc_base Dockerfile --- tools/dockerfile/grpc_base/Dockerfile | 68 --------------------------- tools/dockerfile/grpc_base/README.md | 11 ----- 2 files changed, 79 deletions(-) delete mode 100644 tools/dockerfile/grpc_base/Dockerfile delete mode 100644 tools/dockerfile/grpc_base/README.md diff --git a/tools/dockerfile/grpc_base/Dockerfile b/tools/dockerfile/grpc_base/Dockerfile deleted file mode 100644 index 91862773d57..00000000000 --- a/tools/dockerfile/grpc_base/Dockerfile +++ /dev/null @@ -1,68 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# Base Dockerfile for gRPC dev images -FROM debian:latest - -# Install Git. -RUN apt-get update && apt-get install -y \ - autoconf \ - autotools-dev \ - build-essential \ - bzip2 \ - curl \ - gcc \ - git \ - libc6 \ - libc6-dbg \ - libc6-dev \ - libgtest-dev \ - libtool \ - make \ - strace \ - python-dev \ - python-setuptools \ - telnet \ - unzip \ - wget \ - zip && apt-get clean - -# Install useful useful python modules -RUN easy_install -U pip -RUN pip install -U crcmod # makes downloads from cloud storage faster - -# Install GCloud -RUN wget https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.zip \ - && unzip google-cloud-sdk.zip && rm google-cloud-sdk.zip -ENV CLOUD_SDK /google-cloud-sdk -RUN $CLOUD_SDK/install.sh --usage-reporting=true --path-update=true --bash-completion=true --rc-path=/.bashrc --disable-installation-options -ENV PATH $CLOUD_SDK/bin:$PATH - -# Define the default command. -CMD ["bash"] diff --git a/tools/dockerfile/grpc_base/README.md b/tools/dockerfile/grpc_base/README.md deleted file mode 100644 index 5c81b02425d..00000000000 --- a/tools/dockerfile/grpc_base/README.md +++ /dev/null @@ -1,11 +0,0 @@ -Base GRPC Dockerfile -==================== - -Dockerfile for creating the base gRPC development Docker instance. -For now, this assumes that the development will be done on GCE instances, -with source code on GitHub. - -As of 2015/02/02, it includes -- git -- some useful tools like curl, emacs, strace, telnet etc -- a patched version of protoc, to allow protos with stream tags to work From c218d05029deb6b27a952c5d4ed7ea74320d680f Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 27 Apr 2016 11:24:42 -0700 Subject: [PATCH 0116/1894] move interop test docker files to a subdir --- tools/dockerfile/{ => interoptest}/grpc_interop_csharp/Dockerfile | 0 .../{ => interoptest}/grpc_interop_csharp/build_interop.sh | 0 tools/dockerfile/{ => interoptest}/grpc_interop_cxx/Dockerfile | 0 .../{ => interoptest}/grpc_interop_cxx/build_interop.sh | 0 tools/dockerfile/{ => interoptest}/grpc_interop_go/Dockerfile | 0 .../dockerfile/{ => interoptest}/grpc_interop_go/build_interop.sh | 0 tools/dockerfile/{ => interoptest}/grpc_interop_http2/Dockerfile | 0 .../{ => interoptest}/grpc_interop_http2/build_interop.sh | 0 tools/dockerfile/{ => interoptest}/grpc_interop_java/Dockerfile | 0 .../{ => interoptest}/grpc_interop_java/build_interop.sh | 0 tools/dockerfile/{ => interoptest}/grpc_interop_node/Dockerfile | 0 .../{ => interoptest}/grpc_interop_node/build_interop.sh | 0 tools/dockerfile/{ => interoptest}/grpc_interop_php/Dockerfile | 0 .../{ => interoptest}/grpc_interop_php/build_interop.sh | 0 tools/dockerfile/{ => interoptest}/grpc_interop_python/Dockerfile | 0 .../{ => interoptest}/grpc_interop_python/build_interop.sh | 0 tools/dockerfile/{ => interoptest}/grpc_interop_ruby/Dockerfile | 0 .../{ => interoptest}/grpc_interop_ruby/build_interop.sh | 0 18 files changed, 0 insertions(+), 0 deletions(-) rename tools/dockerfile/{ => interoptest}/grpc_interop_csharp/Dockerfile (100%) rename tools/dockerfile/{ => interoptest}/grpc_interop_csharp/build_interop.sh (100%) rename tools/dockerfile/{ => interoptest}/grpc_interop_cxx/Dockerfile (100%) rename tools/dockerfile/{ => interoptest}/grpc_interop_cxx/build_interop.sh (100%) rename tools/dockerfile/{ => interoptest}/grpc_interop_go/Dockerfile (100%) rename tools/dockerfile/{ => interoptest}/grpc_interop_go/build_interop.sh (100%) rename tools/dockerfile/{ => interoptest}/grpc_interop_http2/Dockerfile (100%) rename tools/dockerfile/{ => interoptest}/grpc_interop_http2/build_interop.sh (100%) rename tools/dockerfile/{ => interoptest}/grpc_interop_java/Dockerfile (100%) rename tools/dockerfile/{ => interoptest}/grpc_interop_java/build_interop.sh (100%) rename tools/dockerfile/{ => interoptest}/grpc_interop_node/Dockerfile (100%) rename tools/dockerfile/{ => interoptest}/grpc_interop_node/build_interop.sh (100%) rename tools/dockerfile/{ => interoptest}/grpc_interop_php/Dockerfile (100%) rename tools/dockerfile/{ => interoptest}/grpc_interop_php/build_interop.sh (100%) rename tools/dockerfile/{ => interoptest}/grpc_interop_python/Dockerfile (100%) rename tools/dockerfile/{ => interoptest}/grpc_interop_python/build_interop.sh (100%) rename tools/dockerfile/{ => interoptest}/grpc_interop_ruby/Dockerfile (100%) rename tools/dockerfile/{ => interoptest}/grpc_interop_ruby/build_interop.sh (100%) diff --git a/tools/dockerfile/grpc_interop_csharp/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile similarity index 100% rename from tools/dockerfile/grpc_interop_csharp/Dockerfile rename to tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile diff --git a/tools/dockerfile/grpc_interop_csharp/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_csharp/build_interop.sh similarity index 100% rename from tools/dockerfile/grpc_interop_csharp/build_interop.sh rename to tools/dockerfile/interoptest/grpc_interop_csharp/build_interop.sh diff --git a/tools/dockerfile/grpc_interop_cxx/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_cxx/Dockerfile similarity index 100% rename from tools/dockerfile/grpc_interop_cxx/Dockerfile rename to tools/dockerfile/interoptest/grpc_interop_cxx/Dockerfile diff --git a/tools/dockerfile/grpc_interop_cxx/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_cxx/build_interop.sh similarity index 100% rename from tools/dockerfile/grpc_interop_cxx/build_interop.sh rename to tools/dockerfile/interoptest/grpc_interop_cxx/build_interop.sh diff --git a/tools/dockerfile/grpc_interop_go/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile similarity index 100% rename from tools/dockerfile/grpc_interop_go/Dockerfile rename to tools/dockerfile/interoptest/grpc_interop_go/Dockerfile diff --git a/tools/dockerfile/grpc_interop_go/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_go/build_interop.sh similarity index 100% rename from tools/dockerfile/grpc_interop_go/build_interop.sh rename to tools/dockerfile/interoptest/grpc_interop_go/build_interop.sh diff --git a/tools/dockerfile/grpc_interop_http2/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_http2/Dockerfile similarity index 100% rename from tools/dockerfile/grpc_interop_http2/Dockerfile rename to tools/dockerfile/interoptest/grpc_interop_http2/Dockerfile diff --git a/tools/dockerfile/grpc_interop_http2/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_http2/build_interop.sh similarity index 100% rename from tools/dockerfile/grpc_interop_http2/build_interop.sh rename to tools/dockerfile/interoptest/grpc_interop_http2/build_interop.sh diff --git a/tools/dockerfile/grpc_interop_java/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile similarity index 100% rename from tools/dockerfile/grpc_interop_java/Dockerfile rename to tools/dockerfile/interoptest/grpc_interop_java/Dockerfile diff --git a/tools/dockerfile/grpc_interop_java/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_java/build_interop.sh similarity index 100% rename from tools/dockerfile/grpc_interop_java/build_interop.sh rename to tools/dockerfile/interoptest/grpc_interop_java/build_interop.sh diff --git a/tools/dockerfile/grpc_interop_node/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile similarity index 100% rename from tools/dockerfile/grpc_interop_node/Dockerfile rename to tools/dockerfile/interoptest/grpc_interop_node/Dockerfile diff --git a/tools/dockerfile/grpc_interop_node/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_node/build_interop.sh similarity index 100% rename from tools/dockerfile/grpc_interop_node/build_interop.sh rename to tools/dockerfile/interoptest/grpc_interop_node/build_interop.sh diff --git a/tools/dockerfile/grpc_interop_php/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_php/Dockerfile similarity index 100% rename from tools/dockerfile/grpc_interop_php/Dockerfile rename to tools/dockerfile/interoptest/grpc_interop_php/Dockerfile diff --git a/tools/dockerfile/grpc_interop_php/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_php/build_interop.sh similarity index 100% rename from tools/dockerfile/grpc_interop_php/build_interop.sh rename to tools/dockerfile/interoptest/grpc_interop_php/build_interop.sh diff --git a/tools/dockerfile/grpc_interop_python/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile similarity index 100% rename from tools/dockerfile/grpc_interop_python/Dockerfile rename to tools/dockerfile/interoptest/grpc_interop_python/Dockerfile diff --git a/tools/dockerfile/grpc_interop_python/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_python/build_interop.sh similarity index 100% rename from tools/dockerfile/grpc_interop_python/build_interop.sh rename to tools/dockerfile/interoptest/grpc_interop_python/build_interop.sh diff --git a/tools/dockerfile/grpc_interop_ruby/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile similarity index 100% rename from tools/dockerfile/grpc_interop_ruby/Dockerfile rename to tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile diff --git a/tools/dockerfile/grpc_interop_ruby/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_ruby/build_interop.sh similarity index 100% rename from tools/dockerfile/grpc_interop_ruby/build_interop.sh rename to tools/dockerfile/interoptest/grpc_interop_ruby/build_interop.sh From 24b68cd62f8b3220c89c30342d491b0d71638c74 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 27 Apr 2016 12:19:56 -0700 Subject: [PATCH 0117/1894] generate interop test Dockerfiles using templates --- .../grpc_interop_csharp/Dockerfile.template | 39 +++++++++++ .../grpc_interop_cxx/Dockerfile.template | 39 +++++++++++ .../grpc_interop_go/Dockerfile.template | 37 +++++++++++ .../grpc_interop_http2/Dockerfile.template | 37 +++++++++++ .../grpc_interop_java/Dockerfile.template | 44 +++++++++++++ .../grpc_interop_node/Dockerfile.template | 39 +++++++++++ .../grpc_interop_php/Dockerfile.template | 64 +++++++++++++++++++ .../grpc_interop_python/Dockerfile.template | 39 +++++++++++ .../grpc_interop_ruby/Dockerfile.template | 39 +++++++++++ .../grpc_interop_csharp/Dockerfile | 35 ++++++---- .../interoptest/grpc_interop_cxx/Dockerfile | 25 ++++++-- .../interoptest/grpc_interop_java/Dockerfile | 12 ++-- .../interoptest/grpc_interop_node/Dockerfile | 32 ++++++---- .../interoptest/grpc_interop_php/Dockerfile | 43 +++++++++---- .../grpc_interop_python/Dockerfile | 41 ++++++++---- .../interoptest/grpc_interop_ruby/Dockerfile | 36 +++++++---- tools/jenkins/build_interop_image.sh | 6 +- 17 files changed, 529 insertions(+), 78 deletions(-) create mode 100644 templates/tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile.template create mode 100644 templates/tools/dockerfile/interoptest/grpc_interop_cxx/Dockerfile.template create mode 100644 templates/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile.template create mode 100644 templates/tools/dockerfile/interoptest/grpc_interop_http2/Dockerfile.template create mode 100644 templates/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile.template create mode 100644 templates/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile.template create mode 100644 templates/tools/dockerfile/interoptest/grpc_interop_php/Dockerfile.template create mode 100644 templates/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile.template create mode 100644 templates/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile.template diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile.template new file mode 100644 index 00000000000..4cb8d3b088f --- /dev/null +++ b/templates/tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile.template @@ -0,0 +1,39 @@ +%YAML 1.2 +--- | + # Copyright 2015, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../../apt_get_basic.include"/> + <%include file="../../csharp_deps.include"/> + <%include file="../../run_tests_addons.include"/> + # Define the default command. + CMD ["bash"] + diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_cxx/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_cxx/Dockerfile.template new file mode 100644 index 00000000000..e39175a1ea8 --- /dev/null +++ b/templates/tools/dockerfile/interoptest/grpc_interop_cxx/Dockerfile.template @@ -0,0 +1,39 @@ +%YAML 1.2 +--- | + # Copyright 2015, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../../apt_get_basic.include"/> + <%include file="../../cxx_deps.include"/> + <%include file="../../run_tests_addons.include"/> + # Define the default command. + CMD ["bash"] + diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile.template new file mode 100644 index 00000000000..542c81d614c --- /dev/null +++ b/templates/tools/dockerfile/interoptest/grpc_interop_go/Dockerfile.template @@ -0,0 +1,37 @@ +%YAML 1.2 +--- | + # Copyright 2015, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM golang:1.5 + + <%include file="../../go_path.include"/> + # Define the default command. + CMD ["bash"] + diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_http2/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_http2/Dockerfile.template new file mode 100644 index 00000000000..542c81d614c --- /dev/null +++ b/templates/tools/dockerfile/interoptest/grpc_interop_http2/Dockerfile.template @@ -0,0 +1,37 @@ +%YAML 1.2 +--- | + # Copyright 2015, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM golang:1.5 + + <%include file="../../go_path.include"/> + # Define the default command. + CMD ["bash"] + diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile.template new file mode 100644 index 00000000000..c286e80826c --- /dev/null +++ b/templates/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile.template @@ -0,0 +1,44 @@ +%YAML 1.2 +--- | + # Copyright 2015, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../../java_deps.include"/> + + # Trigger download of as many Gradle artifacts as possible. + RUN git clone --recursive --depth 1 https://github.com/grpc/grpc-java.git && ${'\\'} + cd grpc-java && ${'\\'} + ./gradlew :grpc-interop-testing:installDist -PskipCodegen=true && ${'\\'} + rm -r "$(pwd)" + + # Define the default command. + CMD ["bash"] + diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile.template new file mode 100644 index 00000000000..89bb9acc1af --- /dev/null +++ b/templates/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile.template @@ -0,0 +1,39 @@ +%YAML 1.2 +--- | + # Copyright 2015, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../../apt_get_basic.include"/> + <%include file="../../node_deps.include"/> + <%include file="../../run_tests_addons.include"/> + # Define the default command. + CMD ["bash"] + diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_php/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_php/Dockerfile.template new file mode 100644 index 00000000000..476f9d3d3eb --- /dev/null +++ b/templates/tools/dockerfile/interoptest/grpc_interop_php/Dockerfile.template @@ -0,0 +1,64 @@ +%YAML 1.2 +--- | + # Copyright 2015, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../../apt_get_basic.include"/> + <%include file="../../ruby_deps.include"/> + <%include file="../../php_deps.include"/> + <%include file="../../run_tests_addons.include"/> + # ronn: a ruby tool used to convert markdown to man pages, used during the + # install of Protobuf extensions + # + # rake: a ruby version of make used to build the PHP Protobuf extension + RUN /bin/bash -l -c "rvm all do gem install ronn rake" + + # Install composer + RUN curl -sS https://getcomposer.org/installer | php + RUN mv composer.phar /usr/local/bin/composer + + # As an attempt to work around #4212, try to prefetch Protobuf-PHP dependency + # into composer cache to prevent "composer install" from cloning on each build. + RUN git clone --mirror https://github.com/stanley-cheung/Protobuf-PHP.git ${'\\'} + /root/.composer/cache/vcs/git-github.com-stanley-cheung-Protobuf-PHP.git/ + + # Download the patched PHP protobuf so that PHP gRPC clients can be generated + # from proto3 schemas. + RUN git clone https://github.com/stanley-cheung/Protobuf-PHP.git /var/local/git/protobuf-php + + RUN /bin/bash -l -c "rvm use ruby-2.1 ${'\\'} + && cd /var/local/git/protobuf-php ${'\\'} + && rvm all do rake pear:package version=1.0 ${'\\'} + && pear install Protobuf-1.0.tgz" + + # Define the default command. + CMD ["bash"] + diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile.template new file mode 100644 index 00000000000..4e816ce5b60 --- /dev/null +++ b/templates/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile.template @@ -0,0 +1,39 @@ +%YAML 1.2 +--- | + # Copyright 2015, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../../apt_get_basic.include"/> + <%include file="../../python_deps.include"/> + <%include file="../../run_tests_addons.include"/> + # Define the default command. + CMD ["bash"] + diff --git a/templates/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile.template b/templates/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile.template new file mode 100644 index 00000000000..c3625b91fcc --- /dev/null +++ b/templates/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile.template @@ -0,0 +1,39 @@ +%YAML 1.2 +--- | + # Copyright 2015, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../../apt_get_basic.include"/> + <%include file="../../ruby_deps.include"/> + <%include file="../../run_tests_addons.include"/> + # Define the default command. + CMD ["bash"] + diff --git a/tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile index 93cd25010ef..baab2f56380 100644 --- a/tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile @@ -27,12 +27,9 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# A work-in-progress Dockerfile that allows running gRPC test suites -# inside a docker container. - FROM debian:jessie -# Install Git. +# Install Git and basic packages. RUN apt-get update && apt-get install -y \ autoconf \ autotools-dev \ @@ -43,13 +40,16 @@ RUN apt-get update && apt-get install -y \ gcc \ gcc-multilib \ git \ + golang \ gyp \ + lcov \ libc6 \ libc6-dbg \ libc6-dev \ libgtest-dev \ libtool \ make \ + perl \ strace \ python-dev \ python-setuptools \ @@ -59,15 +59,11 @@ RUN apt-get update && apt-get install -y \ wget \ zip && apt-get clean -# Prepare ccache -RUN ln -s /usr/bin/ccache /usr/local/bin/gcc -RUN ln -s /usr/bin/ccache /usr/local/bin/g++ -RUN ln -s /usr/bin/ccache /usr/local/bin/cc -RUN ln -s /usr/bin/ccache /usr/local/bin/c++ -RUN ln -s /usr/bin/ccache /usr/local/bin/clang -RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ +#================ +# Build profiling +RUN apt-get update && apt-get install -y time && apt-get clean -################# +#================ # C# dependencies # Update to a newer version of mono @@ -84,5 +80,20 @@ RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y \ nuget \ && apt-get clean +# Prepare ccache +RUN ln -s /usr/bin/ccache /usr/local/bin/gcc +RUN ln -s /usr/bin/ccache /usr/local/bin/g++ +RUN ln -s /usr/bin/ccache /usr/local/bin/cc +RUN ln -s /usr/bin/ccache /usr/local/bin/c++ +RUN ln -s /usr/bin/ccache /usr/local/bin/clang +RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ + +#====================== +# Zookeeper dependencies +# TODO(jtattermusch): is zookeeper still needed? +RUN apt-get install -y libzookeeper-mt-dev + +RUN mkdir /var/local/jenkins + # Define the default command. CMD ["bash"] diff --git a/tools/dockerfile/interoptest/grpc_interop_cxx/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_cxx/Dockerfile index 1fa19075330..2bbccca9e51 100644 --- a/tools/dockerfile/interoptest/grpc_interop_cxx/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_cxx/Dockerfile @@ -27,12 +27,9 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# A work-in-progress Dockerfile that allows running gRPC test suites -# inside a docker container. - FROM debian:jessie -# Install Git. +# Install Git and basic packages. RUN apt-get update && apt-get install -y \ autoconf \ autotools-dev \ @@ -43,13 +40,16 @@ RUN apt-get update && apt-get install -y \ gcc \ gcc-multilib \ git \ + golang \ gyp \ + lcov \ libc6 \ libc6-dbg \ libc6-dev \ libgtest-dev \ libtool \ make \ + perl \ strace \ python-dev \ python-setuptools \ @@ -59,6 +59,14 @@ RUN apt-get update && apt-get install -y \ wget \ zip && apt-get clean +#================ +# Build profiling +RUN apt-get update && apt-get install -y time && apt-get clean + +#================= +# C++ dependencies +RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean + # Prepare ccache RUN ln -s /usr/bin/ccache /usr/local/bin/gcc RUN ln -s /usr/bin/ccache /usr/local/bin/g++ @@ -67,9 +75,12 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -################## -# C++ dependencies -RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang +#====================== +# Zookeeper dependencies +# TODO(jtattermusch): is zookeeper still needed? +RUN apt-get install -y libzookeeper-mt-dev + +RUN mkdir /var/local/jenkins # Define the default command. CMD ["bash"] diff --git a/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile index 370657b651f..252c9bc9286 100644 --- a/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_java/Dockerfile @@ -31,23 +31,23 @@ FROM debian:jessie # Install JDK 8 and Git # -# TODO(temiola): simplify this if/when a simpler process is available. -# RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections && \ echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee /etc/apt/sources.list.d/webupd8team-java.list && \ echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu trusty main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list && \ - apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 && \ - apt-get update && \ - apt-get -y install \ + apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 + +RUN apt-get update && apt-get -y install \ git \ libapr1 \ oracle-java8-installer \ && \ - apt-get clean && rm -r /var/cache/oracle-jdk8-installer/ + apt-get clean && rm -r /var/cache/oracle-jdk8-installer/ ENV JAVA_HOME /usr/lib/jvm/java-8-oracle ENV PATH $PATH:$JAVA_HOME/bin + + # Trigger download of as many Gradle artifacts as possible. RUN git clone --recursive --depth 1 https://github.com/grpc/grpc-java.git && \ cd grpc-java && \ diff --git a/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile index db5aff844de..64314f88642 100644 --- a/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile @@ -27,12 +27,9 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# A work-in-progress Dockerfile that allows running gRPC test suites -# inside a docker container. - FROM debian:jessie -# Install Git. +# Install Git and basic packages. RUN apt-get update && apt-get install -y \ autoconf \ autotools-dev \ @@ -43,14 +40,16 @@ RUN apt-get update && apt-get install -y \ gcc \ gcc-multilib \ git \ + golang \ gyp \ + lcov \ libc6 \ libc6-dbg \ libc6-dev \ libgtest-dev \ - libssl-dev \ libtool \ make \ + perl \ strace \ python-dev \ python-setuptools \ @@ -60,6 +59,18 @@ RUN apt-get update && apt-get install -y \ wget \ zip && apt-get clean +#================ +# Build profiling +RUN apt-get update && apt-get install -y time && apt-get clean + +#================== +# Node dependencies + +# Install nvm +RUN touch .profile +RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash +RUN /bin/bash -l -c "nvm install 0.12 && npm config set cache /tmp/npm-cache" + # Prepare ccache RUN ln -s /usr/bin/ccache /usr/local/bin/gcc RUN ln -s /usr/bin/ccache /usr/local/bin/g++ @@ -68,13 +79,12 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -################## -# Node dependencies +#====================== +# Zookeeper dependencies +# TODO(jtattermusch): is zookeeper still needed? +RUN apt-get install -y libzookeeper-mt-dev -# Install nvm -RUN touch .profile -RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash -RUN /bin/bash -l -c "nvm install 0.12" +RUN mkdir /var/local/jenkins # Define the default command. CMD ["bash"] diff --git a/tools/dockerfile/interoptest/grpc_interop_php/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_php/Dockerfile index cf3e79176a5..e27a6a23013 100644 --- a/tools/dockerfile/interoptest/grpc_interop_php/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_php/Dockerfile @@ -27,12 +27,9 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# A work-in-progress Dockerfile that allows running gRPC test suites -# inside a docker container. - FROM debian:jessie -# Install Git. +# Install Git and basic packages. RUN apt-get update && apt-get install -y \ autoconf \ autotools-dev \ @@ -43,13 +40,16 @@ RUN apt-get update && apt-get install -y \ gcc \ gcc-multilib \ git \ + golang \ gyp \ + lcov \ libc6 \ libc6-dbg \ libc6-dev \ libgtest-dev \ libtool \ make \ + perl \ strace \ python-dev \ python-setuptools \ @@ -59,15 +59,11 @@ RUN apt-get update && apt-get install -y \ wget \ zip && apt-get clean -# Prepare ccache -RUN ln -s /usr/bin/ccache /usr/local/bin/gcc -RUN ln -s /usr/bin/ccache /usr/local/bin/g++ -RUN ln -s /usr/bin/ccache /usr/local/bin/cc -RUN ln -s /usr/bin/ccache /usr/local/bin/c++ -RUN ln -s /usr/bin/ccache /usr/local/bin/clang -RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ +#================ +# Build profiling +RUN apt-get update && apt-get install -y time && apt-get clean -################## +#================== # Ruby dependencies # Install rvm @@ -82,14 +78,35 @@ RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc" RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc" -################## +#================= # PHP dependencies # Install dependencies +RUN /bin/bash -l -c "echo 'deb http://packages.dotdeb.org wheezy-php55 all' \ + >> /etc/apt/sources.list.d/dotdeb.list" +RUN /bin/bash -l -c "echo 'deb-src http://packages.dotdeb.org wheezy-php55 all' \ + >> /etc/apt/sources.list.d/dotdeb.list" +RUN wget http://www.dotdeb.org/dotdeb.gpg -O- | apt-key add - + RUN apt-get update && apt-get install -y \ git php5 php5-dev phpunit unzip +# Prepare ccache +RUN ln -s /usr/bin/ccache /usr/local/bin/gcc +RUN ln -s /usr/bin/ccache /usr/local/bin/g++ +RUN ln -s /usr/bin/ccache /usr/local/bin/cc +RUN ln -s /usr/bin/ccache /usr/local/bin/c++ +RUN ln -s /usr/bin/ccache /usr/local/bin/clang +RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ + +#====================== +# Zookeeper dependencies +# TODO(jtattermusch): is zookeeper still needed? +RUN apt-get install -y libzookeeper-mt-dev + +RUN mkdir /var/local/jenkins + # ronn: a ruby tool used to convert markdown to man pages, used during the # install of Protobuf extensions # diff --git a/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile index 047604b1b79..071fb2c93b1 100644 --- a/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile @@ -27,12 +27,9 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# A work-in-progress Dockerfile that allows running gRPC test suites -# inside a docker container. - FROM debian:jessie -# Install Git. +# Install Git and basic packages. RUN apt-get update && apt-get install -y \ autoconf \ autotools-dev \ @@ -43,17 +40,18 @@ RUN apt-get update && apt-get install -y \ gcc \ gcc-multilib \ git \ + golang \ gyp \ + lcov \ libc6 \ libc6-dbg \ libc6-dev \ libgtest-dev \ - libssl-dev \ libtool \ make \ + perl \ strace \ python-dev \ - python-pip \ python-setuptools \ python-yaml \ telnet \ @@ -61,6 +59,25 @@ RUN apt-get update && apt-get install -y \ wget \ zip && apt-get clean +#================ +# Build profiling +RUN apt-get update && apt-get install -y time && apt-get clean + +#==================== +# Python dependencies + +# Install dependencies + +RUN apt-get update && apt-get install -y \ + python-all-dev \ + python3-all-dev \ + python-pip + +# Install Python packages from PyPI +RUN pip install pip --upgrade +RUN pip install virtualenv +RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 tox + # Prepare ccache RUN ln -s /usr/bin/ccache /usr/local/bin/gcc RUN ln -s /usr/bin/ccache /usr/local/bin/g++ @@ -69,14 +86,12 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ +#====================== +# Zookeeper dependencies +# TODO(jtattermusch): is zookeeper still needed? +RUN apt-get install -y libzookeeper-mt-dev -##################### -# Python dependencies - -# Install Python requisites -RUN /bin/bash -l -c "pip install --upgrade pip" -RUN /bin/bash -l -c "pip install virtualenv" -RUN /bin/bash -l -c "pip install tox" +RUN mkdir /var/local/jenkins # Define the default command. CMD ["bash"] diff --git a/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile index ff201fa291e..df8eef54385 100644 --- a/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile @@ -27,12 +27,9 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# A work-in-progress Dockerfile that allows running gRPC test suites -# inside a docker container. - FROM debian:jessie -# Install Git. +# Install Git and basic packages. RUN apt-get update && apt-get install -y \ autoconf \ autotools-dev \ @@ -43,13 +40,16 @@ RUN apt-get update && apt-get install -y \ gcc \ gcc-multilib \ git \ + golang \ gyp \ + lcov \ libc6 \ libc6-dbg \ libc6-dev \ libgtest-dev \ libtool \ make \ + perl \ strace \ python-dev \ python-setuptools \ @@ -59,16 +59,11 @@ RUN apt-get update && apt-get install -y \ wget \ zip && apt-get clean -# Prepare ccache -RUN ln -s /usr/bin/ccache /usr/local/bin/gcc -RUN ln -s /usr/bin/ccache /usr/local/bin/g++ -RUN ln -s /usr/bin/ccache /usr/local/bin/cc -RUN ln -s /usr/bin/ccache /usr/local/bin/c++ -RUN ln -s /usr/bin/ccache /usr/local/bin/clang -RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ - +#================ +# Build profiling +RUN apt-get update && apt-get install -y time && apt-get clean -################## +#================== # Ruby dependencies # Install rvm @@ -83,5 +78,20 @@ RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc" RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc" +# Prepare ccache +RUN ln -s /usr/bin/ccache /usr/local/bin/gcc +RUN ln -s /usr/bin/ccache /usr/local/bin/g++ +RUN ln -s /usr/bin/ccache /usr/local/bin/cc +RUN ln -s /usr/bin/ccache /usr/local/bin/c++ +RUN ln -s /usr/bin/ccache /usr/local/bin/clang +RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ + +#====================== +# Zookeeper dependencies +# TODO(jtattermusch): is zookeeper still needed? +RUN apt-get install -y libzookeeper-mt-dev + +RUN mkdir /var/local/jenkins + # Define the default command. CMD ["bash"] diff --git a/tools/jenkins/build_interop_image.sh b/tools/jenkins/build_interop_image.sh index 26687a5a855..d2ba97c3de8 100755 --- a/tools/jenkins/build_interop_image.sh +++ b/tools/jenkins/build_interop_image.sh @@ -71,10 +71,10 @@ then fi # Use image name based on Dockerfile checksum -BASE_IMAGE=${BASE_NAME}_base:`sha1sum tools/dockerfile/$BASE_NAME/Dockerfile | cut -f1 -d\ ` +BASE_IMAGE=${BASE_NAME}_base:`sha1sum tools/dockerfile/interoptest/$BASE_NAME/Dockerfile | cut -f1 -d\ ` # Make sure base docker image has been built. Should be instantaneous if so. -docker build -t $BASE_IMAGE --force-rm=true tools/dockerfile/$BASE_NAME || exit $? +docker build -t $BASE_IMAGE --force-rm=true tools/dockerfile/interoptest/$BASE_NAME || exit $? # Create a local branch so the child Docker script won't complain git branch -f jenkins-docker @@ -92,7 +92,7 @@ CONTAINER_NAME="build_${BASE_NAME}_$(uuidgen)" -v /tmp/ccache:/tmp/ccache \ --name=$CONTAINER_NAME \ $BASE_IMAGE \ - bash -l /var/local/jenkins/grpc/tools/dockerfile/$BASE_NAME/build_interop.sh \ + bash -l /var/local/jenkins/grpc/tools/dockerfile/interoptest/$BASE_NAME/build_interop.sh \ && docker commit $CONTAINER_NAME $INTEROP_IMAGE \ && echo "Successfully built image $INTEROP_IMAGE") EXITCODE=$? From 6f6076659f4e35a903ffaf217db8e05175345977 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 27 Apr 2016 16:38:33 -0700 Subject: [PATCH 0118/1894] Load default roots.pem in Node via grpc_set_ssl_roots_override_callback --- src/node/ext/node_grpc.cc | 35 +++++++++++++++++++++++++++++++++++ src/node/index.js | 7 +++---- 2 files changed, 38 insertions(+), 4 deletions(-) diff --git a/src/node/ext/node_grpc.cc b/src/node/ext/node_grpc.cc index b988f29878b..6b6e42737b5 100644 --- a/src/node/ext/node_grpc.cc +++ b/src/node/ext/node_grpc.cc @@ -35,6 +35,8 @@ #include #include #include "grpc/grpc.h" +#include "grpc/grpc_security.h" +#include "grpc/support/alloc.h" #include "call.h" #include "call_credentials.h" @@ -51,6 +53,8 @@ using v8::Object; using v8::Uint32; using v8::String; +static char *pem_root_certs = NULL; + void InitStatusConstants(Local exports) { Nan::HandleScope scope; Local status = Nan::New(); @@ -268,9 +272,36 @@ NAN_METHOD(MetadataKeyIsBinary) { grpc_is_binary_header(key_str, static_cast(key->Length())))); } +static grpc_ssl_roots_override_result get_ssl_roots_override( + char **pem_root_certs_ptr) { + *pem_root_certs_ptr = pem_root_certs; + if (pem_root_certs == NULL) { + return GRPC_SSL_ROOTS_OVERRIDE_FAIL; + } else { + return GRPC_SSL_ROOTS_OVERRIDE_OK; + } +} + +/* This should only be called once, and only before creating any + *ServerCredentials */ +NAN_METHOD(SetDefaultRootsPem) { + if (!info[0]->IsString()) { + return Nan::ThrowTypeError( + "setDefaultRootsPem's argument must be a string"); + } + Nan::Utf8String utf8_roots(info[0]); + size_t length = static_cast(utf8_roots.length()); + if (length > 0) { + const char *data = *utf8_roots; + pem_root_certs = (char *)gpr_malloc((length + 1) * sizeof(char)); + memcpy(pem_root_certs, data, length + 1); + } +} + void init(Local exports) { Nan::HandleScope scope; grpc_init(); + grpc_set_ssl_roots_override_callback(get_ssl_roots_override); InitStatusConstants(exports); InitCallErrorConstants(exports); InitOpTypeConstants(exports); @@ -298,6 +329,10 @@ void init(Local exports) { Nan::GetFunction( Nan::New(MetadataKeyIsBinary) ).ToLocalChecked()); + Nan::Set(exports, Nan::New("setDefaultRootsPem").ToLocalChecked(), + Nan::GetFunction( + Nan::New(SetDefaultRootsPem) + ).ToLocalChecked()); } NODE_MODULE(grpc_node, init) diff --git a/src/node/index.js b/src/node/index.js index d345a5142d5..66664d94b5a 100644 --- a/src/node/index.js +++ b/src/node/index.js @@ -34,13 +34,10 @@ 'use strict'; var path = require('path'); +var fs = require('fs'); var SSL_ROOTS_PATH = path.resolve(__dirname, '..', '..', 'etc', 'roots.pem'); -if (!process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH) { - process.env.GRPC_DEFAULT_SSL_ROOTS_FILE_PATH = SSL_ROOTS_PATH; -} - var _ = require('lodash'); var ProtoBuf = require('protobufjs'); @@ -53,6 +50,8 @@ var Metadata = require('./src/metadata.js'); var grpc = require('./src/grpc_extension'); +grpc.setDefaultRootsPem(fs.readFileSync(SSL_ROOTS_PATH, 'ascii')); + /** * Load a gRPC object from an existing ProtoBuf.Reflect object. * @param {ProtoBuf.Reflect.Namespace} value The ProtoBuf object to load. From 1408920ab936104f539a020f7707a5aa6189231b Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 27 Apr 2016 17:55:27 -0700 Subject: [PATCH 0119/1894] get rid of local qpsworkers before starting the tests --- tools/run_tests/performance/kill_workers.sh | 51 +++++++++++++++++++ .../performance/remote_host_prepare.sh | 7 ++- tools/run_tests/run_performance_tests.py | 22 +++++--- 3 files changed, 70 insertions(+), 10 deletions(-) create mode 100755 tools/run_tests/performance/kill_workers.sh diff --git a/tools/run_tests/performance/kill_workers.sh b/tools/run_tests/performance/kill_workers.sh new file mode 100755 index 00000000000..3eae8c31cb6 --- /dev/null +++ b/tools/run_tests/performance/kill_workers.sh @@ -0,0 +1,51 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -ex + +cd $(dirname $0)/../../.. + +# Make sure there are no pre-existing QPS workers around before starting +# the performance test suite + +# C++ +killall -9 qps_worker || true + +# C# +ps -C mono -o pid=,cmd= | grep QpsWorker | awk '{print $1}' | xargs kill -9 + +# Ruby +ps -C ruby -o pid=,cmd= | grep 'qps/worker.rb' | awk '{print $1}' | xargs kill -9 + +# Node +ps -C node -o pid=,cmd= | grep 'performance/worker.js' | awk '{print $1}' | xargs kill -9 + +# Java +jps | grep LoadWorker | awk '{print $1}' | xargs kill -9 diff --git a/tools/run_tests/performance/remote_host_prepare.sh b/tools/run_tests/performance/remote_host_prepare.sh index 17cfa1a5998..d7f539a74e8 100755 --- a/tools/run_tests/performance/remote_host_prepare.sh +++ b/tools/run_tests/performance/remote_host_prepare.sh @@ -41,10 +41,9 @@ ssh "${USER_AT_HOST}" "rm -rf ~/performance_workspace && mkdir -p ~/performance_ # could also kill jenkins. ssh "${USER_AT_HOST}" "killall -9 qps_worker mono node ruby || true" -# Kill all java LoadWorker processes. We can't just killall java -# as one of the processes might be jenkins. -ssh "${USER_AT_HOST}" 'kill -9 $(jps | grep LoadWorker | cut -f1 -d" ") || true' - # push the current sources to the slave and unpack it. scp ../grpc.tar "${USER_AT_HOST}:~/performance_workspace" ssh "${USER_AT_HOST}" "tar -xf ~/performance_workspace/grpc.tar -C ~/performance_workspace" + +# For consistency with local run, invoke the kill_workers script remotely. +ssh "${USER_AT_HOST}" "~/performance_workspace/grpc/tools/run_tests/performance/kill_workers.sh" diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py index ada341abf54..fb3b0a1afdf 100755 --- a/tools/run_tests/run_performance_tests.py +++ b/tools/run_tests/run_performance_tests.py @@ -157,8 +157,9 @@ def archive_repo(languages): sys.exit(1) -def prepare_remote_hosts(hosts): - """Prepares remote hosts.""" +def prepare_remote_hosts(hosts, prepare_local=False): + """Prepares remote hosts (and maybe prepare localhost as well).""" + prepare_timeout = 5*60 prepare_jobs = [] for host in hosts: user_at_host = '%s@%s' % (_REMOTE_HOST_USERNAME, host) @@ -167,13 +168,20 @@ def prepare_remote_hosts(hosts): cmdline=['tools/run_tests/performance/remote_host_prepare.sh'], shortname='remote_host_prepare.%s' % host, environ = {'USER_AT_HOST': user_at_host}, - timeout_seconds=5*60)) - jobset.message('START', 'Preparing remote hosts.', do_newline=True) + timeout_seconds=prepare_timeout)) + if prepare_local: + # Prepare localhost as well + prepare_jobs.append( + jobset.JobSpec( + cmdline=['tools/run_tests/performance/kill_workers.sh'], + shortname='local_prepare', + timeout_seconds=prepare_timeout)) + jobset.message('START', 'Preparing hosts.', do_newline=True) num_failures, _ = jobset.run( prepare_jobs, newline_on_success=True, maxjobs=10) if num_failures == 0: jobset.message('SUCCESS', - 'Remote hosts ready to start build.', + 'Prepare step completed successfully.', do_newline=True) else: jobset.message('FAILED', 'Failed to prepare remote hosts.', @@ -322,7 +330,9 @@ if args.remote_driver_host: if remote_hosts: archive_repo(languages=[str(l) for l in languages]) - prepare_remote_hosts(remote_hosts) + prepare_remote_hosts(remote_hosts, prepare_local=True) +else: + prepare_remote_hosts([], prepare_local=True) build_local = False if not args.remote_driver_host: From 267684ca06f7f032bdcdfdfd4edd66af7a662800 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 27 Apr 2016 18:32:04 -0700 Subject: [PATCH 0120/1894] Tiny fix to check_include_guards script --- tools/distrib/check_include_guards.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/distrib/check_include_guards.py b/tools/distrib/check_include_guards.py index 897a899e7ed..890c75fbd86 100755 --- a/tools/distrib/check_include_guards.py +++ b/tools/distrib/check_include_guards.py @@ -97,6 +97,7 @@ class GuardValidator(object): match = self.ifndef_re.search(fcontents) if not match: print 'something drastically wrong with: %s' % fpath + return False # failed if match.lastindex is None: # No ifndef. Request manual addition with hints self.fail(fpath, match.re, match.string, '', '', False) From d312a0b866b0223bf9d5a2c88530a5cd7005c990 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 27 Apr 2016 18:40:50 -0700 Subject: [PATCH 0121/1894] Smarter pollset/pollset_set propagation For some definition of "smart"... client_channel simply passes along pollset/pollset_set, removing the need to instantiate a pollset_set in the subchannel_call_holder: it's now up to the LB policies to handle the pollset/pollset_set. --- BUILD | 6 ++ Makefile | 2 + binding.gyp | 1 + build.yaml | 10 +++ config.m4 | 2 + gRPC.podspec | 3 + grpc.gemspec | 2 + package.xml | 2 + src/core/ext/client_config/client_channel.c | 18 +++--- src/core/ext/client_config/lb_policy.c | 6 +- src/core/ext/client_config/lb_policy.h | 5 +- .../client_config/subchannel_call_holder.c | 3 +- src/core/ext/lb_policy/common.c | 62 +++++++++++++++++++ src/core/ext/lb_policy/common.h | 48 ++++++++++++++ .../ext/lb_policy/pick_first/pick_first.c | 34 ++++++---- .../ext/lb_policy/round_robin/round_robin.c | 29 +++++---- src/python/grpcio/grpc_core_dependencies.py | 1 + tools/doxygen/Doxyfile.core.internal | 2 + tools/run_tests/sources_and_headers.json | 24 ++++++- vsprojects/vcxproj/grpc/grpc.vcxproj | 3 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 6 ++ .../grpc_unsecure/grpc_unsecure.vcxproj | 3 + .../grpc_unsecure.vcxproj.filters | 6 ++ 23 files changed, 235 insertions(+), 43 deletions(-) create mode 100644 src/core/ext/lb_policy/common.c create mode 100644 src/core/ext/lb_policy/common.h diff --git a/BUILD b/BUILD index f8e7661ad46..f372fa79750 100644 --- a/BUILD +++ b/BUILD @@ -285,6 +285,7 @@ cc_library( "src/core/ext/client_config/uri_parser.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/ext/lb_policy/common.h", "src/core/ext/census/aggregation.h", "src/core/ext/census/census_interface.h", "src/core/ext/census/census_rpc_stats.h", @@ -439,6 +440,7 @@ cc_library( "src/core/ext/transport/chttp2/client/insecure/channel_create.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c", + "src/core/ext/lb_policy/common.c", "src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/round_robin/round_robin.c", "src/core/ext/resolver/dns/native/dns_resolver.c", @@ -616,6 +618,7 @@ cc_library( "src/core/ext/client_config/uri_parser.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/ext/lb_policy/common.h", "src/core/ext/census/aggregation.h", "src/core/ext/census/census_interface.h", "src/core/ext/census/census_rpc_stats.h", @@ -752,6 +755,7 @@ cc_library( "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c", + "src/core/ext/lb_policy/common.c", "src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/round_robin/round_robin.c", "src/core/ext/census/context.c", @@ -1451,6 +1455,7 @@ objc_library( "src/core/ext/transport/chttp2/client/insecure/channel_create.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c", + "src/core/ext/lb_policy/common.c", "src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/round_robin/round_robin.c", "src/core/ext/resolver/dns/native/dns_resolver.c", @@ -1621,6 +1626,7 @@ objc_library( "src/core/ext/client_config/uri_parser.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/ext/lb_policy/common.h", "src/core/ext/census/aggregation.h", "src/core/ext/census/census_interface.h", "src/core/ext/census/census_rpc_stats.h", diff --git a/Makefile b/Makefile index 12022c2dd95..e8a98e71e57 100644 --- a/Makefile +++ b/Makefile @@ -2601,6 +2601,7 @@ LIBGRPC_SRC = \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ + src/core/ext/lb_policy/common.c \ src/core/ext/lb_policy/pick_first/pick_first.c \ src/core/ext/lb_policy/round_robin/round_robin.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ @@ -2921,6 +2922,7 @@ LIBGRPC_UNSECURE_SRC = \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ + src/core/ext/lb_policy/common.c \ src/core/ext/lb_policy/pick_first/pick_first.c \ src/core/ext/lb_policy/round_robin/round_robin.c \ src/core/ext/census/context.c \ diff --git a/binding.gyp b/binding.gyp index 058743edbf8..95539e2a472 100644 --- a/binding.gyp +++ b/binding.gyp @@ -712,6 +712,7 @@ 'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c', + 'src/core/ext/lb_policy/common.c', 'src/core/ext/lb_policy/pick_first/pick_first.c', 'src/core/ext/lb_policy/round_robin/round_robin.c', 'src/core/ext/resolver/dns/native/dns_resolver.c', diff --git a/build.yaml b/build.yaml index 26308e8db5d..dddbdcfbfc8 100644 --- a/build.yaml +++ b/build.yaml @@ -356,6 +356,13 @@ filegroups: - include/grpc/impl/codegen/status.h uses: - gpr_codegen +- name: grpc_lb_policy_common + headers: + - src/core/ext/lb_policy/common.h + src: + - src/core/ext/lb_policy/common.c + uses: + - grpc_base - name: grpc_lb_policy_grpclb headers: - src/core/ext/lb_policy/grpclb/load_balancer_api.h @@ -367,6 +374,7 @@ filegroups: - grpc_base - grpc_client_config - nanopb + - grpc_lb_policy_common - name: grpc_lb_policy_pick_first src: - src/core/ext/lb_policy/pick_first/pick_first.c @@ -374,6 +382,7 @@ filegroups: uses: - grpc_base - grpc_client_config + - grpc_lb_policy_common - name: grpc_lb_policy_round_robin src: - src/core/ext/lb_policy/round_robin/round_robin.c @@ -381,6 +390,7 @@ filegroups: uses: - grpc_base - grpc_client_config + - grpc_lb_policy_common - name: grpc_resolver_dns_native src: - src/core/ext/resolver/dns/native/dns_resolver.c diff --git a/config.m4 b/config.m4 index 2d930a648e1..c4ff5dd1fa4 100644 --- a/config.m4 +++ b/config.m4 @@ -231,6 +231,7 @@ if test "$PHP_GRPC" != "no"; then third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ + src/core/ext/lb_policy/common.c \ src/core/ext/lb_policy/pick_first/pick_first.c \ src/core/ext/lb_policy/round_robin/round_robin.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ @@ -552,6 +553,7 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/boringssl) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/census) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/client_config) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/grpclb) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/pick_first) diff --git a/gRPC.podspec b/gRPC.podspec index d66e03354bb..b2c7d52cf4a 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -291,6 +291,7 @@ Pod::Spec.new do |s| 'third_party/nanopb/pb_common.h', 'third_party/nanopb/pb_decode.h', 'third_party/nanopb/pb_encode.h', + 'src/core/ext/lb_policy/common.h', 'src/core/ext/census/aggregation.h', 'src/core/ext/census/census_interface.h', 'src/core/ext/census/census_rpc_stats.h', @@ -476,6 +477,7 @@ Pod::Spec.new do |s| 'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c', + 'src/core/ext/lb_policy/common.c', 'src/core/ext/lb_policy/pick_first/pick_first.c', 'src/core/ext/lb_policy/round_robin/round_robin.c', 'src/core/ext/resolver/dns/native/dns_resolver.c', @@ -633,6 +635,7 @@ Pod::Spec.new do |s| 'third_party/nanopb/pb_common.h', 'third_party/nanopb/pb_decode.h', 'third_party/nanopb/pb_encode.h', + 'src/core/ext/lb_policy/common.h', 'src/core/ext/census/aggregation.h', 'src/core/ext/census/census_interface.h', 'src/core/ext/census/census_rpc_stats.h', diff --git a/grpc.gemspec b/grpc.gemspec index f83b7d35872..4a44d1a7a43 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -303,6 +303,7 @@ Gem::Specification.new do |s| s.files += %w( third_party/nanopb/pb_common.h ) s.files += %w( third_party/nanopb/pb_decode.h ) s.files += %w( third_party/nanopb/pb_encode.h ) + s.files += %w( src/core/ext/lb_policy/common.h ) s.files += %w( src/core/ext/census/aggregation.h ) s.files += %w( src/core/ext/census/census_interface.h ) s.files += %w( src/core/ext/census/census_rpc_stats.h ) @@ -460,6 +461,7 @@ Gem::Specification.new do |s| s.files += %w( third_party/nanopb/pb_common.c ) s.files += %w( third_party/nanopb/pb_decode.c ) s.files += %w( third_party/nanopb/pb_encode.c ) + s.files += %w( src/core/ext/lb_policy/common.c ) s.files += %w( src/core/ext/lb_policy/pick_first/pick_first.c ) s.files += %w( src/core/ext/lb_policy/round_robin/round_robin.c ) s.files += %w( src/core/ext/resolver/dns/native/dns_resolver.c ) diff --git a/package.xml b/package.xml index d192ebde2cc..dbfe8289f1b 100644 --- a/package.xml +++ b/package.xml @@ -306,6 +306,7 @@ + @@ -463,6 +464,7 @@ + diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index 87abfea5ff3..68a203820bf 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -368,9 +368,11 @@ static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *elemp, int r; GRPC_LB_POLICY_REF(lb_policy, "cc_pick_subchannel"); gpr_mu_unlock(&chand->mu_config); - r = grpc_lb_policy_pick(exec_ctx, lb_policy, calld->pollset_set, - initial_metadata, initial_metadata_flags, - connected_subchannel, on_ready); + GPR_ASSERT((calld->pollset != NULL) + (calld->pollset_set != NULL) == 1); + r = grpc_lb_policy_pick(exec_ctx, lb_policy, calld->pollset, + calld->pollset_set, initial_metadata, + initial_metadata_flags, connected_subchannel, + on_ready); GRPC_LB_POLICY_UNREF(exec_ctx, lb_policy, "cc_pick_subchannel"); return r; } @@ -453,14 +455,8 @@ static void cc_set_pollset_or_pollset_set( GPR_ASSERT(pollset != NULL || pollset_set_alternative != NULL); call_data *calld = elem->call_data; - if (pollset != NULL) { - calld->pollset = pollset; - grpc_pollset_set_add_pollset(exec_ctx, calld->pollset_set, pollset); - } else if (pollset_set_alternative != NULL) { - calld->pollset = NULL; - grpc_pollset_set_add_pollset_set(exec_ctx, calld->pollset_set, - pollset_set_alternative); - } + calld->pollset = pollset; + calld->pollset_set = pollset_set_alternative; } const grpc_channel_filter grpc_client_channel_filter = { diff --git a/src/core/ext/client_config/lb_policy.c b/src/core/ext/client_config/lb_policy.c index 1e4e0077e60..96342c7c7d8 100644 --- a/src/core/ext/client_config/lb_policy.c +++ b/src/core/ext/client_config/lb_policy.c @@ -99,12 +99,14 @@ void grpc_lb_policy_weak_unref(grpc_exec_ctx *exec_ctx, } int grpc_lb_policy_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, - grpc_pollset_set *pollset_set, + grpc_pollset *pollset, + grpc_pollset_set *pollset_set_alternative, grpc_metadata_batch *initial_metadata, uint32_t initial_metadata_flags, grpc_connected_subchannel **target, grpc_closure *on_complete) { - return policy->vtable->pick(exec_ctx, policy, pollset_set, initial_metadata, + return policy->vtable->pick(exec_ctx, policy, pollset, + pollset_set_alternative, initial_metadata, initial_metadata_flags, target, on_complete); } diff --git a/src/core/ext/client_config/lb_policy.h b/src/core/ext/client_config/lb_policy.h index d5c578836b9..e9bb1850e79 100644 --- a/src/core/ext/client_config/lb_policy.h +++ b/src/core/ext/client_config/lb_policy.h @@ -59,7 +59,7 @@ struct grpc_lb_policy_vtable { /** implement grpc_lb_policy_pick */ int (*pick)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, - grpc_pollset_set *pollset_set, + grpc_pollset *pollset, grpc_pollset_set *pollset_set_alternative, grpc_metadata_batch *initial_metadata, uint32_t initial_metadata_flags, grpc_connected_subchannel **target, grpc_closure *on_complete); @@ -125,7 +125,8 @@ void grpc_lb_policy_init(grpc_lb_policy *policy, \a target. Picking can be asynchronous. Any IO should be done under \a pollset. */ int grpc_lb_policy_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, - grpc_pollset_set *pollset_set, + grpc_pollset *pollset, + grpc_pollset_set *pollset_set_alternative, grpc_metadata_batch *initial_metadata, uint32_t initial_metadata_flags, grpc_connected_subchannel **target, diff --git a/src/core/ext/client_config/subchannel_call_holder.c b/src/core/ext/client_config/subchannel_call_holder.c index c6f4b8f373c..e07dd1a6212 100644 --- a/src/core/ext/client_config/subchannel_call_holder.c +++ b/src/core/ext/client_config/subchannel_call_holder.c @@ -68,7 +68,7 @@ void grpc_subchannel_call_holder_init( holder->waiting_ops_capacity = 0; holder->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING; holder->owning_call = owning_call; - holder->pollset_set = grpc_pollset_set_create(); + holder->pollset_set = NULL; } void grpc_subchannel_call_holder_destroy(grpc_exec_ctx *exec_ctx, @@ -82,7 +82,6 @@ void grpc_subchannel_call_holder_destroy(grpc_exec_ctx *exec_ctx, gpr_mu_destroy(&holder->mu); GPR_ASSERT(holder->waiting_ops_count == 0); gpr_free(holder->waiting_ops); - grpc_pollset_set_destroy(holder->pollset_set); } void grpc_subchannel_call_holder_perform_op(grpc_exec_ctx *exec_ctx, diff --git a/src/core/ext/lb_policy/common.c b/src/core/ext/lb_policy/common.c new file mode 100644 index 00000000000..bfb6aace877 --- /dev/null +++ b/src/core/ext/lb_policy/common.c @@ -0,0 +1,62 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#include "src/core/ext/lb_policy/common.h" + +void add_pollset_or_pollset_set_alternative( + grpc_exec_ctx *exec_ctx, grpc_pollset_set *interested_parties, + grpc_pollset *pollset, grpc_pollset_set *pollset_set_alternative) { + if (pollset != NULL) { + GPR_ASSERT(pollset_set_alternative == NULL); + grpc_pollset_set_add_pollset(exec_ctx, interested_parties, pollset); + } else { + GPR_ASSERT(pollset_set_alternative != NULL); + grpc_pollset_set_add_pollset_set(exec_ctx, interested_parties, + pollset_set_alternative); + } +} + +void del_pollset_or_pollset_set_alternative( + grpc_exec_ctx *exec_ctx, grpc_pollset_set *interested_parties, + grpc_pollset *pollset, grpc_pollset_set *pollset_set_alternative) { + if (pollset != NULL) { + GPR_ASSERT(pollset_set_alternative == NULL); + grpc_pollset_set_del_pollset(exec_ctx, interested_parties, pollset); + } else { + GPR_ASSERT(pollset_set_alternative != NULL); + grpc_pollset_set_del_pollset_set(exec_ctx, interested_parties, + pollset_set_alternative); + } +} diff --git a/src/core/ext/lb_policy/common.h b/src/core/ext/lb_policy/common.h new file mode 100644 index 00000000000..1ace967328d --- /dev/null +++ b/src/core/ext/lb_policy/common.h @@ -0,0 +1,48 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_EXT_LB_POLICY_COMMON_H +#define GRPC_CORE_EXT_LB_POLICY_COMMON_H + +#include "src/core/lib/iomgr/pollset.h" +#include "src/core/lib/iomgr/pollset_set.h" + +void add_pollset_or_pollset_set_alternative( + grpc_exec_ctx *exec_ctx, grpc_pollset_set *interested_parties, + grpc_pollset *pollset, grpc_pollset_set *pollset_set_alternative); + +void del_pollset_or_pollset_set_alternative( + grpc_exec_ctx *exec_ctx, grpc_pollset_set *interested_parties, + grpc_pollset *pollset, grpc_pollset_set *pollset_set_alternative); + +#endif /* GRPC_CORE_EXT_LB_POLICY_COMMON_H */ diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c index 0ffa003946d..f6613298be8 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -35,11 +35,13 @@ #include #include "src/core/ext/client_config/lb_policy_registry.h" +#include "src/core/ext/lb_policy/common.h" #include "src/core/lib/transport/connectivity_state.h" typedef struct pending_pick { struct pending_pick *next; - grpc_pollset_set *pollset_set; + grpc_pollset *pollset; + grpc_pollset_set *pollset_set_alternative; uint32_t initial_metadata_flags; grpc_connected_subchannel **target; grpc_closure *on_complete; @@ -118,8 +120,9 @@ static void pf_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { while (pp != NULL) { pending_pick *next = pp->next; *pp->target = NULL; - grpc_pollset_set_del_pollset_set(exec_ctx, p->base.interested_parties, - pp->pollset_set); + del_pollset_or_pollset_set_alternative(exec_ctx, p->base.interested_parties, + pp->pollset, + pp->pollset_set_alternative); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); gpr_free(pp); pp = next; @@ -136,8 +139,9 @@ static void pf_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, while (pp != NULL) { pending_pick *next = pp->next; if (pp->target == target) { - grpc_pollset_set_del_pollset_set(exec_ctx, p->base.interested_parties, - pp->pollset_set); + del_pollset_or_pollset_set_alternative( + exec_ctx, p->base.interested_parties, pp->pollset, + pp->pollset_set_alternative); *target = NULL; grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); gpr_free(pp); @@ -162,8 +166,9 @@ static void pf_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, pending_pick *next = pp->next; if ((pp->initial_metadata_flags & initial_metadata_flags_mask) == initial_metadata_flags_eq) { - grpc_pollset_set_del_pollset_set(exec_ctx, p->base.interested_parties, - pp->pollset_set); + del_pollset_or_pollset_set_alternative( + exec_ctx, p->base.interested_parties, pp->pollset, + pp->pollset_set_alternative); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); gpr_free(pp); } else { @@ -196,7 +201,8 @@ static void pf_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { } static int pf_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, - grpc_pollset_set *pollset_set, + grpc_pollset *pollset, + grpc_pollset_set *pollset_set_alternative, grpc_metadata_batch *initial_metadata, uint32_t initial_metadata_flags, grpc_connected_subchannel **target, @@ -222,11 +228,12 @@ static int pf_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, if (!p->started_picking) { start_picking(exec_ctx, p); } - grpc_pollset_set_add_pollset_set(exec_ctx, p->base.interested_parties, - pollset_set); + add_pollset_or_pollset_set_alternative(exec_ctx, p->base.interested_parties, + pollset, pollset_set_alternative); pp = gpr_malloc(sizeof(*pp)); pp->next = p->pending_picks; - pp->pollset_set = pollset_set; + pp->pollset = pollset; + pp->pollset_set_alternative = pollset_set_alternative; pp->target = target; pp->initial_metadata_flags = initial_metadata_flags; pp->on_complete = on_complete; @@ -306,8 +313,9 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, while ((pp = p->pending_picks)) { p->pending_picks = pp->next; *pp->target = selected; - grpc_pollset_set_del_pollset_set(exec_ctx, p->base.interested_parties, - pp->pollset_set); + del_pollset_or_pollset_set_alternative( + exec_ctx, p->base.interested_parties, pp->pollset, + pp->pollset_set_alternative); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); gpr_free(pp); } diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index 78ac61923f9..f4e3d60a839 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -36,6 +36,7 @@ #include #include "src/core/ext/client_config/lb_policy_registry.h" +#include "src/core/ext/lb_policy/common.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/transport/connectivity_state.h" @@ -48,7 +49,8 @@ int grpc_lb_round_robin_trace = 0; * Once a pick is available, \a target is updated and \a on_complete called. */ typedef struct pending_pick { struct pending_pick *next; - grpc_pollset_set *pollset_set; + grpc_pollset *pollset; + grpc_pollset_set *pollset_set_alternative; uint32_t initial_metadata_flags; grpc_connected_subchannel **target; grpc_closure *on_complete; @@ -262,8 +264,9 @@ static void rr_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, while (pp != NULL) { pending_pick *next = pp->next; if (pp->target == target) { - grpc_pollset_set_del_pollset_set(exec_ctx, p->base.interested_parties, - pp->pollset_set); + del_pollset_or_pollset_set_alternative( + exec_ctx, p->base.interested_parties, pp->pollset, + pp->pollset_set_alternative); *target = NULL; grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); gpr_free(pp); @@ -288,8 +291,9 @@ static void rr_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, pending_pick *next = pp->next; if ((pp->initial_metadata_flags & initial_metadata_flags_mask) == initial_metadata_flags_eq) { - grpc_pollset_set_del_pollset_set(exec_ctx, p->base.interested_parties, - pp->pollset_set); + del_pollset_or_pollset_set_alternative( + exec_ctx, p->base.interested_parties, pp->pollset, + pp->pollset_set_alternative); *pp->target = NULL; grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); gpr_free(pp); @@ -329,7 +333,8 @@ static void rr_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { } static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, - grpc_pollset_set *pollset_set, + grpc_pollset *pollset, + grpc_pollset_set *pollset_set_alternative, grpc_metadata_batch *initial_metadata, uint32_t initial_metadata_flags, grpc_connected_subchannel **target, @@ -353,11 +358,12 @@ static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, if (!p->started_picking) { start_picking(exec_ctx, p); } - grpc_pollset_set_add_pollset_set(exec_ctx, p->base.interested_parties, - pollset_set); + add_pollset_or_pollset_set_alternative(exec_ctx, p->base.interested_parties, + pollset, pollset_set_alternative); pp = gpr_malloc(sizeof(*pp)); pp->next = p->pending_picks; - pp->pollset_set = pollset_set; + pp->pollset = pollset; + pp->pollset_set_alternative = pollset_set_alternative; pp->target = target; pp->on_complete = on_complete; pp->initial_metadata_flags = initial_metadata_flags; @@ -406,8 +412,9 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, "[RR CONN CHANGED] TARGET <-- SUBCHANNEL %p (NODE %p)", selected->subchannel, selected); } - grpc_pollset_set_del_pollset_set(exec_ctx, p->base.interested_parties, - pp->pollset_set); + del_pollset_or_pollset_set_alternative( + exec_ctx, p->base.interested_parties, pp->pollset, + pp->pollset_set_alternative); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); gpr_free(pp); } diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index c5a0a398b43..90948efa555 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -225,6 +225,7 @@ CORE_SOURCE_FILES = [ 'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c', + 'src/core/ext/lb_policy/common.c', 'src/core/ext/lb_policy/pick_first/pick_first.c', 'src/core/ext/lb_policy/round_robin/round_robin.c', 'src/core/ext/resolver/dns/native/dns_resolver.c', diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 3a774a70d6b..1de79858f59 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -918,6 +918,7 @@ third_party/nanopb/pb.h \ third_party/nanopb/pb_common.h \ third_party/nanopb/pb_decode.h \ third_party/nanopb/pb_encode.h \ +src/core/ext/lb_policy/common.h \ src/core/ext/census/aggregation.h \ src/core/ext/census/census_interface.h \ src/core/ext/census/census_rpc_stats.h \ @@ -1075,6 +1076,7 @@ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ +src/core/ext/lb_policy/common.c \ src/core/ext/lb_policy/pick_first/pick_first.c \ src/core/ext/lb_policy/round_robin/round_robin.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 38e68f3b1a1..8a8bf39dc2a 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5851,11 +5851,29 @@ "third_party": false, "type": "filegroup" }, + { + "deps": [ + "gpr", + "grpc_base" + ], + "headers": [ + "src/core/ext/lb_policy/common.h" + ], + "language": "c", + "name": "grpc_lb_policy_common", + "src": [ + "src/core/ext/lb_policy/common.c", + "src/core/ext/lb_policy/common.h" + ], + "third_party": false, + "type": "filegroup" + }, { "deps": [ "gpr", "grpc_base", "grpc_client_config", + "grpc_lb_policy_common", "nanopb" ], "headers": [ @@ -5877,7 +5895,8 @@ "deps": [ "gpr", "grpc_base", - "grpc_client_config" + "grpc_client_config", + "grpc_lb_policy_common" ], "headers": [], "language": "c", @@ -5892,7 +5911,8 @@ "deps": [ "gpr", "grpc_base", - "grpc_client_config" + "grpc_client_config", + "grpc_lb_policy_common" ], "headers": [], "language": "c", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 4eec05a3b1f..9eaad77ac7d 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -427,6 +427,7 @@ + @@ -737,6 +738,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 17c88c4805e..0a61853f297 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -454,6 +454,9 @@ third_party\nanopb + + src\core\ext\lb_policy + src\core\ext\lb_policy\pick_first @@ -974,6 +977,9 @@ third_party\nanopb + + src\core\ext\lb_policy + src\core\ext\census diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 26050dcf74e..01214556ce9 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -402,6 +402,7 @@ + @@ -676,6 +677,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index a4acf513bc1..e2de5acd037 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -400,6 +400,9 @@ third_party\nanopb + + src\core\ext\lb_policy + src\core\ext\lb_policy\pick_first @@ -866,6 +869,9 @@ third_party\nanopb + + src\core\ext\lb_policy + src\core\ext\census From 832ae81b21025c415fc183b1aa18e063c44180a3 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Wed, 27 Apr 2016 18:38:54 -0700 Subject: [PATCH 0122/1894] Allow additive changes to protos w/o forcing user implementation --- src/compiler/python_generator.cc | 10 ++--- .../protoc_plugin/beta_python_plugin_test.py | 41 +++++++++++++++++++ 2 files changed, 46 insertions(+), 5 deletions(-) diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc index 02c032800b1..59137e1c923 100644 --- a/src/compiler/python_generator.cc +++ b/src/compiler/python_generator.cc @@ -190,7 +190,7 @@ bool PrintBetaServicer(const ServiceDescriptor* service, "Documentation", doc, }); out->Print("\n"); - out->Print(dict, "class Beta$Service$Servicer(six.with_metaclass(abc.ABCMeta, object)):\n"); + out->Print(dict, "class Beta$Service$Servicer(object):\n"); { IndentScope raii_class_indent(out); out->Print(dict, "\"\"\"$Documentation$\"\"\"\n"); @@ -198,12 +198,11 @@ bool PrintBetaServicer(const ServiceDescriptor* service, auto meth = service->method(i); grpc::string arg_name = meth->client_streaming() ? "request_iterator" : "request"; - out->Print("@abc.abstractmethod\n"); out->Print("def $Method$(self, $ArgName$, context):\n", "Method", meth->name(), "ArgName", arg_name); { IndentScope raii_method_indent(out); - out->Print("raise NotImplementedError()\n"); + out->Print("context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)\n"); } } } @@ -218,7 +217,7 @@ bool PrintBetaStub(const ServiceDescriptor* service, "Documentation", doc, }); out->Print("\n"); - out->Print(dict, "class Beta$Service$Stub(six.with_metaclass(abc.ABCMeta, object)):\n"); + out->Print(dict, "class Beta$Service$Stub(object):\n"); { IndentScope raii_class_indent(out); out->Print(dict, "\"\"\"$Documentation$\"\"\"\n"); @@ -227,7 +226,6 @@ bool PrintBetaStub(const ServiceDescriptor* service, grpc::string arg_name = meth->client_streaming() ? "request_iterator" : "request"; auto methdict = ListToDict({"Method", meth->name(), "ArgName", arg_name}); - out->Print("@abc.abstractmethod\n"); out->Print(methdict, "def $Method$(self, $ArgName$, timeout):\n"); { IndentScope raii_method_indent(out); @@ -450,6 +448,8 @@ bool PrintPreamble(const FileDescriptor* file, out->Print("import six\n"); out->Print("from $Package$ import implementations as beta_implementations\n", "Package", config.beta_package_root); + out->Print("from $Package$ import interfaces as beta_interfaces\n", + "Package", config.beta_package_root); out->Print("from grpc.framework.common import cardinality\n"); out->Print("from grpc.framework.interfaces.face import utilities as face_utilities\n"); return true; diff --git a/src/python/grpcio/tests/protoc_plugin/beta_python_plugin_test.py b/src/python/grpcio/tests/protoc_plugin/beta_python_plugin_test.py index 6fba3d4271b..3dc3042e38b 100644 --- a/src/python/grpcio/tests/protoc_plugin/beta_python_plugin_test.py +++ b/src/python/grpcio/tests/protoc_plugin/beta_python_plugin_test.py @@ -45,6 +45,7 @@ import unittest from six import moves from grpc.beta import implementations +from grpc.beta import interfaces from grpc.framework.foundation import future from grpc.framework.interfaces.face import face from tests.unit.framework.common import test_constants @@ -178,6 +179,36 @@ def _CreateService(test_pb2): server.stop(0) +@contextlib.contextmanager +def _CreateIncompleteService(test_pb2): + """Provides a servicer backend that fails to implement methods and its stub. + + The servicer is just the implementation of the actual servicer passed to the + face player of the python RPC implementation; the two are detached. + + Args: + test_pb2: The test_pb2 module generated by this test. + + Yields: + A (servicer_methods, stub) pair where servicer_methods is the back-end of + the service bound to the stub and and stub is the stub on which to invoke + RPCs. + """ + servicer_methods = _ServicerMethods(test_pb2) + + class Servicer(getattr(test_pb2, SERVICER_IDENTIFIER)): + pass + + servicer = Servicer() + server = getattr(test_pb2, SERVER_FACTORY_IDENTIFIER)(servicer) + port = server.add_insecure_port('[::]:0') + server.start() + channel = implementations.insecure_channel('localhost', port) + stub = getattr(test_pb2, STUB_FACTORY_IDENTIFIER)(channel) + yield servicer_methods, stub + server.stop(0) + + def _streaming_input_request_iterator(test_pb2): for _ in range(3): request = test_pb2.StreamingInputCallRequest() @@ -264,6 +295,16 @@ class PythonPluginTest(unittest.TestCase): with _CreateService(test_pb2) as (servicer, stub): request = test_pb2.SimpleRequest(response_size=13) + def testIncompleteServicer(self): + import protoc_plugin_test_pb2 as test_pb2 + moves.reload_module(test_pb2) + with _CreateIncompleteService(test_pb2) as (servicer, stub): + request = test_pb2.SimpleRequest(response_size=13) + try: + response = stub.UnaryCall(request, test_constants.LONG_TIMEOUT) + except face.AbortionError as error: + self.assertEqual(interfaces.StatusCode.UNIMPLEMENTED, error.code) + def testUnaryCall(self): import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top moves.reload_module(test_pb2) From cab9470ee82ae411558f279c64d296e364237ab8 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Thu, 28 Apr 2016 01:59:36 +0000 Subject: [PATCH 0123/1894] Remove Python alpha/early_adopter implementation This code has been unsupported for more than six months. --- src/python/grpcio/grpc/_adapter/fore.py | 363 ---------- src/python/grpcio/grpc/_adapter/rear.py | 395 ----------- .../grpcio/grpc/early_adopter/__init__.py | 35 - .../grpc/early_adopter/implementations.py | 262 -------- .../grpcio/grpc/framework/alpha/__init__.py | 35 - .../grpc/framework/alpha/_face_utilities.py | 183 ----- .../grpcio/grpc/framework/alpha/_reexport.py | 205 ------ .../grpcio/grpc/framework/alpha/exceptions.py | 47 -- .../grpcio/grpc/framework/alpha/interfaces.py | 384 ----------- .../grpcio/grpc/framework/alpha/utilities.py | 269 -------- .../grpcio/grpc/framework/base/__init__.py | 35 - .../grpc/framework/base/_cancellation.py | 64 -- .../grpcio/grpc/framework/base/_constants.py | 32 - .../grpcio/grpc/framework/base/_context.py | 99 --- .../grpcio/grpc/framework/base/_emission.py | 125 ---- .../grpcio/grpc/framework/base/_ends.py | 399 ----------- .../grpcio/grpc/framework/base/_expiration.py | 158 ----- .../grpcio/grpc/framework/base/_ingestion.py | 443 ------------ .../grpcio/grpc/framework/base/_interfaces.py | 266 -------- .../grpcio/grpc/framework/base/_reception.py | 400 ----------- .../grpc/framework/base/_termination.py | 204 ------ .../grpc/framework/base/_transmission.py | 429 ------------ .../grpcio/grpc/framework/base/exceptions.py | 34 - .../grpc/framework/base/implementations.py | 77 --- .../grpcio/grpc/framework/base/in_memory.py | 108 --- .../grpcio/grpc/framework/base/interfaces.py | 353 ---------- src/python/grpcio/grpc/framework/base/null.py | 56 -- src/python/grpcio/grpc/framework/base/util.py | 94 --- .../grpcio/grpc/framework/face/__init__.py | 35 - .../grpcio/grpc/framework/face/_calls.py | 422 ------------ .../grpcio/grpc/framework/face/_control.py | 201 ------ .../grpcio/grpc/framework/face/_service.py | 187 ------ .../grpc/framework/face/demonstration.py | 118 ---- .../grpcio/grpc/framework/face/exceptions.py | 78 --- .../grpc/framework/face/implementations.py | 320 --------- .../grpcio/grpc/framework/face/interfaces.py | 634 ------------------ .../grpcio/grpc/framework/face/utilities.py | 177 ----- .../tests/unit/framework/face/__init__.py | 30 - .../unit/framework/face/testing/__init__.py | 30 - .../unit/framework/face/testing/base_util.py | 102 --- ...ing_invocation_inline_service_test_case.py | 224 ------- .../unit/framework/face/testing/callback.py | 94 --- .../unit/framework/face/testing/control.py | 87 --- .../unit/framework/face/testing/coverage.py | 121 ---- .../unit/framework/face/testing/digest.py | 452 ------------- ...ion_synchronous_event_service_test_case.py | 378 ----------- ...on_asynchronous_event_service_test_case.py | 384 ----------- .../unit/framework/face/testing/interfaces.py | 118 ---- .../unit/framework/face/testing/service.py | 321 --------- .../framework/face/testing/stock_service.py | 374 ----------- .../unit/framework/face/testing/test_case.py | 81 --- 51 files changed, 10522 deletions(-) delete mode 100644 src/python/grpcio/grpc/_adapter/fore.py delete mode 100644 src/python/grpcio/grpc/_adapter/rear.py delete mode 100644 src/python/grpcio/grpc/early_adopter/__init__.py delete mode 100644 src/python/grpcio/grpc/early_adopter/implementations.py delete mode 100644 src/python/grpcio/grpc/framework/alpha/__init__.py delete mode 100644 src/python/grpcio/grpc/framework/alpha/_face_utilities.py delete mode 100644 src/python/grpcio/grpc/framework/alpha/_reexport.py delete mode 100644 src/python/grpcio/grpc/framework/alpha/exceptions.py delete mode 100644 src/python/grpcio/grpc/framework/alpha/interfaces.py delete mode 100644 src/python/grpcio/grpc/framework/alpha/utilities.py delete mode 100644 src/python/grpcio/grpc/framework/base/__init__.py delete mode 100644 src/python/grpcio/grpc/framework/base/_cancellation.py delete mode 100644 src/python/grpcio/grpc/framework/base/_constants.py delete mode 100644 src/python/grpcio/grpc/framework/base/_context.py delete mode 100644 src/python/grpcio/grpc/framework/base/_emission.py delete mode 100644 src/python/grpcio/grpc/framework/base/_ends.py delete mode 100644 src/python/grpcio/grpc/framework/base/_expiration.py delete mode 100644 src/python/grpcio/grpc/framework/base/_ingestion.py delete mode 100644 src/python/grpcio/grpc/framework/base/_interfaces.py delete mode 100644 src/python/grpcio/grpc/framework/base/_reception.py delete mode 100644 src/python/grpcio/grpc/framework/base/_termination.py delete mode 100644 src/python/grpcio/grpc/framework/base/_transmission.py delete mode 100644 src/python/grpcio/grpc/framework/base/exceptions.py delete mode 100644 src/python/grpcio/grpc/framework/base/implementations.py delete mode 100644 src/python/grpcio/grpc/framework/base/in_memory.py delete mode 100644 src/python/grpcio/grpc/framework/base/interfaces.py delete mode 100644 src/python/grpcio/grpc/framework/base/null.py delete mode 100644 src/python/grpcio/grpc/framework/base/util.py delete mode 100644 src/python/grpcio/grpc/framework/face/__init__.py delete mode 100644 src/python/grpcio/grpc/framework/face/_calls.py delete mode 100644 src/python/grpcio/grpc/framework/face/_control.py delete mode 100644 src/python/grpcio/grpc/framework/face/_service.py delete mode 100644 src/python/grpcio/grpc/framework/face/demonstration.py delete mode 100644 src/python/grpcio/grpc/framework/face/exceptions.py delete mode 100644 src/python/grpcio/grpc/framework/face/implementations.py delete mode 100644 src/python/grpcio/grpc/framework/face/interfaces.py delete mode 100644 src/python/grpcio/grpc/framework/face/utilities.py delete mode 100644 src/python/grpcio/tests/unit/framework/face/__init__.py delete mode 100644 src/python/grpcio/tests/unit/framework/face/testing/__init__.py delete mode 100644 src/python/grpcio/tests/unit/framework/face/testing/base_util.py delete mode 100644 src/python/grpcio/tests/unit/framework/face/testing/blocking_invocation_inline_service_test_case.py delete mode 100644 src/python/grpcio/tests/unit/framework/face/testing/callback.py delete mode 100644 src/python/grpcio/tests/unit/framework/face/testing/control.py delete mode 100644 src/python/grpcio/tests/unit/framework/face/testing/coverage.py delete mode 100644 src/python/grpcio/tests/unit/framework/face/testing/digest.py delete mode 100644 src/python/grpcio/tests/unit/framework/face/testing/event_invocation_synchronous_event_service_test_case.py delete mode 100644 src/python/grpcio/tests/unit/framework/face/testing/future_invocation_asynchronous_event_service_test_case.py delete mode 100644 src/python/grpcio/tests/unit/framework/face/testing/interfaces.py delete mode 100644 src/python/grpcio/tests/unit/framework/face/testing/service.py delete mode 100644 src/python/grpcio/tests/unit/framework/face/testing/stock_service.py delete mode 100644 src/python/grpcio/tests/unit/framework/face/testing/test_case.py diff --git a/src/python/grpcio/grpc/_adapter/fore.py b/src/python/grpcio/grpc/_adapter/fore.py deleted file mode 100644 index acdd69c4206..00000000000 --- a/src/python/grpcio/grpc/_adapter/fore.py +++ /dev/null @@ -1,363 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""The RPC-service-side bridge between RPC Framework and GRPC-on-the-wire.""" - -import enum -import logging -import threading -import time - -from grpc._adapter import _common -from grpc._adapter import _intermediary_low as _low -from grpc.framework.base import interfaces as base_interfaces -from grpc.framework.base import null -from grpc.framework.foundation import activated -from grpc.framework.foundation import logging_pool - -_THREAD_POOL_SIZE = 10 - - -@enum.unique -class _LowWrite(enum.Enum): - """The possible categories of low-level write state.""" - - OPEN = 'OPEN' - ACTIVE = 'ACTIVE' - CLOSED = 'CLOSED' - - -def _write(call, rpc_state, payload): - serialized_payload = rpc_state.serializer(payload) - if rpc_state.write.low is _LowWrite.OPEN: - call.write(serialized_payload, call, 0) - rpc_state.write.low = _LowWrite.ACTIVE - else: - rpc_state.write.pending.append(serialized_payload) - - -def _status(call, rpc_state): - call.status(_low.Status(_low.Code.OK, ''), call) - rpc_state.write.low = _LowWrite.CLOSED - - -class ForeLink(base_interfaces.ForeLink, activated.Activated): - """A service-side bridge between RPC Framework and the C-ish _low code.""" - - def __init__( - self, pool, request_deserializers, response_serializers, - root_certificates, key_chain_pairs, port=None): - """Constructor. - - Args: - pool: A thread pool. - request_deserializers: A dict from RPC method names to request object - deserializer behaviors. - response_serializers: A dict from RPC method names to response object - serializer behaviors. - root_certificates: The PEM-encoded client root certificates as a - bytestring or None. - key_chain_pairs: A sequence of PEM-encoded private key-certificate chain - pairs. - port: The port on which to serve, or None to have a port selected - automatically. - """ - self._condition = threading.Condition() - self._pool = pool - self._request_deserializers = request_deserializers - self._response_serializers = response_serializers - self._root_certificates = root_certificates - self._key_chain_pairs = key_chain_pairs - self._requested_port = port - - self._rear_link = null.NULL_REAR_LINK - self._completion_queue = None - self._server = None - self._rpc_states = {} - self._spinning = False - self._port = None - - def _on_stop_event(self): - self._spinning = False - self._condition.notify_all() - - def _on_service_acceptance_event(self, event, server): - """Handle a service invocation event.""" - service_acceptance = event.service_acceptance - if service_acceptance is None: - return - - call = service_acceptance.call - call.accept(self._completion_queue, call) - # TODO(nathaniel): Metadata support. - call.premetadata() - call.read(call) - method = service_acceptance.method - - self._rpc_states[call] = _common.CommonRPCState( - _common.WriteState(_LowWrite.OPEN, _common.HighWrite.OPEN, []), 1, - self._request_deserializers[method], - self._response_serializers[method]) - - ticket = base_interfaces.FrontToBackTicket( - call, 0, base_interfaces.FrontToBackTicket.Kind.COMMENCEMENT, method, - base_interfaces.ServicedSubscription.Kind.FULL, None, None, - service_acceptance.deadline - time.time()) - self._rear_link.accept_front_to_back_ticket(ticket) - - server.service(None) - - def _on_read_event(self, event): - """Handle data arriving during an RPC.""" - call = event.tag - rpc_state = self._rpc_states.get(call, None) - if rpc_state is None: - return - - sequence_number = rpc_state.sequence_number - rpc_state.sequence_number += 1 - if event.bytes is None: - ticket = base_interfaces.FrontToBackTicket( - call, sequence_number, - base_interfaces.FrontToBackTicket.Kind.COMPLETION, None, None, None, - None, None) - else: - call.read(call) - ticket = base_interfaces.FrontToBackTicket( - call, sequence_number, - base_interfaces.FrontToBackTicket.Kind.CONTINUATION, None, None, - None, rpc_state.deserializer(event.bytes), None) - - self._rear_link.accept_front_to_back_ticket(ticket) - - def _on_write_event(self, event): - call = event.tag - rpc_state = self._rpc_states.get(call, None) - if rpc_state is None: - return - - if rpc_state.write.pending: - serialized_payload = rpc_state.write.pending.pop(0) - call.write(serialized_payload, call, 0) - elif rpc_state.write.high is _common.HighWrite.CLOSED: - _status(call, rpc_state) - else: - rpc_state.write.low = _LowWrite.OPEN - - def _on_complete_event(self, event): - if not event.complete_accepted: - logging.error('Complete not accepted! %s', (event,)) - call = event.tag - rpc_state = self._rpc_states.pop(call, None) - if rpc_state is None: - return - - sequence_number = rpc_state.sequence_number - rpc_state.sequence_number += 1 - ticket = base_interfaces.FrontToBackTicket( - call, sequence_number, - base_interfaces.FrontToBackTicket.Kind.TRANSMISSION_FAILURE, None, - None, None, None, None) - self._rear_link.accept_front_to_back_ticket(ticket) - - def _on_finish_event(self, event): - """Handle termination of an RPC.""" - call = event.tag - rpc_state = self._rpc_states.pop(call, None) - if rpc_state is None: - return - - code = event.status.code - if code is _low.Code.OK: - return - - sequence_number = rpc_state.sequence_number - rpc_state.sequence_number += 1 - if code is _low.Code.CANCELLED: - ticket = base_interfaces.FrontToBackTicket( - call, sequence_number, - base_interfaces.FrontToBackTicket.Kind.CANCELLATION, None, None, - None, None, None) - elif code is _low.Code.DEADLINE_EXCEEDED: - ticket = base_interfaces.FrontToBackTicket( - call, sequence_number, - base_interfaces.FrontToBackTicket.Kind.EXPIRATION, None, None, None, - None, None) - else: - # TODO(nathaniel): Better mapping of codes to ticket-categories - ticket = base_interfaces.FrontToBackTicket( - call, sequence_number, - base_interfaces.FrontToBackTicket.Kind.TRANSMISSION_FAILURE, None, - None, None, None, None) - self._rear_link.accept_front_to_back_ticket(ticket) - - def _spin(self, completion_queue, server): - while True: - event = completion_queue.get(None) - - with self._condition: - if event.kind is _low.Event.Kind.STOP: - self._on_stop_event() - return - elif self._server is None: - continue - elif event.kind is _low.Event.Kind.SERVICE_ACCEPTED: - self._on_service_acceptance_event(event, server) - elif event.kind is _low.Event.Kind.READ_ACCEPTED: - self._on_read_event(event) - elif event.kind is _low.Event.Kind.WRITE_ACCEPTED: - self._on_write_event(event) - elif event.kind is _low.Event.Kind.COMPLETE_ACCEPTED: - self._on_complete_event(event) - elif event.kind is _low.Event.Kind.FINISH: - self._on_finish_event(event) - else: - logging.error('Illegal event! %s', (event,)) - - def _continue(self, call, payload): - rpc_state = self._rpc_states.get(call, None) - if rpc_state is None: - return - - _write(call, rpc_state, payload) - - def _complete(self, call, payload): - """Handle completion of the writes of an RPC.""" - rpc_state = self._rpc_states.get(call, None) - if rpc_state is None: - return - - if rpc_state.write.low is _LowWrite.OPEN: - if payload is None: - _status(call, rpc_state) - else: - _write(call, rpc_state, payload) - elif rpc_state.write.low is _LowWrite.ACTIVE: - if payload is not None: - rpc_state.write.pending.append(rpc_state.serializer(payload)) - else: - raise ValueError('Called to complete after having already completed!') - rpc_state.write.high = _common.HighWrite.CLOSED - - def _cancel(self, call): - call.cancel() - self._rpc_states.pop(call, None) - - def join_rear_link(self, rear_link): - """See base_interfaces.ForeLink.join_rear_link for specification.""" - self._rear_link = null.NULL_REAR_LINK if rear_link is None else rear_link - - def _start(self): - """Starts this ForeLink. - - This method must be called before attempting to exchange tickets with this - object. - """ - with self._condition: - address = '[::]:%d' % ( - 0 if self._requested_port is None else self._requested_port) - self._completion_queue = _low.CompletionQueue() - if self._root_certificates is None and not self._key_chain_pairs: - self._server = _low.Server(self._completion_queue) - self._port = self._server.add_http2_addr(address) - else: - server_credentials = _low.ServerCredentials( - self._root_certificates, self._key_chain_pairs, False) - self._server = _low.Server(self._completion_queue) - self._port = self._server.add_secure_http2_addr( - address, server_credentials) - self._server.start() - - self._server.service(None) - - self._pool.submit(self._spin, self._completion_queue, self._server) - self._spinning = True - - return self - - # TODO(nathaniel): Expose graceful-shutdown semantics in which this object - # enters a state in which it finishes ongoing RPCs but refuses new ones. - def _stop(self): - """Stops this ForeLink. - - This method must be called for proper termination of this object, and no - attempts to exchange tickets with this object may be made after this method - has been called. - """ - with self._condition: - self._server.stop() - # TODO(nathaniel): Yep, this is weird. Deleting a server shouldn't have a - # behaviorally significant side-effect. - self._server = None - self._completion_queue.stop() - - while self._spinning: - self._condition.wait() - - self._port = None - - def __enter__(self): - """See activated.Activated.__enter__ for specification.""" - return self._start() - - def __exit__(self, exc_type, exc_val, exc_tb): - """See activated.Activated.__exit__ for specification.""" - self._stop() - return False - - def start(self): - """See activated.Activated.start for specification.""" - return self._start() - - def stop(self): - """See activated.Activated.stop for specification.""" - self._stop() - - def port(self): - """Identifies the port on which this ForeLink is servicing RPCs. - - Returns: - The number of the port on which this ForeLink is servicing RPCs, or None - if this ForeLink is not currently activated and servicing RPCs. - """ - with self._condition: - return self._port - - def accept_back_to_front_ticket(self, ticket): - """See base_interfaces.ForeLink.accept_back_to_front_ticket for spec.""" - with self._condition: - if self._server is None: - return - - if ticket.kind is base_interfaces.BackToFrontTicket.Kind.CONTINUATION: - self._continue(ticket.operation_id, ticket.payload) - elif ticket.kind is base_interfaces.BackToFrontTicket.Kind.COMPLETION: - self._complete(ticket.operation_id, ticket.payload) - else: - self._cancel(ticket.operation_id) diff --git a/src/python/grpcio/grpc/_adapter/rear.py b/src/python/grpcio/grpc/_adapter/rear.py deleted file mode 100644 index 17fa47f7460..00000000000 --- a/src/python/grpcio/grpc/_adapter/rear.py +++ /dev/null @@ -1,395 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""The RPC-invocation-side bridge between RPC Framework and GRPC-on-the-wire.""" - -import enum -import logging -import threading -import time - -from grpc._adapter import _common -from grpc._adapter import _intermediary_low as _low -from grpc.framework.base import interfaces as base_interfaces -from grpc.framework.base import null -from grpc.framework.foundation import activated -from grpc.framework.foundation import logging_pool - -_THREAD_POOL_SIZE = 10 - -_INVOCATION_EVENT_KINDS = ( - _low.Event.Kind.METADATA_ACCEPTED, - _low.Event.Kind.FINISH -) - - -@enum.unique -class _LowWrite(enum.Enum): - """The possible categories of low-level write state.""" - - OPEN = 'OPEN' - ACTIVE = 'ACTIVE' - CLOSED = 'CLOSED' - - -class _RPCState(object): - """The full state of any tracked RPC. - - Attributes: - call: The _low.Call object for the RPC. - outstanding: The set of Event.Kind values describing expected future events - for the RPC. - active: A boolean indicating whether or not the RPC is active. - common: An _common.RPCState describing additional state for the RPC. - """ - - def __init__(self, call, outstanding, active, common): - self.call = call - self.outstanding = outstanding - self.active = active - self.common = common - - -def _write(operation_id, call, outstanding, write_state, serialized_payload): - if write_state.low is _LowWrite.OPEN: - call.write(serialized_payload, operation_id, 0) - outstanding.add(_low.Event.Kind.WRITE_ACCEPTED) - write_state.low = _LowWrite.ACTIVE - elif write_state.low is _LowWrite.ACTIVE: - write_state.pending.append(serialized_payload) - else: - raise ValueError('Write attempted after writes completed!') - - -class RearLink(base_interfaces.RearLink, activated.Activated): - """An invocation-side bridge between RPC Framework and the C-ish _low code.""" - - def __init__( - self, host, port, pool, request_serializers, response_deserializers, - secure, root_certificates, private_key, certificate_chain, - metadata_transformer=None, server_host_override=None): - """Constructor. - - Args: - host: The host to which to connect for RPC service. - port: The port to which to connect for RPC service. - pool: A thread pool. - request_serializers: A dict from RPC method names to request object - serializer behaviors. - response_deserializers: A dict from RPC method names to response object - deserializer behaviors. - secure: A boolean indicating whether or not to use a secure connection. - root_certificates: The PEM-encoded root certificates or None to ask for - them to be retrieved from a default location. - private_key: The PEM-encoded private key to use or None if no private - key should be used. - certificate_chain: The PEM-encoded certificate chain to use or None if - no certificate chain should be used. - metadata_transformer: A function that given a metadata object produces - another metadata to be used in the underlying communication on the - wire. - server_host_override: (For testing only) the target name used for SSL - host name checking. - """ - self._condition = threading.Condition() - self._host = host - self._port = port - self._pool = pool - self._request_serializers = request_serializers - self._response_deserializers = response_deserializers - - self._fore_link = null.NULL_FORE_LINK - self._completion_queue = None - self._channel = None - self._rpc_states = {} - self._spinning = False - if secure: - self._client_credentials = _low.ClientCredentials( - root_certificates, private_key, certificate_chain) - else: - self._client_credentials = None - self._root_certificates = root_certificates - self._private_key = private_key - self._certificate_chain = certificate_chain - self._metadata_transformer = metadata_transformer - self._server_host_override = server_host_override - - def _on_write_event(self, operation_id, event, rpc_state): - if event.write_accepted: - if rpc_state.common.write.pending: - rpc_state.call.write( - rpc_state.common.write.pending.pop(0), operation_id, 0) - rpc_state.outstanding.add(_low.Event.Kind.WRITE_ACCEPTED) - elif rpc_state.common.write.high is _common.HighWrite.CLOSED: - rpc_state.call.complete(operation_id) - rpc_state.outstanding.add(_low.Event.Kind.COMPLETE_ACCEPTED) - rpc_state.common.write.low = _LowWrite.CLOSED - else: - rpc_state.common.write.low = _LowWrite.OPEN - else: - logging.error('RPC write not accepted! Event: %s', (event,)) - rpc_state.active = False - ticket = base_interfaces.BackToFrontTicket( - operation_id, rpc_state.common.sequence_number, - base_interfaces.BackToFrontTicket.Kind.TRANSMISSION_FAILURE, None) - rpc_state.common.sequence_number += 1 - self._fore_link.accept_back_to_front_ticket(ticket) - - def _on_read_event(self, operation_id, event, rpc_state): - if event.bytes is not None: - rpc_state.call.read(operation_id) - rpc_state.outstanding.add(_low.Event.Kind.READ_ACCEPTED) - - ticket = base_interfaces.BackToFrontTicket( - operation_id, rpc_state.common.sequence_number, - base_interfaces.BackToFrontTicket.Kind.CONTINUATION, - rpc_state.common.deserializer(event.bytes)) - rpc_state.common.sequence_number += 1 - self._fore_link.accept_back_to_front_ticket(ticket) - - def _on_complete_event(self, operation_id, event, rpc_state): - if not event.complete_accepted: - logging.error('RPC complete not accepted! Event: %s', (event,)) - rpc_state.active = False - ticket = base_interfaces.BackToFrontTicket( - operation_id, rpc_state.common.sequence_number, - base_interfaces.BackToFrontTicket.Kind.TRANSMISSION_FAILURE, None) - rpc_state.common.sequence_number += 1 - self._fore_link.accept_back_to_front_ticket(ticket) - - # TODO(nathaniel): Metadata support. - def _on_metadata_event(self, operation_id, event, rpc_state): # pylint: disable=unused-argument - rpc_state.call.read(operation_id) - rpc_state.outstanding.add(_low.Event.Kind.READ_ACCEPTED) - - def _on_finish_event(self, operation_id, event, rpc_state): - """Handle termination of an RPC.""" - # TODO(nathaniel): Cover all statuses. - if event.status.code is _low.Code.OK: - kind = base_interfaces.BackToFrontTicket.Kind.COMPLETION - elif event.status.code is _low.Code.CANCELLED: - kind = base_interfaces.BackToFrontTicket.Kind.CANCELLATION - elif event.status.code is _low.Code.DEADLINE_EXCEEDED: - kind = base_interfaces.BackToFrontTicket.Kind.EXPIRATION - else: - kind = base_interfaces.BackToFrontTicket.Kind.TRANSMISSION_FAILURE - ticket = base_interfaces.BackToFrontTicket( - operation_id, rpc_state.common.sequence_number, kind, None) - rpc_state.common.sequence_number += 1 - self._fore_link.accept_back_to_front_ticket(ticket) - - def _spin(self, completion_queue): - while True: - event = completion_queue.get(None) - operation_id = event.tag - - with self._condition: - rpc_state = self._rpc_states[operation_id] - rpc_state.outstanding.remove(event.kind) - if rpc_state.active and self._completion_queue is not None: - if event.kind is _low.Event.Kind.WRITE_ACCEPTED: - self._on_write_event(operation_id, event, rpc_state) - elif event.kind is _low.Event.Kind.METADATA_ACCEPTED: - self._on_metadata_event(operation_id, event, rpc_state) - elif event.kind is _low.Event.Kind.READ_ACCEPTED: - self._on_read_event(operation_id, event, rpc_state) - elif event.kind is _low.Event.Kind.COMPLETE_ACCEPTED: - self._on_complete_event(operation_id, event, rpc_state) - elif event.kind is _low.Event.Kind.FINISH: - self._on_finish_event(operation_id, event, rpc_state) - else: - logging.error('Illegal RPC event! %s', (event,)) - - if not rpc_state.outstanding: - self._rpc_states.pop(operation_id) - if not self._rpc_states: - self._spinning = False - self._condition.notify_all() - return - - def _invoke(self, operation_id, name, high_state, payload, timeout): - """Invoke an RPC. - - Args: - operation_id: Any object to be used as an operation ID for the RPC. - name: The RPC method name. - high_state: A _common.HighWrite value representing the "high write state" - of the RPC. - payload: A payload object for the RPC or None if no payload was given at - invocation-time. - timeout: A duration of time in seconds to allow for the RPC. - """ - request_serializer = self._request_serializers[name] - call = _low.Call(self._channel, self._completion_queue, name, self._host, time.time() + timeout) - if self._metadata_transformer is not None: - metadata = self._metadata_transformer([]) - for metadata_key, metadata_value in metadata: - call.add_metadata(metadata_key, metadata_value) - call.invoke(self._completion_queue, operation_id, operation_id) - outstanding = set(_INVOCATION_EVENT_KINDS) - - if payload is None: - if high_state is _common.HighWrite.CLOSED: - call.complete(operation_id) - low_state = _LowWrite.CLOSED - outstanding.add(_low.Event.Kind.COMPLETE_ACCEPTED) - else: - low_state = _LowWrite.OPEN - else: - serialized_payload = request_serializer(payload) - call.write(serialized_payload, operation_id, 0) - outstanding.add(_low.Event.Kind.WRITE_ACCEPTED) - low_state = _LowWrite.ACTIVE - - write_state = _common.WriteState(low_state, high_state, []) - common_state = _common.CommonRPCState( - write_state, 0, self._response_deserializers[name], request_serializer) - self._rpc_states[operation_id] = _RPCState( - call, outstanding, True, common_state) - - if not self._spinning: - self._pool.submit(self._spin, self._completion_queue) - self._spinning = True - - def _commence(self, operation_id, name, payload, timeout): - self._invoke(operation_id, name, _common.HighWrite.OPEN, payload, timeout) - - def _continue(self, operation_id, payload): - rpc_state = self._rpc_states.get(operation_id, None) - if rpc_state is None or not rpc_state.active: - return - - _write( - operation_id, rpc_state.call, rpc_state.outstanding, - rpc_state.common.write, rpc_state.common.serializer(payload)) - - def _complete(self, operation_id, payload): - """Close writes associated with an ongoing RPC. - - Args: - operation_id: Any object being use as an operation ID for the RPC. - payload: A payload object for the RPC (and thus the last payload object - for the RPC) or None if no payload was given along with the instruction - to indicate the end of writes for the RPC. - """ - rpc_state = self._rpc_states.get(operation_id, None) - if rpc_state is None or not rpc_state.active: - return - - write_state = rpc_state.common.write - if payload is None: - if write_state.low is _LowWrite.OPEN: - rpc_state.call.complete(operation_id) - rpc_state.outstanding.add(_low.Event.Kind.COMPLETE_ACCEPTED) - write_state.low = _LowWrite.CLOSED - else: - _write( - operation_id, rpc_state.call, rpc_state.outstanding, write_state, - rpc_state.common.serializer(payload)) - write_state.high = _common.HighWrite.CLOSED - - def _entire(self, operation_id, name, payload, timeout): - self._invoke(operation_id, name, _common.HighWrite.CLOSED, payload, timeout) - - def _cancel(self, operation_id): - rpc_state = self._rpc_states.get(operation_id, None) - if rpc_state is not None and rpc_state.active: - rpc_state.call.cancel() - rpc_state.active = False - - def join_fore_link(self, fore_link): - """See base_interfaces.RearLink.join_fore_link for specification.""" - with self._condition: - self._fore_link = null.NULL_FORE_LINK if fore_link is None else fore_link - - def _start(self): - """Starts this RearLink. - - This method must be called before attempting to exchange tickets with this - object. - """ - with self._condition: - self._completion_queue = _low.CompletionQueue() - self._channel = _low.Channel( - '%s:%d' % (self._host, self._port), self._client_credentials, - server_host_override=self._server_host_override) - return self - - def _stop(self): - """Stops this RearLink. - - This method must be called for proper termination of this object, and no - attempts to exchange tickets with this object may be made after this method - has been called. - """ - with self._condition: - self._completion_queue.stop() - self._completion_queue = None - - while self._spinning: - self._condition.wait() - - def __enter__(self): - """See activated.Activated.__enter__ for specification.""" - return self._start() - - def __exit__(self, exc_type, exc_val, exc_tb): - """See activated.Activated.__exit__ for specification.""" - self._stop() - return False - - def start(self): - """See activated.Activated.start for specification.""" - return self._start() - - def stop(self): - """See activated.Activated.stop for specification.""" - self._stop() - - def accept_front_to_back_ticket(self, ticket): - """See base_interfaces.RearLink.accept_front_to_back_ticket for spec.""" - with self._condition: - if self._completion_queue is None: - return - - if ticket.kind is base_interfaces.FrontToBackTicket.Kind.COMMENCEMENT: - self._commence( - ticket.operation_id, ticket.name, ticket.payload, ticket.timeout) - elif ticket.kind is base_interfaces.FrontToBackTicket.Kind.CONTINUATION: - self._continue(ticket.operation_id, ticket.payload) - elif ticket.kind is base_interfaces.FrontToBackTicket.Kind.COMPLETION: - self._complete(ticket.operation_id, ticket.payload) - elif ticket.kind is base_interfaces.FrontToBackTicket.Kind.ENTIRE: - self._entire( - ticket.operation_id, ticket.name, ticket.payload, ticket.timeout) - elif ticket.kind is base_interfaces.FrontToBackTicket.Kind.CANCELLATION: - self._cancel(ticket.operation_id) - else: - # NOTE(nathaniel): All other categories are treated as cancellation. - self._cancel(ticket.operation_id) diff --git a/src/python/grpcio/grpc/early_adopter/__init__.py b/src/python/grpcio/grpc/early_adopter/__init__.py deleted file mode 100644 index bff74be2c7b..00000000000 --- a/src/python/grpcio/grpc/early_adopter/__init__.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import warnings - -warnings.simplefilter('always', DeprecationWarning) -warnings.warn('the alpha API (includes this package) is deprecated, ' - 'unmaintained, and no longer tested. Please migrate to the beta ' - 'API.', DeprecationWarning, stacklevel=2) diff --git a/src/python/grpcio/grpc/early_adopter/implementations.py b/src/python/grpcio/grpc/early_adopter/implementations.py deleted file mode 100644 index 9c396aa7ad0..00000000000 --- a/src/python/grpcio/grpc/early_adopter/implementations.py +++ /dev/null @@ -1,262 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Entry points into GRPC.""" - -import threading - -from grpc._adapter import fore as _fore -from grpc._adapter import rear as _rear -from grpc.framework.alpha import _face_utilities -from grpc.framework.alpha import _reexport -from grpc.framework.alpha import interfaces -from grpc.framework.base import implementations as _base_implementations -from grpc.framework.base import util as _base_utilities -from grpc.framework.face import implementations as _face_implementations -from grpc.framework.foundation import logging_pool - -_DEFAULT_THREAD_POOL_SIZE = 8 -_ONE_DAY_IN_SECONDS = 24 * 60 * 60 - - -class _Server(interfaces.Server): - - def __init__( - self, breakdown, port, private_key, certificate_chain, - thread_pool_size=_DEFAULT_THREAD_POOL_SIZE): - self._lock = threading.Lock() - self._breakdown = breakdown - self._port = port - if private_key is None or certificate_chain is None: - self._key_chain_pairs = () - else: - self._key_chain_pairs = ((private_key, certificate_chain),) - - self._pool_size = thread_pool_size - self._pool = None - self._back = None - self._fore_link = None - - def _start(self): - with self._lock: - if self._pool is None: - self._pool = logging_pool.pool(self._pool_size) - servicer = _face_implementations.servicer( - self._pool, self._breakdown.implementations, None) - self._back = _base_implementations.back_link( - servicer, self._pool, self._pool, self._pool, _ONE_DAY_IN_SECONDS, - _ONE_DAY_IN_SECONDS) - self._fore_link = _fore.ForeLink( - self._pool, self._breakdown.request_deserializers, - self._breakdown.response_serializers, None, self._key_chain_pairs, - port=self._port) - self._back.join_fore_link(self._fore_link) - self._fore_link.join_rear_link(self._back) - self._fore_link.start() - else: - raise ValueError('Server currently running!') - - def _stop(self): - with self._lock: - if self._pool is None: - raise ValueError('Server not running!') - else: - self._fore_link.stop() - _base_utilities.wait_for_idle(self._back) - self._pool.shutdown(wait=True) - self._fore_link = None - self._back = None - self._pool = None - - def __enter__(self): - self._start() - return self - - def __exit__(self, exc_type, exc_val, exc_tb): - self._stop() - return False - - def start(self): - self._start() - - def stop(self): - self._stop() - - def port(self): - with self._lock: - return self._fore_link.port() - - -class _Stub(interfaces.Stub): - - def __init__( - self, breakdown, host, port, secure, root_certificates, private_key, - certificate_chain, metadata_transformer=None, server_host_override=None, - thread_pool_size=_DEFAULT_THREAD_POOL_SIZE): - self._lock = threading.Lock() - self._breakdown = breakdown - self._host = host - self._port = port - self._secure = secure - self._root_certificates = root_certificates - self._private_key = private_key - self._certificate_chain = certificate_chain - self._metadata_transformer = metadata_transformer - self._server_host_override = server_host_override - - self._pool_size = thread_pool_size - self._pool = None - self._front = None - self._rear_link = None - self._understub = None - - def __enter__(self): - with self._lock: - if self._pool is None: - self._pool = logging_pool.pool(self._pool_size) - self._front = _base_implementations.front_link( - self._pool, self._pool, self._pool) - self._rear_link = _rear.RearLink( - self._host, self._port, self._pool, - self._breakdown.request_serializers, - self._breakdown.response_deserializers, self._secure, - self._root_certificates, self._private_key, self._certificate_chain, - metadata_transformer=self._metadata_transformer, - server_host_override=self._server_host_override) - self._front.join_rear_link(self._rear_link) - self._rear_link.join_fore_link(self._front) - self._rear_link.start() - self._understub = _face_implementations.dynamic_stub( - self._breakdown.face_cardinalities, self._front, self._pool, '') - else: - raise ValueError('Tried to __enter__ already-__enter__ed Stub!') - return self - - def __exit__(self, exc_type, exc_val, exc_tb): - with self._lock: - if self._pool is None: - raise ValueError('Tried to __exit__ non-__enter__ed Stub!') - else: - self._rear_link.stop() - _base_utilities.wait_for_idle(self._front) - self._pool.shutdown(wait=True) - self._rear_link = None - self._front = None - self._pool = None - self._understub = None - return False - - def __getattr__(self, attr): - with self._lock: - if self._pool is None: - raise ValueError('Tried to __getattr__ non-__enter__ed Stub!') - else: - method_cardinality = self._breakdown.cardinalities.get(attr) - underlying_attr = getattr( - self._understub, self._breakdown.qualified_names.get(attr), None) - if method_cardinality is interfaces.Cardinality.UNARY_UNARY: - return _reexport.unary_unary_sync_async(underlying_attr) - elif method_cardinality is interfaces.Cardinality.UNARY_STREAM: - return lambda request, timeout: _reexport.cancellable_iterator( - underlying_attr(request, timeout)) - elif method_cardinality is interfaces.Cardinality.STREAM_UNARY: - return _reexport.stream_unary_sync_async(underlying_attr) - elif method_cardinality is interfaces.Cardinality.STREAM_STREAM: - return lambda request_iterator, timeout: ( - _reexport.cancellable_iterator(underlying_attr( - request_iterator, timeout))) - else: - raise AttributeError(attr) - - -def stub( - service_name, methods, host, port, metadata_transformer=None, secure=False, - root_certificates=None, private_key=None, certificate_chain=None, - server_host_override=None, thread_pool_size=_DEFAULT_THREAD_POOL_SIZE): - """Constructs an interfaces.Stub. - - Args: - service_name: The package-qualified full name of the service. - methods: A dictionary from RPC method name to - interfaces.RpcMethodInvocationDescription describing the RPCs to be - supported by the created stub. The RPC method names in the dictionary are - not qualified by the service name or decorated in any other way. - host: The host to which to connect for RPC service. - port: The port to which to connect for RPC service. - metadata_transformer: A callable that given a metadata object produces - another metadata object to be used in the underlying communication on the - wire. - secure: Whether or not to construct the stub with a secure connection. - root_certificates: The PEM-encoded root certificates or None to ask for - them to be retrieved from a default location. - private_key: The PEM-encoded private key to use or None if no private key - should be used. - certificate_chain: The PEM-encoded certificate chain to use or None if no - certificate chain should be used. - server_host_override: (For testing only) the target name used for SSL - host name checking. - thread_pool_size: The maximum number of threads to allow in the backing - thread pool. - - Returns: - An interfaces.Stub affording RPC invocation. - """ - breakdown = _face_utilities.break_down_invocation(service_name, methods) - return _Stub( - breakdown, host, port, secure, root_certificates, private_key, - certificate_chain, server_host_override=server_host_override, - metadata_transformer=metadata_transformer, - thread_pool_size=thread_pool_size) - - -def server( - service_name, methods, port, private_key=None, certificate_chain=None, - thread_pool_size=_DEFAULT_THREAD_POOL_SIZE): - """Constructs an interfaces.Server. - - Args: - service_name: The package-qualified full name of the service. - methods: A dictionary from RPC method name to - interfaces.RpcMethodServiceDescription describing the RPCs to - be serviced by the created server. The RPC method names in the dictionary - are not qualified by the service name or decorated in any other way. - port: The port on which to serve or zero to ask for a port to be - automatically selected. - private_key: A pem-encoded private key, or None for an insecure server. - certificate_chain: A pem-encoded certificate chain, or None for an insecure - server. - thread_pool_size: The maximum number of threads to allow in the backing - thread pool. - - Returns: - An interfaces.Server that will serve secure traffic. - """ - breakdown = _face_utilities.break_down_service(service_name, methods) - return _Server(breakdown, port, private_key, certificate_chain, - thread_pool_size=thread_pool_size) diff --git a/src/python/grpcio/grpc/framework/alpha/__init__.py b/src/python/grpcio/grpc/framework/alpha/__init__.py deleted file mode 100644 index bff74be2c7b..00000000000 --- a/src/python/grpcio/grpc/framework/alpha/__init__.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import warnings - -warnings.simplefilter('always', DeprecationWarning) -warnings.warn('the alpha API (includes this package) is deprecated, ' - 'unmaintained, and no longer tested. Please migrate to the beta ' - 'API.', DeprecationWarning, stacklevel=2) diff --git a/src/python/grpcio/grpc/framework/alpha/_face_utilities.py b/src/python/grpcio/grpc/framework/alpha/_face_utilities.py deleted file mode 100644 index 15c47d5c927..00000000000 --- a/src/python/grpcio/grpc/framework/alpha/_face_utilities.py +++ /dev/null @@ -1,183 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import abc -import collections - -import six - -# face_interfaces is referenced from specification in this module. -from grpc.framework.common import cardinality -from grpc.framework.face import interfaces as face_interfaces # pylint: disable=unused-import -from grpc.framework.face import utilities as face_utilities -from grpc.framework.alpha import _reexport -from grpc.framework.alpha import interfaces - - -def _qualified_name(service_name, method_name): - return '/%s/%s' % (service_name, method_name) - - -# TODO(nathaniel): This structure is getting bloated; it could be shrunk if -# implementations._Stub used a generic rather than a dynamic underlying -# face-layer stub. -class InvocationBreakdown(six.with_metaclass(abc.ABCMeta)): - """An intermediate representation of invocation-side views of RPC methods. - - Attributes: - cardinalities: A dictionary from RPC method name to interfaces.Cardinality - value. - qualified_names: A dictionary from unqualified RPC method name to - service-qualified RPC method name. - face_cardinalities: A dictionary from service-qualified RPC method name to - to cardinality.Cardinality value. - request_serializers: A dictionary from service-qualified RPC method name to - callable behavior to be used serializing request values for the RPC. - response_deserializers: A dictionary from service-qualified RPC method name - to callable behavior to be used deserializing response values for the - RPC. - """ - - -class _EasyInvocationBreakdown( - InvocationBreakdown, - collections.namedtuple( - '_EasyInvocationBreakdown', - ('cardinalities', 'qualified_names', 'face_cardinalities', - 'request_serializers', 'response_deserializers'))): - pass - - -class ServiceBreakdown(six.with_metaclass(abc.ABCMeta)): - """An intermediate representation of service-side views of RPC methods. - - Attributes: - implementations: A dictionary from service-qualified RPC method name to - face_interfaces.MethodImplementation implementing the RPC method. - request_deserializers: A dictionary from service-qualified RPC method name - to callable behavior to be used deserializing request values for the RPC. - response_serializers: A dictionary from service-qualified RPC method name - to callable behavior to be used serializing response values for the RPC. - """ - - -class _EasyServiceBreakdown( - ServiceBreakdown, - collections.namedtuple( - '_EasyServiceBreakdown', - ('implementations', 'request_deserializers', 'response_serializers'))): - pass - - -def break_down_invocation(service_name, method_descriptions): - """Derives an InvocationBreakdown from several RPC method descriptions. - - Args: - service_name: The package-qualified full name of the service. - method_descriptions: A dictionary from RPC method name to - interfaces.RpcMethodInvocationDescription describing the RPCs. - - Returns: - An InvocationBreakdown corresponding to the given method descriptions. - """ - cardinalities = {} - qualified_names = {} - face_cardinalities = {} - request_serializers = {} - response_deserializers = {} - for name, method_description in six.iteritems(method_descriptions): - qualified_name = _qualified_name(service_name, name) - method_cardinality = method_description.cardinality() - cardinalities[name] = method_description.cardinality() - qualified_names[name] = qualified_name - face_cardinalities[qualified_name] = _reexport.common_cardinality( - method_cardinality) - request_serializers[qualified_name] = method_description.serialize_request - response_deserializers[qualified_name] = ( - method_description.deserialize_response) - return _EasyInvocationBreakdown( - cardinalities, qualified_names, face_cardinalities, request_serializers, - response_deserializers) - - -def break_down_service(service_name, method_descriptions): - """Derives a ServiceBreakdown from several RPC method descriptions. - - Args: - method_descriptions: A dictionary from RPC method name to - interfaces.RpcMethodServiceDescription describing the RPCs. - - Returns: - A ServiceBreakdown corresponding to the given method descriptions. - """ - implementations = {} - request_deserializers = {} - response_serializers = {} - for name, method_description in six.iteritems(method_descriptions): - qualified_name = _qualified_name(service_name, name) - method_cardinality = method_description.cardinality() - if method_cardinality is interfaces.Cardinality.UNARY_UNARY: - def service( - request, face_rpc_context, - service_behavior=method_description.service_unary_unary): - return service_behavior( - request, _reexport.rpc_context(face_rpc_context)) - implementations[qualified_name] = face_utilities.unary_unary_inline( - service) - elif method_cardinality is interfaces.Cardinality.UNARY_STREAM: - def service( - request, face_rpc_context, - service_behavior=method_description.service_unary_stream): - return service_behavior( - request, _reexport.rpc_context(face_rpc_context)) - implementations[qualified_name] = face_utilities.unary_stream_inline( - service) - elif method_cardinality is interfaces.Cardinality.STREAM_UNARY: - def service( - request_iterator, face_rpc_context, - service_behavior=method_description.service_stream_unary): - return service_behavior( - request_iterator, _reexport.rpc_context(face_rpc_context)) - implementations[qualified_name] = face_utilities.stream_unary_inline( - service) - elif method_cardinality is interfaces.Cardinality.STREAM_STREAM: - def service( - request_iterator, face_rpc_context, - service_behavior=method_description.service_stream_stream): - return service_behavior( - request_iterator, _reexport.rpc_context(face_rpc_context)) - implementations[qualified_name] = face_utilities.stream_stream_inline( - service) - request_deserializers[qualified_name] = ( - method_description.deserialize_request) - response_serializers[qualified_name] = ( - method_description.serialize_response) - - return _EasyServiceBreakdown( - implementations, request_deserializers, response_serializers) diff --git a/src/python/grpcio/grpc/framework/alpha/_reexport.py b/src/python/grpcio/grpc/framework/alpha/_reexport.py deleted file mode 100644 index e027077a771..00000000000 --- a/src/python/grpcio/grpc/framework/alpha/_reexport.py +++ /dev/null @@ -1,205 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import six - -from grpc.framework.common import cardinality -from grpc.framework.face import exceptions as face_exceptions -from grpc.framework.face import interfaces as face_interfaces -from grpc.framework.foundation import future -from grpc.framework.alpha import exceptions -from grpc.framework.alpha import interfaces - -_EARLY_ADOPTER_CARDINALITY_TO_COMMON_CARDINALITY = { - interfaces.Cardinality.UNARY_UNARY: cardinality.Cardinality.UNARY_UNARY, - interfaces.Cardinality.UNARY_STREAM: cardinality.Cardinality.UNARY_STREAM, - interfaces.Cardinality.STREAM_UNARY: cardinality.Cardinality.STREAM_UNARY, - interfaces.Cardinality.STREAM_STREAM: cardinality.Cardinality.STREAM_STREAM, -} - -_ABORTION_REEXPORT = { - face_interfaces.Abortion.CANCELLED: interfaces.Abortion.CANCELLED, - face_interfaces.Abortion.EXPIRED: interfaces.Abortion.EXPIRED, - face_interfaces.Abortion.NETWORK_FAILURE: - interfaces.Abortion.NETWORK_FAILURE, - face_interfaces.Abortion.SERVICED_FAILURE: - interfaces.Abortion.SERVICED_FAILURE, - face_interfaces.Abortion.SERVICER_FAILURE: - interfaces.Abortion.SERVICER_FAILURE, -} - - -class _RpcError(exceptions.RpcError): - pass - - -def _reexport_error(face_rpc_error): - if isinstance(face_rpc_error, face_exceptions.CancellationError): - return exceptions.CancellationError() - elif isinstance(face_rpc_error, face_exceptions.ExpirationError): - return exceptions.ExpirationError() - else: - return _RpcError() - - -def _as_face_abortion_callback(abortion_callback): - def face_abortion_callback(face_abortion): - abortion_callback(_ABORTION_REEXPORT[face_abortion]) - return face_abortion_callback - - -class _ReexportedFuture(future.Future): - - def __init__(self, face_future): - self._face_future = face_future - - def cancel(self): - return self._face_future.cancel() - - def cancelled(self): - return self._face_future.cancelled() - - def running(self): - return self._face_future.running() - - def done(self): - return self._face_future.done() - - def result(self, timeout=None): - try: - return self._face_future.result(timeout=timeout) - except face_exceptions.RpcError as e: - raise _reexport_error(e) - - def exception(self, timeout=None): - face_error = self._face_future.exception(timeout=timeout) - return None if face_error is None else _reexport_error(face_error) - - def traceback(self, timeout=None): - return self._face_future.traceback(timeout=timeout) - - def add_done_callback(self, fn): - self._face_future.add_done_callback(lambda unused_face_future: fn(self)) - - -def _call_reexporting_errors(behavior, *args, **kwargs): - try: - return behavior(*args, **kwargs) - except face_exceptions.RpcError as e: - raise _reexport_error(e) - - -def _reexported_future(face_future): - return _ReexportedFuture(face_future) - - -class _CancellableIterator(interfaces.CancellableIterator): - - def __init__(self, face_cancellable_iterator): - self._face_cancellable_iterator = face_cancellable_iterator - - def __iter__(self): - return self - - def next(self): - return _call_reexporting_errors(self._face_cancellable_iterator.next) - - def cancel(self): - self._face_cancellable_iterator.cancel() - - -class _RpcContext(interfaces.RpcContext): - - def __init__(self, face_rpc_context): - self._face_rpc_context = face_rpc_context - - def is_active(self): - return self._face_rpc_context.is_active() - - def time_remaining(self): - return self._face_rpc_context.time_remaining() - - def add_abortion_callback(self, abortion_callback): - self._face_rpc_context.add_abortion_callback( - _as_face_abortion_callback(abortion_callback)) - - -class _UnaryUnarySyncAsync(interfaces.UnaryUnarySyncAsync): - - def __init__(self, face_unary_unary_multi_callable): - self._underlying = face_unary_unary_multi_callable - - def __call__(self, request, timeout): - return _call_reexporting_errors( - self._underlying, request, timeout) - - def async(self, request, timeout): - return _ReexportedFuture(self._underlying.future(request, timeout)) - - -class _StreamUnarySyncAsync(interfaces.StreamUnarySyncAsync): - - def __init__(self, face_stream_unary_multi_callable): - self._underlying = face_stream_unary_multi_callable - - def __call__(self, request_iterator, timeout): - return _call_reexporting_errors( - self._underlying, request_iterator, timeout) - - def async(self, request_iterator, timeout): - return _ReexportedFuture(self._underlying.future(request_iterator, timeout)) - - -def common_cardinality(early_adopter_cardinality): - return _EARLY_ADOPTER_CARDINALITY_TO_COMMON_CARDINALITY[ - early_adopter_cardinality] - - -def common_cardinalities(early_adopter_cardinalities): - common_cardinalities = {} - for name, early_adopter_cardinality in six.iteritems(early_adopter_cardinalities): - common_cardinalities[name] = _EARLY_ADOPTER_CARDINALITY_TO_COMMON_CARDINALITY[ - early_adopter_cardinality] - return common_cardinalities - - -def rpc_context(face_rpc_context): - return _RpcContext(face_rpc_context) - - -def cancellable_iterator(face_cancellable_iterator): - return _CancellableIterator(face_cancellable_iterator) - - -def unary_unary_sync_async(face_unary_unary_multi_callable): - return _UnaryUnarySyncAsync(face_unary_unary_multi_callable) - - -def stream_unary_sync_async(face_stream_unary_multi_callable): - return _StreamUnarySyncAsync(face_stream_unary_multi_callable) diff --git a/src/python/grpcio/grpc/framework/alpha/exceptions.py b/src/python/grpcio/grpc/framework/alpha/exceptions.py deleted file mode 100644 index 09359c5e94f..00000000000 --- a/src/python/grpcio/grpc/framework/alpha/exceptions.py +++ /dev/null @@ -1,47 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Exceptions raised by GRPC. - -Only GRPC should instantiate and raise these exceptions. -""" -import abc - -import six - -class RpcError(six.with_metaclass(abc.ABCMeta, Exception)): - """Common super type for all exceptions raised by GRPC.""" - - -class CancellationError(RpcError): - """Indicates that an RPC has been cancelled.""" - - -class ExpirationError(RpcError): - """Indicates that an RPC has expired ("timed out").""" diff --git a/src/python/grpcio/grpc/framework/alpha/interfaces.py b/src/python/grpcio/grpc/framework/alpha/interfaces.py deleted file mode 100644 index 48f144f614f..00000000000 --- a/src/python/grpcio/grpc/framework/alpha/interfaces.py +++ /dev/null @@ -1,384 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Interfaces of GRPC.""" - -import abc -import enum - -import six - -# exceptions is referenced from specification in this module. -from grpc.framework.alpha import exceptions # pylint: disable=unused-import -from grpc.framework.foundation import activated -from grpc.framework.foundation import future - - -@enum.unique -class Cardinality(enum.Enum): - """Constants for the four cardinalities of RPC.""" - - UNARY_UNARY = 'request-unary/response-unary' - UNARY_STREAM = 'request-unary/response-streaming' - STREAM_UNARY = 'request-streaming/response-unary' - STREAM_STREAM = 'request-streaming/response-streaming' - - -@enum.unique -class Abortion(enum.Enum): - """Categories of RPC abortion.""" - - CANCELLED = 'cancelled' - EXPIRED = 'expired' - NETWORK_FAILURE = 'network failure' - SERVICED_FAILURE = 'serviced failure' - SERVICER_FAILURE = 'servicer failure' - - -class CancellableIterator(six.with_metaclass(abc.ABCMeta)): - """Implements the Iterator protocol and affords a cancel method.""" - - @abc.abstractmethod - def __iter__(self): - """Returns the self object in accordance with the Iterator protocol.""" - raise NotImplementedError() - - def __next__(self): - return self.next() - - @abc.abstractmethod - def next(self): - """Returns a value or raises StopIteration per the Iterator protocol.""" - raise NotImplementedError() - - @abc.abstractmethod - def cancel(self): - """Requests cancellation of whatever computation underlies this iterator.""" - raise NotImplementedError() - - -class RpcContext(six.with_metaclass(abc.ABCMeta)): - """Provides RPC-related information and action.""" - - @abc.abstractmethod - def is_active(self): - """Describes whether the RPC is active or has terminated.""" - raise NotImplementedError() - - @abc.abstractmethod - def time_remaining(self): - """Describes the length of allowed time remaining for the RPC. - Returns: - A nonnegative float indicating the length of allowed time in seconds - remaining for the RPC to complete before it is considered to have timed - out. - """ - raise NotImplementedError() - - @abc.abstractmethod - def add_abortion_callback(self, abortion_callback): - """Registers a callback to be called if the RPC is aborted. - Args: - abortion_callback: A callable to be called and passed an Abortion value - in the event of RPC abortion. - """ - raise NotImplementedError() - - -class UnaryUnarySyncAsync(six.with_metaclass(abc.ABCMeta)): - """Affords invoking a unary-unary RPC synchronously or asynchronously. - Values implementing this interface are directly callable and present an - "async" method. Both calls take a request value and a numeric timeout. - Direct invocation of a value of this type invokes its associated RPC and - blocks until the RPC's response is available. Calling the "async" method - of a value of this type invokes its associated RPC and immediately returns a - future.Future bound to the asynchronous execution of the RPC. - """ - - @abc.abstractmethod - def __call__(self, request, timeout): - """Synchronously invokes the underlying RPC. - Args: - request: The request value for the RPC. - timeout: A duration of time in seconds to allow for the RPC. - Returns: - The response value for the RPC. - Raises: - exceptions.RpcError: Indicating that the RPC was aborted. - """ - raise NotImplementedError() - - @abc.abstractmethod - def async(self, request, timeout): - """Asynchronously invokes the underlying RPC. - Args: - request: The request value for the RPC. - timeout: A duration of time in seconds to allow for the RPC. - Returns: - A future.Future representing the RPC. In the event of RPC completion, the - returned Future's result value will be the response value of the RPC. - In the event of RPC abortion, the returned Future's exception value - will be an exceptions.RpcError. - """ - raise NotImplementedError() - - -class StreamUnarySyncAsync(six.with_metaclass(abc.ABCMeta)): - """Affords invoking a stream-unary RPC synchronously or asynchronously. - Values implementing this interface are directly callable and present an - "async" method. Both calls take an iterator of request values and a numeric - timeout. Direct invocation of a value of this type invokes its associated RPC - and blocks until the RPC's response is available. Calling the "async" method - of a value of this type invokes its associated RPC and immediately returns a - future.Future bound to the asynchronous execution of the RPC. - """ - - @abc.abstractmethod - def __call__(self, request_iterator, timeout): - """Synchronously invokes the underlying RPC. - - Args: - request_iterator: An iterator that yields request values for the RPC. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - The response value for the RPC. - - Raises: - exceptions.RpcError: Indicating that the RPC was aborted. - """ - raise NotImplementedError() - - @abc.abstractmethod - def async(self, request_iterator, timeout): - """Asynchronously invokes the underlying RPC. - - Args: - request_iterator: An iterator that yields request values for the RPC. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - A future.Future representing the RPC. In the event of RPC completion, the - returned Future's result value will be the response value of the RPC. - In the event of RPC abortion, the returned Future's exception value - will be an exceptions.RpcError. - """ - raise NotImplementedError() - - -class RpcMethodDescription(six.with_metaclass(abc.ABCMeta)): - """A type for the common aspects of RPC method descriptions.""" - - @abc.abstractmethod - def cardinality(self): - """Identifies the cardinality of this RpcMethodDescription. - - Returns: - A Cardinality value identifying whether or not this - RpcMethodDescription is request-unary or request-streaming and - whether or not it is response-unary or response-streaming. - """ - raise NotImplementedError() - - -class RpcMethodInvocationDescription(six.with_metaclass(abc.ABCMeta, RpcMethodDescription)): - """Invocation-side description of an RPC method.""" - - @abc.abstractmethod - def serialize_request(self, request): - """Serializes a request value. - - Args: - request: A request value appropriate for the RPC method described by this - RpcMethodInvocationDescription. - - Returns: - The serialization of the given request value as a - bytestring. - """ - raise NotImplementedError() - - @abc.abstractmethod - def deserialize_response(self, serialized_response): - """Deserializes a response value. - - Args: - serialized_response: A bytestring that is the serialization of a response - value appropriate for the RPC method described by this - RpcMethodInvocationDescription. - - Returns: - A response value corresponding to the given bytestring. - """ - raise NotImplementedError() - - -class RpcMethodServiceDescription(six.with_metaclass(abc.ABCMeta, RpcMethodDescription)): - """Service-side description of an RPC method.""" - - @abc.abstractmethod - def deserialize_request(self, serialized_request): - """Deserializes a request value. - - Args: - serialized_request: A bytestring that is the serialization of a request - value appropriate for the RPC method described by this - RpcMethodServiceDescription. - - Returns: - A request value corresponding to the given bytestring. - """ - raise NotImplementedError() - - @abc.abstractmethod - def serialize_response(self, response): - """Serializes a response value. - - Args: - response: A response value appropriate for the RPC method described by - this RpcMethodServiceDescription. - - Returns: - The serialization of the given response value as a - bytestring. - """ - raise NotImplementedError() - - @abc.abstractmethod - def service_unary_unary(self, request, context): - """Carries out this RPC. - - This method may only be called if the cardinality of this - RpcMethodServiceDescription is Cardinality.UNARY_UNARY. - - Args: - request: A request value appropriate for the RPC method described by this - RpcMethodServiceDescription. - context: An RpcContext object for the RPC. - - Returns: - A response value appropriate for the RPC method described by this - RpcMethodServiceDescription. - """ - raise NotImplementedError() - - @abc.abstractmethod - def service_unary_stream(self, request, context): - """Carries out this RPC. - - This method may only be called if the cardinality of this - RpcMethodServiceDescription is Cardinality.UNARY_STREAM. - - Args: - request: A request value appropriate for the RPC method described by this - RpcMethodServiceDescription. - context: An RpcContext object for the RPC. - - Yields: - Zero or more response values appropriate for the RPC method described by - this RpcMethodServiceDescription. - """ - raise NotImplementedError() - - @abc.abstractmethod - def service_stream_unary(self, request_iterator, context): - """Carries out this RPC. - - This method may only be called if the cardinality of this - RpcMethodServiceDescription is Cardinality.STREAM_UNARY. - - Args: - request_iterator: An iterator of request values appropriate for the RPC - method described by this RpcMethodServiceDescription. - context: An RpcContext object for the RPC. - - Returns: - A response value appropriate for the RPC method described by this - RpcMethodServiceDescription. - """ - raise NotImplementedError() - - @abc.abstractmethod - def service_stream_stream(self, request_iterator, context): - """Carries out this RPC. - - This method may only be called if the cardinality of this - RpcMethodServiceDescription is Cardinality.STREAM_STREAM. - - Args: - request_iterator: An iterator of request values appropriate for the RPC - method described by this RpcMethodServiceDescription. - context: An RpcContext object for the RPC. - - Yields: - Zero or more response values appropriate for the RPC method described by - this RpcMethodServiceDescription. - """ - raise NotImplementedError() - - -class Stub(six.with_metaclass(abc.ABCMeta)): - """A stub with callable RPC method names for attributes. - - Instances of this type are context managers and only afford RPC invocation - when used in context. - - Instances of this type, when used in context, respond to attribute access - as follows: if the requested attribute is the name of a unary-unary RPC - method, the value of the attribute will be a UnaryUnarySyncAsync with which - to invoke the RPC method. If the requested attribute is the name of a - unary-stream RPC method, the value of the attribute will be a callable taking - a request object and a timeout parameter and returning a CancellableIterator - that yields the response values of the RPC. If the requested attribute is the - name of a stream-unary RPC method, the value of the attribute will be a - StreamUnarySyncAsync with which to invoke the RPC method. If the requested - attribute is the name of a stream-stream RPC method, the value of the - attribute will be a callable taking an iterator of request objects and a - timeout and returning a CancellableIterator that yields the response values - of the RPC. - - In all cases indication of abortion is indicated by raising of - exceptions.RpcError, exceptions.CancellationError, - and exceptions.ExpirationError. - """ - - -class Server(six.with_metaclass(abc.ABCMeta, activated.Activated)): - """A GRPC Server.""" - - @abc.abstractmethod - def port(self): - """Reports the port on which the server is serving. - - This method may only be called while the server is activated. - - Returns: - The port on which the server is serving. - """ - raise NotImplementedError() diff --git a/src/python/grpcio/grpc/framework/alpha/utilities.py b/src/python/grpcio/grpc/framework/alpha/utilities.py deleted file mode 100644 index 7d7f78f5e44..00000000000 --- a/src/python/grpcio/grpc/framework/alpha/utilities.py +++ /dev/null @@ -1,269 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Utilities for use with GRPC.""" - -from grpc.framework.alpha import interfaces - - -class _RpcMethodDescription( - interfaces.RpcMethodInvocationDescription, - interfaces.RpcMethodServiceDescription): - - def __init__( - self, cardinality, unary_unary, unary_stream, stream_unary, - stream_stream, request_serializer, request_deserializer, - response_serializer, response_deserializer): - self._cardinality = cardinality - self._unary_unary = unary_unary - self._unary_stream = unary_stream - self._stream_unary = stream_unary - self._stream_stream = stream_stream - self._request_serializer = request_serializer - self._request_deserializer = request_deserializer - self._response_serializer = response_serializer - self._response_deserializer = response_deserializer - - def cardinality(self): - """See interfaces.RpcMethodDescription.cardinality for specification.""" - return self._cardinality - - def serialize_request(self, request): - """See interfaces.RpcMethodInvocationDescription.serialize_request.""" - return self._request_serializer(request) - - def deserialize_request(self, serialized_request): - """See interfaces.RpcMethodServiceDescription.deserialize_request.""" - return self._request_deserializer(serialized_request) - - def serialize_response(self, response): - """See interfaces.RpcMethodServiceDescription.serialize_response.""" - return self._response_serializer(response) - - def deserialize_response(self, serialized_response): - """See interfaces.RpcMethodInvocationDescription.deserialize_response.""" - return self._response_deserializer(serialized_response) - - def service_unary_unary(self, request, context): - """See interfaces.RpcMethodServiceDescription.service_unary_unary.""" - return self._unary_unary(request, context) - - def service_unary_stream(self, request, context): - """See interfaces.RpcMethodServiceDescription.service_unary_stream.""" - return self._unary_stream(request, context) - - def service_stream_unary(self, request_iterator, context): - """See interfaces.RpcMethodServiceDescription.service_stream_unary.""" - return self._stream_unary(request_iterator, context) - - def service_stream_stream(self, request_iterator, context): - """See interfaces.RpcMethodServiceDescription.service_stream_stream.""" - return self._stream_stream(request_iterator, context) - - -def unary_unary_invocation_description( - request_serializer, response_deserializer): - """Creates an interfaces.RpcMethodInvocationDescription for an RPC method. - - Args: - request_serializer: A callable that when called on a request - value returns a bytestring corresponding to that value. - response_deserializer: A callable that when called on a - bytestring returns the response value corresponding to - that bytestring. - - Returns: - An interfaces.RpcMethodInvocationDescription constructed from the given - arguments representing a unary-request/unary-response RPC method. - """ - return _RpcMethodDescription( - interfaces.Cardinality.UNARY_UNARY, None, None, None, None, - request_serializer, None, None, response_deserializer) - - -def unary_stream_invocation_description( - request_serializer, response_deserializer): - """Creates an interfaces.RpcMethodInvocationDescription for an RPC method. - - Args: - request_serializer: A callable that when called on a request - value returns a bytestring corresponding to that value. - response_deserializer: A callable that when called on a - bytestring returns the response value corresponding to - that bytestring. - - Returns: - An interfaces.RpcMethodInvocationDescription constructed from the given - arguments representing a unary-request/streaming-response RPC method. - """ - return _RpcMethodDescription( - interfaces.Cardinality.UNARY_STREAM, None, None, None, None, - request_serializer, None, None, response_deserializer) - - -def stream_unary_invocation_description( - request_serializer, response_deserializer): - """Creates an interfaces.RpcMethodInvocationDescription for an RPC method. - - Args: - request_serializer: A callable that when called on a request - value returns a bytestring corresponding to that value. - response_deserializer: A callable that when called on a - bytestring returns the response value corresponding to - that bytestring. - - Returns: - An interfaces.RpcMethodInvocationDescription constructed from the given - arguments representing a streaming-request/unary-response RPC method. - """ - return _RpcMethodDescription( - interfaces.Cardinality.STREAM_UNARY, None, None, None, None, - request_serializer, None, None, response_deserializer) - - -def stream_stream_invocation_description( - request_serializer, response_deserializer): - """Creates an interfaces.RpcMethodInvocationDescription for an RPC method. - - Args: - request_serializer: A callable that when called on a request - value returns a bytestring corresponding to that value. - response_deserializer: A callable that when called on a - bytestring returns the response value corresponding to - that bytestring. - - Returns: - An interfaces.RpcMethodInvocationDescription constructed from the given - arguments representing a streaming-request/streaming-response RPC - method. - """ - return _RpcMethodDescription( - interfaces.Cardinality.STREAM_STREAM, None, None, None, None, - request_serializer, None, None, response_deserializer) - - -def unary_unary_service_description( - behavior, request_deserializer, response_serializer): - """Creates an interfaces.RpcMethodServiceDescription for the given behavior. - - Args: - behavior: A callable that implements a unary-unary RPC - method that accepts a single request and an interfaces.RpcContext and - returns a single response. - request_deserializer: A callable that when called on a - bytestring returns the request value corresponding to that - bytestring. - response_serializer: A callable that when called on a - response value returns the bytestring corresponding to - that value. - - Returns: - An interfaces.RpcMethodServiceDescription constructed from the given - arguments representing a unary-request/unary-response RPC - method. - """ - return _RpcMethodDescription( - interfaces.Cardinality.UNARY_UNARY, behavior, None, None, None, - None, request_deserializer, response_serializer, None) - - -def unary_stream_service_description( - behavior, request_deserializer, response_serializer): - """Creates an interfaces.RpcMethodServiceDescription for the given behavior. - - Args: - behavior: A callable that implements a unary-stream RPC - method that accepts a single request and an interfaces.RpcContext - and returns an iterator of zero or more responses. - request_deserializer: A callable that when called on a - bytestring returns the request value corresponding to that - bytestring. - response_serializer: A callable that when called on a - response value returns the bytestring corresponding to - that value. - - Returns: - An interfaces.RpcMethodServiceDescription constructed from the given - arguments representing a unary-request/streaming-response - RPC method. - """ - return _RpcMethodDescription( - interfaces.Cardinality.UNARY_STREAM, None, behavior, None, None, - None, request_deserializer, response_serializer, None) - - -def stream_unary_service_description( - behavior, request_deserializer, response_serializer): - """Creates an interfaces.RpcMethodServiceDescription for the given behavior. - - Args: - behavior: A callable that implements a stream-unary RPC - method that accepts an iterator of zero or more requests - and an interfaces.RpcContext and returns a single response. - request_deserializer: A callable that when called on a - bytestring returns the request value corresponding to that - bytestring. - response_serializer: A callable that when called on a - response value returns the bytestring corresponding to - that value. - - Returns: - An interfaces.RpcMethodServiceDescription constructed from the given - arguments representing a streaming-request/unary-response - RPC method. - """ - return _RpcMethodDescription( - interfaces.Cardinality.STREAM_UNARY, None, None, behavior, None, - None, request_deserializer, response_serializer, None) - - -def stream_stream_service_description( - behavior, request_deserializer, response_serializer): - """Creates an interfaces.RpcMethodServiceDescription for the given behavior. - - Args: - behavior: A callable that implements a stream-stream RPC - method that accepts an iterator of zero or more requests - and an interfaces.RpcContext and returns an iterator of - zero or more responses. - request_deserializer: A callable that when called on a - bytestring returns the request value corresponding to that - bytestring. - response_serializer: A callable that when called on a - response value returns the bytestring corresponding to - that value. - - Returns: - An interfaces.RpcMethodServiceDescription constructed from the given - arguments representing a - streaming-request/streaming-response RPC method. - """ - return _RpcMethodDescription( - interfaces.Cardinality.STREAM_STREAM, None, None, None, behavior, - None, request_deserializer, response_serializer, None) diff --git a/src/python/grpcio/grpc/framework/base/__init__.py b/src/python/grpcio/grpc/framework/base/__init__.py deleted file mode 100644 index bff74be2c7b..00000000000 --- a/src/python/grpcio/grpc/framework/base/__init__.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import warnings - -warnings.simplefilter('always', DeprecationWarning) -warnings.warn('the alpha API (includes this package) is deprecated, ' - 'unmaintained, and no longer tested. Please migrate to the beta ' - 'API.', DeprecationWarning, stacklevel=2) diff --git a/src/python/grpcio/grpc/framework/base/_cancellation.py b/src/python/grpcio/grpc/framework/base/_cancellation.py deleted file mode 100644 index ffbc90668fb..00000000000 --- a/src/python/grpcio/grpc/framework/base/_cancellation.py +++ /dev/null @@ -1,64 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""State and behavior for operation cancellation.""" - -from grpc.framework.base import _interfaces -from grpc.framework.base import interfaces - - -class CancellationManager(_interfaces.CancellationManager): - """An implementation of _interfaces.CancellationManager.""" - - def __init__( - self, lock, termination_manager, transmission_manager, ingestion_manager, - expiration_manager): - """Constructor. - - Args: - lock: The operation-wide lock. - termination_manager: The _interfaces.TerminationManager for the operation. - transmission_manager: The _interfaces.TransmissionManager for the - operation. - ingestion_manager: The _interfaces.IngestionManager for the operation. - expiration_manager: The _interfaces.ExpirationManager for the operation. - """ - self._lock = lock - self._termination_manager = termination_manager - self._transmission_manager = transmission_manager - self._ingestion_manager = ingestion_manager - self._expiration_manager = expiration_manager - - def cancel(self): - """See _interfaces.CancellationManager.cancel for specification.""" - with self._lock: - self._termination_manager.abort(interfaces.Outcome.CANCELLED) - self._transmission_manager.abort(interfaces.Outcome.CANCELLED) - self._ingestion_manager.abort() - self._expiration_manager.abort() diff --git a/src/python/grpcio/grpc/framework/base/_constants.py b/src/python/grpcio/grpc/framework/base/_constants.py deleted file mode 100644 index 8fbdc82782a..00000000000 --- a/src/python/grpcio/grpc/framework/base/_constants.py +++ /dev/null @@ -1,32 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Private constants for the package.""" - -INTERNAL_ERROR_LOG_MESSAGE = ':-( RPC Framework (Base) internal error! :-(' diff --git a/src/python/grpcio/grpc/framework/base/_context.py b/src/python/grpcio/grpc/framework/base/_context.py deleted file mode 100644 index d84871d6399..00000000000 --- a/src/python/grpcio/grpc/framework/base/_context.py +++ /dev/null @@ -1,99 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""State and behavior for operation context.""" - -import time - -# _interfaces is referenced from specification in this module. -from grpc.framework.base import interfaces -from grpc.framework.base import _interfaces # pylint: disable=unused-import - - -class OperationContext(interfaces.OperationContext): - """An implementation of interfaces.OperationContext.""" - - def __init__( - self, lock, operation_id, local_failure, termination_manager, - transmission_manager): - """Constructor. - - Args: - lock: The operation-wide lock. - operation_id: An object identifying the operation. - local_failure: Whichever one of interfaces.Outcome.SERVICED_FAILURE or - interfaces.Outcome.SERVICER_FAILURE describes local failure of - customer code. - termination_manager: The _interfaces.TerminationManager for the operation. - transmission_manager: The _interfaces.TransmissionManager for the - operation. - """ - self._lock = lock - self._local_failure = local_failure - self._termination_manager = termination_manager - self._transmission_manager = transmission_manager - self._ingestion_manager = None - self._expiration_manager = None - - self.operation_id = operation_id - - def set_ingestion_and_expiration_managers( - self, ingestion_manager, expiration_manager): - """Sets managers with which this OperationContext cooperates. - - Args: - ingestion_manager: The _interfaces.IngestionManager for the operation. - expiration_manager: The _interfaces.ExpirationManager for the operation. - """ - self._ingestion_manager = ingestion_manager - self._expiration_manager = expiration_manager - - def is_active(self): - """See interfaces.OperationContext.is_active for specification.""" - with self._lock: - return self._termination_manager.is_active() - - def add_termination_callback(self, callback): - """See interfaces.OperationContext.add_termination_callback.""" - with self._lock: - self._termination_manager.add_callback(callback) - - def time_remaining(self): - """See interfaces.OperationContext.time_remaining for specification.""" - with self._lock: - deadline = self._expiration_manager.deadline() - return max(0.0, deadline - time.time()) - - def fail(self, exception): - """See interfaces.OperationContext.fail for specification.""" - with self._lock: - self._termination_manager.abort(self._local_failure) - self._transmission_manager.abort(self._local_failure) - self._ingestion_manager.abort() - self._expiration_manager.abort() diff --git a/src/python/grpcio/grpc/framework/base/_emission.py b/src/python/grpcio/grpc/framework/base/_emission.py deleted file mode 100644 index 1829669a72b..00000000000 --- a/src/python/grpcio/grpc/framework/base/_emission.py +++ /dev/null @@ -1,125 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""State and behavior for handling emitted values.""" - -from grpc.framework.base import interfaces -from grpc.framework.base import _interfaces - - -class _EmissionManager(_interfaces.EmissionManager): - """An implementation of _interfaces.EmissionManager.""" - - def __init__( - self, lock, failure_outcome, termination_manager, transmission_manager): - """Constructor. - - Args: - lock: The operation-wide lock. - failure_outcome: Whichever one of interfaces.Outcome.SERVICED_FAILURE or - interfaces.Outcome.SERVICER_FAILURE describes this object's methods - being called inappropriately by customer code. - termination_manager: The _interfaces.TerminationManager for the operation. - transmission_manager: The _interfaces.TransmissionManager for the - operation. - """ - self._lock = lock - self._failure_outcome = failure_outcome - self._termination_manager = termination_manager - self._transmission_manager = transmission_manager - self._ingestion_manager = None - self._expiration_manager = None - - self._emission_complete = False - - def set_ingestion_manager_and_expiration_manager( - self, ingestion_manager, expiration_manager): - self._ingestion_manager = ingestion_manager - self._expiration_manager = expiration_manager - - def _abort(self): - self._termination_manager.abort(self._failure_outcome) - self._transmission_manager.abort(self._failure_outcome) - self._ingestion_manager.abort() - self._expiration_manager.abort() - - def consume(self, value): - with self._lock: - if self._emission_complete: - self._abort() - else: - self._transmission_manager.inmit(value, False) - - def terminate(self): - with self._lock: - if not self._emission_complete: - self._termination_manager.emission_complete() - self._transmission_manager.inmit(None, True) - self._emission_complete = True - - def consume_and_terminate(self, value): - with self._lock: - if self._emission_complete: - self._abort() - else: - self._termination_manager.emission_complete() - self._transmission_manager.inmit(value, True) - self._emission_complete = True - - -def front_emission_manager(lock, termination_manager, transmission_manager): - """Creates an _interfaces.EmissionManager appropriate for front-side use. - - Args: - lock: The operation-wide lock. - termination_manager: The _interfaces.TerminationManager for the operation. - transmission_manager: The _interfaces.TransmissionManager for the operation. - - Returns: - An _interfaces.EmissionManager appropriate for front-side use. - """ - return _EmissionManager( - lock, interfaces.Outcome.SERVICED_FAILURE, termination_manager, - transmission_manager) - - -def back_emission_manager(lock, termination_manager, transmission_manager): - """Creates an _interfaces.EmissionManager appropriate for back-side use. - - Args: - lock: The operation-wide lock. - termination_manager: The _interfaces.TerminationManager for the operation. - transmission_manager: The _interfaces.TransmissionManager for the operation. - - Returns: - An _interfaces.EmissionManager appropriate for back-side use. - """ - return _EmissionManager( - lock, interfaces.Outcome.SERVICER_FAILURE, termination_manager, - transmission_manager) diff --git a/src/python/grpcio/grpc/framework/base/_ends.py b/src/python/grpcio/grpc/framework/base/_ends.py deleted file mode 100644 index 176f3ac06e3..00000000000 --- a/src/python/grpcio/grpc/framework/base/_ends.py +++ /dev/null @@ -1,399 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Implementations of FrontLinks and BackLinks.""" - -import collections -import threading -import uuid - -# _interfaces is referenced from specification in this module. -from grpc.framework.base import _cancellation -from grpc.framework.base import _context -from grpc.framework.base import _emission -from grpc.framework.base import _expiration -from grpc.framework.base import _ingestion -from grpc.framework.base import _interfaces # pylint: disable=unused-import -from grpc.framework.base import _reception -from grpc.framework.base import _termination -from grpc.framework.base import _transmission -from grpc.framework.base import interfaces -from grpc.framework.foundation import callable_util - -_IDLE_ACTION_EXCEPTION_LOG_MESSAGE = 'Exception calling idle action!' - - -class _EasyOperation(interfaces.Operation): - """A trivial implementation of interfaces.Operation.""" - - def __init__(self, emission_manager, context, cancellation_manager): - """Constructor. - - Args: - emission_manager: The _interfaces.EmissionManager for the operation that - will accept values emitted by customer code. - context: The interfaces.OperationContext for use by the customer - during the operation. - cancellation_manager: The _interfaces.CancellationManager for the - operation. - """ - self.consumer = emission_manager - self.context = context - self._cancellation_manager = cancellation_manager - - def cancel(self): - self._cancellation_manager.cancel() - - -class _Endlette(object): - """Utility for stateful behavior common to Fronts and Backs.""" - - def __init__(self, pool): - """Constructor. - - Args: - pool: A thread pool to use when calling registered idle actions. - """ - self._lock = threading.Lock() - self._pool = pool - # Dictionary from operation IDs to ReceptionManager-or-None. A None value - # indicates an in-progress fire-and-forget operation for which the customer - # has chosen to ignore results. - self._operations = {} - self._stats = {outcome: 0 for outcome in interfaces.Outcome} - self._idle_actions = [] - - def terminal_action(self, operation_id): - """Constructs the termination action for a single operation. - - Args: - operation_id: An operation ID. - - Returns: - A callable that takes an operation outcome for an argument to be used as - the termination action for the operation associated with the given - operation ID. - """ - def termination_action(outcome): - with self._lock: - self._stats[outcome] += 1 - self._operations.pop(operation_id, None) - if not self._operations: - for action in self._idle_actions: - self._pool.submit(callable_util.with_exceptions_logged( - action, _IDLE_ACTION_EXCEPTION_LOG_MESSAGE)) - self._idle_actions = [] - return termination_action - - def __enter__(self): - self._lock.acquire() - - def __exit__(self, exc_type, exc_val, exc_tb): - self._lock.release() - - def get_operation(self, operation_id): - return self._operations.get(operation_id, None) - - def add_operation(self, operation_id, operation_reception_manager): - self._operations[operation_id] = operation_reception_manager - - def operation_stats(self): - with self._lock: - return dict(self._stats) - - def add_idle_action(self, action): - with self._lock: - if self._operations: - self._idle_actions.append(action) - else: - self._pool.submit(callable_util.with_exceptions_logged( - action, _IDLE_ACTION_EXCEPTION_LOG_MESSAGE)) - - -class _FrontManagement( - collections.namedtuple( - '_FrontManagement', - ('reception', 'emission', 'operation', 'cancellation'))): - """Just a trivial helper class to bundle four fellow-traveling objects.""" - - -def _front_operate( - callback, work_pool, transmission_pool, utility_pool, - termination_action, operation_id, name, payload, complete, timeout, - subscription, trace_id): - """Constructs objects necessary for front-side operation management. - - Args: - callback: A callable that accepts interfaces.FrontToBackTickets and - delivers them to the other side of the operation. Execution of this - callable may take any arbitrary length of time. - work_pool: A thread pool in which to execute customer code. - transmission_pool: A thread pool to use for transmitting to the other side - of the operation. - utility_pool: A thread pool for utility tasks. - termination_action: A no-arg behavior to be called upon operation - completion. - operation_id: An object identifying the operation. - name: The name of the method being called during the operation. - payload: The first customer-significant value to be transmitted to the other - side. May be None if there is no such value or if the customer chose not - to pass it at operation invocation. - complete: A boolean indicating whether or not additional payloads will be - supplied by the customer. - timeout: A length of time in seconds to allow for the operation. - subscription: A interfaces.ServicedSubscription describing the - customer's interest in the results of the operation. - trace_id: A uuid.UUID identifying a set of related operations to which this - operation belongs. May be None. - - Returns: - A _FrontManagement object bundling together the - _interfaces.ReceptionManager, _interfaces.EmissionManager, - _context.OperationContext, and _interfaces.CancellationManager for the - operation. - """ - lock = threading.Lock() - with lock: - termination_manager = _termination.front_termination_manager( - work_pool, utility_pool, termination_action, subscription.kind) - transmission_manager = _transmission.front_transmission_manager( - lock, transmission_pool, callback, operation_id, name, - subscription.kind, trace_id, timeout, termination_manager) - operation_context = _context.OperationContext( - lock, operation_id, interfaces.Outcome.SERVICED_FAILURE, - termination_manager, transmission_manager) - emission_manager = _emission.front_emission_manager( - lock, termination_manager, transmission_manager) - ingestion_manager = _ingestion.front_ingestion_manager( - lock, work_pool, subscription, termination_manager, - transmission_manager, operation_context) - expiration_manager = _expiration.front_expiration_manager( - lock, termination_manager, transmission_manager, ingestion_manager, - timeout) - reception_manager = _reception.front_reception_manager( - lock, termination_manager, transmission_manager, ingestion_manager, - expiration_manager) - cancellation_manager = _cancellation.CancellationManager( - lock, termination_manager, transmission_manager, ingestion_manager, - expiration_manager) - - termination_manager.set_expiration_manager(expiration_manager) - transmission_manager.set_ingestion_and_expiration_managers( - ingestion_manager, expiration_manager) - operation_context.set_ingestion_and_expiration_managers( - ingestion_manager, expiration_manager) - emission_manager.set_ingestion_manager_and_expiration_manager( - ingestion_manager, expiration_manager) - ingestion_manager.set_expiration_manager(expiration_manager) - - transmission_manager.inmit(payload, complete) - - if subscription.kind is interfaces.ServicedSubscription.Kind.NONE: - returned_reception_manager = None - else: - returned_reception_manager = reception_manager - - return _FrontManagement( - returned_reception_manager, emission_manager, operation_context, - cancellation_manager) - - -class FrontLink(interfaces.FrontLink): - """An implementation of interfaces.FrontLink.""" - - def __init__(self, work_pool, transmission_pool, utility_pool): - """Constructor. - - Args: - work_pool: A thread pool to be used for executing customer code. - transmission_pool: A thread pool to be used for transmitting values to - the other side of the operation. - utility_pool: A thread pool to be used for utility tasks. - """ - self._endlette = _Endlette(utility_pool) - self._work_pool = work_pool - self._transmission_pool = transmission_pool - self._utility_pool = utility_pool - self._callback = None - - self._operations = {} - - def join_rear_link(self, rear_link): - """See interfaces.ForeLink.join_rear_link for specification.""" - with self._endlette: - self._callback = rear_link.accept_front_to_back_ticket - - def operation_stats(self): - """See interfaces.End.operation_stats for specification.""" - return self._endlette.operation_stats() - - def add_idle_action(self, action): - """See interfaces.End.add_idle_action for specification.""" - self._endlette.add_idle_action(action) - - def operate( - self, name, payload, complete, timeout, subscription, trace_id): - """See interfaces.Front.operate for specification.""" - operation_id = uuid.uuid4() - with self._endlette: - management = _front_operate( - self._callback, self._work_pool, self._transmission_pool, - self._utility_pool, self._endlette.terminal_action(operation_id), - operation_id, name, payload, complete, timeout, subscription, - trace_id) - self._endlette.add_operation(operation_id, management.reception) - return _EasyOperation( - management.emission, management.operation, management.cancellation) - - def accept_back_to_front_ticket(self, ticket): - """See interfaces.End.act for specification.""" - with self._endlette: - reception_manager = self._endlette.get_operation(ticket.operation_id) - if reception_manager: - reception_manager.receive_ticket(ticket) - - -def _back_operate( - servicer, callback, work_pool, transmission_pool, utility_pool, - termination_action, ticket, default_timeout, maximum_timeout): - """Constructs objects necessary for back-side operation management. - - Also begins back-side operation by feeding the first received ticket into the - constructed _interfaces.ReceptionManager. - - Args: - servicer: An interfaces.Servicer for servicing operations. - callback: A callable that accepts interfaces.BackToFrontTickets and - delivers them to the other side of the operation. Execution of this - callable may take any arbitrary length of time. - work_pool: A thread pool in which to execute customer code. - transmission_pool: A thread pool to use for transmitting to the other side - of the operation. - utility_pool: A thread pool for utility tasks. - termination_action: A no-arg behavior to be called upon operation - completion. - ticket: The first interfaces.FrontToBackTicket received for the operation. - default_timeout: A length of time in seconds to be used as the default - time alloted for a single operation. - maximum_timeout: A length of time in seconds to be used as the maximum - time alloted for a single operation. - - Returns: - The _interfaces.ReceptionManager to be used for the operation. - """ - lock = threading.Lock() - with lock: - termination_manager = _termination.back_termination_manager( - work_pool, utility_pool, termination_action, ticket.subscription) - transmission_manager = _transmission.back_transmission_manager( - lock, transmission_pool, callback, ticket.operation_id, - termination_manager, ticket.subscription) - operation_context = _context.OperationContext( - lock, ticket.operation_id, interfaces.Outcome.SERVICER_FAILURE, - termination_manager, transmission_manager) - emission_manager = _emission.back_emission_manager( - lock, termination_manager, transmission_manager) - ingestion_manager = _ingestion.back_ingestion_manager( - lock, work_pool, servicer, termination_manager, - transmission_manager, operation_context, emission_manager) - expiration_manager = _expiration.back_expiration_manager( - lock, termination_manager, transmission_manager, ingestion_manager, - ticket.timeout, default_timeout, maximum_timeout) - reception_manager = _reception.back_reception_manager( - lock, termination_manager, transmission_manager, ingestion_manager, - expiration_manager) - - termination_manager.set_expiration_manager(expiration_manager) - transmission_manager.set_ingestion_and_expiration_managers( - ingestion_manager, expiration_manager) - operation_context.set_ingestion_and_expiration_managers( - ingestion_manager, expiration_manager) - emission_manager.set_ingestion_manager_and_expiration_manager( - ingestion_manager, expiration_manager) - ingestion_manager.set_expiration_manager(expiration_manager) - - reception_manager.receive_ticket(ticket) - - return reception_manager - - -class BackLink(interfaces.BackLink): - """An implementation of interfaces.BackLink.""" - - def __init__( - self, servicer, work_pool, transmission_pool, utility_pool, - default_timeout, maximum_timeout): - """Constructor. - - Args: - servicer: An interfaces.Servicer for servicing operations. - work_pool: A thread pool in which to execute customer code. - transmission_pool: A thread pool to use for transmitting to the other side - of the operation. - utility_pool: A thread pool for utility tasks. - default_timeout: A length of time in seconds to be used as the default - time alloted for a single operation. - maximum_timeout: A length of time in seconds to be used as the maximum - time alloted for a single operation. - """ - self._endlette = _Endlette(utility_pool) - self._servicer = servicer - self._work_pool = work_pool - self._transmission_pool = transmission_pool - self._utility_pool = utility_pool - self._default_timeout = default_timeout - self._maximum_timeout = maximum_timeout - self._callback = None - - def join_fore_link(self, fore_link): - """See interfaces.RearLink.join_fore_link for specification.""" - with self._endlette: - self._callback = fore_link.accept_back_to_front_ticket - - def accept_front_to_back_ticket(self, ticket): - """See interfaces.RearLink.accept_front_to_back_ticket for specification.""" - with self._endlette: - reception_manager = self._endlette.get_operation(ticket.operation_id) - if reception_manager is None: - reception_manager = _back_operate( - self._servicer, self._callback, self._work_pool, - self._transmission_pool, self._utility_pool, - self._endlette.terminal_action(ticket.operation_id), ticket, - self._default_timeout, self._maximum_timeout) - self._endlette.add_operation(ticket.operation_id, reception_manager) - else: - reception_manager.receive_ticket(ticket) - - def operation_stats(self): - """See interfaces.End.operation_stats for specification.""" - return self._endlette.operation_stats() - - def add_idle_action(self, action): - """See interfaces.End.add_idle_action for specification.""" - self._endlette.add_idle_action(action) diff --git a/src/python/grpcio/grpc/framework/base/_expiration.py b/src/python/grpcio/grpc/framework/base/_expiration.py deleted file mode 100644 index 17acbef4c11..00000000000 --- a/src/python/grpcio/grpc/framework/base/_expiration.py +++ /dev/null @@ -1,158 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""State and behavior for operation expiration.""" - -import time - -from grpc.framework.base import _interfaces -from grpc.framework.base import interfaces -from grpc.framework.foundation import later - - -class _ExpirationManager(_interfaces.ExpirationManager): - """An implementation of _interfaces.ExpirationManager.""" - - def __init__( - self, lock, termination_manager, transmission_manager, ingestion_manager, - commencement, timeout, maximum_timeout): - """Constructor. - - Args: - lock: The operation-wide lock. - termination_manager: The _interfaces.TerminationManager for the operation. - transmission_manager: The _interfaces.TransmissionManager for the - operation. - ingestion_manager: The _interfaces.IngestionManager for the operation. - commencement: The time in seconds since the epoch at which the operation - began. - timeout: A length of time in seconds to allow for the operation to run. - maximum_timeout: The maximum length of time in seconds to allow for the - operation to run despite what is requested via this object's - change_timout method. - """ - self._lock = lock - self._termination_manager = termination_manager - self._transmission_manager = transmission_manager - self._ingestion_manager = ingestion_manager - self._commencement = commencement - self._maximum_timeout = maximum_timeout - - self._timeout = timeout - self._deadline = commencement + timeout - self._index = None - self._future = None - - def _expire(self, index): - with self._lock: - if self._future is not None and index == self._index: - self._future = None - self._termination_manager.abort(interfaces.Outcome.EXPIRED) - self._transmission_manager.abort(interfaces.Outcome.EXPIRED) - self._ingestion_manager.abort() - - def start(self): - self._index = 0 - self._future = later.later(self._timeout, lambda: self._expire(0)) - - def change_timeout(self, timeout): - if self._future is not None and timeout != self._timeout: - self._future.cancel() - new_timeout = min(timeout, self._maximum_timeout) - new_index = self._index + 1 - self._timeout = new_timeout - self._deadline = self._commencement + new_timeout - self._index = new_index - delay = self._deadline - time.time() - self._future = later.later( - delay, lambda: self._expire(new_index)) - - def deadline(self): - return self._deadline - - def abort(self): - if self._future: - self._future.cancel() - self._future = None - self._deadline_index = None - - -def front_expiration_manager( - lock, termination_manager, transmission_manager, ingestion_manager, - timeout): - """Creates an _interfaces.ExpirationManager appropriate for front-side use. - - Args: - lock: The operation-wide lock. - termination_manager: The _interfaces.TerminationManager for the operation. - transmission_manager: The _interfaces.TransmissionManager for the - operation. - ingestion_manager: The _interfaces.IngestionManager for the operation. - timeout: A length of time in seconds to allow for the operation to run. - - Returns: - An _interfaces.ExpirationManager appropriate for front-side use. - """ - commencement = time.time() - expiration_manager = _ExpirationManager( - lock, termination_manager, transmission_manager, ingestion_manager, - commencement, timeout, timeout) - expiration_manager.start() - return expiration_manager - - -def back_expiration_manager( - lock, termination_manager, transmission_manager, ingestion_manager, - timeout, default_timeout, maximum_timeout): - """Creates an _interfaces.ExpirationManager appropriate for back-side use. - - Args: - lock: The operation-wide lock. - termination_manager: The _interfaces.TerminationManager for the operation. - transmission_manager: The _interfaces.TransmissionManager for the - operation. - ingestion_manager: The _interfaces.IngestionManager for the operation. - timeout: A length of time in seconds to allow for the operation to run. May - be None in which case default_timeout will be used. - default_timeout: The default length of time in seconds to allow for the - operation to run if the front-side customer has not specified such a value - (or if the value they specified is not yet known). - maximum_timeout: The maximum length of time in seconds to allow for the - operation to run. - - Returns: - An _interfaces.ExpirationManager appropriate for back-side use. - """ - commencement = time.time() - expiration_manager = _ExpirationManager( - lock, termination_manager, transmission_manager, ingestion_manager, - commencement, default_timeout if timeout is None else timeout, - maximum_timeout) - expiration_manager.start() - return expiration_manager diff --git a/src/python/grpcio/grpc/framework/base/_ingestion.py b/src/python/grpcio/grpc/framework/base/_ingestion.py deleted file mode 100644 index c9b10acb77a..00000000000 --- a/src/python/grpcio/grpc/framework/base/_ingestion.py +++ /dev/null @@ -1,443 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""State and behavior for ingestion during an operation.""" - -import abc -import collections - -import six - -from grpc.framework.base import _constants -from grpc.framework.base import _interfaces -from grpc.framework.base import exceptions -from grpc.framework.base import interfaces -from grpc.framework.foundation import abandonment -from grpc.framework.foundation import callable_util -from grpc.framework.foundation import stream - -_CREATE_CONSUMER_EXCEPTION_LOG_MESSAGE = 'Exception initializing ingestion!' -_CONSUME_EXCEPTION_LOG_MESSAGE = 'Exception during ingestion!' - - -class _ConsumerCreation(collections.namedtuple( - '_ConsumerCreation', ('consumer', 'remote_error', 'abandoned'))): - """A sum type for the outcome of ingestion initialization. - - Either consumer will be non-None, remote_error will be True, or abandoned will - be True. - - Attributes: - consumer: A stream.Consumer for ingesting payloads. - remote_error: A boolean indicating that the consumer could not be created - due to an error on the remote side of the operation. - abandoned: A boolean indicating that the consumer creation was abandoned. - """ - - -class _EmptyConsumer(stream.Consumer): - """A no-operative stream.Consumer that ignores all inputs and calls.""" - - def consume(self, value): - """See stream.Consumer.consume for specification.""" - - def terminate(self): - """See stream.Consumer.terminate for specification.""" - - def consume_and_terminate(self, value): - """See stream.Consumer.consume_and_terminate for specification.""" - - -class _ConsumerCreator(six.with_metaclass(abc.ABCMeta)): - """Common specification of different consumer-creating behavior.""" - - @abc.abstractmethod - def create_consumer(self, requirement): - """Creates the stream.Consumer to which customer payloads will be delivered. - - Any exceptions raised by this method should be attributed to and treated as - defects in the serviced or servicer code called by this method. - - Args: - requirement: A value required by this _ConsumerCreator for consumer - creation. - - Returns: - A _ConsumerCreation describing the result of consumer creation. - """ - raise NotImplementedError() - - -class _FrontConsumerCreator(_ConsumerCreator): - """A _ConsumerCreator appropriate for front-side use.""" - - def __init__(self, subscription, operation_context): - """Constructor. - - Args: - subscription: The serviced's interfaces.ServicedSubscription for the - operation. - operation_context: The interfaces.OperationContext object for the - operation. - """ - self._subscription = subscription - self._operation_context = operation_context - - def create_consumer(self, requirement): - """See _ConsumerCreator.create_consumer for specification.""" - if self._subscription.kind is interfaces.ServicedSubscription.Kind.FULL: - try: - return _ConsumerCreation( - self._subscription.ingestor.consumer(self._operation_context), - False, False) - except abandonment.Abandoned: - return _ConsumerCreation(None, False, True) - else: - return _ConsumerCreation(_EmptyConsumer(), False, False) - - -class _BackConsumerCreator(_ConsumerCreator): - """A _ConsumerCreator appropriate for back-side use.""" - - def __init__(self, servicer, operation_context, emission_consumer): - """Constructor. - - Args: - servicer: The interfaces.Servicer that will service the operation. - operation_context: The interfaces.OperationContext object for the - operation. - emission_consumer: The stream.Consumer object to which payloads emitted - from the operation will be passed. - """ - self._servicer = servicer - self._operation_context = operation_context - self._emission_consumer = emission_consumer - - def create_consumer(self, requirement): - """See _ConsumerCreator.create_consumer for full specification. - - Args: - requirement: The name of the Servicer method to be called during this - operation. - - Returns: - A _ConsumerCreation describing the result of consumer creation. - """ - try: - return _ConsumerCreation( - self._servicer.service( - requirement, self._operation_context, self._emission_consumer), - False, False) - except exceptions.NoSuchMethodError: - return _ConsumerCreation(None, True, False) - except abandonment.Abandoned: - return _ConsumerCreation(None, False, True) - - -class _WrappedConsumer(object): - """Wraps a consumer to catch the exceptions that it is allowed to throw.""" - - def __init__(self, consumer): - """Constructor. - - Args: - consumer: A stream.Consumer that may raise abandonment.Abandoned from any - of its methods. - """ - self._consumer = consumer - - def moar(self, payload, complete): - """Makes progress with the wrapped consumer. - - This method catches all exceptions allowed to be thrown by the wrapped - consumer. Any exceptions raised by this method should be blamed on the - customer-supplied consumer. - - Args: - payload: A customer-significant payload object. May be None only if - complete is True. - complete: Whether or not the end of the payload sequence has been reached. - Must be True if payload is None. - - Returns: - True if the wrapped consumer made progress or False if the wrapped - consumer raised abandonment.Abandoned to indicate its abandonment of - progress. - """ - try: - if payload is None: - self._consumer.terminate() - elif complete: - self._consumer.consume_and_terminate(payload) - else: - self._consumer.consume(payload) - return True - except abandonment.Abandoned: - return False - - -class _IngestionManager(_interfaces.IngestionManager): - """An implementation of _interfaces.IngestionManager.""" - - def __init__( - self, lock, pool, consumer_creator, failure_outcome, termination_manager, - transmission_manager): - """Constructor. - - Args: - lock: The operation-wide lock. - pool: A thread pool in which to execute customer code. - consumer_creator: A _ConsumerCreator wrapping the portion of customer code - that when called returns the stream.Consumer with which the customer - code will ingest payload values. - failure_outcome: Whichever one of - interfaces.Outcome.SERVICED_FAILURE or - interfaces.Outcome.SERVICER_FAILURE describes local failure of - customer code. - termination_manager: The _interfaces.TerminationManager for the operation. - transmission_manager: The _interfaces.TransmissionManager for the - operation. - """ - self._lock = lock - self._pool = pool - self._consumer_creator = consumer_creator - self._failure_outcome = failure_outcome - self._termination_manager = termination_manager - self._transmission_manager = transmission_manager - self._expiration_manager = None - - self._wrapped_ingestion_consumer = None - self._pending_ingestion = [] - self._ingestion_complete = False - self._processing = False - - def set_expiration_manager(self, expiration_manager): - self._expiration_manager = expiration_manager - - def _abort_internal_only(self): - self._wrapped_ingestion_consumer = None - self._pending_ingestion = None - - def _abort_and_notify(self, outcome): - self._abort_internal_only() - self._termination_manager.abort(outcome) - self._transmission_manager.abort(outcome) - self._expiration_manager.abort() - - def _next(self): - """Computes the next step for ingestion. - - Returns: - A payload, complete, continue triplet indicating what payload (if any) is - available to feed into customer code, whether or not the sequence of - payloads has terminated, and whether or not there is anything - immediately actionable to call customer code to do. - """ - if self._pending_ingestion is None: - return None, False, False - elif self._pending_ingestion: - payload = self._pending_ingestion.pop(0) - complete = self._ingestion_complete and not self._pending_ingestion - return payload, complete, True - elif self._ingestion_complete: - return None, True, True - else: - return None, False, False - - def _process(self, wrapped_ingestion_consumer, payload, complete): - """A method to call to execute customer code. - - This object's lock must *not* be held when calling this method. - - Args: - wrapped_ingestion_consumer: The _WrappedConsumer with which to pass - payloads to customer code. - payload: A customer payload. May be None only if complete is True. - complete: Whether or not the sequence of payloads to pass to the customer - has concluded. - """ - while True: - consumption_outcome = callable_util.call_logging_exceptions( - wrapped_ingestion_consumer.moar, _CONSUME_EXCEPTION_LOG_MESSAGE, - payload, complete) - if consumption_outcome.exception is None: - if consumption_outcome.return_value: - with self._lock: - if complete: - self._pending_ingestion = None - self._termination_manager.ingestion_complete() - return - else: - payload, complete, moar = self._next() - if not moar: - self._processing = False - return - else: - with self._lock: - if self._pending_ingestion is not None: - self._abort_and_notify(self._failure_outcome) - self._processing = False - return - else: - with self._lock: - self._abort_and_notify(self._failure_outcome) - self._processing = False - return - - def start(self, requirement): - if self._pending_ingestion is not None: - def initialize(): - consumer_creation_outcome = callable_util.call_logging_exceptions( - self._consumer_creator.create_consumer, - _CREATE_CONSUMER_EXCEPTION_LOG_MESSAGE, requirement) - if consumer_creation_outcome.return_value is None: - with self._lock: - self._abort_and_notify(self._failure_outcome) - self._processing = False - elif consumer_creation_outcome.return_value.remote_error: - with self._lock: - self._abort_and_notify(interfaces.Outcome.RECEPTION_FAILURE) - self._processing = False - elif consumer_creation_outcome.return_value.abandoned: - with self._lock: - if self._pending_ingestion is not None: - self._abort_and_notify(self._failure_outcome) - self._processing = False - else: - wrapped_ingestion_consumer = _WrappedConsumer( - consumer_creation_outcome.return_value.consumer) - with self._lock: - self._wrapped_ingestion_consumer = wrapped_ingestion_consumer - payload, complete, moar = self._next() - if not moar: - self._processing = False - return - - self._process(wrapped_ingestion_consumer, payload, complete) - - self._pool.submit( - callable_util.with_exceptions_logged( - initialize, _constants.INTERNAL_ERROR_LOG_MESSAGE)) - self._processing = True - - def consume(self, payload): - if self._ingestion_complete: - self._abort_and_notify(self._failure_outcome) - elif self._pending_ingestion is not None: - if self._processing: - self._pending_ingestion.append(payload) - else: - self._pool.submit( - callable_util.with_exceptions_logged( - self._process, _constants.INTERNAL_ERROR_LOG_MESSAGE), - self._wrapped_ingestion_consumer, payload, False) - self._processing = True - - def terminate(self): - if self._ingestion_complete: - self._abort_and_notify(self._failure_outcome) - else: - self._ingestion_complete = True - if self._pending_ingestion is not None and not self._processing: - self._pool.submit( - callable_util.with_exceptions_logged( - self._process, _constants.INTERNAL_ERROR_LOG_MESSAGE), - self._wrapped_ingestion_consumer, None, True) - self._processing = True - - def consume_and_terminate(self, payload): - if self._ingestion_complete: - self._abort_and_notify(self._failure_outcome) - else: - self._ingestion_complete = True - if self._pending_ingestion is not None: - if self._processing: - self._pending_ingestion.append(payload) - else: - self._pool.submit( - callable_util.with_exceptions_logged( - self._process, _constants.INTERNAL_ERROR_LOG_MESSAGE), - self._wrapped_ingestion_consumer, payload, True) - self._processing = True - - def abort(self): - """See _interfaces.IngestionManager.abort for specification.""" - self._abort_internal_only() - - -def front_ingestion_manager( - lock, pool, subscription, termination_manager, transmission_manager, - operation_context): - """Creates an IngestionManager appropriate for front-side use. - - Args: - lock: The operation-wide lock. - pool: A thread pool in which to execute customer code. - subscription: A interfaces.ServicedSubscription indicating the - customer's interest in the results of the operation. - termination_manager: The _interfaces.TerminationManager for the operation. - transmission_manager: The _interfaces.TransmissionManager for the - operation. - operation_context: A interfaces.OperationContext for the operation. - - Returns: - An IngestionManager appropriate for front-side use. - """ - ingestion_manager = _IngestionManager( - lock, pool, _FrontConsumerCreator(subscription, operation_context), - interfaces.Outcome.SERVICED_FAILURE, termination_manager, - transmission_manager) - ingestion_manager.start(None) - return ingestion_manager - - -def back_ingestion_manager( - lock, pool, servicer, termination_manager, transmission_manager, - operation_context, emission_consumer): - """Creates an IngestionManager appropriate for back-side use. - - Args: - lock: The operation-wide lock. - pool: A thread pool in which to execute customer code. - servicer: A interfaces.Servicer for servicing the operation. - termination_manager: The _interfaces.TerminationManager for the operation. - transmission_manager: The _interfaces.TransmissionManager for the - operation. - operation_context: A interfaces.OperationContext for the operation. - emission_consumer: The _interfaces.EmissionConsumer for the operation. - - Returns: - An IngestionManager appropriate for back-side use. - """ - ingestion_manager = _IngestionManager( - lock, pool, _BackConsumerCreator( - servicer, operation_context, emission_consumer), - interfaces.Outcome.SERVICER_FAILURE, termination_manager, - transmission_manager) - return ingestion_manager diff --git a/src/python/grpcio/grpc/framework/base/_interfaces.py b/src/python/grpcio/grpc/framework/base/_interfaces.py deleted file mode 100644 index 6bb9837c4ac..00000000000 --- a/src/python/grpcio/grpc/framework/base/_interfaces.py +++ /dev/null @@ -1,266 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Package-internal interfaces.""" - -import abc - -import six - -# interfaces is referenced from specification in this module. -from grpc.framework.base import interfaces # pylint: disable=unused-import -from grpc.framework.foundation import stream - - -class TerminationManager(six.with_metaclass(abc.ABCMeta)): - """An object responsible for handling the termination of an operation.""" - - @abc.abstractmethod - def set_expiration_manager(self, expiration_manager): - """Sets the ExpirationManager with which this object will cooperate.""" - raise NotImplementedError() - - @abc.abstractmethod - def is_active(self): - """Reports whether or not the operation is active. - - Returns: - True if the operation is active or False if the operation has terminated. - """ - raise NotImplementedError() - - @abc.abstractmethod - def add_callback(self, callback): - """Registers a callback to be called on operation termination. - - If the operation has already terminated, the callback will be called - immediately. - - Args: - callback: A callable that will be passed an interfaces.Outcome value. - """ - raise NotImplementedError() - - @abc.abstractmethod - def emission_complete(self): - """Indicates that emissions from customer code have completed.""" - raise NotImplementedError() - - @abc.abstractmethod - def transmission_complete(self): - """Indicates that transmissions to the remote end are complete.""" - raise NotImplementedError() - - @abc.abstractmethod - def ingestion_complete(self): - """Indicates that customer code ingestion of received values is complete.""" - raise NotImplementedError() - - @abc.abstractmethod - def abort(self, outcome): - """Indicates that the operation must abort for the indicated reason. - - Args: - outcome: An interfaces.Outcome indicating operation abortion. - """ - raise NotImplementedError() - - -class TransmissionManager(six.with_metaclass(abc.ABCMeta)): - """A manager responsible for transmitting to the other end of an operation.""" - - @abc.abstractmethod - def inmit(self, emission, complete): - """Accepts a value for transmission to the other end of the operation. - - Args: - emission: A value of some significance to the customer to be transmitted - to the other end of the operation. May be None only if complete is True. - complete: A boolean that if True indicates that customer code has emitted - all values it intends to emit. - """ - raise NotImplementedError() - - @abc.abstractmethod - def abort(self, outcome): - """Indicates that the operation has aborted for the indicated reason. - - Args: - outcome: An interfaces.Outcome indicating operation abortion. - """ - raise NotImplementedError() - - -class EmissionManager(six.with_metaclass(abc.ABCMeta, stream.Consumer)): - """A manager of values emitted by customer code.""" - - @abc.abstractmethod - def set_ingestion_manager_and_expiration_manager( - self, ingestion_manager, expiration_manager): - """Sets two other objects with which this EmissionManager will cooperate. - - Args: - ingestion_manager: The IngestionManager for the operation. - expiration_manager: The ExpirationManager for the operation. - """ - raise NotImplementedError() - - @abc.abstractmethod - def consume(self, value): - """Accepts a value emitted by customer code. - - This method should only be called by customer code. - - Args: - value: Any value of significance to the customer. - """ - raise NotImplementedError() - - @abc.abstractmethod - def terminate(self): - """Indicates that no more values will be emitted by customer code. - - This method should only be called by customer code. - - Implementations of this method may be idempotent and forgive customer code - calling this method more than once. - """ - raise NotImplementedError() - - @abc.abstractmethod - def consume_and_terminate(self, value): - """Accepts the last value emitted by customer code. - - This method should only be called by customer code. - - Args: - value: Any value of significance to the customer. - """ - raise NotImplementedError() - - -class IngestionManager(six.with_metaclass(abc.ABCMeta, stream.Consumer)): - """A manager responsible for executing customer code.""" - - @abc.abstractmethod - def set_expiration_manager(self, expiration_manager): - """Sets the ExpirationManager with which this object will cooperate.""" - raise NotImplementedError() - - @abc.abstractmethod - def start(self, requirement): - """Commences execution of customer code. - - Args: - requirement: Some value unavailable at the time of this object's - construction that is required to begin executing customer code. - """ - raise NotImplementedError() - - @abc.abstractmethod - def consume(self, payload): - """Accepts a customer-significant value to be supplied to customer code. - - Args: - payload: Some customer-significant value. - """ - raise NotImplementedError() - - @abc.abstractmethod - def terminate(self): - """Indicates the end of values to be supplied to customer code.""" - raise NotImplementedError() - - @abc.abstractmethod - def consume_and_terminate(self, payload): - """Accepts the last value to be supplied to customer code. - - Args: - payload: Some customer-significant value (and the last such value). - """ - raise NotImplementedError() - - @abc.abstractmethod - def abort(self): - """Indicates to this manager that the operation has aborted.""" - raise NotImplementedError() - - -class ExpirationManager(six.with_metaclass(abc.ABCMeta)): - """A manager responsible for aborting the operation if it runs out of time.""" - - @abc.abstractmethod - def change_timeout(self, timeout): - """Changes the timeout allotted for the operation. - - Operation duration is always measure from the beginning of the operation; - calling this method changes the operation's allotted time to timeout total - seconds, not timeout seconds from the time of this method call. - - Args: - timeout: A length of time in seconds to allow for the operation. - """ - raise NotImplementedError() - - @abc.abstractmethod - def deadline(self): - """Returns the time until which the operation is allowed to run. - - Returns: - The time (seconds since the epoch) at which the operation will expire. - """ - raise NotImplementedError() - - @abc.abstractmethod - def abort(self): - """Indicates to this manager that the operation has aborted.""" - raise NotImplementedError() - - -class ReceptionManager(six.with_metaclass(abc.ABCMeta)): - """A manager responsible for receiving tickets from the other end.""" - - @abc.abstractmethod - def receive_ticket(self, ticket): - """Handle a ticket from the other side of the operation. - - Args: - ticket: An interfaces.BackToFrontTicket or interfaces.FrontToBackTicket - appropriate to this end of the operation and this object. - """ - raise NotImplementedError() - - -class CancellationManager(six.with_metaclass(abc.ABCMeta)): - """A manager of operation cancellation.""" - - @abc.abstractmethod - def cancel(self): - """Cancels the operation.""" - raise NotImplementedError() diff --git a/src/python/grpcio/grpc/framework/base/_reception.py b/src/python/grpcio/grpc/framework/base/_reception.py deleted file mode 100644 index a59c5165f9f..00000000000 --- a/src/python/grpcio/grpc/framework/base/_reception.py +++ /dev/null @@ -1,400 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""State and behavior for ticket reception.""" - -import abc - -import six - -from grpc.framework.base import interfaces -from grpc.framework.base import _interfaces - -_INITIAL_FRONT_TO_BACK_TICKET_KINDS = ( - interfaces.FrontToBackTicket.Kind.COMMENCEMENT, - interfaces.FrontToBackTicket.Kind.ENTIRE, -) - - -class _Receiver(six.with_metaclass(abc.ABCMeta)): - """Common specification of different ticket-handling behavior.""" - - @abc.abstractmethod - def abort_if_abortive(self, ticket): - """Aborts the operation if the ticket is abortive. - - Args: - ticket: A just-arrived ticket. - - Returns: - A boolean indicating whether or not this Receiver aborted the operation - based on the ticket. - """ - raise NotImplementedError() - - @abc.abstractmethod - def receive(self, ticket): - """Handles a just-arrived ticket. - - Args: - ticket: A just-arrived ticket. - - Returns: - A boolean indicating whether or not the ticket was terminal (i.e. whether - or not non-abortive tickets are legal after this one). - """ - raise NotImplementedError() - - @abc.abstractmethod - def reception_failure(self): - """Aborts the operation with an indication of reception failure.""" - raise NotImplementedError() - - -def _abort( - outcome, termination_manager, transmission_manager, ingestion_manager, - expiration_manager): - """Indicates abortion with the given outcome to the given managers.""" - termination_manager.abort(outcome) - transmission_manager.abort(outcome) - ingestion_manager.abort() - expiration_manager.abort() - - -def _abort_if_abortive( - ticket, abortive, termination_manager, transmission_manager, - ingestion_manager, expiration_manager): - """Determines a ticket's being abortive and if so aborts the operation. - - Args: - ticket: A just-arrived ticket. - abortive: A callable that takes a ticket and returns an interfaces.Outcome - indicating that the operation should be aborted or None indicating that - the operation should not be aborted. - termination_manager: The operation's _interfaces.TerminationManager. - transmission_manager: The operation's _interfaces.TransmissionManager. - ingestion_manager: The operation's _interfaces.IngestionManager. - expiration_manager: The operation's _interfaces.ExpirationManager. - - Returns: - True if the operation was aborted; False otherwise. - """ - abortion_outcome = abortive(ticket) - if abortion_outcome is None: - return False - else: - _abort( - abortion_outcome, termination_manager, transmission_manager, - ingestion_manager, expiration_manager) - return True - - -def _reception_failure( - termination_manager, transmission_manager, ingestion_manager, - expiration_manager): - """Aborts the operation with an indication of reception failure.""" - _abort( - interfaces.Outcome.RECEPTION_FAILURE, termination_manager, - transmission_manager, ingestion_manager, expiration_manager) - - -class _BackReceiver(_Receiver): - """Ticket-handling specific to the back side of an operation.""" - - def __init__( - self, termination_manager, transmission_manager, ingestion_manager, - expiration_manager): - """Constructor. - - Args: - termination_manager: The operation's _interfaces.TerminationManager. - transmission_manager: The operation's _interfaces.TransmissionManager. - ingestion_manager: The operation's _interfaces.IngestionManager. - expiration_manager: The operation's _interfaces.ExpirationManager. - """ - self._termination_manager = termination_manager - self._transmission_manager = transmission_manager - self._ingestion_manager = ingestion_manager - self._expiration_manager = expiration_manager - - self._first_ticket_seen = False - self._last_ticket_seen = False - - def _abortive(self, ticket): - """Determines whether or not (and if so, how) a ticket is abortive. - - Args: - ticket: A just-arrived ticket. - - Returns: - An interfaces.Outcome value describing operation abortion if the - ticket is abortive or None if the ticket is not abortive. - """ - if ticket.kind is interfaces.FrontToBackTicket.Kind.CANCELLATION: - return interfaces.Outcome.CANCELLED - elif ticket.kind is interfaces.FrontToBackTicket.Kind.EXPIRATION: - return interfaces.Outcome.EXPIRED - elif ticket.kind is interfaces.FrontToBackTicket.Kind.SERVICED_FAILURE: - return interfaces.Outcome.SERVICED_FAILURE - elif ticket.kind is interfaces.FrontToBackTicket.Kind.RECEPTION_FAILURE: - return interfaces.Outcome.SERVICED_FAILURE - elif (ticket.kind in _INITIAL_FRONT_TO_BACK_TICKET_KINDS and - self._first_ticket_seen): - return interfaces.Outcome.RECEPTION_FAILURE - elif self._last_ticket_seen: - return interfaces.Outcome.RECEPTION_FAILURE - else: - return None - - def abort_if_abortive(self, ticket): - """See _Receiver.abort_if_abortive for specification.""" - return _abort_if_abortive( - ticket, self._abortive, self._termination_manager, - self._transmission_manager, self._ingestion_manager, - self._expiration_manager) - - def receive(self, ticket): - """See _Receiver.receive for specification.""" - if ticket.timeout is not None: - self._expiration_manager.change_timeout(ticket.timeout) - - if ticket.kind is interfaces.FrontToBackTicket.Kind.COMMENCEMENT: - self._first_ticket_seen = True - self._ingestion_manager.start(ticket.name) - if ticket.payload is not None: - self._ingestion_manager.consume(ticket.payload) - elif ticket.kind is interfaces.FrontToBackTicket.Kind.CONTINUATION: - self._ingestion_manager.consume(ticket.payload) - elif ticket.kind is interfaces.FrontToBackTicket.Kind.COMPLETION: - self._last_ticket_seen = True - if ticket.payload is None: - self._ingestion_manager.terminate() - else: - self._ingestion_manager.consume_and_terminate(ticket.payload) - else: - self._first_ticket_seen = True - self._last_ticket_seen = True - self._ingestion_manager.start(ticket.name) - if ticket.payload is None: - self._ingestion_manager.terminate() - else: - self._ingestion_manager.consume_and_terminate(ticket.payload) - - def reception_failure(self): - """See _Receiver.reception_failure for specification.""" - _reception_failure( - self._termination_manager, self._transmission_manager, - self._ingestion_manager, self._expiration_manager) - - -class _FrontReceiver(_Receiver): - """Ticket-handling specific to the front side of an operation.""" - - def __init__( - self, termination_manager, transmission_manager, ingestion_manager, - expiration_manager): - """Constructor. - - Args: - termination_manager: The operation's _interfaces.TerminationManager. - transmission_manager: The operation's _interfaces.TransmissionManager. - ingestion_manager: The operation's _interfaces.IngestionManager. - expiration_manager: The operation's _interfaces.ExpirationManager. - """ - self._termination_manager = termination_manager - self._transmission_manager = transmission_manager - self._ingestion_manager = ingestion_manager - self._expiration_manager = expiration_manager - - self._last_ticket_seen = False - - def _abortive(self, ticket): - """Determines whether or not (and if so, how) a ticket is abortive. - - Args: - ticket: A just-arrived ticket. - - Returns: - An interfaces.Outcome value describing operation abortion if the ticket - is abortive or None if the ticket is not abortive. - """ - if ticket.kind is interfaces.BackToFrontTicket.Kind.CANCELLATION: - return interfaces.Outcome.CANCELLED - elif ticket.kind is interfaces.BackToFrontTicket.Kind.EXPIRATION: - return interfaces.Outcome.EXPIRED - elif ticket.kind is interfaces.BackToFrontTicket.Kind.SERVICER_FAILURE: - return interfaces.Outcome.SERVICER_FAILURE - elif ticket.kind is interfaces.BackToFrontTicket.Kind.RECEPTION_FAILURE: - return interfaces.Outcome.SERVICER_FAILURE - elif self._last_ticket_seen: - return interfaces.Outcome.RECEPTION_FAILURE - else: - return None - - def abort_if_abortive(self, ticket): - """See _Receiver.abort_if_abortive for specification.""" - return _abort_if_abortive( - ticket, self._abortive, self._termination_manager, - self._transmission_manager, self._ingestion_manager, - self._expiration_manager) - - def receive(self, ticket): - """See _Receiver.receive for specification.""" - if ticket.kind is interfaces.BackToFrontTicket.Kind.CONTINUATION: - self._ingestion_manager.consume(ticket.payload) - elif ticket.kind is interfaces.BackToFrontTicket.Kind.COMPLETION: - self._last_ticket_seen = True - if ticket.payload is None: - self._ingestion_manager.terminate() - else: - self._ingestion_manager.consume_and_terminate(ticket.payload) - - def reception_failure(self): - """See _Receiver.reception_failure for specification.""" - _reception_failure( - self._termination_manager, self._transmission_manager, - self._ingestion_manager, self._expiration_manager) - - -class _ReceptionManager(_interfaces.ReceptionManager): - """A ReceptionManager based around a _Receiver passed to it.""" - - def __init__(self, lock, receiver): - """Constructor. - - Args: - lock: The operation-servicing-wide lock object. - receiver: A _Receiver responsible for handling received tickets. - """ - self._lock = lock - self._receiver = receiver - - self._lowest_unseen_sequence_number = 0 - self._out_of_sequence_tickets = {} - self._completed_sequence_number = None - self._aborted = False - - def _sequence_failure(self, ticket): - """Determines a just-arrived ticket's sequential legitimacy. - - Args: - ticket: A just-arrived ticket. - - Returns: - True if the ticket is sequentially legitimate; False otherwise. - """ - if ticket.sequence_number < self._lowest_unseen_sequence_number: - return True - elif ticket.sequence_number in self._out_of_sequence_tickets: - return True - elif (self._completed_sequence_number is not None and - self._completed_sequence_number <= ticket.sequence_number): - return True - else: - return False - - def _process(self, ticket): - """Process those tickets ready to be processed. - - Args: - ticket: A just-arrived ticket the sequence number of which matches this - _ReceptionManager's _lowest_unseen_sequence_number field. - """ - while True: - completed = self._receiver.receive(ticket) - if completed: - self._out_of_sequence_tickets.clear() - self._completed_sequence_number = ticket.sequence_number - self._lowest_unseen_sequence_number = ticket.sequence_number + 1 - return - else: - next_ticket = self._out_of_sequence_tickets.pop( - ticket.sequence_number + 1, None) - if next_ticket is None: - self._lowest_unseen_sequence_number = ticket.sequence_number + 1 - return - else: - ticket = next_ticket - - def receive_ticket(self, ticket): - """See _interfaces.ReceptionManager.receive_ticket for specification.""" - with self._lock: - if self._aborted: - return - elif self._sequence_failure(ticket): - self._receiver.reception_failure() - self._aborted = True - elif self._receiver.abort_if_abortive(ticket): - self._aborted = True - elif ticket.sequence_number == self._lowest_unseen_sequence_number: - self._process(ticket) - else: - self._out_of_sequence_tickets[ticket.sequence_number] = ticket - - -def front_reception_manager( - lock, termination_manager, transmission_manager, ingestion_manager, - expiration_manager): - """Creates a _interfaces.ReceptionManager for front-side use. - - Args: - lock: The operation-servicing-wide lock object. - termination_manager: The operation's _interfaces.TerminationManager. - transmission_manager: The operation's _interfaces.TransmissionManager. - ingestion_manager: The operation's _interfaces.IngestionManager. - expiration_manager: The operation's _interfaces.ExpirationManager. - - Returns: - A _interfaces.ReceptionManager appropriate for front-side use. - """ - return _ReceptionManager( - lock, _FrontReceiver( - termination_manager, transmission_manager, ingestion_manager, - expiration_manager)) - - -def back_reception_manager( - lock, termination_manager, transmission_manager, ingestion_manager, - expiration_manager): - """Creates a _interfaces.ReceptionManager for back-side use. - - Args: - lock: The operation-servicing-wide lock object. - termination_manager: The operation's _interfaces.TerminationManager. - transmission_manager: The operation's _interfaces.TransmissionManager. - ingestion_manager: The operation's _interfaces.IngestionManager. - expiration_manager: The operation's _interfaces.ExpirationManager. - - Returns: - A _interfaces.ReceptionManager appropriate for back-side use. - """ - return _ReceptionManager( - lock, _BackReceiver( - termination_manager, transmission_manager, ingestion_manager, - expiration_manager)) diff --git a/src/python/grpcio/grpc/framework/base/_termination.py b/src/python/grpcio/grpc/framework/base/_termination.py deleted file mode 100644 index ddcbc60293d..00000000000 --- a/src/python/grpcio/grpc/framework/base/_termination.py +++ /dev/null @@ -1,204 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""State and behavior for operation termination.""" - -import enum - -from grpc.framework.base import _constants -from grpc.framework.base import _interfaces -from grpc.framework.base import interfaces -from grpc.framework.foundation import callable_util - -_CALLBACK_EXCEPTION_LOG_MESSAGE = 'Exception calling termination callback!' - - -@enum.unique -class _Requirement(enum.Enum): - """Symbols indicating events required for termination.""" - - EMISSION = 'emission' - TRANSMISSION = 'transmission' - INGESTION = 'ingestion' - -_FRONT_NOT_LISTENING_REQUIREMENTS = (_Requirement.TRANSMISSION,) -_BACK_NOT_LISTENING_REQUIREMENTS = ( - _Requirement.EMISSION, _Requirement.INGESTION,) -_LISTENING_REQUIREMENTS = ( - _Requirement.TRANSMISSION, _Requirement.INGESTION,) - - -class _TerminationManager(_interfaces.TerminationManager): - """An implementation of _interfaces.TerminationManager.""" - - def __init__( - self, work_pool, utility_pool, action, requirements, local_failure): - """Constructor. - - Args: - work_pool: A thread pool in which customer work will be done. - utility_pool: A thread pool in which work utility work will be done. - action: An action to call on operation termination. - requirements: A combination of _Requirement values identifying what - must finish for the operation to be considered completed. - local_failure: An interfaces.Outcome specifying what constitutes local - failure of customer work. - """ - self._work_pool = work_pool - self._utility_pool = utility_pool - self._action = action - self._local_failure = local_failure - self._has_locally_failed = False - self._expiration_manager = None - - self._outstanding_requirements = set(requirements) - self._outcome = None - self._callbacks = [] - - def set_expiration_manager(self, expiration_manager): - self._expiration_manager = expiration_manager - - def _terminate(self, outcome): - """Terminates the operation. - - Args: - outcome: An interfaces.Outcome describing the outcome of the operation. - """ - self._expiration_manager.abort() - self._outstanding_requirements = None - callbacks = list(self._callbacks) - self._callbacks = None - self._outcome = outcome - - act = callable_util.with_exceptions_logged( - self._action, _constants.INTERNAL_ERROR_LOG_MESSAGE) - - if self._has_locally_failed: - self._utility_pool.submit(act, outcome) - else: - def call_callbacks_and_act(callbacks, outcome): - for callback in callbacks: - callback_outcome = callable_util.call_logging_exceptions( - callback, _CALLBACK_EXCEPTION_LOG_MESSAGE, outcome) - if callback_outcome.exception is not None: - outcome = self._local_failure - break - self._utility_pool.submit(act, outcome) - - self._work_pool.submit(callable_util.with_exceptions_logged( - call_callbacks_and_act, - _constants.INTERNAL_ERROR_LOG_MESSAGE), - callbacks, outcome) - - def is_active(self): - """See _interfaces.TerminationManager.is_active for specification.""" - return self._outstanding_requirements is not None - - def add_callback(self, callback): - """See _interfaces.TerminationManager.add_callback for specification.""" - if not self._has_locally_failed: - if self._outstanding_requirements is None: - self._work_pool.submit( - callable_util.with_exceptions_logged( - callback, _CALLBACK_EXCEPTION_LOG_MESSAGE), self._outcome) - else: - self._callbacks.append(callback) - - def emission_complete(self): - """See superclass method for specification.""" - if self._outstanding_requirements is not None: - self._outstanding_requirements.discard(_Requirement.EMISSION) - if not self._outstanding_requirements: - self._terminate(interfaces.Outcome.COMPLETED) - - def transmission_complete(self): - """See superclass method for specification.""" - if self._outstanding_requirements is not None: - self._outstanding_requirements.discard(_Requirement.TRANSMISSION) - if not self._outstanding_requirements: - self._terminate(interfaces.Outcome.COMPLETED) - - def ingestion_complete(self): - """See superclass method for specification.""" - if self._outstanding_requirements is not None: - self._outstanding_requirements.discard(_Requirement.INGESTION) - if not self._outstanding_requirements: - self._terminate(interfaces.Outcome.COMPLETED) - - def abort(self, outcome): - """See _interfaces.TerminationManager.abort for specification.""" - if outcome is self._local_failure: - self._has_failed_locally = True - if self._outstanding_requirements is not None: - self._terminate(outcome) - - -def front_termination_manager( - work_pool, utility_pool, action, subscription_kind): - """Creates a TerminationManager appropriate for front-side use. - - Args: - work_pool: A thread pool in which customer work will be done. - utility_pool: A thread pool in which work utility work will be done. - action: An action to call on operation termination. - subscription_kind: An interfaces.ServicedSubscription.Kind value. - - Returns: - A TerminationManager appropriate for front-side use. - """ - if subscription_kind is interfaces.ServicedSubscription.Kind.NONE: - requirements = _FRONT_NOT_LISTENING_REQUIREMENTS - else: - requirements = _LISTENING_REQUIREMENTS - - return _TerminationManager( - work_pool, utility_pool, action, requirements, - interfaces.Outcome.SERVICED_FAILURE) - - -def back_termination_manager(work_pool, utility_pool, action, subscription_kind): - """Creates a TerminationManager appropriate for back-side use. - - Args: - work_pool: A thread pool in which customer work will be done. - utility_pool: A thread pool in which work utility work will be done. - action: An action to call on operation termination. - subscription_kind: An interfaces.ServicedSubscription.Kind value. - - Returns: - A TerminationManager appropriate for back-side use. - """ - if subscription_kind is interfaces.ServicedSubscription.Kind.NONE: - requirements = _BACK_NOT_LISTENING_REQUIREMENTS - else: - requirements = _LISTENING_REQUIREMENTS - - return _TerminationManager( - work_pool, utility_pool, action, requirements, - interfaces.Outcome.SERVICER_FAILURE) diff --git a/src/python/grpcio/grpc/framework/base/_transmission.py b/src/python/grpcio/grpc/framework/base/_transmission.py deleted file mode 100644 index e2a25626f1d..00000000000 --- a/src/python/grpcio/grpc/framework/base/_transmission.py +++ /dev/null @@ -1,429 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""State and behavior for ticket transmission during an operation.""" - -import abc - -import six - -from grpc.framework.base import _constants -from grpc.framework.base import _interfaces -from grpc.framework.base import interfaces -from grpc.framework.foundation import callable_util - -_TRANSMISSION_EXCEPTION_LOG_MESSAGE = 'Exception during transmission!' - -_FRONT_TO_BACK_NO_TRANSMISSION_OUTCOMES = ( - interfaces.Outcome.SERVICER_FAILURE, - ) -_BACK_TO_FRONT_NO_TRANSMISSION_OUTCOMES = ( - interfaces.Outcome.CANCELLED, - interfaces.Outcome.SERVICED_FAILURE, - ) - -_ABORTION_OUTCOME_TO_FRONT_TO_BACK_TICKET_KIND = { - interfaces.Outcome.CANCELLED: - interfaces.FrontToBackTicket.Kind.CANCELLATION, - interfaces.Outcome.EXPIRED: - interfaces.FrontToBackTicket.Kind.EXPIRATION, - interfaces.Outcome.RECEPTION_FAILURE: - interfaces.FrontToBackTicket.Kind.RECEPTION_FAILURE, - interfaces.Outcome.TRANSMISSION_FAILURE: - interfaces.FrontToBackTicket.Kind.TRANSMISSION_FAILURE, - interfaces.Outcome.SERVICED_FAILURE: - interfaces.FrontToBackTicket.Kind.SERVICED_FAILURE, - interfaces.Outcome.SERVICER_FAILURE: - interfaces.FrontToBackTicket.Kind.SERVICER_FAILURE, -} - -_ABORTION_OUTCOME_TO_BACK_TO_FRONT_TICKET_KIND = { - interfaces.Outcome.CANCELLED: - interfaces.BackToFrontTicket.Kind.CANCELLATION, - interfaces.Outcome.EXPIRED: - interfaces.BackToFrontTicket.Kind.EXPIRATION, - interfaces.Outcome.RECEPTION_FAILURE: - interfaces.BackToFrontTicket.Kind.RECEPTION_FAILURE, - interfaces.Outcome.TRANSMISSION_FAILURE: - interfaces.BackToFrontTicket.Kind.TRANSMISSION_FAILURE, - interfaces.Outcome.SERVICED_FAILURE: - interfaces.BackToFrontTicket.Kind.SERVICED_FAILURE, - interfaces.Outcome.SERVICER_FAILURE: - interfaces.BackToFrontTicket.Kind.SERVICER_FAILURE, -} - - -class _Ticketizer(six.with_metaclass(abc.ABCMeta)): - """Common specification of different ticket-creating behavior.""" - - @abc.abstractmethod - def ticketize(self, operation_id, sequence_number, payload, complete): - """Creates a ticket indicating ordinary operation progress. - - Args: - operation_id: The operation ID for the current operation. - sequence_number: A sequence number for the ticket. - payload: A customer payload object. May be None if sequence_number is - zero or complete is true. - complete: A boolean indicating whether or not the ticket should describe - itself as (but for a later indication of operation abortion) the last - ticket to be sent. - - Returns: - An object of an appropriate type suitable for transmission to the other - side of the operation. - """ - raise NotImplementedError() - - @abc.abstractmethod - def ticketize_abortion(self, operation_id, sequence_number, outcome): - """Creates a ticket indicating that the operation is aborted. - - Args: - operation_id: The operation ID for the current operation. - sequence_number: A sequence number for the ticket. - outcome: An interfaces.Outcome value describing the operation abortion. - - Returns: - An object of an appropriate type suitable for transmission to the other - side of the operation, or None if transmission is not appropriate for - the given outcome. - """ - raise NotImplementedError() - - -class _FrontTicketizer(_Ticketizer): - """Front-side ticket-creating behavior.""" - - def __init__(self, name, subscription_kind, trace_id, timeout): - """Constructor. - - Args: - name: The name of the operation. - subscription_kind: An interfaces.ServicedSubscription.Kind value - describing the interest the front has in tickets sent from the back. - trace_id: A uuid.UUID identifying a set of related operations to which - this operation belongs. - timeout: A length of time in seconds to allow for the entire operation. - """ - self._name = name - self._subscription_kind = subscription_kind - self._trace_id = trace_id - self._timeout = timeout - - def ticketize(self, operation_id, sequence_number, payload, complete): - """See _Ticketizer.ticketize for specification.""" - if sequence_number: - if complete: - kind = interfaces.FrontToBackTicket.Kind.COMPLETION - else: - kind = interfaces.FrontToBackTicket.Kind.CONTINUATION - return interfaces.FrontToBackTicket( - operation_id, sequence_number, kind, self._name, - self._subscription_kind, self._trace_id, payload, self._timeout) - else: - if complete: - kind = interfaces.FrontToBackTicket.Kind.ENTIRE - else: - kind = interfaces.FrontToBackTicket.Kind.COMMENCEMENT - return interfaces.FrontToBackTicket( - operation_id, 0, kind, self._name, self._subscription_kind, - self._trace_id, payload, self._timeout) - - def ticketize_abortion(self, operation_id, sequence_number, outcome): - """See _Ticketizer.ticketize_abortion for specification.""" - if outcome in _FRONT_TO_BACK_NO_TRANSMISSION_OUTCOMES: - return None - else: - kind = _ABORTION_OUTCOME_TO_FRONT_TO_BACK_TICKET_KIND[outcome] - return interfaces.FrontToBackTicket( - operation_id, sequence_number, kind, None, None, None, None, None) - - -class _BackTicketizer(_Ticketizer): - """Back-side ticket-creating behavior.""" - - def ticketize(self, operation_id, sequence_number, payload, complete): - """See _Ticketizer.ticketize for specification.""" - if complete: - kind = interfaces.BackToFrontTicket.Kind.COMPLETION - else: - kind = interfaces.BackToFrontTicket.Kind.CONTINUATION - return interfaces.BackToFrontTicket( - operation_id, sequence_number, kind, payload) - - def ticketize_abortion(self, operation_id, sequence_number, outcome): - """See _Ticketizer.ticketize_abortion for specification.""" - if outcome in _BACK_TO_FRONT_NO_TRANSMISSION_OUTCOMES: - return None - else: - kind = _ABORTION_OUTCOME_TO_BACK_TO_FRONT_TICKET_KIND[outcome] - return interfaces.BackToFrontTicket( - operation_id, sequence_number, kind, None) - - -class TransmissionManager(six.with_metaclass(abc.ABCMeta, _interfaces.TransmissionManager)): - """A _interfaces.TransmissionManager on which other managers may be set.""" - - @abc.abstractmethod - def set_ingestion_and_expiration_managers( - self, ingestion_manager, expiration_manager): - """Sets two of the other managers with which this manager may interact. - - Args: - ingestion_manager: The _interfaces.IngestionManager associated with the - current operation. - expiration_manager: The _interfaces.ExpirationManager associated with the - current operation. - """ - raise NotImplementedError() - - -class _EmptyTransmissionManager(TransmissionManager): - """A completely no-operative _interfaces.TransmissionManager.""" - - def set_ingestion_and_expiration_managers( - self, ingestion_manager, expiration_manager): - """See overriden method for specification.""" - - def inmit(self, emission, complete): - """See _interfaces.TransmissionManager.inmit for specification.""" - - def abort(self, outcome): - """See _interfaces.TransmissionManager.abort for specification.""" - - -class _TransmittingTransmissionManager(TransmissionManager): - """A TransmissionManager implementation that sends tickets.""" - - def __init__( - self, lock, pool, callback, operation_id, ticketizer, - termination_manager): - """Constructor. - - Args: - lock: The operation-servicing-wide lock object. - pool: A thread pool in which the work of transmitting tickets will be - performed. - callback: A callable that accepts tickets and sends them to the other side - of the operation. - operation_id: The operation's ID. - ticketizer: A _Ticketizer for ticket creation. - termination_manager: The _interfaces.TerminationManager associated with - this operation. - """ - self._lock = lock - self._pool = pool - self._callback = callback - self._operation_id = operation_id - self._ticketizer = ticketizer - self._termination_manager = termination_manager - self._ingestion_manager = None - self._expiration_manager = None - - self._emissions = [] - self._emission_complete = False - self._outcome = None - self._lowest_unused_sequence_number = 0 - self._transmitting = False - - def set_ingestion_and_expiration_managers( - self, ingestion_manager, expiration_manager): - """See overridden method for specification.""" - self._ingestion_manager = ingestion_manager - self._expiration_manager = expiration_manager - - def _lead_ticket(self, emission, complete): - """Creates a ticket suitable for leading off the transmission loop. - - Args: - emission: A customer payload object to be sent to the other side of the - operation. - complete: Whether or not the sequence of customer payloads ends with - the passed object. - - Returns: - A ticket with which to lead off the transmission loop. - """ - sequence_number = self._lowest_unused_sequence_number - self._lowest_unused_sequence_number += 1 - return self._ticketizer.ticketize( - self._operation_id, sequence_number, emission, complete) - - def _abortive_response_ticket(self, outcome): - """Creates a ticket indicating operation abortion. - - Args: - outcome: An interfaces.Outcome value describing operation abortion. - - Returns: - A ticket indicating operation abortion. - """ - ticket = self._ticketizer.ticketize_abortion( - self._operation_id, self._lowest_unused_sequence_number, outcome) - if ticket is None: - return None - else: - self._lowest_unused_sequence_number += 1 - return ticket - - def _next_ticket(self): - """Creates the next ticket to be sent to the other side of the operation. - - Returns: - A (completed, ticket) tuple comprised of a boolean indicating whether or - not the sequence of tickets has completed normally and a ticket to send - to the other side if the sequence of tickets hasn't completed. The tuple - will never have both a True first element and a non-None second element. - """ - if self._emissions is None: - return False, None - elif self._outcome is None: - if self._emissions: - payload = self._emissions.pop(0) - complete = self._emission_complete and not self._emissions - sequence_number = self._lowest_unused_sequence_number - self._lowest_unused_sequence_number += 1 - return complete, self._ticketizer.ticketize( - self._operation_id, sequence_number, payload, complete) - else: - return self._emission_complete, None - else: - ticket = self._abortive_response_ticket(self._outcome) - self._emissions = None - return False, None if ticket is None else ticket - - def _transmit(self, ticket): - """Commences the transmission loop sending tickets. - - Args: - ticket: A ticket to be sent to the other side of the operation. - """ - def transmit(ticket): - while True: - transmission_outcome = callable_util.call_logging_exceptions( - self._callback, _TRANSMISSION_EXCEPTION_LOG_MESSAGE, ticket) - if transmission_outcome.exception is None: - with self._lock: - complete, ticket = self._next_ticket() - if ticket is None: - if complete: - self._termination_manager.transmission_complete() - self._transmitting = False - return - else: - with self._lock: - self._emissions = None - self._termination_manager.abort( - interfaces.Outcome.TRANSMISSION_FAILURE) - self._ingestion_manager.abort() - self._expiration_manager.abort() - self._transmitting = False - return - - self._pool.submit(callable_util.with_exceptions_logged( - transmit, _constants.INTERNAL_ERROR_LOG_MESSAGE), ticket) - self._transmitting = True - - def inmit(self, emission, complete): - """See _interfaces.TransmissionManager.inmit for specification.""" - if self._emissions is not None and self._outcome is None: - self._emission_complete = complete - if self._transmitting: - self._emissions.append(emission) - else: - self._transmit(self._lead_ticket(emission, complete)) - - def abort(self, outcome): - """See _interfaces.TransmissionManager.abort for specification.""" - if self._emissions is not None and self._outcome is None: - self._outcome = outcome - if not self._transmitting: - ticket = self._abortive_response_ticket(outcome) - self._emissions = None - if ticket is not None: - self._transmit(ticket) - - -def front_transmission_manager( - lock, pool, callback, operation_id, name, subscription_kind, trace_id, - timeout, termination_manager): - """Creates a TransmissionManager appropriate for front-side use. - - Args: - lock: The operation-servicing-wide lock object. - pool: A thread pool in which the work of transmitting tickets will be - performed. - callback: A callable that accepts tickets and sends them to the other side - of the operation. - operation_id: The operation's ID. - name: The name of the operation. - subscription_kind: An interfaces.ServicedSubscription.Kind value - describing the interest the front has in tickets sent from the back. - trace_id: A uuid.UUID identifying a set of related operations to which - this operation belongs. - timeout: A length of time in seconds to allow for the entire operation. - termination_manager: The _interfaces.TerminationManager associated with - this operation. - - Returns: - A TransmissionManager appropriate for front-side use. - """ - return _TransmittingTransmissionManager( - lock, pool, callback, operation_id, _FrontTicketizer( - name, subscription_kind, trace_id, timeout), - termination_manager) - - -def back_transmission_manager( - lock, pool, callback, operation_id, termination_manager, - subscription_kind): - """Creates a TransmissionManager appropriate for back-side use. - - Args: - lock: The operation-servicing-wide lock object. - pool: A thread pool in which the work of transmitting tickets will be - performed. - callback: A callable that accepts tickets and sends them to the other side - of the operation. - operation_id: The operation's ID. - termination_manager: The _interfaces.TerminationManager associated with - this operation. - subscription_kind: An interfaces.ServicedSubscription.Kind value - describing the interest the front has in tickets sent from the back. - - Returns: - A TransmissionManager appropriate for back-side use. - """ - if subscription_kind is interfaces.ServicedSubscription.Kind.NONE: - return _EmptyTransmissionManager() - else: - return _TransmittingTransmissionManager( - lock, pool, callback, operation_id, _BackTicketizer(), - termination_manager) diff --git a/src/python/grpcio/grpc/framework/base/exceptions.py b/src/python/grpcio/grpc/framework/base/exceptions.py deleted file mode 100644 index b8f47521847..00000000000 --- a/src/python/grpcio/grpc/framework/base/exceptions.py +++ /dev/null @@ -1,34 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Exceptions defined and used by the base layer of RPC Framework.""" - - -class NoSuchMethodError(Exception): - """Indicates that an operation with an unrecognized name has been called.""" diff --git a/src/python/grpcio/grpc/framework/base/implementations.py b/src/python/grpcio/grpc/framework/base/implementations.py deleted file mode 100644 index 5656f9f9812..00000000000 --- a/src/python/grpcio/grpc/framework/base/implementations.py +++ /dev/null @@ -1,77 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Entry points into the ticket-exchange-based base layer implementation.""" - -# interfaces is referenced from specification in this module. -from grpc.framework.base import _ends -from grpc.framework.base import interfaces # pylint: disable=unused-import - - -def front_link(work_pool, transmission_pool, utility_pool): - """Factory function for creating interfaces.FrontLinks. - - Args: - work_pool: A thread pool to be used for doing work within the created - FrontLink object. - transmission_pool: A thread pool to be used within the created FrontLink - object for transmitting values to a joined RearLink object. - utility_pool: A thread pool to be used within the created FrontLink object - for utility tasks. - - Returns: - An interfaces.FrontLink. - """ - return _ends.FrontLink(work_pool, transmission_pool, utility_pool) - - -def back_link( - servicer, work_pool, transmission_pool, utility_pool, default_timeout, - maximum_timeout): - """Factory function for creating interfaces.BackLinks. - - Args: - servicer: An interfaces.Servicer for servicing operations. - work_pool: A thread pool to be used for doing work within the created - BackLink object. - transmission_pool: A thread pool to be used within the created BackLink - object for transmitting values to a joined ForeLink object. - utility_pool: A thread pool to be used within the created BackLink object - for utility tasks. - default_timeout: A length of time in seconds to be used as the default - time alloted for a single operation. - maximum_timeout: A length of time in seconds to be used as the maximum - time alloted for a single operation. - - Returns: - An interfaces.BackLink. - """ - return _ends.BackLink( - servicer, work_pool, transmission_pool, utility_pool, default_timeout, - maximum_timeout) diff --git a/src/python/grpcio/grpc/framework/base/in_memory.py b/src/python/grpcio/grpc/framework/base/in_memory.py deleted file mode 100644 index c92d0bc663c..00000000000 --- a/src/python/grpcio/grpc/framework/base/in_memory.py +++ /dev/null @@ -1,108 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""In-memory implementations of base layer interfaces.""" - -import threading - -from grpc.framework.base import _constants -from grpc.framework.base import interfaces -from grpc.framework.foundation import callable_util - - -class _Serializer(object): - """A utility for serializing values that may arrive concurrently.""" - - def __init__(self, pool): - self._lock = threading.Lock() - self._pool = pool - self._sink = None - self._spinning = False - self._values = [] - - def _spin(self, sink, value): - while True: - sink(value) - with self._lock: - if self._sink is None or not self._values: - self._spinning = False - return - else: - sink, value = self._sink, self._values.pop(0) - - def set_sink(self, sink): - with self._lock: - self._sink = sink - if sink is not None and self._values and not self._spinning: - self._spinning = True - self._pool.submit( - callable_util.with_exceptions_logged( - self._spin, _constants.INTERNAL_ERROR_LOG_MESSAGE), - sink, self._values.pop(0)) - - def add_value(self, value): - with self._lock: - if self._sink and not self._spinning: - self._spinning = True - self._pool.submit( - callable_util.with_exceptions_logged( - self._spin, _constants.INTERNAL_ERROR_LOG_MESSAGE), - self._sink, value) - else: - self._values.append(value) - - -class Link(interfaces.ForeLink, interfaces.RearLink): - """A trivial implementation of interfaces.ForeLink and interfaces.RearLink.""" - - def __init__(self, pool): - """Constructor. - - Args: - pool: A thread pool to be used for serializing ticket exchange in each - direction. - """ - self._front_to_back = _Serializer(pool) - self._back_to_front = _Serializer(pool) - - def join_fore_link(self, fore_link): - """See interfaces.RearLink.join_fore_link for specification.""" - self._back_to_front.set_sink(fore_link.accept_back_to_front_ticket) - - def join_rear_link(self, rear_link): - """See interfaces.ForeLink.join_rear_link for specification.""" - self._front_to_back.set_sink(rear_link.accept_front_to_back_ticket) - - def accept_front_to_back_ticket(self, ticket): - """See interfaces.ForeLink.accept_front_to_back_ticket for specification.""" - self._front_to_back.add_value(ticket) - - def accept_back_to_front_ticket(self, ticket): - """See interfaces.RearLink.accept_back_to_front_ticket for specification.""" - self._back_to_front.add_value(ticket) diff --git a/src/python/grpcio/grpc/framework/base/interfaces.py b/src/python/grpcio/grpc/framework/base/interfaces.py deleted file mode 100644 index 995b51cd5b9..00000000000 --- a/src/python/grpcio/grpc/framework/base/interfaces.py +++ /dev/null @@ -1,353 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Interfaces defined and used by the base layer of RPC Framework.""" - -import abc -import collections -import enum - -import six - -# stream is referenced from specification in this module. -from grpc.framework.foundation import stream # pylint: disable=unused-import - - -@enum.unique -class Outcome(enum.Enum): - """Operation outcomes.""" - - COMPLETED = 'completed' - CANCELLED = 'cancelled' - EXPIRED = 'expired' - RECEPTION_FAILURE = 'reception failure' - TRANSMISSION_FAILURE = 'transmission failure' - SERVICER_FAILURE = 'servicer failure' - SERVICED_FAILURE = 'serviced failure' - - -class OperationContext(six.with_metaclass(abc.ABCMeta)): - """Provides operation-related information and action. - - Attributes: - trace_id: A uuid.UUID identifying a particular set of related operations. - """ - - @abc.abstractmethod - def is_active(self): - """Describes whether the operation is active or has terminated.""" - raise NotImplementedError() - - @abc.abstractmethod - def add_termination_callback(self, callback): - """Adds a function to be called upon operation termination. - - Args: - callback: A callable that will be passed an Outcome value. - """ - raise NotImplementedError() - - @abc.abstractmethod - def time_remaining(self): - """Describes the length of allowed time remaining for the operation. - - Returns: - A nonnegative float indicating the length of allowed time in seconds - remaining for the operation to complete before it is considered to have - timed out. - """ - raise NotImplementedError() - - @abc.abstractmethod - def fail(self, exception): - """Indicates that the operation has failed. - - Args: - exception: An exception germane to the operation failure. May be None. - """ - raise NotImplementedError() - - -class Servicer(six.with_metaclass(abc.ABCMeta)): - """Interface for service implementations.""" - - @abc.abstractmethod - def service(self, name, context, output_consumer): - """Services an operation. - - Args: - name: The name of the operation. - context: A ServicerContext object affording contextual information and - actions. - output_consumer: A stream.Consumer that will accept output values of - the operation. - - Returns: - A stream.Consumer that will accept input values for the operation. - - Raises: - exceptions.NoSuchMethodError: If this Servicer affords no method with the - given name. - abandonment.Abandoned: If the operation has been aborted and there no - longer is any reason to service the operation. - """ - raise NotImplementedError() - - -class Operation(six.with_metaclass(abc.ABCMeta)): - """Representation of an in-progress operation. - - Attributes: - consumer: A stream.Consumer into which payloads constituting the operation's - input may be passed. - context: An OperationContext affording information and action about the - operation. - """ - - @abc.abstractmethod - def cancel(self): - """Cancels this operation.""" - raise NotImplementedError() - - -class ServicedIngestor(six.with_metaclass(abc.ABCMeta)): - """Responsible for accepting the result of an operation.""" - - @abc.abstractmethod - def consumer(self, operation_context): - """Affords a consumer to which operation results will be passed. - - Args: - operation_context: An OperationContext object for the current operation. - - Returns: - A stream.Consumer to which the results of the current operation will be - passed. - - Raises: - abandonment.Abandoned: If the operation has been aborted and there no - longer is any reason to service the operation. - """ - raise NotImplementedError() - - -class ServicedSubscription(six.with_metaclass(abc.ABCMeta)): - """A sum type representing a serviced's interest in an operation. - - Attributes: - kind: A Kind value. - ingestor: A ServicedIngestor. Must be present if kind is Kind.FULL. Must - be None if kind is Kind.TERMINATION_ONLY or Kind.NONE. - """ - - @enum.unique - class Kind(enum.Enum): - """Kinds of subscription.""" - - FULL = 'full' - TERMINATION_ONLY = 'termination only' - NONE = 'none' - - -class End(six.with_metaclass(abc.ABCMeta)): - """Common type for entry-point objects on both sides of an operation.""" - - @abc.abstractmethod - def operation_stats(self): - """Reports the number of terminated operations broken down by outcome. - - Returns: - A dictionary from Outcome value to an integer identifying the number - of operations that terminated with that outcome. - """ - raise NotImplementedError() - - @abc.abstractmethod - def add_idle_action(self, action): - """Adds an action to be called when this End has no ongoing operations. - - Args: - action: A callable that accepts no arguments. - """ - raise NotImplementedError() - - -class Front(six.with_metaclass(abc.ABCMeta, End)): - """Clientish objects that afford the invocation of operations.""" - - @abc.abstractmethod - def operate( - self, name, payload, complete, timeout, subscription, trace_id): - """Commences an operation. - - Args: - name: The name of the method invoked for the operation. - payload: An initial payload for the operation. May be None. - complete: A boolean indicating whether or not additional payloads to be - sent to the servicer may be supplied after this call. - timeout: A length of time in seconds to allow for the operation. - subscription: A ServicedSubscription for the operation. - trace_id: A uuid.UUID identifying a set of related operations to which - this operation belongs. - - Returns: - An Operation object affording information and action about the operation - in progress. - """ - raise NotImplementedError() - - -class Back(six.with_metaclass(abc.ABCMeta, End)): - """Serverish objects that perform the work of operations.""" - - -class FrontToBackTicket( - collections.namedtuple( - 'FrontToBackTicket', - ['operation_id', 'sequence_number', 'kind', 'name', 'subscription', - 'trace_id', 'payload', 'timeout'])): - """A sum type for all values sent from a front to a back. - - Attributes: - operation_id: A unique-with-respect-to-equality hashable object identifying - a particular operation. - sequence_number: A zero-indexed integer sequence number identifying the - ticket's place among all the tickets sent from front to back for this - particular operation. Must be zero if kind is Kind.COMMENCEMENT or - Kind.ENTIRE. Must be positive for any other kind. - kind: A Kind value describing the overall kind of ticket. - name: The name of an operation. Must be present if kind is Kind.COMMENCEMENT - or Kind.ENTIRE. Must be None for any other kind. - subscription: An ServicedSubscription.Kind value describing the interest - the front has in tickets sent from the back. Must be present if - kind is Kind.COMMENCEMENT or Kind.ENTIRE. Must be None for any other kind. - trace_id: A uuid.UUID identifying a set of related operations to which this - operation belongs. May be None. - payload: A customer payload object. Must be present if kind is - Kind.CONTINUATION. Must be None if kind is Kind.CANCELLATION. May be None - for any other kind. - timeout: An optional length of time (measured from the beginning of the - operation) to allow for the entire operation. If None, a default value on - the back will be used. If present and excessively large, the back may - limit the operation to a smaller duration of its choice. May be present - for any ticket kind; setting a value on a later ticket allows fronts - to request time extensions (or even time reductions!) on in-progress - operations. - """ - - @enum.unique - class Kind(enum.Enum): - """Identifies the overall kind of a FrontToBackTicket.""" - - COMMENCEMENT = 'commencement' - CONTINUATION = 'continuation' - COMPLETION = 'completion' - ENTIRE = 'entire' - CANCELLATION = 'cancellation' - EXPIRATION = 'expiration' - SERVICER_FAILURE = 'servicer failure' - SERVICED_FAILURE = 'serviced failure' - RECEPTION_FAILURE = 'reception failure' - TRANSMISSION_FAILURE = 'transmission failure' - - -class BackToFrontTicket( - collections.namedtuple( - 'BackToFrontTicket', - ['operation_id', 'sequence_number', 'kind', 'payload'])): - """A sum type for all values sent from a back to a front. - - Attributes: - operation_id: A unique-with-respect-to-equality hashable object identifying - a particular operation. - sequence_number: A zero-indexed integer sequence number identifying the - ticket's place among all the tickets sent from back to front for this - particular operation. - kind: A Kind value describing the overall kind of ticket. - payload: A customer payload object. Must be present if kind is - Kind.CONTINUATION. May be None if kind is Kind.COMPLETION. Must be None - otherwise. - """ - - @enum.unique - class Kind(enum.Enum): - """Identifies the overall kind of a BackToFrontTicket.""" - - CONTINUATION = 'continuation' - COMPLETION = 'completion' - CANCELLATION = 'cancellation' - EXPIRATION = 'expiration' - SERVICER_FAILURE = 'servicer failure' - SERVICED_FAILURE = 'serviced failure' - RECEPTION_FAILURE = 'reception failure' - TRANSMISSION_FAILURE = 'transmission failure' - - -class ForeLink(six.with_metaclass(abc.ABCMeta)): - """Accepts back-to-front tickets and emits front-to-back tickets.""" - - @abc.abstractmethod - def accept_back_to_front_ticket(self, ticket): - """Accept a BackToFrontTicket. - - Args: - ticket: Any BackToFrontTicket. - """ - raise NotImplementedError() - - @abc.abstractmethod - def join_rear_link(self, rear_link): - """Mates this object with a peer with which it will exchange tickets.""" - raise NotImplementedError() - - -class RearLink(six.with_metaclass(abc.ABCMeta)): - """Accepts front-to-back tickets and emits back-to-front tickets.""" - - @abc.abstractmethod - def accept_front_to_back_ticket(self, ticket): - """Accepts a FrontToBackTicket. - - Args: - ticket: Any FrontToBackTicket. - """ - raise NotImplementedError() - - @abc.abstractmethod - def join_fore_link(self, fore_link): - """Mates this object with a peer with which it will exchange tickets.""" - raise NotImplementedError() - - -class FrontLink(six.with_metaclass(abc.ABCMeta, Front, ForeLink)): - """Clientish objects that operate by sending and receiving tickets.""" - - -class BackLink(six.with_metaclass(abc.ABCMeta, Back, RearLink)): - """Serverish objects that operate by sending and receiving tickets.""" diff --git a/src/python/grpcio/grpc/framework/base/null.py b/src/python/grpcio/grpc/framework/base/null.py deleted file mode 100644 index 1e30d4557b1..00000000000 --- a/src/python/grpcio/grpc/framework/base/null.py +++ /dev/null @@ -1,56 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Null links that ignore tickets passed to them.""" - -from grpc.framework.base import interfaces - - -class _NullForeLink(interfaces.ForeLink): - """A do-nothing ForeLink.""" - - def accept_back_to_front_ticket(self, ticket): - pass - - def join_rear_link(self, rear_link): - raise NotImplementedError() - - -class _NullRearLink(interfaces.RearLink): - """A do-nothing RearLink.""" - - def accept_front_to_back_ticket(self, ticket): - pass - - def join_fore_link(self, fore_link): - raise NotImplementedError() - - -NULL_FORE_LINK = _NullForeLink() -NULL_REAR_LINK = _NullRearLink() diff --git a/src/python/grpcio/grpc/framework/base/util.py b/src/python/grpcio/grpc/framework/base/util.py deleted file mode 100644 index c832c826cfd..00000000000 --- a/src/python/grpcio/grpc/framework/base/util.py +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Utilities helpful for working with the base layer of RPC Framework.""" - -import collections -import threading - -from grpc.framework.base import interfaces - - -class _ServicedSubscription( - collections.namedtuple('_ServicedSubscription', ['kind', 'ingestor']), - interfaces.ServicedSubscription): - """See interfaces.ServicedSubscription for specification.""" - -_NONE_SUBSCRIPTION = _ServicedSubscription( - interfaces.ServicedSubscription.Kind.NONE, None) -_TERMINATION_ONLY_SUBSCRIPTION = _ServicedSubscription( - interfaces.ServicedSubscription.Kind.TERMINATION_ONLY, None) - - -def none_serviced_subscription(): - """Creates a "none" interfaces.ServicedSubscription object. - - Returns: - An interfaces.ServicedSubscription indicating no subscription to an - operation's results (such as would be the case for a fire-and-forget - operation invocation). - """ - return _NONE_SUBSCRIPTION - - -def termination_only_serviced_subscription(): - """Creates a "termination only" interfaces.ServicedSubscription object. - - Returns: - An interfaces.ServicedSubscription indicating that the front-side customer - is interested only in the overall termination outcome of the operation - (such as completion or expiration) and would ignore the actual results of - the operation. - """ - return _TERMINATION_ONLY_SUBSCRIPTION - - -def full_serviced_subscription(ingestor): - """Creates a "full" interfaces.ServicedSubscription object. - - Args: - ingestor: An interfaces.ServicedIngestor. - - Returns: - An interfaces.ServicedSubscription object indicating a full - subscription. - """ - return _ServicedSubscription( - interfaces.ServicedSubscription.Kind.FULL, ingestor) - - -def wait_for_idle(end): - """Waits for an interfaces.End to complete all operations. - - Args: - end: Any interfaces.End. - """ - event = threading.Event() - end.add_idle_action(event.set) - event.wait() diff --git a/src/python/grpcio/grpc/framework/face/__init__.py b/src/python/grpcio/grpc/framework/face/__init__.py deleted file mode 100644 index bff74be2c7b..00000000000 --- a/src/python/grpcio/grpc/framework/face/__init__.py +++ /dev/null @@ -1,35 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import warnings - -warnings.simplefilter('always', DeprecationWarning) -warnings.warn('the alpha API (includes this package) is deprecated, ' - 'unmaintained, and no longer tested. Please migrate to the beta ' - 'API.', DeprecationWarning, stacklevel=2) diff --git a/src/python/grpcio/grpc/framework/face/_calls.py b/src/python/grpcio/grpc/framework/face/_calls.py deleted file mode 100644 index 87edeb0f0e5..00000000000 --- a/src/python/grpcio/grpc/framework/face/_calls.py +++ /dev/null @@ -1,422 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Utility functions for invoking RPCs.""" - -import sys -import threading - -from grpc.framework.base import interfaces as base_interfaces -from grpc.framework.base import util as base_util -from grpc.framework.face import _control -from grpc.framework.face import interfaces -from grpc.framework.foundation import callable_util -from grpc.framework.foundation import future - -_ITERATOR_EXCEPTION_LOG_MESSAGE = 'Exception iterating over requests!' -_DONE_CALLBACK_LOG_MESSAGE = 'Exception calling Future "done" callback!' - - -class _RendezvousServicedIngestor(base_interfaces.ServicedIngestor): - - def __init__(self, rendezvous): - self._rendezvous = rendezvous - - def consumer(self, operation_context): - return self._rendezvous - - -class _EventServicedIngestor(base_interfaces.ServicedIngestor): - - def __init__(self, result_consumer, abortion_callback): - self._result_consumer = result_consumer - self._abortion_callback = abortion_callback - - def consumer(self, operation_context): - operation_context.add_termination_callback( - _control.as_operation_termination_callback(self._abortion_callback)) - return self._result_consumer - - -def _rendezvous_subscription(rendezvous): - return base_util.full_serviced_subscription( - _RendezvousServicedIngestor(rendezvous)) - - -def _unary_event_subscription(completion_callback, abortion_callback): - return base_util.full_serviced_subscription( - _EventServicedIngestor( - _control.UnaryConsumer(completion_callback), abortion_callback)) - - -def _stream_event_subscription(result_consumer, abortion_callback): - return base_util.full_serviced_subscription( - _EventServicedIngestor(result_consumer, abortion_callback)) - - -# NOTE(nathaniel): This class has some extremely special semantics around -# cancellation that allow it to be used by both "blocking" APIs and "futures" -# APIs. -# -# Since futures.Future defines its own exception for cancellation, we want these -# objects, when returned by methods of a returning-Futures-from-other-methods -# object, to raise the same exception for cancellation. But that's weird in a -# blocking API - why should this object, also returned by methods of blocking -# APIs, raise exceptions from the "future" module? Should we do something like -# have this class be parameterized by the type of exception that it raises in -# cancellation circumstances? -# -# We don't have to take such a dramatic step: since blocking APIs define no -# cancellation semantics whatsoever, there is no supported way for -# blocking-API-users of these objects to cancel RPCs, and thus no supported way -# for them to see an exception the type of which would be weird to them. -# -# Bonus: in both blocking and futures APIs, this object still properly raises -# exceptions.CancellationError for any *server-side cancellation* of an RPC. -class _OperationCancellableIterator(interfaces.CancellableIterator): - """An interfaces.CancellableIterator for response-streaming operations.""" - - def __init__(self, rendezvous, operation): - self._lock = threading.Lock() - self._rendezvous = rendezvous - self._operation = operation - self._cancelled = False - - def __iter__(self): - return self - - def next(self): - with self._lock: - if self._cancelled: - raise future.CancelledError() - return next(self._rendezvous) - - def cancel(self): - with self._lock: - self._cancelled = True - self._operation.cancel() - self._rendezvous.set_outcome(base_interfaces.Outcome.CANCELLED) - - -class _OperationFuture(future.Future): - """A future.Future interface to an operation.""" - - def __init__(self, rendezvous, operation): - self._condition = threading.Condition() - self._rendezvous = rendezvous - self._operation = operation - - self._cancelled = False - self._computed = False - self._payload = None - self._exception = None - self._traceback = None - self._callbacks = [] - - def cancel(self): - """See future.Future.cancel for specification.""" - with self._condition: - if not self._cancelled and not self._computed: - self._operation.cancel() - self._cancelled = True - self._condition.notify_all() - return False - - def cancelled(self): - """See future.Future.cancelled for specification.""" - with self._condition: - return self._cancelled - - def running(self): - """See future.Future.running for specification.""" - with self._condition: - return not self._cancelled and not self._computed - - def done(self): - """See future.Future.done for specification.""" - with self._condition: - return self._cancelled or self._computed - - def result(self, timeout=None): - """See future.Future.result for specification.""" - with self._condition: - if self._cancelled: - raise future.CancelledError() - if self._computed: - if self._payload is None: - raise self._exception # pylint: disable=raising-bad-type - else: - return self._payload - - condition = threading.Condition() - def notify_condition(unused_future): - with condition: - condition.notify() - self._callbacks.append(notify_condition) - - with condition: - condition.wait(timeout=timeout) - - with self._condition: - if self._cancelled: - raise future.CancelledError() - elif self._computed: - if self._payload is None: - raise self._exception # pylint: disable=raising-bad-type - else: - return self._payload - else: - raise future.TimeoutError() - - def exception(self, timeout=None): - """See future.Future.exception for specification.""" - with self._condition: - if self._cancelled: - raise future.CancelledError() - if self._computed: - return self._exception - - condition = threading.Condition() - def notify_condition(unused_future): - with condition: - condition.notify() - self._callbacks.append(notify_condition) - - with condition: - condition.wait(timeout=timeout) - - with self._condition: - if self._cancelled: - raise future.CancelledError() - elif self._computed: - return self._exception - else: - raise future.TimeoutError() - - def traceback(self, timeout=None): - """See future.Future.traceback for specification.""" - with self._condition: - if self._cancelled: - raise future.CancelledError() - if self._computed: - return self._traceback - - condition = threading.Condition() - def notify_condition(unused_future): - with condition: - condition.notify() - self._callbacks.append(notify_condition) - - with condition: - condition.wait(timeout=timeout) - - with self._condition: - if self._cancelled: - raise future.CancelledError() - elif self._computed: - return self._traceback - else: - raise future.TimeoutError() - - def add_done_callback(self, fn): - """See future.Future.add_done_callback for specification.""" - with self._condition: - if self._callbacks is not None: - self._callbacks.append(fn) - return - - callable_util.call_logging_exceptions(fn, _DONE_CALLBACK_LOG_MESSAGE, self) - - def on_operation_termination(self, operation_outcome): - """Indicates to this object that the operation has terminated. - - Args: - operation_outcome: A base_interfaces.Outcome value indicating the - outcome of the operation. - """ - with self._condition: - cancelled = self._cancelled - if cancelled: - callbacks = list(self._callbacks) - self._callbacks = None - else: - rendezvous = self._rendezvous - - if not cancelled: - payload = None - exception = None - traceback = None - if operation_outcome == base_interfaces.Outcome.COMPLETED: - try: - payload = next(rendezvous) - except Exception as e: # pylint: disable=broad-except - exception = e - traceback = sys.exc_info()[2] - else: - try: - # We raise and then immediately catch in order to create a traceback. - raise _control.abortion_outcome_to_exception(operation_outcome) - except Exception as e: # pylint: disable=broad-except - exception = e - traceback = sys.exc_info()[2] - with self._condition: - if not self._cancelled: - self._computed = True - self._payload = payload - self._exception = exception - self._traceback = traceback - callbacks = list(self._callbacks) - self._callbacks = None - - for callback in callbacks: - callable_util.call_logging_exceptions( - callback, _DONE_CALLBACK_LOG_MESSAGE, self) - - -class _Call(interfaces.Call): - - def __init__(self, operation): - self._operation = operation - self.context = _control.RpcContext(operation.context) - - def cancel(self): - self._operation.cancel() - - -def blocking_value_in_value_out(front, name, payload, timeout, trace_id): - """Services in a blocking fashion a value-in value-out servicer method.""" - rendezvous = _control.Rendezvous() - subscription = _rendezvous_subscription(rendezvous) - operation = front.operate( - name, payload, True, timeout, subscription, trace_id) - operation.context.add_termination_callback(rendezvous.set_outcome) - return next(rendezvous) - - -def future_value_in_value_out(front, name, payload, timeout, trace_id): - """Services a value-in value-out servicer method by returning a Future.""" - rendezvous = _control.Rendezvous() - subscription = _rendezvous_subscription(rendezvous) - operation = front.operate( - name, payload, True, timeout, subscription, trace_id) - operation.context.add_termination_callback(rendezvous.set_outcome) - operation_future = _OperationFuture(rendezvous, operation) - operation.context.add_termination_callback( - operation_future.on_operation_termination) - return operation_future - - -def inline_value_in_stream_out(front, name, payload, timeout, trace_id): - """Services a value-in stream-out servicer method.""" - rendezvous = _control.Rendezvous() - subscription = _rendezvous_subscription(rendezvous) - operation = front.operate( - name, payload, True, timeout, subscription, trace_id) - operation.context.add_termination_callback(rendezvous.set_outcome) - return _OperationCancellableIterator(rendezvous, operation) - - -def blocking_stream_in_value_out( - front, name, payload_iterator, timeout, trace_id): - """Services in a blocking fashion a stream-in value-out servicer method.""" - rendezvous = _control.Rendezvous() - subscription = _rendezvous_subscription(rendezvous) - operation = front.operate(name, None, False, timeout, subscription, trace_id) - operation.context.add_termination_callback(rendezvous.set_outcome) - for payload in payload_iterator: - operation.consumer.consume(payload) - operation.consumer.terminate() - return next(rendezvous) - - -def future_stream_in_value_out( - front, name, payload_iterator, timeout, trace_id, pool): - """Services a stream-in value-out servicer method by returning a Future.""" - rendezvous = _control.Rendezvous() - subscription = _rendezvous_subscription(rendezvous) - operation = front.operate(name, None, False, timeout, subscription, trace_id) - operation.context.add_termination_callback(rendezvous.set_outcome) - pool.submit( - callable_util.with_exceptions_logged( - _control.pipe_iterator_to_consumer, _ITERATOR_EXCEPTION_LOG_MESSAGE), - payload_iterator, operation.consumer, lambda: True, True) - operation_future = _OperationFuture(rendezvous, operation) - operation.context.add_termination_callback( - operation_future.on_operation_termination) - return operation_future - - -def inline_stream_in_stream_out( - front, name, payload_iterator, timeout, trace_id, pool): - """Services a stream-in stream-out servicer method.""" - rendezvous = _control.Rendezvous() - subscription = _rendezvous_subscription(rendezvous) - operation = front.operate(name, None, False, timeout, subscription, trace_id) - operation.context.add_termination_callback(rendezvous.set_outcome) - pool.submit( - callable_util.with_exceptions_logged( - _control.pipe_iterator_to_consumer, _ITERATOR_EXCEPTION_LOG_MESSAGE), - payload_iterator, operation.consumer, lambda: True, True) - return _OperationCancellableIterator(rendezvous, operation) - - -def event_value_in_value_out( - front, name, payload, completion_callback, abortion_callback, timeout, - trace_id): - subscription = _unary_event_subscription( - completion_callback, abortion_callback) - operation = front.operate( - name, payload, True, timeout, subscription, trace_id) - return _Call(operation) - - -def event_value_in_stream_out( - front, name, payload, result_payload_consumer, abortion_callback, timeout, - trace_id): - subscription = _stream_event_subscription( - result_payload_consumer, abortion_callback) - operation = front.operate( - name, payload, True, timeout, subscription, trace_id) - return _Call(operation) - - -def event_stream_in_value_out( - front, name, completion_callback, abortion_callback, timeout, trace_id): - subscription = _unary_event_subscription( - completion_callback, abortion_callback) - operation = front.operate(name, None, False, timeout, subscription, trace_id) - return _Call(operation), operation.consumer - - -def event_stream_in_stream_out( - front, name, result_payload_consumer, abortion_callback, timeout, trace_id): - subscription = _stream_event_subscription( - result_payload_consumer, abortion_callback) - operation = front.operate(name, None, False, timeout, subscription, trace_id) - return _Call(operation), operation.consumer diff --git a/src/python/grpcio/grpc/framework/face/_control.py b/src/python/grpcio/grpc/framework/face/_control.py deleted file mode 100644 index 539615efa18..00000000000 --- a/src/python/grpcio/grpc/framework/face/_control.py +++ /dev/null @@ -1,201 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""State and behavior for translating between sync and async control flow.""" - -import threading - -from grpc.framework.base import interfaces as base_interfaces -from grpc.framework.face import exceptions -from grpc.framework.face import interfaces -from grpc.framework.foundation import abandonment -from grpc.framework.foundation import stream - -INTERNAL_ERROR_LOG_MESSAGE = ':-( RPC Framework (Face) Internal Error! :-(' - -_OPERATION_OUTCOME_TO_RPC_ABORTION = { - base_interfaces.Outcome.CANCELLED: interfaces.Abortion.CANCELLED, - base_interfaces.Outcome.EXPIRED: interfaces.Abortion.EXPIRED, - base_interfaces.Outcome.RECEPTION_FAILURE: - interfaces.Abortion.NETWORK_FAILURE, - base_interfaces.Outcome.TRANSMISSION_FAILURE: - interfaces.Abortion.NETWORK_FAILURE, - base_interfaces.Outcome.SERVICED_FAILURE: - interfaces.Abortion.SERVICED_FAILURE, - base_interfaces.Outcome.SERVICER_FAILURE: - interfaces.Abortion.SERVICER_FAILURE, -} - - -def _as_operation_termination_callback(rpc_abortion_callback): - def operation_termination_callback(operation_outcome): - rpc_abortion = _OPERATION_OUTCOME_TO_RPC_ABORTION.get( - operation_outcome, None) - if rpc_abortion is not None: - rpc_abortion_callback(rpc_abortion) - return operation_termination_callback - - -def _abortion_outcome_to_exception(abortion_outcome): - if abortion_outcome == base_interfaces.Outcome.CANCELLED: - return exceptions.CancellationError() - elif abortion_outcome == base_interfaces.Outcome.EXPIRED: - return exceptions.ExpirationError() - elif abortion_outcome == base_interfaces.Outcome.SERVICER_FAILURE: - return exceptions.ServicerError() - elif abortion_outcome == base_interfaces.Outcome.SERVICED_FAILURE: - return exceptions.ServicedError() - else: - return exceptions.NetworkError() - - -class UnaryConsumer(stream.Consumer): - """A stream.Consumer that should only ever be passed one value.""" - - def __init__(self, on_termination): - self._on_termination = on_termination - self._value = None - - def consume(self, value): - self._value = value - - def terminate(self): - self._on_termination(self._value) - - def consume_and_terminate(self, value): - self._on_termination(value) - - -class Rendezvous(stream.Consumer): - """A rendez-vous with stream.Consumer and iterator interfaces.""" - - def __init__(self): - self._condition = threading.Condition() - self._values = [] - self._values_completed = False - self._abortion = None - - def consume(self, value): - with self._condition: - self._values.append(value) - self._condition.notify() - - def terminate(self): - with self._condition: - self._values_completed = True - self._condition.notify() - - def consume_and_terminate(self, value): - with self._condition: - self._values.append(value) - self._values_completed = True - self._condition.notify() - - def __iter__(self): - return self - - def __next__(self): - return self.next() - - def next(self): - with self._condition: - while ((self._abortion is None) and - (not self._values) and - (not self._values_completed)): - self._condition.wait() - if self._abortion is not None: - raise _abortion_outcome_to_exception(self._abortion) - elif self._values: - return self._values.pop(0) - elif self._values_completed: - raise StopIteration() - else: - raise AssertionError('Unreachable code reached!') - - def set_outcome(self, outcome): - with self._condition: - if outcome is not base_interfaces.Outcome.COMPLETED: - self._abortion = outcome - self._condition.notify() - - -class RpcContext(interfaces.RpcContext): - """A wrapped base_interfaces.OperationContext.""" - - def __init__(self, operation_context): - self._operation_context = operation_context - - def is_active(self): - return self._operation_context.is_active() - - def time_remaining(self): - return self._operation_context.time_remaining() - - def add_abortion_callback(self, abortion_callback): - self._operation_context.add_termination_callback( - _as_operation_termination_callback(abortion_callback)) - - -def pipe_iterator_to_consumer(iterator, consumer, active, terminate): - """Pipes values emitted from an iterator to a stream.Consumer. - - Args: - iterator: An iterator from which values will be emitted. - consumer: A stream.Consumer to which values will be passed. - active: A no-argument callable that returns True if the work being done by - this function is still valid and should not be abandoned and False if the - work being done by this function should be abandoned. - terminate: A boolean indicating whether or not this function should - terminate the given consumer after passing to it all values emitted by the - given iterator. - - Raises: - abandonment.Abandoned: If this function quits early after seeing False - returned by the active function passed to it. - Exception: This function raises whatever exceptions are raised by iterating - over the given iterator. - """ - for element in iterator: - if not active(): - raise abandonment.Abandoned() - - consumer.consume(element) - - if not active(): - raise abandonment.Abandoned() - if terminate: - consumer.terminate() - - -def abortion_outcome_to_exception(abortion_outcome): - return _abortion_outcome_to_exception(abortion_outcome) - - -def as_operation_termination_callback(rpc_abortion_callback): - return _as_operation_termination_callback(rpc_abortion_callback) diff --git a/src/python/grpcio/grpc/framework/face/_service.py b/src/python/grpcio/grpc/framework/face/_service.py deleted file mode 100644 index cdf413356ad..00000000000 --- a/src/python/grpcio/grpc/framework/face/_service.py +++ /dev/null @@ -1,187 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Behaviors for servicing RPCs.""" - -# base_interfaces and interfaces are referenced from specification in this -# module. -from grpc.framework.base import interfaces as base_interfaces # pylint: disable=unused-import -from grpc.framework.face import _control -from grpc.framework.face import exceptions -from grpc.framework.face import interfaces # pylint: disable=unused-import -from grpc.framework.foundation import abandonment -from grpc.framework.foundation import callable_util -from grpc.framework.foundation import stream -from grpc.framework.foundation import stream_util - - -class _ValueInStreamOutConsumer(stream.Consumer): - """A stream.Consumer that maps inputs one-to-many onto outputs.""" - - def __init__(self, behavior, context, downstream): - """Constructor. - - Args: - behavior: A callable that takes a single value and an - interfaces.RpcContext and returns a generator of arbitrarily many - values. - context: An interfaces.RpcContext. - downstream: A stream.Consumer to which to pass the values generated by the - given behavior. - """ - self._behavior = behavior - self._context = context - self._downstream = downstream - - def consume(self, value): - _control.pipe_iterator_to_consumer( - self._behavior(value, self._context), self._downstream, - self._context.is_active, False) - - def terminate(self): - self._downstream.terminate() - - def consume_and_terminate(self, value): - _control.pipe_iterator_to_consumer( - self._behavior(value, self._context), self._downstream, - self._context.is_active, True) - - -def _pool_wrap(behavior, operation_context): - """Wraps an operation-related behavior so that it may be called in a pool. - - Args: - behavior: A callable related to carrying out an operation. - operation_context: A base_interfaces.OperationContext for the operation. - - Returns: - A callable that when called carries out the behavior of the given callable - and handles whatever exceptions it raises appropriately. - """ - def translation(*args): - try: - behavior(*args) - except ( - abandonment.Abandoned, - exceptions.ExpirationError, - exceptions.CancellationError, - exceptions.ServicedError, - exceptions.NetworkError) as e: - if operation_context.is_active(): - operation_context.fail(e) - except Exception as e: - operation_context.fail(e) - return callable_util.with_exceptions_logged( - translation, _control.INTERNAL_ERROR_LOG_MESSAGE) - - -def adapt_inline_value_in_value_out(method): - def adaptation(response_consumer, operation_context): - rpc_context = _control.RpcContext(operation_context) - return stream_util.TransformingConsumer( - lambda request: method(request, rpc_context), response_consumer) - return adaptation - - -def adapt_inline_value_in_stream_out(method): - def adaptation(response_consumer, operation_context): - rpc_context = _control.RpcContext(operation_context) - return _ValueInStreamOutConsumer(method, rpc_context, response_consumer) - return adaptation - - -def adapt_inline_stream_in_value_out(method, pool): - def adaptation(response_consumer, operation_context): - rendezvous = _control.Rendezvous() - operation_context.add_termination_callback(rendezvous.set_outcome) - def in_pool_thread(): - response_consumer.consume_and_terminate( - method(rendezvous, _control.RpcContext(operation_context))) - pool.submit(_pool_wrap(in_pool_thread, operation_context)) - return rendezvous - return adaptation - - -def adapt_inline_stream_in_stream_out(method, pool): - """Adapts an interfaces.InlineStreamInStreamOutMethod for use with Consumers. - - RPCs may be serviced by calling the return value of this function, passing - request values to the stream.Consumer returned from that call, and receiving - response values from the stream.Consumer passed to that call. - - Args: - method: An interfaces.InlineStreamInStreamOutMethod. - pool: A thread pool. - - Returns: - A callable that takes a stream.Consumer and a - base_interfaces.OperationContext and returns a stream.Consumer. - """ - def adaptation(response_consumer, operation_context): - rendezvous = _control.Rendezvous() - operation_context.add_termination_callback(rendezvous.set_outcome) - def in_pool_thread(): - _control.pipe_iterator_to_consumer( - method(rendezvous, _control.RpcContext(operation_context)), - response_consumer, operation_context.is_active, True) - pool.submit(_pool_wrap(in_pool_thread, operation_context)) - return rendezvous - return adaptation - - -def adapt_event_value_in_value_out(method): - def adaptation(response_consumer, operation_context): - def on_payload(payload): - method( - payload, response_consumer.consume_and_terminate, - _control.RpcContext(operation_context)) - return _control.UnaryConsumer(on_payload) - return adaptation - - -def adapt_event_value_in_stream_out(method): - def adaptation(response_consumer, operation_context): - def on_payload(payload): - method( - payload, response_consumer, _control.RpcContext(operation_context)) - return _control.UnaryConsumer(on_payload) - return adaptation - - -def adapt_event_stream_in_value_out(method): - def adaptation(response_consumer, operation_context): - rpc_context = _control.RpcContext(operation_context) - return method(response_consumer.consume_and_terminate, rpc_context) - return adaptation - - -def adapt_event_stream_in_stream_out(method): - def adaptation(response_consumer, operation_context): - return method(response_consumer, _control.RpcContext(operation_context)) - return adaptation diff --git a/src/python/grpcio/grpc/framework/face/demonstration.py b/src/python/grpcio/grpc/framework/face/demonstration.py deleted file mode 100644 index f6b4b609ffe..00000000000 --- a/src/python/grpcio/grpc/framework/face/demonstration.py +++ /dev/null @@ -1,118 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Demonstration-suitable implementation of the face layer of RPC Framework.""" - -from grpc.framework.base import util as _base_util -from grpc.framework.base import implementations as _base_implementations -from grpc.framework.face import implementations -from grpc.framework.foundation import logging_pool - -_POOL_SIZE_LIMIT = 5 - -_MAXIMUM_TIMEOUT = 90 - - -class LinkedPair(object): - """A Server and Stub that are linked to one another. - - Attributes: - server: A Server. - stub: A Stub. - """ - - def shut_down(self): - """Shuts down this object and releases its resources.""" - raise NotImplementedError() - - -class _LinkedPair(LinkedPair): - - def __init__(self, server, stub, front, back, pools): - self.server = server - self.stub = stub - self._front = front - self._back = back - self._pools = pools - - def shut_down(self): - _base_util.wait_for_idle(self._front) - _base_util.wait_for_idle(self._back) - - for pool in self._pools: - pool.shutdown(wait=True) - - -def server_and_stub( - default_timeout, - inline_value_in_value_out_methods=None, - inline_value_in_stream_out_methods=None, - inline_stream_in_value_out_methods=None, - inline_stream_in_stream_out_methods=None, - event_value_in_value_out_methods=None, - event_value_in_stream_out_methods=None, - event_stream_in_value_out_methods=None, - event_stream_in_stream_out_methods=None, - multi_method=None): - """Creates a Server and Stub linked together for use.""" - front_work_pool = logging_pool.pool(_POOL_SIZE_LIMIT) - front_transmission_pool = logging_pool.pool(_POOL_SIZE_LIMIT) - front_utility_pool = logging_pool.pool(_POOL_SIZE_LIMIT) - back_work_pool = logging_pool.pool(_POOL_SIZE_LIMIT) - back_transmission_pool = logging_pool.pool(_POOL_SIZE_LIMIT) - back_utility_pool = logging_pool.pool(_POOL_SIZE_LIMIT) - stub_pool = logging_pool.pool(_POOL_SIZE_LIMIT) - pools = ( - front_work_pool, front_transmission_pool, front_utility_pool, - back_work_pool, back_transmission_pool, back_utility_pool, - stub_pool) - - servicer = implementations.servicer( - back_work_pool, - inline_value_in_value_out_methods=inline_value_in_value_out_methods, - inline_value_in_stream_out_methods=inline_value_in_stream_out_methods, - inline_stream_in_value_out_methods=inline_stream_in_value_out_methods, - inline_stream_in_stream_out_methods=inline_stream_in_stream_out_methods, - event_value_in_value_out_methods=event_value_in_value_out_methods, - event_value_in_stream_out_methods=event_value_in_stream_out_methods, - event_stream_in_value_out_methods=event_stream_in_value_out_methods, - event_stream_in_stream_out_methods=event_stream_in_stream_out_methods, - multi_method=multi_method) - - front = _base_implementations.front_link( - front_work_pool, front_transmission_pool, front_utility_pool) - back = _base_implementations.back_link( - servicer, back_work_pool, back_transmission_pool, back_utility_pool, - default_timeout, _MAXIMUM_TIMEOUT) - front.join_rear_link(back) - back.join_fore_link(front) - - stub = implementations.stub(front, stub_pool) - - return _LinkedPair(implementations.server(), stub, front, back, pools) diff --git a/src/python/grpcio/grpc/framework/face/exceptions.py b/src/python/grpcio/grpc/framework/face/exceptions.py deleted file mode 100644 index f95455604d5..00000000000 --- a/src/python/grpcio/grpc/framework/face/exceptions.py +++ /dev/null @@ -1,78 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Exceptions used in the Face layer of RPC Framework.""" - -import abc - -import six - - -class NoSuchMethodError(Exception): - """Raised by customer code to indicate an unrecognized RPC method name. - - Attributes: - name: The unrecognized name. - """ - - def __init__(self, name): - """Constructor. - - Args: - name: The unrecognized RPC method name. - """ - super(NoSuchMethodError, self).__init__() - self.name = name - - -class RpcError(six.with_metaclass(abc.ABCMeta, Exception)): - """Common super type for all exceptions raised by the Face layer. - - Only RPC Framework should instantiate and raise these exceptions. - """ - - -class CancellationError(RpcError): - """Indicates that an RPC has been cancelled.""" - - -class ExpirationError(RpcError): - """Indicates that an RPC has expired ("timed out").""" - - -class NetworkError(RpcError): - """Indicates that some error occurred on the network.""" - - -class ServicedError(RpcError): - """Indicates that the Serviced failed in the course of an RPC.""" - - -class ServicerError(RpcError): - """Indicates that the Servicer failed in the course of servicing an RPC.""" diff --git a/src/python/grpcio/grpc/framework/face/implementations.py b/src/python/grpcio/grpc/framework/face/implementations.py deleted file mode 100644 index 96055b41300..00000000000 --- a/src/python/grpcio/grpc/framework/face/implementations.py +++ /dev/null @@ -1,320 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Entry points into the Face layer of RPC Framework.""" - -import six - -from grpc.framework.common import cardinality -from grpc.framework.common import style -from grpc.framework.base import exceptions as _base_exceptions -from grpc.framework.base import interfaces as base_interfaces -from grpc.framework.face import _calls -from grpc.framework.face import _service -from grpc.framework.face import exceptions -from grpc.framework.face import interfaces - - -class _BaseServicer(base_interfaces.Servicer): - - def __init__(self, methods, multi_method): - self._methods = methods - self._multi_method = multi_method - - def service(self, name, context, output_consumer): - method = self._methods.get(name, None) - if method is not None: - return method(output_consumer, context) - elif self._multi_method is not None: - try: - return self._multi_method.service(name, output_consumer, context) - except exceptions.NoSuchMethodError: - raise _base_exceptions.NoSuchMethodError() - else: - raise _base_exceptions.NoSuchMethodError() - - -class _UnaryUnaryMultiCallable(interfaces.UnaryUnaryMultiCallable): - - def __init__(self, front, name): - self._front = front - self._name = name - - def __call__(self, request, timeout): - return _calls.blocking_value_in_value_out( - self._front, self._name, request, timeout, 'unused trace ID') - - def future(self, request, timeout): - return _calls.future_value_in_value_out( - self._front, self._name, request, timeout, 'unused trace ID') - - def event(self, request, response_callback, abortion_callback, timeout): - return _calls.event_value_in_value_out( - self._front, self._name, request, response_callback, abortion_callback, - timeout, 'unused trace ID') - - -class _UnaryStreamMultiCallable(interfaces.UnaryStreamMultiCallable): - - def __init__(self, front, name): - self._front = front - self._name = name - - def __call__(self, request, timeout): - return _calls.inline_value_in_stream_out( - self._front, self._name, request, timeout, 'unused trace ID') - - def event(self, request, response_consumer, abortion_callback, timeout): - return _calls.event_value_in_stream_out( - self._front, self._name, request, response_consumer, abortion_callback, - timeout, 'unused trace ID') - - -class _StreamUnaryMultiCallable(interfaces.StreamUnaryMultiCallable): - - def __init__(self, front, name, pool): - self._front = front - self._name = name - self._pool = pool - - def __call__(self, request_iterator, timeout): - return _calls.blocking_stream_in_value_out( - self._front, self._name, request_iterator, timeout, 'unused trace ID') - - def future(self, request_iterator, timeout): - return _calls.future_stream_in_value_out( - self._front, self._name, request_iterator, timeout, 'unused trace ID', - self._pool) - - def event(self, response_callback, abortion_callback, timeout): - return _calls.event_stream_in_value_out( - self._front, self._name, response_callback, abortion_callback, timeout, - 'unused trace ID') - - -class _StreamStreamMultiCallable(interfaces.StreamStreamMultiCallable): - - def __init__(self, front, name, pool): - self._front = front - self._name = name - self._pool = pool - - def __call__(self, request_iterator, timeout): - return _calls.inline_stream_in_stream_out( - self._front, self._name, request_iterator, timeout, 'unused trace ID', - self._pool) - - def event(self, response_consumer, abortion_callback, timeout): - return _calls.event_stream_in_stream_out( - self._front, self._name, response_consumer, abortion_callback, timeout, - 'unused trace ID') - - -class _GenericStub(interfaces.GenericStub): - """An interfaces.GenericStub implementation.""" - - def __init__(self, front, pool): - self._front = front - self._pool = pool - - def blocking_value_in_value_out(self, name, request, timeout): - return _calls.blocking_value_in_value_out( - self._front, name, request, timeout, 'unused trace ID') - - def future_value_in_value_out(self, name, request, timeout): - return _calls.future_value_in_value_out( - self._front, name, request, timeout, 'unused trace ID') - - def inline_value_in_stream_out(self, name, request, timeout): - return _calls.inline_value_in_stream_out( - self._front, name, request, timeout, 'unused trace ID') - - def blocking_stream_in_value_out(self, name, request_iterator, timeout): - return _calls.blocking_stream_in_value_out( - self._front, name, request_iterator, timeout, 'unused trace ID') - - def future_stream_in_value_out(self, name, request_iterator, timeout): - return _calls.future_stream_in_value_out( - self._front, name, request_iterator, timeout, 'unused trace ID', - self._pool) - - def inline_stream_in_stream_out(self, name, request_iterator, timeout): - return _calls.inline_stream_in_stream_out( - self._front, name, request_iterator, timeout, 'unused trace ID', - self._pool) - - def event_value_in_value_out( - self, name, request, response_callback, abortion_callback, timeout): - return _calls.event_value_in_value_out( - self._front, name, request, response_callback, abortion_callback, - timeout, 'unused trace ID') - - def event_value_in_stream_out( - self, name, request, response_consumer, abortion_callback, timeout): - return _calls.event_value_in_stream_out( - self._front, name, request, response_consumer, abortion_callback, - timeout, 'unused trace ID') - - def event_stream_in_value_out( - self, name, response_callback, abortion_callback, timeout): - return _calls.event_stream_in_value_out( - self._front, name, response_callback, abortion_callback, timeout, - 'unused trace ID') - - def event_stream_in_stream_out( - self, name, response_consumer, abortion_callback, timeout): - return _calls.event_stream_in_stream_out( - self._front, name, response_consumer, abortion_callback, timeout, - 'unused trace ID') - - def unary_unary_multi_callable(self, name): - return _UnaryUnaryMultiCallable(self._front, name) - - def unary_stream_multi_callable(self, name): - return _UnaryStreamMultiCallable(self._front, name) - - def stream_unary_multi_callable(self, name): - return _StreamUnaryMultiCallable(self._front, name, self._pool) - - def stream_stream_multi_callable(self, name): - return _StreamStreamMultiCallable(self._front, name, self._pool) - - -class _DynamicStub(interfaces.DynamicStub): - """An interfaces.DynamicStub implementation.""" - - def __init__(self, cardinalities, front, pool): - self._cardinalities = cardinalities - self._front = front - self._pool = pool - - def __getattr__(self, attr): - method_cardinality = self._cardinalities.get(attr) - if method_cardinality is cardinality.Cardinality.UNARY_UNARY: - return _UnaryUnaryMultiCallable(self._front, attr) - elif method_cardinality is cardinality.Cardinality.UNARY_STREAM: - return _UnaryStreamMultiCallable(self._front, attr) - elif method_cardinality is cardinality.Cardinality.STREAM_UNARY: - return _StreamUnaryMultiCallable(self._front, attr, self._pool) - elif method_cardinality is cardinality.Cardinality.STREAM_STREAM: - return _StreamStreamMultiCallable(self._front, attr, self._pool) - else: - raise AttributeError('_DynamicStub object has no attribute "%s"!' % attr) - - -def _adapt_method_implementations(method_implementations, pool): - adapted_implementations = {} - for name, method_implementation in six.iteritems(method_implementations): - if method_implementation.style is style.Service.INLINE: - if method_implementation.cardinality is cardinality.Cardinality.UNARY_UNARY: - adapted_implementations[name] = _service.adapt_inline_value_in_value_out( - method_implementation.unary_unary_inline) - elif method_implementation.cardinality is cardinality.Cardinality.UNARY_STREAM: - adapted_implementations[name] = _service.adapt_inline_value_in_stream_out( - method_implementation.unary_stream_inline) - elif method_implementation.cardinality is cardinality.Cardinality.STREAM_UNARY: - adapted_implementations[name] = _service.adapt_inline_stream_in_value_out( - method_implementation.stream_unary_inline, pool) - elif method_implementation.cardinality is cardinality.Cardinality.STREAM_STREAM: - adapted_implementations[name] = _service.adapt_inline_stream_in_stream_out( - method_implementation.stream_stream_inline, pool) - elif method_implementation.style is style.Service.EVENT: - if method_implementation.cardinality is cardinality.Cardinality.UNARY_UNARY: - adapted_implementations[name] = _service.adapt_event_value_in_value_out( - method_implementation.unary_unary_event) - elif method_implementation.cardinality is cardinality.Cardinality.UNARY_STREAM: - adapted_implementations[name] = _service.adapt_event_value_in_stream_out( - method_implementation.unary_stream_event) - elif method_implementation.cardinality is cardinality.Cardinality.STREAM_UNARY: - adapted_implementations[name] = _service.adapt_event_stream_in_value_out( - method_implementation.stream_unary_event) - elif method_implementation.cardinality is cardinality.Cardinality.STREAM_STREAM: - adapted_implementations[name] = _service.adapt_event_stream_in_stream_out( - method_implementation.stream_stream_event) - return adapted_implementations - - -def servicer(pool, method_implementations, multi_method_implementation): - """Creates a base_interfaces.Servicer. - - It is guaranteed that any passed interfaces.MultiMethodImplementation will - only be called to service an RPC if there is no - interfaces.MethodImplementation for the RPC method in the passed - method_implementations dictionary. - - Args: - pool: A thread pool. - method_implementations: A dictionary from RPC method name to - interfaces.MethodImplementation object to be used to service the named - RPC method. - multi_method_implementation: An interfaces.MultiMethodImplementation to be - used to service any RPCs not serviced by the - interfaces.MethodImplementations given in the method_implementations - dictionary, or None. - - Returns: - A base_interfaces.Servicer that services RPCs via the given implementations. - """ - adapted_implementations = _adapt_method_implementations( - method_implementations, pool) - return _BaseServicer(adapted_implementations, multi_method_implementation) - - -def generic_stub(front, pool): - """Creates an interfaces.GenericStub. - - Args: - front: A base_interfaces.Front. - pool: A futures.ThreadPoolExecutor. - - Returns: - An interfaces.GenericStub that performs RPCs via the given - base_interfaces.Front. - """ - return _GenericStub(front, pool) - - -def dynamic_stub(cardinalities, front, pool, prefix): - """Creates an interfaces.DynamicStub. - - Args: - cardinalities: A dict from RPC method name to cardinality.Cardinality - value identifying the cardinality of every RPC method to be supported by - the created interfaces.DynamicStub. - front: A base_interfaces.Front. - pool: A futures.ThreadPoolExecutor. - prefix: A string to prepend when mapping requested attribute name to RPC - method name during attribute access on the created - interfaces.DynamicStub. - - Returns: - An interfaces.DynamicStub that performs RPCs via the given - base_interfaces.Front. - """ - return _DynamicStub(cardinalities, front, pool) diff --git a/src/python/grpcio/grpc/framework/face/interfaces.py b/src/python/grpcio/grpc/framework/face/interfaces.py deleted file mode 100644 index e9a25c17e19..00000000000 --- a/src/python/grpcio/grpc/framework/face/interfaces.py +++ /dev/null @@ -1,634 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Interfaces for the face layer of RPC Framework.""" - -import abc -import enum - -import six - -# cardinality, style, exceptions, abandonment, future, and stream are -# referenced from specification in this module. -from grpc.framework.common import cardinality # pylint: disable=unused-import -from grpc.framework.common import style # pylint: disable=unused-import -from grpc.framework.face import exceptions # pylint: disable=unused-import -from grpc.framework.foundation import abandonment # pylint: disable=unused-import -from grpc.framework.foundation import future # pylint: disable=unused-import -from grpc.framework.foundation import stream # pylint: disable=unused-import - - -@enum.unique -class Abortion(enum.Enum): - """Categories of RPC abortion.""" - CANCELLED = 'cancelled' - EXPIRED = 'expired' - NETWORK_FAILURE = 'network failure' - SERVICED_FAILURE = 'serviced failure' - SERVICER_FAILURE = 'servicer failure' - - -class CancellableIterator(six.with_metaclass(abc.ABCMeta)): - """Implements the Iterator protocol and affords a cancel method.""" - - @abc.abstractmethod - def __iter__(self): - """Returns the self object in accordance with the Iterator protocol.""" - raise NotImplementedError() - - def __next__(self): - return self.next() - - @abc.abstractmethod - def next(self): - """Returns a value or raises StopIteration per the Iterator protocol.""" - raise NotImplementedError() - - @abc.abstractmethod - def cancel(self): - """Requests cancellation of whatever computation underlies this iterator.""" - raise NotImplementedError() - - -class RpcContext(six.with_metaclass(abc.ABCMeta)): - """Provides RPC-related information and action.""" - - @abc.abstractmethod - def is_active(self): - """Describes whether the RPC is active or has terminated.""" - raise NotImplementedError() - - @abc.abstractmethod - def time_remaining(self): - """Describes the length of allowed time remaining for the RPC. - - Returns: - A nonnegative float indicating the length of allowed time in seconds - remaining for the RPC to complete before it is considered to have timed - out. - """ - raise NotImplementedError() - - @abc.abstractmethod - def add_abortion_callback(self, abortion_callback): - """Registers a callback to be called if the RPC is aborted. - - Args: - abortion_callback: A callable to be called and passed an Abortion value - in the event of RPC abortion. - """ - raise NotImplementedError() - - -class Call(six.with_metaclass(abc.ABCMeta)): - """Invocation-side representation of an RPC. - - Attributes: - context: An RpcContext affording information about the RPC. - """ - - @abc.abstractmethod - def cancel(self): - """Requests cancellation of the RPC.""" - raise NotImplementedError() - - -class UnaryUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): - """Affords invoking a unary-unary RPC in any call style.""" - - @abc.abstractmethod - def __call__(self, request, timeout): - """Synchronously invokes the underlying RPC. - - Args: - request: The request value for the RPC. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - The response value for the RPC. - - Raises: - exceptions.RpcError: Indicating that the RPC was aborted. - """ - raise NotImplementedError() - - @abc.abstractmethod - def future(self, request, timeout): - """Asynchronously invokes the underlying RPC. - - Args: - request: The request value for the RPC. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - A future.Future representing the RPC. In the event of RPC completion, the - returned Future's result value will be the response value of the RPC. - In the event of RPC abortion, the returned Future's exception value - will be an exceptions.RpcError. - """ - raise NotImplementedError() - - @abc.abstractmethod - def event(self, request, response_callback, abortion_callback, timeout): - """Asynchronously invokes the underlying RPC. - - Args: - request: The request value for the RPC. - response_callback: A callback to be called to accept the restponse value - of the RPC. - abortion_callback: A callback to be called and passed an Abortion value - in the event of RPC abortion. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - A Call object for the RPC. - """ - raise NotImplementedError() - - -class UnaryStreamMultiCallable(six.with_metaclass(abc.ABCMeta)): - """Affords invoking a unary-stream RPC in any call style.""" - - @abc.abstractmethod - def __call__(self, request, timeout): - """Synchronously invokes the underlying RPC. - - Args: - request: The request value for the RPC. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - A CancellableIterator that yields the response values of the RPC and - affords RPC cancellation. Drawing response values from the returned - CancellableIterator may raise exceptions.RpcError indicating abortion - of the RPC. - """ - raise NotImplementedError() - - @abc.abstractmethod - def event(self, request, response_consumer, abortion_callback, timeout): - """Asynchronously invokes the underlying RPC. - - Args: - request: The request value for the RPC. - response_consumer: A stream.Consumer to be called to accept the restponse - values of the RPC. - abortion_callback: A callback to be called and passed an Abortion value - in the event of RPC abortion. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - A Call object for the RPC. - """ - raise NotImplementedError() - - -class StreamUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): - """Affords invoking a stream-unary RPC in any call style.""" - - @abc.abstractmethod - def __call__(self, request_iterator, timeout): - """Synchronously invokes the underlying RPC. - - Args: - request_iterator: An iterator that yields request values for the RPC. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - The response value for the RPC. - - Raises: - exceptions.RpcError: Indicating that the RPC was aborted. - """ - raise NotImplementedError() - - @abc.abstractmethod - def future(self, request_iterator, timeout): - """Asynchronously invokes the underlying RPC. - - Args: - request_iterator: An iterator that yields request values for the RPC. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - A future.Future representing the RPC. In the event of RPC completion, the - returned Future's result value will be the response value of the RPC. - In the event of RPC abortion, the returned Future's exception value - will be an exceptions.RpcError. - """ - raise NotImplementedError() - - @abc.abstractmethod - def event(self, response_callback, abortion_callback, timeout): - """Asynchronously invokes the underlying RPC. - - Args: - request: The request value for the RPC. - response_callback: A callback to be called to accept the restponse value - of the RPC. - abortion_callback: A callback to be called and passed an Abortion value - in the event of RPC abortion. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - A pair of a Call object for the RPC and a stream.Consumer to which the - request values of the RPC should be passed. - """ - raise NotImplementedError() - - -class StreamStreamMultiCallable(six.with_metaclass(abc.ABCMeta)): - """Affords invoking a stream-stream RPC in any call style.""" - - @abc.abstractmethod - def __call__(self, request_iterator, timeout): - """Synchronously invokes the underlying RPC. - - Args: - request_iterator: An iterator that yields request values for the RPC. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - A CancellableIterator that yields the response values of the RPC and - affords RPC cancellation. Drawing response values from the returned - CancellableIterator may raise exceptions.RpcError indicating abortion - of the RPC. - """ - raise NotImplementedError() - - @abc.abstractmethod - def event(self, response_consumer, abortion_callback, timeout): - """Asynchronously invokes the underlying RPC. - -l Args: - response_consumer: A stream.Consumer to be called to accept the restponse - values of the RPC. - abortion_callback: A callback to be called and passed an Abortion value - in the event of RPC abortion. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - A pair of a Call object for the RPC and a stream.Consumer to which the - request values of the RPC should be passed. - """ - raise NotImplementedError() - - -class MethodImplementation(six.with_metaclass(abc.ABCMeta)): - """A sum type that describes an RPC method implementation. - - Attributes: - cardinality: A cardinality.Cardinality value. - style: A style.Service value. - unary_unary_inline: The implementation of the RPC method as a callable - value that takes a request value and an RpcContext object and returns a - response value. Only non-None if cardinality is - cardinality.Cardinality.UNARY_UNARY and style is style.Service.INLINE. - unary_stream_inline: The implementation of the RPC method as a callable - value that takes a request value and an RpcContext object and returns an - iterator of response values. Only non-None if cardinality is - cardinality.Cardinality.UNARY_STREAM and style is style.Service.INLINE. - stream_unary_inline: The implementation of the RPC method as a callable - value that takes an iterator of request values and an RpcContext object - and returns a response value. Only non-None if cardinality is - cardinality.Cardinality.STREAM_UNARY and style is style.Service.INLINE. - stream_stream_inline: The implementation of the RPC method as a callable - value that takes an iterator of request values and an RpcContext object - and returns an iterator of response values. Only non-None if cardinality - is cardinality.Cardinality.STREAM_STREAM and style is - style.Service.INLINE. - unary_unary_event: The implementation of the RPC method as a callable value - that takes a request value, a response callback to which to pass the - response value of the RPC, and an RpcContext. Only non-None if - cardinality is cardinality.Cardinality.UNARY_UNARY and style is - style.Service.EVENT. - unary_stream_event: The implementation of the RPC method as a callable - value that takes a request value, a stream.Consumer to which to pass the - the response values of the RPC, and an RpcContext. Only non-None if - cardinality is cardinality.Cardinality.UNARY_STREAM and style is - style.Service.EVENT. - stream_unary_event: The implementation of the RPC method as a callable - value that takes a response callback to which to pass the response value - of the RPC and an RpcContext and returns a stream.Consumer to which the - request values of the RPC should be passed. Only non-None if cardinality - is cardinality.Cardinality.STREAM_UNARY and style is style.Service.EVENT. - stream_stream_event: The implementation of the RPC method as a callable - value that takes a stream.Consumer to which to pass the response values - of the RPC and an RpcContext and returns a stream.Consumer to which the - request values of the RPC should be passed. Only non-None if cardinality - is cardinality.Cardinality.STREAM_STREAM and style is - style.Service.EVENT. - """ - - -class MultiMethodImplementation(six.with_metaclass(abc.ABCMeta)): - """A general type able to service many RPC methods.""" - - @abc.abstractmethod - def service(self, name, response_consumer, context): - """Services an RPC. - - Args: - name: The RPC method name. - response_consumer: A stream.Consumer to be called to accept the response - values of the RPC. - context: An RpcContext object. - - Returns: - A stream.Consumer with which to accept the request values of the RPC. The - consumer returned from this method may or may not be invoked to - completion: in the case of RPC abortion, RPC Framework will simply stop - passing values to this object. Implementations must not assume that this - object will be called to completion of the request stream or even called - at all. - - Raises: - abandonment.Abandoned: May or may not be raised when the RPC has been - aborted. - exceptions.NoSuchMethodError: If this MultiMethod does not recognize the - given RPC method name and is not able to service the RPC. - """ - raise NotImplementedError() - - -class GenericStub(six.with_metaclass(abc.ABCMeta)): - """Affords RPC methods to callers.""" - - @abc.abstractmethod - def blocking_value_in_value_out(self, name, request, timeout): - """Invokes a unary-request-unary-response RPC method. - - This method blocks until either returning the response value of the RPC - (in the event of RPC completion) or raising an exception (in the event of - RPC abortion). - - Args: - name: The RPC method name. - request: The request value for the RPC. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - The response value for the RPC. - - Raises: - exceptions.RpcError: Indicating that the RPC was aborted. - """ - raise NotImplementedError() - - @abc.abstractmethod - def future_value_in_value_out(self, name, request, timeout): - """Invokes a unary-request-unary-response RPC method. - - Args: - name: The RPC method name. - request: The request value for the RPC. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - A future.Future representing the RPC. In the event of RPC completion, the - returned Future will return an outcome indicating that the RPC returned - the response value of the RPC. In the event of RPC abortion, the - returned Future will return an outcome indicating that the RPC raised - an exceptions.RpcError. - """ - raise NotImplementedError() - - @abc.abstractmethod - def inline_value_in_stream_out(self, name, request, timeout): - """Invokes a unary-request-stream-response RPC method. - - Args: - name: The RPC method name. - request: The request value for the RPC. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - A CancellableIterator that yields the response values of the RPC and - affords RPC cancellation. Drawing response values from the returned - CancellableIterator may raise exceptions.RpcError indicating abortion of - the RPC. - """ - raise NotImplementedError() - - @abc.abstractmethod - def blocking_stream_in_value_out(self, name, request_iterator, timeout): - """Invokes a stream-request-unary-response RPC method. - - This method blocks until either returning the response value of the RPC - (in the event of RPC completion) or raising an exception (in the event of - RPC abortion). - - Args: - name: The RPC method name. - request_iterator: An iterator that yields the request values of the RPC. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - The response value for the RPC. - - Raises: - exceptions.RpcError: Indicating that the RPC was aborted. - """ - raise NotImplementedError() - - @abc.abstractmethod - def future_stream_in_value_out(self, name, request_iterator, timeout): - """Invokes a stream-request-unary-response RPC method. - - Args: - name: The RPC method name. - request_iterator: An iterator that yields the request values of the RPC. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - A future.Future representing the RPC. In the event of RPC completion, the - returned Future will return an outcome indicating that the RPC returned - the response value of the RPC. In the event of RPC abortion, the - returned Future will return an outcome indicating that the RPC raised - an exceptions.RpcError. - """ - raise NotImplementedError() - - @abc.abstractmethod - def inline_stream_in_stream_out(self, name, request_iterator, timeout): - """Invokes a stream-request-stream-response RPC method. - - Args: - name: The RPC method name. - request_iterator: An iterator that yields the request values of the RPC. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - A CancellableIterator that yields the response values of the RPC and - affords RPC cancellation. Drawing response values from the returned - CancellableIterator may raise exceptions.RpcError indicating abortion of - the RPC. - """ - raise NotImplementedError() - - @abc.abstractmethod - def event_value_in_value_out( - self, name, request, response_callback, abortion_callback, timeout): - """Event-driven invocation of a unary-request-unary-response RPC method. - - Args: - name: The RPC method name. - request: The request value for the RPC. - response_callback: A callback to be called to accept the response value - of the RPC. - abortion_callback: A callback to be called and passed an Abortion value - in the event of RPC abortion. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - A Call object for the RPC. - """ - raise NotImplementedError() - - @abc.abstractmethod - def event_value_in_stream_out( - self, name, request, response_consumer, abortion_callback, timeout): - """Event-driven invocation of a unary-request-stream-response RPC method. - - Args: - name: The RPC method name. - request: The request value for the RPC. - response_consumer: A stream.Consumer to be called to accept the response - values of the RPC. - abortion_callback: A callback to be called and passed an Abortion value - in the event of RPC abortion. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - A Call object for the RPC. - """ - raise NotImplementedError() - - @abc.abstractmethod - def event_stream_in_value_out( - self, name, response_callback, abortion_callback, timeout): - """Event-driven invocation of a unary-request-unary-response RPC method. - - Args: - name: The RPC method name. - response_callback: A callback to be called to accept the response value - of the RPC. - abortion_callback: A callback to be called and passed an Abortion value - in the event of RPC abortion. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - A pair of a Call object for the RPC and a stream.Consumer to which the - request values of the RPC should be passed. - """ - raise NotImplementedError() - - @abc.abstractmethod - def event_stream_in_stream_out( - self, name, response_consumer, abortion_callback, timeout): - """Event-driven invocation of a unary-request-stream-response RPC method. - - Args: - name: The RPC method name. - response_consumer: A stream.Consumer to be called to accept the response - values of the RPC. - abortion_callback: A callback to be called and passed an Abortion value - in the event of RPC abortion. - timeout: A duration of time in seconds to allow for the RPC. - - Returns: - A pair of a Call object for the RPC and a stream.Consumer to which the - request values of the RPC should be passed. - """ - raise NotImplementedError() - - @abc.abstractmethod - def unary_unary_multi_callable(self, name): - """Creates a UnaryUnaryMultiCallable for a unary-unary RPC method. - - Args: - name: The RPC method name. - - Returns: - A UnaryUnaryMultiCallable value for the named unary-unary RPC method. - """ - raise NotImplementedError() - - @abc.abstractmethod - def unary_stream_multi_callable(self, name): - """Creates a UnaryStreamMultiCallable for a unary-stream RPC method. - - Args: - name: The RPC method name. - - Returns: - A UnaryStreamMultiCallable value for the name unary-stream RPC method. - """ - raise NotImplementedError() - - @abc.abstractmethod - def stream_unary_multi_callable(self, name): - """Creates a StreamUnaryMultiCallable for a stream-unary RPC method. - - Args: - name: The RPC method name. - - Returns: - A StreamUnaryMultiCallable value for the named stream-unary RPC method. - """ - raise NotImplementedError() - - @abc.abstractmethod - def stream_stream_multi_callable(self, name): - """Creates a StreamStreamMultiCallable for a stream-stream RPC method. - - Args: - name: The RPC method name. - - Returns: - A StreamStreamMultiCallable value for the named stream-stream RPC method. - """ - raise NotImplementedError() - - -class DynamicStub(six.with_metaclass(abc.ABCMeta)): - """A stub with RPC-method-bound multi-callable attributes. - - Instances of this type responsd to attribute access as follows: if the - requested attribute is the name of a unary-unary RPC method, the value of the - attribute will be a UnaryUnaryMultiCallable with which to invoke the RPC - method; if the requested attribute is the name of a unary-stream RPC method, - the value of the attribute will be a UnaryStreamMultiCallable with which to - invoke the RPC method; if the requested attribute is the name of a - stream-unary RPC method, the value of the attribute will be a - StreamUnaryMultiCallable with which to invoke the RPC method; and if the - requested attribute is the name of a stream-stream RPC method, the value of - the attribute will be a StreamStreamMultiCallable with which to invoke the - RPC method. - """ diff --git a/src/python/grpcio/grpc/framework/face/utilities.py b/src/python/grpcio/grpc/framework/face/utilities.py deleted file mode 100644 index a63fe8c60df..00000000000 --- a/src/python/grpcio/grpc/framework/face/utilities.py +++ /dev/null @@ -1,177 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Utilities for RPC framework's face layer.""" - -import collections - -from grpc.framework.common import cardinality -from grpc.framework.common import style -from grpc.framework.face import interfaces -from grpc.framework.foundation import stream - - -class _MethodImplementation( - interfaces.MethodImplementation, - collections.namedtuple( - '_MethodImplementation', - ['cardinality', 'style', 'unary_unary_inline', 'unary_stream_inline', - 'stream_unary_inline', 'stream_stream_inline', 'unary_unary_event', - 'unary_stream_event', 'stream_unary_event', 'stream_stream_event',])): - pass - - -def unary_unary_inline(behavior): - """Creates an interfaces.MethodImplementation for the given behavior. - - Args: - behavior: The implementation of a unary-unary RPC method as a callable value - that takes a request value and an interfaces.RpcContext object and - returns a response value. - - Returns: - An interfaces.MethodImplementation derived from the given behavior. - """ - return _MethodImplementation( - cardinality.Cardinality.UNARY_UNARY, style.Service.INLINE, behavior, - None, None, None, None, None, None, None) - - -def unary_stream_inline(behavior): - """Creates an interfaces.MethodImplementation for the given behavior. - - Args: - behavior: The implementation of a unary-stream RPC method as a callable - value that takes a request value and an interfaces.RpcContext object and - returns an iterator of response values. - - Returns: - An interfaces.MethodImplementation derived from the given behavior. - """ - return _MethodImplementation( - cardinality.Cardinality.UNARY_STREAM, style.Service.INLINE, None, - behavior, None, None, None, None, None, None) - - -def stream_unary_inline(behavior): - """Creates an interfaces.MethodImplementation for the given behavior. - - Args: - behavior: The implementation of a stream-unary RPC method as a callable - value that takes an iterator of request values and an - interfaces.RpcContext object and returns a response value. - - Returns: - An interfaces.MethodImplementation derived from the given behavior. - """ - return _MethodImplementation( - cardinality.Cardinality.STREAM_UNARY, style.Service.INLINE, None, None, - behavior, None, None, None, None, None) - - -def stream_stream_inline(behavior): - """Creates an interfaces.MethodImplementation for the given behavior. - - Args: - behavior: The implementation of a stream-stream RPC method as a callable - value that takes an iterator of request values and an - interfaces.RpcContext object and returns an iterator of response values. - - Returns: - An interfaces.MethodImplementation derived from the given behavior. - """ - return _MethodImplementation( - cardinality.Cardinality.STREAM_STREAM, style.Service.INLINE, None, None, - None, behavior, None, None, None, None) - - -def unary_unary_event(behavior): - """Creates an interfaces.MethodImplementation for the given behavior. - - Args: - behavior: The implementation of a unary-unary RPC method as a callable - value that takes a request value, a response callback to which to pass - the response value of the RPC, and an interfaces.RpcContext. - - Returns: - An interfaces.MethodImplementation derived from the given behavior. - """ - return _MethodImplementation( - cardinality.Cardinality.UNARY_UNARY, style.Service.EVENT, None, None, - None, None, behavior, None, None, None) - - -def unary_stream_event(behavior): - """Creates an interfaces.MethodImplementation for the given behavior. - - Args: - behavior: The implementation of a unary-stream RPC method as a callable - value that takes a request value, a stream.Consumer to which to pass the - the response values of the RPC, and an interfaces.RpcContext. - - Returns: - An interfaces.MethodImplementation derived from the given behavior. - """ - return _MethodImplementation( - cardinality.Cardinality.UNARY_STREAM, style.Service.EVENT, None, None, - None, None, None, behavior, None, None) - - -def stream_unary_event(behavior): - """Creates an interfaces.MethodImplementation for the given behavior. - - Args: - behavior: The implementation of a stream-unary RPC method as a callable - value that takes a response callback to which to pass the response value - of the RPC and an interfaces.RpcContext and returns a stream.Consumer to - which the request values of the RPC should be passed. - - Returns: - An interfaces.MethodImplementation derived from the given behavior. - """ - return _MethodImplementation( - cardinality.Cardinality.STREAM_UNARY, style.Service.EVENT, None, None, - None, None, None, None, behavior, None) - - -def stream_stream_event(behavior): - """Creates an interfaces.MethodImplementation for the given behavior. - - Args: - behavior: The implementation of a stream-stream RPC method as a callable - value that takes a stream.Consumer to which to pass the response values - of the RPC and an interfaces.RpcContext and returns a stream.Consumer to - which the request values of the RPC should be passed. - - Returns: - An interfaces.MethodImplementation derived from the given behavior. - """ - return _MethodImplementation( - cardinality.Cardinality.STREAM_STREAM, style.Service.EVENT, None, None, - None, None, None, None, None, behavior) diff --git a/src/python/grpcio/tests/unit/framework/face/__init__.py b/src/python/grpcio/tests/unit/framework/face/__init__.py deleted file mode 100644 index 70865191060..00000000000 --- a/src/python/grpcio/tests/unit/framework/face/__init__.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - diff --git a/src/python/grpcio/tests/unit/framework/face/testing/__init__.py b/src/python/grpcio/tests/unit/framework/face/testing/__init__.py deleted file mode 100644 index 70865191060..00000000000 --- a/src/python/grpcio/tests/unit/framework/face/testing/__init__.py +++ /dev/null @@ -1,30 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - - diff --git a/src/python/grpcio/tests/unit/framework/face/testing/base_util.py b/src/python/grpcio/tests/unit/framework/face/testing/base_util.py deleted file mode 100644 index 59652b3e908..00000000000 --- a/src/python/grpcio/tests/unit/framework/face/testing/base_util.py +++ /dev/null @@ -1,102 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Utilities for creating Base-layer objects for use in Face-layer tests.""" - -import abc - -import six - -# interfaces is referenced from specification in this module. -from grpc.framework.base import util as _base_util -from grpc.framework.base import implementations -from grpc.framework.base import in_memory -from grpc.framework.base import interfaces # pylint: disable=unused-import -from grpc.framework.foundation import logging_pool - -_POOL_SIZE_LIMIT = 5 - -_MAXIMUM_TIMEOUT = 90 - - -class LinkedPair(six.with_metaclass(abc.ABCMeta)): - """A Front and Back that are linked to one another. - - Attributes: - front: An interfaces.Front. - back: An interfaces.Back. - """ - - @abc.abstractmethod - def shut_down(self): - """Shuts down this object and releases its resources.""" - raise NotImplementedError() - - -class _LinkedPair(LinkedPair): - - def __init__(self, front, back, pools): - self.front = front - self.back = back - self._pools = pools - - def shut_down(self): - _base_util.wait_for_idle(self.front) - _base_util.wait_for_idle(self.back) - - for pool in self._pools: - pool.shutdown(wait=True) - - -def linked_pair(servicer, default_timeout): - """Creates a Server and Stub linked together for use.""" - link_pool = logging_pool.pool(_POOL_SIZE_LIMIT) - front_work_pool = logging_pool.pool(_POOL_SIZE_LIMIT) - front_transmission_pool = logging_pool.pool(_POOL_SIZE_LIMIT) - front_utility_pool = logging_pool.pool(_POOL_SIZE_LIMIT) - back_work_pool = logging_pool.pool(_POOL_SIZE_LIMIT) - back_transmission_pool = logging_pool.pool(_POOL_SIZE_LIMIT) - back_utility_pool = logging_pool.pool(_POOL_SIZE_LIMIT) - pools = ( - link_pool, - front_work_pool, front_transmission_pool, front_utility_pool, - back_work_pool, back_transmission_pool, back_utility_pool) - - link = in_memory.Link(link_pool) - front = implementations.front_link( - front_work_pool, front_transmission_pool, front_utility_pool) - back = implementations.back_link( - servicer, back_work_pool, back_transmission_pool, back_utility_pool, - default_timeout, _MAXIMUM_TIMEOUT) - front.join_rear_link(link) - link.join_fore_link(front) - back.join_fore_link(link) - link.join_rear_link(back) - - return _LinkedPair(front, back, pools) diff --git a/src/python/grpcio/tests/unit/framework/face/testing/blocking_invocation_inline_service_test_case.py b/src/python/grpcio/tests/unit/framework/face/testing/blocking_invocation_inline_service_test_case.py deleted file mode 100644 index 2ebe1a32a4d..00000000000 --- a/src/python/grpcio/tests/unit/framework/face/testing/blocking_invocation_inline_service_test_case.py +++ /dev/null @@ -1,224 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""A test to verify an implementation of the Face layer of RPC Framework.""" - -# unittest is referenced from specification in this module. -import abc -import unittest # pylint: disable=unused-import - -import six - -from grpc.framework.face import exceptions -from tests.unit.framework.common import test_constants -from tests.unit.framework.face.testing import control -from tests.unit.framework.face.testing import coverage -from tests.unit.framework.face.testing import digest -from tests.unit.framework.face.testing import stock_service -from tests.unit.framework.face.testing import test_case - - -class BlockingInvocationInlineServiceTestCase( - six.with_metaclass(abc.ABCMeta, - test_case.FaceTestCase, coverage.BlockingCoverage)): - """A test of the Face layer of RPC Framework. - - Concrete subclasses must also extend unittest.TestCase. - """ - - def setUp(self): - """See unittest.TestCase.setUp for full specification. - - Overriding implementations must call this implementation. - """ - self.control = control.PauseFailControl() - self.digest = digest.digest( - stock_service.STOCK_TEST_SERVICE, self.control, None) - - self.stub, self.memo = self.set_up_implementation( - self.digest.name, self.digest.methods, - self.digest.inline_method_implementations, None) - - def tearDown(self): - """See unittest.TestCase.tearDown for full specification. - - Overriding implementations must call this implementation. - """ - self.tear_down_implementation(self.memo) - - def testSuccessfulUnaryRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_unary_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - - response = self.stub.blocking_value_in_value_out( - name, request, test_constants.LONG_TIMEOUT) - - test_messages.verify(request, response, self) - - def testSuccessfulUnaryRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_stream_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - - response_iterator = self.stub.inline_value_in_stream_out( - name, request, test_constants.LONG_TIMEOUT) - responses = list(response_iterator) - - test_messages.verify(request, responses, self) - - def testSuccessfulStreamRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_unary_messages_sequences)): - for test_messages in test_messages_sequence: - requests = test_messages.requests() - - response = self.stub.blocking_stream_in_value_out( - name, iter(requests), test_constants.LONG_TIMEOUT) - - test_messages.verify(requests, response, self) - - def testSuccessfulStreamRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_stream_messages_sequences)): - for test_messages in test_messages_sequence: - requests = test_messages.requests() - - response_iterator = self.stub.inline_stream_in_stream_out( - name, iter(requests), test_constants.LONG_TIMEOUT) - responses = list(response_iterator) - - test_messages.verify(requests, responses, self) - - def testSequentialInvocations(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_unary_messages_sequences)): - for test_messages in test_messages_sequence: - first_request = test_messages.request() - second_request = test_messages.request() - - first_response = self.stub.blocking_value_in_value_out( - name, first_request, test_constants.SHORT_TIMEOUT) - - test_messages.verify(first_request, first_response, self) - - second_response = self.stub.blocking_value_in_value_out( - name, second_request, test_constants.SHORT_TIMEOUT) - - test_messages.verify(second_request, second_response, self) - - def testExpiredUnaryRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_unary_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - - with self.control.pause(), self.assertRaises( - exceptions.ExpirationError): - multi_callable = self.stub.unary_unary_multi_callable(name) - multi_callable(request, test_constants.SHORT_TIMEOUT) - - def testExpiredUnaryRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_stream_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - - with self.control.pause(), self.assertRaises( - exceptions.ExpirationError): - response_iterator = self.stub.inline_value_in_stream_out( - name, request, test_constants.SHORT_TIMEOUT) - list(response_iterator) - - def testExpiredStreamRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_unary_messages_sequences)): - for test_messages in test_messages_sequence: - requests = test_messages.requests() - - with self.control.pause(), self.assertRaises( - exceptions.ExpirationError): - multi_callable = self.stub.stream_unary_multi_callable(name) - multi_callable(iter(requests), test_constants.SHORT_TIMEOUT) - - def testExpiredStreamRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_stream_messages_sequences)): - for test_messages in test_messages_sequence: - requests = test_messages.requests() - - with self.control.pause(), self.assertRaises( - exceptions.ExpirationError): - response_iterator = self.stub.inline_stream_in_stream_out( - name, iter(requests), test_constants.SHORT_TIMEOUT) - list(response_iterator) - - def testFailedUnaryRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_unary_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - - with self.control.fail(), self.assertRaises(exceptions.ServicerError): - self.stub.blocking_value_in_value_out(name, request, - test_constants.SHORT_TIMEOUT) - - def testFailedUnaryRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_stream_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - - with self.control.fail(), self.assertRaises(exceptions.ServicerError): - response_iterator = self.stub.inline_value_in_stream_out( - name, request, test_constants.SHORT_TIMEOUT) - list(response_iterator) - - def testFailedStreamRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_unary_messages_sequences)): - for test_messages in test_messages_sequence: - requests = test_messages.requests() - - with self.control.fail(), self.assertRaises(exceptions.ServicerError): - self.stub.blocking_stream_in_value_out(name, iter(requests), - test_constants.SHORT_TIMEOUT) - - def testFailedStreamRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_stream_messages_sequences)): - for test_messages in test_messages_sequence: - requests = test_messages.requests() - - with self.control.fail(), self.assertRaises(exceptions.ServicerError): - response_iterator = self.stub.inline_stream_in_stream_out( - name, iter(requests), test_constants.SHORT_TIMEOUT) - list(response_iterator) diff --git a/src/python/grpcio/tests/unit/framework/face/testing/callback.py b/src/python/grpcio/tests/unit/framework/face/testing/callback.py deleted file mode 100644 index d0e63c8c562..00000000000 --- a/src/python/grpcio/tests/unit/framework/face/testing/callback.py +++ /dev/null @@ -1,94 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""A utility useful in tests of asynchronous, event-driven interfaces.""" - -import threading - -from grpc.framework.foundation import stream - - -class Callback(stream.Consumer): - """A utility object useful in tests of asynchronous code.""" - - def __init__(self): - self._condition = threading.Condition() - self._unary_response = None - self._streamed_responses = [] - self._completed = False - self._abortion = None - - def abort(self, abortion): - with self._condition: - self._abortion = abortion - self._condition.notify_all() - - def complete(self, unary_response): - with self._condition: - self._unary_response = unary_response - self._completed = True - self._condition.notify_all() - - def consume(self, streamed_response): - with self._condition: - self._streamed_responses.append(streamed_response) - - def terminate(self): - with self._condition: - self._completed = True - self._condition.notify_all() - - def consume_and_terminate(self, streamed_response): - with self._condition: - self._streamed_responses.append(streamed_response) - self._completed = True - self._condition.notify_all() - - def block_until_terminated(self): - with self._condition: - while self._abortion is None and not self._completed: - self._condition.wait() - - def response(self): - with self._condition: - if self._abortion is None: - return self._unary_response - else: - raise AssertionError('Aborted with abortion "%s"!' % self._abortion) - - def responses(self): - with self._condition: - if self._abortion is None: - return list(self._streamed_responses) - else: - raise AssertionError('Aborted with abortion "%s"!' % self._abortion) - - def abortion(self): - with self._condition: - return self._abortion diff --git a/src/python/grpcio/tests/unit/framework/face/testing/control.py b/src/python/grpcio/tests/unit/framework/face/testing/control.py deleted file mode 100644 index 8425affcc91..00000000000 --- a/src/python/grpcio/tests/unit/framework/face/testing/control.py +++ /dev/null @@ -1,87 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Code for instructing systems under test to block or fail.""" - -import abc -import contextlib -import threading - -import six - - -class Control(six.with_metaclass(abc.ABCMeta)): - """An object that accepts program control from a system under test. - - Systems under test passed a Control should call its control() method - frequently during execution. The control() method may block, raise an - exception, or do nothing, all according to the enclosing test's desire for - the system under test to simulate hanging, failing, or functioning. - """ - - @abc.abstractmethod - def control(self): - """Potentially does anything.""" - raise NotImplementedError() - - -class PauseFailControl(Control): - """A Control that can be used to pause or fail code under control.""" - - def __init__(self): - self._condition = threading.Condition() - self._paused = False - self._fail = False - - def control(self): - with self._condition: - if self._fail: - raise ValueError() - - while self._paused: - self._condition.wait() - - @contextlib.contextmanager - def pause(self): - """Pauses code under control while controlling code is in context.""" - with self._condition: - self._paused = True - yield - with self._condition: - self._paused = False - self._condition.notify_all() - - @contextlib.contextmanager - def fail(self): - """Fails code under control while controlling code is in context.""" - with self._condition: - self._fail = True - yield - with self._condition: - self._fail = False diff --git a/src/python/grpcio/tests/unit/framework/face/testing/coverage.py b/src/python/grpcio/tests/unit/framework/face/testing/coverage.py deleted file mode 100644 index 3c88b7841a5..00000000000 --- a/src/python/grpcio/tests/unit/framework/face/testing/coverage.py +++ /dev/null @@ -1,121 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Governs coverage for the tests of the Face layer of RPC Framework.""" - -import abc - -import six - -# These classes are only valid when inherited by unittest.TestCases. -# pylint: disable=invalid-name - - -class BlockingCoverage(six.with_metaclass(abc.ABCMeta)): - """Specification of test coverage for blocking behaviors.""" - - @abc.abstractmethod - def testSuccessfulUnaryRequestUnaryResponse(self): - raise NotImplementedError() - - @abc.abstractmethod - def testSuccessfulUnaryRequestStreamResponse(self): - raise NotImplementedError() - - @abc.abstractmethod - def testSuccessfulStreamRequestUnaryResponse(self): - raise NotImplementedError() - - @abc.abstractmethod - def testSuccessfulStreamRequestStreamResponse(self): - raise NotImplementedError() - - @abc.abstractmethod - def testSequentialInvocations(self): - raise NotImplementedError() - - @abc.abstractmethod - def testExpiredUnaryRequestUnaryResponse(self): - raise NotImplementedError() - - @abc.abstractmethod - def testExpiredUnaryRequestStreamResponse(self): - raise NotImplementedError() - - @abc.abstractmethod - def testExpiredStreamRequestUnaryResponse(self): - raise NotImplementedError() - - @abc.abstractmethod - def testExpiredStreamRequestStreamResponse(self): - raise NotImplementedError() - - @abc.abstractmethod - def testFailedUnaryRequestUnaryResponse(self): - raise NotImplementedError() - - @abc.abstractmethod - def testFailedUnaryRequestStreamResponse(self): - raise NotImplementedError() - - @abc.abstractmethod - def testFailedStreamRequestUnaryResponse(self): - raise NotImplementedError() - - @abc.abstractmethod - def testFailedStreamRequestStreamResponse(self): - raise NotImplementedError() - - -class FullCoverage(six.with_metaclass(abc.ABCMeta, BlockingCoverage)): - """Specification of test coverage for non-blocking behaviors.""" - - @abc.abstractmethod - def testParallelInvocations(self): - raise NotImplementedError() - - @abc.abstractmethod - def testWaitingForSomeButNotAllParallelInvocations(self): - raise NotImplementedError() - - @abc.abstractmethod - def testCancelledUnaryRequestUnaryResponse(self): - raise NotImplementedError() - - @abc.abstractmethod - def testCancelledUnaryRequestStreamResponse(self): - raise NotImplementedError() - - @abc.abstractmethod - def testCancelledStreamRequestUnaryResponse(self): - raise NotImplementedError() - - @abc.abstractmethod - def testCancelledStreamRequestStreamResponse(self): - raise NotImplementedError() diff --git a/src/python/grpcio/tests/unit/framework/face/testing/digest.py b/src/python/grpcio/tests/unit/framework/face/testing/digest.py deleted file mode 100644 index 2b45aded208..00000000000 --- a/src/python/grpcio/tests/unit/framework/face/testing/digest.py +++ /dev/null @@ -1,452 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Code for making a service.TestService more amenable to use in tests.""" - -import collections -import threading - -import six - -# testing_control, interfaces, and testing_service are referenced from -# specification in this module. -from grpc.framework.common import cardinality -from grpc.framework.common import style -from grpc.framework.face import exceptions -from grpc.framework.face import interfaces as face_interfaces -from grpc.framework.foundation import stream -from grpc.framework.foundation import stream_util -from tests.unit.framework.face.testing import control as testing_control # pylint: disable=unused-import -from tests.unit.framework.face.testing import interfaces # pylint: disable=unused-import -from tests.unit.framework.face.testing import service as testing_service # pylint: disable=unused-import - -_IDENTITY = lambda x: x - - -class TestServiceDigest( - collections.namedtuple( - 'TestServiceDigest', - ['name', - 'methods', - 'inline_method_implementations', - 'event_method_implementations', - 'multi_method_implementation', - 'unary_unary_messages_sequences', - 'unary_stream_messages_sequences', - 'stream_unary_messages_sequences', - 'stream_stream_messages_sequences'])): - """A transformation of a service.TestService. - - Attributes: - name: The RPC service name to be used in the test. - methods: A sequence of interfaces.Method objects describing the RPC - methods that will be called during the test. - inline_method_implementations: A dict from RPC method name to - face_interfaces.MethodImplementation object to be used in tests of - in-line calls to behaviors under test. - event_method_implementations: A dict from RPC method name to - face_interfaces.MethodImplementation object to be used in tests of - event-driven calls to behaviors under test. - multi_method_implementation: A face_interfaces.MultiMethodImplementation to - be used in tests of generic calls to behaviors under test. - unary_unary_messages_sequences: A dict from method name to sequence of - service.UnaryUnaryTestMessages objects to be used to test the method - with the given name. - unary_stream_messages_sequences: A dict from method name to sequence of - service.UnaryStreamTestMessages objects to be used to test the method - with the given name. - stream_unary_messages_sequences: A dict from method name to sequence of - service.StreamUnaryTestMessages objects to be used to test the method - with the given name. - stream_stream_messages_sequences: A dict from method name to sequence of - service.StreamStreamTestMessages objects to be used to test the - method with the given name. - serialization: A serial.Serialization object describing serialization - behaviors for all the RPC methods. - """ - - -class _BufferingConsumer(stream.Consumer): - """A trivial Consumer that dumps what it consumes in a user-mutable buffer.""" - - def __init__(self): - self.consumed = [] - self.terminated = False - - def consume(self, value): - self.consumed.append(value) - - def terminate(self): - self.terminated = True - - def consume_and_terminate(self, value): - self.consumed.append(value) - self.terminated = True - - -class _InlineUnaryUnaryMethod(face_interfaces.MethodImplementation): - - def __init__(self, unary_unary_test_method, control): - self._test_method = unary_unary_test_method - self._control = control - - self.cardinality = cardinality.Cardinality.UNARY_UNARY - self.style = style.Service.INLINE - - def unary_unary_inline(self, request, context): - response_list = [] - self._test_method.service( - request, response_list.append, context, self._control) - return response_list.pop(0) - - -class _EventUnaryUnaryMethod(face_interfaces.MethodImplementation): - - def __init__(self, unary_unary_test_method, control, pool): - self._test_method = unary_unary_test_method - self._control = control - self._pool = pool - - self.cardinality = cardinality.Cardinality.UNARY_UNARY - self.style = style.Service.EVENT - - def unary_unary_event(self, request, response_callback, context): - if self._pool is None: - self._test_method.service( - request, response_callback, context, self._control) - else: - self._pool.submit( - self._test_method.service, request, response_callback, context, - self._control) - - -class _InlineUnaryStreamMethod(face_interfaces.MethodImplementation): - - def __init__(self, unary_stream_test_method, control): - self._test_method = unary_stream_test_method - self._control = control - - self.cardinality = cardinality.Cardinality.UNARY_STREAM - self.style = style.Service.INLINE - - def unary_stream_inline(self, request, context): - response_consumer = _BufferingConsumer() - self._test_method.service( - request, response_consumer, context, self._control) - for response in response_consumer.consumed: - yield response - - -class _EventUnaryStreamMethod(face_interfaces.MethodImplementation): - - def __init__(self, unary_stream_test_method, control, pool): - self._test_method = unary_stream_test_method - self._control = control - self._pool = pool - - self.cardinality = cardinality.Cardinality.UNARY_STREAM - self.style = style.Service.EVENT - - def unary_stream_event(self, request, response_consumer, context): - if self._pool is None: - self._test_method.service( - request, response_consumer, context, self._control) - else: - self._pool.submit( - self._test_method.service, request, response_consumer, context, - self._control) - - -class _InlineStreamUnaryMethod(face_interfaces.MethodImplementation): - - def __init__(self, stream_unary_test_method, control): - self._test_method = stream_unary_test_method - self._control = control - - self.cardinality = cardinality.Cardinality.STREAM_UNARY - self.style = style.Service.INLINE - - def stream_unary_inline(self, request_iterator, context): - response_list = [] - request_consumer = self._test_method.service( - response_list.append, context, self._control) - for request in request_iterator: - request_consumer.consume(request) - request_consumer.terminate() - return response_list.pop(0) - - -class _EventStreamUnaryMethod(face_interfaces.MethodImplementation): - - def __init__(self, stream_unary_test_method, control, pool): - self._test_method = stream_unary_test_method - self._control = control - self._pool = pool - - self.cardinality = cardinality.Cardinality.STREAM_UNARY - self.style = style.Service.EVENT - - def stream_unary_event(self, response_callback, context): - request_consumer = self._test_method.service( - response_callback, context, self._control) - if self._pool is None: - return request_consumer - else: - return stream_util.ThreadSwitchingConsumer(request_consumer, self._pool) - - -class _InlineStreamStreamMethod(face_interfaces.MethodImplementation): - - def __init__(self, stream_stream_test_method, control): - self._test_method = stream_stream_test_method - self._control = control - - self.cardinality = cardinality.Cardinality.STREAM_STREAM - self.style = style.Service.INLINE - - def stream_stream_inline(self, request_iterator, context): - response_consumer = _BufferingConsumer() - request_consumer = self._test_method.service( - response_consumer, context, self._control) - - for request in request_iterator: - request_consumer.consume(request) - while response_consumer.consumed: - yield response_consumer.consumed.pop(0) - response_consumer.terminate() - - -class _EventStreamStreamMethod(face_interfaces.MethodImplementation): - - def __init__(self, stream_stream_test_method, control, pool): - self._test_method = stream_stream_test_method - self._control = control - self._pool = pool - - self.cardinality = cardinality.Cardinality.STREAM_STREAM - self.style = style.Service.EVENT - - def stream_stream_event(self, response_consumer, context): - request_consumer = self._test_method.service( - response_consumer, context, self._control) - if self._pool is None: - return request_consumer - else: - return stream_util.ThreadSwitchingConsumer(request_consumer, self._pool) - - -class _UnaryConsumer(stream.Consumer): - """A Consumer that only allows consumption of exactly one value.""" - - def __init__(self, action): - self._lock = threading.Lock() - self._action = action - self._consumed = False - self._terminated = False - - def consume(self, value): - with self._lock: - if self._consumed: - raise ValueError('Unary consumer already consumed!') - elif self._terminated: - raise ValueError('Unary consumer already terminated!') - else: - self._consumed = True - - self._action(value) - - def terminate(self): - with self._lock: - if not self._consumed: - raise ValueError('Unary consumer hasn\'t yet consumed!') - elif self._terminated: - raise ValueError('Unary consumer already terminated!') - else: - self._terminated = True - - def consume_and_terminate(self, value): - with self._lock: - if self._consumed: - raise ValueError('Unary consumer already consumed!') - elif self._terminated: - raise ValueError('Unary consumer already terminated!') - else: - self._consumed = True - self._terminated = True - - self._action(value) - - -class _UnaryUnaryAdaptation(object): - - def __init__(self, unary_unary_test_method): - self._method = unary_unary_test_method - - def service(self, response_consumer, context, control): - def action(request): - self._method.service( - request, response_consumer.consume_and_terminate, context, control) - return _UnaryConsumer(action) - - -class _UnaryStreamAdaptation(object): - - def __init__(self, unary_stream_test_method): - self._method = unary_stream_test_method - - def service(self, response_consumer, context, control): - def action(request): - self._method.service(request, response_consumer, context, control) - return _UnaryConsumer(action) - - -class _StreamUnaryAdaptation(object): - - def __init__(self, stream_unary_test_method): - self._method = stream_unary_test_method - - def service(self, response_consumer, context, control): - return self._method.service( - response_consumer.consume_and_terminate, context, control) - - -class _MultiMethodImplementation(face_interfaces.MultiMethodImplementation): - - def __init__(self, methods, control, pool): - self._methods = methods - self._control = control - self._pool = pool - - def service(self, name, response_consumer, context): - method = self._methods.get(name, None) - if method is None: - raise exceptions.NoSuchMethodError(name) - elif self._pool is None: - return method(response_consumer, context, self._control) - else: - request_consumer = method(response_consumer, context, self._control) - return stream_util.ThreadSwitchingConsumer(request_consumer, self._pool) - - -class _Assembly( - collections.namedtuple( - '_Assembly', - ['methods', 'inlines', 'events', 'adaptations', 'messages'])): - """An intermediate structure created when creating a TestServiceDigest.""" - - -def _assemble( - scenarios, names, inline_method_constructor, event_method_constructor, - adapter, control, pool): - """Creates an _Assembly from the given scenarios.""" - methods = [] - inlines = {} - events = {} - adaptations = {} - messages = {} - for name, scenario in six.iteritems(scenarios): - if name in names: - raise ValueError('Repeated name "%s"!' % name) - - test_method = scenario[0] - inline_method = inline_method_constructor(test_method, control) - event_method = event_method_constructor(test_method, control, pool) - adaptation = adapter(test_method) - - methods.append(test_method) - inlines[name] = inline_method - events[name] = event_method - adaptations[name] = adaptation - messages[name] = scenario[1] - - return _Assembly(methods, inlines, events, adaptations, messages) - - -def digest(service, control, pool): - """Creates a TestServiceDigest from a TestService. - - Args: - service: A testing_service.TestService. - control: A testing_control.Control. - pool: If RPC methods should be serviced in a separate thread, a thread pool. - None if RPC methods should be serviced in the thread belonging to the - run-time that calls for their service. - - Returns: - A TestServiceDigest synthesized from the given service.TestService. - """ - names = set() - - unary_unary = _assemble( - service.unary_unary_scenarios(), names, _InlineUnaryUnaryMethod, - _EventUnaryUnaryMethod, _UnaryUnaryAdaptation, control, pool) - names.update(set(unary_unary.inlines)) - - unary_stream = _assemble( - service.unary_stream_scenarios(), names, _InlineUnaryStreamMethod, - _EventUnaryStreamMethod, _UnaryStreamAdaptation, control, pool) - names.update(set(unary_stream.inlines)) - - stream_unary = _assemble( - service.stream_unary_scenarios(), names, _InlineStreamUnaryMethod, - _EventStreamUnaryMethod, _StreamUnaryAdaptation, control, pool) - names.update(set(stream_unary.inlines)) - - stream_stream = _assemble( - service.stream_stream_scenarios(), names, _InlineStreamStreamMethod, - _EventStreamStreamMethod, _IDENTITY, control, pool) - names.update(set(stream_stream.inlines)) - - methods = list(unary_unary.methods) - methods.extend(unary_stream.methods) - methods.extend(stream_unary.methods) - methods.extend(stream_stream.methods) - adaptations = dict(unary_unary.adaptations) - adaptations.update(unary_stream.adaptations) - adaptations.update(stream_unary.adaptations) - adaptations.update(stream_stream.adaptations) - inlines = dict(unary_unary.inlines) - inlines.update(unary_stream.inlines) - inlines.update(stream_unary.inlines) - inlines.update(stream_stream.inlines) - events = dict(unary_unary.events) - events.update(unary_stream.events) - events.update(stream_unary.events) - events.update(stream_stream.events) - - return TestServiceDigest( - service.name(), - methods, - inlines, - events, - _MultiMethodImplementation(adaptations, control, pool), - unary_unary.messages, - unary_stream.messages, - stream_unary.messages, - stream_stream.messages) diff --git a/src/python/grpcio/tests/unit/framework/face/testing/event_invocation_synchronous_event_service_test_case.py b/src/python/grpcio/tests/unit/framework/face/testing/event_invocation_synchronous_event_service_test_case.py deleted file mode 100644 index 98b61e492c9..00000000000 --- a/src/python/grpcio/tests/unit/framework/face/testing/event_invocation_synchronous_event_service_test_case.py +++ /dev/null @@ -1,378 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""A test to verify an implementation of the Face layer of RPC Framework.""" - -import abc -import unittest - -import six - -from grpc.framework.face import interfaces -from tests.unit.framework.common import test_constants -from tests.unit.framework.face.testing import callback as testing_callback -from tests.unit.framework.face.testing import control -from tests.unit.framework.face.testing import coverage -from tests.unit.framework.face.testing import digest -from tests.unit.framework.face.testing import stock_service -from tests.unit.framework.face.testing import test_case - - -class EventInvocationSynchronousEventServiceTestCase( - six.with_metaclass(abc.ABCMeta, - test_case.FaceTestCase, coverage.FullCoverage)): - """A test of the Face layer of RPC Framework. - - Concrete subclasses must also extend unittest.TestCase. - """ - - def setUp(self): - """See unittest.TestCase.setUp for full specification. - - Overriding implementations must call this implementation. - """ - self.control = control.PauseFailControl() - self.digest = digest.digest( - stock_service.STOCK_TEST_SERVICE, self.control, None) - - self.stub, self.memo = self.set_up_implementation( - self.digest.name, self.digest.methods, - self.digest.event_method_implementations, None) - - def tearDown(self): - """See unittest.TestCase.tearDown for full specification. - - Overriding implementations must call this implementation. - """ - self.tear_down_implementation(self.memo) - - def testSuccessfulUnaryRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_unary_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - callback = testing_callback.Callback() - - self.stub.event_value_in_value_out( - name, request, callback.complete, callback.abort, - test_constants.SHORT_TIMEOUT) - callback.block_until_terminated() - response = callback.response() - - test_messages.verify(request, response, self) - - def testSuccessfulUnaryRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_stream_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - callback = testing_callback.Callback() - - self.stub.event_value_in_stream_out( - name, request, callback, callback.abort, - test_constants.SHORT_TIMEOUT) - callback.block_until_terminated() - responses = callback.responses() - - test_messages.verify(request, responses, self) - - def testSuccessfulStreamRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_unary_messages_sequences)): - for test_messages in test_messages_sequence: - requests = test_messages.requests() - callback = testing_callback.Callback() - - unused_call, request_consumer = self.stub.event_stream_in_value_out( - name, callback.complete, callback.abort, - test_constants.SHORT_TIMEOUT) - for request in requests: - request_consumer.consume(request) - request_consumer.terminate() - callback.block_until_terminated() - response = callback.response() - - test_messages.verify(requests, response, self) - - def testSuccessfulStreamRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_stream_messages_sequences)): - for test_messages in test_messages_sequence: - requests = test_messages.requests() - callback = testing_callback.Callback() - - unused_call, request_consumer = self.stub.event_stream_in_stream_out( - name, callback, callback.abort, test_constants.SHORT_TIMEOUT) - for request in requests: - request_consumer.consume(request) - request_consumer.terminate() - callback.block_until_terminated() - responses = callback.responses() - - test_messages.verify(requests, responses, self) - - def testSequentialInvocations(self): - # pylint: disable=cell-var-from-loop - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_unary_messages_sequences)): - for test_messages in test_messages_sequence: - first_request = test_messages.request() - second_request = test_messages.request() - first_callback = testing_callback.Callback() - second_callback = testing_callback.Callback() - - def make_second_invocation(first_response): - first_callback.complete(first_response) - self.stub.event_value_in_value_out( - name, second_request, second_callback.complete, - second_callback.abort, test_constants.SHORT_TIMEOUT) - - self.stub.event_value_in_value_out( - name, first_request, make_second_invocation, first_callback.abort, - test_constants.SHORT_TIMEOUT) - second_callback.block_until_terminated() - - first_response = first_callback.response() - second_response = second_callback.response() - test_messages.verify(first_request, first_response, self) - test_messages.verify(second_request, second_response, self) - - def testExpiredUnaryRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_unary_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - callback = testing_callback.Callback() - - with self.control.pause(): - self.stub.event_value_in_value_out( - name, request, callback.complete, callback.abort, - test_constants.SHORT_TIMEOUT) - callback.block_until_terminated() - - self.assertEqual(interfaces.Abortion.EXPIRED, callback.abortion()) - - def testExpiredUnaryRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_stream_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - callback = testing_callback.Callback() - - with self.control.pause(): - self.stub.event_value_in_stream_out( - name, request, callback, callback.abort, - test_constants.SHORT_TIMEOUT) - callback.block_until_terminated() - - self.assertEqual(interfaces.Abortion.EXPIRED, callback.abortion()) - - def testExpiredStreamRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_unary_messages_sequences)): - for unused_test_messages in test_messages_sequence: - callback = testing_callback.Callback() - - self.stub.event_stream_in_value_out( - name, callback.complete, callback.abort, - test_constants.SHORT_TIMEOUT) - callback.block_until_terminated() - - self.assertEqual(interfaces.Abortion.EXPIRED, callback.abortion()) - - def testExpiredStreamRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_stream_messages_sequences)): - for test_messages in test_messages_sequence: - requests = test_messages.requests() - callback = testing_callback.Callback() - - unused_call, request_consumer = self.stub.event_stream_in_stream_out( - name, callback, callback.abort, test_constants.SHORT_TIMEOUT) - for request in requests: - request_consumer.consume(request) - callback.block_until_terminated() - - self.assertEqual(interfaces.Abortion.EXPIRED, callback.abortion()) - - def testFailedUnaryRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_unary_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - callback = testing_callback.Callback() - - with self.control.fail(): - self.stub.event_value_in_value_out( - name, request, callback.complete, callback.abort, - test_constants.SHORT_TIMEOUT) - callback.block_until_terminated() - - self.assertEqual(interfaces.Abortion.SERVICER_FAILURE, - callback.abortion()) - - def testFailedUnaryRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_stream_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - callback = testing_callback.Callback() - - with self.control.fail(): - self.stub.event_value_in_stream_out( - name, request, callback, callback.abort, - test_constants.SHORT_TIMEOUT) - callback.block_until_terminated() - - self.assertEqual(interfaces.Abortion.SERVICER_FAILURE, - callback.abortion()) - - def testFailedStreamRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_unary_messages_sequences)): - for test_messages in test_messages_sequence: - requests = test_messages.requests() - callback = testing_callback.Callback() - - with self.control.fail(): - unused_call, request_consumer = self.stub.event_stream_in_value_out( - name, callback.complete, callback.abort, - test_constants.SHORT_TIMEOUT) - for request in requests: - request_consumer.consume(request) - request_consumer.terminate() - callback.block_until_terminated() - - self.assertEqual(interfaces.Abortion.SERVICER_FAILURE, - callback.abortion()) - - def testFailedStreamRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_stream_messages_sequences)): - for test_messages in test_messages_sequence: - requests = test_messages.requests() - callback = testing_callback.Callback() - - with self.control.fail(): - unused_call, request_consumer = self.stub.event_stream_in_stream_out( - name, callback, callback.abort, test_constants.SHORT_TIMEOUT) - for request in requests: - request_consumer.consume(request) - request_consumer.terminate() - callback.block_until_terminated() - - self.assertEqual(interfaces.Abortion.SERVICER_FAILURE, callback.abortion()) - - def testParallelInvocations(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_unary_messages_sequences)): - for test_messages in test_messages_sequence: - first_request = test_messages.request() - first_callback = testing_callback.Callback() - second_request = test_messages.request() - second_callback = testing_callback.Callback() - - self.stub.event_value_in_value_out( - name, first_request, first_callback.complete, first_callback.abort, - test_constants.SHORT_TIMEOUT) - self.stub.event_value_in_value_out( - name, second_request, second_callback.complete, - second_callback.abort, test_constants.SHORT_TIMEOUT) - first_callback.block_until_terminated() - second_callback.block_until_terminated() - - first_response = first_callback.response() - second_response = second_callback.response() - test_messages.verify(first_request, first_response, self) - test_messages.verify(second_request, second_response, self) - - @unittest.skip('TODO(nathaniel): implement.') - def testWaitingForSomeButNotAllParallelInvocations(self): - raise NotImplementedError() - - def testCancelledUnaryRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_unary_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - callback = testing_callback.Callback() - - with self.control.pause(): - call = self.stub.event_value_in_value_out( - name, request, callback.complete, callback.abort, - test_constants.SHORT_TIMEOUT) - call.cancel() - callback.block_until_terminated() - - self.assertEqual(interfaces.Abortion.CANCELLED, callback.abortion()) - - def testCancelledUnaryRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_stream_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - callback = testing_callback.Callback() - - call = self.stub.event_value_in_stream_out( - name, request, callback, callback.abort, - test_constants.SHORT_TIMEOUT) - call.cancel() - callback.block_until_terminated() - - self.assertEqual(interfaces.Abortion.CANCELLED, callback.abortion()) - - def testCancelledStreamRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_unary_messages_sequences)): - for test_messages in test_messages_sequence: - requests = test_messages.requests() - callback = testing_callback.Callback() - - call, request_consumer = self.stub.event_stream_in_value_out( - name, callback.complete, callback.abort, - test_constants.SHORT_TIMEOUT) - for request in requests: - request_consumer.consume(request) - call.cancel() - callback.block_until_terminated() - - self.assertEqual(interfaces.Abortion.CANCELLED, callback.abortion()) - - def testCancelledStreamRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_stream_messages_sequences)): - for unused_test_messages in test_messages_sequence: - callback = testing_callback.Callback() - - call, unused_request_consumer = self.stub.event_stream_in_stream_out( - name, callback, callback.abort, test_constants.SHORT_TIMEOUT) - call.cancel() - callback.block_until_terminated() - - self.assertEqual(interfaces.Abortion.CANCELLED, callback.abortion()) diff --git a/src/python/grpcio/tests/unit/framework/face/testing/future_invocation_asynchronous_event_service_test_case.py b/src/python/grpcio/tests/unit/framework/face/testing/future_invocation_asynchronous_event_service_test_case.py deleted file mode 100644 index cae791af97e..00000000000 --- a/src/python/grpcio/tests/unit/framework/face/testing/future_invocation_asynchronous_event_service_test_case.py +++ /dev/null @@ -1,384 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""A test to verify an implementation of the Face layer of RPC Framework.""" - -import abc -import contextlib -import threading -import unittest - -import six - -from grpc.framework.face import exceptions -from grpc.framework.foundation import future -from grpc.framework.foundation import logging_pool -from tests.unit.framework.common import test_constants -from tests.unit.framework.face.testing import control -from tests.unit.framework.face.testing import coverage -from tests.unit.framework.face.testing import digest -from tests.unit.framework.face.testing import stock_service -from tests.unit.framework.face.testing import test_case - -_MAXIMUM_POOL_SIZE = 10 - - -class _PauseableIterator(object): - - def __init__(self, upstream): - self._upstream = upstream - self._condition = threading.Condition() - self._paused = False - - @contextlib.contextmanager - def pause(self): - with self._condition: - self._paused = True - yield - with self._condition: - self._paused = False - self._condition.notify_all() - - def __iter__(self): - return self - - def __next__(self): - return self.next() - - def next(self): - with self._condition: - while self._paused: - self._condition.wait() - return next(self._upstream) - - -class FutureInvocationAsynchronousEventServiceTestCase( - six.with_metaclass(abc.ABCMeta, - test_case.FaceTestCase, coverage.FullCoverage)): - """A test of the Face layer of RPC Framework. - - Concrete subclasses must also extend unittest.TestCase. - """ - - def setUp(self): - """See unittest.TestCase.setUp for full specification. - - Overriding implementations must call this implementation. - """ - self.control = control.PauseFailControl() - self.digest_pool = logging_pool.pool(_MAXIMUM_POOL_SIZE) - self.digest = digest.digest( - stock_service.STOCK_TEST_SERVICE, self.control, self.digest_pool) - - self.stub, self.memo = self.set_up_implementation( - self.digest.name, self.digest.methods, - self.digest.event_method_implementations, None) - - def tearDown(self): - """See unittest.TestCase.tearDown for full specification. - - Overriding implementations must call this implementation. - """ - self.tear_down_implementation(self.memo) - self.digest_pool.shutdown(wait=True) - - def testSuccessfulUnaryRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_unary_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - - response_future = self.stub.future_value_in_value_out( - name, request, test_constants.SHORT_TIMEOUT) - response = response_future.result() - - test_messages.verify(request, response, self) - - def testSuccessfulUnaryRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_stream_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - - response_iterator = self.stub.inline_value_in_stream_out( - name, request, test_constants.SHORT_TIMEOUT) - responses = list(response_iterator) - - test_messages.verify(request, responses, self) - - def testSuccessfulStreamRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_unary_messages_sequences)): - for test_messages in test_messages_sequence: - requests = test_messages.requests() - request_iterator = _PauseableIterator(iter(requests)) - - # Use of a paused iterator of requests allows us to test that control is - # returned to calling code before the iterator yields any requests. - with request_iterator.pause(): - response_future = self.stub.future_stream_in_value_out( - name, request_iterator, test_constants.SHORT_TIMEOUT) - response = response_future.result() - - test_messages.verify(requests, response, self) - - def testSuccessfulStreamRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_stream_messages_sequences)): - for test_messages in test_messages_sequence: - requests = test_messages.requests() - request_iterator = _PauseableIterator(iter(requests)) - - # Use of a paused iterator of requests allows us to test that control is - # returned to calling code before the iterator yields any requests. - with request_iterator.pause(): - response_iterator = self.stub.inline_stream_in_stream_out( - name, request_iterator, test_constants.SHORT_TIMEOUT) - responses = list(response_iterator) - - test_messages.verify(requests, responses, self) - - def testSequentialInvocations(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_unary_messages_sequences)): - for test_messages in test_messages_sequence: - first_request = test_messages.request() - second_request = test_messages.request() - - first_response_future = self.stub.future_value_in_value_out( - name, first_request, test_constants.SHORT_TIMEOUT) - first_response = first_response_future.result() - - test_messages.verify(first_request, first_response, self) - - second_response_future = self.stub.future_value_in_value_out( - name, second_request, test_constants.SHORT_TIMEOUT) - second_response = second_response_future.result() - - test_messages.verify(second_request, second_response, self) - - def testExpiredUnaryRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_unary_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - - with self.control.pause(): - multi_callable = self.stub.unary_unary_multi_callable(name) - response_future = multi_callable.future(request, - test_constants.SHORT_TIMEOUT) - self.assertIsInstance( - response_future.exception(), exceptions.ExpirationError) - with self.assertRaises(exceptions.ExpirationError): - response_future.result() - - def testExpiredUnaryRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_stream_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - - with self.control.pause(): - response_iterator = self.stub.inline_value_in_stream_out( - name, request, test_constants.SHORT_TIMEOUT) - with self.assertRaises(exceptions.ExpirationError): - list(response_iterator) - - def testExpiredStreamRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_unary_messages_sequences)): - for test_messages in test_messages_sequence: - requests = test_messages.requests() - - with self.control.pause(): - multi_callable = self.stub.stream_unary_multi_callable(name) - response_future = multi_callable.future(iter(requests), - test_constants.SHORT_TIMEOUT) - self.assertIsInstance( - response_future.exception(), exceptions.ExpirationError) - with self.assertRaises(exceptions.ExpirationError): - response_future.result() - - def testExpiredStreamRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_stream_messages_sequences)): - for test_messages in test_messages_sequence: - requests = test_messages.requests() - - with self.control.pause(): - response_iterator = self.stub.inline_stream_in_stream_out( - name, iter(requests), test_constants.SHORT_TIMEOUT) - with self.assertRaises(exceptions.ExpirationError): - list(response_iterator) - - def testFailedUnaryRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_unary_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - - with self.control.fail(): - response_future = self.stub.future_value_in_value_out( - name, request, test_constants.SHORT_TIMEOUT) - - # Because the servicer fails outside of the thread from which the - # servicer-side runtime called into it its failure is - # indistinguishable from simply not having called its - # response_callback before the expiration of the RPC. - self.assertIsInstance( - response_future.exception(), exceptions.ExpirationError) - with self.assertRaises(exceptions.ExpirationError): - response_future.result() - - def testFailedUnaryRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_stream_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - - # Because the servicer fails outside of the thread from which the - # servicer-side runtime called into it its failure is indistinguishable - # from simply not having called its response_consumer before the - # expiration of the RPC. - with self.control.fail(), self.assertRaises(exceptions.ExpirationError): - response_iterator = self.stub.inline_value_in_stream_out( - name, request, test_constants.SHORT_TIMEOUT) - list(response_iterator) - - def testFailedStreamRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_unary_messages_sequences)): - for test_messages in test_messages_sequence: - requests = test_messages.requests() - - with self.control.fail(): - response_future = self.stub.future_stream_in_value_out( - name, iter(requests), test_constants.SHORT_TIMEOUT) - - # Because the servicer fails outside of the thread from which the - # servicer-side runtime called into it its failure is - # indistinguishable from simply not having called its - # response_callback before the expiration of the RPC. - self.assertIsInstance( - response_future.exception(), exceptions.ExpirationError) - with self.assertRaises(exceptions.ExpirationError): - response_future.result() - - def testFailedStreamRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_stream_messages_sequences)): - for test_messages in test_messages_sequence: - requests = test_messages.requests() - - # Because the servicer fails outside of the thread from which the - # servicer-side runtime called into it its failure is indistinguishable - # from simply not having called its response_consumer before the - # expiration of the RPC. - with self.control.fail(), self.assertRaises(exceptions.ExpirationError): - response_iterator = self.stub.inline_stream_in_stream_out( - name, iter(requests), test_constants.SHORT_TIMEOUT) - list(response_iterator) - - def testParallelInvocations(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_unary_messages_sequences)): - for test_messages in test_messages_sequence: - first_request = test_messages.request() - second_request = test_messages.request() - - # TODO(bug 2039): use LONG_TIMEOUT instead - first_response_future = self.stub.future_value_in_value_out( - name, first_request, test_constants.SHORT_TIMEOUT) - second_response_future = self.stub.future_value_in_value_out( - name, second_request, test_constants.SHORT_TIMEOUT) - first_response = first_response_future.result() - second_response = second_response_future.result() - - test_messages.verify(first_request, first_response, self) - test_messages.verify(second_request, second_response, self) - - @unittest.skip('TODO(nathaniel): implement.') - def testWaitingForSomeButNotAllParallelInvocations(self): - raise NotImplementedError() - - def testCancelledUnaryRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_unary_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - - with self.control.pause(): - response_future = self.stub.future_value_in_value_out( - name, request, test_constants.SHORT_TIMEOUT) - cancel_method_return_value = response_future.cancel() - - self.assertFalse(cancel_method_return_value) - self.assertTrue(response_future.cancelled()) - - def testCancelledUnaryRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.unary_stream_messages_sequences)): - for test_messages in test_messages_sequence: - request = test_messages.request() - - with self.control.pause(): - response_iterator = self.stub.inline_value_in_stream_out( - name, request, test_constants.SHORT_TIMEOUT) - response_iterator.cancel() - - with self.assertRaises(future.CancelledError): - next(response_iterator) - - def testCancelledStreamRequestUnaryResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_unary_messages_sequences)): - for test_messages in test_messages_sequence: - requests = test_messages.requests() - - with self.control.pause(): - response_future = self.stub.future_stream_in_value_out( - name, iter(requests), test_constants.SHORT_TIMEOUT) - cancel_method_return_value = response_future.cancel() - - self.assertFalse(cancel_method_return_value) - self.assertTrue(response_future.cancelled()) - - def testCancelledStreamRequestStreamResponse(self): - for name, test_messages_sequence in ( - six.iteritems(self.digest.stream_stream_messages_sequences)): - for test_messages in test_messages_sequence: - requests = test_messages.requests() - - with self.control.pause(): - response_iterator = self.stub.inline_stream_in_stream_out( - name, iter(requests), test_constants.SHORT_TIMEOUT) - response_iterator.cancel() - - with self.assertRaises(future.CancelledError): - next(response_iterator) diff --git a/src/python/grpcio/tests/unit/framework/face/testing/interfaces.py b/src/python/grpcio/tests/unit/framework/face/testing/interfaces.py deleted file mode 100644 index 8a25f89c883..00000000000 --- a/src/python/grpcio/tests/unit/framework/face/testing/interfaces.py +++ /dev/null @@ -1,118 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Interfaces implemented by data sets used in Face-layer tests.""" - -import abc - -import six - -# cardinality is referenced from specification in this module. -from grpc.framework.common import cardinality # pylint: disable=unused-import - - -class Method(six.with_metaclass(abc.ABCMeta)): - """An RPC method to be used in tests of RPC implementations.""" - - @abc.abstractmethod - def name(self): - """Identify the name of the method. - - Returns: - The name of the method. - """ - raise NotImplementedError() - - @abc.abstractmethod - def cardinality(self): - """Identify the cardinality of the method. - - Returns: - A cardinality.Cardinality value describing the streaming semantics of the - method. - """ - raise NotImplementedError() - - @abc.abstractmethod - def request_class(self): - """Identify the class used for the method's request objects. - - Returns: - The class object of the class to which the method's request objects - belong. - """ - raise NotImplementedError() - - @abc.abstractmethod - def response_class(self): - """Identify the class used for the method's response objects. - - Returns: - The class object of the class to which the method's response objects - belong. - """ - raise NotImplementedError() - - @abc.abstractmethod - def serialize_request(self, request): - """Serialize the given request object. - - Args: - request: A request object appropriate for this method. - """ - raise NotImplementedError() - - @abc.abstractmethod - def deserialize_request(self, serialized_request): - """Synthesize a request object from a given bytestring. - - Args: - serialized_request: A bytestring deserializable into a request object - appropriate for this method. - """ - raise NotImplementedError() - - @abc.abstractmethod - def serialize_response(self, response): - """Serialize the given response object. - - Args: - response: A response object appropriate for this method. - """ - raise NotImplementedError() - - @abc.abstractmethod - def deserialize_response(self, serialized_response): - """Synthesize a response object from a given bytestring. - - Args: - serialized_response: A bytestring deserializable into a response object - appropriate for this method. - """ - raise NotImplementedError() diff --git a/src/python/grpcio/tests/unit/framework/face/testing/service.py b/src/python/grpcio/tests/unit/framework/face/testing/service.py deleted file mode 100644 index 3e4228cc070..00000000000 --- a/src/python/grpcio/tests/unit/framework/face/testing/service.py +++ /dev/null @@ -1,321 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Private interfaces implemented by data sets used in Face-layer tests.""" - -import abc - -import six - -# interfaces is referenced from specification in this module. -from grpc.framework.face import interfaces as face_interfaces # pylint: disable=unused-import -from tests.unit.framework.face.testing import interfaces - - -class UnaryUnaryTestMethodImplementation(six.with_metaclass(abc.ABCMeta, interfaces.Method)): - """A controllable implementation of a unary-unary RPC method.""" - - @abc.abstractmethod - def service(self, request, response_callback, context, control): - """Services an RPC that accepts one message and produces one message. - - Args: - request: The single request message for the RPC. - response_callback: A callback to be called to accept the response message - of the RPC. - context: An face_interfaces.RpcContext object. - control: A test_control.Control to control execution of this method. - - Raises: - abandonment.Abandoned: May or may not be raised when the RPC has been - aborted. - """ - raise NotImplementedError() - - -class UnaryUnaryTestMessages(six.with_metaclass(abc.ABCMeta)): - """A type for unary-request-unary-response message pairings.""" - - @abc.abstractmethod - def request(self): - """Affords a request message. - - Implementations of this method should return a different message with each - call so that multiple test executions of the test method may be made with - different inputs. - - Returns: - A request message. - """ - raise NotImplementedError() - - @abc.abstractmethod - def verify(self, request, response, test_case): - """Verifies that the computed response matches the given request. - - Args: - request: A request message. - response: A response message. - test_case: A unittest.TestCase object affording useful assertion methods. - - Raises: - AssertionError: If the request and response do not match, indicating that - there was some problem executing the RPC under test. - """ - raise NotImplementedError() - - -class UnaryStreamTestMethodImplementation(six.with_metaclass(abc.ABCMeta, interfaces.Method)): - """A controllable implementation of a unary-stream RPC method.""" - - @abc.abstractmethod - def service(self, request, response_consumer, context, control): - """Services an RPC that takes one message and produces a stream of messages. - - Args: - request: The single request message for the RPC. - response_consumer: A stream.Consumer to be called to accept the response - messages of the RPC. - context: A face_interfaces.RpcContext object. - control: A test_control.Control to control execution of this method. - - Raises: - abandonment.Abandoned: May or may not be raised when the RPC has been - aborted. - """ - raise NotImplementedError() - - -class UnaryStreamTestMessages(six.with_metaclass(abc.ABCMeta)): - """A type for unary-request-stream-response message pairings.""" - - @abc.abstractmethod - def request(self): - """Affords a request message. - - Implementations of this method should return a different message with each - call so that multiple test executions of the test method may be made with - different inputs. - - Returns: - A request message. - """ - raise NotImplementedError() - - @abc.abstractmethod - def verify(self, request, responses, test_case): - """Verifies that the computed responses match the given request. - - Args: - request: A request message. - responses: A sequence of response messages. - test_case: A unittest.TestCase object affording useful assertion methods. - - Raises: - AssertionError: If the request and responses do not match, indicating that - there was some problem executing the RPC under test. - """ - raise NotImplementedError() - - -class StreamUnaryTestMethodImplementation(six.with_metaclass(abc.ABCMeta, interfaces.Method)): - """A controllable implementation of a stream-unary RPC method.""" - - @abc.abstractmethod - def service(self, response_callback, context, control): - """Services an RPC that takes a stream of messages and produces one message. - - Args: - response_callback: A callback to be called to accept the response message - of the RPC. - context: A face_interfaces.RpcContext object. - control: A test_control.Control to control execution of this method. - - Returns: - A stream.Consumer with which to accept the request messages of the RPC. - The consumer returned from this method may or may not be invoked to - completion: in the case of RPC abortion, RPC Framework will simply stop - passing messages to this object. Implementations must not assume that - this object will be called to completion of the request stream or even - called at all. - - Raises: - abandonment.Abandoned: May or may not be raised when the RPC has been - aborted. - """ - raise NotImplementedError() - - -class StreamUnaryTestMessages(six.with_metaclass(abc.ABCMeta)): - """A type for stream-request-unary-response message pairings.""" - - @abc.abstractmethod - def requests(self): - """Affords a sequence of request messages. - - Implementations of this method should return a different sequences with each - call so that multiple test executions of the test method may be made with - different inputs. - - Returns: - A sequence of request messages. - """ - raise NotImplementedError() - - @abc.abstractmethod - def verify(self, requests, response, test_case): - """Verifies that the computed response matches the given requests. - - Args: - requests: A sequence of request messages. - response: A response message. - test_case: A unittest.TestCase object affording useful assertion methods. - - Raises: - AssertionError: If the requests and response do not match, indicating that - there was some problem executing the RPC under test. - """ - raise NotImplementedError() - - -class StreamStreamTestMethodImplementation(six.with_metaclass(abc.ABCMeta, interfaces.Method)): - """A controllable implementation of a stream-stream RPC method.""" - - @abc.abstractmethod - def service(self, response_consumer, context, control): - """Services an RPC that accepts and produces streams of messages. - - Args: - response_consumer: A stream.Consumer to be called to accept the response - messages of the RPC. - context: A face_interfaces.RpcContext object. - control: A test_control.Control to control execution of this method. - - Returns: - A stream.Consumer with which to accept the request messages of the RPC. - The consumer returned from this method may or may not be invoked to - completion: in the case of RPC abortion, RPC Framework will simply stop - passing messages to this object. Implementations must not assume that - this object will be called to completion of the request stream or even - called at all. - - Raises: - abandonment.Abandoned: May or may not be raised when the RPC has been - aborted. - """ - raise NotImplementedError() - - -class StreamStreamTestMessages(six.with_metaclass(abc.ABCMeta)): - """A type for stream-request-stream-response message pairings.""" - - @abc.abstractmethod - def requests(self): - """Affords a sequence of request messages. - - Implementations of this method should return a different sequences with each - call so that multiple test executions of the test method may be made with - different inputs. - - Returns: - A sequence of request messages. - """ - raise NotImplementedError() - - @abc.abstractmethod - def verify(self, requests, responses, test_case): - """Verifies that the computed response matches the given requests. - - Args: - requests: A sequence of request messages. - responses: A sequence of response messages. - test_case: A unittest.TestCase object affording useful assertion methods. - - Raises: - AssertionError: If the requests and responses do not match, indicating - that there was some problem executing the RPC under test. - """ - raise NotImplementedError() - - -class TestService(six.with_metaclass(abc.ABCMeta)): - """A specification of implemented RPC methods to use in tests.""" - - @abc.abstractmethod - def name(self): - """Identifies the RPC service name used during the test. - - Returns: - The RPC service name to be used for the test. - """ - raise NotImplementedError() - - @abc.abstractmethod - def unary_unary_scenarios(self): - """Affords unary-request-unary-response test methods and their messages. - - Returns: - A dict from method name to pair. The first element of the pair - is a UnaryUnaryTestMethodImplementation object and the second element - is a sequence of UnaryUnaryTestMethodMessages objects. - """ - raise NotImplementedError() - - @abc.abstractmethod - def unary_stream_scenarios(self): - """Affords unary-request-stream-response test methods and their messages. - - Returns: - A dict from method name to pair. The first element of the pair is a - UnaryStreamTestMethodImplementation object and the second element is a - sequence of UnaryStreamTestMethodMessages objects. - """ - raise NotImplementedError() - - @abc.abstractmethod - def stream_unary_scenarios(self): - """Affords stream-request-unary-response test methods and their messages. - - Returns: - A dict from method name to pair. The first element of the pair is a - StreamUnaryTestMethodImplementation object and the second element is a - sequence of StreamUnaryTestMethodMessages objects. - """ - raise NotImplementedError() - - @abc.abstractmethod - def stream_stream_scenarios(self): - """Affords stream-request-stream-response test methods and their messages. - - Returns: - A dict from method name to pair. The first element of the pair is a - StreamStreamTestMethodImplementation object and the second element is a - sequence of StreamStreamTestMethodMessages objects. - """ - raise NotImplementedError() diff --git a/src/python/grpcio/tests/unit/framework/face/testing/stock_service.py b/src/python/grpcio/tests/unit/framework/face/testing/stock_service.py deleted file mode 100644 index 117c723f791..00000000000 --- a/src/python/grpcio/tests/unit/framework/face/testing/stock_service.py +++ /dev/null @@ -1,374 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Examples of Python implementations of the stock.proto Stock service.""" - -from grpc.framework.common import cardinality -from grpc.framework.foundation import abandonment -from grpc.framework.foundation import stream -from grpc.framework.foundation import stream_util -from tests.unit.framework.face.testing import service -from tests.unit._junkdrawer import stock_pb2 - -SYMBOL_FORMAT = 'test symbol:%03d' -STREAM_LENGTH = 400 - -# A test-appropriate security-pricing function. :-P -_price = lambda symbol_name: float(hash(symbol_name) % 4096) - - -def _get_last_trade_price(stock_request, stock_reply_callback, control, active): - """A unary-request, unary-response test method.""" - control.control() - if active(): - stock_reply_callback( - stock_pb2.StockReply( - symbol=stock_request.symbol, price=_price(stock_request.symbol))) - else: - raise abandonment.Abandoned() - - -def _get_last_trade_price_multiple(stock_reply_consumer, control, active): - """A stream-request, stream-response test method.""" - def stock_reply_for_stock_request(stock_request): - control.control() - if active(): - return stock_pb2.StockReply( - symbol=stock_request.symbol, price=_price(stock_request.symbol)) - else: - raise abandonment.Abandoned() - return stream_util.TransformingConsumer( - stock_reply_for_stock_request, stock_reply_consumer) - - -def _watch_future_trades(stock_request, stock_reply_consumer, control, active): - """A unary-request, stream-response test method.""" - base_price = _price(stock_request.symbol) - for index in range(stock_request.num_trades_to_watch): - control.control() - if active(): - stock_reply_consumer.consume( - stock_pb2.StockReply( - symbol=stock_request.symbol, price=base_price + index)) - else: - raise abandonment.Abandoned() - stock_reply_consumer.terminate() - - -def _get_highest_trade_price(stock_reply_callback, control, active): - """A stream-request, unary-response test method.""" - - class StockRequestConsumer(stream.Consumer): - """Keeps an ongoing record of the most valuable symbol yet consumed.""" - - def __init__(self): - self._symbol = None - self._price = None - - def consume(self, stock_request): - control.control() - if active(): - if self._price is None: - self._symbol = stock_request.symbol - self._price = _price(stock_request.symbol) - else: - candidate_price = _price(stock_request.symbol) - if self._price < candidate_price: - self._symbol = stock_request.symbol - self._price = candidate_price - - def terminate(self): - control.control() - if active(): - if self._symbol is None: - raise ValueError() - else: - stock_reply_callback( - stock_pb2.StockReply(symbol=self._symbol, price=self._price)) - self._symbol = None - self._price = None - - def consume_and_terminate(self, stock_request): - control.control() - if active(): - if self._price is None: - stock_reply_callback( - stock_pb2.StockReply( - symbol=stock_request.symbol, - price=_price(stock_request.symbol))) - else: - candidate_price = _price(stock_request.symbol) - if self._price < candidate_price: - stock_reply_callback( - stock_pb2.StockReply( - symbol=stock_request.symbol, price=candidate_price)) - else: - stock_reply_callback( - stock_pb2.StockReply( - symbol=self._symbol, price=self._price)) - - self._symbol = None - self._price = None - - return StockRequestConsumer() - - -class GetLastTradePrice(service.UnaryUnaryTestMethodImplementation): - """GetLastTradePrice for use in tests.""" - - def name(self): - return 'GetLastTradePrice' - - def cardinality(self): - return cardinality.Cardinality.UNARY_UNARY - - def request_class(self): - return stock_pb2.StockRequest - - def response_class(self): - return stock_pb2.StockReply - - def serialize_request(self, request): - return request.SerializeToString() - - def deserialize_request(self, serialized_request): - return stock_pb2.StockRequest.FromString(serialized_request) - - def serialize_response(self, response): - return response.SerializeToString() - - def deserialize_response(self, serialized_response): - return stock_pb2.StockReply.FromString(serialized_response) - - def service(self, request, response_callback, context, control): - _get_last_trade_price( - request, response_callback, control, context.is_active) - - -class GetLastTradePriceMessages(service.UnaryUnaryTestMessages): - - def __init__(self): - self._index = 0 - - def request(self): - symbol = SYMBOL_FORMAT % self._index - self._index += 1 - return stock_pb2.StockRequest(symbol=symbol) - - def verify(self, request, response, test_case): - test_case.assertEqual(request.symbol, response.symbol) - test_case.assertEqual(_price(request.symbol), response.price) - - -class GetLastTradePriceMultiple(service.StreamStreamTestMethodImplementation): - """GetLastTradePriceMultiple for use in tests.""" - - def name(self): - return 'GetLastTradePriceMultiple' - - def cardinality(self): - return cardinality.Cardinality.STREAM_STREAM - - def request_class(self): - return stock_pb2.StockRequest - - def response_class(self): - return stock_pb2.StockReply - - def serialize_request(self, request): - return request.SerializeToString() - - def deserialize_request(self, serialized_request): - return stock_pb2.StockRequest.FromString(serialized_request) - - def serialize_response(self, response): - return response.SerializeToString() - - def deserialize_response(self, serialized_response): - return stock_pb2.StockReply.FromString(serialized_response) - - def service(self, response_consumer, context, control): - return _get_last_trade_price_multiple( - response_consumer, control, context.is_active) - - -class GetLastTradePriceMultipleMessages(service.StreamStreamTestMessages): - """Pairs of message streams for use with GetLastTradePriceMultiple.""" - - def __init__(self): - self._index = 0 - - def requests(self): - base_index = self._index - self._index += 1 - return [ - stock_pb2.StockRequest(symbol=SYMBOL_FORMAT % (base_index + index)) - for index in range(STREAM_LENGTH)] - - def verify(self, requests, responses, test_case): - test_case.assertEqual(len(requests), len(responses)) - for stock_request, stock_reply in zip(requests, responses): - test_case.assertEqual(stock_request.symbol, stock_reply.symbol) - test_case.assertEqual(_price(stock_request.symbol), stock_reply.price) - - -class WatchFutureTrades(service.UnaryStreamTestMethodImplementation): - """WatchFutureTrades for use in tests.""" - - def name(self): - return 'WatchFutureTrades' - - def cardinality(self): - return cardinality.Cardinality.UNARY_STREAM - - def request_class(self): - return stock_pb2.StockRequest - - def response_class(self): - return stock_pb2.StockReply - - def serialize_request(self, request): - return request.SerializeToString() - - def deserialize_request(self, serialized_request): - return stock_pb2.StockRequest.FromString(serialized_request) - - def serialize_response(self, response): - return response.SerializeToString() - - def deserialize_response(self, serialized_response): - return stock_pb2.StockReply.FromString(serialized_response) - - def service(self, request, response_consumer, context, control): - _watch_future_trades(request, response_consumer, control, context.is_active) - - -class WatchFutureTradesMessages(service.UnaryStreamTestMessages): - """Pairs of a single request message and a sequence of response messages.""" - - def __init__(self): - self._index = 0 - - def request(self): - symbol = SYMBOL_FORMAT % self._index - self._index += 1 - return stock_pb2.StockRequest( - symbol=symbol, num_trades_to_watch=STREAM_LENGTH) - - def verify(self, request, responses, test_case): - test_case.assertEqual(STREAM_LENGTH, len(responses)) - base_price = _price(request.symbol) - for index, response in enumerate(responses): - test_case.assertEqual(base_price + index, response.price) - - -class GetHighestTradePrice(service.StreamUnaryTestMethodImplementation): - """GetHighestTradePrice for use in tests.""" - - def name(self): - return 'GetHighestTradePrice' - - def cardinality(self): - return cardinality.Cardinality.STREAM_UNARY - - def request_class(self): - return stock_pb2.StockRequest - - def response_class(self): - return stock_pb2.StockReply - - def serialize_request(self, request): - return request.SerializeToString() - - def deserialize_request(self, serialized_request): - return stock_pb2.StockRequest.FromString(serialized_request) - - def serialize_response(self, response): - return response.SerializeToString() - - def deserialize_response(self, serialized_response): - return stock_pb2.StockReply.FromString(serialized_response) - - def service(self, response_callback, context, control): - return _get_highest_trade_price( - response_callback, control, context.is_active) - - -class GetHighestTradePriceMessages(service.StreamUnaryTestMessages): - - def requests(self): - return [ - stock_pb2.StockRequest(symbol=SYMBOL_FORMAT % index) - for index in range(STREAM_LENGTH)] - - def verify(self, requests, response, test_case): - price = None - symbol = None - for stock_request in requests: - current_symbol = stock_request.symbol - current_price = _price(current_symbol) - if price is None or price < current_price: - price = current_price - symbol = current_symbol - test_case.assertEqual(price, response.price) - test_case.assertEqual(symbol, response.symbol) - - -class StockTestService(service.TestService): - """A corpus of test data with one method of each RPC cardinality.""" - - def name(self): - return 'Stock' - - def unary_unary_scenarios(self): - return { - 'GetLastTradePrice': ( - GetLastTradePrice(), [GetLastTradePriceMessages()]), - } - - def unary_stream_scenarios(self): - return { - 'WatchFutureTrades': ( - WatchFutureTrades(), [WatchFutureTradesMessages()]), - } - - def stream_unary_scenarios(self): - return { - 'GetHighestTradePrice': ( - GetHighestTradePrice(), [GetHighestTradePriceMessages()]) - } - - def stream_stream_scenarios(self): - return { - 'GetLastTradePriceMultiple': ( - GetLastTradePriceMultiple(), [GetLastTradePriceMultipleMessages()]), - } - - -STOCK_TEST_SERVICE = StockTestService() diff --git a/src/python/grpcio/tests/unit/framework/face/testing/test_case.py b/src/python/grpcio/tests/unit/framework/face/testing/test_case.py deleted file mode 100644 index f29d4008448..00000000000 --- a/src/python/grpcio/tests/unit/framework/face/testing/test_case.py +++ /dev/null @@ -1,81 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Tools for creating tests of implementations of the Face layer.""" - -import abc - -import six - -# face_interfaces and interfaces are referenced in specification in this module. -from grpc.framework.face import interfaces as face_interfaces # pylint: disable=unused-import -from tests.unit.framework.face.testing import interfaces # pylint: disable=unused-import - - -class FaceTestCase(six.with_metaclass(abc.ABCMeta)): - """Describes a test of the Face Layer of RPC Framework. - - Concrete subclasses must also inherit from unittest.TestCase and from at least - one class that defines test methods. - """ - - @abc.abstractmethod - def set_up_implementation( - self, name, methods, method_implementations, - multi_method_implementation): - """Instantiates the Face Layer implementation under test. - - Args: - name: The service name to be used in the test. - methods: A sequence of interfaces.Method objects describing the RPC - methods that will be called during the test. - method_implementations: A dictionary from string RPC method name to - face_interfaces.MethodImplementation object specifying - implementation of an RPC method. - multi_method_implementation: An face_interfaces.MultiMethodImplementation - or None. - - Returns: - A sequence of length two the first element of which is a - face_interfaces.GenericStub (backed by the given method - implementations), and the second element of which is an arbitrary memo - object to be kept and passed to tearDownImplementation at the conclusion - of the test. - """ - raise NotImplementedError() - - @abc.abstractmethod - def tear_down_implementation(self, memo): - """Destroys the Face layer implementation under test. - - Args: - memo: The object from the second position of the return value of - set_up_implementation. - """ - raise NotImplementedError() From c74f62bcfcabd8b7468bcca16dda28a29b377877 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 28 Apr 2016 00:56:31 -0700 Subject: [PATCH 0124/1894] Don't try to read files that have been moved/renamed. --- tools/distrib/check_include_guards.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/distrib/check_include_guards.py b/tools/distrib/check_include_guards.py index 897a899e7ed..6c160c64b6f 100755 --- a/tools/distrib/check_include_guards.py +++ b/tools/distrib/check_include_guards.py @@ -31,6 +31,7 @@ import argparse import os +import os.path import re import sys import subprocess @@ -187,6 +188,8 @@ filename_list = [] try: filename_list = subprocess.check_output(FILE_LIST_COMMAND, shell=True).splitlines() + # Filter out non-existent files (ie, file removed or renamed) + filename_list = (f for f in filename_list if os.path.isfile(f)) except subprocess.CalledProcessError: sys.exit(0) From cb2125577c3ab81aab3554221dc9171904ac231e Mon Sep 17 00:00:00 2001 From: Tamas Berghammer Date: Thu, 28 Apr 2016 10:35:34 +0100 Subject: [PATCH 0125/1894] Add 64bit Android support Since Android Lollipop (5.0) Android has 64bit support. This config change is needed to support these configurations. The code have been tested with AArch64 and no other changes needed to get the helloworld example working. --- include/grpc/impl/codegen/port_platform.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index 1229d488edb..0ac9324b389 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -117,7 +117,11 @@ #elif defined(ANDROID) || defined(__ANDROID__) #define GPR_PLATFORM_STRING "android" #define GPR_ANDROID 1 +#ifdef _LP64 +#define GPR_ARCH_64 1 +#else /* _LP64 */ #define GPR_ARCH_32 1 +#endif /* _LP64 */ #define GPR_CPU_LINUX 1 #define GPR_GCC_SYNC 1 #define GPR_GCC_TLS 1 From b6e444088009ade16d9af4ab497f484d63d65b86 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 28 Apr 2016 08:21:52 -0700 Subject: [PATCH 0126/1894] Disable fail fast for qps driver --- test/cpp/qps/driver.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 2583ceb8192..04b2b453f9e 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -83,6 +83,7 @@ static std::unordered_map> get_hosts_and_cores( auto stub = WorkerService::NewStub( CreateChannel(*it, InsecureChannelCredentials())); grpc::ClientContext ctx; + ctx.set_fail_fast(false); CoreRequest dummy; CoreResponse cores; grpc::Status s = stub->CoreCount(&ctx, dummy, &cores); @@ -166,6 +167,7 @@ namespace runsc { static ClientContext* AllocContext(list* contexts) { contexts->emplace_back(); auto context = &contexts->back(); + context->set_fail_fast(false); return context; } @@ -435,6 +437,7 @@ void RunQuit() { CreateChannel(workers[i], InsecureChannelCredentials())); Void dummy; grpc::ClientContext ctx; + ctx.set_fail_fast(false); GPR_ASSERT(stub->QuitWorker(&ctx, dummy, &dummy).ok()); } } From 9a4d0893881f6811646695cc73fe9752fed308ae Mon Sep 17 00:00:00 2001 From: Yosuke Ishikawa Date: Fri, 29 Apr 2016 01:05:39 +0900 Subject: [PATCH 0127/1894] Fix build error caused by immutability of value type --- src/objective-c/examples/SwiftSample/ViewController.swift | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/objective-c/examples/SwiftSample/ViewController.swift b/src/objective-c/examples/SwiftSample/ViewController.swift index a21ce07978d..80d7a47917f 100644 --- a/src/objective-c/examples/SwiftSample/ViewController.swift +++ b/src/objective-c/examples/SwiftSample/ViewController.swift @@ -71,7 +71,7 @@ class ViewController: UIViewController { NSLog("2. Response trailers: \(RPC.responseTrailers)") } - RPC.requestHeaders["My-Header"] = "My value" + RPC.requestHeaders.setObject("My value", forKey: "My-Header") RPC.start() @@ -84,7 +84,7 @@ class ViewController: UIViewController { let call = GRPCCall(host: RemoteHost, path: method.HTTPPath, requestsWriter: requestsWriter) - call.requestHeaders["My-Header"] = "My value" + call.requestHeaders.setObject("My value", forKey: "My-Header") call.startWithWriteable(GRXWriteable { response, error in if let response = response as? NSData { From 9b7b62b59909ce1712291382156cf212d0b0caf4 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 28 Apr 2016 09:45:51 -0700 Subject: [PATCH 0128/1894] Fix a case whereby we leak a winsocket if we fail to connect --- src/core/lib/iomgr/tcp_client_windows.c | 28 ++++++++++++++++--------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index 7d78beb15ad..111e0231f7b 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -63,39 +63,44 @@ typedef struct { grpc_endpoint **endpoint; } async_connect; -static void async_connect_unlock_and_cleanup(async_connect *ac) { +static void async_connect_unlock_and_cleanup(async_connect *ac, grpc_winsocket *socket) { int done = (--ac->refs == 0); gpr_mu_unlock(&ac->mu); if (done) { - if (ac->socket != NULL) grpc_winsocket_destroy(ac->socket); gpr_mu_destroy(&ac->mu); gpr_free(ac->addr_name); gpr_free(ac); } + if (socket != NULL) grpc_winsocket_destroy(socket); } static void on_alarm(grpc_exec_ctx *exec_ctx, void *acp, bool occured) { async_connect *ac = acp; gpr_mu_lock(&ac->mu); - /* If the alarm didn't occur, it got cancelled. */ - if (ac->socket != NULL && occured) { + if (ac->socket != NULL) { grpc_winsocket_shutdown(ac->socket); } - async_connect_unlock_and_cleanup(ac); + async_connect_unlock_and_cleanup(ac, ac->socket); } static void on_connect(grpc_exec_ctx *exec_ctx, void *acp, bool from_iocp) { async_connect *ac = acp; SOCKET sock = ac->socket->socket; grpc_endpoint **ep = ac->endpoint; + GPR_ASSERT(*ep == NULL); grpc_winsocket_callback_info *info = &ac->socket->write_info; grpc_closure *on_done = ac->on_done; + gpr_mu_lock(&ac->mu); + grpc_winsocket *socket = ac->socket; + ac->socket = NULL; + gpr_mu_unlock(&ac->mu); + grpc_timer_cancel(exec_ctx, &ac->alarm); gpr_mu_lock(&ac->mu); - if (from_iocp) { + if (from_iocp && socket != NULL) { DWORD transfered_bytes = 0; DWORD flags; BOOL wsa_success = WSAGetOverlappedResult(sock, &info->overlapped, @@ -107,12 +112,12 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *acp, bool from_iocp) { ac->addr_name, utf8_message); gpr_free(utf8_message); } else { - *ep = grpc_tcp_create(ac->socket, ac->addr_name); - ac->socket = NULL; + *ep = grpc_tcp_create(socket, ac->addr_name); + socket = NULL; } } - async_connect_unlock_and_cleanup(ac); + async_connect_unlock_and_cleanup(ac, socket); /* If the connection was aborted, the callback was already called when the deadline was met. */ on_done->cb(exec_ctx, on_done->cb_arg, *ep != NULL); @@ -138,6 +143,7 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, const char *message = NULL; char *utf8_message; grpc_winsocket_callback_info *info; + int last_error; *endpoint = NULL; @@ -208,8 +214,10 @@ void grpc_tcp_client_connect(grpc_exec_ctx *exec_ctx, grpc_closure *on_done, return; failure: - utf8_message = gpr_format_message(WSAGetLastError()); + last_error = WSAGetLastError(); + utf8_message = gpr_format_message(last_error); gpr_log(GPR_ERROR, message, utf8_message); + gpr_log(GPR_ERROR, "last error = %d", last_error); gpr_free(utf8_message); if (socket != NULL) { grpc_winsocket_destroy(socket); From 4cbaccfa60ae2e4e9ec0e6f8b14b285823868e60 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 28 Apr 2016 09:46:49 -0700 Subject: [PATCH 0129/1894] clang-format --- src/core/lib/iomgr/tcp_client_windows.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/lib/iomgr/tcp_client_windows.c b/src/core/lib/iomgr/tcp_client_windows.c index 111e0231f7b..66f9ff7a465 100644 --- a/src/core/lib/iomgr/tcp_client_windows.c +++ b/src/core/lib/iomgr/tcp_client_windows.c @@ -63,7 +63,8 @@ typedef struct { grpc_endpoint **endpoint; } async_connect; -static void async_connect_unlock_and_cleanup(async_connect *ac, grpc_winsocket *socket) { +static void async_connect_unlock_and_cleanup(async_connect *ac, + grpc_winsocket *socket) { int done = (--ac->refs == 0); gpr_mu_unlock(&ac->mu); if (done) { From 59c20edc3b22f286867e78f0cf8ba05a1a7f1c0f Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 28 Apr 2016 09:12:13 -0700 Subject: [PATCH 0130/1894] add comments from .proto file to generated C# files --- src/compiler/csharp_generator.cc | 89 +++++++++++++++++++++++++++++--- 1 file changed, 82 insertions(+), 7 deletions(-) diff --git a/src/compiler/csharp_generator.cc b/src/compiler/csharp_generator.cc index 0d1404341d2..ac0fee1ec4d 100644 --- a/src/compiler/csharp_generator.cc +++ b/src/compiler/csharp_generator.cc @@ -52,6 +52,7 @@ using grpc::protobuf::MethodDescriptor; using grpc::protobuf::io::Printer; using grpc::protobuf::io::StringOutputStream; using grpc_generator::MethodType; +using grpc_generator::GetCppComments; using grpc_generator::GetMethodType; using grpc_generator::METHODTYPE_NO_STREAMING; using grpc_generator::METHODTYPE_CLIENT_STREAMING; @@ -65,6 +66,56 @@ using std::vector; namespace grpc_csharp_generator { namespace { +// This function is a massaged version of +// https://github.com/google/protobuf/blob/master/src/google/protobuf/compiler/csharp/csharp_doc_comment.cc +// Currently, we cannot easily reuse the functionality as +// google/protobuf/compiler/csharp/csharp_doc_comment.h is not a public header. +// TODO(jtattermusch): reuse the functionality from google/protobuf. +void GenerateDocCommentBodyImpl(grpc::protobuf::io::Printer* printer, grpc::protobuf::SourceLocation location) { + grpc::string comments = location.leading_comments.empty() ? + location.trailing_comments : location.leading_comments; + if (comments.empty()) { + return; + } + // XML escaping... no need for apostrophes etc as the whole text is going to be a child + // node of a summary element, not part of an attribute. + comments = grpc_generator::StringReplace(comments, "&", "&", true); + comments = grpc_generator::StringReplace(comments, "<", "<", true); + + std::vector lines; + grpc_generator::Split(comments, '\n', &lines); + // TODO: We really should work out which part to put in the summary and which to put in the remarks... + // but that needs to be part of a bigger effort to understand the markdown better anyway. + printer->Print("/// \n"); + bool last_was_empty = false; + // We squash multiple blank lines down to one, and remove any trailing blank lines. We need + // to preserve the blank lines themselves, as this is relevant in the markdown. + // Note that we can't remove leading or trailing whitespace as *that's* relevant in markdown too. + // (We don't skip "just whitespace" lines, either.) + for (std::vector::iterator it = lines.begin(); it != lines.end(); ++it) { + grpc::string line = *it; + if (line.empty()) { + last_was_empty = true; + } else { + if (last_was_empty) { + printer->Print("///\n"); + } + last_was_empty = false; + printer->Print("/// $line$\n", "line", *it); + } + } + printer->Print("/// \n"); +} + +template +void GenerateDocCommentBody( + grpc::protobuf::io::Printer* printer, const DescriptorType* descriptor) { + grpc::protobuf::SourceLocation location; + if (descriptor->GetSourceLocation(&location)) { + GenerateDocCommentBodyImpl(printer, location); + } +} + std::string GetServiceClassName(const ServiceDescriptor* service) { return service->name(); } @@ -242,7 +293,7 @@ void GenerateStaticMethodField(Printer* out, const MethodDescriptor *method) { void GenerateServiceDescriptorProperty(Printer* out, const ServiceDescriptor *service) { std::ostringstream index; index << service->index(); - out->Print("// service descriptor\n"); + out->Print("/// Service descriptor\n"); out->Print("public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor\n"); out->Print("{\n"); out->Print(" get { return $umbrella$.Descriptor.Services[$index$]; }\n", @@ -253,7 +304,8 @@ void GenerateServiceDescriptorProperty(Printer* out, const ServiceDescriptor *se } void GenerateClientInterface(Printer* out, const ServiceDescriptor *service) { - out->Print("// client interface\n"); + out->Print("/// Client for $servicename$\n", + "servicename", GetServiceClassName(service)); out->Print("[System.Obsolete(\"Client side interfaced will be removed " "in the next release. Use client class directly.\")]\n"); out->Print("public interface $name$\n", "name", @@ -266,6 +318,7 @@ void GenerateClientInterface(Printer* out, const ServiceDescriptor *service) { if (method_type == METHODTYPE_NO_STREAMING) { // unary calls have an extra synchronous stub method + GenerateDocCommentBody(out, method); out->Print( "$response$ $methodname$($request$ request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));\n", "methodname", method->name(), "request", @@ -273,6 +326,7 @@ void GenerateClientInterface(Printer* out, const ServiceDescriptor *service) { GetClassName(method->output_type())); // overload taking CallOptions as a param + GenerateDocCommentBody(out, method); out->Print( "$response$ $methodname$($request$ request, CallOptions options);\n", "methodname", method->name(), "request", @@ -284,6 +338,7 @@ void GenerateClientInterface(Printer* out, const ServiceDescriptor *service) { if (method_type == METHODTYPE_NO_STREAMING) { method_name += "Async"; // prevent name clash with synchronous method. } + GenerateDocCommentBody(out, method); out->Print( "$returntype$ $methodname$($request_maybe$Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));\n", "methodname", method_name, "request_maybe", @@ -291,6 +346,7 @@ void GenerateClientInterface(Printer* out, const ServiceDescriptor *service) { GetMethodReturnTypeClient(method)); // overload taking CallOptions as a param + GenerateDocCommentBody(out, method); out->Print( "$returntype$ $methodname$($request_maybe$CallOptions options);\n", "methodname", method_name, "request_maybe", @@ -303,7 +359,8 @@ void GenerateClientInterface(Printer* out, const ServiceDescriptor *service) { } void GenerateServerInterface(Printer* out, const ServiceDescriptor *service) { - out->Print("// server-side interface\n"); + out->Print("/// Interface of server-side implementations of $servicename$\n", + "servicename", GetServiceClassName(service)); out->Print("[System.Obsolete(\"Service implementations should inherit" " from the generated abstract base class instead.\")]\n"); out->Print("public interface $name$\n", "name", @@ -312,6 +369,7 @@ void GenerateServerInterface(Printer* out, const ServiceDescriptor *service) { out->Indent(); for (int i = 0; i < service->method_count(); i++) { const MethodDescriptor *method = service->method(i); + GenerateDocCommentBody(out, method); out->Print( "$returntype$ $methodname$($request$$response_stream_maybe$, " "ServerCallContext context);\n", @@ -326,13 +384,15 @@ void GenerateServerInterface(Printer* out, const ServiceDescriptor *service) { } void GenerateServerClass(Printer* out, const ServiceDescriptor *service) { - out->Print("// server-side abstract class\n"); + out->Print("/// Base class for server-side implementations of $servicename$\n", + "servicename", GetServiceClassName(service)); out->Print("public abstract class $name$\n", "name", GetServerClassName(service)); out->Print("{\n"); out->Indent(); for (int i = 0; i < service->method_count(); i++) { const MethodDescriptor *method = service->method(i); + GenerateDocCommentBody(out, method); out->Print( "public virtual $returntype$ $methodname$($request$$response_stream_maybe$, " "ServerCallContext context)\n", @@ -353,7 +413,8 @@ void GenerateServerClass(Printer* out, const ServiceDescriptor *service) { } void GenerateClientStub(Printer* out, const ServiceDescriptor *service) { - out->Print("// client stub\n"); + out->Print("/// Client for $servicename$\n", + "servicename", GetServiceClassName(service)); out->Print("#pragma warning disable 0618\n"); out->Print( "public class $name$ : ClientBase<$name$>, $interface$\n", @@ -392,6 +453,7 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) { if (method_type == METHODTYPE_NO_STREAMING) { // unary calls have an extra synchronous stub method + GenerateDocCommentBody(out, method); out->Print("public virtual $response$ $methodname$($request$ request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))\n", "methodname", method->name(), "request", GetClassName(method->input_type()), "response", @@ -404,6 +466,7 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) { out->Print("}\n"); // overload taking CallOptions as a param + GenerateDocCommentBody(out, method); out->Print("public virtual $response$ $methodname$($request$ request, CallOptions options)\n", "methodname", method->name(), "request", GetClassName(method->input_type()), "response", @@ -420,6 +483,7 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) { if (method_type == METHODTYPE_NO_STREAMING) { method_name += "Async"; // prevent name clash with synchronous method. } + GenerateDocCommentBody(out, method); out->Print( "public virtual $returntype$ $methodname$($request_maybe$Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken))\n", "methodname", method_name, "request_maybe", @@ -435,6 +499,7 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) { out->Print("}\n"); // overload taking CallOptions as a param + GenerateDocCommentBody(out, method); out->Print( "public virtual $returntype$ $methodname$($request_maybe$CallOptions options)\n", "methodname", method_name, "request_maybe", @@ -485,7 +550,7 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) { void GenerateBindServiceMethod(Printer* out, const ServiceDescriptor *service, bool use_server_class) { out->Print( - "// creates service definition that can be registered with a server\n"); + "/// Creates service definition that can be registered with a server\n"); out->Print("#pragma warning disable 0618\n"); out->Print( "public static ServerServiceDefinition BindService($interface$ serviceImpl)\n", @@ -519,7 +584,8 @@ void GenerateBindServiceMethod(Printer* out, const ServiceDescriptor *service, } void GenerateNewStubMethods(Printer* out, const ServiceDescriptor *service) { - out->Print("// creates a new client\n"); + out->Print("/// Creates a new client for $servicename$\n", + "servicename", GetServiceClassName(service)); out->Print("public static $classname$ NewClient(Channel channel)\n", "classname", GetClientClassName(service)); out->Print("{\n"); @@ -534,6 +600,7 @@ void GenerateNewStubMethods(Printer* out, const ServiceDescriptor *service) { void GenerateService(Printer* out, const ServiceDescriptor *service, bool generate_client, bool generate_server, bool internal_access) { + GenerateDocCommentBody(out, service); out->Print("$access_level$ static class $classname$\n", "access_level", GetAccessLevel(internal_access), "classname", GetServiceClassName(service)); @@ -590,6 +657,14 @@ grpc::string GetServices(const FileDescriptor *file, bool generate_client, // Write out a file header. out.Print("// Generated by the protocol buffer compiler. DO NOT EDIT!\n"); out.Print("// source: $filename$\n", "filename", file->name()); + + // use C++ style as there are no file-level XML comments in .NET + grpc::string leading_comments = GetCppComments(file, true); + if (!leading_comments.empty()) { + out.Print("// Original file comments:\n"); + out.Print(leading_comments.c_str()); + } + out.Print("#region Designer generated code\n"); out.Print("\n"); out.Print("using System;\n"); From bfee01ddc88b8f655fbfb88f83566a170f1ae3a3 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 28 Apr 2016 10:52:41 -0700 Subject: [PATCH 0131/1894] regenerate C# sources --- src/csharp/Grpc.Examples/MathGrpc.cs | 176 ++++++++++- src/csharp/Grpc.HealthCheck/HealthGrpc.cs | 46 ++- .../Grpc.IntegrationTesting/MetricsGrpc.cs | 106 ++++++- .../Grpc.IntegrationTesting/ServicesGrpc.cs | 284 ++++++++++++++++- .../Grpc.IntegrationTesting/TestGrpc.cs | 296 ++++++++++++++++-- 5 files changed, 844 insertions(+), 64 deletions(-) diff --git a/src/csharp/Grpc.Examples/MathGrpc.cs b/src/csharp/Grpc.Examples/MathGrpc.cs index edbce913b89..2d3034d28b5 100644 --- a/src/csharp/Grpc.Examples/MathGrpc.cs +++ b/src/csharp/Grpc.Examples/MathGrpc.cs @@ -1,5 +1,35 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: math.proto +// Original file comments: +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// #region Designer generated code using System; @@ -45,56 +75,140 @@ namespace Math { __Marshaller_Num, __Marshaller_Num); - // service descriptor + /// Service descriptor public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor { get { return global::Math.MathReflection.Descriptor.Services[0]; } } - // client interface + /// Client for Math [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")] public interface IMathClient { + /// + /// Div divides args.dividend by args.divisor and returns the quotient and + /// remainder. + /// global::Math.DivReply Div(global::Math.DivArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Div divides args.dividend by args.divisor and returns the quotient and + /// remainder. + /// global::Math.DivReply Div(global::Math.DivArgs request, CallOptions options); + /// + /// Div divides args.dividend by args.divisor and returns the quotient and + /// remainder. + /// AsyncUnaryCall DivAsync(global::Math.DivArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Div divides args.dividend by args.divisor and returns the quotient and + /// remainder. + /// AsyncUnaryCall DivAsync(global::Math.DivArgs request, CallOptions options); + /// + /// DivMany accepts an arbitrary number of division args from the client stream + /// and sends back the results in the reply stream. The stream continues until + /// the client closes its end; the server does the same after sending all the + /// replies. The stream ends immediately if either end aborts. + /// AsyncDuplexStreamingCall DivMany(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// DivMany accepts an arbitrary number of division args from the client stream + /// and sends back the results in the reply stream. The stream continues until + /// the client closes its end; the server does the same after sending all the + /// replies. The stream ends immediately if either end aborts. + /// AsyncDuplexStreamingCall DivMany(CallOptions options); + /// + /// Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib + /// generates up to limit numbers; otherwise it continues until the call is + /// canceled. Unlike Fib above, Fib has no final FibReply. + /// AsyncServerStreamingCall Fib(global::Math.FibArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib + /// generates up to limit numbers; otherwise it continues until the call is + /// canceled. Unlike Fib above, Fib has no final FibReply. + /// AsyncServerStreamingCall Fib(global::Math.FibArgs request, CallOptions options); + /// + /// Sum sums a stream of numbers, returning the final result once the stream + /// is closed. + /// AsyncClientStreamingCall Sum(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Sum sums a stream of numbers, returning the final result once the stream + /// is closed. + /// AsyncClientStreamingCall Sum(CallOptions options); } - // server-side interface + /// Interface of server-side implementations of Math [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")] public interface IMath { + /// + /// Div divides args.dividend by args.divisor and returns the quotient and + /// remainder. + /// Task Div(global::Math.DivArgs request, ServerCallContext context); + /// + /// DivMany accepts an arbitrary number of division args from the client stream + /// and sends back the results in the reply stream. The stream continues until + /// the client closes its end; the server does the same after sending all the + /// replies. The stream ends immediately if either end aborts. + /// Task DivMany(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); + /// + /// Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib + /// generates up to limit numbers; otherwise it continues until the call is + /// canceled. Unlike Fib above, Fib has no final FibReply. + /// Task Fib(global::Math.FibArgs request, IServerStreamWriter responseStream, ServerCallContext context); + /// + /// Sum sums a stream of numbers, returning the final result once the stream + /// is closed. + /// Task Sum(IAsyncStreamReader requestStream, ServerCallContext context); } - // server-side abstract class + /// Base class for server-side implementations of Math public abstract class MathBase { + /// + /// Div divides args.dividend by args.divisor and returns the quotient and + /// remainder. + /// public virtual Task Div(global::Math.DivArgs request, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } + /// + /// DivMany accepts an arbitrary number of division args from the client stream + /// and sends back the results in the reply stream. The stream continues until + /// the client closes its end; the server does the same after sending all the + /// replies. The stream ends immediately if either end aborts. + /// public virtual Task DivMany(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } + /// + /// Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib + /// generates up to limit numbers; otherwise it continues until the call is + /// canceled. Unlike Fib above, Fib has no final FibReply. + /// public virtual Task Fib(global::Math.FibArgs request, IServerStreamWriter responseStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } + /// + /// Sum sums a stream of numbers, returning the final result once the stream + /// is closed. + /// public virtual Task Sum(IAsyncStreamReader requestStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); @@ -102,7 +216,7 @@ namespace Math { } - // client stub + /// Client for Math #pragma warning disable 0618 public class MathClient : ClientBase, IMathClient #pragma warning restore 0618 @@ -122,42 +236,88 @@ namespace Math { { } + /// + /// Div divides args.dividend by args.divisor and returns the quotient and + /// remainder. + /// public virtual global::Math.DivReply Div(global::Math.DivArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return Div(request, new CallOptions(headers, deadline, cancellationToken)); } + /// + /// Div divides args.dividend by args.divisor and returns the quotient and + /// remainder. + /// public virtual global::Math.DivReply Div(global::Math.DivArgs request, CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_Div, null, options, request); } + /// + /// Div divides args.dividend by args.divisor and returns the quotient and + /// remainder. + /// public virtual AsyncUnaryCall DivAsync(global::Math.DivArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return DivAsync(request, new CallOptions(headers, deadline, cancellationToken)); } + /// + /// Div divides args.dividend by args.divisor and returns the quotient and + /// remainder. + /// public virtual AsyncUnaryCall DivAsync(global::Math.DivArgs request, CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_Div, null, options, request); } + /// + /// DivMany accepts an arbitrary number of division args from the client stream + /// and sends back the results in the reply stream. The stream continues until + /// the client closes its end; the server does the same after sending all the + /// replies. The stream ends immediately if either end aborts. + /// public virtual AsyncDuplexStreamingCall DivMany(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return DivMany(new CallOptions(headers, deadline, cancellationToken)); } + /// + /// DivMany accepts an arbitrary number of division args from the client stream + /// and sends back the results in the reply stream. The stream continues until + /// the client closes its end; the server does the same after sending all the + /// replies. The stream ends immediately if either end aborts. + /// public virtual AsyncDuplexStreamingCall DivMany(CallOptions options) { return CallInvoker.AsyncDuplexStreamingCall(__Method_DivMany, null, options); } + /// + /// Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib + /// generates up to limit numbers; otherwise it continues until the call is + /// canceled. Unlike Fib above, Fib has no final FibReply. + /// public virtual AsyncServerStreamingCall Fib(global::Math.FibArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return Fib(request, new CallOptions(headers, deadline, cancellationToken)); } + /// + /// Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib + /// generates up to limit numbers; otherwise it continues until the call is + /// canceled. Unlike Fib above, Fib has no final FibReply. + /// public virtual AsyncServerStreamingCall Fib(global::Math.FibArgs request, CallOptions options) { return CallInvoker.AsyncServerStreamingCall(__Method_Fib, null, options, request); } + /// + /// Sum sums a stream of numbers, returning the final result once the stream + /// is closed. + /// public virtual AsyncClientStreamingCall Sum(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return Sum(new CallOptions(headers, deadline, cancellationToken)); } + /// + /// Sum sums a stream of numbers, returning the final result once the stream + /// is closed. + /// public virtual AsyncClientStreamingCall Sum(CallOptions options) { return CallInvoker.AsyncClientStreamingCall(__Method_Sum, null, options); @@ -168,13 +328,13 @@ namespace Math { } } - // creates a new client + /// Creates a new client for Math public static MathClient NewClient(Channel channel) { return new MathClient(channel); } - // creates service definition that can be registered with a server + /// Creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(IMath serviceImpl) #pragma warning restore 0618 @@ -186,7 +346,7 @@ namespace Math { .AddMethod(__Method_Sum, serviceImpl.Sum).Build(); } - // creates service definition that can be registered with a server + /// Creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(MathBase serviceImpl) #pragma warning restore 0618 diff --git a/src/csharp/Grpc.HealthCheck/HealthGrpc.cs b/src/csharp/Grpc.HealthCheck/HealthGrpc.cs index e2cdabf011d..967d1170bed 100644 --- a/src/csharp/Grpc.HealthCheck/HealthGrpc.cs +++ b/src/csharp/Grpc.HealthCheck/HealthGrpc.cs @@ -1,5 +1,35 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: health.proto +// Original file comments: +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// #region Designer generated code using System; @@ -22,13 +52,13 @@ namespace Grpc.Health.V1 { __Marshaller_HealthCheckRequest, __Marshaller_HealthCheckResponse); - // service descriptor + /// Service descriptor public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor { get { return global::Grpc.Health.V1.HealthReflection.Descriptor.Services[0]; } } - // client interface + /// Client for Health [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")] public interface IHealthClient { @@ -38,14 +68,14 @@ namespace Grpc.Health.V1 { AsyncUnaryCall CheckAsync(global::Grpc.Health.V1.HealthCheckRequest request, CallOptions options); } - // server-side interface + /// Interface of server-side implementations of Health [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")] public interface IHealth { Task Check(global::Grpc.Health.V1.HealthCheckRequest request, ServerCallContext context); } - // server-side abstract class + /// Base class for server-side implementations of Health public abstract class HealthBase { public virtual Task Check(global::Grpc.Health.V1.HealthCheckRequest request, ServerCallContext context) @@ -55,7 +85,7 @@ namespace Grpc.Health.V1 { } - // client stub + /// Client for Health #pragma warning disable 0618 public class HealthClient : ClientBase, IHealthClient #pragma warning restore 0618 @@ -97,13 +127,13 @@ namespace Grpc.Health.V1 { } } - // creates a new client + /// Creates a new client for Health public static HealthClient NewClient(Channel channel) { return new HealthClient(channel); } - // creates service definition that can be registered with a server + /// Creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(IHealth serviceImpl) #pragma warning restore 0618 @@ -112,7 +142,7 @@ namespace Grpc.Health.V1 { .AddMethod(__Method_Check, serviceImpl.Check).Build(); } - // creates service definition that can be registered with a server + /// Creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(HealthBase serviceImpl) #pragma warning restore 0618 diff --git a/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs b/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs index 0f701a837f4..aa4f1c5c3ec 100644 --- a/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs @@ -1,5 +1,41 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: src/proto/grpc/testing/metrics.proto +// Original file comments: +// Copyright 2015-2016, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Contains the definitions for a metrics service and the type of metrics +// exposed by the service. +// +// Currently, 'Gauge' (i.e a metric that represents the measured value of +// something at an instant of time) is the only metric type supported by the +// service. #region Designer generated code using System; @@ -30,40 +66,74 @@ namespace Grpc.Testing { __Marshaller_GaugeRequest, __Marshaller_GaugeResponse); - // service descriptor + /// Service descriptor public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor { get { return global::Grpc.Testing.MetricsReflection.Descriptor.Services[0]; } } - // client interface + /// Client for MetricsService [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")] public interface IMetricsServiceClient { + /// + /// Returns the values of all the gauges that are currently being maintained by + /// the service + /// AsyncServerStreamingCall GetAllGauges(global::Grpc.Testing.EmptyMessage request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns the values of all the gauges that are currently being maintained by + /// the service + /// AsyncServerStreamingCall GetAllGauges(global::Grpc.Testing.EmptyMessage request, CallOptions options); + /// + /// Returns the value of one gauge + /// global::Grpc.Testing.GaugeResponse GetGauge(global::Grpc.Testing.GaugeRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns the value of one gauge + /// global::Grpc.Testing.GaugeResponse GetGauge(global::Grpc.Testing.GaugeRequest request, CallOptions options); + /// + /// Returns the value of one gauge + /// AsyncUnaryCall GetGaugeAsync(global::Grpc.Testing.GaugeRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Returns the value of one gauge + /// AsyncUnaryCall GetGaugeAsync(global::Grpc.Testing.GaugeRequest request, CallOptions options); } - // server-side interface + /// Interface of server-side implementations of MetricsService [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")] public interface IMetricsService { + /// + /// Returns the values of all the gauges that are currently being maintained by + /// the service + /// Task GetAllGauges(global::Grpc.Testing.EmptyMessage request, IServerStreamWriter responseStream, ServerCallContext context); + /// + /// Returns the value of one gauge + /// Task GetGauge(global::Grpc.Testing.GaugeRequest request, ServerCallContext context); } - // server-side abstract class + /// Base class for server-side implementations of MetricsService public abstract class MetricsServiceBase { + /// + /// Returns the values of all the gauges that are currently being maintained by + /// the service + /// public virtual Task GetAllGauges(global::Grpc.Testing.EmptyMessage request, IServerStreamWriter responseStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } + /// + /// Returns the value of one gauge + /// public virtual Task GetGauge(global::Grpc.Testing.GaugeRequest request, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); @@ -71,7 +141,7 @@ namespace Grpc.Testing { } - // client stub + /// Client for MetricsService #pragma warning disable 0618 public class MetricsServiceClient : ClientBase, IMetricsServiceClient #pragma warning restore 0618 @@ -91,26 +161,46 @@ namespace Grpc.Testing { { } + /// + /// Returns the values of all the gauges that are currently being maintained by + /// the service + /// public virtual AsyncServerStreamingCall GetAllGauges(global::Grpc.Testing.EmptyMessage request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return GetAllGauges(request, new CallOptions(headers, deadline, cancellationToken)); } + /// + /// Returns the values of all the gauges that are currently being maintained by + /// the service + /// public virtual AsyncServerStreamingCall GetAllGauges(global::Grpc.Testing.EmptyMessage request, CallOptions options) { return CallInvoker.AsyncServerStreamingCall(__Method_GetAllGauges, null, options, request); } + /// + /// Returns the value of one gauge + /// public virtual global::Grpc.Testing.GaugeResponse GetGauge(global::Grpc.Testing.GaugeRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return GetGauge(request, new CallOptions(headers, deadline, cancellationToken)); } + /// + /// Returns the value of one gauge + /// public virtual global::Grpc.Testing.GaugeResponse GetGauge(global::Grpc.Testing.GaugeRequest request, CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_GetGauge, null, options, request); } + /// + /// Returns the value of one gauge + /// public virtual AsyncUnaryCall GetGaugeAsync(global::Grpc.Testing.GaugeRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return GetGaugeAsync(request, new CallOptions(headers, deadline, cancellationToken)); } + /// + /// Returns the value of one gauge + /// public virtual AsyncUnaryCall GetGaugeAsync(global::Grpc.Testing.GaugeRequest request, CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_GetGauge, null, options, request); @@ -121,13 +211,13 @@ namespace Grpc.Testing { } } - // creates a new client + /// Creates a new client for MetricsService public static MetricsServiceClient NewClient(Channel channel) { return new MetricsServiceClient(channel); } - // creates service definition that can be registered with a server + /// Creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(IMetricsService serviceImpl) #pragma warning restore 0618 @@ -137,7 +227,7 @@ namespace Grpc.Testing { .AddMethod(__Method_GetGauge, serviceImpl.GetGauge).Build(); } - // creates service definition that can be registered with a server + /// Creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(MetricsServiceBase serviceImpl) #pragma warning restore 0618 diff --git a/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs b/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs index 3f07a7aeb63..42bf5e0b582 100644 --- a/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs @@ -1,5 +1,37 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: src/proto/grpc/testing/services.proto +// Original file comments: +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// An integration test service that covers all the method signature permutations +// of unary/streaming requests/responses. #region Designer generated code using System; @@ -29,40 +61,80 @@ namespace Grpc.Testing { __Marshaller_SimpleRequest, __Marshaller_SimpleResponse); - // service descriptor + /// Service descriptor public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor { get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[0]; } } - // client interface + /// Client for BenchmarkService [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")] public interface IBenchmarkServiceClient { + /// + /// One request followed by one response. + /// The server returns the client payload as-is. + /// global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// One request followed by one response. + /// The server returns the client payload as-is. + /// global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options); + /// + /// One request followed by one response. + /// The server returns the client payload as-is. + /// AsyncUnaryCall UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// One request followed by one response. + /// The server returns the client payload as-is. + /// AsyncUnaryCall UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options); + /// + /// One request followed by one response. + /// The server returns the client payload as-is. + /// AsyncDuplexStreamingCall StreamingCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// One request followed by one response. + /// The server returns the client payload as-is. + /// AsyncDuplexStreamingCall StreamingCall(CallOptions options); } - // server-side interface + /// Interface of server-side implementations of BenchmarkService [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")] public interface IBenchmarkService { + /// + /// One request followed by one response. + /// The server returns the client payload as-is. + /// Task UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context); + /// + /// One request followed by one response. + /// The server returns the client payload as-is. + /// Task StreamingCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); } - // server-side abstract class + /// Base class for server-side implementations of BenchmarkService public abstract class BenchmarkServiceBase { + /// + /// One request followed by one response. + /// The server returns the client payload as-is. + /// public virtual Task UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } + /// + /// One request followed by one response. + /// The server returns the client payload as-is. + /// public virtual Task StreamingCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); @@ -70,7 +142,7 @@ namespace Grpc.Testing { } - // client stub + /// Client for BenchmarkService #pragma warning disable 0618 public class BenchmarkServiceClient : ClientBase, IBenchmarkServiceClient #pragma warning restore 0618 @@ -90,26 +162,50 @@ namespace Grpc.Testing { { } + /// + /// One request followed by one response. + /// The server returns the client payload as-is. + /// public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return UnaryCall(request, new CallOptions(headers, deadline, cancellationToken)); } + /// + /// One request followed by one response. + /// The server returns the client payload as-is. + /// public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_UnaryCall, null, options, request); } + /// + /// One request followed by one response. + /// The server returns the client payload as-is. + /// public virtual AsyncUnaryCall UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return UnaryCallAsync(request, new CallOptions(headers, deadline, cancellationToken)); } + /// + /// One request followed by one response. + /// The server returns the client payload as-is. + /// public virtual AsyncUnaryCall UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request); } + /// + /// One request followed by one response. + /// The server returns the client payload as-is. + /// public virtual AsyncDuplexStreamingCall StreamingCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return StreamingCall(new CallOptions(headers, deadline, cancellationToken)); } + /// + /// One request followed by one response. + /// The server returns the client payload as-is. + /// public virtual AsyncDuplexStreamingCall StreamingCall(CallOptions options) { return CallInvoker.AsyncDuplexStreamingCall(__Method_StreamingCall, null, options); @@ -120,13 +216,13 @@ namespace Grpc.Testing { } } - // creates a new client + /// Creates a new client for BenchmarkService public static BenchmarkServiceClient NewClient(Channel channel) { return new BenchmarkServiceClient(channel); } - // creates service definition that can be registered with a server + /// Creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(IBenchmarkService serviceImpl) #pragma warning restore 0618 @@ -136,7 +232,7 @@ namespace Grpc.Testing { .AddMethod(__Method_StreamingCall, serviceImpl.StreamingCall).Build(); } - // creates service definition that can be registered with a server + /// Creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(BenchmarkServiceBase serviceImpl) #pragma warning restore 0618 @@ -187,58 +283,158 @@ namespace Grpc.Testing { __Marshaller_Void, __Marshaller_Void); - // service descriptor + /// Service descriptor public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor { get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[1]; } } - // client interface + /// Client for WorkerService [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")] public interface IWorkerServiceClient { + /// + /// 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. + /// AsyncDuplexStreamingCall RunServer(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(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. + /// AsyncDuplexStreamingCall RunServer(CallOptions 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. + /// AsyncDuplexStreamingCall RunClient(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(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. + /// AsyncDuplexStreamingCall RunClient(CallOptions options); + /// + /// Just return the core count - unary call + /// global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Just return the core count - unary call + /// global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, CallOptions options); + /// + /// Just return the core count - unary call + /// AsyncUnaryCall CoreCountAsync(global::Grpc.Testing.CoreRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Just return the core count - unary call + /// AsyncUnaryCall CoreCountAsync(global::Grpc.Testing.CoreRequest request, CallOptions options); + /// + /// Quit this worker + /// global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Quit this worker + /// global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, CallOptions options); + /// + /// Quit this worker + /// AsyncUnaryCall QuitWorkerAsync(global::Grpc.Testing.Void request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Quit this worker + /// AsyncUnaryCall QuitWorkerAsync(global::Grpc.Testing.Void request, CallOptions options); } - // server-side interface + /// Interface of server-side implementations of WorkerService [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")] public interface IWorkerService { + /// + /// 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. + /// Task RunServer(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); + /// + /// 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. + /// Task RunClient(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); + /// + /// Just return the core count - unary call + /// Task CoreCount(global::Grpc.Testing.CoreRequest request, ServerCallContext context); + /// + /// Quit this worker + /// Task QuitWorker(global::Grpc.Testing.Void request, ServerCallContext context); } - // server-side abstract class + /// Base class for server-side implementations of WorkerService public abstract 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. + /// public virtual Task RunServer(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context) { throw new RpcException(new Status(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. + /// public virtual Task RunClient(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } + /// + /// Just return the core count - unary call + /// public virtual Task CoreCount(global::Grpc.Testing.CoreRequest request, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } + /// + /// Quit this worker + /// public virtual Task QuitWorker(global::Grpc.Testing.Void request, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); @@ -246,7 +442,7 @@ namespace Grpc.Testing { } - // client stub + /// Client for WorkerService #pragma warning disable 0618 public class WorkerServiceClient : ClientBase, IWorkerServiceClient #pragma warning restore 0618 @@ -266,50 +462,106 @@ namespace Grpc.Testing { { } + /// + /// 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. + /// public virtual AsyncDuplexStreamingCall RunServer(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return RunServer(new 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. + /// public virtual AsyncDuplexStreamingCall RunServer(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. + /// public virtual AsyncDuplexStreamingCall RunClient(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return RunClient(new 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. + /// public virtual AsyncDuplexStreamingCall RunClient(CallOptions options) { return CallInvoker.AsyncDuplexStreamingCall(__Method_RunClient, null, options); } + /// + /// Just return the core count - unary call + /// public virtual global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return CoreCount(request, new CallOptions(headers, deadline, cancellationToken)); } + /// + /// Just return the core count - unary call + /// public virtual global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_CoreCount, null, options, request); } + /// + /// Just return the core count - unary call + /// public virtual AsyncUnaryCall CoreCountAsync(global::Grpc.Testing.CoreRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return CoreCountAsync(request, new CallOptions(headers, deadline, cancellationToken)); } + /// + /// Just return the core count - unary call + /// public virtual AsyncUnaryCall CoreCountAsync(global::Grpc.Testing.CoreRequest request, CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_CoreCount, null, options, request); } + /// + /// Quit this worker + /// public virtual global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return QuitWorker(request, new CallOptions(headers, deadline, cancellationToken)); } + /// + /// Quit this worker + /// public virtual global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_QuitWorker, null, options, request); } + /// + /// Quit this worker + /// public virtual AsyncUnaryCall QuitWorkerAsync(global::Grpc.Testing.Void request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return QuitWorkerAsync(request, new CallOptions(headers, deadline, cancellationToken)); } + /// + /// Quit this worker + /// public virtual AsyncUnaryCall QuitWorkerAsync(global::Grpc.Testing.Void request, CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_QuitWorker, null, options, request); @@ -320,13 +572,13 @@ namespace Grpc.Testing { } } - // creates a new client + /// Creates a new client for WorkerService public static WorkerServiceClient NewClient(Channel channel) { return new WorkerServiceClient(channel); } - // creates service definition that can be registered with a server + /// Creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(IWorkerService serviceImpl) #pragma warning restore 0618 @@ -338,7 +590,7 @@ namespace Grpc.Testing { .AddMethod(__Method_QuitWorker, serviceImpl.QuitWorker).Build(); } - // creates service definition that can be registered with a server + /// Creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(WorkerServiceBase serviceImpl) #pragma warning restore 0618 diff --git a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs index 4efd35f81fd..f1878cbb556 100644 --- a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs @@ -1,5 +1,38 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: src/proto/grpc/testing/test.proto +// Original file comments: +// Copyright 2015-2016, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// An integration test service that covers all the method signature permutations +// of unary/streaming requests/responses. +// #region Designer generated code using System; @@ -8,6 +41,10 @@ using System.Threading.Tasks; using Grpc.Core; namespace Grpc.Testing { + /// + /// A simple service to test the various types of RPCs and experiment with + /// performance with various types of payload. + /// public static class TestService { static readonly string __ServiceName = "grpc.testing.TestService"; @@ -62,74 +99,186 @@ namespace Grpc.Testing { __Marshaller_StreamingOutputCallRequest, __Marshaller_StreamingOutputCallResponse); - // service descriptor + /// Service descriptor public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor { get { return global::Grpc.Testing.TestReflection.Descriptor.Services[0]; } } - // client interface + /// Client for TestService [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")] public interface ITestServiceClient { + /// + /// One empty request followed by one empty response. + /// global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// One empty request followed by one empty response. + /// global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, CallOptions options); + /// + /// One empty request followed by one empty response. + /// AsyncUnaryCall EmptyCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// One empty request followed by one empty response. + /// AsyncUnaryCall EmptyCallAsync(global::Grpc.Testing.Empty request, CallOptions options); + /// + /// One request followed by one response. + /// global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// One request followed by one response. + /// global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options); + /// + /// One request followed by one response. + /// AsyncUnaryCall UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// One request followed by one response. + /// AsyncUnaryCall UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options); + /// + /// One request followed by a sequence of responses (streamed download). + /// The server returns the payload with client desired type and sizes. + /// AsyncServerStreamingCall StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// One request followed by a sequence of responses (streamed download). + /// The server returns the payload with client desired type and sizes. + /// AsyncServerStreamingCall StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, CallOptions options); + /// + /// A sequence of requests followed by one response (streamed upload). + /// The server returns the aggregated size of client payload as the result. + /// AsyncClientStreamingCall StreamingInputCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// A sequence of requests followed by one response (streamed upload). + /// The server returns the aggregated size of client payload as the result. + /// AsyncClientStreamingCall StreamingInputCall(CallOptions 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. + /// AsyncDuplexStreamingCall FullDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// 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. + /// AsyncDuplexStreamingCall FullDuplexCall(CallOptions 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. + /// AsyncDuplexStreamingCall HalfDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// 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. + /// AsyncDuplexStreamingCall HalfDuplexCall(CallOptions options); } - // server-side interface + /// Interface of server-side implementations of TestService [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")] public interface ITestService { + /// + /// One empty request followed by one empty response. + /// Task EmptyCall(global::Grpc.Testing.Empty request, ServerCallContext context); + /// + /// One request followed by one response. + /// Task UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context); + /// + /// One request followed by a sequence of responses (streamed download). + /// The server returns the payload with client desired type and sizes. + /// Task StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, IServerStreamWriter responseStream, ServerCallContext context); + /// + /// A sequence of requests followed by one response (streamed upload). + /// The server returns the aggregated size of client payload as the result. + /// Task StreamingInputCall(IAsyncStreamReader requestStream, ServerCallContext context); + /// + /// 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. + /// Task FullDuplexCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); + /// + /// 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. + /// Task HalfDuplexCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); } - // server-side abstract class + /// Base class for server-side implementations of TestService public abstract class TestServiceBase { + /// + /// One empty request followed by one empty response. + /// public virtual Task EmptyCall(global::Grpc.Testing.Empty request, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } + /// + /// One request followed by one response. + /// public virtual Task UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } + /// + /// One request followed by a sequence of responses (streamed download). + /// The server returns the payload with client desired type and sizes. + /// public virtual Task StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, IServerStreamWriter responseStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } + /// + /// A sequence of requests followed by one response (streamed upload). + /// The server returns the aggregated size of client payload as the result. + /// public virtual Task StreamingInputCall(IAsyncStreamReader requestStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } + /// + /// 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. + /// public virtual Task FullDuplexCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } + /// + /// 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. + /// public virtual Task HalfDuplexCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); @@ -137,7 +286,7 @@ namespace Grpc.Testing { } - // client stub + /// Client for TestService #pragma warning disable 0618 public class TestServiceClient : ClientBase, ITestServiceClient #pragma warning restore 0618 @@ -157,66 +306,128 @@ namespace Grpc.Testing { { } + /// + /// One empty request followed by one empty response. + /// public virtual global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return EmptyCall(request, new CallOptions(headers, deadline, cancellationToken)); } + /// + /// One empty request followed by one empty response. + /// public virtual global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_EmptyCall, null, options, request); } + /// + /// One empty request followed by one empty response. + /// public virtual AsyncUnaryCall EmptyCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return EmptyCallAsync(request, new CallOptions(headers, deadline, cancellationToken)); } + /// + /// One empty request followed by one empty response. + /// public virtual AsyncUnaryCall EmptyCallAsync(global::Grpc.Testing.Empty request, CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_EmptyCall, null, options, request); } + /// + /// One request followed by one response. + /// public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return UnaryCall(request, new CallOptions(headers, deadline, cancellationToken)); } + /// + /// One request followed by one response. + /// public virtual global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_UnaryCall, null, options, request); } + /// + /// One request followed by one response. + /// public virtual AsyncUnaryCall UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return UnaryCallAsync(request, new CallOptions(headers, deadline, cancellationToken)); } + /// + /// One request followed by one response. + /// public virtual AsyncUnaryCall UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_UnaryCall, null, options, request); } + /// + /// One request followed by a sequence of responses (streamed download). + /// The server returns the payload with client desired type and sizes. + /// public virtual AsyncServerStreamingCall StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return StreamingOutputCall(request, new CallOptions(headers, deadline, cancellationToken)); } + /// + /// One request followed by a sequence of responses (streamed download). + /// The server returns the payload with client desired type and sizes. + /// public virtual AsyncServerStreamingCall StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, CallOptions options) { return CallInvoker.AsyncServerStreamingCall(__Method_StreamingOutputCall, null, options, request); } + /// + /// A sequence of requests followed by one response (streamed upload). + /// The server returns the aggregated size of client payload as the result. + /// public virtual AsyncClientStreamingCall StreamingInputCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return StreamingInputCall(new CallOptions(headers, deadline, cancellationToken)); } + /// + /// A sequence of requests followed by one response (streamed upload). + /// The server returns the aggregated size of client payload as the result. + /// public virtual AsyncClientStreamingCall StreamingInputCall(CallOptions options) { return CallInvoker.AsyncClientStreamingCall(__Method_StreamingInputCall, null, 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. + /// public virtual AsyncDuplexStreamingCall FullDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return FullDuplexCall(new CallOptions(headers, deadline, cancellationToken)); } + /// + /// 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. + /// public virtual AsyncDuplexStreamingCall FullDuplexCall(CallOptions options) { return CallInvoker.AsyncDuplexStreamingCall(__Method_FullDuplexCall, null, 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. + /// public virtual AsyncDuplexStreamingCall HalfDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return HalfDuplexCall(new CallOptions(headers, deadline, cancellationToken)); } + /// + /// 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. + /// public virtual AsyncDuplexStreamingCall HalfDuplexCall(CallOptions options) { return CallInvoker.AsyncDuplexStreamingCall(__Method_HalfDuplexCall, null, options); @@ -227,13 +438,13 @@ namespace Grpc.Testing { } } - // creates a new client + /// Creates a new client for TestService public static TestServiceClient NewClient(Channel channel) { return new TestServiceClient(channel); } - // creates service definition that can be registered with a server + /// Creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(ITestService serviceImpl) #pragma warning restore 0618 @@ -247,7 +458,7 @@ namespace Grpc.Testing { .AddMethod(__Method_HalfDuplexCall, serviceImpl.HalfDuplexCall).Build(); } - // creates service definition that can be registered with a server + /// Creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(TestServiceBase serviceImpl) #pragma warning restore 0618 @@ -262,6 +473,10 @@ namespace Grpc.Testing { } } + /// + /// A simple service NOT implemented at servers so clients can test for + /// that case. + /// public static class UnimplementedService { static readonly string __ServiceName = "grpc.testing.UnimplementedService"; @@ -275,32 +490,50 @@ namespace Grpc.Testing { __Marshaller_Empty, __Marshaller_Empty); - // service descriptor + /// Service descriptor public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor { get { return global::Grpc.Testing.TestReflection.Descriptor.Services[1]; } } - // client interface + /// Client for UnimplementedService [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")] public interface IUnimplementedServiceClient { + /// + /// A call that no server should implement + /// global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// A call that no server should implement + /// global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, CallOptions options); + /// + /// A call that no server should implement + /// AsyncUnaryCall UnimplementedCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// A call that no server should implement + /// AsyncUnaryCall UnimplementedCallAsync(global::Grpc.Testing.Empty request, CallOptions options); } - // server-side interface + /// Interface of server-side implementations of UnimplementedService [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")] public interface IUnimplementedService { + /// + /// A call that no server should implement + /// Task UnimplementedCall(global::Grpc.Testing.Empty request, ServerCallContext context); } - // server-side abstract class + /// Base class for server-side implementations of UnimplementedService public abstract class UnimplementedServiceBase { + /// + /// A call that no server should implement + /// public virtual Task UnimplementedCall(global::Grpc.Testing.Empty request, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); @@ -308,7 +541,7 @@ namespace Grpc.Testing { } - // client stub + /// Client for UnimplementedService #pragma warning disable 0618 public class UnimplementedServiceClient : ClientBase, IUnimplementedServiceClient #pragma warning restore 0618 @@ -328,18 +561,30 @@ namespace Grpc.Testing { { } + /// + /// A call that no server should implement + /// public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return UnimplementedCall(request, new CallOptions(headers, deadline, cancellationToken)); } + /// + /// A call that no server should implement + /// public virtual global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_UnimplementedCall, null, options, request); } + /// + /// A call that no server should implement + /// public virtual AsyncUnaryCall UnimplementedCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return UnimplementedCallAsync(request, new CallOptions(headers, deadline, cancellationToken)); } + /// + /// A call that no server should implement + /// public virtual AsyncUnaryCall UnimplementedCallAsync(global::Grpc.Testing.Empty request, CallOptions options) { return CallInvoker.AsyncUnaryCall(__Method_UnimplementedCall, null, options, request); @@ -350,13 +595,13 @@ namespace Grpc.Testing { } } - // creates a new client + /// Creates a new client for UnimplementedService public static UnimplementedServiceClient NewClient(Channel channel) { return new UnimplementedServiceClient(channel); } - // creates service definition that can be registered with a server + /// Creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(IUnimplementedService serviceImpl) #pragma warning restore 0618 @@ -365,7 +610,7 @@ namespace Grpc.Testing { .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build(); } - // creates service definition that can be registered with a server + /// Creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(UnimplementedServiceBase serviceImpl) #pragma warning restore 0618 @@ -375,6 +620,9 @@ namespace Grpc.Testing { } } + /// + /// A service used to control reconnect server. + /// public static class ReconnectService { static readonly string __ServiceName = "grpc.testing.ReconnectService"; @@ -397,13 +645,13 @@ namespace Grpc.Testing { __Marshaller_Empty, __Marshaller_ReconnectInfo); - // service descriptor + /// Service descriptor public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor { get { return global::Grpc.Testing.TestReflection.Descriptor.Services[2]; } } - // client interface + /// Client for ReconnectService [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")] public interface IReconnectServiceClient { @@ -417,7 +665,7 @@ namespace Grpc.Testing { AsyncUnaryCall StopAsync(global::Grpc.Testing.Empty request, CallOptions options); } - // server-side interface + /// Interface of server-side implementations of ReconnectService [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")] public interface IReconnectService { @@ -425,7 +673,7 @@ namespace Grpc.Testing { Task Stop(global::Grpc.Testing.Empty request, ServerCallContext context); } - // server-side abstract class + /// Base class for server-side implementations of ReconnectService public abstract class ReconnectServiceBase { public virtual Task Start(global::Grpc.Testing.ReconnectParams request, ServerCallContext context) @@ -440,7 +688,7 @@ namespace Grpc.Testing { } - // client stub + /// Client for ReconnectService #pragma warning disable 0618 public class ReconnectServiceClient : ClientBase, IReconnectServiceClient #pragma warning restore 0618 @@ -498,13 +746,13 @@ namespace Grpc.Testing { } } - // creates a new client + /// Creates a new client for ReconnectService public static ReconnectServiceClient NewClient(Channel channel) { return new ReconnectServiceClient(channel); } - // creates service definition that can be registered with a server + /// Creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(IReconnectService serviceImpl) #pragma warning restore 0618 @@ -514,7 +762,7 @@ namespace Grpc.Testing { .AddMethod(__Method_Stop, serviceImpl.Stop).Build(); } - // creates service definition that can be registered with a server + /// Creates service definition that can be registered with a server #pragma warning disable 0618 public static ServerServiceDefinition BindService(ReconnectServiceBase serviceImpl) #pragma warning restore 0618 From 0c6070f68d5dbac069fd19e1ddc394c2ea3c4775 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 28 Apr 2016 11:26:34 -0700 Subject: [PATCH 0132/1894] Mark stream as cancelled if we exceed the metadata size limit. Also take this opportunity to convert the seen_error field to a bool. --- .../chttp2/transport/chttp2_transport.c | 31 ++++++++++++++----- .../ext/transport/chttp2/transport/internal.h | 6 ++-- .../ext/transport/chttp2/transport/parsing.c | 14 ++++++--- test/core/end2end/tests/large_metadata.c | 8 ++--- 4 files changed, 40 insertions(+), 19 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index c24950a1890..b73ec2a7e9d 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -858,7 +858,7 @@ static void perform_stream_op_locked( add_closure_barrier(on_complete); stream_global->send_initial_metadata = op->send_initial_metadata; if (contains_non_ok_status(transport_global, op->send_initial_metadata)) { - stream_global->seen_error = 1; + stream_global->seen_error = true; grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); } if (!stream_global->write_closed) { @@ -899,7 +899,7 @@ static void perform_stream_op_locked( add_closure_barrier(on_complete); stream_global->send_trailing_metadata = op->send_trailing_metadata; if (contains_non_ok_status(transport_global, op->send_trailing_metadata)) { - stream_global->seen_error = 1; + stream_global->seen_error = true; grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); } if (stream_global->write_closed) { @@ -1076,6 +1076,16 @@ static void check_read_ops(grpc_exec_ctx *exec_ctx, grpc_chttp2_list_pop_check_read_ops(transport_global, &stream_global)) { if (stream_global->recv_initial_metadata_ready != NULL && stream_global->published_initial_metadata) { + if (stream_global->seen_error) { + while ((bs = grpc_chttp2_incoming_frame_queue_pop( + &stream_global->incoming_frames)) != NULL) { + grpc_byte_stream_destroy(exec_ctx, bs); + } + if (stream_global->exceeded_metadata_size) { + cancel_from_api(exec_ctx, transport_global, stream_global, + GRPC_STATUS_RESOURCE_EXHAUSTED); + } + } grpc_chttp2_incoming_metadata_buffer_publish( &stream_global->received_initial_metadata, stream_global->recv_initial_metadata); @@ -1105,10 +1115,15 @@ static void check_read_ops(grpc_exec_ctx *exec_ctx, } if (stream_global->recv_trailing_metadata_finished != NULL && stream_global->read_closed && stream_global->write_closed) { - while (stream_global->seen_error && - (bs = grpc_chttp2_incoming_frame_queue_pop( - &stream_global->incoming_frames)) != NULL) { - grpc_byte_stream_destroy(exec_ctx, bs); + if (stream_global->seen_error) { + while ((bs = grpc_chttp2_incoming_frame_queue_pop( + &stream_global->incoming_frames)) != NULL) { + grpc_byte_stream_destroy(exec_ctx, bs); + } + if (stream_global->exceeded_metadata_size) { + cancel_from_api(exec_ctx, transport_global, stream_global, + GRPC_STATUS_RESOURCE_EXHAUSTED); + } } if (stream_global->incoming_frames.head == NULL) { grpc_chttp2_incoming_metadata_buffer_publish( @@ -1175,7 +1190,7 @@ static void cancel_from_api(grpc_exec_ctx *exec_ctx, NULL); } if (status != GRPC_STATUS_OK && !stream_global->seen_error) { - stream_global->seen_error = 1; + stream_global->seen_error = true; grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); } grpc_chttp2_mark_stream_closed(exec_ctx, transport_global, stream_global, 1, @@ -1187,7 +1202,7 @@ void grpc_chttp2_fake_status(grpc_exec_ctx *exec_ctx, grpc_chttp2_stream_global *stream_global, grpc_status_code status, gpr_slice *slice) { if (status != GRPC_STATUS_OK) { - stream_global->seen_error = 1; + stream_global->seen_error = true; grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); } /* stream_global->recv_trailing_metadata_finished gives us a diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index d547a6e9c11..be38ffda1ff 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -410,7 +410,8 @@ typedef struct { uint8_t in_stream_map; /** has this stream seen an error? if 1, then pending incoming frames can be thrown away */ - uint8_t seen_error; + bool seen_error; + bool exceeded_metadata_size; uint8_t published_initial_metadata; uint8_t published_trailing_metadata; @@ -457,7 +458,8 @@ struct grpc_chttp2_stream_parsing { /** which metadata did we get (on this parse) */ uint8_t got_metadata_on_parse[2]; /** should we raise the seen_error flag in transport_global */ - uint8_t seen_error; + bool seen_error; + bool exceeded_metadata_size; /** window available for peer to send to us */ int64_t incoming_window; /** parsing state for data frames */ diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index 0cf4d87f3c0..11cbb80ca88 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -167,7 +167,9 @@ void grpc_chttp2_publish_reads( while (grpc_chttp2_list_pop_parsing_seen_stream( transport_global, transport_parsing, &stream_global, &stream_parsing)) { if (stream_parsing->seen_error) { - stream_global->seen_error = 1; + stream_global->seen_error = true; + stream_global->exceeded_metadata_size = + stream_parsing->exceeded_metadata_size; grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); } @@ -603,7 +605,7 @@ static void on_initial_header(void *tp, grpc_mdelem *md) { if (md->key == GRPC_MDSTR_GRPC_STATUS && md != GRPC_MDELEM_GRPC_STATUS_0) { /* TODO(ctiller): check for a status like " 0" */ - stream_parsing->seen_error = 1; + stream_parsing->seen_error = true; } if (md->key == GRPC_MDSTR_GRPC_TIMEOUT) { @@ -627,7 +629,8 @@ static void on_initial_header(void *tp, grpc_mdelem *md) { const size_t new_size = stream_parsing->metadata_buffer[0].size + GRPC_MDELEM_LENGTH(md); if (new_size > transport_parsing->max_metadata_size) { - stream_parsing->seen_error = 1; + stream_parsing->seen_error = true; + stream_parsing->exceeded_metadata_size = true; GRPC_MDELEM_UNREF(md); } else { grpc_chttp2_incoming_metadata_buffer_add( @@ -656,13 +659,14 @@ static void on_trailing_header(void *tp, grpc_mdelem *md) { if (md->key == GRPC_MDSTR_GRPC_STATUS && md != GRPC_MDELEM_GRPC_STATUS_0) { /* TODO(ctiller): check for a status like " 0" */ - stream_parsing->seen_error = 1; + stream_parsing->seen_error = true; } const size_t new_size = stream_parsing->metadata_buffer[1].size + GRPC_MDELEM_LENGTH(md); if (new_size > transport_parsing->max_metadata_size) { - stream_parsing->seen_error = 1; + stream_parsing->seen_error = true; + stream_parsing->exceeded_metadata_size = true; GRPC_MDELEM_UNREF(md); } else { grpc_chttp2_incoming_metadata_buffer_add( diff --git a/test/core/end2end/tests/large_metadata.c b/test/core/end2end/tests/large_metadata.c index f09b55a2c0c..2aa6381e9e2 100644 --- a/test/core/end2end/tests/large_metadata.c +++ b/test/core/end2end/tests/large_metadata.c @@ -199,7 +199,7 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config, error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL); GPR_ASSERT(GRPC_CALL_OK == error); - cq_expect_completion(cqv, tag(102), 1); + cq_expect_completion(cqv, tag(102), allow_large_metadata); cq_verify(cqv); op = ops; @@ -222,13 +222,13 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config, cq_expect_completion(cqv, tag(1), 1); cq_verify(cqv); -// FIXME: why is this assert passing with allow_large_metadata=false? - GPR_ASSERT(status == GRPC_STATUS_OK); - GPR_ASSERT(0 == strcmp(details, "xyz")); + GPR_ASSERT(status == (allow_large_metadata ? GRPC_STATUS_OK + : GRPC_STATUS_RESOURCE_EXHAUSTED)); GPR_ASSERT(0 == strcmp(call_details.method, "/foo")); GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr")); GPR_ASSERT(was_cancelled == 0); if (allow_large_metadata) { + GPR_ASSERT(0 == strcmp(details, "xyz")); GPR_ASSERT(byte_buffer_eq_string(request_payload_recv, "hello world")); GPR_ASSERT(contains_metadata(&request_metadata_recv, "key", meta.value)); } else { From 9e3538c57df9855ff2f5c6384a00b740c2bec49a Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 28 Apr 2016 13:27:19 -0700 Subject: [PATCH 0133/1894] Load default roots.pem in Ruby via grpc_set_ssl_roots_override_callback --- src/ruby/ext/grpc/rb_channel_credentials.c | 28 ++++++++++++++++++++++ src/ruby/lib/grpc.rb | 11 ++++++--- 2 files changed, 36 insertions(+), 3 deletions(-) diff --git a/src/ruby/ext/grpc/rb_channel_credentials.c b/src/ruby/ext/grpc/rb_channel_credentials.c index 10391bc9635..4c01859db7e 100644 --- a/src/ruby/ext/grpc/rb_channel_credentials.c +++ b/src/ruby/ext/grpc/rb_channel_credentials.c @@ -31,6 +31,8 @@ * */ +#include + #include #include "rb_grpc_imports.generated.h" #include "rb_channel_credentials.h" @@ -39,6 +41,7 @@ #include #include +#include #include #include "rb_call_credentials.h" @@ -48,6 +51,8 @@ grpc_channel_credentials. */ static VALUE grpc_rb_cChannelCredentials = Qnil; +static char *pem_root_certs = NULL; + /* grpc_rb_channel_credentials wraps a grpc_channel_credentials. It provides a * mark object that is used to hold references to any objects used to create * the credentials. */ @@ -236,6 +241,24 @@ static VALUE grpc_rb_channel_credentials_compose(int argc, VALUE *argv, return grpc_rb_wrap_channel_credentials(creds, mark); } +static grpc_ssl_roots_override_result get_ssl_roots_override( + char **pem_root_certs_ptr) { + *pem_root_certs_ptr = pem_root_certs; + if (pem_root_certs == NULL) { + return GRPC_SSL_ROOTS_OVERRIDE_FAIL; + } else { + return GRPC_SSL_ROOTS_OVERRIDE_OK; + } +} + +static VALUE grpc_rb_set_default_roots_pem(VALUE self, VALUE roots) { + char *roots_ptr = StringValueCStr(roots); + size_t length = strlen(roots_ptr); + pem_root_certs = gpr_malloc((length + 1) * sizeof(char)); + memcpy(pem_root_certs, roots_ptr, length + 1); + return Qnil; +} + void Init_grpc_channel_credentials() { grpc_rb_cChannelCredentials = rb_define_class_under(grpc_rb_mGrpcCore, "ChannelCredentials", rb_cObject); @@ -251,6 +274,11 @@ void Init_grpc_channel_credentials() { grpc_rb_channel_credentials_init_copy, 1); rb_define_method(grpc_rb_cChannelCredentials, "compose", grpc_rb_channel_credentials_compose, -1); + rb_define_module_function(grpc_rb_cChannelCredentials, + "set_default_roots_pem", + grpc_rb_set_default_roots_pem, 1); + + grpc_set_ssl_roots_override_callback(get_ssl_roots_override); id_pem_cert_chain = rb_intern("__pem_cert_chain"); id_pem_private_key = rb_intern("__pem_private_key"); diff --git a/src/ruby/lib/grpc.rb b/src/ruby/lib/grpc.rb index a56c49ff59e..79fa705b1c9 100644 --- a/src/ruby/lib/grpc.rb +++ b/src/ruby/lib/grpc.rb @@ -28,9 +28,6 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ssl_roots_path = File.expand_path('../../../../etc/roots.pem', __FILE__) -unless ENV['GRPC_DEFAULT_SSL_ROOTS_FILE_PATH'] - ENV['GRPC_DEFAULT_SSL_ROOTS_FILE_PATH'] = ssl_roots_path -end require_relative 'grpc/errors' require_relative 'grpc/grpc' @@ -42,3 +39,11 @@ require_relative 'grpc/generic/active_call' require_relative 'grpc/generic/client_stub' require_relative 'grpc/generic/service' require_relative 'grpc/generic/rpc_server' + +begin + file = File.open(ssl_roots_path) + roots = file.read + GRPC::Core::ChannelCredentials.set_default_roots_pem roots +ensure + file.close +end From 27f59afecb04b63b7c83a842d400efb1ad09049a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 28 Apr 2016 14:19:48 -0700 Subject: [PATCH 0134/1894] Unifying error handling within core --- BUILD | 6 + Makefile | 2 + binding.gyp | 1 + build.yaml | 2 + config.m4 | 1 + gRPC.podspec | 3 + grpc.gemspec | 2 + package.xml | 2 + src/core/lib/iomgr/closure.c | 26 +- src/core/lib/iomgr/closure.h | 21 +- src/core/lib/iomgr/error.c | 346 ++++++++++++++++++ src/core/lib/iomgr/error.h | 69 ++++ src/core/lib/iomgr/ev_poll_and_epoll_posix.c | 26 +- src/core/lib/iomgr/exec_ctx.c | 15 +- src/core/lib/iomgr/exec_ctx.h | 6 +- src/core/lib/iomgr/executor.c | 4 +- src/core/lib/iomgr/executor.h | 2 +- src/core/lib/iomgr/resolve_address_posix.c | 2 +- .../lib/iomgr/socket_utils_common_posix.c | 118 +++--- src/core/lib/iomgr/socket_utils_posix.h | 22 +- src/core/lib/iomgr/tcp_client_posix.c | 53 +-- src/core/lib/iomgr/tcp_posix.c | 32 +- src/python/grpcio/grpc_core_dependencies.py | 1 + tools/doxygen/Doxyfile.core.internal | 2 + tools/run_tests/sources_and_headers.json | 3 + vsprojects/vcxproj/grpc/grpc.vcxproj | 3 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 6 + .../grpc_unsecure/grpc_unsecure.vcxproj | 3 + .../grpc_unsecure.vcxproj.filters | 6 + 29 files changed, 648 insertions(+), 137 deletions(-) create mode 100644 src/core/lib/iomgr/error.c create mode 100644 src/core/lib/iomgr/error.h diff --git a/BUILD b/BUILD index f8e7661ad46..ea4bab757c3 100644 --- a/BUILD +++ b/BUILD @@ -176,6 +176,7 @@ cc_library( "src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/endpoint.h", "src/core/lib/iomgr/endpoint_pair.h", + "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -309,6 +310,7 @@ cc_library( "src/core/lib/iomgr/endpoint.c", "src/core/lib/iomgr/endpoint_pair_posix.c", "src/core/lib/iomgr/endpoint_pair_windows.c", + "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -521,6 +523,7 @@ cc_library( "src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/endpoint.h", "src/core/lib/iomgr/endpoint_pair.h", + "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -641,6 +644,7 @@ cc_library( "src/core/lib/iomgr/endpoint.c", "src/core/lib/iomgr/endpoint_pair_posix.c", "src/core/lib/iomgr/endpoint_pair_windows.c", + "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -1321,6 +1325,7 @@ objc_library( "src/core/lib/iomgr/endpoint.c", "src/core/lib/iomgr/endpoint_pair_posix.c", "src/core/lib/iomgr/endpoint_pair_windows.c", + "src/core/lib/iomgr/error.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -1512,6 +1517,7 @@ objc_library( "src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/endpoint.h", "src/core/lib/iomgr/endpoint_pair.h", + "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", diff --git a/Makefile b/Makefile index 386c4a79b34..380f684ef16 100644 --- a/Makefile +++ b/Makefile @@ -2471,6 +2471,7 @@ LIBGRPC_SRC = \ src/core/lib/iomgr/endpoint.c \ src/core/lib/iomgr/endpoint_pair_posix.c \ src/core/lib/iomgr/endpoint_pair_windows.c \ + src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ @@ -2812,6 +2813,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/iomgr/endpoint.c \ src/core/lib/iomgr/endpoint_pair_posix.c \ src/core/lib/iomgr/endpoint_pair_windows.c \ + src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ diff --git a/binding.gyp b/binding.gyp index 058743edbf8..21a23d60df4 100644 --- a/binding.gyp +++ b/binding.gyp @@ -579,6 +579,7 @@ 'src/core/lib/iomgr/endpoint.c', 'src/core/lib/iomgr/endpoint_pair_posix.c', 'src/core/lib/iomgr/endpoint_pair_windows.c', + 'src/core/lib/iomgr/error.c', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.c', 'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/exec_ctx.c', diff --git a/build.yaml b/build.yaml index 7248753bca7..444cc8885b2 100644 --- a/build.yaml +++ b/build.yaml @@ -163,6 +163,7 @@ filegroups: - src/core/lib/iomgr/closure.h - src/core/lib/iomgr/endpoint.h - src/core/lib/iomgr/endpoint_pair.h + - src/core/lib/iomgr/error.h - src/core/lib/iomgr/ev_poll_and_epoll_posix.h - src/core/lib/iomgr/ev_posix.h - src/core/lib/iomgr/exec_ctx.h @@ -237,6 +238,7 @@ filegroups: - src/core/lib/iomgr/endpoint.c - src/core/lib/iomgr/endpoint_pair_posix.c - src/core/lib/iomgr/endpoint_pair_windows.c + - src/core/lib/iomgr/error.c - src/core/lib/iomgr/ev_poll_and_epoll_posix.c - src/core/lib/iomgr/ev_posix.c - src/core/lib/iomgr/exec_ctx.c diff --git a/config.m4 b/config.m4 index 2d930a648e1..8764ae97340 100644 --- a/config.m4 +++ b/config.m4 @@ -98,6 +98,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/iomgr/endpoint.c \ src/core/lib/iomgr/endpoint_pair_posix.c \ src/core/lib/iomgr/endpoint_pair_windows.c \ + src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ diff --git a/gRPC.podspec b/gRPC.podspec index d66e03354bb..7becccebb4a 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -178,6 +178,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/closure.h', 'src/core/lib/iomgr/endpoint.h', 'src/core/lib/iomgr/endpoint_pair.h', + 'src/core/lib/iomgr/error.h', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.h', 'src/core/lib/iomgr/ev_posix.h', 'src/core/lib/iomgr/exec_ctx.h', @@ -343,6 +344,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/endpoint.c', 'src/core/lib/iomgr/endpoint_pair_posix.c', 'src/core/lib/iomgr/endpoint_pair_windows.c', + 'src/core/lib/iomgr/error.c', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.c', 'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/exec_ctx.c', @@ -520,6 +522,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/closure.h', 'src/core/lib/iomgr/endpoint.h', 'src/core/lib/iomgr/endpoint_pair.h', + 'src/core/lib/iomgr/error.h', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.h', 'src/core/lib/iomgr/ev_posix.h', 'src/core/lib/iomgr/exec_ctx.h', diff --git a/grpc.gemspec b/grpc.gemspec index f83b7d35872..d1db8e99a9f 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -190,6 +190,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/closure.h ) s.files += %w( src/core/lib/iomgr/endpoint.h ) s.files += %w( src/core/lib/iomgr/endpoint_pair.h ) + s.files += %w( src/core/lib/iomgr/error.h ) s.files += %w( src/core/lib/iomgr/ev_poll_and_epoll_posix.h ) s.files += %w( src/core/lib/iomgr/ev_posix.h ) s.files += %w( src/core/lib/iomgr/exec_ctx.h ) @@ -327,6 +328,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/endpoint.c ) s.files += %w( src/core/lib/iomgr/endpoint_pair_posix.c ) s.files += %w( src/core/lib/iomgr/endpoint_pair_windows.c ) + s.files += %w( src/core/lib/iomgr/error.c ) s.files += %w( src/core/lib/iomgr/ev_poll_and_epoll_posix.c ) s.files += %w( src/core/lib/iomgr/ev_posix.c ) s.files += %w( src/core/lib/iomgr/exec_ctx.c ) diff --git a/package.xml b/package.xml index d192ebde2cc..38bd84b7d5d 100644 --- a/package.xml +++ b/package.xml @@ -193,6 +193,7 @@ + @@ -330,6 +331,7 @@ + diff --git a/src/core/lib/iomgr/closure.c b/src/core/lib/iomgr/closure.c index 27793c32e42..8738c4a5ce3 100644 --- a/src/core/lib/iomgr/closure.c +++ b/src/core/lib/iomgr/closure.c @@ -39,25 +39,29 @@ void grpc_closure_init(grpc_closure *closure, grpc_iomgr_cb_func cb, void *cb_arg) { closure->cb = cb; closure->cb_arg = cb_arg; - closure->final_data = 0; } -void grpc_closure_list_add(grpc_closure_list *closure_list, - grpc_closure *closure, bool success) { +void grpc_closure_list_append(grpc_closure_list *closure_list, + grpc_closure *closure, grpc_error *error) { if (closure == NULL) return; - closure->final_data = (success != 0); + closure->final_data.error = error; + closure->next = NULL; if (closure_list->head == NULL) { closure_list->head = closure; } else { - closure_list->tail->final_data |= (uintptr_t)closure; + closure_list->tail->next = closure; } closure_list->tail = closure; } -void grpc_closure_list_fail_all(grpc_closure_list *list) { - for (grpc_closure *c = list->head; c != NULL; c = grpc_closure_next(c)) { - c->final_data &= ~(uintptr_t)1; +void grpc_closure_list_fail_all(grpc_closure_list *list, + grpc_error *forced_failure) { + for (grpc_closure *c = list->head; c != NULL; c = c->next) { + if (c->final_data.error == NULL) { + c->final_data.error = grpc_error_ref(forced_failure); + } } + grpc_error_unref(forced_failure); } bool grpc_closure_list_empty(grpc_closure_list closure_list) { @@ -71,7 +75,7 @@ void grpc_closure_list_move(grpc_closure_list *src, grpc_closure_list *dst) { if (dst->head == NULL) { *dst = *src; } else { - dst->tail->final_data |= (uintptr_t)src->head; + dst->tail->next = src->head; dst->tail = src->tail; } src->head = src->tail = NULL; @@ -98,7 +102,3 @@ grpc_closure *grpc_closure_create(grpc_iomgr_cb_func cb, void *cb_arg) { grpc_closure_init(&wc->wrapper, closure_wrapper, wc); return &wc->wrapper; } - -grpc_closure *grpc_closure_next(grpc_closure *closure) { - return (grpc_closure *)(closure->final_data & ~(uintptr_t)1); -} diff --git a/src/core/lib/iomgr/closure.h b/src/core/lib/iomgr/closure.h index fdc2daed9d4..8e76412ee02 100644 --- a/src/core/lib/iomgr/closure.h +++ b/src/core/lib/iomgr/closure.h @@ -36,6 +36,7 @@ #include #include +#include "src/core/lib/iomgr/error.h" struct grpc_closure; typedef struct grpc_closure grpc_closure; @@ -65,10 +66,12 @@ struct grpc_closure { /** Arguments to be passed to "cb". */ void *cb_arg; - /** Once enqueued, contains in the lower bit the success of the closure, - and in the upper bits the pointer to the next closure in the list. - Before enqueing for execution, this is usable for scratch data. */ - uintptr_t final_data; + union { + grpc_error *error; + uintptr_t scratch; + } final_data; + + grpc_closure *next; }; /** Initializes \a closure with \a cb and \a cb_arg. */ @@ -83,11 +86,12 @@ grpc_closure *grpc_closure_create(grpc_iomgr_cb_func cb, void *cb_arg); /** add \a closure to the end of \a list and set \a closure's success to \a * success */ -void grpc_closure_list_add(grpc_closure_list *list, grpc_closure *closure, - bool success); +void grpc_closure_list_append(grpc_closure_list *list, grpc_closure *closure, + grpc_error *error); /** force all success bits in \a list to false */ -void grpc_closure_list_fail_all(grpc_closure_list *list); +void grpc_closure_list_fail_all(grpc_closure_list *list, + grpc_error *forced_failure); /** append all closures from \a src to \a dst and empty \a src. */ void grpc_closure_list_move(grpc_closure_list *src, grpc_closure_list *dst); @@ -95,7 +99,4 @@ void grpc_closure_list_move(grpc_closure_list *src, grpc_closure_list *dst); /** return whether \a list is empty. */ bool grpc_closure_list_empty(grpc_closure_list list); -/** return the next pointer for a queued closure list */ -grpc_closure *grpc_closure_next(grpc_closure *closure); - #endif /* GRPC_CORE_LIB_IOMGR_CLOSURE_H */ diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c new file mode 100644 index 00000000000..7dff3ece350 --- /dev/null +++ b/src/core/lib/iomgr/error.c @@ -0,0 +1,346 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/iomgr/error.h" + +#include +#include + +#include +#include +#include +#include +#include + +static void destroy_integer(void *key) {} + +static void *copy_integer(void *key) { return key; } + +static long compare_integers(void *key1, void *key2) { + return GPR_ICMP((uintptr_t)key1, (uintptr_t)key2); +} + +static void destroy_string(void *str) { gpr_free(str); } + +static void *copy_string(void *str) { return gpr_strdup(str); } + +static void destroy_err(void *err) { grpc_error_unref(err); } + +static void *copy_err(void *err) { return grpc_error_ref(err); } + +static const gpr_avl_vtable avl_vtable_ints = {destroy_integer, copy_integer, + compare_integers, + destroy_integer, copy_integer}; + +static const gpr_avl_vtable avl_vtable_strs = {destroy_integer, copy_integer, + compare_integers, destroy_string, + copy_string}; + +static const gpr_avl_vtable avl_vtable_errs = { + destroy_integer, copy_integer, compare_integers, destroy_err, copy_err}; + +static const char *error_int_name(grpc_error_ints key) { + switch (key) { + case GRPC_ERROR_INT_STATUS_CODE: + return "status_code"; + case GRPC_ERROR_INT_ERRNO: + return "errno"; + } + GPR_UNREACHABLE_CODE(return "unknown"); +} + +static const char *error_str_name(grpc_error_strs key) { + switch (key) { + case GRPC_ERROR_STR_DESCRIPTION: + return "description"; + case GRPC_ERROR_STR_OS_ERROR: + return "os_error"; + case GRPC_ERROR_STR_TARGET_ADDRESS: + return "target_address"; + case GRPC_ERROR_STR_SYSCALL: + return "syscall"; + } + GPR_UNREACHABLE_CODE(return "unknown"); +} + +struct grpc_error { + gpr_refcount refs; + gpr_avl ints; + gpr_avl strs; + gpr_avl errs; + uintptr_t next_err; +}; + +static bool is_special(grpc_error *err) { + return err == GRPC_ERROR_NONE || err == GRPC_ERROR_OOM; +} + +grpc_error *grpc_error_ref(grpc_error *err) { + if (is_special(err)) return err; + gpr_ref(&err->refs); + return err; +} + +static void error_destroy(grpc_error *err) { + GPR_ASSERT(!is_special(err)); + gpr_avl_unref(err->ints); + gpr_avl_unref(err->strs); + gpr_avl_unref(err->errs); +} + +void grpc_error_unref(grpc_error *err) { + if (!is_special(err) && gpr_unref(&err->refs)) { + error_destroy(err); + } +} + +grpc_error *grpc_error_create(void) { + grpc_error *err = gpr_malloc(sizeof(*err)); + if (err == NULL) { // TODO(ctiller): make gpr_malloc return NULL + return GRPC_ERROR_OOM; + } + err->ints = gpr_avl_create(&avl_vtable_ints); + err->strs = gpr_avl_create(&avl_vtable_strs); + err->errs = gpr_avl_create(&avl_vtable_errs); + err->next_err = 0; + gpr_ref_init(&err->refs, 1); + return err; +} + +static grpc_error *copy_error_and_unref(grpc_error *in) { + if (is_special(in)) { + return grpc_error_create(); + } + grpc_error *out = gpr_malloc(sizeof(*out)); + out->ints = gpr_avl_ref(in->ints); + out->strs = gpr_avl_ref(in->strs); + out->errs = gpr_avl_ref(in->errs); + out->next_err = in->next_err; + gpr_ref_init(&out->refs, 1); + grpc_error_unref(in); + return out; +} + +grpc_error *grpc_error_set_int(grpc_error *src, grpc_error_ints which, + intptr_t value) { + grpc_error *new = copy_error_and_unref(src); + new->ints = gpr_avl_add(new->ints, (void *)(uintptr_t)which, (void *)value); + return new; +} + +grpc_error *grpc_error_set_str(grpc_error *src, grpc_error_strs which, + const char *value) { + grpc_error *new = copy_error_and_unref(src); + new->strs = gpr_avl_add(new->strs, (void *)(uintptr_t)which, (void *)value); + return new; +} + +grpc_error *grpc_error_add_child(grpc_error *src, grpc_error *child) { + grpc_error *new = copy_error_and_unref(src); + new->errs = gpr_avl_add(new->errs, (void *)(new->next_err++), child); + return new; +} + +static const char *no_error_string = "null"; +static const char *oom_error_string = "\"Out of memory\""; + +typedef struct { + char *key; + char *value; +} kv_pair; + +typedef struct { + kv_pair *kvs; + size_t num_kvs; + size_t cap_kvs; +} kv_pairs; + +static void append_kv(kv_pairs *kvs, char *key, char *value) { + if (kvs->num_kvs == kvs->cap_kvs) { + kvs->cap_kvs = GPR_MAX(3 * kvs->cap_kvs / 2, 4); + kvs->kvs = gpr_realloc(kvs->kvs, sizeof(*kvs->kvs) * kvs->cap_kvs); + } + kvs->kvs[kvs->num_kvs].key = key; + kvs->kvs[kvs->num_kvs].value = value; + kvs->num_kvs++; +} + +static void collect_kvs(gpr_avl_node *node, char *key(void *k), + char *fmt(void *v), kv_pairs *kvs) { + if (node == NULL) return; + append_kv(kvs, key(node->key), fmt(node->value)); + collect_kvs(node->left, key, fmt, kvs); + collect_kvs(node->right, key, fmt, kvs); +} + +static char *key_int(void *p) { + return gpr_strdup(error_int_name((grpc_error_ints)(uintptr_t)p)); +} + +static char *key_str(void *p) { + return gpr_strdup(error_str_name((grpc_error_strs)(uintptr_t)p)); +} + +static char *fmt_int(void *p) { + char *s; + gpr_asprintf(&s, "%lld", (intptr_t)p); + return s; +} + +static void append_chr(char c, char **s, size_t *sz, size_t *cap) { + if (*sz == *cap) { + *cap = GPR_MAX(8, 3 * *cap / 2); + *s = gpr_realloc(*s, *cap); + } + (*s)[(*sz)++] = c; +} + +static void append_str(const char *str, char **s, size_t *sz, size_t *cap) { + for (const char *c = str; *c; c++) { + append_chr(*c, s, sz, cap); + } +} + +static void append_esc_str(const char *str, char **s, size_t *sz, size_t *cap) { + static const char *hex = "0123456789abcdef"; + append_chr('"', s, sz, cap); + for (const uint8_t *c = (const uint8_t *)str; *c; c++) { + if (*c < 32 || *c >= 127) { + append_chr('\\', s, sz, cap); + switch (*c) { + case '\b': + append_chr('b', s, sz, cap); + break; + case '\f': + append_chr('f', s, sz, cap); + break; + case '\n': + append_chr('n', s, sz, cap); + break; + case '\r': + append_chr('r', s, sz, cap); + break; + case '\t': + append_chr('t', s, sz, cap); + break; + default: + append_chr('u', s, sz, cap); + append_chr('0', s, sz, cap); + append_chr('0', s, sz, cap); + append_chr(hex[*c >> 4], s, sz, cap); + append_chr(hex[*c & 0x0f], s, sz, cap); + break; + } + } else { + append_chr((char)*c, s, sz, cap); + } + } + append_chr('"', s, sz, cap); + append_chr(0, s, sz, cap); +} + +static char *fmt_str(void *p) { + char *s = NULL; + size_t sz = 0; + size_t cap = 0; + append_esc_str(p, &s, &sz, &cap); + return s; +} + +static void add_errs(gpr_avl_node *n, char **s, size_t *sz, size_t *cap) { + if (n == NULL) return; + add_errs(n->left, s, sz, cap); + const char *e = grpc_error_string(n->value); + append_str(e, s, sz, cap); + grpc_error_free_string(e); + add_errs(n->right, s, sz, cap); +} + +static char *errs_string(grpc_error *err) { + char *s = NULL; + size_t sz = 0; + size_t cap = 0; + append_chr('[', &s, &sz, &cap); + add_errs(err->errs.root, &s, &sz, &cap); + append_chr(']', &s, &sz, &cap); + return s; +} + +static int cmp_kvs(const void *a, const void *b) { + const kv_pair *ka = a; + const kv_pair *kb = b; + return strcmp(ka->key, kb->key); +} + +static const char *finish_kvs(kv_pairs *kvs) { + char *s = NULL; + size_t sz = 0; + size_t cap = 0; + + append_chr('{', &s, &sz, &cap); + for (size_t i = 0; i < kvs->num_kvs; i++) { + append_esc_str(kvs->kvs[i].key, &s, &sz, &cap); + gpr_free(kvs->kvs[i].key); + append_chr(':', &s, &sz, &cap); + append_str(kvs->kvs[i].value, &s, &sz, &cap); + gpr_free(kvs->kvs[i].value); + } + append_chr('}', &s, &sz, &cap); + + gpr_free(kvs->kvs); + return s; +} + +const char *grpc_error_string(grpc_error *err) { + if (err == GRPC_ERROR_NONE) return no_error_string; + if (err == GRPC_ERROR_OOM) return oom_error_string; + + kv_pairs kvs; + memset(&kvs, 0, sizeof(kvs)); + + collect_kvs(err->ints.root, key_int, fmt_int, &kvs); + collect_kvs(err->strs.root, key_str, fmt_str, &kvs); + append_kv(&kvs, gpr_strdup("referenced_errors"), errs_string(err)); + + qsort(kvs.kvs, kvs.num_kvs, sizeof(kv_pair), cmp_kvs); + + return finish_kvs(&kvs); +} + +grpc_error *grpc_os_error(int err, const char *call_name) { + return grpc_error_set_str( + grpc_error_set_str( + grpc_error_set_int(grpc_error_create(), GRPC_ERROR_INT_ERRNO, err), + GRPC_ERROR_STR_OS_ERROR, strerror(err)), + GRPC_ERROR_STR_SYSCALL, call_name); +} diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h new file mode 100644 index 00000000000..6909bf9da1a --- /dev/null +++ b/src/core/lib/iomgr/error.h @@ -0,0 +1,69 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_LIB_IOMGR_ERROR_H +#define GRPC_CORE_LIB_IOMGR_ERROR_H + +#include + +typedef struct grpc_error grpc_error; + +typedef enum { + GRPC_ERROR_INT_STATUS_CODE, + GRPC_ERROR_INT_ERRNO +} grpc_error_ints; + +typedef enum { + GRPC_ERROR_STR_DESCRIPTION, + GRPC_ERROR_STR_TARGET_ADDRESS, + GRPC_ERROR_STR_OS_ERROR, + GRPC_ERROR_STR_SYSCALL +} grpc_error_strs; + +#define GRPC_ERROR_NONE ((grpc_error *)NULL) +#define GRPC_ERROR_OOM ((grpc_error *)1) + +const char *grpc_error_string(grpc_error *error); +void grpc_error_free_string(const char *str); + +grpc_error *grpc_error_create(void); +grpc_error *grpc_error_ref(grpc_error *err); +void grpc_error_unref(grpc_error *err); +grpc_error *grpc_error_set_int(grpc_error *src, grpc_error_ints which, + intptr_t value); +grpc_error *grpc_error_set_str(grpc_error *src, grpc_error_strs which, + const char *value); +grpc_error *grpc_error_add_child(grpc_error *src, grpc_error *child); +grpc_error *grpc_os_error(int err, const char *call_name); + +#endif /* GRPC_CORE_LIB_IOMGR_ERROR_H */ diff --git a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c index 3c8127e1a8c..e6a9cecbda5 100644 --- a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c +++ b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c @@ -459,7 +459,7 @@ static void close_fd_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { } else { remove_fd_from_all_epoll_sets(fd->fd); } - grpc_exec_ctx_enqueue(exec_ctx, fd->on_done_closure, true, NULL); + grpc_exec_ctx_push(exec_ctx, fd->on_done_closure, GRPC_ERROR_NONE, NULL); } static int fd_wrapped_fd(grpc_fd *fd) { @@ -508,6 +508,15 @@ static void fd_ref(grpc_fd *fd) { ref_by(fd, 2); } static void fd_unref(grpc_fd *fd) { unref_by(fd, 2); } #endif +static grpc_error *fd_shutdown_error(bool shutdown) { + if (!shutdown) { + return GRPC_ERROR_NONE; + } else { + return grpc_error_set_str(grpc_error_create(), GRPC_ERROR_STR_DESCRIPTION, + "FD shutdown"); + } +} + static void notify_on_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st, grpc_closure *closure) { if (*st == CLOSURE_NOT_READY) { @@ -516,7 +525,8 @@ static void notify_on_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, } else if (*st == CLOSURE_READY) { /* already ready ==> queue the closure to run immediately */ *st = CLOSURE_NOT_READY; - grpc_exec_ctx_enqueue(exec_ctx, closure, !fd->shutdown, NULL); + grpc_exec_ctx_push(exec_ctx, closure, fd_shutdown_error(fd->shutdown), + NULL); maybe_wake_one_watcher_locked(fd); } else { /* upcallptr was set to a different closure. This is an error! */ @@ -539,7 +549,7 @@ static int set_ready_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, return 0; } else { /* waiting ==> queue closure */ - grpc_exec_ctx_enqueue(exec_ctx, *st, !fd->shutdown, NULL); + grpc_exec_ctx_push(exec_ctx, *st, fd_shutdown_error(fd->shutdown), NULL); *st = CLOSURE_NOT_READY; return 1; } @@ -864,7 +874,7 @@ static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset) { GPR_ASSERT(grpc_closure_list_empty(pollset->idle_jobs)); pollset->vtable->finish_shutdown(pollset); - grpc_exec_ctx_enqueue(exec_ctx, pollset->shutdown_done, true, NULL); + grpc_exec_ctx_push(exec_ctx, pollset->shutdown_done, GRPC_ERROR_NONE, NULL); } static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, @@ -1137,7 +1147,8 @@ static void basic_pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, up_args->promotion_closure.cb = basic_do_promote; up_args->promotion_closure.cb_arg = up_args; - grpc_closure_list_add(&pollset->idle_jobs, &up_args->promotion_closure, 1); + grpc_closure_list_append(&pollset->idle_jobs, &up_args->promotion_closure, + GRPC_ERROR_NONE); pollset_kick(pollset, GRPC_POLLSET_KICK_BROADCAST); exit: @@ -1573,7 +1584,8 @@ static void perform_delayed_add(grpc_exec_ctx *exec_ctx, void *arg, /* We don't care about this pollset anymore. */ if (da->pollset->in_flight_cbs == 0 && !da->pollset->called_shutdown) { da->pollset->called_shutdown = 1; - grpc_exec_ctx_enqueue(exec_ctx, da->pollset->shutdown_done, true, NULL); + grpc_exec_ctx_push(exec_ctx, da->pollset->shutdown_done, GRPC_ERROR_NONE, + NULL); } } gpr_mu_unlock(&da->pollset->mu); @@ -1597,7 +1609,7 @@ static void multipoll_with_epoll_pollset_add_fd(grpc_exec_ctx *exec_ctx, GRPC_FD_REF(fd, "delayed_add"); grpc_closure_init(&da->closure, perform_delayed_add, da); pollset->in_flight_cbs++; - grpc_exec_ctx_enqueue(exec_ctx, &da->closure, true, NULL); + grpc_exec_ctx_push(exec_ctx, &da->closure, GRPC_ERROR_NONE, NULL); } } diff --git a/src/core/lib/iomgr/exec_ctx.c b/src/core/lib/iomgr/exec_ctx.c index 2146c7dd1f7..11114621323 100644 --- a/src/core/lib/iomgr/exec_ctx.c +++ b/src/core/lib/iomgr/exec_ctx.c @@ -47,11 +47,12 @@ bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { grpc_closure *c = exec_ctx->closure_list.head; exec_ctx->closure_list.head = exec_ctx->closure_list.tail = NULL; while (c != NULL) { - bool success = (bool)(c->final_data & 1); - grpc_closure *next = (grpc_closure *)(c->final_data & ~(uintptr_t)1); + grpc_closure *next = c->next; + grpc_error *error = c->final_data.error; did_something = true; GPR_TIMER_BEGIN("grpc_exec_ctx_flush.cb", 0); - c->cb(exec_ctx, c->cb_arg, success); + c->cb(exec_ctx, c->cb_arg, error); + grpc_error_unref(error); GPR_TIMER_END("grpc_exec_ctx_flush.cb", 0); c = next; } @@ -64,11 +65,11 @@ void grpc_exec_ctx_finish(grpc_exec_ctx *exec_ctx) { grpc_exec_ctx_flush(exec_ctx); } -void grpc_exec_ctx_enqueue(grpc_exec_ctx *exec_ctx, grpc_closure *closure, - bool success, - grpc_workqueue *offload_target_or_null) { +void grpc_exec_ctx_push(grpc_exec_ctx *exec_ctx, grpc_closure *closure, + grpc_error *error, + grpc_workqueue *offload_target_or_null) { GPR_ASSERT(offload_target_or_null == NULL); - grpc_closure_list_add(&exec_ctx->closure_list, closure, success); + grpc_closure_list_append(&exec_ctx->closure_list, closure, error); } void grpc_exec_ctx_enqueue_list(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h index 976cc403475..a0dd1e5017e 100644 --- a/src/core/lib/iomgr/exec_ctx.h +++ b/src/core/lib/iomgr/exec_ctx.h @@ -83,9 +83,9 @@ bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx); * the instance is destroyed, or work may be lost. */ void grpc_exec_ctx_finish(grpc_exec_ctx *exec_ctx); /** Add a closure to be executed at the next flush/finish point */ -void grpc_exec_ctx_enqueue(grpc_exec_ctx *exec_ctx, grpc_closure *closure, - bool success, - grpc_workqueue *offload_target_or_null); +void grpc_exec_ctx_push(grpc_exec_ctx *exec_ctx, grpc_closure *closure, + grpc_error *error, + grpc_workqueue *offload_target_or_null); /** Add a list of closures to be executed at the next flush/finish point. * Leaves \a list empty. */ void grpc_exec_ctx_enqueue_list(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/iomgr/executor.c b/src/core/lib/iomgr/executor.c index 36e22e4271b..8d7535d6fe5 100644 --- a/src/core/lib/iomgr/executor.c +++ b/src/core/lib/iomgr/executor.c @@ -112,10 +112,10 @@ static void maybe_spawn_locked() { g_executor.pending_join = 1; } -void grpc_executor_enqueue(grpc_closure *closure, bool success) { +void grpc_executor_push(grpc_closure *closure, grpc_error *error) { gpr_mu_lock(&g_executor.mu); if (g_executor.shutting_down == 0) { - grpc_closure_list_add(&g_executor.closures, closure, success); + grpc_closure_list_append(&g_executor.closures, closure, error); maybe_spawn_locked(); } gpr_mu_unlock(&g_executor.mu); diff --git a/src/core/lib/iomgr/executor.h b/src/core/lib/iomgr/executor.h index b7e6f51aa50..da9dcd07d02 100644 --- a/src/core/lib/iomgr/executor.h +++ b/src/core/lib/iomgr/executor.h @@ -45,7 +45,7 @@ void grpc_executor_init(); /** Enqueue \a closure for its eventual execution of \a f(arg) on a separate * thread */ -void grpc_executor_enqueue(grpc_closure *closure, bool success); +void grpc_executor_push(grpc_closure *closure, grpc_error *error); /** Shutdown the executor, running all pending work as part of the call */ void grpc_executor_shutdown(); diff --git a/src/core/lib/iomgr/resolve_address_posix.c b/src/core/lib/iomgr/resolve_address_posix.c index cae91eec209..7c137c5d6ca 100644 --- a/src/core/lib/iomgr/resolve_address_posix.c +++ b/src/core/lib/iomgr/resolve_address_posix.c @@ -173,7 +173,7 @@ static void resolve_address_impl(grpc_exec_ctx *exec_ctx, const char *name, r->default_port = gpr_strdup(default_port); r->cb = cb; r->arg = arg; - grpc_executor_enqueue(&r->request_closure, 1); + grpc_executor_push(&r->request_closure, GRPC_ERROR_NONE); } void (*grpc_resolve_address)(grpc_exec_ctx *exec_ctx, const char *name, diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index fa83ceef301..8b49d91dd9c 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -57,10 +57,10 @@ #include "src/core/lib/support/string.h" /* set a socket to non blocking mode */ -int grpc_set_socket_nonblocking(int fd, int non_blocking) { +grpc_error *grpc_set_socket_nonblocking(int fd, int non_blocking) { int oldflags = fcntl(fd, F_GETFL, 0); if (oldflags < 0) { - return 0; + return grpc_os_error(errno, "fcntl"); } if (non_blocking) { @@ -70,52 +70,58 @@ int grpc_set_socket_nonblocking(int fd, int non_blocking) { } if (fcntl(fd, F_SETFL, oldflags) != 0) { - return 0; + return grpc_os_error(errno, "fcntl"); } - return 1; + return GRPC_ERROR_NONE; } -int grpc_set_socket_no_sigpipe_if_possible(int fd) { +grpc_error *grpc_set_socket_no_sigpipe_if_possible(int fd) { #ifdef GPR_HAVE_SO_NOSIGPIPE int val = 1; int newval; socklen_t intlen = sizeof(newval); - return 0 == setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &val, sizeof(val)) && - 0 == getsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &newval, &intlen) && - (newval != 0) == val; -#else - return 1; + if (0 != setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &val, sizeof(val))) { + return grpc_os_error(errno, "setsockopt(SO_NOSIGPIPE)"); + } + if (0 == getsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &newval, &intlen)) { + return grpc_os_error(errno, "getsockopt(SO_NOSIGPIPE)"); + } + if ((newval != 0) == val) { + return grpc_error_set_str(grpc_error_create(), GRPC_ERROR_STR_grpc_os_error, + "Failed to set SO_NOSIGPIPE"); + } #endif + return GRPC_ERROR_NONE; } -int grpc_set_socket_ip_pktinfo_if_possible(int fd) { +grpc_error *grpc_set_socket_ip_pktinfo_if_possible(int fd) { #ifdef GPR_HAVE_IP_PKTINFO int get_local_ip = 1; - return 0 == setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &get_local_ip, - sizeof(get_local_ip)); -#else - (void)fd; - return 1; + if (0 != setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &get_local_ip, + sizeof(get_local_ip))) { + return grpc_os_error(errno, "setsockopt(IP_PKTINFO)"); + } #endif + return GRPC_ERROR_NONE; } -int grpc_set_socket_ipv6_recvpktinfo_if_possible(int fd) { +grpc_error *grpc_set_socket_ipv6_recvpktinfo_if_possible(int fd) { #ifdef GPR_HAVE_IPV6_RECVPKTINFO int get_local_ip = 1; - return 0 == setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &get_local_ip, - sizeof(get_local_ip)); -#else - (void)fd; - return 1; + if (0 != setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &get_local_ip, + sizeof(get_local_ip))) { + return grpc_os_error(errno, "setsockopt(IPV6_RECVPKTINFO)"); + } #endif + return GRPC_ERROR_NONE; } /* set a socket to close on exec */ -int grpc_set_socket_cloexec(int fd, int close_on_exec) { +grpc_error *grpc_set_socket_cloexec(int fd, int close_on_exec) { int oldflags = fcntl(fd, F_GETFD, 0); if (oldflags < 0) { - return 0; + return grpc_os_error(errno, "fcntl"); } if (close_on_exec) { @@ -125,30 +131,47 @@ int grpc_set_socket_cloexec(int fd, int close_on_exec) { } if (fcntl(fd, F_SETFD, oldflags) != 0) { - return 0; + return grpc_os_error(errno, "fcntl"); } - return 1; + return GRPC_ERROR_NONE; } /* set a socket to reuse old addresses */ -int grpc_set_socket_reuse_addr(int fd, int reuse) { +grpc_error *grpc_set_socket_reuse_addr(int fd, int reuse) { int val = (reuse != 0); int newval; socklen_t intlen = sizeof(newval); - return 0 == setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)) && - 0 == getsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &newval, &intlen) && - (newval != 0) == val; + if (0 != setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val))) { + return grpc_os_error(errno, "setsockopt(SO_REUSEADDR)"); + } + if (0 != getsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &newval, &intlen)) { + return grpc_os_error(errno, "getsockopt(SO_REUSEADDR)"); + } + if ((newval != 0) != val) { + return grpc_error_set_str(grpc_error_create(), GRPC_ERROR_STR_OS_ERROR, + "Failed to set SO_REUSEADDR"); + } + + return GRPC_ERROR_NONE; } /* disable nagle */ -int grpc_set_socket_low_latency(int fd, int low_latency) { +grpc_error *grpc_set_socket_low_latency(int fd, int low_latency) { int val = (low_latency != 0); int newval; socklen_t intlen = sizeof(newval); - return 0 == setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val)) && - 0 == getsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &newval, &intlen) && - (newval != 0) == val; + if (0 != setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val))) { + return grpc_os_error(errno, "setsockopt(TCP_NODELAY)"); + } + if (0 != getsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &newval, &intlen)) { + return grpc_os_error(errno, "getsockopt(TCP_NODELAY)"); + } + if ((newval != 0) != val) { + return grpc_error_set_str(grpc_error_create(), GRPC_ERROR_STR_OS_ERROR, + "Failed to set TCP_NODELAY"); + } + return GRPC_ERROR_NONE; } static gpr_once g_probe_ipv6_once = GPR_ONCE_INIT; @@ -196,35 +219,40 @@ static int set_socket_dualstack(int fd) { } } -int grpc_create_dualstack_socket(const struct sockaddr *addr, int type, - int protocol, grpc_dualstack_mode *dsmode) { +grpc_error *grpc_create_dualstack_socket(const struct sockaddr *addr, int type, + int protocol, + grpc_dualstack_mode *dsmode, + int *newfd) { int family = addr->sa_family; if (family == AF_INET6) { - int fd; if (grpc_ipv6_loopback_available()) { - fd = socket(family, type, protocol); + *newfd = socket(family, type, protocol); } else { - fd = -1; + *newfd = -1; errno = EAFNOSUPPORT; } /* Check if we've got a valid dualstack socket. */ - if (fd >= 0 && set_socket_dualstack(fd)) { + if (*newfd >= 0 && set_socket_dualstack(*newfd)) { *dsmode = GRPC_DSMODE_DUALSTACK; - return fd; + return GRPC_ERROR_NONE; } /* If this isn't an IPv4 address, then return whatever we've got. */ if (!grpc_sockaddr_is_v4mapped(addr, NULL)) { *dsmode = GRPC_DSMODE_IPV6; - return fd; + return GRPC_ERROR_NONE; } /* Fall back to AF_INET. */ - if (fd >= 0) { - close(fd); + if (*newfd >= 0) { + close(*newfd); } family = AF_INET; } *dsmode = family == AF_INET ? GRPC_DSMODE_IPV4 : GRPC_DSMODE_NONE; - return socket(family, type, protocol); + *newfd = socket(family, type, protocol); + if (*newfd == -1) { + return grpc_os_error(errno, "socket"); + } + return GRPC_ERROR_NONE; } #endif diff --git a/src/core/lib/iomgr/socket_utils_posix.h b/src/core/lib/iomgr/socket_utils_posix.h index a8f6e5e6586..4e66cbc0c58 100644 --- a/src/core/lib/iomgr/socket_utils_posix.h +++ b/src/core/lib/iomgr/socket_utils_posix.h @@ -37,21 +37,23 @@ #include #include +#include "src/core/lib/iomgr/error.h" + /* a wrapper for accept or accept4 */ int grpc_accept4(int sockfd, struct sockaddr *addr, socklen_t *addrlen, int nonblock, int cloexec); /* set a socket to non blocking mode */ -int grpc_set_socket_nonblocking(int fd, int non_blocking); +grpc_error *grpc_set_socket_nonblocking(int fd, int non_blocking); /* set a socket to close on exec */ -int grpc_set_socket_cloexec(int fd, int close_on_exec); +grpc_error *grpc_set_socket_cloexec(int fd, int close_on_exec); /* set a socket to reuse old addresses */ -int grpc_set_socket_reuse_addr(int fd, int reuse); +grpc_error *grpc_set_socket_reuse_addr(int fd, int reuse); /* disable nagle */ -int grpc_set_socket_low_latency(int fd, int low_latency); +grpc_error *grpc_set_socket_low_latency(int fd, int low_latency); /* Returns true if this system can create AF_INET6 sockets bound to ::1. The value is probed once, and cached for the life of the process. @@ -66,17 +68,17 @@ int grpc_ipv6_loopback_available(void); /* Tries to set SO_NOSIGPIPE if available on this platform. Returns 1 on success, 0 on failure. If SO_NO_SIGPIPE is not available, returns 1. */ -int grpc_set_socket_no_sigpipe_if_possible(int fd); +grpc_error *grpc_set_socket_no_sigpipe_if_possible(int fd); /* Tries to set IP_PKTINFO if available on this platform. Returns 1 on success, 0 on failure. If IP_PKTINFO is not available, returns 1. */ -int grpc_set_socket_ip_pktinfo_if_possible(int fd); +grpc_error *grpc_set_socket_ip_pktinfo_if_possible(int fd); /* Tries to set IPV6_RECVPKTINFO if available on this platform. Returns 1 on success, 0 on failure. If IPV6_RECVPKTINFO is not available, returns 1. */ -int grpc_set_socket_ipv6_recvpktinfo_if_possible(int fd); +grpc_error *grpc_set_socket_ipv6_recvpktinfo_if_possible(int fd); /* An enum to keep track of IPv4/IPv6 socket modes. @@ -117,7 +119,9 @@ extern int grpc_forbid_dualstack_sockets_for_testing; IPv4, so that bind() or connect() see the correct family. Also, it's important to distinguish between DUALSTACK and IPV6 when listening on the [::] wildcard address. */ -int grpc_create_dualstack_socket(const struct sockaddr *addr, int type, - int protocol, grpc_dualstack_mode *dsmode); +grpc_error *grpc_create_dualstack_socket(const struct sockaddr *addr, int type, + int protocol, + grpc_dualstack_mode *dsmode, + int *newfd); #endif /* GRPC_CORE_LIB_IOMGR_SOCKET_UTILS_POSIX_H */ diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index e93d5734a07..190512c17cc 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -71,7 +71,9 @@ typedef struct { grpc_closure *closure; } async_connect; -static int prepare_socket(const struct sockaddr *addr, int fd) { +static grpc_error *prepare_socket(const struct sockaddr *addr, int fd) { + grpc_error *err = GRPC_ERROR_NONE; + if (fd < 0) { goto error; } @@ -83,13 +85,14 @@ static int prepare_socket(const struct sockaddr *addr, int fd) { strerror(errno)); goto error; } - return 1; + goto done; error: if (fd >= 0) { close(fd); } - return 0; +done: + return err; } static void tc_on_alarm(grpc_exec_ctx *exec_ctx, void *acp, bool success) { @@ -121,6 +124,7 @@ static void on_writable(grpc_exec_ctx *exec_ctx, void *acp, bool success) { grpc_endpoint **ep = ac->ep; grpc_closure *closure = ac->closure; grpc_fd *fd; + grpc_error *error = GRPC_ERROR_NONE; if (grpc_tcp_trace) { gpr_log(GPR_DEBUG, "CLIENT_CONNECT: %s: on_writable: success=%d", @@ -143,8 +147,7 @@ static void on_writable(grpc_exec_ctx *exec_ctx, void *acp, bool success) { &so_error_size); } while (err < 0 && errno == EINTR); if (err < 0) { - gpr_log(GPR_ERROR, "failed to connect to '%s': getsockopt(ERROR): %s", - ac->addr_str, strerror(errno)); + error = grpc_os_error(errno, "getsockopt"); goto finish; } else if (so_error != 0) { if (so_error == ENOBUFS) { @@ -169,14 +172,12 @@ static void on_writable(grpc_exec_ctx *exec_ctx, void *acp, bool success) { } else { switch (so_error) { case ECONNREFUSED: - gpr_log( - GPR_ERROR, - "failed to connect to '%s': socket error: connection refused", - ac->addr_str); + error = grpc_error_set_int(error, GRPC_ERROR_INT_ERRNO, errno); + error = grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, + "Connection refused"); break; default: - gpr_log(GPR_ERROR, "failed to connect to '%s': socket error: %d", - ac->addr_str, so_error); + error = grpc_os_error(errno, "getsockopt(SO_ERROR)"); break; } goto finish; @@ -188,8 +189,8 @@ static void on_writable(grpc_exec_ctx *exec_ctx, void *acp, bool success) { goto finish; } } else { - gpr_log(GPR_ERROR, "failed to connect to '%s': timeout occurred", - ac->addr_str); + error = + grpc_error_set_str(error, GRPC_ERROR_STR_OS_ERROR, "Timeout occurred"); goto finish; } @@ -203,12 +204,18 @@ finish: } done = (--ac->refs == 0); gpr_mu_unlock(&ac->mu); + if (error != GRPC_ERROR_NONE) { + error = grpc_error_set_str(error, GRPC_ERROR_STR_DESCRIPTION, + "Failed to connect to remote host"); + error = + grpc_error_set_str(error, GRPC_ERROR_STR_TARGET_ADDRESS, ac->addr_str); + } if (done) { gpr_mu_destroy(&ac->mu); gpr_free(ac->addr_str); gpr_free(ac); } - grpc_exec_ctx_enqueue(exec_ctx, closure, *ep != NULL, NULL); + grpc_exec_ctx_push(exec_ctx, closure, error, NULL); } static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, @@ -225,6 +232,7 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, grpc_fd *fdobj; char *name; char *addr_str; + grpc_error *error; *ep = NULL; @@ -234,9 +242,10 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, addr_len = sizeof(addr6_v4mapped); } - fd = grpc_create_dualstack_socket(addr, SOCK_STREAM, 0, &dsmode); - if (fd < 0) { - gpr_log(GPR_ERROR, "Unable to create socket: %s", strerror(errno)); + error = grpc_create_dualstack_socket(addr, SOCK_STREAM, 0, &dsmode, &fd); + if (error != GRPC_ERROR_NONE) { + grpc_exec_ctx_push(exec_ctx, closure, error, NULL); + return; } if (dsmode == GRPC_DSMODE_IPV4) { /* If we got an AF_INET socket, map the address back to IPv4. */ @@ -244,8 +253,8 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, addr = (struct sockaddr *)&addr4_copy; addr_len = sizeof(addr4_copy); } - if (!prepare_socket(addr, fd)) { - grpc_exec_ctx_enqueue(exec_ctx, closure, false, NULL); + if ((error = prepare_socket(addr, fd)) != GRPC_ERROR_NONE) { + grpc_exec_ctx_push(exec_ctx, closure, error, NULL); return; } @@ -261,14 +270,14 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, if (err >= 0) { *ep = grpc_tcp_create(fdobj, GRPC_TCP_DEFAULT_READ_SLICE_SIZE, addr_str); - grpc_exec_ctx_enqueue(exec_ctx, closure, true, NULL); + grpc_exec_ctx_push(exec_ctx, closure, GRPC_ERROR_NONE, NULL); goto done; } if (errno != EWOULDBLOCK && errno != EINPROGRESS) { - gpr_log(GPR_ERROR, "connect error to '%s': %s", addr_str, strerror(errno)); grpc_fd_orphan(exec_ctx, fdobj, NULL, NULL, "tcp_client_connect_error"); - grpc_exec_ctx_enqueue(exec_ctx, closure, false, NULL); + grpc_exec_ctx_push(exec_ctx, closure, grpc_os_error(errno, "connect"), + NULL); goto done; } diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 7210aef5d5c..7624d77d8f7 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -274,14 +274,13 @@ static void tcp_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, tcp->finished_edge = 0; grpc_fd_notify_on_read(exec_ctx, tcp->em_fd, &tcp->read_closure); } else { - grpc_exec_ctx_enqueue(exec_ctx, &tcp->read_closure, true, NULL); + grpc_exec_ctx_push(exec_ctx, &tcp->read_closure, GRPC_ERROR_NONE, NULL); } } -typedef enum { FLUSH_DONE, FLUSH_PENDING, FLUSH_ERROR } flush_result; - +/* returns true if done, false if pending; if returning true, *error is set */ #define MAX_WRITE_IOVEC 16 -static flush_result tcp_flush(grpc_tcp *tcp) { +static bool tcp_flush(grpc_tcp *tcp, grpc_error **error) { struct msghdr msg; struct iovec iov[MAX_WRITE_IOVEC]; msg_iovlen_type iov_size; @@ -331,10 +330,10 @@ static flush_result tcp_flush(grpc_tcp *tcp) { if (errno == EAGAIN) { tcp->outgoing_slice_idx = unwind_slice_idx; tcp->outgoing_byte_idx = unwind_byte_idx; - return FLUSH_PENDING; + return false; } else { - /* TODO(klempner): Log some of these */ - return FLUSH_ERROR; + *error = grpc_os_error(errno, "sendmsg"); + return true; } } @@ -355,7 +354,8 @@ static flush_result tcp_flush(grpc_tcp *tcp) { } if (tcp->outgoing_slice_idx == tcp->outgoing_buffer->count) { - return FLUSH_DONE; + *error = GRPC_ERROR_NONE; + return true; } }; } @@ -363,7 +363,7 @@ static flush_result tcp_flush(grpc_tcp *tcp) { static void tcp_handle_write(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, bool success) { grpc_tcp *tcp = (grpc_tcp *)arg; - flush_result status; + grpc_error *error = GRPC_ERROR_NONE; grpc_closure *cb; if (!success) { @@ -374,14 +374,13 @@ static void tcp_handle_write(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, return; } - status = tcp_flush(tcp); - if (status == FLUSH_PENDING) { + if (!tcp_flush(tcp, &error)) { grpc_fd_notify_on_write(exec_ctx, tcp->em_fd, &tcp->write_closure); } else { cb = tcp->write_cb; tcp->write_cb = NULL; GPR_TIMER_BEGIN("tcp_handle_write.cb", 0); - cb->cb(exec_ctx, cb->cb_arg, status == FLUSH_DONE); + cb->cb(exec_ctx, cb->cb_arg, error); GPR_TIMER_END("tcp_handle_write.cb", 0); TCP_UNREF(exec_ctx, tcp, "write"); } @@ -390,7 +389,7 @@ static void tcp_handle_write(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, static void tcp_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, gpr_slice_buffer *buf, grpc_closure *cb) { grpc_tcp *tcp = (grpc_tcp *)ep; - flush_result status; + grpc_error *error = GRPC_ERROR_NONE; if (grpc_tcp_trace) { size_t i; @@ -408,20 +407,19 @@ static void tcp_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, if (buf->length == 0) { GPR_TIMER_END("tcp_write", 0); - grpc_exec_ctx_enqueue(exec_ctx, cb, true, NULL); + grpc_exec_ctx_push(exec_ctx, cb, GRPC_ERROR_NONE, NULL); return; } tcp->outgoing_buffer = buf; tcp->outgoing_slice_idx = 0; tcp->outgoing_byte_idx = 0; - status = tcp_flush(tcp); - if (status == FLUSH_PENDING) { + if (!tcp_flush(tcp, &error)) { TCP_REF(tcp, "write"); tcp->write_cb = cb; grpc_fd_notify_on_write(exec_ctx, tcp->em_fd, &tcp->write_closure); } else { - grpc_exec_ctx_enqueue(exec_ctx, cb, status == FLUSH_DONE, NULL); + grpc_exec_ctx_push(exec_ctx, cb, error, NULL); } GPR_TIMER_END("tcp_write", 0); diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index c5a0a398b43..dc1ff10c853 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -92,6 +92,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/iomgr/endpoint.c', 'src/core/lib/iomgr/endpoint_pair_posix.c', 'src/core/lib/iomgr/endpoint_pair_windows.c', + 'src/core/lib/iomgr/error.c', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.c', 'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/exec_ctx.c', diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 3a774a70d6b..e02bb6f02f3 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -805,6 +805,7 @@ src/core/lib/http/parser.h \ src/core/lib/iomgr/closure.h \ src/core/lib/iomgr/endpoint.h \ src/core/lib/iomgr/endpoint_pair.h \ +src/core/lib/iomgr/error.h \ src/core/lib/iomgr/ev_poll_and_epoll_posix.h \ src/core/lib/iomgr/ev_posix.h \ src/core/lib/iomgr/exec_ctx.h \ @@ -942,6 +943,7 @@ src/core/lib/iomgr/closure.c \ src/core/lib/iomgr/endpoint.c \ src/core/lib/iomgr/endpoint_pair_posix.c \ src/core/lib/iomgr/endpoint_pair_windows.c \ +src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index bb51ecd0c4f..2b140a42701 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5571,6 +5571,7 @@ "src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/endpoint.h", "src/core/lib/iomgr/endpoint_pair.h", + "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -5670,6 +5671,8 @@ "src/core/lib/iomgr/endpoint_pair.h", "src/core/lib/iomgr/endpoint_pair_posix.c", "src/core/lib/iomgr/endpoint_pair_windows.c", + "src/core/lib/iomgr/error.c", + "src/core/lib/iomgr/error.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", "src/core/lib/iomgr/ev_posix.c", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 4eec05a3b1f..ded01ab066f 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -314,6 +314,7 @@ + @@ -471,6 +472,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 17c88c4805e..ff90006e84d 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -55,6 +55,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -635,6 +638,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 26050dcf74e..090d7d41d2c 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -303,6 +303,7 @@ + @@ -448,6 +449,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index a4acf513bc1..5bdc87402a2 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -58,6 +58,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -569,6 +572,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr From 9003768b0af8dd3f51a534cb50baf7081f3caeb0 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 28 Apr 2016 15:40:45 -0700 Subject: [PATCH 0135/1894] Fixed unused parameter error --- src/ruby/ext/grpc/rb_channel_credentials.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/ruby/ext/grpc/rb_channel_credentials.c b/src/ruby/ext/grpc/rb_channel_credentials.c index 4c01859db7e..09bd3093a94 100644 --- a/src/ruby/ext/grpc/rb_channel_credentials.c +++ b/src/ruby/ext/grpc/rb_channel_credentials.c @@ -254,6 +254,7 @@ static grpc_ssl_roots_override_result get_ssl_roots_override( static VALUE grpc_rb_set_default_roots_pem(VALUE self, VALUE roots) { char *roots_ptr = StringValueCStr(roots); size_t length = strlen(roots_ptr); + (void)self; pem_root_certs = gpr_malloc((length + 1) * sizeof(char)); memcpy(pem_root_certs, roots_ptr, length + 1); return Qnil; From d0b3ae40f70d89a74a70cc6fc2fb0935bef7a99b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 28 Apr 2016 16:20:03 -0700 Subject: [PATCH 0136/1894] Fix double delete --- test/core/util/passthru_endpoint.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/core/util/passthru_endpoint.c b/test/core/util/passthru_endpoint.c index 168ae59e917..159155886de 100644 --- a/test/core/util/passthru_endpoint.c +++ b/test/core/util/passthru_endpoint.c @@ -83,11 +83,15 @@ static void me_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, if (m->parent->shutdown) { ok = false; } else if (m->on_read != NULL) { - gpr_slice_buffer_addn(m->on_read_out, slices->slices, slices->count); + for (size_t i = 0; i < slices->count; i++) { + gpr_slice_buffer_add(&m->read_buffer, gpr_slice_ref(slices->slices[i])); + } grpc_exec_ctx_enqueue(exec_ctx, m->on_read, true, NULL); m->on_read = NULL; } else { - gpr_slice_buffer_addn(&m->read_buffer, slices->slices, slices->count); + for (size_t i = 0; i < slices->count; i++) { + gpr_slice_buffer_add(&m->read_buffer, gpr_slice_ref(slices->slices[i])); + } } gpr_mu_unlock(&m->parent->mu); grpc_exec_ctx_enqueue(exec_ctx, cb, ok, NULL); From 904e0a50866f6700dba74f31e1734be448d481f1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 28 Apr 2016 16:38:01 -0700 Subject: [PATCH 0137/1894] Fix typo --- test/core/util/passthru_endpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/util/passthru_endpoint.c b/test/core/util/passthru_endpoint.c index 159155886de..ae955b1f685 100644 --- a/test/core/util/passthru_endpoint.c +++ b/test/core/util/passthru_endpoint.c @@ -84,7 +84,7 @@ static void me_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, ok = false; } else if (m->on_read != NULL) { for (size_t i = 0; i < slices->count; i++) { - gpr_slice_buffer_add(&m->read_buffer, gpr_slice_ref(slices->slices[i])); + gpr_slice_buffer_add(m->on_read_out, gpr_slice_ref(slices->slices[i])); } grpc_exec_ctx_enqueue(exec_ctx, m->on_read, true, NULL); m->on_read = NULL; From 0482c1046b837be17c3a056af6569d84b8f52c23 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Tue, 19 Apr 2016 12:08:34 -0700 Subject: [PATCH 0138/1894] Python QPS Worker/initial scenarios --- src/python/grpcio/tests/qps/__init__.py | 28 +++ .../grpcio/tests/qps/benchmark_client.py | 186 ++++++++++++++++++ .../grpcio/tests/qps/benchmark_server.py | 58 ++++++ src/python/grpcio/tests/qps/client_runner.py | 104 ++++++++++ src/python/grpcio/tests/qps/histogram.py | 85 ++++++++ src/python/grpcio/tests/qps/qps_worker.py | 60 ++++++ src/python/grpcio/tests/qps/worker_server.py | 184 +++++++++++++++++ tools/gce/linux_performance_worker_init.sh | 2 + tools/jenkins/run_performance.sh | 2 +- .../performance/run_worker_python.sh | 35 ++++ .../run_tests/performance/scenario_config.py | 123 ++++++++++++ tools/run_tests/run_performance_tests.py | 6 +- 12 files changed, 869 insertions(+), 4 deletions(-) create mode 100644 src/python/grpcio/tests/qps/__init__.py create mode 100644 src/python/grpcio/tests/qps/benchmark_client.py create mode 100644 src/python/grpcio/tests/qps/benchmark_server.py create mode 100644 src/python/grpcio/tests/qps/client_runner.py create mode 100644 src/python/grpcio/tests/qps/histogram.py create mode 100644 src/python/grpcio/tests/qps/qps_worker.py create mode 100644 src/python/grpcio/tests/qps/worker_server.py create mode 100755 tools/run_tests/performance/run_worker_python.sh diff --git a/src/python/grpcio/tests/qps/__init__.py b/src/python/grpcio/tests/qps/__init__.py new file mode 100644 index 00000000000..100a624dc9c --- /dev/null +++ b/src/python/grpcio/tests/qps/__init__.py @@ -0,0 +1,28 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/python/grpcio/tests/qps/benchmark_client.py b/src/python/grpcio/tests/qps/benchmark_client.py new file mode 100644 index 00000000000..eed0b0c6dac --- /dev/null +++ b/src/python/grpcio/tests/qps/benchmark_client.py @@ -0,0 +1,186 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""Defines test client behaviors (UNARY/STREAMING) (SYNC/ASYNC).""" + +import abc +import time +try: + import Queue as queue # Python 2.x +except ImportError: + import queue # Python 3 + +from concurrent import futures + +from grpc.beta import implementations +from src.proto.grpc.testing import messages_pb2 +from src.proto.grpc.testing import services_pb2 +from tests.unit import resources +from tests.unit.beta import test_utilities + +_TIMEOUT = 60 * 60 * 24 + + +class BenchmarkClient: + """Benchmark client interface that exposes a non-blocking send_request().""" + + __metaclass__ = abc.ABCMeta + + def __init__(self, server, config, hist): + # Create the stub + host, port = server.split(':') + port = int(port) + if config.HasField('security_params'): + creds = implementations.ssl_channel_credentials( + resources.test_root_certificates()) + channel = test_utilities.not_really_secure_channel( + host, port, creds, config.security_params.server_host_override) + else: + channel = implementations.insecure_channel(host, port) + + if config.payload_config.WhichOneof('payload') == 'simple_params': + self._generic = False + self._stub = services_pb2.beta_create_BenchmarkService_stub(channel) + payload = messages_pb2.Payload( + body='\0' * config.payload_config.simple_params.req_size) + self._request = messages_pb2.SimpleRequest( + payload=payload, + response_size=config.payload_config.simple_params.resp_size) + else: + self._generic = True + self._stub = implementations.generic_stub(channel) + self._request = '\0' * config.payload_config.bytebuf_params.req_size + + self._hist = hist + self._response_callbacks = [] + + def add_response_callback(self, callback): + self._response_callbacks.append(callback) + + @abc.abstractmethod + def send_request(self): + """Non-blocking wrapper for a client's request operation.""" + raise NotImplementedError() + + def start(self): + pass + + def stop(self): + pass + + def _handle_response(self, query_time): + self._hist.add(query_time * 1e9) # Report times in nanoseconds + for callback in self._response_callbacks: + callback(query_time) + + +class UnarySyncBenchmarkClient(BenchmarkClient): + + def __init__(self, server, config, hist): + super(UnarySyncBenchmarkClient, self).__init__(server, config, hist) + self._pool = futures.ThreadPoolExecutor( + max_workers=config.outstanding_rpcs_per_channel) + + def send_request(self): + # Send requests in seperate threads to support multiple outstanding rpcs + # (See src/proto/grpc/testing/control.proto) + self._pool.submit(self._dispatch_request) + + def stop(self): + self._pool.shutdown(wait=True) + self._stub = None + + def _dispatch_request(self): + start_time = time.time() + self._stub.UnaryCall(self._request, _TIMEOUT) + end_time = time.time() + self._handle_response(end_time - start_time) + + +class UnaryAsyncBenchmarkClient(BenchmarkClient): + + def send_request(self): + # Use the Future callback api to support multiple outstanding rpcs + start_time = time.time() + response_future = self._stub.UnaryCall.future(self._request, _TIMEOUT) + response_future.add_done_callback( + lambda resp: self._response_received(start_time, resp)) + + def _response_received(self, start_time, resp): + resp.result() + end_time = time.time() + self._handle_response(end_time - start_time) + + def stop(self): + self._stub = None + + +class StreamingAsyncBenchmarkClient(BenchmarkClient): + + def __init__(self, server, config, hist): + super(StreamingAsyncBenchmarkClient, self).__init__(server, config, hist) + self._is_streaming = False + self._pool = futures.ThreadPoolExecutor(max_workers=1) + # Use a thread-safe queue to put requests on the stream + self._request_queue = queue.Queue() + self._send_time_queue = queue.Queue() + + def send_request(self): + self._send_time_queue.put(time.time()) + self._request_queue.put(self._request) + + def start(self): + self._is_streaming = True + self._pool.submit(self._request_stream) + + def stop(self): + self._is_streaming = False + self._pool.shutdown(wait=True) + self._stub = None + + def _request_stream(self): + self._is_streaming = True + if self._generic: + response_stream = self._stub.inline_stream_stream( + 'grpc.testing.BenchmarkService', 'StreamingCall', + self._request_generator(), _TIMEOUT) + else: + response_stream = self._stub.StreamingCall(self._request_generator(), + _TIMEOUT) + for _ in response_stream: + end_time = time.time() + self._handle_response(end_time - self._send_time_queue.get_nowait()) + + def _request_generator(self): + while self._is_streaming: + try: + request = self._request_queue.get(block=True, timeout=1.0) + yield request + except queue.Empty: + pass diff --git a/src/python/grpcio/tests/qps/benchmark_server.py b/src/python/grpcio/tests/qps/benchmark_server.py new file mode 100644 index 00000000000..8cbf480d58b --- /dev/null +++ b/src/python/grpcio/tests/qps/benchmark_server.py @@ -0,0 +1,58 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +from src.proto.grpc.testing import messages_pb2 +from src.proto.grpc.testing import services_pb2 + + +class BenchmarkServer(services_pb2.BetaBenchmarkServiceServicer): + """Synchronous Server implementation for the Benchmark service.""" + + def UnaryCall(self, request, context): + payload = messages_pb2.Payload(body='\0' * request.response_size) + return messages_pb2.SimpleResponse(payload=payload) + + def StreamingCall(self, request_iterator, context): + for request in request_iterator: + payload = messages_pb2.Payload(body='\0' * request.response_size) + yield messages_pb2.SimpleResponse(payload=payload) + + +class GenericBenchmarkServer(services_pb2.BetaBenchmarkServiceServicer): + """Generic Server implementation for the Benchmark service.""" + + def __init__(self, resp_size): + self._response = '\0' * resp_size + + def UnaryCall(self, request, context): + return self._response + + def StreamingCall(self, request_iterator, context): + for request in request_iterator: + yield self._response diff --git a/src/python/grpcio/tests/qps/client_runner.py b/src/python/grpcio/tests/qps/client_runner.py new file mode 100644 index 00000000000..a36c30ccc0a --- /dev/null +++ b/src/python/grpcio/tests/qps/client_runner.py @@ -0,0 +1,104 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""Defines behavior for WHEN clients send requests. + +Each client exposes a non-blocking send_request() method that the +ClientRunner invokes either periodically or in response to some event. +""" + +import abc +import thread +import time + + +class ClientRunner: + """Abstract interface for sending requests from clients.""" + + __metaclass__ = abc.ABCMeta + + def __init__(self, client): + self._client = client + + @abc.abstractmethod + def start(self): + raise NotImplementedError() + + @abc.abstractmethod + def stop(self): + raise NotImplementedError() + + +class OpenLoopClientRunner(ClientRunner): + + def __init__(self, client, interval_generator): + super(OpenLoopClientRunner, self).__init__(client) + self._is_running = False + self._interval_generator = interval_generator + + def start(self): + self._is_running = True + self._client.start() + thread.start_new_thread(self._dispatch_requests, ()) + + def stop(self): + self._is_running = False + self._client.stop() + self._client = None + + def _dispatch_requests(self): + while self._is_running: + self._client.send_request() + time.sleep(next(self._interval_generator)) + + +class ClosedLoopClientRunner(ClientRunner): + + def __init__(self, client, request_count): + super(ClosedLoopClientRunner, self).__init__(client) + self._is_running = False + self._request_count = request_count + # Send a new request on each response for closed loop + self._client.add_response_callback(self._send_request) + + def start(self): + self._is_running = True + for _ in xrange(self._request_count): + self._client.send_request() + self._client.start() + + def stop(self): + self._is_running = False + self._client.stop() + self._client = None + + def _send_request(self, response_time): + if self._is_running: + self._client.send_request() + diff --git a/src/python/grpcio/tests/qps/histogram.py b/src/python/grpcio/tests/qps/histogram.py new file mode 100644 index 00000000000..9a7b5eb2ba6 --- /dev/null +++ b/src/python/grpcio/tests/qps/histogram.py @@ -0,0 +1,85 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import math +import threading + +from src.proto.grpc.testing import stats_pb2 + + +class Histogram(object): + """Histogram class used for recording performance testing data. + + This class is thread safe. + """ + + def __init__(self, resolution, max_possible): + self._lock = threading.Lock() + self._resolution = resolution + self._max_possible = max_possible + self._sum = 0 + self._sum_of_squares = 0 + self.multiplier = 1.0 + self._resolution + self._count = 0 + self._min = self._max_possible + self._max = 0 + self._buckets = [0] * (self._bucket_for(self._max_possible) + 1) + + def reset(self): + with self._lock: + self._sum = 0 + self._sum_of_squares = 0 + self._count = 0 + self._min = self._max_possible + self._max = 0 + self._buckets = [0] * (self._bucket_for(self._max_possible) + 1) + + def add(self, val): + with self._lock: + self._sum += val + self._sum_of_squares += val * val + self._count += 1 + self._min = min(self._min, val) + self._max = max(self._max, val) + self._buckets[self._bucket_for(val)] += 1 + + def get_data(self): + with self._lock: + data = stats_pb2.HistogramData() + data.bucket.extend(self._buckets) + data.min_seen = self._min + data.max_seen = self._max + data.sum = self._sum + data.sum_of_squares = self._sum_of_squares + data.count = self._count + return data + + def _bucket_for(self, val): + val = min(val, self._max_possible) + return int(math.log(val, self.multiplier)) diff --git a/src/python/grpcio/tests/qps/qps_worker.py b/src/python/grpcio/tests/qps/qps_worker.py new file mode 100644 index 00000000000..3dda718638e --- /dev/null +++ b/src/python/grpcio/tests/qps/qps_worker.py @@ -0,0 +1,60 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""The entry point for the qps worker.""" + +import argparse +import time + +from src.proto.grpc.testing import services_pb2 + +from tests.qps import worker_server + + +def run_worker_server(port): + servicer = worker_server.WorkerServer() + server = services_pb2.beta_create_WorkerService_server(servicer) + server.add_insecure_port('[::]:{}'.format(port)) + server.start() + servicer.wait_for_quit() + # Drain outstanding requests for clean exit + time.sleep(2) + server.stop(0) + + +if __name__ == '__main__': + parser = argparse.ArgumentParser( + description='gRPC Python performance testing worker') + parser.add_argument('--driver_port', + type=int, + dest='port', + help='The port the worker should listen on') + args = parser.parse_args() + + run_worker_server(args.port) diff --git a/src/python/grpcio/tests/qps/worker_server.py b/src/python/grpcio/tests/qps/worker_server.py new file mode 100644 index 00000000000..0b3acc14e7d --- /dev/null +++ b/src/python/grpcio/tests/qps/worker_server.py @@ -0,0 +1,184 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import multiprocessing +import random +import threading +import time + +from grpc.beta import implementations +from grpc.framework.interfaces.face import utilities +from src.proto.grpc.testing import control_pb2 +from src.proto.grpc.testing import services_pb2 +from src.proto.grpc.testing import stats_pb2 + +from tests.qps import benchmark_client +from tests.qps import benchmark_server +from tests.qps import client_runner +from tests.qps import histogram +from tests.unit import resources + + +class WorkerServer(services_pb2.BetaWorkerServiceServicer): + """Python Worker Server implementation.""" + + def __init__(self): + self._quit_event = threading.Event() + + def RunServer(self, request_iterator, context): + config = next(request_iterator).setup + server, port = self._create_server(config) + cores = multiprocessing.cpu_count() + server.start() + start_time = time.time() + yield self._get_server_status(start_time, start_time, port, cores) + + for request in request_iterator: + end_time = time.time() + status = self._get_server_status(start_time, end_time, port, cores) + if request.mark.reset: + start_time = end_time + yield status + server.stop(0) + + def _get_server_status(self, start_time, end_time, port, cores): + end_time = time.time() + elapsed_time = end_time - start_time + stats = stats_pb2.ServerStats(time_elapsed=elapsed_time, + time_user=elapsed_time, + time_system=elapsed_time) + return control_pb2.ServerStatus(stats=stats, port=port, cores=cores) + + def _create_server(self, config): + if config.server_type == control_pb2.SYNC_SERVER: + servicer = benchmark_server.BenchmarkServer() + server = services_pb2.beta_create_BenchmarkService_server(servicer) + elif config.server_type == control_pb2.ASYNC_GENERIC_SERVER: + resp_size = config.payload_config.bytebuf_params.resp_size + servicer = benchmark_server.GenericBenchmarkServer(resp_size) + method_implementations = { + ('grpc.testing.BenchmarkService', 'StreamingCall'): + utilities.stream_stream_inline(servicer.StreamingCall), + ('grpc.testing.BenchmarkService', 'UnaryCall'): + utilities.unary_unary_inline(servicer.UnaryCall), + } + server = implementations.server(method_implementations) + else: + raise Exception('Unsupported server type {}'.format(config.server_type)) + + if config.HasField('security_params'): # Use SSL + server_creds = implementations.ssl_server_credentials([( + resources.private_key(), resources.certificate_chain())]) + port = server.add_secure_port('[::]:{}'.format(config.port), server_creds) + else: + port = server.add_insecure_port('[::]:{}'.format(config.port)) + + return (server, port) + + def RunClient(self, request_iterator, context): + config = next(request_iterator).setup + client_runners = [] + qps_data = histogram.Histogram(config.histogram_params.resolution, + config.histogram_params.max_possible) + start_time = time.time() + + # Create a client for each channel + for i in xrange(config.client_channels): + server = config.server_targets[i % len(config.server_targets)] + runner = self._create_client_runner(server, config, qps_data) + client_runners.append(runner) + runner.start() + + end_time = time.time() + yield self._get_client_status(start_time, end_time, qps_data) + + # Respond to stat requests + for request in request_iterator: + end_time = time.time() + status = self._get_client_status(start_time, end_time, qps_data) + if request.mark.reset: + qps_data.reset() + start_time = time.time() + yield status + + # Cleanup the clients + for runner in client_runners: + runner.stop() + + def _get_client_status(self, start_time, end_time, qps_data): + latencies = qps_data.get_data() + end_time = time.time() + elapsed_time = end_time - start_time + stats = stats_pb2.ClientStats(latencies=latencies, + time_elapsed=elapsed_time, + time_user=elapsed_time, + time_system=elapsed_time) + return control_pb2.ClientStatus(stats=stats) + + def _create_client_runner(self, server, config, qps_data): + if config.client_type == control_pb2.SYNC_CLIENT: + if config.rpc_type == control_pb2.UNARY: + client = benchmark_client.UnarySyncBenchmarkClient( + server, config, qps_data) + else: + raise Exception('STREAMING SYNC client not supported') + elif config.client_type == control_pb2.ASYNC_CLIENT: + if config.rpc_type == control_pb2.UNARY: + client = benchmark_client.UnaryAsyncBenchmarkClient( + server, config, qps_data) + elif config.rpc_type == control_pb2.STREAMING: + client = benchmark_client.StreamingAsyncBenchmarkClient( + server, config, qps_data) + else: + raise Exception('Unsupported client type {}'.format(config.client_type)) + + # In multi-channel tests, we split the load across all channels + load_factor = float(config.client_channels) + if config.load_params.WhichOneof('load') == 'closed_loop': + runner = client_runner.ClosedLoopClientRunner( + client, config.outstanding_rpcs_per_channel) + else: # Open loop Poisson + alpha = config.load_params.poisson.offered_load / load_factor + def poisson(): + while True: + yield random.expovariate(alpha) + + runner = client_runner.OpenLoopClientRunner(client, poisson()) + + return runner + + def CoreCount(self, request, context): + return control_pb2.CoreResponse(cores=multiprocessing.cpu_count()) + + def QuitWorker(self, request, context): + self._quit_event.set() + return control_pb2.Void() + + def wait_for_quit(self): + self._quit_event.wait() diff --git a/tools/gce/linux_performance_worker_init.sh b/tools/gce/linux_performance_worker_init.sh index 478e04ef370..25ac3bcedea 100755 --- a/tools/gce/linux_performance_worker_init.sh +++ b/tools/gce/linux_performance_worker_init.sh @@ -83,11 +83,13 @@ sudo apt-get install -y libgflags-dev libgtest-dev libc++-dev clang # Python dependencies sudo pip install tabulate sudo pip install google-api-python-client +sudo pip install tox curl -O https://bootstrap.pypa.io/get-pip.py sudo pypy get-pip.py sudo pypy -m pip install tabulate sudo pip install google-api-python-client +sudo pip install tox # Node dependencies (nvm has to be installed under user jenkins) touch .profile diff --git a/tools/jenkins/run_performance.sh b/tools/jenkins/run_performance.sh index 903a1442151..13a332751b2 100755 --- a/tools/jenkins/run_performance.sh +++ b/tools/jenkins/run_performance.sh @@ -34,4 +34,4 @@ set -ex # Enter the gRPC repo root cd $(dirname $0)/../.. -tools/run_tests/run_performance_tests.py -l c++ node ruby csharp +tools/run_tests/run_performance_tests.py -l c++ node ruby csharp python diff --git a/tools/run_tests/performance/run_worker_python.sh b/tools/run_tests/performance/run_worker_python.sh new file mode 100755 index 00000000000..0da8deda58e --- /dev/null +++ b/tools/run_tests/performance/run_worker_python.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -ex + +cd $(dirname $0)/../../.. + +PYTHONPATH=src/python/grpcio:src/python/gens .tox/py27/bin/python src/python/grpcio/tests/qps/qps_worker.py $@ diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index 55657f8d8a2..ddbe2375691 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -456,6 +456,128 @@ class NodeLanguage: def __str__(self): return 'node' +class PythonLanguage: + + def __init__(self): + self.safename = 'python' + + def worker_cmdline(self): + return ['tools/run_tests/performance/run_worker_python.sh'] + + def worker_port_offset(self): + return 500 + + def scenarios(self): + yield { + 'name': 'python_to_cpp_protobuf_streaming_ping_pong', + 'num_servers': 1, + 'num_clients': 1, + 'client_config': { + 'client_type': 'ASYNC_CLIENT', + 'security_params': SECURE_SECARGS, + 'outstanding_rpcs_per_channel': 1, + 'client_channels': 1, + 'async_client_threads': 1, + 'rpc_type': 'STREAMING', + 'load_params': { + 'closed_loop': {} + }, + 'payload_config': EMPTY_PROTO_PAYLOAD, + 'histogram_params': HISTOGRAM_PARAMS, + }, + 'server_config': { + 'server_type': 'SYNC_SERVER', + 'security_params': SECURE_SECARGS, + 'core_limit': 0, + 'async_server_threads': 1, + }, + 'warmup_seconds': WARMUP_SECONDS, + 'benchmark_seconds': BENCHMARK_SECONDS, + 'SERVER_LANGUAGE': 'c++' + } + yield { + 'name': 'python_protobuf_sync_unary_ping_pong', + 'num_servers': 1, + 'num_clients': 1, + 'client_config': { + 'client_type': 'SYNC_CLIENT', + 'security_params': SECURE_SECARGS, + 'outstanding_rpcs_per_channel': 1, + 'client_channels': 1, + 'async_client_threads': 1, + 'rpc_type': 'UNARY', + 'load_params': { + 'closed_loop': {} + }, + 'payload_config': EMPTY_PROTO_PAYLOAD, + 'histogram_params': HISTOGRAM_PARAMS, + }, + 'server_config': { + 'server_type': 'SYNC_SERVER', + 'security_params': SECURE_SECARGS, + 'core_limit': 0, + 'async_server_threads': 1, + }, + 'warmup_seconds': WARMUP_SECONDS, + 'benchmark_seconds': BENCHMARK_SECONDS, + } + yield { + 'name': 'python_protobuf_async_unary_ping_pong', + 'num_servers': 1, + 'num_clients': 1, + 'client_config': { + 'client_type': 'ASYNC_CLIENT', + 'security_params': SECURE_SECARGS, + 'outstanding_rpcs_per_channel': 1, + 'client_channels': 1, + 'async_client_threads': 1, + 'rpc_type': 'UNARY', + 'load_params': { + 'closed_loop': {} + }, + 'payload_config': EMPTY_PROTO_PAYLOAD, + 'histogram_params': HISTOGRAM_PARAMS, + }, + 'server_config': { + 'server_type': 'SYNC_SERVER', + 'security_params': SECURE_SECARGS, + 'core_limit': 0, + 'async_server_threads': 1, + }, + 'warmup_seconds': WARMUP_SECONDS, + 'benchmark_seconds': BENCHMARK_SECONDS, + } + yield { + 'name': 'python_to_cpp_single_channel_throughput', + 'num_servers': 1, + 'num_clients': 1, + 'client_config': { + 'client_type': 'ASYNC_CLIENT', + 'security_params': SECURE_SECARGS, + 'outstanding_rpcs_per_channel': 1, + 'client_channels': 1, + 'async_client_threads': 1, + 'rpc_type': 'STREAMING', + 'load_params': { + 'closed_loop': {} + }, + 'payload_config': BIG_GENERIC_PAYLOAD, + 'histogram_params': HISTOGRAM_PARAMS, + }, + 'server_config': { + 'server_type': 'ASYNC_GENERIC_SERVER', + 'security_params': SECURE_SECARGS, + 'core_limit': SINGLE_MACHINE_CORES/2, + 'async_server_threads': 1, + 'payload_config': BIG_GENERIC_PAYLOAD, + }, + 'warmup_seconds': WARMUP_SECONDS, + 'benchmark_seconds': BENCHMARK_SECONDS, + 'SERVER_LANGUAGE': 'c++' + } + + def __str__(self): + return 'python' class RubyLanguage: @@ -562,4 +684,5 @@ LANGUAGES = { 'node' : NodeLanguage(), 'ruby' : RubyLanguage(), 'java' : JavaLanguage(), + 'python' : PythonLanguage(), } diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py index ada341abf54..485265311e3 100755 --- a/tools/run_tests/run_performance_tests.py +++ b/tools/run_tests/run_performance_tests.py @@ -238,6 +238,9 @@ def start_qpsworkers(languages, worker_hosts): def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*', bq_result_table=None): """Create jobspecs for scenarios to run.""" + all_workers = [worker + for workers in workers_by_lang.values() + for worker in workers] scenarios = [] for language in languages: for scenario_json in language.scenarios(): @@ -263,9 +266,6 @@ def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*', scenarios.append(scenario) # the very last scenario requests shutting down the workers. - all_workers = [worker - for workers in workers_by_lang.values() - for worker in workers] scenarios.append(create_quit_jobspec(all_workers, remote_host=remote_host)) return scenarios From 5c123fd22b06ddf16d3abea3983d3c998d758bfe Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 28 Apr 2016 20:48:24 -0700 Subject: [PATCH 0139/1894] Add a shard channel arg to client channel construction C core automatically shares subchannels between channels. Therefore our multiple channel performance tests were really testing single channel performance. --- test/cpp/qps/client.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 5a9027a4a23..63fc3156e51 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -40,6 +40,7 @@ #include #include +#include #include #include @@ -280,7 +281,7 @@ class ClientImpl : public Client { create_stub_(create_stub) { for (int i = 0; i < config.client_channels(); i++) { channels_[i].init(config.server_targets(i % config.server_targets_size()), - config, create_stub_); + config, create_stub_, i); } ClientRequestCreator create_req(&request_, @@ -303,14 +304,16 @@ class ClientImpl : public Client { } void init(const grpc::string& target, const ClientConfig& config, std::function(std::shared_ptr)> - create_stub) { + create_stub, int shard) { // We have to use a 2-phase init like this with a default // constructor followed by an initializer function to make // old compilers happy with using this in std::vector + ChannelArguments args; + args.SetInt("shard", shard); channel_ = CreateTestChannel( target, config.security_params().server_host_override(), config.has_security_params(), - !config.security_params().use_test_ca()); + !config.security_params().use_test_ca(), std::shared_ptr(), args); stub_ = create_stub(channel_); } Channel* get_channel() { return channel_.get(); } From b41363e88eb78123926e760e45a981add977140f Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 29 Apr 2016 00:41:21 -0700 Subject: [PATCH 0140/1894] all good! missing end2end test for new lr filter --- BUILD | 20 +- Makefile | 44 +--- binding.gyp | 4 +- build.yaml | 25 +-- config.m4 | 5 +- gRPC.podspec | 12 +- grpc.gemspec | 8 +- include/grpc/impl/codegen/grpc_types.h | 2 + package.xml | 8 +- src/core/ext/load_reporting/load_reporting.c | 101 +++++++++ .../load_reporting/load_reporting.h | 27 ++- .../load_reporting/load_reporting_filter.c | 25 ++- src/core/lib/load_reporting/load_reporting.c | 72 ------- .../plugin_registry/grpc_plugin_registry.c | 4 + src/python/grpcio/grpc_core_dependencies.py | 4 +- tools/doxygen/Doxyfile.core.internal | 8 +- tools/run_tests/sources_and_headers.json | 43 ++-- tools/run_tests/tests.json | 21 -- vsprojects/buildtests_c.sln | 27 --- vsprojects/vcxproj/grpc/grpc.vcxproj | 12 +- vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 27 ++- .../grpc_unsecure/grpc_unsecure.vcxproj | 6 - .../grpc_unsecure.vcxproj.filters | 18 -- .../load_reporting_registration_test.vcxproj | 199 ------------------ ...eporting_registration_test.vcxproj.filters | 21 -- 25 files changed, 227 insertions(+), 516 deletions(-) create mode 100644 src/core/ext/load_reporting/load_reporting.c rename src/core/{lib => ext}/load_reporting/load_reporting.h (76%) delete mode 100644 src/core/lib/load_reporting/load_reporting.c delete mode 100644 vsprojects/vcxproj/test/load_reporting_registration_test/load_reporting_registration_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/load_reporting_registration_test/load_reporting_registration_test.vcxproj.filters diff --git a/BUILD b/BUILD index d639ad7c692..1071e6187fa 100644 --- a/BUILD +++ b/BUILD @@ -159,7 +159,6 @@ cc_library( cc_library( name = "grpc", srcs = [ - "src/core/ext/load_reporting/load_reporting_filter.h", "src/core/lib/channel/channel_args.h", "src/core/lib/channel/channel_stack.h", "src/core/lib/channel/channel_stack_builder.h", @@ -214,7 +213,6 @@ cc_library( "src/core/lib/json/json_common.h", "src/core/lib/json/json_reader.h", "src/core/lib/json/json_writer.h", - "src/core/lib/load_reporting/load_reporting.h", "src/core/lib/surface/api_trace.h", "src/core/lib/surface/call.h", "src/core/lib/surface/call_test_only.h", @@ -287,6 +285,8 @@ cc_library( "src/core/ext/client_config/uri_parser.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/ext/load_reporting/load_reporting.h", + "src/core/ext/load_reporting/load_reporting_filter.h", "src/core/ext/census/aggregation.h", "src/core/ext/census/census_interface.h", "src/core/ext/census/census_rpc_stats.h", @@ -294,7 +294,6 @@ cc_library( "src/core/ext/census/mlog.h", "src/core/ext/census/rpc_metric_id.h", "src/core/lib/surface/init.c", - "src/core/ext/load_reporting/load_reporting_filter.c", "src/core/lib/channel/channel_args.c", "src/core/lib/channel/channel_stack.c", "src/core/lib/channel/channel_stack_builder.c", @@ -351,7 +350,6 @@ cc_library( "src/core/lib/json/json_reader.c", "src/core/lib/json/json_string.c", "src/core/lib/json/json_writer.c", - "src/core/lib/load_reporting/load_reporting.c", "src/core/lib/surface/alarm.c", "src/core/lib/surface/api_trace.c", "src/core/lib/surface/byte_buffer.c", @@ -447,6 +445,8 @@ cc_library( "src/core/ext/lb_policy/round_robin/round_robin.c", "src/core/ext/resolver/dns/native/dns_resolver.c", "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", + "src/core/ext/load_reporting/load_reporting.c", + "src/core/ext/load_reporting/load_reporting_filter.c", "src/core/ext/census/context.c", "src/core/ext/census/grpc_context.c", "src/core/ext/census/grpc_filter.c", @@ -508,7 +508,6 @@ cc_library( cc_library( name = "grpc_unsecure", srcs = [ - "src/core/ext/load_reporting/load_reporting_filter.h", "src/core/lib/channel/channel_args.h", "src/core/lib/channel/channel_stack.h", "src/core/lib/channel/channel_stack_builder.h", @@ -563,7 +562,6 @@ cc_library( "src/core/lib/json/json_common.h", "src/core/lib/json/json_reader.h", "src/core/lib/json/json_writer.h", - "src/core/lib/load_reporting/load_reporting.h", "src/core/lib/surface/api_trace.h", "src/core/lib/surface/call.h", "src/core/lib/surface/call_test_only.h", @@ -630,7 +628,6 @@ cc_library( "src/core/ext/census/rpc_metric_id.h", "src/core/lib/surface/init.c", "src/core/lib/surface/init_unsecure.c", - "src/core/ext/load_reporting/load_reporting_filter.c", "src/core/lib/channel/channel_args.c", "src/core/lib/channel/channel_stack.c", "src/core/lib/channel/channel_stack_builder.c", @@ -687,7 +684,6 @@ cc_library( "src/core/lib/json/json_reader.c", "src/core/lib/json/json_string.c", "src/core/lib/json/json_writer.c", - "src/core/lib/load_reporting/load_reporting.c", "src/core/lib/surface/alarm.c", "src/core/lib/surface/api_trace.c", "src/core/lib/surface/byte_buffer.c", @@ -1315,7 +1311,6 @@ objc_library( name = "grpc_objc", srcs = [ "src/core/lib/surface/init.c", - "src/core/ext/load_reporting/load_reporting_filter.c", "src/core/lib/channel/channel_args.c", "src/core/lib/channel/channel_stack.c", "src/core/lib/channel/channel_stack_builder.c", @@ -1372,7 +1367,6 @@ objc_library( "src/core/lib/json/json_reader.c", "src/core/lib/json/json_string.c", "src/core/lib/json/json_writer.c", - "src/core/lib/load_reporting/load_reporting.c", "src/core/lib/surface/alarm.c", "src/core/lib/surface/api_trace.c", "src/core/lib/surface/byte_buffer.c", @@ -1468,6 +1462,8 @@ objc_library( "src/core/ext/lb_policy/round_robin/round_robin.c", "src/core/ext/resolver/dns/native/dns_resolver.c", "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", + "src/core/ext/load_reporting/load_reporting.c", + "src/core/ext/load_reporting/load_reporting_filter.c", "src/core/ext/census/context.c", "src/core/ext/census/grpc_context.c", "src/core/ext/census/grpc_filter.c", @@ -1508,7 +1504,6 @@ objc_library( "include/grpc/grpc_security.h", "include/grpc/grpc_security_constants.h", "include/grpc/census.h", - "src/core/ext/load_reporting/load_reporting_filter.h", "src/core/lib/channel/channel_args.h", "src/core/lib/channel/channel_stack.h", "src/core/lib/channel/channel_stack_builder.h", @@ -1563,7 +1558,6 @@ objc_library( "src/core/lib/json/json_common.h", "src/core/lib/json/json_reader.h", "src/core/lib/json/json_writer.h", - "src/core/lib/load_reporting/load_reporting.h", "src/core/lib/surface/api_trace.h", "src/core/lib/surface/call.h", "src/core/lib/surface/call_test_only.h", @@ -1636,6 +1630,8 @@ objc_library( "src/core/ext/client_config/uri_parser.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", + "src/core/ext/load_reporting/load_reporting.h", + "src/core/ext/load_reporting/load_reporting_filter.h", "src/core/ext/census/aggregation.h", "src/core/ext/census/census_interface.h", "src/core/ext/census/census_rpc_stats.h", diff --git a/Makefile b/Makefile index b28403c138c..fe1a6065f11 100644 --- a/Makefile +++ b/Makefile @@ -958,7 +958,6 @@ json_stream_error_test: $(BINDIR)/$(CONFIG)/json_stream_error_test json_test: $(BINDIR)/$(CONFIG)/json_test lame_client_test: $(BINDIR)/$(CONFIG)/lame_client_test lb_policies_test: $(BINDIR)/$(CONFIG)/lb_policies_test -load_reporting_registration_test: $(BINDIR)/$(CONFIG)/load_reporting_registration_test low_level_ping_pong_benchmark: $(BINDIR)/$(CONFIG)/low_level_ping_pong_benchmark message_compress_test: $(BINDIR)/$(CONFIG)/message_compress_test mlog_test: $(BINDIR)/$(CONFIG)/mlog_test @@ -1285,7 +1284,6 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/json_test \ $(BINDIR)/$(CONFIG)/lame_client_test \ $(BINDIR)/$(CONFIG)/lb_policies_test \ - $(BINDIR)/$(CONFIG)/load_reporting_registration_test \ $(BINDIR)/$(CONFIG)/message_compress_test \ $(BINDIR)/$(CONFIG)/mlog_test \ $(BINDIR)/$(CONFIG)/multiple_server_queues_test \ @@ -1592,8 +1590,6 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/json_test || ( echo test json_test failed ; exit 1 ) $(E) "[RUN] Testing lame_client_test" $(Q) $(BINDIR)/$(CONFIG)/lame_client_test || ( echo test lame_client_test failed ; exit 1 ) - $(E) "[RUN] Testing load_reporting_registration_test" - $(Q) $(BINDIR)/$(CONFIG)/load_reporting_registration_test || ( echo test load_reporting_registration_test failed ; exit 1 ) $(E) "[RUN] Testing message_compress_test" $(Q) $(BINDIR)/$(CONFIG)/message_compress_test || ( echo test message_compress_test failed ; exit 1 ) $(E) "[RUN] Testing multiple_server_queues_test" @@ -2480,7 +2476,6 @@ endif LIBGRPC_SRC = \ src/core/lib/surface/init.c \ - src/core/ext/load_reporting/load_reporting_filter.c \ src/core/lib/channel/channel_args.c \ src/core/lib/channel/channel_stack.c \ src/core/lib/channel/channel_stack_builder.c \ @@ -2537,7 +2532,6 @@ LIBGRPC_SRC = \ src/core/lib/json/json_reader.c \ src/core/lib/json/json_string.c \ src/core/lib/json/json_writer.c \ - src/core/lib/load_reporting/load_reporting.c \ src/core/lib/surface/alarm.c \ src/core/lib/surface/api_trace.c \ src/core/lib/surface/byte_buffer.c \ @@ -2636,6 +2630,8 @@ LIBGRPC_SRC = \ src/core/ext/lb_policy/round_robin/round_robin.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ src/core/ext/resolver/sockaddr/sockaddr_resolver.c \ + src/core/ext/load_reporting/load_reporting.c \ + src/core/ext/load_reporting/load_reporting_filter.c \ src/core/ext/census/context.c \ src/core/ext/census/grpc_context.c \ src/core/ext/census/grpc_filter.c \ @@ -2823,7 +2819,6 @@ endif LIBGRPC_UNSECURE_SRC = \ src/core/lib/surface/init.c \ src/core/lib/surface/init_unsecure.c \ - src/core/ext/load_reporting/load_reporting_filter.c \ src/core/lib/channel/channel_args.c \ src/core/lib/channel/channel_stack.c \ src/core/lib/channel/channel_stack_builder.c \ @@ -2880,7 +2875,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/json/json_reader.c \ src/core/lib/json/json_string.c \ src/core/lib/json/json_writer.c \ - src/core/lib/load_reporting/load_reporting.c \ src/core/lib/surface/alarm.c \ src/core/lib/surface/api_trace.c \ src/core/lib/surface/byte_buffer.c \ @@ -8552,38 +8546,6 @@ endif endif -LOAD_REPORTING_REGISTRATION_TEST_SRC = \ - test/core/load_reporting/load_reporting_registration.c \ - -LOAD_REPORTING_REGISTRATION_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LOAD_REPORTING_REGISTRATION_TEST_SRC)))) -ifeq ($(NO_SECURE),true) - -# You can't build secure targets if you don't have OpenSSL. - -$(BINDIR)/$(CONFIG)/load_reporting_registration_test: openssl_dep_error - -else - - - -$(BINDIR)/$(CONFIG)/load_reporting_registration_test: $(LOAD_REPORTING_REGISTRATION_TEST_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) $(LOAD_REPORTING_REGISTRATION_TEST_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)/load_reporting_registration_test - -endif - -$(OBJDIR)/$(CONFIG)/test/core/load_reporting/load_reporting_registration.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a - -deps_load_reporting_registration_test: $(LOAD_REPORTING_REGISTRATION_TEST_OBJS:.o=.dep) - -ifneq ($(NO_SECURE),true) -ifneq ($(NO_DEPS),true) --include $(LOAD_REPORTING_REGISTRATION_TEST_OBJS:.o=.dep) -endif -endif - - LOW_LEVEL_PING_PONG_BENCHMARK_SRC = \ test/core/network_benchmarks/low_level_ping_pong.c \ @@ -14349,6 +14311,8 @@ ifneq ($(OPENSSL_DEP),) # This is to ensure the embedded OpenSSL is built beforehand, properly # installing headers to their final destination on the drive. We need this # otherwise parallel compilation will fail if a source is compiled first. +src/core/ext/load_reporting/load_reporting.c: $(OPENSSL_DEP) +src/core/ext/load_reporting/load_reporting_filter.c: $(OPENSSL_DEP) src/core/ext/transport/chttp2/client/secure/secure_channel_create.c: $(OPENSSL_DEP) src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c: $(OPENSSL_DEP) src/core/lib/http/httpcli_security_connector.c: $(OPENSSL_DEP) diff --git a/binding.gyp b/binding.gyp index 0181b19a47d..9ce604ddc2c 100644 --- a/binding.gyp +++ b/binding.gyp @@ -562,7 +562,6 @@ ], 'sources': [ 'src/core/lib/surface/init.c', - 'src/core/ext/load_reporting/load_reporting_filter.c', 'src/core/lib/channel/channel_args.c', 'src/core/lib/channel/channel_stack.c', 'src/core/lib/channel/channel_stack_builder.c', @@ -619,7 +618,6 @@ 'src/core/lib/json/json_reader.c', 'src/core/lib/json/json_string.c', 'src/core/lib/json/json_writer.c', - 'src/core/lib/load_reporting/load_reporting.c', 'src/core/lib/surface/alarm.c', 'src/core/lib/surface/api_trace.c', 'src/core/lib/surface/byte_buffer.c', @@ -718,6 +716,8 @@ 'src/core/ext/lb_policy/round_robin/round_robin.c', 'src/core/ext/resolver/dns/native/dns_resolver.c', 'src/core/ext/resolver/sockaddr/sockaddr_resolver.c', + 'src/core/ext/load_reporting/load_reporting.c', + 'src/core/ext/load_reporting/load_reporting_filter.c', 'src/core/ext/census/context.c', 'src/core/ext/census/grpc_context.c', 'src/core/ext/census/grpc_filter.c', diff --git a/build.yaml b/build.yaml index c770ecc1c9f..80451862908 100644 --- a/build.yaml +++ b/build.yaml @@ -146,7 +146,6 @@ filegroups: - include/grpc/grpc.h - include/grpc/status.h headers: - - src/core/ext/load_reporting/load_reporting_filter.h - src/core/lib/channel/channel_args.h - src/core/lib/channel/channel_stack.h - src/core/lib/channel/channel_stack_builder.h @@ -201,7 +200,6 @@ filegroups: - src/core/lib/json/json_common.h - src/core/lib/json/json_reader.h - src/core/lib/json/json_writer.h - - src/core/lib/load_reporting/load_reporting.h - src/core/lib/surface/api_trace.h - src/core/lib/surface/call.h - src/core/lib/surface/call_test_only.h @@ -222,7 +220,6 @@ filegroups: - src/core/lib/transport/transport.h - src/core/lib/transport/transport_impl.h src: - - src/core/ext/load_reporting/load_reporting_filter.c - src/core/lib/channel/channel_args.c - src/core/lib/channel/channel_stack.c - src/core/lib/channel/channel_stack_builder.c @@ -279,7 +276,6 @@ filegroups: - src/core/lib/json/json_reader.c - src/core/lib/json/json_string.c - src/core/lib/json/json_writer.c - - src/core/lib/load_reporting/load_reporting.c - src/core/lib/surface/alarm.c - src/core/lib/surface/api_trace.c - src/core/lib/surface/byte_buffer.c @@ -385,6 +381,16 @@ filegroups: uses: - grpc_base - grpc_client_config +- name: grpc_load_reporting + headers: + - src/core/ext/load_reporting/load_reporting.h + - src/core/ext/load_reporting/load_reporting_filter.h + src: + - src/core/ext/load_reporting/load_reporting.c + - src/core/ext/load_reporting/load_reporting_filter.c + plugin: grpc_load_reporting_plugin + uses: + - grpc_base - name: grpc_resolver_dns_native src: - src/core/ext/resolver/dns/native/dns_resolver.c @@ -740,6 +746,7 @@ libs: - grpc_lb_policy_round_robin - grpc_resolver_dns_native - grpc_resolver_sockaddr + - grpc_load_reporting - grpc_secure - census generate_plugin_registry: true @@ -1919,16 +1926,6 @@ targets: - grpc - gpr_test_util - gpr -- name: load_reporting_registration_test - build: test - language: c - src: - - test/core/load_reporting/load_reporting_registration.c - deps: - - grpc_test_util - - grpc - - gpr_test_util - - gpr - name: low_level_ping_pong_benchmark build: benchmark language: c diff --git a/config.m4 b/config.m4 index 2bd1c72dce9..8e7fe0b76d7 100644 --- a/config.m4 +++ b/config.m4 @@ -81,7 +81,6 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/support/tmpfile_win32.c \ src/core/lib/support/wrap_memcpy.c \ src/core/lib/surface/init.c \ - src/core/ext/load_reporting/load_reporting_filter.c \ src/core/lib/channel/channel_args.c \ src/core/lib/channel/channel_stack.c \ src/core/lib/channel/channel_stack_builder.c \ @@ -138,7 +137,6 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/json/json_reader.c \ src/core/lib/json/json_string.c \ src/core/lib/json/json_writer.c \ - src/core/lib/load_reporting/load_reporting.c \ src/core/lib/surface/alarm.c \ src/core/lib/surface/api_trace.c \ src/core/lib/surface/byte_buffer.c \ @@ -237,6 +235,8 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/lb_policy/round_robin/round_robin.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ src/core/ext/resolver/sockaddr/sockaddr_resolver.c \ + src/core/ext/load_reporting/load_reporting.c \ + src/core/ext/load_reporting/load_reporting_filter.c \ src/core/ext/census/context.c \ src/core/ext/census/grpc_context.c \ src/core/ext/census/grpc_filter.c \ @@ -573,7 +573,6 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/http) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/iomgr) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/json) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/load_reporting) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/profiling) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/support) diff --git a/gRPC.podspec b/gRPC.podspec index 308e98bd10e..a884660605e 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -161,7 +161,6 @@ Pod::Spec.new do |s| 'src/core/lib/support/tmpfile_posix.c', 'src/core/lib/support/tmpfile_win32.c', 'src/core/lib/support/wrap_memcpy.c', - 'src/core/ext/load_reporting/load_reporting_filter.h', 'src/core/lib/channel/channel_args.h', 'src/core/lib/channel/channel_stack.h', 'src/core/lib/channel/channel_stack_builder.h', @@ -216,7 +215,6 @@ Pod::Spec.new do |s| 'src/core/lib/json/json_common.h', 'src/core/lib/json/json_reader.h', 'src/core/lib/json/json_writer.h', - 'src/core/lib/load_reporting/load_reporting.h', 'src/core/lib/surface/api_trace.h', 'src/core/lib/surface/call.h', 'src/core/lib/surface/call_test_only.h', @@ -293,6 +291,8 @@ Pod::Spec.new do |s| 'third_party/nanopb/pb_common.h', 'third_party/nanopb/pb_decode.h', 'third_party/nanopb/pb_encode.h', + 'src/core/ext/load_reporting/load_reporting.h', + 'src/core/ext/load_reporting/load_reporting_filter.h', 'src/core/ext/census/aggregation.h', 'src/core/ext/census/census_interface.h', 'src/core/ext/census/census_rpc_stats.h', @@ -328,7 +328,6 @@ Pod::Spec.new do |s| 'include/grpc/grpc_security_constants.h', 'include/grpc/census.h', 'src/core/lib/surface/init.c', - 'src/core/ext/load_reporting/load_reporting_filter.c', 'src/core/lib/channel/channel_args.c', 'src/core/lib/channel/channel_stack.c', 'src/core/lib/channel/channel_stack_builder.c', @@ -385,7 +384,6 @@ Pod::Spec.new do |s| 'src/core/lib/json/json_reader.c', 'src/core/lib/json/json_string.c', 'src/core/lib/json/json_writer.c', - 'src/core/lib/load_reporting/load_reporting.c', 'src/core/lib/surface/alarm.c', 'src/core/lib/surface/api_trace.c', 'src/core/lib/surface/byte_buffer.c', @@ -484,6 +482,8 @@ Pod::Spec.new do |s| 'src/core/ext/lb_policy/round_robin/round_robin.c', 'src/core/ext/resolver/dns/native/dns_resolver.c', 'src/core/ext/resolver/sockaddr/sockaddr_resolver.c', + 'src/core/ext/load_reporting/load_reporting.c', + 'src/core/ext/load_reporting/load_reporting_filter.c', 'src/core/ext/census/context.c', 'src/core/ext/census/grpc_context.c', 'src/core/ext/census/grpc_filter.c', @@ -507,7 +507,6 @@ Pod::Spec.new do |s| 'src/core/lib/support/thd_internal.h', 'src/core/lib/support/time_precise.h', 'src/core/lib/support/tmpfile.h', - 'src/core/ext/load_reporting/load_reporting_filter.h', 'src/core/lib/channel/channel_args.h', 'src/core/lib/channel/channel_stack.h', 'src/core/lib/channel/channel_stack_builder.h', @@ -562,7 +561,6 @@ Pod::Spec.new do |s| 'src/core/lib/json/json_common.h', 'src/core/lib/json/json_reader.h', 'src/core/lib/json/json_writer.h', - 'src/core/lib/load_reporting/load_reporting.h', 'src/core/lib/surface/api_trace.h', 'src/core/lib/surface/call.h', 'src/core/lib/surface/call_test_only.h', @@ -639,6 +637,8 @@ Pod::Spec.new do |s| 'third_party/nanopb/pb_common.h', 'third_party/nanopb/pb_decode.h', 'third_party/nanopb/pb_encode.h', + 'src/core/ext/load_reporting/load_reporting.h', + 'src/core/ext/load_reporting/load_reporting_filter.h', 'src/core/ext/census/aggregation.h', 'src/core/ext/census/census_interface.h', 'src/core/ext/census/census_rpc_stats.h', diff --git a/grpc.gemspec b/grpc.gemspec index 9f786540359..1e3ae8a33df 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -169,7 +169,6 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/grpc_security.h ) s.files += %w( include/grpc/grpc_security_constants.h ) s.files += %w( include/grpc/census.h ) - s.files += %w( src/core/ext/load_reporting/load_reporting_filter.h ) s.files += %w( src/core/lib/channel/channel_args.h ) s.files += %w( src/core/lib/channel/channel_stack.h ) s.files += %w( src/core/lib/channel/channel_stack_builder.h ) @@ -224,7 +223,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/json/json_common.h ) s.files += %w( src/core/lib/json/json_reader.h ) s.files += %w( src/core/lib/json/json_writer.h ) - s.files += %w( src/core/lib/load_reporting/load_reporting.h ) s.files += %w( src/core/lib/surface/api_trace.h ) s.files += %w( src/core/lib/surface/call.h ) s.files += %w( src/core/lib/surface/call_test_only.h ) @@ -301,6 +299,8 @@ Gem::Specification.new do |s| s.files += %w( third_party/nanopb/pb_common.h ) s.files += %w( third_party/nanopb/pb_decode.h ) s.files += %w( third_party/nanopb/pb_encode.h ) + s.files += %w( src/core/ext/load_reporting/load_reporting.h ) + s.files += %w( src/core/ext/load_reporting/load_reporting_filter.h ) s.files += %w( src/core/ext/census/aggregation.h ) s.files += %w( src/core/ext/census/census_interface.h ) s.files += %w( src/core/ext/census/census_rpc_stats.h ) @@ -308,7 +308,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/census/mlog.h ) s.files += %w( src/core/ext/census/rpc_metric_id.h ) s.files += %w( src/core/lib/surface/init.c ) - s.files += %w( src/core/ext/load_reporting/load_reporting_filter.c ) s.files += %w( src/core/lib/channel/channel_args.c ) s.files += %w( src/core/lib/channel/channel_stack.c ) s.files += %w( src/core/lib/channel/channel_stack_builder.c ) @@ -365,7 +364,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/json/json_reader.c ) s.files += %w( src/core/lib/json/json_string.c ) s.files += %w( src/core/lib/json/json_writer.c ) - s.files += %w( src/core/lib/load_reporting/load_reporting.c ) s.files += %w( src/core/lib/surface/alarm.c ) s.files += %w( src/core/lib/surface/api_trace.c ) s.files += %w( src/core/lib/surface/byte_buffer.c ) @@ -464,6 +462,8 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/lb_policy/round_robin/round_robin.c ) s.files += %w( src/core/ext/resolver/dns/native/dns_resolver.c ) s.files += %w( src/core/ext/resolver/sockaddr/sockaddr_resolver.c ) + s.files += %w( src/core/ext/load_reporting/load_reporting.c ) + s.files += %w( src/core/ext/load_reporting/load_reporting_filter.c ) s.files += %w( src/core/ext/census/context.c ) s.files += %w( src/core/ext/census/grpc_context.c ) s.files += %w( src/core/ext/census/grpc_filter.c ) diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index 4c7373006b2..69f70cbf9ba 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -115,6 +115,8 @@ typedef struct { /* Channel argument keys: */ /** Enable census for tracing and stats collection */ #define GRPC_ARG_ENABLE_CENSUS "grpc.census" +/** Enable load reporting */ +#define GRPC_ARG_ENABLE_LOAD_REPORTING "grpc.loadreporting" /** Maximum number of concurrent incoming streams to allow on a http2 connection */ #define GRPC_ARG_MAX_CONCURRENT_STREAMS "grpc.max_concurrent_streams" diff --git a/package.xml b/package.xml index b106fb82fde..6080fe24790 100644 --- a/package.xml +++ b/package.xml @@ -176,7 +176,6 @@ - @@ -231,7 +230,6 @@ - @@ -308,6 +306,8 @@ + + @@ -315,7 +315,6 @@ - @@ -372,7 +371,6 @@ - @@ -471,6 +469,8 @@ + + diff --git a/src/core/ext/load_reporting/load_reporting.c b/src/core/ext/load_reporting/load_reporting.c new file mode 100644 index 00000000000..9081ffce15b --- /dev/null +++ b/src/core/ext/load_reporting/load_reporting.c @@ -0,0 +1,101 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include + +#include +#include + +#include "src/core/ext/load_reporting/load_reporting.h" +#include "src/core/ext/load_reporting/load_reporting_filter.h" +#include "src/core/lib/channel/channel_stack_builder.h" +#include "src/core/lib/surface/channel_init.h" + +struct grpc_load_reporting_data { + grpc_load_reporting_fn fn; + void *data; +}; + +grpc_load_reporting_data *grpc_load_reporting_create(grpc_load_reporting_fn fn, + void *data) { + grpc_load_reporting_data *lrd = gpr_malloc(sizeof(grpc_load_reporting_data)); + lrd->fn = fn; + lrd->data = data; + return lrd; +} + +void grpc_load_reporting_destroy(grpc_load_reporting_data *lrd) { + gpr_free(lrd); +} + +void grpc_load_reporting_call(grpc_load_reporting_data *lrd, + const grpc_call_stats *stats) { + if (lrd->fn != NULL) { + lrd->fn(lrd->data, stats); + } +} + +static bool is_load_reporting_enabled(const grpc_channel_args *a) { + if (a == NULL) return false; + for (size_t i = 0; i < a->num_args; i++) { + if (0 == strcmp(a->args[i].key, GRPC_ARG_ENABLE_LOAD_REPORTING)) { + return a->args[i].value.pointer.p != NULL; + } + } + return false; +} + +static bool maybe_add_load_reporting_filter(grpc_channel_stack_builder *builder, + void *arg) { + const grpc_channel_args *args = + grpc_channel_stack_builder_get_channel_arguments(builder); + if (is_load_reporting_enabled(args)) { + return grpc_channel_stack_builder_prepend_filter( + builder, (const grpc_channel_filter *)arg, NULL, NULL); + } + return true; +} + +/* Plugin registration */ + +void grpc_load_reporting_plugin_init(void) { + grpc_channel_init_register_stage(GRPC_CLIENT_CHANNEL, INT_MAX, + maybe_add_load_reporting_filter, + (void *)&grpc_load_reporting_filter); + grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, INT_MAX, + maybe_add_load_reporting_filter, + (void *)&grpc_load_reporting_filter); +} + +void grpc_load_reporting_plugin_shutdown() {} diff --git a/src/core/lib/load_reporting/load_reporting.h b/src/core/ext/load_reporting/load_reporting.h similarity index 76% rename from src/core/lib/load_reporting/load_reporting.h rename to src/core/ext/load_reporting/load_reporting.h index afc9090d0cf..fcf555da850 100644 --- a/src/core/lib/load_reporting/load_reporting.h +++ b/src/core/ext/load_reporting/load_reporting.h @@ -31,35 +31,34 @@ * */ -#ifndef GRPC_CORE_LIB_LOAD_REPORTING_LOAD_REPORTING_H -#define GRPC_CORE_LIB_LOAD_REPORTING_LOAD_REPORTING_H +#ifndef GRPC_CORE_EXT_LOAD_REPORTING_LOAD_REPORTING_H +#define GRPC_CORE_EXT_LOAD_REPORTING_LOAD_REPORTING_H #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/surface/call.h" +typedef struct grpc_load_reporting_data grpc_load_reporting_data; + /** Custom function to be called by the load reporting filter. * * The \a data pointer is the same as the one passed to \a * grpc_load_reporting_init. \a stats are the final per-call statistics gathered * by the gRPC runtime. */ -typedef void (*load_reporting_fn)(void *data, const grpc_call_stats *stats); +typedef void (*grpc_load_reporting_fn)(void *data, + const grpc_call_stats *stats); /** Register \a fn as the function to be invoked by the load reporting filter, * passing \a data as its namesake argument. To be called only from a plugin * init function. */ -void grpc_load_reporting_init(load_reporting_fn fn, void *data); +grpc_load_reporting_data *grpc_load_reporting_create(grpc_load_reporting_fn fn, + void *data); -/** Takes care of freeing the memory allocated for \a data (see \a - * grpc_load_reporting_init), if any. To be called only from a plugin destroy - * function. */ -void grpc_load_reporting_destroy(); +// XXX +void grpc_load_reporting_destroy(grpc_load_reporting_data *lrd); /** Invoke the function registered by \a grpc_load_reporting_init, passing it \a * stats as one of the arguments (see \a load_reporting_fn). */ -void grpc_load_reporting_call(const grpc_call_stats *stats); - -/** Returns the custom load reporting data, as registered in \a - * grpc_load_reporting_init. */ -void *grpc_load_reporting_data(); +void grpc_load_reporting_call(grpc_load_reporting_data *lrd, + const grpc_call_stats *stats); -#endif /* GRPC_CORE_LIB_LOAD_REPORTING_LOAD_REPORTING_H */ +#endif /* GRPC_CORE_EXT_LOAD_REPORTING_LOAD_REPORTING_H */ diff --git a/src/core/ext/load_reporting/load_reporting_filter.c b/src/core/ext/load_reporting/load_reporting_filter.c index fc62a4dd0a8..31d38251b99 100644 --- a/src/core/ext/load_reporting/load_reporting_filter.c +++ b/src/core/ext/load_reporting/load_reporting_filter.c @@ -31,15 +31,16 @@ * */ +#include #include +#include "src/core/ext/load_reporting/load_reporting.h" #include "src/core/ext/load_reporting/load_reporting_filter.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/load_reporting/load_reporting.h" #include "src/core/lib/profiling/timers.h" typedef struct call_data { void *dummy; } call_data; -typedef struct channel_data { void *dummy; } channel_data; +typedef struct channel_data { grpc_load_reporting_data *lrd; } channel_data; /* Constructor for call_data */ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, @@ -48,8 +49,9 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, /* Destructor for call_data */ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, const grpc_call_stats *stats) { + channel_data *chand = elem->channel_data; GPR_TIMER_BEGIN("load_reporting_filter", 0); - grpc_load_reporting_call(stats); + grpc_load_reporting_call(chand->lrd, stats); GPR_TIMER_END("load_reporting_filter", 0); } @@ -58,11 +60,26 @@ static void init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_channel_element_args *args) { GPR_ASSERT(!args->is_last); + + channel_data *chand = elem->channel_data; + memset(chand, 0, sizeof(channel_data)); + + for (size_t i = 0; i < args->channel_args->num_args; i++) { + if (0 == strcmp(args->channel_args->args[i].key, GRPC_ARG_ENABLE_LOAD_REPORTING)) { + chand->lrd = args->channel_args->args[i].value.pointer.p; + GPR_ASSERT(chand->lrd != NULL); + } + } + GPR_ASSERT(chand->lrd != NULL); /* arg actually found */ + } /* Destructor for channel data */ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, - grpc_channel_element *elem) {} + grpc_channel_element *elem) { + channel_data *chand = elem->channel_data; + grpc_load_reporting_destroy(chand->lrd); +} const grpc_channel_filter grpc_load_reporting_filter = { grpc_call_next_op, diff --git a/src/core/lib/load_reporting/load_reporting.c b/src/core/lib/load_reporting/load_reporting.c deleted file mode 100644 index dbb1ba5c631..00000000000 --- a/src/core/lib/load_reporting/load_reporting.c +++ /dev/null @@ -1,72 +0,0 @@ -/* - * - * Copyright 2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -#include - -#include "src/core/lib/load_reporting/load_reporting.h" - -typedef struct load_reporting { - gpr_mu mu; - load_reporting_fn fn; - void *data; -} load_reporting; - -static load_reporting g_load_reporting; - -void grpc_load_reporting_init(load_reporting_fn fn, void *data) { - gpr_mu_init(&g_load_reporting.mu); - g_load_reporting.fn = fn; - g_load_reporting.data = data; -} - -void grpc_load_reporting_destroy() { - gpr_free(g_load_reporting.data); - g_load_reporting.data = NULL; - gpr_mu_destroy(&g_load_reporting.mu); -} - -void grpc_load_reporting_call(const grpc_call_stats *stats) { - if (g_load_reporting.fn != NULL) { - gpr_mu_lock(&g_load_reporting.mu); - g_load_reporting.fn(g_load_reporting.data, stats); - gpr_mu_unlock(&g_load_reporting.mu); - } -} - -void *grpc_load_reporting_data() { - gpr_mu_lock(&g_load_reporting.mu); - void *data = g_load_reporting.data; - gpr_mu_unlock(&g_load_reporting.mu); - return data; -} diff --git a/src/core/plugin_registry/grpc_plugin_registry.c b/src/core/plugin_registry/grpc_plugin_registry.c index 822aa6d8b75..905cd59e23d 100644 --- a/src/core/plugin_registry/grpc_plugin_registry.c +++ b/src/core/plugin_registry/grpc_plugin_registry.c @@ -45,6 +45,8 @@ extern void grpc_resolver_dns_native_init(void); extern void grpc_resolver_dns_native_shutdown(void); extern void grpc_resolver_sockaddr_init(void); extern void grpc_resolver_sockaddr_shutdown(void); +extern void grpc_load_reporting_plugin_init(void); +extern void grpc_load_reporting_plugin_shutdown(void); extern void census_grpc_plugin_init(void); extern void census_grpc_plugin_shutdown(void); @@ -61,6 +63,8 @@ void grpc_register_built_in_plugins(void) { grpc_resolver_dns_native_shutdown); grpc_register_plugin(grpc_resolver_sockaddr_init, grpc_resolver_sockaddr_shutdown); + grpc_register_plugin(grpc_load_reporting_plugin_init, + grpc_load_reporting_plugin_shutdown); grpc_register_plugin(census_grpc_plugin_init, census_grpc_plugin_shutdown); } diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 3f7f96501ad..385211b339e 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -75,7 +75,6 @@ CORE_SOURCE_FILES = [ 'src/core/lib/support/tmpfile_win32.c', 'src/core/lib/support/wrap_memcpy.c', 'src/core/lib/surface/init.c', - 'src/core/ext/load_reporting/load_reporting_filter.c', 'src/core/lib/channel/channel_args.c', 'src/core/lib/channel/channel_stack.c', 'src/core/lib/channel/channel_stack_builder.c', @@ -132,7 +131,6 @@ CORE_SOURCE_FILES = [ 'src/core/lib/json/json_reader.c', 'src/core/lib/json/json_string.c', 'src/core/lib/json/json_writer.c', - 'src/core/lib/load_reporting/load_reporting.c', 'src/core/lib/surface/alarm.c', 'src/core/lib/surface/api_trace.c', 'src/core/lib/surface/byte_buffer.c', @@ -231,6 +229,8 @@ CORE_SOURCE_FILES = [ 'src/core/ext/lb_policy/round_robin/round_robin.c', 'src/core/ext/resolver/dns/native/dns_resolver.c', 'src/core/ext/resolver/sockaddr/sockaddr_resolver.c', + 'src/core/ext/load_reporting/load_reporting.c', + 'src/core/ext/load_reporting/load_reporting_filter.c', 'src/core/ext/census/context.c', 'src/core/ext/census/grpc_context.c', 'src/core/ext/census/grpc_filter.c', diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 13c237f912d..592d2a67fc1 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -788,7 +788,6 @@ include/grpc/impl/codegen/time.h \ include/grpc/grpc_security.h \ include/grpc/grpc_security_constants.h \ include/grpc/census.h \ -src/core/ext/load_reporting/load_reporting_filter.h \ src/core/lib/channel/channel_args.h \ src/core/lib/channel/channel_stack.h \ src/core/lib/channel/channel_stack_builder.h \ @@ -843,7 +842,6 @@ src/core/lib/json/json.h \ src/core/lib/json/json_common.h \ src/core/lib/json/json_reader.h \ src/core/lib/json/json_writer.h \ -src/core/lib/load_reporting/load_reporting.h \ src/core/lib/surface/api_trace.h \ src/core/lib/surface/call.h \ src/core/lib/surface/call_test_only.h \ @@ -920,6 +918,8 @@ third_party/nanopb/pb.h \ third_party/nanopb/pb_common.h \ third_party/nanopb/pb_decode.h \ third_party/nanopb/pb_encode.h \ +src/core/ext/load_reporting/load_reporting.h \ +src/core/ext/load_reporting/load_reporting_filter.h \ src/core/ext/census/aggregation.h \ src/core/ext/census/census_interface.h \ src/core/ext/census/census_rpc_stats.h \ @@ -927,7 +927,6 @@ src/core/ext/census/grpc_filter.h \ src/core/ext/census/mlog.h \ src/core/ext/census/rpc_metric_id.h \ src/core/lib/surface/init.c \ -src/core/ext/load_reporting/load_reporting_filter.c \ src/core/lib/channel/channel_args.c \ src/core/lib/channel/channel_stack.c \ src/core/lib/channel/channel_stack_builder.c \ @@ -984,7 +983,6 @@ src/core/lib/json/json.c \ src/core/lib/json/json_reader.c \ src/core/lib/json/json_string.c \ src/core/lib/json/json_writer.c \ -src/core/lib/load_reporting/load_reporting.c \ src/core/lib/surface/alarm.c \ src/core/lib/surface/api_trace.c \ src/core/lib/surface/byte_buffer.c \ @@ -1083,6 +1081,8 @@ src/core/ext/lb_policy/pick_first/pick_first.c \ src/core/ext/lb_policy/round_robin/round_robin.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ src/core/ext/resolver/sockaddr/sockaddr_resolver.c \ +src/core/ext/load_reporting/load_reporting.c \ +src/core/ext/load_reporting/load_reporting_filter.c \ src/core/ext/census/context.c \ src/core/ext/census/grpc_context.c \ src/core/ext/census/grpc_filter.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 379ddb76d62..c719b55a3ba 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -1248,22 +1248,6 @@ "third_party": false, "type": "target" }, - { - "deps": [ - "gpr", - "gpr_test_util", - "grpc", - "grpc_test_util" - ], - "headers": [], - "language": "c", - "name": "load_reporting_registration_test", - "src": [ - "test/core/load_reporting/load_reporting_registration.c" - ], - "third_party": false, - "type": "target" - }, { "deps": [ "gpr", @@ -4150,6 +4134,7 @@ "grpc_lb_policy_grpclb", "grpc_lb_policy_pick_first", "grpc_lb_policy_round_robin", + "grpc_load_reporting", "grpc_resolver_dns_native", "grpc_resolver_sockaddr", "grpc_secure", @@ -5606,7 +5591,6 @@ "include/grpc/compression.h", "include/grpc/grpc.h", "include/grpc/status.h", - "src/core/ext/load_reporting/load_reporting_filter.h", "src/core/lib/channel/channel_args.h", "src/core/lib/channel/channel_stack.h", "src/core/lib/channel/channel_stack_builder.h", @@ -5661,7 +5645,6 @@ "src/core/lib/json/json_common.h", "src/core/lib/json/json_reader.h", "src/core/lib/json/json_writer.h", - "src/core/lib/load_reporting/load_reporting.h", "src/core/lib/surface/api_trace.h", "src/core/lib/surface/call.h", "src/core/lib/surface/call_test_only.h", @@ -5690,8 +5673,6 @@ "include/grpc/compression.h", "include/grpc/grpc.h", "include/grpc/status.h", - "src/core/ext/load_reporting/load_reporting_filter.c", - "src/core/ext/load_reporting/load_reporting_filter.h", "src/core/lib/channel/channel_args.c", "src/core/lib/channel/channel_args.h", "src/core/lib/channel/channel_stack.c", @@ -5802,8 +5783,6 @@ "src/core/lib/json/json_string.c", "src/core/lib/json/json_writer.c", "src/core/lib/json/json_writer.h", - "src/core/lib/load_reporting/load_reporting.c", - "src/core/lib/load_reporting/load_reporting.h", "src/core/lib/surface/alarm.c", "src/core/lib/surface/api_trace.c", "src/core/lib/surface/api_trace.h", @@ -5994,6 +5973,26 @@ "third_party": false, "type": "filegroup" }, + { + "deps": [ + "gpr", + "grpc_base" + ], + "headers": [ + "src/core/ext/load_reporting/load_reporting.h", + "src/core/ext/load_reporting/load_reporting_filter.h" + ], + "language": "c", + "name": "grpc_load_reporting", + "src": [ + "src/core/ext/load_reporting/load_reporting.c", + "src/core/ext/load_reporting/load_reporting.h", + "src/core/ext/load_reporting/load_reporting_filter.c", + "src/core/ext/load_reporting/load_reporting_filter.h" + ], + "third_party": false, + "type": "filegroup" + }, { "deps": [ "gpr", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 2c7d8aae462..245108a4817 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -1323,27 +1323,6 @@ "windows" ] }, - { - "args": [], - "ci_platforms": [ - "linux", - "mac", - "posix", - "windows" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "gtest": false, - "language": "c", - "name": "load_reporting_registration_test", - "platforms": [ - "linux", - "mac", - "posix", - "windows" - ] - }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index 5281cdf6cc0..bdae4475456 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -805,17 +805,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lb_policies_test", "vcxproj {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "load_reporting_registration_test", "vcxproj\test\load_reporting_registration_test\load_reporting_registration_test.vcxproj", "{2C80EA2B-46FC-0997-E01A-F29EC3968799}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "message_compress_test", "vcxproj\test\message_compress_test\message_compress_test.vcxproj", "{07170557-CCB0-D23C-8018-C2909D115DF9}" ProjectSection(myProperties) = preProject lib = "False" @@ -2682,22 +2671,6 @@ Global {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Release-DLL|Win32.Build.0 = Release|Win32 {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Release-DLL|x64.ActiveCfg = Release|x64 {62D58A08-3B5E-D6A8-ABBB-77995AA0A8C6}.Release-DLL|x64.Build.0 = Release|x64 - {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Debug|Win32.ActiveCfg = Debug|Win32 - {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Debug|x64.ActiveCfg = Debug|x64 - {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Release|Win32.ActiveCfg = Release|Win32 - {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Release|x64.ActiveCfg = Release|x64 - {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Debug|Win32.Build.0 = Debug|Win32 - {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Debug|x64.Build.0 = Debug|x64 - {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Release|Win32.Build.0 = Release|Win32 - {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Release|x64.Build.0 = Release|x64 - {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Debug-DLL|x64.Build.0 = Debug|x64 - {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Release-DLL|Win32.Build.0 = Release|Win32 - {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Release-DLL|x64.ActiveCfg = Release|x64 - {2C80EA2B-46FC-0997-E01A-F29EC3968799}.Release-DLL|x64.Build.0 = Release|x64 {07170557-CCB0-D23C-8018-C2909D115DF9}.Debug|Win32.ActiveCfg = Debug|Win32 {07170557-CCB0-D23C-8018-C2909D115DF9}.Debug|x64.ActiveCfg = Debug|x64 {07170557-CCB0-D23C-8018-C2909D115DF9}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index b8fca2c74c9..465f2e414ac 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -297,7 +297,6 @@ - @@ -352,7 +351,6 @@ - @@ -429,6 +427,8 @@ + + @@ -439,8 +439,6 @@ - - @@ -553,8 +551,6 @@ - - @@ -751,6 +747,10 @@ + + + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 9d505856d66..f4dfa82f291 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -4,9 +4,6 @@ src\core\lib\surface - - src\core\ext\load_reporting - src\core\lib\channel @@ -175,9 +172,6 @@ src\core\lib\json - - src\core\lib\load_reporting - src\core\lib\surface @@ -472,6 +466,12 @@ src\core\ext\resolver\sockaddr + + src\core\ext\load_reporting + + + src\core\ext\load_reporting + src\core\ext\census @@ -590,9 +590,6 @@ - - src\core\ext\load_reporting - src\core\lib\channel @@ -755,9 +752,6 @@ src\core\lib\json - - src\core\lib\load_reporting - src\core\lib\surface @@ -986,6 +980,12 @@ third_party\nanopb + + src\core\ext\load_reporting + + + src\core\ext\load_reporting + src\core\ext\census @@ -1124,9 +1124,6 @@ {cb2b0073-f2a7-5c63-d182-8874b24bdf36} - - {0048bb64-a4b2-9f8e-c029-b43c8c207264} - {c4661d64-349f-01c1-1ba8-0602f9047595} diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 81f63ac0ff4..26050dcf74e 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -286,7 +286,6 @@ - @@ -341,7 +340,6 @@ - @@ -416,8 +414,6 @@ - - @@ -530,8 +526,6 @@ - - diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index e8d22bfa55e..a4acf513bc1 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -7,9 +7,6 @@ src\core\lib\surface - - src\core\ext\load_reporting - src\core\lib\channel @@ -178,9 +175,6 @@ src\core\lib\json - - src\core\lib\load_reporting - src\core\lib\surface @@ -524,9 +518,6 @@ - - src\core\ext\load_reporting - src\core\lib\channel @@ -689,9 +680,6 @@ src\core\lib\json - - src\core\lib\load_reporting - src\core\lib\surface @@ -950,9 +938,6 @@ {e5fc1091-5d60-404f-775b-686ef4b3266f} - - {2d6e3879-24c7-06e2-b415-40ab18a3b918} - {88c78e27-267a-95df-07c5-50e5fbc2f40c} @@ -1010,9 +995,6 @@ {681cdaeb-c47f-8853-d985-bf13c2873947} - - {2d492e12-b2aa-48d8-8e90-c55a605fb34a} - {506dc3b3-d884-2b59-0dfa-57ed6affa2d3} diff --git a/vsprojects/vcxproj/test/load_reporting_registration_test/load_reporting_registration_test.vcxproj b/vsprojects/vcxproj/test/load_reporting_registration_test/load_reporting_registration_test.vcxproj deleted file mode 100644 index d1e3d703c72..00000000000 --- a/vsprojects/vcxproj/test/load_reporting_registration_test/load_reporting_registration_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {2C80EA2B-46FC-0997-E01A-F29EC3968799} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - load_reporting_registration_test - static - Debug - static - Debug - - - load_reporting_registration_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/load_reporting_registration_test/load_reporting_registration_test.vcxproj.filters b/vsprojects/vcxproj/test/load_reporting_registration_test/load_reporting_registration_test.vcxproj.filters deleted file mode 100644 index 69b5cd5af4b..00000000000 --- a/vsprojects/vcxproj/test/load_reporting_registration_test/load_reporting_registration_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\load_reporting - - - - - - {950938ee-82ca-61f1-2c15-25af9a3cae2f} - - - {23ff812e-a51d-2d43-3a02-fd70dce0f5cf} - - - {0ddb1f19-8a9e-1216-4470-3449d37480db} - - - - From 97244d5810e2b0c2b5733094d46d13a061a94424 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 29 Apr 2016 08:05:57 -0700 Subject: [PATCH 0141/1894] clang-format, make code more self-documenting --- test/cpp/qps/client.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 63fc3156e51..175529f01b2 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -39,8 +39,8 @@ #include #include -#include #include +#include #include #include @@ -304,16 +304,17 @@ class ClientImpl : public Client { } void init(const grpc::string& target, const ClientConfig& config, std::function(std::shared_ptr)> - create_stub, int shard) { + create_stub, + int shard) { // We have to use a 2-phase init like this with a default // constructor followed by an initializer function to make // old compilers happy with using this in std::vector ChannelArguments args; - args.SetInt("shard", shard); + args.SetInt("shard_to_ensure_no_subchannel_merges", shard); channel_ = CreateTestChannel( target, config.security_params().server_host_override(), - config.has_security_params(), - !config.security_params().use_test_ca(), std::shared_ptr(), args); + config.has_security_params(), !config.security_params().use_test_ca(), + std::shared_ptr(), args); stub_ = create_stub(channel_); } Channel* get_channel() { return channel_.get(); } From 40f11aa5dc706892d1a5b848ac9f9d85a0cf12cd Mon Sep 17 00:00:00 2001 From: Paul Querna Date: Thu, 3 Mar 2016 23:09:06 -0800 Subject: [PATCH 0142/1894] Objective-C: Add ChannelCredentials to gRPC Call. GRPCHost now has a property channelCreds which is used when creating a GRPCChannel. --- .../GRPCClient/GRPCCall+ChannelCredentials.h | 56 +++++++++++ .../GRPCClient/GRPCCall+ChannelCredentials.m | 66 +++++++++++++ src/objective-c/GRPCClient/GRPCCall+Tests.m | 12 ++- .../GRPCClient/private/GRPCChannel.h | 12 --- .../GRPCClient/private/GRPCChannel.m | 52 ----------- src/objective-c/GRPCClient/private/GRPCHost.h | 7 +- src/objective-c/GRPCClient/private/GRPCHost.m | 92 +++++++++++++++++-- 7 files changed, 224 insertions(+), 73 deletions(-) create mode 100644 src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h create mode 100644 src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.m diff --git a/src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h b/src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h new file mode 100644 index 00000000000..343dd48a14e --- /dev/null +++ b/src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h @@ -0,0 +1,56 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#import "GRPCCall.h" + +/** Helpers for setting TLS Trusted Roots, Client Certificates, and Private Key */ +@interface GRPCCall (ChannelCredentials) + +/** + * Use the provided @c pemRootCert as the set of trusted root Certificate Authorities for @c host. + */ ++ (BOOL)setTLSPEMRootCerts:(nullable NSString *)pemRootCert + forHost:(nonnull NSString *)host + error:(NSError **)errorPtr; +/** + * Configures @c host with TLS/SSL Client Credentials and optionally trusted root Certificate + * Authorities. If @c pemRootCerts is nil, the default CA Certificates bundled with gRPC will be + * used. + */ ++ (BOOL)setTLSPEMRootCerts:(nullable NSString *)pemRootCerts + withPrivateKey:(nullable NSString *)pemPrivateKey + withCertChain:(nullable NSString *)pemCertChain + forHost:(nonnull NSString *)host + error:(NSError **)errorPtr; + +@end diff --git a/src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.m b/src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.m new file mode 100644 index 00000000000..a8bcd0aab49 --- /dev/null +++ b/src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.m @@ -0,0 +1,66 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#import "GRPCCall+ChannelCredentials.h" + +#import "private/GRPCHost.h" + +@implementation GRPCCall (ChannelCredentials) + ++ (BOOL)setTLSPEMRootCerts:(nullable NSString *)pemRootCerts + withPrivateKey:(nullable NSString *)pemPrivateKey + withCertChain:(nullable NSString *)pemCertChain + forHost:(nonnull NSString *)host + error:(NSError **)errorPtr { + if (!host) { + [NSException raise:NSInvalidArgumentException + format:@"host must be provided."]; + } + GRPCHost *hostConfig = [GRPCHost hostWithAddress:host]; + return [hostConfig setTLSPEMRootCerts:pemRootCerts + withPrivateKey:pemPrivateKey + withCertChain:pemCertChain + error:errorPtr]; +} + ++ (BOOL)setTLSPEMRootCerts:(nullable NSString *)pemRootCerts + forHost:(nonnull NSString *)host + error:(NSError **)errorPtr { + return [GRPCCall setTLSPEMRootCerts:pemRootCerts + withPrivateKey:nil + withCertChain:nil + forHost:host + error:errorPtr]; +} + +@end diff --git a/src/objective-c/GRPCClient/GRPCCall+Tests.m b/src/objective-c/GRPCClient/GRPCCall+Tests.m index c8e81337031..b9456691bd8 100644 --- a/src/objective-c/GRPCClient/GRPCCall+Tests.m +++ b/src/objective-c/GRPCClient/GRPCCall+Tests.m @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -43,8 +43,16 @@ if (!host || !certsPath || !testName) { [NSException raise:NSInvalidArgumentException format:@"host, path and name must be provided."]; } + NSError *error = nil; + NSString *certs = [NSString stringWithContentsOfFile:certsPath + encoding:NSUTF8StringEncoding + error:&error]; + if (error != nil) { + [NSException raise:[error localizedDescription] format:@"failed to load certs"]; + } + GRPCHost *hostConfig = [GRPCHost hostWithAddress:host]; - hostConfig.pathToCertificates = certsPath; + [hostConfig setTLSPEMRootCerts:certs withPrivateKey:nil withCertChain:nil error:nil]; hostConfig.hostNameOverride = testName; } diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.h b/src/objective-c/GRPCClient/private/GRPCChannel.h index 73bf8d95e72..70d1a9bd2ff 100644 --- a/src/objective-c/GRPCClient/private/GRPCChannel.h +++ b/src/objective-c/GRPCClient/private/GRPCChannel.h @@ -55,18 +55,6 @@ struct grpc_channel_credentials; */ + (nullable GRPCChannel *)secureChannelWithHost:(nonnull NSString *)host; -/** - * Creates a secure channel to the specified @c host using the specified @c pathToCertificates and - * @c channelArgs. Only in tests should @c pathToCertificates be nil or - * @c GRPC_SSL_TARGET_NAME_OVERRIDE_ARG channel arg be set. Passing nil for @c pathToCertificates - * results in using the default root certificates distributed with the library. If certificates - * could not be found in any case, then @c nil is returned. - */ -+ (nullable GRPCChannel *)secureChannelWithHost:(nonnull NSString *)host - pathToCertificates:(nullable NSString *)pathToCertificates - channelArgs:(nullable NSDictionary *)channelArgs; - - /** * Creates a secure channel to the specified @c host using the specified @c credentials and * @c channelArgs. Only in tests should @c GRPC_SSL_TARGET_NAME_OVERRIDE_ARG channel arg be set. diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.m b/src/objective-c/GRPCClient/private/GRPCChannel.m index 926f55048db..203ef58c0dd 100644 --- a/src/objective-c/GRPCClient/private/GRPCChannel.m +++ b/src/objective-c/GRPCClient/private/GRPCChannel.m @@ -40,26 +40,6 @@ #import "GRPCCompletionQueue.h" -/** - * Returns @c grpc_channel_credentials from the specified @c path. If the file at the path could not - * be read then NULL is returned. If NULL is returned, @c errorPtr may not be NULL if there are - * details available describing what went wrong. - */ -static grpc_channel_credentials *CertificatesAtPath(NSString *path, NSError **errorPtr) { - // Files in PEM format can have non-ASCII characters in their comments (e.g. for the name of the - // issuer). Load them as UTF8 and produce an ASCII equivalent. - NSString *contentInUTF8 = [NSString stringWithContentsOfFile:path - encoding:NSUTF8StringEncoding - error:errorPtr]; - NSData *contentInASCII = [contentInUTF8 dataUsingEncoding:NSASCIIStringEncoding - allowLossyConversion:YES]; - if (!contentInASCII.bytes) { - // Passing NULL to grpc_ssl_credentials_create produces behavior we don't want, so return. - return NULL; - } - return grpc_ssl_credentials_create(contentInASCII.bytes, NULL, NULL); -} - void freeChannelArgs(grpc_channel_args *channel_args) { for (size_t i = 0; i < channel_args->num_args; ++i) { grpc_arg *arg = &channel_args->args[i]; @@ -157,38 +137,6 @@ grpc_channel_args * buildChannelArgs(NSDictionary *dictionary) { return [[GRPCChannel alloc] initWithHost:host secure:YES credentials:NULL channelArgs:NULL]; } -+ (GRPCChannel *)secureChannelWithHost:(NSString *)host - pathToCertificates:(NSString *)path - channelArgs:(NSDictionary *)channelArgs { - // Load default SSL certificates once. - static grpc_channel_credentials *kDefaultCertificates; - static dispatch_once_t loading; - dispatch_once(&loading, ^{ - NSString *defaultPath = @"gRPCCertificates.bundle/roots"; // .pem - // Do not use NSBundle.mainBundle, as it's nil for tests of library projects. - NSBundle *bundle = [NSBundle bundleForClass:self.class]; - NSString *path = [bundle pathForResource:defaultPath ofType:@"pem"]; - NSError *error; - kDefaultCertificates = CertificatesAtPath(path, &error); - NSAssert(kDefaultCertificates, @"Could not read %@/%@.pem. This file, with the root " - "certificates, is needed to establish secure (TLS) connections. Because the file is " - "distributed with the gRPC library, this error is usually a sign that the library " - "wasn't configured correctly for your project. Error: %@", - bundle.bundlePath, defaultPath, error); - }); - - //TODO(jcanizales): Add NSError** parameter to the initializer. - grpc_channel_credentials *certificates = path - ? CertificatesAtPath(path, NULL) - : kDefaultCertificates; - - return [[GRPCChannel alloc] initWithHost:host - secure:YES - credentials:certificates - channelArgs:channelArgs]; -} - - + (GRPCChannel *)secureChannelWithHost:(NSString *)host credentials:(struct grpc_channel_credentials *)credentials channelArgs:(NSDictionary *)channelArgs { diff --git a/src/objective-c/GRPCClient/private/GRPCHost.h b/src/objective-c/GRPCClient/private/GRPCHost.h index e58bb7a2d94..9220e2a33db 100644 --- a/src/objective-c/GRPCClient/private/GRPCHost.h +++ b/src/objective-c/GRPCClient/private/GRPCHost.h @@ -37,23 +37,28 @@ NS_ASSUME_NONNULL_BEGIN @class GRPCCompletionQueue; struct grpc_call; +struct grpc_channel_credentials; @interface GRPCHost : NSObject @property(nonatomic, readonly) NSString *address; @property(nonatomic, copy, nullable) NSString *userAgentPrefix; +@property(nonatomic, nullable) struct grpc_channel_credentials *channelCreds; /** The following properties should only be modified for testing: */ @property(nonatomic, getter=isSecure) BOOL secure; -@property(nonatomic, copy, nullable) NSString *pathToCertificates; @property(nonatomic, copy, nullable) NSString *hostNameOverride; - (nullable instancetype)init NS_UNAVAILABLE; /** Host objects initialized with the same address are the same. */ + (nullable instancetype)hostWithAddress:(NSString *)address; - (nullable instancetype)initWithAddress:(NSString *)address NS_DESIGNATED_INITIALIZER; +- (BOOL)setTLSPEMRootCerts:(nullable NSString *)pemRootCerts + withPrivateKey:(nullable NSString *)pemPrivateKey + withCertChain:(nullable NSString *)pemCertChain + error:(NSError **)errorPtr; /** Create a grpc_call object to the provided path on this host. */ - (nullable struct grpc_call *)unmanagedCallWithPath:(NSString *)path diff --git a/src/objective-c/GRPCClient/private/GRPCHost.m b/src/objective-c/GRPCClient/private/GRPCHost.m index 739d808c530..43166cbb527 100644 --- a/src/objective-c/GRPCClient/private/GRPCHost.m +++ b/src/objective-c/GRPCClient/private/GRPCHost.m @@ -34,6 +34,7 @@ #import "GRPCHost.h" #include +#include #import #import @@ -56,6 +57,12 @@ NS_ASSUME_NONNULL_BEGIN return [[self alloc] initWithAddress:address]; } +- (void)dealloc { + if (_channelCreds != nil) { + grpc_channel_credentials_release(_channelCreds); + } +} + // Default initializer. - (nullable instancetype)initWithAddress:(NSString *)address { if (!address) { @@ -105,6 +112,75 @@ NS_ASSUME_NONNULL_BEGIN return [channel unmanagedCallWithPath:path completionQueue:queue]; } +- (BOOL)setTLSPEMRootCerts:(nullable NSString *)pemRootCerts + withPrivateKey:(nullable NSString *)pemPrivateKey + withCertChain:(nullable NSString *)pemCertChain + error:(NSError **)errorPtr { + static NSData *kDefaultRootsASCII; + static NSError *kDefaultRootsError; + static dispatch_once_t loading; + dispatch_once(&loading, ^{ + NSString *defaultPath = @"gRPCCertificates.bundle/roots"; // .pem + // Do not use NSBundle.mainBundle, as it's nil for tests of library projects. + NSBundle *bundle = [NSBundle bundleForClass:self.class]; + NSString *path = [bundle pathForResource:defaultPath ofType:@"pem"]; + NSError *error; + // Files in PEM format can have non-ASCII characters in their comments (e.g. for the name of the + // issuer). Load them as UTF8 and produce an ASCII equivalent. + NSString *contentInUTF8 = [NSString stringWithContentsOfFile:path + encoding:NSUTF8StringEncoding + error:&error]; + if (contentInUTF8 == nil) { + kDefaultRootsError = error; + return; + } + kDefaultRootsASCII = [contentInUTF8 dataUsingEncoding:NSASCIIStringEncoding + allowLossyConversion:YES]; + }); + + NSData *rootsASCII; + if (pemRootCerts != nil) { + rootsASCII = [pemRootCerts dataUsingEncoding:NSASCIIStringEncoding + allowLossyConversion:YES]; + } else { + if (kDefaultRootsASCII == nil) { + if (errorPtr) { + *errorPtr = kDefaultRootsError; + } + NSAssert(kDefaultRootsASCII, @"Could not read gRPCCertificates.bundle/roots.pem. This file, " + "with the root certificates, is needed to establish secure (TLS) connections. " + "Because the file is distributed with the gRPC library, this error is usually a sign " + "that the library wasn't configured correctly for your project. Error: %@", + kDefaultRootsError); + return NO; + } + rootsASCII = kDefaultRootsASCII; + } + + grpc_channel_credentials *creds; + if (pemPrivateKey == nil && pemCertChain == nil) { + creds = grpc_ssl_credentials_create(rootsASCII.bytes, NULL, NULL); + } else { + grpc_ssl_pem_key_cert_pair key_cert_pair; + NSData *privateKeyASCII = [pemPrivateKey dataUsingEncoding:NSASCIIStringEncoding + allowLossyConversion:YES]; + NSData *certChainASCII = [pemCertChain dataUsingEncoding:NSASCIIStringEncoding + allowLossyConversion:YES]; + key_cert_pair.private_key = privateKeyASCII.bytes; + key_cert_pair.cert_chain = certChainASCII.bytes; + creds = grpc_ssl_credentials_create(rootsASCII.bytes, &key_cert_pair, NULL); + } + + @synchronized(self) { + if (_channelCreds != nil) { + grpc_channel_credentials_release(_channelCreds); + } + _channelCreds = creds; + } + + return YES; +} + - (NSDictionary *)channelArgs { NSMutableDictionary *args = [NSMutableDictionary dictionary]; @@ -125,9 +201,16 @@ NS_ASSUME_NONNULL_BEGIN - (GRPCChannel *)newChannel { NSDictionary *args = [self channelArgs]; if (_secure) { - return [GRPCChannel secureChannelWithHost:_address - pathToCertificates:_pathToCertificates - channelArgs:args]; + GRPCChannel *channel; + @synchronized(self) { + if (_channelCreds == nil) { + [self setTLSPEMRootCerts:nil withPrivateKey:nil withCertChain:nil error:nil]; + } + channel = [GRPCChannel secureChannelWithHost:_address + credentials:_channelCreds + channelArgs:args]; + } + return channel; } else { return [GRPCChannel insecureChannelWithHost:_address channelArgs:args]; } @@ -145,9 +228,6 @@ NS_ASSUME_NONNULL_BEGIN } } -// TODO(jcanizales): Don't let set |secure| to |NO| if |pathToCertificates| or |hostNameOverride| -// have been set. Don't let set either of the latter if |secure| has been set to |NO|. - @end NS_ASSUME_NONNULL_END From 1b9c0a2123bc8e2e3c4a6a7b35e22a7b2b17a69f Mon Sep 17 00:00:00 2001 From: Paul Querna Date: Fri, 29 Apr 2016 08:28:48 -0700 Subject: [PATCH 0143/1894] Remove duplicate instance of grpc_global_wakeup_fd --- src/core/lib/iomgr/ev_posix.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index 0eb95a2e091..7df17513520 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -44,7 +44,6 @@ static const grpc_event_engine_vtable *g_event_engine; grpc_poll_function_type grpc_poll_function = poll; -grpc_wakeup_fd grpc_global_wakeup_fd; void grpc_event_engine_init(void) { if ((g_event_engine = grpc_init_poll_and_epoll_posix())) { From 501ca5766560d891adeb1a3d27dcdba52862f3bc Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 29 Apr 2016 09:35:44 -0700 Subject: [PATCH 0144/1894] kill pending python workers on start --- tools/run_tests/performance/kill_workers.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/run_tests/performance/kill_workers.sh b/tools/run_tests/performance/kill_workers.sh index 3eae8c31cb6..7a8763424dc 100755 --- a/tools/run_tests/performance/kill_workers.sh +++ b/tools/run_tests/performance/kill_workers.sh @@ -47,5 +47,8 @@ ps -C ruby -o pid=,cmd= | grep 'qps/worker.rb' | awk '{print $1}' | xargs kill - # Node ps -C node -o pid=,cmd= | grep 'performance/worker.js' | awk '{print $1}' | xargs kill -9 +# Python +ps -C python -o pid=,cmd= | grep 'qps_worker.py' | awk '{print $1}' | xargs kill -9 + # Java jps | grep LoadWorker | awk '{print $1}' | xargs kill -9 From c2de452309c91b934382c2ea77eff5d9e53caad1 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 29 Apr 2016 10:25:27 -0700 Subject: [PATCH 0145/1894] Fix header-size computation to comply with the HTTP/2 RFC. --- src/core/lib/transport/metadata.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h index 277c2579338..77c32c72dee 100644 --- a/src/core/lib/transport/metadata.h +++ b/src/core/lib/transport/metadata.h @@ -146,8 +146,10 @@ void grpc_mdelem_unref(grpc_mdelem *md); const char *grpc_mdstr_as_c_string(grpc_mdstr *s); #define GRPC_MDSTR_LENGTH(s) (GPR_SLICE_LENGTH(s->slice)) + +/* We add 32 bytes of padding as per RFC-7540 section 6.5.2. */ #define GRPC_MDELEM_LENGTH(e) (GRPC_MDSTR_LENGTH(e->key) + \ - GRPC_MDSTR_LENGTH(e->value)) + GRPC_MDSTR_LENGTH(e->value) + 32) int grpc_mdstr_is_legal_header(grpc_mdstr *s); int grpc_mdstr_is_legal_nonbin_header(grpc_mdstr *s); From ad9d06effe37bf9c99a8b2aad8f52657b30e7abf Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Thu, 28 Apr 2016 22:15:04 -0700 Subject: [PATCH 0146/1894] Create Python stress test --- src/python/grpcio/tests/stress/__init__.py | 28 ++++ src/python/grpcio/tests/stress/client.py | 132 ++++++++++++++++++ .../grpcio/tests/stress/metrics_server.py | 60 ++++++++ src/python/grpcio/tests/stress/test_runner.py | 73 ++++++++++ 4 files changed, 293 insertions(+) create mode 100644 src/python/grpcio/tests/stress/__init__.py create mode 100644 src/python/grpcio/tests/stress/client.py create mode 100644 src/python/grpcio/tests/stress/metrics_server.py create mode 100644 src/python/grpcio/tests/stress/test_runner.py diff --git a/src/python/grpcio/tests/stress/__init__.py b/src/python/grpcio/tests/stress/__init__.py new file mode 100644 index 00000000000..100a624dc9c --- /dev/null +++ b/src/python/grpcio/tests/stress/__init__.py @@ -0,0 +1,28 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/python/grpcio/tests/stress/client.py b/src/python/grpcio/tests/stress/client.py new file mode 100644 index 00000000000..a733741b736 --- /dev/null +++ b/src/python/grpcio/tests/stress/client.py @@ -0,0 +1,132 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""Entry point for running stress tests.""" + +import argparse +import Queue +import threading + +from grpc.beta import implementations +from src.proto.grpc.testing import metrics_pb2 +from src.proto.grpc.testing import test_pb2 + +from tests.interop import methods +from tests.qps import histogram +from tests.stress import metrics_server +from tests.stress import test_runner + + +def _args(): + parser = argparse.ArgumentParser(description='gRPC Python stress test client') + parser.add_argument( + '--server_addresses', + help='comma seperated list of hostname:port to run servers on', + default='localhost:8080', type=str) + parser.add_argument( + '--test_cases', + help='comma seperated list of testcase:weighting of tests to run', + default='large_unary:100', + type=str) + parser.add_argument( + '--test_duration_secs', + help='number of seconds to run the stress test', + default=-1, type=int) + parser.add_argument( + '--num_channels_per_server', + help='number of channels per server', + default=1, type=int) + parser.add_argument( + '--num_stubs_per_channel', + help='number of stubs to create per channel', + default=1, type=int) + parser.add_argument( + '--metrics_port', + help='the port to listen for metrics requests on', + default=8081, type=int) + return parser.parse_args() + + +def _test_case_from_arg(test_case_arg): + for test_case in methods.TestCase: + if test_case_arg == test_case.value: + return test_case + else: + raise ValueError('No test case {}!'.format(test_case_arg)) + + +def _parse_weighted_test_cases(test_case_args): + weighted_test_cases = {} + for test_case_arg in test_case_args.split(','): + name, weight = test_case_arg.split(':', 1) + test_case = _test_case_from_arg(name) + weighted_test_cases[test_case] = int(weight) + return weighted_test_cases + + +def run_test(args): + test_cases = _parse_weighted_test_cases(args.test_cases) + test_servers = args.server_addresses.split(',') + # Propagate any client exceptions with a queue + exception_queue = Queue.Queue() + stop_event = threading.Event() + hist = histogram.Histogram(1, 1) + runners = [] + + server = metrics_pb2.beta_create_MetricsService_server( + metrics_server.MetricsServer(hist)) + server.add_insecure_port('[::]:{}'.format(args.metrics_port)) + server.start() + + for test_server in test_servers: + host, port = test_server.split(':', 1) + for _ in xrange(args.num_channels_per_server): + channel = implementations.insecure_channel(host, int(port)) + for _ in xrange(args.num_stubs_per_channel): + stub = test_pb2.beta_create_TestService_stub(channel) + runner = test_runner.TestRunner(stub, test_cases, hist, + exception_queue, stop_event) + runners.append(runner) + + for runner in runners: + runner.start() + try: + raise exception_queue.get(block=True, timeout=args.test_duration_secs) + except Queue.Empty: + # No exceptions thrown, success + pass + finally: + stop_event.set() + for runner in runners: + runner.join() + runner = None + server.stop(0) + +if __name__ == '__main__': + run_test(_args()) diff --git a/src/python/grpcio/tests/stress/metrics_server.py b/src/python/grpcio/tests/stress/metrics_server.py new file mode 100644 index 00000000000..b994e4643e5 --- /dev/null +++ b/src/python/grpcio/tests/stress/metrics_server.py @@ -0,0 +1,60 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""MetricsService for publishing stress test qps data.""" + +import time + +from src.proto.grpc.testing import metrics_pb2 + +GAUGE_NAME = 'python_overall_qps' + + +class MetricsServer(metrics_pb2.BetaMetricsServiceServicer): + + def __init__(self, histogram): + self._start_time = time.time() + self._histogram = histogram + + def _get_qps(self): + count = self._histogram.get_data().count + delta = time.time() - self._start_time + self._histogram.reset() + self._start_time = time.time() + return int(count/delta) + + def GetAllGauges(self, request, context): + qps = self._get_qps() + return [metrics_pb2.GaugeResponse(name=GAUGE_NAME, long_value=qps)] + + def GetGauge(self, request, context): + if request.name != GAUGE_NAME: + raise Exception('Gauge {} does not exist'.format(request.name)) + qps = self._get_qps() + return metrics_pb2.GaugeResponse(name=GAUGE_NAME, long_value=qps) diff --git a/src/python/grpcio/tests/stress/test_runner.py b/src/python/grpcio/tests/stress/test_runner.py new file mode 100644 index 00000000000..88f13727e37 --- /dev/null +++ b/src/python/grpcio/tests/stress/test_runner.py @@ -0,0 +1,73 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""Thread that sends random weighted requests on a TestService stub.""" + +import random +import threading +import time +import traceback + + +def _weighted_test_case_generator(weighted_cases): + weight_sum = sum(weighted_cases.itervalues()) + + while True: + val = random.uniform(0, weight_sum) + partial_sum = 0 + for case in weighted_cases: + partial_sum += weighted_cases[case] + if val <= partial_sum: + yield case + break + + +class TestRunner(threading.Thread): + + def __init__(self, stub, test_cases, hist, exception_queue, stop_event): + super(TestRunner, self).__init__() + self._exception_queue = exception_queue + self._stop_event = stop_event + self._stub = stub + self._test_cases = _weighted_test_case_generator(test_cases) + self._histogram = hist + + def run(self): + while not self._stop_event.is_set(): + try: + test_case = next(self._test_cases) + start_time = time.time() + test_case.test_interoperability(self._stub, None) + end_time = time.time() + self._histogram.add((end_time - start_time)*1e9) + except Exception as e: + traceback.print_exc() + self._exception_queue.put( + Exception("An exception occured during test {}" + .format(test_case), e)) From 1b409a02a23fdf2bcb027e7cec13a92f54af2d29 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 29 Apr 2016 11:26:38 -0700 Subject: [PATCH 0147/1894] Ensure minimum size of alt stack (to please vtune) --- test/core/util/test_config.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/util/test_config.c b/test/core/util/test_config.c index 62468a5a61a..270d16600d3 100644 --- a/test/core/util/test_config.c +++ b/test/core/util/test_config.c @@ -210,7 +210,7 @@ static void install_crash_handler() { #include #include -static char g_alt_stack[MINSIGSTKSZ]; +static char g_alt_stack[GPR_MAX(MINSIGSTKSZ, 65536)]; #define MAX_FRAMES 32 From 3b293253d41627e3816167ef8ec3cf9bd0dcc48f Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 29 Apr 2016 11:36:57 -0700 Subject: [PATCH 0148/1894] Created grpc-tools ruby gem for distributing protoc and the plugin --- src/ruby/tools/README.md | 12 +++++ src/ruby/tools/bin/protoc.rb | 46 +++++++++++++++++++ src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb | 46 +++++++++++++++++++ src/ruby/tools/grpc-tools.gemspec | 20 ++++++++ src/ruby/tools/os_check.rb | 45 ++++++++++++++++++ src/ruby/tools/version.rb | 34 ++++++++++++++ templates/src/ruby/tools/version.rb.template | 36 +++++++++++++++ 7 files changed, 239 insertions(+) create mode 100644 src/ruby/tools/README.md create mode 100755 src/ruby/tools/bin/protoc.rb create mode 100644 src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb create mode 100644 src/ruby/tools/grpc-tools.gemspec create mode 100644 src/ruby/tools/os_check.rb create mode 100644 src/ruby/tools/version.rb create mode 100644 templates/src/ruby/tools/version.rb.template diff --git a/src/ruby/tools/README.md b/src/ruby/tools/README.md new file mode 100644 index 00000000000..e43f223c893 --- /dev/null +++ b/src/ruby/tools/README.md @@ -0,0 +1,12 @@ +# Ruby gRPC Tools + +This package distributes protoc and the Ruby gRPC protoc plugin for Windows, Linux, and Mac. + +Before this package is published, the following directories should be filled with the corresponding `protoc` and `grpc_ruby_plugin` executables. + + - `bin/x86-linux` + - `bin/x86_64-linux` + - `bin/x86-macos` + - `bin/x86_64-macos` + - `bin/x86-windows` + - `bin/x86_64-windows` diff --git a/src/ruby/tools/bin/protoc.rb b/src/ruby/tools/bin/protoc.rb new file mode 100755 index 00000000000..68cbc852fd6 --- /dev/null +++ b/src/ruby/tools/bin/protoc.rb @@ -0,0 +1,46 @@ +#!/usr/bin/env ruby +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +require 'rbconfig' + +require_relative '../os_check' + +protoc_name = case OS.os_name + when 'windows' + 'protoc.exe' + else + 'protoc' + end + +protoc_path = File.join(File.dirname(__FILE__), + RbConfig::CONFIG['host_cpu'] + '-' + OS.os_name, + protoc_name) + +exec([ protoc_path, protoc_path ], *ARGV) diff --git a/src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb b/src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb new file mode 100644 index 00000000000..04cf435b58b --- /dev/null +++ b/src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb @@ -0,0 +1,46 @@ +#!/usr/bin/env ruby +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +require 'rbconfig' + +require_relative '../os_check' + +plugin_name = 'grpc_ruby_plugin' + case OS.os_name + when 'windows' + '.exe' + else + '' + end + +plugin_path = File.join(File.dirname(__FILE__), + RbConfig::CONFIG['host_cpu'] + '-' + OS.os_name, + plugin_name) + +exec([ plugin_path, plugin_path ], *ARGV) diff --git a/src/ruby/tools/grpc-tools.gemspec b/src/ruby/tools/grpc-tools.gemspec new file mode 100644 index 00000000000..f56f2f58ceb --- /dev/null +++ b/src/ruby/tools/grpc-tools.gemspec @@ -0,0 +1,20 @@ +# -*- ruby -*- +# encoding: utf-8 +require_relative 'version.rb' +Gem::Specification.new do |s| + s.name = 'grpc-tools' + s.version = GRPC::Tools::VERSION + s.homepage = 'https://github.com/google/grpc/tree/master/src/ruby/tools' + s.summary = 'Development tools for Ruby gRPC' + s.description = 'protoc and the Ruby gRPC protoc plugin' + s.license = 'BSD-3-Clause' + + s.files = %w( version.rb os_check.rb README.md ) + s.files += Dir.glob('bin/**/*') + + s.bindir = 'bin' + + s.platform = Gem::Platform::RUBY + + s.executables = %w( protoc.rb protoc_grpc_ruby_plugin.rb ) +end diff --git a/src/ruby/tools/os_check.rb b/src/ruby/tools/os_check.rb new file mode 100644 index 00000000000..2677306457b --- /dev/null +++ b/src/ruby/tools/os_check.rb @@ -0,0 +1,45 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# This is based on http://stackoverflow.com/a/171011/159388 by Aaron Hinni + +require 'rbconfig' + +module OS + def OS.os_name + case RbConfig::CONFIG['host_os'] + when /cygwin|mswin|mingw|bccwin|wince|emx/ + 'windows' + when /darwin/ + 'macos' + else + 'linux' + end + end +end diff --git a/src/ruby/tools/version.rb b/src/ruby/tools/version.rb new file mode 100644 index 00000000000..12ad21b80eb --- /dev/null +++ b/src/ruby/tools/version.rb @@ -0,0 +1,34 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +module GRPC + module Tools + VERSION = '0.14.0.dev' + end +end diff --git a/templates/src/ruby/tools/version.rb.template b/templates/src/ruby/tools/version.rb.template new file mode 100644 index 00000000000..dbc5f48cf51 --- /dev/null +++ b/templates/src/ruby/tools/version.rb.template @@ -0,0 +1,36 @@ +%YAML 1.2 +--- | + # Copyright 2015, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + module GRPC + module Tools + VERSION = '${settings.ruby_version.ruby()}' + end + end From f238194b25549cd97d19f8c785347e2d2f3d3c89 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 29 Apr 2016 11:37:21 -0700 Subject: [PATCH 0149/1894] Updated build_package_ruby to build the grpc-tools gem --- tools/run_tests/build_package_ruby.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/tools/run_tests/build_package_ruby.sh b/tools/run_tests/build_package_ruby.sh index 1a5b94348d8..cde05181c7b 100755 --- a/tools/run_tests/build_package_ruby.sh +++ b/tools/run_tests/build_package_ruby.sh @@ -32,6 +32,8 @@ set -ex cd $(dirname $0)/../.. +base=$(pwd) + mkdir -p artifacts/ # All the ruby packages have been built in the artifact phase already @@ -41,3 +43,25 @@ cp -r $EXTERNAL_GIT_ROOT/architecture={x86,x64},language=ruby,platform={windows, # TODO: all the artifact builder configurations generate a grpc-VERSION.gem # source distribution package, and only one of them will end up # in the artifacts/ directory. They should be all equivalent though. + +for arch in {x86,x64}; do + case arch in + x64) + ruby_arch=x86_64 + ;; + *) + ruby_arch=$arch + ;; + esac + for plat in {windows,linux,macos}; do + input_dir="$EXTERNAL_GIT_ROOT/architecture=$arch,language=protoc,platform=$plat/artifacts" + output_dir="$base/src/ruby/tools/bin/${ruby_arch}-${plat}" + mkdir -p output_dir + cp $input_dir/protoc* output_dir/ + cp $input_dir/grpc_ruby_plugin* output_dir/ + done +done + +cd $base/src/ruby/tools +gem build grpc-tools.gemspec +cp ./grpc-tools*.gem $base/artifacts/ From faf3bfca82c88b1bf08995fdfb26a152c90bf0a5 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 29 Apr 2016 12:39:05 -0700 Subject: [PATCH 0150/1894] Fixed grpc-tools.gemspec --- src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb | 0 src/ruby/tools/grpc-tools.gemspec | 2 ++ 2 files changed, 2 insertions(+) mode change 100644 => 100755 src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb diff --git a/src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb b/src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb old mode 100644 new mode 100755 diff --git a/src/ruby/tools/grpc-tools.gemspec b/src/ruby/tools/grpc-tools.gemspec index f56f2f58ceb..af904de4a91 100644 --- a/src/ruby/tools/grpc-tools.gemspec +++ b/src/ruby/tools/grpc-tools.gemspec @@ -4,6 +4,8 @@ require_relative 'version.rb' Gem::Specification.new do |s| s.name = 'grpc-tools' s.version = GRPC::Tools::VERSION + s.authors = ['grpc Authors'] + s.email = 'grpc-io@googlegroups.com' s.homepage = 'https://github.com/google/grpc/tree/master/src/ruby/tools' s.summary = 'Development tools for Ruby gRPC' s.description = 'protoc and the Ruby gRPC protoc plugin' From f897fec0dbd8814b3717b88058cdcaf6965a2d50 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 29 Apr 2016 12:43:19 -0700 Subject: [PATCH 0151/1894] Fixed build_package_ruby's use of variables --- tools/run_tests/build_package_ruby.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/run_tests/build_package_ruby.sh b/tools/run_tests/build_package_ruby.sh index cde05181c7b..5725a19e62d 100755 --- a/tools/run_tests/build_package_ruby.sh +++ b/tools/run_tests/build_package_ruby.sh @@ -56,9 +56,9 @@ for arch in {x86,x64}; do for plat in {windows,linux,macos}; do input_dir="$EXTERNAL_GIT_ROOT/architecture=$arch,language=protoc,platform=$plat/artifacts" output_dir="$base/src/ruby/tools/bin/${ruby_arch}-${plat}" - mkdir -p output_dir - cp $input_dir/protoc* output_dir/ - cp $input_dir/grpc_ruby_plugin* output_dir/ + mkdir -p $output_dir + cp $input_dir/protoc* $output_dir/ + cp $input_dir/grpc_ruby_plugin* $output_dir/ done done From 8cb5f2f413853829f75bc256ee93fec812d357a1 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 29 Apr 2016 12:55:28 -0700 Subject: [PATCH 0152/1894] Fixed build_package_ruby's use of variables --- tools/run_tests/build_package_ruby.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/build_package_ruby.sh b/tools/run_tests/build_package_ruby.sh index 5725a19e62d..e44428bf7e3 100755 --- a/tools/run_tests/build_package_ruby.sh +++ b/tools/run_tests/build_package_ruby.sh @@ -45,7 +45,7 @@ cp -r $EXTERNAL_GIT_ROOT/architecture={x86,x64},language=ruby,platform={windows, # in the artifacts/ directory. They should be all equivalent though. for arch in {x86,x64}; do - case arch in + case $arch in x64) ruby_arch=x86_64 ;; From 2a932daaafbec9874d9fb594419f68f9cb8f9187 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 29 Apr 2016 13:04:53 -0700 Subject: [PATCH 0153/1894] Spell out fail fast semantics --- doc/fail_fast.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 doc/fail_fast.md diff --git a/doc/fail_fast.md b/doc/fail_fast.md new file mode 100644 index 00000000000..3ed4297194b --- /dev/null +++ b/doc/fail_fast.md @@ -0,0 +1,15 @@ +gRPC Fail Fast Semantics +======================== + +Fail fast requests allow terminating requests (with status UNAVAILABLE) prior +to the deadline of the request being met. + +gRPC implementations of fail fast can terminate requests whenever a channel is +in the TRANSIENT_FAILURE or SHUTDOWN states. If the channel is in any other +state (CONNECTING, READY, or IDLE) the request should not be terminated. + +Fail fast SHOULD be the default for gRPC implementations, with an option to +switch to non fail fast. + +The opposite of fail fast is 'ignore connectivity'. + From a42ec2134117f4a4db994467edcff52e6f347f3d Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 29 Apr 2016 13:03:06 -0700 Subject: [PATCH 0154/1894] Server builder plugin --- BUILD | 4 + Makefile | 51 ++++ build.yaml | 15 ++ include/grpc++/impl/server_builder_option.h | 8 + include/grpc++/impl/server_builder_plugin.h | 79 ++++++ include/grpc++/impl/server_initializer.h | 70 ++++++ include/grpc++/server.h | 8 + include/grpc++/server_builder.h | 9 + src/cpp/server/server.cc | 19 +- src/cpp/server/server_builder.cc | 16 ++ test/cpp/end2end/async_end2end_test.cc | 28 +++ .../cpp/end2end/server_builder_plugin_test.cc | 234 ++++++++++++++++++ tools/doxygen/Doxyfile.c++ | 2 + tools/doxygen/Doxyfile.c++.internal | 2 + tools/run_tests/sources_and_headers.json | 22 ++ tools/run_tests/tests.json | 21 ++ vsprojects/vcxproj/grpc++/grpc++.vcxproj | 2 + .../vcxproj/grpc++/grpc++.vcxproj.filters | 6 + .../grpc++_unsecure/grpc++_unsecure.vcxproj | 2 + .../grpc++_unsecure.vcxproj.filters | 6 + .../server_builder_plugin_test.vcxproj | 207 ++++++++++++++++ ...server_builder_plugin_test.vcxproj.filters | 21 ++ 22 files changed, 831 insertions(+), 1 deletion(-) create mode 100644 include/grpc++/impl/server_builder_plugin.h create mode 100644 include/grpc++/impl/server_initializer.h create mode 100644 test/cpp/end2end/server_builder_plugin_test.cc create mode 100644 vsprojects/vcxproj/test/server_builder_plugin_test/server_builder_plugin_test.vcxproj create mode 100644 vsprojects/vcxproj/test/server_builder_plugin_test/server_builder_plugin_test.vcxproj.filters diff --git a/BUILD b/BUILD index b4b10b535e8..30f0b5028ca 100644 --- a/BUILD +++ b/BUILD @@ -890,6 +890,8 @@ cc_library( "include/grpc++/impl/rpc_service_method.h", "include/grpc++/impl/serialization_traits.h", "include/grpc++/impl/server_builder_option.h", + "include/grpc++/impl/server_builder_plugin.h", + "include/grpc++/impl/server_initializer.h", "include/grpc++/impl/service_type.h", "include/grpc++/impl/sync.h", "include/grpc++/impl/sync_cxx11.h", @@ -1035,6 +1037,8 @@ cc_library( "include/grpc++/impl/rpc_service_method.h", "include/grpc++/impl/serialization_traits.h", "include/grpc++/impl/server_builder_option.h", + "include/grpc++/impl/server_builder_plugin.h", + "include/grpc++/impl/server_initializer.h", "include/grpc++/impl/service_type.h", "include/grpc++/impl/sync.h", "include/grpc++/impl/sync_cxx11.h", diff --git a/Makefile b/Makefile index 922e0b0568f..38228259cdb 100644 --- a/Makefile +++ b/Makefile @@ -1035,6 +1035,7 @@ reconnect_interop_client: $(BINDIR)/$(CONFIG)/reconnect_interop_client reconnect_interop_server: $(BINDIR)/$(CONFIG)/reconnect_interop_server secure_auth_context_test: $(BINDIR)/$(CONFIG)/secure_auth_context_test secure_sync_unary_ping_pong_test: $(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test +server_builder_plugin_test: $(BINDIR)/$(CONFIG)/server_builder_plugin_test server_crash_test: $(BINDIR)/$(CONFIG)/server_crash_test server_crash_test_client: $(BINDIR)/$(CONFIG)/server_crash_test_client shutdown_test: $(BINDIR)/$(CONFIG)/shutdown_test @@ -1401,6 +1402,7 @@ buildtests_cxx: buildtests_zookeeper privatelibs_cxx \ $(BINDIR)/$(CONFIG)/reconnect_interop_server \ $(BINDIR)/$(CONFIG)/secure_auth_context_test \ $(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test \ + $(BINDIR)/$(CONFIG)/server_builder_plugin_test \ $(BINDIR)/$(CONFIG)/server_crash_test \ $(BINDIR)/$(CONFIG)/server_crash_test_client \ $(BINDIR)/$(CONFIG)/shutdown_test \ @@ -1732,6 +1734,8 @@ test_cxx: test_zookeeper buildtests_cxx $(Q) $(BINDIR)/$(CONFIG)/secure_auth_context_test || ( echo test secure_auth_context_test failed ; exit 1 ) $(E) "[RUN] Testing secure_sync_unary_ping_pong_test" $(Q) $(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test || ( echo test secure_sync_unary_ping_pong_test failed ; exit 1 ) + $(E) "[RUN] Testing server_builder_plugin_test" + $(Q) $(BINDIR)/$(CONFIG)/server_builder_plugin_test || ( echo test server_builder_plugin_test failed ; exit 1 ) $(E) "[RUN] Testing server_crash_test" $(Q) $(BINDIR)/$(CONFIG)/server_crash_test || ( echo test server_crash_test failed ; exit 1 ) $(E) "[RUN] Testing shutdown_test" @@ -3200,6 +3204,8 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/rpc_service_method.h \ include/grpc++/impl/serialization_traits.h \ include/grpc++/impl/server_builder_option.h \ + include/grpc++/impl/server_builder_plugin.h \ + include/grpc++/impl/server_initializer.h \ include/grpc++/impl/service_type.h \ include/grpc++/impl/sync.h \ include/grpc++/impl/sync_cxx11.h \ @@ -3503,6 +3509,8 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/rpc_service_method.h \ include/grpc++/impl/serialization_traits.h \ include/grpc++/impl/server_builder_option.h \ + include/grpc++/impl/server_builder_plugin.h \ + include/grpc++/impl/server_initializer.h \ include/grpc++/impl/service_type.h \ include/grpc++/impl/sync.h \ include/grpc++/impl/sync_cxx11.h \ @@ -11479,6 +11487,49 @@ endif endif +SERVER_BUILDER_PLUGIN_TEST_SRC = \ + test/cpp/end2end/server_builder_plugin_test.cc \ + +SERVER_BUILDER_PLUGIN_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(SERVER_BUILDER_PLUGIN_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/server_builder_plugin_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.0.0+. + +$(BINDIR)/$(CONFIG)/server_builder_plugin_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/server_builder_plugin_test: $(PROTOBUF_DEP) $(SERVER_BUILDER_PLUGIN_TEST_OBJS) $(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) $(SERVER_BUILDER_PLUGIN_TEST_OBJS) $(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)/server_builder_plugin_test + +endif + +endif + +$(OBJDIR)/$(CONFIG)/test/cpp/end2end/server_builder_plugin_test.o: $(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_server_builder_plugin_test: $(SERVER_BUILDER_PLUGIN_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(SERVER_BUILDER_PLUGIN_TEST_OBJS:.o=.dep) +endif +endif + + SERVER_CRASH_TEST_SRC = \ test/cpp/end2end/server_crash_test.cc \ diff --git a/build.yaml b/build.yaml index 441752dc3dc..928efdee03b 100644 --- a/build.yaml +++ b/build.yaml @@ -590,6 +590,8 @@ filegroups: - include/grpc++/impl/rpc_service_method.h - include/grpc++/impl/serialization_traits.h - include/grpc++/impl/server_builder_option.h + - include/grpc++/impl/server_builder_plugin.h + - include/grpc++/impl/server_initializer.h - include/grpc++/impl/service_type.h - include/grpc++/impl/sync.h - include/grpc++/impl/sync_cxx11.h @@ -2914,6 +2916,19 @@ targets: - mac - linux - posix +- name: server_builder_plugin_test + gtest: true + build: test + language: c++ + src: + - test/cpp/end2end/server_builder_plugin_test.cc + deps: + - grpc++_test_util + - grpc_test_util + - grpc++ + - grpc + - gpr_test_util + - gpr - name: server_crash_test gtest: true cpu_cost: 0.1 diff --git a/include/grpc++/impl/server_builder_option.h b/include/grpc++/impl/server_builder_option.h index bcb19824fdf..2b7e89f5e5d 100644 --- a/include/grpc++/impl/server_builder_option.h +++ b/include/grpc++/impl/server_builder_option.h @@ -34,6 +34,10 @@ #ifndef GRPCXX_IMPL_SERVER_BUILDER_OPTION_H #define GRPCXX_IMPL_SERVER_BUILDER_OPTION_H +#include +#include + +#include #include namespace grpc { @@ -44,6 +48,10 @@ class ServerBuilderOption { virtual ~ServerBuilderOption() {} /// Alter the \a ChannelArguments used to create the gRPC server. virtual void UpdateArguments(ChannelArguments* args) = 0; + /// Alter the ServerBuilderPlugin map that will be added into ServerBuilder. + virtual void UpdatePlugins( + std::map >* + plugins) = 0; }; } // namespace grpc diff --git a/include/grpc++/impl/server_builder_plugin.h b/include/grpc++/impl/server_builder_plugin.h new file mode 100644 index 00000000000..2cf1dfdbecd --- /dev/null +++ b/include/grpc++/impl/server_builder_plugin.h @@ -0,0 +1,79 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPCXX_IMPL_SERVER_BUILDER_PLUGIN_H +#define GRPCXX_IMPL_SERVER_BUILDER_PLUGIN_H + +#include + +#include + +namespace grpc { + +class ServerInitializer; + +class ServerBuilderPlugin { + public: + virtual ~ServerBuilderPlugin() {} + virtual grpc::string name() = 0; + + // InitServer will be called in ServerBuilder::BuildAndStart(), after the + // Server instance is created. + virtual void InitServer(ServerInitializer* si) = 0; + + // Finish will be called at the end of ServerBuilder::BuildAndStart(). + virtual void Finish(ServerInitializer* si) = 0; + + // ChangeArguments is an interface that can be used in + // ServerBuilderOption::UpdatePlugins + virtual void ChangeArguments(const grpc::string& name, void* value) = 0; + + virtual bool has_sync_methods() const { return false; } + virtual bool has_async_methods() const { return false; } +}; + +} // namespace grpc + +#define DECLARE_PLUGIN(plugin_name) \ + namespace sBP##plugin_name { \ + extern std::unique_ptr Create##plugin_name(); \ + } + +#define INIT_PLUGIN(map, plugin_name) \ + { \ + std::unique_ptr plugin = \ + sBP##plugin_name::Create##plugin_name(); \ + map[plugin->name()] = std::move(plugin); \ + } + +#endif // GRPCXX_IMPL_SERVER_BUILDER_PLUGIN_H diff --git a/include/grpc++/impl/server_initializer.h b/include/grpc++/impl/server_initializer.h new file mode 100644 index 00000000000..dbcecc7026c --- /dev/null +++ b/include/grpc++/impl/server_initializer.h @@ -0,0 +1,70 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPCXX_IMPL_SERVER_INITIALIZER_H +#define GRPCXX_IMPL_SERVER_INITIALIZER_H + +#include +#include + +#include + +namespace grpc { + +class Server; +class Service; + +class ServerInitializer { + public: + ServerInitializer(Server* server) : server_(server) {} + + bool RegisterService(std::shared_ptr service) { + if (!server_->RegisterService(nullptr, service.get())) { + return false; + } + default_services_.push_back(service); + return true; + } + + const std::vector* GetServiceList() { + return &server_->services_; + } + + private: + Server* server_; + std::vector > default_services_; +}; + +} // namespace grpc + +#endif // GRPCXX_IMPL_SERVER_INITIALIZER_H diff --git a/include/grpc++/server.h b/include/grpc++/server.h index 729a5143bf8..a0ee0e98e47 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -36,6 +36,7 @@ #include #include +#include #include #include @@ -57,6 +58,7 @@ class GenericServerContext; class AsyncGenericService; class ServerAsyncStreamingInterface; class ServerContext; +class ServerInitializer; class ThreadPoolInterface; /// Models a gRPC server. @@ -94,6 +96,7 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen { private: friend class AsyncGenericService; friend class ServerBuilder; + friend class ServerInitializer; class SyncRequest; class AsyncRequest; @@ -159,6 +162,8 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen { grpc_server* server() GRPC_OVERRIDE { return server_; }; + ServerInitializer* initializer(); + const int max_message_size_; // Completion queue. @@ -175,6 +180,7 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen { std::shared_ptr global_callbacks_; std::list* sync_methods_; + std::vector services_; std::unique_ptr unknown_method_; bool has_generic_service_; @@ -184,6 +190,8 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen { ThreadPoolInterface* thread_pool_; // Whether the thread pool is created and owned by the server. bool thread_pool_owned_; + + std::unique_ptr server_initializer_; }; } // namespace grpc diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index 86c7fecef59..a47b5c71cfb 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -34,10 +34,12 @@ #ifndef GRPCXX_SERVER_BUILDER_H #define GRPCXX_SERVER_BUILDER_H +#include #include #include #include +#include #include #include @@ -51,6 +53,10 @@ class ServerCompletionQueue; class ServerCredentials; class Service; +namespace testing { +class ServerBuilderPluginTest; +} // namespace testing + /// A builder class for the creation and startup of \a grpc::Server instances. class ServerBuilder { public: @@ -108,6 +114,8 @@ class ServerBuilder { std::unique_ptr BuildAndStart(); private: + friend class ::grpc::testing::ServerBuilderPluginTest; + struct Port { grpc::string addr; std::shared_ptr creds; @@ -130,6 +138,7 @@ class ServerBuilder { std::vector ports_; std::vector cqs_; std::shared_ptr creds_; + std::map> plugins_; AsyncGenericService* generic_service_; }; diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index fafe31e84c1..f955a314944 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -33,6 +33,7 @@ #include +#include #include #include @@ -41,6 +42,7 @@ #include #include #include +#include #include #include #include @@ -284,7 +286,8 @@ Server::Server(ThreadPoolInterface* thread_pool, bool thread_pool_owned, has_generic_service_(false), server_(nullptr), thread_pool_(thread_pool), - thread_pool_owned_(thread_pool_owned) { + thread_pool_owned_(thread_pool_owned), + server_initializer_(new ServerInitializer(this)) { g_gli_initializer.summon(); gpr_once_init(&g_once_init_callbacks, InitGlobalCallbacks); global_callbacks_ = g_callbacks; @@ -341,6 +344,7 @@ bool Server::RegisterService(const grpc::string* host, Service* service) { "Can only register an asynchronous service against one server."); service->server_ = this; } + const char* method_name = nullptr; for (auto it = service->methods_.begin(); it != service->methods_.end(); ++it) { if (it->get() == nullptr) { // Handled by generic service if any. @@ -360,6 +364,17 @@ bool Server::RegisterService(const grpc::string* host, Service* service) { } else { sync_methods_->emplace_back(method, tag); } + method_name = method->name(); + } + + // Parse service name. + if (method_name != nullptr) { + std::stringstream ss(method_name); + grpc::string service_name; + if (std::getline(ss, service_name, '/') && + std::getline(ss, service_name, '/')) { + services_.push_back(service_name); + } } return true; } @@ -598,4 +613,6 @@ void Server::RunRpc() { } } +ServerInitializer* Server::initializer() { return server_initializer_.get(); } + } // namespace grpc diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index 68cc38258cf..5dc73ed1e48 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -96,6 +96,15 @@ std::unique_ptr ServerBuilder::BuildAndStart() { ChannelArguments args; for (auto option = options_.begin(); option != options_.end(); ++option) { (*option)->UpdateArguments(&args); + (*option)->UpdatePlugins(&plugins_); + } + if (thread_pool == nullptr) { + for (auto plugin = plugins_.begin(); plugin != plugins_.end(); plugin++) { + if ((*plugin).second->has_sync_methods()) { + thread_pool.reset(CreateDefaultThreadPool()); + break; + } + } } if (max_message_size_ > 0) { args.SetInt(GRPC_ARG_MAX_MESSAGE_LENGTH, max_message_size_); @@ -104,6 +113,7 @@ std::unique_ptr ServerBuilder::BuildAndStart() { compression_options_.enabled_algorithms_bitset); std::unique_ptr server( new Server(thread_pool.release(), true, max_message_size_, &args)); + ServerInitializer* initializer = server->initializer(); for (auto cq = cqs_.begin(); cq != cqs_.end(); ++cq) { grpc_server_register_completion_queue(server->server_, (*cq)->cq(), nullptr); @@ -114,6 +124,9 @@ std::unique_ptr ServerBuilder::BuildAndStart() { return nullptr; } } + for (auto plugin = plugins_.begin(); plugin != plugins_.end(); plugin++) { + (*plugin).second->InitServer(initializer); + } if (generic_service_) { server->RegisterAsyncGenericService(generic_service_); } else { @@ -137,6 +150,9 @@ std::unique_ptr ServerBuilder::BuildAndStart() { if (!server->Start(cqs_data, cqs_.size())) { return nullptr; } + for (auto plugin = plugins_.begin(); plugin != plugins_.end(); plugin++) { + (*plugin).second->Finish(initializer); + } return server; } diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index 7e4d6046d60..0de6c74c47d 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -197,6 +197,28 @@ class Verifier { bool spin_; }; +// This class disables the server builder plugins that may add sync services to +// the server. If there are sync services, UnimplementedRpc test will triger +// the sync unkown rpc routine on the server side, rather than the async one +// that needs to be tested here. +class ServerBuilderSyncPluginDisabler : public ::grpc::ServerBuilderOption { + public: + void UpdateArguments(ChannelArguments* arg) GRPC_OVERRIDE {} + + void UpdatePlugins( + std::map>* plugins) + GRPC_OVERRIDE { + auto plugin = plugins->begin(); + while (plugin != plugins->end()) { + if ((*plugin).second->has_sync_methods()) { + plugins->erase(plugin++); + } else { + plugin++; + } + } + } +}; + class AsyncEnd2endTest : public ::testing::TestWithParam { protected: AsyncEnd2endTest() {} @@ -213,6 +235,12 @@ class AsyncEnd2endTest : public ::testing::TestWithParam { grpc::InsecureServerCredentials()); builder.RegisterService(&service_); cq_ = builder.AddCompletionQueue(); + + // TODO(zyc): make a test option to choose wheather sync plugins should be + // deleted + std::unique_ptr sync_plugin_disabler( + new ServerBuilderSyncPluginDisabler()); + builder.SetOption(move(sync_plugin_disabler)); server_ = builder.BuildAndStart(); gpr_tls_set(&g_is_async_end2end_test, 1); diff --git a/test/cpp/end2end/server_builder_plugin_test.cc b/test/cpp/end2end/server_builder_plugin_test.cc new file mode 100644 index 00000000000..e42bd10832e --- /dev/null +++ b/test/cpp/end2end/server_builder_plugin_test.cc @@ -0,0 +1,234 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "src/proto/grpc/testing/echo.grpc.pb.h" +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" +#include "test/cpp/end2end/test_service_impl.h" + +#define PLUGIN_NAME "TestServerBuilderPlugin" + +namespace grpc { +namespace testing { + +class TestServerBuilderPlugin : public ServerBuilderPlugin { + public: + TestServerBuilderPlugin() : service_(new TestServiceImpl()) { + init_server_is_called_ = false; + finish_is_called_ = false; + change_arguments_is_called_ = false; + } + + grpc::string name() GRPC_OVERRIDE { return PLUGIN_NAME; } + + void InitServer(ServerInitializer* si) GRPC_OVERRIDE { + init_server_is_called_ = true; + if (register_service_) { + si->RegisterService(service_); + } + } + + void Finish(ServerInitializer* si) GRPC_OVERRIDE { finish_is_called_ = true; } + + void ChangeArguments(const grpc::string& name, void* value) GRPC_OVERRIDE { + change_arguments_is_called_ = true; + } + + bool has_async_methods() const GRPC_OVERRIDE { return register_service_; } + + bool has_sync_methods() const GRPC_OVERRIDE { return register_service_; } + + void SetRegisterService() { register_service_ = true; } + + bool init_server_is_called() { return init_server_is_called_; } + bool finish_is_called() { return finish_is_called_; } + bool change_arguments_is_called() { return change_arguments_is_called_; } + + private: + bool init_server_is_called_; + bool finish_is_called_; + bool change_arguments_is_called_; + bool register_service_; + std::shared_ptr service_; +}; + +class InsertPluginServerBuilderOption : public ServerBuilderOption { + public: + InsertPluginServerBuilderOption() { register_service_ = false; } + + void UpdateArguments(ChannelArguments* arg) GRPC_OVERRIDE {} + + void UpdatePlugins( + std::map>* plugins) + GRPC_OVERRIDE { + std::unique_ptr plugin( + new TestServerBuilderPlugin()); + if (register_service_) plugin->SetRegisterService(); + (*plugins)[plugin->name()] = std::move(plugin); + } + + void SetRegisterService() { register_service_ = true; } + + private: + bool register_service_; +}; + +namespace sBPTestServerBuilderPlugin { + +std::unique_ptr CreateTestServerBuilderPlugin() { + return std::unique_ptr(new TestServerBuilderPlugin()); +} + +} // namespace sBPTestServerBuilderPlugin + +class ServerBuilderPluginTest : public ::testing::TestWithParam { + public: + ServerBuilderPluginTest() {} + + void SetUp() GRPC_OVERRIDE { + port_ = grpc_pick_unused_port_or_die(); + builder_.reset(new ServerBuilder()); + } + + void InsertPlugin() { + if (GetParam()) { + // Add ServerBuilder plugin directly + INIT_PLUGIN(builder_->plugins_, TestServerBuilderPlugin); + EXPECT_TRUE(builder_->plugins_[PLUGIN_NAME] != nullptr); + } else { + // Add ServerBuilder plugin using ServerBuilder::SetOption() + builder_->SetOption(std::unique_ptr( + new InsertPluginServerBuilderOption())); + } + } + + void InsertPluginWithTestService() { + if (GetParam()) { + // Add ServerBuilder plugin directly + INIT_PLUGIN(builder_->plugins_, TestServerBuilderPlugin); + EXPECT_TRUE(builder_->plugins_[PLUGIN_NAME] != nullptr); + auto plugin = static_cast( + builder_->plugins_[PLUGIN_NAME].get()); + EXPECT_TRUE(plugin != nullptr); + plugin->SetRegisterService(); + } else { + // Add ServerBuilder plugin using ServerBuilder::SetOption() + std::unique_ptr option( + new InsertPluginServerBuilderOption()); + option->SetRegisterService(); + builder_->SetOption(std::move(option)); + } + } + + void StartServer() { + grpc::string server_address = "localhost:" + to_string(port_); + builder_->AddListeningPort(server_address, InsecureServerCredentials()); + server_ = builder_->BuildAndStart(); + EXPECT_TRUE(builder_->plugins_[PLUGIN_NAME] != nullptr); + } + + void ResetStub() { + string target = "dns:localhost:" + to_string(port_); + channel_ = CreateChannel(target, InsecureChannelCredentials()); + stub_ = grpc::testing::EchoTestService::NewStub(channel_); + } + + void TearDown() GRPC_OVERRIDE { + EXPECT_TRUE(builder_->plugins_[PLUGIN_NAME] != nullptr); + auto plugin = static_cast( + builder_->plugins_[PLUGIN_NAME].get()); + EXPECT_TRUE(plugin != nullptr); + EXPECT_TRUE(plugin->init_server_is_called()); + EXPECT_TRUE(plugin->finish_is_called()); + } + + string to_string(const int number) { + std::stringstream strs; + strs << number; + return strs.str(); + } + + protected: + std::shared_ptr channel_; + std::unique_ptr builder_; + std::unique_ptr stub_; + std::unique_ptr server_; + TestServiceImpl service_; + int port_; +}; + +TEST_P(ServerBuilderPluginTest, PluginWithoutServiceTest) { + InsertPlugin(); + StartServer(); +} + +TEST_P(ServerBuilderPluginTest, PluginWithServiceTest) { + InsertPluginWithTestService(); + StartServer(); + ResetStub(); + + EchoRequest request; + EchoResponse response; + request.set_message("Hello hello hello hello"); + ClientContext context; + context.set_compression_algorithm(GRPC_COMPRESS_GZIP); + Status s = stub_->Echo(&context, request, &response); + EXPECT_EQ(response.message(), request.message()); + EXPECT_TRUE(s.ok()); +} + +INSTANTIATE_TEST_CASE_P(ServerBuilderPluginTest, ServerBuilderPluginTest, + ::testing::Values(false, true)); + +} // 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/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 7dc04960475..3fff7bcd503 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -777,6 +777,8 @@ include/grpc++/impl/rpc_method.h \ include/grpc++/impl/rpc_service_method.h \ include/grpc++/impl/serialization_traits.h \ include/grpc++/impl/server_builder_option.h \ +include/grpc++/impl/server_builder_plugin.h \ +include/grpc++/impl/server_initializer.h \ include/grpc++/impl/service_type.h \ include/grpc++/impl/sync.h \ include/grpc++/impl/sync_cxx11.h \ diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 312fd17cb22..56f51f61cbb 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -777,6 +777,8 @@ include/grpc++/impl/rpc_method.h \ include/grpc++/impl/rpc_service_method.h \ include/grpc++/impl/serialization_traits.h \ include/grpc++/impl/server_builder_option.h \ +include/grpc++/impl/server_builder_plugin.h \ +include/grpc++/impl/server_initializer.h \ include/grpc++/impl/service_type.h \ include/grpc++/impl/sync.h \ include/grpc++/impl/sync_cxx11.h \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index f546f3b9950..d2931269b2d 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -2588,6 +2588,24 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc++", + "grpc++_test_util", + "grpc_test_util" + ], + "headers": [], + "language": "c++", + "name": "server_builder_plugin_test", + "src": [ + "test/cpp/end2end/server_builder_plugin_test.cc" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", @@ -6326,6 +6344,8 @@ "include/grpc++/impl/rpc_service_method.h", "include/grpc++/impl/serialization_traits.h", "include/grpc++/impl/server_builder_option.h", + "include/grpc++/impl/server_builder_plugin.h", + "include/grpc++/impl/server_initializer.h", "include/grpc++/impl/service_type.h", "include/grpc++/impl/sync.h", "include/grpc++/impl/sync_cxx11.h", @@ -6376,6 +6396,8 @@ "include/grpc++/impl/rpc_service_method.h", "include/grpc++/impl/serialization_traits.h", "include/grpc++/impl/server_builder_option.h", + "include/grpc++/impl/server_builder_plugin.h", + "include/grpc++/impl/server_initializer.h", "include/grpc++/impl/service_type.h", "include/grpc++/impl/sync.h", "include/grpc++/impl/sync_cxx11.h", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 0fd77854d22..c7b85de4d2c 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -2448,6 +2448,27 @@ "posix" ] }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "gtest": true, + "language": "c++", + "name": "server_builder_plugin_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index 29cab37d521..729631d28dd 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -275,6 +275,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index 15e2807fd41..6c135b22f38 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -147,6 +147,12 @@ include\grpc++\impl + + include\grpc++\impl + + + include\grpc++\impl + include\grpc++\impl diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index fcda361ef19..9465d2ac423 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -275,6 +275,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 1dc95f985ad..6cb4a6c89d5 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -132,6 +132,12 @@ include\grpc++\impl + + include\grpc++\impl + + + include\grpc++\impl + include\grpc++\impl diff --git a/vsprojects/vcxproj/test/server_builder_plugin_test/server_builder_plugin_test.vcxproj b/vsprojects/vcxproj/test/server_builder_plugin_test/server_builder_plugin_test.vcxproj new file mode 100644 index 00000000000..0ebdd988172 --- /dev/null +++ b/vsprojects/vcxproj/test/server_builder_plugin_test/server_builder_plugin_test.vcxproj @@ -0,0 +1,207 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {86751DC8-C8D9-57B6-2C8A-BB33021C773C} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + + + server_builder_plugin_test + static + Debug + static + Debug + + + server_builder_plugin_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {0BE77741-552A-929B-A497-4EF7ECE17A64} + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/server_builder_plugin_test/server_builder_plugin_test.vcxproj.filters b/vsprojects/vcxproj/test/server_builder_plugin_test/server_builder_plugin_test.vcxproj.filters new file mode 100644 index 00000000000..629b913fc6e --- /dev/null +++ b/vsprojects/vcxproj/test/server_builder_plugin_test/server_builder_plugin_test.vcxproj.filters @@ -0,0 +1,21 @@ + + + + + test\cpp\end2end + + + + + + {37b2ebc1-b2f2-ecb9-37b7-f6d757bb99e3} + + + {39400fed-f7b7-0f44-0ef3-ba3693d42011} + + + {dab9dd19-3e5b-005e-4b5a-456de6111d71} + + + + From 00598719bcf40a95505f2deeb53906c5944373fd Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 29 Apr 2016 13:38:50 -0700 Subject: [PATCH 0155/1894] Use HTTP/2 MAX_HEADER_LIST_SIZE setting instead of adding a new member in the grpc_chttp2_transport_parsing struct. --- .../transport/chttp2/transport/chttp2_transport.c | 11 ++++------- .../transport/chttp2/transport/frame_settings.c | 3 ++- src/core/ext/transport/chttp2/transport/internal.h | 3 --- src/core/ext/transport/chttp2/transport/parsing.c | 14 ++++++++++++-- 4 files changed, 18 insertions(+), 13 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index b73ec2a7e9d..63147865257 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -56,8 +56,6 @@ #define DEFAULT_CONNECTION_WINDOW_TARGET (1024 * 1024) #define MAX_WINDOW 0x7fffffffu -#define DEFAULT_MAX_METADATA_SIZE 16 * 1024 - #define MAX_CLIENT_STREAM_ID 0x7fffffffu int grpc_http_trace = 0; @@ -67,8 +65,8 @@ int grpc_flowctl_trace = 0; ((grpc_chttp2_transport *)((char *)(tw)-offsetof(grpc_chttp2_transport, \ writing))) -#define TRANSPORT_FROM_PARSING(tw) \ - ((grpc_chttp2_transport *)((char *)(tw)-offsetof(grpc_chttp2_transport, \ +#define TRANSPORT_FROM_PARSING(tp) \ + ((grpc_chttp2_transport *)((char *)(tp)-offsetof(grpc_chttp2_transport, \ parsing))) #define TRANSPORT_FROM_GLOBAL(tg) \ @@ -252,7 +250,6 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, t->global.ping_counter = 1; t->global.pings.next = t->global.pings.prev = &t->global.pings; t->parsing.is_client = is_client; - t->parsing.max_metadata_size = DEFAULT_MAX_METADATA_SIZE; t->parsing.deframe_state = is_client ? GRPC_DTS_FH_0 : GRPC_DTS_CLIENT_PREFIX_0; t->writing.is_client = is_client; @@ -384,8 +381,8 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, gpr_log(GPR_ERROR, "%s: must be non-negative", GRPC_ARG_MAX_METADATA_SIZE); } else { - t->parsing.max_metadata_size = - (uint32_t)channel_args->args[i].value.integer; + push_setting(t, GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE, + (uint32_t)channel_args->args[i].value.integer); } } } diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.c b/src/core/ext/transport/chttp2/transport/frame_settings.c index a3c1e15f35e..7fa66247e4d 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.c +++ b/src/core/ext/transport/chttp2/transport/frame_settings.c @@ -44,6 +44,7 @@ #include "src/core/ext/transport/chttp2/transport/http2_errors.h" #include "src/core/lib/debug/trace.h" +#define DEFAULT_MAX_HEADER_LIST_SIZE (16 * 1024) #define MAX_MAX_HEADER_LIST_SIZE (1024 * 1024 * 1024) /* HTTP/2 mandated initial connection settings */ @@ -62,7 +63,7 @@ const grpc_chttp2_setting_parameters GRPC_CHTTP2_FLOW_CONTROL_ERROR}, {"MAX_FRAME_SIZE", 16384, 16384, 16777215, GRPC_CHTTP2_DISCONNECT_ON_INVALID_VALUE, GRPC_CHTTP2_PROTOCOL_ERROR}, - {"MAX_HEADER_LIST_SIZE", MAX_MAX_HEADER_LIST_SIZE, 0, + {"MAX_HEADER_LIST_SIZE", DEFAULT_MAX_HEADER_LIST_SIZE, 0, MAX_MAX_HEADER_LIST_SIZE, GRPC_CHTTP2_CLAMP_INVALID_VALUE, GRPC_CHTTP2_PROTOCOL_ERROR}, }; diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index be38ffda1ff..2884b3be9b2 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -229,9 +229,6 @@ struct grpc_chttp2_transport_parsing { /** is this transport a client? (boolean) */ uint8_t is_client; - /** max metadata size */ - uint32_t max_metadata_size; - /** were settings updated? */ uint8_t settings_updated; /** was a settings ack received? */ diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index 11cbb80ca88..f1018733379 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -45,6 +45,10 @@ #include "src/core/lib/profiling/timers.h" #include "src/core/lib/transport/static_metadata.h" +#define TRANSPORT_FROM_PARSING(tp) \ + ((grpc_chttp2_transport *)((char *)(tp)-offsetof(grpc_chttp2_transport, \ + parsing))) + static int init_frame_parser(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing); static int init_header_frame_parser( @@ -628,7 +632,10 @@ static void on_initial_header(void *tp, grpc_mdelem *md) { } else { const size_t new_size = stream_parsing->metadata_buffer[0].size + GRPC_MDELEM_LENGTH(md); - if (new_size > transport_parsing->max_metadata_size) { + grpc_chttp2_transport_global *transport_global = + &TRANSPORT_FROM_PARSING(transport_parsing)->global; + if (new_size > transport_global->settings + [GRPC_LOCAL_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE]) { stream_parsing->seen_error = true; stream_parsing->exceeded_metadata_size = true; GRPC_MDELEM_UNREF(md); @@ -664,7 +671,10 @@ static void on_trailing_header(void *tp, grpc_mdelem *md) { const size_t new_size = stream_parsing->metadata_buffer[1].size + GRPC_MDELEM_LENGTH(md); - if (new_size > transport_parsing->max_metadata_size) { + grpc_chttp2_transport_global *transport_global = + &TRANSPORT_FROM_PARSING(transport_parsing)->global; + if (new_size > transport_global->settings + [GRPC_LOCAL_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE]) { stream_parsing->seen_error = true; stream_parsing->exceeded_metadata_size = true; GRPC_MDELEM_UNREF(md); From 018bf1a8649e5036dba04343db6e4cd668eb3e24 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 29 Apr 2016 13:39:17 -0700 Subject: [PATCH 0156/1894] modified has_async_methods and has_sync_methods of TestServerBuilderPlugin --- test/cpp/end2end/server_builder_plugin_test.cc | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/test/cpp/end2end/server_builder_plugin_test.cc b/test/cpp/end2end/server_builder_plugin_test.cc index e42bd10832e..bebf1d1979e 100644 --- a/test/cpp/end2end/server_builder_plugin_test.cc +++ b/test/cpp/end2end/server_builder_plugin_test.cc @@ -78,9 +78,19 @@ class TestServerBuilderPlugin : public ServerBuilderPlugin { change_arguments_is_called_ = true; } - bool has_async_methods() const GRPC_OVERRIDE { return register_service_; } + bool has_async_methods() const GRPC_OVERRIDE { + if (register_service_) { + return service_->has_async_methods(); + } + return false; + } - bool has_sync_methods() const GRPC_OVERRIDE { return register_service_; } + bool has_sync_methods() const GRPC_OVERRIDE { + if (register_service_) { + return service_->has_synchronous_methods(); + } + return false; + } void SetRegisterService() { register_service_ = true; } From c049035bedad8e013a439bf2934d01e616da4227 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 29 Apr 2016 14:05:08 -0700 Subject: [PATCH 0157/1894] Add GRPC_ prefix for macros --- include/grpc++/impl/server_builder_plugin.h | 4 ++-- test/cpp/end2end/server_builder_plugin_test.cc | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/grpc++/impl/server_builder_plugin.h b/include/grpc++/impl/server_builder_plugin.h index 2cf1dfdbecd..7cf369e3467 100644 --- a/include/grpc++/impl/server_builder_plugin.h +++ b/include/grpc++/impl/server_builder_plugin.h @@ -64,12 +64,12 @@ class ServerBuilderPlugin { } // namespace grpc -#define DECLARE_PLUGIN(plugin_name) \ +#define GRPC_DECLARE_PLUGIN(plugin_name) \ namespace sBP##plugin_name { \ extern std::unique_ptr Create##plugin_name(); \ } -#define INIT_PLUGIN(map, plugin_name) \ +#define GRPC_INIT_PLUGIN(map, plugin_name) \ { \ std::unique_ptr plugin = \ sBP##plugin_name::Create##plugin_name(); \ diff --git a/test/cpp/end2end/server_builder_plugin_test.cc b/test/cpp/end2end/server_builder_plugin_test.cc index bebf1d1979e..9ed176d29dd 100644 --- a/test/cpp/end2end/server_builder_plugin_test.cc +++ b/test/cpp/end2end/server_builder_plugin_test.cc @@ -147,7 +147,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam { void InsertPlugin() { if (GetParam()) { // Add ServerBuilder plugin directly - INIT_PLUGIN(builder_->plugins_, TestServerBuilderPlugin); + GRPC_INIT_PLUGIN(builder_->plugins_, TestServerBuilderPlugin); EXPECT_TRUE(builder_->plugins_[PLUGIN_NAME] != nullptr); } else { // Add ServerBuilder plugin using ServerBuilder::SetOption() @@ -159,7 +159,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam { void InsertPluginWithTestService() { if (GetParam()) { // Add ServerBuilder plugin directly - INIT_PLUGIN(builder_->plugins_, TestServerBuilderPlugin); + GRPC_INIT_PLUGIN(builder_->plugins_, TestServerBuilderPlugin); EXPECT_TRUE(builder_->plugins_[PLUGIN_NAME] != nullptr); auto plugin = static_cast( builder_->plugins_[PLUGIN_NAME].get()); From eadcb89b7ac37207a945a520b99eb24de1513bc8 Mon Sep 17 00:00:00 2001 From: "David G. Quintas" Date: Fri, 29 Apr 2016 14:54:31 -0700 Subject: [PATCH 0158/1894] Fixed name of test config for h2_census --- test/core/end2end/fixtures/h2_census.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/end2end/fixtures/h2_census.c b/test/core/end2end/fixtures/h2_census.c index ff2f028f096..e46b39e476f 100644 --- a/test/core/end2end/fixtures/h2_census.c +++ b/test/core/end2end/fixtures/h2_census.c @@ -111,7 +111,7 @@ void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) { /* All test configurations */ static grpc_end2end_test_config configs[] = { - {"chttp2/fullstack", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION, + {"chttp2/fullstack+census", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION, chttp2_create_fixture_fullstack, chttp2_init_client_fullstack, chttp2_init_server_fullstack, chttp2_tear_down_fullstack}, }; From 9fab4386695eb5575b943b0d1fec8141aec72ea1 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 29 Apr 2016 15:05:00 -0700 Subject: [PATCH 0159/1894] Made Node tests support multiple versions and set the Node default version to 4 everywhere possible --- templates/tools/dockerfile/node_deps.include | 4 ++++ .../interoptest/grpc_interop_node/Dockerfile | 5 ++++- .../interoptest/grpc_interop_node/build_interop.sh | 2 -- .../stress_test/grpc_interop_stress_node/Dockerfile | 5 ++++- .../grpc_interop_stress_node/build_interop_stress.sh | 2 -- .../dockerfile/test/multilang_jessie_x64/Dockerfile | 5 ++++- tools/dockerfile/test/node_jessie_x64/Dockerfile | 5 ++++- tools/run_tests/run_tests.py | 12 +++++++++--- 8 files changed, 29 insertions(+), 11 deletions(-) diff --git a/templates/tools/dockerfile/node_deps.include b/templates/tools/dockerfile/node_deps.include index 7d37d671467..7855fbfee36 100644 --- a/templates/tools/dockerfile/node_deps.include +++ b/templates/tools/dockerfile/node_deps.include @@ -4,4 +4,8 @@ # Install nvm RUN touch .profile RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash +# Install all versions of node that we want to test RUN /bin/bash -l -c "nvm install 0.12 && npm config set cache /tmp/npm-cache" +RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache" +RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache" +RUN /bin/bash -l -c "nvm alias default 4" \ No newline at end of file diff --git a/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile index 64314f88642..2a8d35a5dc1 100644 --- a/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile @@ -69,8 +69,11 @@ RUN apt-get update && apt-get install -y time && apt-get clean # Install nvm RUN touch .profile RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash +# Install all versions of node that we want to test RUN /bin/bash -l -c "nvm install 0.12 && npm config set cache /tmp/npm-cache" - +RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache" +RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache" +RUN /bin/bash -l -c "nvm alias default 4" # Prepare ccache RUN ln -s /usr/bin/ccache /usr/local/bin/gcc RUN ln -s /usr/bin/ccache /usr/local/bin/g++ diff --git a/tools/dockerfile/interoptest/grpc_interop_node/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_node/build_interop.sh index b99fd444eea..976f55d9ab5 100755 --- a/tools/dockerfile/interoptest/grpc_interop_node/build_interop.sh +++ b/tools/dockerfile/interoptest/grpc_interop_node/build_interop.sh @@ -38,8 +38,6 @@ git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc cp -r /var/local/jenkins/service_account $HOME || true cd /var/local/git/grpc -nvm use 0.12 -nvm alias default 0.12 # prevent the need to run 'nvm use' in every shell # build Node interop client & server npm install -g node-gyp diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_node/Dockerfile b/tools/dockerfile/stress_test/grpc_interop_stress_node/Dockerfile index f70add4e31a..4fd7cc29a3c 100644 --- a/tools/dockerfile/stress_test/grpc_interop_stress_node/Dockerfile +++ b/tools/dockerfile/stress_test/grpc_interop_stress_node/Dockerfile @@ -69,8 +69,11 @@ RUN apt-get update && apt-get install -y time && apt-get clean # Install nvm RUN touch .profile RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash +# Install all versions of node that we want to test RUN /bin/bash -l -c "nvm install 0.12 && npm config set cache /tmp/npm-cache" - +RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache" +RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache" +RUN /bin/bash -l -c "nvm alias default 4" # Google Cloud platform API libraries RUN apt-get update && apt-get install -y python-pip && apt-get clean RUN pip install --upgrade google-api-python-client diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_node/build_interop_stress.sh b/tools/dockerfile/stress_test/grpc_interop_stress_node/build_interop_stress.sh index b99fd444eea..976f55d9ab5 100755 --- a/tools/dockerfile/stress_test/grpc_interop_stress_node/build_interop_stress.sh +++ b/tools/dockerfile/stress_test/grpc_interop_stress_node/build_interop_stress.sh @@ -38,8 +38,6 @@ git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc cp -r /var/local/jenkins/service_account $HOME || true cd /var/local/git/grpc -nvm use 0.12 -nvm alias default 0.12 # prevent the need to run 'nvm use' in every shell # build Node interop client & server npm install -g node-gyp diff --git a/tools/dockerfile/test/multilang_jessie_x64/Dockerfile b/tools/dockerfile/test/multilang_jessie_x64/Dockerfile index 71ebf2bf715..5c3f77405ea 100644 --- a/tools/dockerfile/test/multilang_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/multilang_jessie_x64/Dockerfile @@ -90,8 +90,11 @@ RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev c # Install nvm RUN touch .profile RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash +# Install all versions of node that we want to test RUN /bin/bash -l -c "nvm install 0.12 && npm config set cache /tmp/npm-cache" - +RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache" +RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache" +RUN /bin/bash -l -c "nvm alias default 4" #================= # PHP dependencies diff --git a/tools/dockerfile/test/node_jessie_x64/Dockerfile b/tools/dockerfile/test/node_jessie_x64/Dockerfile index 64314f88642..2a8d35a5dc1 100644 --- a/tools/dockerfile/test/node_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/node_jessie_x64/Dockerfile @@ -69,8 +69,11 @@ RUN apt-get update && apt-get install -y time && apt-get clean # Install nvm RUN touch .profile RUN curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash +# Install all versions of node that we want to test RUN /bin/bash -l -c "nvm install 0.12 && npm config set cache /tmp/npm-cache" - +RUN /bin/bash -l -c "nvm install 4 && npm config set cache /tmp/npm-cache" +RUN /bin/bash -l -c "nvm install 5 && npm config set cache /tmp/npm-cache" +RUN /bin/bash -l -c "nvm alias default 4" # Prepare ccache RUN ln -s /usr/bin/ccache /usr/local/bin/gcc RUN ln -s /usr/bin/ccache /usr/local/bin/g++ diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index dea481ef90d..d50d5aac95e 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -272,12 +272,17 @@ class NodeLanguage(object): def __init__(self): self.platform = platform_string() - self.node_version = '0.12' def configure(self, config, args): self.config = config self.args = args - _check_compiler(self.args.compiler, ['default']) + _check_compiler(self.args.compiler, ['default', 'node0.12', + 'node4', 'node5']) + if self.args.compiler == 'default': + self.node_version = '4' + else: + # Take off the word "node" + self.node_version = self.args.compiler[4:] def test_specs(self): if self.platform == 'windows': @@ -802,7 +807,8 @@ argp.add_argument('--compiler', 'gcc4.4', 'gcc4.9', 'gcc5.3', 'clang3.4', 'clang3.6', 'vs2010', 'vs2013', 'vs2015', - 'python2.7', 'python3.4'], + 'python2.7', 'python3.4', + 'node0.12', 'node4', 'node5'], default='default', help='Selects compiler to use. Allowed values depend on the platform and language.') argp.add_argument('--build_only', From c7edb0ee1022bd31104e2fff4d5d4fb1ef776a20 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 29 Apr 2016 15:33:31 -0700 Subject: [PATCH 0160/1894] Reverted 'Rewrite Node greeter example to use generated code' --- examples/node/greeter_client.js | 22 +- examples/node/greeter_server.js | 12 +- examples/node/helloworld_grpc_pb.js | 39 ---- examples/node/helloworld_pb.js | 332 ---------------------------- examples/node/package.json | 1 - 5 files changed, 12 insertions(+), 394 deletions(-) delete mode 100644 examples/node/helloworld_grpc_pb.js delete mode 100644 examples/node/helloworld_pb.js diff --git a/examples/node/greeter_client.js b/examples/node/greeter_client.js index 7125c2fec5b..2820acbbb71 100644 --- a/examples/node/greeter_client.js +++ b/examples/node/greeter_client.js @@ -31,30 +31,22 @@ * */ -var grpc = require('grpc'); +var PROTO_PATH = __dirname + '/../protos/helloworld.proto'; -var hello_messages = require('./helloworld_pb'); -var hello_service = require('./helloworld_grpc_pb'); +var grpc = require('grpc'); +var hello_proto = grpc.load(PROTO_PATH).helloworld; function main() { - var client = new hello_service.GreeterClient('localhost:50051', - grpc.credentials.createInsecure()); + var client = new hello_proto.Greeter('localhost:50051', + grpc.credentials.createInsecure()); var user; if (process.argv.length >= 3) { user = process.argv[2]; } else { user = 'world'; } - - var request = new hello_messages.HelloRequest(); - request.setName(user); - - client.sayHello(request, function(err, response) { - if (err) { - debugger; - throw err; - } - console.log('Greeting:', response.getMessage()); + client.sayHello({name: user}, function(err, response) { + console.log('Greeting:', response.message); }); } diff --git a/examples/node/greeter_server.js b/examples/node/greeter_server.js index a4aebf6d09d..e7ad51f6009 100644 --- a/examples/node/greeter_server.js +++ b/examples/node/greeter_server.js @@ -31,18 +31,16 @@ * */ -var grpc = require('grpc'); +var PROTO_PATH = __dirname + '/../protos/helloworld.proto'; -var hello_messages = require('./helloworld_pb'); -var hello_service = require('./helloworld_grpc_pb'); +var grpc = require('grpc'); +var hello_proto = grpc.load(PROTO_PATH).helloworld; /** * Implements the SayHello RPC method. */ function sayHello(call, callback) { - var reply = new hello_messages.HelloReply(); - reply.setMessage("Hello " + call.request.getName()); - callback(null, reply); + callback(null, {message: 'Hello ' + call.request.name}); } /** @@ -51,7 +49,7 @@ function sayHello(call, callback) { */ function main() { var server = new grpc.Server(); - server.addService(hello_service.GreeterService, {sayHello: sayHello}); + server.addProtoService(hello_proto.Greeter.service, {sayHello: sayHello}); server.bind('0.0.0.0:50051', grpc.ServerCredentials.createInsecure()); server.start(); } diff --git a/examples/node/helloworld_grpc_pb.js b/examples/node/helloworld_grpc_pb.js deleted file mode 100644 index 3d070d7de08..00000000000 --- a/examples/node/helloworld_grpc_pb.js +++ /dev/null @@ -1,39 +0,0 @@ -// GENERATED CODE -- DO NOT EDIT! - -var grpc = require('grpc'); -var helloworld_pb = require('./helloworld_pb.js'); - -function serialize_HelloReply(arg) { - if (!(arg instanceof helloworld_pb.HelloReply)) { - throw new Error('Expected argument of type HelloReply'); - } - return new Buffer(arg.serializeBinary()); -} -function deserialize_HelloReply(buffer_arg) { - return helloworld_pb.HelloReply.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_HelloRequest(arg) { - if (!(arg instanceof helloworld_pb.HelloRequest)) { - throw new Error('Expected argument of type HelloRequest'); - } - return new Buffer(arg.serializeBinary()); -} -function deserialize_HelloRequest(buffer_arg) { - return helloworld_pb.HelloRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -var GreeterService = exports.GreeterService = { - sayHello: { - path: '/helloworld.Greeter/SayHello', - requestStream: false, - responseStream: false, - requestType: helloworld_pb.HelloRequest, - responseType: helloworld_pb.HelloReply, - requestSerialize: serialize_HelloRequest, - requestDeserialize: deserialize_HelloRequest, - responseSerialize: serialize_HelloReply, - responseDeserialize: deserialize_HelloReply, - }, -}; - -exports.GreeterClient = grpc.makeGenericClientConstructor(GreeterService); diff --git a/examples/node/helloworld_pb.js b/examples/node/helloworld_pb.js deleted file mode 100644 index 6405bd90f10..00000000000 --- a/examples/node/helloworld_pb.js +++ /dev/null @@ -1,332 +0,0 @@ -/** - * @fileoverview - * @enhanceable - * @public - */ -// GENERATED CODE -- DO NOT EDIT! - -var jspb = require('google-protobuf'); -var goog = jspb; -var global = Function('return this')(); - -goog.exportSymbol('proto.helloworld.HelloReply', null, global); -goog.exportSymbol('proto.helloworld.HelloRequest', null, global); - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.helloworld.HelloRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.helloworld.HelloRequest, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.helloworld.HelloRequest.displayName = 'proto.helloworld.HelloRequest'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.helloworld.HelloRequest.prototype.toObject = function(opt_includeInstance) { - return proto.helloworld.HelloRequest.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.helloworld.HelloRequest} msg The msg instance to transform. - * @return {!Object} - */ -proto.helloworld.HelloRequest.toObject = function(includeInstance, msg) { - var f, obj = { - name: msg.getName() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.helloworld.HelloRequest} - */ -proto.helloworld.HelloRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.helloworld.HelloRequest; - return proto.helloworld.HelloRequest.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.helloworld.HelloRequest} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.helloworld.HelloRequest} - */ -proto.helloworld.HelloRequest.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Class method variant: serializes the given message to binary data - * (in protobuf wire format), writing to the given BinaryWriter. - * @param {!proto.helloworld.HelloRequest} message - * @param {!jspb.BinaryWriter} writer - */ -proto.helloworld.HelloRequest.serializeBinaryToWriter = function(message, writer) { - message.serializeBinaryToWriter(writer); -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.helloworld.HelloRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - this.serializeBinaryToWriter(writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the message to binary data (in protobuf wire format), - * writing to the given BinaryWriter. - * @param {!jspb.BinaryWriter} writer - */ -proto.helloworld.HelloRequest.prototype.serializeBinaryToWriter = function (writer) { - var f = undefined; - f = this.getName(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * Creates a deep clone of this proto. No data is shared with the original. - * @return {!proto.helloworld.HelloRequest} The clone. - */ -proto.helloworld.HelloRequest.prototype.cloneMessage = function() { - return /** @type {!proto.helloworld.HelloRequest} */ (jspb.Message.cloneMessage(this)); -}; - - -/** - * optional string name = 1; - * @return {string} - */ -proto.helloworld.HelloRequest.prototype.getName = function() { - return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, "")); -}; - - -/** @param {string} value */ -proto.helloworld.HelloRequest.prototype.setName = function(value) { - jspb.Message.setField(this, 1, value); -}; - - - -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.helloworld.HelloReply = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.helloworld.HelloReply, jspb.Message); -if (goog.DEBUG && !COMPILED) { - proto.helloworld.HelloReply.displayName = 'proto.helloworld.HelloReply'; -} - - -if (jspb.Message.GENERATE_TO_OBJECT) { -/** - * Creates an object representation of this proto suitable for use in Soy templates. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. - * @param {boolean=} opt_includeInstance Whether to include the JSPB instance - * for transitional soy proto support: http://goto/soy-param-migration - * @return {!Object} - */ -proto.helloworld.HelloReply.prototype.toObject = function(opt_includeInstance) { - return proto.helloworld.HelloReply.toObject(opt_includeInstance, this); -}; - - -/** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Whether to include the JSPB - * instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.helloworld.HelloReply} msg The msg instance to transform. - * @return {!Object} - */ -proto.helloworld.HelloReply.toObject = function(includeInstance, msg) { - var f, obj = { - message: msg.getMessage() - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg - } - return obj; -}; -} - - -/** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.helloworld.HelloReply} - */ -proto.helloworld.HelloReply.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.helloworld.HelloReply; - return proto.helloworld.HelloReply.deserializeBinaryFromReader(msg, reader); -}; - - -/** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.helloworld.HelloReply} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.helloworld.HelloReply} - */ -proto.helloworld.HelloReply.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setMessage(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; -}; - - -/** - * Class method variant: serializes the given message to binary data - * (in protobuf wire format), writing to the given BinaryWriter. - * @param {!proto.helloworld.HelloReply} message - * @param {!jspb.BinaryWriter} writer - */ -proto.helloworld.HelloReply.serializeBinaryToWriter = function(message, writer) { - message.serializeBinaryToWriter(writer); -}; - - -/** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.helloworld.HelloReply.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - this.serializeBinaryToWriter(writer); - return writer.getResultBuffer(); -}; - - -/** - * Serializes the message to binary data (in protobuf wire format), - * writing to the given BinaryWriter. - * @param {!jspb.BinaryWriter} writer - */ -proto.helloworld.HelloReply.prototype.serializeBinaryToWriter = function (writer) { - var f = undefined; - f = this.getMessage(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } -}; - - -/** - * Creates a deep clone of this proto. No data is shared with the original. - * @return {!proto.helloworld.HelloReply} The clone. - */ -proto.helloworld.HelloReply.prototype.cloneMessage = function() { - return /** @type {!proto.helloworld.HelloReply} */ (jspb.Message.cloneMessage(this)); -}; - - -/** - * optional string message = 1; - * @return {string} - */ -proto.helloworld.HelloReply.prototype.getMessage = function() { - return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, "")); -}; - - -/** @param {string} value */ -proto.helloworld.HelloReply.prototype.setMessage = function(value) { - jspb.Message.setField(this, 1, value); -}; - - -goog.object.extend(exports, proto.helloworld); diff --git a/examples/node/package.json b/examples/node/package.json index 49ab74d3181..d135df2464b 100644 --- a/examples/node/package.json +++ b/examples/node/package.json @@ -4,7 +4,6 @@ "dependencies": { "async": "^1.5.2", "grpc": "0.13.0", - "google-protobuf": "*", "lodash": "^4.6.1", "minimist": "^1.2.0" } From 454432542a6cc6145621003ecd8303c82a4e2b7b Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Fri, 29 Apr 2016 16:19:51 -0700 Subject: [PATCH 0161/1894] Add a maybe-temporary way for apps to clear the channel cache --- .../GRPCClient/GRPCCall+ChannelArg.h | 5 +++++ .../GRPCClient/GRPCCall+ChannelArg.m | 4 ++++ src/objective-c/GRPCClient/private/GRPCHost.h | 2 ++ src/objective-c/GRPCClient/private/GRPCHost.m | 21 ++++++++++++++----- 4 files changed, 27 insertions(+), 5 deletions(-) diff --git a/src/objective-c/GRPCClient/GRPCCall+ChannelArg.h b/src/objective-c/GRPCClient/GRPCCall+ChannelArg.h index bd6b064f166..646bf43b547 100644 --- a/src/objective-c/GRPCClient/GRPCCall+ChannelArg.h +++ b/src/objective-c/GRPCClient/GRPCCall+ChannelArg.h @@ -32,6 +32,8 @@ */ #import "GRPCCall.h" +#include + /** * Methods to configure GRPC channel options. */ @@ -43,4 +45,7 @@ */ + (void)setUserAgentPrefix:(NSString *)userAgentPrefix forHost:(NSString *)host; ++ (void)closeOpenConnections DEPRECATED_MSG_ATTRIBUTE("The API for this feature is experimental, " + "and might be removed or modified at any " + "time."); @end diff --git a/src/objective-c/GRPCClient/GRPCCall+ChannelArg.m b/src/objective-c/GRPCClient/GRPCCall+ChannelArg.m index 5f9932d86dc..bcc3b915075 100644 --- a/src/objective-c/GRPCClient/GRPCCall+ChannelArg.m +++ b/src/objective-c/GRPCClient/GRPCCall+ChannelArg.m @@ -46,4 +46,8 @@ hostConfig.userAgentPrefix = userAgentPrefix; } ++ (void)closeOpenConnections { + [GRPCHost flushChannelCache]; +} + @end diff --git a/src/objective-c/GRPCClient/private/GRPCHost.h b/src/objective-c/GRPCClient/private/GRPCHost.h index 9220e2a33db..350c69bf8e8 100644 --- a/src/objective-c/GRPCClient/private/GRPCHost.h +++ b/src/objective-c/GRPCClient/private/GRPCHost.h @@ -41,6 +41,8 @@ struct grpc_channel_credentials; @interface GRPCHost : NSObject ++ (void)flushChannelCache; + @property(nonatomic, readonly) NSString *address; @property(nonatomic, copy, nullable) NSString *userAgentPrefix; @property(nonatomic, nullable) struct grpc_channel_credentials *channelCreds; diff --git a/src/objective-c/GRPCClient/private/GRPCHost.m b/src/objective-c/GRPCClient/private/GRPCHost.m index 43166cbb527..0358cc62365 100644 --- a/src/objective-c/GRPCClient/private/GRPCHost.m +++ b/src/objective-c/GRPCClient/private/GRPCHost.m @@ -48,6 +48,8 @@ NS_ASSUME_NONNULL_BEGIN // templates/src/core/surface/version.c.template . #define GRPC_OBJC_VERSION_STRING @"0.13.0" +static NSMutableDictionary *kHostCache; + @implementation GRPCHost { // TODO(mlumish): Investigate whether caching channels with strong links is a good idea. GRPCChannel *_channel; @@ -79,13 +81,12 @@ NS_ASSUME_NONNULL_BEGIN } // Look up the GRPCHost in the cache. - static NSMutableDictionary *hostCache; static dispatch_once_t cacheInitialization; dispatch_once(&cacheInitialization, ^{ - hostCache = [NSMutableDictionary dictionary]; + kHostCache = [NSMutableDictionary dictionary]; }); - @synchronized(hostCache) { - GRPCHost *cachedHost = hostCache[address]; + @synchronized(kHostCache) { + GRPCHost *cachedHost = kHostCache[address]; if (cachedHost) { return cachedHost; } @@ -93,12 +94,22 @@ NS_ASSUME_NONNULL_BEGIN if ((self = [super init])) { _address = address; _secure = YES; - hostCache[address] = self; + kHostCache[address] = self; } } return self; } ++ (void)flushChannelCache { + @synchronized(kHostCache) { + [kHostCache enumerateKeysAndObjectsUsingBlock:^(id _Nonnull key, + GRPCHost * _Nonnull host, + BOOL * _Nonnull stop) { + [host disconnect]; + }]; + } +} + - (nullable grpc_call *)unmanagedCallWithPath:(NSString *)path completionQueue:(GRPCCompletionQueue *)queue { GRPCChannel *channel; From fad045004d5576a3f2d32f6d27b0fc285ff589d0 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 29 Apr 2016 16:43:46 -0700 Subject: [PATCH 0162/1894] debug logging fix --- src/core/ext/lb_policy/round_robin/round_robin.c | 6 ++++-- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 3 ++- src/core/ext/transport/chttp2/transport/hpack_encoder.c | 6 +++++- src/core/ext/transport/chttp2/transport/hpack_table.c | 4 +++- 4 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index 3f6051b8925..dcdc0c62857 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -306,8 +306,10 @@ static void start_picking(grpc_exec_ctx *exec_ctx, round_robin_lb_policy *p) { size_t i; p->started_picking = 1; - gpr_log(GPR_DEBUG, "LB_POLICY: p=%p num_subchannels=%d", p, - p->num_subchannels); + if (grpc_lb_round_robin_trace) { + gpr_log(GPR_DEBUG, "LB_POLICY: p=%p num_subchannels=%d", p, + p->num_subchannels); + } for (i = 0; i < p->num_subchannels; i++) { subchannel_data *sd = p->subchannels[i]; diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index fcf2abfe66e..02ad0c0370a 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -776,7 +776,8 @@ void grpc_chttp2_add_incoming_goaway( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, uint32_t goaway_error, gpr_slice goaway_text) { char *msg = gpr_dump_slice(goaway_text, GPR_DUMP_HEX | GPR_DUMP_ASCII); - gpr_log(GPR_DEBUG, "got goaway [%d]: %s", goaway_error, msg); + GRPC_CHTTP2_IF_TRACING(gpr_log( + GPR_DEBUG, "got goaway [%d]: %s", goaway_error, msg)); gpr_free(msg); gpr_slice_unref(goaway_text); transport_global->seen_goaway = 1; diff --git a/src/core/ext/transport/chttp2/transport/hpack_encoder.c b/src/core/ext/transport/chttp2/transport/hpack_encoder.c index 555027c8660..ebeee37f0d9 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_encoder.c +++ b/src/core/ext/transport/chttp2/transport/hpack_encoder.c @@ -63,6 +63,8 @@ /* don't consider adding anything bigger than this to the hpack table */ #define MAX_DECODER_SPACE_USAGE 512 +extern int grpc_http_trace; + typedef struct { int is_first_frame; /* number of bytes in 'output' when we started the frame - used to calculate @@ -532,7 +534,9 @@ void grpc_chttp2_hpack_compressor_set_max_table_size( } } c->advertise_table_size_change = 1; - gpr_log(GPR_DEBUG, "set max table size from encoder to %d", max_table_size); + if (grpc_http_trace) { + gpr_log(GPR_DEBUG, "set max table size from encoder to %d", max_table_size); + } } void grpc_chttp2_encode_header(grpc_chttp2_hpack_compressor *c, diff --git a/src/core/ext/transport/chttp2/transport/hpack_table.c b/src/core/ext/transport/chttp2/transport/hpack_table.c index 4d64506de29..295f31c44f2 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_table.c +++ b/src/core/ext/transport/chttp2/transport/hpack_table.c @@ -253,7 +253,9 @@ void grpc_chttp2_hptbl_set_max_bytes(grpc_chttp2_hptbl *tbl, if (tbl->max_bytes == max_bytes) { return; } - gpr_log(GPR_DEBUG, "Update hpack parser max size to %d", max_bytes); + if (grpc_http_trace) { + gpr_log(GPR_DEBUG, "Update hpack parser max size to %d", max_bytes); + } while (tbl->mem_used > max_bytes) { evict1(tbl); } From 4ee1a627230c8564dfdab5247e8703e0eb10d5c8 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 29 Apr 2016 16:47:27 -0700 Subject: [PATCH 0163/1894] Stress test fixes - properly fail a Read() on a stream if we fail to parse a protobuf - fix an ordering problem with the chttp2 transport global lock, whereby a sequence of two operations could be swapped - this resulted in slices being returned to the upper layers in the wrong order, corrupting data --- include/grpc++/impl/codegen/call.h | 7 +++---- .../chttp2/transport/chttp2_transport.c | 17 ++++++++++++----- .../ext/transport/chttp2/transport/internal.h | 3 ++- 3 files changed, 17 insertions(+), 10 deletions(-) diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h index aea1a6acec7..d081b7d9c59 100644 --- a/include/grpc++/impl/codegen/call.h +++ b/include/grpc++/impl/codegen/call.h @@ -281,10 +281,9 @@ class CallOpRecvMessage { if (message_ == nullptr) return; if (recv_buf_) { if (*status) { - got_message = true; - *status = SerializationTraits::Deserialize(recv_buf_, message_, - max_message_size) - .ok(); + got_message = *status = SerializationTraits::Deserialize( + recv_buf_, message_, max_message_size) + .ok(); } else { got_message = false; g_core_codegen_interface->grpc_byte_buffer_destroy(recv_buf_); diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index fcf2abfe66e..8c8593748dd 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -629,9 +629,10 @@ static void finish_global_actions(grpc_exec_ctx *exec_ctx, check_read_ops(exec_ctx, &t->global); gpr_mu_lock(&t->executor.mu); - if (t->executor.pending_actions != NULL) { - hdr = t->executor.pending_actions; - t->executor.pending_actions = NULL; + if (t->executor.pending_actions_head != NULL) { + hdr = t->executor.pending_actions_head; + t->executor.pending_actions_head = t->executor.pending_actions_tail = + NULL; gpr_mu_unlock(&t->executor.mu); while (hdr != NULL) { hdr->action(exec_ctx, t, hdr->stream, hdr->arg); @@ -686,8 +687,14 @@ void grpc_chttp2_run_with_global_lock(grpc_exec_ctx *exec_ctx, gpr_free(hdr); continue; } - hdr->next = t->executor.pending_actions; - t->executor.pending_actions = hdr; + hdr->next = NULL; + if (t->executor.pending_actions_head != NULL) { + t->executor.pending_actions_tail = + t->executor.pending_actions_tail->next = hdr; + } else { + t->executor.pending_actions_tail = t->executor.pending_actions_head = + hdr; + } REF_TRANSPORT(t, "pending_action"); gpr_mu_unlock(&t->executor.mu); } diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 7a8084641d7..a269338b494 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -321,7 +321,8 @@ struct grpc_chttp2_transport { /** is a thread currently parsing */ bool parsing_active; - grpc_chttp2_executor_action_header *pending_actions; + grpc_chttp2_executor_action_header *pending_actions_head; + grpc_chttp2_executor_action_header *pending_actions_tail; } executor; /** is the transport destroying itself? */ From 29660794bff3bd2c8ab8c5cfda5fdbe6721233e7 Mon Sep 17 00:00:00 2001 From: Jayant Kolhe Date: Fri, 29 Apr 2016 17:41:35 -0700 Subject: [PATCH 0164/1894] Update CONTRIBUTING.md --- CONTRIBUTING.md | 63 ++++++++----------------------------------------- 1 file changed, 10 insertions(+), 53 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 35eb5e61389..7c366710a19 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,7 +1,8 @@ # How to contribute -We definitely welcome patches and contribution to grpc! Here is some guideline -and information about how to do so. +This is a place for various components in the gRPC ecosystem that aren't part of the gRPC core. We welcome contributions in this repo which either build extensions around gRPC or showcase how to use gRPC in various use cases and/or with other technologies. +Here is some guideline and information about how to do so. + ## Getting started @@ -10,58 +11,14 @@ and information about how to do so. In order to protect both you and ourselves, you will need to sign the [Contributor License Agreement](https://cla.developers.google.com/clas). -### Technical requirements - -You will need several tools to work with this repository. In addition to all of -the packages described in the [INSTALL](INSTALL.md) file, you will also need -python, and the mako template renderer. To install the latter, using pip, one -should simply be able to do `pip install mako`. - -In order to run all of the tests we provide, you will need valgrind and clang. -More specifically, under debian, you will need the package libc++-dev to -properly run all the tests. - -Compiling and running grpc C++ tests depend on protobuf 3.0.0, gtest and gflags. -Although gflags is provided in third_party, you will need to manually install -that dependency on your system to run these tests. Under a Debian or Ubuntu -system, you can install the gtests and gflags packages using apt-get: - -```sh - $ [sudo] apt-get install libgflags-dev libgtest-dev -``` - -If you are planning to work on any of the languages other than C and C++, you -will also need their appropriate development environments. - -If you want to work under Windows, we recommend the use of Visual Studio 2013. -The [Community or Express editions](http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx) -are free and suitable for developing with grpc. Note however that our test -environment and tools are available for Unix environments only at the moment. - -## Testing your changes - -We provide a tool to help run the suite of tests in various environments. -In order to run most of the available tests, one would need to run: - -`./tools/run_tests/run_tests.py` - -If you want to run tests for any of the languages {c, c++, csharp, node, objc, php, python, ruby}, do this: - -`./tools/run_tests/run_tests.py -l ` - -To know about the list of available commands, do this: - -`./tools/run_tests/run_tests.py -h` +### Guidelines to contribute -## Adding or removing source code +Each contribution needs to have a) top level readme explaining what the contribution does, how to use it with gRPC, how to build and test it and what are its external technical dependencies. +Have at least a top level readme.md describing overview, how to use, dependencies, and how to build and test. +Third party libraries: Note that no third party libraries with AGPL license etc should not be used in the codebases. +Automated tests - will have a badge called “Verified†for tested contributions. Contributors should have automated tests present in every contribution and they should run on commit. We (gRPC team) will set up travis CI to facilitate this. Tests must return green before we merge them. -Each language uses its own build system to work. Currently, the root's Makefile -and the Visual Studio project files are building only the C and C++ source code. -In order to ease the maintenance of these files, we have a -template system. Please do not contribute manual changes to any of the generated -files. Instead, modify the template files, or the build.yaml file, and -re-generate the project files using the following command: +### How contributions will be accepted? -`./tools/buildgen/generate_projects.sh` +gRPC core team members will accept PRs and merge. Code reviews will be done on a best effort basis. It is however expected that the community will address the comments from core team members. As long as contribution meets the two above mentioned guidelines and CLA is signed, PRs will be merged. The team will try and take care of outstanding requests weekly (ie during office hours). If people want a faster dev cycle, we'd recommend doing this in a fork, per github flow anyways. -You'll find more information about this in the [templates](templates) folder. From 2f262342039b9f21897dcedd9b62a75a129b1bcb Mon Sep 17 00:00:00 2001 From: Jayant Kolhe Date: Fri, 29 Apr 2016 17:46:01 -0700 Subject: [PATCH 0165/1894] Update CONTRIBUTING.md --- CONTRIBUTING.md | 63 +++++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 53 insertions(+), 10 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7c366710a19..35eb5e61389 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,8 +1,7 @@ # How to contribute -This is a place for various components in the gRPC ecosystem that aren't part of the gRPC core. We welcome contributions in this repo which either build extensions around gRPC or showcase how to use gRPC in various use cases and/or with other technologies. -Here is some guideline and information about how to do so. - +We definitely welcome patches and contribution to grpc! Here is some guideline +and information about how to do so. ## Getting started @@ -11,14 +10,58 @@ Here is some guideline and information about how to do so. In order to protect both you and ourselves, you will need to sign the [Contributor License Agreement](https://cla.developers.google.com/clas). -### Guidelines to contribute +### Technical requirements + +You will need several tools to work with this repository. In addition to all of +the packages described in the [INSTALL](INSTALL.md) file, you will also need +python, and the mako template renderer. To install the latter, using pip, one +should simply be able to do `pip install mako`. + +In order to run all of the tests we provide, you will need valgrind and clang. +More specifically, under debian, you will need the package libc++-dev to +properly run all the tests. + +Compiling and running grpc C++ tests depend on protobuf 3.0.0, gtest and gflags. +Although gflags is provided in third_party, you will need to manually install +that dependency on your system to run these tests. Under a Debian or Ubuntu +system, you can install the gtests and gflags packages using apt-get: + +```sh + $ [sudo] apt-get install libgflags-dev libgtest-dev +``` + +If you are planning to work on any of the languages other than C and C++, you +will also need their appropriate development environments. + +If you want to work under Windows, we recommend the use of Visual Studio 2013. +The [Community or Express editions](http://www.visualstudio.com/en-us/downloads/download-visual-studio-vs.aspx) +are free and suitable for developing with grpc. Note however that our test +environment and tools are available for Unix environments only at the moment. + +## Testing your changes + +We provide a tool to help run the suite of tests in various environments. +In order to run most of the available tests, one would need to run: + +`./tools/run_tests/run_tests.py` + +If you want to run tests for any of the languages {c, c++, csharp, node, objc, php, python, ruby}, do this: + +`./tools/run_tests/run_tests.py -l ` + +To know about the list of available commands, do this: + +`./tools/run_tests/run_tests.py -h` -Each contribution needs to have a) top level readme explaining what the contribution does, how to use it with gRPC, how to build and test it and what are its external technical dependencies. -Have at least a top level readme.md describing overview, how to use, dependencies, and how to build and test. -Third party libraries: Note that no third party libraries with AGPL license etc should not be used in the codebases. -Automated tests - will have a badge called “Verified†for tested contributions. Contributors should have automated tests present in every contribution and they should run on commit. We (gRPC team) will set up travis CI to facilitate this. Tests must return green before we merge them. +## Adding or removing source code -### How contributions will be accepted? +Each language uses its own build system to work. Currently, the root's Makefile +and the Visual Studio project files are building only the C and C++ source code. +In order to ease the maintenance of these files, we have a +template system. Please do not contribute manual changes to any of the generated +files. Instead, modify the template files, or the build.yaml file, and +re-generate the project files using the following command: -gRPC core team members will accept PRs and merge. Code reviews will be done on a best effort basis. It is however expected that the community will address the comments from core team members. As long as contribution meets the two above mentioned guidelines and CLA is signed, PRs will be merged. The team will try and take care of outstanding requests weekly (ie during office hours). If people want a faster dev cycle, we'd recommend doing this in a fork, per github flow anyways. +`./tools/buildgen/generate_projects.sh` +You'll find more information about this in the [templates](templates) folder. From 615da649926677bf00b165cb183d97233fcd46c8 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 29 Apr 2016 18:14:05 -0700 Subject: [PATCH 0166/1894] explicitly cast constant value to gpr_atm --- src/core/ext/client_config/subchannel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c index 3a5af9f53d4..bd45d3825cc 100644 --- a/src/core/ext/client_config/subchannel.c +++ b/src/core/ext/client_config/subchannel.c @@ -268,7 +268,7 @@ static void disconnect(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) { con = GET_CONNECTED_SUBCHANNEL(c, no_barrier); if (con != NULL) { GRPC_CONNECTED_SUBCHANNEL_UNREF(exec_ctx, con, "connection"); - gpr_atm_no_barrier_store(&c->connected_subchannel, 0xdeadbeef); + gpr_atm_no_barrier_store(&c->connected_subchannel, (gpr_atm)0xdeadbeef); } gpr_mu_unlock(&c->mu); } From 088aa27adfd0852a36f7e6eedf77cad8eb896ef2 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 29 Apr 2016 18:15:43 -0700 Subject: [PATCH 0167/1894] format fixes --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 02ad0c0370a..9ca551f0c5f 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -776,8 +776,8 @@ void grpc_chttp2_add_incoming_goaway( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, uint32_t goaway_error, gpr_slice goaway_text) { char *msg = gpr_dump_slice(goaway_text, GPR_DUMP_HEX | GPR_DUMP_ASCII); - GRPC_CHTTP2_IF_TRACING(gpr_log( - GPR_DEBUG, "got goaway [%d]: %s", goaway_error, msg)); + GRPC_CHTTP2_IF_TRACING( + gpr_log(GPR_DEBUG, "got goaway [%d]: %s", goaway_error, msg)); gpr_free(msg); gpr_slice_unref(goaway_text); transport_global->seen_goaway = 1; From 67df784bbc603a9d43f75780c73714e53249c0ea Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 29 Apr 2016 16:38:03 -0700 Subject: [PATCH 0168/1894] C# Dockerfile and Config scripts --- .../Dockerfile.template | 41 +++++++ .../grpc_interop_stress_csharp/Dockerfile | 101 ++++++++++++++++++ .../build_interop_stress.sh | 47 ++++++++ .../run_tests/stress_test/configs/csharp.json | 90 ++++++++++++++++ 4 files changed, 279 insertions(+) create mode 100644 templates/tools/dockerfile/stress_test/grpc_interop_stress_csharp/Dockerfile.template create mode 100644 tools/dockerfile/stress_test/grpc_interop_stress_csharp/Dockerfile create mode 100755 tools/dockerfile/stress_test/grpc_interop_stress_csharp/build_interop_stress.sh create mode 100644 tools/run_tests/stress_test/configs/csharp.json diff --git a/templates/tools/dockerfile/stress_test/grpc_interop_stress_csharp/Dockerfile.template b/templates/tools/dockerfile/stress_test/grpc_interop_stress_csharp/Dockerfile.template new file mode 100644 index 00000000000..074178252d0 --- /dev/null +++ b/templates/tools/dockerfile/stress_test/grpc_interop_stress_csharp/Dockerfile.template @@ -0,0 +1,41 @@ +%YAML 1.2 +--- | + # Copyright 2015, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../../apt_get_basic.include"/> + <%include file="../../ccache_setup.include"/> + <%include file="../../cxx_deps.include"/> + <%include file="../../gcp_api_libraries.include"/> + <%include file="../../csharp_deps.include"/> + # Define the default command. + CMD ["bash"] + diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_csharp/Dockerfile b/tools/dockerfile/stress_test/grpc_interop_stress_csharp/Dockerfile new file mode 100644 index 00000000000..823fe948fb2 --- /dev/null +++ b/tools/dockerfile/stress_test/grpc_interop_stress_csharp/Dockerfile @@ -0,0 +1,101 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +FROM debian:jessie + +# Install Git and basic packages. +RUN apt-get update && apt-get install -y \ + autoconf \ + autotools-dev \ + build-essential \ + bzip2 \ + ccache \ + curl \ + gcc \ + gcc-multilib \ + git \ + golang \ + gyp \ + lcov \ + libc6 \ + libc6-dbg \ + libc6-dev \ + libgtest-dev \ + libtool \ + make \ + perl \ + strace \ + python-dev \ + python-setuptools \ + python-yaml \ + telnet \ + unzip \ + wget \ + zip && apt-get clean + +#================ +# Build profiling +RUN apt-get update && apt-get install -y time && apt-get clean + +# Prepare ccache +RUN ln -s /usr/bin/ccache /usr/local/bin/gcc +RUN ln -s /usr/bin/ccache /usr/local/bin/g++ +RUN ln -s /usr/bin/ccache /usr/local/bin/cc +RUN ln -s /usr/bin/ccache /usr/local/bin/c++ +RUN ln -s /usr/bin/ccache /usr/local/bin/clang +RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ + +#================= +# C++ dependencies +RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean + +# Google Cloud platform API libraries +RUN apt-get update && apt-get install -y python-pip && apt-get clean +RUN pip install --upgrade google-api-python-client + + +#================ +# C# dependencies + +# Update to a newer version of mono +RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF +RUN echo "deb http://download.mono-project.com/repo/debian wheezy main" | tee /etc/apt/sources.list.d/mono-xamarin.list +RUN echo "deb http://download.mono-project.com/repo/debian wheezy-apache24-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list +RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libjpeg62-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list +RUN echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | tee -a /etc/apt/sources.list.d/mono-xamarin.list + +# Install dependencies +RUN apt-get update && apt-get -y dist-upgrade && apt-get install -y \ + mono-devel \ + ca-certificates-mono \ + nuget \ + && apt-get clean + +# Define the default command. +CMD ["bash"] diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_csharp/build_interop_stress.sh b/tools/dockerfile/stress_test/grpc_interop_stress_csharp/build_interop_stress.sh new file mode 100755 index 00000000000..1f4bf893cce --- /dev/null +++ b/tools/dockerfile/stress_test/grpc_interop_stress_csharp/build_interop_stress.sh @@ -0,0 +1,47 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Builds C# interop server and client in a base image. +set -e + +mkdir -p /var/local/git +git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc + +# Copy service account keys if available +cp -r /var/local/jenkins/service_account $HOME || true + +cd /var/local/git/grpc + +# Build C++ metrics client (to query the metrics from csharp stress client) +make metrics_client -j + +# Build C# interop client & server +tools/run_tests/run_tests.py -l csharp -c dbg --build_only + diff --git a/tools/run_tests/stress_test/configs/csharp.json b/tools/run_tests/stress_test/configs/csharp.json new file mode 100644 index 00000000000..b7090696b4f --- /dev/null +++ b/tools/run_tests/stress_test/configs/csharp.json @@ -0,0 +1,90 @@ +{ + "dockerImages": { + "grpc_stress_csharp" : { + "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "dockerFileDir": "grpc_interop_stress_csharp" + } + }, + + "clientTemplates": { + "baseTemplates": { + "default": { + "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py", + "pollIntervalSecs": 60, + "clientArgs": { + "num_channels_per_server":5, + "num_stubs_per_channel":10, + "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1", + "metrics_port": 8081 + }, + "metricsPort": 8081, + "metricsArgs": { + "metrics_server_address": "localhost:8081", + "total_only": "true" + } + } + }, + "templates": { + "csharp_client": { + "baseTemplate": "default", + "stressClientCmd": [ + "mono", + "/var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.StressClient/bin/Debug/Grpc.IntegrationTesting.StressClient.exe" + ], + "metricsClientCmd": ["/var/local/git/grpc/bins/opt/metrics_client"] + } + } + }, + + "serverTemplates": { + "baseTemplates":{ + "default": { + "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py", + "serverPort": 8080, + "serverArgs": { + "port": 8080 + } + } + }, + "templates": { + "csharp_server": { + "baseTemplate": "default", + "stressServerCmd": [ + "mono", + "/var/local/git/grpc/src/csharp/Grpc.IntegrationTesting.Server/bin/Debug/Grpc.IntegrationTesting.Server.exe" + ] + } + } + }, + + "testMatrix": { + "serverPodSpecs": { + "stress-server-csharp": { + "serverTemplate": "csharp_server", + "dockerImage": "grpc_stress_csharp", + "numInstances": 1 + } + }, + + "clientPodSpecs": { + "stress-client-csharp": { + "clientTemplate": "csharp_client", + "dockerImage": "grpc_stress_csharp", + "numInstances": 10, + "serverPodSpec": "stress-server-csharp" + } + } + }, + + "globalSettings": { + "buildDockerImages": true, + "pollIntervalSecs": 60, + "testDurationSecs": 7200, + "kubernetesProxyPort": 8001, + "datasetIdNamePrefix": "stress_test_csharp", + "summaryTableId": "summary", + "qpsTableId": "qps", + "podWarmupSecs": 60 + } +} + From 7a5f019bd3a086f4024724be936d6cd87b963daa Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 29 Apr 2016 19:34:25 -0700 Subject: [PATCH 0169/1894] Removed leftover function declaration from channel args --- src/core/lib/channel/channel_args.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/core/lib/channel/channel_args.h b/src/core/lib/channel/channel_args.h index 0a51780a14e..23c7b7b897b 100644 --- a/src/core/lib/channel/channel_args.h +++ b/src/core/lib/channel/channel_args.h @@ -56,10 +56,6 @@ grpc_channel_args *grpc_channel_args_merge(const grpc_channel_args *a, /** Destroy arguments created by \a grpc_channel_args_copy */ void grpc_channel_args_destroy(grpc_channel_args *a); -/** Reads census_enabled settings from channel args. Returns 1 if census_enabled - * is specified in channel args, otherwise returns 0. */ -int grpc_channel_args_is_census_enabled(const grpc_channel_args *a); - /** Returns the compression algorithm set in \a a. */ grpc_compression_algorithm grpc_channel_args_get_compression_algorithm( const grpc_channel_args *a); From fa70dacf95b93486b7dfe0c21ada90d75a5d5bcd Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Fri, 29 Apr 2016 19:58:52 -0700 Subject: [PATCH 0170/1894] =?UTF-8?q?Smoke=20test=20that=20things=20still?= =?UTF-8?q?=20work=20after=20=E2=80=9CcloseOpenConnections=E2=80=9D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/objective-c/tests/InteropTests.m | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/objective-c/tests/InteropTests.m b/src/objective-c/tests/InteropTests.m index 26877b1ae84..379271a312d 100644 --- a/src/objective-c/tests/InteropTests.m +++ b/src/objective-c/tests/InteropTests.m @@ -35,6 +35,7 @@ #include +#import #import #import #import @@ -312,4 +313,25 @@ [self waitForExpectationsWithTimeout:8 handler:nil]; } +- (void)testRPCAfterClosingOpenConnections { + XCTAssertNotNil(self.class.host); + __weak XCTestExpectation *expectation = + [self expectationWithDescription:@"RPC after closing connection"]; + + RMTEmpty *request = [RMTEmpty message]; + + [_service emptyCallWithRequest:request handler:^(RMTEmpty *response, NSError *error) { + XCTAssertNil(error, @"First RPC finished with unexpected error: %@", error); + + [GRPCCall closeOpenConnections]; + + [_service emptyCallWithRequest:request handler:^(RMTEmpty *response, NSError *error) { + XCTAssertNil(error, @"Second RPC finished with unexpected error: %@", error); + [expectation fulfill]; + }]; + }]; + + [self waitForExpectationsWithTimeout:4 handler:nil]; +} + @end From 47b80bc558b8a0e79db2501a4b98c4e3790b0511 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Sat, 30 Apr 2016 10:32:49 -0700 Subject: [PATCH 0171/1894] Test that GRPCCall transitions states properly --- src/objective-c/tests/InteropTests.m | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/objective-c/tests/InteropTests.m b/src/objective-c/tests/InteropTests.m index 26877b1ae84..4f096b9efab 100644 --- a/src/objective-c/tests/InteropTests.m +++ b/src/objective-c/tests/InteropTests.m @@ -272,8 +272,14 @@ XCTAssertEqual(error.code, GRPC_STATUS_CANCELLED); [expectation fulfill]; }]; + XCTAssertEqual(call.state, GRXWriterStateNotStarted); + [call start]; + XCTAssertEqual(call.state, GRXWriterStateStarted); + [call cancel]; + XCTAssertEqual(call.state, GRXWriterStateFinished); + [self waitForExpectationsWithTimeout:1 handler:nil]; } From 0803bb0b330e0a08c08697bcb4332eb836d04f63 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Sat, 30 Apr 2016 10:40:18 -0700 Subject: [PATCH 0172/1894] Add state transitions to GRPCCall --- src/objective-c/GRPCClient/GRPCCall.m | 54 ++++++++++++++++----------- 1 file changed, 32 insertions(+), 22 deletions(-) diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m index 1847d6016ff..0eb10656ddc 100644 --- a/src/objective-c/GRPCClient/GRPCCall.m +++ b/src/objective-c/GRPCClient/GRPCCall.m @@ -136,6 +136,10 @@ NSString * const kGRPCTrailersKey = @"io.grpc.TrailersKey"; #pragma mark Finish - (void)finishWithError:(NSError *)errorOrNil { + @synchronized(self) { + _state = GRXWriterStateFinished; + } + // If the call isn't retained anywhere else, it can be deallocated now. _retainSelf = nil; @@ -342,6 +346,10 @@ NSString * const kGRPCTrailersKey = @"io.grpc.TrailersKey"; #pragma mark GRXWriter implementation - (void)startWithWriteable:(id)writeable { + @synchronized(self) { + _state = GRXWriterStateStarted; + } + // Create a retain cycle so that this instance lives until the RPC finishes (or is cancelled). // This makes RPCs in which the call isn't externally retained possible (as long as it is started // before being autoreleased). @@ -375,30 +383,32 @@ NSString * const kGRPCTrailersKey = @"io.grpc.TrailersKey"; } - (void)setState:(GRXWriterState)newState { - // Manual transitions are only allowed from the started or paused states. - if (_state == GRXWriterStateNotStarted || _state == GRXWriterStateFinished) { - return; - } - - switch (newState) { - case GRXWriterStateFinished: - _state = newState; - // Per GRXWriter's contract, setting the state to Finished manually - // means one doesn't wish the writeable to be messaged anymore. - [_responseWriteable cancelSilently]; - _responseWriteable = nil; - return; - case GRXWriterStatePaused: - _state = newState; + @synchronized(self) { + // Manual transitions are only allowed from the started or paused states. + if (_state == GRXWriterStateNotStarted || _state == GRXWriterStateFinished) { return; - case GRXWriterStateStarted: - if (_state == GRXWriterStatePaused) { + } + + switch (newState) { + case GRXWriterStateFinished: _state = newState; - [self startNextRead]; - } - return; - case GRXWriterStateNotStarted: - return; + // Per GRXWriter's contract, setting the state to Finished manually + // means one doesn't wish the writeable to be messaged anymore. + [_responseWriteable cancelSilently]; + _responseWriteable = nil; + return; + case GRXWriterStatePaused: + _state = newState; + return; + case GRXWriterStateStarted: + if (_state == GRXWriterStatePaused) { + _state = newState; + [self startNextRead]; + } + return; + case GRXWriterStateNotStarted: + return; + } } } From e98b494db77f9b10522cf6a8238deb8d7bd55345 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 30 Apr 2016 14:11:33 -0700 Subject: [PATCH 0173/1894] Fix bug where max_frame_size was ignored Also add corpus entries that helped diagnose this bug --- .../ext/transport/chttp2/transport/internal.h | 8 +- .../ext/transport/chttp2/transport/parsing.c | 21 +- .../03a72675e1969f836094f1ecfec2a7b34418e306 | Bin 0 -> 286 bytes .../0416afd6875d9ba55f1e5f86a6456a5445d5e576 | Bin 0 -> 651 bytes .../08c42ef29eff83052c5887855f2fa3e07ebe470c | Bin 0 -> 650 bytes .../1ba889ea1543297824e99e641e6ca8b91f45732e | Bin 0 -> 650 bytes .../3b09bf453c6f93983c24c4d5481e55d66213f93a | Bin 0 -> 650 bytes .../49cb33cbb60f041e8e99dd718993acd2c3354416 | Bin 0 -> 357 bytes .../59743fe120be6ae1aed1c02230ee1bb460f621ee | Bin 0 -> 628 bytes .../a5ccb8f124d8ddb5350b90bc0d6b96db280cb7c9 | Bin 0 -> 651 bytes .../a7fac1265a384fe9e45a9ee3d708b79c4e80505e | Bin 0 -> 286 bytes .../aaf049720c707d4e14e47e7eb31d6a2dda60e66a | Bin 0 -> 651 bytes .../c4e4c7572e005e18d56eac407033da058737a5ab | Bin 0 -> 651 bytes ...h-dae0f07934a527989f23f06e630710ff6ca8c809 | Bin 0 -> 104 bytes .../e96ad9c17795e52edc810a08d4fc61fe8790002a | Bin 0 -> 651 bytes .../fa202a5f51cd49f8ea5af60c5f403f797c01c504 | Bin 0 -> 651 bytes tools/run_tests/tests.json | 224 ++++++++++++++++++ 17 files changed, 246 insertions(+), 7 deletions(-) create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/03a72675e1969f836094f1ecfec2a7b34418e306 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/0416afd6875d9ba55f1e5f86a6456a5445d5e576 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/08c42ef29eff83052c5887855f2fa3e07ebe470c create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/1ba889ea1543297824e99e641e6ca8b91f45732e create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/3b09bf453c6f93983c24c4d5481e55d66213f93a create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/49cb33cbb60f041e8e99dd718993acd2c3354416 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/59743fe120be6ae1aed1c02230ee1bb460f621ee create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/a5ccb8f124d8ddb5350b90bc0d6b96db280cb7c9 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/a7fac1265a384fe9e45a9ee3d708b79c4e80505e create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/aaf049720c707d4e14e47e7eb31d6a2dda60e66a create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/c4e4c7572e005e18d56eac407033da058737a5ab create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/crash-dae0f07934a527989f23f06e630710ff6ca8c809 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/e96ad9c17795e52edc810a08d4fc61fe8790002a create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/fa202a5f51cd49f8ea5af60c5f403f797c01c504 diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 7a8084641d7..04c75619df6 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -236,9 +236,6 @@ struct grpc_chttp2_transport_parsing { /** was a goaway frame received? */ uint8_t goaway_received; - /** the last sent max_table_size setting */ - uint32_t last_sent_max_table_size; - /** initial window change */ int64_t initial_window_update; @@ -272,6 +269,9 @@ struct grpc_chttp2_transport_parsing { uint32_t incoming_frame_size; uint32_t incoming_stream_id; + /* current max frame size */ + uint32_t max_frame_size; + /* active parser */ void *parser_data; grpc_chttp2_stream_parsing *incoming_stream; @@ -282,6 +282,8 @@ struct grpc_chttp2_transport_parsing { /* received settings */ uint32_t settings[GRPC_CHTTP2_NUM_SETTINGS]; + /* last settings that were sent */ + uint32_t last_sent_settings[GRPC_CHTTP2_NUM_SETTINGS]; /* goaway data */ grpc_status_code goaway_error; diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index e827a43f7a4..2995066e519 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -79,9 +79,12 @@ void grpc_chttp2_prepare_to_read( GPR_TIMER_BEGIN("grpc_chttp2_prepare_to_read", 0); transport_parsing->next_stream_id = transport_global->next_stream_id; - transport_parsing->last_sent_max_table_size = - transport_global->settings[GRPC_SENT_SETTINGS] - [GRPC_CHTTP2_SETTINGS_HEADER_TABLE_SIZE]; + memcpy(transport_parsing->last_sent_settings, + transport_global->settings[GRPC_SENT_SETTINGS], + sizeof(transport_parsing->last_sent_settings)); + transport_parsing->max_frame_size = + transport_global->settings[GRPC_ACKED_SETTINGS] + [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; /* update the parsing view of incoming window */ while (grpc_chttp2_list_pop_unannounced_incoming_window_available( @@ -388,6 +391,12 @@ int grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, return 1; } goto dts_fh_0; /* loop */ + } else if (transport_parsing->incoming_frame_size > + transport_parsing->max_frame_size) { + gpr_log(GPR_DEBUG, "Frame size %d is larger than max frame size %d", + transport_parsing->incoming_frame_size, + transport_parsing->max_frame_size); + return 0; } if (++cur == end) { return 1; @@ -840,7 +849,11 @@ static int init_settings_frame_parser( transport_parsing->settings_ack_received = 1; grpc_chttp2_hptbl_set_max_bytes( &transport_parsing->hpack_parser.table, - transport_parsing->last_sent_max_table_size); + transport_parsing + ->last_sent_settings[GRPC_CHTTP2_SETTINGS_HEADER_TABLE_SIZE]); + transport_parsing->max_frame_size = + transport_parsing + ->last_sent_settings[GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; } transport_parsing->parser = grpc_chttp2_settings_parser_parse; transport_parsing->parser_data = &transport_parsing->simple.settings; diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/03a72675e1969f836094f1ecfec2a7b34418e306 b/test/core/end2end/fuzzers/server_fuzzer_corpus/03a72675e1969f836094f1ecfec2a7b34418e306 new file mode 100644 index 0000000000000000000000000000000000000000..503af15fe81ccba6a1300796531f278f34d9be84 GIT binary patch literal 286 zcmY+9%}&EG49DA1#HcnY7p|z{#K*FBNL=;=?0~3fUm$b5#!{L@t&14X%>$5f!?LZP zzx0>uk3;cTytZv!K5wgazRsJsIVVYy#hC3UohcQU`=Hn?%aixzQ4Qj1KZ3y?Gs7HW z)gv3Pv--VhMP~fS*VcowGl>;=$LLt{IpD1d!4fDY@5*inVEBnf8U0gP(rHu+AQb=x zmgvB1a@`H-cu#!ZXgpcPxaqzrhy~-42SpZ#QRLHzgH&ByygMo_!BWIxmXJ_Z+g*Hd bTNU?~-1PMzR(}Jg9{t1@yQ=x$S-dpAwYOHl literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/0416afd6875d9ba55f1e5f86a6456a5445d5e576 b/test/core/end2end/fuzzers/server_fuzzer_corpus/0416afd6875d9ba55f1e5f86a6456a5445d5e576 new file mode 100644 index 0000000000000000000000000000000000000000..30229f98fd3e7479f61635c604dbb259dddfd23f GIT binary patch literal 651 zcmcIiO;3a{5G@2Fq9i@&op@5Se7Hw0UiDxkE`Oj~y3nNCHtmqO{%(&ZS`cnz_2ML* zbf#}6Gw-!}eM;_<$GWcabymbt9BrNlj}Qvnapog$xOw=b)C9UP-zk-EiNU9(r5)R| zpaak@+B4`>6I3so8b>ARU1T^M&V-^wbjkw0ph^OhkitPTOtco965vYatPKosbWJ<*&a^^0a eIa?_BlZ?S2+mC=#|G^x9XE}~u> z$dEV8o6NjP{rr$#rT0x!7dLsC#7Vq(^d2D;y5nqy0)GqeL8S@wQL$30SQ3K|D@%K} zW?>JY9a=N!RU6h%iw4IP85}YkHb+8HB6?*3pHL-%NyuQM875i_P6==&i_U0@Prc6w zrA$M{Bvmb!-C4_4f&iQI)-heZdH2dSo&k%%5H6UpI36rB8R=X?{p&pFEpVd+XgAOK zlC&8W+>z6<0a}##wG$&R(+k1n@N$W6-@OuncT=mT@So7}*p~$YgAM3Uk0fK}PP=HQ i**BCwtugd#`&!_B3A`Ve;E%0Mf)j8zqV2apN}^Aa{(0R1 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/1ba889ea1543297824e99e641e6ca8b91f45732e b/test/core/end2end/fuzzers/server_fuzzer_corpus/1ba889ea1543297824e99e641e6ca8b91f45732e new file mode 100644 index 0000000000000000000000000000000000000000..6ed060d1e33cc75aa2a1c2e40990d19970c94819 GIT binary patch literal 650 zcmcgqJx{|h5VflyLLia{*dr!D%|{utu)=_dX#RlfxQQj#w(N^U`Q402;DlzY0uv|s z$!Fg?-@SA7`jp%yk9A$;_gN7~akPFO5Fr%!~CU|IoJkiy<@LXDAvQ4m_?tu>5X4wzEL zxPg=_rW>K!tA=kS1-=xGXZn20_FWjV03L#+LUQX!)H`ld+WLU%*M86k_N`$w^>e+U zP0FP3)`FIy!#J5#dW>;w*g;6-WcNrn%+ht>dJh$`kUSSCEAX{ji%}I;*i;i-( zWIhKl7A+ZYUHj$3tioYIRu;7a`U9yck-X^uA5pDV!&R)#E{jW_fyP%}De3ObWGnI!D)U&I!+@aTH@{(fdbyI`~K7aJW|o1Xi6#e-auy m5o|nr>A#@-=^1^lJJ>wnt_0pKjPUO++zkCZ8@>h73atUHl!AHy literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/49cb33cbb60f041e8e99dd718993acd2c3354416 b/test/core/end2end/fuzzers/server_fuzzer_corpus/49cb33cbb60f041e8e99dd718993acd2c3354416 new file mode 100644 index 0000000000000000000000000000000000000000..7f975251ddc4dcbabc73068dc55220f700ed5502 GIT binary patch literal 357 zcmZ`#O;5ux3~fh&QEgI?xNt#LPYl+tNeF2-Zg4%HgUT2mwxd&MaOYG>yv%C6LQJvR#R-|$zG|1cI13(SOYD1 z4WhPL3)ra2%ioIcaU4tHHOkhNRkp)u{L1Kgl4L4M4!5KxaWKwsU-DAT|WZysq zugKNJMU-8JA*-b6O|;|k%s@B5(|=+IPHod+UBO;ZgmwMNHJKsIv7=l-XNce12@$QW zif~7(hzV|C@cS1_9^=fOAWnl@!DaukB8%F!iz9DA^>~t{ZDFZN*O8jp>ZWj<>*Im` O6#XE3Fu>GGR^|s4h-V@I literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/59743fe120be6ae1aed1c02230ee1bb460f621ee b/test/core/end2end/fuzzers/server_fuzzer_corpus/59743fe120be6ae1aed1c02230ee1bb460f621ee new file mode 100644 index 0000000000000000000000000000000000000000..3038fde54719db4a3f0ce804f452a626f38a0ca2 GIT binary patch literal 628 zcmd5)O-sZu5KWhgwOGhO@5PhK_Ct@oc-4bg-2Q>tbhZs-laNlq^>=&pU|QXSu%O_@ zKpvSPGrW0k>gR{_I=ye2y132DBu?Vhef6XDNai{}m)N<-J(ZUZevYf8|>^`Sj`7ffj#BeJubp GntcG*sBCWl literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/a5ccb8f124d8ddb5350b90bc0d6b96db280cb7c9 b/test/core/end2end/fuzzers/server_fuzzer_corpus/a5ccb8f124d8ddb5350b90bc0d6b96db280cb7c9 new file mode 100644 index 0000000000000000000000000000000000000000..9d39854fc970a412a7822e0bae9030fa900e56e2 GIT binary patch literal 651 zcmcgqJx{|h5VflyLLia{*dr!D%?BN`u)=_dX#RlfxQQj#w(N^U`Q402;DlzY0uv|s z$!Fg?-@SA7`jp%yk9A$;tE`BlI9fjsh!6_=^0q*D*kN)~8VX&QZ?(=h)RNQEv5xO} z&;c0l?KpJ0396TMO`?+a-m?PsXHqjNJMDm6Fs*K(T!ZGAxXYd`1%`_?d;`nlfF zCS_81axxac@*=zUVq`^fBZcbUZqdW%C7=o^D)c_IJ+ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/a7fac1265a384fe9e45a9ee3d708b79c4e80505e b/test/core/end2end/fuzzers/server_fuzzer_corpus/a7fac1265a384fe9e45a9ee3d708b79c4e80505e new file mode 100644 index 0000000000000000000000000000000000000000..338f61bdce7de24e9f547fea219d7e330cf4cd55 GIT binary patch literal 286 zcmY+9%}&EG49C||#HcnY7p|z{1ZZhHBrf9x*a1<|zCh-9jioe+S{E^%n+G7}hGknn zf9WsRABX%ge{I{kd@8CT8~ zs~*{So!0M7D^lY}zP28eok^_0J4VNn&jD{$2$n!Gc~^ErfEPA2%IKfUl1`#p0I2{l zutW!5lk09s$9v-QR^!Pk#%=daK`a?pJSeg_j3S#x9Hi>v;@wec36>(}vxJ1QDt7V3 cqRQ_rx#{actp5f~J^G0+c2)DgvwUuT0lv*v&;S4c literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/aaf049720c707d4e14e47e7eb31d6a2dda60e66a b/test/core/end2end/fuzzers/server_fuzzer_corpus/aaf049720c707d4e14e47e7eb31d6a2dda60e66a new file mode 100644 index 0000000000000000000000000000000000000000..dab9c75822fa7c75554351917d686c8e18ddad75 GIT binary patch literal 651 zcmcgqJx{|h5VflyLLia{*dr!D%?FHGSYfD$X#RlfxQQj#w(N^U`Q402;DlzY0uv|s z$!Fg?-@SA7`kdS)Pjy}84_OgMakO3yh!6_=^0q*D*kN)~8VX&QZ?(=h)RNQEv5xO} z&;c0l?KpJ0396TMO`?+a-m?PsXHqjNJMDm6Fs*K(T!ZGAxXYd`1%`_?d;`nlfF zCS_81axxac@*=zUVq`^fBZcbUZqeiCCMua0FR`YJNi1Rc7~T9)(f3dUhTmKwGqB(5l)mUse?k3({L;IPA`ZqC~W+1AIZ11STPYoo1M5EjT5>mCPEWDZX?* zA(S!=36oUSTsBuV+Xw<|!E2jo>n)mhuJH_50ETeEOozk1V9`#UcDBbUyUe0fD}Im`^v g!N}Q>lt0PnJK25&JW^un=xc9NG45{vFOZVx8}uT1hyVZp literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/crash-dae0f07934a527989f23f06e630710ff6ca8c809 b/test/core/end2end/fuzzers/server_fuzzer_corpus/crash-dae0f07934a527989f23f06e630710ff6ca8c809 new file mode 100644 index 0000000000000000000000000000000000000000..b6dfd77e676bc7c6dc4500e2b4533846853e1dcc GIT binary patch literal 104 zcmWFt@>I}L@CXSB&^OXE;N{}w3ibt&3=9k%Dpo*}fkA?uk%i&80^|Px6tyDhMFq*a iiOI>S1&l_idCB=HnR)3PK&1?fAYF|A8{mMUfdK$pcNnJt literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/e96ad9c17795e52edc810a08d4fc61fe8790002a b/test/core/end2end/fuzzers/server_fuzzer_corpus/e96ad9c17795e52edc810a08d4fc61fe8790002a new file mode 100644 index 0000000000000000000000000000000000000000..df9241dd0c6f33819a08674d0a1514907cf16c66 GIT binary patch literal 651 zcmcIiJx{|h5VflyLLia{*dwNbnhzMWu)=_dX#RlfxQQj#w&IIK`Q402V25_7R0S4J z^2yJ>JKw$M>h&qPO&;sI%I~uxj^b$f>^(v#aLd^YVZX!Vq%;(|Fkfq(uV_zBOUpXG z;Xwyr9NKW`bQ4rB%bG+b9USTfY|o@-RCd||xnNoWSCGQia6*ldf>97!CyK`h@MKYH{4R1H-;nOpLy*sq>5dIT7AN#UEVX$~U^+-HM?zs#1 foE=H|lZ=6v?MJ{PC8mzPb~Y8`?{@zJX@$N4#wK}E literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/fa202a5f51cd49f8ea5af60c5f403f797c01c504 b/test/core/end2end/fuzzers/server_fuzzer_corpus/fa202a5f51cd49f8ea5af60c5f403f797c01c504 new file mode 100644 index 0000000000000000000000000000000000000000..0ba5935164ce79aad888bbb5bb41a191d02e561e GIT binary patch literal 651 zcmcgqO-sZu5KWefwOYtQ@5PhK_Cvu-FJAQ^7Po&On`YZUHVMfTTz|JmLDRauE!C3) zd1R7#lbJWEUZ0YivBM$cldtp{dkO=v Date: Sun, 1 May 2016 11:39:17 +0800 Subject: [PATCH 0174/1894] Add to call zend_object_std_dtor --- src/php/ext/grpc/call.c | 1 + src/php/ext/grpc/call_credentials.c | 1 + src/php/ext/grpc/channel.c | 1 + src/php/ext/grpc/channel_credentials.c | 1 + src/php/ext/grpc/server.c | 1 + src/php/ext/grpc/server_credentials.c | 1 + src/php/ext/grpc/timeval.c | 6 +++++- 7 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/php/ext/grpc/call.c b/src/php/ext/grpc/call.c index a2c1c08169f..b19e8f017f9 100644 --- a/src/php/ext/grpc/call.c +++ b/src/php/ext/grpc/call.c @@ -65,6 +65,7 @@ void free_wrapped_grpc_call(void *object TSRMLS_DC) { if (call->owned && call->wrapped != NULL) { grpc_call_destroy(call->wrapped); } + zend_object_std_dtor(&call->std TSRMLS_CC); efree(call); } diff --git a/src/php/ext/grpc/call_credentials.c b/src/php/ext/grpc/call_credentials.c index 285c4e7c856..ce9cbdf2269 100644 --- a/src/php/ext/grpc/call_credentials.c +++ b/src/php/ext/grpc/call_credentials.c @@ -60,6 +60,7 @@ void free_wrapped_grpc_call_credentials(void *object TSRMLS_DC) { if (creds->wrapped != NULL) { grpc_call_credentials_release(creds->wrapped); } + zend_object_std_dtor(&creds->std TSRMLS_CC); efree(creds); } diff --git a/src/php/ext/grpc/channel.c b/src/php/ext/grpc/channel.c index eba2c81424d..665430b99cd 100644 --- a/src/php/ext/grpc/channel.c +++ b/src/php/ext/grpc/channel.c @@ -64,6 +64,7 @@ void free_wrapped_grpc_channel(void *object TSRMLS_DC) { if (channel->wrapped != NULL) { grpc_channel_destroy(channel->wrapped); } + zend_object_std_dtor(&channel->std TSRMLS_CC); efree(channel); } diff --git a/src/php/ext/grpc/channel_credentials.c b/src/php/ext/grpc/channel_credentials.c index ae9a9897fcd..d5a6531b54e 100644 --- a/src/php/ext/grpc/channel_credentials.c +++ b/src/php/ext/grpc/channel_credentials.c @@ -59,6 +59,7 @@ void free_wrapped_grpc_channel_credentials(void *object TSRMLS_DC) { if (creds->wrapped != NULL) { grpc_channel_credentials_release(creds->wrapped); } + zend_object_std_dtor(&creds->std TSRMLS_CC); efree(creds); } diff --git a/src/php/ext/grpc/server.c b/src/php/ext/grpc/server.c index ca129e76ca1..0d12bbe5c29 100644 --- a/src/php/ext/grpc/server.c +++ b/src/php/ext/grpc/server.c @@ -69,6 +69,7 @@ void free_wrapped_grpc_server(void *object TSRMLS_DC) { gpr_inf_future(GPR_CLOCK_REALTIME), NULL); grpc_server_destroy(server->wrapped); } + zend_object_std_dtor(&server->std TSRMLS_CC); efree(server); } diff --git a/src/php/ext/grpc/server_credentials.c b/src/php/ext/grpc/server_credentials.c index f3951b31fee..25a2ca577d1 100644 --- a/src/php/ext/grpc/server_credentials.c +++ b/src/php/ext/grpc/server_credentials.c @@ -58,6 +58,7 @@ void free_wrapped_grpc_server_credentials(void *object TSRMLS_DC) { if (creds->wrapped != NULL) { grpc_server_credentials_release(creds->wrapped); } + zend_object_std_dtor(&creds->std TSRMLS_CC); efree(creds); } diff --git a/src/php/ext/grpc/timeval.c b/src/php/ext/grpc/timeval.c index 4fd069e19a1..102361d404e 100644 --- a/src/php/ext/grpc/timeval.c +++ b/src/php/ext/grpc/timeval.c @@ -53,7 +53,11 @@ zend_class_entry *grpc_ce_timeval; /* Frees and destroys an instance of wrapped_grpc_call */ -void free_wrapped_grpc_timeval(void *object TSRMLS_DC) { efree(object); } +void free_wrapped_grpc_timeval(void *object TSRMLS_DC) { + wrapped_grpc_timeval *timeval = (wrapped_grpc_timeval *)object; + zend_object_std_dtor(&timeval->std TSRMLS_CC); + efree(object); +} /* Initializes an instance of wrapped_grpc_timeval to be associated with an * object of a class specified by class_type */ From a49b13bc332a38dfcf83162003cbaa0a1384143b Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Tue, 19 Apr 2016 10:31:25 -0700 Subject: [PATCH 0175/1894] cronet wrapper code --- include/grpc/grpc_security.h | 5 + .../client/secure/cronet_channel_create.c | 72 +++ .../cronet/transport/cronet_c_for_grpc.h | 202 ++++++ .../cronet/transport/cronet_transport.c | 586 ++++++++++++++++++ 4 files changed, 865 insertions(+) create mode 100644 src/core/ext/transport/cronet/client/secure/cronet_channel_create.c create mode 100644 src/core/ext/transport/cronet/transport/cronet_c_for_grpc.h create mode 100644 src/core/ext/transport/cronet/transport/cronet_transport.c diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h index 79199cc5d68..d753aaf96c1 100644 --- a/include/grpc/grpc_security.h +++ b/include/grpc/grpc_security.h @@ -299,6 +299,11 @@ GRPCAPI grpc_channel *grpc_secure_channel_create( grpc_channel_credentials *creds, const char *target, const grpc_channel_args *args, void *reserved); +GRPCAPI grpc_channel *grpc_custom_secure_channel_create( + void *engine, const char *target, + const grpc_channel_args *args, void *reserved); + + /* --- grpc_server_credentials object. --- A server credentials object represents a way to authenticate a server. */ diff --git a/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c b/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c new file mode 100644 index 00000000000..23189809f72 --- /dev/null +++ b/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c @@ -0,0 +1,72 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include + +#include +#include + +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/transport/transport_impl.h" + +#ifdef COMPILE_WITH_CRONET +// Cronet transport object +struct grpc_cronet_transport { + grpc_transport base; /* must be first element in this structure */ + void *engine; + char *host; +}; + +typedef struct grpc_cronet_transport grpc_cronet_transport; + +extern grpc_transport_vtable cronet_vtable; + +GRPCAPI grpc_channel *grpc_custom_secure_channel_create( + void *engine, const char *target, + const grpc_channel_args *args, void *reserved) { + grpc_cronet_transport *ct = gpr_malloc(sizeof(grpc_cronet_transport)); + ct->base.vtable = &cronet_vtable; + ct->engine = engine; + ct->host = gpr_malloc(strlen(target) + 1); + strcpy(ct->host, target); + gpr_log( + GPR_DEBUG, "grpc_create_cronet_transport: cronet_engine = %p, target=%s", + engine, ct->host); + + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + return grpc_channel_create(&exec_ctx, target, args, + GRPC_CLIENT_DIRECT_CHANNEL, (grpc_transport *)ct); +} +#endif // COMPILE_WITH_CRONET diff --git a/src/core/ext/transport/cronet/transport/cronet_c_for_grpc.h b/src/core/ext/transport/cronet/transport/cronet_c_for_grpc.h new file mode 100644 index 00000000000..15a511aebd0 --- /dev/null +++ b/src/core/ext/transport/cronet/transport/cronet_c_for_grpc.h @@ -0,0 +1,202 @@ +// Copyright 2016 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef COMPONENTS_CRONET_IOS_CRONET_C_FOR_GRPC_H_ +#define COMPONENTS_CRONET_IOS_CRONET_C_FOR_GRPC_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include + +/* Cronet Engine API. */ + +/* Opaque object representing Cronet Engine. Created and configured outside + * of this API to facilitate sharing with other components */ +typedef struct cronet_engine { void* obj; } cronet_engine; + +void cronet_engine_add_quic_hint(cronet_engine* engine, + const char* host, + int port, + int alternate_port); + +/* Cronet Bidirectional Stream API */ + +/* Opaque object representing Cronet Bidirectional Stream. */ +typedef struct cronet_bidirectional_stream { + void* obj; + void* annotation; +} cronet_bidirectional_stream; + +/* A single request or response header element. */ +typedef struct cronet_bidirectional_stream_header { + const char* key; + const char* value; +} cronet_bidirectional_stream_header; + +/* Array of request or response headers or trailers. */ +typedef struct cronet_bidirectional_stream_header_array { + size_t count; + size_t capacity; + cronet_bidirectional_stream_header* headers; +} cronet_bidirectional_stream_header_array; + +/* Set of callbacks used to receive callbacks from bidirectional stream. */ +typedef struct cronet_bidirectional_stream_callback { + /* Invoked when request headers are sent. Indicates that stream has initiated + * the request. Consumer may call cronet_bidirectional_stream_write() to start + * writing data. + */ + void (*on_request_headers_sent)(cronet_bidirectional_stream* stream); + + /* Invoked when initial response headers are received. + * Consumer must call cronet_bidirectional_stream_read() to start reading. + * Consumer may call cronet_bidirectional_stream_write() to start writing or + * close the stream. Contents of |headers| is valid for duration of the call. + */ + void (*on_response_headers_received)( + cronet_bidirectional_stream* stream, + const cronet_bidirectional_stream_header_array* headers, + const char* negotiated_protocol); + + /* Invoked when data is read into the buffer passed to + * cronet_bidirectional_stream_read(). Only part of the buffer may be + * populated. To continue reading, call cronet_bidirectional_stream_read(). + * It may be invoked after on_response_trailers_received()}, if there was + * pending read data before trailers were received. + * + * If count is 0, it means the remote side has signaled that it will send no + * more data; future calls to cronet_bidirectional_stream_read() will result + * in the on_data_read() callback or on_succeded() callback if + * cronet_bidirectional_stream_write() was invoked with end_of_stream set to + * true. + */ + void (*on_read_completed)(cronet_bidirectional_stream* stream, + char* data, + int count); + + /** + * Invoked when all data passed to cronet_bidirectional_stream_write() is + * sent. + * To continue writing, call cronet_bidirectional_stream_write(). + */ + void (*on_write_completed)(cronet_bidirectional_stream* stream, + const char* data); + + /* Invoked when trailers are received before closing the stream. Only invoked + * when server sends trailers, which it may not. May be invoked while there is + * read data remaining in local buffer. Contents of |trailers| is valid for + * duration of the call. + */ + void (*on_response_trailers_received)( + cronet_bidirectional_stream* stream, + const cronet_bidirectional_stream_header_array* trailers); + + /** + * Invoked when there is no data to be read or written and the stream is + * closed successfully remotely and locally. Once invoked, no further callback + * methods will be invoked. + */ + void (*on_succeded)(cronet_bidirectional_stream* stream); + + /** + * Invoked if the stream failed for any reason after + * cronet_bidirectional_stream_start(). HTTP/2 error codes are + * mapped to chrome net error codes. Once invoked, no further callback methods + * will be invoked. + */ + void (*on_failed)(cronet_bidirectional_stream* stream, int net_error); + + /** + * Invoked if the stream was canceled via + * cronet_bidirectional_stream_cancel(). Once invoked, no further callback + * methods will be invoked. + */ + void (*on_canceled)(cronet_bidirectional_stream* stream); +} cronet_bidirectional_stream_callback; + +/* Create a new stream object that uses |engine| and |callback|. All stream + * tasks are performed asynchronously on the |engine| network thread. |callback| + * methods are invoked synchronously on the |engine| network thread, but must + * not run tasks on the current thread to prevent blocking networking operations + * and causing exceptions during shutdown. The |annotation| is stored in + * bidirectional stream for arbitrary use by application. + * + * Returned |cronet_bidirectional_stream*| is owned by the caller, and must be + * destroyed using |cronet_bidirectional_stream_destroy|. + * + * Both |calback| and |engine| must remain valid until stream is destroyed. + */ +cronet_bidirectional_stream* cronet_bidirectional_stream_create( + cronet_engine* engine, + void* annotation, + cronet_bidirectional_stream_callback* callback); + +/* TBD: The following methods return int. Should it be a custom type? */ + +/* Destroy stream object. Destroy could be called from any thread, including + * network thread, but is posted, so |stream| is valid until calling task is + * complete. + */ +int cronet_bidirectional_stream_destroy(cronet_bidirectional_stream* stream); + +/* Start the stream by sending request to |url| using |method| and |headers|. If + * |end_of_stream| is true, then no data is expected to be written. + */ +int cronet_bidirectional_stream_start( + cronet_bidirectional_stream* stream, + const char* url, + int priority, + const char* method, + const cronet_bidirectional_stream_header_array* headers, + bool end_of_stream); + +/* Read response data into |buffer| of |capacity| length. Must only be called at + * most once in response to each invocation of the + * on_response_headers_received() and on_read_completed() methods of the + * cronet_bidirectional_stream_callback. + * Each call will result in an invocation of one of the callback's + * on_read_completed method if data is read, its on_succeeded() method if + * the stream is closed, or its on_failed() method if there's an error. + */ +int cronet_bidirectional_stream_read(cronet_bidirectional_stream* stream, + char* buffer, + int capacity); + +/* Read response data into |buffer| of |capacity| length. Must only be called at + * most once in response to each invocation of the + * on_response_headers_received() and on_read_completed() methods of the + * cronet_bidirectional_stream_callback. + * Each call will result in an invocation of one of the callback's + * on_read_completed method if data is read, its on_succeeded() method if + * the stream is closed, or its on_failed() method if there's an error. + */ +int cronet_bidirectional_stream_write(cronet_bidirectional_stream* stream, + const char* buffer, + int count, + bool end_of_stream); + +/* Cancels the stream. Can be called at any time after + * cronet_bidirectional_stream_start(). The on_canceled() method of + * cronet_bidirectional_stream_callback will be invoked when cancelation + * is complete and no further callback methods will be invoked. If the + * stream has completed or has not started, calling + * cronet_bidirectional_stream_cancel() has no effect and on_canceled() will not + * be invoked. At most one callback method may be invoked after + * cronet_bidirectional_stream_cancel() has completed. + */ +int cronet_bidirectional_stream_cancel(cronet_bidirectional_stream* stream); + +/* Returns true if the |stream| was successfully started and is now done + * (succeeded, canceled, or failed). + * Returns false if the |stream| stream is not yet started or is in progress. + */ +bool cronet_bidirectional_stream_is_done(cronet_bidirectional_stream* stream); + +#ifdef __cplusplus +} +#endif + +#endif // COMPONENTS_CRONET_IOS_CRONET_C_FOR_GRPC_H_ diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c new file mode 100644 index 00000000000..3b9b1b08d81 --- /dev/null +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -0,0 +1,586 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#include +#include +#include +#include +#include +#include +#include + +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/ext/transport/chttp2/transport/incoming_metadata.h" +#include "src/core/lib/transport/metadata_batch.h" +#include "src/core/lib/transport/transport_impl.h" +#include "src/core/ext/transport/cronet/transport/cronet_c_for_grpc.h" + +#ifdef COMPILE_WITH_CRONET + +#define GRPC_HEADER_SIZE_IN_BYTES 5 +#define MAX_HDRS 100 + +#define GRPC_CRONET_TRACE(...) \ + { \ + if (grpc_cronet_trace) gpr_log(__VA_ARGS__); \ + } +#define CRONET_READ(...) \ + { \ + GRPC_CRONET_TRACE(GPR_DEBUG, "R: cronet_bidirectional_stream_read()"); \ + cronet_bidirectional_stream_read(__VA_ARGS__); \ + } +#define SET_RECV_STATE(STATE) \ + { \ + GRPC_CRONET_TRACE(GPR_DEBUG, "next_state = %s", recv_state_name[STATE]); \ + cronet_recv_state = STATE; \ + } + +// Global flag that gets set with GRPC_TRACE env variable +int grpc_cronet_trace = 1; + +// Cronet transport object +struct grpc_cronet_transport { + grpc_transport base; /* must be first element in this structure */ + cronet_engine *engine; + const char *host; +}; + +typedef struct grpc_cronet_transport grpc_cronet_transport; + +enum send_state { + CRONET_SEND_IDLE = 0, + CRONET_REQ_STARTED, + CRONET_SEND_HEADER, + CRONET_WRITE, + CRONET_WRITE_COMPLETED, +}; + +enum recv_state { + CRONET_RECV_IDLE = 0, + CRONET_RECV_READ_LENGTH, + CRONET_RECV_READ_DATA, + CRONET_RECV_CLOSED, +}; + +const char *recv_state_name[] = {"CRONET_RECV_IDLE", "CRONET_RECV_READ_LENGTH", + "CRONET_RECV_READ_DATA,", + "CRONET_RECV_CLOSED"}; + +// Enum that identifies calling function. +enum e_caller { + PERFORM_STREAM_OP, + ON_READ_COMPLETE, + ON_RESPONSE_HEADERS_RECEIVED, + ON_RESPONSE_TRAILERS_RECEIVED +}; + +enum callback_id { + CB_SEND_INITIAL_METADATA = 0, + CB_SEND_MESSAGE, + CB_SEND_TRAILING_METADATA, + CB_RECV_MESSAGE, + CB_RECV_INITIAL_METADATA, + CB_RECV_TRAILING_METADATA, + CB_NUM_CALLBACKS +}; + +struct stream_obj { + // we store received bytes here as they trickle in. + gpr_slice_buffer write_slicebuffer; + cronet_bidirectional_stream *cbs; + gpr_slice slice; + gpr_slice_buffer read_slicebuffer; + struct grpc_slice_buffer_stream sbs; + char *read_buffer; + uint32_t remaining_read_bytes; + uint32_t total_read_bytes; + + char *write_buffer; + size_t write_buffer_size; + + // + char *url; + char *host; + + bool response_headers_received; + bool read_requested; + bool response_trailers_received; + bool read_closed; + + // Recv message stuff + grpc_byte_buffer **recv_message; + // Initial metadata stuff + grpc_metadata_batch *recv_initial_metadata; + // Trailing metadata stuff + grpc_metadata_batch *recv_trailing_metadata; + grpc_chttp2_incoming_metadata_buffer imb; + + // This mutex protects receive state machine execution + gpr_mu recv_mu; + // we can queue up up to 2 callbacks for each OP + grpc_closure *callback_list[CB_NUM_CALLBACKS][2]; + + // storage for header + cronet_bidirectional_stream_header headers[MAX_HDRS]; + uint32_t num_headers; + cronet_bidirectional_stream_header_array header_array; +}; + +typedef struct stream_obj stream_obj; + +void next_send_step(stream_obj *s); +void next_recv_step(stream_obj *s, enum e_caller caller); + +enum send_state cronet_send_state; +enum recv_state cronet_recv_state; + +static void set_pollset_do_nothing(grpc_exec_ctx *exec_ctx, grpc_transport *gt, + grpc_stream *gs, grpc_pollset *pollset) {} + +void enqueue_callbacks(grpc_closure *callback_list[]) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + if (callback_list[0]) { + // GRPC_CRONET_TRACE(GPR_DEBUG, "enqueuing callback = %p", + // callback_list[0]); + grpc_exec_ctx_enqueue(&exec_ctx, callback_list[0], true, NULL); + callback_list[0] = NULL; + } + if (callback_list[1]) { + // GRPC_CRONET_TRACE(GPR_DEBUG, "enqueuing callback = %p", + // callback_list[1]); + grpc_exec_ctx_enqueue(&exec_ctx, callback_list[1], true, NULL); + callback_list[1] = NULL; + } + grpc_exec_ctx_finish(&exec_ctx); +} + +void on_canceled(cronet_bidirectional_stream *stream) { + GRPC_CRONET_TRACE(GPR_DEBUG, "on_canceled %p", stream); +} +void on_failed(cronet_bidirectional_stream *stream, int net_error) { + GRPC_CRONET_TRACE(GPR_DEBUG, "on_failed %p, error = %d", stream, net_error); +} +void on_succeded(cronet_bidirectional_stream *stream) { + GRPC_CRONET_TRACE(GPR_DEBUG, "on_succeeded %p", stream); +} +void on_response_trailers_received( + cronet_bidirectional_stream *stream, + const cronet_bidirectional_stream_header_array *trailers) { + GRPC_CRONET_TRACE(GPR_DEBUG, "R: on_response_trailers_received"); + stream_obj *s = (stream_obj *)stream->annotation; + + memset(&s->imb, 0, sizeof(s->imb)); + grpc_chttp2_incoming_metadata_buffer_init(&s->imb); + int i = 0; + for (i = 0; i < trailers->count; i++) { + grpc_chttp2_incoming_metadata_buffer_add( + &s->imb, grpc_mdelem_from_metadata_strings( + grpc_mdstr_from_string(trailers->headers[i].key), + grpc_mdstr_from_string(trailers->headers[i].value))); + } + s->response_trailers_received = true; + next_recv_step(s, ON_RESPONSE_TRAILERS_RECEIVED); +} +void on_write_completed(cronet_bidirectional_stream *stream, + const char *data) { + GRPC_CRONET_TRACE(GPR_DEBUG, "W: on_write_completed"); + stream_obj *s = (stream_obj *)stream->annotation; + enqueue_callbacks(s->callback_list[CB_SEND_MESSAGE]); + cronet_send_state = CRONET_WRITE_COMPLETED; + next_send_step(s); +} + +void process_recv_message(stream_obj *s, const uint8_t *recv_data) { + gpr_slice read_data_slice = gpr_slice_malloc(s->total_read_bytes); + uint8_t *dst_p = GPR_SLICE_START_PTR(read_data_slice); + memcpy(dst_p, recv_data, s->total_read_bytes); + gpr_slice_buffer_add(&s->read_slicebuffer, read_data_slice); + grpc_slice_buffer_stream_init(&s->sbs, &s->read_slicebuffer, 0); + *s->recv_message = (grpc_byte_buffer *)&s->sbs; +} + +int parse_grpc_header(const uint8_t *data) { + const uint8_t *p = data + 1; + uint32_t length = 0; + length |= ((uint8_t)*p++) << 24; + length |= ((uint8_t)*p++) << 16; + length |= ((uint8_t)*p++) << 8; + length |= ((uint8_t)*p++); + return length; +} + +void on_read_completed(cronet_bidirectional_stream *stream, char *data, + int count) { + stream_obj *s = (stream_obj *)stream->annotation; + GRPC_CRONET_TRACE(GPR_DEBUG, + "R: on_read_completed count=%d, total=%d, remaining=%d", + count, s->total_read_bytes, s->remaining_read_bytes); + if (count > 0) { + GPR_ASSERT(s->recv_message); + s->remaining_read_bytes -= count; + next_recv_step(s, ON_READ_COMPLETE); + } else { + s->read_closed = true; + next_recv_step(s, ON_READ_COMPLETE); + } +} + +void on_response_headers_received( + cronet_bidirectional_stream *stream, + const cronet_bidirectional_stream_header_array *headers, + const char *negotiated_protocol) { + GRPC_CRONET_TRACE(GPR_DEBUG, "R: on_response_headers_received"); + stream_obj *s = (stream_obj *)stream->annotation; + enqueue_callbacks(s->callback_list[CB_RECV_INITIAL_METADATA]); + s->response_headers_received = true; + next_recv_step(s, ON_RESPONSE_HEADERS_RECEIVED); +} + +void on_request_headers_sent(cronet_bidirectional_stream *stream) { + GRPC_CRONET_TRACE(GPR_DEBUG, "W: on_request_headers_sent"); + stream_obj *s = (stream_obj *)stream->annotation; + enqueue_callbacks(s->callback_list[CB_SEND_INITIAL_METADATA]); + cronet_send_state = CRONET_SEND_HEADER; + next_send_step(s); +} + +// Callback function pointers (invoked by cronet in response to events) +cronet_bidirectional_stream_callback callbacks = {on_request_headers_sent, + on_response_headers_received, + on_read_completed, + on_write_completed, + on_response_trailers_received, + on_succeded, + on_failed, + on_canceled}; + + +void invoke_closing_callback(stream_obj *s) { + grpc_chttp2_incoming_metadata_buffer_publish(&s->imb, + s->recv_trailing_metadata); + if (s->callback_list[CB_RECV_TRAILING_METADATA]) { + enqueue_callbacks(s->callback_list[CB_RECV_TRAILING_METADATA]); + } +} + +// This is invoked from perform_stream_op, and all on_xxxx callbacks. +void next_recv_step(stream_obj *s, enum e_caller caller) { + gpr_mu_lock(&s->recv_mu); + switch (cronet_recv_state) { + case CRONET_RECV_IDLE: + GRPC_CRONET_TRACE(GPR_DEBUG, "cronet_recv_state = CRONET_RECV_IDLE"); + if (caller == PERFORM_STREAM_OP || + caller == ON_RESPONSE_HEADERS_RECEIVED) { + if (s->read_closed && s->response_trailers_received) { + invoke_closing_callback(s); + SET_RECV_STATE(CRONET_RECV_CLOSED); + } else if (s->response_headers_received == true && + s->read_requested == true) { + SET_RECV_STATE(CRONET_RECV_READ_LENGTH); + s->total_read_bytes = s->remaining_read_bytes = + GRPC_HEADER_SIZE_IN_BYTES; + GPR_ASSERT(s->read_buffer); + CRONET_READ(s->cbs, s->read_buffer, s->remaining_read_bytes); + } + } + break; + case CRONET_RECV_READ_LENGTH: + GRPC_CRONET_TRACE(GPR_DEBUG, + "cronet_recv_state = CRONET_RECV_READ_LENGTH"); + if (caller == ON_READ_COMPLETE) { + if (s->read_closed) { + invoke_closing_callback(s); + enqueue_callbacks(s->callback_list[CB_RECV_MESSAGE]); + SET_RECV_STATE(CRONET_RECV_CLOSED); + } else { + GPR_ASSERT(s->remaining_read_bytes == 0); + SET_RECV_STATE(CRONET_RECV_READ_DATA); + s->total_read_bytes = s->remaining_read_bytes = + parse_grpc_header(s->read_buffer); + s->read_buffer = gpr_realloc(s->read_buffer, s->remaining_read_bytes); + GPR_ASSERT(s->read_buffer); + CRONET_READ(s->cbs, (char *)s->read_buffer, s->remaining_read_bytes); + } + } + break; + case CRONET_RECV_READ_DATA: + GRPC_CRONET_TRACE(GPR_DEBUG, "cronet_recv_state = CRONET_RECV_READ_DATA"); + if (caller == ON_READ_COMPLETE) { + if (s->remaining_read_bytes > 0) { + int offset = s->total_read_bytes - s->remaining_read_bytes; + GPR_ASSERT(s->read_buffer); + CRONET_READ(s->cbs, (char *)s->read_buffer + offset, + s->remaining_read_bytes); + } else { + gpr_slice_buffer_init(&s->read_slicebuffer); + uint8_t *p = s->read_buffer; + process_recv_message(s, p); + SET_RECV_STATE(CRONET_RECV_IDLE); + enqueue_callbacks(s->callback_list[CB_RECV_MESSAGE]); + } + } + break; + case CRONET_RECV_CLOSED: + break; + default: + GPR_ASSERT(0); // Should not reach here + break; + } + gpr_mu_unlock(&s->recv_mu); +} + + +// This function takes the data from s->write_slicebuffer and assembles into +// a contiguous byte stream with 5 byte gRPC header prepended. +void create_grpc_frame(stream_obj *s) { + gpr_slice slice = gpr_slice_buffer_take_first(&s->write_slicebuffer); + uint8_t *raw_data = GPR_SLICE_START_PTR(slice); + size_t length = GPR_SLICE_LENGTH(slice); + s->write_buffer_size = length + GRPC_HEADER_SIZE_IN_BYTES; + s->write_buffer = gpr_realloc(s->write_buffer, s->write_buffer_size); + uint8_t *p = s->write_buffer; + // Append 5 byte header + *p++ = 0; + *p++ = (uint8_t)(length >> 24); + *p++ = (uint8_t)(length >> 16); + *p++ = (uint8_t)(length >> 8); + *p++ = (uint8_t)(length); + // append actual data + memcpy(p, raw_data, length); +} + +void do_write(stream_obj *s) { + gpr_slice_buffer *sb = &s->write_slicebuffer; + GPR_ASSERT(sb->count <= 1); + if (sb->count > 0) { + create_grpc_frame(s); + GRPC_CRONET_TRACE(GPR_DEBUG, "W: cronet_bidirectional_stream_write"); + cronet_bidirectional_stream_write(s->cbs, s->write_buffer, + (int)s->write_buffer_size, + false); + } +} + +// +void next_send_step(stream_obj *s) { + switch(cronet_send_state) { + case CRONET_SEND_IDLE: + GPR_ASSERT(s->cbs); // cronet_bidirectional_stream is not initialized yet. + cronet_send_state = CRONET_REQ_STARTED; + GRPC_CRONET_TRACE(GPR_DEBUG, "cronet_bidirectional_stream_start to %s", + s->url); + cronet_bidirectional_stream_start(s->cbs, s->url, 0, "POST", + &s->header_array, false); + break; + case CRONET_SEND_HEADER: + do_write(s); + cronet_send_state = CRONET_WRITE; + break; + case CRONET_WRITE_COMPLETED: + do_write(s); + break; + default: + GPR_ASSERT(0); + break; + } +} + +void create_url(const char *path, const char *host, stream_obj *s) { + const char prefix[] = "https://"; + s->url = gpr_malloc(strlen(prefix) + strlen(host) + strlen(path) + 1); + strcpy(s->url, prefix); + strcat(s->url, host); + strcat(s->url, path); +} + +static void convert_metadata_to_cronet_headers(grpc_linked_mdelem *head, + const char *host, + stream_obj *s) { + grpc_linked_mdelem *curr = head; + while (s->num_headers < MAX_HDRS) { + grpc_mdelem *mdelem = curr->md; + curr = curr->next; + const char *key = grpc_mdstr_as_c_string(mdelem->key); + const char *value = grpc_mdstr_as_c_string(mdelem->value); + if (strcmp(key, ":scheme") == 0 || strcmp(key, ":method") == 0 || + strcmp(key, ":authority") == 0) { + // Cronet populates these fields on its own. + continue; + } + if (strcmp(key, ":path") == 0) { + // Create URL by appending :path value to the hostname + create_url(value, host, s); + GRPC_CRONET_TRACE(GPR_DEBUG, "extracted URL = %s", s->url); + continue; + } + s->headers[s->num_headers].key = key; + s->headers[s->num_headers].value = value; + s->num_headers++; + if (curr == NULL) { + break; + } + } +} + +static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, + grpc_stream *gs, grpc_transport_stream_op *op) { + grpc_cronet_transport *ct = (grpc_cronet_transport *)gt; + GPR_ASSERT(ct->engine); + stream_obj *s = (stream_obj *)gs; + if (op->recv_trailing_metadata) { + GRPC_CRONET_TRACE( + GPR_DEBUG, "perform_stream_op - recv_trailing_metadata: on_complete=%p", + op->on_complete); + s->recv_trailing_metadata = op->recv_trailing_metadata; + GPR_ASSERT(!s->callback_list[CB_RECV_TRAILING_METADATA][0]); + s->callback_list[CB_RECV_TRAILING_METADATA][0] = op->on_complete; + } + if (op->recv_message) { + GRPC_CRONET_TRACE(GPR_DEBUG, + "perform_stream_op - recv_message: on_complete=%p", + op->on_complete); + s->recv_message = op->recv_message; + GPR_ASSERT(!s->callback_list[CB_RECV_MESSAGE][0]); + GPR_ASSERT(!s->callback_list[CB_RECV_MESSAGE][1]); + s->callback_list[CB_RECV_MESSAGE][0] = op->recv_message_ready; + s->callback_list[CB_RECV_MESSAGE][1] = op->on_complete; + s->read_requested = true; + next_recv_step(s, PERFORM_STREAM_OP); + } + if (op->recv_initial_metadata) { + GRPC_CRONET_TRACE(GPR_DEBUG, + "perform_stream_op - recv_initial_metadata:=%p", + op->on_complete); + s->recv_initial_metadata = op->recv_initial_metadata; + GPR_ASSERT(!s->callback_list[CB_RECV_INITIAL_METADATA][0]); + GPR_ASSERT(!s->callback_list[CB_RECV_INITIAL_METADATA][1]); + s->callback_list[CB_RECV_INITIAL_METADATA][0] = + op->recv_initial_metadata_ready; + s->callback_list[CB_RECV_INITIAL_METADATA][1] = op->on_complete; + } + if (op->send_initial_metadata) { + GRPC_CRONET_TRACE( + GPR_DEBUG, "perform_stream_op - send_initial_metadata: on_complete=%p", + op->on_complete); + s->num_headers = 0; + convert_metadata_to_cronet_headers(op->send_initial_metadata->list.head, + ct->host, s); + s->header_array.count = s->num_headers; + s->header_array.capacity = s->num_headers; + s->header_array.headers = s->headers; + GPR_ASSERT(!s->callback_list[CB_SEND_INITIAL_METADATA][0]); + s->callback_list[CB_SEND_INITIAL_METADATA][0] = op->on_complete; + } + if (op->send_message) { + GRPC_CRONET_TRACE(GPR_DEBUG, + "perform_stream_op - send_message: on_complete=%p", + op->on_complete); + grpc_byte_stream_next(exec_ctx, op->send_message, &s->slice, + op->send_message->length, NULL); + gpr_slice_buffer_add(&s->write_slicebuffer, s->slice); + if (s->cbs == NULL) { + GRPC_CRONET_TRACE(GPR_DEBUG, "cronet_bidirectional_stream_create"); + s->cbs = cronet_bidirectional_stream_create(ct->engine, s, &callbacks); + GPR_ASSERT(s->cbs); + s->read_closed = false; + s->response_trailers_received = false; + s->response_headers_received = false; + cronet_send_state = CRONET_SEND_IDLE; + cronet_recv_state = CRONET_RECV_IDLE; + } + GPR_ASSERT(!s->callback_list[CB_SEND_MESSAGE][0]); + s->callback_list[CB_SEND_MESSAGE][0] = op->on_complete; + next_send_step(s); + } + if (op->send_trailing_metadata) { + GRPC_CRONET_TRACE( + GPR_DEBUG, "perform_stream_op - send_trailing_metadata: on_complete=%p", + op->on_complete); + GPR_ASSERT(!s->callback_list[CB_SEND_TRAILING_METADATA][0]); + s->callback_list[CB_SEND_TRAILING_METADATA][0] = op->on_complete; + if (s->cbs) { + // Send an "empty" write to the far end to signal that we're done. + // This will induce the server to send down trailers. + GRPC_CRONET_TRACE(GPR_DEBUG, "W: cronet_bidirectional_stream_write"); + cronet_bidirectional_stream_write(s->cbs, "abc", 0, true); + } else { + // We never created a stream. This was probably an empty request. + invoke_closing_callback(s); + } + } +} + +static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, + grpc_stream *gs, grpc_stream_refcount *refcount, + const void *server_data) { + stream_obj *s = (stream_obj *)gs; + memset(s->callback_list, 0, sizeof(s->callback_list)); + s->cbs = NULL; + gpr_mu_init(&s->recv_mu); + s->read_buffer = gpr_malloc(GRPC_HEADER_SIZE_IN_BYTES); + s->write_buffer = gpr_malloc(GRPC_HEADER_SIZE_IN_BYTES); + gpr_slice_buffer_init(&s->write_slicebuffer); + GRPC_CRONET_TRACE(GPR_DEBUG, "cronet_transport - init_stream"); + return 0; +} + +static void destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, + grpc_stream *gs) { + GRPC_CRONET_TRACE(GPR_DEBUG, "Destroy stream"); + stream_obj *s = (stream_obj *)gs; + s->cbs = NULL; + gpr_free(s->read_buffer); + gpr_free(s->write_buffer); + gpr_mu_destroy(&s->recv_mu); +} + +static void destroy_transport(grpc_exec_ctx *exec_ctx, grpc_transport *gt) { + grpc_cronet_transport *ct = (grpc_cronet_transport *)gt; + gpr_free(ct->host); + GRPC_CRONET_TRACE(GPR_DEBUG, "Destroy transport"); +} + +const grpc_transport_vtable cronet_vtable = {sizeof(stream_obj), + "cronet_http", + init_stream, + set_pollset_do_nothing, + perform_stream_op, + destroy_stream, + destroy_transport, + NULL, + NULL}; +#endif // COMPILE_WITH_CRONET From df665073044eac553b2844450cb68a6eafbc0d01 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Tue, 19 Apr 2016 14:23:56 -0700 Subject: [PATCH 0176/1894] moved cronet_c_for_grpc.h in third_party --- src/core/ext/transport/cronet/transport/cronet_transport.c | 2 +- .../objective_c/Cronet}/cronet_c_for_grpc.h | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename {src/core/ext/transport/cronet/transport => third_party/objective_c/Cronet}/cronet_c_for_grpc.h (100%) diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 3b9b1b08d81..671bee638ef 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -47,7 +47,7 @@ #include "src/core/ext/transport/chttp2/transport/incoming_metadata.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport_impl.h" -#include "src/core/ext/transport/cronet/transport/cronet_c_for_grpc.h" +#include "third_party/objective_c/Cronet/cronet_c_for_grpc.h" #ifdef COMPILE_WITH_CRONET diff --git a/src/core/ext/transport/cronet/transport/cronet_c_for_grpc.h b/third_party/objective_c/Cronet/cronet_c_for_grpc.h similarity index 100% rename from src/core/ext/transport/cronet/transport/cronet_c_for_grpc.h rename to third_party/objective_c/Cronet/cronet_c_for_grpc.h From 77044830ff927c7c55a342030e2e2a9d73d0d723 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Mon, 25 Apr 2016 09:27:49 -0700 Subject: [PATCH 0177/1894] fixed clang formating --- include/grpc/grpc_security.h | 5 ++--- .../client/secure/cronet_channel_create.c | 12 ++++++------ .../cronet/transport/cronet_transport.c | 19 ++++++++----------- 3 files changed, 16 insertions(+), 20 deletions(-) diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h index d753aaf96c1..150ad05a272 100644 --- a/include/grpc/grpc_security.h +++ b/include/grpc/grpc_security.h @@ -300,9 +300,8 @@ GRPCAPI grpc_channel *grpc_secure_channel_create( const grpc_channel_args *args, void *reserved); GRPCAPI grpc_channel *grpc_custom_secure_channel_create( - void *engine, const char *target, - const grpc_channel_args *args, void *reserved); - + void *engine, const char *target, const grpc_channel_args *args, + void *reserved); /* --- grpc_server_credentials object. --- diff --git a/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c b/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c index 23189809f72..914c5670864 100644 --- a/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c +++ b/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c @@ -54,19 +54,19 @@ typedef struct grpc_cronet_transport grpc_cronet_transport; extern grpc_transport_vtable cronet_vtable; GRPCAPI grpc_channel *grpc_custom_secure_channel_create( - void *engine, const char *target, - const grpc_channel_args *args, void *reserved) { + void *engine, const char *target, const grpc_channel_args *args, + void *reserved) { grpc_cronet_transport *ct = gpr_malloc(sizeof(grpc_cronet_transport)); ct->base.vtable = &cronet_vtable; ct->engine = engine; ct->host = gpr_malloc(strlen(target) + 1); strcpy(ct->host, target); - gpr_log( - GPR_DEBUG, "grpc_create_cronet_transport: cronet_engine = %p, target=%s", - engine, ct->host); + gpr_log(GPR_DEBUG, + "grpc_create_cronet_transport: cronet_engine = %p, target=%s", engine, + ct->host); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; return grpc_channel_create(&exec_ctx, target, args, - GRPC_CLIENT_DIRECT_CHANNEL, (grpc_transport *)ct); + GRPC_CLIENT_DIRECT_CHANNEL, (grpc_transport *)ct); } #endif // COMPILE_WITH_CRONET diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 671bee638ef..5c27a4ea00d 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -41,10 +41,10 @@ #include #include +#include "src/core/ext/transport/chttp2/transport/incoming_metadata.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/support/string.h" #include "src/core/lib/surface/channel.h" -#include "src/core/ext/transport/chttp2/transport/incoming_metadata.h" #include "src/core/lib/transport/metadata_batch.h" #include "src/core/lib/transport/transport_impl.h" #include "third_party/objective_c/Cronet/cronet_c_for_grpc.h" @@ -215,8 +215,7 @@ void on_response_trailers_received( s->response_trailers_received = true; next_recv_step(s, ON_RESPONSE_TRAILERS_RECEIVED); } -void on_write_completed(cronet_bidirectional_stream *stream, - const char *data) { +void on_write_completed(cronet_bidirectional_stream *stream, const char *data) { GRPC_CRONET_TRACE(GPR_DEBUG, "W: on_write_completed"); stream_obj *s = (stream_obj *)stream->annotation; enqueue_callbacks(s->callback_list[CB_SEND_MESSAGE]); @@ -288,7 +287,6 @@ cronet_bidirectional_stream_callback callbacks = {on_request_headers_sent, on_failed, on_canceled}; - void invoke_closing_callback(stream_obj *s) { grpc_chttp2_incoming_metadata_buffer_publish(&s->imb, s->recv_trailing_metadata); @@ -363,7 +361,6 @@ void next_recv_step(stream_obj *s, enum e_caller caller) { gpr_mu_unlock(&s->recv_mu); } - // This function takes the data from s->write_slicebuffer and assembles into // a contiguous byte stream with 5 byte gRPC header prepended. void create_grpc_frame(stream_obj *s) { @@ -390,22 +387,22 @@ void do_write(stream_obj *s) { create_grpc_frame(s); GRPC_CRONET_TRACE(GPR_DEBUG, "W: cronet_bidirectional_stream_write"); cronet_bidirectional_stream_write(s->cbs, s->write_buffer, - (int)s->write_buffer_size, - false); + (int)s->write_buffer_size, false); } } -// +// void next_send_step(stream_obj *s) { - switch(cronet_send_state) { + switch (cronet_send_state) { case CRONET_SEND_IDLE: - GPR_ASSERT(s->cbs); // cronet_bidirectional_stream is not initialized yet. + GPR_ASSERT( + s->cbs); // cronet_bidirectional_stream is not initialized yet. cronet_send_state = CRONET_REQ_STARTED; GRPC_CRONET_TRACE(GPR_DEBUG, "cronet_bidirectional_stream_start to %s", s->url); cronet_bidirectional_stream_start(s->cbs, s->url, 0, "POST", &s->header_array, false); - break; + break; case CRONET_SEND_HEADER: do_write(s); cronet_send_state = CRONET_WRITE; From be5186a79dee5ca96254b6d38fa2401522987f63 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Wed, 27 Apr 2016 13:47:10 -0700 Subject: [PATCH 0178/1894] created new grpc_cronet.h. Addressed feedback from jcanizales@ and ctiller@ --- include/grpc/grpc_cronet.h | 51 +++ .../client/secure/cronet_channel_create.c | 22 +- .../cronet/transport/cronet_transport.c | 315 ++++++++++-------- 3 files changed, 245 insertions(+), 143 deletions(-) create mode 100644 include/grpc/grpc_cronet.h diff --git a/include/grpc/grpc_cronet.h b/include/grpc/grpc_cronet.h new file mode 100644 index 00000000000..295e0f55e80 --- /dev/null +++ b/include/grpc/grpc_cronet.h @@ -0,0 +1,51 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_GRPC_CRONET_H +#define GRPC_GRPC_CRONET_H + +#include + +#ifdef __cplusplus +extern "C" { +#endif + +GRPCAPI grpc_channel *grpc_cronet_secure_channel_create( + void *engine, const char *target, const grpc_channel_args *args, + void *reserved); + +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_GRPC_CRONET_H */ diff --git a/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c b/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c index 914c5670864..96baa3984b5 100644 --- a/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c +++ b/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c @@ -32,6 +32,9 @@ */ #include + +#ifdef GRPC_COMPILE_WITH_CRONET + #include #include @@ -41,23 +44,20 @@ #include "src/core/lib/surface/channel.h" #include "src/core/lib/transport/transport_impl.h" -#ifdef COMPILE_WITH_CRONET // Cronet transport object -struct grpc_cronet_transport { - grpc_transport base; /* must be first element in this structure */ +typedef struct cronet_transport { + grpc_transport base; // must be first element in this structure void *engine; char *host; -}; - -typedef struct grpc_cronet_transport grpc_cronet_transport; +} cronet_transport; -extern grpc_transport_vtable cronet_vtable; +extern grpc_transport_vtable grpc_cronet_vtable; -GRPCAPI grpc_channel *grpc_custom_secure_channel_create( +GRPCAPI grpc_channel *grpc_cronet_secure_channel_create( void *engine, const char *target, const grpc_channel_args *args, void *reserved) { - grpc_cronet_transport *ct = gpr_malloc(sizeof(grpc_cronet_transport)); - ct->base.vtable = &cronet_vtable; + cronet_transport *ct = gpr_malloc(sizeof(cronet_transport)); + ct->base.vtable = &grpc_cronet_vtable; ct->engine = engine; ct->host = gpr_malloc(strlen(target) + 1); strcpy(ct->host, target); @@ -69,4 +69,4 @@ GRPCAPI grpc_channel *grpc_custom_secure_channel_create( return grpc_channel_create(&exec_ctx, target, args, GRPC_CLIENT_DIRECT_CHANNEL, (grpc_transport *)ct); } -#endif // COMPILE_WITH_CRONET +#endif // GRPC_COMPILE_WITH_CRONET diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 5c27a4ea00d..c2bb9e0393a 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -49,25 +49,9 @@ #include "src/core/lib/transport/transport_impl.h" #include "third_party/objective_c/Cronet/cronet_c_for_grpc.h" -#ifdef COMPILE_WITH_CRONET +#ifdef GRPC_COMPILE_WITH_CRONET #define GRPC_HEADER_SIZE_IN_BYTES 5 -#define MAX_HDRS 100 - -#define GRPC_CRONET_TRACE(...) \ - { \ - if (grpc_cronet_trace) gpr_log(__VA_ARGS__); \ - } -#define CRONET_READ(...) \ - { \ - GRPC_CRONET_TRACE(GPR_DEBUG, "R: cronet_bidirectional_stream_read()"); \ - cronet_bidirectional_stream_read(__VA_ARGS__); \ - } -#define SET_RECV_STATE(STATE) \ - { \ - GRPC_CRONET_TRACE(GPR_DEBUG, "next_state = %s", recv_state_name[STATE]); \ - cronet_recv_state = STATE; \ - } // Global flag that gets set with GRPC_TRACE env variable int grpc_cronet_trace = 1; @@ -76,7 +60,7 @@ int grpc_cronet_trace = 1; struct grpc_cronet_transport { grpc_transport base; /* must be first element in this structure */ cronet_engine *engine; - const char *host; + char *host; }; typedef struct grpc_cronet_transport grpc_cronet_transport; @@ -96,7 +80,8 @@ enum recv_state { CRONET_RECV_CLOSED, }; -const char *recv_state_name[] = {"CRONET_RECV_IDLE", "CRONET_RECV_READ_LENGTH", +static const char *recv_state_name[] = {"CRONET_RECV_IDLE", + "CRONET_RECV_READ_LENGTH", "CRONET_RECV_READ_DATA,", "CRONET_RECV_CLOSED"}; @@ -120,21 +105,20 @@ enum callback_id { struct stream_obj { // we store received bytes here as they trickle in. - gpr_slice_buffer write_slicebuffer; + gpr_slice_buffer write_slice_buffer; cronet_bidirectional_stream *cbs; gpr_slice slice; - gpr_slice_buffer read_slicebuffer; + gpr_slice_buffer read_slice_buffer; struct grpc_slice_buffer_stream sbs; char *read_buffer; - uint32_t remaining_read_bytes; - uint32_t total_read_bytes; + int remaining_read_bytes; + int total_read_bytes; char *write_buffer; size_t write_buffer_size; - // + // Hold the URL char *url; - char *host; bool response_headers_received; bool read_requested; @@ -155,57 +139,65 @@ struct stream_obj { grpc_closure *callback_list[CB_NUM_CALLBACKS][2]; // storage for header - cronet_bidirectional_stream_header headers[MAX_HDRS]; + cronet_bidirectional_stream_header *headers; uint32_t num_headers; cronet_bidirectional_stream_header_array header_array; + // state tracking + enum recv_state cronet_recv_state; + enum send_state cronet_send_state; }; typedef struct stream_obj stream_obj; -void next_send_step(stream_obj *s); -void next_recv_step(stream_obj *s, enum e_caller caller); +static void next_send_step(stream_obj *s); +static void next_recv_step(stream_obj *s, enum e_caller caller); -enum send_state cronet_send_state; -enum recv_state cronet_recv_state; static void set_pollset_do_nothing(grpc_exec_ctx *exec_ctx, grpc_transport *gt, grpc_stream *gs, grpc_pollset *pollset) {} -void enqueue_callbacks(grpc_closure *callback_list[]) { +static void enqueue_callbacks(grpc_closure *callback_list[]) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; if (callback_list[0]) { - // GRPC_CRONET_TRACE(GPR_DEBUG, "enqueuing callback = %p", - // callback_list[0]); grpc_exec_ctx_enqueue(&exec_ctx, callback_list[0], true, NULL); callback_list[0] = NULL; } if (callback_list[1]) { - // GRPC_CRONET_TRACE(GPR_DEBUG, "enqueuing callback = %p", - // callback_list[1]); grpc_exec_ctx_enqueue(&exec_ctx, callback_list[1], true, NULL); callback_list[1] = NULL; } grpc_exec_ctx_finish(&exec_ctx); } -void on_canceled(cronet_bidirectional_stream *stream) { - GRPC_CRONET_TRACE(GPR_DEBUG, "on_canceled %p", stream); +static void on_canceled(cronet_bidirectional_stream *stream) { + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "on_canceled %p", stream); + } } -void on_failed(cronet_bidirectional_stream *stream, int net_error) { - GRPC_CRONET_TRACE(GPR_DEBUG, "on_failed %p, error = %d", stream, net_error); + +static void on_failed(cronet_bidirectional_stream *stream, int net_error) { + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "on_failed %p, error = %d", stream, net_error); + } } -void on_succeded(cronet_bidirectional_stream *stream) { - GRPC_CRONET_TRACE(GPR_DEBUG, "on_succeeded %p", stream); + +static void on_succeeded(cronet_bidirectional_stream *stream) { + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "on_succeeded %p", stream); + } } -void on_response_trailers_received( + +static void on_response_trailers_received( cronet_bidirectional_stream *stream, const cronet_bidirectional_stream_header_array *trailers) { - GRPC_CRONET_TRACE(GPR_DEBUG, "R: on_response_trailers_received"); + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "R: on_response_trailers_received"); + } stream_obj *s = (stream_obj *)stream->annotation; memset(&s->imb, 0, sizeof(s->imb)); grpc_chttp2_incoming_metadata_buffer_init(&s->imb); - int i = 0; + unsigned int i = 0; for (i = 0; i < trailers->count; i++) { grpc_chttp2_incoming_metadata_buffer_add( &s->imb, grpc_mdelem_from_metadata_strings( @@ -215,26 +207,29 @@ void on_response_trailers_received( s->response_trailers_received = true; next_recv_step(s, ON_RESPONSE_TRAILERS_RECEIVED); } -void on_write_completed(cronet_bidirectional_stream *stream, const char *data) { - GRPC_CRONET_TRACE(GPR_DEBUG, "W: on_write_completed"); + +static void on_write_completed(cronet_bidirectional_stream *stream, const char *data) { + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "W: on_write_completed"); + } stream_obj *s = (stream_obj *)stream->annotation; enqueue_callbacks(s->callback_list[CB_SEND_MESSAGE]); - cronet_send_state = CRONET_WRITE_COMPLETED; + s->cronet_send_state = CRONET_WRITE_COMPLETED; next_send_step(s); } -void process_recv_message(stream_obj *s, const uint8_t *recv_data) { - gpr_slice read_data_slice = gpr_slice_malloc(s->total_read_bytes); +static void process_recv_message(stream_obj *s, const uint8_t *recv_data) { + gpr_slice read_data_slice = gpr_slice_malloc((uint32_t) s->total_read_bytes); uint8_t *dst_p = GPR_SLICE_START_PTR(read_data_slice); memcpy(dst_p, recv_data, s->total_read_bytes); - gpr_slice_buffer_add(&s->read_slicebuffer, read_data_slice); - grpc_slice_buffer_stream_init(&s->sbs, &s->read_slicebuffer, 0); + gpr_slice_buffer_add(&s->read_slice_buffer, read_data_slice); + grpc_slice_buffer_stream_init(&s->sbs, &s->read_slice_buffer, 0); *s->recv_message = (grpc_byte_buffer *)&s->sbs; } -int parse_grpc_header(const uint8_t *data) { +static int parse_grpc_header(const uint8_t *data) { const uint8_t *p = data + 1; - uint32_t length = 0; + int length = 0; length |= ((uint8_t)*p++) << 24; length |= ((uint8_t)*p++) << 16; length |= ((uint8_t)*p++) << 8; @@ -242,12 +237,13 @@ int parse_grpc_header(const uint8_t *data) { return length; } -void on_read_completed(cronet_bidirectional_stream *stream, char *data, +static void on_read_completed(cronet_bidirectional_stream *stream, char *data, int count) { stream_obj *s = (stream_obj *)stream->annotation; - GRPC_CRONET_TRACE(GPR_DEBUG, - "R: on_read_completed count=%d, total=%d, remaining=%d", + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "R: on_read_completed count=%d, total=%d, remaining=%d", count, s->total_read_bytes, s->remaining_read_bytes); + } if (count > 0) { GPR_ASSERT(s->recv_message); s->remaining_read_bytes -= count; @@ -258,36 +254,40 @@ void on_read_completed(cronet_bidirectional_stream *stream, char *data, } } -void on_response_headers_received( +static void on_response_headers_received( cronet_bidirectional_stream *stream, const cronet_bidirectional_stream_header_array *headers, const char *negotiated_protocol) { - GRPC_CRONET_TRACE(GPR_DEBUG, "R: on_response_headers_received"); + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "R: on_response_headers_received"); + } stream_obj *s = (stream_obj *)stream->annotation; enqueue_callbacks(s->callback_list[CB_RECV_INITIAL_METADATA]); s->response_headers_received = true; next_recv_step(s, ON_RESPONSE_HEADERS_RECEIVED); } -void on_request_headers_sent(cronet_bidirectional_stream *stream) { - GRPC_CRONET_TRACE(GPR_DEBUG, "W: on_request_headers_sent"); +static void on_request_headers_sent(cronet_bidirectional_stream *stream) { + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "W: on_request_headers_sent"); + } stream_obj *s = (stream_obj *)stream->annotation; enqueue_callbacks(s->callback_list[CB_SEND_INITIAL_METADATA]); - cronet_send_state = CRONET_SEND_HEADER; + s->cronet_send_state = CRONET_SEND_HEADER; next_send_step(s); } // Callback function pointers (invoked by cronet in response to events) -cronet_bidirectional_stream_callback callbacks = {on_request_headers_sent, +static cronet_bidirectional_stream_callback callbacks = {on_request_headers_sent, on_response_headers_received, on_read_completed, on_write_completed, on_response_trailers_received, - on_succeded, + on_succeeded, on_failed, on_canceled}; -void invoke_closing_callback(stream_obj *s) { +static void invoke_closing_callback(stream_obj *s) { grpc_chttp2_incoming_metadata_buffer_publish(&s->imb, s->recv_trailing_metadata); if (s->callback_list[CB_RECV_TRAILING_METADATA]) { @@ -295,59 +295,75 @@ void invoke_closing_callback(stream_obj *s) { } } +static void set_recv_state(stream_obj *s, enum recv_state state) { + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "next_state = %s", recv_state_name[state]); + } + s->cronet_recv_state = state; +} + + // This is invoked from perform_stream_op, and all on_xxxx callbacks. -void next_recv_step(stream_obj *s, enum e_caller caller) { +static void next_recv_step(stream_obj *s, enum e_caller caller) { gpr_mu_lock(&s->recv_mu); - switch (cronet_recv_state) { + switch (s->cronet_recv_state) { case CRONET_RECV_IDLE: - GRPC_CRONET_TRACE(GPR_DEBUG, "cronet_recv_state = CRONET_RECV_IDLE"); + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "cronet_recv_state = CRONET_RECV_IDLE"); + } if (caller == PERFORM_STREAM_OP || caller == ON_RESPONSE_HEADERS_RECEIVED) { if (s->read_closed && s->response_trailers_received) { invoke_closing_callback(s); - SET_RECV_STATE(CRONET_RECV_CLOSED); + set_recv_state(s, CRONET_RECV_CLOSED); } else if (s->response_headers_received == true && s->read_requested == true) { - SET_RECV_STATE(CRONET_RECV_READ_LENGTH); + set_recv_state(s, CRONET_RECV_READ_LENGTH); s->total_read_bytes = s->remaining_read_bytes = GRPC_HEADER_SIZE_IN_BYTES; GPR_ASSERT(s->read_buffer); - CRONET_READ(s->cbs, s->read_buffer, s->remaining_read_bytes); + if (grpc_cronet_trace) {gpr_log(GPR_DEBUG, "R: cronet_bidirectional_stream_read()");} + cronet_bidirectional_stream_read(s->cbs, s->read_buffer, s->remaining_read_bytes); } } break; case CRONET_RECV_READ_LENGTH: - GRPC_CRONET_TRACE(GPR_DEBUG, - "cronet_recv_state = CRONET_RECV_READ_LENGTH"); + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "cronet_recv_state = CRONET_RECV_READ_LENGTH"); + } if (caller == ON_READ_COMPLETE) { if (s->read_closed) { invoke_closing_callback(s); enqueue_callbacks(s->callback_list[CB_RECV_MESSAGE]); - SET_RECV_STATE(CRONET_RECV_CLOSED); + set_recv_state(s, CRONET_RECV_CLOSED); } else { GPR_ASSERT(s->remaining_read_bytes == 0); - SET_RECV_STATE(CRONET_RECV_READ_DATA); + set_recv_state(s, CRONET_RECV_READ_DATA); s->total_read_bytes = s->remaining_read_bytes = - parse_grpc_header(s->read_buffer); - s->read_buffer = gpr_realloc(s->read_buffer, s->remaining_read_bytes); + parse_grpc_header((const uint8_t *)s->read_buffer); + s->read_buffer = gpr_realloc(s->read_buffer, (uint32_t)s->remaining_read_bytes); GPR_ASSERT(s->read_buffer); - CRONET_READ(s->cbs, (char *)s->read_buffer, s->remaining_read_bytes); + if (grpc_cronet_trace) {gpr_log(GPR_DEBUG, "R: cronet_bidirectional_stream_read()");} + cronet_bidirectional_stream_read(s->cbs, (char *)s->read_buffer, s->remaining_read_bytes); } } break; case CRONET_RECV_READ_DATA: - GRPC_CRONET_TRACE(GPR_DEBUG, "cronet_recv_state = CRONET_RECV_READ_DATA"); + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "cronet_recv_state = CRONET_RECV_READ_DATA"); + } if (caller == ON_READ_COMPLETE) { if (s->remaining_read_bytes > 0) { int offset = s->total_read_bytes - s->remaining_read_bytes; GPR_ASSERT(s->read_buffer); - CRONET_READ(s->cbs, (char *)s->read_buffer + offset, + if (grpc_cronet_trace) {gpr_log(GPR_DEBUG, "R: cronet_bidirectional_stream_read()");} + cronet_bidirectional_stream_read(s->cbs, (char *)s->read_buffer + offset, s->remaining_read_bytes); } else { - gpr_slice_buffer_init(&s->read_slicebuffer); - uint8_t *p = s->read_buffer; + gpr_slice_buffer_init(&s->read_slice_buffer); + uint8_t *p = (uint8_t *)s->read_buffer; process_recv_message(s, p); - SET_RECV_STATE(CRONET_RECV_IDLE); + set_recv_state(s, CRONET_RECV_IDLE); enqueue_callbacks(s->callback_list[CB_RECV_MESSAGE]); } } @@ -361,15 +377,15 @@ void next_recv_step(stream_obj *s, enum e_caller caller) { gpr_mu_unlock(&s->recv_mu); } -// This function takes the data from s->write_slicebuffer and assembles into +// This function takes the data from s->write_slice_buffer and assembles into // a contiguous byte stream with 5 byte gRPC header prepended. -void create_grpc_frame(stream_obj *s) { - gpr_slice slice = gpr_slice_buffer_take_first(&s->write_slicebuffer); +static void create_grpc_frame(stream_obj *s) { + gpr_slice slice = gpr_slice_buffer_take_first(&s->write_slice_buffer); uint8_t *raw_data = GPR_SLICE_START_PTR(slice); size_t length = GPR_SLICE_LENGTH(slice); s->write_buffer_size = length + GRPC_HEADER_SIZE_IN_BYTES; s->write_buffer = gpr_realloc(s->write_buffer, s->write_buffer_size); - uint8_t *p = s->write_buffer; + uint8_t *p = (uint8_t *)s->write_buffer; // Append 5 byte header *p++ = 0; *p++ = (uint8_t)(length >> 24); @@ -380,32 +396,37 @@ void create_grpc_frame(stream_obj *s) { memcpy(p, raw_data, length); } -void do_write(stream_obj *s) { - gpr_slice_buffer *sb = &s->write_slicebuffer; +static void do_write(stream_obj *s) { + gpr_slice_buffer *sb = &s->write_slice_buffer; GPR_ASSERT(sb->count <= 1); if (sb->count > 0) { create_grpc_frame(s); - GRPC_CRONET_TRACE(GPR_DEBUG, "W: cronet_bidirectional_stream_write"); + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "W: cronet_bidirectional_stream_write"); + } cronet_bidirectional_stream_write(s->cbs, s->write_buffer, (int)s->write_buffer_size, false); } } // -void next_send_step(stream_obj *s) { - switch (cronet_send_state) { +static void next_send_step(stream_obj *s) { + switch (s->cronet_send_state) { case CRONET_SEND_IDLE: GPR_ASSERT( s->cbs); // cronet_bidirectional_stream is not initialized yet. - cronet_send_state = CRONET_REQ_STARTED; - GRPC_CRONET_TRACE(GPR_DEBUG, "cronet_bidirectional_stream_start to %s", - s->url); + s->cronet_send_state = CRONET_REQ_STARTED; + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "cronet_bidirectional_stream_start to %s", s->url); + } cronet_bidirectional_stream_start(s->cbs, s->url, 0, "POST", &s->header_array, false); + // we no longer need the memory that was allocated earlier. + gpr_free(s->header_array.headers); break; case CRONET_SEND_HEADER: do_write(s); - cronet_send_state = CRONET_WRITE; + s->cronet_send_state = CRONET_WRITE; break; case CRONET_WRITE_COMPLETED: do_write(s); @@ -416,19 +437,25 @@ void next_send_step(stream_obj *s) { } } -void create_url(const char *path, const char *host, stream_obj *s) { - const char prefix[] = "https://"; - s->url = gpr_malloc(strlen(prefix) + strlen(host) + strlen(path) + 1); - strcpy(s->url, prefix); - strcat(s->url, host); - strcat(s->url, path); -} - static void convert_metadata_to_cronet_headers(grpc_linked_mdelem *head, const char *host, stream_obj *s) { grpc_linked_mdelem *curr = head; - while (s->num_headers < MAX_HDRS) { + // Walk the linked list and get number of header fields + uint32_t num_headers_available = 0; + while (curr != NULL) { + curr = curr->next; + num_headers_available++; + } + // Allocate enough memory + s->headers = (cronet_bidirectional_stream_header *) + gpr_malloc(sizeof(cronet_bidirectional_stream_header) * num_headers_available); + + // Walk the linked list again, this time copying the header fields. s->num_headers + // can be less than num_headers_available, as some headers are not used for cronet + curr = head; + s->num_headers = 0; + while (s->num_headers < num_headers_available) { grpc_mdelem *mdelem = curr->md; curr = curr->next; const char *key = grpc_mdstr_as_c_string(mdelem->key); @@ -440,8 +467,10 @@ static void convert_metadata_to_cronet_headers(grpc_linked_mdelem *head, } if (strcmp(key, ":path") == 0) { // Create URL by appending :path value to the hostname - create_url(value, host, s); - GRPC_CRONET_TRACE(GPR_DEBUG, "extracted URL = %s", s->url); + gpr_asprintf(&s->url, "https://%s%s", host, value); + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "extracted URL = %s", s->url); + } continue; } s->headers[s->num_headers].key = key; @@ -459,18 +488,21 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, GPR_ASSERT(ct->engine); stream_obj *s = (stream_obj *)gs; if (op->recv_trailing_metadata) { - GRPC_CRONET_TRACE( + if (grpc_cronet_trace) { + gpr_log( GPR_DEBUG, "perform_stream_op - recv_trailing_metadata: on_complete=%p", op->on_complete); + } s->recv_trailing_metadata = op->recv_trailing_metadata; GPR_ASSERT(!s->callback_list[CB_RECV_TRAILING_METADATA][0]); s->callback_list[CB_RECV_TRAILING_METADATA][0] = op->on_complete; } if (op->recv_message) { - GRPC_CRONET_TRACE(GPR_DEBUG, - "perform_stream_op - recv_message: on_complete=%p", - op->on_complete); - s->recv_message = op->recv_message; + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "perform_stream_op - recv_message: on_complete=%p", + op->on_complete); + } + s->recv_message = (grpc_byte_buffer **)op->recv_message; GPR_ASSERT(!s->callback_list[CB_RECV_MESSAGE][0]); GPR_ASSERT(!s->callback_list[CB_RECV_MESSAGE][1]); s->callback_list[CB_RECV_MESSAGE][0] = op->recv_message_ready; @@ -479,9 +511,10 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, next_recv_step(s, PERFORM_STREAM_OP); } if (op->recv_initial_metadata) { - GRPC_CRONET_TRACE(GPR_DEBUG, - "perform_stream_op - recv_initial_metadata:=%p", - op->on_complete); + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "perform_stream_op - recv_initial_metadata:=%p", + op->on_complete); + } s->recv_initial_metadata = op->recv_initial_metadata; GPR_ASSERT(!s->callback_list[CB_RECV_INITIAL_METADATA][0]); GPR_ASSERT(!s->callback_list[CB_RECV_INITIAL_METADATA][1]); @@ -490,9 +523,11 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, s->callback_list[CB_RECV_INITIAL_METADATA][1] = op->on_complete; } if (op->send_initial_metadata) { - GRPC_CRONET_TRACE( + if (grpc_cronet_trace) { + gpr_log( GPR_DEBUG, "perform_stream_op - send_initial_metadata: on_complete=%p", op->on_complete); + } s->num_headers = 0; convert_metadata_to_cronet_headers(op->send_initial_metadata->list.head, ct->host, s); @@ -503,36 +538,45 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, s->callback_list[CB_SEND_INITIAL_METADATA][0] = op->on_complete; } if (op->send_message) { - GRPC_CRONET_TRACE(GPR_DEBUG, - "perform_stream_op - send_message: on_complete=%p", - op->on_complete); + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "perform_stream_op - send_message: on_complete=%p", + op->on_complete); + } grpc_byte_stream_next(exec_ctx, op->send_message, &s->slice, op->send_message->length, NULL); - gpr_slice_buffer_add(&s->write_slicebuffer, s->slice); + // Check that compression flag is not ON. We don't support compression yet. + // TODO (makdharma): add compression support + GPR_ASSERT(op->send_message->flags == 0); + gpr_slice_buffer_add(&s->write_slice_buffer, s->slice); if (s->cbs == NULL) { - GRPC_CRONET_TRACE(GPR_DEBUG, "cronet_bidirectional_stream_create"); + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "cronet_bidirectional_stream_create"); + } s->cbs = cronet_bidirectional_stream_create(ct->engine, s, &callbacks); GPR_ASSERT(s->cbs); s->read_closed = false; s->response_trailers_received = false; s->response_headers_received = false; - cronet_send_state = CRONET_SEND_IDLE; - cronet_recv_state = CRONET_RECV_IDLE; + s->cronet_send_state = CRONET_SEND_IDLE; + s->cronet_recv_state = CRONET_RECV_IDLE; } GPR_ASSERT(!s->callback_list[CB_SEND_MESSAGE][0]); s->callback_list[CB_SEND_MESSAGE][0] = op->on_complete; next_send_step(s); } if (op->send_trailing_metadata) { - GRPC_CRONET_TRACE( - GPR_DEBUG, "perform_stream_op - send_trailing_metadata: on_complete=%p", + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "perform_stream_op - send_trailing_metadata: on_complete=%p", op->on_complete); + } GPR_ASSERT(!s->callback_list[CB_SEND_TRAILING_METADATA][0]); s->callback_list[CB_SEND_TRAILING_METADATA][0] = op->on_complete; if (s->cbs) { // Send an "empty" write to the far end to signal that we're done. // This will induce the server to send down trailers. - GRPC_CRONET_TRACE(GPR_DEBUG, "W: cronet_bidirectional_stream_write"); + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "W: cronet_bidirectional_stream_write"); + } cronet_bidirectional_stream_write(s->cbs, "abc", 0, true); } else { // We never created a stream. This was probably an empty request. @@ -550,34 +594,41 @@ static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, gpr_mu_init(&s->recv_mu); s->read_buffer = gpr_malloc(GRPC_HEADER_SIZE_IN_BYTES); s->write_buffer = gpr_malloc(GRPC_HEADER_SIZE_IN_BYTES); - gpr_slice_buffer_init(&s->write_slicebuffer); - GRPC_CRONET_TRACE(GPR_DEBUG, "cronet_transport - init_stream"); + gpr_slice_buffer_init(&s->write_slice_buffer); + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "cronet_transport - init_stream"); + } return 0; } static void destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, grpc_stream *gs) { - GRPC_CRONET_TRACE(GPR_DEBUG, "Destroy stream"); + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "Destroy stream"); + } stream_obj *s = (stream_obj *)gs; s->cbs = NULL; gpr_free(s->read_buffer); gpr_free(s->write_buffer); + gpr_free(s->url); gpr_mu_destroy(&s->recv_mu); } static void destroy_transport(grpc_exec_ctx *exec_ctx, grpc_transport *gt) { grpc_cronet_transport *ct = (grpc_cronet_transport *)gt; gpr_free(ct->host); - GRPC_CRONET_TRACE(GPR_DEBUG, "Destroy transport"); + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "Destroy transport"); + } } -const grpc_transport_vtable cronet_vtable = {sizeof(stream_obj), +const grpc_transport_vtable grpc_cronet_vtable = {sizeof(stream_obj), "cronet_http", init_stream, set_pollset_do_nothing, perform_stream_op, + NULL, destroy_stream, destroy_transport, - NULL, NULL}; -#endif // COMPILE_WITH_CRONET +#endif // GRPC_COMPILE_WITH_CRONET From 808131932e8ef8b9ec239256407f6e2e0f270948 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Fri, 29 Apr 2016 13:36:32 -0700 Subject: [PATCH 0179/1894] reverting stuff --- include/grpc/grpc_security.h | 4 ---- 1 file changed, 4 deletions(-) diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h index 150ad05a272..79199cc5d68 100644 --- a/include/grpc/grpc_security.h +++ b/include/grpc/grpc_security.h @@ -299,10 +299,6 @@ GRPCAPI grpc_channel *grpc_secure_channel_create( grpc_channel_credentials *creds, const char *target, const grpc_channel_args *args, void *reserved); -GRPCAPI grpc_channel *grpc_custom_secure_channel_create( - void *engine, const char *target, const grpc_channel_args *args, - void *reserved); - /* --- grpc_server_credentials object. --- A server credentials object represents a way to authenticate a server. */ From 2389ad629514cdd58f0fda0042f04b89b4013d44 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Fri, 29 Apr 2016 14:49:59 -0700 Subject: [PATCH 0180/1894] Clang formatting fixes --- .../client/secure/cronet_channel_create.c | 2 +- .../cronet/transport/cronet_transport.c | 106 +++++++++--------- 2 files changed, 57 insertions(+), 51 deletions(-) diff --git a/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c b/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c index 96baa3984b5..a6cb1f70a70 100644 --- a/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c +++ b/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c @@ -46,7 +46,7 @@ // Cronet transport object typedef struct cronet_transport { - grpc_transport base; // must be first element in this structure + grpc_transport base; // must be first element in this structure void *engine; char *host; } cronet_transport; diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index c2bb9e0393a..d337e84606b 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -80,10 +80,9 @@ enum recv_state { CRONET_RECV_CLOSED, }; -static const char *recv_state_name[] = {"CRONET_RECV_IDLE", - "CRONET_RECV_READ_LENGTH", - "CRONET_RECV_READ_DATA,", - "CRONET_RECV_CLOSED"}; +static const char *recv_state_name[] = { + "CRONET_RECV_IDLE", "CRONET_RECV_READ_LENGTH", "CRONET_RECV_READ_DATA,", + "CRONET_RECV_CLOSED"}; // Enum that identifies calling function. enum e_caller { @@ -152,7 +151,6 @@ typedef struct stream_obj stream_obj; static void next_send_step(stream_obj *s); static void next_recv_step(stream_obj *s, enum e_caller caller); - static void set_pollset_do_nothing(grpc_exec_ctx *exec_ctx, grpc_transport *gt, grpc_stream *gs, grpc_pollset *pollset) {} @@ -208,7 +206,8 @@ static void on_response_trailers_received( next_recv_step(s, ON_RESPONSE_TRAILERS_RECEIVED); } -static void on_write_completed(cronet_bidirectional_stream *stream, const char *data) { +static void on_write_completed(cronet_bidirectional_stream *stream, + const char *data) { if (grpc_cronet_trace) { gpr_log(GPR_DEBUG, "W: on_write_completed"); } @@ -219,7 +218,7 @@ static void on_write_completed(cronet_bidirectional_stream *stream, const char * } static void process_recv_message(stream_obj *s, const uint8_t *recv_data) { - gpr_slice read_data_slice = gpr_slice_malloc((uint32_t) s->total_read_bytes); + gpr_slice read_data_slice = gpr_slice_malloc((uint32_t)s->total_read_bytes); uint8_t *dst_p = GPR_SLICE_START_PTR(read_data_slice); memcpy(dst_p, recv_data, s->total_read_bytes); gpr_slice_buffer_add(&s->read_slice_buffer, read_data_slice); @@ -238,11 +237,11 @@ static int parse_grpc_header(const uint8_t *data) { } static void on_read_completed(cronet_bidirectional_stream *stream, char *data, - int count) { + int count) { stream_obj *s = (stream_obj *)stream->annotation; if (grpc_cronet_trace) { gpr_log(GPR_DEBUG, "R: on_read_completed count=%d, total=%d, remaining=%d", - count, s->total_read_bytes, s->remaining_read_bytes); + count, s->total_read_bytes, s->remaining_read_bytes); } if (count > 0) { GPR_ASSERT(s->recv_message); @@ -278,14 +277,15 @@ static void on_request_headers_sent(cronet_bidirectional_stream *stream) { } // Callback function pointers (invoked by cronet in response to events) -static cronet_bidirectional_stream_callback callbacks = {on_request_headers_sent, - on_response_headers_received, - on_read_completed, - on_write_completed, - on_response_trailers_received, - on_succeeded, - on_failed, - on_canceled}; +static cronet_bidirectional_stream_callback callbacks = { + on_request_headers_sent, + on_response_headers_received, + on_read_completed, + on_write_completed, + on_response_trailers_received, + on_succeeded, + on_failed, + on_canceled}; static void invoke_closing_callback(stream_obj *s) { grpc_chttp2_incoming_metadata_buffer_publish(&s->imb, @@ -302,7 +302,6 @@ static void set_recv_state(stream_obj *s, enum recv_state state) { s->cronet_recv_state = state; } - // This is invoked from perform_stream_op, and all on_xxxx callbacks. static void next_recv_step(stream_obj *s, enum e_caller caller) { gpr_mu_lock(&s->recv_mu); @@ -322,8 +321,11 @@ static void next_recv_step(stream_obj *s, enum e_caller caller) { s->total_read_bytes = s->remaining_read_bytes = GRPC_HEADER_SIZE_IN_BYTES; GPR_ASSERT(s->read_buffer); - if (grpc_cronet_trace) {gpr_log(GPR_DEBUG, "R: cronet_bidirectional_stream_read()");} - cronet_bidirectional_stream_read(s->cbs, s->read_buffer, s->remaining_read_bytes); + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "R: cronet_bidirectional_stream_read()"); + } + cronet_bidirectional_stream_read(s->cbs, s->read_buffer, + s->remaining_read_bytes); } } break; @@ -341,10 +343,14 @@ static void next_recv_step(stream_obj *s, enum e_caller caller) { set_recv_state(s, CRONET_RECV_READ_DATA); s->total_read_bytes = s->remaining_read_bytes = parse_grpc_header((const uint8_t *)s->read_buffer); - s->read_buffer = gpr_realloc(s->read_buffer, (uint32_t)s->remaining_read_bytes); + s->read_buffer = + gpr_realloc(s->read_buffer, (uint32_t)s->remaining_read_bytes); GPR_ASSERT(s->read_buffer); - if (grpc_cronet_trace) {gpr_log(GPR_DEBUG, "R: cronet_bidirectional_stream_read()");} - cronet_bidirectional_stream_read(s->cbs, (char *)s->read_buffer, s->remaining_read_bytes); + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "R: cronet_bidirectional_stream_read()"); + } + cronet_bidirectional_stream_read(s->cbs, (char *)s->read_buffer, + s->remaining_read_bytes); } } break; @@ -356,9 +362,11 @@ static void next_recv_step(stream_obj *s, enum e_caller caller) { if (s->remaining_read_bytes > 0) { int offset = s->total_read_bytes - s->remaining_read_bytes; GPR_ASSERT(s->read_buffer); - if (grpc_cronet_trace) {gpr_log(GPR_DEBUG, "R: cronet_bidirectional_stream_read()");} - cronet_bidirectional_stream_read(s->cbs, (char *)s->read_buffer + offset, - s->remaining_read_bytes); + if (grpc_cronet_trace) { + gpr_log(GPR_DEBUG, "R: cronet_bidirectional_stream_read()"); + } + cronet_bidirectional_stream_read( + s->cbs, (char *)s->read_buffer + offset, s->remaining_read_bytes); } else { gpr_slice_buffer_init(&s->read_slice_buffer); uint8_t *p = (uint8_t *)s->read_buffer; @@ -448,11 +456,13 @@ static void convert_metadata_to_cronet_headers(grpc_linked_mdelem *head, num_headers_available++; } // Allocate enough memory - s->headers = (cronet_bidirectional_stream_header *) - gpr_malloc(sizeof(cronet_bidirectional_stream_header) * num_headers_available); + s->headers = (cronet_bidirectional_stream_header *)gpr_malloc( + sizeof(cronet_bidirectional_stream_header) * num_headers_available); - // Walk the linked list again, this time copying the header fields. s->num_headers - // can be less than num_headers_available, as some headers are not used for cronet + // Walk the linked list again, this time copying the header fields. + // s->num_headers + // can be less than num_headers_available, as some headers are not used for + // cronet curr = head; s->num_headers = 0; while (s->num_headers < num_headers_available) { @@ -489,9 +499,9 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, stream_obj *s = (stream_obj *)gs; if (op->recv_trailing_metadata) { if (grpc_cronet_trace) { - gpr_log( - GPR_DEBUG, "perform_stream_op - recv_trailing_metadata: on_complete=%p", - op->on_complete); + gpr_log(GPR_DEBUG, + "perform_stream_op - recv_trailing_metadata: on_complete=%p", + op->on_complete); } s->recv_trailing_metadata = op->recv_trailing_metadata; GPR_ASSERT(!s->callback_list[CB_RECV_TRAILING_METADATA][0]); @@ -500,7 +510,7 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, if (op->recv_message) { if (grpc_cronet_trace) { gpr_log(GPR_DEBUG, "perform_stream_op - recv_message: on_complete=%p", - op->on_complete); + op->on_complete); } s->recv_message = (grpc_byte_buffer **)op->recv_message; GPR_ASSERT(!s->callback_list[CB_RECV_MESSAGE][0]); @@ -513,7 +523,7 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, if (op->recv_initial_metadata) { if (grpc_cronet_trace) { gpr_log(GPR_DEBUG, "perform_stream_op - recv_initial_metadata:=%p", - op->on_complete); + op->on_complete); } s->recv_initial_metadata = op->recv_initial_metadata; GPR_ASSERT(!s->callback_list[CB_RECV_INITIAL_METADATA][0]); @@ -524,9 +534,9 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, } if (op->send_initial_metadata) { if (grpc_cronet_trace) { - gpr_log( - GPR_DEBUG, "perform_stream_op - send_initial_metadata: on_complete=%p", - op->on_complete); + gpr_log(GPR_DEBUG, + "perform_stream_op - send_initial_metadata: on_complete=%p", + op->on_complete); } s->num_headers = 0; convert_metadata_to_cronet_headers(op->send_initial_metadata->list.head, @@ -540,7 +550,7 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, if (op->send_message) { if (grpc_cronet_trace) { gpr_log(GPR_DEBUG, "perform_stream_op - send_message: on_complete=%p", - op->on_complete); + op->on_complete); } grpc_byte_stream_next(exec_ctx, op->send_message, &s->slice, op->send_message->length, NULL); @@ -566,8 +576,9 @@ static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, } if (op->send_trailing_metadata) { if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "perform_stream_op - send_trailing_metadata: on_complete=%p", - op->on_complete); + gpr_log(GPR_DEBUG, + "perform_stream_op - send_trailing_metadata: on_complete=%p", + op->on_complete); } GPR_ASSERT(!s->callback_list[CB_SEND_TRAILING_METADATA][0]); s->callback_list[CB_SEND_TRAILING_METADATA][0] = op->on_complete; @@ -622,13 +633,8 @@ static void destroy_transport(grpc_exec_ctx *exec_ctx, grpc_transport *gt) { } } -const grpc_transport_vtable grpc_cronet_vtable = {sizeof(stream_obj), - "cronet_http", - init_stream, - set_pollset_do_nothing, - perform_stream_op, - NULL, - destroy_stream, - destroy_transport, - NULL}; +const grpc_transport_vtable grpc_cronet_vtable = { + sizeof(stream_obj), "cronet_http", init_stream, + set_pollset_do_nothing, perform_stream_op, NULL, + destroy_stream, destroy_transport, NULL}; #endif // GRPC_COMPILE_WITH_CRONET From 63ee8ce43cb9bcd9832fb0a5303b8228a009c1c2 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Sun, 1 May 2016 15:12:18 -0700 Subject: [PATCH 0181/1894] Reran tools/buildgen/generate_projects.sh again. --- grpc.def | 1 + src/python/grpcio/grpc/_cython/imports.generated.c | 2 ++ src/python/grpcio/grpc/_cython/imports.generated.h | 4 ++++ src/ruby/ext/grpc/rb_grpc_imports.generated.c | 2 ++ src/ruby/ext/grpc/rb_grpc_imports.generated.h | 4 ++++ 5 files changed, 13 insertions(+) diff --git a/grpc.def b/grpc.def index 61948ed1b89..09a94a6cd0c 100644 --- a/grpc.def +++ b/grpc.def @@ -87,6 +87,7 @@ EXPORTS grpc_header_nonbin_value_is_legal grpc_is_binary_header grpc_call_error_to_string + grpc_cronet_secure_channel_create grpc_auth_property_iterator_next grpc_auth_context_property_iterator grpc_auth_context_peer_identity diff --git a/src/python/grpcio/grpc/_cython/imports.generated.c b/src/python/grpcio/grpc/_cython/imports.generated.c index f0a40dbb35c..09551472b5f 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.c +++ b/src/python/grpcio/grpc/_cython/imports.generated.c @@ -125,6 +125,7 @@ grpc_header_key_is_legal_type grpc_header_key_is_legal_import; grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_import; grpc_is_binary_header_type grpc_is_binary_header_import; grpc_call_error_to_string_type grpc_call_error_to_string_import; +grpc_cronet_secure_channel_create_type grpc_cronet_secure_channel_create_import; grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import; grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import; @@ -395,6 +396,7 @@ void pygrpc_load_imports(HMODULE library) { grpc_header_nonbin_value_is_legal_import = (grpc_header_nonbin_value_is_legal_type) GetProcAddress(library, "grpc_header_nonbin_value_is_legal"); grpc_is_binary_header_import = (grpc_is_binary_header_type) GetProcAddress(library, "grpc_is_binary_header"); grpc_call_error_to_string_import = (grpc_call_error_to_string_type) GetProcAddress(library, "grpc_call_error_to_string"); + grpc_cronet_secure_channel_create_import = (grpc_cronet_secure_channel_create_type) GetProcAddress(library, "grpc_cronet_secure_channel_create"); grpc_auth_property_iterator_next_import = (grpc_auth_property_iterator_next_type) GetProcAddress(library, "grpc_auth_property_iterator_next"); grpc_auth_context_property_iterator_import = (grpc_auth_context_property_iterator_type) GetProcAddress(library, "grpc_auth_context_property_iterator"); grpc_auth_context_peer_identity_import = (grpc_auth_context_peer_identity_type) GetProcAddress(library, "grpc_auth_context_peer_identity"); diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index d5e810b7cf4..54c8aaad13e 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -325,6 +326,9 @@ extern grpc_is_binary_header_type grpc_is_binary_header_import; typedef const char *(*grpc_call_error_to_string_type)(grpc_call_error error); extern grpc_call_error_to_string_type grpc_call_error_to_string_import; #define grpc_call_error_to_string grpc_call_error_to_string_import +typedef grpc_channel *(*grpc_cronet_secure_channel_create_type)(void *engine, const char *target, const grpc_channel_args *args, void *reserved); +extern grpc_cronet_secure_channel_create_type grpc_cronet_secure_channel_create_import; +#define grpc_cronet_secure_channel_create grpc_cronet_secure_channel_create_import typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); extern grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; #define grpc_auth_property_iterator_next grpc_auth_property_iterator_next_import diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index bc43f9d36b5..cebbe8c40fe 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -125,6 +125,7 @@ grpc_header_key_is_legal_type grpc_header_key_is_legal_import; grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_import; grpc_is_binary_header_type grpc_is_binary_header_import; grpc_call_error_to_string_type grpc_call_error_to_string_import; +grpc_cronet_secure_channel_create_type grpc_cronet_secure_channel_create_import; grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import; grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import; @@ -391,6 +392,7 @@ void grpc_rb_load_imports(HMODULE library) { grpc_header_nonbin_value_is_legal_import = (grpc_header_nonbin_value_is_legal_type) GetProcAddress(library, "grpc_header_nonbin_value_is_legal"); grpc_is_binary_header_import = (grpc_is_binary_header_type) GetProcAddress(library, "grpc_is_binary_header"); grpc_call_error_to_string_import = (grpc_call_error_to_string_type) GetProcAddress(library, "grpc_call_error_to_string"); + grpc_cronet_secure_channel_create_import = (grpc_cronet_secure_channel_create_type) GetProcAddress(library, "grpc_cronet_secure_channel_create"); grpc_auth_property_iterator_next_import = (grpc_auth_property_iterator_next_type) GetProcAddress(library, "grpc_auth_property_iterator_next"); grpc_auth_context_property_iterator_import = (grpc_auth_context_property_iterator_type) GetProcAddress(library, "grpc_auth_context_property_iterator"); grpc_auth_context_peer_identity_import = (grpc_auth_context_peer_identity_type) GetProcAddress(library, "grpc_auth_context_peer_identity"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index b67361ca25b..d7ea6c574c8 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -325,6 +326,9 @@ extern grpc_is_binary_header_type grpc_is_binary_header_import; typedef const char *(*grpc_call_error_to_string_type)(grpc_call_error error); extern grpc_call_error_to_string_type grpc_call_error_to_string_import; #define grpc_call_error_to_string grpc_call_error_to_string_import +typedef grpc_channel *(*grpc_cronet_secure_channel_create_type)(void *engine, const char *target, const grpc_channel_args *args, void *reserved); +extern grpc_cronet_secure_channel_create_type grpc_cronet_secure_channel_create_import; +#define grpc_cronet_secure_channel_create grpc_cronet_secure_channel_create_import typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); extern grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; #define grpc_auth_property_iterator_next grpc_auth_property_iterator_next_import From 125590f9d5ebc53271846401d6087e47eced9897 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 2 May 2016 07:37:16 -0700 Subject: [PATCH 0182/1894] Add grpc_metadata_batch_size() function. --- src/core/lib/transport/metadata.h | 4 ++-- src/core/lib/transport/metadata_batch.c | 9 +++++++++ src/core/lib/transport/metadata_batch.h | 3 +++ 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h index 77c32c72dee..4ecbbd1b1b8 100644 --- a/src/core/lib/transport/metadata.h +++ b/src/core/lib/transport/metadata.h @@ -148,8 +148,8 @@ const char *grpc_mdstr_as_c_string(grpc_mdstr *s); #define GRPC_MDSTR_LENGTH(s) (GPR_SLICE_LENGTH(s->slice)) /* We add 32 bytes of padding as per RFC-7540 section 6.5.2. */ -#define GRPC_MDELEM_LENGTH(e) (GRPC_MDSTR_LENGTH(e->key) + \ - GRPC_MDSTR_LENGTH(e->value) + 32) +#define GRPC_MDELEM_LENGTH(e) (GRPC_MDSTR_LENGTH((e)->key) + \ + GRPC_MDSTR_LENGTH((e)->value) + 32) int grpc_mdstr_is_legal_header(grpc_mdstr *s); int grpc_mdstr_is_legal_nonbin_header(grpc_mdstr *s); diff --git a/src/core/lib/transport/metadata_batch.c b/src/core/lib/transport/metadata_batch.c index 4567221a48f..4e1cd8e2c1c 100644 --- a/src/core/lib/transport/metadata_batch.c +++ b/src/core/lib/transport/metadata_batch.c @@ -192,3 +192,12 @@ int grpc_metadata_batch_is_empty(grpc_metadata_batch *batch) { gpr_time_cmp(gpr_inf_future(batch->deadline.clock_type), batch->deadline) == 0; } + +size_t grpc_metadata_batch_size(grpc_metadata_batch *batch) { + size_t size = 0; + for (grpc_linked_mdelem* elem = batch->list.head; + elem != NULL; elem = elem->next) { + size += GRPC_MDELEM_LENGTH(elem->md); + } + return size; +} diff --git a/src/core/lib/transport/metadata_batch.h b/src/core/lib/transport/metadata_batch.h index b62668876e4..7af823f7ca4 100644 --- a/src/core/lib/transport/metadata_batch.h +++ b/src/core/lib/transport/metadata_batch.h @@ -66,6 +66,9 @@ void grpc_metadata_batch_destroy(grpc_metadata_batch *batch); void grpc_metadata_batch_clear(grpc_metadata_batch *batch); int grpc_metadata_batch_is_empty(grpc_metadata_batch *batch); +/* Returns the transport size of the batch. */ +size_t grpc_metadata_batch_size(grpc_metadata_batch *batch); + /** Moves the metadata information from \a src to \a dst. Upon return, \a src is * zeroed. */ void grpc_metadata_batch_move(grpc_metadata_batch *dst, From 4bb11ac72ade5c76c4b24c9a8a8636e9a52be003 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 2 May 2016 09:20:21 -0700 Subject: [PATCH 0183/1894] Turned load reporting into a plugin --- BUILD | 4 + Makefile | 60 +- build.yaml | 1 + src/core/ext/load_reporting/load_reporting.c | 57 +- src/core/ext/load_reporting/load_reporting.h | 32 +- .../load_reporting/load_reporting_filter.c | 27 +- .../grpc_unsecure_plugin_registry.c | 4 + test/core/end2end/fixtures/h2_loadreporting.c | 169 + test/core/end2end/gen_build_yaml.py | 1 + .../load_reporting_registration.c | 81 - tools/run_tests/sources_and_headers.json | 35 + tools/run_tests/tests.json | 3740 ++++++++++++----- vsprojects/buildtests_c.sln | 56 + .../grpc_unsecure/grpc_unsecure.vcxproj | 6 + .../grpc_unsecure.vcxproj.filters | 15 + .../h2_loadreporting_nosec_test.vcxproj | 202 + ...2_loadreporting_nosec_test.vcxproj.filters | 24 + .../h2_loadreporting_test.vcxproj | 202 + .../h2_loadreporting_test.vcxproj.filters | 24 + 19 files changed, 3572 insertions(+), 1168 deletions(-) create mode 100644 test/core/end2end/fixtures/h2_loadreporting.c delete mode 100644 test/core/load_reporting/load_reporting_registration.c create mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_nosec_test/h2_loadreporting_nosec_test.vcxproj create mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_nosec_test/h2_loadreporting_nosec_test.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_test/h2_loadreporting_test.vcxproj create mode 100644 vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_test/h2_loadreporting_test.vcxproj.filters diff --git a/BUILD b/BUILD index 199769d6b60..8ad99466c45 100644 --- a/BUILD +++ b/BUILD @@ -620,6 +620,8 @@ cc_library( "src/core/ext/client_config/subchannel_call_holder.h", "src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/uri_parser.h", + "src/core/ext/load_reporting/load_reporting.h", + "src/core/ext/load_reporting/load_reporting_filter.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", "src/core/ext/census/aggregation.h", @@ -756,6 +758,8 @@ cc_library( "src/core/ext/client_config/uri_parser.c", "src/core/ext/resolver/dns/native/dns_resolver.c", "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", + "src/core/ext/load_reporting/load_reporting.c", + "src/core/ext/load_reporting/load_reporting_filter.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", diff --git a/Makefile b/Makefile index 3dcdb019e3f..41b983e613d 100644 --- a/Makefile +++ b/Makefile @@ -1103,6 +1103,7 @@ h2_fakesec_test: $(BINDIR)/$(CONFIG)/h2_fakesec_test h2_full_test: $(BINDIR)/$(CONFIG)/h2_full_test h2_full+pipe_test: $(BINDIR)/$(CONFIG)/h2_full+pipe_test h2_full+trace_test: $(BINDIR)/$(CONFIG)/h2_full+trace_test +h2_loadreporting_test: $(BINDIR)/$(CONFIG)/h2_loadreporting_test h2_oauth2_test: $(BINDIR)/$(CONFIG)/h2_oauth2_test h2_proxy_test: $(BINDIR)/$(CONFIG)/h2_proxy_test h2_sockpair_test: $(BINDIR)/$(CONFIG)/h2_sockpair_test @@ -1117,6 +1118,7 @@ h2_compress_nosec_test: $(BINDIR)/$(CONFIG)/h2_compress_nosec_test h2_full_nosec_test: $(BINDIR)/$(CONFIG)/h2_full_nosec_test h2_full+pipe_nosec_test: $(BINDIR)/$(CONFIG)/h2_full+pipe_nosec_test h2_full+trace_nosec_test: $(BINDIR)/$(CONFIG)/h2_full+trace_nosec_test +h2_loadreporting_nosec_test: $(BINDIR)/$(CONFIG)/h2_loadreporting_nosec_test h2_proxy_nosec_test: $(BINDIR)/$(CONFIG)/h2_proxy_nosec_test h2_sockpair_nosec_test: $(BINDIR)/$(CONFIG)/h2_sockpair_nosec_test h2_sockpair+trace_nosec_test: $(BINDIR)/$(CONFIG)/h2_sockpair+trace_nosec_test @@ -1332,6 +1334,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/h2_full_test \ $(BINDIR)/$(CONFIG)/h2_full+pipe_test \ $(BINDIR)/$(CONFIG)/h2_full+trace_test \ + $(BINDIR)/$(CONFIG)/h2_loadreporting_test \ $(BINDIR)/$(CONFIG)/h2_oauth2_test \ $(BINDIR)/$(CONFIG)/h2_proxy_test \ $(BINDIR)/$(CONFIG)/h2_sockpair_test \ @@ -1346,6 +1349,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/h2_full_nosec_test \ $(BINDIR)/$(CONFIG)/h2_full+pipe_nosec_test \ $(BINDIR)/$(CONFIG)/h2_full+trace_nosec_test \ + $(BINDIR)/$(CONFIG)/h2_loadreporting_nosec_test \ $(BINDIR)/$(CONFIG)/h2_proxy_nosec_test \ $(BINDIR)/$(CONFIG)/h2_sockpair_nosec_test \ $(BINDIR)/$(CONFIG)/h2_sockpair+trace_nosec_test \ @@ -2947,6 +2951,8 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/client_config/uri_parser.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ src/core/ext/resolver/sockaddr/sockaddr_resolver.c \ + src/core/ext/load_reporting/load_reporting.c \ + src/core/ext/load_reporting/load_reporting_filter.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ @@ -13502,6 +13508,38 @@ endif endif +H2_LOADREPORTING_TEST_SRC = \ + test/core/end2end/fixtures/h2_loadreporting.c \ + +H2_LOADREPORTING_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(H2_LOADREPORTING_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/h2_loadreporting_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/h2_loadreporting_test: $(H2_LOADREPORTING_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(H2_LOADREPORTING_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_loadreporting_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_loadreporting.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_h2_loadreporting_test: $(H2_LOADREPORTING_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(H2_LOADREPORTING_TEST_OBJS:.o=.dep) +endif +endif + + H2_OAUTH2_TEST_SRC = \ test/core/end2end/fixtures/h2_oauth2.c \ @@ -13890,6 +13928,26 @@ ifneq ($(NO_DEPS),true) endif +H2_LOADREPORTING_NOSEC_TEST_SRC = \ + test/core/end2end/fixtures/h2_loadreporting.c \ + +H2_LOADREPORTING_NOSEC_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(H2_LOADREPORTING_NOSEC_TEST_SRC)))) + + +$(BINDIR)/$(CONFIG)/h2_loadreporting_nosec_test: $(H2_LOADREPORTING_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(H2_LOADREPORTING_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_loadreporting_nosec_test + +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_loadreporting.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_h2_loadreporting_nosec_test: $(H2_LOADREPORTING_NOSEC_TEST_OBJS:.o=.dep) + +ifneq ($(NO_DEPS),true) +-include $(H2_LOADREPORTING_NOSEC_TEST_OBJS:.o=.dep) +endif + + H2_PROXY_NOSEC_TEST_SRC = \ test/core/end2end/fixtures/h2_proxy.c \ @@ -14313,8 +14371,6 @@ ifneq ($(OPENSSL_DEP),) # This is to ensure the embedded OpenSSL is built beforehand, properly # installing headers to their final destination on the drive. We need this # otherwise parallel compilation will fail if a source is compiled first. -src/core/ext/load_reporting/load_reporting.c: $(OPENSSL_DEP) -src/core/ext/load_reporting/load_reporting_filter.c: $(OPENSSL_DEP) src/core/ext/transport/chttp2/client/secure/secure_channel_create.c: $(OPENSSL_DEP) src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c: $(OPENSSL_DEP) src/core/lib/http/httpcli_security_connector.c: $(OPENSSL_DEP) diff --git a/build.yaml b/build.yaml index 398a863a197..e330920d9ea 100644 --- a/build.yaml +++ b/build.yaml @@ -823,6 +823,7 @@ libs: - grpc_transport_chttp2_client_insecure - grpc_resolver_dns_native - grpc_resolver_sockaddr + - grpc_load_reporting - grpc_lb_policy_grpclb - grpc_lb_policy_pick_first - grpc_lb_policy_round_robin diff --git a/src/core/ext/load_reporting/load_reporting.c b/src/core/ext/load_reporting/load_reporting.c index 9081ffce15b..fb32685dc98 100644 --- a/src/core/ext/load_reporting/load_reporting.c +++ b/src/core/ext/load_reporting/load_reporting.c @@ -42,27 +42,33 @@ #include "src/core/lib/channel/channel_stack_builder.h" #include "src/core/lib/surface/channel_init.h" -struct grpc_load_reporting_data { +struct grpc_load_reporting_config { grpc_load_reporting_fn fn; void *data; }; -grpc_load_reporting_data *grpc_load_reporting_create(grpc_load_reporting_fn fn, - void *data) { - grpc_load_reporting_data *lrd = gpr_malloc(sizeof(grpc_load_reporting_data)); - lrd->fn = fn; - lrd->data = data; - return lrd; +grpc_load_reporting_config *grpc_load_reporting_config_create( + grpc_load_reporting_fn fn, void *data) { + grpc_load_reporting_config *lrc = + gpr_malloc(sizeof(grpc_load_reporting_config)); + lrc->fn = fn; + lrc->data = data; + return lrc; } -void grpc_load_reporting_destroy(grpc_load_reporting_data *lrd) { - gpr_free(lrd); +grpc_load_reporting_config *grpc_load_reporting_config_copy( + grpc_load_reporting_config *src) { + return grpc_load_reporting_config_create(src->fn, src->data); } -void grpc_load_reporting_call(grpc_load_reporting_data *lrd, - const grpc_call_stats *stats) { - if (lrd->fn != NULL) { - lrd->fn(lrd->data, stats); +void grpc_load_reporting_config_destroy(grpc_load_reporting_config *lrc) { + gpr_free(lrc); +} + +void grpc_load_reporting_config_call(grpc_load_reporting_config *lrc, + const grpc_call_stats *stats) { + if (lrc->fn != NULL) { + lrc->fn(stats, lrc->data); } } @@ -87,6 +93,31 @@ static bool maybe_add_load_reporting_filter(grpc_channel_stack_builder *builder, return true; } +static void lrd_arg_destroy(void *p) { grpc_load_reporting_config_destroy(p); } + +static void *lrd_arg_copy(void *p) { + return grpc_load_reporting_config_copy(p); +} + +static int lrd_arg_cmp(void *a, void *b) { + grpc_load_reporting_config *lhs = a; + grpc_load_reporting_config *rhs = b; + return !(lhs->fn == rhs->fn && lhs->data == rhs->data); +} + +static const grpc_arg_pointer_vtable lrd_ptr_vtable = { + lrd_arg_copy, lrd_arg_destroy, lrd_arg_cmp}; + +grpc_arg grpc_load_reporting_config_create_arg( + grpc_load_reporting_config *lrc) { + grpc_arg arg; + arg.type = GRPC_ARG_POINTER; + arg.key = GRPC_ARG_ENABLE_LOAD_REPORTING; + arg.value.pointer.p = lrc; + arg.value.pointer.vtable = &lrd_ptr_vtable; + return arg; +} + /* Plugin registration */ void grpc_load_reporting_plugin_init(void) { diff --git a/src/core/ext/load_reporting/load_reporting.h b/src/core/ext/load_reporting/load_reporting.h index fcf555da850..806af2bda78 100644 --- a/src/core/ext/load_reporting/load_reporting.h +++ b/src/core/ext/load_reporting/load_reporting.h @@ -37,28 +37,28 @@ #include "src/core/lib/iomgr/closure.h" #include "src/core/lib/surface/call.h" -typedef struct grpc_load_reporting_data grpc_load_reporting_data; +typedef struct grpc_load_reporting_config grpc_load_reporting_config; -/** Custom function to be called by the load reporting filter. - * - * The \a data pointer is the same as the one passed to \a - * grpc_load_reporting_init. \a stats are the final per-call statistics gathered - * by the gRPC runtime. */ -typedef void (*grpc_load_reporting_fn)(void *data, - const grpc_call_stats *stats); +/** Custom function to be called by the load reporting filter. */ +typedef void (*grpc_load_reporting_fn)(const grpc_call_stats *stats, + void *data); /** Register \a fn as the function to be invoked by the load reporting filter, - * passing \a data as its namesake argument. To be called only from a plugin - * init function. */ -grpc_load_reporting_data *grpc_load_reporting_create(grpc_load_reporting_fn fn, - void *data); + * passing \a data alongisde the call stats */ +grpc_load_reporting_config *grpc_load_reporting_config_create( + grpc_load_reporting_fn fn, void *data); + +grpc_load_reporting_config *grpc_load_reporting_config_copy( + grpc_load_reporting_config *src); -// XXX -void grpc_load_reporting_destroy(grpc_load_reporting_data *lrd); +void grpc_load_reporting_config_destroy(grpc_load_reporting_config *lrc); /** Invoke the function registered by \a grpc_load_reporting_init, passing it \a * stats as one of the arguments (see \a load_reporting_fn). */ -void grpc_load_reporting_call(grpc_load_reporting_data *lrd, - const grpc_call_stats *stats); +void grpc_load_reporting_config_call(grpc_load_reporting_config *lrc, + const grpc_call_stats *stats); + +/** Return a \a grpc_arg enabling load reporting */ +grpc_arg grpc_load_reporting_config_create_arg(grpc_load_reporting_config *lrc); #endif /* GRPC_CORE_EXT_LOAD_REPORTING_LOAD_REPORTING_H */ diff --git a/src/core/ext/load_reporting/load_reporting_filter.c b/src/core/ext/load_reporting/load_reporting_filter.c index 81f4a0277c1..6970f064b85 100644 --- a/src/core/ext/load_reporting/load_reporting_filter.c +++ b/src/core/ext/load_reporting/load_reporting_filter.c @@ -31,8 +31,8 @@ * */ -#include #include +#include #include "src/core/ext/load_reporting/load_reporting.h" #include "src/core/ext/load_reporting/load_reporting_filter.h" @@ -40,7 +40,7 @@ #include "src/core/lib/profiling/timers.h" typedef struct call_data { void *dummy; } call_data; -typedef struct channel_data { grpc_load_reporting_data *lrd; } channel_data; +typedef struct channel_data { grpc_load_reporting_config *lrc; } channel_data; /* Constructor for call_data */ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, @@ -50,9 +50,11 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, const grpc_call_stats *stats, void *ignored) { channel_data *chand = elem->channel_data; - GPR_TIMER_BEGIN("load_reporting_filter", 0); - grpc_load_reporting_call(chand->lrd, stats); - GPR_TIMER_END("load_reporting_filter", 0); + if (chand->lrc != NULL) { + GPR_TIMER_BEGIN("load_reporting_filter", 0); + grpc_load_reporting_config_call(chand->lrc, stats); + GPR_TIMER_END("load_reporting_filter", 0); + } } /* Constructor for channel_data */ @@ -65,20 +67,23 @@ static void init_channel_elem(grpc_exec_ctx *exec_ctx, memset(chand, 0, sizeof(channel_data)); for (size_t i = 0; i < args->channel_args->num_args; i++) { - if (0 == strcmp(args->channel_args->args[i].key, GRPC_ARG_ENABLE_LOAD_REPORTING)) { - chand->lrd = args->channel_args->args[i].value.pointer.p; - GPR_ASSERT(chand->lrd != NULL); + if (0 == strcmp(args->channel_args->args[i].key, + GRPC_ARG_ENABLE_LOAD_REPORTING)) { + grpc_load_reporting_config *arg_lrc = + args->channel_args->args[i].value.pointer.p; + chand->lrc = grpc_load_reporting_config_copy(arg_lrc); + GPR_ASSERT(chand->lrc != NULL); + break; } } - GPR_ASSERT(chand->lrd != NULL); /* arg actually found */ - + GPR_ASSERT(chand->lrc != NULL); /* arg actually found */ } /* Destructor for channel data */ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem) { channel_data *chand = elem->channel_data; - grpc_load_reporting_destroy(chand->lrd); + grpc_load_reporting_config_destroy(chand->lrc); } const grpc_channel_filter grpc_load_reporting_filter = { diff --git a/src/core/plugin_registry/grpc_unsecure_plugin_registry.c b/src/core/plugin_registry/grpc_unsecure_plugin_registry.c index a6108ae7a9a..79950787258 100644 --- a/src/core/plugin_registry/grpc_unsecure_plugin_registry.c +++ b/src/core/plugin_registry/grpc_unsecure_plugin_registry.c @@ -41,6 +41,8 @@ extern void grpc_resolver_dns_native_init(void); extern void grpc_resolver_dns_native_shutdown(void); extern void grpc_resolver_sockaddr_init(void); extern void grpc_resolver_sockaddr_shutdown(void); +extern void grpc_load_reporting_plugin_init(void); +extern void grpc_load_reporting_plugin_shutdown(void); extern void grpc_lb_policy_pick_first_init(void); extern void grpc_lb_policy_pick_first_shutdown(void); extern void grpc_lb_policy_round_robin_init(void); @@ -57,6 +59,8 @@ void grpc_register_built_in_plugins(void) { grpc_resolver_dns_native_shutdown); grpc_register_plugin(grpc_resolver_sockaddr_init, grpc_resolver_sockaddr_shutdown); + grpc_register_plugin(grpc_load_reporting_plugin_init, + grpc_load_reporting_plugin_shutdown); grpc_register_plugin(grpc_lb_policy_pick_first_init, grpc_lb_policy_pick_first_shutdown); grpc_register_plugin(grpc_lb_policy_round_robin_init, diff --git a/test/core/end2end/fixtures/h2_loadreporting.c b/test/core/end2end/fixtures/h2_loadreporting.c new file mode 100644 index 00000000000..13feba29f17 --- /dev/null +++ b/test/core/end2end/fixtures/h2_loadreporting.c @@ -0,0 +1,169 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include + +#include +#include +#include +#include +#include +#include +#include "src/core/ext/client_config/client_channel.h" +#include "src/core/ext/load_reporting/load_reporting.h" +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/connected_channel.h" +#include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/server.h" +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" + +static grpc_load_reporting_config *g_client_lrc; +static grpc_load_reporting_config *g_server_lrc; + +typedef struct fullstack_fixture_data { + char *localaddr; +} fullstack_fixture_data; + +static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( + grpc_channel_args *client_args, grpc_channel_args *server_args) { + grpc_end2end_test_fixture f; + int port = grpc_pick_unused_port_or_die(); + fullstack_fixture_data *ffd = gpr_malloc(sizeof(fullstack_fixture_data)); + memset(&f, 0, sizeof(f)); + + gpr_join_host_port(&ffd->localaddr, "localhost", port); + + f.fixture_data = ffd; + f.cq = grpc_completion_queue_create(NULL); + + return f; +} + +typedef struct { + int64_t total_bytes; + bool processed; +} aggregated_bw_stats; + +static void sample_fn(const grpc_call_stats *stats, void *lr_data) { + aggregated_bw_stats *custom_stats = (aggregated_bw_stats *)lr_data; + custom_stats->total_bytes = + (int64_t)(stats->transport_stream_stats.outgoing.data_bytes + + stats->transport_stream_stats.incoming.data_bytes); + custom_stats->processed = true; +} + +void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, + grpc_channel_args *client_args) { + fullstack_fixture_data *ffd = f->fixture_data; + grpc_arg arg = grpc_load_reporting_config_create_arg(g_client_lrc); + client_args = grpc_channel_args_copy_and_add(client_args, &arg, 1); + f->client = grpc_insecure_channel_create(ffd->localaddr, client_args, NULL); + grpc_channel_args_destroy(client_args); + GPR_ASSERT(f->client); +} + +void chttp2_init_server_fullstack(grpc_end2end_test_fixture *f, + grpc_channel_args *server_args) { + fullstack_fixture_data *ffd = f->fixture_data; + if (f->server) { + grpc_server_destroy(f->server); + } + grpc_arg arg = grpc_load_reporting_config_create_arg(g_server_lrc); + server_args = grpc_channel_args_copy_and_add(server_args, &arg, 1); + f->server = grpc_server_create(server_args, NULL); + grpc_channel_args_destroy(server_args); + grpc_server_register_completion_queue(f->server, f->cq, NULL); + GPR_ASSERT(grpc_server_add_insecure_http2_port(f->server, ffd->localaddr)); + grpc_server_start(f->server); +} + +void chttp2_tear_down_fullstack(grpc_end2end_test_fixture *f) { + fullstack_fixture_data *ffd = f->fixture_data; + gpr_free(ffd->localaddr); + gpr_free(ffd); +} + +/* All test configurations */ +static grpc_end2end_test_config configs[] = { + {"chttp2/fullstack+loadreporting", FEATURE_MASK_SUPPORTS_DELAYED_CONNECTION, + chttp2_create_fixture_fullstack, chttp2_init_client_fullstack, + chttp2_init_server_fullstack, chttp2_tear_down_fullstack}, +}; + +int main(int argc, char **argv) { + size_t i; + + aggregated_bw_stats *aggr_stats_client = + gpr_malloc(sizeof(aggregated_bw_stats)); + aggr_stats_client->total_bytes = -1; + aggr_stats_client->processed = false; + aggregated_bw_stats *aggr_stats_server = + gpr_malloc(sizeof(aggregated_bw_stats)); + aggr_stats_server->total_bytes = -1; + aggr_stats_server->processed = false; + + g_client_lrc = + grpc_load_reporting_config_create(sample_fn, aggr_stats_client); + g_server_lrc = + grpc_load_reporting_config_create(sample_fn, aggr_stats_server); + + grpc_test_init(argc, argv); + grpc_end2end_tests_pre_init(); + grpc_init(); + + for (i = 0; i < sizeof(configs) / sizeof(*configs); i++) { + grpc_end2end_tests(argc, argv, configs[i]); + } + + grpc_shutdown(); + + grpc_load_reporting_config_destroy(g_client_lrc); + grpc_load_reporting_config_destroy(g_server_lrc); + + if (aggr_stats_client->processed) { + GPR_ASSERT(aggr_stats_client->total_bytes >= 0); + } + if (aggr_stats_server->processed) { + GPR_ASSERT(aggr_stats_server->total_bytes >= 0); + } + + gpr_free(aggr_stats_client); + gpr_free(aggr_stats_server); + + return 0; +} diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index cffe5995bcd..8e8f2031353 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -56,6 +56,7 @@ END2END_FIXTURES = { 'h2_full+pipe': default_unsecure_fixture_options._replace( platforms=['linux']), 'h2_full+trace': default_unsecure_fixture_options._replace(tracing=True), + 'h2_loadreporting': default_unsecure_fixture_options, 'h2_oauth2': default_secure_fixture_options._replace(ci_mac=False), 'h2_proxy': default_unsecure_fixture_options._replace(includes_proxy=True, ci_mac=False), diff --git a/test/core/load_reporting/load_reporting_registration.c b/test/core/load_reporting/load_reporting_registration.c deleted file mode 100644 index e3d52b250c5..00000000000 --- a/test/core/load_reporting/load_reporting_registration.c +++ /dev/null @@ -1,81 +0,0 @@ -/* - * - * Copyright 2015-2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -#include -#include -#include - -#include "src/core/lib/load_reporting/load_reporting.h" -#include "src/core/lib/surface/api_trace.h" -#include "test/core/util/test_config.h" - -typedef struct { uint64_t total_bytes; } aggregated_bw_stats; - -static void sample_fn(void *lr_data, const grpc_call_stats *stats) { - aggregated_bw_stats *custom_stats = (aggregated_bw_stats *)lr_data; - custom_stats->total_bytes = - stats->transport_stream_stats.outgoing.data_bytes + - stats->transport_stream_stats.incoming.data_bytes; -} - -static void lr_plugin_init(void) { - aggregated_bw_stats *data = gpr_malloc(sizeof(aggregated_bw_stats)); - grpc_load_reporting_init(sample_fn, data); -} - -static void lr_plugin_destroy(void) { grpc_load_reporting_destroy(); } - -static void load_reporting_register() { - grpc_register_plugin(lr_plugin_init, lr_plugin_destroy); -} - -static void test_load_reporter_registration(void) { - grpc_call_stats stats; - stats.transport_stream_stats.outgoing.data_bytes = 123; - stats.transport_stream_stats.incoming.data_bytes = 456; - - grpc_load_reporting_call(&stats); - - GPR_ASSERT(((aggregated_bw_stats *)grpc_load_reporting_data())->total_bytes == - 123 + 456); -} - -int main(int argc, char **argv) { - load_reporting_register(); - grpc_init(); - test_load_reporter_registration(); - grpc_shutdown(); - - return 0; -} diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 348a78db3fb..471a5fc9527 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -3623,6 +3623,23 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "end2end_tests", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_loadreporting_test", + "src": [ + "test/core/end2end/fixtures/h2_loadreporting.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "end2end_tests", @@ -3861,6 +3878,23 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "end2end_nosec_tests", + "gpr", + "gpr_test_util", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [], + "language": "c", + "name": "h2_loadreporting_nosec_test", + "src": [ + "test/core/end2end/fixtures/h2_loadreporting.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "end2end_nosec_tests", @@ -4212,6 +4246,7 @@ "grpc_lb_policy_grpclb", "grpc_lb_policy_pick_first", "grpc_lb_policy_round_robin", + "grpc_load_reporting", "grpc_resolver_dns_native", "grpc_resolver_sockaddr", "grpc_transport_chttp2_client_insecure", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 0fd77854d22..cdfb6f5651d 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -9116,13 +9116,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9137,13 +9138,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9158,13 +9160,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9179,13 +9182,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9200,13 +9204,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9221,13 +9226,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9242,13 +9248,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9263,13 +9270,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9284,13 +9292,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9305,13 +9314,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9326,13 +9336,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9347,13 +9358,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9368,13 +9380,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9389,13 +9402,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9410,13 +9424,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9431,13 +9446,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9452,13 +9468,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9473,13 +9490,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9494,13 +9512,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9515,13 +9534,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9536,13 +9556,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9557,13 +9578,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9578,13 +9600,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9599,13 +9622,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9620,13 +9644,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9641,13 +9666,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9662,13 +9688,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9683,13 +9710,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9704,13 +9732,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9725,13 +9754,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9746,13 +9776,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9767,13 +9798,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9788,13 +9820,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9809,13 +9842,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9830,13 +9864,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9851,13 +9886,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9872,13 +9908,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9893,13 +9930,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9920,7 +9958,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -9941,7 +9979,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -9962,7 +10000,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -9983,7 +10021,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10004,7 +10042,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10025,7 +10063,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10046,7 +10084,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10067,7 +10105,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10088,7 +10126,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10098,18 +10136,18 @@ }, { "args": [ - "default_host" + "compressed_payload" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10119,18 +10157,18 @@ }, { "args": [ - "disappearing_server" + "connectivity" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10140,7 +10178,7 @@ }, { "args": [ - "empty_batch" + "default_host" ], "ci_platforms": [ "windows", @@ -10151,7 +10189,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10161,7 +10199,7 @@ }, { "args": [ - "filter_causes_close" + "disappearing_server" ], "ci_platforms": [ "windows", @@ -10172,7 +10210,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10182,18 +10220,18 @@ }, { "args": [ - "graceful_server_shutdown" + "empty_batch" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10203,7 +10241,7 @@ }, { "args": [ - "high_initial_seqno" + "filter_causes_close" ], "ci_platforms": [ "windows", @@ -10214,7 +10252,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10224,18 +10262,18 @@ }, { "args": [ - "idempotent_request" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10245,7 +10283,7 @@ }, { "args": [ - "invoke_large_request" + "high_initial_seqno" ], "ci_platforms": [ "windows", @@ -10256,7 +10294,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10266,7 +10304,7 @@ }, { "args": [ - "large_metadata" + "hpack_size" ], "ci_platforms": [ "windows", @@ -10277,7 +10315,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10287,18 +10325,18 @@ }, { "args": [ - "max_message_length" + "idempotent_request" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10308,7 +10346,7 @@ }, { "args": [ - "negative_deadline" + "invoke_large_request" ], "ci_platforms": [ "windows", @@ -10319,7 +10357,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10329,7 +10367,7 @@ }, { "args": [ - "no_op" + "large_metadata" ], "ci_platforms": [ "windows", @@ -10340,7 +10378,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10350,18 +10388,18 @@ }, { "args": [ - "payload" + "max_concurrent_streams" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10371,18 +10409,18 @@ }, { "args": [ - "ping_pong_streaming" + "max_message_length" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10392,7 +10430,7 @@ }, { "args": [ - "registered_call" + "negative_deadline" ], "ci_platforms": [ "windows", @@ -10403,7 +10441,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10413,7 +10451,7 @@ }, { "args": [ - "request_with_payload" + "no_op" ], "ci_platforms": [ "windows", @@ -10424,7 +10462,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10434,18 +10472,18 @@ }, { "args": [ - "server_finishes_request" + "payload" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10455,7 +10493,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "ping" ], "ci_platforms": [ "windows", @@ -10466,7 +10504,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10476,7 +10514,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -10487,7 +10525,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10497,18 +10535,18 @@ }, { "args": [ - "simple_delayed_request" + "registered_call" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10518,7 +10556,7 @@ }, { "args": [ - "simple_metadata" + "request_with_flags" ], "ci_platforms": [ "windows", @@ -10529,7 +10567,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10539,7 +10577,7 @@ }, { "args": [ - "simple_request" + "request_with_payload" ], "ci_platforms": [ "windows", @@ -10550,7 +10588,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10560,7 +10598,7 @@ }, { "args": [ - "trailing_metadata" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -10571,7 +10609,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10581,7 +10619,7 @@ }, { "args": [ - "bad_hostname" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -10592,7 +10630,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10602,7 +10640,7 @@ }, { "args": [ - "binary_metadata" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -10613,7 +10651,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10623,18 +10661,18 @@ }, { "args": [ - "call_creds" + "simple_delayed_request" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10644,18 +10682,18 @@ }, { "args": [ - "cancel_after_accept" + "simple_metadata" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10665,18 +10703,18 @@ }, { "args": [ - "cancel_after_client_done" + "simple_request" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10686,18 +10724,18 @@ }, { "args": [ - "cancel_after_invoke" + "trailing_metadata" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10707,18 +10745,18 @@ }, { "args": [ - "cancel_before_invoke" + "bad_hostname" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10728,18 +10766,18 @@ }, { "args": [ - "cancel_in_a_vacuum" + "binary_metadata" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10749,18 +10787,18 @@ }, { "args": [ - "cancel_with_status" + "call_creds" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10770,7 +10808,7 @@ }, { "args": [ - "compressed_payload" + "cancel_after_accept" ], "ci_platforms": [ "windows", @@ -10781,7 +10819,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10791,18 +10829,18 @@ }, { "args": [ - "empty_batch" + "cancel_after_client_done" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10812,18 +10850,18 @@ }, { "args": [ - "filter_causes_close" + "cancel_after_invoke" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10833,7 +10871,7 @@ }, { "args": [ - "graceful_server_shutdown" + "cancel_before_invoke" ], "ci_platforms": [ "windows", @@ -10844,7 +10882,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10854,18 +10892,18 @@ }, { "args": [ - "high_initial_seqno" + "cancel_in_a_vacuum" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10875,18 +10913,18 @@ }, { "args": [ - "hpack_size" + "cancel_with_status" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10896,7 +10934,7 @@ }, { "args": [ - "idempotent_request" + "default_host" ], "ci_platforms": [ "windows", @@ -10907,7 +10945,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10917,7 +10955,7 @@ }, { "args": [ - "invoke_large_request" + "disappearing_server" ], "ci_platforms": [ "windows", @@ -10928,7 +10966,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10938,7 +10976,7 @@ }, { "args": [ - "large_metadata" + "empty_batch" ], "ci_platforms": [ "windows", @@ -10949,7 +10987,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10959,7 +10997,7 @@ }, { "args": [ - "max_concurrent_streams" + "filter_causes_close" ], "ci_platforms": [ "windows", @@ -10970,7 +11008,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10980,7 +11018,7 @@ }, { "args": [ - "max_message_length" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", @@ -10991,7 +11029,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11001,7 +11039,7 @@ }, { "args": [ - "negative_deadline" + "high_initial_seqno" ], "ci_platforms": [ "windows", @@ -11012,7 +11050,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11022,7 +11060,7 @@ }, { "args": [ - "no_op" + "idempotent_request" ], "ci_platforms": [ "windows", @@ -11033,7 +11071,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11043,18 +11081,18 @@ }, { "args": [ - "payload" + "invoke_large_request" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11064,7 +11102,7 @@ }, { "args": [ - "ping_pong_streaming" + "large_metadata" ], "ci_platforms": [ "windows", @@ -11075,7 +11113,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11085,18 +11123,18 @@ }, { "args": [ - "registered_call" + "max_message_length" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11106,7 +11144,7 @@ }, { "args": [ - "request_with_flags" + "negative_deadline" ], "ci_platforms": [ "windows", @@ -11117,7 +11155,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11127,7 +11165,7 @@ }, { "args": [ - "request_with_payload" + "no_op" ], "ci_platforms": [ "windows", @@ -11138,7 +11176,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11148,18 +11186,18 @@ }, { "args": [ - "server_finishes_request" + "payload" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11169,7 +11207,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -11180,7 +11218,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11190,7 +11228,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "registered_call" ], "ci_platforms": [ "windows", @@ -11201,7 +11239,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11211,7 +11249,7 @@ }, { "args": [ - "simple_metadata" + "request_with_payload" ], "ci_platforms": [ "windows", @@ -11222,7 +11260,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11232,7 +11270,7 @@ }, { "args": [ - "simple_request" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -11243,7 +11281,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11253,7 +11291,7 @@ }, { "args": [ - "trailing_metadata" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -11264,7 +11302,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11274,7 +11312,7 @@ }, { "args": [ - "bad_hostname" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -11285,7 +11323,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11295,18 +11333,18 @@ }, { "args": [ - "binary_metadata" + "simple_delayed_request" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11316,7 +11354,7 @@ }, { "args": [ - "call_creds" + "simple_metadata" ], "ci_platforms": [ "windows", @@ -11327,7 +11365,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11337,18 +11375,18 @@ }, { "args": [ - "cancel_after_accept" + "simple_request" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11358,18 +11396,18 @@ }, { "args": [ - "cancel_after_client_done" + "trailing_metadata" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -11379,18 +11417,18 @@ }, { "args": [ - "cancel_after_invoke" + "bad_hostname" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11400,18 +11438,18 @@ }, { "args": [ - "cancel_before_invoke" + "binary_metadata" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11421,18 +11459,18 @@ }, { "args": [ - "cancel_in_a_vacuum" + "call_creds" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11442,7 +11480,7 @@ }, { "args": [ - "cancel_with_status" + "cancel_after_accept" ], "ci_platforms": [ "windows", @@ -11453,7 +11491,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11463,7 +11501,7 @@ }, { "args": [ - "compressed_payload" + "cancel_after_client_done" ], "ci_platforms": [ "windows", @@ -11474,7 +11512,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11484,18 +11522,18 @@ }, { "args": [ - "empty_batch" + "cancel_after_invoke" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11505,18 +11543,18 @@ }, { "args": [ - "filter_causes_close" + "cancel_before_invoke" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11526,7 +11564,7 @@ }, { "args": [ - "graceful_server_shutdown" + "cancel_in_a_vacuum" ], "ci_platforms": [ "windows", @@ -11537,7 +11575,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11547,18 +11585,18 @@ }, { "args": [ - "high_initial_seqno" + "cancel_with_status" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11568,18 +11606,18 @@ }, { "args": [ - "idempotent_request" + "compressed_payload" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11589,7 +11627,7 @@ }, { "args": [ - "invoke_large_request" + "empty_batch" ], "ci_platforms": [ "windows", @@ -11600,7 +11638,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11610,7 +11648,7 @@ }, { "args": [ - "large_metadata" + "filter_causes_close" ], "ci_platforms": [ "windows", @@ -11621,7 +11659,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11631,18 +11669,18 @@ }, { "args": [ - "max_concurrent_streams" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11652,18 +11690,18 @@ }, { "args": [ - "max_message_length" + "high_initial_seqno" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11673,7 +11711,7 @@ }, { "args": [ - "negative_deadline" + "hpack_size" ], "ci_platforms": [ "windows", @@ -11684,7 +11722,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11694,7 +11732,7 @@ }, { "args": [ - "no_op" + "idempotent_request" ], "ci_platforms": [ "windows", @@ -11705,7 +11743,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11715,18 +11753,18 @@ }, { "args": [ - "payload" + "invoke_large_request" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11736,7 +11774,7 @@ }, { "args": [ - "ping_pong_streaming" + "large_metadata" ], "ci_platforms": [ "windows", @@ -11747,7 +11785,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11757,7 +11795,7 @@ }, { "args": [ - "registered_call" + "max_concurrent_streams" ], "ci_platforms": [ "windows", @@ -11768,7 +11806,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11778,18 +11816,18 @@ }, { "args": [ - "request_with_flags" + "max_message_length" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11799,7 +11837,7 @@ }, { "args": [ - "request_with_payload" + "negative_deadline" ], "ci_platforms": [ "windows", @@ -11810,7 +11848,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11820,7 +11858,7 @@ }, { "args": [ - "server_finishes_request" + "no_op" ], "ci_platforms": [ "windows", @@ -11831,7 +11869,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11841,18 +11879,18 @@ }, { "args": [ - "shutdown_finishes_calls" + "payload" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11862,7 +11900,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -11873,7 +11911,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11883,7 +11921,7 @@ }, { "args": [ - "simple_metadata" + "registered_call" ], "ci_platforms": [ "windows", @@ -11894,7 +11932,133 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11915,7 +12079,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11936,7 +12100,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11957,7 +12121,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11978,7 +12142,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11999,7 +12163,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12020,7 +12184,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12041,7 +12205,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12062,7 +12226,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12083,7 +12247,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12104,7 +12268,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12125,7 +12289,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12146,7 +12310,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12167,7 +12331,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12188,7 +12352,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12209,7 +12373,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12230,28 +12394,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12272,7 +12415,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12293,7 +12436,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12314,7 +12457,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12335,7 +12478,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12356,7 +12499,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12377,7 +12520,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12398,7 +12541,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12419,7 +12562,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12440,7 +12583,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12461,7 +12604,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12482,7 +12625,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12503,7 +12646,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12524,7 +12667,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12545,7 +12688,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12566,7 +12709,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12587,7 +12730,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12608,7 +12751,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12629,7 +12772,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12644,14 +12787,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12666,14 +12808,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12688,14 +12829,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12710,14 +12850,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12732,14 +12871,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12754,14 +12892,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12776,14 +12913,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12798,14 +12934,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12820,14 +12955,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12842,14 +12976,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12859,19 +12992,18 @@ }, { "args": [ - "connectivity" + "empty_batch" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12881,85 +13013,18 @@ }, { "args": [ - "default_host" + "filter_causes_close" ], "ci_platforms": [ "windows", "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "empty_batch" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "filter_causes_close" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12974,14 +13039,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12996,14 +13060,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13018,14 +13081,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13040,14 +13102,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13062,14 +13123,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13084,14 +13144,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13106,14 +13165,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13128,14 +13186,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13150,14 +13207,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13172,14 +13228,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13194,36 +13249,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13238,14 +13270,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13260,14 +13291,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13282,14 +13312,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13304,14 +13333,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13326,14 +13354,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13348,14 +13375,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13370,36 +13396,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13414,14 +13417,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13436,14 +13438,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13458,14 +13459,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -13487,7 +13487,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13509,7 +13509,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13531,7 +13531,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13553,7 +13553,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13575,7 +13575,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13597,7 +13597,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13619,7 +13619,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13641,7 +13641,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13663,7 +13663,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13685,7 +13685,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13707,7 +13707,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13729,7 +13729,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13751,7 +13751,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13773,7 +13773,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13795,7 +13795,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13817,7 +13817,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13839,7 +13839,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13861,7 +13861,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13883,7 +13883,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13905,7 +13905,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13927,7 +13927,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13949,7 +13949,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13971,7 +13971,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13993,7 +13993,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -14015,7 +14015,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -14037,7 +14037,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -14059,7 +14059,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -14081,7 +14081,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -14103,7 +14103,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -14125,7 +14125,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -14147,7 +14147,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -14169,7 +14169,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -14191,7 +14191,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -14213,7 +14213,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -14235,7 +14235,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -14257,7 +14257,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -14279,7 +14279,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -14301,7 +14301,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -14316,13 +14316,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14337,13 +14338,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14358,13 +14360,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14379,13 +14382,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14400,13 +14404,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14421,13 +14426,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14442,13 +14448,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14463,13 +14470,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14484,13 +14492,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14500,18 +14509,19 @@ }, { "args": [ - "default_host" + "compressed_payload" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14521,18 +14531,19 @@ }, { "args": [ - "disappearing_server" + "connectivity" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14542,18 +14553,19 @@ }, { "args": [ - "empty_batch" + "default_host" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14563,18 +14575,19 @@ }, { "args": [ - "filter_causes_close" + "disappearing_server" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14584,18 +14597,19 @@ }, { "args": [ - "graceful_server_shutdown" + "empty_batch" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14605,18 +14619,19 @@ }, { "args": [ - "high_initial_seqno" + "filter_causes_close" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14626,18 +14641,19 @@ }, { "args": [ - "idempotent_request" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14647,18 +14663,19 @@ }, { "args": [ - "invoke_large_request" + "high_initial_seqno" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14668,18 +14685,19 @@ }, { "args": [ - "large_metadata" + "hpack_size" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14689,18 +14707,19 @@ }, { "args": [ - "max_message_length" + "idempotent_request" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14710,18 +14729,19 @@ }, { "args": [ - "negative_deadline" + "invoke_large_request" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14731,18 +14751,19 @@ }, { "args": [ - "no_op" + "large_metadata" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14752,18 +14773,19 @@ }, { "args": [ - "payload" + "max_concurrent_streams" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14773,18 +14795,19 @@ }, { "args": [ - "ping_pong_streaming" + "max_message_length" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14794,18 +14817,19 @@ }, { "args": [ - "registered_call" + "negative_deadline" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14815,18 +14839,19 @@ }, { "args": [ - "request_with_payload" + "no_op" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14836,18 +14861,19 @@ }, { "args": [ - "server_finishes_request" + "payload" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14857,18 +14883,19 @@ }, { "args": [ - "shutdown_finishes_calls" + "ping" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14878,18 +14905,19 @@ }, { "args": [ - "shutdown_finishes_tags" + "ping_pong_streaming" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14899,18 +14927,19 @@ }, { "args": [ - "simple_delayed_request" + "registered_call" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14920,18 +14949,19 @@ }, { "args": [ - "simple_metadata" + "request_with_flags" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14941,18 +14971,19 @@ }, { "args": [ - "simple_request" + "request_with_payload" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14962,18 +14993,19 @@ }, { "args": [ - "trailing_metadata" + "server_finishes_request" ], "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14983,9 +15015,10 @@ }, { "args": [ - "bad_hostname" + "shutdown_finishes_calls" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -14994,8 +15027,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_cert_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15003,9 +15037,10 @@ }, { "args": [ - "binary_metadata" + "shutdown_finishes_tags" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -15014,8 +15049,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_cert_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15023,19 +15059,21 @@ }, { "args": [ - "call_creds" + "simple_delayed_request" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_cert_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15043,19 +15081,21 @@ }, { "args": [ - "cancel_after_accept" + "simple_metadata" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_cert_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15063,19 +15103,21 @@ }, { "args": [ - "cancel_after_client_done" + "simple_request" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_cert_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15083,19 +15125,21 @@ }, { "args": [ - "cancel_after_invoke" + "trailing_metadata" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_cert_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15103,19 +15147,20 @@ }, { "args": [ - "cancel_before_invoke" + "bad_hostname" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15123,19 +15168,20 @@ }, { "args": [ - "cancel_in_a_vacuum" + "binary_metadata" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15143,19 +15189,20 @@ }, { "args": [ - "cancel_with_status" + "call_creds" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15163,19 +15210,20 @@ }, { "args": [ - "compressed_payload" + "cancel_after_accept" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15183,19 +15231,20 @@ }, { "args": [ - "connectivity" + "cancel_after_client_done" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15203,19 +15252,20 @@ }, { "args": [ - "disappearing_server" + "cancel_after_invoke" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15223,19 +15273,20 @@ }, { "args": [ - "empty_batch" + "cancel_before_invoke" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15243,19 +15294,20 @@ }, { "args": [ - "filter_causes_close" + "cancel_in_a_vacuum" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15263,19 +15315,20 @@ }, { "args": [ - "graceful_server_shutdown" + "cancel_with_status" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15283,19 +15336,20 @@ }, { "args": [ - "high_initial_seqno" + "default_host" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15303,19 +15357,20 @@ }, { "args": [ - "hpack_size" + "disappearing_server" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15323,19 +15378,20 @@ }, { "args": [ - "idempotent_request" + "empty_batch" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15343,19 +15399,20 @@ }, { "args": [ - "invoke_large_request" + "filter_causes_close" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15363,19 +15420,20 @@ }, { "args": [ - "large_metadata" + "graceful_server_shutdown" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15383,19 +15441,20 @@ }, { "args": [ - "max_concurrent_streams" + "high_initial_seqno" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15403,19 +15462,20 @@ }, { "args": [ - "max_message_length" + "idempotent_request" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15423,19 +15483,20 @@ }, { "args": [ - "negative_deadline" + "invoke_large_request" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15443,19 +15504,20 @@ }, { "args": [ - "no_op" + "large_metadata" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15463,19 +15525,20 @@ }, { "args": [ - "payload" + "max_message_length" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15483,19 +15546,20 @@ }, { "args": [ - "ping" + "negative_deadline" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15503,19 +15567,20 @@ }, { "args": [ - "ping_pong_streaming" + "no_op" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15523,19 +15588,41 @@ }, { "args": [ - "registered_call" + "payload" ], "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows", "linux", "mac", "posix" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15543,19 +15630,20 @@ }, { "args": [ - "request_with_flags" + "registered_call" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15566,16 +15654,17 @@ "request_with_payload" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15586,16 +15675,17 @@ "server_finishes_request" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15606,16 +15696,17 @@ "shutdown_finishes_calls" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15626,16 +15717,17 @@ "shutdown_finishes_tags" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15646,16 +15738,17 @@ "simple_delayed_request" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15666,16 +15759,17 @@ "simple_metadata" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15686,16 +15780,17 @@ "simple_request" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15706,16 +15801,17 @@ "trailing_metadata" ], "ci_platforms": [ + "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_ssl_proxy_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15726,7 +15822,6 @@ "bad_hostname" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15735,9 +15830,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15748,7 +15842,6 @@ "binary_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15757,9 +15850,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15767,21 +15859,19 @@ }, { "args": [ - "cancel_after_accept" + "call_creds" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15789,10 +15879,9 @@ }, { "args": [ - "cancel_after_client_done" + "cancel_after_accept" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15801,9 +15890,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15811,10 +15899,9 @@ }, { "args": [ - "cancel_after_invoke" + "cancel_after_client_done" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15823,9 +15910,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15833,10 +15919,9 @@ }, { "args": [ - "cancel_before_invoke" + "cancel_after_invoke" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15845,9 +15930,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15855,10 +15939,9 @@ }, { "args": [ - "cancel_in_a_vacuum" + "cancel_before_invoke" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15867,9 +15950,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15877,10 +15959,9 @@ }, { "args": [ - "cancel_with_status" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15889,9 +15970,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15899,10 +15979,9 @@ }, { "args": [ - "compressed_payload" + "cancel_with_status" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15911,9 +15990,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15921,10 +15999,9 @@ }, { "args": [ - "connectivity" + "compressed_payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15933,9 +16010,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15943,21 +16019,19 @@ }, { "args": [ - "default_host" + "connectivity" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15968,7 +16042,6 @@ "disappearing_server" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15977,9 +16050,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15990,7 +16062,6 @@ "empty_batch" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -15999,9 +16070,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16012,7 +16082,6 @@ "filter_causes_close" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16021,9 +16090,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16034,7 +16102,6 @@ "graceful_server_shutdown" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16043,9 +16110,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16056,7 +16122,6 @@ "high_initial_seqno" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16065,9 +16130,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16078,7 +16142,6 @@ "hpack_size" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16087,9 +16150,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16100,7 +16162,6 @@ "idempotent_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16109,9 +16170,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16122,7 +16182,6 @@ "invoke_large_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16131,9 +16190,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16144,7 +16202,6 @@ "large_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16153,9 +16210,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16166,7 +16222,6 @@ "max_concurrent_streams" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16175,9 +16230,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16188,7 +16242,6 @@ "max_message_length" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16197,9 +16250,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16210,7 +16262,6 @@ "negative_deadline" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16219,9 +16270,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16232,7 +16282,6 @@ "no_op" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16241,9 +16290,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16254,7 +16302,6 @@ "payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16263,9 +16310,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16276,7 +16322,6 @@ "ping" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16285,9 +16330,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16298,7 +16342,6 @@ "ping_pong_streaming" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16307,9 +16350,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16320,7 +16362,6 @@ "registered_call" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16329,9 +16370,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16342,7 +16382,6 @@ "request_with_flags" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16351,9 +16390,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16364,7 +16402,6 @@ "request_with_payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16373,9 +16410,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16386,7 +16422,6 @@ "server_finishes_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16395,9 +16430,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16408,7 +16442,6 @@ "shutdown_finishes_calls" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16417,9 +16450,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16430,7 +16462,6 @@ "shutdown_finishes_tags" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16439,9 +16470,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16452,7 +16482,6 @@ "simple_delayed_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16461,9 +16490,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16474,7 +16502,6 @@ "simple_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16483,9 +16510,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16496,7 +16522,6 @@ "simple_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16505,9 +16530,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16518,7 +16542,6 @@ "trailing_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16527,9 +16550,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -16549,7 +16571,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -16571,7 +16593,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -16593,7 +16615,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -16615,7 +16637,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -16637,7 +16659,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -16659,7 +16681,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -16681,7 +16703,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -16703,7 +16725,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -16725,7 +16747,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -16747,7 +16769,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -16769,7 +16791,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -16791,7 +16813,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -16813,7 +16835,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -16835,7 +16857,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -16857,7 +16879,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -16879,7 +16901,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -16901,7 +16923,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -16923,7 +16945,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -16945,7 +16967,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -16967,7 +16989,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -16989,7 +17011,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -17011,7 +17033,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -17033,7 +17055,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -17055,7 +17077,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -17077,7 +17099,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -17099,7 +17121,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -17121,7 +17143,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -17143,7 +17165,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -17165,7 +17187,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -17187,7 +17209,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -17209,7 +17231,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -17231,7 +17253,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -17253,7 +17275,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -17275,7 +17297,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -17297,7 +17319,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -17319,7 +17341,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -17341,7 +17363,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_census_nosec_test", "platforms": [ "windows", "linux", @@ -17363,7 +17385,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17385,7 +17407,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17407,7 +17429,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17429,7 +17451,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17451,7 +17473,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17473,7 +17495,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17495,7 +17517,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17517,7 +17539,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17539,7 +17561,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17561,7 +17583,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17583,7 +17605,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17605,7 +17627,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17627,7 +17649,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17649,7 +17671,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17671,7 +17693,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17693,7 +17715,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17715,7 +17737,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17737,7 +17759,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17759,7 +17781,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17781,7 +17803,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17803,7 +17825,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17825,7 +17847,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17847,7 +17869,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17869,7 +17891,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17891,7 +17913,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17913,7 +17935,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17935,7 +17957,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17957,7 +17979,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17979,7 +18001,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -18001,7 +18023,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -18023,7 +18045,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -18045,7 +18067,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -18067,7 +18089,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -18089,7 +18111,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -18111,7 +18133,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -18133,7 +18155,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -18155,7 +18177,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -18168,15 +18190,21 @@ "bad_hostname" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18184,15 +18212,21 @@ "binary_metadata" ], "ci_platforms": [ - "linux" - ], + "windows", + "linux", + "mac", + "posix" + ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18200,15 +18234,21 @@ "cancel_after_accept" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18216,15 +18256,21 @@ "cancel_after_client_done" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18232,15 +18278,21 @@ "cancel_after_invoke" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18248,15 +18300,21 @@ "cancel_before_invoke" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18264,15 +18322,21 @@ "cancel_in_a_vacuum" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18280,15 +18344,21 @@ "cancel_with_status" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18296,15 +18366,21 @@ "compressed_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18312,15 +18388,21 @@ "connectivity" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18328,15 +18410,21 @@ "default_host" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18344,15 +18432,21 @@ "disappearing_server" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18360,15 +18454,21 @@ "empty_batch" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18376,15 +18476,21 @@ "filter_causes_close" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18392,15 +18498,21 @@ "graceful_server_shutdown" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18408,15 +18520,21 @@ "high_initial_seqno" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18424,15 +18542,21 @@ "hpack_size" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18440,15 +18564,21 @@ "idempotent_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18456,15 +18586,21 @@ "invoke_large_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18472,15 +18608,21 @@ "large_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18488,15 +18630,1405 @@ "max_concurrent_streams" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "filter_causes_close" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "idempotent_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_causes_close" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "idempotent_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18504,15 +20036,21 @@ "max_message_length" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18520,15 +20058,21 @@ "negative_deadline" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18536,15 +20080,21 @@ "no_op" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18552,15 +20102,21 @@ "payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18568,15 +20124,21 @@ "ping" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18584,15 +20146,21 @@ "ping_pong_streaming" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18600,15 +20168,21 @@ "registered_call" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18616,15 +20190,21 @@ "request_with_flags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18632,15 +20212,21 @@ "request_with_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18648,15 +20234,21 @@ "server_finishes_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18664,15 +20256,21 @@ "shutdown_finishes_calls" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18680,15 +20278,21 @@ "shutdown_finishes_tags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18696,15 +20300,21 @@ "simple_delayed_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18712,15 +20322,21 @@ "simple_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18728,15 +20344,21 @@ "simple_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18744,15 +20366,21 @@ "trailing_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_nosec_test", + "name": "h2_full+trace_nosec_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -18769,7 +20397,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -18791,7 +20419,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -18813,7 +20441,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -18835,7 +20463,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -18857,7 +20485,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -18879,7 +20507,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -18901,7 +20529,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -18923,7 +20551,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -18945,7 +20573,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -18967,7 +20595,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -18989,7 +20617,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19011,7 +20639,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19033,7 +20661,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19055,7 +20683,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19077,7 +20705,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19099,7 +20727,29 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19121,7 +20771,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19143,7 +20793,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19165,7 +20815,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19187,7 +20837,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19209,7 +20859,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19231,7 +20881,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19253,7 +20903,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19275,7 +20925,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19297,7 +20947,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19319,7 +20969,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19341,7 +20991,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19363,7 +21013,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19385,7 +21035,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19407,7 +21057,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19429,7 +21079,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19451,7 +21101,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19473,7 +21123,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19495,7 +21145,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19517,7 +21167,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", @@ -19539,7 +21189,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_nosec_test", + "name": "h2_loadreporting_nosec_test", "platforms": [ "windows", "linux", diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index bdae4475456..34251cb7499 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -1203,6 +1203,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_full+trace_test", "vcxpr {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_loadreporting_test", "vcxproj\test/end2end/fixtures\h2_loadreporting_test\h2_loadreporting_test.vcxproj", "{B107130E-EA33-C114-9CB6-78A18C929F64}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {1F1F9084-2A93-B80E-364F-5754894AFAB4} = {1F1F9084-2A93-B80E-364F-5754894AFAB4} + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_oauth2_test", "vcxproj\test/end2end/fixtures\h2_oauth2_test\h2_oauth2_test.vcxproj", "{0F761FF3-342A-C429-711F-F76181BAA52D}" ProjectSection(myProperties) = preProject lib = "False" @@ -1347,6 +1359,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_full+trace_nosec_test", {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_loadreporting_nosec_test", "vcxproj\test/end2end/fixtures\h2_loadreporting_nosec_test\h2_loadreporting_nosec_test.vcxproj", "{679EA55C-7399-53E8-79F0-82FBDB3DDE07}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} = {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_proxy_nosec_test", "vcxproj\test/end2end/fixtures\h2_proxy_nosec_test\h2_proxy_nosec_test.vcxproj", "{6EC72045-98CB-8A8D-9788-BC94209E23C8}" ProjectSection(myProperties) = preProject lib = "False" @@ -3231,6 +3255,22 @@ Global {16C713C6-062E-F71F-A44C-52DC35494B27}.Release-DLL|Win32.Build.0 = Release|Win32 {16C713C6-062E-F71F-A44C-52DC35494B27}.Release-DLL|x64.ActiveCfg = Release|x64 {16C713C6-062E-F71F-A44C-52DC35494B27}.Release-DLL|x64.Build.0 = Release|x64 + {B107130E-EA33-C114-9CB6-78A18C929F64}.Debug|Win32.ActiveCfg = Debug|Win32 + {B107130E-EA33-C114-9CB6-78A18C929F64}.Debug|x64.ActiveCfg = Debug|x64 + {B107130E-EA33-C114-9CB6-78A18C929F64}.Release|Win32.ActiveCfg = Release|Win32 + {B107130E-EA33-C114-9CB6-78A18C929F64}.Release|x64.ActiveCfg = Release|x64 + {B107130E-EA33-C114-9CB6-78A18C929F64}.Debug|Win32.Build.0 = Debug|Win32 + {B107130E-EA33-C114-9CB6-78A18C929F64}.Debug|x64.Build.0 = Debug|x64 + {B107130E-EA33-C114-9CB6-78A18C929F64}.Release|Win32.Build.0 = Release|Win32 + {B107130E-EA33-C114-9CB6-78A18C929F64}.Release|x64.Build.0 = Release|x64 + {B107130E-EA33-C114-9CB6-78A18C929F64}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {B107130E-EA33-C114-9CB6-78A18C929F64}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {B107130E-EA33-C114-9CB6-78A18C929F64}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {B107130E-EA33-C114-9CB6-78A18C929F64}.Debug-DLL|x64.Build.0 = Debug|x64 + {B107130E-EA33-C114-9CB6-78A18C929F64}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {B107130E-EA33-C114-9CB6-78A18C929F64}.Release-DLL|Win32.Build.0 = Release|Win32 + {B107130E-EA33-C114-9CB6-78A18C929F64}.Release-DLL|x64.ActiveCfg = Release|x64 + {B107130E-EA33-C114-9CB6-78A18C929F64}.Release-DLL|x64.Build.0 = Release|x64 {0F761FF3-342A-C429-711F-F76181BAA52D}.Debug|Win32.ActiveCfg = Debug|Win32 {0F761FF3-342A-C429-711F-F76181BAA52D}.Debug|x64.ActiveCfg = Debug|x64 {0F761FF3-342A-C429-711F-F76181BAA52D}.Release|Win32.ActiveCfg = Release|Win32 @@ -3423,6 +3463,22 @@ Global {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Release-DLL|Win32.Build.0 = Release|Win32 {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Release-DLL|x64.ActiveCfg = Release|x64 {DFD51943-4906-8051-7D66-6A7D50E0D87E}.Release-DLL|x64.Build.0 = Release|x64 + {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Debug|Win32.ActiveCfg = Debug|Win32 + {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Debug|x64.ActiveCfg = Debug|x64 + {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Release|Win32.ActiveCfg = Release|Win32 + {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Release|x64.ActiveCfg = Release|x64 + {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Debug|Win32.Build.0 = Debug|Win32 + {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Debug|x64.Build.0 = Debug|x64 + {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Release|Win32.Build.0 = Release|Win32 + {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Release|x64.Build.0 = Release|x64 + {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Debug-DLL|x64.Build.0 = Debug|x64 + {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Release-DLL|Win32.Build.0 = Release|Win32 + {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Release-DLL|x64.ActiveCfg = Release|x64 + {679EA55C-7399-53E8-79F0-82FBDB3DDE07}.Release-DLL|x64.Build.0 = Release|x64 {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Debug|Win32.ActiveCfg = Debug|Win32 {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Debug|x64.ActiveCfg = Debug|x64 {6EC72045-98CB-8A8D-9788-BC94209E23C8}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 26050dcf74e..7f1a3727b61 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -396,6 +396,8 @@ + + @@ -666,6 +668,10 @@ + + + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index a4acf513bc1..95409536b14 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -385,6 +385,12 @@ src\core\ext\resolver\sockaddr + + src\core\ext\load_reporting + + + src\core\ext\load_reporting + src\core\ext\lb_policy\grpclb @@ -848,6 +854,12 @@ src\core\ext\client_config + + src\core\ext\load_reporting + + + src\core\ext\load_reporting + src\core\ext\lb_policy\grpclb @@ -938,6 +950,9 @@ {e5fc1091-5d60-404f-775b-686ef4b3266f} + + {2d6e3879-24c7-06e2-b415-40ab18a3b918} + {88c78e27-267a-95df-07c5-50e5fbc2f40c} diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_nosec_test/h2_loadreporting_nosec_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_nosec_test/h2_loadreporting_nosec_test.vcxproj new file mode 100644 index 00000000000..6a6ac5ebf14 --- /dev/null +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_nosec_test/h2_loadreporting_nosec_test.vcxproj @@ -0,0 +1,202 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {679EA55C-7399-53E8-79F0-82FBDB3DDE07} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_loadreporting_nosec_test + static + Debug + static + Debug + + + h2_loadreporting_nosec_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {47C2CB41-4E9F-58B6-F606-F6FAED5D00ED} + + + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + + + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_nosec_test/h2_loadreporting_nosec_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_nosec_test/h2_loadreporting_nosec_test.vcxproj.filters new file mode 100644 index 00000000000..4ed1bb0c457 --- /dev/null +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_nosec_test/h2_loadreporting_nosec_test.vcxproj.filters @@ -0,0 +1,24 @@ + + + + + test\core\end2end\fixtures + + + + + + {8adc89fb-e447-77bc-c462-3dba6abcf344} + + + {3c2c01f5-2a18-1bee-6ee0-217d415e2a95} + + + {3efa0f41-5802-6a8e-36ee-f246a201a1a5} + + + {366eb24f-49e9-d57f-e20f-729d1e0fb892} + + + + diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_test/h2_loadreporting_test.vcxproj b/vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_test/h2_loadreporting_test.vcxproj new file mode 100644 index 00000000000..20765487bcb --- /dev/null +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_test/h2_loadreporting_test.vcxproj @@ -0,0 +1,202 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B107130E-EA33-C114-9CB6-78A18C929F64} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + h2_loadreporting_test + static + Debug + static + Debug + + + h2_loadreporting_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {1F1F9084-2A93-B80E-364F-5754894AFAB4} + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_test/h2_loadreporting_test.vcxproj.filters b/vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_test/h2_loadreporting_test.vcxproj.filters new file mode 100644 index 00000000000..afe54329ad3 --- /dev/null +++ b/vsprojects/vcxproj/test/end2end/fixtures/h2_loadreporting_test/h2_loadreporting_test.vcxproj.filters @@ -0,0 +1,24 @@ + + + + + test\core\end2end\fixtures + + + + + + {8f73760a-74dc-05ef-65e1-fa8c44ccf918} + + + {a280079e-b626-333e-0636-8fe6eb788ca1} + + + {c1aa73d6-503a-06c0-42b2-0793a4805e96} + + + {3e738e89-dc27-f929-cc8f-1aa94c24345b} + + + + From ebbbce3e6e6f08a9d35292296cbd066b0a4c4a67 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Mon, 2 May 2016 09:54:04 -0700 Subject: [PATCH 0184/1894] Changed writing code to honor the peer's header size limit setting. Changed large_metadata test to only cover the case where both the client and server support large metadata; I will cover the other cases in separate tests in a subsequent commit. --- .../chttp2/transport/chttp2_transport.c | 85 ++++++++++++------- test/core/end2end/tests/large_metadata.c | 35 +++----- 2 files changed, 70 insertions(+), 50 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 63147865257..1eaffc66920 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -854,24 +854,37 @@ static void perform_stream_op_locked( stream_global->send_initial_metadata_finished = add_closure_barrier(on_complete); stream_global->send_initial_metadata = op->send_initial_metadata; - if (contains_non_ok_status(transport_global, op->send_initial_metadata)) { - stream_global->seen_error = true; - grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); - } - if (!stream_global->write_closed) { - if (transport_global->is_client) { - GPR_ASSERT(stream_global->id == 0); - grpc_chttp2_list_add_waiting_for_concurrency(transport_global, - stream_global); - maybe_start_some_streams(exec_ctx, transport_global); + const size_t metadata_size = grpc_metadata_batch_size( + op->send_initial_metadata); + const size_t metadata_peer_limit = + transport_global->settings[GRPC_PEER_SETTINGS] + [GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE]; + if (metadata_size > metadata_peer_limit) { + gpr_log(GPR_DEBUG, + "initial metadata size exceeds peer limit (%lu vs. %lu)", + metadata_size, metadata_peer_limit); + cancel_from_api(exec_ctx, transport_global, stream_global, + GRPC_STATUS_RESOURCE_EXHAUSTED); + } else { + if (contains_non_ok_status(transport_global, op->send_initial_metadata)) { + stream_global->seen_error = true; + grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); + } + if (!stream_global->write_closed) { + if (transport_global->is_client) { + GPR_ASSERT(stream_global->id == 0); + grpc_chttp2_list_add_waiting_for_concurrency(transport_global, + stream_global); + maybe_start_some_streams(exec_ctx, transport_global); + } else { + GPR_ASSERT(stream_global->id != 0); + grpc_chttp2_become_writable(transport_global, stream_global); + } } else { - GPR_ASSERT(stream_global->id != 0); - grpc_chttp2_become_writable(transport_global, stream_global); + grpc_chttp2_complete_closure_step( + exec_ctx, stream_global, + &stream_global->send_initial_metadata_finished, 0); } - } else { - grpc_chttp2_complete_closure_step( - exec_ctx, stream_global, - &stream_global->send_initial_metadata_finished, 0); } } @@ -895,19 +908,33 @@ static void perform_stream_op_locked( stream_global->send_trailing_metadata_finished = add_closure_barrier(on_complete); stream_global->send_trailing_metadata = op->send_trailing_metadata; - if (contains_non_ok_status(transport_global, op->send_trailing_metadata)) { - stream_global->seen_error = true; - grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); - } - if (stream_global->write_closed) { - grpc_chttp2_complete_closure_step( - exec_ctx, stream_global, - &stream_global->send_trailing_metadata_finished, - grpc_metadata_batch_is_empty(op->send_trailing_metadata)); - } else if (stream_global->id != 0) { - /* TODO(ctiller): check if there's flow control for any outstanding - bytes before going writable */ - grpc_chttp2_become_writable(transport_global, stream_global); + const size_t metadata_size = grpc_metadata_batch_size( + op->send_trailing_metadata); + const size_t metadata_peer_limit = + transport_global->settings[GRPC_PEER_SETTINGS] + [GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE]; + if (metadata_size > metadata_peer_limit) { + gpr_log(GPR_DEBUG, + "trailing metadata size exceeds peer limit (%lu vs. %lu)", + metadata_size, metadata_peer_limit); + cancel_from_api(exec_ctx, transport_global, stream_global, + GRPC_STATUS_RESOURCE_EXHAUSTED); + } else { + if (contains_non_ok_status(transport_global, + op->send_trailing_metadata)) { + stream_global->seen_error = true; + grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); + } + if (stream_global->write_closed) { + grpc_chttp2_complete_closure_step( + exec_ctx, stream_global, + &stream_global->send_trailing_metadata_finished, + grpc_metadata_batch_is_empty(op->send_trailing_metadata)); + } else if (stream_global->id != 0) { + /* TODO(ctiller): check if there's flow control for any outstanding + bytes before going writable */ + grpc_chttp2_become_writable(transport_global, stream_global); + } } } diff --git a/test/core/end2end/tests/large_metadata.c b/test/core/end2end/tests/large_metadata.c index 2aa6381e9e2..b78d5b8292c 100644 --- a/test/core/end2end/tests/large_metadata.c +++ b/test/core/end2end/tests/large_metadata.c @@ -97,9 +97,8 @@ static void end_test(grpc_end2end_test_fixture *f) { grpc_completion_queue_destroy(f->cq); } -/* Request with a large amount of metadata.*/ -static void test_request_with_large_metadata(grpc_end2end_test_config config, - int allow_large_metadata) { +/* Request with a large amount of metadata. */ +static void test_request_with_large_metadata(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); @@ -107,16 +106,12 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config, grpc_raw_byte_buffer_create(&request_payload_slice, 1); gpr_timespec deadline = five_seconds_time(); grpc_metadata meta; - const char *test_name = allow_large_metadata - ? "test_request_with_large_metadata_allowed" - : "test_request_with_large_metadata_not_allowed"; const size_t large_size = 64 * 1024; grpc_arg arg = { GRPC_ARG_INTEGER, GRPC_ARG_MAX_METADATA_SIZE, { .integer=(int)large_size + 1024 } }; grpc_channel_args args = { 1, &arg }; - grpc_channel_args* use_args = allow_large_metadata ? &args : NULL; grpc_end2end_test_fixture f = begin_test( - config, test_name, use_args, use_args); + config, "test_request_with_large_metadata", &args, &args); cq_verifier *cqv = cq_verifier_create(f.cq); grpc_op ops[6]; grpc_op *op; @@ -146,6 +141,7 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config, grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + /* Client: send request. */ op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 1; @@ -182,9 +178,11 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config, 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), 1); cq_verify(cqv); + /* Server: send initial metadata and receive request. */ op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -199,9 +197,11 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config, error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL); GPR_ASSERT(GRPC_CALL_OK == error); - cq_expect_completion(cqv, tag(102), allow_large_metadata); + cq_expect_completion(cqv, tag(102), 1); cq_verify(cqv); + /* Server: receive close and send status. This should trigger + completion of request on client. */ op = ops; op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; op->data.recv_close_on_server.cancelled = &was_cancelled; @@ -222,19 +222,13 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config, cq_expect_completion(cqv, tag(1), 1); cq_verify(cqv); - GPR_ASSERT(status == (allow_large_metadata ? GRPC_STATUS_OK - : GRPC_STATUS_RESOURCE_EXHAUSTED)); + GPR_ASSERT(status == GRPC_STATUS_OK); + GPR_ASSERT(0 == strcmp(details, "xyz")); GPR_ASSERT(0 == strcmp(call_details.method, "/foo")); GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr")); GPR_ASSERT(was_cancelled == 0); - if (allow_large_metadata) { - GPR_ASSERT(0 == strcmp(details, "xyz")); - GPR_ASSERT(byte_buffer_eq_string(request_payload_recv, "hello world")); - GPR_ASSERT(contains_metadata(&request_metadata_recv, "key", meta.value)); - } else { - GPR_ASSERT(request_payload_recv == NULL); - GPR_ASSERT(!contains_metadata_key(&request_metadata_recv, "key")); - } + GPR_ASSERT(byte_buffer_eq_string(request_payload_recv, "hello world")); + GPR_ASSERT(contains_metadata(&request_metadata_recv, "key", meta.value)); gpr_free(details); grpc_metadata_array_destroy(&initial_metadata_recv); @@ -257,8 +251,7 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config, } void large_metadata(grpc_end2end_test_config config) { - test_request_with_large_metadata(config, 1); - test_request_with_large_metadata(config, 0); + test_request_with_large_metadata(config); } void large_metadata_pre_init(void) {} From 13d1abf4447e30b2cef2924656b73044cf40cf8c Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 2 May 2016 09:54:58 -0700 Subject: [PATCH 0185/1894] improve unary call response handler --- src/csharp/Grpc.Core/Internal/AsyncCall.cs | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/src/csharp/Grpc.Core/Internal/AsyncCall.cs b/src/csharp/Grpc.Core/Internal/AsyncCall.cs index 016e1b85878..fc3c4a2b2be 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCall.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCall.cs @@ -407,12 +407,15 @@ namespace Grpc.Core.Internal /// /// Handler for unary response completion. /// - private void HandleUnaryResponse(bool success, ClientSideStatus receivedStatus, byte[] receivedMessage, Metadata responseHeaders) + private void HandleUnaryResponse(bool sucess, ClientSideStatus receivedStatus, byte[] receivedMessage, Metadata responseHeaders) { + // NOTE: because this event is a result of batch containing GRPC_OP_RECV_STATUS_ON_CLIENT, + // success will be always set to true. + using (Profilers.ForCurrentThread().NewScope("AsyncCall.HandleUnaryResponse")) { TResponse msg = default(TResponse); - var deserializeException = success ? TryDeserialize(receivedMessage, out msg) : null; + var deserializeException = TryDeserialize(receivedMessage, out msg); lock (myLock) { @@ -425,14 +428,13 @@ namespace Grpc.Core.Internal finishedStatus = receivedStatus; ReleaseResourcesIfPossible(); - } responseHeadersTcs.SetResult(responseHeaders); var status = receivedStatus.Status; - if (!success || status.StatusCode != StatusCode.OK) + if (status.StatusCode != StatusCode.OK) { unaryResponseTcs.SetException(new RpcException(status)); return; @@ -447,6 +449,9 @@ namespace Grpc.Core.Internal /// private void HandleFinished(bool success, ClientSideStatus receivedStatus) { + // NOTE: because this event is a result of batch containing GRPC_OP_RECV_STATUS_ON_CLIENT, + // success will be always set to true. + lock (myLock) { finished = true; @@ -457,7 +462,7 @@ namespace Grpc.Core.Internal var status = receivedStatus.Status; - if (!success || status.StatusCode != StatusCode.OK) + if (status.StatusCode != StatusCode.OK) { streamingCallFinishedTcs.SetException(new RpcException(status)); return; From a4a627030eb34e8e2f068f1ab327810cd4c3354c Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 2 May 2016 09:55:18 -0700 Subject: [PATCH 0186/1894] add more tests --- .../Grpc.Core.Tests/Internal/AsyncCallTest.cs | 109 ++++++++++++++++-- 1 file changed, 98 insertions(+), 11 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs index 60530d32508..a678e4dafe1 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs @@ -64,28 +64,115 @@ namespace Grpc.Core.Internal.Tests } [Test] - public void AsyncUnary_CompletionSuccess() + public void AsyncUnary_CanBeStartedOnlyOnce() + { + asyncCall.UnaryCallAsync("request1"); + Assert.Throws(typeof(InvalidOperationException), + () => asyncCall.UnaryCallAsync("abc")); + } + + [Test] + public void AsyncUnary_StreamingOperationsNotAllowed() + { + asyncCall.UnaryCallAsync("request1"); + Assert.Throws(typeof(InvalidOperationException), + () => asyncCall.StartReadMessage((x,y) => {})); + Assert.Throws(typeof(InvalidOperationException), + () => asyncCall.StartSendMessage("abc", new WriteFlags(), (x,y) => {})); + } + + [Test] + public void AsyncUnary_Success() + { + var resultTask = asyncCall.UnaryCallAsync("request1"); + fakeCall.UnaryResponseClientHandler(true, + new ClientSideStatus(Status.DefaultSuccess, new Metadata()), + CreateResponsePayload(), + new Metadata()); + + AssertUnaryResponseSuccess(asyncCall, fakeCall, resultTask); + } + + [Test] + public void AsyncUnary_NonSuccessStatusCode() + { + var resultTask = asyncCall.UnaryCallAsync("request1"); + fakeCall.UnaryResponseClientHandler(true, + CreateClientSideStatus(StatusCode.InvalidArgument), + CreateResponsePayload(), + new Metadata()); + + AssertUnaryResponseError(asyncCall, fakeCall, resultTask, StatusCode.InvalidArgument); + } + + [Test] + public void AsyncUnary_NullResponsePayload() + { + var resultTask = asyncCall.UnaryCallAsync("request1"); + fakeCall.UnaryResponseClientHandler(true, + new ClientSideStatus(Status.DefaultSuccess, new Metadata()), + null, + new Metadata()); + + // failure to deserialize will result in InvalidArgument status. + AssertUnaryResponseError(asyncCall, fakeCall, resultTask, StatusCode.Internal); + } + + [Test] + public void ClientStreaming_NoRequest_Success() + { + var resultTask = asyncCall.ClientStreamingCallAsync(); + fakeCall.UnaryResponseClientHandler(true, + new ClientSideStatus(Status.DefaultSuccess, new Metadata()), + CreateResponsePayload(), + new Metadata()); + + AssertUnaryResponseSuccess(asyncCall, fakeCall, resultTask); + } + + [Test] + public void ClientStreaming_NoRequest_NonSuccessStatusCode() + { + var resultTask = asyncCall.ClientStreamingCallAsync(); + fakeCall.UnaryResponseClientHandler(true, + CreateClientSideStatus(StatusCode.InvalidArgument), + CreateResponsePayload(), + new Metadata()); + + AssertUnaryResponseError(asyncCall, fakeCall, resultTask, StatusCode.InvalidArgument); + } + + ClientSideStatus CreateClientSideStatus(StatusCode statusCode) + { + return new ClientSideStatus(new Status(statusCode, ""), new Metadata()); + } + + byte[] CreateResponsePayload() + { + return Marshallers.StringMarshaller.Serializer("response1"); + } + + static void AssertUnaryResponseSuccess(AsyncCall asyncCall, FakeNativeCall fakeCall, Task resultTask) { - var resultTask = asyncCall.UnaryCallAsync("abc"); - fakeCall.UnaryResponseClientHandler(true, new ClientSideStatus(Status.DefaultSuccess, new Metadata()), new byte[] { 1, 2, 3 }, new Metadata()); Assert.IsTrue(resultTask.IsCompleted); Assert.IsTrue(fakeCall.IsDisposed); + Assert.AreEqual(Status.DefaultSuccess, asyncCall.GetStatus()); + Assert.AreEqual(0, asyncCall.ResponseHeadersAsync.Result.Count); + Assert.AreEqual(0, asyncCall.GetTrailers().Count); + Assert.AreEqual("response1", resultTask.Result); } - [Test] - public void AsyncUnary_CompletionFailure() + static void AssertUnaryResponseError(AsyncCall asyncCall, FakeNativeCall fakeCall, Task resultTask, StatusCode expectedStatusCode) { - var resultTask = asyncCall.UnaryCallAsync("abc"); - fakeCall.UnaryResponseClientHandler(false, new ClientSideStatus(new Status(StatusCode.Internal, ""), null), new byte[] { 1, 2, 3 }, new Metadata()); - Assert.IsTrue(resultTask.IsCompleted); Assert.IsTrue(fakeCall.IsDisposed); - Assert.AreEqual(StatusCode.Internal, asyncCall.GetStatus().StatusCode); - Assert.IsNull(asyncCall.GetTrailers()); + Assert.AreEqual(expectedStatusCode, asyncCall.GetStatus().StatusCode); var ex = Assert.ThrowsAsync(async () => await resultTask); - Assert.AreEqual(StatusCode.Internal, ex.Status.StatusCode); + Assert.AreEqual(expectedStatusCode, ex.Status.StatusCode); + Assert.AreEqual(0, asyncCall.ResponseHeadersAsync.Result.Count); + Assert.AreEqual(0, asyncCall.GetTrailers().Count); } internal class FakeNativeCall : INativeCall From e293b645d425c56fd9f7d59157c827c923dce17b Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 2 May 2016 10:29:51 -0700 Subject: [PATCH 0187/1894] clang-format --- src/core/lib/channel/channel_stack.h | 2 +- src/core/lib/channel/compress_filter.c | 3 +-- src/core/lib/channel/http_client_filter.c | 3 +-- src/core/lib/channel/http_server_filter.c | 3 +-- src/core/lib/security/client_auth_filter.c | 3 +-- src/core/lib/security/server_auth_filter.c | 3 +-- src/core/lib/surface/server.c | 3 +-- src/core/plugin_registry/grpc_plugin_registry.c | 9 +++------ src/core/plugin_registry/grpc_unsecure_plugin_registry.c | 9 +++------ 9 files changed, 13 insertions(+), 25 deletions(-) diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index ca75c6cb745..20400022698 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -117,7 +117,7 @@ typedef struct { \a and_free_memory that should be passed to gpr_free when destruction is complete. */ void (*destroy_call_elem)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - const grpc_call_stats *stats, + const grpc_call_stats *stats, void *and_free_memory); /* sizeof(per channel data) */ diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 4b88dcba63c..b734f92e66b 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -269,8 +269,7 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, /* Destructor for call_data */ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - const grpc_call_stats *stats, - void *ignored) { + const grpc_call_stats *stats, void *ignored) { /* grab pointers to our data from the call element */ call_data *calld = elem->call_data; gpr_slice_buffer_destroy(&calld->slices); diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c index 7e2b09c965a..cd9e6e894bd 100644 --- a/src/core/lib/channel/http_client_filter.c +++ b/src/core/lib/channel/http_client_filter.c @@ -156,8 +156,7 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, /* Destructor for call_data */ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - const grpc_call_stats *stats, - void *ignored) {} + const grpc_call_stats *stats, void *ignored) {} static grpc_mdelem *scheme_from_args(const grpc_channel_args *args) { unsigned i; diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index 00770ea092a..43d71af473b 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -226,8 +226,7 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, /* Destructor for call_data */ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - const grpc_call_stats *stats, - void *ignored) {} + const grpc_call_stats *stats, void *ignored) {} /* Constructor for channel_data */ static void init_channel_elem(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/security/client_auth_filter.c b/src/core/lib/security/client_auth_filter.c index 81b2e7cd883..f8089739094 100644 --- a/src/core/lib/security/client_auth_filter.c +++ b/src/core/lib/security/client_auth_filter.c @@ -278,8 +278,7 @@ static void set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, /* Destructor for call_data */ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - const grpc_call_stats *stats, - void *ignored) { + const grpc_call_stats *stats, void *ignored) { call_data *calld = elem->call_data; grpc_call_credentials_unref(calld->creds); if (calld->host != NULL) { diff --git a/src/core/lib/security/server_auth_filter.c b/src/core/lib/security/server_auth_filter.c index 25c992691ee..0290f8a5b5c 100644 --- a/src/core/lib/security/server_auth_filter.c +++ b/src/core/lib/security/server_auth_filter.c @@ -225,8 +225,7 @@ static void set_pollset(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, /* Destructor for call_data */ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - const grpc_call_stats *stats, - void *ignored) {} + const grpc_call_stats *stats, void *ignored) {} /* Constructor for channel_data */ static void init_channel_elem(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index cf20594b24c..3c8fa3aadc8 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -821,8 +821,7 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, } static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - const grpc_call_stats *stats, - void *ignored) { + const grpc_call_stats *stats, void *ignored) { channel_data *chand = elem->channel_data; call_data *calld = elem->call_data; diff --git a/src/core/plugin_registry/grpc_plugin_registry.c b/src/core/plugin_registry/grpc_plugin_registry.c index 905cd59e23d..1cd2abb9342 100644 --- a/src/core/plugin_registry/grpc_plugin_registry.c +++ b/src/core/plugin_registry/grpc_plugin_registry.c @@ -51,10 +51,8 @@ extern void census_grpc_plugin_init(void); extern void census_grpc_plugin_shutdown(void); void grpc_register_built_in_plugins(void) { - grpc_register_plugin(grpc_chttp2_plugin_init, - grpc_chttp2_plugin_shutdown); - grpc_register_plugin(grpc_client_config_init, - grpc_client_config_shutdown); + grpc_register_plugin(grpc_chttp2_plugin_init, grpc_chttp2_plugin_shutdown); + grpc_register_plugin(grpc_client_config_init, grpc_client_config_shutdown); grpc_register_plugin(grpc_lb_policy_pick_first_init, grpc_lb_policy_pick_first_shutdown); grpc_register_plugin(grpc_lb_policy_round_robin_init, @@ -65,6 +63,5 @@ void grpc_register_built_in_plugins(void) { grpc_resolver_sockaddr_shutdown); grpc_register_plugin(grpc_load_reporting_plugin_init, grpc_load_reporting_plugin_shutdown); - grpc_register_plugin(census_grpc_plugin_init, - census_grpc_plugin_shutdown); + grpc_register_plugin(census_grpc_plugin_init, census_grpc_plugin_shutdown); } diff --git a/src/core/plugin_registry/grpc_unsecure_plugin_registry.c b/src/core/plugin_registry/grpc_unsecure_plugin_registry.c index 79950787258..86eac132e87 100644 --- a/src/core/plugin_registry/grpc_unsecure_plugin_registry.c +++ b/src/core/plugin_registry/grpc_unsecure_plugin_registry.c @@ -51,10 +51,8 @@ extern void census_grpc_plugin_init(void); extern void census_grpc_plugin_shutdown(void); void grpc_register_built_in_plugins(void) { - grpc_register_plugin(grpc_chttp2_plugin_init, - grpc_chttp2_plugin_shutdown); - grpc_register_plugin(grpc_client_config_init, - grpc_client_config_shutdown); + grpc_register_plugin(grpc_chttp2_plugin_init, grpc_chttp2_plugin_shutdown); + grpc_register_plugin(grpc_client_config_init, grpc_client_config_shutdown); grpc_register_plugin(grpc_resolver_dns_native_init, grpc_resolver_dns_native_shutdown); grpc_register_plugin(grpc_resolver_sockaddr_init, @@ -65,6 +63,5 @@ void grpc_register_built_in_plugins(void) { grpc_lb_policy_pick_first_shutdown); grpc_register_plugin(grpc_lb_policy_round_robin_init, grpc_lb_policy_round_robin_shutdown); - grpc_register_plugin(census_grpc_plugin_init, - census_grpc_plugin_shutdown); + grpc_register_plugin(census_grpc_plugin_init, census_grpc_plugin_shutdown); } From edb8b76ac2dc5f1b9bdaf97e69a21e3c59bfb775 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 2 May 2016 10:43:04 -0700 Subject: [PATCH 0188/1894] Simplified Ruby tools extension checking --- src/ruby/tools/bin/protoc.rb | 9 +--- src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb | 9 +--- src/ruby/tools/os_check.rb | 45 ------------------- 3 files changed, 2 insertions(+), 61 deletions(-) delete mode 100644 src/ruby/tools/os_check.rb diff --git a/src/ruby/tools/bin/protoc.rb b/src/ruby/tools/bin/protoc.rb index 68cbc852fd6..728a88b0071 100755 --- a/src/ruby/tools/bin/protoc.rb +++ b/src/ruby/tools/bin/protoc.rb @@ -30,14 +30,7 @@ require 'rbconfig' -require_relative '../os_check' - -protoc_name = case OS.os_name - when 'windows' - 'protoc.exe' - else - 'protoc' - end +protoc_name = 'protoc' + RbConfig::CONFIG['EXEEXT'] protoc_path = File.join(File.dirname(__FILE__), RbConfig::CONFIG['host_cpu'] + '-' + OS.os_name, diff --git a/src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb b/src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb index 04cf435b58b..814aef24465 100755 --- a/src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb +++ b/src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb @@ -30,14 +30,7 @@ require 'rbconfig' -require_relative '../os_check' - -plugin_name = 'grpc_ruby_plugin' + case OS.os_name - when 'windows' - '.exe' - else - '' - end +plugin_name = 'grpc_ruby_plugin' + RbConfig::CONFIG['EXEEXT'] plugin_path = File.join(File.dirname(__FILE__), RbConfig::CONFIG['host_cpu'] + '-' + OS.os_name, diff --git a/src/ruby/tools/os_check.rb b/src/ruby/tools/os_check.rb deleted file mode 100644 index 2677306457b..00000000000 --- a/src/ruby/tools/os_check.rb +++ /dev/null @@ -1,45 +0,0 @@ -# Copyright 2016, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# This is based on http://stackoverflow.com/a/171011/159388 by Aaron Hinni - -require 'rbconfig' - -module OS - def OS.os_name - case RbConfig::CONFIG['host_os'] - when /cygwin|mswin|mingw|bccwin|wince|emx/ - 'windows' - when /darwin/ - 'macos' - else - 'linux' - end - end -end From 8e4512ba482f03887f15ac7b978bffd8eb3b9840 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 2 May 2016 11:26:46 -0700 Subject: [PATCH 0189/1894] Reversed premature removal of a file --- src/ruby/tools/bin/protoc.rb | 2 + src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb | 2 + src/ruby/tools/os_check.rb | 45 +++++++++++++++++++ 3 files changed, 49 insertions(+) create mode 100644 src/ruby/tools/os_check.rb diff --git a/src/ruby/tools/bin/protoc.rb b/src/ruby/tools/bin/protoc.rb index 728a88b0071..3a2a5b8dc96 100755 --- a/src/ruby/tools/bin/protoc.rb +++ b/src/ruby/tools/bin/protoc.rb @@ -30,6 +30,8 @@ require 'rbconfig' +require_relative '../os_check' + protoc_name = 'protoc' + RbConfig::CONFIG['EXEEXT'] protoc_path = File.join(File.dirname(__FILE__), diff --git a/src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb b/src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb index 814aef24465..4b296dedc75 100755 --- a/src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb +++ b/src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb @@ -30,6 +30,8 @@ require 'rbconfig' +require_relative '../os_check' + plugin_name = 'grpc_ruby_plugin' + RbConfig::CONFIG['EXEEXT'] plugin_path = File.join(File.dirname(__FILE__), diff --git a/src/ruby/tools/os_check.rb b/src/ruby/tools/os_check.rb new file mode 100644 index 00000000000..2677306457b --- /dev/null +++ b/src/ruby/tools/os_check.rb @@ -0,0 +1,45 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# This is based on http://stackoverflow.com/a/171011/159388 by Aaron Hinni + +require 'rbconfig' + +module OS + def OS.os_name + case RbConfig::CONFIG['host_os'] + when /cygwin|mswin|mingw|bccwin|wince|emx/ + 'windows' + when /darwin/ + 'macos' + else + 'linux' + end + end +end From 08e1f755a3b456ce2e86db539068278407317a3c Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 2 May 2016 12:07:21 -0700 Subject: [PATCH 0190/1894] fix typo --- src/csharp/Grpc.Core/Internal/AsyncCall.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/csharp/Grpc.Core/Internal/AsyncCall.cs b/src/csharp/Grpc.Core/Internal/AsyncCall.cs index fc3c4a2b2be..50ba617cdb1 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCall.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCall.cs @@ -407,7 +407,7 @@ namespace Grpc.Core.Internal /// /// Handler for unary response completion. /// - private void HandleUnaryResponse(bool sucess, ClientSideStatus receivedStatus, byte[] receivedMessage, Metadata responseHeaders) + private void HandleUnaryResponse(bool success, ClientSideStatus receivedStatus, byte[] receivedMessage, Metadata responseHeaders) { // NOTE: because this event is a result of batch containing GRPC_OP_RECV_STATUS_ON_CLIENT, // success will be always set to true. From 791e93ee2f66d6a29eb3e16f9d44ef29f1c0a83d Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 1 Mar 2016 02:48:00 +0100 Subject: [PATCH 0191/1894] Always build the grpc library when building the ruby extension. --- src/ruby/ext/grpc/extconf.rb | 38 ++++++++++++++---------------------- 1 file changed, 15 insertions(+), 23 deletions(-) diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb index 82b6d313c86..07f7bb93b8a 100644 --- a/src/ruby/ext/grpc/extconf.rb +++ b/src/ruby/ext/grpc/extconf.rb @@ -60,35 +60,27 @@ grpc_root = File.expand_path(File.join(File.dirname(__FILE__), '../../../..')) grpc_config = ENV['GRPC_CONFIG'] || 'opt' -if ENV.key?('GRPC_LIB_DIR') - grpc_lib_dir = File.join(grpc_root, ENV['GRPC_LIB_DIR']) -else - grpc_lib_dir = File.join(grpc_root, 'libs', grpc_config) -end - ENV['MACOSX_DEPLOYMENT_TARGET'] = '10.7' -unless File.exist?(File.join(grpc_lib_dir, 'libgrpc.a')) or windows - ENV['AR'] = RbConfig::CONFIG['AR'] + ' rcs' - ENV['CC'] = RbConfig::CONFIG['CC'] - ENV['LD'] = ENV['CC'] +ENV['AR'] = RbConfig::CONFIG['AR'] + ' rcs' +ENV['CC'] = RbConfig::CONFIG['CC'] +ENV['LD'] = ENV['CC'] - ENV['AR'] = 'libtool -o' if RUBY_PLATFORM =~ /darwin/ +ENV['AR'] = 'libtool -o' if RUBY_PLATFORM =~ /darwin/ - ENV['EMBED_OPENSSL'] = 'true' - ENV['EMBED_ZLIB'] = 'true' - ENV['ARCH_FLAGS'] = RbConfig::CONFIG['ARCH_FLAG'] - ENV['ARCH_FLAGS'] = '-arch i386 -arch x86_64' if RUBY_PLATFORM =~ /darwin/ - ENV['CFLAGS'] = '-DGPR_BACKWARDS_COMPATIBILITY_MODE' +ENV['EMBED_OPENSSL'] = 'true' +ENV['EMBED_ZLIB'] = 'true' +ENV['ARCH_FLAGS'] = RbConfig::CONFIG['ARCH_FLAG'] +ENV['ARCH_FLAGS'] = '-arch i386 -arch x86_64' if RUBY_PLATFORM =~ /darwin/ +ENV['CFLAGS'] = '-DGPR_BACKWARDS_COMPATIBILITY_MODE' - output_dir = File.expand_path(RbConfig::CONFIG['topdir']) - grpc_lib_dir = File.join(output_dir, 'libs', grpc_config) - ENV['BUILDDIR'] = output_dir +output_dir = File.expand_path(RbConfig::CONFIG['topdir']) +grpc_lib_dir = File.join(output_dir, 'libs', grpc_config) +ENV['BUILDDIR'] = output_dir - puts 'Building internal gRPC into ' + grpc_lib_dir - system("make -j -C #{grpc_root} #{grpc_lib_dir}/libgrpc.a CONFIG=#{grpc_config}") - exit 1 unless $? == 0 -end +puts 'Building internal gRPC into ' + grpc_lib_dir +system("make -j -C #{grpc_root} #{grpc_lib_dir}/libgrpc.a CONFIG=#{grpc_config}") +exit 1 unless $? == 0 $CFLAGS << ' -I' + File.join(grpc_root, 'include') $LDFLAGS << ' ' + File.join(grpc_lib_dir, 'libgrpc.a') unless windows From 8a6efb7a42bc305d96163ef7c16167bf004cf1ab Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 2 May 2016 13:57:57 -0700 Subject: [PATCH 0192/1894] Node tools: use the right extension for running protoc on Windows --- src/node/tools/bin/protoc.js | 4 +++- src/node/tools/bin/protoc_plugin.js | 6 ++++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/node/tools/bin/protoc.js b/src/node/tools/bin/protoc.js index 0c6d7ce017d..4d50c94b0f8 100755 --- a/src/node/tools/bin/protoc.js +++ b/src/node/tools/bin/protoc.js @@ -43,7 +43,9 @@ var path = require('path'); var execFile = require('child_process').execFile; -var protoc = path.resolve(__dirname, 'protoc'); +var exe_ext = process.platform === 'win32' ? '.exe' : ''; + +var protoc = path.resolve(__dirname, 'protoc' + exe_ext); execFile(protoc, process.argv.slice(2), function(error, stdout, stderr) { if (error) { diff --git a/src/node/tools/bin/protoc_plugin.js b/src/node/tools/bin/protoc_plugin.js index 0e0bb9406e1..281ec0d85e5 100755 --- a/src/node/tools/bin/protoc_plugin.js +++ b/src/node/tools/bin/protoc_plugin.js @@ -43,9 +43,11 @@ var path = require('path'); var execFile = require('child_process').execFile; -var protoc = path.resolve(__dirname, 'grpc_node_plugin'); +var exe_ext = process.platform === 'win32' ? '.exe' : ''; -execFile(protoc, process.argv.slice(2), function(error, stdout, stderr) { +var plugin = path.resolve(__dirname, 'grpc_node_plugin' + exe_ext); + +execFile(plugin, process.argv.slice(2), function(error, stdout, stderr) { if (error) { throw error; } From 777c26329cf1c1bfe06cd4d719a8fb9dbe24603f Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Mon, 2 May 2016 23:11:57 +0200 Subject: [PATCH 0193/1894] Properly using our build.yaml source of truth to generate our list of public APIs. --- tools/buildgen/plugins/list_api.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/buildgen/plugins/list_api.py b/tools/buildgen/plugins/list_api.py index ff937a0ab83..1fc4f4123ca 100755 --- a/tools/buildgen/plugins/list_api.py +++ b/tools/buildgen/plugins/list_api.py @@ -64,12 +64,13 @@ def headers_under(directory): def mako_plugin(dictionary): apis = [] + headers = [] -# for lib in dictionary['libs']: -# if lib['name'] == 'grpc': -# apis.extend(list_c_apis(lib['public_headers'])) - apis.extend(list_c_apis(sorted(headers_under('include/grpc')))) + for lib in dictionary['libs']: + if lib['name'] in ['grpc', 'gpr']: + headers.extend(lib['public_headers']) + apis.extend(list_c_apis(sorted(set(headers)))) dictionary['c_apis'] = apis From 6a45e9340701f3107f5d39cc5f5c0366204faa23 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 2 May 2016 14:25:49 -0700 Subject: [PATCH 0194/1894] Made ruby plugin support empty package names --- src/compiler/ruby_generator.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/compiler/ruby_generator.cc b/src/compiler/ruby_generator.cc index 5ac56ad289c..4ca06a4554d 100644 --- a/src/compiler/ruby_generator.cc +++ b/src/compiler/ruby_generator.cc @@ -98,7 +98,7 @@ void PrintService(const ServiceDescriptor *service, const grpc::string &package, out->Print("self.marshal_class_method = :encode\n"); out->Print("self.unmarshal_class_method = :decode\n"); std::map pkg_vars = - ListToDict({"service.name", service->name(), "pkg.name", package, }); + ListToDict({"service_full_namename", service->full_name()}); out->Print(pkg_vars, "self.service_name = '$pkg.name$.$service.name$'\n"); out->Print("\n"); for (int i = 0; i < service->method_count(); ++i) { From df8b62cea7c0d37cdf6918f1761137d95ab8a879 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Mon, 2 May 2016 14:34:24 -0700 Subject: [PATCH 0195/1894] Add coverage for secure async end2end testing --- test/cpp/end2end/async_end2end_test.cc | 225 +++++++++++++++---------- 1 file changed, 136 insertions(+), 89 deletions(-) diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index 7e4d6046d60..8d58726f13d 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -51,6 +51,7 @@ #include "test/core/util/port.h" #include "test/core/util/test_config.h" #include "test/cpp/util/string_ref_helper.h" +#include "test/cpp/util/test_credentials_provider.h" #ifdef GPR_POSIX_SOCKET #include "src/core/lib/iomgr/ev_posix.h" @@ -58,6 +59,7 @@ using grpc::testing::EchoRequest; using grpc::testing::EchoResponse; +using grpc::testing::kTlsCredentialsType; using std::chrono::system_clock; GPR_TLS_DECL(g_is_async_end2end_test); @@ -197,20 +199,28 @@ class Verifier { bool spin_; }; -class AsyncEnd2endTest : public ::testing::TestWithParam { +class TestScenario { + public: + TestScenario(bool non_block, const grpc::string& creds_type) + : disable_blocking(non_block), credentials_type(creds_type) {} + bool disable_blocking; + const grpc::string credentials_type; +}; + +class AsyncEnd2endTest : public ::testing::TestWithParam { protected: AsyncEnd2endTest() {} void SetUp() GRPC_OVERRIDE { - poll_overrider_.reset(new PollingOverrider(!GetParam())); + poll_overrider_.reset(new PollingOverrider(!GetParam().disable_blocking)); int port = grpc_pick_unused_port_or_die(); server_address_ << "localhost:" << port; // Setup server ServerBuilder builder; - builder.AddListeningPort(server_address_.str(), - grpc::InsecureServerCredentials()); + auto server_creds = GetServerCredentials(GetParam().credentials_type); + builder.AddListeningPort(server_address_.str(), server_creds); builder.RegisterService(&service_); cq_ = builder.AddCompletionQueue(); server_ = builder.BuildAndStart(); @@ -230,8 +240,11 @@ class AsyncEnd2endTest : public ::testing::TestWithParam { } void ResetStub() { + ChannelArguments args; + auto channel_creds = + GetChannelCredentials(GetParam().credentials_type, &args); std::shared_ptr channel = - CreateChannel(server_address_.str(), InsecureChannelCredentials()); + CreateCustomChannel(server_address_.str(), channel_creds, args); stub_ = grpc::testing::EchoTestService::NewStub(channel); } @@ -254,15 +267,15 @@ class AsyncEnd2endTest : public ::testing::TestWithParam { service_.RequestEcho(&srv_ctx, &recv_request, &response_writer, cq_.get(), cq_.get(), tag(2)); - Verifier(GetParam()).Expect(2, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(2, true).Verify(cq_.get()); EXPECT_EQ(send_request.message(), recv_request.message()); send_response.set_message(recv_request.message()); response_writer.Finish(send_response, Status::OK, tag(3)); - Verifier(GetParam()).Expect(3, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(3, true).Verify(cq_.get()); response_reader->Finish(&recv_response, &recv_status, tag(4)); - Verifier(GetParam()).Expect(4, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(4, true).Verify(cq_.get()); EXPECT_EQ(send_response.message(), recv_response.message()); EXPECT_TRUE(recv_status.ok()); @@ -310,23 +323,25 @@ TEST_P(AsyncEnd2endTest, AsyncNextRpc) { std::chrono::system_clock::now()); std::chrono::system_clock::time_point time_limit( std::chrono::system_clock::now() + std::chrono::seconds(10)); - Verifier(GetParam()).Verify(cq_.get(), time_now); - Verifier(GetParam()).Verify(cq_.get(), time_now); + Verifier(GetParam().disable_blocking).Verify(cq_.get(), time_now); + Verifier(GetParam().disable_blocking).Verify(cq_.get(), time_now); service_.RequestEcho(&srv_ctx, &recv_request, &response_writer, cq_.get(), cq_.get(), tag(2)); - Verifier(GetParam()).Expect(2, true).Verify(cq_.get(), time_limit); + Verifier(GetParam().disable_blocking) + .Expect(2, true) + .Verify(cq_.get(), time_limit); EXPECT_EQ(send_request.message(), recv_request.message()); send_response.set_message(recv_request.message()); response_writer.Finish(send_response, Status::OK, tag(3)); - Verifier(GetParam()) + Verifier(GetParam().disable_blocking) .Expect(3, true) .Verify(cq_.get(), std::chrono::system_clock::time_point::max()); response_reader->Finish(&recv_response, &recv_status, tag(4)); - Verifier(GetParam()) + Verifier(GetParam().disable_blocking) .Expect(4, true) .Verify(cq_.get(), std::chrono::system_clock::time_point::max()); @@ -354,34 +369,37 @@ TEST_P(AsyncEnd2endTest, SimpleClientStreaming) { service_.RequestRequestStream(&srv_ctx, &srv_stream, cq_.get(), cq_.get(), tag(2)); - Verifier(GetParam()).Expect(2, true).Expect(1, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking) + .Expect(2, true) + .Expect(1, true) + .Verify(cq_.get()); cli_stream->Write(send_request, tag(3)); - Verifier(GetParam()).Expect(3, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(3, true).Verify(cq_.get()); srv_stream.Read(&recv_request, tag(4)); - Verifier(GetParam()).Expect(4, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(4, true).Verify(cq_.get()); EXPECT_EQ(send_request.message(), recv_request.message()); cli_stream->Write(send_request, tag(5)); - Verifier(GetParam()).Expect(5, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(5, true).Verify(cq_.get()); srv_stream.Read(&recv_request, tag(6)); - Verifier(GetParam()).Expect(6, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(6, true).Verify(cq_.get()); EXPECT_EQ(send_request.message(), recv_request.message()); cli_stream->WritesDone(tag(7)); - Verifier(GetParam()).Expect(7, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(7, true).Verify(cq_.get()); srv_stream.Read(&recv_request, tag(8)); - Verifier(GetParam()).Expect(8, false).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(8, false).Verify(cq_.get()); send_response.set_message(recv_request.message()); srv_stream.Finish(send_response, Status::OK, tag(9)); - Verifier(GetParam()).Expect(9, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(9, true).Verify(cq_.get()); cli_stream->Finish(&recv_status, tag(10)); - Verifier(GetParam()).Expect(10, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(10, true).Verify(cq_.get()); EXPECT_EQ(send_response.message(), recv_response.message()); EXPECT_TRUE(recv_status.ok()); @@ -407,32 +425,35 @@ TEST_P(AsyncEnd2endTest, SimpleServerStreaming) { service_.RequestResponseStream(&srv_ctx, &recv_request, &srv_stream, cq_.get(), cq_.get(), tag(2)); - Verifier(GetParam()).Expect(1, true).Expect(2, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking) + .Expect(1, true) + .Expect(2, true) + .Verify(cq_.get()); EXPECT_EQ(send_request.message(), recv_request.message()); send_response.set_message(recv_request.message()); srv_stream.Write(send_response, tag(3)); - Verifier(GetParam()).Expect(3, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(3, true).Verify(cq_.get()); cli_stream->Read(&recv_response, tag(4)); - Verifier(GetParam()).Expect(4, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(4, true).Verify(cq_.get()); EXPECT_EQ(send_response.message(), recv_response.message()); srv_stream.Write(send_response, tag(5)); - Verifier(GetParam()).Expect(5, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(5, true).Verify(cq_.get()); cli_stream->Read(&recv_response, tag(6)); - Verifier(GetParam()).Expect(6, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(6, true).Verify(cq_.get()); EXPECT_EQ(send_response.message(), recv_response.message()); srv_stream.Finish(Status::OK, tag(7)); - Verifier(GetParam()).Expect(7, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(7, true).Verify(cq_.get()); cli_stream->Read(&recv_response, tag(8)); - Verifier(GetParam()).Expect(8, false).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(8, false).Verify(cq_.get()); cli_stream->Finish(&recv_status, tag(9)); - Verifier(GetParam()).Expect(9, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(9, true).Verify(cq_.get()); EXPECT_TRUE(recv_status.ok()); } @@ -457,34 +478,37 @@ TEST_P(AsyncEnd2endTest, SimpleBidiStreaming) { service_.RequestBidiStream(&srv_ctx, &srv_stream, cq_.get(), cq_.get(), tag(2)); - Verifier(GetParam()).Expect(1, true).Expect(2, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking) + .Expect(1, true) + .Expect(2, true) + .Verify(cq_.get()); cli_stream->Write(send_request, tag(3)); - Verifier(GetParam()).Expect(3, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(3, true).Verify(cq_.get()); srv_stream.Read(&recv_request, tag(4)); - Verifier(GetParam()).Expect(4, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(4, true).Verify(cq_.get()); EXPECT_EQ(send_request.message(), recv_request.message()); send_response.set_message(recv_request.message()); srv_stream.Write(send_response, tag(5)); - Verifier(GetParam()).Expect(5, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(5, true).Verify(cq_.get()); cli_stream->Read(&recv_response, tag(6)); - Verifier(GetParam()).Expect(6, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(6, true).Verify(cq_.get()); EXPECT_EQ(send_response.message(), recv_response.message()); cli_stream->WritesDone(tag(7)); - Verifier(GetParam()).Expect(7, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(7, true).Verify(cq_.get()); srv_stream.Read(&recv_request, tag(8)); - Verifier(GetParam()).Expect(8, false).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(8, false).Verify(cq_.get()); srv_stream.Finish(Status::OK, tag(9)); - Verifier(GetParam()).Expect(9, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(9, true).Verify(cq_.get()); cli_stream->Finish(&recv_status, tag(10)); - Verifier(GetParam()).Expect(10, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(10, true).Verify(cq_.get()); EXPECT_TRUE(recv_status.ok()); } @@ -516,7 +540,7 @@ TEST_P(AsyncEnd2endTest, ClientInitialMetadataRpc) { service_.RequestEcho(&srv_ctx, &recv_request, &response_writer, cq_.get(), cq_.get(), tag(2)); - Verifier(GetParam()).Expect(2, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(2, true).Verify(cq_.get()); EXPECT_EQ(send_request.message(), recv_request.message()); auto client_initial_metadata = srv_ctx.client_metadata(); EXPECT_EQ(meta1.second, @@ -530,10 +554,10 @@ TEST_P(AsyncEnd2endTest, ClientInitialMetadataRpc) { send_response.set_message(recv_request.message()); response_writer.Finish(send_response, Status::OK, tag(3)); - Verifier(GetParam()).Expect(3, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(3, true).Verify(cq_.get()); response_reader->Finish(&recv_response, &recv_status, tag(4)); - Verifier(GetParam()).Expect(4, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(4, true).Verify(cq_.get()); EXPECT_EQ(send_response.message(), recv_response.message()); EXPECT_TRUE(recv_status.ok()); @@ -561,15 +585,15 @@ TEST_P(AsyncEnd2endTest, ServerInitialMetadataRpc) { service_.RequestEcho(&srv_ctx, &recv_request, &response_writer, cq_.get(), cq_.get(), tag(2)); - Verifier(GetParam()).Expect(2, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(2, true).Verify(cq_.get()); EXPECT_EQ(send_request.message(), recv_request.message()); srv_ctx.AddInitialMetadata(meta1.first, meta1.second); srv_ctx.AddInitialMetadata(meta2.first, meta2.second); response_writer.SendInitialMetadata(tag(3)); - Verifier(GetParam()).Expect(3, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(3, true).Verify(cq_.get()); response_reader->ReadInitialMetadata(tag(4)); - Verifier(GetParam()).Expect(4, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(4, true).Verify(cq_.get()); auto server_initial_metadata = cli_ctx.GetServerInitialMetadata(); EXPECT_EQ(meta1.second, ToString(server_initial_metadata.find(meta1.first)->second)); @@ -579,10 +603,10 @@ TEST_P(AsyncEnd2endTest, ServerInitialMetadataRpc) { send_response.set_message(recv_request.message()); response_writer.Finish(send_response, Status::OK, tag(5)); - Verifier(GetParam()).Expect(5, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(5, true).Verify(cq_.get()); response_reader->Finish(&recv_response, &recv_status, tag(6)); - Verifier(GetParam()).Expect(6, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(6, true).Verify(cq_.get()); EXPECT_EQ(send_response.message(), recv_response.message()); EXPECT_TRUE(recv_status.ok()); @@ -610,20 +634,20 @@ TEST_P(AsyncEnd2endTest, ServerTrailingMetadataRpc) { service_.RequestEcho(&srv_ctx, &recv_request, &response_writer, cq_.get(), cq_.get(), tag(2)); - Verifier(GetParam()).Expect(2, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(2, true).Verify(cq_.get()); EXPECT_EQ(send_request.message(), recv_request.message()); response_writer.SendInitialMetadata(tag(3)); - Verifier(GetParam()).Expect(3, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(3, true).Verify(cq_.get()); send_response.set_message(recv_request.message()); srv_ctx.AddTrailingMetadata(meta1.first, meta1.second); srv_ctx.AddTrailingMetadata(meta2.first, meta2.second); response_writer.Finish(send_response, Status::OK, tag(4)); - Verifier(GetParam()).Expect(4, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(4, true).Verify(cq_.get()); response_reader->Finish(&recv_response, &recv_status, tag(5)); - Verifier(GetParam()).Expect(5, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(5, true).Verify(cq_.get()); EXPECT_EQ(send_response.message(), recv_response.message()); EXPECT_TRUE(recv_status.ok()); auto server_trailing_metadata = cli_ctx.GetServerTrailingMetadata(); @@ -671,7 +695,7 @@ TEST_P(AsyncEnd2endTest, MetadataRpc) { service_.RequestEcho(&srv_ctx, &recv_request, &response_writer, cq_.get(), cq_.get(), tag(2)); - Verifier(GetParam()).Expect(2, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(2, true).Verify(cq_.get()); EXPECT_EQ(send_request.message(), recv_request.message()); auto client_initial_metadata = srv_ctx.client_metadata(); EXPECT_EQ(meta1.second, @@ -683,9 +707,9 @@ TEST_P(AsyncEnd2endTest, MetadataRpc) { srv_ctx.AddInitialMetadata(meta3.first, meta3.second); srv_ctx.AddInitialMetadata(meta4.first, meta4.second); response_writer.SendInitialMetadata(tag(3)); - Verifier(GetParam()).Expect(3, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(3, true).Verify(cq_.get()); response_reader->ReadInitialMetadata(tag(4)); - Verifier(GetParam()).Expect(4, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(4, true).Verify(cq_.get()); auto server_initial_metadata = cli_ctx.GetServerInitialMetadata(); EXPECT_EQ(meta3.second, ToString(server_initial_metadata.find(meta3.first)->second)); @@ -698,10 +722,10 @@ TEST_P(AsyncEnd2endTest, MetadataRpc) { srv_ctx.AddTrailingMetadata(meta6.first, meta6.second); response_writer.Finish(send_response, Status::OK, tag(5)); - Verifier(GetParam()).Expect(5, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(5, true).Verify(cq_.get()); response_reader->Finish(&recv_response, &recv_status, tag(6)); - Verifier(GetParam()).Expect(6, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(6, true).Verify(cq_.get()); EXPECT_EQ(send_response.message(), recv_response.message()); EXPECT_TRUE(recv_status.ok()); auto server_trailing_metadata = cli_ctx.GetServerTrailingMetadata(); @@ -734,15 +758,15 @@ TEST_P(AsyncEnd2endTest, ServerCheckCancellation) { service_.RequestEcho(&srv_ctx, &recv_request, &response_writer, cq_.get(), cq_.get(), tag(2)); - Verifier(GetParam()).Expect(2, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(2, true).Verify(cq_.get()); EXPECT_EQ(send_request.message(), recv_request.message()); cli_ctx.TryCancel(); - Verifier(GetParam()).Expect(5, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(5, true).Verify(cq_.get()); EXPECT_TRUE(srv_ctx.IsCancelled()); response_reader->Finish(&recv_response, &recv_status, tag(4)); - Verifier(GetParam()).Expect(4, false).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(4, false).Verify(cq_.get()); EXPECT_EQ(StatusCode::CANCELLED, recv_status.error_code()); } @@ -769,25 +793,28 @@ TEST_P(AsyncEnd2endTest, ServerCheckDone) { service_.RequestEcho(&srv_ctx, &recv_request, &response_writer, cq_.get(), cq_.get(), tag(2)); - Verifier(GetParam()).Expect(2, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(2, true).Verify(cq_.get()); EXPECT_EQ(send_request.message(), recv_request.message()); send_response.set_message(recv_request.message()); response_writer.Finish(send_response, Status::OK, tag(3)); - Verifier(GetParam()).Expect(3, true).Verify(cq_.get()); - Verifier(GetParam()).Expect(5, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(3, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(5, true).Verify(cq_.get()); EXPECT_FALSE(srv_ctx.IsCancelled()); response_reader->Finish(&recv_response, &recv_status, tag(4)); - Verifier(GetParam()).Expect(4, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(4, true).Verify(cq_.get()); EXPECT_EQ(send_response.message(), recv_response.message()); EXPECT_TRUE(recv_status.ok()); } TEST_P(AsyncEnd2endTest, UnimplementedRpc) { + ChannelArguments args; + auto channel_creds = + GetChannelCredentials(GetParam().credentials_type, &args); std::shared_ptr channel = - CreateChannel(server_address_.str(), InsecureChannelCredentials()); + CreateCustomChannel(server_address_.str(), channel_creds, args); std::unique_ptr stub; stub = grpc::testing::UnimplementedService::NewStub(channel); EchoRequest send_request; @@ -800,7 +827,7 @@ TEST_P(AsyncEnd2endTest, UnimplementedRpc) { stub->AsyncUnimplemented(&cli_ctx, send_request, cq_.get())); response_reader->Finish(&recv_response, &recv_status, tag(4)); - Verifier(GetParam()).Expect(4, false).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(4, false).Verify(cq_.get()); EXPECT_EQ(StatusCode::UNIMPLEMENTED, recv_status.error_code()); EXPECT_EQ("", recv_status.error_message()); @@ -847,23 +874,25 @@ class AsyncEnd2endServerTryCancelTest : public AsyncEnd2endTest { // Initiate the 'RequestStream' call on client std::unique_ptr> cli_stream( stub_->AsyncRequestStream(&cli_ctx, &recv_response, cq_.get(), tag(1))); - Verifier(GetParam()).Expect(1, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(1, true).Verify(cq_.get()); // On the server, request to be notified of 'RequestStream' calls // and receive the 'RequestStream' call just made by the client srv_ctx.AsyncNotifyWhenDone(tag(11)); service_.RequestRequestStream(&srv_ctx, &srv_stream, cq_.get(), cq_.get(), tag(2)); - Verifier(GetParam()).Expect(2, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(2, true).Verify(cq_.get()); // Client sends 3 messages (tags 3, 4 and 5) for (int tag_idx = 3; tag_idx <= 5; tag_idx++) { send_request.set_message("Ping " + std::to_string(tag_idx)); cli_stream->Write(send_request, tag(tag_idx)); - Verifier(GetParam()).Expect(tag_idx, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking) + .Expect(tag_idx, true) + .Verify(cq_.get()); } cli_stream->WritesDone(tag(6)); - Verifier(GetParam()).Expect(6, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(6, true).Verify(cq_.get()); bool expected_server_cq_result = true; bool ignore_cq_result = false; @@ -871,7 +900,7 @@ class AsyncEnd2endServerTryCancelTest : public AsyncEnd2endTest { if (server_try_cancel == CANCEL_BEFORE_PROCESSING) { srv_ctx.TryCancel(); - Verifier(GetParam()).Expect(11, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(11, true).Verify(cq_.get()); EXPECT_TRUE(srv_ctx.IsCancelled()); // Since cancellation is done before server reads any results, we know @@ -881,7 +910,7 @@ class AsyncEnd2endServerTryCancelTest : public AsyncEnd2endTest { std::thread* server_try_cancel_thd = NULL; - auto verif = Verifier(GetParam()); + auto verif = Verifier(GetParam().disable_blocking); if (server_try_cancel == CANCEL_DURING_PROCESSING) { server_try_cancel_thd = @@ -939,13 +968,13 @@ class AsyncEnd2endServerTryCancelTest : public AsyncEnd2endTest { // Server sends the final message and cancelled status (but the RPC is // already cancelled at this point. So we expect the operation to fail) srv_stream.Finish(send_response, Status::CANCELLED, tag(9)); - Verifier(GetParam()).Expect(9, false).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(9, false).Verify(cq_.get()); // Client will see the cancellation cli_stream->Finish(&recv_status, tag(10)); // TODO(sreek): The expectation here should be true. This is a bug (github // issue #4972) - Verifier(GetParam()).Expect(10, false).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(10, false).Verify(cq_.get()); EXPECT_FALSE(recv_status.ok()); EXPECT_EQ(::grpc::StatusCode::CANCELLED, recv_status.error_code()); } @@ -979,13 +1008,13 @@ class AsyncEnd2endServerTryCancelTest : public AsyncEnd2endTest { // Initiate the 'ResponseStream' call on the client std::unique_ptr> cli_stream( stub_->AsyncResponseStream(&cli_ctx, send_request, cq_.get(), tag(1))); - Verifier(GetParam()).Expect(1, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(1, true).Verify(cq_.get()); // On the server, request to be notified of 'ResponseStream' calls and // receive the call just made by the client srv_ctx.AsyncNotifyWhenDone(tag(11)); service_.RequestResponseStream(&srv_ctx, &recv_request, &srv_stream, cq_.get(), cq_.get(), tag(2)); - Verifier(GetParam()).Expect(2, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(2, true).Verify(cq_.get()); EXPECT_EQ(send_request.message(), recv_request.message()); bool expected_cq_result = true; @@ -994,7 +1023,7 @@ class AsyncEnd2endServerTryCancelTest : public AsyncEnd2endTest { if (server_try_cancel == CANCEL_BEFORE_PROCESSING) { srv_ctx.TryCancel(); - Verifier(GetParam()).Expect(11, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(11, true).Verify(cq_.get()); EXPECT_TRUE(srv_ctx.IsCancelled()); // We know for sure that all cq results will be false from this point @@ -1004,7 +1033,7 @@ class AsyncEnd2endServerTryCancelTest : public AsyncEnd2endTest { std::thread* server_try_cancel_thd = NULL; - auto verif = Verifier(GetParam()); + auto verif = Verifier(GetParam().disable_blocking); if (server_try_cancel == CANCEL_DURING_PROCESSING) { server_try_cancel_thd = @@ -1064,7 +1093,7 @@ class AsyncEnd2endServerTryCancelTest : public AsyncEnd2endTest { // Client attemts to read the three messages from the server for (int tag_idx = 6; tag_idx <= 8; tag_idx++) { cli_stream->Read(&recv_response, tag(tag_idx)); - Verifier(GetParam()) + Verifier(GetParam().disable_blocking) .Expect(tag_idx, expected_cq_result) .Verify(cq_.get(), ignore_cq_result); } @@ -1075,11 +1104,11 @@ class AsyncEnd2endServerTryCancelTest : public AsyncEnd2endTest { // Server finishes the stream (but the RPC is already cancelled) srv_stream.Finish(Status::CANCELLED, tag(9)); - Verifier(GetParam()).Expect(9, false).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(9, false).Verify(cq_.get()); // Client will see the cancellation cli_stream->Finish(&recv_status, tag(10)); - Verifier(GetParam()).Expect(10, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(10, true).Verify(cq_.get()); EXPECT_FALSE(recv_status.ok()); EXPECT_EQ(::grpc::StatusCode::CANCELLED, recv_status.error_code()); } @@ -1114,19 +1143,19 @@ class AsyncEnd2endServerTryCancelTest : public AsyncEnd2endTest { // Initiate the call from the client side std::unique_ptr> cli_stream(stub_->AsyncBidiStream(&cli_ctx, cq_.get(), tag(1))); - Verifier(GetParam()).Expect(1, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(1, true).Verify(cq_.get()); // On the server, request to be notified of the 'BidiStream' call and // receive the call just made by the client srv_ctx.AsyncNotifyWhenDone(tag(11)); service_.RequestBidiStream(&srv_ctx, &srv_stream, cq_.get(), cq_.get(), tag(2)); - Verifier(GetParam()).Expect(2, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(2, true).Verify(cq_.get()); // Client sends the first and the only message send_request.set_message("Ping"); cli_stream->Write(send_request, tag(3)); - Verifier(GetParam()).Expect(3, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(3, true).Verify(cq_.get()); bool expected_cq_result = true; bool ignore_cq_result = false; @@ -1134,7 +1163,7 @@ class AsyncEnd2endServerTryCancelTest : public AsyncEnd2endTest { if (server_try_cancel == CANCEL_BEFORE_PROCESSING) { srv_ctx.TryCancel(); - Verifier(GetParam()).Expect(11, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(11, true).Verify(cq_.get()); EXPECT_TRUE(srv_ctx.IsCancelled()); // We know for sure that all cq results will be false from this point @@ -1144,7 +1173,7 @@ class AsyncEnd2endServerTryCancelTest : public AsyncEnd2endTest { std::thread* server_try_cancel_thd = NULL; - auto verif = Verifier(GetParam()); + auto verif = Verifier(GetParam().disable_blocking); if (server_try_cancel == CANCEL_DURING_PROCESSING) { server_try_cancel_thd = @@ -1244,10 +1273,10 @@ class AsyncEnd2endServerTryCancelTest : public AsyncEnd2endTest { // know that cq results are supposed to return false on server. srv_stream.Finish(Status::CANCELLED, tag(9)); - Verifier(GetParam()).Expect(9, false).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(9, false).Verify(cq_.get()); cli_stream->Finish(&recv_status, tag(10)); - Verifier(GetParam()).Expect(10, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking).Expect(10, true).Verify(cq_.get()); EXPECT_FALSE(recv_status.ok()); EXPECT_EQ(grpc::StatusCode::CANCELLED, recv_status.error_code()); } @@ -1289,11 +1318,29 @@ TEST_P(AsyncEnd2endServerTryCancelTest, ServerBidiStreamingTryCancelAfter) { TestBidiStreamingServerCancel(CANCEL_AFTER_PROCESSING); } +std::vector CreateTestScenarios(bool test_disable_blocking, + bool test_secure) { + std::vector scenarios; + std::vector credentials_types; + if (test_secure) { + credentials_types = GetSecureCredentialsTypeList(); + } + credentials_types.push_back(kInsecureCredentialsType); + for (auto it = credentials_types.begin(); it != credentials_types.end(); + ++it) { + scenarios.push_back(TestScenario(false, *it)); + if (test_disable_blocking) { + scenarios.push_back(TestScenario(true, *it)); + } + } + return scenarios; +} + INSTANTIATE_TEST_CASE_P(AsyncEnd2end, AsyncEnd2endTest, - ::testing::Values(false, true)); + ::testing::ValuesIn(CreateTestScenarios(true, true))); INSTANTIATE_TEST_CASE_P(AsyncEnd2endServerTryCancel, AsyncEnd2endServerTryCancelTest, - ::testing::Values(false)); + ::testing::ValuesIn(CreateTestScenarios(false, false))); } // namespace } // namespace testing From 957fe8dc5de97d9b59de91522c8afab294abe9f4 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 2 May 2016 15:03:55 -0700 Subject: [PATCH 0196/1894] Updated a couple more scripts --- tools/gce/linux_performance_worker_init.sh | 3 +++ tools/run_tests/performance/run_worker_node.sh | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/gce/linux_performance_worker_init.sh b/tools/gce/linux_performance_worker_init.sh index 25ac3bcedea..df29581e69a 100755 --- a/tools/gce/linux_performance_worker_init.sh +++ b/tools/gce/linux_performance_worker_init.sh @@ -95,6 +95,9 @@ sudo pip install tox touch .profile curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash nvm install 0.12 && npm config set cache /tmp/npm-cache +nvm install 4 && npm config set cache /tmp/npm-cache +nvm install 5 && npm config set cache /tmp/npm-cache +nvm alias default 4 # C# dependencies (http://www.mono-project.com/docs/getting-started/install/linux/#debian-ubuntu-and-derivatives) diff --git a/tools/run_tests/performance/run_worker_node.sh b/tools/run_tests/performance/run_worker_node.sh index 46b6ff01774..9a53a311f40 100755 --- a/tools/run_tests/performance/run_worker_node.sh +++ b/tools/run_tests/performance/run_worker_node.sh @@ -29,7 +29,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. source ~/.nvm/nvm.sh -nvm use 0.12 +nvm use 4 set -ex From dedae79cd46cb84187ca68854e191dbdb4cb9fae Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 2 May 2016 15:05:37 -0700 Subject: [PATCH 0197/1894] Finished ruby generator change --- src/compiler/ruby_generator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/ruby_generator.cc b/src/compiler/ruby_generator.cc index 4ca06a4554d..936a186beb5 100644 --- a/src/compiler/ruby_generator.cc +++ b/src/compiler/ruby_generator.cc @@ -98,8 +98,8 @@ void PrintService(const ServiceDescriptor *service, const grpc::string &package, out->Print("self.marshal_class_method = :encode\n"); out->Print("self.unmarshal_class_method = :decode\n"); std::map pkg_vars = - ListToDict({"service_full_namename", service->full_name()}); - out->Print(pkg_vars, "self.service_name = '$pkg.name$.$service.name$'\n"); + ListToDict({"service_full_name", service->full_name()}); + out->Print(pkg_vars, "self.service_name = '$service_full_name$'\n"); out->Print("\n"); for (int i = 0; i < service->method_count(); ++i) { PrintMethod(service->method(i), package, out); From d7b1e704a829ccdc9e353e80faee634b1414265e Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Mon, 2 May 2016 15:10:21 -0700 Subject: [PATCH 0198/1894] Cover large message sent securely or insecurely over async --- test/cpp/end2end/async_end2end_test.cc | 80 +++++++++++++++++--------- 1 file changed, 54 insertions(+), 26 deletions(-) diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index 8d58726f13d..4de181b9011 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -201,15 +201,24 @@ class Verifier { class TestScenario { public: - TestScenario(bool non_block, const grpc::string& creds_type) - : disable_blocking(non_block), credentials_type(creds_type) {} + TestScenario(bool non_block, const grpc::string& creds_type, + const grpc::string& content) + : disable_blocking(non_block), + credentials_type(creds_type), + message_content(content) {} + void Log() const { + gpr_log(GPR_INFO, + "Scenario: disable_blocking %d, credentials %s, message size %d", + disable_blocking, credentials_type.c_str(), message_content.size()); + } bool disable_blocking; const grpc::string credentials_type; + const grpc::string message_content; }; class AsyncEnd2endTest : public ::testing::TestWithParam { protected: - AsyncEnd2endTest() {} + AsyncEnd2endTest() { GetParam().Log(); } void SetUp() GRPC_OVERRIDE { poll_overrider_.reset(new PollingOverrider(!GetParam().disable_blocking)); @@ -260,7 +269,7 @@ class AsyncEnd2endTest : public ::testing::TestWithParam { ServerContext srv_ctx; grpc::ServerAsyncResponseWriter response_writer(&srv_ctx); - send_request.set_message("Hello"); + send_request.set_message(GetParam().message_content); std::unique_ptr> response_reader( stub_->AsyncEcho(&cli_ctx, send_request, cq_.get())); @@ -315,7 +324,7 @@ TEST_P(AsyncEnd2endTest, AsyncNextRpc) { ServerContext srv_ctx; grpc::ServerAsyncResponseWriter response_writer(&srv_ctx); - send_request.set_message("Hello"); + send_request.set_message(GetParam().message_content); std::unique_ptr> response_reader( stub_->AsyncEcho(&cli_ctx, send_request, cq_.get())); @@ -362,7 +371,7 @@ TEST_P(AsyncEnd2endTest, SimpleClientStreaming) { ServerContext srv_ctx; ServerAsyncReader srv_stream(&srv_ctx); - send_request.set_message("Hello"); + send_request.set_message(GetParam().message_content); std::unique_ptr> cli_stream( stub_->AsyncRequestStream(&cli_ctx, &recv_response, cq_.get(), tag(1))); @@ -418,7 +427,7 @@ TEST_P(AsyncEnd2endTest, SimpleServerStreaming) { ServerContext srv_ctx; ServerAsyncWriter srv_stream(&srv_ctx); - send_request.set_message("Hello"); + send_request.set_message(GetParam().message_content); std::unique_ptr> cli_stream( stub_->AsyncResponseStream(&cli_ctx, send_request, cq_.get(), tag(1))); @@ -471,7 +480,7 @@ TEST_P(AsyncEnd2endTest, SimpleBidiStreaming) { ServerContext srv_ctx; ServerAsyncReaderWriter srv_stream(&srv_ctx); - send_request.set_message("Hello"); + send_request.set_message(GetParam().message_content); std::unique_ptr> cli_stream(stub_->AsyncBidiStream(&cli_ctx, cq_.get(), tag(1))); @@ -527,7 +536,7 @@ TEST_P(AsyncEnd2endTest, ClientInitialMetadataRpc) { ServerContext srv_ctx; grpc::ServerAsyncResponseWriter response_writer(&srv_ctx); - send_request.set_message("Hello"); + send_request.set_message(GetParam().message_content); std::pair meta1("key1", "val1"); std::pair meta2("key2", "val2"); std::pair meta3("g.r.d-bin", "xyz"); @@ -576,7 +585,7 @@ TEST_P(AsyncEnd2endTest, ServerInitialMetadataRpc) { ServerContext srv_ctx; grpc::ServerAsyncResponseWriter response_writer(&srv_ctx); - send_request.set_message("Hello"); + send_request.set_message(GetParam().message_content); std::pair meta1("key1", "val1"); std::pair meta2("key2", "val2"); @@ -625,7 +634,7 @@ TEST_P(AsyncEnd2endTest, ServerTrailingMetadataRpc) { ServerContext srv_ctx; grpc::ServerAsyncResponseWriter response_writer(&srv_ctx); - send_request.set_message("Hello"); + send_request.set_message(GetParam().message_content); std::pair meta1("key1", "val1"); std::pair meta2("key2", "val2"); @@ -671,7 +680,7 @@ TEST_P(AsyncEnd2endTest, MetadataRpc) { ServerContext srv_ctx; grpc::ServerAsyncResponseWriter response_writer(&srv_ctx); - send_request.set_message("Hello"); + send_request.set_message(GetParam().message_content); std::pair meta1("key1", "val1"); std::pair meta2( "key2-bin", @@ -750,7 +759,7 @@ TEST_P(AsyncEnd2endTest, ServerCheckCancellation) { ServerContext srv_ctx; grpc::ServerAsyncResponseWriter response_writer(&srv_ctx); - send_request.set_message("Hello"); + send_request.set_message(GetParam().message_content); std::unique_ptr> response_reader( stub_->AsyncEcho(&cli_ctx, send_request, cq_.get())); @@ -785,7 +794,7 @@ TEST_P(AsyncEnd2endTest, ServerCheckDone) { ServerContext srv_ctx; grpc::ServerAsyncResponseWriter response_writer(&srv_ctx); - send_request.set_message("Hello"); + send_request.set_message(GetParam().message_content); std::unique_ptr> response_reader( stub_->AsyncEcho(&cli_ctx, send_request, cq_.get())); @@ -822,7 +831,7 @@ TEST_P(AsyncEnd2endTest, UnimplementedRpc) { Status recv_status; ClientContext cli_ctx; - send_request.set_message("Hello"); + send_request.set_message(GetParam().message_content); std::unique_ptr> response_reader( stub->AsyncUnimplemented(&cli_ctx, send_request, cq_.get())); @@ -1319,28 +1328,47 @@ TEST_P(AsyncEnd2endServerTryCancelTest, ServerBidiStreamingTryCancelAfter) { } std::vector CreateTestScenarios(bool test_disable_blocking, - bool test_secure) { + bool test_secure, + int test_big_limit) { std::vector scenarios; std::vector credentials_types; - if (test_secure) { - credentials_types = GetSecureCredentialsTypeList(); - } + std::vector messages; + credentials_types.push_back(kInsecureCredentialsType); - for (auto it = credentials_types.begin(); it != credentials_types.end(); - ++it) { - scenarios.push_back(TestScenario(false, *it)); - if (test_disable_blocking) { - scenarios.push_back(TestScenario(true, *it)); + auto sec_list = GetSecureCredentialsTypeList(); + for (auto sec = sec_list.begin(); sec != sec_list.end(); sec++) { + credentials_types.push_back(*sec); + } + + messages.push_back("Hello"); + for (int sz = 1; sz < test_big_limit; sz *= 2) { + grpc::string big_msg; + for (int i = 0; i < sz * 1024; i++) { + char c = 'a' + (i % 26); + big_msg += c; + } + messages.push_back(big_msg); + } + + for (auto cred = credentials_types.begin(); cred != credentials_types.end(); + ++cred) { + for (auto msg = messages.begin(); msg != messages.end(); msg++) { + scenarios.push_back(TestScenario(false, *cred, *msg)); + if (test_disable_blocking) { + scenarios.push_back(TestScenario(true, *cred, *msg)); + } } } return scenarios; } INSTANTIATE_TEST_CASE_P(AsyncEnd2end, AsyncEnd2endTest, - ::testing::ValuesIn(CreateTestScenarios(true, true))); + ::testing::ValuesIn(CreateTestScenarios(true, true, + 1024))); INSTANTIATE_TEST_CASE_P(AsyncEnd2endServerTryCancel, AsyncEnd2endServerTryCancelTest, - ::testing::ValuesIn(CreateTestScenarios(false, false))); + ::testing::ValuesIn(CreateTestScenarios(false, false, + 0))); } // namespace } // namespace testing From 7edab7c5e32c74d996b077de6bb7cf5085846d62 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 29 Apr 2016 19:09:37 -0700 Subject: [PATCH 0199/1894] Ruby docker files and config --- .../Dockerfile.template | 41 ++++++++ .../grpc_interop_stress_ruby/Dockerfile | 99 +++++++++++++++++++ .../build_interop_stress.sh | 48 +++++++++ tools/gcp/stress_test/run_ruby.sh | 37 +++++++ tools/run_tests/stress_test/configs/ruby.json | 92 +++++++++++++++++ 5 files changed, 317 insertions(+) create mode 100644 templates/tools/dockerfile/stress_test/grpc_interop_stress_ruby/Dockerfile.template create mode 100644 tools/dockerfile/stress_test/grpc_interop_stress_ruby/Dockerfile create mode 100755 tools/dockerfile/stress_test/grpc_interop_stress_ruby/build_interop_stress.sh create mode 100755 tools/gcp/stress_test/run_ruby.sh create mode 100644 tools/run_tests/stress_test/configs/ruby.json diff --git a/templates/tools/dockerfile/stress_test/grpc_interop_stress_ruby/Dockerfile.template b/templates/tools/dockerfile/stress_test/grpc_interop_stress_ruby/Dockerfile.template new file mode 100644 index 00000000000..8b933aaa324 --- /dev/null +++ b/templates/tools/dockerfile/stress_test/grpc_interop_stress_ruby/Dockerfile.template @@ -0,0 +1,41 @@ +%YAML 1.2 +--- | + # Copyright 2015, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../../apt_get_basic.include"/> + <%include file="../../ccache_setup.include"/> + <%include file="../../cxx_deps.include"/> + <%include file="../../gcp_api_libraries.include"/> + <%include file="../../ruby_deps.include"/> + # Define the default command. + CMD ["bash"] + diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_ruby/Dockerfile b/tools/dockerfile/stress_test/grpc_interop_stress_ruby/Dockerfile new file mode 100644 index 00000000000..36b54ddafe3 --- /dev/null +++ b/tools/dockerfile/stress_test/grpc_interop_stress_ruby/Dockerfile @@ -0,0 +1,99 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +FROM debian:jessie + +# Install Git and basic packages. +RUN apt-get update && apt-get install -y \ + autoconf \ + autotools-dev \ + build-essential \ + bzip2 \ + ccache \ + curl \ + gcc \ + gcc-multilib \ + git \ + golang \ + gyp \ + lcov \ + libc6 \ + libc6-dbg \ + libc6-dev \ + libgtest-dev \ + libtool \ + make \ + perl \ + strace \ + python-dev \ + python-setuptools \ + python-yaml \ + telnet \ + unzip \ + wget \ + zip && apt-get clean + +#================ +# Build profiling +RUN apt-get update && apt-get install -y time && apt-get clean + +# Prepare ccache +RUN ln -s /usr/bin/ccache /usr/local/bin/gcc +RUN ln -s /usr/bin/ccache /usr/local/bin/g++ +RUN ln -s /usr/bin/ccache /usr/local/bin/cc +RUN ln -s /usr/bin/ccache /usr/local/bin/c++ +RUN ln -s /usr/bin/ccache /usr/local/bin/clang +RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ + +#================= +# C++ dependencies +RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean + +# Google Cloud platform API libraries +RUN apt-get update && apt-get install -y python-pip && apt-get clean +RUN pip install --upgrade google-api-python-client + + +#================== +# Ruby dependencies + +# Install rvm +RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 +RUN \curl -sSL https://get.rvm.io | bash -s stable + +# Install Ruby 2.1 +RUN /bin/bash -l -c "rvm install ruby-2.1" +RUN /bin/bash -l -c "rvm use --default ruby-2.1" +RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" +RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" +RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc" +RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc" + +# Define the default command. +CMD ["bash"] diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_ruby/build_interop_stress.sh b/tools/dockerfile/stress_test/grpc_interop_stress_ruby/build_interop_stress.sh new file mode 100755 index 00000000000..1b7567d87a6 --- /dev/null +++ b/tools/dockerfile/stress_test/grpc_interop_stress_ruby/build_interop_stress.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Builds Ruby interop server and client in a base image. +set -e + +mkdir -p /var/local/git +git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc + +# Copy service account keys if available +cp -r /var/local/jenkins/service_account $HOME || true + +cd /var/local/git/grpc +rvm --default use ruby-2.1 + +# Build Ruby interop client and server +(cd src/ruby && gem update bundler && bundle && rake compile) + +# Build c++ metrics client to query the metrics from ruby stress client +make metrics_client -j + diff --git a/tools/gcp/stress_test/run_ruby.sh b/tools/gcp/stress_test/run_ruby.sh new file mode 100755 index 00000000000..80d0567447b --- /dev/null +++ b/tools/gcp/stress_test/run_ruby.sh @@ -0,0 +1,37 @@ +#!/bin/bash +# Copyright 2015-2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# This is a wrapper script that was created to help run_server.py and +# run_client.py to launch 'node js' stress clients and stress servers +source /etc/profile.d/rvm.sh + +set -ex + +$@ diff --git a/tools/run_tests/stress_test/configs/ruby.json b/tools/run_tests/stress_test/configs/ruby.json new file mode 100644 index 00000000000..a323fa72b6b --- /dev/null +++ b/tools/run_tests/stress_test/configs/ruby.json @@ -0,0 +1,92 @@ +{ + "dockerImages": { + "grpc_stress_ruby" : { + "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "dockerFileDir": "grpc_interop_stress_ruby" + } + }, + + "clientTemplates": { + "baseTemplates": { + "default": { + "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py", + "pollIntervalSecs": 60, + "clientArgs": { + "num_channels_per_server":5, + "num_stubs_per_channel":10, + "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1", + "metrics_port": 8081 + }, + "metricsPort": 8081, + "metricsArgs": { + "metrics_server_address": "localhost:8081", + "total_only": "true" + } + } + }, + "templates": { + "ruby_client": { + "baseTemplate": "default", + "stressClientCmd": [ + "/var/local/git/grpc/tools/gcp/stress_test/run_ruby.sh", + "ruby", + "/var/local/git/grpc/src/ruby/stress/stress_client.rb" + ], + "metricsClientCmd": ["/var/local/git/grpc/bins/opt/metrics_client"] + } + } + }, + + "serverTemplates": { + "baseTemplates":{ + "default": { + "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py", + "serverPort": 8080, + "serverArgs": { + "port": 8080 + } + } + }, + "templates": { + "ruby_server": { + "baseTemplate": "default", + "stressServerCmd": [ + "/var/local/git/grpc/tools/gcp/stress_test/run_ruby.sh", + "ruby", + "/var/local/git/grpc/src/ruby/pb/test/server.rb" + ] + } + } + }, + + "testMatrix": { + "serverPodSpecs": { + "stress-server-ruby": { + "serverTemplate": "ruby_server", + "dockerImage": "grpc_stress_ruby", + "numInstances": 1 + } + }, + + "clientPodSpecs": { + "stress-client-ruby": { + "clientTemplate": "ruby_client", + "dockerImage": "grpc_stress_ruby", + "numInstances": 10, + "serverPodSpec": "stress-server-ruby" + } + } + }, + + "globalSettings": { + "buildDockerImages": true, + "pollIntervalSecs": 60, + "testDurationSecs": 7200, + "kubernetesProxyPort": 8001, + "datasetIdNamePrefix": "stress_test_ruby", + "summaryTableId": "summary", + "qpsTableId": "qps", + "podWarmupSecs": 60 + } +} + From 70f697ba1e6ad17422928a398807e84f8f469724 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Mon, 2 May 2016 22:29:21 -0700 Subject: [PATCH 0200/1894] reran generate_projects.sh after @nnoble's fix in PR6399. --- grpc.def | 1 - src/python/grpcio/grpc/_cython/imports.generated.c | 2 -- src/python/grpcio/grpc/_cython/imports.generated.h | 4 ---- src/ruby/ext/grpc/rb_grpc_imports.generated.c | 2 -- src/ruby/ext/grpc/rb_grpc_imports.generated.h | 4 ---- 5 files changed, 13 deletions(-) diff --git a/grpc.def b/grpc.def index 09a94a6cd0c..61948ed1b89 100644 --- a/grpc.def +++ b/grpc.def @@ -87,7 +87,6 @@ EXPORTS grpc_header_nonbin_value_is_legal grpc_is_binary_header grpc_call_error_to_string - grpc_cronet_secure_channel_create grpc_auth_property_iterator_next grpc_auth_context_property_iterator grpc_auth_context_peer_identity diff --git a/src/python/grpcio/grpc/_cython/imports.generated.c b/src/python/grpcio/grpc/_cython/imports.generated.c index 09551472b5f..f0a40dbb35c 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.c +++ b/src/python/grpcio/grpc/_cython/imports.generated.c @@ -125,7 +125,6 @@ grpc_header_key_is_legal_type grpc_header_key_is_legal_import; grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_import; grpc_is_binary_header_type grpc_is_binary_header_import; grpc_call_error_to_string_type grpc_call_error_to_string_import; -grpc_cronet_secure_channel_create_type grpc_cronet_secure_channel_create_import; grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import; grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import; @@ -396,7 +395,6 @@ void pygrpc_load_imports(HMODULE library) { grpc_header_nonbin_value_is_legal_import = (grpc_header_nonbin_value_is_legal_type) GetProcAddress(library, "grpc_header_nonbin_value_is_legal"); grpc_is_binary_header_import = (grpc_is_binary_header_type) GetProcAddress(library, "grpc_is_binary_header"); grpc_call_error_to_string_import = (grpc_call_error_to_string_type) GetProcAddress(library, "grpc_call_error_to_string"); - grpc_cronet_secure_channel_create_import = (grpc_cronet_secure_channel_create_type) GetProcAddress(library, "grpc_cronet_secure_channel_create"); grpc_auth_property_iterator_next_import = (grpc_auth_property_iterator_next_type) GetProcAddress(library, "grpc_auth_property_iterator_next"); grpc_auth_context_property_iterator_import = (grpc_auth_context_property_iterator_type) GetProcAddress(library, "grpc_auth_context_property_iterator"); grpc_auth_context_peer_identity_import = (grpc_auth_context_peer_identity_type) GetProcAddress(library, "grpc_auth_context_peer_identity"); diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index 54c8aaad13e..d5e810b7cf4 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include @@ -326,9 +325,6 @@ extern grpc_is_binary_header_type grpc_is_binary_header_import; typedef const char *(*grpc_call_error_to_string_type)(grpc_call_error error); extern grpc_call_error_to_string_type grpc_call_error_to_string_import; #define grpc_call_error_to_string grpc_call_error_to_string_import -typedef grpc_channel *(*grpc_cronet_secure_channel_create_type)(void *engine, const char *target, const grpc_channel_args *args, void *reserved); -extern grpc_cronet_secure_channel_create_type grpc_cronet_secure_channel_create_import; -#define grpc_cronet_secure_channel_create grpc_cronet_secure_channel_create_import typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); extern grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; #define grpc_auth_property_iterator_next grpc_auth_property_iterator_next_import diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index cebbe8c40fe..bc43f9d36b5 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -125,7 +125,6 @@ grpc_header_key_is_legal_type grpc_header_key_is_legal_import; grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_import; grpc_is_binary_header_type grpc_is_binary_header_import; grpc_call_error_to_string_type grpc_call_error_to_string_import; -grpc_cronet_secure_channel_create_type grpc_cronet_secure_channel_create_import; grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import; grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import; @@ -392,7 +391,6 @@ void grpc_rb_load_imports(HMODULE library) { grpc_header_nonbin_value_is_legal_import = (grpc_header_nonbin_value_is_legal_type) GetProcAddress(library, "grpc_header_nonbin_value_is_legal"); grpc_is_binary_header_import = (grpc_is_binary_header_type) GetProcAddress(library, "grpc_is_binary_header"); grpc_call_error_to_string_import = (grpc_call_error_to_string_type) GetProcAddress(library, "grpc_call_error_to_string"); - grpc_cronet_secure_channel_create_import = (grpc_cronet_secure_channel_create_type) GetProcAddress(library, "grpc_cronet_secure_channel_create"); grpc_auth_property_iterator_next_import = (grpc_auth_property_iterator_next_type) GetProcAddress(library, "grpc_auth_property_iterator_next"); grpc_auth_context_property_iterator_import = (grpc_auth_context_property_iterator_type) GetProcAddress(library, "grpc_auth_context_property_iterator"); grpc_auth_context_peer_identity_import = (grpc_auth_context_peer_identity_type) GetProcAddress(library, "grpc_auth_context_peer_identity"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index d7ea6c574c8..b67361ca25b 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include @@ -326,9 +325,6 @@ extern grpc_is_binary_header_type grpc_is_binary_header_import; typedef const char *(*grpc_call_error_to_string_type)(grpc_call_error error); extern grpc_call_error_to_string_type grpc_call_error_to_string_import; #define grpc_call_error_to_string grpc_call_error_to_string_import -typedef grpc_channel *(*grpc_cronet_secure_channel_create_type)(void *engine, const char *target, const grpc_channel_args *args, void *reserved); -extern grpc_cronet_secure_channel_create_type grpc_cronet_secure_channel_create_import; -#define grpc_cronet_secure_channel_create grpc_cronet_secure_channel_create_import typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); extern grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; #define grpc_auth_property_iterator_next grpc_auth_property_iterator_next_import From 97eb4f6779ad232792c7f79738276d5ce13aa343 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 2 May 2016 13:08:12 -0700 Subject: [PATCH 0201/1894] add more tests --- .../Grpc.Core.Tests/Internal/AsyncCallTest.cs | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs index a678e4dafe1..605072b3237 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs @@ -32,6 +32,7 @@ #endregion using System; +using System.Collections.Generic; using System.Runtime.InteropServices; using System.Threading.Tasks; @@ -118,6 +119,14 @@ namespace Grpc.Core.Internal.Tests AssertUnaryResponseError(asyncCall, fakeCall, resultTask, StatusCode.Internal); } + [Test] + public void ClientStreaming_StreamingReadNotAllowed() + { + asyncCall.ClientStreamingCallAsync(); + Assert.Throws(typeof(InvalidOperationException), + () => asyncCall.StartReadMessage((x,y) => {})); + } + [Test] public void ClientStreaming_NoRequest_Success() { @@ -142,6 +151,47 @@ namespace Grpc.Core.Internal.Tests AssertUnaryResponseError(asyncCall, fakeCall, resultTask, StatusCode.InvalidArgument); } + [Test] + public void ServerStreaming_StreamingSendNotAllowed() + { + asyncCall.StartServerStreamingCall("request1"); + Assert.Throws(typeof(InvalidOperationException), + () => asyncCall.StartSendMessage("abc", new WriteFlags(), (x,y) => {})); + } + + [Test] + public void ServerStreaming_NoResponse1_Success() + { + asyncCall.StartServerStreamingCall("request1"); + var responseStream = new ClientResponseStream(asyncCall); + var readTask = responseStream.MoveNext(); + + fakeCall.ReceivedResponseHeadersHandler(true, new Metadata()); + Assert.AreEqual(0, asyncCall.ResponseHeadersAsync.Result.Count); + + fakeCall.ReceivedMessageHandler(true, null); + fakeCall.ReceivedStatusOnClientHandler(true, new ClientSideStatus(Status.DefaultSuccess, new Metadata())); + + AssertStreamingResponseSuccess(asyncCall, fakeCall, readTask); + } + + [Test] + public void ServerStreaming_NoResponse2_Success() + { + asyncCall.StartServerStreamingCall("request1"); + var responseStream = new ClientResponseStream(asyncCall); + var readTask = responseStream.MoveNext(); + + fakeCall.ReceivedResponseHeadersHandler(true, new Metadata()); + Assert.AreEqual(0, asyncCall.ResponseHeadersAsync.Result.Count); + + // try alternative order of completions + fakeCall.ReceivedStatusOnClientHandler(true, new ClientSideStatus(Status.DefaultSuccess, new Metadata())); + fakeCall.ReceivedMessageHandler(true, null); + + AssertStreamingResponseSuccess(asyncCall, fakeCall, readTask); + } + ClientSideStatus CreateClientSideStatus(StatusCode statusCode) { return new ClientSideStatus(new Status(statusCode, ""), new Metadata()); @@ -163,6 +213,17 @@ namespace Grpc.Core.Internal.Tests Assert.AreEqual("response1", resultTask.Result); } + static void AssertStreamingResponseSuccess(AsyncCall asyncCall, FakeNativeCall fakeCall, Task moveNextTask) + { + Assert.IsTrue(moveNextTask.IsCompleted); + Assert.IsTrue(fakeCall.IsDisposed); + + Assert.IsFalse(moveNextTask.Result); + Assert.AreEqual(Status.DefaultSuccess, asyncCall.GetStatus()); + Assert.AreEqual(0, asyncCall.ResponseHeadersAsync.Result.Count); + Assert.AreEqual(0, asyncCall.GetTrailers().Count); + } + static void AssertUnaryResponseError(AsyncCall asyncCall, FakeNativeCall fakeCall, Task resultTask, StatusCode expectedStatusCode) { Assert.IsTrue(resultTask.IsCompleted); From 69274c2a0d316ccac66a5fa726255de0c8197834 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 2 May 2016 15:34:40 -0700 Subject: [PATCH 0202/1894] add more features --- .../Grpc.Core.Tests/Internal/AsyncCallTest.cs | 31 +++++++++++++++++-- .../Grpc.Core/Internal/AsyncCallBase.cs | 6 ++-- 2 files changed, 33 insertions(+), 4 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs index 605072b3237..324b6825102 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs @@ -160,7 +160,7 @@ namespace Grpc.Core.Internal.Tests } [Test] - public void ServerStreaming_NoResponse1_Success() + public void ServerStreaming_NoResponse_Success1() { asyncCall.StartServerStreamingCall("request1"); var responseStream = new ClientResponseStream(asyncCall); @@ -176,7 +176,7 @@ namespace Grpc.Core.Internal.Tests } [Test] - public void ServerStreaming_NoResponse2_Success() + public void ServerStreaming_NoResponse_Success2() { asyncCall.StartServerStreamingCall("request1"); var responseStream = new ClientResponseStream(asyncCall); @@ -192,6 +192,22 @@ namespace Grpc.Core.Internal.Tests AssertStreamingResponseSuccess(asyncCall, fakeCall, readTask); } + [Test] + public void ServerStreaming_NoResponse_ReadFailure() + { + asyncCall.StartServerStreamingCall("request1"); + var responseStream = new ClientResponseStream(asyncCall); + var readTask = responseStream.MoveNext(); + + fakeCall.ReceivedResponseHeadersHandler(true, new Metadata()); + Assert.AreEqual(0, asyncCall.ResponseHeadersAsync.Result.Count); + + fakeCall.ReceivedMessageHandler(false, null); // after a failed read, we rely on C core to deliver appropriate status code. + fakeCall.ReceivedStatusOnClientHandler(true, CreateClientSideStatus(StatusCode.Internal)); + + AssertStreamingResponseError(asyncCall, fakeCall, readTask, StatusCode.Internal); + } + ClientSideStatus CreateClientSideStatus(StatusCode statusCode) { return new ClientSideStatus(new Status(statusCode, ""), new Metadata()); @@ -236,6 +252,17 @@ namespace Grpc.Core.Internal.Tests Assert.AreEqual(0, asyncCall.GetTrailers().Count); } + static void AssertStreamingResponseError(AsyncCall asyncCall, FakeNativeCall fakeCall, Task moveNextTask, StatusCode expectedStatusCode) + { + Assert.IsTrue(moveNextTask.IsCompleted); + Assert.IsTrue(fakeCall.IsDisposed); + + var ex = Assert.ThrowsAsync(async () => await moveNextTask); + Assert.AreEqual(expectedStatusCode, asyncCall.GetStatus().StatusCode); + Assert.AreEqual(0, asyncCall.ResponseHeadersAsync.Result.Count); + Assert.AreEqual(0, asyncCall.GetTrailers().Count); + } + internal class FakeNativeCall : INativeCall { public UnaryResponseClientHandler UnaryResponseClientHandler diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs index ccd047f4695..877b997aba0 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs @@ -346,6 +346,10 @@ namespace Grpc.Core.Internal /// protected void HandleReadFinished(bool success, byte[] receivedMessage) { + // if success == false, received message will be null. It that case we will + // treat this completion as the last read an rely on C core to handle the failed + // read (e.g. deliver approriate statusCode on the clientside). + TRead msg = default(TRead); var deserializeException = (success && receivedMessage != null) ? TryDeserialize(receivedMessage, out msg) : null; @@ -370,8 +374,6 @@ namespace Grpc.Core.Internal ReleaseResourcesIfPossible(); } - // TODO: handle the case when success==false - if (deserializeException != null && !IsClient) { FireCompletion(origCompletionDelegate, default(TRead), new IOException("Failed to deserialize request message.", deserializeException)); From a83ad2aa65a04d16b484e7c4373b7db5575221a4 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 2 May 2016 17:13:00 -0700 Subject: [PATCH 0203/1894] add idempotency test --- .../Grpc.Core.Tests/ClientServerTest.cs | 31 +++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/src/csharp/Grpc.Core.Tests/ClientServerTest.cs b/src/csharp/Grpc.Core.Tests/ClientServerTest.cs index 6c13a4fa483..44be94c5ae6 100644 --- a/src/csharp/Grpc.Core.Tests/ClientServerTest.cs +++ b/src/csharp/Grpc.Core.Tests/ClientServerTest.cs @@ -166,6 +166,37 @@ namespace Grpc.Core.Tests Assert.IsNotNull("xyz", call.GetTrailers()[0].Key); } + [Test] + public async Task ServerStreamingCall_EndOfStreamIsIdempotent() + { + helper.ServerStreamingHandler = new ServerStreamingServerMethod(async (request, responseStream, context) => + { + }); + + var call = Calls.AsyncServerStreamingCall(helper.CreateServerStreamingCall(), ""); + + Assert.IsFalse(await call.ResponseStream.MoveNext()); + Assert.IsFalse(await call.ResponseStream.MoveNext()); + } + + [Test] + public async Task ServerStreamingCall_ErrorCanBeAwaitedTwice() + { + helper.ServerStreamingHandler = new ServerStreamingServerMethod(async (request, responseStream, context) => + { + context.Status = new Status(StatusCode.InvalidArgument, ""); + }); + + var call = Calls.AsyncServerStreamingCall(helper.CreateServerStreamingCall(), ""); + + var ex = Assert.ThrowsAsync(async () => await call.ResponseStream.MoveNext()); + Assert.AreEqual(StatusCode.InvalidArgument, ex.Status.StatusCode); + + // attempting MoveNext again should result in throwing the same exception. + var ex2 = Assert.ThrowsAsync(async () => await call.ResponseStream.MoveNext()); + Assert.AreEqual(StatusCode.InvalidArgument, ex2.Status.StatusCode); + } + [Test] public async Task DuplexStreamingCall() { From 96f21a27cb7975d52aa92197536eef0ad8dca455 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 2 May 2016 17:17:18 -0700 Subject: [PATCH 0204/1894] make end-of-stream idempotent --- .../Grpc.Core.Tests/Internal/AsyncCallTest.cs | 39 +++++++++++++------ src/csharp/Grpc.Core/Internal/AsyncCall.cs | 5 +-- .../Grpc.Core/Internal/AsyncCallBase.cs | 39 ++++++++++++------- .../Grpc.Core/Internal/AsyncCallServer.cs | 5 +-- .../Internal/ClientResponseStream.cs | 4 +- .../Grpc.Core/Internal/ServerRequestStream.cs | 4 +- 6 files changed, 58 insertions(+), 38 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs index 324b6825102..96749cda14a 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs @@ -76,8 +76,8 @@ namespace Grpc.Core.Internal.Tests public void AsyncUnary_StreamingOperationsNotAllowed() { asyncCall.UnaryCallAsync("request1"); - Assert.Throws(typeof(InvalidOperationException), - () => asyncCall.StartReadMessage((x,y) => {})); + Assert.ThrowsAsync(typeof(InvalidOperationException), + async () => await asyncCall.ReadMessageAsync()); Assert.Throws(typeof(InvalidOperationException), () => asyncCall.StartSendMessage("abc", new WriteFlags(), (x,y) => {})); } @@ -123,8 +123,8 @@ namespace Grpc.Core.Internal.Tests public void ClientStreaming_StreamingReadNotAllowed() { asyncCall.ClientStreamingCallAsync(); - Assert.Throws(typeof(InvalidOperationException), - () => asyncCall.StartReadMessage((x,y) => {})); + Assert.ThrowsAsync(typeof(InvalidOperationException), + async () => await asyncCall.ReadMessageAsync()); } [Test] @@ -182,9 +182,6 @@ namespace Grpc.Core.Internal.Tests var responseStream = new ClientResponseStream(asyncCall); var readTask = responseStream.MoveNext(); - fakeCall.ReceivedResponseHeadersHandler(true, new Metadata()); - Assert.AreEqual(0, asyncCall.ResponseHeadersAsync.Result.Count); - // try alternative order of completions fakeCall.ReceivedStatusOnClientHandler(true, new ClientSideStatus(Status.DefaultSuccess, new Metadata())); fakeCall.ReceivedMessageHandler(true, null); @@ -199,15 +196,35 @@ namespace Grpc.Core.Internal.Tests var responseStream = new ClientResponseStream(asyncCall); var readTask = responseStream.MoveNext(); - fakeCall.ReceivedResponseHeadersHandler(true, new Metadata()); - Assert.AreEqual(0, asyncCall.ResponseHeadersAsync.Result.Count); - fakeCall.ReceivedMessageHandler(false, null); // after a failed read, we rely on C core to deliver appropriate status code. fakeCall.ReceivedStatusOnClientHandler(true, CreateClientSideStatus(StatusCode.Internal)); AssertStreamingResponseError(asyncCall, fakeCall, readTask, StatusCode.Internal); } + [Test] + public void ServerStreaming_MoreResponses_Success() + { + asyncCall.StartServerStreamingCall("request1"); + var responseStream = new ClientResponseStream(asyncCall); + + var readTask1 = responseStream.MoveNext(); + fakeCall.ReceivedMessageHandler(true, CreateResponsePayload()); + Assert.IsTrue(readTask1.Result); + Assert.AreEqual("response1", responseStream.Current); + + var readTask2 = responseStream.MoveNext(); + fakeCall.ReceivedMessageHandler(true, CreateResponsePayload()); + Assert.IsTrue(readTask2.Result); + Assert.AreEqual("response1", responseStream.Current); + + var readTask3 = responseStream.MoveNext(); + fakeCall.ReceivedStatusOnClientHandler(true, new ClientSideStatus(Status.DefaultSuccess, new Metadata())); + fakeCall.ReceivedMessageHandler(true, null); + + AssertStreamingResponseSuccess(asyncCall, fakeCall, readTask3); + } + ClientSideStatus CreateClientSideStatus(StatusCode statusCode) { return new ClientSideStatus(new Status(statusCode, ""), new Metadata()); @@ -236,7 +253,6 @@ namespace Grpc.Core.Internal.Tests Assert.IsFalse(moveNextTask.Result); Assert.AreEqual(Status.DefaultSuccess, asyncCall.GetStatus()); - Assert.AreEqual(0, asyncCall.ResponseHeadersAsync.Result.Count); Assert.AreEqual(0, asyncCall.GetTrailers().Count); } @@ -259,7 +275,6 @@ namespace Grpc.Core.Internal.Tests var ex = Assert.ThrowsAsync(async () => await moveNextTask); Assert.AreEqual(expectedStatusCode, asyncCall.GetStatus().StatusCode); - Assert.AreEqual(0, asyncCall.ResponseHeadersAsync.Result.Count); Assert.AreEqual(0, asyncCall.GetTrailers().Count); } diff --git a/src/csharp/Grpc.Core/Internal/AsyncCall.cs b/src/csharp/Grpc.Core/Internal/AsyncCall.cs index 50ba617cdb1..f522174bd0f 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCall.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCall.cs @@ -241,11 +241,10 @@ namespace Grpc.Core.Internal /// /// Receives a streaming response. Only one pending read action is allowed at any given time. - /// completionDelegate is called when the operation finishes. /// - public void StartReadMessage(AsyncCompletionDelegate completionDelegate) + public Task ReadMessageAsync() { - StartReadMessageInternal(completionDelegate); + return ReadMessageInternalAsync(); } /// diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs index 877b997aba0..abacfabadb6 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs @@ -68,7 +68,7 @@ namespace Grpc.Core.Internal protected bool cancelRequested; protected AsyncCompletionDelegate sendCompletionDelegate; // Completion of a pending send or sendclose if not null. - protected AsyncCompletionDelegate readCompletionDelegate; // Completion of a pending send or sendclose if not null. + protected TaskCompletionSource streamingReadTcs; // Completion of a pending streaming read if not null. protected bool readingDone; // True if last read (i.e. read with null payload) was already received. protected bool halfcloseRequested; // True if send close have been initiated. @@ -150,15 +150,25 @@ namespace Grpc.Core.Internal /// Initiates reading a message. Only one read operation can be active at a time. /// completionDelegate is invoked upon completion. /// - protected void StartReadMessageInternal(AsyncCompletionDelegate completionDelegate) + protected Task ReadMessageInternalAsync() { lock (myLock) { - GrpcPreconditions.CheckNotNull(completionDelegate, "Completion delegate cannot be null"); CheckReadingAllowed(); + if (readingDone) + { + // the last read that returns null or throws an exception is idempotent + // and maintain its state. + GrpcPreconditions.CheckState(streamingReadTcs != null, "Call does not support streaming reads."); + return streamingReadTcs.Task; + } + + GrpcPreconditions.CheckState(streamingReadTcs == null, "Only one read can be pending at a time"); + GrpcPreconditions.CheckState(!disposed); call.StartReceiveMessage(HandleReadFinished); - readCompletionDelegate = completionDelegate; + streamingReadTcs = new TaskCompletionSource(); + return streamingReadTcs.Task; } } @@ -216,10 +226,6 @@ namespace Grpc.Core.Internal protected virtual void CheckReadingAllowed() { GrpcPreconditions.CheckState(started); - GrpcPreconditions.CheckState(!disposed); - - GrpcPreconditions.CheckState(!readingDone, "Stream has already been closed."); - GrpcPreconditions.CheckState(readCompletionDelegate == null, "Only one read can be pending at a time"); } protected void CheckNotCancelled() @@ -353,12 +359,10 @@ namespace Grpc.Core.Internal TRead msg = default(TRead); var deserializeException = (success && receivedMessage != null) ? TryDeserialize(receivedMessage, out msg) : null; - AsyncCompletionDelegate origCompletionDelegate = null; + TaskCompletionSource origTcs = null; lock (myLock) { - origCompletionDelegate = readCompletionDelegate; - readCompletionDelegate = null; - + origTcs = streamingReadTcs; if (receivedMessage == null) { // This was the last read. @@ -368,18 +372,25 @@ namespace Grpc.Core.Internal if (deserializeException != null && IsClient) { readingDone = true; + + // TODO(jtattermusch): it might be too late to set the status CancelWithStatus(DeserializeResponseFailureStatus); } + if (!readingDone) + { + streamingReadTcs = null; + } + ReleaseResourcesIfPossible(); } if (deserializeException != null && !IsClient) { - FireCompletion(origCompletionDelegate, default(TRead), new IOException("Failed to deserialize request message.", deserializeException)); + origTcs.SetException(new IOException("Failed to deserialize request message.", deserializeException)); return; } - FireCompletion(origCompletionDelegate, msg, null); + origTcs.SetResult(msg); } } } diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs index bea2b3660c3..cce480b2c4a 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs @@ -91,11 +91,10 @@ namespace Grpc.Core.Internal /// /// Receives a streaming request. Only one pending read action is allowed at any given time. - /// completionDelegate is called when the operation finishes. /// - public void StartReadMessage(AsyncCompletionDelegate completionDelegate) + public Task ReadMessageAsync() { - StartReadMessageInternal(completionDelegate); + return ReadMessageInternalAsync(); } /// diff --git a/src/csharp/Grpc.Core/Internal/ClientResponseStream.cs b/src/csharp/Grpc.Core/Internal/ClientResponseStream.cs index d6e34a0f044..ad9423ff58c 100644 --- a/src/csharp/Grpc.Core/Internal/ClientResponseStream.cs +++ b/src/csharp/Grpc.Core/Internal/ClientResponseStream.cs @@ -68,9 +68,7 @@ namespace Grpc.Core.Internal { throw new InvalidOperationException("Cancellation of individual reads is not supported."); } - var taskSource = new AsyncCompletionTaskSource(); - call.StartReadMessage(taskSource.CompletionDelegate); - var result = await taskSource.Task.ConfigureAwait(false); + var result = await call.ReadMessageAsync().ConfigureAwait(false); this.current = result; if (result == null) diff --git a/src/csharp/Grpc.Core/Internal/ServerRequestStream.cs b/src/csharp/Grpc.Core/Internal/ServerRequestStream.cs index e7be82c3185..d76030d1add 100644 --- a/src/csharp/Grpc.Core/Internal/ServerRequestStream.cs +++ b/src/csharp/Grpc.Core/Internal/ServerRequestStream.cs @@ -68,9 +68,7 @@ namespace Grpc.Core.Internal { throw new InvalidOperationException("Cancellation of individual reads is not supported."); } - var taskSource = new AsyncCompletionTaskSource(); - call.StartReadMessage(taskSource.CompletionDelegate); - var result = await taskSource.Task.ConfigureAwait(false); + var result = await call.ReadMessageAsync().ConfigureAwait(false); this.current = result; return result != null; } From a2966776f7f40e2095bba1f4d8b5922c239dfe9e Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 2 May 2016 18:29:23 -0700 Subject: [PATCH 0205/1894] add more tests --- .../Grpc.Core.Tests/Internal/AsyncCallTest.cs | 206 ++++++++++++++++++ 1 file changed, 206 insertions(+) diff --git a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs index 96749cda14a..ed2d22815b6 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs @@ -41,6 +41,9 @@ using NUnit.Framework; namespace Grpc.Core.Internal.Tests { + /// + /// Uses fake native call to test interaction of wrapping code with C core in different situations. + /// public class AsyncCallTest { Channel channel; @@ -151,6 +154,99 @@ namespace Grpc.Core.Internal.Tests AssertUnaryResponseError(asyncCall, fakeCall, resultTask, StatusCode.InvalidArgument); } + [Test] + public void ClientStreaming_MoreRequests_Success() + { + var resultTask = asyncCall.ClientStreamingCallAsync(); + var requestStream = new ClientRequestStream(asyncCall); + + var writeTask = requestStream.WriteAsync("request1"); + fakeCall.SendCompletionHandler(true); + writeTask.Wait(); + + var writeTask2 = requestStream.WriteAsync("request2"); + fakeCall.SendCompletionHandler(true); + writeTask2.Wait(); + + var completeTask = requestStream.CompleteAsync(); + fakeCall.SendCompletionHandler(true); + completeTask.Wait(); + + fakeCall.UnaryResponseClientHandler(true, + new ClientSideStatus(Status.DefaultSuccess, new Metadata()), + CreateResponsePayload(), + new Metadata()); + + AssertUnaryResponseSuccess(asyncCall, fakeCall, resultTask); + } + + [Test] + public void ClientStreaming_WriteFailure() + { + var resultTask = asyncCall.ClientStreamingCallAsync(); + var requestStream = new ClientRequestStream(asyncCall); + + var writeTask = requestStream.WriteAsync("request1"); + fakeCall.SendCompletionHandler(false); + Assert.ThrowsAsync(typeof(InvalidOperationException), async () => await writeTask); + + fakeCall.UnaryResponseClientHandler(true, + CreateClientSideStatus(StatusCode.Internal), + CreateResponsePayload(), + new Metadata()); + + AssertUnaryResponseError(asyncCall, fakeCall, resultTask, StatusCode.Internal); + } + + [Test] + public void ClientStreaming_WriteAfterReceivingStatusFails() + { + var resultTask = asyncCall.ClientStreamingCallAsync(); + var requestStream = new ClientRequestStream(asyncCall); + + fakeCall.UnaryResponseClientHandler(true, + new ClientSideStatus(Status.DefaultSuccess, new Metadata()), + CreateResponsePayload(), + new Metadata()); + + AssertUnaryResponseSuccess(asyncCall, fakeCall, resultTask); + Assert.Throws(typeof(InvalidOperationException), () => requestStream.WriteAsync("request1")); + } + + [Test] + public void ClientStreaming_CompleteAfterReceivingStatusSucceeds() + { + var resultTask = asyncCall.ClientStreamingCallAsync(); + var requestStream = new ClientRequestStream(asyncCall); + + fakeCall.UnaryResponseClientHandler(true, + new ClientSideStatus(Status.DefaultSuccess, new Metadata()), + CreateResponsePayload(), + new Metadata()); + + AssertUnaryResponseSuccess(asyncCall, fakeCall, resultTask); + Assert.DoesNotThrowAsync(async () => await requestStream.CompleteAsync()); + } + + [Test] + public void ClientStreaming_WriteAfterCancellationRequestFails() + { + var resultTask = asyncCall.ClientStreamingCallAsync(); + var requestStream = new ClientRequestStream(asyncCall); + + asyncCall.Cancel(); + Assert.IsTrue(fakeCall.IsCancelled); + + Assert.Throws(typeof(OperationCanceledException), () => requestStream.WriteAsync("request1")); + + fakeCall.UnaryResponseClientHandler(true, + CreateClientSideStatus(StatusCode.Cancelled), + CreateResponsePayload(), + new Metadata()); + + AssertUnaryResponseError(asyncCall, fakeCall, resultTask, StatusCode.Cancelled); + } + [Test] public void ServerStreaming_StreamingSendNotAllowed() { @@ -225,6 +321,116 @@ namespace Grpc.Core.Internal.Tests AssertStreamingResponseSuccess(asyncCall, fakeCall, readTask3); } + [Test] + public void DuplexStreaming_NoRequestNoResponse_Success() + { + asyncCall.StartDuplexStreamingCall(); + var requestStream = new ClientRequestStream(asyncCall); + var responseStream = new ClientResponseStream(asyncCall); + + var writeTask1 = requestStream.CompleteAsync(); + fakeCall.SendCompletionHandler(true); + Assert.DoesNotThrowAsync(async () => await writeTask1); + + var readTask = responseStream.MoveNext(); + fakeCall.ReceivedMessageHandler(true, null); + fakeCall.ReceivedStatusOnClientHandler(true, new ClientSideStatus(Status.DefaultSuccess, new Metadata())); + + AssertStreamingResponseSuccess(asyncCall, fakeCall, readTask); + } + + [Test] + public void DuplexStreaming_WriteAfterReceivingStatusFails() + { + asyncCall.StartDuplexStreamingCall(); + var requestStream = new ClientRequestStream(asyncCall); + var responseStream = new ClientResponseStream(asyncCall); + + var readTask = responseStream.MoveNext(); + fakeCall.ReceivedMessageHandler(true, null); + fakeCall.ReceivedStatusOnClientHandler(true, new ClientSideStatus(Status.DefaultSuccess, new Metadata())); + + AssertStreamingResponseSuccess(asyncCall, fakeCall, readTask); + + Assert.ThrowsAsync(typeof(InvalidOperationException), async () => await requestStream.WriteAsync("request1")); + } + + [Test] + public void DuplexStreaming_CompleteAfterReceivingStatusFails() + { + asyncCall.StartDuplexStreamingCall(); + var requestStream = new ClientRequestStream(asyncCall); + var responseStream = new ClientResponseStream(asyncCall); + + var readTask = responseStream.MoveNext(); + fakeCall.ReceivedMessageHandler(true, null); + fakeCall.ReceivedStatusOnClientHandler(true, new ClientSideStatus(Status.DefaultSuccess, new Metadata())); + + AssertStreamingResponseSuccess(asyncCall, fakeCall, readTask); + + Assert.DoesNotThrowAsync(async () => await requestStream.CompleteAsync()); + } + + [Test] + public void DuplexStreaming_WriteAfterCancellationRequestFails() + { + asyncCall.StartDuplexStreamingCall(); + var requestStream = new ClientRequestStream(asyncCall); + var responseStream = new ClientResponseStream(asyncCall); + + asyncCall.Cancel(); + Assert.IsTrue(fakeCall.IsCancelled); + Assert.Throws(typeof(OperationCanceledException), () => requestStream.WriteAsync("request1")); + + var readTask = responseStream.MoveNext(); + fakeCall.ReceivedMessageHandler(true, null); + fakeCall.ReceivedStatusOnClientHandler(true, CreateClientSideStatus(StatusCode.Cancelled)); + + AssertStreamingResponseError(asyncCall, fakeCall, readTask, StatusCode.Cancelled); + } + + [Test] + public void DuplexStreaming_ReadAfterCancellationRequestCanSucceed() + { + asyncCall.StartDuplexStreamingCall(); + var responseStream = new ClientResponseStream(asyncCall); + + asyncCall.Cancel(); + Assert.IsTrue(fakeCall.IsCancelled); + + var readTask1 = responseStream.MoveNext(); + fakeCall.ReceivedMessageHandler(true, CreateResponsePayload()); + Assert.IsTrue(readTask1.Result); + Assert.AreEqual("response1", responseStream.Current); + + var readTask2 = responseStream.MoveNext(); + fakeCall.ReceivedMessageHandler(true, null); + fakeCall.ReceivedStatusOnClientHandler(true, CreateClientSideStatus(StatusCode.Cancelled)); + + AssertStreamingResponseError(asyncCall, fakeCall, readTask2, StatusCode.Cancelled); + } + + [Test] + public void DuplexStreaming_ReadStartedBeforeCancellationRequestCanSucceed() + { + asyncCall.StartDuplexStreamingCall(); + var responseStream = new ClientResponseStream(asyncCall); + + var readTask1 = responseStream.MoveNext(); // initiate the read before cancel request + asyncCall.Cancel(); + Assert.IsTrue(fakeCall.IsCancelled); + + fakeCall.ReceivedMessageHandler(true, CreateResponsePayload()); + Assert.IsTrue(readTask1.Result); + Assert.AreEqual("response1", responseStream.Current); + + var readTask2 = responseStream.MoveNext(); + fakeCall.ReceivedMessageHandler(true, null); + fakeCall.ReceivedStatusOnClientHandler(true, CreateClientSideStatus(StatusCode.Cancelled)); + + AssertStreamingResponseError(asyncCall, fakeCall, readTask2, StatusCode.Cancelled); + } + ClientSideStatus CreateClientSideStatus(StatusCode statusCode) { return new ClientSideStatus(new Status(statusCode, ""), new Metadata()); From 51050562460bee6e0ecf831af037430a249f6d73 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 3 May 2016 09:39:41 -0700 Subject: [PATCH 0206/1894] add one more client server test --- .../Grpc.Core.Tests/ClientServerTest.cs | 33 +++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/src/csharp/Grpc.Core.Tests/ClientServerTest.cs b/src/csharp/Grpc.Core.Tests/ClientServerTest.cs index 44be94c5ae6..d4a41f293eb 100644 --- a/src/csharp/Grpc.Core.Tests/ClientServerTest.cs +++ b/src/csharp/Grpc.Core.Tests/ClientServerTest.cs @@ -239,6 +239,39 @@ namespace Grpc.Core.Tests Assert.AreEqual(StatusCode.Cancelled, ex.Status.StatusCode); } + [Test] + public async Task ClientStreamingCall_ServerSideReadAfterCancelNotificationReturnsNull() + { + var handlerStartedBarrier = new TaskCompletionSource(); + var cancelNotificationReceivedBarrier = new TaskCompletionSource(); + var successTcs = new TaskCompletionSource(); + + helper.ClientStreamingHandler = new ClientStreamingServerMethod(async (requestStream, context) => + { + + handlerStartedBarrier.SetResult(null); + + // wait for cancellation to be delivered. + context.CancellationToken.Register(() => cancelNotificationReceivedBarrier.SetResult(null)); + await cancelNotificationReceivedBarrier.Task; + + var moveNextResult = await requestStream.MoveNext(); + successTcs.SetResult(!moveNextResult ? "SUCCESS" : "FAIL"); + return ""; + }); + + var cts = new CancellationTokenSource(); + var call = Calls.AsyncClientStreamingCall(helper.CreateClientStreamingCall(new CallOptions(cancellationToken: cts.Token))); + + await handlerStartedBarrier.Task; + cts.Cancel(); + + var ex = Assert.ThrowsAsync(async () => await call.ResponseAsync); + Assert.AreEqual(StatusCode.Cancelled, ex.Status.StatusCode); + + Assert.AreEqual("SUCCESS", await successTcs.Task); + } + [Test] public async Task AsyncUnaryCall_EchoMetadata() { From 230c93279f753164db49e46db7204a1b8408ee09 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 3 May 2016 09:40:18 -0700 Subject: [PATCH 0207/1894] fixup --- src/csharp/Grpc.Core.Tests/ClientServerTest.cs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/csharp/Grpc.Core.Tests/ClientServerTest.cs b/src/csharp/Grpc.Core.Tests/ClientServerTest.cs index d4a41f293eb..d92addbf548 100644 --- a/src/csharp/Grpc.Core.Tests/ClientServerTest.cs +++ b/src/csharp/Grpc.Core.Tests/ClientServerTest.cs @@ -248,7 +248,6 @@ namespace Grpc.Core.Tests helper.ClientStreamingHandler = new ClientStreamingServerMethod(async (requestStream, context) => { - handlerStartedBarrier.SetResult(null); // wait for cancellation to be delivered. From 19abba3661c7d39231324eb815fec62d4d3187ea Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 3 May 2016 10:06:29 -0700 Subject: [PATCH 0208/1894] Improve docs on GRPC_OP_RECV_CLOSE_ON_SERVER --- include/grpc/impl/codegen/grpc_types.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index 4c7373006b2..fa287d52388 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -307,7 +307,9 @@ typedef enum { GRPC_OP_RECV_STATUS_ON_CLIENT, /** Receive close on the server: one and only one must be made on the server. - This op completes after the close has been received by the server. */ + This op completes after the close has been received by the server. + This operation always succeeds, meaning ops paired with this operation + will also appear to succeed, even though they may not have. */ GRPC_OP_RECV_CLOSE_ON_SERVER } grpc_op_type; From 8a1d8052eb8629643333ca4449180e27f65aa8dc Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 3 May 2016 10:44:56 -0700 Subject: [PATCH 0209/1894] Added bad_client test to check that the server rejects requests with too much metadata and refuses to send responses with too much metadata. --- Makefile | 24 + include/grpc/impl/codegen/slice_buffer.h | 5 +- .../chttp2/transport/chttp2_transport.c | 24 +- .../chttp2/transport/frame_rst_stream.c | 5 + .../ext/transport/chttp2/transport/internal.h | 15 +- .../ext/transport/chttp2/transport/parsing.c | 30 +- test/core/bad_client/bad_client.c | 41 +- test/core/bad_client/bad_client.h | 18 +- test/core/bad_client/gen_build_yaml.py | 3 +- test/core/bad_client/tests/badreq.c | 10 +- .../core/bad_client/tests/connection_prefix.c | 49 +- test/core/bad_client/tests/headers.c | 120 ++--- .../bad_client/tests/initial_settings_frame.c | 54 +- test/core/bad_client/tests/large_metadata.c | 478 ++++++++++++++++++ .../bad_client/tests/large_metadata.headers | 106 ++++ .../tests/server_registered_method.c | 22 +- test/core/bad_client/tests/simple_request.c | 24 +- test/core/bad_client/tests/unknown_frame.c | 2 +- tools/codegen/core/gen_header_frame.py | 7 +- tools/run_tests/sources_and_headers.json | 17 + tools/run_tests/tests.json | 21 + vsprojects/buildtests_c.sln | 28 + .../large_metadata_bad_client_test.vcxproj | 202 ++++++++ ...e_metadata_bad_client_test.vcxproj.filters | 24 + 24 files changed, 1145 insertions(+), 184 deletions(-) create mode 100644 test/core/bad_client/tests/large_metadata.c create mode 100644 test/core/bad_client/tests/large_metadata.headers create mode 100644 vsprojects/vcxproj/test/large_metadata_bad_client_test/large_metadata_bad_client_test.vcxproj create mode 100644 vsprojects/vcxproj/test/large_metadata_bad_client_test/large_metadata_bad_client_test.vcxproj.filters diff --git a/Makefile b/Makefile index 922e0b0568f..e85a5266fec 100644 --- a/Makefile +++ b/Makefile @@ -1089,6 +1089,7 @@ connection_prefix_bad_client_test: $(BINDIR)/$(CONFIG)/connection_prefix_bad_cli head_of_line_blocking_bad_client_test: $(BINDIR)/$(CONFIG)/head_of_line_blocking_bad_client_test headers_bad_client_test: $(BINDIR)/$(CONFIG)/headers_bad_client_test initial_settings_frame_bad_client_test: $(BINDIR)/$(CONFIG)/initial_settings_frame_bad_client_test +large_metadata_bad_client_test: $(BINDIR)/$(CONFIG)/large_metadata_bad_client_test server_registered_method_bad_client_test: $(BINDIR)/$(CONFIG)/server_registered_method_bad_client_test simple_request_bad_client_test: $(BINDIR)/$(CONFIG)/simple_request_bad_client_test unknown_frame_bad_client_test: $(BINDIR)/$(CONFIG)/unknown_frame_bad_client_test @@ -1318,6 +1319,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/head_of_line_blocking_bad_client_test \ $(BINDIR)/$(CONFIG)/headers_bad_client_test \ $(BINDIR)/$(CONFIG)/initial_settings_frame_bad_client_test \ + $(BINDIR)/$(CONFIG)/large_metadata_bad_client_test \ $(BINDIR)/$(CONFIG)/server_registered_method_bad_client_test \ $(BINDIR)/$(CONFIG)/simple_request_bad_client_test \ $(BINDIR)/$(CONFIG)/unknown_frame_bad_client_test \ @@ -1656,6 +1658,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/headers_bad_client_test || ( echo test headers_bad_client_test failed ; exit 1 ) $(E) "[RUN] Testing initial_settings_frame_bad_client_test" $(Q) $(BINDIR)/$(CONFIG)/initial_settings_frame_bad_client_test || ( echo test initial_settings_frame_bad_client_test failed ; exit 1 ) + $(E) "[RUN] Testing large_metadata_bad_client_test" + $(Q) $(BINDIR)/$(CONFIG)/large_metadata_bad_client_test || ( echo test large_metadata_bad_client_test failed ; exit 1 ) $(E) "[RUN] Testing server_registered_method_bad_client_test" $(Q) $(BINDIR)/$(CONFIG)/server_registered_method_bad_client_test || ( echo test server_registered_method_bad_client_test failed ; exit 1 ) $(E) "[RUN] Testing simple_request_bad_client_test" @@ -13100,6 +13104,26 @@ ifneq ($(NO_DEPS),true) endif +LARGE_METADATA_BAD_CLIENT_TEST_SRC = \ + test/core/bad_client/tests/large_metadata.c \ + +LARGE_METADATA_BAD_CLIENT_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LARGE_METADATA_BAD_CLIENT_TEST_SRC)))) + + +$(BINDIR)/$(CONFIG)/large_metadata_bad_client_test: $(LARGE_METADATA_BAD_CLIENT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(LARGE_METADATA_BAD_CLIENT_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/large_metadata_bad_client_test + +$(OBJDIR)/$(CONFIG)/test/core/bad_client/tests/large_metadata.o: $(LIBDIR)/$(CONFIG)/libbad_client_test.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_large_metadata_bad_client_test: $(LARGE_METADATA_BAD_CLIENT_TEST_OBJS:.o=.dep) + +ifneq ($(NO_DEPS),true) +-include $(LARGE_METADATA_BAD_CLIENT_TEST_OBJS:.o=.dep) +endif + + SERVER_REGISTERED_METHOD_BAD_CLIENT_TEST_SRC = \ test/core/bad_client/tests/server_registered_method.c \ diff --git a/include/grpc/impl/codegen/slice_buffer.h b/include/grpc/impl/codegen/slice_buffer.h index 8ca51baa471..7858021600a 100644 --- a/include/grpc/impl/codegen/slice_buffer.h +++ b/include/grpc/impl/codegen/slice_buffer.h @@ -42,9 +42,8 @@ extern "C" { #define GRPC_SLICE_BUFFER_INLINE_ELEMENTS 8 -/* Represents an expandable array of slices, to be interpreted as a single item - TODO(ctiller): inline some small number of elements into the struct, to - avoid per-call allocations */ +/* Represents an expandable array of slices, to be interpreted as a + single item. */ typedef struct { /* slices in the array */ gpr_slice *slices; diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 6ee5e0680c7..221c7c80505 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -522,7 +522,7 @@ static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, [GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE]; *t->accepting_stream = s; grpc_chttp2_stream_map_add(&t->parsing_stream_map, s->global.id, s); - s->global.in_stream_map = 1; + s->global.in_stream_map = true; } grpc_chttp2_run_with_global_lock(exec_ctx, t, s, finish_init_stream_locked, @@ -838,7 +838,7 @@ static void maybe_start_some_streams( grpc_chttp2_stream_map_add( &TRANSPORT_FROM_GLOBAL(transport_global)->new_stream_map, stream_global->id, STREAM_FROM_GLOBAL(stream_global)); - stream_global->in_stream_map = 1; + stream_global->in_stream_map = true; transport_global->concurrent_stream_count++; grpc_chttp2_become_writable(transport_global, stream_global); } @@ -944,8 +944,8 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, [GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE]; if (metadata_size > metadata_peer_limit) { gpr_log(GPR_DEBUG, - "initial metadata size exceeds peer limit (%lu vs. %lu)", - metadata_size, metadata_peer_limit); + "to-be-sent initial metadata size exceeds peer limit " + "(%lu vs. %lu)", metadata_size, metadata_peer_limit); cancel_from_api(exec_ctx, transport_global, stream_global, GRPC_STATUS_RESOURCE_EXHAUSTED); } else { @@ -998,8 +998,8 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, [GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE]; if (metadata_size > metadata_peer_limit) { gpr_log(GPR_DEBUG, - "trailing metadata size exceeds peer limit (%lu vs. %lu)", - metadata_size, metadata_peer_limit); + "to-be-sent trailing metadata size exceeds peer limit " + "(%lu vs. %lu)", metadata_size, metadata_peer_limit); cancel_from_api(exec_ctx, transport_global, stream_global, GRPC_STATUS_RESOURCE_EXHAUSTED); } else { @@ -1259,7 +1259,7 @@ static void remove_stream(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, s = grpc_chttp2_stream_map_delete(&t->new_stream_map, id); } GPR_ASSERT(s); - s->global.in_stream_map = 0; + s->global.in_stream_map = false; if (t->parsing.incoming_stream == &s->parsing) { t->parsing.incoming_stream = NULL; grpc_chttp2_parsing_become_skip_parser(exec_ctx, &t->parsing); @@ -1339,7 +1339,7 @@ void grpc_chttp2_fake_status(grpc_exec_ctx *exec_ctx, GRPC_MDSTR_GRPC_MESSAGE, grpc_mdstr_from_slice(gpr_slice_ref(*slice)))); } - stream_global->published_trailing_metadata = 1; + stream_global->published_trailing_metadata = true; grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); } if (slice) { @@ -1369,13 +1369,13 @@ void grpc_chttp2_mark_stream_closed( } grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); if (close_reads && !stream_global->read_closed) { - stream_global->read_closed = 1; - stream_global->published_initial_metadata = 1; - stream_global->published_trailing_metadata = 1; + stream_global->read_closed = true; + stream_global->published_initial_metadata = true; + stream_global->published_trailing_metadata = true; decrement_active_streams_locked(exec_ctx, transport_global, stream_global); } if (close_writes && !stream_global->write_closed) { - stream_global->write_closed = 1; + stream_global->write_closed = true; if (TRANSPORT_FROM_GLOBAL(transport_global)->executor.writing_active) { GRPC_CHTTP2_STREAM_REF(stream_global, "finish_writes"); grpc_chttp2_list_add_closed_waiting_for_writing(transport_global, diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c index 22467e9ddd2..7f01105e3ef 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c @@ -45,15 +45,20 @@ gpr_slice grpc_chttp2_rst_stream_create(uint32_t id, uint32_t code, stats->framing_bytes += frame_size; uint8_t *p = GPR_SLICE_START_PTR(slice); + // Frame size. *p++ = 0; *p++ = 0; *p++ = 4; + // Frame type. *p++ = GRPC_CHTTP2_FRAME_RST_STREAM; + // Flags. *p++ = 0; + // Stream ID. *p++ = (uint8_t)(id >> 24); *p++ = (uint8_t)(id >> 16); *p++ = (uint8_t)(id >> 8); *p++ = (uint8_t)(id); + // Error code. *p++ = (uint8_t)(code >> 24); *p++ = (uint8_t)(code >> 16); *p++ = (uint8_t)(code >> 8); diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index d8f17a30fc1..2f3714b2bb4 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -419,24 +419,21 @@ typedef struct { /** number of streams that are currently being read */ gpr_refcount active_streams; - /** when the application requests writes be closed, the write_closed is - 'queued'; when the close is flow controlled into the send path, we are - 'sending' it; when the write has been performed it is 'sent' */ + /** Is this stream closed for writing. */ bool write_closed; - /** is this stream reading half-closed (boolean) */ + /** Is this stream reading half-closed. */ bool read_closed; - /** are all published incoming byte streams closed */ + /** Are all published incoming byte streams closed. */ bool all_incoming_byte_streams_finished; - /** is this stream in the stream map? (boolean) */ + /** Is this stream in the stream map. */ bool in_stream_map; - /** has this stream seen an error? if 1, then pending incoming frames - can be thrown away */ + /** Has this stream seen an error. + If true, then pending incoming frames can be thrown away. */ bool seen_error; bool exceeded_metadata_size; bool published_initial_metadata; bool published_trailing_metadata; - bool faked_trailing_metadata; grpc_chttp2_incoming_metadata_buffer received_initial_metadata; grpc_chttp2_incoming_metadata_buffer received_trailing_metadata; diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index f1018733379..29c26fb3bc5 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -634,10 +634,17 @@ static void on_initial_header(void *tp, grpc_mdelem *md) { GRPC_MDELEM_LENGTH(md); grpc_chttp2_transport_global *transport_global = &TRANSPORT_FROM_PARSING(transport_parsing)->global; - if (new_size > transport_global->settings - [GRPC_LOCAL_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE]) { - stream_parsing->seen_error = true; - stream_parsing->exceeded_metadata_size = true; + const size_t metadata_size_limit = + transport_global->settings[GRPC_LOCAL_SETTINGS] + [GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE]; + if (new_size > metadata_size_limit) { + if (!stream_parsing->exceeded_metadata_size) { + gpr_log(GPR_DEBUG, + "received initial metadata size exceeds limit (%lu vs. %lu)", + new_size, metadata_size_limit); + stream_parsing->seen_error = true; + stream_parsing->exceeded_metadata_size = true; + } GRPC_MDELEM_UNREF(md); } else { grpc_chttp2_incoming_metadata_buffer_add( @@ -673,10 +680,17 @@ static void on_trailing_header(void *tp, grpc_mdelem *md) { GRPC_MDELEM_LENGTH(md); grpc_chttp2_transport_global *transport_global = &TRANSPORT_FROM_PARSING(transport_parsing)->global; - if (new_size > transport_global->settings - [GRPC_LOCAL_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE]) { - stream_parsing->seen_error = true; - stream_parsing->exceeded_metadata_size = true; + const size_t metadata_size_limit = + transport_global->settings[GRPC_LOCAL_SETTINGS] + [GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE]; + if (new_size > metadata_size_limit) { + if (!stream_parsing->exceeded_metadata_size) { + gpr_log(GPR_DEBUG, + "received trailing metadata size exceeds limit (%lu vs. %lu)", + new_size, metadata_size_limit); + stream_parsing->seen_error = true; + stream_parsing->exceeded_metadata_size = true; + } GRPC_MDELEM_UNREF(md); } else { grpc_chttp2_incoming_metadata_buffer_add( diff --git a/test/core/bad_client/bad_client.c b/test/core/bad_client/bad_client.c index cd5b5412492..aa9125dc7a9 100644 --- a/test/core/bad_client/bad_client.c +++ b/test/core/bad_client/bad_client.c @@ -75,9 +75,23 @@ static void server_setup_transport(void *ts, grpc_transport *transport) { grpc_exec_ctx_finish(&exec_ctx); } -void grpc_run_bad_client_test(grpc_bad_client_server_side_validator validator, - const char *client_payload, - size_t client_payload_length, uint32_t flags) { +typedef struct { + grpc_bad_client_client_stream_validator validator; + gpr_slice_buffer incoming; + gpr_event read_done; +} read_args; + +static void read_done(grpc_exec_ctx *exec_ctx, void *arg, bool success) { + read_args *a = arg; + a->validator(&a->incoming); + gpr_event_set(&a->read_done, (void *)1); +} + +void grpc_run_bad_client_test( + grpc_bad_client_server_side_validator server_validator, + grpc_bad_client_client_stream_validator client_validator, + const char *client_payload, + size_t client_payload_length, uint32_t flags) { grpc_endpoint_pair sfd; thd_args a; gpr_thd_id id; @@ -108,7 +122,7 @@ void grpc_run_bad_client_test(grpc_bad_client_server_side_validator validator, a.cq = grpc_completion_queue_create(NULL); gpr_event_init(&a.done_thd); gpr_event_init(&a.done_write); - a.validator = validator; + a.validator = server_validator; grpc_server_register_completion_queue(a.server, a.cq, NULL); a.registered_method = grpc_server_register_method(a.server, GRPC_BAD_CLIENT_REGISTERED_METHOD, @@ -151,8 +165,23 @@ void grpc_run_bad_client_test(grpc_bad_client_server_side_validator validator, GPR_ASSERT(gpr_event_wait(&a.done_thd, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5))); - /* Shutdown */ - if (sfd.client) { + if (sfd.client != NULL) { + // Validate client stream, if requested. + if (client_validator != NULL) { + read_args args; + args.validator = client_validator; + gpr_slice_buffer_init(&args.incoming); + gpr_event_init(&args.read_done); + grpc_closure read_done_closure; + grpc_closure_init(&read_done_closure, read_done, &args); + grpc_endpoint_read(&exec_ctx, sfd.client, &args.incoming, + &read_done_closure); + grpc_exec_ctx_finish(&exec_ctx); + GPR_ASSERT(gpr_event_wait(&args.read_done, + GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5))); + gpr_slice_buffer_destroy(&args.incoming); + } + // Shutdown. grpc_endpoint_shutdown(&exec_ctx, sfd.client); grpc_endpoint_destroy(&exec_ctx, sfd.client); grpc_exec_ctx_finish(&exec_ctx); diff --git a/test/core/bad_client/bad_client.h b/test/core/bad_client/bad_client.h index 19ddba83bf0..b6e8a6dd5b0 100644 --- a/test/core/bad_client/bad_client.h +++ b/test/core/bad_client/bad_client.h @@ -44,18 +44,24 @@ typedef void (*grpc_bad_client_server_side_validator)(grpc_server *server, grpc_completion_queue *cq, void *registered_method); +typedef void (*grpc_bad_client_client_stream_validator)( + gpr_slice_buffer *incoming); + #define GRPC_BAD_CLIENT_DISCONNECT 1 /* Test runner. Create a server, and send client_payload to it as bytes from a client. - Execute validator in a separate thread to assert that the bytes are + Execute server_validator in a separate thread to assert that the bytes are handled as expected. */ -void grpc_run_bad_client_test(grpc_bad_client_server_side_validator validator, - const char *client_payload, - size_t client_payload_length, uint32_t flags); +void grpc_run_bad_client_test( + grpc_bad_client_server_side_validator server_validator, + grpc_bad_client_client_stream_validator client_validator, + const char *client_payload, size_t client_payload_length, uint32_t flags); -#define GRPC_RUN_BAD_CLIENT_TEST(validator, payload, flags) \ - grpc_run_bad_client_test(validator, payload, sizeof(payload) - 1, flags) +#define GRPC_RUN_BAD_CLIENT_TEST(server_validator, client_validator, \ + payload, flags) \ + grpc_run_bad_client_test(server_validator, client_validator, \ + payload, sizeof(payload) - 1, flags) #endif /* GRPC_TEST_CORE_BAD_CLIENT_BAD_CLIENT_H */ diff --git a/test/core/bad_client/gen_build_yaml.py b/test/core/bad_client/gen_build_yaml.py index d49858ed6d8..fb86525b1a1 100755 --- a/test/core/bad_client/gen_build_yaml.py +++ b/test/core/bad_client/gen_build_yaml.py @@ -29,7 +29,7 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -"""Generates the appropriate build.json data for all the end2end tests.""" +"""Generates the appropriate build.json data for all the bad_client tests.""" import collections @@ -45,6 +45,7 @@ BAD_CLIENT_TESTS = { 'headers': default_test_options._replace(cpu_cost=0.2), 'initial_settings_frame': default_test_options._replace(cpu_cost=0.2), 'head_of_line_blocking': default_test_options, + 'large_metadata': default_test_options, 'server_registered_method': default_test_options, 'simple_request': default_test_options, 'window_overflow': default_test_options, diff --git a/test/core/bad_client/tests/badreq.c b/test/core/bad_client/tests/badreq.c index b17e3b35ee4..5d9ffef3f20 100644 --- a/test/core/bad_client/tests/badreq.c +++ b/test/core/bad_client/tests/badreq.c @@ -56,7 +56,7 @@ int main(int argc, char **argv) { /* invalid content type */ GRPC_RUN_BAD_CLIENT_TEST( - verifier, PFX_STR + verifier, NULL, PFX_STR "\x00\x00\xc2\x01\x04\x00\x00\x00\x01" "\x10\x05:path\x08/foo/bar" "\x10\x07:scheme\x04http" @@ -71,7 +71,7 @@ int main(int argc, char **argv) { /* invalid te */ GRPC_RUN_BAD_CLIENT_TEST( - verifier, PFX_STR + verifier, NULL, PFX_STR "\x00\x00\xcb\x01\x04\x00\x00\x00\x01" "\x10\x05:path\x08/foo/bar" "\x10\x07:scheme\x04http" @@ -88,7 +88,7 @@ int main(int argc, char **argv) { /* two path headers */ GRPC_RUN_BAD_CLIENT_TEST( - verifier, PFX_STR + verifier, NULL, PFX_STR "\x00\x00\xd9\x01\x04\x00\x00\x00\x01" "\x10\x05:path\x08/foo/bar" "\x10\x05:path\x08/foo/bah" @@ -105,7 +105,7 @@ int main(int argc, char **argv) { /* bad accept-encoding algorithm */ GRPC_RUN_BAD_CLIENT_TEST( - verifier, PFX_STR + verifier, NULL, PFX_STR "\x00\x00\xd2\x01\x04\x00\x00\x00\x01" "\x10\x05:path\x08/foo/bar" "\x10\x07:scheme\x04http" @@ -121,7 +121,7 @@ int main(int argc, char **argv) { /* bad grpc-encoding algorithm */ GRPC_RUN_BAD_CLIENT_TEST( - verifier, PFX_STR + verifier, NULL, PFX_STR "\x00\x00\xf5\x01\x04\x00\x00\x00\x01" "\x10\x05:path\x08/foo/bar" "\x10\x07:scheme\x04http" diff --git a/test/core/bad_client/tests/connection_prefix.c b/test/core/bad_client/tests/connection_prefix.c index 9a30aad0e93..bc5ed2e3934 100644 --- a/test/core/bad_client/tests/connection_prefix.c +++ b/test/core/bad_client/tests/connection_prefix.c @@ -46,29 +46,30 @@ static void verifier(grpc_server *server, grpc_completion_queue *cq, int main(int argc, char **argv) { grpc_test_init(argc, argv); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "X", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PX", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRX", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRIX", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI X", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI *X", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * X", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HX", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTX", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTX", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTPX", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/X", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2X", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.X", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.0X", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.0\rX", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.0\r\nX", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.0\r\n\rX", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.0\r\n\r\nX", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.0\r\n\r\nSX", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.0\r\n\r\nSMX", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.0\r\n\r\nSM\rX", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.0\r\n\r\nSM\r\nX", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, "PRI * HTTP/2.0\r\n\r\nSM\r\n\rX", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "X", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PX", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRX", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRIX", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI X", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI *X", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * X", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HX", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTX", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTX", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTPX", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/X", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2X", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.X", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.0X", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.0\rX", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.0\r\nX", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.0\r\n\rX", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.0\r\n\r\nX", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.0\r\n\r\nSX", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.0\r\n\r\nSMX", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.0\r\n\r\nSM\rX", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.0\r\n\r\nSM\r\nX", 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, "PRI * HTTP/2.0\r\n\r\nSM\r\n\rX", + 0); return 0; } diff --git a/test/core/bad_client/tests/headers.c b/test/core/bad_client/tests/headers.c index 4c1a76743e3..f872e5006a7 100644 --- a/test/core/bad_client/tests/headers.c +++ b/test/core/bad_client/tests/headers.c @@ -51,249 +51,251 @@ int main(int argc, char **argv) { grpc_test_init(argc, argv); /* partial http2 header prefixes */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x01", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x01", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x01\x00", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x01\x00", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x01\x04", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x01\x04", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x01\x05", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x01\x05", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x01\x04\x00", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x01\x04\x00", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x01\x04\x00\x00", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, + PFX_STR "\x00\x00\x00\x01\x04\x00\x00", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x01\x04\x00\x00\x00", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, + PFX_STR "\x00\x00\x00\x01\x04\x00\x00\x00", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x01\x04\x00\x00\x00\x00", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x01\x04\x00\x00\x00\x01", GRPC_BAD_CLIENT_DISCONNECT); /* test adding prioritization data */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x01\x01\x24\x00\x00\x00\x01" "\x00", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x02\x01\x24\x00\x00\x00\x01" "\x00\x00", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x03\x01\x24\x00\x00\x00\x01" "\x00\x00\x00", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x04\x01\x24\x00\x00\x00\x01" "\x00\x00\x00\x00", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x05\x01\x24\x00\x00\x00\x01" "", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x05\x01\x24\x00\x00\x00\x01" "\x00", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x05\x01\x24\x00\x00\x00\x01" "\x00\x00", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x05\x01\x24\x00\x00\x00\x01" "\x00\x00\x00", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x05\x01\x24\x00\x00\x00\x01" "\x00\x00\x00\x00", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x05\x01\x24\x00\x00\x00\x01" "\x00\x00\x00\x00\x00", GRPC_BAD_CLIENT_DISCONNECT); /* test looking up an invalid index */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x01\x01\x04\x00\x00\x00\x01" "\xfe", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x04\x01\x04\x00\x00\x00\x01" "\x7f\x7f\x01" "a", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x04\x01\x04\x00\x00\x00\x01" "\x0f\x7f\x01" "a", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x04\x01\x04\x00\x00\x00\x01" "\x1f\x7f\x01" "a", 0); /* test nvr, not indexed in static table */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x03\x01\x04\x00\x00\x00\x01" "\x01\x01" "a", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x03\x01\x04\x00\x00\x00\x01" "\x11\x01" "a", GRPC_BAD_CLIENT_DISCONNECT); /* illegal op code */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x01\x01\x04\x00\x00\x00\x01" "\x80", 0); /* parse some long indices */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x02\x01\x04\x00\x00\x00\x01" "\xff\x00", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x03\x01\x04\x00\x00\x00\x01" "\xff\x80\x00", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x04\x01\x04\x00\x00\x00\x01" "\xff\x80\x80\x00", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x05\x01\x04\x00\x00\x00\x01" "\xff\x80\x80\x80\x00", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x06\x01\x04\x00\x00\x00\x01" "\xff\x80\x80\x80\x80\x00", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x07\x01\x04\x00\x00\x00\x01" "\xff\x80\x80\x80\x80\x80\x00", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x08\x01\x04\x00\x00\x00\x01" "\xff", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x08\x01\x04\x00\x00\x00\x01" "\xff\x80", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x08\x01\x04\x00\x00\x00\x01" "\xff\x80\x80", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x08\x01\x04\x00\x00\x00\x01" "\xff\x80\x80\x80", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x08\x01\x04\x00\x00\x00\x01" "\xff\x80\x80\x80\x80", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x08\x01\x04\x00\x00\x00\x01" "\xff\x80\x80\x80\x80\x80", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x08\x01\x04\x00\x00\x00\x01" "\xff\x80\x80\x80\x80\x80\x80", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x08\x01\x04\x00\x00\x00\x01" "\xff\x80\x80\x80\x80\x80\x80\x00", 0); /* overflow on byte 4 */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x06\x01\x04\x00\x00\x00\x01" "\xff\x80\x80\x80\x80\x7f", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x06\x01\x04\x00\x00\x00\x01" "\xff\xff\xff\xff\xff\x0f", GRPC_BAD_CLIENT_DISCONNECT); /* overflow after byte 4 */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x08\x01\x04\x00\x00\x00\x01" "\xff\x80\x80\x80\x80\x80\x80\x02", 0); /* end of headers mid-opcode */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x01\x01\x04\x00\x00\x00\x01" "\x01", GRPC_BAD_CLIENT_DISCONNECT); /* dynamic table size update: set to default */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x03\x01\x04\x00\x00\x00\x01" "\x3f\xe1\x1f", GRPC_BAD_CLIENT_DISCONNECT); /* dynamic table size update: set too large */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x03\x01\x04\x00\x00\x00\x01" "\x3f\xf1\x1f", 0); /* dynamic table size update: set twice */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x04\x01\x04\x00\x00\x00\x01" "\x20\x3f\xe1\x1f", GRPC_BAD_CLIENT_DISCONNECT); /* dynamic table size update: set thrice */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x03\x01\x04\x00\x00\x00\x01" "\x20\x20\x20", 0); /* non-ending header followed by continuation frame */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x01\x00\x00\x00\x00\x01" "\x00\x00\x00\x09\x04\x00\x00\x00\x01", GRPC_BAD_CLIENT_DISCONNECT); /* non-ending header followed by non-continuation frame */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x01\x00\x00\x00\x00\x01" "\x00\x00\x00\x00\x04\x00\x00\x00\x01", 0); /* non-ending header followed by a continuation frame for a different stream */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x01\x04\x00\x00\x00\x01" "\x00\x00\x00\x01\x00\x00\x00\x00\x03" "\x00\x00\x00\x09\x04\x00\x00\x00\x01", 0); /* opening with a continuation frame */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x09\x04\x00\x00\x00\x01", 0); /* three header frames */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x01\x04\x00\x00\x00\x01" "\x00\x00\x00\x01\x04\x00\x00\x00\x01" "\x00\x00\x00\x01\x04\x00\x00\x00\x01", GRPC_BAD_CLIENT_DISCONNECT); /* an invalid header found with fuzzing */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x01\x39\x67\xed\x1d\x64", GRPC_BAD_CLIENT_DISCONNECT); /* a badly encoded timeout value */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x19\x01\x04\x00\x00\x00\x01" "\x10\x0cgrpc-timeout\x0a" "15 seconds", GRPC_BAD_CLIENT_DISCONNECT); /* a badly encoded timeout value: twice (catches caching) */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x19\x01\x04\x00\x00\x00\x01" "\x10\x0cgrpc-timeout\x0a" "15 seconds" diff --git a/test/core/bad_client/tests/initial_settings_frame.c b/test/core/bad_client/tests/initial_settings_frame.c index 63a770df91f..b84b67a7e58 100644 --- a/test/core/bad_client/tests/initial_settings_frame.c +++ b/test/core/bad_client/tests/initial_settings_frame.c @@ -50,70 +50,72 @@ int main(int argc, char **argv) { grpc_test_init(argc, argv); /* various partial prefixes */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x06", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x06", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x06", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x06", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x06", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x06", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x04", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x04", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x04\x00", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x04\x00", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x04\x01", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x04\x01", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x04\xff", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x04\xff", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x04\x00\x00", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x04\x00\x00", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x04\x00\x00\x00", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, + PFX_STR "\x00\x00\x00\x04\x00\x00\x00", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR "\x00\x00\x00\x04\x00\x00\x00\x00", + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, + PFX_STR "\x00\x00\x00\x04\x00\x00\x00\x00", GRPC_BAD_CLIENT_DISCONNECT); /* must not send frames with stream id != 0 */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x04\x00\x00\x00\x00\x01", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x04\x00\x40\x00\x00\x00", 0); /* settings frame must be a multiple of six bytes long */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x01\x04\x00\x00\x00\x00\x00", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x02\x04\x00\x00\x00\x00\x00", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x03\x04\x00\x00\x00\x00\x00", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x04\x04\x00\x00\x00\x00\x00", 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x05\x04\x00\x00\x00\x00\x00", 0); /* some settings values are illegal */ /* max frame size = 0 */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR ONE_SETTING_HDR "\x00\x05\x00\x00\x00\x00", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier, + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR ONE_SETTING_HDR "\x00\x06\xff\xff\xff\xff", GRPC_BAD_CLIENT_DISCONNECT); /* update intiial window size */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR ONE_SETTING_HDR "\x00\x04\x00\x01\x00\x00", GRPC_BAD_CLIENT_DISCONNECT); /* ack with data */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x04\x00\x00\x00\x00\x00" "\x00\x00\x01\x04\x01\x00\x00\x00\x00", 0); /* settings frame with invalid flags */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x04\x10\x00\x00\x00\x00", 0); /* unknown settings should be ignored */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR ONE_SETTING_HDR "\x00\x99\x00\x00\x00\x00", GRPC_BAD_CLIENT_DISCONNECT); diff --git a/test/core/bad_client/tests/large_metadata.c b/test/core/bad_client/tests/large_metadata.c new file mode 100644 index 00000000000..95932205cfc --- /dev/null +++ b/test/core/bad_client/tests/large_metadata.c @@ -0,0 +1,478 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "test/core/bad_client/bad_client.h" + +#include + +#include +#include "src/core/lib/surface/server.h" +#include "test/core/end2end/cq_verifier.h" + +#define PFX_TOO_MUCH_METADATA_FROM_CLIENT_STR \ + "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" \ + /* settings frame */ \ + "\x00\x00\x00\x04\x00\x00\x00\x00\x00" \ + /* headers: generated from large_metadata.headers in this directory */ \ + "\x00""5{\x01\x05\x00\x00\x00\x01" \ + "\x10\x05:path\x08/foo/bar" \ + "\x10\x07:scheme\x04http" \ + "\x10\x07:method\x04POST" \ + "\x10\x0a:authority\x09localhost" \ + "\x10\x0c""content-type\x10""application/grpc" \ + "\x10\x14grpc-accept-encoding\x15identity,deflate,gzip" \ + "\x10\x02te\x08trailers" \ + "\x10\x0auser-agent\"bad-client grpc-c/0.12.0.0 (linux)" \ + "\x10\x0duser-header00~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header01~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header02~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header03~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header04~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header05~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header06~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header07~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header08~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header09~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header10~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header11~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header12~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header13~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header14~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header15~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header16~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header17~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header18~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header19~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header20~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header21~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header22~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header23~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header24~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header25~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header26~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header27~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header28~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header29~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header30~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header31~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header32~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header33~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header34~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header35~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header36~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header37~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header38~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header39~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header40~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header41~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header42~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header43~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header44~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header45~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header46~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header47~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header48~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header49~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header50~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header51~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header52~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header53~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header54~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header55~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header56~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header57~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header58~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header59~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header60~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header61~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header62~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header63~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header64~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header65~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header66~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header67~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header68~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header69~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header70~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header71~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header72~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header73~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header74~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header75~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header76~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header77~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header78~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header79~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header80~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header81~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header82~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header83~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header84~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header85~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header86~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header87~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header88~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header89~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header90~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header91~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header92~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header93~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" \ + "\x10\x0duser-header94~aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ + "aaaaaaaa" + +#define PFX_TOO_MUCH_METADATA_FROM_SERVER_STR \ + "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" \ + /* settings frame: sets MAX_HEADER_LIST_SIZE to 16K */ \ + "\x00\x00\x06\x04\x00\x00\x00\x00\x00\x00\x06\x00\x00\x40\x00" \ + /* headers: generated from simple_request.headers in this directory */ \ + "\x00\x00\xc9\x01\x04\x00\x00\x00\x01" \ + "\x10\x05:path\x08/foo/bar" \ + "\x10\x07:scheme\x04http" \ + "\x10\x07:method\x04POST" \ + "\x10\x0a:authority\x09localhost" \ + "\x10\x0c" \ + "content-type\x10" \ + "application/grpc" \ + "\x10\x14grpc-accept-encoding\x15" \ + "deflate,identity,gzip" \ + "\x10\x02te\x08trailers" \ + "\x10\x0auser-agent\"bad-client grpc-c/0.12.0.0 (linux)" + +static void *tag(intptr_t t) { return (void *)t; } + +static void server_verifier(grpc_server *server, grpc_completion_queue *cq, + void *registered_method) { + grpc_call_error error; + grpc_call *s; + grpc_call_details call_details; + cq_verifier *cqv = cq_verifier_create(cq); + grpc_metadata_array request_metadata_recv; + + grpc_call_details_init(&call_details); + grpc_metadata_array_init(&request_metadata_recv); + + error = grpc_server_request_call(server, &s, &call_details, + &request_metadata_recv, cq, cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + cq_expect_completion(cqv, tag(101), 1); + cq_verify(cqv); + + GPR_ASSERT(0 == strcmp(call_details.host, "localhost")); + GPR_ASSERT(0 == strcmp(call_details.method, "/foo/bar")); + + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_call_destroy(s); + cq_verifier_destroy(cqv); +} + +static void server_verifier_sends_too_much_metadata( + grpc_server *server, grpc_completion_queue *cq, void *registered_method) { + grpc_call_error error; + grpc_call *s; + grpc_call_details call_details; + cq_verifier *cqv = cq_verifier_create(cq); + grpc_metadata_array request_metadata_recv; + + grpc_call_details_init(&call_details); + grpc_metadata_array_init(&request_metadata_recv); + + error = grpc_server_request_call(server, &s, &call_details, + &request_metadata_recv, cq, cq, tag(101)); + GPR_ASSERT(GRPC_CALL_OK == error); + cq_expect_completion(cqv, tag(101), 1); + cq_verify(cqv); + + GPR_ASSERT(0 == strcmp(call_details.host, "localhost")); + GPR_ASSERT(0 == strcmp(call_details.method, "/foo/bar")); + + const size_t metadata_value_size = 16 * 1024; + grpc_metadata meta; + meta.key = "key"; + meta.value = gpr_malloc(metadata_value_size + 1); + memset((char *)meta.value, 'a', metadata_value_size); + ((char *)meta.value)[metadata_value_size] = 0; + meta.value_length = metadata_value_size; + + grpc_op op; + op.op = GRPC_OP_SEND_INITIAL_METADATA; + op.data.send_initial_metadata.count = 1; + op.data.send_initial_metadata.metadata = &meta; + op.flags = 0; + op.reserved = NULL; + error = grpc_call_start_batch(s, &op, 1, tag(102), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + cq_expect_completion(cqv, tag(102), 0); // Operation fails. + cq_verify(cqv); + + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + grpc_call_destroy(s); + cq_verifier_destroy(cqv); +} + +static void client_validator(gpr_slice_buffer *incoming) { + // Get last frame from incoming slice buffer. + gpr_slice_buffer last_frame_buffer; + gpr_slice_buffer_init(&last_frame_buffer); + gpr_slice_buffer_trim_end(incoming, 13, &last_frame_buffer); + GPR_ASSERT(last_frame_buffer.count == 1); + gpr_slice last_frame = last_frame_buffer.slices[0]; + // Construct expected frame. + gpr_slice expected = gpr_slice_malloc(13); + uint8_t *p = GPR_SLICE_START_PTR(expected); + // Length. + *p++ = 0; + *p++ = 0; + *p++ = 4; + // Frame type (RST_STREAM). + *p++ = 3; + // Flags. + *p++ = 0; + // Stream ID. + *p++ = 0; + *p++ = 0; + *p++ = 0; + *p++ = 1; + // Payload (error code). + *p++ = 0; + *p++ = 0; + *p++ = 0; + *p++ = 11; + // Compare actual and expected. + GPR_ASSERT(gpr_slice_cmp(last_frame, expected) == 0); +} + +int main(int argc, char **argv) { + grpc_test_init(argc, argv); + + // Test sending more metadata than the server will accept. + GRPC_RUN_BAD_CLIENT_TEST(server_verifier, client_validator, + PFX_TOO_MUCH_METADATA_FROM_CLIENT_STR, 0); + + // Test sending more metadata than the client will accept. + GRPC_RUN_BAD_CLIENT_TEST(server_verifier_sends_too_much_metadata, + client_validator, + PFX_TOO_MUCH_METADATA_FROM_SERVER_STR, 0); + + return 0; +} diff --git a/test/core/bad_client/tests/large_metadata.headers b/test/core/bad_client/tests/large_metadata.headers new file mode 100644 index 00000000000..75de3ef1001 --- /dev/null +++ b/test/core/bad_client/tests/large_metadata.headers @@ -0,0 +1,106 @@ +# headers used in simple_request.c +# use tools/codegen/core/gen_header_frame.py --set_end_stream to generate +# the binary strings contained in the source code +:path: /foo/bar +:scheme: http +:method: POST +:authority: localhost +content-type: application/grpc +grpc-accept-encoding: identity,deflate,gzip +te: trailers +user-agent: bad-client grpc-c/0.12.0.0 (linux) +user-header00: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header01: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header02: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header03: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header04: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header05: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header06: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header07: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header08: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header09: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header10: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header11: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header12: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header13: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header14: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header15: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header16: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header17: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header18: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header19: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header20: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header21: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header22: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header23: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header24: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header25: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header26: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header27: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header28: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header29: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header30: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header31: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header32: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header33: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header34: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header35: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header36: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header37: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header38: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header39: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header40: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header41: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header42: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header43: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header44: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header45: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header46: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header47: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header48: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header49: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header50: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header51: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header52: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header53: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header54: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header55: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header56: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header57: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header58: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header59: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header60: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header61: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header62: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header63: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header64: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header65: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header66: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header67: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header68: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header69: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header70: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header71: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header72: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header73: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header74: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header75: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header76: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header77: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header78: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header79: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header80: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header81: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header82: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header83: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header84: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header85: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header86: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header87: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header88: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header89: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header90: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header91: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header92: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header93: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa +user-header94: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa diff --git a/test/core/bad_client/tests/server_registered_method.c b/test/core/bad_client/tests/server_registered_method.c index 60d3b890b22..6216553a614 100644 --- a/test/core/bad_client/tests/server_registered_method.c +++ b/test/core/bad_client/tests/server_registered_method.c @@ -111,43 +111,43 @@ int main(int argc, char **argv) { /* body generated with * tools/codegen/core/gen_server_registered_method_bad_client_test_body.py */ - GRPC_RUN_BAD_CLIENT_TEST(verifier_fails, + GRPC_RUN_BAD_CLIENT_TEST(verifier_fails, NULL, PFX_STR "\x00\x00\x00\x00\x00\x00\x00\x00\x01", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier_fails, + GRPC_RUN_BAD_CLIENT_TEST(verifier_fails, NULL, PFX_STR "\x00\x00\x01\x00\x00\x00\x00\x00\x01\x00", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier_fails, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier_fails, NULL, PFX_STR "\x00\x00\x02\x00\x00\x00\x00\x00\x01\x00\x00", GRPC_BAD_CLIENT_DISCONNECT); - GRPC_RUN_BAD_CLIENT_TEST(verifier_fails, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier_fails, NULL, PFX_STR "\x00\x00\x03\x00\x00\x00\x00\x00\x01\x00\x00\x00", GRPC_BAD_CLIENT_DISCONNECT); GRPC_RUN_BAD_CLIENT_TEST( - verifier_fails, + verifier_fails, NULL, PFX_STR "\x00\x00\x04\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00", GRPC_BAD_CLIENT_DISCONNECT); GRPC_RUN_BAD_CLIENT_TEST( - verifier_succeeds, + verifier_succeeds, NULL, PFX_STR "\x00\x00\x05\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00", 0); GRPC_RUN_BAD_CLIENT_TEST( - verifier_fails, + verifier_fails, NULL, PFX_STR "\x00\x00\x05\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x01", GRPC_BAD_CLIENT_DISCONNECT); GRPC_RUN_BAD_CLIENT_TEST( - verifier_succeeds, + verifier_succeeds, NULL, PFX_STR "\x00\x00\x06\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x01\x00", 0); GRPC_RUN_BAD_CLIENT_TEST( - verifier_fails, + verifier_fails, NULL, PFX_STR "\x00\x00\x05\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x02", GRPC_BAD_CLIENT_DISCONNECT); GRPC_RUN_BAD_CLIENT_TEST( - verifier_fails, + verifier_fails, NULL, PFX_STR "\x00\x00\x06\x00\x00\x00\x00\x00\x01\x00\x00\x00\x00\x02\x00", GRPC_BAD_CLIENT_DISCONNECT); GRPC_RUN_BAD_CLIENT_TEST( - verifier_succeeds, PFX_STR + verifier_succeeds, NULL, PFX_STR "\x00\x00\x07\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x02\x00\x00", 0); diff --git a/test/core/bad_client/tests/simple_request.c b/test/core/bad_client/tests/simple_request.c index 3ae6eb3592d..25bbe968e4a 100644 --- a/test/core/bad_client/tests/simple_request.c +++ b/test/core/bad_client/tests/simple_request.c @@ -139,42 +139,42 @@ int main(int argc, char **argv) { grpc_test_init(argc, argv); /* basic request: check that things are working */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR, 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR_UNUSUAL, 0); - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR_UNUSUAL2, 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR, 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR_UNUSUAL, 0); + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR_UNUSUAL2, 0); /* push an illegal data frame */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x05\x00\x00\x00\x00\x00\x01" "\x34\x00\x00\x00\x00", 0); /* push a data frame with bad flags */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x00\x02\x00\x00\x00\x01", 0); /* push a window update with a bad length */ - GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, + GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, NULL, PFX_STR "\x00\x00\x01\x08\x00\x00\x00\x00\x01", 0); /* push a window update with bad flags */ - GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, + GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, NULL, PFX_STR "\x00\x00\x00\x08\x10\x00\x00\x00\x01", 0); /* push a window update with bad data */ - GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, PFX_STR + GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, NULL, PFX_STR "\x00\x00\x04\x08\x00\x00\x00\x00\x01" "\xff\xff\xff\xff", 0); /* push a short goaway */ - GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, + GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, NULL, PFX_STR "\x00\x00\x04\x07\x00\x00\x00\x00\x00", 0); /* disconnect before sending goaway */ - GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, + GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, NULL, PFX_STR "\x00\x01\x12\x07\x00\x00\x00\x00\x00", GRPC_BAD_CLIENT_DISCONNECT); /* push a rst_stream with a bad length */ - GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, + GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, NULL, PFX_STR "\x00\x00\x01\x03\x00\x00\x00\x00\x01", 0); /* push a rst_stream with bad flags */ - GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, + GRPC_RUN_BAD_CLIENT_TEST(failure_verifier, NULL, PFX_STR "\x00\x00\x00\x03\x10\x00\x00\x00\x01", 0); return 0; diff --git a/test/core/bad_client/tests/unknown_frame.c b/test/core/bad_client/tests/unknown_frame.c index f3870a18138..4f483d21f2e 100644 --- a/test/core/bad_client/tests/unknown_frame.c +++ b/test/core/bad_client/tests/unknown_frame.c @@ -51,7 +51,7 @@ int main(int argc, char **argv) { grpc_test_init(argc, argv); /* test adding prioritization data */ - GRPC_RUN_BAD_CLIENT_TEST(verifier, + GRPC_RUN_BAD_CLIENT_TEST(verifier, NULL, PFX_STR "\x00\x00\x00\x88\x00\x00\x00\x00\x01", GRPC_BAD_CLIENT_DISCONNECT); diff --git a/tools/codegen/core/gen_header_frame.py b/tools/codegen/core/gen_header_frame.py index 96e6c67fa66..ee476267f23 100755 --- a/tools/codegen/core/gen_header_frame.py +++ b/tools/codegen/core/gen_header_frame.py @@ -38,6 +38,8 @@ import json import sys +set_end_stream = len(sys.argv) > 1 and sys.argv[1] == '--set_end_stream' + # parse input, fill in vals vals = [] for line in sys.stdin: @@ -65,6 +67,9 @@ for key, value in vals: payload_bytes.append(payload_line) # fill in header +flags = 0x04 # END_HEADERS +if set_end_stream: + flags |= 0x01 # END_STREAM payload_bytes[0].extend([ (payload_len >> 16) & 0xff, (payload_len >> 8) & 0xff, @@ -72,7 +77,7 @@ payload_bytes[0].extend([ # header frame 0x01, # flags - 0x04, + flags, # stream id 0x00, 0x00, diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index f546f3b9950..e20d808fefb 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -3387,6 +3387,23 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "bad_client_test", + "gpr", + "gpr_test_util", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [], + "language": "c", + "name": "large_metadata_bad_client_test", + "src": [ + "test/core/bad_client/tests/large_metadata.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "bad_client_test", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 0fd77854d22..4a6c1373275 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -2713,6 +2713,27 @@ "windows" ] }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "large_metadata_bad_client_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index bdae4475456..be8b5d40ace 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -1095,6 +1095,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "initial_settings_frame_bad_ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "large_metadata_bad_client_test", "vcxproj\test\large_metadata_bad_client_test\large_metadata_bad_client_test.vcxproj", "{B706A9EC-7982-0DBC-495D-07B165F6CF56}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {BA67B418-B699-E41A-9CC4-0279C49481A5} = {BA67B418-B699-E41A-9CC4-0279C49481A5} + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} = {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server_registered_method_bad_client_test", "vcxproj\test\server_registered_method_bad_client_test\server_registered_method_bad_client_test.vcxproj", "{B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}" ProjectSection(myProperties) = preProject lib = "False" @@ -3087,6 +3099,22 @@ Global {6756895E-05BF-8CC7-58F2-868DF0C0300C}.Release-DLL|Win32.Build.0 = Release|Win32 {6756895E-05BF-8CC7-58F2-868DF0C0300C}.Release-DLL|x64.ActiveCfg = Release|x64 {6756895E-05BF-8CC7-58F2-868DF0C0300C}.Release-DLL|x64.Build.0 = Release|x64 + {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug|Win32.ActiveCfg = Debug|Win32 + {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug|x64.ActiveCfg = Debug|x64 + {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release|Win32.ActiveCfg = Release|Win32 + {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release|x64.ActiveCfg = Release|x64 + {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug|Win32.Build.0 = Debug|Win32 + {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug|x64.Build.0 = Debug|x64 + {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release|Win32.Build.0 = Release|Win32 + {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release|x64.Build.0 = Release|x64 + {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Debug-DLL|x64.Build.0 = Debug|x64 + {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release-DLL|Win32.Build.0 = Release|Win32 + {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release-DLL|x64.ActiveCfg = Release|x64 + {B706A9EC-7982-0DBC-495D-07B165F6CF56}.Release-DLL|x64.Build.0 = Release|x64 {B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Debug|Win32.ActiveCfg = Debug|Win32 {B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Debug|x64.ActiveCfg = Debug|x64 {B4E7CD82-988A-BD3A-29F8-8590D3A8BC28}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/test/large_metadata_bad_client_test/large_metadata_bad_client_test.vcxproj b/vsprojects/vcxproj/test/large_metadata_bad_client_test/large_metadata_bad_client_test.vcxproj new file mode 100644 index 00000000000..0a14694b757 --- /dev/null +++ b/vsprojects/vcxproj/test/large_metadata_bad_client_test/large_metadata_bad_client_test.vcxproj @@ -0,0 +1,202 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {B706A9EC-7982-0DBC-495D-07B165F6CF56} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + large_metadata_bad_client_test + static + Debug + static + Debug + + + large_metadata_bad_client_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {BA67B418-B699-E41A-9CC4-0279C49481A5} + + + {0A7E7F92-FDEA-40F1-A9EC-3BA484F98BBF} + + + {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/large_metadata_bad_client_test/large_metadata_bad_client_test.vcxproj.filters b/vsprojects/vcxproj/test/large_metadata_bad_client_test/large_metadata_bad_client_test.vcxproj.filters new file mode 100644 index 00000000000..5eb9a5e7cb9 --- /dev/null +++ b/vsprojects/vcxproj/test/large_metadata_bad_client_test/large_metadata_bad_client_test.vcxproj.filters @@ -0,0 +1,24 @@ + + + + + test\core\bad_client\tests + + + + + + {6c1eb0cb-9d82-f961-7220-1f6edc913666} + + + {79d5006f-93a1-aa0e-2568-37aa63eef567} + + + {dbde5995-24a0-2332-4bee-0540ed3aa848} + + + {5cf4a13f-ae24-fd98-eb59-b5301f30367c} + + + + From 38281cfa59097c7006a6514fca791a7b50b7ff8a Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 3 May 2016 10:51:49 -0700 Subject: [PATCH 0210/1894] Ruby: improve server error handling, fix a reference error --- src/ruby/lib/grpc/generic/rpc_server.rb | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/ruby/lib/grpc/generic/rpc_server.rb b/src/ruby/lib/grpc/generic/rpc_server.rb index 7f3a38a9f46..9a2af049471 100644 --- a/src/ruby/lib/grpc/generic/rpc_server.rb +++ b/src/ruby/lib/grpc/generic/rpc_server.rb @@ -332,15 +332,13 @@ module GRPC # the current thread to terminate it. def run_till_terminated GRPC.trap_signals - stopped = false t = Thread.new do run - stopped = true end + t.abort_on_exception = true wait_till_running - loop do + until running_state == :stopped sleep SIGNAL_CHECK_PERIOD - break if stopped break unless GRPC.handle_signals end stop @@ -416,7 +414,7 @@ module GRPC GRPC.logger.warn("NOT AVAILABLE: too many jobs_waiting: #{an_rpc}") noop = proc { |x| x } c = ActiveCall.new(an_rpc.call, @cq, noop, noop, an_rpc.deadline) - c.send_status(StatusCodes::RESOURCE_EXHAUSTED, '') + c.send_status(GRPC::Core::StatusCodes::RESOURCE_EXHAUSTED, '') nil end @@ -427,7 +425,7 @@ module GRPC GRPC.logger.warn("UNIMPLEMENTED: #{an_rpc}") noop = proc { |x| x } c = ActiveCall.new(an_rpc.call, @cq, noop, noop, an_rpc.deadline) - c.send_status(StatusCodes::UNIMPLEMENTED, '') + c.send_status(GRPC::Core::StatusCodes::UNIMPLEMENTED, '') nil end @@ -443,7 +441,12 @@ module GRPC unless active_call.nil? @pool.schedule(active_call) do |ac| c, mth = ac - rpc_descs[mth].run_server_method(c, rpc_handlers[mth]) + begin + rpc_descs[mth].run_server_method(c, rpc_handlers[mth]) + rescue StandardError => e + c.send_status(code = GRPC::Core::StatusCodes::INTERNAL, + details = "Server handler failed") + end end end rescue Core::CallError, RuntimeError => e From 59dfee880016e74edc9ebcadaf1ea624a4d457be Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 3 May 2016 11:33:25 -0700 Subject: [PATCH 0211/1894] Fixed rubocop issues with newest changes --- src/ruby/.rubocop.yml | 4 ++-- src/ruby/lib/grpc/generic/rpc_server.rb | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ruby/.rubocop.yml b/src/ruby/.rubocop.yml index d13ce426553..34bb4775435 100644 --- a/src/ruby/.rubocop.yml +++ b/src/ruby/.rubocop.yml @@ -11,10 +11,10 @@ AllCops: - 'pb/test/**/*' Metrics/CyclomaticComplexity: - Max: 8 + Max: 9 Metrics/PerceivedComplexity: - Max: 8 + Max: 9 Metrics/ClassLength: Max: 250 diff --git a/src/ruby/lib/grpc/generic/rpc_server.rb b/src/ruby/lib/grpc/generic/rpc_server.rb index 9a2af049471..a0f4071adc8 100644 --- a/src/ruby/lib/grpc/generic/rpc_server.rb +++ b/src/ruby/lib/grpc/generic/rpc_server.rb @@ -443,9 +443,9 @@ module GRPC c, mth = ac begin rpc_descs[mth].run_server_method(c, rpc_handlers[mth]) - rescue StandardError => e - c.send_status(code = GRPC::Core::StatusCodes::INTERNAL, - details = "Server handler failed") + rescue StandardError + c.send_status(GRPC::Core::StatusCodes::INTERNAL, + 'Server handler failed') end end end From 3b8f3354de5af07ea595713623bcc19cd19d6dfe Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Tue, 3 May 2016 12:18:13 -0700 Subject: [PATCH 0212/1894] Add plugins at the time of static initialization --- include/grpc++/impl/server_builder_plugin.h | 10 ------- include/grpc++/server_builder.h | 3 ++ src/cpp/server/server_builder.cc | 18 ++++++++++++ .../cpp/end2end/server_builder_plugin_test.cc | 28 ++++++++++++++----- 4 files changed, 42 insertions(+), 17 deletions(-) diff --git a/include/grpc++/impl/server_builder_plugin.h b/include/grpc++/impl/server_builder_plugin.h index 7cf369e3467..f792c4b321c 100644 --- a/include/grpc++/impl/server_builder_plugin.h +++ b/include/grpc++/impl/server_builder_plugin.h @@ -64,16 +64,6 @@ class ServerBuilderPlugin { } // namespace grpc -#define GRPC_DECLARE_PLUGIN(plugin_name) \ - namespace sBP##plugin_name { \ - extern std::unique_ptr Create##plugin_name(); \ - } -#define GRPC_INIT_PLUGIN(map, plugin_name) \ - { \ - std::unique_ptr plugin = \ - sBP##plugin_name::Create##plugin_name(); \ - map[plugin->name()] = std::move(plugin); \ - } #endif // GRPCXX_IMPL_SERVER_BUILDER_PLUGIN_H diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index a47b5c71cfb..52064b14349 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -113,6 +113,9 @@ class ServerBuilder { /// Return a running server which is ready for processing calls. std::unique_ptr BuildAndStart(); + static void InternalAddPluginFactory( + std::unique_ptr (*CreatePlugin)()); + private: friend class ::grpc::testing::ServerBuilderPluginTest; diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index 5dc73ed1e48..b6e48efa8dd 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -41,9 +41,21 @@ namespace grpc { +static std::vector (*)()>* plugin_list; +static gpr_once once_init_plugin_list = GPR_ONCE_INIT; + +static void do_plugin_list_init(void) { + plugin_list = new std::vector (*)()>(); +} + ServerBuilder::ServerBuilder() : max_message_size_(-1), generic_service_(nullptr) { grpc_compression_options_init(&compression_options_); + gpr_once_init(&once_init_plugin_list, do_plugin_list_init); + for (auto factory : (*plugin_list)) { + std::unique_ptr plugin = factory(); + plugins_[plugin->name()] = std::move(plugin); + } } std::unique_ptr ServerBuilder::AddCompletionQueue() { @@ -156,4 +168,10 @@ std::unique_ptr ServerBuilder::BuildAndStart() { return server; } +void ServerBuilder::InternalAddPluginFactory( + std::unique_ptr (*CreatePlugin)()) { + gpr_once_init(&once_init_plugin_list, do_plugin_list_init); + (*plugin_list).push_back(CreatePlugin); +} + } // namespace grpc diff --git a/test/cpp/end2end/server_builder_plugin_test.cc b/test/cpp/end2end/server_builder_plugin_test.cc index 9ed176d29dd..0d44999a08e 100644 --- a/test/cpp/end2end/server_builder_plugin_test.cc +++ b/test/cpp/end2end/server_builder_plugin_test.cc @@ -115,6 +115,11 @@ class InsertPluginServerBuilderOption : public ServerBuilderOption { void UpdatePlugins( std::map>* plugins) GRPC_OVERRIDE { + auto it = plugins->begin(); + while (it != plugins->end()) { + plugins->erase(it++); + } + std::unique_ptr plugin( new TestServerBuilderPlugin()); if (register_service_) plugin->SetRegisterService(); @@ -127,13 +132,24 @@ class InsertPluginServerBuilderOption : public ServerBuilderOption { bool register_service_; }; -namespace sBPTestServerBuilderPlugin { - std::unique_ptr CreateTestServerBuilderPlugin() { return std::unique_ptr(new TestServerBuilderPlugin()); } -} // namespace sBPTestServerBuilderPlugin +void grpc_AddServerBuilderPlugin_reflection() { + static bool already_here = false; + if (already_here) return; + already_here = true; + ::grpc::ServerBuilder::InternalAddPluginFactory( + &CreateTestServerBuilderPlugin); +} + +// Force AddServerBuilderPlugin() to be called at static initialization time. +struct StaticPluginInitializer_reflection { + StaticPluginInitializer_reflection() { + grpc_AddServerBuilderPlugin_reflection(); + } +} static_plugin_initializer_reflection_; class ServerBuilderPluginTest : public ::testing::TestWithParam { public: @@ -146,8 +162,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam { void InsertPlugin() { if (GetParam()) { - // Add ServerBuilder plugin directly - GRPC_INIT_PLUGIN(builder_->plugins_, TestServerBuilderPlugin); + // Add ServerBuilder plugin in static initialization EXPECT_TRUE(builder_->plugins_[PLUGIN_NAME] != nullptr); } else { // Add ServerBuilder plugin using ServerBuilder::SetOption() @@ -158,8 +173,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam { void InsertPluginWithTestService() { if (GetParam()) { - // Add ServerBuilder plugin directly - GRPC_INIT_PLUGIN(builder_->plugins_, TestServerBuilderPlugin); + // Add ServerBuilder plugin in static initialization EXPECT_TRUE(builder_->plugins_[PLUGIN_NAME] != nullptr); auto plugin = static_cast( builder_->plugins_[PLUGIN_NAME].get()); From e4d2748f2fec4b189cdb7d13e25df0be95888ba2 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 3 May 2016 12:19:33 -0700 Subject: [PATCH 0213/1894] Fix async_end2end_test flow control Completion queues + flow control + single threading is hard. We need a read outstanding on a call to grant flow control tokens to the remote end. To do that we need to request a read *before* we wait for the write to be finished, otherwise, in the case of a large write we'll block waiting for flow control tokens. Built on #6402 --- test/cpp/end2end/async_end2end_test.cc | 131 ++++++++++++++----------- 1 file changed, 73 insertions(+), 58 deletions(-) diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index 4de181b9011..0232a9fa317 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -281,10 +281,11 @@ class AsyncEnd2endTest : public ::testing::TestWithParam { send_response.set_message(recv_request.message()); response_writer.Finish(send_response, Status::OK, tag(3)); - Verifier(GetParam().disable_blocking).Expect(3, true).Verify(cq_.get()); - response_reader->Finish(&recv_response, &recv_status, tag(4)); - Verifier(GetParam().disable_blocking).Expect(4, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking) + .Expect(3, true) + .Expect(4, true) + .Verify(cq_.get()); EXPECT_EQ(send_response.message(), recv_response.message()); EXPECT_TRUE(recv_status.ok()); @@ -345,12 +346,9 @@ TEST_P(AsyncEnd2endTest, AsyncNextRpc) { send_response.set_message(recv_request.message()); response_writer.Finish(send_response, Status::OK, tag(3)); - Verifier(GetParam().disable_blocking) - .Expect(3, true) - .Verify(cq_.get(), std::chrono::system_clock::time_point::max()); - response_reader->Finish(&recv_response, &recv_status, tag(4)); Verifier(GetParam().disable_blocking) + .Expect(3, true) .Expect(4, true) .Verify(cq_.get(), std::chrono::system_clock::time_point::max()); @@ -384,31 +382,35 @@ TEST_P(AsyncEnd2endTest, SimpleClientStreaming) { .Verify(cq_.get()); cli_stream->Write(send_request, tag(3)); - Verifier(GetParam().disable_blocking).Expect(3, true).Verify(cq_.get()); - srv_stream.Read(&recv_request, tag(4)); - Verifier(GetParam().disable_blocking).Expect(4, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking) + .Expect(3, true) + .Expect(4, true) + .Verify(cq_.get()); EXPECT_EQ(send_request.message(), recv_request.message()); cli_stream->Write(send_request, tag(5)); - Verifier(GetParam().disable_blocking).Expect(5, true).Verify(cq_.get()); - srv_stream.Read(&recv_request, tag(6)); - Verifier(GetParam().disable_blocking).Expect(6, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking) + .Expect(5, true) + .Expect(6, true) + .Verify(cq_.get()); EXPECT_EQ(send_request.message(), recv_request.message()); cli_stream->WritesDone(tag(7)); - Verifier(GetParam().disable_blocking).Expect(7, true).Verify(cq_.get()); - srv_stream.Read(&recv_request, tag(8)); - Verifier(GetParam().disable_blocking).Expect(8, false).Verify(cq_.get()); + Verifier(GetParam().disable_blocking) + .Expect(7, true) + .Expect(8, false) + .Verify(cq_.get()); send_response.set_message(recv_request.message()); srv_stream.Finish(send_response, Status::OK, tag(9)); - Verifier(GetParam().disable_blocking).Expect(9, true).Verify(cq_.get()); - cli_stream->Finish(&recv_status, tag(10)); - Verifier(GetParam().disable_blocking).Expect(10, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking) + .Expect(9, true) + .Expect(10, true) + .Verify(cq_.get()); EXPECT_EQ(send_response.message(), recv_response.message()); EXPECT_TRUE(recv_status.ok()); @@ -442,24 +444,27 @@ TEST_P(AsyncEnd2endTest, SimpleServerStreaming) { send_response.set_message(recv_request.message()); srv_stream.Write(send_response, tag(3)); - Verifier(GetParam().disable_blocking).Expect(3, true).Verify(cq_.get()); - cli_stream->Read(&recv_response, tag(4)); - Verifier(GetParam().disable_blocking).Expect(4, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking) + .Expect(3, true) + .Expect(4, true) + .Verify(cq_.get()); EXPECT_EQ(send_response.message(), recv_response.message()); srv_stream.Write(send_response, tag(5)); - Verifier(GetParam().disable_blocking).Expect(5, true).Verify(cq_.get()); - cli_stream->Read(&recv_response, tag(6)); - Verifier(GetParam().disable_blocking).Expect(6, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking) + .Expect(5, true) + .Expect(6, true) + .Verify(cq_.get()); EXPECT_EQ(send_response.message(), recv_response.message()); srv_stream.Finish(Status::OK, tag(7)); - Verifier(GetParam().disable_blocking).Expect(7, true).Verify(cq_.get()); - cli_stream->Read(&recv_response, tag(8)); - Verifier(GetParam().disable_blocking).Expect(8, false).Verify(cq_.get()); + Verifier(GetParam().disable_blocking) + .Expect(7, true) + .Expect(8, false) + .Verify(cq_.get()); cli_stream->Finish(&recv_status, tag(9)); Verifier(GetParam().disable_blocking).Expect(9, true).Verify(cq_.get()); @@ -493,31 +498,35 @@ TEST_P(AsyncEnd2endTest, SimpleBidiStreaming) { .Verify(cq_.get()); cli_stream->Write(send_request, tag(3)); - Verifier(GetParam().disable_blocking).Expect(3, true).Verify(cq_.get()); - srv_stream.Read(&recv_request, tag(4)); - Verifier(GetParam().disable_blocking).Expect(4, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking) + .Expect(3, true) + .Expect(4, true) + .Verify(cq_.get()); EXPECT_EQ(send_request.message(), recv_request.message()); send_response.set_message(recv_request.message()); srv_stream.Write(send_response, tag(5)); - Verifier(GetParam().disable_blocking).Expect(5, true).Verify(cq_.get()); - cli_stream->Read(&recv_response, tag(6)); - Verifier(GetParam().disable_blocking).Expect(6, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking) + .Expect(5, true) + .Expect(6, true) + .Verify(cq_.get()); EXPECT_EQ(send_response.message(), recv_response.message()); cli_stream->WritesDone(tag(7)); - Verifier(GetParam().disable_blocking).Expect(7, true).Verify(cq_.get()); - srv_stream.Read(&recv_request, tag(8)); - Verifier(GetParam().disable_blocking).Expect(8, false).Verify(cq_.get()); + Verifier(GetParam().disable_blocking) + .Expect(7, true) + .Expect(8, false) + .Verify(cq_.get()); srv_stream.Finish(Status::OK, tag(9)); - Verifier(GetParam().disable_blocking).Expect(9, true).Verify(cq_.get()); - cli_stream->Finish(&recv_status, tag(10)); - Verifier(GetParam().disable_blocking).Expect(10, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking) + .Expect(9, true) + .Expect(10, true) + .Verify(cq_.get()); EXPECT_TRUE(recv_status.ok()); } @@ -562,11 +571,11 @@ TEST_P(AsyncEnd2endTest, ClientInitialMetadataRpc) { send_response.set_message(recv_request.message()); response_writer.Finish(send_response, Status::OK, tag(3)); - - Verifier(GetParam().disable_blocking).Expect(3, true).Verify(cq_.get()); - response_reader->Finish(&recv_response, &recv_status, tag(4)); - Verifier(GetParam().disable_blocking).Expect(4, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking) + .Expect(3, true) + .Expect(4, true) + .Verify(cq_.get()); EXPECT_EQ(send_response.message(), recv_response.message()); EXPECT_TRUE(recv_status.ok()); @@ -612,10 +621,11 @@ TEST_P(AsyncEnd2endTest, ServerInitialMetadataRpc) { send_response.set_message(recv_request.message()); response_writer.Finish(send_response, Status::OK, tag(5)); - Verifier(GetParam().disable_blocking).Expect(5, true).Verify(cq_.get()); - response_reader->Finish(&recv_response, &recv_status, tag(6)); - Verifier(GetParam().disable_blocking).Expect(6, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking) + .Expect(5, true) + .Expect(6, true) + .Verify(cq_.get()); EXPECT_EQ(send_response.message(), recv_response.message()); EXPECT_TRUE(recv_status.ok()); @@ -652,11 +662,13 @@ TEST_P(AsyncEnd2endTest, ServerTrailingMetadataRpc) { srv_ctx.AddTrailingMetadata(meta1.first, meta1.second); srv_ctx.AddTrailingMetadata(meta2.first, meta2.second); response_writer.Finish(send_response, Status::OK, tag(4)); + response_reader->Finish(&recv_response, &recv_status, tag(5)); - Verifier(GetParam().disable_blocking).Expect(4, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking) + .Expect(4, true) + .Expect(5, true) + .Verify(cq_.get()); - response_reader->Finish(&recv_response, &recv_status, tag(5)); - Verifier(GetParam().disable_blocking).Expect(5, true).Verify(cq_.get()); EXPECT_EQ(send_response.message(), recv_response.message()); EXPECT_TRUE(recv_status.ok()); auto server_trailing_metadata = cli_ctx.GetServerTrailingMetadata(); @@ -730,11 +742,13 @@ TEST_P(AsyncEnd2endTest, MetadataRpc) { srv_ctx.AddTrailingMetadata(meta5.first, meta5.second); srv_ctx.AddTrailingMetadata(meta6.first, meta6.second); response_writer.Finish(send_response, Status::OK, tag(5)); + response_reader->Finish(&recv_response, &recv_status, tag(6)); - Verifier(GetParam().disable_blocking).Expect(5, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking) + .Expect(5, true) + .Expect(6, true) + .Verify(cq_.get()); - response_reader->Finish(&recv_response, &recv_status, tag(6)); - Verifier(GetParam().disable_blocking).Expect(6, true).Verify(cq_.get()); EXPECT_EQ(send_response.message(), recv_response.message()); EXPECT_TRUE(recv_status.ok()); auto server_trailing_metadata = cli_ctx.GetServerTrailingMetadata(); @@ -807,12 +821,13 @@ TEST_P(AsyncEnd2endTest, ServerCheckDone) { send_response.set_message(recv_request.message()); response_writer.Finish(send_response, Status::OK, tag(3)); - Verifier(GetParam().disable_blocking).Expect(3, true).Verify(cq_.get()); - Verifier(GetParam().disable_blocking).Expect(5, true).Verify(cq_.get()); - EXPECT_FALSE(srv_ctx.IsCancelled()); - response_reader->Finish(&recv_response, &recv_status, tag(4)); - Verifier(GetParam().disable_blocking).Expect(4, true).Verify(cq_.get()); + Verifier(GetParam().disable_blocking) + .Expect(3, true) + .Expect(4, true) + .Expect(5, true) + .Verify(cq_.get()); + EXPECT_FALSE(srv_ctx.IsCancelled()); EXPECT_EQ(send_response.message(), recv_response.message()); EXPECT_TRUE(recv_status.ok()); From 7cae1f7198abd0f7048c8cc4e5946afbacc36b0b Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 3 May 2016 12:23:08 -0700 Subject: [PATCH 0214/1894] Remove some unneeded code from an earlier iteration of this code. --- test/core/end2end/cq_verifier.c | 8 -------- test/core/end2end/cq_verifier.h | 1 - 2 files changed, 9 deletions(-) diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c index 5f1a33242ee..77afe588d79 100644 --- a/test/core/end2end/cq_verifier.c +++ b/test/core/end2end/cq_verifier.c @@ -107,14 +107,6 @@ int contains_metadata(grpc_metadata_array *array, const char *key, return has_metadata(array->metadata, array->count, key, value); } -int contains_metadata_key(grpc_metadata_array *array, const char *key) { - for (size_t i = 0; i < array->count; ++i) { - if (strcmp(array->metadata[i].key, key) == 0) - return 1; - } - return 0; -} - static gpr_slice merge_slices(gpr_slice *slices, size_t nslices) { size_t i; size_t len = 0; diff --git a/test/core/end2end/cq_verifier.h b/test/core/end2end/cq_verifier.h index a54065950d2..b3e07c45a58 100644 --- a/test/core/end2end/cq_verifier.h +++ b/test/core/end2end/cq_verifier.h @@ -62,6 +62,5 @@ void cq_expect_completion(cq_verifier *v, void *tag, int success); int byte_buffer_eq_string(grpc_byte_buffer *byte_buffer, const char *string); int contains_metadata(grpc_metadata_array *array, const char *key, const char *value); -int contains_metadata_key(grpc_metadata_array *array, const char *key); #endif /* GRPC_TEST_CORE_END2END_CQ_VERIFIER_H */ From a4edeb337229b7468a7ccbef6cb9d3c135b21b41 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Tue, 3 May 2016 12:24:16 -0700 Subject: [PATCH 0215/1894] Fix build breakage in bad_client tests. --- test/core/bad_client/tests/head_of_line_blocking.c | 2 +- test/core/bad_client/tests/window_overflow.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/core/bad_client/tests/head_of_line_blocking.c b/test/core/bad_client/tests/head_of_line_blocking.c index 53cd4537b2f..e4051bb6685 100644 --- a/test/core/bad_client/tests/head_of_line_blocking.c +++ b/test/core/bad_client/tests/head_of_line_blocking.c @@ -144,7 +144,7 @@ int main(int argc, char **argv) { addbuf(hdr, sizeof(hdr)); addbuf(msg, FRAME_SIZE); } - grpc_run_bad_client_test(verifier, g_buffer, g_count, 0); + grpc_run_bad_client_test(verifier, NULL, g_buffer, g_count, 0); gpr_free(g_buffer); return 0; diff --git a/test/core/bad_client/tests/window_overflow.c b/test/core/bad_client/tests/window_overflow.c index 16f11e7dd0a..0d17dbe448e 100644 --- a/test/core/bad_client/tests/window_overflow.c +++ b/test/core/bad_client/tests/window_overflow.c @@ -105,7 +105,7 @@ int main(int argc, char **argv) { addbuf(message, sizeof(message)); } } - grpc_run_bad_client_test(verifier, g_buffer, g_count, 0); + grpc_run_bad_client_test(verifier, NULL, g_buffer, g_count, 0); gpr_free(g_buffer); return 0; From b6a9016fc234714632a20cb25dc2e822a72243f8 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 3 May 2016 09:41:15 -0700 Subject: [PATCH 0216/1894] add tests for AsyncCallServer --- .../Grpc.Core.Tests/Grpc.Core.Tests.csproj | 2 + .../Internal/AsyncCallServerTest.cs | 134 +++++++++++++ .../Grpc.Core.Tests/Internal/AsyncCallTest.cs | 134 +------------ .../Internal/FakeNativeCall.cs | 177 ++++++++++++++++++ .../Grpc.Core/Internal/AsyncCallServer.cs | 9 + 5 files changed, 324 insertions(+), 132 deletions(-) create mode 100644 src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs create mode 100644 src/csharp/Grpc.Core.Tests/Internal/FakeNativeCall.cs diff --git a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj index 0cd059c2327..47131fc454e 100644 --- a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj +++ b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj @@ -84,6 +84,8 @@ + + diff --git a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs new file mode 100644 index 00000000000..8c178657a1b --- /dev/null +++ b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs @@ -0,0 +1,134 @@ +#region Copyright notice and license + +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#endregion + +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Threading.Tasks; + +using Grpc.Core.Internal; +using NUnit.Framework; + +namespace Grpc.Core.Internal.Tests +{ + /// + /// Uses fake native call to test interaction of AsyncCallServer wrapping code with C core in different situations. + /// + public class AsyncCallServerTest + { + Server server; + FakeNativeCall fakeCall; + AsyncCallServer asyncCallServer; + + [SetUp] + public void Init() + { + var environment = GrpcEnvironment.AddRef(); + server = new Server(); + + fakeCall = new FakeNativeCall(); + asyncCallServer = new AsyncCallServer( + Marshallers.StringMarshaller.Serializer, Marshallers.StringMarshaller.Deserializer, + environment, + server); + asyncCallServer.InitializeForTesting(fakeCall); + } + + [TearDown] + public void Cleanup() + { + GrpcEnvironment.Release(); + } + + [Test] + public void CancelNotificationAfterStartDisposes() + { + var finishedTask = asyncCallServer.ServerSideCallAsync(); + var requestStream = new ServerRequestStream(asyncCallServer); + var responseStream = new ServerResponseStream(asyncCallServer); + + // Finishing requestStream is needed for dispose to happen. + var moveNextTask = requestStream.MoveNext(); + fakeCall.ReceivedMessageHandler(true, null); + Assert.IsFalse(moveNextTask.Result); + + fakeCall.ReceivedCloseOnServerHandler(true, cancelled: true); + AssertDisposed(asyncCallServer, fakeCall, finishedTask); + } + + [Test] + public void ReadAfterCancelNotificationCanSucceed() + { + var finishedTask = asyncCallServer.ServerSideCallAsync(); + var requestStream = new ServerRequestStream(asyncCallServer); + var responseStream = new ServerResponseStream(asyncCallServer); + + fakeCall.ReceivedCloseOnServerHandler(true, cancelled: true); + + // Check that startin a read after cancel notification has been processed is legal. + var moveNextTask = requestStream.MoveNext(); + fakeCall.ReceivedMessageHandler(true, null); + Assert.IsFalse(moveNextTask.Result); + + AssertDisposed(asyncCallServer, fakeCall, finishedTask); + } + + + // TODO: read completion failure ... + + // TODO: + + + + // TODO: write fails... + + // TODO: write completion fails... + + // TODO: cancellation delivered... + + // TODO: cancel notification in the middle of a read... + + // TODO: cancel notification in the middle of a write... + + // TODO: cancellation delivered... + + // TODO: what does writing status do to reads? + + static void AssertDisposed(AsyncCallServer asyncCallServer, FakeNativeCall fakeCall, Task finishedTask) + { + Assert.IsTrue(fakeCall.IsDisposed); + Assert.IsTrue(finishedTask.IsCompleted); + Assert.DoesNotThrow(() => finishedTask.Wait()); + } + } +} diff --git a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs index ed2d22815b6..abe9d4a2e62 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs @@ -42,7 +42,7 @@ using NUnit.Framework; namespace Grpc.Core.Internal.Tests { /// - /// Uses fake native call to test interaction of wrapping code with C core in different situations. + /// Uses fake native call to test interaction of AsyncCall wrapping code with C core in different situations. /// public class AsyncCallTest { @@ -480,139 +480,9 @@ namespace Grpc.Core.Internal.Tests Assert.IsTrue(fakeCall.IsDisposed); var ex = Assert.ThrowsAsync(async () => await moveNextTask); + Assert.AreEqual(expectedStatusCode, ex.Status.StatusCode); Assert.AreEqual(expectedStatusCode, asyncCall.GetStatus().StatusCode); Assert.AreEqual(0, asyncCall.GetTrailers().Count); } - - internal class FakeNativeCall : INativeCall - { - public UnaryResponseClientHandler UnaryResponseClientHandler - { - get; - set; - } - - public ReceivedStatusOnClientHandler ReceivedStatusOnClientHandler - { - get; - set; - } - - public ReceivedMessageHandler ReceivedMessageHandler - { - get; - set; - } - - public ReceivedResponseHeadersHandler ReceivedResponseHeadersHandler - { - get; - set; - } - - public SendCompletionHandler SendCompletionHandler - { - get; - set; - } - - public ReceivedCloseOnServerHandler ReceivedCloseOnServerHandler - { - get; - set; - } - - public bool IsCancelled - { - get; - set; - } - - public bool IsDisposed - { - get; - set; - } - - public void Cancel() - { - IsCancelled = true; - } - - public void CancelWithStatus(Status status) - { - IsCancelled = true; - } - - public string GetPeer() - { - return "PEER"; - } - - public void StartUnary(UnaryResponseClientHandler callback, byte[] payload, MetadataArraySafeHandle metadataArray, WriteFlags writeFlags) - { - UnaryResponseClientHandler = callback; - } - - public void StartUnary(BatchContextSafeHandle ctx, byte[] payload, MetadataArraySafeHandle metadataArray, WriteFlags writeFlags) - { - throw new NotImplementedException(); - } - - public void StartClientStreaming(UnaryResponseClientHandler callback, MetadataArraySafeHandle metadataArray) - { - UnaryResponseClientHandler = callback; - } - - public void StartServerStreaming(ReceivedStatusOnClientHandler callback, byte[] payload, MetadataArraySafeHandle metadataArray, WriteFlags writeFlags) - { - ReceivedStatusOnClientHandler = callback; - } - - public void StartDuplexStreaming(ReceivedStatusOnClientHandler callback, MetadataArraySafeHandle metadataArray) - { - ReceivedStatusOnClientHandler = callback; - } - - public void StartReceiveMessage(ReceivedMessageHandler callback) - { - ReceivedMessageHandler = callback; - } - - public void StartReceiveInitialMetadata(ReceivedResponseHeadersHandler callback) - { - ReceivedResponseHeadersHandler = callback; - } - - public void StartSendInitialMetadata(SendCompletionHandler callback, MetadataArraySafeHandle metadataArray) - { - SendCompletionHandler = callback; - } - - public void StartSendMessage(SendCompletionHandler callback, byte[] payload, WriteFlags writeFlags, bool sendEmptyInitialMetadata) - { - SendCompletionHandler = callback; - } - - public void StartSendCloseFromClient(SendCompletionHandler callback) - { - SendCompletionHandler = callback; - } - - public void StartSendStatusFromServer(SendCompletionHandler callback, Status status, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata) - { - SendCompletionHandler = callback; - } - - public void StartServerSide(ReceivedCloseOnServerHandler callback) - { - ReceivedCloseOnServerHandler = callback; - } - - public void Dispose() - { - IsDisposed = true; - } - } } } diff --git a/src/csharp/Grpc.Core.Tests/Internal/FakeNativeCall.cs b/src/csharp/Grpc.Core.Tests/Internal/FakeNativeCall.cs new file mode 100644 index 00000000000..441bf9660be --- /dev/null +++ b/src/csharp/Grpc.Core.Tests/Internal/FakeNativeCall.cs @@ -0,0 +1,177 @@ +#region Copyright notice and license + +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#endregion + +using System; +using System.Collections.Generic; +using System.Runtime.InteropServices; +using System.Threading.Tasks; + +using Grpc.Core.Internal; +using NUnit.Framework; + +namespace Grpc.Core.Internal.Tests +{ + /// + /// For testing purposes. + /// + internal class FakeNativeCall : INativeCall + { + public UnaryResponseClientHandler UnaryResponseClientHandler + { + get; + set; + } + + public ReceivedStatusOnClientHandler ReceivedStatusOnClientHandler + { + get; + set; + } + + public ReceivedMessageHandler ReceivedMessageHandler + { + get; + set; + } + + public ReceivedResponseHeadersHandler ReceivedResponseHeadersHandler + { + get; + set; + } + + public SendCompletionHandler SendCompletionHandler + { + get; + set; + } + + public ReceivedCloseOnServerHandler ReceivedCloseOnServerHandler + { + get; + set; + } + + public bool IsCancelled + { + get; + set; + } + + public bool IsDisposed + { + get; + set; + } + + public void Cancel() + { + IsCancelled = true; + } + + public void CancelWithStatus(Status status) + { + IsCancelled = true; + } + + public string GetPeer() + { + return "PEER"; + } + + public void StartUnary(UnaryResponseClientHandler callback, byte[] payload, MetadataArraySafeHandle metadataArray, WriteFlags writeFlags) + { + UnaryResponseClientHandler = callback; + } + + public void StartUnary(BatchContextSafeHandle ctx, byte[] payload, MetadataArraySafeHandle metadataArray, WriteFlags writeFlags) + { + throw new NotImplementedException(); + } + + public void StartClientStreaming(UnaryResponseClientHandler callback, MetadataArraySafeHandle metadataArray) + { + UnaryResponseClientHandler = callback; + } + + public void StartServerStreaming(ReceivedStatusOnClientHandler callback, byte[] payload, MetadataArraySafeHandle metadataArray, WriteFlags writeFlags) + { + ReceivedStatusOnClientHandler = callback; + } + + public void StartDuplexStreaming(ReceivedStatusOnClientHandler callback, MetadataArraySafeHandle metadataArray) + { + ReceivedStatusOnClientHandler = callback; + } + + public void StartReceiveMessage(ReceivedMessageHandler callback) + { + ReceivedMessageHandler = callback; + } + + public void StartReceiveInitialMetadata(ReceivedResponseHeadersHandler callback) + { + ReceivedResponseHeadersHandler = callback; + } + + public void StartSendInitialMetadata(SendCompletionHandler callback, MetadataArraySafeHandle metadataArray) + { + SendCompletionHandler = callback; + } + + public void StartSendMessage(SendCompletionHandler callback, byte[] payload, WriteFlags writeFlags, bool sendEmptyInitialMetadata) + { + SendCompletionHandler = callback; + } + + public void StartSendCloseFromClient(SendCompletionHandler callback) + { + SendCompletionHandler = callback; + } + + public void StartSendStatusFromServer(SendCompletionHandler callback, Status status, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata) + { + SendCompletionHandler = callback; + } + + public void StartServerSide(ReceivedCloseOnServerHandler callback) + { + ReceivedCloseOnServerHandler = callback; + } + + public void Dispose() + { + IsDisposed = true; + } + } +} diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs index cce480b2c4a..efcf4ea7fea 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs @@ -64,6 +64,15 @@ namespace Grpc.Core.Internal InitializeInternal(call); } + /// + /// Only for testing purposes. + /// + public void InitializeForTesting(INativeCall call) + { + server.AddCallReference(this); + InitializeInternal(call); + } + /// /// Starts a server side call. /// From ce60d8e7a4f9a23495d0d2edb22dadbb78ca8089 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 3 May 2016 09:52:40 -0700 Subject: [PATCH 0217/1894] add AsyncCalServer tests to sanity tests --- .../Grpc.Core.Tests/Internal/AsyncCallServerTest.cs | 8 +++----- src/csharp/tests.json | 1 + 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs index 8c178657a1b..a1671c97d5d 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs @@ -83,7 +83,7 @@ namespace Grpc.Core.Internal.Tests Assert.IsFalse(moveNextTask.Result); fakeCall.ReceivedCloseOnServerHandler(true, cancelled: true); - AssertDisposed(asyncCallServer, fakeCall, finishedTask); + AssertFinished(asyncCallServer, fakeCall, finishedTask); } [Test] @@ -100,14 +100,12 @@ namespace Grpc.Core.Internal.Tests fakeCall.ReceivedMessageHandler(true, null); Assert.IsFalse(moveNextTask.Result); - AssertDisposed(asyncCallServer, fakeCall, finishedTask); + AssertFinished(asyncCallServer, fakeCall, finishedTask); } // TODO: read completion failure ... - // TODO: - // TODO: write fails... @@ -124,7 +122,7 @@ namespace Grpc.Core.Internal.Tests // TODO: what does writing status do to reads? - static void AssertDisposed(AsyncCallServer asyncCallServer, FakeNativeCall fakeCall, Task finishedTask) + static void AssertFinished(AsyncCallServer asyncCallServer, FakeNativeCall fakeCall, Task finishedTask) { Assert.IsTrue(fakeCall.IsDisposed); Assert.IsTrue(finishedTask.IsCompleted); diff --git a/src/csharp/tests.json b/src/csharp/tests.json index f733352a310..f6af3408d51 100644 --- a/src/csharp/tests.json +++ b/src/csharp/tests.json @@ -1,5 +1,6 @@ { "Grpc.Core.Tests": [ + "Grpc.Core.Internal.Tests.AsyncCallServerTest", "Grpc.Core.Internal.Tests.AsyncCallTest", "Grpc.Core.Internal.Tests.ChannelArgsSafeHandleTest", "Grpc.Core.Internal.Tests.CompletionQueueEventTest", From b32e29f0a2f2cbe858e040190f2fd69237007f9a Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 3 May 2016 12:55:42 -0700 Subject: [PATCH 0218/1894] make SendStatusFromServer independent on WriteAsync --- .../Grpc.Core/Internal/AsyncCallBase.cs | 9 +++------ .../Grpc.Core/Internal/AsyncCallServer.cs | 19 ++++++++++--------- .../Grpc.Core/Internal/ServerCallHandler.cs | 12 +++++------- .../Internal/ServerResponseStream.cs | 7 ------- 4 files changed, 18 insertions(+), 29 deletions(-) diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs index abacfabadb6..18dbe87734b 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs @@ -69,6 +69,7 @@ namespace Grpc.Core.Internal protected AsyncCompletionDelegate sendCompletionDelegate; // Completion of a pending send or sendclose if not null. protected TaskCompletionSource streamingReadTcs; // Completion of a pending streaming read if not null. + protected TaskCompletionSource sendStatusFromServerTcs; protected bool readingDone; // True if last read (i.e. read with null payload) was already received. protected bool halfcloseRequested; // True if send close have been initiated. @@ -328,22 +329,18 @@ namespace Grpc.Core.Internal /// protected void HandleSendStatusFromServerFinished(bool success) { - AsyncCompletionDelegate origCompletionDelegate = null; lock (myLock) { - origCompletionDelegate = sendCompletionDelegate; - sendCompletionDelegate = null; - ReleaseResourcesIfPossible(); } if (!success) { - FireCompletion(origCompletionDelegate, null, new InvalidOperationException("Error sending status from server.")); + sendStatusFromServerTcs.SetException(new InvalidOperationException("Error sending status from server.")); } else { - FireCompletion(origCompletionDelegate, null, null); + sendStatusFromServerTcs.SetResult(null); } } diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs index efcf4ea7fea..94f49bd8f2a 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs @@ -136,24 +136,24 @@ namespace Grpc.Core.Internal } /// - /// Sends call result status, also indicating server is done with streaming responses. - /// Only one pending send action is allowed at any given time. - /// completionDelegate is called when the operation finishes. + /// Sends call result status, indicating we are done with writes. + /// Sending a status different from StatusCode.OK will also implicitly cancel the call. /// - public void StartSendStatusFromServer(Status status, Metadata trailers, AsyncCompletionDelegate completionDelegate) + public Task SendStatusFromServerAsync(Status status, Metadata trailers) { lock (myLock) { - GrpcPreconditions.CheckNotNull(completionDelegate, "Completion delegate cannot be null"); - CheckSendingAllowed(allowFinished: false); + GrpcPreconditions.CheckState(started); + GrpcPreconditions.CheckState(!disposed); + GrpcPreconditions.CheckState(!halfcloseRequested, "Can only send status from server once."); using (var metadataArray = MetadataArraySafeHandle.Create(trailers)) { call.StartSendStatusFromServer(HandleSendStatusFromServerFinished, status, metadataArray, !initialMetadataSent); } halfcloseRequested = true; - readingDone = true; - sendCompletionDelegate = completionDelegate; + sendStatusFromServerTcs = new TaskCompletionSource(); + return sendStatusFromServerTcs.Task; } } @@ -198,12 +198,13 @@ namespace Grpc.Core.Internal /// private void HandleFinishedServerside(bool success, bool cancelled) { + // NOTE: because this event is a result of batch containing GRPC_OP_RECV_CLOSE_ON_SERVER, + // success will be always set to true. lock (myLock) { finished = true; ReleaseResourcesIfPossible(); } - // TODO(jtattermusch): handle error if (cancelled) { diff --git a/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs b/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs index 1f83e51548e..bf9df9f783b 100644 --- a/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs +++ b/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs @@ -93,7 +93,7 @@ namespace Grpc.Core.Internal } try { - await responseStream.WriteStatusAsync(status, context.ResponseTrailers).ConfigureAwait(false); + await asyncCall.SendStatusFromServerAsync(status, context.ResponseTrailers).ConfigureAwait(false); } catch (OperationCanceledException) { @@ -149,7 +149,7 @@ namespace Grpc.Core.Internal try { - await responseStream.WriteStatusAsync(status, context.ResponseTrailers).ConfigureAwait(false); + await asyncCall.SendStatusFromServerAsync(status, context.ResponseTrailers).ConfigureAwait(false); } catch (OperationCanceledException) { @@ -209,7 +209,7 @@ namespace Grpc.Core.Internal try { - await responseStream.WriteStatusAsync(status, context.ResponseTrailers).ConfigureAwait(false); + await asyncCall.SendStatusFromServerAsync(status, context.ResponseTrailers).ConfigureAwait(false); } catch (OperationCanceledException) { @@ -260,7 +260,7 @@ namespace Grpc.Core.Internal } try { - await responseStream.WriteStatusAsync(status, context.ResponseTrailers).ConfigureAwait(false); + await asyncCall.SendStatusFromServerAsync(status, context.ResponseTrailers).ConfigureAwait(false); } catch (OperationCanceledException) { @@ -282,9 +282,7 @@ namespace Grpc.Core.Internal asyncCall.Initialize(newRpc.Call); var finishedTask = asyncCall.ServerSideCallAsync(); - var responseStream = new ServerResponseStream(asyncCall); - - await responseStream.WriteStatusAsync(new Status(StatusCode.Unimplemented, ""), Metadata.Empty).ConfigureAwait(false); + await asyncCall.SendStatusFromServerAsync(new Status(StatusCode.Unimplemented, ""), Metadata.Empty).ConfigureAwait(false); await finishedTask.ConfigureAwait(false); } } diff --git a/src/csharp/Grpc.Core/Internal/ServerResponseStream.cs b/src/csharp/Grpc.Core/Internal/ServerResponseStream.cs index 03e39efc024..ecfee0bfddb 100644 --- a/src/csharp/Grpc.Core/Internal/ServerResponseStream.cs +++ b/src/csharp/Grpc.Core/Internal/ServerResponseStream.cs @@ -57,13 +57,6 @@ namespace Grpc.Core.Internal return taskSource.Task; } - public Task WriteStatusAsync(Status status, Metadata trailers) - { - var taskSource = new AsyncCompletionTaskSource(); - call.StartSendStatusFromServer(status, trailers, taskSource.CompletionDelegate); - return taskSource.Task; - } - public Task WriteResponseHeadersAsync(Metadata responseHeaders) { var taskSource = new AsyncCompletionTaskSource(); From 9a9813bc4b89b58400adbcfdb4eab6a12165f563 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 3 May 2016 12:57:41 -0700 Subject: [PATCH 0219/1894] add more tests --- .../Internal/AsyncCallServerTest.cs | 83 ++++++++++++++++--- .../Internal/FakeNativeCall.cs | 8 +- 2 files changed, 80 insertions(+), 11 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs index a1671c97d5d..169de5a7800 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs @@ -75,7 +75,6 @@ namespace Grpc.Core.Internal.Tests { var finishedTask = asyncCallServer.ServerSideCallAsync(); var requestStream = new ServerRequestStream(asyncCallServer); - var responseStream = new ServerResponseStream(asyncCallServer); // Finishing requestStream is needed for dispose to happen. var moveNextTask = requestStream.MoveNext(); @@ -91,7 +90,6 @@ namespace Grpc.Core.Internal.Tests { var finishedTask = asyncCallServer.ServerSideCallAsync(); var requestStream = new ServerRequestStream(asyncCallServer); - var responseStream = new ServerResponseStream(asyncCallServer); fakeCall.ReceivedCloseOnServerHandler(true, cancelled: true); @@ -103,24 +101,89 @@ namespace Grpc.Core.Internal.Tests AssertFinished(asyncCallServer, fakeCall, finishedTask); } + [Test] + public void ReadCompletionFailureClosesRequestStream() + { + var finishedTask = asyncCallServer.ServerSideCallAsync(); + var requestStream = new ServerRequestStream(asyncCallServer); + + // if a read completion's success==false, the request stream will silently finish + // and we rely on C core cancelling the call. + var moveNextTask = requestStream.MoveNext(); + fakeCall.ReceivedMessageHandler(false, null); + Assert.IsFalse(moveNextTask.Result); + + fakeCall.ReceivedCloseOnServerHandler(true, cancelled: true); + AssertFinished(asyncCallServer, fakeCall, finishedTask); + } + + [Test] + public void WriteAfterCancelNotificationFails() + { + var finishedTask = asyncCallServer.ServerSideCallAsync(); + var requestStream = new ServerRequestStream(asyncCallServer); + var responseStream = new ServerResponseStream(asyncCallServer); + + fakeCall.ReceivedCloseOnServerHandler(true, cancelled: true); + + // TODO(jtattermusch): should we throw a different exception type instead? + Assert.Throws(typeof(InvalidOperationException), () => responseStream.WriteAsync("request1")); + + // Finishing requestStream is needed for dispose to happen. + var moveNextTask = requestStream.MoveNext(); + fakeCall.ReceivedMessageHandler(true, null); + Assert.IsFalse(moveNextTask.Result); + + AssertFinished(asyncCallServer, fakeCall, finishedTask); + } + + [Test] + public void WriteCompletionFailureThrows() + { + var finishedTask = asyncCallServer.ServerSideCallAsync(); + var requestStream = new ServerRequestStream(asyncCallServer); + var responseStream = new ServerResponseStream(asyncCallServer); + + var writeTask = responseStream.WriteAsync("request1"); + fakeCall.SendCompletionHandler(false); + // TODO(jtattermusch): should we throw a different exception type instead? + Assert.ThrowsAsync(typeof(InvalidOperationException), async () => await writeTask); - // TODO: read completion failure ... + // Finishing requestStream is needed for dispose to happen. + var moveNextTask = requestStream.MoveNext(); + fakeCall.ReceivedMessageHandler(true, null); + Assert.IsFalse(moveNextTask.Result); + fakeCall.ReceivedCloseOnServerHandler(true, cancelled: true); + AssertFinished(asyncCallServer, fakeCall, finishedTask); + } - // TODO: write fails... + [Test] + public void WriteAndWriteStatusCanRunConcurrently() + { + var finishedTask = asyncCallServer.ServerSideCallAsync(); + var requestStream = new ServerRequestStream(asyncCallServer); + var responseStream = new ServerResponseStream(asyncCallServer); - // TODO: write completion fails... + var writeTask = responseStream.WriteAsync("request1"); + var writeStatusTask = asyncCallServer.SendStatusFromServerAsync(Status.DefaultSuccess, new Metadata()); - // TODO: cancellation delivered... + fakeCall.SendCompletionHandler(true); + fakeCall.SendStatusFromServerHandler(true); - // TODO: cancel notification in the middle of a read... + Assert.DoesNotThrowAsync(async () => await writeTask); + Assert.DoesNotThrowAsync(async () => await writeStatusTask); - // TODO: cancel notification in the middle of a write... + // Finishing requestStream is needed for dispose to happen. + var moveNextTask = requestStream.MoveNext(); + fakeCall.ReceivedMessageHandler(true, null); + Assert.IsFalse(moveNextTask.Result); - // TODO: cancellation delivered... + fakeCall.ReceivedCloseOnServerHandler(true, cancelled: true); - // TODO: what does writing status do to reads? + AssertFinished(asyncCallServer, fakeCall, finishedTask); + } static void AssertFinished(AsyncCallServer asyncCallServer, FakeNativeCall fakeCall, Task finishedTask) { diff --git a/src/csharp/Grpc.Core.Tests/Internal/FakeNativeCall.cs b/src/csharp/Grpc.Core.Tests/Internal/FakeNativeCall.cs index 441bf9660be..1bec258ca29 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/FakeNativeCall.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/FakeNativeCall.cs @@ -76,6 +76,12 @@ namespace Grpc.Core.Internal.Tests set; } + public SendCompletionHandler SendStatusFromServerHandler + { + get; + set; + } + public ReceivedCloseOnServerHandler ReceivedCloseOnServerHandler { get; @@ -161,7 +167,7 @@ namespace Grpc.Core.Internal.Tests public void StartSendStatusFromServer(SendCompletionHandler callback, Status status, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata) { - SendCompletionHandler = callback; + SendStatusFromServerHandler = callback; } public void StartServerSide(ReceivedCloseOnServerHandler callback) From 2624cfb511d54b7d41f9eeab4073d2e6c9def9ad Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 3 May 2016 13:04:33 -0700 Subject: [PATCH 0220/1894] fixup --- src/csharp/Grpc.Core/Internal/AsyncCallServer.cs | 1 + 1 file changed, 1 insertion(+) diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs index 94f49bd8f2a..44f2988e21e 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs @@ -152,6 +152,7 @@ namespace Grpc.Core.Internal call.StartSendStatusFromServer(HandleSendStatusFromServerFinished, status, metadataArray, !initialMetadataSent); } halfcloseRequested = true; + initialMetadataSent = true; sendStatusFromServerTcs = new TaskCompletionSource(); return sendStatusFromServerTcs.Task; } From f21f465bceaca0bfd23a377d56fa19fa4794fede Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 3 May 2016 15:29:45 -0700 Subject: [PATCH 0221/1894] make AsyncCallServerTest finish correctly --- .../Grpc.Core.Tests/Internal/AsyncCallServerTest.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs index 169de5a7800..0b6981f871d 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs @@ -54,7 +54,14 @@ namespace Grpc.Core.Internal.Tests public void Init() { var environment = GrpcEnvironment.AddRef(); - server = new Server(); + + // Create a fake server just so we have an instance to refer to. + // The server won't actually be used at all. + server = new Server() + { + Ports = { { "localhost", 0, ServerCredentials.Insecure } } + }; + server.Start(); fakeCall = new FakeNativeCall(); asyncCallServer = new AsyncCallServer( @@ -67,6 +74,7 @@ namespace Grpc.Core.Internal.Tests [TearDown] public void Cleanup() { + server.ShutdownAsync().Wait(); GrpcEnvironment.Release(); } From c553034b827f9f4dbd48bf865e89db5a29607794 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Tue, 3 May 2016 15:42:45 -0700 Subject: [PATCH 0222/1894] Add reflection.proto --- .../grpc/reflection/v1alpha/reflection.proto | 92 +++++++++++++++++++ 1 file changed, 92 insertions(+) create mode 100644 src/proto/grpc/reflection/v1alpha/reflection.proto diff --git a/src/proto/grpc/reflection/v1alpha/reflection.proto b/src/proto/grpc/reflection/v1alpha/reflection.proto new file mode 100644 index 00000000000..e6735d2cd5b --- /dev/null +++ b/src/proto/grpc/reflection/v1alpha/reflection.proto @@ -0,0 +1,92 @@ +// Copyright 2016, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Service exported by server reflection + +syntax = "proto3"; + +package grpc.reflection.v1alpha; + +service ServerReflection { + // List the full names of registered services. + rpc ListService(EmptyRequest) returns (ListServiceResponse) { + } + + // Find a proto file by file name. + rpc GetFileByName(FileNameRequest) returns (FileDescriptorProtoResponse) { + } + + // Find the proto file that declares the given fully-qualified symbol name. + rpc GetFileContainingSymbol(SymbolRequest) + returns (FileDescriptorProtoResponse) { + } + + // Find the proto file which defines an extension extending the given message + // type with the given field number. + rpc GetFileContainingExtension(ExtensionRequest) + returns (FileDescriptorProtoResponse) { + } + + // Finds the tag numbers used by all known extensions of extendee_type, and + // appends them to ExtensionNumberResponse in an undefined order. + rpc GetAllExtensionNumbers(TypeRequest) returns (ExtensionNumberResponse) { + } +} + +message EmptyRequest { +} + +message FileNameRequest { + string filename = 1; +} + +message SymbolRequest { + string symbol = 1; +} + +message ExtensionRequest { + string containing_type = 1; + int32 extension_number = 2; +} + +message TypeRequest { + string type = 1; +} + +message ListServiceResponse { + repeated string services = 1; +} + +message FileDescriptorProtoResponse { + bytes file_descriptor_proto = 1; +} + +message ExtensionNumberResponse { + repeated int32 extension_number = 1; +} From b0de7163ade5b290850cae660349dbcab86f99ba Mon Sep 17 00:00:00 2001 From: yang-g Date: Tue, 3 May 2016 15:48:19 -0700 Subject: [PATCH 0223/1894] Add proto comments to generated _pb2.py files --- examples/python/helloworld/helloworld_pb2.py | 73 ++----- .../python/route_guide/route_guide_pb2.py | 189 ++++++------------ src/compiler/python_generator.cc | 47 +++-- 3 files changed, 114 insertions(+), 195 deletions(-) diff --git a/examples/python/helloworld/helloworld_pb2.py b/examples/python/helloworld/helloworld_pb2.py index 1b2674e4c8e..1ee80e4034c 100644 --- a/examples/python/helloworld/helloworld_pb2.py +++ b/examples/python/helloworld/helloworld_pb2.py @@ -1,6 +1,8 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: helloworld.proto +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -17,7 +19,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( name='helloworld.proto', package='helloworld', syntax='proto3', - serialized_pb=b'\n\x10helloworld.proto\x12\nhelloworld\"\x1c\n\x0cHelloRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x1d\n\nHelloReply\x12\x0f\n\x07message\x18\x01 \x01(\t2I\n\x07Greeter\x12>\n\x08SayHello\x12\x18.helloworld.HelloRequest\x1a\x16.helloworld.HelloReply\"\x00\x42\x18\n\x10io.grpc.examples\xa2\x02\x03HLWb\x06proto3' + serialized_pb=_b('\n\x10helloworld.proto\x12\nhelloworld\"\x1c\n\x0cHelloRequest\x12\x0c\n\x04name\x18\x01 \x01(\t\"\x1d\n\nHelloReply\x12\x0f\n\x07message\x18\x01 \x01(\t2I\n\x07Greeter\x12>\n\x08SayHello\x12\x18.helloworld.HelloRequest\x1a\x16.helloworld.HelloReply\"\x00\x42\x36\n\x1bio.grpc.examples.helloworldB\x0fHelloWorldProtoP\x01\xa2\x02\x03HLWb\x06proto3') ) _sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -34,7 +36,7 @@ _HELLOREQUEST = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='name', full_name='helloworld.HelloRequest.name', index=0, number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), + has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -65,7 +67,7 @@ _HELLOREPLY = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='message', full_name='helloworld.HelloReply.message', index=0, number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), + has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -104,69 +106,28 @@ _sym_db.RegisterMessage(HelloReply) DESCRIPTOR.has_options = True -DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), b'\n\020io.grpc.examples\242\002\003HLW') +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\033io.grpc.examples.helloworldB\017HelloWorldProtoP\001\242\002\003HLW')) import abc +import six from grpc.beta import implementations as beta_implementations -from grpc.early_adopter import implementations as early_adopter_implementations -from grpc.framework.alpha import utilities as alpha_utilities +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities -class EarlyAdopterGreeterServicer(object): - """""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod - def SayHello(self, request, context): - raise NotImplementedError() -class EarlyAdopterGreeterServer(object): - """""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod - def start(self): - raise NotImplementedError() - @abc.abstractmethod - def stop(self): - raise NotImplementedError() -class EarlyAdopterGreeterStub(object): - """""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod - def SayHello(self, request): - raise NotImplementedError() - SayHello.async = None -def early_adopter_create_Greeter_server(servicer, port, private_key=None, certificate_chain=None): - import helloworld_pb2 - import helloworld_pb2 - method_service_descriptions = { - "SayHello": alpha_utilities.unary_unary_service_description( - servicer.SayHello, - helloworld_pb2.HelloRequest.FromString, - helloworld_pb2.HelloReply.SerializeToString, - ), - } - return early_adopter_implementations.server("helloworld.Greeter", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain) -def early_adopter_create_Greeter_stub(host, port, metadata_transformer=None, secure=False, root_certificates=None, private_key=None, certificate_chain=None, server_host_override=None): - import helloworld_pb2 - import helloworld_pb2 - method_invocation_descriptions = { - "SayHello": alpha_utilities.unary_unary_invocation_description( - helloworld_pb2.HelloRequest.SerializeToString, - helloworld_pb2.HelloReply.FromString, - ), - } - return early_adopter_implementations.stub("helloworld.Greeter", method_invocation_descriptions, host, port, metadata_transformer=metadata_transformer, secure=secure, root_certificates=root_certificates, private_key=private_key, certificate_chain=certificate_chain, server_host_override=server_host_override) class BetaGreeterServicer(object): - """""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod + """The greeting service definition. + """ def SayHello(self, request, context): - raise NotImplementedError() + """Sends a greeting + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) class BetaGreeterStub(object): - """The interface to which stubs will conform.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod + """The greeting service definition. + """ def SayHello(self, request, timeout): + """Sends a greeting + """ raise NotImplementedError() SayHello.future = None diff --git a/examples/python/route_guide/route_guide_pb2.py b/examples/python/route_guide/route_guide_pb2.py index d4d9f8dcd5d..81d5d075274 100644 --- a/examples/python/route_guide/route_guide_pb2.py +++ b/examples/python/route_guide/route_guide_pb2.py @@ -1,6 +1,8 @@ # Generated by the protocol buffer compiler. DO NOT EDIT! # source: route_guide.proto +import sys +_b=sys.version_info[0]<3 and (lambda x:x) or (lambda x:x.encode('latin1')) from google.protobuf import descriptor as _descriptor from google.protobuf import message as _message from google.protobuf import reflection as _reflection @@ -17,7 +19,7 @@ DESCRIPTOR = _descriptor.FileDescriptor( name='route_guide.proto', package='routeguide', syntax='proto3', - serialized_pb=b'\n\x11route_guide.proto\x12\nrouteguide\",\n\x05Point\x12\x10\n\x08latitude\x18\x01 \x01(\x05\x12\x11\n\tlongitude\x18\x02 \x01(\x05\"I\n\tRectangle\x12\x1d\n\x02lo\x18\x01 \x01(\x0b\x32\x11.routeguide.Point\x12\x1d\n\x02hi\x18\x02 \x01(\x0b\x32\x11.routeguide.Point\"<\n\x07\x46\x65\x61ture\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x08location\x18\x02 \x01(\x0b\x32\x11.routeguide.Point\"A\n\tRouteNote\x12#\n\x08location\x18\x01 \x01(\x0b\x32\x11.routeguide.Point\x12\x0f\n\x07message\x18\x02 \x01(\t\"b\n\x0cRouteSummary\x12\x13\n\x0bpoint_count\x18\x01 \x01(\x05\x12\x15\n\rfeature_count\x18\x02 \x01(\x05\x12\x10\n\x08\x64istance\x18\x03 \x01(\x05\x12\x14\n\x0c\x65lapsed_time\x18\x04 \x01(\x05\x32\x85\x02\n\nRouteGuide\x12\x36\n\nGetFeature\x12\x11.routeguide.Point\x1a\x13.routeguide.Feature\"\x00\x12>\n\x0cListFeatures\x12\x15.routeguide.Rectangle\x1a\x13.routeguide.Feature\"\x00\x30\x01\x12>\n\x0bRecordRoute\x12\x11.routeguide.Point\x1a\x18.routeguide.RouteSummary\"\x00(\x01\x12?\n\tRouteChat\x12\x15.routeguide.RouteNote\x1a\x15.routeguide.RouteNote\"\x00(\x01\x30\x01\x42\x0f\n\x07\x65x.grpc\xa2\x02\x03RTGb\x06proto3' + serialized_pb=_b('\n\x11route_guide.proto\x12\nrouteguide\",\n\x05Point\x12\x10\n\x08latitude\x18\x01 \x01(\x05\x12\x11\n\tlongitude\x18\x02 \x01(\x05\"I\n\tRectangle\x12\x1d\n\x02lo\x18\x01 \x01(\x0b\x32\x11.routeguide.Point\x12\x1d\n\x02hi\x18\x02 \x01(\x0b\x32\x11.routeguide.Point\"<\n\x07\x46\x65\x61ture\x12\x0c\n\x04name\x18\x01 \x01(\t\x12#\n\x08location\x18\x02 \x01(\x0b\x32\x11.routeguide.Point\"A\n\tRouteNote\x12#\n\x08location\x18\x01 \x01(\x0b\x32\x11.routeguide.Point\x12\x0f\n\x07message\x18\x02 \x01(\t\"b\n\x0cRouteSummary\x12\x13\n\x0bpoint_count\x18\x01 \x01(\x05\x12\x15\n\rfeature_count\x18\x02 \x01(\x05\x12\x10\n\x08\x64istance\x18\x03 \x01(\x05\x12\x14\n\x0c\x65lapsed_time\x18\x04 \x01(\x05\x32\x85\x02\n\nRouteGuide\x12\x36\n\nGetFeature\x12\x11.routeguide.Point\x1a\x13.routeguide.Feature\"\x00\x12>\n\x0cListFeatures\x12\x15.routeguide.Rectangle\x1a\x13.routeguide.Feature\"\x00\x30\x01\x12>\n\x0bRecordRoute\x12\x11.routeguide.Point\x1a\x18.routeguide.RouteSummary\"\x00(\x01\x12?\n\tRouteChat\x12\x15.routeguide.RouteNote\x1a\x15.routeguide.RouteNote\"\x00(\x01\x30\x01\x42\x36\n\x1bio.grpc.examples.routeguideB\x0fRouteGuideProtoP\x01\xa2\x02\x03RTGb\x06proto3') ) _sym_db.RegisterFileDescriptor(DESCRIPTOR) @@ -110,7 +112,7 @@ _FEATURE = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='name', full_name='routeguide.Feature.name', index=0, number=1, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), + has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -155,7 +157,7 @@ _ROUTENOTE = _descriptor.Descriptor( _descriptor.FieldDescriptor( name='message', full_name='routeguide.RouteNote.message', index=1, number=2, type=9, cpp_type=9, label=1, - has_default_value=False, default_value=b"".decode('utf-8'), + has_default_value=False, default_value=_b("").decode('utf-8'), message_type=None, enum_type=None, containing_type=None, is_extension=False, extension_scope=None, options=None), @@ -274,149 +276,86 @@ _sym_db.RegisterMessage(RouteSummary) DESCRIPTOR.has_options = True -DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), b'\n\007ex.grpc\242\002\003RTG') +DESCRIPTOR._options = _descriptor._ParseOptions(descriptor_pb2.FileOptions(), _b('\n\033io.grpc.examples.routeguideB\017RouteGuideProtoP\001\242\002\003RTG')) import abc +import six from grpc.beta import implementations as beta_implementations -from grpc.early_adopter import implementations as early_adopter_implementations -from grpc.framework.alpha import utilities as alpha_utilities +from grpc.beta import interfaces as beta_interfaces from grpc.framework.common import cardinality from grpc.framework.interfaces.face import utilities as face_utilities -class EarlyAdopterRouteGuideServicer(object): - """""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod - def GetFeature(self, request, context): - raise NotImplementedError() - @abc.abstractmethod - def ListFeatures(self, request, context): - raise NotImplementedError() - @abc.abstractmethod - def RecordRoute(self, request_iterator, context): - raise NotImplementedError() - @abc.abstractmethod - def RouteChat(self, request_iterator, context): - raise NotImplementedError() -class EarlyAdopterRouteGuideServer(object): - """""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod - def start(self): - raise NotImplementedError() - @abc.abstractmethod - def stop(self): - raise NotImplementedError() -class EarlyAdopterRouteGuideStub(object): - """""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod - def GetFeature(self, request): - raise NotImplementedError() - GetFeature.async = None - @abc.abstractmethod - def ListFeatures(self, request): - raise NotImplementedError() - ListFeatures.async = None - @abc.abstractmethod - def RecordRoute(self, request_iterator): - raise NotImplementedError() - RecordRoute.async = None - @abc.abstractmethod - def RouteChat(self, request_iterator): - raise NotImplementedError() - RouteChat.async = None -def early_adopter_create_RouteGuide_server(servicer, port, private_key=None, certificate_chain=None): - import route_guide_pb2 - import route_guide_pb2 - import route_guide_pb2 - import route_guide_pb2 - import route_guide_pb2 - import route_guide_pb2 - import route_guide_pb2 - import route_guide_pb2 - method_service_descriptions = { - "GetFeature": alpha_utilities.unary_unary_service_description( - servicer.GetFeature, - route_guide_pb2.Point.FromString, - route_guide_pb2.Feature.SerializeToString, - ), - "ListFeatures": alpha_utilities.unary_stream_service_description( - servicer.ListFeatures, - route_guide_pb2.Rectangle.FromString, - route_guide_pb2.Feature.SerializeToString, - ), - "RecordRoute": alpha_utilities.stream_unary_service_description( - servicer.RecordRoute, - route_guide_pb2.Point.FromString, - route_guide_pb2.RouteSummary.SerializeToString, - ), - "RouteChat": alpha_utilities.stream_stream_service_description( - servicer.RouteChat, - route_guide_pb2.RouteNote.FromString, - route_guide_pb2.RouteNote.SerializeToString, - ), - } - return early_adopter_implementations.server("routeguide.RouteGuide", method_service_descriptions, port, private_key=private_key, certificate_chain=certificate_chain) -def early_adopter_create_RouteGuide_stub(host, port, metadata_transformer=None, secure=False, root_certificates=None, private_key=None, certificate_chain=None, server_host_override=None): - import route_guide_pb2 - import route_guide_pb2 - import route_guide_pb2 - import route_guide_pb2 - import route_guide_pb2 - import route_guide_pb2 - import route_guide_pb2 - import route_guide_pb2 - method_invocation_descriptions = { - "GetFeature": alpha_utilities.unary_unary_invocation_description( - route_guide_pb2.Point.SerializeToString, - route_guide_pb2.Feature.FromString, - ), - "ListFeatures": alpha_utilities.unary_stream_invocation_description( - route_guide_pb2.Rectangle.SerializeToString, - route_guide_pb2.Feature.FromString, - ), - "RecordRoute": alpha_utilities.stream_unary_invocation_description( - route_guide_pb2.Point.SerializeToString, - route_guide_pb2.RouteSummary.FromString, - ), - "RouteChat": alpha_utilities.stream_stream_invocation_description( - route_guide_pb2.RouteNote.SerializeToString, - route_guide_pb2.RouteNote.FromString, - ), - } - return early_adopter_implementations.stub("routeguide.RouteGuide", method_invocation_descriptions, host, port, metadata_transformer=metadata_transformer, secure=secure, root_certificates=root_certificates, private_key=private_key, certificate_chain=certificate_chain, server_host_override=server_host_override) class BetaRouteGuideServicer(object): - """""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod + """Interface exported by the server. + """ def GetFeature(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """A simple RPC. + + Obtains the feature at a given position. + + A feature with an empty name is returned if there's no feature at the given + position. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) def ListFeatures(self, request, context): - raise NotImplementedError() - @abc.abstractmethod + """A server-to-client streaming RPC. + + Obtains the Features available within the given Rectangle. Results are + streamed rather than returned at once (e.g. in a response message with a + repeated field), as the rectangle may cover a large area and contain a + huge number of features. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) def RecordRoute(self, request_iterator, context): - raise NotImplementedError() - @abc.abstractmethod + """A client-to-server streaming RPC. + + Accepts a stream of Points on a route being traversed, returning a + RouteSummary when traversal is completed. + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) def RouteChat(self, request_iterator, context): - raise NotImplementedError() + """A Bidirectional streaming RPC. + + Accepts a stream of RouteNotes sent while a route is being traversed, + while receiving other RouteNotes (e.g. from other users). + """ + context.code(beta_interfaces.StatusCode.UNIMPLEMENTED) class BetaRouteGuideStub(object): - """The interface to which stubs will conform.""" - __metaclass__ = abc.ABCMeta - @abc.abstractmethod + """Interface exported by the server. + """ def GetFeature(self, request, timeout): + """A simple RPC. + + Obtains the feature at a given position. + + A feature with an empty name is returned if there's no feature at the given + position. + """ raise NotImplementedError() GetFeature.future = None - @abc.abstractmethod def ListFeatures(self, request, timeout): + """A server-to-client streaming RPC. + + Obtains the Features available within the given Rectangle. Results are + streamed rather than returned at once (e.g. in a response message with a + repeated field), as the rectangle may cover a large area and contain a + huge number of features. + """ raise NotImplementedError() - @abc.abstractmethod def RecordRoute(self, request_iterator, timeout): + """A client-to-server streaming RPC. + + Accepts a stream of Points on a route being traversed, returning a + RouteSummary when traversal is completed. + """ raise NotImplementedError() RecordRoute.future = None - @abc.abstractmethod def RouteChat(self, request_iterator, timeout): + """A Bidirectional streaming RPC. + + Accepts a stream of RouteNotes sent while a route is being traversed, + while receiving other RouteNotes (e.g. from other users). + """ raise NotImplementedError() def beta_create_RouteGuide_server(servicer, pool=None, pool_size=None, default_timeout=None, maximum_timeout=None): diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc index 59137e1c923..8e76e6dce6f 100644 --- a/src/compiler/python_generator.cc +++ b/src/compiler/python_generator.cc @@ -182,18 +182,40 @@ bool GetModuleAndMessagePath(const Descriptor* type, return true; } +// Get all comments (leading, leading_detached, trailing) and print them as a +// docstring. Any leading space of a line will be removed, but the line wrapping +// will not be changed. +template +static void PrintAllComments(const DescriptorType* desc, Printer* printer) { + std::vector comments; + grpc_generator::GetComment(desc, grpc_generator::COMMENTTYPE_LEADING_DETACHED, + &comments); + grpc_generator::GetComment(desc, grpc_generator::COMMENTTYPE_LEADING, + &comments); + grpc_generator::GetComment(desc, grpc_generator::COMMENTTYPE_TRAILING, + &comments); + if (comments.empty()) { + return; + } + printer->Print("\"\"\""); + for (auto it = comments.begin(); it != comments.end(); ++it) { + size_t start_pos = it->find_first_not_of(' '); + if (start_pos != grpc::string::npos) { + printer->Print(it->c_str() + start_pos); + } + printer->Print("\n"); + } + printer->Print("\"\"\"\n"); +} + bool PrintBetaServicer(const ServiceDescriptor* service, Printer* out) { - grpc::string doc = ""; - map dict = ListToDict({ - "Service", service->name(), - "Documentation", doc, - }); out->Print("\n"); - out->Print(dict, "class Beta$Service$Servicer(object):\n"); + out->Print("class Beta$Service$Servicer(object):\n", "Service", + service->name()); { IndentScope raii_class_indent(out); - out->Print(dict, "\"\"\"$Documentation$\"\"\"\n"); + PrintAllComments(service, out); for (int i = 0; i < service->method_count(); ++i) { auto meth = service->method(i); grpc::string arg_name = meth->client_streaming() ? @@ -202,6 +224,7 @@ bool PrintBetaServicer(const ServiceDescriptor* service, "Method", meth->name(), "ArgName", arg_name); { IndentScope raii_method_indent(out); + PrintAllComments(meth, out); out->Print("context.code(beta_interfaces.StatusCode.UNIMPLEMENTED)\n"); } } @@ -211,16 +234,11 @@ bool PrintBetaServicer(const ServiceDescriptor* service, bool PrintBetaStub(const ServiceDescriptor* service, Printer* out) { - grpc::string doc = "The interface to which stubs will conform."; - map dict = ListToDict({ - "Service", service->name(), - "Documentation", doc, - }); out->Print("\n"); - out->Print(dict, "class Beta$Service$Stub(object):\n"); + out->Print("class Beta$Service$Stub(object):\n", "Service", service->name()); { IndentScope raii_class_indent(out); - out->Print(dict, "\"\"\"$Documentation$\"\"\"\n"); + PrintAllComments(service, out); for (int i = 0; i < service->method_count(); ++i) { const MethodDescriptor* meth = service->method(i); grpc::string arg_name = meth->client_streaming() ? @@ -229,6 +247,7 @@ bool PrintBetaStub(const ServiceDescriptor* service, out->Print(methdict, "def $Method$(self, $ArgName$, timeout):\n"); { IndentScope raii_method_indent(out); + PrintAllComments(meth, out); out->Print("raise NotImplementedError()\n"); } if (!meth->server_streaming()) { From 99341e30cf17889d3063e76a2eaa05c98021645b Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 29 Apr 2016 14:47:39 -0700 Subject: [PATCH 0224/1894] move helper script for dockerization --- tools/{jenkins => run_tests/dockerize}/build_and_run_docker.sh | 0 .../dockerize}/build_docker_and_run_tests.sh | 0 tools/{jenkins => run_tests/dockerize}/build_interop_image.sh | 0 .../dockerize}/build_interop_stress_image.sh | 0 tools/{jenkins => run_tests/dockerize}/docker_run.sh | 0 tools/{jenkins => run_tests/dockerize}/docker_run_tests.sh | 0 6 files changed, 0 insertions(+), 0 deletions(-) rename tools/{jenkins => run_tests/dockerize}/build_and_run_docker.sh (100%) rename tools/{jenkins => run_tests/dockerize}/build_docker_and_run_tests.sh (100%) rename tools/{jenkins => run_tests/dockerize}/build_interop_image.sh (100%) rename tools/{jenkins => run_tests/dockerize}/build_interop_stress_image.sh (100%) rename tools/{jenkins => run_tests/dockerize}/docker_run.sh (100%) rename tools/{jenkins => run_tests/dockerize}/docker_run_tests.sh (100%) diff --git a/tools/jenkins/build_and_run_docker.sh b/tools/run_tests/dockerize/build_and_run_docker.sh similarity index 100% rename from tools/jenkins/build_and_run_docker.sh rename to tools/run_tests/dockerize/build_and_run_docker.sh diff --git a/tools/jenkins/build_docker_and_run_tests.sh b/tools/run_tests/dockerize/build_docker_and_run_tests.sh similarity index 100% rename from tools/jenkins/build_docker_and_run_tests.sh rename to tools/run_tests/dockerize/build_docker_and_run_tests.sh diff --git a/tools/jenkins/build_interop_image.sh b/tools/run_tests/dockerize/build_interop_image.sh similarity index 100% rename from tools/jenkins/build_interop_image.sh rename to tools/run_tests/dockerize/build_interop_image.sh diff --git a/tools/jenkins/build_interop_stress_image.sh b/tools/run_tests/dockerize/build_interop_stress_image.sh similarity index 100% rename from tools/jenkins/build_interop_stress_image.sh rename to tools/run_tests/dockerize/build_interop_stress_image.sh diff --git a/tools/jenkins/docker_run.sh b/tools/run_tests/dockerize/docker_run.sh similarity index 100% rename from tools/jenkins/docker_run.sh rename to tools/run_tests/dockerize/docker_run.sh diff --git a/tools/jenkins/docker_run_tests.sh b/tools/run_tests/dockerize/docker_run_tests.sh similarity index 100% rename from tools/jenkins/docker_run_tests.sh rename to tools/run_tests/dockerize/docker_run_tests.sh From 26ca776e3ee4b81203cc4b97a956cbe9f6c00268 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 29 Apr 2016 14:51:35 -0700 Subject: [PATCH 0225/1894] update working directories --- tools/run_tests/dockerize/build_and_run_docker.sh | 2 +- tools/run_tests/dockerize/build_docker_and_run_tests.sh | 2 +- tools/run_tests/dockerize/build_interop_image.sh | 2 +- tools/run_tests/dockerize/build_interop_stress_image.sh | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/run_tests/dockerize/build_and_run_docker.sh b/tools/run_tests/dockerize/build_and_run_docker.sh index 92dbbc6f380..1ef34b2f960 100755 --- a/tools/run_tests/dockerize/build_and_run_docker.sh +++ b/tools/run_tests/dockerize/build_and_run_docker.sh @@ -33,7 +33,7 @@ set -ex -cd $(dirname $0)/../.. +cd $(dirname $0)/../../.. git_root=$(pwd) cd - diff --git a/tools/run_tests/dockerize/build_docker_and_run_tests.sh b/tools/run_tests/dockerize/build_docker_and_run_tests.sh index 5779e63db97..c2ea6f2c6eb 100755 --- a/tools/run_tests/dockerize/build_docker_and_run_tests.sh +++ b/tools/run_tests/dockerize/build_docker_and_run_tests.sh @@ -33,7 +33,7 @@ set -ex -cd $(dirname $0)/../.. +cd $(dirname $0)/../../.. git_root=$(pwd) cd - diff --git a/tools/run_tests/dockerize/build_interop_image.sh b/tools/run_tests/dockerize/build_interop_image.sh index d2ba97c3de8..48a216a124b 100755 --- a/tools/run_tests/dockerize/build_interop_image.sh +++ b/tools/run_tests/dockerize/build_interop_image.sh @@ -40,7 +40,7 @@ set -x # BUILD_INTEROP_DOCKER_EXTRA_ARGS - optional args to be passed to the # docker run command -cd `dirname $0`/../.. +cd `dirname $0`/../../.. GRPC_ROOT=`pwd` MOUNT_ARGS="-v $GRPC_ROOT:/var/local/jenkins/grpc:ro" diff --git a/tools/run_tests/dockerize/build_interop_stress_image.sh b/tools/run_tests/dockerize/build_interop_stress_image.sh index 31ffa752ab5..4407c8da90c 100755 --- a/tools/run_tests/dockerize/build_interop_stress_image.sh +++ b/tools/run_tests/dockerize/build_interop_stress_image.sh @@ -44,7 +44,7 @@ set -x # BUILD_INTEROP_DOCKER_EXTRA_ARGS - optional args to be passed to the # docker run command -cd `dirname $0`/../.. +cd `dirname $0`/../../.. GRPC_ROOT=`pwd` MOUNT_ARGS="-v $GRPC_ROOT:/var/local/jenkins/grpc:ro" From 9835d4b1f7a4a065117e865e98c6f7b01e8eda96 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 29 Apr 2016 15:05:05 -0700 Subject: [PATCH 0226/1894] update locations of dockerization scripts --- tools/jenkins/run_fuzzer.sh | 4 ++-- tools/run_tests/artifact_targets.py | 4 ++-- tools/run_tests/distribtest_targets.py | 4 ++-- tools/run_tests/package_targets.py | 4 ++-- tools/run_tests/run_interop_tests.py | 2 +- tools/run_tests/run_stress_tests.py | 2 +- tools/run_tests/run_tests.py | 4 ++-- tools/run_tests/stress_test/configs/asan.json | 2 +- tools/run_tests/stress_test/configs/go.json | 2 +- tools/run_tests/stress_test/configs/java.json | 2 +- tools/run_tests/stress_test/configs/node-cxx.json | 4 ++-- tools/run_tests/stress_test/configs/node.json | 2 +- tools/run_tests/stress_test/configs/opt-tsan-asan.json | 6 +++--- tools/run_tests/stress_test/configs/opt.json | 2 +- tools/run_tests/stress_test/configs/tsan.json | 2 +- 15 files changed, 23 insertions(+), 23 deletions(-) diff --git a/tools/jenkins/run_fuzzer.sh b/tools/jenkins/run_fuzzer.sh index 3f25a93319d..cfa7acefab9 100755 --- a/tools/jenkins/run_fuzzer.sh +++ b/tools/jenkins/run_fuzzer.sh @@ -33,14 +33,14 @@ set -ex export RUN_COMMAND="tools/fuzzer/build_and_run_fuzzer.sh $1" -export DOCKER_RUN_SCRIPT=tools/jenkins/docker_run.sh +export DOCKER_RUN_SCRIPT=tools/run_tests/dockerize/docker_run.sh export DOCKERFILE_DIR=tools/dockerfile/test/fuzzer export OUTPUT_DIR=fuzzer_output runtime=${runtime:-3600} jobs=${jobs:-3} -tools/jenkins/build_and_run_docker.sh \ +tools/run_tests/dockerize/build_and_run_docker.sh \ -e RUN_COMMAND="$RUN_COMMAND" \ -e OUTPUT_DIR="$OUTPUT_DIR" \ -e config="$config" \ diff --git a/tools/run_tests/artifact_targets.py b/tools/run_tests/artifact_targets.py index e61c46d8b5a..3e08c1d62b3 100644 --- a/tools/run_tests/artifact_targets.py +++ b/tools/run_tests/artifact_targets.py @@ -43,10 +43,10 @@ def create_docker_jobspec(name, dockerfile_dir, shell_command, environ={}, for k,v in environ.iteritems(): docker_args += ['-e', '%s=%s' % (k, v)] docker_env = {'DOCKERFILE_DIR': dockerfile_dir, - 'DOCKER_RUN_SCRIPT': 'tools/jenkins/docker_run.sh', + 'DOCKER_RUN_SCRIPT': 'tools/run_tests/dockerize/docker_run.sh', 'OUTPUT_DIR': 'artifacts'} jobspec = jobset.JobSpec( - cmdline=['tools/jenkins/build_and_run_docker.sh'] + docker_args, + cmdline=['tools/run_tests/dockerize/build_and_run_docker.sh'] + docker_args, environ=docker_env, shortname='build_artifact.%s' % (name), timeout_seconds=30*60, diff --git a/tools/run_tests/distribtest_targets.py b/tools/run_tests/distribtest_targets.py index 34cc1cd7101..ae918be21d2 100644 --- a/tools/run_tests/distribtest_targets.py +++ b/tools/run_tests/distribtest_targets.py @@ -44,9 +44,9 @@ def create_docker_jobspec(name, dockerfile_dir, shell_command, environ={}, for k,v in environ.iteritems(): docker_args += ['-e', '%s=%s' % (k, v)] docker_env = {'DOCKERFILE_DIR': dockerfile_dir, - 'DOCKER_RUN_SCRIPT': 'tools/jenkins/docker_run.sh'} + 'DOCKER_RUN_SCRIPT': 'tools/run_tests/dockerize/docker_run.sh'} jobspec = jobset.JobSpec( - cmdline=['tools/jenkins/build_and_run_docker.sh'] + docker_args, + cmdline=['tools/run_tests/dockerize/build_and_run_docker.sh'] + docker_args, environ=docker_env, shortname='distribtest.%s' % (name), timeout_seconds=30*60, diff --git a/tools/run_tests/package_targets.py b/tools/run_tests/package_targets.py index 87bc4865ce3..820b539b59f 100644 --- a/tools/run_tests/package_targets.py +++ b/tools/run_tests/package_targets.py @@ -42,10 +42,10 @@ def create_docker_jobspec(name, dockerfile_dir, shell_command, environ={}, for k,v in environ.iteritems(): docker_args += ['-e', '%s=%s' % (k, v)] docker_env = {'DOCKERFILE_DIR': dockerfile_dir, - 'DOCKER_RUN_SCRIPT': 'tools/jenkins/docker_run.sh', + 'DOCKER_RUN_SCRIPT': 'tools/run_tests/dockerize/docker_run.sh', 'OUTPUT_DIR': 'artifacts'} jobspec = jobset.JobSpec( - cmdline=['tools/jenkins/build_and_run_docker.sh'] + docker_args, + cmdline=['tools/run_tests/dockerize/build_and_run_docker.sh'] + docker_args, environ=docker_env, shortname='build_package.%s' % (name), timeout_seconds=30*60, diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index 758be9304d6..e813473421d 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -542,7 +542,7 @@ def build_interop_image_jobspec(language, tag=None): env['BUILD_INTEROP_DOCKER_EXTRA_ARGS'] = \ '-v %s:/root/.composer/auth.json:ro' % host_file build_job = jobset.JobSpec( - cmdline=['tools/jenkins/build_interop_image.sh'], + cmdline=['tools/run_tests/dockerize/build_interop_image.sh'], environ=env, shortname='build_docker_%s' % (language), timeout_seconds=30*60) diff --git a/tools/run_tests/run_stress_tests.py b/tools/run_tests/run_stress_tests.py index 0ba8f51c583..e42ee24ffb0 100755 --- a/tools/run_tests/run_stress_tests.py +++ b/tools/run_tests/run_stress_tests.py @@ -195,7 +195,7 @@ def build_interop_stress_image_jobspec(language, tag=None): tag = 'grpc_interop_stress_%s:%s' % (language.safename, uuid.uuid4()) env = {'INTEROP_IMAGE': tag, 'BASE_NAME': 'grpc_interop_stress_%s' % language.safename} - build_job = jobset.JobSpec(cmdline=['tools/jenkins/build_interop_stress_image.sh'], + build_job = jobset.JobSpec(cmdline=['tools/run_tests/dockerize/build_interop_stress_image.sh'], environ=env, shortname='build_docker_%s' % (language), timeout_seconds=30 * 60) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index d50d5aac95e..37291f4d3fb 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -912,13 +912,13 @@ if args.use_docker: env = os.environ.copy() env['RUN_TESTS_COMMAND'] = run_tests_cmd env['DOCKERFILE_DIR'] = dockerfile_dir - env['DOCKER_RUN_SCRIPT'] = 'tools/jenkins/docker_run_tests.sh' + env['DOCKER_RUN_SCRIPT'] = 'tools/run_tests/dockerize/docker_run_tests.sh' if args.xml_report: env['XML_REPORT'] = args.xml_report if not args.travis: env['TTY_FLAG'] = '-t' # enables Ctrl-C when not on Jenkins. - subprocess.check_call(['tools/jenkins/build_docker_and_run_tests.sh'], + subprocess.check_call(['tools/run_tests/dockerize/build_docker_and_run_tests.sh'], shell=True, env=env) sys.exit(0) diff --git a/tools/run_tests/stress_test/configs/asan.json b/tools/run_tests/stress_test/configs/asan.json index cb9f55763b1..7ae11ccbf1e 100644 --- a/tools/run_tests/stress_test/configs/asan.json +++ b/tools/run_tests/stress_test/configs/asan.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_cxx_asan" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "asan" } diff --git a/tools/run_tests/stress_test/configs/go.json b/tools/run_tests/stress_test/configs/go.json index 36b465e763e..f1b2b523d3c 100644 --- a/tools/run_tests/stress_test/configs/go.json +++ b/tools/run_tests/stress_test/configs/go.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_go" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_go" } }, diff --git a/tools/run_tests/stress_test/configs/java.json b/tools/run_tests/stress_test/configs/java.json index 275384c066d..2ce6c007804 100644 --- a/tools/run_tests/stress_test/configs/java.json +++ b/tools/run_tests/stress_test/configs/java.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_java" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_java" } }, diff --git a/tools/run_tests/stress_test/configs/node-cxx.json b/tools/run_tests/stress_test/configs/node-cxx.json index c4245bf9df2..094c1236e71 100644 --- a/tools/run_tests/stress_test/configs/node-cxx.json +++ b/tools/run_tests/stress_test/configs/node-cxx.json @@ -1,12 +1,12 @@ { "dockerImages": { "grpc_stress_cxx_opt" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "opt" }, "grpc_stress_node": { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_node" } }, diff --git a/tools/run_tests/stress_test/configs/node.json b/tools/run_tests/stress_test/configs/node.json index 7a48c56a5e2..85eb9e00031 100644 --- a/tools/run_tests/stress_test/configs/node.json +++ b/tools/run_tests/stress_test/configs/node.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_node" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_node" } }, diff --git a/tools/run_tests/stress_test/configs/opt-tsan-asan.json b/tools/run_tests/stress_test/configs/opt-tsan-asan.json index 936d15169e1..fcb3678c02f 100644 --- a/tools/run_tests/stress_test/configs/opt-tsan-asan.json +++ b/tools/run_tests/stress_test/configs/opt-tsan-asan.json @@ -1,17 +1,17 @@ { "dockerImages": { "grpc_stress_cxx_opt" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "opt" }, "grpc_stress_cxx_tsan": { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "tsan" }, "grpc_stress_cxx_asan": { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "asan" } diff --git a/tools/run_tests/stress_test/configs/opt.json b/tools/run_tests/stress_test/configs/opt.json index f45b8240487..5e0e930d453 100644 --- a/tools/run_tests/stress_test/configs/opt.json +++ b/tools/run_tests/stress_test/configs/opt.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_cxx_opt" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "opt" } diff --git a/tools/run_tests/stress_test/configs/tsan.json b/tools/run_tests/stress_test/configs/tsan.json index 6ef3bdf7ea7..abc759c79da 100644 --- a/tools/run_tests/stress_test/configs/tsan.json +++ b/tools/run_tests/stress_test/configs/tsan.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_cxx_tsan" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_cxx", "buildType": "tsan" } From 080ddf09ab9c037bea940a32d0075ee1b3d346d4 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 29 Apr 2016 15:07:42 -0700 Subject: [PATCH 0227/1894] add a readme file --- tools/jenkins/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 tools/jenkins/README.md diff --git a/tools/jenkins/README.md b/tools/jenkins/README.md new file mode 100644 index 00000000000..8e06b68466c --- /dev/null +++ b/tools/jenkins/README.md @@ -0,0 +1 @@ +Scripts invoked by Jenkins (our CI platform) to run gRPC test suites. From 9c8351257569e3c79d1d900c16cf942a8183fe95 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 3 May 2016 15:58:06 -0700 Subject: [PATCH 0228/1894] update remaining stresstest configs --- tools/run_tests/stress_test/configs/csharp.json | 2 +- tools/run_tests/stress_test/configs/ruby.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/run_tests/stress_test/configs/csharp.json b/tools/run_tests/stress_test/configs/csharp.json index b7090696b4f..406949557dc 100644 --- a/tools/run_tests/stress_test/configs/csharp.json +++ b/tools/run_tests/stress_test/configs/csharp.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_csharp" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_csharp" } }, diff --git a/tools/run_tests/stress_test/configs/ruby.json b/tools/run_tests/stress_test/configs/ruby.json index a323fa72b6b..7e2afcbb69e 100644 --- a/tools/run_tests/stress_test/configs/ruby.json +++ b/tools/run_tests/stress_test/configs/ruby.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_ruby" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_ruby" } }, From ed4d89e1f51fa06cc5e8cb231547b837ca1d1fa8 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 3 May 2016 16:01:38 -0700 Subject: [PATCH 0229/1894] Remove trailing space. --- include/grpc/impl/codegen/grpc_types.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index fa287d52388..7b20cc14d43 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -307,7 +307,7 @@ typedef enum { GRPC_OP_RECV_STATUS_ON_CLIENT, /** Receive close on the server: one and only one must be made on the server. - This op completes after the close has been received by the server. + This op completes after the close has been received by the server. This operation always succeeds, meaning ops paired with this operation will also appear to succeed, even though they may not have. */ GRPC_OP_RECV_CLOSE_ON_SERVER From 1717bff3f47939b83fece86075fb9b9aa178ebb3 Mon Sep 17 00:00:00 2001 From: yang-g Date: Tue, 3 May 2016 16:04:54 -0700 Subject: [PATCH 0230/1894] add a dummy service with no rpc to test codegen coverage --- src/proto/grpc/testing/echo.proto | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/proto/grpc/testing/echo.proto b/src/proto/grpc/testing/echo.proto index 0eef53a92a1..c596aabfcc4 100644 --- a/src/proto/grpc/testing/echo.proto +++ b/src/proto/grpc/testing/echo.proto @@ -45,3 +45,7 @@ service EchoTestService { service UnimplementedService { rpc Unimplemented(EchoRequest) returns (EchoResponse); } + +// A service without any rpc defined to test coverage. +service NoRpcService { +} From c027e77d6408c7ae9b1889f64e2629fa66872f3d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 3 May 2016 16:27:00 -0700 Subject: [PATCH 0231/1894] Progress --- src/core/lib/channel/compress_filter.c | 6 +- src/core/lib/channel/http_client_filter.c | 5 +- src/core/lib/channel/http_server_filter.c | 24 +++-- src/core/lib/http/httpcli.c | 14 +-- src/core/lib/iomgr/closure.c | 5 +- src/core/lib/iomgr/closure.h | 2 +- src/core/lib/iomgr/error.c | 92 +++++++++++++++++-- src/core/lib/iomgr/error.h | 29 +++++- src/core/lib/iomgr/ev_poll_and_epoll_posix.c | 7 +- src/core/lib/iomgr/resolve_address_posix.c | 3 +- .../lib/iomgr/socket_utils_common_posix.c | 34 ++++--- src/core/lib/iomgr/tcp_client_posix.c | 25 ++--- src/core/lib/iomgr/tcp_posix.c | 26 +++--- src/core/lib/iomgr/tcp_server.h | 4 +- src/core/lib/iomgr/tcp_server_posix.c | 66 +++++++------ src/core/lib/iomgr/timer.c | 27 ++++-- src/core/lib/iomgr/workqueue.h | 2 +- src/core/lib/iomgr/workqueue_posix.c | 10 +- src/core/lib/surface/alarm.c | 4 +- src/core/lib/surface/call.c | 53 ++++++----- src/core/lib/surface/completion_queue.h | 2 +- 21 files changed, 286 insertions(+), 154 deletions(-) diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 5510c79b183..e029ec54be1 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -155,11 +155,11 @@ static void process_send_initial_metadata( static void continue_send_message(grpc_exec_ctx *exec_ctx, grpc_call_element *elem); -static void send_done(grpc_exec_ctx *exec_ctx, void *elemp, bool success) { +static void send_done(grpc_exec_ctx *exec_ctx, void *elemp, grpc_error *error) { grpc_call_element *elem = elemp; call_data *calld = elem->call_data; gpr_slice_buffer_reset_and_unref(&calld->slices); - calld->post_send->cb(exec_ctx, calld->post_send->cb_arg, success); + calld->post_send->cb(exec_ctx, calld->post_send->cb_arg, error); } static void finish_send_message(grpc_exec_ctx *exec_ctx, @@ -205,7 +205,7 @@ static void finish_send_message(grpc_exec_ctx *exec_ctx, grpc_call_next_op(exec_ctx, elem, &calld->send_op); } -static void got_slice(grpc_exec_ctx *exec_ctx, void *elemp, bool success) { +static void got_slice(grpc_exec_ctx *exec_ctx, void *elemp, grpc_error *error) { grpc_call_element *elem = elemp; call_data *calld = elem->call_data; gpr_slice_buffer_add(&calld->slices, calld->incoming_slice); diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c index 516e708d1f0..ced3d75cd23 100644 --- a/src/core/lib/channel/http_client_filter.c +++ b/src/core/lib/channel/http_client_filter.c @@ -80,7 +80,8 @@ static grpc_mdelem *client_recv_filter(void *user_data, grpc_mdelem *md) { return md; } -static void hc_on_recv(grpc_exec_ctx *exec_ctx, void *user_data, bool success) { +static void hc_on_recv(grpc_exec_ctx *exec_ctx, void *user_data, + grpc_error *error) { grpc_call_element *elem = user_data; call_data *calld = elem->call_data; client_recv_filter_args a; @@ -88,7 +89,7 @@ static void hc_on_recv(grpc_exec_ctx *exec_ctx, void *user_data, bool success) { a.exec_ctx = exec_ctx; grpc_metadata_batch_filter(calld->recv_initial_metadata, client_recv_filter, &a); - calld->on_done_recv->cb(exec_ctx, calld->on_done_recv->cb_arg, success); + calld->on_done_recv->cb(exec_ctx, calld->on_done_recv->cb_arg, error); } static grpc_mdelem *client_strip_filter(void *user_data, grpc_mdelem *md) { diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index ba865416dec..433ed0ed533 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -142,10 +142,11 @@ static grpc_mdelem *server_filter(void *user_data, grpc_mdelem *md) { } } -static void hs_on_recv(grpc_exec_ctx *exec_ctx, void *user_data, bool success) { +static void hs_on_recv(grpc_exec_ctx *exec_ctx, void *user_data, + grpc_error *err) { grpc_call_element *elem = user_data; call_data *calld = elem->call_data; - if (success) { + if (err == GRPC_ERROR_NONE) { server_filter_args a; a.elem = elem; a.exec_ctx = exec_ctx; @@ -157,27 +158,32 @@ static void hs_on_recv(grpc_exec_ctx *exec_ctx, void *user_data, bool success) { calld->seen_path && calld->seen_authority) { /* do nothing */ } else { + err = GRPC_ERROR_CREATE("Bad incoming HTTP headers"); if (!calld->seen_path) { - gpr_log(GPR_ERROR, "Missing :path header"); + err = grpc_error_add_child(err, + GRPC_ERROR_CREATE("Missing :path header")); } if (!calld->seen_authority) { - gpr_log(GPR_ERROR, "Missing :authority header"); + err = grpc_error_add_child( + err, GRPC_ERROR_CREATE("Missing :authority header")); } if (!calld->seen_method) { - gpr_log(GPR_ERROR, "Missing :method header"); + err = grpc_error_add_child(err, + GRPC_ERROR_CREATE("Missing :method header")); } if (!calld->seen_scheme) { - gpr_log(GPR_ERROR, "Missing :scheme header"); + err = grpc_error_add_child(err, + GRPC_ERROR_CREATE("Missing :scheme header")); } if (!calld->seen_te_trailers) { - gpr_log(GPR_ERROR, "Missing te trailers header"); + err = grpc_error_add_child( + err, GRPC_ERROR_CREATE("Missing te: trailers header")); } /* Error this call out */ - success = 0; grpc_call_element_send_cancel(exec_ctx, elem); } } - calld->on_done_recv->cb(exec_ctx, calld->on_done_recv->cb_arg, success); + calld->on_done_recv->cb(exec_ctx, calld->on_done_recv->cb_arg, err); } static void hs_mutate_op(grpc_call_element *elem, diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index f22721ac8ff..a59452fc592 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -117,13 +117,12 @@ static void finish(grpc_exec_ctx *exec_ctx, internal_request *req, gpr_free(req); } -static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, bool success); - static void do_read(grpc_exec_ctx *exec_ctx, internal_request *req) { grpc_endpoint_read(exec_ctx, req->ep, &req->incoming, &req->on_read); } -static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, bool success) { +static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, + grpc_error *error) { internal_request *req = user_data; size_t i; @@ -137,7 +136,7 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, bool success) { } } - if (success) { + if (error == GRPC_ERROR_NONE) { do_read(exec_ctx, req); } else if (!req->have_read_byte) { next_address(exec_ctx, req); @@ -154,9 +153,9 @@ static void on_written(grpc_exec_ctx *exec_ctx, internal_request *req) { do_read(exec_ctx, req); } -static void done_write(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void done_write(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { internal_request *req = arg; - if (success) { + if (error == GRPC_ERROR_NONE) { on_written(exec_ctx, req); } else { next_address(exec_ctx, req); @@ -182,7 +181,8 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, start_write(exec_ctx, req); } -static void on_connected(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void on_connected(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { internal_request *req = arg; if (!req->ep) { diff --git a/src/core/lib/iomgr/closure.c b/src/core/lib/iomgr/closure.c index 8738c4a5ce3..885637efe9d 100644 --- a/src/core/lib/iomgr/closure.c +++ b/src/core/lib/iomgr/closure.c @@ -87,12 +87,13 @@ typedef struct { grpc_closure wrapper; } wrapped_closure; -static void closure_wrapper(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void closure_wrapper(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { wrapped_closure *wc = arg; grpc_iomgr_cb_func cb = wc->cb; void *cb_arg = wc->cb_arg; gpr_free(wc); - cb(exec_ctx, cb_arg, success); + cb(exec_ctx, cb_arg, error); } grpc_closure *grpc_closure_create(grpc_iomgr_cb_func cb, void *cb_arg) { diff --git a/src/core/lib/iomgr/closure.h b/src/core/lib/iomgr/closure.h index 8e76412ee02..14132d926e5 100644 --- a/src/core/lib/iomgr/closure.h +++ b/src/core/lib/iomgr/closure.h @@ -56,7 +56,7 @@ typedef struct grpc_closure_list { * \param success An indication on the state of the iomgr. On false, cleanup * actions should be taken (eg, shutdown). */ typedef void (*grpc_iomgr_cb_func)(grpc_exec_ctx *exec_ctx, void *arg, - bool success); + grpc_error *error); /** A closure over a grpc_iomgr_cb_func. */ struct grpc_closure { diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index 7dff3ece350..d0e4301722b 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -58,6 +58,16 @@ static void destroy_err(void *err) { grpc_error_unref(err); } static void *copy_err(void *err) { return grpc_error_ref(err); } +static void destroy_time(void *tm) { gpr_free(tm); } + +static gpr_timespec *box_time(gpr_timespec tm) { + gpr_timespec *out = gpr_malloc(sizeof(*out)); + *out = tm; + return out; +} + +static void *copy_time(void *tm) { return box_time(*(gpr_timespec *)tm); } + static const gpr_avl_vtable avl_vtable_ints = {destroy_integer, copy_integer, compare_integers, destroy_integer, copy_integer}; @@ -66,6 +76,9 @@ static const gpr_avl_vtable avl_vtable_strs = {destroy_integer, copy_integer, compare_integers, destroy_string, copy_string}; +static const gpr_avl_vtable avl_vtable_times = { + destroy_integer, copy_integer, compare_integers, destroy_time, copy_time}; + static const gpr_avl_vtable avl_vtable_errs = { destroy_integer, copy_integer, compare_integers, destroy_err, copy_err}; @@ -75,6 +88,8 @@ static const char *error_int_name(grpc_error_ints key) { return "status_code"; case GRPC_ERROR_INT_ERRNO: return "errno"; + case GRPC_ERROR_INT_FILE_LINE: + return "file_line"; } GPR_UNREACHABLE_CODE(return "unknown"); } @@ -89,6 +104,16 @@ static const char *error_str_name(grpc_error_strs key) { return "target_address"; case GRPC_ERROR_STR_SYSCALL: return "syscall"; + case GRPC_ERROR_STR_FILE: + return "file"; + } + GPR_UNREACHABLE_CODE(return "unknown"); +} + +static const char *error_time_name(grpc_error_times key) { + switch (key) { + case GRPC_ERROR_TIME_CREATED: + return "created"; } GPR_UNREACHABLE_CODE(return "unknown"); } @@ -97,12 +122,14 @@ struct grpc_error { gpr_refcount refs; gpr_avl ints; gpr_avl strs; + gpr_avl times; gpr_avl errs; uintptr_t next_err; }; static bool is_special(grpc_error *err) { - return err == GRPC_ERROR_NONE || err == GRPC_ERROR_OOM; + return err == GRPC_ERROR_NONE || err == GRPC_ERROR_OOM || + err == GRPC_ERROR_CANCELLED; } grpc_error *grpc_error_ref(grpc_error *err) { @@ -116,6 +143,7 @@ static void error_destroy(grpc_error *err) { gpr_avl_unref(err->ints); gpr_avl_unref(err->strs); gpr_avl_unref(err->errs); + gpr_avl_unref(err->times); } void grpc_error_unref(grpc_error *err) { @@ -124,14 +152,29 @@ void grpc_error_unref(grpc_error *err) { } } -grpc_error *grpc_error_create(void) { +grpc_error *grpc_error_create(const char *file, int line, const char *desc, + grpc_error **referencing, + size_t num_referencing) { grpc_error *err = gpr_malloc(sizeof(*err)); if (err == NULL) { // TODO(ctiller): make gpr_malloc return NULL return GRPC_ERROR_OOM; } - err->ints = gpr_avl_create(&avl_vtable_ints); - err->strs = gpr_avl_create(&avl_vtable_strs); + err->ints = gpr_avl_add(gpr_avl_create(&avl_vtable_ints), + (void *)(uintptr_t)GRPC_ERROR_INT_FILE_LINE, + (void *)(uintptr_t)line); + err->strs = gpr_avl_add( + gpr_avl_add(gpr_avl_create(&avl_vtable_strs), + (void *)(uintptr_t)GRPC_ERROR_STR_FILE, (void *)file), + (void *)(uintptr_t)GRPC_ERROR_STR_DESCRIPTION, (void *)desc); err->errs = gpr_avl_create(&avl_vtable_errs); + for (size_t i = 0; i < num_referencing; i++) { + if (referencing[i] == GRPC_ERROR_NONE) continue; + err->errs = + gpr_avl_add(err->errs, (void *)(err->next_err++), referencing[i]); + } + err->times = gpr_avl_add(gpr_avl_create(&avl_vtable_times), + (void *)(uintptr_t)GRPC_ERROR_TIME_CREATED, + box_time(gpr_now(GPR_CLOCK_REALTIME))); err->next_err = 0; gpr_ref_init(&err->refs, 1); return err; @@ -139,12 +182,16 @@ grpc_error *grpc_error_create(void) { static grpc_error *copy_error_and_unref(grpc_error *in) { if (is_special(in)) { - return grpc_error_create(); + if (in == GRPC_ERROR_NONE) return GRPC_ERROR_CREATE("no error"); + if (in == GRPC_ERROR_OOM) return GRPC_ERROR_CREATE("oom"); + if (in == GRPC_ERROR_CANCELLED) return GRPC_ERROR_CREATE("cancelled"); + return GRPC_ERROR_CREATE("unknown"); } grpc_error *out = gpr_malloc(sizeof(*out)); out->ints = gpr_avl_ref(in->ints); out->strs = gpr_avl_ref(in->strs); out->errs = gpr_avl_ref(in->errs); + out->times = gpr_avl_ref(in->times); out->next_err = in->next_err; gpr_ref_init(&out->refs, 1); grpc_error_unref(in); @@ -173,6 +220,7 @@ grpc_error *grpc_error_add_child(grpc_error *src, grpc_error *child) { static const char *no_error_string = "null"; static const char *oom_error_string = "\"Out of memory\""; +static const char *cancelled_error_string = "\"Cancelled\""; typedef struct { char *key; @@ -211,6 +259,10 @@ static char *key_str(void *p) { return gpr_strdup(error_str_name((grpc_error_strs)(uintptr_t)p)); } +static char *key_time(void *p) { + return gpr_strdup(error_time_name((grpc_error_times)(uintptr_t)p)); +} + static char *fmt_int(void *p) { char *s; gpr_asprintf(&s, "%lld", (intptr_t)p); @@ -277,6 +329,28 @@ static char *fmt_str(void *p) { return s; } +static char *fmt_time(void *p) { + gpr_timespec tm = *(gpr_timespec *)p; + char *out; + char *pfx = "!!"; + switch (tm.clock_type) { + case GPR_CLOCK_MONOTONIC: + pfx = "@monotonic:"; + break; + case GPR_CLOCK_REALTIME: + pfx = "@"; + break; + case GPR_CLOCK_PRECISE: + pfx = "@precise:"; + break; + case GPR_TIMESPAN: + pfx = ""; + break; + } + gpr_asprintf(&out, "%s%d.%09d", pfx, tm.tv_sec, tm.tv_nsec); + return out; +} + static void add_errs(gpr_avl_node *n, char **s, size_t *sz, size_t *cap) { if (n == NULL) return; add_errs(n->left, s, sz, cap); @@ -324,12 +398,14 @@ static const char *finish_kvs(kv_pairs *kvs) { const char *grpc_error_string(grpc_error *err) { if (err == GRPC_ERROR_NONE) return no_error_string; if (err == GRPC_ERROR_OOM) return oom_error_string; + if (err == GRPC_ERROR_CANCELLED) return cancelled_error_string; kv_pairs kvs; memset(&kvs, 0, sizeof(kvs)); collect_kvs(err->ints.root, key_int, fmt_int, &kvs); collect_kvs(err->strs.root, key_str, fmt_str, &kvs); + collect_kvs(err->times.root, key_time, fmt_time, &kvs); append_kv(&kvs, gpr_strdup("referenced_errors"), errs_string(err)); qsort(kvs.kvs, kvs.num_kvs, sizeof(kv_pair), cmp_kvs); @@ -337,10 +413,12 @@ const char *grpc_error_string(grpc_error *err) { return finish_kvs(&kvs); } -grpc_error *grpc_os_error(int err, const char *call_name) { +grpc_error *grpc_os_error(const char *file, int line, int err, + const char *call_name) { return grpc_error_set_str( grpc_error_set_str( - grpc_error_set_int(grpc_error_create(), GRPC_ERROR_INT_ERRNO, err), + grpc_error_set_int(grpc_error_create(file, line, "OS Error", NULL, 0), + GRPC_ERROR_INT_ERRNO, err), GRPC_ERROR_STR_OS_ERROR, strerror(err)), GRPC_ERROR_STR_SYSCALL, call_name); } diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index 6909bf9da1a..0ce684fdbc7 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -36,34 +36,53 @@ #include +#include + typedef struct grpc_error grpc_error; typedef enum { + GRPC_ERROR_INT_ERRNO, + GRPC_ERROR_INT_FILE_LINE, GRPC_ERROR_INT_STATUS_CODE, - GRPC_ERROR_INT_ERRNO } grpc_error_ints; typedef enum { GRPC_ERROR_STR_DESCRIPTION, - GRPC_ERROR_STR_TARGET_ADDRESS, + GRPC_ERROR_STR_FILE, GRPC_ERROR_STR_OS_ERROR, - GRPC_ERROR_STR_SYSCALL + GRPC_ERROR_STR_SYSCALL, + GRPC_ERROR_STR_TARGET_ADDRESS, } grpc_error_strs; +typedef enum { + GRPC_ERROR_TIME_CREATED, +} grpc_error_times; + #define GRPC_ERROR_NONE ((grpc_error *)NULL) #define GRPC_ERROR_OOM ((grpc_error *)1) +#define GRPC_ERROR_CANCELLED ((grpc_error *)2) const char *grpc_error_string(grpc_error *error); void grpc_error_free_string(const char *str); -grpc_error *grpc_error_create(void); +grpc_error *grpc_error_create(const char *file, int line, const char *desc, + grpc_error **referencing, size_t num_referencing); +#define GRPC_ERROR_CREATE(desc) \ + grpc_error_create(__FILE__, __LINE__, desc, NULL, 0) +#define GRPC_ERROR_CREATE_REFERENCING(desc, errs, count) \ + grpc_error_create(__FILE__, __LINE__, desc, errs, count) grpc_error *grpc_error_ref(grpc_error *err); void grpc_error_unref(grpc_error *err); grpc_error *grpc_error_set_int(grpc_error *src, grpc_error_ints which, intptr_t value); +grpc_error *grpc_error_set_time(grpc_error *src, grpc_error_times which, + gpr_timespec value); grpc_error *grpc_error_set_str(grpc_error *src, grpc_error_strs which, const char *value); grpc_error *grpc_error_add_child(grpc_error *src, grpc_error *child); -grpc_error *grpc_os_error(int err, const char *call_name); +grpc_error *grpc_os_error(const char *file, int line, int err, + const char *call_name); +#define GRPC_OS_ERROR(err, call_name) \ + grpc_os_error(__FILE__, __LINE__, err, call_name) #endif /* GRPC_CORE_LIB_IOMGR_ERROR_H */ diff --git a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c index e6a9cecbda5..d11c947df26 100644 --- a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c +++ b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c @@ -512,8 +512,7 @@ static grpc_error *fd_shutdown_error(bool shutdown) { if (!shutdown) { return GRPC_ERROR_NONE; } else { - return grpc_error_set_str(grpc_error_create(), GRPC_ERROR_STR_DESCRIPTION, - "FD shutdown"); + return GRPC_ERROR_CREATE("FD shutdown"); } } @@ -1045,7 +1044,7 @@ typedef struct grpc_unary_promote_args { } grpc_unary_promote_args; static void basic_do_promote(grpc_exec_ctx *exec_ctx, void *args, - bool success) { + grpc_error *error) { grpc_unary_promote_args *up_args = args; const grpc_pollset_vtable *original_vtable = up_args->original_vtable; grpc_pollset *pollset = up_args->pollset; @@ -1571,7 +1570,7 @@ static void finally_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, } static void perform_delayed_add(grpc_exec_ctx *exec_ctx, void *arg, - bool iomgr_status) { + grpc_error *error) { delayed_add *da = arg; if (!fd_is_orphaned(da->fd)) { diff --git a/src/core/lib/iomgr/resolve_address_posix.c b/src/core/lib/iomgr/resolve_address_posix.c index 7c137c5d6ca..e7d90b9c60d 100644 --- a/src/core/lib/iomgr/resolve_address_posix.c +++ b/src/core/lib/iomgr/resolve_address_posix.c @@ -147,7 +147,8 @@ grpc_resolved_addresses *(*grpc_blocking_resolve_address)( /* Callback to be passed to grpc_executor to asynch-ify * grpc_blocking_resolve_address */ -static void do_request_thread(grpc_exec_ctx *exec_ctx, void *rp, bool success) { +static void do_request_thread(grpc_exec_ctx *exec_ctx, void *rp, + grpc_error *error) { request *r = rp; grpc_resolved_addresses *resolved = grpc_blocking_resolve_address(r->name, r->default_port); diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index 8b49d91dd9c..11ab0904955 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -60,7 +60,7 @@ grpc_error *grpc_set_socket_nonblocking(int fd, int non_blocking) { int oldflags = fcntl(fd, F_GETFL, 0); if (oldflags < 0) { - return grpc_os_error(errno, "fcntl"); + return GRPC_OS_ERROR(errno, "fcntl"); } if (non_blocking) { @@ -70,7 +70,7 @@ grpc_error *grpc_set_socket_nonblocking(int fd, int non_blocking) { } if (fcntl(fd, F_SETFL, oldflags) != 0) { - return grpc_os_error(errno, "fcntl"); + return GRPC_OS_ERROR(errno, "fcntl"); } return GRPC_ERROR_NONE; @@ -82,13 +82,13 @@ grpc_error *grpc_set_socket_no_sigpipe_if_possible(int fd) { int newval; socklen_t intlen = sizeof(newval); if (0 != setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &val, sizeof(val))) { - return grpc_os_error(errno, "setsockopt(SO_NOSIGPIPE)"); + return GRPC_OS_ERROR(errno, "setsockopt(SO_NOSIGPIPE)"); } if (0 == getsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &newval, &intlen)) { - return grpc_os_error(errno, "getsockopt(SO_NOSIGPIPE)"); + return GRPC_OS_ERROR(errno, "getsockopt(SO_NOSIGPIPE)"); } if ((newval != 0) == val) { - return grpc_error_set_str(grpc_error_create(), GRPC_ERROR_STR_grpc_os_error, + return grpc_error_set_str(GRPC_ERROR_CREATE(), GRPC_ERROR_STR_grpc_os_error, "Failed to set SO_NOSIGPIPE"); } #endif @@ -100,7 +100,7 @@ grpc_error *grpc_set_socket_ip_pktinfo_if_possible(int fd) { int get_local_ip = 1; if (0 != setsockopt(fd, IPPROTO_IP, IP_PKTINFO, &get_local_ip, sizeof(get_local_ip))) { - return grpc_os_error(errno, "setsockopt(IP_PKTINFO)"); + return GRPC_OS_ERROR(errno, "setsockopt(IP_PKTINFO)"); } #endif return GRPC_ERROR_NONE; @@ -111,7 +111,7 @@ grpc_error *grpc_set_socket_ipv6_recvpktinfo_if_possible(int fd) { int get_local_ip = 1; if (0 != setsockopt(fd, IPPROTO_IPV6, IPV6_RECVPKTINFO, &get_local_ip, sizeof(get_local_ip))) { - return grpc_os_error(errno, "setsockopt(IPV6_RECVPKTINFO)"); + return GRPC_OS_ERROR(errno, "setsockopt(IPV6_RECVPKTINFO)"); } #endif return GRPC_ERROR_NONE; @@ -121,7 +121,7 @@ grpc_error *grpc_set_socket_ipv6_recvpktinfo_if_possible(int fd) { grpc_error *grpc_set_socket_cloexec(int fd, int close_on_exec) { int oldflags = fcntl(fd, F_GETFD, 0); if (oldflags < 0) { - return grpc_os_error(errno, "fcntl"); + return GRPC_OS_ERROR(errno, "fcntl"); } if (close_on_exec) { @@ -131,7 +131,7 @@ grpc_error *grpc_set_socket_cloexec(int fd, int close_on_exec) { } if (fcntl(fd, F_SETFD, oldflags) != 0) { - return grpc_os_error(errno, "fcntl"); + return GRPC_OS_ERROR(errno, "fcntl"); } return GRPC_ERROR_NONE; @@ -143,14 +143,13 @@ grpc_error *grpc_set_socket_reuse_addr(int fd, int reuse) { int newval; socklen_t intlen = sizeof(newval); if (0 != setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val))) { - return grpc_os_error(errno, "setsockopt(SO_REUSEADDR)"); + return GRPC_OS_ERROR(errno, "setsockopt(SO_REUSEADDR)"); } if (0 != getsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &newval, &intlen)) { - return grpc_os_error(errno, "getsockopt(SO_REUSEADDR)"); + return GRPC_OS_ERROR(errno, "getsockopt(SO_REUSEADDR)"); } if ((newval != 0) != val) { - return grpc_error_set_str(grpc_error_create(), GRPC_ERROR_STR_OS_ERROR, - "Failed to set SO_REUSEADDR"); + return GRPC_ERROR_CREATE("Failed to set SO_REUSEADDR"); } return GRPC_ERROR_NONE; @@ -162,14 +161,13 @@ grpc_error *grpc_set_socket_low_latency(int fd, int low_latency) { int newval; socklen_t intlen = sizeof(newval); if (0 != setsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &val, sizeof(val))) { - return grpc_os_error(errno, "setsockopt(TCP_NODELAY)"); + return GRPC_OS_ERROR(errno, "setsockopt(TCP_NODELAY)"); } if (0 != getsockopt(fd, IPPROTO_TCP, TCP_NODELAY, &newval, &intlen)) { - return grpc_os_error(errno, "getsockopt(TCP_NODELAY)"); + return GRPC_OS_ERROR(errno, "getsockopt(TCP_NODELAY)"); } if ((newval != 0) != val) { - return grpc_error_set_str(grpc_error_create(), GRPC_ERROR_STR_OS_ERROR, - "Failed to set TCP_NODELAY"); + return GRPC_ERROR_CREATE("Failed to set TCP_NODELAY"); } return GRPC_ERROR_NONE; } @@ -250,7 +248,7 @@ grpc_error *grpc_create_dualstack_socket(const struct sockaddr *addr, int type, *dsmode = family == AF_INET ? GRPC_DSMODE_IPV4 : GRPC_DSMODE_NONE; *newfd = socket(family, type, protocol); if (*newfd == -1) { - return grpc_os_error(errno, "socket"); + return GRPC_OS_ERROR(errno, "socket"); } return GRPC_ERROR_NONE; } diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index 190512c17cc..04b5b625a13 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -95,12 +95,14 @@ done: return err; } -static void tc_on_alarm(grpc_exec_ctx *exec_ctx, void *acp, bool success) { +static void tc_on_alarm(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { int done; async_connect *ac = acp; if (grpc_tcp_trace) { - gpr_log(GPR_DEBUG, "CLIENT_CONNECT: %s: on_alarm: success=%d", ac->addr_str, - success); + const char *str = grpc_error_string(error); + gpr_log(GPR_DEBUG, "CLIENT_CONNECT: %s: on_alarm: error=%s", ac->addr_str, + str); + grpc_error_free_string(str); } gpr_mu_lock(&ac->mu); if (ac->fd != NULL) { @@ -115,7 +117,7 @@ static void tc_on_alarm(grpc_exec_ctx *exec_ctx, void *acp, bool success) { } } -static void on_writable(grpc_exec_ctx *exec_ctx, void *acp, bool success) { +static void on_writable(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { async_connect *ac = acp; int so_error = 0; socklen_t so_error_size; @@ -124,11 +126,12 @@ static void on_writable(grpc_exec_ctx *exec_ctx, void *acp, bool success) { grpc_endpoint **ep = ac->ep; grpc_closure *closure = ac->closure; grpc_fd *fd; - grpc_error *error = GRPC_ERROR_NONE; if (grpc_tcp_trace) { - gpr_log(GPR_DEBUG, "CLIENT_CONNECT: %s: on_writable: success=%d", - ac->addr_str, success); + const char *str = grpc_error_string(error); + gpr_log(GPR_DEBUG, "CLIENT_CONNECT: %s: on_writable: error=%s", + ac->addr_str, str); + grpc_error_free_string(str); } gpr_mu_lock(&ac->mu); @@ -140,14 +143,14 @@ static void on_writable(grpc_exec_ctx *exec_ctx, void *acp, bool success) { grpc_timer_cancel(exec_ctx, &ac->alarm); gpr_mu_lock(&ac->mu); - if (success) { + if (error == GRPC_ERROR_NONE) { do { so_error_size = sizeof(so_error); err = getsockopt(grpc_fd_wrapped_fd(fd), SOL_SOCKET, SO_ERROR, &so_error, &so_error_size); } while (err < 0 && errno == EINTR); if (err < 0) { - error = grpc_os_error(errno, "getsockopt"); + error = GRPC_OS_ERROR(errno, "getsockopt"); goto finish; } else if (so_error != 0) { if (so_error == ENOBUFS) { @@ -177,7 +180,7 @@ static void on_writable(grpc_exec_ctx *exec_ctx, void *acp, bool success) { "Connection refused"); break; default: - error = grpc_os_error(errno, "getsockopt(SO_ERROR)"); + error = GRPC_OS_ERROR(errno, "getsockopt(SO_ERROR)"); break; } goto finish; @@ -276,7 +279,7 @@ static void tcp_client_connect_impl(grpc_exec_ctx *exec_ctx, if (errno != EWOULDBLOCK && errno != EINPROGRESS) { grpc_fd_orphan(exec_ctx, fdobj, NULL, NULL, "tcp_client_connect_error"); - grpc_exec_ctx_push(exec_ctx, closure, grpc_os_error(errno, "connect"), + grpc_exec_ctx_push(exec_ctx, closure, GRPC_OS_ERROR(errno, "connect"), NULL); goto done; } diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 7624d77d8f7..925bcf2f6ef 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -101,9 +101,9 @@ typedef struct { } grpc_tcp; static void tcp_handle_read(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, - bool success); + grpc_error *error); static void tcp_handle_write(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, - bool success); + grpc_error *error); static void tcp_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_tcp *tcp = (grpc_tcp *)ep; @@ -155,12 +155,15 @@ static void tcp_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { TCP_UNREF(exec_ctx, tcp, "destroy"); } -static void call_read_cb(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, int success) { +static void call_read_cb(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, + grpc_error *error) { grpc_closure *cb = tcp->read_cb; if (grpc_tcp_trace) { size_t i; - gpr_log(GPR_DEBUG, "read: success=%d", success); + const char *str = grpc_error_string(error); + gpr_log(GPR_DEBUG, "read: error=%s", str); + grpc_error_free_string(str); for (i = 0; i < tcp->incoming_buffer->count; i++) { char *dump = gpr_dump_slice(tcp->incoming_buffer->slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); @@ -171,7 +174,7 @@ static void call_read_cb(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, int success) { tcp->read_cb = NULL; tcp->incoming_buffer = NULL; - cb->cb(exec_ctx, cb->cb_arg, success); + cb->cb(exec_ctx, cb->cb_arg, error); } #define MAX_READ_IOVEC 4 @@ -240,7 +243,7 @@ static void tcp_continue_read(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { ++tcp->iov_size; } GPR_ASSERT((size_t)read_bytes == tcp->incoming_buffer->length); - call_read_cb(exec_ctx, tcp, 1); + call_read_cb(exec_ctx, tcp, GRPC_ERROR_NONE); TCP_UNREF(exec_ctx, tcp, "read"); } @@ -248,11 +251,11 @@ static void tcp_continue_read(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { } static void tcp_handle_read(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, - bool success) { + grpc_error *error) { grpc_tcp *tcp = (grpc_tcp *)arg; GPR_ASSERT(!tcp->finished_edge); - if (!success) { + if (error != GRPC_ERROR_NONE) { gpr_slice_buffer_reset_and_unref(tcp->incoming_buffer); call_read_cb(exec_ctx, tcp, 0); TCP_UNREF(exec_ctx, tcp, "read"); @@ -332,7 +335,7 @@ static bool tcp_flush(grpc_tcp *tcp, grpc_error **error) { tcp->outgoing_byte_idx = unwind_byte_idx; return false; } else { - *error = grpc_os_error(errno, "sendmsg"); + *error = GRPC_OS_ERROR(errno, "sendmsg"); return true; } } @@ -361,12 +364,11 @@ static bool tcp_flush(grpc_tcp *tcp, grpc_error **error) { } static void tcp_handle_write(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, - bool success) { + grpc_error *error) { grpc_tcp *tcp = (grpc_tcp *)arg; - grpc_error *error = GRPC_ERROR_NONE; grpc_closure *cb; - if (!success) { + if (error != GRPC_ERROR_NONE) { cb = tcp->write_cb; tcp->write_cb = NULL; cb->cb(exec_ctx, cb->cb_arg, 0); diff --git a/src/core/lib/iomgr/tcp_server.h b/src/core/lib/iomgr/tcp_server.h index 99b9f297291..75c582d18f9 100644 --- a/src/core/lib/iomgr/tcp_server.h +++ b/src/core/lib/iomgr/tcp_server.h @@ -73,8 +73,8 @@ void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *server, but not dualstack sockets. */ /* TODO(ctiller): deprecate this, and make grpc_tcp_server_add_ports to handle all of the multiple socket port matching logic in one place */ -int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, - size_t addr_len); +grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, + size_t addr_len, int *out_port); /* Number of fds at the given port_index, or 0 if port_index is out of bounds. */ diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index aaeb384f6e4..64ab1c144be 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -59,6 +59,8 @@ #include #include #include +#include + #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/sockaddr_utils.h" #include "src/core/lib/iomgr/socket_utils_posix.h" @@ -150,7 +152,7 @@ grpc_tcp_server *grpc_tcp_server_create(grpc_closure *shutdown_complete) { static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { if (s->shutdown_complete != NULL) { - grpc_exec_ctx_enqueue(exec_ctx, s->shutdown_complete, true, NULL); + grpc_exec_ctx_push(exec_ctx, s->shutdown_complete, GRPC_ERROR_NONE, NULL); } gpr_mu_destroy(&s->mu); @@ -165,7 +167,7 @@ static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { } static void destroyed_port(grpc_exec_ctx *exec_ctx, void *server, - bool success) { + grpc_error *error) { grpc_tcp_server *s = server; gpr_mu_lock(&s->mu); s->destroyed_ports++; @@ -306,14 +308,14 @@ error: } /* event manager callback when reads are ready */ -static void on_read(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void on_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *err) { grpc_tcp_listener *sp = arg; grpc_tcp_server_acceptor acceptor = {sp->server, sp->port_index, sp->fd_index}; grpc_fd *fdobj; size_t i; - if (!success) { + if (err != GRPC_ERROR_NONE) { goto error; } @@ -420,8 +422,8 @@ static grpc_tcp_listener *add_socket_to_server(grpc_tcp_server *s, int fd, return sp; } -int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, - size_t addr_len) { +grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, + size_t addr_len, int *out_port) { grpc_tcp_listener *sp; grpc_tcp_listener *sp2 = NULL; int fd; @@ -436,6 +438,7 @@ int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, int port; unsigned port_index = 0; unsigned fd_index = 0; + grpc_error *errs[2] = {GRPC_ERROR_NONE, GRPC_ERROR_NONE}; if (s->tail != NULL) { port_index = s->tail->port_index + 1; } @@ -474,26 +477,26 @@ int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, /* Try listening on IPv6 first. */ addr = (struct sockaddr *)&wild6; addr_len = sizeof(wild6); - fd = grpc_create_dualstack_socket(addr, SOCK_STREAM, 0, &dsmode); - sp = add_socket_to_server(s, fd, addr, addr_len, port_index, fd_index); - if (fd >= 0 && dsmode == GRPC_DSMODE_DUALSTACK) { - goto done; - } - if (sp != NULL) { - ++fd_index; - } - /* If we didn't get a dualstack socket, also listen on 0.0.0.0. */ - if (port == 0 && sp != NULL) { - grpc_sockaddr_set_port((struct sockaddr *)&wild4, sp->port); + errs[0] = grpc_create_dualstack_socket(addr, SOCK_STREAM, 0, &dsmode, &fd); + if (errs[0] == GRPC_ERROR_NONE) { + sp = add_socket_to_server(s, fd, addr, addr_len, port_index, fd_index); + if (fd >= 0 && dsmode == GRPC_DSMODE_DUALSTACK) { + goto done; + } + if (sp != NULL) { + ++fd_index; + } + /* If we didn't get a dualstack socket, also listen on 0.0.0.0. */ + if (port == 0 && sp != NULL) { + grpc_sockaddr_set_port((struct sockaddr *)&wild4, sp->port); + } + addr = (struct sockaddr *)&wild4; + addr_len = sizeof(wild4); } - addr = (struct sockaddr *)&wild4; - addr_len = sizeof(wild4); } - fd = grpc_create_dualstack_socket(addr, SOCK_STREAM, 0, &dsmode); - if (fd < 0) { - gpr_log(GPR_ERROR, "Unable to create socket: %s", strerror(errno)); - } else { + errs[1] = grpc_create_dualstack_socket(addr, SOCK_STREAM, 0, &dsmode, &fd); + if (errs[1] == GRPC_ERROR_NONE) { if (dsmode == GRPC_DSMODE_IPV4 && grpc_sockaddr_is_v4mapped(addr, &addr4_copy)) { addr = (struct sockaddr *)&addr4_copy; @@ -510,9 +513,19 @@ int grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, done: gpr_free(allocated_addr); if (sp != NULL) { - return sp->port; + *out_port = sp->port; + grpc_error_unref(errs[0]); + grpc_error_unref(errs[1]); + return GRPC_ERROR_NONE; } else { - return -1; + *out_port = -1; + char *addr_str = grpc_sockaddr_to_uri(addr); + grpc_error *err = grpc_error_set_str( + GRPC_ERROR_CREATE_REFERENCING("Failed to add port to server", errs, + GPR_ARRAY_SIZE(errs)), + GRPC_ERROR_STR_TARGET_ADDRESS, addr_str); + gpr_free(addr_str); + return err; } } @@ -581,7 +594,8 @@ grpc_tcp_server *grpc_tcp_server_ref(grpc_tcp_server *s) { void grpc_tcp_server_shutdown_starting_add(grpc_tcp_server *s, grpc_closure *shutdown_starting) { gpr_mu_lock(&s->mu); - grpc_closure_list_add(&s->shutdown_starting, shutdown_starting, 1); + grpc_closure_list_append(&s->shutdown_starting, shutdown_starting, + GRPC_ERROR_NONE); gpr_mu_unlock(&s->mu); } diff --git a/src/core/lib/iomgr/timer.c b/src/core/lib/iomgr/timer.c index acb5b26c870..d785d1543f4 100644 --- a/src/core/lib/iomgr/timer.c +++ b/src/core/lib/iomgr/timer.c @@ -73,7 +73,7 @@ static shard_type *g_shard_queue[NUM_SHARDS]; static bool g_initialized = false; static int run_some_expired_timers(grpc_exec_ctx *exec_ctx, gpr_timespec now, - gpr_timespec *next, int success); + gpr_timespec *next, grpc_error *error); static gpr_timespec compute_min_deadline(shard_type *shard) { return grpc_timer_heap_is_empty(&shard->heap) @@ -185,13 +185,16 @@ void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer, if (!g_initialized) { timer->triggered = 1; - grpc_exec_ctx_enqueue(exec_ctx, &timer->closure, false, NULL); + grpc_exec_ctx_push( + exec_ctx, &timer->closure, + GRPC_ERROR_CREATE("Attempt to create timer before initialization"), + NULL); return; } if (gpr_time_cmp(deadline, now) <= 0) { timer->triggered = 1; - grpc_exec_ctx_enqueue(exec_ctx, &timer->closure, true, NULL); + grpc_exec_ctx_push(exec_ctx, &timer->closure, GRPC_ERROR_NONE, NULL); return; } @@ -238,7 +241,7 @@ void grpc_timer_cancel(grpc_exec_ctx *exec_ctx, grpc_timer *timer) { shard_type *shard = &g_shards[shard_idx(timer)]; gpr_mu_lock(&shard->mu); if (!timer->triggered) { - grpc_exec_ctx_enqueue(exec_ctx, &timer->closure, false, NULL); + grpc_exec_ctx_push(exec_ctx, &timer->closure, GRPC_ERROR_CANCELLED, NULL); timer->triggered = 1; if (timer->heap_index == INVALID_HEAP_INDEX) { list_remove(timer); @@ -299,12 +302,12 @@ static grpc_timer *pop_one(shard_type *shard, gpr_timespec now) { /* REQUIRES: shard->mu unlocked */ static size_t pop_timers(grpc_exec_ctx *exec_ctx, shard_type *shard, gpr_timespec now, gpr_timespec *new_min_deadline, - int success) { + grpc_error *error) { size_t n = 0; grpc_timer *timer; gpr_mu_lock(&shard->mu); while ((timer = pop_one(shard, now))) { - grpc_exec_ctx_enqueue(exec_ctx, &timer->closure, success, NULL); + grpc_exec_ctx_push(exec_ctx, &timer->closure, grpc_error_ref(error), NULL); n++; } *new_min_deadline = compute_min_deadline(shard); @@ -313,7 +316,7 @@ static size_t pop_timers(grpc_exec_ctx *exec_ctx, shard_type *shard, } static int run_some_expired_timers(grpc_exec_ctx *exec_ctx, gpr_timespec now, - gpr_timespec *next, int success) { + gpr_timespec *next, grpc_error *error) { size_t n = 0; /* TODO(ctiller): verify that there are any timers (atomically) here */ @@ -327,8 +330,8 @@ static int run_some_expired_timers(grpc_exec_ctx *exec_ctx, gpr_timespec now, /* For efficiency, we pop as many available timers as we can from the shard. This may violate perfect timer deadline ordering, but that shouldn't be a big deal because we don't make ordering guarantees. */ - n += pop_timers(exec_ctx, g_shard_queue[0], now, &new_min_deadline, - success); + n += + pop_timers(exec_ctx, g_shard_queue[0], now, &new_min_deadline, error); /* An grpc_timer_init() on the shard could intervene here, adding a new timer that is earlier than new_min_deadline. However, @@ -359,6 +362,8 @@ static int run_some_expired_timers(grpc_exec_ctx *exec_ctx, gpr_timespec now, *next, gpr_time_add(now, gpr_time_from_millis(1, GPR_TIMESPAN))); } + grpc_error_unref(error); + return (int)n; } @@ -367,5 +372,7 @@ bool grpc_timer_check(grpc_exec_ctx *exec_ctx, gpr_timespec now, GPR_ASSERT(now.clock_type == g_clock_type); return run_some_expired_timers( exec_ctx, now, next, - gpr_time_cmp(now, gpr_inf_future(now.clock_type)) != 0); + gpr_time_cmp(now, gpr_inf_future(now.clock_type)) != 0 + ? GRPC_ERROR_NONE + : GRPC_ERROR_CREATE("Shutting down timer system")); } diff --git a/src/core/lib/iomgr/workqueue.h b/src/core/lib/iomgr/workqueue.h index 3e2b2236704..20b47e1c140 100644 --- a/src/core/lib/iomgr/workqueue.h +++ b/src/core/lib/iomgr/workqueue.h @@ -78,6 +78,6 @@ void grpc_workqueue_add_to_pollset(grpc_exec_ctx *exec_ctx, /** Add a work item to a workqueue */ void grpc_workqueue_push(grpc_workqueue *workqueue, grpc_closure *closure, - int success); + grpc_error *error); #endif /* GRPC_CORE_LIB_IOMGR_WORKQUEUE_H */ diff --git a/src/core/lib/iomgr/workqueue_posix.c b/src/core/lib/iomgr/workqueue_posix.c index 80e7a0b206c..e27525dd504 100644 --- a/src/core/lib/iomgr/workqueue_posix.c +++ b/src/core/lib/iomgr/workqueue_posix.c @@ -45,7 +45,7 @@ #include "src/core/lib/iomgr/ev_posix.h" -static void on_readable(grpc_exec_ctx *exec_ctx, void *arg, bool success); +static void on_readable(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error); grpc_workqueue *grpc_workqueue_create(grpc_exec_ctx *exec_ctx) { char name[32]; @@ -110,10 +110,10 @@ void grpc_workqueue_flush(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) { gpr_mu_unlock(&workqueue->mu); } -static void on_readable(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void on_readable(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_workqueue *workqueue = arg; - if (!success) { + if (error != GRPC_ERROR_NONE) { gpr_mu_destroy(&workqueue->mu); /* HACK: let wakeup_fd code know that we stole the fd */ workqueue->wakeup_fd.read_fd = 0; @@ -131,12 +131,12 @@ static void on_readable(grpc_exec_ctx *exec_ctx, void *arg, bool success) { } void grpc_workqueue_push(grpc_workqueue *workqueue, grpc_closure *closure, - int success) { + grpc_error *error) { gpr_mu_lock(&workqueue->mu); if (grpc_closure_list_empty(workqueue->closure_list)) { grpc_wakeup_fd_wakeup(&workqueue->wakeup_fd); } - grpc_closure_list_add(&workqueue->closure_list, closure, success); + grpc_closure_list_append(&workqueue->closure_list, closure, error); gpr_mu_unlock(&workqueue->mu); } diff --git a/src/core/lib/surface/alarm.c b/src/core/lib/surface/alarm.c index 2cf2f00b31c..aa9d60ee6a8 100644 --- a/src/core/lib/surface/alarm.c +++ b/src/core/lib/surface/alarm.c @@ -48,9 +48,9 @@ struct grpc_alarm { static void do_nothing_end_completion(grpc_exec_ctx *exec_ctx, void *arg, grpc_cq_completion *c) {} -static void alarm_cb(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void alarm_cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_alarm *alarm = arg; - grpc_cq_end_op(exec_ctx, alarm->cq, alarm->tag, success, + grpc_cq_end_op(exec_ctx, alarm->cq, alarm->tag, error, do_nothing_end_completion, NULL, &alarm->completion); } diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 9b2b94eedf5..0d6c58db625 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -122,6 +122,7 @@ typedef struct batch_control { grpc_closure finish_batch; void *notify_tag; gpr_refcount steps_to_complete; + grpc_error *error; uint8_t send_initial_metadata; uint8_t send_message; @@ -130,7 +131,6 @@ typedef struct batch_control { uint8_t recv_message; uint8_t recv_final_op; uint8_t is_notify_tag_closure; - uint8_t success; } batch_control; struct grpc_call { @@ -239,9 +239,9 @@ static grpc_call_error cancel_with_status(grpc_exec_ctx *exec_ctx, grpc_call *c, grpc_status_code status, const char *description); static void destroy_call(grpc_exec_ctx *exec_ctx, void *call_stack, - bool success); + grpc_error *error); static void receiving_slice_ready(grpc_exec_ctx *exec_ctx, void *bctlp, - bool success); + grpc_error *error); grpc_call *grpc_call_create(grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, @@ -361,7 +361,8 @@ void grpc_call_internal_unref(grpc_exec_ctx *exec_ctx, grpc_call *c REF_ARG) { GRPC_CALL_STACK_UNREF(exec_ctx, CALL_STACK_FROM_CALL(c), REF_REASON); } -static void destroy_call(grpc_exec_ctx *exec_ctx, void *call, bool success) { +static void destroy_call(grpc_exec_ctx *exec_ctx, void *call, + grpc_error *error) { size_t i; int ii; grpc_call *c = call; @@ -706,13 +707,13 @@ typedef struct cancel_closure { grpc_status_code status; } cancel_closure; -static void done_cancel(grpc_exec_ctx *exec_ctx, void *ccp, bool success) { +static void done_cancel(grpc_exec_ctx *exec_ctx, void *ccp, grpc_error *error) { cancel_closure *cc = ccp; GRPC_CALL_INTERNAL_UNREF(exec_ctx, cc->call, "cancel"); gpr_free(cc); } -static void send_cancel(grpc_exec_ctx *exec_ctx, void *ccp, bool success) { +static void send_cancel(grpc_exec_ctx *exec_ctx, void *ccp, grpc_error *error) { grpc_transport_stream_op op; cancel_closure *cc = ccp; memset(&op, 0, sizeof(op)); @@ -739,7 +740,7 @@ static grpc_call_error cancel_with_status(grpc_exec_ctx *exec_ctx, grpc_call *c, cc->call = c; cc->status = status; GRPC_CALL_INTERNAL_REF(c, "cancel"); - grpc_exec_ctx_enqueue(exec_ctx, &cc->closure, true, NULL); + grpc_exec_ctx_push(exec_ctx, &cc->closure, GRPC_ERROR_NONE, NULL); return GRPC_CALL_OK; } @@ -775,11 +776,11 @@ grpc_call *grpc_call_from_top_element(grpc_call_element *elem) { return CALL_FROM_TOP_ELEM(elem); } -static void call_alarm(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void call_alarm(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_call *call = arg; gpr_mu_lock(&call->mu); call->have_alarm = 0; - if (success) { + if (error != GRPC_ERROR_NONE) { cancel_with_status(exec_ctx, call, GRPC_STATUS_DEADLINE_EXCEEDED, "Deadline Exceeded"); } @@ -961,7 +962,7 @@ static void post_batch_completion(grpc_exec_ctx *exec_ctx, batch_control *bctl) { grpc_call *call = bctl->call; if (bctl->is_notify_tag_closure) { - grpc_exec_ctx_enqueue(exec_ctx, bctl->notify_tag, bctl->success, NULL); + grpc_exec_ctx_push(exec_ctx, bctl->notify_tag, bctl->error, NULL); gpr_mu_lock(&call->mu); bctl->call->used_batches = (uint8_t)(bctl->call->used_batches & @@ -969,7 +970,7 @@ static void post_batch_completion(grpc_exec_ctx *exec_ctx, gpr_mu_unlock(&call->mu); GRPC_CALL_INTERNAL_UNREF(exec_ctx, call, "completion"); } else { - grpc_cq_end_op(exec_ctx, bctl->call->cq, bctl->notify_tag, bctl->success, + grpc_cq_end_op(exec_ctx, bctl->call->cq, bctl->notify_tag, bctl->error, finish_batch_completion, bctl, &bctl->cq_completion); } } @@ -1001,11 +1002,11 @@ static void continue_receiving_slices(grpc_exec_ctx *exec_ctx, } static void receiving_slice_ready(grpc_exec_ctx *exec_ctx, void *bctlp, - bool success) { + grpc_error *error) { batch_control *bctl = bctlp; grpc_call *call = bctl->call; - if (success) { + if (error == GRPC_ERROR_NONE) { gpr_slice_buffer_add(&(*call->receiving_buffer)->data.raw.slice_buffer, call->receiving_slice); continue_receiving_slices(exec_ctx, bctl); @@ -1058,15 +1059,15 @@ static void process_data_after_md(grpc_exec_ctx *exec_ctx, batch_control *bctl, } static void receiving_stream_ready(grpc_exec_ctx *exec_ctx, void *bctlp, - bool success) { + grpc_error *error) { batch_control *bctl = bctlp; grpc_call *call = bctl->call; gpr_mu_lock(&bctl->call->mu); - if (bctl->call->has_initial_md_been_received || !success || + if (bctl->call->has_initial_md_been_received || error != GRPC_ERROR_NONE || call->receiving_stream == NULL) { gpr_mu_unlock(&bctl->call->mu); - process_data_after_md(exec_ctx, bctlp, success); + process_data_after_md(exec_ctx, bctlp, error); } else { call->saved_receiving_stream_ready_bctlp = bctlp; gpr_mu_unlock(&bctl->call->mu); @@ -1074,14 +1075,14 @@ static void receiving_stream_ready(grpc_exec_ctx *exec_ctx, void *bctlp, } static void receiving_initial_metadata_ready(grpc_exec_ctx *exec_ctx, - void *bctlp, bool success) { + void *bctlp, grpc_error *error) { batch_control *bctl = bctlp; grpc_call *call = bctl->call; gpr_mu_lock(&call->mu); - if (!success) { - bctl->success = false; + if (error != GRPC_ERROR_NONE) { + bctl->error = grpc_error_ref(error); } else { grpc_metadata_batch *md = &call->metadata_batch[1 /* is_receiving */][0 /* is_trailing */]; @@ -1101,7 +1102,7 @@ static void receiving_initial_metadata_ready(grpc_exec_ctx *exec_ctx, grpc_closure *saved_rsr_closure = grpc_closure_create( receiving_stream_ready, call->saved_receiving_stream_ready_bctlp); call->saved_receiving_stream_ready_bctlp = NULL; - grpc_exec_ctx_enqueue(exec_ctx, saved_rsr_closure, success, NULL); + grpc_exec_ctx_push(exec_ctx, saved_rsr_closure, error, NULL); } gpr_mu_unlock(&call->mu); @@ -1111,7 +1112,8 @@ static void receiving_initial_metadata_ready(grpc_exec_ctx *exec_ctx, } } -static void finish_batch(grpc_exec_ctx *exec_ctx, void *bctlp, bool success) { +static void finish_batch(grpc_exec_ctx *exec_ctx, void *bctlp, + grpc_error *error) { batch_control *bctl = bctlp; grpc_call *call = bctl->call; grpc_call *child_call; @@ -1119,7 +1121,7 @@ static void finish_batch(grpc_exec_ctx *exec_ctx, void *bctlp, bool success) { gpr_mu_lock(&call->mu); if (bctl->send_initial_metadata) { - if (!success) { + if (error != GRPC_ERROR_NONE) { set_status_code(call, STATUS_FROM_CORE, GRPC_STATUS_UNAVAILABLE); } grpc_metadata_batch_destroy( @@ -1165,9 +1167,10 @@ static void finish_batch(grpc_exec_ctx *exec_ctx, void *bctlp, bool success) { call->final_op.server.cancelled); } - success = 1; + grpc_error_unref(error); + error = GRPC_ERROR_NONE; } - bctl->success = success != 0; + bctl->error = grpc_error_ref(error); gpr_mu_unlock(&call->mu); if (gpr_unref(&bctl->steps_to_complete)) { post_batch_completion(exec_ctx, bctl); @@ -1201,7 +1204,7 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, if (nops == 0) { GRPC_CALL_INTERNAL_REF(call, "completion"); - bctl->success = 1; + bctl->error = GRPC_ERROR_NONE; if (!is_notify_tag_closure) { grpc_cq_begin_op(call->cq, notify_tag); } diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index eef82cf0148..9da660ca8b1 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -75,7 +75,7 @@ void grpc_cq_begin_op(grpc_completion_queue *cc, void *tag); /* Queue a GRPC_OP_COMPLETED operation; tag must correspond to the tag passed to grpc_cq_begin_op */ void grpc_cq_end_op(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc, - void *tag, int success, + void *tag, grpc_error *error, void (*done)(grpc_exec_ctx *exec_ctx, void *done_arg, grpc_cq_completion *storage), void *done_arg, grpc_cq_completion *storage); From f51457b34d2705edbbf7c80f747bd2135cf791a0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 3 May 2016 17:06:32 -0700 Subject: [PATCH 0232/1894] Progress --- .../server/secure/server_secure_chttp2.c | 5 +- .../lib/iomgr/socket_utils_common_posix.c | 3 +- src/core/lib/surface/channel.c | 5 +- src/core/lib/surface/channel_ping.c | 4 +- src/core/lib/surface/completion_queue.c | 14 ++--- src/core/lib/surface/lame_client.c | 10 ++-- src/core/lib/surface/server.c | 58 +++++++++++-------- src/core/lib/transport/connectivity_state.c | 16 ++--- src/core/lib/transport/transport.c | 19 +++--- src/core/lib/transport/transport.h | 3 +- 10 files changed, 76 insertions(+), 61 deletions(-) diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 698b2bef610..031cebb7c3a 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -139,11 +139,12 @@ static void start(grpc_exec_ctx *exec_ctx, grpc_server *server, void *statep, on_accept, state); } -static void destroy_done(grpc_exec_ctx *exec_ctx, void *statep, bool success) { +static void destroy_done(grpc_exec_ctx *exec_ctx, void *statep, + grpc_error *error) { grpc_server_secure_state *state = statep; if (state->destroy_callback != NULL) { state->destroy_callback->cb(exec_ctx, state->destroy_callback->cb_arg, - success); + grpc_error_ref(error)); } grpc_server_security_connector_shutdown(exec_ctx, state->sc); state_unref(state); diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index 11ab0904955..83941574df6 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -88,8 +88,7 @@ grpc_error *grpc_set_socket_no_sigpipe_if_possible(int fd) { return GRPC_OS_ERROR(errno, "getsockopt(SO_NOSIGPIPE)"); } if ((newval != 0) == val) { - return grpc_error_set_str(GRPC_ERROR_CREATE(), GRPC_ERROR_STR_grpc_os_error, - "Failed to set SO_NOSIGPIPE"); + return GRPC_ERROR_CREATE("Failed to set SO_NOSIGPIPE"); } #endif return GRPC_ERROR_NONE; diff --git a/src/core/lib/surface/channel.c b/src/core/lib/surface/channel.c index b6b760b5d8d..ac5e1fcc0c5 100644 --- a/src/core/lib/surface/channel.c +++ b/src/core/lib/surface/channel.c @@ -80,7 +80,8 @@ struct grpc_channel { /* the protobuf library will (by default) start warning at 100megs */ #define DEFAULT_MAX_MESSAGE_LENGTH (100 * 1024 * 1024) -static void destroy_channel(grpc_exec_ctx *exec_ctx, void *arg, bool success); +static void destroy_channel(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error); grpc_channel *grpc_channel_create(grpc_exec_ctx *exec_ctx, const char *target, const grpc_channel_args *input_args, @@ -267,7 +268,7 @@ void grpc_channel_internal_unref(grpc_exec_ctx *exec_ctx, } static void destroy_channel(grpc_exec_ctx *exec_ctx, void *arg, - bool iomgr_success) { + grpc_error *error) { grpc_channel *channel = arg; grpc_channel_stack_destroy(exec_ctx, CHANNEL_STACK_FROM_CHANNEL(channel)); while (channel->registered_calls) { diff --git a/src/core/lib/surface/channel_ping.c b/src/core/lib/surface/channel_ping.c index 5a506986957..3b4f1221f36 100644 --- a/src/core/lib/surface/channel_ping.c +++ b/src/core/lib/surface/channel_ping.c @@ -53,9 +53,9 @@ static void ping_destroy(grpc_exec_ctx *exec_ctx, void *arg, gpr_free(arg); } -static void ping_done(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void ping_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { ping_result *pr = arg; - grpc_cq_end_op(exec_ctx, pr->cq, pr->tag, success, ping_destroy, pr, + grpc_cq_end_op(exec_ctx, pr->cq, pr->tag, error, ping_destroy, pr, &pr->completion_storage); } diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index 1f82c3bad2e..50e2a1bd16e 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -89,7 +89,7 @@ static gpr_mu g_freelist_mu; static grpc_completion_queue *g_freelist; static void on_pollset_shutdown_done(grpc_exec_ctx *exec_ctx, void *cc, - bool success); + grpc_error *error); void grpc_cq_global_init(void) { gpr_mu_init(&g_freelist_mu); } @@ -172,7 +172,7 @@ void grpc_cq_internal_ref(grpc_completion_queue *cc) { } static void on_pollset_shutdown_done(grpc_exec_ctx *exec_ctx, void *arg, - bool success) { + grpc_error *error) { grpc_completion_queue *cc = arg; GRPC_CQ_INTERNAL_UNREF(cc, "pollset_destroy"); } @@ -215,7 +215,7 @@ void grpc_cq_begin_op(grpc_completion_queue *cc, void *tag) { event, then enter shutdown mode */ /* Queue a GRPC_OP_COMPLETED operation */ void grpc_cq_end_op(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc, - void *tag, int success, + void *tag, grpc_error *error, void (*done)(grpc_exec_ctx *exec_ctx, void *done_arg, grpc_cq_completion *storage), void *done_arg, grpc_cq_completion *storage) { @@ -228,15 +228,15 @@ void grpc_cq_end_op(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc, GPR_TIMER_BEGIN("grpc_cq_end_op", 0); GRPC_API_TRACE( - "grpc_cq_end_op(exec_ctx=%p, cc=%p, tag=%p, success=%d, done=%p, " + "grpc_cq_end_op(exec_ctx=%p, cc=%p, tag=%p, error=%p, done=%p, " "done_arg=%p, storage=%p)", - 7, (exec_ctx, cc, tag, success, done, done_arg, storage)); + 7, (exec_ctx, cc, tag, error, done, done_arg, storage)); storage->tag = tag; storage->done = done; storage->done_arg = done_arg; - storage->next = - ((uintptr_t)&cc->completed_head) | ((uintptr_t)(success != 0)); + storage->next = ((uintptr_t)&cc->completed_head) | + ((uintptr_t)(error == GRPC_ERROR_NONE)); gpr_mu_lock(cc->mu); #ifndef NDEBUG diff --git a/src/core/lib/surface/lame_client.c b/src/core/lib/surface/lame_client.c index f50ec54cea9..d6dfa0f1641 100644 --- a/src/core/lib/surface/lame_client.c +++ b/src/core/lib/surface/lame_client.c @@ -80,7 +80,8 @@ static void lame_start_transport_stream_op(grpc_exec_ctx *exec_ctx, } else if (op->recv_trailing_metadata != NULL) { fill_metadata(elem, op->recv_trailing_metadata); } - grpc_transport_stream_op_finish_with_failure(exec_ctx, op); + grpc_transport_stream_op_finish_with_failure( + exec_ctx, op, GRPC_ERROR_CREATE("lame client channel")); } static char *lame_get_peer(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) { @@ -94,13 +95,14 @@ static void lame_start_transport_op(grpc_exec_ctx *exec_ctx, GPR_ASSERT(*op->connectivity_state != GRPC_CHANNEL_FATAL_FAILURE); *op->connectivity_state = GRPC_CHANNEL_FATAL_FAILURE; op->on_connectivity_state_change->cb( - exec_ctx, op->on_connectivity_state_change->cb_arg, 1); + exec_ctx, op->on_connectivity_state_change->cb_arg, GRPC_ERROR_NONE); } if (op->on_consumed != NULL) { - op->on_consumed->cb(exec_ctx, op->on_consumed->cb_arg, 1); + op->on_consumed->cb(exec_ctx, op->on_consumed->cb_arg, GRPC_ERROR_NONE); } if (op->send_ping != NULL) { - op->send_ping->cb(exec_ctx, op->send_ping->cb_arg, 0); + op->send_ping->cb(exec_ctx, op->send_ping->cb_arg, + GRPC_ERROR_CREATE("lame client channel")); } } diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 2db95b9cdfc..61d1624f49d 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -232,7 +232,8 @@ struct grpc_server { #define SERVER_FROM_CALL_ELEM(elem) \ (((channel_data *)(elem)->channel_data)->server) -static void publish_new_rpc(grpc_exec_ctx *exec_ctx, void *calld, bool success); +static void publish_new_rpc(grpc_exec_ctx *exec_ctx, void *calld, + grpc_error *error); static void fail_call(grpc_exec_ctx *exec_ctx, grpc_server *server, requested_call *rc); /* Before calling maybe_finish_shutdown, we must hold mu_global and not @@ -265,7 +266,7 @@ struct shutdown_cleanup_args { }; static void shutdown_cleanup(grpc_exec_ctx *exec_ctx, void *arg, - bool iomgr_status_ignored) { + grpc_error *error) { struct shutdown_cleanup_args *a = arg; gpr_slice_unref(a->slice); gpr_free(a); @@ -320,7 +321,8 @@ static void request_matcher_destroy(request_matcher *rm) { gpr_stack_lockfree_destroy(rm->requests); } -static void kill_zombie(grpc_exec_ctx *exec_ctx, void *elem, bool success) { +static void kill_zombie(grpc_exec_ctx *exec_ctx, void *elem, + grpc_error *error) { grpc_call_destroy(grpc_call_from_top_element(elem)); } @@ -335,7 +337,8 @@ static void request_matcher_zombify_all_pending_calls(grpc_exec_ctx *exec_ctx, grpc_closure_init( &calld->kill_zombie_closure, kill_zombie, grpc_call_stack_element(grpc_call_get_call_stack(calld->call), 0)); - grpc_exec_ctx_enqueue(exec_ctx, &calld->kill_zombie_closure, true, NULL); + grpc_exec_ctx_push(exec_ctx, &calld->kill_zombie_closure, GRPC_ERROR_NONE, + NULL); } } @@ -398,7 +401,7 @@ static void orphan_channel(channel_data *chand) { } static void finish_destroy_channel(grpc_exec_ctx *exec_ctx, void *cd, - bool success) { + grpc_error *error) { channel_data *chand = cd; grpc_server *server = chand->server; GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, chand->channel, "server"); @@ -487,23 +490,24 @@ static void publish_call(grpc_exec_ctx *exec_ctx, grpc_server *server, grpc_call_stack_element(grpc_call_get_call_stack(call), 0); channel_data *chand = elem->channel_data; server_ref(chand->server); - grpc_cq_end_op(exec_ctx, calld->cq_new, rc->tag, true, done_request_event, rc, - &rc->completion); + grpc_cq_end_op(exec_ctx, calld->cq_new, rc->tag, GRPC_ERROR_NONE, + done_request_event, rc, &rc->completion); } -static void publish_new_rpc(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void publish_new_rpc(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { call_data *calld = arg; request_matcher *rm = calld->request_matcher; grpc_server *server = rm->server; - if (!success || gpr_atm_acq_load(&server->shutdown_flag)) { + if (error != GRPC_ERROR_NONE || gpr_atm_acq_load(&server->shutdown_flag)) { gpr_mu_lock(&calld->mu_state); calld->state = ZOMBIED; gpr_mu_unlock(&calld->mu_state); grpc_closure_init( &calld->kill_zombie_closure, kill_zombie, grpc_call_stack_element(grpc_call_get_call_stack(calld->call), 0)); - grpc_exec_ctx_enqueue(exec_ctx, &calld->kill_zombie_closure, true, NULL); + grpc_exec_ctx_push(exec_ctx, &calld->kill_zombie_closure, error, NULL); return; } @@ -540,7 +544,8 @@ static void finish_start_new_rpc( calld->state = ZOMBIED; gpr_mu_unlock(&calld->mu_state); grpc_closure_init(&calld->kill_zombie_closure, kill_zombie, elem); - grpc_exec_ctx_enqueue(exec_ctx, &calld->kill_zombie_closure, true, NULL); + grpc_exec_ctx_push(exec_ctx, &calld->kill_zombie_closure, GRPC_ERROR_NONE, + NULL); return; } @@ -548,7 +553,7 @@ static void finish_start_new_rpc( switch (payload_handling) { case GRPC_SRM_PAYLOAD_NONE: - publish_new_rpc(exec_ctx, calld, true); + publish_new_rpc(exec_ctx, calld, GRPC_ERROR_NONE); break; case GRPC_SRM_PAYLOAD_READ_INITIAL_BYTE_BUFFER: { grpc_op op; @@ -676,7 +681,8 @@ static void maybe_finish_shutdown(grpc_exec_ctx *exec_ctx, for (i = 0; i < server->num_shutdown_tags; i++) { server_ref(server); grpc_cq_end_op(exec_ctx, server->shutdown_tags[i].cq, - server->shutdown_tags[i].tag, 1, done_shutdown_event, server, + server->shutdown_tags[i].tag, GRPC_ERROR_NONE, + done_shutdown_event, server, &server->shutdown_tags[i].completion); } } @@ -699,7 +705,7 @@ static grpc_mdelem *server_filter(void *user_data, grpc_mdelem *md) { } static void server_on_recv_initial_metadata(grpc_exec_ctx *exec_ctx, void *ptr, - bool success) { + grpc_error *error) { grpc_call_element *elem = ptr; call_data *calld = elem->call_data; gpr_timespec op_deadline; @@ -712,11 +718,12 @@ static void server_on_recv_initial_metadata(grpc_exec_ctx *exec_ctx, void *ptr, if (calld->host && calld->path) { /* do nothing */ } else { - success = 0; + error = + GRPC_ERROR_CREATE_REFERENCING("Missing :authority or :path", &error, 1); } calld->on_done_recv_initial_metadata->cb( - exec_ctx, calld->on_done_recv_initial_metadata->cb_arg, success); + exec_ctx, calld->on_done_recv_initial_metadata->cb_arg, error); } static void server_mutate_op(grpc_call_element *elem, @@ -741,10 +748,10 @@ static void server_start_transport_stream_op(grpc_exec_ctx *exec_ctx, } static void got_initial_metadata(grpc_exec_ctx *exec_ctx, void *ptr, - bool success) { + grpc_error *error) { grpc_call_element *elem = ptr; call_data *calld = elem->call_data; - if (success) { + if (error == GRPC_ERROR_NONE) { start_new_rpc(exec_ctx, elem); } else { gpr_mu_lock(&calld->mu_state); @@ -752,7 +759,8 @@ static void got_initial_metadata(grpc_exec_ctx *exec_ctx, void *ptr, calld->state = ZOMBIED; gpr_mu_unlock(&calld->mu_state); grpc_closure_init(&calld->kill_zombie_closure, kill_zombie, elem); - grpc_exec_ctx_enqueue(exec_ctx, &calld->kill_zombie_closure, true, NULL); + grpc_exec_ctx_push(exec_ctx, &calld->kill_zombie_closure, GRPC_ERROR_NONE, + NULL); } else if (calld->state == PENDING) { calld->state = ZOMBIED; gpr_mu_unlock(&calld->mu_state); @@ -785,7 +793,7 @@ static void accept_stream(grpc_exec_ctx *exec_ctx, void *cd, } static void channel_connectivity_changed(grpc_exec_ctx *exec_ctx, void *cd, - bool iomgr_status_ignored) { + grpc_error *error) { channel_data *chand = cd; grpc_server *server = chand->server; if (chand->connectivity_state != GRPC_CHANNEL_FATAL_FAILURE) { @@ -1103,7 +1111,7 @@ void done_published_shutdown(grpc_exec_ctx *exec_ctx, void *done_arg, } static void listener_destroy_done(grpc_exec_ctx *exec_ctx, void *s, - bool success) { + grpc_error *error) { grpc_server *server = s; gpr_mu_lock(&server->mu_global); server->listeners_destroyed++; @@ -1125,8 +1133,8 @@ void grpc_server_shutdown_and_notify(grpc_server *server, gpr_mu_lock(&server->mu_global); grpc_cq_begin_op(cq, tag); if (server->shutdown_published) { - grpc_cq_end_op(&exec_ctx, cq, tag, 1, done_published_shutdown, NULL, - gpr_malloc(sizeof(grpc_cq_completion))); + grpc_cq_end_op(&exec_ctx, cq, tag, GRPC_ERROR_NONE, done_published_shutdown, + NULL, gpr_malloc(sizeof(grpc_cq_completion))); gpr_mu_unlock(&server->mu_global); goto done; } @@ -1258,8 +1266,8 @@ static grpc_call_error queue_call_request(grpc_exec_ctx *exec_ctx, grpc_closure_init( &calld->kill_zombie_closure, kill_zombie, grpc_call_stack_element(grpc_call_get_call_stack(calld->call), 0)); - grpc_exec_ctx_enqueue(exec_ctx, &calld->kill_zombie_closure, true, - NULL); + grpc_exec_ctx_push(exec_ctx, &calld->kill_zombie_closure, + GRPC_ERROR_NONE, NULL); } else { GPR_ASSERT(calld->state == PENDING); calld->state = ACTIVATED; diff --git a/src/core/lib/transport/connectivity_state.c b/src/core/lib/transport/connectivity_state.c index e24ee638fdd..cdfc298fa9f 100644 --- a/src/core/lib/transport/connectivity_state.c +++ b/src/core/lib/transport/connectivity_state.c @@ -67,18 +67,18 @@ void grpc_connectivity_state_init(grpc_connectivity_state_tracker *tracker, void grpc_connectivity_state_destroy(grpc_exec_ctx *exec_ctx, grpc_connectivity_state_tracker *tracker) { - int success; + grpc_error *error; grpc_connectivity_state_watcher *w; while ((w = tracker->watchers)) { tracker->watchers = w->next; if (GRPC_CHANNEL_FATAL_FAILURE != *w->current) { *w->current = GRPC_CHANNEL_FATAL_FAILURE; - success = 1; + error = GRPC_ERROR_NONE; } else { - success = 0; + error = GRPC_ERROR_CREATE("Shutdown connectivity owner"); } - grpc_exec_ctx_enqueue(exec_ctx, w->notify, success, NULL); + grpc_exec_ctx_push(exec_ctx, w->notify, error, NULL); gpr_free(w); } gpr_free(tracker->name); @@ -109,7 +109,7 @@ int grpc_connectivity_state_notify_on_state_change( if (current == NULL) { grpc_connectivity_state_watcher *w = tracker->watchers; if (w != NULL && w->notify == notify) { - grpc_exec_ctx_enqueue(exec_ctx, notify, false, NULL); + grpc_exec_ctx_push(exec_ctx, notify, GRPC_ERROR_CANCELLED, NULL); tracker->watchers = w->next; gpr_free(w); return 0; @@ -117,7 +117,7 @@ int grpc_connectivity_state_notify_on_state_change( while (w != NULL) { grpc_connectivity_state_watcher *rm_candidate = w->next; if (rm_candidate != NULL && rm_candidate->notify == notify) { - grpc_exec_ctx_enqueue(exec_ctx, notify, false, NULL); + grpc_exec_ctx_push(exec_ctx, notify, GRPC_ERROR_CANCELLED, NULL); w->next = w->next->next; gpr_free(rm_candidate); return 0; @@ -128,7 +128,7 @@ int grpc_connectivity_state_notify_on_state_change( } else { if (tracker->current_state != *current) { *current = tracker->current_state; - grpc_exec_ctx_enqueue(exec_ctx, notify, true, NULL); + grpc_exec_ctx_push(exec_ctx, notify, GRPC_ERROR_NONE, NULL); } else { grpc_connectivity_state_watcher *w = gpr_malloc(sizeof(*w)); w->current = current; @@ -158,7 +158,7 @@ void grpc_connectivity_state_set(grpc_exec_ctx *exec_ctx, while ((w = tracker->watchers) != NULL) { *w->current = tracker->current_state; tracker->watchers = w->next; - grpc_exec_ctx_enqueue(exec_ctx, w->notify, true, NULL); + grpc_exec_ctx_push(exec_ctx, w->notify, GRPC_ERROR_NONE, NULL); gpr_free(w); } } diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c index e6d524abe68..f7362973a97 100644 --- a/src/core/lib/transport/transport.c +++ b/src/core/lib/transport/transport.c @@ -60,7 +60,7 @@ void grpc_stream_unref(grpc_exec_ctx *exec_ctx, grpc_stream_refcount *refcount) { #endif if (gpr_unref(&refcount->refs)) { - grpc_exec_ctx_enqueue(exec_ctx, &refcount->destroy, true, NULL); + grpc_exec_ctx_push(exec_ctx, &refcount->destroy, GRPC_ERROR_NONE, NULL); } } @@ -143,11 +143,14 @@ char *grpc_transport_get_peer(grpc_exec_ctx *exec_ctx, return transport->vtable->get_peer(exec_ctx, transport); } -void grpc_transport_stream_op_finish_with_failure( - grpc_exec_ctx *exec_ctx, grpc_transport_stream_op *op) { - grpc_exec_ctx_enqueue(exec_ctx, op->recv_message_ready, false, NULL); - grpc_exec_ctx_enqueue(exec_ctx, op->recv_initial_metadata_ready, false, NULL); - grpc_exec_ctx_enqueue(exec_ctx, op->on_complete, false, NULL); +void grpc_transport_stream_op_finish_with_failure(grpc_exec_ctx *exec_ctx, + grpc_transport_stream_op *op, + grpc_error *error) { + grpc_exec_ctx_push(exec_ctx, op->recv_message_ready, grpc_error_ref(error), + NULL); + grpc_exec_ctx_push(exec_ctx, op->recv_initial_metadata_ready, + grpc_error_ref(error), NULL); + grpc_exec_ctx_push(exec_ctx, op->on_complete, error, NULL); } void grpc_transport_stream_op_add_cancellation(grpc_transport_stream_op *op, @@ -171,11 +174,11 @@ typedef struct { grpc_closure closure; } close_message_data; -static void free_message(grpc_exec_ctx *exec_ctx, void *p, bool iomgr_success) { +static void free_message(grpc_exec_ctx *exec_ctx, void *p, grpc_error *error) { close_message_data *cmd = p; gpr_slice_unref(cmd->message); if (cmd->then_call != NULL) { - cmd->then_call->cb(exec_ctx, cmd->then_call->cb_arg, iomgr_success); + cmd->then_call->cb(exec_ctx, cmd->then_call->cb_arg, grpc_error_ref(error)); } gpr_free(cmd); } diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index 482a9d1791b..c4da1027cdc 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -216,7 +216,8 @@ void grpc_transport_destroy_stream(grpc_exec_ctx *exec_ctx, grpc_stream *stream, void *and_free_memory); void grpc_transport_stream_op_finish_with_failure(grpc_exec_ctx *exec_ctx, - grpc_transport_stream_op *op); + grpc_transport_stream_op *op, + grpc_error *error); void grpc_transport_stream_op_add_cancellation(grpc_transport_stream_op *op, grpc_status_code status); From 1bdd5319b077956214b95e730e844f079baa4ddf Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Mon, 2 May 2016 19:57:04 -0700 Subject: [PATCH 0233/1894] Python dockerfiles and config files for stress testing --- .../Dockerfile.template | 45 ++++++++ .../grpc_interop_stress_python/Dockerfile | 103 ++++++++++++++++++ .../build_interop_stress.sh | 46 ++++++++ .../run_tests/stress_test/configs/python.json | 98 +++++++++++++++++ tools/run_tests/stress_test/run_on_gke.py | 13 ++- 5 files changed, 301 insertions(+), 4 deletions(-) create mode 100644 templates/tools/dockerfile/stress_test/grpc_interop_stress_python/Dockerfile.template create mode 100644 tools/dockerfile/stress_test/grpc_interop_stress_python/Dockerfile create mode 100755 tools/dockerfile/stress_test/grpc_interop_stress_python/build_interop_stress.sh create mode 100644 tools/run_tests/stress_test/configs/python.json diff --git a/templates/tools/dockerfile/stress_test/grpc_interop_stress_python/Dockerfile.template b/templates/tools/dockerfile/stress_test/grpc_interop_stress_python/Dockerfile.template new file mode 100644 index 00000000000..27e9eeec5a8 --- /dev/null +++ b/templates/tools/dockerfile/stress_test/grpc_interop_stress_python/Dockerfile.template @@ -0,0 +1,45 @@ +%YAML 1.2 +--- | + # Copyright 2016, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../../apt_get_basic.include"/> + <%include file="../../ccache_setup.include"/> + <%include file="../../cxx_deps.include"/> + <%include file="../../gcp_api_libraries.include"/> + <%include file="../../python_deps.include"/> + + RUN pip install coverage + RUN pip install oauth2client + + # Define the default command. + CMD ["bash"] + diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_python/Dockerfile b/tools/dockerfile/stress_test/grpc_interop_stress_python/Dockerfile new file mode 100644 index 00000000000..606b7654576 --- /dev/null +++ b/tools/dockerfile/stress_test/grpc_interop_stress_python/Dockerfile @@ -0,0 +1,103 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +FROM debian:jessie + +# Install Git and basic packages. +RUN apt-get update && apt-get install -y \ + autoconf \ + autotools-dev \ + build-essential \ + bzip2 \ + ccache \ + curl \ + gcc \ + gcc-multilib \ + git \ + golang \ + gyp \ + lcov \ + libc6 \ + libc6-dbg \ + libc6-dev \ + libgtest-dev \ + libtool \ + make \ + perl \ + strace \ + python-dev \ + python-setuptools \ + python-yaml \ + telnet \ + unzip \ + wget \ + zip && apt-get clean + +#================ +# Build profiling +RUN apt-get update && apt-get install -y time && apt-get clean + +# Prepare ccache +RUN ln -s /usr/bin/ccache /usr/local/bin/gcc +RUN ln -s /usr/bin/ccache /usr/local/bin/g++ +RUN ln -s /usr/bin/ccache /usr/local/bin/cc +RUN ln -s /usr/bin/ccache /usr/local/bin/c++ +RUN ln -s /usr/bin/ccache /usr/local/bin/clang +RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ + +#================= +# C++ dependencies +RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean + +# Google Cloud platform API libraries +RUN apt-get update && apt-get install -y python-pip && apt-get clean +RUN pip install --upgrade google-api-python-client + + +#==================== +# Python dependencies + +# Install dependencies + +RUN apt-get update && apt-get install -y \ + python-all-dev \ + python3-all-dev \ + python-pip + +# Install Python packages from PyPI +RUN pip install pip --upgrade +RUN pip install virtualenv +RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 tox + + +RUN pip install coverage +RUN pip install oauth2client + +# Define the default command. +CMD ["bash"] diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_python/build_interop_stress.sh b/tools/dockerfile/stress_test/grpc_interop_stress_python/build_interop_stress.sh new file mode 100755 index 00000000000..e65332f2f30 --- /dev/null +++ b/tools/dockerfile/stress_test/grpc_interop_stress_python/build_interop_stress.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Builds Python interop server and client in a base image. +set -e + +mkdir -p /var/local/git +git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc + +# copy service account keys if available +cp -r /var/local/jenkins/service_account $HOME || true + +cd /var/local/git/grpc + +tools/run_tests/run_tests.py -l python -c opt --build_only + +# Build c++ interop client +make metrics_client -j + diff --git a/tools/run_tests/stress_test/configs/python.json b/tools/run_tests/stress_test/configs/python.json new file mode 100644 index 00000000000..ea5b5ba2ec4 --- /dev/null +++ b/tools/run_tests/stress_test/configs/python.json @@ -0,0 +1,98 @@ +{ + "dockerImages": { + "grpc_stress_python" : { + "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "dockerFileDir": "grpc_interop_stress_python" + } + }, + + "clientTemplates": { + "baseTemplates": { + "default": { + "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py", + "pollIntervalSecs": 60, + "clientArgs": { + "num_channels_per_server":5, + "num_stubs_per_channel":10, + "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1", + "metrics_port": 8081 + }, + "metricsPort": 8081, + "metricsArgs": { + "metrics_server_address": "localhost:8081", + "total_only": "true" + }, + "env": { + "PYTHONPATH": "/var/local/git/grpc/src/python/gens:/var/local/git/grpc/src/python/grpcio", + "LD_LIBRARY_PATH":"/var/local/git/grpc/libs/opt" + } + } + }, + "templates": { + "python_client": { + "baseTemplate": "default", + "stressClientCmd": [ + "python", + "/var/local/git/grpc/src/python/grpcio/tests/stress/client.py" + ], + "metricsClientCmd": ["/var/local/git/grpc/bins/opt/metrics_client"] + } + } + }, + + "serverTemplates": { + "baseTemplates":{ + "default": { + "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py", + "serverPort": 8080, + "serverArgs": { + "port": 8080 + }, + "env": { + "PYTHONPATH": "/var/local/git/grpc/src/python/gens:/var/local/git/grpc/src/python/grpcio", + "LD_LIBRARY_PATH":"/var/local/git/grpc/libs/opt" + } + } + }, + "templates": { + "python_server": { + "baseTemplate": "default", + "stressServerCmd": [ + "python", + "/var/local/git/grpc/src/python/grpcio/tests/interop/server.py" + ] + } + } + }, + + "testMatrix": { + "serverPodSpecs": { + "python-stress-server": { + "serverTemplate": "python_server", + "dockerImage": "grpc_stress_python", + "numInstances": 1 + } + }, + + "clientPodSpecs": { + "python-stress-client": { + "clientTemplate": "python_client", + "dockerImage": "grpc_stress_python", + "numInstances": 5, + "serverPodSpec": "python-stress-server" + } + } + }, + + "globalSettings": { + "buildDockerImages": true, + "pollIntervalSecs": 60, + "testDurationSecs": 7200, + "kubernetesProxyPort": 8011, + "datasetIdNamePrefix": "stress_test_python", + "summaryTableId": "summary", + "qpsTableId": "qps", + "podWarmupSecs": 60 + } +} + diff --git a/tools/run_tests/stress_test/run_on_gke.py b/tools/run_tests/stress_test/run_on_gke.py index d4f1c4ad3dc..583e58316f4 100755 --- a/tools/run_tests/stress_test/run_on_gke.py +++ b/tools/run_tests/stress_test/run_on_gke.py @@ -69,7 +69,7 @@ class ClientTemplate: def __init__(self, name, stress_client_cmd, metrics_client_cmd, metrics_port, wrapper_script_path, poll_interval_secs, client_args_dict, - metrics_args_dict, will_run_forever): + metrics_args_dict, will_run_forever, env_dict): self.name = name self.stress_client_cmd = stress_client_cmd self.metrics_client_cmd = metrics_client_cmd @@ -79,19 +79,21 @@ class ClientTemplate: self.client_args_dict = client_args_dict self.metrics_args_dict = metrics_args_dict self.will_run_forever = will_run_forever + self.env_dict = env_dict class ServerTemplate: """ Contains all the common settings used by a stress server """ def __init__(self, name, server_cmd, wrapper_script_path, server_port, - server_args_dict, will_run_forever): + server_args_dict, will_run_forever, env_dict): self.name = name self.server_cmd = server_cmd self.wrapper_script_path = wrapper_script_path self.server_port = server_port self.server_args_dict = server_args_dict self.will_run_forever = will_run_forever + self.env_dict = env_dict class DockerImage: @@ -240,6 +242,7 @@ class Gke: # server_pod_spec.template.wrapper_script_path) are are injected into the # container via environment variables server_env = self.gke_env.copy() + server_env.update(server_pod_spec.template.env_dict) server_env.update({ 'STRESS_TEST_IMAGE_TYPE': 'SERVER', 'STRESS_TEST_CMD': server_pod_spec.template.server_cmd, @@ -283,6 +286,7 @@ class Gke: # client_pod_spec.template.wrapper_script_path) are are injected into the # container via environment variables client_env = self.gke_env.copy() + client_env.update(client_pod_spec.template.env_dict) client_env.update({ 'STRESS_TEST_IMAGE_TYPE': 'CLIENT', 'STRESS_TEST_CMD': client_pod_spec.template.stress_client_cmd, @@ -425,7 +429,8 @@ class Config: template_name, stress_client_cmd, metrics_client_cmd, temp_dict['metricsPort'], temp_dict['wrapperScriptPath'], temp_dict['pollIntervalSecs'], temp_dict['clientArgs'].copy(), - temp_dict['metricsArgs'].copy(), temp_dict.get('willRunForever', 1)) + temp_dict['metricsArgs'].copy(), temp_dict.get('willRunForever', 1), + temp_dict.get('env', {}).copy()) return client_templates_dict @@ -461,7 +466,7 @@ class Config: server_templates_dict[template_name] = ServerTemplate( template_name, stress_server_cmd, temp_dict['wrapperScriptPath'], temp_dict['serverPort'], temp_dict['serverArgs'].copy(), - temp_dict.get('willRunForever', 1)) + temp_dict.get('willRunForever', 1), temp_dict.get('env', {}).copy()) return server_templates_dict From f023800ff1cc3e78fdfd53f37eaf0a1f31a4d88e Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Tue, 3 May 2016 16:40:43 -0700 Subject: [PATCH 0234/1894] Correct csharp kubernetes proxy port (so that it doesn't collide with other configs when running on the same machine) --- tools/run_tests/stress_test/configs/csharp.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/stress_test/configs/csharp.json b/tools/run_tests/stress_test/configs/csharp.json index b7090696b4f..306fe115c72 100644 --- a/tools/run_tests/stress_test/configs/csharp.json +++ b/tools/run_tests/stress_test/configs/csharp.json @@ -80,7 +80,7 @@ "buildDockerImages": true, "pollIntervalSecs": 60, "testDurationSecs": 7200, - "kubernetesProxyPort": 8001, + "kubernetesProxyPort": 8009, "datasetIdNamePrefix": "stress_test_csharp", "summaryTableId": "summary", "qpsTableId": "qps", From d8c0d385f45a953d683203f24bda90e679d98f25 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Tue, 3 May 2016 17:12:45 -0700 Subject: [PATCH 0235/1894] Fix a bug in stress client code --- src/python/grpcio/tests/stress/client.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/python/grpcio/tests/stress/client.py b/src/python/grpcio/tests/stress/client.py index a733741b736..e2e016760c8 100644 --- a/src/python/grpcio/tests/stress/client.py +++ b/src/python/grpcio/tests/stress/client.py @@ -117,7 +117,10 @@ def run_test(args): for runner in runners: runner.start() try: - raise exception_queue.get(block=True, timeout=args.test_duration_secs) + timeout_secs = args.test_duration_secs + if timeout_secs < 0: + timeout_secs = None + raise exception_queue.get(block=True, timeout=timeout_secs) except Queue.Empty: # No exceptions thrown, success pass From 739e86c394040031ca6ac116b84e2975fb5fe83a Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 3 May 2016 17:24:33 -0700 Subject: [PATCH 0236/1894] finishing serverside request stream should not be required for disposal --- .../Internal/AsyncCallServerTest.cs | 34 ++++++------------- .../Grpc.Core/Internal/AsyncCallBase.cs | 7 +--- .../Grpc.Core/Internal/AsyncCallServer.cs | 14 ++++---- 3 files changed, 20 insertions(+), 35 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs index 0b6981f871d..058371521d6 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs @@ -80,16 +80,24 @@ namespace Grpc.Core.Internal.Tests [Test] public void CancelNotificationAfterStartDisposes() + { + var finishedTask = asyncCallServer.ServerSideCallAsync(); + fakeCall.ReceivedCloseOnServerHandler(true, cancelled: true); + AssertFinished(asyncCallServer, fakeCall, finishedTask); + } + + [Test] + public void CancelNotificationAfterStartDisposesAfterPendingReadFinishes() { var finishedTask = asyncCallServer.ServerSideCallAsync(); var requestStream = new ServerRequestStream(asyncCallServer); - // Finishing requestStream is needed for dispose to happen. var moveNextTask = requestStream.MoveNext(); + + fakeCall.ReceivedCloseOnServerHandler(true, cancelled: true); fakeCall.ReceivedMessageHandler(true, null); Assert.IsFalse(moveNextTask.Result); - fakeCall.ReceivedCloseOnServerHandler(true, cancelled: true); AssertFinished(asyncCallServer, fakeCall, finishedTask); } @@ -101,9 +109,8 @@ namespace Grpc.Core.Internal.Tests fakeCall.ReceivedCloseOnServerHandler(true, cancelled: true); - // Check that startin a read after cancel notification has been processed is legal. + // Check that starting a read after cancel notification has been processed is legal. var moveNextTask = requestStream.MoveNext(); - fakeCall.ReceivedMessageHandler(true, null); Assert.IsFalse(moveNextTask.Result); AssertFinished(asyncCallServer, fakeCall, finishedTask); @@ -136,12 +143,6 @@ namespace Grpc.Core.Internal.Tests // TODO(jtattermusch): should we throw a different exception type instead? Assert.Throws(typeof(InvalidOperationException), () => responseStream.WriteAsync("request1")); - - // Finishing requestStream is needed for dispose to happen. - var moveNextTask = requestStream.MoveNext(); - fakeCall.ReceivedMessageHandler(true, null); - Assert.IsFalse(moveNextTask.Result); - AssertFinished(asyncCallServer, fakeCall, finishedTask); } @@ -149,7 +150,6 @@ namespace Grpc.Core.Internal.Tests public void WriteCompletionFailureThrows() { var finishedTask = asyncCallServer.ServerSideCallAsync(); - var requestStream = new ServerRequestStream(asyncCallServer); var responseStream = new ServerResponseStream(asyncCallServer); var writeTask = responseStream.WriteAsync("request1"); @@ -157,13 +157,7 @@ namespace Grpc.Core.Internal.Tests // TODO(jtattermusch): should we throw a different exception type instead? Assert.ThrowsAsync(typeof(InvalidOperationException), async () => await writeTask); - // Finishing requestStream is needed for dispose to happen. - var moveNextTask = requestStream.MoveNext(); - fakeCall.ReceivedMessageHandler(true, null); - Assert.IsFalse(moveNextTask.Result); - fakeCall.ReceivedCloseOnServerHandler(true, cancelled: true); - AssertFinished(asyncCallServer, fakeCall, finishedTask); } @@ -171,7 +165,6 @@ namespace Grpc.Core.Internal.Tests public void WriteAndWriteStatusCanRunConcurrently() { var finishedTask = asyncCallServer.ServerSideCallAsync(); - var requestStream = new ServerRequestStream(asyncCallServer); var responseStream = new ServerResponseStream(asyncCallServer); var writeTask = responseStream.WriteAsync("request1"); @@ -183,11 +176,6 @@ namespace Grpc.Core.Internal.Tests Assert.DoesNotThrowAsync(async () => await writeTask); Assert.DoesNotThrowAsync(async () => await writeStatusTask); - // Finishing requestStream is needed for dispose to happen. - var moveNextTask = requestStream.MoveNext(); - fakeCall.ReceivedMessageHandler(true, null); - Assert.IsFalse(moveNextTask.Result); - fakeCall.ReceivedCloseOnServerHandler(true, cancelled: true); AssertFinished(asyncCallServer, fakeCall, finishedTask); diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs index 18dbe87734b..42234dcac21 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs @@ -155,7 +155,7 @@ namespace Grpc.Core.Internal { lock (myLock) { - CheckReadingAllowed(); + GrpcPreconditions.CheckState(started); if (readingDone) { // the last read that returns null or throws an exception is idempotent @@ -224,11 +224,6 @@ namespace Grpc.Core.Internal GrpcPreconditions.CheckState(sendCompletionDelegate == null, "Only one write can be pending at a time"); } - protected virtual void CheckReadingAllowed() - { - GrpcPreconditions.CheckState(started); - } - protected void CheckNotCancelled() { if (cancelRequested) diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs index 44f2988e21e..eafe2ccab87 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs @@ -183,12 +183,6 @@ namespace Grpc.Core.Internal get { return false; } } - protected override void CheckReadingAllowed() - { - base.CheckReadingAllowed(); - GrpcPreconditions.CheckArgument(!cancelRequested); - } - protected override void OnAfterReleaseResources() { server.RemoveCallReference(this); @@ -204,6 +198,14 @@ namespace Grpc.Core.Internal lock (myLock) { finished = true; + if (streamingReadTcs == null) + { + // if there's no pending read, readingDone=true will dispose now. + // if there is a pending read, we will dispose once that read finishes. + readingDone = true; + streamingReadTcs = new TaskCompletionSource(); + streamingReadTcs.SetResult(default(TRequest)); + } ReleaseResourcesIfPossible(); } From 274bcc8f0b50bfef7fe1dd5cc33ebaa6b13edba0 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Tue, 3 May 2016 17:34:54 -0700 Subject: [PATCH 0237/1894] Added dummy cronet api implementation so we can build on Jenkins. --- BUILD | 12 +++ Makefile | 7 ++ binding.gyp | 3 + build.yaml | 10 ++ config.m4 | 5 + gRPC.podspec | 8 ++ grpc.def | 1 + grpc.gemspec | 6 ++ package.xml | 6 ++ .../client/secure/cronet_channel_create.c | 3 - .../cronet/transport/cronet_api_dummy.c | 91 +++++++++++++++++++ .../cronet/transport/cronet_transport.c | 6 +- .../grpcio/grpc/_cython/imports.generated.c | 2 + .../grpcio/grpc/_cython/imports.generated.h | 4 + src/python/grpcio/grpc_core_dependencies.py | 3 + src/ruby/ext/grpc/rb_grpc_imports.generated.c | 2 + src/ruby/ext/grpc/rb_grpc_imports.generated.h | 4 + .../core/surface/public_headers_must_be_c89.c | 1 + tools/doxygen/Doxyfile.core | 1 + tools/doxygen/Doxyfile.core.internal | 6 ++ tools/run_tests/sources_and_headers.json | 22 ++++- vsprojects/vcxproj/grpc/grpc.vcxproj | 9 ++ vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 39 ++++++++ 23 files changed, 243 insertions(+), 8 deletions(-) create mode 100644 src/core/ext/transport/cronet/transport/cronet_api_dummy.c diff --git a/BUILD b/BUILD index b4b10b535e8..2e1d762f079 100644 --- a/BUILD +++ b/BUILD @@ -285,6 +285,8 @@ cc_library( "src/core/ext/client_config/subchannel_call_holder.h", "src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/uri_parser.h", + "include/grpc/support/port_platform.h", + "third_party/objective_c/Cronet/cronet_c_for_grpc.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", "src/core/ext/census/aggregation.h", @@ -439,6 +441,9 @@ cc_library( "src/core/ext/client_config/uri_parser.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", + "src/core/ext/transport/cronet/client/secure/cronet_channel_create.c", + "src/core/ext/transport/cronet/transport/cronet_api_dummy.c", + "src/core/ext/transport/cronet/transport/cronet_transport.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", @@ -482,6 +487,7 @@ cc_library( "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/time.h", + "include/grpc/grpc_cronet.h", "include/grpc/grpc_security.h", "include/grpc/grpc_security_constants.h", "include/grpc/census.h", @@ -1456,6 +1462,9 @@ objc_library( "src/core/ext/client_config/uri_parser.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", + "src/core/ext/transport/cronet/client/secure/cronet_channel_create.c", + "src/core/ext/transport/cronet/transport/cronet_api_dummy.c", + "src/core/ext/transport/cronet/transport/cronet_transport.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", @@ -1499,6 +1508,7 @@ objc_library( "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/time.h", + "include/grpc/grpc_cronet.h", "include/grpc/grpc_security.h", "include/grpc/grpc_security_constants.h", "include/grpc/census.h", @@ -1626,6 +1636,8 @@ objc_library( "src/core/ext/client_config/subchannel_call_holder.h", "src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/uri_parser.h", + "include/grpc/support/port_platform.h", + "third_party/objective_c/Cronet/cronet_c_for_grpc.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", "src/core/ext/census/aggregation.h", diff --git a/Makefile b/Makefile index 922e0b0568f..c6fd3b40f78 100644 --- a/Makefile +++ b/Makefile @@ -2623,6 +2623,9 @@ LIBGRPC_SRC = \ src/core/ext/client_config/uri_parser.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ + src/core/ext/transport/cronet/client/secure/cronet_channel_create.c \ + src/core/ext/transport/cronet/transport/cronet_api_dummy.c \ + src/core/ext/transport/cronet/transport/cronet_transport.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ @@ -2669,6 +2672,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_win32.h \ include/grpc/impl/codegen/time.h \ + include/grpc/grpc_cronet.h \ include/grpc/grpc_security.h \ include/grpc/grpc_security_constants.h \ include/grpc/census.h \ @@ -14313,6 +14317,9 @@ ifneq ($(OPENSSL_DEP),) # otherwise parallel compilation will fail if a source is compiled first. src/core/ext/transport/chttp2/client/secure/secure_channel_create.c: $(OPENSSL_DEP) src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c: $(OPENSSL_DEP) +src/core/ext/transport/cronet/client/secure/cronet_channel_create.c: $(OPENSSL_DEP) +src/core/ext/transport/cronet/transport/cronet_api_dummy.c: $(OPENSSL_DEP) +src/core/ext/transport/cronet/transport/cronet_transport.c: $(OPENSSL_DEP) src/core/lib/http/httpcli_security_connector.c: $(OPENSSL_DEP) src/core/lib/security/b64.c: $(OPENSSL_DEP) src/core/lib/security/client_auth_filter.c: $(OPENSSL_DEP) diff --git a/binding.gyp b/binding.gyp index 4314ab7243d..12a745ffb01 100644 --- a/binding.gyp +++ b/binding.gyp @@ -709,6 +709,9 @@ 'src/core/ext/client_config/uri_parser.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', + 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.c', + 'src/core/ext/transport/cronet/transport/cronet_api_dummy.c', + 'src/core/ext/transport/cronet/transport/cronet_transport.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c', 'third_party/nanopb/pb_common.c', diff --git a/build.yaml b/build.yaml index 441752dc3dc..a7ab412722c 100644 --- a/build.yaml +++ b/build.yaml @@ -399,6 +399,7 @@ filegroups: - grpc_client_config - name: grpc_secure public_headers: + - include/grpc/grpc_cronet.h - include/grpc/grpc_security.h - include/grpc/grpc_security_constants.h headers: @@ -546,6 +547,14 @@ filegroups: - grpc_transport_chttp2 - grpc_base - grpc_secure +- name: grpc_transport_cronet_client_secure + headers: + - include/grpc/support/port_platform.h + - third_party/objective_c/Cronet/cronet_c_for_grpc.h + src: + - src/core/ext/transport/cronet/client/secure/cronet_channel_create.c + - src/core/ext/transport/cronet/transport/cronet_api_dummy.c + - src/core/ext/transport/cronet/transport/cronet_transport.c - name: nanopb headers: - third_party/nanopb/pb.h @@ -733,6 +742,7 @@ libs: - grpc_transport_chttp2_client_secure - grpc_transport_chttp2_server_insecure - grpc_transport_chttp2_client_insecure + - grpc_transport_cronet_client_secure - grpc_lb_policy_grpclb - grpc_lb_policy_pick_first - grpc_lb_policy_round_robin diff --git a/config.m4 b/config.m4 index 74f9ad242ab..5259e679ba9 100644 --- a/config.m4 +++ b/config.m4 @@ -228,6 +228,9 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/client_config/uri_parser.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ + src/core/ext/transport/cronet/client/secure/cronet_channel_create.c \ + src/core/ext/transport/cronet/transport/cronet_api_dummy.c \ + src/core/ext/transport/cronet/transport/cronet_transport.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ @@ -566,6 +569,8 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/server/insecure) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/server/secure) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/transport) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/cronet/client/secure) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/cronet/transport) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/channel) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/compression) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/debug) diff --git a/gRPC.podspec b/gRPC.podspec index 77d35bd2c79..f57ba745194 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -287,6 +287,8 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/subchannel_call_holder.h', 'src/core/ext/client_config/subchannel_index.h', 'src/core/ext/client_config/uri_parser.h', + 'include/grpc/support/port_platform.h', + 'third_party/objective_c/Cronet/cronet_c_for_grpc.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h', 'third_party/nanopb/pb.h', @@ -324,6 +326,7 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/sync_posix.h', 'include/grpc/impl/codegen/sync_win32.h', 'include/grpc/impl/codegen/time.h', + 'include/grpc/grpc_cronet.h', 'include/grpc/grpc_security.h', 'include/grpc/grpc_security_constants.h', 'include/grpc/census.h', @@ -473,6 +476,9 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/uri_parser.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', + 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.c', + 'src/core/ext/transport/cronet/transport/cronet_api_dummy.c', + 'src/core/ext/transport/cronet/transport/cronet_transport.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c', 'third_party/nanopb/pb_common.c', @@ -629,6 +635,8 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/subchannel_call_holder.h', 'src/core/ext/client_config/subchannel_index.h', 'src/core/ext/client_config/uri_parser.h', + 'include/grpc/support/port_platform.h', + 'third_party/objective_c/Cronet/cronet_c_for_grpc.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h', 'third_party/nanopb/pb.h', diff --git a/grpc.def b/grpc.def index 61948ed1b89..09a94a6cd0c 100644 --- a/grpc.def +++ b/grpc.def @@ -87,6 +87,7 @@ EXPORTS grpc_header_nonbin_value_is_legal grpc_is_binary_header grpc_call_error_to_string + grpc_cronet_secure_channel_create grpc_auth_property_iterator_next grpc_auth_context_property_iterator grpc_auth_context_peer_identity diff --git a/grpc.gemspec b/grpc.gemspec index e68cd81da7a..488f4657cdc 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -168,6 +168,7 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/impl/codegen/sync_posix.h ) s.files += %w( include/grpc/impl/codegen/sync_win32.h ) s.files += %w( include/grpc/impl/codegen/time.h ) + s.files += %w( include/grpc/grpc_cronet.h ) s.files += %w( include/grpc/grpc_security.h ) s.files += %w( include/grpc/grpc_security_constants.h ) s.files += %w( include/grpc/census.h ) @@ -295,6 +296,8 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_config/subchannel_call_holder.h ) s.files += %w( src/core/ext/client_config/subchannel_index.h ) s.files += %w( src/core/ext/client_config/uri_parser.h ) + s.files += %w( include/grpc/support/port_platform.h ) + s.files += %w( third_party/objective_c/Cronet/cronet_c_for_grpc.h ) s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.h ) s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h ) s.files += %w( third_party/nanopb/pb.h ) @@ -453,6 +456,9 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_config/uri_parser.c ) s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2.c ) s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create.c ) + s.files += %w( src/core/ext/transport/cronet/client/secure/cronet_channel_create.c ) + s.files += %w( src/core/ext/transport/cronet/transport/cronet_api_dummy.c ) + s.files += %w( src/core/ext/transport/cronet/transport/cronet_transport.c ) s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.c ) s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c ) s.files += %w( third_party/nanopb/pb_common.c ) diff --git a/package.xml b/package.xml index ffb1c56ed64..e8fd375eb60 100644 --- a/package.xml +++ b/package.xml @@ -175,6 +175,7 @@ + @@ -302,6 +303,8 @@ + + @@ -460,6 +463,9 @@ + + + diff --git a/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c b/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c index a6cb1f70a70..df1acddcc08 100644 --- a/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c +++ b/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c @@ -33,8 +33,6 @@ #include -#ifdef GRPC_COMPILE_WITH_CRONET - #include #include @@ -69,4 +67,3 @@ GRPCAPI grpc_channel *grpc_cronet_secure_channel_create( return grpc_channel_create(&exec_ctx, target, args, GRPC_CLIENT_DIRECT_CHANNEL, (grpc_transport *)ct); } -#endif // GRPC_COMPILE_WITH_CRONET diff --git a/src/core/ext/transport/cronet/transport/cronet_api_dummy.c b/src/core/ext/transport/cronet/transport/cronet_api_dummy.c new file mode 100644 index 00000000000..200f9f7daaa --- /dev/null +++ b/src/core/ext/transport/cronet/transport/cronet_api_dummy.c @@ -0,0 +1,91 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* This file has empty implementation of all the functions exposed by the cronet +library, so we can build it in all environments */ + +#include + +#include + +#include "third_party/objective_c/Cronet/cronet_c_for_grpc.h" + +#ifdef GRPC_COMPILE_WITH_CRONET + /* link with the real CRONET library in the build system */ +#else + /* Dummy implementation of cronet API just to test for build-ability */ +cronet_bidirectional_stream* cronet_bidirectional_stream_create( + cronet_engine* engine, + void* annotation, + cronet_bidirectional_stream_callback* callback) { + GPR_ASSERT(0); + return NULL; +} + +int cronet_bidirectional_stream_destroy(cronet_bidirectional_stream* stream) { + GPR_ASSERT(0); + return 0; +} + +int cronet_bidirectional_stream_start( + cronet_bidirectional_stream* stream, + const char* url, + int priority, + const char* method, + const cronet_bidirectional_stream_header_array* headers, + bool end_of_stream) { + GPR_ASSERT(0); + return 0; +} + +int cronet_bidirectional_stream_read(cronet_bidirectional_stream* stream, + char* buffer, + int capacity) { + GPR_ASSERT(0); + return 0; +} + +int cronet_bidirectional_stream_write(cronet_bidirectional_stream* stream, + const char* buffer, + int count, + bool end_of_stream) { + GPR_ASSERT(0); + return 0; +} + +int cronet_bidirectional_stream_cancel(cronet_bidirectional_stream* stream) { + GPR_ASSERT(0); + return 0; +} + +#endif /* GRPC_COMPILE_WITH_CRONET */ diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index d337e84606b..64bd5f5778d 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -49,8 +49,6 @@ #include "src/core/lib/transport/transport_impl.h" #include "third_party/objective_c/Cronet/cronet_c_for_grpc.h" -#ifdef GRPC_COMPILE_WITH_CRONET - #define GRPC_HEADER_SIZE_IN_BYTES 5 // Global flag that gets set with GRPC_TRACE env variable @@ -613,7 +611,7 @@ static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, } static void destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, - grpc_stream *gs) { + grpc_stream *gs, void *and_free_memory) { if (grpc_cronet_trace) { gpr_log(GPR_DEBUG, "Destroy stream"); } @@ -623,6 +621,7 @@ static void destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, gpr_free(s->write_buffer); gpr_free(s->url); gpr_mu_destroy(&s->recv_mu); + if (and_free_memory) { gpr_free(and_free_memory); } } static void destroy_transport(grpc_exec_ctx *exec_ctx, grpc_transport *gt) { @@ -637,4 +636,3 @@ const grpc_transport_vtable grpc_cronet_vtable = { sizeof(stream_obj), "cronet_http", init_stream, set_pollset_do_nothing, perform_stream_op, NULL, destroy_stream, destroy_transport, NULL}; -#endif // GRPC_COMPILE_WITH_CRONET diff --git a/src/python/grpcio/grpc/_cython/imports.generated.c b/src/python/grpcio/grpc/_cython/imports.generated.c index f0a40dbb35c..09551472b5f 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.c +++ b/src/python/grpcio/grpc/_cython/imports.generated.c @@ -125,6 +125,7 @@ grpc_header_key_is_legal_type grpc_header_key_is_legal_import; grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_import; grpc_is_binary_header_type grpc_is_binary_header_import; grpc_call_error_to_string_type grpc_call_error_to_string_import; +grpc_cronet_secure_channel_create_type grpc_cronet_secure_channel_create_import; grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import; grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import; @@ -395,6 +396,7 @@ void pygrpc_load_imports(HMODULE library) { grpc_header_nonbin_value_is_legal_import = (grpc_header_nonbin_value_is_legal_type) GetProcAddress(library, "grpc_header_nonbin_value_is_legal"); grpc_is_binary_header_import = (grpc_is_binary_header_type) GetProcAddress(library, "grpc_is_binary_header"); grpc_call_error_to_string_import = (grpc_call_error_to_string_type) GetProcAddress(library, "grpc_call_error_to_string"); + grpc_cronet_secure_channel_create_import = (grpc_cronet_secure_channel_create_type) GetProcAddress(library, "grpc_cronet_secure_channel_create"); grpc_auth_property_iterator_next_import = (grpc_auth_property_iterator_next_type) GetProcAddress(library, "grpc_auth_property_iterator_next"); grpc_auth_context_property_iterator_import = (grpc_auth_context_property_iterator_type) GetProcAddress(library, "grpc_auth_context_property_iterator"); grpc_auth_context_peer_identity_import = (grpc_auth_context_peer_identity_type) GetProcAddress(library, "grpc_auth_context_peer_identity"); diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index d5e810b7cf4..54c8aaad13e 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -325,6 +326,9 @@ extern grpc_is_binary_header_type grpc_is_binary_header_import; typedef const char *(*grpc_call_error_to_string_type)(grpc_call_error error); extern grpc_call_error_to_string_type grpc_call_error_to_string_import; #define grpc_call_error_to_string grpc_call_error_to_string_import +typedef grpc_channel *(*grpc_cronet_secure_channel_create_type)(void *engine, const char *target, const grpc_channel_args *args, void *reserved); +extern grpc_cronet_secure_channel_create_type grpc_cronet_secure_channel_create_import; +#define grpc_cronet_secure_channel_create grpc_cronet_secure_channel_create_import typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); extern grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; #define grpc_auth_property_iterator_next grpc_auth_property_iterator_next_import diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index dab62530aac..5314329c2cb 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -222,6 +222,9 @@ CORE_SOURCE_FILES = [ 'src/core/ext/client_config/uri_parser.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', + 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.c', + 'src/core/ext/transport/cronet/transport/cronet_api_dummy.c', + 'src/core/ext/transport/cronet/transport/cronet_transport.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c', 'third_party/nanopb/pb_common.c', diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index bc43f9d36b5..cebbe8c40fe 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -125,6 +125,7 @@ grpc_header_key_is_legal_type grpc_header_key_is_legal_import; grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_import; grpc_is_binary_header_type grpc_is_binary_header_import; grpc_call_error_to_string_type grpc_call_error_to_string_import; +grpc_cronet_secure_channel_create_type grpc_cronet_secure_channel_create_import; grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import; grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import; @@ -391,6 +392,7 @@ void grpc_rb_load_imports(HMODULE library) { grpc_header_nonbin_value_is_legal_import = (grpc_header_nonbin_value_is_legal_type) GetProcAddress(library, "grpc_header_nonbin_value_is_legal"); grpc_is_binary_header_import = (grpc_is_binary_header_type) GetProcAddress(library, "grpc_is_binary_header"); grpc_call_error_to_string_import = (grpc_call_error_to_string_type) GetProcAddress(library, "grpc_call_error_to_string"); + grpc_cronet_secure_channel_create_import = (grpc_cronet_secure_channel_create_type) GetProcAddress(library, "grpc_cronet_secure_channel_create"); grpc_auth_property_iterator_next_import = (grpc_auth_property_iterator_next_type) GetProcAddress(library, "grpc_auth_property_iterator_next"); grpc_auth_context_property_iterator_import = (grpc_auth_context_property_iterator_type) GetProcAddress(library, "grpc_auth_context_property_iterator"); grpc_auth_context_peer_identity_import = (grpc_auth_context_peer_identity_type) GetProcAddress(library, "grpc_auth_context_peer_identity"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index b67361ca25b..d7ea6c574c8 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -325,6 +326,9 @@ extern grpc_is_binary_header_type grpc_is_binary_header_import; typedef const char *(*grpc_call_error_to_string_type)(grpc_call_error error); extern grpc_call_error_to_string_type grpc_call_error_to_string_import; #define grpc_call_error_to_string grpc_call_error_to_string_import +typedef grpc_channel *(*grpc_cronet_secure_channel_create_type)(void *engine, const char *target, const grpc_channel_args *args, void *reserved); +extern grpc_cronet_secure_channel_create_type grpc_cronet_secure_channel_create_import; +#define grpc_cronet_secure_channel_create grpc_cronet_secure_channel_create_import typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); extern grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; #define grpc_auth_property_iterator_next grpc_auth_property_iterator_next_import diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c index 0eede6c23bd..65f3e1738a4 100644 --- a/test/core/surface/public_headers_must_be_c89.c +++ b/test/core/surface/public_headers_must_be_c89.c @@ -36,6 +36,7 @@ #include #include #include +#include #include #include #include diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index 034d9c6e6f4..a582d76a58f 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -785,6 +785,7 @@ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_win32.h \ include/grpc/impl/codegen/time.h \ +include/grpc/grpc_cronet.h \ include/grpc/grpc_security.h \ include/grpc/grpc_security_constants.h \ include/grpc/census.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 1b1453f7ea2..16dcd9b79a7 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -785,6 +785,7 @@ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_win32.h \ include/grpc/impl/codegen/time.h \ +include/grpc/grpc_cronet.h \ include/grpc/grpc_security.h \ include/grpc/grpc_security_constants.h \ include/grpc/census.h \ @@ -912,6 +913,8 @@ src/core/ext/client_config/subchannel.h \ src/core/ext/client_config/subchannel_call_holder.h \ src/core/ext/client_config/subchannel_index.h \ src/core/ext/client_config/uri_parser.h \ +include/grpc/support/port_platform.h \ +third_party/objective_c/Cronet/cronet_c_for_grpc.h \ src/core/ext/lb_policy/grpclb/load_balancer_api.h \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h \ third_party/nanopb/pb.h \ @@ -1070,6 +1073,9 @@ src/core/ext/client_config/subchannel_index.c \ src/core/ext/client_config/uri_parser.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ +src/core/ext/transport/cronet/client/secure/cronet_channel_create.c \ +src/core/ext/transport/cronet/transport/cronet_api_dummy.c \ +src/core/ext/transport/cronet/transport/cronet_transport.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index f546f3b9950..e22318d2387 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4140,7 +4140,8 @@ "grpc_transport_chttp2_client_insecure", "grpc_transport_chttp2_client_secure", "grpc_transport_chttp2_server_insecure", - "grpc_transport_chttp2_server_secure" + "grpc_transport_chttp2_server_secure", + "grpc_transport_cronet_client_secure" ], "headers": [], "language": "c", @@ -6012,6 +6013,7 @@ "tsi" ], "headers": [ + "include/grpc/grpc_cronet.h", "include/grpc/grpc_security.h", "include/grpc/grpc_security_constants.h", "src/core/lib/security/auth_filters.h", @@ -6027,6 +6029,7 @@ "language": "c", "name": "grpc_secure", "src": [ + "include/grpc/grpc_cronet.h", "include/grpc/grpc_security.h", "include/grpc/grpc_security_constants.h", "src/core/lib/http/httpcli_security_connector.c", @@ -6262,6 +6265,23 @@ "third_party": false, "type": "filegroup" }, + { + "deps": [], + "headers": [ + "include/grpc/support/port_platform.h", + "third_party/objective_c/Cronet/cronet_c_for_grpc.h" + ], + "language": "c", + "name": "grpc_transport_cronet_client_secure", + "src": [ + "include/grpc/support/port_platform.h", + "src/core/ext/transport/cronet/client/secure/cronet_channel_create.c", + "src/core/ext/transport/cronet/transport/cronet_api_dummy.c", + "src/core/ext/transport/cronet/transport/cronet_transport.c" + ], + "third_party": false, + "type": "filegroup" + }, { "deps": [], "headers": [ diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 4eec05a3b1f..cbf854875a6 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -292,6 +292,7 @@ + @@ -421,6 +422,8 @@ + + @@ -727,6 +730,12 @@ + + + + + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 17c88c4805e..02297b7746a 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -439,6 +439,15 @@ src\core\ext\transport\chttp2\client\insecure + + src\core\ext\transport\cronet\client\secure + + + src\core\ext\transport\cronet\transport + + + src\core\ext\transport\cronet\transport + src\core\ext\lb_policy\grpclb @@ -573,6 +582,9 @@ include\grpc\impl\codegen + + include\grpc + include\grpc @@ -956,6 +968,12 @@ src\core\ext\client_config + + include\grpc\support + + + third_party\objective_c\Cronet + src\core\ext\lb_policy\grpclb @@ -1007,6 +1025,9 @@ {def748f5-ed2a-a9bb-40d9-c31d00f0e13b} + + {31de82ea-dc6c-73fb-a640-979b8a7b240c} + {d538af37-07b2-062b-fa2a-d9f882cb2737} @@ -1088,6 +1109,18 @@ {6f34254e-e69f-c9b4-156d-5024bade5408} + + {1e9c85e9-5522-7ef8-0017-7e19990a6194} + + + {d0530883-75d9-b5f7-d594-26735a70ac7b} + + + {4fa6fe90-b7a8-5c8f-d629-db1e68d89eed} + + + {31518af8-5860-6d0d-ff78-4059fce29ec2} + {5b2ded3f-84a5-f6b4-2060-286c7d1dc945} @@ -1130,6 +1163,12 @@ {93d6596d-330c-1d27-6f84-3c840e57869e} + + {3a56a516-857e-d2aa-95cc-11685baf4e8c} + + + {a165c6e3-0776-6f40-7351-d7865668e220} + From 6504c02568da17113c8ebce408245054ca19f0a3 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 3 May 2016 17:46:49 -0700 Subject: [PATCH 0238/1894] remove useless code and todos --- src/csharp/Grpc.Core/Internal/ServerCallHandler.cs | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs b/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs index bf9df9f783b..00d82d51e82 100644 --- a/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs +++ b/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs @@ -80,8 +80,6 @@ namespace Grpc.Core.Internal { GrpcPreconditions.CheckArgument(await requestStream.MoveNext().ConfigureAwait(false)); var request = requestStream.Current; - // TODO(jtattermusch): we need to read the full stream so that native callhandle gets deallocated. - GrpcPreconditions.CheckArgument(!await requestStream.MoveNext().ConfigureAwait(false)); var result = await handler(request, context).ConfigureAwait(false); status = context.Status; await responseStream.WriteAsync(result).ConfigureAwait(false); @@ -136,8 +134,6 @@ namespace Grpc.Core.Internal { GrpcPreconditions.CheckArgument(await requestStream.MoveNext().ConfigureAwait(false)); var request = requestStream.Current; - // TODO(jtattermusch): we need to read the full stream so that native callhandle gets deallocated. - GrpcPreconditions.CheckArgument(!await requestStream.MoveNext().ConfigureAwait(false)); await handler(request, responseStream, context).ConfigureAwait(false); status = context.Status; } @@ -298,7 +294,6 @@ namespace Grpc.Core.Internal return rpcException.Status; } - // TODO(jtattermusch): what is the right status code here? return new Status(StatusCode.Unknown, "Exception was thrown by handler."); } From f72eb97b3640cb3f99336b34b707c853c6db6ac0 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 3 May 2016 18:28:09 -0700 Subject: [PATCH 0239/1894] Introduced grpc_pops (pollset or pollset_set) --- BUILD | 12 +- Makefile | 4 +- binding.gyp | 2 +- build.yaml | 12 +- config.m4 | 3 +- gRPC.podspec | 6 +- grpc.gemspec | 4 +- package.xml | 4 +- src/core/ext/client_config/client_channel.c | 16 +-- src/core/ext/client_config/lb_policy.c | 7 +- src/core/ext/client_config/lb_policy.h | 8 +- src/core/ext/client_config/subchannel.c | 5 +- src/core/ext/client_config/subchannel.h | 3 +- .../client_config/subchannel_call_holder.c | 6 +- .../client_config/subchannel_call_holder.h | 4 +- src/core/ext/lb_policy/common.c | 62 ----------- .../ext/lb_policy/pick_first/pick_first.c | 34 ++---- .../ext/lb_policy/round_robin/round_robin.c | 29 ++--- src/core/lib/channel/channel_stack.c | 18 ++- src/core/lib/channel/channel_stack.h | 22 ++-- src/core/lib/channel/connected_channel.c | 19 +--- src/core/lib/http/httpcli.c | 31 +++--- src/core/lib/http/httpcli.h | 7 +- src/core/lib/iomgr/pops.c | 103 ++++++++++++++++++ .../lb_policy/common.h => lib/iomgr/pops.h} | 41 +++++-- src/core/lib/security/client_auth_filter.c | 26 ++--- src/core/lib/security/credentials.c | 62 +++++------ src/core/lib/security/credentials.h | 12 +- .../lib/security/google_default_credentials.c | 28 ++--- src/core/lib/security/jwt_verifier.c | 12 +- src/core/lib/surface/call.c | 34 +++--- src/core/lib/transport/transport.c | 23 ++-- src/core/lib/transport/transport.h | 11 +- src/python/grpcio/grpc_core_dependencies.py | 2 +- test/core/http/httpcli_test.c | 33 +++--- test/core/http/httpscli_test.c | 34 +++--- test/core/security/oauth2_utils.c | 26 ++--- .../print_google_default_creds_token.c | 20 ++-- test/core/util/port_server_client.c | 58 +++++----- tools/doxygen/Doxyfile.core.internal | 4 +- tools/run_tests/sources_and_headers.json | 27 +---- vsprojects/vcxproj/grpc/grpc.vcxproj | 6 +- vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 12 +- .../grpc_unsecure/grpc_unsecure.vcxproj | 6 +- .../grpc_unsecure.vcxproj.filters | 12 +- 45 files changed, 439 insertions(+), 471 deletions(-) delete mode 100644 src/core/ext/lb_policy/common.c create mode 100644 src/core/lib/iomgr/pops.c rename src/core/{ext/lb_policy/common.h => lib/iomgr/pops.h} (55%) diff --git a/BUILD b/BUILD index b24be86276e..ce7ad0335f3 100644 --- a/BUILD +++ b/BUILD @@ -190,6 +190,7 @@ cc_library( "src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/pops.h", "src/core/lib/iomgr/resolve_address.h", "src/core/lib/iomgr/sockaddr.h", "src/core/lib/iomgr/sockaddr_posix.h", @@ -287,7 +288,6 @@ cc_library( "src/core/ext/client_config/uri_parser.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", - "src/core/ext/lb_policy/common.h", "src/core/ext/census/aggregation.h", "src/core/ext/census/census_interface.h", "src/core/ext/census/census_rpc_stats.h", @@ -322,6 +322,7 @@ cc_library( "src/core/lib/iomgr/iomgr_windows.c", "src/core/lib/iomgr/pollset_set_windows.c", "src/core/lib/iomgr/pollset_windows.c", + "src/core/lib/iomgr/pops.c", "src/core/lib/iomgr/resolve_address_posix.c", "src/core/lib/iomgr/resolve_address_windows.c", "src/core/lib/iomgr/sockaddr_utils.c", @@ -442,7 +443,6 @@ cc_library( "src/core/ext/transport/chttp2/client/insecure/channel_create.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c", - "src/core/ext/lb_policy/common.c", "src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/round_robin/round_robin.c", "src/core/ext/resolver/dns/native/dns_resolver.c", @@ -537,6 +537,7 @@ cc_library( "src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/pops.h", "src/core/lib/iomgr/resolve_address.h", "src/core/lib/iomgr/sockaddr.h", "src/core/lib/iomgr/sockaddr_posix.h", @@ -620,7 +621,6 @@ cc_library( "src/core/ext/client_config/uri_parser.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", - "src/core/ext/lb_policy/common.h", "src/core/ext/census/aggregation.h", "src/core/ext/census/census_interface.h", "src/core/ext/census/census_rpc_stats.h", @@ -656,6 +656,7 @@ cc_library( "src/core/lib/iomgr/iomgr_windows.c", "src/core/lib/iomgr/pollset_set_windows.c", "src/core/lib/iomgr/pollset_windows.c", + "src/core/lib/iomgr/pops.c", "src/core/lib/iomgr/resolve_address_posix.c", "src/core/lib/iomgr/resolve_address_windows.c", "src/core/lib/iomgr/sockaddr_utils.c", @@ -757,7 +758,6 @@ cc_library( "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c", - "src/core/ext/lb_policy/common.c", "src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/round_robin/round_robin.c", "src/core/ext/census/context.c", @@ -1342,6 +1342,7 @@ objc_library( "src/core/lib/iomgr/iomgr_windows.c", "src/core/lib/iomgr/pollset_set_windows.c", "src/core/lib/iomgr/pollset_windows.c", + "src/core/lib/iomgr/pops.c", "src/core/lib/iomgr/resolve_address_posix.c", "src/core/lib/iomgr/resolve_address_windows.c", "src/core/lib/iomgr/sockaddr_utils.c", @@ -1462,7 +1463,6 @@ objc_library( "src/core/ext/transport/chttp2/client/insecure/channel_create.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c", - "src/core/ext/lb_policy/common.c", "src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/round_robin/round_robin.c", "src/core/ext/resolver/dns/native/dns_resolver.c", @@ -1536,6 +1536,7 @@ objc_library( "src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/pops.h", "src/core/lib/iomgr/resolve_address.h", "src/core/lib/iomgr/sockaddr.h", "src/core/lib/iomgr/sockaddr_posix.h", @@ -1633,7 +1634,6 @@ objc_library( "src/core/ext/client_config/uri_parser.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", - "src/core/ext/lb_policy/common.h", "src/core/ext/census/aggregation.h", "src/core/ext/census/census_interface.h", "src/core/ext/census/census_rpc_stats.h", diff --git a/Makefile b/Makefile index 614c46e5808..08a74af9950 100644 --- a/Makefile +++ b/Makefile @@ -2505,6 +2505,7 @@ LIBGRPC_SRC = \ src/core/lib/iomgr/iomgr_windows.c \ src/core/lib/iomgr/pollset_set_windows.c \ src/core/lib/iomgr/pollset_windows.c \ + src/core/lib/iomgr/pops.c \ src/core/lib/iomgr/resolve_address_posix.c \ src/core/lib/iomgr/resolve_address_windows.c \ src/core/lib/iomgr/sockaddr_utils.c \ @@ -2628,7 +2629,6 @@ LIBGRPC_SRC = \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ - src/core/ext/lb_policy/common.c \ src/core/ext/lb_policy/pick_first/pick_first.c \ src/core/ext/lb_policy/round_robin/round_robin.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ @@ -2847,6 +2847,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/iomgr/iomgr_windows.c \ src/core/lib/iomgr/pollset_set_windows.c \ src/core/lib/iomgr/pollset_windows.c \ + src/core/lib/iomgr/pops.c \ src/core/lib/iomgr/resolve_address_posix.c \ src/core/lib/iomgr/resolve_address_windows.c \ src/core/lib/iomgr/sockaddr_utils.c \ @@ -2951,7 +2952,6 @@ LIBGRPC_UNSECURE_SRC = \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ - src/core/ext/lb_policy/common.c \ src/core/ext/lb_policy/pick_first/pick_first.c \ src/core/ext/lb_policy/round_robin/round_robin.c \ src/core/ext/census/context.c \ diff --git a/binding.gyp b/binding.gyp index 92ab280da07..348c05e5aa6 100644 --- a/binding.gyp +++ b/binding.gyp @@ -591,6 +591,7 @@ 'src/core/lib/iomgr/iomgr_windows.c', 'src/core/lib/iomgr/pollset_set_windows.c', 'src/core/lib/iomgr/pollset_windows.c', + 'src/core/lib/iomgr/pops.c', 'src/core/lib/iomgr/resolve_address_posix.c', 'src/core/lib/iomgr/resolve_address_windows.c', 'src/core/lib/iomgr/sockaddr_utils.c', @@ -714,7 +715,6 @@ 'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c', - 'src/core/ext/lb_policy/common.c', 'src/core/ext/lb_policy/pick_first/pick_first.c', 'src/core/ext/lb_policy/round_robin/round_robin.c', 'src/core/ext/resolver/dns/native/dns_resolver.c', diff --git a/build.yaml b/build.yaml index 13e44e78b2a..834a53bf0eb 100644 --- a/build.yaml +++ b/build.yaml @@ -177,6 +177,7 @@ filegroups: - src/core/lib/iomgr/pollset_set.h - src/core/lib/iomgr/pollset_set_windows.h - src/core/lib/iomgr/pollset_windows.h + - src/core/lib/iomgr/pops.h - src/core/lib/iomgr/resolve_address.h - src/core/lib/iomgr/sockaddr.h - src/core/lib/iomgr/sockaddr_posix.h @@ -249,6 +250,7 @@ filegroups: - src/core/lib/iomgr/iomgr_windows.c - src/core/lib/iomgr/pollset_set_windows.c - src/core/lib/iomgr/pollset_windows.c + - src/core/lib/iomgr/pops.c - src/core/lib/iomgr/resolve_address_posix.c - src/core/lib/iomgr/resolve_address_windows.c - src/core/lib/iomgr/sockaddr_utils.c @@ -358,13 +360,6 @@ filegroups: - include/grpc/impl/codegen/status.h uses: - gpr_codegen -- name: grpc_lb_policy_common - headers: - - src/core/ext/lb_policy/common.h - src: - - src/core/ext/lb_policy/common.c - uses: - - grpc_base - name: grpc_lb_policy_grpclb headers: - src/core/ext/lb_policy/grpclb/load_balancer_api.h @@ -376,7 +371,6 @@ filegroups: - grpc_base - grpc_client_config - nanopb - - grpc_lb_policy_common - name: grpc_lb_policy_pick_first src: - src/core/ext/lb_policy/pick_first/pick_first.c @@ -384,7 +378,6 @@ filegroups: uses: - grpc_base - grpc_client_config - - grpc_lb_policy_common - name: grpc_lb_policy_round_robin src: - src/core/ext/lb_policy/round_robin/round_robin.c @@ -392,7 +385,6 @@ filegroups: uses: - grpc_base - grpc_client_config - - grpc_lb_policy_common - name: grpc_resolver_dns_native src: - src/core/ext/resolver/dns/native/dns_resolver.c diff --git a/config.m4 b/config.m4 index ea641d6cfae..9bbbd7140d8 100644 --- a/config.m4 +++ b/config.m4 @@ -110,6 +110,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/iomgr/iomgr_windows.c \ src/core/lib/iomgr/pollset_set_windows.c \ src/core/lib/iomgr/pollset_windows.c \ + src/core/lib/iomgr/pops.c \ src/core/lib/iomgr/resolve_address_posix.c \ src/core/lib/iomgr/resolve_address_windows.c \ src/core/lib/iomgr/sockaddr_utils.c \ @@ -233,7 +234,6 @@ if test "$PHP_GRPC" != "no"; then third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ - src/core/ext/lb_policy/common.c \ src/core/ext/lb_policy/pick_first/pick_first.c \ src/core/ext/lb_policy/round_robin/round_robin.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ @@ -555,7 +555,6 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/boringssl) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/census) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/client_config) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/grpclb) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/lb_policy/pick_first) diff --git a/gRPC.podspec b/gRPC.podspec index 67079ec2d66..fef73cae0ce 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -192,6 +192,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/pollset_set.h', 'src/core/lib/iomgr/pollset_set_windows.h', 'src/core/lib/iomgr/pollset_windows.h', + 'src/core/lib/iomgr/pops.h', 'src/core/lib/iomgr/resolve_address.h', 'src/core/lib/iomgr/sockaddr.h', 'src/core/lib/iomgr/sockaddr_posix.h', @@ -293,7 +294,6 @@ Pod::Spec.new do |s| 'third_party/nanopb/pb_common.h', 'third_party/nanopb/pb_decode.h', 'third_party/nanopb/pb_encode.h', - 'src/core/ext/lb_policy/common.h', 'src/core/ext/census/aggregation.h', 'src/core/ext/census/census_interface.h', 'src/core/ext/census/census_rpc_stats.h', @@ -356,6 +356,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/iomgr_windows.c', 'src/core/lib/iomgr/pollset_set_windows.c', 'src/core/lib/iomgr/pollset_windows.c', + 'src/core/lib/iomgr/pops.c', 'src/core/lib/iomgr/resolve_address_posix.c', 'src/core/lib/iomgr/resolve_address_windows.c', 'src/core/lib/iomgr/sockaddr_utils.c', @@ -479,7 +480,6 @@ Pod::Spec.new do |s| 'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c', - 'src/core/ext/lb_policy/common.c', 'src/core/ext/lb_policy/pick_first/pick_first.c', 'src/core/ext/lb_policy/round_robin/round_robin.c', 'src/core/ext/resolver/dns/native/dns_resolver.c', @@ -536,6 +536,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/pollset_set.h', 'src/core/lib/iomgr/pollset_set_windows.h', 'src/core/lib/iomgr/pollset_windows.h', + 'src/core/lib/iomgr/pops.h', 'src/core/lib/iomgr/resolve_address.h', 'src/core/lib/iomgr/sockaddr.h', 'src/core/lib/iomgr/sockaddr_posix.h', @@ -637,7 +638,6 @@ Pod::Spec.new do |s| 'third_party/nanopb/pb_common.h', 'third_party/nanopb/pb_decode.h', 'third_party/nanopb/pb_encode.h', - 'src/core/ext/lb_policy/common.h', 'src/core/ext/census/aggregation.h', 'src/core/ext/census/census_interface.h', 'src/core/ext/census/census_rpc_stats.h', diff --git a/grpc.gemspec b/grpc.gemspec index f34bc51ffce..5b9de7278f7 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -200,6 +200,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/pollset_set.h ) s.files += %w( src/core/lib/iomgr/pollset_set_windows.h ) s.files += %w( src/core/lib/iomgr/pollset_windows.h ) + s.files += %w( src/core/lib/iomgr/pops.h ) s.files += %w( src/core/lib/iomgr/resolve_address.h ) s.files += %w( src/core/lib/iomgr/sockaddr.h ) s.files += %w( src/core/lib/iomgr/sockaddr_posix.h ) @@ -301,7 +302,6 @@ Gem::Specification.new do |s| s.files += %w( third_party/nanopb/pb_common.h ) s.files += %w( third_party/nanopb/pb_decode.h ) s.files += %w( third_party/nanopb/pb_encode.h ) - s.files += %w( src/core/ext/lb_policy/common.h ) s.files += %w( src/core/ext/census/aggregation.h ) s.files += %w( src/core/ext/census/census_interface.h ) s.files += %w( src/core/ext/census/census_rpc_stats.h ) @@ -336,6 +336,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/iomgr_windows.c ) s.files += %w( src/core/lib/iomgr/pollset_set_windows.c ) s.files += %w( src/core/lib/iomgr/pollset_windows.c ) + s.files += %w( src/core/lib/iomgr/pops.c ) s.files += %w( src/core/lib/iomgr/resolve_address_posix.c ) s.files += %w( src/core/lib/iomgr/resolve_address_windows.c ) s.files += %w( src/core/lib/iomgr/sockaddr_utils.c ) @@ -459,7 +460,6 @@ Gem::Specification.new do |s| s.files += %w( third_party/nanopb/pb_common.c ) s.files += %w( third_party/nanopb/pb_decode.c ) s.files += %w( third_party/nanopb/pb_encode.c ) - s.files += %w( src/core/ext/lb_policy/common.c ) s.files += %w( src/core/ext/lb_policy/pick_first/pick_first.c ) s.files += %w( src/core/ext/lb_policy/round_robin/round_robin.c ) s.files += %w( src/core/ext/resolver/dns/native/dns_resolver.c ) diff --git a/package.xml b/package.xml index a27463ad366..289fb4e31bd 100644 --- a/package.xml +++ b/package.xml @@ -207,6 +207,7 @@ + @@ -308,7 +309,6 @@ - @@ -343,6 +343,7 @@ + @@ -466,7 +467,6 @@ - diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index 4fd1ef41aa7..94360793af8 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -377,9 +377,7 @@ static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *elemp, int r; GRPC_LB_POLICY_REF(lb_policy, "cc_pick_subchannel"); gpr_mu_unlock(&chand->mu_config); - GPR_ASSERT((calld->pollset != NULL) + (calld->pollset_set != NULL) == 1); - r = grpc_lb_policy_pick(exec_ctx, lb_policy, calld->pollset, - calld->pollset_set, initial_metadata, + r = grpc_lb_policy_pick(exec_ctx, lb_policy, calld->pops, initial_metadata, initial_metadata_flags, connected_subchannel, on_ready); GRPC_LB_POLICY_UNREF(exec_ctx, lb_policy, "cc_pick_subchannel"); @@ -462,15 +460,11 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, gpr_mu_destroy(&chand->mu_config); } -static void cc_set_pollset_or_pollset_set( - grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_pollset *pollset, - grpc_pollset_set *pollset_set_alternative) { - GPR_ASSERT((pollset == NULL) + (pollset_set_alternative == NULL) == 1); - GPR_ASSERT(pollset != NULL || pollset_set_alternative != NULL); - +static void cc_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_pops *pops) { call_data *calld = elem->call_data; - calld->pollset = pollset; - calld->pollset_set = pollset_set_alternative; + calld->pops = pops; } const grpc_channel_filter grpc_client_channel_filter = { diff --git a/src/core/ext/client_config/lb_policy.c b/src/core/ext/client_config/lb_policy.c index 96342c7c7d8..8bf54d2abc6 100644 --- a/src/core/ext/client_config/lb_policy.c +++ b/src/core/ext/client_config/lb_policy.c @@ -99,14 +99,11 @@ void grpc_lb_policy_weak_unref(grpc_exec_ctx *exec_ctx, } int grpc_lb_policy_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, - grpc_pollset *pollset, - grpc_pollset_set *pollset_set_alternative, - grpc_metadata_batch *initial_metadata, + grpc_pops *pops, grpc_metadata_batch *initial_metadata, uint32_t initial_metadata_flags, grpc_connected_subchannel **target, grpc_closure *on_complete) { - return policy->vtable->pick(exec_ctx, policy, pollset, - pollset_set_alternative, initial_metadata, + return policy->vtable->pick(exec_ctx, policy, pops, initial_metadata, initial_metadata_flags, target, on_complete); } diff --git a/src/core/ext/client_config/lb_policy.h b/src/core/ext/client_config/lb_policy.h index e9bb1850e79..e4ae016e4aa 100644 --- a/src/core/ext/client_config/lb_policy.h +++ b/src/core/ext/client_config/lb_policy.h @@ -35,6 +35,7 @@ #define GRPC_CORE_EXT_CLIENT_CONFIG_LB_POLICY_H #include "src/core/ext/client_config/subchannel.h" +#include "src/core/lib/iomgr/pops.h" #include "src/core/lib/transport/connectivity_state.h" /** A load balancing policy: specified by a vtable and a struct (which @@ -58,8 +59,7 @@ struct grpc_lb_policy_vtable { void (*shutdown)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy); /** implement grpc_lb_policy_pick */ - int (*pick)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, - grpc_pollset *pollset, grpc_pollset_set *pollset_set_alternative, + int (*pick)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, grpc_pops *pops, grpc_metadata_batch *initial_metadata, uint32_t initial_metadata_flags, grpc_connected_subchannel **target, grpc_closure *on_complete); @@ -125,9 +125,7 @@ void grpc_lb_policy_init(grpc_lb_policy *policy, \a target. Picking can be asynchronous. Any IO should be done under \a pollset. */ int grpc_lb_policy_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, - grpc_pollset *pollset, - grpc_pollset_set *pollset_set_alternative, - grpc_metadata_batch *initial_metadata, + grpc_pops *pops, grpc_metadata_batch *initial_metadata, uint32_t initial_metadata_flags, grpc_connected_subchannel **target, grpc_closure *on_complete); diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c index 0ef80ff47e8..146ee5e6627 100644 --- a/src/core/ext/client_config/subchannel.c +++ b/src/core/ext/client_config/subchannel.c @@ -682,8 +682,7 @@ grpc_connected_subchannel *grpc_subchannel_get_connected_subchannel( } grpc_subchannel_call *grpc_connected_subchannel_create_call( - grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *con, - grpc_pollset *pollset) { + grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *con, grpc_pops *pops) { grpc_channel_stack *chanstk = CHANNEL_STACK_FROM_CONNECTION(con); grpc_subchannel_call *call = gpr_malloc(sizeof(grpc_subchannel_call) + chanstk->call_stack_size); @@ -692,7 +691,7 @@ grpc_subchannel_call *grpc_connected_subchannel_create_call( GRPC_CONNECTED_SUBCHANNEL_REF(con, "subchannel_call"); grpc_call_stack_init(exec_ctx, chanstk, 1, subchannel_call_destroy, call, NULL, NULL, callstk); - grpc_call_stack_set_pollset_or_pollset_set(exec_ctx, callstk, pollset, NULL); + grpc_call_stack_set_pollset_or_pollset_set(exec_ctx, callstk, pops); return call; } diff --git a/src/core/ext/client_config/subchannel.h b/src/core/ext/client_config/subchannel.h index 0765a544e8b..fe9ece08f18 100644 --- a/src/core/ext/client_config/subchannel.h +++ b/src/core/ext/client_config/subchannel.h @@ -36,6 +36,7 @@ #include "src/core/ext/client_config/connector.h" #include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/iomgr/pops.h" #include "src/core/lib/transport/connectivity_state.h" /** A (sub-)channel that knows how to connect to exactly one target @@ -109,7 +110,7 @@ void grpc_subchannel_call_unref(grpc_exec_ctx *exec_ctx, /** construct a subchannel call */ grpc_subchannel_call *grpc_connected_subchannel_create_call( grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *connected_subchannel, - grpc_pollset *pollset); + grpc_pops *pops); /** process a transport level op */ void grpc_connected_subchannel_process_transport_op( diff --git a/src/core/ext/client_config/subchannel_call_holder.c b/src/core/ext/client_config/subchannel_call_holder.c index 96a4593b3c2..02f63acd3bd 100644 --- a/src/core/ext/client_config/subchannel_call_holder.c +++ b/src/core/ext/client_config/subchannel_call_holder.c @@ -68,7 +68,7 @@ void grpc_subchannel_call_holder_init( holder->waiting_ops_capacity = 0; holder->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING; holder->owning_call = owning_call; - holder->pollset_set = NULL; + holder->pops = NULL; } void grpc_subchannel_call_holder_destroy(grpc_exec_ctx *exec_ctx, @@ -158,7 +158,7 @@ retry: gpr_atm_rel_store( &holder->subchannel_call, (gpr_atm)(uintptr_t)grpc_connected_subchannel_create_call( - exec_ctx, holder->connected_subchannel, holder->pollset)); + exec_ctx, holder->connected_subchannel, holder->pops)); retry_waiting_locked(exec_ctx, holder); goto retry; } @@ -183,7 +183,7 @@ static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *arg, bool success) { gpr_atm_rel_store( &holder->subchannel_call, (gpr_atm)(uintptr_t)grpc_connected_subchannel_create_call( - exec_ctx, holder->connected_subchannel, holder->pollset)); + exec_ctx, holder->connected_subchannel, holder->pops)); retry_waiting_locked(exec_ctx, holder); } gpr_mu_unlock(&holder->mu); diff --git a/src/core/ext/client_config/subchannel_call_holder.h b/src/core/ext/client_config/subchannel_call_holder.h index 6ed011ff880..81ac5f5b972 100644 --- a/src/core/ext/client_config/subchannel_call_holder.h +++ b/src/core/ext/client_config/subchannel_call_holder.h @@ -35,6 +35,7 @@ #define GRPC_CORE_EXT_CLIENT_CONFIG_SUBCHANNEL_CALL_HOLDER_H #include "src/core/ext/client_config/subchannel.h" +#include "src/core/lib/iomgr/pops.h" /** Pick a subchannel for grpc_subchannel_call_holder; Return 1 if subchannel is available immediately (in which case on_ready @@ -71,8 +72,7 @@ typedef struct grpc_subchannel_call_holder { grpc_subchannel_call_holder_creation_phase creation_phase; grpc_connected_subchannel *connected_subchannel; - grpc_pollset *pollset; - grpc_pollset_set *pollset_set; + grpc_pops *pops; grpc_transport_stream_op *waiting_ops; size_t waiting_ops_count; diff --git a/src/core/ext/lb_policy/common.c b/src/core/ext/lb_policy/common.c deleted file mode 100644 index bfb6aace877..00000000000 --- a/src/core/ext/lb_policy/common.c +++ /dev/null @@ -1,62 +0,0 @@ -/* - * - * Copyright 2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include - -#include "src/core/ext/lb_policy/common.h" - -void add_pollset_or_pollset_set_alternative( - grpc_exec_ctx *exec_ctx, grpc_pollset_set *interested_parties, - grpc_pollset *pollset, grpc_pollset_set *pollset_set_alternative) { - if (pollset != NULL) { - GPR_ASSERT(pollset_set_alternative == NULL); - grpc_pollset_set_add_pollset(exec_ctx, interested_parties, pollset); - } else { - GPR_ASSERT(pollset_set_alternative != NULL); - grpc_pollset_set_add_pollset_set(exec_ctx, interested_parties, - pollset_set_alternative); - } -} - -void del_pollset_or_pollset_set_alternative( - grpc_exec_ctx *exec_ctx, grpc_pollset_set *interested_parties, - grpc_pollset *pollset, grpc_pollset_set *pollset_set_alternative) { - if (pollset != NULL) { - GPR_ASSERT(pollset_set_alternative == NULL); - grpc_pollset_set_del_pollset(exec_ctx, interested_parties, pollset); - } else { - GPR_ASSERT(pollset_set_alternative != NULL); - grpc_pollset_set_del_pollset_set(exec_ctx, interested_parties, - pollset_set_alternative); - } -} diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c index f6613298be8..406525d8296 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -35,13 +35,11 @@ #include #include "src/core/ext/client_config/lb_policy_registry.h" -#include "src/core/ext/lb_policy/common.h" #include "src/core/lib/transport/connectivity_state.h" typedef struct pending_pick { struct pending_pick *next; - grpc_pollset *pollset; - grpc_pollset_set *pollset_set_alternative; + grpc_pops *pops; uint32_t initial_metadata_flags; grpc_connected_subchannel **target; grpc_closure *on_complete; @@ -120,9 +118,8 @@ static void pf_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { while (pp != NULL) { pending_pick *next = pp->next; *pp->target = NULL; - del_pollset_or_pollset_set_alternative(exec_ctx, p->base.interested_parties, - pp->pollset, - pp->pollset_set_alternative); + grpc_pops_del_to_pollset_set(exec_ctx, pp->pops, + p->base.interested_parties); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); gpr_free(pp); pp = next; @@ -139,9 +136,8 @@ static void pf_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, while (pp != NULL) { pending_pick *next = pp->next; if (pp->target == target) { - del_pollset_or_pollset_set_alternative( - exec_ctx, p->base.interested_parties, pp->pollset, - pp->pollset_set_alternative); + grpc_pops_del_to_pollset_set(exec_ctx, pp->pops, + p->base.interested_parties); *target = NULL; grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); gpr_free(pp); @@ -166,9 +162,8 @@ static void pf_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, pending_pick *next = pp->next; if ((pp->initial_metadata_flags & initial_metadata_flags_mask) == initial_metadata_flags_eq) { - del_pollset_or_pollset_set_alternative( - exec_ctx, p->base.interested_parties, pp->pollset, - pp->pollset_set_alternative); + grpc_pops_del_to_pollset_set(exec_ctx, pp->pops, + p->base.interested_parties); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); gpr_free(pp); } else { @@ -201,9 +196,7 @@ static void pf_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { } static int pf_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, - grpc_pollset *pollset, - grpc_pollset_set *pollset_set_alternative, - grpc_metadata_batch *initial_metadata, + grpc_pops *pops, grpc_metadata_batch *initial_metadata, uint32_t initial_metadata_flags, grpc_connected_subchannel **target, grpc_closure *on_complete) { @@ -228,12 +221,10 @@ static int pf_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, if (!p->started_picking) { start_picking(exec_ctx, p); } - add_pollset_or_pollset_set_alternative(exec_ctx, p->base.interested_parties, - pollset, pollset_set_alternative); + grpc_pops_add_to_pollset_set(exec_ctx, pops, p->base.interested_parties); pp = gpr_malloc(sizeof(*pp)); pp->next = p->pending_picks; - pp->pollset = pollset; - pp->pollset_set_alternative = pollset_set_alternative; + pp->pops = pops; pp->target = target; pp->initial_metadata_flags = initial_metadata_flags; pp->on_complete = on_complete; @@ -313,9 +304,8 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, while ((pp = p->pending_picks)) { p->pending_picks = pp->next; *pp->target = selected; - del_pollset_or_pollset_set_alternative( - exec_ctx, p->base.interested_parties, pp->pollset, - pp->pollset_set_alternative); + grpc_pops_del_to_pollset_set(exec_ctx, pp->pops, + p->base.interested_parties); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); gpr_free(pp); } diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index f4e3d60a839..69f75b86a34 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -36,7 +36,6 @@ #include #include "src/core/ext/client_config/lb_policy_registry.h" -#include "src/core/ext/lb_policy/common.h" #include "src/core/lib/debug/trace.h" #include "src/core/lib/transport/connectivity_state.h" @@ -49,8 +48,7 @@ int grpc_lb_round_robin_trace = 0; * Once a pick is available, \a target is updated and \a on_complete called. */ typedef struct pending_pick { struct pending_pick *next; - grpc_pollset *pollset; - grpc_pollset_set *pollset_set_alternative; + grpc_pops *pops; uint32_t initial_metadata_flags; grpc_connected_subchannel **target; grpc_closure *on_complete; @@ -264,9 +262,8 @@ static void rr_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, while (pp != NULL) { pending_pick *next = pp->next; if (pp->target == target) { - del_pollset_or_pollset_set_alternative( - exec_ctx, p->base.interested_parties, pp->pollset, - pp->pollset_set_alternative); + grpc_pops_del_to_pollset_set(exec_ctx, pp->pops, + p->base.interested_parties); *target = NULL; grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); gpr_free(pp); @@ -291,9 +288,8 @@ static void rr_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, pending_pick *next = pp->next; if ((pp->initial_metadata_flags & initial_metadata_flags_mask) == initial_metadata_flags_eq) { - del_pollset_or_pollset_set_alternative( - exec_ctx, p->base.interested_parties, pp->pollset, - pp->pollset_set_alternative); + grpc_pops_del_to_pollset_set(exec_ctx, pp->pops, + p->base.interested_parties); *pp->target = NULL; grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); gpr_free(pp); @@ -333,9 +329,7 @@ static void rr_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { } static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, - grpc_pollset *pollset, - grpc_pollset_set *pollset_set_alternative, - grpc_metadata_batch *initial_metadata, + grpc_pops *pops, grpc_metadata_batch *initial_metadata, uint32_t initial_metadata_flags, grpc_connected_subchannel **target, grpc_closure *on_complete) { @@ -358,12 +352,10 @@ static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, if (!p->started_picking) { start_picking(exec_ctx, p); } - add_pollset_or_pollset_set_alternative(exec_ctx, p->base.interested_parties, - pollset, pollset_set_alternative); + grpc_pops_add_to_pollset_set(exec_ctx, pops, p->base.interested_parties); pp = gpr_malloc(sizeof(*pp)); pp->next = p->pending_picks; - pp->pollset = pollset; - pp->pollset_set_alternative = pollset_set_alternative; + pp->pops = pops; pp->target = target; pp->on_complete = on_complete; pp->initial_metadata_flags = initial_metadata_flags; @@ -412,9 +404,8 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, "[RR CONN CHANGED] TARGET <-- SUBCHANNEL %p (NODE %p)", selected->subchannel, selected); } - del_pollset_or_pollset_set_alternative( - exec_ctx, p->base.interested_parties, pp->pollset, - pp->pollset_set_alternative); + grpc_pops_del_to_pollset_set(exec_ctx, pp->pops, + p->base.interested_parties); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); gpr_free(pp); } diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index e02c164aaf0..cedc8ade82e 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -189,32 +189,30 @@ void grpc_call_stack_init(grpc_exec_ctx *exec_ctx, } } -void grpc_call_stack_set_pollset_or_pollset_set( - grpc_exec_ctx *exec_ctx, grpc_call_stack *call_stack, grpc_pollset *pollset, - grpc_pollset_set *pollset_set_alternative) { +void grpc_call_stack_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, + grpc_call_stack *call_stack, + grpc_pops *pops) { size_t count = call_stack->count; grpc_call_element *call_elems; char *user_data; size_t i; - GPR_ASSERT((pollset == NULL) + (pollset_set_alternative == NULL) == 1); - GPR_ASSERT(pollset != NULL || pollset_set_alternative != NULL); call_elems = CALL_ELEMS_FROM_STACK(call_stack); user_data = ((char *)call_elems) + ROUND_UP_TO_ALIGNMENT_SIZE(count * sizeof(grpc_call_element)); /* init per-filter data */ for (i = 0; i < count; i++) { - call_elems[i].filter->set_pollset_or_pollset_set( - exec_ctx, &call_elems[i], pollset, pollset_set_alternative); + call_elems[i].filter->set_pollset_or_pollset_set(exec_ctx, &call_elems[i], + pops); user_data += ROUND_UP_TO_ALIGNMENT_SIZE(call_elems[i].filter->sizeof_call_data); } } -void grpc_call_stack_ignore_set_pollset_or_pollset_set( - grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_pollset *pollset, - grpc_pollset_set *pollset_set_alternative) {} +void grpc_call_stack_ignore_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_pops *pops) {} void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack) { grpc_call_element *elems = CALL_ELEMS_FROM_STACK(stack); diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 027bb23c1dd..c9d13ef193c 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -46,6 +46,7 @@ #include #include #include "src/core/lib/debug/trace.h" +#include "src/core/lib/iomgr/pops.h" #include "src/core/lib/transport/transport.h" typedef struct grpc_channel_element grpc_channel_element; @@ -102,9 +103,7 @@ typedef struct { void (*init_call_elem)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args); void (*set_pollset_or_pollset_set)(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem, - grpc_pollset *pollset, - grpc_pollset_set *pollset_set_alternative); + grpc_call_element *elem, grpc_pops *pops); /* Destroy per call data. The filter does not need to do any chaining */ void (*destroy_call_elem)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem); @@ -201,9 +200,9 @@ void grpc_call_stack_init(grpc_exec_ctx *exec_ctx, grpc_call_stack *call_stack); /* Set a pollset or a pollset_set for a call stack: must occur before the first * op is started */ -void grpc_call_stack_set_pollset_or_pollset_set( - grpc_exec_ctx *exec_ctx, grpc_call_stack *call_stack, grpc_pollset *pollset, - grpc_pollset_set *pollset_set_alternative); +void grpc_call_stack_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, + grpc_call_stack *call_stack, + grpc_pops *pops); #ifdef GRPC_STREAM_REFCOUNT_DEBUG #define GRPC_CALL_STACK_REF(call_stack, reason) \ @@ -228,12 +227,11 @@ void grpc_call_stack_set_pollset_or_pollset_set( /* Destroy a call stack */ void grpc_call_stack_destroy(grpc_exec_ctx *exec_ctx, grpc_call_stack *stack); -/* Ignore set pollset{_set} - used by filters to implement the - * set_pollset_or_pollset_set method if they don't care about pollsets at all. - * Does nothing. */ -void grpc_call_stack_ignore_set_pollset_or_pollset_set( - grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_pollset *pollset, - grpc_pollset_set *pollset_set_alternative); +/* Ignore set pollset{_set} - used by filters if they don't care about pollsets + * at all. Does nothing. */ +void grpc_call_stack_ignore_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_pops *pops); /* Call the next operation in a call stack */ void grpc_call_next_op(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_transport_stream_op *op); diff --git a/src/core/lib/channel/connected_channel.c b/src/core/lib/channel/connected_channel.c index 405f0a2ecd6..314ff6e5ce8 100644 --- a/src/core/lib/channel/connected_channel.c +++ b/src/core/lib/channel/connected_channel.c @@ -93,22 +93,13 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, GPR_ASSERT(r == 0); } -static void set_pollset_or_pollset_set( - grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_pollset *pollset, - grpc_pollset_set *pollset_set_alternative) { - GPR_ASSERT((pollset == NULL) + (pollset_set_alternative == NULL) == 1); - GPR_ASSERT(pollset != NULL || pollset_set_alternative != NULL); - +static void set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_pops *pops) { call_data *calld = elem->call_data; channel_data *chand = elem->channel_data; - if (pollset != NULL) { - grpc_transport_set_pollset(exec_ctx, chand->transport, - TRANSPORT_STREAM_FROM_CALL_DATA(calld), pollset); - } else if (pollset_set_alternative != NULL) { - grpc_transport_set_pollset_set(exec_ctx, chand->transport, - TRANSPORT_STREAM_FROM_CALL_DATA(calld), - pollset_set_alternative); - } + grpc_transport_set_pops(exec_ctx, chand->transport, + TRANSPORT_STREAM_FROM_CALL_DATA(calld), pops); } /* Destructor for call_data */ diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index 4cf33586802..d48e9544796 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -62,7 +62,7 @@ typedef struct { grpc_httpcli_response_cb on_response; void *user_data; grpc_httpcli_context *context; - grpc_pollset_set *pollset_set; + grpc_pops *pops; grpc_iomgr_object iomgr_obj; gpr_slice_buffer incoming; gpr_slice_buffer outgoing; @@ -97,8 +97,7 @@ static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req); static void finish(grpc_exec_ctx *exec_ctx, internal_request *req, int success) { - grpc_pollset_set_del_pollset_set(exec_ctx, req->context->pollset_set, - req->pollset_set); + grpc_pops_del_to_pollset_set(exec_ctx, req->pops, req->context->pollset_set); req->on_response(exec_ctx, req->user_data, success ? &req->parser.http.response : NULL); grpc_http_parser_destroy(&req->parser); @@ -221,10 +220,10 @@ static void on_resolved(grpc_exec_ctx *exec_ctx, void *arg, } static void internal_request_begin( - grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, - grpc_pollset_set *pollset_set, const grpc_httpcli_request *request, - gpr_timespec deadline, grpc_httpcli_response_cb on_response, - void *user_data, const char *name, gpr_slice request_text) { + grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, grpc_pops *pops, + const grpc_httpcli_request *request, gpr_timespec deadline, + grpc_httpcli_response_cb on_response, void *user_data, const char *name, + gpr_slice request_text) { internal_request *req = gpr_malloc(sizeof(internal_request)); memset(req, 0, sizeof(*req)); req->request_text = request_text; @@ -235,7 +234,7 @@ static void internal_request_begin( req->handshaker = request->handshaker ? request->handshaker : &grpc_httpcli_plaintext; req->context = context; - req->pollset_set = pollset_set; + req->pops = pops; grpc_closure_init(&req->on_read, on_read, req); grpc_closure_init(&req->done_write, done_write, req); gpr_slice_buffer_init(&req->incoming); @@ -244,15 +243,14 @@ static void internal_request_begin( req->host = gpr_strdup(request->host); req->ssl_host_override = gpr_strdup(request->ssl_host_override); - grpc_pollset_set_add_pollset_set(exec_ctx, req->context->pollset_set, - req->pollset_set); + GPR_ASSERT(pops); + grpc_pops_add_to_pollset_set(exec_ctx, req->pops, req->context->pollset_set); grpc_resolve_address(exec_ctx, request->host, req->handshaker->default_port, on_resolved, req); } void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, - grpc_pollset_set *pollset_set, - const grpc_httpcli_request *request, + grpc_pops *pops, const grpc_httpcli_request *request, gpr_timespec deadline, grpc_httpcli_response_cb on_response, void *user_data) { char *name; @@ -261,15 +259,14 @@ void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, return; } gpr_asprintf(&name, "HTTP:GET:%s:%s", request->host, request->http.path); - internal_request_begin(exec_ctx, context, pollset_set, request, deadline, + internal_request_begin(exec_ctx, context, pops, request, deadline, on_response, user_data, name, grpc_httpcli_format_get_request(request)); gpr_free(name); } void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, - grpc_pollset_set *pollset_set, - const grpc_httpcli_request *request, + grpc_pops *pops, const grpc_httpcli_request *request, const char *body_bytes, size_t body_size, gpr_timespec deadline, grpc_httpcli_response_cb on_response, void *user_data) { @@ -281,8 +278,8 @@ void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, } gpr_asprintf(&name, "HTTP:POST:%s:%s", request->host, request->http.path); internal_request_begin( - exec_ctx, context, pollset_set, request, deadline, on_response, user_data, - name, grpc_httpcli_format_post_request(request, body_bytes, body_size)); + exec_ctx, context, pops, request, deadline, on_response, user_data, name, + grpc_httpcli_format_post_request(request, body_bytes, body_size)); gpr_free(name); } diff --git a/src/core/lib/http/httpcli.h b/src/core/lib/http/httpcli.h index 040b5f47613..1166cfeea74 100644 --- a/src/core/lib/http/httpcli.h +++ b/src/core/lib/http/httpcli.h @@ -42,6 +42,7 @@ #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/iomgr_internal.h" #include "src/core/lib/iomgr/pollset_set.h" +#include "src/core/lib/iomgr/pops.h" /* User agent this library reports */ #define GRPC_HTTPCLI_USER_AGENT "grpc-httpcli/0.0" @@ -100,8 +101,7 @@ void grpc_httpcli_context_destroy(grpc_httpcli_context *context); 'on_response' is a callback to report results to (and 'user_data' is a user supplied pointer to pass to said call) */ void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, - grpc_pollset_set *pollset_set, - const grpc_httpcli_request *request, + grpc_pops *pops, const grpc_httpcli_request *request, gpr_timespec deadline, grpc_httpcli_response_cb on_response, void *user_data); @@ -121,8 +121,7 @@ void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, supplied pointer to pass to said call) Does not support ?var1=val1&var2=val2 in the path. */ void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, - grpc_pollset_set *pollset_set, - const grpc_httpcli_request *request, + grpc_pops *pops, const grpc_httpcli_request *request, const char *body_bytes, size_t body_size, gpr_timespec deadline, grpc_httpcli_response_cb on_response, void *user_data); diff --git a/src/core/lib/iomgr/pops.c b/src/core/lib/iomgr/pops.c new file mode 100644 index 00000000000..c2629f20aa6 --- /dev/null +++ b/src/core/lib/iomgr/pops.c @@ -0,0 +1,103 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include + +#include "src/core/lib/iomgr/pops.h" + +struct grpc_pops { + union { + grpc_pollset *pollset; + grpc_pollset_set *pollset_set; + } pops; + enum pops_tag { POLLSET, POLLSET_SET } tag; +}; + +grpc_pops *grpc_pops_create_from_pollset_set(grpc_pollset_set *pollset_set) { + grpc_pops *pops = gpr_malloc(sizeof(grpc_pops)); + pops->pops.pollset_set = pollset_set; + pops->tag = POLLSET_SET; + return pops; +} + +grpc_pops *grpc_pops_create_from_pollset(grpc_pollset *pollset) { + grpc_pops *pops = gpr_malloc(sizeof(grpc_pops)); + pops->pops.pollset = pollset; + pops->tag = POLLSET; + return pops; +} + +void grpc_pops_destroy(grpc_pops *pops) { gpr_free(pops); } + +grpc_pollset *grpc_pops_pollset(grpc_pops *pops) { + if (pops->tag == POLLSET) { + return pops->pops.pollset; + } + return NULL; +} + +grpc_pollset_set *grpc_pops_pollset_set(grpc_pops *pops) { + if (pops->tag == POLLSET_SET) { + return pops->pops.pollset_set; + } + return NULL; +} + +void grpc_pops_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_pops *pops, + grpc_pollset_set *pss_dst) { + if (pops->tag == POLLSET) { + GPR_ASSERT(pops->pops.pollset != NULL); + grpc_pollset_set_add_pollset(exec_ctx, pss_dst, pops->pops.pollset); + } else if (pops->tag == POLLSET_SET) { + GPR_ASSERT(pops->pops.pollset_set != NULL); + grpc_pollset_set_add_pollset_set(exec_ctx, pss_dst, pops->pops.pollset_set); + } else { + gpr_log(GPR_ERROR, "Invalid grpc_pops tag '%d'", pops->tag); + abort(); + } +} + +void grpc_pops_del_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_pops *pops, + grpc_pollset_set *pss_dst) { + if (pops->tag == POLLSET) { + GPR_ASSERT(pops->pops.pollset != NULL); + grpc_pollset_set_del_pollset(exec_ctx, pss_dst, pops->pops.pollset); + } else if (pops->tag == POLLSET_SET) { + GPR_ASSERT(pops->pops.pollset_set != NULL); + grpc_pollset_set_del_pollset_set(exec_ctx, pss_dst, pops->pops.pollset_set); + } else { + gpr_log(GPR_ERROR, "Invalid grpc_pops tag '%d'", pops->tag); + abort(); + } +} diff --git a/src/core/ext/lb_policy/common.h b/src/core/lib/iomgr/pops.h similarity index 55% rename from src/core/ext/lb_policy/common.h rename to src/core/lib/iomgr/pops.h index 1ace967328d..24ff85748bc 100644 --- a/src/core/ext/lb_policy/common.h +++ b/src/core/lib/iomgr/pops.h @@ -1,6 +1,6 @@ /* * - * Copyright 2016, Google Inc. + * Copyright 2015, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -31,18 +31,39 @@ * */ -#ifndef GRPC_CORE_EXT_LB_POLICY_COMMON_H -#define GRPC_CORE_EXT_LB_POLICY_COMMON_H +#ifndef GRPC_CORE_LIB_IOMGR_POPS_H +#define GRPC_CORE_LIB_IOMGR_POPS_H #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" -void add_pollset_or_pollset_set_alternative( - grpc_exec_ctx *exec_ctx, grpc_pollset_set *interested_parties, - grpc_pollset *pollset, grpc_pollset_set *pollset_set_alternative); +/* A grpc_pops is a pollset-or-pollset_set container. It allows functions that + * accept a pollset XOR a pollset_set to do so through an abstract interface. + * No ownership is taken. */ -void del_pollset_or_pollset_set_alternative( - grpc_exec_ctx *exec_ctx, grpc_pollset_set *interested_parties, - grpc_pollset *pollset, grpc_pollset_set *pollset_set_alternative); +typedef struct grpc_pops grpc_pops; -#endif /* GRPC_CORE_EXT_LB_POLICY_COMMON_H */ +grpc_pops *grpc_pops_create_from_pollset_set(grpc_pollset_set *pollset_set); +grpc_pops *grpc_pops_create_from_pollset(grpc_pollset *pollset); + +/** If \a pops contains a pollset, return it. Otherwise, return NULL */ +grpc_pollset *grpc_pops_pollset(grpc_pops *pops); + +/** If \a pops contains a pollset_set, return it. Otherwise, return NULL */ +grpc_pollset_set *grpc_pops_pollset_set(grpc_pops *pops); + +void grpc_pops_destroy(grpc_pops *pops); + +/** Add the pollset or pollset_set in \a pops to the destination pollset_set \a + * pss_dst */ +void grpc_pops_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_pops *pops, + grpc_pollset_set *pss_dst); + +/** Delete the pollset or pollset_set in \a pops from the destination + * pollset_set \a + * pss_dst */ +void grpc_pops_del_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_pops *pops, + grpc_pollset_set *pss_dst); +/* pollset_set specific */ + +#endif /* GRPC_CORE_LIB_IOMGR_POPS_H */ diff --git a/src/core/lib/security/client_auth_filter.c b/src/core/lib/security/client_auth_filter.c index 5db9755c2be..1511659dfef 100644 --- a/src/core/lib/security/client_auth_filter.c +++ b/src/core/lib/security/client_auth_filter.c @@ -54,11 +54,11 @@ typedef struct { grpc_call_credentials *creds; grpc_mdstr *host; grpc_mdstr *method; - /* pollset_set bound to this call; if we need to make external + /* pollset{_set} bound to this call; if we need to make external network requests, they should be done under a pollset added to this pollset_set so that work can progress when this call wants work to progress */ - grpc_pollset_set *pollset_set; + grpc_pops *pops; grpc_transport_stream_op op; uint8_t security_context_set; grpc_linked_mdelem md_links[MAX_CREDENTIALS_METADATA_COUNT]; @@ -184,9 +184,9 @@ static void send_security_metadata(grpc_exec_ctx *exec_ctx, build_auth_metadata_context(&chand->security_connector->base, chand->auth_context, calld); calld->op = *op; /* Copy op (originates from the caller's stack). */ - GPR_ASSERT(calld->pollset_set); + GPR_ASSERT(calld->pops != NULL); grpc_call_credentials_get_request_metadata( - exec_ctx, calld->creds, calld->pollset_set, calld->auth_md_context, + exec_ctx, calld->creds, calld->pops, calld->auth_md_context, on_credentials_metadata, elem); } @@ -268,22 +268,13 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) { call_data *calld = elem->call_data; memset(calld, 0, sizeof(*calld)); - calld->pollset_set = grpc_pollset_set_create(); } -static void set_pollset_or_pollset_set( - grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_pollset *pollset, - grpc_pollset_set *pollset_set_alternative) { - GPR_ASSERT((pollset == NULL) + (pollset_set_alternative == NULL) == 1); - GPR_ASSERT(pollset != NULL || pollset_set_alternative != NULL); - +static void set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_pops *pops) { call_data *calld = elem->call_data; - if (pollset != NULL) { - grpc_pollset_set_add_pollset(exec_ctx, calld->pollset_set, pollset); - } else if (pollset_set_alternative != NULL) { - grpc_pollset_set_add_pollset_set(exec_ctx, calld->pollset_set, - pollset_set_alternative); - } + calld->pops = pops; } /* Destructor for call_data */ @@ -298,7 +289,6 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, GRPC_MDSTR_UNREF(calld->method); } reset_auth_metadata_context(&calld->auth_md_context); - grpc_pollset_set_destroy(calld->pollset_set); } /* Constructor for channel_data */ diff --git a/src/core/lib/security/credentials.c b/src/core/lib/security/credentials.c index 8550649cbf3..43c061a265a 100644 --- a/src/core/lib/security/credentials.c +++ b/src/core/lib/security/credentials.c @@ -117,16 +117,16 @@ void grpc_call_credentials_release(grpc_call_credentials *creds) { } void grpc_call_credentials_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset_set *pollset_set, grpc_auth_metadata_context context, - grpc_credentials_metadata_cb cb, void *user_data) { + grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_pops *pops, + grpc_auth_metadata_context context, grpc_credentials_metadata_cb cb, + void *user_data) { if (creds == NULL || creds->vtable->get_request_metadata == NULL) { if (cb != NULL) { cb(exec_ctx, user_data, NULL, 0, GRPC_CREDENTIALS_OK); } return; } - creds->vtable->get_request_metadata(exec_ctx, creds, pollset_set, context, cb, + creds->vtable->get_request_metadata(exec_ctx, creds, pops, context, cb, user_data); } @@ -448,7 +448,7 @@ static void jwt_destruct(grpc_call_credentials *creds) { static void jwt_get_request_metadata(grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset_set *pollset_set, + grpc_pops *pops, grpc_auth_metadata_context context, grpc_credentials_metadata_cb cb, void *user_data) { @@ -670,9 +670,9 @@ static void on_oauth2_token_fetcher_http_response( } static void oauth2_token_fetcher_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset_set *pollset_set, grpc_auth_metadata_context context, - grpc_credentials_metadata_cb cb, void *user_data) { + grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_pops *pops, + grpc_auth_metadata_context context, grpc_credentials_metadata_cb cb, + void *user_data) { grpc_oauth2_token_fetcher_credentials *c = (grpc_oauth2_token_fetcher_credentials *)creds; gpr_timespec refresh_threshold = gpr_time_from_seconds( @@ -697,7 +697,7 @@ static void oauth2_token_fetcher_get_request_metadata( c->fetch_func( exec_ctx, grpc_credentials_metadata_request_create(creds, cb, user_data), - &c->httpcli_context, pollset_set, on_oauth2_token_fetcher_http_response, + &c->httpcli_context, pops, on_oauth2_token_fetcher_http_response, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), refresh_threshold)); } } @@ -720,7 +720,7 @@ static grpc_call_credentials_vtable compute_engine_vtable = { static void compute_engine_fetch_oauth2( grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *metadata_req, - grpc_httpcli_context *httpcli_context, grpc_pollset_set *pollset_set, + grpc_httpcli_context *httpcli_context, grpc_pops *pops, grpc_httpcli_response_cb response_cb, gpr_timespec deadline) { grpc_http_header header = {"Metadata-Flavor", "Google"}; grpc_httpcli_request request; @@ -729,7 +729,7 @@ static void compute_engine_fetch_oauth2( request.http.path = GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH; request.http.hdr_count = 1; request.http.hdrs = &header; - grpc_httpcli_get(exec_ctx, httpcli_context, pollset_set, &request, deadline, + grpc_httpcli_get(exec_ctx, httpcli_context, pops, &request, deadline, response_cb, metadata_req); } @@ -759,7 +759,7 @@ static grpc_call_credentials_vtable refresh_token_vtable = { static void refresh_token_fetch_oauth2( grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *metadata_req, - grpc_httpcli_context *httpcli_context, grpc_pollset_set *pollset_set, + grpc_httpcli_context *httpcli_context, grpc_pops *pops, grpc_httpcli_response_cb response_cb, gpr_timespec deadline) { grpc_google_refresh_token_credentials *c = (grpc_google_refresh_token_credentials *)metadata_req->creds; @@ -776,7 +776,7 @@ static void refresh_token_fetch_oauth2( request.http.hdr_count = 1; request.http.hdrs = &header; request.handshaker = &grpc_httpcli_ssl; - grpc_httpcli_post(exec_ctx, httpcli_context, pollset_set, &request, body, + grpc_httpcli_post(exec_ctx, httpcli_context, pops, &request, body, strlen(body), deadline, response_cb, metadata_req); gpr_free(body); } @@ -826,9 +826,9 @@ static void on_simulated_token_fetch_done(grpc_exec_ctx *exec_ctx, } static void md_only_test_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset_set *pollset_set, grpc_auth_metadata_context context, - grpc_credentials_metadata_cb cb, void *user_data) { + grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_pops *pops, + grpc_auth_metadata_context context, grpc_credentials_metadata_cb cb, + void *user_data) { grpc_md_only_test_credentials *c = (grpc_md_only_test_credentials *)creds; if (c->is_async) { @@ -866,9 +866,9 @@ static void access_token_destruct(grpc_call_credentials *creds) { } static void access_token_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset_set *pollset_set, grpc_auth_metadata_context context, - grpc_credentials_metadata_cb cb, void *user_data) { + grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_pops *pops, + grpc_auth_metadata_context context, grpc_credentials_metadata_cb cb, + void *user_data) { grpc_access_token_credentials *c = (grpc_access_token_credentials *)creds; cb(exec_ctx, user_data, c->access_token_md->entries, 1, GRPC_CREDENTIALS_OK); } @@ -951,7 +951,7 @@ typedef struct { grpc_credentials_md_store *md_elems; grpc_auth_metadata_context auth_md_context; void *user_data; - grpc_pollset_set *pollset_set; + grpc_pops *pops; grpc_credentials_metadata_cb cb; } grpc_composite_call_credentials_metadata_context; @@ -994,9 +994,9 @@ static void composite_call_metadata_cb(grpc_exec_ctx *exec_ctx, void *user_data, if (ctx->creds_index < ctx->composite_creds->inner.num_creds) { grpc_call_credentials *inner_creds = ctx->composite_creds->inner.creds_array[ctx->creds_index++]; - grpc_call_credentials_get_request_metadata( - exec_ctx, inner_creds, ctx->pollset_set, ctx->auth_md_context, - composite_call_metadata_cb, ctx); + grpc_call_credentials_get_request_metadata(exec_ctx, inner_creds, ctx->pops, + ctx->auth_md_context, + composite_call_metadata_cb, ctx); return; } @@ -1007,9 +1007,9 @@ static void composite_call_metadata_cb(grpc_exec_ctx *exec_ctx, void *user_data, } static void composite_call_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset_set *pollset_set, grpc_auth_metadata_context auth_md_context, - grpc_credentials_metadata_cb cb, void *user_data) { + grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_pops *pops, + grpc_auth_metadata_context auth_md_context, grpc_credentials_metadata_cb cb, + void *user_data) { grpc_composite_call_credentials *c = (grpc_composite_call_credentials *)creds; grpc_composite_call_credentials_metadata_context *ctx; @@ -1019,11 +1019,11 @@ static void composite_call_get_request_metadata( ctx->user_data = user_data; ctx->cb = cb; ctx->composite_creds = c; - ctx->pollset_set = pollset_set; + ctx->pops = pops; ctx->md_elems = grpc_credentials_md_store_create(c->inner.num_creds); grpc_call_credentials_get_request_metadata( - exec_ctx, c->inner.creds_array[ctx->creds_index++], pollset_set, - auth_md_context, composite_call_metadata_cb, ctx); + exec_ctx, c->inner.creds_array[ctx->creds_index++], pops, auth_md_context, + composite_call_metadata_cb, ctx); } static grpc_call_credentials_vtable composite_call_credentials_vtable = { @@ -1116,7 +1116,7 @@ static void iam_destruct(grpc_call_credentials *creds) { static void iam_get_request_metadata(grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset_set *pollset_set, + grpc_pops *pops, grpc_auth_metadata_context context, grpc_credentials_metadata_cb cb, void *user_data) { @@ -1205,7 +1205,7 @@ static void plugin_md_request_metadata_ready(void *request, static void plugin_get_request_metadata(grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset_set *pollset_set, + grpc_pops *pops, grpc_auth_metadata_context context, grpc_credentials_metadata_cb cb, void *user_data) { diff --git a/src/core/lib/security/credentials.h b/src/core/lib/security/credentials.h index 9512e8e028e..3d374949d59 100644 --- a/src/core/lib/security/credentials.h +++ b/src/core/lib/security/credentials.h @@ -41,6 +41,7 @@ #include "src/core/lib/http/httpcli.h" #include "src/core/lib/http/parser.h" +#include "src/core/lib/iomgr/pops.h" #include "src/core/lib/security/json_token.h" #include "src/core/lib/security/security_connector.h" @@ -169,8 +170,7 @@ typedef void (*grpc_credentials_metadata_cb)(grpc_exec_ctx *exec_ctx, typedef struct { void (*destruct)(grpc_call_credentials *c); void (*get_request_metadata)(grpc_exec_ctx *exec_ctx, - grpc_call_credentials *c, - grpc_pollset_set *pollset_set, + grpc_call_credentials *c, grpc_pops *pops, grpc_auth_metadata_context context, grpc_credentials_metadata_cb cb, void *user_data); @@ -185,9 +185,9 @@ struct grpc_call_credentials { grpc_call_credentials *grpc_call_credentials_ref(grpc_call_credentials *creds); void grpc_call_credentials_unref(grpc_call_credentials *creds); void grpc_call_credentials_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset_set *pollset_set, grpc_auth_metadata_context context, - grpc_credentials_metadata_cb cb, void *user_data); + grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, grpc_pops *pops, + grpc_auth_metadata_context context, grpc_credentials_metadata_cb cb, + void *user_data); typedef struct { grpc_call_credentials **creds_array; @@ -318,7 +318,7 @@ typedef struct grpc_credentials_metadata_request typedef void (*grpc_fetch_oauth2_func)(grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *req, grpc_httpcli_context *http_context, - grpc_pollset_set *pollset_set, + grpc_pops *pops, grpc_httpcli_response_cb response_cb, gpr_timespec deadline); diff --git a/src/core/lib/security/google_default_credentials.c b/src/core/lib/security/google_default_credentials.c index d831a986b27..29045f36eb3 100644 --- a/src/core/lib/security/google_default_credentials.c +++ b/src/core/lib/security/google_default_credentials.c @@ -41,6 +41,7 @@ #include "src/core/lib/http/httpcli.h" #include "src/core/lib/http/parser.h" +#include "src/core/lib/iomgr/pops.h" #include "src/core/lib/support/env.h" #include "src/core/lib/support/load_file.h" #include "src/core/lib/surface/api_trace.h" @@ -60,8 +61,7 @@ static gpr_once g_once = GPR_ONCE_INIT; static void init_default_credentials(void) { gpr_mu_init(&g_state_mu); } typedef struct { - grpc_pollset *pollset; - grpc_pollset_set *pollset_set; + grpc_pops *pops; int is_done; int success; } compute_engine_detector; @@ -85,7 +85,7 @@ static void on_compute_engine_detection_http_response( } gpr_mu_lock(g_polling_mu); detector->is_done = 1; - grpc_pollset_kick(detector->pollset, NULL); + grpc_pollset_kick(grpc_pops_pollset(detector->pops), NULL); gpr_mu_unlock(g_polling_mu); } @@ -104,11 +104,9 @@ static int is_stack_running_on_compute_engine(void) { on compute engine. */ gpr_timespec max_detection_delay = gpr_time_from_seconds(1, GPR_TIMESPAN); - detector.pollset = gpr_malloc(grpc_pollset_size()); - grpc_pollset_init(detector.pollset, &g_polling_mu); - detector.pollset_set = grpc_pollset_set_create(); - grpc_pollset_set_add_pollset(&exec_ctx, detector.pollset_set, - detector.pollset); + grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); + grpc_pollset_init(pollset, &g_polling_mu); + detector.pops = grpc_pops_create_from_pollset(pollset); detector.is_done = 0; detector.success = 0; @@ -119,7 +117,7 @@ static int is_stack_running_on_compute_engine(void) { grpc_httpcli_context_init(&context); grpc_httpcli_get( - &exec_ctx, &context, detector.pollset_set, &request, + &exec_ctx, &context, detector.pops, &request, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), max_detection_delay), on_compute_engine_detection_http_response, &detector); @@ -130,20 +128,22 @@ static int is_stack_running_on_compute_engine(void) { gpr_mu_lock(g_polling_mu); while (!detector.is_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, detector.pollset, &worker, + grpc_pollset_work(&exec_ctx, grpc_pops_pollset(detector.pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), gpr_inf_future(GPR_CLOCK_MONOTONIC)); } gpr_mu_unlock(g_polling_mu); grpc_httpcli_context_destroy(&context); - grpc_closure_init(&destroy_closure, destroy_pollset, detector.pollset); - grpc_pollset_shutdown(&exec_ctx, detector.pollset, &destroy_closure); - grpc_pollset_set_destroy(detector.pollset_set); + grpc_closure_init(&destroy_closure, destroy_pollset, + grpc_pops_pollset(detector.pops)); + grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(detector.pops), + &destroy_closure); grpc_exec_ctx_finish(&exec_ctx); g_polling_mu = NULL; - gpr_free(detector.pollset); + gpr_free(grpc_pops_pollset(detector.pops)); + grpc_pops_destroy(detector.pops); return detector.success; } diff --git a/src/core/lib/security/jwt_verifier.c b/src/core/lib/security/jwt_verifier.c index f764596aa9e..a5d200d7a30 100644 --- a/src/core/lib/security/jwt_verifier.c +++ b/src/core/lib/security/jwt_verifier.c @@ -37,6 +37,7 @@ #include #include "src/core/lib/http/httpcli.h" +#include "src/core/lib/iomgr/pops.h" #include "src/core/lib/security/b64.h" #include "src/core/lib/tsi/ssl_types.h" @@ -321,7 +322,7 @@ grpc_jwt_verifier_status grpc_jwt_claims_check(const grpc_jwt_claims *claims, typedef struct { grpc_jwt_verifier *verifier; - grpc_pollset_set *pollset_set; + grpc_pops *pops; jose_header *header; grpc_jwt_claims *claims; char *audience; @@ -341,8 +342,7 @@ static verifier_cb_ctx *verifier_cb_ctx_create( verifier_cb_ctx *ctx = gpr_malloc(sizeof(verifier_cb_ctx)); memset(ctx, 0, sizeof(verifier_cb_ctx)); ctx->verifier = verifier; - ctx->pollset_set = grpc_pollset_set_create(); - grpc_pollset_set_add_pollset(&exec_ctx, ctx->pollset_set, pollset); + ctx->pops = grpc_pops_create_from_pollset(pollset); ctx->header = header; ctx->audience = gpr_strdup(audience); ctx->claims = claims; @@ -360,7 +360,7 @@ void verifier_cb_ctx_destroy(verifier_cb_ctx *ctx) { gpr_slice_unref(ctx->signature); gpr_slice_unref(ctx->signed_data); jose_header_destroy(ctx->header); - grpc_pollset_set_destroy(ctx->pollset_set); + grpc_pops_destroy(ctx->pops); /* TODO: see what to do with claims... */ gpr_free(ctx); } @@ -646,7 +646,7 @@ static void on_openid_config_retrieved(grpc_exec_ctx *exec_ctx, void *user_data, *(req.host + (req.http.path - jwks_uri)) = '\0'; } grpc_httpcli_get( - exec_ctx, &ctx->verifier->http_ctx, ctx->pollset_set, &req, + exec_ctx, &ctx->verifier->http_ctx, ctx->pops, &req, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay), on_keys_retrieved, ctx); grpc_json_destroy(json); @@ -749,7 +749,7 @@ static void retrieve_key_and_verify(grpc_exec_ctx *exec_ctx, } grpc_httpcli_get( - exec_ctx, &ctx->verifier->http_ctx, ctx->pollset_set, &req, + exec_ctx, &ctx->verifier->http_ctx, ctx->pops, &req, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay), http_cb, ctx); gpr_free(req.host); diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 899784e2c2a..4b5a7d74659 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -135,7 +135,7 @@ typedef struct batch_control { struct grpc_call { grpc_completion_queue *cq; - grpc_pollset_set *pollset_set; + grpc_pops *pops; grpc_channel *channel; grpc_call *parent; grpc_call *first_child; @@ -259,13 +259,6 @@ grpc_call *grpc_call_create( gpr_mu_init(&call->mu); call->channel = channel; call->cq = cq; - if (cq != NULL && pollset_set_alternative != NULL) { - gpr_log( - GPR_ERROR, - "Only one of 'cq' and 'pollset_set_alternative' should be non-NULL."); - abort(); - } - call->pollset_set = pollset_set_alternative; call->parent = parent_call; call->is_client = server_transport_data == NULL; if (call->is_client) { @@ -290,14 +283,18 @@ grpc_call *grpc_call_create( call->context, server_transport_data, CALL_STACK_FROM_CALL(call)); if (cq != NULL) { + GPR_ASSERT( + pollset_set_alternative == NULL && + "Only one of 'cq' and 'pollset_set_alternative' should be non-NULL."); GRPC_CQ_INTERNAL_REF(cq, "bind"); - grpc_call_stack_set_pollset_or_pollset_set( - &exec_ctx, CALL_STACK_FROM_CALL(call), grpc_cq_pollset(cq), NULL); + call->pops = grpc_pops_create_from_pollset(grpc_cq_pollset(cq)); } if (pollset_set_alternative != NULL) { - GPR_ASSERT(cq == NULL); + call->pops = grpc_pops_create_from_pollset_set(pollset_set_alternative); + } + if (call->pops != NULL) { grpc_call_stack_set_pollset_or_pollset_set( - &exec_ctx, CALL_STACK_FROM_CALL(call), NULL, pollset_set_alternative); + &exec_ctx, CALL_STACK_FROM_CALL(call), call->pops); } if (parent_call != NULL) { GRPC_CALL_INTERNAL_REF(parent_call, "child"); @@ -352,11 +349,19 @@ grpc_call *grpc_call_create( void grpc_call_set_completion_queue(grpc_exec_ctx *exec_ctx, grpc_call *call, grpc_completion_queue *cq) { GPR_ASSERT(cq); - GPR_ASSERT(call->pollset_set == NULL); + + if (call->pops != NULL && grpc_pops_pollset_set(call->pops) != NULL) { + gpr_log(GPR_ERROR, "A pollset_set is already registered for this call."); + abort(); + } call->cq = cq; GRPC_CQ_INTERNAL_REF(cq, "bind"); + if (call->pops != NULL) { + grpc_pops_destroy(call->pops); + } + call->pops = grpc_pops_create_from_pollset(grpc_cq_pollset(cq)); grpc_call_stack_set_pollset_or_pollset_set( - exec_ctx, CALL_STACK_FROM_CALL(call), grpc_cq_pollset(cq), NULL); + exec_ctx, CALL_STACK_FROM_CALL(call), call->pops); } #ifdef GRPC_STREAM_REFCOUNT_DEBUG @@ -404,6 +409,7 @@ static void destroy_call(grpc_exec_ctx *exec_ctx, void *call, bool success) { if (c->cq) { GRPC_CQ_INTERNAL_UNREF(c->cq, "bind"); } + grpc_pops_destroy(c->pops); gpr_free(c); GPR_TIMER_END("destroy_call", 0); } diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c index 7f2ae5f52e8..ba39693e471 100644 --- a/src/core/lib/transport/transport.c +++ b/src/core/lib/transport/transport.c @@ -125,17 +125,18 @@ void grpc_transport_perform_op(grpc_exec_ctx *exec_ctx, transport->vtable->perform_op(exec_ctx, transport, op); } -void grpc_transport_set_pollset(grpc_exec_ctx *exec_ctx, - grpc_transport *transport, grpc_stream *stream, - grpc_pollset *pollset) { - transport->vtable->set_pollset(exec_ctx, transport, stream, pollset); -} - -void grpc_transport_set_pollset_set(grpc_exec_ctx *exec_ctx, - grpc_transport *transport, - grpc_stream *stream, - grpc_pollset_set *pollset_set) { - transport->vtable->set_pollset_set(exec_ctx, transport, stream, pollset_set); +void grpc_transport_set_pops(grpc_exec_ctx *exec_ctx, grpc_transport *transport, + grpc_stream *stream, grpc_pops *pops) { + grpc_pollset *pollset; + grpc_pollset_set *pollset_set; + if ((pollset = grpc_pops_pollset(pops)) != NULL) { + transport->vtable->set_pollset(exec_ctx, transport, stream, pollset); + } else if ((pollset_set = grpc_pops_pollset_set(pops)) != NULL) { + transport->vtable->set_pollset_set(exec_ctx, transport, stream, + pollset_set); + } else { + abort(); + } } void grpc_transport_destroy_stream(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index 8f0c2d9023a..0be080c9ca5 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -39,6 +39,7 @@ #include "src/core/lib/channel/context.h" #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/iomgr/pollset_set.h" +#include "src/core/lib/iomgr/pops.h" #include "src/core/lib/transport/byte_stream.h" #include "src/core/lib/transport/metadata_batch.h" @@ -197,14 +198,8 @@ int grpc_transport_init_stream(grpc_exec_ctx *exec_ctx, grpc_stream_refcount *refcount, const void *server_data); -void grpc_transport_set_pollset(grpc_exec_ctx *exec_ctx, - grpc_transport *transport, grpc_stream *stream, - grpc_pollset *pollset); - -void grpc_transport_set_pollset_set(grpc_exec_ctx *exec_ctx, - grpc_transport *transport, - grpc_stream *stream, - grpc_pollset_set *pollset_set); +void grpc_transport_set_pops(grpc_exec_ctx *exec_ctx, grpc_transport *transport, + grpc_stream *stream, grpc_pops *pops); /* Destroy transport data for a stream. diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 93799820866..c88cfff99c2 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -104,6 +104,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/iomgr/iomgr_windows.c', 'src/core/lib/iomgr/pollset_set_windows.c', 'src/core/lib/iomgr/pollset_windows.c', + 'src/core/lib/iomgr/pops.c', 'src/core/lib/iomgr/resolve_address_posix.c', 'src/core/lib/iomgr/resolve_address_windows.c', 'src/core/lib/iomgr/sockaddr_utils.c', @@ -227,7 +228,6 @@ CORE_SOURCE_FILES = [ 'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c', - 'src/core/ext/lb_policy/common.c', 'src/core/ext/lb_policy/pick_first/pick_first.c', 'src/core/ext/lb_policy/round_robin/round_robin.c', 'src/core/ext/resolver/dns/native/dns_resolver.c', diff --git a/test/core/http/httpcli_test.c b/test/core/http/httpcli_test.c index 36e43b8de87..6b9ec7fd94a 100644 --- a/test/core/http/httpcli_test.c +++ b/test/core/http/httpcli_test.c @@ -48,8 +48,7 @@ static int g_done = 0; static grpc_httpcli_context g_context; static gpr_mu *g_mu; -static grpc_pollset *g_pollset; -static grpc_pollset_set *g_pollset_set; +static grpc_pops *g_pops; static gpr_timespec n_seconds_time(int seconds) { return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(seconds); @@ -67,7 +66,7 @@ static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, GPR_ASSERT(0 == memcmp(expect, response->body, response->body_length)); gpr_mu_lock(g_mu); g_done = 1; - grpc_pollset_kick(g_pollset, NULL); + grpc_pollset_kick(grpc_pops_pollset(g_pops), NULL); gpr_mu_unlock(g_mu); } @@ -87,12 +86,12 @@ static void test_get(int port) { req.http.path = "/get"; req.handshaker = &grpc_httpcli_plaintext; - grpc_httpcli_get(&exec_ctx, &g_context, g_pollset_set, &req, - n_seconds_time(15), on_finish, (void *)42); + grpc_httpcli_get(&exec_ctx, &g_context, g_pops, &req, n_seconds_time(15), + on_finish, (void *)42); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, g_pollset, &worker, + grpc_pollset_work(&exec_ctx, grpc_pops_pollset(g_pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); @@ -118,12 +117,12 @@ static void test_post(int port) { req.http.path = "/post"; req.handshaker = &grpc_httpcli_plaintext; - grpc_httpcli_post(&exec_ctx, &g_context, g_pollset_set, &req, "hello", 5, + grpc_httpcli_post(&exec_ctx, &g_context, g_pops, &req, "hello", 5, n_seconds_time(15), on_finish, (void *)42); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, g_pollset, &worker, + grpc_pollset_work(&exec_ctx, grpc_pops_pollset(g_pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); @@ -133,8 +132,8 @@ static void test_post(int port) { gpr_free(host); } -static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) { - grpc_pollset_destroy(p); +static void destroy_pops(grpc_exec_ctx *exec_ctx, void *p, bool success) { + grpc_pollset_destroy(grpc_pops_pollset(p)); } int main(int argc, char **argv) { @@ -181,21 +180,21 @@ int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); grpc_httpcli_context_init(&g_context); - g_pollset = gpr_malloc(grpc_pollset_size()); - grpc_pollset_init(g_pollset, &g_mu); - g_pollset_set = grpc_pollset_set_create(); - grpc_pollset_set_add_pollset(&exec_ctx, g_pollset_set, g_pollset); + grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); + grpc_pollset_init(pollset, &g_mu); + g_pops = grpc_pops_create_from_pollset(pollset); test_get(port); test_post(port); grpc_httpcli_context_destroy(&g_context); - grpc_closure_init(&destroyed, destroy_pollset, g_pollset); - grpc_pollset_shutdown(&exec_ctx, g_pollset, &destroyed); + grpc_closure_init(&destroyed, destroy_pops, g_pops); + grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(g_pops), &destroyed); grpc_exec_ctx_finish(&exec_ctx); grpc_shutdown(); - gpr_free(g_pollset); + gpr_free(grpc_pops_pollset(g_pops)); + grpc_pops_destroy(g_pops); gpr_subprocess_destroy(server); diff --git a/test/core/http/httpscli_test.c b/test/core/http/httpscli_test.c index 1aeaf2cf10f..ee2122e1c10 100644 --- a/test/core/http/httpscli_test.c +++ b/test/core/http/httpscli_test.c @@ -48,8 +48,7 @@ static int g_done = 0; static grpc_httpcli_context g_context; static gpr_mu *g_mu; -static grpc_pollset *g_pollset; -static grpc_pollset_set *g_pollset_set; +static grpc_pops *g_pops; static gpr_timespec n_seconds_time(int seconds) { return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(seconds); @@ -67,7 +66,7 @@ static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, GPR_ASSERT(0 == memcmp(expect, response->body, response->body_length)); gpr_mu_lock(g_mu); g_done = 1; - grpc_pollset_kick(g_pollset, NULL); + grpc_pollset_kick(grpc_pops_pollset(g_pops), NULL); gpr_mu_unlock(g_mu); } @@ -88,12 +87,12 @@ static void test_get(int port) { req.http.path = "/get"; req.handshaker = &grpc_httpcli_ssl; - grpc_httpcli_get(&exec_ctx, &g_context, g_pollset_set, &req, - n_seconds_time(15), on_finish, (void *)42); + grpc_httpcli_get(&exec_ctx, &g_context, g_pops, &req, n_seconds_time(15), + on_finish, (void *)42); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, g_pollset, &worker, + grpc_pollset_work(&exec_ctx, grpc_pops_pollset(g_pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); @@ -120,12 +119,12 @@ static void test_post(int port) { req.http.path = "/post"; req.handshaker = &grpc_httpcli_ssl; - grpc_httpcli_post(&exec_ctx, &g_context, g_pollset_set, &req, "hello", 5, + grpc_httpcli_post(&exec_ctx, &g_context, g_pops, &req, "hello", 5, n_seconds_time(15), on_finish, (void *)42); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, g_pollset, &worker, + grpc_pollset_work(&exec_ctx, grpc_pops_pollset(g_pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); @@ -135,8 +134,8 @@ static void test_post(int port) { gpr_free(host); } -static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) { - grpc_pollset_destroy(p); +static void destroy_pops(grpc_exec_ctx *exec_ctx, void *p, bool success) { + grpc_pollset_destroy(grpc_pops_pollset(p)); } int main(int argc, char **argv) { @@ -184,22 +183,21 @@ int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); grpc_httpcli_context_init(&g_context); - g_pollset = gpr_malloc(grpc_pollset_size()); - grpc_pollset_init(g_pollset, &g_mu); - g_pollset_set = grpc_pollset_set_create(); - grpc_pollset_set_add_pollset(&exec_ctx, g_pollset_set, g_pollset); + grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); + grpc_pollset_init(pollset, &g_mu); + g_pops = grpc_pops_create_from_pollset(pollset); test_get(port); test_post(port); grpc_httpcli_context_destroy(&g_context); - grpc_closure_init(&destroyed, destroy_pollset, g_pollset); - grpc_pollset_shutdown(&exec_ctx, g_pollset, &destroyed); + grpc_closure_init(&destroyed, destroy_pops, g_pops); + grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(g_pops), &destroyed); grpc_exec_ctx_finish(&exec_ctx); - grpc_pollset_set_destroy(g_pollset_set); grpc_shutdown(); - gpr_free(g_pollset); + gpr_free(grpc_pops_pollset(g_pops)); + grpc_pops_destroy(g_pops); gpr_subprocess_destroy(server); diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c index 94d35026f1c..2580757837d 100644 --- a/test/core/security/oauth2_utils.c +++ b/test/core/security/oauth2_utils.c @@ -46,8 +46,7 @@ typedef struct { gpr_mu *mu; - grpc_pollset *pollset; - grpc_pollset_set *pollset_set; + grpc_pops *pops; int is_done; char *token; } oauth2_request; @@ -71,7 +70,7 @@ static void on_oauth2_response(grpc_exec_ctx *exec_ctx, void *user_data, gpr_mu_lock(request->mu); request->is_done = 1; request->token = token; - grpc_pollset_kick(request->pollset, NULL); + grpc_pollset_kick(grpc_pops_pollset(request->pops), NULL); gpr_mu_unlock(request->mu); } @@ -84,33 +83,30 @@ char *grpc_test_fetch_oauth2_token_with_credentials( grpc_closure do_nothing_closure; grpc_auth_metadata_context null_ctx = {"", "", NULL, NULL}; - request.pollset = gpr_malloc(grpc_pollset_size()); - grpc_pollset_init(request.pollset, &request.mu); - request.pollset_set = grpc_pollset_set_create(); - grpc_pollset_set_add_pollset(&exec_ctx, request.pollset_set, request.pollset); + grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); + grpc_pollset_init(pollset, &request.mu); request.is_done = 0; grpc_closure_init(&do_nothing_closure, do_nothing, NULL); - grpc_call_credentials_get_request_metadata(&exec_ctx, creds, - request.pollset_set, null_ctx, - on_oauth2_response, &request); + grpc_call_credentials_get_request_metadata( + &exec_ctx, creds, request.pops, null_ctx, on_oauth2_response, &request); grpc_exec_ctx_finish(&exec_ctx); gpr_mu_lock(request.mu); while (!request.is_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, request.pollset, &worker, + grpc_pollset_work(&exec_ctx, grpc_pops_pollset(request.pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), gpr_inf_future(GPR_CLOCK_MONOTONIC)); } gpr_mu_unlock(request.mu); - grpc_pollset_shutdown(&exec_ctx, request.pollset, &do_nothing_closure); + grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(request.pops), + &do_nothing_closure); grpc_exec_ctx_finish(&exec_ctx); - grpc_pollset_destroy(request.pollset); - grpc_pollset_set_destroy(request.pollset_set); - gpr_free(request.pollset); + gpr_free(grpc_pops_pollset(request.pops)); + grpc_pops_destroy(request.pops); return request.token; } diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c index 2c292bc80b5..4f5038c045f 100644 --- a/test/core/security/print_google_default_creds_token.c +++ b/test/core/security/print_google_default_creds_token.c @@ -47,8 +47,7 @@ typedef struct { gpr_mu *mu; - grpc_pollset *pollset; - grpc_pollset_set *pollset_set; + grpc_pops *pops; int is_done; } synchronizer; @@ -67,7 +66,7 @@ static void on_metadata_response(grpc_exec_ctx *exec_ctx, void *user_data, } gpr_mu_lock(sync->mu); sync->is_done = 1; - grpc_pollset_kick(sync->pollset, NULL); + grpc_pollset_kick(grpc_pops_pollset(sync->pops), NULL); gpr_mu_unlock(sync->mu); } @@ -94,20 +93,19 @@ int main(int argc, char **argv) { goto end; } - sync.pollset = gpr_malloc(grpc_pollset_size()); - grpc_pollset_init(sync.pollset, &sync.mu); - sync.pollset_set = grpc_pollset_set_create(); - grpc_pollset_set_add_pollset(&exec_ctx, sync.pollset_set, sync.pollset); + grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); + grpc_pollset_init(pollset, &sync.mu); + sync.pops = grpc_pops_create_from_pollset(pollset); sync.is_done = 0; grpc_call_credentials_get_request_metadata( &exec_ctx, ((grpc_composite_channel_credentials *)creds)->call_creds, - sync.pollset_set, context, on_metadata_response, &sync); + sync.pops, context, on_metadata_response, &sync); gpr_mu_lock(sync.mu); while (!sync.is_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, sync.pollset, &worker, + grpc_pollset_work(&exec_ctx, grpc_pops_pollset(sync.pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), gpr_inf_future(GPR_CLOCK_MONOTONIC)); gpr_mu_unlock(sync.mu); @@ -119,8 +117,8 @@ int main(int argc, char **argv) { grpc_exec_ctx_finish(&exec_ctx); grpc_channel_credentials_release(creds); - grpc_pollset_set_destroy(sync.pollset_set); - gpr_free(sync.pollset); + gpr_free(grpc_pops_pollset(sync.pops)); + grpc_pops_destroy(sync.pops); end: gpr_cmdline_destroy(cl); diff --git a/test/core/util/port_server_client.c b/test/core/util/port_server_client.c index 25a14f513e4..e6cf35be94e 100644 --- a/test/core/util/port_server_client.c +++ b/test/core/util/port_server_client.c @@ -51,15 +51,16 @@ typedef struct freereq { gpr_mu *mu; - grpc_pollset *pollset; - grpc_pollset_set *pollset_set; + grpc_pops *pops; int done; } freereq; -static void destroy_pollset_and_shutdown(grpc_exec_ctx *exec_ctx, void *p, - bool success) { - grpc_pollset_destroy(p); - gpr_free(p); +static void destroy_pops_and_shutdown(grpc_exec_ctx *exec_ctx, void *p, + bool success) { + grpc_pollset *pollset = grpc_pops_pollset(p); + grpc_pollset_destroy(pollset); + gpr_free(pollset); + grpc_pops_destroy(p); grpc_shutdown(); } @@ -68,7 +69,7 @@ static void freed_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, freereq *pr = arg; gpr_mu_lock(pr->mu); pr->done = 1; - grpc_pollset_kick(pr->pollset, NULL); + grpc_pollset_kick(grpc_pops_pollset(pr->pops), NULL); gpr_mu_unlock(pr->mu); } @@ -85,25 +86,23 @@ void grpc_free_port_using_server(char *server, int port) { memset(&pr, 0, sizeof(pr)); memset(&req, 0, sizeof(req)); - pr.pollset = gpr_malloc(grpc_pollset_size()); - grpc_pollset_init(pr.pollset, &pr.mu); - pr.pollset_set = grpc_pollset_set_create(); - grpc_pollset_set_add_pollset(&exec_ctx, pr.pollset_set, pr.pollset); - shutdown_closure = - grpc_closure_create(destroy_pollset_and_shutdown, pr.pollset); + grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); + grpc_pollset_init(pollset, &pr.mu); + pr.pops = grpc_pops_create_from_pollset(pollset); + shutdown_closure = grpc_closure_create(destroy_pops_and_shutdown, pr.pops); req.host = server; gpr_asprintf(&path, "/drop/%d", port); req.http.path = path; grpc_httpcli_context_init(&context); - grpc_httpcli_get(&exec_ctx, &context, pr.pollset_set, &req, + grpc_httpcli_get(&exec_ctx, &context, pr.pops, &req, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), freed_port_from_server, &pr); gpr_mu_lock(pr.mu); while (!pr.done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, pr.pollset, &worker, + grpc_pollset_work(&exec_ctx, grpc_pops_pollset(pr.pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1)); } @@ -111,16 +110,15 @@ void grpc_free_port_using_server(char *server, int port) { grpc_httpcli_context_destroy(&context); grpc_exec_ctx_finish(&exec_ctx); - grpc_pollset_shutdown(&exec_ctx, pr.pollset, shutdown_closure); + grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(pr.pops), + shutdown_closure); grpc_exec_ctx_finish(&exec_ctx); - grpc_pollset_set_destroy(pr.pollset_set); gpr_free(path); } typedef struct portreq { gpr_mu *mu; - grpc_pollset *pollset; - grpc_pollset_set *pollset_set; + grpc_pops *pops; int port; int retries; char *server; @@ -156,7 +154,7 @@ static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, pr->retries++; req.host = pr->server; req.http.path = "/get"; - grpc_httpcli_get(exec_ctx, pr->ctx, pr->pollset_set, &req, + grpc_httpcli_get(exec_ctx, pr->ctx, pr->pops, &req, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), got_port_from_server, pr); return; @@ -170,7 +168,7 @@ static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, GPR_ASSERT(port > 1024); gpr_mu_lock(pr->mu); pr->port = port; - grpc_pollset_kick(pr->pollset, NULL); + grpc_pollset_kick(grpc_pops_pollset(pr->pops), NULL); gpr_mu_unlock(pr->mu); } @@ -185,12 +183,10 @@ int grpc_pick_port_using_server(char *server) { memset(&pr, 0, sizeof(pr)); memset(&req, 0, sizeof(req)); - pr.pollset = gpr_malloc(grpc_pollset_size()); - grpc_pollset_init(pr.pollset, &pr.mu); - pr.pollset_set = grpc_pollset_set_create(); - grpc_pollset_set_add_pollset(&exec_ctx, pr.pollset_set, pr.pollset); - shutdown_closure = - grpc_closure_create(destroy_pollset_and_shutdown, pr.pollset); + grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); + grpc_pollset_init(pollset, &pr.mu); + pr.pops = grpc_pops_create_from_pollset(pollset); + shutdown_closure = grpc_closure_create(destroy_pops_and_shutdown, pr.pops); pr.port = -1; pr.server = server; pr.ctx = &context; @@ -199,23 +195,23 @@ int grpc_pick_port_using_server(char *server) { req.http.path = "/get"; grpc_httpcli_context_init(&context); - grpc_httpcli_get(&exec_ctx, &context, pr.pollset_set, &req, + grpc_httpcli_get(&exec_ctx, &context, pr.pops, &req, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), got_port_from_server, &pr); grpc_exec_ctx_finish(&exec_ctx); gpr_mu_lock(pr.mu); while (pr.port == -1) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, pr.pollset, &worker, + grpc_pollset_work(&exec_ctx, grpc_pops_pollset(pr.pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1)); } gpr_mu_unlock(pr.mu); grpc_httpcli_context_destroy(&context); - grpc_pollset_shutdown(&exec_ctx, pr.pollset, shutdown_closure); + grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(pr.pops), + shutdown_closure); grpc_exec_ctx_finish(&exec_ctx); - grpc_pollset_set_destroy(pr.pollset_set); return pr.port; } diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index fadc5c99ca3..6a281f9d50d 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -817,6 +817,7 @@ src/core/lib/iomgr/pollset.h \ src/core/lib/iomgr/pollset_set.h \ src/core/lib/iomgr/pollset_set_windows.h \ src/core/lib/iomgr/pollset_windows.h \ +src/core/lib/iomgr/pops.h \ src/core/lib/iomgr/resolve_address.h \ src/core/lib/iomgr/sockaddr.h \ src/core/lib/iomgr/sockaddr_posix.h \ @@ -918,7 +919,6 @@ third_party/nanopb/pb.h \ third_party/nanopb/pb_common.h \ third_party/nanopb/pb_decode.h \ third_party/nanopb/pb_encode.h \ -src/core/ext/lb_policy/common.h \ src/core/ext/census/aggregation.h \ src/core/ext/census/census_interface.h \ src/core/ext/census/census_rpc_stats.h \ @@ -953,6 +953,7 @@ src/core/lib/iomgr/iomgr_posix.c \ src/core/lib/iomgr/iomgr_windows.c \ src/core/lib/iomgr/pollset_set_windows.c \ src/core/lib/iomgr/pollset_windows.c \ +src/core/lib/iomgr/pops.c \ src/core/lib/iomgr/resolve_address_posix.c \ src/core/lib/iomgr/resolve_address_windows.c \ src/core/lib/iomgr/sockaddr_utils.c \ @@ -1076,7 +1077,6 @@ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ third_party/nanopb/pb_decode.c \ third_party/nanopb/pb_encode.c \ -src/core/ext/lb_policy/common.c \ src/core/ext/lb_policy/pick_first/pick_first.c \ src/core/ext/lb_policy/round_robin/round_robin.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index cf5fbbc79be..6978e14a9eb 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5621,6 +5621,7 @@ "src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/pops.h", "src/core/lib/iomgr/resolve_address.h", "src/core/lib/iomgr/sockaddr.h", "src/core/lib/iomgr/sockaddr_posix.h", @@ -5730,6 +5731,8 @@ "src/core/lib/iomgr/pollset_set_windows.h", "src/core/lib/iomgr/pollset_windows.c", "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/pops.c", + "src/core/lib/iomgr/pops.h", "src/core/lib/iomgr/resolve_address.h", "src/core/lib/iomgr/resolve_address_posix.c", "src/core/lib/iomgr/resolve_address_windows.c", @@ -5922,29 +5925,11 @@ "third_party": false, "type": "filegroup" }, - { - "deps": [ - "gpr", - "grpc_base" - ], - "headers": [ - "src/core/ext/lb_policy/common.h" - ], - "language": "c", - "name": "grpc_lb_policy_common", - "src": [ - "src/core/ext/lb_policy/common.c", - "src/core/ext/lb_policy/common.h" - ], - "third_party": false, - "type": "filegroup" - }, { "deps": [ "gpr", "grpc_base", "grpc_client_config", - "grpc_lb_policy_common", "nanopb" ], "headers": [ @@ -5966,8 +5951,7 @@ "deps": [ "gpr", "grpc_base", - "grpc_client_config", - "grpc_lb_policy_common" + "grpc_client_config" ], "headers": [], "language": "c", @@ -5982,8 +5966,7 @@ "deps": [ "gpr", "grpc_base", - "grpc_client_config", - "grpc_lb_policy_common" + "grpc_client_config" ], "headers": [], "language": "c", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 9eaad77ac7d..6f8f981b009 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -326,6 +326,7 @@ + @@ -427,7 +428,6 @@ - @@ -492,6 +492,8 @@ + + @@ -738,8 +740,6 @@ - - diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 0a61853f297..3d67baa2b4e 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -85,6 +85,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -454,9 +457,6 @@ third_party\nanopb - - src\core\ext\lb_policy - src\core\ext\lb_policy\pick_first @@ -674,6 +674,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -977,9 +980,6 @@ third_party\nanopb - - src\core\ext\lb_policy - src\core\ext\census diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 01214556ce9..4402205e7b5 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -315,6 +315,7 @@ + @@ -402,7 +403,6 @@ - @@ -469,6 +469,8 @@ + + @@ -677,8 +679,6 @@ - - diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index e2de5acd037..ba3b2be0462 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -88,6 +88,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -400,9 +403,6 @@ third_party\nanopb - - src\core\ext\lb_policy - src\core\ext\lb_policy\pick_first @@ -608,6 +608,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -869,9 +872,6 @@ third_party\nanopb - - src\core\ext\lb_policy - src\core\ext\census From a93c4353e79b2913769cc78cecd1da15a6b0e089 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Tue, 3 May 2016 21:23:58 -0700 Subject: [PATCH 0240/1894] clang-format fixes --- .../cronet/transport/cronet_api_dummy.c | 22 +++++++------------ .../cronet/transport/cronet_transport.c | 4 +++- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/src/core/ext/transport/cronet/transport/cronet_api_dummy.c b/src/core/ext/transport/cronet/transport/cronet_api_dummy.c index 200f9f7daaa..687026c9fde 100644 --- a/src/core/ext/transport/cronet/transport/cronet_api_dummy.c +++ b/src/core/ext/transport/cronet/transport/cronet_api_dummy.c @@ -41,12 +41,11 @@ library, so we can build it in all environments */ #include "third_party/objective_c/Cronet/cronet_c_for_grpc.h" #ifdef GRPC_COMPILE_WITH_CRONET - /* link with the real CRONET library in the build system */ +/* link with the real CRONET library in the build system */ #else - /* Dummy implementation of cronet API just to test for build-ability */ +/* Dummy implementation of cronet API just to test for build-ability */ cronet_bidirectional_stream* cronet_bidirectional_stream_create( - cronet_engine* engine, - void* annotation, + cronet_engine* engine, void* annotation, cronet_bidirectional_stream_callback* callback) { GPR_ASSERT(0); return NULL; @@ -58,26 +57,21 @@ int cronet_bidirectional_stream_destroy(cronet_bidirectional_stream* stream) { } int cronet_bidirectional_stream_start( - cronet_bidirectional_stream* stream, - const char* url, - int priority, - const char* method, - const cronet_bidirectional_stream_header_array* headers, + cronet_bidirectional_stream* stream, const char* url, int priority, + const char* method, const cronet_bidirectional_stream_header_array* headers, bool end_of_stream) { GPR_ASSERT(0); return 0; } int cronet_bidirectional_stream_read(cronet_bidirectional_stream* stream, - char* buffer, - int capacity) { + char* buffer, int capacity) { GPR_ASSERT(0); return 0; } int cronet_bidirectional_stream_write(cronet_bidirectional_stream* stream, - const char* buffer, - int count, + const char* buffer, int count, bool end_of_stream) { GPR_ASSERT(0); return 0; @@ -88,4 +82,4 @@ int cronet_bidirectional_stream_cancel(cronet_bidirectional_stream* stream) { return 0; } -#endif /* GRPC_COMPILE_WITH_CRONET */ +#endif /* GRPC_COMPILE_WITH_CRONET */ diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 64bd5f5778d..5da4b873fbf 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -621,7 +621,9 @@ static void destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, gpr_free(s->write_buffer); gpr_free(s->url); gpr_mu_destroy(&s->recv_mu); - if (and_free_memory) { gpr_free(and_free_memory); } + if (and_free_memory) { + gpr_free(and_free_memory); + } } static void destroy_transport(grpc_exec_ctx *exec_ctx, grpc_transport *gt) { From e5c1a154a4b3b2a3afb4efc0447a74e410cdb074 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Tue, 3 May 2016 21:49:21 -0700 Subject: [PATCH 0241/1894] Fixed a compiler warning that only shows up on linux --- src/core/ext/transport/cronet/transport/cronet_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c index 5da4b873fbf..5bb085195c6 100644 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ b/src/core/ext/transport/cronet/transport/cronet_transport.c @@ -218,7 +218,7 @@ static void on_write_completed(cronet_bidirectional_stream *stream, static void process_recv_message(stream_obj *s, const uint8_t *recv_data) { gpr_slice read_data_slice = gpr_slice_malloc((uint32_t)s->total_read_bytes); uint8_t *dst_p = GPR_SLICE_START_PTR(read_data_slice); - memcpy(dst_p, recv_data, s->total_read_bytes); + memcpy(dst_p, recv_data, (size_t)s->total_read_bytes); gpr_slice_buffer_add(&s->read_slice_buffer, read_data_slice); grpc_slice_buffer_stream_init(&s->sbs, &s->read_slice_buffer, 0); *s->recv_message = (grpc_byte_buffer *)&s->sbs; From 823fa1d77a80cda46e93280ab7f90149a8951297 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 3 May 2016 22:19:11 -0700 Subject: [PATCH 0242/1894] Exclude 1byte tests from msan --- test/core/end2end/gen_build_yaml.py | 8 +- tools/run_tests/tests.json | 128 +++++++++++++++++++++------- 2 files changed, 100 insertions(+), 36 deletions(-) diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index cffe5995bcd..3e10ad580fc 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -39,9 +39,9 @@ import hashlib FixtureOptions = collections.namedtuple( 'FixtureOptions', - 'fullstack includes_proxy dns_resolver secure platforms ci_mac tracing') + 'fullstack includes_proxy dns_resolver secure platforms ci_mac tracing exclude_configs') default_unsecure_fixture_options = FixtureOptions( - True, False, True, False, ['windows', 'linux', 'mac', 'posix'], True, False) + True, False, True, False, ['windows', 'linux', 'mac', 'posix'], True, False, []) socketpair_unsecure_fixture_options = default_unsecure_fixture_options._replace(fullstack=False, dns_resolver=False) default_secure_fixture_options = default_unsecure_fixture_options._replace(secure=True) uds_fixture_options = default_unsecure_fixture_options._replace(dns_resolver=False, platforms=['linux', 'mac', 'posix']) @@ -60,7 +60,7 @@ END2END_FIXTURES = { 'h2_proxy': default_unsecure_fixture_options._replace(includes_proxy=True, ci_mac=False), 'h2_sockpair_1byte': socketpair_unsecure_fixture_options._replace( - ci_mac=False), + ci_mac=False, exclude_configs=['msan']), 'h2_sockpair': socketpair_unsecure_fixture_options._replace(ci_mac=False), 'h2_sockpair+trace': socketpair_unsecure_fixture_options._replace( ci_mac=False, tracing=True), @@ -246,7 +246,7 @@ def main(): { 'name': '%s_nosec_test' % f, 'args': [t], - 'exclude_configs': [], + 'exclude_configs': END2END_FIXTURES[f].exclude_configs, 'platforms': END2END_FIXTURES[f].platforms, 'ci_platforms': (END2END_FIXTURES[f].platforms if END2END_FIXTURES[f].ci_mac else without( diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index cf1154426f4..4cc407e39ed 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -21531,7 +21531,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21552,7 +21554,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21573,7 +21577,9 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21594,7 +21600,9 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21615,7 +21623,9 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21636,7 +21646,9 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21657,7 +21669,9 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21678,7 +21692,9 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21699,7 +21715,9 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21720,7 +21738,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21741,7 +21761,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21762,7 +21784,9 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21783,7 +21807,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21804,7 +21830,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21825,7 +21853,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21846,7 +21876,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21867,7 +21899,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21888,7 +21922,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21909,7 +21945,9 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21930,7 +21968,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21951,7 +21991,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21972,7 +22014,9 @@ "posix" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -21993,7 +22037,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -22014,7 +22060,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -22035,7 +22083,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -22056,7 +22106,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -22077,7 +22129,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -22098,7 +22152,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -22119,7 +22175,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -22140,7 +22198,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -22161,7 +22221,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", @@ -22182,7 +22244,9 @@ "posix" ], "cpu_cost": 1.0, - "exclude_configs": [], + "exclude_configs": [ + "msan" + ], "flaky": false, "language": "c", "name": "h2_sockpair_1byte_nosec_test", From 525654a164a8862e14de913753100345932af2fc Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 3 May 2016 22:38:41 -0700 Subject: [PATCH 0243/1894] Fix undefined behavior --- src/core/ext/client_config/subchannel_index.c | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/src/core/ext/client_config/subchannel_index.c b/src/core/ext/client_config/subchannel_index.c index ab8d9bd91d8..b77632bba39 100644 --- a/src/core/ext/client_config/subchannel_index.c +++ b/src/core/ext/client_config/subchannel_index.c @@ -77,9 +77,14 @@ static grpc_subchannel_key *create_key( grpc_subchannel_key *k = gpr_malloc(sizeof(*k)); k->connector = grpc_connector_ref(connector); k->args.filter_count = args->filter_count; - k->args.filters = gpr_malloc(sizeof(*k->args.filters) * k->args.filter_count); - memcpy((grpc_channel_filter *)k->args.filters, args->filters, - sizeof(*k->args.filters) * k->args.filter_count); + if (k->args.filter_count > 0) { + k->args.filters = + gpr_malloc(sizeof(*k->args.filters) * k->args.filter_count); + memcpy((grpc_channel_filter *)k->args.filters, args->filters, + sizeof(*k->args.filters) * k->args.filter_count); + } else { + k->args.filters = NULL; + } k->args.addr_len = args->addr_len; k->args.addr = gpr_malloc(args->addr_len); memcpy(k->args.addr, args->addr, k->args.addr_len); @@ -106,9 +111,11 @@ static int subchannel_key_compare(grpc_subchannel_key *a, if (c != 0) return c; c = memcmp(a->args.addr, b->args.addr, a->args.addr_len); if (c != 0) return c; - c = memcmp(a->args.filters, b->args.filters, - a->args.filter_count * sizeof(*a->args.filters)); - if (c != 0) return c; + if (a->args.filter_count > 0) { + c = memcmp(a->args.filters, b->args.filters, + a->args.filter_count * sizeof(*a->args.filters)); + if (c != 0) return c; + } return grpc_channel_args_compare(a->args.args, b->args.args); } From 68897999237ab5d67278365b3bd444960fa3c4c0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 3 May 2016 23:10:07 -0700 Subject: [PATCH 0244/1894] Fix some ubsan issues: I fear no bugs were harmed in the making of this episode --- build.yaml | 2 ++ src/core/ext/client_config/subchannel.c | 2 +- src/core/ext/client_config/subchannel_index.c | 6 ++++- .../transport/chttp2/transport/frame_goaway.c | 2 +- .../transport/chttp2/transport/hpack_parser.c | 5 ++++ src/core/lib/channel/channel_args.c | 2 +- .../lib/compression/compression_algorithm.c | 1 + src/core/lib/support/murmur_hash.c | 8 +++---- src/core/lib/transport/metadata.c | 2 +- test/core/end2end/fuzzers/api_fuzzer.c | 24 +++++++++++-------- tools/run_tests/configs.json | 3 +++ 11 files changed, 37 insertions(+), 20 deletions(-) diff --git a/build.yaml b/build.yaml index 441752dc3dc..4cf7057a902 100644 --- a/build.yaml +++ b/build.yaml @@ -3247,6 +3247,8 @@ configs: LDFLAGS: -fsanitize=undefined LDXX: clang++ compile_the_world: true + test_environ: + UBSAN_OPTIONS: halt_on_error=1 timeout_multiplier: 1.5 defaults: boringssl: diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c index bd45d3825cc..cfd39e7cfbf 100644 --- a/src/core/ext/client_config/subchannel.c +++ b/src/core/ext/client_config/subchannel.c @@ -320,7 +320,7 @@ grpc_subchannel *grpc_subchannel_create(grpc_exec_ctx *exec_ctx, c->filters = NULL; } c->addr = gpr_malloc(args->addr_len); - memcpy(c->addr, args->addr, args->addr_len); + if (args->addr_len) memcpy(c->addr, args->addr, args->addr_len); c->pollset_set = grpc_pollset_set_create(); c->addr_len = args->addr_len; grpc_set_initial_connect_string(&c->addr, &c->addr_len, diff --git a/src/core/ext/client_config/subchannel_index.c b/src/core/ext/client_config/subchannel_index.c index b77632bba39..69de0e78c18 100644 --- a/src/core/ext/client_config/subchannel_index.c +++ b/src/core/ext/client_config/subchannel_index.c @@ -87,7 +87,9 @@ static grpc_subchannel_key *create_key( } k->args.addr_len = args->addr_len; k->args.addr = gpr_malloc(args->addr_len); - memcpy(k->args.addr, args->addr, k->args.addr_len); + if (k->args.addr_len > 0) { + memcpy(k->args.addr, args->addr, k->args.addr_len); + } k->args.args = copy_channel_args(args->args); return k; } @@ -109,8 +111,10 @@ static int subchannel_key_compare(grpc_subchannel_key *a, if (c != 0) return c; c = GPR_ICMP(a->args.filter_count, b->args.filter_count); if (c != 0) return c; + if (a->args.addr_len) { c = memcmp(a->args.addr, b->args.addr, a->args.addr_len); if (c != 0) return c; + } if (a->args.filter_count > 0) { c = memcmp(a->args.filters, b->args.filters, a->args.filter_count * sizeof(*a->args.filters)); diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.c b/src/core/ext/transport/chttp2/transport/frame_goaway.c index 69accb7696d..aa25b1a231c 100644 --- a/src/core/ext/transport/chttp2/transport/frame_goaway.c +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.c @@ -137,7 +137,7 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( ++cur; /* fallthrough */ case GRPC_CHTTP2_GOAWAY_DEBUG: - memcpy(p->debug_data + p->debug_pos, cur, (size_t)(end - cur)); + if (end != cur) memcpy(p->debug_data + p->debug_pos, cur, (size_t)(end - cur)); GPR_ASSERT((size_t)(end - cur) < UINT32_MAX - p->debug_pos); p->debug_pos += (uint32_t)(end - cur); p->state = GRPC_CHTTP2_GOAWAY_DEBUG; diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.c b/src/core/ext/transport/chttp2/transport/hpack_parser.c index 687936bfd35..9278a7ac42a 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.c +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.c @@ -1138,6 +1138,7 @@ static int parse_string_prefix(grpc_chttp2_hpack_parser *p, const uint8_t *cur, /* append some bytes to a string */ static void append_bytes(grpc_chttp2_hpack_parser_string *str, const uint8_t *data, size_t length) { + if (length == 0) return; if (length + str->length > str->capacity) { GPR_ASSERT(str->length + length <= UINT32_MAX); str->capacity = (uint32_t)(str->length + length); @@ -1445,6 +1446,10 @@ grpc_chttp2_parse_error grpc_chttp2_header_parser_parse( stream id on a header */ if (stream_parsing != NULL) { if (parser->is_boundary) { + if (stream_parsing->header_frames_received == GPR_ARRAY_SIZE(stream_parsing->got_metadata_on_parse)) { + gpr_log(GPR_ERROR, "too many trailer frames"); + return GRPC_CHTTP2_CONNECTION_ERROR; + } stream_parsing ->got_metadata_on_parse[stream_parsing->header_frames_received] = 1; stream_parsing->header_frames_received++; diff --git a/src/core/lib/channel/channel_args.c b/src/core/lib/channel/channel_args.c index 28d2d78d00f..1659c3788bf 100644 --- a/src/core/lib/channel/channel_args.c +++ b/src/core/lib/channel/channel_args.c @@ -132,7 +132,7 @@ grpc_channel_args *grpc_channel_args_normalize(const grpc_channel_args *a) { for (size_t i = 0; i < a->num_args; i++) { args[i] = &a->args[i]; } - qsort(args, a->num_args, sizeof(grpc_arg *), cmp_key_stable); + if (a->num_args > 1) qsort(args, a->num_args, sizeof(grpc_arg *), cmp_key_stable); grpc_channel_args *b = gpr_malloc(sizeof(grpc_channel_args)); b->num_args = a->num_args; diff --git a/src/core/lib/compression/compression_algorithm.c b/src/core/lib/compression/compression_algorithm.c index 7039364b7bc..820871d579b 100644 --- a/src/core/lib/compression/compression_algorithm.c +++ b/src/core/lib/compression/compression_algorithm.c @@ -199,5 +199,6 @@ void grpc_compression_options_disable_algorithm( int grpc_compression_options_is_algorithm_enabled( const grpc_compression_options *opts, grpc_compression_algorithm algorithm) { + if (algorithm >= GRPC_COMPRESS_ALGORITHMS_COUNT) return 0; return GPR_BITGET(opts->enabled_algorithms_bitset, algorithm); } diff --git a/src/core/lib/support/murmur_hash.c b/src/core/lib/support/murmur_hash.c index 5711fff0c0f..7137c1f3133 100644 --- a/src/core/lib/support/murmur_hash.c +++ b/src/core/lib/support/murmur_hash.c @@ -33,6 +33,8 @@ #include "src/core/lib/support/murmur_hash.h" +#include + #define ROTL32(x, r) ((x) << (r)) | ((x) >> (32 - (r))) #define FMIX32(h) \ @@ -42,10 +44,6 @@ (h) *= 0xc2b2ae35; \ (h) ^= (h) >> 16; -/* Block read - if your platform needs to do endian-swapping or can only - handle aligned reads, do the conversion here */ -#define GETBLOCK32(p, i) (p)[(i)] - uint32_t gpr_murmur_hash3(const void *key, size_t len, uint32_t seed) { const uint8_t *data = (const uint8_t *)key; const size_t nblocks = len / 4; @@ -62,7 +60,7 @@ uint32_t gpr_murmur_hash3(const void *key, size_t len, uint32_t seed) { /* body */ for (i = -(int)nblocks; i; i++) { - k1 = GETBLOCK32(blocks, i); + memcpy(&k1, blocks + i, sizeof(uint32_t)); k1 *= c1; k1 = ROTL32(k1, 15); diff --git a/src/core/lib/transport/metadata.c b/src/core/lib/transport/metadata.c index 5847ec9053d..53fe03bdc92 100644 --- a/src/core/lib/transport/metadata.c +++ b/src/core/lib/transport/metadata.c @@ -373,7 +373,7 @@ grpc_mdstr *grpc_mdstr_from_buffer(const uint8_t *buf, size_t length) { ss = g_static_strtab[idx]; if (ss == NULL) break; if (ss->hash == hash && GPR_SLICE_LENGTH(ss->slice) == length && - 0 == memcmp(buf, GPR_SLICE_START_PTR(ss->slice), length)) { + (length == 0 || 0 == memcmp(buf, GPR_SLICE_START_PTR(ss->slice), length))) { GPR_TIMER_END("grpc_mdstr_from_buffer", 0); return ss; } diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c index b133a948ee0..b6150151d5e 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -418,17 +418,21 @@ static void add_to_free(call_state *call, void *p) { static void read_metadata(input_stream *inp, size_t *count, grpc_metadata **metadata, call_state *cs) { *count = next_byte(inp); - *metadata = gpr_malloc(*count * sizeof(**metadata)); - memset(*metadata, 0, *count * sizeof(**metadata)); - for (size_t i = 0; i < *count; i++) { - (*metadata)[i].key = read_string(inp); - read_buffer(inp, (char **)&(*metadata)[i].value, - &(*metadata)[i].value_length); - (*metadata)[i].flags = read_uint32(inp); - add_to_free(cs, (void *)(*metadata)[i].key); - add_to_free(cs, (void *)(*metadata)[i].value); + if (*count) { + *metadata = gpr_malloc(*count * sizeof(**metadata)); + memset(*metadata, 0, *count * sizeof(**metadata)); + for (size_t i = 0; i < *count; i++) { + (*metadata)[i].key = read_string(inp); + read_buffer(inp, (char **)&(*metadata)[i].value, + &(*metadata)[i].value_length); + (*metadata)[i].flags = read_uint32(inp); + add_to_free(cs, (void *)(*metadata)[i].key); + add_to_free(cs, (void *)(*metadata)[i].value); + } + } else { + *metadata = gpr_malloc(1); } - add_to_free(cs, *metadata); + add_to_free(cs, *metadata); } static call_state *destroy_call(call_state *call) { diff --git a/tools/run_tests/configs.json b/tools/run_tests/configs.json index 325e9aa9295..1a67544d184 100644 --- a/tools/run_tests/configs.json +++ b/tools/run_tests/configs.json @@ -56,6 +56,9 @@ }, { "config": "ubsan", + "environ": { + "UBSAN_OPTIONS": "halt_on_error=1" + }, "timeout_multiplier": 1.5 }, { From aea5f12e65afdc19a4d2c9d93723c7cb225db1dd Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 3 May 2016 23:20:49 -0700 Subject: [PATCH 0245/1894] generate projects & clang-format --- src/core/ext/census/grpc_filter.c | 2 +- src/core/plugin_registry/grpc_plugin_registry.c | 9 ++++++--- src/core/plugin_registry/grpc_unsecure_plugin_registry.c | 9 ++++++--- test/core/channel/channel_stack_test.c | 3 +-- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/src/core/ext/census/grpc_filter.c b/src/core/ext/census/grpc_filter.c index 0ff2ffeb8d5..8c4c17ad9ad 100644 --- a/src/core/ext/census/grpc_filter.c +++ b/src/core/ext/census/grpc_filter.c @@ -155,7 +155,7 @@ static void server_init_call_elem(grpc_exec_ctx *exec_ctx, static void server_destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - const grpc_call_stats* stats, + const grpc_call_stats *stats, void *ignored) { call_data *d = elem->call_data; GPR_ASSERT(d != NULL); diff --git a/src/core/plugin_registry/grpc_plugin_registry.c b/src/core/plugin_registry/grpc_plugin_registry.c index 1cd2abb9342..905cd59e23d 100644 --- a/src/core/plugin_registry/grpc_plugin_registry.c +++ b/src/core/plugin_registry/grpc_plugin_registry.c @@ -51,8 +51,10 @@ extern void census_grpc_plugin_init(void); extern void census_grpc_plugin_shutdown(void); void grpc_register_built_in_plugins(void) { - grpc_register_plugin(grpc_chttp2_plugin_init, grpc_chttp2_plugin_shutdown); - grpc_register_plugin(grpc_client_config_init, grpc_client_config_shutdown); + grpc_register_plugin(grpc_chttp2_plugin_init, + grpc_chttp2_plugin_shutdown); + grpc_register_plugin(grpc_client_config_init, + grpc_client_config_shutdown); grpc_register_plugin(grpc_lb_policy_pick_first_init, grpc_lb_policy_pick_first_shutdown); grpc_register_plugin(grpc_lb_policy_round_robin_init, @@ -63,5 +65,6 @@ void grpc_register_built_in_plugins(void) { grpc_resolver_sockaddr_shutdown); grpc_register_plugin(grpc_load_reporting_plugin_init, grpc_load_reporting_plugin_shutdown); - grpc_register_plugin(census_grpc_plugin_init, census_grpc_plugin_shutdown); + grpc_register_plugin(census_grpc_plugin_init, + census_grpc_plugin_shutdown); } diff --git a/src/core/plugin_registry/grpc_unsecure_plugin_registry.c b/src/core/plugin_registry/grpc_unsecure_plugin_registry.c index 86eac132e87..79950787258 100644 --- a/src/core/plugin_registry/grpc_unsecure_plugin_registry.c +++ b/src/core/plugin_registry/grpc_unsecure_plugin_registry.c @@ -51,8 +51,10 @@ extern void census_grpc_plugin_init(void); extern void census_grpc_plugin_shutdown(void); void grpc_register_built_in_plugins(void) { - grpc_register_plugin(grpc_chttp2_plugin_init, grpc_chttp2_plugin_shutdown); - grpc_register_plugin(grpc_client_config_init, grpc_client_config_shutdown); + grpc_register_plugin(grpc_chttp2_plugin_init, + grpc_chttp2_plugin_shutdown); + grpc_register_plugin(grpc_client_config_init, + grpc_client_config_shutdown); grpc_register_plugin(grpc_resolver_dns_native_init, grpc_resolver_dns_native_shutdown); grpc_register_plugin(grpc_resolver_sockaddr_init, @@ -63,5 +65,6 @@ void grpc_register_built_in_plugins(void) { grpc_lb_policy_pick_first_shutdown); grpc_register_plugin(grpc_lb_policy_round_robin_init, grpc_lb_policy_round_robin_shutdown); - grpc_register_plugin(census_grpc_plugin_init, census_grpc_plugin_shutdown); + grpc_register_plugin(census_grpc_plugin_init, + census_grpc_plugin_shutdown); } diff --git a/test/core/channel/channel_stack_test.c b/test/core/channel/channel_stack_test.c index 6b371e60a77..b1ce9d32dd3 100644 --- a/test/core/channel/channel_stack_test.c +++ b/test/core/channel/channel_stack_test.c @@ -63,8 +63,7 @@ static void channel_destroy_func(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem) {} static void call_destroy_func(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - const grpc_call_stats *stats, - void *ignored) { + const grpc_call_stats *stats, void *ignored) { ++*(int *)(elem->channel_data); } From 0d83db5f963d740b63a1d2874b991234f5305706 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 4 May 2016 00:14:14 -0700 Subject: [PATCH 0246/1894] properly lock call to custom lr func --- src/core/ext/load_reporting/load_reporting_filter.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/core/ext/load_reporting/load_reporting_filter.c b/src/core/ext/load_reporting/load_reporting_filter.c index 6970f064b85..902c1102120 100644 --- a/src/core/ext/load_reporting/load_reporting_filter.c +++ b/src/core/ext/load_reporting/load_reporting_filter.c @@ -32,6 +32,7 @@ */ #include +#include #include #include "src/core/ext/load_reporting/load_reporting.h" @@ -40,7 +41,10 @@ #include "src/core/lib/profiling/timers.h" typedef struct call_data { void *dummy; } call_data; -typedef struct channel_data { grpc_load_reporting_config *lrc; } channel_data; +typedef struct channel_data { + gpr_mu mu; + grpc_load_reporting_config *lrc; +} channel_data; /* Constructor for call_data */ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, @@ -52,7 +56,9 @@ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, channel_data *chand = elem->channel_data; if (chand->lrc != NULL) { GPR_TIMER_BEGIN("load_reporting_filter", 0); + gpr_mu_lock(&chand->mu); grpc_load_reporting_config_call(chand->lrc, stats); + gpr_mu_unlock(&chand->mu); GPR_TIMER_END("load_reporting_filter", 0); } } @@ -66,6 +72,7 @@ static void init_channel_elem(grpc_exec_ctx *exec_ctx, channel_data *chand = elem->channel_data; memset(chand, 0, sizeof(channel_data)); + gpr_mu_init(&chand->mu); for (size_t i = 0; i < args->channel_args->num_args; i++) { if (0 == strcmp(args->channel_args->args[i].key, GRPC_ARG_ENABLE_LOAD_REPORTING)) { @@ -83,6 +90,7 @@ static void init_channel_elem(grpc_exec_ctx *exec_ctx, static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem) { channel_data *chand = elem->channel_data; + gpr_mu_destroy(&chand->mu); grpc_load_reporting_config_destroy(chand->lrc); } From e6d03b828da478a7b4205c422bd95aa21f8270d4 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 4 May 2016 09:49:42 -0700 Subject: [PATCH 0247/1894] Fix the build path in config --- tools/run_tests/stress_test/configs/python.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/stress_test/configs/python.json b/tools/run_tests/stress_test/configs/python.json index ea5b5ba2ec4..4f85de1d5f6 100644 --- a/tools/run_tests/stress_test/configs/python.json +++ b/tools/run_tests/stress_test/configs/python.json @@ -1,7 +1,7 @@ { "dockerImages": { "grpc_stress_python" : { - "buildScript": "tools/jenkins/build_interop_stress_image.sh", + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", "dockerFileDir": "grpc_interop_stress_python" } }, From ddc0eb1be2fa1427f8d422146bd56841810fc134 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 4 May 2016 10:27:12 -0700 Subject: [PATCH 0248/1894] Split Node examples into static and dynamic code generation examples --- examples/node/README.md | 10 +- examples/node/dynamic_codegen/README.md | 1 + .../{ => dynamic_codegen}/greeter_client.js | 2 +- .../{ => dynamic_codegen}/greeter_server.js | 2 +- .../route_guide/README.md | 0 .../route_guide/route_guide_client.js | 2 +- .../route_guide/route_guide_db.json | 0 .../route_guide/route_guide_server.js | 2 +- examples/node/package.json | 3 +- examples/node/static_codegen/README.md | 7 + .../node/static_codegen/greeter_client.js | 55 + .../node/static_codegen/greeter_server.js | 59 + .../node/static_codegen/helloworld_grpc_pb.js | 44 + examples/node/static_codegen/helloworld_pb.js | 332 ++++++ .../node/static_codegen/route_guide/README.md | 5 + .../route_guide/route_guide_client.js | 247 ++++ .../route_guide/route_guide_db.json | 601 ++++++++++ .../route_guide/route_guide_grpc_pb.js | 110 ++ .../route_guide/route_guide_pb.js | 1033 +++++++++++++++++ .../route_guide/route_guide_server.js | 261 +++++ 20 files changed, 2769 insertions(+), 7 deletions(-) create mode 100644 examples/node/dynamic_codegen/README.md rename examples/node/{ => dynamic_codegen}/greeter_client.js (96%) rename examples/node/{ => dynamic_codegen}/greeter_server.js (97%) rename examples/node/{ => dynamic_codegen}/route_guide/README.md (100%) rename examples/node/{ => dynamic_codegen}/route_guide/route_guide_client.js (99%) rename examples/node/{ => dynamic_codegen}/route_guide/route_guide_db.json (100%) rename examples/node/{ => dynamic_codegen}/route_guide/route_guide_server.js (99%) create mode 100644 examples/node/static_codegen/README.md create mode 100644 examples/node/static_codegen/greeter_client.js create mode 100644 examples/node/static_codegen/greeter_server.js create mode 100644 examples/node/static_codegen/helloworld_grpc_pb.js create mode 100644 examples/node/static_codegen/helloworld_pb.js create mode 100644 examples/node/static_codegen/route_guide/README.md create mode 100644 examples/node/static_codegen/route_guide/route_guide_client.js create mode 100644 examples/node/static_codegen/route_guide/route_guide_db.json create mode 100644 examples/node/static_codegen/route_guide/route_guide_grpc_pb.js create mode 100644 examples/node/static_codegen/route_guide/route_guide_pb.js create mode 100644 examples/node/static_codegen/route_guide/route_guide_server.js diff --git a/examples/node/README.md b/examples/node/README.md index 28878833ce6..14d779416ae 100644 --- a/examples/node/README.md +++ b/examples/node/README.md @@ -22,18 +22,24 @@ INSTALL TRY IT! ------- +There are two variants of these examples: one with code dynamically generated at runtime using Protobuf.js and one with code statically generated using `protoc`. The examples behave identically, and either server can be used with either client. + - Run the server ```sh $ # from this directory - $ node ./greeter_server.js & + $ node ./dynamic_codegen/greeter_server.js & + $ # OR + $ node ./static_codegen/greeter_server.js & ``` - Run the client ```sh $ # from this directory - $ node ./greeter_client.js + $ node ./dynamic_codegen/greeter_client.js + $ # OR + $ node ./dynamic_codegen/greeter_client.js ``` TUTORIAL diff --git a/examples/node/dynamic_codegen/README.md b/examples/node/dynamic_codegen/README.md new file mode 100644 index 00000000000..1a6ec17a3ee --- /dev/null +++ b/examples/node/dynamic_codegen/README.md @@ -0,0 +1 @@ +This is the dynamic code generation variant of the Node examples. Code in these examples is generated at runtime using Protobuf.js. diff --git a/examples/node/greeter_client.js b/examples/node/dynamic_codegen/greeter_client.js similarity index 96% rename from examples/node/greeter_client.js rename to examples/node/dynamic_codegen/greeter_client.js index 2820acbbb71..e24fb07f4c6 100644 --- a/examples/node/greeter_client.js +++ b/examples/node/dynamic_codegen/greeter_client.js @@ -31,7 +31,7 @@ * */ -var PROTO_PATH = __dirname + '/../protos/helloworld.proto'; +var PROTO_PATH = __dirname + '/../../protos/helloworld.proto'; var grpc = require('grpc'); var hello_proto = grpc.load(PROTO_PATH).helloworld; diff --git a/examples/node/greeter_server.js b/examples/node/dynamic_codegen/greeter_server.js similarity index 97% rename from examples/node/greeter_server.js rename to examples/node/dynamic_codegen/greeter_server.js index e7ad51f6009..aa43e4c6728 100644 --- a/examples/node/greeter_server.js +++ b/examples/node/dynamic_codegen/greeter_server.js @@ -31,7 +31,7 @@ * */ -var PROTO_PATH = __dirname + '/../protos/helloworld.proto'; +var PROTO_PATH = __dirname + '/../../protos/helloworld.proto'; var grpc = require('grpc'); var hello_proto = grpc.load(PROTO_PATH).helloworld; diff --git a/examples/node/route_guide/README.md b/examples/node/dynamic_codegen/route_guide/README.md similarity index 100% rename from examples/node/route_guide/README.md rename to examples/node/dynamic_codegen/route_guide/README.md diff --git a/examples/node/route_guide/route_guide_client.js b/examples/node/dynamic_codegen/route_guide/route_guide_client.js similarity index 99% rename from examples/node/route_guide/route_guide_client.js rename to examples/node/dynamic_codegen/route_guide/route_guide_client.js index fd05a59b63a..775b9addbfc 100644 --- a/examples/node/route_guide/route_guide_client.js +++ b/examples/node/dynamic_codegen/route_guide/route_guide_client.js @@ -31,7 +31,7 @@ * */ -var PROTO_PATH = __dirname + '/../../protos/route_guide.proto'; +var PROTO_PATH = __dirname + '/../../../protos/route_guide.proto'; var async = require('async'); var fs = require('fs'); diff --git a/examples/node/route_guide/route_guide_db.json b/examples/node/dynamic_codegen/route_guide/route_guide_db.json similarity index 100% rename from examples/node/route_guide/route_guide_db.json rename to examples/node/dynamic_codegen/route_guide/route_guide_db.json diff --git a/examples/node/route_guide/route_guide_server.js b/examples/node/dynamic_codegen/route_guide/route_guide_server.js similarity index 99% rename from examples/node/route_guide/route_guide_server.js rename to examples/node/dynamic_codegen/route_guide/route_guide_server.js index 6c01fac2465..6d59348cc92 100644 --- a/examples/node/route_guide/route_guide_server.js +++ b/examples/node/dynamic_codegen/route_guide/route_guide_server.js @@ -31,7 +31,7 @@ * */ -var PROTO_PATH = __dirname + '/../../protos/route_guide.proto'; +var PROTO_PATH = __dirname + '/../../../protos/route_guide.proto'; var fs = require('fs'); var parseArgs = require('minimist'); diff --git a/examples/node/package.json b/examples/node/package.json index d135df2464b..2cae031175e 100644 --- a/examples/node/package.json +++ b/examples/node/package.json @@ -3,7 +3,8 @@ "version": "0.1.0", "dependencies": { "async": "^1.5.2", - "grpc": "0.13.0", + "google-protobuf": "^3.0.0-alpha.5", + "grpc": "^0.14.0", "lodash": "^4.6.1", "minimist": "^1.2.0" } diff --git a/examples/node/static_codegen/README.md b/examples/node/static_codegen/README.md new file mode 100644 index 00000000000..fc97d34a386 --- /dev/null +++ b/examples/node/static_codegen/README.md @@ -0,0 +1,7 @@ +This is the static code generation variant of the Node examples. Code in these examples is pre-generated using protoc and the Node gRPC protoc plugin, and the generated code can be found in various `*_pb.js` files. The command line sequence for generating those files is as follows (assuming that `protoc` and `grpc_node_plugin` are present, and starting in the base directory of this package): + +```sh +cd ../protos +protoc --js_out=import_style=commonjs,binary:../node/static_codegen/ --grpc_out=../node/static_codegen --plugin=protoc-gen-grpc=grpc_node_plugin helloworld.proto +protoc --js_out=import_style=commonjs,binary:../node/static_codegen/route_guide/ --grpc_out=../node/static_codegen/route_guide/ --plugin=protoc-gen-grpc=grpc_node_plugin route_guide.proto +``` diff --git a/examples/node/static_codegen/greeter_client.js b/examples/node/static_codegen/greeter_client.js new file mode 100644 index 00000000000..da80cf34d8e --- /dev/null +++ b/examples/node/static_codegen/greeter_client.js @@ -0,0 +1,55 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +var messages = require('./helloworld_pb'); +var services = require('./helloworld_grpc_pb'); + +var grpc = require('grpc'); + +function main() { + var client = new services.GreeterClient('localhost:50051', + grpc.credentials.createInsecure()); + var user; + if (process.argv.length >= 3) { + user = process.argv[2]; + } else { + user = 'world'; + } + var request = new messages.HelloRequest(); + request.setName(user); + client.sayHello(request, function(err, response) { + console.log('Greeting:', response.getMessage()); + }); +} + +main(); diff --git a/examples/node/static_codegen/greeter_server.js b/examples/node/static_codegen/greeter_server.js new file mode 100644 index 00000000000..a1591b89fa6 --- /dev/null +++ b/examples/node/static_codegen/greeter_server.js @@ -0,0 +1,59 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +var messages = require('./helloworld_pb'); +var services = require('./helloworld_grpc_pb'); + +var grpc = require('grpc'); + +/** + * Implements the SayHello RPC method. + */ +function sayHello(call, callback) { + var reply = new messages.HelloReply(); + reply.setMessage('Hello ' + call.request.getName()); + callback(null, reply); +} + +/** + * Starts an RPC server that receives requests for the Greeter service at the + * sample server port + */ +function main() { + var server = new grpc.Server(); + server.addService(services.GreeterService, {sayHello: sayHello}); + server.bind('0.0.0.0:50051', grpc.ServerCredentials.createInsecure()); + server.start(); +} + +main(); diff --git a/examples/node/static_codegen/helloworld_grpc_pb.js b/examples/node/static_codegen/helloworld_grpc_pb.js new file mode 100644 index 00000000000..846f8b6bf57 --- /dev/null +++ b/examples/node/static_codegen/helloworld_grpc_pb.js @@ -0,0 +1,44 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('grpc'); +var helloworld_pb = require('./helloworld_pb.js'); + +function serialize_HelloReply(arg) { + if (!(arg instanceof helloworld_pb.HelloReply)) { + throw new Error('Expected argument of type HelloReply'); + } + return new Buffer(arg.serializeBinary()); +} + +function deserialize_HelloReply(buffer_arg) { + return helloworld_pb.HelloReply.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_HelloRequest(arg) { + if (!(arg instanceof helloworld_pb.HelloRequest)) { + throw new Error('Expected argument of type HelloRequest'); + } + return new Buffer(arg.serializeBinary()); +} + +function deserialize_HelloRequest(buffer_arg) { + return helloworld_pb.HelloRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var GreeterService = exports.GreeterService = { + sayHello: { + path: '/helloworld.Greeter/SayHello', + requestStream: false, + responseStream: false, + requestType: helloworld_pb.HelloRequest, + responseType: helloworld_pb.HelloReply, + requestSerialize: serialize_HelloRequest, + requestDeserialize: deserialize_HelloRequest, + responseSerialize: serialize_HelloReply, + responseDeserialize: deserialize_HelloReply, + }, +}; + +exports.GreeterClient = grpc.makeGenericClientConstructor(GreeterService); diff --git a/examples/node/static_codegen/helloworld_pb.js b/examples/node/static_codegen/helloworld_pb.js new file mode 100644 index 00000000000..6405bd90f10 --- /dev/null +++ b/examples/node/static_codegen/helloworld_pb.js @@ -0,0 +1,332 @@ +/** + * @fileoverview + * @enhanceable + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.helloworld.HelloReply', null, global); +goog.exportSymbol('proto.helloworld.HelloRequest', null, global); + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.helloworld.HelloRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.helloworld.HelloRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.helloworld.HelloRequest.displayName = 'proto.helloworld.HelloRequest'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.helloworld.HelloRequest.prototype.toObject = function(opt_includeInstance) { + return proto.helloworld.HelloRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.helloworld.HelloRequest} msg The msg instance to transform. + * @return {!Object} + */ +proto.helloworld.HelloRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: msg.getName() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.helloworld.HelloRequest} + */ +proto.helloworld.HelloRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.helloworld.HelloRequest; + return proto.helloworld.HelloRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.helloworld.HelloRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.helloworld.HelloRequest} + */ +proto.helloworld.HelloRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Class method variant: serializes the given message to binary data + * (in protobuf wire format), writing to the given BinaryWriter. + * @param {!proto.helloworld.HelloRequest} message + * @param {!jspb.BinaryWriter} writer + */ +proto.helloworld.HelloRequest.serializeBinaryToWriter = function(message, writer) { + message.serializeBinaryToWriter(writer); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.helloworld.HelloRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + this.serializeBinaryToWriter(writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format), + * writing to the given BinaryWriter. + * @param {!jspb.BinaryWriter} writer + */ +proto.helloworld.HelloRequest.prototype.serializeBinaryToWriter = function (writer) { + var f = undefined; + f = this.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * Creates a deep clone of this proto. No data is shared with the original. + * @return {!proto.helloworld.HelloRequest} The clone. + */ +proto.helloworld.HelloRequest.prototype.cloneMessage = function() { + return /** @type {!proto.helloworld.HelloRequest} */ (jspb.Message.cloneMessage(this)); +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.helloworld.HelloRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, "")); +}; + + +/** @param {string} value */ +proto.helloworld.HelloRequest.prototype.setName = function(value) { + jspb.Message.setField(this, 1, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.helloworld.HelloReply = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.helloworld.HelloReply, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.helloworld.HelloReply.displayName = 'proto.helloworld.HelloReply'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.helloworld.HelloReply.prototype.toObject = function(opt_includeInstance) { + return proto.helloworld.HelloReply.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.helloworld.HelloReply} msg The msg instance to transform. + * @return {!Object} + */ +proto.helloworld.HelloReply.toObject = function(includeInstance, msg) { + var f, obj = { + message: msg.getMessage() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.helloworld.HelloReply} + */ +proto.helloworld.HelloReply.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.helloworld.HelloReply; + return proto.helloworld.HelloReply.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.helloworld.HelloReply} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.helloworld.HelloReply} + */ +proto.helloworld.HelloReply.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Class method variant: serializes the given message to binary data + * (in protobuf wire format), writing to the given BinaryWriter. + * @param {!proto.helloworld.HelloReply} message + * @param {!jspb.BinaryWriter} writer + */ +proto.helloworld.HelloReply.serializeBinaryToWriter = function(message, writer) { + message.serializeBinaryToWriter(writer); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.helloworld.HelloReply.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + this.serializeBinaryToWriter(writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format), + * writing to the given BinaryWriter. + * @param {!jspb.BinaryWriter} writer + */ +proto.helloworld.HelloReply.prototype.serializeBinaryToWriter = function (writer) { + var f = undefined; + f = this.getMessage(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * Creates a deep clone of this proto. No data is shared with the original. + * @return {!proto.helloworld.HelloReply} The clone. + */ +proto.helloworld.HelloReply.prototype.cloneMessage = function() { + return /** @type {!proto.helloworld.HelloReply} */ (jspb.Message.cloneMessage(this)); +}; + + +/** + * optional string message = 1; + * @return {string} + */ +proto.helloworld.HelloReply.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, "")); +}; + + +/** @param {string} value */ +proto.helloworld.HelloReply.prototype.setMessage = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +goog.object.extend(exports, proto.helloworld); diff --git a/examples/node/static_codegen/route_guide/README.md b/examples/node/static_codegen/route_guide/README.md new file mode 100644 index 00000000000..22bcf789863 --- /dev/null +++ b/examples/node/static_codegen/route_guide/README.md @@ -0,0 +1,5 @@ +#gRPC Basics: Node.js sample code + +The files in this folder are the samples used in [gRPC Basics: Node.js][], a detailed tutorial for using gRPC in Node.js. + +[gRPC Basics: Node.js]:http://www.grpc.io/docs/tutorials/basic/node.html diff --git a/examples/node/static_codegen/route_guide/route_guide_client.js b/examples/node/static_codegen/route_guide/route_guide_client.js new file mode 100644 index 00000000000..ecde78616b5 --- /dev/null +++ b/examples/node/static_codegen/route_guide/route_guide_client.js @@ -0,0 +1,247 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +var messages = require('./route_guide_pb'); +var services = require('./route_guide_grpc_pb'); + +var async = require('async'); +var fs = require('fs'); +var parseArgs = require('minimist'); +var path = require('path'); +var _ = require('lodash'); +var grpc = require('grpc'); + +var client = new services.RouteGuideClient('localhost:50051', + grpc.credentials.createInsecure()); + +var COORD_FACTOR = 1e7; + +/** + * Run the getFeature demo. Calls getFeature with a point known to have a + * feature and a point known not to have a feature. + * @param {function} callback Called when this demo is complete + */ +function runGetFeature(callback) { + var next = _.after(2, callback); + function featureCallback(error, feature) { + if (error) { + callback(error); + } + var latitude = feature.getLocation().getLatitude(); + var longitude = feature.getLocation().getLongitude(); + if (feature.getName() === '') { + console.log('Found no feature at ' + + latitude/COORD_FACTOR + ', ' + longitude/COORD_FACTOR); + } else { + console.log('Found feature called "' + feature.getName() + '" at ' + + latitude/COORD_FACTOR + ', ' + longitude/COORD_FACTOR); + } + next(); + } + var point1 = new messages.Point(); + point1.setLatitude(409146138); + point1.setLongitude(-746188906); + var point2 = new messages.Point(); + point2.setLatitude(0); + point2.setLongitude(0); + client.getFeature(point1, featureCallback); + client.getFeature(point2, featureCallback); +} + +/** + * Run the listFeatures demo. Calls listFeatures with a rectangle containing all + * of the features in the pre-generated database. Prints each response as it + * comes in. + * @param {function} callback Called when this demo is complete + */ +function runListFeatures(callback) { + var rect = new messages.Rectangle(); + var lo = new messages.Point(); + lo.setLatitude(400000000); + lo.setLongitude(-750000000); + rect.setLo(lo); + var hi = new messages.Point(); + hi.setLatitude(420000000); + hi.setLongitude(-730000000); + rect.setHi(hi); + console.log('Looking for features between 40, -75 and 42, -73'); + var call = client.listFeatures(rect); + call.on('data', function(feature) { + console.log('Found feature called "' + feature.getName() + '" at ' + + feature.getLocation().getLatitude()/COORD_FACTOR + ', ' + + feature.getLocation().getLongitude()/COORD_FACTOR); + }); + call.on('end', callback); +} + +/** + * Run the recordRoute demo. Sends several randomly chosen points from the + * pre-generated feature database with a variable delay in between. Prints the + * statistics when they are sent from the server. + * @param {function} callback Called when this demo is complete + */ +function runRecordRoute(callback) { + var argv = parseArgs(process.argv, { + string: 'db_path' + }); + fs.readFile(path.resolve(argv.db_path), function(err, data) { + if (err) callback(err); + // Transform the loaded features to Feature objects + var feature_list = _.map(JSON.parse(data), function(value) { + var feature = new messages.Feature(); + feature.setName(value.name); + var location = new messages.Point(); + location.setLatitude(value.location.latitude); + location.setLongitude(value.location.longitude); + feature.setLocation(location); + return feature; + }); + + var num_points = 10; + var call = client.recordRoute(function(error, stats) { + if (error) { + callback(error); + } + console.log('Finished trip with', stats.getPointCount(), 'points'); + console.log('Passed', stats.getFeatureCount(), 'features'); + console.log('Travelled', stats.getDistance(), 'meters'); + console.log('It took', stats.getElapsedTime(), 'seconds'); + callback(); + }); + /** + * Constructs a function that asynchronously sends the given point and then + * delays sending its callback + * @param {messages.Point} location The point to send + * @return {function(function)} The function that sends the point + */ + function pointSender(location) { + /** + * Sends the point, then calls the callback after a delay + * @param {function} callback Called when complete + */ + return function(callback) { + console.log('Visiting point ' + location.getLatitude()/COORD_FACTOR + + ', ' + location.getLongitude()/COORD_FACTOR); + call.write(location); + _.delay(callback, _.random(500, 1500)); + }; + } + var point_senders = []; + for (var i = 0; i < num_points; i++) { + var rand_point = feature_list[_.random(0, feature_list.length - 1)]; + point_senders[i] = pointSender(rand_point.getLocation()); + } + async.series(point_senders, function() { + call.end(); + }); + }); +} + +/** + * Run the routeChat demo. Send some chat messages, and print any chat messages + * that are sent from the server. + * @param {function} callback Called when the demo is complete + */ +function runRouteChat(callback) { + var call = client.routeChat(); + call.on('data', function(note) { + console.log('Got message "' + note.getMessage() + '" at ' + + note.getLocation().getLatitude() + ', ' + + note.getLocation().getLongitude()); + }); + + call.on('end', callback); + + var notes = [{ + location: { + latitude: 0, + longitude: 0 + }, + message: 'First message' + }, { + location: { + latitude: 0, + longitude: 1 + }, + message: 'Second message' + }, { + location: { + latitude: 1, + longitude: 0 + }, + message: 'Third message' + }, { + location: { + latitude: 0, + longitude: 0 + }, + message: 'Fourth message' + }]; + for (var i = 0; i < notes.length; i++) { + var note = notes[i]; + console.log('Sending message "' + note.message + '" at ' + + note.location.latitude + ', ' + note.location.longitude); + var noteMsg = new messages.RouteNote(); + noteMsg.setMessage(note.message); + var location = new messages.Point(); + location.setLatitude(note.location.latitude); + location.setLongitude(note.location.longitude); + noteMsg.setLocation(location); + call.write(noteMsg); + } + call.end(); +} + +/** + * Run all of the demos in order + */ +function main() { + async.series([ + runGetFeature, + runListFeatures, + runRecordRoute, + runRouteChat + ]); +} + +if (require.main === module) { + main(); +} + +exports.runGetFeature = runGetFeature; + +exports.runListFeatures = runListFeatures; + +exports.runRecordRoute = runRecordRoute; + +exports.runRouteChat = runRouteChat; diff --git a/examples/node/static_codegen/route_guide/route_guide_db.json b/examples/node/static_codegen/route_guide/route_guide_db.json new file mode 100644 index 00000000000..9d6a980ab7d --- /dev/null +++ b/examples/node/static_codegen/route_guide/route_guide_db.json @@ -0,0 +1,601 @@ +[{ + "location": { + "latitude": 407838351, + "longitude": -746143763 + }, + "name": "Patriots Path, Mendham, NJ 07945, USA" +}, { + "location": { + "latitude": 408122808, + "longitude": -743999179 + }, + "name": "101 New Jersey 10, Whippany, NJ 07981, USA" +}, { + "location": { + "latitude": 413628156, + "longitude": -749015468 + }, + "name": "U.S. 6, Shohola, PA 18458, USA" +}, { + "location": { + "latitude": 419999544, + "longitude": -740371136 + }, + "name": "5 Conners Road, Kingston, NY 12401, USA" +}, { + "location": { + "latitude": 414008389, + "longitude": -743951297 + }, + "name": "Mid Hudson Psychiatric Center, New Hampton, NY 10958, USA" +}, { + "location": { + "latitude": 419611318, + "longitude": -746524769 + }, + "name": "287 Flugertown Road, Livingston Manor, NY 12758, USA" +}, { + "location": { + "latitude": 406109563, + "longitude": -742186778 + }, + "name": "4001 Tremley Point Road, Linden, NJ 07036, USA" +}, { + "location": { + "latitude": 416802456, + "longitude": -742370183 + }, + "name": "352 South Mountain Road, Wallkill, NY 12589, USA" +}, { + "location": { + "latitude": 412950425, + "longitude": -741077389 + }, + "name": "Bailey Turn Road, Harriman, NY 10926, USA" +}, { + "location": { + "latitude": 412144655, + "longitude": -743949739 + }, + "name": "193-199 Wawayanda Road, Hewitt, NJ 07421, USA" +}, { + "location": { + "latitude": 415736605, + "longitude": -742847522 + }, + "name": "406-496 Ward Avenue, Pine Bush, NY 12566, USA" +}, { + "location": { + "latitude": 413843930, + "longitude": -740501726 + }, + "name": "162 Merrill Road, Highland Mills, NY 10930, USA" +}, { + "location": { + "latitude": 410873075, + "longitude": -744459023 + }, + "name": "Clinton Road, West Milford, NJ 07480, USA" +}, { + "location": { + "latitude": 412346009, + "longitude": -744026814 + }, + "name": "16 Old Brook Lane, Warwick, NY 10990, USA" +}, { + "location": { + "latitude": 402948455, + "longitude": -747903913 + }, + "name": "3 Drake Lane, Pennington, NJ 08534, USA" +}, { + "location": { + "latitude": 406337092, + "longitude": -740122226 + }, + "name": "6324 8th Avenue, Brooklyn, NY 11220, USA" +}, { + "location": { + "latitude": 406421967, + "longitude": -747727624 + }, + "name": "1 Merck Access Road, Whitehouse Station, NJ 08889, USA" +}, { + "location": { + "latitude": 416318082, + "longitude": -749677716 + }, + "name": "78-98 Schalck Road, Narrowsburg, NY 12764, USA" +}, { + "location": { + "latitude": 415301720, + "longitude": -748416257 + }, + "name": "282 Lakeview Drive Road, Highland Lake, NY 12743, USA" +}, { + "location": { + "latitude": 402647019, + "longitude": -747071791 + }, + "name": "330 Evelyn Avenue, Hamilton Township, NJ 08619, USA" +}, { + "location": { + "latitude": 412567807, + "longitude": -741058078 + }, + "name": "New York State Reference Route 987E, Southfields, NY 10975, USA" +}, { + "location": { + "latitude": 416855156, + "longitude": -744420597 + }, + "name": "103-271 Tempaloni Road, Ellenville, NY 12428, USA" +}, { + "location": { + "latitude": 404663628, + "longitude": -744820157 + }, + "name": "1300 Airport Road, North Brunswick Township, NJ 08902, USA" +}, { + "location": { + "latitude": 407113723, + "longitude": -749746483 + }, + "name": "" +}, { + "location": { + "latitude": 402133926, + "longitude": -743613249 + }, + "name": "" +}, { + "location": { + "latitude": 400273442, + "longitude": -741220915 + }, + "name": "" +}, { + "location": { + "latitude": 411236786, + "longitude": -744070769 + }, + "name": "" +}, { + "location": { + "latitude": 411633782, + "longitude": -746784970 + }, + "name": "211-225 Plains Road, Augusta, NJ 07822, USA" +}, { + "location": { + "latitude": 415830701, + "longitude": -742952812 + }, + "name": "" +}, { + "location": { + "latitude": 413447164, + "longitude": -748712898 + }, + "name": "165 Pedersen Ridge Road, Milford, PA 18337, USA" +}, { + "location": { + "latitude": 405047245, + "longitude": -749800722 + }, + "name": "100-122 Locktown Road, Frenchtown, NJ 08825, USA" +}, { + "location": { + "latitude": 418858923, + "longitude": -746156790 + }, + "name": "" +}, { + "location": { + "latitude": 417951888, + "longitude": -748484944 + }, + "name": "650-652 Willi Hill Road, Swan Lake, NY 12783, USA" +}, { + "location": { + "latitude": 407033786, + "longitude": -743977337 + }, + "name": "26 East 3rd Street, New Providence, NJ 07974, USA" +}, { + "location": { + "latitude": 417548014, + "longitude": -740075041 + }, + "name": "" +}, { + "location": { + "latitude": 410395868, + "longitude": -744972325 + }, + "name": "" +}, { + "location": { + "latitude": 404615353, + "longitude": -745129803 + }, + "name": "" +}, { + "location": { + "latitude": 406589790, + "longitude": -743560121 + }, + "name": "611 Lawrence Avenue, Westfield, NJ 07090, USA" +}, { + "location": { + "latitude": 414653148, + "longitude": -740477477 + }, + "name": "18 Lannis Avenue, New Windsor, NY 12553, USA" +}, { + "location": { + "latitude": 405957808, + "longitude": -743255336 + }, + "name": "82-104 Amherst Avenue, Colonia, NJ 07067, USA" +}, { + "location": { + "latitude": 411733589, + "longitude": -741648093 + }, + "name": "170 Seven Lakes Drive, Sloatsburg, NY 10974, USA" +}, { + "location": { + "latitude": 412676291, + "longitude": -742606606 + }, + "name": "1270 Lakes Road, Monroe, NY 10950, USA" +}, { + "location": { + "latitude": 409224445, + "longitude": -748286738 + }, + "name": "509-535 Alphano Road, Great Meadows, NJ 07838, USA" +}, { + "location": { + "latitude": 406523420, + "longitude": -742135517 + }, + "name": "652 Garden Street, Elizabeth, NJ 07202, USA" +}, { + "location": { + "latitude": 401827388, + "longitude": -740294537 + }, + "name": "349 Sea Spray Court, Neptune City, NJ 07753, USA" +}, { + "location": { + "latitude": 410564152, + "longitude": -743685054 + }, + "name": "13-17 Stanley Street, West Milford, NJ 07480, USA" +}, { + "location": { + "latitude": 408472324, + "longitude": -740726046 + }, + "name": "47 Industrial Avenue, Teterboro, NJ 07608, USA" +}, { + "location": { + "latitude": 412452168, + "longitude": -740214052 + }, + "name": "5 White Oak Lane, Stony Point, NY 10980, USA" +}, { + "location": { + "latitude": 409146138, + "longitude": -746188906 + }, + "name": "Berkshire Valley Management Area Trail, Jefferson, NJ, USA" +}, { + "location": { + "latitude": 404701380, + "longitude": -744781745 + }, + "name": "1007 Jersey Avenue, New Brunswick, NJ 08901, USA" +}, { + "location": { + "latitude": 409642566, + "longitude": -746017679 + }, + "name": "6 East Emerald Isle Drive, Lake Hopatcong, NJ 07849, USA" +}, { + "location": { + "latitude": 408031728, + "longitude": -748645385 + }, + "name": "1358-1474 New Jersey 57, Port Murray, NJ 07865, USA" +}, { + "location": { + "latitude": 413700272, + "longitude": -742135189 + }, + "name": "367 Prospect Road, Chester, NY 10918, USA" +}, { + "location": { + "latitude": 404310607, + "longitude": -740282632 + }, + "name": "10 Simon Lake Drive, Atlantic Highlands, NJ 07716, USA" +}, { + "location": { + "latitude": 409319800, + "longitude": -746201391 + }, + "name": "11 Ward Street, Mount Arlington, NJ 07856, USA" +}, { + "location": { + "latitude": 406685311, + "longitude": -742108603 + }, + "name": "300-398 Jefferson Avenue, Elizabeth, NJ 07201, USA" +}, { + "location": { + "latitude": 419018117, + "longitude": -749142781 + }, + "name": "43 Dreher Road, Roscoe, NY 12776, USA" +}, { + "location": { + "latitude": 412856162, + "longitude": -745148837 + }, + "name": "Swan Street, Pine Island, NY 10969, USA" +}, { + "location": { + "latitude": 416560744, + "longitude": -746721964 + }, + "name": "66 Pleasantview Avenue, Monticello, NY 12701, USA" +}, { + "location": { + "latitude": 405314270, + "longitude": -749836354 + }, + "name": "" +}, { + "location": { + "latitude": 414219548, + "longitude": -743327440 + }, + "name": "" +}, { + "location": { + "latitude": 415534177, + "longitude": -742900616 + }, + "name": "565 Winding Hills Road, Montgomery, NY 12549, USA" +}, { + "location": { + "latitude": 406898530, + "longitude": -749127080 + }, + "name": "231 Rocky Run Road, Glen Gardner, NJ 08826, USA" +}, { + "location": { + "latitude": 407586880, + "longitude": -741670168 + }, + "name": "100 Mount Pleasant Avenue, Newark, NJ 07104, USA" +}, { + "location": { + "latitude": 400106455, + "longitude": -742870190 + }, + "name": "517-521 Huntington Drive, Manchester Township, NJ 08759, USA" +}, { + "location": { + "latitude": 400066188, + "longitude": -746793294 + }, + "name": "" +}, { + "location": { + "latitude": 418803880, + "longitude": -744102673 + }, + "name": "40 Mountain Road, Napanoch, NY 12458, USA" +}, { + "location": { + "latitude": 414204288, + "longitude": -747895140 + }, + "name": "" +}, { + "location": { + "latitude": 414777405, + "longitude": -740615601 + }, + "name": "" +}, { + "location": { + "latitude": 415464475, + "longitude": -747175374 + }, + "name": "48 North Road, Forestburgh, NY 12777, USA" +}, { + "location": { + "latitude": 404062378, + "longitude": -746376177 + }, + "name": "" +}, { + "location": { + "latitude": 405688272, + "longitude": -749285130 + }, + "name": "" +}, { + "location": { + "latitude": 400342070, + "longitude": -748788996 + }, + "name": "" +}, { + "location": { + "latitude": 401809022, + "longitude": -744157964 + }, + "name": "" +}, { + "location": { + "latitude": 404226644, + "longitude": -740517141 + }, + "name": "9 Thompson Avenue, Leonardo, NJ 07737, USA" +}, { + "location": { + "latitude": 410322033, + "longitude": -747871659 + }, + "name": "" +}, { + "location": { + "latitude": 407100674, + "longitude": -747742727 + }, + "name": "" +}, { + "location": { + "latitude": 418811433, + "longitude": -741718005 + }, + "name": "213 Bush Road, Stone Ridge, NY 12484, USA" +}, { + "location": { + "latitude": 415034302, + "longitude": -743850945 + }, + "name": "" +}, { + "location": { + "latitude": 411349992, + "longitude": -743694161 + }, + "name": "" +}, { + "location": { + "latitude": 404839914, + "longitude": -744759616 + }, + "name": "1-17 Bergen Court, New Brunswick, NJ 08901, USA" +}, { + "location": { + "latitude": 414638017, + "longitude": -745957854 + }, + "name": "35 Oakland Valley Road, Cuddebackville, NY 12729, USA" +}, { + "location": { + "latitude": 412127800, + "longitude": -740173578 + }, + "name": "" +}, { + "location": { + "latitude": 401263460, + "longitude": -747964303 + }, + "name": "" +}, { + "location": { + "latitude": 412843391, + "longitude": -749086026 + }, + "name": "" +}, { + "location": { + "latitude": 418512773, + "longitude": -743067823 + }, + "name": "" +}, { + "location": { + "latitude": 404318328, + "longitude": -740835638 + }, + "name": "42-102 Main Street, Belford, NJ 07718, USA" +}, { + "location": { + "latitude": 419020746, + "longitude": -741172328 + }, + "name": "" +}, { + "location": { + "latitude": 404080723, + "longitude": -746119569 + }, + "name": "" +}, { + "location": { + "latitude": 401012643, + "longitude": -744035134 + }, + "name": "" +}, { + "location": { + "latitude": 404306372, + "longitude": -741079661 + }, + "name": "" +}, { + "location": { + "latitude": 403966326, + "longitude": -748519297 + }, + "name": "" +}, { + "location": { + "latitude": 405002031, + "longitude": -748407866 + }, + "name": "" +}, { + "location": { + "latitude": 409532885, + "longitude": -742200683 + }, + "name": "" +}, { + "location": { + "latitude": 416851321, + "longitude": -742674555 + }, + "name": "" +}, { + "location": { + "latitude": 406411633, + "longitude": -741722051 + }, + "name": "3387 Richmond Terrace, Staten Island, NY 10303, USA" +}, { + "location": { + "latitude": 413069058, + "longitude": -744597778 + }, + "name": "261 Van Sickle Road, Goshen, NY 10924, USA" +}, { + "location": { + "latitude": 418465462, + "longitude": -746859398 + }, + "name": "" +}, { + "location": { + "latitude": 411733222, + "longitude": -744228360 + }, + "name": "" +}, { + "location": { + "latitude": 410248224, + "longitude": -747127767 + }, + "name": "3 Hasta Way, Newton, NJ 07860, USA" +}] diff --git a/examples/node/static_codegen/route_guide/route_guide_grpc_pb.js b/examples/node/static_codegen/route_guide/route_guide_grpc_pb.js new file mode 100644 index 00000000000..1dd71331dbd --- /dev/null +++ b/examples/node/static_codegen/route_guide/route_guide_grpc_pb.js @@ -0,0 +1,110 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('grpc'); +var route_guide_pb = require('./route_guide_pb.js'); + +function serialize_Feature(arg) { + if (!(arg instanceof route_guide_pb.Feature)) { + throw new Error('Expected argument of type Feature'); + } + return new Buffer(arg.serializeBinary()); +} + +function deserialize_Feature(buffer_arg) { + return route_guide_pb.Feature.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_Point(arg) { + if (!(arg instanceof route_guide_pb.Point)) { + throw new Error('Expected argument of type Point'); + } + return new Buffer(arg.serializeBinary()); +} + +function deserialize_Point(buffer_arg) { + return route_guide_pb.Point.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_Rectangle(arg) { + if (!(arg instanceof route_guide_pb.Rectangle)) { + throw new Error('Expected argument of type Rectangle'); + } + return new Buffer(arg.serializeBinary()); +} + +function deserialize_Rectangle(buffer_arg) { + return route_guide_pb.Rectangle.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_RouteNote(arg) { + if (!(arg instanceof route_guide_pb.RouteNote)) { + throw new Error('Expected argument of type RouteNote'); + } + return new Buffer(arg.serializeBinary()); +} + +function deserialize_RouteNote(buffer_arg) { + return route_guide_pb.RouteNote.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_RouteSummary(arg) { + if (!(arg instanceof route_guide_pb.RouteSummary)) { + throw new Error('Expected argument of type RouteSummary'); + } + return new Buffer(arg.serializeBinary()); +} + +function deserialize_RouteSummary(buffer_arg) { + return route_guide_pb.RouteSummary.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var RouteGuideService = exports.RouteGuideService = { + getFeature: { + path: '/routeguide.RouteGuide/GetFeature', + requestStream: false, + responseStream: false, + requestType: route_guide_pb.Point, + responseType: route_guide_pb.Feature, + requestSerialize: serialize_Point, + requestDeserialize: deserialize_Point, + responseSerialize: serialize_Feature, + responseDeserialize: deserialize_Feature, + }, + listFeatures: { + path: '/routeguide.RouteGuide/ListFeatures', + requestStream: false, + responseStream: true, + requestType: route_guide_pb.Rectangle, + responseType: route_guide_pb.Feature, + requestSerialize: serialize_Rectangle, + requestDeserialize: deserialize_Rectangle, + responseSerialize: serialize_Feature, + responseDeserialize: deserialize_Feature, + }, + recordRoute: { + path: '/routeguide.RouteGuide/RecordRoute', + requestStream: true, + responseStream: false, + requestType: route_guide_pb.Point, + responseType: route_guide_pb.RouteSummary, + requestSerialize: serialize_Point, + requestDeserialize: deserialize_Point, + responseSerialize: serialize_RouteSummary, + responseDeserialize: deserialize_RouteSummary, + }, + routeChat: { + path: '/routeguide.RouteGuide/RouteChat', + requestStream: true, + responseStream: true, + requestType: route_guide_pb.RouteNote, + responseType: route_guide_pb.RouteNote, + requestSerialize: serialize_RouteNote, + requestDeserialize: deserialize_RouteNote, + responseSerialize: serialize_RouteNote, + responseDeserialize: deserialize_RouteNote, + }, +}; + +exports.RouteGuideClient = grpc.makeGenericClientConstructor(RouteGuideService); diff --git a/examples/node/static_codegen/route_guide/route_guide_pb.js b/examples/node/static_codegen/route_guide/route_guide_pb.js new file mode 100644 index 00000000000..f604cd6d508 --- /dev/null +++ b/examples/node/static_codegen/route_guide/route_guide_pb.js @@ -0,0 +1,1033 @@ +/** + * @fileoverview + * @enhanceable + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.routeguide.Feature', null, global); +goog.exportSymbol('proto.routeguide.Point', null, global); +goog.exportSymbol('proto.routeguide.Rectangle', null, global); +goog.exportSymbol('proto.routeguide.RouteNote', null, global); +goog.exportSymbol('proto.routeguide.RouteSummary', null, global); + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.routeguide.Point = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routeguide.Point, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routeguide.Point.displayName = 'proto.routeguide.Point'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.routeguide.Point.prototype.toObject = function(opt_includeInstance) { + return proto.routeguide.Point.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.routeguide.Point} msg The msg instance to transform. + * @return {!Object} + */ +proto.routeguide.Point.toObject = function(includeInstance, msg) { + var f, obj = { + latitude: msg.getLatitude(), + longitude: msg.getLongitude() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.routeguide.Point} + */ +proto.routeguide.Point.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routeguide.Point; + return proto.routeguide.Point.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routeguide.Point} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routeguide.Point} + */ +proto.routeguide.Point.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setLatitude(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setLongitude(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Class method variant: serializes the given message to binary data + * (in protobuf wire format), writing to the given BinaryWriter. + * @param {!proto.routeguide.Point} message + * @param {!jspb.BinaryWriter} writer + */ +proto.routeguide.Point.serializeBinaryToWriter = function(message, writer) { + message.serializeBinaryToWriter(writer); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routeguide.Point.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + this.serializeBinaryToWriter(writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format), + * writing to the given BinaryWriter. + * @param {!jspb.BinaryWriter} writer + */ +proto.routeguide.Point.prototype.serializeBinaryToWriter = function (writer) { + var f = undefined; + f = this.getLatitude(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = this.getLongitude(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * Creates a deep clone of this proto. No data is shared with the original. + * @return {!proto.routeguide.Point} The clone. + */ +proto.routeguide.Point.prototype.cloneMessage = function() { + return /** @type {!proto.routeguide.Point} */ (jspb.Message.cloneMessage(this)); +}; + + +/** + * optional int32 latitude = 1; + * @return {number} + */ +proto.routeguide.Point.prototype.getLatitude = function() { + return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.routeguide.Point.prototype.setLatitude = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int32 longitude = 2; + * @return {number} + */ +proto.routeguide.Point.prototype.getLongitude = function() { + return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.routeguide.Point.prototype.setLongitude = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.routeguide.Rectangle = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routeguide.Rectangle, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routeguide.Rectangle.displayName = 'proto.routeguide.Rectangle'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.routeguide.Rectangle.prototype.toObject = function(opt_includeInstance) { + return proto.routeguide.Rectangle.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.routeguide.Rectangle} msg The msg instance to transform. + * @return {!Object} + */ +proto.routeguide.Rectangle.toObject = function(includeInstance, msg) { + var f, obj = { + lo: (f = msg.getLo()) && proto.routeguide.Point.toObject(includeInstance, f), + hi: (f = msg.getHi()) && proto.routeguide.Point.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.routeguide.Rectangle} + */ +proto.routeguide.Rectangle.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routeguide.Rectangle; + return proto.routeguide.Rectangle.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routeguide.Rectangle} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routeguide.Rectangle} + */ +proto.routeguide.Rectangle.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.routeguide.Point; + reader.readMessage(value,proto.routeguide.Point.deserializeBinaryFromReader); + msg.setLo(value); + break; + case 2: + var value = new proto.routeguide.Point; + reader.readMessage(value,proto.routeguide.Point.deserializeBinaryFromReader); + msg.setHi(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Class method variant: serializes the given message to binary data + * (in protobuf wire format), writing to the given BinaryWriter. + * @param {!proto.routeguide.Rectangle} message + * @param {!jspb.BinaryWriter} writer + */ +proto.routeguide.Rectangle.serializeBinaryToWriter = function(message, writer) { + message.serializeBinaryToWriter(writer); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routeguide.Rectangle.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + this.serializeBinaryToWriter(writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format), + * writing to the given BinaryWriter. + * @param {!jspb.BinaryWriter} writer + */ +proto.routeguide.Rectangle.prototype.serializeBinaryToWriter = function (writer) { + var f = undefined; + f = this.getLo(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.routeguide.Point.serializeBinaryToWriter + ); + } + f = this.getHi(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.routeguide.Point.serializeBinaryToWriter + ); + } +}; + + +/** + * Creates a deep clone of this proto. No data is shared with the original. + * @return {!proto.routeguide.Rectangle} The clone. + */ +proto.routeguide.Rectangle.prototype.cloneMessage = function() { + return /** @type {!proto.routeguide.Rectangle} */ (jspb.Message.cloneMessage(this)); +}; + + +/** + * optional Point lo = 1; + * @return {proto.routeguide.Point} + */ +proto.routeguide.Rectangle.prototype.getLo = function() { + return /** @type{proto.routeguide.Point} */ ( + jspb.Message.getWrapperField(this, proto.routeguide.Point, 1)); +}; + + +/** @param {proto.routeguide.Point|undefined} value */ +proto.routeguide.Rectangle.prototype.setLo = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.routeguide.Rectangle.prototype.clearLo = function() { + this.setLo(undefined); +}; + + +/** + * optional Point hi = 2; + * @return {proto.routeguide.Point} + */ +proto.routeguide.Rectangle.prototype.getHi = function() { + return /** @type{proto.routeguide.Point} */ ( + jspb.Message.getWrapperField(this, proto.routeguide.Point, 2)); +}; + + +/** @param {proto.routeguide.Point|undefined} value */ +proto.routeguide.Rectangle.prototype.setHi = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.routeguide.Rectangle.prototype.clearHi = function() { + this.setHi(undefined); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.routeguide.Feature = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routeguide.Feature, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routeguide.Feature.displayName = 'proto.routeguide.Feature'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.routeguide.Feature.prototype.toObject = function(opt_includeInstance) { + return proto.routeguide.Feature.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.routeguide.Feature} msg The msg instance to transform. + * @return {!Object} + */ +proto.routeguide.Feature.toObject = function(includeInstance, msg) { + var f, obj = { + name: msg.getName(), + location: (f = msg.getLocation()) && proto.routeguide.Point.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.routeguide.Feature} + */ +proto.routeguide.Feature.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routeguide.Feature; + return proto.routeguide.Feature.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routeguide.Feature} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routeguide.Feature} + */ +proto.routeguide.Feature.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new proto.routeguide.Point; + reader.readMessage(value,proto.routeguide.Point.deserializeBinaryFromReader); + msg.setLocation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Class method variant: serializes the given message to binary data + * (in protobuf wire format), writing to the given BinaryWriter. + * @param {!proto.routeguide.Feature} message + * @param {!jspb.BinaryWriter} writer + */ +proto.routeguide.Feature.serializeBinaryToWriter = function(message, writer) { + message.serializeBinaryToWriter(writer); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routeguide.Feature.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + this.serializeBinaryToWriter(writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format), + * writing to the given BinaryWriter. + * @param {!jspb.BinaryWriter} writer + */ +proto.routeguide.Feature.prototype.serializeBinaryToWriter = function (writer) { + var f = undefined; + f = this.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = this.getLocation(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.routeguide.Point.serializeBinaryToWriter + ); + } +}; + + +/** + * Creates a deep clone of this proto. No data is shared with the original. + * @return {!proto.routeguide.Feature} The clone. + */ +proto.routeguide.Feature.prototype.cloneMessage = function() { + return /** @type {!proto.routeguide.Feature} */ (jspb.Message.cloneMessage(this)); +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.routeguide.Feature.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, "")); +}; + + +/** @param {string} value */ +proto.routeguide.Feature.prototype.setName = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional Point location = 2; + * @return {proto.routeguide.Point} + */ +proto.routeguide.Feature.prototype.getLocation = function() { + return /** @type{proto.routeguide.Point} */ ( + jspb.Message.getWrapperField(this, proto.routeguide.Point, 2)); +}; + + +/** @param {proto.routeguide.Point|undefined} value */ +proto.routeguide.Feature.prototype.setLocation = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.routeguide.Feature.prototype.clearLocation = function() { + this.setLocation(undefined); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.routeguide.RouteNote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routeguide.RouteNote, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routeguide.RouteNote.displayName = 'proto.routeguide.RouteNote'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.routeguide.RouteNote.prototype.toObject = function(opt_includeInstance) { + return proto.routeguide.RouteNote.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.routeguide.RouteNote} msg The msg instance to transform. + * @return {!Object} + */ +proto.routeguide.RouteNote.toObject = function(includeInstance, msg) { + var f, obj = { + location: (f = msg.getLocation()) && proto.routeguide.Point.toObject(includeInstance, f), + message: msg.getMessage() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.routeguide.RouteNote} + */ +proto.routeguide.RouteNote.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routeguide.RouteNote; + return proto.routeguide.RouteNote.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routeguide.RouteNote} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routeguide.RouteNote} + */ +proto.routeguide.RouteNote.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.routeguide.Point; + reader.readMessage(value,proto.routeguide.Point.deserializeBinaryFromReader); + msg.setLocation(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Class method variant: serializes the given message to binary data + * (in protobuf wire format), writing to the given BinaryWriter. + * @param {!proto.routeguide.RouteNote} message + * @param {!jspb.BinaryWriter} writer + */ +proto.routeguide.RouteNote.serializeBinaryToWriter = function(message, writer) { + message.serializeBinaryToWriter(writer); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routeguide.RouteNote.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + this.serializeBinaryToWriter(writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format), + * writing to the given BinaryWriter. + * @param {!jspb.BinaryWriter} writer + */ +proto.routeguide.RouteNote.prototype.serializeBinaryToWriter = function (writer) { + var f = undefined; + f = this.getLocation(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.routeguide.Point.serializeBinaryToWriter + ); + } + f = this.getMessage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * Creates a deep clone of this proto. No data is shared with the original. + * @return {!proto.routeguide.RouteNote} The clone. + */ +proto.routeguide.RouteNote.prototype.cloneMessage = function() { + return /** @type {!proto.routeguide.RouteNote} */ (jspb.Message.cloneMessage(this)); +}; + + +/** + * optional Point location = 1; + * @return {proto.routeguide.Point} + */ +proto.routeguide.RouteNote.prototype.getLocation = function() { + return /** @type{proto.routeguide.Point} */ ( + jspb.Message.getWrapperField(this, proto.routeguide.Point, 1)); +}; + + +/** @param {proto.routeguide.Point|undefined} value */ +proto.routeguide.RouteNote.prototype.setLocation = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.routeguide.RouteNote.prototype.clearLocation = function() { + this.setLocation(undefined); +}; + + +/** + * optional string message = 2; + * @return {string} + */ +proto.routeguide.RouteNote.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, "")); +}; + + +/** @param {string} value */ +proto.routeguide.RouteNote.prototype.setMessage = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.routeguide.RouteSummary = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routeguide.RouteSummary, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routeguide.RouteSummary.displayName = 'proto.routeguide.RouteSummary'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.routeguide.RouteSummary.prototype.toObject = function(opt_includeInstance) { + return proto.routeguide.RouteSummary.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.routeguide.RouteSummary} msg The msg instance to transform. + * @return {!Object} + */ +proto.routeguide.RouteSummary.toObject = function(includeInstance, msg) { + var f, obj = { + pointCount: msg.getPointCount(), + featureCount: msg.getFeatureCount(), + distance: msg.getDistance(), + elapsedTime: msg.getElapsedTime() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.routeguide.RouteSummary} + */ +proto.routeguide.RouteSummary.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routeguide.RouteSummary; + return proto.routeguide.RouteSummary.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routeguide.RouteSummary} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routeguide.RouteSummary} + */ +proto.routeguide.RouteSummary.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPointCount(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setFeatureCount(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setDistance(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setElapsedTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Class method variant: serializes the given message to binary data + * (in protobuf wire format), writing to the given BinaryWriter. + * @param {!proto.routeguide.RouteSummary} message + * @param {!jspb.BinaryWriter} writer + */ +proto.routeguide.RouteSummary.serializeBinaryToWriter = function(message, writer) { + message.serializeBinaryToWriter(writer); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routeguide.RouteSummary.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + this.serializeBinaryToWriter(writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format), + * writing to the given BinaryWriter. + * @param {!jspb.BinaryWriter} writer + */ +proto.routeguide.RouteSummary.prototype.serializeBinaryToWriter = function (writer) { + var f = undefined; + f = this.getPointCount(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = this.getFeatureCount(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = this.getDistance(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = this.getElapsedTime(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } +}; + + +/** + * Creates a deep clone of this proto. No data is shared with the original. + * @return {!proto.routeguide.RouteSummary} The clone. + */ +proto.routeguide.RouteSummary.prototype.cloneMessage = function() { + return /** @type {!proto.routeguide.RouteSummary} */ (jspb.Message.cloneMessage(this)); +}; + + +/** + * optional int32 point_count = 1; + * @return {number} + */ +proto.routeguide.RouteSummary.prototype.getPointCount = function() { + return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.routeguide.RouteSummary.prototype.setPointCount = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int32 feature_count = 2; + * @return {number} + */ +proto.routeguide.RouteSummary.prototype.getFeatureCount = function() { + return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.routeguide.RouteSummary.prototype.setFeatureCount = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int32 distance = 3; + * @return {number} + */ +proto.routeguide.RouteSummary.prototype.getDistance = function() { + return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.routeguide.RouteSummary.prototype.setDistance = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional int32 elapsed_time = 4; + * @return {number} + */ +proto.routeguide.RouteSummary.prototype.getElapsedTime = function() { + return /** @type {number} */ (jspb.Message.getFieldProto3(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.routeguide.RouteSummary.prototype.setElapsedTime = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +goog.object.extend(exports, proto.routeguide); diff --git a/examples/node/static_codegen/route_guide/route_guide_server.js b/examples/node/static_codegen/route_guide/route_guide_server.js new file mode 100644 index 00000000000..53628fb046f --- /dev/null +++ b/examples/node/static_codegen/route_guide/route_guide_server.js @@ -0,0 +1,261 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +var messages = require('./route_guide_pb'); +var services = require('./route_guide_grpc_pb'); + +var fs = require('fs'); +var parseArgs = require('minimist'); +var path = require('path'); +var _ = require('lodash'); +var grpc = require('grpc'); + +var COORD_FACTOR = 1e7; + +/** + * For simplicity, a point is a record type that looks like + * {latitude: number, longitude: number}, and a feature is a record type that + * looks like {name: string, location: point}. feature objects with name==='' + * are points with no feature. + */ + +/** + * List of feature objects at points that have been requested so far. + */ +var feature_list = []; + +/** + * Get a feature object at the given point, or creates one if it does not exist. + * @param {point} point The point to check + * @return {feature} The feature object at the point. Note that an empty name + * indicates no feature + */ +function checkFeature(point) { + var feature; + // Check if there is already a feature object for the given point + for (var i = 0; i < feature_list.length; i++) { + feature = feature_list[i]; + if (feature.getLocation().getLatitude() === point.getLatitude() && + feature.getLocation().getLongitude() === point.getLongitude()) { + return feature; + } + } + var name = ''; + feature = new messages.Feature(); + feature.setName(name); + feature.setLocation(point); + return feature; +} + +/** + * getFeature request handler. Gets a request with a point, and responds with a + * feature object indicating whether there is a feature at that point. + * @param {EventEmitter} call Call object for the handler to process + * @param {function(Error, feature)} callback Response callback + */ +function getFeature(call, callback) { + callback(null, checkFeature(call.request)); +} + +/** + * listFeatures request handler. Gets a request with two points, and responds + * with a stream of all features in the bounding box defined by those points. + * @param {Writable} call Writable stream for responses with an additional + * request property for the request value. + */ +function listFeatures(call) { + var lo = call.request.getLo(); + var hi = call.request.getHi(); + var left = _.min([lo.getLongitude(), hi.getLongitude()]); + var right = _.max([lo.getLongitude(), hi.getLongitude()]); + var top = _.max([lo.getLatitude(), hi.getLatitude()]); + var bottom = _.min([lo.getLatitude(), hi.getLatitude()]); + // For each feature, check if it is in the given bounding box + _.each(feature_list, function(feature) { + if (feature.getName() === '') { + return; + } + if (feature.getLocation().getLongitude() >= left && + feature.getLocation().getLongitude() <= right && + feature.getLocation().getLatitude() >= bottom && + feature.getLocation().getLatitude() <= top) { + call.write(feature); + } + }); + call.end(); +} + +/** + * Calculate the distance between two points using the "haversine" formula. + * This code was taken from http://www.movable-type.co.uk/scripts/latlong.html. + * @param start The starting point + * @param end The end point + * @return The distance between the points in meters + */ +function getDistance(start, end) { + function toRadians(num) { + return num * Math.PI / 180; + } + var lat1 = start.getLatitude() / COORD_FACTOR; + var lat2 = end.getLatitude() / COORD_FACTOR; + var lon1 = start.getLongitude() / COORD_FACTOR; + var lon2 = end.getLongitude() / COORD_FACTOR; + var R = 6371000; // metres + var φ1 = toRadians(lat1); + var φ2 = toRadians(lat2); + var Δφ = toRadians(lat2-lat1); + var Δλ = toRadians(lon2-lon1); + + var a = Math.sin(Δφ/2) * Math.sin(Δφ/2) + + Math.cos(φ1) * Math.cos(φ2) * + Math.sin(Δλ/2) * Math.sin(Δλ/2); + var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); + + return R * c; +} + +/** + * recordRoute handler. Gets a stream of points, and responds with statistics + * about the "trip": number of points, number of known features visited, total + * distance traveled, and total time spent. + * @param {Readable} call The request point stream. + * @param {function(Error, routeSummary)} callback The callback to pass the + * response to + */ +function recordRoute(call, callback) { + var point_count = 0; + var feature_count = 0; + var distance = 0; + var previous = null; + // Start a timer + var start_time = process.hrtime(); + call.on('data', function(point) { + point_count += 1; + if (checkFeature(point).name !== '') { + feature_count += 1; + } + /* For each point after the first, add the incremental distance from the + * previous point to the total distance value */ + if (previous != null) { + distance += getDistance(previous, point); + } + previous = point; + }); + call.on('end', function() { + var summary = new messages.RouteSummary(); + summary.setPointCount(point_count); + summary.setFeatureCount(feature_count); + // Cast the distance to an integer + summary.setDistance(distance|0); + // End the timer + summary.setElapsedTime(process.hrtime(start_time)[0]); + callback(null, summary); + }); +} + +var route_notes = {}; + +/** + * Turn the point into a dictionary key. + * @param {point} point The point to use + * @return {string} The key for an object + */ +function pointKey(point) { + return point.getLatitude() + ' ' + point.getLongitude(); +} + +/** + * routeChat handler. Receives a stream of message/location pairs, and responds + * with a stream of all previous messages at each of those locations. + * @param {Duplex} call The stream for incoming and outgoing messages + */ +function routeChat(call) { + call.on('data', function(note) { + var key = pointKey(note.getLocation()); + /* For each note sent, respond with all previous notes that correspond to + * the same point */ + if (route_notes.hasOwnProperty(key)) { + _.each(route_notes[key], function(note) { + call.write(note); + }); + } else { + route_notes[key] = []; + } + // Then add the new note to the list + route_notes[key].push(note); + }); + call.on('end', function() { + call.end(); + }); +} + +/** + * Get a new server with the handler functions in this file bound to the methods + * it serves. + * @return {Server} The new server object + */ +function getServer() { + var server = new grpc.Server(); + server.addService(services.RouteGuideService, { + getFeature: getFeature, + listFeatures: listFeatures, + recordRoute: recordRoute, + routeChat: routeChat + }); + return server; +} + +if (require.main === module) { + // If this is run as a script, start a server on an unused port + var routeServer = getServer(); + routeServer.bind('0.0.0.0:50051', grpc.ServerCredentials.createInsecure()); + var argv = parseArgs(process.argv, { + string: 'db_path' + }); + fs.readFile(path.resolve(argv.db_path), function(err, data) { + if (err) throw err; + // Transform the loaded features to Feature objects + feature_list = _.map(JSON.parse(data), function(value) { + var feature = new messages.Feature(); + feature.setName(value.name); + var location = new messages.Point(); + location.setLatitude(value.location.latitude); + location.setLongitude(value.location.longitude); + feature.setLocation(location); + return feature; + }); + routeServer.start(); + }); +} + +exports.getServer = getServer; From bc846725376821d62ac35bd21fc542fb4c712930 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 4 May 2016 10:53:50 -0700 Subject: [PATCH 0249/1894] Use unlimited default for max header size until receiving new settings from the peer. This both complies with the RFC and ensures that if the user sets a higher limit than the 16K default, we won't incorrectly reject data sent before settings are exchanged. Also fix proxy tests. --- .../chttp2/transport/chttp2_transport.c | 4 ++++ .../chttp2/transport/frame_settings.c | 3 +-- src/core/lib/iomgr/tcp_posix.c | 4 ++-- test/core/end2end/fixtures/h2_proxy.c | 12 +++++++----- test/core/end2end/fixtures/h2_ssl_proxy.c | 19 +++++++++++-------- test/core/end2end/fixtures/proxy.c | 7 ++++--- test/core/end2end/fixtures/proxy.h | 9 ++++++--- test/core/end2end/tests/large_metadata.c | 10 +++++----- 8 files changed, 40 insertions(+), 28 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index f5359f2a816..44b2a7a59f7 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -56,6 +56,8 @@ #define DEFAULT_CONNECTION_WINDOW_TARGET (1024 * 1024) #define MAX_WINDOW 0x7fffffffu +#define DEFAULT_MAX_HEADER_LIST_SIZE (16 * 1024) + #define MAX_CLIENT_STREAM_ID 0x7fffffffu int grpc_http_trace = 0; @@ -311,6 +313,8 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, push_setting(t, GRPC_CHTTP2_SETTINGS_MAX_CONCURRENT_STREAMS, 0); } push_setting(t, GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE, DEFAULT_WINDOW); + push_setting(t, GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE, + DEFAULT_MAX_HEADER_LIST_SIZE); if (channel_args) { for (i = 0; i < channel_args->num_args; i++) { diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.c b/src/core/ext/transport/chttp2/transport/frame_settings.c index 7fa66247e4d..a3c1e15f35e 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.c +++ b/src/core/ext/transport/chttp2/transport/frame_settings.c @@ -44,7 +44,6 @@ #include "src/core/ext/transport/chttp2/transport/http2_errors.h" #include "src/core/lib/debug/trace.h" -#define DEFAULT_MAX_HEADER_LIST_SIZE (16 * 1024) #define MAX_MAX_HEADER_LIST_SIZE (1024 * 1024 * 1024) /* HTTP/2 mandated initial connection settings */ @@ -63,7 +62,7 @@ const grpc_chttp2_setting_parameters GRPC_CHTTP2_FLOW_CONTROL_ERROR}, {"MAX_FRAME_SIZE", 16384, 16384, 16777215, GRPC_CHTTP2_DISCONNECT_ON_INVALID_VALUE, GRPC_CHTTP2_PROTOCOL_ERROR}, - {"MAX_HEADER_LIST_SIZE", DEFAULT_MAX_HEADER_LIST_SIZE, 0, + {"MAX_HEADER_LIST_SIZE", MAX_MAX_HEADER_LIST_SIZE, 0, MAX_MAX_HEADER_LIST_SIZE, GRPC_CHTTP2_CLAMP_INVALID_VALUE, GRPC_CHTTP2_PROTOCOL_ERROR}, }; diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 7210aef5d5c..e2869224f1f 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -164,7 +164,7 @@ static void call_read_cb(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, int success) { for (i = 0; i < tcp->incoming_buffer->count; i++) { char *dump = gpr_dump_slice(tcp->incoming_buffer->slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); - gpr_log(GPR_DEBUG, "READ %p: %s", tcp, dump); + gpr_log(GPR_DEBUG, "READ %p (peer=%s): %s", tcp, tcp->peer_string, dump); gpr_free(dump); } } @@ -398,7 +398,7 @@ static void tcp_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, for (i = 0; i < buf->count; i++) { char *data = gpr_dump_slice(buf->slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); - gpr_log(GPR_DEBUG, "WRITE %p: %s", tcp, data); + gpr_log(GPR_DEBUG, "WRITE %p (peer=%s): %s", tcp, tcp->peer_string, data); gpr_free(data); } } diff --git a/test/core/end2end/fixtures/h2_proxy.c b/test/core/end2end/fixtures/h2_proxy.c index 863673a4e01..8c50eeb5d5b 100644 --- a/test/core/end2end/fixtures/h2_proxy.c +++ b/test/core/end2end/fixtures/h2_proxy.c @@ -55,14 +55,16 @@ typedef struct fullstack_fixture_data { grpc_end2end_proxy *proxy; } fullstack_fixture_data; -static grpc_server *create_proxy_server(const char *port) { - grpc_server *s = grpc_server_create(NULL, NULL); +static grpc_server *create_proxy_server(const char *port, + grpc_channel_args *server_args) { + grpc_server *s = grpc_server_create(server_args, NULL); GPR_ASSERT(grpc_server_add_insecure_http2_port(s, port)); return s; } -static grpc_channel *create_proxy_client(const char *target) { - return grpc_insecure_channel_create(target, NULL, NULL); +static grpc_channel *create_proxy_client(const char *target, + grpc_channel_args *client_args) { + return grpc_insecure_channel_create(target, client_args, NULL); } static const grpc_end2end_proxy_def proxy_def = {create_proxy_server, @@ -74,7 +76,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( fullstack_fixture_data *ffd = gpr_malloc(sizeof(fullstack_fixture_data)); memset(&f, 0, sizeof(f)); - ffd->proxy = grpc_end2end_proxy_create(&proxy_def); + ffd->proxy = grpc_end2end_proxy_create(&proxy_def, client_args, server_args); f.fixture_data = ffd; f.cq = grpc_completion_queue_create(NULL); diff --git a/test/core/end2end/fixtures/h2_ssl_proxy.c b/test/core/end2end/fixtures/h2_ssl_proxy.c index 1403b760f50..0ec6ad437ee 100644 --- a/test/core/end2end/fixtures/h2_ssl_proxy.c +++ b/test/core/end2end/fixtures/h2_ssl_proxy.c @@ -54,8 +54,9 @@ typedef struct fullstack_secure_fixture_data { grpc_end2end_proxy *proxy; } fullstack_secure_fixture_data; -static grpc_server *create_proxy_server(const char *port) { - grpc_server *s = grpc_server_create(NULL, NULL); +static grpc_server *create_proxy_server(const char *port, + grpc_channel_args *server_args) { + grpc_server *s = grpc_server_create(server_args, NULL); grpc_ssl_pem_key_cert_pair pem_cert_key_pair = {test_server1_key, test_server1_cert}; grpc_server_credentials *ssl_creds = @@ -65,18 +66,20 @@ static grpc_server *create_proxy_server(const char *port) { return s; } -static grpc_channel *create_proxy_client(const char *target) { +static grpc_channel *create_proxy_client(const char *target, + grpc_channel_args *client_args) { grpc_channel *channel; grpc_channel_credentials *ssl_creds = grpc_ssl_credentials_create(NULL, NULL, NULL); grpc_arg ssl_name_override = {GRPC_ARG_STRING, GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, {"foo.test.google.fr"}}; - grpc_channel_args client_args; - client_args.num_args = 1; - client_args.args = &ssl_name_override; - channel = grpc_secure_channel_create(ssl_creds, target, &client_args, NULL); + grpc_channel_args *new_client_args = + grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1); + channel = grpc_secure_channel_create(ssl_creds, target, new_client_args, + NULL); grpc_channel_credentials_release(ssl_creds); + grpc_channel_args_destroy(new_client_args); return channel; } @@ -90,7 +93,7 @@ static grpc_end2end_test_fixture chttp2_create_fixture_secure_fullstack( gpr_malloc(sizeof(fullstack_secure_fixture_data)); memset(&f, 0, sizeof(f)); - ffd->proxy = grpc_end2end_proxy_create(&proxy_def); + ffd->proxy = grpc_end2end_proxy_create(&proxy_def, client_args, server_args); f.fixture_data = ffd; f.cq = grpc_completion_queue_create(NULL); diff --git a/test/core/end2end/fixtures/proxy.c b/test/core/end2end/fixtures/proxy.c index a6487a17ac2..ff413ffd652 100644 --- a/test/core/end2end/fixtures/proxy.c +++ b/test/core/end2end/fixtures/proxy.c @@ -90,7 +90,8 @@ static void thread_main(void *arg); static void request_call(grpc_end2end_proxy *proxy); grpc_end2end_proxy *grpc_end2end_proxy_create( - const grpc_end2end_proxy_def *def) { + const grpc_end2end_proxy_def *def, + grpc_channel_args *client_args, grpc_channel_args *server_args) { gpr_thd_options opt = gpr_thd_options_default(); int proxy_port = grpc_pick_unused_port_or_die(); int server_port = grpc_pick_unused_port_or_die(); @@ -105,8 +106,8 @@ grpc_end2end_proxy *grpc_end2end_proxy_create( proxy->server_port); proxy->cq = grpc_completion_queue_create(NULL); - proxy->server = def->create_server(proxy->proxy_port); - proxy->client = def->create_client(proxy->server_port); + proxy->server = def->create_server(proxy->proxy_port, server_args); + proxy->client = def->create_client(proxy->server_port, client_args); grpc_server_register_completion_queue(proxy->server, proxy->cq, NULL); grpc_server_start(proxy->server); diff --git a/test/core/end2end/fixtures/proxy.h b/test/core/end2end/fixtures/proxy.h index c1cf01d39a4..89f95f09f90 100644 --- a/test/core/end2end/fixtures/proxy.h +++ b/test/core/end2end/fixtures/proxy.h @@ -41,12 +41,15 @@ typedef struct grpc_end2end_proxy grpc_end2end_proxy; typedef struct grpc_end2end_proxy_def { - grpc_server *(*create_server)(const char *port); - grpc_channel *(*create_client)(const char *target); + grpc_server *(*create_server)(const char *port, + grpc_channel_args *server_args); + grpc_channel *(*create_client)(const char *target, + grpc_channel_args *client_args); } grpc_end2end_proxy_def; grpc_end2end_proxy *grpc_end2end_proxy_create( - const grpc_end2end_proxy_def *def); + const grpc_end2end_proxy_def *def, + grpc_channel_args *client_args, grpc_channel_args *server_args); void grpc_end2end_proxy_destroy(grpc_end2end_proxy *proxy); const char *grpc_end2end_proxy_get_client_target(grpc_end2end_proxy *proxy); diff --git a/test/core/end2end/tests/large_metadata.c b/test/core/end2end/tests/large_metadata.c index b78d5b8292c..6d3074a94ba 100644 --- a/test/core/end2end/tests/large_metadata.c +++ b/test/core/end2end/tests/large_metadata.c @@ -97,7 +97,7 @@ static void end_test(grpc_end2end_test_fixture *f) { grpc_completion_queue_destroy(f->cq); } -/* Request with a large amount of metadata. */ +// Request with a large amount of metadata. static void test_request_with_large_metadata(grpc_end2end_test_config config) { grpc_call *c; grpc_call *s; @@ -141,7 +141,7 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) { grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); - /* Client: send request. */ + // Client: send request. op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 1; @@ -182,7 +182,7 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) { cq_expect_completion(cqv, tag(101), 1); cq_verify(cqv); - /* Server: send initial metadata and receive request. */ + // Server: send initial metadata and receive request. op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -200,8 +200,8 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) { cq_expect_completion(cqv, tag(102), 1); cq_verify(cqv); - /* Server: receive close and send status. This should trigger - completion of request on client. */ + // Server: receive close and send status. This should trigger + // completion of request on client. op = ops; op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; op->data.recv_close_on_server.cancelled = &was_cancelled; From 0b5857f600d92269dce34622a48ce37578f8a3d2 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 4 May 2016 10:58:06 -0700 Subject: [PATCH 0250/1894] Progress --- .../transport/chttp2/server/secure/server_secure_chttp2.c | 8 +++++--- src/core/lib/iomgr/resolve_address.h | 5 +++-- src/core/lib/iomgr/tcp_server.h | 3 ++- src/core/lib/iomgr/tcp_server_posix.c | 6 ++++-- 4 files changed, 14 insertions(+), 8 deletions(-) diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 031cebb7c3a..a0ea1492f8c 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -176,6 +176,7 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, grpc_security_status status = GRPC_SECURITY_ERROR; grpc_server_security_connector *sc = NULL; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_error *err = GRPC_ERROR_NONE; GRPC_API_TRACE( "grpc_server_add_secure_http2_port(" @@ -214,11 +215,12 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, gpr_mu_init(&state->mu); gpr_ref_init(&state->refcount, 1); + grpc_error **errors = gpr_malloc(sizeof(*errors) * resolved->naddrs); for (i = 0; i < resolved->naddrs; i++) { - port_temp = grpc_tcp_server_add_port( + errors[i] = grpc_tcp_server_add_port( tcp, (struct sockaddr *)&resolved->addrs[i].addr, - resolved->addrs[i].len); - if (port_temp > 0) { + resolved->addrs[i].len, &port_temp); + if (errors[i] == GRPC_ERROR_NONE) { if (port_num == -1) { port_num = port_temp; } else { diff --git a/src/core/lib/iomgr/resolve_address.h b/src/core/lib/iomgr/resolve_address.h index ef198fe0f66..8e227722dcb 100644 --- a/src/core/lib/iomgr/resolve_address.h +++ b/src/core/lib/iomgr/resolve_address.h @@ -67,7 +67,8 @@ void grpc_resolved_addresses_destroy(grpc_resolved_addresses *addresses); /* Resolve addr in a blocking fashion. Returns NULL on failure. On success, result must be freed with grpc_resolved_addresses_destroy. */ -extern grpc_resolved_addresses *(*grpc_blocking_resolve_address)( - const char *name, const char *default_port); +extern grpc_error *(*grpc_blocking_resolve_address)( + const char *name, const char *default_port, + grpc_resolved_addresses **addresses); #endif /* GRPC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_H */ diff --git a/src/core/lib/iomgr/tcp_server.h b/src/core/lib/iomgr/tcp_server.h index 75c582d18f9..924121f0c79 100644 --- a/src/core/lib/iomgr/tcp_server.h +++ b/src/core/lib/iomgr/tcp_server.h @@ -57,7 +57,8 @@ typedef void (*grpc_tcp_server_cb)(grpc_exec_ctx *exec_ctx, void *arg, /* Create a server, initially not bound to any ports. The caller owns one ref. If shutdown_complete is not NULL, it will be used by grpc_tcp_server_unref() when the ref count reaches zero. */ -grpc_tcp_server *grpc_tcp_server_create(grpc_closure *shutdown_complete); +grpc_error *grpc_tcp_server_create(grpc_closure *shutdown_complete, + grpc_tcp_server **server); /* Start listening to bound ports */ void grpc_tcp_server_start(grpc_exec_ctx *exec_ctx, grpc_tcp_server *server, diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 64ab1c144be..a46cd6f0f6e 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -132,7 +132,8 @@ struct grpc_tcp_server { size_t pollset_count; }; -grpc_tcp_server *grpc_tcp_server_create(grpc_closure *shutdown_complete) { +grpc_error *grpc_tcp_server_create(grpc_closure *shutdown_complete, + grpc_tcp_server **server) { grpc_tcp_server *s = gpr_malloc(sizeof(grpc_tcp_server)); gpr_ref_init(&s->refs, 1); gpr_mu_init(&s->mu); @@ -147,7 +148,8 @@ grpc_tcp_server *grpc_tcp_server_create(grpc_closure *shutdown_complete) { s->head = NULL; s->tail = NULL; s->nports = 0; - return s; + *server = s; + return GRPC_ERROR_NONE; } static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_tcp_server *s) { From 2df7d409144af95c99cdabefcc7a3ad841c464d0 Mon Sep 17 00:00:00 2001 From: Michael Yeh Date: Wed, 4 May 2016 10:59:03 -0700 Subject: [PATCH 0251/1894] Modified sample async client to be non-blocking. A reader thread is spawned to handle all the RPC results. --- .../cpp/helloworld/greeter_async_client.cc | 93 ++++++++++++------- 1 file changed, 57 insertions(+), 36 deletions(-) diff --git a/examples/cpp/helloworld/greeter_async_client.cc b/examples/cpp/helloworld/greeter_async_client.cc index 35014267feb..ca5a7defb0c 100644 --- a/examples/cpp/helloworld/greeter_async_client.cc +++ b/examples/cpp/helloworld/greeter_async_client.cc @@ -36,6 +36,7 @@ #include #include +#include #include "helloworld.grpc.pb.h" @@ -55,71 +56,91 @@ class GreeterClient { // Assambles the client's payload, sends it and presents the response back // from the server. - std::string SayHello(const std::string& user) { + void SayHello(const std::string& user) { // Data we are sending to the server. HelloRequest request; request.set_name(user); - // Container for the data we expect from the server. - HelloReply reply; - - // Context for the client. It could be used to convey extra information to - // the server and/or tweak certain RPC behaviors. - ClientContext context; - - // The producer-consumer queue we use to communicate asynchronously with the - // gRPC runtime. - CompletionQueue cq; - - // Storage for the status of the RPC upon completion. - Status status; + AsyncClientCall* call = new AsyncClientCall; // stub_->AsyncSayHello() perform the RPC call, returning an instance we // store in "rpc". Because we are using the asynchronous API, we need the - // hold on to the "rpc" instance in order to get updates on the ongoig RPC. - std::unique_ptr > rpc( - stub_->AsyncSayHello(&context, request, &cq)); + // hold on to the "rpc" instance in order to get updates on the ongoing RPC. + call->response_reader = stub_->AsyncSayHello(&call->context, request, &cq_); + // Request that, upon completion of the RPC, "reply" be updated with the // server's response; "status" with the indication of whether the operation - // was successful. Tag the request with the integer 1. - rpc->Finish(&reply, &status, (void*)1); + // was successful. Tag the request with the memory address of call object. + call->response_reader->Finish(&call->reply, &call->status, (void*)call); + + } + void AsyncCompleteRpc() + { void* got_tag; bool ok = false; + // Block until the next result is available in the completion queue "cq". - cq.Next(&got_tag, &ok); - - // Verify that the result from "cq" corresponds, by its tag, our previous - // request. - GPR_ASSERT(got_tag == (void*)1); - // ... and that the request was completed successfully. Note that "ok" - // corresponds solely to the request for updates introduced by Finish(). - GPR_ASSERT(ok); - - // Act upon the status of the actual RPC. - if (status.ok()) { - return reply.message(); - } else { - return "RPC failed"; + while (cq_.Next(&got_tag, &ok)) + { + AsyncClientCall* call = static_cast(got_tag); + if (ok) + std::cout << "Greeter received: " << call->reply.message() << std::endl; + else + std::cout << "RPC failed" << std::endl; + delete call; } } private: + + // Structure for keeping state and data information + struct AsyncClientCall + { + // Container for the data we expect from the server. + HelloReply reply; + + // Context for the client. It could be used to convey extra information to + // the server and/or tweak certain RPC behaviors. + ClientContext context; + + // Storage for the status of the RPC upon completion. + Status status; + + + std::unique_ptr> response_reader; + }; + // Out of the passed in Channel comes the stub, stored here, our view of the // server's exposed services. std::unique_ptr stub_; + + // The producer-consumer queue we use to communicate asynchronously with the + // gRPC runtime. + CompletionQueue cq_; }; int main(int argc, char** argv) { + + // Instantiate the client. It requires a channel, out of which the actual RPCs // are created. This channel models a connection to an endpoint (in this case, // localhost at port 50051). We indicate that the channel isn't authenticated // (use of InsecureChannelCredentials()). GreeterClient greeter(grpc::CreateChannel( "localhost:50051", grpc::InsecureChannelCredentials())); - std::string user("world"); - std::string reply = greeter.SayHello(user); // The actual RPC call! - std::cout << "Greeter received: " << reply << std::endl; + + // Spawn reader thread that loops indefinitely + std::thread thread_ = std::thread(&GreeterClient::AsyncCompleteRpc, &greeter); + + for (int i = 0; i < 100; i++) + { + std::string user("world " + std::to_string(i)); + greeter.SayHello(user); // The actual RPC call! + } + + std::cout << "Press control-c to quit" << std::endl << std::endl; + thread_.join(); //blocks forever return 0; } From d50b58c3f61b00b3bbdaae63dd794c8e2a96d06d Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Tue, 3 May 2016 18:38:29 -0700 Subject: [PATCH 0252/1894] Add comments for messages --- .../grpc/reflection/v1alpha/reflection.proto | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/proto/grpc/reflection/v1alpha/reflection.proto b/src/proto/grpc/reflection/v1alpha/reflection.proto index e6735d2cd5b..4b13bd1e51c 100644 --- a/src/proto/grpc/reflection/v1alpha/reflection.proto +++ b/src/proto/grpc/reflection/v1alpha/reflection.proto @@ -55,38 +55,64 @@ service ServerReflection { // Finds the tag numbers used by all known extensions of extendee_type, and // appends them to ExtensionNumberResponse in an undefined order. + // This method is best-effort: it's not guaranteed that the reflection service + // will implement this method, and it's not guaranteed that this method will + // provide all extensions. Returns StatusCode::UNIMPLEMENTED if it's not + // implemented. rpc GetAllExtensionNumbers(TypeRequest) returns (ExtensionNumberResponse) { } } +// An empty message sent by the client when calling ListService method. message EmptyRequest { } +// The filename sent by the client when calling GetFileByName method. message FileNameRequest { + // Name of the proto file. string filename = 1; } +// The symbol name sent by the client when calling GetFileContainingSymbol +// method. message SymbolRequest { + // Fully-qualified symbol name (e.g. .[.] or + // .). string symbol = 1; } +// The type name and extension number sent by the client when calling +// GetFileContainingExtension method. message ExtensionRequest { + // Fully-qualified type name. The format should be . string containing_type = 1; int32 extension_number = 2; } +// The type name sent by the client when calling GetAllExtensionNumbers method. message TypeRequest { + // Fully-qualified type name. The format should be . string type = 1; } +// A list of service names sent by the server answering ListService method. message ListServiceResponse { + // Full names of registered services, including package names. The format + // is . repeated string services = 1; } +// A serialized FileDescriptorProto sent by the server answering +// GetFileByName, GetFileContainingSymbol, GetFileContainingExtension methods. message FileDescriptorProtoResponse { + // Serialized FileDescriptorProto message. Some languages have limited support + // for working with descriptors. The can only obtain an opaque binary blob + // that contains serialized FileDescriptorProto message. bytes file_descriptor_proto = 1; } +// A list of extension numbers sent by the server answering +// GetAllExtensionNumbers method. message ExtensionNumberResponse { repeated int32 extension_number = 1; } From 2df502e5181d98752d193e55824b07722a16c594 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 4 May 2016 11:22:24 -0700 Subject: [PATCH 0253/1894] Fix max_message_length test, which was broken by the previous fix to the proxy tests. --- test/core/end2end/tests/max_message_length.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c index b5dbc1382a8..4f572789d95 100644 --- a/test/core/end2end/tests/max_message_length.c +++ b/test/core/end2end/tests/max_message_length.c @@ -53,7 +53,10 @@ static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, grpc_channel_args *server_args) { grpc_end2end_test_fixture f; gpr_log(GPR_INFO, "%s/%s", test_name, config.name); - f = config.create_fixture(client_args, server_args); + // We intentionally do not pass the client and server args to + // create_fixture(), since we don't want the limit enforced on the + // proxy, only on the backend server. + f = config.create_fixture(NULL, NULL); config.init_server(&f, server_args); config.init_client(&f, client_args); return f; From 470cbd1c6e0f1e4d49265a1ed403ffb1219fffa6 Mon Sep 17 00:00:00 2001 From: Michael Yeh Date: Wed, 4 May 2016 12:39:20 -0700 Subject: [PATCH 0254/1894] Created a new sample async client that is non-blocking. A reader thread is spawned to handle all the RPC results. --- examples/cpp/helloworld/Makefile | 7 +- .../cpp/helloworld/greeter_async_client.cc | 93 +++++------ .../cpp/helloworld/greeter_async_client2.cc | 148 ++++++++++++++++++ 3 files changed, 189 insertions(+), 59 deletions(-) create mode 100644 examples/cpp/helloworld/greeter_async_client2.cc diff --git a/examples/cpp/helloworld/Makefile b/examples/cpp/helloworld/Makefile index 470b83573e4..58a82dbb831 100644 --- a/examples/cpp/helloworld/Makefile +++ b/examples/cpp/helloworld/Makefile @@ -41,7 +41,7 @@ PROTOS_PATH = ../../protos vpath %.proto $(PROTOS_PATH) -all: system-check greeter_client greeter_server greeter_async_client greeter_async_server +all: system-check greeter_client greeter_server greeter_async_client greeter_async_client2 greeter_async_server greeter_client: helloworld.pb.o helloworld.grpc.pb.o greeter_client.o $(CXX) $^ $(LDFLAGS) -o $@ @@ -52,6 +52,9 @@ greeter_server: helloworld.pb.o helloworld.grpc.pb.o greeter_server.o greeter_async_client: helloworld.pb.o helloworld.grpc.pb.o greeter_async_client.o $(CXX) $^ $(LDFLAGS) -o $@ +greeter_async_client2: helloworld.pb.o helloworld.grpc.pb.o greeter_async_client2.o + $(CXX) $^ $(LDFLAGS) -o $@ + greeter_async_server: helloworld.pb.o helloworld.grpc.pb.o greeter_async_server.o $(CXX) $^ $(LDFLAGS) -o $@ @@ -64,7 +67,7 @@ greeter_async_server: helloworld.pb.o helloworld.grpc.pb.o greeter_async_server. $(PROTOC) -I $(PROTOS_PATH) --cpp_out=. $< clean: - rm -f *.o *.pb.cc *.pb.h greeter_client greeter_server greeter_async_client greeter_async_server + rm -f *.o *.pb.cc *.pb.h greeter_client greeter_server greeter_async_client greeter_async_client2 greeter_async_server # The following is to test your system and ensure a smoother experience. diff --git a/examples/cpp/helloworld/greeter_async_client.cc b/examples/cpp/helloworld/greeter_async_client.cc index ca5a7defb0c..35014267feb 100644 --- a/examples/cpp/helloworld/greeter_async_client.cc +++ b/examples/cpp/helloworld/greeter_async_client.cc @@ -36,7 +36,6 @@ #include #include -#include #include "helloworld.grpc.pb.h" @@ -56,91 +55,71 @@ class GreeterClient { // Assambles the client's payload, sends it and presents the response back // from the server. - void SayHello(const std::string& user) { + std::string SayHello(const std::string& user) { // Data we are sending to the server. HelloRequest request; request.set_name(user); - AsyncClientCall* call = new AsyncClientCall; + // Container for the data we expect from the server. + HelloReply reply; + + // Context for the client. It could be used to convey extra information to + // the server and/or tweak certain RPC behaviors. + ClientContext context; + + // The producer-consumer queue we use to communicate asynchronously with the + // gRPC runtime. + CompletionQueue cq; + + // Storage for the status of the RPC upon completion. + Status status; // stub_->AsyncSayHello() perform the RPC call, returning an instance we // store in "rpc". Because we are using the asynchronous API, we need the - // hold on to the "rpc" instance in order to get updates on the ongoing RPC. - call->response_reader = stub_->AsyncSayHello(&call->context, request, &cq_); - + // hold on to the "rpc" instance in order to get updates on the ongoig RPC. + std::unique_ptr > rpc( + stub_->AsyncSayHello(&context, request, &cq)); // Request that, upon completion of the RPC, "reply" be updated with the // server's response; "status" with the indication of whether the operation - // was successful. Tag the request with the memory address of call object. - call->response_reader->Finish(&call->reply, &call->status, (void*)call); - - } - void AsyncCompleteRpc() - { + // was successful. Tag the request with the integer 1. + rpc->Finish(&reply, &status, (void*)1); void* got_tag; bool ok = false; - // Block until the next result is available in the completion queue "cq". - while (cq_.Next(&got_tag, &ok)) - { - AsyncClientCall* call = static_cast(got_tag); - if (ok) - std::cout << "Greeter received: " << call->reply.message() << std::endl; - else - std::cout << "RPC failed" << std::endl; - delete call; + cq.Next(&got_tag, &ok); + + // Verify that the result from "cq" corresponds, by its tag, our previous + // request. + GPR_ASSERT(got_tag == (void*)1); + // ... and that the request was completed successfully. Note that "ok" + // corresponds solely to the request for updates introduced by Finish(). + GPR_ASSERT(ok); + + // Act upon the status of the actual RPC. + if (status.ok()) { + return reply.message(); + } else { + return "RPC failed"; } } private: - - // Structure for keeping state and data information - struct AsyncClientCall - { - // Container for the data we expect from the server. - HelloReply reply; - - // Context for the client. It could be used to convey extra information to - // the server and/or tweak certain RPC behaviors. - ClientContext context; - - // Storage for the status of the RPC upon completion. - Status status; - - - std::unique_ptr> response_reader; - }; - // Out of the passed in Channel comes the stub, stored here, our view of the // server's exposed services. std::unique_ptr stub_; - - // The producer-consumer queue we use to communicate asynchronously with the - // gRPC runtime. - CompletionQueue cq_; }; int main(int argc, char** argv) { - - // Instantiate the client. It requires a channel, out of which the actual RPCs // are created. This channel models a connection to an endpoint (in this case, // localhost at port 50051). We indicate that the channel isn't authenticated // (use of InsecureChannelCredentials()). GreeterClient greeter(grpc::CreateChannel( "localhost:50051", grpc::InsecureChannelCredentials())); - - // Spawn reader thread that loops indefinitely - std::thread thread_ = std::thread(&GreeterClient::AsyncCompleteRpc, &greeter); - - for (int i = 0; i < 100; i++) - { - std::string user("world " + std::to_string(i)); - greeter.SayHello(user); // The actual RPC call! - } - - std::cout << "Press control-c to quit" << std::endl << std::endl; - thread_.join(); //blocks forever + std::string user("world"); + std::string reply = greeter.SayHello(user); // The actual RPC call! + std::cout << "Greeter received: " << reply << std::endl; return 0; } diff --git a/examples/cpp/helloworld/greeter_async_client2.cc b/examples/cpp/helloworld/greeter_async_client2.cc new file mode 100644 index 00000000000..cdbdd1f3063 --- /dev/null +++ b/examples/cpp/helloworld/greeter_async_client2.cc @@ -0,0 +1,148 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include + +#include +#include + +#include "helloworld.grpc.pb.h" + +using grpc::Channel; +using grpc::ClientAsyncResponseReader; +using grpc::ClientContext; +using grpc::CompletionQueue; +using grpc::Status; +using helloworld::HelloRequest; +using helloworld::HelloReply; +using helloworld::Greeter; + +class GreeterClient { + public: + explicit GreeterClient(std::shared_ptr channel) + : stub_(Greeter::NewStub(channel)) {} + + // Assambles the client's payload, sends it and presents the response back + // from the server. + void SayHello(const std::string& user) { + // Data we are sending to the server. + HelloRequest request; + request.set_name(user); + + AsyncClientCall* call = new AsyncClientCall; + + // stub_->AsyncSayHello() perform the RPC call, returning an instance we + // store in "rpc". Because we are using the asynchronous API, we need the + // hold on to the "rpc" instance in order to get updates on the ongoing RPC. + call->response_reader = stub_->AsyncSayHello(&call->context, request, &cq_); + + + // Request that, upon completion of the RPC, "reply" be updated with the + // server's response; "status" with the indication of whether the operation + // was successful. Tag the request with the memory address of call object. + call->response_reader->Finish(&call->reply, &call->status, (void*)call); + + } + + // Loop while listening for completed responses + void AsyncCompleteRpc() + { + void* got_tag; + bool ok = false; + + // Block until the next result is available in the completion queue "cq". + while (cq_.Next(&got_tag, &ok)) + { + AsyncClientCall* call = static_cast(got_tag); + if (ok) + std::cout << "Greeter received: " << call->reply.message() << std::endl; + else + std::cout << "RPC failed" << std::endl; + delete call; + } + } + + private: + + // struct for keeping state and data information + struct AsyncClientCall + { + // Container for the data we expect from the server. + HelloReply reply; + + // Context for the client. It could be used to convey extra information to + // the server and/or tweak certain RPC behaviors. + ClientContext context; + + // Storage for the status of the RPC upon completion. + Status status; + + + std::unique_ptr> response_reader; + }; + + // Out of the passed in Channel comes the stub, stored here, our view of the + // server's exposed services. + std::unique_ptr stub_; + + // The producer-consumer queue we use to communicate asynchronously with the + // gRPC runtime. + CompletionQueue cq_; +}; + +int main(int argc, char** argv) { + + + // Instantiate the client. It requires a channel, out of which the actual RPCs + // are created. This channel models a connection to an endpoint (in this case, + // localhost at port 50051). We indicate that the channel isn't authenticated + // (use of InsecureChannelCredentials()). + GreeterClient greeter(grpc::CreateChannel( + "localhost:50051", grpc::InsecureChannelCredentials())); + + // Spawn reader thread that loops indefinitely + std::thread thread_ = std::thread(&GreeterClient::AsyncCompleteRpc, &greeter); + + for (int i = 0; i < 100; i++) + { + std::string user("world " + std::to_string(i)); + greeter.SayHello(user); // The actual RPC call! + } + + std::cout << "Press control-c to quit" << std::endl << std::endl; + thread_.join(); //blocks forever + + return 0; +} From 2b6a2ab59a47c166652c7eb3e483eb8a75634d19 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 4 May 2016 12:54:14 -0700 Subject: [PATCH 0255/1894] Make namespacing of executables exposed by grpc-tools packages consistent between Node and Ruby --- src/node/tools/package.json | 4 ++-- src/ruby/tools/bin/{protoc.rb => grpc_tools_ruby_protoc.rb} | 0 ...c_grpc_ruby_plugin.rb => grpc_tools_ruby_protoc_plugin.rb} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename src/ruby/tools/bin/{protoc.rb => grpc_tools_ruby_protoc.rb} (100%) rename src/ruby/tools/bin/{protoc_grpc_ruby_plugin.rb => grpc_tools_ruby_protoc_plugin.rb} (100%) diff --git a/src/node/tools/package.json b/src/node/tools/package.json index d98ed0b1fc3..62155edd687 100644 --- a/src/node/tools/package.json +++ b/src/node/tools/package.json @@ -16,8 +16,8 @@ } ], "bin": { - "grpc-tools-protoc": "./bin/protoc.js", - "grpc-tools-plugin": "./bin/protoc_plugin.js" + "grpc_tools_node_protoc": "./bin/protoc.js", + "grpc_tools_node_protoc_plugin": "./bin/protoc_plugin.js" }, "scripts": { "install": "./node_modules/.bin/node-pre-gyp install" diff --git a/src/ruby/tools/bin/protoc.rb b/src/ruby/tools/bin/grpc_tools_ruby_protoc.rb similarity index 100% rename from src/ruby/tools/bin/protoc.rb rename to src/ruby/tools/bin/grpc_tools_ruby_protoc.rb diff --git a/src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb b/src/ruby/tools/bin/grpc_tools_ruby_protoc_plugin.rb similarity index 100% rename from src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb rename to src/ruby/tools/bin/grpc_tools_ruby_protoc_plugin.rb From d5d8f8fbf94fab16b5c2ecc84cdefffed1a44b4e Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Wed, 4 May 2016 13:22:26 -0700 Subject: [PATCH 0256/1894] Added all transitive header dependencies in build.yaml to fix the failing check. --- BUILD | 68 ++++++++++++ build.yaml | 49 +++++++++ gRPC.podspec | 68 ++++++++++++ grpc.gemspec | 34 ++++++ package.xml | 34 ++++++ tools/doxygen/Doxyfile.core.internal | 34 ++++++ tools/run_tests/sources_and_headers.json | 100 +++++++++++++++++- vsprojects/vcxproj/grpc/grpc.vcxproj | 34 ++++++ vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 105 +++++++++++++++++++ 9 files changed, 525 insertions(+), 1 deletion(-) diff --git a/BUILD b/BUILD index 2e1d762f079..9a14f30c361 100644 --- a/BUILD +++ b/BUILD @@ -285,7 +285,41 @@ cc_library( "src/core/ext/client_config/subchannel_call_holder.h", "src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/uri_parser.h", + "include/grpc/byte_buffer.h", + "include/grpc/grpc.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/status.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", + "include/grpc/status.h", + "include/grpc/support/alloc.h", + "include/grpc/support/atm.h", + "include/grpc/support/host_port.h", + "include/grpc/support/log.h", "include/grpc/support/port_platform.h", + "include/grpc/support/slice.h", + "include/grpc/support/slice_buffer.h", + "include/grpc/support/string_util.h", + "include/grpc/support/sync.h", + "include/grpc/support/time.h", + "include/grpc/support/useful.h", + "src/core/lib/support/string.h", "third_party/objective_c/Cronet/cronet_c_for_grpc.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", @@ -1636,7 +1670,41 @@ objc_library( "src/core/ext/client_config/subchannel_call_holder.h", "src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/uri_parser.h", + "include/grpc/byte_buffer.h", + "include/grpc/grpc.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/status.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", + "include/grpc/status.h", + "include/grpc/support/alloc.h", + "include/grpc/support/atm.h", + "include/grpc/support/host_port.h", + "include/grpc/support/log.h", "include/grpc/support/port_platform.h", + "include/grpc/support/slice.h", + "include/grpc/support/slice_buffer.h", + "include/grpc/support/string_util.h", + "include/grpc/support/sync.h", + "include/grpc/support/time.h", + "include/grpc/support/useful.h", + "src/core/lib/support/string.h", "third_party/objective_c/Cronet/cronet_c_for_grpc.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", diff --git a/build.yaml b/build.yaml index a7ab412722c..ff4e7f0f90b 100644 --- a/build.yaml +++ b/build.yaml @@ -549,7 +549,56 @@ filegroups: - grpc_secure - name: grpc_transport_cronet_client_secure headers: + - include/grpc/byte_buffer.h + - include/grpc/grpc.h + - include/grpc/impl/codegen/alloc.h + - include/grpc/impl/codegen/atm.h + - include/grpc/impl/codegen/atm_gcc_atomic.h + - include/grpc/impl/codegen/atm_gcc_sync.h + - include/grpc/impl/codegen/atm_win32.h + - include/grpc/impl/codegen/byte_buffer.h + - include/grpc/impl/codegen/compression_types.h + - include/grpc/impl/codegen/connectivity_state.h + - include/grpc/impl/codegen/grpc_types.h + - include/grpc/impl/codegen/log.h + - include/grpc/impl/codegen/port_platform.h + - include/grpc/impl/codegen/propagation_bits.h + - include/grpc/impl/codegen/slice.h + - include/grpc/impl/codegen/slice_buffer.h + - include/grpc/impl/codegen/status.h + - include/grpc/impl/codegen/sync.h + - include/grpc/impl/codegen/sync_generic.h + - include/grpc/impl/codegen/sync_posix.h + - include/grpc/impl/codegen/sync_win32.h + - include/grpc/impl/codegen/time.h + - include/grpc/status.h + - include/grpc/support/alloc.h + - include/grpc/support/atm.h + - include/grpc/support/host_port.h + - include/grpc/support/log.h - include/grpc/support/port_platform.h + - include/grpc/support/slice.h + - include/grpc/support/slice_buffer.h + - include/grpc/support/string_util.h + - include/grpc/support/sync.h + - include/grpc/support/time.h + - include/grpc/support/useful.h + - src/core/ext/transport/chttp2/transport/incoming_metadata.h + - src/core/lib/channel/channel_stack.h + - src/core/lib/channel/context.h + - src/core/lib/debug/trace.h + - src/core/lib/iomgr/closure.h + - src/core/lib/iomgr/exec_ctx.h + - src/core/lib/iomgr/pollset.h + - src/core/lib/iomgr/pollset_set.h + - src/core/lib/support/string.h + - src/core/lib/surface/channel.h + - src/core/lib/surface/channel_stack_type.h + - src/core/lib/transport/byte_stream.h + - src/core/lib/transport/metadata.h + - src/core/lib/transport/metadata_batch.h + - src/core/lib/transport/transport.h + - src/core/lib/transport/transport_impl.h - third_party/objective_c/Cronet/cronet_c_for_grpc.h src: - src/core/ext/transport/cronet/client/secure/cronet_channel_create.c diff --git a/gRPC.podspec b/gRPC.podspec index f57ba745194..c3c3a65128c 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -287,7 +287,41 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/subchannel_call_holder.h', 'src/core/ext/client_config/subchannel_index.h', 'src/core/ext/client_config/uri_parser.h', + 'include/grpc/byte_buffer.h', + 'include/grpc/grpc.h', + 'include/grpc/impl/codegen/alloc.h', + 'include/grpc/impl/codegen/atm.h', + 'include/grpc/impl/codegen/atm_gcc_atomic.h', + 'include/grpc/impl/codegen/atm_gcc_sync.h', + 'include/grpc/impl/codegen/atm_win32.h', + 'include/grpc/impl/codegen/byte_buffer.h', + 'include/grpc/impl/codegen/compression_types.h', + 'include/grpc/impl/codegen/connectivity_state.h', + 'include/grpc/impl/codegen/grpc_types.h', + 'include/grpc/impl/codegen/log.h', + 'include/grpc/impl/codegen/port_platform.h', + 'include/grpc/impl/codegen/propagation_bits.h', + 'include/grpc/impl/codegen/slice.h', + 'include/grpc/impl/codegen/slice_buffer.h', + 'include/grpc/impl/codegen/status.h', + 'include/grpc/impl/codegen/sync.h', + 'include/grpc/impl/codegen/sync_generic.h', + 'include/grpc/impl/codegen/sync_posix.h', + 'include/grpc/impl/codegen/sync_win32.h', + 'include/grpc/impl/codegen/time.h', + 'include/grpc/status.h', + 'include/grpc/support/alloc.h', + 'include/grpc/support/atm.h', + 'include/grpc/support/host_port.h', + 'include/grpc/support/log.h', 'include/grpc/support/port_platform.h', + 'include/grpc/support/slice.h', + 'include/grpc/support/slice_buffer.h', + 'include/grpc/support/string_util.h', + 'include/grpc/support/sync.h', + 'include/grpc/support/time.h', + 'include/grpc/support/useful.h', + 'src/core/lib/support/string.h', 'third_party/objective_c/Cronet/cronet_c_for_grpc.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h', @@ -635,7 +669,41 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/subchannel_call_holder.h', 'src/core/ext/client_config/subchannel_index.h', 'src/core/ext/client_config/uri_parser.h', + 'include/grpc/byte_buffer.h', + 'include/grpc/grpc.h', + 'include/grpc/impl/codegen/alloc.h', + 'include/grpc/impl/codegen/atm.h', + 'include/grpc/impl/codegen/atm_gcc_atomic.h', + 'include/grpc/impl/codegen/atm_gcc_sync.h', + 'include/grpc/impl/codegen/atm_win32.h', + 'include/grpc/impl/codegen/byte_buffer.h', + 'include/grpc/impl/codegen/compression_types.h', + 'include/grpc/impl/codegen/connectivity_state.h', + 'include/grpc/impl/codegen/grpc_types.h', + 'include/grpc/impl/codegen/log.h', + 'include/grpc/impl/codegen/port_platform.h', + 'include/grpc/impl/codegen/propagation_bits.h', + 'include/grpc/impl/codegen/slice.h', + 'include/grpc/impl/codegen/slice_buffer.h', + 'include/grpc/impl/codegen/status.h', + 'include/grpc/impl/codegen/sync.h', + 'include/grpc/impl/codegen/sync_generic.h', + 'include/grpc/impl/codegen/sync_posix.h', + 'include/grpc/impl/codegen/sync_win32.h', + 'include/grpc/impl/codegen/time.h', + 'include/grpc/status.h', + 'include/grpc/support/alloc.h', + 'include/grpc/support/atm.h', + 'include/grpc/support/host_port.h', + 'include/grpc/support/log.h', 'include/grpc/support/port_platform.h', + 'include/grpc/support/slice.h', + 'include/grpc/support/slice_buffer.h', + 'include/grpc/support/string_util.h', + 'include/grpc/support/sync.h', + 'include/grpc/support/time.h', + 'include/grpc/support/useful.h', + 'src/core/lib/support/string.h', 'third_party/objective_c/Cronet/cronet_c_for_grpc.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h', diff --git a/grpc.gemspec b/grpc.gemspec index 488f4657cdc..cde01942b71 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -296,7 +296,41 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_config/subchannel_call_holder.h ) s.files += %w( src/core/ext/client_config/subchannel_index.h ) s.files += %w( src/core/ext/client_config/uri_parser.h ) + s.files += %w( include/grpc/byte_buffer.h ) + s.files += %w( include/grpc/grpc.h ) + s.files += %w( include/grpc/impl/codegen/alloc.h ) + s.files += %w( include/grpc/impl/codegen/atm.h ) + s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h ) + s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h ) + s.files += %w( include/grpc/impl/codegen/atm_win32.h ) + s.files += %w( include/grpc/impl/codegen/byte_buffer.h ) + s.files += %w( include/grpc/impl/codegen/compression_types.h ) + s.files += %w( include/grpc/impl/codegen/connectivity_state.h ) + s.files += %w( include/grpc/impl/codegen/grpc_types.h ) + s.files += %w( include/grpc/impl/codegen/log.h ) + s.files += %w( include/grpc/impl/codegen/port_platform.h ) + s.files += %w( include/grpc/impl/codegen/propagation_bits.h ) + s.files += %w( include/grpc/impl/codegen/slice.h ) + s.files += %w( include/grpc/impl/codegen/slice_buffer.h ) + s.files += %w( include/grpc/impl/codegen/status.h ) + s.files += %w( include/grpc/impl/codegen/sync.h ) + s.files += %w( include/grpc/impl/codegen/sync_generic.h ) + s.files += %w( include/grpc/impl/codegen/sync_posix.h ) + s.files += %w( include/grpc/impl/codegen/sync_win32.h ) + s.files += %w( include/grpc/impl/codegen/time.h ) + s.files += %w( include/grpc/status.h ) + s.files += %w( include/grpc/support/alloc.h ) + s.files += %w( include/grpc/support/atm.h ) + s.files += %w( include/grpc/support/host_port.h ) + s.files += %w( include/grpc/support/log.h ) s.files += %w( include/grpc/support/port_platform.h ) + s.files += %w( include/grpc/support/slice.h ) + s.files += %w( include/grpc/support/slice_buffer.h ) + s.files += %w( include/grpc/support/string_util.h ) + s.files += %w( include/grpc/support/sync.h ) + s.files += %w( include/grpc/support/time.h ) + s.files += %w( include/grpc/support/useful.h ) + s.files += %w( src/core/lib/support/string.h ) s.files += %w( third_party/objective_c/Cronet/cronet_c_for_grpc.h ) s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.h ) s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h ) diff --git a/package.xml b/package.xml index e8fd375eb60..012ce6ab2ef 100644 --- a/package.xml +++ b/package.xml @@ -303,7 +303,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 16dcd9b79a7..6bc5e78e620 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -913,7 +913,41 @@ src/core/ext/client_config/subchannel.h \ src/core/ext/client_config/subchannel_call_holder.h \ src/core/ext/client_config/subchannel_index.h \ src/core/ext/client_config/uri_parser.h \ +include/grpc/byte_buffer.h \ +include/grpc/grpc.h \ +include/grpc/impl/codegen/alloc.h \ +include/grpc/impl/codegen/atm.h \ +include/grpc/impl/codegen/atm_gcc_atomic.h \ +include/grpc/impl/codegen/atm_gcc_sync.h \ +include/grpc/impl/codegen/atm_win32.h \ +include/grpc/impl/codegen/byte_buffer.h \ +include/grpc/impl/codegen/compression_types.h \ +include/grpc/impl/codegen/connectivity_state.h \ +include/grpc/impl/codegen/grpc_types.h \ +include/grpc/impl/codegen/log.h \ +include/grpc/impl/codegen/port_platform.h \ +include/grpc/impl/codegen/propagation_bits.h \ +include/grpc/impl/codegen/slice.h \ +include/grpc/impl/codegen/slice_buffer.h \ +include/grpc/impl/codegen/status.h \ +include/grpc/impl/codegen/sync.h \ +include/grpc/impl/codegen/sync_generic.h \ +include/grpc/impl/codegen/sync_posix.h \ +include/grpc/impl/codegen/sync_win32.h \ +include/grpc/impl/codegen/time.h \ +include/grpc/status.h \ +include/grpc/support/alloc.h \ +include/grpc/support/atm.h \ +include/grpc/support/host_port.h \ +include/grpc/support/log.h \ include/grpc/support/port_platform.h \ +include/grpc/support/slice.h \ +include/grpc/support/slice_buffer.h \ +include/grpc/support/string_util.h \ +include/grpc/support/sync.h \ +include/grpc/support/time.h \ +include/grpc/support/useful.h \ +src/core/lib/support/string.h \ third_party/objective_c/Cronet/cronet_c_for_grpc.h \ src/core/ext/lb_policy/grpclb/load_balancer_api.h \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index e22318d2387..426a9ba91ee 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6268,16 +6268,114 @@ { "deps": [], "headers": [ + "include/grpc/byte_buffer.h", + "include/grpc/grpc.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/status.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", + "include/grpc/status.h", + "include/grpc/support/alloc.h", + "include/grpc/support/atm.h", + "include/grpc/support/host_port.h", + "include/grpc/support/log.h", "include/grpc/support/port_platform.h", + "include/grpc/support/slice.h", + "include/grpc/support/slice_buffer.h", + "include/grpc/support/string_util.h", + "include/grpc/support/sync.h", + "include/grpc/support/time.h", + "include/grpc/support/useful.h", + "src/core/ext/transport/chttp2/transport/incoming_metadata.h", + "src/core/lib/channel/channel_stack.h", + "src/core/lib/channel/context.h", + "src/core/lib/debug/trace.h", + "src/core/lib/iomgr/closure.h", + "src/core/lib/iomgr/exec_ctx.h", + "src/core/lib/iomgr/pollset.h", + "src/core/lib/iomgr/pollset_set.h", + "src/core/lib/support/string.h", + "src/core/lib/surface/channel.h", + "src/core/lib/surface/channel_stack_type.h", + "src/core/lib/transport/byte_stream.h", + "src/core/lib/transport/metadata.h", + "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/transport.h", + "src/core/lib/transport/transport_impl.h", "third_party/objective_c/Cronet/cronet_c_for_grpc.h" ], "language": "c", "name": "grpc_transport_cronet_client_secure", "src": [ + "include/grpc/byte_buffer.h", + "include/grpc/grpc.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/status.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/time.h", + "include/grpc/status.h", + "include/grpc/support/alloc.h", + "include/grpc/support/atm.h", + "include/grpc/support/host_port.h", + "include/grpc/support/log.h", "include/grpc/support/port_platform.h", + "include/grpc/support/slice.h", + "include/grpc/support/slice_buffer.h", + "include/grpc/support/string_util.h", + "include/grpc/support/sync.h", + "include/grpc/support/time.h", + "include/grpc/support/useful.h", + "src/core/ext/transport/chttp2/transport/incoming_metadata.h", "src/core/ext/transport/cronet/client/secure/cronet_channel_create.c", "src/core/ext/transport/cronet/transport/cronet_api_dummy.c", - "src/core/ext/transport/cronet/transport/cronet_transport.c" + "src/core/ext/transport/cronet/transport/cronet_transport.c", + "src/core/lib/channel/channel_stack.h", + "src/core/lib/channel/context.h", + "src/core/lib/debug/trace.h", + "src/core/lib/iomgr/closure.h", + "src/core/lib/iomgr/exec_ctx.h", + "src/core/lib/iomgr/pollset.h", + "src/core/lib/iomgr/pollset_set.h", + "src/core/lib/support/string.h", + "src/core/lib/surface/channel.h", + "src/core/lib/surface/channel_stack_type.h", + "src/core/lib/transport/byte_stream.h", + "src/core/lib/transport/metadata.h", + "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/transport.h", + "src/core/lib/transport/transport_impl.h" ], "third_party": false, "type": "filegroup" diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index cbf854875a6..4f0157e63fd 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -422,7 +422,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 02297b7746a..43f36e3856d 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -968,9 +968,111 @@ src\core\ext\client_config + + include\grpc + + + include\grpc + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + include\grpc\support + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + include\grpc\support + + + src\core\lib\support + third_party\objective_c\Cronet @@ -1145,6 +1247,9 @@ {c4661d64-349f-01c1-1ba8-0602f9047595} + + {27f30339-d694-40f5-db07-4b89b9aeea73} + {a21971fb-304f-da08-b1b2-7bd8df8ac373} From 22b338e2109745a27f1f84de8490bc8148df1a79 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Wed, 4 May 2016 13:27:56 -0700 Subject: [PATCH 0257/1894] Apply clang-format diffs. --- .../chttp2/transport/chttp2_transport.c | 14 +++-- .../chttp2/transport/incoming_metadata.h | 2 +- .../ext/transport/chttp2/transport/parsing.c | 8 +-- src/core/lib/transport/metadata.h | 4 +- src/core/lib/transport/metadata_batch.c | 4 +- test/core/bad_client/bad_client.c | 7 +-- test/core/bad_client/bad_client.h | 8 +-- test/core/bad_client/tests/large_metadata.c | 57 +++++++++++-------- test/core/end2end/fixtures/h2_ssl_proxy.c | 4 +- test/core/end2end/fixtures/proxy.c | 6 +- test/core/end2end/fixtures/proxy.h | 6 +- test/core/end2end/tests/large_metadata.c | 11 ++-- 12 files changed, 71 insertions(+), 60 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 44b2a7a59f7..737a6ccbf18 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -948,15 +948,16 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, stream_global->send_initial_metadata_finished = add_closure_barrier(on_complete); stream_global->send_initial_metadata = op->send_initial_metadata; - const size_t metadata_size = grpc_metadata_batch_size( - op->send_initial_metadata); + const size_t metadata_size = + grpc_metadata_batch_size(op->send_initial_metadata); const size_t metadata_peer_limit = transport_global->settings[GRPC_PEER_SETTINGS] [GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE]; if (metadata_size > metadata_peer_limit) { gpr_log(GPR_DEBUG, "to-be-sent initial metadata size exceeds peer limit " - "(%lu vs. %lu)", metadata_size, metadata_peer_limit); + "(%lu vs. %lu)", + metadata_size, metadata_peer_limit); cancel_from_api(exec_ctx, transport_global, stream_global, GRPC_STATUS_RESOURCE_EXHAUSTED); } else { @@ -1002,15 +1003,16 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, stream_global->send_trailing_metadata_finished = add_closure_barrier(on_complete); stream_global->send_trailing_metadata = op->send_trailing_metadata; - const size_t metadata_size = grpc_metadata_batch_size( - op->send_trailing_metadata); + const size_t metadata_size = + grpc_metadata_batch_size(op->send_trailing_metadata); const size_t metadata_peer_limit = transport_global->settings[GRPC_PEER_SETTINGS] [GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE]; if (metadata_size > metadata_peer_limit) { gpr_log(GPR_DEBUG, "to-be-sent trailing metadata size exceeds peer limit " - "(%lu vs. %lu)", metadata_size, metadata_peer_limit); + "(%lu vs. %lu)", + metadata_size, metadata_peer_limit); cancel_from_api(exec_ctx, transport_global, stream_global, GRPC_STATUS_RESOURCE_EXHAUSTED); } else { diff --git a/src/core/ext/transport/chttp2/transport/incoming_metadata.h b/src/core/ext/transport/chttp2/transport/incoming_metadata.h index 7db5db8de05..df4343b93ed 100644 --- a/src/core/ext/transport/chttp2/transport/incoming_metadata.h +++ b/src/core/ext/transport/chttp2/transport/incoming_metadata.h @@ -42,7 +42,7 @@ typedef struct { size_t capacity; gpr_timespec deadline; int published; - size_t size; /* total size of metadata */ + size_t size; // total size of metadata } grpc_chttp2_incoming_metadata_buffer; /** assumes everything initially zeroed */ diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index 95169567249..4bd374b7fa7 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -639,8 +639,8 @@ static void on_initial_header(void *tp, grpc_mdelem *md) { gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), *cached_timeout)); GRPC_MDELEM_UNREF(md); } else { - const size_t new_size = stream_parsing->metadata_buffer[0].size + - GRPC_MDELEM_LENGTH(md); + const size_t new_size = + stream_parsing->metadata_buffer[0].size + GRPC_MDELEM_LENGTH(md); grpc_chttp2_transport_global *transport_global = &TRANSPORT_FROM_PARSING(transport_parsing)->global; const size_t metadata_size_limit = @@ -685,8 +685,8 @@ static void on_trailing_header(void *tp, grpc_mdelem *md) { stream_parsing->seen_error = true; } - const size_t new_size = stream_parsing->metadata_buffer[1].size + - GRPC_MDELEM_LENGTH(md); + const size_t new_size = + stream_parsing->metadata_buffer[1].size + GRPC_MDELEM_LENGTH(md); grpc_chttp2_transport_global *transport_global = &TRANSPORT_FROM_PARSING(transport_parsing)->global; const size_t metadata_size_limit = diff --git a/src/core/lib/transport/metadata.h b/src/core/lib/transport/metadata.h index 4ecbbd1b1b8..6d82f4d6819 100644 --- a/src/core/lib/transport/metadata.h +++ b/src/core/lib/transport/metadata.h @@ -148,8 +148,8 @@ const char *grpc_mdstr_as_c_string(grpc_mdstr *s); #define GRPC_MDSTR_LENGTH(s) (GPR_SLICE_LENGTH(s->slice)) /* We add 32 bytes of padding as per RFC-7540 section 6.5.2. */ -#define GRPC_MDELEM_LENGTH(e) (GRPC_MDSTR_LENGTH((e)->key) + \ - GRPC_MDSTR_LENGTH((e)->value) + 32) +#define GRPC_MDELEM_LENGTH(e) \ + (GRPC_MDSTR_LENGTH((e)->key) + GRPC_MDSTR_LENGTH((e)->value) + 32) int grpc_mdstr_is_legal_header(grpc_mdstr *s); int grpc_mdstr_is_legal_nonbin_header(grpc_mdstr *s); diff --git a/src/core/lib/transport/metadata_batch.c b/src/core/lib/transport/metadata_batch.c index 4e1cd8e2c1c..c0afc715bcc 100644 --- a/src/core/lib/transport/metadata_batch.c +++ b/src/core/lib/transport/metadata_batch.c @@ -195,8 +195,8 @@ int grpc_metadata_batch_is_empty(grpc_metadata_batch *batch) { size_t grpc_metadata_batch_size(grpc_metadata_batch *batch) { size_t size = 0; - for (grpc_linked_mdelem* elem = batch->list.head; - elem != NULL; elem = elem->next) { + for (grpc_linked_mdelem* elem = batch->list.head; elem != NULL; + elem = elem->next) { size += GRPC_MDELEM_LENGTH(elem->md); } return size; diff --git a/test/core/bad_client/bad_client.c b/test/core/bad_client/bad_client.c index aa9125dc7a9..e5820688ef1 100644 --- a/test/core/bad_client/bad_client.c +++ b/test/core/bad_client/bad_client.c @@ -90,8 +90,7 @@ static void read_done(grpc_exec_ctx *exec_ctx, void *arg, bool success) { void grpc_run_bad_client_test( grpc_bad_client_server_side_validator server_validator, grpc_bad_client_client_stream_validator client_validator, - const char *client_payload, - size_t client_payload_length, uint32_t flags) { + const char *client_payload, size_t client_payload_length, uint32_t flags) { grpc_endpoint_pair sfd; thd_args a; gpr_thd_id id; @@ -177,8 +176,8 @@ void grpc_run_bad_client_test( grpc_endpoint_read(&exec_ctx, sfd.client, &args.incoming, &read_done_closure); grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(gpr_event_wait(&args.read_done, - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5))); + GPR_ASSERT( + gpr_event_wait(&args.read_done, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5))); gpr_slice_buffer_destroy(&args.incoming); } // Shutdown. diff --git a/test/core/bad_client/bad_client.h b/test/core/bad_client/bad_client.h index b6e8a6dd5b0..ecd6721a78a 100644 --- a/test/core/bad_client/bad_client.h +++ b/test/core/bad_client/bad_client.h @@ -59,9 +59,9 @@ void grpc_run_bad_client_test( grpc_bad_client_client_stream_validator client_validator, const char *client_payload, size_t client_payload_length, uint32_t flags); -#define GRPC_RUN_BAD_CLIENT_TEST(server_validator, client_validator, \ - payload, flags) \ - grpc_run_bad_client_test(server_validator, client_validator, \ - payload, sizeof(payload) - 1, flags) +#define GRPC_RUN_BAD_CLIENT_TEST(server_validator, client_validator, payload, \ + flags) \ + grpc_run_bad_client_test(server_validator, client_validator, payload, \ + sizeof(payload) - 1, flags) #endif /* GRPC_TEST_CORE_BAD_CLIENT_BAD_CLIENT_H */ diff --git a/test/core/bad_client/tests/large_metadata.c b/test/core/bad_client/tests/large_metadata.c index 95932205cfc..b3521439f52 100644 --- a/test/core/bad_client/tests/large_metadata.c +++ b/test/core/bad_client/tests/large_metadata.c @@ -40,16 +40,19 @@ #include "test/core/end2end/cq_verifier.h" #define PFX_TOO_MUCH_METADATA_FROM_CLIENT_STR \ - "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" \ - /* settings frame */ \ - "\x00\x00\x00\x04\x00\x00\x00\x00\x00" \ - /* headers: generated from large_metadata.headers in this directory */ \ - "\x00""5{\x01\x05\x00\x00\x00\x01" \ + "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" /* settings frame */ \ + "\x00\x00\x00\x04\x00\x00\x00\x00\x00" /* headers: generated from \ + large_metadata.headers in this \ + directory */ \ + "\x00" \ + "5{\x01\x05\x00\x00\x00\x01" \ "\x10\x05:path\x08/foo/bar" \ "\x10\x07:scheme\x04http" \ "\x10\x07:method\x04POST" \ "\x10\x0a:authority\x09localhost" \ - "\x10\x0c""content-type\x10""application/grpc" \ + "\x10\x0c" \ + "content-type\x10" \ + "application/grpc" \ "\x10\x14grpc-accept-encoding\x15identity,deflate,gzip" \ "\x10\x02te\x08trailers" \ "\x10\x0auser-agent\"bad-client grpc-c/0.12.0.0 (linux)" \ @@ -339,22 +342,27 @@ "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa" \ "aaaaaaaa" -#define PFX_TOO_MUCH_METADATA_FROM_SERVER_STR \ - "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" \ - /* settings frame: sets MAX_HEADER_LIST_SIZE to 16K */ \ - "\x00\x00\x06\x04\x00\x00\x00\x00\x00\x00\x06\x00\x00\x40\x00" \ - /* headers: generated from simple_request.headers in this directory */ \ - "\x00\x00\xc9\x01\x04\x00\x00\x00\x01" \ - "\x10\x05:path\x08/foo/bar" \ - "\x10\x07:scheme\x04http" \ - "\x10\x07:method\x04POST" \ - "\x10\x0a:authority\x09localhost" \ - "\x10\x0c" \ - "content-type\x10" \ - "application/grpc" \ - "\x10\x14grpc-accept-encoding\x15" \ - "deflate,identity,gzip" \ - "\x10\x02te\x08trailers" \ +#define PFX_TOO_MUCH_METADATA_FROM_SERVER_STR \ + "PRI * HTTP/2.0\r\n\r\nSM\r\n\r\n" /* settings frame: sets \ + MAX_HEADER_LIST_SIZE to 16K */ \ + "\x00\x00\x06\x04\x00\x00\x00\x00\x00\x00\x06\x00\x00\x40\x00" /* headers: \ + generated \ + from \ + simple_request.headers \ + in this \ + directory \ + */ \ + "\x00\x00\xc9\x01\x04\x00\x00\x00\x01" \ + "\x10\x05:path\x08/foo/bar" \ + "\x10\x07:scheme\x04http" \ + "\x10\x07:method\x04POST" \ + "\x10\x0a:authority\x09localhost" \ + "\x10\x0c" \ + "content-type\x10" \ + "application/grpc" \ + "\x10\x14grpc-accept-encoding\x15" \ + "deflate,identity,gzip" \ + "\x10\x02te\x08trailers" \ "\x10\x0auser-agent\"bad-client grpc-c/0.12.0.0 (linux)" static void *tag(intptr_t t) { return (void *)t; } @@ -385,8 +393,9 @@ static void server_verifier(grpc_server *server, grpc_completion_queue *cq, cq_verifier_destroy(cqv); } -static void server_verifier_sends_too_much_metadata( - grpc_server *server, grpc_completion_queue *cq, void *registered_method) { +static void server_verifier_sends_too_much_metadata(grpc_server *server, + grpc_completion_queue *cq, + void *registered_method) { grpc_call_error error; grpc_call *s; grpc_call_details call_details; diff --git a/test/core/end2end/fixtures/h2_ssl_proxy.c b/test/core/end2end/fixtures/h2_ssl_proxy.c index 0ec6ad437ee..151a86cb8f5 100644 --- a/test/core/end2end/fixtures/h2_ssl_proxy.c +++ b/test/core/end2end/fixtures/h2_ssl_proxy.c @@ -76,8 +76,8 @@ static grpc_channel *create_proxy_client(const char *target, {"foo.test.google.fr"}}; grpc_channel_args *new_client_args = grpc_channel_args_copy_and_add(client_args, &ssl_name_override, 1); - channel = grpc_secure_channel_create(ssl_creds, target, new_client_args, - NULL); + channel = + grpc_secure_channel_create(ssl_creds, target, new_client_args, NULL); grpc_channel_credentials_release(ssl_creds); grpc_channel_args_destroy(new_client_args); return channel; diff --git a/test/core/end2end/fixtures/proxy.c b/test/core/end2end/fixtures/proxy.c index ff413ffd652..f6e01ec41c5 100644 --- a/test/core/end2end/fixtures/proxy.c +++ b/test/core/end2end/fixtures/proxy.c @@ -89,9 +89,9 @@ typedef struct { static void thread_main(void *arg); static void request_call(grpc_end2end_proxy *proxy); -grpc_end2end_proxy *grpc_end2end_proxy_create( - const grpc_end2end_proxy_def *def, - grpc_channel_args *client_args, grpc_channel_args *server_args) { +grpc_end2end_proxy *grpc_end2end_proxy_create(const grpc_end2end_proxy_def *def, + grpc_channel_args *client_args, + grpc_channel_args *server_args) { gpr_thd_options opt = gpr_thd_options_default(); int proxy_port = grpc_pick_unused_port_or_die(); int server_port = grpc_pick_unused_port_or_die(); diff --git a/test/core/end2end/fixtures/proxy.h b/test/core/end2end/fixtures/proxy.h index 89f95f09f90..75b75d13319 100644 --- a/test/core/end2end/fixtures/proxy.h +++ b/test/core/end2end/fixtures/proxy.h @@ -47,9 +47,9 @@ typedef struct grpc_end2end_proxy_def { grpc_channel_args *client_args); } grpc_end2end_proxy_def; -grpc_end2end_proxy *grpc_end2end_proxy_create( - const grpc_end2end_proxy_def *def, - grpc_channel_args *client_args, grpc_channel_args *server_args); +grpc_end2end_proxy *grpc_end2end_proxy_create(const grpc_end2end_proxy_def *def, + grpc_channel_args *client_args, + grpc_channel_args *server_args); void grpc_end2end_proxy_destroy(grpc_end2end_proxy *proxy); const char *grpc_end2end_proxy_get_client_target(grpc_end2end_proxy *proxy); diff --git a/test/core/end2end/tests/large_metadata.c b/test/core/end2end/tests/large_metadata.c index 6d3074a94ba..dd29552b975 100644 --- a/test/core/end2end/tests/large_metadata.c +++ b/test/core/end2end/tests/large_metadata.c @@ -107,11 +107,12 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) { gpr_timespec deadline = five_seconds_time(); grpc_metadata meta; const size_t large_size = 64 * 1024; - grpc_arg arg = { GRPC_ARG_INTEGER, GRPC_ARG_MAX_METADATA_SIZE, - { .integer=(int)large_size + 1024 } }; - grpc_channel_args args = { 1, &arg }; - grpc_end2end_test_fixture f = begin_test( - config, "test_request_with_large_metadata", &args, &args); + grpc_arg arg = {GRPC_ARG_INTEGER, + GRPC_ARG_MAX_METADATA_SIZE, + {.integer=(int)large_size + 1024}}; + grpc_channel_args args = {1, &arg}; + grpc_end2end_test_fixture f = + begin_test(config, "test_request_with_large_metadata", &args, &args); cq_verifier *cqv = cq_verifier_create(f.cq); grpc_op ops[6]; grpc_op *op; From 305ffd4847617c7206b0b4ccec0fcd8977b2e095 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 4 May 2016 10:26:24 -0700 Subject: [PATCH 0258/1894] make SendStatusFromServer optionally send a message as well --- .../Internal/FakeNativeCall.cs | 3 +- .../Grpc.Core/Internal/AsyncCallServer.cs | 3 +- .../Grpc.Core/Internal/CallSafeHandle.cs | 7 +++-- src/csharp/Grpc.Core/Internal/INativeCall.cs | 2 +- .../Grpc.Core/Internal/NativeMethods.cs | 18 ++++++----- src/csharp/ext/grpc_csharp_ext.c | 30 +++++++++++++------ 6 files changed, 41 insertions(+), 22 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/Internal/FakeNativeCall.cs b/src/csharp/Grpc.Core.Tests/Internal/FakeNativeCall.cs index 1bec258ca29..909112a47c5 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/FakeNativeCall.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/FakeNativeCall.cs @@ -165,7 +165,8 @@ namespace Grpc.Core.Internal.Tests SendCompletionHandler = callback; } - public void StartSendStatusFromServer(SendCompletionHandler callback, Status status, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata) + public void StartSendStatusFromServer(SendCompletionHandler callback, Status status, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata, + byte[] optionalPayload, WriteFlags writeFlags) { SendStatusFromServerHandler = callback; } diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs index eafe2ccab87..c5d900b1346 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs @@ -149,7 +149,8 @@ namespace Grpc.Core.Internal using (var metadataArray = MetadataArraySafeHandle.Create(trailers)) { - call.StartSendStatusFromServer(HandleSendStatusFromServerFinished, status, metadataArray, !initialMetadataSent); + call.StartSendStatusFromServer(HandleSendStatusFromServerFinished, status, metadataArray, !initialMetadataSent, + null, new WriteFlags()); } halfcloseRequested = true; initialMetadataSent = true; diff --git a/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs b/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs index 500653ba5d3..244b97d4a47 100644 --- a/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs +++ b/src/csharp/Grpc.Core/Internal/CallSafeHandle.cs @@ -135,13 +135,16 @@ namespace Grpc.Core.Internal } } - public void StartSendStatusFromServer(SendCompletionHandler callback, Status status, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata) + public void StartSendStatusFromServer(SendCompletionHandler callback, Status status, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata, + byte[] optionalPayload, WriteFlags writeFlags) { using (completionQueue.NewScope()) { var ctx = BatchContextSafeHandle.Create(); + var optionalPayloadLength = optionalPayload != null ? new UIntPtr((ulong)optionalPayload.Length) : UIntPtr.Zero; completionRegistry.RegisterBatchCompletion(ctx, (success, context) => callback(success)); - Native.grpcsharp_call_send_status_from_server(this, ctx, status.StatusCode, status.Detail, metadataArray, sendEmptyInitialMetadata).CheckOk(); + Native.grpcsharp_call_send_status_from_server(this, ctx, status.StatusCode, status.Detail, metadataArray, sendEmptyInitialMetadata, + optionalPayload, optionalPayloadLength, writeFlags).CheckOk(); } } diff --git a/src/csharp/Grpc.Core/Internal/INativeCall.cs b/src/csharp/Grpc.Core/Internal/INativeCall.cs index cbef5991396..cd3719cb50c 100644 --- a/src/csharp/Grpc.Core/Internal/INativeCall.cs +++ b/src/csharp/Grpc.Core/Internal/INativeCall.cs @@ -78,7 +78,7 @@ namespace Grpc.Core.Internal void StartSendCloseFromClient(SendCompletionHandler callback); - void StartSendStatusFromServer(SendCompletionHandler callback, Grpc.Core.Status status, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata); + void StartSendStatusFromServer(SendCompletionHandler callback, Grpc.Core.Status status, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata, byte[] optionalPayload, Grpc.Core.WriteFlags writeFlags); void StartServerSide(ReceivedCloseOnServerHandler callback); } diff --git a/src/csharp/Grpc.Core/Internal/NativeMethods.cs b/src/csharp/Grpc.Core/Internal/NativeMethods.cs index 9ee0ba3bc05..c277c73ef04 100644 --- a/src/csharp/Grpc.Core/Internal/NativeMethods.cs +++ b/src/csharp/Grpc.Core/Internal/NativeMethods.cs @@ -421,20 +421,21 @@ namespace Grpc.Core.Internal public delegate GRPCCallError grpcsharp_call_cancel_delegate(CallSafeHandle call); public delegate GRPCCallError grpcsharp_call_cancel_with_status_delegate(CallSafeHandle call, StatusCode status, string description); public delegate GRPCCallError grpcsharp_call_start_unary_delegate(CallSafeHandle call, - BatchContextSafeHandle ctx, byte[] send_buffer, UIntPtr send_buffer_len, MetadataArraySafeHandle metadataArray, WriteFlags writeFlags); + BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, MetadataArraySafeHandle metadataArray, WriteFlags writeFlags); public delegate GRPCCallError grpcsharp_call_start_client_streaming_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray); public delegate GRPCCallError grpcsharp_call_start_server_streaming_delegate(CallSafeHandle call, - BatchContextSafeHandle ctx, byte[] send_buffer, UIntPtr send_buffer_len, + BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, MetadataArraySafeHandle metadataArray, WriteFlags writeFlags); public delegate GRPCCallError grpcsharp_call_start_duplex_streaming_delegate(CallSafeHandle call, BatchContextSafeHandle ctx, MetadataArraySafeHandle metadataArray); public delegate GRPCCallError grpcsharp_call_send_message_delegate(CallSafeHandle call, - BatchContextSafeHandle ctx, byte[] send_buffer, UIntPtr send_buffer_len, WriteFlags writeFlags, bool sendEmptyInitialMetadata); + BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, WriteFlags writeFlags, bool sendEmptyInitialMetadata); public delegate GRPCCallError grpcsharp_call_send_close_from_client_delegate(CallSafeHandle call, BatchContextSafeHandle ctx); public delegate GRPCCallError grpcsharp_call_send_status_from_server_delegate(CallSafeHandle call, - BatchContextSafeHandle ctx, StatusCode statusCode, string statusMessage, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata); + BatchContextSafeHandle ctx, StatusCode statusCode, string statusMessage, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata, + byte[] optionalSendBuffer, UIntPtr optionalSendBufferLen, WriteFlags writeFlags); public delegate GRPCCallError grpcsharp_call_recv_message_delegate(CallSafeHandle call, BatchContextSafeHandle ctx); public delegate GRPCCallError grpcsharp_call_recv_initial_metadata_delegate(CallSafeHandle call, @@ -593,7 +594,7 @@ namespace Grpc.Core.Internal [DllImport("grpc_csharp_ext.dll")] public static extern GRPCCallError grpcsharp_call_start_unary(CallSafeHandle call, - BatchContextSafeHandle ctx, byte[] send_buffer, UIntPtr send_buffer_len, MetadataArraySafeHandle metadataArray, WriteFlags writeFlags); + BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, MetadataArraySafeHandle metadataArray, WriteFlags writeFlags); [DllImport("grpc_csharp_ext.dll")] public static extern GRPCCallError grpcsharp_call_start_client_streaming(CallSafeHandle call, @@ -601,7 +602,7 @@ namespace Grpc.Core.Internal [DllImport("grpc_csharp_ext.dll")] public static extern GRPCCallError grpcsharp_call_start_server_streaming(CallSafeHandle call, - BatchContextSafeHandle ctx, byte[] send_buffer, UIntPtr send_buffer_len, + BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, MetadataArraySafeHandle metadataArray, WriteFlags writeFlags); [DllImport("grpc_csharp_ext.dll")] @@ -610,7 +611,7 @@ namespace Grpc.Core.Internal [DllImport("grpc_csharp_ext.dll")] public static extern GRPCCallError grpcsharp_call_send_message(CallSafeHandle call, - BatchContextSafeHandle ctx, byte[] send_buffer, UIntPtr send_buffer_len, WriteFlags writeFlags, bool sendEmptyInitialMetadata); + BatchContextSafeHandle ctx, byte[] sendBuffer, UIntPtr sendBufferLen, WriteFlags writeFlags, bool sendEmptyInitialMetadata); [DllImport("grpc_csharp_ext.dll")] public static extern GRPCCallError grpcsharp_call_send_close_from_client(CallSafeHandle call, @@ -618,7 +619,8 @@ namespace Grpc.Core.Internal [DllImport("grpc_csharp_ext.dll")] public static extern GRPCCallError grpcsharp_call_send_status_from_server(CallSafeHandle call, - BatchContextSafeHandle ctx, StatusCode statusCode, string statusMessage, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata); + BatchContextSafeHandle ctx, StatusCode statusCode, string statusMessage, MetadataArraySafeHandle metadataArray, bool sendEmptyInitialMetadata, + byte[] optionalSendBuffer, UIntPtr optionalSendBufferLen, WriteFlags writeFlags); [DllImport("grpc_csharp_ext.dll")] public static extern GRPCCallError grpcsharp_call_recv_message(CallSafeHandle call, diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index aeef8a79e99..5b8ff9b819b 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -715,10 +715,11 @@ grpcsharp_call_send_close_from_client(grpc_call *call, GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_send_status_from_server( grpc_call *call, grpcsharp_batch_context *ctx, grpc_status_code status_code, const char *status_details, grpc_metadata_array *trailing_metadata, - int32_t send_empty_initial_metadata) { + int32_t send_empty_initial_metadata, const char* optional_send_buffer, + size_t optional_send_buffer_len, uint32_t write_flags) { /* TODO: don't use magic number */ - grpc_op ops[2]; - size_t nops = send_empty_initial_metadata ? 2 : 1; + grpc_op ops[3]; + size_t nops = 1; ops[0].op = GRPC_OP_SEND_STATUS_FROM_SERVER; ops[0].data.send_status_from_server.status = status_code; ops[0].data.send_status_from_server.status_details = @@ -731,12 +732,23 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_send_status_from_server( ctx->send_status_from_server.trailing_metadata.metadata; ops[0].flags = 0; ops[0].reserved = NULL; - ops[1].op = GRPC_OP_SEND_INITIAL_METADATA; - ops[1].data.send_initial_metadata.count = 0; - ops[1].data.send_initial_metadata.metadata = NULL; - ops[1].flags = 0; - ops[1].reserved = NULL; - + if (optional_send_buffer) { + ops[nops].op = GRPC_OP_SEND_MESSAGE; + ctx->send_message = string_to_byte_buffer(optional_send_buffer, + optional_send_buffer_len); + ops[nops].data.send_message = ctx->send_message; + ops[nops].flags = write_flags; + ops[nops].reserved = NULL; + nops ++; + } + if (send_empty_initial_metadata) { + ops[nops].op = GRPC_OP_SEND_INITIAL_METADATA; + ops[nops].data.send_initial_metadata.count = 0; + ops[nops].data.send_initial_metadata.metadata = NULL; + ops[nops].flags = 0; + ops[nops].reserved = NULL; + nops++; + } return grpc_call_start_batch(call, ops, nops, ctx, NULL); } From 14e8dee2dd1fc2db7c2dfbf092fc7d99a296062a Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 4 May 2016 12:59:23 -0700 Subject: [PATCH 0259/1894] use just one response batch for unary response serverside calls --- .../Internal/AsyncCallServerTest.cs | 2 +- .../Grpc.Core/Internal/AsyncCallServer.cs | 11 +++++-- .../Grpc.Core/Internal/ServerCallHandler.cs | 32 +++++++++---------- 3 files changed, 26 insertions(+), 19 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs index 058371521d6..0e204761f61 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallServerTest.cs @@ -168,7 +168,7 @@ namespace Grpc.Core.Internal.Tests var responseStream = new ServerResponseStream(asyncCallServer); var writeTask = responseStream.WriteAsync("request1"); - var writeStatusTask = asyncCallServer.SendStatusFromServerAsync(Status.DefaultSuccess, new Metadata()); + var writeStatusTask = asyncCallServer.SendStatusFromServerAsync(Status.DefaultSuccess, new Metadata(), null); fakeCall.SendCompletionHandler(true); fakeCall.SendStatusFromServerHandler(true); diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs index c5d900b1346..b1566b44a7c 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallServer.cs @@ -139,8 +139,11 @@ namespace Grpc.Core.Internal /// Sends call result status, indicating we are done with writes. /// Sending a status different from StatusCode.OK will also implicitly cancel the call. /// - public Task SendStatusFromServerAsync(Status status, Metadata trailers) + public Task SendStatusFromServerAsync(Status status, Metadata trailers, Tuple optionalWrite) { + byte[] payload = optionalWrite != null ? UnsafeSerialize(optionalWrite.Item1) : null; + var writeFlags = optionalWrite != null ? optionalWrite.Item2 : default(WriteFlags); + lock (myLock) { GrpcPreconditions.CheckState(started); @@ -150,11 +153,15 @@ namespace Grpc.Core.Internal using (var metadataArray = MetadataArraySafeHandle.Create(trailers)) { call.StartSendStatusFromServer(HandleSendStatusFromServerFinished, status, metadataArray, !initialMetadataSent, - null, new WriteFlags()); + payload, writeFlags); } halfcloseRequested = true; initialMetadataSent = true; sendStatusFromServerTcs = new TaskCompletionSource(); + if (optionalWrite != null) + { + streamingWritesCounter++; + } return sendStatusFromServerTcs.Task; } } diff --git a/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs b/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs index 00d82d51e82..bbbefd06990 100644 --- a/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs +++ b/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs @@ -75,14 +75,15 @@ namespace Grpc.Core.Internal var responseStream = new ServerResponseStream(asyncCall); Status status; + Tuple responseTuple = null; var context = HandlerUtils.NewContext(newRpc, asyncCall.Peer, responseStream, asyncCall.CancellationToken); try { GrpcPreconditions.CheckArgument(await requestStream.MoveNext().ConfigureAwait(false)); var request = requestStream.Current; - var result = await handler(request, context).ConfigureAwait(false); + var response = await handler(request, context).ConfigureAwait(false); status = context.Status; - await responseStream.WriteAsync(result).ConfigureAwait(false); + responseTuple = Tuple.Create(response, HandlerUtils.GetWriteFlags(context.WriteOptions)); } catch (Exception e) { @@ -91,7 +92,7 @@ namespace Grpc.Core.Internal } try { - await asyncCall.SendStatusFromServerAsync(status, context.ResponseTrailers).ConfigureAwait(false); + await asyncCall.SendStatusFromServerAsync(status, context.ResponseTrailers, responseTuple).ConfigureAwait(false); } catch (OperationCanceledException) { @@ -145,7 +146,7 @@ namespace Grpc.Core.Internal try { - await asyncCall.SendStatusFromServerAsync(status, context.ResponseTrailers).ConfigureAwait(false); + await asyncCall.SendStatusFromServerAsync(status, context.ResponseTrailers, null).ConfigureAwait(false); } catch (OperationCanceledException) { @@ -183,19 +184,13 @@ namespace Grpc.Core.Internal var responseStream = new ServerResponseStream(asyncCall); Status status; + Tuple responseTuple = null; var context = HandlerUtils.NewContext(newRpc, asyncCall.Peer, responseStream, asyncCall.CancellationToken); try { - var result = await handler(requestStream, context).ConfigureAwait(false); + var response = await handler(requestStream, context).ConfigureAwait(false); status = context.Status; - try - { - await responseStream.WriteAsync(result).ConfigureAwait(false); - } - catch (OperationCanceledException) - { - status = Status.DefaultCancelled; - } + responseTuple = Tuple.Create(response, HandlerUtils.GetWriteFlags(context.WriteOptions)); } catch (Exception e) { @@ -205,7 +200,7 @@ namespace Grpc.Core.Internal try { - await asyncCall.SendStatusFromServerAsync(status, context.ResponseTrailers).ConfigureAwait(false); + await asyncCall.SendStatusFromServerAsync(status, context.ResponseTrailers, responseTuple).ConfigureAwait(false); } catch (OperationCanceledException) { @@ -256,7 +251,7 @@ namespace Grpc.Core.Internal } try { - await asyncCall.SendStatusFromServerAsync(status, context.ResponseTrailers).ConfigureAwait(false); + await asyncCall.SendStatusFromServerAsync(status, context.ResponseTrailers, null).ConfigureAwait(false); } catch (OperationCanceledException) { @@ -278,7 +273,7 @@ namespace Grpc.Core.Internal asyncCall.Initialize(newRpc.Call); var finishedTask = asyncCall.ServerSideCallAsync(); - await asyncCall.SendStatusFromServerAsync(new Status(StatusCode.Unimplemented, ""), Metadata.Empty).ConfigureAwait(false); + await asyncCall.SendStatusFromServerAsync(new Status(StatusCode.Unimplemented, ""), Metadata.Empty, null).ConfigureAwait(false); await finishedTask.ConfigureAwait(false); } } @@ -297,6 +292,11 @@ namespace Grpc.Core.Internal return new Status(StatusCode.Unknown, "Exception was thrown by handler."); } + public static WriteFlags GetWriteFlags(WriteOptions writeOptions) + { + return writeOptions != null ? writeOptions.Flags : default(WriteFlags); + } + public static ServerCallContext NewContext(ServerRpcNew newRpc, string peer, ServerResponseStream serverResponseStream, CancellationToken cancellationToken) where TRequest : class where TResponse : class From 2901ea55ed17b16107bda30091a8ca0b84f6a926 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 4 May 2016 13:42:04 -0700 Subject: [PATCH 0260/1894] improve serverside handlers --- .../Grpc.Core/Internal/ServerCallHandler.cs | 40 +++++++++++++------ 1 file changed, 28 insertions(+), 12 deletions(-) diff --git a/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs b/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs index bbbefd06990..85b7a4b01e9 100644 --- a/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs +++ b/src/csharp/Grpc.Core/Internal/ServerCallHandler.cs @@ -87,16 +87,20 @@ namespace Grpc.Core.Internal } catch (Exception e) { - Logger.Error(e, "Exception occured in handler."); + if (!(e is RpcException)) + { + Logger.Warning(e, "Exception occured in handler."); + } status = HandlerUtils.StatusFromException(e); } try { await asyncCall.SendStatusFromServerAsync(status, context.ResponseTrailers, responseTuple).ConfigureAwait(false); } - catch (OperationCanceledException) + catch (Exception) { - // Call has been already cancelled. + asyncCall.Cancel(); + throw; } await finishedTask.ConfigureAwait(false); } @@ -140,7 +144,10 @@ namespace Grpc.Core.Internal } catch (Exception e) { - Logger.Error(e, "Exception occured in handler."); + if (!(e is RpcException)) + { + Logger.Warning(e, "Exception occured in handler."); + } status = HandlerUtils.StatusFromException(e); } @@ -148,9 +155,10 @@ namespace Grpc.Core.Internal { await asyncCall.SendStatusFromServerAsync(status, context.ResponseTrailers, null).ConfigureAwait(false); } - catch (OperationCanceledException) + catch (Exception) { - // Call has been already cancelled. + asyncCall.Cancel(); + throw; } await finishedTask.ConfigureAwait(false); } @@ -194,7 +202,10 @@ namespace Grpc.Core.Internal } catch (Exception e) { - Logger.Error(e, "Exception occured in handler."); + if (!(e is RpcException)) + { + Logger.Warning(e, "Exception occured in handler."); + } status = HandlerUtils.StatusFromException(e); } @@ -202,9 +213,10 @@ namespace Grpc.Core.Internal { await asyncCall.SendStatusFromServerAsync(status, context.ResponseTrailers, responseTuple).ConfigureAwait(false); } - catch (OperationCanceledException) + catch (Exception) { - // Call has been already cancelled. + asyncCall.Cancel(); + throw; } await finishedTask.ConfigureAwait(false); } @@ -246,16 +258,20 @@ namespace Grpc.Core.Internal } catch (Exception e) { - Logger.Error(e, "Exception occured in handler."); + if (!(e is RpcException)) + { + Logger.Warning(e, "Exception occured in handler."); + } status = HandlerUtils.StatusFromException(e); } try { await asyncCall.SendStatusFromServerAsync(status, context.ResponseTrailers, null).ConfigureAwait(false); } - catch (OperationCanceledException) + catch (Exception) { - // Call has been already cancelled. + asyncCall.Cancel(); + throw; } await finishedTask.ConfigureAwait(false); } From 5b15afd75c69bc81b5378691b21ef8fd16c545d7 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 4 May 2016 15:00:14 -0700 Subject: [PATCH 0261/1894] Progress converting to new error system --- .../server/secure/server_secure_chttp2.c | 9 +- src/core/lib/http/httpcli.c | 63 +++-- src/core/lib/http/httpcli.h | 19 +- src/core/lib/http/parser.c | 230 +++++++++--------- src/core/lib/http/parser.h | 17 +- src/core/lib/iomgr/resolve_address.h | 14 +- src/core/lib/iomgr/resolve_address_posix.c | 84 ++++--- src/core/lib/iomgr/unix_sockets_posix.h | 3 +- 8 files changed, 229 insertions(+), 210 deletions(-) diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 031cebb7c3a..68d923e7e44 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -176,6 +176,7 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, grpc_security_status status = GRPC_SECURITY_ERROR; grpc_server_security_connector *sc = NULL; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_error *err = GRPC_ERROR_NONE; GRPC_API_TRACE( "grpc_server_add_secure_http2_port(" @@ -214,11 +215,12 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, gpr_mu_init(&state->mu); gpr_ref_init(&state->refcount, 1); + grpc_error **errs = gpr_malloc(sizeof(*errs) * resolved->naddrs); for (i = 0; i < resolved->naddrs; i++) { - port_temp = grpc_tcp_server_add_port( + errs[i] = grpc_tcp_server_add_port( tcp, (struct sockaddr *)&resolved->addrs[i].addr, - resolved->addrs[i].len); - if (port_temp > 0) { + resolved->addrs[i].len, &port_temp); + if (errs[i] != GRPC_ERROR_NONE) { if (port_num == -1) { port_num = port_temp; } else { @@ -247,6 +249,7 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, /* Error path: cleanup and return */ error: + GPR_ASSERT(err != GRPC_ERROR_NONE); if (resolved) { grpc_resolved_addresses_destroy(resolved); } diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index a59452fc592..fa421588e26 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -59,8 +59,7 @@ typedef struct { gpr_timespec deadline; int have_read_byte; const grpc_httpcli_handshaker *handshaker; - grpc_httpcli_response_cb on_response; - void *user_data; + grpc_closure *on_done; grpc_httpcli_context *context; grpc_pollset *pollset; grpc_iomgr_object iomgr_obj; @@ -96,11 +95,10 @@ void grpc_httpcli_context_destroy(grpc_httpcli_context *context) { static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req); static void finish(grpc_exec_ctx *exec_ctx, internal_request *req, - int success) { + grpc_error *error) { grpc_pollset_set_del_pollset(exec_ctx, req->context->pollset_set, req->pollset); - req->on_response(exec_ctx, req->user_data, - success ? &req->parser.http.response : NULL); + grpc_exec_ctx_push(exec_ctx, req->on_done, error, NULL); grpc_http_parser_destroy(&req->parser); if (req->addresses != NULL) { grpc_resolved_addresses_destroy(req->addresses); @@ -141,11 +139,11 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, } else if (!req->have_read_byte) { next_address(exec_ctx, req); } else { - int parse_success = grpc_http_parser_eof(&req->parser); - if (parse_success && (req->parser.type != GRPC_HTTP_RESPONSE)) { - parse_success = 0; + grpc_error *err = grpc_http_parser_eof(&req->parser); + if (err == GRPC_ERROR_NONE && (req->parser.type != GRPC_HTTP_RESPONSE)) { + err = GRPC_ERROR_CREATE("Expected http response, got http request"); } - finish(exec_ctx, req, parse_success); + finish(exec_ctx, req, err); } } @@ -208,29 +206,28 @@ static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req) { (struct sockaddr *)&addr->addr, addr->len, req->deadline); } -static void on_resolved(grpc_exec_ctx *exec_ctx, void *arg, - grpc_resolved_addresses *addresses) { +static void on_resolved(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { internal_request *req = arg; - if (!addresses) { - finish(exec_ctx, req, 0); + if (error != GRPC_ERROR_NONE) { + finish(exec_ctx, req, error); return; } - req->addresses = addresses; req->next_address = 0; next_address(exec_ctx, req); } -static void internal_request_begin( - grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, - grpc_pollset *pollset, const grpc_httpcli_request *request, - gpr_timespec deadline, grpc_httpcli_response_cb on_response, - void *user_data, const char *name, gpr_slice request_text) { +static void internal_request_begin(grpc_exec_ctx *exec_ctx, + grpc_httpcli_context *context, + grpc_pollset *pollset, + const grpc_httpcli_request *request, + gpr_timespec deadline, grpc_closure *on_done, + grpc_httpcli_response *response, + const char *name, gpr_slice request_text) { internal_request *req = gpr_malloc(sizeof(internal_request)); memset(req, 0, sizeof(*req)); req->request_text = request_text; - grpc_http_parser_init(&req->parser); - req->on_response = on_response; - req->user_data = user_data; + grpc_http_parser_init(&req->parser, GRPC_HTTP_RESPONSE, response); + req->on_done = on_done; req->deadline = deadline; req->handshaker = request->handshaker ? request->handshaker : &grpc_httpcli_plaintext; @@ -247,22 +244,22 @@ static void internal_request_begin( grpc_pollset_set_add_pollset(exec_ctx, req->context->pollset_set, req->pollset); grpc_resolve_address(exec_ctx, request->host, req->handshaker->default_port, - on_resolved, req); + grpc_closure_create(on_resolved, req), &req->addresses); } void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, grpc_pollset *pollset, const grpc_httpcli_request *request, - gpr_timespec deadline, - grpc_httpcli_response_cb on_response, void *user_data) { + gpr_timespec deadline, grpc_closure *on_done, + grpc_httpcli_response *response) { char *name; if (g_get_override && - g_get_override(exec_ctx, request, deadline, on_response, user_data)) { + g_get_override(exec_ctx, request, deadline, on_done, response)) { return; } gpr_asprintf(&name, "HTTP:GET:%s:%s", request->host, request->http.path); - internal_request_begin(exec_ctx, context, pollset, request, deadline, - on_response, user_data, name, + internal_request_begin(exec_ctx, context, pollset, request, deadline, on_done, + response, name, grpc_httpcli_format_get_request(request)); gpr_free(name); } @@ -271,18 +268,18 @@ void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, grpc_pollset *pollset, const grpc_httpcli_request *request, const char *body_bytes, size_t body_size, - gpr_timespec deadline, - grpc_httpcli_response_cb on_response, void *user_data) { + gpr_timespec deadline, grpc_closure *on_done, + grpc_httpcli_response *response) { char *name; if (g_post_override && g_post_override(exec_ctx, request, body_bytes, body_size, deadline, - on_response, user_data)) { + on_done, response)) { return; } gpr_asprintf(&name, "HTTP:POST:%s:%s", request->host, request->http.path); internal_request_begin( - exec_ctx, context, pollset, request, deadline, on_response, user_data, - name, grpc_httpcli_format_post_request(request, body_bytes, body_size)); + exec_ctx, context, pollset, request, deadline, on_done, response, name, + grpc_httpcli_format_post_request(request, body_bytes, body_size)); gpr_free(name); } diff --git a/src/core/lib/http/httpcli.h b/src/core/lib/http/httpcli.h index 11a32a125c8..2d57864a1ff 100644 --- a/src/core/lib/http/httpcli.h +++ b/src/core/lib/http/httpcli.h @@ -81,11 +81,6 @@ typedef struct grpc_httpcli_request { /* Expose the parser response type as a httpcli response too */ typedef struct grpc_http_response grpc_httpcli_response; -/* Callback for grpc_httpcli_get and grpc_httpcli_post. */ -typedef void (*grpc_httpcli_response_cb)(grpc_exec_ctx *exec_ctx, - void *user_data, - const grpc_http_response *response); - void grpc_httpcli_context_init(grpc_httpcli_context *context); void grpc_httpcli_context_destroy(grpc_httpcli_context *context); @@ -102,8 +97,8 @@ void grpc_httpcli_context_destroy(grpc_httpcli_context *context); void grpc_httpcli_get(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, grpc_pollset *pollset, const grpc_httpcli_request *request, - gpr_timespec deadline, - grpc_httpcli_response_cb on_response, void *user_data); + gpr_timespec deadline, grpc_closure *on_complete, + grpc_httpcli_response *response); /* Asynchronously perform a HTTP POST. 'context' specifies the http context under which to do the post @@ -124,19 +119,19 @@ void grpc_httpcli_post(grpc_exec_ctx *exec_ctx, grpc_httpcli_context *context, grpc_pollset *pollset, const grpc_httpcli_request *request, const char *body_bytes, size_t body_size, - gpr_timespec deadline, - grpc_httpcli_response_cb on_response, void *user_data); + gpr_timespec deadline, grpc_closure *on_complete, + grpc_httpcli_response *response); /* override functions return 1 if they handled the request, 0 otherwise */ typedef int (*grpc_httpcli_get_override)(grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request, gpr_timespec deadline, - grpc_httpcli_response_cb on_response, - void *user_data); + grpc_closure *on_complete, + grpc_httpcli_response *response); typedef int (*grpc_httpcli_post_override)( grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request, const char *body_bytes, size_t body_size, gpr_timespec deadline, - grpc_httpcli_response_cb on_response, void *user_data); + grpc_closure *on_complete, grpc_httpcli_response *response); void grpc_httpcli_set_override(grpc_httpcli_get_override get, grpc_httpcli_post_override post); diff --git a/src/core/lib/http/parser.c b/src/core/lib/http/parser.c index a7efb5e73ea..680174c8426 100644 --- a/src/core/lib/http/parser.c +++ b/src/core/lib/http/parser.c @@ -48,37 +48,38 @@ static char *buf2str(void *buffer, size_t length) { return out; } -static int handle_response_line(grpc_http_parser *parser) { +static grpc_error *handle_response_line(grpc_http_parser *parser) { uint8_t *beg = parser->cur_line; uint8_t *cur = beg; uint8_t *end = beg + parser->cur_line_length; - if (cur == end || *cur++ != 'H') goto error; - if (cur == end || *cur++ != 'T') goto error; - if (cur == end || *cur++ != 'T') goto error; - if (cur == end || *cur++ != 'P') goto error; - if (cur == end || *cur++ != '/') goto error; - if (cur == end || *cur++ != '1') goto error; - if (cur == end || *cur++ != '.') goto error; - if (cur == end || *cur < '0' || *cur++ > '1') goto error; - if (cur == end || *cur++ != ' ') goto error; - if (cur == end || *cur < '1' || *cur++ > '9') goto error; - if (cur == end || *cur < '0' || *cur++ > '9') goto error; - if (cur == end || *cur < '0' || *cur++ > '9') goto error; - parser->http.response.status = + if (cur == end || *cur++ != 'H') return GRPC_ERROR_CREATE("Expected 'H'"); + if (cur == end || *cur++ != 'T') return GRPC_ERROR_CREATE("Expected 'T'"); + if (cur == end || *cur++ != 'T') return GRPC_ERROR_CREATE("Expected 'T'"); + if (cur == end || *cur++ != 'P') return GRPC_ERROR_CREATE("Expected 'P'"); + if (cur == end || *cur++ != '/') return GRPC_ERROR_CREATE("Expected '/'"); + if (cur == end || *cur++ != '1') return GRPC_ERROR_CREATE("Expected '1'"); + if (cur == end || *cur++ != '.') return GRPC_ERROR_CREATE("Expected '.'"); + if (cur == end || *cur < '0' || *cur++ > '1') { + return GRPC_ERROR_CREATE("Expected HTTP/1.0 or HTTP/1.1"); + } + if (cur == end || *cur++ != ' ') return GRPC_ERROR_CREATE("Expected ' '"); + if (cur == end || *cur < '1' || *cur++ > '9') + return GRPC_ERROR_CREATE("Expected status code"); + if (cur == end || *cur < '0' || *cur++ > '9') + return GRPC_ERROR_CREATE("Expected status code"); + if (cur == end || *cur < '0' || *cur++ > '9') + return GRPC_ERROR_CREATE("Expected status code"); + parser->http.response->status = (cur[-3] - '0') * 100 + (cur[-2] - '0') * 10 + (cur[-1] - '0'); - if (cur == end || *cur++ != ' ') goto error; + if (cur == end || *cur++ != ' ') return GRPC_ERROR_CREATE("Expected ' '"); /* we don't really care about the status code message */ - return 1; - -error: - if (grpc_http1_trace) gpr_log(GPR_ERROR, "Failed parsing response line"); - return 0; + return GRPC_ERROR_NONE; } -static int handle_request_line(grpc_http_parser *parser) { +static grpc_error *handle_request_line(grpc_http_parser *parser) { uint8_t *beg = parser->cur_line; uint8_t *cur = beg; uint8_t *end = beg + parser->cur_line_length; @@ -87,83 +88,81 @@ static int handle_request_line(grpc_http_parser *parser) { while (cur != end && *cur++ != ' ') ; - if (cur == end) goto error; - parser->http.request.method = buf2str(beg, (size_t)(cur - beg - 1)); + if (cur == end) return GRPC_ERROR_CREATE("No method on HTTP request line"); + parser->http.request->method = buf2str(beg, (size_t)(cur - beg - 1)); beg = cur; while (cur != end && *cur++ != ' ') ; - if (cur == end) goto error; - parser->http.request.path = buf2str(beg, (size_t)(cur - beg - 1)); - - if (cur == end || *cur++ != 'H') goto error; - if (cur == end || *cur++ != 'T') goto error; - if (cur == end || *cur++ != 'T') goto error; - if (cur == end || *cur++ != 'P') goto error; - if (cur == end || *cur++ != '/') goto error; + if (cur == end) return GRPC_ERROR_CREATE("No path on HTTP request line"); + parser->http.request->path = buf2str(beg, (size_t)(cur - beg - 1)); + + if (cur == end || *cur++ != 'H') return GRPC_ERROR_CREATE("Expected 'H'"); + if (cur == end || *cur++ != 'T') return GRPC_ERROR_CREATE("Expected 'T'"); + if (cur == end || *cur++ != 'T') return GRPC_ERROR_CREATE("Expected 'T'"); + if (cur == end || *cur++ != 'P') return GRPC_ERROR_CREATE("Expected 'P'"); + if (cur == end || *cur++ != '/') return GRPC_ERROR_CREATE("Expected '/'"); vers_major = (uint8_t)(*cur++ - '1' + 1); ++cur; - if (cur == end) goto error; + if (cur == end) + return GRPC_ERROR_CREATE("End of line in HTTP version string"); vers_minor = (uint8_t)(*cur++ - '1' + 1); if (vers_major == 1) { if (vers_minor == 0) { - parser->http.request.version = GRPC_HTTP_HTTP10; + parser->http.request->version = GRPC_HTTP_HTTP10; } else if (vers_minor == 1) { - parser->http.request.version = GRPC_HTTP_HTTP11; + parser->http.request->version = GRPC_HTTP_HTTP11; } else { - goto error; + return GRPC_ERROR_CREATE( + "Expected one of HTTP/1.0, HTTP/1.1, or HTTP/2.0"); } } else if (vers_major == 2) { if (vers_minor == 0) { - parser->http.request.version = GRPC_HTTP_HTTP20; + parser->http.request->version = GRPC_HTTP_HTTP20; } else { - goto error; + return GRPC_ERROR_CREATE( + "Expected one of HTTP/1.0, HTTP/1.1, or HTTP/2.0"); } } else { - goto error; + return GRPC_ERROR_CREATE("Expected one of HTTP/1.0, HTTP/1.1, or HTTP/2.0"); } - return 1; - -error: - if (grpc_http1_trace) gpr_log(GPR_ERROR, "Failed parsing request line"); - return 0; + return GRPC_ERROR_NONE; } -static int handle_first_line(grpc_http_parser *parser) { - if (parser->cur_line[0] == 'H') { - parser->type = GRPC_HTTP_RESPONSE; - return handle_response_line(parser); - } else { - parser->type = GRPC_HTTP_REQUEST; - return handle_request_line(parser); +static grpc_error *handle_first_line(grpc_http_parser *parser) { + switch (parser->type) { + case GRPC_HTTP_REQUEST: + return handle_request_line(parser); + case GRPC_HTTP_RESPONSE: + return handle_response_line(parser); } + GPR_UNREACHABLE_CODE(return GRPC_ERROR_CREATE("Should never reach here")); } -static int add_header(grpc_http_parser *parser) { +static grpc_error *add_header(grpc_http_parser *parser) { uint8_t *beg = parser->cur_line; uint8_t *cur = beg; uint8_t *end = beg + parser->cur_line_length; size_t *hdr_count = NULL; grpc_http_header **hdrs = NULL; grpc_http_header hdr = {NULL, NULL}; + grpc_error *error = GRPC_ERROR_NONE; GPR_ASSERT(cur != end); if (*cur == ' ' || *cur == '\t') { - if (grpc_http1_trace) - gpr_log(GPR_ERROR, "Continued header lines not supported yet"); - goto error; + error = GRPC_ERROR_CREATE("Continued header lines not supported yet"); + goto done; } while (cur != end && *cur != ':') { cur++; } if (cur == end) { - if (grpc_http1_trace) - gpr_log(GPR_ERROR, "Didn't find ':' in header string"); - goto error; + error = GRPC_ERROR_CREATE("Didn't find ':' in header string"); + goto done; } GPR_ASSERT(cur >= beg); hdr.key = buf2str(beg, (size_t)(cur - beg)); @@ -176,11 +175,11 @@ static int add_header(grpc_http_parser *parser) { hdr.value = buf2str(cur, (size_t)(end - cur) - parser->cur_line_end_length); if (parser->type == GRPC_HTTP_RESPONSE) { - hdr_count = &parser->http.response.hdr_count; - hdrs = &parser->http.response.hdrs; + hdr_count = &parser->http.response->hdr_count; + hdrs = &parser->http.response->hdrs; } else if (parser->type == GRPC_HTTP_REQUEST) { - hdr_count = &parser->http.request.hdr_count; - hdrs = &parser->http.request.hdrs; + hdr_count = &parser->http.request->hdr_count; + hdrs = &parser->http.request->hdrs; } else { return 0; } @@ -191,20 +190,21 @@ static int add_header(grpc_http_parser *parser) { *hdrs = gpr_realloc(*hdrs, parser->hdr_capacity * sizeof(**hdrs)); } (*hdrs)[(*hdr_count)++] = hdr; - return 1; -error: - gpr_free(hdr.key); - gpr_free(hdr.value); - return 0; +done: + if (error != GRPC_ERROR_NONE) { + gpr_free(hdr.key); + gpr_free(hdr.value); + } + return error; } -static int finish_line(grpc_http_parser *parser) { +static grpc_error *finish_line(grpc_http_parser *parser) { + grpc_error *err; switch (parser->state) { case GRPC_HTTP_FIRST_LINE: - if (!handle_first_line(parser)) { - return 0; - } + err = handle_first_line(parser); + if (err != GRPC_ERROR_NONE) return err; parser->state = GRPC_HTTP_HEADERS; break; case GRPC_HTTP_HEADERS: @@ -221,21 +221,21 @@ static int finish_line(grpc_http_parser *parser) { } parser->cur_line_length = 0; - return 1; + return GRPC_ERROR_NONE; } -static int addbyte_body(grpc_http_parser *parser, uint8_t byte) { +static grpc_error *addbyte_body(grpc_http_parser *parser, uint8_t byte) { size_t *body_length = NULL; char **body = NULL; if (parser->type == GRPC_HTTP_RESPONSE) { - body_length = &parser->http.response.body_length; - body = &parser->http.response.body; + body_length = &parser->http.response->body_length; + body = &parser->http.response->body; } else if (parser->type == GRPC_HTTP_REQUEST) { - body_length = &parser->http.request.body_length; - body = &parser->http.request.body; + body_length = &parser->http.request->body_length; + body = &parser->http.request->body; } else { - return 0; + GPR_UNREACHABLE_CODE(return GRPC_ERROR_CREATE("Should never reach here")); } if (*body_length == parser->body_capacity) { @@ -245,34 +245,35 @@ static int addbyte_body(grpc_http_parser *parser, uint8_t byte) { (*body)[*body_length] = (char)byte; (*body_length)++; - return 1; + return GRPC_ERROR_NONE; } -static int check_line(grpc_http_parser *parser) { +static grpc_error *check_line(grpc_http_parser *parser) { if (parser->cur_line_length >= 2 && parser->cur_line[parser->cur_line_length - 2] == '\r' && parser->cur_line[parser->cur_line_length - 1] == '\n') { - return 1; + return GRPC_ERROR_NONE; } // HTTP request with \n\r line termiantors. else if (parser->cur_line_length >= 2 && parser->cur_line[parser->cur_line_length - 2] == '\n' && parser->cur_line[parser->cur_line_length - 1] == '\r') { - return 1; + return GRPC_ERROR_NONE; } // HTTP request with only \n line terminators. else if (parser->cur_line_length >= 1 && parser->cur_line[parser->cur_line_length - 1] == '\n') { parser->cur_line_end_length = 1; - return 1; + return GRPC_ERROR_NONE; } - return 0; + return GRPC_ERROR_CREATE( + "Expected line ending (one of \\r\\n, \\n\\r, or \\n)"); } -static int addbyte(grpc_http_parser *parser, uint8_t byte) { +static grpc_error *addbyte(grpc_http_parser *parser, uint8_t byte) { switch (parser->state) { case GRPC_HTTP_FIRST_LINE: case GRPC_HTTP_HEADERS: @@ -287,7 +288,7 @@ static int addbyte(grpc_http_parser *parser, uint8_t byte) { if (check_line(parser)) { return finish_line(parser); } else { - return 1; + return GRPC_ERROR_NONE; } GPR_UNREACHABLE_CODE(return 0); case GRPC_HTTP_BODY: @@ -296,46 +297,53 @@ static int addbyte(grpc_http_parser *parser, uint8_t byte) { GPR_UNREACHABLE_CODE(return 0); } -void grpc_http_parser_init(grpc_http_parser *parser) { +void grpc_http_parser_init(grpc_http_parser *parser, grpc_http_type type, + void *request_or_response) { memset(parser, 0, sizeof(*parser)); parser->state = GRPC_HTTP_FIRST_LINE; - parser->type = GRPC_HTTP_UNKNOWN; + parser->type = type; + parser->http.request_or_response = request_or_response; parser->cur_line_end_length = 2; } -void grpc_http_parser_destroy(grpc_http_parser *parser) { +void grpc_http_parser_destroy(grpc_http_parser *parser) {} + +void grpc_http_request_destroy(grpc_http_request *request) { size_t i; - if (parser->type == GRPC_HTTP_RESPONSE) { - gpr_free(parser->http.response.body); - for (i = 0; i < parser->http.response.hdr_count; i++) { - gpr_free(parser->http.response.hdrs[i].key); - gpr_free(parser->http.response.hdrs[i].value); - } - gpr_free(parser->http.response.hdrs); - } else if (parser->type == GRPC_HTTP_REQUEST) { - gpr_free(parser->http.request.body); - for (i = 0; i < parser->http.request.hdr_count; i++) { - gpr_free(parser->http.request.hdrs[i].key); - gpr_free(parser->http.request.hdrs[i].value); - } - gpr_free(parser->http.request.hdrs); - gpr_free(parser->http.request.method); - gpr_free(parser->http.request.path); + gpr_free(request->body); + for (i = 0; i < request->hdr_count; i++) { + gpr_free(request->hdrs[i].key); + gpr_free(request->hdrs[i].value); } + gpr_free(request->hdrs); + gpr_free(request->method); + gpr_free(request->path); } -int grpc_http_parser_parse(grpc_http_parser *parser, gpr_slice slice) { +void grpc_http_response_destroy(grpc_http_response *response) { + size_t i; + gpr_free(response->body); + for (i = 0; i < response->hdr_count; i++) { + gpr_free(response->hdrs[i].key); + gpr_free(response->hdrs[i].value); + } + gpr_free(response->hdrs); +} + +grpc_error *grpc_http_parser_parse(grpc_http_parser *parser, gpr_slice slice) { size_t i; for (i = 0; i < GPR_SLICE_LENGTH(slice); i++) { - if (!addbyte(parser, GPR_SLICE_START_PTR(slice)[i])) { - return 0; - } + grpc_error *err = addbyte(parser, GPR_SLICE_START_PTR(slice)[i]); + if (err != GRPC_ERROR_NONE) return err; } - return 1; + return GRPC_ERROR_NONE; } -int grpc_http_parser_eof(grpc_http_parser *parser) { - return parser->state == GRPC_HTTP_BODY; +grpc_error *grpc_http_parser_eof(grpc_http_parser *parser) { + if (parser->state != GRPC_HTTP_BODY) { + return GRPC_ERROR_CREATE("Did not finish headers"); + } + return GRPC_ERROR_NONE; } diff --git a/src/core/lib/http/parser.h b/src/core/lib/http/parser.h index 536637e9a2d..6df3cc8b134 100644 --- a/src/core/lib/http/parser.h +++ b/src/core/lib/http/parser.h @@ -36,6 +36,7 @@ #include #include +#include "src/core/lib/iomgr/error.h" /* Maximum length of a header string of the form 'Key: Value\r\n' */ #define GRPC_HTTP_PARSER_MAX_HEADER_LENGTH 4096 @@ -61,7 +62,6 @@ typedef enum { typedef enum { GRPC_HTTP_RESPONSE, GRPC_HTTP_REQUEST, - GRPC_HTTP_UNKNOWN } grpc_http_type; /* A request */ @@ -97,8 +97,9 @@ typedef struct { grpc_http_type type; union { - grpc_http_response response; - grpc_http_request request; + grpc_http_response *response; + grpc_http_request *request; + void *request_or_response; } http; size_t body_capacity; size_t hdr_capacity; @@ -108,11 +109,15 @@ typedef struct { size_t cur_line_end_length; } grpc_http_parser; -void grpc_http_parser_init(grpc_http_parser *parser); +void grpc_http_parser_init(grpc_http_parser *parser, grpc_http_type type, + void *request_or_response); void grpc_http_parser_destroy(grpc_http_parser *parser); -int grpc_http_parser_parse(grpc_http_parser *parser, gpr_slice slice); -int grpc_http_parser_eof(grpc_http_parser *parser); +grpc_error *grpc_http_parser_parse(grpc_http_parser *parser, gpr_slice slice); +grpc_error *grpc_http_parser_eof(grpc_http_parser *parser); + +void grpc_http_request_destroy(grpc_http_request *request); +void grpc_http_response_destroy(grpc_http_response *response); extern int grpc_http1_trace; diff --git a/src/core/lib/iomgr/resolve_address.h b/src/core/lib/iomgr/resolve_address.h index ef198fe0f66..ddbe3757555 100644 --- a/src/core/lib/iomgr/resolve_address.h +++ b/src/core/lib/iomgr/resolve_address.h @@ -50,24 +50,20 @@ typedef struct { grpc_resolved_address *addrs; } grpc_resolved_addresses; -/* Async result callback: - On success: addresses is the result, and the callee must call - grpc_resolved_addresses_destroy when it's done with them - On failure: addresses is NULL */ -typedef void (*grpc_resolve_cb)(grpc_exec_ctx *exec_ctx, void *arg, - grpc_resolved_addresses *addresses); /* Asynchronously resolve addr. Use default_port if a port isn't designated in addr, otherwise use the port in addr. */ /* TODO(ctiller): add a timeout here */ extern void (*grpc_resolve_address)(grpc_exec_ctx *exec_ctx, const char *addr, const char *default_port, - grpc_resolve_cb cb, void *arg); + grpc_closure *on_done, + grpc_resolved_addresses **addresses); /* Destroy resolved addresses */ void grpc_resolved_addresses_destroy(grpc_resolved_addresses *addresses); /* Resolve addr in a blocking fashion. Returns NULL on failure. On success, result must be freed with grpc_resolved_addresses_destroy. */ -extern grpc_resolved_addresses *(*grpc_blocking_resolve_address)( - const char *name, const char *default_port); +extern grpc_error *(*grpc_blocking_resolve_address)( + const char *name, const char *default_port, + grpc_resolved_addresses **addresses); #endif /* GRPC_CORE_LIB_IOMGR_RESOLVE_ADDRESS_H */ diff --git a/src/core/lib/iomgr/resolve_address_posix.c b/src/core/lib/iomgr/resolve_address_posix.c index e7d90b9c60d..7622c3e7dc4 100644 --- a/src/core/lib/iomgr/resolve_address_posix.c +++ b/src/core/lib/iomgr/resolve_address_posix.c @@ -54,38 +54,33 @@ #include "src/core/lib/support/block_annotate.h" #include "src/core/lib/support/string.h" -typedef struct { - char *name; - char *default_port; - grpc_resolve_cb cb; - grpc_closure request_closure; - void *arg; -} request; - -static grpc_resolved_addresses *blocking_resolve_address_impl( - const char *name, const char *default_port) { +static grpc_error *blocking_resolve_address_impl( + const char *name, const char *default_port, + grpc_resolved_addresses **addresses) { struct addrinfo hints; struct addrinfo *result = NULL, *resp; char *host; char *port; int s; size_t i; - grpc_resolved_addresses *addrs = NULL; + grpc_error *err; if (name[0] == 'u' && name[1] == 'n' && name[2] == 'i' && name[3] == 'x' && name[4] == ':' && name[5] != 0) { - return grpc_resolve_unix_domain_address(name + 5); + return grpc_resolve_unix_domain_address(name + 5, addresses); } /* parse name, splitting it into host and port parts */ gpr_split_host_port(name, &host, &port); if (host == NULL) { - gpr_log(GPR_ERROR, "unparseable host:port: '%s'", name); + err = grpc_error_set_str(GRPC_ERROR_CREATE("unparseable host:port"), + GRPC_ERROR_STR_TARGET_ADDRESS, name); goto done; } if (port == NULL) { if (default_port == NULL) { - gpr_log(GPR_ERROR, "no port in name '%s'", name); + err = grpc_error_set_str(GRPC_ERROR_CREATE("no port in name"), + GRPC_ERROR_STR_TARGET_ADDRESS, name); goto done; } port = gpr_strdup(default_port); @@ -115,23 +110,31 @@ static grpc_resolved_addresses *blocking_resolve_address_impl( } if (s != 0) { - gpr_log(GPR_ERROR, "getaddrinfo: %s", gai_strerror(s)); + err = grpc_error_set_str( + grpc_error_set_str( + grpc_error_set_str(grpc_error_set_int(GRPC_ERROR_CREATE("OS Error"), + GRPC_ERROR_INT_ERRNO, s), + GRPC_ERROR_STR_OS_ERROR, gai_strerror(s)), + GRPC_ERROR_STR_SYSCALL, "getaddrinfo"), + GRPC_ERROR_STR_TARGET_ADDRESS, name); goto done; } /* Success path: set addrs non-NULL, fill it in */ - addrs = gpr_malloc(sizeof(grpc_resolved_addresses)); - addrs->naddrs = 0; + *addresses = gpr_malloc(sizeof(grpc_resolved_addresses)); + (*addresses)->naddrs = 0; for (resp = result; resp != NULL; resp = resp->ai_next) { - addrs->naddrs++; + (*addresses)->naddrs++; } - addrs->addrs = gpr_malloc(sizeof(grpc_resolved_address) * addrs->naddrs); + (*addresses)->addrs = + gpr_malloc(sizeof(grpc_resolved_address) * (*addresses)->naddrs); i = 0; for (resp = result; resp != NULL; resp = resp->ai_next) { - memcpy(&addrs->addrs[i].addr, resp->ai_addr, resp->ai_addrlen); - addrs->addrs[i].len = resp->ai_addrlen; + memcpy(&(*addresses)->addrs[i].addr, resp->ai_addr, resp->ai_addrlen); + (*addresses)->addrs[i].len = resp->ai_addrlen; i++; } + err = GRPC_ERROR_NONE; done: gpr_free(host); @@ -139,24 +142,33 @@ done: if (result) { freeaddrinfo(result); } - return addrs; + return err; } -grpc_resolved_addresses *(*grpc_blocking_resolve_address)( - const char *name, const char *default_port) = blocking_resolve_address_impl; +grpc_error *(*grpc_blocking_resolve_address)( + const char *name, const char *default_port, + grpc_resolved_addresses **addresses) = blocking_resolve_address_impl; + +typedef struct { + char *name; + char *default_port; + grpc_closure *on_done; + grpc_resolved_addresses **addrs_out; + grpc_closure request_closure; + void *arg; +} request; /* Callback to be passed to grpc_executor to asynch-ify * grpc_blocking_resolve_address */ static void do_request_thread(grpc_exec_ctx *exec_ctx, void *rp, grpc_error *error) { request *r = rp; - grpc_resolved_addresses *resolved = - grpc_blocking_resolve_address(r->name, r->default_port); - void *arg = r->arg; - grpc_resolve_cb cb = r->cb; + grpc_exec_ctx_push( + exec_ctx, r->on_done, + grpc_blocking_resolve_address(r->name, r->default_port, r->addrs_out), + NULL); gpr_free(r->name); gpr_free(r->default_port); - cb(exec_ctx, arg, resolved); gpr_free(r); } @@ -166,19 +178,21 @@ void grpc_resolved_addresses_destroy(grpc_resolved_addresses *addrs) { } static void resolve_address_impl(grpc_exec_ctx *exec_ctx, const char *name, - const char *default_port, grpc_resolve_cb cb, - void *arg) { + const char *default_port, + grpc_closure *on_done, + grpc_resolved_addresses **addrs) { request *r = gpr_malloc(sizeof(request)); grpc_closure_init(&r->request_closure, do_request_thread, r); r->name = gpr_strdup(name); r->default_port = gpr_strdup(default_port); - r->cb = cb; - r->arg = arg; + r->on_done = on_done; + r->addrs_out = addrs; grpc_executor_push(&r->request_closure, GRPC_ERROR_NONE); } void (*grpc_resolve_address)(grpc_exec_ctx *exec_ctx, const char *name, - const char *default_port, grpc_resolve_cb cb, - void *arg) = resolve_address_impl; + const char *default_port, grpc_closure *on_done, + grpc_resolved_addresses **addrs) = + resolve_address_impl; #endif diff --git a/src/core/lib/iomgr/unix_sockets_posix.h b/src/core/lib/iomgr/unix_sockets_posix.h index 6758c498e5f..db0516d9458 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.h +++ b/src/core/lib/iomgr/unix_sockets_posix.h @@ -43,7 +43,8 @@ void grpc_create_socketpair_if_unix(int sv[2]); -grpc_resolved_addresses *grpc_resolve_unix_domain_address(const char *name); +grpc_error *grpc_resolve_unix_domain_address( + const char *name, grpc_resolved_addresses **addresses); int grpc_is_unix_socket(const struct sockaddr *addr); From d039a98a94cc2f1d8769a3a11eea73494cc287f4 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Tue, 5 Apr 2016 15:15:03 -0700 Subject: [PATCH 0262/1894] Add Python grpcio protoc package --- setup.py | 1 + src/python/grpcio/grpc/__init__.py | 3 +- tools/distrib/python/bazel_deps.sh | 39 ++++++ tools/distrib/python/grpcio_protoc/.gitignore | 7 ++ .../python/grpcio_protoc/grpc/__init__.py | 30 +++++ .../grpcio_protoc/grpc/protoc/__init__.py | 29 +++++ .../protoc/grpc_python_protoc_compiler.py | 38 ++++++ .../grpc/protoc/grpc_python_protoc_plugin.py | 38 ++++++ .../python/grpcio_protoc/grpc/protoc/main.h | 33 +++++ .../grpcio_protoc/grpc/protoc/protoc.pyx | 39 ++++++ .../grpc/protoc/protoc_plugin.pyx | 39 ++++++ .../python/grpcio_protoc/protoc_deps.py | 32 +++++ .../python/grpcio_protoc/protoc_lib_deps.py | 32 +++++ tools/distrib/python/grpcio_protoc/setup.py | 102 +++++++++++++++ tools/distrib/python/grpcio_tools/MANIFEST.in | 5 + tools/distrib/python/mk_grpcio_protoc.py | 118 ++++++++++++++++++ tools/dockerfile/bazel/Dockerfile | 53 ++++++++ 17 files changed, 637 insertions(+), 1 deletion(-) create mode 100755 tools/distrib/python/bazel_deps.sh create mode 100644 tools/distrib/python/grpcio_protoc/.gitignore create mode 100644 tools/distrib/python/grpcio_protoc/grpc/__init__.py create mode 100644 tools/distrib/python/grpcio_protoc/grpc/protoc/__init__.py create mode 100644 tools/distrib/python/grpcio_protoc/grpc/protoc/grpc_python_protoc_compiler.py create mode 100644 tools/distrib/python/grpcio_protoc/grpc/protoc/grpc_python_protoc_plugin.py create mode 100644 tools/distrib/python/grpcio_protoc/grpc/protoc/main.h create mode 100644 tools/distrib/python/grpcio_protoc/grpc/protoc/protoc.pyx create mode 100644 tools/distrib/python/grpcio_protoc/grpc/protoc/protoc_plugin.pyx create mode 100644 tools/distrib/python/grpcio_protoc/protoc_deps.py create mode 100644 tools/distrib/python/grpcio_protoc/protoc_lib_deps.py create mode 100644 tools/distrib/python/grpcio_protoc/setup.py create mode 100644 tools/distrib/python/grpcio_tools/MANIFEST.in create mode 100755 tools/distrib/python/mk_grpcio_protoc.py create mode 100644 tools/dockerfile/bazel/Dockerfile diff --git a/setup.py b/setup.py index cd0d3a1a51b..af9eb685348 100644 --- a/setup.py +++ b/setup.py @@ -236,6 +236,7 @@ setup_arguments = { 'ext_modules': CYTHON_EXTENSION_MODULES, 'packages': list(PACKAGES), 'package_dir': PACKAGE_DIRECTORIES, + 'namespace_packages': ['grpc'], 'package_data': PACKAGE_DATA, 'install_requires': INSTALL_REQUIRES, 'setup_requires': SETUP_REQUIRES, diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py index 70865191060..b844a14c48d 100644 --- a/src/python/grpcio/grpc/__init__.py +++ b/src/python/grpcio/grpc/__init__.py @@ -1,4 +1,4 @@ -# Copyright 2015, Google Inc. +# Copyright 2015-2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -27,4 +27,5 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +__import__('pkg_resources').declare_namespace(__name__) diff --git a/tools/distrib/python/bazel_deps.sh b/tools/distrib/python/bazel_deps.sh new file mode 100755 index 00000000000..4619c008875 --- /dev/null +++ b/tools/distrib/python/bazel_deps.sh @@ -0,0 +1,39 @@ +#!/bin/bash + +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +cd $(dirname $0)/../../../ + +docker build -t bazel `realpath ./tools/dockerfile/bazel/` +docker run -v "`realpath .`:/src/grpc/" \ + -w /src/grpc/third_party/protobuf \ + bazel \ + bazel query 'deps('$1')' + diff --git a/tools/distrib/python/grpcio_protoc/.gitignore b/tools/distrib/python/grpcio_protoc/.gitignore new file mode 100644 index 00000000000..979704d970b --- /dev/null +++ b/tools/distrib/python/grpcio_protoc/.gitignore @@ -0,0 +1,7 @@ +build/ +protobuf/ +grpc_plugin/ +grpc_root/ +*.c +*.cpp +*.egg-info diff --git a/tools/distrib/python/grpcio_protoc/grpc/__init__.py b/tools/distrib/python/grpcio_protoc/grpc/__init__.py new file mode 100644 index 00000000000..70ac5edd483 --- /dev/null +++ b/tools/distrib/python/grpcio_protoc/grpc/__init__.py @@ -0,0 +1,30 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +__import__('pkg_resources').declare_namespace(__name__) diff --git a/tools/distrib/python/grpcio_protoc/grpc/protoc/__init__.py b/tools/distrib/python/grpcio_protoc/grpc/protoc/__init__.py new file mode 100644 index 00000000000..d5ad73a74ab --- /dev/null +++ b/tools/distrib/python/grpcio_protoc/grpc/protoc/__init__.py @@ -0,0 +1,29 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/tools/distrib/python/grpcio_protoc/grpc/protoc/grpc_python_protoc_compiler.py b/tools/distrib/python/grpcio_protoc/grpc/protoc/grpc_python_protoc_compiler.py new file mode 100644 index 00000000000..5395f2ac105 --- /dev/null +++ b/tools/distrib/python/grpcio_protoc/grpc/protoc/grpc_python_protoc_compiler.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python + +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import sys + +from grpc.protoc import protoc + + +if __name__ == '__main__': + protoc.run_main(sys.argv) diff --git a/tools/distrib/python/grpcio_protoc/grpc/protoc/grpc_python_protoc_plugin.py b/tools/distrib/python/grpcio_protoc/grpc/protoc/grpc_python_protoc_plugin.py new file mode 100644 index 00000000000..3b279e29769 --- /dev/null +++ b/tools/distrib/python/grpcio_protoc/grpc/protoc/grpc_python_protoc_plugin.py @@ -0,0 +1,38 @@ +#!/usr/bin/env python + +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import sys + +from grpc.protoc import protoc_plugin + + +if __name__ == '__main__': + protoc_plugin.run_main(sys.argv) diff --git a/tools/distrib/python/grpcio_protoc/grpc/protoc/main.h b/tools/distrib/python/grpcio_protoc/grpc/protoc/main.h new file mode 100644 index 00000000000..fc406a9260c --- /dev/null +++ b/tools/distrib/python/grpcio_protoc/grpc/protoc/main.h @@ -0,0 +1,33 @@ +// Copyright 2016, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +// We declare `main` here since we want access to it from Cython as an extern +// but *without* triggering a dllimport declspec when on Windows. +int main(int argc, char *argv[]); diff --git a/tools/distrib/python/grpcio_protoc/grpc/protoc/protoc.pyx b/tools/distrib/python/grpcio_protoc/grpc/protoc/protoc.pyx new file mode 100644 index 00000000000..d987ee1ceaa --- /dev/null +++ b/tools/distrib/python/grpcio_protoc/grpc/protoc/protoc.pyx @@ -0,0 +1,39 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +from libc cimport stdlib + +cdef extern from "grpc/protoc/main.h": + int main(int argc, char *argv[]) + +def run_main(list args not None): + cdef char **argv = stdlib.malloc(len(args)*sizeof(char *)) + for i in range(len(args)): + argv[i] = args[i] + return main(len(args), argv) diff --git a/tools/distrib/python/grpcio_protoc/grpc/protoc/protoc_plugin.pyx b/tools/distrib/python/grpcio_protoc/grpc/protoc/protoc_plugin.pyx new file mode 100644 index 00000000000..d987ee1ceaa --- /dev/null +++ b/tools/distrib/python/grpcio_protoc/grpc/protoc/protoc_plugin.pyx @@ -0,0 +1,39 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +from libc cimport stdlib + +cdef extern from "grpc/protoc/main.h": + int main(int argc, char *argv[]) + +def run_main(list args not None): + cdef char **argv = stdlib.malloc(len(args)*sizeof(char *)) + for i in range(len(args)): + argv[i] = args[i] + return main(len(args), argv) diff --git a/tools/distrib/python/grpcio_protoc/protoc_deps.py b/tools/distrib/python/grpcio_protoc/protoc_deps.py new file mode 100644 index 00000000000..5be28a77d8b --- /dev/null +++ b/tools/distrib/python/grpcio_protoc/protoc_deps.py @@ -0,0 +1,32 @@ + +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# AUTO-GENERATED BY mk_grpcio_protoc.py! +CC_FILES=['google/protobuf/compiler/main.cc', 'google/protobuf/compiler/zip_writer.cc', 'google/protobuf/compiler/subprocess.cc', 'google/protobuf/compiler/ruby/ruby_generator.cc', 'google/protobuf/compiler/python/python_generator.cc', 'google/protobuf/compiler/plugin.pb.cc', 'google/protobuf/compiler/plugin.cc', 'google/protobuf/compiler/objectivec/objectivec_primitive_field.cc', 'google/protobuf/compiler/objectivec/objectivec_oneof.cc', 'google/protobuf/compiler/objectivec/objectivec_message_field.cc', 'google/protobuf/compiler/objectivec/objectivec_message.cc', 'google/protobuf/compiler/objectivec/objectivec_map_field.cc', 'google/protobuf/compiler/objectivec/objectivec_helpers.cc', 'google/protobuf/compiler/objectivec/objectivec_generator.cc', 'google/protobuf/compiler/objectivec/objectivec_file.cc', 'google/protobuf/compiler/objectivec/objectivec_field.cc', 'google/protobuf/compiler/objectivec/objectivec_extension.cc', 'google/protobuf/compiler/objectivec/objectivec_enum_field.cc', 'google/protobuf/compiler/objectivec/objectivec_enum.cc', 'google/protobuf/compiler/js/js_generator.cc', 'google/protobuf/compiler/javanano/javanano_primitive_field.cc', 'google/protobuf/compiler/javanano/javanano_message_field.cc', 'google/protobuf/compiler/javanano/javanano_message.cc', 'google/protobuf/compiler/javanano/javanano_map_field.cc', 'google/protobuf/compiler/javanano/javanano_helpers.cc', 'google/protobuf/compiler/javanano/javanano_generator.cc', 'google/protobuf/compiler/javanano/javanano_file.cc', 'google/protobuf/compiler/javanano/javanano_field.cc', 'google/protobuf/compiler/javanano/javanano_extension.cc', 'google/protobuf/compiler/javanano/javanano_enum_field.cc', 'google/protobuf/compiler/javanano/javanano_enum.cc', 'google/protobuf/compiler/java/java_string_field_lite.cc', 'google/protobuf/compiler/java/java_string_field.cc', 'google/protobuf/compiler/java/java_shared_code_generator.cc', 'google/protobuf/compiler/java/java_service.cc', 'google/protobuf/compiler/java/java_primitive_field_lite.cc', 'google/protobuf/compiler/java/java_primitive_field.cc', 'google/protobuf/compiler/java/java_name_resolver.cc', 'google/protobuf/compiler/java/java_message_lite.cc', 'google/protobuf/compiler/java/java_message_field_lite.cc', 'google/protobuf/compiler/java/java_message_field.cc', 'google/protobuf/compiler/java/java_message_builder_lite.cc', 'google/protobuf/compiler/java/java_message_builder.cc', 'google/protobuf/compiler/java/java_message.cc', 'google/protobuf/compiler/java/java_map_field_lite.cc', 'google/protobuf/compiler/java/java_map_field.cc', 'google/protobuf/compiler/java/java_lazy_message_field_lite.cc', 'google/protobuf/compiler/java/java_lazy_message_field.cc', 'google/protobuf/compiler/java/java_helpers.cc', 'google/protobuf/compiler/java/java_generator_factory.cc', 'google/protobuf/compiler/java/java_generator.cc', 'google/protobuf/compiler/java/java_file.cc', 'google/protobuf/compiler/java/java_field.cc', 'google/protobuf/compiler/java/java_extension.cc', 'google/protobuf/compiler/java/java_enum_lite.cc', 'google/protobuf/compiler/java/java_enum_field_lite.cc', 'google/protobuf/compiler/java/java_enum_field.cc', 'google/protobuf/compiler/java/java_enum.cc', 'google/protobuf/compiler/java/java_doc_comment.cc', 'google/protobuf/compiler/java/java_context.cc', 'google/protobuf/compiler/csharp/csharp_wrapper_field.cc', 'google/protobuf/compiler/csharp/csharp_source_generator_base.cc', 'google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_message_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_reflection_class.cc', 'google/protobuf/compiler/csharp/csharp_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_message_field.cc', 'google/protobuf/compiler/csharp/csharp_message.cc', 'google/protobuf/compiler/csharp/csharp_map_field.cc', 'google/protobuf/compiler/csharp/csharp_helpers.cc', 'google/protobuf/compiler/csharp/csharp_generator.cc', 'google/protobuf/compiler/csharp/csharp_field_base.cc', 'google/protobuf/compiler/csharp/csharp_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_enum.cc', 'google/protobuf/compiler/csharp/csharp_doc_comment.cc', 'google/protobuf/compiler/cpp/cpp_string_field.cc', 'google/protobuf/compiler/cpp/cpp_service.cc', 'google/protobuf/compiler/cpp/cpp_primitive_field.cc', 'google/protobuf/compiler/cpp/cpp_message_field.cc', 'google/protobuf/compiler/cpp/cpp_message.cc', 'google/protobuf/compiler/cpp/cpp_map_field.cc', 'google/protobuf/compiler/cpp/cpp_helpers.cc', 'google/protobuf/compiler/cpp/cpp_generator.cc', 'google/protobuf/compiler/cpp/cpp_file.cc', 'google/protobuf/compiler/cpp/cpp_field.cc', 'google/protobuf/compiler/cpp/cpp_extension.cc', 'google/protobuf/compiler/cpp/cpp_enum_field.cc', 'google/protobuf/compiler/cpp/cpp_enum.cc', 'google/protobuf/compiler/command_line_interface.cc', 'google/protobuf/compiler/code_generator.cc', 'google/protobuf/wrappers.pb.cc', 'google/protobuf/wire_format.cc', 'google/protobuf/util/type_resolver_util.cc', 'google/protobuf/util/time_util.cc', 'google/protobuf/util/message_differencer.cc', 'google/protobuf/util/json_util.cc', 'google/protobuf/util/internal/utility.cc', 'google/protobuf/util/internal/type_info_test_helper.cc', 'google/protobuf/util/internal/type_info.cc', 'google/protobuf/util/internal/protostream_objectwriter.cc', 'google/protobuf/util/internal/protostream_objectsource.cc', 'google/protobuf/util/internal/proto_writer.cc', 'google/protobuf/util/internal/object_writer.cc', 'google/protobuf/util/internal/json_stream_parser.cc', 'google/protobuf/util/internal/json_objectwriter.cc', 'google/protobuf/util/internal/json_escaping.cc', 'google/protobuf/util/internal/field_mask_utility.cc', 'google/protobuf/util/internal/error_listener.cc', 'google/protobuf/util/internal/default_value_objectwriter.cc', 'google/protobuf/util/internal/datapiece.cc', 'google/protobuf/util/field_mask_util.cc', 'google/protobuf/util/field_comparator.cc', 'google/protobuf/unknown_field_set.cc', 'google/protobuf/type.pb.cc', 'google/protobuf/timestamp.pb.cc', 'google/protobuf/text_format.cc', 'google/protobuf/stubs/substitute.cc', 'google/protobuf/stubs/mathlimits.cc', 'google/protobuf/struct.pb.cc', 'google/protobuf/source_context.pb.cc', 'google/protobuf/service.cc', 'google/protobuf/reflection_ops.cc', 'google/protobuf/message.cc', 'google/protobuf/map_field.cc', 'google/protobuf/io/zero_copy_stream_impl.cc', 'google/protobuf/io/tokenizer.cc', 'google/protobuf/io/strtod.cc', 'google/protobuf/io/printer.cc', 'google/protobuf/io/gzip_stream.cc', 'google/protobuf/generated_message_reflection.cc', 'google/protobuf/field_mask.pb.cc', 'google/protobuf/extension_set_heavy.cc', 'google/protobuf/empty.pb.cc', 'google/protobuf/dynamic_message.cc', 'google/protobuf/duration.pb.cc', 'google/protobuf/descriptor_database.cc', 'google/protobuf/descriptor.pb.cc', 'google/protobuf/descriptor.cc', 'google/protobuf/compiler/parser.cc', 'google/protobuf/compiler/importer.cc', 'google/protobuf/api.pb.cc', 'google/protobuf/any.pb.cc', 'google/protobuf/any.cc', 'google/protobuf/wire_format_lite.cc', 'google/protobuf/stubs/time.cc', 'google/protobuf/stubs/strutil.cc', 'google/protobuf/stubs/structurally_valid.cc', 'google/protobuf/stubs/stringprintf.cc', 'google/protobuf/stubs/stringpiece.cc', 'google/protobuf/stubs/statusor.cc', 'google/protobuf/stubs/status.cc', 'google/protobuf/stubs/once.cc', 'google/protobuf/stubs/int128.cc', 'google/protobuf/stubs/common.cc', 'google/protobuf/stubs/bytestream.cc', 'google/protobuf/stubs/atomicops_internals_x86_msvc.cc', 'google/protobuf/stubs/atomicops_internals_x86_gcc.cc', 'google/protobuf/repeated_field.cc', 'google/protobuf/message_lite.cc', 'google/protobuf/io/zero_copy_stream_impl_lite.cc', 'google/protobuf/io/zero_copy_stream.cc', 'google/protobuf/io/coded_stream.cc', 'google/protobuf/generated_message_util.cc', 'google/protobuf/extension_set.cc', 'google/protobuf/arenastring.cc', 'google/protobuf/arena.cc'] diff --git a/tools/distrib/python/grpcio_protoc/protoc_lib_deps.py b/tools/distrib/python/grpcio_protoc/protoc_lib_deps.py new file mode 100644 index 00000000000..00a8f31069c --- /dev/null +++ b/tools/distrib/python/grpcio_protoc/protoc_lib_deps.py @@ -0,0 +1,32 @@ + +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# AUTO-GENERATED BY mk_grpcio_protoc.py! +CC_FILES=['google/protobuf/compiler/zip_writer.cc', 'google/protobuf/compiler/subprocess.cc', 'google/protobuf/compiler/ruby/ruby_generator.cc', 'google/protobuf/compiler/python/python_generator.cc', 'google/protobuf/compiler/plugin.pb.cc', 'google/protobuf/compiler/plugin.cc', 'google/protobuf/compiler/objectivec/objectivec_primitive_field.cc', 'google/protobuf/compiler/objectivec/objectivec_oneof.cc', 'google/protobuf/compiler/objectivec/objectivec_message_field.cc', 'google/protobuf/compiler/objectivec/objectivec_message.cc', 'google/protobuf/compiler/objectivec/objectivec_map_field.cc', 'google/protobuf/compiler/objectivec/objectivec_helpers.cc', 'google/protobuf/compiler/objectivec/objectivec_generator.cc', 'google/protobuf/compiler/objectivec/objectivec_file.cc', 'google/protobuf/compiler/objectivec/objectivec_field.cc', 'google/protobuf/compiler/objectivec/objectivec_extension.cc', 'google/protobuf/compiler/objectivec/objectivec_enum_field.cc', 'google/protobuf/compiler/objectivec/objectivec_enum.cc', 'google/protobuf/compiler/js/js_generator.cc', 'google/protobuf/compiler/javanano/javanano_primitive_field.cc', 'google/protobuf/compiler/javanano/javanano_message_field.cc', 'google/protobuf/compiler/javanano/javanano_message.cc', 'google/protobuf/compiler/javanano/javanano_map_field.cc', 'google/protobuf/compiler/javanano/javanano_helpers.cc', 'google/protobuf/compiler/javanano/javanano_generator.cc', 'google/protobuf/compiler/javanano/javanano_file.cc', 'google/protobuf/compiler/javanano/javanano_field.cc', 'google/protobuf/compiler/javanano/javanano_extension.cc', 'google/protobuf/compiler/javanano/javanano_enum_field.cc', 'google/protobuf/compiler/javanano/javanano_enum.cc', 'google/protobuf/compiler/java/java_string_field_lite.cc', 'google/protobuf/compiler/java/java_string_field.cc', 'google/protobuf/compiler/java/java_shared_code_generator.cc', 'google/protobuf/compiler/java/java_service.cc', 'google/protobuf/compiler/java/java_primitive_field_lite.cc', 'google/protobuf/compiler/java/java_primitive_field.cc', 'google/protobuf/compiler/java/java_name_resolver.cc', 'google/protobuf/compiler/java/java_message_lite.cc', 'google/protobuf/compiler/java/java_message_field_lite.cc', 'google/protobuf/compiler/java/java_message_field.cc', 'google/protobuf/compiler/java/java_message_builder_lite.cc', 'google/protobuf/compiler/java/java_message_builder.cc', 'google/protobuf/compiler/java/java_message.cc', 'google/protobuf/compiler/java/java_map_field_lite.cc', 'google/protobuf/compiler/java/java_map_field.cc', 'google/protobuf/compiler/java/java_lazy_message_field_lite.cc', 'google/protobuf/compiler/java/java_lazy_message_field.cc', 'google/protobuf/compiler/java/java_helpers.cc', 'google/protobuf/compiler/java/java_generator_factory.cc', 'google/protobuf/compiler/java/java_generator.cc', 'google/protobuf/compiler/java/java_file.cc', 'google/protobuf/compiler/java/java_field.cc', 'google/protobuf/compiler/java/java_extension.cc', 'google/protobuf/compiler/java/java_enum_lite.cc', 'google/protobuf/compiler/java/java_enum_field_lite.cc', 'google/protobuf/compiler/java/java_enum_field.cc', 'google/protobuf/compiler/java/java_enum.cc', 'google/protobuf/compiler/java/java_doc_comment.cc', 'google/protobuf/compiler/java/java_context.cc', 'google/protobuf/compiler/csharp/csharp_wrapper_field.cc', 'google/protobuf/compiler/csharp/csharp_source_generator_base.cc', 'google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_message_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_reflection_class.cc', 'google/protobuf/compiler/csharp/csharp_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_message_field.cc', 'google/protobuf/compiler/csharp/csharp_message.cc', 'google/protobuf/compiler/csharp/csharp_map_field.cc', 'google/protobuf/compiler/csharp/csharp_helpers.cc', 'google/protobuf/compiler/csharp/csharp_generator.cc', 'google/protobuf/compiler/csharp/csharp_field_base.cc', 'google/protobuf/compiler/csharp/csharp_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_enum.cc', 'google/protobuf/compiler/csharp/csharp_doc_comment.cc', 'google/protobuf/compiler/cpp/cpp_string_field.cc', 'google/protobuf/compiler/cpp/cpp_service.cc', 'google/protobuf/compiler/cpp/cpp_primitive_field.cc', 'google/protobuf/compiler/cpp/cpp_message_field.cc', 'google/protobuf/compiler/cpp/cpp_message.cc', 'google/protobuf/compiler/cpp/cpp_map_field.cc', 'google/protobuf/compiler/cpp/cpp_helpers.cc', 'google/protobuf/compiler/cpp/cpp_generator.cc', 'google/protobuf/compiler/cpp/cpp_file.cc', 'google/protobuf/compiler/cpp/cpp_field.cc', 'google/protobuf/compiler/cpp/cpp_extension.cc', 'google/protobuf/compiler/cpp/cpp_enum_field.cc', 'google/protobuf/compiler/cpp/cpp_enum.cc', 'google/protobuf/compiler/command_line_interface.cc', 'google/protobuf/compiler/code_generator.cc', 'google/protobuf/wrappers.pb.cc', 'google/protobuf/wire_format.cc', 'google/protobuf/util/type_resolver_util.cc', 'google/protobuf/util/time_util.cc', 'google/protobuf/util/message_differencer.cc', 'google/protobuf/util/json_util.cc', 'google/protobuf/util/internal/utility.cc', 'google/protobuf/util/internal/type_info_test_helper.cc', 'google/protobuf/util/internal/type_info.cc', 'google/protobuf/util/internal/protostream_objectwriter.cc', 'google/protobuf/util/internal/protostream_objectsource.cc', 'google/protobuf/util/internal/proto_writer.cc', 'google/protobuf/util/internal/object_writer.cc', 'google/protobuf/util/internal/json_stream_parser.cc', 'google/protobuf/util/internal/json_objectwriter.cc', 'google/protobuf/util/internal/json_escaping.cc', 'google/protobuf/util/internal/field_mask_utility.cc', 'google/protobuf/util/internal/error_listener.cc', 'google/protobuf/util/internal/default_value_objectwriter.cc', 'google/protobuf/util/internal/datapiece.cc', 'google/protobuf/util/field_mask_util.cc', 'google/protobuf/util/field_comparator.cc', 'google/protobuf/unknown_field_set.cc', 'google/protobuf/type.pb.cc', 'google/protobuf/timestamp.pb.cc', 'google/protobuf/text_format.cc', 'google/protobuf/stubs/substitute.cc', 'google/protobuf/stubs/mathlimits.cc', 'google/protobuf/struct.pb.cc', 'google/protobuf/source_context.pb.cc', 'google/protobuf/service.cc', 'google/protobuf/reflection_ops.cc', 'google/protobuf/message.cc', 'google/protobuf/map_field.cc', 'google/protobuf/io/zero_copy_stream_impl.cc', 'google/protobuf/io/tokenizer.cc', 'google/protobuf/io/strtod.cc', 'google/protobuf/io/printer.cc', 'google/protobuf/io/gzip_stream.cc', 'google/protobuf/generated_message_reflection.cc', 'google/protobuf/field_mask.pb.cc', 'google/protobuf/extension_set_heavy.cc', 'google/protobuf/empty.pb.cc', 'google/protobuf/dynamic_message.cc', 'google/protobuf/duration.pb.cc', 'google/protobuf/descriptor_database.cc', 'google/protobuf/descriptor.pb.cc', 'google/protobuf/descriptor.cc', 'google/protobuf/compiler/parser.cc', 'google/protobuf/compiler/importer.cc', 'google/protobuf/api.pb.cc', 'google/protobuf/any.pb.cc', 'google/protobuf/any.cc', 'google/protobuf/wire_format_lite.cc', 'google/protobuf/stubs/time.cc', 'google/protobuf/stubs/strutil.cc', 'google/protobuf/stubs/structurally_valid.cc', 'google/protobuf/stubs/stringprintf.cc', 'google/protobuf/stubs/stringpiece.cc', 'google/protobuf/stubs/statusor.cc', 'google/protobuf/stubs/status.cc', 'google/protobuf/stubs/once.cc', 'google/protobuf/stubs/int128.cc', 'google/protobuf/stubs/common.cc', 'google/protobuf/stubs/bytestream.cc', 'google/protobuf/stubs/atomicops_internals_x86_msvc.cc', 'google/protobuf/stubs/atomicops_internals_x86_gcc.cc', 'google/protobuf/repeated_field.cc', 'google/protobuf/message_lite.cc', 'google/protobuf/io/zero_copy_stream_impl_lite.cc', 'google/protobuf/io/zero_copy_stream.cc', 'google/protobuf/io/coded_stream.cc', 'google/protobuf/generated_message_util.cc', 'google/protobuf/extension_set.cc', 'google/protobuf/arenastring.cc', 'google/protobuf/arena.cc'] diff --git a/tools/distrib/python/grpcio_protoc/setup.py b/tools/distrib/python/grpcio_protoc/setup.py new file mode 100644 index 00000000000..d462b6b213d --- /dev/null +++ b/tools/distrib/python/grpcio_protoc/setup.py @@ -0,0 +1,102 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +from distutils import extension +import os +import os.path +import sys + +import setuptools +from setuptools.command import build_ext + +# TODO(atash) add flag to disable Cython use + +os.chdir(os.path.dirname(os.path.abspath(__file__))) +sys.path.insert(0, os.path.abspath('.')) + +import protoc_deps +import protoc_lib_deps + +def protoc_ext_module(): + protoc_sources = [ + os.path.join('third_party/protobuf/src', cc_file) + for cc_file in protoc_deps.CC_FILES] + protoc_ext = extension.Extension( + name='grpc.protoc.protoc', + sources=['grpc/protoc/protoc.pyx'] + protoc_sources, + include_dirs=['.', 'third_party/protobuf/src'], + language='c++', + define_macros=[('HAVE_PTHREAD', 1)], + extra_compile_args=['-lpthread', '-frtti'], + ) + return protoc_ext + +def plugin_ext_module(): + plugin_sources = [ + 'grpc_root/src/compiler/python_generator.cc', + 'grpc_root/src/compiler/python_plugin.cc'] + [ + os.path.join('third_party/protobuf/src', cc_file) + for cc_file in protoc_lib_deps.CC_FILES] + plugin_ext = extension.Extension( + name='grpc.protoc.protoc_plugin', + sources=['grpc/protoc/protoc_plugin.pyx'] + plugin_sources, + include_dirs=[ + '.', + 'grpc_root', + 'grpc_root/include', + 'third_party/protobuf/src', + ], + language='c++', + define_macros=[('HAVE_PTHREAD', 1)], + extra_compile_args=['-lpthread', '-std=c++11'], + ) + return plugin_ext + +def maybe_cythonize(exts): + from Cython import Build + return Build.cythonize(exts) + +setuptools.setup( + name='grpcio_protoc', + version='0.14.0rc1', + license='', + ext_modules=maybe_cythonize([ + protoc_ext_module(), + plugin_ext_module(), + ]), + scripts=[ + 'grpc/protoc/grpc_python_protoc_compiler.py', + 'grpc/protoc/grpc_python_protoc_plugin.py', + ], + packages=setuptools.find_packages('.'), + namespace_packages=['grpc'], + install_requires=[ + 'protobuf>=3.0.0a3', + ], +) diff --git a/tools/distrib/python/grpcio_tools/MANIFEST.in b/tools/distrib/python/grpcio_tools/MANIFEST.in new file mode 100644 index 00000000000..e6ab312f09c --- /dev/null +++ b/tools/distrib/python/grpcio_tools/MANIFEST.in @@ -0,0 +1,5 @@ +include protoc_deps.py +include protoc_lib_deps.py +graft grpc +graft grpc_root +graft third_party diff --git a/tools/distrib/python/mk_grpcio_protoc.py b/tools/distrib/python/mk_grpcio_protoc.py new file mode 100755 index 00000000000..c09a77982d7 --- /dev/null +++ b/tools/distrib/python/mk_grpcio_protoc.py @@ -0,0 +1,118 @@ +#!/usr/bin/env python + +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import os +import os.path +import shutil +import subprocess + +DEPS_FILE_CONTENT=""" +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# AUTO-GENERATED BY mk_grpcio_protoc.py! +CC_FILES={} +""" + +# Bazel query result prefix for expected source files in protobuf. +PROTOBUF_CC_PREFIX = '//:src/' + +os.chdir(os.path.join(os.path.dirname(os.path.abspath(__file__)), + '..', '..', '..')) + +GRPC_PYTHON_ROOT = os.path.abspath('tools/distrib/python/grpcio_protoc') + +GRPC_PROTOBUF = os.path.abspath('third_party/protobuf/src') +GRPC_PROTOC_PLUGINS = os.path.abspath('src/compiler') +GRPC_PYTHON_PROTOBUF = os.path.join(GRPC_PYTHON_ROOT, + 'third_party/protobuf/src') +GRPC_PYTHON_PROTOC_PLUGINS = os.path.join(GRPC_PYTHON_ROOT, + 'grpc_root/src/compiler') +GRPC_PYTHON_PROTOC_DEPS = os.path.join(GRPC_PYTHON_ROOT, + 'protoc_deps.py') +GRPC_PYTHON_PROTOC_LIB_DEPS = os.path.join(GRPC_PYTHON_ROOT, + 'protoc_lib_deps.py') + +GRPC_INCLUDE = os.path.abspath('include') +GRPC_PYTHON_INCLUDE = os.path.join(GRPC_PYTHON_ROOT, 'grpc_root/include') + +for tree in [GRPC_PYTHON_PROTOBUF, + GRPC_PYTHON_PROTOC_PLUGINS, + GRPC_PYTHON_INCLUDE]: + try: + shutil.rmtree(tree) + except Exception as _: + pass +shutil.copytree(GRPC_PROTOBUF, GRPC_PYTHON_PROTOBUF) +shutil.copytree(GRPC_PROTOC_PLUGINS, GRPC_PYTHON_PROTOC_PLUGINS) +shutil.copytree(GRPC_INCLUDE, GRPC_PYTHON_INCLUDE) + +def write_deps(query, out_filename): + output = subprocess.check_output(['tools/distrib/python/bazel_deps.sh', query]) + output = output.splitlines() + cc_files = [ + name for name in output + if name.endswith('.cc') and name.startswith(PROTOBUF_CC_PREFIX)] + cc_files = [cc_file[len(PROTOBUF_CC_PREFIX):] for cc_file in cc_files] + + deps_file_content = DEPS_FILE_CONTENT.format(cc_files) + + with open(out_filename, 'w') as deps_file: + deps_file.write(deps_file_content) + +write_deps('//:protoc', GRPC_PYTHON_PROTOC_DEPS) +write_deps('//:protoc_lib', GRPC_PYTHON_PROTOC_LIB_DEPS) diff --git a/tools/dockerfile/bazel/Dockerfile b/tools/dockerfile/bazel/Dockerfile new file mode 100644 index 00000000000..af31adb94df --- /dev/null +++ b/tools/dockerfile/bazel/Dockerfile @@ -0,0 +1,53 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +FROM ubuntu:wily +RUN apt-get update +RUN apt-get -y install software-properties-common python-software-properties +RUN add-apt-repository ppa:webupd8team/java +RUN apt-get update +RUN apt-get -y install \ + vim \ + wget \ + openjdk-8-jdk \ + pkg-config \ + zip \ + g++ \ + zlib1g-dev \ + unzip \ + git + +RUN git clone https://github.com/bazelbuild/bazel.git /bazel +RUN cd /bazel && \ + ./compile.sh + +RUN cp /bazel/output/bazel /bin/bazel + +# ensure the installation has been extracted +RUN bazel From 58d24c259a637ccffdee09fac6bc0123f81e4fc0 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Fri, 29 Apr 2016 14:11:38 -0700 Subject: [PATCH 0263/1894] Add sanity test for grpcio protoc package --- .../test/sanity/Dockerfile.template | 12 +++- tools/distrib/python/bazel_deps.sh | 17 +++-- tools/distrib/python/check_grpcio_tools.py | 53 +++++++++++++++ .../.gitignore | 0 .../grpc/__init__.py | 0 .../grpc/protoc/__init__.py | 0 .../protoc/grpc_python_protoc_compiler.py | 0 .../grpc/protoc/grpc_python_protoc_plugin.py | 0 .../grpc/protoc/main.h | 0 .../grpc/protoc/protoc.pyx | 0 .../grpc/protoc/protoc_plugin.pyx | 0 .../protoc_deps.py | 2 +- .../protoc_lib_deps.py | 2 +- .../{grpcio_protoc => grpcio_tools}/setup.py | 2 +- ..._grpcio_protoc.py => make_grpcio_tools.py} | 65 ++++++++++++------- tools/dockerfile/bazel/Dockerfile | 5 +- tools/dockerfile/test/sanity/Dockerfile | 9 +++ tools/run_tests/sanity/sanity_tests.yaml | 1 + 18 files changed, 131 insertions(+), 37 deletions(-) create mode 100755 tools/distrib/python/check_grpcio_tools.py rename tools/distrib/python/{grpcio_protoc => grpcio_tools}/.gitignore (100%) rename tools/distrib/python/{grpcio_protoc => grpcio_tools}/grpc/__init__.py (100%) rename tools/distrib/python/{grpcio_protoc => grpcio_tools}/grpc/protoc/__init__.py (100%) rename tools/distrib/python/{grpcio_protoc => grpcio_tools}/grpc/protoc/grpc_python_protoc_compiler.py (100%) rename tools/distrib/python/{grpcio_protoc => grpcio_tools}/grpc/protoc/grpc_python_protoc_plugin.py (100%) rename tools/distrib/python/{grpcio_protoc => grpcio_tools}/grpc/protoc/main.h (100%) rename tools/distrib/python/{grpcio_protoc => grpcio_tools}/grpc/protoc/protoc.pyx (100%) rename tools/distrib/python/{grpcio_protoc => grpcio_tools}/grpc/protoc/protoc_plugin.pyx (100%) rename tools/distrib/python/{grpcio_protoc => grpcio_tools}/protoc_deps.py (99%) rename tools/distrib/python/{grpcio_protoc => grpcio_tools}/protoc_lib_deps.py (99%) rename tools/distrib/python/{grpcio_protoc => grpcio_tools}/setup.py (99%) rename tools/distrib/python/{mk_grpcio_protoc.py => make_grpcio_tools.py} (73%) diff --git a/templates/tools/dockerfile/test/sanity/Dockerfile.template b/templates/tools/dockerfile/test/sanity/Dockerfile.template index 8d6f52db54e..8e2140e648b 100644 --- a/templates/tools/dockerfile/test/sanity/Dockerfile.template +++ b/templates/tools/dockerfile/test/sanity/Dockerfile.template @@ -43,7 +43,17 @@ python-virtualenv ${"\\"} python-lxml RUN pip install simplejson mako - + + #====================================== + # More sanity test dependencies (bazel) + RUN echo "deb http://httpredir.debian.org/debian jessie-backports main" > \ + /etc/apt/sources.list.d/backports.list + RUN apt-get update + RUN apt-get -t jessie-backports install -y openjdk-8-jdk + RUN git clone https://github.com/bazelbuild/bazel.git /bazel + RUN cd /bazel && ./compile.sh + RUN ln -s /bazel/output/bazel /bin/ + #=================== # Docker "inception" # Note this is quite the ugly hack. diff --git a/tools/distrib/python/bazel_deps.sh b/tools/distrib/python/bazel_deps.sh index 4619c008875..de3ee079708 100755 --- a/tools/distrib/python/bazel_deps.sh +++ b/tools/distrib/python/bazel_deps.sh @@ -31,9 +31,16 @@ cd $(dirname $0)/../../../ -docker build -t bazel `realpath ./tools/dockerfile/bazel/` -docker run -v "`realpath .`:/src/grpc/" \ - -w /src/grpc/third_party/protobuf \ - bazel \ +# First check if bazel is installed on the machine. If it is, then we don't need +# to invoke the docker bazel. +if [ "bazel version" ] +then + cd third_party/protobuf bazel query 'deps('$1')' - +else + docker build -t bazel `realpath ./tools/dockerfile/bazel/` + docker run -v "`realpath .`:/src/grpc/" \ + -w /src/grpc/third_party/protobuf \ + bazel \ + bazel query 'deps('$1')' +fi diff --git a/tools/distrib/python/check_grpcio_tools.py b/tools/distrib/python/check_grpcio_tools.py new file mode 100755 index 00000000000..fec218fdabd --- /dev/null +++ b/tools/distrib/python/check_grpcio_tools.py @@ -0,0 +1,53 @@ +#!/usr/bin/env python + +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import cStringIO + +import make_grpcio_tools as make + +OUT_OF_DATE_MESSAGE = """file {} is out of date + +Have you called tools/distrib/python/make_grpcio_tools.py since upgrading protobuf?""" + +check_protoc_deps_file = cStringIO.StringIO() +check_protoc_lib_deps_file = cStringIO.StringIO() +make.write_deps(make.BAZEL_DEPS_PROTOC_QUERY, check_protoc_deps_file) +make.write_deps(make.BAZEL_DEPS_PROTOC_LIB_QUERY, check_protoc_lib_deps_file) + +with open(make.GRPC_PYTHON_PROTOC_DEPS, 'r') as protoc_deps_file: + if protoc_deps_file.read() != check_protoc_deps_file.getvalue(): + print(OUT_OF_DATE_MESSAGE.format(make.GRPC_PYTHON_PROTOC_DEPS)) + raise SystemExit(1) + +with open(make.GRPC_PYTHON_PROTOC_LIB_DEPS, 'r') as protoc_lib_deps_file: + if protoc_lib_deps_file.read() != check_protoc_lib_deps_file.getvalue(): + print(OUT_OF_DATE_MESSAGE.format(make.GRPC_PYTHON_PROTOC_LIB_DEPS)) + raise SystemExit(1) diff --git a/tools/distrib/python/grpcio_protoc/.gitignore b/tools/distrib/python/grpcio_tools/.gitignore similarity index 100% rename from tools/distrib/python/grpcio_protoc/.gitignore rename to tools/distrib/python/grpcio_tools/.gitignore diff --git a/tools/distrib/python/grpcio_protoc/grpc/__init__.py b/tools/distrib/python/grpcio_tools/grpc/__init__.py similarity index 100% rename from tools/distrib/python/grpcio_protoc/grpc/__init__.py rename to tools/distrib/python/grpcio_tools/grpc/__init__.py diff --git a/tools/distrib/python/grpcio_protoc/grpc/protoc/__init__.py b/tools/distrib/python/grpcio_tools/grpc/protoc/__init__.py similarity index 100% rename from tools/distrib/python/grpcio_protoc/grpc/protoc/__init__.py rename to tools/distrib/python/grpcio_tools/grpc/protoc/__init__.py diff --git a/tools/distrib/python/grpcio_protoc/grpc/protoc/grpc_python_protoc_compiler.py b/tools/distrib/python/grpcio_tools/grpc/protoc/grpc_python_protoc_compiler.py similarity index 100% rename from tools/distrib/python/grpcio_protoc/grpc/protoc/grpc_python_protoc_compiler.py rename to tools/distrib/python/grpcio_tools/grpc/protoc/grpc_python_protoc_compiler.py diff --git a/tools/distrib/python/grpcio_protoc/grpc/protoc/grpc_python_protoc_plugin.py b/tools/distrib/python/grpcio_tools/grpc/protoc/grpc_python_protoc_plugin.py similarity index 100% rename from tools/distrib/python/grpcio_protoc/grpc/protoc/grpc_python_protoc_plugin.py rename to tools/distrib/python/grpcio_tools/grpc/protoc/grpc_python_protoc_plugin.py diff --git a/tools/distrib/python/grpcio_protoc/grpc/protoc/main.h b/tools/distrib/python/grpcio_tools/grpc/protoc/main.h similarity index 100% rename from tools/distrib/python/grpcio_protoc/grpc/protoc/main.h rename to tools/distrib/python/grpcio_tools/grpc/protoc/main.h diff --git a/tools/distrib/python/grpcio_protoc/grpc/protoc/protoc.pyx b/tools/distrib/python/grpcio_tools/grpc/protoc/protoc.pyx similarity index 100% rename from tools/distrib/python/grpcio_protoc/grpc/protoc/protoc.pyx rename to tools/distrib/python/grpcio_tools/grpc/protoc/protoc.pyx diff --git a/tools/distrib/python/grpcio_protoc/grpc/protoc/protoc_plugin.pyx b/tools/distrib/python/grpcio_tools/grpc/protoc/protoc_plugin.pyx similarity index 100% rename from tools/distrib/python/grpcio_protoc/grpc/protoc/protoc_plugin.pyx rename to tools/distrib/python/grpcio_tools/grpc/protoc/protoc_plugin.pyx diff --git a/tools/distrib/python/grpcio_protoc/protoc_deps.py b/tools/distrib/python/grpcio_tools/protoc_deps.py similarity index 99% rename from tools/distrib/python/grpcio_protoc/protoc_deps.py rename to tools/distrib/python/grpcio_tools/protoc_deps.py index 5be28a77d8b..2ce5838c478 100644 --- a/tools/distrib/python/grpcio_protoc/protoc_deps.py +++ b/tools/distrib/python/grpcio_tools/protoc_deps.py @@ -28,5 +28,5 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# AUTO-GENERATED BY mk_grpcio_protoc.py! +# AUTO-GENERATED BY mk_grpcio_tools.py! CC_FILES=['google/protobuf/compiler/main.cc', 'google/protobuf/compiler/zip_writer.cc', 'google/protobuf/compiler/subprocess.cc', 'google/protobuf/compiler/ruby/ruby_generator.cc', 'google/protobuf/compiler/python/python_generator.cc', 'google/protobuf/compiler/plugin.pb.cc', 'google/protobuf/compiler/plugin.cc', 'google/protobuf/compiler/objectivec/objectivec_primitive_field.cc', 'google/protobuf/compiler/objectivec/objectivec_oneof.cc', 'google/protobuf/compiler/objectivec/objectivec_message_field.cc', 'google/protobuf/compiler/objectivec/objectivec_message.cc', 'google/protobuf/compiler/objectivec/objectivec_map_field.cc', 'google/protobuf/compiler/objectivec/objectivec_helpers.cc', 'google/protobuf/compiler/objectivec/objectivec_generator.cc', 'google/protobuf/compiler/objectivec/objectivec_file.cc', 'google/protobuf/compiler/objectivec/objectivec_field.cc', 'google/protobuf/compiler/objectivec/objectivec_extension.cc', 'google/protobuf/compiler/objectivec/objectivec_enum_field.cc', 'google/protobuf/compiler/objectivec/objectivec_enum.cc', 'google/protobuf/compiler/js/js_generator.cc', 'google/protobuf/compiler/javanano/javanano_primitive_field.cc', 'google/protobuf/compiler/javanano/javanano_message_field.cc', 'google/protobuf/compiler/javanano/javanano_message.cc', 'google/protobuf/compiler/javanano/javanano_map_field.cc', 'google/protobuf/compiler/javanano/javanano_helpers.cc', 'google/protobuf/compiler/javanano/javanano_generator.cc', 'google/protobuf/compiler/javanano/javanano_file.cc', 'google/protobuf/compiler/javanano/javanano_field.cc', 'google/protobuf/compiler/javanano/javanano_extension.cc', 'google/protobuf/compiler/javanano/javanano_enum_field.cc', 'google/protobuf/compiler/javanano/javanano_enum.cc', 'google/protobuf/compiler/java/java_string_field_lite.cc', 'google/protobuf/compiler/java/java_string_field.cc', 'google/protobuf/compiler/java/java_shared_code_generator.cc', 'google/protobuf/compiler/java/java_service.cc', 'google/protobuf/compiler/java/java_primitive_field_lite.cc', 'google/protobuf/compiler/java/java_primitive_field.cc', 'google/protobuf/compiler/java/java_name_resolver.cc', 'google/protobuf/compiler/java/java_message_lite.cc', 'google/protobuf/compiler/java/java_message_field_lite.cc', 'google/protobuf/compiler/java/java_message_field.cc', 'google/protobuf/compiler/java/java_message_builder_lite.cc', 'google/protobuf/compiler/java/java_message_builder.cc', 'google/protobuf/compiler/java/java_message.cc', 'google/protobuf/compiler/java/java_map_field_lite.cc', 'google/protobuf/compiler/java/java_map_field.cc', 'google/protobuf/compiler/java/java_lazy_message_field_lite.cc', 'google/protobuf/compiler/java/java_lazy_message_field.cc', 'google/protobuf/compiler/java/java_helpers.cc', 'google/protobuf/compiler/java/java_generator_factory.cc', 'google/protobuf/compiler/java/java_generator.cc', 'google/protobuf/compiler/java/java_file.cc', 'google/protobuf/compiler/java/java_field.cc', 'google/protobuf/compiler/java/java_extension.cc', 'google/protobuf/compiler/java/java_enum_lite.cc', 'google/protobuf/compiler/java/java_enum_field_lite.cc', 'google/protobuf/compiler/java/java_enum_field.cc', 'google/protobuf/compiler/java/java_enum.cc', 'google/protobuf/compiler/java/java_doc_comment.cc', 'google/protobuf/compiler/java/java_context.cc', 'google/protobuf/compiler/csharp/csharp_wrapper_field.cc', 'google/protobuf/compiler/csharp/csharp_source_generator_base.cc', 'google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_message_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_reflection_class.cc', 'google/protobuf/compiler/csharp/csharp_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_message_field.cc', 'google/protobuf/compiler/csharp/csharp_message.cc', 'google/protobuf/compiler/csharp/csharp_map_field.cc', 'google/protobuf/compiler/csharp/csharp_helpers.cc', 'google/protobuf/compiler/csharp/csharp_generator.cc', 'google/protobuf/compiler/csharp/csharp_field_base.cc', 'google/protobuf/compiler/csharp/csharp_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_enum.cc', 'google/protobuf/compiler/csharp/csharp_doc_comment.cc', 'google/protobuf/compiler/cpp/cpp_string_field.cc', 'google/protobuf/compiler/cpp/cpp_service.cc', 'google/protobuf/compiler/cpp/cpp_primitive_field.cc', 'google/protobuf/compiler/cpp/cpp_message_field.cc', 'google/protobuf/compiler/cpp/cpp_message.cc', 'google/protobuf/compiler/cpp/cpp_map_field.cc', 'google/protobuf/compiler/cpp/cpp_helpers.cc', 'google/protobuf/compiler/cpp/cpp_generator.cc', 'google/protobuf/compiler/cpp/cpp_file.cc', 'google/protobuf/compiler/cpp/cpp_field.cc', 'google/protobuf/compiler/cpp/cpp_extension.cc', 'google/protobuf/compiler/cpp/cpp_enum_field.cc', 'google/protobuf/compiler/cpp/cpp_enum.cc', 'google/protobuf/compiler/command_line_interface.cc', 'google/protobuf/compiler/code_generator.cc', 'google/protobuf/wrappers.pb.cc', 'google/protobuf/wire_format.cc', 'google/protobuf/util/type_resolver_util.cc', 'google/protobuf/util/time_util.cc', 'google/protobuf/util/message_differencer.cc', 'google/protobuf/util/json_util.cc', 'google/protobuf/util/internal/utility.cc', 'google/protobuf/util/internal/type_info_test_helper.cc', 'google/protobuf/util/internal/type_info.cc', 'google/protobuf/util/internal/protostream_objectwriter.cc', 'google/protobuf/util/internal/protostream_objectsource.cc', 'google/protobuf/util/internal/proto_writer.cc', 'google/protobuf/util/internal/object_writer.cc', 'google/protobuf/util/internal/json_stream_parser.cc', 'google/protobuf/util/internal/json_objectwriter.cc', 'google/protobuf/util/internal/json_escaping.cc', 'google/protobuf/util/internal/field_mask_utility.cc', 'google/protobuf/util/internal/error_listener.cc', 'google/protobuf/util/internal/default_value_objectwriter.cc', 'google/protobuf/util/internal/datapiece.cc', 'google/protobuf/util/field_mask_util.cc', 'google/protobuf/util/field_comparator.cc', 'google/protobuf/unknown_field_set.cc', 'google/protobuf/type.pb.cc', 'google/protobuf/timestamp.pb.cc', 'google/protobuf/text_format.cc', 'google/protobuf/stubs/substitute.cc', 'google/protobuf/stubs/mathlimits.cc', 'google/protobuf/struct.pb.cc', 'google/protobuf/source_context.pb.cc', 'google/protobuf/service.cc', 'google/protobuf/reflection_ops.cc', 'google/protobuf/message.cc', 'google/protobuf/map_field.cc', 'google/protobuf/io/zero_copy_stream_impl.cc', 'google/protobuf/io/tokenizer.cc', 'google/protobuf/io/strtod.cc', 'google/protobuf/io/printer.cc', 'google/protobuf/io/gzip_stream.cc', 'google/protobuf/generated_message_reflection.cc', 'google/protobuf/field_mask.pb.cc', 'google/protobuf/extension_set_heavy.cc', 'google/protobuf/empty.pb.cc', 'google/protobuf/dynamic_message.cc', 'google/protobuf/duration.pb.cc', 'google/protobuf/descriptor_database.cc', 'google/protobuf/descriptor.pb.cc', 'google/protobuf/descriptor.cc', 'google/protobuf/compiler/parser.cc', 'google/protobuf/compiler/importer.cc', 'google/protobuf/api.pb.cc', 'google/protobuf/any.pb.cc', 'google/protobuf/any.cc', 'google/protobuf/wire_format_lite.cc', 'google/protobuf/stubs/time.cc', 'google/protobuf/stubs/strutil.cc', 'google/protobuf/stubs/structurally_valid.cc', 'google/protobuf/stubs/stringprintf.cc', 'google/protobuf/stubs/stringpiece.cc', 'google/protobuf/stubs/statusor.cc', 'google/protobuf/stubs/status.cc', 'google/protobuf/stubs/once.cc', 'google/protobuf/stubs/int128.cc', 'google/protobuf/stubs/common.cc', 'google/protobuf/stubs/bytestream.cc', 'google/protobuf/stubs/atomicops_internals_x86_msvc.cc', 'google/protobuf/stubs/atomicops_internals_x86_gcc.cc', 'google/protobuf/repeated_field.cc', 'google/protobuf/message_lite.cc', 'google/protobuf/io/zero_copy_stream_impl_lite.cc', 'google/protobuf/io/zero_copy_stream.cc', 'google/protobuf/io/coded_stream.cc', 'google/protobuf/generated_message_util.cc', 'google/protobuf/extension_set.cc', 'google/protobuf/arenastring.cc', 'google/protobuf/arena.cc'] diff --git a/tools/distrib/python/grpcio_protoc/protoc_lib_deps.py b/tools/distrib/python/grpcio_tools/protoc_lib_deps.py similarity index 99% rename from tools/distrib/python/grpcio_protoc/protoc_lib_deps.py rename to tools/distrib/python/grpcio_tools/protoc_lib_deps.py index 00a8f31069c..d4fe0eeaa24 100644 --- a/tools/distrib/python/grpcio_protoc/protoc_lib_deps.py +++ b/tools/distrib/python/grpcio_tools/protoc_lib_deps.py @@ -28,5 +28,5 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# AUTO-GENERATED BY mk_grpcio_protoc.py! +# AUTO-GENERATED BY mk_grpcio_tools.py! CC_FILES=['google/protobuf/compiler/zip_writer.cc', 'google/protobuf/compiler/subprocess.cc', 'google/protobuf/compiler/ruby/ruby_generator.cc', 'google/protobuf/compiler/python/python_generator.cc', 'google/protobuf/compiler/plugin.pb.cc', 'google/protobuf/compiler/plugin.cc', 'google/protobuf/compiler/objectivec/objectivec_primitive_field.cc', 'google/protobuf/compiler/objectivec/objectivec_oneof.cc', 'google/protobuf/compiler/objectivec/objectivec_message_field.cc', 'google/protobuf/compiler/objectivec/objectivec_message.cc', 'google/protobuf/compiler/objectivec/objectivec_map_field.cc', 'google/protobuf/compiler/objectivec/objectivec_helpers.cc', 'google/protobuf/compiler/objectivec/objectivec_generator.cc', 'google/protobuf/compiler/objectivec/objectivec_file.cc', 'google/protobuf/compiler/objectivec/objectivec_field.cc', 'google/protobuf/compiler/objectivec/objectivec_extension.cc', 'google/protobuf/compiler/objectivec/objectivec_enum_field.cc', 'google/protobuf/compiler/objectivec/objectivec_enum.cc', 'google/protobuf/compiler/js/js_generator.cc', 'google/protobuf/compiler/javanano/javanano_primitive_field.cc', 'google/protobuf/compiler/javanano/javanano_message_field.cc', 'google/protobuf/compiler/javanano/javanano_message.cc', 'google/protobuf/compiler/javanano/javanano_map_field.cc', 'google/protobuf/compiler/javanano/javanano_helpers.cc', 'google/protobuf/compiler/javanano/javanano_generator.cc', 'google/protobuf/compiler/javanano/javanano_file.cc', 'google/protobuf/compiler/javanano/javanano_field.cc', 'google/protobuf/compiler/javanano/javanano_extension.cc', 'google/protobuf/compiler/javanano/javanano_enum_field.cc', 'google/protobuf/compiler/javanano/javanano_enum.cc', 'google/protobuf/compiler/java/java_string_field_lite.cc', 'google/protobuf/compiler/java/java_string_field.cc', 'google/protobuf/compiler/java/java_shared_code_generator.cc', 'google/protobuf/compiler/java/java_service.cc', 'google/protobuf/compiler/java/java_primitive_field_lite.cc', 'google/protobuf/compiler/java/java_primitive_field.cc', 'google/protobuf/compiler/java/java_name_resolver.cc', 'google/protobuf/compiler/java/java_message_lite.cc', 'google/protobuf/compiler/java/java_message_field_lite.cc', 'google/protobuf/compiler/java/java_message_field.cc', 'google/protobuf/compiler/java/java_message_builder_lite.cc', 'google/protobuf/compiler/java/java_message_builder.cc', 'google/protobuf/compiler/java/java_message.cc', 'google/protobuf/compiler/java/java_map_field_lite.cc', 'google/protobuf/compiler/java/java_map_field.cc', 'google/protobuf/compiler/java/java_lazy_message_field_lite.cc', 'google/protobuf/compiler/java/java_lazy_message_field.cc', 'google/protobuf/compiler/java/java_helpers.cc', 'google/protobuf/compiler/java/java_generator_factory.cc', 'google/protobuf/compiler/java/java_generator.cc', 'google/protobuf/compiler/java/java_file.cc', 'google/protobuf/compiler/java/java_field.cc', 'google/protobuf/compiler/java/java_extension.cc', 'google/protobuf/compiler/java/java_enum_lite.cc', 'google/protobuf/compiler/java/java_enum_field_lite.cc', 'google/protobuf/compiler/java/java_enum_field.cc', 'google/protobuf/compiler/java/java_enum.cc', 'google/protobuf/compiler/java/java_doc_comment.cc', 'google/protobuf/compiler/java/java_context.cc', 'google/protobuf/compiler/csharp/csharp_wrapper_field.cc', 'google/protobuf/compiler/csharp/csharp_source_generator_base.cc', 'google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_message_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_reflection_class.cc', 'google/protobuf/compiler/csharp/csharp_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_message_field.cc', 'google/protobuf/compiler/csharp/csharp_message.cc', 'google/protobuf/compiler/csharp/csharp_map_field.cc', 'google/protobuf/compiler/csharp/csharp_helpers.cc', 'google/protobuf/compiler/csharp/csharp_generator.cc', 'google/protobuf/compiler/csharp/csharp_field_base.cc', 'google/protobuf/compiler/csharp/csharp_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_enum.cc', 'google/protobuf/compiler/csharp/csharp_doc_comment.cc', 'google/protobuf/compiler/cpp/cpp_string_field.cc', 'google/protobuf/compiler/cpp/cpp_service.cc', 'google/protobuf/compiler/cpp/cpp_primitive_field.cc', 'google/protobuf/compiler/cpp/cpp_message_field.cc', 'google/protobuf/compiler/cpp/cpp_message.cc', 'google/protobuf/compiler/cpp/cpp_map_field.cc', 'google/protobuf/compiler/cpp/cpp_helpers.cc', 'google/protobuf/compiler/cpp/cpp_generator.cc', 'google/protobuf/compiler/cpp/cpp_file.cc', 'google/protobuf/compiler/cpp/cpp_field.cc', 'google/protobuf/compiler/cpp/cpp_extension.cc', 'google/protobuf/compiler/cpp/cpp_enum_field.cc', 'google/protobuf/compiler/cpp/cpp_enum.cc', 'google/protobuf/compiler/command_line_interface.cc', 'google/protobuf/compiler/code_generator.cc', 'google/protobuf/wrappers.pb.cc', 'google/protobuf/wire_format.cc', 'google/protobuf/util/type_resolver_util.cc', 'google/protobuf/util/time_util.cc', 'google/protobuf/util/message_differencer.cc', 'google/protobuf/util/json_util.cc', 'google/protobuf/util/internal/utility.cc', 'google/protobuf/util/internal/type_info_test_helper.cc', 'google/protobuf/util/internal/type_info.cc', 'google/protobuf/util/internal/protostream_objectwriter.cc', 'google/protobuf/util/internal/protostream_objectsource.cc', 'google/protobuf/util/internal/proto_writer.cc', 'google/protobuf/util/internal/object_writer.cc', 'google/protobuf/util/internal/json_stream_parser.cc', 'google/protobuf/util/internal/json_objectwriter.cc', 'google/protobuf/util/internal/json_escaping.cc', 'google/protobuf/util/internal/field_mask_utility.cc', 'google/protobuf/util/internal/error_listener.cc', 'google/protobuf/util/internal/default_value_objectwriter.cc', 'google/protobuf/util/internal/datapiece.cc', 'google/protobuf/util/field_mask_util.cc', 'google/protobuf/util/field_comparator.cc', 'google/protobuf/unknown_field_set.cc', 'google/protobuf/type.pb.cc', 'google/protobuf/timestamp.pb.cc', 'google/protobuf/text_format.cc', 'google/protobuf/stubs/substitute.cc', 'google/protobuf/stubs/mathlimits.cc', 'google/protobuf/struct.pb.cc', 'google/protobuf/source_context.pb.cc', 'google/protobuf/service.cc', 'google/protobuf/reflection_ops.cc', 'google/protobuf/message.cc', 'google/protobuf/map_field.cc', 'google/protobuf/io/zero_copy_stream_impl.cc', 'google/protobuf/io/tokenizer.cc', 'google/protobuf/io/strtod.cc', 'google/protobuf/io/printer.cc', 'google/protobuf/io/gzip_stream.cc', 'google/protobuf/generated_message_reflection.cc', 'google/protobuf/field_mask.pb.cc', 'google/protobuf/extension_set_heavy.cc', 'google/protobuf/empty.pb.cc', 'google/protobuf/dynamic_message.cc', 'google/protobuf/duration.pb.cc', 'google/protobuf/descriptor_database.cc', 'google/protobuf/descriptor.pb.cc', 'google/protobuf/descriptor.cc', 'google/protobuf/compiler/parser.cc', 'google/protobuf/compiler/importer.cc', 'google/protobuf/api.pb.cc', 'google/protobuf/any.pb.cc', 'google/protobuf/any.cc', 'google/protobuf/wire_format_lite.cc', 'google/protobuf/stubs/time.cc', 'google/protobuf/stubs/strutil.cc', 'google/protobuf/stubs/structurally_valid.cc', 'google/protobuf/stubs/stringprintf.cc', 'google/protobuf/stubs/stringpiece.cc', 'google/protobuf/stubs/statusor.cc', 'google/protobuf/stubs/status.cc', 'google/protobuf/stubs/once.cc', 'google/protobuf/stubs/int128.cc', 'google/protobuf/stubs/common.cc', 'google/protobuf/stubs/bytestream.cc', 'google/protobuf/stubs/atomicops_internals_x86_msvc.cc', 'google/protobuf/stubs/atomicops_internals_x86_gcc.cc', 'google/protobuf/repeated_field.cc', 'google/protobuf/message_lite.cc', 'google/protobuf/io/zero_copy_stream_impl_lite.cc', 'google/protobuf/io/zero_copy_stream.cc', 'google/protobuf/io/coded_stream.cc', 'google/protobuf/generated_message_util.cc', 'google/protobuf/extension_set.cc', 'google/protobuf/arenastring.cc', 'google/protobuf/arena.cc'] diff --git a/tools/distrib/python/grpcio_protoc/setup.py b/tools/distrib/python/grpcio_tools/setup.py similarity index 99% rename from tools/distrib/python/grpcio_protoc/setup.py rename to tools/distrib/python/grpcio_tools/setup.py index d462b6b213d..3fa61320c8a 100644 --- a/tools/distrib/python/grpcio_protoc/setup.py +++ b/tools/distrib/python/grpcio_tools/setup.py @@ -83,7 +83,7 @@ def maybe_cythonize(exts): return Build.cythonize(exts) setuptools.setup( - name='grpcio_protoc', + name='grpcio_tools', version='0.14.0rc1', license='', ext_modules=maybe_cythonize([ diff --git a/tools/distrib/python/mk_grpcio_protoc.py b/tools/distrib/python/make_grpcio_tools.py similarity index 73% rename from tools/distrib/python/mk_grpcio_protoc.py rename to tools/distrib/python/make_grpcio_tools.py index c09a77982d7..178dd6a85db 100755 --- a/tools/distrib/python/mk_grpcio_protoc.py +++ b/tools/distrib/python/make_grpcio_tools.py @@ -64,20 +64,21 @@ DEPS_FILE_CONTENT=""" # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# AUTO-GENERATED BY mk_grpcio_protoc.py! +# AUTO-GENERATED BY mk_grpcio_tools.py! CC_FILES={} """ # Bazel query result prefix for expected source files in protobuf. PROTOBUF_CC_PREFIX = '//:src/' -os.chdir(os.path.join(os.path.dirname(os.path.abspath(__file__)), - '..', '..', '..')) +GRPC_ROOT = os.path.abspath( + os.path.join(os.path.dirname(os.path.abspath(__file__)), + '..', '..', '..')) -GRPC_PYTHON_ROOT = os.path.abspath('tools/distrib/python/grpcio_protoc') +GRPC_PYTHON_ROOT = os.path.join(GRPC_ROOT, 'tools/distrib/python/grpcio_tools') -GRPC_PROTOBUF = os.path.abspath('third_party/protobuf/src') -GRPC_PROTOC_PLUGINS = os.path.abspath('src/compiler') +GRPC_PROTOBUF = os.path.join(GRPC_ROOT, 'third_party/protobuf/src') +GRPC_PROTOC_PLUGINS = os.path.join(GRPC_ROOT, 'src/compiler') GRPC_PYTHON_PROTOBUF = os.path.join(GRPC_PYTHON_ROOT, 'third_party/protobuf/src') GRPC_PYTHON_PROTOC_PLUGINS = os.path.join(GRPC_PYTHON_ROOT, @@ -87,32 +88,46 @@ GRPC_PYTHON_PROTOC_DEPS = os.path.join(GRPC_PYTHON_ROOT, GRPC_PYTHON_PROTOC_LIB_DEPS = os.path.join(GRPC_PYTHON_ROOT, 'protoc_lib_deps.py') -GRPC_INCLUDE = os.path.abspath('include') +GRPC_INCLUDE = os.path.join(GRPC_ROOT, 'include') GRPC_PYTHON_INCLUDE = os.path.join(GRPC_PYTHON_ROOT, 'grpc_root/include') -for tree in [GRPC_PYTHON_PROTOBUF, - GRPC_PYTHON_PROTOC_PLUGINS, - GRPC_PYTHON_INCLUDE]: - try: - shutil.rmtree(tree) - except Exception as _: - pass -shutil.copytree(GRPC_PROTOBUF, GRPC_PYTHON_PROTOBUF) -shutil.copytree(GRPC_PROTOC_PLUGINS, GRPC_PYTHON_PROTOC_PLUGINS) -shutil.copytree(GRPC_INCLUDE, GRPC_PYTHON_INCLUDE) - -def write_deps(query, out_filename): - output = subprocess.check_output(['tools/distrib/python/bazel_deps.sh', query]) +BAZEL_DEPS = os.path.join(GRPC_ROOT, 'tools/distrib/python/bazel_deps.sh') +BAZEL_DEPS_PROTOC_QUERY = '//:protoc' +BAZEL_DEPS_PROTOC_LIB_QUERY = '//:protoc_lib' + + +def write_deps(query, out_file): + """Write the result of the bazel query `query` against protobuf to + `out_file`.""" + output = subprocess.check_output([BAZEL_DEPS, query]) output = output.splitlines() cc_files = [ name for name in output if name.endswith('.cc') and name.startswith(PROTOBUF_CC_PREFIX)] cc_files = [cc_file[len(PROTOBUF_CC_PREFIX):] for cc_file in cc_files] - deps_file_content = DEPS_FILE_CONTENT.format(cc_files) + out_file.write(deps_file_content) + + +def main(): + os.chdir(GRPC_ROOT) + + for tree in [GRPC_PYTHON_PROTOBUF, + GRPC_PYTHON_PROTOC_PLUGINS, + GRPC_PYTHON_INCLUDE]: + try: + shutil.rmtree(tree) + except Exception as _: + pass + shutil.copytree(GRPC_PROTOBUF, GRPC_PYTHON_PROTOBUF) + shutil.copytree(GRPC_PROTOC_PLUGINS, GRPC_PYTHON_PROTOC_PLUGINS) + shutil.copytree(GRPC_INCLUDE, GRPC_PYTHON_INCLUDE) + + with open(GRPC_PYTHON_PROTOC_DEPS, 'w') as deps_file: + write_deps(BAZEL_DEPS_PROTOC_QUERY, deps_file) + with open(GRPC_PYTHON_PROTOC_LIB_DEPS, 'w') as deps_file: + write_deps(BAZEL_DEPS_PROTOC_LIB_QUERY, deps_file) - with open(out_filename, 'w') as deps_file: - deps_file.write(deps_file_content) +if __name__ == '__main__': + main() -write_deps('//:protoc', GRPC_PYTHON_PROTOC_DEPS) -write_deps('//:protoc_lib', GRPC_PYTHON_PROTOC_LIB_DEPS) diff --git a/tools/dockerfile/bazel/Dockerfile b/tools/dockerfile/bazel/Dockerfile index af31adb94df..2a80a4d4d53 100644 --- a/tools/dockerfile/bazel/Dockerfile +++ b/tools/dockerfile/bazel/Dockerfile @@ -44,10 +44,9 @@ RUN apt-get -y install \ git RUN git clone https://github.com/bazelbuild/bazel.git /bazel -RUN cd /bazel && \ - ./compile.sh +RUN cd /bazel && ./compile.sh -RUN cp /bazel/output/bazel /bin/bazel +RUN ln -s /bazel/output/bazel /bin/ # ensure the installation has been extracted RUN bazel diff --git a/tools/dockerfile/test/sanity/Dockerfile b/tools/dockerfile/test/sanity/Dockerfile index 3146a922b7e..43b2a0c3d96 100644 --- a/tools/dockerfile/test/sanity/Dockerfile +++ b/tools/dockerfile/test/sanity/Dockerfile @@ -75,6 +75,15 @@ RUN apt-get update && apt-get install -y \ python-lxml RUN pip install simplejson mako +#====================================== +# More sanity test dependencies (bazel) +RUN echo "deb http://httpredir.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list +RUN apt-get update +RUN apt-get -t jessie-backports install -y openjdk-8-jdk +RUN git clone https://github.com/bazelbuild/bazel.git /bazel +RUN cd /bazel && ./compile.sh +RUN ln -s /bazel/output/bazel /bin/ + #=================== # Docker "inception" # Note this is quite the ugly hack. diff --git a/tools/run_tests/sanity/sanity_tests.yaml b/tools/run_tests/sanity/sanity_tests.yaml index efc21e6591b..c5945c602f4 100644 --- a/tools/run_tests/sanity/sanity_tests.yaml +++ b/tools/run_tests/sanity/sanity_tests.yaml @@ -10,3 +10,4 @@ - script: tools/distrib/check_trailing_newlines.sh - script: tools/distrib/check_nanopb_output.sh - script: tools/distrib/check_include_guards.py +- script: tools/distrib/python/check_grpcio_tools.py From af3158350ecaa86ff727af39d16a4a4599e9de3d Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Fri, 29 Apr 2016 15:40:29 -0700 Subject: [PATCH 0264/1894] Integrate Python protoc Linux artifact builders --- tools/dockerfile/grpc_artifact_linux_x64/Dockerfile | 9 +++++++++ tools/dockerfile/grpc_artifact_linux_x86/Dockerfile | 9 +++++++++ tools/run_tests/build_artifact_python.sh | 9 ++++++++- 3 files changed, 26 insertions(+), 1 deletion(-) diff --git a/tools/dockerfile/grpc_artifact_linux_x64/Dockerfile b/tools/dockerfile/grpc_artifact_linux_x64/Dockerfile index d048b725c85..5be2d370618 100644 --- a/tools/dockerfile/grpc_artifact_linux_x64/Dockerfile +++ b/tools/dockerfile/grpc_artifact_linux_x64/Dockerfile @@ -37,6 +37,7 @@ RUN apt-get update && apt-get install -y \ autotools-dev \ build-essential \ bzip2 \ + clang \ curl \ gcc \ gcc-multilib \ @@ -66,6 +67,14 @@ RUN /bin/bash -l -c "nvm install 4 && npm install -g node-pre-gyp" ################## # Python dependencies +# Install bazel +RUN echo "deb http://httpredir.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list +RUN apt-get update +RUN apt-get -t jessie-backports install -y openjdk-8-jdk +RUN git clone https://github.com/bazelbuild/bazel.git /bazel +RUN cd /bazel && ./compile.sh +RUN ln -s /bazel/output/bazel /bin/ + RUN apt-get update && apt-get install -y \ python-all-dev \ python3-all-dev \ diff --git a/tools/dockerfile/grpc_artifact_linux_x86/Dockerfile b/tools/dockerfile/grpc_artifact_linux_x86/Dockerfile index 46bc9f8f524..bacd899ceda 100644 --- a/tools/dockerfile/grpc_artifact_linux_x86/Dockerfile +++ b/tools/dockerfile/grpc_artifact_linux_x86/Dockerfile @@ -37,6 +37,7 @@ RUN apt-get update && apt-get install -y \ autotools-dev \ build-essential \ bzip2 \ + clang \ curl \ gcc \ gcc-multilib \ @@ -66,6 +67,14 @@ RUN /bin/bash -l -c "nvm install 4 && npm install -g node-pre-gyp" ################## # Python dependencies +# Install bazel +RUN echo "deb http://httpredir.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list +RUN apt-get update +RUN apt-get -t jessie-backports install -y openjdk-8-jdk +RUN git clone https://github.com/bazelbuild/bazel.git /bazel +RUN cd /bazel && ./compile.sh +RUN ln -s /bazel/output/bazel /bin/ + RUN apt-get update && apt-get install -y \ python-all-dev \ python3-all-dev \ diff --git a/tools/run_tests/build_artifact_python.sh b/tools/run_tests/build_artifact_python.sh index 1f23f9fade8..454f4727598 100755 --- a/tools/run_tests/build_artifact_python.sh +++ b/tools/run_tests/build_artifact_python.sh @@ -62,6 +62,13 @@ ${SETARCH_CMD} python setup.py \ ${SETARCH_CMD} python setup.py \ bdist_wheel -mkdir -p artifacts +# Build gRPC tools package +python tools/distrib/python/make_grpcio_tools.py +# Build with clang since there's a bug in GCC 4.x where some constant +# expressions are treated as non-constant in the presence of the fwrapv flag +# (fixed in at most GCC 5.3). +CC=clang python tools/distrib/python/grpcio_tools/setup.py bdist_wheel +mkdir -p artifacts cp -r dist/* artifacts +cp -r tools/distrib/python/grpcio_tools/dist/* artifacts From 0e25c8d71a4ac49d284dcfa926bc04dcac577ba9 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Fri, 29 Apr 2016 16:54:17 -0700 Subject: [PATCH 0265/1894] Tightly integrate the Python plugin with its protoc This grossly simplifies the protoc invocation to: python -m grpc.protoc.compiler --python_out=... --grpc_python_out=... [...] --plugin=protoc-gen-python-grpc=grpc_python_protoc_plugin... [...] --- tools/distrib/python/check_grpcio_tools.py | 7 ---- ..._python_protoc_compiler.py => compiler.py} | 4 +- .../grpc/protoc/grpc_python_protoc_plugin.py | 38 ------------------ .../python/grpcio_tools/grpc/protoc/main.cc | 25 ++++++++++++ .../{protoc.pyx => protoc_compiler.pyx} | 0 .../grpc/protoc/protoc_plugin.pyx | 39 ------------------- .../python/grpcio_tools/protoc_deps.py | 32 --------------- .../python/grpcio_tools/protoc_lib_deps.py | 2 +- tools/distrib/python/grpcio_tools/setup.py | 30 +++----------- tools/distrib/python/make_grpcio_tools.py | 7 +--- 10 files changed, 34 insertions(+), 150 deletions(-) rename tools/distrib/python/grpcio_tools/grpc/protoc/{grpc_python_protoc_compiler.py => compiler.py} (95%) delete mode 100644 tools/distrib/python/grpcio_tools/grpc/protoc/grpc_python_protoc_plugin.py create mode 100644 tools/distrib/python/grpcio_tools/grpc/protoc/main.cc rename tools/distrib/python/grpcio_tools/grpc/protoc/{protoc.pyx => protoc_compiler.pyx} (100%) delete mode 100644 tools/distrib/python/grpcio_tools/grpc/protoc/protoc_plugin.pyx delete mode 100644 tools/distrib/python/grpcio_tools/protoc_deps.py diff --git a/tools/distrib/python/check_grpcio_tools.py b/tools/distrib/python/check_grpcio_tools.py index fec218fdabd..f9f869e9902 100755 --- a/tools/distrib/python/check_grpcio_tools.py +++ b/tools/distrib/python/check_grpcio_tools.py @@ -37,16 +37,9 @@ OUT_OF_DATE_MESSAGE = """file {} is out of date Have you called tools/distrib/python/make_grpcio_tools.py since upgrading protobuf?""" -check_protoc_deps_file = cStringIO.StringIO() check_protoc_lib_deps_file = cStringIO.StringIO() -make.write_deps(make.BAZEL_DEPS_PROTOC_QUERY, check_protoc_deps_file) make.write_deps(make.BAZEL_DEPS_PROTOC_LIB_QUERY, check_protoc_lib_deps_file) -with open(make.GRPC_PYTHON_PROTOC_DEPS, 'r') as protoc_deps_file: - if protoc_deps_file.read() != check_protoc_deps_file.getvalue(): - print(OUT_OF_DATE_MESSAGE.format(make.GRPC_PYTHON_PROTOC_DEPS)) - raise SystemExit(1) - with open(make.GRPC_PYTHON_PROTOC_LIB_DEPS, 'r') as protoc_lib_deps_file: if protoc_lib_deps_file.read() != check_protoc_lib_deps_file.getvalue(): print(OUT_OF_DATE_MESSAGE.format(make.GRPC_PYTHON_PROTOC_LIB_DEPS)) diff --git a/tools/distrib/python/grpcio_tools/grpc/protoc/grpc_python_protoc_compiler.py b/tools/distrib/python/grpcio_tools/grpc/protoc/compiler.py similarity index 95% rename from tools/distrib/python/grpcio_tools/grpc/protoc/grpc_python_protoc_compiler.py rename to tools/distrib/python/grpcio_tools/grpc/protoc/compiler.py index 5395f2ac105..caafc544b2b 100644 --- a/tools/distrib/python/grpcio_tools/grpc/protoc/grpc_python_protoc_compiler.py +++ b/tools/distrib/python/grpcio_tools/grpc/protoc/compiler.py @@ -31,8 +31,8 @@ import sys -from grpc.protoc import protoc +from grpc.protoc import protoc_compiler if __name__ == '__main__': - protoc.run_main(sys.argv) + protoc_compiler.run_main(sys.argv) diff --git a/tools/distrib/python/grpcio_tools/grpc/protoc/grpc_python_protoc_plugin.py b/tools/distrib/python/grpcio_tools/grpc/protoc/grpc_python_protoc_plugin.py deleted file mode 100644 index 3b279e29769..00000000000 --- a/tools/distrib/python/grpcio_tools/grpc/protoc/grpc_python_protoc_plugin.py +++ /dev/null @@ -1,38 +0,0 @@ -#!/usr/bin/env python - -# Copyright 2016, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import sys - -from grpc.protoc import protoc_plugin - - -if __name__ == '__main__': - protoc_plugin.run_main(sys.argv) diff --git a/tools/distrib/python/grpcio_tools/grpc/protoc/main.cc b/tools/distrib/python/grpcio_tools/grpc/protoc/main.cc new file mode 100644 index 00000000000..2a0bc6d2d1a --- /dev/null +++ b/tools/distrib/python/grpcio_tools/grpc/protoc/main.cc @@ -0,0 +1,25 @@ +#include +#include + +#include "src/compiler/python_generator.h" + +#include "grpc/protoc/main.h" + +int main(int argc, char* argv[]) { + google::protobuf::compiler::CommandLineInterface cli; + cli.AllowPlugins("protoc-"); + + // Proto2 Python + google::protobuf::compiler::python::Generator py_generator; + cli.RegisterGenerator("--python_out", &py_generator, + "Generate Python source file."); + + // gRPC Python + grpc_python_generator::GeneratorConfiguration grpc_py_config; + grpc_py_config.beta_package_root = "grpc.beta"; + grpc_python_generator::PythonGrpcGenerator grpc_py_generator(grpc_py_config); + cli.RegisterGenerator("--grpc_python_out", &grpc_py_generator, + "Generate Python source file."); + + return cli.Run(argc, argv); +} diff --git a/tools/distrib/python/grpcio_tools/grpc/protoc/protoc.pyx b/tools/distrib/python/grpcio_tools/grpc/protoc/protoc_compiler.pyx similarity index 100% rename from tools/distrib/python/grpcio_tools/grpc/protoc/protoc.pyx rename to tools/distrib/python/grpcio_tools/grpc/protoc/protoc_compiler.pyx diff --git a/tools/distrib/python/grpcio_tools/grpc/protoc/protoc_plugin.pyx b/tools/distrib/python/grpcio_tools/grpc/protoc/protoc_plugin.pyx deleted file mode 100644 index d987ee1ceaa..00000000000 --- a/tools/distrib/python/grpcio_tools/grpc/protoc/protoc_plugin.pyx +++ /dev/null @@ -1,39 +0,0 @@ -# Copyright 2016, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -from libc cimport stdlib - -cdef extern from "grpc/protoc/main.h": - int main(int argc, char *argv[]) - -def run_main(list args not None): - cdef char **argv = stdlib.malloc(len(args)*sizeof(char *)) - for i in range(len(args)): - argv[i] = args[i] - return main(len(args), argv) diff --git a/tools/distrib/python/grpcio_tools/protoc_deps.py b/tools/distrib/python/grpcio_tools/protoc_deps.py deleted file mode 100644 index 2ce5838c478..00000000000 --- a/tools/distrib/python/grpcio_tools/protoc_deps.py +++ /dev/null @@ -1,32 +0,0 @@ - -# Copyright 2016, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -# AUTO-GENERATED BY mk_grpcio_tools.py! -CC_FILES=['google/protobuf/compiler/main.cc', 'google/protobuf/compiler/zip_writer.cc', 'google/protobuf/compiler/subprocess.cc', 'google/protobuf/compiler/ruby/ruby_generator.cc', 'google/protobuf/compiler/python/python_generator.cc', 'google/protobuf/compiler/plugin.pb.cc', 'google/protobuf/compiler/plugin.cc', 'google/protobuf/compiler/objectivec/objectivec_primitive_field.cc', 'google/protobuf/compiler/objectivec/objectivec_oneof.cc', 'google/protobuf/compiler/objectivec/objectivec_message_field.cc', 'google/protobuf/compiler/objectivec/objectivec_message.cc', 'google/protobuf/compiler/objectivec/objectivec_map_field.cc', 'google/protobuf/compiler/objectivec/objectivec_helpers.cc', 'google/protobuf/compiler/objectivec/objectivec_generator.cc', 'google/protobuf/compiler/objectivec/objectivec_file.cc', 'google/protobuf/compiler/objectivec/objectivec_field.cc', 'google/protobuf/compiler/objectivec/objectivec_extension.cc', 'google/protobuf/compiler/objectivec/objectivec_enum_field.cc', 'google/protobuf/compiler/objectivec/objectivec_enum.cc', 'google/protobuf/compiler/js/js_generator.cc', 'google/protobuf/compiler/javanano/javanano_primitive_field.cc', 'google/protobuf/compiler/javanano/javanano_message_field.cc', 'google/protobuf/compiler/javanano/javanano_message.cc', 'google/protobuf/compiler/javanano/javanano_map_field.cc', 'google/protobuf/compiler/javanano/javanano_helpers.cc', 'google/protobuf/compiler/javanano/javanano_generator.cc', 'google/protobuf/compiler/javanano/javanano_file.cc', 'google/protobuf/compiler/javanano/javanano_field.cc', 'google/protobuf/compiler/javanano/javanano_extension.cc', 'google/protobuf/compiler/javanano/javanano_enum_field.cc', 'google/protobuf/compiler/javanano/javanano_enum.cc', 'google/protobuf/compiler/java/java_string_field_lite.cc', 'google/protobuf/compiler/java/java_string_field.cc', 'google/protobuf/compiler/java/java_shared_code_generator.cc', 'google/protobuf/compiler/java/java_service.cc', 'google/protobuf/compiler/java/java_primitive_field_lite.cc', 'google/protobuf/compiler/java/java_primitive_field.cc', 'google/protobuf/compiler/java/java_name_resolver.cc', 'google/protobuf/compiler/java/java_message_lite.cc', 'google/protobuf/compiler/java/java_message_field_lite.cc', 'google/protobuf/compiler/java/java_message_field.cc', 'google/protobuf/compiler/java/java_message_builder_lite.cc', 'google/protobuf/compiler/java/java_message_builder.cc', 'google/protobuf/compiler/java/java_message.cc', 'google/protobuf/compiler/java/java_map_field_lite.cc', 'google/protobuf/compiler/java/java_map_field.cc', 'google/protobuf/compiler/java/java_lazy_message_field_lite.cc', 'google/protobuf/compiler/java/java_lazy_message_field.cc', 'google/protobuf/compiler/java/java_helpers.cc', 'google/protobuf/compiler/java/java_generator_factory.cc', 'google/protobuf/compiler/java/java_generator.cc', 'google/protobuf/compiler/java/java_file.cc', 'google/protobuf/compiler/java/java_field.cc', 'google/protobuf/compiler/java/java_extension.cc', 'google/protobuf/compiler/java/java_enum_lite.cc', 'google/protobuf/compiler/java/java_enum_field_lite.cc', 'google/protobuf/compiler/java/java_enum_field.cc', 'google/protobuf/compiler/java/java_enum.cc', 'google/protobuf/compiler/java/java_doc_comment.cc', 'google/protobuf/compiler/java/java_context.cc', 'google/protobuf/compiler/csharp/csharp_wrapper_field.cc', 'google/protobuf/compiler/csharp/csharp_source_generator_base.cc', 'google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_message_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_reflection_class.cc', 'google/protobuf/compiler/csharp/csharp_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_message_field.cc', 'google/protobuf/compiler/csharp/csharp_message.cc', 'google/protobuf/compiler/csharp/csharp_map_field.cc', 'google/protobuf/compiler/csharp/csharp_helpers.cc', 'google/protobuf/compiler/csharp/csharp_generator.cc', 'google/protobuf/compiler/csharp/csharp_field_base.cc', 'google/protobuf/compiler/csharp/csharp_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_enum.cc', 'google/protobuf/compiler/csharp/csharp_doc_comment.cc', 'google/protobuf/compiler/cpp/cpp_string_field.cc', 'google/protobuf/compiler/cpp/cpp_service.cc', 'google/protobuf/compiler/cpp/cpp_primitive_field.cc', 'google/protobuf/compiler/cpp/cpp_message_field.cc', 'google/protobuf/compiler/cpp/cpp_message.cc', 'google/protobuf/compiler/cpp/cpp_map_field.cc', 'google/protobuf/compiler/cpp/cpp_helpers.cc', 'google/protobuf/compiler/cpp/cpp_generator.cc', 'google/protobuf/compiler/cpp/cpp_file.cc', 'google/protobuf/compiler/cpp/cpp_field.cc', 'google/protobuf/compiler/cpp/cpp_extension.cc', 'google/protobuf/compiler/cpp/cpp_enum_field.cc', 'google/protobuf/compiler/cpp/cpp_enum.cc', 'google/protobuf/compiler/command_line_interface.cc', 'google/protobuf/compiler/code_generator.cc', 'google/protobuf/wrappers.pb.cc', 'google/protobuf/wire_format.cc', 'google/protobuf/util/type_resolver_util.cc', 'google/protobuf/util/time_util.cc', 'google/protobuf/util/message_differencer.cc', 'google/protobuf/util/json_util.cc', 'google/protobuf/util/internal/utility.cc', 'google/protobuf/util/internal/type_info_test_helper.cc', 'google/protobuf/util/internal/type_info.cc', 'google/protobuf/util/internal/protostream_objectwriter.cc', 'google/protobuf/util/internal/protostream_objectsource.cc', 'google/protobuf/util/internal/proto_writer.cc', 'google/protobuf/util/internal/object_writer.cc', 'google/protobuf/util/internal/json_stream_parser.cc', 'google/protobuf/util/internal/json_objectwriter.cc', 'google/protobuf/util/internal/json_escaping.cc', 'google/protobuf/util/internal/field_mask_utility.cc', 'google/protobuf/util/internal/error_listener.cc', 'google/protobuf/util/internal/default_value_objectwriter.cc', 'google/protobuf/util/internal/datapiece.cc', 'google/protobuf/util/field_mask_util.cc', 'google/protobuf/util/field_comparator.cc', 'google/protobuf/unknown_field_set.cc', 'google/protobuf/type.pb.cc', 'google/protobuf/timestamp.pb.cc', 'google/protobuf/text_format.cc', 'google/protobuf/stubs/substitute.cc', 'google/protobuf/stubs/mathlimits.cc', 'google/protobuf/struct.pb.cc', 'google/protobuf/source_context.pb.cc', 'google/protobuf/service.cc', 'google/protobuf/reflection_ops.cc', 'google/protobuf/message.cc', 'google/protobuf/map_field.cc', 'google/protobuf/io/zero_copy_stream_impl.cc', 'google/protobuf/io/tokenizer.cc', 'google/protobuf/io/strtod.cc', 'google/protobuf/io/printer.cc', 'google/protobuf/io/gzip_stream.cc', 'google/protobuf/generated_message_reflection.cc', 'google/protobuf/field_mask.pb.cc', 'google/protobuf/extension_set_heavy.cc', 'google/protobuf/empty.pb.cc', 'google/protobuf/dynamic_message.cc', 'google/protobuf/duration.pb.cc', 'google/protobuf/descriptor_database.cc', 'google/protobuf/descriptor.pb.cc', 'google/protobuf/descriptor.cc', 'google/protobuf/compiler/parser.cc', 'google/protobuf/compiler/importer.cc', 'google/protobuf/api.pb.cc', 'google/protobuf/any.pb.cc', 'google/protobuf/any.cc', 'google/protobuf/wire_format_lite.cc', 'google/protobuf/stubs/time.cc', 'google/protobuf/stubs/strutil.cc', 'google/protobuf/stubs/structurally_valid.cc', 'google/protobuf/stubs/stringprintf.cc', 'google/protobuf/stubs/stringpiece.cc', 'google/protobuf/stubs/statusor.cc', 'google/protobuf/stubs/status.cc', 'google/protobuf/stubs/once.cc', 'google/protobuf/stubs/int128.cc', 'google/protobuf/stubs/common.cc', 'google/protobuf/stubs/bytestream.cc', 'google/protobuf/stubs/atomicops_internals_x86_msvc.cc', 'google/protobuf/stubs/atomicops_internals_x86_gcc.cc', 'google/protobuf/repeated_field.cc', 'google/protobuf/message_lite.cc', 'google/protobuf/io/zero_copy_stream_impl_lite.cc', 'google/protobuf/io/zero_copy_stream.cc', 'google/protobuf/io/coded_stream.cc', 'google/protobuf/generated_message_util.cc', 'google/protobuf/extension_set.cc', 'google/protobuf/arenastring.cc', 'google/protobuf/arena.cc'] diff --git a/tools/distrib/python/grpcio_tools/protoc_lib_deps.py b/tools/distrib/python/grpcio_tools/protoc_lib_deps.py index d4fe0eeaa24..9f31172170d 100644 --- a/tools/distrib/python/grpcio_tools/protoc_lib_deps.py +++ b/tools/distrib/python/grpcio_tools/protoc_lib_deps.py @@ -28,5 +28,5 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# AUTO-GENERATED BY mk_grpcio_tools.py! +# AUTO-GENERATED BY make_grpcio_tools.py! CC_FILES=['google/protobuf/compiler/zip_writer.cc', 'google/protobuf/compiler/subprocess.cc', 'google/protobuf/compiler/ruby/ruby_generator.cc', 'google/protobuf/compiler/python/python_generator.cc', 'google/protobuf/compiler/plugin.pb.cc', 'google/protobuf/compiler/plugin.cc', 'google/protobuf/compiler/objectivec/objectivec_primitive_field.cc', 'google/protobuf/compiler/objectivec/objectivec_oneof.cc', 'google/protobuf/compiler/objectivec/objectivec_message_field.cc', 'google/protobuf/compiler/objectivec/objectivec_message.cc', 'google/protobuf/compiler/objectivec/objectivec_map_field.cc', 'google/protobuf/compiler/objectivec/objectivec_helpers.cc', 'google/protobuf/compiler/objectivec/objectivec_generator.cc', 'google/protobuf/compiler/objectivec/objectivec_file.cc', 'google/protobuf/compiler/objectivec/objectivec_field.cc', 'google/protobuf/compiler/objectivec/objectivec_extension.cc', 'google/protobuf/compiler/objectivec/objectivec_enum_field.cc', 'google/protobuf/compiler/objectivec/objectivec_enum.cc', 'google/protobuf/compiler/js/js_generator.cc', 'google/protobuf/compiler/javanano/javanano_primitive_field.cc', 'google/protobuf/compiler/javanano/javanano_message_field.cc', 'google/protobuf/compiler/javanano/javanano_message.cc', 'google/protobuf/compiler/javanano/javanano_map_field.cc', 'google/protobuf/compiler/javanano/javanano_helpers.cc', 'google/protobuf/compiler/javanano/javanano_generator.cc', 'google/protobuf/compiler/javanano/javanano_file.cc', 'google/protobuf/compiler/javanano/javanano_field.cc', 'google/protobuf/compiler/javanano/javanano_extension.cc', 'google/protobuf/compiler/javanano/javanano_enum_field.cc', 'google/protobuf/compiler/javanano/javanano_enum.cc', 'google/protobuf/compiler/java/java_string_field_lite.cc', 'google/protobuf/compiler/java/java_string_field.cc', 'google/protobuf/compiler/java/java_shared_code_generator.cc', 'google/protobuf/compiler/java/java_service.cc', 'google/protobuf/compiler/java/java_primitive_field_lite.cc', 'google/protobuf/compiler/java/java_primitive_field.cc', 'google/protobuf/compiler/java/java_name_resolver.cc', 'google/protobuf/compiler/java/java_message_lite.cc', 'google/protobuf/compiler/java/java_message_field_lite.cc', 'google/protobuf/compiler/java/java_message_field.cc', 'google/protobuf/compiler/java/java_message_builder_lite.cc', 'google/protobuf/compiler/java/java_message_builder.cc', 'google/protobuf/compiler/java/java_message.cc', 'google/protobuf/compiler/java/java_map_field_lite.cc', 'google/protobuf/compiler/java/java_map_field.cc', 'google/protobuf/compiler/java/java_lazy_message_field_lite.cc', 'google/protobuf/compiler/java/java_lazy_message_field.cc', 'google/protobuf/compiler/java/java_helpers.cc', 'google/protobuf/compiler/java/java_generator_factory.cc', 'google/protobuf/compiler/java/java_generator.cc', 'google/protobuf/compiler/java/java_file.cc', 'google/protobuf/compiler/java/java_field.cc', 'google/protobuf/compiler/java/java_extension.cc', 'google/protobuf/compiler/java/java_enum_lite.cc', 'google/protobuf/compiler/java/java_enum_field_lite.cc', 'google/protobuf/compiler/java/java_enum_field.cc', 'google/protobuf/compiler/java/java_enum.cc', 'google/protobuf/compiler/java/java_doc_comment.cc', 'google/protobuf/compiler/java/java_context.cc', 'google/protobuf/compiler/csharp/csharp_wrapper_field.cc', 'google/protobuf/compiler/csharp/csharp_source_generator_base.cc', 'google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_message_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_reflection_class.cc', 'google/protobuf/compiler/csharp/csharp_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_message_field.cc', 'google/protobuf/compiler/csharp/csharp_message.cc', 'google/protobuf/compiler/csharp/csharp_map_field.cc', 'google/protobuf/compiler/csharp/csharp_helpers.cc', 'google/protobuf/compiler/csharp/csharp_generator.cc', 'google/protobuf/compiler/csharp/csharp_field_base.cc', 'google/protobuf/compiler/csharp/csharp_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_enum.cc', 'google/protobuf/compiler/csharp/csharp_doc_comment.cc', 'google/protobuf/compiler/cpp/cpp_string_field.cc', 'google/protobuf/compiler/cpp/cpp_service.cc', 'google/protobuf/compiler/cpp/cpp_primitive_field.cc', 'google/protobuf/compiler/cpp/cpp_message_field.cc', 'google/protobuf/compiler/cpp/cpp_message.cc', 'google/protobuf/compiler/cpp/cpp_map_field.cc', 'google/protobuf/compiler/cpp/cpp_helpers.cc', 'google/protobuf/compiler/cpp/cpp_generator.cc', 'google/protobuf/compiler/cpp/cpp_file.cc', 'google/protobuf/compiler/cpp/cpp_field.cc', 'google/protobuf/compiler/cpp/cpp_extension.cc', 'google/protobuf/compiler/cpp/cpp_enum_field.cc', 'google/protobuf/compiler/cpp/cpp_enum.cc', 'google/protobuf/compiler/command_line_interface.cc', 'google/protobuf/compiler/code_generator.cc', 'google/protobuf/wrappers.pb.cc', 'google/protobuf/wire_format.cc', 'google/protobuf/util/type_resolver_util.cc', 'google/protobuf/util/time_util.cc', 'google/protobuf/util/message_differencer.cc', 'google/protobuf/util/json_util.cc', 'google/protobuf/util/internal/utility.cc', 'google/protobuf/util/internal/type_info_test_helper.cc', 'google/protobuf/util/internal/type_info.cc', 'google/protobuf/util/internal/protostream_objectwriter.cc', 'google/protobuf/util/internal/protostream_objectsource.cc', 'google/protobuf/util/internal/proto_writer.cc', 'google/protobuf/util/internal/object_writer.cc', 'google/protobuf/util/internal/json_stream_parser.cc', 'google/protobuf/util/internal/json_objectwriter.cc', 'google/protobuf/util/internal/json_escaping.cc', 'google/protobuf/util/internal/field_mask_utility.cc', 'google/protobuf/util/internal/error_listener.cc', 'google/protobuf/util/internal/default_value_objectwriter.cc', 'google/protobuf/util/internal/datapiece.cc', 'google/protobuf/util/field_mask_util.cc', 'google/protobuf/util/field_comparator.cc', 'google/protobuf/unknown_field_set.cc', 'google/protobuf/type.pb.cc', 'google/protobuf/timestamp.pb.cc', 'google/protobuf/text_format.cc', 'google/protobuf/stubs/substitute.cc', 'google/protobuf/stubs/mathlimits.cc', 'google/protobuf/struct.pb.cc', 'google/protobuf/source_context.pb.cc', 'google/protobuf/service.cc', 'google/protobuf/reflection_ops.cc', 'google/protobuf/message.cc', 'google/protobuf/map_field.cc', 'google/protobuf/io/zero_copy_stream_impl.cc', 'google/protobuf/io/tokenizer.cc', 'google/protobuf/io/strtod.cc', 'google/protobuf/io/printer.cc', 'google/protobuf/io/gzip_stream.cc', 'google/protobuf/generated_message_reflection.cc', 'google/protobuf/field_mask.pb.cc', 'google/protobuf/extension_set_heavy.cc', 'google/protobuf/empty.pb.cc', 'google/protobuf/dynamic_message.cc', 'google/protobuf/duration.pb.cc', 'google/protobuf/descriptor_database.cc', 'google/protobuf/descriptor.pb.cc', 'google/protobuf/descriptor.cc', 'google/protobuf/compiler/parser.cc', 'google/protobuf/compiler/importer.cc', 'google/protobuf/api.pb.cc', 'google/protobuf/any.pb.cc', 'google/protobuf/any.cc', 'google/protobuf/wire_format_lite.cc', 'google/protobuf/stubs/time.cc', 'google/protobuf/stubs/strutil.cc', 'google/protobuf/stubs/structurally_valid.cc', 'google/protobuf/stubs/stringprintf.cc', 'google/protobuf/stubs/stringpiece.cc', 'google/protobuf/stubs/statusor.cc', 'google/protobuf/stubs/status.cc', 'google/protobuf/stubs/once.cc', 'google/protobuf/stubs/int128.cc', 'google/protobuf/stubs/common.cc', 'google/protobuf/stubs/bytestream.cc', 'google/protobuf/stubs/atomicops_internals_x86_msvc.cc', 'google/protobuf/stubs/atomicops_internals_x86_gcc.cc', 'google/protobuf/repeated_field.cc', 'google/protobuf/message_lite.cc', 'google/protobuf/io/zero_copy_stream_impl_lite.cc', 'google/protobuf/io/zero_copy_stream.cc', 'google/protobuf/io/coded_stream.cc', 'google/protobuf/generated_message_util.cc', 'google/protobuf/extension_set.cc', 'google/protobuf/arenastring.cc', 'google/protobuf/arena.cc'] diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py index 3fa61320c8a..59093aa5163 100644 --- a/tools/distrib/python/grpcio_tools/setup.py +++ b/tools/distrib/python/grpcio_tools/setup.py @@ -40,32 +40,17 @@ from setuptools.command import build_ext os.chdir(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, os.path.abspath('.')) -import protoc_deps import protoc_lib_deps def protoc_ext_module(): - protoc_sources = [ - os.path.join('third_party/protobuf/src', cc_file) - for cc_file in protoc_deps.CC_FILES] - protoc_ext = extension.Extension( - name='grpc.protoc.protoc', - sources=['grpc/protoc/protoc.pyx'] + protoc_sources, - include_dirs=['.', 'third_party/protobuf/src'], - language='c++', - define_macros=[('HAVE_PTHREAD', 1)], - extra_compile_args=['-lpthread', '-frtti'], - ) - return protoc_ext - -def plugin_ext_module(): plugin_sources = [ - 'grpc_root/src/compiler/python_generator.cc', - 'grpc_root/src/compiler/python_plugin.cc'] + [ + 'grpc/protoc/main.cc', + 'grpc_root/src/compiler/python_generator.cc'] + [ os.path.join('third_party/protobuf/src', cc_file) for cc_file in protoc_lib_deps.CC_FILES] plugin_ext = extension.Extension( - name='grpc.protoc.protoc_plugin', - sources=['grpc/protoc/protoc_plugin.pyx'] + plugin_sources, + name='grpc.protoc.protoc_compiler', + sources=['grpc/protoc/protoc_compiler.pyx'] + plugin_sources, include_dirs=[ '.', 'grpc_root', @@ -74,7 +59,7 @@ def plugin_ext_module(): ], language='c++', define_macros=[('HAVE_PTHREAD', 1)], - extra_compile_args=['-lpthread', '-std=c++11'], + extra_compile_args=['-lpthread', '-frtti', '-std=c++11'], ) return plugin_ext @@ -88,12 +73,7 @@ setuptools.setup( license='', ext_modules=maybe_cythonize([ protoc_ext_module(), - plugin_ext_module(), ]), - scripts=[ - 'grpc/protoc/grpc_python_protoc_compiler.py', - 'grpc/protoc/grpc_python_protoc_plugin.py', - ], packages=setuptools.find_packages('.'), namespace_packages=['grpc'], install_requires=[ diff --git a/tools/distrib/python/make_grpcio_tools.py b/tools/distrib/python/make_grpcio_tools.py index 178dd6a85db..27e7d5f0a4f 100755 --- a/tools/distrib/python/make_grpcio_tools.py +++ b/tools/distrib/python/make_grpcio_tools.py @@ -64,7 +64,7 @@ DEPS_FILE_CONTENT=""" # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -# AUTO-GENERATED BY mk_grpcio_tools.py! +# AUTO-GENERATED BY make_grpcio_tools.py! CC_FILES={} """ @@ -83,8 +83,6 @@ GRPC_PYTHON_PROTOBUF = os.path.join(GRPC_PYTHON_ROOT, 'third_party/protobuf/src') GRPC_PYTHON_PROTOC_PLUGINS = os.path.join(GRPC_PYTHON_ROOT, 'grpc_root/src/compiler') -GRPC_PYTHON_PROTOC_DEPS = os.path.join(GRPC_PYTHON_ROOT, - 'protoc_deps.py') GRPC_PYTHON_PROTOC_LIB_DEPS = os.path.join(GRPC_PYTHON_ROOT, 'protoc_lib_deps.py') @@ -92,7 +90,6 @@ GRPC_INCLUDE = os.path.join(GRPC_ROOT, 'include') GRPC_PYTHON_INCLUDE = os.path.join(GRPC_PYTHON_ROOT, 'grpc_root/include') BAZEL_DEPS = os.path.join(GRPC_ROOT, 'tools/distrib/python/bazel_deps.sh') -BAZEL_DEPS_PROTOC_QUERY = '//:protoc' BAZEL_DEPS_PROTOC_LIB_QUERY = '//:protoc_lib' @@ -123,8 +120,6 @@ def main(): shutil.copytree(GRPC_PROTOC_PLUGINS, GRPC_PYTHON_PROTOC_PLUGINS) shutil.copytree(GRPC_INCLUDE, GRPC_PYTHON_INCLUDE) - with open(GRPC_PYTHON_PROTOC_DEPS, 'w') as deps_file: - write_deps(BAZEL_DEPS_PROTOC_QUERY, deps_file) with open(GRPC_PYTHON_PROTOC_LIB_DEPS, 'w') as deps_file: write_deps(BAZEL_DEPS_PROTOC_LIB_QUERY, deps_file) From 176ac65faf22fae7cf3d1874a97fc16636ef1be3 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Tue, 3 May 2016 11:55:40 -0700 Subject: [PATCH 0266/1894] Don't truncate deps file on failure to find bazel --- tools/distrib/python/check_grpcio_tools.py | 5 ++--- tools/distrib/python/make_grpcio_tools.py | 18 +++++++++++++++--- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/tools/distrib/python/check_grpcio_tools.py b/tools/distrib/python/check_grpcio_tools.py index f9f869e9902..baf2ff4effb 100755 --- a/tools/distrib/python/check_grpcio_tools.py +++ b/tools/distrib/python/check_grpcio_tools.py @@ -37,10 +37,9 @@ OUT_OF_DATE_MESSAGE = """file {} is out of date Have you called tools/distrib/python/make_grpcio_tools.py since upgrading protobuf?""" -check_protoc_lib_deps_file = cStringIO.StringIO() -make.write_deps(make.BAZEL_DEPS_PROTOC_LIB_QUERY, check_protoc_lib_deps_file) +check_protoc_lib_deps_content = make.get_deps(make.BAZEL_DEPS_PROTOC_LIB_QUERY) with open(make.GRPC_PYTHON_PROTOC_LIB_DEPS, 'r') as protoc_lib_deps_file: - if protoc_lib_deps_file.read() != check_protoc_lib_deps_file.getvalue(): + if protoc_lib_deps_file.read() != check_protoc_lib_deps_content: print(OUT_OF_DATE_MESSAGE.format(make.GRPC_PYTHON_PROTOC_LIB_DEPS)) raise SystemExit(1) diff --git a/tools/distrib/python/make_grpcio_tools.py b/tools/distrib/python/make_grpcio_tools.py index 27e7d5f0a4f..50fbdbb14c0 100755 --- a/tools/distrib/python/make_grpcio_tools.py +++ b/tools/distrib/python/make_grpcio_tools.py @@ -33,6 +33,8 @@ import os import os.path import shutil import subprocess +import sys +import traceback DEPS_FILE_CONTENT=""" # Copyright 2016, Google Inc. @@ -93,7 +95,7 @@ BAZEL_DEPS = os.path.join(GRPC_ROOT, 'tools/distrib/python/bazel_deps.sh') BAZEL_DEPS_PROTOC_LIB_QUERY = '//:protoc_lib' -def write_deps(query, out_file): +def get_deps(query): """Write the result of the bazel query `query` against protobuf to `out_file`.""" output = subprocess.check_output([BAZEL_DEPS, query]) @@ -103,7 +105,7 @@ def write_deps(query, out_file): if name.endswith('.cc') and name.startswith(PROTOBUF_CC_PREFIX)] cc_files = [cc_file[len(PROTOBUF_CC_PREFIX):] for cc_file in cc_files] deps_file_content = DEPS_FILE_CONTENT.format(cc_files) - out_file.write(deps_file_content) + return deps_file_content def main(): @@ -120,8 +122,18 @@ def main(): shutil.copytree(GRPC_PROTOC_PLUGINS, GRPC_PYTHON_PROTOC_PLUGINS) shutil.copytree(GRPC_INCLUDE, GRPC_PYTHON_INCLUDE) + try: + protoc_lib_deps_content = get_deps(BAZEL_DEPS_PROTOC_LIB_QUERY) + except Exception as error: + # We allow this script to succeed even if we couldn't get the dependencies, + # as then we can assume that even without a successful bazel run the + # dependencies currently in source control are 'good enough'. + sys.stderr.write("Got non-fatal error:\n") + traceback.print_exc(file=sys.stderr) + return + # If we successfully got the dependencies, truncate and rewrite the deps file. with open(GRPC_PYTHON_PROTOC_LIB_DEPS, 'w') as deps_file: - write_deps(BAZEL_DEPS_PROTOC_LIB_QUERY, deps_file) + deps_file.write(protoc_lib_deps_content) if __name__ == '__main__': main() From 955887928f1ac6d9b39599d14b6b7a522db026d9 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Tue, 3 May 2016 12:05:13 -0700 Subject: [PATCH 0267/1894] Keep grpcio_tools version in sync with rest of project --- .../grpcio_tools/grpc_version.py.template | 34 +++++++++++++++++++ .../python/grpcio_tools/grpc_version.py | 32 +++++++++++++++++ tools/distrib/python/grpcio_tools/setup.py | 3 +- 3 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 templates/tools/distrib/python/grpcio_tools/grpc_version.py.template create mode 100644 tools/distrib/python/grpcio_tools/grpc_version.py diff --git a/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template b/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template new file mode 100644 index 00000000000..200905d4f3f --- /dev/null +++ b/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template @@ -0,0 +1,34 @@ +%YAML 1.2 +--- | + # Copyright 2015, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! + + VERSION='${settings.python_version.pep440()}' diff --git a/tools/distrib/python/grpcio_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_version.py new file mode 100644 index 00000000000..b8ae8e20b8b --- /dev/null +++ b/tools/distrib/python/grpcio_tools/grpc_version.py @@ -0,0 +1,32 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! + +VERSION='0.14.0.dev0' diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py index 59093aa5163..8530398b6d1 100644 --- a/tools/distrib/python/grpcio_tools/setup.py +++ b/tools/distrib/python/grpcio_tools/setup.py @@ -41,6 +41,7 @@ os.chdir(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, os.path.abspath('.')) import protoc_lib_deps +import grpc_version def protoc_ext_module(): plugin_sources = [ @@ -69,7 +70,7 @@ def maybe_cythonize(exts): setuptools.setup( name='grpcio_tools', - version='0.14.0rc1', + version=grpc_version.VERSION, license='', ext_modules=maybe_cythonize([ protoc_ext_module(), From 616b2793fd20eb28c2be53831f967332659987d0 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Tue, 3 May 2016 12:33:02 -0700 Subject: [PATCH 0268/1894] Fix docker build --- tools/dockerfile/grpc_artifact_linux_x64/Dockerfile | 12 +++--------- tools/dockerfile/grpc_artifact_linux_x86/Dockerfile | 12 +++--------- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/tools/dockerfile/grpc_artifact_linux_x64/Dockerfile b/tools/dockerfile/grpc_artifact_linux_x64/Dockerfile index 5be2d370618..4ae4ebdb06d 100644 --- a/tools/dockerfile/grpc_artifact_linux_x64/Dockerfile +++ b/tools/dockerfile/grpc_artifact_linux_x64/Dockerfile @@ -31,8 +31,10 @@ FROM debian:jessie +RUN apt-get update && apt-get install debian-keyring && apt-key update + # Install Git and basic packages. -RUN apt-get update && apt-get install -y \ +RUN apt-get update && apt-key update && apt-get install -y \ autoconf \ autotools-dev \ build-essential \ @@ -67,14 +69,6 @@ RUN /bin/bash -l -c "nvm install 4 && npm install -g node-pre-gyp" ################## # Python dependencies -# Install bazel -RUN echo "deb http://httpredir.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list -RUN apt-get update -RUN apt-get -t jessie-backports install -y openjdk-8-jdk -RUN git clone https://github.com/bazelbuild/bazel.git /bazel -RUN cd /bazel && ./compile.sh -RUN ln -s /bazel/output/bazel /bin/ - RUN apt-get update && apt-get install -y \ python-all-dev \ python3-all-dev \ diff --git a/tools/dockerfile/grpc_artifact_linux_x86/Dockerfile b/tools/dockerfile/grpc_artifact_linux_x86/Dockerfile index bacd899ceda..9c2fd52eee1 100644 --- a/tools/dockerfile/grpc_artifact_linux_x86/Dockerfile +++ b/tools/dockerfile/grpc_artifact_linux_x86/Dockerfile @@ -31,8 +31,10 @@ FROM 32bit/debian:jessie +RUN apt-get update && apt-get install debian-keyring && apt-key update + # Install Git and basic packages. -RUN apt-get update && apt-get install -y \ +RUN apt-get update && apt-key update && apt-get install -y \ autoconf \ autotools-dev \ build-essential \ @@ -67,14 +69,6 @@ RUN /bin/bash -l -c "nvm install 4 && npm install -g node-pre-gyp" ################## # Python dependencies -# Install bazel -RUN echo "deb http://httpredir.debian.org/debian jessie-backports main" > /etc/apt/sources.list.d/backports.list -RUN apt-get update -RUN apt-get -t jessie-backports install -y openjdk-8-jdk -RUN git clone https://github.com/bazelbuild/bazel.git /bazel -RUN cd /bazel && ./compile.sh -RUN ln -s /bazel/output/bazel /bin/ - RUN apt-get update && apt-get install -y \ python-all-dev \ python3-all-dev \ From 010eb48d2169e13ab8afeae32c29ede7b84a0e4d Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Tue, 3 May 2016 15:59:40 -0700 Subject: [PATCH 0269/1894] Use manylinux --- setup.py | 3 +- .../python/grpcio_tools/grpc/protoc/main.cc | 2 +- .../python/grpcio_tools/grpc/protoc/main.h | 6 +- .../grpc/protoc/protoc_compiler.pyx | 4 +- tools/distrib/python/grpcio_tools/setup.py | 3 +- .../Dockerfile | 43 +++++++++++++++ .../Dockerfile | 43 +++++++++++++++ tools/run_tests/artifact_targets.py | 55 +++++++++++++++++-- tools/run_tests/build_artifact_python.sh | 49 +++++++++-------- 9 files changed, 173 insertions(+), 35 deletions(-) create mode 100644 tools/dockerfile/grpc_artifact_python_manylinux_x64/Dockerfile create mode 100644 tools/dockerfile/grpc_artifact_python_manylinux_x86/Dockerfile diff --git a/setup.py b/setup.py index af9eb685348..5cd26124f6d 100644 --- a/setup.py +++ b/setup.py @@ -236,7 +236,8 @@ setup_arguments = { 'ext_modules': CYTHON_EXTENSION_MODULES, 'packages': list(PACKAGES), 'package_dir': PACKAGE_DIRECTORIES, - 'namespace_packages': ['grpc'], + # TODO(atash): Figure out why auditwheel doesn't like namespace packages. + #'namespace_packages': ['grpc'], 'package_data': PACKAGE_DATA, 'install_requires': INSTALL_REQUIRES, 'setup_requires': SETUP_REQUIRES, diff --git a/tools/distrib/python/grpcio_tools/grpc/protoc/main.cc b/tools/distrib/python/grpcio_tools/grpc/protoc/main.cc index 2a0bc6d2d1a..4487a6851ae 100644 --- a/tools/distrib/python/grpcio_tools/grpc/protoc/main.cc +++ b/tools/distrib/python/grpcio_tools/grpc/protoc/main.cc @@ -5,7 +5,7 @@ #include "grpc/protoc/main.h" -int main(int argc, char* argv[]) { +int protoc_main(int argc, char* argv[]) { google::protobuf::compiler::CommandLineInterface cli; cli.AllowPlugins("protoc-"); diff --git a/tools/distrib/python/grpcio_tools/grpc/protoc/main.h b/tools/distrib/python/grpcio_tools/grpc/protoc/main.h index fc406a9260c..ea2860ff020 100644 --- a/tools/distrib/python/grpcio_tools/grpc/protoc/main.h +++ b/tools/distrib/python/grpcio_tools/grpc/protoc/main.h @@ -28,6 +28,6 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// We declare `main` here since we want access to it from Cython as an extern -// but *without* triggering a dllimport declspec when on Windows. -int main(int argc, char *argv[]); +// We declare `protoc_main` here since we want access to it from Cython as an +// extern but *without* triggering a dllimport declspec when on Windows. +int protoc_main(int argc, char *argv[]); diff --git a/tools/distrib/python/grpcio_tools/grpc/protoc/protoc_compiler.pyx b/tools/distrib/python/grpcio_tools/grpc/protoc/protoc_compiler.pyx index d987ee1ceaa..af15f3db30e 100644 --- a/tools/distrib/python/grpcio_tools/grpc/protoc/protoc_compiler.pyx +++ b/tools/distrib/python/grpcio_tools/grpc/protoc/protoc_compiler.pyx @@ -30,10 +30,10 @@ from libc cimport stdlib cdef extern from "grpc/protoc/main.h": - int main(int argc, char *argv[]) + int protoc_main(int argc, char *argv[]) def run_main(list args not None): cdef char **argv = stdlib.malloc(len(args)*sizeof(char *)) for i in range(len(args)): argv[i] = args[i] - return main(len(args), argv) + return protoc_main(len(args), argv) diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py index 8530398b6d1..0281c01796d 100644 --- a/tools/distrib/python/grpcio_tools/setup.py +++ b/tools/distrib/python/grpcio_tools/setup.py @@ -76,7 +76,8 @@ setuptools.setup( protoc_ext_module(), ]), packages=setuptools.find_packages('.'), - namespace_packages=['grpc'], + # TODO(atash): Figure out why auditwheel doesn't like namespace packages. + #namespace_packages=['grpc'], install_requires=[ 'protobuf>=3.0.0a3', ], diff --git a/tools/dockerfile/grpc_artifact_python_manylinux_x64/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux_x64/Dockerfile new file mode 100644 index 00000000000..3e31a2b623d --- /dev/null +++ b/tools/dockerfile/grpc_artifact_python_manylinux_x64/Dockerfile @@ -0,0 +1,43 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Docker file for building gRPC manylinux Python artifacts. + +FROM quay.io/pypa/manylinux1_x86_64 + +# Update the package manager +RUN yum update -y + +################################### +# Install Python build requirements +RUN /opt/python/cp27-cp27m/bin/pip install cython +RUN /opt/python/cp27-cp27mu/bin/pip install cython +RUN /opt/python/cp34-cp34m/bin/pip install cython +RUN /opt/python/cp35-cp35m/bin/pip install cython + diff --git a/tools/dockerfile/grpc_artifact_python_manylinux_x86/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux_x86/Dockerfile new file mode 100644 index 00000000000..5fe62c28b73 --- /dev/null +++ b/tools/dockerfile/grpc_artifact_python_manylinux_x86/Dockerfile @@ -0,0 +1,43 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Docker file for building gRPC manylinux Python artifacts. + +FROM quay.io/pypa/manylinux1_i686 + +# Update the package manager +RUN yum update -y + +################################### +# Install Python build requirements +RUN /opt/python/cp27-cp27m/bin/pip install cython +RUN /opt/python/cp27-cp27mu/bin/pip install cython +RUN /opt/python/cp34-cp34m/bin/pip install cython +RUN /opt/python/cp35-cp35m/bin/pip install cython + diff --git a/tools/run_tests/artifact_targets.py b/tools/run_tests/artifact_targets.py index 3e08c1d62b3..ec44e3746c9 100644 --- a/tools/run_tests/artifact_targets.py +++ b/tools/run_tests/artifact_targets.py @@ -84,12 +84,16 @@ python_version_arch_map = { class PythonArtifact: """Builds Python artifacts.""" - def __init__(self, platform, arch): - self.name = 'python_%s_%s' % (platform, arch) + def __init__(self, platform, arch, manylinux_build=None): + if manylinux_build: + self.name = 'python_%s_%s_%s' % (platform, arch, manylinux_build) + else: + self.name = 'python_%s_%s' % (platform, arch) self.platform = platform self.arch = arch self.labels = ['artifact', 'python', platform, arch] self.python_version = python_version_arch_map[arch] + self.manylinux_build = manylinux_build def pre_build_jobspecs(self): return [] @@ -99,8 +103,47 @@ class PythonArtifact: if self.platform == 'linux': if self.arch == 'x86': environ['SETARCH_CMD'] = 'linux32' + # Inside the manylinux container, the python installations are located in + # special places... + environ['PYTHON'] = '/opt/python/{}/bin/python'.format(self.manylinux_build) + environ['PIP'] = '/opt/python/{}/bin/pip'.format(self.manylinux_build) + # Our docker image has all the prerequisites pip-installed already. + environ['SKIP_PIP_INSTALL'] = '1' + # Platform autodetection for the manylinux1 image breaks so we set the + # defines ourselves. + # TODO(atash) get better platform-detection support in core so we don't + # need to do this manually... + environ['CFLAGS'] = " ".join([ + '-DGPR_NO_AUTODETECT_PLATFORM', + '-DGPR_PLATFORM_STRING=\\"manylinux\\"', + '-DGPR_POSIX_CRASH_HANDLER=1', + '-DGPR_CPU_LINUX=1', + '-DGPR_GCC_ATOMIC=1', + '-DGPR_GCC_TLS=1', + '-DGPR_LINUX=1', + '-DGPR_LINUX_LOG=1', + #'-DGPR_LINUX_MULTIPOLL_WITH_EPOLL=1', + '-DGPR_POSIX_SOCKET=1', + '-DGPR_POSIX_WAKEUP_FD=1', + '-DGPR_POSIX_SOCKETADDR=1', + #'-DGPR_LINUX_EVENTFD=1', + #'-DGPR_LINUX_SOCKETUTILS=1', + '-DGPR_HAVE_UNIX_SOCKET=1', + '-DGPR_HAVE_IP_PKTINFO=1', + '-DGPR_HAVE_IPV6_RECVPKTINFO=1', + '-DGPR_LINUX_ENV=1', + '-DGPR_POSIX_FILE=1', + '-DGPR_POSIX_TMPFILE=1', + '-DGPR_POSIX_STRING=1', + '-DGPR_POSIX_SUBPROCESS=1', + '-DGPR_POSIX_SYNC=1', + '-DGPR_POSIX_TIME=1', + '-DGPR_GETPID_IN_UNISTD_H=1', + '-DGPR_HAVE_MSG_NOSIGNAL=1', + '-DGPR_ARCH_{arch}=1'.format(arch=('32' if self.arch == 'x86' else '64')), + ]) return create_docker_jobspec(self.name, - 'tools/dockerfile/grpc_artifact_linux_%s' % self.arch, + 'tools/dockerfile/grpc_artifact_python_manylinux_%s' % self.arch, 'tools/run_tests/build_artifact_python.sh', environ=environ) elif self.platform == 'windows': @@ -307,8 +350,10 @@ def targets(): for Cls in (CSharpExtArtifact, NodeExtArtifact, ProtocArtifact) for platform in ('linux', 'macos', 'windows') for arch in ('x86', 'x64')] + - [PythonArtifact('linux', 'x86'), - PythonArtifact('linux', 'x64'), + [PythonArtifact('linux', 'x86', 'cp27-cp27m'), + PythonArtifact('linux', 'x86', 'cp27-cp27mu'), + PythonArtifact('linux', 'x64', 'cp27-cp27m'), + PythonArtifact('linux', 'x64', 'cp27-cp27mu'), PythonArtifact('macos', 'x64'), PythonArtifact('windows', 'x86'), PythonArtifact('windows', 'x64'), diff --git a/tools/run_tests/build_artifact_python.sh b/tools/run_tests/build_artifact_python.sh index 454f4727598..920d255aeda 100755 --- a/tools/run_tests/build_artifact_python.sh +++ b/tools/run_tests/build_artifact_python.sh @@ -32,43 +32,48 @@ set -ex cd $(dirname $0)/../.. +export GRPC_PYTHON_USE_CUSTOM_BDIST=0 +export GRPC_PYTHON_BUILD_WITH_CYTHON=1 +export PYTHON=${PYTHON:-python} +export PIP=${PIP:-pip} +export AUDITWHEEL=${AUDITWHEEL:-auditwheel} + + if [ "$SKIP_PIP_INSTALL" == "" ] then - pip install --upgrade six + ${PIP} install --upgrade six # There's a bug in newer versions of setuptools (see # https://bitbucket.org/pypa/setuptools/issues/503/pkg_resources_vendorpackagingrequirementsi) - pip install --upgrade 'setuptools==18' - pip install -rrequirements.txt + ${PIP} pip install --upgrade 'setuptools==18' + ${PIP} install -rrequirements.txt fi -export GRPC_PYTHON_USE_CUSTOM_BDIST=0 -export GRPC_PYTHON_BUILD_WITH_CYTHON=1 - # Build the source distribution first because MANIFEST.in cannot override # exclusion of built shared objects among package resources (for some # inexplicable reason). -${SETARCH_CMD} python setup.py \ +${SETARCH_CMD} ${PYTHON} setup.py \ sdist -# The bdist_wheel_grpc_custom command is finicky about command output ordering -# and thus ought to be run in a shell command separate of others. Further, it -# trashes the actual bdist_wheel output, so it should be run first so that -# bdist_wheel may be run unmolested. -${SETARCH_CMD} python setup.py \ - build_tagged_ext - # Wheel has a bug where directories don't get excluded. # https://bitbucket.org/pypa/wheel/issues/99/cannot-exclude-directory -${SETARCH_CMD} python setup.py \ +${SETARCH_CMD} ${PYTHON} setup.py \ bdist_wheel # Build gRPC tools package -python tools/distrib/python/make_grpcio_tools.py -# Build with clang since there's a bug in GCC 4.x where some constant -# expressions are treated as non-constant in the presence of the fwrapv flag -# (fixed in at most GCC 5.3). -CC=clang python tools/distrib/python/grpcio_tools/setup.py bdist_wheel +${PYTHON} tools/distrib/python/make_grpcio_tools.py +CFLAGS="$CFLAGS -fno-wrapv" ${SETARCH_CMD} \ + ${PYTHON} tools/distrib/python/grpcio_tools/setup.py bdist_wheel mkdir -p artifacts -cp -r dist/* artifacts -cp -r tools/distrib/python/grpcio_tools/dist/* artifacts +if command -v ${AUDITWHEEL} +then + for wheel in dist/*.whl; do + ${AUDITWHEEL} repair $wheel -w artifacts/ + done + for wheel in tools/distrib/python/grpcio_tools/dist/*.whl; do + ${AUDITWHEEL} repair $wheel -w artifacts/ + done +else + cp -r dist/* artifacts + cp -r tools/distrib/python/grpcio_tools/dist/* artifacts +fi From e9407c2e74a3ca3819d78a8ffa4d20fb51a00a59 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Wed, 4 May 2016 06:26:15 -0700 Subject: [PATCH 0270/1894] Test binary Python distributions --- test/distrib/python/run_distrib_test.sh | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/distrib/python/run_distrib_test.sh b/test/distrib/python/run_distrib_test.sh index 79893af8e54..73e471dd265 100755 --- a/test/distrib/python/run_distrib_test.sh +++ b/test/distrib/python/run_distrib_test.sh @@ -33,8 +33,7 @@ set -ex cd $(dirname $0) # Pick up the source dist archive whatever its version is -SDIST_ARCHIVE=$EXTERNAL_GIT_ROOT/input_artifacts/grpcio-*.tar.gz -BDIST_DIR="file://$EXTERNAL_GIT_ROOT/input_artifacts" +BDIST_ARCHIVES=$EXTERNAL_GIT_ROOT/input_artifacts/grpcio-*.whl if [ ! -f ${SDIST_ARCHIVE} ] then @@ -48,11 +47,13 @@ PYTHON=python2 which $PYTHON || PYTHON=python # TODO(jtattermusch): this shouldn't be required -$PIP install --upgrade six +$PIP install --upgrade six pip -GRPC_PYTHON_BINARIES_REPOSITORY="${BDIST_DIR}" \ - $PIP install \ - ${SDIST_ARCHIVE} +# At least one of the bdist packages has to succeed (whichever one matches the +# test machine, anyway). +for bdist in ${BDIST_ARCHIVES}; do + ($PIP install $bdist) || true +done $PYTHON distribtest.py From 88baf86d710a2234f6f83a04d46fbe162a4ef0d4 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Wed, 4 May 2016 06:33:15 -0700 Subject: [PATCH 0271/1894] Copy all generated Python distribs --- tools/run_tests/build_artifact_python.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/run_tests/build_artifact_python.sh b/tools/run_tests/build_artifact_python.sh index 920d255aeda..35c3a48afae 100755 --- a/tools/run_tests/build_artifact_python.sh +++ b/tools/run_tests/build_artifact_python.sh @@ -73,7 +73,7 @@ then for wheel in tools/distrib/python/grpcio_tools/dist/*.whl; do ${AUDITWHEEL} repair $wheel -w artifacts/ done -else - cp -r dist/* artifacts - cp -r tools/distrib/python/grpcio_tools/dist/* artifacts fi + +cp -r dist/* artifacts +cp -r tools/distrib/python/grpcio_tools/dist/* artifacts From f837cc8f6304e1cd2a018d449fb4826e560cb282 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Wed, 4 May 2016 11:59:22 -0700 Subject: [PATCH 0272/1894] Fix missing symbols --- tools/run_tests/artifact_targets.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/run_tests/artifact_targets.py b/tools/run_tests/artifact_targets.py index ec44e3746c9..72f4f8dd967 100644 --- a/tools/run_tests/artifact_targets.py +++ b/tools/run_tests/artifact_targets.py @@ -127,7 +127,9 @@ class PythonArtifact: '-DGPR_POSIX_WAKEUP_FD=1', '-DGPR_POSIX_SOCKETADDR=1', #'-DGPR_LINUX_EVENTFD=1', + '-DGPR_POSIX_NO_SPECIAL_WAKEUP_FD=1', #'-DGPR_LINUX_SOCKETUTILS=1', + '-DGPR_POSIX_SOCKETUTILS=1', '-DGPR_HAVE_UNIX_SOCKET=1', '-DGPR_HAVE_IP_PKTINFO=1', '-DGPR_HAVE_IPV6_RECVPKTINFO=1', From 916c960e593affc049ade727e86f78febeeb2420 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Wed, 4 May 2016 12:48:39 -0700 Subject: [PATCH 0273/1894] Fix Python distrib test --- test/distrib/python/run_distrib_test.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/distrib/python/run_distrib_test.sh b/test/distrib/python/run_distrib_test.sh index 73e471dd265..e20767a885f 100755 --- a/test/distrib/python/run_distrib_test.sh +++ b/test/distrib/python/run_distrib_test.sh @@ -41,18 +41,18 @@ then exit 1 fi -PIP=pip2 -which $PIP || PIP=pip PYTHON=python2 +PIP=pip2 which $PYTHON || PYTHON=python +which $PIP || PIP=pip # TODO(jtattermusch): this shouldn't be required -$PIP install --upgrade six pip +${PIP} install --upgrade six pip # At least one of the bdist packages has to succeed (whichever one matches the # test machine, anyway). for bdist in ${BDIST_ARCHIVES}; do - ($PIP install $bdist) || true + ($PYTHON -m pip install $bdist) || true done $PYTHON distribtest.py From 8ca294e417217e1577609052f18df84be437c03c Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Mon, 2 May 2016 14:56:30 -0700 Subject: [PATCH 0274/1894] Refactoring the core security code. As opposed to a flat directory, we now have the following structure: - security -context - credentials - composite - fake - google_default - iam - jwt - oauth2 - plugin - ssl - transport - util We have not refactored the test code yet but this PR is already large enough... --- BUILD | 126 +- Makefile | 72 +- binding.gyp | 36 +- build.yaml | 63 +- config.m4 | 49 +- gRPC.podspec | 90 +- grpc.gemspec | 63 +- package.xml | 63 +- .../client/secure/secure_channel_create.c | 6 +- .../server/secure/server_secure_chttp2.c | 8 +- .../lib/http/httpcli_security_connector.c | 2 +- .../security/{ => context}/security_context.c | 2 +- .../security/{ => context}/security_context.h | 8 +- src/core/lib/security/credentials.c | 1296 ----------------- .../composite/composite_credentials.c | 263 ++++ .../composite/composite_credentials.h | 72 + .../lib/security/credentials/credentials.c | 233 +++ .../security/{ => credentials}/credentials.h | 169 +-- .../{ => credentials}/credentials_metadata.c | 2 +- .../credentials/fake/fake_credentials.c | 139 ++ .../credentials/fake/fake_credentials.h | 56 + .../google_default}/credentials_posix.c | 2 +- .../google_default}/credentials_win32.c | 2 +- .../google_default_credentials.c | 4 +- .../google_default_credentials.h | 47 + .../credentials/iam/iam_credentials.c | 87 ++ .../credentials/iam/iam_credentials.h | 47 + .../{ => credentials/jwt}/json_token.c | 110 +- .../{ => credentials/jwt}/json_token.h | 36 +- .../credentials/jwt/jwt_credentials.c | 161 ++ .../credentials/jwt/jwt_credentials.h | 63 + .../{ => credentials/jwt}/jwt_verifier.c | 4 +- .../{ => credentials/jwt}/jwt_verifier.h | 6 +- .../credentials/oauth2/oauth2_credentials.c | 430 ++++++ .../credentials/oauth2/oauth2_credentials.h | 111 ++ .../credentials/plugin/plugin_credentials.c | 131 ++ .../credentials/plugin/plugin_credentials.h | 48 + .../credentials/ssl/ssl_credentials.c | 244 ++++ .../credentials/ssl/ssl_credentials.h | 49 + .../security/{ => transport}/auth_filters.h | 6 +- .../{ => transport}/client_auth_filter.c | 8 +- .../lib/security/{ => transport}/handshake.c | 6 +- .../lib/security/{ => transport}/handshake.h | 8 +- .../{ => transport}/secure_endpoint.c | 2 +- .../{ => transport}/secure_endpoint.h | 6 +- .../{ => transport}/security_connector.c | 10 +- .../{ => transport}/security_connector.h | 6 +- .../{ => transport}/server_auth_filter.c | 6 +- src/core/lib/security/{ => util}/b64.c | 2 +- src/core/lib/security/{ => util}/b64.h | 6 +- src/core/lib/security/util/json_util.c | 62 + src/core/lib/security/util/json_util.h | 57 + src/core/lib/surface/init_secure.c | 8 +- src/python/grpcio/grpc_core_dependencies.py | 36 +- .../set_initial_connect_string_test.c | 2 +- test/core/end2end/fixtures/h2_fakesec.c | 2 +- test/core/end2end/fixtures/h2_oauth2.c | 2 +- test/core/end2end/fixtures/h2_ssl.c | 2 +- test/core/end2end/fixtures/h2_ssl_cert.c | 2 +- test/core/end2end/fixtures/h2_ssl_proxy.c | 2 +- test/core/end2end/tests/call_creds.c | 2 +- test/core/security/auth_context_test.c | 2 +- test/core/security/b64_test.c | 2 +- test/core/security/create_jwt.c | 3 +- test/core/security/credentials_test.c | 7 +- test/core/security/fetch_oauth2.c | 2 +- test/core/security/json_token_test.c | 5 +- test/core/security/jwt_verifier_test.c | 6 +- test/core/security/oauth2_utils.c | 2 +- test/core/security/oauth2_utils.h | 2 +- .../print_google_default_creds_token.c | 3 +- test/core/security/secure_endpoint_test.c | 2 +- test/core/security/security_connector_test.c | 4 +- test/core/security/verify_jwt.c | 2 +- .../core/surface/secure_channel_create_test.c | 4 +- test/core/surface/server_chttp2_test.c | 3 +- .../cpp/common/auth_property_iterator_test.cc | 2 +- test/cpp/common/secure_auth_context_test.cc | 2 +- test/cpp/end2end/end2end_test.cc | 2 +- tools/doxygen/Doxyfile.core.internal | 63 +- tools/run_tests/sources_and_headers.json | 90 +- vsprojects/vcxproj/grpc/grpc.vcxproj | 71 +- vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 179 ++- 83 files changed, 3084 insertions(+), 2017 deletions(-) rename src/core/lib/security/{ => context}/security_context.c (99%) rename src/core/lib/security/{ => context}/security_context.h (94%) delete mode 100644 src/core/lib/security/credentials.c create mode 100644 src/core/lib/security/credentials/composite/composite_credentials.c create mode 100644 src/core/lib/security/credentials/composite/composite_credentials.h create mode 100644 src/core/lib/security/credentials/credentials.c rename src/core/lib/security/{ => credentials}/credentials.h (62%) rename src/core/lib/security/{ => credentials}/credentials_metadata.c (98%) create mode 100644 src/core/lib/security/credentials/fake/fake_credentials.c create mode 100644 src/core/lib/security/credentials/fake/fake_credentials.h rename src/core/lib/security/{ => credentials/google_default}/credentials_posix.c (96%) rename src/core/lib/security/{ => credentials/google_default}/credentials_win32.c (96%) rename src/core/lib/security/{ => credentials/google_default}/google_default_credentials.c (97%) create mode 100644 src/core/lib/security/credentials/google_default/google_default_credentials.h create mode 100644 src/core/lib/security/credentials/iam/iam_credentials.c create mode 100644 src/core/lib/security/credentials/iam/iam_credentials.h rename src/core/lib/security/{ => credentials/jwt}/json_token.c (74%) rename src/core/lib/security/{ => credentials/jwt}/json_token.h (74%) create mode 100644 src/core/lib/security/credentials/jwt/jwt_credentials.c create mode 100644 src/core/lib/security/credentials/jwt/jwt_credentials.h rename src/core/lib/security/{ => credentials/jwt}/jwt_verifier.c (99%) rename src/core/lib/security/{ => credentials/jwt}/jwt_verifier.h (96%) create mode 100644 src/core/lib/security/credentials/oauth2/oauth2_credentials.c create mode 100644 src/core/lib/security/credentials/oauth2/oauth2_credentials.h create mode 100644 src/core/lib/security/credentials/plugin/plugin_credentials.c create mode 100644 src/core/lib/security/credentials/plugin/plugin_credentials.h create mode 100644 src/core/lib/security/credentials/ssl/ssl_credentials.c create mode 100644 src/core/lib/security/credentials/ssl/ssl_credentials.h rename src/core/lib/security/{ => transport}/auth_filters.h (90%) rename src/core/lib/security/{ => transport}/client_auth_filter.c (98%) rename src/core/lib/security/{ => transport}/handshake.c (98%) rename src/core/lib/security/{ => transport}/handshake.h (90%) rename src/core/lib/security/{ => transport}/secure_endpoint.c (99%) rename src/core/lib/security/{ => transport}/secure_endpoint.h (91%) rename src/core/lib/security/{ => transport}/security_connector.c (99%) rename src/core/lib/security/{ => transport}/security_connector.h (98%) rename src/core/lib/security/{ => transport}/server_auth_filter.c (98%) rename src/core/lib/security/{ => util}/b64.c (99%) rename src/core/lib/security/{ => util}/b64.h (94%) create mode 100644 src/core/lib/security/util/json_util.c create mode 100644 src/core/lib/security/util/json_util.h diff --git a/BUILD b/BUILD index b4b10b535e8..ac16f07cd0a 100644 --- a/BUILD +++ b/BUILD @@ -255,15 +255,24 @@ cc_library( "src/core/ext/transport/chttp2/transport/timeout_encoding.h", "src/core/ext/transport/chttp2/transport/varint.h", "src/core/ext/transport/chttp2/alpn/alpn.h", - "src/core/lib/security/auth_filters.h", - "src/core/lib/security/b64.h", - "src/core/lib/security/credentials.h", - "src/core/lib/security/handshake.h", - "src/core/lib/security/json_token.h", - "src/core/lib/security/jwt_verifier.h", - "src/core/lib/security/secure_endpoint.h", - "src/core/lib/security/security_connector.h", - "src/core/lib/security/security_context.h", + "src/core/lib/security/context/security_context.h", + "src/core/lib/security/credentials/composite/composite_credentials.h", + "src/core/lib/security/credentials/credentials.h", + "src/core/lib/security/credentials/fake/fake_credentials.h", + "src/core/lib/security/credentials/google_default/google_default_credentials.h", + "src/core/lib/security/credentials/iam/iam_credentials.h", + "src/core/lib/security/credentials/jwt/json_token.h", + "src/core/lib/security/credentials/jwt/jwt_credentials.h", + "src/core/lib/security/credentials/jwt/jwt_verifier.h", + "src/core/lib/security/credentials/oauth2/oauth2_credentials.h", + "src/core/lib/security/credentials/plugin/plugin_credentials.h", + "src/core/lib/security/credentials/ssl/ssl_credentials.h", + "src/core/lib/security/transport/auth_filters.h", + "src/core/lib/security/transport/handshake.h", + "src/core/lib/security/transport/secure_endpoint.h", + "src/core/lib/security/transport/security_connector.h", + "src/core/lib/security/util/b64.h", + "src/core/lib/security/util/json_util.h", "src/core/lib/tsi/fake_transport_security.h", "src/core/lib/tsi/ssl_transport_security.h", "src/core/lib/tsi/ssl_types.h", @@ -399,20 +408,28 @@ cc_library( "src/core/ext/transport/chttp2/transport/writing.c", "src/core/ext/transport/chttp2/alpn/alpn.c", "src/core/lib/http/httpcli_security_connector.c", - "src/core/lib/security/b64.c", - "src/core/lib/security/client_auth_filter.c", - "src/core/lib/security/credentials.c", - "src/core/lib/security/credentials_metadata.c", - "src/core/lib/security/credentials_posix.c", - "src/core/lib/security/credentials_win32.c", - "src/core/lib/security/google_default_credentials.c", - "src/core/lib/security/handshake.c", - "src/core/lib/security/json_token.c", - "src/core/lib/security/jwt_verifier.c", - "src/core/lib/security/secure_endpoint.c", - "src/core/lib/security/security_connector.c", - "src/core/lib/security/security_context.c", - "src/core/lib/security/server_auth_filter.c", + "src/core/lib/security/context/security_context.c", + "src/core/lib/security/credentials/composite/composite_credentials.c", + "src/core/lib/security/credentials/credentials.c", + "src/core/lib/security/credentials/credentials_metadata.c", + "src/core/lib/security/credentials/fake/fake_credentials.c", + "src/core/lib/security/credentials/google_default/credentials_posix.c", + "src/core/lib/security/credentials/google_default/credentials_win32.c", + "src/core/lib/security/credentials/google_default/google_default_credentials.c", + "src/core/lib/security/credentials/iam/iam_credentials.c", + "src/core/lib/security/credentials/jwt/json_token.c", + "src/core/lib/security/credentials/jwt/jwt_credentials.c", + "src/core/lib/security/credentials/jwt/jwt_verifier.c", + "src/core/lib/security/credentials/oauth2/oauth2_credentials.c", + "src/core/lib/security/credentials/plugin/plugin_credentials.c", + "src/core/lib/security/credentials/ssl/ssl_credentials.c", + "src/core/lib/security/transport/client_auth_filter.c", + "src/core/lib/security/transport/handshake.c", + "src/core/lib/security/transport/secure_endpoint.c", + "src/core/lib/security/transport/security_connector.c", + "src/core/lib/security/transport/server_auth_filter.c", + "src/core/lib/security/util/b64.c", + "src/core/lib/security/util/json_util.c", "src/core/lib/surface/init_secure.c", "src/core/lib/tsi/fake_transport_security.c", "src/core/lib/tsi/ssl_transport_security.c", @@ -1416,20 +1433,28 @@ objc_library( "src/core/ext/transport/chttp2/transport/writing.c", "src/core/ext/transport/chttp2/alpn/alpn.c", "src/core/lib/http/httpcli_security_connector.c", - "src/core/lib/security/b64.c", - "src/core/lib/security/client_auth_filter.c", - "src/core/lib/security/credentials.c", - "src/core/lib/security/credentials_metadata.c", - "src/core/lib/security/credentials_posix.c", - "src/core/lib/security/credentials_win32.c", - "src/core/lib/security/google_default_credentials.c", - "src/core/lib/security/handshake.c", - "src/core/lib/security/json_token.c", - "src/core/lib/security/jwt_verifier.c", - "src/core/lib/security/secure_endpoint.c", - "src/core/lib/security/security_connector.c", - "src/core/lib/security/security_context.c", - "src/core/lib/security/server_auth_filter.c", + "src/core/lib/security/context/security_context.c", + "src/core/lib/security/credentials/composite/composite_credentials.c", + "src/core/lib/security/credentials/credentials.c", + "src/core/lib/security/credentials/credentials_metadata.c", + "src/core/lib/security/credentials/fake/fake_credentials.c", + "src/core/lib/security/credentials/google_default/credentials_posix.c", + "src/core/lib/security/credentials/google_default/credentials_win32.c", + "src/core/lib/security/credentials/google_default/google_default_credentials.c", + "src/core/lib/security/credentials/iam/iam_credentials.c", + "src/core/lib/security/credentials/jwt/json_token.c", + "src/core/lib/security/credentials/jwt/jwt_credentials.c", + "src/core/lib/security/credentials/jwt/jwt_verifier.c", + "src/core/lib/security/credentials/oauth2/oauth2_credentials.c", + "src/core/lib/security/credentials/plugin/plugin_credentials.c", + "src/core/lib/security/credentials/ssl/ssl_credentials.c", + "src/core/lib/security/transport/client_auth_filter.c", + "src/core/lib/security/transport/handshake.c", + "src/core/lib/security/transport/secure_endpoint.c", + "src/core/lib/security/transport/security_connector.c", + "src/core/lib/security/transport/server_auth_filter.c", + "src/core/lib/security/util/b64.c", + "src/core/lib/security/util/json_util.c", "src/core/lib/surface/init_secure.c", "src/core/lib/tsi/fake_transport_security.c", "src/core/lib/tsi/ssl_transport_security.c", @@ -1596,15 +1621,24 @@ objc_library( "src/core/ext/transport/chttp2/transport/timeout_encoding.h", "src/core/ext/transport/chttp2/transport/varint.h", "src/core/ext/transport/chttp2/alpn/alpn.h", - "src/core/lib/security/auth_filters.h", - "src/core/lib/security/b64.h", - "src/core/lib/security/credentials.h", - "src/core/lib/security/handshake.h", - "src/core/lib/security/json_token.h", - "src/core/lib/security/jwt_verifier.h", - "src/core/lib/security/secure_endpoint.h", - "src/core/lib/security/security_connector.h", - "src/core/lib/security/security_context.h", + "src/core/lib/security/context/security_context.h", + "src/core/lib/security/credentials/composite/composite_credentials.h", + "src/core/lib/security/credentials/credentials.h", + "src/core/lib/security/credentials/fake/fake_credentials.h", + "src/core/lib/security/credentials/google_default/google_default_credentials.h", + "src/core/lib/security/credentials/iam/iam_credentials.h", + "src/core/lib/security/credentials/jwt/json_token.h", + "src/core/lib/security/credentials/jwt/jwt_credentials.h", + "src/core/lib/security/credentials/jwt/jwt_verifier.h", + "src/core/lib/security/credentials/oauth2/oauth2_credentials.h", + "src/core/lib/security/credentials/plugin/plugin_credentials.h", + "src/core/lib/security/credentials/ssl/ssl_credentials.h", + "src/core/lib/security/transport/auth_filters.h", + "src/core/lib/security/transport/handshake.h", + "src/core/lib/security/transport/secure_endpoint.h", + "src/core/lib/security/transport/security_connector.h", + "src/core/lib/security/util/b64.h", + "src/core/lib/security/util/json_util.h", "src/core/lib/tsi/fake_transport_security.h", "src/core/lib/tsi/ssl_transport_security.h", "src/core/lib/tsi/ssl_types.h", diff --git a/Makefile b/Makefile index 922e0b0568f..64ecf38f49f 100644 --- a/Makefile +++ b/Makefile @@ -2583,20 +2583,28 @@ LIBGRPC_SRC = \ src/core/ext/transport/chttp2/transport/writing.c \ src/core/ext/transport/chttp2/alpn/alpn.c \ src/core/lib/http/httpcli_security_connector.c \ - src/core/lib/security/b64.c \ - src/core/lib/security/client_auth_filter.c \ - src/core/lib/security/credentials.c \ - src/core/lib/security/credentials_metadata.c \ - src/core/lib/security/credentials_posix.c \ - src/core/lib/security/credentials_win32.c \ - src/core/lib/security/google_default_credentials.c \ - src/core/lib/security/handshake.c \ - src/core/lib/security/json_token.c \ - src/core/lib/security/jwt_verifier.c \ - src/core/lib/security/secure_endpoint.c \ - src/core/lib/security/security_connector.c \ - src/core/lib/security/security_context.c \ - src/core/lib/security/server_auth_filter.c \ + src/core/lib/security/context/security_context.c \ + src/core/lib/security/credentials/composite/composite_credentials.c \ + src/core/lib/security/credentials/credentials.c \ + src/core/lib/security/credentials/credentials_metadata.c \ + src/core/lib/security/credentials/fake/fake_credentials.c \ + src/core/lib/security/credentials/google_default/credentials_posix.c \ + src/core/lib/security/credentials/google_default/credentials_win32.c \ + src/core/lib/security/credentials/google_default/google_default_credentials.c \ + src/core/lib/security/credentials/iam/iam_credentials.c \ + src/core/lib/security/credentials/jwt/json_token.c \ + src/core/lib/security/credentials/jwt/jwt_credentials.c \ + src/core/lib/security/credentials/jwt/jwt_verifier.c \ + src/core/lib/security/credentials/oauth2/oauth2_credentials.c \ + src/core/lib/security/credentials/plugin/plugin_credentials.c \ + src/core/lib/security/credentials/ssl/ssl_credentials.c \ + src/core/lib/security/transport/client_auth_filter.c \ + src/core/lib/security/transport/handshake.c \ + src/core/lib/security/transport/secure_endpoint.c \ + src/core/lib/security/transport/security_connector.c \ + src/core/lib/security/transport/server_auth_filter.c \ + src/core/lib/security/util/b64.c \ + src/core/lib/security/util/json_util.c \ src/core/lib/surface/init_secure.c \ src/core/lib/tsi/fake_transport_security.c \ src/core/lib/tsi/ssl_transport_security.c \ @@ -14314,20 +14322,28 @@ ifneq ($(OPENSSL_DEP),) src/core/ext/transport/chttp2/client/secure/secure_channel_create.c: $(OPENSSL_DEP) src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c: $(OPENSSL_DEP) src/core/lib/http/httpcli_security_connector.c: $(OPENSSL_DEP) -src/core/lib/security/b64.c: $(OPENSSL_DEP) -src/core/lib/security/client_auth_filter.c: $(OPENSSL_DEP) -src/core/lib/security/credentials.c: $(OPENSSL_DEP) -src/core/lib/security/credentials_metadata.c: $(OPENSSL_DEP) -src/core/lib/security/credentials_posix.c: $(OPENSSL_DEP) -src/core/lib/security/credentials_win32.c: $(OPENSSL_DEP) -src/core/lib/security/google_default_credentials.c: $(OPENSSL_DEP) -src/core/lib/security/handshake.c: $(OPENSSL_DEP) -src/core/lib/security/json_token.c: $(OPENSSL_DEP) -src/core/lib/security/jwt_verifier.c: $(OPENSSL_DEP) -src/core/lib/security/secure_endpoint.c: $(OPENSSL_DEP) -src/core/lib/security/security_connector.c: $(OPENSSL_DEP) -src/core/lib/security/security_context.c: $(OPENSSL_DEP) -src/core/lib/security/server_auth_filter.c: $(OPENSSL_DEP) +src/core/lib/security/context/security_context.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/composite/composite_credentials.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/credentials.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/credentials_metadata.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/fake/fake_credentials.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/google_default/credentials_posix.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/google_default/credentials_win32.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/google_default/google_default_credentials.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/iam/iam_credentials.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/jwt/json_token.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/jwt/jwt_credentials.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/jwt/jwt_verifier.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/oauth2/oauth2_credentials.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/plugin/plugin_credentials.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/ssl/ssl_credentials.c: $(OPENSSL_DEP) +src/core/lib/security/transport/client_auth_filter.c: $(OPENSSL_DEP) +src/core/lib/security/transport/handshake.c: $(OPENSSL_DEP) +src/core/lib/security/transport/secure_endpoint.c: $(OPENSSL_DEP) +src/core/lib/security/transport/security_connector.c: $(OPENSSL_DEP) +src/core/lib/security/transport/server_auth_filter.c: $(OPENSSL_DEP) +src/core/lib/security/util/b64.c: $(OPENSSL_DEP) +src/core/lib/security/util/json_util.c: $(OPENSSL_DEP) src/core/lib/surface/init_secure.c: $(OPENSSL_DEP) src/core/lib/tsi/fake_transport_security.c: $(OPENSSL_DEP) src/core/lib/tsi/ssl_transport_security.c: $(OPENSSL_DEP) diff --git a/binding.gyp b/binding.gyp index 4314ab7243d..06e742ca435 100644 --- a/binding.gyp +++ b/binding.gyp @@ -669,20 +669,28 @@ 'src/core/ext/transport/chttp2/transport/writing.c', 'src/core/ext/transport/chttp2/alpn/alpn.c', 'src/core/lib/http/httpcli_security_connector.c', - 'src/core/lib/security/b64.c', - 'src/core/lib/security/client_auth_filter.c', - 'src/core/lib/security/credentials.c', - 'src/core/lib/security/credentials_metadata.c', - 'src/core/lib/security/credentials_posix.c', - 'src/core/lib/security/credentials_win32.c', - 'src/core/lib/security/google_default_credentials.c', - 'src/core/lib/security/handshake.c', - 'src/core/lib/security/json_token.c', - 'src/core/lib/security/jwt_verifier.c', - 'src/core/lib/security/secure_endpoint.c', - 'src/core/lib/security/security_connector.c', - 'src/core/lib/security/security_context.c', - 'src/core/lib/security/server_auth_filter.c', + 'src/core/lib/security/context/security_context.c', + 'src/core/lib/security/credentials/composite/composite_credentials.c', + 'src/core/lib/security/credentials/credentials.c', + 'src/core/lib/security/credentials/credentials_metadata.c', + 'src/core/lib/security/credentials/fake/fake_credentials.c', + 'src/core/lib/security/credentials/google_default/credentials_posix.c', + 'src/core/lib/security/credentials/google_default/credentials_win32.c', + 'src/core/lib/security/credentials/google_default/google_default_credentials.c', + 'src/core/lib/security/credentials/iam/iam_credentials.c', + 'src/core/lib/security/credentials/jwt/json_token.c', + 'src/core/lib/security/credentials/jwt/jwt_credentials.c', + 'src/core/lib/security/credentials/jwt/jwt_verifier.c', + 'src/core/lib/security/credentials/oauth2/oauth2_credentials.c', + 'src/core/lib/security/credentials/plugin/plugin_credentials.c', + 'src/core/lib/security/credentials/ssl/ssl_credentials.c', + 'src/core/lib/security/transport/client_auth_filter.c', + 'src/core/lib/security/transport/handshake.c', + 'src/core/lib/security/transport/secure_endpoint.c', + 'src/core/lib/security/transport/security_connector.c', + 'src/core/lib/security/transport/server_auth_filter.c', + 'src/core/lib/security/util/b64.c', + 'src/core/lib/security/util/json_util.c', 'src/core/lib/surface/init_secure.c', 'src/core/lib/tsi/fake_transport_security.c', 'src/core/lib/tsi/ssl_transport_security.c', diff --git a/build.yaml b/build.yaml index 441752dc3dc..1d869009f4c 100644 --- a/build.yaml +++ b/build.yaml @@ -402,31 +402,48 @@ filegroups: - include/grpc/grpc_security.h - include/grpc/grpc_security_constants.h headers: - - src/core/lib/security/auth_filters.h - - src/core/lib/security/b64.h - - src/core/lib/security/credentials.h - - src/core/lib/security/handshake.h - - src/core/lib/security/json_token.h - - src/core/lib/security/jwt_verifier.h - - src/core/lib/security/secure_endpoint.h - - src/core/lib/security/security_connector.h - - src/core/lib/security/security_context.h + - src/core/lib/security/context/security_context.h + - src/core/lib/security/credentials/composite/composite_credentials.h + - src/core/lib/security/credentials/credentials.h + - src/core/lib/security/credentials/fake/fake_credentials.h + - src/core/lib/security/credentials/google_default/google_default_credentials.h + - src/core/lib/security/credentials/iam/iam_credentials.h + - src/core/lib/security/credentials/jwt/json_token.h + - src/core/lib/security/credentials/jwt/jwt_credentials.h + - src/core/lib/security/credentials/jwt/jwt_verifier.h + - src/core/lib/security/credentials/oauth2/oauth2_credentials.h + - src/core/lib/security/credentials/plugin/plugin_credentials.h + - src/core/lib/security/credentials/ssl/ssl_credentials.h + - src/core/lib/security/transport/auth_filters.h + - src/core/lib/security/transport/handshake.h + - src/core/lib/security/transport/secure_endpoint.h + - src/core/lib/security/transport/security_connector.h + - src/core/lib/security/util/b64.h + - src/core/lib/security/util/json_util.h src: - src/core/lib/http/httpcli_security_connector.c - - src/core/lib/security/b64.c - - src/core/lib/security/client_auth_filter.c - - src/core/lib/security/credentials.c - - src/core/lib/security/credentials_metadata.c - - src/core/lib/security/credentials_posix.c - - src/core/lib/security/credentials_win32.c - - src/core/lib/security/google_default_credentials.c - - src/core/lib/security/handshake.c - - src/core/lib/security/json_token.c - - src/core/lib/security/jwt_verifier.c - - src/core/lib/security/secure_endpoint.c - - src/core/lib/security/security_connector.c - - src/core/lib/security/security_context.c - - src/core/lib/security/server_auth_filter.c + - src/core/lib/security/context/security_context.c + - src/core/lib/security/credentials/composite/composite_credentials.c + - src/core/lib/security/credentials/credentials.c + - src/core/lib/security/credentials/credentials_metadata.c + - src/core/lib/security/credentials/fake/fake_credentials.c + - src/core/lib/security/credentials/google_default/credentials_posix.c + - src/core/lib/security/credentials/google_default/credentials_win32.c + - src/core/lib/security/credentials/google_default/google_default_credentials.c + - src/core/lib/security/credentials/iam/iam_credentials.c + - src/core/lib/security/credentials/jwt/json_token.c + - src/core/lib/security/credentials/jwt/jwt_credentials.c + - src/core/lib/security/credentials/jwt/jwt_verifier.c + - src/core/lib/security/credentials/oauth2/oauth2_credentials.c + - src/core/lib/security/credentials/plugin/plugin_credentials.c + - src/core/lib/security/credentials/ssl/ssl_credentials.c + - src/core/lib/security/transport/client_auth_filter.c + - src/core/lib/security/transport/handshake.c + - src/core/lib/security/transport/secure_endpoint.c + - src/core/lib/security/transport/security_connector.c + - src/core/lib/security/transport/server_auth_filter.c + - src/core/lib/security/util/b64.c + - src/core/lib/security/util/json_util.c - src/core/lib/surface/init_secure.c secure: true uses: diff --git a/config.m4 b/config.m4 index 74f9ad242ab..40e827d1dd2 100644 --- a/config.m4 +++ b/config.m4 @@ -188,20 +188,28 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/transport/chttp2/transport/writing.c \ src/core/ext/transport/chttp2/alpn/alpn.c \ src/core/lib/http/httpcli_security_connector.c \ - src/core/lib/security/b64.c \ - src/core/lib/security/client_auth_filter.c \ - src/core/lib/security/credentials.c \ - src/core/lib/security/credentials_metadata.c \ - src/core/lib/security/credentials_posix.c \ - src/core/lib/security/credentials_win32.c \ - src/core/lib/security/google_default_credentials.c \ - src/core/lib/security/handshake.c \ - src/core/lib/security/json_token.c \ - src/core/lib/security/jwt_verifier.c \ - src/core/lib/security/secure_endpoint.c \ - src/core/lib/security/security_connector.c \ - src/core/lib/security/security_context.c \ - src/core/lib/security/server_auth_filter.c \ + src/core/lib/security/context/security_context.c \ + src/core/lib/security/credentials/composite/composite_credentials.c \ + src/core/lib/security/credentials/credentials.c \ + src/core/lib/security/credentials/credentials_metadata.c \ + src/core/lib/security/credentials/fake/fake_credentials.c \ + src/core/lib/security/credentials/google_default/credentials_posix.c \ + src/core/lib/security/credentials/google_default/credentials_win32.c \ + src/core/lib/security/credentials/google_default/google_default_credentials.c \ + src/core/lib/security/credentials/iam/iam_credentials.c \ + src/core/lib/security/credentials/jwt/json_token.c \ + src/core/lib/security/credentials/jwt/jwt_credentials.c \ + src/core/lib/security/credentials/jwt/jwt_verifier.c \ + src/core/lib/security/credentials/oauth2/oauth2_credentials.c \ + src/core/lib/security/credentials/plugin/plugin_credentials.c \ + src/core/lib/security/credentials/ssl/ssl_credentials.c \ + src/core/lib/security/transport/client_auth_filter.c \ + src/core/lib/security/transport/handshake.c \ + src/core/lib/security/transport/secure_endpoint.c \ + src/core/lib/security/transport/security_connector.c \ + src/core/lib/security/transport/server_auth_filter.c \ + src/core/lib/security/util/b64.c \ + src/core/lib/security/util/json_util.c \ src/core/lib/surface/init_secure.c \ src/core/lib/tsi/fake_transport_security.c \ src/core/lib/tsi/ssl_transport_security.c \ @@ -573,7 +581,18 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/iomgr) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/json) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/profiling) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/context) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/credentials) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/credentials/composite) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/credentials/fake) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/credentials/google_default) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/credentials/iam) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/credentials/jwt) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/credentials/oauth2) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/credentials/plugin) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/credentials/ssl) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/transport) + PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/security/util) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/support) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/surface) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/transport) diff --git a/gRPC.podspec b/gRPC.podspec index 77d35bd2c79..9ae4ea7c6e1 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -257,15 +257,24 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/transport/timeout_encoding.h', 'src/core/ext/transport/chttp2/transport/varint.h', 'src/core/ext/transport/chttp2/alpn/alpn.h', - 'src/core/lib/security/auth_filters.h', - 'src/core/lib/security/b64.h', - 'src/core/lib/security/credentials.h', - 'src/core/lib/security/handshake.h', - 'src/core/lib/security/json_token.h', - 'src/core/lib/security/jwt_verifier.h', - 'src/core/lib/security/secure_endpoint.h', - 'src/core/lib/security/security_connector.h', - 'src/core/lib/security/security_context.h', + 'src/core/lib/security/context/security_context.h', + 'src/core/lib/security/credentials/composite/composite_credentials.h', + 'src/core/lib/security/credentials/credentials.h', + 'src/core/lib/security/credentials/fake/fake_credentials.h', + 'src/core/lib/security/credentials/google_default/google_default_credentials.h', + 'src/core/lib/security/credentials/iam/iam_credentials.h', + 'src/core/lib/security/credentials/jwt/json_token.h', + 'src/core/lib/security/credentials/jwt/jwt_credentials.h', + 'src/core/lib/security/credentials/jwt/jwt_verifier.h', + 'src/core/lib/security/credentials/oauth2/oauth2_credentials.h', + 'src/core/lib/security/credentials/plugin/plugin_credentials.h', + 'src/core/lib/security/credentials/ssl/ssl_credentials.h', + 'src/core/lib/security/transport/auth_filters.h', + 'src/core/lib/security/transport/handshake.h', + 'src/core/lib/security/transport/secure_endpoint.h', + 'src/core/lib/security/transport/security_connector.h', + 'src/core/lib/security/util/b64.h', + 'src/core/lib/security/util/json_util.h', 'src/core/lib/tsi/fake_transport_security.h', 'src/core/lib/tsi/ssl_transport_security.h', 'src/core/lib/tsi/ssl_types.h', @@ -433,20 +442,28 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/transport/writing.c', 'src/core/ext/transport/chttp2/alpn/alpn.c', 'src/core/lib/http/httpcli_security_connector.c', - 'src/core/lib/security/b64.c', - 'src/core/lib/security/client_auth_filter.c', - 'src/core/lib/security/credentials.c', - 'src/core/lib/security/credentials_metadata.c', - 'src/core/lib/security/credentials_posix.c', - 'src/core/lib/security/credentials_win32.c', - 'src/core/lib/security/google_default_credentials.c', - 'src/core/lib/security/handshake.c', - 'src/core/lib/security/json_token.c', - 'src/core/lib/security/jwt_verifier.c', - 'src/core/lib/security/secure_endpoint.c', - 'src/core/lib/security/security_connector.c', - 'src/core/lib/security/security_context.c', - 'src/core/lib/security/server_auth_filter.c', + 'src/core/lib/security/context/security_context.c', + 'src/core/lib/security/credentials/composite/composite_credentials.c', + 'src/core/lib/security/credentials/credentials.c', + 'src/core/lib/security/credentials/credentials_metadata.c', + 'src/core/lib/security/credentials/fake/fake_credentials.c', + 'src/core/lib/security/credentials/google_default/credentials_posix.c', + 'src/core/lib/security/credentials/google_default/credentials_win32.c', + 'src/core/lib/security/credentials/google_default/google_default_credentials.c', + 'src/core/lib/security/credentials/iam/iam_credentials.c', + 'src/core/lib/security/credentials/jwt/json_token.c', + 'src/core/lib/security/credentials/jwt/jwt_credentials.c', + 'src/core/lib/security/credentials/jwt/jwt_verifier.c', + 'src/core/lib/security/credentials/oauth2/oauth2_credentials.c', + 'src/core/lib/security/credentials/plugin/plugin_credentials.c', + 'src/core/lib/security/credentials/ssl/ssl_credentials.c', + 'src/core/lib/security/transport/client_auth_filter.c', + 'src/core/lib/security/transport/handshake.c', + 'src/core/lib/security/transport/secure_endpoint.c', + 'src/core/lib/security/transport/security_connector.c', + 'src/core/lib/security/transport/server_auth_filter.c', + 'src/core/lib/security/util/b64.c', + 'src/core/lib/security/util/json_util.c', 'src/core/lib/surface/init_secure.c', 'src/core/lib/tsi/fake_transport_security.c', 'src/core/lib/tsi/ssl_transport_security.c', @@ -599,15 +616,24 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/transport/timeout_encoding.h', 'src/core/ext/transport/chttp2/transport/varint.h', 'src/core/ext/transport/chttp2/alpn/alpn.h', - 'src/core/lib/security/auth_filters.h', - 'src/core/lib/security/b64.h', - 'src/core/lib/security/credentials.h', - 'src/core/lib/security/handshake.h', - 'src/core/lib/security/json_token.h', - 'src/core/lib/security/jwt_verifier.h', - 'src/core/lib/security/secure_endpoint.h', - 'src/core/lib/security/security_connector.h', - 'src/core/lib/security/security_context.h', + 'src/core/lib/security/context/security_context.h', + 'src/core/lib/security/credentials/composite/composite_credentials.h', + 'src/core/lib/security/credentials/credentials.h', + 'src/core/lib/security/credentials/fake/fake_credentials.h', + 'src/core/lib/security/credentials/google_default/google_default_credentials.h', + 'src/core/lib/security/credentials/iam/iam_credentials.h', + 'src/core/lib/security/credentials/jwt/json_token.h', + 'src/core/lib/security/credentials/jwt/jwt_credentials.h', + 'src/core/lib/security/credentials/jwt/jwt_verifier.h', + 'src/core/lib/security/credentials/oauth2/oauth2_credentials.h', + 'src/core/lib/security/credentials/plugin/plugin_credentials.h', + 'src/core/lib/security/credentials/ssl/ssl_credentials.h', + 'src/core/lib/security/transport/auth_filters.h', + 'src/core/lib/security/transport/handshake.h', + 'src/core/lib/security/transport/secure_endpoint.h', + 'src/core/lib/security/transport/security_connector.h', + 'src/core/lib/security/util/b64.h', + 'src/core/lib/security/util/json_util.h', 'src/core/lib/tsi/fake_transport_security.h', 'src/core/lib/tsi/ssl_transport_security.h', 'src/core/lib/tsi/ssl_types.h', diff --git a/grpc.gemspec b/grpc.gemspec index e68cd81da7a..ffdce9dd240 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -265,15 +265,24 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/transport/chttp2/transport/timeout_encoding.h ) s.files += %w( src/core/ext/transport/chttp2/transport/varint.h ) s.files += %w( src/core/ext/transport/chttp2/alpn/alpn.h ) - s.files += %w( src/core/lib/security/auth_filters.h ) - s.files += %w( src/core/lib/security/b64.h ) - s.files += %w( src/core/lib/security/credentials.h ) - s.files += %w( src/core/lib/security/handshake.h ) - s.files += %w( src/core/lib/security/json_token.h ) - s.files += %w( src/core/lib/security/jwt_verifier.h ) - s.files += %w( src/core/lib/security/secure_endpoint.h ) - s.files += %w( src/core/lib/security/security_connector.h ) - s.files += %w( src/core/lib/security/security_context.h ) + s.files += %w( src/core/lib/security/context/security_context.h ) + s.files += %w( src/core/lib/security/credentials/composite/composite_credentials.h ) + s.files += %w( src/core/lib/security/credentials/credentials.h ) + s.files += %w( src/core/lib/security/credentials/fake/fake_credentials.h ) + s.files += %w( src/core/lib/security/credentials/google_default/google_default_credentials.h ) + s.files += %w( src/core/lib/security/credentials/iam/iam_credentials.h ) + s.files += %w( src/core/lib/security/credentials/jwt/json_token.h ) + s.files += %w( src/core/lib/security/credentials/jwt/jwt_credentials.h ) + s.files += %w( src/core/lib/security/credentials/jwt/jwt_verifier.h ) + s.files += %w( src/core/lib/security/credentials/oauth2/oauth2_credentials.h ) + s.files += %w( src/core/lib/security/credentials/plugin/plugin_credentials.h ) + s.files += %w( src/core/lib/security/credentials/ssl/ssl_credentials.h ) + s.files += %w( src/core/lib/security/transport/auth_filters.h ) + s.files += %w( src/core/lib/security/transport/handshake.h ) + s.files += %w( src/core/lib/security/transport/secure_endpoint.h ) + s.files += %w( src/core/lib/security/transport/security_connector.h ) + s.files += %w( src/core/lib/security/util/b64.h ) + s.files += %w( src/core/lib/security/util/json_util.h ) s.files += %w( src/core/lib/tsi/fake_transport_security.h ) s.files += %w( src/core/lib/tsi/ssl_transport_security.h ) s.files += %w( src/core/lib/tsi/ssl_types.h ) @@ -413,20 +422,28 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/transport/chttp2/transport/writing.c ) s.files += %w( src/core/ext/transport/chttp2/alpn/alpn.c ) s.files += %w( src/core/lib/http/httpcli_security_connector.c ) - s.files += %w( src/core/lib/security/b64.c ) - s.files += %w( src/core/lib/security/client_auth_filter.c ) - s.files += %w( src/core/lib/security/credentials.c ) - s.files += %w( src/core/lib/security/credentials_metadata.c ) - s.files += %w( src/core/lib/security/credentials_posix.c ) - s.files += %w( src/core/lib/security/credentials_win32.c ) - s.files += %w( src/core/lib/security/google_default_credentials.c ) - s.files += %w( src/core/lib/security/handshake.c ) - s.files += %w( src/core/lib/security/json_token.c ) - s.files += %w( src/core/lib/security/jwt_verifier.c ) - s.files += %w( src/core/lib/security/secure_endpoint.c ) - s.files += %w( src/core/lib/security/security_connector.c ) - s.files += %w( src/core/lib/security/security_context.c ) - s.files += %w( src/core/lib/security/server_auth_filter.c ) + s.files += %w( src/core/lib/security/context/security_context.c ) + s.files += %w( src/core/lib/security/credentials/composite/composite_credentials.c ) + s.files += %w( src/core/lib/security/credentials/credentials.c ) + s.files += %w( src/core/lib/security/credentials/credentials_metadata.c ) + s.files += %w( src/core/lib/security/credentials/fake/fake_credentials.c ) + s.files += %w( src/core/lib/security/credentials/google_default/credentials_posix.c ) + s.files += %w( src/core/lib/security/credentials/google_default/credentials_win32.c ) + s.files += %w( src/core/lib/security/credentials/google_default/google_default_credentials.c ) + s.files += %w( src/core/lib/security/credentials/iam/iam_credentials.c ) + s.files += %w( src/core/lib/security/credentials/jwt/json_token.c ) + s.files += %w( src/core/lib/security/credentials/jwt/jwt_credentials.c ) + s.files += %w( src/core/lib/security/credentials/jwt/jwt_verifier.c ) + s.files += %w( src/core/lib/security/credentials/oauth2/oauth2_credentials.c ) + s.files += %w( src/core/lib/security/credentials/plugin/plugin_credentials.c ) + s.files += %w( src/core/lib/security/credentials/ssl/ssl_credentials.c ) + s.files += %w( src/core/lib/security/transport/client_auth_filter.c ) + s.files += %w( src/core/lib/security/transport/handshake.c ) + s.files += %w( src/core/lib/security/transport/secure_endpoint.c ) + s.files += %w( src/core/lib/security/transport/security_connector.c ) + s.files += %w( src/core/lib/security/transport/server_auth_filter.c ) + s.files += %w( src/core/lib/security/util/b64.c ) + s.files += %w( src/core/lib/security/util/json_util.c ) s.files += %w( src/core/lib/surface/init_secure.c ) s.files += %w( src/core/lib/tsi/fake_transport_security.c ) s.files += %w( src/core/lib/tsi/ssl_transport_security.c ) diff --git a/package.xml b/package.xml index ffb1c56ed64..06c00bdb030 100644 --- a/package.xml +++ b/package.xml @@ -272,15 +272,24 @@ - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -420,20 +429,28 @@ - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 58af6f995a4..a262306085c 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -45,9 +45,9 @@ #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/tcp_client.h" -#include "src/core/lib/security/auth_filters.h" -#include "src/core/lib/security/credentials.h" -#include "src/core/lib/security/security_context.h" +#include "src/core/lib/security/context/security_context.h" +#include "src/core/lib/security/credentials/credentials.h" +#include "src/core/lib/security/transport/auth_filters.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/channel.h" #include "src/core/lib/tsi/transport_security_interface.h" diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 698b2bef610..2c9f013c239 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -45,10 +45,10 @@ #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/iomgr/tcp_server.h" -#include "src/core/lib/security/auth_filters.h" -#include "src/core/lib/security/credentials.h" -#include "src/core/lib/security/security_connector.h" -#include "src/core/lib/security/security_context.h" +#include "src/core/lib/security/context/security_context.h" +#include "src/core/lib/security/credentials/credentials.h" +#include "src/core/lib/security/transport/auth_filters.h" +#include "src/core/lib/security/transport/security_connector.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/server.h" diff --git a/src/core/lib/http/httpcli_security_connector.c b/src/core/lib/http/httpcli_security_connector.c index ea4bff30d4b..55909289684 100644 --- a/src/core/lib/http/httpcli_security_connector.c +++ b/src/core/lib/http/httpcli_security_connector.c @@ -38,7 +38,7 @@ #include #include #include -#include "src/core/lib/security/handshake.h" +#include "src/core/lib/security/transport/handshake.h" #include "src/core/lib/support/string.h" #include "src/core/lib/tsi/ssl_transport_security.h" diff --git a/src/core/lib/security/security_context.c b/src/core/lib/security/context/security_context.c similarity index 99% rename from src/core/lib/security/security_context.c rename to src/core/lib/security/context/security_context.c index 343e0b5b8b1..127b13ee503 100644 --- a/src/core/lib/security/security_context.c +++ b/src/core/lib/security/context/security_context.c @@ -33,7 +33,7 @@ #include -#include "src/core/lib/security/security_context.h" +#include "src/core/lib/security/context/security_context.h" #include "src/core/lib/support/string.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/call.h" diff --git a/src/core/lib/security/security_context.h b/src/core/lib/security/context/security_context.h similarity index 94% rename from src/core/lib/security/security_context.h rename to src/core/lib/security/context/security_context.h index 81161ec47de..ef0c06b1fb6 100644 --- a/src/core/lib/security/security_context.h +++ b/src/core/lib/security/context/security_context.h @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_CORE_LIB_SECURITY_SECURITY_CONTEXT_H -#define GRPC_CORE_LIB_SECURITY_SECURITY_CONTEXT_H +#ifndef GRPC_CORE_LIB_SECURITY_CONTEXT_SECURITY_CONTEXT_H +#define GRPC_CORE_LIB_SECURITY_CONTEXT_SECURITY_CONTEXT_H #include "src/core/lib/iomgr/pollset.h" -#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/credentials/credentials.h" /* --- grpc_auth_context --- @@ -111,4 +111,4 @@ grpc_auth_context *grpc_auth_context_from_arg(const grpc_arg *arg); grpc_auth_context *grpc_find_auth_context_in_args( const grpc_channel_args *args); -#endif /* GRPC_CORE_LIB_SECURITY_SECURITY_CONTEXT_H */ +#endif /* GRPC_CORE_LIB_SECURITY_CONTEXT_SECURITY_CONTEXT_H */ diff --git a/src/core/lib/security/credentials.c b/src/core/lib/security/credentials.c deleted file mode 100644 index fd5ad3589b7..00000000000 --- a/src/core/lib/security/credentials.c +++ /dev/null @@ -1,1296 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "src/core/lib/security/credentials.h" - -#include -#include - -#include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/channel/http_client_filter.h" -#include "src/core/lib/http/httpcli.h" -#include "src/core/lib/http/parser.h" -#include "src/core/lib/iomgr/executor.h" -#include "src/core/lib/json/json.h" -#include "src/core/lib/support/string.h" -#include "src/core/lib/surface/api_trace.h" - -#include -#include -#include -#include -#include - -/* -- Common. -- */ - -struct grpc_credentials_metadata_request { - grpc_call_credentials *creds; - grpc_credentials_metadata_cb cb; - void *user_data; -}; - -static grpc_credentials_metadata_request * -grpc_credentials_metadata_request_create(grpc_call_credentials *creds, - grpc_credentials_metadata_cb cb, - void *user_data) { - grpc_credentials_metadata_request *r = - gpr_malloc(sizeof(grpc_credentials_metadata_request)); - r->creds = grpc_call_credentials_ref(creds); - r->cb = cb; - r->user_data = user_data; - return r; -} - -static void grpc_credentials_metadata_request_destroy( - grpc_credentials_metadata_request *r) { - grpc_call_credentials_unref(r->creds); - gpr_free(r); -} - -grpc_channel_credentials *grpc_channel_credentials_ref( - grpc_channel_credentials *creds) { - if (creds == NULL) return NULL; - gpr_ref(&creds->refcount); - return creds; -} - -void grpc_channel_credentials_unref(grpc_channel_credentials *creds) { - if (creds == NULL) return; - if (gpr_unref(&creds->refcount)) { - if (creds->vtable->destruct != NULL) creds->vtable->destruct(creds); - gpr_free(creds); - } -} - -void grpc_channel_credentials_release(grpc_channel_credentials *creds) { - GRPC_API_TRACE("grpc_channel_credentials_release(creds=%p)", 1, (creds)); - grpc_channel_credentials_unref(creds); -} - -grpc_call_credentials *grpc_call_credentials_ref(grpc_call_credentials *creds) { - if (creds == NULL) return NULL; - gpr_ref(&creds->refcount); - return creds; -} - -void grpc_call_credentials_unref(grpc_call_credentials *creds) { - if (creds == NULL) return; - if (gpr_unref(&creds->refcount)) { - if (creds->vtable->destruct != NULL) creds->vtable->destruct(creds); - gpr_free(creds); - } -} - -void grpc_call_credentials_release(grpc_call_credentials *creds) { - GRPC_API_TRACE("grpc_call_credentials_release(creds=%p)", 1, (creds)); - grpc_call_credentials_unref(creds); -} - -void grpc_call_credentials_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset *pollset, grpc_auth_metadata_context context, - grpc_credentials_metadata_cb cb, void *user_data) { - if (creds == NULL || creds->vtable->get_request_metadata == NULL) { - if (cb != NULL) { - cb(exec_ctx, user_data, NULL, 0, GRPC_CREDENTIALS_OK); - } - return; - } - creds->vtable->get_request_metadata(exec_ctx, creds, pollset, context, cb, - user_data); -} - -grpc_security_status grpc_channel_credentials_create_security_connector( - grpc_channel_credentials *channel_creds, const char *target, - const grpc_channel_args *args, grpc_channel_security_connector **sc, - grpc_channel_args **new_args) { - *new_args = NULL; - if (channel_creds == NULL) { - return GRPC_SECURITY_ERROR; - } - GPR_ASSERT(channel_creds->vtable->create_security_connector != NULL); - return channel_creds->vtable->create_security_connector( - channel_creds, NULL, target, args, sc, new_args); -} - -grpc_server_credentials *grpc_server_credentials_ref( - grpc_server_credentials *creds) { - if (creds == NULL) return NULL; - gpr_ref(&creds->refcount); - return creds; -} - -void grpc_server_credentials_unref(grpc_server_credentials *creds) { - if (creds == NULL) return; - if (gpr_unref(&creds->refcount)) { - if (creds->vtable->destruct != NULL) creds->vtable->destruct(creds); - if (creds->processor.destroy != NULL && creds->processor.state != NULL) { - creds->processor.destroy(creds->processor.state); - } - gpr_free(creds); - } -} - -void grpc_server_credentials_release(grpc_server_credentials *creds) { - GRPC_API_TRACE("grpc_server_credentials_release(creds=%p)", 1, (creds)); - grpc_server_credentials_unref(creds); -} - -grpc_security_status grpc_server_credentials_create_security_connector( - grpc_server_credentials *creds, grpc_server_security_connector **sc) { - if (creds == NULL || creds->vtable->create_security_connector == NULL) { - gpr_log(GPR_ERROR, "Server credentials cannot create security context."); - return GRPC_SECURITY_ERROR; - } - return creds->vtable->create_security_connector(creds, sc); -} - -void grpc_server_credentials_set_auth_metadata_processor( - grpc_server_credentials *creds, grpc_auth_metadata_processor processor) { - GRPC_API_TRACE( - "grpc_server_credentials_set_auth_metadata_processor(" - "creds=%p, " - "processor=grpc_auth_metadata_processor { process: %p, state: %p })", - 3, (creds, (void *)(intptr_t)processor.process, processor.state)); - if (creds == NULL) return; - if (creds->processor.destroy != NULL && creds->processor.state != NULL) { - creds->processor.destroy(creds->processor.state); - } - creds->processor = processor; -} - -static void server_credentials_pointer_arg_destroy(void *p) { - grpc_server_credentials_unref(p); -} - -static void *server_credentials_pointer_arg_copy(void *p) { - return grpc_server_credentials_ref(p); -} - -static int server_credentials_pointer_cmp(void *a, void *b) { - return GPR_ICMP(a, b); -} - -static const grpc_arg_pointer_vtable cred_ptr_vtable = { - server_credentials_pointer_arg_copy, server_credentials_pointer_arg_destroy, - server_credentials_pointer_cmp}; - -grpc_arg grpc_server_credentials_to_arg(grpc_server_credentials *p) { - grpc_arg arg; - memset(&arg, 0, sizeof(grpc_arg)); - arg.type = GRPC_ARG_POINTER; - arg.key = GRPC_SERVER_CREDENTIALS_ARG; - arg.value.pointer.p = p; - arg.value.pointer.vtable = &cred_ptr_vtable; - return arg; -} - -grpc_server_credentials *grpc_server_credentials_from_arg(const grpc_arg *arg) { - if (strcmp(arg->key, GRPC_SERVER_CREDENTIALS_ARG) != 0) return NULL; - if (arg->type != GRPC_ARG_POINTER) { - gpr_log(GPR_ERROR, "Invalid type %d for arg %s", arg->type, - GRPC_SERVER_CREDENTIALS_ARG); - return NULL; - } - return arg->value.pointer.p; -} - -grpc_server_credentials *grpc_find_server_credentials_in_args( - const grpc_channel_args *args) { - size_t i; - if (args == NULL) return NULL; - for (i = 0; i < args->num_args; i++) { - grpc_server_credentials *p = - grpc_server_credentials_from_arg(&args->args[i]); - if (p != NULL) return p; - } - return NULL; -} - -/* -- Ssl credentials. -- */ - -static void ssl_destruct(grpc_channel_credentials *creds) { - grpc_ssl_credentials *c = (grpc_ssl_credentials *)creds; - if (c->config.pem_root_certs != NULL) gpr_free(c->config.pem_root_certs); - if (c->config.pem_private_key != NULL) gpr_free(c->config.pem_private_key); - if (c->config.pem_cert_chain != NULL) gpr_free(c->config.pem_cert_chain); -} - -static void ssl_server_destruct(grpc_server_credentials *creds) { - grpc_ssl_server_credentials *c = (grpc_ssl_server_credentials *)creds; - size_t i; - for (i = 0; i < c->config.num_key_cert_pairs; i++) { - if (c->config.pem_private_keys[i] != NULL) { - gpr_free(c->config.pem_private_keys[i]); - } - if (c->config.pem_cert_chains[i] != NULL) { - gpr_free(c->config.pem_cert_chains[i]); - } - } - if (c->config.pem_private_keys != NULL) gpr_free(c->config.pem_private_keys); - if (c->config.pem_private_keys_sizes != NULL) { - gpr_free(c->config.pem_private_keys_sizes); - } - if (c->config.pem_cert_chains != NULL) gpr_free(c->config.pem_cert_chains); - if (c->config.pem_cert_chains_sizes != NULL) { - gpr_free(c->config.pem_cert_chains_sizes); - } - if (c->config.pem_root_certs != NULL) gpr_free(c->config.pem_root_certs); -} - -static grpc_security_status ssl_create_security_connector( - grpc_channel_credentials *creds, grpc_call_credentials *call_creds, - const char *target, const grpc_channel_args *args, - grpc_channel_security_connector **sc, grpc_channel_args **new_args) { - grpc_ssl_credentials *c = (grpc_ssl_credentials *)creds; - grpc_security_status status = GRPC_SECURITY_OK; - size_t i = 0; - const char *overridden_target_name = NULL; - grpc_arg new_arg; - - for (i = 0; args && i < args->num_args; i++) { - grpc_arg *arg = &args->args[i]; - if (strcmp(arg->key, GRPC_SSL_TARGET_NAME_OVERRIDE_ARG) == 0 && - arg->type == GRPC_ARG_STRING) { - overridden_target_name = arg->value.string; - break; - } - } - status = grpc_ssl_channel_security_connector_create( - call_creds, &c->config, target, overridden_target_name, sc); - if (status != GRPC_SECURITY_OK) { - return status; - } - new_arg.type = GRPC_ARG_STRING; - new_arg.key = GRPC_ARG_HTTP2_SCHEME; - new_arg.value.string = "https"; - *new_args = grpc_channel_args_copy_and_add(args, &new_arg, 1); - return status; -} - -static grpc_security_status ssl_server_create_security_connector( - grpc_server_credentials *creds, grpc_server_security_connector **sc) { - grpc_ssl_server_credentials *c = (grpc_ssl_server_credentials *)creds; - return grpc_ssl_server_security_connector_create(&c->config, sc); -} - -static grpc_channel_credentials_vtable ssl_vtable = { - ssl_destruct, ssl_create_security_connector}; - -static grpc_server_credentials_vtable ssl_server_vtable = { - ssl_server_destruct, ssl_server_create_security_connector}; - -static void ssl_copy_key_material(const char *input, unsigned char **output, - size_t *output_size) { - *output_size = strlen(input); - *output = gpr_malloc(*output_size); - memcpy(*output, input, *output_size); -} - -static void ssl_build_config(const char *pem_root_certs, - grpc_ssl_pem_key_cert_pair *pem_key_cert_pair, - grpc_ssl_config *config) { - if (pem_root_certs != NULL) { - ssl_copy_key_material(pem_root_certs, &config->pem_root_certs, - &config->pem_root_certs_size); - } - if (pem_key_cert_pair != NULL) { - GPR_ASSERT(pem_key_cert_pair->private_key != NULL); - GPR_ASSERT(pem_key_cert_pair->cert_chain != NULL); - ssl_copy_key_material(pem_key_cert_pair->private_key, - &config->pem_private_key, - &config->pem_private_key_size); - ssl_copy_key_material(pem_key_cert_pair->cert_chain, - &config->pem_cert_chain, - &config->pem_cert_chain_size); - } -} - -static void ssl_build_server_config( - const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, - size_t num_key_cert_pairs, - grpc_ssl_client_certificate_request_type client_certificate_request, - grpc_ssl_server_config *config) { - size_t i; - config->client_certificate_request = client_certificate_request; - if (pem_root_certs != NULL) { - ssl_copy_key_material(pem_root_certs, &config->pem_root_certs, - &config->pem_root_certs_size); - } - if (num_key_cert_pairs > 0) { - GPR_ASSERT(pem_key_cert_pairs != NULL); - config->pem_private_keys = - gpr_malloc(num_key_cert_pairs * sizeof(unsigned char *)); - config->pem_cert_chains = - gpr_malloc(num_key_cert_pairs * sizeof(unsigned char *)); - config->pem_private_keys_sizes = - gpr_malloc(num_key_cert_pairs * sizeof(size_t)); - config->pem_cert_chains_sizes = - gpr_malloc(num_key_cert_pairs * sizeof(size_t)); - } - config->num_key_cert_pairs = num_key_cert_pairs; - for (i = 0; i < num_key_cert_pairs; i++) { - GPR_ASSERT(pem_key_cert_pairs[i].private_key != NULL); - GPR_ASSERT(pem_key_cert_pairs[i].cert_chain != NULL); - ssl_copy_key_material(pem_key_cert_pairs[i].private_key, - &config->pem_private_keys[i], - &config->pem_private_keys_sizes[i]); - ssl_copy_key_material(pem_key_cert_pairs[i].cert_chain, - &config->pem_cert_chains[i], - &config->pem_cert_chains_sizes[i]); - } -} - -grpc_channel_credentials *grpc_ssl_credentials_create( - const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pair, - void *reserved) { - grpc_ssl_credentials *c = gpr_malloc(sizeof(grpc_ssl_credentials)); - GRPC_API_TRACE( - "grpc_ssl_credentials_create(pem_root_certs=%s, " - "pem_key_cert_pair=%p, " - "reserved=%p)", - 3, (pem_root_certs, pem_key_cert_pair, reserved)); - GPR_ASSERT(reserved == NULL); - memset(c, 0, sizeof(grpc_ssl_credentials)); - c->base.type = GRPC_CHANNEL_CREDENTIALS_TYPE_SSL; - c->base.vtable = &ssl_vtable; - gpr_ref_init(&c->base.refcount, 1); - ssl_build_config(pem_root_certs, pem_key_cert_pair, &c->config); - return &c->base; -} - -grpc_server_credentials *grpc_ssl_server_credentials_create( - const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, - size_t num_key_cert_pairs, int force_client_auth, void *reserved) { - return grpc_ssl_server_credentials_create_ex( - pem_root_certs, pem_key_cert_pairs, num_key_cert_pairs, - force_client_auth - ? GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY - : GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE, - reserved); -} - -grpc_server_credentials *grpc_ssl_server_credentials_create_ex( - const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, - size_t num_key_cert_pairs, - grpc_ssl_client_certificate_request_type client_certificate_request, - void *reserved) { - grpc_ssl_server_credentials *c = - gpr_malloc(sizeof(grpc_ssl_server_credentials)); - GRPC_API_TRACE( - "grpc_ssl_server_credentials_create_ex(" - "pem_root_certs=%s, pem_key_cert_pairs=%p, num_key_cert_pairs=%lu, " - "client_certificate_request=%d, reserved=%p)", - 5, (pem_root_certs, pem_key_cert_pairs, (unsigned long)num_key_cert_pairs, - client_certificate_request, reserved)); - GPR_ASSERT(reserved == NULL); - memset(c, 0, sizeof(grpc_ssl_server_credentials)); - c->base.type = GRPC_CHANNEL_CREDENTIALS_TYPE_SSL; - gpr_ref_init(&c->base.refcount, 1); - c->base.vtable = &ssl_server_vtable; - ssl_build_server_config(pem_root_certs, pem_key_cert_pairs, - num_key_cert_pairs, client_certificate_request, - &c->config); - return &c->base; -} - -/* -- Jwt credentials -- */ - -static void jwt_reset_cache(grpc_service_account_jwt_access_credentials *c) { - if (c->cached.jwt_md != NULL) { - grpc_credentials_md_store_unref(c->cached.jwt_md); - c->cached.jwt_md = NULL; - } - if (c->cached.service_url != NULL) { - gpr_free(c->cached.service_url); - c->cached.service_url = NULL; - } - c->cached.jwt_expiration = gpr_inf_past(GPR_CLOCK_REALTIME); -} - -static void jwt_destruct(grpc_call_credentials *creds) { - grpc_service_account_jwt_access_credentials *c = - (grpc_service_account_jwt_access_credentials *)creds; - grpc_auth_json_key_destruct(&c->key); - jwt_reset_cache(c); - gpr_mu_destroy(&c->cache_mu); -} - -static void jwt_get_request_metadata(grpc_exec_ctx *exec_ctx, - grpc_call_credentials *creds, - grpc_pollset *pollset, - grpc_auth_metadata_context context, - grpc_credentials_metadata_cb cb, - void *user_data) { - grpc_service_account_jwt_access_credentials *c = - (grpc_service_account_jwt_access_credentials *)creds; - gpr_timespec refresh_threshold = gpr_time_from_seconds( - GRPC_SECURE_TOKEN_REFRESH_THRESHOLD_SECS, GPR_TIMESPAN); - - /* See if we can return a cached jwt. */ - grpc_credentials_md_store *jwt_md = NULL; - { - gpr_mu_lock(&c->cache_mu); - if (c->cached.service_url != NULL && - strcmp(c->cached.service_url, context.service_url) == 0 && - c->cached.jwt_md != NULL && - (gpr_time_cmp(gpr_time_sub(c->cached.jwt_expiration, - gpr_now(GPR_CLOCK_REALTIME)), - refresh_threshold) > 0)) { - jwt_md = grpc_credentials_md_store_ref(c->cached.jwt_md); - } - gpr_mu_unlock(&c->cache_mu); - } - - if (jwt_md == NULL) { - char *jwt = NULL; - /* Generate a new jwt. */ - gpr_mu_lock(&c->cache_mu); - jwt_reset_cache(c); - jwt = grpc_jwt_encode_and_sign(&c->key, context.service_url, - c->jwt_lifetime, NULL); - if (jwt != NULL) { - char *md_value; - gpr_asprintf(&md_value, "Bearer %s", jwt); - gpr_free(jwt); - c->cached.jwt_expiration = - gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), c->jwt_lifetime); - c->cached.service_url = gpr_strdup(context.service_url); - c->cached.jwt_md = grpc_credentials_md_store_create(1); - grpc_credentials_md_store_add_cstrings( - c->cached.jwt_md, GRPC_AUTHORIZATION_METADATA_KEY, md_value); - gpr_free(md_value); - jwt_md = grpc_credentials_md_store_ref(c->cached.jwt_md); - } - gpr_mu_unlock(&c->cache_mu); - } - - if (jwt_md != NULL) { - cb(exec_ctx, user_data, jwt_md->entries, jwt_md->num_entries, - GRPC_CREDENTIALS_OK); - grpc_credentials_md_store_unref(jwt_md); - } else { - cb(exec_ctx, user_data, NULL, 0, GRPC_CREDENTIALS_ERROR); - } -} - -static grpc_call_credentials_vtable jwt_vtable = {jwt_destruct, - jwt_get_request_metadata}; - -grpc_call_credentials * -grpc_service_account_jwt_access_credentials_create_from_auth_json_key( - grpc_auth_json_key key, gpr_timespec token_lifetime) { - grpc_service_account_jwt_access_credentials *c; - if (!grpc_auth_json_key_is_valid(&key)) { - gpr_log(GPR_ERROR, "Invalid input for jwt credentials creation"); - return NULL; - } - c = gpr_malloc(sizeof(grpc_service_account_jwt_access_credentials)); - memset(c, 0, sizeof(grpc_service_account_jwt_access_credentials)); - c->base.type = GRPC_CALL_CREDENTIALS_TYPE_JWT; - gpr_ref_init(&c->base.refcount, 1); - c->base.vtable = &jwt_vtable; - c->key = key; - c->jwt_lifetime = token_lifetime; - gpr_mu_init(&c->cache_mu); - jwt_reset_cache(c); - return &c->base; -} - -grpc_call_credentials *grpc_service_account_jwt_access_credentials_create( - const char *json_key, gpr_timespec token_lifetime, void *reserved) { - GRPC_API_TRACE( - "grpc_service_account_jwt_access_credentials_create(" - "json_key=%s, " - "token_lifetime=" - "gpr_timespec { tv_sec: %lld, tv_nsec: %d, clock_type: %d }, " - "reserved=%p)", - 5, - (json_key, (long long)token_lifetime.tv_sec, (int)token_lifetime.tv_nsec, - (int)token_lifetime.clock_type, reserved)); - GPR_ASSERT(reserved == NULL); - return grpc_service_account_jwt_access_credentials_create_from_auth_json_key( - grpc_auth_json_key_create_from_string(json_key), token_lifetime); -} - -/* -- Oauth2TokenFetcher credentials -- */ - -static void oauth2_token_fetcher_destruct(grpc_call_credentials *creds) { - grpc_oauth2_token_fetcher_credentials *c = - (grpc_oauth2_token_fetcher_credentials *)creds; - grpc_credentials_md_store_unref(c->access_token_md); - gpr_mu_destroy(&c->mu); - grpc_httpcli_context_destroy(&c->httpcli_context); -} - -grpc_credentials_status -grpc_oauth2_token_fetcher_credentials_parse_server_response( - const grpc_http_response *response, grpc_credentials_md_store **token_md, - gpr_timespec *token_lifetime) { - char *null_terminated_body = NULL; - char *new_access_token = NULL; - grpc_credentials_status status = GRPC_CREDENTIALS_OK; - grpc_json *json = NULL; - - if (response == NULL) { - gpr_log(GPR_ERROR, "Received NULL response."); - status = GRPC_CREDENTIALS_ERROR; - goto end; - } - - if (response->body_length > 0) { - null_terminated_body = gpr_malloc(response->body_length + 1); - null_terminated_body[response->body_length] = '\0'; - memcpy(null_terminated_body, response->body, response->body_length); - } - - if (response->status != 200) { - gpr_log(GPR_ERROR, "Call to http server ended with error %d [%s].", - response->status, - null_terminated_body != NULL ? null_terminated_body : ""); - status = GRPC_CREDENTIALS_ERROR; - goto end; - } else { - grpc_json *access_token = NULL; - grpc_json *token_type = NULL; - grpc_json *expires_in = NULL; - grpc_json *ptr; - json = grpc_json_parse_string(null_terminated_body); - if (json == NULL) { - gpr_log(GPR_ERROR, "Could not parse JSON from %s", null_terminated_body); - status = GRPC_CREDENTIALS_ERROR; - goto end; - } - if (json->type != GRPC_JSON_OBJECT) { - gpr_log(GPR_ERROR, "Response should be a JSON object"); - status = GRPC_CREDENTIALS_ERROR; - goto end; - } - for (ptr = json->child; ptr; ptr = ptr->next) { - if (strcmp(ptr->key, "access_token") == 0) { - access_token = ptr; - } else if (strcmp(ptr->key, "token_type") == 0) { - token_type = ptr; - } else if (strcmp(ptr->key, "expires_in") == 0) { - expires_in = ptr; - } - } - if (access_token == NULL || access_token->type != GRPC_JSON_STRING) { - gpr_log(GPR_ERROR, "Missing or invalid access_token in JSON."); - status = GRPC_CREDENTIALS_ERROR; - goto end; - } - if (token_type == NULL || token_type->type != GRPC_JSON_STRING) { - gpr_log(GPR_ERROR, "Missing or invalid token_type in JSON."); - status = GRPC_CREDENTIALS_ERROR; - goto end; - } - if (expires_in == NULL || expires_in->type != GRPC_JSON_NUMBER) { - gpr_log(GPR_ERROR, "Missing or invalid expires_in in JSON."); - status = GRPC_CREDENTIALS_ERROR; - goto end; - } - gpr_asprintf(&new_access_token, "%s %s", token_type->value, - access_token->value); - token_lifetime->tv_sec = strtol(expires_in->value, NULL, 10); - token_lifetime->tv_nsec = 0; - token_lifetime->clock_type = GPR_TIMESPAN; - if (*token_md != NULL) grpc_credentials_md_store_unref(*token_md); - *token_md = grpc_credentials_md_store_create(1); - grpc_credentials_md_store_add_cstrings( - *token_md, GRPC_AUTHORIZATION_METADATA_KEY, new_access_token); - status = GRPC_CREDENTIALS_OK; - } - -end: - if (status != GRPC_CREDENTIALS_OK && (*token_md != NULL)) { - grpc_credentials_md_store_unref(*token_md); - *token_md = NULL; - } - if (null_terminated_body != NULL) gpr_free(null_terminated_body); - if (new_access_token != NULL) gpr_free(new_access_token); - if (json != NULL) grpc_json_destroy(json); - return status; -} - -static void on_oauth2_token_fetcher_http_response( - grpc_exec_ctx *exec_ctx, void *user_data, - const grpc_http_response *response) { - grpc_credentials_metadata_request *r = - (grpc_credentials_metadata_request *)user_data; - grpc_oauth2_token_fetcher_credentials *c = - (grpc_oauth2_token_fetcher_credentials *)r->creds; - gpr_timespec token_lifetime; - grpc_credentials_status status; - - gpr_mu_lock(&c->mu); - status = grpc_oauth2_token_fetcher_credentials_parse_server_response( - response, &c->access_token_md, &token_lifetime); - if (status == GRPC_CREDENTIALS_OK) { - c->token_expiration = - gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), token_lifetime); - r->cb(exec_ctx, r->user_data, c->access_token_md->entries, - c->access_token_md->num_entries, status); - } else { - c->token_expiration = gpr_inf_past(GPR_CLOCK_REALTIME); - r->cb(exec_ctx, r->user_data, NULL, 0, status); - } - gpr_mu_unlock(&c->mu); - grpc_credentials_metadata_request_destroy(r); -} - -static void oauth2_token_fetcher_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset *pollset, grpc_auth_metadata_context context, - grpc_credentials_metadata_cb cb, void *user_data) { - grpc_oauth2_token_fetcher_credentials *c = - (grpc_oauth2_token_fetcher_credentials *)creds; - gpr_timespec refresh_threshold = gpr_time_from_seconds( - GRPC_SECURE_TOKEN_REFRESH_THRESHOLD_SECS, GPR_TIMESPAN); - grpc_credentials_md_store *cached_access_token_md = NULL; - { - gpr_mu_lock(&c->mu); - if (c->access_token_md != NULL && - (gpr_time_cmp( - gpr_time_sub(c->token_expiration, gpr_now(GPR_CLOCK_REALTIME)), - refresh_threshold) > 0)) { - cached_access_token_md = - grpc_credentials_md_store_ref(c->access_token_md); - } - gpr_mu_unlock(&c->mu); - } - if (cached_access_token_md != NULL) { - cb(exec_ctx, user_data, cached_access_token_md->entries, - cached_access_token_md->num_entries, GRPC_CREDENTIALS_OK); - grpc_credentials_md_store_unref(cached_access_token_md); - } else { - c->fetch_func( - exec_ctx, - grpc_credentials_metadata_request_create(creds, cb, user_data), - &c->httpcli_context, pollset, on_oauth2_token_fetcher_http_response, - gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), refresh_threshold)); - } -} - -static void init_oauth2_token_fetcher(grpc_oauth2_token_fetcher_credentials *c, - grpc_fetch_oauth2_func fetch_func) { - memset(c, 0, sizeof(grpc_oauth2_token_fetcher_credentials)); - c->base.type = GRPC_CALL_CREDENTIALS_TYPE_OAUTH2; - gpr_ref_init(&c->base.refcount, 1); - gpr_mu_init(&c->mu); - c->token_expiration = gpr_inf_past(GPR_CLOCK_REALTIME); - c->fetch_func = fetch_func; - grpc_httpcli_context_init(&c->httpcli_context); -} - -/* -- GoogleComputeEngine credentials. -- */ - -static grpc_call_credentials_vtable compute_engine_vtable = { - oauth2_token_fetcher_destruct, oauth2_token_fetcher_get_request_metadata}; - -static void compute_engine_fetch_oauth2( - grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *metadata_req, - grpc_httpcli_context *httpcli_context, grpc_pollset *pollset, - grpc_httpcli_response_cb response_cb, gpr_timespec deadline) { - grpc_http_header header = {"Metadata-Flavor", "Google"}; - grpc_httpcli_request request; - memset(&request, 0, sizeof(grpc_httpcli_request)); - request.host = GRPC_COMPUTE_ENGINE_METADATA_HOST; - request.http.path = GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH; - request.http.hdr_count = 1; - request.http.hdrs = &header; - grpc_httpcli_get(exec_ctx, httpcli_context, pollset, &request, deadline, - response_cb, metadata_req); -} - -grpc_call_credentials *grpc_google_compute_engine_credentials_create( - void *reserved) { - grpc_oauth2_token_fetcher_credentials *c = - gpr_malloc(sizeof(grpc_oauth2_token_fetcher_credentials)); - GRPC_API_TRACE("grpc_compute_engine_credentials_create(reserved=%p)", 1, - (reserved)); - GPR_ASSERT(reserved == NULL); - init_oauth2_token_fetcher(c, compute_engine_fetch_oauth2); - c->base.vtable = &compute_engine_vtable; - return &c->base; -} - -/* -- GoogleRefreshToken credentials. -- */ - -static void refresh_token_destruct(grpc_call_credentials *creds) { - grpc_google_refresh_token_credentials *c = - (grpc_google_refresh_token_credentials *)creds; - grpc_auth_refresh_token_destruct(&c->refresh_token); - oauth2_token_fetcher_destruct(&c->base.base); -} - -static grpc_call_credentials_vtable refresh_token_vtable = { - refresh_token_destruct, oauth2_token_fetcher_get_request_metadata}; - -static void refresh_token_fetch_oauth2( - grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *metadata_req, - grpc_httpcli_context *httpcli_context, grpc_pollset *pollset, - grpc_httpcli_response_cb response_cb, gpr_timespec deadline) { - grpc_google_refresh_token_credentials *c = - (grpc_google_refresh_token_credentials *)metadata_req->creds; - grpc_http_header header = {"Content-Type", - "application/x-www-form-urlencoded"}; - grpc_httpcli_request request; - char *body = NULL; - gpr_asprintf(&body, GRPC_REFRESH_TOKEN_POST_BODY_FORMAT_STRING, - c->refresh_token.client_id, c->refresh_token.client_secret, - c->refresh_token.refresh_token); - memset(&request, 0, sizeof(grpc_httpcli_request)); - request.host = GRPC_GOOGLE_OAUTH2_SERVICE_HOST; - request.http.path = GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH; - request.http.hdr_count = 1; - request.http.hdrs = &header; - request.handshaker = &grpc_httpcli_ssl; - grpc_httpcli_post(exec_ctx, httpcli_context, pollset, &request, body, - strlen(body), deadline, response_cb, metadata_req); - gpr_free(body); -} - -grpc_call_credentials * -grpc_refresh_token_credentials_create_from_auth_refresh_token( - grpc_auth_refresh_token refresh_token) { - grpc_google_refresh_token_credentials *c; - if (!grpc_auth_refresh_token_is_valid(&refresh_token)) { - gpr_log(GPR_ERROR, "Invalid input for refresh token credentials creation"); - return NULL; - } - c = gpr_malloc(sizeof(grpc_google_refresh_token_credentials)); - memset(c, 0, sizeof(grpc_google_refresh_token_credentials)); - init_oauth2_token_fetcher(&c->base, refresh_token_fetch_oauth2); - c->base.base.vtable = &refresh_token_vtable; - c->refresh_token = refresh_token; - return &c->base.base; -} - -grpc_call_credentials *grpc_google_refresh_token_credentials_create( - const char *json_refresh_token, void *reserved) { - GRPC_API_TRACE( - "grpc_refresh_token_credentials_create(json_refresh_token=%s, " - "reserved=%p)", - 2, (json_refresh_token, reserved)); - GPR_ASSERT(reserved == NULL); - return grpc_refresh_token_credentials_create_from_auth_refresh_token( - grpc_auth_refresh_token_create_from_string(json_refresh_token)); -} - -/* -- Metadata-only credentials. -- */ - -static void md_only_test_destruct(grpc_call_credentials *creds) { - grpc_md_only_test_credentials *c = (grpc_md_only_test_credentials *)creds; - grpc_credentials_md_store_unref(c->md_store); -} - -static void on_simulated_token_fetch_done(grpc_exec_ctx *exec_ctx, - void *user_data, bool success) { - grpc_credentials_metadata_request *r = - (grpc_credentials_metadata_request *)user_data; - grpc_md_only_test_credentials *c = (grpc_md_only_test_credentials *)r->creds; - r->cb(exec_ctx, r->user_data, c->md_store->entries, c->md_store->num_entries, - GRPC_CREDENTIALS_OK); - grpc_credentials_metadata_request_destroy(r); -} - -static void md_only_test_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset *pollset, grpc_auth_metadata_context context, - grpc_credentials_metadata_cb cb, void *user_data) { - grpc_md_only_test_credentials *c = (grpc_md_only_test_credentials *)creds; - - if (c->is_async) { - grpc_credentials_metadata_request *cb_arg = - grpc_credentials_metadata_request_create(creds, cb, user_data); - grpc_executor_enqueue( - grpc_closure_create(on_simulated_token_fetch_done, cb_arg), true); - } else { - cb(exec_ctx, user_data, c->md_store->entries, 1, GRPC_CREDENTIALS_OK); - } -} - -static grpc_call_credentials_vtable md_only_test_vtable = { - md_only_test_destruct, md_only_test_get_request_metadata}; - -grpc_call_credentials *grpc_md_only_test_credentials_create( - const char *md_key, const char *md_value, int is_async) { - grpc_md_only_test_credentials *c = - gpr_malloc(sizeof(grpc_md_only_test_credentials)); - memset(c, 0, sizeof(grpc_md_only_test_credentials)); - c->base.type = GRPC_CALL_CREDENTIALS_TYPE_OAUTH2; - c->base.vtable = &md_only_test_vtable; - gpr_ref_init(&c->base.refcount, 1); - c->md_store = grpc_credentials_md_store_create(1); - grpc_credentials_md_store_add_cstrings(c->md_store, md_key, md_value); - c->is_async = is_async; - return &c->base; -} - -/* -- Oauth2 Access Token credentials. -- */ - -static void access_token_destruct(grpc_call_credentials *creds) { - grpc_access_token_credentials *c = (grpc_access_token_credentials *)creds; - grpc_credentials_md_store_unref(c->access_token_md); -} - -static void access_token_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset *pollset, grpc_auth_metadata_context context, - grpc_credentials_metadata_cb cb, void *user_data) { - grpc_access_token_credentials *c = (grpc_access_token_credentials *)creds; - cb(exec_ctx, user_data, c->access_token_md->entries, 1, GRPC_CREDENTIALS_OK); -} - -static grpc_call_credentials_vtable access_token_vtable = { - access_token_destruct, access_token_get_request_metadata}; - -grpc_call_credentials *grpc_access_token_credentials_create( - const char *access_token, void *reserved) { - grpc_access_token_credentials *c = - gpr_malloc(sizeof(grpc_access_token_credentials)); - char *token_md_value; - GRPC_API_TRACE( - "grpc_access_token_credentials_create(access_token=%s, " - "reserved=%p)", - 2, (access_token, reserved)); - GPR_ASSERT(reserved == NULL); - memset(c, 0, sizeof(grpc_access_token_credentials)); - c->base.type = GRPC_CALL_CREDENTIALS_TYPE_OAUTH2; - c->base.vtable = &access_token_vtable; - gpr_ref_init(&c->base.refcount, 1); - c->access_token_md = grpc_credentials_md_store_create(1); - gpr_asprintf(&token_md_value, "Bearer %s", access_token); - grpc_credentials_md_store_add_cstrings( - c->access_token_md, GRPC_AUTHORIZATION_METADATA_KEY, token_md_value); - gpr_free(token_md_value); - return &c->base; -} - -/* -- Fake transport security credentials. -- */ - -static grpc_security_status fake_transport_security_create_security_connector( - grpc_channel_credentials *c, grpc_call_credentials *call_creds, - const char *target, const grpc_channel_args *args, - grpc_channel_security_connector **sc, grpc_channel_args **new_args) { - *sc = grpc_fake_channel_security_connector_create(call_creds); - return GRPC_SECURITY_OK; -} - -static grpc_security_status -fake_transport_security_server_create_security_connector( - grpc_server_credentials *c, grpc_server_security_connector **sc) { - *sc = grpc_fake_server_security_connector_create(); - return GRPC_SECURITY_OK; -} - -static grpc_channel_credentials_vtable - fake_transport_security_credentials_vtable = { - NULL, fake_transport_security_create_security_connector}; - -static grpc_server_credentials_vtable - fake_transport_security_server_credentials_vtable = { - NULL, fake_transport_security_server_create_security_connector}; - -grpc_channel_credentials *grpc_fake_transport_security_credentials_create( - void) { - grpc_channel_credentials *c = gpr_malloc(sizeof(grpc_channel_credentials)); - memset(c, 0, sizeof(grpc_channel_credentials)); - c->type = GRPC_CHANNEL_CREDENTIALS_TYPE_FAKE_TRANSPORT_SECURITY; - c->vtable = &fake_transport_security_credentials_vtable; - gpr_ref_init(&c->refcount, 1); - return c; -} - -grpc_server_credentials *grpc_fake_transport_security_server_credentials_create( - void) { - grpc_server_credentials *c = gpr_malloc(sizeof(grpc_server_credentials)); - memset(c, 0, sizeof(grpc_server_credentials)); - c->type = GRPC_CHANNEL_CREDENTIALS_TYPE_FAKE_TRANSPORT_SECURITY; - gpr_ref_init(&c->refcount, 1); - c->vtable = &fake_transport_security_server_credentials_vtable; - return c; -} - -/* -- Composite call credentials. -- */ - -typedef struct { - grpc_composite_call_credentials *composite_creds; - size_t creds_index; - grpc_credentials_md_store *md_elems; - grpc_auth_metadata_context auth_md_context; - void *user_data; - grpc_pollset *pollset; - grpc_credentials_metadata_cb cb; -} grpc_composite_call_credentials_metadata_context; - -static void composite_call_destruct(grpc_call_credentials *creds) { - grpc_composite_call_credentials *c = (grpc_composite_call_credentials *)creds; - size_t i; - for (i = 0; i < c->inner.num_creds; i++) { - grpc_call_credentials_unref(c->inner.creds_array[i]); - } - gpr_free(c->inner.creds_array); -} - -static void composite_call_md_context_destroy( - grpc_composite_call_credentials_metadata_context *ctx) { - grpc_credentials_md_store_unref(ctx->md_elems); - gpr_free(ctx); -} - -static void composite_call_metadata_cb(grpc_exec_ctx *exec_ctx, void *user_data, - grpc_credentials_md *md_elems, - size_t num_md, - grpc_credentials_status status) { - grpc_composite_call_credentials_metadata_context *ctx = - (grpc_composite_call_credentials_metadata_context *)user_data; - if (status != GRPC_CREDENTIALS_OK) { - ctx->cb(exec_ctx, ctx->user_data, NULL, 0, status); - return; - } - - /* Copy the metadata in the context. */ - if (num_md > 0) { - size_t i; - for (i = 0; i < num_md; i++) { - grpc_credentials_md_store_add(ctx->md_elems, md_elems[i].key, - md_elems[i].value); - } - } - - /* See if we need to get some more metadata. */ - if (ctx->creds_index < ctx->composite_creds->inner.num_creds) { - grpc_call_credentials *inner_creds = - ctx->composite_creds->inner.creds_array[ctx->creds_index++]; - grpc_call_credentials_get_request_metadata( - exec_ctx, inner_creds, ctx->pollset, ctx->auth_md_context, - composite_call_metadata_cb, ctx); - return; - } - - /* We're done!. */ - ctx->cb(exec_ctx, ctx->user_data, ctx->md_elems->entries, - ctx->md_elems->num_entries, GRPC_CREDENTIALS_OK); - composite_call_md_context_destroy(ctx); -} - -static void composite_call_get_request_metadata( - grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, - grpc_pollset *pollset, grpc_auth_metadata_context auth_md_context, - grpc_credentials_metadata_cb cb, void *user_data) { - grpc_composite_call_credentials *c = (grpc_composite_call_credentials *)creds; - grpc_composite_call_credentials_metadata_context *ctx; - - ctx = gpr_malloc(sizeof(grpc_composite_call_credentials_metadata_context)); - memset(ctx, 0, sizeof(grpc_composite_call_credentials_metadata_context)); - ctx->auth_md_context = auth_md_context; - ctx->user_data = user_data; - ctx->cb = cb; - ctx->composite_creds = c; - ctx->pollset = pollset; - ctx->md_elems = grpc_credentials_md_store_create(c->inner.num_creds); - grpc_call_credentials_get_request_metadata( - exec_ctx, c->inner.creds_array[ctx->creds_index++], pollset, - auth_md_context, composite_call_metadata_cb, ctx); -} - -static grpc_call_credentials_vtable composite_call_credentials_vtable = { - composite_call_destruct, composite_call_get_request_metadata}; - -static grpc_call_credentials_array get_creds_array( - grpc_call_credentials **creds_addr) { - grpc_call_credentials_array result; - grpc_call_credentials *creds = *creds_addr; - result.creds_array = creds_addr; - result.num_creds = 1; - if (strcmp(creds->type, GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE) == 0) { - result = *grpc_composite_call_credentials_get_credentials(creds); - } - return result; -} - -grpc_call_credentials *grpc_composite_call_credentials_create( - grpc_call_credentials *creds1, grpc_call_credentials *creds2, - void *reserved) { - size_t i; - size_t creds_array_byte_size; - grpc_call_credentials_array creds1_array; - grpc_call_credentials_array creds2_array; - grpc_composite_call_credentials *c; - GRPC_API_TRACE( - "grpc_composite_call_credentials_create(creds1=%p, creds2=%p, " - "reserved=%p)", - 3, (creds1, creds2, reserved)); - GPR_ASSERT(reserved == NULL); - GPR_ASSERT(creds1 != NULL); - GPR_ASSERT(creds2 != NULL); - c = gpr_malloc(sizeof(grpc_composite_call_credentials)); - memset(c, 0, sizeof(grpc_composite_call_credentials)); - c->base.type = GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE; - c->base.vtable = &composite_call_credentials_vtable; - gpr_ref_init(&c->base.refcount, 1); - creds1_array = get_creds_array(&creds1); - creds2_array = get_creds_array(&creds2); - c->inner.num_creds = creds1_array.num_creds + creds2_array.num_creds; - creds_array_byte_size = c->inner.num_creds * sizeof(grpc_call_credentials *); - c->inner.creds_array = gpr_malloc(creds_array_byte_size); - memset(c->inner.creds_array, 0, creds_array_byte_size); - for (i = 0; i < creds1_array.num_creds; i++) { - grpc_call_credentials *cur_creds = creds1_array.creds_array[i]; - c->inner.creds_array[i] = grpc_call_credentials_ref(cur_creds); - } - for (i = 0; i < creds2_array.num_creds; i++) { - grpc_call_credentials *cur_creds = creds2_array.creds_array[i]; - c->inner.creds_array[i + creds1_array.num_creds] = - grpc_call_credentials_ref(cur_creds); - } - return &c->base; -} - -const grpc_call_credentials_array * -grpc_composite_call_credentials_get_credentials(grpc_call_credentials *creds) { - const grpc_composite_call_credentials *c = - (const grpc_composite_call_credentials *)creds; - GPR_ASSERT(strcmp(creds->type, GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE) == 0); - return &c->inner; -} - -grpc_call_credentials *grpc_credentials_contains_type( - grpc_call_credentials *creds, const char *type, - grpc_call_credentials **composite_creds) { - size_t i; - if (strcmp(creds->type, type) == 0) { - if (composite_creds != NULL) *composite_creds = NULL; - return creds; - } else if (strcmp(creds->type, GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE) == 0) { - const grpc_call_credentials_array *inner_creds_array = - grpc_composite_call_credentials_get_credentials(creds); - for (i = 0; i < inner_creds_array->num_creds; i++) { - if (strcmp(type, inner_creds_array->creds_array[i]->type) == 0) { - if (composite_creds != NULL) *composite_creds = creds; - return inner_creds_array->creds_array[i]; - } - } - } - return NULL; -} - -/* -- IAM credentials. -- */ - -static void iam_destruct(grpc_call_credentials *creds) { - grpc_google_iam_credentials *c = (grpc_google_iam_credentials *)creds; - grpc_credentials_md_store_unref(c->iam_md); -} - -static void iam_get_request_metadata(grpc_exec_ctx *exec_ctx, - grpc_call_credentials *creds, - grpc_pollset *pollset, - grpc_auth_metadata_context context, - grpc_credentials_metadata_cb cb, - void *user_data) { - grpc_google_iam_credentials *c = (grpc_google_iam_credentials *)creds; - cb(exec_ctx, user_data, c->iam_md->entries, c->iam_md->num_entries, - GRPC_CREDENTIALS_OK); -} - -static grpc_call_credentials_vtable iam_vtable = {iam_destruct, - iam_get_request_metadata}; - -grpc_call_credentials *grpc_google_iam_credentials_create( - const char *token, const char *authority_selector, void *reserved) { - grpc_google_iam_credentials *c; - GRPC_API_TRACE( - "grpc_iam_credentials_create(token=%s, authority_selector=%s, " - "reserved=%p)", - 3, (token, authority_selector, reserved)); - GPR_ASSERT(reserved == NULL); - GPR_ASSERT(token != NULL); - GPR_ASSERT(authority_selector != NULL); - c = gpr_malloc(sizeof(grpc_google_iam_credentials)); - memset(c, 0, sizeof(grpc_google_iam_credentials)); - c->base.type = GRPC_CALL_CREDENTIALS_TYPE_IAM; - c->base.vtable = &iam_vtable; - gpr_ref_init(&c->base.refcount, 1); - c->iam_md = grpc_credentials_md_store_create(2); - grpc_credentials_md_store_add_cstrings( - c->iam_md, GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY, token); - grpc_credentials_md_store_add_cstrings( - c->iam_md, GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY, authority_selector); - return &c->base; -} - -/* -- Plugin credentials. -- */ - -typedef struct { - void *user_data; - grpc_credentials_metadata_cb cb; -} grpc_metadata_plugin_request; - -static void plugin_destruct(grpc_call_credentials *creds) { - grpc_plugin_credentials *c = (grpc_plugin_credentials *)creds; - if (c->plugin.state != NULL && c->plugin.destroy != NULL) { - c->plugin.destroy(c->plugin.state); - } -} - -static void plugin_md_request_metadata_ready(void *request, - const grpc_metadata *md, - size_t num_md, - grpc_status_code status, - const char *error_details) { - /* called from application code */ - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_metadata_plugin_request *r = (grpc_metadata_plugin_request *)request; - if (status != GRPC_STATUS_OK) { - if (error_details != NULL) { - gpr_log(GPR_ERROR, "Getting metadata from plugin failed with error: %s", - error_details); - } - r->cb(&exec_ctx, r->user_data, NULL, 0, GRPC_CREDENTIALS_ERROR); - } else { - size_t i; - grpc_credentials_md *md_array = NULL; - if (num_md > 0) { - md_array = gpr_malloc(num_md * sizeof(grpc_credentials_md)); - for (i = 0; i < num_md; i++) { - md_array[i].key = gpr_slice_from_copied_string(md[i].key); - md_array[i].value = - gpr_slice_from_copied_buffer(md[i].value, md[i].value_length); - } - } - r->cb(&exec_ctx, r->user_data, md_array, num_md, GRPC_CREDENTIALS_OK); - if (md_array != NULL) { - for (i = 0; i < num_md; i++) { - gpr_slice_unref(md_array[i].key); - gpr_slice_unref(md_array[i].value); - } - gpr_free(md_array); - } - } - gpr_free(r); - grpc_exec_ctx_finish(&exec_ctx); -} - -static void plugin_get_request_metadata(grpc_exec_ctx *exec_ctx, - grpc_call_credentials *creds, - grpc_pollset *pollset, - grpc_auth_metadata_context context, - grpc_credentials_metadata_cb cb, - void *user_data) { - grpc_plugin_credentials *c = (grpc_plugin_credentials *)creds; - if (c->plugin.get_metadata != NULL) { - grpc_metadata_plugin_request *request = gpr_malloc(sizeof(*request)); - memset(request, 0, sizeof(*request)); - request->user_data = user_data; - request->cb = cb; - c->plugin.get_metadata(c->plugin.state, context, - plugin_md_request_metadata_ready, request); - } else { - cb(exec_ctx, user_data, NULL, 0, GRPC_CREDENTIALS_OK); - } -} - -static grpc_call_credentials_vtable plugin_vtable = { - plugin_destruct, plugin_get_request_metadata}; - -grpc_call_credentials *grpc_metadata_credentials_create_from_plugin( - grpc_metadata_credentials_plugin plugin, void *reserved) { - grpc_plugin_credentials *c = gpr_malloc(sizeof(*c)); - GRPC_API_TRACE("grpc_metadata_credentials_create_from_plugin(reserved=%p)", 1, - (reserved)); - GPR_ASSERT(reserved == NULL); - memset(c, 0, sizeof(*c)); - c->base.type = plugin.type; - c->base.vtable = &plugin_vtable; - gpr_ref_init(&c->base.refcount, 1); - c->plugin = plugin; - return &c->base; -} - -/* -- Composite channel credentials. -- */ - -static void composite_channel_destruct(grpc_channel_credentials *creds) { - grpc_composite_channel_credentials *c = - (grpc_composite_channel_credentials *)creds; - grpc_channel_credentials_unref(c->inner_creds); - grpc_call_credentials_unref(c->call_creds); -} - -static grpc_security_status composite_channel_create_security_connector( - grpc_channel_credentials *creds, grpc_call_credentials *call_creds, - const char *target, const grpc_channel_args *args, - grpc_channel_security_connector **sc, grpc_channel_args **new_args) { - grpc_composite_channel_credentials *c = - (grpc_composite_channel_credentials *)creds; - grpc_security_status status = GRPC_SECURITY_ERROR; - - GPR_ASSERT(c->inner_creds != NULL && c->call_creds != NULL && - c->inner_creds->vtable != NULL && - c->inner_creds->vtable->create_security_connector != NULL); - /* If we are passed a call_creds, create a call composite to pass it - downstream. */ - if (call_creds != NULL) { - grpc_call_credentials *composite_call_creds = - grpc_composite_call_credentials_create(c->call_creds, call_creds, NULL); - status = c->inner_creds->vtable->create_security_connector( - c->inner_creds, composite_call_creds, target, args, sc, new_args); - grpc_call_credentials_unref(composite_call_creds); - } else { - status = c->inner_creds->vtable->create_security_connector( - c->inner_creds, c->call_creds, target, args, sc, new_args); - } - return status; -} - -static grpc_channel_credentials_vtable composite_channel_credentials_vtable = { - composite_channel_destruct, composite_channel_create_security_connector}; - -grpc_channel_credentials *grpc_composite_channel_credentials_create( - grpc_channel_credentials *channel_creds, grpc_call_credentials *call_creds, - void *reserved) { - grpc_composite_channel_credentials *c = gpr_malloc(sizeof(*c)); - memset(c, 0, sizeof(*c)); - GPR_ASSERT(channel_creds != NULL && call_creds != NULL && reserved == NULL); - GRPC_API_TRACE( - "grpc_composite_channel_credentials_create(channel_creds=%p, " - "call_creds=%p, reserved=%p)", - 3, (channel_creds, call_creds, reserved)); - c->base.type = channel_creds->type; - c->base.vtable = &composite_channel_credentials_vtable; - gpr_ref_init(&c->base.refcount, 1); - c->inner_creds = grpc_channel_credentials_ref(channel_creds); - c->call_creds = grpc_call_credentials_ref(call_creds); - return &c->base; -} diff --git a/src/core/lib/security/credentials/composite/composite_credentials.c b/src/core/lib/security/credentials/composite/composite_credentials.c new file mode 100644 index 00000000000..4a17f7c1b98 --- /dev/null +++ b/src/core/lib/security/credentials/composite/composite_credentials.c @@ -0,0 +1,263 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/security/credentials/composite/composite_credentials.h" + +#include + +#include "src/core/lib/surface/api_trace.h" + +#include +#include +#include + +/* -- Composite call credentials. -- */ + +typedef struct { + grpc_composite_call_credentials *composite_creds; + size_t creds_index; + grpc_credentials_md_store *md_elems; + grpc_auth_metadata_context auth_md_context; + void *user_data; + grpc_pollset *pollset; + grpc_credentials_metadata_cb cb; +} grpc_composite_call_credentials_metadata_context; + +static void composite_call_destruct(grpc_call_credentials *creds) { + grpc_composite_call_credentials *c = (grpc_composite_call_credentials *)creds; + size_t i; + for (i = 0; i < c->inner.num_creds; i++) { + grpc_call_credentials_unref(c->inner.creds_array[i]); + } + gpr_free(c->inner.creds_array); +} + +static void composite_call_md_context_destroy( + grpc_composite_call_credentials_metadata_context *ctx) { + grpc_credentials_md_store_unref(ctx->md_elems); + gpr_free(ctx); +} + +static void composite_call_metadata_cb(grpc_exec_ctx *exec_ctx, void *user_data, + grpc_credentials_md *md_elems, + size_t num_md, + grpc_credentials_status status) { + grpc_composite_call_credentials_metadata_context *ctx = + (grpc_composite_call_credentials_metadata_context *)user_data; + if (status != GRPC_CREDENTIALS_OK) { + ctx->cb(exec_ctx, ctx->user_data, NULL, 0, status); + return; + } + + /* Copy the metadata in the context. */ + if (num_md > 0) { + size_t i; + for (i = 0; i < num_md; i++) { + grpc_credentials_md_store_add(ctx->md_elems, md_elems[i].key, + md_elems[i].value); + } + } + + /* See if we need to get some more metadata. */ + if (ctx->creds_index < ctx->composite_creds->inner.num_creds) { + grpc_call_credentials *inner_creds = + ctx->composite_creds->inner.creds_array[ctx->creds_index++]; + grpc_call_credentials_get_request_metadata( + exec_ctx, inner_creds, ctx->pollset, ctx->auth_md_context, + composite_call_metadata_cb, ctx); + return; + } + + /* We're done!. */ + ctx->cb(exec_ctx, ctx->user_data, ctx->md_elems->entries, + ctx->md_elems->num_entries, GRPC_CREDENTIALS_OK); + composite_call_md_context_destroy(ctx); +} + +static void composite_call_get_request_metadata( + grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, + grpc_pollset *pollset, grpc_auth_metadata_context auth_md_context, + grpc_credentials_metadata_cb cb, void *user_data) { + grpc_composite_call_credentials *c = (grpc_composite_call_credentials *)creds; + grpc_composite_call_credentials_metadata_context *ctx; + + ctx = gpr_malloc(sizeof(grpc_composite_call_credentials_metadata_context)); + memset(ctx, 0, sizeof(grpc_composite_call_credentials_metadata_context)); + ctx->auth_md_context = auth_md_context; + ctx->user_data = user_data; + ctx->cb = cb; + ctx->composite_creds = c; + ctx->pollset = pollset; + ctx->md_elems = grpc_credentials_md_store_create(c->inner.num_creds); + grpc_call_credentials_get_request_metadata( + exec_ctx, c->inner.creds_array[ctx->creds_index++], pollset, + auth_md_context, composite_call_metadata_cb, ctx); +} + +static grpc_call_credentials_vtable composite_call_credentials_vtable = { + composite_call_destruct, composite_call_get_request_metadata}; + +static grpc_call_credentials_array get_creds_array( + grpc_call_credentials **creds_addr) { + grpc_call_credentials_array result; + grpc_call_credentials *creds = *creds_addr; + result.creds_array = creds_addr; + result.num_creds = 1; + if (strcmp(creds->type, GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE) == 0) { + result = *grpc_composite_call_credentials_get_credentials(creds); + } + return result; +} + +grpc_call_credentials *grpc_composite_call_credentials_create( + grpc_call_credentials *creds1, grpc_call_credentials *creds2, + void *reserved) { + size_t i; + size_t creds_array_byte_size; + grpc_call_credentials_array creds1_array; + grpc_call_credentials_array creds2_array; + grpc_composite_call_credentials *c; + GRPC_API_TRACE( + "grpc_composite_call_credentials_create(creds1=%p, creds2=%p, " + "reserved=%p)", + 3, (creds1, creds2, reserved)); + GPR_ASSERT(reserved == NULL); + GPR_ASSERT(creds1 != NULL); + GPR_ASSERT(creds2 != NULL); + c = gpr_malloc(sizeof(grpc_composite_call_credentials)); + memset(c, 0, sizeof(grpc_composite_call_credentials)); + c->base.type = GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE; + c->base.vtable = &composite_call_credentials_vtable; + gpr_ref_init(&c->base.refcount, 1); + creds1_array = get_creds_array(&creds1); + creds2_array = get_creds_array(&creds2); + c->inner.num_creds = creds1_array.num_creds + creds2_array.num_creds; + creds_array_byte_size = c->inner.num_creds * sizeof(grpc_call_credentials *); + c->inner.creds_array = gpr_malloc(creds_array_byte_size); + memset(c->inner.creds_array, 0, creds_array_byte_size); + for (i = 0; i < creds1_array.num_creds; i++) { + grpc_call_credentials *cur_creds = creds1_array.creds_array[i]; + c->inner.creds_array[i] = grpc_call_credentials_ref(cur_creds); + } + for (i = 0; i < creds2_array.num_creds; i++) { + grpc_call_credentials *cur_creds = creds2_array.creds_array[i]; + c->inner.creds_array[i + creds1_array.num_creds] = + grpc_call_credentials_ref(cur_creds); + } + return &c->base; +} + +const grpc_call_credentials_array * +grpc_composite_call_credentials_get_credentials(grpc_call_credentials *creds) { + const grpc_composite_call_credentials *c = + (const grpc_composite_call_credentials *)creds; + GPR_ASSERT(strcmp(creds->type, GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE) == 0); + return &c->inner; +} + +grpc_call_credentials *grpc_credentials_contains_type( + grpc_call_credentials *creds, const char *type, + grpc_call_credentials **composite_creds) { + size_t i; + if (strcmp(creds->type, type) == 0) { + if (composite_creds != NULL) *composite_creds = NULL; + return creds; + } else if (strcmp(creds->type, GRPC_CALL_CREDENTIALS_TYPE_COMPOSITE) == 0) { + const grpc_call_credentials_array *inner_creds_array = + grpc_composite_call_credentials_get_credentials(creds); + for (i = 0; i < inner_creds_array->num_creds; i++) { + if (strcmp(type, inner_creds_array->creds_array[i]->type) == 0) { + if (composite_creds != NULL) *composite_creds = creds; + return inner_creds_array->creds_array[i]; + } + } + } + return NULL; +} + +/* -- Composite channel credentials. -- */ + +static void composite_channel_destruct(grpc_channel_credentials *creds) { + grpc_composite_channel_credentials *c = + (grpc_composite_channel_credentials *)creds; + grpc_channel_credentials_unref(c->inner_creds); + grpc_call_credentials_unref(c->call_creds); +} + +static grpc_security_status composite_channel_create_security_connector( + grpc_channel_credentials *creds, grpc_call_credentials *call_creds, + const char *target, const grpc_channel_args *args, + grpc_channel_security_connector **sc, grpc_channel_args **new_args) { + grpc_composite_channel_credentials *c = + (grpc_composite_channel_credentials *)creds; + grpc_security_status status = GRPC_SECURITY_ERROR; + + GPR_ASSERT(c->inner_creds != NULL && c->call_creds != NULL && + c->inner_creds->vtable != NULL && + c->inner_creds->vtable->create_security_connector != NULL); + /* If we are passed a call_creds, create a call composite to pass it + downstream. */ + if (call_creds != NULL) { + grpc_call_credentials *composite_call_creds = + grpc_composite_call_credentials_create(c->call_creds, call_creds, NULL); + status = c->inner_creds->vtable->create_security_connector( + c->inner_creds, composite_call_creds, target, args, sc, new_args); + grpc_call_credentials_unref(composite_call_creds); + } else { + status = c->inner_creds->vtable->create_security_connector( + c->inner_creds, c->call_creds, target, args, sc, new_args); + } + return status; +} + +static grpc_channel_credentials_vtable composite_channel_credentials_vtable = { + composite_channel_destruct, composite_channel_create_security_connector}; + +grpc_channel_credentials *grpc_composite_channel_credentials_create( + grpc_channel_credentials *channel_creds, grpc_call_credentials *call_creds, + void *reserved) { + grpc_composite_channel_credentials *c = gpr_malloc(sizeof(*c)); + memset(c, 0, sizeof(*c)); + GPR_ASSERT(channel_creds != NULL && call_creds != NULL && reserved == NULL); + GRPC_API_TRACE( + "grpc_composite_channel_credentials_create(channel_creds=%p, " + "call_creds=%p, reserved=%p)", + 3, (channel_creds, call_creds, reserved)); + c->base.type = channel_creds->type; + c->base.vtable = &composite_channel_credentials_vtable; + gpr_ref_init(&c->base.refcount, 1); + c->inner_creds = grpc_channel_credentials_ref(channel_creds); + c->call_creds = grpc_call_credentials_ref(call_creds); + return &c->base; +} + diff --git a/src/core/lib/security/credentials/composite/composite_credentials.h b/src/core/lib/security/credentials/composite/composite_credentials.h new file mode 100644 index 00000000000..c83f74429f9 --- /dev/null +++ b/src/core/lib/security/credentials/composite/composite_credentials.h @@ -0,0 +1,72 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_COMPOSITE_CREDENTIALS_H +#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_COMPOSITE_CREDENTIALS_H + +#include "src/core/lib/security/credentials/credentials.h" + +typedef struct { + grpc_call_credentials **creds_array; + size_t num_creds; +} grpc_call_credentials_array; + +const grpc_call_credentials_array * +grpc_composite_call_credentials_get_credentials( + grpc_call_credentials *composite_creds); + +/* Returns creds if creds is of the specified type or the inner creds of the + specified type (if found), if the creds is of type COMPOSITE. + If composite_creds is not NULL, *composite_creds will point to creds if of + type COMPOSITE in case of success. */ +grpc_call_credentials *grpc_credentials_contains_type( + grpc_call_credentials *creds, const char *type, + grpc_call_credentials **composite_creds); + +/* -- Channel composite credentials. -- */ + +typedef struct { + grpc_channel_credentials base; + grpc_channel_credentials *inner_creds; + grpc_call_credentials *call_creds; +} grpc_composite_channel_credentials; + +/* -- Composite credentials. -- */ + +typedef struct { + grpc_call_credentials base; + grpc_call_credentials_array inner; +} grpc_composite_call_credentials; + +#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_COMPOSITE_CREDENTIALS_H + diff --git a/src/core/lib/security/credentials/credentials.c b/src/core/lib/security/credentials/credentials.c new file mode 100644 index 00000000000..29cf9ee8840 --- /dev/null +++ b/src/core/lib/security/credentials/credentials.c @@ -0,0 +1,233 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/security/credentials/credentials.h" + +#include +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/http_client_filter.h" +#include "src/core/lib/http/httpcli.h" +#include "src/core/lib/http/parser.h" +#include "src/core/lib/iomgr/executor.h" +#include "src/core/lib/json/json.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/surface/api_trace.h" + +#include +#include +#include +#include +#include + +/* -- Common. -- */ + +grpc_credentials_metadata_request * +grpc_credentials_metadata_request_create(grpc_call_credentials *creds, + grpc_credentials_metadata_cb cb, + void *user_data) { + grpc_credentials_metadata_request *r = + gpr_malloc(sizeof(grpc_credentials_metadata_request)); + r->creds = grpc_call_credentials_ref(creds); + r->cb = cb; + r->user_data = user_data; + return r; +} + +void grpc_credentials_metadata_request_destroy( + grpc_credentials_metadata_request *r) { + grpc_call_credentials_unref(r->creds); + gpr_free(r); +} + +grpc_channel_credentials *grpc_channel_credentials_ref( + grpc_channel_credentials *creds) { + if (creds == NULL) return NULL; + gpr_ref(&creds->refcount); + return creds; +} + +void grpc_channel_credentials_unref(grpc_channel_credentials *creds) { + if (creds == NULL) return; + if (gpr_unref(&creds->refcount)) { + if (creds->vtable->destruct != NULL) creds->vtable->destruct(creds); + gpr_free(creds); + } +} + +void grpc_channel_credentials_release(grpc_channel_credentials *creds) { + GRPC_API_TRACE("grpc_channel_credentials_release(creds=%p)", 1, (creds)); + grpc_channel_credentials_unref(creds); +} + +grpc_call_credentials *grpc_call_credentials_ref(grpc_call_credentials *creds) { + if (creds == NULL) return NULL; + gpr_ref(&creds->refcount); + return creds; +} + +void grpc_call_credentials_unref(grpc_call_credentials *creds) { + if (creds == NULL) return; + if (gpr_unref(&creds->refcount)) { + if (creds->vtable->destruct != NULL) creds->vtable->destruct(creds); + gpr_free(creds); + } +} + +void grpc_call_credentials_release(grpc_call_credentials *creds) { + GRPC_API_TRACE("grpc_call_credentials_release(creds=%p)", 1, (creds)); + grpc_call_credentials_unref(creds); +} + +void grpc_call_credentials_get_request_metadata( + grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, + grpc_pollset *pollset, grpc_auth_metadata_context context, + grpc_credentials_metadata_cb cb, void *user_data) { + if (creds == NULL || creds->vtable->get_request_metadata == NULL) { + if (cb != NULL) { + cb(exec_ctx, user_data, NULL, 0, GRPC_CREDENTIALS_OK); + } + return; + } + creds->vtable->get_request_metadata(exec_ctx, creds, pollset, context, cb, + user_data); +} + +grpc_security_status grpc_channel_credentials_create_security_connector( + grpc_channel_credentials *channel_creds, const char *target, + const grpc_channel_args *args, grpc_channel_security_connector **sc, + grpc_channel_args **new_args) { + *new_args = NULL; + if (channel_creds == NULL) { + return GRPC_SECURITY_ERROR; + } + GPR_ASSERT(channel_creds->vtable->create_security_connector != NULL); + return channel_creds->vtable->create_security_connector( + channel_creds, NULL, target, args, sc, new_args); +} + +grpc_server_credentials *grpc_server_credentials_ref( + grpc_server_credentials *creds) { + if (creds == NULL) return NULL; + gpr_ref(&creds->refcount); + return creds; +} + +void grpc_server_credentials_unref(grpc_server_credentials *creds) { + if (creds == NULL) return; + if (gpr_unref(&creds->refcount)) { + if (creds->vtable->destruct != NULL) creds->vtable->destruct(creds); + if (creds->processor.destroy != NULL && creds->processor.state != NULL) { + creds->processor.destroy(creds->processor.state); + } + gpr_free(creds); + } +} + +void grpc_server_credentials_release(grpc_server_credentials *creds) { + GRPC_API_TRACE("grpc_server_credentials_release(creds=%p)", 1, (creds)); + grpc_server_credentials_unref(creds); +} + +grpc_security_status grpc_server_credentials_create_security_connector( + grpc_server_credentials *creds, grpc_server_security_connector **sc) { + if (creds == NULL || creds->vtable->create_security_connector == NULL) { + gpr_log(GPR_ERROR, "Server credentials cannot create security context."); + return GRPC_SECURITY_ERROR; + } + return creds->vtable->create_security_connector(creds, sc); +} + +void grpc_server_credentials_set_auth_metadata_processor( + grpc_server_credentials *creds, grpc_auth_metadata_processor processor) { + GRPC_API_TRACE( + "grpc_server_credentials_set_auth_metadata_processor(" + "creds=%p, " + "processor=grpc_auth_metadata_processor { process: %p, state: %p })", + 3, (creds, (void *)(intptr_t)processor.process, processor.state)); + if (creds == NULL) return; + if (creds->processor.destroy != NULL && creds->processor.state != NULL) { + creds->processor.destroy(creds->processor.state); + } + creds->processor = processor; +} + +static void server_credentials_pointer_arg_destroy(void *p) { + grpc_server_credentials_unref(p); +} + +static void *server_credentials_pointer_arg_copy(void *p) { + return grpc_server_credentials_ref(p); +} + +static int server_credentials_pointer_cmp(void *a, void *b) { + return GPR_ICMP(a, b); +} + +static const grpc_arg_pointer_vtable cred_ptr_vtable = { + server_credentials_pointer_arg_copy, server_credentials_pointer_arg_destroy, + server_credentials_pointer_cmp}; + +grpc_arg grpc_server_credentials_to_arg(grpc_server_credentials *p) { + grpc_arg arg; + memset(&arg, 0, sizeof(grpc_arg)); + arg.type = GRPC_ARG_POINTER; + arg.key = GRPC_SERVER_CREDENTIALS_ARG; + arg.value.pointer.p = p; + arg.value.pointer.vtable = &cred_ptr_vtable; + return arg; +} + +grpc_server_credentials *grpc_server_credentials_from_arg(const grpc_arg *arg) { + if (strcmp(arg->key, GRPC_SERVER_CREDENTIALS_ARG) != 0) return NULL; + if (arg->type != GRPC_ARG_POINTER) { + gpr_log(GPR_ERROR, "Invalid type %d for arg %s", arg->type, + GRPC_SERVER_CREDENTIALS_ARG); + return NULL; + } + return arg->value.pointer.p; +} + +grpc_server_credentials *grpc_find_server_credentials_in_args( + const grpc_channel_args *args) { + size_t i; + if (args == NULL) return NULL; + for (i = 0; i < args->num_args; i++) { + grpc_server_credentials *p = + grpc_server_credentials_from_arg(&args->args[i]); + if (p != NULL) return p; + } + return NULL; +} + diff --git a/src/core/lib/security/credentials.h b/src/core/lib/security/credentials/credentials.h similarity index 62% rename from src/core/lib/security/credentials.h rename to src/core/lib/security/credentials/credentials.h index 0373ceaa3fc..5f44c7c3e30 100644 --- a/src/core/lib/security/credentials.h +++ b/src/core/lib/security/credentials/credentials.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_H -#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_H +#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_CREDENTIALS_H +#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_CREDENTIALS_H #include #include @@ -41,8 +41,7 @@ #include "src/core/lib/http/httpcli.h" #include "src/core/lib/http/parser.h" -#include "src/core/lib/security/json_token.h" -#include "src/core/lib/security/security_connector.h" +#include "src/core/lib/security/transport/security_connector.h" struct grpc_http_response; @@ -69,10 +68,6 @@ typedef enum { "x-goog-iam-authorization-token" #define GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY "x-goog-iam-authority-selector" -#define GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY "gcloud" -#define GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE \ - "application_default_credentials.json" - #define GRPC_SECURE_TOKEN_REFRESH_THRESHOLD_SECS 60 #define GRPC_COMPUTE_ENGINE_METADATA_HOST "metadata" @@ -188,48 +183,11 @@ void grpc_call_credentials_get_request_metadata( grpc_pollset *pollset, grpc_auth_metadata_context context, grpc_credentials_metadata_cb cb, void *user_data); -typedef struct { - grpc_call_credentials **creds_array; - size_t num_creds; -} grpc_call_credentials_array; - -const grpc_call_credentials_array * -grpc_composite_call_credentials_get_credentials( - grpc_call_credentials *composite_creds); - -/* Returns creds if creds is of the specified type or the inner creds of the - specified type (if found), if the creds is of type COMPOSITE. - If composite_creds is not NULL, *composite_creds will point to creds if of - type COMPOSITE in case of success. */ -grpc_call_credentials *grpc_credentials_contains_type( - grpc_call_credentials *creds, const char *type, - grpc_call_credentials **composite_creds); - -/* Exposed for testing only. */ -grpc_credentials_status -grpc_oauth2_token_fetcher_credentials_parse_server_response( - const struct grpc_http_response *response, - grpc_credentials_md_store **token_md, gpr_timespec *token_lifetime); - -void grpc_flush_cached_google_default_credentials(void); - /* Metadata-only credentials with the specified key and value where asynchronicity can be simulated for testing. */ grpc_call_credentials *grpc_md_only_test_credentials_create( const char *md_key, const char *md_value, int is_async); -/* Private constructor for jwt credentials from an already parsed json key. - Takes ownership of the key. */ -grpc_call_credentials * -grpc_service_account_jwt_access_credentials_create_from_auth_json_key( - grpc_auth_json_key key, gpr_timespec token_lifetime); - -/* Private constructor for refresh token credentials from an already parsed - refresh token. Takes ownership of the refresh token. */ -grpc_call_credentials * -grpc_refresh_token_credentials_create_from_auth_refresh_token( - grpc_auth_refresh_token token); - /* --- grpc_server_credentials. --- */ typedef struct { @@ -260,118 +218,19 @@ grpc_server_credentials *grpc_server_credentials_from_arg(const grpc_arg *arg); grpc_server_credentials *grpc_find_server_credentials_in_args( const grpc_channel_args *args); -/* -- Fake transport security credentials. -- */ - -/* Creates a fake transport security credentials object for testing. */ -grpc_channel_credentials *grpc_fake_transport_security_credentials_create(void); -/* Creates a fake server transport security credentials object for testing. */ -grpc_server_credentials *grpc_fake_transport_security_server_credentials_create( - void); - -/* -- Ssl credentials. -- */ - -typedef struct { - grpc_channel_credentials base; - grpc_ssl_config config; -} grpc_ssl_credentials; - -typedef struct { - grpc_server_credentials base; - grpc_ssl_server_config config; -} grpc_ssl_server_credentials; - -/* -- Channel composite credentials. -- */ - -typedef struct { - grpc_channel_credentials base; - grpc_channel_credentials *inner_creds; - grpc_call_credentials *call_creds; -} grpc_composite_channel_credentials; - -/* -- Jwt credentials -- */ +/* -- Credentials Metadata Request. -- */ typedef struct { - grpc_call_credentials base; - - /* Have a simple cache for now with just 1 entry. We could have a map based on - the service_url for a more sophisticated one. */ - gpr_mu cache_mu; - struct { - grpc_credentials_md_store *jwt_md; - char *service_url; - gpr_timespec jwt_expiration; - } cached; - - grpc_auth_json_key key; - gpr_timespec jwt_lifetime; -} grpc_service_account_jwt_access_credentials; - -/* -- Oauth2TokenFetcher credentials -- - - This object is a base for credentials that need to acquire an oauth2 token - from an http service. */ - -typedef struct grpc_credentials_metadata_request - grpc_credentials_metadata_request; + grpc_call_credentials *creds; + grpc_credentials_metadata_cb cb; + void *user_data; +} grpc_credentials_metadata_request; -typedef void (*grpc_fetch_oauth2_func)(grpc_exec_ctx *exec_ctx, - grpc_credentials_metadata_request *req, - grpc_httpcli_context *http_context, - grpc_pollset *pollset, - grpc_httpcli_response_cb response_cb, - gpr_timespec deadline); +grpc_credentials_metadata_request *grpc_credentials_metadata_request_create( + grpc_call_credentials *creds, grpc_credentials_metadata_cb cb, + void *user_data); -typedef struct { - grpc_call_credentials base; - gpr_mu mu; - grpc_credentials_md_store *access_token_md; - gpr_timespec token_expiration; - grpc_httpcli_context httpcli_context; - grpc_fetch_oauth2_func fetch_func; -} grpc_oauth2_token_fetcher_credentials; - -/* -- GoogleRefreshToken credentials. -- */ - -typedef struct { - grpc_oauth2_token_fetcher_credentials base; - grpc_auth_refresh_token refresh_token; -} grpc_google_refresh_token_credentials; - -/* -- Oauth2 Access Token credentials. -- */ - -typedef struct { - grpc_call_credentials base; - grpc_credentials_md_store *access_token_md; -} grpc_access_token_credentials; - -/* -- Metadata-only Test credentials. -- */ - -typedef struct { - grpc_call_credentials base; - grpc_credentials_md_store *md_store; - int is_async; -} grpc_md_only_test_credentials; - -/* -- GoogleIAM credentials. -- */ - -typedef struct { - grpc_call_credentials base; - grpc_credentials_md_store *iam_md; -} grpc_google_iam_credentials; - -/* -- Composite credentials. -- */ - -typedef struct { - grpc_call_credentials base; - grpc_call_credentials_array inner; -} grpc_composite_call_credentials; - -/* -- Plugin credentials. -- */ - -typedef struct { - grpc_call_credentials base; - grpc_metadata_credentials_plugin plugin; - grpc_credentials_md_store *plugin_md; -} grpc_plugin_credentials; +void grpc_credentials_metadata_request_destroy( + grpc_credentials_metadata_request *r); -#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_H */ +#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_CREDENTIALS_H */ diff --git a/src/core/lib/security/credentials_metadata.c b/src/core/lib/security/credentials/credentials_metadata.c similarity index 98% rename from src/core/lib/security/credentials_metadata.c rename to src/core/lib/security/credentials/credentials_metadata.c index bd00194278e..6a352aab3a6 100644 --- a/src/core/lib/security/credentials_metadata.c +++ b/src/core/lib/security/credentials/credentials_metadata.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/credentials/credentials.h" #include diff --git a/src/core/lib/security/credentials/fake/fake_credentials.c b/src/core/lib/security/credentials/fake/fake_credentials.c new file mode 100644 index 00000000000..2a5d225078f --- /dev/null +++ b/src/core/lib/security/credentials/fake/fake_credentials.c @@ -0,0 +1,139 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/security/credentials/fake/fake_credentials.h" + +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/iomgr/executor.h" + +#include +#include +#include + +/* -- Fake transport security credentials. -- */ + +static grpc_security_status fake_transport_security_create_security_connector( + grpc_channel_credentials *c, grpc_call_credentials *call_creds, + const char *target, const grpc_channel_args *args, + grpc_channel_security_connector **sc, grpc_channel_args **new_args) { + *sc = grpc_fake_channel_security_connector_create(call_creds); + return GRPC_SECURITY_OK; +} + +static grpc_security_status +fake_transport_security_server_create_security_connector( + grpc_server_credentials *c, grpc_server_security_connector **sc) { + *sc = grpc_fake_server_security_connector_create(); + return GRPC_SECURITY_OK; +} + +static grpc_channel_credentials_vtable + fake_transport_security_credentials_vtable = { + NULL, fake_transport_security_create_security_connector}; + +static grpc_server_credentials_vtable + fake_transport_security_server_credentials_vtable = { + NULL, fake_transport_security_server_create_security_connector}; + +grpc_channel_credentials *grpc_fake_transport_security_credentials_create( + void) { + grpc_channel_credentials *c = gpr_malloc(sizeof(grpc_channel_credentials)); + memset(c, 0, sizeof(grpc_channel_credentials)); + c->type = GRPC_CHANNEL_CREDENTIALS_TYPE_FAKE_TRANSPORT_SECURITY; + c->vtable = &fake_transport_security_credentials_vtable; + gpr_ref_init(&c->refcount, 1); + return c; +} + +grpc_server_credentials *grpc_fake_transport_security_server_credentials_create( + void) { + grpc_server_credentials *c = gpr_malloc(sizeof(grpc_server_credentials)); + memset(c, 0, sizeof(grpc_server_credentials)); + c->type = GRPC_CHANNEL_CREDENTIALS_TYPE_FAKE_TRANSPORT_SECURITY; + gpr_ref_init(&c->refcount, 1); + c->vtable = &fake_transport_security_server_credentials_vtable; + return c; +} + +/* -- Metadata-only test credentials. -- */ + +static void md_only_test_destruct(grpc_call_credentials *creds) { + grpc_md_only_test_credentials *c = (grpc_md_only_test_credentials *)creds; + grpc_credentials_md_store_unref(c->md_store); +} + +static void on_simulated_token_fetch_done(grpc_exec_ctx *exec_ctx, + void *user_data, bool success) { + grpc_credentials_metadata_request *r = + (grpc_credentials_metadata_request *)user_data; + grpc_md_only_test_credentials *c = (grpc_md_only_test_credentials *)r->creds; + r->cb(exec_ctx, r->user_data, c->md_store->entries, c->md_store->num_entries, + GRPC_CREDENTIALS_OK); + grpc_credentials_metadata_request_destroy(r); +} + +static void md_only_test_get_request_metadata( + grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, + grpc_pollset *pollset, grpc_auth_metadata_context context, + grpc_credentials_metadata_cb cb, void *user_data) { + grpc_md_only_test_credentials *c = (grpc_md_only_test_credentials *)creds; + + if (c->is_async) { + grpc_credentials_metadata_request *cb_arg = + grpc_credentials_metadata_request_create(creds, cb, user_data); + grpc_executor_enqueue( + grpc_closure_create(on_simulated_token_fetch_done, cb_arg), true); + } else { + cb(exec_ctx, user_data, c->md_store->entries, 1, GRPC_CREDENTIALS_OK); + } +} + +static grpc_call_credentials_vtable md_only_test_vtable = { + md_only_test_destruct, md_only_test_get_request_metadata}; + +grpc_call_credentials *grpc_md_only_test_credentials_create( + const char *md_key, const char *md_value, int is_async) { + grpc_md_only_test_credentials *c = + gpr_malloc(sizeof(grpc_md_only_test_credentials)); + memset(c, 0, sizeof(grpc_md_only_test_credentials)); + c->base.type = GRPC_CALL_CREDENTIALS_TYPE_OAUTH2; + c->base.vtable = &md_only_test_vtable; + gpr_ref_init(&c->base.refcount, 1); + c->md_store = grpc_credentials_md_store_create(1); + grpc_credentials_md_store_add_cstrings(c->md_store, md_key, md_value); + c->is_async = is_async; + return &c->base; +} + diff --git a/src/core/lib/security/credentials/fake/fake_credentials.h b/src/core/lib/security/credentials/fake/fake_credentials.h new file mode 100644 index 00000000000..10c2a0b5ce6 --- /dev/null +++ b/src/core/lib/security/credentials/fake/fake_credentials.h @@ -0,0 +1,56 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_CREDENTIALS_H +#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_CREDENTIALS_H + +#include "src/core/lib/security/credentials/credentials.h" + +/* -- Fake transport security credentials. -- */ + +/* Creates a fake transport security credentials object for testing. */ +grpc_channel_credentials *grpc_fake_transport_security_credentials_create(void); +/* Creates a fake server transport security credentials object for testing. */ +grpc_server_credentials *grpc_fake_transport_security_server_credentials_create( + void); + +/* -- Metadata-only Test credentials. -- */ + +typedef struct { + grpc_call_credentials base; + grpc_credentials_md_store *md_store; + int is_async; +} grpc_md_only_test_credentials; + +#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_CREDENTIALS_H + diff --git a/src/core/lib/security/credentials_posix.c b/src/core/lib/security/credentials/google_default/credentials_posix.c similarity index 96% rename from src/core/lib/security/credentials_posix.c rename to src/core/lib/security/credentials/google_default/credentials_posix.c index a07de182a0d..42c9d7f997a 100644 --- a/src/core/lib/security/credentials_posix.c +++ b/src/core/lib/security/credentials/google_default/credentials_posix.c @@ -35,7 +35,7 @@ #ifdef GPR_POSIX_FILE -#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/credentials/google_default/google_default_credentials.h" #include #include diff --git a/src/core/lib/security/credentials_win32.c b/src/core/lib/security/credentials/google_default/credentials_win32.c similarity index 96% rename from src/core/lib/security/credentials_win32.c rename to src/core/lib/security/credentials/google_default/credentials_win32.c index d29847af38a..cd8b48080a4 100644 --- a/src/core/lib/security/credentials_win32.c +++ b/src/core/lib/security/credentials/google_default/credentials_win32.c @@ -35,7 +35,7 @@ #ifdef GPR_WIN32 -#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/credentials/google_default/google_default_credentials.h" #include #include diff --git a/src/core/lib/security/google_default_credentials.c b/src/core/lib/security/credentials/google_default/google_default_credentials.c similarity index 97% rename from src/core/lib/security/google_default_credentials.c rename to src/core/lib/security/credentials/google_default/google_default_credentials.c index 236f1d7fa7e..da23bba62b9 100644 --- a/src/core/lib/security/google_default_credentials.c +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/credentials/credentials.h" #include @@ -41,6 +41,8 @@ #include "src/core/lib/http/httpcli.h" #include "src/core/lib/http/parser.h" +#include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" +#include "src/core/lib/security/credentials/jwt/jwt_credentials.h" #include "src/core/lib/support/env.h" #include "src/core/lib/support/load_file.h" #include "src/core/lib/surface/api_trace.h" diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.h b/src/core/lib/security/credentials/google_default/google_default_credentials.h new file mode 100644 index 00000000000..33e8c2ec8d6 --- /dev/null +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.h @@ -0,0 +1,47 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_GOOGLE_DEFAULT_CREDENTIALS_H +#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_GOOGLE_DEFAULT_CREDENTIALS_H + +#include "src/core/lib/security/credentials/credentials.h" + +#define GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY "gcloud" +#define GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE \ + "application_default_credentials.json" + +void grpc_flush_cached_google_default_credentials(void); + +#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_GOOGLE_DEFAULT_CREDENTIALS_H + + diff --git a/src/core/lib/security/credentials/iam/iam_credentials.c b/src/core/lib/security/credentials/iam/iam_credentials.c new file mode 100644 index 00000000000..ec0f2841f21 --- /dev/null +++ b/src/core/lib/security/credentials/iam/iam_credentials.c @@ -0,0 +1,87 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/security/credentials/iam/iam_credentials.h" + +#include + +#include "src/core/lib/surface/api_trace.h" + +#include +#include +#include +#include + +static void iam_destruct(grpc_call_credentials *creds) { + grpc_google_iam_credentials *c = (grpc_google_iam_credentials *)creds; + grpc_credentials_md_store_unref(c->iam_md); +} + +static void iam_get_request_metadata(grpc_exec_ctx *exec_ctx, + grpc_call_credentials *creds, + grpc_pollset *pollset, + grpc_auth_metadata_context context, + grpc_credentials_metadata_cb cb, + void *user_data) { + grpc_google_iam_credentials *c = (grpc_google_iam_credentials *)creds; + cb(exec_ctx, user_data, c->iam_md->entries, c->iam_md->num_entries, + GRPC_CREDENTIALS_OK); +} + +static grpc_call_credentials_vtable iam_vtable = {iam_destruct, + iam_get_request_metadata}; + +grpc_call_credentials *grpc_google_iam_credentials_create( + const char *token, const char *authority_selector, void *reserved) { + grpc_google_iam_credentials *c; + GRPC_API_TRACE( + "grpc_iam_credentials_create(token=%s, authority_selector=%s, " + "reserved=%p)", + 3, (token, authority_selector, reserved)); + GPR_ASSERT(reserved == NULL); + GPR_ASSERT(token != NULL); + GPR_ASSERT(authority_selector != NULL); + c = gpr_malloc(sizeof(grpc_google_iam_credentials)); + memset(c, 0, sizeof(grpc_google_iam_credentials)); + c->base.type = GRPC_CALL_CREDENTIALS_TYPE_IAM; + c->base.vtable = &iam_vtable; + gpr_ref_init(&c->base.refcount, 1); + c->iam_md = grpc_credentials_md_store_create(2); + grpc_credentials_md_store_add_cstrings( + c->iam_md, GRPC_IAM_AUTHORIZATION_TOKEN_METADATA_KEY, token); + grpc_credentials_md_store_add_cstrings( + c->iam_md, GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY, authority_selector); + return &c->base; +} + + diff --git a/src/core/lib/security/credentials/iam/iam_credentials.h b/src/core/lib/security/credentials/iam/iam_credentials.h new file mode 100644 index 00000000000..7110eaf4781 --- /dev/null +++ b/src/core/lib/security/credentials/iam/iam_credentials.h @@ -0,0 +1,47 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_IAM_CREDENTIALS_H +#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_IAM_CREDENTIALS_H + +#include "src/core/lib/security/credentials/credentials.h" + +typedef struct { + grpc_call_credentials base; + grpc_credentials_md_store *iam_md; +} grpc_google_iam_credentials; + +#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_IAM_CREDENTIALS_H + + + diff --git a/src/core/lib/security/json_token.c b/src/core/lib/security/credentials/jwt/json_token.c similarity index 74% rename from src/core/lib/security/json_token.c rename to src/core/lib/security/credentials/jwt/json_token.c index d5bc2c8d608..fd3d0d6a64f 100644 --- a/src/core/lib/security/json_token.c +++ b/src/core/lib/security/credentials/jwt/json_token.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/security/json_token.h" +#include "src/core/lib/security/credentials/jwt/json_token.h" #include @@ -39,7 +39,8 @@ #include #include -#include "src/core/lib/security/b64.h" +#include "src/core/lib/security/util/b64.h" +#include "src/core/lib/security/util/json_util.h" #include "src/core/lib/support/string.h" #include @@ -66,28 +67,6 @@ static grpc_jwt_encode_and_sign_override g_jwt_encode_and_sign_override = NULL; /* --- grpc_auth_json_key. --- */ -static const char *json_get_string_property(const grpc_json *json, - const char *prop_name) { - grpc_json *child; - for (child = json->child; child != NULL; child = child->next) { - if (strcmp(child->key, prop_name) == 0) break; - } - if (child == NULL || child->type != GRPC_JSON_STRING) { - gpr_log(GPR_ERROR, "Invalid or missing %s property.", prop_name); - return NULL; - } - return child->value; -} - -static int set_json_key_string_property(const grpc_json *json, - const char *prop_name, - char **json_key_field) { - const char *prop_value = json_get_string_property(json, prop_name); - if (prop_value == NULL) return 0; - *json_key_field = gpr_strdup(prop_value); - return 1; -} - int grpc_auth_json_key_is_valid(const grpc_auth_json_key *json_key) { return (json_key != NULL) && strcmp(json_key->type, GRPC_AUTH_JSON_TYPE_INVALID); @@ -106,22 +85,22 @@ grpc_auth_json_key grpc_auth_json_key_create_from_json(const grpc_json *json) { goto end; } - prop_value = json_get_string_property(json, "type"); + prop_value = grpc_json_get_string_property(json, "type"); if (prop_value == NULL || strcmp(prop_value, GRPC_AUTH_JSON_TYPE_SERVICE_ACCOUNT)) { goto end; } result.type = GRPC_AUTH_JSON_TYPE_SERVICE_ACCOUNT; - if (!set_json_key_string_property(json, "private_key_id", - &result.private_key_id) || - !set_json_key_string_property(json, "client_id", &result.client_id) || - !set_json_key_string_property(json, "client_email", - &result.client_email)) { + if (!grpc_copy_json_string_property(json, "private_key_id", + &result.private_key_id) || + !grpc_copy_json_string_property(json, "client_id", &result.client_id) || + !grpc_copy_json_string_property(json, "client_email", + &result.client_email)) { goto end; } - prop_value = json_get_string_property(json, "private_key"); + prop_value = grpc_json_get_string_property(json, "private_key"); if (prop_value == NULL) { goto end; } @@ -340,72 +319,3 @@ void grpc_jwt_encode_and_sign_set_override( g_jwt_encode_and_sign_override = func; } -/* --- grpc_auth_refresh_token --- */ - -int grpc_auth_refresh_token_is_valid( - const grpc_auth_refresh_token *refresh_token) { - return (refresh_token != NULL) && - strcmp(refresh_token->type, GRPC_AUTH_JSON_TYPE_INVALID); -} - -grpc_auth_refresh_token grpc_auth_refresh_token_create_from_json( - const grpc_json *json) { - grpc_auth_refresh_token result; - const char *prop_value; - int success = 0; - - memset(&result, 0, sizeof(grpc_auth_refresh_token)); - result.type = GRPC_AUTH_JSON_TYPE_INVALID; - if (json == NULL) { - gpr_log(GPR_ERROR, "Invalid json."); - goto end; - } - - prop_value = json_get_string_property(json, "type"); - if (prop_value == NULL || - strcmp(prop_value, GRPC_AUTH_JSON_TYPE_AUTHORIZED_USER)) { - goto end; - } - result.type = GRPC_AUTH_JSON_TYPE_AUTHORIZED_USER; - - if (!set_json_key_string_property(json, "client_secret", - &result.client_secret) || - !set_json_key_string_property(json, "client_id", &result.client_id) || - !set_json_key_string_property(json, "refresh_token", - &result.refresh_token)) { - goto end; - } - success = 1; - -end: - if (!success) grpc_auth_refresh_token_destruct(&result); - return result; -} - -grpc_auth_refresh_token grpc_auth_refresh_token_create_from_string( - const char *json_string) { - char *scratchpad = gpr_strdup(json_string); - grpc_json *json = grpc_json_parse_string(scratchpad); - grpc_auth_refresh_token result = - grpc_auth_refresh_token_create_from_json(json); - if (json != NULL) grpc_json_destroy(json); - gpr_free(scratchpad); - return result; -} - -void grpc_auth_refresh_token_destruct(grpc_auth_refresh_token *refresh_token) { - if (refresh_token == NULL) return; - refresh_token->type = GRPC_AUTH_JSON_TYPE_INVALID; - if (refresh_token->client_id != NULL) { - gpr_free(refresh_token->client_id); - refresh_token->client_id = NULL; - } - if (refresh_token->client_secret != NULL) { - gpr_free(refresh_token->client_secret); - refresh_token->client_secret = NULL; - } - if (refresh_token->refresh_token != NULL) { - gpr_free(refresh_token->refresh_token); - refresh_token->refresh_token = NULL; - } -} diff --git a/src/core/lib/security/json_token.h b/src/core/lib/security/credentials/jwt/json_token.h similarity index 74% rename from src/core/lib/security/json_token.h rename to src/core/lib/security/credentials/jwt/json_token.h index 123fa652fd8..07fc5bf0e01 100644 --- a/src/core/lib/security/json_token.h +++ b/src/core/lib/security/credentials/jwt/json_token.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_SECURITY_JSON_TOKEN_H -#define GRPC_CORE_LIB_SECURITY_JSON_TOKEN_H +#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JSON_TOKEN_H +#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JSON_TOKEN_H #include #include @@ -43,10 +43,6 @@ #define GRPC_JWT_OAUTH2_AUDIENCE "https://www.googleapis.com/oauth2/v3/token" -#define GRPC_AUTH_JSON_TYPE_INVALID "invalid" -#define GRPC_AUTH_JSON_TYPE_SERVICE_ACCOUNT "service_account" -#define GRPC_AUTH_JSON_TYPE_AUTHORIZED_USER "authorized_user" - /* --- auth_json_key parsing. --- */ typedef struct { @@ -89,30 +85,4 @@ typedef char *(*grpc_jwt_encode_and_sign_override)( void grpc_jwt_encode_and_sign_set_override( grpc_jwt_encode_and_sign_override func); -/* --- auth_refresh_token parsing. --- */ - -typedef struct { - const char *type; - char *client_id; - char *client_secret; - char *refresh_token; -} grpc_auth_refresh_token; - -/* Returns 1 if the object is valid, 0 otherwise. */ -int grpc_auth_refresh_token_is_valid( - const grpc_auth_refresh_token *refresh_token); - -/* Creates a refresh token object from string. Returns an invalid object if a - parsing error has been encountered. */ -grpc_auth_refresh_token grpc_auth_refresh_token_create_from_string( - const char *json_string); - -/* Creates a refresh token object from parsed json. Returns an invalid object if - a parsing error has been encountered. */ -grpc_auth_refresh_token grpc_auth_refresh_token_create_from_json( - const grpc_json *json); - -/* Destructs the object. */ -void grpc_auth_refresh_token_destruct(grpc_auth_refresh_token *refresh_token); - -#endif /* GRPC_CORE_LIB_SECURITY_JSON_TOKEN_H */ +#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JSON_TOKEN_H */ diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.c b/src/core/lib/security/credentials/jwt/jwt_credentials.c new file mode 100644 index 00000000000..9fd0527a52a --- /dev/null +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.c @@ -0,0 +1,161 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/security/credentials/jwt/jwt_credentials.h" + +#include + +#include "src/core/lib/surface/api_trace.h" + +#include +#include +#include +#include + +static void jwt_reset_cache(grpc_service_account_jwt_access_credentials *c) { + if (c->cached.jwt_md != NULL) { + grpc_credentials_md_store_unref(c->cached.jwt_md); + c->cached.jwt_md = NULL; + } + if (c->cached.service_url != NULL) { + gpr_free(c->cached.service_url); + c->cached.service_url = NULL; + } + c->cached.jwt_expiration = gpr_inf_past(GPR_CLOCK_REALTIME); +} + +static void jwt_destruct(grpc_call_credentials *creds) { + grpc_service_account_jwt_access_credentials *c = + (grpc_service_account_jwt_access_credentials *)creds; + grpc_auth_json_key_destruct(&c->key); + jwt_reset_cache(c); + gpr_mu_destroy(&c->cache_mu); +} + +static void jwt_get_request_metadata(grpc_exec_ctx *exec_ctx, + grpc_call_credentials *creds, + grpc_pollset *pollset, + grpc_auth_metadata_context context, + grpc_credentials_metadata_cb cb, + void *user_data) { + grpc_service_account_jwt_access_credentials *c = + (grpc_service_account_jwt_access_credentials *)creds; + gpr_timespec refresh_threshold = gpr_time_from_seconds( + GRPC_SECURE_TOKEN_REFRESH_THRESHOLD_SECS, GPR_TIMESPAN); + + /* See if we can return a cached jwt. */ + grpc_credentials_md_store *jwt_md = NULL; + { + gpr_mu_lock(&c->cache_mu); + if (c->cached.service_url != NULL && + strcmp(c->cached.service_url, context.service_url) == 0 && + c->cached.jwt_md != NULL && + (gpr_time_cmp(gpr_time_sub(c->cached.jwt_expiration, + gpr_now(GPR_CLOCK_REALTIME)), + refresh_threshold) > 0)) { + jwt_md = grpc_credentials_md_store_ref(c->cached.jwt_md); + } + gpr_mu_unlock(&c->cache_mu); + } + + if (jwt_md == NULL) { + char *jwt = NULL; + /* Generate a new jwt. */ + gpr_mu_lock(&c->cache_mu); + jwt_reset_cache(c); + jwt = grpc_jwt_encode_and_sign(&c->key, context.service_url, + c->jwt_lifetime, NULL); + if (jwt != NULL) { + char *md_value; + gpr_asprintf(&md_value, "Bearer %s", jwt); + gpr_free(jwt); + c->cached.jwt_expiration = + gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), c->jwt_lifetime); + c->cached.service_url = gpr_strdup(context.service_url); + c->cached.jwt_md = grpc_credentials_md_store_create(1); + grpc_credentials_md_store_add_cstrings( + c->cached.jwt_md, GRPC_AUTHORIZATION_METADATA_KEY, md_value); + gpr_free(md_value); + jwt_md = grpc_credentials_md_store_ref(c->cached.jwt_md); + } + gpr_mu_unlock(&c->cache_mu); + } + + if (jwt_md != NULL) { + cb(exec_ctx, user_data, jwt_md->entries, jwt_md->num_entries, + GRPC_CREDENTIALS_OK); + grpc_credentials_md_store_unref(jwt_md); + } else { + cb(exec_ctx, user_data, NULL, 0, GRPC_CREDENTIALS_ERROR); + } +} + +static grpc_call_credentials_vtable jwt_vtable = {jwt_destruct, + jwt_get_request_metadata}; + +grpc_call_credentials * +grpc_service_account_jwt_access_credentials_create_from_auth_json_key( + grpc_auth_json_key key, gpr_timespec token_lifetime) { + grpc_service_account_jwt_access_credentials *c; + if (!grpc_auth_json_key_is_valid(&key)) { + gpr_log(GPR_ERROR, "Invalid input for jwt credentials creation"); + return NULL; + } + c = gpr_malloc(sizeof(grpc_service_account_jwt_access_credentials)); + memset(c, 0, sizeof(grpc_service_account_jwt_access_credentials)); + c->base.type = GRPC_CALL_CREDENTIALS_TYPE_JWT; + gpr_ref_init(&c->base.refcount, 1); + c->base.vtable = &jwt_vtable; + c->key = key; + c->jwt_lifetime = token_lifetime; + gpr_mu_init(&c->cache_mu); + jwt_reset_cache(c); + return &c->base; +} + +grpc_call_credentials *grpc_service_account_jwt_access_credentials_create( + const char *json_key, gpr_timespec token_lifetime, void *reserved) { + GRPC_API_TRACE( + "grpc_service_account_jwt_access_credentials_create(" + "json_key=%s, " + "token_lifetime=" + "gpr_timespec { tv_sec: %lld, tv_nsec: %d, clock_type: %d }, " + "reserved=%p)", + 5, + (json_key, (long long)token_lifetime.tv_sec, (int)token_lifetime.tv_nsec, + (int)token_lifetime.clock_type, reserved)); + GPR_ASSERT(reserved == NULL); + return grpc_service_account_jwt_access_credentials_create_from_auth_json_key( + grpc_auth_json_key_create_from_string(json_key), token_lifetime); +} + diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.h b/src/core/lib/security/credentials/jwt/jwt_credentials.h new file mode 100644 index 00000000000..6faf6764149 --- /dev/null +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.h @@ -0,0 +1,63 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_CREDENTIALS_H +#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_CREDENTIALS_H + +#include "src/core/lib/security/credentials/credentials.h" +#include "src/core/lib/security/credentials/jwt/json_token.h" + +typedef struct { + grpc_call_credentials base; + + // Have a simple cache for now with just 1 entry. We could have a map based on + // the service_url for a more sophisticated one. + gpr_mu cache_mu; + struct { + grpc_credentials_md_store *jwt_md; + char *service_url; + gpr_timespec jwt_expiration; + } cached; + + grpc_auth_json_key key; + gpr_timespec jwt_lifetime; +} grpc_service_account_jwt_access_credentials; + +// Private constructor for jwt credentials from an already parsed json key. +// Takes ownership of the key. +grpc_call_credentials * +grpc_service_account_jwt_access_credentials_create_from_auth_json_key( + grpc_auth_json_key key, gpr_timespec token_lifetime); + +#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_CREDENTIALS_H + diff --git a/src/core/lib/security/jwt_verifier.c b/src/core/lib/security/credentials/jwt/jwt_verifier.c similarity index 99% rename from src/core/lib/security/jwt_verifier.c rename to src/core/lib/security/credentials/jwt/jwt_verifier.c index 0e012294de7..cd6c7ce3921 100644 --- a/src/core/lib/security/jwt_verifier.c +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.c @@ -31,13 +31,13 @@ * */ -#include "src/core/lib/security/jwt_verifier.h" +#include "src/core/lib/security/credentials/jwt/jwt_verifier.h" #include #include #include "src/core/lib/http/httpcli.h" -#include "src/core/lib/security/b64.h" +#include "src/core/lib/security/util/b64.h" #include "src/core/lib/tsi/ssl_types.h" #include diff --git a/src/core/lib/security/jwt_verifier.h b/src/core/lib/security/credentials/jwt/jwt_verifier.h similarity index 96% rename from src/core/lib/security/jwt_verifier.h rename to src/core/lib/security/credentials/jwt/jwt_verifier.h index 98a4f6b1162..b0f6d1c240d 100644 --- a/src/core/lib/security/jwt_verifier.h +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_SECURITY_JWT_VERIFIER_H -#define GRPC_CORE_LIB_SECURITY_JWT_VERIFIER_H +#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_VERIFIER_H +#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_VERIFIER_H #include "src/core/lib/iomgr/pollset.h" #include "src/core/lib/json/json.h" @@ -133,4 +133,4 @@ grpc_jwt_claims *grpc_jwt_claims_from_json(grpc_json *json, gpr_slice buffer); grpc_jwt_verifier_status grpc_jwt_claims_check(const grpc_jwt_claims *claims, const char *audience); -#endif /* GRPC_CORE_LIB_SECURITY_JWT_VERIFIER_H */ +#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_VERIFIER_H */ diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c new file mode 100644 index 00000000000..0984d1f53fa --- /dev/null +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c @@ -0,0 +1,430 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" + +#include + +#include "src/core/lib/security/util/json_util.h" +#include "src/core/lib/surface/api_trace.h" + +#include +#include +#include + +// +// Auth Refresh Token. +// + +int grpc_auth_refresh_token_is_valid( + const grpc_auth_refresh_token *refresh_token) { + return (refresh_token != NULL) && + strcmp(refresh_token->type, GRPC_AUTH_JSON_TYPE_INVALID); +} + +grpc_auth_refresh_token grpc_auth_refresh_token_create_from_json( + const grpc_json *json) { + grpc_auth_refresh_token result; + const char *prop_value; + int success = 0; + + memset(&result, 0, sizeof(grpc_auth_refresh_token)); + result.type = GRPC_AUTH_JSON_TYPE_INVALID; + if (json == NULL) { + gpr_log(GPR_ERROR, "Invalid json."); + goto end; + } + + prop_value = grpc_json_get_string_property(json, "type"); + if (prop_value == NULL || + strcmp(prop_value, GRPC_AUTH_JSON_TYPE_AUTHORIZED_USER)) { + goto end; + } + result.type = GRPC_AUTH_JSON_TYPE_AUTHORIZED_USER; + + if (!grpc_copy_json_string_property(json, "client_secret", + &result.client_secret) || + !grpc_copy_json_string_property(json, "client_id", &result.client_id) || + !grpc_copy_json_string_property(json, "refresh_token", + &result.refresh_token)) { + goto end; + } + success = 1; + +end: + if (!success) grpc_auth_refresh_token_destruct(&result); + return result; +} + +grpc_auth_refresh_token grpc_auth_refresh_token_create_from_string( + const char *json_string) { + char *scratchpad = gpr_strdup(json_string); + grpc_json *json = grpc_json_parse_string(scratchpad); + grpc_auth_refresh_token result = + grpc_auth_refresh_token_create_from_json(json); + if (json != NULL) grpc_json_destroy(json); + gpr_free(scratchpad); + return result; +} + +void grpc_auth_refresh_token_destruct(grpc_auth_refresh_token *refresh_token) { + if (refresh_token == NULL) return; + refresh_token->type = GRPC_AUTH_JSON_TYPE_INVALID; + if (refresh_token->client_id != NULL) { + gpr_free(refresh_token->client_id); + refresh_token->client_id = NULL; + } + if (refresh_token->client_secret != NULL) { + gpr_free(refresh_token->client_secret); + refresh_token->client_secret = NULL; + } + if (refresh_token->refresh_token != NULL) { + gpr_free(refresh_token->refresh_token); + refresh_token->refresh_token = NULL; + } +} + +// +// Oauth2 Token Fetcher credentials. +// + +static void oauth2_token_fetcher_destruct(grpc_call_credentials *creds) { + grpc_oauth2_token_fetcher_credentials *c = + (grpc_oauth2_token_fetcher_credentials *)creds; + grpc_credentials_md_store_unref(c->access_token_md); + gpr_mu_destroy(&c->mu); + grpc_httpcli_context_destroy(&c->httpcli_context); +} + +grpc_credentials_status +grpc_oauth2_token_fetcher_credentials_parse_server_response( + const grpc_http_response *response, grpc_credentials_md_store **token_md, + gpr_timespec *token_lifetime) { + char *null_terminated_body = NULL; + char *new_access_token = NULL; + grpc_credentials_status status = GRPC_CREDENTIALS_OK; + grpc_json *json = NULL; + + if (response == NULL) { + gpr_log(GPR_ERROR, "Received NULL response."); + status = GRPC_CREDENTIALS_ERROR; + goto end; + } + + if (response->body_length > 0) { + null_terminated_body = gpr_malloc(response->body_length + 1); + null_terminated_body[response->body_length] = '\0'; + memcpy(null_terminated_body, response->body, response->body_length); + } + + if (response->status != 200) { + gpr_log(GPR_ERROR, "Call to http server ended with error %d [%s].", + response->status, + null_terminated_body != NULL ? null_terminated_body : ""); + status = GRPC_CREDENTIALS_ERROR; + goto end; + } else { + grpc_json *access_token = NULL; + grpc_json *token_type = NULL; + grpc_json *expires_in = NULL; + grpc_json *ptr; + json = grpc_json_parse_string(null_terminated_body); + if (json == NULL) { + gpr_log(GPR_ERROR, "Could not parse JSON from %s", null_terminated_body); + status = GRPC_CREDENTIALS_ERROR; + goto end; + } + if (json->type != GRPC_JSON_OBJECT) { + gpr_log(GPR_ERROR, "Response should be a JSON object"); + status = GRPC_CREDENTIALS_ERROR; + goto end; + } + for (ptr = json->child; ptr; ptr = ptr->next) { + if (strcmp(ptr->key, "access_token") == 0) { + access_token = ptr; + } else if (strcmp(ptr->key, "token_type") == 0) { + token_type = ptr; + } else if (strcmp(ptr->key, "expires_in") == 0) { + expires_in = ptr; + } + } + if (access_token == NULL || access_token->type != GRPC_JSON_STRING) { + gpr_log(GPR_ERROR, "Missing or invalid access_token in JSON."); + status = GRPC_CREDENTIALS_ERROR; + goto end; + } + if (token_type == NULL || token_type->type != GRPC_JSON_STRING) { + gpr_log(GPR_ERROR, "Missing or invalid token_type in JSON."); + status = GRPC_CREDENTIALS_ERROR; + goto end; + } + if (expires_in == NULL || expires_in->type != GRPC_JSON_NUMBER) { + gpr_log(GPR_ERROR, "Missing or invalid expires_in in JSON."); + status = GRPC_CREDENTIALS_ERROR; + goto end; + } + gpr_asprintf(&new_access_token, "%s %s", token_type->value, + access_token->value); + token_lifetime->tv_sec = strtol(expires_in->value, NULL, 10); + token_lifetime->tv_nsec = 0; + token_lifetime->clock_type = GPR_TIMESPAN; + if (*token_md != NULL) grpc_credentials_md_store_unref(*token_md); + *token_md = grpc_credentials_md_store_create(1); + grpc_credentials_md_store_add_cstrings( + *token_md, GRPC_AUTHORIZATION_METADATA_KEY, new_access_token); + status = GRPC_CREDENTIALS_OK; + } + +end: + if (status != GRPC_CREDENTIALS_OK && (*token_md != NULL)) { + grpc_credentials_md_store_unref(*token_md); + *token_md = NULL; + } + if (null_terminated_body != NULL) gpr_free(null_terminated_body); + if (new_access_token != NULL) gpr_free(new_access_token); + if (json != NULL) grpc_json_destroy(json); + return status; +} + +static void on_oauth2_token_fetcher_http_response( + grpc_exec_ctx *exec_ctx, void *user_data, + const grpc_http_response *response) { + grpc_credentials_metadata_request *r = + (grpc_credentials_metadata_request *)user_data; + grpc_oauth2_token_fetcher_credentials *c = + (grpc_oauth2_token_fetcher_credentials *)r->creds; + gpr_timespec token_lifetime; + grpc_credentials_status status; + + gpr_mu_lock(&c->mu); + status = grpc_oauth2_token_fetcher_credentials_parse_server_response( + response, &c->access_token_md, &token_lifetime); + if (status == GRPC_CREDENTIALS_OK) { + c->token_expiration = + gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), token_lifetime); + r->cb(exec_ctx, r->user_data, c->access_token_md->entries, + c->access_token_md->num_entries, status); + } else { + c->token_expiration = gpr_inf_past(GPR_CLOCK_REALTIME); + r->cb(exec_ctx, r->user_data, NULL, 0, status); + } + gpr_mu_unlock(&c->mu); + grpc_credentials_metadata_request_destroy(r); +} + +static void oauth2_token_fetcher_get_request_metadata( + grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, + grpc_pollset *pollset, grpc_auth_metadata_context context, + grpc_credentials_metadata_cb cb, void *user_data) { + grpc_oauth2_token_fetcher_credentials *c = + (grpc_oauth2_token_fetcher_credentials *)creds; + gpr_timespec refresh_threshold = gpr_time_from_seconds( + GRPC_SECURE_TOKEN_REFRESH_THRESHOLD_SECS, GPR_TIMESPAN); + grpc_credentials_md_store *cached_access_token_md = NULL; + { + gpr_mu_lock(&c->mu); + if (c->access_token_md != NULL && + (gpr_time_cmp( + gpr_time_sub(c->token_expiration, gpr_now(GPR_CLOCK_REALTIME)), + refresh_threshold) > 0)) { + cached_access_token_md = + grpc_credentials_md_store_ref(c->access_token_md); + } + gpr_mu_unlock(&c->mu); + } + if (cached_access_token_md != NULL) { + cb(exec_ctx, user_data, cached_access_token_md->entries, + cached_access_token_md->num_entries, GRPC_CREDENTIALS_OK); + grpc_credentials_md_store_unref(cached_access_token_md); + } else { + c->fetch_func( + exec_ctx, + grpc_credentials_metadata_request_create(creds, cb, user_data), + &c->httpcli_context, pollset, on_oauth2_token_fetcher_http_response, + gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), refresh_threshold)); + } +} + +static void init_oauth2_token_fetcher(grpc_oauth2_token_fetcher_credentials *c, + grpc_fetch_oauth2_func fetch_func) { + memset(c, 0, sizeof(grpc_oauth2_token_fetcher_credentials)); + c->base.type = GRPC_CALL_CREDENTIALS_TYPE_OAUTH2; + gpr_ref_init(&c->base.refcount, 1); + gpr_mu_init(&c->mu); + c->token_expiration = gpr_inf_past(GPR_CLOCK_REALTIME); + c->fetch_func = fetch_func; + grpc_httpcli_context_init(&c->httpcli_context); +} + +// +// Google Compute Engine credentials. +// + +static grpc_call_credentials_vtable compute_engine_vtable = { + oauth2_token_fetcher_destruct, oauth2_token_fetcher_get_request_metadata}; + +static void compute_engine_fetch_oauth2( + grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *metadata_req, + grpc_httpcli_context *httpcli_context, grpc_pollset *pollset, + grpc_httpcli_response_cb response_cb, gpr_timespec deadline) { + grpc_http_header header = {"Metadata-Flavor", "Google"}; + grpc_httpcli_request request; + memset(&request, 0, sizeof(grpc_httpcli_request)); + request.host = GRPC_COMPUTE_ENGINE_METADATA_HOST; + request.http.path = GRPC_COMPUTE_ENGINE_METADATA_TOKEN_PATH; + request.http.hdr_count = 1; + request.http.hdrs = &header; + grpc_httpcli_get(exec_ctx, httpcli_context, pollset, &request, deadline, + response_cb, metadata_req); +} + +grpc_call_credentials *grpc_google_compute_engine_credentials_create( + void *reserved) { + grpc_oauth2_token_fetcher_credentials *c = + gpr_malloc(sizeof(grpc_oauth2_token_fetcher_credentials)); + GRPC_API_TRACE("grpc_compute_engine_credentials_create(reserved=%p)", 1, + (reserved)); + GPR_ASSERT(reserved == NULL); + init_oauth2_token_fetcher(c, compute_engine_fetch_oauth2); + c->base.vtable = &compute_engine_vtable; + return &c->base; +} + +// +// Google Refresh Token credentials. +// + +static void refresh_token_destruct(grpc_call_credentials *creds) { + grpc_google_refresh_token_credentials *c = + (grpc_google_refresh_token_credentials *)creds; + grpc_auth_refresh_token_destruct(&c->refresh_token); + oauth2_token_fetcher_destruct(&c->base.base); +} + +static grpc_call_credentials_vtable refresh_token_vtable = { + refresh_token_destruct, oauth2_token_fetcher_get_request_metadata}; + +static void refresh_token_fetch_oauth2( + grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *metadata_req, + grpc_httpcli_context *httpcli_context, grpc_pollset *pollset, + grpc_httpcli_response_cb response_cb, gpr_timespec deadline) { + grpc_google_refresh_token_credentials *c = + (grpc_google_refresh_token_credentials *)metadata_req->creds; + grpc_http_header header = {"Content-Type", + "application/x-www-form-urlencoded"}; + grpc_httpcli_request request; + char *body = NULL; + gpr_asprintf(&body, GRPC_REFRESH_TOKEN_POST_BODY_FORMAT_STRING, + c->refresh_token.client_id, c->refresh_token.client_secret, + c->refresh_token.refresh_token); + memset(&request, 0, sizeof(grpc_httpcli_request)); + request.host = GRPC_GOOGLE_OAUTH2_SERVICE_HOST; + request.http.path = GRPC_GOOGLE_OAUTH2_SERVICE_TOKEN_PATH; + request.http.hdr_count = 1; + request.http.hdrs = &header; + request.handshaker = &grpc_httpcli_ssl; + grpc_httpcli_post(exec_ctx, httpcli_context, pollset, &request, body, + strlen(body), deadline, response_cb, metadata_req); + gpr_free(body); +} + +grpc_call_credentials * +grpc_refresh_token_credentials_create_from_auth_refresh_token( + grpc_auth_refresh_token refresh_token) { + grpc_google_refresh_token_credentials *c; + if (!grpc_auth_refresh_token_is_valid(&refresh_token)) { + gpr_log(GPR_ERROR, "Invalid input for refresh token credentials creation"); + return NULL; + } + c = gpr_malloc(sizeof(grpc_google_refresh_token_credentials)); + memset(c, 0, sizeof(grpc_google_refresh_token_credentials)); + init_oauth2_token_fetcher(&c->base, refresh_token_fetch_oauth2); + c->base.base.vtable = &refresh_token_vtable; + c->refresh_token = refresh_token; + return &c->base.base; +} + +grpc_call_credentials *grpc_google_refresh_token_credentials_create( + const char *json_refresh_token, void *reserved) { + GRPC_API_TRACE( + "grpc_refresh_token_credentials_create(json_refresh_token=%s, " + "reserved=%p)", + 2, (json_refresh_token, reserved)); + GPR_ASSERT(reserved == NULL); + return grpc_refresh_token_credentials_create_from_auth_refresh_token( + grpc_auth_refresh_token_create_from_string(json_refresh_token)); +} + +// +// Oauth2 Access Token credentials. +// + +static void access_token_destruct(grpc_call_credentials *creds) { + grpc_access_token_credentials *c = (grpc_access_token_credentials *)creds; + grpc_credentials_md_store_unref(c->access_token_md); +} + +static void access_token_get_request_metadata( + grpc_exec_ctx *exec_ctx, grpc_call_credentials *creds, + grpc_pollset *pollset, grpc_auth_metadata_context context, + grpc_credentials_metadata_cb cb, void *user_data) { + grpc_access_token_credentials *c = (grpc_access_token_credentials *)creds; + cb(exec_ctx, user_data, c->access_token_md->entries, 1, GRPC_CREDENTIALS_OK); +} + +static grpc_call_credentials_vtable access_token_vtable = { + access_token_destruct, access_token_get_request_metadata}; + +grpc_call_credentials *grpc_access_token_credentials_create( + const char *access_token, void *reserved) { + grpc_access_token_credentials *c = + gpr_malloc(sizeof(grpc_access_token_credentials)); + char *token_md_value; + GRPC_API_TRACE( + "grpc_access_token_credentials_create(access_token=%s, " + "reserved=%p)", + 2, (access_token, reserved)); + GPR_ASSERT(reserved == NULL); + memset(c, 0, sizeof(grpc_access_token_credentials)); + c->base.type = GRPC_CALL_CREDENTIALS_TYPE_OAUTH2; + c->base.vtable = &access_token_vtable; + gpr_ref_init(&c->base.refcount, 1); + c->access_token_md = grpc_credentials_md_store_create(1); + gpr_asprintf(&token_md_value, "Bearer %s", access_token); + grpc_credentials_md_store_add_cstrings( + c->access_token_md, GRPC_AUTHORIZATION_METADATA_KEY, token_md_value); + gpr_free(token_md_value); + return &c->base; +} + + diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h new file mode 100644 index 00000000000..6cdcc68514e --- /dev/null +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h @@ -0,0 +1,111 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_CREDENTIALS_H +#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_CREDENTIALS_H + +#include "src/core/lib/json/json.h" +#include "src/core/lib/security/credentials/credentials.h" + +// auth_refresh_token parsing. +typedef struct { + const char *type; + char *client_id; + char *client_secret; + char *refresh_token; +} grpc_auth_refresh_token; + +/// Returns 1 if the object is valid, 0 otherwise. +int grpc_auth_refresh_token_is_valid( + const grpc_auth_refresh_token *refresh_token); + +/// Creates a refresh token object from string. Returns an invalid object if a +/// parsing error has been encountered. +grpc_auth_refresh_token grpc_auth_refresh_token_create_from_string( + const char *json_string); + +/// Creates a refresh token object from parsed json. Returns an invalid object +/// if a parsing error has been encountered. +grpc_auth_refresh_token grpc_auth_refresh_token_create_from_json( + const grpc_json *json); + +/// Destructs the object. +void grpc_auth_refresh_token_destruct(grpc_auth_refresh_token *refresh_token); + +// -- Oauth2 Token Fetcher credentials -- +// +// This object is a base for credentials that need to acquire an oauth2 token +// from an http service. + +typedef void (*grpc_fetch_oauth2_func)(grpc_exec_ctx *exec_ctx, + grpc_credentials_metadata_request *req, + grpc_httpcli_context *http_context, + grpc_pollset *pollset, + grpc_httpcli_response_cb response_cb, + gpr_timespec deadline); +typedef struct { + grpc_call_credentials base; + gpr_mu mu; + grpc_credentials_md_store *access_token_md; + gpr_timespec token_expiration; + grpc_httpcli_context httpcli_context; + grpc_fetch_oauth2_func fetch_func; +} grpc_oauth2_token_fetcher_credentials; + + +// Google refresh token credentials. +typedef struct { + grpc_oauth2_token_fetcher_credentials base; + grpc_auth_refresh_token refresh_token; +} grpc_google_refresh_token_credentials; + +// Access token credentials. +typedef struct { + grpc_call_credentials base; + grpc_credentials_md_store *access_token_md; +} grpc_access_token_credentials; + +// Private constructor for refresh token credentials from an already parsed +// refresh token. Takes ownership of the refresh token. +grpc_call_credentials * +grpc_refresh_token_credentials_create_from_auth_refresh_token( + grpc_auth_refresh_token token); + +// Exposed for testing only. +grpc_credentials_status +grpc_oauth2_token_fetcher_credentials_parse_server_response( + const struct grpc_http_response *response, + grpc_credentials_md_store **token_md, gpr_timespec *token_lifetime); + +#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_CREDENTIALS_H + diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.c b/src/core/lib/security/credentials/plugin/plugin_credentials.c new file mode 100644 index 00000000000..b075e145514 --- /dev/null +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.c @@ -0,0 +1,131 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/security/credentials/plugin/plugin_credentials.h" + +#include + +#include "src/core/lib/surface/api_trace.h" + +#include +#include +#include +#include + +typedef struct { + void *user_data; + grpc_credentials_metadata_cb cb; +} grpc_metadata_plugin_request; + +static void plugin_destruct(grpc_call_credentials *creds) { + grpc_plugin_credentials *c = (grpc_plugin_credentials *)creds; + if (c->plugin.state != NULL && c->plugin.destroy != NULL) { + c->plugin.destroy(c->plugin.state); + } +} + +static void plugin_md_request_metadata_ready(void *request, + const grpc_metadata *md, + size_t num_md, + grpc_status_code status, + const char *error_details) { + /* called from application code */ + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_metadata_plugin_request *r = (grpc_metadata_plugin_request *)request; + if (status != GRPC_STATUS_OK) { + if (error_details != NULL) { + gpr_log(GPR_ERROR, "Getting metadata from plugin failed with error: %s", + error_details); + } + r->cb(&exec_ctx, r->user_data, NULL, 0, GRPC_CREDENTIALS_ERROR); + } else { + size_t i; + grpc_credentials_md *md_array = NULL; + if (num_md > 0) { + md_array = gpr_malloc(num_md * sizeof(grpc_credentials_md)); + for (i = 0; i < num_md; i++) { + md_array[i].key = gpr_slice_from_copied_string(md[i].key); + md_array[i].value = + gpr_slice_from_copied_buffer(md[i].value, md[i].value_length); + } + } + r->cb(&exec_ctx, r->user_data, md_array, num_md, GRPC_CREDENTIALS_OK); + if (md_array != NULL) { + for (i = 0; i < num_md; i++) { + gpr_slice_unref(md_array[i].key); + gpr_slice_unref(md_array[i].value); + } + gpr_free(md_array); + } + } + gpr_free(r); + grpc_exec_ctx_finish(&exec_ctx); +} + +static void plugin_get_request_metadata(grpc_exec_ctx *exec_ctx, + grpc_call_credentials *creds, + grpc_pollset *pollset, + grpc_auth_metadata_context context, + grpc_credentials_metadata_cb cb, + void *user_data) { + grpc_plugin_credentials *c = (grpc_plugin_credentials *)creds; + if (c->plugin.get_metadata != NULL) { + grpc_metadata_plugin_request *request = gpr_malloc(sizeof(*request)); + memset(request, 0, sizeof(*request)); + request->user_data = user_data; + request->cb = cb; + c->plugin.get_metadata(c->plugin.state, context, + plugin_md_request_metadata_ready, request); + } else { + cb(exec_ctx, user_data, NULL, 0, GRPC_CREDENTIALS_OK); + } +} + +static grpc_call_credentials_vtable plugin_vtable = { + plugin_destruct, plugin_get_request_metadata}; + +grpc_call_credentials *grpc_metadata_credentials_create_from_plugin( + grpc_metadata_credentials_plugin plugin, void *reserved) { + grpc_plugin_credentials *c = gpr_malloc(sizeof(*c)); + GRPC_API_TRACE("grpc_metadata_credentials_create_from_plugin(reserved=%p)", 1, + (reserved)); + GPR_ASSERT(reserved == NULL); + memset(c, 0, sizeof(*c)); + c->base.type = plugin.type; + c->base.vtable = &plugin_vtable; + gpr_ref_init(&c->base.refcount, 1); + c->plugin = plugin; + return &c->base; +} + + diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.h b/src/core/lib/security/credentials/plugin/plugin_credentials.h new file mode 100644 index 00000000000..cdabbbd30f7 --- /dev/null +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.h @@ -0,0 +1,48 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_PLUGIN_CREDENTIALS_H +#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_PLUGIN_CREDENTIALS_H + +#include "src/core/lib/security/credentials/credentials.h" + +typedef struct { + grpc_call_credentials base; + grpc_metadata_credentials_plugin plugin; + grpc_credentials_md_store *plugin_md; +} grpc_plugin_credentials; + +#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_PLUGIN_CREDENTIALS_H + + + diff --git a/src/core/lib/security/credentials/ssl/ssl_credentials.c b/src/core/lib/security/credentials/ssl/ssl_credentials.c new file mode 100644 index 00000000000..ee8d2e4365f --- /dev/null +++ b/src/core/lib/security/credentials/ssl/ssl_credentials.c @@ -0,0 +1,244 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/security/credentials/ssl/ssl_credentials.h" + +#include + +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/channel/http_client_filter.h" +#include "src/core/lib/surface/api_trace.h" + +#include +#include + +// +// Utils +// + +static void ssl_copy_key_material(const char *input, unsigned char **output, + size_t *output_size) { + *output_size = strlen(input); + *output = gpr_malloc(*output_size); + memcpy(*output, input, *output_size); +} + +// +// SSL Channel Credentials. +// + +static void ssl_destruct(grpc_channel_credentials *creds) { + grpc_ssl_credentials *c = (grpc_ssl_credentials *)creds; + if (c->config.pem_root_certs != NULL) gpr_free(c->config.pem_root_certs); + if (c->config.pem_private_key != NULL) gpr_free(c->config.pem_private_key); + if (c->config.pem_cert_chain != NULL) gpr_free(c->config.pem_cert_chain); +} + +static grpc_security_status ssl_create_security_connector( + grpc_channel_credentials *creds, grpc_call_credentials *call_creds, + const char *target, const grpc_channel_args *args, + grpc_channel_security_connector **sc, grpc_channel_args **new_args) { + grpc_ssl_credentials *c = (grpc_ssl_credentials *)creds; + grpc_security_status status = GRPC_SECURITY_OK; + size_t i = 0; + const char *overridden_target_name = NULL; + grpc_arg new_arg; + + for (i = 0; args && i < args->num_args; i++) { + grpc_arg *arg = &args->args[i]; + if (strcmp(arg->key, GRPC_SSL_TARGET_NAME_OVERRIDE_ARG) == 0 && + arg->type == GRPC_ARG_STRING) { + overridden_target_name = arg->value.string; + break; + } + } + status = grpc_ssl_channel_security_connector_create( + call_creds, &c->config, target, overridden_target_name, sc); + if (status != GRPC_SECURITY_OK) { + return status; + } + new_arg.type = GRPC_ARG_STRING; + new_arg.key = GRPC_ARG_HTTP2_SCHEME; + new_arg.value.string = "https"; + *new_args = grpc_channel_args_copy_and_add(args, &new_arg, 1); + return status; +} + +static grpc_channel_credentials_vtable ssl_vtable = { + ssl_destruct, ssl_create_security_connector}; + +static void ssl_build_config(const char *pem_root_certs, + grpc_ssl_pem_key_cert_pair *pem_key_cert_pair, + grpc_ssl_config *config) { + if (pem_root_certs != NULL) { + ssl_copy_key_material(pem_root_certs, &config->pem_root_certs, + &config->pem_root_certs_size); + } + if (pem_key_cert_pair != NULL) { + GPR_ASSERT(pem_key_cert_pair->private_key != NULL); + GPR_ASSERT(pem_key_cert_pair->cert_chain != NULL); + ssl_copy_key_material(pem_key_cert_pair->private_key, + &config->pem_private_key, + &config->pem_private_key_size); + ssl_copy_key_material(pem_key_cert_pair->cert_chain, + &config->pem_cert_chain, + &config->pem_cert_chain_size); + } +} + +grpc_channel_credentials *grpc_ssl_credentials_create( + const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pair, + void *reserved) { + grpc_ssl_credentials *c = gpr_malloc(sizeof(grpc_ssl_credentials)); + GRPC_API_TRACE( + "grpc_ssl_credentials_create(pem_root_certs=%s, " + "pem_key_cert_pair=%p, " + "reserved=%p)", + 3, (pem_root_certs, pem_key_cert_pair, reserved)); + GPR_ASSERT(reserved == NULL); + memset(c, 0, sizeof(grpc_ssl_credentials)); + c->base.type = GRPC_CHANNEL_CREDENTIALS_TYPE_SSL; + c->base.vtable = &ssl_vtable; + gpr_ref_init(&c->base.refcount, 1); + ssl_build_config(pem_root_certs, pem_key_cert_pair, &c->config); + return &c->base; +} + +// +// SSL Server Credentials. +// + +static void ssl_server_destruct(grpc_server_credentials *creds) { + grpc_ssl_server_credentials *c = (grpc_ssl_server_credentials *)creds; + size_t i; + for (i = 0; i < c->config.num_key_cert_pairs; i++) { + if (c->config.pem_private_keys[i] != NULL) { + gpr_free(c->config.pem_private_keys[i]); + } + if (c->config.pem_cert_chains[i] != NULL) { + gpr_free(c->config.pem_cert_chains[i]); + } + } + if (c->config.pem_private_keys != NULL) gpr_free(c->config.pem_private_keys); + if (c->config.pem_private_keys_sizes != NULL) { + gpr_free(c->config.pem_private_keys_sizes); + } + if (c->config.pem_cert_chains != NULL) gpr_free(c->config.pem_cert_chains); + if (c->config.pem_cert_chains_sizes != NULL) { + gpr_free(c->config.pem_cert_chains_sizes); + } + if (c->config.pem_root_certs != NULL) gpr_free(c->config.pem_root_certs); +} + + +static grpc_security_status ssl_server_create_security_connector( + grpc_server_credentials *creds, grpc_server_security_connector **sc) { + grpc_ssl_server_credentials *c = (grpc_ssl_server_credentials *)creds; + return grpc_ssl_server_security_connector_create(&c->config, sc); +} + +static grpc_server_credentials_vtable ssl_server_vtable = { + ssl_server_destruct, ssl_server_create_security_connector}; + + +static void ssl_build_server_config( + const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, + size_t num_key_cert_pairs, + grpc_ssl_client_certificate_request_type client_certificate_request, + grpc_ssl_server_config *config) { + size_t i; + config->client_certificate_request = client_certificate_request; + if (pem_root_certs != NULL) { + ssl_copy_key_material(pem_root_certs, &config->pem_root_certs, + &config->pem_root_certs_size); + } + if (num_key_cert_pairs > 0) { + GPR_ASSERT(pem_key_cert_pairs != NULL); + config->pem_private_keys = + gpr_malloc(num_key_cert_pairs * sizeof(unsigned char *)); + config->pem_cert_chains = + gpr_malloc(num_key_cert_pairs * sizeof(unsigned char *)); + config->pem_private_keys_sizes = + gpr_malloc(num_key_cert_pairs * sizeof(size_t)); + config->pem_cert_chains_sizes = + gpr_malloc(num_key_cert_pairs * sizeof(size_t)); + } + config->num_key_cert_pairs = num_key_cert_pairs; + for (i = 0; i < num_key_cert_pairs; i++) { + GPR_ASSERT(pem_key_cert_pairs[i].private_key != NULL); + GPR_ASSERT(pem_key_cert_pairs[i].cert_chain != NULL); + ssl_copy_key_material(pem_key_cert_pairs[i].private_key, + &config->pem_private_keys[i], + &config->pem_private_keys_sizes[i]); + ssl_copy_key_material(pem_key_cert_pairs[i].cert_chain, + &config->pem_cert_chains[i], + &config->pem_cert_chains_sizes[i]); + } +} + + +grpc_server_credentials *grpc_ssl_server_credentials_create( + const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, + size_t num_key_cert_pairs, int force_client_auth, void *reserved) { + return grpc_ssl_server_credentials_create_ex( + pem_root_certs, pem_key_cert_pairs, num_key_cert_pairs, + force_client_auth + ? GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY + : GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE, + reserved); +} + +grpc_server_credentials *grpc_ssl_server_credentials_create_ex( + const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, + size_t num_key_cert_pairs, + grpc_ssl_client_certificate_request_type client_certificate_request, + void *reserved) { + grpc_ssl_server_credentials *c = + gpr_malloc(sizeof(grpc_ssl_server_credentials)); + GRPC_API_TRACE( + "grpc_ssl_server_credentials_create_ex(" + "pem_root_certs=%s, pem_key_cert_pairs=%p, num_key_cert_pairs=%lu, " + "client_certificate_request=%d, reserved=%p)", + 5, (pem_root_certs, pem_key_cert_pairs, (unsigned long)num_key_cert_pairs, + client_certificate_request, reserved)); + GPR_ASSERT(reserved == NULL); + memset(c, 0, sizeof(grpc_ssl_server_credentials)); + c->base.type = GRPC_CHANNEL_CREDENTIALS_TYPE_SSL; + gpr_ref_init(&c->base.refcount, 1); + c->base.vtable = &ssl_server_vtable; + ssl_build_server_config(pem_root_certs, pem_key_cert_pairs, + num_key_cert_pairs, client_certificate_request, + &c->config); + return &c->base; +} + diff --git a/src/core/lib/security/credentials/ssl/ssl_credentials.h b/src/core/lib/security/credentials/ssl/ssl_credentials.h new file mode 100644 index 00000000000..ea4bdabc048 --- /dev/null +++ b/src/core/lib/security/credentials/ssl/ssl_credentials.h @@ -0,0 +1,49 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ +#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_SSL_SSL_CREDENTIALS_H +#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_SSL_SSL_CREDENTIALS_H + +#include "src/core/lib/security/credentials/credentials.h" + +typedef struct { + grpc_channel_credentials base; + grpc_ssl_config config; +} grpc_ssl_credentials; + +typedef struct { + grpc_server_credentials base; + grpc_ssl_server_config config; +} grpc_ssl_server_credentials; + +#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_SSL_SSL_CREDENTIALS_H */ + diff --git a/src/core/lib/security/auth_filters.h b/src/core/lib/security/transport/auth_filters.h similarity index 90% rename from src/core/lib/security/auth_filters.h rename to src/core/lib/security/transport/auth_filters.h index 7fb56c3f3af..f688d4ed218 100644 --- a/src/core/lib/security/auth_filters.h +++ b/src/core/lib/security/transport/auth_filters.h @@ -31,12 +31,12 @@ * */ -#ifndef GRPC_CORE_LIB_SECURITY_AUTH_FILTERS_H -#define GRPC_CORE_LIB_SECURITY_AUTH_FILTERS_H +#ifndef GRPC_CORE_LIB_SECURITY_TRANSPORT_AUTH_FILTERS_H +#define GRPC_CORE_LIB_SECURITY_TRANSPORT_AUTH_FILTERS_H #include "src/core/lib/channel/channel_stack.h" extern const grpc_channel_filter grpc_client_auth_filter; extern const grpc_channel_filter grpc_server_auth_filter; -#endif /* GRPC_CORE_LIB_SECURITY_AUTH_FILTERS_H */ +#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_AUTH_FILTERS_H */ diff --git a/src/core/lib/security/client_auth_filter.c b/src/core/lib/security/transport/client_auth_filter.c similarity index 98% rename from src/core/lib/security/client_auth_filter.c rename to src/core/lib/security/transport/client_auth_filter.c index 8b58cb86bf9..e3cbcb44338 100644 --- a/src/core/lib/security/client_auth_filter.c +++ b/src/core/lib/security/transport/client_auth_filter.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/security/auth_filters.h" +#include "src/core/lib/security/transport/auth_filters.h" #include @@ -40,9 +40,9 @@ #include #include "src/core/lib/channel/channel_stack.h" -#include "src/core/lib/security/credentials.h" -#include "src/core/lib/security/security_connector.h" -#include "src/core/lib/security/security_context.h" +#include "src/core/lib/security/context/security_context.h" +#include "src/core/lib/security/credentials/credentials.h" +#include "src/core/lib/security/transport/security_connector.h" #include "src/core/lib/support/string.h" #include "src/core/lib/surface/call.h" #include "src/core/lib/transport/static_metadata.h" diff --git a/src/core/lib/security/handshake.c b/src/core/lib/security/transport/handshake.c similarity index 98% rename from src/core/lib/security/handshake.c rename to src/core/lib/security/transport/handshake.c index d5fe0c7b7d9..6561f4b47d5 100644 --- a/src/core/lib/security/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/security/handshake.h" +#include "src/core/lib/security/transport/handshake.h" #include #include @@ -39,8 +39,8 @@ #include #include #include -#include "src/core/lib/security/secure_endpoint.h" -#include "src/core/lib/security/security_context.h" +#include "src/core/lib/security/context/security_context.h" +#include "src/core/lib/security/transport/secure_endpoint.h" #define GRPC_INITIAL_HANDSHAKE_BUFFER_SIZE 256 diff --git a/src/core/lib/security/handshake.h b/src/core/lib/security/transport/handshake.h similarity index 90% rename from src/core/lib/security/handshake.h rename to src/core/lib/security/transport/handshake.h index f34476ed49d..6ed850b3153 100644 --- a/src/core/lib/security/handshake.h +++ b/src/core/lib/security/transport/handshake.h @@ -31,11 +31,11 @@ * */ -#ifndef GRPC_CORE_LIB_SECURITY_HANDSHAKE_H -#define GRPC_CORE_LIB_SECURITY_HANDSHAKE_H +#ifndef GRPC_CORE_LIB_SECURITY_TRANSPORT_HANDSHAKE_H +#define GRPC_CORE_LIB_SECURITY_TRANSPORT_HANDSHAKE_H #include "src/core/lib/iomgr/endpoint.h" -#include "src/core/lib/security/security_connector.h" +#include "src/core/lib/security/transport/security_connector.h" /* Calls the callback upon completion. Takes owership of handshaker. */ void grpc_do_security_handshake(grpc_exec_ctx *exec_ctx, @@ -48,4 +48,4 @@ void grpc_do_security_handshake(grpc_exec_ctx *exec_ctx, void grpc_security_handshake_shutdown(grpc_exec_ctx *exec_ctx, void *handshake); -#endif /* GRPC_CORE_LIB_SECURITY_HANDSHAKE_H */ +#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_HANDSHAKE_H */ diff --git a/src/core/lib/security/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c similarity index 99% rename from src/core/lib/security/secure_endpoint.c rename to src/core/lib/security/transport/secure_endpoint.c index 27b0e989107..4438c8e5596 100644 --- a/src/core/lib/security/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/security/secure_endpoint.h" +#include "src/core/lib/security/transport/secure_endpoint.h" #include #include #include diff --git a/src/core/lib/security/secure_endpoint.h b/src/core/lib/security/transport/secure_endpoint.h similarity index 91% rename from src/core/lib/security/secure_endpoint.h rename to src/core/lib/security/transport/secure_endpoint.h index ff1c6639de6..d00075b7692 100644 --- a/src/core/lib/security/secure_endpoint.h +++ b/src/core/lib/security/transport/secure_endpoint.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_SECURITY_SECURE_ENDPOINT_H -#define GRPC_CORE_LIB_SECURITY_SECURE_ENDPOINT_H +#ifndef GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURE_ENDPOINT_H +#define GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURE_ENDPOINT_H #include #include "src/core/lib/iomgr/endpoint.h" @@ -46,4 +46,4 @@ grpc_endpoint *grpc_secure_endpoint_create( struct tsi_frame_protector *protector, grpc_endpoint *to_wrap, gpr_slice *leftover_slices, size_t leftover_nslices); -#endif /* GRPC_CORE_LIB_SECURITY_SECURE_ENDPOINT_H */ +#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURE_ENDPOINT_H */ diff --git a/src/core/lib/security/security_connector.c b/src/core/lib/security/transport/security_connector.c similarity index 99% rename from src/core/lib/security/security_connector.c rename to src/core/lib/security/transport/security_connector.c index 2d2023bdf5b..72173e7c9dc 100644 --- a/src/core/lib/security/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/security/security_connector.h" +#include "src/core/lib/security/transport/security_connector.h" #include #include @@ -43,10 +43,10 @@ #include #include "src/core/ext/transport/chttp2/alpn/alpn.h" -#include "src/core/lib/security/credentials.h" -#include "src/core/lib/security/handshake.h" -#include "src/core/lib/security/secure_endpoint.h" -#include "src/core/lib/security/security_context.h" +#include "src/core/lib/security/context/security_context.h" +#include "src/core/lib/security/credentials/credentials.h" +#include "src/core/lib/security/transport/handshake.h" +#include "src/core/lib/security/transport/secure_endpoint.h" #include "src/core/lib/support/env.h" #include "src/core/lib/support/load_file.h" #include "src/core/lib/support/string.h" diff --git a/src/core/lib/security/security_connector.h b/src/core/lib/security/transport/security_connector.h similarity index 98% rename from src/core/lib/security/security_connector.h rename to src/core/lib/security/transport/security_connector.h index 2c893cd5e99..84e586deaa0 100644 --- a/src/core/lib/security/security_connector.h +++ b/src/core/lib/security/transport/security_connector.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_H -#define GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_H +#ifndef GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_CONNECTOR_H +#define GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_CONNECTOR_H #include #include "src/core/lib/iomgr/endpoint.h" @@ -263,4 +263,4 @@ tsi_peer tsi_shallow_peer_from_ssl_auth_context( const grpc_auth_context *auth_context); void tsi_shallow_peer_destruct(tsi_peer *peer); -#endif /* GRPC_CORE_LIB_SECURITY_SECURITY_CONNECTOR_H */ +#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_CONNECTOR_H */ diff --git a/src/core/lib/security/server_auth_filter.c b/src/core/lib/security/transport/server_auth_filter.c similarity index 98% rename from src/core/lib/security/server_auth_filter.c rename to src/core/lib/security/transport/server_auth_filter.c index 3320497d214..006a30f0c69 100644 --- a/src/core/lib/security/server_auth_filter.c +++ b/src/core/lib/security/transport/server_auth_filter.c @@ -33,9 +33,9 @@ #include -#include "src/core/lib/security/auth_filters.h" -#include "src/core/lib/security/credentials.h" -#include "src/core/lib/security/security_context.h" +#include "src/core/lib/security/context/security_context.h" +#include "src/core/lib/security/credentials/credentials.h" +#include "src/core/lib/security/transport/auth_filters.h" #include #include diff --git a/src/core/lib/security/b64.c b/src/core/lib/security/util/b64.c similarity index 99% rename from src/core/lib/security/b64.c rename to src/core/lib/security/util/b64.c index 87f0e05280e..9da42e4e734 100644 --- a/src/core/lib/security/b64.c +++ b/src/core/lib/security/util/b64.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/security/b64.h" +#include "src/core/lib/security/util/b64.h" #include #include diff --git a/src/core/lib/security/b64.h b/src/core/lib/security/util/b64.h similarity index 94% rename from src/core/lib/security/b64.h rename to src/core/lib/security/util/b64.h index c515e7af2c9..69080952873 100644 --- a/src/core/lib/security/b64.h +++ b/src/core/lib/security/util/b64.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_SECURITY_B64_H -#define GRPC_CORE_LIB_SECURITY_B64_H +#ifndef GRPC_CORE_LIB_SECURITY_UTIL_B64_H +#define GRPC_CORE_LIB_SECURITY_UTIL_B64_H #include @@ -49,4 +49,4 @@ gpr_slice grpc_base64_decode(const char *b64, int url_safe); gpr_slice grpc_base64_decode_with_len(const char *b64, size_t b64_len, int url_safe); -#endif /* GRPC_CORE_LIB_SECURITY_B64_H */ +#endif /* GRPC_CORE_LIB_SECURITY_UTIL_B64_H */ diff --git a/src/core/lib/security/util/json_util.c b/src/core/lib/security/util/json_util.c new file mode 100644 index 00000000000..9eda12c6281 --- /dev/null +++ b/src/core/lib/security/util/json_util.c @@ -0,0 +1,62 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/security/util/json_util.h" + +#include + +#include +#include + +const char *grpc_json_get_string_property(const grpc_json *json, + const char *prop_name) { + grpc_json *child; + for (child = json->child; child != NULL; child = child->next) { + if (strcmp(child->key, prop_name) == 0) break; + } + if (child == NULL || child->type != GRPC_JSON_STRING) { + gpr_log(GPR_ERROR, "Invalid or missing %s property.", prop_name); + return NULL; + } + return child->value; +} + +bool grpc_copy_json_string_property(const grpc_json *json, + const char *prop_name, + char **copied_value) { + const char *prop_value = grpc_json_get_string_property(json, prop_name); + if (prop_value == NULL) return false; + *copied_value = gpr_strdup(prop_value); + return true; +} + diff --git a/src/core/lib/security/util/json_util.h b/src/core/lib/security/util/json_util.h new file mode 100644 index 00000000000..3046412729d --- /dev/null +++ b/src/core/lib/security/util/json_util.h @@ -0,0 +1,57 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_LIB_SECURITY_UTIL_JSON_UTIL_H +#define GRPC_CORE_LIB_SECURITY_UTIL_JSON_UTIL_H + +#include + +#include "src/core/lib/json/json.h" + +// Constants. +#define GRPC_AUTH_JSON_TYPE_INVALID "invalid" +#define GRPC_AUTH_JSON_TYPE_SERVICE_ACCOUNT "service_account" +#define GRPC_AUTH_JSON_TYPE_AUTHORIZED_USER "authorized_user" + +// Gets a child property from a json node. +const char *grpc_json_get_string_property(const grpc_json *json, + const char *prop_name); + +// Copies the value of the json child property specified by prop_name. +// Returns false if the property was not found. +bool grpc_copy_json_string_property(const grpc_json *json, + const char *prop_name, + char **copied_value); + +#endif // GRPC_CORE_LIB_SECURITY_UTIL_JSON_UTIL_H + diff --git a/src/core/lib/surface/init_secure.c b/src/core/lib/surface/init_secure.c index 3fda2c9e1e4..7ee7b51568e 100644 --- a/src/core/lib/surface/init_secure.c +++ b/src/core/lib/surface/init_secure.c @@ -37,10 +37,10 @@ #include #include "src/core/lib/debug/trace.h" -#include "src/core/lib/security/auth_filters.h" -#include "src/core/lib/security/credentials.h" -#include "src/core/lib/security/secure_endpoint.h" -#include "src/core/lib/security/security_connector.h" +#include "src/core/lib/security/credentials/credentials.h" +#include "src/core/lib/security/transport/auth_filters.h" +#include "src/core/lib/security/transport/secure_endpoint.h" +#include "src/core/lib/security/transport/security_connector.h" #include "src/core/lib/surface/channel_init.h" #include "src/core/lib/tsi/transport_security_interface.h" diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index dab62530aac..0f0678a2cd1 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -182,20 +182,28 @@ CORE_SOURCE_FILES = [ 'src/core/ext/transport/chttp2/transport/writing.c', 'src/core/ext/transport/chttp2/alpn/alpn.c', 'src/core/lib/http/httpcli_security_connector.c', - 'src/core/lib/security/b64.c', - 'src/core/lib/security/client_auth_filter.c', - 'src/core/lib/security/credentials.c', - 'src/core/lib/security/credentials_metadata.c', - 'src/core/lib/security/credentials_posix.c', - 'src/core/lib/security/credentials_win32.c', - 'src/core/lib/security/google_default_credentials.c', - 'src/core/lib/security/handshake.c', - 'src/core/lib/security/json_token.c', - 'src/core/lib/security/jwt_verifier.c', - 'src/core/lib/security/secure_endpoint.c', - 'src/core/lib/security/security_connector.c', - 'src/core/lib/security/security_context.c', - 'src/core/lib/security/server_auth_filter.c', + 'src/core/lib/security/context/security_context.c', + 'src/core/lib/security/credentials/composite/composite_credentials.c', + 'src/core/lib/security/credentials/credentials.c', + 'src/core/lib/security/credentials/credentials_metadata.c', + 'src/core/lib/security/credentials/fake/fake_credentials.c', + 'src/core/lib/security/credentials/google_default/credentials_posix.c', + 'src/core/lib/security/credentials/google_default/credentials_win32.c', + 'src/core/lib/security/credentials/google_default/google_default_credentials.c', + 'src/core/lib/security/credentials/iam/iam_credentials.c', + 'src/core/lib/security/credentials/jwt/json_token.c', + 'src/core/lib/security/credentials/jwt/jwt_credentials.c', + 'src/core/lib/security/credentials/jwt/jwt_verifier.c', + 'src/core/lib/security/credentials/oauth2/oauth2_credentials.c', + 'src/core/lib/security/credentials/plugin/plugin_credentials.c', + 'src/core/lib/security/credentials/ssl/ssl_credentials.c', + 'src/core/lib/security/transport/client_auth_filter.c', + 'src/core/lib/security/transport/handshake.c', + 'src/core/lib/security/transport/secure_endpoint.c', + 'src/core/lib/security/transport/security_connector.c', + 'src/core/lib/security/transport/server_auth_filter.c', + 'src/core/lib/security/util/b64.c', + 'src/core/lib/security/util/json_util.c', 'src/core/lib/surface/init_secure.c', 'src/core/lib/tsi/fake_transport_security.c', 'src/core/lib/tsi/ssl_transport_security.c', diff --git a/test/core/client_config/set_initial_connect_string_test.c b/test/core/client_config/set_initial_connect_string_test.c index 83058d9b2c3..3ad8ce964a0 100644 --- a/test/core/client_config/set_initial_connect_string_test.c +++ b/test/core/client_config/set_initial_connect_string_test.c @@ -40,7 +40,7 @@ #include "src/core/ext/client_config/initial_connect_string.h" #include "src/core/lib/iomgr/sockaddr.h" -#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "src/core/lib/support/string.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/end2end/fixtures/h2_fakesec.c b/test/core/end2end/fixtures/h2_fakesec.c index 246619bf685..44408b28afa 100644 --- a/test/core/end2end/fixtures/h2_fakesec.c +++ b/test/core/end2end/fixtures/h2_fakesec.c @@ -40,7 +40,7 @@ #include #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "test/core/end2end/data/ssl_test_data.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/end2end/fixtures/h2_oauth2.c b/test/core/end2end/fixtures/h2_oauth2.c index 550ff331408..fc56998cdb4 100644 --- a/test/core/end2end/fixtures/h2_oauth2.c +++ b/test/core/end2end/fixtures/h2_oauth2.c @@ -41,7 +41,7 @@ #include #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/iomgr/iomgr.h" -#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/credentials/credentials.h" #include "test/core/end2end/data/ssl_test_data.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/core/end2end/fixtures/h2_ssl.c b/test/core/end2end/fixtures/h2_ssl.c index 69f76160746..eb28623264a 100644 --- a/test/core/end2end/fixtures/h2_ssl.c +++ b/test/core/end2end/fixtures/h2_ssl.c @@ -41,7 +41,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/support/env.h" #include "src/core/lib/support/string.h" #include "src/core/lib/support/tmpfile.h" diff --git a/test/core/end2end/fixtures/h2_ssl_cert.c b/test/core/end2end/fixtures/h2_ssl_cert.c index cd031ca4826..2a6d0d17af8 100644 --- a/test/core/end2end/fixtures/h2_ssl_cert.c +++ b/test/core/end2end/fixtures/h2_ssl_cert.c @@ -41,7 +41,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/support/env.h" #include "src/core/lib/support/string.h" #include "src/core/lib/support/tmpfile.h" diff --git a/test/core/end2end/fixtures/h2_ssl_proxy.c b/test/core/end2end/fixtures/h2_ssl_proxy.c index 1403b760f50..8f8c081465e 100644 --- a/test/core/end2end/fixtures/h2_ssl_proxy.c +++ b/test/core/end2end/fixtures/h2_ssl_proxy.c @@ -41,7 +41,7 @@ #include #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/support/env.h" #include "src/core/lib/support/string.h" #include "src/core/lib/support/tmpfile.h" diff --git a/test/core/end2end/tests/call_creds.c b/test/core/end2end/tests/call_creds.c index b555bea740b..5c6791f6f78 100644 --- a/test/core/end2end/tests/call_creds.c +++ b/test/core/end2end/tests/call_creds.c @@ -42,7 +42,7 @@ #include #include #include -#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/support/string.h" #include "test/core/end2end/cq_verifier.h" diff --git a/test/core/security/auth_context_test.c b/test/core/security/auth_context_test.c index d1ead162359..e2f44ebe249 100644 --- a/test/core/security/auth_context_test.c +++ b/test/core/security/auth_context_test.c @@ -33,7 +33,7 @@ #include -#include "src/core/lib/security/security_context.h" +#include "src/core/lib/security/context/security_context.h" #include "src/core/lib/support/string.h" #include "test/core/util/test_config.h" diff --git a/test/core/security/b64_test.c b/test/core/security/b64_test.c index cea870321d3..b26bd026fdf 100644 --- a/test/core/security/b64_test.c +++ b/test/core/security/b64_test.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/security/b64.h" +#include "src/core/lib/security/util/b64.h" #include diff --git a/test/core/security/create_jwt.c b/test/core/security/create_jwt.c index 6d4707f3c76..3c36b767d30 100644 --- a/test/core/security/create_jwt.c +++ b/test/core/security/create_jwt.c @@ -34,8 +34,7 @@ #include #include -#include "src/core/lib/security/credentials.h" -#include "src/core/lib/security/json_token.h" +#include "src/core/lib/security/credentials/jwt/jwt_credentials.h" #include "src/core/lib/support/load_file.h" #include diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c index 78672932787..31e06372b93 100644 --- a/test/core/security/credentials_test.c +++ b/test/core/security/credentials_test.c @@ -33,7 +33,7 @@ #include -#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/credentials/credentials.h" #include #include @@ -45,7 +45,10 @@ #include #include "src/core/lib/http/httpcli.h" -#include "src/core/lib/security/json_token.h" +#include "src/core/lib/security/credentials/composite/composite_credentials.h" +#include "src/core/lib/security/credentials/google_default/google_default_credentials.h" +#include "src/core/lib/security/credentials/jwt/jwt_credentials.h" +#include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" #include "src/core/lib/support/env.h" #include "src/core/lib/support/string.h" #include "src/core/lib/support/tmpfile.h" diff --git a/test/core/security/fetch_oauth2.c b/test/core/security/fetch_oauth2.c index bd314e90d8e..2a102fb139b 100644 --- a/test/core/security/fetch_oauth2.c +++ b/test/core/security/fetch_oauth2.c @@ -42,7 +42,7 @@ #include #include -#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/support/load_file.h" #include "test/core/security/oauth2_utils.h" diff --git a/test/core/security/json_token_test.c b/test/core/security/json_token_test.c index 3aee52ee5c6..405fe56c460 100644 --- a/test/core/security/json_token_test.c +++ b/test/core/security/json_token_test.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/security/json_token.h" +#include "src/core/lib/security/credentials/jwt/json_token.h" #include #include @@ -42,7 +42,8 @@ #include #include "src/core/lib/json/json.h" -#include "src/core/lib/security/b64.h" +#include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" +#include "src/core/lib/security/util/b64.h" #include "test/core/util/test_config.h" /* This JSON key was generated with the GCE console and revoked immediately. diff --git a/test/core/security/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c index 077f44d1d66..50bf25171c9 100644 --- a/test/core/security/jwt_verifier_test.c +++ b/test/core/security/jwt_verifier_test.c @@ -31,7 +31,7 @@ * */ -#include "src/core/lib/security/jwt_verifier.h" +#include "src/core/lib/security/credentials/jwt/jwt_verifier.h" #include @@ -43,8 +43,8 @@ #include #include "src/core/lib/http/httpcli.h" -#include "src/core/lib/security/b64.h" -#include "src/core/lib/security/json_token.h" +#include "src/core/lib/security/util/b64.h" +#include "src/core/lib/security/credentials/jwt/json_token.h" #include "test/core/util/test_config.h" /* This JSON key was generated with the GCE console and revoked immediately. diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c index 20815d184cd..80d21cc6027 100644 --- a/test/core/security/oauth2_utils.c +++ b/test/core/security/oauth2_utils.c @@ -42,7 +42,7 @@ #include #include -#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/credentials/credentials.h" typedef struct { gpr_mu *mu; diff --git a/test/core/security/oauth2_utils.h b/test/core/security/oauth2_utils.h index eff98270c8a..0f4e8857b0f 100644 --- a/test/core/security/oauth2_utils.h +++ b/test/core/security/oauth2_utils.h @@ -34,7 +34,7 @@ #ifndef GRPC_TEST_CORE_SECURITY_OAUTH2_UTILS_H #define GRPC_TEST_CORE_SECURITY_OAUTH2_UTILS_H -#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/credentials/credentials.h" #ifdef __cplusplus extern "C" { diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c index 99bce4fbdfb..10a5e5224ef 100644 --- a/test/core/security/print_google_default_creds_token.c +++ b/test/core/security/print_google_default_creds_token.c @@ -42,7 +42,8 @@ #include #include -#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/credentials/credentials.h" +#include "src/core/lib/security/credentials/composite/composite_credentials.h" #include "src/core/lib/support/string.h" typedef struct { diff --git a/test/core/security/secure_endpoint_test.c b/test/core/security/secure_endpoint_test.c index aeaf38209bb..6aba21a98c2 100644 --- a/test/core/security/secure_endpoint_test.c +++ b/test/core/security/secure_endpoint_test.c @@ -41,7 +41,7 @@ #include #include "src/core/lib/iomgr/endpoint_pair.h" #include "src/core/lib/iomgr/iomgr.h" -#include "src/core/lib/security/secure_endpoint.h" +#include "src/core/lib/security/transport/secure_endpoint.h" #include "src/core/lib/tsi/fake_transport_security.h" #include "test/core/util/test_config.h" diff --git a/test/core/security/security_connector_test.c b/test/core/security/security_connector_test.c index 1a4e64b30c7..6106bec9d3f 100644 --- a/test/core/security/security_connector_test.c +++ b/test/core/security/security_connector_test.c @@ -40,8 +40,8 @@ #include #include -#include "src/core/lib/security/security_connector.h" -#include "src/core/lib/security/security_context.h" +#include "src/core/lib/security/context/security_context.h" +#include "src/core/lib/security/transport/security_connector.h" #include "src/core/lib/support/env.h" #include "src/core/lib/support/string.h" #include "src/core/lib/support/tmpfile.h" diff --git a/test/core/security/verify_jwt.c b/test/core/security/verify_jwt.c index 2274fe18d82..ecb873b655c 100644 --- a/test/core/security/verify_jwt.c +++ b/test/core/security/verify_jwt.c @@ -42,7 +42,7 @@ #include #include -#include "src/core/lib/security/jwt_verifier.h" +#include "src/core/lib/security/credentials/jwt/jwt_verifier.h" typedef struct { grpc_pollset *pollset; diff --git a/test/core/surface/secure_channel_create_test.c b/test/core/surface/secure_channel_create_test.c index 80419efce4b..b9525031678 100644 --- a/test/core/surface/secure_channel_create_test.c +++ b/test/core/surface/secure_channel_create_test.c @@ -37,8 +37,8 @@ #include #include #include "src/core/ext/client_config/resolver_registry.h" -#include "src/core/lib/security/credentials.h" -#include "src/core/lib/security/security_connector.h" +#include "src/core/lib/security/credentials/fake/fake_credentials.h" +#include "src/core/lib/security/transport/security_connector.h" #include "src/core/lib/surface/channel.h" #include "test/core/util/test_config.h" diff --git a/test/core/surface/server_chttp2_test.c b/test/core/surface/server_chttp2_test.c index d22c1649721..f42ca9f9cdf 100644 --- a/test/core/surface/server_chttp2_test.c +++ b/test/core/surface/server_chttp2_test.c @@ -37,7 +37,8 @@ #include #include #include -#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/credentials/credentials.h" +#include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "src/core/lib/tsi/fake_transport_security.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" diff --git a/test/cpp/common/auth_property_iterator_test.cc b/test/cpp/common/auth_property_iterator_test.cc index 0e43d4e1e0d..66225ff335c 100644 --- a/test/cpp/common/auth_property_iterator_test.cc +++ b/test/cpp/common/auth_property_iterator_test.cc @@ -38,7 +38,7 @@ #include "test/cpp/util/string_ref_helper.h" extern "C" { -#include "src/core/lib/security/security_context.h" +#include "src/core/lib/security/context/security_context.h" } using ::grpc::testing::ToString; diff --git a/test/cpp/common/secure_auth_context_test.cc b/test/cpp/common/secure_auth_context_test.cc index 067361334d9..b131452f736 100644 --- a/test/cpp/common/secure_auth_context_test.cc +++ b/test/cpp/common/secure_auth_context_test.cc @@ -38,7 +38,7 @@ #include "test/cpp/util/string_ref_helper.h" extern "C" { -#include "src/core/lib/security/security_context.h" +#include "src/core/lib/security/context/security_context.h" } using grpc::testing::ToString; diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 0c9313f88f0..03118647595 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -48,7 +48,7 @@ #include #include -#include "src/core/lib/security/credentials.h" +#include "src/core/lib/security/credentials/credentials.h" #include "src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.h" #include "src/proto/grpc/testing/echo.grpc.pb.h" #include "test/core/util/port.h" diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 1b1453f7ea2..260e68804ec 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -882,15 +882,24 @@ src/core/ext/transport/chttp2/transport/stream_map.h \ src/core/ext/transport/chttp2/transport/timeout_encoding.h \ src/core/ext/transport/chttp2/transport/varint.h \ src/core/ext/transport/chttp2/alpn/alpn.h \ -src/core/lib/security/auth_filters.h \ -src/core/lib/security/b64.h \ -src/core/lib/security/credentials.h \ -src/core/lib/security/handshake.h \ -src/core/lib/security/json_token.h \ -src/core/lib/security/jwt_verifier.h \ -src/core/lib/security/secure_endpoint.h \ -src/core/lib/security/security_connector.h \ -src/core/lib/security/security_context.h \ +src/core/lib/security/context/security_context.h \ +src/core/lib/security/credentials/composite/composite_credentials.h \ +src/core/lib/security/credentials/credentials.h \ +src/core/lib/security/credentials/fake/fake_credentials.h \ +src/core/lib/security/credentials/google_default/google_default_credentials.h \ +src/core/lib/security/credentials/iam/iam_credentials.h \ +src/core/lib/security/credentials/jwt/json_token.h \ +src/core/lib/security/credentials/jwt/jwt_credentials.h \ +src/core/lib/security/credentials/jwt/jwt_verifier.h \ +src/core/lib/security/credentials/oauth2/oauth2_credentials.h \ +src/core/lib/security/credentials/plugin/plugin_credentials.h \ +src/core/lib/security/credentials/ssl/ssl_credentials.h \ +src/core/lib/security/transport/auth_filters.h \ +src/core/lib/security/transport/handshake.h \ +src/core/lib/security/transport/secure_endpoint.h \ +src/core/lib/security/transport/security_connector.h \ +src/core/lib/security/util/b64.h \ +src/core/lib/security/util/json_util.h \ src/core/lib/tsi/fake_transport_security.h \ src/core/lib/tsi/ssl_transport_security.h \ src/core/lib/tsi/ssl_types.h \ @@ -1030,20 +1039,28 @@ src/core/ext/transport/chttp2/transport/varint.c \ src/core/ext/transport/chttp2/transport/writing.c \ src/core/ext/transport/chttp2/alpn/alpn.c \ src/core/lib/http/httpcli_security_connector.c \ -src/core/lib/security/b64.c \ -src/core/lib/security/client_auth_filter.c \ -src/core/lib/security/credentials.c \ -src/core/lib/security/credentials_metadata.c \ -src/core/lib/security/credentials_posix.c \ -src/core/lib/security/credentials_win32.c \ -src/core/lib/security/google_default_credentials.c \ -src/core/lib/security/handshake.c \ -src/core/lib/security/json_token.c \ -src/core/lib/security/jwt_verifier.c \ -src/core/lib/security/secure_endpoint.c \ -src/core/lib/security/security_connector.c \ -src/core/lib/security/security_context.c \ -src/core/lib/security/server_auth_filter.c \ +src/core/lib/security/context/security_context.c \ +src/core/lib/security/credentials/composite/composite_credentials.c \ +src/core/lib/security/credentials/credentials.c \ +src/core/lib/security/credentials/credentials_metadata.c \ +src/core/lib/security/credentials/fake/fake_credentials.c \ +src/core/lib/security/credentials/google_default/credentials_posix.c \ +src/core/lib/security/credentials/google_default/credentials_win32.c \ +src/core/lib/security/credentials/google_default/google_default_credentials.c \ +src/core/lib/security/credentials/iam/iam_credentials.c \ +src/core/lib/security/credentials/jwt/json_token.c \ +src/core/lib/security/credentials/jwt/jwt_credentials.c \ +src/core/lib/security/credentials/jwt/jwt_verifier.c \ +src/core/lib/security/credentials/oauth2/oauth2_credentials.c \ +src/core/lib/security/credentials/plugin/plugin_credentials.c \ +src/core/lib/security/credentials/ssl/ssl_credentials.c \ +src/core/lib/security/transport/client_auth_filter.c \ +src/core/lib/security/transport/handshake.c \ +src/core/lib/security/transport/secure_endpoint.c \ +src/core/lib/security/transport/security_connector.c \ +src/core/lib/security/transport/server_auth_filter.c \ +src/core/lib/security/util/b64.c \ +src/core/lib/security/util/json_util.c \ src/core/lib/surface/init_secure.c \ src/core/lib/tsi/fake_transport_security.c \ src/core/lib/tsi/ssl_transport_security.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index f546f3b9950..6c08a808823 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6014,15 +6014,24 @@ "headers": [ "include/grpc/grpc_security.h", "include/grpc/grpc_security_constants.h", - "src/core/lib/security/auth_filters.h", - "src/core/lib/security/b64.h", - "src/core/lib/security/credentials.h", - "src/core/lib/security/handshake.h", - "src/core/lib/security/json_token.h", - "src/core/lib/security/jwt_verifier.h", - "src/core/lib/security/secure_endpoint.h", - "src/core/lib/security/security_connector.h", - "src/core/lib/security/security_context.h" + "src/core/lib/security/context/security_context.h", + "src/core/lib/security/credentials/composite/composite_credentials.h", + "src/core/lib/security/credentials/credentials.h", + "src/core/lib/security/credentials/fake/fake_credentials.h", + "src/core/lib/security/credentials/google_default/google_default_credentials.h", + "src/core/lib/security/credentials/iam/iam_credentials.h", + "src/core/lib/security/credentials/jwt/json_token.h", + "src/core/lib/security/credentials/jwt/jwt_credentials.h", + "src/core/lib/security/credentials/jwt/jwt_verifier.h", + "src/core/lib/security/credentials/oauth2/oauth2_credentials.h", + "src/core/lib/security/credentials/plugin/plugin_credentials.h", + "src/core/lib/security/credentials/ssl/ssl_credentials.h", + "src/core/lib/security/transport/auth_filters.h", + "src/core/lib/security/transport/handshake.h", + "src/core/lib/security/transport/secure_endpoint.h", + "src/core/lib/security/transport/security_connector.h", + "src/core/lib/security/util/b64.h", + "src/core/lib/security/util/json_util.h" ], "language": "c", "name": "grpc_secure", @@ -6030,29 +6039,46 @@ "include/grpc/grpc_security.h", "include/grpc/grpc_security_constants.h", "src/core/lib/http/httpcli_security_connector.c", - "src/core/lib/security/auth_filters.h", - "src/core/lib/security/b64.c", - "src/core/lib/security/b64.h", - "src/core/lib/security/client_auth_filter.c", - "src/core/lib/security/credentials.c", - "src/core/lib/security/credentials.h", - "src/core/lib/security/credentials_metadata.c", - "src/core/lib/security/credentials_posix.c", - "src/core/lib/security/credentials_win32.c", - "src/core/lib/security/google_default_credentials.c", - "src/core/lib/security/handshake.c", - "src/core/lib/security/handshake.h", - "src/core/lib/security/json_token.c", - "src/core/lib/security/json_token.h", - "src/core/lib/security/jwt_verifier.c", - "src/core/lib/security/jwt_verifier.h", - "src/core/lib/security/secure_endpoint.c", - "src/core/lib/security/secure_endpoint.h", - "src/core/lib/security/security_connector.c", - "src/core/lib/security/security_connector.h", - "src/core/lib/security/security_context.c", - "src/core/lib/security/security_context.h", - "src/core/lib/security/server_auth_filter.c", + "src/core/lib/security/context/security_context.c", + "src/core/lib/security/context/security_context.h", + "src/core/lib/security/credentials/composite/composite_credentials.c", + "src/core/lib/security/credentials/composite/composite_credentials.h", + "src/core/lib/security/credentials/credentials.c", + "src/core/lib/security/credentials/credentials.h", + "src/core/lib/security/credentials/credentials_metadata.c", + "src/core/lib/security/credentials/fake/fake_credentials.c", + "src/core/lib/security/credentials/fake/fake_credentials.h", + "src/core/lib/security/credentials/google_default/credentials_posix.c", + "src/core/lib/security/credentials/google_default/credentials_win32.c", + "src/core/lib/security/credentials/google_default/google_default_credentials.c", + "src/core/lib/security/credentials/google_default/google_default_credentials.h", + "src/core/lib/security/credentials/iam/iam_credentials.c", + "src/core/lib/security/credentials/iam/iam_credentials.h", + "src/core/lib/security/credentials/jwt/json_token.c", + "src/core/lib/security/credentials/jwt/json_token.h", + "src/core/lib/security/credentials/jwt/jwt_credentials.c", + "src/core/lib/security/credentials/jwt/jwt_credentials.h", + "src/core/lib/security/credentials/jwt/jwt_verifier.c", + "src/core/lib/security/credentials/jwt/jwt_verifier.h", + "src/core/lib/security/credentials/oauth2/oauth2_credentials.c", + "src/core/lib/security/credentials/oauth2/oauth2_credentials.h", + "src/core/lib/security/credentials/plugin/plugin_credentials.c", + "src/core/lib/security/credentials/plugin/plugin_credentials.h", + "src/core/lib/security/credentials/ssl/ssl_credentials.c", + "src/core/lib/security/credentials/ssl/ssl_credentials.h", + "src/core/lib/security/transport/auth_filters.h", + "src/core/lib/security/transport/client_auth_filter.c", + "src/core/lib/security/transport/handshake.c", + "src/core/lib/security/transport/handshake.h", + "src/core/lib/security/transport/secure_endpoint.c", + "src/core/lib/security/transport/secure_endpoint.h", + "src/core/lib/security/transport/security_connector.c", + "src/core/lib/security/transport/security_connector.h", + "src/core/lib/security/transport/server_auth_filter.c", + "src/core/lib/security/util/b64.c", + "src/core/lib/security/util/b64.h", + "src/core/lib/security/util/json_util.c", + "src/core/lib/security/util/json_util.h", "src/core/lib/surface/init_secure.c" ], "third_party": false, diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 4eec05a3b1f..8b8212ebf03 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -391,15 +391,24 @@ - - - - - - - - - + + + + + + + + + + + + + + + + + + @@ -647,33 +656,49 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + + + + + + + + + + + + + + + + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 17c88c4805e..f5f91a9b408 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -319,47 +319,71 @@ src\core\lib\http - - src\core\lib\security + + src\core\lib\security\context - - src\core\lib\security + + src\core\lib\security\credentials\composite - - src\core\lib\security + + src\core\lib\security\credentials - - src\core\lib\security + + src\core\lib\security\credentials - - src\core\lib\security + + src\core\lib\security\credentials\fake - - src\core\lib\security + + src\core\lib\security\credentials\google_default - - src\core\lib\security + + src\core\lib\security\credentials\google_default - - src\core\lib\security + + src\core\lib\security\credentials\google_default - - src\core\lib\security + + src\core\lib\security\credentials\iam - - src\core\lib\security + + src\core\lib\security\credentials\jwt - - src\core\lib\security + + src\core\lib\security\credentials\jwt - - src\core\lib\security + + src\core\lib\security\credentials\jwt - - src\core\lib\security + + src\core\lib\security\credentials\oauth2 - - src\core\lib\security + + src\core\lib\security\credentials\plugin + + + src\core\lib\security\credentials\ssl + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\util + + + src\core\lib\security\util src\core\lib\surface @@ -866,32 +890,59 @@ src\core\ext\transport\chttp2\alpn - - src\core\lib\security + + src\core\lib\security\context + + + src\core\lib\security\credentials\composite + + + src\core\lib\security\credentials + + + src\core\lib\security\credentials\fake + + + src\core\lib\security\credentials\google_default + + + src\core\lib\security\credentials\iam + + + src\core\lib\security\credentials\jwt + + + src\core\lib\security\credentials\jwt - - src\core\lib\security + + src\core\lib\security\credentials\jwt - - src\core\lib\security + + src\core\lib\security\credentials\oauth2 - - src\core\lib\security + + src\core\lib\security\credentials\plugin - - src\core\lib\security + + src\core\lib\security\credentials\ssl - - src\core\lib\security + + src\core\lib\security\transport - - src\core\lib\security + + src\core\lib\security\transport - - src\core\lib\security + + src\core\lib\security\transport - - src\core\lib\security + + src\core\lib\security\transport + + + src\core\lib\security\util + + + src\core\lib\security\util src\core\lib\tsi @@ -1112,6 +1163,42 @@ {c4661d64-349f-01c1-1ba8-0602f9047595} + + {187b52e3-bc78-6c62-3e68-4eb19a257661} + + + {c8af33b1-f786-001d-3e92-140872dc9829} + + + {197ed135-5f84-9f6a-6751-38dc5e9dd38c} + + + {6d391299-53d7-ee6a-55aa-d4c46cd86e82} + + + {412c7418-e90a-de77-5705-7890ba960911} + + + {718f826c-994b-7dd4-3042-0e999c5c22ba} + + + {ab21bcdf-de99-5838-699a-19ecb0c4aa14} + + + {f47a7a32-3166-b899-3622-f062f372feea} + + + {46120bcc-03e3-1aaa-fc61-9cef786bd70c} + + + {9d7802bc-d459-1a9b-3c97-868cddcca1d1} + + + {b22e611f-8272-9914-24a5-8107ebf51eeb} + + + {fcd7b397-aadd-556a-8aae-0cb7c893fbe0} + {a21971fb-304f-da08-b1b2-7bd8df8ac373} From 2b782d877c5f6e774addd40b7584c39d9da9d198 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 4 May 2016 16:29:57 -0700 Subject: [PATCH 0275/1894] Progress converting to new error system --- .../server/secure/server_secure_chttp2.c | 8 +- .../chttp2/transport/chttp2_transport.c | 116 ++++----- .../ext/transport/chttp2/transport/frame.h | 8 +- .../ext/transport/chttp2/transport/internal.h | 18 +- .../ext/transport/chttp2/transport/parsing.c | 234 ++++++++++-------- src/core/lib/iomgr/error.h | 2 + src/core/lib/iomgr/unix_sockets_posix.c | 15 +- src/core/lib/security/credentials.h | 3 +- 8 files changed, 217 insertions(+), 187 deletions(-) diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 1ed7b5b8ae4..71e3b682d1f 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -195,15 +195,15 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, sc->channel_args = grpc_server_get_channel_args(server); /* resolve address */ - resolved = grpc_blocking_resolve_address(addr, "https"); - if (!resolved) { + err = grpc_blocking_resolve_address(addr, "https", &resolved); + if (err != GRPC_ERROR_NONE) { goto error; } state = gpr_malloc(sizeof(*state)); memset(state, 0, sizeof(*state)); grpc_closure_init(&state->destroy_closure, destroy_done, state); - tcp = grpc_tcp_server_create(&state->destroy_closure); - if (!tcp) { + err = grpc_tcp_server_create(&state->destroy_closure, &tcp); + if (err != GRPC_ERROR_NONE) { goto error; } diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 8c8593748dd..d49c56ab634 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -82,12 +82,9 @@ int grpc_flowctl_trace = 0; static const grpc_transport_vtable vtable; /* forward declarations of various callbacks that we'll build closures around */ -static void writing_action(grpc_exec_ctx *exec_ctx, void *t, - bool iomgr_success_ignored); -static void reading_action(grpc_exec_ctx *exec_ctx, void *t, - bool iomgr_success_ignored); -static void parsing_action(grpc_exec_ctx *exec_ctx, void *t, - bool iomgr_success_ignored); +static void writing_action(grpc_exec_ctx *exec_ctx, void *t, grpc_error *error); +static void reading_action(grpc_exec_ctx *exec_ctx, void *t, grpc_error *error); +static void parsing_action(grpc_exec_ctx *exec_ctx, void *t, grpc_error *error); /** Set a transport level setting, and push it to our peer */ static void push_setting(grpc_chttp2_transport *t, grpc_chttp2_setting_id id, @@ -188,7 +185,8 @@ static void destruct_transport(grpc_exec_ctx *exec_ctx, and maybe they hold resources that need to be freed */ while (t->global.pings.next != &t->global.pings) { grpc_chttp2_outstanding_ping *ping = t->global.pings.next; - grpc_exec_ctx_enqueue(exec_ctx, ping->on_recv, false, NULL); + grpc_exec_ctx_push(exec_ctx, ping->on_recv, + GRPC_ERROR_CREATE("Transport closed"), NULL); ping->next->prev = ping->prev; ping->prev->next = ping->next; gpr_free(ping); @@ -624,7 +622,7 @@ static void finish_global_actions(grpc_exec_ctx *exec_ctx, t->executor.writing_active = 1; REF_TRANSPORT(t, "writing"); prevent_endpoint_shutdown(t); - grpc_exec_ctx_enqueue(exec_ctx, &t->writing_action, true, NULL); + grpc_exec_ctx_push(exec_ctx, &t->writing_action, GRPC_ERROR_NONE, NULL); } check_read_ops(exec_ctx, &t->global); @@ -735,11 +733,11 @@ static void terminate_writing_with_lock(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s_ignored, void *a) { - bool success = (bool)(uintptr_t)a; + grpc_error *error = a; allow_endpoint_shutdown_locked(exec_ctx, t); - if (!success) { + if (error != GRPC_ERROR_NONE) { drop_connection(exec_ctx, t); } @@ -764,15 +762,14 @@ static void terminate_writing_with_lock(grpc_exec_ctx *exec_ctx, } void grpc_chttp2_terminate_writing(grpc_exec_ctx *exec_ctx, - void *transport_writing, bool success) { + void *transport_writing, grpc_error *error) { grpc_chttp2_transport *t = TRANSPORT_FROM_WRITING(transport_writing); grpc_chttp2_run_with_global_lock(exec_ctx, t, NULL, - terminate_writing_with_lock, - (void *)(uintptr_t)success, 0); + terminate_writing_with_lock, error, 0); } static void writing_action(grpc_exec_ctx *exec_ctx, void *gt, - bool iomgr_success_ignored) { + grpc_error *error) { grpc_chttp2_transport *t = gt; GPR_TIMER_BEGIN("writing_action", 0); grpc_chttp2_perform_writes(exec_ctx, &t->writing, t->ep); @@ -851,7 +848,7 @@ static void maybe_start_some_streams( #define CLOSURE_BARRIER_FIRST_REF_BIT (1 << 16) static grpc_closure *add_closure_barrier(grpc_closure *closure) { - closure->final_data += CLOSURE_BARRIER_FIRST_REF_BIT; + closure->final_data.scratch += CLOSURE_BARRIER_FIRST_REF_BIT; return closure; } @@ -862,19 +859,19 @@ void grpc_chttp2_complete_closure_step(grpc_exec_ctx *exec_ctx, if (closure == NULL) { return; } - closure->final_data -= CLOSURE_BARRIER_FIRST_REF_BIT; + closure->final_data.scratch -= CLOSURE_BARRIER_FIRST_REF_BIT; if (!success) { - closure->final_data |= CLOSURE_BARRIER_FAILURE_BIT; + closure->final_data.scratch |= CLOSURE_BARRIER_FAILURE_BIT; } - if (closure->final_data < CLOSURE_BARRIER_FIRST_REF_BIT) { - if (closure->final_data & CLOSURE_BARRIER_STATS_BIT) { + if (closure->final_data.scratch < CLOSURE_BARRIER_FIRST_REF_BIT) { + if (closure->final_data.scratch & CLOSURE_BARRIER_STATS_BIT) { grpc_transport_move_stats(&stream_global->stats, stream_global->collecting_stats); stream_global->collecting_stats = NULL; } - grpc_exec_ctx_enqueue( + grpc_exec_ctx_push( exec_ctx, closure, - (closure->final_data & CLOSURE_BARRIER_FAILURE_BIT) == 0, NULL); + (closure->final_data.scratch & CLOSURE_BARRIER_FAILURE_BIT) == 0, NULL); } *pclosure = NULL; } @@ -892,7 +889,7 @@ static int contains_non_ok_status( return 0; } -static void do_nothing(grpc_exec_ctx *exec_ctx, void *arg, bool success) {} +static void do_nothing(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {} static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, @@ -909,12 +906,12 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, } /* use final_data as a barrier until enqueue time; the inital counter is dropped at the end of this function */ - on_complete->final_data = CLOSURE_BARRIER_FIRST_REF_BIT; + on_complete->final_data.scratch = CLOSURE_BARRIER_FIRST_REF_BIT; if (op->collect_stats != NULL) { GPR_ASSERT(stream_global->collecting_stats == NULL); stream_global->collecting_stats = op->collect_stats; - on_complete->final_data |= CLOSURE_BARRIER_STATS_BIT; + on_complete->final_data.scratch |= CLOSURE_BARRIER_STATS_BIT; } if (op->cancel_with_status != GRPC_STATUS_OK) { @@ -1056,7 +1053,7 @@ static void ack_ping_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, for (ping = transport_global->pings.next; ping != &transport_global->pings; ping = ping->next) { if (0 == memcmp(opaque_8bytes, ping->id, 8)) { - grpc_exec_ctx_enqueue(exec_ctx, ping->on_recv, true, NULL); + grpc_exec_ctx_push(exec_ctx, ping->on_recv, GRPC_ERROR_NONE, NULL); ping->next->prev = ping->prev; ping->prev->next = ping->next; gpr_free(ping); @@ -1089,7 +1086,7 @@ static void perform_transport_op_locked(grpc_exec_ctx *exec_ctx, return; } - grpc_exec_ctx_enqueue(exec_ctx, op->on_consumed, true, NULL); + grpc_exec_ctx_push(exec_ctx, op->on_consumed, GRPC_ERROR_NONE, NULL); if (op->on_connectivity_state_change != NULL) { grpc_connectivity_state_notify_on_state_change( @@ -1151,8 +1148,8 @@ static void check_read_ops(grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_metadata_buffer_publish( &stream_global->received_initial_metadata, stream_global->recv_initial_metadata); - grpc_exec_ctx_enqueue( - exec_ctx, stream_global->recv_initial_metadata_ready, true, NULL); + grpc_exec_ctx_push(exec_ctx, stream_global->recv_initial_metadata_ready, + GRPC_ERROR_NONE, NULL); stream_global->recv_initial_metadata_ready = NULL; } if (stream_global->recv_message_ready != NULL) { @@ -1165,13 +1162,13 @@ static void check_read_ops(grpc_exec_ctx *exec_ctx, *stream_global->recv_message = grpc_chttp2_incoming_frame_queue_pop( &stream_global->incoming_frames); GPR_ASSERT(*stream_global->recv_message != NULL); - grpc_exec_ctx_enqueue(exec_ctx, stream_global->recv_message_ready, true, - NULL); + grpc_exec_ctx_push(exec_ctx, stream_global->recv_message_ready, + GRPC_ERROR_NONE, NULL); stream_global->recv_message_ready = NULL; } else if (stream_global->published_trailing_metadata) { *stream_global->recv_message = NULL; - grpc_exec_ctx_enqueue(exec_ctx, stream_global->recv_message_ready, true, - NULL); + grpc_exec_ctx_push(exec_ctx, stream_global->recv_message_ready, + GRPC_ERROR_NONE, NULL); stream_global->recv_message_ready = NULL; } } @@ -1502,20 +1499,22 @@ static void update_global_window(void *args, uint32_t id, void *stream) { static void reading_action_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s_unused, void *arg); -static void parsing_action(grpc_exec_ctx *exec_ctx, void *arg, bool success); +static void parsing_action(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error); static void post_reading_action_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s_unused, void *arg); static void post_parse_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s_unused, void *arg); -static void reading_action(grpc_exec_ctx *exec_ctx, void *tp, bool success) { +static void reading_action(grpc_exec_ctx *exec_ctx, void *tp, + grpc_error *error) { /* Control flow: reading_action_locked -> (parse_unlocked -> post_parse_locked)? -> post_reading_action_locked */ grpc_chttp2_run_with_global_lock(exec_ctx, tp, NULL, reading_action_locked, - (void *)(uintptr_t)success, 0); + error, 0); } static void reading_action_locked(grpc_exec_ctx *exec_ctx, @@ -1523,7 +1522,7 @@ static void reading_action_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_stream *s_unused, void *arg) { grpc_chttp2_transport_global *transport_global = &t->global; grpc_chttp2_transport_parsing *transport_parsing = &t->parsing; - bool success = (bool)(uintptr_t)arg; + grpc_error *error = arg; GPR_ASSERT(!t->executor.parsing_active); if (!t->closed) { @@ -1532,27 +1531,30 @@ static void reading_action_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_stream_map_move_into(&t->new_stream_map, &t->parsing_stream_map); grpc_chttp2_prepare_to_read(transport_global, transport_parsing); - grpc_exec_ctx_enqueue(exec_ctx, &t->parsing_action, success, NULL); + grpc_exec_ctx_push(exec_ctx, &t->parsing_action, error, NULL); } else { post_reading_action_locked(exec_ctx, t, s_unused, arg); } } -static void parsing_action(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void parsing_action(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { grpc_chttp2_transport *t = arg; GPR_TIMER_BEGIN("reading_action.parse", 0); size_t i = 0; - for (; i < t->read_buffer.count && - grpc_chttp2_perform_read(exec_ctx, &t->parsing, - t->read_buffer.slices[i]); - i++) - ; - if (i != t->read_buffer.count) { - success = false; - } + grpc_error *errors[2] = {error, GRPC_ERROR_NONE}; + for (; i < t->read_buffer.count && errors[1] == GRPC_ERROR_NONE; i++) { + errors[1] = grpc_chttp2_perform_read(exec_ctx, &t->parsing, + t->read_buffer.slices[i]); + }; + grpc_error *err = + errors[0] == GRPC_ERROR_NONE && errors[1] == GRPC_ERROR_NONE + ? GRPC_ERROR_NONE + : GRPC_ERROR_CREATE_REFERENCING("Failed parsing HTTP/2", errors, + GPR_ARRAY_SIZE(errors)); GPR_TIMER_END("reading_action.parse", 0); - grpc_chttp2_run_with_global_lock(exec_ctx, t, NULL, post_parse_locked, - (void *)(uintptr_t)success, 0); + grpc_chttp2_run_with_global_lock(exec_ctx, t, NULL, post_parse_locked, err, + 0); } static void post_parse_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, @@ -1746,9 +1748,10 @@ static void incoming_byte_stream_next_locked(grpc_exec_ctx *exec_ctx, } if (bs->slices.count > 0) { *arg->slice = gpr_slice_buffer_take_first(&bs->slices); - grpc_exec_ctx_enqueue(exec_ctx, arg->on_complete, true, NULL); - } else if (bs->failed) { - grpc_exec_ctx_enqueue(exec_ctx, arg->on_complete, false, NULL); + grpc_exec_ctx_push(exec_ctx, arg->on_complete, GRPC_ERROR_NONE, NULL); + } else if (bs->error != GRPC_ERROR_NONE) { + grpc_exec_ctx_push(exec_ctx, arg->on_complete, grpc_error_ref(bs->error), + NULL); } else { bs->on_next = arg->on_complete; bs->next = arg->slice; @@ -1805,7 +1808,7 @@ static void incoming_byte_stream_push_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_byte_stream *bs = arg->byte_stream; if (bs->on_next != NULL) { *bs->next = arg->slice; - grpc_exec_ctx_enqueue(exec_ctx, bs->on_next, true, NULL); + grpc_exec_ctx_push(exec_ctx, bs->on_next, GRPC_ERROR_NONE, NULL); bs->on_next = NULL; } else { gpr_slice_buffer_add(&bs->slices, arg->slice); @@ -1827,9 +1830,10 @@ static void incoming_byte_stream_finished_failed_locked( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s, void *argp) { grpc_chttp2_incoming_byte_stream *bs = argp; - grpc_exec_ctx_enqueue(exec_ctx, bs->on_next, false, NULL); + grpc_error *error = argp; + grpc_exec_ctx_push(exec_ctx, bs->on_next, grpc_error_ref(error), NULL); bs->on_next = NULL; - bs->failed = 1; + bs->error = error; incoming_byte_stream_unref(exec_ctx, bs); } @@ -1883,7 +1887,7 @@ grpc_chttp2_incoming_byte_stream *grpc_chttp2_incoming_byte_stream_create( gpr_slice_buffer_init(&incoming_byte_stream->slices); incoming_byte_stream->on_next = NULL; incoming_byte_stream->is_tail = 1; - incoming_byte_stream->failed = 0; + incoming_byte_stream->error = GRPC_ERROR_NONE; if (add_to_queue->head == NULL) { add_to_queue->head = incoming_byte_stream; } else { @@ -2012,5 +2016,5 @@ void grpc_chttp2_transport_start_reading(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t = (grpc_chttp2_transport *)transport; REF_TRANSPORT(t, "reading_action"); /* matches unref inside reading_action */ gpr_slice_buffer_addn(&t->read_buffer, slices, nslices); - reading_action(exec_ctx, t, 1); + reading_action(exec_ctx, t, GRPC_ERROR_NONE); } diff --git a/src/core/ext/transport/chttp2/transport/frame.h b/src/core/ext/transport/chttp2/transport/frame.h index 5c72d91c2af..7776609367b 100644 --- a/src/core/ext/transport/chttp2/transport/frame.h +++ b/src/core/ext/transport/chttp2/transport/frame.h @@ -37,13 +37,7 @@ #include #include -/* Common definitions for frame handling in the chttp2 transport */ - -typedef enum { - GRPC_CHTTP2_PARSE_OK, - GRPC_CHTTP2_STREAM_ERROR, - GRPC_CHTTP2_CONNECTION_ERROR -} grpc_chttp2_parse_error; +#include "src/core/lib/iomgr/error.h" /* defined in internal.h */ typedef struct grpc_chttp2_stream_parsing grpc_chttp2_stream_parsing; diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 8c4fa2d34ac..cb5ed9fc253 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -156,7 +156,7 @@ struct grpc_chttp2_incoming_byte_stream { grpc_byte_stream base; gpr_refcount refs; struct grpc_chttp2_incoming_byte_stream *next_message; - int failed; + grpc_error *error; grpc_chttp2_transport *transport; grpc_chttp2_stream *stream; @@ -275,10 +275,10 @@ struct grpc_chttp2_transport_parsing { /* active parser */ void *parser_data; grpc_chttp2_stream_parsing *incoming_stream; - grpc_chttp2_parse_error (*parser)( - grpc_exec_ctx *exec_ctx, void *parser_user_data, - grpc_chttp2_transport_parsing *transport_parsing, - grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); + grpc_error *(*parser)(grpc_exec_ctx *exec_ctx, void *parser_user_data, + grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing, + gpr_slice slice, int is_last); /* received settings */ uint32_t settings[GRPC_CHTTP2_NUM_SETTINGS]; @@ -530,7 +530,7 @@ void grpc_chttp2_perform_writes( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_writing *transport_writing, grpc_endpoint *endpoint); void grpc_chttp2_terminate_writing(grpc_exec_ctx *exec_ctx, - void *transport_writing, bool success); + void *transport_writing, grpc_error *error); void grpc_chttp2_cleanup_writing(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *global, grpc_chttp2_transport_writing *writing); @@ -539,9 +539,9 @@ void grpc_chttp2_prepare_to_read(grpc_chttp2_transport_global *global, grpc_chttp2_transport_parsing *parsing); /** Process one slice of incoming data; return 1 if the connection is still viable after reading, or 0 if the connection should be torn down */ -int grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport_parsing *transport_parsing, - gpr_slice slice); +grpc_error *grpc_chttp2_perform_read( + grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing, + gpr_slice slice); void grpc_chttp2_publish_reads(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *global, grpc_chttp2_transport_parsing *parsing); diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index 2995066e519..aaa66a6c91b 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -45,30 +45,30 @@ #include "src/core/lib/profiling/timers.h" #include "src/core/lib/transport/static_metadata.h" -static int init_frame_parser(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport_parsing *transport_parsing); -static int init_header_frame_parser( +static grpc_error *init_frame_parser( + grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing); +static grpc_error *init_header_frame_parser( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing, int is_continuation); -static int init_data_frame_parser( +static grpc_error *init_data_frame_parser( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing); -static int init_rst_stream_parser( +static grpc_error *init_rst_stream_parser( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing); -static int init_settings_frame_parser( +static grpc_error *init_settings_frame_parser( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing); -static int init_window_update_frame_parser( +static grpc_error *init_window_update_frame_parser( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing); -static int init_ping_parser(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport_parsing *transport_parsing); -static int init_goaway_parser(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport_parsing *transport_parsing); -static int init_skip_frame_parser( +static grpc_error *init_ping_parser( + grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing); +static grpc_error *init_goaway_parser( + grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing); +static grpc_error *init_skip_frame_parser( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing, int is_header); -static int parse_frame_slice(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport_parsing *transport_parsing, - gpr_slice slice, int is_last); +static grpc_error *parse_frame_slice( + grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing, + gpr_slice slice, int is_last); void grpc_chttp2_prepare_to_read( grpc_chttp2_transport_global *transport_global, @@ -83,8 +83,8 @@ void grpc_chttp2_prepare_to_read( transport_global->settings[GRPC_SENT_SETTINGS], sizeof(transport_parsing->last_sent_settings)); transport_parsing->max_frame_size = - transport_global->settings[GRPC_ACKED_SETTINGS] - [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; + transport_global + ->settings[GRPC_ACKED_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; /* update the parsing view of incoming window */ while (grpc_chttp2_list_pop_unannounced_incoming_window_available( @@ -248,14 +248,15 @@ void grpc_chttp2_publish_reads( } } -int grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport_parsing *transport_parsing, - gpr_slice slice) { +grpc_error *grpc_chttp2_perform_read( + grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing, + gpr_slice slice) { uint8_t *beg = GPR_SLICE_START_PTR(slice); uint8_t *end = GPR_SLICE_END_PTR(slice); uint8_t *cur = beg; + grpc_error *err; - if (cur == end) return 1; + if (cur == end) return GRPC_ERROR_NONE; switch (transport_parsing->deframe_state) { case GRPC_DTS_CLIENT_PREFIX_0: @@ -285,21 +286,25 @@ int grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, while (cur != end && transport_parsing->deframe_state != GRPC_DTS_FH_0) { if (*cur != GRPC_CHTTP2_CLIENT_CONNECT_STRING[transport_parsing ->deframe_state]) { - gpr_log(GPR_INFO, - "Connect string mismatch: expected '%c' (%d) got '%c' (%d) " - "at byte %d", - GRPC_CHTTP2_CLIENT_CONNECT_STRING[transport_parsing - ->deframe_state], - (int)(uint8_t)GRPC_CHTTP2_CLIENT_CONNECT_STRING - [transport_parsing->deframe_state], - *cur, (int)*cur, transport_parsing->deframe_state); - return 0; + char *msg; + gpr_asprintf( + &msg, + "Connect string mismatch: expected '%c' (%d) got '%c' (%d) " + "at byte %d", + GRPC_CHTTP2_CLIENT_CONNECT_STRING[transport_parsing + ->deframe_state], + (int)(uint8_t)GRPC_CHTTP2_CLIENT_CONNECT_STRING + [transport_parsing->deframe_state], + *cur, (int)*cur, transport_parsing->deframe_state); + err = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return err; } ++cur; ++transport_parsing->deframe_state; } if (cur == end) { - return 1; + return GRPC_ERROR_NONE; } /* fallthrough */ dts_fh_0: @@ -308,7 +313,7 @@ int grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, transport_parsing->incoming_frame_size = ((uint32_t)*cur) << 16; if (++cur == end) { transport_parsing->deframe_state = GRPC_DTS_FH_1; - return 1; + return GRPC_ERROR_NONE; } /* fallthrough */ case GRPC_DTS_FH_1: @@ -316,7 +321,7 @@ int grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, transport_parsing->incoming_frame_size |= ((uint32_t)*cur) << 8; if (++cur == end) { transport_parsing->deframe_state = GRPC_DTS_FH_2; - return 1; + return GRPC_ERROR_NONE; } /* fallthrough */ case GRPC_DTS_FH_2: @@ -324,7 +329,7 @@ int grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, transport_parsing->incoming_frame_size |= *cur; if (++cur == end) { transport_parsing->deframe_state = GRPC_DTS_FH_3; - return 1; + return GRPC_ERROR_NONE; } /* fallthrough */ case GRPC_DTS_FH_3: @@ -332,7 +337,7 @@ int grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, transport_parsing->incoming_frame_type = *cur; if (++cur == end) { transport_parsing->deframe_state = GRPC_DTS_FH_4; - return 1; + return GRPC_ERROR_NONE; } /* fallthrough */ case GRPC_DTS_FH_4: @@ -340,7 +345,7 @@ int grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, transport_parsing->incoming_frame_flags = *cur; if (++cur == end) { transport_parsing->deframe_state = GRPC_DTS_FH_5; - return 1; + return GRPC_ERROR_NONE; } /* fallthrough */ case GRPC_DTS_FH_5: @@ -348,7 +353,7 @@ int grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, transport_parsing->incoming_stream_id = (((uint32_t)*cur) & 0x7f) << 24; if (++cur == end) { transport_parsing->deframe_state = GRPC_DTS_FH_6; - return 1; + return GRPC_ERROR_NONE; } /* fallthrough */ case GRPC_DTS_FH_6: @@ -356,7 +361,7 @@ int grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, transport_parsing->incoming_stream_id |= ((uint32_t)*cur) << 16; if (++cur == end) { transport_parsing->deframe_state = GRPC_DTS_FH_7; - return 1; + return GRPC_ERROR_NONE; } /* fallthrough */ case GRPC_DTS_FH_7: @@ -364,15 +369,16 @@ int grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, transport_parsing->incoming_stream_id |= ((uint32_t)*cur) << 8; if (++cur == end) { transport_parsing->deframe_state = GRPC_DTS_FH_8; - return 1; + return GRPC_ERROR_NONE; } /* fallthrough */ case GRPC_DTS_FH_8: GPR_ASSERT(cur < end); transport_parsing->incoming_stream_id |= ((uint32_t)*cur); transport_parsing->deframe_state = GRPC_DTS_FRAME; - if (!init_frame_parser(exec_ctx, transport_parsing)) { - return 0; + err = init_frame_parser(exec_ctx, transport_parsing); + if (err != GRPC_ERROR_NONE) { + return err; } if (transport_parsing->incoming_stream_id != 0 && transport_parsing->incoming_stream_id > @@ -381,62 +387,69 @@ int grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, transport_parsing->incoming_stream_id; } if (transport_parsing->incoming_frame_size == 0) { - if (!parse_frame_slice(exec_ctx, transport_parsing, gpr_empty_slice(), - 1)) { - return 0; + err = parse_frame_slice(exec_ctx, transport_parsing, gpr_empty_slice(), + 1); + if (err != GRPC_ERROR_NONE) { + return err; } transport_parsing->incoming_stream = NULL; if (++cur == end) { transport_parsing->deframe_state = GRPC_DTS_FH_0; - return 1; + return GRPC_ERROR_NONE; } goto dts_fh_0; /* loop */ } else if (transport_parsing->incoming_frame_size > transport_parsing->max_frame_size) { - gpr_log(GPR_DEBUG, "Frame size %d is larger than max frame size %d", - transport_parsing->incoming_frame_size, - transport_parsing->max_frame_size); - return 0; + char *msg; + gpr_asprintf(&msg, "Frame size %d is larger than max frame size %d", + transport_parsing->incoming_frame_size, + transport_parsing->max_frame_size); + err = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return err; } if (++cur == end) { - return 1; + return GRPC_ERROR_NONE; } /* fallthrough */ case GRPC_DTS_FRAME: GPR_ASSERT(cur < end); if ((uint32_t)(end - cur) == transport_parsing->incoming_frame_size) { - if (!parse_frame_slice(exec_ctx, transport_parsing, - gpr_slice_sub_no_ref(slice, (size_t)(cur - beg), - (size_t)(end - beg)), - 1)) { - return 0; + err = parse_frame_slice(exec_ctx, transport_parsing, + gpr_slice_sub_no_ref(slice, (size_t)(cur - beg), + (size_t)(end - beg)), + 1); + if (err != GRPC_ERROR_NONE) { + return err; } transport_parsing->deframe_state = GRPC_DTS_FH_0; transport_parsing->incoming_stream = NULL; - return 1; + return GRPC_ERROR_NONE; } else if ((uint32_t)(end - cur) > transport_parsing->incoming_frame_size) { size_t cur_offset = (size_t)(cur - beg); - if (!parse_frame_slice( - exec_ctx, transport_parsing, - gpr_slice_sub_no_ref( - slice, cur_offset, - cur_offset + transport_parsing->incoming_frame_size), - 1)) { - return 0; + err = parse_frame_slice( + exec_ctx, transport_parsing, + gpr_slice_sub_no_ref( + slice, cur_offset, + cur_offset + transport_parsing->incoming_frame_size), + 1); + if (err != GRPC_ERROR_NONE) { + return err; } cur += transport_parsing->incoming_frame_size; transport_parsing->incoming_stream = NULL; goto dts_fh_0; /* loop */ } else { - if (!parse_frame_slice(exec_ctx, transport_parsing, - gpr_slice_sub_no_ref(slice, (size_t)(cur - beg), - (size_t)(end - beg)), - 0)) { - return 0; + err = parse_frame_slice(exec_ctx, transport_parsing, + gpr_slice_sub_no_ref(slice, (size_t)(cur - beg), + (size_t)(end - beg)), + 0); + if (err != GRPC_ERROR_NONE) { + return err; } transport_parsing->incoming_frame_size -= (uint32_t)(end - cur); - return 1; + return GRPC_ERROR_NONE; } GPR_UNREACHABLE_CODE(return 0); } @@ -444,23 +457,30 @@ int grpc_chttp2_perform_read(grpc_exec_ctx *exec_ctx, GPR_UNREACHABLE_CODE(return 0); } -static int init_frame_parser(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport_parsing *transport_parsing) { +static grpc_error *init_frame_parser( + grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing) { if (transport_parsing->expect_continuation_stream_id != 0) { if (transport_parsing->incoming_frame_type != GRPC_CHTTP2_FRAME_CONTINUATION) { - gpr_log(GPR_ERROR, "Expected CONTINUATION frame, got frame type %02x", - transport_parsing->incoming_frame_type); - return 0; + char *msg; + gpr_asprintf(&msg, "Expected CONTINUATION frame, got frame type %02x", + transport_parsing->incoming_frame_type); + grpc_error *err = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return err; } if (transport_parsing->expect_continuation_stream_id != transport_parsing->incoming_stream_id) { - gpr_log(GPR_ERROR, - "Expected CONTINUATION frame for grpc_chttp2_stream %08x, got " - "grpc_chttp2_stream %08x", - transport_parsing->expect_continuation_stream_id, - transport_parsing->incoming_stream_id); - return 0; + char *msg; + gpr_asprintf( + &msg, + "Expected CONTINUATION frame for grpc_chttp2_stream %08x, got " + "grpc_chttp2_stream %08x", + transport_parsing->expect_continuation_stream_id, + transport_parsing->incoming_stream_id); + grpc_error *err = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return err; } return init_header_frame_parser(exec_ctx, transport_parsing, 1); } @@ -483,22 +503,24 @@ static int init_frame_parser(grpc_exec_ctx *exec_ctx, case GRPC_CHTTP2_FRAME_GOAWAY: return init_goaway_parser(exec_ctx, transport_parsing); default: - gpr_log(GPR_ERROR, "Unknown frame type %02x", - transport_parsing->incoming_frame_type); + if (grpc_http_trace) { + gpr_log(GPR_ERROR, "Unknown frame type %02x", + transport_parsing->incoming_frame_type); + } return init_skip_frame_parser(exec_ctx, transport_parsing, 0); } } -static grpc_chttp2_parse_error skip_parser( - grpc_exec_ctx *exec_ctx, void *parser, - grpc_chttp2_transport_parsing *transport_parsing, - grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { - return GRPC_CHTTP2_PARSE_OK; +static grpc_error *skip_parser(grpc_exec_ctx *exec_ctx, void *parser, + grpc_chttp2_transport_parsing *transport_parsing, + grpc_chttp2_stream_parsing *stream_parsing, + gpr_slice slice, int is_last) { + return GRPC_ERROR_NONE; } static void skip_header(void *tp, grpc_mdelem *md) { GRPC_MDELEM_UNREF(md); } -static int init_skip_frame_parser( +static grpc_error *init_skip_frame_parser( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing, int is_header) { if (is_header) { @@ -513,7 +535,7 @@ static int init_skip_frame_parser( } else { transport_parsing->parser = skip_parser; } - return 1; + return GRPC_ERROR_NONE; } void grpc_chttp2_parsing_become_skip_parser( @@ -523,22 +545,28 @@ void grpc_chttp2_parsing_become_skip_parser( transport_parsing->parser == grpc_chttp2_header_parser_parse); } -static grpc_chttp2_parse_error update_incoming_window( +static grpc_error *update_incoming_window( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing) { uint32_t incoming_frame_size = transport_parsing->incoming_frame_size; if (incoming_frame_size > transport_parsing->incoming_window) { - gpr_log(GPR_ERROR, "frame of size %d overflows incoming window of %d", - transport_parsing->incoming_frame_size, - transport_parsing->incoming_window); - return GRPC_CHTTP2_CONNECTION_ERROR; + char *msg; + gpr_asprintf(&msg, "frame of size %d overflows incoming window of %d", + transport_parsing->incoming_frame_size, + transport_parsing->incoming_window); + grpc_error *err = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return err; } if (incoming_frame_size > stream_parsing->incoming_window) { - gpr_log(GPR_ERROR, "frame of size %d overflows incoming window of %d", - transport_parsing->incoming_frame_size, - stream_parsing->incoming_window); - return GRPC_CHTTP2_CONNECTION_ERROR; + char *msg; + gpr_asprintf(&msg, "frame of size %d overflows incoming window of %d", + transport_parsing->incoming_frame_size, + stream_parsing->incoming_window); + grpc_error *err = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return err; } GRPC_CHTTP2_FLOW_DEBIT_TRANSPORT("parse", transport_parsing, incoming_window, @@ -552,7 +580,7 @@ static grpc_chttp2_parse_error update_incoming_window( return GRPC_CHTTP2_PARSE_OK; } -static int init_data_frame_parser( +static grpc_error *init_data_frame_parser( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing) { grpc_chttp2_stream_parsing *stream_parsing = grpc_chttp2_parsing_lookup_stream(transport_parsing, @@ -577,7 +605,7 @@ static int init_data_frame_parser( transport_parsing->incoming_stream = stream_parsing; transport_parsing->parser = grpc_chttp2_data_parser_parse; transport_parsing->parser_data = &stream_parsing->data_parser; - return 1; + return GRPC_ERROR_NONE; case GRPC_CHTTP2_STREAM_ERROR: stream_parsing->received_close = 1; stream_parsing->saw_rst_stream = 1; @@ -669,7 +697,7 @@ static void on_trailing_header(void *tp, grpc_mdelem *md) { GPR_TIMER_END("on_trailing_header", 0); } -static int init_header_frame_parser( +static grpc_error *init_header_frame_parser( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing, int is_continuation) { uint8_t is_eoh = (transport_parsing->incoming_frame_flags & @@ -764,10 +792,10 @@ static int init_header_frame_parser( GRPC_CHTTP2_FLAG_HAS_PRIORITY)) { grpc_chttp2_hpack_parser_set_has_priority(&transport_parsing->hpack_parser); } - return 1; + return GRPC_ERROR_NONE; } -static int init_window_update_frame_parser( +static grpc_error *init_window_update_frame_parser( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing) { int ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_window_update_parser_begin_frame( &transport_parsing->simple.window_update, diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index 0ce684fdbc7..1429631b67a 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -44,6 +44,7 @@ typedef enum { GRPC_ERROR_INT_ERRNO, GRPC_ERROR_INT_FILE_LINE, GRPC_ERROR_INT_STATUS_CODE, + GRPC_ERROR_INT_WARNING, } grpc_error_ints; typedef enum { @@ -75,6 +76,7 @@ grpc_error *grpc_error_ref(grpc_error *err); void grpc_error_unref(grpc_error *err); grpc_error *grpc_error_set_int(grpc_error *src, grpc_error_ints which, intptr_t value); +const intptr_t *grpc_error_get_int(grpc_error *error, grpc_error_ints which); grpc_error *grpc_error_set_time(grpc_error *src, grpc_error_times which, gpr_timespec value); grpc_error *grpc_error_set_str(grpc_error *src, grpc_error_strs which, diff --git a/src/core/lib/iomgr/unix_sockets_posix.c b/src/core/lib/iomgr/unix_sockets_posix.c index 5767c852dfe..0e7670e5a5e 100644 --- a/src/core/lib/iomgr/unix_sockets_posix.c +++ b/src/core/lib/iomgr/unix_sockets_posix.c @@ -47,17 +47,18 @@ void grpc_create_socketpair_if_unix(int sv[2]) { GPR_ASSERT(socketpair(AF_UNIX, SOCK_STREAM, 0, sv) == 0); } -grpc_resolved_addresses *grpc_resolve_unix_domain_address(const char *name) { +grpc_error *grpc_resolve_unix_domain_address(const char *name, + grpc_resolved_addresses **addrs) { struct sockaddr_un *un; - grpc_resolved_addresses *addrs = gpr_malloc(sizeof(grpc_resolved_addresses)); - addrs->naddrs = 1; - addrs->addrs = gpr_malloc(sizeof(grpc_resolved_address)); - un = (struct sockaddr_un *)addrs->addrs->addr; + *addrs = gpr_malloc(sizeof(grpc_resolved_addresses)); + (*addrs)->naddrs = 1; + (*addrs)->addrs = gpr_malloc(sizeof(grpc_resolved_address)); + un = (struct sockaddr_un *)(*addrs)->addrs->addr; un->sun_family = AF_UNIX; strcpy(un->sun_path, name); - addrs->addrs->len = strlen(un->sun_path) + sizeof(un->sun_family) + 1; - return addrs; + (*addrs)->addrs->len = strlen(un->sun_path) + sizeof(un->sun_family) + 1; + return GRPC_ERROR_NONE; } int grpc_is_unix_socket(const struct sockaddr *addr) { diff --git a/src/core/lib/security/credentials.h b/src/core/lib/security/credentials.h index 0373ceaa3fc..48fcd7ba06f 100644 --- a/src/core/lib/security/credentials.h +++ b/src/core/lib/security/credentials.h @@ -318,7 +318,8 @@ typedef void (*grpc_fetch_oauth2_func)(grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *req, grpc_httpcli_context *http_context, grpc_pollset *pollset, - grpc_httpcli_response_cb response_cb, + grpc_closure *on_http_response, + grpc_http_response *response, gpr_timespec deadline); typedef struct { From f9b89b181d243f8b3eaddeb000f751d71c257ad5 Mon Sep 17 00:00:00 2001 From: Michael Yeh Date: Wed, 4 May 2016 16:36:20 -0700 Subject: [PATCH 0276/1894] Updated to more closely mimic greeter_async_client.cc. Fixed typos in comments. --- .../cpp/helloworld/greeter_async_client.cc | 8 ++-- .../cpp/helloworld/greeter_async_client2.cc | 37 +++++++++++-------- 2 files changed, 25 insertions(+), 20 deletions(-) diff --git a/examples/cpp/helloworld/greeter_async_client.cc b/examples/cpp/helloworld/greeter_async_client.cc index 35014267feb..c1f5eb55f05 100644 --- a/examples/cpp/helloworld/greeter_async_client.cc +++ b/examples/cpp/helloworld/greeter_async_client.cc @@ -53,7 +53,7 @@ class GreeterClient { explicit GreeterClient(std::shared_ptr channel) : stub_(Greeter::NewStub(channel)) {} - // Assambles the client's payload, sends it and presents the response back + // Assembles the client's payload, sends it and presents the response back // from the server. std::string SayHello(const std::string& user) { // Data we are sending to the server. @@ -74,9 +74,9 @@ class GreeterClient { // Storage for the status of the RPC upon completion. Status status; - // stub_->AsyncSayHello() perform the RPC call, returning an instance we - // store in "rpc". Because we are using the asynchronous API, we need the - // hold on to the "rpc" instance in order to get updates on the ongoig RPC. + // stub_->AsyncSayHello() performs the RPC call, returning an instance we + // store in "rpc". Because we are using the asynchronous API, we need to + // hold on to the "rpc" instance in order to get updates on the ongoing RPC. std::unique_ptr > rpc( stub_->AsyncSayHello(&context, request, &cq)); diff --git a/examples/cpp/helloworld/greeter_async_client2.cc b/examples/cpp/helloworld/greeter_async_client2.cc index cdbdd1f3063..0902376074e 100644 --- a/examples/cpp/helloworld/greeter_async_client2.cc +++ b/examples/cpp/helloworld/greeter_async_client2.cc @@ -54,42 +54,49 @@ class GreeterClient { explicit GreeterClient(std::shared_ptr channel) : stub_(Greeter::NewStub(channel)) {} - // Assambles the client's payload, sends it and presents the response back - // from the server. + // Assembles the client's payload and sends it to the server. void SayHello(const std::string& user) { // Data we are sending to the server. HelloRequest request; request.set_name(user); + // Call object to store rpc data AsyncClientCall* call = new AsyncClientCall; - // stub_->AsyncSayHello() perform the RPC call, returning an instance we - // store in "rpc". Because we are using the asynchronous API, we need the - // hold on to the "rpc" instance in order to get updates on the ongoing RPC. + // stub_->AsyncSayHello() performs the RPC call, returning an instance to + // store in "call". Because we are using the asynchronous API, we need to + // hold on to the "call" instance in order to get updates on the ongoing RPC. call->response_reader = stub_->AsyncSayHello(&call->context, request, &cq_); // Request that, upon completion of the RPC, "reply" be updated with the // server's response; "status" with the indication of whether the operation - // was successful. Tag the request with the memory address of call object. + // was successful. Tag the request with the memory address of the call object. call->response_reader->Finish(&call->reply, &call->status, (void*)call); } - // Loop while listening for completed responses - void AsyncCompleteRpc() - { + // Loop while listening for completed responses. + // Prints out the response from the server. + void AsyncCompleteRpc() { void* got_tag; bool ok = false; // Block until the next result is available in the completion queue "cq". - while (cq_.Next(&got_tag, &ok)) - { + while (cq_.Next(&got_tag, &ok)) { + // The tag in this example is the memory location of the call object AsyncClientCall* call = static_cast(got_tag); - if (ok) + + // Verify that the request was completed successfully. Note that "ok" + // corresponds solely to the request for updates introduced by Finish(). + GPR_ASSERT(ok); + + if (call->status.ok()) std::cout << "Greeter received: " << call->reply.message() << std::endl; else std::cout << "RPC failed" << std::endl; + + // Once we're complete, deallocate the call object. delete call; } } @@ -97,8 +104,7 @@ class GreeterClient { private: // struct for keeping state and data information - struct AsyncClientCall - { + struct AsyncClientCall { // Container for the data we expect from the server. HelloReply reply; @@ -135,8 +141,7 @@ int main(int argc, char** argv) { // Spawn reader thread that loops indefinitely std::thread thread_ = std::thread(&GreeterClient::AsyncCompleteRpc, &greeter); - for (int i = 0; i < 100; i++) - { + for (int i = 0; i < 100; i++) { std::string user("world " + std::to_string(i)); greeter.SayHello(user); // The actual RPC call! } From 751fbb06f6d2040d49d6c3d89192eb08a1c6cff4 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Wed, 4 May 2016 16:12:56 -0700 Subject: [PATCH 0277/1894] Build grpcio tools on Windows --- tools/run_tests/artifact_targets.py | 3 ++- tools/run_tests/build_artifact_python.bat | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/tools/run_tests/artifact_targets.py b/tools/run_tests/artifact_targets.py index 72f4f8dd967..477bd468887 100644 --- a/tools/run_tests/artifact_targets.py +++ b/tools/run_tests/artifact_targets.py @@ -151,7 +151,8 @@ class PythonArtifact: elif self.platform == 'windows': return create_jobspec(self.name, ['tools\\run_tests\\build_artifact_python.bat', - self.python_version + self.python_version, + '32' if self.arch == 'x86' else '64' ], shell=True) else: diff --git a/tools/run_tests/build_artifact_python.bat b/tools/run_tests/build_artifact_python.bat index 023d3945494..636ae0d393d 100644 --- a/tools/run_tests/build_artifact_python.bat +++ b/tools/run_tests/build_artifact_python.bat @@ -52,8 +52,21 @@ set GRPC_PYTHON_BUILD_WITH_CYTHON=1 python setup.py bdist_wheel +@rem Build gRPC Python tools +set PATH=C:\msys64\mingw%2\bin;%PATH% +set CC=C:\msys64\mingw%2\bin\g++.exe +set CFLAGS=-fno-wrapv +python tools\distrib\python\make_grpcio_tools.py +if %2 == 32 ( + python tools\distrib\python\grpcio_tools\setup.py build_ext -c mingw32 +) else ( + python tools\distrib\python\grpcio_tools\setup.py build_ext -c mingw32 -DMS_WIN64 +) +python tools\distrib\python\grpcio_tools\setup.py bdist_wheel + mkdir artifacts xcopy /Y /I /S dist\* artifacts\ || goto :error +xcopy /Y /I /S tools\distrib\python\grpcio_tools\dist\* artifacts\ || goto :error goto :EOF From c84ed6813e24b6d64d2eea7e39188ddae11528c6 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Wed, 4 May 2016 16:30:11 -0700 Subject: [PATCH 0278/1894] Proto server reflection --- BUILD | 24 + Makefile | 155 +- build.yaml | 27 + .../impl/proto_server_reflection_plugin.h | 74 + .../include/grpc++/impl/reflection.grpc.pb.h | 555 ++++ .../include/grpc++/impl/reflection.pb.h | 1128 ++++++++ .../reflection/proto_server_reflection.cc | 172 ++ .../reflection/proto_server_reflection.h | 92 + .../proto_server_reflection_plugin.cc | 89 + extensions/reflection/reflection.grpc.pb.cc | 245 ++ extensions/reflection/reflection.pb.cc | 2448 +++++++++++++++++ .../grpc/reflection/v1alpha/reflection.proto | 118 + templates/Makefile.template | 7 +- .../proto_reflection_descriptor_database.cc | 238 ++ .../proto_reflection_descriptor_database.h | 95 + test/cpp/util/reflection_debug/Makefile | 50 + .../reflection_debug/reflection_client.cc | 216 ++ .../extensions/gen_reflection_proto.sh | 33 + tools/run_tests/sources_and_headers.json | 43 + tools/run_tests/tests.json | 21 + vsprojects/grpc.sln | 21 + .../grpc++_reflection.vcxproj | 176 ++ .../grpc++_reflection.vcxproj.filters | 52 + .../reflection_debug_test.vcxproj | 206 ++ .../reflection_debug_test.vcxproj.filters | 32 + 25 files changed, 6309 insertions(+), 8 deletions(-) create mode 100644 extensions/include/grpc++/impl/proto_server_reflection_plugin.h create mode 100644 extensions/include/grpc++/impl/reflection.grpc.pb.h create mode 100644 extensions/include/grpc++/impl/reflection.pb.h create mode 100644 extensions/reflection/proto_server_reflection.cc create mode 100644 extensions/reflection/proto_server_reflection.h create mode 100644 extensions/reflection/proto_server_reflection_plugin.cc create mode 100644 extensions/reflection/reflection.grpc.pb.cc create mode 100644 extensions/reflection/reflection.pb.cc create mode 100644 src/proto/grpc/reflection/v1alpha/reflection.proto create mode 100644 test/cpp/util/proto_reflection_descriptor_database.cc create mode 100644 test/cpp/util/proto_reflection_descriptor_database.h create mode 100644 test/cpp/util/reflection_debug/Makefile create mode 100644 test/cpp/util/reflection_debug/reflection_client.cc create mode 100755 tools/codegen/extensions/gen_reflection_proto.sh create mode 100644 vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj create mode 100644 vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters create mode 100644 vsprojects/vcxproj/test/reflection_debug_test/reflection_debug_test.vcxproj create mode 100644 vsprojects/vcxproj/test/reflection_debug_test/reflection_debug_test.vcxproj.filters diff --git a/BUILD b/BUILD index b4b10b535e8..a885f3ca8c4 100644 --- a/BUILD +++ b/BUILD @@ -983,6 +983,30 @@ cc_library( +cc_library( + name = "grpc++_reflection", + srcs = [ + "extensions/reflection/proto_server_reflection.h", + "extensions/reflection/proto_server_reflection.cc", + "extensions/reflection/proto_server_reflection_plugin.cc", + "extensions/reflection/reflection.grpc.pb.cc", + "extensions/reflection/reflection.pb.cc", + ], + hdrs = [ + "extensions/include/grpc++/impl/proto_server_reflection_plugin.h", + "extensions/include/grpc++/impl/reflection.grpc.pb.h", + "extensions/include/grpc++/impl/reflection.pb.h", + ], + includes = [ + "include", + ".", + ], + deps = [ + ], +) + + + cc_library( name = "grpc++_unsecure", srcs = [ diff --git a/Makefile b/Makefile index 922e0b0568f..aca0fb2c3fe 100644 --- a/Makefile +++ b/Makefile @@ -84,6 +84,7 @@ BINDIR = $(BUILDDIR_ABSOLUTE)/bins OBJDIR = $(BUILDDIR_ABSOLUTE)/objs LIBDIR = $(BUILDDIR_ABSOLUTE)/libs GENDIR = $(BUILDDIR_ABSOLUTE)/gens +EXTDIR = $(BUILDDIR_ABSOLUTE)/extensions # Configurations @@ -362,7 +363,7 @@ CPPFLAGS += -fPIC LDFLAGS += -fPIC endif -INCLUDES = . include $(GENDIR) +INCLUDES = . include $(GENDIR) $(EXTDIR) $(EXTDIR)/include LDFLAGS += -Llibs/$(CONFIG) ifeq ($(SYSTEM),Darwin) @@ -1033,6 +1034,7 @@ qps_test: $(BINDIR)/$(CONFIG)/qps_test qps_worker: $(BINDIR)/$(CONFIG)/qps_worker reconnect_interop_client: $(BINDIR)/$(CONFIG)/reconnect_interop_client reconnect_interop_server: $(BINDIR)/$(CONFIG)/reconnect_interop_server +reflection_debug_test: $(BINDIR)/$(CONFIG)/reflection_debug_test secure_auth_context_test: $(BINDIR)/$(CONFIG)/secure_auth_context_test secure_sync_unary_ping_pong_test: $(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test server_crash_test: $(BINDIR)/$(CONFIG)/server_crash_test @@ -1161,13 +1163,13 @@ static: static_c static_cxx static_c: pc_c pc_c_unsecure cache.mk pc_c_zookeeper $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a static_zookeeper_libs -static_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a +static_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a shared: shared_c shared_cxx shared_c: pc_c pc_c_unsecure cache.mk pc_c_zookeeper $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) shared_zookeeper_libs -shared_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) +shared_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) shared_csharp: shared_c $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) ifeq ($(HAS_ZOOKEEPER),true) @@ -1399,6 +1401,7 @@ buildtests_cxx: buildtests_zookeeper privatelibs_cxx \ $(BINDIR)/$(CONFIG)/qps_worker \ $(BINDIR)/$(CONFIG)/reconnect_interop_client \ $(BINDIR)/$(CONFIG)/reconnect_interop_server \ + $(BINDIR)/$(CONFIG)/reflection_debug_test \ $(BINDIR)/$(CONFIG)/secure_auth_context_test \ $(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test \ $(BINDIR)/$(CONFIG)/server_crash_test \ @@ -1728,6 +1731,8 @@ test_cxx: test_zookeeper buildtests_cxx $(Q) $(BINDIR)/$(CONFIG)/qps_openloop_test || ( echo test qps_openloop_test failed ; exit 1 ) $(E) "[RUN] Testing qps_test" $(Q) $(BINDIR)/$(CONFIG)/qps_test || ( echo test qps_test failed ; exit 1 ) + $(E) "[RUN] Testing reflection_debug_test" + $(Q) $(BINDIR)/$(CONFIG)/reflection_debug_test || ( echo test reflection_debug_test failed ; exit 1 ) $(E) "[RUN] Testing secure_auth_context_test" $(Q) $(BINDIR)/$(CONFIG)/secure_auth_context_test || ( echo test secure_auth_context_test failed ; exit 1 ) $(E) "[RUN] Testing secure_sync_unary_ping_pong_test" @@ -1808,6 +1813,8 @@ strip-static_cxx: static_cxx ifeq ($(CONFIG),opt) $(E) "[STRIP] Stripping libgrpc++.a" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc++.a + $(E) "[STRIP] Stripping libgrpc++_reflection.a" + $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(E) "[STRIP] Stripping libgrpc++_unsecure.a" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a endif @@ -1830,6 +1837,8 @@ strip-shared_cxx: shared_cxx ifeq ($(CONFIG),opt) $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT)" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) + $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT)" + $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT)" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) endif @@ -2131,8 +2140,8 @@ install-headers_c: install-headers_cxx: $(E) "[INSTALL] Installing public C++ headers" - $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) -d $(prefix)/$(dir $(h)) && ) exit 0 || exit 1 - $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) $(h) $(prefix)/$(h) && ) exit 0 || exit 1 + $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) -d $(prefix)/$(patsubst extensions/%,%,$(dir $(h))) && ) exit 0 || exit 1 + $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) $(h) $(prefix)/$(patsubst extensions/%,%,$(h)) && ) exit 0 || exit 1 install-static: install-static_c install-static_cxx @@ -2156,6 +2165,9 @@ install-static_cxx: static_cxx strip-static_cxx install-pkg-config_cxx $(E) "[INSTALL] Installing libgrpc++.a" $(Q) $(INSTALL) -d $(prefix)/lib $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++.a $(prefix)/lib/libgrpc++.a + $(E) "[INSTALL] Installing libgrpc++_reflection.a" + $(Q) $(INSTALL) -d $(prefix)/lib + $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(prefix)/lib/libgrpc++_reflection.a $(E) "[INSTALL] Installing libgrpc++_unsecure.a" $(Q) $(INSTALL) -d $(prefix)/lib $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a $(prefix)/lib/libgrpc++_unsecure.a @@ -2217,6 +2229,15 @@ ifeq ($(SYSTEM),MINGW32) else ifneq ($(SYSTEM),Darwin) $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++.so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++.so +endif + $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT)" + $(Q) $(INSTALL) -d $(prefix)/lib + $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/$(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) +ifeq ($(SYSTEM),MINGW32) + $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection-imp.a $(prefix)/lib/libgrpc++_reflection-imp.a +else ifneq ($(SYSTEM),Darwin) + $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_reflection.so.0 + $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_reflection.so endif $(E) "[INSTALL] Installing $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT)" $(Q) $(INSTALL) -d $(prefix)/lib @@ -3343,6 +3364,80 @@ endif endif +LIBGRPC++_REFLECTION_SRC = \ + extensions/reflection/proto_server_reflection.cc \ + extensions/reflection/proto_server_reflection_plugin.cc \ + extensions/reflection/reflection.grpc.pb.cc \ + extensions/reflection/reflection.pb.cc \ + +PUBLIC_HEADERS_CXX += \ + extensions/include/grpc++/impl/proto_server_reflection_plugin.h \ + extensions/include/grpc++/impl/reflection.grpc.pb.h \ + extensions/include/grpc++/impl/reflection.pb.h \ + +LIBGRPC++_REFLECTION_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_REFLECTION_SRC)))) + + +ifeq ($(NO_SECURE),true) + +# You can't build secure libraries if you don't have OpenSSL. + +$(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a: openssl_dep_error + +$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT): 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)/libgrpc++_reflection.a: protobuf_dep_error + +$(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT): protobuf_dep_error + +else + +$(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a: $(ZLIB_DEP) $(OPENSSL_DEP) $(PROTOBUF_DEP) $(LIBGRPC++_REFLECTION_OBJS) + $(E) "[AR] Creating $@" + $(Q) mkdir -p `dirname $@` + $(Q) rm -f $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a + $(Q) $(AR) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBGRPC++_REFLECTION_OBJS) +ifeq ($(SYSTEM),Darwin) + $(Q) ranlib -no_warning_for_no_symbols $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a +endif + + + +ifeq ($(SYSTEM),MINGW32) +$(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(OPENSSL_DEP) + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_reflection.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) +else +$(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(OPENSSL_DEP) + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` +ifeq ($(SYSTEM),Darwin) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) +else + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_reflection.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) + $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).so.0 + $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).so +endif +endif + +endif + +endif + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(LIBGRPC++_REFLECTION_OBJS:.o=.dep) +endif +endif + + LIBGRPC++_TEST_CONFIG_SRC = \ test/cpp/util/test_config.cc \ @@ -11393,6 +11488,52 @@ endif $(OBJDIR)/$(CONFIG)/test/cpp/interop/reconnect_interop_server.o: $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.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/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc +REFLECTION_DEBUG_TEST_SRC = \ + test/cpp/util/proto_reflection_descriptor_database.cc \ + test/cpp/util/reflection_debug/reflection_client.cc \ + +REFLECTION_DEBUG_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(REFLECTION_DEBUG_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/reflection_debug_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.0.0+. + +$(BINDIR)/$(CONFIG)/reflection_debug_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/reflection_debug_test: $(PROTOBUF_DEP) $(REFLECTION_DEBUG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) $(REFLECTION_DEBUG_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/reflection_debug_test + +endif + +endif + +$(OBJDIR)/$(CONFIG)/test/cpp/util/proto_reflection_descriptor_database.o: $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a + +$(OBJDIR)/$(CONFIG)/test/cpp/util/reflection_debug/reflection_client.o: $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_reflection_debug_test: $(REFLECTION_DEBUG_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(REFLECTION_DEBUG_TEST_OBJS:.o=.dep) +endif +endif + + SECURE_AUTH_CONTEXT_TEST_SRC = \ test/cpp/common/secure_auth_context_test.cc \ @@ -14311,6 +14452,10 @@ ifneq ($(OPENSSL_DEP),) # This is to ensure the embedded OpenSSL is built beforehand, properly # installing headers to their final destination on the drive. We need this # otherwise parallel compilation will fail if a source is compiled first. +extensions/reflection/proto_server_reflection.cc: $(OPENSSL_DEP) +extensions/reflection/proto_server_reflection_plugin.cc: $(OPENSSL_DEP) +extensions/reflection/reflection.grpc.pb.cc: $(OPENSSL_DEP) +extensions/reflection/reflection.pb.cc: $(OPENSSL_DEP) src/core/ext/transport/chttp2/client/secure/secure_channel_create.c: $(OPENSSL_DEP) src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c: $(OPENSSL_DEP) src/core/lib/http/httpcli_security_connector.c: $(OPENSSL_DEP) diff --git a/build.yaml b/build.yaml index 441752dc3dc..deae7444dc8 100644 --- a/build.yaml +++ b/build.yaml @@ -883,6 +883,20 @@ libs: - grpc++_codegen secure: check vs_project_guid: '{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}' +- name: grpc++_reflection + build: all + language: c++ + public_headers: + - extensions/include/grpc++/impl/proto_server_reflection_plugin.h + - extensions/include/grpc++/impl/reflection.grpc.pb.h + - extensions/include/grpc++/impl/reflection.pb.h + headers: + - extensions/reflection/proto_server_reflection.h + src: + - extensions/reflection/proto_server_reflection.cc + - extensions/reflection/proto_server_reflection_plugin.cc + - extensions/reflection/reflection.grpc.pb.cc + - extensions/reflection/reflection.pb.cc - name: grpc++_test_config build: private language: c++ @@ -2884,6 +2898,19 @@ targets: - gpr_test_util - gpr - grpc++_test_config +- name: reflection_debug_test + build: test + language: c++ + headers: + - test/cpp/util/proto_reflection_descriptor_database.h + src: + - test/cpp/util/proto_reflection_descriptor_database.cc + - test/cpp/util/reflection_debug/reflection_client.cc + deps: + - grpc++_reflection + - grpc++ + - grpc + - gpr - name: secure_auth_context_test gtest: true build: test diff --git a/extensions/include/grpc++/impl/proto_server_reflection_plugin.h b/extensions/include/grpc++/impl/proto_server_reflection_plugin.h new file mode 100644 index 00000000000..adc6eb7bc3f --- /dev/null +++ b/extensions/include/grpc++/impl/proto_server_reflection_plugin.h @@ -0,0 +1,74 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPCXX_PROTO_SERVER_REFLECTION_PLUGIN_H +#define GRPCXX_PROTO_SERVER_REFLECTION_PLUGIN_H + +#include + +#include +#include + +namespace grpc { +class ServerInitializer; +class ProtoServerReflection; +} // namespace grpc + +namespace grpc { +namespace reflection { + +class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin { + public: + ProtoServerReflectionPlugin(); + ::grpc::string name() GRPC_OVERRIDE; + void InitServer(::grpc::ServerInitializer* si) GRPC_OVERRIDE; + void Finish(::grpc::ServerInitializer* si) GRPC_OVERRIDE; + void ChangeArguments(const ::grpc::string& name, void* value) GRPC_OVERRIDE; + bool has_async_methods() const GRPC_OVERRIDE; + bool has_sync_methods() const GRPC_OVERRIDE; + + private: + std::shared_ptr<::grpc::ProtoServerReflection> reflection_service; +}; + +std::unique_ptr<::grpc::ServerBuilderPlugin> CreateProtoReflection() { + return std::unique_ptr<::grpc::ServerBuilderPlugin>( + new ProtoServerReflectionPlugin()); +} + +void grpc_AddServerBuilderPlugin_reflection(); + +} // namespace reflection +} // namespace grpc + +#endif // GRPCXX_PROTO_SERVER_REFLECTION_PLUGIN_H diff --git a/extensions/include/grpc++/impl/reflection.grpc.pb.h b/extensions/include/grpc++/impl/reflection.grpc.pb.h new file mode 100644 index 00000000000..f6009296366 --- /dev/null +++ b/extensions/include/grpc++/impl/reflection.grpc.pb.h @@ -0,0 +1,555 @@ +// Generated by the gRPC protobuf plugin. +// If you make any local change, they will be lost. +// source: reflection.proto +#ifndef GRPC_reflection_2eproto__INCLUDED +#define GRPC_reflection_2eproto__INCLUDED + +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +namespace grpc { +class CompletionQueue; +class Channel; +class RpcService; +class ServerCompletionQueue; +class ServerContext; +} // namespace grpc + +namespace grpc { +namespace reflection { +namespace v1alpha { + +class ServerReflection GRPC_FINAL { + public: + class StubInterface { + public: + virtual ~StubInterface() {} + virtual ::grpc::Status ListService( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::EmptyRequest& request, + ::grpc::reflection::v1alpha::ListServiceResponse* response) = 0; + std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< + ::grpc::reflection::v1alpha::ListServiceResponse>> + AsyncListService(::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::EmptyRequest& request, + ::grpc::CompletionQueue* cq) { + return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< + ::grpc::reflection::v1alpha::ListServiceResponse>>( + AsyncListServiceRaw(context, request, cq)); + } + virtual ::grpc::Status GetFileByName( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::FileNameRequest& request, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) = 0; + std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>> + AsyncGetFileByName( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::FileNameRequest& request, + ::grpc::CompletionQueue* cq) { + return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>>( + AsyncGetFileByNameRaw(context, request, cq)); + } + virtual ::grpc::Status GetFileContainingSymbol( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::SymbolRequest& request, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) = 0; + std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>> + AsyncGetFileContainingSymbol( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::SymbolRequest& request, + ::grpc::CompletionQueue* cq) { + return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>>( + AsyncGetFileContainingSymbolRaw(context, request, cq)); + } + virtual ::grpc::Status GetFileContainingExtension( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::ExtensionRequest& request, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) = 0; + std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>> + AsyncGetFileContainingExtension( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::ExtensionRequest& request, + ::grpc::CompletionQueue* cq) { + return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>>( + AsyncGetFileContainingExtensionRaw(context, request, cq)); + } + virtual ::grpc::Status GetAllExtensionNumbers( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::TypeRequest& request, + ::grpc::reflection::v1alpha::ExtensionNumberResponse* response) = 0; + std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< + ::grpc::reflection::v1alpha::ExtensionNumberResponse>> + AsyncGetAllExtensionNumbers( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::TypeRequest& request, + ::grpc::CompletionQueue* cq) { + return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< + ::grpc::reflection::v1alpha::ExtensionNumberResponse>>( + AsyncGetAllExtensionNumbersRaw(context, request, cq)); + } + + private: + virtual ::grpc::ClientAsyncResponseReaderInterface< + ::grpc::reflection::v1alpha::ListServiceResponse>* + AsyncListServiceRaw( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::EmptyRequest& request, + ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* + AsyncGetFileByNameRaw( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::FileNameRequest& request, + ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* + AsyncGetFileContainingSymbolRaw( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::SymbolRequest& request, + ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* + AsyncGetFileContainingExtensionRaw( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::ExtensionRequest& request, + ::grpc::CompletionQueue* cq) = 0; + virtual ::grpc::ClientAsyncResponseReaderInterface< + ::grpc::reflection::v1alpha::ExtensionNumberResponse>* + AsyncGetAllExtensionNumbersRaw( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::TypeRequest& request, + ::grpc::CompletionQueue* cq) = 0; + }; + class Stub GRPC_FINAL : public StubInterface { + public: + Stub(const std::shared_ptr<::grpc::ChannelInterface>& channel); + ::grpc::Status ListService( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::EmptyRequest& request, + ::grpc::reflection::v1alpha::ListServiceResponse* response) + GRPC_OVERRIDE; + std::unique_ptr<::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::ListServiceResponse>> + AsyncListService(::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::EmptyRequest& request, + ::grpc::CompletionQueue* cq) { + return std::unique_ptr<::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::ListServiceResponse>>( + AsyncListServiceRaw(context, request, cq)); + } + ::grpc::Status GetFileByName( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::FileNameRequest& request, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) + GRPC_OVERRIDE; + std::unique_ptr<::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>> + AsyncGetFileByName( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::FileNameRequest& request, + ::grpc::CompletionQueue* cq) { + return std::unique_ptr<::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>>( + AsyncGetFileByNameRaw(context, request, cq)); + } + ::grpc::Status GetFileContainingSymbol( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::SymbolRequest& request, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) + GRPC_OVERRIDE; + std::unique_ptr<::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>> + AsyncGetFileContainingSymbol( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::SymbolRequest& request, + ::grpc::CompletionQueue* cq) { + return std::unique_ptr<::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>>( + AsyncGetFileContainingSymbolRaw(context, request, cq)); + } + ::grpc::Status GetFileContainingExtension( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::ExtensionRequest& request, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) + GRPC_OVERRIDE; + std::unique_ptr<::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>> + AsyncGetFileContainingExtension( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::ExtensionRequest& request, + ::grpc::CompletionQueue* cq) { + return std::unique_ptr<::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>>( + AsyncGetFileContainingExtensionRaw(context, request, cq)); + } + ::grpc::Status GetAllExtensionNumbers( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::TypeRequest& request, + ::grpc::reflection::v1alpha::ExtensionNumberResponse* response) + GRPC_OVERRIDE; + std::unique_ptr<::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::ExtensionNumberResponse>> + AsyncGetAllExtensionNumbers( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::TypeRequest& request, + ::grpc::CompletionQueue* cq) { + return std::unique_ptr<::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::ExtensionNumberResponse>>( + AsyncGetAllExtensionNumbersRaw(context, request, cq)); + } + + private: + std::shared_ptr<::grpc::ChannelInterface> channel_; + ::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::ListServiceResponse>* + AsyncListServiceRaw( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::EmptyRequest& request, + ::grpc::CompletionQueue* cq) GRPC_OVERRIDE; + ::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* + AsyncGetFileByNameRaw( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::FileNameRequest& request, + ::grpc::CompletionQueue* cq) GRPC_OVERRIDE; + ::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* + AsyncGetFileContainingSymbolRaw( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::SymbolRequest& request, + ::grpc::CompletionQueue* cq) GRPC_OVERRIDE; + ::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* + AsyncGetFileContainingExtensionRaw( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::ExtensionRequest& request, + ::grpc::CompletionQueue* cq) GRPC_OVERRIDE; + ::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::ExtensionNumberResponse>* + AsyncGetAllExtensionNumbersRaw( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::TypeRequest& request, + ::grpc::CompletionQueue* cq) GRPC_OVERRIDE; + const ::grpc::RpcMethod rpcmethod_ListService_; + const ::grpc::RpcMethod rpcmethod_GetFileByName_; + const ::grpc::RpcMethod rpcmethod_GetFileContainingSymbol_; + const ::grpc::RpcMethod rpcmethod_GetFileContainingExtension_; + const ::grpc::RpcMethod rpcmethod_GetAllExtensionNumbers_; + }; + static std::unique_ptr NewStub( + const std::shared_ptr<::grpc::ChannelInterface>& channel, + const ::grpc::StubOptions& options = ::grpc::StubOptions()); + + class Service : public ::grpc::Service { + public: + Service(); + virtual ~Service(); + virtual ::grpc::Status ListService( + ::grpc::ServerContext* context, + const ::grpc::reflection::v1alpha::EmptyRequest* request, + ::grpc::reflection::v1alpha::ListServiceResponse* response); + virtual ::grpc::Status GetFileByName( + ::grpc::ServerContext* context, + const ::grpc::reflection::v1alpha::FileNameRequest* request, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response); + virtual ::grpc::Status GetFileContainingSymbol( + ::grpc::ServerContext* context, + const ::grpc::reflection::v1alpha::SymbolRequest* request, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response); + virtual ::grpc::Status GetFileContainingExtension( + ::grpc::ServerContext* context, + const ::grpc::reflection::v1alpha::ExtensionRequest* request, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response); + virtual ::grpc::Status GetAllExtensionNumbers( + ::grpc::ServerContext* context, + const ::grpc::reflection::v1alpha::TypeRequest* request, + ::grpc::reflection::v1alpha::ExtensionNumberResponse* response); + }; + template + class WithAsyncMethod_ListService : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(Service* service) {} + + public: + WithAsyncMethod_ListService() { ::grpc::Service::MarkMethodAsync(0); } + ~WithAsyncMethod_ListService() GRPC_OVERRIDE { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListService( + ::grpc::ServerContext* context, + const ::grpc::reflection::v1alpha::EmptyRequest* request, + ::grpc::reflection::v1alpha::ListServiceResponse* response) + GRPC_FINAL GRPC_OVERRIDE { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestListService( + ::grpc::ServerContext* context, + ::grpc::reflection::v1alpha::EmptyRequest* request, + ::grpc::ServerAsyncResponseWriter< + ::grpc::reflection::v1alpha::ListServiceResponse>* response, + ::grpc::CompletionQueue* new_call_cq, + ::grpc::ServerCompletionQueue* notification_cq, void* tag) { + ::grpc::Service::RequestAsyncUnary(0, context, request, response, + new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_GetFileByName : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(Service* service) {} + + public: + WithAsyncMethod_GetFileByName() { ::grpc::Service::MarkMethodAsync(1); } + ~WithAsyncMethod_GetFileByName() GRPC_OVERRIDE { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetFileByName( + ::grpc::ServerContext* context, + const ::grpc::reflection::v1alpha::FileNameRequest* request, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) + GRPC_FINAL GRPC_OVERRIDE { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetFileByName( + ::grpc::ServerContext* context, + ::grpc::reflection::v1alpha::FileNameRequest* request, + ::grpc::ServerAsyncResponseWriter< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* response, + ::grpc::CompletionQueue* new_call_cq, + ::grpc::ServerCompletionQueue* notification_cq, void* tag) { + ::grpc::Service::RequestAsyncUnary(1, context, request, response, + new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_GetFileContainingSymbol : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(Service* service) {} + + public: + WithAsyncMethod_GetFileContainingSymbol() { + ::grpc::Service::MarkMethodAsync(2); + } + ~WithAsyncMethod_GetFileContainingSymbol() GRPC_OVERRIDE { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetFileContainingSymbol( + ::grpc::ServerContext* context, + const ::grpc::reflection::v1alpha::SymbolRequest* request, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) + GRPC_FINAL GRPC_OVERRIDE { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetFileContainingSymbol( + ::grpc::ServerContext* context, + ::grpc::reflection::v1alpha::SymbolRequest* request, + ::grpc::ServerAsyncResponseWriter< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* response, + ::grpc::CompletionQueue* new_call_cq, + ::grpc::ServerCompletionQueue* notification_cq, void* tag) { + ::grpc::Service::RequestAsyncUnary(2, context, request, response, + new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_GetFileContainingExtension : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(Service* service) {} + + public: + WithAsyncMethod_GetFileContainingExtension() { + ::grpc::Service::MarkMethodAsync(3); + } + ~WithAsyncMethod_GetFileContainingExtension() GRPC_OVERRIDE { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetFileContainingExtension( + ::grpc::ServerContext* context, + const ::grpc::reflection::v1alpha::ExtensionRequest* request, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) + GRPC_FINAL GRPC_OVERRIDE { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetFileContainingExtension( + ::grpc::ServerContext* context, + ::grpc::reflection::v1alpha::ExtensionRequest* request, + ::grpc::ServerAsyncResponseWriter< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* response, + ::grpc::CompletionQueue* new_call_cq, + ::grpc::ServerCompletionQueue* notification_cq, void* tag) { + ::grpc::Service::RequestAsyncUnary(3, context, request, response, + new_call_cq, notification_cq, tag); + } + }; + template + class WithAsyncMethod_GetAllExtensionNumbers : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(Service* service) {} + + public: + WithAsyncMethod_GetAllExtensionNumbers() { + ::grpc::Service::MarkMethodAsync(4); + } + ~WithAsyncMethod_GetAllExtensionNumbers() GRPC_OVERRIDE { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetAllExtensionNumbers( + ::grpc::ServerContext* context, + const ::grpc::reflection::v1alpha::TypeRequest* request, + ::grpc::reflection::v1alpha::ExtensionNumberResponse* response) + GRPC_FINAL GRPC_OVERRIDE { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + void RequestGetAllExtensionNumbers( + ::grpc::ServerContext* context, + ::grpc::reflection::v1alpha::TypeRequest* request, + ::grpc::ServerAsyncResponseWriter< + ::grpc::reflection::v1alpha::ExtensionNumberResponse>* response, + ::grpc::CompletionQueue* new_call_cq, + ::grpc::ServerCompletionQueue* notification_cq, void* tag) { + ::grpc::Service::RequestAsyncUnary(4, context, request, response, + new_call_cq, notification_cq, tag); + } + }; + typedef WithAsyncMethod_ListService< + WithAsyncMethod_GetFileByName>>>> + AsyncService; + template + class WithGenericMethod_ListService : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(Service* service) {} + + public: + WithGenericMethod_ListService() { ::grpc::Service::MarkMethodGeneric(0); } + ~WithGenericMethod_ListService() GRPC_OVERRIDE { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status ListService( + ::grpc::ServerContext* context, + const ::grpc::reflection::v1alpha::EmptyRequest* request, + ::grpc::reflection::v1alpha::ListServiceResponse* response) + GRPC_FINAL GRPC_OVERRIDE { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_GetFileByName : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(Service* service) {} + + public: + WithGenericMethod_GetFileByName() { ::grpc::Service::MarkMethodGeneric(1); } + ~WithGenericMethod_GetFileByName() GRPC_OVERRIDE { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetFileByName( + ::grpc::ServerContext* context, + const ::grpc::reflection::v1alpha::FileNameRequest* request, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) + GRPC_FINAL GRPC_OVERRIDE { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_GetFileContainingSymbol : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(Service* service) {} + + public: + WithGenericMethod_GetFileContainingSymbol() { + ::grpc::Service::MarkMethodGeneric(2); + } + ~WithGenericMethod_GetFileContainingSymbol() GRPC_OVERRIDE { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetFileContainingSymbol( + ::grpc::ServerContext* context, + const ::grpc::reflection::v1alpha::SymbolRequest* request, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) + GRPC_FINAL GRPC_OVERRIDE { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_GetFileContainingExtension : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(Service* service) {} + + public: + WithGenericMethod_GetFileContainingExtension() { + ::grpc::Service::MarkMethodGeneric(3); + } + ~WithGenericMethod_GetFileContainingExtension() GRPC_OVERRIDE { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetFileContainingExtension( + ::grpc::ServerContext* context, + const ::grpc::reflection::v1alpha::ExtensionRequest* request, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) + GRPC_FINAL GRPC_OVERRIDE { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; + template + class WithGenericMethod_GetAllExtensionNumbers : public BaseClass { + private: + void BaseClassMustBeDerivedFromService(Service* service) {} + + public: + WithGenericMethod_GetAllExtensionNumbers() { + ::grpc::Service::MarkMethodGeneric(4); + } + ~WithGenericMethod_GetAllExtensionNumbers() GRPC_OVERRIDE { + BaseClassMustBeDerivedFromService(this); + } + // disable synchronous version of this method + ::grpc::Status GetAllExtensionNumbers( + ::grpc::ServerContext* context, + const ::grpc::reflection::v1alpha::TypeRequest* request, + ::grpc::reflection::v1alpha::ExtensionNumberResponse* response) + GRPC_FINAL GRPC_OVERRIDE { + abort(); + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + } + }; +}; + +} // namespace v1alpha +} // namespace reflection +} // namespace grpc + +#endif // GRPC_reflection_2eproto__INCLUDED diff --git a/extensions/include/grpc++/impl/reflection.pb.h b/extensions/include/grpc++/impl/reflection.pb.h new file mode 100644 index 00000000000..b054e28de97 --- /dev/null +++ b/extensions/include/grpc++/impl/reflection.pb.h @@ -0,0 +1,1128 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: reflection.proto + +#ifndef PROTOBUF_reflection_2eproto__INCLUDED +#define PROTOBUF_reflection_2eproto__INCLUDED + +#include + +#include + +#if GOOGLE_PROTOBUF_VERSION < 3000000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3000000 < GOOGLE_PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace grpc { +namespace reflection { +namespace v1alpha { + +// Internal implementation detail -- do not call these. +void protobuf_AddDesc_reflection_2eproto(); +void protobuf_AssignDesc_reflection_2eproto(); +void protobuf_ShutdownFile_reflection_2eproto(); + +class EmptyRequest; +class ExtensionNumberResponse; +class ExtensionRequest; +class FileDescriptorProtoResponse; +class FileNameRequest; +class ListServiceResponse; +class SymbolRequest; +class TypeRequest; + +// =================================================================== + +class EmptyRequest : public ::google::protobuf::Message { + public: + EmptyRequest(); + virtual ~EmptyRequest(); + + EmptyRequest(const EmptyRequest& from); + + inline EmptyRequest& operator=(const EmptyRequest& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const EmptyRequest& default_instance(); + + void Swap(EmptyRequest* other); + + // implements Message ---------------------------------------------- + + inline EmptyRequest* New() const { return New(NULL); } + + EmptyRequest* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const EmptyRequest& from); + void MergeFrom(const EmptyRequest& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(EmptyRequest* other); + + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.EmptyRequest) + private: + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + mutable int _cached_size_; + friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AssignDesc_reflection_2eproto(); + friend void protobuf_ShutdownFile_reflection_2eproto(); + + void InitAsDefaultInstance(); + static EmptyRequest* default_instance_; +}; +// ------------------------------------------------------------------- + +class FileNameRequest : public ::google::protobuf::Message { + public: + FileNameRequest(); + virtual ~FileNameRequest(); + + FileNameRequest(const FileNameRequest& from); + + inline FileNameRequest& operator=(const FileNameRequest& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const FileNameRequest& default_instance(); + + void Swap(FileNameRequest* other); + + // implements Message ---------------------------------------------- + + inline FileNameRequest* New() const { return New(NULL); } + + FileNameRequest* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const FileNameRequest& from); + void MergeFrom(const FileNameRequest& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(FileNameRequest* other); + + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string filename = 1; + void clear_filename(); + static const int kFilenameFieldNumber = 1; + const ::std::string& filename() const; + void set_filename(const ::std::string& value); + void set_filename(const char* value); + void set_filename(const char* value, size_t size); + ::std::string* mutable_filename(); + ::std::string* release_filename(); + void set_allocated_filename(::std::string* filename); + + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.FileNameRequest) + private: + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::internal::ArenaStringPtr filename_; + mutable int _cached_size_; + friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AssignDesc_reflection_2eproto(); + friend void protobuf_ShutdownFile_reflection_2eproto(); + + void InitAsDefaultInstance(); + static FileNameRequest* default_instance_; +}; +// ------------------------------------------------------------------- + +class SymbolRequest : public ::google::protobuf::Message { + public: + SymbolRequest(); + virtual ~SymbolRequest(); + + SymbolRequest(const SymbolRequest& from); + + inline SymbolRequest& operator=(const SymbolRequest& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const SymbolRequest& default_instance(); + + void Swap(SymbolRequest* other); + + // implements Message ---------------------------------------------- + + inline SymbolRequest* New() const { return New(NULL); } + + SymbolRequest* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const SymbolRequest& from); + void MergeFrom(const SymbolRequest& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(SymbolRequest* other); + + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string symbol = 1; + void clear_symbol(); + static const int kSymbolFieldNumber = 1; + const ::std::string& symbol() const; + void set_symbol(const ::std::string& value); + void set_symbol(const char* value); + void set_symbol(const char* value, size_t size); + ::std::string* mutable_symbol(); + ::std::string* release_symbol(); + void set_allocated_symbol(::std::string* symbol); + + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.SymbolRequest) + private: + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::internal::ArenaStringPtr symbol_; + mutable int _cached_size_; + friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AssignDesc_reflection_2eproto(); + friend void protobuf_ShutdownFile_reflection_2eproto(); + + void InitAsDefaultInstance(); + static SymbolRequest* default_instance_; +}; +// ------------------------------------------------------------------- + +class ExtensionRequest : public ::google::protobuf::Message { + public: + ExtensionRequest(); + virtual ~ExtensionRequest(); + + ExtensionRequest(const ExtensionRequest& from); + + inline ExtensionRequest& operator=(const ExtensionRequest& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ExtensionRequest& default_instance(); + + void Swap(ExtensionRequest* other); + + // implements Message ---------------------------------------------- + + inline ExtensionRequest* New() const { return New(NULL); } + + ExtensionRequest* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ExtensionRequest& from); + void MergeFrom(const ExtensionRequest& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ExtensionRequest* other); + + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string containing_type = 1; + void clear_containing_type(); + static const int kContainingTypeFieldNumber = 1; + const ::std::string& containing_type() const; + void set_containing_type(const ::std::string& value); + void set_containing_type(const char* value); + void set_containing_type(const char* value, size_t size); + ::std::string* mutable_containing_type(); + ::std::string* release_containing_type(); + void set_allocated_containing_type(::std::string* containing_type); + + // optional int32 extension_number = 2; + void clear_extension_number(); + static const int kExtensionNumberFieldNumber = 2; + ::google::protobuf::int32 extension_number() const; + void set_extension_number(::google::protobuf::int32 value); + + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ExtensionRequest) + private: + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::internal::ArenaStringPtr containing_type_; + ::google::protobuf::int32 extension_number_; + mutable int _cached_size_; + friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AssignDesc_reflection_2eproto(); + friend void protobuf_ShutdownFile_reflection_2eproto(); + + void InitAsDefaultInstance(); + static ExtensionRequest* default_instance_; +}; +// ------------------------------------------------------------------- + +class TypeRequest : public ::google::protobuf::Message { + public: + TypeRequest(); + virtual ~TypeRequest(); + + TypeRequest(const TypeRequest& from); + + inline TypeRequest& operator=(const TypeRequest& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const TypeRequest& default_instance(); + + void Swap(TypeRequest* other); + + // implements Message ---------------------------------------------- + + inline TypeRequest* New() const { return New(NULL); } + + TypeRequest* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const TypeRequest& from); + void MergeFrom(const TypeRequest& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(TypeRequest* other); + + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional string type = 1; + void clear_type(); + static const int kTypeFieldNumber = 1; + const ::std::string& type() const; + void set_type(const ::std::string& value); + void set_type(const char* value); + void set_type(const char* value, size_t size); + ::std::string* mutable_type(); + ::std::string* release_type(); + void set_allocated_type(::std::string* type); + + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.TypeRequest) + private: + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::internal::ArenaStringPtr type_; + mutable int _cached_size_; + friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AssignDesc_reflection_2eproto(); + friend void protobuf_ShutdownFile_reflection_2eproto(); + + void InitAsDefaultInstance(); + static TypeRequest* default_instance_; +}; +// ------------------------------------------------------------------- + +class ListServiceResponse : public ::google::protobuf::Message { + public: + ListServiceResponse(); + virtual ~ListServiceResponse(); + + ListServiceResponse(const ListServiceResponse& from); + + inline ListServiceResponse& operator=(const ListServiceResponse& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ListServiceResponse& default_instance(); + + void Swap(ListServiceResponse* other); + + // implements Message ---------------------------------------------- + + inline ListServiceResponse* New() const { return New(NULL); } + + ListServiceResponse* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ListServiceResponse& from); + void MergeFrom(const ListServiceResponse& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ListServiceResponse* other); + + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated string services = 1; + int services_size() const; + void clear_services(); + static const int kServicesFieldNumber = 1; + const ::std::string& services(int index) const; + ::std::string* mutable_services(int index); + void set_services(int index, const ::std::string& value); + void set_services(int index, const char* value); + void set_services(int index, const char* value, size_t size); + ::std::string* add_services(); + void add_services(const ::std::string& value); + void add_services(const char* value); + void add_services(const char* value, size_t size); + const ::google::protobuf::RepeatedPtrField< ::std::string>& services() const; + ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_services(); + + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ListServiceResponse) + private: + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::RepeatedPtrField< ::std::string> services_; + mutable int _cached_size_; + friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AssignDesc_reflection_2eproto(); + friend void protobuf_ShutdownFile_reflection_2eproto(); + + void InitAsDefaultInstance(); + static ListServiceResponse* default_instance_; +}; +// ------------------------------------------------------------------- + +class FileDescriptorProtoResponse : public ::google::protobuf::Message { + public: + FileDescriptorProtoResponse(); + virtual ~FileDescriptorProtoResponse(); + + FileDescriptorProtoResponse(const FileDescriptorProtoResponse& from); + + inline FileDescriptorProtoResponse& operator=( + const FileDescriptorProtoResponse& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const FileDescriptorProtoResponse& default_instance(); + + void Swap(FileDescriptorProtoResponse* other); + + // implements Message ---------------------------------------------- + + inline FileDescriptorProtoResponse* New() const { return New(NULL); } + + FileDescriptorProtoResponse* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const FileDescriptorProtoResponse& from); + void MergeFrom(const FileDescriptorProtoResponse& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(FileDescriptorProtoResponse* other); + + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // optional bytes file_descriptor_proto = 1; + void clear_file_descriptor_proto(); + static const int kFileDescriptorProtoFieldNumber = 1; + const ::std::string& file_descriptor_proto() const; + void set_file_descriptor_proto(const ::std::string& value); + void set_file_descriptor_proto(const char* value); + void set_file_descriptor_proto(const void* value, size_t size); + ::std::string* mutable_file_descriptor_proto(); + ::std::string* release_file_descriptor_proto(); + void set_allocated_file_descriptor_proto( + ::std::string* file_descriptor_proto); + + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + private: + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::internal::ArenaStringPtr file_descriptor_proto_; + mutable int _cached_size_; + friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AssignDesc_reflection_2eproto(); + friend void protobuf_ShutdownFile_reflection_2eproto(); + + void InitAsDefaultInstance(); + static FileDescriptorProtoResponse* default_instance_; +}; +// ------------------------------------------------------------------- + +class ExtensionNumberResponse : public ::google::protobuf::Message { + public: + ExtensionNumberResponse(); + virtual ~ExtensionNumberResponse(); + + ExtensionNumberResponse(const ExtensionNumberResponse& from); + + inline ExtensionNumberResponse& operator=( + const ExtensionNumberResponse& from) { + CopyFrom(from); + return *this; + } + + static const ::google::protobuf::Descriptor* descriptor(); + static const ExtensionNumberResponse& default_instance(); + + void Swap(ExtensionNumberResponse* other); + + // implements Message ---------------------------------------------- + + inline ExtensionNumberResponse* New() const { return New(NULL); } + + ExtensionNumberResponse* New(::google::protobuf::Arena* arena) const; + void CopyFrom(const ::google::protobuf::Message& from); + void MergeFrom(const ::google::protobuf::Message& from); + void CopyFrom(const ExtensionNumberResponse& from); + void MergeFrom(const ExtensionNumberResponse& from); + void Clear(); + bool IsInitialized() const; + + int ByteSize() const; + bool MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input); + void SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* output) const; + int GetCachedSize() const { return _cached_size_; } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const; + void InternalSwap(ExtensionNumberResponse* other); + + private: + inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + return _internal_metadata_.arena(); + } + inline void* MaybeArenaPtr() const { + return _internal_metadata_.raw_arena_ptr(); + } + + public: + ::google::protobuf::Metadata GetMetadata() const; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + // repeated int32 extension_number = 1; + int extension_number_size() const; + void clear_extension_number(); + static const int kExtensionNumberFieldNumber = 1; + ::google::protobuf::int32 extension_number(int index) const; + void set_extension_number(int index, ::google::protobuf::int32 value); + void add_extension_number(::google::protobuf::int32 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int32>& + extension_number() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int32>* + mutable_extension_number(); + + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ExtensionNumberResponse) + private: + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; + bool _is_default_instance_; + ::google::protobuf::RepeatedField< ::google::protobuf::int32> + extension_number_; + mutable int _extension_number_cached_byte_size_; + mutable int _cached_size_; + friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AssignDesc_reflection_2eproto(); + friend void protobuf_ShutdownFile_reflection_2eproto(); + + void InitAsDefaultInstance(); + static ExtensionNumberResponse* default_instance_; +}; +// =================================================================== + +// =================================================================== + +#if !PROTOBUF_INLINE_NOT_IN_HEADERS +// EmptyRequest + +// ------------------------------------------------------------------- + +// FileNameRequest + +// optional string filename = 1; +inline void FileNameRequest::clear_filename() { + filename_.ClearToEmptyNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& FileNameRequest::filename() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.FileNameRequest.filename) + return filename_.GetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void FileNameRequest::set_filename(const ::std::string& value) { + filename_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.FileNameRequest.filename) +} +inline void FileNameRequest::set_filename(const char* value) { + filename_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.FileNameRequest.filename) +} +inline void FileNameRequest::set_filename(const char* value, size_t size) { + filename_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.FileNameRequest.filename) +} +inline ::std::string* FileNameRequest::mutable_filename() { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.FileNameRequest.filename) + return filename_.MutableNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* FileNameRequest::release_filename() { + return filename_.ReleaseNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void FileNameRequest::set_allocated_filename(::std::string* filename) { + if (filename != NULL) { + } else { + } + filename_.SetAllocatedNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), filename); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.FileNameRequest.filename) +} + +// ------------------------------------------------------------------- + +// SymbolRequest + +// optional string symbol = 1; +inline void SymbolRequest::clear_symbol() { + symbol_.ClearToEmptyNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& SymbolRequest::symbol() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.SymbolRequest.symbol) + return symbol_.GetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void SymbolRequest::set_symbol(const ::std::string& value) { + symbol_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.SymbolRequest.symbol) +} +inline void SymbolRequest::set_symbol(const char* value) { + symbol_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.SymbolRequest.symbol) +} +inline void SymbolRequest::set_symbol(const char* value, size_t size) { + symbol_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.SymbolRequest.symbol) +} +inline ::std::string* SymbolRequest::mutable_symbol() { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.SymbolRequest.symbol) + return symbol_.MutableNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* SymbolRequest::release_symbol() { + return symbol_.ReleaseNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void SymbolRequest::set_allocated_symbol(::std::string* symbol) { + if (symbol != NULL) { + } else { + } + symbol_.SetAllocatedNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), symbol); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.SymbolRequest.symbol) +} + +// ------------------------------------------------------------------- + +// ExtensionRequest + +// optional string containing_type = 1; +inline void ExtensionRequest::clear_containing_type() { + containing_type_.ClearToEmptyNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& ExtensionRequest::containing_type() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.containing_type) + return containing_type_.GetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ExtensionRequest::set_containing_type(const ::std::string& value) { + containing_type_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.containing_type) +} +inline void ExtensionRequest::set_containing_type(const char* value) { + containing_type_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionRequest.containing_type) +} +inline void ExtensionRequest::set_containing_type(const char* value, + size_t size) { + containing_type_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionRequest.containing_type) +} +inline ::std::string* ExtensionRequest::mutable_containing_type() { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionRequest.containing_type) + return containing_type_.MutableNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ExtensionRequest::release_containing_type() { + return containing_type_.ReleaseNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ExtensionRequest::set_allocated_containing_type( + ::std::string* containing_type) { + if (containing_type != NULL) { + } else { + } + containing_type_.SetAllocatedNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + containing_type); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionRequest.containing_type) +} + +// optional int32 extension_number = 2; +inline void ExtensionRequest::clear_extension_number() { + extension_number_ = 0; +} +inline ::google::protobuf::int32 ExtensionRequest::extension_number() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.extension_number) + return extension_number_; +} +inline void ExtensionRequest::set_extension_number( + ::google::protobuf::int32 value) { + extension_number_ = value; + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.extension_number) +} + +// ------------------------------------------------------------------- + +// TypeRequest + +// optional string type = 1; +inline void TypeRequest::clear_type() { + type_.ClearToEmptyNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& TypeRequest::type() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.TypeRequest.type) + return type_.GetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void TypeRequest::set_type(const ::std::string& value) { + type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.TypeRequest.type) +} +inline void TypeRequest::set_type(const char* value) { + type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.TypeRequest.type) +} +inline void TypeRequest::set_type(const char* value, size_t size) { + type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.TypeRequest.type) +} +inline ::std::string* TypeRequest::mutable_type() { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.TypeRequest.type) + return type_.MutableNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* TypeRequest::release_type() { + return type_.ReleaseNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void TypeRequest::set_allocated_type(::std::string* type) { + if (type != NULL) { + } else { + } + type_.SetAllocatedNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), type); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.TypeRequest.type) +} + +// ------------------------------------------------------------------- + +// ListServiceResponse + +// repeated string services = 1; +inline int ListServiceResponse::services_size() const { + return services_.size(); +} +inline void ListServiceResponse::clear_services() { services_.Clear(); } +inline const ::std::string& ListServiceResponse::services(int index) const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ListServiceResponse.services) + return services_.Get(index); +} +inline ::std::string* ListServiceResponse::mutable_services(int index) { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ListServiceResponse.services) + return services_.Mutable(index); +} +inline void ListServiceResponse::set_services(int index, + const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ListServiceResponse.services) + services_.Mutable(index)->assign(value); +} +inline void ListServiceResponse::set_services(int index, const char* value) { + services_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ListServiceResponse.services) +} +inline void ListServiceResponse::set_services(int index, const char* value, + size_t size) { + services_.Mutable(index)->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ListServiceResponse.services) +} +inline ::std::string* ListServiceResponse::add_services() { + return services_.Add(); +} +inline void ListServiceResponse::add_services(const ::std::string& value) { + services_.Add()->assign(value); + // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ListServiceResponse.services) +} +inline void ListServiceResponse::add_services(const char* value) { + services_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:grpc.reflection.v1alpha.ListServiceResponse.services) +} +inline void ListServiceResponse::add_services(const char* value, size_t size) { + services_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:grpc.reflection.v1alpha.ListServiceResponse.services) +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +ListServiceResponse::services() const { + // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ListServiceResponse.services) + return services_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +ListServiceResponse::mutable_services() { + // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ListServiceResponse.services) + return &services_; +} + +// ------------------------------------------------------------------- + +// FileDescriptorProtoResponse + +// optional bytes file_descriptor_proto = 1; +inline void FileDescriptorProtoResponse::clear_file_descriptor_proto() { + file_descriptor_proto_.ClearToEmptyNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& FileDescriptorProtoResponse::file_descriptor_proto() + const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) + return file_descriptor_proto_.GetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void FileDescriptorProtoResponse::set_file_descriptor_proto( + const ::std::string& value) { + file_descriptor_proto_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) +} +inline void FileDescriptorProtoResponse::set_file_descriptor_proto( + const char* value) { + file_descriptor_proto_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) +} +inline void FileDescriptorProtoResponse::set_file_descriptor_proto( + const void* value, size_t size) { + file_descriptor_proto_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) +} +inline ::std::string* +FileDescriptorProtoResponse::mutable_file_descriptor_proto() { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) + return file_descriptor_proto_.MutableNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* +FileDescriptorProtoResponse::release_file_descriptor_proto() { + return file_descriptor_proto_.ReleaseNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void FileDescriptorProtoResponse::set_allocated_file_descriptor_proto( + ::std::string* file_descriptor_proto) { + if (file_descriptor_proto != NULL) { + } else { + } + file_descriptor_proto_.SetAllocatedNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + file_descriptor_proto); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) +} + +// ------------------------------------------------------------------- + +// ExtensionNumberResponse + +// repeated int32 extension_number = 1; +inline int ExtensionNumberResponse::extension_number_size() const { + return extension_number_.size(); +} +inline void ExtensionNumberResponse::clear_extension_number() { + extension_number_.Clear(); +} +inline ::google::protobuf::int32 ExtensionNumberResponse::extension_number( + int index) const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + return extension_number_.Get(index); +} +inline void ExtensionNumberResponse::set_extension_number( + int index, ::google::protobuf::int32 value) { + extension_number_.Set(index, value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) +} +inline void ExtensionNumberResponse::add_extension_number( + ::google::protobuf::int32 value) { + extension_number_.Add(value); + // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) +} +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32>& +ExtensionNumberResponse::extension_number() const { + // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + return extension_number_; +} +inline ::google::protobuf::RepeatedField< ::google::protobuf::int32>* +ExtensionNumberResponse::mutable_extension_number() { + // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + return &extension_number_; +} + +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// @@protoc_insertion_point(namespace_scope) + +} // namespace v1alpha +} // namespace reflection +} // namespace grpc + +// @@protoc_insertion_point(global_scope) + +#endif // PROTOBUF_reflection_2eproto__INCLUDED diff --git a/extensions/reflection/proto_server_reflection.cc b/extensions/reflection/proto_server_reflection.cc new file mode 100644 index 00000000000..0662bb595a1 --- /dev/null +++ b/extensions/reflection/proto_server_reflection.cc @@ -0,0 +1,172 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include + +#include +#include +#include + +#include "reflection/proto_server_reflection.h" + +using grpc::Status; +using grpc::StatusCode; +using google::protobuf::MethodDescriptor; +using google::protobuf::ServiceDescriptor; +using google::protobuf::Descriptor; +using google::protobuf::FileDescriptor; +using google::protobuf::FieldDescriptor; +using google::protobuf::DescriptorPool; +using google::protobuf::FileDescriptorProto; +using grpc::reflection::v1alpha::EmptyRequest; +using grpc::reflection::v1alpha::ListServiceResponse; +using grpc::reflection::v1alpha::FileNameRequest; +using grpc::reflection::v1alpha::SymbolRequest; +using grpc::reflection::v1alpha::ExtensionRequest; +using grpc::reflection::v1alpha::TypeRequest; +using grpc::reflection::v1alpha::FileDescriptorProtoResponse; +using grpc::reflection::v1alpha::ExtensionNumberResponse; + +namespace grpc { + +ProtoServerReflection::ProtoServerReflection() + : descriptor_pool_(DescriptorPool::generated_pool()) {} + +void ProtoServerReflection::SetServiceList( + const std::vector* services) { + services_ = services; +} + +Status ProtoServerReflection::ListService(ServerContext* context, + const EmptyRequest* request, + ListServiceResponse* response) { + if (services_ == nullptr) { + return Status(StatusCode::NOT_FOUND, "Services not found."); + } + for (auto it = services_->begin(); it != services_->end(); ++it) { + response->add_services(*it); + } + return Status::OK; +} + +Status ProtoServerReflection::GetFileByName( + ServerContext* context, const FileNameRequest* request, + FileDescriptorProtoResponse* response) { + if (descriptor_pool_ == nullptr) { + return Status::CANCELLED; + } + + const FileDescriptor* file_desc = + descriptor_pool_->FindFileByName(request->filename()); + if (file_desc == nullptr) { + return Status(StatusCode::NOT_FOUND, "File not found."); + } + FillFileDescriptorProtoResponse(file_desc, response); + // file_desc->CopyTo(response->mutable_file_descriptor_proto()); + return Status::OK; +} + +Status ProtoServerReflection::GetFileContainingSymbol( + ServerContext* context, const SymbolRequest* request, + FileDescriptorProtoResponse* response) { + if (descriptor_pool_ == nullptr) { + return Status::CANCELLED; + } + + const FileDescriptor* file_desc = + descriptor_pool_->FindFileContainingSymbol(request->symbol()); + if (file_desc == nullptr) { + return Status(StatusCode::NOT_FOUND, "Symbol not found."); + } + FillFileDescriptorProtoResponse(file_desc, response); + // file_desc->CopyTo(response->mutable_file_descriptor_proto()); + return Status::OK; +} + +Status ProtoServerReflection::GetFileContainingExtension( + ServerContext* context, const ExtensionRequest* request, + FileDescriptorProtoResponse* response) { + if (descriptor_pool_ == nullptr) { + return Status::CANCELLED; + } + + const Descriptor* desc = + descriptor_pool_->FindMessageTypeByName(request->containing_type()); + if (desc == nullptr) { + return Status(StatusCode::NOT_FOUND, "Type not found."); + } + + const FieldDescriptor* field_desc = descriptor_pool_->FindExtensionByNumber( + desc, request->extension_number()); + if (field_desc == nullptr) { + return Status(StatusCode::NOT_FOUND, "Extension not found."); + } + FillFileDescriptorProtoResponse(field_desc->file(), response); + // field_desc->file()->CopyTo(response->mutable_file_descriptor_proto()); + return Status::OK; +} + +Status ProtoServerReflection::GetAllExtensionNumbers( + ServerContext* context, const TypeRequest* request, + ExtensionNumberResponse* response) { + if (descriptor_pool_ == nullptr) { + return Status::CANCELLED; + } + + const Descriptor* desc = + descriptor_pool_->FindMessageTypeByName(request->type()); + if (desc == nullptr) { + return Status(StatusCode::NOT_FOUND, "Type not found."); + } + + std::vector extensions; + descriptor_pool_->FindAllExtensions(desc, &extensions); + for (auto extension : extensions) { + response->add_extension_number(extension->number()); + } + return Status::OK; +} + +void ProtoServerReflection::FillFileDescriptorProtoResponse( + const FileDescriptor* file_desc, FileDescriptorProtoResponse* response) { + FileDescriptorProto file_desc_proto; + grpc::string data; + file_desc->CopyTo(&file_desc_proto); + file_desc_proto.SerializeToString(&data); + response->set_file_descriptor_proto(data); +} + +} // namespace grpc diff --git a/extensions/reflection/proto_server_reflection.h b/extensions/reflection/proto_server_reflection.h new file mode 100644 index 00000000000..5fe23191ff8 --- /dev/null +++ b/extensions/reflection/proto_server_reflection.h @@ -0,0 +1,92 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_EXTENSIONS_REFLECTION_PROTO_SERVER_REFLECTION_H +#define GRPC_EXTENSIONS_REFLECTION_PROTO_SERVER_REFLECTION_H + +#include +#include +#include +#include + +#include +#include +#include + +#include + +namespace grpc { + +class ProtoServerReflection GRPC_FINAL + : public reflection::v1alpha::ServerReflection::Service { + public: + ProtoServerReflection(); + + ProtoServerReflection(const Server* server); + + void SetServiceList(const std::vector* services); + + Status ListService( + ServerContext* context, const reflection::v1alpha::EmptyRequest* request, + reflection::v1alpha::ListServiceResponse* response) GRPC_OVERRIDE; + + Status GetFileByName( + ServerContext* context, + const reflection::v1alpha::FileNameRequest* request, + reflection::v1alpha::FileDescriptorProtoResponse* response) GRPC_OVERRIDE; + + Status GetFileContainingSymbol( + ServerContext* context, const reflection::v1alpha::SymbolRequest* request, + reflection::v1alpha::FileDescriptorProtoResponse* response) GRPC_OVERRIDE; + + Status GetFileContainingExtension( + ServerContext* context, + const reflection::v1alpha::ExtensionRequest* request, + reflection::v1alpha::FileDescriptorProtoResponse* response) GRPC_OVERRIDE; + + Status GetAllExtensionNumbers( + ServerContext* context, const reflection::v1alpha::TypeRequest* request, + reflection::v1alpha::ExtensionNumberResponse* response) GRPC_OVERRIDE; + + private: + void FillFileDescriptorProtoResponse( + const google::protobuf::FileDescriptor* file_desc, + reflection::v1alpha::FileDescriptorProtoResponse* response); + + const google::protobuf::DescriptorPool* descriptor_pool_; + const std::vector* services_; +}; + +} // namespace grpc + +#endif // GRPC_EXTENSIONS_REFLECTION_PROTO_SERVER_REFLECTION_H diff --git a/extensions/reflection/proto_server_reflection_plugin.cc b/extensions/reflection/proto_server_reflection_plugin.cc new file mode 100644 index 00000000000..6adfa450473 --- /dev/null +++ b/extensions/reflection/proto_server_reflection_plugin.cc @@ -0,0 +1,89 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include + +#include "reflection/proto_server_reflection.h" + +namespace grpc { +namespace reflection { + +ProtoServerReflectionPlugin::ProtoServerReflectionPlugin() + : reflection_service(new grpc::ProtoServerReflection()) {} + +grpc::string ProtoServerReflectionPlugin::name() { return "p1"; } + +void ProtoServerReflectionPlugin::InitServer(grpc::ServerInitializer* si) { + si->RegisterService(reflection_service); +} + +void ProtoServerReflectionPlugin::Finish(grpc::ServerInitializer* si) { + reflection_service->SetServiceList(si->GetServiceList()); +} + +void ProtoServerReflectionPlugin::ChangeArguments(const grpc::string& name, + void* value) {} + +bool ProtoServerReflectionPlugin::has_sync_methods() const { + if (reflection_service != nullptr) { + return reflection_service->has_synchronous_methods(); + } + return false; +} + +bool ProtoServerReflectionPlugin::has_async_methods() const { + if (reflection_service != nullptr) { + return reflection_service->has_async_methods(); + } + return false; +} + +void grpc_AddServerBuilderPlugin_reflection() { + static bool already_here = false; + if (already_here) return; + already_here = true; + ::grpc::ServerBuilder::InternalAddPluginFactory(&CreateProtoReflection); +} + +// Force AddServerBuilderPlugin() to be called at static initialization time. +struct StaticPluginInitializer_reflection { + StaticPluginInitializer_reflection() { + grpc_AddServerBuilderPlugin_reflection(); + } +} static_plugin_initializer_reflection_; + +} // namespace reflection +} // namespace grpc diff --git a/extensions/reflection/reflection.grpc.pb.cc b/extensions/reflection/reflection.grpc.pb.cc new file mode 100644 index 00000000000..c098e52752f --- /dev/null +++ b/extensions/reflection/reflection.grpc.pb.cc @@ -0,0 +1,245 @@ +// Generated by the gRPC protobuf plugin. +// If you make any local change, they will be lost. +// source: reflection.proto + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +namespace grpc { +namespace reflection { +namespace v1alpha { + +static const char* ServerReflection_method_names[] = { + "/grpc.reflection.v1alpha.ServerReflection/ListService", + "/grpc.reflection.v1alpha.ServerReflection/GetFileByName", + "/grpc.reflection.v1alpha.ServerReflection/GetFileContainingSymbol", + "/grpc.reflection.v1alpha.ServerReflection/GetFileContainingExtension", + "/grpc.reflection.v1alpha.ServerReflection/GetAllExtensionNumbers", +}; + +std::unique_ptr ServerReflection::NewStub( + const std::shared_ptr< ::grpc::ChannelInterface>& channel, + const ::grpc::StubOptions& options) { + std::unique_ptr stub( + new ServerReflection::Stub(channel)); + return stub; +} + +ServerReflection::Stub::Stub( + const std::shared_ptr< ::grpc::ChannelInterface>& channel) + : channel_(channel), + rpcmethod_ListService_(ServerReflection_method_names[0], + ::grpc::RpcMethod::NORMAL_RPC, channel), + rpcmethod_GetFileByName_(ServerReflection_method_names[1], + ::grpc::RpcMethod::NORMAL_RPC, channel), + rpcmethod_GetFileContainingSymbol_(ServerReflection_method_names[2], + ::grpc::RpcMethod::NORMAL_RPC, + channel), + rpcmethod_GetFileContainingExtension_(ServerReflection_method_names[3], + ::grpc::RpcMethod::NORMAL_RPC, + channel), + rpcmethod_GetAllExtensionNumbers_(ServerReflection_method_names[4], + ::grpc::RpcMethod::NORMAL_RPC, + channel) {} + +::grpc::Status ServerReflection::Stub::ListService( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::EmptyRequest& request, + ::grpc::reflection::v1alpha::ListServiceResponse* response) { + return ::grpc::BlockingUnaryCall(channel_.get(), rpcmethod_ListService_, + context, request, response); +} + +::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::ListServiceResponse>* +ServerReflection::Stub::AsyncListServiceRaw( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::EmptyRequest& request, + ::grpc::CompletionQueue* cq) { + return new ::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::ListServiceResponse>( + channel_.get(), cq, rpcmethod_ListService_, context, request); +} + +::grpc::Status ServerReflection::Stub::GetFileByName( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::FileNameRequest& request, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) { + return ::grpc::BlockingUnaryCall(channel_.get(), rpcmethod_GetFileByName_, + context, request, response); +} + +::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* +ServerReflection::Stub::AsyncGetFileByNameRaw( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::FileNameRequest& request, + ::grpc::CompletionQueue* cq) { + return new ::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>( + channel_.get(), cq, rpcmethod_GetFileByName_, context, request); +} + +::grpc::Status ServerReflection::Stub::GetFileContainingSymbol( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::SymbolRequest& request, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) { + return ::grpc::BlockingUnaryCall(channel_.get(), + rpcmethod_GetFileContainingSymbol_, context, + request, response); +} + +::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* +ServerReflection::Stub::AsyncGetFileContainingSymbolRaw( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::SymbolRequest& request, + ::grpc::CompletionQueue* cq) { + return new ::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>( + channel_.get(), cq, rpcmethod_GetFileContainingSymbol_, context, request); +} + +::grpc::Status ServerReflection::Stub::GetFileContainingExtension( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::ExtensionRequest& request, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) { + return ::grpc::BlockingUnaryCall(channel_.get(), + rpcmethod_GetFileContainingExtension_, + context, request, response); +} + +::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* +ServerReflection::Stub::AsyncGetFileContainingExtensionRaw( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::ExtensionRequest& request, + ::grpc::CompletionQueue* cq) { + return new ::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>( + channel_.get(), cq, rpcmethod_GetFileContainingExtension_, context, + request); +} + +::grpc::Status ServerReflection::Stub::GetAllExtensionNumbers( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::TypeRequest& request, + ::grpc::reflection::v1alpha::ExtensionNumberResponse* response) { + return ::grpc::BlockingUnaryCall(channel_.get(), + rpcmethod_GetAllExtensionNumbers_, context, + request, response); +} + +::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::ExtensionNumberResponse>* +ServerReflection::Stub::AsyncGetAllExtensionNumbersRaw( + ::grpc::ClientContext* context, + const ::grpc::reflection::v1alpha::TypeRequest& request, + ::grpc::CompletionQueue* cq) { + return new ::grpc::ClientAsyncResponseReader< + ::grpc::reflection::v1alpha::ExtensionNumberResponse>( + channel_.get(), cq, rpcmethod_GetAllExtensionNumbers_, context, request); +} + +ServerReflection::Service::Service() { + (void)ServerReflection_method_names; + AddMethod(new ::grpc::RpcServiceMethod( + ServerReflection_method_names[0], ::grpc::RpcMethod::NORMAL_RPC, + new ::grpc::RpcMethodHandler< + ServerReflection::Service, ::grpc::reflection::v1alpha::EmptyRequest, + ::grpc::reflection::v1alpha::ListServiceResponse>( + std::mem_fn(&ServerReflection::Service::ListService), this))); + AddMethod(new ::grpc::RpcServiceMethod( + ServerReflection_method_names[1], ::grpc::RpcMethod::NORMAL_RPC, + new ::grpc::RpcMethodHandler< + ServerReflection::Service, + ::grpc::reflection::v1alpha::FileNameRequest, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>( + std::mem_fn(&ServerReflection::Service::GetFileByName), this))); + AddMethod(new ::grpc::RpcServiceMethod( + ServerReflection_method_names[2], ::grpc::RpcMethod::NORMAL_RPC, + new ::grpc::RpcMethodHandler< + ServerReflection::Service, ::grpc::reflection::v1alpha::SymbolRequest, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>( + std::mem_fn(&ServerReflection::Service::GetFileContainingSymbol), + this))); + AddMethod(new ::grpc::RpcServiceMethod( + ServerReflection_method_names[3], ::grpc::RpcMethod::NORMAL_RPC, + new ::grpc::RpcMethodHandler< + ServerReflection::Service, + ::grpc::reflection::v1alpha::ExtensionRequest, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>( + std::mem_fn(&ServerReflection::Service::GetFileContainingExtension), + this))); + AddMethod(new ::grpc::RpcServiceMethod( + ServerReflection_method_names[4], ::grpc::RpcMethod::NORMAL_RPC, + new ::grpc::RpcMethodHandler< + ServerReflection::Service, ::grpc::reflection::v1alpha::TypeRequest, + ::grpc::reflection::v1alpha::ExtensionNumberResponse>( + std::mem_fn(&ServerReflection::Service::GetAllExtensionNumbers), + this))); +} + +ServerReflection::Service::~Service() {} + +::grpc::Status ServerReflection::Service::ListService( + ::grpc::ServerContext* context, + const ::grpc::reflection::v1alpha::EmptyRequest* request, + ::grpc::reflection::v1alpha::ListServiceResponse* response) { + (void)context; + (void)request; + (void)response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status ServerReflection::Service::GetFileByName( + ::grpc::ServerContext* context, + const ::grpc::reflection::v1alpha::FileNameRequest* request, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) { + (void)context; + (void)request; + (void)response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status ServerReflection::Service::GetFileContainingSymbol( + ::grpc::ServerContext* context, + const ::grpc::reflection::v1alpha::SymbolRequest* request, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) { + (void)context; + (void)request; + (void)response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status ServerReflection::Service::GetFileContainingExtension( + ::grpc::ServerContext* context, + const ::grpc::reflection::v1alpha::ExtensionRequest* request, + ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) { + (void)context; + (void)request; + (void)response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +::grpc::Status ServerReflection::Service::GetAllExtensionNumbers( + ::grpc::ServerContext* context, + const ::grpc::reflection::v1alpha::TypeRequest* request, + ::grpc::reflection::v1alpha::ExtensionNumberResponse* response) { + (void)context; + (void)request; + (void)response; + return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +} + +} // namespace grpc +} // namespace reflection +} // namespace v1alpha diff --git a/extensions/reflection/reflection.pb.cc b/extensions/reflection/reflection.pb.cc new file mode 100644 index 00000000000..97b3cb87916 --- /dev/null +++ b/extensions/reflection/reflection.pb.cc @@ -0,0 +1,2448 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: reflection.proto + +#define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) + +namespace grpc { +namespace reflection { +namespace v1alpha { + +namespace { + +const ::google::protobuf::Descriptor* EmptyRequest_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + EmptyRequest_reflection_ = NULL; +const ::google::protobuf::Descriptor* FileNameRequest_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + FileNameRequest_reflection_ = NULL; +const ::google::protobuf::Descriptor* SymbolRequest_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + SymbolRequest_reflection_ = NULL; +const ::google::protobuf::Descriptor* ExtensionRequest_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ExtensionRequest_reflection_ = NULL; +const ::google::protobuf::Descriptor* TypeRequest_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + TypeRequest_reflection_ = NULL; +const ::google::protobuf::Descriptor* ListServiceResponse_descriptor_ = NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ListServiceResponse_reflection_ = NULL; +const ::google::protobuf::Descriptor* FileDescriptorProtoResponse_descriptor_ = + NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + FileDescriptorProtoResponse_reflection_ = NULL; +const ::google::protobuf::Descriptor* ExtensionNumberResponse_descriptor_ = + NULL; +const ::google::protobuf::internal::GeneratedMessageReflection* + ExtensionNumberResponse_reflection_ = NULL; + +} // namespace + +void protobuf_AssignDesc_reflection_2eproto() { + protobuf_AddDesc_reflection_2eproto(); + const ::google::protobuf::FileDescriptor* file = + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "reflection.proto"); + GOOGLE_CHECK(file != NULL); + EmptyRequest_descriptor_ = file->message_type(0); + static const int EmptyRequest_offsets_[1] = {}; + EmptyRequest_reflection_ = ::google::protobuf::internal:: + GeneratedMessageReflection::NewGeneratedMessageReflection( + EmptyRequest_descriptor_, EmptyRequest::default_instance_, + EmptyRequest_offsets_, -1, -1, -1, sizeof(EmptyRequest), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EmptyRequest, + _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( + EmptyRequest, _is_default_instance_)); + FileNameRequest_descriptor_ = file->message_type(1); + static const int FileNameRequest_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileNameRequest, + filename_), + }; + FileNameRequest_reflection_ = ::google::protobuf::internal:: + GeneratedMessageReflection::NewGeneratedMessageReflection( + FileNameRequest_descriptor_, FileNameRequest::default_instance_, + FileNameRequest_offsets_, -1, -1, -1, sizeof(FileNameRequest), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileNameRequest, + _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( + FileNameRequest, _is_default_instance_)); + SymbolRequest_descriptor_ = file->message_type(2); + static const int SymbolRequest_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SymbolRequest, symbol_), + }; + SymbolRequest_reflection_ = ::google::protobuf::internal:: + GeneratedMessageReflection::NewGeneratedMessageReflection( + SymbolRequest_descriptor_, SymbolRequest::default_instance_, + SymbolRequest_offsets_, -1, -1, -1, sizeof(SymbolRequest), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SymbolRequest, + _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( + SymbolRequest, _is_default_instance_)); + ExtensionRequest_descriptor_ = file->message_type(3); + static const int ExtensionRequest_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, + containing_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, + extension_number_), + }; + ExtensionRequest_reflection_ = ::google::protobuf::internal:: + GeneratedMessageReflection::NewGeneratedMessageReflection( + ExtensionRequest_descriptor_, ExtensionRequest::default_instance_, + ExtensionRequest_offsets_, -1, -1, -1, sizeof(ExtensionRequest), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, + _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( + ExtensionRequest, _is_default_instance_)); + TypeRequest_descriptor_ = file->message_type(4); + static const int TypeRequest_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TypeRequest, type_), + }; + TypeRequest_reflection_ = ::google::protobuf::internal:: + GeneratedMessageReflection::NewGeneratedMessageReflection( + TypeRequest_descriptor_, TypeRequest::default_instance_, + TypeRequest_offsets_, -1, -1, -1, sizeof(TypeRequest), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TypeRequest, + _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( + TypeRequest, _is_default_instance_)); + ListServiceResponse_descriptor_ = file->message_type(5); + static const int ListServiceResponse_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListServiceResponse, + services_), + }; + ListServiceResponse_reflection_ = ::google::protobuf::internal:: + GeneratedMessageReflection::NewGeneratedMessageReflection( + ListServiceResponse_descriptor_, + ListServiceResponse::default_instance_, ListServiceResponse_offsets_, + -1, -1, -1, sizeof(ListServiceResponse), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListServiceResponse, + _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( + ListServiceResponse, _is_default_instance_)); + FileDescriptorProtoResponse_descriptor_ = file->message_type(6); + static const int FileDescriptorProtoResponse_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( + FileDescriptorProtoResponse, file_descriptor_proto_), + }; + FileDescriptorProtoResponse_reflection_ = ::google::protobuf::internal:: + GeneratedMessageReflection::NewGeneratedMessageReflection( + FileDescriptorProtoResponse_descriptor_, + FileDescriptorProtoResponse::default_instance_, + FileDescriptorProtoResponse_offsets_, -1, -1, -1, + sizeof(FileDescriptorProtoResponse), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( + FileDescriptorProtoResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( + FileDescriptorProtoResponse, _is_default_instance_)); + ExtensionNumberResponse_descriptor_ = file->message_type(7); + static const int ExtensionNumberResponse_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, + extension_number_), + }; + ExtensionNumberResponse_reflection_ = ::google::protobuf::internal:: + GeneratedMessageReflection::NewGeneratedMessageReflection( + ExtensionNumberResponse_descriptor_, + ExtensionNumberResponse::default_instance_, + ExtensionNumberResponse_offsets_, -1, -1, -1, + sizeof(ExtensionNumberResponse), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( + ExtensionNumberResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( + ExtensionNumberResponse, _is_default_instance_)); +} + +namespace { + +GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); +inline void protobuf_AssignDescriptorsOnce() { + ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, + &protobuf_AssignDesc_reflection_2eproto); +} + +void protobuf_RegisterTypes(const ::std::string&) { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + EmptyRequest_descriptor_, &EmptyRequest::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + FileNameRequest_descriptor_, &FileNameRequest::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + SymbolRequest_descriptor_, &SymbolRequest::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ExtensionRequest_descriptor_, &ExtensionRequest::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + TypeRequest_descriptor_, &TypeRequest::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ListServiceResponse_descriptor_, + &ListServiceResponse::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + FileDescriptorProtoResponse_descriptor_, + &FileDescriptorProtoResponse::default_instance()); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( + ExtensionNumberResponse_descriptor_, + &ExtensionNumberResponse::default_instance()); +} + +} // namespace + +void protobuf_ShutdownFile_reflection_2eproto() { + delete EmptyRequest::default_instance_; + delete EmptyRequest_reflection_; + delete FileNameRequest::default_instance_; + delete FileNameRequest_reflection_; + delete SymbolRequest::default_instance_; + delete SymbolRequest_reflection_; + delete ExtensionRequest::default_instance_; + delete ExtensionRequest_reflection_; + delete TypeRequest::default_instance_; + delete TypeRequest_reflection_; + delete ListServiceResponse::default_instance_; + delete ListServiceResponse_reflection_; + delete FileDescriptorProtoResponse::default_instance_; + delete FileDescriptorProtoResponse_reflection_; + delete ExtensionNumberResponse::default_instance_; + delete ExtensionNumberResponse_reflection_; +} + +void protobuf_AddDesc_reflection_2eproto() { + static bool already_here = false; + if (already_here) return; + already_here = true; + GOOGLE_PROTOBUF_VERIFY_VERSION; + + ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( + "\n\020reflection.proto\022\027grpc.reflection.v1al" + "pha\"\016\n\014EmptyRequest\"#\n\017FileNameRequest\022\020" + "\n\010filename\030\001 \001(\t\"\037\n\rSymbolRequest\022\016\n\006sym" + "bol\030\001 \001(\t\"E\n\020ExtensionRequest\022\027\n\017contain" + "ing_type\030\001 \001(\t\022\030\n\020extension_number\030\002 \001(\005" + "\"\033\n\013TypeRequest\022\014\n\004type\030\001 " + "\001(\t\"\'\n\023ListSer" + "viceResponse\022\020\n\010services\030\001 \003(\t\"<\n\033FileDe" + "scriptorProtoResponse\022\035\n\025file_descriptor" + "_proto\030\001 \001(\014\"3\n\027ExtensionNumberResponse\022" + "\030\n\020extension_number\030\001 \003(\0052\333\004\n\020ServerRefl" + "ection\022d\n\013ListService\022%.grpc.reflection." + "v1alpha.EmptyRequest\032,.grpc.reflection.v" + "1alpha.ListServiceResponse\"\000\022q\n\rGetFileB" + "yName\022(.grpc.reflection.v1alpha.FileName" + "Request\0324.grpc.reflection.v1alpha.FileDe" + "scriptorProtoResponse\"\000\022y\n\027GetFileContai" + "ningSymbol\022&.grpc.reflection.v1alpha.Sym" + "bolRequest\0324.grpc.reflection.v1alpha.Fil" + "eDescriptorProtoResponse\"\000\022\177\n\032GetFileCon" + "tainingExtension\022).grpc.reflection.v1alp" + "ha.ExtensionRequest\0324.grpc.reflection.v1" + "alpha.FileDescriptorProtoResponse\"\000\022r\n\026G" + "etAllExtensionNumbers\022$.grpc.reflection." + "v1alpha.TypeRequest\0320.grpc.reflection.v1" + "alpha.ExtensionNumberResponse\"\000b\006proto3", + 999); + ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( + "reflection.proto", &protobuf_RegisterTypes); + EmptyRequest::default_instance_ = new EmptyRequest(); + FileNameRequest::default_instance_ = new FileNameRequest(); + SymbolRequest::default_instance_ = new SymbolRequest(); + ExtensionRequest::default_instance_ = new ExtensionRequest(); + TypeRequest::default_instance_ = new TypeRequest(); + ListServiceResponse::default_instance_ = new ListServiceResponse(); + FileDescriptorProtoResponse::default_instance_ = + new FileDescriptorProtoResponse(); + ExtensionNumberResponse::default_instance_ = new ExtensionNumberResponse(); + EmptyRequest::default_instance_->InitAsDefaultInstance(); + FileNameRequest::default_instance_->InitAsDefaultInstance(); + SymbolRequest::default_instance_->InitAsDefaultInstance(); + ExtensionRequest::default_instance_->InitAsDefaultInstance(); + TypeRequest::default_instance_->InitAsDefaultInstance(); + ListServiceResponse::default_instance_->InitAsDefaultInstance(); + FileDescriptorProtoResponse::default_instance_->InitAsDefaultInstance(); + ExtensionNumberResponse::default_instance_->InitAsDefaultInstance(); + ::google::protobuf::internal::OnShutdown( + &protobuf_ShutdownFile_reflection_2eproto); +} + +// Force AddDescriptors() to be called at static initialization time. +struct StaticDescriptorInitializer_reflection_2eproto { + StaticDescriptorInitializer_reflection_2eproto() { + protobuf_AddDesc_reflection_2eproto(); + } +} static_descriptor_initializer_reflection_2eproto_; + +namespace { + +static void MergeFromFail(int line) GOOGLE_ATTRIBUTE_COLD; +static void MergeFromFail(int line) { + GOOGLE_CHECK(false) << __FILE__ << ":" << line; +} + +} // namespace + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +EmptyRequest::EmptyRequest() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.EmptyRequest) +} + +void EmptyRequest::InitAsDefaultInstance() { _is_default_instance_ = true; } + +EmptyRequest::EmptyRequest(const EmptyRequest& from) + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.EmptyRequest) +} + +void EmptyRequest::SharedCtor() { + _is_default_instance_ = false; + _cached_size_ = 0; +} + +EmptyRequest::~EmptyRequest() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.EmptyRequest) + SharedDtor(); +} + +void EmptyRequest::SharedDtor() { + if (this != default_instance_) { + } +} + +void EmptyRequest::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* EmptyRequest::descriptor() { + protobuf_AssignDescriptorsOnce(); + return EmptyRequest_descriptor_; +} + +const EmptyRequest& EmptyRequest::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); + return *default_instance_; +} + +EmptyRequest* EmptyRequest::default_instance_ = NULL; + +EmptyRequest* EmptyRequest::New(::google::protobuf::Arena* arena) const { + EmptyRequest* n = new EmptyRequest; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void EmptyRequest::Clear() {} + +bool EmptyRequest::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) \ + if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.EmptyRequest) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = + input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); + } +success: + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.EmptyRequest) + return true; +failure: + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.EmptyRequest) + return false; +#undef DO_ +} + +void EmptyRequest::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.EmptyRequest) + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.EmptyRequest) +} + +::google::protobuf::uint8* EmptyRequest::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.EmptyRequest) + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.EmptyRequest) + return target; +} + +int EmptyRequest::ByteSize() const { + int total_size = 0; + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void EmptyRequest::MergeFrom(const ::google::protobuf::Message& from) { + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const EmptyRequest* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void EmptyRequest::MergeFrom(const EmptyRequest& from) { + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); +} + +void EmptyRequest::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void EmptyRequest::CopyFrom(const EmptyRequest& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool EmptyRequest::IsInitialized() const { return true; } + +void EmptyRequest::Swap(EmptyRequest* other) { + if (other == this) return; + InternalSwap(other); +} +void EmptyRequest::InternalSwap(EmptyRequest* other) { + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata EmptyRequest::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = EmptyRequest_descriptor_; + metadata.reflection = EmptyRequest_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// EmptyRequest + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int FileNameRequest::kFilenameFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +FileNameRequest::FileNameRequest() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.FileNameRequest) +} + +void FileNameRequest::InitAsDefaultInstance() { _is_default_instance_ = true; } + +FileNameRequest::FileNameRequest(const FileNameRequest& from) + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.FileNameRequest) +} + +void FileNameRequest::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + filename_.UnsafeSetDefault( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +FileNameRequest::~FileNameRequest() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.FileNameRequest) + SharedDtor(); +} + +void FileNameRequest::SharedDtor() { + filename_.DestroyNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != default_instance_) { + } +} + +void FileNameRequest::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* FileNameRequest::descriptor() { + protobuf_AssignDescriptorsOnce(); + return FileNameRequest_descriptor_; +} + +const FileNameRequest& FileNameRequest::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); + return *default_instance_; +} + +FileNameRequest* FileNameRequest::default_instance_ = NULL; + +FileNameRequest* FileNameRequest::New(::google::protobuf::Arena* arena) const { + FileNameRequest* n = new FileNameRequest; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void FileNameRequest::Clear() { + filename_.ClearToEmptyNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +bool FileNameRequest::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) \ + if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.FileNameRequest) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = + input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch ( + ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string filename = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_filename())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->filename().data(), this->filename().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.FileNameRequest.filename")); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite:: + WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, + tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.FileNameRequest) + return true; +failure: + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.FileNameRequest) + return false; +#undef DO_ +} + +void FileNameRequest::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.FileNameRequest) + // optional string filename = 1; + if (this->filename().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->filename().data(), this->filename().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.FileNameRequest.filename"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->filename(), output); + } + + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.FileNameRequest) +} + +::google::protobuf::uint8* FileNameRequest::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.FileNameRequest) + // optional string filename = 1; + if (this->filename().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->filename().data(), this->filename().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.FileNameRequest.filename"); + target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->filename(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.FileNameRequest) + return target; +} + +int FileNameRequest::ByteSize() const { + int total_size = 0; + + // optional string filename = 1; + if (this->filename().size() > 0) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->filename()); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void FileNameRequest::MergeFrom(const ::google::protobuf::Message& from) { + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const FileNameRequest* source = + ::google::protobuf::internal::DynamicCastToGenerated< + const FileNameRequest>(&from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void FileNameRequest::MergeFrom(const FileNameRequest& from) { + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + if (from.filename().size() > 0) { + filename_.AssignWithDefault( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + from.filename_); + } +} + +void FileNameRequest::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void FileNameRequest::CopyFrom(const FileNameRequest& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool FileNameRequest::IsInitialized() const { return true; } + +void FileNameRequest::Swap(FileNameRequest* other) { + if (other == this) return; + InternalSwap(other); +} +void FileNameRequest::InternalSwap(FileNameRequest* other) { + filename_.Swap(&other->filename_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata FileNameRequest::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = FileNameRequest_descriptor_; + metadata.reflection = FileNameRequest_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// FileNameRequest + +// optional string filename = 1; +void FileNameRequest::clear_filename() { + filename_.ClearToEmptyNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +const ::std::string& FileNameRequest::filename() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.FileNameRequest.filename) + return filename_.GetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void FileNameRequest::set_filename(const ::std::string& value) { + filename_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.FileNameRequest.filename) +} +void FileNameRequest::set_filename(const char* value) { + filename_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.FileNameRequest.filename) +} +void FileNameRequest::set_filename(const char* value, size_t size) { + filename_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.FileNameRequest.filename) +} +::std::string* FileNameRequest::mutable_filename() { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.FileNameRequest.filename) + return filename_.MutableNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +::std::string* FileNameRequest::release_filename() { + return filename_.ReleaseNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void FileNameRequest::set_allocated_filename(::std::string* filename) { + if (filename != NULL) { + } else { + } + filename_.SetAllocatedNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), filename); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.FileNameRequest.filename) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int SymbolRequest::kSymbolFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +SymbolRequest::SymbolRequest() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.SymbolRequest) +} + +void SymbolRequest::InitAsDefaultInstance() { _is_default_instance_ = true; } + +SymbolRequest::SymbolRequest(const SymbolRequest& from) + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.SymbolRequest) +} + +void SymbolRequest::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + symbol_.UnsafeSetDefault( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +SymbolRequest::~SymbolRequest() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.SymbolRequest) + SharedDtor(); +} + +void SymbolRequest::SharedDtor() { + symbol_.DestroyNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != default_instance_) { + } +} + +void SymbolRequest::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* SymbolRequest::descriptor() { + protobuf_AssignDescriptorsOnce(); + return SymbolRequest_descriptor_; +} + +const SymbolRequest& SymbolRequest::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); + return *default_instance_; +} + +SymbolRequest* SymbolRequest::default_instance_ = NULL; + +SymbolRequest* SymbolRequest::New(::google::protobuf::Arena* arena) const { + SymbolRequest* n = new SymbolRequest; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void SymbolRequest::Clear() { + symbol_.ClearToEmptyNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +bool SymbolRequest::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) \ + if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.SymbolRequest) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = + input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch ( + ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string symbol = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_symbol())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->symbol().data(), this->symbol().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.SymbolRequest.symbol")); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite:: + WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, + tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.SymbolRequest) + return true; +failure: + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.SymbolRequest) + return false; +#undef DO_ +} + +void SymbolRequest::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.SymbolRequest) + // optional string symbol = 1; + if (this->symbol().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->symbol().data(), this->symbol().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.SymbolRequest.symbol"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->symbol(), output); + } + + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.SymbolRequest) +} + +::google::protobuf::uint8* SymbolRequest::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.SymbolRequest) + // optional string symbol = 1; + if (this->symbol().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->symbol().data(), this->symbol().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.SymbolRequest.symbol"); + target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->symbol(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.SymbolRequest) + return target; +} + +int SymbolRequest::ByteSize() const { + int total_size = 0; + + // optional string symbol = 1; + if (this->symbol().size() > 0) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->symbol()); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void SymbolRequest::MergeFrom(const ::google::protobuf::Message& from) { + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const SymbolRequest* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void SymbolRequest::MergeFrom(const SymbolRequest& from) { + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + if (from.symbol().size() > 0) { + symbol_.AssignWithDefault( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + from.symbol_); + } +} + +void SymbolRequest::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void SymbolRequest::CopyFrom(const SymbolRequest& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool SymbolRequest::IsInitialized() const { return true; } + +void SymbolRequest::Swap(SymbolRequest* other) { + if (other == this) return; + InternalSwap(other); +} +void SymbolRequest::InternalSwap(SymbolRequest* other) { + symbol_.Swap(&other->symbol_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata SymbolRequest::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = SymbolRequest_descriptor_; + metadata.reflection = SymbolRequest_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// SymbolRequest + +// optional string symbol = 1; +void SymbolRequest::clear_symbol() { + symbol_.ClearToEmptyNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +const ::std::string& SymbolRequest::symbol() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.SymbolRequest.symbol) + return symbol_.GetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void SymbolRequest::set_symbol(const ::std::string& value) { + symbol_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.SymbolRequest.symbol) +} +void SymbolRequest::set_symbol(const char* value) { + symbol_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.SymbolRequest.symbol) +} +void SymbolRequest::set_symbol(const char* value, size_t size) { + symbol_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.SymbolRequest.symbol) +} +::std::string* SymbolRequest::mutable_symbol() { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.SymbolRequest.symbol) + return symbol_.MutableNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +::std::string* SymbolRequest::release_symbol() { + return symbol_.ReleaseNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void SymbolRequest::set_allocated_symbol(::std::string* symbol) { + if (symbol != NULL) { + } else { + } + symbol_.SetAllocatedNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), symbol); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.SymbolRequest.symbol) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int ExtensionRequest::kContainingTypeFieldNumber; +const int ExtensionRequest::kExtensionNumberFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ExtensionRequest::ExtensionRequest() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ExtensionRequest) +} + +void ExtensionRequest::InitAsDefaultInstance() { _is_default_instance_ = true; } + +ExtensionRequest::ExtensionRequest(const ExtensionRequest& from) + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ExtensionRequest) +} + +void ExtensionRequest::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + containing_type_.UnsafeSetDefault( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + extension_number_ = 0; +} + +ExtensionRequest::~ExtensionRequest() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ExtensionRequest) + SharedDtor(); +} + +void ExtensionRequest::SharedDtor() { + containing_type_.DestroyNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != default_instance_) { + } +} + +void ExtensionRequest::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ExtensionRequest::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ExtensionRequest_descriptor_; +} + +const ExtensionRequest& ExtensionRequest::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); + return *default_instance_; +} + +ExtensionRequest* ExtensionRequest::default_instance_ = NULL; + +ExtensionRequest* ExtensionRequest::New( + ::google::protobuf::Arena* arena) const { + ExtensionRequest* n = new ExtensionRequest; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void ExtensionRequest::Clear() { + containing_type_.ClearToEmptyNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + extension_number_ = 0; +} + +bool ExtensionRequest::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) \ + if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ExtensionRequest) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = + input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch ( + ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string containing_type = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_containing_type())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->containing_type().data(), this->containing_type().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.ExtensionRequest.containing_type")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(16)) goto parse_extension_number; + break; + } + + // optional int32 extension_number = 2; + case 2: { + if (tag == 16) { + parse_extension_number: + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, + ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &extension_number_))); + + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite:: + WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, + tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ExtensionRequest) + return true; +failure: + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ExtensionRequest) + return false; +#undef DO_ +} + +void ExtensionRequest::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ExtensionRequest) + // optional string containing_type = 1; + if (this->containing_type().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->containing_type().data(), this->containing_type().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ExtensionRequest.containing_type"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->containing_type(), output); + } + + // optional int32 extension_number = 2; + if (this->extension_number() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt32( + 2, this->extension_number(), output); + } + + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ExtensionRequest) +} + +::google::protobuf::uint8* ExtensionRequest::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ExtensionRequest) + // optional string containing_type = 1; + if (this->containing_type().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->containing_type().data(), this->containing_type().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ExtensionRequest.containing_type"); + target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->containing_type(), target); + } + + // optional int32 extension_number = 2; + if (this->extension_number() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray( + 2, this->extension_number(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ExtensionRequest) + return target; +} + +int ExtensionRequest::ByteSize() const { + int total_size = 0; + + // optional string containing_type = 1; + if (this->containing_type().size() > 0) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->containing_type()); + } + + // optional int32 extension_number = 2; + if (this->extension_number() != 0) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->extension_number()); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ExtensionRequest::MergeFrom(const ::google::protobuf::Message& from) { + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const ExtensionRequest* source = + ::google::protobuf::internal::DynamicCastToGenerated< + const ExtensionRequest>(&from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void ExtensionRequest::MergeFrom(const ExtensionRequest& from) { + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + if (from.containing_type().size() > 0) { + containing_type_.AssignWithDefault( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + from.containing_type_); + } + if (from.extension_number() != 0) { + set_extension_number(from.extension_number()); + } +} + +void ExtensionRequest::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ExtensionRequest::CopyFrom(const ExtensionRequest& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ExtensionRequest::IsInitialized() const { return true; } + +void ExtensionRequest::Swap(ExtensionRequest* other) { + if (other == this) return; + InternalSwap(other); +} +void ExtensionRequest::InternalSwap(ExtensionRequest* other) { + containing_type_.Swap(&other->containing_type_); + std::swap(extension_number_, other->extension_number_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata ExtensionRequest::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ExtensionRequest_descriptor_; + metadata.reflection = ExtensionRequest_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// ExtensionRequest + +// optional string containing_type = 1; +void ExtensionRequest::clear_containing_type() { + containing_type_.ClearToEmptyNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +const ::std::string& ExtensionRequest::containing_type() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.containing_type) + return containing_type_.GetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void ExtensionRequest::set_containing_type(const ::std::string& value) { + containing_type_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.containing_type) +} +void ExtensionRequest::set_containing_type(const char* value) { + containing_type_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionRequest.containing_type) +} +void ExtensionRequest::set_containing_type(const char* value, size_t size) { + containing_type_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionRequest.containing_type) +} +::std::string* ExtensionRequest::mutable_containing_type() { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionRequest.containing_type) + return containing_type_.MutableNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +::std::string* ExtensionRequest::release_containing_type() { + return containing_type_.ReleaseNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void ExtensionRequest::set_allocated_containing_type( + ::std::string* containing_type) { + if (containing_type != NULL) { + } else { + } + containing_type_.SetAllocatedNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + containing_type); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionRequest.containing_type) +} + +// optional int32 extension_number = 2; +void ExtensionRequest::clear_extension_number() { extension_number_ = 0; } +::google::protobuf::int32 ExtensionRequest::extension_number() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.extension_number) + return extension_number_; +} +void ExtensionRequest::set_extension_number(::google::protobuf::int32 value) { + extension_number_ = value; + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.extension_number) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int TypeRequest::kTypeFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +TypeRequest::TypeRequest() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.TypeRequest) +} + +void TypeRequest::InitAsDefaultInstance() { _is_default_instance_ = true; } + +TypeRequest::TypeRequest(const TypeRequest& from) + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.TypeRequest) +} + +void TypeRequest::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + type_.UnsafeSetDefault( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +TypeRequest::~TypeRequest() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.TypeRequest) + SharedDtor(); +} + +void TypeRequest::SharedDtor() { + type_.DestroyNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != default_instance_) { + } +} + +void TypeRequest::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* TypeRequest::descriptor() { + protobuf_AssignDescriptorsOnce(); + return TypeRequest_descriptor_; +} + +const TypeRequest& TypeRequest::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); + return *default_instance_; +} + +TypeRequest* TypeRequest::default_instance_ = NULL; + +TypeRequest* TypeRequest::New(::google::protobuf::Arena* arena) const { + TypeRequest* n = new TypeRequest; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void TypeRequest::Clear() { + type_.ClearToEmptyNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +bool TypeRequest::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) \ + if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.TypeRequest) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = + input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch ( + ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string type = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_type())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->type().data(), this->type().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.TypeRequest.type")); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite:: + WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, + tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.TypeRequest) + return true; +failure: + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.TypeRequest) + return false; +#undef DO_ +} + +void TypeRequest::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.TypeRequest) + // optional string type = 1; + if (this->type().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->type().data(), this->type().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.TypeRequest.type"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->type(), output); + } + + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.TypeRequest) +} + +::google::protobuf::uint8* TypeRequest::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.TypeRequest) + // optional string type = 1; + if (this->type().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->type().data(), this->type().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.TypeRequest.type"); + target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->type(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.TypeRequest) + return target; +} + +int TypeRequest::ByteSize() const { + int total_size = 0; + + // optional string type = 1; + if (this->type().size() > 0) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( + this->type()); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void TypeRequest::MergeFrom(const ::google::protobuf::Message& from) { + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const TypeRequest* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void TypeRequest::MergeFrom(const TypeRequest& from) { + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + if (from.type().size() > 0) { + type_.AssignWithDefault( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + from.type_); + } +} + +void TypeRequest::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void TypeRequest::CopyFrom(const TypeRequest& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TypeRequest::IsInitialized() const { return true; } + +void TypeRequest::Swap(TypeRequest* other) { + if (other == this) return; + InternalSwap(other); +} +void TypeRequest::InternalSwap(TypeRequest* other) { + type_.Swap(&other->type_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata TypeRequest::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = TypeRequest_descriptor_; + metadata.reflection = TypeRequest_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// TypeRequest + +// optional string type = 1; +void TypeRequest::clear_type() { + type_.ClearToEmptyNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +const ::std::string& TypeRequest::type() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.TypeRequest.type) + return type_.GetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void TypeRequest::set_type(const ::std::string& value) { + type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.TypeRequest.type) +} +void TypeRequest::set_type(const char* value) { + type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.TypeRequest.type) +} +void TypeRequest::set_type(const char* value, size_t size) { + type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.TypeRequest.type) +} +::std::string* TypeRequest::mutable_type() { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.TypeRequest.type) + return type_.MutableNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +::std::string* TypeRequest::release_type() { + return type_.ReleaseNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void TypeRequest::set_allocated_type(::std::string* type) { + if (type != NULL) { + } else { + } + type_.SetAllocatedNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), type); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.TypeRequest.type) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int ListServiceResponse::kServicesFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ListServiceResponse::ListServiceResponse() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ListServiceResponse) +} + +void ListServiceResponse::InitAsDefaultInstance() { + _is_default_instance_ = true; +} + +ListServiceResponse::ListServiceResponse(const ListServiceResponse& from) + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ListServiceResponse) +} + +void ListServiceResponse::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; +} + +ListServiceResponse::~ListServiceResponse() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ListServiceResponse) + SharedDtor(); +} + +void ListServiceResponse::SharedDtor() { + if (this != default_instance_) { + } +} + +void ListServiceResponse::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ListServiceResponse::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ListServiceResponse_descriptor_; +} + +const ListServiceResponse& ListServiceResponse::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); + return *default_instance_; +} + +ListServiceResponse* ListServiceResponse::default_instance_ = NULL; + +ListServiceResponse* ListServiceResponse::New( + ::google::protobuf::Arena* arena) const { + ListServiceResponse* n = new ListServiceResponse; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void ListServiceResponse::Clear() { services_.Clear(); } + +bool ListServiceResponse::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) \ + if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ListServiceResponse) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = + input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch ( + ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated string services = 1; + case 1: { + if (tag == 10) { + parse_services: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_services())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->services(this->services_size() - 1).data(), + this->services(this->services_size() - 1).length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.ListServiceResponse.services")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(10)) goto parse_services; + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite:: + WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, + tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ListServiceResponse) + return true; +failure: + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ListServiceResponse) + return false; +#undef DO_ +} + +void ListServiceResponse::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ListServiceResponse) + // repeated string services = 1; + for (int i = 0; i < this->services_size(); i++) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->services(i).data(), this->services(i).length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ListServiceResponse.services"); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->services(i), output); + } + + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ListServiceResponse) +} + +::google::protobuf::uint8* ListServiceResponse::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ListServiceResponse) + // repeated string services = 1; + for (int i = 0; i < this->services_size(); i++) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->services(i).data(), this->services(i).length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ListServiceResponse.services"); + target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->services(i), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ListServiceResponse) + return target; +} + +int ListServiceResponse::ByteSize() const { + int total_size = 0; + + // repeated string services = 1; + total_size += 1 * this->services_size(); + for (int i = 0; i < this->services_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->services(i)); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ListServiceResponse::MergeFrom(const ::google::protobuf::Message& from) { + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const ListServiceResponse* source = + ::google::protobuf::internal::DynamicCastToGenerated< + const ListServiceResponse>(&from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void ListServiceResponse::MergeFrom(const ListServiceResponse& from) { + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + services_.MergeFrom(from.services_); +} + +void ListServiceResponse::CopyFrom(const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ListServiceResponse::CopyFrom(const ListServiceResponse& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ListServiceResponse::IsInitialized() const { return true; } + +void ListServiceResponse::Swap(ListServiceResponse* other) { + if (other == this) return; + InternalSwap(other); +} +void ListServiceResponse::InternalSwap(ListServiceResponse* other) { + services_.UnsafeArenaSwap(&other->services_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata ListServiceResponse::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ListServiceResponse_descriptor_; + metadata.reflection = ListServiceResponse_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// ListServiceResponse + +// repeated string services = 1; +int ListServiceResponse::services_size() const { return services_.size(); } +void ListServiceResponse::clear_services() { services_.Clear(); } +const ::std::string& ListServiceResponse::services(int index) const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ListServiceResponse.services) + return services_.Get(index); +} +::std::string* ListServiceResponse::mutable_services(int index) { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ListServiceResponse.services) + return services_.Mutable(index); +} +void ListServiceResponse::set_services(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ListServiceResponse.services) + services_.Mutable(index)->assign(value); +} +void ListServiceResponse::set_services(int index, const char* value) { + services_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ListServiceResponse.services) +} +void ListServiceResponse::set_services(int index, const char* value, + size_t size) { + services_.Mutable(index)->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ListServiceResponse.services) +} +::std::string* ListServiceResponse::add_services() { return services_.Add(); } +void ListServiceResponse::add_services(const ::std::string& value) { + services_.Add()->assign(value); + // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ListServiceResponse.services) +} +void ListServiceResponse::add_services(const char* value) { + services_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:grpc.reflection.v1alpha.ListServiceResponse.services) +} +void ListServiceResponse::add_services(const char* value, size_t size) { + services_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:grpc.reflection.v1alpha.ListServiceResponse.services) +} +const ::google::protobuf::RepeatedPtrField< ::std::string>& +ListServiceResponse::services() const { + // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ListServiceResponse.services) + return services_; +} +::google::protobuf::RepeatedPtrField< ::std::string>* +ListServiceResponse::mutable_services() { + // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ListServiceResponse.services) + return &services_; +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int FileDescriptorProtoResponse::kFileDescriptorProtoFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +FileDescriptorProtoResponse::FileDescriptorProtoResponse() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.FileDescriptorProtoResponse) +} + +void FileDescriptorProtoResponse::InitAsDefaultInstance() { + _is_default_instance_ = true; +} + +FileDescriptorProtoResponse::FileDescriptorProtoResponse( + const FileDescriptorProtoResponse& from) + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.FileDescriptorProtoResponse) +} + +void FileDescriptorProtoResponse::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); + _cached_size_ = 0; + file_descriptor_proto_.UnsafeSetDefault( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +FileDescriptorProtoResponse::~FileDescriptorProtoResponse() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + SharedDtor(); +} + +void FileDescriptorProtoResponse::SharedDtor() { + file_descriptor_proto_.DestroyNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (this != default_instance_) { + } +} + +void FileDescriptorProtoResponse::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* +FileDescriptorProtoResponse::descriptor() { + protobuf_AssignDescriptorsOnce(); + return FileDescriptorProtoResponse_descriptor_; +} + +const FileDescriptorProtoResponse& +FileDescriptorProtoResponse::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); + return *default_instance_; +} + +FileDescriptorProtoResponse* FileDescriptorProtoResponse::default_instance_ = + NULL; + +FileDescriptorProtoResponse* FileDescriptorProtoResponse::New( + ::google::protobuf::Arena* arena) const { + FileDescriptorProtoResponse* n = new FileDescriptorProtoResponse; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void FileDescriptorProtoResponse::Clear() { + file_descriptor_proto_.ClearToEmptyNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + +bool FileDescriptorProtoResponse::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) \ + if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = + input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch ( + ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional bytes file_descriptor_proto = 1; + case 1: { + if (tag == 10) { + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_file_descriptor_proto())); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite:: + WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, + tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + return true; +failure: + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + return false; +#undef DO_ +} + +void FileDescriptorProtoResponse::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + // optional bytes file_descriptor_proto = 1; + if (this->file_descriptor_proto().size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 1, this->file_descriptor_proto(), output); + } + + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.FileDescriptorProtoResponse) +} + +::google::protobuf::uint8* +FileDescriptorProtoResponse::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + // optional bytes file_descriptor_proto = 1; + if (this->file_descriptor_proto().size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 1, this->file_descriptor_proto(), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + return target; +} + +int FileDescriptorProtoResponse::ByteSize() const { + int total_size = 0; + + // optional bytes file_descriptor_proto = 1; + if (this->file_descriptor_proto().size() > 0) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->file_descriptor_proto()); + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void FileDescriptorProtoResponse::MergeFrom( + const ::google::protobuf::Message& from) { + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const FileDescriptorProtoResponse* source = + ::google::protobuf::internal::DynamicCastToGenerated< + const FileDescriptorProtoResponse>(&from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void FileDescriptorProtoResponse::MergeFrom( + const FileDescriptorProtoResponse& from) { + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + if (from.file_descriptor_proto().size() > 0) { + file_descriptor_proto_.AssignWithDefault( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + from.file_descriptor_proto_); + } +} + +void FileDescriptorProtoResponse::CopyFrom( + const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void FileDescriptorProtoResponse::CopyFrom( + const FileDescriptorProtoResponse& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool FileDescriptorProtoResponse::IsInitialized() const { return true; } + +void FileDescriptorProtoResponse::Swap(FileDescriptorProtoResponse* other) { + if (other == this) return; + InternalSwap(other); +} +void FileDescriptorProtoResponse::InternalSwap( + FileDescriptorProtoResponse* other) { + file_descriptor_proto_.Swap(&other->file_descriptor_proto_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata FileDescriptorProtoResponse::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = FileDescriptorProtoResponse_descriptor_; + metadata.reflection = FileDescriptorProtoResponse_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// FileDescriptorProtoResponse + +// optional bytes file_descriptor_proto = 1; +void FileDescriptorProtoResponse::clear_file_descriptor_proto() { + file_descriptor_proto_.ClearToEmptyNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +const ::std::string& FileDescriptorProtoResponse::file_descriptor_proto() + const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) + return file_descriptor_proto_.GetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void FileDescriptorProtoResponse::set_file_descriptor_proto( + const ::std::string& value) { + file_descriptor_proto_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) +} +void FileDescriptorProtoResponse::set_file_descriptor_proto(const char* value) { + file_descriptor_proto_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) +} +void FileDescriptorProtoResponse::set_file_descriptor_proto(const void* value, + size_t size) { + file_descriptor_proto_.SetNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) +} +::std::string* FileDescriptorProtoResponse::mutable_file_descriptor_proto() { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) + return file_descriptor_proto_.MutableNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +::std::string* FileDescriptorProtoResponse::release_file_descriptor_proto() { + return file_descriptor_proto_.ReleaseNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +void FileDescriptorProtoResponse::set_allocated_file_descriptor_proto( + ::std::string* file_descriptor_proto) { + if (file_descriptor_proto != NULL) { + } else { + } + file_descriptor_proto_.SetAllocatedNoArena( + &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + file_descriptor_proto); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// =================================================================== + +#if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int ExtensionNumberResponse::kExtensionNumberFieldNumber; +#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 + +ExtensionNumberResponse::ExtensionNumberResponse() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ExtensionNumberResponse) +} + +void ExtensionNumberResponse::InitAsDefaultInstance() { + _is_default_instance_ = true; +} + +ExtensionNumberResponse::ExtensionNumberResponse( + const ExtensionNumberResponse& from) + : ::google::protobuf::Message(), _internal_metadata_(NULL) { + SharedCtor(); + MergeFrom(from); + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ExtensionNumberResponse) +} + +void ExtensionNumberResponse::SharedCtor() { + _is_default_instance_ = false; + _cached_size_ = 0; +} + +ExtensionNumberResponse::~ExtensionNumberResponse() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ExtensionNumberResponse) + SharedDtor(); +} + +void ExtensionNumberResponse::SharedDtor() { + if (this != default_instance_) { + } +} + +void ExtensionNumberResponse::SetCachedSize(int size) const { + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); +} +const ::google::protobuf::Descriptor* ExtensionNumberResponse::descriptor() { + protobuf_AssignDescriptorsOnce(); + return ExtensionNumberResponse_descriptor_; +} + +const ExtensionNumberResponse& ExtensionNumberResponse::default_instance() { + if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); + return *default_instance_; +} + +ExtensionNumberResponse* ExtensionNumberResponse::default_instance_ = NULL; + +ExtensionNumberResponse* ExtensionNumberResponse::New( + ::google::protobuf::Arena* arena) const { + ExtensionNumberResponse* n = new ExtensionNumberResponse; + if (arena != NULL) { + arena->Own(n); + } + return n; +} + +void ExtensionNumberResponse::Clear() { extension_number_.Clear(); } + +bool ExtensionNumberResponse::MergePartialFromCodedStream( + ::google::protobuf::io::CodedInputStream* input) { +#define DO_(EXPRESSION) \ + if (!(EXPRESSION)) goto failure + ::google::protobuf::uint32 tag; + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ExtensionNumberResponse) + for (;;) { + ::std::pair< ::google::protobuf::uint32, bool> p = + input->ReadTagWithCutoff(127); + tag = p.first; + if (!p.second) goto handle_unusual; + switch ( + ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated int32 extension_number = 1; + case 1: { + if (tag == 10) { + DO_(( + ::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::int32, + ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, this->mutable_extension_number()))); + } else if (tag == 8) { + DO_(( + ::google::protobuf::internal::WireFormatLite:: + ReadRepeatedPrimitiveNoInline< + ::google::protobuf::int32, + ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + 1, 10, input, this->mutable_extension_number()))); + } else { + goto handle_unusual; + } + if (input->ExpectAtEnd()) goto success; + break; + } + + default: { + handle_unusual: + if (tag == 0 || + ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == + ::google::protobuf::internal::WireFormatLite:: + WIRETYPE_END_GROUP) { + goto success; + } + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, + tag)); + break; + } + } + } +success: + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ExtensionNumberResponse) + return true; +failure: + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ExtensionNumberResponse) + return false; +#undef DO_ +} + +void ExtensionNumberResponse::SerializeWithCachedSizes( + ::google::protobuf::io::CodedOutputStream* output) const { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ExtensionNumberResponse) + // repeated int32 extension_number = 1; + if (this->extension_number_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag( + 1, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + output); + output->WriteVarint32(_extension_number_cached_byte_size_); + } + for (int i = 0; i < this->extension_number_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( + this->extension_number(i), output); + } + + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ExtensionNumberResponse) +} + +::google::protobuf::uint8* +ExtensionNumberResponse::SerializeWithCachedSizesToArray( + ::google::protobuf::uint8* target) const { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ExtensionNumberResponse) + // repeated int32 extension_number = 1; + if (this->extension_number_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 1, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _extension_number_cached_byte_size_, target); + } + for (int i = 0; i < this->extension_number_size(); i++) { + target = + ::google::protobuf::internal::WireFormatLite::WriteInt32NoTagToArray( + this->extension_number(i), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ExtensionNumberResponse) + return target; +} + +int ExtensionNumberResponse::ByteSize() const { + int total_size = 0; + + // repeated int32 extension_number = 1; + { + int data_size = 0; + for (int i = 0; i < this->extension_number_size(); i++) { + data_size += ::google::protobuf::internal::WireFormatLite::Int32Size( + this->extension_number(i)); + } + if (data_size > 0) { + total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( + data_size); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _extension_number_cached_byte_size_ = data_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; + } + + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _cached_size_ = total_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + return total_size; +} + +void ExtensionNumberResponse::MergeFrom( + const ::google::protobuf::Message& from) { + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + const ExtensionNumberResponse* source = + ::google::protobuf::internal::DynamicCastToGenerated< + const ExtensionNumberResponse>(&from); + if (source == NULL) { + ::google::protobuf::internal::ReflectionOps::Merge(from, this); + } else { + MergeFrom(*source); + } +} + +void ExtensionNumberResponse::MergeFrom(const ExtensionNumberResponse& from) { + if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); + extension_number_.MergeFrom(from.extension_number_); +} + +void ExtensionNumberResponse::CopyFrom( + const ::google::protobuf::Message& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +void ExtensionNumberResponse::CopyFrom(const ExtensionNumberResponse& from) { + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ExtensionNumberResponse::IsInitialized() const { return true; } + +void ExtensionNumberResponse::Swap(ExtensionNumberResponse* other) { + if (other == this) return; + InternalSwap(other); +} +void ExtensionNumberResponse::InternalSwap(ExtensionNumberResponse* other) { + extension_number_.UnsafeArenaSwap(&other->extension_number_); + _internal_metadata_.Swap(&other->_internal_metadata_); + std::swap(_cached_size_, other->_cached_size_); +} + +::google::protobuf::Metadata ExtensionNumberResponse::GetMetadata() const { + protobuf_AssignDescriptorsOnce(); + ::google::protobuf::Metadata metadata; + metadata.descriptor = ExtensionNumberResponse_descriptor_; + metadata.reflection = ExtensionNumberResponse_reflection_; + return metadata; +} + +#if PROTOBUF_INLINE_NOT_IN_HEADERS +// ExtensionNumberResponse + +// repeated int32 extension_number = 1; +int ExtensionNumberResponse::extension_number_size() const { + return extension_number_.size(); +} +void ExtensionNumberResponse::clear_extension_number() { + extension_number_.Clear(); +} +::google::protobuf::int32 ExtensionNumberResponse::extension_number( + int index) const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + return extension_number_.Get(index); +} +void ExtensionNumberResponse::set_extension_number( + int index, ::google::protobuf::int32 value) { + extension_number_.Set(index, value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) +} +void ExtensionNumberResponse::add_extension_number( + ::google::protobuf::int32 value) { + extension_number_.Add(value); + // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) +} +const ::google::protobuf::RepeatedField< ::google::protobuf::int32>& +ExtensionNumberResponse::extension_number() const { + // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + return extension_number_; +} +::google::protobuf::RepeatedField< ::google::protobuf::int32>* +ExtensionNumberResponse::mutable_extension_number() { + // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + return &extension_number_; +} + +#endif // PROTOBUF_INLINE_NOT_IN_HEADERS + +// @@protoc_insertion_point(namespace_scope) + +} // namespace v1alpha +} // namespace reflection +} // namespace grpc + +// @@protoc_insertion_point(global_scope) diff --git a/src/proto/grpc/reflection/v1alpha/reflection.proto b/src/proto/grpc/reflection/v1alpha/reflection.proto new file mode 100644 index 00000000000..4b13bd1e51c --- /dev/null +++ b/src/proto/grpc/reflection/v1alpha/reflection.proto @@ -0,0 +1,118 @@ +// Copyright 2016, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +// Service exported by server reflection + +syntax = "proto3"; + +package grpc.reflection.v1alpha; + +service ServerReflection { + // List the full names of registered services. + rpc ListService(EmptyRequest) returns (ListServiceResponse) { + } + + // Find a proto file by file name. + rpc GetFileByName(FileNameRequest) returns (FileDescriptorProtoResponse) { + } + + // Find the proto file that declares the given fully-qualified symbol name. + rpc GetFileContainingSymbol(SymbolRequest) + returns (FileDescriptorProtoResponse) { + } + + // Find the proto file which defines an extension extending the given message + // type with the given field number. + rpc GetFileContainingExtension(ExtensionRequest) + returns (FileDescriptorProtoResponse) { + } + + // Finds the tag numbers used by all known extensions of extendee_type, and + // appends them to ExtensionNumberResponse in an undefined order. + // This method is best-effort: it's not guaranteed that the reflection service + // will implement this method, and it's not guaranteed that this method will + // provide all extensions. Returns StatusCode::UNIMPLEMENTED if it's not + // implemented. + rpc GetAllExtensionNumbers(TypeRequest) returns (ExtensionNumberResponse) { + } +} + +// An empty message sent by the client when calling ListService method. +message EmptyRequest { +} + +// The filename sent by the client when calling GetFileByName method. +message FileNameRequest { + // Name of the proto file. + string filename = 1; +} + +// The symbol name sent by the client when calling GetFileContainingSymbol +// method. +message SymbolRequest { + // Fully-qualified symbol name (e.g. .[.] or + // .). + string symbol = 1; +} + +// The type name and extension number sent by the client when calling +// GetFileContainingExtension method. +message ExtensionRequest { + // Fully-qualified type name. The format should be . + string containing_type = 1; + int32 extension_number = 2; +} + +// The type name sent by the client when calling GetAllExtensionNumbers method. +message TypeRequest { + // Fully-qualified type name. The format should be . + string type = 1; +} + +// A list of service names sent by the server answering ListService method. +message ListServiceResponse { + // Full names of registered services, including package names. The format + // is . + repeated string services = 1; +} + +// A serialized FileDescriptorProto sent by the server answering +// GetFileByName, GetFileContainingSymbol, GetFileContainingExtension methods. +message FileDescriptorProtoResponse { + // Serialized FileDescriptorProto message. Some languages have limited support + // for working with descriptors. The can only obtain an opaque binary blob + // that contains serialized FileDescriptorProto message. + bytes file_descriptor_proto = 1; +} + +// A list of extension numbers sent by the server answering +// GetAllExtensionNumbers method. +message ExtensionNumberResponse { + repeated int32 extension_number = 1; +} diff --git a/templates/Makefile.template b/templates/Makefile.template index e84ceebf221..1d8183edb16 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -100,6 +100,7 @@ OBJDIR = $(BUILDDIR_ABSOLUTE)/objs LIBDIR = $(BUILDDIR_ABSOLUTE)/libs GENDIR = $(BUILDDIR_ABSOLUTE)/gens + EXTDIR = $(BUILDDIR_ABSOLUTE)/extensions # Configurations @@ -237,7 +238,7 @@ LDFLAGS += -fPIC endif - INCLUDES = . include $(GENDIR) + INCLUDES = . include $(GENDIR) $(EXTDIR) $(EXTDIR)/include LDFLAGS += -Llibs/$(CONFIG) ifeq ($(SYSTEM),Darwin) @@ -1278,8 +1279,8 @@ install-headers_cxx: $(E) "[INSTALL] Installing public C++ headers" - $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) -d $(prefix)/$(dir $(h)) && ) exit 0 || exit 1 - $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) $(h) $(prefix)/$(h) && ) exit 0 || exit 1 + $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) -d $(prefix)/$(patsubst extensions/%,%,$(dir $(h))) && ) exit 0 || exit 1 + $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) $(h) $(prefix)/$(patsubst extensions/%,%,$(h)) && ) exit 0 || exit 1 install-static: install-static_c install-static_cxx diff --git a/test/cpp/util/proto_reflection_descriptor_database.cc b/test/cpp/util/proto_reflection_descriptor_database.cc new file mode 100644 index 00000000000..c2ed93c12b6 --- /dev/null +++ b/test/cpp/util/proto_reflection_descriptor_database.cc @@ -0,0 +1,238 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "proto_reflection_descriptor_database.h" + +#include + +#include + +namespace grpc { + +ProtoReflectionDescriptorDatabase::ProtoReflectionDescriptorDatabase( + std::unique_ptr stub) + : stub_(std::move(stub)) {} + +ProtoReflectionDescriptorDatabase::ProtoReflectionDescriptorDatabase( + std::shared_ptr channel) + : stub_(reflection::v1alpha::ServerReflection::NewStub(channel)) {} + +ProtoReflectionDescriptorDatabase::~ProtoReflectionDescriptorDatabase() {} + +bool ProtoReflectionDescriptorDatabase::FindFileByName( + const string& filename, google::protobuf::FileDescriptorProto* output) { + if (cached_db_.FindFileByName(filename, output)) { + return true; + } + + if (known_files_.find(filename) != known_files_.end()) { + return false; + } + + ClientContext ctx; + reflection::v1alpha::FileNameRequest request; + request.set_filename(filename); + reflection::v1alpha::FileDescriptorProtoResponse response; + + Status status = stub_->GetFileByName(&ctx, request, &response); + if (status.ok()) { + // const google::protobuf::FileDescriptorProto* file_proto = + // response.mutable_file_descriptor_proto(); + const google::protobuf::FileDescriptorProto file_proto = + ParseFileDescriptorProtoResponse(&response); + known_files_.insert(file_proto.name()); + cached_db_.Add(file_proto); + } else if (status.error_code() == StatusCode::NOT_FOUND) { + gpr_log(GPR_INFO, "NOT_FOUND from server for FindFileByName(%s)", + filename.c_str()); + } else { + gpr_log(GPR_INFO, + "Error on FindFileByName(%s)\n\tError code: %d\n" + "\tError Message: %s", + filename.c_str(), status.error_code(), + status.error_message().c_str()); + } + + return cached_db_.FindFileByName(filename, output); +} + +bool ProtoReflectionDescriptorDatabase::FindFileContainingSymbol( + const string& symbol_name, google::protobuf::FileDescriptorProto* output) { + if (cached_db_.FindFileContainingSymbol(symbol_name, output)) { + return true; + } + + if (missing_symbols_.find(symbol_name) != missing_symbols_.end()) { + return false; + } + + ClientContext ctx; + reflection::v1alpha::SymbolRequest request; + request.set_symbol(symbol_name); + reflection::v1alpha::FileDescriptorProtoResponse response; + + Status status = stub_->GetFileContainingSymbol(&ctx, request, &response); + if (status.ok()) { + const google::protobuf::FileDescriptorProto file_proto = + ParseFileDescriptorProtoResponse(&response); + if (known_files_.find(file_proto.name()) == known_files_.end()) { + known_files_.insert(file_proto.name()); + cached_db_.Add(file_proto); + } + } else if (status.error_code() == StatusCode::NOT_FOUND) { + missing_symbols_.insert(symbol_name); + gpr_log(GPR_INFO, "NOT_FOUND from server for FindFileContainingSymbol(%s)", + symbol_name.c_str()); + } else { + gpr_log(GPR_INFO, + "Error on FindFileContainingSymbol(%s)\n" + "\tError code: %d\n\tError Message: %s", + symbol_name.c_str(), status.error_code(), + status.error_message().c_str()); + } + + return cached_db_.FindFileContainingSymbol(symbol_name, output); +} + +bool ProtoReflectionDescriptorDatabase::FindFileContainingExtension( + const string& containing_type, int field_number, + google::protobuf::FileDescriptorProto* output) { + if (cached_db_.FindFileContainingExtension(containing_type, field_number, + output)) { + return true; + } + + if (missing_extensions_.find(containing_type) != missing_extensions_.end() && + missing_extensions_[containing_type].find(field_number) != + missing_extensions_[containing_type].end()) { + gpr_log(GPR_INFO, "nested map."); + return false; + } + + ClientContext ctx; + reflection::v1alpha::ExtensionRequest request; + request.set_containing_type(containing_type); + request.set_extension_number(field_number); + reflection::v1alpha::FileDescriptorProtoResponse response; + + Status status = stub_->GetFileContainingExtension(&ctx, request, &response); + if (status.ok()) { + const google::protobuf::FileDescriptorProto file_proto = + ParseFileDescriptorProtoResponse(&response); + if (known_files_.find(file_proto.name()) == known_files_.end()) { + known_files_.insert(file_proto.name()); + cached_db_.Add(file_proto); + } + } else if (status.error_code() == StatusCode::NOT_FOUND) { + if (missing_extensions_.find(containing_type) == + missing_extensions_.end()) { + missing_extensions_[containing_type] = {}; + } + missing_extensions_[containing_type].insert(field_number); + gpr_log(GPR_INFO, + "NOT_FOUND from server for FindFileContainingExtension(%s, %d)", + containing_type.c_str(), field_number); + } else { + gpr_log(GPR_INFO, + "Error on FindFileContainingExtension(%s, %d)\n" + "\tError code: %d\n\tError Message: %s", + containing_type.c_str(), field_number, status.error_code(), + status.error_message().c_str()); + } + + return cached_db_.FindFileContainingExtension(containing_type, field_number, + output); +} + +bool ProtoReflectionDescriptorDatabase::FindAllExtensionNumbers( + const string& extendee_type, std::vector* output) { + if (cached_extension_numbers_.find(extendee_type) != + cached_extension_numbers_.end()) { + *output = cached_extension_numbers_[extendee_type]; + return true; + } + + ClientContext ctx; + reflection::v1alpha::TypeRequest request; + request.set_type(extendee_type); + reflection::v1alpha::ExtensionNumberResponse response; + + Status status = stub_->GetAllExtensionNumbers(&ctx, request, &response); + if (status.ok()) { + auto number = response.extension_number(); + *output = std::vector(number.begin(), number.end()); + cached_extension_numbers_[extendee_type] = *output; + return true; + } else if (status.error_code() == StatusCode::NOT_FOUND) { + gpr_log(GPR_INFO, "NOT_FOUND from server for FindAllExtensionNumbers(%s)", + extendee_type.c_str()); + } else { + gpr_log(GPR_INFO, + "Error on FindAllExtensionNumbersExtension(%s)\n" + "\tError code: %d\n\tError Message: %s", + extendee_type.c_str(), status.error_code(), + status.error_message().c_str()); + } + return false; +} + +bool ProtoReflectionDescriptorDatabase::GetServices( + std::vector* output) { + ClientContext ctx; + reflection::v1alpha::EmptyRequest request; + reflection::v1alpha::ListServiceResponse response; + + Status status = stub_->ListService(&ctx, request, &response); + if (status.ok()) { + for (int i = 0; i < response.services_size(); ++i) { + (*output).push_back(response.services(i)); + } + return true; + } else { + gpr_log(GPR_INFO, + "Error on GetServices()\n\tError code: %d\n" + "\tError Message: %s", + status.error_code(), status.error_message().c_str()); + } + return false; +} + +const google::protobuf::FileDescriptorProto +ProtoReflectionDescriptorDatabase::ParseFileDescriptorProtoResponse( + reflection::v1alpha::FileDescriptorProtoResponse* response) { + google::protobuf::FileDescriptorProto file_desc_proto; + file_desc_proto.ParseFromString(response->file_descriptor_proto()); + return file_desc_proto; +} + +} // namespace grpc diff --git a/test/cpp/util/proto_reflection_descriptor_database.h b/test/cpp/util/proto_reflection_descriptor_database.h new file mode 100644 index 00000000000..bf94654c3de --- /dev/null +++ b/test/cpp/util/proto_reflection_descriptor_database.h @@ -0,0 +1,95 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include + +// #include "reflection.grpc.pb.h" + +namespace grpc { + +class ProtoReflectionDescriptorDatabase + : public google::protobuf::DescriptorDatabase { + public: + explicit ProtoReflectionDescriptorDatabase( + std::unique_ptr stub); + + explicit ProtoReflectionDescriptorDatabase( + std::shared_ptr channel); + + virtual ~ProtoReflectionDescriptorDatabase(); + + // DescriptorDatabase methods + bool FindFileByName(const string& filename, + google::protobuf::FileDescriptorProto* output) + GRPC_OVERRIDE; + + bool FindFileContainingSymbol(const string& symbol_name, + google::protobuf::FileDescriptorProto* output) + GRPC_OVERRIDE; + + bool FindFileContainingExtension( + const string& containing_type, int field_number, + google::protobuf::FileDescriptorProto* output) GRPC_OVERRIDE; + + bool FindAllExtensionNumbers(const string& extendee_type, + std::vector* output) GRPC_OVERRIDE; + + bool GetServices(std::vector* output); + + grpc::reflection::v1alpha::ServerReflection::Stub* stub() { + return stub_.get(); + } + + private: + const google::protobuf::FileDescriptorProto ParseFileDescriptorProtoResponse( + reflection::v1alpha::FileDescriptorProtoResponse* response); + + std::unique_ptr stub_; + std::unordered_set known_files_; + std::unordered_set missing_symbols_; + std::unordered_map> missing_extensions_; + std::unordered_map> cached_extension_numbers_; + + google::protobuf::SimpleDescriptorDatabase cached_db_; +}; + +} // namespace grpc diff --git a/test/cpp/util/reflection_debug/Makefile b/test/cpp/util/reflection_debug/Makefile new file mode 100644 index 00000000000..9eea5ae7347 --- /dev/null +++ b/test/cpp/util/reflection_debug/Makefile @@ -0,0 +1,50 @@ + +# Copyright 2015-2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +CXX = g++ +INCLUDES += -I. -I.. +CPPFLAGS += -I/usr/local/include -pthread +CXXFLAGS += -std=c++11 ${INCLUDES} +LDFLAGS += -L/usr/local/lib -lgrpc++_unsecure -lgrpc -lgrpc++_reflection -lprotobuf -lpthread -ldl +VPATH = .. + +# PROTOS_PATH = ../../../src/cpp/plugin/reflection + +vpath %.proto $(PROTOS_PATH) + +all: reflection_client + +reflection_client: proto_reflection_descriptor_database.o reflection_client.o + $(CXX) $(INCLUDES) $^ $(LDFLAGS) -o $@ + + +clean: + rm -f *.o reflection_client diff --git a/test/cpp/util/reflection_debug/reflection_client.cc b/test/cpp/util/reflection_debug/reflection_client.cc new file mode 100644 index 00000000000..fb406275148 --- /dev/null +++ b/test/cpp/util/reflection_debug/reflection_client.cc @@ -0,0 +1,216 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include + +#include +#include +#include + +#include "proto_reflection_descriptor_database.h" +// #include "reflection.grpc.pb.h" + +using grpc::Channel; +using grpc::ClientContext; +using grpc::Status; +using grpc::ProtoReflectionDescriptorDatabase; +using grpc::reflection::v1alpha::ServerReflection; +using grpc::reflection::v1alpha::EmptyRequest; +using grpc::reflection::v1alpha::ListServiceResponse; +using google::protobuf::FileDescriptorProto; +using google::protobuf::DescriptorPool; +using google::protobuf::ServiceDescriptor; +using google::protobuf::MethodDescriptor; +using google::protobuf::Descriptor; +using google::protobuf::FieldDescriptor; + +class ReflectionClient { + public: + ReflectionClient(std::shared_ptr channel) + : db_(new ProtoReflectionDescriptorDatabase( + ServerReflection::NewStub(channel))), + desc_pool_(new DescriptorPool(db_.get())) {} + + void PrintInfo() { + EmptyRequest request; + ListServiceResponse response; + ClientContext context; + Status status = db_->stub()->ListService(&context, request, &response); + if (status.ok()) { + std::string padding = ""; + std::cout << "Service amount:" << response.services_size() << std::endl; + for (int i = 0; i < response.services_size(); ++i) { + if (i != response.services_size() - 1) { + std::cout << padding << "│ " << std::endl; + std::cout << padding << "├─" << response.services(i) << std::endl; + PrintService(desc_pool_->FindServiceByName(response.services(i)), + padding + "│ "); + } else { + std::cout << padding << "│ " << std::endl; + std::cout << padding << "└─" << response.services(i) << std::endl; + PrintService(desc_pool_->FindServiceByName(response.services(i)), + padding + " "); + } + } + } else { + std::cout << status.error_message(); + } + } + + void PrintService(const ServiceDescriptor* service_desc, + const std::string padding) { + if (service_desc != nullptr) { + std::cout << padding << "│ Method amount:" << service_desc->method_count() + << std::endl; + for (int i = 0; i < service_desc->method_count(); ++i) { + if (i != service_desc->method_count() - 1) { + std::cout << padding << "├─" << service_desc->method(i)->name() + << std::endl; + PrintMethod(service_desc->method(i), padding + "│ "); + } else { + std::cout << padding << "└─" << service_desc->method(i)->name() + << std::endl; + PrintMethod(service_desc->method(i), padding + " "); + } + } + } + } + + void PrintMethod(const MethodDescriptor* method_desc, + const std::string padding) { + if (method_desc != nullptr) { + std::cout << padding + << "├─input type: " << method_desc->input_type()->name() + << std::endl; + PrintMessageType(method_desc->input_type(), padding + "│ "); + std::cout << padding + << "└─output type: " << method_desc->output_type()->name() + << std::endl; + PrintMessageType(method_desc->output_type(), padding + " "); + } + } + + void PrintMessageType(const Descriptor* type_desc, + const std::string padding) { + if (type_desc != nullptr) { + if (type_desc->field_count() > 0) { + std::cout << padding << "│ Field amount:" << type_desc->field_count() + << std::endl; + } + for (int i = 0; i < type_desc->field_count(); ++i) { + if (i != type_desc->field_count() - 1) { + const FieldDescriptor* field = type_desc->field(i); + std::cout << padding << "├─ " << std::left << std::setw(15) + << kLabelToName[field->label()] << std::setw(30) + << " name: " + field->name() << std::setw(50) + << " type: " + + (field->type() == FieldDescriptor::Type::TYPE_MESSAGE + ? field->message_type()->name() + : field->type_name()) + << std::endl; + } else { + const FieldDescriptor* field = type_desc->field(i); + std::cout << padding << "└─ " << std::left << std::setw(15) + << kLabelToName[field->label()] << std::setw(30) + << " name: " + field->name() << std::setw(50) + << " type: " + + (field->type() == FieldDescriptor::Type::TYPE_MESSAGE + ? field->message_type()->name() + : field->type_name()) + << std::endl; + } + } + } + } + + void Test() { + { + FileDescriptorProto output; + bool found = db_->FindFileByName("helloworld.proto", &output); + if (found) std::cout << output.name() << std::endl; + } + { + FileDescriptorProto output; + bool found = + db_->FindFileContainingSymbol("helloworld.Greeter.SayHello", &output); + if (found) std::cout << output.name() << std::endl; + } + { + FileDescriptorProto output; + bool found = db_->FindFileContainingExtension( + "helloworld.Greeter.HelloRequest", 1, &output); + found = db_->FindFileContainingExtension( + "helloworld.Greeter.HelloRequest", 1, &output); + if (found) std::cout << output.name() << std::endl; + } + DescriptorPool pool(db_.get()); + std::cout << pool.FindServiceByName("helloworld.Greeter")->name() + << std::endl; + } + + private: + const char* const kLabelToName[FieldDescriptor::Label::MAX_LABEL + 1] = { + "ERROR", // 0 is reserved for errors + + "optional", // LABEL_OPTIONAL + "required", // LABEL_REQUIRED + "repeated", // LABEL_REPEATED + }; + + std::unique_ptr db_; + std::unique_ptr desc_pool_; +}; + +int main(int argc, char** argv) { + int port = 50051; + if (argc == 2) { + try { + port = std::stoi(argv[1]); + if (port > 65535 || port < 1024) { + throw std::out_of_range("Port number out of range."); + } + } catch (std::invalid_argument&) { + } catch (std::out_of_range&) { + } + } + + ReflectionClient reflection_client(grpc::CreateChannel( + "localhost:" + std::to_string(port), grpc::InsecureChannelCredentials())); + + reflection_client.PrintInfo(); + + return 0; +} diff --git a/tools/codegen/extensions/gen_reflection_proto.sh b/tools/codegen/extensions/gen_reflection_proto.sh new file mode 100755 index 00000000000..f0bb6e5ccc6 --- /dev/null +++ b/tools/codegen/extensions/gen_reflection_proto.sh @@ -0,0 +1,33 @@ +#!/bin/bash +PROTO_DIR="src/proto/grpc/reflection/v1alpha" +PROTO_FILE="reflection" +HEADER_DIR="extensions/include/grpc++/impl" +SRC_DIR="extensions/reflection" +INCLUDE_DIR="grpc++/impl" +TMP_DIR="tmp" +GRPC_PLUGIN="bins/opt/grpc_cpp_plugin" +PROTOC=protoc + +set -e + +TMP_DIR=${TMP_DIR}_${PROTO_FILE} + +cd $(dirname $0)/../../.. + +[ ! -d $HEADER_DIR ] && mkdir -p $HEADER_DIR || : +[ ! -d $SRC_DIR ] && mkdir -p $SRC_DIR || : +[ ! -d $TMP_DIR ] && mkdir -p $TMP_DIR || : + +$PROTOC -I$PROTO_DIR --cpp_out=$TMP_DIR ${PROTO_DIR}/${PROTO_FILE}.proto +$PROTOC -I$PROTO_DIR --grpc_out=$TMP_DIR --plugin=protoc-gen-grpc=${GRPC_PLUGIN} ${PROTO_DIR}/${PROTO_FILE}.proto + +sed -i "s/\"${PROTO_FILE}.pb.h\"/<${INCLUDE_DIR/\//\\\/}\/${PROTO_FILE}.pb.h>/g" ${TMP_DIR}/${PROTO_FILE}.pb.cc +sed -i "s/\"${PROTO_FILE}.pb.h\"/<${INCLUDE_DIR/\//\\\/}\/${PROTO_FILE}.pb.h>/g" ${TMP_DIR}/${PROTO_FILE}.grpc.pb.cc +sed -i "s/\"${PROTO_FILE}.grpc.pb.h\"/<${INCLUDE_DIR/\//\\\/}\/${PROTO_FILE}.grpc.pb.h>/g" ${TMP_DIR}/${PROTO_FILE}.grpc.pb.cc +sed -i "s/\"${PROTO_FILE}.pb.h\"/<${INCLUDE_DIR/\//\\\/}\/${PROTO_FILE}.pb.h>/g" ${TMP_DIR}/${PROTO_FILE}.grpc.pb.h + +/bin/mv ${TMP_DIR}/${PROTO_FILE}.pb.h ${HEADER_DIR} +/bin/mv ${TMP_DIR}/${PROTO_FILE}.grpc.pb.h ${HEADER_DIR} +/bin/mv ${TMP_DIR}/${PROTO_FILE}.pb.cc ${SRC_DIR} +/bin/mv ${TMP_DIR}/${PROTO_FILE}.grpc.pb.cc ${SRC_DIR} +/bin/rm -r $TMP_DIR diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index f546f3b9950..e87f9099a59 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -2551,6 +2551,26 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "grpc", + "grpc++", + "grpc++_reflection" + ], + "headers": [ + "test/cpp/util/proto_reflection_descriptor_database.h" + ], + "language": "c++", + "name": "reflection_debug_test", + "src": [ + "test/cpp/util/proto_reflection_descriptor_database.cc", + "test/cpp/util/proto_reflection_descriptor_database.h", + "test/cpp/util/reflection_debug/reflection_client.cc" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", @@ -4311,6 +4331,29 @@ "third_party": false, "type": "lib" }, + { + "deps": [], + "headers": [ + "extensions/include/grpc++/impl/proto_server_reflection_plugin.h", + "extensions/include/grpc++/impl/reflection.grpc.pb.h", + "extensions/include/grpc++/impl/reflection.pb.h", + "extensions/reflection/proto_server_reflection.h" + ], + "language": "c++", + "name": "grpc++_reflection", + "src": [ + "extensions/include/grpc++/impl/proto_server_reflection_plugin.h", + "extensions/include/grpc++/impl/reflection.grpc.pb.h", + "extensions/include/grpc++/impl/reflection.pb.h", + "extensions/reflection/proto_server_reflection.cc", + "extensions/reflection/proto_server_reflection.h", + "extensions/reflection/proto_server_reflection_plugin.cc", + "extensions/reflection/reflection.grpc.pb.cc", + "extensions/reflection/reflection.pb.cc" + ], + "third_party": false, + "type": "lib" + }, { "deps": [], "headers": [ diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index cf1154426f4..e24542d5fe7 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -2408,6 +2408,27 @@ "posix" ] }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "gtest": false, + "language": "c++", + "name": "reflection_debug_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln index 029c9ed7c1d..dcb5e212fa0 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -93,6 +93,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++", "vcxproj\.\grpc++\ {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_reflection", "vcxproj\.\grpc++_reflection\grpc++_reflection.vcxproj", "{5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}" + ProjectSection(myProperties) = preProject + lib = "True" + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_unsecure", "vcxproj\.\grpc++_unsecure\grpc++_unsecure.vcxproj", "{6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}" ProjectSection(myProperties) = preProject lib = "True" @@ -343,6 +348,22 @@ Global {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release-DLL|Win32.Build.0 = Release-DLL|Win32 {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release-DLL|x64.ActiveCfg = Release-DLL|x64 {C187A093-A0FE-489D-A40A-6E33DE0F9FEB}.Release-DLL|x64.Build.0 = Release-DLL|x64 + {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Debug|Win32.ActiveCfg = Debug|Win32 + {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Debug|x64.ActiveCfg = Debug|x64 + {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Release|Win32.ActiveCfg = Release|Win32 + {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Release|x64.ActiveCfg = Release|x64 + {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Debug|Win32.Build.0 = Debug|Win32 + {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Debug|x64.Build.0 = Debug|x64 + {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Release|Win32.Build.0 = Release|Win32 + {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Release|x64.Build.0 = Release|x64 + {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Debug-DLL|x64.Build.0 = Debug|x64 + {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Release-DLL|Win32.Build.0 = Release|Win32 + {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Release-DLL|x64.ActiveCfg = Release|x64 + {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}.Release-DLL|x64.Build.0 = Release|x64 {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Debug|Win32.ActiveCfg = Debug|Win32 {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Debug|x64.ActiveCfg = Debug|x64 {6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj new file mode 100644 index 00000000000..82b2b85f9eb --- /dev/null +++ b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj @@ -0,0 +1,176 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + StaticLibrary + true + Unicode + + + StaticLibrary + false + true + Unicode + + + + + + + + + + + + grpc++_reflection + + + grpc++_reflection + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Windows + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Windows + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Windows + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Windows + true + false + true + true + + + + + + + + + + + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + diff --git a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters new file mode 100644 index 00000000000..a5457bed008 --- /dev/null +++ b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters @@ -0,0 +1,52 @@ + + + + + extensions\reflection + + + extensions\reflection + + + extensions\reflection + + + extensions\reflection + + + + + extensions\include\grpc++\impl + + + extensions\include\grpc++\impl + + + extensions\include\grpc++\impl + + + + + extensions\reflection + + + + + + {8fd45ce8-8f02-367f-e3f7-4c0ae0e36566} + + + {1a18dfcc-bedf-226e-6929-377aba53249b} + + + {83bf0cce-01da-a93c-0ff3-a1abca63ec5f} + + + {d34e8821-f67b-a793-3419-e2781ab9b3ee} + + + {11feb184-a1d9-5485-26f0-538ddb50deff} + + + + diff --git a/vsprojects/vcxproj/test/reflection_debug_test/reflection_debug_test.vcxproj b/vsprojects/vcxproj/test/reflection_debug_test/reflection_debug_test.vcxproj new file mode 100644 index 00000000000..757e1cd5358 --- /dev/null +++ b/vsprojects/vcxproj/test/reflection_debug_test/reflection_debug_test.vcxproj @@ -0,0 +1,206 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {037B9EA1-03CC-6A3B-4E4B-DB17C3D59CF8} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + + + reflection_debug_test + static + Debug + static + Debug + + + reflection_debug_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + + + + + + {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB} + + + {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/reflection_debug_test/reflection_debug_test.vcxproj.filters b/vsprojects/vcxproj/test/reflection_debug_test/reflection_debug_test.vcxproj.filters new file mode 100644 index 00000000000..6258acedcc0 --- /dev/null +++ b/vsprojects/vcxproj/test/reflection_debug_test/reflection_debug_test.vcxproj.filters @@ -0,0 +1,32 @@ + + + + + test\cpp\util + + + test\cpp\util\reflection_debug + + + + + test\cpp\util + + + + + + {fdf7e642-420d-9e18-7a3c-19dca964f218} + + + {562b3927-e256-190d-ab72-6b4b04ffb8b2} + + + {8ed08be4-a27c-d51c-d587-a02cf3dc5abc} + + + {b84b1385-e0b2-239b-bac2-81a16bc90249} + + + + From 4df964780fe57b8cc121cf382d25ab7cf72c4c17 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Wed, 4 May 2016 17:39:28 -0700 Subject: [PATCH 0279/1894] Reworked python health checking and added tests --- .../grpcio/tests/health_check/__init__.py | 28 ++++ .../health_check/_health_servicer_test.py | 75 ++++++++++ src/python/grpcio/tests/tests.json | 5 +- src/python/grpcio_health_checking/.gitignore | 5 + .../grpc/health/v1/health.proto | 49 ------- .../grpc/health/v1/health.py | 129 ------------------ .../__init__.py | 0 .../health/__init__.py | 0 .../health/v1/__init__.py | 0 .../grpc_health_checking/health/v1/health.py | 66 +++++++++ .../{commands.py => health_commands.py} | 30 ++++ src/python/grpcio_health_checking/setup.py | 12 +- tools/run_tests/build_python.sh | 4 + tools/run_tests/run_tests.py | 21 ++- 14 files changed, 227 insertions(+), 197 deletions(-) create mode 100644 src/python/grpcio/tests/health_check/__init__.py create mode 100644 src/python/grpcio/tests/health_check/_health_servicer_test.py create mode 100644 src/python/grpcio_health_checking/.gitignore delete mode 100644 src/python/grpcio_health_checking/grpc/health/v1/health.proto delete mode 100644 src/python/grpcio_health_checking/grpc/health/v1/health.py rename src/python/grpcio_health_checking/{grpc => grpc_health_checking}/__init__.py (100%) rename src/python/grpcio_health_checking/{grpc => grpc_health_checking}/health/__init__.py (100%) rename src/python/grpcio_health_checking/{grpc => grpc_health_checking}/health/v1/__init__.py (100%) create mode 100644 src/python/grpcio_health_checking/grpc_health_checking/health/v1/health.py rename src/python/grpcio_health_checking/{commands.py => health_commands.py} (80%) diff --git a/src/python/grpcio/tests/health_check/__init__.py b/src/python/grpcio/tests/health_check/__init__.py new file mode 100644 index 00000000000..100a624dc9c --- /dev/null +++ b/src/python/grpcio/tests/health_check/__init__.py @@ -0,0 +1,28 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/python/grpcio/tests/health_check/_health_servicer_test.py b/src/python/grpcio/tests/health_check/_health_servicer_test.py new file mode 100644 index 00000000000..625cb7fc590 --- /dev/null +++ b/src/python/grpcio/tests/health_check/_health_servicer_test.py @@ -0,0 +1,75 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""Tests of grpc_health_checking.health.v1.health.""" + +import unittest + +from grpc_health_checking.health.v1 import health +from grpc_health_checking.health.v1 import health_pb2 + + +class HealthServicerTest(unittest.TestCase): + + def setUp(self): + self.servicer = health.HealthServicer() + self.servicer.set('', health_pb2.HealthCheckResponse.SERVING) + self.servicer.set('grpc.test.TestServiceServing', + health_pb2.HealthCheckResponse.SERVING) + self.servicer.set('grpc.test.TestServiceUnknown', + health_pb2.HealthCheckResponse.UNKNOWN) + self.servicer.set('grpc.test.TestServiceNotServing', + health_pb2.HealthCheckResponse.NOT_SERVING) + + def test_empty_service(self): + request = health_pb2.HealthCheckRequest() + resp = self.servicer.Check(request, None) + self.assertEqual(resp.status, health_pb2.HealthCheckResponse.SERVING) + + def test_serving_service(self): + request = health_pb2.HealthCheckRequest( + service='grpc.test.TestServiceServing') + resp = self.servicer.Check(request, None) + self.assertEqual(resp.status, health_pb2.HealthCheckResponse.SERVING) + + def test_unknown_serivce(self): + request = health_pb2.HealthCheckRequest( + service='grpc.test.TestServiceUnknown') + resp = self.servicer.Check(request, None) + self.assertEqual(resp.status, health_pb2.HealthCheckResponse.UNKNOWN) + + def test_not_serving_service(self): + request = health_pb2.HealthCheckRequest( + service='grpc.test.TestServiceNotServing') + resp = self.servicer.Check(request, None) + self.assertEqual(resp.status, health_pb2.HealthCheckResponse.NOT_SERVING) + + +if __name__ == '__main__': + unittest.main(verbosity=2) diff --git a/src/python/grpcio/tests/tests.json b/src/python/grpcio/tests/tests.json index 84870aaa5cb..691062f25ac 100644 --- a/src/python/grpcio/tests/tests.json +++ b/src/python/grpcio/tests/tests.json @@ -28,7 +28,8 @@ "_face_interface_test.GenericInvokerBlockingInvocationInlineServiceTest", "_face_interface_test.GenericInvokerFutureInvocationAsynchronousEventServiceTest", "_face_interface_test.MultiCallableInvokerBlockingInvocationInlineServiceTest", - "_face_interface_test.MultiCallableInvokerFutureInvocationAsynchronousEventServiceTest", + "_face_interface_test.MultiCallableInvokerFutureInvocationAsynchronousEventServiceTest", + "_health_servicer_test.HealthServicerTest", "_implementations_test.ChannelCredentialsTest", "_insecure_interop_test.InsecureInteropTest", "_intermediary_low_test.CancellationTest", @@ -50,4 +51,4 @@ "cygrpc_test.InsecureServerInsecureClient", "cygrpc_test.SecureServerSecureClient", "cygrpc_test.TypeSmokeTest" -] \ No newline at end of file +] diff --git a/src/python/grpcio_health_checking/.gitignore b/src/python/grpcio_health_checking/.gitignore new file mode 100644 index 00000000000..85af4668866 --- /dev/null +++ b/src/python/grpcio_health_checking/.gitignore @@ -0,0 +1,5 @@ +*.proto +*_pb2.py +build/ +grpcio_health_checking.egg-info/ +dist/ diff --git a/src/python/grpcio_health_checking/grpc/health/v1/health.proto b/src/python/grpcio_health_checking/grpc/health/v1/health.proto deleted file mode 100644 index b0bac54be98..00000000000 --- a/src/python/grpcio_health_checking/grpc/health/v1/health.proto +++ /dev/null @@ -1,49 +0,0 @@ -// Copyright 2015, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package grpc.health.v1; - -message HealthCheckRequest { - string service = 1; -} - -message HealthCheckResponse { - enum ServingStatus { - UNKNOWN = 0; - SERVING = 1; - NOT_SERVING = 2; - } - ServingStatus status = 1; -} - -service Health { - rpc Check(HealthCheckRequest) returns (HealthCheckResponse); -} diff --git a/src/python/grpcio_health_checking/grpc/health/v1/health.py b/src/python/grpcio_health_checking/grpc/health/v1/health.py deleted file mode 100644 index 4b5af15aa68..00000000000 --- a/src/python/grpcio_health_checking/grpc/health/v1/health.py +++ /dev/null @@ -1,129 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Reference implementation for health checking in gRPC Python.""" - -import abc -import enum -import threading - -from grpc.health.v1 import health_pb2 - - -@enum.unique -class HealthStatus(enum.Enum): - """Statuses for a service mirroring the reference health.proto's values.""" - UNKNOWN = health_pb2.HealthCheckResponse.UNKNOWN - SERVING = health_pb2.HealthCheckResponse.SERVING - NOT_SERVING = health_pb2.HealthCheckResponse.NOT_SERVING - - -class _HealthServicer(health_pb2.EarlyAdopterHealthServicer): - """Servicer handling RPCs for service statuses.""" - - def __init__(self): - self._server_status_lock = threading.Lock() - self._server_status = {} - - def Check(self, request, context): - with self._server_status_lock: - if request.service not in self._server_status: - # TODO(atash): once the Python API has a way of setting the server - # status, bring us into conformance with the health check spec by - # returning the NOT_FOUND status here. - raise NotImplementedError() - else: - return health_pb2.HealthCheckResponse( - status=self._server_status[request.service].value) - - def set(service, status): - if not isinstance(status, HealthStatus): - raise TypeError('expected grpc.health.v1.health.HealthStatus ' - 'for argument `status` but got {}'.format(status)) - with self._server_status_lock: - self._server_status[service] = status - - -class HealthServer(health_pb2.EarlyAdopterHealthServer): - """Interface for the reference gRPC Python health server.""" - __metaclass__ = abc.ABCMeta - - @abc.abstractmethod - def start(self): - raise NotImplementedError() - - @abc.abstractmethod - def stop(self): - raise NotImplementedError() - - @abc.abstractmethod - def set(self, service, status): - """Set the status of the given service. - - Args: - service (str): service name of the service to set the reported status of - status (HealthStatus): status to set for the specified service - """ - raise NotImplementedError() - - -class _HealthServerImplementation(HealthServer): - """Implementation for the reference gRPC Python health server.""" - - def __init__(self, server, servicer): - self._server = server - self._servicer = servicer - - def start(self): - self._server.start() - - def stop(self): - self._server.stop() - - def set(self, service, status): - self._servicer.set(service, status) - - -def create_Health_server(port, private_key=None, certificate_chain=None): - """Get a HealthServer instance. - - Args: - port (int): port number passed through to health_pb2 server creation - routine. - private_key (str): to-be-created server's desired private key - certificate_chain (str): to-be-created server's desired certificate chain - - Returns: - An instance of HealthServer (conforming thus to - EarlyAdopterHealthServer and providing a method to set server status).""" - servicer = _HealthServicer() - server = health_pb2.early_adopter_create_Health_server( - servicer, port=port, private_key=private_key, - certificate_chain=certificate_chain) - return _HealthServerImplementation(server, servicer) diff --git a/src/python/grpcio_health_checking/grpc/__init__.py b/src/python/grpcio_health_checking/grpc_health_checking/__init__.py similarity index 100% rename from src/python/grpcio_health_checking/grpc/__init__.py rename to src/python/grpcio_health_checking/grpc_health_checking/__init__.py diff --git a/src/python/grpcio_health_checking/grpc/health/__init__.py b/src/python/grpcio_health_checking/grpc_health_checking/health/__init__.py similarity index 100% rename from src/python/grpcio_health_checking/grpc/health/__init__.py rename to src/python/grpcio_health_checking/grpc_health_checking/health/__init__.py diff --git a/src/python/grpcio_health_checking/grpc/health/v1/__init__.py b/src/python/grpcio_health_checking/grpc_health_checking/health/v1/__init__.py similarity index 100% rename from src/python/grpcio_health_checking/grpc/health/v1/__init__.py rename to src/python/grpcio_health_checking/grpc_health_checking/health/v1/__init__.py diff --git a/src/python/grpcio_health_checking/grpc_health_checking/health/v1/health.py b/src/python/grpcio_health_checking/grpc_health_checking/health/v1/health.py new file mode 100644 index 00000000000..7068ba9605b --- /dev/null +++ b/src/python/grpcio_health_checking/grpc_health_checking/health/v1/health.py @@ -0,0 +1,66 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""Reference implementation for health checking in gRPC Python.""" + +import threading + +from grpc_health_checking.health.v1 import health_pb2 + + +class HealthServicer(health_pb2.BetaHealthServicer): + """Servicer handling RPCs for service statuses.""" + + def __init__(self): + self._server_status_lock = threading.Lock() + self._server_status = {} + + def Check(self, request, context): + with self._server_status_lock: + if request.service not in self._server_status: + # TODO(atash): once the Python API has a way of setting the server + # status, bring us into conformance with the health check spec by + # returning the NOT_FOUND status here. + raise NotImplementedError() + else: + return health_pb2.HealthCheckResponse( + status=self._server_status[request.service]) + + def set(self, service, status): + """Sets the status of a service. + + Args: + service: string, the name of the service. + NOTE, '' must be set. + status: HealthCheckResponse.status enum value indicating + the status of the service + """ + with self._server_status_lock: + self._server_status[service] = status + diff --git a/src/python/grpcio_health_checking/commands.py b/src/python/grpcio_health_checking/health_commands.py similarity index 80% rename from src/python/grpcio_health_checking/commands.py rename to src/python/grpcio_health_checking/health_commands.py index 3f4ea6e22f6..b01e0bd0e84 100644 --- a/src/python/grpcio_health_checking/commands.py +++ b/src/python/grpcio_health_checking/health_commands.py @@ -33,11 +33,16 @@ import distutils import glob import os import os.path +import shutil import subprocess import sys import setuptools from setuptools.command import build_py +from setuptools.command import sdist + +ROOT_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__))) +HEALTH_PROTO = os.path.join(ROOT_DIR, '../../proto/grpc/health/v1/health.proto') class BuildProtoModules(setuptools.Command): @@ -76,9 +81,34 @@ class BuildProtoModules(setuptools.Command): raise Exception('{}\nOutput:\n{}'.format(e.message, e.output)) +class CopyProtoModules(setuptools.Command): + """Command to copy proto modules from grpc/src/proto.""" + + def initialize_options(self): + pass + + def finalize_options(self): + pass + + def run(self): + if os.path.isfile(HEALTH_PROTO): + shutil.copyfile( + HEALTH_PROTO, + os.path.join(ROOT_DIR, 'grpc_health_checking/health/v1/health.proto')) + + class BuildPy(build_py.build_py): """Custom project build command.""" def run(self): + self.run_command('copy_proto_modules') self.run_command('build_proto_modules') build_py.build_py.run(self) + + +class SDist(sdist.sdist): + """Custom project build command.""" + + def run(self): + self.run_command('copy_proto_modules') + sdist.sdist.run(self) diff --git a/src/python/grpcio_health_checking/setup.py b/src/python/grpcio_health_checking/setup.py index 35253ba3123..5aa4bb8845d 100644 --- a/src/python/grpcio_health_checking/setup.py +++ b/src/python/grpcio_health_checking/setup.py @@ -40,7 +40,7 @@ import setuptools os.chdir(os.path.dirname(os.path.abspath(__file__))) # Break import-style to ensure we can actually find our commands module. -import commands +import health_commands _PACKAGES = ( setuptools.find_packages('.') @@ -51,19 +51,21 @@ _PACKAGE_DIRECTORIES = { } _INSTALL_REQUIRES = ( - 'grpcio>=0.11.0b0', + 'grpcio>=grpcio-0.14.0.dev0', ) _SETUP_REQUIRES = _INSTALL_REQUIRES _COMMAND_CLASS = { - 'build_proto_modules': commands.BuildProtoModules, - 'build_py': commands.BuildPy, + 'copy_proto_modules': health_commands.CopyProtoModules, + 'build_proto_modules': health_commands.BuildProtoModules, + 'build_py': health_commands.BuildPy, + 'sdist': health_commands.SDist, } setuptools.setup( name='grpcio_health_checking', - version='0.11.0b0', + version='0.14.0b1', packages=list(_PACKAGES), package_dir=_PACKAGE_DIRECTORIES, install_requires=_INSTALL_REQUIRES, diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh index 594c20b14c3..4cc6881ef5a 100755 --- a/tools/run_tests/build_python.sh +++ b/tools/run_tests/build_python.sh @@ -55,3 +55,7 @@ $ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/setup.py build $ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/setup.py build_py $ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/setup.py build_ext --inplace $ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/setup.py gather --test + +# Build the health checker +$ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/src/python/grpcio_health_checking/setup.py build +$ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/src/python/grpcio_health_checking/setup.py build_py diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 37291f4d3fb..9c6d91ba7ec 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -272,17 +272,12 @@ class NodeLanguage(object): def __init__(self): self.platform = platform_string() + self.node_version = '0.12' def configure(self, config, args): self.config = config self.args = args - _check_compiler(self.args.compiler, ['default', 'node0.12', - 'node4', 'node5']) - if self.args.compiler == 'default': - self.node_version = '4' - else: - # Take off the word "node" - self.node_version = self.args.compiler[4:] + _check_compiler(self.args.compiler, ['default']) def test_specs(self): if self.platform == 'windows': @@ -371,7 +366,10 @@ class PythonLanguage(object): with open('src/python/grpcio/tests/tests.json') as tests_json_file: tests_json = json.load(tests_json_file) environment = dict(_FORCE_ENVIRON_FOR_WRAPPERS) - environment['PYTHONPATH'] = os.path.abspath('src/python/gens') + environment['PYTHONPATH'] = '{}:{}'.format( + os.path.abspath('src/python/gens'), + os.path.abspath('src/python/grpcio_health_checking')) + if self.config.build_config != 'gcov': return [self.config.job_spec( ['tools/run_tests/run_python.sh', self._tox_env], @@ -807,8 +805,7 @@ argp.add_argument('--compiler', 'gcc4.4', 'gcc4.9', 'gcc5.3', 'clang3.4', 'clang3.6', 'vs2010', 'vs2013', 'vs2015', - 'python2.7', 'python3.4', - 'node0.12', 'node4', 'node5'], + 'python2.7', 'python3.4'], default='default', help='Selects compiler to use. Allowed values depend on the platform and language.') argp.add_argument('--build_only', @@ -912,13 +909,13 @@ if args.use_docker: env = os.environ.copy() env['RUN_TESTS_COMMAND'] = run_tests_cmd env['DOCKERFILE_DIR'] = dockerfile_dir - env['DOCKER_RUN_SCRIPT'] = 'tools/run_tests/dockerize/docker_run_tests.sh' + env['DOCKER_RUN_SCRIPT'] = 'tools/jenkins/docker_run_tests.sh' if args.xml_report: env['XML_REPORT'] = args.xml_report if not args.travis: env['TTY_FLAG'] = '-t' # enables Ctrl-C when not on Jenkins. - subprocess.check_call(['tools/run_tests/dockerize/build_docker_and_run_tests.sh'], + subprocess.check_call(['tools/jenkins/build_docker_and_run_tests.sh'], shell=True, env=env) sys.exit(0) From 4e1ebfa17689e045b725e64bd75db044eb2abea6 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 4 May 2016 17:43:07 -0700 Subject: [PATCH 0280/1894] Updated template file --- templates/src/node/tools/package.json.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/src/node/tools/package.json.template b/templates/src/node/tools/package.json.template index 4f673c48d1c..69ad71a3b83 100644 --- a/templates/src/node/tools/package.json.template +++ b/templates/src/node/tools/package.json.template @@ -18,8 +18,8 @@ } ], "bin": { - "grpc-tools-protoc": "./bin/protoc.js", - "grpc-tools-plugin": "./bin/protoc_plugin.js" + "grpc_tools_node_protoc": "./bin/protoc.js", + "grpc_tools_node_protoc_plugin": "./bin/protoc_plugin.js" }, "scripts": { "install": "./node_modules/.bin/node-pre-gyp install" From 2c56e1cc2c7cf6d645c14ce333fb99f08734b5df Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Wed, 4 May 2016 17:46:27 -0700 Subject: [PATCH 0281/1894] run_tests.py updated --- tools/run_tests/run_tests.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 9c6d91ba7ec..37291f4d3fb 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -272,12 +272,17 @@ class NodeLanguage(object): def __init__(self): self.platform = platform_string() - self.node_version = '0.12' def configure(self, config, args): self.config = config self.args = args - _check_compiler(self.args.compiler, ['default']) + _check_compiler(self.args.compiler, ['default', 'node0.12', + 'node4', 'node5']) + if self.args.compiler == 'default': + self.node_version = '4' + else: + # Take off the word "node" + self.node_version = self.args.compiler[4:] def test_specs(self): if self.platform == 'windows': @@ -366,10 +371,7 @@ class PythonLanguage(object): with open('src/python/grpcio/tests/tests.json') as tests_json_file: tests_json = json.load(tests_json_file) environment = dict(_FORCE_ENVIRON_FOR_WRAPPERS) - environment['PYTHONPATH'] = '{}:{}'.format( - os.path.abspath('src/python/gens'), - os.path.abspath('src/python/grpcio_health_checking')) - + environment['PYTHONPATH'] = os.path.abspath('src/python/gens') if self.config.build_config != 'gcov': return [self.config.job_spec( ['tools/run_tests/run_python.sh', self._tox_env], @@ -805,7 +807,8 @@ argp.add_argument('--compiler', 'gcc4.4', 'gcc4.9', 'gcc5.3', 'clang3.4', 'clang3.6', 'vs2010', 'vs2013', 'vs2015', - 'python2.7', 'python3.4'], + 'python2.7', 'python3.4', + 'node0.12', 'node4', 'node5'], default='default', help='Selects compiler to use. Allowed values depend on the platform and language.') argp.add_argument('--build_only', @@ -909,13 +912,13 @@ if args.use_docker: env = os.environ.copy() env['RUN_TESTS_COMMAND'] = run_tests_cmd env['DOCKERFILE_DIR'] = dockerfile_dir - env['DOCKER_RUN_SCRIPT'] = 'tools/jenkins/docker_run_tests.sh' + env['DOCKER_RUN_SCRIPT'] = 'tools/run_tests/dockerize/docker_run_tests.sh' if args.xml_report: env['XML_REPORT'] = args.xml_report if not args.travis: env['TTY_FLAG'] = '-t' # enables Ctrl-C when not on Jenkins. - subprocess.check_call(['tools/jenkins/build_docker_and_run_tests.sh'], + subprocess.check_call(['tools/run_tests/dockerize/build_docker_and_run_tests.sh'], shell=True, env=env) sys.exit(0) From e79b08b5ec06bf7ee1af19258f3e98386668899f Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Wed, 4 May 2016 18:09:20 -0700 Subject: [PATCH 0282/1894] RouteGuide example now works with moving between tabs. Fixes issue 6404. --- .../objective-c/route_guide/ViewControllers.m | 89 +++++++++++++------ 1 file changed, 62 insertions(+), 27 deletions(-) diff --git a/examples/objective-c/route_guide/ViewControllers.m b/examples/objective-c/route_guide/ViewControllers.m index 0b1a1cf4823..e32978240b6 100644 --- a/examples/objective-c/route_guide/ViewControllers.m +++ b/examples/objective-c/route_guide/ViewControllers.m @@ -80,19 +80,14 @@ static NSString * const kHostAddress = @"localhost:50051"; * Run the getFeature demo. Calls getFeature with a point known to have a feature and a point known * not to have a feature. */ -@interface GetFeatureViewController : UIViewController +@interface GetFeatureViewController : UIViewController { + RTGRouteGuide *service; +} @end @implementation GetFeatureViewController -- (void)viewDidLoad { - [super viewDidLoad]; - - // This only needs to be done once per host, before creating service objects for that host. - [GRPCCall useInsecureConnectionsForHost:kHostAddress]; - - RTGRouteGuide *service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; - +- (void)execRequest { void (^handler)(RTGFeature *response, NSError *error) = ^(RTGFeature *response, NSError *error) { if (response.name.length) { NSLog(@"Found feature called %@ at %@.", response.name, response.location); @@ -111,6 +106,19 @@ static NSString * const kHostAddress = @"localhost:50051"; [service getFeatureWithRequest:[RTGPoint message] handler:handler]; } +- (void)viewDidLoad { + [super viewDidLoad]; + + // This only needs to be done once per host, before creating service objects for that host. + [GRPCCall useInsecureConnectionsForHost:kHostAddress]; + + service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; +} + +- (void)viewDidAppear:(BOOL)animated { + [self execRequest]; +} + @end @@ -120,16 +128,15 @@ static NSString * const kHostAddress = @"localhost:50051"; * Run the listFeatures demo. Calls listFeatures with a rectangle containing all of the features in * the pre-generated database. Prints each response as it comes in. */ -@interface ListFeaturesViewController : UIViewController +@interface ListFeaturesViewController : UIViewController { + RTGRouteGuide *service; +} + @end @implementation ListFeaturesViewController -- (void)viewDidLoad { - [super viewDidLoad]; - - RTGRouteGuide *service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; - +- (void)execRequest { RTGRectangle *rectangle = [RTGRectangle message]; rectangle.lo.latitude = 405E6; rectangle.lo.longitude = -750E6; @@ -147,6 +154,16 @@ static NSString * const kHostAddress = @"localhost:50051"; }]; } +- (void)viewDidLoad { + [super viewDidLoad]; + + service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; +} + +- (void)viewDidAppear:(BOOL)animated { + [self execRequest]; +} + @end @@ -157,14 +174,15 @@ static NSString * const kHostAddress = @"localhost:50051"; * database with a variable delay in between. Prints the statistics when they are sent from the * server. */ -@interface RecordRouteViewController : UIViewController +@interface RecordRouteViewController : UIViewController { + RTGRouteGuide *service; +} + @end @implementation RecordRouteViewController -- (void)viewDidLoad { - [super viewDidLoad]; - +- (void)execRequest { NSString *dataBasePath = [NSBundle.mainBundle pathForResource:@"route_guide_db" ofType:@"json"]; NSData *dataBaseContent = [NSData dataWithContentsOfFile:dataBasePath]; @@ -178,8 +196,6 @@ static NSString * const kHostAddress = @"localhost:50051"; return location; }]; - RTGRouteGuide *service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; - [service recordRouteWithRequestsWriter:locations handler:^(RTGRouteSummary *response, NSError *error) { if (response) { @@ -193,6 +209,16 @@ static NSString * const kHostAddress = @"localhost:50051"; }]; } +- (void)viewDidLoad { + [super viewDidLoad]; + + service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; +} + +- (void)viewDidAppear:(BOOL)animated { + [self execRequest]; +} + @end @@ -202,14 +228,15 @@ static NSString * const kHostAddress = @"localhost:50051"; * Run the routeChat demo. Send some chat messages, and print any chat messages that are sent from * the server. */ -@interface RouteChatViewController : UIViewController +@interface RouteChatViewController : UIViewController { + RTGRouteGuide *service; +} + @end @implementation RouteChatViewController -- (void)viewDidLoad { - [super viewDidLoad]; - +- (void)execRequest { NSArray *notes = @[[RTGRouteNote noteWithMessage:@"First message" latitude:0 longitude:0], [RTGRouteNote noteWithMessage:@"Second message" latitude:0 longitude:1], [RTGRouteNote noteWithMessage:@"Third message" latitude:1 longitude:0], @@ -219,8 +246,6 @@ static NSString * const kHostAddress = @"localhost:50051"; return note; }]; - RTGRouteGuide *service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; - [service routeChatWithRequestsWriter:notesWriter eventHandler:^(BOOL done, RTGRouteNote *note, NSError *error) { if (note) { @@ -234,4 +259,14 @@ static NSString * const kHostAddress = @"localhost:50051"; }]; } +- (void)viewDidLoad { + [super viewDidLoad]; + + service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; +} + +- (void)viewDidAppear:(BOOL)animated { + [self execRequest]; +} + @end From 4982638f78012dd31e474ed2e364633fcba65efb Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Wed, 4 May 2016 18:37:29 -0700 Subject: [PATCH 0283/1894] Remove grpcio as build dependency --- src/python/grpcio_health_checking/MANIFEST.in | 4 ++-- src/python/grpcio_health_checking/setup.py | 5 +---- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/src/python/grpcio_health_checking/MANIFEST.in b/src/python/grpcio_health_checking/MANIFEST.in index 498b55f20ab..e8b4113adbb 100644 --- a/src/python/grpcio_health_checking/MANIFEST.in +++ b/src/python/grpcio_health_checking/MANIFEST.in @@ -1,2 +1,2 @@ -graft grpc -include commands.py +graft grpc_health_checking +include health_commands.py diff --git a/src/python/grpcio_health_checking/setup.py b/src/python/grpcio_health_checking/setup.py index 5aa4bb8845d..2818c5b81dc 100644 --- a/src/python/grpcio_health_checking/setup.py +++ b/src/python/grpcio_health_checking/setup.py @@ -51,11 +51,9 @@ _PACKAGE_DIRECTORIES = { } _INSTALL_REQUIRES = ( - 'grpcio>=grpcio-0.14.0.dev0', + 'grpcio>=0.13.1', ) -_SETUP_REQUIRES = _INSTALL_REQUIRES - _COMMAND_CLASS = { 'copy_proto_modules': health_commands.CopyProtoModules, 'build_proto_modules': health_commands.BuildProtoModules, @@ -69,6 +67,5 @@ setuptools.setup( packages=list(_PACKAGES), package_dir=_PACKAGE_DIRECTORIES, install_requires=_INSTALL_REQUIRES, - setup_requires=_SETUP_REQUIRES, cmdclass=_COMMAND_CLASS ) From c47e43df8045e8813f0a2ba617705b660244f0f9 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Wed, 4 May 2016 18:46:16 -0700 Subject: [PATCH 0284/1894] Added to PYTHONPATH --- tools/run_tests/run_tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 37291f4d3fb..91c7100958a 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -371,7 +371,9 @@ class PythonLanguage(object): with open('src/python/grpcio/tests/tests.json') as tests_json_file: tests_json = json.load(tests_json_file) environment = dict(_FORCE_ENVIRON_FOR_WRAPPERS) - environment['PYTHONPATH'] = os.path.abspath('src/python/gens') + environment['PYTHONPATH'] = '{}:{}'.format( + os.path.abspath('src/python/gens'), + os.path.abspath('src/python/grpcio_health_checking')) if self.config.build_config != 'gcov': return [self.config.job_spec( ['tools/run_tests/run_python.sh', self._tox_env], From d8b07cb3a1168bce8073e39ab64d877c2c7d185e Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 5 May 2016 03:55:55 +0200 Subject: [PATCH 0285/1894] Let's not compile grpc under Windows - it's taken care of already. --- src/ruby/ext/grpc/extconf.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ruby/ext/grpc/extconf.rb b/src/ruby/ext/grpc/extconf.rb index 07f7bb93b8a..6d65db83067 100644 --- a/src/ruby/ext/grpc/extconf.rb +++ b/src/ruby/ext/grpc/extconf.rb @@ -78,9 +78,11 @@ output_dir = File.expand_path(RbConfig::CONFIG['topdir']) grpc_lib_dir = File.join(output_dir, 'libs', grpc_config) ENV['BUILDDIR'] = output_dir -puts 'Building internal gRPC into ' + grpc_lib_dir -system("make -j -C #{grpc_root} #{grpc_lib_dir}/libgrpc.a CONFIG=#{grpc_config}") -exit 1 unless $? == 0 +unless windows + puts 'Building internal gRPC into ' + grpc_lib_dir + system("make -j -C #{grpc_root} #{grpc_lib_dir}/libgrpc.a CONFIG=#{grpc_config}") + exit 1 unless $? == 0 +end $CFLAGS << ' -I' + File.join(grpc_root, 'include') $LDFLAGS << ' ' + File.join(grpc_lib_dir, 'libgrpc.a') unless windows From 88f56e5ce386b0292ded2f08aba2bc92a09369b1 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 5 May 2016 04:04:50 +0200 Subject: [PATCH 0286/1894] 'exception_info' is a bad word for Windows... --- src/ruby/ext/grpc/rb_call_credentials.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ruby/ext/grpc/rb_call_credentials.c b/src/ruby/ext/grpc/rb_call_credentials.c index 38bf1f7710f..615bf9415d5 100644 --- a/src/ruby/ext/grpc/rb_call_credentials.c +++ b/src/ruby/ext/grpc/rb_call_credentials.c @@ -35,7 +35,6 @@ #include "rb_grpc_imports.generated.h" #include "rb_call_credentials.h" -#include #include #include @@ -86,11 +85,11 @@ static VALUE grpc_rb_call_credentials_callback_rescue(VALUE args, rb_funcall(exception_object, rb_intern("backtrace"), 0), rb_intern("join"), 1, rb_str_new2("\n\tfrom ")); - VALUE exception_info = rb_funcall(exception_object, rb_intern("to_s"), 0); + VALUE rb_exception_info = rb_funcall(exception_object, rb_intern("to_s"), 0); const char *exception_classname = rb_obj_classname(exception_object); (void)args; gpr_log(GPR_INFO, "Call credentials callback failed: %s: %s\n%s", - exception_classname, StringValueCStr(exception_info), + exception_classname, StringValueCStr(rb_exception_info), StringValueCStr(backtrace)); rb_hash_aset(result, rb_str_new2("metadata"), Qnil); /* Currently only gives the exception class name. It should be possible get From 1621c4d37c4cc9cfe01b99be3eb82e8b3a8b17a4 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 4 May 2016 19:44:37 -0700 Subject: [PATCH 0287/1894] Added support for trailing metadata --- src/core/ext/load_reporting/load_reporting.c | 20 +-- src/core/ext/load_reporting/load_reporting.h | 29 ++-- .../load_reporting/load_reporting_filter.c | 63 +++++++-- src/core/lib/transport/static_metadata.c | 11 +- src/core/lib/transport/static_metadata.h | 124 +++++++++--------- test/core/end2end/fixtures/h2_loadreporting.c | 37 ++++-- test/core/end2end/fuzzers/hpack.dictionary | 2 + tools/codegen/core/gen_static_metadata.py | 1 + 8 files changed, 182 insertions(+), 105 deletions(-) diff --git a/src/core/ext/load_reporting/load_reporting.c b/src/core/ext/load_reporting/load_reporting.c index fb32685dc98..60082dbaaae 100644 --- a/src/core/ext/load_reporting/load_reporting.c +++ b/src/core/ext/load_reporting/load_reporting.c @@ -44,32 +44,32 @@ struct grpc_load_reporting_config { grpc_load_reporting_fn fn; - void *data; + void *user_data; }; grpc_load_reporting_config *grpc_load_reporting_config_create( - grpc_load_reporting_fn fn, void *data) { + grpc_load_reporting_fn fn, void *user_data) { + GPR_ASSERT(fn != NULL); grpc_load_reporting_config *lrc = gpr_malloc(sizeof(grpc_load_reporting_config)); lrc->fn = fn; - lrc->data = data; + lrc->user_data = user_data; return lrc; } grpc_load_reporting_config *grpc_load_reporting_config_copy( grpc_load_reporting_config *src) { - return grpc_load_reporting_config_create(src->fn, src->data); + return grpc_load_reporting_config_create(src->fn, src->user_data); } void grpc_load_reporting_config_destroy(grpc_load_reporting_config *lrc) { gpr_free(lrc); } -void grpc_load_reporting_config_call(grpc_load_reporting_config *lrc, - const grpc_call_stats *stats) { - if (lrc->fn != NULL) { - lrc->fn(stats, lrc->data); - } +void grpc_load_reporting_config_call( + grpc_load_reporting_config *lrc, + const grpc_load_reporting_call_data *call_data) { + lrc->fn(call_data, lrc->user_data); } static bool is_load_reporting_enabled(const grpc_channel_args *a) { @@ -102,7 +102,7 @@ static void *lrd_arg_copy(void *p) { static int lrd_arg_cmp(void *a, void *b) { grpc_load_reporting_config *lhs = a; grpc_load_reporting_config *rhs = b; - return !(lhs->fn == rhs->fn && lhs->data == rhs->data); + return !(lhs->fn == rhs->fn && lhs->user_data == rhs->user_data); } static const grpc_arg_pointer_vtable lrd_ptr_vtable = { diff --git a/src/core/ext/load_reporting/load_reporting.h b/src/core/ext/load_reporting/load_reporting.h index 806af2bda78..316cd89bd72 100644 --- a/src/core/ext/load_reporting/load_reporting.h +++ b/src/core/ext/load_reporting/load_reporting.h @@ -39,24 +39,35 @@ typedef struct grpc_load_reporting_config grpc_load_reporting_config; +/** Call information to be passed to the provided load reporting function upon + * completion of the call */ +typedef struct grpc_load_reporting_call_data { + const grpc_call_stats *stats; /**< Stats for the call */ + const char *trailing_md_string; /**< LR trailing metadata info */ +} grpc_load_reporting_call_data; + /** Custom function to be called by the load reporting filter. */ -typedef void (*grpc_load_reporting_fn)(const grpc_call_stats *stats, - void *data); +typedef void (*grpc_load_reporting_fn)( + const grpc_load_reporting_call_data *call_data, void *user_data); -/** Register \a fn as the function to be invoked by the load reporting filter, - * passing \a data alongisde the call stats */ +/** Register \a fn as the function to be invoked by the load reporting filter. + * \a fn will be invoked at the beginning and at the end of the call. + * + * For the first invocation, \a fn's first argument + * (grpc_load_reporting_call_data*) will be NULL. \a user_data is always passed + * as-is. */ grpc_load_reporting_config *grpc_load_reporting_config_create( - grpc_load_reporting_fn fn, void *data); + grpc_load_reporting_fn fn, void *user_data); grpc_load_reporting_config *grpc_load_reporting_config_copy( grpc_load_reporting_config *src); void grpc_load_reporting_config_destroy(grpc_load_reporting_config *lrc); -/** Invoke the function registered by \a grpc_load_reporting_init, passing it \a - * stats as one of the arguments (see \a load_reporting_fn). */ -void grpc_load_reporting_config_call(grpc_load_reporting_config *lrc, - const grpc_call_stats *stats); +/** Invoke the function registered by \a grpc_load_reporting_init. */ +void grpc_load_reporting_config_call( + grpc_load_reporting_config *lrc, + const grpc_load_reporting_call_data *call_data); /** Return a \a grpc_arg enabling load reporting */ grpc_arg grpc_load_reporting_config_create_arg(grpc_load_reporting_config *lrc); diff --git a/src/core/ext/load_reporting/load_reporting_filter.c b/src/core/ext/load_reporting/load_reporting_filter.c index 902c1102120..f49730fac31 100644 --- a/src/core/ext/load_reporting/load_reporting_filter.c +++ b/src/core/ext/load_reporting/load_reporting_filter.c @@ -32,6 +32,7 @@ */ #include +#include #include #include @@ -39,28 +40,40 @@ #include "src/core/ext/load_reporting/load_reporting_filter.h" #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/profiling/timers.h" +#include "src/core/lib/transport/static_metadata.h" -typedef struct call_data { void *dummy; } call_data; +typedef struct call_data { const char *trailing_md_string; } call_data; typedef struct channel_data { gpr_mu mu; grpc_load_reporting_config *lrc; } channel_data; +static void invoke_lr_fn_locked(grpc_load_reporting_config *lrc, + grpc_load_reporting_call_data *lr_call_data) { + GPR_TIMER_BEGIN("load_reporting_config_fn", 0); + grpc_load_reporting_config_call(lrc, lr_call_data); + GPR_TIMER_END("load_reporting_config_fn", 0); +} + /* Constructor for call_data */ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_call_element_args *args) {} + grpc_call_element_args *args) { + call_data *calld = elem->call_data; + memset(calld, 0, sizeof(call_data)); +} /* Destructor for call_data */ static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, const grpc_call_stats *stats, void *ignored) { channel_data *chand = elem->channel_data; - if (chand->lrc != NULL) { - GPR_TIMER_BEGIN("load_reporting_filter", 0); - gpr_mu_lock(&chand->mu); - grpc_load_reporting_config_call(chand->lrc, stats); - gpr_mu_unlock(&chand->mu); - GPR_TIMER_END("load_reporting_filter", 0); - } + call_data *calld = elem->call_data; + + grpc_load_reporting_call_data lr_call_data = {stats, + calld->trailing_md_string}; + + gpr_mu_lock(&chand->mu); + invoke_lr_fn_locked(chand->lrc, &lr_call_data); + gpr_mu_unlock(&chand->mu); } /* Constructor for channel_data */ @@ -84,6 +97,10 @@ static void init_channel_elem(grpc_exec_ctx *exec_ctx, } } GPR_ASSERT(chand->lrc != NULL); /* arg actually found */ + + gpr_mu_lock(&chand->mu); + invoke_lr_fn_locked(chand->lrc, NULL); + gpr_mu_unlock(&chand->mu); } /* Destructor for channel data */ @@ -94,8 +111,34 @@ static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, grpc_load_reporting_config_destroy(chand->lrc); } +static grpc_mdelem *lr_trailing_md_filter(void *user_data, grpc_mdelem *md) { + grpc_call_element *elem = user_data; + call_data *calld = elem->call_data; + + if (md->key == GRPC_MDSTR_LOAD_REPORTING) { + calld->trailing_md_string = gpr_strdup(grpc_mdstr_as_c_string(md->value)); + return NULL; + } + + return md; +} + +static void lr_start_transport_stream_op(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_transport_stream_op *op) { + GPR_TIMER_BEGIN("lr_start_transport_stream_op", 0); + + if (op->send_trailing_metadata) { + grpc_metadata_batch_filter(op->send_trailing_metadata, + lr_trailing_md_filter, elem); + } + grpc_call_next_op(exec_ctx, elem, op); + + GPR_TIMER_END("lr_start_transport_stream_op", 0); +} + const grpc_channel_filter grpc_load_reporting_filter = { - grpc_call_next_op, + lr_start_transport_stream_op, grpc_channel_next_op, sizeof(call_data), init_call_elem, diff --git a/src/core/lib/transport/static_metadata.c b/src/core/lib/transport/static_metadata.c index 73b0041fd40..c5f16e530d7 100644 --- a/src/core/lib/transport/static_metadata.c +++ b/src/core/lib/transport/static_metadata.c @@ -48,7 +48,7 @@ uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 8, 6, 2, 4, 8, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, - 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; + 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; const uint8_t grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT * 2] = {11, 35, 10, 35, 12, 35, 12, 49, 13, 35, 14, 35, 15, 35, 16, 35, 17, 35, @@ -56,10 +56,10 @@ const uint8_t grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT * 2] = 30, 18, 30, 35, 31, 35, 32, 35, 36, 35, 37, 35, 38, 35, 39, 35, 42, 33, 42, 34, 42, 48, 42, 53, 42, 54, 42, 55, 42, 56, 43, 33, 43, 48, 43, 53, 46, 0, 46, 1, 46, 2, 50, 35, 57, 35, 58, 35, 59, 35, 60, 35, 61, 35, - 62, 35, 63, 35, 64, 35, 65, 35, 66, 40, 66, 68, 66, 71, 67, 79, 67, 80, - 69, 35, 70, 35, 72, 35, 73, 35, 74, 35, 75, 35, 76, 41, 76, 51, 76, 52, - 77, 35, 78, 35, 81, 3, 81, 4, 81, 5, 81, 6, 81, 7, 81, 8, 81, 9, - 82, 35, 83, 84, 85, 35, 86, 35, 87, 35, 88, 35, 89, 35}; + 62, 35, 63, 35, 64, 35, 65, 35, 66, 35, 67, 40, 67, 69, 67, 72, 68, 80, + 68, 81, 70, 35, 71, 35, 73, 35, 74, 35, 75, 35, 76, 35, 77, 41, 77, 51, + 77, 52, 78, 35, 79, 35, 82, 3, 82, 4, 82, 5, 82, 6, 82, 7, 82, 8, + 82, 9, 83, 35, 84, 85, 86, 35, 87, 35, 88, 35, 89, 35, 90, 35}; const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = { "0", @@ -126,6 +126,7 @@ const char *const grpc_static_metadata_strings[GRPC_STATIC_MDSTR_COUNT] = { "if-unmodified-since", "last-modified", "link", + "load-reporting", "location", "max-forwards", ":method", diff --git a/src/core/lib/transport/static_metadata.h b/src/core/lib/transport/static_metadata.h index f9d8bcdc8fd..5ff0d2f3bc3 100644 --- a/src/core/lib/transport/static_metadata.h +++ b/src/core/lib/transport/static_metadata.h @@ -44,7 +44,7 @@ #include "src/core/lib/transport/metadata.h" -#define GRPC_STATIC_MDSTR_COUNT 90 +#define GRPC_STATIC_MDSTR_COUNT 91 extern grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT]; /* "0" */ #define GRPC_MDSTR_0 (&grpc_static_mdstr_table[0]) @@ -175,60 +175,62 @@ extern grpc_mdstr grpc_static_mdstr_table[GRPC_STATIC_MDSTR_COUNT]; #define GRPC_MDSTR_LAST_MODIFIED (&grpc_static_mdstr_table[62]) /* "link" */ #define GRPC_MDSTR_LINK (&grpc_static_mdstr_table[63]) +/* "load-reporting" */ +#define GRPC_MDSTR_LOAD_REPORTING (&grpc_static_mdstr_table[64]) /* "location" */ -#define GRPC_MDSTR_LOCATION (&grpc_static_mdstr_table[64]) +#define GRPC_MDSTR_LOCATION (&grpc_static_mdstr_table[65]) /* "max-forwards" */ -#define GRPC_MDSTR_MAX_FORWARDS (&grpc_static_mdstr_table[65]) +#define GRPC_MDSTR_MAX_FORWARDS (&grpc_static_mdstr_table[66]) /* ":method" */ -#define GRPC_MDSTR_METHOD (&grpc_static_mdstr_table[66]) +#define GRPC_MDSTR_METHOD (&grpc_static_mdstr_table[67]) /* ":path" */ -#define GRPC_MDSTR_PATH (&grpc_static_mdstr_table[67]) +#define GRPC_MDSTR_PATH (&grpc_static_mdstr_table[68]) /* "POST" */ -#define GRPC_MDSTR_POST (&grpc_static_mdstr_table[68]) +#define GRPC_MDSTR_POST (&grpc_static_mdstr_table[69]) /* "proxy-authenticate" */ -#define GRPC_MDSTR_PROXY_AUTHENTICATE (&grpc_static_mdstr_table[69]) +#define GRPC_MDSTR_PROXY_AUTHENTICATE (&grpc_static_mdstr_table[70]) /* "proxy-authorization" */ -#define GRPC_MDSTR_PROXY_AUTHORIZATION (&grpc_static_mdstr_table[70]) +#define GRPC_MDSTR_PROXY_AUTHORIZATION (&grpc_static_mdstr_table[71]) /* "PUT" */ -#define GRPC_MDSTR_PUT (&grpc_static_mdstr_table[71]) +#define GRPC_MDSTR_PUT (&grpc_static_mdstr_table[72]) /* "range" */ -#define GRPC_MDSTR_RANGE (&grpc_static_mdstr_table[72]) +#define GRPC_MDSTR_RANGE (&grpc_static_mdstr_table[73]) /* "referer" */ -#define GRPC_MDSTR_REFERER (&grpc_static_mdstr_table[73]) +#define GRPC_MDSTR_REFERER (&grpc_static_mdstr_table[74]) /* "refresh" */ -#define GRPC_MDSTR_REFRESH (&grpc_static_mdstr_table[74]) +#define GRPC_MDSTR_REFRESH (&grpc_static_mdstr_table[75]) /* "retry-after" */ -#define GRPC_MDSTR_RETRY_AFTER (&grpc_static_mdstr_table[75]) +#define GRPC_MDSTR_RETRY_AFTER (&grpc_static_mdstr_table[76]) /* ":scheme" */ -#define GRPC_MDSTR_SCHEME (&grpc_static_mdstr_table[76]) +#define GRPC_MDSTR_SCHEME (&grpc_static_mdstr_table[77]) /* "server" */ -#define GRPC_MDSTR_SERVER (&grpc_static_mdstr_table[77]) +#define GRPC_MDSTR_SERVER (&grpc_static_mdstr_table[78]) /* "set-cookie" */ -#define GRPC_MDSTR_SET_COOKIE (&grpc_static_mdstr_table[78]) +#define GRPC_MDSTR_SET_COOKIE (&grpc_static_mdstr_table[79]) /* "/" */ -#define GRPC_MDSTR_SLASH (&grpc_static_mdstr_table[79]) +#define GRPC_MDSTR_SLASH (&grpc_static_mdstr_table[80]) /* "/index.html" */ -#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (&grpc_static_mdstr_table[80]) +#define GRPC_MDSTR_SLASH_INDEX_DOT_HTML (&grpc_static_mdstr_table[81]) /* ":status" */ -#define GRPC_MDSTR_STATUS (&grpc_static_mdstr_table[81]) +#define GRPC_MDSTR_STATUS (&grpc_static_mdstr_table[82]) /* "strict-transport-security" */ -#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (&grpc_static_mdstr_table[82]) +#define GRPC_MDSTR_STRICT_TRANSPORT_SECURITY (&grpc_static_mdstr_table[83]) /* "te" */ -#define GRPC_MDSTR_TE (&grpc_static_mdstr_table[83]) +#define GRPC_MDSTR_TE (&grpc_static_mdstr_table[84]) /* "trailers" */ -#define GRPC_MDSTR_TRAILERS (&grpc_static_mdstr_table[84]) +#define GRPC_MDSTR_TRAILERS (&grpc_static_mdstr_table[85]) /* "transfer-encoding" */ -#define GRPC_MDSTR_TRANSFER_ENCODING (&grpc_static_mdstr_table[85]) +#define GRPC_MDSTR_TRANSFER_ENCODING (&grpc_static_mdstr_table[86]) /* "user-agent" */ -#define GRPC_MDSTR_USER_AGENT (&grpc_static_mdstr_table[86]) +#define GRPC_MDSTR_USER_AGENT (&grpc_static_mdstr_table[87]) /* "vary" */ -#define GRPC_MDSTR_VARY (&grpc_static_mdstr_table[87]) +#define GRPC_MDSTR_VARY (&grpc_static_mdstr_table[88]) /* "via" */ -#define GRPC_MDSTR_VIA (&grpc_static_mdstr_table[88]) +#define GRPC_MDSTR_VIA (&grpc_static_mdstr_table[89]) /* "www-authenticate" */ -#define GRPC_MDSTR_WWW_AUTHENTICATE (&grpc_static_mdstr_table[89]) +#define GRPC_MDSTR_WWW_AUTHENTICATE (&grpc_static_mdstr_table[90]) -#define GRPC_STATIC_MDELEM_COUNT 79 +#define GRPC_STATIC_MDELEM_COUNT 80 extern grpc_mdelem grpc_static_mdelem_table[GRPC_STATIC_MDELEM_COUNT]; extern uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT]; /* "accept-charset": "" */ @@ -333,71 +335,73 @@ extern uintptr_t grpc_static_mdelem_user_data[GRPC_STATIC_MDELEM_COUNT]; #define GRPC_MDELEM_LAST_MODIFIED_EMPTY (&grpc_static_mdelem_table[45]) /* "link": "" */ #define GRPC_MDELEM_LINK_EMPTY (&grpc_static_mdelem_table[46]) +/* "load-reporting": "" */ +#define GRPC_MDELEM_LOAD_REPORTING_EMPTY (&grpc_static_mdelem_table[47]) /* "location": "" */ -#define GRPC_MDELEM_LOCATION_EMPTY (&grpc_static_mdelem_table[47]) +#define GRPC_MDELEM_LOCATION_EMPTY (&grpc_static_mdelem_table[48]) /* "max-forwards": "" */ -#define GRPC_MDELEM_MAX_FORWARDS_EMPTY (&grpc_static_mdelem_table[48]) +#define GRPC_MDELEM_MAX_FORWARDS_EMPTY (&grpc_static_mdelem_table[49]) /* ":method": "GET" */ -#define GRPC_MDELEM_METHOD_GET (&grpc_static_mdelem_table[49]) +#define GRPC_MDELEM_METHOD_GET (&grpc_static_mdelem_table[50]) /* ":method": "POST" */ -#define GRPC_MDELEM_METHOD_POST (&grpc_static_mdelem_table[50]) +#define GRPC_MDELEM_METHOD_POST (&grpc_static_mdelem_table[51]) /* ":method": "PUT" */ -#define GRPC_MDELEM_METHOD_PUT (&grpc_static_mdelem_table[51]) +#define GRPC_MDELEM_METHOD_PUT (&grpc_static_mdelem_table[52]) /* ":path": "/" */ -#define GRPC_MDELEM_PATH_SLASH (&grpc_static_mdelem_table[52]) +#define GRPC_MDELEM_PATH_SLASH (&grpc_static_mdelem_table[53]) /* ":path": "/index.html" */ -#define GRPC_MDELEM_PATH_SLASH_INDEX_DOT_HTML (&grpc_static_mdelem_table[53]) +#define GRPC_MDELEM_PATH_SLASH_INDEX_DOT_HTML (&grpc_static_mdelem_table[54]) /* "proxy-authenticate": "" */ -#define GRPC_MDELEM_PROXY_AUTHENTICATE_EMPTY (&grpc_static_mdelem_table[54]) +#define GRPC_MDELEM_PROXY_AUTHENTICATE_EMPTY (&grpc_static_mdelem_table[55]) /* "proxy-authorization": "" */ -#define GRPC_MDELEM_PROXY_AUTHORIZATION_EMPTY (&grpc_static_mdelem_table[55]) +#define GRPC_MDELEM_PROXY_AUTHORIZATION_EMPTY (&grpc_static_mdelem_table[56]) /* "range": "" */ -#define GRPC_MDELEM_RANGE_EMPTY (&grpc_static_mdelem_table[56]) +#define GRPC_MDELEM_RANGE_EMPTY (&grpc_static_mdelem_table[57]) /* "referer": "" */ -#define GRPC_MDELEM_REFERER_EMPTY (&grpc_static_mdelem_table[57]) +#define GRPC_MDELEM_REFERER_EMPTY (&grpc_static_mdelem_table[58]) /* "refresh": "" */ -#define GRPC_MDELEM_REFRESH_EMPTY (&grpc_static_mdelem_table[58]) +#define GRPC_MDELEM_REFRESH_EMPTY (&grpc_static_mdelem_table[59]) /* "retry-after": "" */ -#define GRPC_MDELEM_RETRY_AFTER_EMPTY (&grpc_static_mdelem_table[59]) +#define GRPC_MDELEM_RETRY_AFTER_EMPTY (&grpc_static_mdelem_table[60]) /* ":scheme": "grpc" */ -#define GRPC_MDELEM_SCHEME_GRPC (&grpc_static_mdelem_table[60]) +#define GRPC_MDELEM_SCHEME_GRPC (&grpc_static_mdelem_table[61]) /* ":scheme": "http" */ -#define GRPC_MDELEM_SCHEME_HTTP (&grpc_static_mdelem_table[61]) +#define GRPC_MDELEM_SCHEME_HTTP (&grpc_static_mdelem_table[62]) /* ":scheme": "https" */ -#define GRPC_MDELEM_SCHEME_HTTPS (&grpc_static_mdelem_table[62]) +#define GRPC_MDELEM_SCHEME_HTTPS (&grpc_static_mdelem_table[63]) /* "server": "" */ -#define GRPC_MDELEM_SERVER_EMPTY (&grpc_static_mdelem_table[63]) +#define GRPC_MDELEM_SERVER_EMPTY (&grpc_static_mdelem_table[64]) /* "set-cookie": "" */ -#define GRPC_MDELEM_SET_COOKIE_EMPTY (&grpc_static_mdelem_table[64]) +#define GRPC_MDELEM_SET_COOKIE_EMPTY (&grpc_static_mdelem_table[65]) /* ":status": "200" */ -#define GRPC_MDELEM_STATUS_200 (&grpc_static_mdelem_table[65]) +#define GRPC_MDELEM_STATUS_200 (&grpc_static_mdelem_table[66]) /* ":status": "204" */ -#define GRPC_MDELEM_STATUS_204 (&grpc_static_mdelem_table[66]) +#define GRPC_MDELEM_STATUS_204 (&grpc_static_mdelem_table[67]) /* ":status": "206" */ -#define GRPC_MDELEM_STATUS_206 (&grpc_static_mdelem_table[67]) +#define GRPC_MDELEM_STATUS_206 (&grpc_static_mdelem_table[68]) /* ":status": "304" */ -#define GRPC_MDELEM_STATUS_304 (&grpc_static_mdelem_table[68]) +#define GRPC_MDELEM_STATUS_304 (&grpc_static_mdelem_table[69]) /* ":status": "400" */ -#define GRPC_MDELEM_STATUS_400 (&grpc_static_mdelem_table[69]) +#define GRPC_MDELEM_STATUS_400 (&grpc_static_mdelem_table[70]) /* ":status": "404" */ -#define GRPC_MDELEM_STATUS_404 (&grpc_static_mdelem_table[70]) +#define GRPC_MDELEM_STATUS_404 (&grpc_static_mdelem_table[71]) /* ":status": "500" */ -#define GRPC_MDELEM_STATUS_500 (&grpc_static_mdelem_table[71]) +#define GRPC_MDELEM_STATUS_500 (&grpc_static_mdelem_table[72]) /* "strict-transport-security": "" */ #define GRPC_MDELEM_STRICT_TRANSPORT_SECURITY_EMPTY \ - (&grpc_static_mdelem_table[72]) + (&grpc_static_mdelem_table[73]) /* "te": "trailers" */ -#define GRPC_MDELEM_TE_TRAILERS (&grpc_static_mdelem_table[73]) +#define GRPC_MDELEM_TE_TRAILERS (&grpc_static_mdelem_table[74]) /* "transfer-encoding": "" */ -#define GRPC_MDELEM_TRANSFER_ENCODING_EMPTY (&grpc_static_mdelem_table[74]) +#define GRPC_MDELEM_TRANSFER_ENCODING_EMPTY (&grpc_static_mdelem_table[75]) /* "user-agent": "" */ -#define GRPC_MDELEM_USER_AGENT_EMPTY (&grpc_static_mdelem_table[75]) +#define GRPC_MDELEM_USER_AGENT_EMPTY (&grpc_static_mdelem_table[76]) /* "vary": "" */ -#define GRPC_MDELEM_VARY_EMPTY (&grpc_static_mdelem_table[76]) +#define GRPC_MDELEM_VARY_EMPTY (&grpc_static_mdelem_table[77]) /* "via": "" */ -#define GRPC_MDELEM_VIA_EMPTY (&grpc_static_mdelem_table[77]) +#define GRPC_MDELEM_VIA_EMPTY (&grpc_static_mdelem_table[78]) /* "www-authenticate": "" */ -#define GRPC_MDELEM_WWW_AUTHENTICATE_EMPTY (&grpc_static_mdelem_table[78]) +#define GRPC_MDELEM_WWW_AUTHENTICATE_EMPTY (&grpc_static_mdelem_table[79]) extern const uint8_t grpc_static_metadata_elem_indices[GRPC_STATIC_MDELEM_COUNT * 2]; diff --git a/test/core/end2end/fixtures/h2_loadreporting.c b/test/core/end2end/fixtures/h2_loadreporting.c index 13feba29f17..4ed02f97286 100644 --- a/test/core/end2end/fixtures/h2_loadreporting.c +++ b/test/core/end2end/fixtures/h2_loadreporting.c @@ -76,15 +76,26 @@ static grpc_end2end_test_fixture chttp2_create_fixture_fullstack( typedef struct { int64_t total_bytes; - bool processed; + bool fully_processed; + uint32_t initial_token; + uint32_t final_token; } aggregated_bw_stats; -static void sample_fn(const grpc_call_stats *stats, void *lr_data) { - aggregated_bw_stats *custom_stats = (aggregated_bw_stats *)lr_data; - custom_stats->total_bytes = - (int64_t)(stats->transport_stream_stats.outgoing.data_bytes + - stats->transport_stream_stats.incoming.data_bytes); - custom_stats->processed = true; +static void sample_fn(const grpc_load_reporting_call_data *call_data, + void *user_data) { + GPR_ASSERT(user_data != NULL); + aggregated_bw_stats *custom_stats = (aggregated_bw_stats *)user_data; + if (call_data == NULL) { + /* initial invocation */ + custom_stats->initial_token = 0xDEADBEEF; + } else { + /* final invocation */ + custom_stats->total_bytes = + (int64_t)(call_data->stats->transport_stream_stats.outgoing.data_bytes + + call_data->stats->transport_stream_stats.incoming.data_bytes); + custom_stats->final_token = 0xCAFED00D; + custom_stats->fully_processed = true; + } } void chttp2_init_client_fullstack(grpc_end2end_test_fixture *f, @@ -131,11 +142,11 @@ int main(int argc, char **argv) { aggregated_bw_stats *aggr_stats_client = gpr_malloc(sizeof(aggregated_bw_stats)); aggr_stats_client->total_bytes = -1; - aggr_stats_client->processed = false; + aggr_stats_client->fully_processed = false; aggregated_bw_stats *aggr_stats_server = gpr_malloc(sizeof(aggregated_bw_stats)); aggr_stats_server->total_bytes = -1; - aggr_stats_server->processed = false; + aggr_stats_server->fully_processed = false; g_client_lrc = grpc_load_reporting_config_create(sample_fn, aggr_stats_client); @@ -155,11 +166,15 @@ int main(int argc, char **argv) { grpc_load_reporting_config_destroy(g_client_lrc); grpc_load_reporting_config_destroy(g_server_lrc); - if (aggr_stats_client->processed) { + if (aggr_stats_client->fully_processed) { GPR_ASSERT(aggr_stats_client->total_bytes >= 0); + GPR_ASSERT(aggr_stats_client->initial_token == 0xDEADBEEF); + GPR_ASSERT(aggr_stats_client->final_token == 0xCAFED00D); } - if (aggr_stats_server->processed) { + if (aggr_stats_server->fully_processed) { GPR_ASSERT(aggr_stats_server->total_bytes >= 0); + GPR_ASSERT(aggr_stats_server->initial_token == 0xDEADBEEF); + GPR_ASSERT(aggr_stats_server->final_token == 0xCAFED00D); } gpr_free(aggr_stats_client); diff --git a/test/core/end2end/fuzzers/hpack.dictionary b/test/core/end2end/fuzzers/hpack.dictionary index b081368ff6d..097e9a89224 100644 --- a/test/core/end2end/fuzzers/hpack.dictionary +++ b/test/core/end2end/fuzzers/hpack.dictionary @@ -63,6 +63,7 @@ "\x13if-unmodified-since" "\x0Dlast-modified" "\x04link" +"\x0Eload-reporting" "\x08location" "\x0Cmax-forwards" "\x07:method" @@ -136,6 +137,7 @@ "\x00\x13if-unmodified-since\x00" "\x00\x0Dlast-modified\x00" "\x00\x04link\x00" +"\x00\x0Eload-reporting\x00" "\x00\x08location\x00" "\x00\x0Cmax-forwards\x00" "\x00\x07:method\x03GET" diff --git a/tools/codegen/core/gen_static_metadata.py b/tools/codegen/core/gen_static_metadata.py index b38555e3553..faa83867a61 100755 --- a/tools/codegen/core/gen_static_metadata.py +++ b/tools/codegen/core/gen_static_metadata.py @@ -108,6 +108,7 @@ CONFIG = [ ('if-range', ''), ('if-unmodified-since', ''), ('last-modified', ''), + ('load-reporting', ''), ('link', ''), ('location', ''), ('max-forwards', ''), From 604490973b219aa69ee67c252173fa60cadb24b1 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 4 May 2016 20:20:04 -0700 Subject: [PATCH 0288/1894] allocate grpc_pops on the stack --- src/core/lib/iomgr/pops.c | 42 ++++++++----------- src/core/lib/iomgr/pops.h | 14 +++++-- .../lib/security/google_default_credentials.c | 15 ++++--- src/core/lib/security/jwt_verifier.c | 7 ++-- src/core/lib/surface/call.c | 14 +++---- test/core/http/httpcli_test.c | 19 ++++----- test/core/http/httpscli_test.c | 19 ++++----- test/core/security/oauth2_utils.c | 13 +++--- .../print_google_default_creds_token.c | 11 +++-- test/core/util/port_server_client.c | 27 ++++++------ 10 files changed, 85 insertions(+), 96 deletions(-) diff --git a/src/core/lib/iomgr/pops.c b/src/core/lib/iomgr/pops.c index c2629f20aa6..611a728b9ec 100644 --- a/src/core/lib/iomgr/pops.c +++ b/src/core/lib/iomgr/pops.c @@ -36,50 +36,44 @@ #include "src/core/lib/iomgr/pops.h" -struct grpc_pops { - union { - grpc_pollset *pollset; - grpc_pollset_set *pollset_set; - } pops; - enum pops_tag { POLLSET, POLLSET_SET } tag; -}; - -grpc_pops *grpc_pops_create_from_pollset_set(grpc_pollset_set *pollset_set) { - grpc_pops *pops = gpr_malloc(sizeof(grpc_pops)); - pops->pops.pollset_set = pollset_set; - pops->tag = POLLSET_SET; +grpc_pops grpc_pops_create_from_pollset_set(grpc_pollset_set *pollset_set) { + grpc_pops pops; + pops.pops.pollset_set = pollset_set; + pops.tag = POPS_POLLSET_SET; return pops; } -grpc_pops *grpc_pops_create_from_pollset(grpc_pollset *pollset) { - grpc_pops *pops = gpr_malloc(sizeof(grpc_pops)); - pops->pops.pollset = pollset; - pops->tag = POLLSET; +grpc_pops grpc_pops_create_from_pollset(grpc_pollset *pollset) { + grpc_pops pops; + pops.pops.pollset = pollset; + pops.tag = POPS_POLLSET; return pops; } -void grpc_pops_destroy(grpc_pops *pops) { gpr_free(pops); } - grpc_pollset *grpc_pops_pollset(grpc_pops *pops) { - if (pops->tag == POLLSET) { + if (pops->tag == POPS_POLLSET) { return pops->pops.pollset; } return NULL; } grpc_pollset_set *grpc_pops_pollset_set(grpc_pops *pops) { - if (pops->tag == POLLSET_SET) { + if (pops->tag == POPS_POLLSET_SET) { return pops->pops.pollset_set; } return NULL; } +bool grpc_pops_is_empty(const grpc_pops *pops) { + return pops->tag == POPS_NONE; +} + void grpc_pops_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_pops *pops, grpc_pollset_set *pss_dst) { - if (pops->tag == POLLSET) { + if (pops->tag == POPS_POLLSET) { GPR_ASSERT(pops->pops.pollset != NULL); grpc_pollset_set_add_pollset(exec_ctx, pss_dst, pops->pops.pollset); - } else if (pops->tag == POLLSET_SET) { + } else if (pops->tag == POPS_POLLSET_SET) { GPR_ASSERT(pops->pops.pollset_set != NULL); grpc_pollset_set_add_pollset_set(exec_ctx, pss_dst, pops->pops.pollset_set); } else { @@ -90,10 +84,10 @@ void grpc_pops_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_pops *pops, void grpc_pops_del_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_pops *pops, grpc_pollset_set *pss_dst) { - if (pops->tag == POLLSET) { + if (pops->tag == POPS_POLLSET) { GPR_ASSERT(pops->pops.pollset != NULL); grpc_pollset_set_del_pollset(exec_ctx, pss_dst, pops->pops.pollset); - } else if (pops->tag == POLLSET_SET) { + } else if (pops->tag == POPS_POLLSET_SET) { GPR_ASSERT(pops->pops.pollset_set != NULL); grpc_pollset_set_del_pollset_set(exec_ctx, pss_dst, pops->pops.pollset_set); } else { diff --git a/src/core/lib/iomgr/pops.h b/src/core/lib/iomgr/pops.h index 24ff85748bc..68594276870 100644 --- a/src/core/lib/iomgr/pops.h +++ b/src/core/lib/iomgr/pops.h @@ -41,10 +41,16 @@ * accept a pollset XOR a pollset_set to do so through an abstract interface. * No ownership is taken. */ -typedef struct grpc_pops grpc_pops; +typedef struct grpc_pops { + union { + grpc_pollset *pollset; + grpc_pollset_set *pollset_set; + } pops; + enum pops_tag { POPS_NONE, POPS_POLLSET, POPS_POLLSET_SET } tag; +} grpc_pops; -grpc_pops *grpc_pops_create_from_pollset_set(grpc_pollset_set *pollset_set); -grpc_pops *grpc_pops_create_from_pollset(grpc_pollset *pollset); +grpc_pops grpc_pops_create_from_pollset_set(grpc_pollset_set *pollset_set); +grpc_pops grpc_pops_create_from_pollset(grpc_pollset *pollset); /** If \a pops contains a pollset, return it. Otherwise, return NULL */ grpc_pollset *grpc_pops_pollset(grpc_pops *pops); @@ -52,7 +58,7 @@ grpc_pollset *grpc_pops_pollset(grpc_pops *pops); /** If \a pops contains a pollset_set, return it. Otherwise, return NULL */ grpc_pollset_set *grpc_pops_pollset_set(grpc_pops *pops); -void grpc_pops_destroy(grpc_pops *pops); +bool grpc_pops_is_empty(const grpc_pops *pops); /** Add the pollset or pollset_set in \a pops to the destination pollset_set \a * pss_dst */ diff --git a/src/core/lib/security/google_default_credentials.c b/src/core/lib/security/google_default_credentials.c index 29045f36eb3..395a23b1a74 100644 --- a/src/core/lib/security/google_default_credentials.c +++ b/src/core/lib/security/google_default_credentials.c @@ -61,7 +61,7 @@ static gpr_once g_once = GPR_ONCE_INIT; static void init_default_credentials(void) { gpr_mu_init(&g_state_mu); } typedef struct { - grpc_pops *pops; + grpc_pops pops; int is_done; int success; } compute_engine_detector; @@ -85,7 +85,7 @@ static void on_compute_engine_detection_http_response( } gpr_mu_lock(g_polling_mu); detector->is_done = 1; - grpc_pollset_kick(grpc_pops_pollset(detector->pops), NULL); + grpc_pollset_kick(grpc_pops_pollset(&detector->pops), NULL); gpr_mu_unlock(g_polling_mu); } @@ -117,7 +117,7 @@ static int is_stack_running_on_compute_engine(void) { grpc_httpcli_context_init(&context); grpc_httpcli_get( - &exec_ctx, &context, detector.pops, &request, + &exec_ctx, &context, &detector.pops, &request, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), max_detection_delay), on_compute_engine_detection_http_response, &detector); @@ -128,7 +128,7 @@ static int is_stack_running_on_compute_engine(void) { gpr_mu_lock(g_polling_mu); while (!detector.is_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(detector.pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&detector.pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), gpr_inf_future(GPR_CLOCK_MONOTONIC)); } @@ -136,14 +136,13 @@ static int is_stack_running_on_compute_engine(void) { grpc_httpcli_context_destroy(&context); grpc_closure_init(&destroy_closure, destroy_pollset, - grpc_pops_pollset(detector.pops)); - grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(detector.pops), + grpc_pops_pollset(&detector.pops)); + grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(&detector.pops), &destroy_closure); grpc_exec_ctx_finish(&exec_ctx); g_polling_mu = NULL; - gpr_free(grpc_pops_pollset(detector.pops)); - grpc_pops_destroy(detector.pops); + gpr_free(grpc_pops_pollset(&detector.pops)); return detector.success; } diff --git a/src/core/lib/security/jwt_verifier.c b/src/core/lib/security/jwt_verifier.c index a5d200d7a30..1b6b7b175dd 100644 --- a/src/core/lib/security/jwt_verifier.c +++ b/src/core/lib/security/jwt_verifier.c @@ -322,7 +322,7 @@ grpc_jwt_verifier_status grpc_jwt_claims_check(const grpc_jwt_claims *claims, typedef struct { grpc_jwt_verifier *verifier; - grpc_pops *pops; + grpc_pops pops; jose_header *header; grpc_jwt_claims *claims; char *audience; @@ -360,7 +360,6 @@ void verifier_cb_ctx_destroy(verifier_cb_ctx *ctx) { gpr_slice_unref(ctx->signature); gpr_slice_unref(ctx->signed_data); jose_header_destroy(ctx->header); - grpc_pops_destroy(ctx->pops); /* TODO: see what to do with claims... */ gpr_free(ctx); } @@ -646,7 +645,7 @@ static void on_openid_config_retrieved(grpc_exec_ctx *exec_ctx, void *user_data, *(req.host + (req.http.path - jwks_uri)) = '\0'; } grpc_httpcli_get( - exec_ctx, &ctx->verifier->http_ctx, ctx->pops, &req, + exec_ctx, &ctx->verifier->http_ctx, &ctx->pops, &req, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay), on_keys_retrieved, ctx); grpc_json_destroy(json); @@ -749,7 +748,7 @@ static void retrieve_key_and_verify(grpc_exec_ctx *exec_ctx, } grpc_httpcli_get( - exec_ctx, &ctx->verifier->http_ctx, ctx->pops, &req, + exec_ctx, &ctx->verifier->http_ctx, &ctx->pops, &req, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay), http_cb, ctx); gpr_free(req.host); diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index cd6c1585ec7..c9e2d1d10fc 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -135,7 +135,7 @@ typedef struct batch_control { struct grpc_call { grpc_completion_queue *cq; - grpc_pops *pops; + grpc_pops pops; grpc_channel *channel; grpc_call *parent; grpc_call *first_child; @@ -292,9 +292,9 @@ grpc_call *grpc_call_create( if (pollset_set_alternative != NULL) { call->pops = grpc_pops_create_from_pollset_set(pollset_set_alternative); } - if (call->pops != NULL) { + if (!grpc_pops_is_empty(&call->pops)) { grpc_call_stack_set_pollset_or_pollset_set( - &exec_ctx, CALL_STACK_FROM_CALL(call), call->pops); + &exec_ctx, CALL_STACK_FROM_CALL(call), &call->pops); } if (parent_call != NULL) { GRPC_CALL_INTERNAL_REF(parent_call, "child"); @@ -350,18 +350,15 @@ void grpc_call_set_completion_queue(grpc_exec_ctx *exec_ctx, grpc_call *call, grpc_completion_queue *cq) { GPR_ASSERT(cq); - if (call->pops != NULL && grpc_pops_pollset_set(call->pops) != NULL) { + if (grpc_pops_pollset_set(&call->pops) != NULL) { gpr_log(GPR_ERROR, "A pollset_set is already registered for this call."); abort(); } call->cq = cq; GRPC_CQ_INTERNAL_REF(cq, "bind"); - if (call->pops != NULL) { - grpc_pops_destroy(call->pops); - } call->pops = grpc_pops_create_from_pollset(grpc_cq_pollset(cq)); grpc_call_stack_set_pollset_or_pollset_set( - exec_ctx, CALL_STACK_FROM_CALL(call), call->pops); + exec_ctx, CALL_STACK_FROM_CALL(call), &call->pops); } #ifdef GRPC_STREAM_REFCOUNT_DEBUG @@ -407,7 +404,6 @@ static void destroy_call(grpc_exec_ctx *exec_ctx, void *call, bool success) { if (c->cq) { GRPC_CQ_INTERNAL_UNREF(c->cq, "bind"); } - grpc_pops_destroy(c->pops); grpc_channel *channel = c->channel; grpc_call_stack_destroy(exec_ctx, CALL_STACK_FROM_CALL(c), c); GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, channel, "call"); diff --git a/test/core/http/httpcli_test.c b/test/core/http/httpcli_test.c index 6b9ec7fd94a..e517e371021 100644 --- a/test/core/http/httpcli_test.c +++ b/test/core/http/httpcli_test.c @@ -48,7 +48,7 @@ static int g_done = 0; static grpc_httpcli_context g_context; static gpr_mu *g_mu; -static grpc_pops *g_pops; +static grpc_pops g_pops; static gpr_timespec n_seconds_time(int seconds) { return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(seconds); @@ -66,7 +66,7 @@ static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, GPR_ASSERT(0 == memcmp(expect, response->body, response->body_length)); gpr_mu_lock(g_mu); g_done = 1; - grpc_pollset_kick(grpc_pops_pollset(g_pops), NULL); + grpc_pollset_kick(grpc_pops_pollset(&g_pops), NULL); gpr_mu_unlock(g_mu); } @@ -86,12 +86,12 @@ static void test_get(int port) { req.http.path = "/get"; req.handshaker = &grpc_httpcli_plaintext; - grpc_httpcli_get(&exec_ctx, &g_context, g_pops, &req, n_seconds_time(15), + grpc_httpcli_get(&exec_ctx, &g_context, &g_pops, &req, n_seconds_time(15), on_finish, (void *)42); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(g_pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&g_pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); @@ -117,12 +117,12 @@ static void test_post(int port) { req.http.path = "/post"; req.handshaker = &grpc_httpcli_plaintext; - grpc_httpcli_post(&exec_ctx, &g_context, g_pops, &req, "hello", 5, + grpc_httpcli_post(&exec_ctx, &g_context, &g_pops, &req, "hello", 5, n_seconds_time(15), on_finish, (void *)42); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(g_pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&g_pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); @@ -188,13 +188,12 @@ int main(int argc, char **argv) { test_post(port); grpc_httpcli_context_destroy(&g_context); - grpc_closure_init(&destroyed, destroy_pops, g_pops); - grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(g_pops), &destroyed); + grpc_closure_init(&destroyed, destroy_pops, &g_pops); + grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(&g_pops), &destroyed); grpc_exec_ctx_finish(&exec_ctx); grpc_shutdown(); - gpr_free(grpc_pops_pollset(g_pops)); - grpc_pops_destroy(g_pops); + gpr_free(grpc_pops_pollset(&g_pops)); gpr_subprocess_destroy(server); diff --git a/test/core/http/httpscli_test.c b/test/core/http/httpscli_test.c index ee2122e1c10..8943c492fb1 100644 --- a/test/core/http/httpscli_test.c +++ b/test/core/http/httpscli_test.c @@ -48,7 +48,7 @@ static int g_done = 0; static grpc_httpcli_context g_context; static gpr_mu *g_mu; -static grpc_pops *g_pops; +static grpc_pops g_pops; static gpr_timespec n_seconds_time(int seconds) { return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(seconds); @@ -66,7 +66,7 @@ static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, GPR_ASSERT(0 == memcmp(expect, response->body, response->body_length)); gpr_mu_lock(g_mu); g_done = 1; - grpc_pollset_kick(grpc_pops_pollset(g_pops), NULL); + grpc_pollset_kick(grpc_pops_pollset(&g_pops), NULL); gpr_mu_unlock(g_mu); } @@ -87,12 +87,12 @@ static void test_get(int port) { req.http.path = "/get"; req.handshaker = &grpc_httpcli_ssl; - grpc_httpcli_get(&exec_ctx, &g_context, g_pops, &req, n_seconds_time(15), + grpc_httpcli_get(&exec_ctx, &g_context, &g_pops, &req, n_seconds_time(15), on_finish, (void *)42); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(g_pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&g_pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); @@ -119,12 +119,12 @@ static void test_post(int port) { req.http.path = "/post"; req.handshaker = &grpc_httpcli_ssl; - grpc_httpcli_post(&exec_ctx, &g_context, g_pops, &req, "hello", 5, + grpc_httpcli_post(&exec_ctx, &g_context, &g_pops, &req, "hello", 5, n_seconds_time(15), on_finish, (void *)42); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(g_pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&g_pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); @@ -191,13 +191,12 @@ int main(int argc, char **argv) { test_post(port); grpc_httpcli_context_destroy(&g_context); - grpc_closure_init(&destroyed, destroy_pops, g_pops); - grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(g_pops), &destroyed); + grpc_closure_init(&destroyed, destroy_pops, &g_pops); + grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(&g_pops), &destroyed); grpc_exec_ctx_finish(&exec_ctx); grpc_shutdown(); - gpr_free(grpc_pops_pollset(g_pops)); - grpc_pops_destroy(g_pops); + gpr_free(grpc_pops_pollset(&g_pops)); gpr_subprocess_destroy(server); diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c index 2580757837d..b3fe738e977 100644 --- a/test/core/security/oauth2_utils.c +++ b/test/core/security/oauth2_utils.c @@ -46,7 +46,7 @@ typedef struct { gpr_mu *mu; - grpc_pops *pops; + grpc_pops pops; int is_done; char *token; } oauth2_request; @@ -70,7 +70,7 @@ static void on_oauth2_response(grpc_exec_ctx *exec_ctx, void *user_data, gpr_mu_lock(request->mu); request->is_done = 1; request->token = token; - grpc_pollset_kick(grpc_pops_pollset(request->pops), NULL); + grpc_pollset_kick(grpc_pops_pollset(&request->pops), NULL); gpr_mu_unlock(request->mu); } @@ -90,23 +90,22 @@ char *grpc_test_fetch_oauth2_token_with_credentials( grpc_closure_init(&do_nothing_closure, do_nothing, NULL); grpc_call_credentials_get_request_metadata( - &exec_ctx, creds, request.pops, null_ctx, on_oauth2_response, &request); + &exec_ctx, creds, &request.pops, null_ctx, on_oauth2_response, &request); grpc_exec_ctx_finish(&exec_ctx); gpr_mu_lock(request.mu); while (!request.is_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(request.pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&request.pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), gpr_inf_future(GPR_CLOCK_MONOTONIC)); } gpr_mu_unlock(request.mu); - grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(request.pops), + grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(&request.pops), &do_nothing_closure); grpc_exec_ctx_finish(&exec_ctx); - gpr_free(grpc_pops_pollset(request.pops)); - grpc_pops_destroy(request.pops); + gpr_free(grpc_pops_pollset(&request.pops)); return request.token; } diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c index 4f5038c045f..79e25498031 100644 --- a/test/core/security/print_google_default_creds_token.c +++ b/test/core/security/print_google_default_creds_token.c @@ -47,7 +47,7 @@ typedef struct { gpr_mu *mu; - grpc_pops *pops; + grpc_pops pops; int is_done; } synchronizer; @@ -66,7 +66,7 @@ static void on_metadata_response(grpc_exec_ctx *exec_ctx, void *user_data, } gpr_mu_lock(sync->mu); sync->is_done = 1; - grpc_pollset_kick(grpc_pops_pollset(sync->pops), NULL); + grpc_pollset_kick(grpc_pops_pollset(&sync->pops), NULL); gpr_mu_unlock(sync->mu); } @@ -100,12 +100,12 @@ int main(int argc, char **argv) { grpc_call_credentials_get_request_metadata( &exec_ctx, ((grpc_composite_channel_credentials *)creds)->call_creds, - sync.pops, context, on_metadata_response, &sync); + &sync.pops, context, on_metadata_response, &sync); gpr_mu_lock(sync.mu); while (!sync.is_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(sync.pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&sync.pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), gpr_inf_future(GPR_CLOCK_MONOTONIC)); gpr_mu_unlock(sync.mu); @@ -117,8 +117,7 @@ int main(int argc, char **argv) { grpc_exec_ctx_finish(&exec_ctx); grpc_channel_credentials_release(creds); - gpr_free(grpc_pops_pollset(sync.pops)); - grpc_pops_destroy(sync.pops); + gpr_free(grpc_pops_pollset(&sync.pops)); end: gpr_cmdline_destroy(cl); diff --git a/test/core/util/port_server_client.c b/test/core/util/port_server_client.c index e6cf35be94e..1bdef6e82b8 100644 --- a/test/core/util/port_server_client.c +++ b/test/core/util/port_server_client.c @@ -51,7 +51,7 @@ typedef struct freereq { gpr_mu *mu; - grpc_pops *pops; + grpc_pops pops; int done; } freereq; @@ -60,7 +60,6 @@ static void destroy_pops_and_shutdown(grpc_exec_ctx *exec_ctx, void *p, grpc_pollset *pollset = grpc_pops_pollset(p); grpc_pollset_destroy(pollset); gpr_free(pollset); - grpc_pops_destroy(p); grpc_shutdown(); } @@ -69,7 +68,7 @@ static void freed_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, freereq *pr = arg; gpr_mu_lock(pr->mu); pr->done = 1; - grpc_pollset_kick(grpc_pops_pollset(pr->pops), NULL); + grpc_pollset_kick(grpc_pops_pollset(&pr->pops), NULL); gpr_mu_unlock(pr->mu); } @@ -89,20 +88,20 @@ void grpc_free_port_using_server(char *server, int port) { grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(pollset, &pr.mu); pr.pops = grpc_pops_create_from_pollset(pollset); - shutdown_closure = grpc_closure_create(destroy_pops_and_shutdown, pr.pops); + shutdown_closure = grpc_closure_create(destroy_pops_and_shutdown, &pr.pops); req.host = server; gpr_asprintf(&path, "/drop/%d", port); req.http.path = path; grpc_httpcli_context_init(&context); - grpc_httpcli_get(&exec_ctx, &context, pr.pops, &req, + grpc_httpcli_get(&exec_ctx, &context, &pr.pops, &req, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), freed_port_from_server, &pr); gpr_mu_lock(pr.mu); while (!pr.done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(pr.pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&pr.pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1)); } @@ -110,7 +109,7 @@ void grpc_free_port_using_server(char *server, int port) { grpc_httpcli_context_destroy(&context); grpc_exec_ctx_finish(&exec_ctx); - grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(pr.pops), + grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(&pr.pops), shutdown_closure); grpc_exec_ctx_finish(&exec_ctx); gpr_free(path); @@ -118,7 +117,7 @@ void grpc_free_port_using_server(char *server, int port) { typedef struct portreq { gpr_mu *mu; - grpc_pops *pops; + grpc_pops pops; int port; int retries; char *server; @@ -154,7 +153,7 @@ static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, pr->retries++; req.host = pr->server; req.http.path = "/get"; - grpc_httpcli_get(exec_ctx, pr->ctx, pr->pops, &req, + grpc_httpcli_get(exec_ctx, pr->ctx, &pr->pops, &req, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), got_port_from_server, pr); return; @@ -168,7 +167,7 @@ static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, GPR_ASSERT(port > 1024); gpr_mu_lock(pr->mu); pr->port = port; - grpc_pollset_kick(grpc_pops_pollset(pr->pops), NULL); + grpc_pollset_kick(grpc_pops_pollset(&pr->pops), NULL); gpr_mu_unlock(pr->mu); } @@ -186,7 +185,7 @@ int grpc_pick_port_using_server(char *server) { grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(pollset, &pr.mu); pr.pops = grpc_pops_create_from_pollset(pollset); - shutdown_closure = grpc_closure_create(destroy_pops_and_shutdown, pr.pops); + shutdown_closure = grpc_closure_create(destroy_pops_and_shutdown, &pr.pops); pr.port = -1; pr.server = server; pr.ctx = &context; @@ -195,21 +194,21 @@ int grpc_pick_port_using_server(char *server) { req.http.path = "/get"; grpc_httpcli_context_init(&context); - grpc_httpcli_get(&exec_ctx, &context, pr.pops, &req, + grpc_httpcli_get(&exec_ctx, &context, &pr.pops, &req, GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), got_port_from_server, &pr); grpc_exec_ctx_finish(&exec_ctx); gpr_mu_lock(pr.mu); while (pr.port == -1) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(pr.pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&pr.pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1)); } gpr_mu_unlock(pr.mu); grpc_httpcli_context_destroy(&context); - grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(pr.pops), + grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(&pr.pops), shutdown_closure); grpc_exec_ctx_finish(&exec_ctx); From 9fcdc8765fe301d6828dd70ad83e45e59db39176 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 5 May 2016 06:15:34 +0200 Subject: [PATCH 0289/1894] Cleaning up includes. --- src/ruby/ext/grpc/rb_byte_buffer.c | 3 +-- src/ruby/ext/grpc/rb_call.c | 3 +-- src/ruby/ext/grpc/rb_call_credentials.c | 1 + src/ruby/ext/grpc/rb_channel.c | 3 +-- src/ruby/ext/grpc/rb_channel_args.c | 3 +-- src/ruby/ext/grpc/rb_channel_credentials.c | 5 ++--- src/ruby/ext/grpc/rb_completion_queue.c | 2 +- src/ruby/ext/grpc/rb_event_thread.c | 2 +- src/ruby/ext/grpc/rb_grpc.c | 2 +- src/ruby/ext/grpc/rb_server.c | 3 +-- src/ruby/ext/grpc/rb_server_credentials.c | 3 +-- 11 files changed, 12 insertions(+), 18 deletions(-) diff --git a/src/ruby/ext/grpc/rb_byte_buffer.c b/src/ruby/ext/grpc/rb_byte_buffer.c index cba910d832a..1172691116c 100644 --- a/src/ruby/ext/grpc/rb_byte_buffer.c +++ b/src/ruby/ext/grpc/rb_byte_buffer.c @@ -32,11 +32,10 @@ */ #include + #include "rb_grpc_imports.generated.h" #include "rb_byte_buffer.h" -#include - #include #include #include diff --git a/src/ruby/ext/grpc/rb_call.c b/src/ruby/ext/grpc/rb_call.c index 48c49a21e91..1b06273af9d 100644 --- a/src/ruby/ext/grpc/rb_call.c +++ b/src/ruby/ext/grpc/rb_call.c @@ -32,11 +32,10 @@ */ #include + #include "rb_grpc_imports.generated.h" #include "rb_call.h" -#include - #include #include diff --git a/src/ruby/ext/grpc/rb_call_credentials.c b/src/ruby/ext/grpc/rb_call_credentials.c index 615bf9415d5..79ca5b32ced 100644 --- a/src/ruby/ext/grpc/rb_call_credentials.c +++ b/src/ruby/ext/grpc/rb_call_credentials.c @@ -32,6 +32,7 @@ */ #include + #include "rb_grpc_imports.generated.h" #include "rb_call_credentials.h" diff --git a/src/ruby/ext/grpc/rb_channel.c b/src/ruby/ext/grpc/rb_channel.c index 984afad1073..013321ffc8a 100644 --- a/src/ruby/ext/grpc/rb_channel.c +++ b/src/ruby/ext/grpc/rb_channel.c @@ -32,11 +32,10 @@ */ #include + #include "rb_grpc_imports.generated.h" #include "rb_channel.h" -#include - #include #include #include diff --git a/src/ruby/ext/grpc/rb_channel_args.c b/src/ruby/ext/grpc/rb_channel_args.c index 2ffb8f41dae..87c0e0a7055 100644 --- a/src/ruby/ext/grpc/rb_channel_args.c +++ b/src/ruby/ext/grpc/rb_channel_args.c @@ -32,11 +32,10 @@ */ #include + #include "rb_grpc_imports.generated.h" #include "rb_channel_args.h" -#include - #include #include "rb_grpc.h" diff --git a/src/ruby/ext/grpc/rb_channel_credentials.c b/src/ruby/ext/grpc/rb_channel_credentials.c index 09bd3093a94..cbb23885aa6 100644 --- a/src/ruby/ext/grpc/rb_channel_credentials.c +++ b/src/ruby/ext/grpc/rb_channel_credentials.c @@ -31,14 +31,13 @@ * */ +#include + #include -#include #include "rb_grpc_imports.generated.h" #include "rb_channel_credentials.h" -#include - #include #include #include diff --git a/src/ruby/ext/grpc/rb_completion_queue.c b/src/ruby/ext/grpc/rb_completion_queue.c index 2a2eee190cd..4bb615f8bec 100644 --- a/src/ruby/ext/grpc/rb_completion_queue.c +++ b/src/ruby/ext/grpc/rb_completion_queue.c @@ -32,10 +32,10 @@ */ #include + #include "rb_grpc_imports.generated.h" #include "rb_completion_queue.h" -#include #include #include diff --git a/src/ruby/ext/grpc/rb_event_thread.c b/src/ruby/ext/grpc/rb_event_thread.c index 2649a1087f2..9e85bbcfbf2 100644 --- a/src/ruby/ext/grpc/rb_event_thread.c +++ b/src/ruby/ext/grpc/rb_event_thread.c @@ -32,12 +32,12 @@ */ #include + #include "rb_grpc_imports.generated.h" #include "rb_event_thread.h" #include -#include #include #include #include diff --git a/src/ruby/ext/grpc/rb_grpc.c b/src/ruby/ext/grpc/rb_grpc.c index acb47b00558..06a07ac6463 100644 --- a/src/ruby/ext/grpc/rb_grpc.c +++ b/src/ruby/ext/grpc/rb_grpc.c @@ -32,11 +32,11 @@ */ #include + #include "rb_grpc_imports.generated.h" #include "rb_grpc.h" #include -#include #include #include diff --git a/src/ruby/ext/grpc/rb_server.c b/src/ruby/ext/grpc/rb_server.c index 96e60c67763..2b3acaaf59c 100644 --- a/src/ruby/ext/grpc/rb_server.c +++ b/src/ruby/ext/grpc/rb_server.c @@ -32,11 +32,10 @@ */ #include + #include "rb_grpc_imports.generated.h" #include "rb_server.h" -#include - #include #include #include "rb_call.h" diff --git a/src/ruby/ext/grpc/rb_server_credentials.c b/src/ruby/ext/grpc/rb_server_credentials.c index b2d7280a30a..3b0fb6c910d 100644 --- a/src/ruby/ext/grpc/rb_server_credentials.c +++ b/src/ruby/ext/grpc/rb_server_credentials.c @@ -32,11 +32,10 @@ */ #include + #include "rb_grpc_imports.generated.h" #include "rb_server_credentials.h" -#include - #include #include From 74b41c0513c3c5fe8863342dd1097f6bf186896e Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 5 May 2016 07:38:03 -0700 Subject: [PATCH 0290/1894] fix C# distrib test after getting rid of grpc.native.csharp package --- test/distrib/csharp/DistribTest/DistribTest.csproj | 6 +++--- test/distrib/csharp/DistribTest/packages.config | 3 +-- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/test/distrib/csharp/DistribTest/DistribTest.csproj b/test/distrib/csharp/DistribTest/DistribTest.csproj index 7605495f0f6..1acb34d1b2e 100644 --- a/test/distrib/csharp/DistribTest/DistribTest.csproj +++ b/test/distrib/csharp/DistribTest/DistribTest.csproj @@ -113,12 +113,12 @@ - + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + @@ -129,4 +129,4 @@ --> - \ No newline at end of file + diff --git a/test/distrib/csharp/DistribTest/packages.config b/test/distrib/csharp/DistribTest/packages.config index aca09f600cb..69630193d02 100644 --- a/test/distrib/csharp/DistribTest/packages.config +++ b/test/distrib/csharp/DistribTest/packages.config @@ -6,11 +6,10 @@ - - \ No newline at end of file + From 4ead664c33bc4c613fc7c33f73e7bcf08cc37428 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 5 May 2016 08:01:40 -0700 Subject: [PATCH 0291/1894] small addendum for python distribtests --- test/distrib/python/run_distrib_test.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/test/distrib/python/run_distrib_test.sh b/test/distrib/python/run_distrib_test.sh index e20767a885f..6196e540c82 100755 --- a/test/distrib/python/run_distrib_test.sh +++ b/test/distrib/python/run_distrib_test.sh @@ -34,6 +34,7 @@ cd $(dirname $0) # Pick up the source dist archive whatever its version is BDIST_ARCHIVES=$EXTERNAL_GIT_ROOT/input_artifacts/grpcio-*.whl +TOOLS_BDIST_ARCHIVES=$EXTERNAL_GIT_ROOT/input_artifacts/grpcio_tools-*.whl if [ ! -f ${SDIST_ARCHIVE} ] then @@ -51,9 +52,12 @@ ${PIP} install --upgrade six pip # At least one of the bdist packages has to succeed (whichever one matches the # test machine, anyway). -for bdist in ${BDIST_ARCHIVES}; do +for bdist in ${BDIST_ARCHIVES} ${TOOLS_BDIST_ARCHIVES}; do ($PYTHON -m pip install $bdist) || true done -$PYTHON distribtest.py +# TODO(jtattermusch): add a .proto file to the distribtest, generate python +# code from it and then use the generated code from distribtest.py +$PYTHON -m grpc.protoc.compiler +$PYTHON distribtest.py From 781bab5399e91c99b70af3ec242c321585d22c07 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 5 May 2016 08:15:28 -0700 Subject: [PATCH 0292/1894] Error handling progress in chttp2 transport --- .../chttp2/transport/chttp2_transport.c | 85 ++- .../transport/chttp2/transport/frame_data.c | 58 +- .../transport/chttp2/transport/frame_data.h | 11 +- .../transport/chttp2/transport/frame_goaway.c | 37 +- .../transport/chttp2/transport/frame_goaway.h | 4 +- .../transport/chttp2/transport/frame_ping.c | 19 +- .../transport/chttp2/transport/frame_ping.h | 6 +- .../chttp2/transport/frame_rst_stream.c | 19 +- .../chttp2/transport/frame_rst_stream.h | 4 +- .../chttp2/transport/frame_settings.c | 44 +- .../chttp2/transport/frame_settings.h | 4 +- .../chttp2/transport/frame_window_update.c | 26 +- .../chttp2/transport/frame_window_update.h | 4 +- .../transport/chttp2/transport/hpack_parser.c | 632 ++++++++++-------- .../transport/chttp2/transport/hpack_parser.h | 14 +- .../transport/chttp2/transport/hpack_table.c | 44 +- .../transport/chttp2/transport/hpack_table.h | 9 +- .../ext/transport/chttp2/transport/internal.h | 7 +- src/core/lib/iomgr/closure.c | 14 +- src/core/lib/iomgr/closure.h | 8 +- src/core/lib/iomgr/error.c | 16 + src/core/lib/iomgr/error.h | 7 + src/core/lib/iomgr/exec_ctx.c | 4 +- 23 files changed, 615 insertions(+), 461 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index d49c56ab634..25d37711e5c 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -142,7 +142,8 @@ static void incoming_byte_stream_destroy_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_stream *s, void *byte_stream); static void fail_pending_writes(grpc_exec_ctx *exec_ctx, - grpc_chttp2_stream_global *stream_global); + grpc_chttp2_stream_global *stream_global, + grpc_error *error); /******************************************************************************* * CONSTRUCTION/DESTRUCTION/REFCOUNTING @@ -746,7 +747,7 @@ static void terminate_writing_with_lock(grpc_exec_ctx *exec_ctx, grpc_chttp2_stream_global *stream_global; while (grpc_chttp2_list_pop_closed_waiting_for_writing(&t->global, &stream_global)) { - fail_pending_writes(exec_ctx, stream_global); + fail_pending_writes(exec_ctx, stream_global, grpc_error_ref(error)); GRPC_CHTTP2_STREAM_UNREF(exec_ctx, stream_global, "finish_writes"); } @@ -844,34 +845,36 @@ static void maybe_start_some_streams( } #define CLOSURE_BARRIER_STATS_BIT (1 << 0) -#define CLOSURE_BARRIER_FAILURE_BIT (1 << 1) #define CLOSURE_BARRIER_FIRST_REF_BIT (1 << 16) static grpc_closure *add_closure_barrier(grpc_closure *closure) { - closure->final_data.scratch += CLOSURE_BARRIER_FIRST_REF_BIT; + closure->next_data.scratch += CLOSURE_BARRIER_FIRST_REF_BIT; return closure; } void grpc_chttp2_complete_closure_step(grpc_exec_ctx *exec_ctx, grpc_chttp2_stream_global *stream_global, - grpc_closure **pclosure, int success) { + grpc_closure **pclosure, + grpc_error *error) { grpc_closure *closure = *pclosure; if (closure == NULL) { return; } - closure->final_data.scratch -= CLOSURE_BARRIER_FIRST_REF_BIT; - if (!success) { - closure->final_data.scratch |= CLOSURE_BARRIER_FAILURE_BIT; + closure->next_data.scratch -= CLOSURE_BARRIER_FIRST_REF_BIT; + if (error != GRPC_ERROR_NONE) { + if (closure->error == GRPC_ERROR_NONE) { + closure->error = + GRPC_ERROR_CREATE("Error in HTTP transport completing operation"); + } + closure->error = grpc_error_add_child(closure->error, error); } - if (closure->final_data.scratch < CLOSURE_BARRIER_FIRST_REF_BIT) { - if (closure->final_data.scratch & CLOSURE_BARRIER_STATS_BIT) { + if (closure->next_data.scratch < CLOSURE_BARRIER_FIRST_REF_BIT) { + if (closure->next_data.scratch & CLOSURE_BARRIER_STATS_BIT) { grpc_transport_move_stats(&stream_global->stats, stream_global->collecting_stats); stream_global->collecting_stats = NULL; } - grpc_exec_ctx_push( - exec_ctx, closure, - (closure->final_data.scratch & CLOSURE_BARRIER_FAILURE_BIT) == 0, NULL); + grpc_exec_ctx_push(exec_ctx, closure, closure->error, NULL); } *pclosure = NULL; } @@ -906,12 +909,12 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, } /* use final_data as a barrier until enqueue time; the inital counter is dropped at the end of this function */ - on_complete->final_data.scratch = CLOSURE_BARRIER_FIRST_REF_BIT; + on_complete->next_data.scratch = CLOSURE_BARRIER_FIRST_REF_BIT; if (op->collect_stats != NULL) { GPR_ASSERT(stream_global->collecting_stats == NULL); stream_global->collecting_stats = op->collect_stats; - on_complete->final_data.scratch |= CLOSURE_BARRIER_STATS_BIT; + on_complete->next_data.scratch |= CLOSURE_BARRIER_STATS_BIT; } if (op->cancel_with_status != GRPC_STATUS_OK) { @@ -946,7 +949,9 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, } else { grpc_chttp2_complete_closure_step( exec_ctx, stream_global, - &stream_global->send_initial_metadata_finished, 0); + &stream_global->send_initial_metadata_finished, + GRPC_ERROR_CREATE( + "Attempt to send initial metadata after stream was closed")); } } @@ -956,7 +961,8 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, stream_global->send_message_finished = add_closure_barrier(on_complete); if (stream_global->write_closed) { grpc_chttp2_complete_closure_step( - exec_ctx, stream_global, &stream_global->send_message_finished, 0); + exec_ctx, stream_global, &stream_global->send_message_finished, + GRPC_ERROR_CREATE("Attempt to send message after stream was closed")); } else { stream_global->send_message = op->send_message; if (stream_global->id != 0) { @@ -978,7 +984,10 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_complete_closure_step( exec_ctx, stream_global, &stream_global->send_trailing_metadata_finished, - grpc_metadata_batch_is_empty(op->send_trailing_metadata)); + grpc_metadata_batch_is_empty(op->send_trailing_metadata) + ? GRPC_ERROR_NONE + : GRPC_ERROR_CREATE("Attempt to send trailing metadata after " + "stream was closed")); } else if (stream_global->id != 0) { /* TODO(ctiller): check if there's flow control for any outstanding bytes before going writable */ @@ -1016,7 +1025,8 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); } - grpc_chttp2_complete_closure_step(exec_ctx, stream_global, &on_complete, 1); + grpc_chttp2_complete_closure_step(exec_ctx, stream_global, &on_complete, + GRPC_ERROR_NONE); GPR_TIMER_END("perform_stream_op_locked", 0); } @@ -1185,7 +1195,7 @@ static void check_read_ops(grpc_exec_ctx *exec_ctx, stream_global->recv_trailing_metadata); grpc_chttp2_complete_closure_step( exec_ctx, stream_global, - &stream_global->recv_trailing_metadata_finished, 1); + &stream_global->recv_trailing_metadata_finished, GRPC_ERROR_NONE); } } } @@ -1256,8 +1266,10 @@ static void cancel_from_api(grpc_exec_ctx *exec_ctx, stream_global->seen_error = 1; grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); } - grpc_chttp2_mark_stream_closed(exec_ctx, transport_global, stream_global, 1, - 1); + grpc_chttp2_mark_stream_closed( + exec_ctx, transport_global, stream_global, 1, 1, + grpc_error_set_int(GRPC_ERROR_CREATE("Cancelled"), + GRPC_ERROR_INT_GRPC_STATUS, status)); } void grpc_chttp2_fake_status(grpc_exec_ctx *exec_ctx, @@ -1298,23 +1310,25 @@ void grpc_chttp2_fake_status(grpc_exec_ctx *exec_ctx, } static void fail_pending_writes(grpc_exec_ctx *exec_ctx, - grpc_chttp2_stream_global *stream_global) { + grpc_chttp2_stream_global *stream_global, + grpc_error *error) { grpc_chttp2_complete_closure_step( exec_ctx, stream_global, &stream_global->send_initial_metadata_finished, - 0); + grpc_error_ref(error)); grpc_chttp2_complete_closure_step( exec_ctx, stream_global, &stream_global->send_trailing_metadata_finished, - 0); - grpc_chttp2_complete_closure_step(exec_ctx, stream_global, - &stream_global->send_message_finished, 0); + grpc_error_ref(error)); + grpc_chttp2_complete_closure_step( + exec_ctx, stream_global, &stream_global->send_message_finished, error); } void grpc_chttp2_mark_stream_closed( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, - grpc_chttp2_stream_global *stream_global, int close_reads, - int close_writes) { + grpc_chttp2_stream_global *stream_global, int close_reads, int close_writes, + grpc_error *error) { if (stream_global->read_closed && stream_global->write_closed) { /* already closed */ + grpc_error_unref(error); return; } grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); @@ -1331,7 +1345,7 @@ void grpc_chttp2_mark_stream_closed( grpc_chttp2_list_add_closed_waiting_for_writing(transport_global, stream_global); } else { - fail_pending_writes(exec_ctx, stream_global); + fail_pending_writes(exec_ctx, stream_global, grpc_error_ref(error)); } } if (stream_global->read_closed && stream_global->write_closed) { @@ -1347,6 +1361,7 @@ void grpc_chttp2_mark_stream_closed( GRPC_CHTTP2_STREAM_UNREF(exec_ctx, stream_global, "chttp2"); } } + grpc_error_unref(error); } static void close_from_api(grpc_exec_ctx *exec_ctx, @@ -1451,8 +1466,16 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, } grpc_chttp2_fake_status(exec_ctx, transport_global, stream_global, status, optional_message); + grpc_error *err = GRPC_ERROR_CREATE("Stream closed"); + err = grpc_error_set_int(err, GRPC_ERROR_INT_GRPC_STATUS, status); + if (optional_message) { + char *str = + gpr_dump_slice(*optional_message, GPR_DUMP_HEX | GPR_DUMP_ASCII); + err = grpc_error_set_str(err, GRPC_ERROR_STR_GRPC_MESSAGE, str); + gpr_free(str); + } grpc_chttp2_mark_stream_closed(exec_ctx, transport_global, stream_global, 1, - 1); + 1, err); } static void cancel_stream_cb(grpc_chttp2_transport_global *transport_global, diff --git a/src/core/ext/transport/chttp2/transport/frame_data.c b/src/core/ext/transport/chttp2/transport/frame_data.c index 3a6d80e0a32..828d0427ac5 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.c +++ b/src/core/ext/transport/chttp2/transport/frame_data.c @@ -37,16 +37,16 @@ #include #include +#include #include #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/lib/support/string.h" #include "src/core/lib/transport/transport.h" -grpc_chttp2_parse_error grpc_chttp2_data_parser_init( - grpc_chttp2_data_parser *parser) { +grpc_error *grpc_chttp2_data_parser_init(grpc_chttp2_data_parser *parser) { parser->state = GRPC_CHTTP2_DATA_FH_0; parser->parsing_frame = NULL; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } void grpc_chttp2_data_parser_destroy(grpc_exec_ctx *exec_ctx, @@ -62,11 +62,16 @@ void grpc_chttp2_data_parser_destroy(grpc_exec_ctx *exec_ctx, } } -grpc_chttp2_parse_error grpc_chttp2_data_parser_begin_frame( - grpc_chttp2_data_parser *parser, uint8_t flags) { +grpc_error *grpc_chttp2_data_parser_begin_frame(grpc_chttp2_data_parser *parser, + uint8_t flags, + uint32_t stream_id) { if (flags & ~GRPC_CHTTP2_DATA_FLAG_END_STREAM) { - gpr_log(GPR_ERROR, "unsupported data flags: 0x%02x", flags); - return GRPC_CHTTP2_STREAM_ERROR; + char *msg; + gpr_asprintf(&msg, "unsupported data flags: 0x%02x", flags); + grpc_error *err = grpc_error_set_int(GRPC_ERROR_CREATE(msg), + GRPC_ERROR_INT_STREAM_ID, stream_id); + gpr_free(msg); + return err; } if (flags & GRPC_CHTTP2_DATA_FLAG_END_STREAM) { @@ -75,7 +80,7 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_begin_frame( parser->is_last_frame = 0; } - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } void grpc_chttp2_incoming_frame_queue_merge( @@ -139,7 +144,7 @@ void grpc_chttp2_encode_data(uint32_t id, gpr_slice_buffer *inbuf, stats->data_bytes += write_bytes; } -grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( +grpc_error *grpc_chttp2_data_parser_parse( grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { @@ -149,19 +154,20 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( grpc_chttp2_data_parser *p = parser; uint32_t message_flags; grpc_chttp2_incoming_byte_stream *incoming_byte_stream; + char *msg; if (is_last && p->is_last_frame) { stream_parsing->received_close = 1; } if (cur == end) { - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } switch (p->state) { case GRPC_CHTTP2_DATA_ERROR: p->state = GRPC_CHTTP2_DATA_ERROR; - return GRPC_CHTTP2_STREAM_ERROR; + return grpc_error_ref(p->error); fh_0: case GRPC_CHTTP2_DATA_FH_0: stream_parsing->stats.incoming.framing_bytes++; @@ -174,13 +180,23 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( p->is_frame_compressed = 1; /* GPR_TRUE */ break; default: - gpr_log(GPR_ERROR, "Bad GRPC frame type 0x%02x", p->frame_type); + gpr_asprintf(&msg, "Bad GRPC frame type 0x%02x", p->frame_type); + p->error = GRPC_ERROR_CREATE(msg); + p->error = grpc_error_set_int(p->error, GRPC_ERROR_INT_STREAM_ID, + stream_parsing->id); + gpr_free(msg); + msg = gpr_dump_slice(slice, GPR_DUMP_HEX | GPR_DUMP_ASCII); + p->error = + grpc_error_set_str(p->error, GRPC_ERROR_STR_RAW_BYTES, msg); + gpr_free(msg); + p->error = + grpc_error_set_int(p->error, GRPC_ERROR_INT_OFFSET, cur - beg); p->state = GRPC_CHTTP2_DATA_ERROR; - return GRPC_CHTTP2_STREAM_ERROR; + return grpc_error_ref(p->error); } if (++cur == end) { p->state = GRPC_CHTTP2_DATA_FH_1; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } /* fallthrough */ case GRPC_CHTTP2_DATA_FH_1: @@ -188,7 +204,7 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( p->frame_size = ((uint32_t)*cur) << 24; if (++cur == end) { p->state = GRPC_CHTTP2_DATA_FH_2; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } /* fallthrough */ case GRPC_CHTTP2_DATA_FH_2: @@ -196,7 +212,7 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( p->frame_size |= ((uint32_t)*cur) << 16; if (++cur == end) { p->state = GRPC_CHTTP2_DATA_FH_3; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } /* fallthrough */ case GRPC_CHTTP2_DATA_FH_3: @@ -204,7 +220,7 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( p->frame_size |= ((uint32_t)*cur) << 8; if (++cur == end) { p->state = GRPC_CHTTP2_DATA_FH_4; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } /* fallthrough */ case GRPC_CHTTP2_DATA_FH_4: @@ -225,7 +241,7 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, stream_parsing); if (cur == end) { - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } uint32_t remaining = (uint32_t)(end - cur); if (remaining == p->frame_size) { @@ -237,7 +253,7 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( 1); p->parsing_frame = NULL; p->state = GRPC_CHTTP2_DATA_FH_0; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } else if (remaining > p->frame_size) { stream_parsing->stats.incoming.data_bytes += p->frame_size; grpc_chttp2_incoming_byte_stream_push( @@ -256,9 +272,9 @@ grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( gpr_slice_sub(slice, (size_t)(cur - beg), (size_t)(end - beg))); p->frame_size -= remaining; stream_parsing->stats.incoming.data_bytes += remaining; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } } - GPR_UNREACHABLE_CODE(return GRPC_CHTTP2_CONNECTION_ERROR); + GPR_UNREACHABLE_CODE(return GRPC_ERROR_CREATE("Should never reach here")); } diff --git a/src/core/ext/transport/chttp2/transport/frame_data.h b/src/core/ext/transport/chttp2/transport/frame_data.h index af71f483a21..a21a7942b94 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.h +++ b/src/core/ext/transport/chttp2/transport/frame_data.h @@ -66,6 +66,7 @@ typedef struct { uint8_t is_last_frame; uint8_t frame_type; uint32_t frame_size; + grpc_error *error; int is_frame_compressed; grpc_chttp2_incoming_frame_queue incoming_frames; @@ -79,19 +80,19 @@ grpc_byte_stream *grpc_chttp2_incoming_frame_queue_pop( grpc_chttp2_incoming_frame_queue *q); /* initialize per-stream state for data frame parsing */ -grpc_chttp2_parse_error grpc_chttp2_data_parser_init( - grpc_chttp2_data_parser *parser); +grpc_error *grpc_chttp2_data_parser_init(grpc_chttp2_data_parser *parser); void grpc_chttp2_data_parser_destroy(grpc_exec_ctx *exec_ctx, grpc_chttp2_data_parser *parser); /* start processing a new data frame */ -grpc_chttp2_parse_error grpc_chttp2_data_parser_begin_frame( - grpc_chttp2_data_parser *parser, uint8_t flags); +grpc_error *grpc_chttp2_data_parser_begin_frame(grpc_chttp2_data_parser *parser, + uint8_t flags, + uint32_t stream_id); /* handle a slice of a data frame - is_last indicates the last slice of a frame */ -grpc_chttp2_parse_error grpc_chttp2_data_parser_parse( +grpc_error *grpc_chttp2_data_parser_parse( grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.c b/src/core/ext/transport/chttp2/transport/frame_goaway.c index 69accb7696d..c985169f51a 100644 --- a/src/core/ext/transport/chttp2/transport/frame_goaway.c +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.c @@ -38,6 +38,7 @@ #include #include +#include void grpc_chttp2_goaway_parser_init(grpc_chttp2_goaway_parser *p) { p->debug_data = NULL; @@ -47,11 +48,15 @@ void grpc_chttp2_goaway_parser_destroy(grpc_chttp2_goaway_parser *p) { gpr_free(p->debug_data); } -grpc_chttp2_parse_error grpc_chttp2_goaway_parser_begin_frame( - grpc_chttp2_goaway_parser *p, uint32_t length, uint8_t flags) { +grpc_error *grpc_chttp2_goaway_parser_begin_frame(grpc_chttp2_goaway_parser *p, + uint32_t length, + uint8_t flags) { if (length < 8) { - gpr_log(GPR_ERROR, "goaway frame too short (%d bytes)", length); - return GRPC_CHTTP2_CONNECTION_ERROR; + char *msg; + gpr_asprintf(&msg, "goaway frame too short (%d bytes)", length); + grpc_error *err = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return err; } gpr_free(p->debug_data); @@ -59,10 +64,10 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_begin_frame( p->debug_data = gpr_malloc(p->debug_length); p->debug_pos = 0; p->state = GRPC_CHTTP2_GOAWAY_LSI0; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } -grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( +grpc_error *grpc_chttp2_goaway_parser_parse( grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { @@ -75,7 +80,7 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( case GRPC_CHTTP2_GOAWAY_LSI0: if (cur == end) { p->state = GRPC_CHTTP2_GOAWAY_LSI0; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } p->last_stream_id = ((uint32_t)*cur) << 24; ++cur; @@ -83,7 +88,7 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( case GRPC_CHTTP2_GOAWAY_LSI1: if (cur == end) { p->state = GRPC_CHTTP2_GOAWAY_LSI1; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } p->last_stream_id |= ((uint32_t)*cur) << 16; ++cur; @@ -91,7 +96,7 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( case GRPC_CHTTP2_GOAWAY_LSI2: if (cur == end) { p->state = GRPC_CHTTP2_GOAWAY_LSI2; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } p->last_stream_id |= ((uint32_t)*cur) << 8; ++cur; @@ -99,7 +104,7 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( case GRPC_CHTTP2_GOAWAY_LSI3: if (cur == end) { p->state = GRPC_CHTTP2_GOAWAY_LSI3; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } p->last_stream_id |= ((uint32_t)*cur); ++cur; @@ -107,7 +112,7 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( case GRPC_CHTTP2_GOAWAY_ERR0: if (cur == end) { p->state = GRPC_CHTTP2_GOAWAY_ERR0; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } p->error_code = ((uint32_t)*cur) << 24; ++cur; @@ -115,7 +120,7 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( case GRPC_CHTTP2_GOAWAY_ERR1: if (cur == end) { p->state = GRPC_CHTTP2_GOAWAY_ERR1; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } p->error_code |= ((uint32_t)*cur) << 16; ++cur; @@ -123,7 +128,7 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( case GRPC_CHTTP2_GOAWAY_ERR2: if (cur == end) { p->state = GRPC_CHTTP2_GOAWAY_ERR2; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } p->error_code |= ((uint32_t)*cur) << 8; ++cur; @@ -131,7 +136,7 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( case GRPC_CHTTP2_GOAWAY_ERR3: if (cur == end) { p->state = GRPC_CHTTP2_GOAWAY_ERR3; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } p->error_code |= ((uint32_t)*cur); ++cur; @@ -150,9 +155,9 @@ grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( gpr_slice_new(p->debug_data, p->debug_length, gpr_free); p->debug_data = NULL; } - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } - GPR_UNREACHABLE_CODE(return GRPC_CHTTP2_CONNECTION_ERROR); + GPR_UNREACHABLE_CODE(return GRPC_ERROR_CREATE("Should never reach here")); } void grpc_chttp2_goaway_append(uint32_t last_stream_id, uint32_t error_code, diff --git a/src/core/ext/transport/chttp2/transport/frame_goaway.h b/src/core/ext/transport/chttp2/transport/frame_goaway.h index 7c38b26a39b..eb4303405ae 100644 --- a/src/core/ext/transport/chttp2/transport/frame_goaway.h +++ b/src/core/ext/transport/chttp2/transport/frame_goaway.h @@ -63,9 +63,9 @@ typedef struct { void grpc_chttp2_goaway_parser_init(grpc_chttp2_goaway_parser *p); void grpc_chttp2_goaway_parser_destroy(grpc_chttp2_goaway_parser *p); -grpc_chttp2_parse_error grpc_chttp2_goaway_parser_begin_frame( +grpc_error *grpc_chttp2_goaway_parser_begin_frame( grpc_chttp2_goaway_parser *parser, uint32_t length, uint8_t flags); -grpc_chttp2_parse_error grpc_chttp2_goaway_parser_parse( +grpc_error *grpc_chttp2_goaway_parser_parse( grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.c b/src/core/ext/transport/chttp2/transport/frame_ping.c index 7e1815f0fee..1f814ab1bdc 100644 --- a/src/core/ext/transport/chttp2/transport/frame_ping.c +++ b/src/core/ext/transport/chttp2/transport/frame_ping.c @@ -38,6 +38,7 @@ #include #include +#include gpr_slice grpc_chttp2_ping_create(uint8_t ack, uint8_t *opaque_8bytes) { gpr_slice slice = gpr_slice_malloc(9 + 8); @@ -57,18 +58,22 @@ gpr_slice grpc_chttp2_ping_create(uint8_t ack, uint8_t *opaque_8bytes) { return slice; } -grpc_chttp2_parse_error grpc_chttp2_ping_parser_begin_frame( - grpc_chttp2_ping_parser *parser, uint32_t length, uint8_t flags) { +grpc_error *grpc_chttp2_ping_parser_begin_frame(grpc_chttp2_ping_parser *parser, + uint32_t length, + uint8_t flags) { if (flags & 0xfe || length != 8) { - gpr_log(GPR_ERROR, "invalid ping: length=%d, flags=%02x", length, flags); - return GRPC_CHTTP2_CONNECTION_ERROR; + char *msg; + gpr_asprintf(&msg, "invalid ping: length=%d, flags=%02x", length, flags); + grpc_error *error = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return error; } parser->byte = 0; parser->is_ack = flags; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } -grpc_chttp2_parse_error grpc_chttp2_ping_parser_parse( +grpc_error *grpc_chttp2_ping_parser_parse( grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { @@ -93,5 +98,5 @@ grpc_chttp2_parse_error grpc_chttp2_ping_parser_parse( } } - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } diff --git a/src/core/ext/transport/chttp2/transport/frame_ping.h b/src/core/ext/transport/chttp2/transport/frame_ping.h index 4f7fcc13058..5a8723421c2 100644 --- a/src/core/ext/transport/chttp2/transport/frame_ping.h +++ b/src/core/ext/transport/chttp2/transport/frame_ping.h @@ -46,9 +46,9 @@ typedef struct { gpr_slice grpc_chttp2_ping_create(uint8_t ack, uint8_t *opaque_8bytes); -grpc_chttp2_parse_error grpc_chttp2_ping_parser_begin_frame( - grpc_chttp2_ping_parser *parser, uint32_t length, uint8_t flags); -grpc_chttp2_parse_error grpc_chttp2_ping_parser_parse( +grpc_error *grpc_chttp2_ping_parser_begin_frame(grpc_chttp2_ping_parser *parser, + uint32_t length, uint8_t flags); +grpc_error *grpc_chttp2_ping_parser_parse( grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c index 22467e9ddd2..d49df0fcc2f 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c @@ -34,7 +34,9 @@ #include "src/core/ext/transport/chttp2/transport/frame_rst_stream.h" #include "src/core/ext/transport/chttp2/transport/internal.h" +#include #include +#include #include "src/core/ext/transport/chttp2/transport/frame.h" @@ -62,18 +64,21 @@ gpr_slice grpc_chttp2_rst_stream_create(uint32_t id, uint32_t code, return slice; } -grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_begin_frame( +grpc_error *grpc_chttp2_rst_stream_parser_begin_frame( grpc_chttp2_rst_stream_parser *parser, uint32_t length, uint8_t flags) { if (length != 4) { - gpr_log(GPR_ERROR, "invalid rst_stream: length=%d, flags=%02x", length, - flags); - return GRPC_CHTTP2_CONNECTION_ERROR; + char *msg; + gpr_asprintf(&msg, "invalid rst_stream: length=%d, flags=%02x", length, + flags); + grpc_error *err = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return err; } parser->byte = 0; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } -grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_parse( +grpc_error *grpc_chttp2_rst_stream_parser_parse( grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { @@ -99,5 +104,5 @@ grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_parse( (((uint32_t)p->reason_bytes[3])); } - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h index 9c1e756a943..11cf94f3ea7 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.h +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.h @@ -47,9 +47,9 @@ typedef struct { gpr_slice grpc_chttp2_rst_stream_create(uint32_t stream_id, uint32_t code, grpc_transport_one_way_stats *stats); -grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_begin_frame( +grpc_error *grpc_chttp2_rst_stream_parser_begin_frame( grpc_chttp2_rst_stream_parser *parser, uint32_t length, uint8_t flags); -grpc_chttp2_parse_error grpc_chttp2_rst_stream_parser_parse( +grpc_error *grpc_chttp2_rst_stream_parser_parse( grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.c b/src/core/ext/transport/chttp2/transport/frame_settings.c index a3c1e15f35e..04b96c4cd95 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.c +++ b/src/core/ext/transport/chttp2/transport/frame_settings.c @@ -36,7 +36,9 @@ #include +#include #include +#include #include #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" @@ -118,7 +120,7 @@ gpr_slice grpc_chttp2_settings_ack_create(void) { return output; } -grpc_chttp2_parse_error grpc_chttp2_settings_parser_begin_frame( +grpc_error *grpc_chttp2_settings_parser_begin_frame( grpc_chttp2_settings_parser *parser, uint32_t length, uint8_t flags, uint32_t *settings) { parser->target_settings = settings; @@ -129,31 +131,29 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_begin_frame( if (flags == GRPC_CHTTP2_FLAG_ACK) { parser->is_ack = 1; if (length != 0) { - gpr_log(GPR_ERROR, "non-empty settings ack frame received"); - return GRPC_CHTTP2_CONNECTION_ERROR; + return GRPC_ERROR_CREATE("non-empty settings ack frame received"); } - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } else if (flags != 0) { - gpr_log(GPR_ERROR, "invalid flags on settings frame"); - return GRPC_CHTTP2_CONNECTION_ERROR; + return GRPC_ERROR_CREATE("invalid flags on settings frame"); } else if (length % 6 != 0) { - gpr_log(GPR_ERROR, "settings frames must be a multiple of six bytes"); - return GRPC_CHTTP2_CONNECTION_ERROR; + return GRPC_ERROR_CREATE("settings frames must be a multiple of six bytes"); } else { - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } } -grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( +grpc_error *grpc_chttp2_settings_parser_parse( grpc_exec_ctx *exec_ctx, void *p, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { grpc_chttp2_settings_parser *parser = p; const uint8_t *cur = GPR_SLICE_START_PTR(slice); const uint8_t *end = GPR_SLICE_END_PTR(slice); + char *msg; if (parser->is_ack) { - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } for (;;) { @@ -168,7 +168,7 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( gpr_slice_buffer_add(&transport_parsing->qbuf, grpc_chttp2_settings_ack_create()); } - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } parser->id = (uint16_t)(((uint16_t)*cur) << 8); cur++; @@ -176,7 +176,7 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( case GRPC_CHTTP2_SPS_ID1: if (cur == end) { parser->state = GRPC_CHTTP2_SPS_ID1; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } parser->id = (uint16_t)(parser->id | (*cur)); cur++; @@ -184,7 +184,7 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( case GRPC_CHTTP2_SPS_VAL0: if (cur == end) { parser->state = GRPC_CHTTP2_SPS_VAL0; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } parser->value = ((uint32_t)*cur) << 24; cur++; @@ -192,7 +192,7 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( case GRPC_CHTTP2_SPS_VAL1: if (cur == end) { parser->state = GRPC_CHTTP2_SPS_VAL1; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } parser->value |= ((uint32_t)*cur) << 16; cur++; @@ -200,7 +200,7 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( case GRPC_CHTTP2_SPS_VAL2: if (cur == end) { parser->state = GRPC_CHTTP2_SPS_VAL2; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } parser->value |= ((uint32_t)*cur) << 8; cur++; @@ -208,7 +208,7 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( case GRPC_CHTTP2_SPS_VAL3: if (cur == end) { parser->state = GRPC_CHTTP2_SPS_VAL3; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } else { parser->state = GRPC_CHTTP2_SPS_ID0; } @@ -229,9 +229,11 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( transport_parsing->last_incoming_stream_id, sp->error_value, gpr_slice_from_static_string("HTTP2 settings error"), &transport_parsing->qbuf); - gpr_log(GPR_ERROR, "invalid value %u passed for %s", - parser->value, sp->name); - return GRPC_CHTTP2_CONNECTION_ERROR; + gpr_asprintf(&msg, "invalid value %u passed for %s", + parser->value, sp->name); + grpc_error *err = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return err; } } if (parser->id == GRPC_CHTTP2_SETTINGS_INITIAL_WINDOW_SIZE && @@ -249,7 +251,7 @@ grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( transport_parsing->is_client ? "CLI" : "SVR", parser->id, parser->value); } - } else { + } else if (grpc_http_trace) { gpr_log(GPR_ERROR, "CHTTP2: Ignoring unknown setting %d (value %d)", parser->id, parser->value); } diff --git a/src/core/ext/transport/chttp2/transport/frame_settings.h b/src/core/ext/transport/chttp2/transport/frame_settings.h index d9e30f1ed07..f654c598c8e 100644 --- a/src/core/ext/transport/chttp2/transport/frame_settings.h +++ b/src/core/ext/transport/chttp2/transport/frame_settings.h @@ -92,10 +92,10 @@ gpr_slice grpc_chttp2_settings_create(uint32_t *old, const uint32_t *new, /* Create an ack settings frame */ gpr_slice grpc_chttp2_settings_ack_create(void); -grpc_chttp2_parse_error grpc_chttp2_settings_parser_begin_frame( +grpc_error *grpc_chttp2_settings_parser_begin_frame( grpc_chttp2_settings_parser *parser, uint32_t length, uint8_t flags, uint32_t *settings); -grpc_chttp2_parse_error grpc_chttp2_settings_parser_parse( +grpc_error *grpc_chttp2_settings_parser_parse( grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.c b/src/core/ext/transport/chttp2/transport/frame_window_update.c index 90243418bde..3cf848fd5cb 100644 --- a/src/core/ext/transport/chttp2/transport/frame_window_update.c +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.c @@ -34,7 +34,9 @@ #include "src/core/ext/transport/chttp2/transport/frame_window_update.h" #include "src/core/ext/transport/chttp2/transport/internal.h" +#include #include +#include gpr_slice grpc_chttp2_window_update_create( uint32_t id, uint32_t window_update, grpc_transport_one_way_stats *stats) { @@ -62,19 +64,22 @@ gpr_slice grpc_chttp2_window_update_create( return slice; } -grpc_chttp2_parse_error grpc_chttp2_window_update_parser_begin_frame( +grpc_error *grpc_chttp2_window_update_parser_begin_frame( grpc_chttp2_window_update_parser *parser, uint32_t length, uint8_t flags) { if (flags || length != 4) { - gpr_log(GPR_ERROR, "invalid window update: length=%d, flags=%02x", length, - flags); - return GRPC_CHTTP2_CONNECTION_ERROR; + char *msg; + gpr_asprintf(&msg, "invalid window update: length=%d, flags=%02x", length, + flags); + grpc_error *err = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return err; } parser->byte = 0; parser->amount = 0; - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } -grpc_chttp2_parse_error grpc_chttp2_window_update_parser_parse( +grpc_error *grpc_chttp2_window_update_parser_parse( grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { @@ -96,8 +101,11 @@ grpc_chttp2_parse_error grpc_chttp2_window_update_parser_parse( if (p->byte == 4) { uint32_t received_update = p->amount; if (received_update == 0 || (received_update & 0x80000000u)) { - gpr_log(GPR_ERROR, "invalid window update bytes: %d", p->amount); - return GRPC_CHTTP2_CONNECTION_ERROR; + char *msg; + gpr_asprintf(&msg, "invalid window update bytes: %d", p->amount); + grpc_error *err = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return err; } GPR_ASSERT(is_last); @@ -115,5 +123,5 @@ grpc_chttp2_parse_error grpc_chttp2_window_update_parser_parse( } } - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } diff --git a/src/core/ext/transport/chttp2/transport/frame_window_update.h b/src/core/ext/transport/chttp2/transport/frame_window_update.h index d6e87b9329f..1bcbbf92478 100644 --- a/src/core/ext/transport/chttp2/transport/frame_window_update.h +++ b/src/core/ext/transport/chttp2/transport/frame_window_update.h @@ -48,9 +48,9 @@ typedef struct { gpr_slice grpc_chttp2_window_update_create(uint32_t id, uint32_t window_delta, grpc_transport_one_way_stats *stats); -grpc_chttp2_parse_error grpc_chttp2_window_update_parser_begin_frame( +grpc_error *grpc_chttp2_window_update_parser_begin_frame( grpc_chttp2_window_update_parser *parser, uint32_t length, uint8_t flags); -grpc_chttp2_parse_error grpc_chttp2_window_update_parser_parse( +grpc_error *grpc_chttp2_window_update_parser_parse( grpc_exec_ctx *exec_ctx, void *parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.c b/src/core/ext/transport/chttp2/transport/hpack_parser.c index 687936bfd35..993c6d02043 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.c +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.c @@ -46,6 +46,7 @@ #include #include #include +#include #include #include "src/core/ext/transport/chttp2/transport/bin_encoder.h" @@ -77,63 +78,70 @@ typedef enum { a set of indirect jumps, and so not waste stack space. */ /* forward declarations for parsing states */ -static int parse_begin(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end); -static int parse_error(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end); -static int parse_illegal_op(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end); - -static int parse_string_prefix(grpc_chttp2_hpack_parser *p, const uint8_t *cur, +static grpc_error *parse_begin(grpc_chttp2_hpack_parser *p, const uint8_t *cur, const uint8_t *end); -static int parse_key_string(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end); -static int parse_value_string_with_indexed_key(grpc_chttp2_hpack_parser *p, - const uint8_t *cur, - const uint8_t *end); -static int parse_value_string_with_literal_key(grpc_chttp2_hpack_parser *p, - const uint8_t *cur, - const uint8_t *end); - -static int parse_value0(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end); -static int parse_value1(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end); -static int parse_value2(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end); -static int parse_value3(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end); -static int parse_value4(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end); -static int parse_value5up(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end); - -static int parse_indexed_field(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end); -static int parse_indexed_field_x(grpc_chttp2_hpack_parser *p, - const uint8_t *cur, const uint8_t *end); -static int parse_lithdr_incidx(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end); -static int parse_lithdr_incidx_x(grpc_chttp2_hpack_parser *p, - const uint8_t *cur, const uint8_t *end); -static int parse_lithdr_incidx_v(grpc_chttp2_hpack_parser *p, - const uint8_t *cur, const uint8_t *end); -static int parse_lithdr_notidx(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end); -static int parse_lithdr_notidx_x(grpc_chttp2_hpack_parser *p, - const uint8_t *cur, const uint8_t *end); -static int parse_lithdr_notidx_v(grpc_chttp2_hpack_parser *p, - const uint8_t *cur, const uint8_t *end); -static int parse_lithdr_nvridx(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end); -static int parse_lithdr_nvridx_x(grpc_chttp2_hpack_parser *p, - const uint8_t *cur, const uint8_t *end); -static int parse_lithdr_nvridx_v(grpc_chttp2_hpack_parser *p, - const uint8_t *cur, const uint8_t *end); -static int parse_max_tbl_size(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end); -static int parse_max_tbl_size_x(grpc_chttp2_hpack_parser *p, const uint8_t *cur, +static grpc_error *parse_error(grpc_chttp2_hpack_parser *p, const uint8_t *cur, + const uint8_t *end, grpc_error *error); +static grpc_error *still_parse_error(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end); +static grpc_error *parse_illegal_op(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end); + +static grpc_error *parse_string_prefix(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end); +static grpc_error *parse_key_string(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end); +static grpc_error *parse_value_string_with_indexed_key( + grpc_chttp2_hpack_parser *p, const uint8_t *cur, const uint8_t *end); +static grpc_error *parse_value_string_with_literal_key( + grpc_chttp2_hpack_parser *p, const uint8_t *cur, const uint8_t *end); + +static grpc_error *parse_value0(grpc_chttp2_hpack_parser *p, const uint8_t *cur, + const uint8_t *end); +static grpc_error *parse_value1(grpc_chttp2_hpack_parser *p, const uint8_t *cur, + const uint8_t *end); +static grpc_error *parse_value2(grpc_chttp2_hpack_parser *p, const uint8_t *cur, + const uint8_t *end); +static grpc_error *parse_value3(grpc_chttp2_hpack_parser *p, const uint8_t *cur, const uint8_t *end); +static grpc_error *parse_value4(grpc_chttp2_hpack_parser *p, const uint8_t *cur, + const uint8_t *end); +static grpc_error *parse_value5up(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end); + +static grpc_error *parse_indexed_field(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end); +static grpc_error *parse_indexed_field_x(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end); +static grpc_error *parse_lithdr_incidx(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end); +static grpc_error *parse_lithdr_incidx_x(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end); +static grpc_error *parse_lithdr_incidx_v(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end); +static grpc_error *parse_lithdr_notidx(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end); +static grpc_error *parse_lithdr_notidx_x(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end); +static grpc_error *parse_lithdr_notidx_v(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end); +static grpc_error *parse_lithdr_nvridx(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end); +static grpc_error *parse_lithdr_nvridx_x(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end); +static grpc_error *parse_lithdr_nvridx_v(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end); +static grpc_error *parse_max_tbl_size(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end); +static grpc_error *parse_max_tbl_size_x(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end); /* we translate the first byte of a hpack field into one of these decoding cases, then use a lookup table to jump directly to the appropriate parser. @@ -631,19 +639,18 @@ static const uint8_t inverse_base64[256] = { }; /* emission helpers */ -static int on_hdr(grpc_chttp2_hpack_parser *p, grpc_mdelem *md, - int add_to_table) { +static grpc_error *on_hdr(grpc_chttp2_hpack_parser *p, grpc_mdelem *md, + int add_to_table) { if (add_to_table) { - if (!grpc_chttp2_hptbl_add(&p->table, md)) { - return 0; - } + grpc_error *err = grpc_chttp2_hptbl_add(&p->table, md); + if (err != GRPC_ERROR_NONE) return err; } if (p->on_header == NULL) { GRPC_MDELEM_UNREF(md); - return 0; + return GRPC_ERROR_CREATE("on_header callback not set"); } p->on_header(p->on_header_user_data, md); - return 1; + return GRPC_ERROR_NONE; } static grpc_mdstr *take_string(grpc_chttp2_hpack_parser *p, @@ -654,70 +661,70 @@ static grpc_mdstr *take_string(grpc_chttp2_hpack_parser *p, } /* jump to the next state */ -static int parse_next(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_next(grpc_chttp2_hpack_parser *p, const uint8_t *cur, + const uint8_t *end) { p->state = *p->next_state++; return p->state(p, cur, end); } /* begin parsing a header: all functionality is encoded into lookup tables above */ -static int parse_begin(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_begin(grpc_chttp2_hpack_parser *p, const uint8_t *cur, + const uint8_t *end) { if (cur == end) { p->state = parse_begin; - return 1; + return GRPC_ERROR_NONE; } return first_byte_action[first_byte_lut[*cur]](p, cur, end); } /* stream dependency and prioritization data: we just skip it */ -static int parse_stream_weight(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_stream_weight(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end) { if (cur == end) { p->state = parse_stream_weight; - return 1; + return GRPC_ERROR_NONE; } return p->after_prioritization(p, cur + 1, end); } -static int parse_stream_dep3(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_stream_dep3(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end) { if (cur == end) { p->state = parse_stream_dep3; - return 1; + return GRPC_ERROR_NONE; } return parse_stream_weight(p, cur + 1, end); } -static int parse_stream_dep2(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_stream_dep2(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end) { if (cur == end) { p->state = parse_stream_dep2; - return 1; + return GRPC_ERROR_NONE; } return parse_stream_dep3(p, cur + 1, end); } -static int parse_stream_dep1(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_stream_dep1(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end) { if (cur == end) { p->state = parse_stream_dep1; - return 1; + return GRPC_ERROR_NONE; } return parse_stream_dep2(p, cur + 1, end); } -static int parse_stream_dep0(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_stream_dep0(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end) { if (cur == end) { p->state = parse_stream_dep0; - return 1; + return GRPC_ERROR_NONE; } return parse_stream_dep1(p, cur + 1, end); @@ -725,30 +732,34 @@ static int parse_stream_dep0(grpc_chttp2_hpack_parser *p, const uint8_t *cur, /* emit an indexed field; for now just logs it to console; jumps to begin the next field on completion */ -static int finish_indexed_field(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *finish_indexed_field(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end) { grpc_mdelem *md = grpc_chttp2_hptbl_lookup(&p->table, p->index); if (md == NULL) { - if (grpc_http_trace) { - gpr_log(GPR_ERROR, "Invalid HPACK index received: %d", p->index); - } - return 0; + return grpc_error_set_int( + grpc_error_set_int(GRPC_ERROR_CREATE("Invalid HPACK index received"), + GRPC_ERROR_INT_INDEX, p->index), + GRPC_ERROR_INT_SIZE, p->table.num_ents); } GRPC_MDELEM_REF(md); - return on_hdr(p, md, 0) && parse_begin(p, cur, end); + grpc_error *err = on_hdr(p, md, 0); + if (err != GRPC_ERROR_NONE) return err; + return parse_begin(p, cur, end); } /* parse an indexed field with index < 127 */ -static int parse_indexed_field(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_indexed_field(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end) { p->dynamic_table_update_allowed = 0; p->index = (*cur) & 0x7f; return finish_indexed_field(p, cur + 1, end); } /* parse an indexed field with index >= 127 */ -static int parse_indexed_field_x(grpc_chttp2_hpack_parser *p, - const uint8_t *cur, const uint8_t *end) { +static grpc_error *parse_indexed_field_x(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end) { static const grpc_chttp2_hpack_parser_state and_then[] = { finish_indexed_field}; p->dynamic_table_update_allowed = 0; @@ -760,28 +771,34 @@ static int parse_indexed_field_x(grpc_chttp2_hpack_parser *p, /* finish a literal header with incremental indexing: just log, and jump to ' begin */ -static int finish_lithdr_incidx(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *finish_lithdr_incidx(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end) { grpc_mdelem *md = grpc_chttp2_hptbl_lookup(&p->table, p->index); GPR_ASSERT(md != NULL); /* handled in string parsing */ - return on_hdr(p, grpc_mdelem_from_metadata_strings(GRPC_MDSTR_REF(md->key), - take_string(p, &p->value)), - 1) && - parse_begin(p, cur, end); + grpc_error *err = + on_hdr(p, grpc_mdelem_from_metadata_strings(GRPC_MDSTR_REF(md->key), + take_string(p, &p->value)), + 1); + if (err != GRPC_ERROR_NONE) return err; + return parse_begin(p, cur, end); } /* finish a literal header with incremental indexing with no index */ -static int finish_lithdr_incidx_v(grpc_chttp2_hpack_parser *p, - const uint8_t *cur, const uint8_t *end) { - return on_hdr(p, grpc_mdelem_from_metadata_strings(take_string(p, &p->key), - take_string(p, &p->value)), - 1) && - parse_begin(p, cur, end); +static grpc_error *finish_lithdr_incidx_v(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end) { + grpc_error *err = + on_hdr(p, grpc_mdelem_from_metadata_strings(take_string(p, &p->key), + take_string(p, &p->value)), + 1); + if (err != GRPC_ERROR_NONE) return err; + return parse_begin(p, cur, end); } /* parse a literal header with incremental indexing; index < 63 */ -static int parse_lithdr_incidx(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_lithdr_incidx(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end) { static const grpc_chttp2_hpack_parser_state and_then[] = { parse_value_string_with_indexed_key, finish_lithdr_incidx}; p->dynamic_table_update_allowed = 0; @@ -791,8 +808,9 @@ static int parse_lithdr_incidx(grpc_chttp2_hpack_parser *p, const uint8_t *cur, } /* parse a literal header with incremental indexing; index >= 63 */ -static int parse_lithdr_incidx_x(grpc_chttp2_hpack_parser *p, - const uint8_t *cur, const uint8_t *end) { +static grpc_error *parse_lithdr_incidx_x(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end) { static const grpc_chttp2_hpack_parser_state and_then[] = { parse_string_prefix, parse_value_string_with_indexed_key, finish_lithdr_incidx}; @@ -804,8 +822,9 @@ static int parse_lithdr_incidx_x(grpc_chttp2_hpack_parser *p, } /* parse a literal header with incremental indexing; index = 0 */ -static int parse_lithdr_incidx_v(grpc_chttp2_hpack_parser *p, - const uint8_t *cur, const uint8_t *end) { +static grpc_error *parse_lithdr_incidx_v(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end) { static const grpc_chttp2_hpack_parser_state and_then[] = { parse_key_string, parse_string_prefix, parse_value_string_with_literal_key, finish_lithdr_incidx_v}; @@ -815,28 +834,34 @@ static int parse_lithdr_incidx_v(grpc_chttp2_hpack_parser *p, } /* finish a literal header without incremental indexing */ -static int finish_lithdr_notidx(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *finish_lithdr_notidx(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end) { grpc_mdelem *md = grpc_chttp2_hptbl_lookup(&p->table, p->index); GPR_ASSERT(md != NULL); /* handled in string parsing */ - return on_hdr(p, grpc_mdelem_from_metadata_strings(GRPC_MDSTR_REF(md->key), - take_string(p, &p->value)), - 0) && - parse_begin(p, cur, end); + grpc_error *err = + on_hdr(p, grpc_mdelem_from_metadata_strings(GRPC_MDSTR_REF(md->key), + take_string(p, &p->value)), + 0); + if (err != GRPC_ERROR_NONE) return err; + return parse_begin(p, cur, end); } /* finish a literal header without incremental indexing with index = 0 */ -static int finish_lithdr_notidx_v(grpc_chttp2_hpack_parser *p, - const uint8_t *cur, const uint8_t *end) { - return on_hdr(p, grpc_mdelem_from_metadata_strings(take_string(p, &p->key), - take_string(p, &p->value)), - 0) && - parse_begin(p, cur, end); +static grpc_error *finish_lithdr_notidx_v(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end) { + grpc_error *err = + on_hdr(p, grpc_mdelem_from_metadata_strings(take_string(p, &p->key), + take_string(p, &p->value)), + 0); + if (err != GRPC_ERROR_NONE) return err; + return parse_begin(p, cur, end); } /* parse a literal header without incremental indexing; index < 15 */ -static int parse_lithdr_notidx(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_lithdr_notidx(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end) { static const grpc_chttp2_hpack_parser_state and_then[] = { parse_value_string_with_indexed_key, finish_lithdr_notidx}; p->dynamic_table_update_allowed = 0; @@ -846,8 +871,9 @@ static int parse_lithdr_notidx(grpc_chttp2_hpack_parser *p, const uint8_t *cur, } /* parse a literal header without incremental indexing; index >= 15 */ -static int parse_lithdr_notidx_x(grpc_chttp2_hpack_parser *p, - const uint8_t *cur, const uint8_t *end) { +static grpc_error *parse_lithdr_notidx_x(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end) { static const grpc_chttp2_hpack_parser_state and_then[] = { parse_string_prefix, parse_value_string_with_indexed_key, finish_lithdr_notidx}; @@ -859,8 +885,9 @@ static int parse_lithdr_notidx_x(grpc_chttp2_hpack_parser *p, } /* parse a literal header without incremental indexing; index == 0 */ -static int parse_lithdr_notidx_v(grpc_chttp2_hpack_parser *p, - const uint8_t *cur, const uint8_t *end) { +static grpc_error *parse_lithdr_notidx_v(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end) { static const grpc_chttp2_hpack_parser_state and_then[] = { parse_key_string, parse_string_prefix, parse_value_string_with_literal_key, finish_lithdr_notidx_v}; @@ -870,28 +897,34 @@ static int parse_lithdr_notidx_v(grpc_chttp2_hpack_parser *p, } /* finish a literal header that is never indexed */ -static int finish_lithdr_nvridx(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *finish_lithdr_nvridx(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end) { grpc_mdelem *md = grpc_chttp2_hptbl_lookup(&p->table, p->index); GPR_ASSERT(md != NULL); /* handled in string parsing */ - return on_hdr(p, grpc_mdelem_from_metadata_strings(GRPC_MDSTR_REF(md->key), - take_string(p, &p->value)), - 0) && - parse_begin(p, cur, end); + grpc_error *err = + on_hdr(p, grpc_mdelem_from_metadata_strings(GRPC_MDSTR_REF(md->key), + take_string(p, &p->value)), + 0); + if (err != GRPC_ERROR_NONE) return err; + return parse_begin(p, cur, end); } /* finish a literal header that is never indexed with an extra value */ -static int finish_lithdr_nvridx_v(grpc_chttp2_hpack_parser *p, - const uint8_t *cur, const uint8_t *end) { - return on_hdr(p, grpc_mdelem_from_metadata_strings(take_string(p, &p->key), - take_string(p, &p->value)), - 0) && - parse_begin(p, cur, end); +static grpc_error *finish_lithdr_nvridx_v(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end) { + grpc_error *err = + on_hdr(p, grpc_mdelem_from_metadata_strings(take_string(p, &p->key), + take_string(p, &p->value)), + 0); + if (err != GRPC_ERROR_NONE) return err; + return parse_begin(p, cur, end); } /* parse a literal header that is never indexed; index < 15 */ -static int parse_lithdr_nvridx(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_lithdr_nvridx(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end) { static const grpc_chttp2_hpack_parser_state and_then[] = { parse_value_string_with_indexed_key, finish_lithdr_nvridx}; p->dynamic_table_update_allowed = 0; @@ -901,8 +934,9 @@ static int parse_lithdr_nvridx(grpc_chttp2_hpack_parser *p, const uint8_t *cur, } /* parse a literal header that is never indexed; index >= 15 */ -static int parse_lithdr_nvridx_x(grpc_chttp2_hpack_parser *p, - const uint8_t *cur, const uint8_t *end) { +static grpc_error *parse_lithdr_nvridx_x(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end) { static const grpc_chttp2_hpack_parser_state and_then[] = { parse_string_prefix, parse_value_string_with_indexed_key, finish_lithdr_nvridx}; @@ -914,8 +948,9 @@ static int parse_lithdr_nvridx_x(grpc_chttp2_hpack_parser *p, } /* parse a literal header that is never indexed; index == 0 */ -static int parse_lithdr_nvridx_v(grpc_chttp2_hpack_parser *p, - const uint8_t *cur, const uint8_t *end) { +static grpc_error *parse_lithdr_nvridx_v(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end) { static const grpc_chttp2_hpack_parser_state and_then[] = { parse_key_string, parse_string_prefix, parse_value_string_with_literal_key, finish_lithdr_nvridx_v}; @@ -925,20 +960,23 @@ static int parse_lithdr_nvridx_v(grpc_chttp2_hpack_parser *p, } /* finish parsing a max table size change */ -static int finish_max_tbl_size(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *finish_max_tbl_size(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end) { if (grpc_http_trace) { gpr_log(GPR_INFO, "MAX TABLE SIZE: %d", p->index); } - return grpc_chttp2_hptbl_set_current_table_size(&p->table, p->index) && - parse_begin(p, cur, end); + grpc_error *err = + grpc_chttp2_hptbl_set_current_table_size(&p->table, p->index); + if (err != GRPC_ERROR_NONE) return err; + return parse_begin(p, cur, end); } /* parse a max table size change, max size < 15 */ -static int parse_max_tbl_size(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_max_tbl_size(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end) { if (p->dynamic_table_update_allowed == 0) { - return 0; + return GRPC_ERROR_CREATE( + "More than two max table size changes in a single frame"); } p->dynamic_table_update_allowed--; p->index = (*cur) & 0x1f; @@ -946,12 +984,14 @@ static int parse_max_tbl_size(grpc_chttp2_hpack_parser *p, const uint8_t *cur, } /* parse a max table size change, max size >= 15 */ -static int parse_max_tbl_size_x(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_max_tbl_size_x(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, + const uint8_t *end) { static const grpc_chttp2_hpack_parser_state and_then[] = { finish_max_tbl_size}; if (p->dynamic_table_update_allowed == 0) { - return 0; + return GRPC_ERROR_CREATE( + "More than two max table size changes in a single frame"); } p->dynamic_table_update_allowed--; p->next_state = and_then; @@ -961,28 +1001,36 @@ static int parse_max_tbl_size_x(grpc_chttp2_hpack_parser *p, const uint8_t *cur, } /* a parse error: jam the parse state into parse_error, and return error */ -static int parse_error(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { - p->state = parse_error; - return 0; +static grpc_error *parse_error(grpc_chttp2_hpack_parser *p, const uint8_t *cur, + const uint8_t *end, grpc_error *err) { + GPR_ASSERT(err != GRPC_ERROR_NONE); + p->last_error = grpc_error_ref(err); + p->state = still_parse_error; + return err; +} + +static grpc_error *still_parse_error(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end) { + return grpc_error_ref(p->last_error); } -static int parse_illegal_op(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_illegal_op(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end) { GPR_ASSERT(cur != end); - if (grpc_http_trace) { - gpr_log(GPR_DEBUG, "Illegal hpack op code %d", *cur); - } - return parse_error(p, cur, end); + char *msg; + gpr_asprintf(&msg, "Illegal hpack op code %d", *cur); + grpc_error *err = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return parse_error(p, cur, end, err); } /* parse the 1st byte of a varint into p->parsing.value no overflow is possible */ -static int parse_value0(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_value0(grpc_chttp2_hpack_parser *p, const uint8_t *cur, + const uint8_t *end) { if (cur == end) { p->state = parse_value0; - return 1; + return GRPC_ERROR_NONE; } *p->parsing.value += (*cur) & 0x7f; @@ -996,11 +1044,11 @@ static int parse_value0(grpc_chttp2_hpack_parser *p, const uint8_t *cur, /* parse the 2nd byte of a varint into p->parsing.value no overflow is possible */ -static int parse_value1(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_value1(grpc_chttp2_hpack_parser *p, const uint8_t *cur, + const uint8_t *end) { if (cur == end) { p->state = parse_value1; - return 1; + return GRPC_ERROR_NONE; } *p->parsing.value += (((uint32_t)*cur) & 0x7f) << 7; @@ -1014,11 +1062,11 @@ static int parse_value1(grpc_chttp2_hpack_parser *p, const uint8_t *cur, /* parse the 3rd byte of a varint into p->parsing.value no overflow is possible */ -static int parse_value2(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_value2(grpc_chttp2_hpack_parser *p, const uint8_t *cur, + const uint8_t *end) { if (cur == end) { p->state = parse_value2; - return 1; + return GRPC_ERROR_NONE; } *p->parsing.value += (((uint32_t)*cur) & 0x7f) << 14; @@ -1032,11 +1080,11 @@ static int parse_value2(grpc_chttp2_hpack_parser *p, const uint8_t *cur, /* parse the 4th byte of a varint into p->parsing.value no overflow is possible */ -static int parse_value3(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_value3(grpc_chttp2_hpack_parser *p, const uint8_t *cur, + const uint8_t *end) { if (cur == end) { p->state = parse_value3; - return 1; + return GRPC_ERROR_NONE; } *p->parsing.value += (((uint32_t)*cur) & 0x7f) << 21; @@ -1050,15 +1098,16 @@ static int parse_value3(grpc_chttp2_hpack_parser *p, const uint8_t *cur, /* parse the 5th byte of a varint into p->parsing.value depending on the byte, we may overflow, and care must be taken */ -static int parse_value4(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_value4(grpc_chttp2_hpack_parser *p, const uint8_t *cur, + const uint8_t *end) { uint8_t c; uint32_t cur_value; uint32_t add_value; + char *msg; if (cur == end) { p->state = parse_value4; - return 1; + return GRPC_ERROR_NONE; } c = (*cur) & 0x7f; @@ -1081,48 +1130,49 @@ static int parse_value4(grpc_chttp2_hpack_parser *p, const uint8_t *cur, } error: - if (grpc_http_trace) { - gpr_log(GPR_ERROR, - "integer overflow in hpack integer decoding: have 0x%08x, " - "got byte 0x%02x on byte 5", - *p->parsing.value, *cur); - } - return parse_error(p, cur, end); + gpr_asprintf(&msg, + "integer overflow in hpack integer decoding: have 0x%08x, " + "got byte 0x%02x on byte 5", + *p->parsing.value, *cur); + grpc_error *err = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return parse_error(p, cur, end, err); } /* parse any trailing bytes in a varint: it's possible to append an arbitrary number of 0x80's and not affect the value - a zero will terminate - and anything else will overflow */ -static int parse_value5up(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_value5up(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end) { while (cur != end && *cur == 0x80) { ++cur; } if (cur == end) { p->state = parse_value5up; - return 1; + return GRPC_ERROR_NONE; } if (*cur == 0) { return parse_next(p, cur + 1, end); } - if (grpc_http_trace) { - gpr_log(GPR_ERROR, - "integer overflow in hpack integer decoding: have 0x%08x, " - "got byte 0x%02x sometime after byte 5", - *p->parsing.value, *cur); - } - return parse_error(p, cur, end); + char *msg; + gpr_asprintf(&msg, + "integer overflow in hpack integer decoding: have 0x%08x, " + "got byte 0x%02x sometime after byte 5", + *p->parsing.value, *cur); + grpc_error *err = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return parse_error(p, cur, end, err); } /* parse a string prefix */ -static int parse_string_prefix(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_string_prefix(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end) { if (cur == end) { p->state = parse_string_prefix; - return 1; + return GRPC_ERROR_NONE; } p->strlen = (*cur) & 0x7f; @@ -1148,25 +1198,25 @@ static void append_bytes(grpc_chttp2_hpack_parser_string *str, str->length += (uint32_t)length; } -static int append_string(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *append_string(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end) { grpc_chttp2_hpack_parser_string *str = p->parsing.str; uint32_t bits; uint8_t decoded[3]; switch ((binary_state)p->binary) { case NOT_BINARY: append_bytes(str, cur, (size_t)(end - cur)); - return 1; + return GRPC_ERROR_NONE; b64_byte0: case B64_BYTE0: if (cur == end) { p->binary = B64_BYTE0; - return 1; + return GRPC_ERROR_NONE; } bits = inverse_base64[*cur]; ++cur; if (bits == 255) - return 0; + return GRPC_ERROR_CREATE("Illegal base64 character"); else if (bits == 64) goto b64_byte0; p->base64_buffer = bits << 18; @@ -1175,12 +1225,12 @@ static int append_string(grpc_chttp2_hpack_parser *p, const uint8_t *cur, case B64_BYTE1: if (cur == end) { p->binary = B64_BYTE1; - return 1; + return GRPC_ERROR_NONE; } bits = inverse_base64[*cur]; ++cur; if (bits == 255) - return 0; + return GRPC_ERROR_CREATE("Illegal base64 character"); else if (bits == 64) goto b64_byte1; p->base64_buffer |= bits << 12; @@ -1189,12 +1239,12 @@ static int append_string(grpc_chttp2_hpack_parser *p, const uint8_t *cur, case B64_BYTE2: if (cur == end) { p->binary = B64_BYTE2; - return 1; + return GRPC_ERROR_NONE; } bits = inverse_base64[*cur]; ++cur; if (bits == 255) - return 0; + return GRPC_ERROR_CREATE("Illegal base64 character"); else if (bits == 64) goto b64_byte2; p->base64_buffer |= bits << 6; @@ -1203,12 +1253,12 @@ static int append_string(grpc_chttp2_hpack_parser *p, const uint8_t *cur, case B64_BYTE3: if (cur == end) { p->binary = B64_BYTE3; - return 1; + return GRPC_ERROR_NONE; } bits = inverse_base64[*cur]; ++cur; if (bits == 255) - return 0; + return GRPC_ERROR_CREATE("Illegal base64 character"); else if (bits == 64) goto b64_byte3; p->base64_buffer |= bits; @@ -1219,11 +1269,11 @@ static int append_string(grpc_chttp2_hpack_parser *p, const uint8_t *cur, append_bytes(str, decoded, 3); goto b64_byte0; } - GPR_UNREACHABLE_CODE(return 1); + GPR_UNREACHABLE_CODE(return GRPC_ERROR_CREATE("Should never reach here")); } /* append a null terminator to a string */ -static int finish_str(grpc_chttp2_hpack_parser *p) { +static grpc_error *finish_str(grpc_chttp2_hpack_parser *p) { uint8_t terminator = 0; uint8_t decoded[2]; uint32_t bits; @@ -1234,14 +1284,17 @@ static int finish_str(grpc_chttp2_hpack_parser *p) { case B64_BYTE0: break; case B64_BYTE1: - gpr_log(GPR_ERROR, "illegal base64 encoding"); - return 0; /* illegal encoding */ + return GRPC_ERROR_CREATE( + "illegal base64 encoding"); /* illegal encoding */ case B64_BYTE2: bits = p->base64_buffer; if (bits & 0xffff) { - gpr_log(GPR_ERROR, "trailing bits in base64 encoding: 0x%04x", - bits & 0xffff); - return 0; + char *msg; + gpr_asprintf(&msg, "trailing bits in base64 encoding: 0x%04x", + bits & 0xffff); + grpc_error *err = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return err; } decoded[0] = (uint8_t)(bits >> 16); append_bytes(str, decoded, 1); @@ -1249,9 +1302,12 @@ static int finish_str(grpc_chttp2_hpack_parser *p) { case B64_BYTE3: bits = p->base64_buffer; if (bits & 0xff) { - gpr_log(GPR_ERROR, "trailing bits in base64 encoding: 0x%02x", - bits & 0xff); - return 0; + char *msg; + gpr_asprintf(&msg, "trailing bits in base64 encoding: 0x%02x", + bits & 0xff); + grpc_error *err = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return err; } decoded[0] = (uint8_t)(bits >> 16); decoded[1] = (uint8_t)(bits >> 8); @@ -1260,38 +1316,42 @@ static int finish_str(grpc_chttp2_hpack_parser *p) { } append_bytes(str, &terminator, 1); p->parsing.str->length--; /* don't actually count the null terminator */ - return 1; + return GRPC_ERROR_NONE; } /* decode a nibble from a huffman encoded stream */ -static int huff_nibble(grpc_chttp2_hpack_parser *p, uint8_t nibble) { +static grpc_error *huff_nibble(grpc_chttp2_hpack_parser *p, uint8_t nibble) { int16_t emit = emit_sub_tbl[16 * emit_tbl[p->huff_state] + nibble]; int16_t next = next_sub_tbl[16 * next_tbl[p->huff_state] + nibble]; if (emit != -1) { if (emit >= 0 && emit < 256) { uint8_t c = (uint8_t)emit; - if (!append_string(p, &c, (&c) + 1)) return 0; + grpc_error *err = append_string(p, &c, (&c) + 1); + if (err != GRPC_ERROR_NONE) return err; } else { assert(emit == 256); } } p->huff_state = next; - return 1; + return GRPC_ERROR_NONE; } /* decode full bytes from a huffman encoded stream */ -static int add_huff_bytes(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *add_huff_bytes(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end) { for (; cur != end; ++cur) { - if (!huff_nibble(p, *cur >> 4) || !huff_nibble(p, *cur & 0xf)) return 0; + grpc_error *err = huff_nibble(p, *cur >> 4); + if (err != GRPC_ERROR_NONE) return err; + err = huff_nibble(p, *cur & 0xf); + if (err != GRPC_ERROR_NONE) return err; } - return 1; + return GRPC_ERROR_NONE; } /* decode some string bytes based on the current decoding mode (huffman or not) */ -static int add_str_bytes(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *add_str_bytes(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end) { if (p->huff) { return add_huff_bytes(p, cur, end); } else { @@ -1300,26 +1360,31 @@ static int add_str_bytes(grpc_chttp2_hpack_parser *p, const uint8_t *cur, } /* parse a string - tries to do large chunks at a time */ -static int parse_string(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_string(grpc_chttp2_hpack_parser *p, const uint8_t *cur, + const uint8_t *end) { size_t remaining = p->strlen - p->strgot; size_t given = (size_t)(end - cur); if (remaining <= given) { - return add_str_bytes(p, cur, cur + remaining) && finish_str(p) && - parse_next(p, cur + remaining, end); + grpc_error *err = add_str_bytes(p, cur, cur + remaining); + if (err != GRPC_ERROR_NONE) return err; + err = finish_str(p); + if (err != GRPC_ERROR_NONE) return err; + return parse_next(p, cur + remaining, end); } else { - if (!add_str_bytes(p, cur, cur + given)) return 0; + grpc_error *err = add_str_bytes(p, cur, cur + given); + if (err != GRPC_ERROR_NONE) return err; GPR_ASSERT(given <= UINT32_MAX - p->strgot); p->strgot += (uint32_t)given; p->state = parse_string; - return 1; + return GRPC_ERROR_NONE; } } /* begin parsing a string - performs setup, calls parse_string */ -static int begin_parse_string(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end, uint8_t binary, - grpc_chttp2_hpack_parser_string *str) { +static grpc_error *begin_parse_string(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end, + uint8_t binary, + grpc_chttp2_hpack_parser_string *str) { p->strgot = 0; str->length = 0; p->parsing.str = str; @@ -1329,58 +1394,50 @@ static int begin_parse_string(grpc_chttp2_hpack_parser *p, const uint8_t *cur, } /* parse the key string */ -static int parse_key_string(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_key_string(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end) { return begin_parse_string(p, cur, end, NOT_BINARY, &p->key); } /* check if a key represents a binary header or not */ -typedef enum { BINARY_HEADER, PLAINTEXT_HEADER, ERROR_HEADER } is_binary_header; -static is_binary_header is_binary_literal_header(grpc_chttp2_hpack_parser *p) { - return grpc_is_binary_header(p->key.str, p->key.length) ? BINARY_HEADER - : PLAINTEXT_HEADER; +static bool is_binary_literal_header(grpc_chttp2_hpack_parser *p) { + return grpc_is_binary_header(p->key.str, p->key.length); } -static is_binary_header is_binary_indexed_header(grpc_chttp2_hpack_parser *p) { +static grpc_error *is_binary_indexed_header(grpc_chttp2_hpack_parser *p, + bool *is) { grpc_mdelem *elem = grpc_chttp2_hptbl_lookup(&p->table, p->index); if (!elem) { - if (grpc_http_trace) { - gpr_log(GPR_ERROR, "Invalid HPACK index received: %d", p->index); - } - return ERROR_HEADER; + return grpc_error_set_int( + grpc_error_set_int(GRPC_ERROR_CREATE("Invalid HPACK index received"), + GRPC_ERROR_INT_INDEX, p->index), + GRPC_ERROR_INT_SIZE, p->table.num_ents); } - return grpc_is_binary_header( - (const char *)GPR_SLICE_START_PTR(elem->key->slice), - GPR_SLICE_LENGTH(elem->key->slice)) - ? BINARY_HEADER - : PLAINTEXT_HEADER; + *is = + grpc_is_binary_header((const char *)GPR_SLICE_START_PTR(elem->key->slice), + GPR_SLICE_LENGTH(elem->key->slice)); + return GRPC_ERROR_NONE; } /* parse the value string */ -static int parse_value_string(grpc_chttp2_hpack_parser *p, const uint8_t *cur, - const uint8_t *end, is_binary_header type) { - switch (type) { - case BINARY_HEADER: - return begin_parse_string(p, cur, end, B64_BYTE0, &p->value); - case PLAINTEXT_HEADER: - return begin_parse_string(p, cur, end, NOT_BINARY, &p->value); - case ERROR_HEADER: - return 0; - } - /* Add code to prevent return without value error */ - GPR_UNREACHABLE_CODE(return 0); +static grpc_error *parse_value_string(grpc_chttp2_hpack_parser *p, + const uint8_t *cur, const uint8_t *end, + bool is_binary) { + return begin_parse_string(p, cur, end, is_binary ? B64_BYTE0 : NOT_BINARY, + &p->value); } -static int parse_value_string_with_indexed_key(grpc_chttp2_hpack_parser *p, - const uint8_t *cur, - const uint8_t *end) { - return parse_value_string(p, cur, end, is_binary_indexed_header(p)); +static grpc_error *parse_value_string_with_indexed_key( + grpc_chttp2_hpack_parser *p, const uint8_t *cur, const uint8_t *end) { + bool is_binary; + grpc_error *err = is_binary_indexed_header(p, &is_binary); + if (err != GRPC_ERROR_NONE) return err; + return parse_value_string(p, cur, end, is_binary); } -static int parse_value_string_with_literal_key(grpc_chttp2_hpack_parser *p, - const uint8_t *cur, - const uint8_t *end) { +static grpc_error *parse_value_string_with_literal_key( + grpc_chttp2_hpack_parser *p, const uint8_t *cur, const uint8_t *end) { return parse_value_string(p, cur, end, is_binary_literal_header(p)); } @@ -1411,8 +1468,9 @@ void grpc_chttp2_hpack_parser_destroy(grpc_chttp2_hpack_parser *p) { gpr_free(p->value.str); } -int grpc_chttp2_hpack_parser_parse(grpc_chttp2_hpack_parser *p, - const uint8_t *beg, const uint8_t *end) { +grpc_error *grpc_chttp2_hpack_parser_parse(grpc_chttp2_hpack_parser *p, + const uint8_t *beg, + const uint8_t *end) { /* TODO(ctiller): limit the distance of end from beg, and perform multiple steps in the event of a large chunk of data to limit stack space usage when no tail call optimization is @@ -1420,7 +1478,7 @@ int grpc_chttp2_hpack_parser_parse(grpc_chttp2_hpack_parser *p, return p->state(p, beg, end); } -grpc_chttp2_parse_error grpc_chttp2_header_parser_parse( +grpc_error *grpc_chttp2_header_parser_parse( grpc_exec_ctx *exec_ctx, void *hpack_parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last) { @@ -1429,17 +1487,17 @@ grpc_chttp2_parse_error grpc_chttp2_header_parser_parse( if (stream_parsing != NULL) { stream_parsing->stats.incoming.header_bytes += GPR_SLICE_LENGTH(slice); } - if (!grpc_chttp2_hpack_parser_parse(parser, GPR_SLICE_START_PTR(slice), - GPR_SLICE_END_PTR(slice))) { + grpc_error *error = grpc_chttp2_hpack_parser_parse( + parser, GPR_SLICE_START_PTR(slice), GPR_SLICE_END_PTR(slice)); + if (error != GRPC_ERROR_NONE) { GPR_TIMER_END("grpc_chttp2_hpack_parser_parse", 0); - return GRPC_CHTTP2_CONNECTION_ERROR; + return error; } if (is_last) { if (parser->is_boundary && parser->state != parse_begin) { - gpr_log(GPR_ERROR, - "end of header frame not aligned with a hpack record boundary"); GPR_TIMER_END("grpc_chttp2_hpack_parser_parse", 0); - return GRPC_CHTTP2_CONNECTION_ERROR; + return GRPC_ERROR_CREATE( + "end of header frame not aligned with a hpack record boundary"); } /* need to check for null stream: this can occur if we receive an invalid stream id on a header */ @@ -1462,5 +1520,5 @@ grpc_chttp2_parse_error grpc_chttp2_header_parser_parse( parser->dynamic_table_update_allowed = 2; } GPR_TIMER_END("grpc_chttp2_hpack_parser_parse", 0); - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.h b/src/core/ext/transport/chttp2/transport/hpack_parser.h index 855d6c5d521..78eb38db5ec 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.h +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.h @@ -44,9 +44,8 @@ typedef struct grpc_chttp2_hpack_parser grpc_chttp2_hpack_parser; -typedef int (*grpc_chttp2_hpack_parser_state)(grpc_chttp2_hpack_parser *p, - const uint8_t *beg, - const uint8_t *end); +typedef grpc_error *(*grpc_chttp2_hpack_parser_state)( + grpc_chttp2_hpack_parser *p, const uint8_t *beg, const uint8_t *end); typedef struct { char *str; @@ -59,6 +58,8 @@ struct grpc_chttp2_hpack_parser { void (*on_header)(void *user_data, grpc_mdelem *md); void *on_header_user_data; + grpc_error *last_error; + /* current parse state - or a function that implements it */ grpc_chttp2_hpack_parser_state state; /* future states dependent on the opening op code */ @@ -103,12 +104,13 @@ void grpc_chttp2_hpack_parser_destroy(grpc_chttp2_hpack_parser *p); void grpc_chttp2_hpack_parser_set_has_priority(grpc_chttp2_hpack_parser *p); /* returns 1 on success, 0 on error */ -int grpc_chttp2_hpack_parser_parse(grpc_chttp2_hpack_parser *p, - const uint8_t *beg, const uint8_t *end); +grpc_error *grpc_chttp2_hpack_parser_parse(grpc_chttp2_hpack_parser *p, + const uint8_t *beg, + const uint8_t *end); /* wraps grpc_chttp2_hpack_parser_parse to provide a frame level parser for the transport */ -grpc_chttp2_parse_error grpc_chttp2_header_parser_parse( +grpc_error *grpc_chttp2_header_parser_parse( grpc_exec_ctx *exec_ctx, void *hpack_parser, grpc_chttp2_transport_parsing *transport_parsing, grpc_chttp2_stream_parsing *stream_parsing, gpr_slice slice, int is_last); diff --git a/src/core/ext/transport/chttp2/transport/hpack_table.c b/src/core/ext/transport/chttp2/transport/hpack_table.c index 4d64506de29..0684d49899e 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_table.c +++ b/src/core/ext/transport/chttp2/transport/hpack_table.c @@ -38,6 +38,7 @@ #include #include +#include #include "src/core/lib/support/murmur_hash.h" @@ -260,18 +261,19 @@ void grpc_chttp2_hptbl_set_max_bytes(grpc_chttp2_hptbl *tbl, tbl->max_bytes = max_bytes; } -int grpc_chttp2_hptbl_set_current_table_size(grpc_chttp2_hptbl *tbl, - uint32_t bytes) { +grpc_error *grpc_chttp2_hptbl_set_current_table_size(grpc_chttp2_hptbl *tbl, + uint32_t bytes) { if (tbl->current_table_bytes == bytes) { - return 1; + return GRPC_ERROR_NONE; } if (bytes > tbl->max_bytes) { - if (grpc_http_trace) { - gpr_log(GPR_ERROR, - "Attempt to make hpack table %d bytes when max is %d bytes", - bytes, tbl->max_bytes); - } - return 0; + char *msg; + gpr_asprintf(&msg, + "Attempt to make hpack table %d bytes when max is %d bytes", + bytes, tbl->max_bytes); + grpc_error *err = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return err; } if (grpc_http_trace) { gpr_log(GPR_DEBUG, "Update hpack parser table size to %d", bytes); @@ -289,23 +291,25 @@ int grpc_chttp2_hptbl_set_current_table_size(grpc_chttp2_hptbl *tbl, rebuild_ents(tbl, new_cap); } } - return 1; + return GRPC_ERROR_NONE; } -int grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, grpc_mdelem *md) { +grpc_error *grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, grpc_mdelem *md) { /* determine how many bytes of buffer this entry represents */ size_t elem_bytes = GPR_SLICE_LENGTH(md->key->slice) + GPR_SLICE_LENGTH(md->value->slice) + GRPC_CHTTP2_HPACK_ENTRY_OVERHEAD; if (tbl->current_table_bytes > tbl->max_bytes) { - if (grpc_http_trace) { - gpr_log(GPR_ERROR, - "HPACK max table size reduced to %d but not reflected by hpack " - "stream (still at %d)", - tbl->max_bytes, tbl->current_table_bytes); - } - return 0; + char *msg; + gpr_asprintf( + &msg, + "HPACK max table size reduced to %d but not reflected by hpack " + "stream (still at %d)", + tbl->max_bytes, tbl->current_table_bytes); + grpc_error *err = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return err; } /* we can't add elements bigger than the max table size */ @@ -322,7 +326,7 @@ int grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, grpc_mdelem *md) { while (tbl->num_ents) { evict1(tbl); } - return 1; + return GRPC_ERROR_NONE; } /* evict entries to ensure no overflow */ @@ -337,7 +341,7 @@ int grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, grpc_mdelem *md) { /* update accounting values */ tbl->num_ents++; tbl->mem_used += (uint32_t)elem_bytes; - return 1; + return GRPC_ERROR_NONE; } grpc_chttp2_hptbl_find_result grpc_chttp2_hptbl_find( diff --git a/src/core/ext/transport/chttp2/transport/hpack_table.h b/src/core/ext/transport/chttp2/transport/hpack_table.h index 074fea36d8c..45bd9255bf8 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_table.h +++ b/src/core/ext/transport/chttp2/transport/hpack_table.h @@ -36,6 +36,7 @@ #include #include +#include "src/core/lib/iomgr/error.h" #include "src/core/lib/transport/metadata.h" /* HPACK header table */ @@ -87,15 +88,15 @@ void grpc_chttp2_hptbl_init(grpc_chttp2_hptbl *tbl); void grpc_chttp2_hptbl_destroy(grpc_chttp2_hptbl *tbl); void grpc_chttp2_hptbl_set_max_bytes(grpc_chttp2_hptbl *tbl, uint32_t max_bytes); -int grpc_chttp2_hptbl_set_current_table_size(grpc_chttp2_hptbl *tbl, - uint32_t bytes); +grpc_error *grpc_chttp2_hptbl_set_current_table_size(grpc_chttp2_hptbl *tbl, + uint32_t bytes); /* lookup a table entry based on its hpack index */ grpc_mdelem *grpc_chttp2_hptbl_lookup(const grpc_chttp2_hptbl *tbl, uint32_t index); /* add a table entry to the index */ -int grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, - grpc_mdelem *md) GRPC_MUST_USE_RESULT; +grpc_error *grpc_chttp2_hptbl_add(grpc_chttp2_hptbl *tbl, + grpc_mdelem *md) GRPC_MUST_USE_RESULT; /* Find a key/value pair in the table... returns the index in the table of the most similar entry, or 0 if the value was not found */ typedef struct { diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index cb5ed9fc253..ae35d581170 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -673,7 +673,8 @@ void grpc_chttp2_parsing_become_skip_parser( void grpc_chttp2_complete_closure_step(grpc_exec_ctx *exec_ctx, grpc_chttp2_stream_global *stream_global, - grpc_closure **pclosure, int success); + grpc_closure **pclosure, + grpc_error *error); void grpc_chttp2_run_with_global_lock(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *transport, @@ -776,8 +777,8 @@ void grpc_chttp2_fake_status(grpc_exec_ctx *exec_ctx, grpc_status_code status, gpr_slice *details); void grpc_chttp2_mark_stream_closed( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, - grpc_chttp2_stream_global *stream_global, int close_reads, - int close_writes); + grpc_chttp2_stream_global *stream_global, int close_reads, int close_writes, + grpc_error *error); void grpc_chttp2_start_writing(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global); diff --git a/src/core/lib/iomgr/closure.c b/src/core/lib/iomgr/closure.c index 885637efe9d..0e84d13c452 100644 --- a/src/core/lib/iomgr/closure.c +++ b/src/core/lib/iomgr/closure.c @@ -44,21 +44,21 @@ void grpc_closure_init(grpc_closure *closure, grpc_iomgr_cb_func cb, void grpc_closure_list_append(grpc_closure_list *closure_list, grpc_closure *closure, grpc_error *error) { if (closure == NULL) return; - closure->final_data.error = error; - closure->next = NULL; + closure->error = error; + closure->next_data.next = NULL; if (closure_list->head == NULL) { closure_list->head = closure; } else { - closure_list->tail->next = closure; + closure_list->tail->next_data.next = closure; } closure_list->tail = closure; } void grpc_closure_list_fail_all(grpc_closure_list *list, grpc_error *forced_failure) { - for (grpc_closure *c = list->head; c != NULL; c = c->next) { - if (c->final_data.error == NULL) { - c->final_data.error = grpc_error_ref(forced_failure); + for (grpc_closure *c = list->head; c != NULL; c = c->next_data.next) { + if (c->error == GRPC_ERROR_NONE) { + c->error = grpc_error_ref(forced_failure); } } grpc_error_unref(forced_failure); @@ -75,7 +75,7 @@ void grpc_closure_list_move(grpc_closure_list *src, grpc_closure_list *dst) { if (dst->head == NULL) { *dst = *src; } else { - dst->tail->next = src->head; + dst->tail->next_data.next = src->head; dst->tail = src->tail; } src->head = src->tail = NULL; diff --git a/src/core/lib/iomgr/closure.h b/src/core/lib/iomgr/closure.h index 14132d926e5..344b7d3c3ea 100644 --- a/src/core/lib/iomgr/closure.h +++ b/src/core/lib/iomgr/closure.h @@ -66,12 +66,12 @@ struct grpc_closure { /** Arguments to be passed to "cb". */ void *cb_arg; + grpc_error *error; + union { - grpc_error *error; + grpc_closure *next; uintptr_t scratch; - } final_data; - - grpc_closure *next; + } next_data; }; /** Initializes \a closure with \a cb and \a cb_arg. */ diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index d0e4301722b..55bb1b5660d 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -90,6 +90,18 @@ static const char *error_int_name(grpc_error_ints key) { return "errno"; case GRPC_ERROR_INT_FILE_LINE: return "file_line"; + case GRPC_ERROR_INT_WARNING: + return "warning"; + case GRPC_ERROR_INT_STREAM_ID: + return "stream_id"; + case GRPC_ERROR_INT_GRPC_STATUS: + return "grpc_status"; + case GRPC_ERROR_INT_OFFSET: + return "offset"; + case GRPC_ERROR_INT_INDEX: + return "index"; + case GRPC_ERROR_INT_SIZE: + return "size"; } GPR_UNREACHABLE_CODE(return "unknown"); } @@ -106,6 +118,10 @@ static const char *error_str_name(grpc_error_strs key) { return "syscall"; case GRPC_ERROR_STR_FILE: return "file"; + case GRPC_ERROR_STR_GRPC_MESSAGE: + return "grpc_message"; + case GRPC_ERROR_STR_RAW_BYTES: + return "raw_bytes"; } GPR_UNREACHABLE_CODE(return "unknown"); } diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index 1429631b67a..db5e378e773 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -45,6 +45,11 @@ typedef enum { GRPC_ERROR_INT_FILE_LINE, GRPC_ERROR_INT_STATUS_CODE, GRPC_ERROR_INT_WARNING, + GRPC_ERROR_INT_STREAM_ID, + GRPC_ERROR_INT_GRPC_STATUS, + GRPC_ERROR_INT_OFFSET, + GRPC_ERROR_INT_INDEX, + GRPC_ERROR_INT_SIZE, } grpc_error_ints; typedef enum { @@ -53,6 +58,8 @@ typedef enum { GRPC_ERROR_STR_OS_ERROR, GRPC_ERROR_STR_SYSCALL, GRPC_ERROR_STR_TARGET_ADDRESS, + GRPC_ERROR_STR_GRPC_MESSAGE, + GRPC_ERROR_STR_RAW_BYTES, } grpc_error_strs; typedef enum { diff --git a/src/core/lib/iomgr/exec_ctx.c b/src/core/lib/iomgr/exec_ctx.c index 11114621323..cc52c16bce8 100644 --- a/src/core/lib/iomgr/exec_ctx.c +++ b/src/core/lib/iomgr/exec_ctx.c @@ -47,8 +47,8 @@ bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { grpc_closure *c = exec_ctx->closure_list.head; exec_ctx->closure_list.head = exec_ctx->closure_list.tail = NULL; while (c != NULL) { - grpc_closure *next = c->next; - grpc_error *error = c->final_data.error; + grpc_closure *next = c->next_data.next; + grpc_error *error = c->error; did_something = true; GPR_TIMER_BEGIN("grpc_exec_ctx_flush.cb", 0); c->cb(exec_ctx, c->cb_arg, error); From 94e15760737660a655896e5a208897b71f402550 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 5 May 2016 08:44:36 -0700 Subject: [PATCH 0293/1894] Error handling progress in chttp2 transport --- .../chttp2/transport/frame_rst_stream.c | 11 +- .../ext/transport/chttp2/transport/internal.h | 6 +- .../ext/transport/chttp2/transport/parsing.c | 210 +++++++++--------- .../ext/transport/chttp2/transport/writing.c | 15 +- src/core/lib/iomgr/error.c | 2 + src/core/lib/iomgr/error.h | 1 + 6 files changed, 127 insertions(+), 118 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c index d49df0fcc2f..ea711230540 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c @@ -97,11 +97,12 @@ grpc_error *grpc_chttp2_rst_stream_parser_parse( if (p->byte == 4) { GPR_ASSERT(is_last); stream_parsing->received_close = 1; - stream_parsing->saw_rst_stream = 1; - stream_parsing->rst_stream_reason = (((uint32_t)p->reason_bytes[0]) << 24) | - (((uint32_t)p->reason_bytes[1]) << 16) | - (((uint32_t)p->reason_bytes[2]) << 8) | - (((uint32_t)p->reason_bytes[3])); + stream_parsing->forced_close_error = grpc_error_set_int( + GRPC_ERROR_CREATE("RST_STREAM"), GRPC_ERROR_INT_HTTP2_ERROR, + (((uint32_t)p->reason_bytes[0]) << 24) | + (((uint32_t)p->reason_bytes[1]) << 16) | + (((uint32_t)p->reason_bytes[2]) << 8) | + (((uint32_t)p->reason_bytes[3]))); } return GRPC_ERROR_NONE; diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index ae35d581170..1a8b44d86e3 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -474,13 +474,13 @@ struct grpc_chttp2_stream_parsing { uint32_t id; /** has this stream received a close */ uint8_t received_close; - /** saw a rst_stream */ - uint8_t saw_rst_stream; /** how many header frames have we received? */ uint8_t header_frames_received; /** which metadata did we get (on this parse) */ uint8_t got_metadata_on_parse[2]; - /** should we raise the seen_error flag in transport_global */ + /** saw some stream level error */ + grpc_error *forced_close_error; + /** should we raise the seen_error flag in stream_global */ uint8_t seen_error; /** window available for peer to send to us */ int64_t incoming_window; diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index aaa66a6c91b..67590aeb168 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -83,8 +83,8 @@ void grpc_chttp2_prepare_to_read( transport_global->settings[GRPC_SENT_SETTINGS], sizeof(transport_parsing->last_sent_settings)); transport_parsing->max_frame_size = - transport_global - ->settings[GRPC_ACKED_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; + transport_global->settings[GRPC_ACKED_SETTINGS] + [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; /* update the parsing view of incoming window */ while (grpc_chttp2_list_pop_unannounced_incoming_window_available( @@ -224,26 +224,29 @@ void grpc_chttp2_publish_reads( grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); } - if (stream_parsing->saw_rst_stream) { - if (stream_parsing->rst_stream_reason != GRPC_CHTTP2_NO_ERROR) { - grpc_status_code status_code = grpc_chttp2_http2_error_to_grpc_status( - (grpc_chttp2_error_code)stream_parsing->rst_stream_reason); - char *status_details; - gpr_slice slice_details; - gpr_asprintf(&status_details, "Received RST_STREAM err=%d", - stream_parsing->rst_stream_reason); - slice_details = gpr_slice_from_copied_string(status_details); - gpr_free(status_details); + if (stream_parsing->forced_close_error != GRPC_ERROR_NONE) { + const intptr_t *reason = grpc_error_get_int( + stream_parsing->forced_close_error, GRPC_ERROR_INT_HTTP2_ERROR); + if (reason == NULL || *reason != GRPC_CHTTP2_NO_ERROR) { + grpc_status_code status_code = + reason == NULL ? GRPC_STATUS_INTERNAL + : grpc_chttp2_http2_error_to_grpc_status( + (grpc_chttp2_error_code) + stream_parsing->rst_stream_reason); + const char *status_details = + grpc_error_string(stream_parsing->forced_close_error); + gpr_slice slice_details = gpr_slice_from_copied_string(status_details); + grpc_error_free_string(status_details); grpc_chttp2_fake_status(exec_ctx, transport_global, stream_global, status_code, &slice_details); } grpc_chttp2_mark_stream_closed(exec_ctx, transport_global, stream_global, - 1, 1); + 1, 1, stream_parsing->forced_close_error); } if (stream_parsing->received_close) { grpc_chttp2_mark_stream_closed(exec_ctx, transport_global, stream_global, - 1, 0); + 1, 0, GRPC_ERROR_NONE); } } } @@ -577,7 +580,7 @@ static grpc_error *update_incoming_window( grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, stream_parsing); - return GRPC_CHTTP2_PARSE_OK; + return GRPC_ERROR_NONE; } static grpc_error *init_data_frame_parser( @@ -585,7 +588,7 @@ static grpc_error *init_data_frame_parser( grpc_chttp2_stream_parsing *stream_parsing = grpc_chttp2_parsing_lookup_stream(transport_parsing, transport_parsing->incoming_stream_id); - grpc_chttp2_parse_error err = GRPC_CHTTP2_PARSE_OK; + grpc_error *err = GRPC_ERROR_NONE; if (stream_parsing == NULL) { return init_skip_frame_parser(exec_ctx, transport_parsing, 0); } @@ -593,33 +596,32 @@ static grpc_error *init_data_frame_parser( if (stream_parsing->received_close) { return init_skip_frame_parser(exec_ctx, transport_parsing, 0); } - if (err == GRPC_CHTTP2_PARSE_OK) { + if (err == GRPC_ERROR_NONE) { err = update_incoming_window(exec_ctx, transport_parsing, stream_parsing); } - if (err == GRPC_CHTTP2_PARSE_OK) { + if (err == GRPC_ERROR_NONE) { err = grpc_chttp2_data_parser_begin_frame( - &stream_parsing->data_parser, transport_parsing->incoming_frame_flags); - } - switch (err) { - case GRPC_CHTTP2_PARSE_OK: - transport_parsing->incoming_stream = stream_parsing; - transport_parsing->parser = grpc_chttp2_data_parser_parse; - transport_parsing->parser_data = &stream_parsing->data_parser; - return GRPC_ERROR_NONE; - case GRPC_CHTTP2_STREAM_ERROR: - stream_parsing->received_close = 1; - stream_parsing->saw_rst_stream = 1; - stream_parsing->rst_stream_reason = GRPC_CHTTP2_PROTOCOL_ERROR; - gpr_slice_buffer_add( - &transport_parsing->qbuf, - grpc_chttp2_rst_stream_create(transport_parsing->incoming_stream_id, - GRPC_CHTTP2_PROTOCOL_ERROR, - &stream_parsing->stats.outgoing)); - return init_skip_frame_parser(exec_ctx, transport_parsing, 0); - case GRPC_CHTTP2_CONNECTION_ERROR: - return 0; + &stream_parsing->data_parser, transport_parsing->incoming_frame_flags, + stream_parsing->id); + } + if (err == GRPC_ERROR_NONE) { + transport_parsing->incoming_stream = stream_parsing; + transport_parsing->parser = grpc_chttp2_data_parser_parse; + transport_parsing->parser_data = &stream_parsing->data_parser; + return GRPC_ERROR_NONE; + } else if (grpc_error_get_int(err, GRPC_ERROR_INT_STREAM_ID)) { + /* handle stream errors by closing the stream */ + stream_parsing->received_close = 1; + stream_parsing->forced_close_error = err; + gpr_slice_buffer_add( + &transport_parsing->qbuf, + grpc_chttp2_rst_stream_create(transport_parsing->incoming_stream_id, + GRPC_CHTTP2_PROTOCOL_ERROR, + &stream_parsing->stats.outgoing)); + return init_skip_frame_parser(exec_ctx, transport_parsing, 0); + } else { + return err; } - GPR_UNREACHABLE_CODE(return 0); } static void free_timeout(void *p) { gpr_free(p); } @@ -797,10 +799,11 @@ static grpc_error *init_header_frame_parser( static grpc_error *init_window_update_frame_parser( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing) { - int ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_window_update_parser_begin_frame( - &transport_parsing->simple.window_update, - transport_parsing->incoming_frame_size, - transport_parsing->incoming_frame_flags); + grpc_error *err = grpc_chttp2_window_update_parser_begin_frame( + &transport_parsing->simple.window_update, + transport_parsing->incoming_frame_size, + transport_parsing->incoming_frame_flags); + if (err != GRPC_ERROR_NONE) return err; if (transport_parsing->incoming_stream_id != 0) { grpc_chttp2_stream_parsing *stream_parsing = transport_parsing->incoming_stream = grpc_chttp2_parsing_lookup_stream( @@ -812,26 +815,27 @@ static grpc_error *init_window_update_frame_parser( } transport_parsing->parser = grpc_chttp2_window_update_parser_parse; transport_parsing->parser_data = &transport_parsing->simple.window_update; - return ok; + return GRPC_ERROR_NONE; } -static int init_ping_parser(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport_parsing *transport_parsing) { - int ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_ping_parser_begin_frame( - &transport_parsing->simple.ping, - transport_parsing->incoming_frame_size, - transport_parsing->incoming_frame_flags); +static grpc_error *init_ping_parser( + grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing) { + grpc_error *err = grpc_chttp2_ping_parser_begin_frame( + &transport_parsing->simple.ping, transport_parsing->incoming_frame_size, + transport_parsing->incoming_frame_flags); + if (err != GRPC_ERROR_NONE) return err; transport_parsing->parser = grpc_chttp2_ping_parser_parse; transport_parsing->parser_data = &transport_parsing->simple.ping; - return ok; + return GRPC_ERROR_NONE; } -static int init_rst_stream_parser( +static grpc_error *init_rst_stream_parser( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing) { - int ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_rst_stream_parser_begin_frame( - &transport_parsing->simple.rst_stream, - transport_parsing->incoming_frame_size, - transport_parsing->incoming_frame_flags); + grpc_error *err = grpc_chttp2_rst_stream_parser_begin_frame( + &transport_parsing->simple.rst_stream, + transport_parsing->incoming_frame_size, + transport_parsing->incoming_frame_flags); + if (err != GRPC_ERROR_NONE) return err; grpc_chttp2_stream_parsing *stream_parsing = transport_parsing->incoming_stream = grpc_chttp2_parsing_lookup_stream( transport_parsing, transport_parsing->incoming_stream_id); @@ -841,37 +845,32 @@ static int init_rst_stream_parser( stream_parsing->stats.incoming.framing_bytes += 9; transport_parsing->parser = grpc_chttp2_rst_stream_parser_parse; transport_parsing->parser_data = &transport_parsing->simple.rst_stream; - return ok; + return GRPC_ERROR_NONE; } -static int init_goaway_parser( +static grpc_error *init_goaway_parser( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing) { - int ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_goaway_parser_begin_frame( - &transport_parsing->goaway_parser, - transport_parsing->incoming_frame_size, - transport_parsing->incoming_frame_flags); + grpc_error *err = grpc_chttp2_goaway_parser_begin_frame( + &transport_parsing->goaway_parser, transport_parsing->incoming_frame_size, + transport_parsing->incoming_frame_flags); + if (err != GRPC_ERROR_NONE) return err; transport_parsing->parser = grpc_chttp2_goaway_parser_parse; transport_parsing->parser_data = &transport_parsing->goaway_parser; - return ok; + return GRPC_ERROR_NONE; } -static int init_settings_frame_parser( +static grpc_error *init_settings_frame_parser( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing) { - int ok; - if (transport_parsing->incoming_stream_id != 0) { - gpr_log(GPR_ERROR, "settings frame received for grpc_chttp2_stream %d", - transport_parsing->incoming_stream_id); - return 0; + return GRPC_ERROR_CREATE("Settings frame received for grpc_chttp2_stream"); } - ok = GRPC_CHTTP2_PARSE_OK == grpc_chttp2_settings_parser_begin_frame( - &transport_parsing->simple.settings, - transport_parsing->incoming_frame_size, - transport_parsing->incoming_frame_flags, - transport_parsing->settings); - if (!ok) { - return 0; + grpc_error *err = grpc_chttp2_settings_parser_begin_frame( + &transport_parsing->simple.settings, + transport_parsing->incoming_frame_size, + transport_parsing->incoming_frame_flags, transport_parsing->settings); + if (err != GRPC_ERROR_NONE) { + return err; } if (transport_parsing->incoming_frame_flags & GRPC_CHTTP2_FLAG_ACK) { transport_parsing->settings_ack_received = 1; @@ -885,7 +884,7 @@ static int init_settings_frame_parser( } transport_parsing->parser = grpc_chttp2_settings_parser_parse; transport_parsing->parser_data = &transport_parsing->simple.settings; - return ok; + return GRPC_ERROR_NONE; } /* @@ -894,34 +893,37 @@ static int is_window_update_legal(int64_t window_update, int64_t window) { } */ -static int parse_frame_slice(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport_parsing *transport_parsing, - gpr_slice slice, int is_last) { +static grpc_error *parse_frame_slice( + grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing, + gpr_slice slice, int is_last) { grpc_chttp2_stream_parsing *stream_parsing = transport_parsing->incoming_stream; - switch (transport_parsing->parser(exec_ctx, transport_parsing->parser_data, - transport_parsing, stream_parsing, slice, - is_last)) { - case GRPC_CHTTP2_PARSE_OK: - if (stream_parsing) { - grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, - stream_parsing); - } - return 1; - case GRPC_CHTTP2_STREAM_ERROR: - grpc_chttp2_parsing_become_skip_parser(exec_ctx, transport_parsing); - if (stream_parsing) { - stream_parsing->saw_rst_stream = 1; - stream_parsing->rst_stream_reason = GRPC_CHTTP2_PROTOCOL_ERROR; - gpr_slice_buffer_add( - &transport_parsing->qbuf, - grpc_chttp2_rst_stream_create(transport_parsing->incoming_stream_id, - GRPC_CHTTP2_PROTOCOL_ERROR, - &stream_parsing->stats.outgoing)); - } - return 1; - case GRPC_CHTTP2_CONNECTION_ERROR: - return 0; + grpc_error *err = transport_parsing->parser( + exec_ctx, transport_parsing->parser_data, transport_parsing, + stream_parsing, slice, is_last); + if (err == GRPC_ERROR_NONE) { + if (stream_parsing) { + grpc_chttp2_list_add_parsing_seen_stream(transport_parsing, + stream_parsing); + } + return GRPC_ERROR_NONE; + } else if (grpc_error_get_int(err, GRPC_ERROR_INT_STREAM_ID) != NULL) { + if (grpc_http_trace) { + const char *msg = grpc_error_string(err); + gpr_log(GPR_ERROR, "%s", msg); + grpc_error_free_string(msg); + } + grpc_chttp2_parsing_become_skip_parser(exec_ctx, transport_parsing); + if (stream_parsing) { + stream_parsing->forced_close_error = err; + gpr_slice_buffer_add( + &transport_parsing->qbuf, + grpc_chttp2_rst_stream_create(transport_parsing->incoming_stream_id, + GRPC_CHTTP2_PROTOCOL_ERROR, + &stream_parsing->stats.outgoing)); + } else { + grpc_error_unref(err); + } } - GPR_UNREACHABLE_CODE(return 0); + return err; } diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index a8fb463939a..ff42fd249a4 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -187,7 +187,8 @@ void grpc_chttp2_perform_writes( grpc_endpoint_write(exec_ctx, endpoint, &transport_writing->outbuf, &transport_writing->done_cb); } else { - grpc_exec_ctx_enqueue(exec_ctx, &transport_writing->done_cb, true, NULL); + grpc_exec_ctx_push(exec_ctx, &transport_writing->done_cb, GRPC_ERROR_NONE, + NULL); } } @@ -335,24 +336,26 @@ void grpc_chttp2_cleanup_writing( if (stream_writing->sent_initial_metadata) { grpc_chttp2_complete_closure_step( exec_ctx, stream_global, - &stream_global->send_initial_metadata_finished, 1); + &stream_global->send_initial_metadata_finished, GRPC_ERROR_NONE); } grpc_transport_move_one_way_stats(&stream_writing->stats, &stream_global->stats.outgoing); if (stream_writing->sent_message) { GPR_ASSERT(stream_writing->send_message == NULL); - grpc_chttp2_complete_closure_step( - exec_ctx, stream_global, &stream_global->send_message_finished, 1); + grpc_chttp2_complete_closure_step(exec_ctx, stream_global, + &stream_global->send_message_finished, + GRPC_ERROR_NONE); stream_writing->sent_message = 0; } if (stream_writing->sent_trailing_metadata) { grpc_chttp2_complete_closure_step( exec_ctx, stream_global, - &stream_global->send_trailing_metadata_finished, 1); + &stream_global->send_trailing_metadata_finished, GRPC_ERROR_NONE); } if (stream_writing->sent_trailing_metadata) { grpc_chttp2_mark_stream_closed(exec_ctx, transport_global, stream_global, - !transport_global->is_client, 1); + !transport_global->is_client, 1, + GRPC_ERROR_NONE); } GRPC_CHTTP2_STREAM_UNREF(exec_ctx, stream_global, "chttp2_writing"); } diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index 55bb1b5660d..5812af5c93a 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -102,6 +102,8 @@ static const char *error_int_name(grpc_error_ints key) { return "index"; case GRPC_ERROR_INT_SIZE: return "size"; + case GRPC_ERROR_INT_HTTP2_ERROR: + return "http2_error"; } GPR_UNREACHABLE_CODE(return "unknown"); } diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index db5e378e773..234782ab036 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -50,6 +50,7 @@ typedef enum { GRPC_ERROR_INT_OFFSET, GRPC_ERROR_INT_INDEX, GRPC_ERROR_INT_SIZE, + GRPC_ERROR_INT_HTTP2_ERROR, } grpc_error_ints; typedef enum { From 395bca9a61d7430fbd7f1d2da1888dbee39e234e Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 5 May 2016 10:25:34 -0700 Subject: [PATCH 0294/1894] Improved description of examples bifurcation --- examples/node/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/node/README.md b/examples/node/README.md index 14d779416ae..59fb4a17f59 100644 --- a/examples/node/README.md +++ b/examples/node/README.md @@ -22,7 +22,7 @@ INSTALL TRY IT! ------- -There are two variants of these examples: one with code dynamically generated at runtime using Protobuf.js and one with code statically generated using `protoc`. The examples behave identically, and either server can be used with either client. +There are two ways to generate the code needed to work with protocol buffers in Node.js - one approach uses [Protobuf.js](https://github.com/dcodeIO/ProtoBuf.js/) to dynamically generate the code at runtime, the other uses code statically generated using the protocol buffer compiler `protoc`. The examples behave identically, and either server can be used with either client. - Run the server From 85a5ffa1a9000778f0c7eb0942c38c78938f55f3 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Thu, 5 May 2016 10:30:10 -0700 Subject: [PATCH 0295/1894] Manifest changes --- src/python/grpcio_health_checking/MANIFEST.in | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/python/grpcio_health_checking/MANIFEST.in b/src/python/grpcio_health_checking/MANIFEST.in index e8b4113adbb..40c6ac84970 100644 --- a/src/python/grpcio_health_checking/MANIFEST.in +++ b/src/python/grpcio_health_checking/MANIFEST.in @@ -1,2 +1 @@ -graft grpc_health_checking -include health_commands.py +global-exclude *.pyc From f4fef8891163c22e024891c72856f08f3c47b335 Mon Sep 17 00:00:00 2001 From: Nicolas 'Pixel' Noble Date: Thu, 5 May 2016 10:48:25 -0700 Subject: [PATCH 0296/1894] Pinning the llvm repository on 3.8. --- tools/dockerfile/grpc_clang_format/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/dockerfile/grpc_clang_format/Dockerfile b/tools/dockerfile/grpc_clang_format/Dockerfile index 41239e9c23b..ab58017a02a 100644 --- a/tools/dockerfile/grpc_clang_format/Dockerfile +++ b/tools/dockerfile/grpc_clang_format/Dockerfile @@ -30,8 +30,8 @@ FROM ubuntu:wily RUN apt-get update RUN apt-get -y install wget -RUN echo deb http://llvm.org/apt/wily/ llvm-toolchain-wily main >> /etc/apt/sources.list -RUN echo deb-src http://llvm.org/apt/wily/ llvm-toolchain-wily main >> /etc/apt/sources.list +RUN echo deb http://llvm.org/apt/wily/ llvm-toolchain-wily-3.8 main >> /etc/apt/sources.list +RUN echo deb-src http://llvm.org/apt/wily/ llvm-toolchain-wily-3.8 main >> /etc/apt/sources.list RUN wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key| apt-key add - RUN apt-get update RUN apt-get -y install clang-format-3.8 From 7099d6fed66500ae6b3f3abdb69e8818eb057704 Mon Sep 17 00:00:00 2001 From: yang-g Date: Thu, 5 May 2016 10:53:50 -0700 Subject: [PATCH 0297/1894] Add an explicit base class pointer to avoid potential breakage. --- include/grpc++/impl/codegen/call.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h index d081b7d9c59..c10c834b040 100644 --- a/include/grpc++/impl/codegen/call.h +++ b/include/grpc++/impl/codegen/call.h @@ -329,8 +329,9 @@ class CallOpGenericRecvMessage { template void RecvMessage(R* message) { - deserialize_.reset( - new CallOpGenericRecvMessageHelper::DeserializeFuncType(message)); + CallOpGenericRecvMessageHelper::DeserializeFunc* func = + new CallOpGenericRecvMessageHelper::DeserializeFuncType(message); + deserialize_.reset(func); } bool got_message; From 175dbbc6d7d47dc7f5c109e5b2c6b9ad99d1b2b7 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 5 May 2016 11:29:07 -0700 Subject: [PATCH 0298/1894] Use stream rpc to ensure all related requests go to a single server --- .../grpc/reflection/v1alpha/reflection.proto | 141 ++++++++++-------- 1 file changed, 77 insertions(+), 64 deletions(-) diff --git a/src/proto/grpc/reflection/v1alpha/reflection.proto b/src/proto/grpc/reflection/v1alpha/reflection.proto index 4b13bd1e51c..6e6a0b08644 100644 --- a/src/proto/grpc/reflection/v1alpha/reflection.proto +++ b/src/proto/grpc/reflection/v1alpha/reflection.proto @@ -34,85 +34,98 @@ syntax = "proto3"; package grpc.reflection.v1alpha; service ServerReflection { - // List the full names of registered services. - rpc ListService(EmptyRequest) returns (ListServiceResponse) { - } - - // Find a proto file by file name. - rpc GetFileByName(FileNameRequest) returns (FileDescriptorProtoResponse) { - } - - // Find the proto file that declares the given fully-qualified symbol name. - rpc GetFileContainingSymbol(SymbolRequest) - returns (FileDescriptorProtoResponse) { - } - - // Find the proto file which defines an extension extending the given message - // type with the given field number. - rpc GetFileContainingExtension(ExtensionRequest) - returns (FileDescriptorProtoResponse) { - } - - // Finds the tag numbers used by all known extensions of extendee_type, and - // appends them to ExtensionNumberResponse in an undefined order. - // This method is best-effort: it's not guaranteed that the reflection service - // will implement this method, and it's not guaranteed that this method will - // provide all extensions. Returns StatusCode::UNIMPLEMENTED if it's not - // implemented. - rpc GetAllExtensionNumbers(TypeRequest) returns (ExtensionNumberResponse) { - } -} - -// An empty message sent by the client when calling ListService method. -message EmptyRequest { -} - -// The filename sent by the client when calling GetFileByName method. -message FileNameRequest { - // Name of the proto file. - string filename = 1; + // The reflection service is structured as a bidirectional stream, ensuring + // all related requests go to a single server. + rpc DescriptorDatabaseInfo(stream DescriptorDatabaseRequest) + returns (stream DescriptorDatabaseResponse); } -// The symbol name sent by the client when calling GetFileContainingSymbol -// method. -message SymbolRequest { - // Fully-qualified symbol name (e.g. .[.] or - // .). - string symbol = 1; +// The message sent by the client when calling DescriptorDatabaseInfo method. +message DescriptorDatabaseRequest { + string host = 1; + // To use reflection service, the client should set one of the following + // fields in message_request. The server distinguishes requests by their + // defined field and then handles them using corresponding methods. + oneof message_request { + // Find a proto file by the file name. + string file_by_filename = 3; + + // Find the proto file that declares the given fully-qualified symbol name. + // This field should be a fully-qualified symbol name + // (e.g. .[.] or .). + string file_containing_symbol = 4; + + // Find the proto file which defines an extension extending the given + // message type with the given field number. + ExtensionRequest file_containing_extension = 5; + + // Finds the tag numbers used by all known extensions of extendee_type, and + // appends them to ExtensionNumberResponse in an undefined order. + // Its corresponding method is best-effort: it's not guaranteed that the + // reflection service will implement this method, and it's not guaranteed + // that this method will provide all extensions. Returns + // StatusCode::UNIMPLEMENTED if it's not implemented. + // This field should be a fully-qualified type name. The format is + // . + string all_extension_numbers_of_type = 6; + + // List the full names of registered services. The content will not be + // checked. + string list_services = 7; + } } -// The type name and extension number sent by the client when calling -// GetFileContainingExtension method. +// The type name and extension number sent by the client when requesting +// file_containing_extension. message ExtensionRequest { // Fully-qualified type name. The format should be . string containing_type = 1; int32 extension_number = 2; } -// The type name sent by the client when calling GetAllExtensionNumbers method. -message TypeRequest { - // Fully-qualified type name. The format should be . - string type = 1; +// The message sent by the server to answer DescriptorDatabaseInfo method. +message DescriptorDatabaseResponse { + string valid_host = 1; + DescriptorDatabaseRequest original_request = 2; + // The server set one of the following fields accroding to the message_request + // in the request. + oneof message_response { + // A serialized FileDescriptorProto message. We avoid taking a dependency on + // descriptor.proto, which uses proto2 only features, by making them opaque + // bytes instead. This message is used to answer file_by_filename, + // file_containing_symbol, file_containing_extension requests. + bytes file_descriptor_proto = 4; + + // This message is used to answer all_extension_numbers_of_type requst. + ExtensionNumberResponse all_extension_numbers_response = 5; + + // This message is used to answer list_services request. + ListServiceResponse list_services_response = 6; + + // This message is used when an error occurs. + ErrorResponse error_response = 7; + } +} + +// A list of extension numbers sent by the server answering +// all_extension_numbers_of_type request. +message ExtensionNumberResponse { + // Full name of the base type, including the package name. The format + // is . + string base_type_name = 1; + repeated int32 extension_number = 2; } -// A list of service names sent by the server answering ListService method. +// A list of service names sent by the server answering list_services request. message ListServiceResponse { // Full names of registered services, including package names. The format // is . - repeated string services = 1; -} - -// A serialized FileDescriptorProto sent by the server answering -// GetFileByName, GetFileContainingSymbol, GetFileContainingExtension methods. -message FileDescriptorProtoResponse { - // Serialized FileDescriptorProto message. Some languages have limited support - // for working with descriptors. The can only obtain an opaque binary blob - // that contains serialized FileDescriptorProto message. - bytes file_descriptor_proto = 1; + repeated string service = 1; } -// A list of extension numbers sent by the server answering -// GetAllExtensionNumbers method. -message ExtensionNumberResponse { - repeated int32 extension_number = 1; +// The error code and error message sent by the server when an error occurs. +message ErrorResponse { + // This field uses the error codes defined in grpc::StatusCode. + int32 error_code = 1; + string error_message = 2; } From c45f44b6654a237018a06a90a931273f40819eef Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 5 May 2016 11:36:39 -0700 Subject: [PATCH 0299/1894] compile error --- src/core/ext/transport/chttp2/transport/hpack_parser.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.c b/src/core/ext/transport/chttp2/transport/hpack_parser.c index 993c6d02043..0e337a655e6 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.c +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.c @@ -1430,7 +1430,7 @@ static grpc_error *parse_value_string(grpc_chttp2_hpack_parser *p, static grpc_error *parse_value_string_with_indexed_key( grpc_chttp2_hpack_parser *p, const uint8_t *cur, const uint8_t *end) { - bool is_binary; + bool is_binary = false; grpc_error *err = is_binary_indexed_header(p, &is_binary); if (err != GRPC_ERROR_NONE) return err; return parse_value_string(p, cur, end, is_binary); From 5deda3db97828454da88cb2e1d463c9e0dff7263 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 5 May 2016 12:34:19 -0700 Subject: [PATCH 0300/1894] Temporary fix for plugin initialization problem --- src/core/ext/client_config/resolver_registry.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/core/ext/client_config/resolver_registry.c b/src/core/ext/client_config/resolver_registry.c index 07f29bcb27a..e7a4abd568c 100644 --- a/src/core/ext/client_config/resolver_registry.c +++ b/src/core/ext/client_config/resolver_registry.c @@ -47,7 +47,6 @@ static int g_number_of_resolvers = 0; static char *g_default_resolver_prefix; void grpc_resolver_registry_init(const char *default_resolver_prefix) { - g_number_of_resolvers = 0; g_default_resolver_prefix = gpr_strdup(default_resolver_prefix); } @@ -57,6 +56,13 @@ void grpc_resolver_registry_shutdown(void) { grpc_resolver_factory_unref(g_all_of_the_resolvers[i]); } gpr_free(g_default_resolver_prefix); + // FIXME(ctiller): this should live in grpc_resolver_registry_init, + // however that would have the client_config plugin call this AFTER we start + // registering resolvers from third party plugins, and so they'd never show + // up. + // We likely need some kind of dependency system for plugins.... what form + // that takes is TBD. + g_number_of_resolvers = 0; } void grpc_register_resolver_type(grpc_resolver_factory *factory) { From f2f707ca5503249e637542d7b3015c3fef2e3023 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 5 May 2016 13:04:20 -0700 Subject: [PATCH 0301/1894] More clang-format fixes. --- src/core/lib/transport/metadata_batch.c | 2 +- test/core/bad_client/bad_client.h | 4 ++-- test/core/end2end/tests/large_metadata.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/lib/transport/metadata_batch.c b/src/core/lib/transport/metadata_batch.c index c0afc715bcc..e4398abeb78 100644 --- a/src/core/lib/transport/metadata_batch.c +++ b/src/core/lib/transport/metadata_batch.c @@ -195,7 +195,7 @@ int grpc_metadata_batch_is_empty(grpc_metadata_batch *batch) { size_t grpc_metadata_batch_size(grpc_metadata_batch *batch) { size_t size = 0; - for (grpc_linked_mdelem* elem = batch->list.head; elem != NULL; + for (grpc_linked_mdelem *elem = batch->list.head; elem != NULL; elem = elem->next) { size += GRPC_MDELEM_LENGTH(elem->md); } diff --git a/test/core/bad_client/bad_client.h b/test/core/bad_client/bad_client.h index ecd6721a78a..c8b2a4122f0 100644 --- a/test/core/bad_client/bad_client.h +++ b/test/core/bad_client/bad_client.h @@ -60,8 +60,8 @@ void grpc_run_bad_client_test( const char *client_payload, size_t client_payload_length, uint32_t flags); #define GRPC_RUN_BAD_CLIENT_TEST(server_validator, client_validator, payload, \ - flags) \ - grpc_run_bad_client_test(server_validator, client_validator, payload, \ + flags) \ + grpc_run_bad_client_test(server_validator, client_validator, payload, \ sizeof(payload) - 1, flags) #endif /* GRPC_TEST_CORE_BAD_CLIENT_BAD_CLIENT_H */ diff --git a/test/core/end2end/tests/large_metadata.c b/test/core/end2end/tests/large_metadata.c index dd29552b975..ae1f68a2b45 100644 --- a/test/core/end2end/tests/large_metadata.c +++ b/test/core/end2end/tests/large_metadata.c @@ -109,7 +109,7 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) { const size_t large_size = 64 * 1024; grpc_arg arg = {GRPC_ARG_INTEGER, GRPC_ARG_MAX_METADATA_SIZE, - {.integer=(int)large_size + 1024}}; + {.integer = (int)large_size + 1024}}; grpc_channel_args args = {1, &arg}; grpc_end2end_test_fixture f = begin_test(config, "test_request_with_large_metadata", &args, &args); From 7809f2b78a5abf3ecb2ade16f3be907388c559e8 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Thu, 5 May 2016 20:38:42 +0000 Subject: [PATCH 0302/1894] Raise parallelism in grpc._cython._channel_test The underlying bug in Core that this test was written to isolate was fixed weeks ago. --- src/python/grpcio/tests/unit/_cython/_channel_test.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/python/grpcio/tests/unit/_cython/_channel_test.py b/src/python/grpcio/tests/unit/_cython/_channel_test.py index b414f8e6f69..931cd9083ec 100644 --- a/src/python/grpcio/tests/unit/_cython/_channel_test.py +++ b/src/python/grpcio/tests/unit/_cython/_channel_test.py @@ -33,8 +33,7 @@ import unittest from grpc._cython import cygrpc -# TODO(nathaniel): This should be at least one hundred. Why not one thousand? -_PARALLELISM = 4 +from tests.unit.framework.common import test_constants def _channel_and_completion_queue(): @@ -61,7 +60,7 @@ def _create_loop_destroy(): def _in_parallel(behavior, arguments): threads = tuple( threading.Thread(target=behavior, args=arguments) - for _ in range(_PARALLELISM)) + for _ in range(test_constants.PARALLELISM)) for thread in threads: thread.start() for thread in threads: From ad0f7922540c7d1edabd3fbd03a8b98131953fc2 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 4 May 2016 19:49:31 -0700 Subject: [PATCH 0303/1894] Interop client that is resilient to server restarts --- .../client_config/subchannel_call_holder.c | 1 + test/cpp/interop/client.cc | 13 +- test/cpp/interop/interop_client.cc | 336 ++++++++++++++---- test/cpp/interop/interop_client.h | 62 ++-- test/cpp/interop/stress_interop_client.cc | 5 +- test/cpp/interop/stress_interop_client.h | 3 +- test/cpp/interop/stress_test.cc | 12 +- 7 files changed, 330 insertions(+), 102 deletions(-) diff --git a/src/core/ext/client_config/subchannel_call_holder.c b/src/core/ext/client_config/subchannel_call_holder.c index 9918fbdcb4f..91fa917661c 100644 --- a/src/core/ext/client_config/subchannel_call_holder.c +++ b/src/core/ext/client_config/subchannel_call_holder.c @@ -174,6 +174,7 @@ static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *arg, bool success) { GRPC_SUBCHANNEL_CALL_HOLDER_PICKING_SUBCHANNEL); holder->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING; if (holder->connected_subchannel == NULL) { + gpr_atm_no_barrier_store(&holder->subchannel_call, 1); fail_locked(exec_ctx, holder); } else if (1 == gpr_atm_acq_load(&holder->subchannel_call)) { /* already cancelled before subchannel became ready */ diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc index 9af6a880447..77278249794 100644 --- a/test/cpp/interop/client.cc +++ b/test/cpp/interop/client.cc @@ -81,6 +81,14 @@ DEFINE_string(default_service_account, "", DEFINE_string(service_account_key_file, "", "Path to service account json key file."); DEFINE_string(oauth_scope, "", "Scope for OAuth tokens."); +DEFINE_bool(do_not_abort_on_transient_failures, false, + "If set to 'true', abort() is not called in case of transient " + "failures (i.e failures that are temporary and will likely go away " + "on retrying; like a temporary connection failure) and an error " + "message is printed instead. Note that this flag just controls " + "whether abort() is called or not. It does not control whether the " + "test is retried in case of transient failures (and currently the " + "interop tests are not retried even if this flag is set to true)"); using grpc::testing::CreateChannelForTestCase; using grpc::testing::GetServiceAccountJsonKey; @@ -89,8 +97,9 @@ int main(int argc, char** argv) { grpc::testing::InitTest(&argc, &argv, true); gpr_log(GPR_INFO, "Testing these cases: %s", FLAGS_test_case.c_str()); int ret = 0; - grpc::testing::InteropClient client( - CreateChannelForTestCase(FLAGS_test_case)); + grpc::testing::InteropClient client(CreateChannelForTestCase(FLAGS_test_case), + true, + FLAGS_do_not_abort_on_transient_failures); if (FLAGS_test_case == "empty_unary") { client.DoEmpty(); } else if (FLAGS_test_case == "large_unary") { diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index 22293d211fa..e5853b40f87 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -134,23 +134,43 @@ void InteropClient::Reset(std::shared_ptr channel) { serviceStub_.Reset(channel); } -InteropClient::InteropClient(std::shared_ptr channel) - : serviceStub_(channel, true) {} - InteropClient::InteropClient(std::shared_ptr channel, - bool new_stub_every_test_case) - : serviceStub_(channel, new_stub_every_test_case) {} + bool new_stub_every_test_case, + bool do_not_abort_on_transient_failures) + : serviceStub_(channel, new_stub_every_test_case), + do_not_abort_on_transient_failures_(do_not_abort_on_transient_failures) {} -void InteropClient::AssertOkOrPrintErrorStatus(const Status& s) { +bool InteropClient::AssertStatusOk(const Status& s) { if (s.ok()) { - return; + return true; } - gpr_log(GPR_ERROR, "Error status code: %d, message: %s", s.error_code(), - s.error_message().c_str()); - GPR_ASSERT(0); + + // Note: At this point, s.error_code is definitely not StatusCode::OK (we + // already checked for s.ok() above). So, the following will call abort() + // (unless s.error_code() corresponds to a transient failure and + // 'do_not_abort_on_transient_failures' is true) + return AssertStatusCode(s, StatusCode::OK); } -void InteropClient::DoEmpty() { +bool InteropClient::AssertStatusCode(const Status& s, + StatusCode expected_code) { + if (s.error_code() == expected_code) { + return true; + } + + gpr_log(GPR_ERROR, "Error status code: %d (expected: %d), message: %s", + s.error_code(), expected_code, s.error_message().c_str()); + + // In case of transient transient/retryable failures (like a broken + // connection) we may or may not abort (see TransientFailureOrAbort()) + if (s.error_code() == grpc::StatusCode::UNAVAILABLE) { + return TransientFailureOrAbort(); + } + + abort(); +} + +bool InteropClient::DoEmpty() { gpr_log(GPR_DEBUG, "Sending an empty rpc..."); Empty request = Empty::default_instance(); @@ -158,17 +178,21 @@ void InteropClient::DoEmpty() { ClientContext context; Status s = serviceStub_.Get()->EmptyCall(&context, request, &response); - AssertOkOrPrintErrorStatus(s); + + if (!AssertStatusOk(s)) { + return false; + } gpr_log(GPR_DEBUG, "Empty rpc done."); + return true; } -void InteropClient::PerformLargeUnary(SimpleRequest* request, +bool InteropClient::PerformLargeUnary(SimpleRequest* request, SimpleResponse* response) { - PerformLargeUnary(request, response, NoopChecks); + return PerformLargeUnary(request, response, NoopChecks); } -void InteropClient::PerformLargeUnary(SimpleRequest* request, +bool InteropClient::PerformLargeUnary(SimpleRequest* request, SimpleResponse* response, CheckerFn custom_checks_fn) { ClientContext context; @@ -180,7 +204,9 @@ void InteropClient::PerformLargeUnary(SimpleRequest* request, request->mutable_payload()->set_body(payload.c_str(), kLargeRequestSize); Status s = serviceStub_.Get()->UnaryCall(&context, *request, response); - AssertOkOrPrintErrorStatus(s); + if (!AssertStatusOk(s)) { + return false; + } custom_checks_fn(inspector, request, response); @@ -203,9 +229,11 @@ void InteropClient::PerformLargeUnary(SimpleRequest* request, default: GPR_ASSERT(false); } + + return true; } -void InteropClient::DoComputeEngineCreds( +bool InteropClient::DoComputeEngineCreds( const grpc::string& default_service_account, const grpc::string& oauth_scope) { gpr_log(GPR_DEBUG, @@ -215,7 +243,11 @@ void InteropClient::DoComputeEngineCreds( request.set_fill_username(true); request.set_fill_oauth_scope(true); request.set_response_type(PayloadType::COMPRESSABLE); - PerformLargeUnary(&request, &response); + + if (!PerformLargeUnary(&request, &response)) { + return false; + } + gpr_log(GPR_DEBUG, "Got username %s", response.username().c_str()); gpr_log(GPR_DEBUG, "Got oauth_scope %s", response.oauth_scope().c_str()); GPR_ASSERT(!response.username().empty()); @@ -224,9 +256,10 @@ void InteropClient::DoComputeEngineCreds( const char* oauth_scope_str = response.oauth_scope().c_str(); GPR_ASSERT(oauth_scope.find(oauth_scope_str) != grpc::string::npos); gpr_log(GPR_DEBUG, "Large unary with compute engine creds done."); + return true; } -void InteropClient::DoOauth2AuthToken(const grpc::string& username, +bool InteropClient::DoOauth2AuthToken(const grpc::string& username, const grpc::string& oauth_scope) { gpr_log(GPR_DEBUG, "Sending a unary rpc with raw oauth2 access token credentials ..."); @@ -239,16 +272,20 @@ void InteropClient::DoOauth2AuthToken(const grpc::string& username, Status s = serviceStub_.Get()->UnaryCall(&context, request, &response); - AssertOkOrPrintErrorStatus(s); + if (!AssertStatusOk(s)) { + return false; + } + GPR_ASSERT(!response.username().empty()); GPR_ASSERT(!response.oauth_scope().empty()); GPR_ASSERT(username == response.username()); const char* oauth_scope_str = response.oauth_scope().c_str(); GPR_ASSERT(oauth_scope.find(oauth_scope_str) != grpc::string::npos); gpr_log(GPR_DEBUG, "Unary with oauth2 access token credentials done."); + return true; } -void InteropClient::DoPerRpcCreds(const grpc::string& json_key) { +bool InteropClient::DoPerRpcCreds(const grpc::string& json_key) { gpr_log(GPR_DEBUG, "Sending a unary rpc with per-rpc JWT access token ..."); SimpleRequest request; SimpleResponse response; @@ -263,35 +300,47 @@ void InteropClient::DoPerRpcCreds(const grpc::string& json_key) { Status s = serviceStub_.Get()->UnaryCall(&context, request, &response); - AssertOkOrPrintErrorStatus(s); + if (!AssertStatusOk(s)) { + return false; + } + GPR_ASSERT(!response.username().empty()); GPR_ASSERT(json_key.find(response.username()) != grpc::string::npos); gpr_log(GPR_DEBUG, "Unary with per-rpc JWT access token done."); + return true; } -void InteropClient::DoJwtTokenCreds(const grpc::string& username) { +bool InteropClient::DoJwtTokenCreds(const grpc::string& username) { gpr_log(GPR_DEBUG, "Sending a large unary rpc with JWT token credentials ..."); SimpleRequest request; SimpleResponse response; request.set_fill_username(true); request.set_response_type(PayloadType::COMPRESSABLE); - PerformLargeUnary(&request, &response); + + if (!PerformLargeUnary(&request, &response)) { + return false; + } + GPR_ASSERT(!response.username().empty()); GPR_ASSERT(username.find(response.username()) != grpc::string::npos); gpr_log(GPR_DEBUG, "Large unary with JWT token creds done."); + return true; } -void InteropClient::DoLargeUnary() { +bool InteropClient::DoLargeUnary() { gpr_log(GPR_DEBUG, "Sending a large unary rpc..."); SimpleRequest request; SimpleResponse response; request.set_response_type(PayloadType::COMPRESSABLE); - PerformLargeUnary(&request, &response); + if (!PerformLargeUnary(&request, &response)) { + return false; + } gpr_log(GPR_DEBUG, "Large unary done."); + return true; } -void InteropClient::DoLargeCompressedUnary() { +bool InteropClient::DoLargeCompressedUnary() { const CompressionType compression_types[] = {NONE, GZIP, DEFLATE}; const PayloadType payload_types[] = {COMPRESSABLE, UNCOMPRESSABLE, RANDOM}; for (size_t i = 0; i < GPR_ARRAY_SIZE(payload_types); i++) { @@ -307,14 +356,32 @@ void InteropClient::DoLargeCompressedUnary() { SimpleResponse response; request.set_response_type(payload_types[i]); request.set_response_compression(compression_types[j]); - PerformLargeUnary(&request, &response, CompressionChecks); + + if (!PerformLargeUnary(&request, &response, CompressionChecks)) { + gpr_log(GPR_ERROR, "Large compressed unary failed %s", log_suffix); + gpr_free(log_suffix); + return false; + } + gpr_log(GPR_DEBUG, "Large compressed unary done %s.", log_suffix); gpr_free(log_suffix); } } + + return true; } -void InteropClient::DoRequestStreaming() { +// Either abort() (unless do_not_abort_on_transient_failures_ is true) or return +// false +bool InteropClient::TransientFailureOrAbort() { + if (do_not_abort_on_transient_failures_) { + return false; + } + + abort(); +} + +bool InteropClient::DoRequestStreaming() { gpr_log(GPR_DEBUG, "Sending request steaming rpc ..."); ClientContext context; @@ -328,18 +395,24 @@ void InteropClient::DoRequestStreaming() { for (unsigned int i = 0; i < request_stream_sizes.size(); ++i) { Payload* payload = request.mutable_payload(); payload->set_body(grpc::string(request_stream_sizes[i], '\0')); - GPR_ASSERT(stream->Write(request)); + if (!stream->Write(request)) { + gpr_log(GPR_ERROR, "DoRequestStreaming(): stream->Write() failed"); + return TransientFailureOrAbort(); + } aggregated_payload_size += request_stream_sizes[i]; } stream->WritesDone(); + Status s = stream->Finish(); + if (!AssertStatusOk(s)) { + return false; + } GPR_ASSERT(response.aggregated_payload_size() == aggregated_payload_size); - AssertOkOrPrintErrorStatus(s); - gpr_log(GPR_DEBUG, "Request streaming done."); + return true; } -void InteropClient::DoResponseStreaming() { +bool InteropClient::DoResponseStreaming() { gpr_log(GPR_DEBUG, "Receiving response steaming rpc ..."); ClientContext context; @@ -358,13 +431,27 @@ void InteropClient::DoResponseStreaming() { grpc::string(response_stream_sizes[i], '\0')); ++i; } - GPR_ASSERT(response_stream_sizes.size() == i); + + if (i < response_stream_sizes.size()) { + // stream->Read() failed before reading all the expected messages. This is + // most likely due to connection failure. + gpr_log(GPR_ERROR, + "DoResponseStreaming(): Read fewer streams (%d) than " + "response_stream_sizes.size() (%d)", + i, response_stream_sizes.size()); + return TransientFailureOrAbort(); + } + Status s = stream->Finish(); - AssertOkOrPrintErrorStatus(s); + if (!AssertStatusOk(s)) { + return false; + } + gpr_log(GPR_DEBUG, "Response streaming done."); + return true; } -void InteropClient::DoResponseCompressedStreaming() { +bool InteropClient::DoResponseCompressedStreaming() { const CompressionType compression_types[] = {NONE, GZIP, DEFLATE}; const PayloadType payload_types[] = {COMPRESSABLE, UNCOMPRESSABLE, RANDOM}; for (size_t i = 0; i < GPR_ARRAY_SIZE(payload_types); i++) { @@ -432,17 +519,31 @@ void InteropClient::DoResponseCompressedStreaming() { ++k; } - GPR_ASSERT(response_stream_sizes.size() == k); - Status s = stream->Finish(); - - AssertOkOrPrintErrorStatus(s); gpr_log(GPR_DEBUG, "Response streaming done %s.", log_suffix); gpr_free(log_suffix); + + if (k < response_stream_sizes.size()) { + // stream->Read() failed before reading all the expected messages. This + // is most likely due to a connection failure. + gpr_log(GPR_ERROR, + "DoResponseCompressedStreaming(): Responses read (k=%d) is " + "less than the expected messages (i.e " + "response_stream_sizes.size() (%d)). (i=%d, j=%d)", + k, response_stream_sizes.size(), i, j); + return TransientFailureOrAbort(); + } + + Status s = stream->Finish(); + if (!AssertStatusOk(s)) { + return false; + } } } + + return true; } -void InteropClient::DoResponseStreamingWithSlowConsumer() { +bool InteropClient::DoResponseStreamingWithSlowConsumer() { gpr_log(GPR_DEBUG, "Receiving response steaming rpc with slow consumer ..."); ClientContext context; @@ -464,14 +565,26 @@ void InteropClient::DoResponseStreamingWithSlowConsumer() { usleep(kReceiveDelayMilliSeconds * 1000); ++i; } - GPR_ASSERT(kNumResponseMessages == i); + + if (i < kNumResponseMessages) { + gpr_log(GPR_ERROR, + "DoResponseStreamingWithSlowConsumer(): Responses read (i=%d) is " + "less than the expected messages (i.e kNumResponseMessages = %d)", + i, kNumResponseMessages); + + return TransientFailureOrAbort(); + } + Status s = stream->Finish(); + if (!AssertStatusOk(s)) { + return false; + } - AssertOkOrPrintErrorStatus(s); gpr_log(GPR_DEBUG, "Response streaming done."); + return true; } -void InteropClient::DoHalfDuplex() { +bool InteropClient::DoHalfDuplex() { gpr_log(GPR_DEBUG, "Sending half-duplex streaming rpc ..."); ClientContext context; @@ -483,7 +596,11 @@ void InteropClient::DoHalfDuplex() { ResponseParameters* response_parameter = request.add_response_parameters(); for (unsigned int i = 0; i < response_stream_sizes.size(); ++i) { response_parameter->set_size(response_stream_sizes[i]); - GPR_ASSERT(stream->Write(request)); + + if (!stream->Write(request)) { + gpr_log(GPR_ERROR, "DoHalfDuplex(): stream->Write() failed. i=%d", i); + return TransientFailureOrAbort(); + } } stream->WritesDone(); @@ -494,13 +611,27 @@ void InteropClient::DoHalfDuplex() { grpc::string(response_stream_sizes[i], '\0')); ++i; } - GPR_ASSERT(response_stream_sizes.size() == i); + + if (i < response_stream_sizes.size()) { + // stream->Read() failed before reading all the expected messages. This is + // most likely due to a connection failure + gpr_log(GPR_ERROR, + "DoHalfDuplex(): Responses read (i=%d) are less than the expected " + "number of messages response_stream_sizes.size() (%d)", + i, response_stream_sizes.size()); + return TransientFailureOrAbort(); + } + Status s = stream->Finish(); - AssertOkOrPrintErrorStatus(s); + if (!AssertStatusOk(s)) { + return false; + } + gpr_log(GPR_DEBUG, "Half-duplex streaming rpc done."); + return true; } -void InteropClient::DoPingPong() { +bool InteropClient::DoPingPong() { gpr_log(GPR_DEBUG, "Sending Ping Pong streaming rpc ..."); ClientContext context; @@ -513,23 +644,39 @@ void InteropClient::DoPingPong() { ResponseParameters* response_parameter = request.add_response_parameters(); Payload* payload = request.mutable_payload(); StreamingOutputCallResponse response; + for (unsigned int i = 0; i < request_stream_sizes.size(); ++i) { response_parameter->set_size(response_stream_sizes[i]); payload->set_body(grpc::string(request_stream_sizes[i], '\0')); - GPR_ASSERT(stream->Write(request)); - GPR_ASSERT(stream->Read(&response)); + + if (!stream->Write(request)) { + gpr_log(GPR_ERROR, "DoPingPong(): stream->Write() failed. i: %d", i); + return TransientFailureOrAbort(); + } + + if (!stream->Read(&response)) { + gpr_log(GPR_ERROR, "DoPingPong(): stream->Read() failed. i:%d", i); + return TransientFailureOrAbort(); + } + GPR_ASSERT(response.payload().body() == grpc::string(response_stream_sizes[i], '\0')); } stream->WritesDone(); + GPR_ASSERT(!stream->Read(&response)); + Status s = stream->Finish(); - AssertOkOrPrintErrorStatus(s); + if (!AssertStatusOk(s)) { + return false; + } + gpr_log(GPR_DEBUG, "Ping pong streaming done."); + return true; } -void InteropClient::DoCancelAfterBegin() { +bool InteropClient::DoCancelAfterBegin() { gpr_log(GPR_DEBUG, "Sending request steaming rpc ..."); ClientContext context; @@ -542,11 +689,16 @@ void InteropClient::DoCancelAfterBegin() { gpr_log(GPR_DEBUG, "Trying to cancel..."); context.TryCancel(); Status s = stream->Finish(); - GPR_ASSERT(s.error_code() == StatusCode::CANCELLED); + + if (!AssertStatusCode(s, StatusCode::CANCELLED)) { + return false; + } + gpr_log(GPR_DEBUG, "Canceling streaming done."); + return true; } -void InteropClient::DoCancelAfterFirstResponse() { +bool InteropClient::DoCancelAfterFirstResponse() { gpr_log(GPR_DEBUG, "Sending Ping Pong streaming rpc ..."); ClientContext context; @@ -560,17 +712,27 @@ void InteropClient::DoCancelAfterFirstResponse() { response_parameter->set_size(31415); request.mutable_payload()->set_body(grpc::string(27182, '\0')); StreamingOutputCallResponse response; - GPR_ASSERT(stream->Write(request)); - GPR_ASSERT(stream->Read(&response)); + + if (!stream->Write(request)) { + gpr_log(GPR_ERROR, "DoCancelAfterFirstResponse(): stream->Write() failed"); + return TransientFailureOrAbort(); + } + + if (!stream->Read(&response)) { + gpr_log(GPR_ERROR, "DoCancelAfterFirstResponse(): stream->Read failed"); + return TransientFailureOrAbort(); + } GPR_ASSERT(response.payload().body() == grpc::string(31415, '\0')); + gpr_log(GPR_DEBUG, "Trying to cancel..."); context.TryCancel(); Status s = stream->Finish(); gpr_log(GPR_DEBUG, "Canceling pingpong streaming done."); + return true; } -void InteropClient::DoTimeoutOnSleepingServer() { +bool InteropClient::DoTimeoutOnSleepingServer() { gpr_log(GPR_DEBUG, "Sending Ping Pong streaming rpc with a short deadline..."); @@ -584,14 +746,23 @@ void InteropClient::DoTimeoutOnSleepingServer() { StreamingOutputCallRequest request; request.mutable_payload()->set_body(grpc::string(27182, '\0')); - stream->Write(request); + + if (!stream->Write(request)) { + gpr_log(GPR_ERROR, "DoTimeoutOnSleepingServer(): stream->Write() failed"); + return TransientFailureOrAbort(); + } Status s = stream->Finish(); - GPR_ASSERT(s.error_code() == StatusCode::DEADLINE_EXCEEDED); + + if (!AssertStatusCode(s, StatusCode::DEADLINE_EXCEEDED)) { + return false; + } + gpr_log(GPR_DEBUG, "Pingpong streaming timeout done."); + return true; } -void InteropClient::DoEmptyStream() { +bool InteropClient::DoEmptyStream() { gpr_log(GPR_DEBUG, "Starting empty_stream."); ClientContext context; @@ -601,12 +772,17 @@ void InteropClient::DoEmptyStream() { stream->WritesDone(); StreamingOutputCallResponse response; GPR_ASSERT(stream->Read(&response) == false); + Status s = stream->Finish(); - AssertOkOrPrintErrorStatus(s); + if (!AssertStatusOk(s)) { + return false; + } + gpr_log(GPR_DEBUG, "empty_stream done."); + return true; } -void InteropClient::DoStatusWithMessage() { +bool InteropClient::DoStatusWithMessage() { gpr_log(GPR_DEBUG, "Sending RPC with a request for status code 2 and message"); @@ -620,12 +796,16 @@ void InteropClient::DoStatusWithMessage() { Status s = serviceStub_.Get()->UnaryCall(&context, request, &response); - GPR_ASSERT(s.error_code() == grpc::StatusCode::UNKNOWN); + if (!AssertStatusCode(s, grpc::StatusCode::UNKNOWN)) { + return false; + } + GPR_ASSERT(s.error_message() == test_msg); gpr_log(GPR_DEBUG, "Done testing Status and Message"); + return true; } -void InteropClient::DoCustomMetadata() { +bool InteropClient::DoCustomMetadata() { const grpc::string kEchoInitialMetadataKey("x-grpc-test-echo-initial"); const grpc::string kInitialMetadataValue("test_initial_metadata_value"); const grpc::string kEchoTrailingBinMetadataKey( @@ -645,7 +825,10 @@ void InteropClient::DoCustomMetadata() { request.mutable_payload()->set_body(payload.c_str(), kLargeRequestSize); Status s = serviceStub_.Get()->UnaryCall(&context, request, &response); - AssertOkOrPrintErrorStatus(s); + if (!AssertStatusOk(s)) { + return false; + } + const auto& server_initial_metadata = context.GetServerInitialMetadata(); auto iter = server_initial_metadata.find(kEchoInitialMetadataKey); GPR_ASSERT(iter != server_initial_metadata.end()); @@ -675,14 +858,29 @@ void InteropClient::DoCustomMetadata() { grpc::string payload(kLargeRequestSize, '\0'); request.mutable_payload()->set_body(payload.c_str(), kLargeRequestSize); StreamingOutputCallResponse response; - GPR_ASSERT(stream->Write(request)); + + if (!stream->Write(request)) { + gpr_log(GPR_ERROR, "DoCustomMetadata(): stream->Write() failed"); + return TransientFailureOrAbort(); + } + stream->WritesDone(); - GPR_ASSERT(stream->Read(&response)); + + if (!stream->Read(&response)) { + gpr_log(GPR_ERROR, "DoCustomMetadata(): stream->Read() failed"); + return TransientFailureOrAbort(); + } + GPR_ASSERT(response.payload().body() == grpc::string(kLargeResponseSize, '\0')); + GPR_ASSERT(!stream->Read(&response)); + Status s = stream->Finish(); - AssertOkOrPrintErrorStatus(s); + if (!AssertStatusOk(s)) { + return false; + } + const auto& server_initial_metadata = context.GetServerInitialMetadata(); auto iter = server_initial_metadata.find(kEchoInitialMetadataKey); GPR_ASSERT(iter != server_initial_metadata.end()); @@ -695,6 +893,8 @@ void InteropClient::DoCustomMetadata() { gpr_log(GPR_DEBUG, "Done testing stream with custom metadata"); } + + return true; } } // namespace testing diff --git a/test/cpp/interop/interop_client.h b/test/cpp/interop/interop_client.h index a3794fd93fe..ae75762bb8f 100644 --- a/test/cpp/interop/interop_client.h +++ b/test/cpp/interop/interop_client.h @@ -51,41 +51,42 @@ using CheckerFn = class InteropClient { public: - explicit InteropClient(std::shared_ptr channel); - explicit InteropClient( - std::shared_ptr channel, - bool new_stub_every_test_case); // If new_stub_every_test_case is true, - // a new TestService::Stub object is - // created for every test case below + /// If new_stub_every_test_case is true, a new TestService::Stub object is + /// created for every test case + /// If do_not_abort_on_transient_failures is true, abort() is not called in + /// case of transient failures (like connection failures) + explicit InteropClient(std::shared_ptr channel, + bool new_stub_every_test_case, + bool do_not_abort_on_transient_failures); ~InteropClient() {} void Reset(std::shared_ptr channel); - void DoEmpty(); - void DoLargeUnary(); - void DoLargeCompressedUnary(); - void DoPingPong(); - void DoHalfDuplex(); - void DoRequestStreaming(); - void DoResponseStreaming(); - void DoResponseCompressedStreaming(); - void DoResponseStreamingWithSlowConsumer(); - void DoCancelAfterBegin(); - void DoCancelAfterFirstResponse(); - void DoTimeoutOnSleepingServer(); - void DoEmptyStream(); - void DoStatusWithMessage(); - void DoCustomMetadata(); + bool DoEmpty(); + bool DoLargeUnary(); + bool DoLargeCompressedUnary(); + bool DoPingPong(); + bool DoHalfDuplex(); + bool DoRequestStreaming(); + bool DoResponseStreaming(); + bool DoResponseCompressedStreaming(); + bool DoResponseStreamingWithSlowConsumer(); + bool DoCancelAfterBegin(); + bool DoCancelAfterFirstResponse(); + bool DoTimeoutOnSleepingServer(); + bool DoEmptyStream(); + bool DoStatusWithMessage(); + bool DoCustomMetadata(); // Auth tests. // username is a string containing the user email - void DoJwtTokenCreds(const grpc::string& username); - void DoComputeEngineCreds(const grpc::string& default_service_account, + bool DoJwtTokenCreds(const grpc::string& username); + bool DoComputeEngineCreds(const grpc::string& default_service_account, const grpc::string& oauth_scope); // username the GCE default service account email - void DoOauth2AuthToken(const grpc::string& username, + bool DoOauth2AuthToken(const grpc::string& username, const grpc::string& oauth_scope); // username is a string containing the user email - void DoPerRpcCreds(const grpc::string& json_key); + bool DoPerRpcCreds(const grpc::string& json_key); private: class ServiceStub { @@ -105,13 +106,18 @@ class InteropClient { // Get() call }; - void PerformLargeUnary(SimpleRequest* request, SimpleResponse* response); + bool PerformLargeUnary(SimpleRequest* request, SimpleResponse* response); /// Run \a custom_check_fn as an additional check. - void PerformLargeUnary(SimpleRequest* request, SimpleResponse* response, + bool PerformLargeUnary(SimpleRequest* request, SimpleResponse* response, CheckerFn custom_checks_fn); - void AssertOkOrPrintErrorStatus(const Status& s); + bool AssertStatusOk(const Status& s); + bool AssertStatusCode(const Status& s, StatusCode expected_code); + bool TransientFailureOrAbort(); ServiceStub serviceStub_; + + /// If true, abort() is not called for transient failures + bool do_not_abort_on_transient_failures_; }; } // namespace testing diff --git a/test/cpp/interop/stress_interop_client.cc b/test/cpp/interop/stress_interop_client.cc index f287a5aa3b4..31f5a424a0d 100644 --- a/test/cpp/interop/stress_interop_client.cc +++ b/test/cpp/interop/stress_interop_client.cc @@ -84,11 +84,12 @@ StressTestInteropClient::StressTestInteropClient( int test_id, const grpc::string& server_address, std::shared_ptr channel, const WeightedRandomTestSelector& test_selector, long test_duration_secs, - long sleep_duration_ms) + long sleep_duration_ms, bool do_not_abort_on_transient_failures) : test_id_(test_id), server_address_(server_address), channel_(channel), - interop_client_(new InteropClient(channel, false)), + interop_client_(new InteropClient(channel, false, + do_not_abort_on_transient_failures)), test_selector_(test_selector), test_duration_secs_(test_duration_secs), sleep_duration_ms_(sleep_duration_ms) {} diff --git a/test/cpp/interop/stress_interop_client.h b/test/cpp/interop/stress_interop_client.h index cb0cd988214..c41ac6afc72 100644 --- a/test/cpp/interop/stress_interop_client.h +++ b/test/cpp/interop/stress_interop_client.h @@ -87,7 +87,8 @@ class StressTestInteropClient { StressTestInteropClient(int test_id, const grpc::string& server_address, std::shared_ptr channel, const WeightedRandomTestSelector& test_selector, - long test_duration_secs, long sleep_duration_ms); + long test_duration_secs, long sleep_duration_ms, + bool do_not_abort_on_transient_failures); // The main function. Use this as the thread entry point. // qps_gauge is the QpsGauge to record the requests per second metric diff --git a/test/cpp/interop/stress_test.cc b/test/cpp/interop/stress_test.cc index d9e3fd25c51..f0e9e3287ec 100644 --- a/test/cpp/interop/stress_test.cc +++ b/test/cpp/interop/stress_test.cc @@ -101,6 +101,10 @@ DEFINE_int32(log_level, GPR_LOG_SEVERITY_INFO, "The choices are: 0 (GPR_LOG_SEVERITY_DEBUG), 1 " "(GPR_LOG_SEVERITY_INFO) and 2 (GPR_LOG_SEVERITY_ERROR)"); +DEFINE_bool(do_not_abort_on_transient_failures, true, + "If set to 'true', abort() is not called in case of transient " + "failures like temporary connection failures."); + using grpc::testing::kTestCaseList; using grpc::testing::MetricsService; using grpc::testing::MetricsServiceImpl; @@ -189,6 +193,12 @@ void LogParameterInfo(const std::vector& addresses, gpr_log(GPR_INFO, "test_cases : %s", FLAGS_test_cases.c_str()); gpr_log(GPR_INFO, "sleep_duration_ms: %d", FLAGS_sleep_duration_ms); gpr_log(GPR_INFO, "test_duration_secs: %d", FLAGS_test_duration_secs); + gpr_log(GPR_INFO, "num_channels_per_server: %d", + FLAGS_num_channels_per_server); + gpr_log(GPR_INFO, "num_stubs_per_channel: %d", FLAGS_num_stubs_per_channel); + gpr_log(GPR_INFO, "log_level: %d", FLAGS_log_level); + gpr_log(GPR_INFO, "do_not_abort_on_transient_failures: %s", + FLAGS_do_not_abort_on_transient_failures ? "true" : "false"); int num = 0; for (auto it = addresses.begin(); it != addresses.end(); it++) { @@ -272,7 +282,7 @@ int main(int argc, char** argv) { stub_idx++) { StressTestInteropClient* client = new StressTestInteropClient( ++thread_idx, *it, channel, test_selector, FLAGS_test_duration_secs, - FLAGS_sleep_duration_ms); + FLAGS_sleep_duration_ms, FLAGS_do_not_abort_on_transient_failures); bool is_already_created = false; // QpsGauge name From 5130427b300e9e30839a77aa070a89243cb24e93 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 5 May 2016 15:19:00 -0700 Subject: [PATCH 0304/1894] Add remaining inteorp tests to stress client --- test/cpp/interop/stress_interop_client.cc | 54 +++++++++++++++++++---- test/cpp/interop/stress_interop_client.h | 25 +++++++++-- test/cpp/interop/stress_test.cc | 9 ++++ 3 files changed, 76 insertions(+), 12 deletions(-) diff --git a/test/cpp/interop/stress_interop_client.cc b/test/cpp/interop/stress_interop_client.cc index 31f5a424a0d..aa95682e741 100644 --- a/test/cpp/interop/stress_interop_client.cc +++ b/test/cpp/interop/stress_interop_client.cc @@ -127,31 +127,67 @@ void StressTestInteropClient::MainLoop(std::shared_ptr qps_gauge) { } } -// TODO(sree): Add all interop tests -void StressTestInteropClient::RunTest(TestCaseType test_case) { +bool StressTestInteropClient::RunTest(TestCaseType test_case) { + bool is_success = false; switch (test_case) { case EMPTY_UNARY: { - interop_client_->DoEmpty(); + is_success = interop_client_->DoEmpty(); break; } case LARGE_UNARY: { - interop_client_->DoLargeUnary(); + is_success = interop_client_->DoLargeUnary(); break; } case LARGE_COMPRESSED_UNARY: { - interop_client_->DoLargeCompressedUnary(); + is_success = interop_client_->DoLargeCompressedUnary(); break; } case CLIENT_STREAMING: { - interop_client_->DoRequestStreaming(); + is_success = interop_client_->DoRequestStreaming(); break; } case SERVER_STREAMING: { - interop_client_->DoResponseStreaming(); + is_success = interop_client_->DoResponseStreaming(); + break; + } + case SERVER_COMPRESSED_STREAMING: { + is_success = interop_client_->DoResponseCompressedStreaming(); + break; + } + case SLOW_CONSUMER: { + is_success = interop_client_->DoResponseStreamingWithSlowConsumer(); + break; + } + case HALF_DUPLEX: { + is_success = interop_client_->DoHalfDuplex(); + break; + } + case PING_PONG: { + is_success = interop_client_->DoPingPong(); + break; + } + case CANCEL_AFTER_BEGIN: { + is_success = interop_client_->DoCancelAfterBegin(); + break; + } + case CANCEL_AFTER_FIRST_RESPONSE: { + is_success = interop_client_->DoCancelAfterFirstResponse(); + break; + } + case TIMEOUT_ON_SLEEPING_SERVER: { + is_success = interop_client_->DoTimeoutOnSleepingServer(); break; } case EMPTY_STREAM: { - interop_client_->DoEmptyStream(); + is_success = interop_client_->DoEmptyStream(); + break; + } + case STATUS_CODE_AND_MESSAGE: { + is_success = interop_client_->DoStatusWithMessage(); + break; + } + case CUSTOM_METADATA: { + is_success = interop_client_->DoCustomMetadata(); break; } default: { @@ -160,6 +196,8 @@ void StressTestInteropClient::RunTest(TestCaseType test_case) { break; } } + + return is_success; } } // namespace testing diff --git a/test/cpp/interop/stress_interop_client.h b/test/cpp/interop/stress_interop_client.h index c41ac6afc72..aa93b58b4a7 100644 --- a/test/cpp/interop/stress_interop_client.h +++ b/test/cpp/interop/stress_interop_client.h @@ -49,7 +49,6 @@ namespace testing { using std::pair; using std::vector; -// TODO(sreek): Add more test cases here in future enum TestCaseType { UNKNOWN_TEST = -1, EMPTY_UNARY = 0, @@ -57,7 +56,16 @@ enum TestCaseType { LARGE_COMPRESSED_UNARY = 2, CLIENT_STREAMING = 3, SERVER_STREAMING = 4, - EMPTY_STREAM = 5 + SERVER_COMPRESSED_STREAMING = 5, + SLOW_CONSUMER = 6, + HALF_DUPLEX = 7, + PING_PONG = 8, + CANCEL_AFTER_BEGIN = 9, + CANCEL_AFTER_FIRST_RESPONSE = 10, + TIMEOUT_ON_SLEEPING_SERVER = 11, + EMPTY_STREAM = 12, + STATUS_CODE_AND_MESSAGE = 13, + CUSTOM_METADATA = 14 }; const vector> kTestCaseList = { @@ -66,7 +74,16 @@ const vector> kTestCaseList = { {LARGE_COMPRESSED_UNARY, "large_compressed_unary"}, {CLIENT_STREAMING, "client_streaming"}, {SERVER_STREAMING, "server_streaming"}, - {EMPTY_STREAM, "empty_stream"}}; + {SERVER_COMPRESSED_STREAMING, "server_compressed_streaming"}, + {SLOW_CONSUMER, "slow_consumer"}, + {HALF_DUPLEX, "half_duplex"}, + {PING_PONG, "ping_pong"}, + {CANCEL_AFTER_BEGIN, "cancel_after_begin"}, + {CANCEL_AFTER_FIRST_RESPONSE, "cancel_after_first_response"}, + {TIMEOUT_ON_SLEEPING_SERVER, "timeout_on_sleeping_server"}, + {EMPTY_STREAM, "empty_stream"}, + {STATUS_CODE_AND_MESSAGE, "status_code_and_message"}, + {CUSTOM_METADATA, "custom_metadata"}}; class WeightedRandomTestSelector { public: @@ -95,7 +112,7 @@ class StressTestInteropClient { void MainLoop(std::shared_ptr qps_gauge); private: - void RunTest(TestCaseType test_case); + bool RunTest(TestCaseType test_case); int test_id_; const grpc::string& server_address_; diff --git a/test/cpp/interop/stress_test.cc b/test/cpp/interop/stress_test.cc index f0e9e3287ec..77879319003 100644 --- a/test/cpp/interop/stress_test.cc +++ b/test/cpp/interop/stress_test.cc @@ -89,7 +89,16 @@ DEFINE_string(test_cases, "", " large_compressed_unary\n" " client_streaming\n" " server_streaming\n" + " server_compressed_streaming\n" + " slow_consumer\n" + " half_duplex\n" + " ping_pong\n" + " cancel_after_begin\n" + " cancel_after_first_response\n" + " timeout_on_sleeping_server\n" " empty_stream\n" + " status_code_and_message\n" + " custom_metadata\n" " Example: \"empty_unary:20,large_unary:10,empty_stream:70\"\n" " The above will execute 'empty_unary', 20% of the time," " 'large_unary', 10% of the time and 'empty_stream' the remaining" From b836b5bfee46e9d1ee211dba31a9b22c03339b57 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 6 May 2016 00:55:59 +0200 Subject: [PATCH 0305/1894] Adding missing copyright. --- .../python/grpcio_tools/grpc/protoc/main.cc | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/tools/distrib/python/grpcio_tools/grpc/protoc/main.cc b/tools/distrib/python/grpcio_tools/grpc/protoc/main.cc index 4487a6851ae..c9936a3a6b4 100644 --- a/tools/distrib/python/grpcio_tools/grpc/protoc/main.cc +++ b/tools/distrib/python/grpcio_tools/grpc/protoc/main.cc @@ -1,3 +1,32 @@ +// Copyright 2016, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + #include #include From c5549fcd0a893f6ba10662c0b2b76be7a37aa62c Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 5 May 2016 16:12:54 -0700 Subject: [PATCH 0306/1894] Remove redundant error check --- test/cpp/interop/interop_client.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index e5853b40f87..ca89d055944 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -746,14 +746,9 @@ bool InteropClient::DoTimeoutOnSleepingServer() { StreamingOutputCallRequest request; request.mutable_payload()->set_body(grpc::string(27182, '\0')); - - if (!stream->Write(request)) { - gpr_log(GPR_ERROR, "DoTimeoutOnSleepingServer(): stream->Write() failed"); - return TransientFailureOrAbort(); - } + stream->Write(request); Status s = stream->Finish(); - if (!AssertStatusCode(s, StatusCode::DEADLINE_EXCEEDED)) { return false; } From d7b162f6015bb57e67c61dc99617ac8bad7e8adc Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 4 May 2016 15:09:26 -0700 Subject: [PATCH 0307/1894] add some more scenarios --- .../run_tests/performance/scenario_config.py | 823 +++++++----------- 1 file changed, 319 insertions(+), 504 deletions(-) diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index ddbe2375691..52efe8b86b3 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -69,6 +69,75 @@ DEEP=100 WIDE=64 +def _get_secargs(is_secure): + if is_secure: + return SECURE_SECARGS + else: + return None + + +def _ping_pong_scenario(name, rpc_type, + client_type, server_type, + secure=True, + use_generic_payload=False, + use_unconstrained_client=False, + server_language=None, + server_core_limit=0, + async_server_threads=0, + warmup_seconds=WARMUP_SECONDS): + """Creates a basic ping pong scenario.""" + scenario = { + 'name': name, + 'num_servers': 1, + 'num_clients': 1, + 'client_config': { + 'client_type': client_type, + 'security_params': _get_secargs(secure), + 'outstanding_rpcs_per_channel': 1, + 'client_channels': 1, + 'async_client_threads': 1, + 'rpc_type': rpc_type, + 'load_params': { + 'closed_loop': {} + }, + 'histogram_params': HISTOGRAM_PARAMS, + }, + 'server_config': { + 'server_type': server_type, + 'security_params': _get_secargs(secure), + 'core_limit': server_core_limit, + 'async_server_threads': async_server_threads, + }, + 'warmup_seconds': warmup_seconds, + 'benchmark_seconds': BENCHMARK_SECONDS + } + if use_generic_payload: + if server_type != 'ASYNC_GENERIC_SERVER': + raise Exception('Use ASYNC_GENERIC_SERVER for generic payload.') + scenario['client_config']['payload_config'] = EMPTY_GENERIC_PAYLOAD + scenario['server_config']['payload_config'] = EMPTY_GENERIC_PAYLOAD + else: + # For proto payload, only the client should get the config. + scenario['client_config']['payload_config'] = EMPTY_PROTO_PAYLOAD + + if use_unconstrained_client: + scenario['num_clients'] = 0 # use as many client as available. + # TODO(jtattermusch): for SYNC_CLIENT, this will create 100*64 threads + # and that's probably too much (at least for wrapped languages). + scenario['client_config']['outstanding_rpcs_per_channel'] = DEEP + scenario['client_config']['client_channels'] = WIDE + scenario['client_config']['async_client_threads'] = 0 + else: + scenario['client_config']['outstanding_rpcs_per_channel'] = 1 + scenario['client_config']['client_channels'] = 1 + scenario['client_config']['async_client_threads'] = 1 + + if server_language: + # the SERVER_LANGUAGE field is recognized by run_performance_tests.py + scenario['SERVER_LANGUAGE'] = server_language + return scenario + + class CXXLanguage: def __init__(self): @@ -83,205 +152,59 @@ class CXXLanguage: def scenarios(self): # TODO(ctiller): add 70% load latency test for secure in [True, False]: - if secure: - secstr = 'secure' - secargs = SECURE_SECARGS - else: - secstr = 'insecure' - secargs = None - - yield { - 'name': 'cpp_generic_async_streaming_ping_pong_%s' - % secstr, - 'num_servers': 1, - 'num_clients': 1, - 'client_config': { - 'client_type': 'ASYNC_CLIENT', - 'security_params': secargs, - 'outstanding_rpcs_per_channel': 1, - 'client_channels': 1, - 'async_client_threads': 1, - 'rpc_type': 'STREAMING', - 'load_params': { - 'closed_loop': {} - }, - 'payload_config': EMPTY_GENERIC_PAYLOAD, - 'histogram_params': HISTOGRAM_PARAMS, - }, - 'server_config': { - 'server_type': 'ASYNC_GENERIC_SERVER', - 'security_params': secargs, - 'core_limit': 1, - 'async_server_threads': 1, - 'payload_config': EMPTY_GENERIC_PAYLOAD, - }, - 'warmup_seconds': WARMUP_SECONDS, - 'benchmark_seconds': BENCHMARK_SECONDS - } - yield { - 'name': 'cpp_generic_async_streaming_qps_unconstrained_%s' - % secstr, - 'num_servers': 1, - 'num_clients': 0, - 'client_config': { - 'client_type': 'ASYNC_CLIENT', - 'security_params': secargs, - 'outstanding_rpcs_per_channel': DEEP, - 'client_channels': WIDE, - 'async_client_threads': 0, - 'rpc_type': 'STREAMING', - 'load_params': { - 'closed_loop': {} - }, - 'payload_config': EMPTY_GENERIC_PAYLOAD, - 'histogram_params': HISTOGRAM_PARAMS, - }, - 'server_config': { - 'server_type': 'ASYNC_GENERIC_SERVER', - 'security_params': secargs, - 'core_limit': SINGLE_MACHINE_CORES/2, - 'async_server_threads': 0, - 'payload_config': EMPTY_GENERIC_PAYLOAD, - }, - 'warmup_seconds': WARMUP_SECONDS, - 'benchmark_seconds': BENCHMARK_SECONDS - } - yield { - 'name': 'cpp_generic_async_streaming_qps_one_server_core_%s' - % secstr, - 'num_servers': 1, - 'num_clients': 0, - 'client_config': { - 'client_type': 'ASYNC_CLIENT', - 'security_params': secargs, - 'outstanding_rpcs_per_channel': DEEP, - 'client_channels': WIDE, - 'async_client_threads': 0, - 'rpc_type': 'STREAMING', - 'load_params': { - 'closed_loop': {} - }, - 'payload_config': EMPTY_GENERIC_PAYLOAD, - 'histogram_params': HISTOGRAM_PARAMS, - }, - 'server_config': { - 'server_type': 'ASYNC_GENERIC_SERVER', - 'security_params': secargs, - 'core_limit': 1, - 'async_server_threads': 1, - 'payload_config': EMPTY_GENERIC_PAYLOAD, - }, - 'warmup_seconds': WARMUP_SECONDS, - 'benchmark_seconds': BENCHMARK_SECONDS - } - yield { - 'name': 'cpp_protobuf_async_streaming_qps_unconstrained_%s' - % secstr, - 'num_servers': 1, - 'num_clients': 0, - 'client_config': { - 'client_type': 'ASYNC_CLIENT', - 'security_params': secargs, - 'outstanding_rpcs_per_channel': DEEP, - 'client_channels': WIDE, - 'async_client_threads': 0, - 'rpc_type': 'STREAMING', - 'load_params': { - 'closed_loop': {} - }, - 'payload_config': EMPTY_PROTO_PAYLOAD, - 'histogram_params': HISTOGRAM_PARAMS, - }, - 'server_config': { - 'server_type': 'ASYNC_SERVER', - 'security_params': secargs, - 'core_limit': SINGLE_MACHINE_CORES/2, - 'async_server_threads': 0, - }, - 'warmup_seconds': WARMUP_SECONDS, - 'benchmark_seconds': BENCHMARK_SECONDS - } - yield { - 'name': 'cpp_protobuf_async_streaming_ping_pong_%s' - % secstr, - 'num_servers': 1, - 'num_clients': 1, - 'client_config': { - 'client_type': 'ASYNC_CLIENT', - 'security_params': secargs, - 'outstanding_rpcs_per_channel': 1, - 'client_channels': 1, - 'async_client_threads': 1, - 'rpc_type': 'STREAMING', - 'load_params': { - 'closed_loop': {} - }, - 'payload_config': EMPTY_PROTO_PAYLOAD, - 'histogram_params': HISTOGRAM_PARAMS, - }, - 'server_config': { - 'server_type': 'ASYNC_SERVER', - 'security_params': secargs, - 'core_limit': 1, - 'async_server_threads': 1, - }, - 'warmup_seconds': WARMUP_SECONDS, - 'benchmark_seconds': BENCHMARK_SECONDS - } - yield { - 'name': 'cpp_protobuf_sync_unary_ping_pong_%s' - % secstr, - 'num_servers': 1, - 'num_clients': 1, - 'client_config': { - 'client_type': 'SYNC_CLIENT', - 'security_params': secargs, - 'outstanding_rpcs_per_channel': 1, - 'client_channels': 1, - 'async_client_threads': 0, - 'rpc_type': 'UNARY', - 'load_params': { - 'closed_loop': {} - }, - 'payload_config': EMPTY_PROTO_PAYLOAD, - 'histogram_params': HISTOGRAM_PARAMS, - }, - 'server_config': { - 'server_type': 'SYNC_SERVER', - 'security_params': secargs, - 'core_limit': 1, - 'async_server_threads': 0, - }, - 'warmup_seconds': WARMUP_SECONDS, - 'benchmark_seconds': BENCHMARK_SECONDS - } - yield { - 'name': 'cpp_protobuf_async_unary_ping_pong_%s' - % secstr, - 'num_servers': 1, - 'num_clients': 1, - 'client_config': { - 'client_type': 'ASYNC_CLIENT', - 'security_params': secargs, - 'outstanding_rpcs_per_channel': 1, - 'client_channels': 1, - 'async_client_threads': 1, - 'rpc_type': 'UNARY', - 'load_params': { - 'closed_loop': {} - }, - 'payload_config': EMPTY_PROTO_PAYLOAD, - 'histogram_params': HISTOGRAM_PARAMS, - }, - 'server_config': { - 'server_type': 'ASYNC_SERVER', - 'security_params': secargs, - 'core_limit': 1, - 'async_server_threads': 1, - }, - 'warmup_seconds': WARMUP_SECONDS, - 'benchmark_seconds': BENCHMARK_SECONDS - } + secstr = 'secure' if secure else 'insecure' + + yield _ping_pong_scenario( + 'cpp_generic_async_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', + use_generic_payload=True, server_core_limit=1, async_server_threads=1, + secure=secure) + + yield _ping_pong_scenario( + 'cpp_protobuf_async_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + server_core_limit=1, async_server_threads=1, + secure=secure) + + yield _ping_pong_scenario( + 'cpp_protobuf_async_unary_ping_pong_%s' % secstr, rpc_type='UNARY', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + server_core_limit=1, async_server_threads=1, + secure=secure) + + yield _ping_pong_scenario( + 'cpp_protobuf_sync_unary_ping_pong_%s' % secstr, rpc_type='UNARY', + client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + server_core_limit=1, async_server_threads=1, + secure=secure) + + yield _ping_pong_scenario( + 'cpp_protobuf_async_unary_qps_unconstrained_%s' % secstr, rpc_type='UNARY', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + server_core_limit=SINGLE_MACHINE_CORES/2, + use_unconstrained_client=True, + secure=secure) + + yield _ping_pong_scenario( + 'cpp_protobuf_async_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + server_core_limit=SINGLE_MACHINE_CORES/2, + use_unconstrained_client=True, + secure=secure) + + yield _ping_pong_scenario( + 'cpp_generic_async_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', + use_unconstrained_client=True, use_generic_payload=True, + server_core_limit=SINGLE_MACHINE_CORES/2, + secure=secure) + + yield _ping_pong_scenario( + 'cpp_generic_async_streaming_qps_one_server_core_%s' % secstr, rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', + use_unconstrained_client=True, use_generic_payload=True, + server_core_limit=1, async_server_threads=1, + secure=secure) def __str__(self): return 'c++' @@ -299,113 +222,42 @@ class CSharpLanguage: return 100 def scenarios(self): - secargs = SECURE_SECARGS - yield { - 'name': 'csharp_generic_async_streaming_ping_pong', - 'num_servers': 1, - 'num_clients': 1, - 'client_config': { - 'client_type': 'ASYNC_CLIENT', - 'security_params': secargs, - 'outstanding_rpcs_per_channel': 1, - 'client_channels': 1, - 'async_client_threads': 1, - 'rpc_type': 'STREAMING', - 'load_params': { - 'closed_loop': {} - }, - 'payload_config': EMPTY_GENERIC_PAYLOAD, - 'histogram_params': HISTOGRAM_PARAMS, - }, - 'server_config': { - 'server_type': 'ASYNC_GENERIC_SERVER', - 'security_params': secargs, - 'core_limit': 0, - 'async_server_threads': 0, - 'payload_config': EMPTY_GENERIC_PAYLOAD, - }, - 'warmup_seconds': WARMUP_SECONDS, - 'benchmark_seconds': BENCHMARK_SECONDS - } - yield { - 'name': 'csharp_protobuf_async_unary_ping_pong', - 'num_servers': 1, - 'num_clients': 1, - 'client_config': { - 'client_type': 'ASYNC_CLIENT', - 'security_params': secargs, - 'outstanding_rpcs_per_channel': 1, - 'client_channels': 1, - 'async_client_threads': 1, - 'rpc_type': 'UNARY', - 'load_params': { - 'closed_loop': {} - }, - 'payload_config': EMPTY_PROTO_PAYLOAD, - 'histogram_params': HISTOGRAM_PARAMS, - }, - 'server_config': { - 'server_type': 'ASYNC_SERVER', - 'security_params': secargs, - 'core_limit': 0, - 'async_server_threads': 0, - }, - 'warmup_seconds': WARMUP_SECONDS, - 'benchmark_seconds': BENCHMARK_SECONDS - } - yield { - 'name': 'csharp_protobuf_sync_to_async_unary_ping_pong', - 'num_servers': 1, - 'num_clients': 1, - 'client_config': { - 'client_type': 'SYNC_CLIENT', - 'security_params': secargs, - 'outstanding_rpcs_per_channel': 1, - 'client_channels': 1, - 'async_client_threads': 1, - 'rpc_type': 'UNARY', - 'load_params': { - 'closed_loop': {} - }, - 'payload_config': EMPTY_PROTO_PAYLOAD, - 'histogram_params': HISTOGRAM_PARAMS, - }, - 'server_config': { - 'server_type': 'ASYNC_SERVER', - 'security_params': secargs, - 'core_limit': 0, - 'async_server_threads': 0, - }, - 'warmup_seconds': WARMUP_SECONDS, - 'benchmark_seconds': BENCHMARK_SECONDS - } - yield { - 'name': 'csharp_to_cpp_protobuf_sync_unary_ping_pong', - 'num_servers': 1, - 'num_clients': 1, - 'client_config': { - 'client_type': 'SYNC_CLIENT', - 'security_params': secargs, - 'outstanding_rpcs_per_channel': 1, - 'client_channels': 1, - 'async_client_threads': 1, - 'rpc_type': 'UNARY', - 'load_params': { - 'closed_loop': {} - }, - 'payload_config': EMPTY_PROTO_PAYLOAD, - 'histogram_params': HISTOGRAM_PARAMS, - }, - 'server_config': { - 'server_type': 'SYNC_SERVER', - 'security_params': secargs, - 'core_limit': 1, - 'async_server_threads': 1, - }, - 'warmup_seconds': WARMUP_SECONDS, - 'benchmark_seconds': BENCHMARK_SECONDS, - 'SERVER_LANGUAGE': 'c++' # recognized by run_performance_tests.py - } + yield _ping_pong_scenario( + 'csharp_generic_async_streaming_ping_pong', rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', + use_generic_payload=True) + + yield _ping_pong_scenario( + 'csharp_protobuf_async_streaming_ping_pong', rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER') + + yield _ping_pong_scenario( + 'csharp_protobuf_async_unary_ping_pong', rpc_type='UNARY', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER') + + yield _ping_pong_scenario( + 'csharp_protobuf_sync_to_async_unary_ping_pong', rpc_type='UNARY', + client_type='SYNC_CLIENT', server_type='ASYNC_SERVER') + + yield _ping_pong_scenario( + 'csharp_protobuf_async_unary_qps_unconstrained', rpc_type='UNARY', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + use_unconstrained_client=True) + + yield _ping_pong_scenario( + 'csharp_protobuf_async_streaming_qps_unconstrained', rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + use_unconstrained_client=True) + + yield _ping_pong_scenario( + 'csharp_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY', + client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + server_language='c++', server_core_limit=1, async_server_threads=1) + + yield _ping_pong_scenario( + 'csharp_to_cpp_protobuf_async_streaming_ping_pong', rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + server_language='c++', server_core_limit=1, async_server_threads=1) def __str__(self): return 'csharp' @@ -424,34 +276,43 @@ class NodeLanguage: return 200 def scenarios(self): - # TODO(jtattermusch): add more scenarios - secargs = SECURE_SECARGS - yield { - 'name': 'node_protobuf_unary_ping_pong', - 'num_servers': 1, - 'num_clients': 1, - 'client_config': { - 'client_type': 'ASYNC_CLIENT', - 'security_params': secargs, - 'outstanding_rpcs_per_channel': 1, - 'client_channels': 1, - 'async_client_threads': 1, - 'rpc_type': 'UNARY', - 'load_params': { - 'closed_loop': {} - }, - 'payload_config': EMPTY_PROTO_PAYLOAD, - 'histogram_params': HISTOGRAM_PARAMS, - }, - 'server_config': { - 'server_type': 'ASYNC_SERVER', - 'security_params': secargs, - 'core_limit': 0, - 'async_server_threads': 1, - }, - 'warmup_seconds': WARMUP_SECONDS, - 'benchmark_seconds': BENCHMARK_SECONDS - } + # TODO(jtattermusch): make this scenario work + #yield _ping_pong_scenario( + # 'node_generic_async_streaming_ping_pong', rpc_type='STREAMING', + # client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', + # use_generic_payload=True) + + # TODO(jtattermusch): make this scenario work + #yield _ping_pong_scenario( + # 'node_protobuf_async_streaming_ping_pong', rpc_type='STREAMING', + # client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER') + + yield _ping_pong_scenario( + 'node_protobuf_unary_ping_pong', rpc_type='UNARY', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER') + + yield _ping_pong_scenario( + 'node_protobuf_async_unary_qps_unconstrained', rpc_type='UNARY', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + use_unconstrained_client=True) + + # TODO(jtattermusch): make this scenario work + #yield _ping_pong_scenario( + # 'node_protobuf_async_streaming_qps_unconstrained', rpc_type='STREAMING', + # client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + # use_unconstrained_client=True) + + # TODO(jtattermusch): make this scenario work + #yield _ping_pong_scenario( + # 'node_to_cpp_protobuf_async_unary_ping_pong', rpc_type='UNARY', + # client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + # server_language='c++', server_core_limit=1, async_server_threads=1) + + # TODO(jtattermusch): make this scenario work + #yield _ping_pong_scenario( + # 'node_to_cpp_protobuf_async_streaming_ping_pong', rpc_type='STREAMING', + # client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + # server_language='c++', server_core_limit=1, async_server_threads=1) def __str__(self): return 'node' @@ -468,114 +329,49 @@ class PythonLanguage: return 500 def scenarios(self): - yield { - 'name': 'python_to_cpp_protobuf_streaming_ping_pong', - 'num_servers': 1, - 'num_clients': 1, - 'client_config': { - 'client_type': 'ASYNC_CLIENT', - 'security_params': SECURE_SECARGS, - 'outstanding_rpcs_per_channel': 1, - 'client_channels': 1, - 'async_client_threads': 1, - 'rpc_type': 'STREAMING', - 'load_params': { - 'closed_loop': {} - }, - 'payload_config': EMPTY_PROTO_PAYLOAD, - 'histogram_params': HISTOGRAM_PARAMS, - }, - 'server_config': { - 'server_type': 'SYNC_SERVER', - 'security_params': SECURE_SECARGS, - 'core_limit': 0, - 'async_server_threads': 1, - }, - 'warmup_seconds': WARMUP_SECONDS, - 'benchmark_seconds': BENCHMARK_SECONDS, - 'SERVER_LANGUAGE': 'c++' - } - yield { - 'name': 'python_protobuf_sync_unary_ping_pong', - 'num_servers': 1, - 'num_clients': 1, - 'client_config': { - 'client_type': 'SYNC_CLIENT', - 'security_params': SECURE_SECARGS, - 'outstanding_rpcs_per_channel': 1, - 'client_channels': 1, - 'async_client_threads': 1, - 'rpc_type': 'UNARY', - 'load_params': { - 'closed_loop': {} - }, - 'payload_config': EMPTY_PROTO_PAYLOAD, - 'histogram_params': HISTOGRAM_PARAMS, - }, - 'server_config': { - 'server_type': 'SYNC_SERVER', - 'security_params': SECURE_SECARGS, - 'core_limit': 0, - 'async_server_threads': 1, - }, - 'warmup_seconds': WARMUP_SECONDS, - 'benchmark_seconds': BENCHMARK_SECONDS, - } - yield { - 'name': 'python_protobuf_async_unary_ping_pong', - 'num_servers': 1, - 'num_clients': 1, - 'client_config': { - 'client_type': 'ASYNC_CLIENT', - 'security_params': SECURE_SECARGS, - 'outstanding_rpcs_per_channel': 1, - 'client_channels': 1, - 'async_client_threads': 1, - 'rpc_type': 'UNARY', - 'load_params': { - 'closed_loop': {} - }, - 'payload_config': EMPTY_PROTO_PAYLOAD, - 'histogram_params': HISTOGRAM_PARAMS, - }, - 'server_config': { - 'server_type': 'SYNC_SERVER', - 'security_params': SECURE_SECARGS, - 'core_limit': 0, - 'async_server_threads': 1, - }, - 'warmup_seconds': WARMUP_SECONDS, - 'benchmark_seconds': BENCHMARK_SECONDS, - } - yield { - 'name': 'python_to_cpp_single_channel_throughput', - 'num_servers': 1, - 'num_clients': 1, - 'client_config': { - 'client_type': 'ASYNC_CLIENT', - 'security_params': SECURE_SECARGS, - 'outstanding_rpcs_per_channel': 1, - 'client_channels': 1, - 'async_client_threads': 1, - 'rpc_type': 'STREAMING', - 'load_params': { - 'closed_loop': {} - }, - 'payload_config': BIG_GENERIC_PAYLOAD, - 'histogram_params': HISTOGRAM_PARAMS, - }, - 'server_config': { - 'server_type': 'ASYNC_GENERIC_SERVER', - 'security_params': SECURE_SECARGS, - 'core_limit': SINGLE_MACHINE_CORES/2, - 'async_server_threads': 1, - 'payload_config': BIG_GENERIC_PAYLOAD, - }, - 'warmup_seconds': WARMUP_SECONDS, - 'benchmark_seconds': BENCHMARK_SECONDS, - 'SERVER_LANGUAGE': 'c++' - } - + # TODO(jtattermusch): this scenario reports QPS 0.0 + yield _ping_pong_scenario( + 'python_generic_async_streaming_ping_pong', rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', + use_generic_payload=True) + + # TODO(jtattermusch): make this scenario work + #yield _ping_pong_scenario( + # 'python_protobuf_async_streaming_ping_pong', rpc_type='STREAMING', + # client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER') + + # TODO(jtattermusch): make this scenario work + #yield _ping_pong_scenario( + # 'python_protobuf_async_unary_ping_pong', rpc_type='UNARY', + # client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER') + + yield _ping_pong_scenario( + 'python_protobuf_sync_unary_ping_pong', rpc_type='UNARY', + client_type='SYNC_CLIENT', server_type='SYNC_SERVER') + + # TODO(jtattermusch): make this scenario work + #yield _ping_pong_scenario( + # 'python_protobuf_sync_unary_qps_unconstrained', rpc_type='UNARY', + # client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + # use_unconstrained_client=True) + + # TODO(jtattermusch): make this scenario work + #yield _ping_pong_scenario( + # 'python_protobuf_async_streaming_qps_unconstrained', rpc_type='STREAMING', + # client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + # use_unconstrained_client=True) + + yield _ping_pong_scenario( + 'python_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY', + client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + server_language='c++', server_core_limit=1, async_server_threads=1) + + # TODO(jtattermusch): make this scenario work + #yield _ping_pong_scenario( + # 'python_to_cpp_protobuf_sync_streaming_ping_pong', rpc_type='STREAMING', + # client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + # server_language='c++', server_core_limit=1, async_server_threads=1) + def __str__(self): return 'python' @@ -592,34 +388,35 @@ class RubyLanguage: return 300 def scenarios(self): - # TODO(jtattermusch): add more scenarios - secargs = SECURE_SECARGS - yield { - 'name': 'ruby_protobuf_unary_ping_pong', - 'num_servers': 1, - 'num_clients': 1, - 'client_config': { - 'client_type': 'SYNC_CLIENT', - 'security_params': secargs, - 'outstanding_rpcs_per_channel': 1, - 'client_channels': 1, - 'async_client_threads': 1, - 'rpc_type': 'UNARY', - 'load_params': { - 'closed_loop': {} - }, - 'payload_config': EMPTY_PROTO_PAYLOAD, - 'histogram_params': HISTOGRAM_PARAMS, - }, - 'server_config': { - 'server_type': 'SYNC_SERVER', - 'security_params': secargs, - 'core_limit': 0, - 'async_server_threads': 1, - }, - 'warmup_seconds': WARMUP_SECONDS, - 'benchmark_seconds': BENCHMARK_SECONDS - } + yield _ping_pong_scenario( + 'ruby_protobuf_sync_streaming_ping_pong', rpc_type='STREAMING', + client_type='SYNC_CLIENT', server_type='SYNC_SERVER') + + yield _ping_pong_scenario( + 'ruby_protobuf_unary_ping_pong', rpc_type='UNARY', + client_type='SYNC_CLIENT', server_type='SYNC_SERVER') + + # TODO: scenario reports QPS of 0.0 + #yield _ping_pong_scenario( + # 'ruby_protobuf_sync_unary_qps_unconstrained', rpc_type='UNARY', + # client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + # use_unconstrained_client=True) + + # TODO: scenario reports QPS of 0.0 + #yield _ping_pong_scenario( + # 'ruby_protobuf_sync_streaming_qps_unconstrained', rpc_type='STREAMING', + # client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + # use_unconstrained_client=True) + + yield _ping_pong_scenario( + 'ruby_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY', + client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + server_language='c++', server_core_limit=1, async_server_threads=1) + + yield _ping_pong_scenario( + 'ruby_to_cpp_protobuf_sync_streaming_ping_pong', rpc_type='STREAMING', + client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + server_language='c++', server_core_limit=1, async_server_threads=1) def __str__(self): return 'ruby' @@ -638,41 +435,59 @@ class JavaLanguage: return 400 def scenarios(self): - # TODO(jtattermusch): add more scenarios for secure in [True, False]: - if secure: - secstr = 'secure' - secargs = SECURE_SECARGS - else: - secstr = 'insecure' - secargs = None - - yield { - 'name': 'java_protobuf_unary_ping_pong_%s' % secstr, - 'num_servers': 1, - 'num_clients': 1, - 'client_config': { - 'client_type': 'SYNC_CLIENT', - 'security_params': secargs, - 'outstanding_rpcs_per_channel': 1, - 'client_channels': 1, - 'async_client_threads': 1, - 'rpc_type': 'UNARY', - 'load_params': { - 'closed_loop': {} - }, - 'payload_config': EMPTY_PROTO_PAYLOAD, - 'histogram_params': HISTOGRAM_PARAMS, - }, - 'server_config': { - 'server_type': 'SYNC_SERVER', - 'security_params': secargs, - 'core_limit': 0, - 'async_server_threads': 1, - }, - 'warmup_seconds': JAVA_WARMUP_SECONDS, - 'benchmark_seconds': BENCHMARK_SECONDS - } + secstr = 'secure' if secure else 'insecure' + + yield _ping_pong_scenario( + 'java_generic_async_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', + use_generic_payload=True, async_server_threads=1, + secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS) + + yield _ping_pong_scenario( + 'java_protobuf_async_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + async_server_threads=1, + secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS) + + yield _ping_pong_scenario( + 'java_protobuf_async_unary_ping_pong_%s' % secstr, rpc_type='UNARY', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + async_server_threads=1, + secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS) + + yield _ping_pong_scenario( + 'java_protobuf_unary_ping_pong_%s' % secstr, rpc_type='UNARY', + client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + async_server_threads=1, + secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS) + + yield _ping_pong_scenario( + 'java_protobuf_async_unary_qps_unconstrained_%s' % secstr, rpc_type='UNARY', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + use_unconstrained_client=True, + secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS) + + yield _ping_pong_scenario( + 'java_protobuf_async_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + use_unconstrained_client=True, + secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS) + + yield _ping_pong_scenario( + 'java_generic_async_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', + use_unconstrained_client=True, use_generic_payload=True, + secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS) + + yield _ping_pong_scenario( + 'java_generic_async_streaming_qps_one_server_core_%s' % secstr, rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', + use_unconstrained_client=True, use_generic_payload=True, + async_server_threads=1, + secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS) + + # TODO(jtattermusch): add scenarios java vs C++ def __str__(self): return 'java' From 541d5d7ae2745a9e3dc55348df3168c0f51d382e Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 5 May 2016 16:08:49 -0700 Subject: [PATCH 0308/1894] increase qps_worker max lifetime --- tools/run_tests/run_performance_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py index 5519666e847..8b67d921f22 100755 --- a/tools/run_tests/run_performance_tests.py +++ b/tools/run_tests/run_performance_tests.py @@ -89,7 +89,7 @@ def create_qpsworker_job(language, shortname=None, jobspec = jobset.JobSpec( cmdline=cmdline, shortname=shortname, - timeout_seconds=30*60) + timeout_seconds=2*60*60) return QpsWorkerJob(jobspec, language, host_and_port) From 804ff719e3a512e4a2f6c3a9585f528917c2fd93 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 5 May 2016 16:25:40 -0700 Subject: [PATCH 0309/1894] Progress converting to new error system --- src/core/ext/census/grpc_filter.c | 6 +- .../ext/client_config/channel_connectivity.c | 23 +++--- src/core/ext/client_config/client_channel.c | 77 +++++++++++------- src/core/ext/client_config/lb_policy.c | 6 +- src/core/ext/client_config/lb_policy.h | 8 +- src/core/ext/client_config/subchannel.c | 71 +++++++++-------- src/core/ext/client_config/subchannel.h | 2 +- .../client_config/subchannel_call_holder.c | 47 +++++++---- .../ext/lb_policy/pick_first/pick_first.c | 78 ++++++++++++------- .../ext/lb_policy/round_robin/round_robin.c | 60 ++++++++------ .../ext/resolver/dns/native/dns_resolver.c | 24 ++++-- .../ext/resolver/sockaddr/sockaddr_resolver.c | 4 +- .../chttp2/client/insecure/channel_create.c | 6 +- .../client/secure/secure_channel_create.c | 8 +- .../chttp2/server/insecure/server_chttp2.c | 47 +++++++---- .../server/secure/server_secure_chttp2.c | 28 +++++-- .../chttp2/transport/chttp2_transport.c | 67 +++++++++------- src/core/lib/iomgr/error.c | 6 ++ src/core/lib/iomgr/error.h | 3 + .../lib/security/credentials/credentials.h | 1 + .../credentials/fake/fake_credentials.c | 8 +- .../google_default_credentials.c | 23 +++--- .../security/credentials/jwt/jwt_verifier.c | 20 ++--- .../credentials/oauth2/oauth2_credentials.c | 21 ++--- .../credentials/oauth2/oauth2_credentials.h | 4 +- src/core/lib/security/transport/handshake.c | 62 ++++++++------- .../lib/security/transport/secure_endpoint.c | 25 +++--- .../security/transport/server_auth_filter.c | 14 ++-- src/core/lib/security/transport/tsi_error.c | 40 ++++++++++ src/core/lib/security/transport/tsi_error.h | 42 ++++++++++ src/core/lib/surface/channel.c | 2 +- src/core/lib/surface/server.c | 13 ++-- src/core/lib/transport/connectivity_state.c | 24 +++++- src/core/lib/transport/connectivity_state.h | 5 +- src/core/lib/transport/transport.h | 2 +- 35 files changed, 572 insertions(+), 305 deletions(-) create mode 100644 src/core/lib/security/transport/tsi_error.c create mode 100644 src/core/lib/security/transport/tsi_error.h diff --git a/src/core/ext/census/grpc_filter.c b/src/core/ext/census/grpc_filter.c index 5e278ef127e..df7016efe39 100644 --- a/src/core/ext/census/grpc_filter.c +++ b/src/core/ext/census/grpc_filter.c @@ -91,14 +91,14 @@ static void client_start_transport_op(grpc_exec_ctx *exec_ctx, } static void server_on_done_recv(grpc_exec_ctx *exec_ctx, void *ptr, - bool success) { + grpc_error *error) { grpc_call_element *elem = ptr; call_data *calld = elem->call_data; channel_data *chand = elem->channel_data; - if (success) { + if (error == GRPC_ERROR_NONE) { extract_and_annotate_method_tag(calld->recv_initial_metadata, calld, chand); } - calld->on_done_recv->cb(exec_ctx, calld->on_done_recv->cb_arg, success); + calld->on_done_recv->cb(exec_ctx, calld->on_done_recv->cb_arg, error); } static void server_mutate_op(grpc_call_element *elem, diff --git a/src/core/ext/client_config/channel_connectivity.c b/src/core/ext/client_config/channel_connectivity.c index 3ebc3336081..1898bf6279f 100644 --- a/src/core/ext/client_config/channel_connectivity.c +++ b/src/core/ext/client_config/channel_connectivity.c @@ -75,7 +75,7 @@ typedef enum { typedef struct { gpr_mu mu; callback_phase phase; - int success; + grpc_error *error; grpc_closure on_complete; grpc_timer alarm; grpc_connectivity_state state; @@ -122,7 +122,7 @@ static void finished_completion(grpc_exec_ctx *exec_ctx, void *pw, } static void partly_done(grpc_exec_ctx *exec_ctx, state_watcher *w, - int due_to_completion) { + bool due_to_completion, grpc_error *error) { int delete = 0; if (due_to_completion) { @@ -131,13 +131,14 @@ static void partly_done(grpc_exec_ctx *exec_ctx, state_watcher *w, gpr_mu_lock(&w->mu); if (due_to_completion) { - w->success = 1; + grpc_error_unref(w->error); + w->error = GRPC_ERROR_NONE; } switch (w->phase) { case WAITING: w->phase = CALLING_BACK; - grpc_cq_end_op(exec_ctx, w->cq, w->tag, w->success, finished_completion, - w, &w->completion_storage); + grpc_cq_end_op(exec_ctx, w->cq, w->tag, grpc_error_ref(w->error), + finished_completion, w, &w->completion_storage); break; case CALLING_BACK: w->phase = CALLING_BACK_AND_FINISHED; @@ -155,12 +156,14 @@ static void partly_done(grpc_exec_ctx *exec_ctx, state_watcher *w, } } -static void watch_complete(grpc_exec_ctx *exec_ctx, void *pw, bool success) { - partly_done(exec_ctx, pw, 1); +static void watch_complete(grpc_exec_ctx *exec_ctx, void *pw, + grpc_error *error) { + partly_done(exec_ctx, pw, true, error); } -static void timeout_complete(grpc_exec_ctx *exec_ctx, void *pw, bool success) { - partly_done(exec_ctx, pw, 0); +static void timeout_complete(grpc_exec_ctx *exec_ctx, void *pw, + grpc_error *error) { + partly_done(exec_ctx, pw, false, error); } void grpc_channel_watch_connectivity_state( @@ -185,7 +188,7 @@ void grpc_channel_watch_connectivity_state( grpc_closure_init(&w->on_complete, watch_complete, w); w->phase = WAITING; w->state = last_observed_state; - w->success = 0; + w->error = GRPC_ERROR_CREATE("Some error"); w->cq = cq; w->tag = tag; w->channel = channel; diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index 9b5a078aece..be9e962bcd0 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -117,6 +117,7 @@ static void watch_lb_policy(grpc_exec_ctx *exec_ctx, channel_data *chand, static void set_channel_connectivity_state_locked(grpc_exec_ctx *exec_ctx, channel_data *chand, grpc_connectivity_state state, + grpc_error *error, const char *reason) { if ((state == GRPC_CHANNEL_TRANSIENT_FAILURE || state == GRPC_CHANNEL_FATAL_FAILURE) && @@ -127,11 +128,13 @@ static void set_channel_connectivity_state_locked(grpc_exec_ctx *exec_ctx, /* mask= */ GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY, /* check= */ 0); } - grpc_connectivity_state_set(exec_ctx, &chand->state_tracker, state, reason); + grpc_connectivity_state_set(exec_ctx, &chand->state_tracker, state, error, + reason); } -static void on_lb_policy_state_changed_locked( - grpc_exec_ctx *exec_ctx, lb_policy_connectivity_watcher *w) { +static void on_lb_policy_state_changed_locked(grpc_exec_ctx *exec_ctx, + lb_policy_connectivity_watcher *w, + grpc_error *error) { grpc_connectivity_state publish_state = w->state; /* check if the notification is for a stale policy */ if (w->lb_policy != w->chand->lb_policy) return; @@ -144,18 +147,18 @@ static void on_lb_policy_state_changed_locked( w->chand->lb_policy = NULL; } set_channel_connectivity_state_locked(exec_ctx, w->chand, publish_state, - "lb_changed"); + error, "lb_changed"); if (w->state != GRPC_CHANNEL_FATAL_FAILURE) { watch_lb_policy(exec_ctx, w->chand, w->lb_policy, w->state); } } static void on_lb_policy_state_changed(grpc_exec_ctx *exec_ctx, void *arg, - bool iomgr_success) { + grpc_error *error) { lb_policy_connectivity_watcher *w = arg; gpr_mu_lock(&w->chand->mu_config); - on_lb_policy_state_changed_locked(exec_ctx, w); + on_lb_policy_state_changed_locked(exec_ctx, w, error); gpr_mu_unlock(&w->chand->mu_config); GRPC_CHANNEL_STACK_UNREF(exec_ctx, w->chand->owning_stack, "watch_lb_policy"); @@ -177,19 +180,22 @@ static void watch_lb_policy(grpc_exec_ctx *exec_ctx, channel_data *chand, } static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg, - bool iomgr_success) { + grpc_error *error) { channel_data *chand = arg; grpc_lb_policy *lb_policy = NULL; grpc_lb_policy *old_lb_policy; grpc_connectivity_state state = GRPC_CHANNEL_TRANSIENT_FAILURE; int exit_idle = 0; + grpc_error *state_error = GRPC_ERROR_CREATE("No load balancing policy"); if (chand->incoming_configuration != NULL) { lb_policy = grpc_client_config_get_lb_policy(chand->incoming_configuration); if (lb_policy != NULL) { GRPC_LB_POLICY_REF(lb_policy, "channel"); GRPC_LB_POLICY_REF(lb_policy, "config_change"); - state = grpc_lb_policy_check_connectivity(exec_ctx, lb_policy); + grpc_error_unref(state_error); + state = + grpc_lb_policy_check_connectivity(exec_ctx, lb_policy, &state_error); } grpc_client_config_unref(exec_ctx, chand->incoming_configuration); @@ -209,7 +215,9 @@ static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg, grpc_exec_ctx_enqueue_list(exec_ctx, &chand->waiting_for_config_closures, NULL); } else if (chand->resolver == NULL /* disconnected */) { - grpc_closure_list_fail_all(&chand->waiting_for_config_closures); + grpc_closure_list_fail_all( + &chand->waiting_for_config_closures, + GRPC_ERROR_CREATE_REFERENCING("Channel disconnected", &error, 1)); grpc_exec_ctx_enqueue_list(exec_ctx, &chand->waiting_for_config_closures, NULL); } @@ -219,8 +227,8 @@ static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg, chand->exit_idle_when_lb_policy_arrives = 0; } - if (iomgr_success && chand->resolver) { - set_channel_connectivity_state_locked(exec_ctx, chand, state, + if (error == GRPC_ERROR_NONE && chand->resolver) { + set_channel_connectivity_state_locked(exec_ctx, chand, state, state_error, "new_lb+resolver"); if (lb_policy != NULL) { watch_lb_policy(exec_ctx, chand, lb_policy, state); @@ -236,8 +244,12 @@ static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg, GRPC_RESOLVER_UNREF(exec_ctx, chand->resolver, "channel"); chand->resolver = NULL; } + grpc_error *refs[] = {error, state_error}; set_channel_connectivity_state_locked( - exec_ctx, chand, GRPC_CHANNEL_FATAL_FAILURE, "resolver_gone"); + exec_ctx, chand, GRPC_CHANNEL_FATAL_FAILURE, + GRPC_ERROR_CREATE_REFERENCING("Got config after disconnection", refs, + GPR_ARRAY_SIZE(refs)), + "resolver_gone"); gpr_mu_unlock(&chand->mu_config); } @@ -264,7 +276,7 @@ static void cc_start_transport_op(grpc_exec_ctx *exec_ctx, grpc_transport_op *op) { channel_data *chand = elem->channel_data; - grpc_exec_ctx_enqueue(exec_ctx, op->on_consumed, true, NULL); + grpc_exec_ctx_push(exec_ctx, op->on_consumed, GRPC_ERROR_NONE, NULL); GPR_ASSERT(op->set_accept_stream == false); if (op->bind_pollset != NULL) { @@ -283,7 +295,9 @@ static void cc_start_transport_op(grpc_exec_ctx *exec_ctx, if (op->send_ping != NULL) { if (chand->lb_policy == NULL) { - grpc_exec_ctx_enqueue(exec_ctx, op->send_ping, false, NULL); + grpc_exec_ctx_push(exec_ctx, op->send_ping, + GRPC_ERROR_CREATE("Ping with no load balancing"), + NULL); } else { grpc_lb_policy_ping_one(exec_ctx, chand->lb_policy, op->send_ping); op->bind_pollset = NULL; @@ -291,14 +305,16 @@ static void cc_start_transport_op(grpc_exec_ctx *exec_ctx, op->send_ping = NULL; } - if (op->disconnect && chand->resolver != NULL) { + if (op->disconnect_with_error != GRPC_ERROR_NONE && chand->resolver != NULL) { set_channel_connectivity_state_locked( - exec_ctx, chand, GRPC_CHANNEL_FATAL_FAILURE, "disconnect"); + exec_ctx, chand, GRPC_CHANNEL_FATAL_FAILURE, + grpc_error_ref(op->disconnect_with_error), "disconnect"); grpc_resolver_shutdown(exec_ctx, chand->resolver); GRPC_RESOLVER_UNREF(exec_ctx, chand->resolver, "channel"); chand->resolver = NULL; if (!chand->started_resolving) { - grpc_closure_list_fail_all(&chand->waiting_for_config_closures); + grpc_closure_list_fail_all(&chand->waiting_for_config_closures, + op->disconnect_with_error); grpc_exec_ctx_enqueue_list(exec_ctx, &chand->waiting_for_config_closures, NULL); } @@ -328,16 +344,17 @@ static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *arg, grpc_connected_subchannel **connected_subchannel, grpc_closure *on_ready); -static void continue_picking(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void continue_picking(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { continue_picking_args *cpa = arg; if (cpa->connected_subchannel == NULL) { /* cancelled, do nothing */ - } else if (!success) { - grpc_exec_ctx_enqueue(exec_ctx, cpa->on_ready, false, NULL); + } else if (error != GRPC_ERROR_NONE) { + grpc_exec_ctx_push(exec_ctx, cpa->on_ready, grpc_error_ref(error), NULL); } else if (cc_pick_subchannel(exec_ctx, cpa->elem, cpa->initial_metadata, cpa->initial_metadata_flags, cpa->connected_subchannel, cpa->on_ready)) { - grpc_exec_ctx_enqueue(exec_ctx, cpa->on_ready, true, NULL); + grpc_exec_ctx_push(exec_ctx, cpa->on_ready, GRPC_ERROR_NONE, NULL); } gpr_free(cpa); } @@ -362,11 +379,12 @@ static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *elemp, connected_subchannel); } for (closure = chand->waiting_for_config_closures.head; closure != NULL; - closure = grpc_closure_next(closure)) { + closure = closure->next_data.next) { cpa = closure->cb_arg; if (cpa->connected_subchannel == connected_subchannel) { cpa->connected_subchannel = NULL; - grpc_exec_ctx_enqueue(exec_ctx, cpa->on_ready, false, NULL); + grpc_exec_ctx_push(exec_ctx, cpa->on_ready, + GRPC_ERROR_CREATE("Pick cancelled"), NULL); } } gpr_mu_unlock(&chand->mu_config); @@ -398,10 +416,11 @@ static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *elemp, cpa->on_ready = on_ready; cpa->elem = elem; grpc_closure_init(&cpa->closure, continue_picking, cpa); - grpc_closure_list_add(&chand->waiting_for_config_closures, &cpa->closure, - 1); + grpc_closure_list_append(&chand->waiting_for_config_closures, &cpa->closure, + GRPC_ERROR_NONE); } else { - grpc_exec_ctx_enqueue(exec_ctx, on_ready, false, NULL); + grpc_exec_ctx_push(exec_ctx, on_ready, GRPC_ERROR_CREATE("Disconnected"), + NULL); } gpr_mu_unlock(&chand->mu_config); return 0; @@ -506,7 +525,7 @@ grpc_connectivity_state grpc_client_channel_check_connectivity_state( channel_data *chand = elem->channel_data; grpc_connectivity_state out; gpr_mu_lock(&chand->mu_config); - out = grpc_connectivity_state_check(&chand->state_tracker); + out = grpc_connectivity_state_check(&chand->state_tracker, NULL); if (out == GRPC_CHANNEL_IDLE && try_to_connect) { if (chand->lb_policy != NULL) { grpc_lb_policy_exit_idle(exec_ctx, chand->lb_policy); @@ -533,7 +552,7 @@ typedef struct { } external_connectivity_watcher; static void on_external_watch_complete(grpc_exec_ctx *exec_ctx, void *arg, - bool iomgr_success) { + grpc_error *error) { external_connectivity_watcher *w = arg; grpc_closure *follow_up = w->on_complete; grpc_pollset_set_del_pollset(exec_ctx, w->chand->interested_parties, @@ -541,7 +560,7 @@ static void on_external_watch_complete(grpc_exec_ctx *exec_ctx, void *arg, GRPC_CHANNEL_STACK_UNREF(exec_ctx, w->chand->owning_stack, "external_connectivity_watcher"); gpr_free(w); - follow_up->cb(exec_ctx, follow_up->cb_arg, iomgr_success); + follow_up->cb(exec_ctx, follow_up->cb_arg, error); } void grpc_client_channel_watch_connectivity_state( diff --git a/src/core/ext/client_config/lb_policy.c b/src/core/ext/client_config/lb_policy.c index a7ad9842dc3..fcff0c9a1b8 100644 --- a/src/core/ext/client_config/lb_policy.c +++ b/src/core/ext/client_config/lb_policy.c @@ -138,6 +138,8 @@ void grpc_lb_policy_notify_on_state_change(grpc_exec_ctx *exec_ctx, } grpc_connectivity_state grpc_lb_policy_check_connectivity( - grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy) { - return policy->vtable->check_connectivity(exec_ctx, policy); + grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, + grpc_error **connectivity_error) { + return policy->vtable->check_connectivity(exec_ctx, policy, + connectivity_error); } diff --git a/src/core/ext/client_config/lb_policy.h b/src/core/ext/client_config/lb_policy.h index 0384e0b2ebe..13b9abc474c 100644 --- a/src/core/ext/client_config/lb_policy.h +++ b/src/core/ext/client_config/lb_policy.h @@ -75,8 +75,9 @@ struct grpc_lb_policy_vtable { void (*exit_idle)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy); /** check the current connectivity of the lb_policy */ - grpc_connectivity_state (*check_connectivity)(grpc_exec_ctx *exec_ctx, - grpc_lb_policy *policy); + grpc_connectivity_state (*check_connectivity)( + grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, + grpc_error **connectivity_error); /** call notify when the connectivity state of a channel changes from *state. Updates *state with the new state of the policy */ @@ -152,6 +153,7 @@ void grpc_lb_policy_notify_on_state_change(grpc_exec_ctx *exec_ctx, grpc_closure *closure); grpc_connectivity_state grpc_lb_policy_check_connectivity( - grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy); + grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, + grpc_error **connectivity_error); #endif /* GRPC_CORE_EXT_CLIENT_CONFIG_LB_POLICY_H */ diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c index bd45d3825cc..2c7b227cb82 100644 --- a/src/core/ext/client_config/subchannel.c +++ b/src/core/ext/client_config/subchannel.c @@ -147,7 +147,7 @@ struct grpc_subchannel_call { (((grpc_subchannel_call *)(callstack)) - 1) static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *subchannel, - bool iomgr_success); + grpc_error *error); #ifdef GRPC_STREAM_REFCOUNT_DEBUG #define REF_REASON reason @@ -177,7 +177,7 @@ static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *subchannel, */ static void connection_destroy(grpc_exec_ctx *exec_ctx, void *arg, - bool success) { + grpc_error *error) { grpc_connected_subchannel *c = arg; grpc_channel_stack_destroy(exec_ctx, CHANNEL_STACK_FROM_CONNECTION(c)); gpr_free(c); @@ -200,7 +200,7 @@ void grpc_connected_subchannel_unref(grpc_exec_ctx *exec_ctx, */ static void subchannel_destroy(grpc_exec_ctx *exec_ctx, void *arg, - bool success) { + grpc_error *error) { grpc_subchannel *c = arg; gpr_free((void *)c->filters); grpc_channel_args_destroy(c->args); @@ -290,8 +290,8 @@ void grpc_subchannel_weak_unref(grpc_exec_ctx *exec_ctx, gpr_atm old_refs; old_refs = ref_mutate(c, -(gpr_atm)1, 1 REF_MUTATE_PURPOSE("WEAK_UNREF")); if (old_refs == 1) { - grpc_exec_ctx_enqueue(exec_ctx, grpc_closure_create(subchannel_destroy, c), - true, NULL); + grpc_exec_ctx_push(exec_ctx, grpc_closure_create(subchannel_destroy, c), + GRPC_ERROR_NONE, NULL); } } @@ -382,7 +382,8 @@ static void continue_connect(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) { args.initial_connect_string = c->initial_connect_string; grpc_connectivity_state_set(exec_ctx, &c->state_tracker, - GRPC_CHANNEL_CONNECTING, "state_change"); + GRPC_CHANNEL_CONNECTING, GRPC_ERROR_NONE, + "state_change"); grpc_connector_connect(exec_ctx, c->connector, &args, &c->connecting_result, &c->connected); } @@ -393,16 +394,17 @@ static void start_connect(grpc_exec_ctx *exec_ctx, grpc_subchannel *c) { continue_connect(exec_ctx, c); } -grpc_connectivity_state grpc_subchannel_check_connectivity(grpc_subchannel *c) { +grpc_connectivity_state grpc_subchannel_check_connectivity(grpc_subchannel *c, + grpc_error **error) { grpc_connectivity_state state; gpr_mu_lock(&c->mu); - state = grpc_connectivity_state_check(&c->state_tracker); + state = grpc_connectivity_state_check(&c->state_tracker, error); gpr_mu_unlock(&c->mu); return state; } static void on_external_state_watcher_done(grpc_exec_ctx *exec_ctx, void *arg, - bool success) { + grpc_error *error) { external_state_watcher *w = arg; grpc_closure *follow_up = w->notify; if (w->pollset_set != NULL) { @@ -415,7 +417,7 @@ static void on_external_state_watcher_done(grpc_exec_ctx *exec_ctx, void *arg, gpr_mu_unlock(&w->subchannel->mu); GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, w->subchannel, "external_state_watcher"); gpr_free(w); - follow_up->cb(exec_ctx, follow_up->cb_arg, success); + follow_up->cb(exec_ctx, follow_up->cb_arg, error); } void grpc_subchannel_notify_on_state_change( @@ -469,7 +471,7 @@ void grpc_connected_subchannel_process_transport_op( } static void subchannel_on_child_state_changed(grpc_exec_ctx *exec_ctx, void *p, - bool iomgr_success) { + grpc_error *error) { state_watcher *sw = p; grpc_subchannel *c = sw->subchannel; gpr_mu *mu = &c->mu; @@ -477,20 +479,18 @@ static void subchannel_on_child_state_changed(grpc_exec_ctx *exec_ctx, void *p, gpr_mu_lock(mu); /* if we failed just leave this closure */ - if (iomgr_success) { - if (sw->connectivity_state == GRPC_CHANNEL_TRANSIENT_FAILURE) { - /* any errors on a subchannel ==> we're done, create a new one */ - sw->connectivity_state = GRPC_CHANNEL_FATAL_FAILURE; - } - grpc_connectivity_state_set(exec_ctx, &c->state_tracker, - sw->connectivity_state, "reflect_child"); - if (sw->connectivity_state != GRPC_CHANNEL_FATAL_FAILURE) { - grpc_connected_subchannel_notify_on_state_change( - exec_ctx, GET_CONNECTED_SUBCHANNEL(c, no_barrier), NULL, - &sw->connectivity_state, &sw->closure); - GRPC_SUBCHANNEL_WEAK_REF(c, "state_watcher"); - sw = NULL; - } + if (sw->connectivity_state == GRPC_CHANNEL_TRANSIENT_FAILURE) { + /* any errors on a subchannel ==> we're done, create a new one */ + sw->connectivity_state = GRPC_CHANNEL_FATAL_FAILURE; + } + grpc_connectivity_state_set(exec_ctx, &c->state_tracker, + sw->connectivity_state, error, "reflect_child"); + if (sw->connectivity_state != GRPC_CHANNEL_FATAL_FAILURE) { + grpc_connected_subchannel_notify_on_state_change( + exec_ctx, GET_CONNECTED_SUBCHANNEL(c, no_barrier), NULL, + &sw->connectivity_state, &sw->closure); + GRPC_SUBCHANNEL_WEAK_REF(c, "state_watcher"); + sw = NULL; } gpr_mu_unlock(mu); @@ -592,17 +592,19 @@ static void publish_transport_locked(grpc_exec_ctx *exec_ctx, /* signal completion */ grpc_connectivity_state_set(exec_ctx, &c->state_tracker, GRPC_CHANNEL_READY, - "connected"); + GRPC_ERROR_NONE, "connected"); } -static void on_alarm(grpc_exec_ctx *exec_ctx, void *arg, bool iomgr_success) { +static void on_alarm(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_subchannel *c = arg; gpr_mu_lock(&c->mu); c->have_alarm = 0; if (c->disconnected) { - iomgr_success = 0; + error = GRPC_ERROR_CREATE_REFERENCING("Disconnected", &error, 1); + } else { + grpc_error_ref(error); } - if (iomgr_success) { + if (error != GRPC_ERROR_NONE) { c->next_attempt = gpr_backoff_step(&c->backoff_state, gpr_now(GPR_CLOCK_MONOTONIC)); continue_connect(exec_ctx, c); @@ -614,7 +616,7 @@ static void on_alarm(grpc_exec_ctx *exec_ctx, void *arg, bool iomgr_success) { } static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *arg, - bool iomgr_success) { + grpc_error *error) { grpc_subchannel *c = arg; GRPC_SUBCHANNEL_WEAK_REF(c, "connected"); @@ -627,9 +629,10 @@ static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *arg, gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); GPR_ASSERT(!c->have_alarm); c->have_alarm = 1; - grpc_connectivity_state_set(exec_ctx, &c->state_tracker, - GRPC_CHANNEL_TRANSIENT_FAILURE, - "connect_failed"); + grpc_connectivity_state_set( + exec_ctx, &c->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, + GRPC_ERROR_CREATE_REFERENCING("Connect Failed", &error, 1), + "connect_failed"); grpc_timer_init(exec_ctx, &c->alarm, c->next_attempt, on_alarm, c, now); } gpr_mu_unlock(&c->mu); @@ -641,7 +644,7 @@ static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *arg, */ static void subchannel_call_destroy(grpc_exec_ctx *exec_ctx, void *call, - bool success) { + grpc_error *error) { grpc_subchannel_call *c = call; GPR_TIMER_BEGIN("grpc_subchannel_call_unref.destroy", 0); grpc_connected_subchannel *connection = c->connection; diff --git a/src/core/ext/client_config/subchannel.h b/src/core/ext/client_config/subchannel.h index 0765a544e8b..e73f394584e 100644 --- a/src/core/ext/client_config/subchannel.h +++ b/src/core/ext/client_config/subchannel.h @@ -118,7 +118,7 @@ void grpc_connected_subchannel_process_transport_op( /** poll the current connectivity state of a channel */ grpc_connectivity_state grpc_subchannel_check_connectivity( - grpc_subchannel *channel); + grpc_subchannel *channel, grpc_error **error); /** call notify when the connectivity state of a channel changes from *state. Updates *state with the new state of the channel */ diff --git a/src/core/ext/client_config/subchannel_call_holder.c b/src/core/ext/client_config/subchannel_call_holder.c index 9918fbdcb4f..3b10aa44740 100644 --- a/src/core/ext/client_config/subchannel_call_holder.c +++ b/src/core/ext/client_config/subchannel_call_holder.c @@ -43,14 +43,14 @@ #define CANCELLED_CALL ((grpc_subchannel_call *)1) static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *holder, - bool success); + grpc_error *error); static void retry_ops(grpc_exec_ctx *exec_ctx, void *retry_ops_args, - bool success); + grpc_error *error); static void add_waiting_locked(grpc_subchannel_call_holder *holder, grpc_transport_stream_op *op); static void fail_locked(grpc_exec_ctx *exec_ctx, - grpc_subchannel_call_holder *holder); + grpc_subchannel_call_holder *holder, grpc_error *error); static void retry_waiting_locked(grpc_exec_ctx *exec_ctx, grpc_subchannel_call_holder *holder); @@ -90,7 +90,8 @@ void grpc_subchannel_call_holder_perform_op(grpc_exec_ctx *exec_ctx, grpc_subchannel_call *call = GET_CALL(holder); GPR_TIMER_BEGIN("grpc_subchannel_call_holder_perform_op", 0); if (call == CANCELLED_CALL) { - grpc_transport_stream_op_finish_with_failure(exec_ctx, op); + grpc_transport_stream_op_finish_with_failure(exec_ctx, op, + GRPC_ERROR_CANCELLED); GPR_TIMER_END("grpc_subchannel_call_holder_perform_op", 0); return; } @@ -106,7 +107,8 @@ retry: call = GET_CALL(holder); if (call == CANCELLED_CALL) { gpr_mu_unlock(&holder->mu); - grpc_transport_stream_op_finish_with_failure(exec_ctx, op); + grpc_transport_stream_op_finish_with_failure(exec_ctx, op, + GRPC_ERROR_CANCELLED); GPR_TIMER_END("grpc_subchannel_call_holder_perform_op", 0); return; } @@ -123,7 +125,10 @@ retry: } else { switch (holder->creation_phase) { case GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING: - fail_locked(exec_ctx, holder); + fail_locked(exec_ctx, holder, + grpc_error_set_int(GRPC_ERROR_CREATE("Cancelled"), + GRPC_ERROR_INT_GRPC_STATUS, + op->cancel_with_status)); break; case GRPC_SUBCHANNEL_CALL_HOLDER_PICKING_SUBCHANNEL: holder->pick_subchannel(exec_ctx, holder->pick_subchannel_arg, NULL, @@ -131,7 +136,8 @@ retry: break; } gpr_mu_unlock(&holder->mu); - grpc_transport_stream_op_finish_with_failure(exec_ctx, op); + grpc_transport_stream_op_finish_with_failure(exec_ctx, op, + GRPC_ERROR_CANCELLED); GPR_TIMER_END("grpc_subchannel_call_holder_perform_op", 0); return; } @@ -167,17 +173,22 @@ retry: GPR_TIMER_END("grpc_subchannel_call_holder_perform_op", 0); } -static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { grpc_subchannel_call_holder *holder = arg; gpr_mu_lock(&holder->mu); GPR_ASSERT(holder->creation_phase == GRPC_SUBCHANNEL_CALL_HOLDER_PICKING_SUBCHANNEL); holder->creation_phase = GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING; if (holder->connected_subchannel == NULL) { - fail_locked(exec_ctx, holder); + fail_locked(exec_ctx, holder, + GRPC_ERROR_CREATE_REFERENCING("Failed to create subchannel", + &error, 1)); } else if (1 == gpr_atm_acq_load(&holder->subchannel_call)) { /* already cancelled before subchannel became ready */ - fail_locked(exec_ctx, holder); + fail_locked(exec_ctx, holder, + GRPC_ERROR_CREATE_REFERENCING( + "Cancelled before creating subchannel", &error, 1)); } else { gpr_atm_rel_store( &holder->subchannel_call, @@ -203,18 +214,18 @@ static void retry_waiting_locked(grpc_exec_ctx *exec_ctx, a->call = GET_CALL(holder); if (a->call == CANCELLED_CALL) { gpr_free(a); - fail_locked(exec_ctx, holder); + fail_locked(exec_ctx, holder, GRPC_ERROR_CANCELLED); return; } holder->waiting_ops = NULL; holder->waiting_ops_count = 0; holder->waiting_ops_capacity = 0; GRPC_SUBCHANNEL_CALL_REF(a->call, "retry_ops"); - grpc_exec_ctx_enqueue(exec_ctx, grpc_closure_create(retry_ops, a), true, - NULL); + grpc_exec_ctx_push(exec_ctx, grpc_closure_create(retry_ops, a), + GRPC_ERROR_NONE, NULL); } -static void retry_ops(grpc_exec_ctx *exec_ctx, void *args, bool success) { +static void retry_ops(grpc_exec_ctx *exec_ctx, void *args, grpc_error *error) { retry_ops_args *a = args; size_t i; for (i = 0; i < a->nops; i++) { @@ -239,13 +250,15 @@ static void add_waiting_locked(grpc_subchannel_call_holder *holder, } static void fail_locked(grpc_exec_ctx *exec_ctx, - grpc_subchannel_call_holder *holder) { + grpc_subchannel_call_holder *holder, + grpc_error *error) { size_t i; for (i = 0; i < holder->waiting_ops_count; i++) { - grpc_transport_stream_op_finish_with_failure(exec_ctx, - &holder->waiting_ops[i]); + grpc_transport_stream_op_finish_with_failure( + exec_ctx, &holder->waiting_ops[i], grpc_error_ref(error)); } holder->waiting_ops_count = 0; + grpc_error_unref(error); } char *grpc_subchannel_call_holder_get_peer( diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c index 0d215cd1968..48e62467818 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -103,8 +103,9 @@ static void pf_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { p->shutdown = 1; pp = p->pending_picks; p->pending_picks = NULL; - grpc_connectivity_state_set(exec_ctx, &p->state_tracker, - GRPC_CHANNEL_FATAL_FAILURE, "shutdown"); + grpc_connectivity_state_set( + exec_ctx, &p->state_tracker, GRPC_CHANNEL_FATAL_FAILURE, + GRPC_ERROR_CREATE("Channel shutdown"), "shutdown"); /* cancel subscription */ if (selected != NULL) { grpc_connected_subchannel_notify_on_state_change( @@ -120,7 +121,7 @@ static void pf_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { *pp->target = NULL; grpc_pollset_set_del_pollset(exec_ctx, p->base.interested_parties, pp->pollset); - grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); + grpc_exec_ctx_push(exec_ctx, pp->on_complete, GRPC_ERROR_NONE, NULL); gpr_free(pp); pp = next; } @@ -139,7 +140,8 @@ static void pf_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, grpc_pollset_set_del_pollset(exec_ctx, p->base.interested_parties, pp->pollset); *target = NULL; - grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); + grpc_exec_ctx_push(exec_ctx, pp->on_complete, + GRPC_ERROR_CREATE("Pick Cancelled"), NULL); gpr_free(pp); } else { pp->next = p->pending_picks; @@ -164,7 +166,8 @@ static void pf_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, initial_metadata_flags_eq) { grpc_pollset_set_del_pollset(exec_ctx, p->base.interested_parties, pp->pollset); - grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); + grpc_exec_ctx_push(exec_ctx, pp->on_complete, + GRPC_ERROR_CREATE("Pick Cancelled"), NULL); gpr_free(pp); } else { pp->next = p->pending_picks; @@ -235,7 +238,7 @@ static int pf_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, } static void destroy_subchannels(grpc_exec_ctx *exec_ctx, void *arg, - bool iomgr_success) { + grpc_error *error) { pick_first_lb_policy *p = arg; size_t i; size_t num_subchannels = p->num_subchannels; @@ -256,12 +259,14 @@ static void destroy_subchannels(grpc_exec_ctx *exec_ctx, void *arg, } static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, - bool iomgr_success) { + grpc_error *error) { pick_first_lb_policy *p = arg; grpc_subchannel *selected_subchannel; pending_pick *pp; grpc_connected_subchannel *selected; + grpc_error_ref(error); + gpr_mu_lock(&p->mu); selected = GET_SELECTED(p); @@ -276,7 +281,8 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, p->checking_connectivity = GRPC_CHANNEL_FATAL_FAILURE; } grpc_connectivity_state_set(exec_ctx, &p->state_tracker, - p->checking_connectivity, "selected_changed"); + p->checking_connectivity, grpc_error_ref(error), + "selected_changed"); if (p->checking_connectivity != GRPC_CHANNEL_FATAL_FAILURE) { grpc_connected_subchannel_notify_on_state_change( exec_ctx, selected, p->base.interested_parties, @@ -289,7 +295,8 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, switch (p->checking_connectivity) { case GRPC_CHANNEL_READY: grpc_connectivity_state_set(exec_ctx, &p->state_tracker, - GRPC_CHANNEL_READY, "connecting_ready"); + GRPC_CHANNEL_READY, GRPC_ERROR_NONE, + "connecting_ready"); selected_subchannel = p->subchannels[p->checking_subchannel]; selected = grpc_subchannel_get_connected_subchannel(selected_subchannel); @@ -298,15 +305,16 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, /* drop the pick list: we are connected now */ GRPC_LB_POLICY_WEAK_REF(&p->base, "destroy_subchannels"); gpr_atm_rel_store(&p->selected, (gpr_atm)selected); - grpc_exec_ctx_enqueue( - exec_ctx, grpc_closure_create(destroy_subchannels, p), true, NULL); + grpc_exec_ctx_push(exec_ctx, + grpc_closure_create(destroy_subchannels, p), + GRPC_ERROR_NONE, NULL); /* update any calls that were waiting for a pick */ while ((pp = p->pending_picks)) { p->pending_picks = pp->next; *pp->target = selected; grpc_pollset_set_del_pollset(exec_ctx, p->base.interested_parties, pp->pollset); - grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); + grpc_exec_ctx_push(exec_ctx, pp->on_complete, GRPC_ERROR_NONE, NULL); gpr_free(pp); } grpc_connected_subchannel_notify_on_state_change( @@ -318,12 +326,13 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, (p->checking_subchannel + 1) % p->num_subchannels; if (p->checking_subchannel == 0) { /* only trigger transient failure when we've tried all alternatives */ - grpc_connectivity_state_set(exec_ctx, &p->state_tracker, - GRPC_CHANNEL_TRANSIENT_FAILURE, - "connecting_transient_failure"); + grpc_connectivity_state_set( + exec_ctx, &p->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, + grpc_error_ref(error), "connecting_transient_failure"); } + grpc_error_unref(error); p->checking_connectivity = grpc_subchannel_check_connectivity( - p->subchannels[p->checking_subchannel]); + p->subchannels[p->checking_subchannel], &error); if (p->checking_connectivity == GRPC_CHANNEL_TRANSIENT_FAILURE) { grpc_subchannel_notify_on_state_change( exec_ctx, p->subchannels[p->checking_subchannel], @@ -335,9 +344,9 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, break; case GRPC_CHANNEL_CONNECTING: case GRPC_CHANNEL_IDLE: - grpc_connectivity_state_set(exec_ctx, &p->state_tracker, - GRPC_CHANNEL_CONNECTING, - "connecting_changed"); + grpc_connectivity_state_set( + exec_ctx, &p->state_tracker, GRPC_CHANNEL_CONNECTING, + grpc_error_ref(error), "connecting_changed"); grpc_subchannel_notify_on_state_change( exec_ctx, p->subchannels[p->checking_subchannel], p->base.interested_parties, &p->checking_connectivity, @@ -350,38 +359,46 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, GRPC_SUBCHANNEL_UNREF(exec_ctx, p->subchannels[p->num_subchannels], "pick_first"); if (p->num_subchannels == 0) { - grpc_connectivity_state_set(exec_ctx, &p->state_tracker, - GRPC_CHANNEL_FATAL_FAILURE, - "no_more_channels"); + grpc_error_ref(error); + grpc_connectivity_state_set( + exec_ctx, &p->state_tracker, GRPC_CHANNEL_FATAL_FAILURE, + GRPC_ERROR_CREATE_REFERENCING("Pick first exhausted channels", + &error, 1), + "no_more_channels"); while ((pp = p->pending_picks)) { p->pending_picks = pp->next; *pp->target = NULL; - grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); + grpc_exec_ctx_push(exec_ctx, pp->on_complete, GRPC_ERROR_NONE, + NULL); gpr_free(pp); } GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &p->base, "pick_first_connectivity"); } else { - grpc_connectivity_state_set(exec_ctx, &p->state_tracker, - GRPC_CHANNEL_TRANSIENT_FAILURE, - "subchannel_failed"); + grpc_connectivity_state_set( + exec_ctx, &p->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, + grpc_error_ref(error), "subchannel_failed"); p->checking_subchannel %= p->num_subchannels; + grpc_error_unref(error); p->checking_connectivity = grpc_subchannel_check_connectivity( - p->subchannels[p->checking_subchannel]); + p->subchannels[p->checking_subchannel], &error); goto loop; } } } gpr_mu_unlock(&p->mu); + + grpc_error_unref(error); } static grpc_connectivity_state pf_check_connectivity(grpc_exec_ctx *exec_ctx, - grpc_lb_policy *pol) { + grpc_lb_policy *pol, + grpc_error **error) { pick_first_lb_policy *p = (pick_first_lb_policy *)pol; grpc_connectivity_state st; gpr_mu_lock(&p->mu); - st = grpc_connectivity_state_check(&p->state_tracker); + st = grpc_connectivity_state_check(&p->state_tracker, error); gpr_mu_unlock(&p->mu); return st; } @@ -404,7 +421,8 @@ static void pf_ping_one(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, if (selected) { grpc_connected_subchannel_ping(exec_ctx, selected, closure); } else { - grpc_exec_ctx_enqueue(exec_ctx, closure, false, NULL); + grpc_exec_ctx_push(exec_ctx, closure, GRPC_ERROR_CREATE("Not connected"), + NULL); } } diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index 3f6051b8925..c119a257728 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -239,11 +239,13 @@ static void rr_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { while ((pp = p->pending_picks)) { p->pending_picks = pp->next; *pp->target = NULL; - grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); + grpc_exec_ctx_push(exec_ctx, pp->on_complete, + GRPC_ERROR_CREATE("Channel Shutdown"), NULL); gpr_free(pp); } - grpc_connectivity_state_set(exec_ctx, &p->state_tracker, - GRPC_CHANNEL_FATAL_FAILURE, "shutdown"); + grpc_connectivity_state_set( + exec_ctx, &p->state_tracker, GRPC_CHANNEL_FATAL_FAILURE, + GRPC_ERROR_CREATE("Channel Shutdown"), "shutdown"); for (i = 0; i < p->num_subchannels; i++) { subchannel_data *sd = p->subchannels[i]; grpc_subchannel_notify_on_state_change(exec_ctx, sd->subchannel, NULL, NULL, @@ -265,7 +267,7 @@ static void rr_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, grpc_pollset_set_del_pollset(exec_ctx, p->base.interested_parties, pp->pollset); *target = NULL; - grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); + grpc_exec_ctx_push(exec_ctx, pp->on_complete, GRPC_ERROR_CANCELLED, NULL); gpr_free(pp); } else { pp->next = p->pending_picks; @@ -291,7 +293,7 @@ static void rr_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, grpc_pollset_set_del_pollset(exec_ctx, p->base.interested_parties, pp->pollset); *pp->target = NULL; - grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); + grpc_exec_ctx_push(exec_ctx, pp->on_complete, GRPC_ERROR_CANCELLED, NULL); gpr_free(pp); } else { pp->next = p->pending_picks; @@ -366,7 +368,7 @@ static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, } static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, - bool iomgr_success) { + grpc_error *error) { subchannel_data *sd = arg; round_robin_lb_policy *p = sd->policy; pending_pick *pp; @@ -374,6 +376,7 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, int unref = 0; + grpc_error_ref(error); gpr_mu_lock(&p->mu); if (p->shutdown) { @@ -382,7 +385,8 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, switch (sd->connectivity_state) { case GRPC_CHANNEL_READY: grpc_connectivity_state_set(exec_ctx, &p->state_tracker, - GRPC_CHANNEL_READY, "connecting_ready"); + GRPC_CHANNEL_READY, grpc_error_ref(error), + "connecting_ready"); /* add the newly connected subchannel to the list of connected ones. * Note that it goes to the "end of the line". */ sd->ready_list_node = add_connected_sc_locked(p, sd->subchannel); @@ -406,7 +410,7 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, } grpc_pollset_set_del_pollset(exec_ctx, p->base.interested_parties, pp->pollset); - grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); + grpc_exec_ctx_push(exec_ctx, pp->on_complete, GRPC_ERROR_NONE, NULL); gpr_free(pp); } grpc_subchannel_notify_on_state_change( @@ -415,9 +419,9 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, break; case GRPC_CHANNEL_CONNECTING: case GRPC_CHANNEL_IDLE: - grpc_connectivity_state_set(exec_ctx, &p->state_tracker, - sd->connectivity_state, - "connecting_changed"); + grpc_connectivity_state_set( + exec_ctx, &p->state_tracker, sd->connectivity_state, + grpc_error_ref(error), "connecting_changed"); grpc_subchannel_notify_on_state_change( exec_ctx, sd->subchannel, p->base.interested_parties, &sd->connectivity_state, &sd->connectivity_changed_closure); @@ -433,9 +437,9 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, remove_disconnected_sc_locked(p, sd->ready_list_node); sd->ready_list_node = NULL; } - grpc_connectivity_state_set(exec_ctx, &p->state_tracker, - GRPC_CHANNEL_TRANSIENT_FAILURE, - "connecting_transient_failure"); + grpc_connectivity_state_set( + exec_ctx, &p->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, + grpc_error_ref(error), "connecting_transient_failure"); break; case GRPC_CHANNEL_FATAL_FAILURE: if (sd->ready_list_node != NULL) { @@ -452,19 +456,23 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, unref = 1; if (p->num_subchannels == 0) { - grpc_connectivity_state_set(exec_ctx, &p->state_tracker, - GRPC_CHANNEL_FATAL_FAILURE, - "no_more_channels"); + grpc_error_ref(error); + grpc_connectivity_state_set( + exec_ctx, &p->state_tracker, GRPC_CHANNEL_FATAL_FAILURE, + GRPC_ERROR_CREATE_REFERENCING("Round Robin Channels Exhausted", + &error, 1), + "no_more_channels"); while ((pp = p->pending_picks)) { p->pending_picks = pp->next; *pp->target = NULL; - grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); + grpc_exec_ctx_push(exec_ctx, pp->on_complete, GRPC_ERROR_NONE, + NULL); gpr_free(pp); } } else { - grpc_connectivity_state_set(exec_ctx, &p->state_tracker, - GRPC_CHANNEL_TRANSIENT_FAILURE, - "subchannel_failed"); + grpc_connectivity_state_set( + exec_ctx, &p->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, + grpc_error_ref(error), "subchannel_failed"); } } /* switch */ } /* !unref */ @@ -474,14 +482,17 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, if (unref) { GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &p->base, "round_robin_connectivity"); } + + grpc_error_unref(error); } static grpc_connectivity_state rr_check_connectivity(grpc_exec_ctx *exec_ctx, - grpc_lb_policy *pol) { + grpc_lb_policy *pol, + grpc_error **error) { round_robin_lb_policy *p = (round_robin_lb_policy *)pol; grpc_connectivity_state st; gpr_mu_lock(&p->mu); - st = grpc_connectivity_state_check(&p->state_tracker); + st = grpc_connectivity_state_check(&p->state_tracker, error); gpr_mu_unlock(&p->mu); return st; } @@ -509,7 +520,8 @@ static void rr_ping_one(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, grpc_connected_subchannel_ping(exec_ctx, target, closure); } else { gpr_mu_unlock(&p->mu); - grpc_exec_ctx_enqueue(exec_ctx, closure, false, NULL); + grpc_exec_ctx_push(exec_ctx, closure, + GRPC_ERROR_CREATE("Round Robin not connected"), NULL); } } diff --git a/src/core/ext/resolver/dns/native/dns_resolver.c b/src/core/ext/resolver/dns/native/dns_resolver.c index 620ba4e2aa0..0f9f5a438bf 100644 --- a/src/core/ext/resolver/dns/native/dns_resolver.c +++ b/src/core/ext/resolver/dns/native/dns_resolver.c @@ -82,6 +82,9 @@ typedef struct { grpc_timer retry_timer; /** retry backoff state */ gpr_backoff backoff_state; + + /** currently resolving addresses */ + grpc_resolved_addresses *addresses; } dns_resolver; static void dns_destroy(grpc_exec_ctx *exec_ctx, grpc_resolver *r); @@ -108,7 +111,8 @@ static void dns_shutdown(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver) { } if (r->next_completion != NULL) { *r->target_config = NULL; - grpc_exec_ctx_enqueue(exec_ctx, r->next_completion, true, NULL); + grpc_exec_ctx_push(exec_ctx, r->next_completion, + GRPC_ERROR_CREATE("Resolver Shutdown"), NULL); r->next_completion = NULL; } gpr_mu_unlock(&r->mu); @@ -143,12 +147,12 @@ static void dns_next(grpc_exec_ctx *exec_ctx, grpc_resolver *resolver, } static void dns_on_retry_timer(grpc_exec_ctx *exec_ctx, void *arg, - bool success) { + grpc_error *error) { dns_resolver *r = arg; gpr_mu_lock(&r->mu); r->have_retry_timer = false; - if (success) { + if (error == GRPC_ERROR_NONE) { if (!r->resolving) { dns_start_resolving_locked(exec_ctx, r); } @@ -159,13 +163,14 @@ static void dns_on_retry_timer(grpc_exec_ctx *exec_ctx, void *arg, } static void dns_on_resolved(grpc_exec_ctx *exec_ctx, void *arg, - grpc_resolved_addresses *addresses) { + grpc_error *error) { dns_resolver *r = arg; grpc_client_config *config = NULL; grpc_lb_policy *lb_policy; gpr_mu_lock(&r->mu); GPR_ASSERT(r->resolving); r->resolving = 0; + grpc_resolved_addresses *addresses = r->addresses; if (addresses != NULL) { grpc_lb_policy_args lb_policy_args; config = grpc_client_config_create(); @@ -183,8 +188,10 @@ static void dns_on_resolved(grpc_exec_ctx *exec_ctx, void *arg, gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); gpr_timespec next_try = gpr_backoff_step(&r->backoff_state, now); gpr_timespec timeout = gpr_time_sub(next_try, now); - gpr_log(GPR_DEBUG, "dns resolution failed: retrying in %d.%09d seconds", - timeout.tv_sec, timeout.tv_nsec); + const char *msg = grpc_error_string(error); + gpr_log(GPR_DEBUG, "dns resolution failed: retrying in %d.%09d seconds: %s", + timeout.tv_sec, timeout.tv_nsec, msg); + grpc_error_free_string(msg); GPR_ASSERT(!r->have_retry_timer); r->have_retry_timer = true; GRPC_RESOLVER_REF(&r->base, "retry-timer"); @@ -207,7 +214,8 @@ static void dns_start_resolving_locked(grpc_exec_ctx *exec_ctx, GRPC_RESOLVER_REF(&r->base, "dns-resolving"); GPR_ASSERT(!r->resolving); r->resolving = 1; - grpc_resolve_address(exec_ctx, r->name, r->default_port, dns_on_resolved, r); + grpc_resolve_address(exec_ctx, r->name, r->default_port, + grpc_closure_create(dns_on_resolved, r), &r->addresses); } static void dns_maybe_finish_next_locked(grpc_exec_ctx *exec_ctx, @@ -218,7 +226,7 @@ static void dns_maybe_finish_next_locked(grpc_exec_ctx *exec_ctx, if (r->resolved_config) { grpc_client_config_ref(r->resolved_config); } - grpc_exec_ctx_enqueue(exec_ctx, r->next_completion, true, NULL); + grpc_exec_ctx_push(exec_ctx, r->next_completion, GRPC_ERROR_NONE, NULL); r->next_completion = NULL; r->published_version = r->resolved_version; } diff --git a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c index a4fa9acf224..90da6a93a01 100644 --- a/src/core/ext/resolver/sockaddr/sockaddr_resolver.c +++ b/src/core/ext/resolver/sockaddr/sockaddr_resolver.c @@ -92,7 +92,7 @@ static void sockaddr_shutdown(grpc_exec_ctx *exec_ctx, gpr_mu_lock(&r->mu); if (r->next_completion != NULL) { *r->target_config = NULL; - grpc_exec_ctx_enqueue(exec_ctx, r->next_completion, true, NULL); + grpc_exec_ctx_push(exec_ctx, r->next_completion, GRPC_ERROR_NONE, NULL); r->next_completion = NULL; } gpr_mu_unlock(&r->mu); @@ -133,7 +133,7 @@ static void sockaddr_maybe_finish_next_locked(grpc_exec_ctx *exec_ctx, GRPC_LB_POLICY_UNREF(exec_ctx, lb_policy, "sockaddr"); r->published = 1; *r->target_config = cfg; - grpc_exec_ctx_enqueue(exec_ctx, r->next_completion, true, NULL); + grpc_exec_ctx_push(exec_ctx, r->next_completion, GRPC_ERROR_NONE, NULL); r->next_completion = NULL; } } diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index c5d3d8d9cc8..28d1be878fe 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -79,11 +79,11 @@ static void connector_unref(grpc_exec_ctx *exec_ctx, grpc_connector *con) { } static void on_initial_connect_string_sent(grpc_exec_ctx *exec_ctx, void *arg, - bool success) { + grpc_error *error) { connector_unref(exec_ctx, arg); } -static void connected(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { connector *c = arg; grpc_closure *notify; grpc_endpoint *tcp = c->tcp; @@ -109,7 +109,7 @@ static void connected(grpc_exec_ctx *exec_ctx, void *arg, bool success) { } notify = c->notify; c->notify = NULL; - notify->cb(exec_ctx, notify->cb_arg, 1); + notify->cb(exec_ctx, notify->cb_arg, error); } static void connector_shutdown(grpc_exec_ctx *exec_ctx, grpc_connector *con) {} diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index a262306085c..bceef152be3 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -116,19 +116,19 @@ static void on_secure_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, notify = c->notify; c->notify = NULL; /* look at c->args which are connector args. */ - notify->cb(exec_ctx, notify->cb_arg, 1); + notify->cb(exec_ctx, notify->cb_arg, GRPC_ERROR_NONE); if (args_copy != NULL) grpc_channel_args_destroy(args_copy); } static void on_initial_connect_string_sent(grpc_exec_ctx *exec_ctx, void *arg, - bool success) { + grpc_error *error) { connector *c = arg; grpc_channel_security_connector_do_handshake(exec_ctx, c->security_connector, c->connecting_endpoint, on_secure_handshake_done, c); } -static void connected(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { connector *c = arg; grpc_closure *notify; grpc_endpoint *tcp = c->newly_connecting_endpoint; @@ -153,7 +153,7 @@ static void connected(grpc_exec_ctx *exec_ctx, void *arg, bool success) { memset(c->result, 0, sizeof(*c->result)); notify = c->notify; c->notify = NULL; - notify->cb(exec_ctx, notify->cb_arg, 1); + notify->cb(exec_ctx, notify->cb_arg, GRPC_ERROR_NONE); } } diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index e21fa2a0727..ef860b4223e 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -35,6 +35,7 @@ #include #include +#include #include #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/http_server_filter.h" @@ -79,7 +80,7 @@ static void destroy(grpc_exec_ctx *exec_ctx, grpc_server *server, void *tcpp, grpc_closure *destroy_done) { grpc_tcp_server *tcp = tcpp; grpc_tcp_server_unref(exec_ctx, tcp); - grpc_exec_ctx_enqueue(exec_ctx, destroy_done, true, NULL); + grpc_exec_ctx_push(exec_ctx, destroy_done, GRPC_ERROR_NONE, NULL); } int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { @@ -90,23 +91,27 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { int port_num = -1; int port_temp; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_error *err = GRPC_ERROR_NONE; GRPC_API_TRACE("grpc_server_add_insecure_http2_port(server=%p, addr=%s)", 2, (server, addr)); - resolved = grpc_blocking_resolve_address(addr, "http"); - if (!resolved) { + err = grpc_blocking_resolve_address(addr, "https", &resolved); + if (err != GRPC_ERROR_NONE) { goto error; } - tcp = grpc_tcp_server_create(NULL); - GPR_ASSERT(tcp); + err = grpc_tcp_server_create(NULL, &tcp); + if (err != GRPC_ERROR_NONE) { + goto error; + } + grpc_error **errors = gpr_malloc(sizeof(*errors) * resolved->naddrs); for (i = 0; i < resolved->naddrs; i++) { - port_temp = grpc_tcp_server_add_port( + errors[i] = grpc_tcp_server_add_port( tcp, (struct sockaddr *)&resolved->addrs[i].addr, - resolved->addrs[i].len); - if (port_temp > 0) { + resolved->addrs[i].len, &port_temp); + if (errors[i] == GRPC_ERROR_NONE) { if (port_num == -1) { port_num = port_temp; } else { @@ -116,14 +121,28 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { } } if (count == 0) { - gpr_log(GPR_ERROR, "No address added out of total %d resolved", - resolved->naddrs); + char *msg; + gpr_asprintf(&msg, "No address added out of total %d resolved", + resolved->naddrs); + err = GRPC_ERROR_CREATE_REFERENCING(msg, errors, resolved->naddrs); goto error; + } else if (count != resolved->naddrs) { + char *msg; + gpr_asprintf(&msg, "Only %d addresses added out of total %d resolved", + count, resolved->naddrs); + err = GRPC_ERROR_CREATE_REFERENCING(msg, errors, resolved->naddrs); + gpr_free(msg); + + const char *warning_message = grpc_error_string(err); + gpr_log(GPR_INFO, "WARNING: %s", warning_message); + grpc_error_free_string(warning_message); + /* we managed to bind some addresses: continue */ + } else { + for (i = 0; i < resolved->naddrs; i++) { + grpc_error_unref(errors[i]); + } } - if (count != resolved->naddrs) { - gpr_log(GPR_ERROR, "Only %d addresses added out of total %d resolved", - count, resolved->naddrs); - } + gpr_free(errors); grpc_resolved_addresses_destroy(resolved); /* Register with the server only upon success */ diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 65d0d31c4ab..0702fe9118c 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -37,6 +37,7 @@ #include #include +#include #include #include #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" @@ -230,15 +231,28 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, } } if (count == 0) { - gpr_log(GPR_ERROR, "No address added out of total %d resolved", - resolved->naddrs); + char *msg; + gpr_asprintf(&msg, "No address added out of total %d resolved", + resolved->naddrs); + err = GRPC_ERROR_CREATE_REFERENCING(msg, errors, resolved->naddrs); goto error; + } else if (count != resolved->naddrs) { + char *msg; + gpr_asprintf(&msg, "Only %d addresses added out of total %d resolved", + count, resolved->naddrs); + err = GRPC_ERROR_CREATE_REFERENCING(msg, errors, resolved->naddrs); + gpr_free(msg); + + const char *warning_message = grpc_error_string(err); + gpr_log(GPR_INFO, "WARNING: %s", warning_message); + grpc_error_free_string(warning_message); + /* we managed to bind some addresses: continue */ + } else { + for (i = 0; i < resolved->naddrs; i++) { + grpc_error_unref(errors[i]); + } } - if (count != resolved->naddrs) { - gpr_log(GPR_ERROR, "Only %d addresses added out of total %d resolved", - count, resolved->naddrs); - /* if it's an error, don't we want to goto error; here ? */ - } + gpr_free(errors); grpc_resolved_addresses_destroy(resolved); /* Register with the server only upon success */ diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 25d37711e5c..14d1c26c3a4 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -91,7 +91,8 @@ static void push_setting(grpc_chttp2_transport *t, grpc_chttp2_setting_id id, uint32_t value); /** Start disconnection chain */ -static void drop_connection(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t); +static void drop_connection(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, + grpc_error *error); /** Perform a transport_op */ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, @@ -128,7 +129,7 @@ static void finish_global_actions(grpc_exec_ctx *exec_ctx, static void connectivity_state_set( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, - grpc_connectivity_state state, const char *reason); + grpc_connectivity_state state, grpc_error *error, const char *reason); static void check_read_ops(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global); @@ -387,7 +388,7 @@ static void destroy_transport_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_stream *s_ignored, void *arg_ignored) { t->destroying = 1; - drop_connection(exec_ctx, t); + drop_connection(exec_ctx, t, GRPC_ERROR_CREATE("Transport destroyed")); } static void destroy_transport(grpc_exec_ctx *exec_ctx, grpc_transport *gt) { @@ -423,12 +424,11 @@ static void destroy_endpoint(grpc_exec_ctx *exec_ctx, static void close_transport_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, - grpc_chttp2_stream *s_ignored, - void *arg_ignored) { + grpc_error *error) { if (!t->closed) { t->closed = 1; connectivity_state_set(exec_ctx, &t->global, GRPC_CHANNEL_FATAL_FAILURE, - "close_transport"); + error, "close_transport"); if (t->ep) { allow_endpoint_shutdown_locked(exec_ctx, t); } @@ -529,7 +529,9 @@ static void destroy_stream_locked(grpc_exec_ctx *exec_ctx, s->global.id == 0); GPR_ASSERT(!s->global.in_stream_map); if (grpc_chttp2_unregister_stream(t, s) && t->global.sent_goaway) { - close_transport_locked(exec_ctx, t, NULL, NULL); + close_transport_locked( + exec_ctx, t, + GRPC_ERROR_CREATE("Last stream closed after sending goaway")); } if (!t->executor.parsing_active && s->global.id) { GPR_ASSERT(grpc_chttp2_stream_map_find(&t->parsing_stream_map, @@ -739,7 +741,7 @@ static void terminate_writing_with_lock(grpc_exec_ctx *exec_ctx, allow_endpoint_shutdown_locked(exec_ctx, t); if (error != GRPC_ERROR_NONE) { - drop_connection(exec_ctx, t); + drop_connection(exec_ctx, t, grpc_error_ref(error)); } grpc_chttp2_cleanup_writing(exec_ctx, &t->global, &t->writing); @@ -782,11 +784,16 @@ void grpc_chttp2_add_incoming_goaway( uint32_t goaway_error, gpr_slice goaway_text) { char *msg = gpr_dump_slice(goaway_text, GPR_DUMP_HEX | GPR_DUMP_ASCII); gpr_log(GPR_DEBUG, "got goaway [%d]: %s", goaway_error, msg); - gpr_free(msg); gpr_slice_unref(goaway_text); transport_global->seen_goaway = 1; - connectivity_state_set(exec_ctx, transport_global, GRPC_CHANNEL_FATAL_FAILURE, - "got_goaway"); + connectivity_state_set( + exec_ctx, transport_global, GRPC_CHANNEL_FATAL_FAILURE, + grpc_error_set_str( + grpc_error_set_int(GRPC_ERROR_CREATE("GOAWAY received"), + GRPC_ERROR_INT_HTTP2_ERROR, goaway_error), + GRPC_ERROR_STR_RAW_BYTES, msg), + "got_goaway"); + gpr_free(msg); } static void maybe_start_some_streams( @@ -815,9 +822,9 @@ static void maybe_start_some_streams( transport_global->next_stream_id += 2; if (transport_global->next_stream_id >= MAX_CLIENT_STREAM_ID) { - connectivity_state_set(exec_ctx, transport_global, - GRPC_CHANNEL_TRANSIENT_FAILURE, - "no_more_stream_ids"); + connectivity_state_set( + exec_ctx, transport_global, GRPC_CHANNEL_TRANSIENT_FAILURE, + GRPC_ERROR_CREATE("Stream IDs exhausted"), "no_more_stream_ids"); } stream_global->outgoing_window = @@ -1085,7 +1092,7 @@ static void perform_transport_op_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_stream *s_unused, void *stream_op) { grpc_transport_op *op = stream_op; - bool close_transport = op->disconnect; + grpc_error *close_transport = op->disconnect_with_error; /* If there's a set_accept_stream ensure that we're not parsing to avoid changing things out from underneath */ @@ -1110,7 +1117,9 @@ static void perform_transport_op_locked(grpc_exec_ctx *exec_ctx, t->global.last_incoming_stream_id, (uint32_t)grpc_chttp2_grpc_status_to_http2_error(op->goaway_status), gpr_slice_ref(*op->goaway_message), &t->global.qbuf); - close_transport = !grpc_chttp2_has_streams(t); + close_transport = grpc_chttp2_has_streams(t) + ? GRPC_ERROR_NONE + : GRPC_ERROR_CREATE("GOAWAY sent"); } if (op->set_accept_stream) { @@ -1131,8 +1140,8 @@ static void perform_transport_op_locked(grpc_exec_ctx *exec_ctx, send_ping_locked(t, op->send_ping); } - if (close_transport) { - close_transport_locked(exec_ctx, t, NULL, NULL); + if (close_transport != GRPC_ERROR_NONE) { + close_transport_locked(exec_ctx, t, close_transport); } } @@ -1231,7 +1240,9 @@ static void remove_stream(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, } if (grpc_chttp2_unregister_stream(t, s) && t->global.sent_goaway) { - close_transport_locked(exec_ctx, t, NULL, NULL); + close_transport_locked( + exec_ctx, t, + GRPC_ERROR_CREATE("Last stream closed after sending GOAWAY")); } if (grpc_chttp2_list_remove_writable_stream(&t->global, &s->global)) { GRPC_CHTTP2_STREAM_UNREF(exec_ctx, &s->global, "chttp2_writing"); @@ -1490,8 +1501,9 @@ static void end_all_the_calls(grpc_exec_ctx *exec_ctx, grpc_chttp2_for_all_streams(&t->global, exec_ctx, cancel_stream_cb); } -static void drop_connection(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) { - close_transport_locked(exec_ctx, t, NULL, NULL); +static void drop_connection(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, + grpc_error *error) { + close_transport_locked(exec_ctx, t, error); end_all_the_calls(exec_ctx, t); } @@ -1625,10 +1637,13 @@ static void post_reading_action_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_chttp2_stream *s_unused, void *arg) { - bool success = (bool)(uintptr_t)arg; + grpc_error *error = arg; bool keep_reading = false; - if (!success || t->closed) { - drop_connection(exec_ctx, t); + if (error == GRPC_ERROR_NONE && t->closed) { + error = GRPC_ERROR_CREATE("Transport closed"); + } + if (error != GRPC_ERROR_NONE) { + drop_connection(exec_ctx, t, error); t->endpoint_reading = 0; if (!t->executor.writing_active && t->ep) { grpc_endpoint_destroy(exec_ctx, t->ep); @@ -1658,13 +1673,13 @@ static void post_reading_action_locked(grpc_exec_ctx *exec_ctx, static void connectivity_state_set( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, - grpc_connectivity_state state, const char *reason) { + grpc_connectivity_state state, grpc_error *error, const char *reason) { GRPC_CHTTP2_IF_TRACING( gpr_log(GPR_DEBUG, "set connectivity_state=%d", state)); grpc_connectivity_state_set( exec_ctx, &TRANSPORT_FROM_GLOBAL(transport_global)->channel_callback.state_tracker, - state, reason); + state, error, reason); } /******************************************************************************* diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index 5812af5c93a..2c5f9f6cbd0 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -104,6 +104,10 @@ static const char *error_int_name(grpc_error_ints key) { return "size"; case GRPC_ERROR_INT_HTTP2_ERROR: return "http2_error"; + case GRPC_ERROR_INT_TSI_CODE: + return "tsi_code"; + case GRPC_ERROR_INT_SECURITY_STATUS: + return "security_status"; } GPR_UNREACHABLE_CODE(return "unknown"); } @@ -124,6 +128,8 @@ static const char *error_str_name(grpc_error_strs key) { return "grpc_message"; case GRPC_ERROR_STR_RAW_BYTES: return "raw_bytes"; + case GRPC_ERROR_STR_TSI_ERROR: + return "tsi_error"; } GPR_UNREACHABLE_CODE(return "unknown"); } diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index 234782ab036..143c8beffc2 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -51,6 +51,8 @@ typedef enum { GRPC_ERROR_INT_INDEX, GRPC_ERROR_INT_SIZE, GRPC_ERROR_INT_HTTP2_ERROR, + GRPC_ERROR_INT_TSI_CODE, + GRPC_ERROR_INT_SECURITY_STATUS, } grpc_error_ints; typedef enum { @@ -61,6 +63,7 @@ typedef enum { GRPC_ERROR_STR_TARGET_ADDRESS, GRPC_ERROR_STR_GRPC_MESSAGE, GRPC_ERROR_STR_RAW_BYTES, + GRPC_ERROR_STR_TSI_ERROR, } grpc_error_strs; typedef enum { diff --git a/src/core/lib/security/credentials/credentials.h b/src/core/lib/security/credentials/credentials.h index 5f44c7c3e30..675e02b58df 100644 --- a/src/core/lib/security/credentials/credentials.h +++ b/src/core/lib/security/credentials/credentials.h @@ -223,6 +223,7 @@ grpc_server_credentials *grpc_find_server_credentials_in_args( typedef struct { grpc_call_credentials *creds; grpc_credentials_metadata_cb cb; + grpc_http_response response; void *user_data; } grpc_credentials_metadata_request; diff --git a/src/core/lib/security/credentials/fake/fake_credentials.c b/src/core/lib/security/credentials/fake/fake_credentials.c index 2a5d225078f..1ff7bd14a52 100644 --- a/src/core/lib/security/credentials/fake/fake_credentials.c +++ b/src/core/lib/security/credentials/fake/fake_credentials.c @@ -95,7 +95,7 @@ static void md_only_test_destruct(grpc_call_credentials *creds) { } static void on_simulated_token_fetch_done(grpc_exec_ctx *exec_ctx, - void *user_data, bool success) { + void *user_data, grpc_error *error) { grpc_credentials_metadata_request *r = (grpc_credentials_metadata_request *)user_data; grpc_md_only_test_credentials *c = (grpc_md_only_test_credentials *)r->creds; @@ -113,8 +113,9 @@ static void md_only_test_get_request_metadata( if (c->is_async) { grpc_credentials_metadata_request *cb_arg = grpc_credentials_metadata_request_create(creds, cb, user_data); - grpc_executor_enqueue( - grpc_closure_create(on_simulated_token_fetch_done, cb_arg), true); + grpc_executor_push( + grpc_closure_create(on_simulated_token_fetch_done, cb_arg), + GRPC_ERROR_NONE); } else { cb(exec_ctx, user_data, c->md_store->entries, 1, GRPC_CREDENTIALS_OK); } @@ -136,4 +137,3 @@ grpc_call_credentials *grpc_md_only_test_credentials_create( c->is_async = is_async; return &c->base; } - diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.c b/src/core/lib/security/credentials/google_default/google_default_credentials.c index da23bba62b9..a67f19ae0f1 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.c +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.c @@ -41,8 +41,8 @@ #include "src/core/lib/http/httpcli.h" #include "src/core/lib/http/parser.h" -#include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" #include "src/core/lib/security/credentials/jwt/jwt_credentials.h" +#include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" #include "src/core/lib/support/env.h" #include "src/core/lib/support/load_file.h" #include "src/core/lib/surface/api_trace.h" @@ -65,18 +65,20 @@ typedef struct { grpc_pollset *pollset; int is_done; int success; + grpc_http_response response; } compute_engine_detector; -static void on_compute_engine_detection_http_response( - grpc_exec_ctx *exec_ctx, void *user_data, - const grpc_http_response *response) { +static void on_compute_engine_detection_http_response(grpc_exec_ctx *exec_ctx, + void *user_data, + grpc_error *error) { compute_engine_detector *detector = (compute_engine_detector *)user_data; - if (response != NULL && response->status == 200 && response->hdr_count > 0) { + if (error == GRPC_ERROR_NONE && detector->response.status == 200 && + detector->response.hdr_count > 0) { /* Internet providers can return a generic response to all requests, so it is necessary to check that metadata header is present also. */ size_t i; - for (i = 0; i < response->hdr_count; i++) { - grpc_http_header *header = &response->hdrs[i]; + for (i = 0; i < detector->response.hdr_count; i++) { + grpc_http_header *header = &detector->response.hdrs[i]; if (strcmp(header->key, "Metadata-Flavor") == 0 && strcmp(header->value, "Google") == 0) { detector->success = 1; @@ -90,7 +92,7 @@ static void on_compute_engine_detection_http_response( gpr_mu_unlock(g_polling_mu); } -static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool s) { +static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, grpc_error *e) { grpc_pollset_destroy(p); } @@ -119,9 +121,10 @@ static int is_stack_running_on_compute_engine(void) { grpc_httpcli_get( &exec_ctx, &context, detector.pollset, &request, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), max_detection_delay), - on_compute_engine_detection_http_response, &detector); + grpc_closure_create(on_compute_engine_detection_http_response, &detector), + &detector.response); - grpc_exec_ctx_finish(&exec_ctx); + grpc_exec_ctx_flush(&exec_ctx); /* Block until we get the response. This is not ideal but this should only be called once for the lifetime of the process by the default credentials. */ diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.c b/src/core/lib/security/credentials/jwt/jwt_verifier.c index cd6c7ce3921..66aaae2c5ae 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.c +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.c @@ -329,6 +329,7 @@ typedef struct { gpr_slice signed_data; void *user_data; grpc_jwt_verification_done_cb user_cb; + grpc_http_response response; } verifier_cb_ctx; /* Takes ownership of the header, claims and signature. */ @@ -571,9 +572,9 @@ end: } static void on_keys_retrieved(grpc_exec_ctx *exec_ctx, void *user_data, - const grpc_httpcli_response *response) { - grpc_json *json = json_from_http(response); + grpc_error *error) { verifier_cb_ctx *ctx = (verifier_cb_ctx *)user_data; + grpc_json *json = json_from_http(&ctx->response); EVP_PKEY *verification_key = NULL; grpc_jwt_verifier_status status = GRPC_JWT_VERIFIER_GENERIC_ERROR; grpc_jwt_claims *claims = NULL; @@ -612,10 +613,11 @@ end: } static void on_openid_config_retrieved(grpc_exec_ctx *exec_ctx, void *user_data, - const grpc_httpcli_response *response) { + grpc_error *error) { const grpc_json *cur; - grpc_json *json = json_from_http(response); verifier_cb_ctx *ctx = (verifier_cb_ctx *)user_data; + const grpc_http_response *response = &ctx->response; + grpc_json *json = json_from_http(response); grpc_httpcli_request req; const char *jwks_uri; @@ -644,7 +646,7 @@ static void on_openid_config_retrieved(grpc_exec_ctx *exec_ctx, void *user_data, grpc_httpcli_get( exec_ctx, &ctx->verifier->http_ctx, ctx->pollset, &req, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay), - on_keys_retrieved, ctx); + grpc_closure_create(on_keys_retrieved, ctx), &ctx->response); grpc_json_destroy(json); gpr_free(req.host); return; @@ -686,7 +688,7 @@ static void verifier_put_mapping(grpc_jwt_verifier *v, const char *email_domain, static void retrieve_key_and_verify(grpc_exec_ctx *exec_ctx, verifier_cb_ctx *ctx) { const char *at_sign; - grpc_httpcli_response_cb http_cb; + grpc_closure *http_cb; char *path_prefix = NULL; const char *iss; grpc_httpcli_request req; @@ -730,7 +732,7 @@ static void retrieve_key_and_verify(grpc_exec_ctx *exec_ctx, *(path_prefix++) = '\0'; gpr_asprintf(&req.http.path, "/%s/%s", path_prefix, iss); } - http_cb = on_keys_retrieved; + http_cb = grpc_closure_create(on_keys_retrieved, ctx); } else { req.host = gpr_strdup(strstr(iss, "https://") == iss ? iss + 8 : iss); path_prefix = strchr(req.host, '/'); @@ -741,13 +743,13 @@ static void retrieve_key_and_verify(grpc_exec_ctx *exec_ctx, gpr_asprintf(&req.http.path, "/%s%s", path_prefix, GRPC_OPENID_CONFIG_URL_SUFFIX); } - http_cb = on_openid_config_retrieved; + http_cb = grpc_closure_create(on_openid_config_retrieved, ctx); } grpc_httpcli_get( exec_ctx, &ctx->verifier->http_ctx, ctx->pollset, &req, gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), grpc_jwt_verifier_max_delay), - http_cb, ctx); + http_cb, &ctx->response); gpr_free(req.host); gpr_free(req.http.path); return; diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c index 0984d1f53fa..671dea31e68 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c @@ -216,9 +216,9 @@ end: return status; } -static void on_oauth2_token_fetcher_http_response( - grpc_exec_ctx *exec_ctx, void *user_data, - const grpc_http_response *response) { +static void on_oauth2_token_fetcher_http_response(grpc_exec_ctx *exec_ctx, + void *user_data, + grpc_error *error) { grpc_credentials_metadata_request *r = (grpc_credentials_metadata_request *)user_data; grpc_oauth2_token_fetcher_credentials *c = @@ -228,7 +228,7 @@ static void on_oauth2_token_fetcher_http_response( gpr_mu_lock(&c->mu); status = grpc_oauth2_token_fetcher_credentials_parse_server_response( - response, &c->access_token_md, &token_lifetime); + &r->response, &c->access_token_md, &token_lifetime); if (status == GRPC_CREDENTIALS_OK) { c->token_expiration = gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), token_lifetime); @@ -296,7 +296,7 @@ static grpc_call_credentials_vtable compute_engine_vtable = { static void compute_engine_fetch_oauth2( grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *metadata_req, grpc_httpcli_context *httpcli_context, grpc_pollset *pollset, - grpc_httpcli_response_cb response_cb, gpr_timespec deadline) { + grpc_iomgr_cb_func response_cb, gpr_timespec deadline) { grpc_http_header header = {"Metadata-Flavor", "Google"}; grpc_httpcli_request request; memset(&request, 0, sizeof(grpc_httpcli_request)); @@ -305,7 +305,8 @@ static void compute_engine_fetch_oauth2( request.http.hdr_count = 1; request.http.hdrs = &header; grpc_httpcli_get(exec_ctx, httpcli_context, pollset, &request, deadline, - response_cb, metadata_req); + grpc_closure_create(response_cb, metadata_req), + &metadata_req->response); } grpc_call_credentials *grpc_google_compute_engine_credentials_create( @@ -337,7 +338,7 @@ static grpc_call_credentials_vtable refresh_token_vtable = { static void refresh_token_fetch_oauth2( grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *metadata_req, grpc_httpcli_context *httpcli_context, grpc_pollset *pollset, - grpc_httpcli_response_cb response_cb, gpr_timespec deadline) { + grpc_iomgr_cb_func response_cb, gpr_timespec deadline) { grpc_google_refresh_token_credentials *c = (grpc_google_refresh_token_credentials *)metadata_req->creds; grpc_http_header header = {"Content-Type", @@ -354,7 +355,9 @@ static void refresh_token_fetch_oauth2( request.http.hdrs = &header; request.handshaker = &grpc_httpcli_ssl; grpc_httpcli_post(exec_ctx, httpcli_context, pollset, &request, body, - strlen(body), deadline, response_cb, metadata_req); + strlen(body), deadline, + grpc_closure_create(response_cb, metadata_req), + &metadata_req->response); gpr_free(body); } @@ -426,5 +429,3 @@ grpc_call_credentials *grpc_access_token_credentials_create( gpr_free(token_md_value); return &c->base; } - - diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h index 6cdcc68514e..017f823ef45 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h @@ -71,7 +71,7 @@ typedef void (*grpc_fetch_oauth2_func)(grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *req, grpc_httpcli_context *http_context, grpc_pollset *pollset, - grpc_httpcli_response_cb response_cb, + grpc_iomgr_cb_func cb, gpr_timespec deadline); typedef struct { grpc_call_credentials base; @@ -82,7 +82,6 @@ typedef struct { grpc_fetch_oauth2_func fetch_func; } grpc_oauth2_token_fetcher_credentials; - // Google refresh token credentials. typedef struct { grpc_oauth2_token_fetcher_credentials base; @@ -108,4 +107,3 @@ grpc_oauth2_token_fetcher_credentials_parse_server_response( grpc_credentials_md_store **token_md, gpr_timespec *token_lifetime); #endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_CREDENTIALS_H - diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c index 6561f4b47d5..b3fc3d56d95 100644 --- a/src/core/lib/security/transport/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -41,6 +41,7 @@ #include #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/transport/secure_endpoint.h" +#include "src/core/lib/security/transport/tsi_error.h" #define GRPC_INITIAL_HANDSHAKE_BUFFER_SIZE 256 @@ -63,10 +64,11 @@ typedef struct { } grpc_security_handshake; static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, - void *setup, bool success); + void *setup, + grpc_error *error); static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, void *setup, - bool success); + grpc_error *error); static void security_connector_remove_handshake(grpc_security_handshake *h) { GPR_ASSERT(!h->is_client_side); @@ -97,11 +99,11 @@ static void security_connector_remove_handshake(grpc_security_handshake *h) { static void security_handshake_done(grpc_exec_ctx *exec_ctx, grpc_security_handshake *h, - int is_success) { + grpc_error *error) { if (!h->is_client_side) { security_connector_remove_handshake(h); } - if (is_success) { + if (error == GRPC_ERROR_NONE) { h->cb(exec_ctx, h->user_data, GRPC_SECURITY_OK, h->secure_endpoint, h->auth_context); } else { @@ -130,17 +132,20 @@ static void on_peer_checked(grpc_exec_ctx *exec_ctx, void *user_data, tsi_frame_protector *protector; tsi_result result; if (status != GRPC_SECURITY_OK) { - gpr_log(GPR_ERROR, "Error checking peer."); - security_handshake_done(exec_ctx, h, 0); + security_handshake_done( + exec_ctx, h, + grpc_error_set_int(GRPC_ERROR_CREATE("Error checking peer."), + GRPC_ERROR_INT_SECURITY_STATUS, status)); return; } h->auth_context = GRPC_AUTH_CONTEXT_REF(auth_context, "handshake"); result = tsi_handshaker_create_frame_protector(h->handshaker, NULL, &protector); if (result != TSI_OK) { - gpr_log(GPR_ERROR, "Frame protector creation failed with error %s.", - tsi_result_to_string(result)); - security_handshake_done(exec_ctx, h, 0); + security_handshake_done( + exec_ctx, h, + grpc_set_tsi_error_bits( + GRPC_ERROR_CREATE("Frame protector creation failed"), result)); return; } h->secure_endpoint = @@ -148,7 +153,7 @@ static void on_peer_checked(grpc_exec_ctx *exec_ctx, void *user_data, h->left_overs.slices, h->left_overs.count); h->left_overs.count = 0; h->left_overs.length = 0; - security_handshake_done(exec_ctx, h, 1); + security_handshake_done(exec_ctx, h, GRPC_ERROR_NONE); return; } @@ -157,9 +162,9 @@ static void check_peer(grpc_exec_ctx *exec_ctx, grpc_security_handshake *h) { tsi_result result = tsi_handshaker_extract_peer(h->handshaker, &peer); if (result != TSI_OK) { - gpr_log(GPR_ERROR, "Peer extraction failed with error %s", - tsi_result_to_string(result)); - security_handshake_done(exec_ctx, h, 0); + security_handshake_done( + exec_ctx, h, grpc_set_tsi_error_bits( + GRPC_ERROR_CREATE("Peer extraction failed"), result)); return; } grpc_security_connector_check_peer(exec_ctx, h->connector, peer, @@ -185,9 +190,9 @@ static void send_handshake_bytes_to_peer(grpc_exec_ctx *exec_ctx, } while (result == TSI_INCOMPLETE_DATA); if (result != TSI_OK) { - gpr_log(GPR_ERROR, "Handshake failed with error %s", - tsi_result_to_string(result)); - security_handshake_done(exec_ctx, h, 0); + security_handshake_done( + exec_ctx, h, + grpc_set_tsi_error_bits(GRPC_ERROR_CREATE("Handshake failed"), result)); return; } @@ -203,7 +208,7 @@ static void send_handshake_bytes_to_peer(grpc_exec_ctx *exec_ctx, static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, void *handshake, - bool success) { + grpc_error *error) { grpc_security_handshake *h = handshake; size_t consumed_slice_size = 0; tsi_result result = TSI_OK; @@ -211,9 +216,10 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, size_t num_left_overs; int has_left_overs_in_current_slice = 0; - if (!success) { - gpr_log(GPR_ERROR, "Read failed."); - security_handshake_done(exec_ctx, h, 0); + if (error != GRPC_ERROR_NONE) { + security_handshake_done( + exec_ctx, h, + GRPC_ERROR_CREATE_REFERENCING("Handshake read failed", &error, 1)); return; } @@ -238,9 +244,9 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, } if (result != TSI_OK) { - gpr_log(GPR_ERROR, "Handshake failed with error %s", - tsi_result_to_string(result)); - security_handshake_done(exec_ctx, h, 0); + security_handshake_done( + exec_ctx, h, + grpc_set_tsi_error_bits(GRPC_ERROR_CREATE("Handshake failed"), result)); return; } @@ -270,13 +276,15 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, /* If handshake is NULL, the handshake is done. */ static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, - void *handshake, bool success) { + void *handshake, grpc_error *error) { grpc_security_handshake *h = handshake; /* Make sure that write is OK. */ - if (!success) { - gpr_log(GPR_ERROR, "Write failed."); - if (handshake != NULL) security_handshake_done(exec_ctx, h, 0); + if (error != GRPC_ERROR_NONE) { + if (handshake != NULL) + security_handshake_done( + exec_ctx, h, + GRPC_ERROR_CREATE_REFERENCING("Handshake write failed", &error, 1)); return; } diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index 4438c8e5596..9bd5305f808 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -38,6 +38,7 @@ #include #include #include "src/core/lib/debug/trace.h" +#include "src/core/lib/security/transport/tsi_error.h" #include "src/core/lib/support/string.h" #include "src/core/lib/tsi/transport_security_interface.h" @@ -126,7 +127,7 @@ static void flush_read_staging_buffer(secure_endpoint *ep, uint8_t **cur, } static void call_read_cb(grpc_exec_ctx *exec_ctx, secure_endpoint *ep, - bool success) { + grpc_error *error) { if (grpc_trace_secure_endpoint) { size_t i; for (i = 0; i < ep->read_buffer->count; i++) { @@ -137,11 +138,12 @@ static void call_read_cb(grpc_exec_ctx *exec_ctx, secure_endpoint *ep, } } ep->read_buffer = NULL; - grpc_exec_ctx_enqueue(exec_ctx, ep->read_cb, success, NULL); + grpc_exec_ctx_push(exec_ctx, ep->read_cb, grpc_error_ref(error), NULL); SECURE_ENDPOINT_UNREF(exec_ctx, ep, "read"); } -static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, bool success) { +static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, + grpc_error *error) { unsigned i; uint8_t keep_looping = 0; tsi_result result = TSI_OK; @@ -149,9 +151,10 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, bool success) { uint8_t *cur = GPR_SLICE_START_PTR(ep->read_staging_buffer); uint8_t *end = GPR_SLICE_END_PTR(ep->read_staging_buffer); - if (!success) { + if (error != GRPC_ERROR_NONE) { gpr_slice_buffer_reset_and_unref(ep->read_buffer); - call_read_cb(exec_ctx, ep, 0); + call_read_cb(exec_ctx, ep, GRPC_ERROR_CREATE_REFERENCING( + "Secure read failed", &error, 1)); return; } @@ -208,11 +211,12 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, bool success) { if (result != TSI_OK) { gpr_slice_buffer_reset_and_unref(ep->read_buffer); - call_read_cb(exec_ctx, ep, 0); + call_read_cb(exec_ctx, ep, grpc_set_tsi_error_bits( + GRPC_ERROR_CREATE("Unwrap failed"), result)); return; } - call_read_cb(exec_ctx, ep, 1); + call_read_cb(exec_ctx, ep, GRPC_ERROR_NONE); } static void endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, @@ -226,7 +230,7 @@ static void endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, if (ep->leftover_bytes.count) { gpr_slice_buffer_swap(&ep->leftover_bytes, &ep->source_buffer); GPR_ASSERT(ep->leftover_bytes.count == 0); - on_read(exec_ctx, ep, 1); + on_read(exec_ctx, ep, GRPC_ERROR_NONE); return; } @@ -315,7 +319,10 @@ static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, if (result != TSI_OK) { /* TODO(yangg) do different things according to the error type? */ gpr_slice_buffer_reset_and_unref(&ep->output_buffer); - grpc_exec_ctx_enqueue(exec_ctx, cb, false, NULL); + grpc_exec_ctx_push( + exec_ctx, cb, + grpc_set_tsi_error_bits(GRPC_ERROR_CREATE("Wrap failed"), result), + NULL); return; } diff --git a/src/core/lib/security/transport/server_auth_filter.c b/src/core/lib/security/transport/server_auth_filter.c index 006a30f0c69..e0a7fb50d1c 100644 --- a/src/core/lib/security/transport/server_auth_filter.c +++ b/src/core/lib/security/transport/server_auth_filter.c @@ -128,7 +128,7 @@ static void on_md_processing_done( grpc_metadata_batch_filter(calld->recv_initial_metadata, remove_consumed_md, elem); grpc_metadata_array_destroy(&calld->md); - calld->on_done_recv->cb(&exec_ctx, calld->on_done_recv->cb_arg, 1); + grpc_exec_ctx_push(&exec_ctx, calld->on_done_recv, GRPC_ERROR_NONE, NULL); } else { gpr_slice message; grpc_transport_stream_op close_op; @@ -146,18 +146,21 @@ static void on_md_processing_done( calld->transport_op.send_trailing_metadata = NULL; grpc_transport_stream_op_add_close(&close_op, status, &message); grpc_call_next_op(&exec_ctx, elem, &close_op); - calld->on_done_recv->cb(&exec_ctx, calld->on_done_recv->cb_arg, 0); + grpc_exec_ctx_push(&exec_ctx, calld->on_done_recv, + grpc_error_set_int(GRPC_ERROR_CREATE(error_details), + GRPC_ERROR_INT_GRPC_STATUS, status), + NULL); } grpc_exec_ctx_finish(&exec_ctx); } static void auth_on_recv(grpc_exec_ctx *exec_ctx, void *user_data, - bool success) { + grpc_error *error) { grpc_call_element *elem = user_data; call_data *calld = elem->call_data; channel_data *chand = elem->channel_data; - if (success) { + if (error == GRPC_ERROR_NONE) { if (chand->creds->processor.process != NULL) { calld->md = metadata_batch_to_md_array(calld->recv_initial_metadata); chand->creds->processor.process( @@ -166,7 +169,8 @@ static void auth_on_recv(grpc_exec_ctx *exec_ctx, void *user_data, return; } } - calld->on_done_recv->cb(exec_ctx, calld->on_done_recv->cb_arg, success); + grpc_exec_ctx_push(exec_ctx, calld->on_done_recv, grpc_error_ref(error), + NULL); } static void set_recv_ops_md_callbacks(grpc_call_element *elem, diff --git a/src/core/lib/security/transport/tsi_error.c b/src/core/lib/security/transport/tsi_error.c new file mode 100644 index 00000000000..b9fb8149052 --- /dev/null +++ b/src/core/lib/security/transport/tsi_error.c @@ -0,0 +1,40 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/security/transport/tsi_error.h" + +grpc_error *grpc_set_tsi_error_bits(grpc_error *error, tsi_result result) { + return grpc_error_set_int(grpc_error_set_str(error, GRPC_ERROR_STR_TSI_ERROR, + tsi_result_to_string(result)), + GRPC_ERROR_INT_TSI_CODE, result); +} diff --git a/src/core/lib/security/transport/tsi_error.h b/src/core/lib/security/transport/tsi_error.h new file mode 100644 index 00000000000..5406b8492bf --- /dev/null +++ b/src/core/lib/security/transport/tsi_error.h @@ -0,0 +1,42 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef TSI_ERROR_H +#define TSI_ERROR_H + +#include "src/core/lib/iomgr/error.h" +#include "src/core/lib/tsi/transport_security_interface.h" + +grpc_error *grpc_set_tsi_error_bits(grpc_error *error, tsi_result result); + +#endif diff --git a/src/core/lib/surface/channel.c b/src/core/lib/surface/channel.c index ac5e1fcc0c5..3c68dc0c4bf 100644 --- a/src/core/lib/surface/channel.c +++ b/src/core/lib/surface/channel.c @@ -294,7 +294,7 @@ void grpc_channel_destroy(grpc_channel *channel) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; GRPC_API_TRACE("grpc_channel_destroy(channel=%p)", 1, (channel)); memset(&op, 0, sizeof(op)); - op.disconnect = 1; + op.disconnect_with_error = GRPC_ERROR_CREATE("Channel Destroyed"); elem = grpc_channel_stack_element(CHANNEL_STACK_FROM_CHANNEL(channel), 0); elem->filter->start_transport_op(&exec_ctx, elem, &op); diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 61d1624f49d..ad4d0b54811 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -273,7 +273,7 @@ static void shutdown_cleanup(grpc_exec_ctx *exec_ctx, void *arg, } static void send_shutdown(grpc_exec_ctx *exec_ctx, grpc_channel *channel, - int send_goaway, int send_disconnect) { + int send_goaway, grpc_error *send_disconnect) { grpc_transport_op op; struct shutdown_cleanup_args *sc; grpc_channel_element *elem; @@ -284,7 +284,7 @@ static void send_shutdown(grpc_exec_ctx *exec_ctx, grpc_channel *channel, sc->slice = gpr_slice_from_copied_string("Server shutdown"); op.goaway_message = &sc->slice; op.goaway_status = GRPC_STATUS_OK; - op.disconnect = send_disconnect; + op.disconnect_with_error = send_disconnect; grpc_closure_init(&sc->closure, shutdown_cleanup, sc); op.on_consumed = &sc->closure; @@ -295,7 +295,7 @@ static void send_shutdown(grpc_exec_ctx *exec_ctx, grpc_channel *channel, static void channel_broadcaster_shutdown(grpc_exec_ctx *exec_ctx, channel_broadcaster *cb, int send_goaway, - int force_disconnect) { + grpc_error *force_disconnect) { size_t i; for (i = 0; i < cb->num_channels; i++) { @@ -1100,7 +1100,9 @@ void grpc_server_setup_transport(grpc_exec_ctx *exec_ctx, grpc_server *s, op.set_accept_stream_user_data = chand; op.on_connectivity_state_change = &chand->channel_connectivity_changed; op.connectivity_state = &chand->connectivity_state; - op.disconnect = gpr_atm_acq_load(&s->shutdown_flag) != 0; + if (gpr_atm_acq_load(&s->shutdown_flag) != 0) { + op.disconnect_with_error = GRPC_ERROR_CREATE("Server shutdown"); + } grpc_transport_perform_op(exec_ctx, transport, &op); } @@ -1185,7 +1187,8 @@ void grpc_server_cancel_all_calls(grpc_server *server) { channel_broadcaster_init(server, &broadcaster); gpr_mu_unlock(&server->mu_global); - channel_broadcaster_shutdown(&exec_ctx, &broadcaster, 0, 1); + channel_broadcaster_shutdown(&exec_ctx, &broadcaster, 0, + GRPC_ERROR_CREATE("Cancelling all calls")); grpc_exec_ctx_finish(&exec_ctx); } diff --git a/src/core/lib/transport/connectivity_state.c b/src/core/lib/transport/connectivity_state.c index cdfc298fa9f..c6b274a5dad 100644 --- a/src/core/lib/transport/connectivity_state.c +++ b/src/core/lib/transport/connectivity_state.c @@ -69,6 +69,7 @@ void grpc_connectivity_state_destroy(grpc_exec_ctx *exec_ctx, grpc_connectivity_state_tracker *tracker) { grpc_error *error; grpc_connectivity_state_watcher *w; + grpc_error_unref(tracker->current_error); while ((w = tracker->watchers)) { tracker->watchers = w->next; @@ -85,11 +86,14 @@ void grpc_connectivity_state_destroy(grpc_exec_ctx *exec_ctx, } grpc_connectivity_state grpc_connectivity_state_check( - grpc_connectivity_state_tracker *tracker) { + grpc_connectivity_state_tracker *tracker, grpc_error **error) { if (grpc_connectivity_state_trace) { gpr_log(GPR_DEBUG, "CONWATCH: %p %s: get %s", tracker, tracker->name, grpc_connectivity_state_name(tracker->current_state)); } + if (error != NULL) { + *error = grpc_error_ref(tracker->current_error); + } return tracker->current_state; } @@ -143,13 +147,26 @@ int grpc_connectivity_state_notify_on_state_change( void grpc_connectivity_state_set(grpc_exec_ctx *exec_ctx, grpc_connectivity_state_tracker *tracker, grpc_connectivity_state state, - const char *reason) { + grpc_error *error, const char *reason) { grpc_connectivity_state_watcher *w; if (grpc_connectivity_state_trace) { gpr_log(GPR_DEBUG, "SET: %p %s: %s --> %s [%s]", tracker, tracker->name, grpc_connectivity_state_name(tracker->current_state), grpc_connectivity_state_name(state), reason); } + switch (state) { + case GRPC_CHANNEL_CONNECTING: + case GRPC_CHANNEL_IDLE: + case GRPC_CHANNEL_READY: + GPR_ASSERT(error == GRPC_ERROR_NONE); + break; + case GRPC_CHANNEL_FATAL_FAILURE: + case GRPC_CHANNEL_TRANSIENT_FAILURE: + GPR_ASSERT(error != GRPC_ERROR_NONE); + break; + } + grpc_error_unref(tracker->current_error); + tracker->current_error = error; if (tracker->current_state == state) { return; } @@ -158,7 +175,8 @@ void grpc_connectivity_state_set(grpc_exec_ctx *exec_ctx, while ((w = tracker->watchers) != NULL) { *w->current = tracker->current_state; tracker->watchers = w->next; - grpc_exec_ctx_push(exec_ctx, w->notify, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_push(exec_ctx, w->notify, + grpc_error_ref(tracker->current_error), NULL); gpr_free(w); } } diff --git a/src/core/lib/transport/connectivity_state.h b/src/core/lib/transport/connectivity_state.h index 2eb7e09124f..7a2fa52c103 100644 --- a/src/core/lib/transport/connectivity_state.h +++ b/src/core/lib/transport/connectivity_state.h @@ -49,6 +49,8 @@ typedef struct grpc_connectivity_state_watcher { typedef struct { /** current connectivity state */ grpc_connectivity_state current_state; + /** error associated with state */ + grpc_error *current_error; /** all our watchers */ grpc_connectivity_state_watcher *watchers; /** a name to help debugging */ @@ -70,10 +72,11 @@ void grpc_connectivity_state_destroy(grpc_exec_ctx *exec_ctx, void grpc_connectivity_state_set(grpc_exec_ctx *exec_ctx, grpc_connectivity_state_tracker *tracker, grpc_connectivity_state state, + grpc_error *associated_error, const char *reason); grpc_connectivity_state grpc_connectivity_state_check( - grpc_connectivity_state_tracker *tracker); + grpc_connectivity_state_tracker *tracker, grpc_error **current_error); /** Return 1 if the channel should start connecting, 0 otherwise. If current==NULL cancel notify if it is already queued (success==0 in that diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index c4da1027cdc..f2d750e8709 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -154,7 +154,7 @@ typedef struct grpc_transport_op { grpc_closure *on_connectivity_state_change; grpc_connectivity_state *connectivity_state; /** should the transport be disconnected */ - int disconnect; + grpc_error *disconnect_with_error; /** should we send a goaway? after a goaway is sent, once there are no more active calls on the transport, the transport should disconnect */ From 0333a49afa63e47eb66445243fe9d1e7d3fa68f4 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Wed, 4 May 2016 19:14:10 -0700 Subject: [PATCH 0310/1894] Use stream rpc to ensure all related requests go to a single server. --- .../include/grpc++/impl/reflection.grpc.pb.h | 579 +-- .../include/grpc++/impl/reflection.pb.h | 1834 ++++++--- .../reflection/proto_server_reflection.cc | 89 +- .../reflection/proto_server_reflection.h | 35 +- extensions/reflection/reflection.grpc.pb.cc | 256 +- extensions/reflection/reflection.pb.cc | 3535 +++++++++++------ .../grpc/reflection/v1alpha/reflection.proto | 141 +- .../proto_reflection_descriptor_database.cc | 250 +- .../proto_reflection_descriptor_database.h | 11 +- .../reflection_debug/reflection_client.cc | 45 +- .../extensions/gen_reflection_proto.sh | 42 +- 11 files changed, 4029 insertions(+), 2788 deletions(-) diff --git a/extensions/include/grpc++/impl/reflection.grpc.pb.h b/extensions/include/grpc++/impl/reflection.grpc.pb.h index f6009296366..7c6e7b2b78a 100644 --- a/extensions/include/grpc++/impl/reflection.grpc.pb.h +++ b/extensions/include/grpc++/impl/reflection.grpc.pb.h @@ -1,6 +1,72 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + // Generated by the gRPC protobuf plugin. // If you make any local change, they will be lost. // source: reflection.proto +// Original file comments: +// Copyright 2016, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +// Service exported by server reflection +// #ifndef GRPC_reflection_2eproto__INCLUDED #define GRPC_reflection_2eproto__INCLUDED @@ -32,516 +98,78 @@ class ServerReflection GRPC_FINAL { class StubInterface { public: virtual ~StubInterface() {} - virtual ::grpc::Status ListService( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest& request, - ::grpc::reflection::v1alpha::ListServiceResponse* response) = 0; - std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::ListServiceResponse>> - AsyncListService(::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest& request, - ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::ListServiceResponse>>( - AsyncListServiceRaw(context, request, cq)); - } - virtual ::grpc::Status GetFileByName( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest& request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) = 0; - std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>> - AsyncGetFileByName( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest& request, - ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>>( - AsyncGetFileByNameRaw(context, request, cq)); - } - virtual ::grpc::Status GetFileContainingSymbol( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest& request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) = 0; - std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>> - AsyncGetFileContainingSymbol( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest& request, - ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>>( - AsyncGetFileContainingSymbolRaw(context, request, cq)); + // The reflection service is structured as a bidirectional stream, ensuring + // all related requests go to a single server. + std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>> DescriptorDatabaseInfo(::grpc::ClientContext* context) { + return std::unique_ptr< ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>>(DescriptorDatabaseInfoRaw(context)); } - virtual ::grpc::Status GetFileContainingExtension( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest& request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) = 0; - std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>> - AsyncGetFileContainingExtension( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest& request, - ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>>( - AsyncGetFileContainingExtensionRaw(context, request, cq)); + std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>> AsyncDescriptorDatabaseInfo(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>>(AsyncDescriptorDatabaseInfoRaw(context, cq, tag)); } - virtual ::grpc::Status GetAllExtensionNumbers( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::TypeRequest& request, - ::grpc::reflection::v1alpha::ExtensionNumberResponse* response) = 0; - std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::ExtensionNumberResponse>> - AsyncGetAllExtensionNumbers( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::TypeRequest& request, - ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::ExtensionNumberResponse>>( - AsyncGetAllExtensionNumbersRaw(context, request, cq)); - } - - private: - virtual ::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::ListServiceResponse>* - AsyncListServiceRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest& request, - ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* - AsyncGetFileByNameRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest& request, - ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* - AsyncGetFileContainingSymbolRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest& request, - ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* - AsyncGetFileContainingExtensionRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest& request, - ::grpc::CompletionQueue* cq) = 0; - virtual ::grpc::ClientAsyncResponseReaderInterface< - ::grpc::reflection::v1alpha::ExtensionNumberResponse>* - AsyncGetAllExtensionNumbersRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::TypeRequest& request, - ::grpc::CompletionQueue* cq) = 0; + private: + virtual ::grpc::ClientReaderWriterInterface< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>* DescriptorDatabaseInfoRaw(::grpc::ClientContext* context) = 0; + virtual ::grpc::ClientAsyncReaderWriterInterface< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>* AsyncDescriptorDatabaseInfoRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) = 0; }; class Stub GRPC_FINAL : public StubInterface { public: - Stub(const std::shared_ptr<::grpc::ChannelInterface>& channel); - ::grpc::Status ListService( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest& request, - ::grpc::reflection::v1alpha::ListServiceResponse* response) - GRPC_OVERRIDE; - std::unique_ptr<::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::ListServiceResponse>> - AsyncListService(::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest& request, - ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::ListServiceResponse>>( - AsyncListServiceRaw(context, request, cq)); + Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel); + std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>> DescriptorDatabaseInfo(::grpc::ClientContext* context) { + return std::unique_ptr< ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>>(DescriptorDatabaseInfoRaw(context)); } - ::grpc::Status GetFileByName( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest& request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) - GRPC_OVERRIDE; - std::unique_ptr<::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>> - AsyncGetFileByName( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest& request, - ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>>( - AsyncGetFileByNameRaw(context, request, cq)); - } - ::grpc::Status GetFileContainingSymbol( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest& request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) - GRPC_OVERRIDE; - std::unique_ptr<::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>> - AsyncGetFileContainingSymbol( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest& request, - ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>>( - AsyncGetFileContainingSymbolRaw(context, request, cq)); - } - ::grpc::Status GetFileContainingExtension( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest& request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) - GRPC_OVERRIDE; - std::unique_ptr<::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>> - AsyncGetFileContainingExtension( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest& request, - ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>>( - AsyncGetFileContainingExtensionRaw(context, request, cq)); - } - ::grpc::Status GetAllExtensionNumbers( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::TypeRequest& request, - ::grpc::reflection::v1alpha::ExtensionNumberResponse* response) - GRPC_OVERRIDE; - std::unique_ptr<::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::ExtensionNumberResponse>> - AsyncGetAllExtensionNumbers( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::TypeRequest& request, - ::grpc::CompletionQueue* cq) { - return std::unique_ptr<::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::ExtensionNumberResponse>>( - AsyncGetAllExtensionNumbersRaw(context, request, cq)); + std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>> AsyncDescriptorDatabaseInfo(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { + return std::unique_ptr< ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>>(AsyncDescriptorDatabaseInfoRaw(context, cq, tag)); } private: - std::shared_ptr<::grpc::ChannelInterface> channel_; - ::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::ListServiceResponse>* - AsyncListServiceRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest& request, - ::grpc::CompletionQueue* cq) GRPC_OVERRIDE; - ::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* - AsyncGetFileByNameRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest& request, - ::grpc::CompletionQueue* cq) GRPC_OVERRIDE; - ::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* - AsyncGetFileContainingSymbolRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest& request, - ::grpc::CompletionQueue* cq) GRPC_OVERRIDE; - ::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* - AsyncGetFileContainingExtensionRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest& request, - ::grpc::CompletionQueue* cq) GRPC_OVERRIDE; - ::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::ExtensionNumberResponse>* - AsyncGetAllExtensionNumbersRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::TypeRequest& request, - ::grpc::CompletionQueue* cq) GRPC_OVERRIDE; - const ::grpc::RpcMethod rpcmethod_ListService_; - const ::grpc::RpcMethod rpcmethod_GetFileByName_; - const ::grpc::RpcMethod rpcmethod_GetFileContainingSymbol_; - const ::grpc::RpcMethod rpcmethod_GetFileContainingExtension_; - const ::grpc::RpcMethod rpcmethod_GetAllExtensionNumbers_; + std::shared_ptr< ::grpc::ChannelInterface> channel_; + ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>* DescriptorDatabaseInfoRaw(::grpc::ClientContext* context) GRPC_OVERRIDE; + ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>* AsyncDescriptorDatabaseInfoRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) GRPC_OVERRIDE; + const ::grpc::RpcMethod rpcmethod_DescriptorDatabaseInfo_; }; - static std::unique_ptr NewStub( - const std::shared_ptr<::grpc::ChannelInterface>& channel, - const ::grpc::StubOptions& options = ::grpc::StubOptions()); + static std::unique_ptr NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options = ::grpc::StubOptions()); class Service : public ::grpc::Service { public: Service(); virtual ~Service(); - virtual ::grpc::Status ListService( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest* request, - ::grpc::reflection::v1alpha::ListServiceResponse* response); - virtual ::grpc::Status GetFileByName( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response); - virtual ::grpc::Status GetFileContainingSymbol( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response); - virtual ::grpc::Status GetFileContainingExtension( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response); - virtual ::grpc::Status GetAllExtensionNumbers( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::TypeRequest* request, - ::grpc::reflection::v1alpha::ExtensionNumberResponse* response); + // The reflection service is structured as a bidirectional stream, ensuring + // all related requests go to a single server. + virtual ::grpc::Status DescriptorDatabaseInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseResponse, ::grpc::reflection::v1alpha::DescriptorDatabaseRequest>* stream); }; template - class WithAsyncMethod_ListService : public BaseClass { + class WithAsyncMethod_DescriptorDatabaseInfo : public BaseClass { private: - void BaseClassMustBeDerivedFromService(Service* service) {} - + void BaseClassMustBeDerivedFromService(const Service *service) {} public: - WithAsyncMethod_ListService() { ::grpc::Service::MarkMethodAsync(0); } - ~WithAsyncMethod_ListService() GRPC_OVERRIDE { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status ListService( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest* request, - ::grpc::reflection::v1alpha::ListServiceResponse* response) - GRPC_FINAL GRPC_OVERRIDE { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); + WithAsyncMethod_DescriptorDatabaseInfo() { + ::grpc::Service::MarkMethodAsync(0); } - void RequestListService( - ::grpc::ServerContext* context, - ::grpc::reflection::v1alpha::EmptyRequest* request, - ::grpc::ServerAsyncResponseWriter< - ::grpc::reflection::v1alpha::ListServiceResponse>* response, - ::grpc::CompletionQueue* new_call_cq, - ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(0, context, request, response, - new_call_cq, notification_cq, tag); - } - }; - template - class WithAsyncMethod_GetFileByName : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(Service* service) {} - - public: - WithAsyncMethod_GetFileByName() { ::grpc::Service::MarkMethodAsync(1); } - ~WithAsyncMethod_GetFileByName() GRPC_OVERRIDE { + ~WithAsyncMethod_DescriptorDatabaseInfo() GRPC_OVERRIDE { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status GetFileByName( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) - GRPC_FINAL GRPC_OVERRIDE { + ::grpc::Status DescriptorDatabaseInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseResponse, ::grpc::reflection::v1alpha::DescriptorDatabaseRequest>* stream) GRPC_FINAL GRPC_OVERRIDE { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - void RequestGetFileByName( - ::grpc::ServerContext* context, - ::grpc::reflection::v1alpha::FileNameRequest* request, - ::grpc::ServerAsyncResponseWriter< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* response, - ::grpc::CompletionQueue* new_call_cq, - ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(1, context, request, response, - new_call_cq, notification_cq, tag); + void RequestDescriptorDatabaseInfo(::grpc::ServerContext* context, ::grpc::ServerAsyncReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseResponse, ::grpc::reflection::v1alpha::DescriptorDatabaseRequest>* stream, ::grpc::CompletionQueue* new_call_cq, ::grpc::ServerCompletionQueue* notification_cq, void *tag) { + ::grpc::Service::RequestAsyncBidiStreaming(0, context, stream, new_call_cq, notification_cq, tag); } }; + typedef WithAsyncMethod_DescriptorDatabaseInfo AsyncService; template - class WithAsyncMethod_GetFileContainingSymbol : public BaseClass { + class WithGenericMethod_DescriptorDatabaseInfo : public BaseClass { private: - void BaseClassMustBeDerivedFromService(Service* service) {} - + void BaseClassMustBeDerivedFromService(const Service *service) {} public: - WithAsyncMethod_GetFileContainingSymbol() { - ::grpc::Service::MarkMethodAsync(2); + WithGenericMethod_DescriptorDatabaseInfo() { + ::grpc::Service::MarkMethodGeneric(0); } - ~WithAsyncMethod_GetFileContainingSymbol() GRPC_OVERRIDE { + ~WithGenericMethod_DescriptorDatabaseInfo() GRPC_OVERRIDE { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status GetFileContainingSymbol( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) - GRPC_FINAL GRPC_OVERRIDE { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestGetFileContainingSymbol( - ::grpc::ServerContext* context, - ::grpc::reflection::v1alpha::SymbolRequest* request, - ::grpc::ServerAsyncResponseWriter< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* response, - ::grpc::CompletionQueue* new_call_cq, - ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(2, context, request, response, - new_call_cq, notification_cq, tag); - } - }; - template - class WithAsyncMethod_GetFileContainingExtension : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(Service* service) {} - - public: - WithAsyncMethod_GetFileContainingExtension() { - ::grpc::Service::MarkMethodAsync(3); - } - ~WithAsyncMethod_GetFileContainingExtension() GRPC_OVERRIDE { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status GetFileContainingExtension( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) - GRPC_FINAL GRPC_OVERRIDE { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestGetFileContainingExtension( - ::grpc::ServerContext* context, - ::grpc::reflection::v1alpha::ExtensionRequest* request, - ::grpc::ServerAsyncResponseWriter< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* response, - ::grpc::CompletionQueue* new_call_cq, - ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(3, context, request, response, - new_call_cq, notification_cq, tag); - } - }; - template - class WithAsyncMethod_GetAllExtensionNumbers : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(Service* service) {} - - public: - WithAsyncMethod_GetAllExtensionNumbers() { - ::grpc::Service::MarkMethodAsync(4); - } - ~WithAsyncMethod_GetAllExtensionNumbers() GRPC_OVERRIDE { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status GetAllExtensionNumbers( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::TypeRequest* request, - ::grpc::reflection::v1alpha::ExtensionNumberResponse* response) - GRPC_FINAL GRPC_OVERRIDE { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - void RequestGetAllExtensionNumbers( - ::grpc::ServerContext* context, - ::grpc::reflection::v1alpha::TypeRequest* request, - ::grpc::ServerAsyncResponseWriter< - ::grpc::reflection::v1alpha::ExtensionNumberResponse>* response, - ::grpc::CompletionQueue* new_call_cq, - ::grpc::ServerCompletionQueue* notification_cq, void* tag) { - ::grpc::Service::RequestAsyncUnary(4, context, request, response, - new_call_cq, notification_cq, tag); - } - }; - typedef WithAsyncMethod_ListService< - WithAsyncMethod_GetFileByName>>>> - AsyncService; - template - class WithGenericMethod_ListService : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(Service* service) {} - - public: - WithGenericMethod_ListService() { ::grpc::Service::MarkMethodGeneric(0); } - ~WithGenericMethod_ListService() GRPC_OVERRIDE { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status ListService( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest* request, - ::grpc::reflection::v1alpha::ListServiceResponse* response) - GRPC_FINAL GRPC_OVERRIDE { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_GetFileByName : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(Service* service) {} - - public: - WithGenericMethod_GetFileByName() { ::grpc::Service::MarkMethodGeneric(1); } - ~WithGenericMethod_GetFileByName() GRPC_OVERRIDE { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status GetFileByName( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) - GRPC_FINAL GRPC_OVERRIDE { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_GetFileContainingSymbol : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(Service* service) {} - - public: - WithGenericMethod_GetFileContainingSymbol() { - ::grpc::Service::MarkMethodGeneric(2); - } - ~WithGenericMethod_GetFileContainingSymbol() GRPC_OVERRIDE { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status GetFileContainingSymbol( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) - GRPC_FINAL GRPC_OVERRIDE { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_GetFileContainingExtension : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(Service* service) {} - - public: - WithGenericMethod_GetFileContainingExtension() { - ::grpc::Service::MarkMethodGeneric(3); - } - ~WithGenericMethod_GetFileContainingExtension() GRPC_OVERRIDE { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status GetFileContainingExtension( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) - GRPC_FINAL GRPC_OVERRIDE { - abort(); - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); - } - }; - template - class WithGenericMethod_GetAllExtensionNumbers : public BaseClass { - private: - void BaseClassMustBeDerivedFromService(Service* service) {} - - public: - WithGenericMethod_GetAllExtensionNumbers() { - ::grpc::Service::MarkMethodGeneric(4); - } - ~WithGenericMethod_GetAllExtensionNumbers() GRPC_OVERRIDE { - BaseClassMustBeDerivedFromService(this); - } - // disable synchronous version of this method - ::grpc::Status GetAllExtensionNumbers( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::TypeRequest* request, - ::grpc::reflection::v1alpha::ExtensionNumberResponse* response) - GRPC_FINAL GRPC_OVERRIDE { + ::grpc::Status DescriptorDatabaseInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseResponse, ::grpc::reflection::v1alpha::DescriptorDatabaseRequest>* stream) GRPC_FINAL GRPC_OVERRIDE { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -552,4 +180,5 @@ class ServerReflection GRPC_FINAL { } // namespace reflection } // namespace grpc + #endif // GRPC_reflection_2eproto__INCLUDED diff --git a/extensions/include/grpc++/impl/reflection.pb.h b/extensions/include/grpc++/impl/reflection.pb.h index b054e28de97..3b1f0a11a2c 100644 --- a/extensions/include/grpc++/impl/reflection.pb.h +++ b/extensions/include/grpc++/impl/reflection.pb.h @@ -1,3 +1,37 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + // Generated by the protocol buffer compiler. DO NOT EDIT! // source: reflection.proto @@ -21,11 +55,11 @@ #include #include -#include #include -#include #include +#include #include +#include #include // @@protoc_insertion_point(includes) @@ -38,116 +72,50 @@ void protobuf_AddDesc_reflection_2eproto(); void protobuf_AssignDesc_reflection_2eproto(); void protobuf_ShutdownFile_reflection_2eproto(); -class EmptyRequest; +class DescriptorDatabaseRequest; +class DescriptorDatabaseResponse; +class ErrorResponse; class ExtensionNumberResponse; class ExtensionRequest; -class FileDescriptorProtoResponse; -class FileNameRequest; class ListServiceResponse; -class SymbolRequest; -class TypeRequest; // =================================================================== -class EmptyRequest : public ::google::protobuf::Message { +class DescriptorDatabaseRequest : public ::google::protobuf::Message { public: - EmptyRequest(); - virtual ~EmptyRequest(); + DescriptorDatabaseRequest(); + virtual ~DescriptorDatabaseRequest(); - EmptyRequest(const EmptyRequest& from); + DescriptorDatabaseRequest(const DescriptorDatabaseRequest& from); - inline EmptyRequest& operator=(const EmptyRequest& from) { + inline DescriptorDatabaseRequest& operator=(const DescriptorDatabaseRequest& from) { CopyFrom(from); return *this; } static const ::google::protobuf::Descriptor* descriptor(); - static const EmptyRequest& default_instance(); - - void Swap(EmptyRequest* other); - - // implements Message ---------------------------------------------- - - inline EmptyRequest* New() const { return New(NULL); } - - EmptyRequest* New(::google::protobuf::Arena* arena) const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const EmptyRequest& from); - void MergeFrom(const EmptyRequest& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - - private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(EmptyRequest* other); - - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } - - public: - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.EmptyRequest) - private: - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; - mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); - friend void protobuf_AssignDesc_reflection_2eproto(); - friend void protobuf_ShutdownFile_reflection_2eproto(); - - void InitAsDefaultInstance(); - static EmptyRequest* default_instance_; -}; -// ------------------------------------------------------------------- - -class FileNameRequest : public ::google::protobuf::Message { - public: - FileNameRequest(); - virtual ~FileNameRequest(); - - FileNameRequest(const FileNameRequest& from); + static const DescriptorDatabaseRequest& default_instance(); - inline FileNameRequest& operator=(const FileNameRequest& from) { - CopyFrom(from); - return *this; - } + enum MessageRequestCase { + kFileByFilename = 3, + kFileContainingSymbol = 4, + kFileContainingExtension = 5, + kAllExtensionNumbersOfType = 6, + kListServices = 7, + MESSAGE_REQUEST_NOT_SET = 0, + }; - static const ::google::protobuf::Descriptor* descriptor(); - static const FileNameRequest& default_instance(); - - void Swap(FileNameRequest* other); + void Swap(DescriptorDatabaseRequest* other); // implements Message ---------------------------------------------- - inline FileNameRequest* New() const { return New(NULL); } + inline DescriptorDatabaseRequest* New() const { return New(NULL); } - FileNameRequest* New(::google::protobuf::Arena* arena) const; + DescriptorDatabaseRequest* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const FileNameRequest& from); - void MergeFrom(const FileNameRequest& from); + void CopyFrom(const DescriptorDatabaseRequest& from); + void MergeFrom(const DescriptorDatabaseRequest& from); void Clear(); bool IsInitialized() const; @@ -156,139 +124,137 @@ class FileNameRequest : public ::google::protobuf::Message { ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; int GetCachedSize() const { return _cached_size_; } - - private: + private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(FileNameRequest* other); - - private: + void InternalSwap(DescriptorDatabaseRequest* other); + private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } + public: - public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- - // optional string filename = 1; - void clear_filename(); - static const int kFilenameFieldNumber = 1; - const ::std::string& filename() const; - void set_filename(const ::std::string& value); - void set_filename(const char* value); - void set_filename(const char* value, size_t size); - ::std::string* mutable_filename(); - ::std::string* release_filename(); - void set_allocated_filename(::std::string* filename); - - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.FileNameRequest) - private: - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - bool _is_default_instance_; - ::google::protobuf::internal::ArenaStringPtr filename_; - mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); - friend void protobuf_AssignDesc_reflection_2eproto(); - friend void protobuf_ShutdownFile_reflection_2eproto(); - - void InitAsDefaultInstance(); - static FileNameRequest* default_instance_; -}; -// ------------------------------------------------------------------- - -class SymbolRequest : public ::google::protobuf::Message { - public: - SymbolRequest(); - virtual ~SymbolRequest(); - - SymbolRequest(const SymbolRequest& from); - - inline SymbolRequest& operator=(const SymbolRequest& from) { - CopyFrom(from); - return *this; - } - - static const ::google::protobuf::Descriptor* descriptor(); - static const SymbolRequest& default_instance(); - - void Swap(SymbolRequest* other); - - // implements Message ---------------------------------------------- - - inline SymbolRequest* New() const { return New(NULL); } - - SymbolRequest* New(::google::protobuf::Arena* arena) const; - void CopyFrom(const ::google::protobuf::Message& from); - void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const SymbolRequest& from); - void MergeFrom(const SymbolRequest& from); - void Clear(); - bool IsInitialized() const; - - int ByteSize() const; - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input); - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* output) const; - int GetCachedSize() const { return _cached_size_; } - + // optional string host = 1; + void clear_host(); + static const int kHostFieldNumber = 1; + const ::std::string& host() const; + void set_host(const ::std::string& value); + void set_host(const char* value); + void set_host(const char* value, size_t size); + ::std::string* mutable_host(); + ::std::string* release_host(); + void set_allocated_host(::std::string* host); + + // optional string file_by_filename = 3; + private: + bool has_file_by_filename() const; + public: + void clear_file_by_filename(); + static const int kFileByFilenameFieldNumber = 3; + const ::std::string& file_by_filename() const; + void set_file_by_filename(const ::std::string& value); + void set_file_by_filename(const char* value); + void set_file_by_filename(const char* value, size_t size); + ::std::string* mutable_file_by_filename(); + ::std::string* release_file_by_filename(); + void set_allocated_file_by_filename(::std::string* file_by_filename); + + // optional string file_containing_symbol = 4; + private: + bool has_file_containing_symbol() const; + public: + void clear_file_containing_symbol(); + static const int kFileContainingSymbolFieldNumber = 4; + const ::std::string& file_containing_symbol() const; + void set_file_containing_symbol(const ::std::string& value); + void set_file_containing_symbol(const char* value); + void set_file_containing_symbol(const char* value, size_t size); + ::std::string* mutable_file_containing_symbol(); + ::std::string* release_file_containing_symbol(); + void set_allocated_file_containing_symbol(::std::string* file_containing_symbol); + + // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; + bool has_file_containing_extension() const; + void clear_file_containing_extension(); + static const int kFileContainingExtensionFieldNumber = 5; + const ::grpc::reflection::v1alpha::ExtensionRequest& file_containing_extension() const; + ::grpc::reflection::v1alpha::ExtensionRequest* mutable_file_containing_extension(); + ::grpc::reflection::v1alpha::ExtensionRequest* release_file_containing_extension(); + void set_allocated_file_containing_extension(::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension); + + // optional string all_extension_numbers_of_type = 6; + private: + bool has_all_extension_numbers_of_type() const; + public: + void clear_all_extension_numbers_of_type(); + static const int kAllExtensionNumbersOfTypeFieldNumber = 6; + const ::std::string& all_extension_numbers_of_type() const; + void set_all_extension_numbers_of_type(const ::std::string& value); + void set_all_extension_numbers_of_type(const char* value); + void set_all_extension_numbers_of_type(const char* value, size_t size); + ::std::string* mutable_all_extension_numbers_of_type(); + ::std::string* release_all_extension_numbers_of_type(); + void set_allocated_all_extension_numbers_of_type(::std::string* all_extension_numbers_of_type); + + // optional string list_services = 7; + private: + bool has_list_services() const; + public: + void clear_list_services(); + static const int kListServicesFieldNumber = 7; + const ::std::string& list_services() const; + void set_list_services(const ::std::string& value); + void set_list_services(const char* value); + void set_list_services(const char* value, size_t size); + ::std::string* mutable_list_services(); + ::std::string* release_list_services(); + void set_allocated_list_services(::std::string* list_services); + + MessageRequestCase message_request_case() const; + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.DescriptorDatabaseRequest) private: - void SharedCtor(); - void SharedDtor(); - void SetCachedSize(int size) const; - void InternalSwap(SymbolRequest* other); + inline void set_has_file_by_filename(); + inline void set_has_file_containing_symbol(); + inline void set_has_file_containing_extension(); + inline void set_has_all_extension_numbers_of_type(); + inline void set_has_list_services(); - private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { - return _internal_metadata_.arena(); - } - inline void* MaybeArenaPtr() const { - return _internal_metadata_.raw_arena_ptr(); - } + inline bool has_message_request() const; + void clear_message_request(); + inline void clear_has_message_request(); - public: - ::google::protobuf::Metadata GetMetadata() const; - - // nested types ---------------------------------------------------- - - // accessors ------------------------------------------------------- - - // optional string symbol = 1; - void clear_symbol(); - static const int kSymbolFieldNumber = 1; - const ::std::string& symbol() const; - void set_symbol(const ::std::string& value); - void set_symbol(const char* value); - void set_symbol(const char* value, size_t size); - ::std::string* mutable_symbol(); - ::std::string* release_symbol(); - void set_allocated_symbol(::std::string* symbol); - - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.SymbolRequest) - private: ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; - ::google::protobuf::internal::ArenaStringPtr symbol_; + ::google::protobuf::internal::ArenaStringPtr host_; + union MessageRequestUnion { + MessageRequestUnion() {} + ::google::protobuf::internal::ArenaStringPtr file_by_filename_; + ::google::protobuf::internal::ArenaStringPtr file_containing_symbol_; + ::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension_; + ::google::protobuf::internal::ArenaStringPtr all_extension_numbers_of_type_; + ::google::protobuf::internal::ArenaStringPtr list_services_; + } message_request_; mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); + ::google::protobuf::uint32 _oneof_case_[1]; + + friend void protobuf_AddDesc_reflection_2eproto(); friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto(); void InitAsDefaultInstance(); - static SymbolRequest* default_instance_; + static DescriptorDatabaseRequest* default_instance_; }; // ------------------------------------------------------------------- @@ -326,25 +292,22 @@ class ExtensionRequest : public ::google::protobuf::Message { ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; int GetCachedSize() const { return _cached_size_; } - - private: + private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; void InternalSwap(ExtensionRequest* other); - - private: + private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } + public: - public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- @@ -370,12 +333,13 @@ class ExtensionRequest : public ::google::protobuf::Message { // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ExtensionRequest) private: + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; ::google::protobuf::internal::ArenaStringPtr containing_type_; ::google::protobuf::int32 extension_number_; mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AddDesc_reflection_2eproto(); friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto(); @@ -384,32 +348,40 @@ class ExtensionRequest : public ::google::protobuf::Message { }; // ------------------------------------------------------------------- -class TypeRequest : public ::google::protobuf::Message { +class DescriptorDatabaseResponse : public ::google::protobuf::Message { public: - TypeRequest(); - virtual ~TypeRequest(); + DescriptorDatabaseResponse(); + virtual ~DescriptorDatabaseResponse(); - TypeRequest(const TypeRequest& from); + DescriptorDatabaseResponse(const DescriptorDatabaseResponse& from); - inline TypeRequest& operator=(const TypeRequest& from) { + inline DescriptorDatabaseResponse& operator=(const DescriptorDatabaseResponse& from) { CopyFrom(from); return *this; } static const ::google::protobuf::Descriptor* descriptor(); - static const TypeRequest& default_instance(); + static const DescriptorDatabaseResponse& default_instance(); + + enum MessageResponseCase { + kFileDescriptorProto = 4, + kAllExtensionNumbersResponse = 5, + kListServicesResponse = 6, + kErrorResponse = 7, + MESSAGE_RESPONSE_NOT_SET = 0, + }; - void Swap(TypeRequest* other); + void Swap(DescriptorDatabaseResponse* other); // implements Message ---------------------------------------------- - inline TypeRequest* New() const { return New(NULL); } + inline DescriptorDatabaseResponse* New() const { return New(NULL); } - TypeRequest* New(::google::protobuf::Arena* arena) const; + DescriptorDatabaseResponse* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const TypeRequest& from); - void MergeFrom(const TypeRequest& from); + void CopyFrom(const DescriptorDatabaseResponse& from); + void MergeFrom(const DescriptorDatabaseResponse& from); void Clear(); bool IsInitialized() const; @@ -418,83 +390,150 @@ class TypeRequest : public ::google::protobuf::Message { ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; int GetCachedSize() const { return _cached_size_; } - - private: + private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(TypeRequest* other); - - private: + void InternalSwap(DescriptorDatabaseResponse* other); + private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } + public: - public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- - // optional string type = 1; - void clear_type(); - static const int kTypeFieldNumber = 1; - const ::std::string& type() const; - void set_type(const ::std::string& value); - void set_type(const char* value); - void set_type(const char* value, size_t size); - ::std::string* mutable_type(); - ::std::string* release_type(); - void set_allocated_type(::std::string* type); - - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.TypeRequest) + // optional string valid_host = 1; + void clear_valid_host(); + static const int kValidHostFieldNumber = 1; + const ::std::string& valid_host() const; + void set_valid_host(const ::std::string& value); + void set_valid_host(const char* value); + void set_valid_host(const char* value, size_t size); + ::std::string* mutable_valid_host(); + ::std::string* release_valid_host(); + void set_allocated_valid_host(::std::string* valid_host); + + // optional .grpc.reflection.v1alpha.DescriptorDatabaseRequest original_request = 2; + bool has_original_request() const; + void clear_original_request(); + static const int kOriginalRequestFieldNumber = 2; + const ::grpc::reflection::v1alpha::DescriptorDatabaseRequest& original_request() const; + ::grpc::reflection::v1alpha::DescriptorDatabaseRequest* mutable_original_request(); + ::grpc::reflection::v1alpha::DescriptorDatabaseRequest* release_original_request(); + void set_allocated_original_request(::grpc::reflection::v1alpha::DescriptorDatabaseRequest* original_request); + + // optional bytes file_descriptor_proto = 4; + private: + bool has_file_descriptor_proto() const; + public: + void clear_file_descriptor_proto(); + static const int kFileDescriptorProtoFieldNumber = 4; + const ::std::string& file_descriptor_proto() const; + void set_file_descriptor_proto(const ::std::string& value); + void set_file_descriptor_proto(const char* value); + void set_file_descriptor_proto(const void* value, size_t size); + ::std::string* mutable_file_descriptor_proto(); + ::std::string* release_file_descriptor_proto(); + void set_allocated_file_descriptor_proto(::std::string* file_descriptor_proto); + + // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; + bool has_all_extension_numbers_response() const; + void clear_all_extension_numbers_response(); + static const int kAllExtensionNumbersResponseFieldNumber = 5; + const ::grpc::reflection::v1alpha::ExtensionNumberResponse& all_extension_numbers_response() const; + ::grpc::reflection::v1alpha::ExtensionNumberResponse* mutable_all_extension_numbers_response(); + ::grpc::reflection::v1alpha::ExtensionNumberResponse* release_all_extension_numbers_response(); + void set_allocated_all_extension_numbers_response(::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response); + + // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; + bool has_list_services_response() const; + void clear_list_services_response(); + static const int kListServicesResponseFieldNumber = 6; + const ::grpc::reflection::v1alpha::ListServiceResponse& list_services_response() const; + ::grpc::reflection::v1alpha::ListServiceResponse* mutable_list_services_response(); + ::grpc::reflection::v1alpha::ListServiceResponse* release_list_services_response(); + void set_allocated_list_services_response(::grpc::reflection::v1alpha::ListServiceResponse* list_services_response); + + // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; + bool has_error_response() const; + void clear_error_response(); + static const int kErrorResponseFieldNumber = 7; + const ::grpc::reflection::v1alpha::ErrorResponse& error_response() const; + ::grpc::reflection::v1alpha::ErrorResponse* mutable_error_response(); + ::grpc::reflection::v1alpha::ErrorResponse* release_error_response(); + void set_allocated_error_response(::grpc::reflection::v1alpha::ErrorResponse* error_response); + + MessageResponseCase message_response_case() const; + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.DescriptorDatabaseResponse) private: + inline void set_has_file_descriptor_proto(); + inline void set_has_all_extension_numbers_response(); + inline void set_has_list_services_response(); + inline void set_has_error_response(); + + inline bool has_message_response() const; + void clear_message_response(); + inline void clear_has_message_response(); + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; - ::google::protobuf::internal::ArenaStringPtr type_; + ::google::protobuf::internal::ArenaStringPtr valid_host_; + ::grpc::reflection::v1alpha::DescriptorDatabaseRequest* original_request_; + union MessageResponseUnion { + MessageResponseUnion() {} + ::google::protobuf::internal::ArenaStringPtr file_descriptor_proto_; + ::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response_; + ::grpc::reflection::v1alpha::ListServiceResponse* list_services_response_; + ::grpc::reflection::v1alpha::ErrorResponse* error_response_; + } message_response_; mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); + ::google::protobuf::uint32 _oneof_case_[1]; + + friend void protobuf_AddDesc_reflection_2eproto(); friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto(); void InitAsDefaultInstance(); - static TypeRequest* default_instance_; + static DescriptorDatabaseResponse* default_instance_; }; // ------------------------------------------------------------------- -class ListServiceResponse : public ::google::protobuf::Message { +class ExtensionNumberResponse : public ::google::protobuf::Message { public: - ListServiceResponse(); - virtual ~ListServiceResponse(); + ExtensionNumberResponse(); + virtual ~ExtensionNumberResponse(); - ListServiceResponse(const ListServiceResponse& from); + ExtensionNumberResponse(const ExtensionNumberResponse& from); - inline ListServiceResponse& operator=(const ListServiceResponse& from) { + inline ExtensionNumberResponse& operator=(const ExtensionNumberResponse& from) { CopyFrom(from); return *this; } static const ::google::protobuf::Descriptor* descriptor(); - static const ListServiceResponse& default_instance(); + static const ExtensionNumberResponse& default_instance(); - void Swap(ListServiceResponse* other); + void Swap(ExtensionNumberResponse* other); // implements Message ---------------------------------------------- - inline ListServiceResponse* New() const { return New(NULL); } + inline ExtensionNumberResponse* New() const { return New(NULL); } - ListServiceResponse* New(::google::protobuf::Arena* arena) const; + ExtensionNumberResponse* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const ListServiceResponse& from); - void MergeFrom(const ListServiceResponse& from); + void CopyFrom(const ExtensionNumberResponse& from); + void MergeFrom(const ExtensionNumberResponse& from); void Clear(); bool IsInitialized() const; @@ -503,89 +542,95 @@ class ListServiceResponse : public ::google::protobuf::Message { ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; int GetCachedSize() const { return _cached_size_; } - - private: + private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(ListServiceResponse* other); - - private: + void InternalSwap(ExtensionNumberResponse* other); + private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } + public: - public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- - // repeated string services = 1; - int services_size() const; - void clear_services(); - static const int kServicesFieldNumber = 1; - const ::std::string& services(int index) const; - ::std::string* mutable_services(int index); - void set_services(int index, const ::std::string& value); - void set_services(int index, const char* value); - void set_services(int index, const char* value, size_t size); - ::std::string* add_services(); - void add_services(const ::std::string& value); - void add_services(const char* value); - void add_services(const char* value, size_t size); - const ::google::protobuf::RepeatedPtrField< ::std::string>& services() const; - ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_services(); + // optional string base_type_name = 1; + void clear_base_type_name(); + static const int kBaseTypeNameFieldNumber = 1; + const ::std::string& base_type_name() const; + void set_base_type_name(const ::std::string& value); + void set_base_type_name(const char* value); + void set_base_type_name(const char* value, size_t size); + ::std::string* mutable_base_type_name(); + ::std::string* release_base_type_name(); + void set_allocated_base_type_name(::std::string* base_type_name); + + // repeated int32 extension_number = 2; + int extension_number_size() const; + void clear_extension_number(); + static const int kExtensionNumberFieldNumber = 2; + ::google::protobuf::int32 extension_number(int index) const; + void set_extension_number(int index, ::google::protobuf::int32 value); + void add_extension_number(::google::protobuf::int32 value); + const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + extension_number() const; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + mutable_extension_number(); - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ListServiceResponse) + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ExtensionNumberResponse) private: + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; - ::google::protobuf::RepeatedPtrField< ::std::string> services_; + ::google::protobuf::internal::ArenaStringPtr base_type_name_; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 > extension_number_; + mutable int _extension_number_cached_byte_size_; mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AddDesc_reflection_2eproto(); friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto(); void InitAsDefaultInstance(); - static ListServiceResponse* default_instance_; + static ExtensionNumberResponse* default_instance_; }; // ------------------------------------------------------------------- -class FileDescriptorProtoResponse : public ::google::protobuf::Message { +class ListServiceResponse : public ::google::protobuf::Message { public: - FileDescriptorProtoResponse(); - virtual ~FileDescriptorProtoResponse(); + ListServiceResponse(); + virtual ~ListServiceResponse(); - FileDescriptorProtoResponse(const FileDescriptorProtoResponse& from); + ListServiceResponse(const ListServiceResponse& from); - inline FileDescriptorProtoResponse& operator=( - const FileDescriptorProtoResponse& from) { + inline ListServiceResponse& operator=(const ListServiceResponse& from) { CopyFrom(from); return *this; } static const ::google::protobuf::Descriptor* descriptor(); - static const FileDescriptorProtoResponse& default_instance(); + static const ListServiceResponse& default_instance(); - void Swap(FileDescriptorProtoResponse* other); + void Swap(ListServiceResponse* other); // implements Message ---------------------------------------------- - inline FileDescriptorProtoResponse* New() const { return New(NULL); } + inline ListServiceResponse* New() const { return New(NULL); } - FileDescriptorProtoResponse* New(::google::protobuf::Arena* arena) const; + ListServiceResponse* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const FileDescriptorProtoResponse& from); - void MergeFrom(const FileDescriptorProtoResponse& from); + void CopyFrom(const ListServiceResponse& from); + void MergeFrom(const ListServiceResponse& from); void Clear(); bool IsInitialized() const; @@ -594,85 +639,86 @@ class FileDescriptorProtoResponse : public ::google::protobuf::Message { ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; int GetCachedSize() const { return _cached_size_; } - - private: + private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(FileDescriptorProtoResponse* other); - - private: + void InternalSwap(ListServiceResponse* other); + private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } + public: - public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- - // optional bytes file_descriptor_proto = 1; - void clear_file_descriptor_proto(); - static const int kFileDescriptorProtoFieldNumber = 1; - const ::std::string& file_descriptor_proto() const; - void set_file_descriptor_proto(const ::std::string& value); - void set_file_descriptor_proto(const char* value); - void set_file_descriptor_proto(const void* value, size_t size); - ::std::string* mutable_file_descriptor_proto(); - ::std::string* release_file_descriptor_proto(); - void set_allocated_file_descriptor_proto( - ::std::string* file_descriptor_proto); + // repeated string service = 1; + int service_size() const; + void clear_service(); + static const int kServiceFieldNumber = 1; + const ::std::string& service(int index) const; + ::std::string* mutable_service(int index); + void set_service(int index, const ::std::string& value); + void set_service(int index, const char* value); + void set_service(int index, const char* value, size_t size); + ::std::string* add_service(); + void add_service(const ::std::string& value); + void add_service(const char* value); + void add_service(const char* value, size_t size); + const ::google::protobuf::RepeatedPtrField< ::std::string>& service() const; + ::google::protobuf::RepeatedPtrField< ::std::string>* mutable_service(); - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ListServiceResponse) private: + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; - ::google::protobuf::internal::ArenaStringPtr file_descriptor_proto_; + ::google::protobuf::RepeatedPtrField< ::std::string> service_; mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AddDesc_reflection_2eproto(); friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto(); void InitAsDefaultInstance(); - static FileDescriptorProtoResponse* default_instance_; + static ListServiceResponse* default_instance_; }; // ------------------------------------------------------------------- -class ExtensionNumberResponse : public ::google::protobuf::Message { +class ErrorResponse : public ::google::protobuf::Message { public: - ExtensionNumberResponse(); - virtual ~ExtensionNumberResponse(); + ErrorResponse(); + virtual ~ErrorResponse(); - ExtensionNumberResponse(const ExtensionNumberResponse& from); + ErrorResponse(const ErrorResponse& from); - inline ExtensionNumberResponse& operator=( - const ExtensionNumberResponse& from) { + inline ErrorResponse& operator=(const ErrorResponse& from) { CopyFrom(from); return *this; } static const ::google::protobuf::Descriptor* descriptor(); - static const ExtensionNumberResponse& default_instance(); + static const ErrorResponse& default_instance(); - void Swap(ExtensionNumberResponse* other); + void Swap(ErrorResponse* other); // implements Message ---------------------------------------------- - inline ExtensionNumberResponse* New() const { return New(NULL); } + inline ErrorResponse* New() const { return New(NULL); } - ExtensionNumberResponse* New(::google::protobuf::Arena* arena) const; + ErrorResponse* New(::google::protobuf::Arena* arena) const; void CopyFrom(const ::google::protobuf::Message& from); void MergeFrom(const ::google::protobuf::Message& from); - void CopyFrom(const ExtensionNumberResponse& from); - void MergeFrom(const ExtensionNumberResponse& from); + void CopyFrom(const ErrorResponse& from); + void MergeFrom(const ErrorResponse& from); void Clear(); bool IsInitialized() const; @@ -681,212 +727,531 @@ class ExtensionNumberResponse : public ::google::protobuf::Message { ::google::protobuf::io::CodedInputStream* input); void SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const; - ::google::protobuf::uint8* SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* output) const; + ::google::protobuf::uint8* SerializeWithCachedSizesToArray(::google::protobuf::uint8* output) const; int GetCachedSize() const { return _cached_size_; } - - private: + private: void SharedCtor(); void SharedDtor(); void SetCachedSize(int size) const; - void InternalSwap(ExtensionNumberResponse* other); - - private: + void InternalSwap(ErrorResponse* other); + private: inline ::google::protobuf::Arena* GetArenaNoVirtual() const { return _internal_metadata_.arena(); } inline void* MaybeArenaPtr() const { return _internal_metadata_.raw_arena_ptr(); } + public: - public: ::google::protobuf::Metadata GetMetadata() const; // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- - // repeated int32 extension_number = 1; - int extension_number_size() const; - void clear_extension_number(); - static const int kExtensionNumberFieldNumber = 1; - ::google::protobuf::int32 extension_number(int index) const; - void set_extension_number(int index, ::google::protobuf::int32 value); - void add_extension_number(::google::protobuf::int32 value); - const ::google::protobuf::RepeatedField< ::google::protobuf::int32>& - extension_number() const; - ::google::protobuf::RepeatedField< ::google::protobuf::int32>* - mutable_extension_number(); - - // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ExtensionNumberResponse) + // optional int32 error_code = 1; + void clear_error_code(); + static const int kErrorCodeFieldNumber = 1; + ::google::protobuf::int32 error_code() const; + void set_error_code(::google::protobuf::int32 value); + + // optional string error_message = 2; + void clear_error_message(); + static const int kErrorMessageFieldNumber = 2; + const ::std::string& error_message() const; + void set_error_message(const ::std::string& value); + void set_error_message(const char* value); + void set_error_message(const char* value, size_t size); + ::std::string* mutable_error_message(); + ::std::string* release_error_message(); + void set_allocated_error_message(::std::string* error_message); + + // @@protoc_insertion_point(class_scope:grpc.reflection.v1alpha.ErrorResponse) private: + ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; bool _is_default_instance_; - ::google::protobuf::RepeatedField< ::google::protobuf::int32> - extension_number_; - mutable int _extension_number_cached_byte_size_; + ::google::protobuf::internal::ArenaStringPtr error_message_; + ::google::protobuf::int32 error_code_; mutable int _cached_size_; - friend void protobuf_AddDesc_reflection_2eproto(); + friend void protobuf_AddDesc_reflection_2eproto(); friend void protobuf_AssignDesc_reflection_2eproto(); friend void protobuf_ShutdownFile_reflection_2eproto(); void InitAsDefaultInstance(); - static ExtensionNumberResponse* default_instance_; + static ErrorResponse* default_instance_; }; // =================================================================== + // =================================================================== #if !PROTOBUF_INLINE_NOT_IN_HEADERS -// EmptyRequest +// DescriptorDatabaseRequest -// ------------------------------------------------------------------- - -// FileNameRequest - -// optional string filename = 1; -inline void FileNameRequest::clear_filename() { - filename_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +// optional string host = 1; +inline void DescriptorDatabaseRequest::clear_host() { + host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& FileNameRequest::filename() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.FileNameRequest.filename) - return filename_.GetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline const ::std::string& DescriptorDatabaseRequest::host() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) + return host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline void FileNameRequest::set_filename(const ::std::string& value) { - filename_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.FileNameRequest.filename) +inline void DescriptorDatabaseRequest::set_host(const ::std::string& value) { + + host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) } -inline void FileNameRequest::set_filename(const char* value) { - filename_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.FileNameRequest.filename) +inline void DescriptorDatabaseRequest::set_host(const char* value) { + + host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) } -inline void FileNameRequest::set_filename(const char* value, size_t size) { - filename_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), +inline void DescriptorDatabaseRequest::set_host(const char* value, size_t size) { + + host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.FileNameRequest.filename) + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) } -inline ::std::string* FileNameRequest::mutable_filename() { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.FileNameRequest.filename) - return filename_.MutableNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline ::std::string* DescriptorDatabaseRequest::mutable_host() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) + return host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* FileNameRequest::release_filename() { - return filename_.ReleaseNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline ::std::string* DescriptorDatabaseRequest::release_host() { + + return host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline void FileNameRequest::set_allocated_filename(::std::string* filename) { - if (filename != NULL) { +inline void DescriptorDatabaseRequest::set_allocated_host(::std::string* host) { + if (host != NULL) { + } else { + } - filename_.SetAllocatedNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), filename); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.FileNameRequest.filename) + host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), host); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) } -// ------------------------------------------------------------------- +// optional string file_by_filename = 3; +inline bool DescriptorDatabaseRequest::has_file_by_filename() const { + return message_request_case() == kFileByFilename; +} +inline void DescriptorDatabaseRequest::set_has_file_by_filename() { + _oneof_case_[0] = kFileByFilename; +} +inline void DescriptorDatabaseRequest::clear_file_by_filename() { + if (has_file_by_filename()) { + message_request_.file_by_filename_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } +} +inline const ::std::string& DescriptorDatabaseRequest::file_by_filename() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) + if (has_file_by_filename()) { + return message_request_.file_by_filename_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} +inline void DescriptorDatabaseRequest::set_file_by_filename(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) +} +inline void DescriptorDatabaseRequest::set_file_by_filename(const char* value) { + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) +} +inline void DescriptorDatabaseRequest::set_file_by_filename(const char* value, size_t size) { + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) +} +inline ::std::string* DescriptorDatabaseRequest::mutable_file_by_filename() { + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) + return message_request_.file_by_filename_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* DescriptorDatabaseRequest::release_file_by_filename() { + if (has_file_by_filename()) { + clear_has_message_request(); + return message_request_.file_by_filename_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } +} +inline void DescriptorDatabaseRequest::set_allocated_file_by_filename(::std::string* file_by_filename) { + if (!has_file_by_filename()) { + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (file_by_filename != NULL) { + set_has_file_by_filename(); + message_request_.file_by_filename_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + file_by_filename); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) +} + +// optional string file_containing_symbol = 4; +inline bool DescriptorDatabaseRequest::has_file_containing_symbol() const { + return message_request_case() == kFileContainingSymbol; +} +inline void DescriptorDatabaseRequest::set_has_file_containing_symbol() { + _oneof_case_[0] = kFileContainingSymbol; +} +inline void DescriptorDatabaseRequest::clear_file_containing_symbol() { + if (has_file_containing_symbol()) { + message_request_.file_containing_symbol_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } +} +inline const ::std::string& DescriptorDatabaseRequest::file_containing_symbol() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) + if (has_file_containing_symbol()) { + return message_request_.file_containing_symbol_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} +inline void DescriptorDatabaseRequest::set_file_containing_symbol(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) +} +inline void DescriptorDatabaseRequest::set_file_containing_symbol(const char* value) { + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) +} +inline void DescriptorDatabaseRequest::set_file_containing_symbol(const char* value, size_t size) { + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) +} +inline ::std::string* DescriptorDatabaseRequest::mutable_file_containing_symbol() { + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) + return message_request_.file_containing_symbol_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* DescriptorDatabaseRequest::release_file_containing_symbol() { + if (has_file_containing_symbol()) { + clear_has_message_request(); + return message_request_.file_containing_symbol_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } +} +inline void DescriptorDatabaseRequest::set_allocated_file_containing_symbol(::std::string* file_containing_symbol) { + if (!has_file_containing_symbol()) { + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (file_containing_symbol != NULL) { + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + file_containing_symbol); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) +} -// SymbolRequest +// optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; +inline bool DescriptorDatabaseRequest::has_file_containing_extension() const { + return message_request_case() == kFileContainingExtension; +} +inline void DescriptorDatabaseRequest::set_has_file_containing_extension() { + _oneof_case_[0] = kFileContainingExtension; +} +inline void DescriptorDatabaseRequest::clear_file_containing_extension() { + if (has_file_containing_extension()) { + delete message_request_.file_containing_extension_; + clear_has_message_request(); + } +} +inline const ::grpc::reflection::v1alpha::ExtensionRequest& DescriptorDatabaseRequest::file_containing_extension() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_extension) + return has_file_containing_extension() + ? *message_request_.file_containing_extension_ + : ::grpc::reflection::v1alpha::ExtensionRequest::default_instance(); +} +inline ::grpc::reflection::v1alpha::ExtensionRequest* DescriptorDatabaseRequest::mutable_file_containing_extension() { + if (!has_file_containing_extension()) { + clear_message_request(); + set_has_file_containing_extension(); + message_request_.file_containing_extension_ = new ::grpc::reflection::v1alpha::ExtensionRequest; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_extension) + return message_request_.file_containing_extension_; +} +inline ::grpc::reflection::v1alpha::ExtensionRequest* DescriptorDatabaseRequest::release_file_containing_extension() { + if (has_file_containing_extension()) { + clear_has_message_request(); + ::grpc::reflection::v1alpha::ExtensionRequest* temp = message_request_.file_containing_extension_; + message_request_.file_containing_extension_ = NULL; + return temp; + } else { + return NULL; + } +} +inline void DescriptorDatabaseRequest::set_allocated_file_containing_extension(::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension) { + clear_message_request(); + if (file_containing_extension) { + set_has_file_containing_extension(); + message_request_.file_containing_extension_ = file_containing_extension; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_extension) +} -// optional string symbol = 1; -inline void SymbolRequest::clear_symbol() { - symbol_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +// optional string all_extension_numbers_of_type = 6; +inline bool DescriptorDatabaseRequest::has_all_extension_numbers_of_type() const { + return message_request_case() == kAllExtensionNumbersOfType; +} +inline void DescriptorDatabaseRequest::set_has_all_extension_numbers_of_type() { + _oneof_case_[0] = kAllExtensionNumbersOfType; +} +inline void DescriptorDatabaseRequest::clear_all_extension_numbers_of_type() { + if (has_all_extension_numbers_of_type()) { + message_request_.all_extension_numbers_of_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } } -inline const ::std::string& SymbolRequest::symbol() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.SymbolRequest.symbol) - return symbol_.GetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline const ::std::string& DescriptorDatabaseRequest::all_extension_numbers_of_type() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) + if (has_all_extension_numbers_of_type()) { + return message_request_.all_extension_numbers_of_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } -inline void SymbolRequest::set_symbol(const ::std::string& value) { - symbol_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.SymbolRequest.symbol) +inline void DescriptorDatabaseRequest::set_all_extension_numbers_of_type(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) } -inline void SymbolRequest::set_symbol(const char* value) { - symbol_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), +inline void DescriptorDatabaseRequest::set_all_extension_numbers_of_type(const char* value) { + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.SymbolRequest.symbol) + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) } -inline void SymbolRequest::set_symbol(const char* value, size_t size) { - symbol_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.SymbolRequest.symbol) +inline void DescriptorDatabaseRequest::set_all_extension_numbers_of_type(const char* value, size_t size) { + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) +} +inline ::std::string* DescriptorDatabaseRequest::mutable_all_extension_numbers_of_type() { + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) + return message_request_.all_extension_numbers_of_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* SymbolRequest::mutable_symbol() { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.SymbolRequest.symbol) - return symbol_.MutableNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline ::std::string* DescriptorDatabaseRequest::release_all_extension_numbers_of_type() { + if (has_all_extension_numbers_of_type()) { + clear_has_message_request(); + return message_request_.all_extension_numbers_of_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } +} +inline void DescriptorDatabaseRequest::set_allocated_all_extension_numbers_of_type(::std::string* all_extension_numbers_of_type) { + if (!has_all_extension_numbers_of_type()) { + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (all_extension_numbers_of_type != NULL) { + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + all_extension_numbers_of_type); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) +} + +// optional string list_services = 7; +inline bool DescriptorDatabaseRequest::has_list_services() const { + return message_request_case() == kListServices; +} +inline void DescriptorDatabaseRequest::set_has_list_services() { + _oneof_case_[0] = kListServices; +} +inline void DescriptorDatabaseRequest::clear_list_services() { + if (has_list_services()) { + message_request_.list_services_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } +} +inline const ::std::string& DescriptorDatabaseRequest::list_services() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) + if (has_list_services()) { + return message_request_.list_services_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} +inline void DescriptorDatabaseRequest::set_list_services(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) } -inline ::std::string* SymbolRequest::release_symbol() { - return symbol_.ReleaseNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline void DescriptorDatabaseRequest::set_list_services(const char* value) { + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) +} +inline void DescriptorDatabaseRequest::set_list_services(const char* value, size_t size) { + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) } -inline void SymbolRequest::set_allocated_symbol(::std::string* symbol) { - if (symbol != NULL) { +inline ::std::string* DescriptorDatabaseRequest::mutable_list_services() { + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) + return message_request_.list_services_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* DescriptorDatabaseRequest::release_list_services() { + if (has_list_services()) { + clear_has_message_request(); + return message_request_.list_services_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } else { + return NULL; + } +} +inline void DescriptorDatabaseRequest::set_allocated_list_services(::std::string* list_services) { + if (!has_list_services()) { + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (list_services != NULL) { + set_has_list_services(); + message_request_.list_services_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + list_services); } - symbol_.SetAllocatedNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), symbol); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.SymbolRequest.symbol) + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) } +inline bool DescriptorDatabaseRequest::has_message_request() const { + return message_request_case() != MESSAGE_REQUEST_NOT_SET; +} +inline void DescriptorDatabaseRequest::clear_has_message_request() { + _oneof_case_[0] = MESSAGE_REQUEST_NOT_SET; +} +inline DescriptorDatabaseRequest::MessageRequestCase DescriptorDatabaseRequest::message_request_case() const { + return DescriptorDatabaseRequest::MessageRequestCase(_oneof_case_[0]); +} // ------------------------------------------------------------------- // ExtensionRequest // optional string containing_type = 1; inline void ExtensionRequest::clear_containing_type() { - containing_type_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + containing_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline const ::std::string& ExtensionRequest::containing_type() const { // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.containing_type) - return containing_type_.GetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return containing_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline void ExtensionRequest::set_containing_type(const ::std::string& value) { - containing_type_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + + containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.containing_type) } inline void ExtensionRequest::set_containing_type(const char* value) { - containing_type_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); + + containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionRequest.containing_type) } -inline void ExtensionRequest::set_containing_type(const char* value, - size_t size) { - containing_type_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), +inline void ExtensionRequest::set_containing_type(const char* value, size_t size) { + + containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionRequest.containing_type) } inline ::std::string* ExtensionRequest::mutable_containing_type() { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionRequest.containing_type) - return containing_type_.MutableNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return containing_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } inline ::std::string* ExtensionRequest::release_containing_type() { - return containing_type_.ReleaseNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + + return containing_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline void ExtensionRequest::set_allocated_containing_type( - ::std::string* containing_type) { +inline void ExtensionRequest::set_allocated_containing_type(::std::string* containing_type) { if (containing_type != NULL) { + } else { + } - containing_type_.SetAllocatedNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - containing_type); + containing_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), containing_type); // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionRequest.containing_type) } @@ -898,215 +1263,523 @@ inline ::google::protobuf::int32 ExtensionRequest::extension_number() const { // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.extension_number) return extension_number_; } -inline void ExtensionRequest::set_extension_number( - ::google::protobuf::int32 value) { +inline void ExtensionRequest::set_extension_number(::google::protobuf::int32 value) { + extension_number_ = value; // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.extension_number) } // ------------------------------------------------------------------- -// TypeRequest +// DescriptorDatabaseResponse -// optional string type = 1; -inline void TypeRequest::clear_type() { - type_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +// optional string valid_host = 1; +inline void DescriptorDatabaseResponse::clear_valid_host() { + valid_host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& TypeRequest::type() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.TypeRequest.type) - return type_.GetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline const ::std::string& DescriptorDatabaseResponse::valid_host() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) + return valid_host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline void TypeRequest::set_type(const ::std::string& value) { - type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.TypeRequest.type) +inline void DescriptorDatabaseResponse::set_valid_host(const ::std::string& value) { + + valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) } -inline void TypeRequest::set_type(const char* value) { - type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.TypeRequest.type) +inline void DescriptorDatabaseResponse::set_valid_host(const char* value) { + + valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) } -inline void TypeRequest::set_type(const char* value, size_t size) { - type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.TypeRequest.type) +inline void DescriptorDatabaseResponse::set_valid_host(const char* value, size_t size) { + + valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) } -inline ::std::string* TypeRequest::mutable_type() { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.TypeRequest.type) - return type_.MutableNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline ::std::string* DescriptorDatabaseResponse::mutable_valid_host() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) + return valid_host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* TypeRequest::release_type() { - return type_.ReleaseNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline ::std::string* DescriptorDatabaseResponse::release_valid_host() { + + return valid_host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline void TypeRequest::set_allocated_type(::std::string* type) { - if (type != NULL) { +inline void DescriptorDatabaseResponse::set_allocated_valid_host(::std::string* valid_host) { + if (valid_host != NULL) { + } else { + } - type_.SetAllocatedNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), type); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.TypeRequest.type) + valid_host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), valid_host); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) } -// ------------------------------------------------------------------- - -// ListServiceResponse +// optional .grpc.reflection.v1alpha.DescriptorDatabaseRequest original_request = 2; +inline bool DescriptorDatabaseResponse::has_original_request() const { + return !_is_default_instance_ && original_request_ != NULL; +} +inline void DescriptorDatabaseResponse::clear_original_request() { + if (GetArenaNoVirtual() == NULL && original_request_ != NULL) delete original_request_; + original_request_ = NULL; +} +inline const ::grpc::reflection::v1alpha::DescriptorDatabaseRequest& DescriptorDatabaseResponse::original_request() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.original_request) + return original_request_ != NULL ? *original_request_ : *default_instance_->original_request_; +} +inline ::grpc::reflection::v1alpha::DescriptorDatabaseRequest* DescriptorDatabaseResponse::mutable_original_request() { + + if (original_request_ == NULL) { + original_request_ = new ::grpc::reflection::v1alpha::DescriptorDatabaseRequest; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.original_request) + return original_request_; +} +inline ::grpc::reflection::v1alpha::DescriptorDatabaseRequest* DescriptorDatabaseResponse::release_original_request() { + + ::grpc::reflection::v1alpha::DescriptorDatabaseRequest* temp = original_request_; + original_request_ = NULL; + return temp; +} +inline void DescriptorDatabaseResponse::set_allocated_original_request(::grpc::reflection::v1alpha::DescriptorDatabaseRequest* original_request) { + delete original_request_; + original_request_ = original_request; + if (original_request) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.original_request) +} -// repeated string services = 1; -inline int ListServiceResponse::services_size() const { - return services_.size(); +// optional bytes file_descriptor_proto = 4; +inline bool DescriptorDatabaseResponse::has_file_descriptor_proto() const { + return message_response_case() == kFileDescriptorProto; +} +inline void DescriptorDatabaseResponse::set_has_file_descriptor_proto() { + _oneof_case_[0] = kFileDescriptorProto; } -inline void ListServiceResponse::clear_services() { services_.Clear(); } -inline const ::std::string& ListServiceResponse::services(int index) const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ListServiceResponse.services) - return services_.Get(index); +inline void DescriptorDatabaseResponse::clear_file_descriptor_proto() { + if (has_file_descriptor_proto()) { + message_response_.file_descriptor_proto_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_response(); + } } -inline ::std::string* ListServiceResponse::mutable_services(int index) { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ListServiceResponse.services) - return services_.Mutable(index); +inline const ::std::string& DescriptorDatabaseResponse::file_descriptor_proto() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) + if (has_file_descriptor_proto()) { + return message_response_.file_descriptor_proto_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } -inline void ListServiceResponse::set_services(int index, - const ::std::string& value) { - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ListServiceResponse.services) - services_.Mutable(index)->assign(value); +inline void DescriptorDatabaseResponse::set_file_descriptor_proto(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) + if (!has_file_descriptor_proto()) { + clear_message_response(); + set_has_file_descriptor_proto(); + message_response_.file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_response_.file_descriptor_proto_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) } -inline void ListServiceResponse::set_services(int index, const char* value) { - services_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ListServiceResponse.services) +inline void DescriptorDatabaseResponse::set_file_descriptor_proto(const char* value) { + if (!has_file_descriptor_proto()) { + clear_message_response(); + set_has_file_descriptor_proto(); + message_response_.file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_response_.file_descriptor_proto_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) } -inline void ListServiceResponse::set_services(int index, const char* value, - size_t size) { - services_.Mutable(index)->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ListServiceResponse.services) +inline void DescriptorDatabaseResponse::set_file_descriptor_proto(const void* value, size_t size) { + if (!has_file_descriptor_proto()) { + clear_message_response(); + set_has_file_descriptor_proto(); + message_response_.file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_response_.file_descriptor_proto_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) } -inline ::std::string* ListServiceResponse::add_services() { - return services_.Add(); +inline ::std::string* DescriptorDatabaseResponse::mutable_file_descriptor_proto() { + if (!has_file_descriptor_proto()) { + clear_message_response(); + set_has_file_descriptor_proto(); + message_response_.file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) + return message_response_.file_descriptor_proto_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -inline void ListServiceResponse::add_services(const ::std::string& value) { - services_.Add()->assign(value); - // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ListServiceResponse.services) +inline ::std::string* DescriptorDatabaseResponse::release_file_descriptor_proto() { + if (has_file_descriptor_proto()) { + clear_has_message_response(); + return message_response_.file_descriptor_proto_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } } -inline void ListServiceResponse::add_services(const char* value) { - services_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:grpc.reflection.v1alpha.ListServiceResponse.services) +inline void DescriptorDatabaseResponse::set_allocated_file_descriptor_proto(::std::string* file_descriptor_proto) { + if (!has_file_descriptor_proto()) { + message_response_.file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_response(); + if (file_descriptor_proto != NULL) { + set_has_file_descriptor_proto(); + message_response_.file_descriptor_proto_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + file_descriptor_proto); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) } -inline void ListServiceResponse::add_services(const char* value, size_t size) { - services_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:grpc.reflection.v1alpha.ListServiceResponse.services) + +// optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; +inline bool DescriptorDatabaseResponse::has_all_extension_numbers_response() const { + return message_response_case() == kAllExtensionNumbersResponse; } -inline const ::google::protobuf::RepeatedPtrField< ::std::string>& -ListServiceResponse::services() const { - // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ListServiceResponse.services) - return services_; +inline void DescriptorDatabaseResponse::set_has_all_extension_numbers_response() { + _oneof_case_[0] = kAllExtensionNumbersResponse; } -inline ::google::protobuf::RepeatedPtrField< ::std::string>* -ListServiceResponse::mutable_services() { - // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ListServiceResponse.services) - return &services_; +inline void DescriptorDatabaseResponse::clear_all_extension_numbers_response() { + if (has_all_extension_numbers_response()) { + delete message_response_.all_extension_numbers_response_; + clear_has_message_response(); + } +} +inline const ::grpc::reflection::v1alpha::ExtensionNumberResponse& DescriptorDatabaseResponse::all_extension_numbers_response() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.all_extension_numbers_response) + return has_all_extension_numbers_response() + ? *message_response_.all_extension_numbers_response_ + : ::grpc::reflection::v1alpha::ExtensionNumberResponse::default_instance(); +} +inline ::grpc::reflection::v1alpha::ExtensionNumberResponse* DescriptorDatabaseResponse::mutable_all_extension_numbers_response() { + if (!has_all_extension_numbers_response()) { + clear_message_response(); + set_has_all_extension_numbers_response(); + message_response_.all_extension_numbers_response_ = new ::grpc::reflection::v1alpha::ExtensionNumberResponse; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.all_extension_numbers_response) + return message_response_.all_extension_numbers_response_; +} +inline ::grpc::reflection::v1alpha::ExtensionNumberResponse* DescriptorDatabaseResponse::release_all_extension_numbers_response() { + if (has_all_extension_numbers_response()) { + clear_has_message_response(); + ::grpc::reflection::v1alpha::ExtensionNumberResponse* temp = message_response_.all_extension_numbers_response_; + message_response_.all_extension_numbers_response_ = NULL; + return temp; + } else { + return NULL; + } +} +inline void DescriptorDatabaseResponse::set_allocated_all_extension_numbers_response(::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response) { + clear_message_response(); + if (all_extension_numbers_response) { + set_has_all_extension_numbers_response(); + message_response_.all_extension_numbers_response_ = all_extension_numbers_response; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.all_extension_numbers_response) } -// ------------------------------------------------------------------- +// optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; +inline bool DescriptorDatabaseResponse::has_list_services_response() const { + return message_response_case() == kListServicesResponse; +} +inline void DescriptorDatabaseResponse::set_has_list_services_response() { + _oneof_case_[0] = kListServicesResponse; +} +inline void DescriptorDatabaseResponse::clear_list_services_response() { + if (has_list_services_response()) { + delete message_response_.list_services_response_; + clear_has_message_response(); + } +} +inline const ::grpc::reflection::v1alpha::ListServiceResponse& DescriptorDatabaseResponse::list_services_response() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.list_services_response) + return has_list_services_response() + ? *message_response_.list_services_response_ + : ::grpc::reflection::v1alpha::ListServiceResponse::default_instance(); +} +inline ::grpc::reflection::v1alpha::ListServiceResponse* DescriptorDatabaseResponse::mutable_list_services_response() { + if (!has_list_services_response()) { + clear_message_response(); + set_has_list_services_response(); + message_response_.list_services_response_ = new ::grpc::reflection::v1alpha::ListServiceResponse; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.list_services_response) + return message_response_.list_services_response_; +} +inline ::grpc::reflection::v1alpha::ListServiceResponse* DescriptorDatabaseResponse::release_list_services_response() { + if (has_list_services_response()) { + clear_has_message_response(); + ::grpc::reflection::v1alpha::ListServiceResponse* temp = message_response_.list_services_response_; + message_response_.list_services_response_ = NULL; + return temp; + } else { + return NULL; + } +} +inline void DescriptorDatabaseResponse::set_allocated_list_services_response(::grpc::reflection::v1alpha::ListServiceResponse* list_services_response) { + clear_message_response(); + if (list_services_response) { + set_has_list_services_response(); + message_response_.list_services_response_ = list_services_response; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.list_services_response) +} -// FileDescriptorProtoResponse - -// optional bytes file_descriptor_proto = 1; -inline void FileDescriptorProtoResponse::clear_file_descriptor_proto() { - file_descriptor_proto_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline const ::std::string& FileDescriptorProtoResponse::file_descriptor_proto() - const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) - return file_descriptor_proto_.GetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -inline void FileDescriptorProtoResponse::set_file_descriptor_proto( - const ::std::string& value) { - file_descriptor_proto_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) -} -inline void FileDescriptorProtoResponse::set_file_descriptor_proto( - const char* value) { - file_descriptor_proto_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) +// optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; +inline bool DescriptorDatabaseResponse::has_error_response() const { + return message_response_case() == kErrorResponse; } -inline void FileDescriptorProtoResponse::set_file_descriptor_proto( - const void* value, size_t size) { - file_descriptor_proto_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) +inline void DescriptorDatabaseResponse::set_has_error_response() { + _oneof_case_[0] = kErrorResponse; } -inline ::std::string* -FileDescriptorProtoResponse::mutable_file_descriptor_proto() { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) - return file_descriptor_proto_.MutableNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline void DescriptorDatabaseResponse::clear_error_response() { + if (has_error_response()) { + delete message_response_.error_response_; + clear_has_message_response(); + } } -inline ::std::string* -FileDescriptorProtoResponse::release_file_descriptor_proto() { - return file_descriptor_proto_.ReleaseNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +inline const ::grpc::reflection::v1alpha::ErrorResponse& DescriptorDatabaseResponse::error_response() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.error_response) + return has_error_response() + ? *message_response_.error_response_ + : ::grpc::reflection::v1alpha::ErrorResponse::default_instance(); } -inline void FileDescriptorProtoResponse::set_allocated_file_descriptor_proto( - ::std::string* file_descriptor_proto) { - if (file_descriptor_proto != NULL) { +inline ::grpc::reflection::v1alpha::ErrorResponse* DescriptorDatabaseResponse::mutable_error_response() { + if (!has_error_response()) { + clear_message_response(); + set_has_error_response(); + message_response_.error_response_ = new ::grpc::reflection::v1alpha::ErrorResponse; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.error_response) + return message_response_.error_response_; +} +inline ::grpc::reflection::v1alpha::ErrorResponse* DescriptorDatabaseResponse::release_error_response() { + if (has_error_response()) { + clear_has_message_response(); + ::grpc::reflection::v1alpha::ErrorResponse* temp = message_response_.error_response_; + message_response_.error_response_ = NULL; + return temp; } else { + return NULL; } - file_descriptor_proto_.SetAllocatedNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - file_descriptor_proto); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) +} +inline void DescriptorDatabaseResponse::set_allocated_error_response(::grpc::reflection::v1alpha::ErrorResponse* error_response) { + clear_message_response(); + if (error_response) { + set_has_error_response(); + message_response_.error_response_ = error_response; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.error_response) } +inline bool DescriptorDatabaseResponse::has_message_response() const { + return message_response_case() != MESSAGE_RESPONSE_NOT_SET; +} +inline void DescriptorDatabaseResponse::clear_has_message_response() { + _oneof_case_[0] = MESSAGE_RESPONSE_NOT_SET; +} +inline DescriptorDatabaseResponse::MessageResponseCase DescriptorDatabaseResponse::message_response_case() const { + return DescriptorDatabaseResponse::MessageResponseCase(_oneof_case_[0]); +} // ------------------------------------------------------------------- // ExtensionNumberResponse -// repeated int32 extension_number = 1; +// optional string base_type_name = 1; +inline void ExtensionNumberResponse::clear_base_type_name() { + base_type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& ExtensionNumberResponse::base_type_name() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) + return base_type_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ExtensionNumberResponse::set_base_type_name(const ::std::string& value) { + + base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) +} +inline void ExtensionNumberResponse::set_base_type_name(const char* value) { + + base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) +} +inline void ExtensionNumberResponse::set_base_type_name(const char* value, size_t size) { + + base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) +} +inline ::std::string* ExtensionNumberResponse::mutable_base_type_name() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) + return base_type_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ExtensionNumberResponse::release_base_type_name() { + + return base_type_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ExtensionNumberResponse::set_allocated_base_type_name(::std::string* base_type_name) { + if (base_type_name != NULL) { + + } else { + + } + base_type_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), base_type_name); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) +} + +// repeated int32 extension_number = 2; inline int ExtensionNumberResponse::extension_number_size() const { return extension_number_.size(); } inline void ExtensionNumberResponse::clear_extension_number() { extension_number_.Clear(); } -inline ::google::protobuf::int32 ExtensionNumberResponse::extension_number( - int index) const { +inline ::google::protobuf::int32 ExtensionNumberResponse::extension_number(int index) const { // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) return extension_number_.Get(index); } -inline void ExtensionNumberResponse::set_extension_number( - int index, ::google::protobuf::int32 value) { +inline void ExtensionNumberResponse::set_extension_number(int index, ::google::protobuf::int32 value) { extension_number_.Set(index, value); // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) } -inline void ExtensionNumberResponse::add_extension_number( - ::google::protobuf::int32 value) { +inline void ExtensionNumberResponse::add_extension_number(::google::protobuf::int32 value) { extension_number_.Add(value); // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) } -inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32>& +inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& ExtensionNumberResponse::extension_number() const { // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) return extension_number_; } -inline ::google::protobuf::RepeatedField< ::google::protobuf::int32>* +inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* ExtensionNumberResponse::mutable_extension_number() { // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) return &extension_number_; } -#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // ------------------------------------------------------------------- +// ListServiceResponse + +// repeated string service = 1; +inline int ListServiceResponse::service_size() const { + return service_.size(); +} +inline void ListServiceResponse::clear_service() { + service_.Clear(); +} +inline const ::std::string& ListServiceResponse::service(int index) const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ListServiceResponse.service) + return service_.Get(index); +} +inline ::std::string* ListServiceResponse::mutable_service(int index) { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ListServiceResponse.service) + return service_.Mutable(index); +} +inline void ListServiceResponse::set_service(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ListServiceResponse.service) + service_.Mutable(index)->assign(value); +} +inline void ListServiceResponse::set_service(int index, const char* value) { + service_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ListServiceResponse.service) +} +inline void ListServiceResponse::set_service(int index, const char* value, size_t size) { + service_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ListServiceResponse.service) +} +inline ::std::string* ListServiceResponse::add_service() { + return service_.Add(); +} +inline void ListServiceResponse::add_service(const ::std::string& value) { + service_.Add()->assign(value); + // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ListServiceResponse.service) +} +inline void ListServiceResponse::add_service(const char* value) { + service_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:grpc.reflection.v1alpha.ListServiceResponse.service) +} +inline void ListServiceResponse::add_service(const char* value, size_t size) { + service_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:grpc.reflection.v1alpha.ListServiceResponse.service) +} +inline const ::google::protobuf::RepeatedPtrField< ::std::string>& +ListServiceResponse::service() const { + // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ListServiceResponse.service) + return service_; +} +inline ::google::protobuf::RepeatedPtrField< ::std::string>* +ListServiceResponse::mutable_service() { + // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ListServiceResponse.service) + return &service_; +} + // ------------------------------------------------------------------- +// ErrorResponse + +// optional int32 error_code = 1; +inline void ErrorResponse::clear_error_code() { + error_code_ = 0; +} +inline ::google::protobuf::int32 ErrorResponse::error_code() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_code) + return error_code_; +} +inline void ErrorResponse::set_error_code(::google::protobuf::int32 value) { + + error_code_ = value; + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_code) +} + +// optional string error_message = 2; +inline void ErrorResponse::clear_error_message() { + error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline const ::std::string& ErrorResponse::error_message() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_message) + return error_message_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ErrorResponse::set_error_message(const ::std::string& value) { + + error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_message) +} +inline void ErrorResponse::set_error_message(const char* value) { + + error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ErrorResponse.error_message) +} +inline void ErrorResponse::set_error_message(const char* value, size_t size) { + + error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ErrorResponse.error_message) +} +inline ::std::string* ErrorResponse::mutable_error_message() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ErrorResponse.error_message) + return error_message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline ::std::string* ErrorResponse::release_error_message() { + + return error_message_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} +inline void ErrorResponse::set_allocated_error_message(::std::string* error_message) { + if (error_message != NULL) { + + } else { + + } + error_message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), error_message); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ErrorResponse.error_message) +} + +#endif // !PROTOBUF_INLINE_NOT_IN_HEADERS // ------------------------------------------------------------------- // ------------------------------------------------------------------- @@ -1117,6 +1790,7 @@ ExtensionNumberResponse::mutable_extension_number() { // ------------------------------------------------------------------- + // @@protoc_insertion_point(namespace_scope) } // namespace v1alpha diff --git a/extensions/reflection/proto_server_reflection.cc b/extensions/reflection/proto_server_reflection.cc index 0662bb595a1..1befb1d2f5b 100644 --- a/extensions/reflection/proto_server_reflection.cc +++ b/extensions/reflection/proto_server_reflection.cc @@ -51,14 +51,12 @@ using google::protobuf::FileDescriptor; using google::protobuf::FieldDescriptor; using google::protobuf::DescriptorPool; using google::protobuf::FileDescriptorProto; -using grpc::reflection::v1alpha::EmptyRequest; -using grpc::reflection::v1alpha::ListServiceResponse; -using grpc::reflection::v1alpha::FileNameRequest; -using grpc::reflection::v1alpha::SymbolRequest; +using grpc::reflection::v1alpha::DescriptorDatabaseRequest; using grpc::reflection::v1alpha::ExtensionRequest; -using grpc::reflection::v1alpha::TypeRequest; -using grpc::reflection::v1alpha::FileDescriptorProtoResponse; +using grpc::reflection::v1alpha::DescriptorDatabaseResponse; +using grpc::reflection::v1alpha::ListServiceResponse; using grpc::reflection::v1alpha::ExtensionNumberResponse; +using grpc::reflection::v1alpha::ErrorResponse; namespace grpc { @@ -70,55 +68,101 @@ void ProtoServerReflection::SetServiceList( services_ = services; } +Status ProtoServerReflection::DescriptorDatabaseInfo( + ServerContext* context, + ServerReaderWriter* + stream) { + DescriptorDatabaseRequest request; + DescriptorDatabaseResponse response; + Status status; + while (stream->Read(&request)) { + switch (request.message_request_case()) { + case DescriptorDatabaseRequest::MessageRequestCase::kFileByFilename: + status = GetFileByName(context, request.file_by_filename(), &response); + break; + case DescriptorDatabaseRequest::MessageRequestCase::kFileContainingSymbol: + status = GetFileContainingSymbol( + context, request.file_containing_symbol(), &response); + break; + case DescriptorDatabaseRequest::MessageRequestCase:: + kFileContainingExtension: + status = GetFileContainingExtension( + context, &request.file_containing_extension(), &response); + break; + case DescriptorDatabaseRequest::MessageRequestCase:: + kAllExtensionNumbersOfType: + status = GetAllExtensionNumbers( + context, request.all_extension_numbers_of_type(), + response.mutable_all_extension_numbers_response()); + break; + case DescriptorDatabaseRequest::MessageRequestCase::kListServices: + status = + ListService(context, response.mutable_list_services_response()); + break; + default: + status = Status(StatusCode::UNIMPLEMENTED, ""); + } + + response.set_valid_host(request.host()); + response.set_allocated_original_request( + new DescriptorDatabaseRequest(request)); + stream->Write(response); + } + + return Status::OK; +} + +void ProtoServerReflection::FillErrorResponse(Status* status, + ErrorResponse* error_response) { + error_response->set_error_code(status->error_code()); + error_response->set_error_message(status->error_message()); +} + Status ProtoServerReflection::ListService(ServerContext* context, - const EmptyRequest* request, ListServiceResponse* response) { if (services_ == nullptr) { return Status(StatusCode::NOT_FOUND, "Services not found."); } for (auto it = services_->begin(); it != services_->end(); ++it) { - response->add_services(*it); + response->add_service(*it); } return Status::OK; } Status ProtoServerReflection::GetFileByName( - ServerContext* context, const FileNameRequest* request, - FileDescriptorProtoResponse* response) { + ServerContext* context, const grpc::string& filename, + DescriptorDatabaseResponse* response) { if (descriptor_pool_ == nullptr) { return Status::CANCELLED; } - const FileDescriptor* file_desc = - descriptor_pool_->FindFileByName(request->filename()); + const FileDescriptor* file_desc = descriptor_pool_->FindFileByName(filename); if (file_desc == nullptr) { return Status(StatusCode::NOT_FOUND, "File not found."); } FillFileDescriptorProtoResponse(file_desc, response); - // file_desc->CopyTo(response->mutable_file_descriptor_proto()); return Status::OK; } Status ProtoServerReflection::GetFileContainingSymbol( - ServerContext* context, const SymbolRequest* request, - FileDescriptorProtoResponse* response) { + ServerContext* context, const grpc::string& symbol, + DescriptorDatabaseResponse* response) { if (descriptor_pool_ == nullptr) { return Status::CANCELLED; } const FileDescriptor* file_desc = - descriptor_pool_->FindFileContainingSymbol(request->symbol()); + descriptor_pool_->FindFileContainingSymbol(symbol); if (file_desc == nullptr) { return Status(StatusCode::NOT_FOUND, "Symbol not found."); } FillFileDescriptorProtoResponse(file_desc, response); - // file_desc->CopyTo(response->mutable_file_descriptor_proto()); return Status::OK; } Status ProtoServerReflection::GetFileContainingExtension( ServerContext* context, const ExtensionRequest* request, - FileDescriptorProtoResponse* response) { + DescriptorDatabaseResponse* response) { if (descriptor_pool_ == nullptr) { return Status::CANCELLED; } @@ -135,19 +179,17 @@ Status ProtoServerReflection::GetFileContainingExtension( return Status(StatusCode::NOT_FOUND, "Extension not found."); } FillFileDescriptorProtoResponse(field_desc->file(), response); - // field_desc->file()->CopyTo(response->mutable_file_descriptor_proto()); return Status::OK; } Status ProtoServerReflection::GetAllExtensionNumbers( - ServerContext* context, const TypeRequest* request, + ServerContext* context, const grpc::string& type, ExtensionNumberResponse* response) { if (descriptor_pool_ == nullptr) { return Status::CANCELLED; } - const Descriptor* desc = - descriptor_pool_->FindMessageTypeByName(request->type()); + const Descriptor* desc = descriptor_pool_->FindMessageTypeByName(type); if (desc == nullptr) { return Status(StatusCode::NOT_FOUND, "Type not found."); } @@ -157,11 +199,12 @@ Status ProtoServerReflection::GetAllExtensionNumbers( for (auto extension : extensions) { response->add_extension_number(extension->number()); } + response->set_base_type_name(type); return Status::OK; } void ProtoServerReflection::FillFileDescriptorProtoResponse( - const FileDescriptor* file_desc, FileDescriptorProtoResponse* response) { + const FileDescriptor* file_desc, DescriptorDatabaseResponse* response) { FileDescriptorProto file_desc_proto; grpc::string data; file_desc->CopyTo(&file_desc_proto); diff --git a/extensions/reflection/proto_server_reflection.h b/extensions/reflection/proto_server_reflection.h index 5fe23191ff8..c32ee9ff54b 100644 --- a/extensions/reflection/proto_server_reflection.h +++ b/extensions/reflection/proto_server_reflection.h @@ -52,36 +52,41 @@ class ProtoServerReflection GRPC_FINAL public: ProtoServerReflection(); - ProtoServerReflection(const Server* server); - void SetServiceList(const std::vector* services); - Status ListService( - ServerContext* context, const reflection::v1alpha::EmptyRequest* request, - reflection::v1alpha::ListServiceResponse* response) GRPC_OVERRIDE; + Status DescriptorDatabaseInfo( + ServerContext* context, + ServerReaderWriter* + stream) GRPC_OVERRIDE; + + private: + Status ListService(ServerContext* context, + reflection::v1alpha::ListServiceResponse* response); Status GetFileByName( - ServerContext* context, - const reflection::v1alpha::FileNameRequest* request, - reflection::v1alpha::FileDescriptorProtoResponse* response) GRPC_OVERRIDE; + ServerContext* context, const grpc::string& file_name, + reflection::v1alpha::DescriptorDatabaseResponse* response); Status GetFileContainingSymbol( - ServerContext* context, const reflection::v1alpha::SymbolRequest* request, - reflection::v1alpha::FileDescriptorProtoResponse* response) GRPC_OVERRIDE; + ServerContext* context, const grpc::string& symbol, + reflection::v1alpha::DescriptorDatabaseResponse* response); Status GetFileContainingExtension( ServerContext* context, const reflection::v1alpha::ExtensionRequest* request, - reflection::v1alpha::FileDescriptorProtoResponse* response) GRPC_OVERRIDE; + reflection::v1alpha::DescriptorDatabaseResponse* response); Status GetAllExtensionNumbers( - ServerContext* context, const reflection::v1alpha::TypeRequest* request, - reflection::v1alpha::ExtensionNumberResponse* response) GRPC_OVERRIDE; + ServerContext* context, const grpc::string& type, + reflection::v1alpha::ExtensionNumberResponse* response); - private: void FillFileDescriptorProtoResponse( const google::protobuf::FileDescriptor* file_desc, - reflection::v1alpha::FileDescriptorProtoResponse* response); + reflection::v1alpha::DescriptorDatabaseResponse* response); + + void FillErrorResponse(Status* status, + reflection::v1alpha::ErrorResponse* error_response); const google::protobuf::DescriptorPool* descriptor_pool_; const std::vector* services_; diff --git a/extensions/reflection/reflection.grpc.pb.cc b/extensions/reflection/reflection.grpc.pb.cc index c098e52752f..83a63529fcb 100644 --- a/extensions/reflection/reflection.grpc.pb.cc +++ b/extensions/reflection/reflection.grpc.pb.cc @@ -1,9 +1,43 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + // Generated by the gRPC protobuf plugin. // If you make any local change, they will be lost. // source: reflection.proto -#include #include +#include #include #include @@ -18,228 +52,46 @@ namespace reflection { namespace v1alpha { static const char* ServerReflection_method_names[] = { - "/grpc.reflection.v1alpha.ServerReflection/ListService", - "/grpc.reflection.v1alpha.ServerReflection/GetFileByName", - "/grpc.reflection.v1alpha.ServerReflection/GetFileContainingSymbol", - "/grpc.reflection.v1alpha.ServerReflection/GetFileContainingExtension", - "/grpc.reflection.v1alpha.ServerReflection/GetAllExtensionNumbers", + "/grpc.reflection.v1alpha.ServerReflection/DescriptorDatabaseInfo", }; -std::unique_ptr ServerReflection::NewStub( - const std::shared_ptr< ::grpc::ChannelInterface>& channel, - const ::grpc::StubOptions& options) { - std::unique_ptr stub( - new ServerReflection::Stub(channel)); +std::unique_ptr< ServerReflection::Stub> ServerReflection::NewStub(const std::shared_ptr< ::grpc::ChannelInterface>& channel, const ::grpc::StubOptions& options) { + std::unique_ptr< ServerReflection::Stub> stub(new ServerReflection::Stub(channel)); return stub; } -ServerReflection::Stub::Stub( - const std::shared_ptr< ::grpc::ChannelInterface>& channel) - : channel_(channel), - rpcmethod_ListService_(ServerReflection_method_names[0], - ::grpc::RpcMethod::NORMAL_RPC, channel), - rpcmethod_GetFileByName_(ServerReflection_method_names[1], - ::grpc::RpcMethod::NORMAL_RPC, channel), - rpcmethod_GetFileContainingSymbol_(ServerReflection_method_names[2], - ::grpc::RpcMethod::NORMAL_RPC, - channel), - rpcmethod_GetFileContainingExtension_(ServerReflection_method_names[3], - ::grpc::RpcMethod::NORMAL_RPC, - channel), - rpcmethod_GetAllExtensionNumbers_(ServerReflection_method_names[4], - ::grpc::RpcMethod::NORMAL_RPC, - channel) {} - -::grpc::Status ServerReflection::Stub::ListService( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest& request, - ::grpc::reflection::v1alpha::ListServiceResponse* response) { - return ::grpc::BlockingUnaryCall(channel_.get(), rpcmethod_ListService_, - context, request, response); -} - -::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::ListServiceResponse>* -ServerReflection::Stub::AsyncListServiceRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest& request, - ::grpc::CompletionQueue* cq) { - return new ::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::ListServiceResponse>( - channel_.get(), cq, rpcmethod_ListService_, context, request); -} - -::grpc::Status ServerReflection::Stub::GetFileByName( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest& request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) { - return ::grpc::BlockingUnaryCall(channel_.get(), rpcmethod_GetFileByName_, - context, request, response); -} - -::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* -ServerReflection::Stub::AsyncGetFileByNameRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest& request, - ::grpc::CompletionQueue* cq) { - return new ::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>( - channel_.get(), cq, rpcmethod_GetFileByName_, context, request); -} - -::grpc::Status ServerReflection::Stub::GetFileContainingSymbol( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest& request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) { - return ::grpc::BlockingUnaryCall(channel_.get(), - rpcmethod_GetFileContainingSymbol_, context, - request, response); -} - -::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* -ServerReflection::Stub::AsyncGetFileContainingSymbolRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest& request, - ::grpc::CompletionQueue* cq) { - return new ::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>( - channel_.get(), cq, rpcmethod_GetFileContainingSymbol_, context, request); -} - -::grpc::Status ServerReflection::Stub::GetFileContainingExtension( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest& request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) { - return ::grpc::BlockingUnaryCall(channel_.get(), - rpcmethod_GetFileContainingExtension_, - context, request, response); -} +ServerReflection::Stub::Stub(const std::shared_ptr< ::grpc::ChannelInterface>& channel) + : channel_(channel), rpcmethod_DescriptorDatabaseInfo_(ServerReflection_method_names[0], ::grpc::RpcMethod::BIDI_STREAMING, channel) + {} -::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>* -ServerReflection::Stub::AsyncGetFileContainingExtensionRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest& request, - ::grpc::CompletionQueue* cq) { - return new ::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>( - channel_.get(), cq, rpcmethod_GetFileContainingExtension_, context, - request); +::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>* ServerReflection::Stub::DescriptorDatabaseInfoRaw(::grpc::ClientContext* context) { + return new ::grpc::ClientReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>(channel_.get(), rpcmethod_DescriptorDatabaseInfo_, context); } -::grpc::Status ServerReflection::Stub::GetAllExtensionNumbers( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::TypeRequest& request, - ::grpc::reflection::v1alpha::ExtensionNumberResponse* response) { - return ::grpc::BlockingUnaryCall(channel_.get(), - rpcmethod_GetAllExtensionNumbers_, context, - request, response); -} - -::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::ExtensionNumberResponse>* -ServerReflection::Stub::AsyncGetAllExtensionNumbersRaw( - ::grpc::ClientContext* context, - const ::grpc::reflection::v1alpha::TypeRequest& request, - ::grpc::CompletionQueue* cq) { - return new ::grpc::ClientAsyncResponseReader< - ::grpc::reflection::v1alpha::ExtensionNumberResponse>( - channel_.get(), cq, rpcmethod_GetAllExtensionNumbers_, context, request); +::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>* ServerReflection::Stub::AsyncDescriptorDatabaseInfoRaw(::grpc::ClientContext* context, ::grpc::CompletionQueue* cq, void* tag) { + return new ::grpc::ClientAsyncReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>(channel_.get(), cq, rpcmethod_DescriptorDatabaseInfo_, context, tag); } ServerReflection::Service::Service() { (void)ServerReflection_method_names; AddMethod(new ::grpc::RpcServiceMethod( - ServerReflection_method_names[0], ::grpc::RpcMethod::NORMAL_RPC, - new ::grpc::RpcMethodHandler< - ServerReflection::Service, ::grpc::reflection::v1alpha::EmptyRequest, - ::grpc::reflection::v1alpha::ListServiceResponse>( - std::mem_fn(&ServerReflection::Service::ListService), this))); - AddMethod(new ::grpc::RpcServiceMethod( - ServerReflection_method_names[1], ::grpc::RpcMethod::NORMAL_RPC, - new ::grpc::RpcMethodHandler< - ServerReflection::Service, - ::grpc::reflection::v1alpha::FileNameRequest, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>( - std::mem_fn(&ServerReflection::Service::GetFileByName), this))); - AddMethod(new ::grpc::RpcServiceMethod( - ServerReflection_method_names[2], ::grpc::RpcMethod::NORMAL_RPC, - new ::grpc::RpcMethodHandler< - ServerReflection::Service, ::grpc::reflection::v1alpha::SymbolRequest, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>( - std::mem_fn(&ServerReflection::Service::GetFileContainingSymbol), - this))); - AddMethod(new ::grpc::RpcServiceMethod( - ServerReflection_method_names[3], ::grpc::RpcMethod::NORMAL_RPC, - new ::grpc::RpcMethodHandler< - ServerReflection::Service, - ::grpc::reflection::v1alpha::ExtensionRequest, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse>( - std::mem_fn(&ServerReflection::Service::GetFileContainingExtension), - this))); - AddMethod(new ::grpc::RpcServiceMethod( - ServerReflection_method_names[4], ::grpc::RpcMethod::NORMAL_RPC, - new ::grpc::RpcMethodHandler< - ServerReflection::Service, ::grpc::reflection::v1alpha::TypeRequest, - ::grpc::reflection::v1alpha::ExtensionNumberResponse>( - std::mem_fn(&ServerReflection::Service::GetAllExtensionNumbers), - this))); + ServerReflection_method_names[0], + ::grpc::RpcMethod::BIDI_STREAMING, + new ::grpc::BidiStreamingHandler< ServerReflection::Service, ::grpc::reflection::v1alpha::DescriptorDatabaseRequest, ::grpc::reflection::v1alpha::DescriptorDatabaseResponse>( + std::mem_fn(&ServerReflection::Service::DescriptorDatabaseInfo), this))); } -ServerReflection::Service::~Service() {} - -::grpc::Status ServerReflection::Service::ListService( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::EmptyRequest* request, - ::grpc::reflection::v1alpha::ListServiceResponse* response) { - (void)context; - (void)request; - (void)response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); +ServerReflection::Service::~Service() { } -::grpc::Status ServerReflection::Service::GetFileByName( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::FileNameRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) { - (void)context; - (void)request; - (void)response; +::grpc::Status ServerReflection::Service::DescriptorDatabaseInfo(::grpc::ServerContext* context, ::grpc::ServerReaderWriter< ::grpc::reflection::v1alpha::DescriptorDatabaseResponse, ::grpc::reflection::v1alpha::DescriptorDatabaseRequest>* stream) { + (void) context; + (void) stream; return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } -::grpc::Status ServerReflection::Service::GetFileContainingSymbol( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::SymbolRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) { - (void)context; - (void)request; - (void)response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - -::grpc::Status ServerReflection::Service::GetFileContainingExtension( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::ExtensionRequest* request, - ::grpc::reflection::v1alpha::FileDescriptorProtoResponse* response) { - (void)context; - (void)request; - (void)response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} - -::grpc::Status ServerReflection::Service::GetAllExtensionNumbers( - ::grpc::ServerContext* context, - const ::grpc::reflection::v1alpha::TypeRequest* request, - ::grpc::reflection::v1alpha::ExtensionNumberResponse* response) { - (void)context; - (void)request; - (void)response; - return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); -} } // namespace grpc } // namespace reflection } // namespace v1alpha + diff --git a/extensions/reflection/reflection.pb.cc b/extensions/reflection/reflection.pb.cc index 97b3cb87916..0c9bfe79a4c 100644 --- a/extensions/reflection/reflection.pb.cc +++ b/extensions/reflection/reflection.pb.cc @@ -1,3 +1,37 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + // Generated by the protocol buffer compiler. DO NOT EDIT! // source: reflection.proto @@ -6,15 +40,15 @@ #include +#include +#include +#include +#include +#include #include #include -#include #include -#include -#include -#include #include -#include // @@protoc_insertion_point(includes) namespace grpc { @@ -23,147 +57,156 @@ namespace v1alpha { namespace { -const ::google::protobuf::Descriptor* EmptyRequest_descriptor_ = NULL; +const ::google::protobuf::Descriptor* DescriptorDatabaseRequest_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* - EmptyRequest_reflection_ = NULL; -const ::google::protobuf::Descriptor* FileNameRequest_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - FileNameRequest_reflection_ = NULL; -const ::google::protobuf::Descriptor* SymbolRequest_descriptor_ = NULL; -const ::google::protobuf::internal::GeneratedMessageReflection* - SymbolRequest_reflection_ = NULL; + DescriptorDatabaseRequest_reflection_ = NULL; +struct DescriptorDatabaseRequestOneofInstance { + ::google::protobuf::internal::ArenaStringPtr file_by_filename_; + ::google::protobuf::internal::ArenaStringPtr file_containing_symbol_; + const ::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension_; + ::google::protobuf::internal::ArenaStringPtr all_extension_numbers_of_type_; + ::google::protobuf::internal::ArenaStringPtr list_services_; +}* DescriptorDatabaseRequest_default_oneof_instance_ = NULL; const ::google::protobuf::Descriptor* ExtensionRequest_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* - ExtensionRequest_reflection_ = NULL; -const ::google::protobuf::Descriptor* TypeRequest_descriptor_ = NULL; + ExtensionRequest_reflection_ = NULL; +const ::google::protobuf::Descriptor* DescriptorDatabaseResponse_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* - TypeRequest_reflection_ = NULL; -const ::google::protobuf::Descriptor* ListServiceResponse_descriptor_ = NULL; + DescriptorDatabaseResponse_reflection_ = NULL; +struct DescriptorDatabaseResponseOneofInstance { + ::google::protobuf::internal::ArenaStringPtr file_descriptor_proto_; + const ::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response_; + const ::grpc::reflection::v1alpha::ListServiceResponse* list_services_response_; + const ::grpc::reflection::v1alpha::ErrorResponse* error_response_; +}* DescriptorDatabaseResponse_default_oneof_instance_ = NULL; +const ::google::protobuf::Descriptor* ExtensionNumberResponse_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* - ListServiceResponse_reflection_ = NULL; -const ::google::protobuf::Descriptor* FileDescriptorProtoResponse_descriptor_ = - NULL; + ExtensionNumberResponse_reflection_ = NULL; +const ::google::protobuf::Descriptor* ListServiceResponse_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* - FileDescriptorProtoResponse_reflection_ = NULL; -const ::google::protobuf::Descriptor* ExtensionNumberResponse_descriptor_ = - NULL; + ListServiceResponse_reflection_ = NULL; +const ::google::protobuf::Descriptor* ErrorResponse_descriptor_ = NULL; const ::google::protobuf::internal::GeneratedMessageReflection* - ExtensionNumberResponse_reflection_ = NULL; + ErrorResponse_reflection_ = NULL; } // namespace + void protobuf_AssignDesc_reflection_2eproto() { protobuf_AddDesc_reflection_2eproto(); const ::google::protobuf::FileDescriptor* file = - ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( - "reflection.proto"); + ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName( + "reflection.proto"); GOOGLE_CHECK(file != NULL); - EmptyRequest_descriptor_ = file->message_type(0); - static const int EmptyRequest_offsets_[1] = {}; - EmptyRequest_reflection_ = ::google::protobuf::internal:: - GeneratedMessageReflection::NewGeneratedMessageReflection( - EmptyRequest_descriptor_, EmptyRequest::default_instance_, - EmptyRequest_offsets_, -1, -1, -1, sizeof(EmptyRequest), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(EmptyRequest, - _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - EmptyRequest, _is_default_instance_)); - FileNameRequest_descriptor_ = file->message_type(1); - static const int FileNameRequest_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileNameRequest, - filename_), - }; - FileNameRequest_reflection_ = ::google::protobuf::internal:: - GeneratedMessageReflection::NewGeneratedMessageReflection( - FileNameRequest_descriptor_, FileNameRequest::default_instance_, - FileNameRequest_offsets_, -1, -1, -1, sizeof(FileNameRequest), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(FileNameRequest, - _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - FileNameRequest, _is_default_instance_)); - SymbolRequest_descriptor_ = file->message_type(2); - static const int SymbolRequest_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SymbolRequest, symbol_), + DescriptorDatabaseRequest_descriptor_ = file->message_type(0); + static const int DescriptorDatabaseRequest_offsets_[7] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseRequest, host_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(DescriptorDatabaseRequest_default_oneof_instance_, file_by_filename_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(DescriptorDatabaseRequest_default_oneof_instance_, file_containing_symbol_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(DescriptorDatabaseRequest_default_oneof_instance_, file_containing_extension_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(DescriptorDatabaseRequest_default_oneof_instance_, all_extension_numbers_of_type_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(DescriptorDatabaseRequest_default_oneof_instance_, list_services_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseRequest, message_request_), }; - SymbolRequest_reflection_ = ::google::protobuf::internal:: - GeneratedMessageReflection::NewGeneratedMessageReflection( - SymbolRequest_descriptor_, SymbolRequest::default_instance_, - SymbolRequest_offsets_, -1, -1, -1, sizeof(SymbolRequest), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(SymbolRequest, - _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - SymbolRequest, _is_default_instance_)); - ExtensionRequest_descriptor_ = file->message_type(3); + DescriptorDatabaseRequest_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + DescriptorDatabaseRequest_descriptor_, + DescriptorDatabaseRequest::default_instance_, + DescriptorDatabaseRequest_offsets_, + -1, + -1, + -1, + DescriptorDatabaseRequest_default_oneof_instance_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseRequest, _oneof_case_[0]), + sizeof(DescriptorDatabaseRequest), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseRequest, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseRequest, _is_default_instance_)); + ExtensionRequest_descriptor_ = file->message_type(1); static const int ExtensionRequest_offsets_[2] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, - containing_type_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, - extension_number_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, containing_type_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, extension_number_), }; - ExtensionRequest_reflection_ = ::google::protobuf::internal:: - GeneratedMessageReflection::NewGeneratedMessageReflection( - ExtensionRequest_descriptor_, ExtensionRequest::default_instance_, - ExtensionRequest_offsets_, -1, -1, -1, sizeof(ExtensionRequest), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, - _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - ExtensionRequest, _is_default_instance_)); - TypeRequest_descriptor_ = file->message_type(4); - static const int TypeRequest_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TypeRequest, type_), + ExtensionRequest_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + ExtensionRequest_descriptor_, + ExtensionRequest::default_instance_, + ExtensionRequest_offsets_, + -1, + -1, + -1, + sizeof(ExtensionRequest), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionRequest, _is_default_instance_)); + DescriptorDatabaseResponse_descriptor_ = file->message_type(2); + static const int DescriptorDatabaseResponse_offsets_[7] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseResponse, valid_host_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseResponse, original_request_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(DescriptorDatabaseResponse_default_oneof_instance_, file_descriptor_proto_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(DescriptorDatabaseResponse_default_oneof_instance_, all_extension_numbers_response_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(DescriptorDatabaseResponse_default_oneof_instance_, list_services_response_), + PROTO2_GENERATED_DEFAULT_ONEOF_FIELD_OFFSET(DescriptorDatabaseResponse_default_oneof_instance_, error_response_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseResponse, message_response_), }; - TypeRequest_reflection_ = ::google::protobuf::internal:: - GeneratedMessageReflection::NewGeneratedMessageReflection( - TypeRequest_descriptor_, TypeRequest::default_instance_, - TypeRequest_offsets_, -1, -1, -1, sizeof(TypeRequest), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(TypeRequest, - _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - TypeRequest, _is_default_instance_)); - ListServiceResponse_descriptor_ = file->message_type(5); - static const int ListServiceResponse_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListServiceResponse, - services_), + DescriptorDatabaseResponse_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + DescriptorDatabaseResponse_descriptor_, + DescriptorDatabaseResponse::default_instance_, + DescriptorDatabaseResponse_offsets_, + -1, + -1, + -1, + DescriptorDatabaseResponse_default_oneof_instance_, + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseResponse, _oneof_case_[0]), + sizeof(DescriptorDatabaseResponse), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(DescriptorDatabaseResponse, _is_default_instance_)); + ExtensionNumberResponse_descriptor_ = file->message_type(3); + static const int ExtensionNumberResponse_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, base_type_name_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, extension_number_), }; - ListServiceResponse_reflection_ = ::google::protobuf::internal:: - GeneratedMessageReflection::NewGeneratedMessageReflection( - ListServiceResponse_descriptor_, - ListServiceResponse::default_instance_, ListServiceResponse_offsets_, - -1, -1, -1, sizeof(ListServiceResponse), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListServiceResponse, - _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - ListServiceResponse, _is_default_instance_)); - FileDescriptorProtoResponse_descriptor_ = file->message_type(6); - static const int FileDescriptorProtoResponse_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - FileDescriptorProtoResponse, file_descriptor_proto_), + ExtensionNumberResponse_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + ExtensionNumberResponse_descriptor_, + ExtensionNumberResponse::default_instance_, + ExtensionNumberResponse_offsets_, + -1, + -1, + -1, + sizeof(ExtensionNumberResponse), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, _is_default_instance_)); + ListServiceResponse_descriptor_ = file->message_type(4); + static const int ListServiceResponse_offsets_[1] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListServiceResponse, service_), }; - FileDescriptorProtoResponse_reflection_ = ::google::protobuf::internal:: - GeneratedMessageReflection::NewGeneratedMessageReflection( - FileDescriptorProtoResponse_descriptor_, - FileDescriptorProtoResponse::default_instance_, - FileDescriptorProtoResponse_offsets_, -1, -1, -1, - sizeof(FileDescriptorProtoResponse), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - FileDescriptorProtoResponse, _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - FileDescriptorProtoResponse, _is_default_instance_)); - ExtensionNumberResponse_descriptor_ = file->message_type(7); - static const int ExtensionNumberResponse_offsets_[1] = { - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ExtensionNumberResponse, - extension_number_), + ListServiceResponse_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + ListServiceResponse_descriptor_, + ListServiceResponse::default_instance_, + ListServiceResponse_offsets_, + -1, + -1, + -1, + sizeof(ListServiceResponse), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListServiceResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ListServiceResponse, _is_default_instance_)); + ErrorResponse_descriptor_ = file->message_type(5); + static const int ErrorResponse_offsets_[2] = { + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ErrorResponse, error_code_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ErrorResponse, error_message_), }; - ExtensionNumberResponse_reflection_ = ::google::protobuf::internal:: - GeneratedMessageReflection::NewGeneratedMessageReflection( - ExtensionNumberResponse_descriptor_, - ExtensionNumberResponse::default_instance_, - ExtensionNumberResponse_offsets_, -1, -1, -1, - sizeof(ExtensionNumberResponse), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - ExtensionNumberResponse, _internal_metadata_), - GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET( - ExtensionNumberResponse, _is_default_instance_)); + ErrorResponse_reflection_ = + ::google::protobuf::internal::GeneratedMessageReflection::NewGeneratedMessageReflection( + ErrorResponse_descriptor_, + ErrorResponse::default_instance_, + ErrorResponse_offsets_, + -1, + -1, + -1, + sizeof(ErrorResponse), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ErrorResponse, _internal_metadata_), + GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(ErrorResponse, _is_default_instance_)); } namespace { @@ -171,51 +214,42 @@ namespace { GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_); inline void protobuf_AssignDescriptorsOnce() { ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_, - &protobuf_AssignDesc_reflection_2eproto); + &protobuf_AssignDesc_reflection_2eproto); } void protobuf_RegisterTypes(const ::std::string&) { protobuf_AssignDescriptorsOnce(); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - EmptyRequest_descriptor_, &EmptyRequest::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - FileNameRequest_descriptor_, &FileNameRequest::default_instance()); - ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - SymbolRequest_descriptor_, &SymbolRequest::default_instance()); + DescriptorDatabaseRequest_descriptor_, &DescriptorDatabaseRequest::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( ExtensionRequest_descriptor_, &ExtensionRequest::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - TypeRequest_descriptor_, &TypeRequest::default_instance()); + DescriptorDatabaseResponse_descriptor_, &DescriptorDatabaseResponse::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - ListServiceResponse_descriptor_, - &ListServiceResponse::default_instance()); + ExtensionNumberResponse_descriptor_, &ExtensionNumberResponse::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - FileDescriptorProtoResponse_descriptor_, - &FileDescriptorProtoResponse::default_instance()); + ListServiceResponse_descriptor_, &ListServiceResponse::default_instance()); ::google::protobuf::MessageFactory::InternalRegisterGeneratedMessage( - ExtensionNumberResponse_descriptor_, - &ExtensionNumberResponse::default_instance()); + ErrorResponse_descriptor_, &ErrorResponse::default_instance()); } } // namespace void protobuf_ShutdownFile_reflection_2eproto() { - delete EmptyRequest::default_instance_; - delete EmptyRequest_reflection_; - delete FileNameRequest::default_instance_; - delete FileNameRequest_reflection_; - delete SymbolRequest::default_instance_; - delete SymbolRequest_reflection_; + delete DescriptorDatabaseRequest::default_instance_; + delete DescriptorDatabaseRequest_default_oneof_instance_; + delete DescriptorDatabaseRequest_reflection_; delete ExtensionRequest::default_instance_; delete ExtensionRequest_reflection_; - delete TypeRequest::default_instance_; - delete TypeRequest_reflection_; - delete ListServiceResponse::default_instance_; - delete ListServiceResponse_reflection_; - delete FileDescriptorProtoResponse::default_instance_; - delete FileDescriptorProtoResponse_reflection_; + delete DescriptorDatabaseResponse::default_instance_; + delete DescriptorDatabaseResponse_default_oneof_instance_; + delete DescriptorDatabaseResponse_reflection_; delete ExtensionNumberResponse::default_instance_; delete ExtensionNumberResponse_reflection_; + delete ListServiceResponse::default_instance_; + delete ListServiceResponse_reflection_; + delete ErrorResponse::default_instance_; + delete ErrorResponse_reflection_; } void protobuf_AddDesc_reflection_2eproto() { @@ -225,54 +259,52 @@ void protobuf_AddDesc_reflection_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; ::google::protobuf::DescriptorPool::InternalAddGeneratedFile( - "\n\020reflection.proto\022\027grpc.reflection.v1al" - "pha\"\016\n\014EmptyRequest\"#\n\017FileNameRequest\022\020" - "\n\010filename\030\001 \001(\t\"\037\n\rSymbolRequest\022\016\n\006sym" - "bol\030\001 \001(\t\"E\n\020ExtensionRequest\022\027\n\017contain" - "ing_type\030\001 \001(\t\022\030\n\020extension_number\030\002 \001(\005" - "\"\033\n\013TypeRequest\022\014\n\004type\030\001 " - "\001(\t\"\'\n\023ListSer" - "viceResponse\022\020\n\010services\030\001 \003(\t\"<\n\033FileDe" - "scriptorProtoResponse\022\035\n\025file_descriptor" - "_proto\030\001 \001(\014\"3\n\027ExtensionNumberResponse\022" - "\030\n\020extension_number\030\001 \003(\0052\333\004\n\020ServerRefl" - "ection\022d\n\013ListService\022%.grpc.reflection." - "v1alpha.EmptyRequest\032,.grpc.reflection.v" - "1alpha.ListServiceResponse\"\000\022q\n\rGetFileB" - "yName\022(.grpc.reflection.v1alpha.FileName" - "Request\0324.grpc.reflection.v1alpha.FileDe" - "scriptorProtoResponse\"\000\022y\n\027GetFileContai" - "ningSymbol\022&.grpc.reflection.v1alpha.Sym" - "bolRequest\0324.grpc.reflection.v1alpha.Fil" - "eDescriptorProtoResponse\"\000\022\177\n\032GetFileCon" - "tainingExtension\022).grpc.reflection.v1alp" - "ha.ExtensionRequest\0324.grpc.reflection.v1" - "alpha.FileDescriptorProtoResponse\"\000\022r\n\026G" - "etAllExtensionNumbers\022$.grpc.reflection." - "v1alpha.TypeRequest\0320.grpc.reflection.v1" - "alpha.ExtensionNumberResponse\"\000b\006proto3", - 999); + "\n\020reflection.proto\022\027grpc.reflection.v1al" + "pha\"\214\002\n\031DescriptorDatabaseRequest\022\014\n\004hos" + "t\030\001 \001(\t\022\032\n\020file_by_filename\030\003 \001(\tH\000\022 \n\026f" + "ile_containing_symbol\030\004 \001(\tH\000\022N\n\031file_co" + "ntaining_extension\030\005 \001(\0132).grpc.reflecti" + "on.v1alpha.ExtensionRequestH\000\022\'\n\035all_ext" + "ension_numbers_of_type\030\006 \001(\tH\000\022\027\n\rlist_s" + "ervices\030\007 \001(\tH\000B\021\n\017message_request\"E\n\020Ex" + "tensionRequest\022\027\n\017containing_type\030\001 \001(\t\022" + "\030\n\020extension_number\030\002 \001(\005\"\241\003\n\032Descriptor" + "DatabaseResponse\022\022\n\nvalid_host\030\001 \001(\t\022L\n\020" + "original_request\030\002 \001(\01322.grpc.reflection" + ".v1alpha.DescriptorDatabaseRequest\022\037\n\025fi" + "le_descriptor_proto\030\004 \001(\014H\000\022Z\n\036all_exten" + "sion_numbers_response\030\005 \001(\01320.grpc.refle" + "ction.v1alpha.ExtensionNumberResponseH\000\022" + "N\n\026list_services_response\030\006 \001(\0132,.grpc.r" + "eflection.v1alpha.ListServiceResponseH\000\022" + "@\n\016error_response\030\007 \001(\0132&.grpc.reflectio" + "n.v1alpha.ErrorResponseH\000B\022\n\020message_res" + "ponse\"K\n\027ExtensionNumberResponse\022\026\n\016base" + "_type_name\030\001 \001(\t\022\030\n\020extension_number\030\002 \003" + "(\005\"&\n\023ListServiceResponse\022\017\n\007service\030\001 \003" + "(\t\":\n\rErrorResponse\022\022\n\nerror_code\030\001 \001(\005\022" + "\025\n\rerror_message\030\002 \001(\t2\232\001\n\020ServerReflect" + "ion\022\205\001\n\026DescriptorDatabaseInfo\0222.grpc.re" + "flection.v1alpha.DescriptorDatabaseReque" + "st\0323.grpc.reflection.v1alpha.DescriptorD" + "atabaseResponse(\0010\001b\006proto3", 1147); ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile( - "reflection.proto", &protobuf_RegisterTypes); - EmptyRequest::default_instance_ = new EmptyRequest(); - FileNameRequest::default_instance_ = new FileNameRequest(); - SymbolRequest::default_instance_ = new SymbolRequest(); + "reflection.proto", &protobuf_RegisterTypes); + DescriptorDatabaseRequest::default_instance_ = new DescriptorDatabaseRequest(); + DescriptorDatabaseRequest_default_oneof_instance_ = new DescriptorDatabaseRequestOneofInstance(); ExtensionRequest::default_instance_ = new ExtensionRequest(); - TypeRequest::default_instance_ = new TypeRequest(); - ListServiceResponse::default_instance_ = new ListServiceResponse(); - FileDescriptorProtoResponse::default_instance_ = - new FileDescriptorProtoResponse(); + DescriptorDatabaseResponse::default_instance_ = new DescriptorDatabaseResponse(); + DescriptorDatabaseResponse_default_oneof_instance_ = new DescriptorDatabaseResponseOneofInstance(); ExtensionNumberResponse::default_instance_ = new ExtensionNumberResponse(); - EmptyRequest::default_instance_->InitAsDefaultInstance(); - FileNameRequest::default_instance_->InitAsDefaultInstance(); - SymbolRequest::default_instance_->InitAsDefaultInstance(); + ListServiceResponse::default_instance_ = new ListServiceResponse(); + ErrorResponse::default_instance_ = new ErrorResponse(); + DescriptorDatabaseRequest::default_instance_->InitAsDefaultInstance(); ExtensionRequest::default_instance_->InitAsDefaultInstance(); - TypeRequest::default_instance_->InitAsDefaultInstance(); - ListServiceResponse::default_instance_->InitAsDefaultInstance(); - FileDescriptorProtoResponse::default_instance_->InitAsDefaultInstance(); + DescriptorDatabaseResponse::default_instance_->InitAsDefaultInstance(); ExtensionNumberResponse::default_instance_->InitAsDefaultInstance(); - ::google::protobuf::internal::OnShutdown( - &protobuf_ShutdownFile_reflection_2eproto); + ListServiceResponse::default_instance_->InitAsDefaultInstance(); + ErrorResponse::default_instance_->InitAsDefaultInstance(); + ::google::protobuf::internal::OnShutdown(&protobuf_ShutdownFile_reflection_2eproto); } // Force AddDescriptors() to be called at static initialization time. @@ -291,263 +323,223 @@ static void MergeFromFail(int line) { } // namespace + // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 +const int DescriptorDatabaseRequest::kHostFieldNumber; +const int DescriptorDatabaseRequest::kFileByFilenameFieldNumber; +const int DescriptorDatabaseRequest::kFileContainingSymbolFieldNumber; +const int DescriptorDatabaseRequest::kFileContainingExtensionFieldNumber; +const int DescriptorDatabaseRequest::kAllExtensionNumbersOfTypeFieldNumber; +const int DescriptorDatabaseRequest::kListServicesFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 -EmptyRequest::EmptyRequest() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { +DescriptorDatabaseRequest::DescriptorDatabaseRequest() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.EmptyRequest) + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.DescriptorDatabaseRequest) } -void EmptyRequest::InitAsDefaultInstance() { _is_default_instance_ = true; } +void DescriptorDatabaseRequest::InitAsDefaultInstance() { + _is_default_instance_ = true; + DescriptorDatabaseRequest_default_oneof_instance_->file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + DescriptorDatabaseRequest_default_oneof_instance_->file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + DescriptorDatabaseRequest_default_oneof_instance_->file_containing_extension_ = const_cast< ::grpc::reflection::v1alpha::ExtensionRequest*>(&::grpc::reflection::v1alpha::ExtensionRequest::default_instance()); + DescriptorDatabaseRequest_default_oneof_instance_->all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + DescriptorDatabaseRequest_default_oneof_instance_->list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} -EmptyRequest::EmptyRequest(const EmptyRequest& from) - : ::google::protobuf::Message(), _internal_metadata_(NULL) { +DescriptorDatabaseRequest::DescriptorDatabaseRequest(const DescriptorDatabaseRequest& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { SharedCtor(); MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.EmptyRequest) + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.DescriptorDatabaseRequest) } -void EmptyRequest::SharedCtor() { - _is_default_instance_ = false; +void DescriptorDatabaseRequest::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); _cached_size_ = 0; + host_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); } -EmptyRequest::~EmptyRequest() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.EmptyRequest) +DescriptorDatabaseRequest::~DescriptorDatabaseRequest() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.DescriptorDatabaseRequest) SharedDtor(); } -void EmptyRequest::SharedDtor() { +void DescriptorDatabaseRequest::SharedDtor() { + host_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (has_message_request()) { + clear_message_request(); + } if (this != default_instance_) { } } -void EmptyRequest::SetCachedSize(int size) const { +void DescriptorDatabaseRequest::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const ::google::protobuf::Descriptor* EmptyRequest::descriptor() { +const ::google::protobuf::Descriptor* DescriptorDatabaseRequest::descriptor() { protobuf_AssignDescriptorsOnce(); - return EmptyRequest_descriptor_; + return DescriptorDatabaseRequest_descriptor_; } -const EmptyRequest& EmptyRequest::default_instance() { +const DescriptorDatabaseRequest& DescriptorDatabaseRequest::default_instance() { if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); return *default_instance_; } -EmptyRequest* EmptyRequest::default_instance_ = NULL; +DescriptorDatabaseRequest* DescriptorDatabaseRequest::default_instance_ = NULL; -EmptyRequest* EmptyRequest::New(::google::protobuf::Arena* arena) const { - EmptyRequest* n = new EmptyRequest; +DescriptorDatabaseRequest* DescriptorDatabaseRequest::New(::google::protobuf::Arena* arena) const { + DescriptorDatabaseRequest* n = new DescriptorDatabaseRequest; if (arena != NULL) { arena->Own(n); } return n; } -void EmptyRequest::Clear() {} - -bool EmptyRequest::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.EmptyRequest) - for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = - input->ReadTagWithCutoff(127); - tag = p.first; - if (!p.second) goto handle_unusual; - handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { - goto success; +void DescriptorDatabaseRequest::clear_message_request() { + switch(message_request_case()) { + case kFileByFilename: { + message_request_.file_by_filename_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + break; + } + case kFileContainingSymbol: { + message_request_.file_containing_symbol_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + break; + } + case kFileContainingExtension: { + delete message_request_.file_containing_extension_; + break; + } + case kAllExtensionNumbersOfType: { + message_request_.all_extension_numbers_of_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + break; + } + case kListServices: { + message_request_.list_services_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + break; + } + case MESSAGE_REQUEST_NOT_SET: { + break; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); - } -success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.EmptyRequest) - return true; -failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.EmptyRequest) - return false; -#undef DO_ -} - -void EmptyRequest::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.EmptyRequest) - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.EmptyRequest) -} - -::google::protobuf::uint8* EmptyRequest::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.EmptyRequest) - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.EmptyRequest) - return target; -} - -int EmptyRequest::ByteSize() const { - int total_size = 0; - - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; -} - -void EmptyRequest::MergeFrom(const ::google::protobuf::Message& from) { - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const EmptyRequest* source = - ::google::protobuf::internal::DynamicCastToGenerated( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); - } else { - MergeFrom(*source); - } -} - -void EmptyRequest::MergeFrom(const EmptyRequest& from) { - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); -} - -void EmptyRequest::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -void EmptyRequest::CopyFrom(const EmptyRequest& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); -} - -bool EmptyRequest::IsInitialized() const { return true; } - -void EmptyRequest::Swap(EmptyRequest* other) { - if (other == this) return; - InternalSwap(other); -} -void EmptyRequest::InternalSwap(EmptyRequest* other) { - _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); -} - -::google::protobuf::Metadata EmptyRequest::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = EmptyRequest_descriptor_; - metadata.reflection = EmptyRequest_reflection_; - return metadata; -} - -#if PROTOBUF_INLINE_NOT_IN_HEADERS -// EmptyRequest - -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS - -// =================================================================== - -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int FileNameRequest::kFilenameFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -FileNameRequest::FileNameRequest() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { - SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.FileNameRequest) -} - -void FileNameRequest::InitAsDefaultInstance() { _is_default_instance_ = true; } - -FileNameRequest::FileNameRequest(const FileNameRequest& from) - : ::google::protobuf::Message(), _internal_metadata_(NULL) { - SharedCtor(); - MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.FileNameRequest) -} - -void FileNameRequest::SharedCtor() { - _is_default_instance_ = false; - ::google::protobuf::internal::GetEmptyString(); - _cached_size_ = 0; - filename_.UnsafeSetDefault( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - -FileNameRequest::~FileNameRequest() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.FileNameRequest) - SharedDtor(); -} - -void FileNameRequest::SharedDtor() { - filename_.DestroyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (this != default_instance_) { } + _oneof_case_[0] = MESSAGE_REQUEST_NOT_SET; } -void FileNameRequest::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); -} -const ::google::protobuf::Descriptor* FileNameRequest::descriptor() { - protobuf_AssignDescriptorsOnce(); - return FileNameRequest_descriptor_; -} -const FileNameRequest& FileNameRequest::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); - return *default_instance_; +void DescriptorDatabaseRequest::Clear() { + host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_message_request(); } -FileNameRequest* FileNameRequest::default_instance_ = NULL; - -FileNameRequest* FileNameRequest::New(::google::protobuf::Arena* arena) const { - FileNameRequest* n = new FileNameRequest; - if (arena != NULL) { - arena->Own(n); - } - return n; -} - -void FileNameRequest::Clear() { - filename_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} - -bool FileNameRequest::MergePartialFromCodedStream( +bool DescriptorDatabaseRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!(EXPRESSION)) goto failure +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.FileNameRequest) + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.DescriptorDatabaseRequest) for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = - input->ReadTagWithCutoff(127); + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; - switch ( - ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string filename = 1; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string host = 1; case 1: { if (tag == 10) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_filename())); + input, this->mutable_host())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->host().data(), this->host().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.host")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(26)) goto parse_file_by_filename; + break; + } + + // optional string file_by_filename = 3; + case 3: { + if (tag == 26) { + parse_file_by_filename: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_file_by_filename())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->file_by_filename().data(), this->file_by_filename().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_file_containing_symbol; + break; + } + + // optional string file_containing_symbol = 4; + case 4: { + if (tag == 34) { + parse_file_containing_symbol: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_file_containing_symbol())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->filename().data(), this->filename().length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "grpc.reflection.v1alpha.FileNameRequest.filename")); + this->file_containing_symbol().data(), this->file_containing_symbol().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(42)) goto parse_file_containing_extension; + break; + } + + // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; + case 5: { + if (tag == 42) { + parse_file_containing_extension: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_file_containing_extension())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(50)) goto parse_all_extension_numbers_of_type; + break; + } + + // optional string all_extension_numbers_of_type = 6; + case 6: { + if (tag == 50) { + parse_all_extension_numbers_of_type: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_all_extension_numbers_of_type())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->all_extension_numbers_of_type().data(), this->all_extension_numbers_of_type().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(58)) goto parse_list_services; + break; + } + + // optional string list_services = 7; + case 7: { + if (tag == 58) { + parse_list_services: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_list_services())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->list_services().data(), this->list_services().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services")); } else { goto handle_unusual; } @@ -559,78 +551,215 @@ bool FileNameRequest::MergePartialFromCodedStream( handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite:: - WIRETYPE_END_GROUP) { + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, - tag)); + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); break; } } } success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.FileNameRequest) + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.DescriptorDatabaseRequest) return true; failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.FileNameRequest) + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.DescriptorDatabaseRequest) return false; #undef DO_ } -void FileNameRequest::SerializeWithCachedSizes( +void DescriptorDatabaseRequest::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.FileNameRequest) - // optional string filename = 1; - if (this->filename().size() > 0) { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.DescriptorDatabaseRequest) + // optional string host = 1; + if (this->host().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->filename().data(), this->filename().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.FileNameRequest.filename"); + this->host().data(), this->host().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.host"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->filename(), output); + 1, this->host(), output); } - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.FileNameRequest) + // optional string file_by_filename = 3; + if (has_file_by_filename()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->file_by_filename().data(), this->file_by_filename().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 3, this->file_by_filename(), output); + } + + // optional string file_containing_symbol = 4; + if (has_file_containing_symbol()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->file_containing_symbol().data(), this->file_containing_symbol().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 4, this->file_containing_symbol(), output); + } + + // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; + if (has_file_containing_extension()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, *message_request_.file_containing_extension_, output); + } + + // optional string all_extension_numbers_of_type = 6; + if (has_all_extension_numbers_of_type()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->all_extension_numbers_of_type().data(), this->all_extension_numbers_of_type().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 6, this->all_extension_numbers_of_type(), output); + } + + // optional string list_services = 7; + if (has_list_services()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->list_services().data(), this->list_services().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 7, this->list_services(), output); + } + + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.DescriptorDatabaseRequest) } -::google::protobuf::uint8* FileNameRequest::SerializeWithCachedSizesToArray( +::google::protobuf::uint8* DescriptorDatabaseRequest::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.FileNameRequest) - // optional string filename = 1; - if (this->filename().size() > 0) { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.DescriptorDatabaseRequest) + // optional string host = 1; + if (this->host().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->host().data(), this->host().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.host"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->host(), target); + } + + // optional string file_by_filename = 3; + if (has_file_by_filename()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->file_by_filename().data(), this->file_by_filename().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 3, this->file_by_filename(), target); + } + + // optional string file_containing_symbol = 4; + if (has_file_containing_symbol()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->file_containing_symbol().data(), this->file_containing_symbol().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 4, this->file_containing_symbol(), target); + } + + // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; + if (has_file_containing_extension()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 5, *message_request_.file_containing_extension_, target); + } + + // optional string all_extension_numbers_of_type = 6; + if (has_all_extension_numbers_of_type()) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->all_extension_numbers_of_type().data(), this->all_extension_numbers_of_type().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 6, this->all_extension_numbers_of_type(), target); + } + + // optional string list_services = 7; + if (has_list_services()) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->filename().data(), this->filename().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.FileNameRequest.filename"); - target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->filename(), target); + this->list_services().data(), this->list_services().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 7, this->list_services(), target); } - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.FileNameRequest) + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.DescriptorDatabaseRequest) return target; } -int FileNameRequest::ByteSize() const { +int DescriptorDatabaseRequest::ByteSize() const { int total_size = 0; - // optional string filename = 1; - if (this->filename().size() > 0) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->filename()); + // optional string host = 1; + if (this->host().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->host()); } + switch (message_request_case()) { + // optional string file_by_filename = 3; + case kFileByFilename: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->file_by_filename()); + break; + } + // optional string file_containing_symbol = 4; + case kFileContainingSymbol: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->file_containing_symbol()); + break; + } + // optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; + case kFileContainingExtension: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *message_request_.file_containing_extension_); + break; + } + // optional string all_extension_numbers_of_type = 6; + case kAllExtensionNumbersOfType: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->all_extension_numbers_of_type()); + break; + } + // optional string list_services = 7; + case kListServices: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->list_services()); + break; + } + case MESSAGE_REQUEST_NOT_SET: { + break; + } + } GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = total_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } -void FileNameRequest::MergeFrom(const ::google::protobuf::Message& from) { +void DescriptorDatabaseRequest::MergeFrom(const ::google::protobuf::Message& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const FileNameRequest* source = - ::google::protobuf::internal::DynamicCastToGenerated< - const FileNameRequest>(&from); + const DescriptorDatabaseRequest* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { @@ -638,369 +767,498 @@ void FileNameRequest::MergeFrom(const ::google::protobuf::Message& from) { } } -void FileNameRequest::MergeFrom(const FileNameRequest& from) { +void DescriptorDatabaseRequest::MergeFrom(const DescriptorDatabaseRequest& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - if (from.filename().size() > 0) { - filename_.AssignWithDefault( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - from.filename_); + switch (from.message_request_case()) { + case kFileByFilename: { + set_file_by_filename(from.file_by_filename()); + break; + } + case kFileContainingSymbol: { + set_file_containing_symbol(from.file_containing_symbol()); + break; + } + case kFileContainingExtension: { + mutable_file_containing_extension()->::grpc::reflection::v1alpha::ExtensionRequest::MergeFrom(from.file_containing_extension()); + break; + } + case kAllExtensionNumbersOfType: { + set_all_extension_numbers_of_type(from.all_extension_numbers_of_type()); + break; + } + case kListServices: { + set_list_services(from.list_services()); + break; + } + case MESSAGE_REQUEST_NOT_SET: { + break; + } + } + if (from.host().size() > 0) { + + host_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.host_); } } -void FileNameRequest::CopyFrom(const ::google::protobuf::Message& from) { +void DescriptorDatabaseRequest::CopyFrom(const ::google::protobuf::Message& from) { if (&from == this) return; Clear(); MergeFrom(from); } -void FileNameRequest::CopyFrom(const FileNameRequest& from) { +void DescriptorDatabaseRequest::CopyFrom(const DescriptorDatabaseRequest& from) { if (&from == this) return; Clear(); MergeFrom(from); } -bool FileNameRequest::IsInitialized() const { return true; } +bool DescriptorDatabaseRequest::IsInitialized() const { + + return true; +} -void FileNameRequest::Swap(FileNameRequest* other) { +void DescriptorDatabaseRequest::Swap(DescriptorDatabaseRequest* other) { if (other == this) return; InternalSwap(other); } -void FileNameRequest::InternalSwap(FileNameRequest* other) { - filename_.Swap(&other->filename_); +void DescriptorDatabaseRequest::InternalSwap(DescriptorDatabaseRequest* other) { + host_.Swap(&other->host_); + std::swap(message_request_, other->message_request_); + std::swap(_oneof_case_[0], other->_oneof_case_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); std::swap(_cached_size_, other->_cached_size_); } -::google::protobuf::Metadata FileNameRequest::GetMetadata() const { +::google::protobuf::Metadata DescriptorDatabaseRequest::GetMetadata() const { protobuf_AssignDescriptorsOnce(); ::google::protobuf::Metadata metadata; - metadata.descriptor = FileNameRequest_descriptor_; - metadata.reflection = FileNameRequest_reflection_; + metadata.descriptor = DescriptorDatabaseRequest_descriptor_; + metadata.reflection = DescriptorDatabaseRequest_reflection_; return metadata; } #if PROTOBUF_INLINE_NOT_IN_HEADERS -// FileNameRequest - -// optional string filename = 1; -void FileNameRequest::clear_filename() { - filename_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -const ::std::string& FileNameRequest::filename() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.FileNameRequest.filename) - return filename_.GetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -void FileNameRequest::set_filename(const ::std::string& value) { - filename_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.FileNameRequest.filename) -} -void FileNameRequest::set_filename(const char* value) { - filename_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.FileNameRequest.filename) +// DescriptorDatabaseRequest + +// optional string host = 1; +void DescriptorDatabaseRequest::clear_host() { + host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + const ::std::string& DescriptorDatabaseRequest::host() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) + return host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void DescriptorDatabaseRequest::set_host(const ::std::string& value) { + + host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) } -void FileNameRequest::set_filename(const char* value, size_t size) { - filename_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + void DescriptorDatabaseRequest::set_host(const char* value) { + + host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) +} + void DescriptorDatabaseRequest::set_host(const char* value, size_t size) { + + host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.FileNameRequest.filename) + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) } -::std::string* FileNameRequest::mutable_filename() { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.FileNameRequest.filename) - return filename_.MutableNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::std::string* DescriptorDatabaseRequest::mutable_host() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) + return host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -::std::string* FileNameRequest::release_filename() { - return filename_.ReleaseNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::std::string* DescriptorDatabaseRequest::release_host() { + + return host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -void FileNameRequest::set_allocated_filename(::std::string* filename) { - if (filename != NULL) { + void DescriptorDatabaseRequest::set_allocated_host(::std::string* host) { + if (host != NULL) { + } else { + } - filename_.SetAllocatedNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), filename); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.FileNameRequest.filename) + host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), host); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.host) } -#endif // PROTOBUF_INLINE_NOT_IN_HEADERS - -// =================================================================== - -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int SymbolRequest::kSymbolFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - -SymbolRequest::SymbolRequest() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { - SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.SymbolRequest) +// optional string file_by_filename = 3; +bool DescriptorDatabaseRequest::has_file_by_filename() const { + return message_request_case() == kFileByFilename; } - -void SymbolRequest::InitAsDefaultInstance() { _is_default_instance_ = true; } - -SymbolRequest::SymbolRequest(const SymbolRequest& from) - : ::google::protobuf::Message(), _internal_metadata_(NULL) { - SharedCtor(); - MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.SymbolRequest) +void DescriptorDatabaseRequest::set_has_file_by_filename() { + _oneof_case_[0] = kFileByFilename; } - -void SymbolRequest::SharedCtor() { - _is_default_instance_ = false; - ::google::protobuf::internal::GetEmptyString(); - _cached_size_ = 0; - symbol_.UnsafeSetDefault( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +void DescriptorDatabaseRequest::clear_file_by_filename() { + if (has_file_by_filename()) { + message_request_.file_by_filename_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } } - -SymbolRequest::~SymbolRequest() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.SymbolRequest) - SharedDtor(); + const ::std::string& DescriptorDatabaseRequest::file_by_filename() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) + if (has_file_by_filename()) { + return message_request_.file_by_filename_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } - -void SymbolRequest::SharedDtor() { - symbol_.DestroyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (this != default_instance_) { + void DescriptorDatabaseRequest::set_file_by_filename(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } + message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) } - -void SymbolRequest::SetCachedSize(int size) const { - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); + void DescriptorDatabaseRequest::set_file_by_filename(const char* value) { + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) +} + void DescriptorDatabaseRequest::set_file_by_filename(const char* value, size_t size) { + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_by_filename_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) +} + ::std::string* DescriptorDatabaseRequest::mutable_file_by_filename() { + if (!has_file_by_filename()) { + clear_message_request(); + set_has_file_by_filename(); + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) + return message_request_.file_by_filename_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* DescriptorDatabaseRequest::release_file_by_filename() { + if (has_file_by_filename()) { + clear_has_message_request(); + return message_request_.file_by_filename_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } } -const ::google::protobuf::Descriptor* SymbolRequest::descriptor() { - protobuf_AssignDescriptorsOnce(); - return SymbolRequest_descriptor_; + void DescriptorDatabaseRequest::set_allocated_file_by_filename(::std::string* file_by_filename) { + if (!has_file_by_filename()) { + message_request_.file_by_filename_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (file_by_filename != NULL) { + set_has_file_by_filename(); + message_request_.file_by_filename_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + file_by_filename); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_by_filename) } -const SymbolRequest& SymbolRequest::default_instance() { - if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); - return *default_instance_; +// optional string file_containing_symbol = 4; +bool DescriptorDatabaseRequest::has_file_containing_symbol() const { + return message_request_case() == kFileContainingSymbol; } - -SymbolRequest* SymbolRequest::default_instance_ = NULL; - -SymbolRequest* SymbolRequest::New(::google::protobuf::Arena* arena) const { - SymbolRequest* n = new SymbolRequest; - if (arena != NULL) { - arena->Own(n); +void DescriptorDatabaseRequest::set_has_file_containing_symbol() { + _oneof_case_[0] = kFileContainingSymbol; +} +void DescriptorDatabaseRequest::clear_file_containing_symbol() { + if (has_file_containing_symbol()) { + message_request_.file_containing_symbol_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); } - return n; } - -void SymbolRequest::Clear() { - symbol_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + const ::std::string& DescriptorDatabaseRequest::file_containing_symbol() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) + if (has_file_containing_symbol()) { + return message_request_.file_containing_symbol_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } - -bool SymbolRequest::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.SymbolRequest) - for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = - input->ReadTagWithCutoff(127); - tag = p.first; - if (!p.second) goto handle_unusual; - switch ( - ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string symbol = 1; - case 1: { - if (tag == 10) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_symbol())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->symbol().data(), this->symbol().length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "grpc.reflection.v1alpha.SymbolRequest.symbol")); - } else { - goto handle_unusual; - } - if (input->ExpectAtEnd()) goto success; - break; - } - - default: { - handle_unusual: - if (tag == 0 || - ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite:: - WIRETYPE_END_GROUP) { - goto success; - } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, - tag)); - break; - } - } + void DescriptorDatabaseRequest::set_file_containing_symbol(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.SymbolRequest) - return true; -failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.SymbolRequest) - return false; -#undef DO_ + message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) } - -void SymbolRequest::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.SymbolRequest) - // optional string symbol = 1; - if (this->symbol().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->symbol().data(), this->symbol().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.SymbolRequest.symbol"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->symbol(), output); + void DescriptorDatabaseRequest::set_file_containing_symbol(const char* value) { + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) +} + void DescriptorDatabaseRequest::set_file_containing_symbol(const char* value, size_t size) { + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.file_containing_symbol_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) +} + ::std::string* DescriptorDatabaseRequest::mutable_file_containing_symbol() { + if (!has_file_containing_symbol()) { + clear_message_request(); + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) + return message_request_.file_containing_symbol_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* DescriptorDatabaseRequest::release_file_containing_symbol() { + if (has_file_containing_symbol()) { + clear_has_message_request(); + return message_request_.file_containing_symbol_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; } - - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.SymbolRequest) } - -::google::protobuf::uint8* SymbolRequest::SerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.SymbolRequest) - // optional string symbol = 1; - if (this->symbol().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->symbol().data(), this->symbol().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.SymbolRequest.symbol"); - target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->symbol(), target); + void DescriptorDatabaseRequest::set_allocated_file_containing_symbol(::std::string* file_containing_symbol) { + if (!has_file_containing_symbol()) { + message_request_.file_containing_symbol_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } - - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.SymbolRequest) - return target; + clear_message_request(); + if (file_containing_symbol != NULL) { + set_has_file_containing_symbol(); + message_request_.file_containing_symbol_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + file_containing_symbol); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_symbol) } -int SymbolRequest::ByteSize() const { - int total_size = 0; - - // optional string symbol = 1; - if (this->symbol().size() > 0) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->symbol()); +// optional .grpc.reflection.v1alpha.ExtensionRequest file_containing_extension = 5; +bool DescriptorDatabaseRequest::has_file_containing_extension() const { + return message_request_case() == kFileContainingExtension; +} +void DescriptorDatabaseRequest::set_has_file_containing_extension() { + _oneof_case_[0] = kFileContainingExtension; +} +void DescriptorDatabaseRequest::clear_file_containing_extension() { + if (has_file_containing_extension()) { + delete message_request_.file_containing_extension_; + clear_has_message_request(); } - - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _cached_size_ = total_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - return total_size; } - -void SymbolRequest::MergeFrom(const ::google::protobuf::Message& from) { - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const SymbolRequest* source = - ::google::protobuf::internal::DynamicCastToGenerated( - &from); - if (source == NULL) { - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + const ::grpc::reflection::v1alpha::ExtensionRequest& DescriptorDatabaseRequest::file_containing_extension() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_extension) + return has_file_containing_extension() + ? *message_request_.file_containing_extension_ + : ::grpc::reflection::v1alpha::ExtensionRequest::default_instance(); +} +::grpc::reflection::v1alpha::ExtensionRequest* DescriptorDatabaseRequest::mutable_file_containing_extension() { + if (!has_file_containing_extension()) { + clear_message_request(); + set_has_file_containing_extension(); + message_request_.file_containing_extension_ = new ::grpc::reflection::v1alpha::ExtensionRequest; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_extension) + return message_request_.file_containing_extension_; +} +::grpc::reflection::v1alpha::ExtensionRequest* DescriptorDatabaseRequest::release_file_containing_extension() { + if (has_file_containing_extension()) { + clear_has_message_request(); + ::grpc::reflection::v1alpha::ExtensionRequest* temp = message_request_.file_containing_extension_; + message_request_.file_containing_extension_ = NULL; + return temp; } else { - MergeFrom(*source); + return NULL; } } - -void SymbolRequest::MergeFrom(const SymbolRequest& from) { - if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - if (from.symbol().size() > 0) { - symbol_.AssignWithDefault( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - from.symbol_); +void DescriptorDatabaseRequest::set_allocated_file_containing_extension(::grpc::reflection::v1alpha::ExtensionRequest* file_containing_extension) { + clear_message_request(); + if (file_containing_extension) { + set_has_file_containing_extension(); + message_request_.file_containing_extension_ = file_containing_extension; } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.file_containing_extension) } -void SymbolRequest::CopyFrom(const ::google::protobuf::Message& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); +// optional string all_extension_numbers_of_type = 6; +bool DescriptorDatabaseRequest::has_all_extension_numbers_of_type() const { + return message_request_case() == kAllExtensionNumbersOfType; } - -void SymbolRequest::CopyFrom(const SymbolRequest& from) { - if (&from == this) return; - Clear(); - MergeFrom(from); +void DescriptorDatabaseRequest::set_has_all_extension_numbers_of_type() { + _oneof_case_[0] = kAllExtensionNumbersOfType; } - -bool SymbolRequest::IsInitialized() const { return true; } - -void SymbolRequest::Swap(SymbolRequest* other) { - if (other == this) return; - InternalSwap(other); +void DescriptorDatabaseRequest::clear_all_extension_numbers_of_type() { + if (has_all_extension_numbers_of_type()) { + message_request_.all_extension_numbers_of_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } +} + const ::std::string& DescriptorDatabaseRequest::all_extension_numbers_of_type() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) + if (has_all_extension_numbers_of_type()) { + return message_request_.all_extension_numbers_of_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} + void DescriptorDatabaseRequest::set_all_extension_numbers_of_type(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) +} + void DescriptorDatabaseRequest::set_all_extension_numbers_of_type(const char* value) { + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) +} + void DescriptorDatabaseRequest::set_all_extension_numbers_of_type(const char* value, size_t size) { + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.all_extension_numbers_of_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) +} + ::std::string* DescriptorDatabaseRequest::mutable_all_extension_numbers_of_type() { + if (!has_all_extension_numbers_of_type()) { + clear_message_request(); + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) + return message_request_.all_extension_numbers_of_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* DescriptorDatabaseRequest::release_all_extension_numbers_of_type() { + if (has_all_extension_numbers_of_type()) { + clear_has_message_request(); + return message_request_.all_extension_numbers_of_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } } -void SymbolRequest::InternalSwap(SymbolRequest* other) { - symbol_.Swap(&other->symbol_); - _internal_metadata_.Swap(&other->_internal_metadata_); - std::swap(_cached_size_, other->_cached_size_); + void DescriptorDatabaseRequest::set_allocated_all_extension_numbers_of_type(::std::string* all_extension_numbers_of_type) { + if (!has_all_extension_numbers_of_type()) { + message_request_.all_extension_numbers_of_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (all_extension_numbers_of_type != NULL) { + set_has_all_extension_numbers_of_type(); + message_request_.all_extension_numbers_of_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + all_extension_numbers_of_type); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.all_extension_numbers_of_type) } -::google::protobuf::Metadata SymbolRequest::GetMetadata() const { - protobuf_AssignDescriptorsOnce(); - ::google::protobuf::Metadata metadata; - metadata.descriptor = SymbolRequest_descriptor_; - metadata.reflection = SymbolRequest_reflection_; - return metadata; +// optional string list_services = 7; +bool DescriptorDatabaseRequest::has_list_services() const { + return message_request_case() == kListServices; } - -#if PROTOBUF_INLINE_NOT_IN_HEADERS -// SymbolRequest - -// optional string symbol = 1; -void SymbolRequest::clear_symbol() { - symbol_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -const ::std::string& SymbolRequest::symbol() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.SymbolRequest.symbol) - return symbol_.GetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -void SymbolRequest::set_symbol(const ::std::string& value) { - symbol_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.SymbolRequest.symbol) -} -void SymbolRequest::set_symbol(const char* value) { - symbol_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.SymbolRequest.symbol) +void DescriptorDatabaseRequest::set_has_list_services() { + _oneof_case_[0] = kListServices; } -void SymbolRequest::set_symbol(const char* value, size_t size) { - symbol_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.SymbolRequest.symbol) +void DescriptorDatabaseRequest::clear_list_services() { + if (has_list_services()) { + message_request_.list_services_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_request(); + } } -::std::string* SymbolRequest::mutable_symbol() { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.SymbolRequest.symbol) - return symbol_.MutableNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + const ::std::string& DescriptorDatabaseRequest::list_services() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) + if (has_list_services()) { + return message_request_.list_services_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); } -::std::string* SymbolRequest::release_symbol() { - return symbol_.ReleaseNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + void DescriptorDatabaseRequest::set_list_services(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) } -void SymbolRequest::set_allocated_symbol(::std::string* symbol) { - if (symbol != NULL) { + void DescriptorDatabaseRequest::set_list_services(const char* value) { + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) +} + void DescriptorDatabaseRequest::set_list_services(const char* value, size_t size) { + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_request_.list_services_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) +} + ::std::string* DescriptorDatabaseRequest::mutable_list_services() { + if (!has_list_services()) { + clear_message_request(); + set_has_list_services(); + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) + return message_request_.list_services_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* DescriptorDatabaseRequest::release_list_services() { + if (has_list_services()) { + clear_has_message_request(); + return message_request_.list_services_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } else { + return NULL; } - symbol_.SetAllocatedNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), symbol); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.SymbolRequest.symbol) +} + void DescriptorDatabaseRequest::set_allocated_list_services(::std::string* list_services) { + if (!has_list_services()) { + message_request_.list_services_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_request(); + if (list_services != NULL) { + set_has_list_services(); + message_request_.list_services_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + list_services); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseRequest.list_services) } +bool DescriptorDatabaseRequest::has_message_request() const { + return message_request_case() != MESSAGE_REQUEST_NOT_SET; +} +void DescriptorDatabaseRequest::clear_has_message_request() { + _oneof_case_[0] = MESSAGE_REQUEST_NOT_SET; +} +DescriptorDatabaseRequest::MessageRequestCase DescriptorDatabaseRequest::message_request_case() const { + return DescriptorDatabaseRequest::MessageRequestCase(_oneof_case_[0]); +} #endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== @@ -1011,26 +1269,28 @@ const int ExtensionRequest::kExtensionNumberFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 ExtensionRequest::ExtensionRequest() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { + : ::google::protobuf::Message(), _internal_metadata_(NULL) { SharedCtor(); // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ExtensionRequest) } -void ExtensionRequest::InitAsDefaultInstance() { _is_default_instance_ = true; } +void ExtensionRequest::InitAsDefaultInstance() { + _is_default_instance_ = true; +} ExtensionRequest::ExtensionRequest(const ExtensionRequest& from) - : ::google::protobuf::Message(), _internal_metadata_(NULL) { + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { SharedCtor(); MergeFrom(from); // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ExtensionRequest) } void ExtensionRequest::SharedCtor() { - _is_default_instance_ = false; + _is_default_instance_ = false; ::google::protobuf::internal::GetEmptyString(); _cached_size_ = 0; - containing_type_.UnsafeSetDefault( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + containing_type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); extension_number_ = 0; } @@ -1040,8 +1300,7 @@ ExtensionRequest::~ExtensionRequest() { } void ExtensionRequest::SharedDtor() { - containing_type_.DestroyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + containing_type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != default_instance_) { } } @@ -1063,8 +1322,7 @@ const ExtensionRequest& ExtensionRequest::default_instance() { ExtensionRequest* ExtensionRequest::default_instance_ = NULL; -ExtensionRequest* ExtensionRequest::New( - ::google::protobuf::Arena* arena) const { +ExtensionRequest* ExtensionRequest::New(::google::protobuf::Arena* arena) const { ExtensionRequest* n = new ExtensionRequest; if (arena != NULL) { arena->Own(n); @@ -1073,33 +1331,29 @@ ExtensionRequest* ExtensionRequest::New( } void ExtensionRequest::Clear() { - containing_type_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + containing_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); extension_number_ = 0; } bool ExtensionRequest::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!(EXPRESSION)) goto failure +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ExtensionRequest) for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = - input->ReadTagWithCutoff(127); + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; - switch ( - ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { // optional string containing_type = 1; case 1: { if (tag == 10) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_containing_type())); + input, this->mutable_containing_type())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->containing_type().data(), this->containing_type().length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "grpc.reflection.v1alpha.ExtensionRequest.containing_type")); + this->containing_type().data(), this->containing_type().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.ExtensionRequest.containing_type")); } else { goto handle_unusual; } @@ -1110,11 +1364,10 @@ bool ExtensionRequest::MergePartialFromCodedStream( // optional int32 extension_number = 2; case 2: { if (tag == 16) { - parse_extension_number: + parse_extension_number: DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, - ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &extension_number_))); + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &extension_number_))); } else { goto handle_unusual; @@ -1127,12 +1380,10 @@ bool ExtensionRequest::MergePartialFromCodedStream( handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite:: - WIRETYPE_END_GROUP) { + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, - tag)); + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); break; } } @@ -1152,17 +1403,16 @@ void ExtensionRequest::SerializeWithCachedSizes( // optional string containing_type = 1; if (this->containing_type().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->containing_type().data(), this->containing_type().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ExtensionRequest.containing_type"); + this->containing_type().data(), this->containing_type().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ExtensionRequest.containing_type"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->containing_type(), output); + 1, this->containing_type(), output); } // optional int32 extension_number = 2; if (this->extension_number() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt32( - 2, this->extension_number(), output); + ::google::protobuf::internal::WireFormatLite::WriteInt32(2, this->extension_number(), output); } // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ExtensionRequest) @@ -1174,17 +1424,17 @@ void ExtensionRequest::SerializeWithCachedSizes( // optional string containing_type = 1; if (this->containing_type().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->containing_type().data(), this->containing_type().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ExtensionRequest.containing_type"); - target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + this->containing_type().data(), this->containing_type().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ExtensionRequest.containing_type"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( 1, this->containing_type(), target); } // optional int32 extension_number = 2; if (this->extension_number() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray( - 2, this->extension_number(), target); + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(2, this->extension_number(), target); } // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ExtensionRequest) @@ -1196,14 +1446,16 @@ int ExtensionRequest::ByteSize() const { // optional string containing_type = 1; if (this->containing_type().size() > 0) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->containing_type()); + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->containing_type()); } // optional int32 extension_number = 2; if (this->extension_number() != 0) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( - this->extension_number()); + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->extension_number()); } GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); @@ -1214,9 +1466,9 @@ int ExtensionRequest::ByteSize() const { void ExtensionRequest::MergeFrom(const ::google::protobuf::Message& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const ExtensionRequest* source = - ::google::protobuf::internal::DynamicCastToGenerated< - const ExtensionRequest>(&from); + const ExtensionRequest* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { @@ -1227,9 +1479,8 @@ void ExtensionRequest::MergeFrom(const ::google::protobuf::Message& from) { void ExtensionRequest::MergeFrom(const ExtensionRequest& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); if (from.containing_type().size() > 0) { - containing_type_.AssignWithDefault( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - from.containing_type_); + + containing_type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.containing_type_); } if (from.extension_number() != 0) { set_extension_number(from.extension_number()); @@ -1248,7 +1499,10 @@ void ExtensionRequest::CopyFrom(const ExtensionRequest& from) { MergeFrom(from); } -bool ExtensionRequest::IsInitialized() const { return true; } +bool ExtensionRequest::IsInitialized() const { + + return true; +} void ExtensionRequest::Swap(ExtensionRequest* other) { if (other == this) return; @@ -1274,58 +1528,57 @@ void ExtensionRequest::InternalSwap(ExtensionRequest* other) { // optional string containing_type = 1; void ExtensionRequest::clear_containing_type() { - containing_type_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + containing_type_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -const ::std::string& ExtensionRequest::containing_type() const { + const ::std::string& ExtensionRequest::containing_type() const { // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.containing_type) - return containing_type_.GetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return containing_type_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -void ExtensionRequest::set_containing_type(const ::std::string& value) { - containing_type_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + void ExtensionRequest::set_containing_type(const ::std::string& value) { + + containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.containing_type) } -void ExtensionRequest::set_containing_type(const char* value) { - containing_type_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); + void ExtensionRequest::set_containing_type(const char* value) { + + containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionRequest.containing_type) } -void ExtensionRequest::set_containing_type(const char* value, size_t size) { - containing_type_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + void ExtensionRequest::set_containing_type(const char* value, size_t size) { + + containing_type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionRequest.containing_type) } -::std::string* ExtensionRequest::mutable_containing_type() { + ::std::string* ExtensionRequest::mutable_containing_type() { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionRequest.containing_type) - return containing_type_.MutableNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return containing_type_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -::std::string* ExtensionRequest::release_containing_type() { - return containing_type_.ReleaseNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::std::string* ExtensionRequest::release_containing_type() { + + return containing_type_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -void ExtensionRequest::set_allocated_containing_type( - ::std::string* containing_type) { + void ExtensionRequest::set_allocated_containing_type(::std::string* containing_type) { if (containing_type != NULL) { + } else { + } - containing_type_.SetAllocatedNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - containing_type); + containing_type_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), containing_type); // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionRequest.containing_type) } // optional int32 extension_number = 2; -void ExtensionRequest::clear_extension_number() { extension_number_ = 0; } -::google::protobuf::int32 ExtensionRequest::extension_number() const { +void ExtensionRequest::clear_extension_number() { + extension_number_ = 0; +} + ::google::protobuf::int32 ExtensionRequest::extension_number() const { // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionRequest.extension_number) return extension_number_; } -void ExtensionRequest::set_extension_number(::google::protobuf::int32 value) { + void ExtensionRequest::set_extension_number(::google::protobuf::int32 value) { + extension_number_ = value; // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionRequest.extension_number) } @@ -1335,96 +1588,203 @@ void ExtensionRequest::set_extension_number(::google::protobuf::int32 value) { // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int TypeRequest::kTypeFieldNumber; +const int DescriptorDatabaseResponse::kValidHostFieldNumber; +const int DescriptorDatabaseResponse::kOriginalRequestFieldNumber; +const int DescriptorDatabaseResponse::kFileDescriptorProtoFieldNumber; +const int DescriptorDatabaseResponse::kAllExtensionNumbersResponseFieldNumber; +const int DescriptorDatabaseResponse::kListServicesResponseFieldNumber; +const int DescriptorDatabaseResponse::kErrorResponseFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 -TypeRequest::TypeRequest() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { +DescriptorDatabaseResponse::DescriptorDatabaseResponse() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.TypeRequest) + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.DescriptorDatabaseResponse) } -void TypeRequest::InitAsDefaultInstance() { _is_default_instance_ = true; } +void DescriptorDatabaseResponse::InitAsDefaultInstance() { + _is_default_instance_ = true; + original_request_ = const_cast< ::grpc::reflection::v1alpha::DescriptorDatabaseRequest*>(&::grpc::reflection::v1alpha::DescriptorDatabaseRequest::default_instance()); + DescriptorDatabaseResponse_default_oneof_instance_->file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + DescriptorDatabaseResponse_default_oneof_instance_->all_extension_numbers_response_ = const_cast< ::grpc::reflection::v1alpha::ExtensionNumberResponse*>(&::grpc::reflection::v1alpha::ExtensionNumberResponse::default_instance()); + DescriptorDatabaseResponse_default_oneof_instance_->list_services_response_ = const_cast< ::grpc::reflection::v1alpha::ListServiceResponse*>(&::grpc::reflection::v1alpha::ListServiceResponse::default_instance()); + DescriptorDatabaseResponse_default_oneof_instance_->error_response_ = const_cast< ::grpc::reflection::v1alpha::ErrorResponse*>(&::grpc::reflection::v1alpha::ErrorResponse::default_instance()); +} -TypeRequest::TypeRequest(const TypeRequest& from) - : ::google::protobuf::Message(), _internal_metadata_(NULL) { +DescriptorDatabaseResponse::DescriptorDatabaseResponse(const DescriptorDatabaseResponse& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { SharedCtor(); MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.TypeRequest) + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.DescriptorDatabaseResponse) } -void TypeRequest::SharedCtor() { - _is_default_instance_ = false; +void DescriptorDatabaseResponse::SharedCtor() { + _is_default_instance_ = false; ::google::protobuf::internal::GetEmptyString(); _cached_size_ = 0; - type_.UnsafeSetDefault( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + valid_host_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + original_request_ = NULL; + clear_has_message_response(); } -TypeRequest::~TypeRequest() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.TypeRequest) +DescriptorDatabaseResponse::~DescriptorDatabaseResponse() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.DescriptorDatabaseResponse) SharedDtor(); } -void TypeRequest::SharedDtor() { - type_.DestroyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +void DescriptorDatabaseResponse::SharedDtor() { + valid_host_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (has_message_response()) { + clear_message_response(); + } if (this != default_instance_) { + delete original_request_; } } -void TypeRequest::SetCachedSize(int size) const { +void DescriptorDatabaseResponse::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const ::google::protobuf::Descriptor* TypeRequest::descriptor() { +const ::google::protobuf::Descriptor* DescriptorDatabaseResponse::descriptor() { protobuf_AssignDescriptorsOnce(); - return TypeRequest_descriptor_; + return DescriptorDatabaseResponse_descriptor_; } -const TypeRequest& TypeRequest::default_instance() { +const DescriptorDatabaseResponse& DescriptorDatabaseResponse::default_instance() { if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); return *default_instance_; } -TypeRequest* TypeRequest::default_instance_ = NULL; +DescriptorDatabaseResponse* DescriptorDatabaseResponse::default_instance_ = NULL; -TypeRequest* TypeRequest::New(::google::protobuf::Arena* arena) const { - TypeRequest* n = new TypeRequest; +DescriptorDatabaseResponse* DescriptorDatabaseResponse::New(::google::protobuf::Arena* arena) const { + DescriptorDatabaseResponse* n = new DescriptorDatabaseResponse; if (arena != NULL) { arena->Own(n); } return n; } -void TypeRequest::Clear() { - type_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +void DescriptorDatabaseResponse::clear_message_response() { + switch(message_response_case()) { + case kFileDescriptorProto: { + message_response_.file_descriptor_proto_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + break; + } + case kAllExtensionNumbersResponse: { + delete message_response_.all_extension_numbers_response_; + break; + } + case kListServicesResponse: { + delete message_response_.list_services_response_; + break; + } + case kErrorResponse: { + delete message_response_.error_response_; + break; + } + case MESSAGE_RESPONSE_NOT_SET: { + break; + } + } + _oneof_case_[0] = MESSAGE_RESPONSE_NOT_SET; +} + + +void DescriptorDatabaseResponse::Clear() { + valid_host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + if (GetArenaNoVirtual() == NULL && original_request_ != NULL) delete original_request_; + original_request_ = NULL; + clear_message_response(); } -bool TypeRequest::MergePartialFromCodedStream( +bool DescriptorDatabaseResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!(EXPRESSION)) goto failure +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.TypeRequest) + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.DescriptorDatabaseResponse) for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = - input->ReadTagWithCutoff(127); + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; - switch ( - ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional string type = 1; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string valid_host = 1; case 1: { if (tag == 10) { DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_type())); + input, this->mutable_valid_host())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->type().data(), this->type().length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "grpc.reflection.v1alpha.TypeRequest.type")); + this->valid_host().data(), this->valid_host().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_original_request; + break; + } + + // optional .grpc.reflection.v1alpha.DescriptorDatabaseRequest original_request = 2; + case 2: { + if (tag == 18) { + parse_original_request: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_original_request())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(34)) goto parse_file_descriptor_proto; + break; + } + + // optional bytes file_descriptor_proto = 4; + case 4: { + if (tag == 34) { + parse_file_descriptor_proto: + DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( + input, this->mutable_file_descriptor_proto())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(42)) goto parse_all_extension_numbers_response; + break; + } + + // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; + case 5: { + if (tag == 42) { + parse_all_extension_numbers_response: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_all_extension_numbers_response())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(50)) goto parse_list_services_response; + break; + } + + // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; + case 6: { + if (tag == 50) { + parse_list_services_response: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_list_services_response())); + } else { + goto handle_unusual; + } + if (input->ExpectTag(58)) goto parse_error_response; + break; + } + + // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; + case 7: { + if (tag == 58) { + parse_error_response: + DO_(::google::protobuf::internal::WireFormatLite::ReadMessageNoVirtual( + input, mutable_error_response())); } else { goto handle_unusual; } @@ -1436,77 +1796,182 @@ bool TypeRequest::MergePartialFromCodedStream( handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite:: - WIRETYPE_END_GROUP) { + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, - tag)); + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); break; } } } success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.TypeRequest) + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.DescriptorDatabaseResponse) return true; failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.TypeRequest) + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.DescriptorDatabaseResponse) return false; #undef DO_ } -void TypeRequest::SerializeWithCachedSizes( +void DescriptorDatabaseResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.TypeRequest) - // optional string type = 1; - if (this->type().size() > 0) { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.DescriptorDatabaseResponse) + // optional string valid_host = 1; + if (this->valid_host().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->type().data(), this->type().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.TypeRequest.type"); + this->valid_host().data(), this->valid_host().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host"); ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->type(), output); + 1, this->valid_host(), output); + } + + // optional .grpc.reflection.v1alpha.DescriptorDatabaseRequest original_request = 2; + if (this->has_original_request()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 2, *this->original_request_, output); + } + + // optional bytes file_descriptor_proto = 4; + if (has_file_descriptor_proto()) { + ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( + 4, this->file_descriptor_proto(), output); + } + + // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; + if (has_all_extension_numbers_response()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 5, *message_response_.all_extension_numbers_response_, output); + } + + // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; + if (has_list_services_response()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 6, *message_response_.list_services_response_, output); } - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.TypeRequest) + // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; + if (has_error_response()) { + ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( + 7, *message_response_.error_response_, output); + } + + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.DescriptorDatabaseResponse) } -::google::protobuf::uint8* TypeRequest::SerializeWithCachedSizesToArray( +::google::protobuf::uint8* DescriptorDatabaseResponse::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.TypeRequest) - // optional string type = 1; - if (this->type().size() > 0) { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.DescriptorDatabaseResponse) + // optional string valid_host = 1; + if (this->valid_host().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->type().data(), this->type().length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.TypeRequest.type"); - target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->type(), target); + this->valid_host().data(), this->valid_host().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->valid_host(), target); + } + + // optional .grpc.reflection.v1alpha.DescriptorDatabaseRequest original_request = 2; + if (this->has_original_request()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 2, *this->original_request_, target); + } + + // optional bytes file_descriptor_proto = 4; + if (has_file_descriptor_proto()) { + target = + ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( + 4, this->file_descriptor_proto(), target); } - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.TypeRequest) + // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; + if (has_all_extension_numbers_response()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 5, *message_response_.all_extension_numbers_response_, target); + } + + // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; + if (has_list_services_response()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 6, *message_response_.list_services_response_, target); + } + + // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; + if (has_error_response()) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteMessageNoVirtualToArray( + 7, *message_response_.error_response_, target); + } + + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.DescriptorDatabaseResponse) return target; } -int TypeRequest::ByteSize() const { +int DescriptorDatabaseResponse::ByteSize() const { int total_size = 0; - // optional string type = 1; - if (this->type().size() > 0) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::StringSize( - this->type()); + // optional string valid_host = 1; + if (this->valid_host().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->valid_host()); + } + + // optional .grpc.reflection.v1alpha.DescriptorDatabaseRequest original_request = 2; + if (this->has_original_request()) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *this->original_request_); } + switch (message_response_case()) { + // optional bytes file_descriptor_proto = 4; + case kFileDescriptorProto: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::BytesSize( + this->file_descriptor_proto()); + break; + } + // optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; + case kAllExtensionNumbersResponse: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *message_response_.all_extension_numbers_response_); + break; + } + // optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; + case kListServicesResponse: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *message_response_.list_services_response_); + break; + } + // optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; + case kErrorResponse: { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::MessageSizeNoVirtual( + *message_response_.error_response_); + break; + } + case MESSAGE_RESPONSE_NOT_SET: { + break; + } + } GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = total_size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); return total_size; } -void TypeRequest::MergeFrom(const ::google::protobuf::Message& from) { +void DescriptorDatabaseResponse::MergeFrom(const ::google::protobuf::Message& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const TypeRequest* source = - ::google::protobuf::internal::DynamicCastToGenerated( + const DescriptorDatabaseResponse* source = + ::google::protobuf::internal::DynamicCastToGenerated( &from); if (source == NULL) { ::google::protobuf::internal::ReflectionOps::Merge(from, this); @@ -1515,190 +1980,504 @@ void TypeRequest::MergeFrom(const ::google::protobuf::Message& from) { } } -void TypeRequest::MergeFrom(const TypeRequest& from) { +void DescriptorDatabaseResponse::MergeFrom(const DescriptorDatabaseResponse& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - if (from.type().size() > 0) { - type_.AssignWithDefault( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - from.type_); + switch (from.message_response_case()) { + case kFileDescriptorProto: { + set_file_descriptor_proto(from.file_descriptor_proto()); + break; + } + case kAllExtensionNumbersResponse: { + mutable_all_extension_numbers_response()->::grpc::reflection::v1alpha::ExtensionNumberResponse::MergeFrom(from.all_extension_numbers_response()); + break; + } + case kListServicesResponse: { + mutable_list_services_response()->::grpc::reflection::v1alpha::ListServiceResponse::MergeFrom(from.list_services_response()); + break; + } + case kErrorResponse: { + mutable_error_response()->::grpc::reflection::v1alpha::ErrorResponse::MergeFrom(from.error_response()); + break; + } + case MESSAGE_RESPONSE_NOT_SET: { + break; + } + } + if (from.valid_host().size() > 0) { + + valid_host_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.valid_host_); + } + if (from.has_original_request()) { + mutable_original_request()->::grpc::reflection::v1alpha::DescriptorDatabaseRequest::MergeFrom(from.original_request()); } } -void TypeRequest::CopyFrom(const ::google::protobuf::Message& from) { +void DescriptorDatabaseResponse::CopyFrom(const ::google::protobuf::Message& from) { if (&from == this) return; Clear(); MergeFrom(from); } -void TypeRequest::CopyFrom(const TypeRequest& from) { +void DescriptorDatabaseResponse::CopyFrom(const DescriptorDatabaseResponse& from) { if (&from == this) return; Clear(); MergeFrom(from); } -bool TypeRequest::IsInitialized() const { return true; } +bool DescriptorDatabaseResponse::IsInitialized() const { + + return true; +} -void TypeRequest::Swap(TypeRequest* other) { +void DescriptorDatabaseResponse::Swap(DescriptorDatabaseResponse* other) { if (other == this) return; InternalSwap(other); } -void TypeRequest::InternalSwap(TypeRequest* other) { - type_.Swap(&other->type_); +void DescriptorDatabaseResponse::InternalSwap(DescriptorDatabaseResponse* other) { + valid_host_.Swap(&other->valid_host_); + std::swap(original_request_, other->original_request_); + std::swap(message_response_, other->message_response_); + std::swap(_oneof_case_[0], other->_oneof_case_[0]); _internal_metadata_.Swap(&other->_internal_metadata_); std::swap(_cached_size_, other->_cached_size_); } -::google::protobuf::Metadata TypeRequest::GetMetadata() const { +::google::protobuf::Metadata DescriptorDatabaseResponse::GetMetadata() const { protobuf_AssignDescriptorsOnce(); ::google::protobuf::Metadata metadata; - metadata.descriptor = TypeRequest_descriptor_; - metadata.reflection = TypeRequest_reflection_; + metadata.descriptor = DescriptorDatabaseResponse_descriptor_; + metadata.reflection = DescriptorDatabaseResponse_reflection_; return metadata; } #if PROTOBUF_INLINE_NOT_IN_HEADERS -// TypeRequest - -// optional string type = 1; -void TypeRequest::clear_type() { - type_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -const ::std::string& TypeRequest::type() const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.TypeRequest.type) - return type_.GetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -void TypeRequest::set_type(const ::std::string& value) { - type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.TypeRequest.type) -} -void TypeRequest::set_type(const char* value) { - type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.TypeRequest.type) -} -void TypeRequest::set_type(const char* value, size_t size) { - type_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.TypeRequest.type) -} -::std::string* TypeRequest::mutable_type() { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.TypeRequest.type) - return type_.MutableNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -::std::string* TypeRequest::release_type() { - return type_.ReleaseNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -void TypeRequest::set_allocated_type(::std::string* type) { - if (type != NULL) { +// DescriptorDatabaseResponse + +// optional string valid_host = 1; +void DescriptorDatabaseResponse::clear_valid_host() { + valid_host_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + const ::std::string& DescriptorDatabaseResponse::valid_host() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) + return valid_host_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void DescriptorDatabaseResponse::set_valid_host(const ::std::string& value) { + + valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) +} + void DescriptorDatabaseResponse::set_valid_host(const char* value) { + + valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) +} + void DescriptorDatabaseResponse::set_valid_host(const char* value, size_t size) { + + valid_host_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) +} + ::std::string* DescriptorDatabaseResponse::mutable_valid_host() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) + return valid_host_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* DescriptorDatabaseResponse::release_valid_host() { + + return valid_host_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void DescriptorDatabaseResponse::set_allocated_valid_host(::std::string* valid_host) { + if (valid_host != NULL) { + + } else { + + } + valid_host_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), valid_host); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.valid_host) +} + +// optional .grpc.reflection.v1alpha.DescriptorDatabaseRequest original_request = 2; +bool DescriptorDatabaseResponse::has_original_request() const { + return !_is_default_instance_ && original_request_ != NULL; +} +void DescriptorDatabaseResponse::clear_original_request() { + if (GetArenaNoVirtual() == NULL && original_request_ != NULL) delete original_request_; + original_request_ = NULL; +} +const ::grpc::reflection::v1alpha::DescriptorDatabaseRequest& DescriptorDatabaseResponse::original_request() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.original_request) + return original_request_ != NULL ? *original_request_ : *default_instance_->original_request_; +} +::grpc::reflection::v1alpha::DescriptorDatabaseRequest* DescriptorDatabaseResponse::mutable_original_request() { + + if (original_request_ == NULL) { + original_request_ = new ::grpc::reflection::v1alpha::DescriptorDatabaseRequest; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.original_request) + return original_request_; +} +::grpc::reflection::v1alpha::DescriptorDatabaseRequest* DescriptorDatabaseResponse::release_original_request() { + + ::grpc::reflection::v1alpha::DescriptorDatabaseRequest* temp = original_request_; + original_request_ = NULL; + return temp; +} +void DescriptorDatabaseResponse::set_allocated_original_request(::grpc::reflection::v1alpha::DescriptorDatabaseRequest* original_request) { + delete original_request_; + original_request_ = original_request; + if (original_request) { + + } else { + + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.original_request) +} + +// optional bytes file_descriptor_proto = 4; +bool DescriptorDatabaseResponse::has_file_descriptor_proto() const { + return message_response_case() == kFileDescriptorProto; +} +void DescriptorDatabaseResponse::set_has_file_descriptor_proto() { + _oneof_case_[0] = kFileDescriptorProto; +} +void DescriptorDatabaseResponse::clear_file_descriptor_proto() { + if (has_file_descriptor_proto()) { + message_response_.file_descriptor_proto_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + clear_has_message_response(); + } +} + const ::std::string& DescriptorDatabaseResponse::file_descriptor_proto() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) + if (has_file_descriptor_proto()) { + return message_response_.file_descriptor_proto_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + return *&::google::protobuf::internal::GetEmptyStringAlreadyInited(); +} + void DescriptorDatabaseResponse::set_file_descriptor_proto(const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) + if (!has_file_descriptor_proto()) { + clear_message_response(); + set_has_file_descriptor_proto(); + message_response_.file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_response_.file_descriptor_proto_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) +} + void DescriptorDatabaseResponse::set_file_descriptor_proto(const char* value) { + if (!has_file_descriptor_proto()) { + clear_message_response(); + set_has_file_descriptor_proto(); + message_response_.file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_response_.file_descriptor_proto_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) +} + void DescriptorDatabaseResponse::set_file_descriptor_proto(const void* value, size_t size) { + if (!has_file_descriptor_proto()) { + clear_message_response(); + set_has_file_descriptor_proto(); + message_response_.file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + message_response_.file_descriptor_proto_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string( + reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) +} + ::std::string* DescriptorDatabaseResponse::mutable_file_descriptor_proto() { + if (!has_file_descriptor_proto()) { + clear_message_response(); + set_has_file_descriptor_proto(); + message_response_.file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) + return message_response_.file_descriptor_proto_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* DescriptorDatabaseResponse::release_file_descriptor_proto() { + if (has_file_descriptor_proto()) { + clear_has_message_response(); + return message_response_.file_descriptor_proto_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } else { + return NULL; + } +} + void DescriptorDatabaseResponse::set_allocated_file_descriptor_proto(::std::string* file_descriptor_proto) { + if (!has_file_descriptor_proto()) { + message_response_.file_descriptor_proto_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + } + clear_message_response(); + if (file_descriptor_proto != NULL) { + set_has_file_descriptor_proto(); + message_response_.file_descriptor_proto_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + file_descriptor_proto); + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.file_descriptor_proto) +} + +// optional .grpc.reflection.v1alpha.ExtensionNumberResponse all_extension_numbers_response = 5; +bool DescriptorDatabaseResponse::has_all_extension_numbers_response() const { + return message_response_case() == kAllExtensionNumbersResponse; +} +void DescriptorDatabaseResponse::set_has_all_extension_numbers_response() { + _oneof_case_[0] = kAllExtensionNumbersResponse; +} +void DescriptorDatabaseResponse::clear_all_extension_numbers_response() { + if (has_all_extension_numbers_response()) { + delete message_response_.all_extension_numbers_response_; + clear_has_message_response(); + } +} + const ::grpc::reflection::v1alpha::ExtensionNumberResponse& DescriptorDatabaseResponse::all_extension_numbers_response() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.all_extension_numbers_response) + return has_all_extension_numbers_response() + ? *message_response_.all_extension_numbers_response_ + : ::grpc::reflection::v1alpha::ExtensionNumberResponse::default_instance(); +} +::grpc::reflection::v1alpha::ExtensionNumberResponse* DescriptorDatabaseResponse::mutable_all_extension_numbers_response() { + if (!has_all_extension_numbers_response()) { + clear_message_response(); + set_has_all_extension_numbers_response(); + message_response_.all_extension_numbers_response_ = new ::grpc::reflection::v1alpha::ExtensionNumberResponse; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.all_extension_numbers_response) + return message_response_.all_extension_numbers_response_; +} +::grpc::reflection::v1alpha::ExtensionNumberResponse* DescriptorDatabaseResponse::release_all_extension_numbers_response() { + if (has_all_extension_numbers_response()) { + clear_has_message_response(); + ::grpc::reflection::v1alpha::ExtensionNumberResponse* temp = message_response_.all_extension_numbers_response_; + message_response_.all_extension_numbers_response_ = NULL; + return temp; + } else { + return NULL; + } +} +void DescriptorDatabaseResponse::set_allocated_all_extension_numbers_response(::grpc::reflection::v1alpha::ExtensionNumberResponse* all_extension_numbers_response) { + clear_message_response(); + if (all_extension_numbers_response) { + set_has_all_extension_numbers_response(); + message_response_.all_extension_numbers_response_ = all_extension_numbers_response; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.all_extension_numbers_response) +} + +// optional .grpc.reflection.v1alpha.ListServiceResponse list_services_response = 6; +bool DescriptorDatabaseResponse::has_list_services_response() const { + return message_response_case() == kListServicesResponse; +} +void DescriptorDatabaseResponse::set_has_list_services_response() { + _oneof_case_[0] = kListServicesResponse; +} +void DescriptorDatabaseResponse::clear_list_services_response() { + if (has_list_services_response()) { + delete message_response_.list_services_response_; + clear_has_message_response(); + } +} + const ::grpc::reflection::v1alpha::ListServiceResponse& DescriptorDatabaseResponse::list_services_response() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.list_services_response) + return has_list_services_response() + ? *message_response_.list_services_response_ + : ::grpc::reflection::v1alpha::ListServiceResponse::default_instance(); +} +::grpc::reflection::v1alpha::ListServiceResponse* DescriptorDatabaseResponse::mutable_list_services_response() { + if (!has_list_services_response()) { + clear_message_response(); + set_has_list_services_response(); + message_response_.list_services_response_ = new ::grpc::reflection::v1alpha::ListServiceResponse; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.list_services_response) + return message_response_.list_services_response_; +} +::grpc::reflection::v1alpha::ListServiceResponse* DescriptorDatabaseResponse::release_list_services_response() { + if (has_list_services_response()) { + clear_has_message_response(); + ::grpc::reflection::v1alpha::ListServiceResponse* temp = message_response_.list_services_response_; + message_response_.list_services_response_ = NULL; + return temp; + } else { + return NULL; + } +} +void DescriptorDatabaseResponse::set_allocated_list_services_response(::grpc::reflection::v1alpha::ListServiceResponse* list_services_response) { + clear_message_response(); + if (list_services_response) { + set_has_list_services_response(); + message_response_.list_services_response_ = list_services_response; + } + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.list_services_response) +} + +// optional .grpc.reflection.v1alpha.ErrorResponse error_response = 7; +bool DescriptorDatabaseResponse::has_error_response() const { + return message_response_case() == kErrorResponse; +} +void DescriptorDatabaseResponse::set_has_error_response() { + _oneof_case_[0] = kErrorResponse; +} +void DescriptorDatabaseResponse::clear_error_response() { + if (has_error_response()) { + delete message_response_.error_response_; + clear_has_message_response(); + } +} + const ::grpc::reflection::v1alpha::ErrorResponse& DescriptorDatabaseResponse::error_response() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.DescriptorDatabaseResponse.error_response) + return has_error_response() + ? *message_response_.error_response_ + : ::grpc::reflection::v1alpha::ErrorResponse::default_instance(); +} +::grpc::reflection::v1alpha::ErrorResponse* DescriptorDatabaseResponse::mutable_error_response() { + if (!has_error_response()) { + clear_message_response(); + set_has_error_response(); + message_response_.error_response_ = new ::grpc::reflection::v1alpha::ErrorResponse; + } + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.DescriptorDatabaseResponse.error_response) + return message_response_.error_response_; +} +::grpc::reflection::v1alpha::ErrorResponse* DescriptorDatabaseResponse::release_error_response() { + if (has_error_response()) { + clear_has_message_response(); + ::grpc::reflection::v1alpha::ErrorResponse* temp = message_response_.error_response_; + message_response_.error_response_ = NULL; + return temp; } else { + return NULL; + } +} +void DescriptorDatabaseResponse::set_allocated_error_response(::grpc::reflection::v1alpha::ErrorResponse* error_response) { + clear_message_response(); + if (error_response) { + set_has_error_response(); + message_response_.error_response_ = error_response; } - type_.SetAllocatedNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), type); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.TypeRequest.type) + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.DescriptorDatabaseResponse.error_response) } +bool DescriptorDatabaseResponse::has_message_response() const { + return message_response_case() != MESSAGE_RESPONSE_NOT_SET; +} +void DescriptorDatabaseResponse::clear_has_message_response() { + _oneof_case_[0] = MESSAGE_RESPONSE_NOT_SET; +} +DescriptorDatabaseResponse::MessageResponseCase DescriptorDatabaseResponse::message_response_case() const { + return DescriptorDatabaseResponse::MessageResponseCase(_oneof_case_[0]); +} #endif // PROTOBUF_INLINE_NOT_IN_HEADERS // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int ListServiceResponse::kServicesFieldNumber; +const int ExtensionNumberResponse::kBaseTypeNameFieldNumber; +const int ExtensionNumberResponse::kExtensionNumberFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 -ListServiceResponse::ListServiceResponse() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { +ExtensionNumberResponse::ExtensionNumberResponse() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ListServiceResponse) + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ExtensionNumberResponse) } -void ListServiceResponse::InitAsDefaultInstance() { +void ExtensionNumberResponse::InitAsDefaultInstance() { _is_default_instance_ = true; } -ListServiceResponse::ListServiceResponse(const ListServiceResponse& from) - : ::google::protobuf::Message(), _internal_metadata_(NULL) { +ExtensionNumberResponse::ExtensionNumberResponse(const ExtensionNumberResponse& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { SharedCtor(); MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ListServiceResponse) + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ExtensionNumberResponse) } -void ListServiceResponse::SharedCtor() { - _is_default_instance_ = false; +void ExtensionNumberResponse::SharedCtor() { + _is_default_instance_ = false; ::google::protobuf::internal::GetEmptyString(); _cached_size_ = 0; + base_type_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -ListServiceResponse::~ListServiceResponse() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ListServiceResponse) +ExtensionNumberResponse::~ExtensionNumberResponse() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ExtensionNumberResponse) SharedDtor(); } -void ListServiceResponse::SharedDtor() { +void ExtensionNumberResponse::SharedDtor() { + base_type_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != default_instance_) { } } -void ListServiceResponse::SetCachedSize(int size) const { +void ExtensionNumberResponse::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const ::google::protobuf::Descriptor* ListServiceResponse::descriptor() { +const ::google::protobuf::Descriptor* ExtensionNumberResponse::descriptor() { protobuf_AssignDescriptorsOnce(); - return ListServiceResponse_descriptor_; + return ExtensionNumberResponse_descriptor_; } -const ListServiceResponse& ListServiceResponse::default_instance() { +const ExtensionNumberResponse& ExtensionNumberResponse::default_instance() { if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); return *default_instance_; } -ListServiceResponse* ListServiceResponse::default_instance_ = NULL; +ExtensionNumberResponse* ExtensionNumberResponse::default_instance_ = NULL; -ListServiceResponse* ListServiceResponse::New( - ::google::protobuf::Arena* arena) const { - ListServiceResponse* n = new ListServiceResponse; +ExtensionNumberResponse* ExtensionNumberResponse::New(::google::protobuf::Arena* arena) const { + ExtensionNumberResponse* n = new ExtensionNumberResponse; if (arena != NULL) { arena->Own(n); } return n; } -void ListServiceResponse::Clear() { services_.Clear(); } +void ExtensionNumberResponse::Clear() { + base_type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + extension_number_.Clear(); +} -bool ListServiceResponse::MergePartialFromCodedStream( +bool ExtensionNumberResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!(EXPRESSION)) goto failure +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ListServiceResponse) + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ExtensionNumberResponse) for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = - input->ReadTagWithCutoff(127); + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; - switch ( - ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated string services = 1; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional string base_type_name = 1; case 1: { if (tag == 10) { - parse_services: DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->add_services())); + input, this->mutable_base_type_name())); DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->services(this->services_size() - 1).data(), - this->services(this->services_size() - 1).length(), - ::google::protobuf::internal::WireFormatLite::PARSE, - "grpc.reflection.v1alpha.ListServiceResponse.services")); + this->base_type_name().data(), this->base_type_name().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name")); + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_extension_number; + break; + } + + // repeated int32 extension_number = 2; + case 2: { + if (tag == 18) { + parse_extension_number: + DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, this->mutable_extension_number()))); + } else if (tag == 16) { + DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + 1, 18, input, this->mutable_extension_number()))); } else { goto handle_unusual; } - if (input->ExpectTag(10)) goto parse_services; if (input->ExpectAtEnd()) goto success; break; } @@ -1707,66 +2486,106 @@ bool ListServiceResponse::MergePartialFromCodedStream( handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite:: - WIRETYPE_END_GROUP) { + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, - tag)); + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); break; } } } success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ListServiceResponse) + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ExtensionNumberResponse) return true; failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ListServiceResponse) + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ExtensionNumberResponse) return false; #undef DO_ } -void ListServiceResponse::SerializeWithCachedSizes( +void ExtensionNumberResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ListServiceResponse) - // repeated string services = 1; - for (int i = 0; i < this->services_size(); i++) { + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ExtensionNumberResponse) + // optional string base_type_name = 1; + if (this->base_type_name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->services(i).data(), this->services(i).length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ListServiceResponse.services"); - ::google::protobuf::internal::WireFormatLite::WriteString( - 1, this->services(i), output); + this->base_type_name().data(), this->base_type_name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 1, this->base_type_name(), output); + } + + // repeated int32 extension_number = 2; + if (this->extension_number_size() > 0) { + ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); + output->WriteVarint32(_extension_number_cached_byte_size_); + } + for (int i = 0; i < this->extension_number_size(); i++) { + ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( + this->extension_number(i), output); } - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ListServiceResponse) + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ExtensionNumberResponse) } -::google::protobuf::uint8* ListServiceResponse::SerializeWithCachedSizesToArray( +::google::protobuf::uint8* ExtensionNumberResponse::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ListServiceResponse) - // repeated string services = 1; - for (int i = 0; i < this->services_size(); i++) { + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ExtensionNumberResponse) + // optional string base_type_name = 1; + if (this->base_type_name().size() > 0) { ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->services(i).data(), this->services(i).length(), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "grpc.reflection.v1alpha.ListServiceResponse.services"); - target = ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->services(i), target); + this->base_type_name().data(), this->base_type_name().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name"); + target = + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 1, this->base_type_name(), target); } - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ListServiceResponse) + // repeated int32 extension_number = 2; + if (this->extension_number_size() > 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( + 2, + ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, + target); + target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( + _extension_number_cached_byte_size_, target); + } + for (int i = 0; i < this->extension_number_size(); i++) { + target = ::google::protobuf::internal::WireFormatLite:: + WriteInt32NoTagToArray(this->extension_number(i), target); + } + + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ExtensionNumberResponse) return target; } -int ListServiceResponse::ByteSize() const { +int ExtensionNumberResponse::ByteSize() const { int total_size = 0; - // repeated string services = 1; - total_size += 1 * this->services_size(); - for (int i = 0; i < this->services_size(); i++) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( - this->services(i)); + // optional string base_type_name = 1; + if (this->base_type_name().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->base_type_name()); + } + + // repeated int32 extension_number = 2; + { + int data_size = 0; + for (int i = 0; i < this->extension_number_size(); i++) { + data_size += ::google::protobuf::internal::WireFormatLite:: + Int32Size(this->extension_number(i)); + } + if (data_size > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size(data_size); + } + GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); + _extension_number_cached_byte_size_ = data_size; + GOOGLE_SAFE_CONCURRENT_WRITES_END(); + total_size += data_size; } GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); @@ -1775,11 +2594,11 @@ int ListServiceResponse::ByteSize() const { return total_size; } -void ListServiceResponse::MergeFrom(const ::google::protobuf::Message& from) { +void ExtensionNumberResponse::MergeFrom(const ::google::protobuf::Message& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const ListServiceResponse* source = - ::google::protobuf::internal::DynamicCastToGenerated< - const ListServiceResponse>(&from); + const ExtensionNumberResponse* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { @@ -1787,92 +2606,125 @@ void ListServiceResponse::MergeFrom(const ::google::protobuf::Message& from) { } } -void ListServiceResponse::MergeFrom(const ListServiceResponse& from) { +void ExtensionNumberResponse::MergeFrom(const ExtensionNumberResponse& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - services_.MergeFrom(from.services_); + extension_number_.MergeFrom(from.extension_number_); + if (from.base_type_name().size() > 0) { + + base_type_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.base_type_name_); + } } -void ListServiceResponse::CopyFrom(const ::google::protobuf::Message& from) { +void ExtensionNumberResponse::CopyFrom(const ::google::protobuf::Message& from) { if (&from == this) return; Clear(); MergeFrom(from); } -void ListServiceResponse::CopyFrom(const ListServiceResponse& from) { +void ExtensionNumberResponse::CopyFrom(const ExtensionNumberResponse& from) { if (&from == this) return; Clear(); MergeFrom(from); } -bool ListServiceResponse::IsInitialized() const { return true; } +bool ExtensionNumberResponse::IsInitialized() const { -void ListServiceResponse::Swap(ListServiceResponse* other) { + return true; +} + +void ExtensionNumberResponse::Swap(ExtensionNumberResponse* other) { if (other == this) return; InternalSwap(other); } -void ListServiceResponse::InternalSwap(ListServiceResponse* other) { - services_.UnsafeArenaSwap(&other->services_); +void ExtensionNumberResponse::InternalSwap(ExtensionNumberResponse* other) { + base_type_name_.Swap(&other->base_type_name_); + extension_number_.UnsafeArenaSwap(&other->extension_number_); _internal_metadata_.Swap(&other->_internal_metadata_); std::swap(_cached_size_, other->_cached_size_); } -::google::protobuf::Metadata ListServiceResponse::GetMetadata() const { +::google::protobuf::Metadata ExtensionNumberResponse::GetMetadata() const { protobuf_AssignDescriptorsOnce(); ::google::protobuf::Metadata metadata; - metadata.descriptor = ListServiceResponse_descriptor_; - metadata.reflection = ListServiceResponse_reflection_; + metadata.descriptor = ExtensionNumberResponse_descriptor_; + metadata.reflection = ExtensionNumberResponse_reflection_; return metadata; } #if PROTOBUF_INLINE_NOT_IN_HEADERS -// ListServiceResponse +// ExtensionNumberResponse -// repeated string services = 1; -int ListServiceResponse::services_size() const { return services_.size(); } -void ListServiceResponse::clear_services() { services_.Clear(); } -const ::std::string& ListServiceResponse::services(int index) const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ListServiceResponse.services) - return services_.Get(index); +// optional string base_type_name = 1; +void ExtensionNumberResponse::clear_base_type_name() { + base_type_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + const ::std::string& ExtensionNumberResponse::base_type_name() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) + return base_type_name_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void ExtensionNumberResponse::set_base_type_name(const ::std::string& value) { + + base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) +} + void ExtensionNumberResponse::set_base_type_name(const char* value) { + + base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) } -::std::string* ListServiceResponse::mutable_services(int index) { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ListServiceResponse.services) - return services_.Mutable(index); + void ExtensionNumberResponse::set_base_type_name(const char* value, size_t size) { + + base_type_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) +} + ::std::string* ExtensionNumberResponse::mutable_base_type_name() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) + return base_type_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -void ListServiceResponse::set_services(int index, const ::std::string& value) { - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ListServiceResponse.services) - services_.Mutable(index)->assign(value); + ::std::string* ExtensionNumberResponse::release_base_type_name() { + + return base_type_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void ExtensionNumberResponse::set_allocated_base_type_name(::std::string* base_type_name) { + if (base_type_name != NULL) { + + } else { + + } + base_type_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), base_type_name); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ExtensionNumberResponse.base_type_name) } -void ListServiceResponse::set_services(int index, const char* value) { - services_.Mutable(index)->assign(value); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ListServiceResponse.services) + +// repeated int32 extension_number = 2; +int ExtensionNumberResponse::extension_number_size() const { + return extension_number_.size(); } -void ListServiceResponse::set_services(int index, const char* value, - size_t size) { - services_.Mutable(index)->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ListServiceResponse.services) +void ExtensionNumberResponse::clear_extension_number() { + extension_number_.Clear(); } -::std::string* ListServiceResponse::add_services() { return services_.Add(); } -void ListServiceResponse::add_services(const ::std::string& value) { - services_.Add()->assign(value); - // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ListServiceResponse.services) + ::google::protobuf::int32 ExtensionNumberResponse::extension_number(int index) const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + return extension_number_.Get(index); } -void ListServiceResponse::add_services(const char* value) { - services_.Add()->assign(value); - // @@protoc_insertion_point(field_add_char:grpc.reflection.v1alpha.ListServiceResponse.services) + void ExtensionNumberResponse::set_extension_number(int index, ::google::protobuf::int32 value) { + extension_number_.Set(index, value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) } -void ListServiceResponse::add_services(const char* value, size_t size) { - services_.Add()->assign(reinterpret_cast(value), size); - // @@protoc_insertion_point(field_add_pointer:grpc.reflection.v1alpha.ListServiceResponse.services) + void ExtensionNumberResponse::add_extension_number(::google::protobuf::int32 value) { + extension_number_.Add(value); + // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) } -const ::google::protobuf::RepeatedPtrField< ::std::string>& -ListServiceResponse::services() const { - // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ListServiceResponse.services) - return services_; + const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +ExtensionNumberResponse::extension_number() const { + // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + return extension_number_; } -::google::protobuf::RepeatedPtrField< ::std::string>* -ListServiceResponse::mutable_services() { - // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ListServiceResponse.services) - return &services_; + ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +ExtensionNumberResponse::mutable_extension_number() { + // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + return &extension_number_; } #endif // PROTOBUF_INLINE_NOT_IN_HEADERS @@ -1880,102 +2732,97 @@ ListServiceResponse::mutable_services() { // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int FileDescriptorProtoResponse::kFileDescriptorProtoFieldNumber; +const int ListServiceResponse::kServiceFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 -FileDescriptorProtoResponse::FileDescriptorProtoResponse() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { +ListServiceResponse::ListServiceResponse() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ListServiceResponse) } -void FileDescriptorProtoResponse::InitAsDefaultInstance() { +void ListServiceResponse::InitAsDefaultInstance() { _is_default_instance_ = true; } -FileDescriptorProtoResponse::FileDescriptorProtoResponse( - const FileDescriptorProtoResponse& from) - : ::google::protobuf::Message(), _internal_metadata_(NULL) { +ListServiceResponse::ListServiceResponse(const ListServiceResponse& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { SharedCtor(); MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ListServiceResponse) } -void FileDescriptorProtoResponse::SharedCtor() { - _is_default_instance_ = false; +void ListServiceResponse::SharedCtor() { + _is_default_instance_ = false; ::google::protobuf::internal::GetEmptyString(); _cached_size_ = 0; - file_descriptor_proto_.UnsafeSetDefault( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -FileDescriptorProtoResponse::~FileDescriptorProtoResponse() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.FileDescriptorProtoResponse) +ListServiceResponse::~ListServiceResponse() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ListServiceResponse) SharedDtor(); } -void FileDescriptorProtoResponse::SharedDtor() { - file_descriptor_proto_.DestroyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +void ListServiceResponse::SharedDtor() { if (this != default_instance_) { } } -void FileDescriptorProtoResponse::SetCachedSize(int size) const { +void ListServiceResponse::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const ::google::protobuf::Descriptor* -FileDescriptorProtoResponse::descriptor() { +const ::google::protobuf::Descriptor* ListServiceResponse::descriptor() { protobuf_AssignDescriptorsOnce(); - return FileDescriptorProtoResponse_descriptor_; + return ListServiceResponse_descriptor_; } -const FileDescriptorProtoResponse& -FileDescriptorProtoResponse::default_instance() { +const ListServiceResponse& ListServiceResponse::default_instance() { if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); return *default_instance_; } -FileDescriptorProtoResponse* FileDescriptorProtoResponse::default_instance_ = - NULL; +ListServiceResponse* ListServiceResponse::default_instance_ = NULL; -FileDescriptorProtoResponse* FileDescriptorProtoResponse::New( - ::google::protobuf::Arena* arena) const { - FileDescriptorProtoResponse* n = new FileDescriptorProtoResponse; +ListServiceResponse* ListServiceResponse::New(::google::protobuf::Arena* arena) const { + ListServiceResponse* n = new ListServiceResponse; if (arena != NULL) { arena->Own(n); } return n; } -void FileDescriptorProtoResponse::Clear() { - file_descriptor_proto_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); +void ListServiceResponse::Clear() { + service_.Clear(); } -bool FileDescriptorProtoResponse::MergePartialFromCodedStream( +bool ListServiceResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!(EXPRESSION)) goto failure +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ListServiceResponse) for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = - input->ReadTagWithCutoff(127); + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; - switch ( - ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // optional bytes file_descriptor_proto = 1; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // repeated string service = 1; case 1: { if (tag == 10) { - DO_(::google::protobuf::internal::WireFormatLite::ReadBytes( - input, this->mutable_file_descriptor_proto())); + parse_service: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->add_service())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->service(this->service_size() - 1).data(), + this->service(this->service_size() - 1).length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.ListServiceResponse.service")); } else { goto handle_unusual; } + if (input->ExpectTag(10)) goto parse_service; if (input->ExpectAtEnd()) goto success; break; } @@ -1984,58 +2831,64 @@ bool FileDescriptorProtoResponse::MergePartialFromCodedStream( handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite:: - WIRETYPE_END_GROUP) { + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, - tag)); + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); break; } } } success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ListServiceResponse) return true; failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ListServiceResponse) return false; #undef DO_ } -void FileDescriptorProtoResponse::SerializeWithCachedSizes( +void ListServiceResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.FileDescriptorProtoResponse) - // optional bytes file_descriptor_proto = 1; - if (this->file_descriptor_proto().size() > 0) { - ::google::protobuf::internal::WireFormatLite::WriteBytesMaybeAliased( - 1, this->file_descriptor_proto(), output); + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ListServiceResponse) + // repeated string service = 1; + for (int i = 0; i < this->service_size(); i++) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->service(i).data(), this->service(i).length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ListServiceResponse.service"); + ::google::protobuf::internal::WireFormatLite::WriteString( + 1, this->service(i), output); } - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ListServiceResponse) } -::google::protobuf::uint8* -FileDescriptorProtoResponse::SerializeWithCachedSizesToArray( +::google::protobuf::uint8* ListServiceResponse::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.FileDescriptorProtoResponse) - // optional bytes file_descriptor_proto = 1; - if (this->file_descriptor_proto().size() > 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteBytesToArray( - 1, this->file_descriptor_proto(), target); + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ListServiceResponse) + // repeated string service = 1; + for (int i = 0; i < this->service_size(); i++) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->service(i).data(), this->service(i).length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ListServiceResponse.service"); + target = ::google::protobuf::internal::WireFormatLite:: + WriteStringToArray(1, this->service(i), target); } - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.FileDescriptorProtoResponse) + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ListServiceResponse) return target; } -int FileDescriptorProtoResponse::ByteSize() const { +int ListServiceResponse::ByteSize() const { int total_size = 0; - // optional bytes file_descriptor_proto = 1; - if (this->file_descriptor_proto().size() > 0) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::BytesSize( - this->file_descriptor_proto()); + // repeated string service = 1; + total_size += 1 * this->service_size(); + for (int i = 0; i < this->service_size(); i++) { + total_size += ::google::protobuf::internal::WireFormatLite::StringSize( + this->service(i)); } GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); @@ -2044,12 +2897,11 @@ int FileDescriptorProtoResponse::ByteSize() const { return total_size; } -void FileDescriptorProtoResponse::MergeFrom( - const ::google::protobuf::Message& from) { +void ListServiceResponse::MergeFrom(const ::google::protobuf::Message& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const FileDescriptorProtoResponse* source = - ::google::protobuf::internal::DynamicCastToGenerated< - const FileDescriptorProtoResponse>(&from); + const ListServiceResponse* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { @@ -2057,102 +2909,101 @@ void FileDescriptorProtoResponse::MergeFrom( } } -void FileDescriptorProtoResponse::MergeFrom( - const FileDescriptorProtoResponse& from) { +void ListServiceResponse::MergeFrom(const ListServiceResponse& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - if (from.file_descriptor_proto().size() > 0) { - file_descriptor_proto_.AssignWithDefault( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - from.file_descriptor_proto_); - } + service_.MergeFrom(from.service_); } -void FileDescriptorProtoResponse::CopyFrom( - const ::google::protobuf::Message& from) { +void ListServiceResponse::CopyFrom(const ::google::protobuf::Message& from) { if (&from == this) return; Clear(); MergeFrom(from); } -void FileDescriptorProtoResponse::CopyFrom( - const FileDescriptorProtoResponse& from) { +void ListServiceResponse::CopyFrom(const ListServiceResponse& from) { if (&from == this) return; Clear(); MergeFrom(from); } -bool FileDescriptorProtoResponse::IsInitialized() const { return true; } +bool ListServiceResponse::IsInitialized() const { + + return true; +} -void FileDescriptorProtoResponse::Swap(FileDescriptorProtoResponse* other) { +void ListServiceResponse::Swap(ListServiceResponse* other) { if (other == this) return; InternalSwap(other); } -void FileDescriptorProtoResponse::InternalSwap( - FileDescriptorProtoResponse* other) { - file_descriptor_proto_.Swap(&other->file_descriptor_proto_); +void ListServiceResponse::InternalSwap(ListServiceResponse* other) { + service_.UnsafeArenaSwap(&other->service_); _internal_metadata_.Swap(&other->_internal_metadata_); std::swap(_cached_size_, other->_cached_size_); } -::google::protobuf::Metadata FileDescriptorProtoResponse::GetMetadata() const { +::google::protobuf::Metadata ListServiceResponse::GetMetadata() const { protobuf_AssignDescriptorsOnce(); ::google::protobuf::Metadata metadata; - metadata.descriptor = FileDescriptorProtoResponse_descriptor_; - metadata.reflection = FileDescriptorProtoResponse_reflection_; + metadata.descriptor = ListServiceResponse_descriptor_; + metadata.reflection = ListServiceResponse_reflection_; return metadata; } #if PROTOBUF_INLINE_NOT_IN_HEADERS -// FileDescriptorProtoResponse - -// optional bytes file_descriptor_proto = 1; -void FileDescriptorProtoResponse::clear_file_descriptor_proto() { - file_descriptor_proto_.ClearToEmptyNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -const ::std::string& FileDescriptorProtoResponse::file_descriptor_proto() - const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) - return file_descriptor_proto_.GetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); -} -void FileDescriptorProtoResponse::set_file_descriptor_proto( - const ::std::string& value) { - file_descriptor_proto_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) -} -void FileDescriptorProtoResponse::set_file_descriptor_proto(const char* value) { - file_descriptor_proto_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(value)); - // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) +// ListServiceResponse + +// repeated string service = 1; +int ListServiceResponse::service_size() const { + return service_.size(); } -void FileDescriptorProtoResponse::set_file_descriptor_proto(const void* value, - size_t size) { - file_descriptor_proto_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - ::std::string(reinterpret_cast(value), size)); - // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) +void ListServiceResponse::clear_service() { + service_.Clear(); } -::std::string* FileDescriptorProtoResponse::mutable_file_descriptor_proto() { - // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) - return file_descriptor_proto_.MutableNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + const ::std::string& ListServiceResponse::service(int index) const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ListServiceResponse.service) + return service_.Get(index); } -::std::string* FileDescriptorProtoResponse::release_file_descriptor_proto() { - return file_descriptor_proto_.ReleaseNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::std::string* ListServiceResponse::mutable_service(int index) { + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ListServiceResponse.service) + return service_.Mutable(index); } -void FileDescriptorProtoResponse::set_allocated_file_descriptor_proto( - ::std::string* file_descriptor_proto) { - if (file_descriptor_proto != NULL) { - } else { - } - file_descriptor_proto_.SetAllocatedNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), - file_descriptor_proto); - // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.FileDescriptorProtoResponse.file_descriptor_proto) + void ListServiceResponse::set_service(int index, const ::std::string& value) { + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ListServiceResponse.service) + service_.Mutable(index)->assign(value); +} + void ListServiceResponse::set_service(int index, const char* value) { + service_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ListServiceResponse.service) +} + void ListServiceResponse::set_service(int index, const char* value, size_t size) { + service_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ListServiceResponse.service) +} + ::std::string* ListServiceResponse::add_service() { + return service_.Add(); +} + void ListServiceResponse::add_service(const ::std::string& value) { + service_.Add()->assign(value); + // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ListServiceResponse.service) +} + void ListServiceResponse::add_service(const char* value) { + service_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:grpc.reflection.v1alpha.ListServiceResponse.service) +} + void ListServiceResponse::add_service(const char* value, size_t size) { + service_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:grpc.reflection.v1alpha.ListServiceResponse.service) +} + const ::google::protobuf::RepeatedPtrField< ::std::string>& +ListServiceResponse::service() const { + // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ListServiceResponse.service) + return service_; +} + ::google::protobuf::RepeatedPtrField< ::std::string>* +ListServiceResponse::mutable_service() { + // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ListServiceResponse.service) + return &service_; } #endif // PROTOBUF_INLINE_NOT_IN_HEADERS @@ -2160,98 +3011,111 @@ void FileDescriptorProtoResponse::set_allocated_file_descriptor_proto( // =================================================================== #if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int ExtensionNumberResponse::kExtensionNumberFieldNumber; +const int ErrorResponse::kErrorCodeFieldNumber; +const int ErrorResponse::kErrorMessageFieldNumber; #endif // !defined(_MSC_VER) || _MSC_VER >= 1900 -ExtensionNumberResponse::ExtensionNumberResponse() - : ::google::protobuf::Message(), _internal_metadata_(NULL) { +ErrorResponse::ErrorResponse() + : ::google::protobuf::Message(), _internal_metadata_(NULL) { SharedCtor(); - // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ExtensionNumberResponse) + // @@protoc_insertion_point(constructor:grpc.reflection.v1alpha.ErrorResponse) } -void ExtensionNumberResponse::InitAsDefaultInstance() { +void ErrorResponse::InitAsDefaultInstance() { _is_default_instance_ = true; } -ExtensionNumberResponse::ExtensionNumberResponse( - const ExtensionNumberResponse& from) - : ::google::protobuf::Message(), _internal_metadata_(NULL) { +ErrorResponse::ErrorResponse(const ErrorResponse& from) + : ::google::protobuf::Message(), + _internal_metadata_(NULL) { SharedCtor(); MergeFrom(from); - // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ExtensionNumberResponse) + // @@protoc_insertion_point(copy_constructor:grpc.reflection.v1alpha.ErrorResponse) } -void ExtensionNumberResponse::SharedCtor() { - _is_default_instance_ = false; +void ErrorResponse::SharedCtor() { + _is_default_instance_ = false; + ::google::protobuf::internal::GetEmptyString(); _cached_size_ = 0; + error_code_ = 0; + error_message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -ExtensionNumberResponse::~ExtensionNumberResponse() { - // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ExtensionNumberResponse) +ErrorResponse::~ErrorResponse() { + // @@protoc_insertion_point(destructor:grpc.reflection.v1alpha.ErrorResponse) SharedDtor(); } -void ExtensionNumberResponse::SharedDtor() { +void ErrorResponse::SharedDtor() { + error_message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); if (this != default_instance_) { } } -void ExtensionNumberResponse::SetCachedSize(int size) const { +void ErrorResponse::SetCachedSize(int size) const { GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); _cached_size_ = size; GOOGLE_SAFE_CONCURRENT_WRITES_END(); } -const ::google::protobuf::Descriptor* ExtensionNumberResponse::descriptor() { +const ::google::protobuf::Descriptor* ErrorResponse::descriptor() { protobuf_AssignDescriptorsOnce(); - return ExtensionNumberResponse_descriptor_; + return ErrorResponse_descriptor_; } -const ExtensionNumberResponse& ExtensionNumberResponse::default_instance() { +const ErrorResponse& ErrorResponse::default_instance() { if (default_instance_ == NULL) protobuf_AddDesc_reflection_2eproto(); return *default_instance_; } -ExtensionNumberResponse* ExtensionNumberResponse::default_instance_ = NULL; +ErrorResponse* ErrorResponse::default_instance_ = NULL; -ExtensionNumberResponse* ExtensionNumberResponse::New( - ::google::protobuf::Arena* arena) const { - ExtensionNumberResponse* n = new ExtensionNumberResponse; +ErrorResponse* ErrorResponse::New(::google::protobuf::Arena* arena) const { + ErrorResponse* n = new ErrorResponse; if (arena != NULL) { arena->Own(n); } return n; } -void ExtensionNumberResponse::Clear() { extension_number_.Clear(); } +void ErrorResponse::Clear() { + error_code_ = 0; + error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} -bool ExtensionNumberResponse::MergePartialFromCodedStream( +bool ErrorResponse::MergePartialFromCodedStream( ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) \ - if (!(EXPRESSION)) goto failure +#define DO_(EXPRESSION) if (!(EXPRESSION)) goto failure ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ExtensionNumberResponse) + // @@protoc_insertion_point(parse_start:grpc.reflection.v1alpha.ErrorResponse) for (;;) { - ::std::pair< ::google::protobuf::uint32, bool> p = - input->ReadTagWithCutoff(127); + ::std::pair< ::google::protobuf::uint32, bool> p = input->ReadTagWithCutoff(127); tag = p.first; if (!p.second) goto handle_unusual; - switch ( - ::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated int32 extension_number = 1; + switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { + // optional int32 error_code = 1; case 1: { - if (tag == 10) { - DO_(( - ::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< - ::google::protobuf::int32, - ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, this->mutable_extension_number()))); - } else if (tag == 8) { - DO_(( - ::google::protobuf::internal::WireFormatLite:: - ReadRepeatedPrimitiveNoInline< - ::google::protobuf::int32, - ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - 1, 10, input, this->mutable_extension_number()))); + if (tag == 8) { + DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< + ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( + input, &error_code_))); + + } else { + goto handle_unusual; + } + if (input->ExpectTag(18)) goto parse_error_message; + break; + } + + // optional string error_message = 2; + case 2: { + if (tag == 18) { + parse_error_message: + DO_(::google::protobuf::internal::WireFormatLite::ReadString( + input, this->mutable_error_message())); + DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->error_message().data(), this->error_message().length(), + ::google::protobuf::internal::WireFormatLite::PARSE, + "grpc.reflection.v1alpha.ErrorResponse.error_message")); } else { goto handle_unusual; } @@ -2263,85 +3127,82 @@ bool ExtensionNumberResponse::MergePartialFromCodedStream( handle_unusual: if (tag == 0 || ::google::protobuf::internal::WireFormatLite::GetTagWireType(tag) == - ::google::protobuf::internal::WireFormatLite:: - WIRETYPE_END_GROUP) { + ::google::protobuf::internal::WireFormatLite::WIRETYPE_END_GROUP) { goto success; } - DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, - tag)); + DO_(::google::protobuf::internal::WireFormatLite::SkipField(input, tag)); break; } } } success: - // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ExtensionNumberResponse) + // @@protoc_insertion_point(parse_success:grpc.reflection.v1alpha.ErrorResponse) return true; failure: - // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ExtensionNumberResponse) + // @@protoc_insertion_point(parse_failure:grpc.reflection.v1alpha.ErrorResponse) return false; #undef DO_ } -void ExtensionNumberResponse::SerializeWithCachedSizes( +void ErrorResponse::SerializeWithCachedSizes( ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ExtensionNumberResponse) - // repeated int32 extension_number = 1; - if (this->extension_number_size() > 0) { - ::google::protobuf::internal::WireFormatLite::WriteTag( - 1, - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, - output); - output->WriteVarint32(_extension_number_cached_byte_size_); + // @@protoc_insertion_point(serialize_start:grpc.reflection.v1alpha.ErrorResponse) + // optional int32 error_code = 1; + if (this->error_code() != 0) { + ::google::protobuf::internal::WireFormatLite::WriteInt32(1, this->error_code(), output); } - for (int i = 0; i < this->extension_number_size(); i++) { - ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( - this->extension_number(i), output); + + // optional string error_message = 2; + if (this->error_message().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->error_message().data(), this->error_message().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ErrorResponse.error_message"); + ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( + 2, this->error_message(), output); } - // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ExtensionNumberResponse) + // @@protoc_insertion_point(serialize_end:grpc.reflection.v1alpha.ErrorResponse) } -::google::protobuf::uint8* -ExtensionNumberResponse::SerializeWithCachedSizesToArray( +::google::protobuf::uint8* ErrorResponse::SerializeWithCachedSizesToArray( ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ExtensionNumberResponse) - // repeated int32 extension_number = 1; - if (this->extension_number_size() > 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( - 1, - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, - target); - target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( - _extension_number_cached_byte_size_, target); + // @@protoc_insertion_point(serialize_to_array_start:grpc.reflection.v1alpha.ErrorResponse) + // optional int32 error_code = 1; + if (this->error_code() != 0) { + target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(1, this->error_code(), target); } - for (int i = 0; i < this->extension_number_size(); i++) { + + // optional string error_message = 2; + if (this->error_message().size() > 0) { + ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( + this->error_message().data(), this->error_message().length(), + ::google::protobuf::internal::WireFormatLite::SERIALIZE, + "grpc.reflection.v1alpha.ErrorResponse.error_message"); target = - ::google::protobuf::internal::WireFormatLite::WriteInt32NoTagToArray( - this->extension_number(i), target); + ::google::protobuf::internal::WireFormatLite::WriteStringToArray( + 2, this->error_message(), target); } - // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ExtensionNumberResponse) + // @@protoc_insertion_point(serialize_to_array_end:grpc.reflection.v1alpha.ErrorResponse) return target; } -int ExtensionNumberResponse::ByteSize() const { +int ErrorResponse::ByteSize() const { int total_size = 0; - // repeated int32 extension_number = 1; - { - int data_size = 0; - for (int i = 0; i < this->extension_number_size(); i++) { - data_size += ::google::protobuf::internal::WireFormatLite::Int32Size( - this->extension_number(i)); - } - if (data_size > 0) { - total_size += 1 + ::google::protobuf::internal::WireFormatLite::Int32Size( - data_size); - } - GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); - _extension_number_cached_byte_size_ = data_size; - GOOGLE_SAFE_CONCURRENT_WRITES_END(); - total_size += data_size; + // optional int32 error_code = 1; + if (this->error_code() != 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::Int32Size( + this->error_code()); + } + + // optional string error_message = 2; + if (this->error_message().size() > 0) { + total_size += 1 + + ::google::protobuf::internal::WireFormatLite::StringSize( + this->error_message()); } GOOGLE_SAFE_CONCURRENT_WRITES_BEGIN(); @@ -2350,12 +3211,11 @@ int ExtensionNumberResponse::ByteSize() const { return total_size; } -void ExtensionNumberResponse::MergeFrom( - const ::google::protobuf::Message& from) { +void ErrorResponse::MergeFrom(const ::google::protobuf::Message& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - const ExtensionNumberResponse* source = - ::google::protobuf::internal::DynamicCastToGenerated< - const ExtensionNumberResponse>(&from); + const ErrorResponse* source = + ::google::protobuf::internal::DynamicCastToGenerated( + &from); if (source == NULL) { ::google::protobuf::internal::ReflectionOps::Merge(from, this); } else { @@ -2363,78 +3223,111 @@ void ExtensionNumberResponse::MergeFrom( } } -void ExtensionNumberResponse::MergeFrom(const ExtensionNumberResponse& from) { +void ErrorResponse::MergeFrom(const ErrorResponse& from) { if (GOOGLE_PREDICT_FALSE(&from == this)) MergeFromFail(__LINE__); - extension_number_.MergeFrom(from.extension_number_); + if (from.error_code() != 0) { + set_error_code(from.error_code()); + } + if (from.error_message().size() > 0) { + + error_message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_message_); + } } -void ExtensionNumberResponse::CopyFrom( - const ::google::protobuf::Message& from) { +void ErrorResponse::CopyFrom(const ::google::protobuf::Message& from) { if (&from == this) return; Clear(); MergeFrom(from); } -void ExtensionNumberResponse::CopyFrom(const ExtensionNumberResponse& from) { +void ErrorResponse::CopyFrom(const ErrorResponse& from) { if (&from == this) return; Clear(); MergeFrom(from); } -bool ExtensionNumberResponse::IsInitialized() const { return true; } +bool ErrorResponse::IsInitialized() const { -void ExtensionNumberResponse::Swap(ExtensionNumberResponse* other) { + return true; +} + +void ErrorResponse::Swap(ErrorResponse* other) { if (other == this) return; InternalSwap(other); } -void ExtensionNumberResponse::InternalSwap(ExtensionNumberResponse* other) { - extension_number_.UnsafeArenaSwap(&other->extension_number_); +void ErrorResponse::InternalSwap(ErrorResponse* other) { + std::swap(error_code_, other->error_code_); + error_message_.Swap(&other->error_message_); _internal_metadata_.Swap(&other->_internal_metadata_); std::swap(_cached_size_, other->_cached_size_); } -::google::protobuf::Metadata ExtensionNumberResponse::GetMetadata() const { +::google::protobuf::Metadata ErrorResponse::GetMetadata() const { protobuf_AssignDescriptorsOnce(); ::google::protobuf::Metadata metadata; - metadata.descriptor = ExtensionNumberResponse_descriptor_; - metadata.reflection = ExtensionNumberResponse_reflection_; + metadata.descriptor = ErrorResponse_descriptor_; + metadata.reflection = ErrorResponse_reflection_; return metadata; } #if PROTOBUF_INLINE_NOT_IN_HEADERS -// ExtensionNumberResponse +// ErrorResponse -// repeated int32 extension_number = 1; -int ExtensionNumberResponse::extension_number_size() const { - return extension_number_.size(); +// optional int32 error_code = 1; +void ErrorResponse::clear_error_code() { + error_code_ = 0; } -void ExtensionNumberResponse::clear_extension_number() { - extension_number_.Clear(); + ::google::protobuf::int32 ErrorResponse::error_code() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_code) + return error_code_; } -::google::protobuf::int32 ExtensionNumberResponse::extension_number( - int index) const { - // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) - return extension_number_.Get(index); + void ErrorResponse::set_error_code(::google::protobuf::int32 value) { + + error_code_ = value; + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_code) } -void ExtensionNumberResponse::set_extension_number( - int index, ::google::protobuf::int32 value) { - extension_number_.Set(index, value); - // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + +// optional string error_message = 2; +void ErrorResponse::clear_error_message() { + error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -void ExtensionNumberResponse::add_extension_number( - ::google::protobuf::int32 value) { - extension_number_.Add(value); - // @@protoc_insertion_point(field_add:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) + const ::std::string& ErrorResponse::error_message() const { + // @@protoc_insertion_point(field_get:grpc.reflection.v1alpha.ErrorResponse.error_message) + return error_message_.GetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); } -const ::google::protobuf::RepeatedField< ::google::protobuf::int32>& -ExtensionNumberResponse::extension_number() const { - // @@protoc_insertion_point(field_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) - return extension_number_; + void ErrorResponse::set_error_message(const ::std::string& value) { + + error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); + // @@protoc_insertion_point(field_set:grpc.reflection.v1alpha.ErrorResponse.error_message) } -::google::protobuf::RepeatedField< ::google::protobuf::int32>* -ExtensionNumberResponse::mutable_extension_number() { - // @@protoc_insertion_point(field_mutable_list:grpc.reflection.v1alpha.ExtensionNumberResponse.extension_number) - return &extension_number_; + void ErrorResponse::set_error_message(const char* value) { + + error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + // @@protoc_insertion_point(field_set_char:grpc.reflection.v1alpha.ErrorResponse.error_message) +} + void ErrorResponse::set_error_message(const char* value, size_t size) { + + error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + ::std::string(reinterpret_cast(value), size)); + // @@protoc_insertion_point(field_set_pointer:grpc.reflection.v1alpha.ErrorResponse.error_message) +} + ::std::string* ErrorResponse::mutable_error_message() { + + // @@protoc_insertion_point(field_mutable:grpc.reflection.v1alpha.ErrorResponse.error_message) + return error_message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + ::std::string* ErrorResponse::release_error_message() { + + return error_message_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); +} + void ErrorResponse::set_allocated_error_message(::std::string* error_message) { + if (error_message != NULL) { + + } else { + + } + error_message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), error_message); + // @@protoc_insertion_point(field_set_allocated:grpc.reflection.v1alpha.ErrorResponse.error_message) } #endif // PROTOBUF_INLINE_NOT_IN_HEADERS diff --git a/src/proto/grpc/reflection/v1alpha/reflection.proto b/src/proto/grpc/reflection/v1alpha/reflection.proto index 4b13bd1e51c..6e6a0b08644 100644 --- a/src/proto/grpc/reflection/v1alpha/reflection.proto +++ b/src/proto/grpc/reflection/v1alpha/reflection.proto @@ -34,85 +34,98 @@ syntax = "proto3"; package grpc.reflection.v1alpha; service ServerReflection { - // List the full names of registered services. - rpc ListService(EmptyRequest) returns (ListServiceResponse) { - } - - // Find a proto file by file name. - rpc GetFileByName(FileNameRequest) returns (FileDescriptorProtoResponse) { - } - - // Find the proto file that declares the given fully-qualified symbol name. - rpc GetFileContainingSymbol(SymbolRequest) - returns (FileDescriptorProtoResponse) { - } - - // Find the proto file which defines an extension extending the given message - // type with the given field number. - rpc GetFileContainingExtension(ExtensionRequest) - returns (FileDescriptorProtoResponse) { - } - - // Finds the tag numbers used by all known extensions of extendee_type, and - // appends them to ExtensionNumberResponse in an undefined order. - // This method is best-effort: it's not guaranteed that the reflection service - // will implement this method, and it's not guaranteed that this method will - // provide all extensions. Returns StatusCode::UNIMPLEMENTED if it's not - // implemented. - rpc GetAllExtensionNumbers(TypeRequest) returns (ExtensionNumberResponse) { - } -} - -// An empty message sent by the client when calling ListService method. -message EmptyRequest { -} - -// The filename sent by the client when calling GetFileByName method. -message FileNameRequest { - // Name of the proto file. - string filename = 1; + // The reflection service is structured as a bidirectional stream, ensuring + // all related requests go to a single server. + rpc DescriptorDatabaseInfo(stream DescriptorDatabaseRequest) + returns (stream DescriptorDatabaseResponse); } -// The symbol name sent by the client when calling GetFileContainingSymbol -// method. -message SymbolRequest { - // Fully-qualified symbol name (e.g. .[.] or - // .). - string symbol = 1; +// The message sent by the client when calling DescriptorDatabaseInfo method. +message DescriptorDatabaseRequest { + string host = 1; + // To use reflection service, the client should set one of the following + // fields in message_request. The server distinguishes requests by their + // defined field and then handles them using corresponding methods. + oneof message_request { + // Find a proto file by the file name. + string file_by_filename = 3; + + // Find the proto file that declares the given fully-qualified symbol name. + // This field should be a fully-qualified symbol name + // (e.g. .[.] or .). + string file_containing_symbol = 4; + + // Find the proto file which defines an extension extending the given + // message type with the given field number. + ExtensionRequest file_containing_extension = 5; + + // Finds the tag numbers used by all known extensions of extendee_type, and + // appends them to ExtensionNumberResponse in an undefined order. + // Its corresponding method is best-effort: it's not guaranteed that the + // reflection service will implement this method, and it's not guaranteed + // that this method will provide all extensions. Returns + // StatusCode::UNIMPLEMENTED if it's not implemented. + // This field should be a fully-qualified type name. The format is + // . + string all_extension_numbers_of_type = 6; + + // List the full names of registered services. The content will not be + // checked. + string list_services = 7; + } } -// The type name and extension number sent by the client when calling -// GetFileContainingExtension method. +// The type name and extension number sent by the client when requesting +// file_containing_extension. message ExtensionRequest { // Fully-qualified type name. The format should be . string containing_type = 1; int32 extension_number = 2; } -// The type name sent by the client when calling GetAllExtensionNumbers method. -message TypeRequest { - // Fully-qualified type name. The format should be . - string type = 1; +// The message sent by the server to answer DescriptorDatabaseInfo method. +message DescriptorDatabaseResponse { + string valid_host = 1; + DescriptorDatabaseRequest original_request = 2; + // The server set one of the following fields accroding to the message_request + // in the request. + oneof message_response { + // A serialized FileDescriptorProto message. We avoid taking a dependency on + // descriptor.proto, which uses proto2 only features, by making them opaque + // bytes instead. This message is used to answer file_by_filename, + // file_containing_symbol, file_containing_extension requests. + bytes file_descriptor_proto = 4; + + // This message is used to answer all_extension_numbers_of_type requst. + ExtensionNumberResponse all_extension_numbers_response = 5; + + // This message is used to answer list_services request. + ListServiceResponse list_services_response = 6; + + // This message is used when an error occurs. + ErrorResponse error_response = 7; + } +} + +// A list of extension numbers sent by the server answering +// all_extension_numbers_of_type request. +message ExtensionNumberResponse { + // Full name of the base type, including the package name. The format + // is . + string base_type_name = 1; + repeated int32 extension_number = 2; } -// A list of service names sent by the server answering ListService method. +// A list of service names sent by the server answering list_services request. message ListServiceResponse { // Full names of registered services, including package names. The format // is . - repeated string services = 1; -} - -// A serialized FileDescriptorProto sent by the server answering -// GetFileByName, GetFileContainingSymbol, GetFileContainingExtension methods. -message FileDescriptorProtoResponse { - // Serialized FileDescriptorProto message. Some languages have limited support - // for working with descriptors. The can only obtain an opaque binary blob - // that contains serialized FileDescriptorProto message. - bytes file_descriptor_proto = 1; + repeated string service = 1; } -// A list of extension numbers sent by the server answering -// GetAllExtensionNumbers method. -message ExtensionNumberResponse { - repeated int32 extension_number = 1; +// The error code and error message sent by the server when an error occurs. +message ErrorResponse { + // This field uses the error codes defined in grpc::StatusCode. + int32 error_code = 1; + string error_message = 2; } diff --git a/test/cpp/util/proto_reflection_descriptor_database.cc b/test/cpp/util/proto_reflection_descriptor_database.cc index c2ed93c12b6..4ed069ffc26 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.cc +++ b/test/cpp/util/proto_reflection_descriptor_database.cc @@ -37,15 +37,21 @@ #include +using grpc::reflection::v1alpha::ServerReflection; +using grpc::reflection::v1alpha::DescriptorDatabaseRequest; +using grpc::reflection::v1alpha::DescriptorDatabaseResponse; +using grpc::reflection::v1alpha::ListServiceResponse; +using grpc::reflection::v1alpha::ErrorResponse; + namespace grpc { ProtoReflectionDescriptorDatabase::ProtoReflectionDescriptorDatabase( - std::unique_ptr stub) + std::unique_ptr stub) : stub_(std::move(stub)) {} ProtoReflectionDescriptorDatabase::ProtoReflectionDescriptorDatabase( std::shared_ptr channel) - : stub_(reflection::v1alpha::ServerReflection::NewStub(channel)) {} + : stub_(ServerReflection::NewStub(channel)) {} ProtoReflectionDescriptorDatabase::~ProtoReflectionDescriptorDatabase() {} @@ -59,28 +65,40 @@ bool ProtoReflectionDescriptorDatabase::FindFileByName( return false; } - ClientContext ctx; - reflection::v1alpha::FileNameRequest request; - request.set_filename(filename); - reflection::v1alpha::FileDescriptorProtoResponse response; + DescriptorDatabaseRequest request; + request.set_file_by_filename(filename); + DescriptorDatabaseResponse response; + + GetStream()->Write(request); + GetStream()->Read(&response); - Status status = stub_->GetFileByName(&ctx, request, &response); - if (status.ok()) { - // const google::protobuf::FileDescriptorProto* file_proto = - // response.mutable_file_descriptor_proto(); + if (response.message_response_case() == + DescriptorDatabaseResponse::MessageResponseCase::kFileDescriptorProto) { const google::protobuf::FileDescriptorProto file_proto = - ParseFileDescriptorProtoResponse(&response); + ParseFileDescriptorProtoResponse(response.file_descriptor_proto()); known_files_.insert(file_proto.name()); cached_db_.Add(file_proto); - } else if (status.error_code() == StatusCode::NOT_FOUND) { - gpr_log(GPR_INFO, "NOT_FOUND from server for FindFileByName(%s)", - filename.c_str()); + } else if (response.message_response_case() == + DescriptorDatabaseResponse::MessageResponseCase::kErrorResponse) { + const ErrorResponse error = response.error_response(); + if (error.error_code() == StatusCode::NOT_FOUND) { + gpr_log(GPR_INFO, "NOT_FOUND from server for FindFileByName(%s)", + filename.c_str()); + } else { + gpr_log(GPR_INFO, + "Error on FindFileByName(%s)\n\tError code: %d\n" + "\tError Message: %s", + filename.c_str(), error.error_code(), + error.error_message().c_str()); + } } else { - gpr_log(GPR_INFO, - "Error on FindFileByName(%s)\n\tError code: %d\n" - "\tError Message: %s", - filename.c_str(), status.error_code(), - status.error_message().c_str()); + gpr_log( + GPR_INFO, + "Error on FindFileByName(%s) response type\n" + "\tExpecting: %d\n\tReceived: %d", + filename.c_str(), + DescriptorDatabaseResponse::MessageResponseCase::kFileDescriptorProto, + response.message_response_case()); } return cached_db_.FindFileByName(filename, output); @@ -96,31 +114,46 @@ bool ProtoReflectionDescriptorDatabase::FindFileContainingSymbol( return false; } - ClientContext ctx; - reflection::v1alpha::SymbolRequest request; - request.set_symbol(symbol_name); - reflection::v1alpha::FileDescriptorProtoResponse response; + DescriptorDatabaseRequest request; + request.set_file_containing_symbol(symbol_name); + DescriptorDatabaseResponse response; + + GetStream()->Write(request); + GetStream()->Read(&response); - Status status = stub_->GetFileContainingSymbol(&ctx, request, &response); - if (status.ok()) { + // Status status = stub_->GetFileContainingSymbol(&ctx, request, &response); + if (response.message_response_case() == + DescriptorDatabaseResponse::MessageResponseCase::kFileDescriptorProto) { const google::protobuf::FileDescriptorProto file_proto = - ParseFileDescriptorProtoResponse(&response); + ParseFileDescriptorProtoResponse(response.file_descriptor_proto()); if (known_files_.find(file_proto.name()) == known_files_.end()) { known_files_.insert(file_proto.name()); cached_db_.Add(file_proto); } - } else if (status.error_code() == StatusCode::NOT_FOUND) { - missing_symbols_.insert(symbol_name); - gpr_log(GPR_INFO, "NOT_FOUND from server for FindFileContainingSymbol(%s)", - symbol_name.c_str()); + } else if (response.message_response_case() == + DescriptorDatabaseResponse::MessageResponseCase::kErrorResponse) { + const ErrorResponse error = response.error_response(); + if (error.error_code() == StatusCode::NOT_FOUND) { + missing_symbols_.insert(symbol_name); + gpr_log(GPR_INFO, + "NOT_FOUND from server for FindFileContainingSymbol(%s)", + symbol_name.c_str()); + } else { + gpr_log(GPR_INFO, + "Error on FindFileContainingSymbol(%s)\n" + "\tError code: %d\n\tError Message: %s", + symbol_name.c_str(), error.error_code(), + error.error_message().c_str()); + } } else { - gpr_log(GPR_INFO, - "Error on FindFileContainingSymbol(%s)\n" - "\tError code: %d\n\tError Message: %s", - symbol_name.c_str(), status.error_code(), - status.error_message().c_str()); + gpr_log( + GPR_INFO, + "Error on FindFileContainingSymbol(%s) response type\n" + "\tExpecting: %d\n\tReceived: %d", + symbol_name.c_str(), + DescriptorDatabaseResponse::MessageResponseCase::kFileDescriptorProto, + response.message_response_case()); } - return cached_db_.FindFileContainingSymbol(symbol_name, output); } @@ -139,35 +172,53 @@ bool ProtoReflectionDescriptorDatabase::FindFileContainingExtension( return false; } - ClientContext ctx; - reflection::v1alpha::ExtensionRequest request; - request.set_containing_type(containing_type); - request.set_extension_number(field_number); - reflection::v1alpha::FileDescriptorProtoResponse response; + DescriptorDatabaseRequest request; + request.mutable_file_containing_extension()->set_containing_type( + containing_type); + request.mutable_file_containing_extension()->set_extension_number( + field_number); + DescriptorDatabaseResponse response; - Status status = stub_->GetFileContainingExtension(&ctx, request, &response); - if (status.ok()) { + GetStream()->Write(request); + GetStream()->Read(&response); + + // Status status = stub_->GetFileContainingExtension(&ctx, request, + // &response); + if (response.message_response_case() == + DescriptorDatabaseResponse::MessageResponseCase::kFileDescriptorProto) { const google::protobuf::FileDescriptorProto file_proto = - ParseFileDescriptorProtoResponse(&response); + ParseFileDescriptorProtoResponse(response.file_descriptor_proto()); if (known_files_.find(file_proto.name()) == known_files_.end()) { known_files_.insert(file_proto.name()); cached_db_.Add(file_proto); } - } else if (status.error_code() == StatusCode::NOT_FOUND) { - if (missing_extensions_.find(containing_type) == - missing_extensions_.end()) { - missing_extensions_[containing_type] = {}; + } else if (response.message_response_case() == + DescriptorDatabaseResponse::MessageResponseCase::kErrorResponse) { + const ErrorResponse error = response.error_response(); + if (error.error_code() == StatusCode::NOT_FOUND) { + if (missing_extensions_.find(containing_type) == + missing_extensions_.end()) { + missing_extensions_[containing_type] = {}; + } + missing_extensions_[containing_type].insert(field_number); + gpr_log(GPR_INFO, + "NOT_FOUND from server for FindFileContainingExtension(%s, %d)", + containing_type.c_str(), field_number); + } else { + gpr_log(GPR_INFO, + "Error on FindFileContainingExtension(%s, %d)\n" + "\tError code: %d\n\tError Message: %s", + containing_type.c_str(), field_number, error.error_code(), + error.error_message().c_str()); } - missing_extensions_[containing_type].insert(field_number); - gpr_log(GPR_INFO, - "NOT_FOUND from server for FindFileContainingExtension(%s, %d)", - containing_type.c_str(), field_number); } else { - gpr_log(GPR_INFO, - "Error on FindFileContainingExtension(%s, %d)\n" - "\tError code: %d\n\tError Message: %s", - containing_type.c_str(), field_number, status.error_code(), - status.error_message().c_str()); + gpr_log( + GPR_INFO, + "Error on FindFileContainingExtension(%s, %d) response type\n" + "\tExpecting: %d\n\tReceived: %d", + containing_type.c_str(), field_number, + DescriptorDatabaseResponse::MessageResponseCase::kFileDescriptorProto, + response.message_response_case()); } return cached_db_.FindFileContainingExtension(containing_type, field_number, @@ -182,57 +233,86 @@ bool ProtoReflectionDescriptorDatabase::FindAllExtensionNumbers( return true; } - ClientContext ctx; - reflection::v1alpha::TypeRequest request; - request.set_type(extendee_type); - reflection::v1alpha::ExtensionNumberResponse response; + DescriptorDatabaseRequest request; + request.set_all_extension_numbers_of_type(extendee_type); + DescriptorDatabaseResponse response; + + GetStream()->Write(request); + GetStream()->Read(&response); - Status status = stub_->GetAllExtensionNumbers(&ctx, request, &response); - if (status.ok()) { - auto number = response.extension_number(); + // Status status = stub_->GetAllExtensionNumbers(&ctx, request, &response); + if (response.message_response_case() == + DescriptorDatabaseResponse::MessageResponseCase:: + kAllExtensionNumbersResponse) { + auto number = response.all_extension_numbers_response().extension_number(); *output = std::vector(number.begin(), number.end()); cached_extension_numbers_[extendee_type] = *output; return true; - } else if (status.error_code() == StatusCode::NOT_FOUND) { - gpr_log(GPR_INFO, "NOT_FOUND from server for FindAllExtensionNumbers(%s)", - extendee_type.c_str()); - } else { - gpr_log(GPR_INFO, - "Error on FindAllExtensionNumbersExtension(%s)\n" - "\tError code: %d\n\tError Message: %s", - extendee_type.c_str(), status.error_code(), - status.error_message().c_str()); + } else if (response.message_response_case() == + DescriptorDatabaseResponse::MessageResponseCase::kErrorResponse) { + const ErrorResponse error = response.error_response(); + if (error.error_code() == StatusCode::NOT_FOUND) { + gpr_log(GPR_INFO, "NOT_FOUND from server for FindAllExtensionNumbers(%s)", + extendee_type.c_str()); + } else { + gpr_log(GPR_INFO, + "Error on FindAllExtensionNumbersExtension(%s)\n" + "\tError code: %d\n\tError Message: %s", + extendee_type.c_str(), error.error_code(), + error.error_message().c_str()); + } } return false; } bool ProtoReflectionDescriptorDatabase::GetServices( std::vector* output) { - ClientContext ctx; - reflection::v1alpha::EmptyRequest request; - reflection::v1alpha::ListServiceResponse response; - - Status status = stub_->ListService(&ctx, request, &response); - if (status.ok()) { - for (int i = 0; i < response.services_size(); ++i) { - (*output).push_back(response.services(i)); + DescriptorDatabaseRequest request; + request.set_list_services(""); + DescriptorDatabaseResponse response; + GetStream()->Write(request); + GetStream()->Read(&response); + + // Status status = stub_->ListService(&ctx, request, &response); + if (response.message_response_case() == + DescriptorDatabaseResponse::MessageResponseCase::kListServicesResponse) { + const ListServiceResponse ls_response = response.list_services_response(); + for (int i = 0; i < ls_response.service_size(); ++i) { + (*output).push_back(ls_response.service(i)); } return true; - } else { + } else if (response.message_response_case() == + DescriptorDatabaseResponse::MessageResponseCase::kErrorResponse) { + const ErrorResponse error = response.error_response(); gpr_log(GPR_INFO, "Error on GetServices()\n\tError code: %d\n" "\tError Message: %s", - status.error_code(), status.error_message().c_str()); + error.error_code(), error.error_message().c_str()); + } else { + gpr_log( + GPR_INFO, + "Error on GetServices() response type\n\tExpecting: %d\n\tReceived: %d", + DescriptorDatabaseResponse::MessageResponseCase::kListServicesResponse, + response.message_response_case()); } return false; } const google::protobuf::FileDescriptorProto ProtoReflectionDescriptorDatabase::ParseFileDescriptorProtoResponse( - reflection::v1alpha::FileDescriptorProtoResponse* response) { + const std::string& byte_fd_proto) { google::protobuf::FileDescriptorProto file_desc_proto; - file_desc_proto.ParseFromString(response->file_descriptor_proto()); + file_desc_proto.ParseFromString(byte_fd_proto); return file_desc_proto; } +const std::shared_ptr +ProtoReflectionDescriptorDatabase::GetStream() { + if (stream_ == nullptr) { + stream_ = stub_->DescriptorDatabaseInfo(&ctx_); + // stream_.reset(std::move(stub_->DescriptorDatabaseInfo(&ctx_))); + } + return stream_; +} + } // namespace grpc diff --git a/test/cpp/util/proto_reflection_descriptor_database.h b/test/cpp/util/proto_reflection_descriptor_database.h index bf94654c3de..f37135e681f 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.h +++ b/test/cpp/util/proto_reflection_descriptor_database.h @@ -80,9 +80,18 @@ class ProtoReflectionDescriptorDatabase } private: + typedef ClientReaderWriter< + grpc::reflection::v1alpha::DescriptorDatabaseRequest, + grpc::reflection::v1alpha::DescriptorDatabaseResponse> + ClientStream; + const google::protobuf::FileDescriptorProto ParseFileDescriptorProtoResponse( - reflection::v1alpha::FileDescriptorProtoResponse* response); + const std::string& byte_fd_proto); + + const std::shared_ptr GetStream(); + std::shared_ptr stream_; + grpc::ClientContext ctx_; std::unique_ptr stub_; std::unordered_set known_files_; std::unordered_set missing_symbols_; diff --git a/test/cpp/util/reflection_debug/reflection_client.cc b/test/cpp/util/reflection_debug/reflection_client.cc index fb406275148..a1e97f7edec 100644 --- a/test/cpp/util/reflection_debug/reflection_client.cc +++ b/test/cpp/util/reflection_debug/reflection_client.cc @@ -48,8 +48,8 @@ using grpc::ClientContext; using grpc::Status; using grpc::ProtoReflectionDescriptorDatabase; using grpc::reflection::v1alpha::ServerReflection; -using grpc::reflection::v1alpha::EmptyRequest; -using grpc::reflection::v1alpha::ListServiceResponse; +// using grpc::reflection::v1alpha::EmptyRequest; +// using grpc::reflection::v1alpha::ListServiceResponse; using google::protobuf::FileDescriptorProto; using google::protobuf::DescriptorPool; using google::protobuf::ServiceDescriptor; @@ -65,28 +65,22 @@ class ReflectionClient { desc_pool_(new DescriptorPool(db_.get())) {} void PrintInfo() { - EmptyRequest request; - ListServiceResponse response; - ClientContext context; - Status status = db_->stub()->ListService(&context, request, &response); - if (status.ok()) { + std::vector services; + bool found_services = db_->GetServices(&services); + if (found_services) { std::string padding = ""; - std::cout << "Service amount:" << response.services_size() << std::endl; - for (int i = 0; i < response.services_size(); ++i) { - if (i != response.services_size() - 1) { + std::cout << "Service amount:" << services.size() << std::endl; + for (auto it = services.begin(); it != services.end(); ++it) { + if (it != services.end() - 1) { std::cout << padding << "│ " << std::endl; - std::cout << padding << "├─" << response.services(i) << std::endl; - PrintService(desc_pool_->FindServiceByName(response.services(i)), - padding + "│ "); + std::cout << padding << "├─" << *it << std::endl; + PrintService(desc_pool_->FindServiceByName(*it), padding + "│ "); } else { std::cout << padding << "│ " << std::endl; - std::cout << padding << "└─" << response.services(i) << std::endl; - PrintService(desc_pool_->FindServiceByName(response.services(i)), - padding + " "); + std::cout << padding << "└─" << *it << std::endl; + PrintService(desc_pool_->FindServiceByName(*it), padding + " "); } } - } else { - std::cout << status.error_message(); } } @@ -157,6 +151,15 @@ class ReflectionClient { } void Test() { + { + std::vector services; + bool found = db_->GetServices(&services); + if (found) { + for (auto it : services) { + std::cout << it << std::endl; + } + } + } { FileDescriptorProto output; bool found = db_->FindFileByName("helloworld.proto", &output); @@ -176,9 +179,9 @@ class ReflectionClient { "helloworld.Greeter.HelloRequest", 1, &output); if (found) std::cout << output.name() << std::endl; } - DescriptorPool pool(db_.get()); - std::cout << pool.FindServiceByName("helloworld.Greeter")->name() - << std::endl; + // DescriptorPool pool(db_.get()); + // std::cout << pool.FindServiceByName("helloworld.Greeter")->name() + // << std::endl; } private: diff --git a/tools/codegen/extensions/gen_reflection_proto.sh b/tools/codegen/extensions/gen_reflection_proto.sh index f0bb6e5ccc6..26f9e4711ae 100755 --- a/tools/codegen/extensions/gen_reflection_proto.sh +++ b/tools/codegen/extensions/gen_reflection_proto.sh @@ -1,4 +1,34 @@ #!/bin/bash + +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + PROTO_DIR="src/proto/grpc/reflection/v1alpha" PROTO_FILE="reflection" HEADER_DIR="extensions/include/grpc++/impl" @@ -22,9 +52,19 @@ $PROTOC -I$PROTO_DIR --cpp_out=$TMP_DIR ${PROTO_DIR}/${PROTO_FILE}.proto $PROTOC -I$PROTO_DIR --grpc_out=$TMP_DIR --plugin=protoc-gen-grpc=${GRPC_PLUGIN} ${PROTO_DIR}/${PROTO_FILE}.proto sed -i "s/\"${PROTO_FILE}.pb.h\"/<${INCLUDE_DIR/\//\\\/}\/${PROTO_FILE}.pb.h>/g" ${TMP_DIR}/${PROTO_FILE}.pb.cc +sed -i "s/\"${PROTO_FILE}.pb.h\"/<${INCLUDE_DIR/\//\\\/}\/${PROTO_FILE}.pb.h>/g" ${TMP_DIR}/${PROTO_FILE}.grpc.pb.h sed -i "s/\"${PROTO_FILE}.pb.h\"/<${INCLUDE_DIR/\//\\\/}\/${PROTO_FILE}.pb.h>/g" ${TMP_DIR}/${PROTO_FILE}.grpc.pb.cc sed -i "s/\"${PROTO_FILE}.grpc.pb.h\"/<${INCLUDE_DIR/\//\\\/}\/${PROTO_FILE}.grpc.pb.h>/g" ${TMP_DIR}/${PROTO_FILE}.grpc.pb.cc -sed -i "s/\"${PROTO_FILE}.pb.h\"/<${INCLUDE_DIR/\//\\\/}\/${PROTO_FILE}.pb.h>/g" ${TMP_DIR}/${PROTO_FILE}.grpc.pb.h + +/bin/cp LICENSE ${TMP_DIR}/TMP_LICENSE +sed -i -e "s/./ &/" -e "s/.*/ \*&/" ${TMP_DIR}/TMP_LICENSE +sed -i -r "\$a\ *\n *\/\n\n" ${TMP_DIR}/TMP_LICENSE + +sed -i -e "1s/^/ *\n/" -e "1s/^/\/*\n/" ${TMP_DIR}/*.pb.h +sed -i -e "1s/^/ *\n/" -e "1s/^/\/*\n/" ${TMP_DIR}/*.pb.cc + +sed -i "2r ${TMP_DIR}/TMP_LICENSE" ${TMP_DIR}/*.pb.h +sed -i "2r ${TMP_DIR}/TMP_LICENSE" ${TMP_DIR}/*.pb.cc /bin/mv ${TMP_DIR}/${PROTO_FILE}.pb.h ${HEADER_DIR} /bin/mv ${TMP_DIR}/${PROTO_FILE}.grpc.pb.h ${HEADER_DIR} From ddad97899654c1eb3805ec165e842f8f465702a1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 5 May 2016 17:11:31 -0700 Subject: [PATCH 0311/1894] API fuzzer compiles with new error handling --- BUILD | 4 +++ Makefile | 2 ++ binding.gyp | 1 + build.yaml | 2 ++ config.m4 | 1 + gRPC.podspec | 3 ++ grpc.gemspec | 2 ++ package.xml | 2 ++ src/core/lib/iomgr/error.c | 11 ++++++ src/python/grpcio/grpc_core_dependencies.py | 1 + test/core/end2end/fuzzers/api_fuzzer.c | 36 ++++++++++++-------- test/core/iomgr/endpoint_tests.c | 16 ++++----- test/core/security/oauth2_utils.c | 3 +- test/core/util/mock_endpoint.c | 9 ++--- test/core/util/passthru_endpoint.c | 19 ++++++----- test/core/util/port_server_client.c | 34 +++++++++++------- tools/doxygen/Doxyfile.core.internal | 2 ++ tools/run_tests/sources_and_headers.json | 3 ++ vsprojects/vcxproj/grpc/grpc.vcxproj | 3 ++ vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 6 ++++ 20 files changed, 112 insertions(+), 48 deletions(-) diff --git a/BUILD b/BUILD index c28d0e7d57d..080498987b6 100644 --- a/BUILD +++ b/BUILD @@ -272,6 +272,7 @@ cc_library( "src/core/lib/security/transport/handshake.h", "src/core/lib/security/transport/secure_endpoint.h", "src/core/lib/security/transport/security_connector.h", + "src/core/lib/security/transport/tsi_error.h", "src/core/lib/security/util/b64.h", "src/core/lib/security/util/json_util.h", "src/core/lib/tsi/fake_transport_security.h", @@ -430,6 +431,7 @@ cc_library( "src/core/lib/security/transport/secure_endpoint.c", "src/core/lib/security/transport/security_connector.c", "src/core/lib/security/transport/server_auth_filter.c", + "src/core/lib/security/transport/tsi_error.c", "src/core/lib/security/util/b64.c", "src/core/lib/security/util/json_util.c", "src/core/lib/surface/init_secure.c", @@ -1462,6 +1464,7 @@ objc_library( "src/core/lib/security/transport/secure_endpoint.c", "src/core/lib/security/transport/security_connector.c", "src/core/lib/security/transport/server_auth_filter.c", + "src/core/lib/security/transport/tsi_error.c", "src/core/lib/security/util/b64.c", "src/core/lib/security/util/json_util.c", "src/core/lib/surface/init_secure.c", @@ -1648,6 +1651,7 @@ objc_library( "src/core/lib/security/transport/handshake.h", "src/core/lib/security/transport/secure_endpoint.h", "src/core/lib/security/transport/security_connector.h", + "src/core/lib/security/transport/tsi_error.h", "src/core/lib/security/util/b64.h", "src/core/lib/security/util/json_util.h", "src/core/lib/tsi/fake_transport_security.h", diff --git a/Makefile b/Makefile index 44108196d4d..6e1c3b6fd45 100644 --- a/Makefile +++ b/Makefile @@ -2604,6 +2604,7 @@ LIBGRPC_SRC = \ src/core/lib/security/transport/secure_endpoint.c \ src/core/lib/security/transport/security_connector.c \ src/core/lib/security/transport/server_auth_filter.c \ + src/core/lib/security/transport/tsi_error.c \ src/core/lib/security/util/b64.c \ src/core/lib/security/util/json_util.c \ src/core/lib/surface/init_secure.c \ @@ -14348,6 +14349,7 @@ src/core/lib/security/transport/handshake.c: $(OPENSSL_DEP) src/core/lib/security/transport/secure_endpoint.c: $(OPENSSL_DEP) src/core/lib/security/transport/security_connector.c: $(OPENSSL_DEP) src/core/lib/security/transport/server_auth_filter.c: $(OPENSSL_DEP) +src/core/lib/security/transport/tsi_error.c: $(OPENSSL_DEP) src/core/lib/security/util/b64.c: $(OPENSSL_DEP) src/core/lib/security/util/json_util.c: $(OPENSSL_DEP) src/core/lib/surface/init_secure.c: $(OPENSSL_DEP) diff --git a/binding.gyp b/binding.gyp index 5029f087bc0..3efec93257d 100644 --- a/binding.gyp +++ b/binding.gyp @@ -690,6 +690,7 @@ 'src/core/lib/security/transport/secure_endpoint.c', 'src/core/lib/security/transport/security_connector.c', 'src/core/lib/security/transport/server_auth_filter.c', + 'src/core/lib/security/transport/tsi_error.c', 'src/core/lib/security/util/b64.c', 'src/core/lib/security/util/json_util.c', 'src/core/lib/surface/init_secure.c', diff --git a/build.yaml b/build.yaml index 4c5d0e903b2..78c1aaf704e 100644 --- a/build.yaml +++ b/build.yaml @@ -421,6 +421,7 @@ filegroups: - src/core/lib/security/transport/handshake.h - src/core/lib/security/transport/secure_endpoint.h - src/core/lib/security/transport/security_connector.h + - src/core/lib/security/transport/tsi_error.h - src/core/lib/security/util/b64.h - src/core/lib/security/util/json_util.h src: @@ -445,6 +446,7 @@ filegroups: - src/core/lib/security/transport/secure_endpoint.c - src/core/lib/security/transport/security_connector.c - src/core/lib/security/transport/server_auth_filter.c + - src/core/lib/security/transport/tsi_error.c - src/core/lib/security/util/b64.c - src/core/lib/security/util/json_util.c - src/core/lib/surface/init_secure.c diff --git a/config.m4 b/config.m4 index aa6d9fd3eb0..7639c4eea06 100644 --- a/config.m4 +++ b/config.m4 @@ -209,6 +209,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/security/transport/secure_endpoint.c \ src/core/lib/security/transport/security_connector.c \ src/core/lib/security/transport/server_auth_filter.c \ + src/core/lib/security/transport/tsi_error.c \ src/core/lib/security/util/b64.c \ src/core/lib/security/util/json_util.c \ src/core/lib/surface/init_secure.c \ diff --git a/gRPC.podspec b/gRPC.podspec index 84841b83006..da147e393dc 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -274,6 +274,7 @@ Pod::Spec.new do |s| 'src/core/lib/security/transport/handshake.h', 'src/core/lib/security/transport/secure_endpoint.h', 'src/core/lib/security/transport/security_connector.h', + 'src/core/lib/security/transport/tsi_error.h', 'src/core/lib/security/util/b64.h', 'src/core/lib/security/util/json_util.h', 'src/core/lib/tsi/fake_transport_security.h', @@ -465,6 +466,7 @@ Pod::Spec.new do |s| 'src/core/lib/security/transport/secure_endpoint.c', 'src/core/lib/security/transport/security_connector.c', 'src/core/lib/security/transport/server_auth_filter.c', + 'src/core/lib/security/transport/tsi_error.c', 'src/core/lib/security/util/b64.c', 'src/core/lib/security/util/json_util.c', 'src/core/lib/surface/init_secure.c', @@ -636,6 +638,7 @@ Pod::Spec.new do |s| 'src/core/lib/security/transport/handshake.h', 'src/core/lib/security/transport/secure_endpoint.h', 'src/core/lib/security/transport/security_connector.h', + 'src/core/lib/security/transport/tsi_error.h', 'src/core/lib/security/util/b64.h', 'src/core/lib/security/util/json_util.h', 'src/core/lib/tsi/fake_transport_security.h', diff --git a/grpc.gemspec b/grpc.gemspec index 49b2b79d845..bad58342597 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -283,6 +283,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/security/transport/handshake.h ) s.files += %w( src/core/lib/security/transport/secure_endpoint.h ) s.files += %w( src/core/lib/security/transport/security_connector.h ) + s.files += %w( src/core/lib/security/transport/tsi_error.h ) s.files += %w( src/core/lib/security/util/b64.h ) s.files += %w( src/core/lib/security/util/json_util.h ) s.files += %w( src/core/lib/tsi/fake_transport_security.h ) @@ -445,6 +446,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/security/transport/secure_endpoint.c ) s.files += %w( src/core/lib/security/transport/security_connector.c ) s.files += %w( src/core/lib/security/transport/server_auth_filter.c ) + s.files += %w( src/core/lib/security/transport/tsi_error.c ) s.files += %w( src/core/lib/security/util/b64.c ) s.files += %w( src/core/lib/security/util/json_util.c ) s.files += %w( src/core/lib/surface/init_secure.c ) diff --git a/package.xml b/package.xml index 57e04245d95..79713e45d5f 100644 --- a/package.xml +++ b/package.xml @@ -290,6 +290,7 @@ + @@ -452,6 +453,7 @@ + diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index 2c5f9f6cbd0..fb8decb8d3a 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -229,6 +229,10 @@ grpc_error *grpc_error_set_int(grpc_error *src, grpc_error_ints which, return new; } +const intptr_t *grpc_error_get_int(grpc_error *err, grpc_error_ints which) { + return gpr_avl_get(err->ints, (void *)(uintptr_t)which); +} + grpc_error *grpc_error_set_str(grpc_error *src, grpc_error_strs which, const char *value) { grpc_error *new = copy_error_and_unref(src); @@ -419,6 +423,13 @@ static const char *finish_kvs(kv_pairs *kvs) { return s; } +void grpc_error_free_string(const char *str) { + if (str == no_error_string) return; + if (str == oom_error_string) return; + if (str == cancelled_error_string) return; + gpr_free((char *)str); +} + const char *grpc_error_string(grpc_error *err) { if (err == GRPC_ERROR_NONE) return no_error_string; if (err == GRPC_ERROR_OOM) return oom_error_string; diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 119382cd452..5d39cef7721 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -203,6 +203,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/security/transport/secure_endpoint.c', 'src/core/lib/security/transport/security_connector.c', 'src/core/lib/security/transport/server_auth_filter.c', + 'src/core/lib/security/transport/tsi_error.c', 'src/core/lib/security/util/b64.c', 'src/core/lib/security/util/json_util.c', 'src/core/lib/surface/init_secure.c', diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c index b133a948ee0..858ebd96836 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -186,21 +186,26 @@ static gpr_timespec now_impl(gpr_clock_type clock_type) { typedef struct addr_req { grpc_timer timer; char *addr; - grpc_resolve_cb cb; - void *arg; + grpc_closure *on_done; + grpc_resolved_addresses **addrs; } addr_req; -static void finish_resolve(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void finish_resolve(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { addr_req *r = arg; - if (success && 0 == strcmp(r->addr, "server")) { + if (error == GRPC_ERROR_NONE && 0 == strcmp(r->addr, "server")) { grpc_resolved_addresses *addrs = gpr_malloc(sizeof(*addrs)); addrs->naddrs = 1; addrs->addrs = gpr_malloc(sizeof(*addrs->addrs)); addrs->addrs[0].len = 0; - r->cb(exec_ctx, r->arg, addrs); + *r->addrs = addrs; + grpc_exec_ctx_push(exec_ctx, r->on_done, GRPC_ERROR_NONE, NULL); } else { - r->cb(exec_ctx, r->arg, NULL); + grpc_error_ref(error); + grpc_exec_ctx_push( + exec_ctx, r->on_done, + GRPC_ERROR_CREATE_REFERENCING("Resolution failed", &error, 1), NULL); } gpr_free(r->addr); @@ -208,12 +213,12 @@ static void finish_resolve(grpc_exec_ctx *exec_ctx, void *arg, bool success) { } void my_resolve_address(grpc_exec_ctx *exec_ctx, const char *addr, - const char *default_port, grpc_resolve_cb cb, - void *arg) { + const char *default_port, grpc_closure *on_done, + grpc_resolved_addresses **addresses) { addr_req *r = gpr_malloc(sizeof(*r)); r->addr = gpr_strdup(addr); - r->cb = cb; - r->arg = arg; + r->on_done = on_done; + r->addrs = addresses; grpc_timer_init(exec_ctx, &r->timer, gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), gpr_time_from_seconds(1, GPR_TIMESPAN)), @@ -239,11 +244,11 @@ typedef struct { gpr_timespec deadline; } future_connect; -static void do_connect(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void do_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { future_connect *fc = arg; - if (!success) { + if (error != GRPC_ERROR_NONE) { *fc->ep = NULL; - grpc_exec_ctx_enqueue(exec_ctx, fc->closure, false, NULL); + grpc_exec_ctx_push(exec_ctx, fc->closure, grpc_error_ref(error), NULL); } else if (g_server != NULL) { grpc_endpoint *client; grpc_endpoint *server; @@ -255,7 +260,7 @@ static void do_connect(grpc_exec_ctx *exec_ctx, void *arg, bool success) { grpc_server_setup_transport(exec_ctx, g_server, transport, NULL); grpc_chttp2_transport_start_reading(exec_ctx, transport, NULL, 0); - grpc_exec_ctx_enqueue(exec_ctx, fc->closure, false, NULL); + grpc_exec_ctx_push(exec_ctx, fc->closure, GRPC_ERROR_NONE, NULL); } else { sched_connect(exec_ctx, fc->closure, fc->ep, fc->deadline); } @@ -266,7 +271,8 @@ static void sched_connect(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_endpoint **ep, gpr_timespec deadline) { if (gpr_time_cmp(deadline, gpr_now(deadline.clock_type)) < 0) { *ep = NULL; - grpc_exec_ctx_enqueue(exec_ctx, closure, false, NULL); + grpc_exec_ctx_push(exec_ctx, closure, + GRPC_ERROR_CREATE("Connect deadline exceeded"), NULL); return; } diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c index 52082c3c6b7..ded76bccec0 100644 --- a/test/core/iomgr/endpoint_tests.c +++ b/test/core/iomgr/endpoint_tests.c @@ -128,30 +128,30 @@ struct read_and_write_test_state { }; static void read_and_write_test_read_handler(grpc_exec_ctx *exec_ctx, - void *data, bool success) { + void *data, grpc_error *error) { struct read_and_write_test_state *state = data; state->bytes_read += count_slices( state->incoming.slices, state->incoming.count, &state->current_read_data); - if (state->bytes_read == state->target_bytes || !success) { + if (state->bytes_read == state->target_bytes || error != GRPC_ERROR_NONE) { gpr_log(GPR_INFO, "Read handler done"); gpr_mu_lock(g_mu); - state->read_done = 1 + success; + state->read_done = 1 + (error == GRPC_ERROR_NONE); grpc_pollset_kick(g_pollset, NULL); gpr_mu_unlock(g_mu); - } else if (success) { + } else if (error == GRPC_ERROR_NONE) { grpc_endpoint_read(exec_ctx, state->read_ep, &state->incoming, &state->done_read); } } static void read_and_write_test_write_handler(grpc_exec_ctx *exec_ctx, - void *data, bool success) { + void *data, grpc_error *error) { struct read_and_write_test_state *state = data; gpr_slice *slices = NULL; size_t nslices; - if (success) { + if (error != GRPC_ERROR_NONE) { state->bytes_written += state->current_write_size; if (state->target_bytes - state->bytes_written < state->current_write_size) { @@ -171,7 +171,7 @@ static void read_and_write_test_write_handler(grpc_exec_ctx *exec_ctx, gpr_log(GPR_INFO, "Write handler done"); gpr_mu_lock(g_mu); - state->write_done = 1 + success; + state->write_done = 1 + (error != GRPC_ERROR_NONE); grpc_pollset_kick(g_pollset, NULL); gpr_mu_unlock(g_mu); } @@ -219,7 +219,7 @@ static void read_and_write_test(grpc_endpoint_test_config config, for the first iteration as for later iterations. It does the right thing even when bytes_written is unsigned. */ state.bytes_written -= state.current_write_size; - read_and_write_test_write_handler(&exec_ctx, &state, 1); + read_and_write_test_write_handler(&exec_ctx, &state, GRPC_ERROR_NONE); grpc_exec_ctx_finish(&exec_ctx); grpc_endpoint_read(&exec_ctx, state.read_ep, &state.incoming, diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c index 80d21cc6027..e55ce5c7b4f 100644 --- a/test/core/security/oauth2_utils.c +++ b/test/core/security/oauth2_utils.c @@ -74,7 +74,8 @@ static void on_oauth2_response(grpc_exec_ctx *exec_ctx, void *user_data, gpr_mu_unlock(request->mu); } -static void do_nothing(grpc_exec_ctx *exec_ctx, void *unused, bool success) {} +static void do_nothing(grpc_exec_ctx *exec_ctx, void *unused, + grpc_error *error) {} char *grpc_test_fetch_oauth2_token_with_credentials( grpc_call_credentials *creds) { diff --git a/test/core/util/mock_endpoint.c b/test/core/util/mock_endpoint.c index 77684130952..deef68ef596 100644 --- a/test/core/util/mock_endpoint.c +++ b/test/core/util/mock_endpoint.c @@ -51,7 +51,7 @@ static void me_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, gpr_mu_lock(&m->mu); if (m->read_buffer.count > 0) { gpr_slice_buffer_swap(&m->read_buffer, slices); - grpc_exec_ctx_enqueue(exec_ctx, cb, true, NULL); + grpc_exec_ctx_push(exec_ctx, cb, GRPC_ERROR_NONE, NULL); } else { m->on_read = cb; m->on_read_out = slices; @@ -65,7 +65,7 @@ static void me_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, for (size_t i = 0; i < slices->count; i++) { m->on_write(slices->slices[i]); } - grpc_exec_ctx_enqueue(exec_ctx, cb, true, NULL); + grpc_exec_ctx_push(exec_ctx, cb, GRPC_ERROR_NONE, NULL); } static void me_add_to_pollset(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, @@ -78,7 +78,8 @@ static void me_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { grpc_mock_endpoint *m = (grpc_mock_endpoint *)ep; gpr_mu_lock(&m->mu); if (m->on_read) { - grpc_exec_ctx_enqueue(exec_ctx, m->on_read, false, NULL); + grpc_exec_ctx_push(exec_ctx, m->on_read, + GRPC_ERROR_CREATE("Endpoint Shutdown"), NULL); m->on_read = NULL; } gpr_mu_unlock(&m->mu); @@ -115,7 +116,7 @@ void grpc_mock_endpoint_put_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, gpr_mu_lock(&m->mu); if (m->on_read != NULL) { gpr_slice_buffer_add(m->on_read_out, slice); - grpc_exec_ctx_enqueue(exec_ctx, m->on_read, true, NULL); + grpc_exec_ctx_push(exec_ctx, m->on_read, GRPC_ERROR_NONE, NULL); m->on_read = NULL; } else { gpr_slice_buffer_add(&m->read_buffer, slice); diff --git a/test/core/util/passthru_endpoint.c b/test/core/util/passthru_endpoint.c index ae955b1f685..93753be2519 100644 --- a/test/core/util/passthru_endpoint.c +++ b/test/core/util/passthru_endpoint.c @@ -59,10 +59,11 @@ static void me_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, half *m = (half *)ep; gpr_mu_lock(&m->parent->mu); if (m->parent->shutdown) { - grpc_exec_ctx_enqueue(exec_ctx, cb, false, NULL); + grpc_exec_ctx_push(exec_ctx, cb, GRPC_ERROR_CREATE("Already shutdown"), + NULL); } else if (m->read_buffer.count > 0) { gpr_slice_buffer_swap(&m->read_buffer, slices); - grpc_exec_ctx_enqueue(exec_ctx, cb, true, NULL); + grpc_exec_ctx_push(exec_ctx, cb, GRPC_ERROR_NONE, NULL); } else { m->on_read = cb; m->on_read_out = slices; @@ -79,14 +80,14 @@ static void me_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, gpr_slice_buffer *slices, grpc_closure *cb) { half *m = other_half((half *)ep); gpr_mu_lock(&m->parent->mu); - bool ok = true; + grpc_error *error = GRPC_ERROR_NONE; if (m->parent->shutdown) { - ok = false; + error = GRPC_ERROR_CREATE("Endpoint already shutdown"); } else if (m->on_read != NULL) { for (size_t i = 0; i < slices->count; i++) { gpr_slice_buffer_add(m->on_read_out, gpr_slice_ref(slices->slices[i])); } - grpc_exec_ctx_enqueue(exec_ctx, m->on_read, true, NULL); + grpc_exec_ctx_push(exec_ctx, m->on_read, GRPC_ERROR_NONE, NULL); m->on_read = NULL; } else { for (size_t i = 0; i < slices->count; i++) { @@ -94,7 +95,7 @@ static void me_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, } } gpr_mu_unlock(&m->parent->mu); - grpc_exec_ctx_enqueue(exec_ctx, cb, ok, NULL); + grpc_exec_ctx_push(exec_ctx, cb, error, NULL); } static void me_add_to_pollset(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, @@ -108,12 +109,14 @@ static void me_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { gpr_mu_lock(&m->parent->mu); m->parent->shutdown = true; if (m->on_read) { - grpc_exec_ctx_enqueue(exec_ctx, m->on_read, false, NULL); + grpc_exec_ctx_push(exec_ctx, m->on_read, GRPC_ERROR_CREATE("Shutdown"), + NULL); m->on_read = NULL; } m = other_half(m); if (m->on_read) { - grpc_exec_ctx_enqueue(exec_ctx, m->on_read, false, NULL); + grpc_exec_ctx_push(exec_ctx, m->on_read, GRPC_ERROR_CREATE("Shutdown"), + NULL); m->on_read = NULL; } gpr_mu_unlock(&m->parent->mu); diff --git a/test/core/util/port_server_client.c b/test/core/util/port_server_client.c index 84e90547aa9..a03dc0c83fe 100644 --- a/test/core/util/port_server_client.c +++ b/test/core/util/port_server_client.c @@ -56,14 +56,14 @@ typedef struct freereq { } freereq; static void destroy_pollset_and_shutdown(grpc_exec_ctx *exec_ctx, void *p, - bool success) { + grpc_error *error) { grpc_pollset_destroy(p); gpr_free(p); grpc_shutdown(); } static void freed_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, - const grpc_httpcli_response *response) { + grpc_error *error) { freereq *pr = arg; gpr_mu_lock(pr->mu); pr->done = 1; @@ -74,6 +74,7 @@ static void freed_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, void grpc_free_port_using_server(char *server, int port) { grpc_httpcli_context context; grpc_httpcli_request req; + grpc_httpcli_response rsp; freereq pr; char *path; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -83,6 +84,7 @@ void grpc_free_port_using_server(char *server, int port) { memset(&pr, 0, sizeof(pr)); memset(&req, 0, sizeof(req)); + memset(&rsp, 0, sizeof(rsp)); pr.pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(pr.pollset, &pr.mu); @@ -95,8 +97,8 @@ void grpc_free_port_using_server(char *server, int port) { grpc_httpcli_context_init(&context); grpc_httpcli_get(&exec_ctx, &context, pr.pollset, &req, - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), freed_port_from_server, - &pr); + GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), + grpc_closure_create(freed_port_from_server, &pr), &rsp); gpr_mu_lock(pr.mu); while (!pr.done) { grpc_pollset_worker *worker = NULL; @@ -120,19 +122,22 @@ typedef struct portreq { int retries; char *server; grpc_httpcli_context *ctx; + grpc_httpcli_response response; } portreq; static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, - const grpc_httpcli_response *response) { + grpc_error *error) { size_t i; int port = 0; portreq *pr = arg; int failed = 0; + grpc_httpcli_response *response = &pr->response; - if (!response) { + if (error != GRPC_ERROR_NONE) { failed = 1; - gpr_log(GPR_DEBUG, - "failed port pick from server: retrying [response=NULL]"); + const char *msg = grpc_error_string(error); + gpr_log(GPR_DEBUG, "failed port pick from server: retrying [%s]", msg); + grpc_error_free_string(msg); } else if (response->status != 200) { failed = 1; gpr_log(GPR_DEBUG, "failed port pick from server: status=%d", @@ -151,9 +156,12 @@ static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, pr->retries++; req.host = pr->server; req.http.path = "/get"; + grpc_http_response_destroy(&pr->response); + memset(&pr->response, 0, sizeof(pr->response)); grpc_httpcli_get(exec_ctx, pr->ctx, pr->pollset, &req, - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), got_port_from_server, - pr); + GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), + grpc_closure_create(got_port_from_server, pr), + &pr->response); return; } GPR_ASSERT(response); @@ -193,8 +201,9 @@ int grpc_pick_port_using_server(char *server) { grpc_httpcli_context_init(&context); grpc_httpcli_get(&exec_ctx, &context, pr.pollset, &req, - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), got_port_from_server, - &pr); + GRPC_TIMEOUT_SECONDS_TO_DEADLINE(10), + grpc_closure_create(got_port_from_server, &pr), + &pr.response); grpc_exec_ctx_finish(&exec_ctx); gpr_mu_lock(pr.mu); while (pr.port == -1) { @@ -205,6 +214,7 @@ int grpc_pick_port_using_server(char *server) { } gpr_mu_unlock(pr.mu); + grpc_http_response_destroy(&pr.response); grpc_httpcli_context_destroy(&context); grpc_pollset_shutdown(&exec_ctx, pr.pollset, shutdown_closure); grpc_exec_ctx_finish(&exec_ctx); diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index b45e73050c2..39ea15c4587 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -900,6 +900,7 @@ src/core/lib/security/transport/auth_filters.h \ src/core/lib/security/transport/handshake.h \ src/core/lib/security/transport/secure_endpoint.h \ src/core/lib/security/transport/security_connector.h \ +src/core/lib/security/transport/tsi_error.h \ src/core/lib/security/util/b64.h \ src/core/lib/security/util/json_util.h \ src/core/lib/tsi/fake_transport_security.h \ @@ -1062,6 +1063,7 @@ src/core/lib/security/transport/handshake.c \ src/core/lib/security/transport/secure_endpoint.c \ src/core/lib/security/transport/security_connector.c \ src/core/lib/security/transport/server_auth_filter.c \ +src/core/lib/security/transport/tsi_error.c \ src/core/lib/security/util/b64.c \ src/core/lib/security/util/json_util.c \ src/core/lib/surface/init_secure.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 8b521a5daec..143f78f4685 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6035,6 +6035,7 @@ "src/core/lib/security/transport/handshake.h", "src/core/lib/security/transport/secure_endpoint.h", "src/core/lib/security/transport/security_connector.h", + "src/core/lib/security/transport/tsi_error.h", "src/core/lib/security/util/b64.h", "src/core/lib/security/util/json_util.h" ], @@ -6080,6 +6081,8 @@ "src/core/lib/security/transport/security_connector.c", "src/core/lib/security/transport/security_connector.h", "src/core/lib/security/transport/server_auth_filter.c", + "src/core/lib/security/transport/tsi_error.c", + "src/core/lib/security/transport/tsi_error.h", "src/core/lib/security/util/b64.c", "src/core/lib/security/util/b64.h", "src/core/lib/security/util/json_util.c", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index d594cd18a90..331ba04f525 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -409,6 +409,7 @@ + @@ -700,6 +701,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index ece040e5199..a435d7901c1 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -382,6 +382,9 @@ src\core\lib\security\transport + + src\core\lib\security\transport + src\core\lib\security\util @@ -947,6 +950,9 @@ src\core\lib\security\transport + + src\core\lib\security\transport + src\core\lib\security\util From 253a7109ed1c86df0e482e899bc952e36bdc9f42 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 6 May 2016 03:00:51 +0200 Subject: [PATCH 0312/1894] The release branch is now 0.14.0-pre1. --- Makefile | 2 +- build.yaml | 2 +- package.json | 2 +- src/core/lib/surface/version.c | 2 +- src/csharp/Grpc.Core/VersionInfo.cs | 2 +- src/csharp/build_packages.bat | 2 +- src/node/tools/package.json | 2 +- src/python/grpcio/grpc_version.py | 2 +- src/ruby/lib/grpc/version.rb | 2 +- src/ruby/tools/version.rb | 2 +- tools/distrib/python/grpcio_tools/grpc_version.py | 2 +- tools/doxygen/Doxyfile.c++ | 2 +- tools/doxygen/Doxyfile.c++.internal | 2 +- tools/doxygen/Doxyfile.core | 2 +- tools/doxygen/Doxyfile.core.internal | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index e77aa2dd16f..635df30c20a 100644 --- a/Makefile +++ b/Makefile @@ -407,7 +407,7 @@ E = @echo Q = @ endif -VERSION = 0.14.0-dev +VERSION = 0.14.0-pre1 CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) diff --git a/build.yaml b/build.yaml index 1a0888bdc3e..7a74e73c726 100644 --- a/build.yaml +++ b/build.yaml @@ -7,7 +7,7 @@ settings: '#3': Use "-preN" suffixes to identify pre-release versions '#4': Per-language overrides are possible with (eg) ruby_version tag here '#5': See the expand_version.py for all the quirks here - version: 0.14.0-dev + version: 0.14.0-pre1 filegroups: - name: census public_headers: diff --git a/package.json b/package.json index 5ed7f363d37..b22cfc1f938 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "0.14.0-dev", + "version": "0.14.0-pre1", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "http://www.grpc.io/", diff --git a/src/core/lib/surface/version.c b/src/core/lib/surface/version.c index fe954cbefb6..0f4b1111f43 100644 --- a/src/core/lib/surface/version.c +++ b/src/core/lib/surface/version.c @@ -36,4 +36,4 @@ #include -const char *grpc_version_string(void) { return "0.14.0-dev"; } +const char *grpc_version_string(void) { return "0.14.0-pre1"; } diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index f7a9cb9c1cb..70ce9a18df5 100644 --- a/src/csharp/Grpc.Core/VersionInfo.cs +++ b/src/csharp/Grpc.Core/VersionInfo.cs @@ -53,6 +53,6 @@ namespace Grpc.Core /// /// Current version of gRPC C# /// - public const string CurrentVersion = "0.14.0-dev"; + public const string CurrentVersion = "0.14.0-pre1"; } } diff --git a/src/csharp/build_packages.bat b/src/csharp/build_packages.bat index 9a60be26b63..9c7b877feab 100644 --- a/src/csharp/build_packages.bat +++ b/src/csharp/build_packages.bat @@ -1,7 +1,7 @@ @rem Builds gRPC NuGet packages @rem Current package versions -set VERSION=0.14.0-dev +set VERSION=0.14.0-pre1 set PROTOBUF_VERSION=3.0.0-beta2 @rem Packages that depend on prerelease packages (like Google.Protobuf) need to have prerelease suffix as well. diff --git a/src/node/tools/package.json b/src/node/tools/package.json index d98ed0b1fc3..9bca5eab6f2 100644 --- a/src/node/tools/package.json +++ b/src/node/tools/package.json @@ -1,6 +1,6 @@ { "name": "grpc-tools", - "version": "0.14.0-dev", + "version": "0.14.0-pre1", "author": "Google Inc.", "description": "Tools for developing with gRPC on Node.js", "homepage": "http://www.grpc.io/", diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py index 873b4e2a913..87fadf9a979 100644 --- a/src/python/grpcio/grpc_version.py +++ b/src/python/grpcio/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! -VERSION='0.14.0.dev0' +VERSION='0.14.0rc1' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index 67c6a5d5a17..5117c85cea0 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -29,5 +29,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '0.14.0.dev' + VERSION = '0.14.0.pre1' end diff --git a/src/ruby/tools/version.rb b/src/ruby/tools/version.rb index 12ad21b80eb..ec085d2655b 100644 --- a/src/ruby/tools/version.rb +++ b/src/ruby/tools/version.rb @@ -29,6 +29,6 @@ module GRPC module Tools - VERSION = '0.14.0.dev' + VERSION = '0.14.0.pre1' end end diff --git a/tools/distrib/python/grpcio_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_version.py index b8ae8e20b8b..ee522a0bc31 100644 --- a/tools/distrib/python/grpcio_tools/grpc_version.py +++ b/tools/distrib/python/grpcio_tools/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! -VERSION='0.14.0.dev0' +VERSION='0.14.0rc1' diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 664ca03d978..f58f7e72817 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.0-dev +PROJECT_NUMBER = 0.14.0-pre1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 5188ef1e8da..a7a17bac3fc 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.0-dev +PROJECT_NUMBER = 0.14.0-pre1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index 84b5c2a8efb..d1259e7aee3 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.0-dev +PROJECT_NUMBER = 0.14.0-pre1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 228c1d98d89..6b7a8be8617 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.0-dev +PROJECT_NUMBER = 0.14.0-pre1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a From 16caa50aae7d1669550be35e205039f65cc4c363 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Fri, 6 May 2016 03:02:51 +0200 Subject: [PATCH 0313/1894] Master is now 0.15.0-dev. --- Makefile | 2 +- build.yaml | 2 +- composer.json | 2 +- package.json | 2 +- package.xml | 8 ++++---- src/core/lib/surface/version.c | 2 +- src/csharp/Grpc.Core/VersionInfo.cs | 4 ++-- src/csharp/build_packages.bat | 2 +- src/node/tools/package.json | 2 +- src/python/grpcio/grpc_version.py | 2 +- src/ruby/lib/grpc/version.rb | 2 +- src/ruby/tools/version.rb | 2 +- tools/distrib/python/grpcio_tools/grpc_version.py | 2 +- tools/doxygen/Doxyfile.c++ | 2 +- tools/doxygen/Doxyfile.c++.internal | 2 +- tools/doxygen/Doxyfile.core | 2 +- tools/doxygen/Doxyfile.core.internal | 2 +- 17 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index e77aa2dd16f..a684ea8611a 100644 --- a/Makefile +++ b/Makefile @@ -407,7 +407,7 @@ E = @echo Q = @ endif -VERSION = 0.14.0-dev +VERSION = 0.15.0-dev CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) diff --git a/build.yaml b/build.yaml index 1a0888bdc3e..13916830c1e 100644 --- a/build.yaml +++ b/build.yaml @@ -7,7 +7,7 @@ settings: '#3': Use "-preN" suffixes to identify pre-release versions '#4': Per-language overrides are possible with (eg) ruby_version tag here '#5': See the expand_version.py for all the quirks here - version: 0.14.0-dev + version: 0.15.0-dev filegroups: - name: census public_headers: diff --git a/composer.json b/composer.json index 97b1a5cb49b..b77a59e351c 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "grpc/grpc", "type": "library", "description": "gRPC library for PHP", - "version": "0.14.0", + "version": "0.15.0", "keywords": ["rpc"], "homepage": "http://grpc.io", "license": "BSD-3-Clause", diff --git a/package.json b/package.json index 5ed7f363d37..54a44ca5513 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "0.14.0-dev", + "version": "0.15.0-dev", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "http://www.grpc.io/", diff --git a/package.xml b/package.xml index 716d6ed2891..152d5d61904 100644 --- a/package.xml +++ b/package.xml @@ -13,8 +13,8 @@ 2016-04-19 - 0.14.0 - 0.14.0 + 0.15.0 + 0.15.0 beta @@ -1054,8 +1054,8 @@ Update to wrap gRPC C Core version 0.10.0 - 0.14.0 - 0.14.0 + 0.15.0 + 0.15.0 beta diff --git a/src/core/lib/surface/version.c b/src/core/lib/surface/version.c index fe954cbefb6..aca76d2bb79 100644 --- a/src/core/lib/surface/version.c +++ b/src/core/lib/surface/version.c @@ -36,4 +36,4 @@ #include -const char *grpc_version_string(void) { return "0.14.0-dev"; } +const char *grpc_version_string(void) { return "0.15.0-dev"; } diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index f7a9cb9c1cb..e1609341d9a 100644 --- a/src/csharp/Grpc.Core/VersionInfo.cs +++ b/src/csharp/Grpc.Core/VersionInfo.cs @@ -48,11 +48,11 @@ namespace Grpc.Core /// /// Current AssemblyFileVersion of gRPC C# assemblies /// - public const string CurrentAssemblyFileVersion = "0.14.0.0"; + public const string CurrentAssemblyFileVersion = "0.15.0.0"; /// /// Current version of gRPC C# /// - public const string CurrentVersion = "0.14.0-dev"; + public const string CurrentVersion = "0.15.0-dev"; } } diff --git a/src/csharp/build_packages.bat b/src/csharp/build_packages.bat index 9a60be26b63..7520b0f81a7 100644 --- a/src/csharp/build_packages.bat +++ b/src/csharp/build_packages.bat @@ -1,7 +1,7 @@ @rem Builds gRPC NuGet packages @rem Current package versions -set VERSION=0.14.0-dev +set VERSION=0.15.0-dev set PROTOBUF_VERSION=3.0.0-beta2 @rem Packages that depend on prerelease packages (like Google.Protobuf) need to have prerelease suffix as well. diff --git a/src/node/tools/package.json b/src/node/tools/package.json index d98ed0b1fc3..efdfa811243 100644 --- a/src/node/tools/package.json +++ b/src/node/tools/package.json @@ -1,6 +1,6 @@ { "name": "grpc-tools", - "version": "0.14.0-dev", + "version": "0.15.0-dev", "author": "Google Inc.", "description": "Tools for developing with gRPC on Node.js", "homepage": "http://www.grpc.io/", diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py index 873b4e2a913..0c13104d9da 100644 --- a/src/python/grpcio/grpc_version.py +++ b/src/python/grpcio/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! -VERSION='0.14.0.dev0' +VERSION='0.15.0.dev0' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index 67c6a5d5a17..01c8c5ac8f1 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -29,5 +29,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '0.14.0.dev' + VERSION = '0.15.0.dev' end diff --git a/src/ruby/tools/version.rb b/src/ruby/tools/version.rb index 12ad21b80eb..dca7fd7e72c 100644 --- a/src/ruby/tools/version.rb +++ b/src/ruby/tools/version.rb @@ -29,6 +29,6 @@ module GRPC module Tools - VERSION = '0.14.0.dev' + VERSION = '0.15.0.dev' end end diff --git a/tools/distrib/python/grpcio_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_version.py index b8ae8e20b8b..1267d0e45dc 100644 --- a/tools/distrib/python/grpcio_tools/grpc_version.py +++ b/tools/distrib/python/grpcio_tools/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! -VERSION='0.14.0.dev0' +VERSION='0.15.0.dev0' diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 664ca03d978..2a319db9796 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.0-dev +PROJECT_NUMBER = 0.15.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 5188ef1e8da..5fdfafbf3ed 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.0-dev +PROJECT_NUMBER = 0.15.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index 84b5c2a8efb..aabca410dab 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.0-dev +PROJECT_NUMBER = 0.15.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 228c1d98d89..3ffc6174ed4 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.0-dev +PROJECT_NUMBER = 0.15.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a From a21c7e9207490d9bcdd7205c8a5857320a3a450d Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 5 May 2016 17:31:52 -0700 Subject: [PATCH 0314/1894] add support for scenario categories --- test/cpp/qps/gen_build_yaml.py | 10 +++++++--- tools/run_tests/performance/scenario_config.py | 13 ++++++++++++- tools/run_tests/run_performance_tests.py | 6 +++--- 3 files changed, 22 insertions(+), 7 deletions(-) diff --git a/test/cpp/qps/gen_build_yaml.py b/test/cpp/qps/gen_build_yaml.py index 9d6bf2ab73c..6b3329b046b 100755 --- a/test/cpp/qps/gen_build_yaml.py +++ b/test/cpp/qps/gen_build_yaml.py @@ -43,12 +43,16 @@ sys.path.append(run_tests_root) import performance.scenario_config as scenario_config +def _scenario_json_string(scenario_json): + return json.dumps(scenario_config.remove_nonproto_fields(scenario_json)) + print yaml.dump({ 'tests': [ { 'name': 'json_run_localhost', - 'shortname': 'json_run_localhost:%s' % js['name'], - 'args': ['--scenario_json', pipes.quote(json.dumps(js))], + 'shortname': 'json_run_localhost:%s' % scenario_json['name'], + 'args': ['--scenario_json', + pipes.quote(_scenario_json_string(scenario_json))], 'ci_platforms': ['linux', 'mac', 'posix', 'windows'], 'platforms': ['linux', 'mac', 'posix', 'windows'], 'flaky': False, @@ -58,6 +62,6 @@ print yaml.dump({ 'cpu_cost': 1000.0, 'exclude_configs': [] } - for js in scenario_config.CXXLanguage().scenarios() + for scenario_json in scenario_config.CXXLanguage().scenarios() ] }) diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index 52efe8b86b3..a5b0d59d02b 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -76,6 +76,14 @@ def _get_secargs(is_secure): return None +def remove_nonproto_fields(scenario): + """Remove special-purpose that contains some extra info about the scenario + but don't belong to the ScenarioConfig protobuf message""" + scenario.pop('CATEGORIES', None) + scenario.pop('SERVER_LANGUAGE', None) + return scenario + + def _ping_pong_scenario(name, rpc_type, client_type, server_type, secure=True, @@ -84,7 +92,8 @@ def _ping_pong_scenario(name, rpc_type, server_language=None, server_core_limit=0, async_server_threads=0, - warmup_seconds=WARMUP_SECONDS): + warmup_seconds=WARMUP_SECONDS, + categories=[]): """Creates a basic ping pong scenario.""" scenario = { 'name': name, @@ -135,6 +144,8 @@ def _ping_pong_scenario(name, rpc_type, if server_language: # the SERVER_LANGUAGE field is recognized by run_performance_tests.py scenario['SERVER_LANGUAGE'] = server_language + if categories: + scenario['CATEGORIES'] = categories return scenario diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py index 8b67d921f22..c8c1a19783a 100755 --- a/tools/run_tests/run_performance_tests.py +++ b/tools/run_tests/run_performance_tests.py @@ -255,9 +255,9 @@ def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*', if re.search(args.regex, scenario_json['name']): workers = workers_by_lang[str(language)] # 'SERVER_LANGUAGE' is an indicator for this script to pick - # a server in different language. It doesn't belong to the Scenario - # schema, so we also need to remove it. - custom_server_lang = scenario_json.pop('SERVER_LANGUAGE', None) + # a server in different language. + custom_server_lang = scenario_json.get('SERVER_LANGUAGE', None) + scenario_json = scenario_config.remove_nonproto_fields(scenario_json) if custom_server_lang: if not workers_by_lang.get(custom_server_lang, []): print 'Warning: Skipping scenario %s as' % scenario_json['name'] From c45cd2d2ef42aad241c623e7e0e267f6eaf03d17 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 5 May 2016 17:34:46 -0700 Subject: [PATCH 0315/1894] regenerate tests.json --- tools/run_tests/tests.json | 100 ++++++++++++++++++++++++++++--------- 1 file changed, 76 insertions(+), 24 deletions(-) diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index cf1154426f4..79a9e73117d 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -22942,7 +22942,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_protobuf_async_streaming_ping_pong_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -22963,12 +22963,12 @@ "posix", "windows" ], - "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_secure" + "shortname": "json_run_localhost:cpp_protobuf_async_streaming_ping_pong_secure" }, { "args": [ "--scenario_json", - "'{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_protobuf_async_unary_ping_pong_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -22989,12 +22989,12 @@ "posix", "windows" ], - "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_one_server_core_secure" + "shortname": "json_run_localhost:cpp_protobuf_async_unary_ping_pong_secure" }, { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_protobuf_sync_unary_ping_pong_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -23015,12 +23015,12 @@ "posix", "windows" ], - "shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_secure" + "shortname": "json_run_localhost:cpp_protobuf_sync_unary_ping_pong_secure" }, { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_streaming_ping_pong_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -23041,12 +23041,12 @@ "posix", "windows" ], - "shortname": "json_run_localhost:cpp_protobuf_async_streaming_ping_pong_secure" + "shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_secure" }, { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_sync_unary_ping_pong_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -23067,12 +23067,12 @@ "posix", "windows" ], - "shortname": "json_run_localhost:cpp_protobuf_sync_unary_ping_pong_secure" + "shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_secure" }, { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_unary_ping_pong_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -23093,7 +23093,33 @@ "posix", "windows" ], - "shortname": "json_run_localhost:cpp_protobuf_async_unary_ping_pong_secure" + "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_secure" + }, + { + "args": [ + "--scenario_json", + "'{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + ], + "boringssl": true, + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1000.0, + "defaults": "boringssl", + "exclude_configs": [], + "flaky": false, + "language": "c++", + "name": "json_run_localhost", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_one_server_core_secure" }, { "args": [ @@ -23124,7 +23150,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_protobuf_async_streaming_ping_pong_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -23145,12 +23171,12 @@ "posix", "windows" ], - "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_insecure" + "shortname": "json_run_localhost:cpp_protobuf_async_streaming_ping_pong_insecure" }, { "args": [ "--scenario_json", - "'{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_protobuf_async_unary_ping_pong_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -23171,12 +23197,12 @@ "posix", "windows" ], - "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_one_server_core_insecure" + "shortname": "json_run_localhost:cpp_protobuf_async_unary_ping_pong_insecure" }, { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_protobuf_sync_unary_ping_pong_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -23197,12 +23223,12 @@ "posix", "windows" ], - "shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_insecure" + "shortname": "json_run_localhost:cpp_protobuf_sync_unary_ping_pong_insecure" }, { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_streaming_ping_pong_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -23223,12 +23249,12 @@ "posix", "windows" ], - "shortname": "json_run_localhost:cpp_protobuf_async_streaming_ping_pong_insecure" + "shortname": "json_run_localhost:cpp_protobuf_async_unary_qps_unconstrained_insecure" }, { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_sync_unary_ping_pong_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -23249,12 +23275,12 @@ "posix", "windows" ], - "shortname": "json_run_localhost:cpp_protobuf_sync_unary_ping_pong_insecure" + "shortname": "json_run_localhost:cpp_protobuf_async_streaming_qps_unconstrained_insecure" }, { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_unary_ping_pong_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -23275,7 +23301,33 @@ "posix", "windows" ], - "shortname": "json_run_localhost:cpp_protobuf_async_unary_ping_pong_insecure" + "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_unconstrained_insecure" + }, + { + "args": [ + "--scenario_json", + "'{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + ], + "boringssl": true, + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1000.0, + "defaults": "boringssl", + "exclude_configs": [], + "flaky": false, + "language": "c++", + "name": "json_run_localhost", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "shortname": "json_run_localhost:cpp_generic_async_streaming_qps_one_server_core_insecure" }, { "args": [ From 427699b638b2f17219f6b5d33bd571e42eb287fb Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 5 May 2016 18:10:14 -0700 Subject: [PATCH 0316/1894] mark some scenarios as smoketest and add a cmdline flag --- .../run_tests/performance/scenario_config.py | 58 +++++++++++++------ tools/run_tests/run_performance_tests.py | 48 ++++++++------- 2 files changed, 67 insertions(+), 39 deletions(-) diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index a5b0d59d02b..8b239951498 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -34,6 +34,8 @@ WARMUP_SECONDS=5 JAVA_WARMUP_SECONDS=15 # Java needs more warmup time for JIT to kick in. BENCHMARK_SECONDS=30 +SMOKETEST='smoketest' + SECURE_SECARGS = {'use_test_ca': True, 'server_host_override': 'foo.test.google.fr'} @@ -164,12 +166,14 @@ class CXXLanguage: # TODO(ctiller): add 70% load latency test for secure in [True, False]: secstr = 'secure' if secure else 'insecure' + smoketest_categories = [SMOKETEST] if secure else None yield _ping_pong_scenario( 'cpp_generic_async_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING', client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', use_generic_payload=True, server_core_limit=1, async_server_threads=1, - secure=secure) + secure=secure, + categories=smoketest_categories) yield _ping_pong_scenario( 'cpp_protobuf_async_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING', @@ -181,7 +185,8 @@ class CXXLanguage: 'cpp_protobuf_async_unary_ping_pong_%s' % secstr, rpc_type='UNARY', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', server_core_limit=1, async_server_threads=1, - secure=secure) + secure=secure, + categories=smoketest_categories) yield _ping_pong_scenario( 'cpp_protobuf_sync_unary_ping_pong_%s' % secstr, rpc_type='UNARY', @@ -194,7 +199,8 @@ class CXXLanguage: client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', server_core_limit=SINGLE_MACHINE_CORES/2, use_unconstrained_client=True, - secure=secure) + secure=secure, + categories=smoketest_categories) yield _ping_pong_scenario( 'cpp_protobuf_async_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING', @@ -208,7 +214,8 @@ class CXXLanguage: client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', use_unconstrained_client=True, use_generic_payload=True, server_core_limit=SINGLE_MACHINE_CORES/2, - secure=secure) + secure=secure, + categories=smoketest_categories) yield _ping_pong_scenario( 'cpp_generic_async_streaming_qps_one_server_core_%s' % secstr, rpc_type='STREAMING', @@ -236,7 +243,8 @@ class CSharpLanguage: yield _ping_pong_scenario( 'csharp_generic_async_streaming_ping_pong', rpc_type='STREAMING', client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', - use_generic_payload=True) + use_generic_payload=True, + categories=[SMOKETEST]) yield _ping_pong_scenario( 'csharp_protobuf_async_streaming_ping_pong', rpc_type='STREAMING', @@ -244,7 +252,8 @@ class CSharpLanguage: yield _ping_pong_scenario( 'csharp_protobuf_async_unary_ping_pong', rpc_type='UNARY', - client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER') + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + categories=[SMOKETEST]) yield _ping_pong_scenario( 'csharp_protobuf_sync_to_async_unary_ping_pong', rpc_type='UNARY', @@ -253,7 +262,8 @@ class CSharpLanguage: yield _ping_pong_scenario( 'csharp_protobuf_async_unary_qps_unconstrained', rpc_type='UNARY', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', - use_unconstrained_client=True) + use_unconstrained_client=True, + categories=[SMOKETEST]) yield _ping_pong_scenario( 'csharp_protobuf_async_streaming_qps_unconstrained', rpc_type='STREAMING', @@ -263,7 +273,8 @@ class CSharpLanguage: yield _ping_pong_scenario( 'csharp_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='SYNC_SERVER', - server_language='c++', server_core_limit=1, async_server_threads=1) + server_language='c++', server_core_limit=1, async_server_threads=1, + categories=[SMOKETEST]) yield _ping_pong_scenario( 'csharp_to_cpp_protobuf_async_streaming_ping_pong', rpc_type='STREAMING', @@ -300,12 +311,14 @@ class NodeLanguage: yield _ping_pong_scenario( 'node_protobuf_unary_ping_pong', rpc_type='UNARY', - client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER') + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + categories=[SMOKETEST]) yield _ping_pong_scenario( 'node_protobuf_async_unary_qps_unconstrained', rpc_type='UNARY', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', - use_unconstrained_client=True) + use_unconstrained_client=True, + categories=[SMOKETEST]) # TODO(jtattermusch): make this scenario work #yield _ping_pong_scenario( @@ -344,7 +357,8 @@ class PythonLanguage: yield _ping_pong_scenario( 'python_generic_async_streaming_ping_pong', rpc_type='STREAMING', client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', - use_generic_payload=True) + use_generic_payload=True, + categories=[SMOKETEST]) # TODO(jtattermusch): make this scenario work #yield _ping_pong_scenario( @@ -358,7 +372,8 @@ class PythonLanguage: yield _ping_pong_scenario( 'python_protobuf_sync_unary_ping_pong', rpc_type='UNARY', - client_type='SYNC_CLIENT', server_type='SYNC_SERVER') + client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + categories=[SMOKETEST]) # TODO(jtattermusch): make this scenario work #yield _ping_pong_scenario( @@ -375,7 +390,8 @@ class PythonLanguage: yield _ping_pong_scenario( 'python_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='SYNC_SERVER', - server_language='c++', server_core_limit=1, async_server_threads=1) + server_language='c++', server_core_limit=1, async_server_threads=1, + categories=[SMOKETEST]) # TODO(jtattermusch): make this scenario work #yield _ping_pong_scenario( @@ -401,11 +417,13 @@ class RubyLanguage: def scenarios(self): yield _ping_pong_scenario( 'ruby_protobuf_sync_streaming_ping_pong', rpc_type='STREAMING', - client_type='SYNC_CLIENT', server_type='SYNC_SERVER') + client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + categories=[SMOKETEST]) yield _ping_pong_scenario( 'ruby_protobuf_unary_ping_pong', rpc_type='UNARY', - client_type='SYNC_CLIENT', server_type='SYNC_SERVER') + client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + categories=[SMOKETEST]) # TODO: scenario reports QPS of 0.0 #yield _ping_pong_scenario( @@ -448,12 +466,14 @@ class JavaLanguage: def scenarios(self): for secure in [True, False]: secstr = 'secure' if secure else 'insecure' + smoketest_categories = [SMOKETEST] if secure else None yield _ping_pong_scenario( 'java_generic_async_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING', client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', use_generic_payload=True, async_server_threads=1, - secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS) + secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS, + categories=smoketest_categories) yield _ping_pong_scenario( 'java_protobuf_async_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING', @@ -465,7 +485,8 @@ class JavaLanguage: 'java_protobuf_async_unary_ping_pong_%s' % secstr, rpc_type='UNARY', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', async_server_threads=1, - secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS) + secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS, + categories=smoketest_categories) yield _ping_pong_scenario( 'java_protobuf_unary_ping_pong_%s' % secstr, rpc_type='UNARY', @@ -477,7 +498,8 @@ class JavaLanguage: 'java_protobuf_async_unary_qps_unconstrained_%s' % secstr, rpc_type='UNARY', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', use_unconstrained_client=True, - secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS) + secure=secure, warmup_seconds=JAVA_WARMUP_SECONDS, + categories=smoketest_categories) yield _ping_pong_scenario( 'java_protobuf_async_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING', diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py index c8c1a19783a..b1f5889e541 100755 --- a/tools/run_tests/run_performance_tests.py +++ b/tools/run_tests/run_performance_tests.py @@ -244,7 +244,7 @@ def start_qpsworkers(languages, worker_hosts): def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*', - bq_result_table=None): + category='all', bq_result_table=None): """Create jobspecs for scenarios to run.""" all_workers = [worker for workers in workers_by_lang.values() @@ -253,25 +253,26 @@ def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*', for language in languages: for scenario_json in language.scenarios(): if re.search(args.regex, scenario_json['name']): - workers = workers_by_lang[str(language)] - # 'SERVER_LANGUAGE' is an indicator for this script to pick - # a server in different language. - custom_server_lang = scenario_json.get('SERVER_LANGUAGE', None) - scenario_json = scenario_config.remove_nonproto_fields(scenario_json) - if custom_server_lang: - if not workers_by_lang.get(custom_server_lang, []): - print 'Warning: Skipping scenario %s as' % scenario_json['name'] - print('SERVER_LANGUAGE is set to %s yet the language has ' - 'not been selected with -l' % custom_server_lang) - continue - for idx in range(0, scenario_json['num_servers']): - # replace first X workers by workers of a different language - workers[idx] = workers_by_lang[custom_server_lang][idx] - scenario = create_scenario_jobspec(scenario_json, - workers, - remote_host=remote_host, - bq_result_table=bq_result_table) - scenarios.append(scenario) + if category in scenario_json.get('CATEGORIES', []) or category == 'all': + workers = workers_by_lang[str(language)] + # 'SERVER_LANGUAGE' is an indicator for this script to pick + # a server in different language. + custom_server_lang = scenario_json.get('SERVER_LANGUAGE', None) + scenario_json = scenario_config.remove_nonproto_fields(scenario_json) + if custom_server_lang: + if not workers_by_lang.get(custom_server_lang, []): + print 'Warning: Skipping scenario %s as' % scenario_json['name'] + print('SERVER_LANGUAGE is set to %s yet the language has ' + 'not been selected with -l' % custom_server_lang) + continue + for idx in range(0, scenario_json['num_servers']): + # replace first X workers by workers of a different language + workers[idx] = workers_by_lang[custom_server_lang][idx] + scenario = create_scenario_jobspec(scenario_json, + workers, + remote_host=remote_host, + bq_result_table=bq_result_table) + scenarios.append(scenario) # the very last scenario requests shutting down the workers. scenarios.append(create_quit_jobspec(all_workers, remote_host=remote_host)) @@ -298,7 +299,7 @@ argp = argparse.ArgumentParser(description='Run performance tests.') argp.add_argument('-l', '--language', choices=['all'] + sorted(scenario_config.LANGUAGES.keys()), nargs='+', - default=['all'], + required=True, help='Languages to benchmark.') argp.add_argument('--remote_driver_host', default=None, @@ -311,6 +312,10 @@ argp.add_argument('-r', '--regex', default='.*', type=str, help='Regex to select scenarios to run.') argp.add_argument('--bq_result_table', default=None, type=str, help='Bigquery "dataset.table" to upload results to.') +argp.add_argument('--category', + choices=['smoketest','all'], + default='smoketest', + help='Select a category of tests to run. Smoketest runs by default.') args = argp.parse_args() @@ -354,6 +359,7 @@ try: workers_by_lang=worker_addresses, remote_host=args.remote_driver_host, regex=args.regex, + category=args.category, bq_result_table=args.bq_result_table) if not scenarios: raise Exception('No scenarios to run') From 4340b74761949411224fc7c73a9eb63182116ef8 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 5 May 2016 18:14:26 -0700 Subject: [PATCH 0317/1894] Fix missing file in grpcio-tools sdist --- tools/distrib/python/grpcio_tools/MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/distrib/python/grpcio_tools/MANIFEST.in b/tools/distrib/python/grpcio_tools/MANIFEST.in index e6ab312f09c..f99fb07ca8f 100644 --- a/tools/distrib/python/grpcio_tools/MANIFEST.in +++ b/tools/distrib/python/grpcio_tools/MANIFEST.in @@ -1,3 +1,4 @@ +include grpc_version.py include protoc_deps.py include protoc_lib_deps.py graft grpc From 2b86729b2521b650ca03c0a20dfe15796cfc89c4 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 5 May 2016 18:17:45 -0700 Subject: [PATCH 0318/1894] Build grpcio-tools sdist --- tools/run_tests/build_artifact_python.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools/run_tests/build_artifact_python.sh b/tools/run_tests/build_artifact_python.sh index 35c3a48afae..4320f978e30 100755 --- a/tools/run_tests/build_artifact_python.sh +++ b/tools/run_tests/build_artifact_python.sh @@ -59,7 +59,11 @@ ${SETARCH_CMD} ${PYTHON} setup.py \ ${SETARCH_CMD} ${PYTHON} setup.py \ bdist_wheel -# Build gRPC tools package +# Build gRPC tools package source distribution +${SETARCH_CMD} ${PYTHON} tools/distrib/python/grpcio_tools/setup.py \ + sdist + +# Build gRPC tools package binary distribution ${PYTHON} tools/distrib/python/make_grpcio_tools.py CFLAGS="$CFLAGS -fno-wrapv" ${SETARCH_CMD} \ ${PYTHON} tools/distrib/python/grpcio_tools/setup.py bdist_wheel From 2eedca72d53e9987da3a3a29961736312baf8b6f Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 5 May 2016 18:20:09 -0700 Subject: [PATCH 0319/1894] Check the value of Next() in async examples --- examples/cpp/helloworld/greeter_async_client.cc | 4 +++- examples/cpp/helloworld/greeter_async_server.cc | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/cpp/helloworld/greeter_async_client.cc b/examples/cpp/helloworld/greeter_async_client.cc index c1f5eb55f05..33de59fb957 100644 --- a/examples/cpp/helloworld/greeter_async_client.cc +++ b/examples/cpp/helloworld/greeter_async_client.cc @@ -87,7 +87,9 @@ class GreeterClient { void* got_tag; bool ok = false; // Block until the next result is available in the completion queue "cq". - cq.Next(&got_tag, &ok); + // The return value of Next should always be checked. This return value + // tells us whether there is any kind of event or the cq_ is shutting down. + GPR_ASSERT(cq.Next(&got_tag, &ok)); // Verify that the result from "cq" corresponds, by its tag, our previous // request. diff --git a/examples/cpp/helloworld/greeter_async_server.cc b/examples/cpp/helloworld/greeter_async_server.cc index 64e065b1e40..ead44182e57 100644 --- a/examples/cpp/helloworld/greeter_async_server.cc +++ b/examples/cpp/helloworld/greeter_async_server.cc @@ -160,7 +160,9 @@ class ServerImpl final { // Block waiting to read the next event from the completion queue. The // event is uniquely identified by its tag, which in this case is the // memory address of a CallData instance. - cq_->Next(&tag, &ok); + // The return value of Next should always be checked. This return value + // tells us whether there is any kind of event or cq_ is shutting down. + GPR_ASSERT(cq_->Next(&tag, &ok)); GPR_ASSERT(ok); static_cast(tag)->Proceed(); } From 303d3082a07363c29dc747e986658fd6c8dc4053 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 5 May 2016 18:25:34 -0700 Subject: [PATCH 0320/1894] Fixed compression interop and re-enable for C++. Also added some defense in depth for compression algorithms in the receive path. --- src/core/lib/channel/compress_filter.c | 6 ++++-- src/core/lib/compression/message_compress.c | 2 +- src/core/lib/surface/byte_buffer_reader.c | 19 +++++++++++++------ src/core/lib/surface/call.c | 9 +++++++-- test/cpp/interop/interop_client.cc | 2 +- tools/run_tests/run_interop_tests.py | 4 ++-- 6 files changed, 28 insertions(+), 14 deletions(-) diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 5510c79b183..9769070cc12 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -189,8 +189,10 @@ static void finish_send_message(grpc_exec_ctx *exec_ctx, char *algo_name; GPR_ASSERT(grpc_compression_algorithm_name(calld->compression_algorithm, &algo_name)); - gpr_log(GPR_DEBUG, "Algorithm '%s' enabled but decided not to compress.", - algo_name); + gpr_log( + GPR_DEBUG, + "Algorithm '%s' enabled but decided not to compress. Input size: %d", + algo_name, calld->slices.length); } } diff --git a/src/core/lib/compression/message_compress.c b/src/core/lib/compression/message_compress.c index cbe0b5a2856..699719a523d 100644 --- a/src/core/lib/compression/message_compress.c +++ b/src/core/lib/compression/message_compress.c @@ -194,5 +194,5 @@ int grpc_msg_decompress(grpc_compression_algorithm algorithm, break; } gpr_log(GPR_ERROR, "invalid compression algorithm %d", algorithm); - return 0; + return -1; /* to distinguish it from GRPC_COMPRESS_NONE */ } diff --git a/src/core/lib/surface/byte_buffer_reader.c b/src/core/lib/surface/byte_buffer_reader.c index 809fd5f1fa6..c7f941525df 100644 --- a/src/core/lib/surface/byte_buffer_reader.c +++ b/src/core/lib/surface/byte_buffer_reader.c @@ -62,12 +62,19 @@ void grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, case GRPC_BB_RAW: gpr_slice_buffer_init(&decompressed_slices_buffer); if (is_compressed(reader->buffer_in)) { - grpc_msg_decompress(reader->buffer_in->data.raw.compression, - &reader->buffer_in->data.raw.slice_buffer, - &decompressed_slices_buffer); - reader->buffer_out = - grpc_raw_byte_buffer_create(decompressed_slices_buffer.slices, - decompressed_slices_buffer.count); + if (grpc_msg_decompress(reader->buffer_in->data.raw.compression, + &reader->buffer_in->data.raw.slice_buffer, + &decompressed_slices_buffer) < 0) { + gpr_log(GPR_ERROR, + "Unexpected error decompressing data for algorithm with enum " + "value '%d'. Reading data as if it were uncompressed.", + reader->buffer_in->data.raw.compression); + reader->buffer_out = reader->buffer_in; + } else { /* all fine */ + reader->buffer_out = + grpc_raw_byte_buffer_create(decompressed_slices_buffer.slices, + decompressed_slices_buffer.count); + } gpr_slice_buffer_destroy(&decompressed_slices_buffer); } else { /* not compressed, use the input buffer as output */ reader->buffer_out = reader->buffer_in; diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 9b2b94eedf5..778557121d7 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -408,6 +408,7 @@ static void set_status_code(grpc_call *call, status_source source, static void set_compression_algorithm(grpc_call *call, grpc_compression_algorithm algo) { + GPR_ASSERT(algo < GRPC_COMPRESS_ALGORITHMS_COUNT); call->compression_algorithm = algo; } @@ -828,12 +829,16 @@ static uint32_t decode_status(grpc_mdelem *md) { return status; } -static uint32_t decode_compression(grpc_mdelem *md) { +static grpc_compression_algorithm decode_compression(grpc_mdelem *md) { grpc_compression_algorithm algorithm = grpc_compression_algorithm_from_mdstr(md->value); if (algorithm == GRPC_COMPRESS_ALGORITHMS_COUNT) { const char *md_c_str = grpc_mdstr_as_c_string(md->value); - gpr_log(GPR_ERROR, "Invalid compression algorithm: '%s'", md_c_str); + gpr_log(GPR_ERROR, + "Invalid incoming compression algorithm: '%s'. Interpreting " + "incoming data as uncompressed.", + md_c_str); + return GRPC_COMPRESS_NONE; } return algorithm; } diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index 22293d211fa..314d6c8eae2 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -60,7 +60,7 @@ static const char* kRandomFile = "test/cpp/interop/rnd.dat"; namespace { // The same value is defined by the Java client. const std::vector request_stream_sizes = {27182, 8, 1828, 45904}; -const std::vector response_stream_sizes = {31415, 9, 2653, 58979}; +const std::vector response_stream_sizes = {31415, 59, 2653, 58979}; const int kNumResponseMessages = 2000; const int kResponseMessageSize = 1030; const int kReceiveDelayMilliSeconds = 20; diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index e813473421d..edbdf05e2a2 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -82,10 +82,10 @@ class CXXLanguage: return {} def unimplemented_test_cases(self): - return _SKIP_ADVANCED + _SKIP_COMPRESSION + return _SKIP_ADVANCED def unimplemented_test_cases_server(self): - return _SKIP_ADVANCED + _SKIP_COMPRESSION + return _SKIP_ADVANCED def __str__(self): return 'c++' From ab5309c9b12aef6fd874b5f925ea04df4eebde14 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 5 May 2016 18:39:01 -0700 Subject: [PATCH 0321/1894] Remove precompiled Python extension hack --- setup.py | 42 +++++------- src/python/grpcio/precompiled.py | 114 ------------------------------- 2 files changed, 18 insertions(+), 138 deletions(-) delete mode 100644 src/python/grpcio/precompiled.py diff --git a/setup.py b/setup.py index 5cd26124f6d..f96824fa883 100644 --- a/setup.py +++ b/setup.py @@ -54,7 +54,6 @@ sys.path.insert(0, os.path.abspath(PYTHON_STEM)) # Break import-style to ensure we can actually find our in-repo dependencies. import commands -import precompiled import grpc_core_dependencies import grpc_version @@ -173,7 +172,6 @@ COMMAND_CLASS = { 'build_project_metadata': commands.BuildProjectMetadata, 'build_py': commands.BuildPy, 'build_ext': commands.BuildExt, - 'build_tagged_ext': precompiled.BuildTaggedExt, 'gather': commands.Gather, 'run_interop': commands.RunInterop, 'test_lite': commands.TestLite @@ -229,25 +227,21 @@ else: PACKAGES = setuptools.find_packages( PYTHON_STEM, exclude=['tests', 'tests.*']) -setup_arguments = { - 'name': 'grpcio', - 'version': grpc_version.VERSION, - 'license': LICENSE, - 'ext_modules': CYTHON_EXTENSION_MODULES, - 'packages': list(PACKAGES), - 'package_dir': PACKAGE_DIRECTORIES, - # TODO(atash): Figure out why auditwheel doesn't like namespace packages. - #'namespace_packages': ['grpc'], - 'package_data': PACKAGE_DATA, - 'install_requires': INSTALL_REQUIRES, - 'setup_requires': SETUP_REQUIRES, - 'cmdclass': COMMAND_CLASS, - 'tests_require': TESTS_REQUIRE, - 'test_suite': TEST_SUITE, - 'test_loader': TEST_LOADER, - 'test_runner': TEST_RUNNER, -} - -precompiled.update_setup_arguments(setup_arguments) - -setuptools.setup(**setup_arguments) +setuptools.setup( + name='grpcio', + version=grpc_version.VERSION, + license=LICENSE, + ext_modules=CYTHON_EXTENSION_MODULES, + packages=list(PACKAGES), + package_dir=PACKAGE_DIRECTORIES, + # TODO(atash): Figure out why auditwheel doesn't like namespace packages. + #namespace_packages=['grpc'], + package_data=PACKAGE_DATA, + install_requires=INSTALL_REQUIRES, + setup_requires=SETUP_REQUIRES, + cmdclass=COMMAND_CLASS, + tests_require=TESTS_REQUIRE, + test_suite=TEST_SUITE, + test_loader=TEST_LOADER, + test_runner=TEST_RUNNER, +) diff --git a/src/python/grpcio/precompiled.py b/src/python/grpcio/precompiled.py deleted file mode 100644 index b6aa7fc90ee..00000000000 --- a/src/python/grpcio/precompiled.py +++ /dev/null @@ -1,114 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import os -import platform -import shutil -import sys -import sysconfig - -import setuptools - -import commands -import grpc_version - -try: - from urllib2 import urlopen -except ImportError: - from urllib.request import urlopen - -PYTHON_STEM = os.path.dirname(os.path.abspath(__file__)) -BINARIES_REPOSITORY = os.environ.get( - 'GRPC_PYTHON_BINARIES_REPOSITORY', - 'https://storage.googleapis.com/grpc-precompiled-binaries/python') -USE_PRECOMPILED_BINARIES = bool(int(os.environ.get( - 'GRPC_PYTHON_USE_PRECOMPILED_BINARIES', '1'))) - -def _tagged_ext_name(base): - uname = platform.uname() - tags = ( - grpc_version.VERSION, - 'py{}'.format(sysconfig.get_python_version()), - uname[0], - uname[4], - ) - ucs = 'ucs{}'.format(sysconfig.get_config_var('Py_UNICODE_SIZE')) - return '{base}-{tags}-{ucs}'.format( - base=base, tags='-'.join(tags), ucs=ucs) - - -class BuildTaggedExt(setuptools.Command): - - description = 'build the gRPC tagged extensions' - user_options = [] - - def initialize_options(self): - # distutils requires this override. - pass - - def finalize_options(self): - # distutils requires this override. - pass - - def run(self): - if 'linux' in sys.platform: - self.run_command('build_ext') - try: - os.makedirs('dist/') - except OSError: - pass - shutil.copyfile( - os.path.join(PYTHON_STEM, 'grpc/_cython/cygrpc.so'), - 'dist/{}.so'.format(_tagged_ext_name('cygrpc'))) - else: - sys.stderr.write('nothing to do for build_tagged_ext\n') - - -def update_setup_arguments(setup_arguments): - if not USE_PRECOMPILED_BINARIES: - sys.stderr.write('not using precompiled extension') - return - url = '{}/{}.so'.format(BINARIES_REPOSITORY, _tagged_ext_name('cygrpc')) - target_path = os.path.join(PYTHON_STEM, 'grpc/_cython/cygrpc.so') - try: - extension = urlopen(url).read() - except: - sys.stderr.write( - 'could not download precompiled extension: {}\n'.format(url)) - return - try: - with open(target_path, 'w') as target: - target.write(extension) - setup_arguments['ext_modules'] = [] - except: - sys.stderr.write( - 'could not write precompiled extension to directory: {} -> {}\n' - .format(url, target_path)) - return - setup_arguments['package_data']['grpc._cython'].append('cygrpc.so') From 0bdc7ccab9622cd2e62eec6007bff3391bc664f4 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 5 May 2016 19:03:43 -0700 Subject: [PATCH 0322/1894] Fix #4592 Adds a command that allows the instructions to be used to install gRPC Python from scratch. --- src/python/grpcio/README.rst | 1 + 1 file changed, 1 insertion(+) diff --git a/src/python/grpcio/README.rst b/src/python/grpcio/README.rst index cb3f6b87fe4..afc4fe6a370 100644 --- a/src/python/grpcio/README.rst +++ b/src/python/grpcio/README.rst @@ -48,6 +48,7 @@ package named :code:`python-dev`). $ export REPO_ROOT=grpc # REPO_ROOT can be any directory of your choice $ git clone https://github.com/grpc/grpc.git $REPO_ROOT $ cd $REPO_ROOT + $ git submodule update --init # For the next two commands do `sudo pip install` if you get permission-denied errors $ pip install -rrequirements.txt From f4c70caaf44bdcddc22bda869decee2ca410020c Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 5 May 2016 19:14:05 -0700 Subject: [PATCH 0323/1894] Move manylinux1 precompiler definitions into port_platform.h --- include/grpc/impl/codegen/port_platform.h | 32 +++++++++++++++++++++++ tools/run_tests/artifact_targets.py | 32 +---------------------- 2 files changed, 33 insertions(+), 31 deletions(-) diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index 1229d488edb..d2d9ac78084 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -114,6 +114,38 @@ #define GPR_WIN32_ATOMIC 1 #define GPR_MSVC_TLS 1 #endif +#elif defined(GPR_MANYLINUX1) +// TODO(atash): manylinux1 is just another __linux__ but with ancient +// libraries; it should be integrated with the `__linux__` definitions below. +#define GPR_PLATFORM_STRING "manylinux" +#define GPR_POSIX_CRASH_HANDLER 1 +#define GPR_CPU_LINUX 1 +#define GPR_GCC_ATOMIC 1 +#define GPR_GCC_TLS 1 +#define GPR_LINUX 1 +#define GPR_LINUX_LOG 1 +#define GPR_POSIX_SOCKET 1 +#define GPR_POSIX_WAKEUP_FD 1 +#define GPR_POSIX_SOCKETADDR 1 +#define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 +#define GPR_POSIX_SOCKETUTILS 1 +#define GPR_HAVE_UNIX_SOCKET 1 +#define GPR_HAVE_IP_PKTINFO 1 +#define GPR_HAVE_IPV6_RECVPKTINFO 1 +#define GPR_LINUX_ENV 1 +#define GPR_POSIX_FILE 1 +#define GPR_POSIX_TMPFILE 1 +#define GPR_POSIX_STRING 1 +#define GPR_POSIX_SUBPROCESS 1 +#define GPR_POSIX_SYNC 1 +#define GPR_POSIX_TIME 1 +#define GPR_GETPID_IN_UNISTD_H 1 +#define GPR_HAVE_MSG_NOSIGNAL 1 +#ifdef _LP64 +#define GPR_ARCH_64 1 +#else /* _LP64 */ +#define GPR_ARCH_32 1 +#endif /* _LP64 */ #elif defined(ANDROID) || defined(__ANDROID__) #define GPR_PLATFORM_STRING "android" #define GPR_ANDROID 1 diff --git a/tools/run_tests/artifact_targets.py b/tools/run_tests/artifact_targets.py index 477bd468887..bd1269ceb72 100644 --- a/tools/run_tests/artifact_targets.py +++ b/tools/run_tests/artifact_targets.py @@ -113,37 +113,7 @@ class PythonArtifact: # defines ourselves. # TODO(atash) get better platform-detection support in core so we don't # need to do this manually... - environ['CFLAGS'] = " ".join([ - '-DGPR_NO_AUTODETECT_PLATFORM', - '-DGPR_PLATFORM_STRING=\\"manylinux\\"', - '-DGPR_POSIX_CRASH_HANDLER=1', - '-DGPR_CPU_LINUX=1', - '-DGPR_GCC_ATOMIC=1', - '-DGPR_GCC_TLS=1', - '-DGPR_LINUX=1', - '-DGPR_LINUX_LOG=1', - #'-DGPR_LINUX_MULTIPOLL_WITH_EPOLL=1', - '-DGPR_POSIX_SOCKET=1', - '-DGPR_POSIX_WAKEUP_FD=1', - '-DGPR_POSIX_SOCKETADDR=1', - #'-DGPR_LINUX_EVENTFD=1', - '-DGPR_POSIX_NO_SPECIAL_WAKEUP_FD=1', - #'-DGPR_LINUX_SOCKETUTILS=1', - '-DGPR_POSIX_SOCKETUTILS=1', - '-DGPR_HAVE_UNIX_SOCKET=1', - '-DGPR_HAVE_IP_PKTINFO=1', - '-DGPR_HAVE_IPV6_RECVPKTINFO=1', - '-DGPR_LINUX_ENV=1', - '-DGPR_POSIX_FILE=1', - '-DGPR_POSIX_TMPFILE=1', - '-DGPR_POSIX_STRING=1', - '-DGPR_POSIX_SUBPROCESS=1', - '-DGPR_POSIX_SYNC=1', - '-DGPR_POSIX_TIME=1', - '-DGPR_GETPID_IN_UNISTD_H=1', - '-DGPR_HAVE_MSG_NOSIGNAL=1', - '-DGPR_ARCH_{arch}=1'.format(arch=('32' if self.arch == 'x86' else '64')), - ]) + environ['CFLAGS'] = '-DGPR_MANYLINUX1=1' return create_docker_jobspec(self.name, 'tools/dockerfile/grpc_artifact_python_manylinux_%s' % self.arch, 'tools/run_tests/build_artifact_python.sh', From 61ba1630f6ae1fbdd1ded1bf6badb45a69235029 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 5 May 2016 19:43:03 -0700 Subject: [PATCH 0324/1894] Fix Python grpcio-tools windows build --- tools/run_tests/build_artifact_python.bat | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/run_tests/build_artifact_python.bat b/tools/run_tests/build_artifact_python.bat index 636ae0d393d..342469bba87 100644 --- a/tools/run_tests/build_artifact_python.bat +++ b/tools/run_tests/build_artifact_python.bat @@ -50,6 +50,8 @@ pip install -rrequirements.txt set GRPC_PYTHON_USE_CUSTOM_BDIST=0 set GRPC_PYTHON_BUILD_WITH_CYTHON=1 +@rem TODO(atash): maybe we could avoid the grpc_c.(32|64).python shim above if +@rem this used the right python build? python setup.py bdist_wheel @rem Build gRPC Python tools @@ -57,12 +59,15 @@ set PATH=C:\msys64\mingw%2\bin;%PATH% set CC=C:\msys64\mingw%2\bin\g++.exe set CFLAGS=-fno-wrapv python tools\distrib\python\make_grpcio_tools.py +@rem The following commands *must* be run with the right version of python +@rem otherwise the build get SNAFU'd (so we use the .exe suffix to invoke the python +@rem we set in the %PATH% variable above). if %2 == 32 ( - python tools\distrib\python\grpcio_tools\setup.py build_ext -c mingw32 + python.exe tools\distrib\python\grpcio_tools\setup.py build_ext -c mingw32 ) else ( - python tools\distrib\python\grpcio_tools\setup.py build_ext -c mingw32 -DMS_WIN64 + python.exe tools\distrib\python\grpcio_tools\setup.py build_ext -c mingw32 -DMS_WIN64 ) -python tools\distrib\python\grpcio_tools\setup.py bdist_wheel +python.exe tools\distrib\python\grpcio_tools\setup.py bdist_wheel mkdir artifacts xcopy /Y /I /S dist\* artifacts\ || goto :error From 7e660d7e42d0d5b37e41bbb79c373898746c5442 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 5 May 2016 20:09:33 -0700 Subject: [PATCH 0325/1894] Add Python grpcio-tools documentation --- tools/distrib/python/grpcio_tools/MANIFEST.in | 1 + tools/distrib/python/grpcio_tools/README.rst | 126 ++++++++++++++++++ 2 files changed, 127 insertions(+) create mode 100644 tools/distrib/python/grpcio_tools/README.rst diff --git a/tools/distrib/python/grpcio_tools/MANIFEST.in b/tools/distrib/python/grpcio_tools/MANIFEST.in index e6ab312f09c..f902095ad51 100644 --- a/tools/distrib/python/grpcio_tools/MANIFEST.in +++ b/tools/distrib/python/grpcio_tools/MANIFEST.in @@ -1,5 +1,6 @@ include protoc_deps.py include protoc_lib_deps.py +include README.rst graft grpc graft grpc_root graft third_party diff --git a/tools/distrib/python/grpcio_tools/README.rst b/tools/distrib/python/grpcio_tools/README.rst new file mode 100644 index 00000000000..3be564ef5be --- /dev/null +++ b/tools/distrib/python/grpcio_tools/README.rst @@ -0,0 +1,126 @@ +gRPC Python Tools +================= + +Package for gRPC Python tools. + +Installation +------------ + +The gRPC Python tools package is available for Linux, Mac OS X, and Windows +running Python 2.7. + +From PyPI +~~~~~~~~~ + +If you are installing locally... + +:: + + $ pip install grpcio-tools + +Else system wide (on Ubuntu)... + +:: + + $ sudo pip install grpcio-tools + +If you're on Windows make sure that you installed the :code:`pip.exe` component +when you installed Python (if not go back and install it!) then invoke: + +:: + + $ pip.exe install grpcio-tools + +Windows users may need to invoke :code:`pip.exe` from a command line ran as +administrator. + +n.b. On Windows and on Mac OS X one *must* have a recent release of :code:`pip` +to retrieve the proper wheel from PyPI. Be sure to upgrade to the latest +version! + +You might also need to install Cython to handle installation via the source +distribution if gRPC Python's system coverage with wheels does not happen to +include your system. + +From Source +~~~~~~~~~~~ + +Building from source requires that you have the Python headers (usually a +package named :code:`python-dev`) and Cython installed. + +:: + + $ export REPO_ROOT=grpc # REPO_ROOT can be any directory of your choice + $ git clone https://github.com/grpc/grpc.git $REPO_ROOT + $ cd $REPO_ROOT + $ git submodule update --init + + $ cd tools/distrib/python/grpcio_tools + $ python ../make_grpcio_tools.py + + # For the next command do `sudo pip install` if you get permission-denied errors + $ pip install . + +You cannot currently install Python from source on Windows. Things might work +out for you in MSYS2 (follow the Linux instructions), but it isn't officially +supported at the moment. + +Troubleshooting +~~~~~~~~~~~~~~~ + +Help, I ... + +* **... see a** :code:`pkg_resources.VersionConflict` **when I try to install + grpc** + + This is likely because :code:`pip` doesn't own the offending dependency, + which in turn is likely because your operating system's package manager owns + it. You'll need to force the installation of the dependency: + + :code:`pip install --ignore-installed $OFFENDING_DEPENDENCY` + + For example, if you get an error like the following: + + :: + + Traceback (most recent call last): + File "", line 17, in + ... + File "/usr/lib/python2.7/dist-packages/pkg_resources.py", line 509, in find + raise VersionConflict(dist, req) + pkg_resources.VersionConflict: (six 1.8.0 (/usr/lib/python2.7/dist-packages), Requirement.parse('six>=1.10')) + + You can fix it by doing: + + :: + + sudo pip install --ignore-installed six + +* **... see compiler errors on some platforms when either installing from source or from the source distribution** + + If you see + + :: + + /tmp/pip-build-U8pSsr/cython/Cython/Plex/Scanners.c:4:20: fatal error: Python.h: No such file or directory + #include "Python.h" + ^ + compilation terminated. + + You can fix it by installing `python-dev` package. i.e + + :: + + sudo apt-get install python-dev + + If you see something similar to: + + :: + + third_party/protobuf/src/google/protobuf/stubs/mathlimits.h:173:31: note: in expansion of macro 'SIGNED_INT_MAX' + static const Type kPosMax = SIGNED_INT_MAX(Type); \\ + ^ + And your toolchain is GCC (at the time of this writing, up through at least + GCC 6.0), this is probably a bug where GCC chokes on constant expressions + when the :code:`-fwrapv` flag is specified. You should consider setting your + environment with :code:`CFLAGS=-fno-wrapv` or using clang (:code:`CC=clang`). From 4c07008610922e15c9f406b89e1bf35f80a9728f Mon Sep 17 00:00:00 2001 From: yang-g Date: Thu, 5 May 2016 23:27:13 -0700 Subject: [PATCH 0326/1894] Add a test for server returning error with debug info in trailer. --- src/proto/grpc/testing/echo_messages.proto | 7 ++++++ test/cpp/end2end/end2end_test.cc | 25 ++++++++++++++++++++++ test/cpp/end2end/test_service_impl.cc | 8 +++++++ test/cpp/end2end/test_service_impl.h | 1 + 4 files changed, 41 insertions(+) diff --git a/src/proto/grpc/testing/echo_messages.proto b/src/proto/grpc/testing/echo_messages.proto index 1be1966f101..b405acf0431 100644 --- a/src/proto/grpc/testing/echo_messages.proto +++ b/src/proto/grpc/testing/echo_messages.proto @@ -32,6 +32,12 @@ syntax = "proto3"; package grpc.testing; +// Message to be echoed back serialized in trailer. +message DebugInfo { + repeated string stack_entries = 1; + string detail = 2; +} + message RequestParams { bool echo_deadline = 1; int32 client_cancel_after_us = 2; @@ -43,6 +49,7 @@ message RequestParams { string expected_client_identity = 8; // will force check_auth_context. bool skip_cancelled_check = 9; string expected_transport_security_type = 10; + DebugInfo debug_info = 11; } message EchoRequest { diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 0c9313f88f0..bef1561b09e 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -975,6 +975,31 @@ TEST_P(End2endTest, NonExistingService) { EXPECT_EQ("", s.error_message()); } +// Ask the server to send back a serialized proto in trailer. +// This is an example of setting error details. +TEST_P(End2endTest, BinaryTrailerTest) { + ResetStub(); + EchoRequest request; + EchoResponse response; + ClientContext context; + + request.mutable_param()->set_echo_metadata(true); + DebugInfo* info = request.mutable_param()->mutable_debug_info(); + info->add_stack_entries("stack_entry_1"); + info->add_stack_entries("stack_entry_2"); + info->add_stack_entries("stack_entry_3"); + info->set_detail("detailed debug info"); + grpc::string expected_string = info->SerializeAsString(); + request.set_message("Hello"); + + Status s = stub_->Echo(&context, request, &response); + EXPECT_FALSE(s.ok()); + auto trailers = context.GetServerTrailingMetadata(); + EXPECT_EQ(1, trailers.count(kDebugInfoTrailerKey)); + auto iter = trailers.find(kDebugInfoTrailerKey); + EXPECT_EQ(expected_string, iter->second); +} + ////////////////////////////////////////////////////////////////////////// // Test with and without a proxy. class ProxyEnd2endTest : public End2endTest { diff --git a/test/cpp/end2end/test_service_impl.cc b/test/cpp/end2end/test_service_impl.cc index 2f5dd6d49e8..cbaee922289 100644 --- a/test/cpp/end2end/test_service_impl.cc +++ b/test/cpp/end2end/test_service_impl.cc @@ -135,6 +135,14 @@ Status TestServiceImpl::Echo(ServerContext* context, const EchoRequest* request, context->AddTrailingMetadata(ToString(iter->first), ToString(iter->second)); } + // Terminate rpc with error and debug info in trailer. + if (request->param().debug_info().stack_entries_size() || + !request->param().debug_info().detail().empty()) { + grpc::string serialized_debug_info = + request->param().debug_info().SerializeAsString(); + context->AddTrailingMetadata(kDebugInfoTrailerKey, serialized_debug_info); + return Status::CANCELLED; + } } if (request->has_param() && (request->param().expected_client_identity().length() > 0 || diff --git a/test/cpp/end2end/test_service_impl.h b/test/cpp/end2end/test_service_impl.h index 1ab6ced9e00..c89f88c900e 100644 --- a/test/cpp/end2end/test_service_impl.h +++ b/test/cpp/end2end/test_service_impl.h @@ -47,6 +47,7 @@ namespace testing { const int kNumResponseStreamsMsgs = 3; const char* const kServerCancelAfterReads = "cancel_after_reads"; const char* const kServerTryCancelRequest = "server_try_cancel"; +const char* const kDebugInfoTrailerKey = "debug-info-bin"; typedef enum { DO_NOT_CANCEL = 0, From 067cce56d4158031ea40f2f91a2e3839ebe2bbec Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Fri, 6 May 2016 09:12:39 -0700 Subject: [PATCH 0327/1894] Fix asan test failure. --- test/core/bad_client/tests/large_metadata.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/core/bad_client/tests/large_metadata.c b/test/core/bad_client/tests/large_metadata.c index b3521439f52..1a8d2a29870 100644 --- a/test/core/bad_client/tests/large_metadata.c +++ b/test/core/bad_client/tests/large_metadata.c @@ -433,6 +433,7 @@ static void server_verifier_sends_too_much_metadata(grpc_server *server, cq_expect_completion(cqv, tag(102), 0); // Operation fails. cq_verify(cqv); + gpr_free((char *)meta.value); grpc_metadata_array_destroy(&request_metadata_recv); grpc_call_details_destroy(&call_details); grpc_call_destroy(s); @@ -469,6 +470,7 @@ static void client_validator(gpr_slice_buffer *incoming) { *p++ = 11; // Compare actual and expected. GPR_ASSERT(gpr_slice_cmp(last_frame, expected) == 0); + gpr_slice_buffer_destroy(&last_frame_buffer); } int main(int argc, char **argv) { From af1fe578e099f5e470a9e1a853181983753ceefa Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Fri, 6 May 2016 09:40:52 -0700 Subject: [PATCH 0328/1894] Namespace change --- .../grpcio/tests/health_check/_health_servicer_test.py | 6 +++--- src/python/grpcio_health_checking/MANIFEST.in | 2 ++ .../{grpc_health_checking => grpc_health}/__init__.py | 0 .../health/__init__.py | 0 .../health/v1/__init__.py | 0 .../health/v1/health.py | 2 +- src/python/grpcio_health_checking/health_commands.py | 2 +- src/python/grpcio_health_checking/setup.py | 2 +- 8 files changed, 8 insertions(+), 6 deletions(-) rename src/python/grpcio_health_checking/{grpc_health_checking => grpc_health}/__init__.py (100%) rename src/python/grpcio_health_checking/{grpc_health_checking => grpc_health}/health/__init__.py (100%) rename src/python/grpcio_health_checking/{grpc_health_checking => grpc_health}/health/v1/__init__.py (100%) rename src/python/grpcio_health_checking/{grpc_health_checking => grpc_health}/health/v1/health.py (98%) diff --git a/src/python/grpcio/tests/health_check/_health_servicer_test.py b/src/python/grpcio/tests/health_check/_health_servicer_test.py index 625cb7fc590..1b633886635 100644 --- a/src/python/grpcio/tests/health_check/_health_servicer_test.py +++ b/src/python/grpcio/tests/health_check/_health_servicer_test.py @@ -27,12 +27,12 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -"""Tests of grpc_health_checking.health.v1.health.""" +"""Tests of grpc_health.health.v1.health.""" import unittest -from grpc_health_checking.health.v1 import health -from grpc_health_checking.health.v1 import health_pb2 +from grpc_health.health.v1 import health +from grpc_health.health.v1 import health_pb2 class HealthServicerTest(unittest.TestCase): diff --git a/src/python/grpcio_health_checking/MANIFEST.in b/src/python/grpcio_health_checking/MANIFEST.in index 40c6ac84970..7d26647697e 100644 --- a/src/python/grpcio_health_checking/MANIFEST.in +++ b/src/python/grpcio_health_checking/MANIFEST.in @@ -1 +1,3 @@ +include health_commands.py +graft grpc_health global-exclude *.pyc diff --git a/src/python/grpcio_health_checking/grpc_health_checking/__init__.py b/src/python/grpcio_health_checking/grpc_health/__init__.py similarity index 100% rename from src/python/grpcio_health_checking/grpc_health_checking/__init__.py rename to src/python/grpcio_health_checking/grpc_health/__init__.py diff --git a/src/python/grpcio_health_checking/grpc_health_checking/health/__init__.py b/src/python/grpcio_health_checking/grpc_health/health/__init__.py similarity index 100% rename from src/python/grpcio_health_checking/grpc_health_checking/health/__init__.py rename to src/python/grpcio_health_checking/grpc_health/health/__init__.py diff --git a/src/python/grpcio_health_checking/grpc_health_checking/health/v1/__init__.py b/src/python/grpcio_health_checking/grpc_health/health/v1/__init__.py similarity index 100% rename from src/python/grpcio_health_checking/grpc_health_checking/health/v1/__init__.py rename to src/python/grpcio_health_checking/grpc_health/health/v1/__init__.py diff --git a/src/python/grpcio_health_checking/grpc_health_checking/health/v1/health.py b/src/python/grpcio_health_checking/grpc_health/health/v1/health.py similarity index 98% rename from src/python/grpcio_health_checking/grpc_health_checking/health/v1/health.py rename to src/python/grpcio_health_checking/grpc_health/health/v1/health.py index 7068ba9605b..8da60c70cb1 100644 --- a/src/python/grpcio_health_checking/grpc_health_checking/health/v1/health.py +++ b/src/python/grpcio_health_checking/grpc_health/health/v1/health.py @@ -31,7 +31,7 @@ import threading -from grpc_health_checking.health.v1 import health_pb2 +from grpc_health.health.v1 import health_pb2 class HealthServicer(health_pb2.BetaHealthServicer): diff --git a/src/python/grpcio_health_checking/health_commands.py b/src/python/grpcio_health_checking/health_commands.py index b01e0bd0e84..631066f3310 100644 --- a/src/python/grpcio_health_checking/health_commands.py +++ b/src/python/grpcio_health_checking/health_commands.py @@ -94,7 +94,7 @@ class CopyProtoModules(setuptools.Command): if os.path.isfile(HEALTH_PROTO): shutil.copyfile( HEALTH_PROTO, - os.path.join(ROOT_DIR, 'grpc_health_checking/health/v1/health.proto')) + os.path.join(ROOT_DIR, 'grpc_health/health/v1/health.proto')) class BuildPy(build_py.build_py): diff --git a/src/python/grpcio_health_checking/setup.py b/src/python/grpcio_health_checking/setup.py index 2818c5b81dc..d68a7ced8ed 100644 --- a/src/python/grpcio_health_checking/setup.py +++ b/src/python/grpcio_health_checking/setup.py @@ -63,7 +63,7 @@ _COMMAND_CLASS = { setuptools.setup( name='grpcio_health_checking', - version='0.14.0b1', + version='0.14.0b0', packages=list(_PACKAGES), package_dir=_PACKAGE_DIRECTORIES, install_requires=_INSTALL_REQUIRES, From c3eb64980f9cfd907c30c25853a45124138ae88d Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Thu, 5 May 2016 16:07:33 -0700 Subject: [PATCH 0329/1894] node: fix math server minor bug --- src/node/test/math/math_server.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/test/math/math_server.js b/src/node/test/math/math_server.js index fa05ed01654..5e3d1dd8641 100644 --- a/src/node/test/math/math_server.js +++ b/src/node/test/math/math_server.js @@ -68,7 +68,7 @@ function mathDiv(call, cb) { function mathFib(stream) { // Here, call is a standard writable Node object Stream var previous = 0, current = 1; - for (var i = 0; i < stream.request.limit; i++) { + for (var i = 0; i < stream.request.getLimit(); i++) { var response = new math.Num(); response.setNum(current); stream.write(response); From 55643fee6b1c02277837b187d2ea706e86d9c315 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Tue, 3 May 2016 15:50:07 -0700 Subject: [PATCH 0330/1894] php: stress test client --- src/php/tests/interop/interop_client.php | 249 ++++++++++++----------- src/php/tests/interop/metrics_client.php | 17 ++ src/php/tests/interop/stress_client.php | 83 ++++++++ 3 files changed, 228 insertions(+), 121 deletions(-) create mode 100644 src/php/tests/interop/metrics_client.php create mode 100644 src/php/tests/interop/stress_client.php diff --git a/src/php/tests/interop/interop_client.php b/src/php/tests/interop/interop_client.php index aebf80f6bf0..965a543b10d 100755 --- a/src/php/tests/interop/interop_client.php +++ b/src/php/tests/interop/interop_client.php @@ -388,141 +388,148 @@ function timeoutOnSleepingServer($stub) 'Call status was not DEADLINE_EXCEEDED'); } -$args = getopt('', ['server_host:', 'server_port:', 'test_case:', - 'use_tls::', 'use_test_ca::', - 'server_host_override:', 'oauth_scope:', - 'default_service_account:', ]); -if (!array_key_exists('server_host', $args)) { - throw new Exception('Missing argument: --server_host is required'); -} -if (!array_key_exists('server_port', $args)) { - throw new Exception('Missing argument: --server_port is required'); -} -if (!array_key_exists('test_case', $args)) { - throw new Exception('Missing argument: --test_case is required'); -} - -if ($args['server_port'] == 443) { - $server_address = $args['server_host']; -} else { - $server_address = $args['server_host'].':'.$args['server_port']; -} +function interop_main($args) +{ + if (!array_key_exists('server_host', $args)) { + throw new Exception('Missing argument: --server_host is required'); + } + if (!array_key_exists('server_port', $args)) { + throw new Exception('Missing argument: --server_port is required'); + } + if (!array_key_exists('test_case', $args)) { + throw new Exception('Missing argument: --test_case is required'); + } -$test_case = $args['test_case']; + if ($args['server_port'] == 443) { + $server_address = $args['server_host']; + } else { + $server_address = $args['server_host'].':'.$args['server_port']; + } -$host_override = 'foo.test.google.fr'; -if (array_key_exists('server_host_override', $args)) { - $host_override = $args['server_host_override']; -} + $test_case = $args['test_case']; -$use_tls = false; -if (array_key_exists('use_tls', $args) && - $args['use_tls'] != 'false') { - $use_tls = true; -} + $host_override = 'foo.test.google.fr'; + if (array_key_exists('server_host_override', $args)) { + $host_override = $args['server_host_override']; + } -$use_test_ca = false; -if (array_key_exists('use_test_ca', $args) && - $args['use_test_ca'] != 'false') { - $use_test_ca = true; -} + $use_tls = false; + if (array_key_exists('use_tls', $args) && + $args['use_tls'] != 'false') { + $use_tls = true; + } -$opts = []; + $use_test_ca = false; + if (array_key_exists('use_test_ca', $args) && + $args['use_test_ca'] != 'false') { + $use_test_ca = true; + } -if ($use_tls) { - if ($use_test_ca) { - $ssl_credentials = Grpc\ChannelCredentials::createSsl( - file_get_contents(dirname(__FILE__).'/../data/ca.pem')); + $opts = []; + + if ($use_tls) { + if ($use_test_ca) { + $ssl_credentials = Grpc\ChannelCredentials::createSsl( + file_get_contents(dirname(__FILE__).'/../data/ca.pem')); + } else { + $ssl_credentials = Grpc\ChannelCredentials::createSsl(); + } + $opts['credentials'] = $ssl_credentials; + $opts['grpc.ssl_target_name_override'] = $host_override; } else { - $ssl_credentials = Grpc\ChannelCredentials::createSsl(); + $opts['credentials'] = Grpc\ChannelCredentials::createInsecure(); } - $opts['credentials'] = $ssl_credentials; - $opts['grpc.ssl_target_name_override'] = $host_override; -} else { - $opts['credentials'] = Grpc\ChannelCredentials::createInsecure(); -} -if (in_array($test_case, ['service_account_creds', - 'compute_engine_creds', 'jwt_token_creds', ])) { - if ($test_case == 'jwt_token_creds') { - $auth_credentials = ApplicationDefaultCredentials::getCredentials(); - } else { + if (in_array($test_case, ['service_account_creds', + 'compute_engine_creds', 'jwt_token_creds', ])) { + if ($test_case == 'jwt_token_creds') { + $auth_credentials = ApplicationDefaultCredentials::getCredentials(); + } else { + $auth_credentials = ApplicationDefaultCredentials::getCredentials( + $args['oauth_scope'] + ); + } + $opts['update_metadata'] = $auth_credentials->getUpdateMetadataFunc(); + } + + if ($test_case == 'oauth2_auth_token') { $auth_credentials = ApplicationDefaultCredentials::getCredentials( $args['oauth_scope'] ); + $token = $auth_credentials->fetchAuthToken(); + $update_metadata = + function ($metadata, + $authUri = null, + ClientInterface $client = null) use ($token) { + $metadata_copy = $metadata; + $metadata_copy[CredentialsLoader::AUTH_METADATA_KEY] = + [sprintf('%s %s', + $token['token_type'], + $token['access_token'])]; + + return $metadata_copy; + }; + $opts['update_metadata'] = $update_metadata; } - $opts['update_metadata'] = $auth_credentials->getUpdateMetadataFunc(); -} -if ($test_case == 'oauth2_auth_token') { - $auth_credentials = ApplicationDefaultCredentials::getCredentials( - $args['oauth_scope'] - ); - $token = $auth_credentials->fetchAuthToken(); - $update_metadata = - function ($metadata, - $authUri = null, - ClientInterface $client = null) use ($token) { - $metadata_copy = $metadata; - $metadata_copy[CredentialsLoader::AUTH_METADATA_KEY] = - [sprintf('%s %s', - $token['token_type'], - $token['access_token'])]; - - return $metadata_copy; - }; - $opts['update_metadata'] = $update_metadata; + $stub = new grpc\testing\TestServiceClient($server_address, $opts); + + echo "Connecting to $server_address\n"; + echo "Running test case $test_case\n"; + + switch ($test_case) { + case 'empty_unary': + emptyUnary($stub); + break; + case 'large_unary': + largeUnary($stub); + break; + case 'client_streaming': + clientStreaming($stub); + break; + case 'server_streaming': + serverStreaming($stub); + break; + case 'ping_pong': + pingPong($stub); + break; + case 'empty_stream': + emptyStream($stub); + break; + case 'cancel_after_begin': + cancelAfterBegin($stub); + break; + case 'cancel_after_first_response': + cancelAfterFirstResponse($stub); + break; + case 'timeout_on_sleeping_server': + timeoutOnSleepingServer($stub); + break; + case 'service_account_creds': + serviceAccountCreds($stub, $args); + break; + case 'compute_engine_creds': + computeEngineCreds($stub, $args); + break; + case 'jwt_token_creds': + jwtTokenCreds($stub, $args); + break; + case 'oauth2_auth_token': + oauth2AuthToken($stub, $args); + break; + case 'per_rpc_creds': + perRpcCreds($stub, $args); + break; + default: + echo "Unsupported test case $test_case\n"; + exit(1); + } } -$stub = new grpc\testing\TestServiceClient($server_address, $opts); - -echo "Connecting to $server_address\n"; -echo "Running test case $test_case\n"; - -switch ($test_case) { - case 'empty_unary': - emptyUnary($stub); - break; - case 'large_unary': - largeUnary($stub); - break; - case 'client_streaming': - clientStreaming($stub); - break; - case 'server_streaming': - serverStreaming($stub); - break; - case 'ping_pong': - pingPong($stub); - break; - case 'empty_stream': - emptyStream($stub); - break; - case 'cancel_after_begin': - cancelAfterBegin($stub); - break; - case 'cancel_after_first_response': - cancelAfterFirstResponse($stub); - break; - case 'timeout_on_sleeping_server': - timeoutOnSleepingServer($stub); - break; - case 'service_account_creds': - serviceAccountCreds($stub, $args); - break; - case 'compute_engine_creds': - computeEngineCreds($stub, $args); - break; - case 'jwt_token_creds': - jwtTokenCreds($stub, $args); - break; - case 'oauth2_auth_token': - oauth2AuthToken($stub, $args); - break; - case 'per_rpc_creds': - perRpcCreds($stub, $args); - break; - default: - echo "Unsupported test case $test_case\n"; - exit(1); +if (isset($_SERVER['PHP_SELF']) && preg_match('/interop_client/', $_SERVER['PHP_SELF'])) { + $args = getopt('', ['server_host:', 'server_port:', 'test_case:', + 'use_tls::', 'use_test_ca::', + 'server_host_override:', 'oauth_scope:', + 'default_service_account:', ]); + interop_main($args); } diff --git a/src/php/tests/interop/metrics_client.php b/src/php/tests/interop/metrics_client.php new file mode 100644 index 00000000000..404e5e191ba --- /dev/null +++ b/src/php/tests/interop/metrics_client.php @@ -0,0 +1,17 @@ + $deadline) { + break; + } + if ($client_connection = socket_accept($socket)) { + // there is an incoming request, respond with qps metrics + $input = socket_read($client_connection, 1024); + $qps = round($count / ($current_time - $start_time)); + socket_write($client_connection, "qps: $qps"); + socket_close($client_connection); + } else { + // do actual work, run one interop test case + $args['test_case'] = + $args['test_cases'][mt_rand(0, $num_test_cases - 1)]; + @interop_main($args); + $count++; + } + } + socket_close($socket); + echo "Number of interop tests run in $args[test_duration_secs] seconds: $count.\n"; +} + +// process command line arguments +$raw_args = getopt('', + ['server_addresses::', + 'test_cases:', + 'metrics_port::', + 'test_duration_secs::', + 'num_channels_per_server::', + 'num_stubs_per_channel::']); + +$args = []; + +if (empty($raw_args['server_addresses'])) { + $args['server_host'] = 'localhost'; + $args['server_port'] = '8080'; +} else { + $parts = explode(':', $raw_args['server_addresses']); + $args['server_host'] = $parts[0]; + $args['server_port'] = (count($parts) == 2) ? $parts[1] : ''; +} + +$args['metrics_port'] = empty($raw_args['metrics_port']) ? + '8081' : $args['metrics_port']; + +$args['test_duration_secs'] = empty($raw_args['test_duration_secs']) || + $raw_args['test_duration_secs'] == -1 ? + false : $raw_args['test_duration_secs']; + +$test_cases = []; +$test_case_strs = explode(',', $raw_args['test_cases']); +foreach ($test_case_strs as $test_case_str) { + $parts = explode(':', $test_case_str); + $test_cases = array_merge($test_cases, array_fill(0, $parts[1], $parts[0])); +} +$args['test_cases'] = $test_cases; + +stress_main($args); From c1bb55eef7343655cd23051d1e1b348c99756b40 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Wed, 4 May 2016 09:53:09 -0700 Subject: [PATCH 0331/1894] reuse interop client stub --- src/php/tests/interop/interop_client.php | 14 ++++++++++++-- src/php/tests/interop/metrics_client.php | 4 ++-- src/php/tests/interop/stress_client.php | 3 ++- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/php/tests/interop/interop_client.php b/src/php/tests/interop/interop_client.php index 965a543b10d..830df133374 100755 --- a/src/php/tests/interop/interop_client.php +++ b/src/php/tests/interop/interop_client.php @@ -388,7 +388,7 @@ function timeoutOnSleepingServer($stub) 'Call status was not DEADLINE_EXCEEDED'); } -function interop_main($args) +function _makeStub($args) { if (!array_key_exists('server_host', $args)) { throw new Exception('Missing argument: --server_host is required'); @@ -474,7 +474,15 @@ function interop_main($args) $stub = new grpc\testing\TestServiceClient($server_address, $opts); - echo "Connecting to $server_address\n"; + return $stub; +} + +function interop_main($args, $stub = false) { + if (!$stub) { + $stub = _makeStub($args); + } + + $test_case = $args['test_case']; echo "Running test case $test_case\n"; switch ($test_case) { @@ -524,6 +532,8 @@ function interop_main($args) echo "Unsupported test case $test_case\n"; exit(1); } + + return $stub; } if (isset($_SERVER['PHP_SELF']) && preg_match('/interop_client/', $_SERVER['PHP_SELF'])) { diff --git a/src/php/tests/interop/metrics_client.php b/src/php/tests/interop/metrics_client.php index 404e5e191ba..7f5ba5b3ccd 100644 --- a/src/php/tests/interop/metrics_client.php +++ b/src/php/tests/interop/metrics_client.php @@ -1,7 +1,7 @@ Date: Thu, 5 May 2016 16:38:15 -0700 Subject: [PATCH 0332/1894] fix copyright --- src/php/tests/interop/interop_client.php | 2 +- src/php/tests/interop/metrics_client.php | 32 ++++++++++++++++++++++++ src/php/tests/interop/stress_client.php | 32 ++++++++++++++++++++++++ 3 files changed, 65 insertions(+), 1 deletion(-) diff --git a/src/php/tests/interop/interop_client.php b/src/php/tests/interop/interop_client.php index 830df133374..565bfce74f7 100755 --- a/src/php/tests/interop/interop_client.php +++ b/src/php/tests/interop/interop_client.php @@ -1,7 +1,7 @@ Date: Fri, 6 May 2016 10:48:17 -0700 Subject: [PATCH 0333/1894] fix clang formatting --- test/cpp/interop/interop_client.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index ca89d055944..e9d95dc8d08 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -153,7 +153,7 @@ bool InteropClient::AssertStatusOk(const Status& s) { } bool InteropClient::AssertStatusCode(const Status& s, - StatusCode expected_code) { + StatusCode expected_code) { if (s.error_code() == expected_code) { return true; } From 6bbe369434f466e4694243305485e503eaf3ea02 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 6 May 2016 11:43:22 -0700 Subject: [PATCH 0334/1894] Make Ruby library terminate on Ctrl+C on client and server --- src/ruby/ext/grpc/rb_grpc.c | 2 + src/ruby/ext/grpc/rb_signal.c | 66 +++++++++++++++++++++++ src/ruby/ext/grpc/rb_signal.h | 39 ++++++++++++++ src/ruby/lib/grpc.rb | 3 ++ src/ruby/lib/grpc/generic/active_call.rb | 6 +++ src/ruby/lib/grpc/generic/rpc_server.rb | 57 +++----------------- src/ruby/lib/grpc/signals.rb | 69 ++++++++++++++++++++++++ 7 files changed, 191 insertions(+), 51 deletions(-) create mode 100644 src/ruby/ext/grpc/rb_signal.c create mode 100644 src/ruby/ext/grpc/rb_signal.h create mode 100644 src/ruby/lib/grpc/signals.rb diff --git a/src/ruby/ext/grpc/rb_grpc.c b/src/ruby/ext/grpc/rb_grpc.c index acb47b00558..9145c52ef8d 100644 --- a/src/ruby/ext/grpc/rb_grpc.c +++ b/src/ruby/ext/grpc/rb_grpc.c @@ -50,6 +50,7 @@ #include "rb_loader.h" #include "rb_server.h" #include "rb_server_credentials.h" +#include "rb_signal.h" static VALUE grpc_rb_cTimeVal = Qnil; @@ -332,6 +333,7 @@ void Init_grpc_c() { Init_grpc_channel_credentials(); Init_grpc_server(); Init_grpc_server_credentials(); + Init_grpc_signals(); Init_grpc_status_codes(); Init_grpc_time_consts(); } diff --git a/src/ruby/ext/grpc/rb_signal.c b/src/ruby/ext/grpc/rb_signal.c new file mode 100644 index 00000000000..dd60b0f251f --- /dev/null +++ b/src/ruby/ext/grpc/rb_signal.c @@ -0,0 +1,66 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include + +#include + +#include "rb_grpc.h" + +static void (*old_sigint_handler)(int); +static void (*old_sigterm_handler)(int); + +static volatile bool signal_received = false; + +static void handle_signal(int signum) { + signal_received = true; + if (signum == SIGINT) { + old_sigint_handler(signum); + } else if (signum == SIGTERM) { + old_sigterm_handler(signum); + } +} + +static VALUE grpc_rb_signal_received(VALUE self) { + (void)self; + return signal_received ? Qtrue : Qfalse; +} + +void Init_grpc_signals() { + old_sigint_handler = signal(SIGINT, handle_signal); + old_sigterm_handler = signal(SIGTERM, handle_signal); + rb_define_singleton_method(grpc_rb_mGrpcCore, "signal_received?", + grpc_rb_signal_received, 0); +} diff --git a/src/ruby/ext/grpc/rb_signal.h b/src/ruby/ext/grpc/rb_signal.h new file mode 100644 index 00000000000..07e49c0a8be --- /dev/null +++ b/src/ruby/ext/grpc/rb_signal.h @@ -0,0 +1,39 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_RB_SIGNAL_H_ +#define GRPC_RB_SIGNAL_H_ + +void Init_grpc_signals(); + +#endif /* GRPC_RB_SIGNAL_H_ */ diff --git a/src/ruby/lib/grpc.rb b/src/ruby/lib/grpc.rb index 79fa705b1c9..7c9aae30e95 100644 --- a/src/ruby/lib/grpc.rb +++ b/src/ruby/lib/grpc.rb @@ -33,6 +33,7 @@ require_relative 'grpc/errors' require_relative 'grpc/grpc' require_relative 'grpc/logconfig' require_relative 'grpc/notifier' +require_relative 'grpc/signals' require_relative 'grpc/version' require_relative 'grpc/core/time_consts' require_relative 'grpc/generic/active_call' @@ -47,3 +48,5 @@ begin ensure file.close end + +GRPC::Signals.wait_for_signals diff --git a/src/ruby/lib/grpc/generic/active_call.rb b/src/ruby/lib/grpc/generic/active_call.rb index ecf3cc32935..fd20a861448 100644 --- a/src/ruby/lib/grpc/generic/active_call.rb +++ b/src/ruby/lib/grpc/generic/active_call.rb @@ -28,7 +28,9 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. require 'forwardable' +require 'weakref' require_relative 'bidi_call' +require_relative '../signals' class Struct # BatchResult is the struct returned by calls to call#start_batch. @@ -121,6 +123,10 @@ module GRPC @unmarshal = unmarshal @metadata_tag = metadata_tag @op_notifier = nil + weak_self = WeakRef.new(self) + remove_handler = GRPC::Signals.register_handler(&weak_self + .method(:cancel)) + ObjectSpace.define_finalizer(self, remove_handler) end # output_metadata are provides access to hash that can be used to diff --git a/src/ruby/lib/grpc/generic/rpc_server.rb b/src/ruby/lib/grpc/generic/rpc_server.rb index a0f4071adc8..81082d13bf5 100644 --- a/src/ruby/lib/grpc/generic/rpc_server.rb +++ b/src/ruby/lib/grpc/generic/rpc_server.rb @@ -28,46 +28,13 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. require_relative '../grpc' +require_relative '../signals' require_relative 'active_call' require_relative 'service' require 'thread' -# A global that contains signals the gRPC servers should respond to. -$grpc_signals = [] - # GRPC contains the General RPC module. module GRPC - # Handles the signals in $grpc_signals. - # - # @return false if the server should exit, true if not. - def handle_signals - loop do - sig = $grpc_signals.shift - case sig - when 'INT' - return false - when 'TERM' - return false - when nil - return true - end - end - true - end - module_function :handle_signals - - # Sets up a signal handler that adds signals to the signal handling global. - # - # Signal handlers should do as little as humanly possible. - # Here, they just add themselves to $grpc_signals - # - # RpcServer (and later other parts of gRPC) monitors the signals - # $grpc_signals in its own non-signal context. - def trap_signals - %w(INT TERM).each { |sig| trap(sig) { $grpc_signals << sig } } - end - module_function :trap_signals - # Pool is a simple thread pool. class Pool # Default keep alive period is 1s @@ -328,23 +295,6 @@ module GRPC end end - # Runs the server in its own thread, then waits for signal INT or TERM on - # the current thread to terminate it. - def run_till_terminated - GRPC.trap_signals - t = Thread.new do - run - end - t.abort_on_exception = true - wait_till_running - until running_state == :stopped - sleep SIGNAL_CHECK_PERIOD - break unless GRPC.handle_signals - end - stop - t.join - end - # handle registration of classes # # service is either a class that includes GRPC::GenericService and whose @@ -403,9 +353,14 @@ module GRPC transition_running_state(:running) @run_cond.broadcast end + remove_signal_handler = GRPC::Signals.register_handler { stop } loop_handle_server_calls + # Remove signal handler when server stops + remove_signal_handler.call end + alias_method :run_till_terminated, :run + # Sends RESOURCE_EXHAUSTED if there are too many unprocessed jobs def available?(an_rpc) jobs_count, max = @pool.jobs_waiting, @max_waiting_requests diff --git a/src/ruby/lib/grpc/signals.rb b/src/ruby/lib/grpc/signals.rb new file mode 100644 index 00000000000..7d2ec25dcb3 --- /dev/null +++ b/src/ruby/lib/grpc/signals.rb @@ -0,0 +1,69 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +require 'thread' +require_relative 'grpc' + +# GRPC contains the General RPC module. +module GRPC + # Signals contains gRPC functions related to signal handling + module Signals + @interpreter_exiting = false + @signal_handlers = [] + @handlers_mutex = Mutex.new + + def register_handler(&handler) + @handlers_mutex.synchronize do + @signal_handlers.push(handler) + handler.call if @exit_signal_received + end + # Returns a function to remove the handler + lambda do + @handlers_mutex.synchronize { @signal_handlers.delete(handler) } + end + end + module_function :register_handler + + def wait_for_signals + t = Thread.new do + sleep 1 until GRPC::Core.signal_received? || @interpreter_exiting + unless @interpreter_exiting + @handlers_mutex.synchronize do + @signal_handlers.each(&:call) + end + end + end + at_exit do + @interpreter_exiting = true + t.join + end + end + module_function :wait_for_signals + end +end From f6cedf82c30c9329e06d8b93c6ef28b7f2ad7e3a Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Thu, 5 May 2016 16:50:49 -0700 Subject: [PATCH 0335/1894] Made complex directories for python protoc test --- .../protoc_plugin/beta_python_plugin_test.py | 295 +++++++++--------- .../protos/payload/test_payload.proto | 51 +++ .../protos/requests/r/test_requests.proto | 77 +++++ .../protos/responses/test_responses.proto | 47 +++ .../service/test_service.proto} | 85 +---- 5 files changed, 333 insertions(+), 222 deletions(-) create mode 100644 src/python/grpcio/tests/protoc_plugin/protos/payload/test_payload.proto create mode 100644 src/python/grpcio/tests/protoc_plugin/protos/requests/r/test_requests.proto create mode 100644 src/python/grpcio/tests/protoc_plugin/protos/responses/test_responses.proto rename src/python/grpcio/tests/protoc_plugin/{protoc_plugin_test.proto => protos/service/test_service.proto} (54%) diff --git a/src/python/grpcio/tests/protoc_plugin/beta_python_plugin_test.py b/src/python/grpcio/tests/protoc_plugin/beta_python_plugin_test.py index 3dc3042e38b..7466f880597 100644 --- a/src/python/grpcio/tests/protoc_plugin/beta_python_plugin_test.py +++ b/src/python/grpcio/tests/protoc_plugin/beta_python_plugin_test.py @@ -59,11 +59,12 @@ STUB_FACTORY_IDENTIFIER = 'beta_create_TestService_stub' class _ServicerMethods(object): - def __init__(self, test_pb2): + def __init__(self, response_pb2, payload_pb2): self._condition = threading.Condition() self._paused = False self._fail = False - self._test_pb2 = test_pb2 + self._response_pb2 = response_pb2 + self._payload_pb2 = payload_pb2 @contextlib.contextmanager def pause(self): # pylint: disable=invalid-name @@ -90,22 +91,22 @@ class _ServicerMethods(object): self._condition.wait() def UnaryCall(self, request, unused_rpc_context): - response = self._test_pb2.SimpleResponse() - response.payload.payload_type = self._test_pb2.COMPRESSABLE + response = self._response_pb2.SimpleResponse() + response.payload.payload_type = self._payload_pb2.COMPRESSABLE response.payload.payload_compressable = 'a' * request.response_size self._control() return response def StreamingOutputCall(self, request, unused_rpc_context): for parameter in request.response_parameters: - response = self._test_pb2.StreamingOutputCallResponse() - response.payload.payload_type = self._test_pb2.COMPRESSABLE + response = self._response_pb2.StreamingOutputCallResponse() + response.payload.payload_type = self._payload_pb2.COMPRESSABLE response.payload.payload_compressable = 'a' * parameter.size self._control() yield response def StreamingInputCall(self, request_iter, unused_rpc_context): - response = self._test_pb2.StreamingInputCallResponse() + response = self._response_pb2.StreamingInputCallResponse() aggregated_payload_size = 0 for request in request_iter: aggregated_payload_size += len(request.payload.payload_compressable) @@ -116,8 +117,8 @@ class _ServicerMethods(object): def FullDuplexCall(self, request_iter, unused_rpc_context): for request in request_iter: for parameter in request.response_parameters: - response = self._test_pb2.StreamingOutputCallResponse() - response.payload.payload_type = self._test_pb2.COMPRESSABLE + response = self._response_pb2.StreamingOutputCallResponse() + response.payload.payload_type = self._payload_pb2.COMPRESSABLE response.payload.payload_compressable = 'a' * parameter.size self._control() yield response @@ -126,8 +127,8 @@ class _ServicerMethods(object): responses = [] for request in request_iter: for parameter in request.response_parameters: - response = self._test_pb2.StreamingOutputCallResponse() - response.payload.payload_type = self._test_pb2.COMPRESSABLE + response = self._response_pb2.StreamingOutputCallResponse() + response.payload.payload_type = self._payload_pb2.COMPRESSABLE response.payload.payload_compressable = 'a' * parameter.size self._control() responses.append(response) @@ -136,23 +137,25 @@ class _ServicerMethods(object): @contextlib.contextmanager -def _CreateService(test_pb2): +def _CreateService(service_pb2, response_pb2, payload_pb2): """Provides a servicer backend and a stub. The servicer is just the implementation of the actual servicer passed to the face player of the python RPC implementation; the two are detached. Args: - test_pb2: The test_pb2 module generated by this test. + service_pb2: The service_pb2 module generated by this test. + response_pb2: The response_pb2 module generated by this test + payload_pb2: The payload_pb2 module generated by this test Yields: A (servicer_methods, stub) pair where servicer_methods is the back-end of the service bound to the stub and and stub is the stub on which to invoke RPCs. """ - servicer_methods = _ServicerMethods(test_pb2) + servicer_methods = _ServicerMethods(response_pb2, payload_pb2) - class Servicer(getattr(test_pb2, SERVICER_IDENTIFIER)): + class Servicer(getattr(service_pb2, SERVICER_IDENTIFIER)): def UnaryCall(self, request, context): return servicer_methods.UnaryCall(request, context) @@ -170,55 +173,52 @@ def _CreateService(test_pb2): return servicer_methods.HalfDuplexCall(request_iter, context) servicer = Servicer() - server = getattr(test_pb2, SERVER_FACTORY_IDENTIFIER)(servicer) + server = getattr(service_pb2, SERVER_FACTORY_IDENTIFIER)(servicer) port = server.add_insecure_port('[::]:0') server.start() channel = implementations.insecure_channel('localhost', port) - stub = getattr(test_pb2, STUB_FACTORY_IDENTIFIER)(channel) - yield servicer_methods, stub + stub = getattr(service_pb2, STUB_FACTORY_IDENTIFIER)(channel) + yield (servicer_methods, stub) server.stop(0) @contextlib.contextmanager -def _CreateIncompleteService(test_pb2): +def _CreateIncompleteService(service_pb2): """Provides a servicer backend that fails to implement methods and its stub. The servicer is just the implementation of the actual servicer passed to the face player of the python RPC implementation; the two are detached. - Args: - test_pb2: The test_pb2 module generated by this test. - + service_pb2: The service_pb2 module generated by this test. Yields: A (servicer_methods, stub) pair where servicer_methods is the back-end of the service bound to the stub and and stub is the stub on which to invoke RPCs. """ - servicer_methods = _ServicerMethods(test_pb2) - class Servicer(getattr(test_pb2, SERVICER_IDENTIFIER)): + class Servicer(getattr(service_pb2, SERVICER_IDENTIFIER)): pass servicer = Servicer() - server = getattr(test_pb2, SERVER_FACTORY_IDENTIFIER)(servicer) + server = getattr(service_pb2, SERVER_FACTORY_IDENTIFIER)(servicer) port = server.add_insecure_port('[::]:0') server.start() channel = implementations.insecure_channel('localhost', port) - stub = getattr(test_pb2, STUB_FACTORY_IDENTIFIER)(channel) - yield servicer_methods, stub + stub = getattr(service_pb2, STUB_FACTORY_IDENTIFIER)(channel) + yield None, stub server.stop(0) -def _streaming_input_request_iterator(test_pb2): +def _streaming_input_request_iterator(request_pb2, payload_pb2): for _ in range(3): - request = test_pb2.StreamingInputCallRequest() - request.payload.payload_type = test_pb2.COMPRESSABLE + request = request_pb2.StreamingInputCallRequest() + request.payload.payload_type = payload_pb2.COMPRESSABLE request.payload.payload_compressable = 'a' yield request -def _streaming_output_request(test_pb2): - request = test_pb2.StreamingOutputCallRequest() +def _streaming_output_request(request_pb2): + request = request_pb2.StreamingOutputCallRequest() sizes = [1, 2, 3] request.response_parameters.add(size=sizes[0], interval_us=0) request.response_parameters.add(size=sizes[1], interval_us=0) @@ -226,11 +226,11 @@ def _streaming_output_request(test_pb2): return request -def _full_duplex_request_iterator(test_pb2): - request = test_pb2.StreamingOutputCallRequest() +def _full_duplex_request_iterator(request_pb2): + request = request_pb2.StreamingOutputCallRequest() request.response_parameters.add(size=1, interval_us=0) yield request - request = test_pb2.StreamingOutputCallRequest() + request = request_pb2.StreamingOutputCallRequest() request.response_parameters.add(size=2, interval_us=0) request.response_parameters.add(size=3, interval_us=0) yield request @@ -250,8 +250,6 @@ class PythonPluginTest(unittest.TestCase): protoc_command = 'protoc' protoc_plugin_filename = distutils.spawn.find_executable( 'grpc_python_plugin') - test_proto_filename = pkg_resources.resource_filename( - 'tests.protoc_plugin', 'protoc_plugin_test.proto') if not os.path.isfile(protoc_command): # Assume that if we haven't built protoc that it's on the system. protoc_command = 'protoc' @@ -259,19 +257,44 @@ class PythonPluginTest(unittest.TestCase): # Ensure that the output directory exists. self.outdir = tempfile.mkdtemp() + # Find all proto files + paths = [] + root_dir = os.path.dirname(os.path.realpath(__file__)) + proto_dir = os.path.join(root_dir, 'protos') + for walk_root, _, filenames in os.walk(proto_dir): + for filename in filenames: + if filename.endswith('.proto'): + path = os.path.join(walk_root, filename) + paths.append(path) + # Invoke protoc with the plugin. cmd = [ protoc_command, '--plugin=protoc-gen-python-grpc=%s' % protoc_plugin_filename, - '-I .', + '-I %s' % root_dir, '--python_out=%s' % self.outdir, - '--python-grpc_out=%s' % self.outdir, - os.path.basename(test_proto_filename), - ] + '--python-grpc_out=%s' % self.outdir + ] + paths subprocess.check_call(' '.join(cmd), shell=True, env=os.environ, - cwd=os.path.dirname(test_proto_filename)) + cwd=os.path.dirname(os.path.realpath(__file__))) + + # Generated proto directories dont include __init__.py, but + # these are needed for python package resolution + for walk_root, _, _ in os.walk(os.path.join(self.outdir, 'protos')): + path = os.path.join(walk_root, '__init__.py') + open(path, 'a').close() + sys.path.insert(0, self.outdir) + import protos.payload.test_payload_pb2 as payload_pb2 # pylint: disable=g-import-not-at-top + import protos.requests.r.test_requests_pb2 as request_pb2 # pylint: disable=g-import-not-at-top + import protos.responses.test_responses_pb2 as response_pb2 # pylint: disable=g-import-not-at-top + import protos.service.test_service_pb2 as service_pb2 # pylint: disable=g-import-not-at-top + self._payload_pb2 = payload_pb2 + self._request_pb2 = request_pb2 + self._response_pb2 = response_pb2 + self._service_pb2 = service_pb2 + def tearDown(self): try: shutil.rmtree(self.outdir) @@ -282,43 +305,40 @@ class PythonPluginTest(unittest.TestCase): def testImportAttributes(self): # check that we can access the generated module and its members. - import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - moves.reload_module(test_pb2) - self.assertIsNotNone(getattr(test_pb2, SERVICER_IDENTIFIER, None)) - self.assertIsNotNone(getattr(test_pb2, STUB_IDENTIFIER, None)) - self.assertIsNotNone(getattr(test_pb2, SERVER_FACTORY_IDENTIFIER, None)) - self.assertIsNotNone(getattr(test_pb2, STUB_FACTORY_IDENTIFIER, None)) + self.assertIsNotNone( + getattr(self._service_pb2, SERVICER_IDENTIFIER, None)) + self.assertIsNotNone( + getattr(self._service_pb2, STUB_IDENTIFIER, None)) + self.assertIsNotNone( + getattr(self._service_pb2, SERVER_FACTORY_IDENTIFIER, None)) + self.assertIsNotNone( + getattr(self._service_pb2, STUB_FACTORY_IDENTIFIER, None)) def testUpDown(self): - import protoc_plugin_test_pb2 as test_pb2 - moves.reload_module(test_pb2) - with _CreateService(test_pb2) as (servicer, stub): - request = test_pb2.SimpleRequest(response_size=13) + with _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2): + self._request_pb2.SimpleRequest(response_size=13) def testIncompleteServicer(self): - import protoc_plugin_test_pb2 as test_pb2 - moves.reload_module(test_pb2) - with _CreateIncompleteService(test_pb2) as (servicer, stub): - request = test_pb2.SimpleRequest(response_size=13) + with _CreateIncompleteService(self._service_pb2) as (_, stub): + request = self._request_pb2.SimpleRequest(response_size=13) try: - response = stub.UnaryCall(request, test_constants.LONG_TIMEOUT) + stub.UnaryCall(request, test_constants.LONG_TIMEOUT) except face.AbortionError as error: self.assertEqual(interfaces.StatusCode.UNIMPLEMENTED, error.code) def testUnaryCall(self): - import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - moves.reload_module(test_pb2) - with _CreateService(test_pb2) as (methods, stub): - request = test_pb2.SimpleRequest(response_size=13) + with _CreateService(self._service_pb2, self._response_pb2, + self._payload_pb2) as (methods, stub): + request = self._request_pb2.SimpleRequest(response_size=13) response = stub.UnaryCall(request, test_constants.LONG_TIMEOUT) expected_response = methods.UnaryCall(request, 'not a real context!') self.assertEqual(expected_response, response) def testUnaryCallFuture(self): - import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - moves.reload_module(test_pb2) - request = test_pb2.SimpleRequest(response_size=13) - with _CreateService(test_pb2) as (methods, stub): + with _CreateService(self._service_pb2, self._response_pb2, + self._payload_pb2) as (methods, stub): + request = self._request_pb2.SimpleRequest(response_size=13) # Check that the call does not block waiting for the server to respond. with methods.pause(): response_future = stub.UnaryCall.future( @@ -328,10 +348,9 @@ class PythonPluginTest(unittest.TestCase): self.assertEqual(expected_response, response) def testUnaryCallFutureExpired(self): - import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - moves.reload_module(test_pb2) - with _CreateService(test_pb2) as (methods, stub): - request = test_pb2.SimpleRequest(response_size=13) + with _CreateService(self._service_pb2, self._response_pb2, + self._payload_pb2) as (methods, stub): + request = self._request_pb2.SimpleRequest(response_size=13) with methods.pause(): response_future = stub.UnaryCall.future( request, test_constants.SHORT_TIMEOUT) @@ -339,30 +358,27 @@ class PythonPluginTest(unittest.TestCase): response_future.result() def testUnaryCallFutureCancelled(self): - import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - moves.reload_module(test_pb2) - request = test_pb2.SimpleRequest(response_size=13) - with _CreateService(test_pb2) as (methods, stub): + with _CreateService(self._service_pb2, self._response_pb2, + self._payload_pb2) as (methods, stub): + request = self._request_pb2.SimpleRequest(response_size=13) with methods.pause(): response_future = stub.UnaryCall.future(request, 1) response_future.cancel() self.assertTrue(response_future.cancelled()) def testUnaryCallFutureFailed(self): - import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - moves.reload_module(test_pb2) - request = test_pb2.SimpleRequest(response_size=13) - with _CreateService(test_pb2) as (methods, stub): + with _CreateService(self._service_pb2, self._response_pb2, + self._payload_pb2) as (methods, stub): + request = self._request_pb2.SimpleRequest(response_size=13) with methods.fail(): response_future = stub.UnaryCall.future( request, test_constants.LONG_TIMEOUT) self.assertIsNotNone(response_future.exception()) def testStreamingOutputCall(self): - import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - moves.reload_module(test_pb2) - request = _streaming_output_request(test_pb2) - with _CreateService(test_pb2) as (methods, stub): + with _CreateService(self._service_pb2, self._response_pb2, + self._payload_pb2) as (methods, stub): + request = _streaming_output_request(self._request_pb2) responses = stub.StreamingOutputCall( request, test_constants.LONG_TIMEOUT) expected_responses = methods.StreamingOutputCall( @@ -372,10 +388,9 @@ class PythonPluginTest(unittest.TestCase): self.assertEqual(expected_response, response) def testStreamingOutputCallExpired(self): - import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - moves.reload_module(test_pb2) - request = _streaming_output_request(test_pb2) - with _CreateService(test_pb2) as (methods, stub): + with _CreateService(self._service_pb2, self._response_pb2, + self._payload_pb2) as (methods, stub): + request = _streaming_output_request(self._request_pb2) with methods.pause(): responses = stub.StreamingOutputCall( request, test_constants.SHORT_TIMEOUT) @@ -383,10 +398,9 @@ class PythonPluginTest(unittest.TestCase): list(responses) def testStreamingOutputCallCancelled(self): - import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - moves.reload_module(test_pb2) - request = _streaming_output_request(test_pb2) - with _CreateService(test_pb2) as (unused_methods, stub): + with _CreateService(self._service_pb2, self._response_pb2, + self._payload_pb2) as (methods, stub): + request = _streaming_output_request(self._request_pb2) responses = stub.StreamingOutputCall( request, test_constants.LONG_TIMEOUT) next(responses) @@ -395,10 +409,9 @@ class PythonPluginTest(unittest.TestCase): next(responses) def testStreamingOutputCallFailed(self): - import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - moves.reload_module(test_pb2) - request = _streaming_output_request(test_pb2) - with _CreateService(test_pb2) as (methods, stub): + with _CreateService(self._service_pb2, self._response_pb2, + self._payload_pb2) as (methods, stub): + request = _streaming_output_request(self._request_pb2) with methods.fail(): responses = stub.StreamingOutputCall(request, 1) self.assertIsNotNone(responses) @@ -406,36 +419,38 @@ class PythonPluginTest(unittest.TestCase): next(responses) def testStreamingInputCall(self): - import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - moves.reload_module(test_pb2) - with _CreateService(test_pb2) as (methods, stub): + with _CreateService(self._service_pb2, self._response_pb2, + self._payload_pb2) as (methods, stub): response = stub.StreamingInputCall( - _streaming_input_request_iterator(test_pb2), + _streaming_input_request_iterator( + self._request_pb2, self._payload_pb2), test_constants.LONG_TIMEOUT) expected_response = methods.StreamingInputCall( - _streaming_input_request_iterator(test_pb2), 'not a real RpcContext!') + _streaming_input_request_iterator(self._request_pb2, self._payload_pb2), + 'not a real RpcContext!') self.assertEqual(expected_response, response) def testStreamingInputCallFuture(self): - import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - moves.reload_module(test_pb2) - with _CreateService(test_pb2) as (methods, stub): + with _CreateService(self._service_pb2, self._response_pb2, + self._payload_pb2) as (methods, stub): with methods.pause(): response_future = stub.StreamingInputCall.future( - _streaming_input_request_iterator(test_pb2), + _streaming_input_request_iterator( + self._request_pb2, self._payload_pb2), test_constants.LONG_TIMEOUT) response = response_future.result() expected_response = methods.StreamingInputCall( - _streaming_input_request_iterator(test_pb2), 'not a real RpcContext!') + _streaming_input_request_iterator(self._request_pb2, self._payload_pb2), + 'not a real RpcContext!') self.assertEqual(expected_response, response) def testStreamingInputCallFutureExpired(self): - import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - moves.reload_module(test_pb2) - with _CreateService(test_pb2) as (methods, stub): + with _CreateService(self._service_pb2, self._response_pb2, + self._payload_pb2) as (methods, stub): with methods.pause(): response_future = stub.StreamingInputCall.future( - _streaming_input_request_iterator(test_pb2), + _streaming_input_request_iterator( + self._request_pb2, self._payload_pb2), test_constants.SHORT_TIMEOUT) with self.assertRaises(face.ExpirationError): response_future.result() @@ -443,12 +458,12 @@ class PythonPluginTest(unittest.TestCase): response_future.exception(), face.ExpirationError) def testStreamingInputCallFutureCancelled(self): - import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - moves.reload_module(test_pb2) - with _CreateService(test_pb2) as (methods, stub): + with _CreateService(self._service_pb2, self._response_pb2, + self._payload_pb2) as (methods, stub): with methods.pause(): response_future = stub.StreamingInputCall.future( - _streaming_input_request_iterator(test_pb2), + _streaming_input_request_iterator( + self._request_pb2, self._payload_pb2), test_constants.LONG_TIMEOUT) response_future.cancel() self.assertTrue(response_future.cancelled()) @@ -456,32 +471,32 @@ class PythonPluginTest(unittest.TestCase): response_future.result() def testStreamingInputCallFutureFailed(self): - import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - moves.reload_module(test_pb2) - with _CreateService(test_pb2) as (methods, stub): + with _CreateService(self._service_pb2, self._response_pb2, + self._payload_pb2) as (methods, stub): with methods.fail(): response_future = stub.StreamingInputCall.future( - _streaming_input_request_iterator(test_pb2), + _streaming_input_request_iterator( + self._request_pb2, self._payload_pb2), test_constants.LONG_TIMEOUT) self.assertIsNotNone(response_future.exception()) def testFullDuplexCall(self): - import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - moves.reload_module(test_pb2) - with _CreateService(test_pb2) as (methods, stub): + with _CreateService(self._service_pb2, self._response_pb2, + self._payload_pb2) as (methods, stub): responses = stub.FullDuplexCall( - _full_duplex_request_iterator(test_pb2), test_constants.LONG_TIMEOUT) + _full_duplex_request_iterator(self._request_pb2), + test_constants.LONG_TIMEOUT) expected_responses = methods.FullDuplexCall( - _full_duplex_request_iterator(test_pb2), 'not a real RpcContext!') + _full_duplex_request_iterator(self._request_pb2), + 'not a real RpcContext!') for expected_response, response in moves.zip_longest( expected_responses, responses): self.assertEqual(expected_response, response) def testFullDuplexCallExpired(self): - import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - moves.reload_module(test_pb2) - request_iterator = _full_duplex_request_iterator(test_pb2) - with _CreateService(test_pb2) as (methods, stub): + request_iterator = _full_duplex_request_iterator(self._request_pb2) + with _CreateService(self._service_pb2, self._response_pb2, + self._payload_pb2) as (methods, stub): with methods.pause(): responses = stub.FullDuplexCall( request_iterator, test_constants.SHORT_TIMEOUT) @@ -489,10 +504,9 @@ class PythonPluginTest(unittest.TestCase): list(responses) def testFullDuplexCallCancelled(self): - import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - moves.reload_module(test_pb2) - with _CreateService(test_pb2) as (methods, stub): - request_iterator = _full_duplex_request_iterator(test_pb2) + with _CreateService(self._service_pb2, self._response_pb2, + self._payload_pb2) as (methods, stub): + request_iterator = _full_duplex_request_iterator(self._request_pb2) responses = stub.FullDuplexCall( request_iterator, test_constants.LONG_TIMEOUT) next(responses) @@ -501,10 +515,9 @@ class PythonPluginTest(unittest.TestCase): next(responses) def testFullDuplexCallFailed(self): - import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - moves.reload_module(test_pb2) - request_iterator = _full_duplex_request_iterator(test_pb2) - with _CreateService(test_pb2) as (methods, stub): + request_iterator = _full_duplex_request_iterator(self._request_pb2) + with _CreateService(self._service_pb2, self._response_pb2, + self._payload_pb2) as (methods, stub): with methods.fail(): responses = stub.FullDuplexCall( request_iterator, test_constants.LONG_TIMEOUT) @@ -513,14 +526,13 @@ class PythonPluginTest(unittest.TestCase): next(responses) def testHalfDuplexCall(self): - import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - moves.reload_module(test_pb2) - with _CreateService(test_pb2) as (methods, stub): + with _CreateService(self._service_pb2, self._response_pb2, + self._payload_pb2) as (methods, stub): def half_duplex_request_iterator(): - request = test_pb2.StreamingOutputCallRequest() + request = self._request_pb2.StreamingOutputCallRequest() request.response_parameters.add(size=1, interval_us=0) yield request - request = test_pb2.StreamingOutputCallRequest() + request = self._request_pb2.StreamingOutputCallRequest() request.response_parameters.add(size=2, interval_us=0) request.response_parameters.add(size=3, interval_us=0) yield request @@ -533,8 +545,6 @@ class PythonPluginTest(unittest.TestCase): self.assertEqual(expected_response, response) def testHalfDuplexCallWedged(self): - import protoc_plugin_test_pb2 as test_pb2 # pylint: disable=g-import-not-at-top - moves.reload_module(test_pb2) condition = threading.Condition() wait_cell = [False] @contextlib.contextmanager @@ -547,13 +557,14 @@ class PythonPluginTest(unittest.TestCase): wait_cell[0] = False condition.notify_all() def half_duplex_request_iterator(): - request = test_pb2.StreamingOutputCallRequest() + request = self._request_pb2.StreamingOutputCallRequest() request.response_parameters.add(size=1, interval_us=0) yield request with condition: while wait_cell[0]: condition.wait() - with _CreateService(test_pb2) as (methods, stub): + with _CreateService(self._service_pb2, self._response_pb2, + self._payload_pb2) as (methods, stub): with wait(): responses = stub.HalfDuplexCall( half_duplex_request_iterator(), test_constants.SHORT_TIMEOUT) @@ -563,5 +574,5 @@ class PythonPluginTest(unittest.TestCase): if __name__ == '__main__': - os.chdir(os.path.dirname(sys.argv[0])) + #os.chdir(os.path.dirname(sys.argv[0])) unittest.main(verbosity=2) diff --git a/src/python/grpcio/tests/protoc_plugin/protos/payload/test_payload.proto b/src/python/grpcio/tests/protoc_plugin/protos/payload/test_payload.proto new file mode 100644 index 00000000000..457543aa793 --- /dev/null +++ b/src/python/grpcio/tests/protoc_plugin/protos/payload/test_payload.proto @@ -0,0 +1,51 @@ +// Copyright 2016, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +package grpc_protoc_plugin; + +enum PayloadType { + // Compressable text format. + COMPRESSABLE= 0; + + // Uncompressable binary format. + UNCOMPRESSABLE = 1; + + // Randomly chosen from all other formats defined in this enum. + RANDOM = 2; +} + +message Payload { + PayloadType payload_type = 1; + oneof payload_body { + string payload_compressable = 2; + bytes payload_uncompressable = 3; + } +} diff --git a/src/python/grpcio/tests/protoc_plugin/protos/requests/r/test_requests.proto b/src/python/grpcio/tests/protoc_plugin/protos/requests/r/test_requests.proto new file mode 100644 index 00000000000..54105df6a56 --- /dev/null +++ b/src/python/grpcio/tests/protoc_plugin/protos/requests/r/test_requests.proto @@ -0,0 +1,77 @@ +// Copyright 2016, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +import "protos/payload/test_payload.proto"; + +package grpc_protoc_plugin; + +message SimpleRequest { + // Desired payload type in the response from the server. + // If response_type is RANDOM, server randomly chooses one from other formats. + PayloadType response_type = 1; + + // Desired payload size in the response from the server. + // If response_type is COMPRESSABLE, this denotes the size before compression. + int32 response_size = 2; + + // input payload sent along with the request. + Payload payload = 3; +} + +message StreamingInputCallRequest { + // input payload sent along with the request. + Payload payload = 1; + + // Not expecting any payload from the response. +} + +message ResponseParameters { + // Desired payload sizes in responses from the server. + // If response_type is COMPRESSABLE, this denotes the size before compression. + int32 size = 1; + + // Desired interval between consecutive responses in the response stream in + // microseconds. + int32 interval_us = 2; +} + +message StreamingOutputCallRequest { + // Desired payload type in the response from the server. + // If response_type is RANDOM, the payload from each response in the stream + // might be of different types. This is to simulate a mixed type of payload + // stream. + PayloadType response_type = 1; + + repeated ResponseParameters response_parameters = 2; + + // input payload sent along with the request. + Payload payload = 3; +} diff --git a/src/python/grpcio/tests/protoc_plugin/protos/responses/test_responses.proto b/src/python/grpcio/tests/protoc_plugin/protos/responses/test_responses.proto new file mode 100644 index 00000000000..734fbda86e9 --- /dev/null +++ b/src/python/grpcio/tests/protoc_plugin/protos/responses/test_responses.proto @@ -0,0 +1,47 @@ +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +syntax = "proto3"; + +import "protos/payload/test_payload.proto"; + +package grpc_protoc_plugin; + +message SimpleResponse { + Payload payload = 1; +} + +message StreamingInputCallResponse { + // Aggregated size of payloads received from the client. + int32 aggregated_payload_size = 1; +} + +message StreamingOutputCallResponse { + Payload payload = 1; +} diff --git a/src/python/grpcio/tests/protoc_plugin/protoc_plugin_test.proto b/src/python/grpcio/tests/protoc_plugin/protos/service/test_service.proto similarity index 54% rename from src/python/grpcio/tests/protoc_plugin/protoc_plugin_test.proto rename to src/python/grpcio/tests/protoc_plugin/protos/service/test_service.proto index 6762a8e7f35..fe715ee7f92 100644 --- a/src/python/grpcio/tests/protoc_plugin/protoc_plugin_test.proto +++ b/src/python/grpcio/tests/protoc_plugin/protos/service/test_service.proto @@ -1,4 +1,4 @@ -// Copyright 2015, Google Inc. +// Copyright 2016, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -27,87 +27,12 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -// An integration test service that covers all the method signature permutations -// of unary/streaming requests/responses. -// This file is duplicated around the code base. See GitHub issue #526. -syntax = "proto2"; +syntax = "proto3"; -package grpc_protoc_plugin; - -enum PayloadType { - // Compressable text format. - COMPRESSABLE= 1; - - // Uncompressable binary format. - UNCOMPRESSABLE = 2; - - // Randomly chosen from all other formats defined in this enum. - RANDOM = 3; -} - -message Payload { - required PayloadType payload_type = 1; - oneof payload_body { - string payload_compressable = 2; - bytes payload_uncompressable = 3; - } -} - -message SimpleRequest { - // Desired payload type in the response from the server. - // If response_type is RANDOM, server randomly chooses one from other formats. - optional PayloadType response_type = 1 [default=COMPRESSABLE]; - - // Desired payload size in the response from the server. - // If response_type is COMPRESSABLE, this denotes the size before compression. - optional int32 response_size = 2; - - // Optional input payload sent along with the request. - optional Payload payload = 3; -} - -message SimpleResponse { - optional Payload payload = 1; -} - -message StreamingInputCallRequest { - // Optional input payload sent along with the request. - optional Payload payload = 1; +import "protos/requests/r/test_requests.proto"; +import "protos/responses/test_responses.proto"; - // Not expecting any payload from the response. -} - -message StreamingInputCallResponse { - // Aggregated size of payloads received from the client. - optional int32 aggregated_payload_size = 1; -} - -message ResponseParameters { - // Desired payload sizes in responses from the server. - // If response_type is COMPRESSABLE, this denotes the size before compression. - required int32 size = 1; - - // Desired interval between consecutive responses in the response stream in - // microseconds. - required int32 interval_us = 2; -} - -message StreamingOutputCallRequest { - // Desired payload type in the response from the server. - // If response_type is RANDOM, the payload from each response in the stream - // might be of different types. This is to simulate a mixed type of payload - // stream. - optional PayloadType response_type = 1 [default=COMPRESSABLE]; - - repeated ResponseParameters response_parameters = 2; - - // Optional input payload sent along with the request. - optional Payload payload = 3; -} - -message StreamingOutputCallResponse { - optional Payload payload = 1; -} +package grpc_protoc_plugin; service TestService { // One request followed by one response. From 6f0fe0f32728dfa781e49451a755d73df5fa6a88 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 6 May 2016 12:16:28 -0700 Subject: [PATCH 0336/1894] fix python distribtests with docker on overlay --- test/distrib/python/run_distrib_test.sh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/test/distrib/python/run_distrib_test.sh b/test/distrib/python/run_distrib_test.sh index 6196e540c82..a0324a92b1b 100755 --- a/test/distrib/python/run_distrib_test.sh +++ b/test/distrib/python/run_distrib_test.sh @@ -48,7 +48,10 @@ which $PYTHON || PYTHON=python which $PIP || PIP=pip # TODO(jtattermusch): this shouldn't be required -${PIP} install --upgrade six pip +# TODO(jtattermusch): run the command twice to workaround docker-on-overlay +# issue https://github.com/docker/docker/issues/12327 +# (first attempt will fail when using docker with overlayFS) +${PIP} install --upgrade six pip || ${PIP} install --upgrade six pip # At least one of the bdist packages has to succeed (whichever one matches the # test machine, anyway). From 4e2f7727a9d39b58d6e3d083a7ed9a5aa6bb5fcc Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 6 May 2016 12:28:58 -0700 Subject: [PATCH 0337/1894] rename grpc.protoc.compiler to grpc.tools.protoc --- test/distrib/python/run_distrib_test.sh | 2 +- .../python/grpcio_tools/grpc/{protoc => tools}/__init__.py | 0 .../python/grpcio_tools/grpc/{protoc => tools}/main.cc | 2 +- .../python/grpcio_tools/grpc/{protoc => tools}/main.h | 0 .../grpc/{protoc/compiler.py => tools/protoc.py} | 2 +- .../grpcio_tools/grpc/{protoc => tools}/protoc_compiler.pyx | 2 +- tools/distrib/python/grpcio_tools/setup.py | 6 +++--- 7 files changed, 7 insertions(+), 7 deletions(-) rename tools/distrib/python/grpcio_tools/grpc/{protoc => tools}/__init__.py (100%) rename tools/distrib/python/grpcio_tools/grpc/{protoc => tools}/main.cc (98%) rename tools/distrib/python/grpcio_tools/grpc/{protoc => tools}/main.h (100%) rename tools/distrib/python/grpcio_tools/grpc/{protoc/compiler.py => tools/protoc.py} (97%) rename tools/distrib/python/grpcio_tools/grpc/{protoc => tools}/protoc_compiler.pyx (97%) diff --git a/test/distrib/python/run_distrib_test.sh b/test/distrib/python/run_distrib_test.sh index a0324a92b1b..8a983bc2488 100755 --- a/test/distrib/python/run_distrib_test.sh +++ b/test/distrib/python/run_distrib_test.sh @@ -61,6 +61,6 @@ done # TODO(jtattermusch): add a .proto file to the distribtest, generate python # code from it and then use the generated code from distribtest.py -$PYTHON -m grpc.protoc.compiler +$PYTHON -m grpc.tools.protoc $PYTHON distribtest.py diff --git a/tools/distrib/python/grpcio_tools/grpc/protoc/__init__.py b/tools/distrib/python/grpcio_tools/grpc/tools/__init__.py similarity index 100% rename from tools/distrib/python/grpcio_tools/grpc/protoc/__init__.py rename to tools/distrib/python/grpcio_tools/grpc/tools/__init__.py diff --git a/tools/distrib/python/grpcio_tools/grpc/protoc/main.cc b/tools/distrib/python/grpcio_tools/grpc/tools/main.cc similarity index 98% rename from tools/distrib/python/grpcio_tools/grpc/protoc/main.cc rename to tools/distrib/python/grpcio_tools/grpc/tools/main.cc index c9936a3a6b4..81675b4e6fc 100644 --- a/tools/distrib/python/grpcio_tools/grpc/protoc/main.cc +++ b/tools/distrib/python/grpcio_tools/grpc/tools/main.cc @@ -32,7 +32,7 @@ #include "src/compiler/python_generator.h" -#include "grpc/protoc/main.h" +#include "grpc/tools/main.h" int protoc_main(int argc, char* argv[]) { google::protobuf::compiler::CommandLineInterface cli; diff --git a/tools/distrib/python/grpcio_tools/grpc/protoc/main.h b/tools/distrib/python/grpcio_tools/grpc/tools/main.h similarity index 100% rename from tools/distrib/python/grpcio_tools/grpc/protoc/main.h rename to tools/distrib/python/grpcio_tools/grpc/tools/main.h diff --git a/tools/distrib/python/grpcio_tools/grpc/protoc/compiler.py b/tools/distrib/python/grpcio_tools/grpc/tools/protoc.py similarity index 97% rename from tools/distrib/python/grpcio_tools/grpc/protoc/compiler.py rename to tools/distrib/python/grpcio_tools/grpc/tools/protoc.py index caafc544b2b..b4dd0ecae2e 100644 --- a/tools/distrib/python/grpcio_tools/grpc/protoc/compiler.py +++ b/tools/distrib/python/grpcio_tools/grpc/tools/protoc.py @@ -31,7 +31,7 @@ import sys -from grpc.protoc import protoc_compiler +from grpc.tools import protoc_compiler if __name__ == '__main__': diff --git a/tools/distrib/python/grpcio_tools/grpc/protoc/protoc_compiler.pyx b/tools/distrib/python/grpcio_tools/grpc/tools/protoc_compiler.pyx similarity index 97% rename from tools/distrib/python/grpcio_tools/grpc/protoc/protoc_compiler.pyx rename to tools/distrib/python/grpcio_tools/grpc/tools/protoc_compiler.pyx index af15f3db30e..a6530127c04 100644 --- a/tools/distrib/python/grpcio_tools/grpc/protoc/protoc_compiler.pyx +++ b/tools/distrib/python/grpcio_tools/grpc/tools/protoc_compiler.pyx @@ -29,7 +29,7 @@ from libc cimport stdlib -cdef extern from "grpc/protoc/main.h": +cdef extern from "grpc/tools/main.h": int protoc_main(int argc, char *argv[]) def run_main(list args not None): diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py index 0281c01796d..1a77c430fa7 100644 --- a/tools/distrib/python/grpcio_tools/setup.py +++ b/tools/distrib/python/grpcio_tools/setup.py @@ -45,13 +45,13 @@ import grpc_version def protoc_ext_module(): plugin_sources = [ - 'grpc/protoc/main.cc', + 'grpc/tools/main.cc', 'grpc_root/src/compiler/python_generator.cc'] + [ os.path.join('third_party/protobuf/src', cc_file) for cc_file in protoc_lib_deps.CC_FILES] plugin_ext = extension.Extension( - name='grpc.protoc.protoc_compiler', - sources=['grpc/protoc/protoc_compiler.pyx'] + plugin_sources, + name='grpc.tools.protoc_compiler', + sources=['grpc/tools/protoc_compiler.pyx'] + plugin_sources, include_dirs=[ '.', 'grpc_root', From 873e419cf73fa747a897cd8e06c8ffad6661efb0 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 6 May 2016 12:44:46 -0700 Subject: [PATCH 0338/1894] Added explanation about handling signals in C --- src/ruby/ext/grpc/rb_signal.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ruby/ext/grpc/rb_signal.c b/src/ruby/ext/grpc/rb_signal.c index dd60b0f251f..a9e512374ba 100644 --- a/src/ruby/ext/grpc/rb_signal.c +++ b/src/ruby/ext/grpc/rb_signal.c @@ -44,6 +44,10 @@ static void (*old_sigterm_handler)(int); static volatile bool signal_received = false; +/* This has to be handled at the C level instead of Ruby, because Ruby signal + * handlers are constrained to run in the main interpreter thread. If that main + * thread is blocked on grpc_completion_queue_pluck, the signal handlers will + * never run */ static void handle_signal(int signum) { signal_received = true; if (signum == SIGINT) { From 080528abb725702c7559c1be058eb8d3ea792fa8 Mon Sep 17 00:00:00 2001 From: yang-g Date: Fri, 6 May 2016 13:12:00 -0700 Subject: [PATCH 0339/1894] Add parsing back to protobuf example --- test/cpp/end2end/end2end_test.cc | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index bef1561b09e..40ba0c0b439 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -998,6 +998,9 @@ TEST_P(End2endTest, BinaryTrailerTest) { EXPECT_EQ(1, trailers.count(kDebugInfoTrailerKey)); auto iter = trailers.find(kDebugInfoTrailerKey); EXPECT_EQ(expected_string, iter->second); + // Parse the returned trailer into a DebugInfo proto. + DebugInfo returned_info; + EXPECT_TRUE(returned_info.ParseFromString(ToString(iter->second))); } ////////////////////////////////////////////////////////////////////////// From 7d099a5c907d9ab164416ea875ae07a3074adedb Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 6 May 2016 13:21:36 -0700 Subject: [PATCH 0340/1894] Fix naming and comment problems --- include/grpc++/impl/server_builder_plugin.h | 2 -- include/grpc++/server_builder.h | 1 + src/cpp/server/server_builder.cc | 10 ++++++---- test/cpp/end2end/server_builder_plugin_test.cc | 18 ++++++++---------- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/include/grpc++/impl/server_builder_plugin.h b/include/grpc++/impl/server_builder_plugin.h index f792c4b321c..1e157efa111 100644 --- a/include/grpc++/impl/server_builder_plugin.h +++ b/include/grpc++/impl/server_builder_plugin.h @@ -64,6 +64,4 @@ class ServerBuilderPlugin { } // namespace grpc - - #endif // GRPCXX_IMPL_SERVER_BUILDER_PLUGIN_H diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index 52064b14349..ad629521cbe 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -113,6 +113,7 @@ class ServerBuilder { /// Return a running server which is ready for processing calls. std::unique_ptr BuildAndStart(); + /// For internal use only: Register a ServerBuilderPlugin factory function. static void InternalAddPluginFactory( std::unique_ptr (*CreatePlugin)()); diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index b6e48efa8dd..9658a567455 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -41,18 +41,20 @@ namespace grpc { -static std::vector (*)()>* plugin_list; +static std::vector (*)()>* + g_plugin_factory_list; static gpr_once once_init_plugin_list = GPR_ONCE_INIT; static void do_plugin_list_init(void) { - plugin_list = new std::vector (*)()>(); + g_plugin_factory_list = + new std::vector (*)()>(); } ServerBuilder::ServerBuilder() : max_message_size_(-1), generic_service_(nullptr) { grpc_compression_options_init(&compression_options_); gpr_once_init(&once_init_plugin_list, do_plugin_list_init); - for (auto factory : (*plugin_list)) { + for (auto factory : (*g_plugin_factory_list)) { std::unique_ptr plugin = factory(); plugins_[plugin->name()] = std::move(plugin); } @@ -171,7 +173,7 @@ std::unique_ptr ServerBuilder::BuildAndStart() { void ServerBuilder::InternalAddPluginFactory( std::unique_ptr (*CreatePlugin)()) { gpr_once_init(&once_init_plugin_list, do_plugin_list_init); - (*plugin_list).push_back(CreatePlugin); + (*g_plugin_factory_list).push_back(CreatePlugin); } } // namespace grpc diff --git a/test/cpp/end2end/server_builder_plugin_test.cc b/test/cpp/end2end/server_builder_plugin_test.cc index 0d44999a08e..87e3709d7d2 100644 --- a/test/cpp/end2end/server_builder_plugin_test.cc +++ b/test/cpp/end2end/server_builder_plugin_test.cc @@ -115,10 +115,7 @@ class InsertPluginServerBuilderOption : public ServerBuilderOption { void UpdatePlugins( std::map>* plugins) GRPC_OVERRIDE { - auto it = plugins->begin(); - while (it != plugins->end()) { - plugins->erase(it++); - } + plugins->clear(); std::unique_ptr plugin( new TestServerBuilderPlugin()); @@ -136,7 +133,7 @@ std::unique_ptr CreateTestServerBuilderPlugin() { return std::unique_ptr(new TestServerBuilderPlugin()); } -void grpc_AddServerBuilderPlugin_reflection() { +void AddTestServerBuilderPlugin() { static bool already_here = false; if (already_here) return; already_here = true; @@ -145,12 +142,13 @@ void grpc_AddServerBuilderPlugin_reflection() { } // Force AddServerBuilderPlugin() to be called at static initialization time. -struct StaticPluginInitializer_reflection { - StaticPluginInitializer_reflection() { - grpc_AddServerBuilderPlugin_reflection(); - } -} static_plugin_initializer_reflection_; +struct StaticTestPluginInitializer { + StaticTestPluginInitializer() { AddTestServerBuilderPlugin(); } +} static_plugin_initializer_test_; +// When the param boolean is true, the ServerBuilder plugin will be added at the +// time of static initialization. When it's false, the ServerBuilder plugin will +// be added using ServerBuilder::SetOption(). class ServerBuilderPluginTest : public ::testing::TestWithParam { public: ServerBuilderPluginTest() {} From 41fd37bbe38cb338b4d7350653658146b9012ae0 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 6 May 2016 13:43:26 -0700 Subject: [PATCH 0341/1894] Poll for signals more frequently, for greater responsiveness --- src/ruby/lib/grpc/signals.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ruby/lib/grpc/signals.rb b/src/ruby/lib/grpc/signals.rb index 7d2ec25dcb3..2ab85c8bb16 100644 --- a/src/ruby/lib/grpc/signals.rb +++ b/src/ruby/lib/grpc/signals.rb @@ -52,7 +52,7 @@ module GRPC def wait_for_signals t = Thread.new do - sleep 1 until GRPC::Core.signal_received? || @interpreter_exiting + sleep 0.1 until GRPC::Core.signal_received? || @interpreter_exiting unless @interpreter_exiting @handlers_mutex.synchronize do @signal_handlers.each(&:call) From f707d62db625e3929680d165f2fbc67f9c8d3f9c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 6 May 2016 14:26:12 -0700 Subject: [PATCH 0342/1894] Convert tests to new error scheme --- Makefile | 130 +- build.yaml | 23 +- .../ext/client_config/channel_connectivity.c | 4 +- src/core/ext/client_config/client_channel.c | 6 +- src/core/ext/client_config/subchannel.c | 2 +- .../client_config/subchannel_call_holder.c | 4 +- .../ext/lb_policy/pick_first/pick_first.c | 18 +- .../ext/lb_policy/round_robin/round_robin.c | 14 +- .../chttp2/server/insecure/server_chttp2.c | 2 +- .../server/secure/server_secure_chttp2.c | 4 +- .../chttp2/transport/chttp2_transport.c | 18 +- .../transport/chttp2/transport/frame_data.c | 4 +- .../transport/chttp2/transport/hpack_parser.c | 4 +- .../ext/transport/chttp2/transport/parsing.c | 2 +- src/core/lib/iomgr/closure.c | 4 +- src/core/lib/iomgr/error.c | 22 +- src/core/lib/iomgr/error.h | 8 +- src/core/lib/iomgr/exec_ctx.c | 2 +- src/core/lib/iomgr/tcp_server_posix.c | 4 +- src/core/lib/iomgr/timer.c | 4 +- .../composite/composite_credentials.c | 1 - .../composite/composite_credentials.h | 1 - .../lib/security/credentials/credentials.c | 8 +- .../credentials/fake/fake_credentials.h | 1 - .../google_default_credentials.h | 2 - .../credentials/iam/iam_credentials.c | 2 - .../credentials/iam/iam_credentials.h | 3 - .../lib/security/credentials/jwt/json_token.c | 1 - .../credentials/jwt/jwt_credentials.c | 1 - .../credentials/jwt/jwt_credentials.h | 1 - .../credentials/plugin/plugin_credentials.c | 2 - .../credentials/plugin/plugin_credentials.h | 3 - .../credentials/ssl/ssl_credentials.c | 4 - .../credentials/ssl/ssl_credentials.h | 1 - .../lib/security/transport/secure_endpoint.c | 2 +- .../security/transport/server_auth_filter.c | 2 +- src/core/lib/security/util/json_util.c | 1 - src/core/lib/security/util/json_util.h | 4 +- src/core/lib/surface/call.c | 6 +- src/core/lib/transport/connectivity_state.c | 11 +- src/core/lib/transport/transport.c | 6 +- test/core/bad_client/bad_client.c | 2 +- test/core/channel/channel_stack_test.c | 5 +- .../dns_resolver_connectivity_test.c | 18 +- .../set_initial_connect_string_test.c | 4 +- test/core/end2end/dualstack_socket_test.c | 4 +- test/core/end2end/fuzzers/api_fuzzer.c | 6 +- test/core/end2end/goaway_server_test.c | 27 +- test/core/end2end/tests/filter_causes_close.c | 5 +- test/core/http/httpcli_test.c | 17 +- test/core/http/httpscli_test.c | 17 +- test/core/http/parser_test.c | 146 +-- .../0299ca2580e4398d170c4a336e0c33eb2cd9d427 | 0 .../05e613853d64a9669ea3cf41b0de777dc24931ba | 0 .../069352518a1d1baa05f317c677d275cefda2ac97 | 0 .../0925527c9358b1e10ec0f0387cd99f35204d9a34 | 0 .../0c5b7c2569410b526605e308309a7f36574e530d | 0 .../0ef3d0a84360bb5ad66274f1226f5cb273ecdbcf | 0 .../1e1273f90187fdf5df3625764245610f86af6aa4 | 0 .../1fbc57d118f3733287e9a9d808bb8947b3260e55 | 0 .../24756c396bc72894fd720092bb6f9c03e66b469f | 0 .../276def41311933421ae7a9ee42e906c85b6a4d3f | 0 .../29daa75432381937fd005cb25e314e328de6e9f9 | 0 .../2a75204bc492084ad853682f8de3fb137d5907bc | 0 .../2d34ba249b755a880525cf53c665633a5e359305 | 0 .../33f4ea0c7ea27c37d8f95cfa64d282370efdafd2 | 0 .../35554617ea6418bd43161fe9a2c337ed82d7ec5b | 0 .../35f0c561297cfc840ddaeebb9fc61091f4eadece | 0 .../3787bcc22ef645e665cc5f722b8a633af86de9cf | 0 .../3953688866ccb3b4f371f1a858570d6afdb6452d | 0 .../39b19c41ba537f37511eff7727733715db432e76 | 0 .../3e3c4756d5e40b5aa250954cbac86b826e70a7ac | 0 .../3f03265921120c6ffa61b944e213e062a5538d4b | 0 .../3fb034e66ee5494a67acae1b4e6ff64ba92a2046 | 0 .../466059ed07a0d55d6ad5e522c7d367cbf278eaf9 | 0 .../487725eb38511c79a9340bf4560a1411061fa6fa | 0 .../48b9b205cae8ac21512a3f26f49fd53e21ee13c5 | 0 .../4b1f1f79a0bfa3f942479dd5f8edb59a7c257c55 | 0 .../5028c56a5116a186b7343ff59567b47347a0796d | 0 .../533f62b3f495ce704babf3ee8d840f196a714dff | 0 .../5892cbb284771fc9761caae37b19cd6e27dbc104 | 0 .../5aeab6e4f7c2a1c09d4ac0dbdb3beac4893607ee | 0 .../5b6292bdf009b0daecbc90b85cca30a88c36eec5 | 0 .../5c1659b77678b41faa4fa13df7772dae3238d1c0 | 0 .../5c81f61621e29ec9c6a64ac3af9b3b216141618e | 0 .../657368df512ca6294b9df16adf935a3f374a8be2 | 0 .../7fc4520094902ce2c760d70eaad5b674d2817337 | 0 .../81f59a12b458ec3604035cb962165c604d1355e6 | 0 .../8f41c50e88ee8c17ecad3d41d63d38fb12aca0b9 | 0 .../97c16de7fe3c390a2e6c09ff5c28f17d5c67542c | 0 .../97e4499d450c95660de86747f527e670f2012548 | 0 .../9a996857196e0998a1278994a9bab3d35526e7f1 | 0 .../9b7e00049ec356ecd84b1747e4e1941140139ae8 | 0 .../9f0c38ec455cc363369b3674a2d32bc21c206de1 | 0 .../a1dc7bc235e46eb21d91084d7b52d5ff9f45df85 | 0 .../aa3bbb876eafa8ad8ca4ff2eabc6dd94341d2441 | 0 .../ae8ba95d7dbe99926a8f5bfd80347fd6a4b616a0 | 0 .../b04fea5c041c707db0ad9c09a81672557b52cc47 | 0 .../c4acff8aa2ff886f35439f72625d05002990c940 | 0 .../c55ce9995b002e88a102ae2891a71e8bacb346c8 | 0 .../ca5a0c00b8969310acb73d15ad0d0c602f1bd0c2 | 0 .../cce734f1b263de6994f7950e0df7bf0c81449f70 | 0 .../d39c8ee11a697634a09b309460c0bbd967e7effa | 0 .../d4c3e4cf5d035596433c30eaabbd2b2925f4b453 | 0 .../d51f7fcc089f269c7afecaaca51966bab5fde629 | 0 .../d936dad71c129cf659097dc3db64550c4dd467f4 | 0 .../e275b0466a8fb8d9e0e15856e343ddc7112ae66b | 0 .../e5c364b205855a2991ce07482aebb2a3a6147089 | 0 .../ee2077e08c3cfccd9bd82adb574ac4fc7d429afb | 0 .../fc5d4b9117ba9e87388174aee4f4970bdfe8d066 | 0 .../fdeb2c7daa9e7704f67e141106384e6dd0042c0b | 0 .../{corpus => request_corpus}/request1.txt | 0 .../{corpus => request_corpus}/request2.txt | 0 .../{corpus => request_corpus}/request3.txt | 0 .../{corpus => request_corpus}/request4.txt | 0 .../{corpus => request_corpus}/request5.txt | 0 .../{corpus => request_corpus}/response1.txt | 0 .../{corpus => request_corpus}/response2.txt | 0 .../{corpus => request_corpus}/response3.txt | 0 .../{corpus => request_corpus}/response4.txt | 0 .../{corpus => request_corpus}/response5.txt | 0 .../{corpus => request_corpus}/response6.txt | 0 .../{corpus => request_corpus}/toolong.txt | 0 test/core/http/{fuzzer.c => request_fuzzer.c} | 9 +- .../0299ca2580e4398d170c4a336e0c33eb2cd9d427 | 2 + .../05e613853d64a9669ea3cf41b0de777dc24931ba | 2 + .../069352518a1d1baa05f317c677d275cefda2ac97 | 2 + .../0925527c9358b1e10ec0f0387cd99f35204d9a34 | 2 + .../0c5b7c2569410b526605e308309a7f36574e530d | 4 + .../0ef3d0a84360bb5ad66274f1226f5cb273ecdbcf | 3 + .../1e1273f90187fdf5df3625764245610f86af6aa4 | 3 + .../1fbc57d118f3733287e9a9d808bb8947b3260e55 | 3 + .../24756c396bc72894fd720092bb6f9c03e66b469f | 2 + .../276def41311933421ae7a9ee42e906c85b6a4d3f | 2 + .../29daa75432381937fd005cb25e314e328de6e9f9 | 2 + .../2a75204bc492084ad853682f8de3fb137d5907bc | 2 + .../2d34ba249b755a880525cf53c665633a5e359305 | 2 + .../33f4ea0c7ea27c37d8f95cfa64d282370efdafd2 | 2 + .../35554617ea6418bd43161fe9a2c337ed82d7ec5b | 4 + .../35f0c561297cfc840ddaeebb9fc61091f4eadece | 2 + .../3787bcc22ef645e665cc5f722b8a633af86de9cf | 9 + .../3953688866ccb3b4f371f1a858570d6afdb6452d | 3 + .../39b19c41ba537f37511eff7727733715db432e76 | 2 + .../3e3c4756d5e40b5aa250954cbac86b826e70a7ac | 3 + .../3f03265921120c6ffa61b944e213e062a5538d4b | 2 + .../3fb034e66ee5494a67acae1b4e6ff64ba92a2046 | 2 + .../466059ed07a0d55d6ad5e522c7d367cbf278eaf9 | 4 + .../487725eb38511c79a9340bf4560a1411061fa6fa | 2 + .../48b9b205cae8ac21512a3f26f49fd53e21ee13c5 | 2 + .../4b1f1f79a0bfa3f942479dd5f8edb59a7c257c55 | 2 + .../5028c56a5116a186b7343ff59567b47347a0796d | 3 + .../533f62b3f495ce704babf3ee8d840f196a714dff | 4 + .../5892cbb284771fc9761caae37b19cd6e27dbc104 | 2 + .../5aeab6e4f7c2a1c09d4ac0dbdb3beac4893607ee | 2 + .../5b6292bdf009b0daecbc90b85cca30a88c36eec5 | 2 + .../5c1659b77678b41faa4fa13df7772dae3238d1c0 | 2 + .../5c81f61621e29ec9c6a64ac3af9b3b216141618e | 2 + .../657368df512ca6294b9df16adf935a3f374a8be2 | 3 + .../7fc4520094902ce2c760d70eaad5b674d2817337 | 5 + .../81f59a12b458ec3604035cb962165c604d1355e6 | 2 + .../8f41c50e88ee8c17ecad3d41d63d38fb12aca0b9 | 4 + .../97c16de7fe3c390a2e6c09ff5c28f17d5c67542c | 2 + .../97e4499d450c95660de86747f527e670f2012548 | 3 + .../9a996857196e0998a1278994a9bab3d35526e7f1 | 2 + .../9b7e00049ec356ecd84b1747e4e1941140139ae8 | 3 + .../9f0c38ec455cc363369b3674a2d32bc21c206de1 | 5 + .../a1dc7bc235e46eb21d91084d7b52d5ff9f45df85 | 3 + .../aa3bbb876eafa8ad8ca4ff2eabc6dd94341d2441 | 2 + .../ae8ba95d7dbe99926a8f5bfd80347fd6a4b616a0 | 17 + .../b04fea5c041c707db0ad9c09a81672557b52cc47 | 2 + .../c4acff8aa2ff886f35439f72625d05002990c940 | 4 + .../c55ce9995b002e88a102ae2891a71e8bacb346c8 | 2 + .../ca5a0c00b8969310acb73d15ad0d0c602f1bd0c2 | 3 + .../cce734f1b263de6994f7950e0df7bf0c81449f70 | 3 + .../d39c8ee11a697634a09b309460c0bbd967e7effa | 17 + .../d4c3e4cf5d035596433c30eaabbd2b2925f4b453 | 3 + .../d51f7fcc089f269c7afecaaca51966bab5fde629 | 2 + .../d936dad71c129cf659097dc3db64550c4dd467f4 | 2 + .../e275b0466a8fb8d9e0e15856e343ddc7112ae66b | 3 + .../e5c364b205855a2991ce07482aebb2a3a6147089 | 2 + .../ee2077e08c3cfccd9bd82adb574ac4fc7d429afb | 2 + .../fc5d4b9117ba9e87388174aee4f4970bdfe8d066 | 1 + .../fdeb2c7daa9e7704f67e141106384e6dd0042c0b | 2 + test/core/http/response_corpus/request1.txt | 3 + test/core/http/response_corpus/request2.txt | 3 + test/core/http/response_corpus/request3.txt | 3 + test/core/http/response_corpus/request4.txt | 3 + test/core/http/response_corpus/request5.txt | 3 + test/core/http/response_corpus/response1.txt | 4 + test/core/http/response_corpus/response2.txt | 4 + test/core/http/response_corpus/response3.txt | 5 + test/core/http/response_corpus/response4.txt | 2 + test/core/http/response_corpus/response5.txt | 5 + test/core/http/response_corpus/response6.txt | 5 + test/core/http/response_corpus/toolong.txt | 2 + test/core/http/response_fuzzer.c | 53 + test/core/internal_api_canaries/iomgr.c | 11 +- test/core/iomgr/endpoint_pair_test.c | 3 +- test/core/iomgr/fd_posix_test.c | 23 +- test/core/iomgr/resolve_address_test.c | 99 +- test/core/iomgr/tcp_client_posix_test.c | 12 +- test/core/iomgr/tcp_posix_test.c | 13 +- test/core/iomgr/tcp_server_posix_test.c | 41 +- test/core/iomgr/timer_list_test.c | 4 +- test/core/iomgr/workqueue_test.c | 11 +- test/core/security/credentials_test.c | 61 +- test/core/security/jwt_verifier_test.c | 62 +- .../print_google_default_creds_token.c | 2 +- test/core/security/secure_endpoint_test.c | 6 +- test/core/surface/completion_queue_test.c | 21 +- .../surface/concurrent_connectivity_test.c | 9 +- test/core/surface/lame_client_test.c | 7 +- test/core/transport/connectivity_state_test.c | 14 +- test/core/util/test_tcp_server.c | 13 +- ...er_test.sh => http_request_fuzzer_test.sh} | 2 +- .../runners/http_response_fuzzer_test.sh | 45 + tools/run_tests/sources_and_headers.json | 45 +- tools/run_tests/tests.json | 1136 ----------------- 218 files changed, 940 insertions(+), 1583 deletions(-) rename test/core/http/{corpus => request_corpus}/0299ca2580e4398d170c4a336e0c33eb2cd9d427 (100%) rename test/core/http/{corpus => request_corpus}/05e613853d64a9669ea3cf41b0de777dc24931ba (100%) rename test/core/http/{corpus => request_corpus}/069352518a1d1baa05f317c677d275cefda2ac97 (100%) rename test/core/http/{corpus => request_corpus}/0925527c9358b1e10ec0f0387cd99f35204d9a34 (100%) rename test/core/http/{corpus => request_corpus}/0c5b7c2569410b526605e308309a7f36574e530d (100%) rename test/core/http/{corpus => request_corpus}/0ef3d0a84360bb5ad66274f1226f5cb273ecdbcf (100%) rename test/core/http/{corpus => request_corpus}/1e1273f90187fdf5df3625764245610f86af6aa4 (100%) rename test/core/http/{corpus => request_corpus}/1fbc57d118f3733287e9a9d808bb8947b3260e55 (100%) rename test/core/http/{corpus => request_corpus}/24756c396bc72894fd720092bb6f9c03e66b469f (100%) rename test/core/http/{corpus => request_corpus}/276def41311933421ae7a9ee42e906c85b6a4d3f (100%) rename test/core/http/{corpus => request_corpus}/29daa75432381937fd005cb25e314e328de6e9f9 (100%) rename test/core/http/{corpus => request_corpus}/2a75204bc492084ad853682f8de3fb137d5907bc (100%) rename test/core/http/{corpus => request_corpus}/2d34ba249b755a880525cf53c665633a5e359305 (100%) rename test/core/http/{corpus => request_corpus}/33f4ea0c7ea27c37d8f95cfa64d282370efdafd2 (100%) rename test/core/http/{corpus => request_corpus}/35554617ea6418bd43161fe9a2c337ed82d7ec5b (100%) rename test/core/http/{corpus => request_corpus}/35f0c561297cfc840ddaeebb9fc61091f4eadece (100%) rename test/core/http/{corpus => request_corpus}/3787bcc22ef645e665cc5f722b8a633af86de9cf (100%) rename test/core/http/{corpus => request_corpus}/3953688866ccb3b4f371f1a858570d6afdb6452d (100%) rename test/core/http/{corpus => request_corpus}/39b19c41ba537f37511eff7727733715db432e76 (100%) rename test/core/http/{corpus => request_corpus}/3e3c4756d5e40b5aa250954cbac86b826e70a7ac (100%) rename test/core/http/{corpus => request_corpus}/3f03265921120c6ffa61b944e213e062a5538d4b (100%) rename test/core/http/{corpus => request_corpus}/3fb034e66ee5494a67acae1b4e6ff64ba92a2046 (100%) rename test/core/http/{corpus => request_corpus}/466059ed07a0d55d6ad5e522c7d367cbf278eaf9 (100%) rename test/core/http/{corpus => request_corpus}/487725eb38511c79a9340bf4560a1411061fa6fa (100%) rename test/core/http/{corpus => request_corpus}/48b9b205cae8ac21512a3f26f49fd53e21ee13c5 (100%) rename test/core/http/{corpus => request_corpus}/4b1f1f79a0bfa3f942479dd5f8edb59a7c257c55 (100%) rename test/core/http/{corpus => request_corpus}/5028c56a5116a186b7343ff59567b47347a0796d (100%) rename test/core/http/{corpus => request_corpus}/533f62b3f495ce704babf3ee8d840f196a714dff (100%) rename test/core/http/{corpus => request_corpus}/5892cbb284771fc9761caae37b19cd6e27dbc104 (100%) rename test/core/http/{corpus => request_corpus}/5aeab6e4f7c2a1c09d4ac0dbdb3beac4893607ee (100%) rename test/core/http/{corpus => request_corpus}/5b6292bdf009b0daecbc90b85cca30a88c36eec5 (100%) rename test/core/http/{corpus => request_corpus}/5c1659b77678b41faa4fa13df7772dae3238d1c0 (100%) rename test/core/http/{corpus => request_corpus}/5c81f61621e29ec9c6a64ac3af9b3b216141618e (100%) rename test/core/http/{corpus => request_corpus}/657368df512ca6294b9df16adf935a3f374a8be2 (100%) rename test/core/http/{corpus => request_corpus}/7fc4520094902ce2c760d70eaad5b674d2817337 (100%) rename test/core/http/{corpus => request_corpus}/81f59a12b458ec3604035cb962165c604d1355e6 (100%) rename test/core/http/{corpus => request_corpus}/8f41c50e88ee8c17ecad3d41d63d38fb12aca0b9 (100%) rename test/core/http/{corpus => request_corpus}/97c16de7fe3c390a2e6c09ff5c28f17d5c67542c (100%) rename test/core/http/{corpus => request_corpus}/97e4499d450c95660de86747f527e670f2012548 (100%) rename test/core/http/{corpus => request_corpus}/9a996857196e0998a1278994a9bab3d35526e7f1 (100%) rename test/core/http/{corpus => request_corpus}/9b7e00049ec356ecd84b1747e4e1941140139ae8 (100%) rename test/core/http/{corpus => request_corpus}/9f0c38ec455cc363369b3674a2d32bc21c206de1 (100%) rename test/core/http/{corpus => request_corpus}/a1dc7bc235e46eb21d91084d7b52d5ff9f45df85 (100%) rename test/core/http/{corpus => request_corpus}/aa3bbb876eafa8ad8ca4ff2eabc6dd94341d2441 (100%) rename test/core/http/{corpus => request_corpus}/ae8ba95d7dbe99926a8f5bfd80347fd6a4b616a0 (100%) rename test/core/http/{corpus => request_corpus}/b04fea5c041c707db0ad9c09a81672557b52cc47 (100%) rename test/core/http/{corpus => request_corpus}/c4acff8aa2ff886f35439f72625d05002990c940 (100%) rename test/core/http/{corpus => request_corpus}/c55ce9995b002e88a102ae2891a71e8bacb346c8 (100%) rename test/core/http/{corpus => request_corpus}/ca5a0c00b8969310acb73d15ad0d0c602f1bd0c2 (100%) rename test/core/http/{corpus => request_corpus}/cce734f1b263de6994f7950e0df7bf0c81449f70 (100%) rename test/core/http/{corpus => request_corpus}/d39c8ee11a697634a09b309460c0bbd967e7effa (100%) rename test/core/http/{corpus => request_corpus}/d4c3e4cf5d035596433c30eaabbd2b2925f4b453 (100%) rename test/core/http/{corpus => request_corpus}/d51f7fcc089f269c7afecaaca51966bab5fde629 (100%) rename test/core/http/{corpus => request_corpus}/d936dad71c129cf659097dc3db64550c4dd467f4 (100%) rename test/core/http/{corpus => request_corpus}/e275b0466a8fb8d9e0e15856e343ddc7112ae66b (100%) rename test/core/http/{corpus => request_corpus}/e5c364b205855a2991ce07482aebb2a3a6147089 (100%) rename test/core/http/{corpus => request_corpus}/ee2077e08c3cfccd9bd82adb574ac4fc7d429afb (100%) rename test/core/http/{corpus => request_corpus}/fc5d4b9117ba9e87388174aee4f4970bdfe8d066 (100%) rename test/core/http/{corpus => request_corpus}/fdeb2c7daa9e7704f67e141106384e6dd0042c0b (100%) rename test/core/http/{corpus => request_corpus}/request1.txt (100%) rename test/core/http/{corpus => request_corpus}/request2.txt (100%) rename test/core/http/{corpus => request_corpus}/request3.txt (100%) rename test/core/http/{corpus => request_corpus}/request4.txt (100%) rename test/core/http/{corpus => request_corpus}/request5.txt (100%) rename test/core/http/{corpus => request_corpus}/response1.txt (100%) rename test/core/http/{corpus => request_corpus}/response2.txt (100%) rename test/core/http/{corpus => request_corpus}/response3.txt (100%) rename test/core/http/{corpus => request_corpus}/response4.txt (100%) rename test/core/http/{corpus => request_corpus}/response5.txt (100%) rename test/core/http/{corpus => request_corpus}/response6.txt (100%) rename test/core/http/{corpus => request_corpus}/toolong.txt (100%) rename test/core/http/{fuzzer.c => request_fuzzer.c} (87%) create mode 100644 test/core/http/response_corpus/0299ca2580e4398d170c4a336e0c33eb2cd9d427 create mode 100644 test/core/http/response_corpus/05e613853d64a9669ea3cf41b0de777dc24931ba create mode 100644 test/core/http/response_corpus/069352518a1d1baa05f317c677d275cefda2ac97 create mode 100644 test/core/http/response_corpus/0925527c9358b1e10ec0f0387cd99f35204d9a34 create mode 100644 test/core/http/response_corpus/0c5b7c2569410b526605e308309a7f36574e530d create mode 100644 test/core/http/response_corpus/0ef3d0a84360bb5ad66274f1226f5cb273ecdbcf create mode 100644 test/core/http/response_corpus/1e1273f90187fdf5df3625764245610f86af6aa4 create mode 100644 test/core/http/response_corpus/1fbc57d118f3733287e9a9d808bb8947b3260e55 create mode 100644 test/core/http/response_corpus/24756c396bc72894fd720092bb6f9c03e66b469f create mode 100644 test/core/http/response_corpus/276def41311933421ae7a9ee42e906c85b6a4d3f create mode 100644 test/core/http/response_corpus/29daa75432381937fd005cb25e314e328de6e9f9 create mode 100644 test/core/http/response_corpus/2a75204bc492084ad853682f8de3fb137d5907bc create mode 100644 test/core/http/response_corpus/2d34ba249b755a880525cf53c665633a5e359305 create mode 100644 test/core/http/response_corpus/33f4ea0c7ea27c37d8f95cfa64d282370efdafd2 create mode 100644 test/core/http/response_corpus/35554617ea6418bd43161fe9a2c337ed82d7ec5b create mode 100644 test/core/http/response_corpus/35f0c561297cfc840ddaeebb9fc61091f4eadece create mode 100644 test/core/http/response_corpus/3787bcc22ef645e665cc5f722b8a633af86de9cf create mode 100644 test/core/http/response_corpus/3953688866ccb3b4f371f1a858570d6afdb6452d create mode 100644 test/core/http/response_corpus/39b19c41ba537f37511eff7727733715db432e76 create mode 100644 test/core/http/response_corpus/3e3c4756d5e40b5aa250954cbac86b826e70a7ac create mode 100644 test/core/http/response_corpus/3f03265921120c6ffa61b944e213e062a5538d4b create mode 100644 test/core/http/response_corpus/3fb034e66ee5494a67acae1b4e6ff64ba92a2046 create mode 100644 test/core/http/response_corpus/466059ed07a0d55d6ad5e522c7d367cbf278eaf9 create mode 100644 test/core/http/response_corpus/487725eb38511c79a9340bf4560a1411061fa6fa create mode 100644 test/core/http/response_corpus/48b9b205cae8ac21512a3f26f49fd53e21ee13c5 create mode 100644 test/core/http/response_corpus/4b1f1f79a0bfa3f942479dd5f8edb59a7c257c55 create mode 100644 test/core/http/response_corpus/5028c56a5116a186b7343ff59567b47347a0796d create mode 100644 test/core/http/response_corpus/533f62b3f495ce704babf3ee8d840f196a714dff create mode 100644 test/core/http/response_corpus/5892cbb284771fc9761caae37b19cd6e27dbc104 create mode 100644 test/core/http/response_corpus/5aeab6e4f7c2a1c09d4ac0dbdb3beac4893607ee create mode 100644 test/core/http/response_corpus/5b6292bdf009b0daecbc90b85cca30a88c36eec5 create mode 100644 test/core/http/response_corpus/5c1659b77678b41faa4fa13df7772dae3238d1c0 create mode 100644 test/core/http/response_corpus/5c81f61621e29ec9c6a64ac3af9b3b216141618e create mode 100644 test/core/http/response_corpus/657368df512ca6294b9df16adf935a3f374a8be2 create mode 100644 test/core/http/response_corpus/7fc4520094902ce2c760d70eaad5b674d2817337 create mode 100644 test/core/http/response_corpus/81f59a12b458ec3604035cb962165c604d1355e6 create mode 100644 test/core/http/response_corpus/8f41c50e88ee8c17ecad3d41d63d38fb12aca0b9 create mode 100644 test/core/http/response_corpus/97c16de7fe3c390a2e6c09ff5c28f17d5c67542c create mode 100644 test/core/http/response_corpus/97e4499d450c95660de86747f527e670f2012548 create mode 100644 test/core/http/response_corpus/9a996857196e0998a1278994a9bab3d35526e7f1 create mode 100644 test/core/http/response_corpus/9b7e00049ec356ecd84b1747e4e1941140139ae8 create mode 100644 test/core/http/response_corpus/9f0c38ec455cc363369b3674a2d32bc21c206de1 create mode 100644 test/core/http/response_corpus/a1dc7bc235e46eb21d91084d7b52d5ff9f45df85 create mode 100644 test/core/http/response_corpus/aa3bbb876eafa8ad8ca4ff2eabc6dd94341d2441 create mode 100644 test/core/http/response_corpus/ae8ba95d7dbe99926a8f5bfd80347fd6a4b616a0 create mode 100644 test/core/http/response_corpus/b04fea5c041c707db0ad9c09a81672557b52cc47 create mode 100644 test/core/http/response_corpus/c4acff8aa2ff886f35439f72625d05002990c940 create mode 100644 test/core/http/response_corpus/c55ce9995b002e88a102ae2891a71e8bacb346c8 create mode 100644 test/core/http/response_corpus/ca5a0c00b8969310acb73d15ad0d0c602f1bd0c2 create mode 100644 test/core/http/response_corpus/cce734f1b263de6994f7950e0df7bf0c81449f70 create mode 100644 test/core/http/response_corpus/d39c8ee11a697634a09b309460c0bbd967e7effa create mode 100644 test/core/http/response_corpus/d4c3e4cf5d035596433c30eaabbd2b2925f4b453 create mode 100644 test/core/http/response_corpus/d51f7fcc089f269c7afecaaca51966bab5fde629 create mode 100644 test/core/http/response_corpus/d936dad71c129cf659097dc3db64550c4dd467f4 create mode 100644 test/core/http/response_corpus/e275b0466a8fb8d9e0e15856e343ddc7112ae66b create mode 100644 test/core/http/response_corpus/e5c364b205855a2991ce07482aebb2a3a6147089 create mode 100644 test/core/http/response_corpus/ee2077e08c3cfccd9bd82adb574ac4fc7d429afb create mode 100644 test/core/http/response_corpus/fc5d4b9117ba9e87388174aee4f4970bdfe8d066 create mode 100644 test/core/http/response_corpus/fdeb2c7daa9e7704f67e141106384e6dd0042c0b create mode 100644 test/core/http/response_corpus/request1.txt create mode 100644 test/core/http/response_corpus/request2.txt create mode 100644 test/core/http/response_corpus/request3.txt create mode 100644 test/core/http/response_corpus/request4.txt create mode 100644 test/core/http/response_corpus/request5.txt create mode 100644 test/core/http/response_corpus/response1.txt create mode 100644 test/core/http/response_corpus/response2.txt create mode 100644 test/core/http/response_corpus/response3.txt create mode 100644 test/core/http/response_corpus/response4.txt create mode 100644 test/core/http/response_corpus/response5.txt create mode 100644 test/core/http/response_corpus/response6.txt create mode 100644 test/core/http/response_corpus/toolong.txt create mode 100644 test/core/http/response_fuzzer.c rename tools/fuzzer/runners/{http_fuzzer_test.sh => http_request_fuzzer_test.sh} (95%) create mode 100644 tools/fuzzer/runners/http_response_fuzzer_test.sh diff --git a/Makefile b/Makefile index 6e1c3b6fd45..281501796af 100644 --- a/Makefile +++ b/Makefile @@ -941,8 +941,9 @@ grpc_verify_jwt: $(BINDIR)/$(CONFIG)/grpc_verify_jwt hpack_parser_fuzzer_test: $(BINDIR)/$(CONFIG)/hpack_parser_fuzzer_test hpack_parser_test: $(BINDIR)/$(CONFIG)/hpack_parser_test hpack_table_test: $(BINDIR)/$(CONFIG)/hpack_table_test -http_fuzzer_test: $(BINDIR)/$(CONFIG)/http_fuzzer_test http_parser_test: $(BINDIR)/$(CONFIG)/http_parser_test +http_request_fuzzer_test: $(BINDIR)/$(CONFIG)/http_request_fuzzer_test +http_response_fuzzer_test: $(BINDIR)/$(CONFIG)/http_response_fuzzer_test httpcli_format_request_test: $(BINDIR)/$(CONFIG)/httpcli_format_request_test httpcli_test: $(BINDIR)/$(CONFIG)/httpcli_test httpscli_test: $(BINDIR)/$(CONFIG)/httpscli_test @@ -1125,7 +1126,8 @@ h2_uds_nosec_test: $(BINDIR)/$(CONFIG)/h2_uds_nosec_test 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 -http_fuzzer_test_one_entry: $(BINDIR)/$(CONFIG)/http_fuzzer_test_one_entry +http_request_fuzzer_test_one_entry: $(BINDIR)/$(CONFIG)/http_request_fuzzer_test_one_entry +http_response_fuzzer_test_one_entry: $(BINDIR)/$(CONFIG)/http_response_fuzzer_test_one_entry json_fuzzer_test_one_entry: $(BINDIR)/$(CONFIG)/json_fuzzer_test_one_entry nanopb_fuzzer_response_test_one_entry: $(BINDIR)/$(CONFIG)/nanopb_fuzzer_response_test_one_entry nanopb_fuzzer_serverlist_test_one_entry: $(BINDIR)/$(CONFIG)/nanopb_fuzzer_serverlist_test_one_entry @@ -1354,7 +1356,8 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/api_fuzzer_one_entry \ $(BINDIR)/$(CONFIG)/client_fuzzer_one_entry \ $(BINDIR)/$(CONFIG)/hpack_parser_fuzzer_test_one_entry \ - $(BINDIR)/$(CONFIG)/http_fuzzer_test_one_entry \ + $(BINDIR)/$(CONFIG)/http_request_fuzzer_test_one_entry \ + $(BINDIR)/$(CONFIG)/http_response_fuzzer_test_one_entry \ $(BINDIR)/$(CONFIG)/json_fuzzer_test_one_entry \ $(BINDIR)/$(CONFIG)/nanopb_fuzzer_response_test_one_entry \ $(BINDIR)/$(CONFIG)/nanopb_fuzzer_serverlist_test_one_entry \ @@ -8017,66 +8020,98 @@ endif endif -HTTP_FUZZER_TEST_SRC = \ - test/core/http/fuzzer.c \ +HTTP_PARSER_TEST_SRC = \ + test/core/http/parser_test.c \ -HTTP_FUZZER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTP_FUZZER_TEST_SRC)))) +HTTP_PARSER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTP_PARSER_TEST_SRC)))) ifeq ($(NO_SECURE),true) # You can't build secure targets if you don't have OpenSSL. -$(BINDIR)/$(CONFIG)/http_fuzzer_test: openssl_dep_error +$(BINDIR)/$(CONFIG)/http_parser_test: openssl_dep_error else -$(BINDIR)/$(CONFIG)/http_fuzzer_test: $(HTTP_FUZZER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/http_parser_test: $(HTTP_PARSER_TEST_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) $(HTTP_FUZZER_TEST_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)/http_fuzzer_test + $(Q) $(LD) $(LDFLAGS) $(HTTP_PARSER_TEST_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)/http_parser_test endif -$(OBJDIR)/$(CONFIG)/test/core/http/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/http/parser_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a -deps_http_fuzzer_test: $(HTTP_FUZZER_TEST_OBJS:.o=.dep) +deps_http_parser_test: $(HTTP_PARSER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(HTTP_FUZZER_TEST_OBJS:.o=.dep) +-include $(HTTP_PARSER_TEST_OBJS:.o=.dep) endif endif -HTTP_PARSER_TEST_SRC = \ - test/core/http/parser_test.c \ +HTTP_REQUEST_FUZZER_TEST_SRC = \ + test/core/http/request_fuzzer.c \ -HTTP_PARSER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTP_PARSER_TEST_SRC)))) +HTTP_REQUEST_FUZZER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTP_REQUEST_FUZZER_TEST_SRC)))) ifeq ($(NO_SECURE),true) # You can't build secure targets if you don't have OpenSSL. -$(BINDIR)/$(CONFIG)/http_parser_test: openssl_dep_error +$(BINDIR)/$(CONFIG)/http_request_fuzzer_test: openssl_dep_error else -$(BINDIR)/$(CONFIG)/http_parser_test: $(HTTP_PARSER_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/http_request_fuzzer_test: $(HTTP_REQUEST_FUZZER_TEST_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) $(HTTP_PARSER_TEST_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)/http_parser_test + $(Q) $(LDXX) $(LDFLAGS) $(HTTP_REQUEST_FUZZER_TEST_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)/http_request_fuzzer_test endif -$(OBJDIR)/$(CONFIG)/test/core/http/parser_test.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/http/request_fuzzer.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a -deps_http_parser_test: $(HTTP_PARSER_TEST_OBJS:.o=.dep) +deps_http_request_fuzzer_test: $(HTTP_REQUEST_FUZZER_TEST_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(HTTP_PARSER_TEST_OBJS:.o=.dep) +-include $(HTTP_REQUEST_FUZZER_TEST_OBJS:.o=.dep) +endif +endif + + +HTTP_RESPONSE_FUZZER_TEST_SRC = \ + test/core/http/response_fuzzer.c \ + +HTTP_RESPONSE_FUZZER_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTP_RESPONSE_FUZZER_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/http_response_fuzzer_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/http_response_fuzzer_test: $(HTTP_RESPONSE_FUZZER_TEST_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) $(HTTP_RESPONSE_FUZZER_TEST_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)/http_response_fuzzer_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/http/response_fuzzer.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_http_response_fuzzer_test: $(HTTP_RESPONSE_FUZZER_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(HTTP_RESPONSE_FUZZER_TEST_OBJS:.o=.dep) endif endif @@ -14108,37 +14143,72 @@ endif endif -HTTP_FUZZER_TEST_ONE_ENTRY_SRC = \ - test/core/http/fuzzer.c \ +HTTP_REQUEST_FUZZER_TEST_ONE_ENTRY_SRC = \ + test/core/http/request_fuzzer.c \ + test/core/util/one_corpus_entry_fuzzer.c \ + +HTTP_REQUEST_FUZZER_TEST_ONE_ENTRY_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTP_REQUEST_FUZZER_TEST_ONE_ENTRY_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/http_request_fuzzer_test_one_entry: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/http_request_fuzzer_test_one_entry: $(HTTP_REQUEST_FUZZER_TEST_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) $(HTTP_REQUEST_FUZZER_TEST_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)/http_request_fuzzer_test_one_entry + +endif + +$(OBJDIR)/$(CONFIG)/test/core/http/request_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_http_request_fuzzer_test_one_entry: $(HTTP_REQUEST_FUZZER_TEST_ONE_ENTRY_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(HTTP_REQUEST_FUZZER_TEST_ONE_ENTRY_OBJS:.o=.dep) +endif +endif + + +HTTP_RESPONSE_FUZZER_TEST_ONE_ENTRY_SRC = \ + test/core/http/response_fuzzer.c \ test/core/util/one_corpus_entry_fuzzer.c \ -HTTP_FUZZER_TEST_ONE_ENTRY_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTP_FUZZER_TEST_ONE_ENTRY_SRC)))) +HTTP_RESPONSE_FUZZER_TEST_ONE_ENTRY_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(HTTP_RESPONSE_FUZZER_TEST_ONE_ENTRY_SRC)))) ifeq ($(NO_SECURE),true) # You can't build secure targets if you don't have OpenSSL. -$(BINDIR)/$(CONFIG)/http_fuzzer_test_one_entry: openssl_dep_error +$(BINDIR)/$(CONFIG)/http_response_fuzzer_test_one_entry: openssl_dep_error else -$(BINDIR)/$(CONFIG)/http_fuzzer_test_one_entry: $(HTTP_FUZZER_TEST_ONE_ENTRY_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/http_response_fuzzer_test_one_entry: $(HTTP_RESPONSE_FUZZER_TEST_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) $(HTTP_FUZZER_TEST_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)/http_fuzzer_test_one_entry + $(Q) $(LD) $(LDFLAGS) $(HTTP_RESPONSE_FUZZER_TEST_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)/http_response_fuzzer_test_one_entry endif -$(OBJDIR)/$(CONFIG)/test/core/http/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/http/response_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_http_fuzzer_test_one_entry: $(HTTP_FUZZER_TEST_ONE_ENTRY_OBJS:.o=.dep) +deps_http_response_fuzzer_test_one_entry: $(HTTP_RESPONSE_FUZZER_TEST_ONE_ENTRY_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) ifneq ($(NO_DEPS),true) --include $(HTTP_FUZZER_TEST_ONE_ENTRY_OBJS:.o=.dep) +-include $(HTTP_RESPONSE_FUZZER_TEST_ONE_ENTRY_OBJS:.o=.dep) endif endif diff --git a/build.yaml b/build.yaml index 78c1aaf704e..611fce261fc 100644 --- a/build.yaml +++ b/build.yaml @@ -1751,11 +1751,21 @@ targets: - grpc - gpr_test_util - gpr -- name: http_fuzzer_test +- name: http_parser_test + build: test + language: c + src: + - test/core/http/parser_test.c + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr +- name: http_request_fuzzer_test build: fuzzer language: c src: - - test/core/http/fuzzer.c + - test/core/http/request_fuzzer.c deps: - grpc_test_util - grpc @@ -1764,16 +1774,19 @@ targets: corpus_dirs: - test/core/http/corpus maxlen: 2048 -- name: http_parser_test - build: test +- name: http_response_fuzzer_test + build: fuzzer language: c src: - - test/core/http/parser_test.c + - test/core/http/response_fuzzer.c deps: - grpc_test_util - grpc - gpr_test_util - gpr + corpus_dirs: + - test/core/http/corpus + maxlen: 2048 - name: httpcli_format_request_test build: test language: c diff --git a/src/core/ext/client_config/channel_connectivity.c b/src/core/ext/client_config/channel_connectivity.c index 1898bf6279f..9bbb09fa396 100644 --- a/src/core/ext/client_config/channel_connectivity.c +++ b/src/core/ext/client_config/channel_connectivity.c @@ -131,13 +131,13 @@ static void partly_done(grpc_exec_ctx *exec_ctx, state_watcher *w, gpr_mu_lock(&w->mu); if (due_to_completion) { - grpc_error_unref(w->error); + GRPC_ERROR_UNREF(w->error); w->error = GRPC_ERROR_NONE; } switch (w->phase) { case WAITING: w->phase = CALLING_BACK; - grpc_cq_end_op(exec_ctx, w->cq, w->tag, grpc_error_ref(w->error), + grpc_cq_end_op(exec_ctx, w->cq, w->tag, GRPC_ERROR_REF(w->error), finished_completion, w, &w->completion_storage); break; case CALLING_BACK: diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index be9e962bcd0..801cbe0702f 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -193,7 +193,7 @@ static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg, if (lb_policy != NULL) { GRPC_LB_POLICY_REF(lb_policy, "channel"); GRPC_LB_POLICY_REF(lb_policy, "config_change"); - grpc_error_unref(state_error); + GRPC_ERROR_UNREF(state_error); state = grpc_lb_policy_check_connectivity(exec_ctx, lb_policy, &state_error); } @@ -308,7 +308,7 @@ static void cc_start_transport_op(grpc_exec_ctx *exec_ctx, if (op->disconnect_with_error != GRPC_ERROR_NONE && chand->resolver != NULL) { set_channel_connectivity_state_locked( exec_ctx, chand, GRPC_CHANNEL_FATAL_FAILURE, - grpc_error_ref(op->disconnect_with_error), "disconnect"); + GRPC_ERROR_REF(op->disconnect_with_error), "disconnect"); grpc_resolver_shutdown(exec_ctx, chand->resolver); GRPC_RESOLVER_UNREF(exec_ctx, chand->resolver, "channel"); chand->resolver = NULL; @@ -350,7 +350,7 @@ static void continue_picking(grpc_exec_ctx *exec_ctx, void *arg, if (cpa->connected_subchannel == NULL) { /* cancelled, do nothing */ } else if (error != GRPC_ERROR_NONE) { - grpc_exec_ctx_push(exec_ctx, cpa->on_ready, grpc_error_ref(error), NULL); + grpc_exec_ctx_push(exec_ctx, cpa->on_ready, GRPC_ERROR_REF(error), NULL); } else if (cc_pick_subchannel(exec_ctx, cpa->elem, cpa->initial_metadata, cpa->initial_metadata_flags, cpa->connected_subchannel, cpa->on_ready)) { diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c index 2c7b227cb82..0f58dabb1ea 100644 --- a/src/core/ext/client_config/subchannel.c +++ b/src/core/ext/client_config/subchannel.c @@ -602,7 +602,7 @@ static void on_alarm(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { if (c->disconnected) { error = GRPC_ERROR_CREATE_REFERENCING("Disconnected", &error, 1); } else { - grpc_error_ref(error); + GRPC_ERROR_REF(error); } if (error != GRPC_ERROR_NONE) { c->next_attempt = diff --git a/src/core/ext/client_config/subchannel_call_holder.c b/src/core/ext/client_config/subchannel_call_holder.c index 3b10aa44740..b65127b6275 100644 --- a/src/core/ext/client_config/subchannel_call_holder.c +++ b/src/core/ext/client_config/subchannel_call_holder.c @@ -255,10 +255,10 @@ static void fail_locked(grpc_exec_ctx *exec_ctx, size_t i; for (i = 0; i < holder->waiting_ops_count; i++) { grpc_transport_stream_op_finish_with_failure( - exec_ctx, &holder->waiting_ops[i], grpc_error_ref(error)); + exec_ctx, &holder->waiting_ops[i], GRPC_ERROR_REF(error)); } holder->waiting_ops_count = 0; - grpc_error_unref(error); + GRPC_ERROR_UNREF(error); } char *grpc_subchannel_call_holder_get_peer( diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c index 48e62467818..bc52e2804fc 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -265,7 +265,7 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, pending_pick *pp; grpc_connected_subchannel *selected; - grpc_error_ref(error); + GRPC_ERROR_REF(error); gpr_mu_lock(&p->mu); @@ -281,7 +281,7 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, p->checking_connectivity = GRPC_CHANNEL_FATAL_FAILURE; } grpc_connectivity_state_set(exec_ctx, &p->state_tracker, - p->checking_connectivity, grpc_error_ref(error), + p->checking_connectivity, GRPC_ERROR_REF(error), "selected_changed"); if (p->checking_connectivity != GRPC_CHANNEL_FATAL_FAILURE) { grpc_connected_subchannel_notify_on_state_change( @@ -328,9 +328,9 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, /* only trigger transient failure when we've tried all alternatives */ grpc_connectivity_state_set( exec_ctx, &p->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, - grpc_error_ref(error), "connecting_transient_failure"); + GRPC_ERROR_REF(error), "connecting_transient_failure"); } - grpc_error_unref(error); + GRPC_ERROR_UNREF(error); p->checking_connectivity = grpc_subchannel_check_connectivity( p->subchannels[p->checking_subchannel], &error); if (p->checking_connectivity == GRPC_CHANNEL_TRANSIENT_FAILURE) { @@ -346,7 +346,7 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, case GRPC_CHANNEL_IDLE: grpc_connectivity_state_set( exec_ctx, &p->state_tracker, GRPC_CHANNEL_CONNECTING, - grpc_error_ref(error), "connecting_changed"); + GRPC_ERROR_REF(error), "connecting_changed"); grpc_subchannel_notify_on_state_change( exec_ctx, p->subchannels[p->checking_subchannel], p->base.interested_parties, &p->checking_connectivity, @@ -359,7 +359,7 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, GRPC_SUBCHANNEL_UNREF(exec_ctx, p->subchannels[p->num_subchannels], "pick_first"); if (p->num_subchannels == 0) { - grpc_error_ref(error); + GRPC_ERROR_REF(error); grpc_connectivity_state_set( exec_ctx, &p->state_tracker, GRPC_CHANNEL_FATAL_FAILURE, GRPC_ERROR_CREATE_REFERENCING("Pick first exhausted channels", @@ -377,9 +377,9 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, } else { grpc_connectivity_state_set( exec_ctx, &p->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, - grpc_error_ref(error), "subchannel_failed"); + GRPC_ERROR_REF(error), "subchannel_failed"); p->checking_subchannel %= p->num_subchannels; - grpc_error_unref(error); + GRPC_ERROR_UNREF(error); p->checking_connectivity = grpc_subchannel_check_connectivity( p->subchannels[p->checking_subchannel], &error); goto loop; @@ -389,7 +389,7 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, gpr_mu_unlock(&p->mu); - grpc_error_unref(error); + GRPC_ERROR_UNREF(error); } static grpc_connectivity_state pf_check_connectivity(grpc_exec_ctx *exec_ctx, diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index c119a257728..ada2ef9b7cb 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -376,7 +376,7 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, int unref = 0; - grpc_error_ref(error); + GRPC_ERROR_REF(error); gpr_mu_lock(&p->mu); if (p->shutdown) { @@ -385,7 +385,7 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, switch (sd->connectivity_state) { case GRPC_CHANNEL_READY: grpc_connectivity_state_set(exec_ctx, &p->state_tracker, - GRPC_CHANNEL_READY, grpc_error_ref(error), + GRPC_CHANNEL_READY, GRPC_ERROR_REF(error), "connecting_ready"); /* add the newly connected subchannel to the list of connected ones. * Note that it goes to the "end of the line". */ @@ -421,7 +421,7 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, case GRPC_CHANNEL_IDLE: grpc_connectivity_state_set( exec_ctx, &p->state_tracker, sd->connectivity_state, - grpc_error_ref(error), "connecting_changed"); + GRPC_ERROR_REF(error), "connecting_changed"); grpc_subchannel_notify_on_state_change( exec_ctx, sd->subchannel, p->base.interested_parties, &sd->connectivity_state, &sd->connectivity_changed_closure); @@ -439,7 +439,7 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, } grpc_connectivity_state_set( exec_ctx, &p->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, - grpc_error_ref(error), "connecting_transient_failure"); + GRPC_ERROR_REF(error), "connecting_transient_failure"); break; case GRPC_CHANNEL_FATAL_FAILURE: if (sd->ready_list_node != NULL) { @@ -456,7 +456,7 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, unref = 1; if (p->num_subchannels == 0) { - grpc_error_ref(error); + GRPC_ERROR_REF(error); grpc_connectivity_state_set( exec_ctx, &p->state_tracker, GRPC_CHANNEL_FATAL_FAILURE, GRPC_ERROR_CREATE_REFERENCING("Round Robin Channels Exhausted", @@ -472,7 +472,7 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, } else { grpc_connectivity_state_set( exec_ctx, &p->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, - grpc_error_ref(error), "subchannel_failed"); + GRPC_ERROR_REF(error), "subchannel_failed"); } } /* switch */ } /* !unref */ @@ -483,7 +483,7 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, GRPC_LB_POLICY_WEAK_UNREF(exec_ctx, &p->base, "round_robin_connectivity"); } - grpc_error_unref(error); + GRPC_ERROR_UNREF(error); } static grpc_connectivity_state rr_check_connectivity(grpc_exec_ctx *exec_ctx, diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index ef860b4223e..a4d8880f615 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -139,7 +139,7 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { /* we managed to bind some addresses: continue */ } else { for (i = 0; i < resolved->naddrs; i++) { - grpc_error_unref(errors[i]); + GRPC_ERROR_UNREF(errors[i]); } } gpr_free(errors); diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 0702fe9118c..8cee95aa933 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -145,7 +145,7 @@ static void destroy_done(grpc_exec_ctx *exec_ctx, void *statep, grpc_server_secure_state *state = statep; if (state->destroy_callback != NULL) { state->destroy_callback->cb(exec_ctx, state->destroy_callback->cb_arg, - grpc_error_ref(error)); + GRPC_ERROR_REF(error)); } grpc_server_security_connector_shutdown(exec_ctx, state->sc); state_unref(state); @@ -249,7 +249,7 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, /* we managed to bind some addresses: continue */ } else { for (i = 0; i < resolved->naddrs; i++) { - grpc_error_unref(errors[i]); + GRPC_ERROR_UNREF(errors[i]); } } gpr_free(errors); diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 14d1c26c3a4..dfee1e0b6cb 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -741,7 +741,7 @@ static void terminate_writing_with_lock(grpc_exec_ctx *exec_ctx, allow_endpoint_shutdown_locked(exec_ctx, t); if (error != GRPC_ERROR_NONE) { - drop_connection(exec_ctx, t, grpc_error_ref(error)); + drop_connection(exec_ctx, t, GRPC_ERROR_REF(error)); } grpc_chttp2_cleanup_writing(exec_ctx, &t->global, &t->writing); @@ -749,7 +749,7 @@ static void terminate_writing_with_lock(grpc_exec_ctx *exec_ctx, grpc_chttp2_stream_global *stream_global; while (grpc_chttp2_list_pop_closed_waiting_for_writing(&t->global, &stream_global)) { - fail_pending_writes(exec_ctx, stream_global, grpc_error_ref(error)); + fail_pending_writes(exec_ctx, stream_global, GRPC_ERROR_REF(error)); GRPC_CHTTP2_STREAM_UNREF(exec_ctx, stream_global, "finish_writes"); } @@ -1325,10 +1325,10 @@ static void fail_pending_writes(grpc_exec_ctx *exec_ctx, grpc_error *error) { grpc_chttp2_complete_closure_step( exec_ctx, stream_global, &stream_global->send_initial_metadata_finished, - grpc_error_ref(error)); + GRPC_ERROR_REF(error)); grpc_chttp2_complete_closure_step( exec_ctx, stream_global, &stream_global->send_trailing_metadata_finished, - grpc_error_ref(error)); + GRPC_ERROR_REF(error)); grpc_chttp2_complete_closure_step( exec_ctx, stream_global, &stream_global->send_message_finished, error); } @@ -1339,7 +1339,7 @@ void grpc_chttp2_mark_stream_closed( grpc_error *error) { if (stream_global->read_closed && stream_global->write_closed) { /* already closed */ - grpc_error_unref(error); + GRPC_ERROR_UNREF(error); return; } grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); @@ -1356,7 +1356,7 @@ void grpc_chttp2_mark_stream_closed( grpc_chttp2_list_add_closed_waiting_for_writing(transport_global, stream_global); } else { - fail_pending_writes(exec_ctx, stream_global, grpc_error_ref(error)); + fail_pending_writes(exec_ctx, stream_global, GRPC_ERROR_REF(error)); } } if (stream_global->read_closed && stream_global->write_closed) { @@ -1372,7 +1372,7 @@ void grpc_chttp2_mark_stream_closed( GRPC_CHTTP2_STREAM_UNREF(exec_ctx, stream_global, "chttp2"); } } - grpc_error_unref(error); + GRPC_ERROR_UNREF(error); } static void close_from_api(grpc_exec_ctx *exec_ctx, @@ -1788,7 +1788,7 @@ static void incoming_byte_stream_next_locked(grpc_exec_ctx *exec_ctx, *arg->slice = gpr_slice_buffer_take_first(&bs->slices); grpc_exec_ctx_push(exec_ctx, arg->on_complete, GRPC_ERROR_NONE, NULL); } else if (bs->error != GRPC_ERROR_NONE) { - grpc_exec_ctx_push(exec_ctx, arg->on_complete, grpc_error_ref(bs->error), + grpc_exec_ctx_push(exec_ctx, arg->on_complete, GRPC_ERROR_REF(bs->error), NULL); } else { bs->on_next = arg->on_complete; @@ -1869,7 +1869,7 @@ static void incoming_byte_stream_finished_failed_locked( void *argp) { grpc_chttp2_incoming_byte_stream *bs = argp; grpc_error *error = argp; - grpc_exec_ctx_push(exec_ctx, bs->on_next, grpc_error_ref(error), NULL); + grpc_exec_ctx_push(exec_ctx, bs->on_next, GRPC_ERROR_REF(error), NULL); bs->on_next = NULL; bs->error = error; incoming_byte_stream_unref(exec_ctx, bs); diff --git a/src/core/ext/transport/chttp2/transport/frame_data.c b/src/core/ext/transport/chttp2/transport/frame_data.c index 828d0427ac5..952a1cc87cf 100644 --- a/src/core/ext/transport/chttp2/transport/frame_data.c +++ b/src/core/ext/transport/chttp2/transport/frame_data.c @@ -167,7 +167,7 @@ grpc_error *grpc_chttp2_data_parser_parse( switch (p->state) { case GRPC_CHTTP2_DATA_ERROR: p->state = GRPC_CHTTP2_DATA_ERROR; - return grpc_error_ref(p->error); + return GRPC_ERROR_REF(p->error); fh_0: case GRPC_CHTTP2_DATA_FH_0: stream_parsing->stats.incoming.framing_bytes++; @@ -192,7 +192,7 @@ grpc_error *grpc_chttp2_data_parser_parse( p->error = grpc_error_set_int(p->error, GRPC_ERROR_INT_OFFSET, cur - beg); p->state = GRPC_CHTTP2_DATA_ERROR; - return grpc_error_ref(p->error); + return GRPC_ERROR_REF(p->error); } if (++cur == end) { p->state = GRPC_CHTTP2_DATA_FH_1; diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.c b/src/core/ext/transport/chttp2/transport/hpack_parser.c index 0e337a655e6..609414b919f 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.c +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.c @@ -1004,14 +1004,14 @@ static grpc_error *parse_max_tbl_size_x(grpc_chttp2_hpack_parser *p, static grpc_error *parse_error(grpc_chttp2_hpack_parser *p, const uint8_t *cur, const uint8_t *end, grpc_error *err) { GPR_ASSERT(err != GRPC_ERROR_NONE); - p->last_error = grpc_error_ref(err); + p->last_error = GRPC_ERROR_REF(err); p->state = still_parse_error; return err; } static grpc_error *still_parse_error(grpc_chttp2_hpack_parser *p, const uint8_t *cur, const uint8_t *end) { - return grpc_error_ref(p->last_error); + return GRPC_ERROR_REF(p->last_error); } static grpc_error *parse_illegal_op(grpc_chttp2_hpack_parser *p, diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index 67590aeb168..24b7de0f790 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -922,7 +922,7 @@ static grpc_error *parse_frame_slice( GRPC_CHTTP2_PROTOCOL_ERROR, &stream_parsing->stats.outgoing)); } else { - grpc_error_unref(err); + GRPC_ERROR_UNREF(err); } } return err; diff --git a/src/core/lib/iomgr/closure.c b/src/core/lib/iomgr/closure.c index 0e84d13c452..866110d89ca 100644 --- a/src/core/lib/iomgr/closure.c +++ b/src/core/lib/iomgr/closure.c @@ -58,10 +58,10 @@ void grpc_closure_list_fail_all(grpc_closure_list *list, grpc_error *forced_failure) { for (grpc_closure *c = list->head; c != NULL; c = c->next_data.next) { if (c->error == GRPC_ERROR_NONE) { - c->error = grpc_error_ref(forced_failure); + c->error = GRPC_ERROR_REF(forced_failure); } } - grpc_error_unref(forced_failure); + GRPC_ERROR_UNREF(forced_failure); } bool grpc_closure_list_empty(grpc_closure_list closure_list) { diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index fb8decb8d3a..a55f02d8f63 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -54,9 +54,9 @@ static void destroy_string(void *str) { gpr_free(str); } static void *copy_string(void *str) { return gpr_strdup(str); } -static void destroy_err(void *err) { grpc_error_unref(err); } +static void destroy_err(void *err) { GRPC_ERROR_UNREF(err); } -static void *copy_err(void *err) { return grpc_error_ref(err); } +static void *copy_err(void *err) { return GRPC_ERROR_REF(err); } static void destroy_time(void *tm) { gpr_free(tm); } @@ -156,8 +156,9 @@ static bool is_special(grpc_error *err) { err == GRPC_ERROR_CANCELLED; } -grpc_error *grpc_error_ref(grpc_error *err) { +grpc_error *grpc_error_ref(grpc_error *err, const char *file, int line) { if (is_special(err)) return err; + gpr_log(GPR_DEBUG, "%p: %d -> %d [%s:%d]", err, err->refs.count, err->refs.count + 1, file, line); gpr_ref(&err->refs); return err; } @@ -168,10 +169,13 @@ static void error_destroy(grpc_error *err) { gpr_avl_unref(err->strs); gpr_avl_unref(err->errs); gpr_avl_unref(err->times); + gpr_free(err); } -void grpc_error_unref(grpc_error *err) { - if (!is_special(err) && gpr_unref(&err->refs)) { +void grpc_error_unref(grpc_error *err, const char *file, int line) { + if (is_special(err)) return; + gpr_log(GPR_DEBUG, "%p: %d -> %d [%s:%d]", err, err->refs.count, err->refs.count - 1, file, line); + if (gpr_unref(&err->refs)) { error_destroy(err); } } @@ -188,13 +192,13 @@ grpc_error *grpc_error_create(const char *file, int line, const char *desc, (void *)(uintptr_t)line); err->strs = gpr_avl_add( gpr_avl_add(gpr_avl_create(&avl_vtable_strs), - (void *)(uintptr_t)GRPC_ERROR_STR_FILE, (void *)file), - (void *)(uintptr_t)GRPC_ERROR_STR_DESCRIPTION, (void *)desc); + (void *)(uintptr_t)GRPC_ERROR_STR_FILE, gpr_strdup(file)), + (void *)(uintptr_t)GRPC_ERROR_STR_DESCRIPTION, gpr_strdup(desc)); err->errs = gpr_avl_create(&avl_vtable_errs); for (size_t i = 0; i < num_referencing; i++) { if (referencing[i] == GRPC_ERROR_NONE) continue; err->errs = - gpr_avl_add(err->errs, (void *)(err->next_err++), referencing[i]); + gpr_avl_add(err->errs, (void *)(err->next_err++), GRPC_ERROR_REF(referencing[i])); } err->times = gpr_avl_add(gpr_avl_create(&avl_vtable_times), (void *)(uintptr_t)GRPC_ERROR_TIME_CREATED, @@ -218,7 +222,7 @@ static grpc_error *copy_error_and_unref(grpc_error *in) { out->times = gpr_avl_ref(in->times); out->next_err = in->next_err; gpr_ref_init(&out->refs, 1); - grpc_error_unref(in); + GRPC_ERROR_UNREF(in); return out; } diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index 143c8beffc2..9e10d0b8438 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -83,8 +83,12 @@ grpc_error *grpc_error_create(const char *file, int line, const char *desc, grpc_error_create(__FILE__, __LINE__, desc, NULL, 0) #define GRPC_ERROR_CREATE_REFERENCING(desc, errs, count) \ grpc_error_create(__FILE__, __LINE__, desc, errs, count) -grpc_error *grpc_error_ref(grpc_error *err); -void grpc_error_unref(grpc_error *err); + +grpc_error *grpc_error_ref(grpc_error *err, const char *file, int line); +void grpc_error_unref(grpc_error *err, const char *file, int line); +#define GRPC_ERROR_REF(err) grpc_error_ref(err, __FILE__, __LINE__) +#define GRPC_ERROR_UNREF(err) grpc_error_unref(err, __FILE__, __LINE__) + grpc_error *grpc_error_set_int(grpc_error *src, grpc_error_ints which, intptr_t value); const intptr_t *grpc_error_get_int(grpc_error *error, grpc_error_ints which); diff --git a/src/core/lib/iomgr/exec_ctx.c b/src/core/lib/iomgr/exec_ctx.c index cc52c16bce8..3155ed066ab 100644 --- a/src/core/lib/iomgr/exec_ctx.c +++ b/src/core/lib/iomgr/exec_ctx.c @@ -52,7 +52,7 @@ bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { did_something = true; GPR_TIMER_BEGIN("grpc_exec_ctx_flush.cb", 0); c->cb(exec_ctx, c->cb_arg, error); - grpc_error_unref(error); + GRPC_ERROR_UNREF(error); GPR_TIMER_END("grpc_exec_ctx_flush.cb", 0); c = next; } diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index a46cd6f0f6e..17e5e1bbfab 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -516,8 +516,8 @@ done: gpr_free(allocated_addr); if (sp != NULL) { *out_port = sp->port; - grpc_error_unref(errs[0]); - grpc_error_unref(errs[1]); + GRPC_ERROR_UNREF(errs[0]); + GRPC_ERROR_UNREF(errs[1]); return GRPC_ERROR_NONE; } else { *out_port = -1; diff --git a/src/core/lib/iomgr/timer.c b/src/core/lib/iomgr/timer.c index d785d1543f4..bd8769b11bf 100644 --- a/src/core/lib/iomgr/timer.c +++ b/src/core/lib/iomgr/timer.c @@ -307,7 +307,7 @@ static size_t pop_timers(grpc_exec_ctx *exec_ctx, shard_type *shard, grpc_timer *timer; gpr_mu_lock(&shard->mu); while ((timer = pop_one(shard, now))) { - grpc_exec_ctx_push(exec_ctx, &timer->closure, grpc_error_ref(error), NULL); + grpc_exec_ctx_push(exec_ctx, &timer->closure, GRPC_ERROR_REF(error), NULL); n++; } *new_min_deadline = compute_min_deadline(shard); @@ -362,7 +362,7 @@ static int run_some_expired_timers(grpc_exec_ctx *exec_ctx, gpr_timespec now, *next, gpr_time_add(now, gpr_time_from_millis(1, GPR_TIMESPAN))); } - grpc_error_unref(error); + GRPC_ERROR_UNREF(error); return (int)n; } diff --git a/src/core/lib/security/credentials/composite/composite_credentials.c b/src/core/lib/security/credentials/composite/composite_credentials.c index 4a17f7c1b98..18189a8fb8c 100644 --- a/src/core/lib/security/credentials/composite/composite_credentials.c +++ b/src/core/lib/security/credentials/composite/composite_credentials.c @@ -260,4 +260,3 @@ grpc_channel_credentials *grpc_composite_channel_credentials_create( c->call_creds = grpc_call_credentials_ref(call_creds); return &c->base; } - diff --git a/src/core/lib/security/credentials/composite/composite_credentials.h b/src/core/lib/security/credentials/composite/composite_credentials.h index c83f74429f9..3e360c177f7 100644 --- a/src/core/lib/security/credentials/composite/composite_credentials.h +++ b/src/core/lib/security/credentials/composite/composite_credentials.h @@ -69,4 +69,3 @@ typedef struct { } grpc_composite_call_credentials; #endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_COMPOSITE_CREDENTIALS_H - diff --git a/src/core/lib/security/credentials/credentials.c b/src/core/lib/security/credentials/credentials.c index 29cf9ee8840..3dde6e587de 100644 --- a/src/core/lib/security/credentials/credentials.c +++ b/src/core/lib/security/credentials/credentials.c @@ -53,10 +53,9 @@ /* -- Common. -- */ -grpc_credentials_metadata_request * -grpc_credentials_metadata_request_create(grpc_call_credentials *creds, - grpc_credentials_metadata_cb cb, - void *user_data) { +grpc_credentials_metadata_request *grpc_credentials_metadata_request_create( + grpc_call_credentials *creds, grpc_credentials_metadata_cb cb, + void *user_data) { grpc_credentials_metadata_request *r = gpr_malloc(sizeof(grpc_credentials_metadata_request)); r->creds = grpc_call_credentials_ref(creds); @@ -230,4 +229,3 @@ grpc_server_credentials *grpc_find_server_credentials_in_args( } return NULL; } - diff --git a/src/core/lib/security/credentials/fake/fake_credentials.h b/src/core/lib/security/credentials/fake/fake_credentials.h index 10c2a0b5ce6..e2403b5d807 100644 --- a/src/core/lib/security/credentials/fake/fake_credentials.h +++ b/src/core/lib/security/credentials/fake/fake_credentials.h @@ -53,4 +53,3 @@ typedef struct { } grpc_md_only_test_credentials; #endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_CREDENTIALS_H - diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.h b/src/core/lib/security/credentials/google_default/google_default_credentials.h index 33e8c2ec8d6..838989f6f0a 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.h +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.h @@ -43,5 +43,3 @@ void grpc_flush_cached_google_default_credentials(void); #endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_GOOGLE_DEFAULT_CREDENTIALS_H - - diff --git a/src/core/lib/security/credentials/iam/iam_credentials.c b/src/core/lib/security/credentials/iam/iam_credentials.c index ec0f2841f21..89defa7c60b 100644 --- a/src/core/lib/security/credentials/iam/iam_credentials.c +++ b/src/core/lib/security/credentials/iam/iam_credentials.c @@ -83,5 +83,3 @@ grpc_call_credentials *grpc_google_iam_credentials_create( c->iam_md, GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY, authority_selector); return &c->base; } - - diff --git a/src/core/lib/security/credentials/iam/iam_credentials.h b/src/core/lib/security/credentials/iam/iam_credentials.h index 7110eaf4781..06b4db8bef2 100644 --- a/src/core/lib/security/credentials/iam/iam_credentials.h +++ b/src/core/lib/security/credentials/iam/iam_credentials.h @@ -42,6 +42,3 @@ typedef struct { } grpc_google_iam_credentials; #endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_IAM_CREDENTIALS_H - - - diff --git a/src/core/lib/security/credentials/jwt/json_token.c b/src/core/lib/security/credentials/jwt/json_token.c index fd3d0d6a64f..354c13133ef 100644 --- a/src/core/lib/security/credentials/jwt/json_token.c +++ b/src/core/lib/security/credentials/jwt/json_token.c @@ -318,4 +318,3 @@ void grpc_jwt_encode_and_sign_set_override( grpc_jwt_encode_and_sign_override func) { g_jwt_encode_and_sign_override = func; } - diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.c b/src/core/lib/security/credentials/jwt/jwt_credentials.c index 9fd0527a52a..8755a96af4f 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.c +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.c @@ -158,4 +158,3 @@ grpc_call_credentials *grpc_service_account_jwt_access_credentials_create( return grpc_service_account_jwt_access_credentials_create_from_auth_json_key( grpc_auth_json_key_create_from_string(json_key), token_lifetime); } - diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.h b/src/core/lib/security/credentials/jwt/jwt_credentials.h index 6faf6764149..6fba3dfcfd0 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.h +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.h @@ -60,4 +60,3 @@ grpc_service_account_jwt_access_credentials_create_from_auth_json_key( grpc_auth_json_key key, gpr_timespec token_lifetime); #endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_CREDENTIALS_H - diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.c b/src/core/lib/security/credentials/plugin/plugin_credentials.c index b075e145514..bae357321ea 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.c +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.c @@ -127,5 +127,3 @@ grpc_call_credentials *grpc_metadata_credentials_create_from_plugin( c->plugin = plugin; return &c->base; } - - diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.h b/src/core/lib/security/credentials/plugin/plugin_credentials.h index cdabbbd30f7..0b91d2f6162 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.h +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.h @@ -43,6 +43,3 @@ typedef struct { } grpc_plugin_credentials; #endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_PLUGIN_CREDENTIALS_H - - - diff --git a/src/core/lib/security/credentials/ssl/ssl_credentials.c b/src/core/lib/security/credentials/ssl/ssl_credentials.c index ee8d2e4365f..545bca9d98b 100644 --- a/src/core/lib/security/credentials/ssl/ssl_credentials.c +++ b/src/core/lib/security/credentials/ssl/ssl_credentials.c @@ -160,7 +160,6 @@ static void ssl_server_destruct(grpc_server_credentials *creds) { if (c->config.pem_root_certs != NULL) gpr_free(c->config.pem_root_certs); } - static grpc_security_status ssl_server_create_security_connector( grpc_server_credentials *creds, grpc_server_security_connector **sc) { grpc_ssl_server_credentials *c = (grpc_ssl_server_credentials *)creds; @@ -170,7 +169,6 @@ static grpc_security_status ssl_server_create_security_connector( static grpc_server_credentials_vtable ssl_server_vtable = { ssl_server_destruct, ssl_server_create_security_connector}; - static void ssl_build_server_config( const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, size_t num_key_cert_pairs, @@ -206,7 +204,6 @@ static void ssl_build_server_config( } } - grpc_server_credentials *grpc_ssl_server_credentials_create( const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, size_t num_key_cert_pairs, int force_client_auth, void *reserved) { @@ -241,4 +238,3 @@ grpc_server_credentials *grpc_ssl_server_credentials_create_ex( &c->config); return &c->base; } - diff --git a/src/core/lib/security/credentials/ssl/ssl_credentials.h b/src/core/lib/security/credentials/ssl/ssl_credentials.h index ea4bdabc048..f23dbdbe494 100644 --- a/src/core/lib/security/credentials/ssl/ssl_credentials.h +++ b/src/core/lib/security/credentials/ssl/ssl_credentials.h @@ -46,4 +46,3 @@ typedef struct { } grpc_ssl_server_credentials; #endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_SSL_SSL_CREDENTIALS_H */ - diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index 9bd5305f808..a3f01ef83a9 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -138,7 +138,7 @@ static void call_read_cb(grpc_exec_ctx *exec_ctx, secure_endpoint *ep, } } ep->read_buffer = NULL; - grpc_exec_ctx_push(exec_ctx, ep->read_cb, grpc_error_ref(error), NULL); + grpc_exec_ctx_push(exec_ctx, ep->read_cb, GRPC_ERROR_REF(error), NULL); SECURE_ENDPOINT_UNREF(exec_ctx, ep, "read"); } diff --git a/src/core/lib/security/transport/server_auth_filter.c b/src/core/lib/security/transport/server_auth_filter.c index e0a7fb50d1c..d45ec4020c6 100644 --- a/src/core/lib/security/transport/server_auth_filter.c +++ b/src/core/lib/security/transport/server_auth_filter.c @@ -169,7 +169,7 @@ static void auth_on_recv(grpc_exec_ctx *exec_ctx, void *user_data, return; } } - grpc_exec_ctx_push(exec_ctx, calld->on_done_recv, grpc_error_ref(error), + grpc_exec_ctx_push(exec_ctx, calld->on_done_recv, GRPC_ERROR_REF(error), NULL); } diff --git a/src/core/lib/security/util/json_util.c b/src/core/lib/security/util/json_util.c index 9eda12c6281..7eed039baa0 100644 --- a/src/core/lib/security/util/json_util.c +++ b/src/core/lib/security/util/json_util.c @@ -59,4 +59,3 @@ bool grpc_copy_json_string_property(const grpc_json *json, *copied_value = gpr_strdup(prop_value); return true; } - diff --git a/src/core/lib/security/util/json_util.h b/src/core/lib/security/util/json_util.h index 3046412729d..5959626a5fe 100644 --- a/src/core/lib/security/util/json_util.h +++ b/src/core/lib/security/util/json_util.h @@ -50,8 +50,6 @@ const char *grpc_json_get_string_property(const grpc_json *json, // Copies the value of the json child property specified by prop_name. // Returns false if the property was not found. bool grpc_copy_json_string_property(const grpc_json *json, - const char *prop_name, - char **copied_value); + const char *prop_name, char **copied_value); #endif // GRPC_CORE_LIB_SECURITY_UTIL_JSON_UTIL_H - diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 0d6c58db625..046f2903ff9 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1082,7 +1082,7 @@ static void receiving_initial_metadata_ready(grpc_exec_ctx *exec_ctx, gpr_mu_lock(&call->mu); if (error != GRPC_ERROR_NONE) { - bctl->error = grpc_error_ref(error); + bctl->error = GRPC_ERROR_REF(error); } else { grpc_metadata_batch *md = &call->metadata_batch[1 /* is_receiving */][0 /* is_trailing */]; @@ -1167,10 +1167,10 @@ static void finish_batch(grpc_exec_ctx *exec_ctx, void *bctlp, call->final_op.server.cancelled); } - grpc_error_unref(error); + GRPC_ERROR_UNREF(error); error = GRPC_ERROR_NONE; } - bctl->error = grpc_error_ref(error); + bctl->error = GRPC_ERROR_REF(error); gpr_mu_unlock(&call->mu); if (gpr_unref(&bctl->steps_to_complete)) { post_batch_completion(exec_ctx, bctl); diff --git a/src/core/lib/transport/connectivity_state.c b/src/core/lib/transport/connectivity_state.c index c6b274a5dad..6df32a3a308 100644 --- a/src/core/lib/transport/connectivity_state.c +++ b/src/core/lib/transport/connectivity_state.c @@ -61,6 +61,7 @@ void grpc_connectivity_state_init(grpc_connectivity_state_tracker *tracker, grpc_connectivity_state init_state, const char *name) { tracker->current_state = init_state; + tracker->current_error = GRPC_ERROR_NONE; tracker->watchers = NULL; tracker->name = gpr_strdup(name); } @@ -69,7 +70,6 @@ void grpc_connectivity_state_destroy(grpc_exec_ctx *exec_ctx, grpc_connectivity_state_tracker *tracker) { grpc_error *error; grpc_connectivity_state_watcher *w; - grpc_error_unref(tracker->current_error); while ((w = tracker->watchers)) { tracker->watchers = w->next; @@ -82,6 +82,7 @@ void grpc_connectivity_state_destroy(grpc_exec_ctx *exec_ctx, grpc_exec_ctx_push(exec_ctx, w->notify, error, NULL); gpr_free(w); } + GRPC_ERROR_UNREF(tracker->current_error); gpr_free(tracker->name); } @@ -92,7 +93,7 @@ grpc_connectivity_state grpc_connectivity_state_check( grpc_connectivity_state_name(tracker->current_state)); } if (error != NULL) { - *error = grpc_error_ref(tracker->current_error); + *error = GRPC_ERROR_REF(tracker->current_error); } return tracker->current_state; } @@ -132,7 +133,7 @@ int grpc_connectivity_state_notify_on_state_change( } else { if (tracker->current_state != *current) { *current = tracker->current_state; - grpc_exec_ctx_push(exec_ctx, notify, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_push(exec_ctx, notify, GRPC_ERROR_REF(tracker->current_error), NULL); } else { grpc_connectivity_state_watcher *w = gpr_malloc(sizeof(*w)); w->current = current; @@ -165,7 +166,7 @@ void grpc_connectivity_state_set(grpc_exec_ctx *exec_ctx, GPR_ASSERT(error != GRPC_ERROR_NONE); break; } - grpc_error_unref(tracker->current_error); + GRPC_ERROR_UNREF(tracker->current_error); tracker->current_error = error; if (tracker->current_state == state) { return; @@ -176,7 +177,7 @@ void grpc_connectivity_state_set(grpc_exec_ctx *exec_ctx, *w->current = tracker->current_state; tracker->watchers = w->next; grpc_exec_ctx_push(exec_ctx, w->notify, - grpc_error_ref(tracker->current_error), NULL); + GRPC_ERROR_REF(tracker->current_error), NULL); gpr_free(w); } } diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c index f7362973a97..fdf0f4b2aab 100644 --- a/src/core/lib/transport/transport.c +++ b/src/core/lib/transport/transport.c @@ -146,10 +146,10 @@ char *grpc_transport_get_peer(grpc_exec_ctx *exec_ctx, void grpc_transport_stream_op_finish_with_failure(grpc_exec_ctx *exec_ctx, grpc_transport_stream_op *op, grpc_error *error) { - grpc_exec_ctx_push(exec_ctx, op->recv_message_ready, grpc_error_ref(error), + grpc_exec_ctx_push(exec_ctx, op->recv_message_ready, GRPC_ERROR_REF(error), NULL); grpc_exec_ctx_push(exec_ctx, op->recv_initial_metadata_ready, - grpc_error_ref(error), NULL); + GRPC_ERROR_REF(error), NULL); grpc_exec_ctx_push(exec_ctx, op->on_complete, error, NULL); } @@ -178,7 +178,7 @@ static void free_message(grpc_exec_ctx *exec_ctx, void *p, grpc_error *error) { close_message_data *cmd = p; gpr_slice_unref(cmd->message); if (cmd->then_call != NULL) { - cmd->then_call->cb(exec_ctx, cmd->then_call->cb_arg, grpc_error_ref(error)); + cmd->then_call->cb(exec_ctx, cmd->then_call->cb_arg, GRPC_ERROR_REF(error)); } gpr_free(cmd); } diff --git a/test/core/bad_client/bad_client.c b/test/core/bad_client/bad_client.c index cd5b5412492..9f7274c9f19 100644 --- a/test/core/bad_client/bad_client.c +++ b/test/core/bad_client/bad_client.c @@ -62,7 +62,7 @@ static void thd_func(void *arg) { gpr_event_set(&a->done_thd, (void *)1); } -static void done_write(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void done_write(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { thd_args *a = arg; gpr_event_set(&a->done_write, (void *)1); } diff --git a/test/core/channel/channel_stack_test.c b/test/core/channel/channel_stack_test.c index 1a5594bde86..cba186da09f 100644 --- a/test/core/channel/channel_stack_test.c +++ b/test/core/channel/channel_stack_test.c @@ -81,12 +81,13 @@ static char *get_peer(grpc_exec_ctx *exec_ctx, grpc_call_element *elem) { return gpr_strdup("peer"); } -static void free_channel(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void free_channel(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { grpc_channel_stack_destroy(exec_ctx, arg); gpr_free(arg); } -static void free_call(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void free_call(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_call_stack_destroy(exec_ctx, arg, NULL); gpr_free(arg); } diff --git a/test/core/client_config/resolvers/dns_resolver_connectivity_test.c b/test/core/client_config/resolvers/dns_resolver_connectivity_test.c index 2322aa688a4..f6067463d51 100644 --- a/test/core/client_config/resolvers/dns_resolver_connectivity_test.c +++ b/test/core/client_config/resolvers/dns_resolver_connectivity_test.c @@ -67,21 +67,21 @@ static grpc_client_channel_factory cc_factory = {&sc_vtable}; static gpr_mu g_mu; static bool g_fail_resolution = true; -static grpc_resolved_addresses *my_resolve_address(const char *name, - const char *addr) { +static grpc_error *my_resolve_address(const char *name, const char *addr, + grpc_resolved_addresses **addrs) { gpr_mu_lock(&g_mu); GPR_ASSERT(0 == strcmp("test", name)); if (g_fail_resolution) { g_fail_resolution = false; gpr_mu_unlock(&g_mu); - return NULL; + return GRPC_ERROR_CREATE("Forced Failure"); } else { gpr_mu_unlock(&g_mu); - grpc_resolved_addresses *addrs = gpr_malloc(sizeof(*addrs)); - addrs->naddrs = 1; - addrs->addrs = gpr_malloc(sizeof(*addrs->addrs)); - addrs->addrs[0].len = 123; - return addrs; + *addrs = gpr_malloc(sizeof(*addrs)); + (*addrs)->naddrs = 1; + (*addrs)->addrs = gpr_malloc(sizeof(*(*addrs)->addrs)); + (*addrs)->addrs[0].len = 123; + return GRPC_ERROR_NONE; } } @@ -100,7 +100,7 @@ static grpc_resolver *create_resolver(const char *name) { return resolver; } -static void on_done(grpc_exec_ctx *exec_ctx, void *ev, bool success) { +static void on_done(grpc_exec_ctx *exec_ctx, void *ev, grpc_error *error) { gpr_event_set(ev, (void *)1); } diff --git a/test/core/client_config/set_initial_connect_string_test.c b/test/core/client_config/set_initial_connect_string_test.c index 3ad8ce964a0..499074a7bf1 100644 --- a/test/core/client_config/set_initial_connect_string_test.c +++ b/test/core/client_config/set_initial_connect_string_test.c @@ -64,8 +64,8 @@ static int server_port; static struct rpc_state state; static grpc_closure on_read; -static void handle_read(grpc_exec_ctx *exec_ctx, void *arg, bool success) { - GPR_ASSERT(success); +static void handle_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { + GPR_ASSERT(error == GRPC_ERROR_NONE); gpr_slice_buffer_move_into(&state.temp_incoming_buffer, &state.incoming_buffer); if (state.incoming_buffer.length > strlen(magic_connect_string)) { diff --git a/test/core/end2end/dualstack_socket_test.c b/test/core/end2end/dualstack_socket_test.c index 81f76ea79c2..9be72824fa4 100644 --- a/test/core/end2end/dualstack_socket_test.c +++ b/test/core/end2end/dualstack_socket_test.c @@ -266,7 +266,9 @@ void test_connect(const char *server_host, const char *client_host, int port, } int external_dns_works(const char *host) { - grpc_resolved_addresses *res = grpc_blocking_resolve_address(host, "80"); + grpc_resolved_addresses *res; + grpc_error *error = grpc_blocking_resolve_address(host, "80", &res); + GRPC_ERROR_UNREF(error); if (res != NULL) { grpc_resolved_addresses_destroy(res); return 1; diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c index 858ebd96836..3eba4a4e2eb 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -50,7 +50,7 @@ //////////////////////////////////////////////////////////////////////////////// // logging -static const bool squelch = true; +static const bool squelch = !true; static void dont_log(gpr_log_func_args *args) {} @@ -202,7 +202,7 @@ static void finish_resolve(grpc_exec_ctx *exec_ctx, void *arg, *r->addrs = addrs; grpc_exec_ctx_push(exec_ctx, r->on_done, GRPC_ERROR_NONE, NULL); } else { - grpc_error_ref(error); + GRPC_ERROR_REF(error); grpc_exec_ctx_push( exec_ctx, r->on_done, GRPC_ERROR_CREATE_REFERENCING("Resolution failed", &error, 1), NULL); @@ -248,7 +248,7 @@ static void do_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { future_connect *fc = arg; if (error != GRPC_ERROR_NONE) { *fc->ep = NULL; - grpc_exec_ctx_push(exec_ctx, fc->closure, grpc_error_ref(error), NULL); + grpc_exec_ctx_push(exec_ctx, fc->closure, GRPC_ERROR_REF(error), NULL); } else if (g_server != NULL) { grpc_endpoint *client; grpc_endpoint *server; diff --git a/test/core/end2end/goaway_server_test.c b/test/core/end2end/goaway_server_test.c index 5f8c2641e76..1da120c9b42 100644 --- a/test/core/end2end/goaway_server_test.c +++ b/test/core/end2end/goaway_server_test.c @@ -46,8 +46,9 @@ static void *tag(intptr_t i) { return (void *)i; } static gpr_mu g_mu; static int g_resolve_port = -1; -static grpc_resolved_addresses *(*iomgr_resolve_address)( - const char *name, const char *default_port); +static grpc_error *(*iomgr_resolve_address)(const char *name, + const char *default_port, + grpc_resolved_addresses **addrs); static void set_resolve_port(int port) { gpr_mu_lock(&g_mu); @@ -55,28 +56,28 @@ static void set_resolve_port(int port) { gpr_mu_unlock(&g_mu); } -static grpc_resolved_addresses *my_resolve_address(const char *name, - const char *addr) { +static grpc_error *my_resolve_address(const char *name, const char *addr, + grpc_resolved_addresses **addrs) { if (0 != strcmp(name, "test")) { - return iomgr_resolve_address(name, addr); + return iomgr_resolve_address(name, addr, addrs); } gpr_mu_lock(&g_mu); if (g_resolve_port < 0) { gpr_mu_unlock(&g_mu); - return NULL; + return GRPC_ERROR_CREATE("Forced Failure"); } else { - grpc_resolved_addresses *addrs = gpr_malloc(sizeof(*addrs)); - addrs->naddrs = 1; - addrs->addrs = gpr_malloc(sizeof(*addrs->addrs)); - memset(addrs->addrs, 0, sizeof(*addrs->addrs)); - struct sockaddr_in *sa = (struct sockaddr_in *)addrs->addrs[0].addr; + *addrs = gpr_malloc(sizeof(*addrs)); + (*addrs)->naddrs = 1; + (*addrs)->addrs = gpr_malloc(sizeof(*(*addrs)->addrs)); + memset((*addrs)->addrs, 0, sizeof(*(*addrs)->addrs)); + struct sockaddr_in *sa = (struct sockaddr_in *)(*addrs)->addrs[0].addr; sa->sin_family = AF_INET; sa->sin_addr.s_addr = htonl(0x7f000001); sa->sin_port = htons((uint16_t)g_resolve_port); - addrs->addrs[0].len = sizeof(*sa); + (*addrs)->addrs[0].len = sizeof(*sa); gpr_mu_unlock(&g_mu); - return addrs; + return GRPC_ERROR_NONE; } } diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c index 99049aa6bd5..405e75294db 100644 --- a/test/core/end2end/tests/filter_causes_close.c +++ b/test/core/end2end/tests/filter_causes_close.c @@ -202,10 +202,11 @@ typedef struct { grpc_closure *recv_im_ready; } call_data; typedef struct { uint8_t unused; } channel_data; -static void recv_im_ready(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void recv_im_ready(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { grpc_call_element *elem = arg; call_data *calld = elem->call_data; - if (success) { + if (error == GRPC_ERROR_NONE) { // close the stream with an error. gpr_slice message = gpr_slice_from_copied_string("Random failure that's not preventable."); diff --git a/test/core/http/httpcli_test.c b/test/core/http/httpcli_test.c index d3a68d0eb87..32bef2005a8 100644 --- a/test/core/http/httpcli_test.c +++ b/test/core/http/httpcli_test.c @@ -54,12 +54,11 @@ static gpr_timespec n_seconds_time(int seconds) { return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(seconds); } -static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, - const grpc_httpcli_response *response) { +static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { const char *expect = "Hello world!" "

This is a test

"; - GPR_ASSERT(arg == (void *)42); + grpc_http_response *response = arg; GPR_ASSERT(response); GPR_ASSERT(response->status == 200); GPR_ASSERT(response->body_length == strlen(expect)); @@ -86,8 +85,10 @@ static void test_get(int port) { req.http.path = "/get"; req.handshaker = &grpc_httpcli_plaintext; + grpc_http_response response; + memset(&response, 0, sizeof(response)); grpc_httpcli_get(&exec_ctx, &g_context, g_pollset, &req, n_seconds_time(15), - on_finish, (void *)42); + grpc_closure_create(on_finish, &response), &response); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; @@ -117,8 +118,11 @@ static void test_post(int port) { req.http.path = "/post"; req.handshaker = &grpc_httpcli_plaintext; + grpc_http_response response; + memset(&response, 0, sizeof(response)); grpc_httpcli_post(&exec_ctx, &g_context, g_pollset, &req, "hello", 5, - n_seconds_time(15), on_finish, (void *)42); + n_seconds_time(15), + grpc_closure_create(on_finish, &response), &response); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; @@ -132,7 +136,8 @@ static void test_post(int port) { gpr_free(host); } -static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) { +static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, + grpc_error *error) { grpc_pollset_destroy(p); } diff --git a/test/core/http/httpscli_test.c b/test/core/http/httpscli_test.c index d8073369046..dce3eb6de0b 100644 --- a/test/core/http/httpscli_test.c +++ b/test/core/http/httpscli_test.c @@ -54,12 +54,11 @@ static gpr_timespec n_seconds_time(int seconds) { return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(seconds); } -static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, - const grpc_httpcli_response *response) { +static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { const char *expect = "Hello world!" "

This is a test

"; - GPR_ASSERT(arg == (void *)42); + grpc_http_response *response = arg; GPR_ASSERT(response); GPR_ASSERT(response->status == 200); GPR_ASSERT(response->body_length == strlen(expect)); @@ -87,8 +86,10 @@ static void test_get(int port) { req.http.path = "/get"; req.handshaker = &grpc_httpcli_ssl; + grpc_http_response response; + memset(&response, 0, sizeof(response)); grpc_httpcli_get(&exec_ctx, &g_context, g_pollset, &req, n_seconds_time(15), - on_finish, (void *)42); + grpc_closure_create(on_finish, &response), &response); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; @@ -119,8 +120,11 @@ static void test_post(int port) { req.http.path = "/post"; req.handshaker = &grpc_httpcli_ssl; + grpc_http_response response; + memset(&response, 0, sizeof(response)); grpc_httpcli_post(&exec_ctx, &g_context, g_pollset, &req, "hello", 5, - n_seconds_time(15), on_finish, (void *)42); + n_seconds_time(15), + grpc_closure_create(on_finish, &response), &response); gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; @@ -134,7 +138,8 @@ static void test_post(int port) { gpr_free(host); } -static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) { +static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, + grpc_error *error) { grpc_pollset_destroy(p); } diff --git a/test/core/http/parser_test.c b/test/core/http/parser_test.c index 7fdf60cc2b1..96313bfa228 100644 --- a/test/core/http/parser_test.c +++ b/test/core/http/parser_test.c @@ -44,38 +44,39 @@ #include "test/core/util/test_config.h" static void test_request_succeeds(grpc_slice_split_mode split_mode, - char *request, char *expect_method, + char *request_text, char *expect_method, grpc_http_version expect_version, char *expect_path, char *expect_body, ...) { grpc_http_parser parser; - gpr_slice input_slice = gpr_slice_from_copied_string(request); + gpr_slice input_slice = gpr_slice_from_copied_string(request_text); size_t num_slices; size_t i; gpr_slice *slices; va_list args; + grpc_http_request request; + memset(&request, 0, sizeof(request)); grpc_split_slices(split_mode, &input_slice, 1, &slices, &num_slices); gpr_slice_unref(input_slice); - grpc_http_parser_init(&parser); + grpc_http_parser_init(&parser, GRPC_HTTP_REQUEST, &request); for (i = 0; i < num_slices; i++) { - GPR_ASSERT(grpc_http_parser_parse(&parser, slices[i])); + GPR_ASSERT(grpc_http_parser_parse(&parser, slices[i]) == GRPC_ERROR_NONE); gpr_slice_unref(slices[i]); } GPR_ASSERT(grpc_http_parser_eof(&parser)); GPR_ASSERT(GRPC_HTTP_REQUEST == parser.type); - GPR_ASSERT(0 == strcmp(expect_method, parser.http.request.method)); - GPR_ASSERT(0 == strcmp(expect_path, parser.http.request.path)); - GPR_ASSERT(expect_version == parser.http.request.version); + GPR_ASSERT(0 == strcmp(expect_method, request.method)); + GPR_ASSERT(0 == strcmp(expect_path, request.path)); + GPR_ASSERT(expect_version == request.version); if (expect_body != NULL) { - GPR_ASSERT(strlen(expect_body) == parser.http.request.body_length); - GPR_ASSERT(0 == memcmp(expect_body, parser.http.request.body, - parser.http.request.body_length)); + GPR_ASSERT(strlen(expect_body) == request.body_length); + GPR_ASSERT(0 == memcmp(expect_body, request.body, request.body_length)); } else { - GPR_ASSERT(parser.http.request.body_length == 0); + GPR_ASSERT(request.body_length == 0); } va_start(args, expect_body); @@ -85,48 +86,48 @@ static void test_request_succeeds(grpc_slice_split_mode split_mode, char *expect_value; expect_key = va_arg(args, char *); if (!expect_key) break; - GPR_ASSERT(i < parser.http.request.hdr_count); + GPR_ASSERT(i < request.hdr_count); expect_value = va_arg(args, char *); GPR_ASSERT(expect_value); - GPR_ASSERT(0 == strcmp(expect_key, parser.http.request.hdrs[i].key)); - GPR_ASSERT(0 == strcmp(expect_value, parser.http.request.hdrs[i].value)); + GPR_ASSERT(0 == strcmp(expect_key, request.hdrs[i].key)); + GPR_ASSERT(0 == strcmp(expect_value, request.hdrs[i].value)); i++; } va_end(args); - GPR_ASSERT(i == parser.http.request.hdr_count); + GPR_ASSERT(i == request.hdr_count); grpc_http_parser_destroy(&parser); gpr_free(slices); } -static void test_succeeds(grpc_slice_split_mode split_mode, char *response, +static void test_succeeds(grpc_slice_split_mode split_mode, char *response_text, int expect_status, char *expect_body, ...) { grpc_http_parser parser; - gpr_slice input_slice = gpr_slice_from_copied_string(response); + gpr_slice input_slice = gpr_slice_from_copied_string(response_text); size_t num_slices; size_t i; gpr_slice *slices; va_list args; + grpc_http_response response; grpc_split_slices(split_mode, &input_slice, 1, &slices, &num_slices); gpr_slice_unref(input_slice); - grpc_http_parser_init(&parser); + grpc_http_parser_init(&parser, GRPC_HTTP_RESPONSE, &response); for (i = 0; i < num_slices; i++) { - GPR_ASSERT(grpc_http_parser_parse(&parser, slices[i])); + GPR_ASSERT(grpc_http_parser_parse(&parser, slices[i]) == GRPC_ERROR_NONE); gpr_slice_unref(slices[i]); } GPR_ASSERT(grpc_http_parser_eof(&parser)); GPR_ASSERT(GRPC_HTTP_RESPONSE == parser.type); - GPR_ASSERT(expect_status == parser.http.response.status); + GPR_ASSERT(expect_status == response.status); if (expect_body != NULL) { - GPR_ASSERT(strlen(expect_body) == parser.http.response.body_length); - GPR_ASSERT(0 == memcmp(expect_body, parser.http.response.body, - parser.http.response.body_length)); + GPR_ASSERT(strlen(expect_body) == response.body_length); + GPR_ASSERT(0 == memcmp(expect_body, response.body, response.body_length)); } else { - GPR_ASSERT(parser.http.response.body_length == 0); + GPR_ASSERT(response.body_length == 0); } va_start(args, expect_body); @@ -136,32 +137,67 @@ static void test_succeeds(grpc_slice_split_mode split_mode, char *response, char *expect_value; expect_key = va_arg(args, char *); if (!expect_key) break; - GPR_ASSERT(i < parser.http.response.hdr_count); + GPR_ASSERT(i < response.hdr_count); expect_value = va_arg(args, char *); GPR_ASSERT(expect_value); - GPR_ASSERT(0 == strcmp(expect_key, parser.http.response.hdrs[i].key)); - GPR_ASSERT(0 == strcmp(expect_value, parser.http.response.hdrs[i].value)); + GPR_ASSERT(0 == strcmp(expect_key, response.hdrs[i].key)); + GPR_ASSERT(0 == strcmp(expect_value, response.hdrs[i].value)); i++; } va_end(args); - GPR_ASSERT(i == parser.http.response.hdr_count); + GPR_ASSERT(i == response.hdr_count); grpc_http_parser_destroy(&parser); gpr_free(slices); } -static void test_fails(grpc_slice_split_mode split_mode, char *response) { +static void test_fails(grpc_slice_split_mode split_mode, char *response_text) { grpc_http_parser parser; - gpr_slice input_slice = gpr_slice_from_copied_string(response); + gpr_slice input_slice = gpr_slice_from_copied_string(response_text); + size_t num_slices; + size_t i; + gpr_slice *slices; + grpc_error *error = GRPC_ERROR_NONE; + grpc_http_response response; + memset(&response, 0, sizeof(response)); + + grpc_split_slices(split_mode, &input_slice, 1, &slices, &num_slices); + gpr_slice_unref(input_slice); + + grpc_http_parser_init(&parser, GRPC_HTTP_RESPONSE, &response); + + for (i = 0; i < num_slices; i++) { + if (GRPC_ERROR_NONE == error) { + error = grpc_http_parser_parse(&parser, slices[i]); + } + gpr_slice_unref(slices[i]); + } + if (GRPC_ERROR_NONE == error) { + error = grpc_http_parser_eof(&parser); + } + GPR_ASSERT(error != GRPC_ERROR_NONE); + GRPC_ERROR_UNREF(error); + + grpc_http_response_destroy(&response); + grpc_http_parser_destroy(&parser); + gpr_free(slices); +} + +static void test_request_fails(grpc_slice_split_mode split_mode, + char *request_text) { + grpc_http_parser parser; + gpr_slice input_slice = gpr_slice_from_copied_string(request_text); size_t num_slices; size_t i; gpr_slice *slices; int done = 0; + grpc_http_request request; + memset(&request, 0, sizeof(request)); grpc_split_slices(split_mode, &input_slice, 1, &slices, &num_slices); gpr_slice_unref(input_slice); - grpc_http_parser_init(&parser); + grpc_http_parser_init(&parser, GRPC_HTTP_REQUEST, &request); for (i = 0; i < num_slices; i++) { if (!done && !grpc_http_parser_parse(&parser, slices[i])) { @@ -174,41 +210,11 @@ static void test_fails(grpc_slice_split_mode split_mode, char *response) { } GPR_ASSERT(done); + grpc_http_request_destroy(&request); grpc_http_parser_destroy(&parser); gpr_free(slices); } -static const uint8_t failed_test1[] = { - 0x9e, 0x48, 0x54, 0x54, 0x50, 0x2f, 0x31, 0x2e, 0x30, 0x4a, - 0x48, 0x54, 0x54, 0x30, 0x32, 0x16, 0xa, 0x2f, 0x48, 0x20, - 0x31, 0x2e, 0x31, 0x20, 0x32, 0x30, 0x31, 0x54, 0x54, 0xb9, - 0x32, 0x31, 0x2e, 0x20, 0x32, 0x30, 0x20, -}; - -typedef struct { - const char *name; - const uint8_t *data; - size_t length; -} failed_test; - -#define FAILED_TEST(name) \ - { #name, name, sizeof(name) } - -failed_test failed_tests[] = { - FAILED_TEST(failed_test1), -}; - -static void test_doesnt_crash(failed_test t) { - gpr_log(GPR_DEBUG, "Run previously failed test: %s", t.name); - grpc_http_parser p; - grpc_http_parser_init(&p); - gpr_slice slice = - gpr_slice_from_copied_buffer((const char *)t.data, t.length); - grpc_http_parser_parse(&p, slice); - gpr_slice_unref(slice); - grpc_http_parser_destroy(&p); -} - int main(int argc, char **argv) { size_t i; const grpc_slice_split_mode split_modes[] = {GRPC_SLICE_SPLIT_IDENTITY, @@ -217,10 +223,6 @@ int main(int argc, char **argv) { grpc_test_init(argc, argv); - for (i = 0; i < GPR_ARRAY_SIZE(failed_tests); i++) { - test_doesnt_crash(failed_tests[i]); - } - for (i = 0; i < GPR_ARRAY_SIZE(split_modes); i++) { test_succeeds(split_modes[i], "HTTP/1.0 200 OK\r\n" @@ -286,12 +288,12 @@ int main(int argc, char **argv) { " def\r\n" "\r\n" "hello world!"); - test_fails(split_modes[i], "GET\r\n"); - test_fails(split_modes[i], "GET /\r\n"); - test_fails(split_modes[i], "GET / HTTP/0.0\r\n"); - test_fails(split_modes[i], "GET / ____/1.0\r\n"); - test_fails(split_modes[i], "GET / HTTP/1.2\r\n"); - test_fails(split_modes[i], "GET / HTTP/1.0\n"); + test_request_fails(split_modes[i], "GET\r\n"); + test_request_fails(split_modes[i], "GET /\r\n"); + test_request_fails(split_modes[i], "GET / HTTP/0.0\r\n"); + test_request_fails(split_modes[i], "GET / ____/1.0\r\n"); + test_request_fails(split_modes[i], "GET / HTTP/1.2\r\n"); + test_request_fails(split_modes[i], "GET / HTTP/1.0\n"); tmp1 = gpr_malloc(2 * GRPC_HTTP_PARSER_MAX_HEADER_LENGTH); memset(tmp1, 'a', 2 * GRPC_HTTP_PARSER_MAX_HEADER_LENGTH - 1); diff --git a/test/core/http/corpus/0299ca2580e4398d170c4a336e0c33eb2cd9d427 b/test/core/http/request_corpus/0299ca2580e4398d170c4a336e0c33eb2cd9d427 similarity index 100% rename from test/core/http/corpus/0299ca2580e4398d170c4a336e0c33eb2cd9d427 rename to test/core/http/request_corpus/0299ca2580e4398d170c4a336e0c33eb2cd9d427 diff --git a/test/core/http/corpus/05e613853d64a9669ea3cf41b0de777dc24931ba b/test/core/http/request_corpus/05e613853d64a9669ea3cf41b0de777dc24931ba similarity index 100% rename from test/core/http/corpus/05e613853d64a9669ea3cf41b0de777dc24931ba rename to test/core/http/request_corpus/05e613853d64a9669ea3cf41b0de777dc24931ba diff --git a/test/core/http/corpus/069352518a1d1baa05f317c677d275cefda2ac97 b/test/core/http/request_corpus/069352518a1d1baa05f317c677d275cefda2ac97 similarity index 100% rename from test/core/http/corpus/069352518a1d1baa05f317c677d275cefda2ac97 rename to test/core/http/request_corpus/069352518a1d1baa05f317c677d275cefda2ac97 diff --git a/test/core/http/corpus/0925527c9358b1e10ec0f0387cd99f35204d9a34 b/test/core/http/request_corpus/0925527c9358b1e10ec0f0387cd99f35204d9a34 similarity index 100% rename from test/core/http/corpus/0925527c9358b1e10ec0f0387cd99f35204d9a34 rename to test/core/http/request_corpus/0925527c9358b1e10ec0f0387cd99f35204d9a34 diff --git a/test/core/http/corpus/0c5b7c2569410b526605e308309a7f36574e530d b/test/core/http/request_corpus/0c5b7c2569410b526605e308309a7f36574e530d similarity index 100% rename from test/core/http/corpus/0c5b7c2569410b526605e308309a7f36574e530d rename to test/core/http/request_corpus/0c5b7c2569410b526605e308309a7f36574e530d diff --git a/test/core/http/corpus/0ef3d0a84360bb5ad66274f1226f5cb273ecdbcf b/test/core/http/request_corpus/0ef3d0a84360bb5ad66274f1226f5cb273ecdbcf similarity index 100% rename from test/core/http/corpus/0ef3d0a84360bb5ad66274f1226f5cb273ecdbcf rename to test/core/http/request_corpus/0ef3d0a84360bb5ad66274f1226f5cb273ecdbcf diff --git a/test/core/http/corpus/1e1273f90187fdf5df3625764245610f86af6aa4 b/test/core/http/request_corpus/1e1273f90187fdf5df3625764245610f86af6aa4 similarity index 100% rename from test/core/http/corpus/1e1273f90187fdf5df3625764245610f86af6aa4 rename to test/core/http/request_corpus/1e1273f90187fdf5df3625764245610f86af6aa4 diff --git a/test/core/http/corpus/1fbc57d118f3733287e9a9d808bb8947b3260e55 b/test/core/http/request_corpus/1fbc57d118f3733287e9a9d808bb8947b3260e55 similarity index 100% rename from test/core/http/corpus/1fbc57d118f3733287e9a9d808bb8947b3260e55 rename to test/core/http/request_corpus/1fbc57d118f3733287e9a9d808bb8947b3260e55 diff --git a/test/core/http/corpus/24756c396bc72894fd720092bb6f9c03e66b469f b/test/core/http/request_corpus/24756c396bc72894fd720092bb6f9c03e66b469f similarity index 100% rename from test/core/http/corpus/24756c396bc72894fd720092bb6f9c03e66b469f rename to test/core/http/request_corpus/24756c396bc72894fd720092bb6f9c03e66b469f diff --git a/test/core/http/corpus/276def41311933421ae7a9ee42e906c85b6a4d3f b/test/core/http/request_corpus/276def41311933421ae7a9ee42e906c85b6a4d3f similarity index 100% rename from test/core/http/corpus/276def41311933421ae7a9ee42e906c85b6a4d3f rename to test/core/http/request_corpus/276def41311933421ae7a9ee42e906c85b6a4d3f diff --git a/test/core/http/corpus/29daa75432381937fd005cb25e314e328de6e9f9 b/test/core/http/request_corpus/29daa75432381937fd005cb25e314e328de6e9f9 similarity index 100% rename from test/core/http/corpus/29daa75432381937fd005cb25e314e328de6e9f9 rename to test/core/http/request_corpus/29daa75432381937fd005cb25e314e328de6e9f9 diff --git a/test/core/http/corpus/2a75204bc492084ad853682f8de3fb137d5907bc b/test/core/http/request_corpus/2a75204bc492084ad853682f8de3fb137d5907bc similarity index 100% rename from test/core/http/corpus/2a75204bc492084ad853682f8de3fb137d5907bc rename to test/core/http/request_corpus/2a75204bc492084ad853682f8de3fb137d5907bc diff --git a/test/core/http/corpus/2d34ba249b755a880525cf53c665633a5e359305 b/test/core/http/request_corpus/2d34ba249b755a880525cf53c665633a5e359305 similarity index 100% rename from test/core/http/corpus/2d34ba249b755a880525cf53c665633a5e359305 rename to test/core/http/request_corpus/2d34ba249b755a880525cf53c665633a5e359305 diff --git a/test/core/http/corpus/33f4ea0c7ea27c37d8f95cfa64d282370efdafd2 b/test/core/http/request_corpus/33f4ea0c7ea27c37d8f95cfa64d282370efdafd2 similarity index 100% rename from test/core/http/corpus/33f4ea0c7ea27c37d8f95cfa64d282370efdafd2 rename to test/core/http/request_corpus/33f4ea0c7ea27c37d8f95cfa64d282370efdafd2 diff --git a/test/core/http/corpus/35554617ea6418bd43161fe9a2c337ed82d7ec5b b/test/core/http/request_corpus/35554617ea6418bd43161fe9a2c337ed82d7ec5b similarity index 100% rename from test/core/http/corpus/35554617ea6418bd43161fe9a2c337ed82d7ec5b rename to test/core/http/request_corpus/35554617ea6418bd43161fe9a2c337ed82d7ec5b diff --git a/test/core/http/corpus/35f0c561297cfc840ddaeebb9fc61091f4eadece b/test/core/http/request_corpus/35f0c561297cfc840ddaeebb9fc61091f4eadece similarity index 100% rename from test/core/http/corpus/35f0c561297cfc840ddaeebb9fc61091f4eadece rename to test/core/http/request_corpus/35f0c561297cfc840ddaeebb9fc61091f4eadece diff --git a/test/core/http/corpus/3787bcc22ef645e665cc5f722b8a633af86de9cf b/test/core/http/request_corpus/3787bcc22ef645e665cc5f722b8a633af86de9cf similarity index 100% rename from test/core/http/corpus/3787bcc22ef645e665cc5f722b8a633af86de9cf rename to test/core/http/request_corpus/3787bcc22ef645e665cc5f722b8a633af86de9cf diff --git a/test/core/http/corpus/3953688866ccb3b4f371f1a858570d6afdb6452d b/test/core/http/request_corpus/3953688866ccb3b4f371f1a858570d6afdb6452d similarity index 100% rename from test/core/http/corpus/3953688866ccb3b4f371f1a858570d6afdb6452d rename to test/core/http/request_corpus/3953688866ccb3b4f371f1a858570d6afdb6452d diff --git a/test/core/http/corpus/39b19c41ba537f37511eff7727733715db432e76 b/test/core/http/request_corpus/39b19c41ba537f37511eff7727733715db432e76 similarity index 100% rename from test/core/http/corpus/39b19c41ba537f37511eff7727733715db432e76 rename to test/core/http/request_corpus/39b19c41ba537f37511eff7727733715db432e76 diff --git a/test/core/http/corpus/3e3c4756d5e40b5aa250954cbac86b826e70a7ac b/test/core/http/request_corpus/3e3c4756d5e40b5aa250954cbac86b826e70a7ac similarity index 100% rename from test/core/http/corpus/3e3c4756d5e40b5aa250954cbac86b826e70a7ac rename to test/core/http/request_corpus/3e3c4756d5e40b5aa250954cbac86b826e70a7ac diff --git a/test/core/http/corpus/3f03265921120c6ffa61b944e213e062a5538d4b b/test/core/http/request_corpus/3f03265921120c6ffa61b944e213e062a5538d4b similarity index 100% rename from test/core/http/corpus/3f03265921120c6ffa61b944e213e062a5538d4b rename to test/core/http/request_corpus/3f03265921120c6ffa61b944e213e062a5538d4b diff --git a/test/core/http/corpus/3fb034e66ee5494a67acae1b4e6ff64ba92a2046 b/test/core/http/request_corpus/3fb034e66ee5494a67acae1b4e6ff64ba92a2046 similarity index 100% rename from test/core/http/corpus/3fb034e66ee5494a67acae1b4e6ff64ba92a2046 rename to test/core/http/request_corpus/3fb034e66ee5494a67acae1b4e6ff64ba92a2046 diff --git a/test/core/http/corpus/466059ed07a0d55d6ad5e522c7d367cbf278eaf9 b/test/core/http/request_corpus/466059ed07a0d55d6ad5e522c7d367cbf278eaf9 similarity index 100% rename from test/core/http/corpus/466059ed07a0d55d6ad5e522c7d367cbf278eaf9 rename to test/core/http/request_corpus/466059ed07a0d55d6ad5e522c7d367cbf278eaf9 diff --git a/test/core/http/corpus/487725eb38511c79a9340bf4560a1411061fa6fa b/test/core/http/request_corpus/487725eb38511c79a9340bf4560a1411061fa6fa similarity index 100% rename from test/core/http/corpus/487725eb38511c79a9340bf4560a1411061fa6fa rename to test/core/http/request_corpus/487725eb38511c79a9340bf4560a1411061fa6fa diff --git a/test/core/http/corpus/48b9b205cae8ac21512a3f26f49fd53e21ee13c5 b/test/core/http/request_corpus/48b9b205cae8ac21512a3f26f49fd53e21ee13c5 similarity index 100% rename from test/core/http/corpus/48b9b205cae8ac21512a3f26f49fd53e21ee13c5 rename to test/core/http/request_corpus/48b9b205cae8ac21512a3f26f49fd53e21ee13c5 diff --git a/test/core/http/corpus/4b1f1f79a0bfa3f942479dd5f8edb59a7c257c55 b/test/core/http/request_corpus/4b1f1f79a0bfa3f942479dd5f8edb59a7c257c55 similarity index 100% rename from test/core/http/corpus/4b1f1f79a0bfa3f942479dd5f8edb59a7c257c55 rename to test/core/http/request_corpus/4b1f1f79a0bfa3f942479dd5f8edb59a7c257c55 diff --git a/test/core/http/corpus/5028c56a5116a186b7343ff59567b47347a0796d b/test/core/http/request_corpus/5028c56a5116a186b7343ff59567b47347a0796d similarity index 100% rename from test/core/http/corpus/5028c56a5116a186b7343ff59567b47347a0796d rename to test/core/http/request_corpus/5028c56a5116a186b7343ff59567b47347a0796d diff --git a/test/core/http/corpus/533f62b3f495ce704babf3ee8d840f196a714dff b/test/core/http/request_corpus/533f62b3f495ce704babf3ee8d840f196a714dff similarity index 100% rename from test/core/http/corpus/533f62b3f495ce704babf3ee8d840f196a714dff rename to test/core/http/request_corpus/533f62b3f495ce704babf3ee8d840f196a714dff diff --git a/test/core/http/corpus/5892cbb284771fc9761caae37b19cd6e27dbc104 b/test/core/http/request_corpus/5892cbb284771fc9761caae37b19cd6e27dbc104 similarity index 100% rename from test/core/http/corpus/5892cbb284771fc9761caae37b19cd6e27dbc104 rename to test/core/http/request_corpus/5892cbb284771fc9761caae37b19cd6e27dbc104 diff --git a/test/core/http/corpus/5aeab6e4f7c2a1c09d4ac0dbdb3beac4893607ee b/test/core/http/request_corpus/5aeab6e4f7c2a1c09d4ac0dbdb3beac4893607ee similarity index 100% rename from test/core/http/corpus/5aeab6e4f7c2a1c09d4ac0dbdb3beac4893607ee rename to test/core/http/request_corpus/5aeab6e4f7c2a1c09d4ac0dbdb3beac4893607ee diff --git a/test/core/http/corpus/5b6292bdf009b0daecbc90b85cca30a88c36eec5 b/test/core/http/request_corpus/5b6292bdf009b0daecbc90b85cca30a88c36eec5 similarity index 100% rename from test/core/http/corpus/5b6292bdf009b0daecbc90b85cca30a88c36eec5 rename to test/core/http/request_corpus/5b6292bdf009b0daecbc90b85cca30a88c36eec5 diff --git a/test/core/http/corpus/5c1659b77678b41faa4fa13df7772dae3238d1c0 b/test/core/http/request_corpus/5c1659b77678b41faa4fa13df7772dae3238d1c0 similarity index 100% rename from test/core/http/corpus/5c1659b77678b41faa4fa13df7772dae3238d1c0 rename to test/core/http/request_corpus/5c1659b77678b41faa4fa13df7772dae3238d1c0 diff --git a/test/core/http/corpus/5c81f61621e29ec9c6a64ac3af9b3b216141618e b/test/core/http/request_corpus/5c81f61621e29ec9c6a64ac3af9b3b216141618e similarity index 100% rename from test/core/http/corpus/5c81f61621e29ec9c6a64ac3af9b3b216141618e rename to test/core/http/request_corpus/5c81f61621e29ec9c6a64ac3af9b3b216141618e diff --git a/test/core/http/corpus/657368df512ca6294b9df16adf935a3f374a8be2 b/test/core/http/request_corpus/657368df512ca6294b9df16adf935a3f374a8be2 similarity index 100% rename from test/core/http/corpus/657368df512ca6294b9df16adf935a3f374a8be2 rename to test/core/http/request_corpus/657368df512ca6294b9df16adf935a3f374a8be2 diff --git a/test/core/http/corpus/7fc4520094902ce2c760d70eaad5b674d2817337 b/test/core/http/request_corpus/7fc4520094902ce2c760d70eaad5b674d2817337 similarity index 100% rename from test/core/http/corpus/7fc4520094902ce2c760d70eaad5b674d2817337 rename to test/core/http/request_corpus/7fc4520094902ce2c760d70eaad5b674d2817337 diff --git a/test/core/http/corpus/81f59a12b458ec3604035cb962165c604d1355e6 b/test/core/http/request_corpus/81f59a12b458ec3604035cb962165c604d1355e6 similarity index 100% rename from test/core/http/corpus/81f59a12b458ec3604035cb962165c604d1355e6 rename to test/core/http/request_corpus/81f59a12b458ec3604035cb962165c604d1355e6 diff --git a/test/core/http/corpus/8f41c50e88ee8c17ecad3d41d63d38fb12aca0b9 b/test/core/http/request_corpus/8f41c50e88ee8c17ecad3d41d63d38fb12aca0b9 similarity index 100% rename from test/core/http/corpus/8f41c50e88ee8c17ecad3d41d63d38fb12aca0b9 rename to test/core/http/request_corpus/8f41c50e88ee8c17ecad3d41d63d38fb12aca0b9 diff --git a/test/core/http/corpus/97c16de7fe3c390a2e6c09ff5c28f17d5c67542c b/test/core/http/request_corpus/97c16de7fe3c390a2e6c09ff5c28f17d5c67542c similarity index 100% rename from test/core/http/corpus/97c16de7fe3c390a2e6c09ff5c28f17d5c67542c rename to test/core/http/request_corpus/97c16de7fe3c390a2e6c09ff5c28f17d5c67542c diff --git a/test/core/http/corpus/97e4499d450c95660de86747f527e670f2012548 b/test/core/http/request_corpus/97e4499d450c95660de86747f527e670f2012548 similarity index 100% rename from test/core/http/corpus/97e4499d450c95660de86747f527e670f2012548 rename to test/core/http/request_corpus/97e4499d450c95660de86747f527e670f2012548 diff --git a/test/core/http/corpus/9a996857196e0998a1278994a9bab3d35526e7f1 b/test/core/http/request_corpus/9a996857196e0998a1278994a9bab3d35526e7f1 similarity index 100% rename from test/core/http/corpus/9a996857196e0998a1278994a9bab3d35526e7f1 rename to test/core/http/request_corpus/9a996857196e0998a1278994a9bab3d35526e7f1 diff --git a/test/core/http/corpus/9b7e00049ec356ecd84b1747e4e1941140139ae8 b/test/core/http/request_corpus/9b7e00049ec356ecd84b1747e4e1941140139ae8 similarity index 100% rename from test/core/http/corpus/9b7e00049ec356ecd84b1747e4e1941140139ae8 rename to test/core/http/request_corpus/9b7e00049ec356ecd84b1747e4e1941140139ae8 diff --git a/test/core/http/corpus/9f0c38ec455cc363369b3674a2d32bc21c206de1 b/test/core/http/request_corpus/9f0c38ec455cc363369b3674a2d32bc21c206de1 similarity index 100% rename from test/core/http/corpus/9f0c38ec455cc363369b3674a2d32bc21c206de1 rename to test/core/http/request_corpus/9f0c38ec455cc363369b3674a2d32bc21c206de1 diff --git a/test/core/http/corpus/a1dc7bc235e46eb21d91084d7b52d5ff9f45df85 b/test/core/http/request_corpus/a1dc7bc235e46eb21d91084d7b52d5ff9f45df85 similarity index 100% rename from test/core/http/corpus/a1dc7bc235e46eb21d91084d7b52d5ff9f45df85 rename to test/core/http/request_corpus/a1dc7bc235e46eb21d91084d7b52d5ff9f45df85 diff --git a/test/core/http/corpus/aa3bbb876eafa8ad8ca4ff2eabc6dd94341d2441 b/test/core/http/request_corpus/aa3bbb876eafa8ad8ca4ff2eabc6dd94341d2441 similarity index 100% rename from test/core/http/corpus/aa3bbb876eafa8ad8ca4ff2eabc6dd94341d2441 rename to test/core/http/request_corpus/aa3bbb876eafa8ad8ca4ff2eabc6dd94341d2441 diff --git a/test/core/http/corpus/ae8ba95d7dbe99926a8f5bfd80347fd6a4b616a0 b/test/core/http/request_corpus/ae8ba95d7dbe99926a8f5bfd80347fd6a4b616a0 similarity index 100% rename from test/core/http/corpus/ae8ba95d7dbe99926a8f5bfd80347fd6a4b616a0 rename to test/core/http/request_corpus/ae8ba95d7dbe99926a8f5bfd80347fd6a4b616a0 diff --git a/test/core/http/corpus/b04fea5c041c707db0ad9c09a81672557b52cc47 b/test/core/http/request_corpus/b04fea5c041c707db0ad9c09a81672557b52cc47 similarity index 100% rename from test/core/http/corpus/b04fea5c041c707db0ad9c09a81672557b52cc47 rename to test/core/http/request_corpus/b04fea5c041c707db0ad9c09a81672557b52cc47 diff --git a/test/core/http/corpus/c4acff8aa2ff886f35439f72625d05002990c940 b/test/core/http/request_corpus/c4acff8aa2ff886f35439f72625d05002990c940 similarity index 100% rename from test/core/http/corpus/c4acff8aa2ff886f35439f72625d05002990c940 rename to test/core/http/request_corpus/c4acff8aa2ff886f35439f72625d05002990c940 diff --git a/test/core/http/corpus/c55ce9995b002e88a102ae2891a71e8bacb346c8 b/test/core/http/request_corpus/c55ce9995b002e88a102ae2891a71e8bacb346c8 similarity index 100% rename from test/core/http/corpus/c55ce9995b002e88a102ae2891a71e8bacb346c8 rename to test/core/http/request_corpus/c55ce9995b002e88a102ae2891a71e8bacb346c8 diff --git a/test/core/http/corpus/ca5a0c00b8969310acb73d15ad0d0c602f1bd0c2 b/test/core/http/request_corpus/ca5a0c00b8969310acb73d15ad0d0c602f1bd0c2 similarity index 100% rename from test/core/http/corpus/ca5a0c00b8969310acb73d15ad0d0c602f1bd0c2 rename to test/core/http/request_corpus/ca5a0c00b8969310acb73d15ad0d0c602f1bd0c2 diff --git a/test/core/http/corpus/cce734f1b263de6994f7950e0df7bf0c81449f70 b/test/core/http/request_corpus/cce734f1b263de6994f7950e0df7bf0c81449f70 similarity index 100% rename from test/core/http/corpus/cce734f1b263de6994f7950e0df7bf0c81449f70 rename to test/core/http/request_corpus/cce734f1b263de6994f7950e0df7bf0c81449f70 diff --git a/test/core/http/corpus/d39c8ee11a697634a09b309460c0bbd967e7effa b/test/core/http/request_corpus/d39c8ee11a697634a09b309460c0bbd967e7effa similarity index 100% rename from test/core/http/corpus/d39c8ee11a697634a09b309460c0bbd967e7effa rename to test/core/http/request_corpus/d39c8ee11a697634a09b309460c0bbd967e7effa diff --git a/test/core/http/corpus/d4c3e4cf5d035596433c30eaabbd2b2925f4b453 b/test/core/http/request_corpus/d4c3e4cf5d035596433c30eaabbd2b2925f4b453 similarity index 100% rename from test/core/http/corpus/d4c3e4cf5d035596433c30eaabbd2b2925f4b453 rename to test/core/http/request_corpus/d4c3e4cf5d035596433c30eaabbd2b2925f4b453 diff --git a/test/core/http/corpus/d51f7fcc089f269c7afecaaca51966bab5fde629 b/test/core/http/request_corpus/d51f7fcc089f269c7afecaaca51966bab5fde629 similarity index 100% rename from test/core/http/corpus/d51f7fcc089f269c7afecaaca51966bab5fde629 rename to test/core/http/request_corpus/d51f7fcc089f269c7afecaaca51966bab5fde629 diff --git a/test/core/http/corpus/d936dad71c129cf659097dc3db64550c4dd467f4 b/test/core/http/request_corpus/d936dad71c129cf659097dc3db64550c4dd467f4 similarity index 100% rename from test/core/http/corpus/d936dad71c129cf659097dc3db64550c4dd467f4 rename to test/core/http/request_corpus/d936dad71c129cf659097dc3db64550c4dd467f4 diff --git a/test/core/http/corpus/e275b0466a8fb8d9e0e15856e343ddc7112ae66b b/test/core/http/request_corpus/e275b0466a8fb8d9e0e15856e343ddc7112ae66b similarity index 100% rename from test/core/http/corpus/e275b0466a8fb8d9e0e15856e343ddc7112ae66b rename to test/core/http/request_corpus/e275b0466a8fb8d9e0e15856e343ddc7112ae66b diff --git a/test/core/http/corpus/e5c364b205855a2991ce07482aebb2a3a6147089 b/test/core/http/request_corpus/e5c364b205855a2991ce07482aebb2a3a6147089 similarity index 100% rename from test/core/http/corpus/e5c364b205855a2991ce07482aebb2a3a6147089 rename to test/core/http/request_corpus/e5c364b205855a2991ce07482aebb2a3a6147089 diff --git a/test/core/http/corpus/ee2077e08c3cfccd9bd82adb574ac4fc7d429afb b/test/core/http/request_corpus/ee2077e08c3cfccd9bd82adb574ac4fc7d429afb similarity index 100% rename from test/core/http/corpus/ee2077e08c3cfccd9bd82adb574ac4fc7d429afb rename to test/core/http/request_corpus/ee2077e08c3cfccd9bd82adb574ac4fc7d429afb diff --git a/test/core/http/corpus/fc5d4b9117ba9e87388174aee4f4970bdfe8d066 b/test/core/http/request_corpus/fc5d4b9117ba9e87388174aee4f4970bdfe8d066 similarity index 100% rename from test/core/http/corpus/fc5d4b9117ba9e87388174aee4f4970bdfe8d066 rename to test/core/http/request_corpus/fc5d4b9117ba9e87388174aee4f4970bdfe8d066 diff --git a/test/core/http/corpus/fdeb2c7daa9e7704f67e141106384e6dd0042c0b b/test/core/http/request_corpus/fdeb2c7daa9e7704f67e141106384e6dd0042c0b similarity index 100% rename from test/core/http/corpus/fdeb2c7daa9e7704f67e141106384e6dd0042c0b rename to test/core/http/request_corpus/fdeb2c7daa9e7704f67e141106384e6dd0042c0b diff --git a/test/core/http/corpus/request1.txt b/test/core/http/request_corpus/request1.txt similarity index 100% rename from test/core/http/corpus/request1.txt rename to test/core/http/request_corpus/request1.txt diff --git a/test/core/http/corpus/request2.txt b/test/core/http/request_corpus/request2.txt similarity index 100% rename from test/core/http/corpus/request2.txt rename to test/core/http/request_corpus/request2.txt diff --git a/test/core/http/corpus/request3.txt b/test/core/http/request_corpus/request3.txt similarity index 100% rename from test/core/http/corpus/request3.txt rename to test/core/http/request_corpus/request3.txt diff --git a/test/core/http/corpus/request4.txt b/test/core/http/request_corpus/request4.txt similarity index 100% rename from test/core/http/corpus/request4.txt rename to test/core/http/request_corpus/request4.txt diff --git a/test/core/http/corpus/request5.txt b/test/core/http/request_corpus/request5.txt similarity index 100% rename from test/core/http/corpus/request5.txt rename to test/core/http/request_corpus/request5.txt diff --git a/test/core/http/corpus/response1.txt b/test/core/http/request_corpus/response1.txt similarity index 100% rename from test/core/http/corpus/response1.txt rename to test/core/http/request_corpus/response1.txt diff --git a/test/core/http/corpus/response2.txt b/test/core/http/request_corpus/response2.txt similarity index 100% rename from test/core/http/corpus/response2.txt rename to test/core/http/request_corpus/response2.txt diff --git a/test/core/http/corpus/response3.txt b/test/core/http/request_corpus/response3.txt similarity index 100% rename from test/core/http/corpus/response3.txt rename to test/core/http/request_corpus/response3.txt diff --git a/test/core/http/corpus/response4.txt b/test/core/http/request_corpus/response4.txt similarity index 100% rename from test/core/http/corpus/response4.txt rename to test/core/http/request_corpus/response4.txt diff --git a/test/core/http/corpus/response5.txt b/test/core/http/request_corpus/response5.txt similarity index 100% rename from test/core/http/corpus/response5.txt rename to test/core/http/request_corpus/response5.txt diff --git a/test/core/http/corpus/response6.txt b/test/core/http/request_corpus/response6.txt similarity index 100% rename from test/core/http/corpus/response6.txt rename to test/core/http/request_corpus/response6.txt diff --git a/test/core/http/corpus/toolong.txt b/test/core/http/request_corpus/toolong.txt similarity index 100% rename from test/core/http/corpus/toolong.txt rename to test/core/http/request_corpus/toolong.txt diff --git a/test/core/http/fuzzer.c b/test/core/http/request_fuzzer.c similarity index 87% rename from test/core/http/fuzzer.c rename to test/core/http/request_fuzzer.c index 7e4f4eb993d..aac6cbb2529 100644 --- a/test/core/http/fuzzer.c +++ b/test/core/http/request_fuzzer.c @@ -40,11 +40,14 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_http_parser parser; - grpc_http_parser_init(&parser); + grpc_http_request request; + memset(&request, 0, sizeof(request)); + grpc_http_parser_init(&parser, GRPC_HTTP_REQUEST, &request); gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size); - grpc_http_parser_parse(&parser, slice); - grpc_http_parser_eof(&parser); + GRPC_ERROR_UNREF(grpc_http_parser_parse(&parser, slice)); + GRPC_ERROR_UNREF(grpc_http_parser_eof(&parser)); gpr_slice_unref(slice); grpc_http_parser_destroy(&parser); + grpc_http_request_destroy(&request); return 0; } diff --git a/test/core/http/response_corpus/0299ca2580e4398d170c4a336e0c33eb2cd9d427 b/test/core/http/response_corpus/0299ca2580e4398d170c4a336e0c33eb2cd9d427 new file mode 100644 index 00000000000..3d6face56a0 --- /dev/null +++ b/test/core/http/response_corpus/0299ca2580e4398d170c4a336e0c33eb2cd9d427 @@ -0,0 +1,2 @@ +HTTP/1.1 …200 OKH +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/05e613853d64a9669ea3cf41b0de777dc24931ba b/test/core/http/response_corpus/05e613853d64a9669ea3cf41b0de777dc24931ba new file mode 100644 index 00000000000..5cbaf2e460f --- /dev/null +++ b/test/core/http/response_corpus/05e613853d64a9669ea3cf41b0de777dc24931ba @@ -0,0 +1,2 @@ +HTTP/1.1 8) pMKH +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/069352518a1d1baa05f317c677d275cefda2ac97 b/test/core/http/response_corpus/069352518a1d1baa05f317c677d275cefda2ac97 new file mode 100644 index 00000000000..8831f0786bb --- /dev/null +++ b/test/core/http/response_corpus/069352518a1d1baa05f317c677d275cefda2ac97 @@ -0,0 +1,2 @@ +HTTP/1.1 80) OKH +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/0925527c9358b1e10ec0f0387cd99f35204d9a34 b/test/core/http/response_corpus/0925527c9358b1e10ec0f0387cd99f35204d9a34 new file mode 100644 index 00000000000..10967d975c2 --- /dev/null +++ b/test/core/http/response_corpus/0925527c9358b1e10ec0f0387cd99f35204d9a34 @@ -0,0 +1,2 @@ +„HTT/21. 200 HT!TP/1OKH.1HTTP 200 OKH +tHT//1T0P.1y 2001. \ No newline at end of file diff --git a/test/core/http/response_corpus/0c5b7c2569410b526605e308309a7f36574e530d b/test/core/http/response_corpus/0c5b7c2569410b526605e308309a7f36574e530d new file mode 100644 index 00000000000..c79e456904b --- /dev/null +++ b/test/core/http/response_corpus/0c5b7c2569410b526605e308309a7f36574e530d @@ -0,0 +1,4 @@ +H TTP/16.1 200 OK +test: h!ello + +abcd diff --git a/test/core/http/response_corpus/0ef3d0a84360bb5ad66274f1226f5cb273ecdbcf b/test/core/http/response_corpus/0ef3d0a84360bb5ad66274f1226f5cb273ecdbcf new file mode 100644 index 00000000000..7b979b5e10f --- /dev/null +++ b/test/core/http/response_corpus/0ef3d0a84360bb5ad66274f1226f5cb273ecdbcf @@ -0,0 +1,3 @@ +HTTP/1.1 200 OKH +tHTTP/01.021 Oes,H +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/1e1273f90187fdf5df3625764245610f86af6aa4 b/test/core/http/response_corpus/1e1273f90187fdf5df3625764245610f86af6aa4 new file mode 100644 index 00000000000..67382b4f3af --- /dev/null +++ b/test/core/http/response_corpus/1e1273f90187fdf5df3625764245610f86af6aa4 @@ -0,0 +1,3 @@ +HTTP/1.1 200 OKHHTTP‰/1.200 OKH + +tHTHTTP/0 20T:tes/01. \ No newline at end of file diff --git a/test/core/http/response_corpus/1fbc57d118f3733287e9a9d808bb8947b3260e55 b/test/core/http/response_corpus/1fbc57d118f3733287e9a9d808bb8947b3260e55 new file mode 100644 index 00000000000..deb8265a30e --- /dev/null +++ b/test/core/http/response_corpus/1fbc57d118f3733287e9a9d808bb8947b3260e55 @@ -0,0 +1,3 @@ +JHTT/21. 2è0 HTTP/1.1 200 OKHHTTP‰/1.200 OKH + +tHTHTHTJHTTPT \ No newline at end of file diff --git a/test/core/http/response_corpus/24756c396bc72894fd720092bb6f9c03e66b469f b/test/core/http/response_corpus/24756c396bc72894fd720092bb6f9c03e66b469f new file mode 100644 index 00000000000..9f2e0e4a257 --- /dev/null +++ b/test/core/http/response_corpus/24756c396bc72894fd720092bb6f9c03e66b469f @@ -0,0 +1,2 @@ +JHTT/21. 200œHTT/0OKH.1 HTTP/200 OKH +tH1.T \ No newline at end of file diff --git a/test/core/http/response_corpus/276def41311933421ae7a9ee42e906c85b6a4d3f b/test/core/http/response_corpus/276def41311933421ae7a9ee42e906c85b6a4d3f new file mode 100644 index 00000000000..4db04b260a5 --- /dev/null +++ b/test/core/http/response_corpus/276def41311933421ae7a9ee42e906c85b6a4d3f @@ -0,0 +1,2 @@ +ITTP/11 …20O HTTP/11 2*0 OKH + HTDP/01.021 : OesHK ,H diff --git a/test/core/http/response_corpus/29daa75432381937fd005cb25e314e328de6e9f9 b/test/core/http/response_corpus/29daa75432381937fd005cb25e314e328de6e9f9 new file mode 100644 index 00000000000..cee70bfe71a --- /dev/null +++ b/test/core/http/response_corpus/29daa75432381937fd005cb25e314e328de6e9f9 @@ -0,0 +1,2 @@ +JHTT¹21. 200HTT/0OKH1 HTTP/100 OKH +tH1.T \ No newline at end of file diff --git a/test/core/http/response_corpus/2a75204bc492084ad853682f8de3fb137d5907bc b/test/core/http/response_corpus/2a75204bc492084ad853682f8de3fb137d5907bc new file mode 100644 index 00000000000..e76b00e34c8 --- /dev/null +++ b/test/core/http/response_corpus/2a75204bc492084ad853682f8de3fb137d5907bc @@ -0,0 +1,2 @@ +GET / HTTHTTP/1.1 200 OKH +t10H \ No newline at end of file diff --git a/test/core/http/response_corpus/2d34ba249b755a880525cf53c665633a5e359305 b/test/core/http/response_corpus/2d34ba249b755a880525cf53c665633a5e359305 new file mode 100644 index 00000000000..7435f52ea56 --- /dev/null +++ b/test/core/http/response_corpus/2d34ba249b755a880525cf53c665633a5e359305 @@ -0,0 +1,2 @@ +ITTP/11 …20O HTTP/22 2*0 OKH + HTDP/01.021 : OesHK ,H diff --git a/test/core/http/response_corpus/33f4ea0c7ea27c37d8f95cfa64d282370efdafd2 b/test/core/http/response_corpus/33f4ea0c7ea27c37d8f95cfa64d282370efdafd2 new file mode 100644 index 00000000000..cce8ded71af --- /dev/null +++ b/test/core/http/response_corpus/33f4ea0c7ea27c37d8f95cfa64d282370efdafd2 @@ -0,0 +1,2 @@ +HTTP/1*9y 200 OKm +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/35554617ea6418bd43161fe9a2c337ed82d7ec5b b/test/core/http/response_corpus/35554617ea6418bd43161fe9a2c337ed82d7ec5b new file mode 100644 index 00000000000..57efa3cabc8 --- /dev/null +++ b/test/core/http/response_corpus/35554617ea6418bd43161fe9a2c337ed82d7ec5b @@ -0,0 +1,4 @@ +JHTT/21. 200 HTTP/0OKH.1 200 OKH +tHTTP/01.021 Oes,H +t +t \ No newline at end of file diff --git a/test/core/http/response_corpus/35f0c561297cfc840ddaeebb9fc61091f4eadece b/test/core/http/response_corpus/35f0c561297cfc840ddaeebb9fc61091f4eadece new file mode 100644 index 00000000000..8df43e4dcee --- /dev/null +++ b/test/core/http/response_corpus/35f0c561297cfc840ddaeebb9fc61091f4eadece @@ -0,0 +1,2 @@ +HTTP/1.9y 200 OKH +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/3787bcc22ef645e665cc5f722b8a633af86de9cf b/test/core/http/response_corpus/3787bcc22ef645e665cc5f722b8a633af86de9cf new file mode 100644 index 00000000000..4efa386f3b5 --- /dev/null +++ b/test/core/http/response_corpus/3787bcc22ef645e665cc5f722b8a633af86de9cf @@ -0,0 +1,9 @@ +HTTP/1.1 200 OKH TTP/16.1 200 OK +tesH +tHTTP/00.021 :Oe¶,H +test: h!eHTTP/1.1 200 OKH +llo + +abcdtH +TTP/01.021 : Oes,H +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/3953688866ccb3b4f371f1a858570d6afdb6452d b/test/core/http/response_corpus/3953688866ccb3b4f371f1a858570d6afdb6452d new file mode 100644 index 00000000000..f85f1df035c --- /dev/null +++ b/test/core/http/response_corpus/3953688866ccb3b4f371f1a858570d6afdb6452d @@ -0,0 +1,3 @@ +žHTTP/1.1 200 HH +OK TDP/01.021 : Oe:,H +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/39b19c41ba537f37511eff7727733715db432e76 b/test/core/http/response_corpus/39b19c41ba537f37511eff7727733715db432e76 new file mode 100644 index 00000000000..fefa4512a87 --- /dev/null +++ b/test/core/http/response_corpus/39b19c41ba537f37511eff7727733715db432e76 @@ -0,0 +1,2 @@ +HTTP/1.1 000 OKH +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/3e3c4756d5e40b5aa250954cbac86b826e70a7ac b/test/core/http/response_corpus/3e3c4756d5e40b5aa250954cbac86b826e70a7ac new file mode 100644 index 00000000000..b967b57614d --- /dev/null +++ b/test/core/http/response_corpus/3e3c4756d5e40b5aa250954cbac86b826e70a7ac @@ -0,0 +1,3 @@ +HTTP/1.1 200 OKH +tHTTP/01.021 : Oes,H +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/3f03265921120c6ffa61b944e213e062a5538d4b b/test/core/http/response_corpus/3f03265921120c6ffa61b944e213e062a5538d4b new file mode 100644 index 00000000000..8af90071c39 --- /dev/null +++ b/test/core/http/response_corpus/3f03265921120c6ffa61b944e213e062a5538d4b @@ -0,0 +1,2 @@ +@TTP/1.1y 002ÿOKH +ves \ No newline at end of file diff --git a/test/core/http/response_corpus/3fb034e66ee5494a67acae1b4e6ff64ba92a2046 b/test/core/http/response_corpus/3fb034e66ee5494a67acae1b4e6ff64ba92a2046 new file mode 100644 index 00000000000..7d20266703c --- /dev/null +++ b/test/core/http/response_corpus/3fb034e66ee5494a67acae1b4e6ff64ba92a2046 @@ -0,0 +1,2 @@ +HTTP/1.1y 200 OKH +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/466059ed07a0d55d6ad5e522c7d367cbf278eaf9 b/test/core/http/response_corpus/466059ed07a0d55d6ad5e522c7d367cbf278eaf9 new file mode 100644 index 00000000000..5996b9a75cc --- /dev/null +++ b/test/core/http/response_corpus/466059ed07a0d55d6ad5e522c7d367cbf278eaf9 @@ -0,0 +1,4 @@ +JHTTP/1.1 +00 HTTP/1.1 200 OKHHTTPOKH ‰/1. +200 OKtH + +tHTH \ No newline at end of file diff --git a/test/core/http/response_corpus/487725eb38511c79a9340bf4560a1411061fa6fa b/test/core/http/response_corpus/487725eb38511c79a9340bf4560a1411061fa6fa new file mode 100644 index 00000000000..c59c4d22466 --- /dev/null +++ b/test/core/http/response_corpus/487725eb38511c79a9340bf4560a1411061fa6fa @@ -0,0 +1,2 @@ +HTTP/01.021 O,H +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/48b9b205cae8ac21512a3f26f49fd53e21ee13c5 b/test/core/http/response_corpus/48b9b205cae8ac21512a3f26f49fd53e21ee13c5 new file mode 100644 index 00000000000..8ac7ceb2d5f --- /dev/null +++ b/test/core/http/response_corpus/48b9b205cae8ac21512a3f26f49fd53e21ee13c5 @@ -0,0 +1,2 @@ +ITTP/11 …20O HK +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/4b1f1f79a0bfa3f942479dd5f8edb59a7c257c55 b/test/core/http/response_corpus/4b1f1f79a0bfa3f942479dd5f8edb59a7c257c55 new file mode 100644 index 00000000000..49d1c8f1d2e --- /dev/null +++ b/test/core/http/response_corpus/4b1f1f79a0bfa3f942479dd5f8edb59a7c257c55 @@ -0,0 +1,2 @@ +HTTP/1.1 200 OKH +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/5028c56a5116a186b7343ff59567b47347a0796d b/test/core/http/response_corpus/5028c56a5116a186b7343ff59567b47347a0796d new file mode 100644 index 00000000000..5f2c4dfef05 --- /dev/null +++ b/test/core/http/response_corpus/5028c56a5116a186b7343ff59567b47347a0796d @@ -0,0 +1,3 @@ +HTTP/1.1 200 OKH + HTDP/01.021 : Oes,H +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/533f62b3f495ce704babf3ee8d840f196a714dff b/test/core/http/response_corpus/533f62b3f495ce704babf3ee8d840f196a714dff new file mode 100644 index 00000000000..6313cd967a0 --- /dev/null +++ b/test/core/http/response_corpus/533f62b3f495ce704babf3ee8d840f196a714dff @@ -0,0 +1,4 @@ +JHTT/21. 200 HTTP/1OKH.1 200 OKH +tHTTP/01.021 Oes,H +t +t \ No newline at end of file diff --git a/test/core/http/response_corpus/5892cbb284771fc9761caae37b19cd6e27dbc104 b/test/core/http/response_corpus/5892cbb284771fc9761caae37b19cd6e27dbc104 new file mode 100644 index 00000000000..fee55121522 --- /dev/null +++ b/test/core/http/response_corpus/5892cbb284771fc9761caae37b19cd6e27dbc104 @@ -0,0 +1,2 @@ +JÏHTTP‰/1.200:OKHHTã/21. 2è0 HTTP/ +1.1 200 OKHHTtTP‰ \ No newline at end of file diff --git a/test/core/http/response_corpus/5aeab6e4f7c2a1c09d4ac0dbdb3beac4893607ee b/test/core/http/response_corpus/5aeab6e4f7c2a1c09d4ac0dbdb3beac4893607ee new file mode 100644 index 00000000000..bd7e2395372 --- /dev/null +++ b/test/core/http/response_corpus/5aeab6e4f7c2a1c09d4ac0dbdb3beac4893607ee @@ -0,0 +1,2 @@ +ITTP/11 …20O HTTP/11 2*0 OKH + HTDP/01.021 : OesHK ,H diff --git a/test/core/http/response_corpus/5b6292bdf009b0daecbc90b85cca30a88c36eec5 b/test/core/http/response_corpus/5b6292bdf009b0daecbc90b85cca30a88c36eec5 new file mode 100644 index 00000000000..9a15ab025fe --- /dev/null +++ b/test/core/http/response_corpus/5b6292bdf009b0daecbc90b85cca30a88c36eec5 @@ -0,0 +1,2 @@ +HTTP/1. 200 OKH +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/5c1659b77678b41faa4fa13df7772dae3238d1c0 b/test/core/http/response_corpus/5c1659b77678b41faa4fa13df7772dae3238d1c0 new file mode 100644 index 00000000000..480708e0333 --- /dev/null +++ b/test/core/http/response_corpus/5c1659b77678b41faa4fa13df7772dae3238d1c0 @@ -0,0 +1,2 @@ +@TTP/1.1y 00'JHTTP/1.1 +00ÿOïH HTTP/ +ve1.1 200s \ No newline at end of file diff --git a/test/core/http/response_corpus/5c81f61621e29ec9c6a64ac3af9b3b216141618e b/test/core/http/response_corpus/5c81f61621e29ec9c6a64ac3af9b3b216141618e new file mode 100644 index 00000000000..0ed0dfadecc --- /dev/null +++ b/test/core/http/response_corpus/5c81f61621e29ec9c6a64ac3af9b3b216141618e @@ -0,0 +1,2 @@ +ITTP/11 …20O HTTP/1.1 200 OKH + HTDP/01.021 : OesHK ,H diff --git a/test/core/http/response_corpus/657368df512ca6294b9df16adf935a3f374a8be2 b/test/core/http/response_corpus/657368df512ca6294b9df16adf935a3f374a8be2 new file mode 100644 index 00000000000..1f14f69103f --- /dev/null +++ b/test/core/http/response_corpus/657368df512ca6294b9df16adf935a3f374a8be2 @@ -0,0 +1,3 @@ +HTT +/1.1 201 OKH +des \ No newline at end of file diff --git a/test/core/http/response_corpus/7fc4520094902ce2c760d70eaad5b674d2817337 b/test/core/http/response_corpus/7fc4520094902ce2c760d70eaad5b674d2817337 new file mode 100644 index 00000000000..8fc481d92b2 --- /dev/null +++ b/test/core/http/response_corpus/7fc4520094902ce2c760d70eaad5b674d2817337 @@ -0,0 +1,5 @@ +JHTTP/1.GET / HTTP/1.0 +1 200 OKH + + +t \ No newline at end of file diff --git a/test/core/http/response_corpus/81f59a12b458ec3604035cb962165c604d1355e6 b/test/core/http/response_corpus/81f59a12b458ec3604035cb962165c604d1355e6 new file mode 100644 index 00000000000..d4223ccf818 --- /dev/null +++ b/test/core/http/response_corpus/81f59a12b458ec3604035cb962165c604d1355e6 @@ -0,0 +1,2 @@ +HTTP/1.1 8p) )MKH +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/8f41c50e88ee8c17ecad3d41d63d38fb12aca0b9 b/test/core/http/response_corpus/8f41c50e88ee8c17ecad3d41d63d38fb12aca0b9 new file mode 100644 index 00000000000..99e2c48bbd4 --- /dev/null +++ b/test/core/http/response_corpus/8f41c50e88ee8c17ecad3d41d63d38fb12aca0b9 @@ -0,0 +1,4 @@ +HTTP/1.1 200 OKH +tHTHTTP/1. 20TP/01.020(: Oes,H0 OKH + +tteses \ No newline at end of file diff --git a/test/core/http/response_corpus/97c16de7fe3c390a2e6c09ff5c28f17d5c67542c b/test/core/http/response_corpus/97c16de7fe3c390a2e6c09ff5c28f17d5c67542c new file mode 100644 index 00000000000..776253d750e --- /dev/null +++ b/test/core/http/response_corpus/97c16de7fe3c390a2e6c09ff5c28f17d5c67542c @@ -0,0 +1,2 @@ +ITTp/11 …20O HTTP/*1.1 200 OKH + HTDP/02.021 : OesHK ,H diff --git a/test/core/http/response_corpus/97e4499d450c95660de86747f527e670f2012548 b/test/core/http/response_corpus/97e4499d450c95660de86747f527e670f2012548 new file mode 100644 index 00000000000..b1927fbf63d --- /dev/null +++ b/test/core/http/response_corpus/97e4499d450c95660de86747f527e670f2012548 @@ -0,0 +1,3 @@ +HTHHTT`TT +/1.1 201 P*/OKH +des1.1 2T \ No newline at end of file diff --git a/test/core/http/response_corpus/9a996857196e0998a1278994a9bab3d35526e7f1 b/test/core/http/response_corpus/9a996857196e0998a1278994a9bab3d35526e7f1 new file mode 100644 index 00000000000..0eb2c0da3a9 --- /dev/null +++ b/test/core/http/response_corpus/9a996857196e0998a1278994a9bab3d35526e7f1 @@ -0,0 +1,2 @@ +@TTP/1.1y 002ÿOKH +ves \ No newline at end of file diff --git a/test/core/http/response_corpus/9b7e00049ec356ecd84b1747e4e1941140139ae8 b/test/core/http/response_corpus/9b7e00049ec356ecd84b1747e4e1941140139ae8 new file mode 100644 index 00000000000..f93b9a08e30 --- /dev/null +++ b/test/core/http/response_corpus/9b7e00049ec356ecd84b1747e4e1941140139ae8 @@ -0,0 +1,3 @@ +„HTT/21. 200 HTTP/1.1 HT!TP/1OKH.1HTTP 200 OKH +tHT/:/80 OKH +1 \ No newline at end of file diff --git a/test/core/http/response_corpus/9f0c38ec455cc363369b3674a2d32bc21c206de1 b/test/core/http/response_corpus/9f0c38ec455cc363369b3674a2d32bc21c206de1 new file mode 100644 index 00000000000..4ea07dc1371 --- /dev/null +++ b/test/core/http/response_corpus/9f0c38ec455cc363369b3674a2d32bc21c206de1 @@ -0,0 +1,5 @@ +JHTTP/1>GET / HTTP/2.0 +1 200 OKH + + +t \ No newline at end of file diff --git a/test/core/http/response_corpus/a1dc7bc235e46eb21d91084d7b52d5ff9f45df85 b/test/core/http/response_corpus/a1dc7bc235e46eb21d91084d7b52d5ff9f45df85 new file mode 100644 index 00000000000..2e95bac35c9 --- /dev/null +++ b/test/core/http/response_corpus/a1dc7bc235e46eb21d91084d7b52d5ff9f45df85 @@ -0,0 +1,3 @@ +„HTT/21. 200 HTTP/1.1 HT!TP/1OKH.1HTTP 200 OKH +tHT//80) OKH +1 \ No newline at end of file diff --git a/test/core/http/response_corpus/aa3bbb876eafa8ad8ca4ff2eabc6dd94341d2441 b/test/core/http/response_corpus/aa3bbb876eafa8ad8ca4ff2eabc6dd94341d2441 new file mode 100644 index 00000000000..837449dda35 --- /dev/null +++ b/test/core/http/response_corpus/aa3bbb876eafa8ad8ca4ff2eabc6dd94341d2441 @@ -0,0 +1,2 @@ +HTTP/1.1 80î OH +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/ae8ba95d7dbe99926a8f5bfd80347fd6a4b616a0 b/test/core/http/response_corpus/ae8ba95d7dbe99926a8f5bfd80347fd6a4b616a0 new file mode 100644 index 00000000000..6075d0a5d7a --- /dev/null +++ b/test/core/http/response_corpus/ae8ba95d7dbe99926a8f5bfd80347fd6a4b616a0 @@ -0,0 +1,17 @@ +HTTP/1.1 200 OKH TTP/16.1 200 OK +tesH +tHHTTP/1.1 20TTP/00.021 :Oe¶,H +test: h!eHTTP/1.1 200 OKH +llo + +abcdtH +TTP/01.021 : Oes,0 OKH TTP/16.1 200 OK +tesH +tHTTP/00.021 :Oe¶,H +test: h!eHTTP/1.1 200 OKH +llo + +abcdtH +TTP/01.021 : Oes,H +Ht +teses \ No newline at end of file diff --git a/test/core/http/response_corpus/b04fea5c041c707db0ad9c09a81672557b52cc47 b/test/core/http/response_corpus/b04fea5c041c707db0ad9c09a81672557b52cc47 new file mode 100644 index 00000000000..10905bed391 --- /dev/null +++ b/test/core/http/response_corpus/b04fea5c041c707db0ad9c09a81672557b52cc47 @@ -0,0 +1,2 @@ +JHTTP/1.1 200 OKH +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/c4acff8aa2ff886f35439f72625d05002990c940 b/test/core/http/response_corpus/c4acff8aa2ff886f35439f72625d05002990c940 new file mode 100644 index 00000000000..4539d9f0128 --- /dev/null +++ b/test/core/http/response_corpus/c4acff8aa2ff886f35439f72625d05002990c940 @@ -0,0 +1,4 @@ +JHTT/21. 200 HTTP/2OKH.1 200 OKH +tHTTP/01.021 Oes,H +t +t \ No newline at end of file diff --git a/test/core/http/response_corpus/c55ce9995b002e88a102ae2891a71e8bacb346c8 b/test/core/http/response_corpus/c55ce9995b002e88a102ae2891a71e8bacb346c8 new file mode 100644 index 00000000000..2704e4fb392 --- /dev/null +++ b/test/core/http/response_corpus/c55ce9995b002e88a102ae2891a71e8bacb346c8 @@ -0,0 +1,2 @@ +HTTP/1.1 767) OKH +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/ca5a0c00b8969310acb73d15ad0d0c602f1bd0c2 b/test/core/http/response_corpus/ca5a0c00b8969310acb73d15ad0d0c602f1bd0c2 new file mode 100644 index 00000000000..f5cbbc69e78 --- /dev/null +++ b/test/core/http/response_corpus/ca5a0c00b8969310acb73d15ad0d0c602f1bd0c2 @@ -0,0 +1,3 @@ +HJHTHHTT`TT +/1.1 201 P*HHTT/T1/OKH +des1.1 2.1T 20T1 \ No newline at end of file diff --git a/test/core/http/response_corpus/cce734f1b263de6994f7950e0df7bf0c81449f70 b/test/core/http/response_corpus/cce734f1b263de6994f7950e0df7bf0c81449f70 new file mode 100644 index 00000000000..f6ea09c41bc --- /dev/null +++ b/test/core/http/response_corpus/cce734f1b263de6994f7950e0df7bf0c81449f70 @@ -0,0 +1,3 @@ +JHTT/21. 200 HTTPHTTP/1.1 80î OH/1OKH.0 200 OKH +tHTTP/0 +te \ No newline at end of file diff --git a/test/core/http/response_corpus/d39c8ee11a697634a09b309460c0bbd967e7effa b/test/core/http/response_corpus/d39c8ee11a697634a09b309460c0bbd967e7effa new file mode 100644 index 00000000000..e241a0c01c1 --- /dev/null +++ b/test/core/http/response_corpus/d39c8ee11a697634a09b309460c0bbd967e7effa @@ -0,0 +1,17 @@ +HTTP/1.1 200 OKH TTP/16.1 200 OK +tesHTTP/1.1 200 OKH TTP/16.1 200 OK +tesH +tHTTP/00.021 :Oe¶,H +test: h!eHTTP/1.1 200H +tHTTP/00.010 :Oe¶,H +test: h!eHTTP/1.… 200 OKH +llo + +abcdtH +TTP/01.02 : Oes,H OKH +llo + +abcdtH +TTP/01.021 : Oes , +H +tteess \ No newline at end of file diff --git a/test/core/http/response_corpus/d4c3e4cf5d035596433c30eaabbd2b2925f4b453 b/test/core/http/response_corpus/d4c3e4cf5d035596433c30eaabbd2b2925f4b453 new file mode 100644 index 00000000000..be33d81102f --- /dev/null +++ b/test/core/http/response_corpus/d4c3e4cf5d035596433c30eaabbd2b2925f4b453 @@ -0,0 +1,3 @@ +HTTP/1.1 200 OKH + HTTP/01.021 : Oes,H +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/d51f7fcc089f269c7afecaaca51966bab5fde629 b/test/core/http/response_corpus/d51f7fcc089f269c7afecaaca51966bab5fde629 new file mode 100644 index 00000000000..e81a59f30b3 --- /dev/null +++ b/test/core/http/response_corpus/d51f7fcc089f269c7afecaaca51966bab5fde629 @@ -0,0 +1,2 @@ +ÏHTTP‰/1.200:OKH +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/d936dad71c129cf659097dc3db64550c4dd467f4 b/test/core/http/response_corpus/d936dad71c129cf659097dc3db64550c4dd467f4 new file mode 100644 index 00000000000..ccf918751dc --- /dev/null +++ b/test/core/http/response_corpus/d936dad71c129cf659097dc3db64550c4dd467f4 @@ -0,0 +1,2 @@ +HTTP‰/1.200 OKH +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/e275b0466a8fb8d9e0e15856e343ddc7112ae66b b/test/core/http/response_corpus/e275b0466a8fb8d9e0e15856e343ddc7112ae66b new file mode 100644 index 00000000000..b6fc095920f --- /dev/null +++ b/test/core/http/response_corpus/e275b0466a8fb8d9e0e15856e343ddc7112ae66b @@ -0,0 +1,3 @@ +JHTT/21. 200 HTTRHTTP/1.1 0î OL/1OKH.0 200 OKH +tHTTP/0 +te \ No newline at end of file diff --git a/test/core/http/response_corpus/e5c364b205855a2991ce07482aebb2a3a6147089 b/test/core/http/response_corpus/e5c364b205855a2991ce07482aebb2a3a6147089 new file mode 100644 index 00000000000..98b5f62b2a0 --- /dev/null +++ b/test/core/http/response_corpus/e5c364b205855a2991ce07482aebb2a3a6147089 @@ -0,0 +1,2 @@ +TTHP‰/1.200 OKH +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/ee2077e08c3cfccd9bd82adb574ac4fc7d429afb b/test/core/http/response_corpus/ee2077e08c3cfccd9bd82adb574ac4fc7d429afb new file mode 100644 index 00000000000..78b36c913ba --- /dev/null +++ b/test/core/http/response_corpus/ee2077e08c3cfccd9bd82adb574ac4fc7d429afb @@ -0,0 +1,2 @@ +ITHTTTPHT/12 …2S HTKP/1.1 767) OKH +tes \ No newline at end of file diff --git a/test/core/http/response_corpus/fc5d4b9117ba9e87388174aee4f4970bdfe8d066 b/test/core/http/response_corpus/fc5d4b9117ba9e87388174aee4f4970bdfe8d066 new file mode 100644 index 00000000000..06f1a3b8002 --- /dev/null +++ b/test/core/http/response_corpus/fc5d4b9117ba9e87388174aee4f4970bdfe8d066 @@ -0,0 +1 @@ +HH \ No newline at end of file diff --git a/test/core/http/response_corpus/fdeb2c7daa9e7704f67e141106384e6dd0042c0b b/test/core/http/response_corpus/fdeb2c7daa9e7704f67e141106384e6dd0042c0b new file mode 100644 index 00000000000..eb63d31fa51 --- /dev/null +++ b/test/core/http/response_corpus/fdeb2c7daa9e7704f67e141106384e6dd0042c0b @@ -0,0 +1,2 @@ +ITTP/11 …20O HTTP/1.1 200 OKH +HT DP/01021 : OesHK ,H diff --git a/test/core/http/response_corpus/request1.txt b/test/core/http/response_corpus/request1.txt new file mode 100644 index 00000000000..16a750fbf9b --- /dev/null +++ b/test/core/http/response_corpus/request1.txt @@ -0,0 +1,3 @@ +GET / HTTP/1.0 + + diff --git a/test/core/http/response_corpus/request2.txt b/test/core/http/response_corpus/request2.txt new file mode 100644 index 00000000000..897a28406ca --- /dev/null +++ b/test/core/http/response_corpus/request2.txt @@ -0,0 +1,3 @@ +GET / HTTP/1.0 +Content-Length: 128 + diff --git a/test/core/http/response_corpus/request3.txt b/test/core/http/response_corpus/request3.txt new file mode 100644 index 00000000000..aaa75bbb52a --- /dev/null +++ b/test/core/http/response_corpus/request3.txt @@ -0,0 +1,3 @@ +GET / HTTP/1.1 +Content-Length: 128 + diff --git a/test/core/http/response_corpus/request4.txt b/test/core/http/response_corpus/request4.txt new file mode 100644 index 00000000000..593f6fa7b67 --- /dev/null +++ b/test/core/http/response_corpus/request4.txt @@ -0,0 +1,3 @@ +GET /foo.bar HTTP/1.1 +Content-Length: 128 + diff --git a/test/core/http/response_corpus/request5.txt b/test/core/http/response_corpus/request5.txt new file mode 100644 index 00000000000..19fb2443552 --- /dev/null +++ b/test/core/http/response_corpus/request5.txt @@ -0,0 +1,3 @@ +POST / HTTP/1.0 + +asdlfkjadsfl;akdjsfasdf diff --git a/test/core/http/response_corpus/response1.txt b/test/core/http/response_corpus/response1.txt new file mode 100644 index 00000000000..a17139982e7 --- /dev/null +++ b/test/core/http/response_corpus/response1.txt @@ -0,0 +1,4 @@ +HTTP/1.1 200 OK +test: hello + +abcd diff --git a/test/core/http/response_corpus/response2.txt b/test/core/http/response_corpus/response2.txt new file mode 100644 index 00000000000..1b86449bb6f --- /dev/null +++ b/test/core/http/response_corpus/response2.txt @@ -0,0 +1,4 @@ +HTTP/0.9 200 OK +test: hello + +abcd diff --git a/test/core/http/response_corpus/response3.txt b/test/core/http/response_corpus/response3.txt new file mode 100644 index 00000000000..9e5b046c594 --- /dev/null +++ b/test/core/http/response_corpus/response3.txt @@ -0,0 +1,5 @@ +HTTP/0.9 200 OK +test: hello +content-length: 102384398 + +abcd diff --git a/test/core/http/response_corpus/response4.txt b/test/core/http/response_corpus/response4.txt new file mode 100644 index 00000000000..b237b01fe0e --- /dev/null +++ b/test/core/http/response_corpus/response4.txt @@ -0,0 +1,2 @@ +HTTP/1.1 404 Not Found + diff --git a/test/core/http/response_corpus/response5.txt b/test/core/http/response_corpus/response5.txt new file mode 100644 index 00000000000..26305957130 --- /dev/null +++ b/test/core/http/response_corpus/response5.txt @@ -0,0 +1,5 @@ +HTTP/0.9 200 OK +test: hello +content-length: 4 + +abcd diff --git a/test/core/http/response_corpus/response6.txt b/test/core/http/response_corpus/response6.txt new file mode 100644 index 00000000000..797b6ee7735 --- /dev/null +++ b/test/core/http/response_corpus/response6.txt @@ -0,0 +1,5 @@ +HTTP/0.9 200 OK +test: hello +content-length: 6 + +abcd diff --git a/test/core/http/response_corpus/toolong.txt b/test/core/http/response_corpus/toolong.txt new file mode 100644 index 00000000000..9a9d5e2fc3f --- /dev/null +++ b/test/core/http/response_corpus/toolong.txt @@ -0,0 +1,2 @@ +GET / HTTP/1.1 +aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb diff --git a/test/core/http/response_fuzzer.c b/test/core/http/response_fuzzer.c new file mode 100644 index 00000000000..c453e1d667b --- /dev/null +++ b/test/core/http/response_fuzzer.c @@ -0,0 +1,53 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include + +#include + +#include "src/core/lib/http/parser.h" + +int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { + grpc_http_parser parser; + grpc_http_response response; + memset(&response, 0, sizeof(response)); + grpc_http_parser_init(&parser, GRPC_HTTP_RESPONSE, &response); + gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size); + GRPC_ERROR_UNREF(grpc_http_parser_parse(&parser, slice)); + GRPC_ERROR_UNREF(grpc_http_parser_eof(&parser)); + gpr_slice_unref(slice); + grpc_http_parser_destroy(&parser); + grpc_http_response_destroy(&response); + return 0; +} diff --git a/test/core/internal_api_canaries/iomgr.c b/test/core/internal_api_canaries/iomgr.c index f87a80cd90c..84ff8ff5563 100644 --- a/test/core/internal_api_canaries/iomgr.c +++ b/test/core/internal_api_canaries/iomgr.c @@ -54,7 +54,7 @@ static void test_code(void) { grpc_closure closure; closure.cb = NULL; closure.cb_arg = NULL; - closure.final_data = 0; + closure.next_data.scratch = 0; grpc_closure_list closure_list = GRPC_CLOSURE_LIST_INIT; closure_list.head = NULL; @@ -65,15 +65,14 @@ static void test_code(void) { grpc_closure_create(NULL, NULL); grpc_closure_list_move(NULL, NULL); - grpc_closure_list_add(NULL, NULL, true); - bool x = grpc_closure_list_empty(closure_list); - grpc_closure_next(&closure); + grpc_closure_list_append(NULL, NULL, GRPC_ERROR_CREATE("Foo")); + grpc_closure_list_empty(closure_list); /* exec_ctx.h */ grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_exec_ctx_flush(&exec_ctx); grpc_exec_ctx_finish(&exec_ctx); - grpc_exec_ctx_enqueue(&exec_ctx, &closure, x, NULL); + grpc_exec_ctx_push(&exec_ctx, &closure, GRPC_ERROR_CREATE("Foo"), NULL); grpc_exec_ctx_enqueue_list(&exec_ctx, &closure_list, NULL); /* endpoint.h */ @@ -95,7 +94,7 @@ static void test_code(void) { /* executor.h */ grpc_executor_init(); - grpc_executor_enqueue(&closure, x); + grpc_executor_push(&closure, GRPC_ERROR_CREATE("Phi")); grpc_executor_shutdown(); /* pollset.h */ diff --git a/test/core/iomgr/endpoint_pair_test.c b/test/core/iomgr/endpoint_pair_test.c index 0df94a878f0..99b86b62134 100644 --- a/test/core/iomgr/endpoint_pair_test.c +++ b/test/core/iomgr/endpoint_pair_test.c @@ -64,7 +64,8 @@ static grpc_endpoint_test_config configs[] = { {"tcp/tcp_socketpair", create_fixture_endpoint_pair, clean_up}, }; -static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) { +static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, + grpc_error *error) { grpc_pollset_destroy(p); } diff --git a/test/core/iomgr/fd_posix_test.c b/test/core/iomgr/fd_posix_test.c index f97f33712eb..02a7b341dee 100644 --- a/test/core/iomgr/fd_posix_test.c +++ b/test/core/iomgr/fd_posix_test.c @@ -133,14 +133,14 @@ static void session_shutdown_cb(grpc_exec_ctx *exec_ctx, void *arg, /*session */ /* Called when data become readable in a session. */ static void session_read_cb(grpc_exec_ctx *exec_ctx, void *arg, /*session */ - bool success) { + grpc_error *error) { session *se = arg; int fd = grpc_fd_wrapped_fd(se->em_fd); ssize_t read_once = 0; ssize_t read_total = 0; - if (!success) { + if (error != GRPC_ERROR_NONE) { session_shutdown_cb(exec_ctx, arg, 1); return; } @@ -191,7 +191,7 @@ static void listen_shutdown_cb(grpc_exec_ctx *exec_ctx, void *arg /*server */, /* Called when a new TCP connection request arrives in the listening port. */ static void listen_cb(grpc_exec_ctx *exec_ctx, void *arg, /*=sv_arg*/ - bool success) { + grpc_error *error) { server *sv = arg; int fd; int flags; @@ -200,7 +200,7 @@ static void listen_cb(grpc_exec_ctx *exec_ctx, void *arg, /*=sv_arg*/ socklen_t slen = sizeof(ss); grpc_fd *listen_em_fd = sv->em_fd; - if (!success) { + if (error != GRPC_ERROR_NONE) { listen_shutdown_cb(exec_ctx, arg, 1); return; } @@ -305,12 +305,12 @@ static void client_session_shutdown_cb(grpc_exec_ctx *exec_ctx, /* Write as much as possible, then register notify_on_write. */ static void client_session_write(grpc_exec_ctx *exec_ctx, void *arg, /*client */ - bool success) { + grpc_error *error) { client *cl = arg; int fd = grpc_fd_wrapped_fd(cl->em_fd); ssize_t write_once = 0; - if (!success) { + if (error != GRPC_ERROR_NONE) { gpr_mu_lock(g_mu); client_session_shutdown_cb(exec_ctx, arg, 1); gpr_mu_unlock(g_mu); @@ -363,7 +363,7 @@ static void client_start(grpc_exec_ctx *exec_ctx, client *cl, int port) { cl->em_fd = grpc_fd_create(fd, "client"); grpc_pollset_add_fd(exec_ctx, g_pollset, cl->em_fd); - client_session_write(exec_ctx, cl, 1); + client_session_write(exec_ctx, cl, GRPC_ERROR_NONE); } /* Wait for the signal to shutdown a client. */ @@ -411,7 +411,8 @@ void init_change_data(fd_change_data *fdc) { fdc->cb_that_ran = NULL; } void destroy_change_data(fd_change_data *fdc) {} static void first_read_callback(grpc_exec_ctx *exec_ctx, - void *arg /* fd_change_data */, bool success) { + void *arg /* fd_change_data */, + grpc_error *error) { fd_change_data *fdc = arg; gpr_mu_lock(g_mu); @@ -421,7 +422,8 @@ static void first_read_callback(grpc_exec_ctx *exec_ctx, } static void second_read_callback(grpc_exec_ctx *exec_ctx, - void *arg /* fd_change_data */, bool success) { + void *arg /* fd_change_data */, + grpc_error *error) { fd_change_data *fdc = arg; gpr_mu_lock(g_mu); @@ -514,7 +516,8 @@ static void test_grpc_fd_change(void) { close(sv[1]); } -static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) { +static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, + grpc_error *error) { grpc_pollset_destroy(p); } diff --git a/test/core/iomgr/resolve_address_test.c b/test/core/iomgr/resolve_address_test.c index c3ede1801df..023d7e6c686 100644 --- a/test/core/iomgr/resolve_address_test.c +++ b/test/core/iomgr/resolve_address_test.c @@ -42,54 +42,74 @@ static gpr_timespec test_deadline(void) { return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(100); } -static void must_succeed(grpc_exec_ctx *exec_ctx, void *evp, - grpc_resolved_addresses *p) { - GPR_ASSERT(p); - GPR_ASSERT(p->naddrs >= 1); - grpc_resolved_addresses_destroy(p); - gpr_event_set(evp, (void *)1); +typedef struct args_struct { + gpr_event ev; + grpc_resolved_addresses *addrs; +} args_struct; + +void args_init(args_struct *args) { + gpr_event_init(&args->ev); + args->addrs = NULL; +} + +void args_finish(args_struct *args) { + GPR_ASSERT(gpr_event_wait(&args->ev, test_deadline())); + grpc_resolved_addresses_destroy(args->addrs); +} + +static void must_succeed(grpc_exec_ctx *exec_ctx, void *argsp, + grpc_error *err) { + args_struct *args = argsp; + GPR_ASSERT(err == GRPC_ERROR_NONE); + GPR_ASSERT(args->addrs != NULL); + GPR_ASSERT(args->addrs->naddrs > 1); + gpr_event_set(&args->ev, (void *)1); } -static void must_fail(grpc_exec_ctx *exec_ctx, void *evp, - grpc_resolved_addresses *p) { - GPR_ASSERT(!p); - gpr_event_set(evp, (void *)1); +static void must_fail(grpc_exec_ctx *exec_ctx, void *argsp, grpc_error *err) { + args_struct *args = argsp; + GPR_ASSERT(err != GRPC_ERROR_NONE); + gpr_event_set(&args->ev, (void *)1); } static void test_localhost(void) { - gpr_event ev; - gpr_event_init(&ev); + args_struct args; + args_init(&args); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resolve_address(&exec_ctx, "localhost:1", NULL, must_succeed, &ev); + grpc_resolve_address(&exec_ctx, "localhost:1", NULL, + grpc_closure_create(must_succeed, &args), &args.addrs); grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(gpr_event_wait(&ev, test_deadline())); + args_finish(&args); } static void test_default_port(void) { - gpr_event ev; - gpr_event_init(&ev); + args_struct args; + args_init(&args); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resolve_address(&exec_ctx, "localhost", "1", must_succeed, &ev); + grpc_resolve_address(&exec_ctx, "localhost", "1", + grpc_closure_create(must_succeed, &args), &args.addrs); grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(gpr_event_wait(&ev, test_deadline())); + args_finish(&args); } static void test_missing_default_port(void) { - gpr_event ev; - gpr_event_init(&ev); + args_struct args; + args_init(&args); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resolve_address(&exec_ctx, "localhost", NULL, must_fail, &ev); + grpc_resolve_address(&exec_ctx, "localhost", NULL, + grpc_closure_create(must_fail, &args), &args.addrs); grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(gpr_event_wait(&ev, test_deadline())); + args_finish(&args); } static void test_ipv6_with_port(void) { - gpr_event ev; - gpr_event_init(&ev); + args_struct args; + args_init(&args); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resolve_address(&exec_ctx, "[2001:db8::1]:1", NULL, must_succeed, &ev); + grpc_resolve_address(&exec_ctx, "[2001:db8::1]:1", NULL, + grpc_closure_create(must_succeed, &args), &args.addrs); grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(gpr_event_wait(&ev, test_deadline())); + args_finish(&args); } static void test_ipv6_without_port(void) { @@ -98,12 +118,13 @@ static void test_ipv6_without_port(void) { }; unsigned i; for (i = 0; i < sizeof(kCases) / sizeof(*kCases); i++) { - gpr_event ev; - gpr_event_init(&ev); + args_struct args; + args_init(&args); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resolve_address(&exec_ctx, kCases[i], "80", must_succeed, &ev); + grpc_resolve_address(&exec_ctx, kCases[i], "80", + grpc_closure_create(must_succeed, &args), &args.addrs); grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(gpr_event_wait(&ev, test_deadline())); + args_finish(&args); } } @@ -113,12 +134,13 @@ static void test_invalid_ip_addresses(void) { }; unsigned i; for (i = 0; i < sizeof(kCases) / sizeof(*kCases); i++) { - gpr_event ev; - gpr_event_init(&ev); + args_struct args; + args_init(&args); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resolve_address(&exec_ctx, kCases[i], NULL, must_fail, &ev); + grpc_resolve_address(&exec_ctx, kCases[i], NULL, + grpc_closure_create(must_fail, &args), &args.addrs); grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(gpr_event_wait(&ev, test_deadline())); + args_finish(&args); } } @@ -128,12 +150,13 @@ static void test_unparseable_hostports(void) { }; unsigned i; for (i = 0; i < sizeof(kCases) / sizeof(*kCases); i++) { - gpr_event ev; - gpr_event_init(&ev); + args_struct args; + args_init(&args); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_resolve_address(&exec_ctx, kCases[i], "1", must_fail, &ev); + grpc_resolve_address(&exec_ctx, kCases[i], "1", + grpc_closure_create(must_fail, &args), &args.addrs); grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(gpr_event_wait(&ev, test_deadline())); + args_finish(&args); } } diff --git a/test/core/iomgr/tcp_client_posix_test.c b/test/core/iomgr/tcp_client_posix_test.c index 22dc9366c33..d1c57ca7699 100644 --- a/test/core/iomgr/tcp_client_posix_test.c +++ b/test/core/iomgr/tcp_client_posix_test.c @@ -67,18 +67,19 @@ static void finish_connection() { gpr_mu_unlock(g_mu); } -static void must_succeed(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void must_succeed(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { GPR_ASSERT(g_connecting != NULL); - GPR_ASSERT(success); + GPR_ASSERT(error == GRPC_ERROR_NONE); grpc_endpoint_shutdown(exec_ctx, g_connecting); grpc_endpoint_destroy(exec_ctx, g_connecting); g_connecting = NULL; finish_connection(); } -static void must_fail(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void must_fail(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { GPR_ASSERT(g_connecting == NULL); - GPR_ASSERT(!success); + GPR_ASSERT(error != GRPC_ERROR_NONE); finish_connection(); } @@ -179,7 +180,8 @@ void test_fails(void) { grpc_exec_ctx_finish(&exec_ctx); } -static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) { +static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, + grpc_error *error) { grpc_pollset_destroy(p); } diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index 7a98fa0e506..6b21f0dc274 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -139,12 +139,13 @@ static size_t count_slices(gpr_slice *slices, size_t nslices, return num_bytes; } -static void read_cb(grpc_exec_ctx *exec_ctx, void *user_data, bool success) { +static void read_cb(grpc_exec_ctx *exec_ctx, void *user_data, + grpc_error *error) { struct read_socket_state *state = (struct read_socket_state *)user_data; size_t read_bytes; int current_data; - GPR_ASSERT(success); + GPR_ASSERT(error == GRPC_ERROR_NONE); gpr_mu_lock(g_mu); current_data = state->read_bytes % 256; @@ -281,7 +282,8 @@ static gpr_slice *allocate_blocks(size_t num_bytes, size_t slice_size, } static void write_done(grpc_exec_ctx *exec_ctx, - void *user_data /* write_socket_state */, bool success) { + void *user_data /* write_socket_state */, + grpc_error *error) { struct write_socket_state *state = (struct write_socket_state *)user_data; gpr_log(GPR_INFO, "Write done callback called"); gpr_mu_lock(g_mu); @@ -384,7 +386,7 @@ static void write_test(size_t num_bytes, size_t slice_size) { grpc_exec_ctx_finish(&exec_ctx); } -void on_fd_released(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +void on_fd_released(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *errors) { int *done = arg; *done = 1; grpc_pollset_kick(g_pollset, NULL); @@ -504,7 +506,8 @@ static grpc_endpoint_test_config configs[] = { {"tcp/tcp_socketpair", create_fixture_tcp_socketpair, clean_up}, }; -static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) { +static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, + grpc_error *error) { grpc_pollset_destroy(p); } diff --git a/test/core/iomgr/tcp_server_posix_test.c b/test/core/iomgr/tcp_server_posix_test.c index 266d2396afd..00ec175c8fe 100644 --- a/test/core/iomgr/tcp_server_posix_test.c +++ b/test/core/iomgr/tcp_server_posix_test.c @@ -90,7 +90,7 @@ static void on_connect_result_set(on_connect_result *result, } static void server_weak_ref_shutdown(grpc_exec_ctx *exec_ctx, void *arg, - bool success) { + grpc_error *error) { server_weak_ref *weak_ref = arg; weak_ref->server = NULL; } @@ -126,14 +126,16 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, static void test_no_op(void) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_tcp_server *s = grpc_tcp_server_create(NULL); + grpc_tcp_server *s; + GPR_ASSERT(GRPC_ERROR_NONE == grpc_tcp_server_create(NULL, &s)); grpc_tcp_server_unref(&exec_ctx, s); grpc_exec_ctx_finish(&exec_ctx); } static void test_no_op_with_start(void) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_tcp_server *s = grpc_tcp_server_create(NULL); + grpc_tcp_server *s; + GPR_ASSERT(GRPC_ERROR_NONE == grpc_tcp_server_create(NULL, &s)); LOG_TEST("test_no_op_with_start"); grpc_tcp_server_start(&exec_ctx, s, NULL, 0, on_connect, NULL); grpc_tcp_server_unref(&exec_ctx, s); @@ -143,13 +145,16 @@ static void test_no_op_with_start(void) { static void test_no_op_with_port(void) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; struct sockaddr_in addr; - grpc_tcp_server *s = grpc_tcp_server_create(NULL); + grpc_tcp_server *s; + GPR_ASSERT(GRPC_ERROR_NONE == grpc_tcp_server_create(NULL, &s)); LOG_TEST("test_no_op_with_port"); memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; - GPR_ASSERT( - grpc_tcp_server_add_port(s, (struct sockaddr *)&addr, sizeof(addr)) > 0); + int port; + GPR_ASSERT(grpc_tcp_server_add_port(s, (struct sockaddr *)&addr, sizeof(addr), + &port) == GRPC_ERROR_NONE && + port > 0); grpc_tcp_server_unref(&exec_ctx, s); grpc_exec_ctx_finish(&exec_ctx); @@ -158,13 +163,16 @@ static void test_no_op_with_port(void) { static void test_no_op_with_port_and_start(void) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; struct sockaddr_in addr; - grpc_tcp_server *s = grpc_tcp_server_create(NULL); + grpc_tcp_server *s; + GPR_ASSERT(GRPC_ERROR_NONE == grpc_tcp_server_create(NULL, &s)); LOG_TEST("test_no_op_with_port_and_start"); + int port; memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; - GPR_ASSERT( - grpc_tcp_server_add_port(s, (struct sockaddr *)&addr, sizeof(addr)) > 0); + GPR_ASSERT(grpc_tcp_server_add_port(s, (struct sockaddr *)&addr, sizeof(addr), + &port) == GRPC_ERROR_NONE && + port > 0); grpc_tcp_server_start(&exec_ctx, s, NULL, 0, on_connect, NULL); @@ -213,7 +221,8 @@ static void test_connect(unsigned n) { int svr_port; unsigned svr1_fd_count; int svr1_port; - grpc_tcp_server *s = grpc_tcp_server_create(NULL); + grpc_tcp_server *s; + GPR_ASSERT(GRPC_ERROR_NONE == grpc_tcp_server_create(NULL, &s)); unsigned i; server_weak_ref weak_ref; server_weak_ref_init(&weak_ref); @@ -222,14 +231,17 @@ static void test_connect(unsigned n) { memset(&addr, 0, sizeof(addr)); memset(&addr1, 0, sizeof(addr1)); addr.ss_family = addr1.ss_family = AF_INET; - svr_port = grpc_tcp_server_add_port(s, (struct sockaddr *)&addr, addr_len); + GPR_ASSERT(GRPC_ERROR_NONE == + grpc_tcp_server_add_port(s, (struct sockaddr *)&addr, addr_len, + &svr_port)); GPR_ASSERT(svr_port > 0); /* Cannot use wildcard (port==0), because add_port() will try to reuse the same port as a previous add_port(). */ svr1_port = grpc_pick_unused_port_or_die(); grpc_sockaddr_set_port((struct sockaddr *)&addr1, svr1_port); - GPR_ASSERT(grpc_tcp_server_add_port(s, (struct sockaddr *)&addr1, addr_len) == - svr1_port); + GPR_ASSERT(grpc_tcp_server_add_port(s, (struct sockaddr *)&addr1, addr_len, + &svr_port) == GRPC_ERROR_NONE && + svr_port == svr1_port); /* Bad port_index. */ GPR_ASSERT(grpc_tcp_server_port_fd_count(s, 2) == 0); @@ -305,7 +317,8 @@ static void test_connect(unsigned n) { grpc_exec_ctx_finish(&exec_ctx); } -static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) { +static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, + grpc_error *error) { grpc_pollset_destroy(p); } diff --git a/test/core/iomgr/timer_list_test.c b/test/core/iomgr/timer_list_test.c index 2e0f5c87019..be8988ab752 100644 --- a/test/core/iomgr/timer_list_test.c +++ b/test/core/iomgr/timer_list_test.c @@ -42,8 +42,8 @@ static int cb_called[MAX_CB][2]; -static void cb(grpc_exec_ctx *exec_ctx, void *arg, bool success) { - cb_called[(intptr_t)arg][success]++; +static void cb(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { + cb_called[(intptr_t)arg][error == GRPC_ERROR_NONE]++; } static void add_test(void) { diff --git a/test/core/iomgr/workqueue_test.c b/test/core/iomgr/workqueue_test.c index 874e696fc2f..2818e55b453 100644 --- a/test/core/iomgr/workqueue_test.c +++ b/test/core/iomgr/workqueue_test.c @@ -42,8 +42,8 @@ static gpr_mu *g_mu; static grpc_pollset *g_pollset; -static void must_succeed(grpc_exec_ctx *exec_ctx, void *p, bool success) { - GPR_ASSERT(success == 1); +static void must_succeed(grpc_exec_ctx *exec_ctx, void *p, grpc_error *error) { + GPR_ASSERT(error == GRPC_ERROR_NONE); gpr_mu_lock(g_mu); *(int *)p = 1; grpc_pollset_kick(g_pollset, NULL); @@ -68,7 +68,7 @@ static void test_add_closure(void) { grpc_pollset_worker *worker = NULL; grpc_closure_init(&c, must_succeed, &done); - grpc_workqueue_push(wq, &c, 1); + grpc_workqueue_push(wq, &c, GRPC_ERROR_NONE); grpc_workqueue_add_to_pollset(&exec_ctx, wq, g_pollset); gpr_mu_lock(g_mu); @@ -92,7 +92,7 @@ static void test_flush(void) { grpc_pollset_worker *worker = NULL; grpc_closure_init(&c, must_succeed, &done); - grpc_exec_ctx_enqueue(&exec_ctx, &c, true, NULL); + grpc_exec_ctx_push(&exec_ctx, &c, GRPC_ERROR_NONE, NULL); grpc_workqueue_flush(&exec_ctx, wq); grpc_workqueue_add_to_pollset(&exec_ctx, wq, g_pollset); @@ -108,7 +108,8 @@ static void test_flush(void) { grpc_exec_ctx_finish(&exec_ctx); } -static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) { +static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, + grpc_error *error) { grpc_pollset_destroy(p); } diff --git a/test/core/security/credentials_test.c b/test/core/security/credentials_test.c index 31e06372b93..eaa3563bec9 100644 --- a/test/core/security/credentials_test.c +++ b/test/core/security/credentials_test.c @@ -549,37 +549,37 @@ static void validate_compute_engine_http_request( static int compute_engine_httpcli_get_success_override( grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request, - gpr_timespec deadline, grpc_httpcli_response_cb on_response, - void *user_data) { - grpc_httpcli_response response = - http_response(200, valid_oauth2_json_response); + gpr_timespec deadline, grpc_closure *on_done, + grpc_httpcli_response *response) { validate_compute_engine_http_request(request); - on_response(exec_ctx, user_data, &response); + *response = http_response(200, valid_oauth2_json_response); + grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } static int compute_engine_httpcli_get_failure_override( grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request, - gpr_timespec deadline, grpc_httpcli_response_cb on_response, - void *user_data) { - grpc_httpcli_response response = http_response(403, "Not Authorized."); + gpr_timespec deadline, grpc_closure *on_done, + grpc_httpcli_response *response) { validate_compute_engine_http_request(request); - on_response(exec_ctx, user_data, &response); + *response = http_response(403, "Not Authorized."); + grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } static int httpcli_post_should_not_be_called( grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request, const char *body_bytes, size_t body_size, gpr_timespec deadline, - grpc_httpcli_response_cb on_response, void *user_data) { + grpc_closure *on_done, grpc_httpcli_response *response) { GPR_ASSERT("HTTP POST should not be called" == NULL); return 1; } -static int httpcli_get_should_not_be_called( - grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request, - gpr_timespec deadline, grpc_httpcli_response_cb on_response, - void *user_data) { +static int httpcli_get_should_not_be_called(grpc_exec_ctx *exec_ctx, + const grpc_httpcli_request *request, + gpr_timespec deadline, + grpc_closure *on_done, + grpc_httpcli_response *response) { GPR_ASSERT("HTTP GET should not be called" == NULL); return 1; } @@ -653,21 +653,20 @@ static void validate_refresh_token_http_request( static int refresh_token_httpcli_post_success( grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request, const char *body, size_t body_size, gpr_timespec deadline, - grpc_httpcli_response_cb on_response, void *user_data) { - grpc_httpcli_response response = - http_response(200, valid_oauth2_json_response); + grpc_closure *on_done, grpc_httpcli_response *response) { validate_refresh_token_http_request(request, body, body_size); - on_response(exec_ctx, user_data, &response); + *response = http_response(200, valid_oauth2_json_response); + grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } static int refresh_token_httpcli_post_failure( grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request, const char *body, size_t body_size, gpr_timespec deadline, - grpc_httpcli_response_cb on_response, void *user_data) { - grpc_httpcli_response response = http_response(403, "Not Authorized."); + grpc_closure *on_done, grpc_httpcli_response *response) { validate_refresh_token_http_request(request, body, body_size); - on_response(exec_ctx, user_data, &response); + *response = http_response(403, "Not Authorized."); + grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } @@ -899,17 +898,17 @@ static void test_google_default_creds_refresh_token(void) { static int default_creds_gce_detection_httpcli_get_success_override( grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request, - gpr_timespec deadline, grpc_httpcli_response_cb on_response, - void *user_data) { - grpc_httpcli_response response = http_response(200, ""); + gpr_timespec deadline, grpc_closure *on_done, + grpc_httpcli_response *response) { + *response = http_response(200, ""); grpc_http_header header; header.key = "Metadata-Flavor"; header.value = "Google"; - response.hdr_count = 1; - response.hdrs = &header; + response->hdr_count = 1; + response->hdrs = &header; GPR_ASSERT(strcmp(request->http.path, "/") == 0); GPR_ASSERT(strcmp(request->host, "metadata.google.internal") == 0); - on_response(exec_ctx, user_data, &response); + grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } @@ -961,13 +960,13 @@ static void test_google_default_creds_gce(void) { static int default_creds_gce_detection_httpcli_get_failure_override( grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request, - gpr_timespec deadline, grpc_httpcli_response_cb on_response, - void *user_data) { + gpr_timespec deadline, grpc_closure *on_done, + grpc_httpcli_response *response) { /* No magic header. */ - grpc_httpcli_response response = http_response(200, ""); GPR_ASSERT(strcmp(request->http.path, "/") == 0); GPR_ASSERT(strcmp(request->host, "metadata.google.internal") == 0); - on_response(exec_ctx, user_data, &response); + *response = http_response(200, ""); + grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } diff --git a/test/core/security/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c index 50bf25171c9..79a69278be4 100644 --- a/test/core/security/jwt_verifier_test.c +++ b/test/core/security/jwt_verifier_test.c @@ -43,8 +43,8 @@ #include #include "src/core/lib/http/httpcli.h" -#include "src/core/lib/security/util/b64.h" #include "src/core/lib/security/credentials/jwt/json_token.h" +#include "src/core/lib/security/util/b64.h" #include "test/core/util/test_config.h" /* This JSON key was generated with the GCE console and revoked immediately. @@ -278,24 +278,23 @@ static grpc_httpcli_response http_response(int status, char *body) { static int httpcli_post_should_not_be_called( grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request, const char *body_bytes, size_t body_size, gpr_timespec deadline, - grpc_httpcli_response_cb on_response, void *user_data) { + grpc_closure *on_done, grpc_httpcli_response *response) { GPR_ASSERT("HTTP POST should not be called" == NULL); return 1; } static int httpcli_get_google_keys_for_email( grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request, - gpr_timespec deadline, grpc_httpcli_response_cb on_response, - void *user_data) { - grpc_httpcli_response response = http_response(200, good_google_email_keys()); + gpr_timespec deadline, grpc_closure *on_done, + grpc_httpcli_response *response) { + *response = http_response(200, good_google_email_keys()); GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl); GPR_ASSERT(strcmp(request->host, "www.googleapis.com") == 0); GPR_ASSERT(strcmp(request->http.path, "/robot/v1/metadata/x509/" "777-abaslkan11hlb6nmim3bpspl31ud@developer." "gserviceaccount.com") == 0); - on_response(exec_ctx, user_data, &response); - gpr_free(response.body); + grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } @@ -333,14 +332,13 @@ static void test_jwt_verifier_google_email_issuer_success(void) { static int httpcli_get_custom_keys_for_email( grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request, - gpr_timespec deadline, grpc_httpcli_response_cb on_response, - void *user_data) { - grpc_httpcli_response response = http_response(200, gpr_strdup(good_jwk_set)); + gpr_timespec deadline, grpc_closure *on_done, + grpc_httpcli_response *response) { + *response = http_response(200, gpr_strdup(good_jwk_set)); GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl); GPR_ASSERT(strcmp(request->host, "keys.bar.com") == 0); GPR_ASSERT(strcmp(request->http.path, "/jwk/foo@bar.com") == 0); - on_response(exec_ctx, user_data, &response); - gpr_free(response.body); + grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } @@ -368,32 +366,28 @@ static void test_jwt_verifier_custom_email_issuer_success(void) { static int httpcli_get_jwk_set(grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request, - gpr_timespec deadline, - grpc_httpcli_response_cb on_response, - void *user_data) { - grpc_httpcli_response response = http_response(200, gpr_strdup(good_jwk_set)); + gpr_timespec deadline, grpc_closure *on_done, + grpc_httpcli_response *response) { + *response = http_response(200, gpr_strdup(good_jwk_set)); GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl); GPR_ASSERT(strcmp(request->host, "www.googleapis.com") == 0); GPR_ASSERT(strcmp(request->http.path, "/oauth2/v3/certs") == 0); - on_response(exec_ctx, user_data, &response); - gpr_free(response.body); + grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } static int httpcli_get_openid_config(grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request, gpr_timespec deadline, - grpc_httpcli_response_cb on_response, - void *user_data) { - grpc_httpcli_response response = - http_response(200, gpr_strdup(good_openid_config)); + grpc_closure *on_done, + grpc_httpcli_response *response) { + *response = http_response(200, gpr_strdup(good_openid_config)); GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl); GPR_ASSERT(strcmp(request->host, "accounts.google.com") == 0); GPR_ASSERT(strcmp(request->http.path, GRPC_OPENID_CONFIG_URL_SUFFIX) == 0); grpc_httpcli_set_override(httpcli_get_jwk_set, httpcli_post_should_not_be_called); - on_response(exec_ctx, user_data, &response); - gpr_free(response.body); + grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } @@ -429,14 +423,11 @@ static void on_verification_key_retrieval_error(void *user_data, static int httpcli_get_bad_json(grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request, - gpr_timespec deadline, - grpc_httpcli_response_cb on_response, - void *user_data) { - grpc_httpcli_response response = - http_response(200, gpr_strdup("{\"bad\": \"stuff\"}")); + gpr_timespec deadline, grpc_closure *on_done, + grpc_httpcli_response *response) { + *response = http_response(200, gpr_strdup("{\"bad\": \"stuff\"}")); GPR_ASSERT(request->handshaker == &grpc_httpcli_ssl); - on_response(exec_ctx, user_data, &response); - gpr_free(response.body); + grpc_exec_ctx_push(exec_ctx, on_done, GRPC_ERROR_NONE, NULL); return 1; } @@ -535,10 +526,11 @@ static void test_jwt_verifier_bad_signature(void) { grpc_exec_ctx_finish(&exec_ctx); } -static int httpcli_get_should_not_be_called( - grpc_exec_ctx *exec_ctx, const grpc_httpcli_request *request, - gpr_timespec deadline, grpc_httpcli_response_cb on_response, - void *user_data) { +static int httpcli_get_should_not_be_called(grpc_exec_ctx *exec_ctx, + const grpc_httpcli_request *request, + gpr_timespec deadline, + grpc_closure *on_done, + grpc_httpcli_response *response) { GPR_ASSERT(0); return 1; } diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c index 10a5e5224ef..1b7036cf9ea 100644 --- a/test/core/security/print_google_default_creds_token.c +++ b/test/core/security/print_google_default_creds_token.c @@ -42,8 +42,8 @@ #include #include -#include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/composite/composite_credentials.h" +#include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/support/string.h" typedef struct { diff --git a/test/core/security/secure_endpoint_test.c b/test/core/security/secure_endpoint_test.c index 6aba21a98c2..1d2bf73bb1d 100644 --- a/test/core/security/secure_endpoint_test.c +++ b/test/core/security/secure_endpoint_test.c @@ -139,7 +139,8 @@ static grpc_endpoint_test_config configs[] = { secure_endpoint_create_fixture_tcp_socketpair_leftover, clean_up}, }; -static void inc_call_ctr(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void inc_call_ctr(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { ++*(int *)arg; } @@ -172,7 +173,8 @@ static void test_leftover(grpc_endpoint_test_config config, size_t slice_size) { clean_up(); } -static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) { +static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, + grpc_error *error) { grpc_pollset_destroy(p); } diff --git a/test/core/surface/completion_queue_test.c b/test/core/surface/completion_queue_test.c index d62d5a93b17..10087780efc 100644 --- a/test/core/surface/completion_queue_test.c +++ b/test/core/surface/completion_queue_test.c @@ -90,8 +90,8 @@ static void test_cq_end_op(void) { cc = grpc_completion_queue_create(NULL); grpc_cq_begin_op(cc, tag); - grpc_cq_end_op(&exec_ctx, cc, tag, 1, do_nothing_end_completion, NULL, - &completion); + grpc_cq_end_op(&exec_ctx, cc, tag, GRPC_ERROR_NONE, do_nothing_end_completion, + NULL, &completion); ev = grpc_completion_queue_next(cc, gpr_inf_past(GPR_CLOCK_REALTIME), NULL); GPR_ASSERT(ev.type == GRPC_OP_COMPLETE); @@ -149,8 +149,8 @@ static void test_pluck(void) { for (i = 0; i < GPR_ARRAY_SIZE(tags); i++) { grpc_cq_begin_op(cc, tags[i]); - grpc_cq_end_op(&exec_ctx, cc, tags[i], 1, do_nothing_end_completion, NULL, - &completions[i]); + grpc_cq_end_op(&exec_ctx, cc, tags[i], GRPC_ERROR_NONE, + do_nothing_end_completion, NULL, &completions[i]); } for (i = 0; i < GPR_ARRAY_SIZE(tags); i++) { @@ -161,8 +161,8 @@ static void test_pluck(void) { for (i = 0; i < GPR_ARRAY_SIZE(tags); i++) { grpc_cq_begin_op(cc, tags[i]); - grpc_cq_end_op(&exec_ctx, cc, tags[i], 1, do_nothing_end_completion, NULL, - &completions[i]); + grpc_cq_end_op(&exec_ctx, cc, tags[i], GRPC_ERROR_NONE, + do_nothing_end_completion, NULL, &completions[i]); } for (i = 0; i < GPR_ARRAY_SIZE(tags); i++) { @@ -234,8 +234,8 @@ static void test_too_many_plucks(void) { for (i = 0; i < GPR_ARRAY_SIZE(tags); i++) { grpc_cq_begin_op(cc, tags[i]); - grpc_cq_end_op(&exec_ctx, cc, tags[i], 1, do_nothing_end_completion, NULL, - &completions[i]); + grpc_cq_end_op(&exec_ctx, cc, tags[i], GRPC_ERROR_NONE, + do_nothing_end_completion, NULL, &completions[i]); } for (i = 0; i < GPR_ARRAY_SIZE(tags); i++) { @@ -288,8 +288,9 @@ static void producer_thread(void *arg) { gpr_log(GPR_INFO, "producer %d phase 2", opt->id); for (i = 0; i < TEST_THREAD_EVENTS; i++) { - grpc_cq_end_op(&exec_ctx, opt->cc, (void *)(intptr_t)1, 1, free_completion, - NULL, gpr_malloc(sizeof(grpc_cq_completion))); + grpc_cq_end_op(&exec_ctx, opt->cc, (void *)(intptr_t)1, GRPC_ERROR_NONE, + free_completion, NULL, + gpr_malloc(sizeof(grpc_cq_completion))); opt->events_triggered++; grpc_exec_ctx_finish(&exec_ctx); } diff --git a/test/core/surface/concurrent_connectivity_test.c b/test/core/surface/concurrent_connectivity_test.c index 28ddf58cc84..4bafd358037 100644 --- a/test/core/surface/concurrent_connectivity_test.c +++ b/test/core/surface/concurrent_connectivity_test.c @@ -111,10 +111,13 @@ void bad_server_thread(void *vargs) { struct sockaddr_storage addr; socklen_t addr_len = sizeof(addr); int port; - grpc_tcp_server *s = grpc_tcp_server_create(NULL); + grpc_tcp_server *s; + grpc_error *error = grpc_tcp_server_create(NULL, &s); + GPR_ASSERT(error == GRPC_ERROR_NONE); memset(&addr, 0, sizeof(addr)); addr.ss_family = AF_INET; - port = grpc_tcp_server_add_port(s, (struct sockaddr *)&addr, addr_len); + error = + grpc_tcp_server_add_port(s, (struct sockaddr *)&addr, addr_len, &port); GPR_ASSERT(port > 0); gpr_asprintf(&args->addr, "localhost:%d", port); @@ -143,7 +146,7 @@ void bad_server_thread(void *vargs) { } static void done_pollset_shutdown(grpc_exec_ctx *exec_ctx, void *pollset, - bool success) { + grpc_error *error) { grpc_pollset_destroy(pollset); gpr_free(pollset); } diff --git a/test/core/surface/lame_client_test.c b/test/core/surface/lame_client_test.c index 12fa9de6cf3..68f75bc2ab7 100644 --- a/test/core/surface/lame_client_test.c +++ b/test/core/surface/lame_client_test.c @@ -47,13 +47,14 @@ grpc_closure transport_op_cb; static void *tag(intptr_t x) { return (void *)x; } -void verify_connectivity(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +void verify_connectivity(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { grpc_transport_op *op = arg; GPR_ASSERT(GRPC_CHANNEL_FATAL_FAILURE == *op->connectivity_state); - GPR_ASSERT(success); + GPR_ASSERT(error == GRPC_ERROR_NONE); } -void do_nothing(grpc_exec_ctx *exec_ctx, void *arg, bool success) {} +void do_nothing(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {} void test_transport_op(grpc_channel *channel) { grpc_transport_op op; diff --git a/test/core/transport/connectivity_state_test.c b/test/core/transport/connectivity_state_test.c index 6bb7c3b06ba..0b7a7013b3c 100644 --- a/test/core/transport/connectivity_state_test.c +++ b/test/core/transport/connectivity_state_test.c @@ -43,14 +43,15 @@ int g_counter; -static void must_succeed(grpc_exec_ctx *exec_ctx, void *arg, bool success) { - GPR_ASSERT(success); +static void must_succeed(grpc_exec_ctx *exec_ctx, void *arg, + grpc_error *error) { + GPR_ASSERT(error == GRPC_ERROR_NONE); GPR_ASSERT(arg == THE_ARG); g_counter++; } -static void must_fail(grpc_exec_ctx *exec_ctx, void *arg, bool success) { - GPR_ASSERT(!success); +static void must_fail(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { + GPR_ASSERT(error != GRPC_ERROR_NONE); GPR_ASSERT(arg == THE_ARG); g_counter++; } @@ -74,9 +75,12 @@ static void test_connectivity_state_name(void) { static void test_check(void) { grpc_connectivity_state_tracker tracker; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_error *error; gpr_log(GPR_DEBUG, "test_check"); grpc_connectivity_state_init(&tracker, GRPC_CHANNEL_IDLE, "xxx"); - GPR_ASSERT(grpc_connectivity_state_check(&tracker) == GRPC_CHANNEL_IDLE); + GPR_ASSERT(grpc_connectivity_state_check(&tracker, &error) == + GRPC_CHANNEL_IDLE); + GPR_ASSERT(error == GRPC_ERROR_NONE); grpc_connectivity_state_destroy(&exec_ctx, &tracker); grpc_exec_ctx_finish(&exec_ctx); } diff --git a/test/core/util/test_tcp_server.c b/test/core/util/test_tcp_server.c index e39a95712c9..fc89c41907f 100644 --- a/test/core/util/test_tcp_server.c +++ b/test/core/util/test_tcp_server.c @@ -46,7 +46,7 @@ #include "test/core/util/port.h" static void on_server_destroyed(grpc_exec_ctx *exec_ctx, void *data, - bool success) { + grpc_error *error) { test_tcp_server *server = data; server->shutdown = 1; } @@ -72,9 +72,12 @@ void test_tcp_server_start(test_tcp_server *server, int port) { addr.sin_port = htons((uint16_t)port); memset(&addr.sin_addr, 0, sizeof(addr.sin_addr)); - server->tcp_server = grpc_tcp_server_create(&server->shutdown_complete); - port_added = - grpc_tcp_server_add_port(server->tcp_server, &addr, sizeof(addr)); + grpc_error *error = + grpc_tcp_server_create(&server->shutdown_complete, &server->tcp_server); + GPR_ASSERT(error == GRPC_ERROR_NONE); + error = grpc_tcp_server_add_port(server->tcp_server, &addr, sizeof(addr), + &port_added); + GPR_ASSERT(error == GRPC_ERROR_NONE); GPR_ASSERT(port_added == port); grpc_tcp_server_start(&exec_ctx, server->tcp_server, &server->pollset, 1, @@ -97,7 +100,7 @@ void test_tcp_server_poll(test_tcp_server *server, int seconds) { grpc_exec_ctx_finish(&exec_ctx); } -static void do_nothing(grpc_exec_ctx *exec_ctx, void *arg, bool success) {} +static void do_nothing(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) {} void test_tcp_server_destroy(test_tcp_server *server) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; diff --git a/tools/fuzzer/runners/http_fuzzer_test.sh b/tools/fuzzer/runners/http_request_fuzzer_test.sh similarity index 95% rename from tools/fuzzer/runners/http_fuzzer_test.sh rename to tools/fuzzer/runners/http_request_fuzzer_test.sh index d8dde1491e7..250a761ac81 100644 --- a/tools/fuzzer/runners/http_fuzzer_test.sh +++ b/tools/fuzzer/runners/http_request_fuzzer_test.sh @@ -42,4 +42,4 @@ then flags="-use_traces=1 $flags" fi -bins/$config/http_fuzzer_test $flags fuzzer_output test/core/http/corpus +bins/$config/http_request_fuzzer_test $flags fuzzer_output test/core/http/corpus diff --git a/tools/fuzzer/runners/http_response_fuzzer_test.sh b/tools/fuzzer/runners/http_response_fuzzer_test.sh new file mode 100644 index 00000000000..f747739ae29 --- /dev/null +++ b/tools/fuzzer/runners/http_response_fuzzer_test.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# + +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/http_response_fuzzer_test $flags fuzzer_output test/core/http/corpus diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 143f78f4685..e57bb0be6cc 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -987,9 +987,9 @@ ], "headers": [], "language": "c", - "name": "http_fuzzer_test", + "name": "http_parser_test", "src": [ - "test/core/http/fuzzer.c" + "test/core/http/parser_test.c" ], "third_party": false, "type": "target" @@ -1003,9 +1003,25 @@ ], "headers": [], "language": "c", - "name": "http_parser_test", + "name": "http_request_fuzzer_test", "src": [ - "test/core/http/parser_test.c" + "test/core/http/request_fuzzer.c" + ], + "third_party": false, + "type": "target" + }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "http_response_fuzzer_test", + "src": [ + "test/core/http/response_fuzzer.c" ], "third_party": false, "type": "target" @@ -4006,9 +4022,26 @@ ], "headers": [], "language": "c", - "name": "http_fuzzer_test_one_entry", + "name": "http_request_fuzzer_test_one_entry", + "src": [ + "test/core/http/request_fuzzer.c", + "test/core/util/one_corpus_entry_fuzzer.c" + ], + "third_party": false, + "type": "target" + }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "http_response_fuzzer_test_one_entry", "src": [ - "test/core/http/fuzzer.c", + "test/core/http/response_fuzzer.c", "test/core/util/one_corpus_entry_fuzzer.c" ], "third_party": false, diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index cf1154426f4..20cd1d030c6 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -45581,1142 +45581,6 @@ "linux" ] }, - { - "args": [ - "test/core/http/corpus/0299ca2580e4398d170c4a336e0c33eb2cd9d427" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/05e613853d64a9669ea3cf41b0de777dc24931ba" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/069352518a1d1baa05f317c677d275cefda2ac97" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/0925527c9358b1e10ec0f0387cd99f35204d9a34" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/0c5b7c2569410b526605e308309a7f36574e530d" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/0ef3d0a84360bb5ad66274f1226f5cb273ecdbcf" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/1e1273f90187fdf5df3625764245610f86af6aa4" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/1fbc57d118f3733287e9a9d808bb8947b3260e55" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/24756c396bc72894fd720092bb6f9c03e66b469f" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/276def41311933421ae7a9ee42e906c85b6a4d3f" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/29daa75432381937fd005cb25e314e328de6e9f9" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/2a75204bc492084ad853682f8de3fb137d5907bc" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/2d34ba249b755a880525cf53c665633a5e359305" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/33f4ea0c7ea27c37d8f95cfa64d282370efdafd2" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/35554617ea6418bd43161fe9a2c337ed82d7ec5b" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/35f0c561297cfc840ddaeebb9fc61091f4eadece" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/3787bcc22ef645e665cc5f722b8a633af86de9cf" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/3953688866ccb3b4f371f1a858570d6afdb6452d" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/39b19c41ba537f37511eff7727733715db432e76" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/3e3c4756d5e40b5aa250954cbac86b826e70a7ac" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/3f03265921120c6ffa61b944e213e062a5538d4b" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/3fb034e66ee5494a67acae1b4e6ff64ba92a2046" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/466059ed07a0d55d6ad5e522c7d367cbf278eaf9" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/487725eb38511c79a9340bf4560a1411061fa6fa" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/48b9b205cae8ac21512a3f26f49fd53e21ee13c5" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/4b1f1f79a0bfa3f942479dd5f8edb59a7c257c55" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/5028c56a5116a186b7343ff59567b47347a0796d" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/533f62b3f495ce704babf3ee8d840f196a714dff" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/5892cbb284771fc9761caae37b19cd6e27dbc104" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/5aeab6e4f7c2a1c09d4ac0dbdb3beac4893607ee" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/5b6292bdf009b0daecbc90b85cca30a88c36eec5" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/5c1659b77678b41faa4fa13df7772dae3238d1c0" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/5c81f61621e29ec9c6a64ac3af9b3b216141618e" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/657368df512ca6294b9df16adf935a3f374a8be2" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/7fc4520094902ce2c760d70eaad5b674d2817337" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/81f59a12b458ec3604035cb962165c604d1355e6" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/8f41c50e88ee8c17ecad3d41d63d38fb12aca0b9" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/97c16de7fe3c390a2e6c09ff5c28f17d5c67542c" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/97e4499d450c95660de86747f527e670f2012548" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/9a996857196e0998a1278994a9bab3d35526e7f1" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/9b7e00049ec356ecd84b1747e4e1941140139ae8" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/9f0c38ec455cc363369b3674a2d32bc21c206de1" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/a1dc7bc235e46eb21d91084d7b52d5ff9f45df85" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/aa3bbb876eafa8ad8ca4ff2eabc6dd94341d2441" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/ae8ba95d7dbe99926a8f5bfd80347fd6a4b616a0" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/b04fea5c041c707db0ad9c09a81672557b52cc47" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/c4acff8aa2ff886f35439f72625d05002990c940" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/c55ce9995b002e88a102ae2891a71e8bacb346c8" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/ca5a0c00b8969310acb73d15ad0d0c602f1bd0c2" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/cce734f1b263de6994f7950e0df7bf0c81449f70" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/d39c8ee11a697634a09b309460c0bbd967e7effa" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/d4c3e4cf5d035596433c30eaabbd2b2925f4b453" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/d51f7fcc089f269c7afecaaca51966bab5fde629" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/d936dad71c129cf659097dc3db64550c4dd467f4" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/e275b0466a8fb8d9e0e15856e343ddc7112ae66b" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/e5c364b205855a2991ce07482aebb2a3a6147089" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/ee2077e08c3cfccd9bd82adb574ac4fc7d429afb" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/fc5d4b9117ba9e87388174aee4f4970bdfe8d066" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/fdeb2c7daa9e7704f67e141106384e6dd0042c0b" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/request1.txt" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/request2.txt" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/request3.txt" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/request4.txt" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/request5.txt" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/response1.txt" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/response2.txt" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/response3.txt" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/response4.txt" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/response5.txt" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/response6.txt" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "test/core/http/corpus/toolong.txt" - ], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "http_fuzzer_test_one_entry", - "platforms": [ - "linux" - ] - }, { "args": [ "test/core/json/corpus/006d552e952c42b5340baaeb85c2cb80c81e78dd" From cf239e73093e0c9afe457b2b4b0fe45eae514b6f Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 6 May 2016 14:48:21 -0700 Subject: [PATCH 0343/1894] Add a default handler to Ruby services that returns UNIMPLEMENTED --- src/ruby/lib/grpc/generic/rpc_server.rb | 6 +-- src/ruby/lib/grpc/generic/service.rb | 16 ++---- src/ruby/spec/generic/rpc_server_spec.rb | 23 ++++++-- src/ruby/spec/generic/service_spec.rb | 69 ------------------------ 4 files changed, 24 insertions(+), 90 deletions(-) diff --git a/src/ruby/lib/grpc/generic/rpc_server.rb b/src/ruby/lib/grpc/generic/rpc_server.rb index a0f4071adc8..60a89572511 100644 --- a/src/ruby/lib/grpc/generic/rpc_server.rb +++ b/src/ruby/lib/grpc/generic/rpc_server.rb @@ -503,10 +503,8 @@ module GRPC unless cls.include?(GenericService) fail "#{cls} must 'include GenericService'" end - if cls.rpc_descs.size.zero? - fail "#{cls} should specify some rpc descriptions" - end - cls.assert_rpc_descs_have_methods + fail "#{cls} should specify some rpc descriptions" if + cls.rpc_descs.size.zero? end # This should be called while holding @run_mutex diff --git a/src/ruby/lib/grpc/generic/service.rb b/src/ruby/lib/grpc/generic/service.rb index 8e940b5b13e..0a166e823e4 100644 --- a/src/ruby/lib/grpc/generic/service.rb +++ b/src/ruby/lib/grpc/generic/service.rb @@ -110,6 +110,9 @@ module GRPC rpc_descs[name] = RpcDesc.new(name, input, output, marshal_class_method, unmarshal_class_method) + define_method(name) do + fail GRPC::BadStatus, GRPC::Core::StatusCodes::UNIMPLEMENTED + end end def inherited(subclass) @@ -199,19 +202,6 @@ module GRPC end end end - - # Asserts that the appropriate methods are defined for each added rpc - # spec. Is intended to aid verifying that server classes are correctly - # implemented. - def assert_rpc_descs_have_methods - rpc_descs.each_pair do |m, spec| - mth_name = GenericService.underscore(m.to_s).to_sym - unless instance_methods.include?(mth_name) - fail "#{self} does not provide instance method '#{mth_name}'" - end - spec.assert_arity_matches(instance_method(mth_name)) - end - end end def self.included(o) diff --git a/src/ruby/spec/generic/rpc_server_spec.rb b/src/ruby/spec/generic/rpc_server_spec.rb index e688057cb17..2a42736237d 100644 --- a/src/ruby/spec/generic/rpc_server_spec.rb +++ b/src/ruby/spec/generic/rpc_server_spec.rb @@ -308,10 +308,6 @@ describe GRPC::RpcServer do expect { @srv.handle(EmptyService) }.to raise_error end - it 'raises if the service does not define its rpc methods' do - expect { @srv.handle(NoRpcImplementation) }.to raise_error - end - it 'raises if a handler method is already registered' do @srv.handle(EchoService) expect { r.handle(EchoService) }.to raise_error @@ -349,6 +345,25 @@ describe GRPC::RpcServer do t.join end + it 'should return UNIMPLEMENTED on unimplemented methods', server: true do + @srv.handle(NoRpcImplementation) + t = Thread.new { @srv.run } + @srv.wait_till_running + req = EchoMsg.new + blk = proc do + cq = GRPC::Core::CompletionQueue.new + stub = GRPC::ClientStub.new(@host, cq, :this_channel_is_insecure, + **client_opts) + stub.request_response('/an_rpc', req, marshal, unmarshal) + end + expect(&blk).to raise_error do |error| + expect(error).to be_a(GRPC::BadStatus) + expect(error.code).to be(GRPC::Core::StatusCodes::UNIMPLEMENTED) + end + @srv.stop + t.join + end + it 'should handle multiple sequential requests', server: true do @srv.handle(EchoService) t = Thread.new { @srv.run } diff --git a/src/ruby/spec/generic/service_spec.rb b/src/ruby/spec/generic/service_spec.rb index 5e7b6c7abaf..76034e4f747 100644 --- a/src/ruby/spec/generic/service_spec.rb +++ b/src/ruby/spec/generic/service_spec.rb @@ -273,73 +273,4 @@ describe GenericService do end end end - - describe '#assert_rpc_descs_have_methods' do - it 'fails if there is no instance method for an rpc descriptor' do - c1 = Class.new do - include GenericService - rpc :AnRpc, GoodMsg, GoodMsg - end - expect { c1.assert_rpc_descs_have_methods }.to raise_error - - c2 = Class.new do - include GenericService - rpc :AnRpc, GoodMsg, GoodMsg - rpc :AnotherRpc, GoodMsg, GoodMsg - - def an_rpc - end - end - expect { c2.assert_rpc_descs_have_methods }.to raise_error - end - - it 'passes if there are corresponding methods for each descriptor' do - c = Class.new do - include GenericService - rpc :AnRpc, GoodMsg, GoodMsg - rpc :AServerStreamer, GoodMsg, stream(GoodMsg) - rpc :AClientStreamer, stream(GoodMsg), GoodMsg - rpc :ABidiStreamer, stream(GoodMsg), stream(GoodMsg) - - def an_rpc(_req, _call) - end - - def a_server_streamer(_req, _call) - end - - def a_client_streamer(_call) - end - - def a_bidi_streamer(_call) - end - end - expect { c.assert_rpc_descs_have_methods }.to_not raise_error - end - - it 'passes for subclasses of that include GenericService' do - base = Class.new do - include GenericService - rpc :AnRpc, GoodMsg, GoodMsg - - def an_rpc(_req, _call) - end - end - c = Class.new(base) - expect { c.assert_rpc_descs_have_methods }.to_not raise_error - expect(c.include?(GenericService)).to be(true) - end - - it 'passes if subclasses define the rpc methods' do - base = Class.new do - include GenericService - rpc :AnRpc, GoodMsg, GoodMsg - end - c = Class.new(base) do - def an_rpc(_req, _call) - end - end - expect { c.assert_rpc_descs_have_methods }.to_not raise_error - expect(c.include?(GenericService)).to be(true) - end - end end From ed4c3f17dd4fce0fa0cf6c310295e4ae5dff729b Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 6 May 2016 15:39:08 -0700 Subject: [PATCH 0344/1894] disable some C# scenarios --- .../run_tests/performance/scenario_config.py | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index 8b239951498..746945b617d 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -265,16 +265,18 @@ class CSharpLanguage: use_unconstrained_client=True, categories=[SMOKETEST]) - yield _ping_pong_scenario( - 'csharp_protobuf_async_streaming_qps_unconstrained', rpc_type='STREAMING', - client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', - use_unconstrained_client=True) + # TODO(jtattermusch): scenario works locally but fails on jenkins + #yield _ping_pong_scenario( + # 'csharp_protobuf_async_streaming_qps_unconstrained', rpc_type='STREAMING', + # client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + # use_unconstrained_client=True) - yield _ping_pong_scenario( - 'csharp_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY', - client_type='SYNC_CLIENT', server_type='SYNC_SERVER', - server_language='c++', server_core_limit=1, async_server_threads=1, - categories=[SMOKETEST]) + # TODO(jtattermusch): scenario works locally but fails on jenkins + #yield _ping_pong_scenario( + # 'csharp_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY', + # client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + # server_language='c++', server_core_limit=1, async_server_threads=1, + # categories=[SMOKETEST]) yield _ping_pong_scenario( 'csharp_to_cpp_protobuf_async_streaming_ping_pong', rpc_type='STREAMING', From 80384bd2e389b38f594f74055051e46d62509bf3 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 6 May 2016 16:12:31 -0700 Subject: [PATCH 0345/1894] Progress converting to new error system --- .../server/secure/server_secure_chttp2.c | 14 +++- src/core/lib/iomgr/error.c | 20 ++++-- src/core/lib/iomgr/error.h | 12 ++++ src/core/lib/iomgr/tcp_client_posix.c | 4 +- src/core/lib/iomgr/tcp_server_posix.c | 65 +++++++++++-------- 5 files changed, 76 insertions(+), 39 deletions(-) diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 8cee95aa933..fdd1040d89e 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -188,9 +188,13 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, if (creds == NULL) goto error; status = grpc_server_credentials_create_security_connector(creds, &sc); if (status != GRPC_SECURITY_OK) { - gpr_log(GPR_ERROR, - "Unable to create secure server with credentials of type %s.", - creds->type); + char *msg; + gpr_asprintf(&msg, + "Unable to create secure server with credentials of type %s.", + creds->type); + err = grpc_error_set_int(GRPC_ERROR_CREATE(msg), + GRPC_ERROR_INT_SECURITY_STATUS, status); + gpr_free(msg); goto error; } sc->channel_args = grpc_server_get_channel_args(server); @@ -278,5 +282,9 @@ error: } } grpc_exec_ctx_finish(&exec_ctx); + const char *msg = grpc_error_string(err); + GRPC_ERROR_UNREF(err); + gpr_log(GPR_ERROR, "%s", msg); + grpc_error_free_string(msg); return 0; } diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index a55f02d8f63..d5587a41946 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -108,6 +108,8 @@ static const char *error_int_name(grpc_error_ints key) { return "tsi_code"; case GRPC_ERROR_INT_SECURITY_STATUS: return "security_status"; + case GRPC_ERROR_INT_FD: + return "fd"; } GPR_UNREACHABLE_CODE(return "unknown"); } @@ -158,7 +160,8 @@ static bool is_special(grpc_error *err) { grpc_error *grpc_error_ref(grpc_error *err, const char *file, int line) { if (is_special(err)) return err; - gpr_log(GPR_DEBUG, "%p: %d -> %d [%s:%d]", err, err->refs.count, err->refs.count + 1, file, line); + gpr_log(GPR_DEBUG, "%p: %d -> %d [%s:%d]", err, err->refs.count, + err->refs.count + 1, file, line); gpr_ref(&err->refs); return err; } @@ -174,7 +177,8 @@ static void error_destroy(grpc_error *err) { void grpc_error_unref(grpc_error *err, const char *file, int line) { if (is_special(err)) return; - gpr_log(GPR_DEBUG, "%p: %d -> %d [%s:%d]", err, err->refs.count, err->refs.count - 1, file, line); + gpr_log(GPR_DEBUG, "%p: %d -> %d [%s:%d]", err, err->refs.count, + err->refs.count - 1, file, line); if (gpr_unref(&err->refs)) { error_destroy(err); } @@ -197,8 +201,8 @@ grpc_error *grpc_error_create(const char *file, int line, const char *desc, err->errs = gpr_avl_create(&avl_vtable_errs); for (size_t i = 0; i < num_referencing; i++) { if (referencing[i] == GRPC_ERROR_NONE) continue; - err->errs = - gpr_avl_add(err->errs, (void *)(err->next_err++), GRPC_ERROR_REF(referencing[i])); + err->errs = gpr_avl_add(err->errs, (void *)(err->next_err++), + GRPC_ERROR_REF(referencing[i])); } err->times = gpr_avl_add(gpr_avl_create(&avl_vtable_times), (void *)(uintptr_t)GRPC_ERROR_TIME_CREATED, @@ -240,7 +244,8 @@ const intptr_t *grpc_error_get_int(grpc_error *err, grpc_error_ints which) { grpc_error *grpc_error_set_str(grpc_error *src, grpc_error_strs which, const char *value) { grpc_error *new = copy_error_and_unref(src); - new->strs = gpr_avl_add(new->strs, (void *)(uintptr_t)which, (void *)value); + new->strs = + gpr_avl_add(new->strs, (void *)(uintptr_t)which, gpr_strdup(value)); return new; } @@ -350,7 +355,6 @@ static void append_esc_str(const char *str, char **s, size_t *sz, size_t *cap) { } } append_chr('"', s, sz, cap); - append_chr(0, s, sz, cap); } static char *fmt_str(void *p) { @@ -358,6 +362,7 @@ static char *fmt_str(void *p) { size_t sz = 0; size_t cap = 0; append_esc_str(p, &s, &sz, &cap); + append_chr(0, &s, &sz, &cap); return s; } @@ -399,6 +404,7 @@ static char *errs_string(grpc_error *err) { append_chr('[', &s, &sz, &cap); add_errs(err->errs.root, &s, &sz, &cap); append_chr(']', &s, &sz, &cap); + append_chr(0, &s, &sz, &cap); return s; } @@ -415,6 +421,7 @@ static const char *finish_kvs(kv_pairs *kvs) { append_chr('{', &s, &sz, &cap); for (size_t i = 0; i < kvs->num_kvs; i++) { + if (i != 0) append_chr(',', &s, &sz, &cap); append_esc_str(kvs->kvs[i].key, &s, &sz, &cap); gpr_free(kvs->kvs[i].key); append_chr(':', &s, &sz, &cap); @@ -422,6 +429,7 @@ static const char *finish_kvs(kv_pairs *kvs) { gpr_free(kvs->kvs[i].value); } append_chr('}', &s, &sz, &cap); + append_chr(0, &s, &sz, &cap); gpr_free(kvs->kvs); return s; diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index 9e10d0b8438..98661a6a2cd 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -38,6 +38,17 @@ #include +// Opaque representation of an error. +// Errors are refcounted objects that represent the result of an operation. +// Ownership laws: +// if a grpc_error is returned by a function, the caller owns a ref to that +// instance +// if a grpc_error is passed to a grpc_closure callback function (functions +// with the signature: +// void (*f)(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error)) +// then those functions do not automatically own a ref to error +// if a grpc_error is passed to *ANY OTHER FUNCTION* then that function takes +// ownership of the error typedef struct grpc_error grpc_error; typedef enum { @@ -53,6 +64,7 @@ typedef enum { GRPC_ERROR_INT_HTTP2_ERROR, GRPC_ERROR_INT_TSI_CODE, GRPC_ERROR_INT_SECURITY_STATUS, + GRPC_ERROR_INT_FD, } grpc_error_ints; typedef enum { diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index 04b5b625a13..f5a3fb4aa36 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -74,9 +74,7 @@ typedef struct { static grpc_error *prepare_socket(const struct sockaddr *addr, int fd) { grpc_error *err = GRPC_ERROR_NONE; - if (fd < 0) { - goto error; - } + GPR_ASSERT(fd >= 0); if (!grpc_set_socket_nonblocking(fd, 1) || !grpc_set_socket_cloexec(fd, 1) || (!grpc_is_unix_socket(addr) && !grpc_set_socket_low_latency(fd, 1)) || diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 17e5e1bbfab..3276cb4ba31 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -263,23 +263,26 @@ static int get_max_accept_queue_size(void) { } /* Prepare a recently-created socket for listening. */ -static int prepare_socket(int fd, const struct sockaddr *addr, - size_t addr_len) { +static grpc_error *prepare_socket(int fd, const struct sockaddr *addr, + size_t addr_len, int *port) { struct sockaddr_storage sockname_temp; socklen_t sockname_len; - - if (fd < 0) { - goto error; - } - - if (!grpc_set_socket_nonblocking(fd, 1) || !grpc_set_socket_cloexec(fd, 1) || - (!grpc_is_unix_socket(addr) && (!grpc_set_socket_low_latency(fd, 1) || - !grpc_set_socket_reuse_addr(fd, 1))) || - !grpc_set_socket_no_sigpipe_if_possible(fd)) { - gpr_log(GPR_ERROR, "Unable to configure socket %d: %s", fd, - strerror(errno)); - goto error; + grpc_error *err = GRPC_ERROR_NONE; + + GPR_ASSERT(fd >= 0); + + err = grpc_set_socket_nonblocking(fd, 1); + if (err != GRPC_ERROR_NONE) goto error; + err = grpc_set_socket_cloexec(fd, 1); + if (err != GRPC_ERROR_NONE) goto error; + if (!grpc_is_unix_socket(addr)) { + err = grpc_set_socket_low_latency(fd, 1); + if (err != GRPC_ERROR_NONE) goto error; + err = grpc_set_socket_reuse_addr(fd, 1); + if (err != GRPC_ERROR_NONE) goto error; } + err = grpc_set_socket_no_sigpipe_if_possible(fd); + if (err != GRPC_ERROR_NONE) goto error; GPR_ASSERT(addr_len < ~(socklen_t)0); if (bind(fd, addr, (socklen_t)addr_len) < 0) { @@ -291,22 +294,27 @@ static int prepare_socket(int fd, const struct sockaddr *addr, } if (listen(fd, get_max_accept_queue_size()) < 0) { - gpr_log(GPR_ERROR, "listen: %s", strerror(errno)); + err = GRPC_OS_ERROR(errno, "listen"); goto error; } sockname_len = sizeof(sockname_temp); if (getsockname(fd, (struct sockaddr *)&sockname_temp, &sockname_len) < 0) { + err = GRPC_OS_ERROR(errno, "getsockname"); goto error; } - return grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp); + *port = grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp); + return GRPC_ERROR_NONE; error: + GPR_ASSERT(err == GRPC_ERROR_NONE); if (fd >= 0) { close(fd); } - return -1; + return grpc_error_set_int( + GRPC_ERROR_CREATE_REFERENCING("Unable to configure socket", &err, 1), + GRPC_ERROR_INT_FD, fd); } /* event manager callback when reads are ready */ @@ -380,18 +388,18 @@ error: } } -static grpc_tcp_listener *add_socket_to_server(grpc_tcp_server *s, int fd, - const struct sockaddr *addr, - size_t addr_len, - unsigned port_index, - unsigned fd_index) { +static grpc_error *add_socket_to_server(grpc_tcp_server *s, int fd, + const struct sockaddr *addr, + size_t addr_len, unsigned port_index, + unsigned fd_index, + grpc_tcp_listener **listener) { grpc_tcp_listener *sp = NULL; int port; char *addr_str; char *name; - port = prepare_socket(fd, addr, addr_len); - if (port >= 0) { + grpc_error *err = prepare_socket(fd, addr, addr_len, &port); + if (err == GRPC_ERROR_NONE) { grpc_sockaddr_to_string(&addr_str, (struct sockaddr *)&addr, 1); gpr_asprintf(&name, "tcp-server-listener:%s", addr_str); gpr_mu_lock(&s->mu); @@ -421,7 +429,8 @@ static grpc_tcp_listener *add_socket_to_server(grpc_tcp_server *s, int fd, gpr_free(name); } - return sp; + *listener = sp; + return err; } grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, @@ -481,7 +490,8 @@ grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, addr_len = sizeof(wild6); errs[0] = grpc_create_dualstack_socket(addr, SOCK_STREAM, 0, &dsmode, &fd); if (errs[0] == GRPC_ERROR_NONE) { - sp = add_socket_to_server(s, fd, addr, addr_len, port_index, fd_index); + errs[0] = add_socket_to_server(s, fd, addr, addr_len, port_index, + fd_index, &sp); if (fd >= 0 && dsmode == GRPC_DSMODE_DUALSTACK) { goto done; } @@ -505,7 +515,8 @@ grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, addr_len = sizeof(addr4_copy); } sp2 = sp; - sp = add_socket_to_server(s, fd, addr, addr_len, port_index, fd_index); + errs[1] = + add_socket_to_server(s, fd, addr, addr_len, port_index, fd_index, &sp); if (sp2 != NULL && sp != NULL) { sp2->sibling = sp; sp->is_sibling = 1; From 111c95df790324bac3174b17a620c8d0e439adc2 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Thu, 28 Apr 2016 16:45:30 -0700 Subject: [PATCH 0346/1894] Move podspec to version 0.13 --- gRPC.podspec | 2 +- templates/gRPC.podspec.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gRPC.podspec b/gRPC.podspec index 018306ca643..05ead228de8 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -36,7 +36,7 @@ Pod::Spec.new do |s| s.name = 'gRPC' - version = '0.12.0' + version = '0.13.0' s.version = version s.summary = 'gRPC client library for iOS/OSX' s.homepage = 'http://www.grpc.io' diff --git a/templates/gRPC.podspec.template b/templates/gRPC.podspec.template index a9948a41df4..316208b47bc 100644 --- a/templates/gRPC.podspec.template +++ b/templates/gRPC.podspec.template @@ -54,7 +54,7 @@ %> Pod::Spec.new do |s| s.name = 'gRPC' - version = '0.12.0' + version = '0.13.0' s.version = version s.summary = 'gRPC client library for iOS/OSX' s.homepage = 'http://www.grpc.io' From f58b4f41ff671cd8f38ca524cfedfe454ff72aeb Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Fri, 29 Apr 2016 03:07:23 -0700 Subject: [PATCH 0347/1894] Have Cocoapods read from submodules too, for nanopb --- gRPC.podspec | 3 ++- templates/gRPC.podspec.template | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/gRPC.podspec b/gRPC.podspec index 05ead228de8..20db5ccd285 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -44,7 +44,8 @@ Pod::Spec.new do |s| s.authors = { 'The gRPC contributors' => 'grpc-packages@google.com' } s.source = { :git => 'https://github.com/grpc/grpc.git', - :tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}" } + :tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}", + :submodules => true } s.ios.deployment_target = '7.1' diff --git a/templates/gRPC.podspec.template b/templates/gRPC.podspec.template index 316208b47bc..d822d6c64e7 100644 --- a/templates/gRPC.podspec.template +++ b/templates/gRPC.podspec.template @@ -62,7 +62,8 @@ s.authors = { 'The gRPC contributors' => 'grpc-packages@google.com' } s.source = { :git => 'https://github.com/grpc/grpc.git', - :tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}" } + :tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}", + :submodules => true } s.ios.deployment_target = '7.1' From 4c2056683437bfcd3eed5b76e99a75e8a40e42b4 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Fri, 29 Apr 2016 03:08:10 -0700 Subject: [PATCH 0348/1894] Depend on latest BoringSSL --- gRPC.podspec | 2 +- templates/gRPC.podspec.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gRPC.podspec b/gRPC.podspec index 20db5ccd285..68d0fe480db 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -732,7 +732,7 @@ Pod::Spec.new do |s| ss.requires_arc = false ss.libraries = 'z' - ss.dependency 'BoringSSL', '~> 2.0' + ss.dependency 'BoringSSL', '~> 3.0' # ss.compiler_flags = '-GCC_WARN_INHIBIT_ALL_WARNINGS', '-w' end diff --git a/templates/gRPC.podspec.template b/templates/gRPC.podspec.template index d822d6c64e7..45b923c43e5 100644 --- a/templates/gRPC.podspec.template +++ b/templates/gRPC.podspec.template @@ -98,7 +98,7 @@ ss.requires_arc = false ss.libraries = 'z' - ss.dependency 'BoringSSL', '~> 2.0' + ss.dependency 'BoringSSL', '~> 3.0' # ss.compiler_flags = '-GCC_WARN_INHIBIT_ALL_WARNINGS', '-w' end From f742afccea93fdd4d274175a74805f36b524b951 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Fri, 29 Apr 2016 03:33:37 -0700 Subject: [PATCH 0349/1894] Update BoringSSL podspec version. --- src/objective-c/BoringSSL.podspec | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/objective-c/BoringSSL.podspec b/src/objective-c/BoringSSL.podspec index 4a6df910a75..7d1de807169 100644 --- a/src/objective-c/BoringSSL.podspec +++ b/src/objective-c/BoringSSL.podspec @@ -31,7 +31,7 @@ Pod::Spec.new do |s| s.name = 'BoringSSL' - s.version = '2.0' + s.version = '3.0' s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google’s needs.' # Adapted from the homepage: s.description = <<-DESC @@ -67,7 +67,7 @@ Pod::Spec.new do |s| s.authors = 'Adam Langley', 'David Benjamin', 'Matt Braithwaite' s.source = { :git => 'https://boringssl.googlesource.com/boringssl', - :tag => 'version_for_cocoapods_2.0' } + :tag => 'version_for_cocoapods_3.0' } s.source_files = 'ssl/*.{h,c}', 'ssl/**/*.{h,c}', From f4639d485892341e66ef24521600fb20496c10cf Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Fri, 6 May 2016 16:41:36 -0700 Subject: [PATCH 0350/1894] Move podspec to version 0.14 --- gRPC.podspec | 2 +- templates/gRPC.podspec.template | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/gRPC.podspec b/gRPC.podspec index 68d0fe480db..cfe7e57fb9b 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -36,7 +36,7 @@ Pod::Spec.new do |s| s.name = 'gRPC' - version = '0.13.0' + version = '0.14.0' s.version = version s.summary = 'gRPC client library for iOS/OSX' s.homepage = 'http://www.grpc.io' diff --git a/templates/gRPC.podspec.template b/templates/gRPC.podspec.template index 45b923c43e5..979cb1ef8e8 100644 --- a/templates/gRPC.podspec.template +++ b/templates/gRPC.podspec.template @@ -54,7 +54,7 @@ %> Pod::Spec.new do |s| s.name = 'gRPC' - version = '0.13.0' + version = '0.14.0' s.version = version s.summary = 'gRPC client library for iOS/OSX' s.homepage = 'http://www.grpc.io' From 4f1d0f337b15748d171ec21dddba1f6d80e94778 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 6 May 2016 17:12:37 -0700 Subject: [PATCH 0351/1894] Error reporting progress --- src/core/lib/iomgr/error.c | 10 ++ src/core/lib/iomgr/error.h | 6 + src/core/lib/iomgr/ev_poll_and_epoll_posix.c | 131 ++++++++++++------ src/core/lib/iomgr/ev_posix.c | 16 +-- src/core/lib/iomgr/ev_posix.h | 12 +- src/core/lib/iomgr/pollset.h | 11 +- src/core/lib/iomgr/tcp_client_posix.c | 15 +- src/core/lib/iomgr/wakeup_fd_pipe.c | 22 +-- src/core/lib/iomgr/wakeup_fd_posix.c | 12 +- src/core/lib/iomgr/wakeup_fd_posix.h | 15 +- src/core/lib/iomgr/workqueue.h | 10 +- src/core/lib/iomgr/workqueue_posix.c | 62 ++++++--- .../google_default_credentials.c | 13 +- src/core/lib/surface/completion_queue.c | 38 ++++- test/core/iomgr/endpoint_tests.c | 10 +- test/core/security/oauth2_utils.c | 12 +- 16 files changed, 266 insertions(+), 129 deletions(-) diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index d5587a41946..bc50d6870fb 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -469,3 +469,13 @@ grpc_error *grpc_os_error(const char *file, int line, int err, GRPC_ERROR_STR_OS_ERROR, strerror(err)), GRPC_ERROR_STR_SYSCALL, call_name); } + +bool grpc_log_if_error(const char *what, grpc_error *error, const char *file, + int line) { + if (error == GRPC_ERROR_NONE) return true; + const char *msg = grpc_error_string(error); + gpr_log(file, line, GPR_LOG_SEVERITY_ERROR, "%s: %s", what, msg); + grpc_error_free_string(msg); + GRPC_ERROR_UNREF(error); + return false; +} diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index 98661a6a2cd..2b56aede756 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -34,6 +34,7 @@ #ifndef GRPC_CORE_LIB_IOMGR_ERROR_H #define GRPC_CORE_LIB_IOMGR_ERROR_H +#include #include #include @@ -114,4 +115,9 @@ grpc_error *grpc_os_error(const char *file, int line, int err, #define GRPC_OS_ERROR(err, call_name) \ grpc_os_error(__FILE__, __LINE__, err, call_name) +bool grpc_log_if_error(const char *what, grpc_error *error, const char *file, + int line); +#define GRPC_LOG_IF_ERROR(what, error) \ + grpc_log_if_error((what), (error), __FILE__, __LINE__) + #endif /* GRPC_CORE_LIB_IOMGR_ERROR_H */ diff --git a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c index d11c947df26..288a44103bb 100644 --- a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c +++ b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c @@ -217,9 +217,10 @@ struct grpc_pollset { struct grpc_pollset_vtable { void (*add_fd)(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, struct grpc_fd *fd, int and_unlock_pollset); - void (*maybe_work_and_unlock)(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_pollset_worker *worker, - gpr_timespec deadline, gpr_timespec now); + grpc_error *(*maybe_work_and_unlock)(grpc_exec_ctx *exec_ctx, + grpc_pollset *pollset, + grpc_pollset_worker *worker, + gpr_timespec deadline, gpr_timespec now); void (*finish_shutdown)(grpc_pollset *pollset); void (*destroy)(grpc_pollset *pollset); }; @@ -247,9 +248,9 @@ static int poll_deadline_to_millis_timeout(gpr_timespec deadline, #define GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP 2 /* As per pollset_kick, with an extended set of flags (defined above) -- mostly for fd_posix's use. */ -static void pollset_kick_ext(grpc_pollset *p, - grpc_pollset_worker *specific_worker, - uint32_t flags); +static grpc_error *pollset_kick_ext(grpc_pollset *p, + grpc_pollset_worker *specific_worker, + uint32_t flags) GRPC_MUST_USE_RESULT; /* turn a pollset into a multipoller: platform specific */ typedef void (*platform_become_multipoller_type)(grpc_exec_ctx *exec_ctx, @@ -415,12 +416,13 @@ static bool fd_is_orphaned(grpc_fd *fd) { return (gpr_atm_acq_load(&fd->refst) & 1) == 0; } -static void pollset_kick_locked(grpc_fd_watcher *watcher) { +static grpc_error *pollset_kick_locked(grpc_fd_watcher *watcher) { gpr_mu_lock(&watcher->pollset->mu); GPR_ASSERT(watcher->worker); - pollset_kick_ext(watcher->pollset, watcher->worker, - GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP); + grpc_error *err = pollset_kick_ext(watcher->pollset, watcher->worker, + GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP); gpr_mu_unlock(&watcher->pollset->mu); + return err; } static void maybe_wake_one_watcher_locked(grpc_fd *fd) { @@ -726,10 +728,19 @@ static void push_front_worker(grpc_pollset *p, grpc_pollset_worker *worker) { worker->prev->next = worker->next->prev = worker; } -static void pollset_kick_ext(grpc_pollset *p, - grpc_pollset_worker *specific_worker, - uint32_t flags) { +static void kick_append_error(grpc_error **composite, grpc_error *error) { + if (error == GRPC_ERROR_NONE) return; + if (*composite == GRPC_ERROR_NONE) { + *composite = GRPC_ERROR_CREATE("Kick Failure"); + } + *composite = grpc_error_add_child(*composite, error); +} + +static grpc_error *pollset_kick_ext(grpc_pollset *p, + grpc_pollset_worker *specific_worker, + uint32_t flags) { GPR_TIMER_BEGIN("pollset_kick_ext", 0); + grpc_error *error = GRPC_ERROR_NONE; /* pollset->mu already held */ if (specific_worker != NULL) { @@ -739,7 +750,8 @@ static void pollset_kick_ext(grpc_pollset *p, for (specific_worker = p->root_worker.next; specific_worker != &p->root_worker; specific_worker = specific_worker->next) { - grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd); + kick_append_error( + &error, grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd)); } p->kicked_without_pollers = 1; GPR_TIMER_END("pollset_kick_ext.broadcast", 0); @@ -750,14 +762,16 @@ static void pollset_kick_ext(grpc_pollset *p, specific_worker->reevaluate_polling_on_wakeup = 1; } specific_worker->kicked_specifically = 1; - grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd); + kick_append_error(&error, + grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd)); } else if ((flags & GRPC_POLLSET_CAN_KICK_SELF) != 0) { GPR_TIMER_MARK("kick_yoself", 0); if ((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) != 0) { specific_worker->reevaluate_polling_on_wakeup = 1; } specific_worker->kicked_specifically = 1; - grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd); + kick_append_error(&error, + grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd)); } } else if (gpr_tls_get(&g_current_thread_poller) != (intptr_t)p) { GPR_ASSERT((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) == 0); @@ -778,7 +792,8 @@ static void pollset_kick_ext(grpc_pollset *p, if (specific_worker != NULL) { GPR_TIMER_MARK("finally_kick", 0); push_back_worker(p, specific_worker); - grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd); + kick_append_error( + &error, grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd)); } } else { GPR_TIMER_MARK("kicked_no_pollers", 0); @@ -787,20 +802,21 @@ static void pollset_kick_ext(grpc_pollset *p, } GPR_TIMER_END("pollset_kick_ext", 0); + return error; } -static void pollset_kick(grpc_pollset *p, - grpc_pollset_worker *specific_worker) { - pollset_kick_ext(p, specific_worker, 0); +static grpc_error *pollset_kick(grpc_pollset *p, + grpc_pollset_worker *specific_worker) { + return pollset_kick_ext(p, specific_worker, 0); } /* global state management */ -static void pollset_global_init(void) { +static grpc_error *pollset_global_init(void) { gpr_tls_init(&g_current_thread_poller); gpr_tls_init(&g_current_thread_worker); grpc_wakeup_fd_global_init(); - grpc_wakeup_fd_init(&grpc_global_wakeup_fd); + return grpc_wakeup_fd_init(&grpc_global_wakeup_fd); } static void pollset_global_shutdown(void) { @@ -810,7 +826,9 @@ static void pollset_global_shutdown(void) { grpc_wakeup_fd_global_destroy(); } -static void kick_poller(void) { grpc_wakeup_fd_wakeup(&grpc_global_wakeup_fd); } +static grpc_error *kick_poller(void) { + return grpc_wakeup_fd_wakeup(&grpc_global_wakeup_fd); +} /* main interface */ @@ -876,11 +894,12 @@ static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset) { grpc_exec_ctx_push(exec_ctx, pollset->shutdown_done, GRPC_ERROR_NONE, NULL); } -static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_pollset_worker **worker_hdl, gpr_timespec now, - gpr_timespec deadline) { +static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, + grpc_pollset_worker **worker_hdl, + gpr_timespec now, gpr_timespec deadline) { grpc_pollset_worker worker; *worker_hdl = &worker; + grpc_error *error = GRPC_ERROR_NONE; /* pollset->mu already held */ int added_worker = 0; @@ -896,7 +915,10 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, pollset->local_wakeup_cache = worker.wakeup_fd->next; } else { worker.wakeup_fd = gpr_malloc(sizeof(*worker.wakeup_fd)); - grpc_wakeup_fd_init(&worker.wakeup_fd->fd); + error = grpc_wakeup_fd_init(&worker.wakeup_fd->fd); + if (error != GRPC_ERROR_NONE) { + return error; + } } worker.kicked_specifically = 0; /* If there's work waiting for the pollset to be idle, and the @@ -933,8 +955,8 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, } gpr_tls_set(&g_current_thread_poller, (intptr_t)pollset); GPR_TIMER_BEGIN("maybe_work_and_unlock", 0); - pollset->vtable->maybe_work_and_unlock(exec_ctx, pollset, &worker, - deadline, now); + error = pollset->vtable->maybe_work_and_unlock(exec_ctx, pollset, &worker, + deadline, now); GPR_TIMER_END("maybe_work_and_unlock", 0); locked = 0; gpr_tls_set(&g_current_thread_poller, 0); @@ -955,7 +977,7 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, /* If we're forced to re-evaluate polling (via pollset_kick with GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) then we land here and force a loop */ - if (worker.reevaluate_polling_on_wakeup) { + if (worker.reevaluate_polling_on_wakeup && error == GRPC_ERROR_NONE) { worker.reevaluate_polling_on_wakeup = 0; pollset->kicked_without_pollers = 0; if (queued_work || worker.kicked_specifically) { @@ -996,6 +1018,7 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, } *worker_hdl = NULL; GPR_TIMER_END("pollset_work", 0); + return error; } static void pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, @@ -1156,11 +1179,19 @@ exit: } } -static void basic_pollset_maybe_work_and_unlock(grpc_exec_ctx *exec_ctx, - grpc_pollset *pollset, - grpc_pollset_worker *worker, - gpr_timespec deadline, - gpr_timespec now) { +static void work_combine_error(grpc_error **composite, grpc_error *error) { + if (error == GRPC_ERROR_NONE) return; + if (*composite == GRPC_ERROR_NONE) { + *composite = GRPC_ERROR_CREATE("pollset_work"); + } + *composite = grpc_error_add_child(*composite, error); +} + +static grpc_error *basic_pollset_maybe_work_and_unlock( + grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_pollset_worker *worker, + gpr_timespec deadline, gpr_timespec now) { + grpc_error *error = GRPC_ERROR_NONE; + #define POLLOUT_CHECK (POLLOUT | POLLHUP | POLLERR) #define POLLIN_CHECK (POLLIN | POLLHUP | POLLERR) @@ -1210,7 +1241,7 @@ static void basic_pollset_maybe_work_and_unlock(grpc_exec_ctx *exec_ctx, if (r < 0) { if (errno != EINTR) { - gpr_log(GPR_ERROR, "poll() failed: %s", strerror(errno)); + work_combine_error(&error, GRPC_OS_ERROR(errno, "poll")); } if (fd) { fd_end_poll(exec_ctx, &fd_watcher, 0, 0); @@ -1221,10 +1252,12 @@ static void basic_pollset_maybe_work_and_unlock(grpc_exec_ctx *exec_ctx, } } else { if (pfd[0].revents & POLLIN_CHECK) { - grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); + work_combine_error(&error, + grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd)); } if (pfd[1].revents & POLLIN_CHECK) { - grpc_wakeup_fd_consume_wakeup(&worker->wakeup_fd->fd); + work_combine_error(&error, + grpc_wakeup_fd_consume_wakeup(&worker->wakeup_fd->fd)); } if (nfds > 2) { fd_end_poll(exec_ctx, &fd_watcher, pfd[2].revents & POLLIN_CHECK, @@ -1237,6 +1270,8 @@ static void basic_pollset_maybe_work_and_unlock(grpc_exec_ctx *exec_ctx, if (fd) { GRPC_FD_UNREF(fd, "basicpoll_begin"); } + + return error; } static void basic_pollset_destroy(grpc_pollset *pollset) { @@ -1297,9 +1332,11 @@ exit: } } -static void multipoll_with_poll_pollset_maybe_work_and_unlock( +static grpc_error *multipoll_with_poll_pollset_maybe_work_and_unlock( grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_pollset_worker *worker, gpr_timespec deadline, gpr_timespec now) { + grpc_error *error = GRPC_ERROR_NONE; + #define POLLOUT_CHECK (POLLOUT | POLLHUP | POLLERR) #define POLLIN_CHECK (POLLIN | POLLHUP | POLLERR) @@ -1374,10 +1411,12 @@ static void multipoll_with_poll_pollset_maybe_work_and_unlock( } } else { if (pfds[0].revents & POLLIN_CHECK) { - grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); + work_combine_error(&error, + grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd)); } if (pfds[1].revents & POLLIN_CHECK) { - grpc_wakeup_fd_consume_wakeup(&worker->wakeup_fd->fd); + work_combine_error(&error, + grpc_wakeup_fd_consume_wakeup(&worker->wakeup_fd->fd)); } for (i = 2; i < pfd_count; i++) { if (watchers[i].fd == NULL) { @@ -1391,6 +1430,7 @@ static void multipoll_with_poll_pollset_maybe_work_and_unlock( gpr_free(pfds); gpr_free(watchers); + return error; } static void multipoll_with_poll_pollset_finish_shutdown(grpc_pollset *pollset) { @@ -1934,14 +1974,23 @@ static const grpc_event_engine_vtable vtable = { }; const grpc_event_engine_vtable *grpc_init_poll_and_epoll_posix(void) { + const char *msg; + grpc_error *err = GRPC_ERROR_NONE; #ifdef GPR_LINUX_MULTIPOLL_WITH_EPOLL platform_become_multipoller = epoll_become_multipoller; #else platform_become_multipoller = poll_become_multipoller; #endif fd_global_init(); - pollset_global_init(); + err = pollset_global_init(); + if (err != GRPC_ERROR_NONE) goto error; return &vtable; + +error: + msg = grpc_error_string(err); + gpr_log(GPR_ERROR, "%s", msg); + grpc_error_free_string(msg); + return NULL; } #endif diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index 7df17513520..3b965c8b8cf 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -101,15 +101,15 @@ void grpc_pollset_destroy(grpc_pollset *pollset) { g_event_engine->pollset_destroy(pollset); } -void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_pollset_worker **worker, gpr_timespec now, - gpr_timespec deadline) { - g_event_engine->pollset_work(exec_ctx, pollset, worker, now, deadline); +grpc_error *grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, + grpc_pollset_worker **worker, gpr_timespec now, + gpr_timespec deadline) { + return g_event_engine->pollset_work(exec_ctx, pollset, worker, now, deadline); } -void grpc_pollset_kick(grpc_pollset *pollset, - grpc_pollset_worker *specific_worker) { - g_event_engine->pollset_kick(pollset, specific_worker); +grpc_error *grpc_pollset_kick(grpc_pollset *pollset, + grpc_pollset_worker *specific_worker) { + return g_event_engine->pollset_kick(pollset, specific_worker); } void grpc_pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, @@ -159,6 +159,6 @@ void grpc_pollset_set_del_fd(grpc_exec_ctx *exec_ctx, g_event_engine->pollset_set_del_fd(exec_ctx, pollset_set, fd); } -void grpc_kick_poller(void) { g_event_engine->kick_poller(); } +grpc_error *grpc_kick_poller(void) { return g_event_engine->kick_poller(); } #endif // GPR_POSIX_SOCKET diff --git a/src/core/lib/iomgr/ev_posix.h b/src/core/lib/iomgr/ev_posix.h index 1fa9f5ef2d6..c9f9fd99575 100644 --- a/src/core/lib/iomgr/ev_posix.h +++ b/src/core/lib/iomgr/ev_posix.h @@ -61,11 +61,11 @@ typedef struct grpc_event_engine_vtable { grpc_closure *closure); void (*pollset_reset)(grpc_pollset *pollset); void (*pollset_destroy)(grpc_pollset *pollset); - void (*pollset_work)(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_pollset_worker **worker, gpr_timespec now, - gpr_timespec deadline); - void (*pollset_kick)(grpc_pollset *pollset, - grpc_pollset_worker *specific_worker); + grpc_error *(*pollset_work)(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, + grpc_pollset_worker **worker, gpr_timespec now, + gpr_timespec deadline); + grpc_error *(*pollset_kick)(grpc_pollset *pollset, + grpc_pollset_worker *specific_worker); void (*pollset_add_fd)(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, struct grpc_fd *fd); @@ -88,7 +88,7 @@ typedef struct grpc_event_engine_vtable { void (*pollset_set_del_fd)(grpc_exec_ctx *exec_ctx, grpc_pollset_set *pollset_set, grpc_fd *fd); - void (*kick_poller)(void); + grpc_error *(*kick_poller)(void); void (*shutdown_engine)(void); } grpc_event_engine_vtable; diff --git a/src/core/lib/iomgr/pollset.h b/src/core/lib/iomgr/pollset.h index c40a4748778..8d9edc8406b 100644 --- a/src/core/lib/iomgr/pollset.h +++ b/src/core/lib/iomgr/pollset.h @@ -81,14 +81,15 @@ void grpc_pollset_destroy(grpc_pollset *pollset); May call grpc_closure_list_run on grpc_closure_list, without holding the pollset lock */ -void grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_pollset_worker **worker, gpr_timespec now, - gpr_timespec deadline); +grpc_error *grpc_pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, + grpc_pollset_worker **worker, gpr_timespec now, + gpr_timespec deadline) GRPC_MUST_USE_RESULT; /* Break one polling thread out of polling work for this pollset. If specific_worker is GRPC_POLLSET_KICK_BROADCAST, kick ALL the workers. Otherwise, if specific_worker is non-NULL, then kick that worker. */ -void grpc_pollset_kick(grpc_pollset *pollset, - grpc_pollset_worker *specific_worker); +grpc_error *grpc_pollset_kick(grpc_pollset *pollset, + grpc_pollset_worker *specific_worker) + GRPC_MUST_USE_RESULT; #endif /* GRPC_CORE_LIB_IOMGR_POLLSET_H */ diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index f5a3fb4aa36..c70f11b40a8 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -76,13 +76,16 @@ static grpc_error *prepare_socket(const struct sockaddr *addr, int fd) { GPR_ASSERT(fd >= 0); - if (!grpc_set_socket_nonblocking(fd, 1) || !grpc_set_socket_cloexec(fd, 1) || - (!grpc_is_unix_socket(addr) && !grpc_set_socket_low_latency(fd, 1)) || - !grpc_set_socket_no_sigpipe_if_possible(fd)) { - gpr_log(GPR_ERROR, "Unable to configure socket %d: %s", fd, - strerror(errno)); - goto error; + err = grpc_set_socket_nonblocking(fd, 1); + if (err != GRPC_ERROR_NONE) goto error; + err = grpc_set_socket_cloexec(fd, 1); + if (err != GRPC_ERROR_NONE) goto error; + if (!grpc_is_unix_socket(addr)) { + err = grpc_set_socket_low_latency(fd, 1); + if (err != GRPC_ERROR_NONE) goto error; } + err = grpc_set_socket_no_sigpipe_if_possible(fd); + if (err != GRPC_ERROR_NONE) goto error; goto done; error: diff --git a/src/core/lib/iomgr/wakeup_fd_pipe.c b/src/core/lib/iomgr/wakeup_fd_pipe.c index e9b9a0119f1..4e5dbdcb735 100644 --- a/src/core/lib/iomgr/wakeup_fd_pipe.c +++ b/src/core/lib/iomgr/wakeup_fd_pipe.c @@ -45,7 +45,7 @@ #include "src/core/lib/iomgr/socket_utils_posix.h" -static void pipe_init(grpc_wakeup_fd* fd_info) { +static grpc_error* pipe_init(grpc_wakeup_fd* fd_info) { int pipefd[2]; /* TODO(klempner): Make this nonfatal */ int r = pipe(pipefd); @@ -53,36 +53,40 @@ static void pipe_init(grpc_wakeup_fd* fd_info) { gpr_log(GPR_ERROR, "pipe creation failed (%d): %s", errno, strerror(errno)); abort(); } - GPR_ASSERT(grpc_set_socket_nonblocking(pipefd[0], 1)); - GPR_ASSERT(grpc_set_socket_nonblocking(pipefd[1], 1)); + grpc_error* err; + err = grpc_set_socket_nonblocking(pipefd[0], 1); + if (err != GRPC_ERROR_NONE) return err; + err = grpc_set_socket_nonblocking(pipefd[1], 1); + if (err != GRPC_ERROR_NONE) return err; fd_info->read_fd = pipefd[0]; fd_info->write_fd = pipefd[1]; + return GRPC_ERROR_NONE; } -static void pipe_consume(grpc_wakeup_fd* fd_info) { +static grpc_error* pipe_consume(grpc_wakeup_fd* fd_info) { char buf[128]; ssize_t r; for (;;) { r = read(fd_info->read_fd, buf, sizeof(buf)); if (r > 0) continue; - if (r == 0) return; + if (r == 0) return GRPC_ERROR_NONE; switch (errno) { case EAGAIN: - return; + return GRPC_ERROR_NONE; case EINTR: continue; default: - gpr_log(GPR_ERROR, "error reading pipe: %s", strerror(errno)); - return; + return GRPC_OS_ERROR(errno, "read"); } } } -static void pipe_wakeup(grpc_wakeup_fd* fd_info) { +static grpc_error* pipe_wakeup(grpc_wakeup_fd* fd_info) { char c = 0; while (write(fd_info->write_fd, &c, 1) != 1 && errno == EINTR) ; + return GRPC_ERROR_NONE; } static void pipe_destroy(grpc_wakeup_fd* fd_info) { diff --git a/src/core/lib/iomgr/wakeup_fd_posix.c b/src/core/lib/iomgr/wakeup_fd_posix.c index 525369c3566..046208abc83 100644 --- a/src/core/lib/iomgr/wakeup_fd_posix.c +++ b/src/core/lib/iomgr/wakeup_fd_posix.c @@ -53,16 +53,16 @@ void grpc_wakeup_fd_global_init(void) { void grpc_wakeup_fd_global_destroy(void) { wakeup_fd_vtable = NULL; } -void grpc_wakeup_fd_init(grpc_wakeup_fd *fd_info) { - wakeup_fd_vtable->init(fd_info); +grpc_error *grpc_wakeup_fd_init(grpc_wakeup_fd *fd_info) { + return wakeup_fd_vtable->init(fd_info); } -void grpc_wakeup_fd_consume_wakeup(grpc_wakeup_fd *fd_info) { - wakeup_fd_vtable->consume(fd_info); +grpc_error *grpc_wakeup_fd_consume_wakeup(grpc_wakeup_fd *fd_info) { + return wakeup_fd_vtable->consume(fd_info); } -void grpc_wakeup_fd_wakeup(grpc_wakeup_fd *fd_info) { - wakeup_fd_vtable->wakeup(fd_info); +grpc_error *grpc_wakeup_fd_wakeup(grpc_wakeup_fd *fd_info) { + return wakeup_fd_vtable->wakeup(fd_info); } void grpc_wakeup_fd_destroy(grpc_wakeup_fd *fd_info) { diff --git a/src/core/lib/iomgr/wakeup_fd_posix.h b/src/core/lib/iomgr/wakeup_fd_posix.h index 6b069c1837f..e269f242d83 100644 --- a/src/core/lib/iomgr/wakeup_fd_posix.h +++ b/src/core/lib/iomgr/wakeup_fd_posix.h @@ -62,6 +62,8 @@ #ifndef GRPC_CORE_LIB_IOMGR_WAKEUP_FD_POSIX_H #define GRPC_CORE_LIB_IOMGR_WAKEUP_FD_POSIX_H +#include "src/core/lib/iomgr/error.h" + void grpc_wakeup_fd_global_init(void); void grpc_wakeup_fd_global_destroy(void); @@ -72,9 +74,9 @@ void grpc_wakeup_fd_global_init_force_fallback(void); typedef struct grpc_wakeup_fd grpc_wakeup_fd; typedef struct grpc_wakeup_fd_vtable { - void (*init)(grpc_wakeup_fd* fd_info); - void (*consume)(grpc_wakeup_fd* fd_info); - void (*wakeup)(grpc_wakeup_fd* fd_info); + grpc_error* (*init)(grpc_wakeup_fd* fd_info); + grpc_error* (*consume)(grpc_wakeup_fd* fd_info); + grpc_error* (*wakeup)(grpc_wakeup_fd* fd_info); void (*destroy)(grpc_wakeup_fd* fd_info); /* Must be called before calling any other functions */ int (*check_availability)(void); @@ -89,9 +91,10 @@ extern int grpc_allow_specialized_wakeup_fd; #define GRPC_WAKEUP_FD_GET_READ_FD(fd_info) ((fd_info)->read_fd) -void grpc_wakeup_fd_init(grpc_wakeup_fd* fd_info); -void grpc_wakeup_fd_consume_wakeup(grpc_wakeup_fd* fd_info); -void grpc_wakeup_fd_wakeup(grpc_wakeup_fd* fd_info); +grpc_error* grpc_wakeup_fd_init(grpc_wakeup_fd* fd_info) GRPC_MUST_USE_RESULT; +grpc_error* grpc_wakeup_fd_consume_wakeup(grpc_wakeup_fd* fd_info) + GRPC_MUST_USE_RESULT; +grpc_error* grpc_wakeup_fd_wakeup(grpc_wakeup_fd* fd_info) GRPC_MUST_USE_RESULT; void grpc_wakeup_fd_destroy(grpc_wakeup_fd* fd_info); /* Defined in some specialized implementation's .c file, or by diff --git a/src/core/lib/iomgr/workqueue.h b/src/core/lib/iomgr/workqueue.h index 20b47e1c140..cb6aed9bd4f 100644 --- a/src/core/lib/iomgr/workqueue.h +++ b/src/core/lib/iomgr/workqueue.h @@ -50,9 +50,11 @@ /* grpc_workqueue is forward declared in exec_ctx.h */ /** Create a work queue */ -grpc_workqueue *grpc_workqueue_create(grpc_exec_ctx *exec_ctx); +grpc_error *grpc_workqueue_create(grpc_exec_ctx *exec_ctx, + grpc_workqueue **workqueue); -void grpc_workqueue_flush(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue); +grpc_error *grpc_workqueue_flush( + grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) GRPC_MUST_USE_RESULT; #define GRPC_WORKQUEUE_REFCOUNT_DEBUG #ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG @@ -77,7 +79,7 @@ void grpc_workqueue_add_to_pollset(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset); /** Add a work item to a workqueue */ -void grpc_workqueue_push(grpc_workqueue *workqueue, grpc_closure *closure, - grpc_error *error); +void grpc_workqueue_push(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, + grpc_closure *closure, grpc_error *error); #endif /* GRPC_CORE_LIB_IOMGR_WORKQUEUE_H */ diff --git a/src/core/lib/iomgr/workqueue_posix.c b/src/core/lib/iomgr/workqueue_posix.c index e27525dd504..1187e627a2c 100644 --- a/src/core/lib/iomgr/workqueue_posix.c +++ b/src/core/lib/iomgr/workqueue_posix.c @@ -47,20 +47,25 @@ static void on_readable(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error); -grpc_workqueue *grpc_workqueue_create(grpc_exec_ctx *exec_ctx) { +grpc_error *grpc_workqueue_create(grpc_exec_ctx *exec_ctx, + grpc_workqueue **workqueue) { char name[32]; - grpc_workqueue *workqueue = gpr_malloc(sizeof(grpc_workqueue)); - gpr_ref_init(&workqueue->refs, 1); - gpr_mu_init(&workqueue->mu); - workqueue->closure_list.head = workqueue->closure_list.tail = NULL; - grpc_wakeup_fd_init(&workqueue->wakeup_fd); - sprintf(name, "workqueue:%p", (void *)workqueue); - workqueue->wakeup_read_fd = - grpc_fd_create(GRPC_WAKEUP_FD_GET_READ_FD(&workqueue->wakeup_fd), name); - grpc_closure_init(&workqueue->read_closure, on_readable, workqueue); - grpc_fd_notify_on_read(exec_ctx, workqueue->wakeup_read_fd, - &workqueue->read_closure); - return workqueue; + *workqueue = gpr_malloc(sizeof(grpc_workqueue)); + gpr_ref_init(&(*workqueue)->refs, 1); + gpr_mu_init(&(*workqueue)->mu); + (*workqueue)->closure_list.head = (*workqueue)->closure_list.tail = NULL; + grpc_error *err = grpc_wakeup_fd_init(&(*workqueue)->wakeup_fd); + if (err != GRPC_ERROR_NONE) { + gpr_free(*workqueue); + return err; + } + sprintf(name, "workqueue:%p", (void *)(*workqueue)); + (*workqueue)->wakeup_read_fd = grpc_fd_create( + GRPC_WAKEUP_FD_GET_READ_FD(&(*workqueue)->wakeup_fd), name); + grpc_closure_init(&(*workqueue)->read_closure, on_readable, workqueue); + grpc_fd_notify_on_read(exec_ctx, (*workqueue)->wakeup_read_fd, + &(*workqueue)->read_closure); + return GRPC_ERROR_NONE; } static void workqueue_destroy(grpc_exec_ctx *exec_ctx, @@ -101,13 +106,16 @@ void grpc_workqueue_add_to_pollset(grpc_exec_ctx *exec_ctx, grpc_pollset_add_fd(exec_ctx, pollset, workqueue->wakeup_read_fd); } -void grpc_workqueue_flush(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) { +grpc_error *grpc_workqueue_flush(grpc_exec_ctx *exec_ctx, + grpc_workqueue *workqueue) { + grpc_error *error = GRPC_ERROR_NONE; gpr_mu_lock(&workqueue->mu); if (grpc_closure_list_empty(workqueue->closure_list)) { - grpc_wakeup_fd_wakeup(&workqueue->wakeup_fd); + error = grpc_wakeup_fd_wakeup(&workqueue->wakeup_fd); } grpc_exec_ctx_enqueue_list(exec_ctx, &workqueue->closure_list, NULL); gpr_mu_unlock(&workqueue->mu); + return error; } static void on_readable(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { @@ -123,20 +131,32 @@ static void on_readable(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { } else { gpr_mu_lock(&workqueue->mu); grpc_exec_ctx_enqueue_list(exec_ctx, &workqueue->closure_list, NULL); - grpc_wakeup_fd_consume_wakeup(&workqueue->wakeup_fd); + error = grpc_wakeup_fd_consume_wakeup(&workqueue->wakeup_fd); gpr_mu_unlock(&workqueue->mu); - grpc_fd_notify_on_read(exec_ctx, workqueue->wakeup_read_fd, - &workqueue->read_closure); + if (error == GRPC_ERROR_NONE) { + grpc_fd_notify_on_read(exec_ctx, workqueue->wakeup_read_fd, + &workqueue->read_closure); + } else { + /* recurse to get error handling */ + on_readable(exec_ctx, arg, error); + } } } -void grpc_workqueue_push(grpc_workqueue *workqueue, grpc_closure *closure, - grpc_error *error) { +void grpc_workqueue_push(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, + grpc_closure *closure, grpc_error *error) { + grpc_error *push_error = GRPC_ERROR_NONE; gpr_mu_lock(&workqueue->mu); if (grpc_closure_list_empty(workqueue->closure_list)) { - grpc_wakeup_fd_wakeup(&workqueue->wakeup_fd); + push_error = grpc_wakeup_fd_wakeup(&workqueue->wakeup_fd); } grpc_closure_list_append(&workqueue->closure_list, closure, error); + if (push_error != GRPC_ERROR_NONE) { + const char *msg = grpc_error_string(push_error); + gpr_log(GPR_ERROR, "Failed to push to workqueue: %s", msg); + grpc_error_free_string(msg); + grpc_exec_ctx_enqueue_list(exec_ctx, &workqueue->closure_list, NULL); + } gpr_mu_unlock(&workqueue->mu); } diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.c b/src/core/lib/security/credentials/google_default/google_default_credentials.c index a67f19ae0f1..019def95c2a 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.c +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.c @@ -88,7 +88,7 @@ static void on_compute_engine_detection_http_response(grpc_exec_ctx *exec_ctx, } gpr_mu_lock(g_polling_mu); detector->is_done = 1; - grpc_pollset_kick(detector->pollset, NULL); + GRPC_LOG_IF_ERROR("Pollset kick", grpc_pollset_kick(detector->pollset, NULL)); gpr_mu_unlock(g_polling_mu); } @@ -131,9 +131,14 @@ static int is_stack_running_on_compute_engine(void) { gpr_mu_lock(g_polling_mu); while (!detector.is_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, detector.pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), - gpr_inf_future(GPR_CLOCK_MONOTONIC)); + if (!GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, detector.pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), + gpr_inf_future(GPR_CLOCK_MONOTONIC)))) { + detector.is_done = 1; + detector.success = 0; + } } gpr_mu_unlock(g_polling_mu); diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index 50e2a1bd16e..5bb93902889 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -263,8 +263,15 @@ void grpc_cq_end_op(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc, break; } } - grpc_pollset_kick(POLLSET_FROM_CQ(cc), pluck_worker); + grpc_error *kick_error = + grpc_pollset_kick(POLLSET_FROM_CQ(cc), pluck_worker); gpr_mu_unlock(cc->mu); + if (kick_error != GRPC_ERROR_NONE) { + const char *msg = grpc_error_string(kick_error); + gpr_log(GPR_ERROR, "Kick failed: %s", msg); + grpc_error_free_string(msg); + GRPC_ERROR_UNREF(kick_error); + } } else { cc->completed_tail->next = ((uintptr_t)storage) | (1u & (uintptr_t)cc->completed_tail->next); @@ -343,8 +350,18 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, gpr_mu_lock(cc->mu); continue; } else { - grpc_pollset_work(&exec_ctx, POLLSET_FROM_CQ(cc), &worker, now, - iteration_deadline); + grpc_error *err = grpc_pollset_work(&exec_ctx, POLLSET_FROM_CQ(cc), + &worker, now, iteration_deadline); + if (err != GRPC_ERROR_NONE) { + gpr_mu_unlock(cc->mu); + const char *msg = grpc_error_string(err); + gpr_log(GPR_ERROR, "Completion queue next failed: %s", msg); + grpc_error_free_string(msg); + GRPC_ERROR_UNREF(err); + memset(&ret, 0, sizeof(ret)); + ret.type = GRPC_QUEUE_TIMEOUT; + break; + } } } GRPC_SURFACE_TRACE_RETURNED_EVENT(cc, &ret); @@ -460,8 +477,19 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, grpc_exec_ctx_flush(&exec_ctx); gpr_mu_lock(cc->mu); } else { - grpc_pollset_work(&exec_ctx, POLLSET_FROM_CQ(cc), &worker, now, - iteration_deadline); + grpc_error *err = grpc_pollset_work(&exec_ctx, POLLSET_FROM_CQ(cc), + &worker, now, iteration_deadline); + if (err != GRPC_ERROR_NONE) { + del_plucker(cc, tag, &worker); + gpr_mu_unlock(cc->mu); + const char *msg = grpc_error_string(err); + gpr_log(GPR_ERROR, "Completion queue next failed: %s", msg); + grpc_error_free_string(msg); + GRPC_ERROR_UNREF(err); + memset(&ret, 0, sizeof(ret)); + ret.type = GRPC_QUEUE_TIMEOUT; + break; + } } del_plucker(cc, tag, &worker); } diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c index ded76bccec0..8eec10414dd 100644 --- a/test/core/iomgr/endpoint_tests.c +++ b/test/core/iomgr/endpoint_tests.c @@ -137,7 +137,7 @@ static void read_and_write_test_read_handler(grpc_exec_ctx *exec_ctx, gpr_log(GPR_INFO, "Read handler done"); gpr_mu_lock(g_mu); state->read_done = 1 + (error == GRPC_ERROR_NONE); - grpc_pollset_kick(g_pollset, NULL); + GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(g_pollset, NULL)); gpr_mu_unlock(g_mu); } else if (error == GRPC_ERROR_NONE) { grpc_endpoint_read(exec_ctx, state->read_ep, &state->incoming, @@ -172,7 +172,7 @@ static void read_and_write_test_write_handler(grpc_exec_ctx *exec_ctx, gpr_log(GPR_INFO, "Write handler done"); gpr_mu_lock(g_mu); state->write_done = 1 + (error != GRPC_ERROR_NONE); - grpc_pollset_kick(g_pollset, NULL); + GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(g_pollset, NULL)); gpr_mu_unlock(g_mu); } @@ -237,8 +237,10 @@ static void read_and_write_test(grpc_endpoint_test_config config, while (!state.read_done || !state.write_done) { grpc_pollset_worker *worker = NULL; GPR_ASSERT(gpr_time_cmp(gpr_now(GPR_CLOCK_MONOTONIC), deadline) < 0); - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), deadline); + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), deadline))); } gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c index e55ce5c7b4f..c92850d6815 100644 --- a/test/core/security/oauth2_utils.c +++ b/test/core/security/oauth2_utils.c @@ -70,7 +70,7 @@ static void on_oauth2_response(grpc_exec_ctx *exec_ctx, void *user_data, gpr_mu_lock(request->mu); request->is_done = 1; request->token = token; - grpc_pollset_kick(request->pollset, NULL); + GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(request->pollset, NULL)); gpr_mu_unlock(request->mu); } @@ -99,9 +99,13 @@ char *grpc_test_fetch_oauth2_token_with_credentials( gpr_mu_lock(request.mu); while (!request.is_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, request.pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), - gpr_inf_future(GPR_CLOCK_MONOTONIC)); + if (GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, request.pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), + gpr_inf_future(GPR_CLOCK_MONOTONIC)))) { + request.is_done = 1; + } } gpr_mu_unlock(request.mu); From 94f8453d0a58d2ab20c3bbe7f687089dbdcb84af Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 6 May 2016 21:03:29 -0700 Subject: [PATCH 0352/1894] Bug fixes to error handling --- src/core/ext/client_config/client_channel.c | 4 ++-- src/core/ext/client_config/subchannel.c | 3 ++- .../lib/iomgr/socket_utils_common_posix.c | 4 ++-- src/core/lib/iomgr/tcp_server_posix.c | 2 +- test/core/util/port_server_client.c | 24 ++++++++++++------- 5 files changed, 23 insertions(+), 14 deletions(-) diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index 801cbe0702f..eaefa3be6d7 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -128,8 +128,8 @@ static void set_channel_connectivity_state_locked(grpc_exec_ctx *exec_ctx, /* mask= */ GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY, /* check= */ 0); } - grpc_connectivity_state_set(exec_ctx, &chand->state_tracker, state, error, - reason); + grpc_connectivity_state_set(exec_ctx, &chand->state_tracker, state, + GRPC_ERROR_REF(error), reason); } static void on_lb_policy_state_changed_locked(grpc_exec_ctx *exec_ctx, diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c index 0f58dabb1ea..69b1fa5d343 100644 --- a/src/core/ext/client_config/subchannel.c +++ b/src/core/ext/client_config/subchannel.c @@ -484,7 +484,8 @@ static void subchannel_on_child_state_changed(grpc_exec_ctx *exec_ctx, void *p, sw->connectivity_state = GRPC_CHANNEL_FATAL_FAILURE; } grpc_connectivity_state_set(exec_ctx, &c->state_tracker, - sw->connectivity_state, error, "reflect_child"); + sw->connectivity_state, GRPC_ERROR_REF(error), + "reflect_child"); if (sw->connectivity_state != GRPC_CHANNEL_FATAL_FAILURE) { grpc_connected_subchannel_notify_on_state_change( exec_ctx, GET_CONNECTED_SUBCHANNEL(c, no_barrier), NULL, diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index 83941574df6..d1721c910c4 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -84,10 +84,10 @@ grpc_error *grpc_set_socket_no_sigpipe_if_possible(int fd) { if (0 != setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &val, sizeof(val))) { return GRPC_OS_ERROR(errno, "setsockopt(SO_NOSIGPIPE)"); } - if (0 == getsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &newval, &intlen)) { + if (0 != getsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &newval, &intlen)) { return GRPC_OS_ERROR(errno, "getsockopt(SO_NOSIGPIPE)"); } - if ((newval != 0) == val) { + if ((newval != 0) != (val != 0)) { return GRPC_ERROR_CREATE("Failed to set SO_NOSIGPIPE"); } #endif diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 3276cb4ba31..bb51ba2c763 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -308,7 +308,7 @@ static grpc_error *prepare_socket(int fd, const struct sockaddr *addr, return GRPC_ERROR_NONE; error: - GPR_ASSERT(err == GRPC_ERROR_NONE); + GPR_ASSERT(err != GRPC_ERROR_NONE); if (fd >= 0) { close(fd); } diff --git a/test/core/util/port_server_client.c b/test/core/util/port_server_client.c index a03dc0c83fe..8b8fc0983b6 100644 --- a/test/core/util/port_server_client.c +++ b/test/core/util/port_server_client.c @@ -67,7 +67,7 @@ static void freed_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, freereq *pr = arg; gpr_mu_lock(pr->mu); pr->done = 1; - grpc_pollset_kick(pr->pollset, NULL); + GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(pr->pollset, NULL)); gpr_mu_unlock(pr->mu); } @@ -102,9 +102,13 @@ void grpc_free_port_using_server(char *server, int port) { gpr_mu_lock(pr.mu); while (!pr.done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, pr.pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1)); + if (!GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, pr.pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), + GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1)))) { + pr.done = 1; + } } gpr_mu_unlock(pr.mu); @@ -173,7 +177,7 @@ static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, GPR_ASSERT(port > 1024); gpr_mu_lock(pr->mu); pr->port = port; - grpc_pollset_kick(pr->pollset, NULL); + GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(pr->pollset, NULL)); gpr_mu_unlock(pr->mu); } @@ -208,9 +212,13 @@ int grpc_pick_port_using_server(char *server) { gpr_mu_lock(pr.mu); while (pr.port == -1) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, pr.pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1)); + if (!GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, pr.pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), + GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1)))) { + pr.port = 0; + } } gpr_mu_unlock(pr.mu); From 0f75fbe7edf92d550c48f51555024b323396e210 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 6 May 2016 21:10:06 -0700 Subject: [PATCH 0353/1894] Progress converting to new error system --- src/core/lib/iomgr/ev_poll_and_epoll_posix.c | 10 ++++++---- src/core/lib/iomgr/wakeup_fd_eventfd.c | 20 +++++++++++++++----- 2 files changed, 21 insertions(+), 9 deletions(-) diff --git a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c index 288a44103bb..d9146c3b145 100644 --- a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c +++ b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c @@ -1655,7 +1655,7 @@ static void multipoll_with_epoll_pollset_add_fd(grpc_exec_ctx *exec_ctx, /* TODO(klempner): We probably want to turn this down a bit */ #define GRPC_EPOLL_MAX_EVENTS 1000 -static void multipoll_with_epoll_pollset_maybe_work_and_unlock( +static grpc_error *multipoll_with_epoll_pollset_maybe_work_and_unlock( grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_pollset_worker *worker, gpr_timespec deadline, gpr_timespec now) { struct epoll_event ep_ev[GRPC_EPOLL_MAX_EVENTS]; @@ -1664,6 +1664,7 @@ static void multipoll_with_epoll_pollset_maybe_work_and_unlock( epoll_hdr *h = pollset->data.ptr; int timeout_ms; struct pollfd pfds[2]; + grpc_error *error = GRPC_ERROR_NONE; /* If you want to ignore epoll's ability to sanely handle parallel pollers, * for a more apples-to-apples performance comparison with poll, add a @@ -1698,7 +1699,7 @@ static void multipoll_with_epoll_pollset_maybe_work_and_unlock( /* do nothing */ } else { if (pfds[0].revents) { - grpc_wakeup_fd_consume_wakeup(&worker->wakeup_fd->fd); + work_combine_error(&error, grpc_wakeup_fd_consume_wakeup(&worker->wakeup_fd->fd)); } if (pfds[1].revents) { do { @@ -1706,7 +1707,7 @@ static void multipoll_with_epoll_pollset_maybe_work_and_unlock( ep_rv = epoll_wait(h->epoll_fd, ep_ev, GRPC_EPOLL_MAX_EVENTS, 0); if (ep_rv < 0) { if (errno != EINTR) { - gpr_log(GPR_ERROR, "epoll_wait() failed: %s", strerror(errno)); + work_combine_error(&error, GRPC_OS_ERROR(errno, "epoll_wait")); } } else { int i; @@ -1718,7 +1719,7 @@ static void multipoll_with_epoll_pollset_maybe_work_and_unlock( int read_ev = ep_ev[i].events & (EPOLLIN | EPOLLPRI); int write_ev = ep_ev[i].events & EPOLLOUT; if (fd == NULL) { - grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); + work_combine_error(&error, grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd)); } else { if (read_ev || cancel) { fd_become_readable(exec_ctx, fd); @@ -1732,6 +1733,7 @@ static void multipoll_with_epoll_pollset_maybe_work_and_unlock( } while (ep_rv == GRPC_EPOLL_MAX_EVENTS); } } + return error; } static void multipoll_with_epoll_pollset_finish_shutdown( diff --git a/src/core/lib/iomgr/wakeup_fd_eventfd.c b/src/core/lib/iomgr/wakeup_fd_eventfd.c index 8a772add138..50852dc4d67 100644 --- a/src/core/lib/iomgr/wakeup_fd_eventfd.c +++ b/src/core/lib/iomgr/wakeup_fd_eventfd.c @@ -44,29 +44,39 @@ #include "src/core/lib/iomgr/wakeup_fd_posix.h" #include "src/core/lib/profiling/timers.h" -static void eventfd_create(grpc_wakeup_fd* fd_info) { +static grpc_error* eventfd_create(grpc_wakeup_fd* fd_info) { int efd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); - /* TODO(klempner): Handle failure more gracefully */ - GPR_ASSERT(efd >= 0); + if (efd < 0) { + return GRPC_OS_ERROR(errno, "eventfd"); + } fd_info->read_fd = efd; fd_info->write_fd = -1; + return GRPC_ERROR_NONE; } -static void eventfd_consume(grpc_wakeup_fd* fd_info) { +static grpc_error *eventfd_consume(grpc_wakeup_fd* fd_info) { eventfd_t value; int err; do { err = eventfd_read(fd_info->read_fd, &value); } while (err < 0 && errno == EINTR); + if (err < 0) { + return GRPC_OS_ERROR(errno, "eventfd_read"); + } + return GRPC_ERROR_NONE; } -static void eventfd_wakeup(grpc_wakeup_fd* fd_info) { +static grpc_error* eventfd_wakeup(grpc_wakeup_fd* fd_info) { int err; GPR_TIMER_BEGIN("eventfd_wakeup", 0); do { err = eventfd_write(fd_info->read_fd, 1); } while (err < 0 && errno == EINTR); + if (err < 0) { + return GRPC_OS_ERROR(errno, "eventfd_read"); + } GPR_TIMER_END("eventfd_wakeup", 0); + return GRPC_ERROR_NONE; } static void eventfd_destroy(grpc_wakeup_fd* fd_info) { From 1aee5362f43ece8eb77ba219c163f1169d0d0b24 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 7 May 2016 11:26:50 -0700 Subject: [PATCH 0354/1894] Progress converting to new error system --- src/core/lib/iomgr/ev_poll_and_epoll_posix.c | 6 ++- src/core/lib/iomgr/wakeup_fd_eventfd.c | 2 +- src/core/lib/iomgr/workqueue.h | 3 +- src/core/lib/iomgr/workqueue_posix.c | 8 +--- src/core/lib/transport/connectivity_state.c | 3 +- test/core/http/httpcli_test.c | 15 ++++--- test/core/http/httpscli_test.c | 15 ++++--- test/core/internal_api_canaries/iomgr.c | 7 +-- test/core/iomgr/fd_posix_test.c | 44 ++++++++++++------- test/core/iomgr/tcp_client_posix_test.c | 15 ++++--- test/core/iomgr/tcp_posix_test.c | 44 ++++++++++++------- test/core/iomgr/tcp_server_posix_test.c | 9 ++-- test/core/iomgr/workqueue_test.c | 29 ++++++++---- .../print_google_default_creds_token.c | 11 +++-- test/core/security/verify_jwt.c | 11 +++-- .../surface/concurrent_connectivity_test.c | 8 +++- test/core/util/test_tcp_server.c | 5 ++- 17 files changed, 149 insertions(+), 86 deletions(-) diff --git a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c index d9146c3b145..836db6b3cef 100644 --- a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c +++ b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c @@ -1699,7 +1699,8 @@ static grpc_error *multipoll_with_epoll_pollset_maybe_work_and_unlock( /* do nothing */ } else { if (pfds[0].revents) { - work_combine_error(&error, grpc_wakeup_fd_consume_wakeup(&worker->wakeup_fd->fd)); + work_combine_error(&error, + grpc_wakeup_fd_consume_wakeup(&worker->wakeup_fd->fd)); } if (pfds[1].revents) { do { @@ -1719,7 +1720,8 @@ static grpc_error *multipoll_with_epoll_pollset_maybe_work_and_unlock( int read_ev = ep_ev[i].events & (EPOLLIN | EPOLLPRI); int write_ev = ep_ev[i].events & EPOLLOUT; if (fd == NULL) { - work_combine_error(&error, grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd)); + work_combine_error(&error, grpc_wakeup_fd_consume_wakeup( + &grpc_global_wakeup_fd)); } else { if (read_ev || cancel) { fd_become_readable(exec_ctx, fd); diff --git a/src/core/lib/iomgr/wakeup_fd_eventfd.c b/src/core/lib/iomgr/wakeup_fd_eventfd.c index 50852dc4d67..30472058332 100644 --- a/src/core/lib/iomgr/wakeup_fd_eventfd.c +++ b/src/core/lib/iomgr/wakeup_fd_eventfd.c @@ -54,7 +54,7 @@ static grpc_error* eventfd_create(grpc_wakeup_fd* fd_info) { return GRPC_ERROR_NONE; } -static grpc_error *eventfd_consume(grpc_wakeup_fd* fd_info) { +static grpc_error* eventfd_consume(grpc_wakeup_fd* fd_info) { eventfd_t value; int err; do { diff --git a/src/core/lib/iomgr/workqueue.h b/src/core/lib/iomgr/workqueue.h index cb6aed9bd4f..6e8b1218beb 100644 --- a/src/core/lib/iomgr/workqueue.h +++ b/src/core/lib/iomgr/workqueue.h @@ -53,8 +53,7 @@ grpc_error *grpc_workqueue_create(grpc_exec_ctx *exec_ctx, grpc_workqueue **workqueue); -grpc_error *grpc_workqueue_flush( - grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) GRPC_MUST_USE_RESULT; +void grpc_workqueue_flush(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue); #define GRPC_WORKQUEUE_REFCOUNT_DEBUG #ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG diff --git a/src/core/lib/iomgr/workqueue_posix.c b/src/core/lib/iomgr/workqueue_posix.c index 1187e627a2c..66879ba7b32 100644 --- a/src/core/lib/iomgr/workqueue_posix.c +++ b/src/core/lib/iomgr/workqueue_posix.c @@ -106,16 +106,10 @@ void grpc_workqueue_add_to_pollset(grpc_exec_ctx *exec_ctx, grpc_pollset_add_fd(exec_ctx, pollset, workqueue->wakeup_read_fd); } -grpc_error *grpc_workqueue_flush(grpc_exec_ctx *exec_ctx, - grpc_workqueue *workqueue) { - grpc_error *error = GRPC_ERROR_NONE; +void grpc_workqueue_flush(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) { gpr_mu_lock(&workqueue->mu); - if (grpc_closure_list_empty(workqueue->closure_list)) { - error = grpc_wakeup_fd_wakeup(&workqueue->wakeup_fd); - } grpc_exec_ctx_enqueue_list(exec_ctx, &workqueue->closure_list, NULL); gpr_mu_unlock(&workqueue->mu); - return error; } static void on_readable(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { diff --git a/src/core/lib/transport/connectivity_state.c b/src/core/lib/transport/connectivity_state.c index 6df32a3a308..da0de276a2d 100644 --- a/src/core/lib/transport/connectivity_state.c +++ b/src/core/lib/transport/connectivity_state.c @@ -133,7 +133,8 @@ int grpc_connectivity_state_notify_on_state_change( } else { if (tracker->current_state != *current) { *current = tracker->current_state; - grpc_exec_ctx_push(exec_ctx, notify, GRPC_ERROR_REF(tracker->current_error), NULL); + grpc_exec_ctx_push(exec_ctx, notify, + GRPC_ERROR_REF(tracker->current_error), NULL); } else { grpc_connectivity_state_watcher *w = gpr_malloc(sizeof(*w)); w->current = current; diff --git a/test/core/http/httpcli_test.c b/test/core/http/httpcli_test.c index 32bef2005a8..7b872879cc6 100644 --- a/test/core/http/httpcli_test.c +++ b/test/core/http/httpcli_test.c @@ -65,7 +65,8 @@ static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { GPR_ASSERT(0 == memcmp(expect, response->body, response->body_length)); gpr_mu_lock(g_mu); g_done = 1; - grpc_pollset_kick(g_pollset, NULL); + GPR_ASSERT( + GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(g_pollset, NULL))); gpr_mu_unlock(g_mu); } @@ -92,8 +93,10 @@ static void test_get(int port) { gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)))); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); gpr_mu_lock(g_mu); @@ -126,8 +129,10 @@ static void test_post(int port) { gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)))); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); gpr_mu_lock(g_mu); diff --git a/test/core/http/httpscli_test.c b/test/core/http/httpscli_test.c index dce3eb6de0b..c7db7a21593 100644 --- a/test/core/http/httpscli_test.c +++ b/test/core/http/httpscli_test.c @@ -65,7 +65,8 @@ static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { GPR_ASSERT(0 == memcmp(expect, response->body, response->body_length)); gpr_mu_lock(g_mu); g_done = 1; - grpc_pollset_kick(g_pollset, NULL); + GPR_ASSERT( + GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(g_pollset, NULL))); gpr_mu_unlock(g_mu); } @@ -93,8 +94,10 @@ static void test_get(int port) { gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)))); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); gpr_mu_lock(g_mu); @@ -128,8 +131,10 @@ static void test_post(int port) { gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)))); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); gpr_mu_lock(g_mu); diff --git a/test/core/internal_api_canaries/iomgr.c b/test/core/internal_api_canaries/iomgr.c index 84ff8ff5563..71a1bb14369 100644 --- a/test/core/internal_api_canaries/iomgr.c +++ b/test/core/internal_api_canaries/iomgr.c @@ -103,9 +103,10 @@ static void test_code(void) { grpc_pollset_shutdown(NULL, NULL, NULL); grpc_pollset_reset(NULL); grpc_pollset_destroy(NULL); - grpc_pollset_work(NULL, NULL, NULL, gpr_now(GPR_CLOCK_REALTIME), - gpr_now(GPR_CLOCK_MONOTONIC)); - grpc_pollset_kick(NULL, NULL); + GRPC_ERROR_UNREF(grpc_pollset_work(NULL, NULL, NULL, + gpr_now(GPR_CLOCK_REALTIME), + gpr_now(GPR_CLOCK_MONOTONIC))); + GRPC_ERROR_UNREF(grpc_pollset_kick(NULL, NULL)); } int main(void) { diff --git a/test/core/iomgr/fd_posix_test.c b/test/core/iomgr/fd_posix_test.c index 02a7b341dee..ab5c279ac61 100644 --- a/test/core/iomgr/fd_posix_test.c +++ b/test/core/iomgr/fd_posix_test.c @@ -185,7 +185,8 @@ static void listen_shutdown_cb(grpc_exec_ctx *exec_ctx, void *arg /*server */, gpr_mu_lock(g_mu); sv->done = 1; - grpc_pollset_kick(g_pollset, NULL); + GPR_ASSERT( + GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(g_pollset, NULL))); gpr_mu_unlock(g_mu); } @@ -257,9 +258,11 @@ static void server_wait_and_shutdown(server *sv) { while (!sv->done) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), - gpr_inf_future(GPR_CLOCK_MONOTONIC)); + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), + gpr_inf_future(GPR_CLOCK_MONOTONIC)))); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); gpr_mu_lock(g_mu); @@ -300,7 +303,8 @@ static void client_session_shutdown_cb(grpc_exec_ctx *exec_ctx, client *cl = arg; grpc_fd_orphan(exec_ctx, cl->em_fd, NULL, NULL, "c"); cl->done = 1; - grpc_pollset_kick(g_pollset, NULL); + GPR_ASSERT( + GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(g_pollset, NULL))); } /* Write as much as possible, then register notify_on_write. */ @@ -372,9 +376,11 @@ static void client_wait_and_shutdown(client *cl) { while (!cl->done) { grpc_pollset_worker *worker = NULL; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), - gpr_inf_future(GPR_CLOCK_MONOTONIC)); + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), + gpr_inf_future(GPR_CLOCK_MONOTONIC)))); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); gpr_mu_lock(g_mu); @@ -417,7 +423,8 @@ static void first_read_callback(grpc_exec_ctx *exec_ctx, gpr_mu_lock(g_mu); fdc->cb_that_ran = first_read_callback; - grpc_pollset_kick(g_pollset, NULL); + GPR_ASSERT( + GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(g_pollset, NULL))); gpr_mu_unlock(g_mu); } @@ -428,7 +435,8 @@ static void second_read_callback(grpc_exec_ctx *exec_ctx, gpr_mu_lock(g_mu); fdc->cb_that_ran = second_read_callback; - grpc_pollset_kick(g_pollset, NULL); + GPR_ASSERT( + GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(g_pollset, NULL))); gpr_mu_unlock(g_mu); } @@ -474,9 +482,11 @@ static void test_grpc_fd_change(void) { gpr_mu_lock(g_mu); while (a.cb_that_ran == NULL) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), - gpr_inf_future(GPR_CLOCK_MONOTONIC)); + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), + gpr_inf_future(GPR_CLOCK_MONOTONIC)))); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); gpr_mu_lock(g_mu); @@ -498,9 +508,11 @@ static void test_grpc_fd_change(void) { gpr_mu_lock(g_mu); while (b.cb_that_ran == NULL) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), - gpr_inf_future(GPR_CLOCK_MONOTONIC)); + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), + gpr_inf_future(GPR_CLOCK_MONOTONIC)))); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); gpr_mu_lock(g_mu); diff --git a/test/core/iomgr/tcp_client_posix_test.c b/test/core/iomgr/tcp_client_posix_test.c index d1c57ca7699..d0c10474239 100644 --- a/test/core/iomgr/tcp_client_posix_test.c +++ b/test/core/iomgr/tcp_client_posix_test.c @@ -63,7 +63,8 @@ static gpr_timespec test_deadline(void) { static void finish_connection() { gpr_mu_lock(g_mu); g_connections_complete++; - grpc_pollset_kick(g_pollset, NULL); + GPR_ASSERT( + GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(g_pollset, NULL))); gpr_mu_unlock(g_mu); } @@ -126,9 +127,11 @@ void test_succeeds(void) { while (g_connections_complete == connections_complete_before) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), - GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5)); + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), + GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5)))); gpr_mu_unlock(g_mu); grpc_exec_ctx_flush(&exec_ctx); gpr_mu_lock(g_mu); @@ -169,7 +172,9 @@ void test_fails(void) { gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); gpr_timespec polling_deadline = test_deadline(); if (!grpc_timer_check(&exec_ctx, now, &polling_deadline)) { - grpc_pollset_work(&exec_ctx, g_pollset, &worker, now, polling_deadline); + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "pollset_work", grpc_pollset_work(&exec_ctx, g_pollset, &worker, now, + polling_deadline))); } gpr_mu_unlock(g_mu); grpc_exec_ctx_flush(&exec_ctx); diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index 6b21f0dc274..0a351f74229 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -193,8 +193,10 @@ static void read_test(size_t num_bytes, size_t slice_size) { gpr_mu_lock(g_mu); while (state.read_bytes < state.target_read_bytes) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), deadline); + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), deadline))); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); gpr_mu_lock(g_mu); @@ -239,8 +241,10 @@ static void large_read_test(size_t slice_size) { gpr_mu_lock(g_mu); while (state.read_bytes < state.target_read_bytes) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), deadline); + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), deadline))); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); gpr_mu_lock(g_mu); @@ -289,7 +293,8 @@ static void write_done(grpc_exec_ctx *exec_ctx, gpr_mu_lock(g_mu); gpr_log(GPR_INFO, "Signalling write done"); state->write_done = 1; - grpc_pollset_kick(g_pollset, NULL); + GPR_ASSERT( + GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(g_pollset, NULL))); gpr_mu_unlock(g_mu); } @@ -308,9 +313,11 @@ void drain_socket_blocking(int fd, size_t num_bytes, size_t read_size) { for (;;) { grpc_pollset_worker *worker = NULL; gpr_mu_lock(g_mu); - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), - GRPC_TIMEOUT_MILLIS_TO_DEADLINE(10)); + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), + GRPC_TIMEOUT_MILLIS_TO_DEADLINE(10)))); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); do { @@ -372,8 +379,10 @@ static void write_test(size_t num_bytes, size_t slice_size) { if (state.write_done) { break; } - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), deadline); + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), deadline))); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); gpr_mu_lock(g_mu); @@ -389,7 +398,8 @@ static void write_test(size_t num_bytes, size_t slice_size) { void on_fd_released(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *errors) { int *done = arg; *done = 1; - grpc_pollset_kick(g_pollset, NULL); + GPR_ASSERT( + GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(g_pollset, NULL))); } /* Do a read_test, then release fd and try to read/write again. Verify that @@ -429,8 +439,10 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) { gpr_mu_lock(g_mu); while (state.read_bytes < state.target_read_bytes) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), deadline); + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), deadline))); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); gpr_mu_lock(g_mu); @@ -443,8 +455,10 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) { gpr_mu_lock(g_mu); while (!fd_released_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), deadline); + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), deadline))); } gpr_mu_unlock(g_mu); GPR_ASSERT(fd_released_done == 1); diff --git a/test/core/iomgr/tcp_server_posix_test.c b/test/core/iomgr/tcp_server_posix_test.c index 00ec175c8fe..a37ff1773b2 100644 --- a/test/core/iomgr/tcp_server_posix_test.c +++ b/test/core/iomgr/tcp_server_posix_test.c @@ -120,7 +120,8 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, gpr_mu_lock(g_mu); on_connect_result_set(&g_result, acceptor); g_nconnects++; - grpc_pollset_kick(g_pollset, NULL); + GPR_ASSERT( + GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(g_pollset, NULL))); gpr_mu_unlock(g_mu); } @@ -196,8 +197,10 @@ static void tcp_connect(grpc_exec_ctx *exec_ctx, const struct sockaddr *remote, while (g_nconnects == nconnects_before && gpr_time_cmp(deadline, gpr_now(deadline.clock_type)) > 0) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(exec_ctx, g_pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), deadline); + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(exec_ctx, g_pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), deadline))); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(exec_ctx); gpr_mu_lock(g_mu); diff --git a/test/core/iomgr/workqueue_test.c b/test/core/iomgr/workqueue_test.c index 2818e55b453..65513cb9b17 100644 --- a/test/core/iomgr/workqueue_test.c +++ b/test/core/iomgr/workqueue_test.c @@ -46,13 +46,16 @@ static void must_succeed(grpc_exec_ctx *exec_ctx, void *p, grpc_error *error) { GPR_ASSERT(error == GRPC_ERROR_NONE); gpr_mu_lock(g_mu); *(int *)p = 1; - grpc_pollset_kick(g_pollset, NULL); + GPR_ASSERT( + GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(g_pollset, NULL))); gpr_mu_unlock(g_mu); } static void test_ref_unref(void) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_workqueue *wq = grpc_workqueue_create(&exec_ctx); + grpc_workqueue *wq; + GPR_ASSERT(GRPC_LOG_IF_ERROR("grpc_workqueue_create", + grpc_workqueue_create(&exec_ctx, &wq))); GRPC_WORKQUEUE_REF(wq, "test"); GRPC_WORKQUEUE_UNREF(&exec_ctx, wq, "test"); GRPC_WORKQUEUE_UNREF(&exec_ctx, wq, "destroy"); @@ -63,18 +66,22 @@ static void test_add_closure(void) { grpc_closure c; int done = 0; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_workqueue *wq = grpc_workqueue_create(&exec_ctx); + grpc_workqueue *wq; + GPR_ASSERT(GRPC_LOG_IF_ERROR("grpc_workqueue_create", + grpc_workqueue_create(&exec_ctx, &wq))); gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5); grpc_pollset_worker *worker = NULL; grpc_closure_init(&c, must_succeed, &done); - grpc_workqueue_push(wq, &c, GRPC_ERROR_NONE); + grpc_workqueue_push(&exec_ctx, wq, &c, GRPC_ERROR_NONE); grpc_workqueue_add_to_pollset(&exec_ctx, wq, g_pollset); gpr_mu_lock(g_mu); GPR_ASSERT(!done); - grpc_pollset_work(&exec_ctx, g_pollset, &worker, gpr_now(deadline.clock_type), - deadline); + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(deadline.clock_type), deadline))); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); @@ -87,7 +94,9 @@ static void test_flush(void) { grpc_closure c; int done = 0; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_workqueue *wq = grpc_workqueue_create(&exec_ctx); + grpc_workqueue *wq; + GPR_ASSERT(GRPC_LOG_IF_ERROR("grpc_workqueue_create", + grpc_workqueue_create(&exec_ctx, &wq))); gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5); grpc_pollset_worker *worker = NULL; grpc_closure_init(&c, must_succeed, &done); @@ -98,8 +107,10 @@ static void test_flush(void) { gpr_mu_lock(g_mu); GPR_ASSERT(!done); - grpc_pollset_work(&exec_ctx, g_pollset, &worker, gpr_now(deadline.clock_type), - deadline); + GPR_ASSERT(GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, g_pollset, &worker, + gpr_now(deadline.clock_type), deadline))); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); GPR_ASSERT(done); diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c index 1b7036cf9ea..33e59c2ca99 100644 --- a/test/core/security/print_google_default_creds_token.c +++ b/test/core/security/print_google_default_creds_token.c @@ -67,7 +67,7 @@ static void on_metadata_response(grpc_exec_ctx *exec_ctx, void *user_data, } gpr_mu_lock(sync->mu); sync->is_done = 1; - grpc_pollset_kick(sync->pollset, NULL); + GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(sync->pollset, NULL)); gpr_mu_unlock(sync->mu); } @@ -105,9 +105,12 @@ int main(int argc, char **argv) { gpr_mu_lock(sync.mu); while (!sync.is_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, sync.pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), - gpr_inf_future(GPR_CLOCK_MONOTONIC)); + if (!GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, sync.pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), + gpr_inf_future(GPR_CLOCK_MONOTONIC)))) + sync.is_done = 1; gpr_mu_unlock(sync.mu); grpc_exec_ctx_flush(&exec_ctx); gpr_mu_lock(sync.mu); diff --git a/test/core/security/verify_jwt.c b/test/core/security/verify_jwt.c index ecb873b655c..728d2d637a7 100644 --- a/test/core/security/verify_jwt.c +++ b/test/core/security/verify_jwt.c @@ -81,7 +81,7 @@ static void on_jwt_verification_done(void *user_data, gpr_mu_lock(sync->mu); sync->is_done = 1; - grpc_pollset_kick(sync->pollset, NULL); + GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(sync->pollset, NULL)); gpr_mu_unlock(sync->mu); } @@ -115,9 +115,12 @@ int main(int argc, char **argv) { gpr_mu_lock(sync.mu); while (!sync.is_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, sync.pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), - gpr_inf_future(GPR_CLOCK_MONOTONIC)); + if (!GRPC_LOG_IF_ERROR( + "pollset_work", + grpc_pollset_work(&exec_ctx, sync.pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), + gpr_inf_future(GPR_CLOCK_MONOTONIC)))) + sync.is_done = true; gpr_mu_unlock(sync.mu); grpc_exec_ctx_finish(&exec_ctx); gpr_mu_lock(sync.mu); diff --git a/test/core/surface/concurrent_connectivity_test.c b/test/core/surface/concurrent_connectivity_test.c index 4bafd358037..917c4758a60 100644 --- a/test/core/surface/concurrent_connectivity_test.c +++ b/test/core/surface/concurrent_connectivity_test.c @@ -101,7 +101,7 @@ static void on_connect(grpc_exec_ctx *exec_ctx, void *vargs, grpc_endpoint *tcp, (void)acceptor; grpc_endpoint_shutdown(exec_ctx, tcp); grpc_endpoint_destroy(exec_ctx, tcp); - grpc_pollset_kick(args->pollset, NULL); + GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(args->pollset, NULL)); } void bad_server_thread(void *vargs) { @@ -131,7 +131,11 @@ void bad_server_thread(void *vargs) { gpr_time_add(now, gpr_time_from_millis(100, GPR_TIMESPAN)); grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, args->pollset, &worker, now, deadline); + if (!GRPC_LOG_IF_ERROR("pollset_work", + grpc_pollset_work(&exec_ctx, args->pollset, &worker, + now, deadline))) { + gpr_atm_rel_store(&args->stop, 1); + } gpr_mu_unlock(args->mu); grpc_exec_ctx_finish(&exec_ctx); gpr_mu_lock(args->mu); diff --git a/test/core/util/test_tcp_server.c b/test/core/util/test_tcp_server.c index fc89c41907f..27c16fc764a 100644 --- a/test/core/util/test_tcp_server.c +++ b/test/core/util/test_tcp_server.c @@ -94,8 +94,9 @@ void test_tcp_server_poll(test_tcp_server *server, int seconds) { gpr_time_from_seconds(seconds, GPR_TIMESPAN)); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; gpr_mu_lock(server->mu); - grpc_pollset_work(&exec_ctx, server->pollset, &worker, - gpr_now(GPR_CLOCK_MONOTONIC), deadline); + GRPC_LOG_IF_ERROR("pollset_work", + grpc_pollset_work(&exec_ctx, server->pollset, &worker, + gpr_now(GPR_CLOCK_MONOTONIC), deadline)); gpr_mu_unlock(server->mu); grpc_exec_ctx_finish(&exec_ctx); } From b4e82f7897c8a840249f39f17bc9afb986206588 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Fri, 6 May 2016 12:58:30 -0700 Subject: [PATCH 0355/1894] Fix windows linkage in Python grpcio-tools --- tools/distrib/python/grpcio_tools/README.rst | 4 ++- tools/distrib/python/grpcio_tools/setup.py | 14 +++++++++- tools/run_tests/build_artifact_python.bat | 29 +++++++++++++------- 3 files changed, 35 insertions(+), 12 deletions(-) diff --git a/tools/distrib/python/grpcio_tools/README.rst b/tools/distrib/python/grpcio_tools/README.rst index 3be564ef5be..10d2fe8c309 100644 --- a/tools/distrib/python/grpcio_tools/README.rst +++ b/tools/distrib/python/grpcio_tools/README.rst @@ -46,7 +46,9 @@ From Source ~~~~~~~~~~~ Building from source requires that you have the Python headers (usually a -package named :code:`python-dev`) and Cython installed. +package named :code:`python-dev`) and Cython installed. It further requires a +GCC-like compiler to go smoothly; you can probably get it to work without +GCC-like stuff, but you may end up having a bad time. :: diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py index 0281c01796d..98f03c8d644 100644 --- a/tools/distrib/python/grpcio_tools/setup.py +++ b/tools/distrib/python/grpcio_tools/setup.py @@ -30,6 +30,7 @@ from distutils import extension import os import os.path +import shlex import sys import setuptools @@ -40,6 +41,16 @@ from setuptools.command import build_ext os.chdir(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, os.path.abspath('.')) +# There are some situations (like on Windows) where CC, CFLAGS, and LDFLAGS are +# entirely ignored/dropped/forgotten by distutils and its Cygwin/MinGW support. +# We use these environment variables to thus get around that without locking +# ourselves in w.r.t. the multitude of operating systems this ought to build on. +# By default we assume a GCC-like compiler. +EXTRA_COMPILE_ARGS = shlex.split(os.environ.get('GRPC_PYTHON_CFLAGS', + '-frtti -std=c++11')) +EXTRA_LINK_ARGS = shlex.split(os.environ.get('GRPC_PYTHON_LDFLAGS', + '-lpthread')) + import protoc_lib_deps import grpc_version @@ -60,7 +71,8 @@ def protoc_ext_module(): ], language='c++', define_macros=[('HAVE_PTHREAD', 1)], - extra_compile_args=['-lpthread', '-frtti', '-std=c++11'], + extra_compile_args=EXTRA_COMPILE_ARGS, + extra_link_args=EXTRA_LINK_ARGS, ) return plugin_ext diff --git a/tools/run_tests/build_artifact_python.bat b/tools/run_tests/build_artifact_python.bat index 342469bba87..fea0275426f 100644 --- a/tools/run_tests/build_artifact_python.bat +++ b/tools/run_tests/build_artifact_python.bat @@ -41,7 +41,7 @@ copy /Y vsprojects\Release\grpc_dll.dll src\python\grpcio\grpc\_cython\_windows\ copy /Y vsprojects\x64\Release\grpc_dll.dll src\python\grpcio\grpc\_cython\_windows\grpc_c.64.python || goto :error -set PATH=C:\%1;C:\%1\scripts;%PATH% +set PATH=C:\%1;C:\%1\scripts;C:\msys64\mingw%2\bin;%PATH% pip install --upgrade six pip install --upgrade setuptools @@ -55,19 +55,28 @@ set GRPC_PYTHON_BUILD_WITH_CYTHON=1 python setup.py bdist_wheel @rem Build gRPC Python tools -set PATH=C:\msys64\mingw%2\bin;%PATH% -set CC=C:\msys64\mingw%2\bin\g++.exe -set CFLAGS=-fno-wrapv +@rem +@rem Because this is windows and *everything seems to hate Windows* we have to +@rem set all of these flags ourselves because Python won't help us (see the +@rem setup.py of the grpcio_tools project). +set GRPC_PYTHON_CFLAGS=-fno-wrapv -frtti -std=c++11 +@rem Further confusing things, MSYS2's mingw64 tries to dynamically link +@rem libgcc, libstdc++, and winpthreads. We have to override this or our +@rem extensions end up linking to MSYS2 DLLs, which the normal Python on +@rem Windows user won't have... and ON TOP OF THIS, there's MinGW's GCC default +@rem behavior of linking msvcrt.dll as the C runtime library, which we need to +@rem override so that Python's distutils doesn't link us against multiple C +@rem runtimes. +python -c "from distutils.cygwinccompiler import get_msvcr; print(get_msvcr()[0])" > temp.txt +set /p PYTHON_MSVCR= Date: Sat, 7 May 2016 16:18:43 -0700 Subject: [PATCH 0356/1894] Progress converting to new error system --- include/grpc/support/avl.h | 2 + src/core/ext/client_config/client_channel.c | 45 +++++++++++---------- src/core/lib/iomgr/error.c | 4 +- src/core/lib/support/avl.c | 2 + src/core/lib/surface/call.c | 2 +- src/core/lib/surface/lame_client.c | 1 + 6 files changed, 33 insertions(+), 23 deletions(-) diff --git a/include/grpc/support/avl.h b/include/grpc/support/avl.h index d71592dcbc1..7e8e6378f72 100644 --- a/include/grpc/support/avl.h +++ b/include/grpc/support/avl.h @@ -88,5 +88,7 @@ GPRAPI gpr_avl gpr_avl_remove(gpr_avl avl, void *key); does not mutate avl. returns NULL if key is not found. */ GPRAPI void *gpr_avl_get(gpr_avl avl, void *key); +/** Return 1 if avl is empty, 0 otherwise */ +GPRAPI int gpr_avl_is_empty(gpr_avl avl); #endif /* GRPC_SUPPORT_AVL_H */ diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index eaefa3be6d7..7c6b19d558c 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -129,7 +129,7 @@ static void set_channel_connectivity_state_locked(grpc_exec_ctx *exec_ctx, /* check= */ 0); } grpc_connectivity_state_set(exec_ctx, &chand->state_tracker, state, - GRPC_ERROR_REF(error), reason); + error, reason); } static void on_lb_policy_state_changed_locked(grpc_exec_ctx *exec_ctx, @@ -228,7 +228,7 @@ static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg, } if (error == GRPC_ERROR_NONE && chand->resolver) { - set_channel_connectivity_state_locked(exec_ctx, chand, state, state_error, + set_channel_connectivity_state_locked(exec_ctx, chand, state, GRPC_ERROR_REF(state_error), "new_lb+resolver"); if (lb_policy != NULL) { watch_lb_policy(exec_ctx, chand, lb_policy, state); @@ -305,26 +305,29 @@ static void cc_start_transport_op(grpc_exec_ctx *exec_ctx, op->send_ping = NULL; } - if (op->disconnect_with_error != GRPC_ERROR_NONE && chand->resolver != NULL) { - set_channel_connectivity_state_locked( - exec_ctx, chand, GRPC_CHANNEL_FATAL_FAILURE, - GRPC_ERROR_REF(op->disconnect_with_error), "disconnect"); - grpc_resolver_shutdown(exec_ctx, chand->resolver); - GRPC_RESOLVER_UNREF(exec_ctx, chand->resolver, "channel"); - chand->resolver = NULL; - if (!chand->started_resolving) { - grpc_closure_list_fail_all(&chand->waiting_for_config_closures, - op->disconnect_with_error); - grpc_exec_ctx_enqueue_list(exec_ctx, &chand->waiting_for_config_closures, - NULL); - } - if (chand->lb_policy != NULL) { - grpc_pollset_set_del_pollset_set(exec_ctx, - chand->lb_policy->interested_parties, - chand->interested_parties); - GRPC_LB_POLICY_UNREF(exec_ctx, chand->lb_policy, "channel"); - chand->lb_policy = NULL; + if (op->disconnect_with_error != GRPC_ERROR_NONE) { + if (chand->resolver != NULL) { + set_channel_connectivity_state_locked( + exec_ctx, chand, GRPC_CHANNEL_FATAL_FAILURE, + GRPC_ERROR_REF(op->disconnect_with_error), "disconnect"); + grpc_resolver_shutdown(exec_ctx, chand->resolver); + GRPC_RESOLVER_UNREF(exec_ctx, chand->resolver, "channel"); + chand->resolver = NULL; + if (!chand->started_resolving) { + grpc_closure_list_fail_all(&chand->waiting_for_config_closures, + GRPC_ERROR_REF(op->disconnect_with_error)); + grpc_exec_ctx_enqueue_list(exec_ctx, &chand->waiting_for_config_closures, + NULL); + } + if (chand->lb_policy != NULL) { + grpc_pollset_set_del_pollset_set(exec_ctx, + chand->lb_policy->interested_parties, + chand->interested_parties); + GRPC_LB_POLICY_UNREF(exec_ctx, chand->lb_policy, "channel"); + chand->lb_policy = NULL; + } } + GRPC_ERROR_UNREF(op->disconnect_with_error); } gpr_mu_unlock(&chand->mu_config); } diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index bc50d6870fb..cc0265737a3 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -453,7 +453,9 @@ const char *grpc_error_string(grpc_error *err) { collect_kvs(err->ints.root, key_int, fmt_int, &kvs); collect_kvs(err->strs.root, key_str, fmt_str, &kvs); collect_kvs(err->times.root, key_time, fmt_time, &kvs); - append_kv(&kvs, gpr_strdup("referenced_errors"), errs_string(err)); + if (!gpr_avl_is_empty(err->errs)) { + append_kv(&kvs, gpr_strdup("referenced_errors"), errs_string(err)); + } qsort(kvs.kvs, kvs.num_kvs, sizeof(kv_pair), cmp_kvs); diff --git a/src/core/lib/support/avl.c b/src/core/lib/support/avl.c index 8d3ce23e6c3..ceded9d2669 100644 --- a/src/core/lib/support/avl.c +++ b/src/core/lib/support/avl.c @@ -286,3 +286,5 @@ gpr_avl gpr_avl_ref(gpr_avl avl) { } void gpr_avl_unref(gpr_avl avl) { unref_node(avl.vtable, avl.root); } + +int gpr_avl_is_empty(gpr_avl avl) { return avl.root == NULL; } diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 046f2903ff9..66bdb7b213c 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -780,7 +780,7 @@ static void call_alarm(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_call *call = arg; gpr_mu_lock(&call->mu); call->have_alarm = 0; - if (error != GRPC_ERROR_NONE) { + if (error != GRPC_ERROR_CANCELLED) { cancel_with_status(exec_ctx, call, GRPC_STATUS_DEADLINE_EXCEEDED, "Deadline Exceeded"); } diff --git a/src/core/lib/surface/lame_client.c b/src/core/lib/surface/lame_client.c index d6dfa0f1641..4b76c539410 100644 --- a/src/core/lib/surface/lame_client.c +++ b/src/core/lib/surface/lame_client.c @@ -104,6 +104,7 @@ static void lame_start_transport_op(grpc_exec_ctx *exec_ctx, op->send_ping->cb(exec_ctx, op->send_ping->cb_arg, GRPC_ERROR_CREATE("lame client channel")); } + GRPC_ERROR_UNREF(op->disconnect_with_error); } static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, From 9ccf5f15d4133f00288092d3730034c8ad989f64 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 7 May 2016 21:41:01 -0700 Subject: [PATCH 0357/1894] Fix ownership bugs in error system --- src/core/ext/client_config/client_channel.c | 13 +++++++------ src/core/lib/iomgr/closure.c | 5 ++++- src/core/lib/iomgr/error.c | 15 +++++++++------ src/core/lib/iomgr/error.h | 11 +++++++---- src/core/lib/surface/call.c | 4 +++- 5 files changed, 30 insertions(+), 18 deletions(-) diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index 7c6b19d558c..0b220c04d49 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -128,8 +128,8 @@ static void set_channel_connectivity_state_locked(grpc_exec_ctx *exec_ctx, /* mask= */ GRPC_INITIAL_METADATA_IGNORE_CONNECTIVITY, /* check= */ 0); } - grpc_connectivity_state_set(exec_ctx, &chand->state_tracker, state, - error, reason); + grpc_connectivity_state_set(exec_ctx, &chand->state_tracker, state, error, + reason); } static void on_lb_policy_state_changed_locked(grpc_exec_ctx *exec_ctx, @@ -228,8 +228,8 @@ static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg, } if (error == GRPC_ERROR_NONE && chand->resolver) { - set_channel_connectivity_state_locked(exec_ctx, chand, state, GRPC_ERROR_REF(state_error), - "new_lb+resolver"); + set_channel_connectivity_state_locked( + exec_ctx, chand, state, GRPC_ERROR_REF(state_error), "new_lb+resolver"); if (lb_policy != NULL) { watch_lb_policy(exec_ctx, chand, lb_policy, state); } @@ -269,6 +269,7 @@ static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg, } GRPC_CHANNEL_STACK_UNREF(exec_ctx, chand->owning_stack, "resolver"); + GRPC_ERROR_UNREF(state_error); } static void cc_start_transport_op(grpc_exec_ctx *exec_ctx, @@ -316,8 +317,8 @@ static void cc_start_transport_op(grpc_exec_ctx *exec_ctx, if (!chand->started_resolving) { grpc_closure_list_fail_all(&chand->waiting_for_config_closures, GRPC_ERROR_REF(op->disconnect_with_error)); - grpc_exec_ctx_enqueue_list(exec_ctx, &chand->waiting_for_config_closures, - NULL); + grpc_exec_ctx_enqueue_list(exec_ctx, + &chand->waiting_for_config_closures, NULL); } if (chand->lb_policy != NULL) { grpc_pollset_set_del_pollset_set(exec_ctx, diff --git a/src/core/lib/iomgr/closure.c b/src/core/lib/iomgr/closure.c index 866110d89ca..0b6c3b25392 100644 --- a/src/core/lib/iomgr/closure.c +++ b/src/core/lib/iomgr/closure.c @@ -43,7 +43,10 @@ void grpc_closure_init(grpc_closure *closure, grpc_iomgr_cb_func cb, void grpc_closure_list_append(grpc_closure_list *closure_list, grpc_closure *closure, grpc_error *error) { - if (closure == NULL) return; + if (closure == NULL) { + GRPC_ERROR_UNREF(error); + return; + } closure->error = error; closure->next_data.next = NULL; if (closure_list->head == NULL) { diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index cc0265737a3..d67eb6e4252 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -158,10 +158,11 @@ static bool is_special(grpc_error *err) { err == GRPC_ERROR_CANCELLED; } -grpc_error *grpc_error_ref(grpc_error *err, const char *file, int line) { +grpc_error *grpc_error_ref(grpc_error *err, const char *file, int line, + const char *func) { if (is_special(err)) return err; - gpr_log(GPR_DEBUG, "%p: %d -> %d [%s:%d]", err, err->refs.count, - err->refs.count + 1, file, line); + gpr_log(GPR_DEBUG, "%p: %d -> %d [%s:%d %s]", err, err->refs.count, + err->refs.count + 1, file, line, func); gpr_ref(&err->refs); return err; } @@ -175,10 +176,11 @@ static void error_destroy(grpc_error *err) { gpr_free(err); } -void grpc_error_unref(grpc_error *err, const char *file, int line) { +void grpc_error_unref(grpc_error *err, const char *file, int line, + const char *func) { if (is_special(err)) return; - gpr_log(GPR_DEBUG, "%p: %d -> %d [%s:%d]", err, err->refs.count, - err->refs.count - 1, file, line); + gpr_log(GPR_DEBUG, "%p: %d -> %d [%s:%d %s]", err, err->refs.count, + err->refs.count - 1, file, line, func); if (gpr_unref(&err->refs)) { error_destroy(err); } @@ -191,6 +193,7 @@ grpc_error *grpc_error_create(const char *file, int line, const char *desc, if (err == NULL) { // TODO(ctiller): make gpr_malloc return NULL return GRPC_ERROR_OOM; } + gpr_log(GPR_DEBUG, "%p create [%s:%d]", err, file, line); err->ints = gpr_avl_add(gpr_avl_create(&avl_vtable_ints), (void *)(uintptr_t)GRPC_ERROR_INT_FILE_LINE, (void *)(uintptr_t)line); diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index 2b56aede756..266a621704d 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -97,10 +97,13 @@ grpc_error *grpc_error_create(const char *file, int line, const char *desc, #define GRPC_ERROR_CREATE_REFERENCING(desc, errs, count) \ grpc_error_create(__FILE__, __LINE__, desc, errs, count) -grpc_error *grpc_error_ref(grpc_error *err, const char *file, int line); -void grpc_error_unref(grpc_error *err, const char *file, int line); -#define GRPC_ERROR_REF(err) grpc_error_ref(err, __FILE__, __LINE__) -#define GRPC_ERROR_UNREF(err) grpc_error_unref(err, __FILE__, __LINE__) +grpc_error *grpc_error_ref(grpc_error *err, const char *file, int line, + const char *func); +void grpc_error_unref(grpc_error *err, const char *file, int line, + const char *func); +#define GRPC_ERROR_REF(err) grpc_error_ref(err, __FILE__, __LINE__, __func__) +#define GRPC_ERROR_UNREF(err) \ + grpc_error_unref(err, __FILE__, __LINE__, __func__) grpc_error *grpc_error_set_int(grpc_error *src, grpc_error_ints which, intptr_t value); diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 66bdb7b213c..1ad635710a5 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1119,6 +1119,8 @@ static void finish_batch(grpc_exec_ctx *exec_ctx, void *bctlp, grpc_call *child_call; grpc_call *next_child_call; + GRPC_ERROR_REF(error); + gpr_mu_lock(&call->mu); if (bctl->send_initial_metadata) { if (error != GRPC_ERROR_NONE) { @@ -1170,7 +1172,7 @@ static void finish_batch(grpc_exec_ctx *exec_ctx, void *bctlp, GRPC_ERROR_UNREF(error); error = GRPC_ERROR_NONE; } - bctl->error = GRPC_ERROR_REF(error); + bctl->error = error; gpr_mu_unlock(&call->mu); if (gpr_unref(&bctl->steps_to_complete)) { post_batch_completion(exec_ctx, bctl); From 71d28ad3b50068a677254e01c514eb0f7290063c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 7 May 2016 21:48:44 -0700 Subject: [PATCH 0358/1894] Fix refcounting --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 6 +++++- src/core/lib/iomgr/endpoint_pair_posix.c | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index dfee1e0b6cb..41d983cb709 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -428,7 +428,7 @@ static void close_transport_locked(grpc_exec_ctx *exec_ctx, if (!t->closed) { t->closed = 1; connectivity_state_set(exec_ctx, &t->global, GRPC_CHANNEL_FATAL_FAILURE, - error, "close_transport"); + GRPC_ERROR_REF(error), "close_transport"); if (t->ep) { allow_endpoint_shutdown_locked(exec_ctx, t); } @@ -441,6 +441,7 @@ static void close_transport_locked(grpc_exec_ctx *exec_ctx, GRPC_CHTTP2_STREAM_UNREF(exec_ctx, stream_global, "chttp2_writing"); } } + GRPC_ERROR_UNREF(error); } #ifdef GRPC_STREAM_REFCOUNT_DEBUG @@ -1587,6 +1588,9 @@ static void parsing_action(grpc_exec_ctx *exec_ctx, void *arg, ? GRPC_ERROR_NONE : GRPC_ERROR_CREATE_REFERENCING("Failed parsing HTTP/2", errors, GPR_ARRAY_SIZE(errors)); + for (i = 0; i < GPR_ARRAY_SIZE(errors); i++) { + GRPC_ERROR_UNREF(errors[i]); + } GPR_TIMER_END("reading_action.parse", 0); grpc_chttp2_run_with_global_lock(exec_ctx, t, NULL, post_parse_locked, err, 0); diff --git a/src/core/lib/iomgr/endpoint_pair_posix.c b/src/core/lib/iomgr/endpoint_pair_posix.c index e0ce47c7731..e295fb4867a 100644 --- a/src/core/lib/iomgr/endpoint_pair_posix.c +++ b/src/core/lib/iomgr/endpoint_pair_posix.c @@ -58,8 +58,8 @@ static void create_sockets(int sv[2]) { GPR_ASSERT(fcntl(sv[0], F_SETFL, flags | O_NONBLOCK) == 0); flags = fcntl(sv[1], F_GETFL, 0); GPR_ASSERT(fcntl(sv[1], F_SETFL, flags | O_NONBLOCK) == 0); - GPR_ASSERT(grpc_set_socket_no_sigpipe_if_possible(sv[0])); - GPR_ASSERT(grpc_set_socket_no_sigpipe_if_possible(sv[1])); + GPR_ASSERT(grpc_set_socket_no_sigpipe_if_possible(sv[0]) == GRPC_ERROR_NONE); + GPR_ASSERT(grpc_set_socket_no_sigpipe_if_possible(sv[1]) == GRPC_ERROR_NONE); } grpc_endpoint_pair grpc_iomgr_create_endpoint_pair(const char *name, From 965eab3aa2eb56cfa5df068390c71d513b1655e3 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sat, 7 May 2016 22:11:37 -0700 Subject: [PATCH 0359/1894] Fix refcounting --- include/grpc/support/avl.h | 3 +++ .../chttp2/transport/chttp2_transport.c | 1 + .../ext/transport/chttp2/transport/parsing.c | 19 ++++++++++--------- src/core/lib/iomgr/error.c | 9 +++++++-- src/core/lib/iomgr/error.h | 2 +- src/core/lib/support/avl.c | 9 +++++++++ 6 files changed, 31 insertions(+), 12 deletions(-) diff --git a/include/grpc/support/avl.h b/include/grpc/support/avl.h index 7e8e6378f72..f5bf32c7190 100644 --- a/include/grpc/support/avl.h +++ b/include/grpc/support/avl.h @@ -88,6 +88,9 @@ GPRAPI gpr_avl gpr_avl_remove(gpr_avl avl, void *key); does not mutate avl. returns NULL if key is not found. */ GPRAPI void *gpr_avl_get(gpr_avl avl, void *key); +/** Return 1 if avl contains key, 0 otherwise; if it has the key, sets *value to + its value*/ +GPRAPI int gpr_avl_maybe_get(gpr_avl avl, void *key, void **value); /** Return 1 if avl is empty, 0 otherwise */ GPRAPI int gpr_avl_is_empty(gpr_avl avl); diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 41d983cb709..1b1dcabe71a 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -866,6 +866,7 @@ void grpc_chttp2_complete_closure_step(grpc_exec_ctx *exec_ctx, grpc_error *error) { grpc_closure *closure = *pclosure; if (closure == NULL) { + GRPC_ERROR_UNREF(error); return; } closure->next_data.scratch -= CLOSURE_BARRIER_FIRST_REF_BIT; diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index 24b7de0f790..128e22ae421 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -225,14 +225,15 @@ void grpc_chttp2_publish_reads( } if (stream_parsing->forced_close_error != GRPC_ERROR_NONE) { - const intptr_t *reason = grpc_error_get_int( - stream_parsing->forced_close_error, GRPC_ERROR_INT_HTTP2_ERROR); - if (reason == NULL || *reason != GRPC_CHTTP2_NO_ERROR) { + intptr_t reason; + bool has_reason = grpc_error_get_int(stream_parsing->forced_close_error, + GRPC_ERROR_INT_HTTP2_ERROR, &reason); + if (has_reason || reason != GRPC_CHTTP2_NO_ERROR) { grpc_status_code status_code = - reason == NULL ? GRPC_STATUS_INTERNAL - : grpc_chttp2_http2_error_to_grpc_status( - (grpc_chttp2_error_code) - stream_parsing->rst_stream_reason); + has_reason + ? grpc_chttp2_http2_error_to_grpc_status( + (grpc_chttp2_error_code)stream_parsing->rst_stream_reason) + : GRPC_STATUS_INTERNAL; const char *status_details = grpc_error_string(stream_parsing->forced_close_error); gpr_slice slice_details = gpr_slice_from_copied_string(status_details); @@ -609,7 +610,7 @@ static grpc_error *init_data_frame_parser( transport_parsing->parser = grpc_chttp2_data_parser_parse; transport_parsing->parser_data = &stream_parsing->data_parser; return GRPC_ERROR_NONE; - } else if (grpc_error_get_int(err, GRPC_ERROR_INT_STREAM_ID)) { + } else if (grpc_error_get_int(err, GRPC_ERROR_INT_STREAM_ID, NULL)) { /* handle stream errors by closing the stream */ stream_parsing->received_close = 1; stream_parsing->forced_close_error = err; @@ -907,7 +908,7 @@ static grpc_error *parse_frame_slice( stream_parsing); } return GRPC_ERROR_NONE; - } else if (grpc_error_get_int(err, GRPC_ERROR_INT_STREAM_ID) != NULL) { + } else if (grpc_error_get_int(err, GRPC_ERROR_INT_STREAM_ID, NULL)) { if (grpc_http_trace) { const char *msg = grpc_error_string(err); gpr_log(GPR_ERROR, "%s", msg); diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index d67eb6e4252..6d16a54d576 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -240,8 +240,13 @@ grpc_error *grpc_error_set_int(grpc_error *src, grpc_error_ints which, return new; } -const intptr_t *grpc_error_get_int(grpc_error *err, grpc_error_ints which) { - return gpr_avl_get(err->ints, (void *)(uintptr_t)which); +bool grpc_error_get_int(grpc_error *err, grpc_error_ints which, intptr_t *p) { + void *pp; + if (gpr_avl_maybe_get(err->ints, (void *)(uintptr_t)which, &pp)) { + if (p != NULL) *p = (intptr_t)pp; + return true; + } + return false; } grpc_error *grpc_error_set_str(grpc_error *src, grpc_error_strs which, diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index 266a621704d..2b9b9f00c08 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -107,7 +107,7 @@ void grpc_error_unref(grpc_error *err, const char *file, int line, grpc_error *grpc_error_set_int(grpc_error *src, grpc_error_ints which, intptr_t value); -const intptr_t *grpc_error_get_int(grpc_error *error, grpc_error_ints which); +bool grpc_error_get_int(grpc_error *error, grpc_error_ints which, intptr_t *p); grpc_error *grpc_error_set_time(grpc_error *src, grpc_error_times which, gpr_timespec value); grpc_error *grpc_error_set_str(grpc_error *src, grpc_error_strs which, diff --git a/src/core/lib/support/avl.c b/src/core/lib/support/avl.c index ceded9d2669..acf8fd5a552 100644 --- a/src/core/lib/support/avl.c +++ b/src/core/lib/support/avl.c @@ -124,6 +124,15 @@ void *gpr_avl_get(gpr_avl avl, void *key) { return node ? node->value : NULL; } +int gpr_avl_maybe_get(gpr_avl avl, void *key, void **value) { + gpr_avl_node *node = get(avl.vtable, avl.root, key); + if (node != NULL) { + *value = node->value; + return 1; + } + return 0; +} + static gpr_avl_node *rotate_left(const gpr_avl_vtable *vtable, void *key, void *value, gpr_avl_node *left, gpr_avl_node *right) { From d7faf55bee4739b19535a52b9568ee849bcacdd7 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sun, 8 May 2016 09:55:28 -0700 Subject: [PATCH 0360/1894] Refcounting fix --- src/core/ext/client_config/channel_connectivity.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/ext/client_config/channel_connectivity.c b/src/core/ext/client_config/channel_connectivity.c index 9bbb09fa396..ac685e11ea7 100644 --- a/src/core/ext/client_config/channel_connectivity.c +++ b/src/core/ext/client_config/channel_connectivity.c @@ -95,6 +95,7 @@ static void delete_state_watcher(grpc_exec_ctx *exec_ctx, state_watcher *w) { abort(); } gpr_mu_destroy(&w->mu); + GRPC_ERROR_UNREF(w->error); gpr_free(w); } From abd1b38885a171fe5f54293581e8f5f67680f358 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Sun, 8 May 2016 18:47:40 -0700 Subject: [PATCH 0361/1894] comment out the right scenario --- .../run_tests/performance/scenario_config.py | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index 746945b617d..d3937096231 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -259,11 +259,12 @@ class CSharpLanguage: 'csharp_protobuf_sync_to_async_unary_ping_pong', rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='ASYNC_SERVER') - yield _ping_pong_scenario( - 'csharp_protobuf_async_unary_qps_unconstrained', rpc_type='UNARY', - client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', - use_unconstrained_client=True, - categories=[SMOKETEST]) + # TODO(jtattermusch): scenario works locally but fails on jenkins + #yield _ping_pong_scenario( + # 'csharp_protobuf_async_unary_qps_unconstrained', rpc_type='UNARY', + # client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + # use_unconstrained_client=True, + # categories=[SMOKETEST]) # TODO(jtattermusch): scenario works locally but fails on jenkins #yield _ping_pong_scenario( @@ -271,12 +272,11 @@ class CSharpLanguage: # client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', # use_unconstrained_client=True) - # TODO(jtattermusch): scenario works locally but fails on jenkins - #yield _ping_pong_scenario( - # 'csharp_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY', - # client_type='SYNC_CLIENT', server_type='SYNC_SERVER', - # server_language='c++', server_core_limit=1, async_server_threads=1, - # categories=[SMOKETEST]) + yield _ping_pong_scenario( + 'csharp_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY', + client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + server_language='c++', server_core_limit=1, async_server_threads=1, + categories=[SMOKETEST]) yield _ping_pong_scenario( 'csharp_to_cpp_protobuf_async_streaming_ping_pong', rpc_type='STREAMING', From 42342cbebb55ee168252accb0433b1bb6cc8e4a7 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 9 May 2016 08:12:35 -0700 Subject: [PATCH 0362/1894] Revert "cronet wrapper code" --- BUILD | 80 --- Makefile | 7 - binding.gyp | 3 - build.yaml | 59 -- config.m4 | 5 - gRPC.podspec | 76 --- grpc.def | 1 - grpc.gemspec | 40 -- include/grpc/grpc_cronet.h | 51 -- package.xml | 40 -- .../client/secure/cronet_channel_create.c | 69 -- .../cronet/transport/cronet_api_dummy.c | 85 --- .../cronet/transport/cronet_transport.c | 640 ------------------ .../grpcio/grpc/_cython/imports.generated.c | 2 - .../grpcio/grpc/_cython/imports.generated.h | 4 - src/python/grpcio/grpc_core_dependencies.py | 3 - src/ruby/ext/grpc/rb_grpc_imports.generated.c | 2 - src/ruby/ext/grpc/rb_grpc_imports.generated.h | 4 - .../core/surface/public_headers_must_be_c89.c | 1 - .../objective_c/Cronet/cronet_c_for_grpc.h | 202 ------ tools/doxygen/Doxyfile.core | 1 - tools/doxygen/Doxyfile.core.internal | 40 -- tools/run_tests/sources_and_headers.json | 120 +--- vsprojects/vcxproj/grpc/grpc.vcxproj | 43 -- vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 144 ---- 25 files changed, 1 insertion(+), 1721 deletions(-) delete mode 100644 include/grpc/grpc_cronet.h delete mode 100644 src/core/ext/transport/cronet/client/secure/cronet_channel_create.c delete mode 100644 src/core/ext/transport/cronet/transport/cronet_api_dummy.c delete mode 100644 src/core/ext/transport/cronet/transport/cronet_transport.c delete mode 100644 third_party/objective_c/Cronet/cronet_c_for_grpc.h diff --git a/BUILD b/BUILD index fae3596eec6..1da16504388 100644 --- a/BUILD +++ b/BUILD @@ -285,42 +285,6 @@ cc_library( "src/core/ext/client_config/subchannel_call_holder.h", "src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/uri_parser.h", - "include/grpc/byte_buffer.h", - "include/grpc/grpc.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", - "include/grpc/status.h", - "include/grpc/support/alloc.h", - "include/grpc/support/atm.h", - "include/grpc/support/host_port.h", - "include/grpc/support/log.h", - "include/grpc/support/port_platform.h", - "include/grpc/support/slice.h", - "include/grpc/support/slice_buffer.h", - "include/grpc/support/string_util.h", - "include/grpc/support/sync.h", - "include/grpc/support/time.h", - "include/grpc/support/useful.h", - "src/core/lib/support/string.h", - "third_party/objective_c/Cronet/cronet_c_for_grpc.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", "src/core/ext/census/aggregation.h", @@ -475,9 +439,6 @@ cc_library( "src/core/ext/client_config/uri_parser.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", - "src/core/ext/transport/cronet/client/secure/cronet_channel_create.c", - "src/core/ext/transport/cronet/transport/cronet_api_dummy.c", - "src/core/ext/transport/cronet/transport/cronet_transport.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", @@ -522,7 +483,6 @@ cc_library( "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/time.h", - "include/grpc/grpc_cronet.h", "include/grpc/grpc_security.h", "include/grpc/grpc_security_constants.h", "include/grpc/census.h", @@ -1500,9 +1460,6 @@ objc_library( "src/core/ext/client_config/uri_parser.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", - "src/core/ext/transport/cronet/client/secure/cronet_channel_create.c", - "src/core/ext/transport/cronet/transport/cronet_api_dummy.c", - "src/core/ext/transport/cronet/transport/cronet_transport.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", @@ -1547,7 +1504,6 @@ objc_library( "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/time.h", - "include/grpc/grpc_cronet.h", "include/grpc/grpc_security.h", "include/grpc/grpc_security_constants.h", "include/grpc/census.h", @@ -1675,42 +1631,6 @@ objc_library( "src/core/ext/client_config/subchannel_call_holder.h", "src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/uri_parser.h", - "include/grpc/byte_buffer.h", - "include/grpc/grpc.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", - "include/grpc/status.h", - "include/grpc/support/alloc.h", - "include/grpc/support/atm.h", - "include/grpc/support/host_port.h", - "include/grpc/support/log.h", - "include/grpc/support/port_platform.h", - "include/grpc/support/slice.h", - "include/grpc/support/slice_buffer.h", - "include/grpc/support/string_util.h", - "include/grpc/support/sync.h", - "include/grpc/support/time.h", - "include/grpc/support/useful.h", - "src/core/lib/support/string.h", - "third_party/objective_c/Cronet/cronet_c_for_grpc.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", "src/core/ext/census/aggregation.h", diff --git a/Makefile b/Makefile index a684ea8611a..ffaf7701447 100644 --- a/Makefile +++ b/Makefile @@ -2623,9 +2623,6 @@ LIBGRPC_SRC = \ src/core/ext/client_config/uri_parser.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ - src/core/ext/transport/cronet/client/secure/cronet_channel_create.c \ - src/core/ext/transport/cronet/transport/cronet_api_dummy.c \ - src/core/ext/transport/cronet/transport/cronet_transport.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ @@ -2673,7 +2670,6 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_win32.h \ include/grpc/impl/codegen/time.h \ - include/grpc/grpc_cronet.h \ include/grpc/grpc_security.h \ include/grpc/grpc_security_constants.h \ include/grpc/census.h \ @@ -14321,9 +14317,6 @@ ifneq ($(OPENSSL_DEP),) # otherwise parallel compilation will fail if a source is compiled first. src/core/ext/transport/chttp2/client/secure/secure_channel_create.c: $(OPENSSL_DEP) src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c: $(OPENSSL_DEP) -src/core/ext/transport/cronet/client/secure/cronet_channel_create.c: $(OPENSSL_DEP) -src/core/ext/transport/cronet/transport/cronet_api_dummy.c: $(OPENSSL_DEP) -src/core/ext/transport/cronet/transport/cronet_transport.c: $(OPENSSL_DEP) src/core/lib/http/httpcli_security_connector.c: $(OPENSSL_DEP) src/core/lib/security/b64.c: $(OPENSSL_DEP) src/core/lib/security/client_auth_filter.c: $(OPENSSL_DEP) diff --git a/binding.gyp b/binding.gyp index 12a745ffb01..4314ab7243d 100644 --- a/binding.gyp +++ b/binding.gyp @@ -709,9 +709,6 @@ 'src/core/ext/client_config/uri_parser.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', - 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.c', - 'src/core/ext/transport/cronet/transport/cronet_api_dummy.c', - 'src/core/ext/transport/cronet/transport/cronet_transport.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c', 'third_party/nanopb/pb_common.c', diff --git a/build.yaml b/build.yaml index 13916830c1e..5e47c084555 100644 --- a/build.yaml +++ b/build.yaml @@ -400,7 +400,6 @@ filegroups: - grpc_client_config - name: grpc_secure public_headers: - - include/grpc/grpc_cronet.h - include/grpc/grpc_security.h - include/grpc/grpc_security_constants.h headers: @@ -548,63 +547,6 @@ filegroups: - grpc_transport_chttp2 - grpc_base - grpc_secure -- name: grpc_transport_cronet_client_secure - headers: - - include/grpc/byte_buffer.h - - include/grpc/grpc.h - - include/grpc/impl/codegen/alloc.h - - include/grpc/impl/codegen/atm.h - - include/grpc/impl/codegen/atm_gcc_atomic.h - - include/grpc/impl/codegen/atm_gcc_sync.h - - include/grpc/impl/codegen/atm_win32.h - - include/grpc/impl/codegen/byte_buffer.h - - include/grpc/impl/codegen/compression_types.h - - include/grpc/impl/codegen/connectivity_state.h - - include/grpc/impl/codegen/grpc_types.h - - include/grpc/impl/codegen/log.h - - include/grpc/impl/codegen/port_platform.h - - include/grpc/impl/codegen/propagation_bits.h - - include/grpc/impl/codegen/slice.h - - include/grpc/impl/codegen/slice_buffer.h - - include/grpc/impl/codegen/status.h - - include/grpc/impl/codegen/sync.h - - include/grpc/impl/codegen/sync_generic.h - - include/grpc/impl/codegen/sync_posix.h - - include/grpc/impl/codegen/sync_win32.h - - include/grpc/impl/codegen/time.h - - include/grpc/status.h - - include/grpc/support/alloc.h - - include/grpc/support/atm.h - - include/grpc/support/host_port.h - - include/grpc/support/log.h - - include/grpc/support/port_platform.h - - include/grpc/support/slice.h - - include/grpc/support/slice_buffer.h - - include/grpc/support/string_util.h - - include/grpc/support/sync.h - - include/grpc/support/time.h - - include/grpc/support/useful.h - - src/core/ext/transport/chttp2/transport/incoming_metadata.h - - src/core/lib/channel/channel_stack.h - - src/core/lib/channel/context.h - - src/core/lib/debug/trace.h - - src/core/lib/iomgr/closure.h - - src/core/lib/iomgr/exec_ctx.h - - src/core/lib/iomgr/pollset.h - - src/core/lib/iomgr/pollset_set.h - - src/core/lib/support/string.h - - src/core/lib/surface/channel.h - - src/core/lib/surface/channel_stack_type.h - - src/core/lib/transport/byte_stream.h - - src/core/lib/transport/metadata.h - - src/core/lib/transport/metadata_batch.h - - src/core/lib/transport/transport.h - - src/core/lib/transport/transport_impl.h - - third_party/objective_c/Cronet/cronet_c_for_grpc.h - src: - - src/core/ext/transport/cronet/client/secure/cronet_channel_create.c - - src/core/ext/transport/cronet/transport/cronet_api_dummy.c - - src/core/ext/transport/cronet/transport/cronet_transport.c - name: nanopb headers: - third_party/nanopb/pb.h @@ -792,7 +734,6 @@ libs: - grpc_transport_chttp2_client_secure - grpc_transport_chttp2_server_insecure - grpc_transport_chttp2_client_insecure - - grpc_transport_cronet_client_secure - grpc_lb_policy_grpclb - grpc_lb_policy_pick_first - grpc_lb_policy_round_robin diff --git a/config.m4 b/config.m4 index 5259e679ba9..74f9ad242ab 100644 --- a/config.m4 +++ b/config.m4 @@ -228,9 +228,6 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/client_config/uri_parser.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ - src/core/ext/transport/cronet/client/secure/cronet_channel_create.c \ - src/core/ext/transport/cronet/transport/cronet_api_dummy.c \ - src/core/ext/transport/cronet/transport/cronet_transport.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ @@ -569,8 +566,6 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/server/insecure) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/server/secure) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/transport) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/cronet/client/secure) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/cronet/transport) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/channel) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/compression) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/debug) diff --git a/gRPC.podspec b/gRPC.podspec index 018306ca643..569f89bf7c0 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -287,42 +287,6 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/subchannel_call_holder.h', 'src/core/ext/client_config/subchannel_index.h', 'src/core/ext/client_config/uri_parser.h', - 'include/grpc/byte_buffer.h', - 'include/grpc/grpc.h', - 'include/grpc/impl/codegen/alloc.h', - 'include/grpc/impl/codegen/atm.h', - 'include/grpc/impl/codegen/atm_gcc_atomic.h', - 'include/grpc/impl/codegen/atm_gcc_sync.h', - 'include/grpc/impl/codegen/atm_win32.h', - 'include/grpc/impl/codegen/byte_buffer.h', - 'include/grpc/impl/codegen/compression_types.h', - 'include/grpc/impl/codegen/connectivity_state.h', - 'include/grpc/impl/codegen/grpc_types.h', - 'include/grpc/impl/codegen/log.h', - 'include/grpc/impl/codegen/port_platform.h', - 'include/grpc/impl/codegen/propagation_bits.h', - 'include/grpc/impl/codegen/slice.h', - 'include/grpc/impl/codegen/slice_buffer.h', - 'include/grpc/impl/codegen/status.h', - 'include/grpc/impl/codegen/sync.h', - 'include/grpc/impl/codegen/sync_generic.h', - 'include/grpc/impl/codegen/sync_posix.h', - 'include/grpc/impl/codegen/sync_win32.h', - 'include/grpc/impl/codegen/time.h', - 'include/grpc/status.h', - 'include/grpc/support/alloc.h', - 'include/grpc/support/atm.h', - 'include/grpc/support/host_port.h', - 'include/grpc/support/log.h', - 'include/grpc/support/port_platform.h', - 'include/grpc/support/slice.h', - 'include/grpc/support/slice_buffer.h', - 'include/grpc/support/string_util.h', - 'include/grpc/support/sync.h', - 'include/grpc/support/time.h', - 'include/grpc/support/useful.h', - 'src/core/lib/support/string.h', - 'third_party/objective_c/Cronet/cronet_c_for_grpc.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h', 'third_party/nanopb/pb.h', @@ -361,7 +325,6 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/sync_posix.h', 'include/grpc/impl/codegen/sync_win32.h', 'include/grpc/impl/codegen/time.h', - 'include/grpc/grpc_cronet.h', 'include/grpc/grpc_security.h', 'include/grpc/grpc_security_constants.h', 'include/grpc/census.h', @@ -511,9 +474,6 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/uri_parser.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', - 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.c', - 'src/core/ext/transport/cronet/transport/cronet_api_dummy.c', - 'src/core/ext/transport/cronet/transport/cronet_transport.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c', 'third_party/nanopb/pb_common.c', @@ -670,42 +630,6 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/subchannel_call_holder.h', 'src/core/ext/client_config/subchannel_index.h', 'src/core/ext/client_config/uri_parser.h', - 'include/grpc/byte_buffer.h', - 'include/grpc/grpc.h', - 'include/grpc/impl/codegen/alloc.h', - 'include/grpc/impl/codegen/atm.h', - 'include/grpc/impl/codegen/atm_gcc_atomic.h', - 'include/grpc/impl/codegen/atm_gcc_sync.h', - 'include/grpc/impl/codegen/atm_win32.h', - 'include/grpc/impl/codegen/byte_buffer.h', - 'include/grpc/impl/codegen/compression_types.h', - 'include/grpc/impl/codegen/connectivity_state.h', - 'include/grpc/impl/codegen/grpc_types.h', - 'include/grpc/impl/codegen/log.h', - 'include/grpc/impl/codegen/port_platform.h', - 'include/grpc/impl/codegen/propagation_bits.h', - 'include/grpc/impl/codegen/slice.h', - 'include/grpc/impl/codegen/slice_buffer.h', - 'include/grpc/impl/codegen/status.h', - 'include/grpc/impl/codegen/sync.h', - 'include/grpc/impl/codegen/sync_generic.h', - 'include/grpc/impl/codegen/sync_posix.h', - 'include/grpc/impl/codegen/sync_win32.h', - 'include/grpc/impl/codegen/time.h', - 'include/grpc/status.h', - 'include/grpc/support/alloc.h', - 'include/grpc/support/atm.h', - 'include/grpc/support/host_port.h', - 'include/grpc/support/log.h', - 'include/grpc/support/port_platform.h', - 'include/grpc/support/slice.h', - 'include/grpc/support/slice_buffer.h', - 'include/grpc/support/string_util.h', - 'include/grpc/support/sync.h', - 'include/grpc/support/time.h', - 'include/grpc/support/useful.h', - 'src/core/lib/support/string.h', - 'third_party/objective_c/Cronet/cronet_c_for_grpc.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h', 'third_party/nanopb/pb.h', diff --git a/grpc.def b/grpc.def index 09a94a6cd0c..61948ed1b89 100644 --- a/grpc.def +++ b/grpc.def @@ -87,7 +87,6 @@ EXPORTS grpc_header_nonbin_value_is_legal grpc_is_binary_header grpc_call_error_to_string - grpc_cronet_secure_channel_create grpc_auth_property_iterator_next grpc_auth_context_property_iterator grpc_auth_context_peer_identity diff --git a/grpc.gemspec b/grpc.gemspec index ace28715dcd..475fc990ad4 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -169,7 +169,6 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/impl/codegen/sync_posix.h ) s.files += %w( include/grpc/impl/codegen/sync_win32.h ) s.files += %w( include/grpc/impl/codegen/time.h ) - s.files += %w( include/grpc/grpc_cronet.h ) s.files += %w( include/grpc/grpc_security.h ) s.files += %w( include/grpc/grpc_security_constants.h ) s.files += %w( include/grpc/census.h ) @@ -297,42 +296,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_config/subchannel_call_holder.h ) s.files += %w( src/core/ext/client_config/subchannel_index.h ) s.files += %w( src/core/ext/client_config/uri_parser.h ) - s.files += %w( include/grpc/byte_buffer.h ) - s.files += %w( include/grpc/grpc.h ) - s.files += %w( include/grpc/impl/codegen/alloc.h ) - s.files += %w( include/grpc/impl/codegen/atm.h ) - s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h ) - s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h ) - s.files += %w( include/grpc/impl/codegen/atm_win32.h ) - s.files += %w( include/grpc/impl/codegen/byte_buffer.h ) - s.files += %w( include/grpc/impl/codegen/compression_types.h ) - s.files += %w( include/grpc/impl/codegen/connectivity_state.h ) - s.files += %w( include/grpc/impl/codegen/grpc_types.h ) - s.files += %w( include/grpc/impl/codegen/log.h ) - s.files += %w( include/grpc/impl/codegen/port_platform.h ) - s.files += %w( include/grpc/impl/codegen/propagation_bits.h ) - s.files += %w( include/grpc/impl/codegen/slice.h ) - s.files += %w( include/grpc/impl/codegen/slice_buffer.h ) - s.files += %w( include/grpc/impl/codegen/status.h ) - s.files += %w( include/grpc/impl/codegen/sync.h ) - s.files += %w( include/grpc/impl/codegen/sync_generic.h ) - s.files += %w( include/grpc/impl/codegen/sync_posix.h ) - s.files += %w( include/grpc/impl/codegen/sync_win32.h ) - s.files += %w( include/grpc/impl/codegen/time.h ) - s.files += %w( include/grpc/status.h ) - s.files += %w( include/grpc/support/alloc.h ) - s.files += %w( include/grpc/support/atm.h ) - s.files += %w( include/grpc/support/host_port.h ) - s.files += %w( include/grpc/support/log.h ) - s.files += %w( include/grpc/support/port_platform.h ) - s.files += %w( include/grpc/support/slice.h ) - s.files += %w( include/grpc/support/slice_buffer.h ) - s.files += %w( include/grpc/support/string_util.h ) - s.files += %w( include/grpc/support/sync.h ) - s.files += %w( include/grpc/support/time.h ) - s.files += %w( include/grpc/support/useful.h ) - s.files += %w( src/core/lib/support/string.h ) - s.files += %w( third_party/objective_c/Cronet/cronet_c_for_grpc.h ) s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.h ) s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h ) s.files += %w( third_party/nanopb/pb.h ) @@ -491,9 +454,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_config/uri_parser.c ) s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2.c ) s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create.c ) - s.files += %w( src/core/ext/transport/cronet/client/secure/cronet_channel_create.c ) - s.files += %w( src/core/ext/transport/cronet/transport/cronet_api_dummy.c ) - s.files += %w( src/core/ext/transport/cronet/transport/cronet_transport.c ) s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.c ) s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c ) s.files += %w( third_party/nanopb/pb_common.c ) diff --git a/include/grpc/grpc_cronet.h b/include/grpc/grpc_cronet.h deleted file mode 100644 index 295e0f55e80..00000000000 --- a/include/grpc/grpc_cronet.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright 2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef GRPC_GRPC_CRONET_H -#define GRPC_GRPC_CRONET_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -GRPCAPI grpc_channel *grpc_cronet_secure_channel_create( - void *engine, const char *target, const grpc_channel_args *args, - void *reserved); - -#ifdef __cplusplus -} -#endif - -#endif /* GRPC_GRPC_CRONET_H */ diff --git a/package.xml b/package.xml index 152d5d61904..feb27175a9b 100644 --- a/package.xml +++ b/package.xml @@ -176,7 +176,6 @@ - @@ -304,42 +303,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -498,9 +461,6 @@ - - - diff --git a/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c b/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c deleted file mode 100644 index df1acddcc08..00000000000 --- a/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * - * Copyright 2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include - -#include -#include - -#include -#include - -#include "src/core/lib/surface/channel.h" -#include "src/core/lib/transport/transport_impl.h" - -// Cronet transport object -typedef struct cronet_transport { - grpc_transport base; // must be first element in this structure - void *engine; - char *host; -} cronet_transport; - -extern grpc_transport_vtable grpc_cronet_vtable; - -GRPCAPI grpc_channel *grpc_cronet_secure_channel_create( - void *engine, const char *target, const grpc_channel_args *args, - void *reserved) { - cronet_transport *ct = gpr_malloc(sizeof(cronet_transport)); - ct->base.vtable = &grpc_cronet_vtable; - ct->engine = engine; - ct->host = gpr_malloc(strlen(target) + 1); - strcpy(ct->host, target); - gpr_log(GPR_DEBUG, - "grpc_create_cronet_transport: cronet_engine = %p, target=%s", engine, - ct->host); - - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - return grpc_channel_create(&exec_ctx, target, args, - GRPC_CLIENT_DIRECT_CHANNEL, (grpc_transport *)ct); -} diff --git a/src/core/ext/transport/cronet/transport/cronet_api_dummy.c b/src/core/ext/transport/cronet/transport/cronet_api_dummy.c deleted file mode 100644 index 687026c9fde..00000000000 --- a/src/core/ext/transport/cronet/transport/cronet_api_dummy.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * - * Copyright 2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/* This file has empty implementation of all the functions exposed by the cronet -library, so we can build it in all environments */ - -#include - -#include - -#include "third_party/objective_c/Cronet/cronet_c_for_grpc.h" - -#ifdef GRPC_COMPILE_WITH_CRONET -/* link with the real CRONET library in the build system */ -#else -/* Dummy implementation of cronet API just to test for build-ability */ -cronet_bidirectional_stream* cronet_bidirectional_stream_create( - cronet_engine* engine, void* annotation, - cronet_bidirectional_stream_callback* callback) { - GPR_ASSERT(0); - return NULL; -} - -int cronet_bidirectional_stream_destroy(cronet_bidirectional_stream* stream) { - GPR_ASSERT(0); - return 0; -} - -int cronet_bidirectional_stream_start( - cronet_bidirectional_stream* stream, const char* url, int priority, - const char* method, const cronet_bidirectional_stream_header_array* headers, - bool end_of_stream) { - GPR_ASSERT(0); - return 0; -} - -int cronet_bidirectional_stream_read(cronet_bidirectional_stream* stream, - char* buffer, int capacity) { - GPR_ASSERT(0); - return 0; -} - -int cronet_bidirectional_stream_write(cronet_bidirectional_stream* stream, - const char* buffer, int count, - bool end_of_stream) { - GPR_ASSERT(0); - return 0; -} - -int cronet_bidirectional_stream_cancel(cronet_bidirectional_stream* stream) { - GPR_ASSERT(0); - return 0; -} - -#endif /* GRPC_COMPILE_WITH_CRONET */ diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c deleted file mode 100644 index 5bb085195c6..00000000000 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ /dev/null @@ -1,640 +0,0 @@ -/* - * - * Copyright 2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "src/core/ext/transport/chttp2/transport/incoming_metadata.h" -#include "src/core/lib/iomgr/exec_ctx.h" -#include "src/core/lib/support/string.h" -#include "src/core/lib/surface/channel.h" -#include "src/core/lib/transport/metadata_batch.h" -#include "src/core/lib/transport/transport_impl.h" -#include "third_party/objective_c/Cronet/cronet_c_for_grpc.h" - -#define GRPC_HEADER_SIZE_IN_BYTES 5 - -// Global flag that gets set with GRPC_TRACE env variable -int grpc_cronet_trace = 1; - -// Cronet transport object -struct grpc_cronet_transport { - grpc_transport base; /* must be first element in this structure */ - cronet_engine *engine; - char *host; -}; - -typedef struct grpc_cronet_transport grpc_cronet_transport; - -enum send_state { - CRONET_SEND_IDLE = 0, - CRONET_REQ_STARTED, - CRONET_SEND_HEADER, - CRONET_WRITE, - CRONET_WRITE_COMPLETED, -}; - -enum recv_state { - CRONET_RECV_IDLE = 0, - CRONET_RECV_READ_LENGTH, - CRONET_RECV_READ_DATA, - CRONET_RECV_CLOSED, -}; - -static const char *recv_state_name[] = { - "CRONET_RECV_IDLE", "CRONET_RECV_READ_LENGTH", "CRONET_RECV_READ_DATA,", - "CRONET_RECV_CLOSED"}; - -// Enum that identifies calling function. -enum e_caller { - PERFORM_STREAM_OP, - ON_READ_COMPLETE, - ON_RESPONSE_HEADERS_RECEIVED, - ON_RESPONSE_TRAILERS_RECEIVED -}; - -enum callback_id { - CB_SEND_INITIAL_METADATA = 0, - CB_SEND_MESSAGE, - CB_SEND_TRAILING_METADATA, - CB_RECV_MESSAGE, - CB_RECV_INITIAL_METADATA, - CB_RECV_TRAILING_METADATA, - CB_NUM_CALLBACKS -}; - -struct stream_obj { - // we store received bytes here as they trickle in. - gpr_slice_buffer write_slice_buffer; - cronet_bidirectional_stream *cbs; - gpr_slice slice; - gpr_slice_buffer read_slice_buffer; - struct grpc_slice_buffer_stream sbs; - char *read_buffer; - int remaining_read_bytes; - int total_read_bytes; - - char *write_buffer; - size_t write_buffer_size; - - // Hold the URL - char *url; - - bool response_headers_received; - bool read_requested; - bool response_trailers_received; - bool read_closed; - - // Recv message stuff - grpc_byte_buffer **recv_message; - // Initial metadata stuff - grpc_metadata_batch *recv_initial_metadata; - // Trailing metadata stuff - grpc_metadata_batch *recv_trailing_metadata; - grpc_chttp2_incoming_metadata_buffer imb; - - // This mutex protects receive state machine execution - gpr_mu recv_mu; - // we can queue up up to 2 callbacks for each OP - grpc_closure *callback_list[CB_NUM_CALLBACKS][2]; - - // storage for header - cronet_bidirectional_stream_header *headers; - uint32_t num_headers; - cronet_bidirectional_stream_header_array header_array; - // state tracking - enum recv_state cronet_recv_state; - enum send_state cronet_send_state; -}; - -typedef struct stream_obj stream_obj; - -static void next_send_step(stream_obj *s); -static void next_recv_step(stream_obj *s, enum e_caller caller); - -static void set_pollset_do_nothing(grpc_exec_ctx *exec_ctx, grpc_transport *gt, - grpc_stream *gs, grpc_pollset *pollset) {} - -static void enqueue_callbacks(grpc_closure *callback_list[]) { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - if (callback_list[0]) { - grpc_exec_ctx_enqueue(&exec_ctx, callback_list[0], true, NULL); - callback_list[0] = NULL; - } - if (callback_list[1]) { - grpc_exec_ctx_enqueue(&exec_ctx, callback_list[1], true, NULL); - callback_list[1] = NULL; - } - grpc_exec_ctx_finish(&exec_ctx); -} - -static void on_canceled(cronet_bidirectional_stream *stream) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "on_canceled %p", stream); - } -} - -static void on_failed(cronet_bidirectional_stream *stream, int net_error) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "on_failed %p, error = %d", stream, net_error); - } -} - -static void on_succeeded(cronet_bidirectional_stream *stream) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "on_succeeded %p", stream); - } -} - -static void on_response_trailers_received( - cronet_bidirectional_stream *stream, - const cronet_bidirectional_stream_header_array *trailers) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "R: on_response_trailers_received"); - } - stream_obj *s = (stream_obj *)stream->annotation; - - memset(&s->imb, 0, sizeof(s->imb)); - grpc_chttp2_incoming_metadata_buffer_init(&s->imb); - unsigned int i = 0; - for (i = 0; i < trailers->count; i++) { - grpc_chttp2_incoming_metadata_buffer_add( - &s->imb, grpc_mdelem_from_metadata_strings( - grpc_mdstr_from_string(trailers->headers[i].key), - grpc_mdstr_from_string(trailers->headers[i].value))); - } - s->response_trailers_received = true; - next_recv_step(s, ON_RESPONSE_TRAILERS_RECEIVED); -} - -static void on_write_completed(cronet_bidirectional_stream *stream, - const char *data) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "W: on_write_completed"); - } - stream_obj *s = (stream_obj *)stream->annotation; - enqueue_callbacks(s->callback_list[CB_SEND_MESSAGE]); - s->cronet_send_state = CRONET_WRITE_COMPLETED; - next_send_step(s); -} - -static void process_recv_message(stream_obj *s, const uint8_t *recv_data) { - gpr_slice read_data_slice = gpr_slice_malloc((uint32_t)s->total_read_bytes); - uint8_t *dst_p = GPR_SLICE_START_PTR(read_data_slice); - memcpy(dst_p, recv_data, (size_t)s->total_read_bytes); - gpr_slice_buffer_add(&s->read_slice_buffer, read_data_slice); - grpc_slice_buffer_stream_init(&s->sbs, &s->read_slice_buffer, 0); - *s->recv_message = (grpc_byte_buffer *)&s->sbs; -} - -static int parse_grpc_header(const uint8_t *data) { - const uint8_t *p = data + 1; - int length = 0; - length |= ((uint8_t)*p++) << 24; - length |= ((uint8_t)*p++) << 16; - length |= ((uint8_t)*p++) << 8; - length |= ((uint8_t)*p++); - return length; -} - -static void on_read_completed(cronet_bidirectional_stream *stream, char *data, - int count) { - stream_obj *s = (stream_obj *)stream->annotation; - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "R: on_read_completed count=%d, total=%d, remaining=%d", - count, s->total_read_bytes, s->remaining_read_bytes); - } - if (count > 0) { - GPR_ASSERT(s->recv_message); - s->remaining_read_bytes -= count; - next_recv_step(s, ON_READ_COMPLETE); - } else { - s->read_closed = true; - next_recv_step(s, ON_READ_COMPLETE); - } -} - -static void on_response_headers_received( - cronet_bidirectional_stream *stream, - const cronet_bidirectional_stream_header_array *headers, - const char *negotiated_protocol) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "R: on_response_headers_received"); - } - stream_obj *s = (stream_obj *)stream->annotation; - enqueue_callbacks(s->callback_list[CB_RECV_INITIAL_METADATA]); - s->response_headers_received = true; - next_recv_step(s, ON_RESPONSE_HEADERS_RECEIVED); -} - -static void on_request_headers_sent(cronet_bidirectional_stream *stream) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "W: on_request_headers_sent"); - } - stream_obj *s = (stream_obj *)stream->annotation; - enqueue_callbacks(s->callback_list[CB_SEND_INITIAL_METADATA]); - s->cronet_send_state = CRONET_SEND_HEADER; - next_send_step(s); -} - -// Callback function pointers (invoked by cronet in response to events) -static cronet_bidirectional_stream_callback callbacks = { - on_request_headers_sent, - on_response_headers_received, - on_read_completed, - on_write_completed, - on_response_trailers_received, - on_succeeded, - on_failed, - on_canceled}; - -static void invoke_closing_callback(stream_obj *s) { - grpc_chttp2_incoming_metadata_buffer_publish(&s->imb, - s->recv_trailing_metadata); - if (s->callback_list[CB_RECV_TRAILING_METADATA]) { - enqueue_callbacks(s->callback_list[CB_RECV_TRAILING_METADATA]); - } -} - -static void set_recv_state(stream_obj *s, enum recv_state state) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "next_state = %s", recv_state_name[state]); - } - s->cronet_recv_state = state; -} - -// This is invoked from perform_stream_op, and all on_xxxx callbacks. -static void next_recv_step(stream_obj *s, enum e_caller caller) { - gpr_mu_lock(&s->recv_mu); - switch (s->cronet_recv_state) { - case CRONET_RECV_IDLE: - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "cronet_recv_state = CRONET_RECV_IDLE"); - } - if (caller == PERFORM_STREAM_OP || - caller == ON_RESPONSE_HEADERS_RECEIVED) { - if (s->read_closed && s->response_trailers_received) { - invoke_closing_callback(s); - set_recv_state(s, CRONET_RECV_CLOSED); - } else if (s->response_headers_received == true && - s->read_requested == true) { - set_recv_state(s, CRONET_RECV_READ_LENGTH); - s->total_read_bytes = s->remaining_read_bytes = - GRPC_HEADER_SIZE_IN_BYTES; - GPR_ASSERT(s->read_buffer); - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "R: cronet_bidirectional_stream_read()"); - } - cronet_bidirectional_stream_read(s->cbs, s->read_buffer, - s->remaining_read_bytes); - } - } - break; - case CRONET_RECV_READ_LENGTH: - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "cronet_recv_state = CRONET_RECV_READ_LENGTH"); - } - if (caller == ON_READ_COMPLETE) { - if (s->read_closed) { - invoke_closing_callback(s); - enqueue_callbacks(s->callback_list[CB_RECV_MESSAGE]); - set_recv_state(s, CRONET_RECV_CLOSED); - } else { - GPR_ASSERT(s->remaining_read_bytes == 0); - set_recv_state(s, CRONET_RECV_READ_DATA); - s->total_read_bytes = s->remaining_read_bytes = - parse_grpc_header((const uint8_t *)s->read_buffer); - s->read_buffer = - gpr_realloc(s->read_buffer, (uint32_t)s->remaining_read_bytes); - GPR_ASSERT(s->read_buffer); - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "R: cronet_bidirectional_stream_read()"); - } - cronet_bidirectional_stream_read(s->cbs, (char *)s->read_buffer, - s->remaining_read_bytes); - } - } - break; - case CRONET_RECV_READ_DATA: - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "cronet_recv_state = CRONET_RECV_READ_DATA"); - } - if (caller == ON_READ_COMPLETE) { - if (s->remaining_read_bytes > 0) { - int offset = s->total_read_bytes - s->remaining_read_bytes; - GPR_ASSERT(s->read_buffer); - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "R: cronet_bidirectional_stream_read()"); - } - cronet_bidirectional_stream_read( - s->cbs, (char *)s->read_buffer + offset, s->remaining_read_bytes); - } else { - gpr_slice_buffer_init(&s->read_slice_buffer); - uint8_t *p = (uint8_t *)s->read_buffer; - process_recv_message(s, p); - set_recv_state(s, CRONET_RECV_IDLE); - enqueue_callbacks(s->callback_list[CB_RECV_MESSAGE]); - } - } - break; - case CRONET_RECV_CLOSED: - break; - default: - GPR_ASSERT(0); // Should not reach here - break; - } - gpr_mu_unlock(&s->recv_mu); -} - -// This function takes the data from s->write_slice_buffer and assembles into -// a contiguous byte stream with 5 byte gRPC header prepended. -static void create_grpc_frame(stream_obj *s) { - gpr_slice slice = gpr_slice_buffer_take_first(&s->write_slice_buffer); - uint8_t *raw_data = GPR_SLICE_START_PTR(slice); - size_t length = GPR_SLICE_LENGTH(slice); - s->write_buffer_size = length + GRPC_HEADER_SIZE_IN_BYTES; - s->write_buffer = gpr_realloc(s->write_buffer, s->write_buffer_size); - uint8_t *p = (uint8_t *)s->write_buffer; - // Append 5 byte header - *p++ = 0; - *p++ = (uint8_t)(length >> 24); - *p++ = (uint8_t)(length >> 16); - *p++ = (uint8_t)(length >> 8); - *p++ = (uint8_t)(length); - // append actual data - memcpy(p, raw_data, length); -} - -static void do_write(stream_obj *s) { - gpr_slice_buffer *sb = &s->write_slice_buffer; - GPR_ASSERT(sb->count <= 1); - if (sb->count > 0) { - create_grpc_frame(s); - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "W: cronet_bidirectional_stream_write"); - } - cronet_bidirectional_stream_write(s->cbs, s->write_buffer, - (int)s->write_buffer_size, false); - } -} - -// -static void next_send_step(stream_obj *s) { - switch (s->cronet_send_state) { - case CRONET_SEND_IDLE: - GPR_ASSERT( - s->cbs); // cronet_bidirectional_stream is not initialized yet. - s->cronet_send_state = CRONET_REQ_STARTED; - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "cronet_bidirectional_stream_start to %s", s->url); - } - cronet_bidirectional_stream_start(s->cbs, s->url, 0, "POST", - &s->header_array, false); - // we no longer need the memory that was allocated earlier. - gpr_free(s->header_array.headers); - break; - case CRONET_SEND_HEADER: - do_write(s); - s->cronet_send_state = CRONET_WRITE; - break; - case CRONET_WRITE_COMPLETED: - do_write(s); - break; - default: - GPR_ASSERT(0); - break; - } -} - -static void convert_metadata_to_cronet_headers(grpc_linked_mdelem *head, - const char *host, - stream_obj *s) { - grpc_linked_mdelem *curr = head; - // Walk the linked list and get number of header fields - uint32_t num_headers_available = 0; - while (curr != NULL) { - curr = curr->next; - num_headers_available++; - } - // Allocate enough memory - s->headers = (cronet_bidirectional_stream_header *)gpr_malloc( - sizeof(cronet_bidirectional_stream_header) * num_headers_available); - - // Walk the linked list again, this time copying the header fields. - // s->num_headers - // can be less than num_headers_available, as some headers are not used for - // cronet - curr = head; - s->num_headers = 0; - while (s->num_headers < num_headers_available) { - grpc_mdelem *mdelem = curr->md; - curr = curr->next; - const char *key = grpc_mdstr_as_c_string(mdelem->key); - const char *value = grpc_mdstr_as_c_string(mdelem->value); - if (strcmp(key, ":scheme") == 0 || strcmp(key, ":method") == 0 || - strcmp(key, ":authority") == 0) { - // Cronet populates these fields on its own. - continue; - } - if (strcmp(key, ":path") == 0) { - // Create URL by appending :path value to the hostname - gpr_asprintf(&s->url, "https://%s%s", host, value); - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "extracted URL = %s", s->url); - } - continue; - } - s->headers[s->num_headers].key = key; - s->headers[s->num_headers].value = value; - s->num_headers++; - if (curr == NULL) { - break; - } - } -} - -static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, - grpc_stream *gs, grpc_transport_stream_op *op) { - grpc_cronet_transport *ct = (grpc_cronet_transport *)gt; - GPR_ASSERT(ct->engine); - stream_obj *s = (stream_obj *)gs; - if (op->recv_trailing_metadata) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, - "perform_stream_op - recv_trailing_metadata: on_complete=%p", - op->on_complete); - } - s->recv_trailing_metadata = op->recv_trailing_metadata; - GPR_ASSERT(!s->callback_list[CB_RECV_TRAILING_METADATA][0]); - s->callback_list[CB_RECV_TRAILING_METADATA][0] = op->on_complete; - } - if (op->recv_message) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "perform_stream_op - recv_message: on_complete=%p", - op->on_complete); - } - s->recv_message = (grpc_byte_buffer **)op->recv_message; - GPR_ASSERT(!s->callback_list[CB_RECV_MESSAGE][0]); - GPR_ASSERT(!s->callback_list[CB_RECV_MESSAGE][1]); - s->callback_list[CB_RECV_MESSAGE][0] = op->recv_message_ready; - s->callback_list[CB_RECV_MESSAGE][1] = op->on_complete; - s->read_requested = true; - next_recv_step(s, PERFORM_STREAM_OP); - } - if (op->recv_initial_metadata) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "perform_stream_op - recv_initial_metadata:=%p", - op->on_complete); - } - s->recv_initial_metadata = op->recv_initial_metadata; - GPR_ASSERT(!s->callback_list[CB_RECV_INITIAL_METADATA][0]); - GPR_ASSERT(!s->callback_list[CB_RECV_INITIAL_METADATA][1]); - s->callback_list[CB_RECV_INITIAL_METADATA][0] = - op->recv_initial_metadata_ready; - s->callback_list[CB_RECV_INITIAL_METADATA][1] = op->on_complete; - } - if (op->send_initial_metadata) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, - "perform_stream_op - send_initial_metadata: on_complete=%p", - op->on_complete); - } - s->num_headers = 0; - convert_metadata_to_cronet_headers(op->send_initial_metadata->list.head, - ct->host, s); - s->header_array.count = s->num_headers; - s->header_array.capacity = s->num_headers; - s->header_array.headers = s->headers; - GPR_ASSERT(!s->callback_list[CB_SEND_INITIAL_METADATA][0]); - s->callback_list[CB_SEND_INITIAL_METADATA][0] = op->on_complete; - } - if (op->send_message) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "perform_stream_op - send_message: on_complete=%p", - op->on_complete); - } - grpc_byte_stream_next(exec_ctx, op->send_message, &s->slice, - op->send_message->length, NULL); - // Check that compression flag is not ON. We don't support compression yet. - // TODO (makdharma): add compression support - GPR_ASSERT(op->send_message->flags == 0); - gpr_slice_buffer_add(&s->write_slice_buffer, s->slice); - if (s->cbs == NULL) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "cronet_bidirectional_stream_create"); - } - s->cbs = cronet_bidirectional_stream_create(ct->engine, s, &callbacks); - GPR_ASSERT(s->cbs); - s->read_closed = false; - s->response_trailers_received = false; - s->response_headers_received = false; - s->cronet_send_state = CRONET_SEND_IDLE; - s->cronet_recv_state = CRONET_RECV_IDLE; - } - GPR_ASSERT(!s->callback_list[CB_SEND_MESSAGE][0]); - s->callback_list[CB_SEND_MESSAGE][0] = op->on_complete; - next_send_step(s); - } - if (op->send_trailing_metadata) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, - "perform_stream_op - send_trailing_metadata: on_complete=%p", - op->on_complete); - } - GPR_ASSERT(!s->callback_list[CB_SEND_TRAILING_METADATA][0]); - s->callback_list[CB_SEND_TRAILING_METADATA][0] = op->on_complete; - if (s->cbs) { - // Send an "empty" write to the far end to signal that we're done. - // This will induce the server to send down trailers. - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "W: cronet_bidirectional_stream_write"); - } - cronet_bidirectional_stream_write(s->cbs, "abc", 0, true); - } else { - // We never created a stream. This was probably an empty request. - invoke_closing_callback(s); - } - } -} - -static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, - grpc_stream *gs, grpc_stream_refcount *refcount, - const void *server_data) { - stream_obj *s = (stream_obj *)gs; - memset(s->callback_list, 0, sizeof(s->callback_list)); - s->cbs = NULL; - gpr_mu_init(&s->recv_mu); - s->read_buffer = gpr_malloc(GRPC_HEADER_SIZE_IN_BYTES); - s->write_buffer = gpr_malloc(GRPC_HEADER_SIZE_IN_BYTES); - gpr_slice_buffer_init(&s->write_slice_buffer); - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "cronet_transport - init_stream"); - } - return 0; -} - -static void destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, - grpc_stream *gs, void *and_free_memory) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "Destroy stream"); - } - stream_obj *s = (stream_obj *)gs; - s->cbs = NULL; - gpr_free(s->read_buffer); - gpr_free(s->write_buffer); - gpr_free(s->url); - gpr_mu_destroy(&s->recv_mu); - if (and_free_memory) { - gpr_free(and_free_memory); - } -} - -static void destroy_transport(grpc_exec_ctx *exec_ctx, grpc_transport *gt) { - grpc_cronet_transport *ct = (grpc_cronet_transport *)gt; - gpr_free(ct->host); - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "Destroy transport"); - } -} - -const grpc_transport_vtable grpc_cronet_vtable = { - sizeof(stream_obj), "cronet_http", init_stream, - set_pollset_do_nothing, perform_stream_op, NULL, - destroy_stream, destroy_transport, NULL}; diff --git a/src/python/grpcio/grpc/_cython/imports.generated.c b/src/python/grpcio/grpc/_cython/imports.generated.c index 09551472b5f..f0a40dbb35c 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.c +++ b/src/python/grpcio/grpc/_cython/imports.generated.c @@ -125,7 +125,6 @@ grpc_header_key_is_legal_type grpc_header_key_is_legal_import; grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_import; grpc_is_binary_header_type grpc_is_binary_header_import; grpc_call_error_to_string_type grpc_call_error_to_string_import; -grpc_cronet_secure_channel_create_type grpc_cronet_secure_channel_create_import; grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import; grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import; @@ -396,7 +395,6 @@ void pygrpc_load_imports(HMODULE library) { grpc_header_nonbin_value_is_legal_import = (grpc_header_nonbin_value_is_legal_type) GetProcAddress(library, "grpc_header_nonbin_value_is_legal"); grpc_is_binary_header_import = (grpc_is_binary_header_type) GetProcAddress(library, "grpc_is_binary_header"); grpc_call_error_to_string_import = (grpc_call_error_to_string_type) GetProcAddress(library, "grpc_call_error_to_string"); - grpc_cronet_secure_channel_create_import = (grpc_cronet_secure_channel_create_type) GetProcAddress(library, "grpc_cronet_secure_channel_create"); grpc_auth_property_iterator_next_import = (grpc_auth_property_iterator_next_type) GetProcAddress(library, "grpc_auth_property_iterator_next"); grpc_auth_context_property_iterator_import = (grpc_auth_context_property_iterator_type) GetProcAddress(library, "grpc_auth_context_property_iterator"); grpc_auth_context_peer_identity_import = (grpc_auth_context_peer_identity_type) GetProcAddress(library, "grpc_auth_context_peer_identity"); diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index 54c8aaad13e..d5e810b7cf4 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include @@ -326,9 +325,6 @@ extern grpc_is_binary_header_type grpc_is_binary_header_import; typedef const char *(*grpc_call_error_to_string_type)(grpc_call_error error); extern grpc_call_error_to_string_type grpc_call_error_to_string_import; #define grpc_call_error_to_string grpc_call_error_to_string_import -typedef grpc_channel *(*grpc_cronet_secure_channel_create_type)(void *engine, const char *target, const grpc_channel_args *args, void *reserved); -extern grpc_cronet_secure_channel_create_type grpc_cronet_secure_channel_create_import; -#define grpc_cronet_secure_channel_create grpc_cronet_secure_channel_create_import typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); extern grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; #define grpc_auth_property_iterator_next grpc_auth_property_iterator_next_import diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 5314329c2cb..dab62530aac 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -222,9 +222,6 @@ CORE_SOURCE_FILES = [ 'src/core/ext/client_config/uri_parser.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', - 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.c', - 'src/core/ext/transport/cronet/transport/cronet_api_dummy.c', - 'src/core/ext/transport/cronet/transport/cronet_transport.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c', 'third_party/nanopb/pb_common.c', diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index cebbe8c40fe..bc43f9d36b5 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -125,7 +125,6 @@ grpc_header_key_is_legal_type grpc_header_key_is_legal_import; grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_import; grpc_is_binary_header_type grpc_is_binary_header_import; grpc_call_error_to_string_type grpc_call_error_to_string_import; -grpc_cronet_secure_channel_create_type grpc_cronet_secure_channel_create_import; grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import; grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import; @@ -392,7 +391,6 @@ void grpc_rb_load_imports(HMODULE library) { grpc_header_nonbin_value_is_legal_import = (grpc_header_nonbin_value_is_legal_type) GetProcAddress(library, "grpc_header_nonbin_value_is_legal"); grpc_is_binary_header_import = (grpc_is_binary_header_type) GetProcAddress(library, "grpc_is_binary_header"); grpc_call_error_to_string_import = (grpc_call_error_to_string_type) GetProcAddress(library, "grpc_call_error_to_string"); - grpc_cronet_secure_channel_create_import = (grpc_cronet_secure_channel_create_type) GetProcAddress(library, "grpc_cronet_secure_channel_create"); grpc_auth_property_iterator_next_import = (grpc_auth_property_iterator_next_type) GetProcAddress(library, "grpc_auth_property_iterator_next"); grpc_auth_context_property_iterator_import = (grpc_auth_context_property_iterator_type) GetProcAddress(library, "grpc_auth_context_property_iterator"); grpc_auth_context_peer_identity_import = (grpc_auth_context_peer_identity_type) GetProcAddress(library, "grpc_auth_context_peer_identity"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index d7ea6c574c8..b67361ca25b 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include @@ -326,9 +325,6 @@ extern grpc_is_binary_header_type grpc_is_binary_header_import; typedef const char *(*grpc_call_error_to_string_type)(grpc_call_error error); extern grpc_call_error_to_string_type grpc_call_error_to_string_import; #define grpc_call_error_to_string grpc_call_error_to_string_import -typedef grpc_channel *(*grpc_cronet_secure_channel_create_type)(void *engine, const char *target, const grpc_channel_args *args, void *reserved); -extern grpc_cronet_secure_channel_create_type grpc_cronet_secure_channel_create_import; -#define grpc_cronet_secure_channel_create grpc_cronet_secure_channel_create_import typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); extern grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; #define grpc_auth_property_iterator_next grpc_auth_property_iterator_next_import diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c index fd6ff2c26f5..3eeb55d033d 100644 --- a/test/core/surface/public_headers_must_be_c89.c +++ b/test/core/surface/public_headers_must_be_c89.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/third_party/objective_c/Cronet/cronet_c_for_grpc.h b/third_party/objective_c/Cronet/cronet_c_for_grpc.h deleted file mode 100644 index 15a511aebd0..00000000000 --- a/third_party/objective_c/Cronet/cronet_c_for_grpc.h +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef COMPONENTS_CRONET_IOS_CRONET_C_FOR_GRPC_H_ -#define COMPONENTS_CRONET_IOS_CRONET_C_FOR_GRPC_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/* Cronet Engine API. */ - -/* Opaque object representing Cronet Engine. Created and configured outside - * of this API to facilitate sharing with other components */ -typedef struct cronet_engine { void* obj; } cronet_engine; - -void cronet_engine_add_quic_hint(cronet_engine* engine, - const char* host, - int port, - int alternate_port); - -/* Cronet Bidirectional Stream API */ - -/* Opaque object representing Cronet Bidirectional Stream. */ -typedef struct cronet_bidirectional_stream { - void* obj; - void* annotation; -} cronet_bidirectional_stream; - -/* A single request or response header element. */ -typedef struct cronet_bidirectional_stream_header { - const char* key; - const char* value; -} cronet_bidirectional_stream_header; - -/* Array of request or response headers or trailers. */ -typedef struct cronet_bidirectional_stream_header_array { - size_t count; - size_t capacity; - cronet_bidirectional_stream_header* headers; -} cronet_bidirectional_stream_header_array; - -/* Set of callbacks used to receive callbacks from bidirectional stream. */ -typedef struct cronet_bidirectional_stream_callback { - /* Invoked when request headers are sent. Indicates that stream has initiated - * the request. Consumer may call cronet_bidirectional_stream_write() to start - * writing data. - */ - void (*on_request_headers_sent)(cronet_bidirectional_stream* stream); - - /* Invoked when initial response headers are received. - * Consumer must call cronet_bidirectional_stream_read() to start reading. - * Consumer may call cronet_bidirectional_stream_write() to start writing or - * close the stream. Contents of |headers| is valid for duration of the call. - */ - void (*on_response_headers_received)( - cronet_bidirectional_stream* stream, - const cronet_bidirectional_stream_header_array* headers, - const char* negotiated_protocol); - - /* Invoked when data is read into the buffer passed to - * cronet_bidirectional_stream_read(). Only part of the buffer may be - * populated. To continue reading, call cronet_bidirectional_stream_read(). - * It may be invoked after on_response_trailers_received()}, if there was - * pending read data before trailers were received. - * - * If count is 0, it means the remote side has signaled that it will send no - * more data; future calls to cronet_bidirectional_stream_read() will result - * in the on_data_read() callback or on_succeded() callback if - * cronet_bidirectional_stream_write() was invoked with end_of_stream set to - * true. - */ - void (*on_read_completed)(cronet_bidirectional_stream* stream, - char* data, - int count); - - /** - * Invoked when all data passed to cronet_bidirectional_stream_write() is - * sent. - * To continue writing, call cronet_bidirectional_stream_write(). - */ - void (*on_write_completed)(cronet_bidirectional_stream* stream, - const char* data); - - /* Invoked when trailers are received before closing the stream. Only invoked - * when server sends trailers, which it may not. May be invoked while there is - * read data remaining in local buffer. Contents of |trailers| is valid for - * duration of the call. - */ - void (*on_response_trailers_received)( - cronet_bidirectional_stream* stream, - const cronet_bidirectional_stream_header_array* trailers); - - /** - * Invoked when there is no data to be read or written and the stream is - * closed successfully remotely and locally. Once invoked, no further callback - * methods will be invoked. - */ - void (*on_succeded)(cronet_bidirectional_stream* stream); - - /** - * Invoked if the stream failed for any reason after - * cronet_bidirectional_stream_start(). HTTP/2 error codes are - * mapped to chrome net error codes. Once invoked, no further callback methods - * will be invoked. - */ - void (*on_failed)(cronet_bidirectional_stream* stream, int net_error); - - /** - * Invoked if the stream was canceled via - * cronet_bidirectional_stream_cancel(). Once invoked, no further callback - * methods will be invoked. - */ - void (*on_canceled)(cronet_bidirectional_stream* stream); -} cronet_bidirectional_stream_callback; - -/* Create a new stream object that uses |engine| and |callback|. All stream - * tasks are performed asynchronously on the |engine| network thread. |callback| - * methods are invoked synchronously on the |engine| network thread, but must - * not run tasks on the current thread to prevent blocking networking operations - * and causing exceptions during shutdown. The |annotation| is stored in - * bidirectional stream for arbitrary use by application. - * - * Returned |cronet_bidirectional_stream*| is owned by the caller, and must be - * destroyed using |cronet_bidirectional_stream_destroy|. - * - * Both |calback| and |engine| must remain valid until stream is destroyed. - */ -cronet_bidirectional_stream* cronet_bidirectional_stream_create( - cronet_engine* engine, - void* annotation, - cronet_bidirectional_stream_callback* callback); - -/* TBD: The following methods return int. Should it be a custom type? */ - -/* Destroy stream object. Destroy could be called from any thread, including - * network thread, but is posted, so |stream| is valid until calling task is - * complete. - */ -int cronet_bidirectional_stream_destroy(cronet_bidirectional_stream* stream); - -/* Start the stream by sending request to |url| using |method| and |headers|. If - * |end_of_stream| is true, then no data is expected to be written. - */ -int cronet_bidirectional_stream_start( - cronet_bidirectional_stream* stream, - const char* url, - int priority, - const char* method, - const cronet_bidirectional_stream_header_array* headers, - bool end_of_stream); - -/* Read response data into |buffer| of |capacity| length. Must only be called at - * most once in response to each invocation of the - * on_response_headers_received() and on_read_completed() methods of the - * cronet_bidirectional_stream_callback. - * Each call will result in an invocation of one of the callback's - * on_read_completed method if data is read, its on_succeeded() method if - * the stream is closed, or its on_failed() method if there's an error. - */ -int cronet_bidirectional_stream_read(cronet_bidirectional_stream* stream, - char* buffer, - int capacity); - -/* Read response data into |buffer| of |capacity| length. Must only be called at - * most once in response to each invocation of the - * on_response_headers_received() and on_read_completed() methods of the - * cronet_bidirectional_stream_callback. - * Each call will result in an invocation of one of the callback's - * on_read_completed method if data is read, its on_succeeded() method if - * the stream is closed, or its on_failed() method if there's an error. - */ -int cronet_bidirectional_stream_write(cronet_bidirectional_stream* stream, - const char* buffer, - int count, - bool end_of_stream); - -/* Cancels the stream. Can be called at any time after - * cronet_bidirectional_stream_start(). The on_canceled() method of - * cronet_bidirectional_stream_callback will be invoked when cancelation - * is complete and no further callback methods will be invoked. If the - * stream has completed or has not started, calling - * cronet_bidirectional_stream_cancel() has no effect and on_canceled() will not - * be invoked. At most one callback method may be invoked after - * cronet_bidirectional_stream_cancel() has completed. - */ -int cronet_bidirectional_stream_cancel(cronet_bidirectional_stream* stream); - -/* Returns true if the |stream| was successfully started and is now done - * (succeeded, canceled, or failed). - * Returns false if the |stream| stream is not yet started or is in progress. - */ -bool cronet_bidirectional_stream_is_done(cronet_bidirectional_stream* stream); - -#ifdef __cplusplus -} -#endif - -#endif // COMPONENTS_CRONET_IOS_CRONET_C_FOR_GRPC_H_ diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index aabca410dab..eed84252cc2 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -786,7 +786,6 @@ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_win32.h \ include/grpc/impl/codegen/time.h \ -include/grpc/grpc_cronet.h \ include/grpc/grpc_security.h \ include/grpc/grpc_security_constants.h \ include/grpc/census.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 3ffc6174ed4..1fcc1fa140b 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -786,7 +786,6 @@ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_win32.h \ include/grpc/impl/codegen/time.h \ -include/grpc/grpc_cronet.h \ include/grpc/grpc_security.h \ include/grpc/grpc_security_constants.h \ include/grpc/census.h \ @@ -914,42 +913,6 @@ src/core/ext/client_config/subchannel.h \ src/core/ext/client_config/subchannel_call_holder.h \ src/core/ext/client_config/subchannel_index.h \ src/core/ext/client_config/uri_parser.h \ -include/grpc/byte_buffer.h \ -include/grpc/grpc.h \ -include/grpc/impl/codegen/alloc.h \ -include/grpc/impl/codegen/atm.h \ -include/grpc/impl/codegen/atm_gcc_atomic.h \ -include/grpc/impl/codegen/atm_gcc_sync.h \ -include/grpc/impl/codegen/atm_win32.h \ -include/grpc/impl/codegen/byte_buffer.h \ -include/grpc/impl/codegen/compression_types.h \ -include/grpc/impl/codegen/connectivity_state.h \ -include/grpc/impl/codegen/grpc_types.h \ -include/grpc/impl/codegen/log.h \ -include/grpc/impl/codegen/port_platform.h \ -include/grpc/impl/codegen/propagation_bits.h \ -include/grpc/impl/codegen/slice.h \ -include/grpc/impl/codegen/slice_buffer.h \ -include/grpc/impl/codegen/status.h \ -include/grpc/impl/codegen/sync.h \ -include/grpc/impl/codegen/sync_generic.h \ -include/grpc/impl/codegen/sync_posix.h \ -include/grpc/impl/codegen/sync_win32.h \ -include/grpc/impl/codegen/time.h \ -include/grpc/status.h \ -include/grpc/support/alloc.h \ -include/grpc/support/atm.h \ -include/grpc/support/host_port.h \ -include/grpc/support/log.h \ -include/grpc/support/port_platform.h \ -include/grpc/support/slice.h \ -include/grpc/support/slice_buffer.h \ -include/grpc/support/string_util.h \ -include/grpc/support/sync.h \ -include/grpc/support/time.h \ -include/grpc/support/useful.h \ -src/core/lib/support/string.h \ -third_party/objective_c/Cronet/cronet_c_for_grpc.h \ src/core/ext/lb_policy/grpclb/load_balancer_api.h \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h \ third_party/nanopb/pb.h \ @@ -1108,9 +1071,6 @@ src/core/ext/client_config/subchannel_index.c \ src/core/ext/client_config/uri_parser.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ -src/core/ext/transport/cronet/client/secure/cronet_channel_create.c \ -src/core/ext/transport/cronet/transport/cronet_api_dummy.c \ -src/core/ext/transport/cronet/transport/cronet_transport.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 8c67d2f8440..3b3a49a5b26 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4140,8 +4140,7 @@ "grpc_transport_chttp2_client_insecure", "grpc_transport_chttp2_client_secure", "grpc_transport_chttp2_server_insecure", - "grpc_transport_chttp2_server_secure", - "grpc_transport_cronet_client_secure" + "grpc_transport_chttp2_server_secure" ], "headers": [], "language": "c", @@ -6015,7 +6014,6 @@ "tsi" ], "headers": [ - "include/grpc/grpc_cronet.h", "include/grpc/grpc_security.h", "include/grpc/grpc_security_constants.h", "src/core/lib/security/auth_filters.h", @@ -6031,7 +6029,6 @@ "language": "c", "name": "grpc_secure", "src": [ - "include/grpc/grpc_cronet.h", "include/grpc/grpc_security.h", "include/grpc/grpc_security_constants.h", "src/core/lib/http/httpcli_security_connector.c", @@ -6267,121 +6264,6 @@ "third_party": false, "type": "filegroup" }, - { - "deps": [], - "headers": [ - "include/grpc/byte_buffer.h", - "include/grpc/grpc.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", - "include/grpc/status.h", - "include/grpc/support/alloc.h", - "include/grpc/support/atm.h", - "include/grpc/support/host_port.h", - "include/grpc/support/log.h", - "include/grpc/support/port_platform.h", - "include/grpc/support/slice.h", - "include/grpc/support/slice_buffer.h", - "include/grpc/support/string_util.h", - "include/grpc/support/sync.h", - "include/grpc/support/time.h", - "include/grpc/support/useful.h", - "src/core/ext/transport/chttp2/transport/incoming_metadata.h", - "src/core/lib/channel/channel_stack.h", - "src/core/lib/channel/context.h", - "src/core/lib/debug/trace.h", - "src/core/lib/iomgr/closure.h", - "src/core/lib/iomgr/exec_ctx.h", - "src/core/lib/iomgr/pollset.h", - "src/core/lib/iomgr/pollset_set.h", - "src/core/lib/support/string.h", - "src/core/lib/surface/channel.h", - "src/core/lib/surface/channel_stack_type.h", - "src/core/lib/transport/byte_stream.h", - "src/core/lib/transport/metadata.h", - "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/transport.h", - "src/core/lib/transport/transport_impl.h", - "third_party/objective_c/Cronet/cronet_c_for_grpc.h" - ], - "language": "c", - "name": "grpc_transport_cronet_client_secure", - "src": [ - "include/grpc/byte_buffer.h", - "include/grpc/grpc.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", - "include/grpc/status.h", - "include/grpc/support/alloc.h", - "include/grpc/support/atm.h", - "include/grpc/support/host_port.h", - "include/grpc/support/log.h", - "include/grpc/support/port_platform.h", - "include/grpc/support/slice.h", - "include/grpc/support/slice_buffer.h", - "include/grpc/support/string_util.h", - "include/grpc/support/sync.h", - "include/grpc/support/time.h", - "include/grpc/support/useful.h", - "src/core/ext/transport/chttp2/transport/incoming_metadata.h", - "src/core/ext/transport/cronet/client/secure/cronet_channel_create.c", - "src/core/ext/transport/cronet/transport/cronet_api_dummy.c", - "src/core/ext/transport/cronet/transport/cronet_transport.c", - "src/core/lib/channel/channel_stack.h", - "src/core/lib/channel/context.h", - "src/core/lib/debug/trace.h", - "src/core/lib/iomgr/closure.h", - "src/core/lib/iomgr/exec_ctx.h", - "src/core/lib/iomgr/pollset.h", - "src/core/lib/iomgr/pollset_set.h", - "src/core/lib/support/string.h", - "src/core/lib/surface/channel.h", - "src/core/lib/surface/channel_stack_type.h", - "src/core/lib/transport/byte_stream.h", - "src/core/lib/transport/metadata.h", - "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/transport.h", - "src/core/lib/transport/transport_impl.h" - ], - "third_party": false, - "type": "filegroup" - }, { "deps": [], "headers": [ diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 7f0e5a83394..03f4eaa5bec 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -293,7 +293,6 @@ - @@ -423,42 +422,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -765,12 +728,6 @@
- - - - - - diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 6d1d69a913d..4617e3de0d7 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -439,15 +439,6 @@ src\core\ext\transport\chttp2\client\insecure - - src\core\ext\transport\cronet\client\secure - - - src\core\ext\transport\cronet\transport - - - src\core\ext\transport\cronet\transport - src\core\ext\lb_policy\grpclb @@ -585,9 +576,6 @@ include\grpc\impl\codegen - - include\grpc - include\grpc @@ -971,114 +959,6 @@ src\core\ext\client_config - - include\grpc - - - include\grpc - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - src\core\lib\support - - - third_party\objective_c\Cronet - src\core\ext\lb_policy\grpclb @@ -1130,9 +1010,6 @@ {def748f5-ed2a-a9bb-40d9-c31d00f0e13b} - - {31de82ea-dc6c-73fb-a640-979b8a7b240c} - {d538af37-07b2-062b-fa2a-d9f882cb2737} @@ -1214,18 +1091,6 @@ {6f34254e-e69f-c9b4-156d-5024bade5408} - - {1e9c85e9-5522-7ef8-0017-7e19990a6194} - - - {d0530883-75d9-b5f7-d594-26735a70ac7b} - - - {4fa6fe90-b7a8-5c8f-d629-db1e68d89eed} - - - {31518af8-5860-6d0d-ff78-4059fce29ec2} - {5b2ded3f-84a5-f6b4-2060-286c7d1dc945} @@ -1250,9 +1115,6 @@ {c4661d64-349f-01c1-1ba8-0602f9047595} - - {27f30339-d694-40f5-db07-4b89b9aeea73} - {a21971fb-304f-da08-b1b2-7bd8df8ac373} @@ -1271,12 +1133,6 @@ {93d6596d-330c-1d27-6f84-3c840e57869e} - - {3a56a516-857e-d2aa-95cc-11685baf4e8c} - - - {a165c6e3-0776-6f40-7351-d7865668e220} - From 0ddf46f10e3d114704bb2beac4f30718957581c3 Mon Sep 17 00:00:00 2001 From: Kirill Katsnelson Date: Tue, 19 Apr 2016 18:49:31 -0700 Subject: [PATCH 0363/1894] Fully qualify System.Threading.Tasks.Task --- src/compiler/csharp_generator.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/csharp_generator.cc b/src/compiler/csharp_generator.cc index ac0fee1ec4d..29c359c5395 100644 --- a/src/compiler/csharp_generator.cc +++ b/src/compiler/csharp_generator.cc @@ -214,10 +214,10 @@ std::string GetMethodReturnTypeServer(const MethodDescriptor *method) { switch (GetMethodType(method)) { case METHODTYPE_NO_STREAMING: case METHODTYPE_CLIENT_STREAMING: - return "Task<" + GetClassName(method->output_type()) + ">"; + return "global::System.Threading.Tasks.Task<" + GetClassName(method->output_type()) + ">"; case METHODTYPE_SERVER_STREAMING: case METHODTYPE_BIDI_STREAMING: - return "Task"; + return "global::System.Threading.Tasks.Task"; } GOOGLE_LOG(FATAL)<< "Can't get here."; return ""; From d83f791b11287d2ae960c94611a593afae7612d2 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 9 May 2016 10:28:10 -0700 Subject: [PATCH 0364/1894] regenerate C# code --- src/csharp/Grpc.Examples/MathGrpc.cs | 16 ++++----- src/csharp/Grpc.HealthCheck/HealthGrpc.cs | 4 +-- .../Grpc.IntegrationTesting/MetricsGrpc.cs | 8 ++--- .../Grpc.IntegrationTesting/ServicesGrpc.cs | 24 ++++++------- .../Grpc.IntegrationTesting/TestGrpc.cs | 36 +++++++++---------- 5 files changed, 44 insertions(+), 44 deletions(-) diff --git a/src/csharp/Grpc.Examples/MathGrpc.cs b/src/csharp/Grpc.Examples/MathGrpc.cs index 2d3034d28b5..d700a18778b 100644 --- a/src/csharp/Grpc.Examples/MathGrpc.cs +++ b/src/csharp/Grpc.Examples/MathGrpc.cs @@ -151,25 +151,25 @@ namespace Math { /// Div divides args.dividend by args.divisor and returns the quotient and /// remainder. /// - Task Div(global::Math.DivArgs request, ServerCallContext context); + global::System.Threading.Tasks.Task Div(global::Math.DivArgs request, ServerCallContext context); /// /// DivMany accepts an arbitrary number of division args from the client stream /// and sends back the results in the reply stream. The stream continues until /// the client closes its end; the server does the same after sending all the /// replies. The stream ends immediately if either end aborts. /// - Task DivMany(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); + global::System.Threading.Tasks.Task DivMany(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); /// /// Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib /// generates up to limit numbers; otherwise it continues until the call is /// canceled. Unlike Fib above, Fib has no final FibReply. /// - Task Fib(global::Math.FibArgs request, IServerStreamWriter responseStream, ServerCallContext context); + global::System.Threading.Tasks.Task Fib(global::Math.FibArgs request, IServerStreamWriter responseStream, ServerCallContext context); /// /// Sum sums a stream of numbers, returning the final result once the stream /// is closed. /// - Task Sum(IAsyncStreamReader requestStream, ServerCallContext context); + global::System.Threading.Tasks.Task Sum(IAsyncStreamReader requestStream, ServerCallContext context); } /// Base class for server-side implementations of Math @@ -179,7 +179,7 @@ namespace Math { /// Div divides args.dividend by args.divisor and returns the quotient and /// remainder. /// - public virtual Task Div(global::Math.DivArgs request, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task Div(global::Math.DivArgs request, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } @@ -190,7 +190,7 @@ namespace Math { /// the client closes its end; the server does the same after sending all the /// replies. The stream ends immediately if either end aborts. /// - public virtual Task DivMany(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task DivMany(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } @@ -200,7 +200,7 @@ namespace Math { /// generates up to limit numbers; otherwise it continues until the call is /// canceled. Unlike Fib above, Fib has no final FibReply. /// - public virtual Task Fib(global::Math.FibArgs request, IServerStreamWriter responseStream, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task Fib(global::Math.FibArgs request, IServerStreamWriter responseStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } @@ -209,7 +209,7 @@ namespace Math { /// Sum sums a stream of numbers, returning the final result once the stream /// is closed. /// - public virtual Task Sum(IAsyncStreamReader requestStream, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task Sum(IAsyncStreamReader requestStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } diff --git a/src/csharp/Grpc.HealthCheck/HealthGrpc.cs b/src/csharp/Grpc.HealthCheck/HealthGrpc.cs index 967d1170bed..51c6a39b1d8 100644 --- a/src/csharp/Grpc.HealthCheck/HealthGrpc.cs +++ b/src/csharp/Grpc.HealthCheck/HealthGrpc.cs @@ -72,13 +72,13 @@ namespace Grpc.Health.V1 { [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")] public interface IHealth { - Task Check(global::Grpc.Health.V1.HealthCheckRequest request, ServerCallContext context); + global::System.Threading.Tasks.Task Check(global::Grpc.Health.V1.HealthCheckRequest request, ServerCallContext context); } /// Base class for server-side implementations of Health public abstract class HealthBase { - public virtual Task Check(global::Grpc.Health.V1.HealthCheckRequest request, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task Check(global::Grpc.Health.V1.HealthCheckRequest request, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } diff --git a/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs b/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs index aa4f1c5c3ec..9d31d1c5146 100644 --- a/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs @@ -112,11 +112,11 @@ namespace Grpc.Testing { /// Returns the values of all the gauges that are currently being maintained by /// the service /// - Task GetAllGauges(global::Grpc.Testing.EmptyMessage request, IServerStreamWriter responseStream, ServerCallContext context); + global::System.Threading.Tasks.Task GetAllGauges(global::Grpc.Testing.EmptyMessage request, IServerStreamWriter responseStream, ServerCallContext context); /// /// Returns the value of one gauge /// - Task GetGauge(global::Grpc.Testing.GaugeRequest request, ServerCallContext context); + global::System.Threading.Tasks.Task GetGauge(global::Grpc.Testing.GaugeRequest request, ServerCallContext context); } /// Base class for server-side implementations of MetricsService @@ -126,7 +126,7 @@ namespace Grpc.Testing { /// Returns the values of all the gauges that are currently being maintained by /// the service /// - public virtual Task GetAllGauges(global::Grpc.Testing.EmptyMessage request, IServerStreamWriter responseStream, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task GetAllGauges(global::Grpc.Testing.EmptyMessage request, IServerStreamWriter responseStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } @@ -134,7 +134,7 @@ namespace Grpc.Testing { /// /// Returns the value of one gauge /// - public virtual Task GetGauge(global::Grpc.Testing.GaugeRequest request, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task GetGauge(global::Grpc.Testing.GaugeRequest request, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } diff --git a/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs b/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs index 42bf5e0b582..f7071ebf6be 100644 --- a/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs @@ -111,12 +111,12 @@ namespace Grpc.Testing { /// One request followed by one response. /// The server returns the client payload as-is. /// - Task UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context); + global::System.Threading.Tasks.Task UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context); /// /// One request followed by one response. /// The server returns the client payload as-is. /// - Task StreamingCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); + global::System.Threading.Tasks.Task StreamingCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); } /// Base class for server-side implementations of BenchmarkService @@ -126,7 +126,7 @@ namespace Grpc.Testing { /// One request followed by one response. /// The server returns the client payload as-is. /// - public virtual Task UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } @@ -135,7 +135,7 @@ namespace Grpc.Testing { /// One request followed by one response. /// The server returns the client payload as-is. /// - public virtual Task StreamingCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task StreamingCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } @@ -375,7 +375,7 @@ namespace Grpc.Testing { /// and once the shutdown has finished, the OK status is sent to terminate /// this RPC. /// - Task RunServer(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); + global::System.Threading.Tasks.Task RunServer(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); /// /// Start client with specified workload. /// First request sent specifies the ClientConfig followed by ClientStatus @@ -384,15 +384,15 @@ namespace Grpc.Testing { /// and once the shutdown has finished, the OK status is sent to terminate /// this RPC. /// - Task RunClient(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); + global::System.Threading.Tasks.Task RunClient(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); /// /// Just return the core count - unary call /// - Task CoreCount(global::Grpc.Testing.CoreRequest request, ServerCallContext context); + global::System.Threading.Tasks.Task CoreCount(global::Grpc.Testing.CoreRequest request, ServerCallContext context); /// /// Quit this worker /// - Task QuitWorker(global::Grpc.Testing.Void request, ServerCallContext context); + global::System.Threading.Tasks.Task QuitWorker(global::Grpc.Testing.Void request, ServerCallContext context); } /// Base class for server-side implementations of WorkerService @@ -406,7 +406,7 @@ namespace Grpc.Testing { /// and once the shutdown has finished, the OK status is sent to terminate /// this RPC. /// - public virtual Task RunServer(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task RunServer(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } @@ -419,7 +419,7 @@ namespace Grpc.Testing { /// and once the shutdown has finished, the OK status is sent to terminate /// this RPC. /// - public virtual Task RunClient(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task RunClient(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } @@ -427,7 +427,7 @@ namespace Grpc.Testing { /// /// Just return the core count - unary call /// - public virtual Task CoreCount(global::Grpc.Testing.CoreRequest request, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task CoreCount(global::Grpc.Testing.CoreRequest request, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } @@ -435,7 +435,7 @@ namespace Grpc.Testing { /// /// Quit this worker /// - public virtual Task QuitWorker(global::Grpc.Testing.Void request, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task QuitWorker(global::Grpc.Testing.Void request, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } diff --git a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs index f1878cbb556..cf43a77118c 100644 --- a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs @@ -196,34 +196,34 @@ namespace Grpc.Testing { /// /// One empty request followed by one empty response. /// - Task EmptyCall(global::Grpc.Testing.Empty request, ServerCallContext context); + global::System.Threading.Tasks.Task EmptyCall(global::Grpc.Testing.Empty request, ServerCallContext context); /// /// One request followed by one response. /// - Task UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context); + global::System.Threading.Tasks.Task UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context); /// /// One request followed by a sequence of responses (streamed download). /// The server returns the payload with client desired type and sizes. /// - Task StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, IServerStreamWriter responseStream, ServerCallContext context); + global::System.Threading.Tasks.Task StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, IServerStreamWriter responseStream, ServerCallContext context); /// /// A sequence of requests followed by one response (streamed upload). /// The server returns the aggregated size of client payload as the result. /// - Task StreamingInputCall(IAsyncStreamReader requestStream, ServerCallContext context); + global::System.Threading.Tasks.Task StreamingInputCall(IAsyncStreamReader requestStream, ServerCallContext context); /// /// 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. /// - Task FullDuplexCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); + global::System.Threading.Tasks.Task FullDuplexCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); /// /// 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. /// - Task HalfDuplexCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); + global::System.Threading.Tasks.Task HalfDuplexCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); } /// Base class for server-side implementations of TestService @@ -232,7 +232,7 @@ namespace Grpc.Testing { /// /// One empty request followed by one empty response. /// - public virtual Task EmptyCall(global::Grpc.Testing.Empty request, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task EmptyCall(global::Grpc.Testing.Empty request, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } @@ -240,7 +240,7 @@ namespace Grpc.Testing { /// /// One request followed by one response. /// - public virtual Task UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } @@ -249,7 +249,7 @@ namespace Grpc.Testing { /// One request followed by a sequence of responses (streamed download). /// The server returns the payload with client desired type and sizes. /// - public virtual Task StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, IServerStreamWriter responseStream, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, IServerStreamWriter responseStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } @@ -258,7 +258,7 @@ namespace Grpc.Testing { /// A sequence of requests followed by one response (streamed upload). /// The server returns the aggregated size of client payload as the result. /// - public virtual Task StreamingInputCall(IAsyncStreamReader requestStream, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task StreamingInputCall(IAsyncStreamReader requestStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } @@ -268,7 +268,7 @@ namespace Grpc.Testing { /// As one request could lead to multiple responses, this interface /// demonstrates the idea of full duplexing. /// - public virtual Task FullDuplexCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task FullDuplexCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } @@ -279,7 +279,7 @@ namespace Grpc.Testing { /// stream of responses are returned to the client when the server starts with /// first request. /// - public virtual Task HalfDuplexCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task HalfDuplexCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } @@ -525,7 +525,7 @@ namespace Grpc.Testing { /// /// A call that no server should implement /// - Task UnimplementedCall(global::Grpc.Testing.Empty request, ServerCallContext context); + global::System.Threading.Tasks.Task UnimplementedCall(global::Grpc.Testing.Empty request, ServerCallContext context); } /// Base class for server-side implementations of UnimplementedService @@ -534,7 +534,7 @@ namespace Grpc.Testing { /// /// A call that no server should implement /// - public virtual Task UnimplementedCall(global::Grpc.Testing.Empty request, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task UnimplementedCall(global::Grpc.Testing.Empty request, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } @@ -669,19 +669,19 @@ namespace Grpc.Testing { [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")] public interface IReconnectService { - Task Start(global::Grpc.Testing.ReconnectParams request, ServerCallContext context); - Task Stop(global::Grpc.Testing.Empty request, ServerCallContext context); + global::System.Threading.Tasks.Task Start(global::Grpc.Testing.ReconnectParams request, ServerCallContext context); + global::System.Threading.Tasks.Task Stop(global::Grpc.Testing.Empty request, ServerCallContext context); } /// Base class for server-side implementations of ReconnectService public abstract class ReconnectServiceBase { - public virtual Task Start(global::Grpc.Testing.ReconnectParams request, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task Start(global::Grpc.Testing.ReconnectParams request, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } - public virtual Task Stop(global::Grpc.Testing.Empty request, ServerCallContext context) + public virtual global::System.Threading.Tasks.Task Stop(global::Grpc.Testing.Empty request, ServerCallContext context) { throw new RpcException(new Status(StatusCode.Unimplemented, "")); } From 0545d7fa6900b66dfd37de7a33fe5fdc655a378d Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Mon, 9 May 2016 19:28:17 +0200 Subject: [PATCH 0365/1894] Revert "Merge pull request #6214 from makdharma/master" This reverts commit 48d833a9d8280216040ef731341502d7d0f157e4, reversing changes made to 66e9d8e8a7717d7ccece629df4454fc546e19daa. --- BUILD | 80 --- Makefile | 7 - binding.gyp | 3 - build.yaml | 59 -- config.m4 | 5 - gRPC.podspec | 76 --- grpc.def | 1 - grpc.gemspec | 40 -- include/grpc/grpc_cronet.h | 51 -- package.xml | 40 -- .../client/secure/cronet_channel_create.c | 69 -- .../cronet/transport/cronet_api_dummy.c | 85 --- .../cronet/transport/cronet_transport.c | 640 ------------------ .../grpcio/grpc/_cython/imports.generated.c | 2 - .../grpcio/grpc/_cython/imports.generated.h | 4 - src/python/grpcio/grpc_core_dependencies.py | 3 - src/ruby/ext/grpc/rb_grpc_imports.generated.c | 2 - src/ruby/ext/grpc/rb_grpc_imports.generated.h | 4 - .../core/surface/public_headers_must_be_c89.c | 1 - .../objective_c/Cronet/cronet_c_for_grpc.h | 202 ------ tools/doxygen/Doxyfile.core | 1 - tools/doxygen/Doxyfile.core.internal | 40 -- tools/run_tests/sources_and_headers.json | 120 +--- vsprojects/vcxproj/grpc/grpc.vcxproj | 43 -- vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 144 ---- 25 files changed, 1 insertion(+), 1721 deletions(-) delete mode 100644 include/grpc/grpc_cronet.h delete mode 100644 src/core/ext/transport/cronet/client/secure/cronet_channel_create.c delete mode 100644 src/core/ext/transport/cronet/transport/cronet_api_dummy.c delete mode 100644 src/core/ext/transport/cronet/transport/cronet_transport.c delete mode 100644 third_party/objective_c/Cronet/cronet_c_for_grpc.h diff --git a/BUILD b/BUILD index fae3596eec6..1da16504388 100644 --- a/BUILD +++ b/BUILD @@ -285,42 +285,6 @@ cc_library( "src/core/ext/client_config/subchannel_call_holder.h", "src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/uri_parser.h", - "include/grpc/byte_buffer.h", - "include/grpc/grpc.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", - "include/grpc/status.h", - "include/grpc/support/alloc.h", - "include/grpc/support/atm.h", - "include/grpc/support/host_port.h", - "include/grpc/support/log.h", - "include/grpc/support/port_platform.h", - "include/grpc/support/slice.h", - "include/grpc/support/slice_buffer.h", - "include/grpc/support/string_util.h", - "include/grpc/support/sync.h", - "include/grpc/support/time.h", - "include/grpc/support/useful.h", - "src/core/lib/support/string.h", - "third_party/objective_c/Cronet/cronet_c_for_grpc.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", "src/core/ext/census/aggregation.h", @@ -475,9 +439,6 @@ cc_library( "src/core/ext/client_config/uri_parser.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", - "src/core/ext/transport/cronet/client/secure/cronet_channel_create.c", - "src/core/ext/transport/cronet/transport/cronet_api_dummy.c", - "src/core/ext/transport/cronet/transport/cronet_transport.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", @@ -522,7 +483,6 @@ cc_library( "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/time.h", - "include/grpc/grpc_cronet.h", "include/grpc/grpc_security.h", "include/grpc/grpc_security_constants.h", "include/grpc/census.h", @@ -1500,9 +1460,6 @@ objc_library( "src/core/ext/client_config/uri_parser.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", - "src/core/ext/transport/cronet/client/secure/cronet_channel_create.c", - "src/core/ext/transport/cronet/transport/cronet_api_dummy.c", - "src/core/ext/transport/cronet/transport/cronet_transport.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", @@ -1547,7 +1504,6 @@ objc_library( "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/time.h", - "include/grpc/grpc_cronet.h", "include/grpc/grpc_security.h", "include/grpc/grpc_security_constants.h", "include/grpc/census.h", @@ -1675,42 +1631,6 @@ objc_library( "src/core/ext/client_config/subchannel_call_holder.h", "src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/uri_parser.h", - "include/grpc/byte_buffer.h", - "include/grpc/grpc.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", - "include/grpc/status.h", - "include/grpc/support/alloc.h", - "include/grpc/support/atm.h", - "include/grpc/support/host_port.h", - "include/grpc/support/log.h", - "include/grpc/support/port_platform.h", - "include/grpc/support/slice.h", - "include/grpc/support/slice_buffer.h", - "include/grpc/support/string_util.h", - "include/grpc/support/sync.h", - "include/grpc/support/time.h", - "include/grpc/support/useful.h", - "src/core/lib/support/string.h", - "third_party/objective_c/Cronet/cronet_c_for_grpc.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h", "src/core/ext/census/aggregation.h", diff --git a/Makefile b/Makefile index 635df30c20a..45003ad8b57 100644 --- a/Makefile +++ b/Makefile @@ -2623,9 +2623,6 @@ LIBGRPC_SRC = \ src/core/ext/client_config/uri_parser.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ - src/core/ext/transport/cronet/client/secure/cronet_channel_create.c \ - src/core/ext/transport/cronet/transport/cronet_api_dummy.c \ - src/core/ext/transport/cronet/transport/cronet_transport.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ @@ -2673,7 +2670,6 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_win32.h \ include/grpc/impl/codegen/time.h \ - include/grpc/grpc_cronet.h \ include/grpc/grpc_security.h \ include/grpc/grpc_security_constants.h \ include/grpc/census.h \ @@ -14321,9 +14317,6 @@ ifneq ($(OPENSSL_DEP),) # otherwise parallel compilation will fail if a source is compiled first. src/core/ext/transport/chttp2/client/secure/secure_channel_create.c: $(OPENSSL_DEP) src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c: $(OPENSSL_DEP) -src/core/ext/transport/cronet/client/secure/cronet_channel_create.c: $(OPENSSL_DEP) -src/core/ext/transport/cronet/transport/cronet_api_dummy.c: $(OPENSSL_DEP) -src/core/ext/transport/cronet/transport/cronet_transport.c: $(OPENSSL_DEP) src/core/lib/http/httpcli_security_connector.c: $(OPENSSL_DEP) src/core/lib/security/b64.c: $(OPENSSL_DEP) src/core/lib/security/client_auth_filter.c: $(OPENSSL_DEP) diff --git a/binding.gyp b/binding.gyp index 12a745ffb01..4314ab7243d 100644 --- a/binding.gyp +++ b/binding.gyp @@ -709,9 +709,6 @@ 'src/core/ext/client_config/uri_parser.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', - 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.c', - 'src/core/ext/transport/cronet/transport/cronet_api_dummy.c', - 'src/core/ext/transport/cronet/transport/cronet_transport.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c', 'third_party/nanopb/pb_common.c', diff --git a/build.yaml b/build.yaml index 7a74e73c726..a21dc688adf 100644 --- a/build.yaml +++ b/build.yaml @@ -400,7 +400,6 @@ filegroups: - grpc_client_config - name: grpc_secure public_headers: - - include/grpc/grpc_cronet.h - include/grpc/grpc_security.h - include/grpc/grpc_security_constants.h headers: @@ -548,63 +547,6 @@ filegroups: - grpc_transport_chttp2 - grpc_base - grpc_secure -- name: grpc_transport_cronet_client_secure - headers: - - include/grpc/byte_buffer.h - - include/grpc/grpc.h - - include/grpc/impl/codegen/alloc.h - - include/grpc/impl/codegen/atm.h - - include/grpc/impl/codegen/atm_gcc_atomic.h - - include/grpc/impl/codegen/atm_gcc_sync.h - - include/grpc/impl/codegen/atm_win32.h - - include/grpc/impl/codegen/byte_buffer.h - - include/grpc/impl/codegen/compression_types.h - - include/grpc/impl/codegen/connectivity_state.h - - include/grpc/impl/codegen/grpc_types.h - - include/grpc/impl/codegen/log.h - - include/grpc/impl/codegen/port_platform.h - - include/grpc/impl/codegen/propagation_bits.h - - include/grpc/impl/codegen/slice.h - - include/grpc/impl/codegen/slice_buffer.h - - include/grpc/impl/codegen/status.h - - include/grpc/impl/codegen/sync.h - - include/grpc/impl/codegen/sync_generic.h - - include/grpc/impl/codegen/sync_posix.h - - include/grpc/impl/codegen/sync_win32.h - - include/grpc/impl/codegen/time.h - - include/grpc/status.h - - include/grpc/support/alloc.h - - include/grpc/support/atm.h - - include/grpc/support/host_port.h - - include/grpc/support/log.h - - include/grpc/support/port_platform.h - - include/grpc/support/slice.h - - include/grpc/support/slice_buffer.h - - include/grpc/support/string_util.h - - include/grpc/support/sync.h - - include/grpc/support/time.h - - include/grpc/support/useful.h - - src/core/ext/transport/chttp2/transport/incoming_metadata.h - - src/core/lib/channel/channel_stack.h - - src/core/lib/channel/context.h - - src/core/lib/debug/trace.h - - src/core/lib/iomgr/closure.h - - src/core/lib/iomgr/exec_ctx.h - - src/core/lib/iomgr/pollset.h - - src/core/lib/iomgr/pollset_set.h - - src/core/lib/support/string.h - - src/core/lib/surface/channel.h - - src/core/lib/surface/channel_stack_type.h - - src/core/lib/transport/byte_stream.h - - src/core/lib/transport/metadata.h - - src/core/lib/transport/metadata_batch.h - - src/core/lib/transport/transport.h - - src/core/lib/transport/transport_impl.h - - third_party/objective_c/Cronet/cronet_c_for_grpc.h - src: - - src/core/ext/transport/cronet/client/secure/cronet_channel_create.c - - src/core/ext/transport/cronet/transport/cronet_api_dummy.c - - src/core/ext/transport/cronet/transport/cronet_transport.c - name: nanopb headers: - third_party/nanopb/pb.h @@ -792,7 +734,6 @@ libs: - grpc_transport_chttp2_client_secure - grpc_transport_chttp2_server_insecure - grpc_transport_chttp2_client_insecure - - grpc_transport_cronet_client_secure - grpc_lb_policy_grpclb - grpc_lb_policy_pick_first - grpc_lb_policy_round_robin diff --git a/config.m4 b/config.m4 index 5259e679ba9..74f9ad242ab 100644 --- a/config.m4 +++ b/config.m4 @@ -228,9 +228,6 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/client_config/uri_parser.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ - src/core/ext/transport/cronet/client/secure/cronet_channel_create.c \ - src/core/ext/transport/cronet/transport/cronet_api_dummy.c \ - src/core/ext/transport/cronet/transport/cronet_transport.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ @@ -569,8 +566,6 @@ if test "$PHP_GRPC" != "no"; then PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/server/insecure) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/server/secure) PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/chttp2/transport) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/cronet/client/secure) - PHP_ADD_BUILD_DIR($ext_builddir/src/core/ext/transport/cronet/transport) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/channel) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/compression) PHP_ADD_BUILD_DIR($ext_builddir/src/core/lib/debug) diff --git a/gRPC.podspec b/gRPC.podspec index 018306ca643..569f89bf7c0 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -287,42 +287,6 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/subchannel_call_holder.h', 'src/core/ext/client_config/subchannel_index.h', 'src/core/ext/client_config/uri_parser.h', - 'include/grpc/byte_buffer.h', - 'include/grpc/grpc.h', - 'include/grpc/impl/codegen/alloc.h', - 'include/grpc/impl/codegen/atm.h', - 'include/grpc/impl/codegen/atm_gcc_atomic.h', - 'include/grpc/impl/codegen/atm_gcc_sync.h', - 'include/grpc/impl/codegen/atm_win32.h', - 'include/grpc/impl/codegen/byte_buffer.h', - 'include/grpc/impl/codegen/compression_types.h', - 'include/grpc/impl/codegen/connectivity_state.h', - 'include/grpc/impl/codegen/grpc_types.h', - 'include/grpc/impl/codegen/log.h', - 'include/grpc/impl/codegen/port_platform.h', - 'include/grpc/impl/codegen/propagation_bits.h', - 'include/grpc/impl/codegen/slice.h', - 'include/grpc/impl/codegen/slice_buffer.h', - 'include/grpc/impl/codegen/status.h', - 'include/grpc/impl/codegen/sync.h', - 'include/grpc/impl/codegen/sync_generic.h', - 'include/grpc/impl/codegen/sync_posix.h', - 'include/grpc/impl/codegen/sync_win32.h', - 'include/grpc/impl/codegen/time.h', - 'include/grpc/status.h', - 'include/grpc/support/alloc.h', - 'include/grpc/support/atm.h', - 'include/grpc/support/host_port.h', - 'include/grpc/support/log.h', - 'include/grpc/support/port_platform.h', - 'include/grpc/support/slice.h', - 'include/grpc/support/slice_buffer.h', - 'include/grpc/support/string_util.h', - 'include/grpc/support/sync.h', - 'include/grpc/support/time.h', - 'include/grpc/support/useful.h', - 'src/core/lib/support/string.h', - 'third_party/objective_c/Cronet/cronet_c_for_grpc.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h', 'third_party/nanopb/pb.h', @@ -361,7 +325,6 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/sync_posix.h', 'include/grpc/impl/codegen/sync_win32.h', 'include/grpc/impl/codegen/time.h', - 'include/grpc/grpc_cronet.h', 'include/grpc/grpc_security.h', 'include/grpc/grpc_security_constants.h', 'include/grpc/census.h', @@ -511,9 +474,6 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/uri_parser.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', - 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.c', - 'src/core/ext/transport/cronet/transport/cronet_api_dummy.c', - 'src/core/ext/transport/cronet/transport/cronet_transport.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c', 'third_party/nanopb/pb_common.c', @@ -670,42 +630,6 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/subchannel_call_holder.h', 'src/core/ext/client_config/subchannel_index.h', 'src/core/ext/client_config/uri_parser.h', - 'include/grpc/byte_buffer.h', - 'include/grpc/grpc.h', - 'include/grpc/impl/codegen/alloc.h', - 'include/grpc/impl/codegen/atm.h', - 'include/grpc/impl/codegen/atm_gcc_atomic.h', - 'include/grpc/impl/codegen/atm_gcc_sync.h', - 'include/grpc/impl/codegen/atm_win32.h', - 'include/grpc/impl/codegen/byte_buffer.h', - 'include/grpc/impl/codegen/compression_types.h', - 'include/grpc/impl/codegen/connectivity_state.h', - 'include/grpc/impl/codegen/grpc_types.h', - 'include/grpc/impl/codegen/log.h', - 'include/grpc/impl/codegen/port_platform.h', - 'include/grpc/impl/codegen/propagation_bits.h', - 'include/grpc/impl/codegen/slice.h', - 'include/grpc/impl/codegen/slice_buffer.h', - 'include/grpc/impl/codegen/status.h', - 'include/grpc/impl/codegen/sync.h', - 'include/grpc/impl/codegen/sync_generic.h', - 'include/grpc/impl/codegen/sync_posix.h', - 'include/grpc/impl/codegen/sync_win32.h', - 'include/grpc/impl/codegen/time.h', - 'include/grpc/status.h', - 'include/grpc/support/alloc.h', - 'include/grpc/support/atm.h', - 'include/grpc/support/host_port.h', - 'include/grpc/support/log.h', - 'include/grpc/support/port_platform.h', - 'include/grpc/support/slice.h', - 'include/grpc/support/slice_buffer.h', - 'include/grpc/support/string_util.h', - 'include/grpc/support/sync.h', - 'include/grpc/support/time.h', - 'include/grpc/support/useful.h', - 'src/core/lib/support/string.h', - 'third_party/objective_c/Cronet/cronet_c_for_grpc.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h', 'third_party/nanopb/pb.h', diff --git a/grpc.def b/grpc.def index 09a94a6cd0c..61948ed1b89 100644 --- a/grpc.def +++ b/grpc.def @@ -87,7 +87,6 @@ EXPORTS grpc_header_nonbin_value_is_legal grpc_is_binary_header grpc_call_error_to_string - grpc_cronet_secure_channel_create grpc_auth_property_iterator_next grpc_auth_context_property_iterator grpc_auth_context_peer_identity diff --git a/grpc.gemspec b/grpc.gemspec index ace28715dcd..475fc990ad4 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -169,7 +169,6 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/impl/codegen/sync_posix.h ) s.files += %w( include/grpc/impl/codegen/sync_win32.h ) s.files += %w( include/grpc/impl/codegen/time.h ) - s.files += %w( include/grpc/grpc_cronet.h ) s.files += %w( include/grpc/grpc_security.h ) s.files += %w( include/grpc/grpc_security_constants.h ) s.files += %w( include/grpc/census.h ) @@ -297,42 +296,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_config/subchannel_call_holder.h ) s.files += %w( src/core/ext/client_config/subchannel_index.h ) s.files += %w( src/core/ext/client_config/uri_parser.h ) - s.files += %w( include/grpc/byte_buffer.h ) - s.files += %w( include/grpc/grpc.h ) - s.files += %w( include/grpc/impl/codegen/alloc.h ) - s.files += %w( include/grpc/impl/codegen/atm.h ) - s.files += %w( include/grpc/impl/codegen/atm_gcc_atomic.h ) - s.files += %w( include/grpc/impl/codegen/atm_gcc_sync.h ) - s.files += %w( include/grpc/impl/codegen/atm_win32.h ) - s.files += %w( include/grpc/impl/codegen/byte_buffer.h ) - s.files += %w( include/grpc/impl/codegen/compression_types.h ) - s.files += %w( include/grpc/impl/codegen/connectivity_state.h ) - s.files += %w( include/grpc/impl/codegen/grpc_types.h ) - s.files += %w( include/grpc/impl/codegen/log.h ) - s.files += %w( include/grpc/impl/codegen/port_platform.h ) - s.files += %w( include/grpc/impl/codegen/propagation_bits.h ) - s.files += %w( include/grpc/impl/codegen/slice.h ) - s.files += %w( include/grpc/impl/codegen/slice_buffer.h ) - s.files += %w( include/grpc/impl/codegen/status.h ) - s.files += %w( include/grpc/impl/codegen/sync.h ) - s.files += %w( include/grpc/impl/codegen/sync_generic.h ) - s.files += %w( include/grpc/impl/codegen/sync_posix.h ) - s.files += %w( include/grpc/impl/codegen/sync_win32.h ) - s.files += %w( include/grpc/impl/codegen/time.h ) - s.files += %w( include/grpc/status.h ) - s.files += %w( include/grpc/support/alloc.h ) - s.files += %w( include/grpc/support/atm.h ) - s.files += %w( include/grpc/support/host_port.h ) - s.files += %w( include/grpc/support/log.h ) - s.files += %w( include/grpc/support/port_platform.h ) - s.files += %w( include/grpc/support/slice.h ) - s.files += %w( include/grpc/support/slice_buffer.h ) - s.files += %w( include/grpc/support/string_util.h ) - s.files += %w( include/grpc/support/sync.h ) - s.files += %w( include/grpc/support/time.h ) - s.files += %w( include/grpc/support/useful.h ) - s.files += %w( src/core/lib/support/string.h ) - s.files += %w( third_party/objective_c/Cronet/cronet_c_for_grpc.h ) s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.h ) s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h ) s.files += %w( third_party/nanopb/pb.h ) @@ -491,9 +454,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_config/uri_parser.c ) s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2.c ) s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create.c ) - s.files += %w( src/core/ext/transport/cronet/client/secure/cronet_channel_create.c ) - s.files += %w( src/core/ext/transport/cronet/transport/cronet_api_dummy.c ) - s.files += %w( src/core/ext/transport/cronet/transport/cronet_transport.c ) s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.c ) s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c ) s.files += %w( third_party/nanopb/pb_common.c ) diff --git a/include/grpc/grpc_cronet.h b/include/grpc/grpc_cronet.h deleted file mode 100644 index 295e0f55e80..00000000000 --- a/include/grpc/grpc_cronet.h +++ /dev/null @@ -1,51 +0,0 @@ -/* - * - * Copyright 2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef GRPC_GRPC_CRONET_H -#define GRPC_GRPC_CRONET_H - -#include - -#ifdef __cplusplus -extern "C" { -#endif - -GRPCAPI grpc_channel *grpc_cronet_secure_channel_create( - void *engine, const char *target, const grpc_channel_args *args, - void *reserved); - -#ifdef __cplusplus -} -#endif - -#endif /* GRPC_GRPC_CRONET_H */ diff --git a/package.xml b/package.xml index 716d6ed2891..ab6dee06318 100644 --- a/package.xml +++ b/package.xml @@ -176,7 +176,6 @@ - @@ -304,42 +303,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -498,9 +461,6 @@ - - - diff --git a/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c b/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c deleted file mode 100644 index df1acddcc08..00000000000 --- a/src/core/ext/transport/cronet/client/secure/cronet_channel_create.c +++ /dev/null @@ -1,69 +0,0 @@ -/* - * - * Copyright 2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include - -#include -#include - -#include -#include - -#include "src/core/lib/surface/channel.h" -#include "src/core/lib/transport/transport_impl.h" - -// Cronet transport object -typedef struct cronet_transport { - grpc_transport base; // must be first element in this structure - void *engine; - char *host; -} cronet_transport; - -extern grpc_transport_vtable grpc_cronet_vtable; - -GRPCAPI grpc_channel *grpc_cronet_secure_channel_create( - void *engine, const char *target, const grpc_channel_args *args, - void *reserved) { - cronet_transport *ct = gpr_malloc(sizeof(cronet_transport)); - ct->base.vtable = &grpc_cronet_vtable; - ct->engine = engine; - ct->host = gpr_malloc(strlen(target) + 1); - strcpy(ct->host, target); - gpr_log(GPR_DEBUG, - "grpc_create_cronet_transport: cronet_engine = %p, target=%s", engine, - ct->host); - - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - return grpc_channel_create(&exec_ctx, target, args, - GRPC_CLIENT_DIRECT_CHANNEL, (grpc_transport *)ct); -} diff --git a/src/core/ext/transport/cronet/transport/cronet_api_dummy.c b/src/core/ext/transport/cronet/transport/cronet_api_dummy.c deleted file mode 100644 index 687026c9fde..00000000000 --- a/src/core/ext/transport/cronet/transport/cronet_api_dummy.c +++ /dev/null @@ -1,85 +0,0 @@ -/* - * - * Copyright 2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/* This file has empty implementation of all the functions exposed by the cronet -library, so we can build it in all environments */ - -#include - -#include - -#include "third_party/objective_c/Cronet/cronet_c_for_grpc.h" - -#ifdef GRPC_COMPILE_WITH_CRONET -/* link with the real CRONET library in the build system */ -#else -/* Dummy implementation of cronet API just to test for build-ability */ -cronet_bidirectional_stream* cronet_bidirectional_stream_create( - cronet_engine* engine, void* annotation, - cronet_bidirectional_stream_callback* callback) { - GPR_ASSERT(0); - return NULL; -} - -int cronet_bidirectional_stream_destroy(cronet_bidirectional_stream* stream) { - GPR_ASSERT(0); - return 0; -} - -int cronet_bidirectional_stream_start( - cronet_bidirectional_stream* stream, const char* url, int priority, - const char* method, const cronet_bidirectional_stream_header_array* headers, - bool end_of_stream) { - GPR_ASSERT(0); - return 0; -} - -int cronet_bidirectional_stream_read(cronet_bidirectional_stream* stream, - char* buffer, int capacity) { - GPR_ASSERT(0); - return 0; -} - -int cronet_bidirectional_stream_write(cronet_bidirectional_stream* stream, - const char* buffer, int count, - bool end_of_stream) { - GPR_ASSERT(0); - return 0; -} - -int cronet_bidirectional_stream_cancel(cronet_bidirectional_stream* stream) { - GPR_ASSERT(0); - return 0; -} - -#endif /* GRPC_COMPILE_WITH_CRONET */ diff --git a/src/core/ext/transport/cronet/transport/cronet_transport.c b/src/core/ext/transport/cronet/transport/cronet_transport.c deleted file mode 100644 index 5bb085195c6..00000000000 --- a/src/core/ext/transport/cronet/transport/cronet_transport.c +++ /dev/null @@ -1,640 +0,0 @@ -/* - * - * Copyright 2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include - -#include -#include -#include -#include -#include -#include -#include - -#include "src/core/ext/transport/chttp2/transport/incoming_metadata.h" -#include "src/core/lib/iomgr/exec_ctx.h" -#include "src/core/lib/support/string.h" -#include "src/core/lib/surface/channel.h" -#include "src/core/lib/transport/metadata_batch.h" -#include "src/core/lib/transport/transport_impl.h" -#include "third_party/objective_c/Cronet/cronet_c_for_grpc.h" - -#define GRPC_HEADER_SIZE_IN_BYTES 5 - -// Global flag that gets set with GRPC_TRACE env variable -int grpc_cronet_trace = 1; - -// Cronet transport object -struct grpc_cronet_transport { - grpc_transport base; /* must be first element in this structure */ - cronet_engine *engine; - char *host; -}; - -typedef struct grpc_cronet_transport grpc_cronet_transport; - -enum send_state { - CRONET_SEND_IDLE = 0, - CRONET_REQ_STARTED, - CRONET_SEND_HEADER, - CRONET_WRITE, - CRONET_WRITE_COMPLETED, -}; - -enum recv_state { - CRONET_RECV_IDLE = 0, - CRONET_RECV_READ_LENGTH, - CRONET_RECV_READ_DATA, - CRONET_RECV_CLOSED, -}; - -static const char *recv_state_name[] = { - "CRONET_RECV_IDLE", "CRONET_RECV_READ_LENGTH", "CRONET_RECV_READ_DATA,", - "CRONET_RECV_CLOSED"}; - -// Enum that identifies calling function. -enum e_caller { - PERFORM_STREAM_OP, - ON_READ_COMPLETE, - ON_RESPONSE_HEADERS_RECEIVED, - ON_RESPONSE_TRAILERS_RECEIVED -}; - -enum callback_id { - CB_SEND_INITIAL_METADATA = 0, - CB_SEND_MESSAGE, - CB_SEND_TRAILING_METADATA, - CB_RECV_MESSAGE, - CB_RECV_INITIAL_METADATA, - CB_RECV_TRAILING_METADATA, - CB_NUM_CALLBACKS -}; - -struct stream_obj { - // we store received bytes here as they trickle in. - gpr_slice_buffer write_slice_buffer; - cronet_bidirectional_stream *cbs; - gpr_slice slice; - gpr_slice_buffer read_slice_buffer; - struct grpc_slice_buffer_stream sbs; - char *read_buffer; - int remaining_read_bytes; - int total_read_bytes; - - char *write_buffer; - size_t write_buffer_size; - - // Hold the URL - char *url; - - bool response_headers_received; - bool read_requested; - bool response_trailers_received; - bool read_closed; - - // Recv message stuff - grpc_byte_buffer **recv_message; - // Initial metadata stuff - grpc_metadata_batch *recv_initial_metadata; - // Trailing metadata stuff - grpc_metadata_batch *recv_trailing_metadata; - grpc_chttp2_incoming_metadata_buffer imb; - - // This mutex protects receive state machine execution - gpr_mu recv_mu; - // we can queue up up to 2 callbacks for each OP - grpc_closure *callback_list[CB_NUM_CALLBACKS][2]; - - // storage for header - cronet_bidirectional_stream_header *headers; - uint32_t num_headers; - cronet_bidirectional_stream_header_array header_array; - // state tracking - enum recv_state cronet_recv_state; - enum send_state cronet_send_state; -}; - -typedef struct stream_obj stream_obj; - -static void next_send_step(stream_obj *s); -static void next_recv_step(stream_obj *s, enum e_caller caller); - -static void set_pollset_do_nothing(grpc_exec_ctx *exec_ctx, grpc_transport *gt, - grpc_stream *gs, grpc_pollset *pollset) {} - -static void enqueue_callbacks(grpc_closure *callback_list[]) { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - if (callback_list[0]) { - grpc_exec_ctx_enqueue(&exec_ctx, callback_list[0], true, NULL); - callback_list[0] = NULL; - } - if (callback_list[1]) { - grpc_exec_ctx_enqueue(&exec_ctx, callback_list[1], true, NULL); - callback_list[1] = NULL; - } - grpc_exec_ctx_finish(&exec_ctx); -} - -static void on_canceled(cronet_bidirectional_stream *stream) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "on_canceled %p", stream); - } -} - -static void on_failed(cronet_bidirectional_stream *stream, int net_error) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "on_failed %p, error = %d", stream, net_error); - } -} - -static void on_succeeded(cronet_bidirectional_stream *stream) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "on_succeeded %p", stream); - } -} - -static void on_response_trailers_received( - cronet_bidirectional_stream *stream, - const cronet_bidirectional_stream_header_array *trailers) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "R: on_response_trailers_received"); - } - stream_obj *s = (stream_obj *)stream->annotation; - - memset(&s->imb, 0, sizeof(s->imb)); - grpc_chttp2_incoming_metadata_buffer_init(&s->imb); - unsigned int i = 0; - for (i = 0; i < trailers->count; i++) { - grpc_chttp2_incoming_metadata_buffer_add( - &s->imb, grpc_mdelem_from_metadata_strings( - grpc_mdstr_from_string(trailers->headers[i].key), - grpc_mdstr_from_string(trailers->headers[i].value))); - } - s->response_trailers_received = true; - next_recv_step(s, ON_RESPONSE_TRAILERS_RECEIVED); -} - -static void on_write_completed(cronet_bidirectional_stream *stream, - const char *data) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "W: on_write_completed"); - } - stream_obj *s = (stream_obj *)stream->annotation; - enqueue_callbacks(s->callback_list[CB_SEND_MESSAGE]); - s->cronet_send_state = CRONET_WRITE_COMPLETED; - next_send_step(s); -} - -static void process_recv_message(stream_obj *s, const uint8_t *recv_data) { - gpr_slice read_data_slice = gpr_slice_malloc((uint32_t)s->total_read_bytes); - uint8_t *dst_p = GPR_SLICE_START_PTR(read_data_slice); - memcpy(dst_p, recv_data, (size_t)s->total_read_bytes); - gpr_slice_buffer_add(&s->read_slice_buffer, read_data_slice); - grpc_slice_buffer_stream_init(&s->sbs, &s->read_slice_buffer, 0); - *s->recv_message = (grpc_byte_buffer *)&s->sbs; -} - -static int parse_grpc_header(const uint8_t *data) { - const uint8_t *p = data + 1; - int length = 0; - length |= ((uint8_t)*p++) << 24; - length |= ((uint8_t)*p++) << 16; - length |= ((uint8_t)*p++) << 8; - length |= ((uint8_t)*p++); - return length; -} - -static void on_read_completed(cronet_bidirectional_stream *stream, char *data, - int count) { - stream_obj *s = (stream_obj *)stream->annotation; - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "R: on_read_completed count=%d, total=%d, remaining=%d", - count, s->total_read_bytes, s->remaining_read_bytes); - } - if (count > 0) { - GPR_ASSERT(s->recv_message); - s->remaining_read_bytes -= count; - next_recv_step(s, ON_READ_COMPLETE); - } else { - s->read_closed = true; - next_recv_step(s, ON_READ_COMPLETE); - } -} - -static void on_response_headers_received( - cronet_bidirectional_stream *stream, - const cronet_bidirectional_stream_header_array *headers, - const char *negotiated_protocol) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "R: on_response_headers_received"); - } - stream_obj *s = (stream_obj *)stream->annotation; - enqueue_callbacks(s->callback_list[CB_RECV_INITIAL_METADATA]); - s->response_headers_received = true; - next_recv_step(s, ON_RESPONSE_HEADERS_RECEIVED); -} - -static void on_request_headers_sent(cronet_bidirectional_stream *stream) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "W: on_request_headers_sent"); - } - stream_obj *s = (stream_obj *)stream->annotation; - enqueue_callbacks(s->callback_list[CB_SEND_INITIAL_METADATA]); - s->cronet_send_state = CRONET_SEND_HEADER; - next_send_step(s); -} - -// Callback function pointers (invoked by cronet in response to events) -static cronet_bidirectional_stream_callback callbacks = { - on_request_headers_sent, - on_response_headers_received, - on_read_completed, - on_write_completed, - on_response_trailers_received, - on_succeeded, - on_failed, - on_canceled}; - -static void invoke_closing_callback(stream_obj *s) { - grpc_chttp2_incoming_metadata_buffer_publish(&s->imb, - s->recv_trailing_metadata); - if (s->callback_list[CB_RECV_TRAILING_METADATA]) { - enqueue_callbacks(s->callback_list[CB_RECV_TRAILING_METADATA]); - } -} - -static void set_recv_state(stream_obj *s, enum recv_state state) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "next_state = %s", recv_state_name[state]); - } - s->cronet_recv_state = state; -} - -// This is invoked from perform_stream_op, and all on_xxxx callbacks. -static void next_recv_step(stream_obj *s, enum e_caller caller) { - gpr_mu_lock(&s->recv_mu); - switch (s->cronet_recv_state) { - case CRONET_RECV_IDLE: - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "cronet_recv_state = CRONET_RECV_IDLE"); - } - if (caller == PERFORM_STREAM_OP || - caller == ON_RESPONSE_HEADERS_RECEIVED) { - if (s->read_closed && s->response_trailers_received) { - invoke_closing_callback(s); - set_recv_state(s, CRONET_RECV_CLOSED); - } else if (s->response_headers_received == true && - s->read_requested == true) { - set_recv_state(s, CRONET_RECV_READ_LENGTH); - s->total_read_bytes = s->remaining_read_bytes = - GRPC_HEADER_SIZE_IN_BYTES; - GPR_ASSERT(s->read_buffer); - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "R: cronet_bidirectional_stream_read()"); - } - cronet_bidirectional_stream_read(s->cbs, s->read_buffer, - s->remaining_read_bytes); - } - } - break; - case CRONET_RECV_READ_LENGTH: - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "cronet_recv_state = CRONET_RECV_READ_LENGTH"); - } - if (caller == ON_READ_COMPLETE) { - if (s->read_closed) { - invoke_closing_callback(s); - enqueue_callbacks(s->callback_list[CB_RECV_MESSAGE]); - set_recv_state(s, CRONET_RECV_CLOSED); - } else { - GPR_ASSERT(s->remaining_read_bytes == 0); - set_recv_state(s, CRONET_RECV_READ_DATA); - s->total_read_bytes = s->remaining_read_bytes = - parse_grpc_header((const uint8_t *)s->read_buffer); - s->read_buffer = - gpr_realloc(s->read_buffer, (uint32_t)s->remaining_read_bytes); - GPR_ASSERT(s->read_buffer); - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "R: cronet_bidirectional_stream_read()"); - } - cronet_bidirectional_stream_read(s->cbs, (char *)s->read_buffer, - s->remaining_read_bytes); - } - } - break; - case CRONET_RECV_READ_DATA: - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "cronet_recv_state = CRONET_RECV_READ_DATA"); - } - if (caller == ON_READ_COMPLETE) { - if (s->remaining_read_bytes > 0) { - int offset = s->total_read_bytes - s->remaining_read_bytes; - GPR_ASSERT(s->read_buffer); - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "R: cronet_bidirectional_stream_read()"); - } - cronet_bidirectional_stream_read( - s->cbs, (char *)s->read_buffer + offset, s->remaining_read_bytes); - } else { - gpr_slice_buffer_init(&s->read_slice_buffer); - uint8_t *p = (uint8_t *)s->read_buffer; - process_recv_message(s, p); - set_recv_state(s, CRONET_RECV_IDLE); - enqueue_callbacks(s->callback_list[CB_RECV_MESSAGE]); - } - } - break; - case CRONET_RECV_CLOSED: - break; - default: - GPR_ASSERT(0); // Should not reach here - break; - } - gpr_mu_unlock(&s->recv_mu); -} - -// This function takes the data from s->write_slice_buffer and assembles into -// a contiguous byte stream with 5 byte gRPC header prepended. -static void create_grpc_frame(stream_obj *s) { - gpr_slice slice = gpr_slice_buffer_take_first(&s->write_slice_buffer); - uint8_t *raw_data = GPR_SLICE_START_PTR(slice); - size_t length = GPR_SLICE_LENGTH(slice); - s->write_buffer_size = length + GRPC_HEADER_SIZE_IN_BYTES; - s->write_buffer = gpr_realloc(s->write_buffer, s->write_buffer_size); - uint8_t *p = (uint8_t *)s->write_buffer; - // Append 5 byte header - *p++ = 0; - *p++ = (uint8_t)(length >> 24); - *p++ = (uint8_t)(length >> 16); - *p++ = (uint8_t)(length >> 8); - *p++ = (uint8_t)(length); - // append actual data - memcpy(p, raw_data, length); -} - -static void do_write(stream_obj *s) { - gpr_slice_buffer *sb = &s->write_slice_buffer; - GPR_ASSERT(sb->count <= 1); - if (sb->count > 0) { - create_grpc_frame(s); - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "W: cronet_bidirectional_stream_write"); - } - cronet_bidirectional_stream_write(s->cbs, s->write_buffer, - (int)s->write_buffer_size, false); - } -} - -// -static void next_send_step(stream_obj *s) { - switch (s->cronet_send_state) { - case CRONET_SEND_IDLE: - GPR_ASSERT( - s->cbs); // cronet_bidirectional_stream is not initialized yet. - s->cronet_send_state = CRONET_REQ_STARTED; - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "cronet_bidirectional_stream_start to %s", s->url); - } - cronet_bidirectional_stream_start(s->cbs, s->url, 0, "POST", - &s->header_array, false); - // we no longer need the memory that was allocated earlier. - gpr_free(s->header_array.headers); - break; - case CRONET_SEND_HEADER: - do_write(s); - s->cronet_send_state = CRONET_WRITE; - break; - case CRONET_WRITE_COMPLETED: - do_write(s); - break; - default: - GPR_ASSERT(0); - break; - } -} - -static void convert_metadata_to_cronet_headers(grpc_linked_mdelem *head, - const char *host, - stream_obj *s) { - grpc_linked_mdelem *curr = head; - // Walk the linked list and get number of header fields - uint32_t num_headers_available = 0; - while (curr != NULL) { - curr = curr->next; - num_headers_available++; - } - // Allocate enough memory - s->headers = (cronet_bidirectional_stream_header *)gpr_malloc( - sizeof(cronet_bidirectional_stream_header) * num_headers_available); - - // Walk the linked list again, this time copying the header fields. - // s->num_headers - // can be less than num_headers_available, as some headers are not used for - // cronet - curr = head; - s->num_headers = 0; - while (s->num_headers < num_headers_available) { - grpc_mdelem *mdelem = curr->md; - curr = curr->next; - const char *key = grpc_mdstr_as_c_string(mdelem->key); - const char *value = grpc_mdstr_as_c_string(mdelem->value); - if (strcmp(key, ":scheme") == 0 || strcmp(key, ":method") == 0 || - strcmp(key, ":authority") == 0) { - // Cronet populates these fields on its own. - continue; - } - if (strcmp(key, ":path") == 0) { - // Create URL by appending :path value to the hostname - gpr_asprintf(&s->url, "https://%s%s", host, value); - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "extracted URL = %s", s->url); - } - continue; - } - s->headers[s->num_headers].key = key; - s->headers[s->num_headers].value = value; - s->num_headers++; - if (curr == NULL) { - break; - } - } -} - -static void perform_stream_op(grpc_exec_ctx *exec_ctx, grpc_transport *gt, - grpc_stream *gs, grpc_transport_stream_op *op) { - grpc_cronet_transport *ct = (grpc_cronet_transport *)gt; - GPR_ASSERT(ct->engine); - stream_obj *s = (stream_obj *)gs; - if (op->recv_trailing_metadata) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, - "perform_stream_op - recv_trailing_metadata: on_complete=%p", - op->on_complete); - } - s->recv_trailing_metadata = op->recv_trailing_metadata; - GPR_ASSERT(!s->callback_list[CB_RECV_TRAILING_METADATA][0]); - s->callback_list[CB_RECV_TRAILING_METADATA][0] = op->on_complete; - } - if (op->recv_message) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "perform_stream_op - recv_message: on_complete=%p", - op->on_complete); - } - s->recv_message = (grpc_byte_buffer **)op->recv_message; - GPR_ASSERT(!s->callback_list[CB_RECV_MESSAGE][0]); - GPR_ASSERT(!s->callback_list[CB_RECV_MESSAGE][1]); - s->callback_list[CB_RECV_MESSAGE][0] = op->recv_message_ready; - s->callback_list[CB_RECV_MESSAGE][1] = op->on_complete; - s->read_requested = true; - next_recv_step(s, PERFORM_STREAM_OP); - } - if (op->recv_initial_metadata) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "perform_stream_op - recv_initial_metadata:=%p", - op->on_complete); - } - s->recv_initial_metadata = op->recv_initial_metadata; - GPR_ASSERT(!s->callback_list[CB_RECV_INITIAL_METADATA][0]); - GPR_ASSERT(!s->callback_list[CB_RECV_INITIAL_METADATA][1]); - s->callback_list[CB_RECV_INITIAL_METADATA][0] = - op->recv_initial_metadata_ready; - s->callback_list[CB_RECV_INITIAL_METADATA][1] = op->on_complete; - } - if (op->send_initial_metadata) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, - "perform_stream_op - send_initial_metadata: on_complete=%p", - op->on_complete); - } - s->num_headers = 0; - convert_metadata_to_cronet_headers(op->send_initial_metadata->list.head, - ct->host, s); - s->header_array.count = s->num_headers; - s->header_array.capacity = s->num_headers; - s->header_array.headers = s->headers; - GPR_ASSERT(!s->callback_list[CB_SEND_INITIAL_METADATA][0]); - s->callback_list[CB_SEND_INITIAL_METADATA][0] = op->on_complete; - } - if (op->send_message) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "perform_stream_op - send_message: on_complete=%p", - op->on_complete); - } - grpc_byte_stream_next(exec_ctx, op->send_message, &s->slice, - op->send_message->length, NULL); - // Check that compression flag is not ON. We don't support compression yet. - // TODO (makdharma): add compression support - GPR_ASSERT(op->send_message->flags == 0); - gpr_slice_buffer_add(&s->write_slice_buffer, s->slice); - if (s->cbs == NULL) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "cronet_bidirectional_stream_create"); - } - s->cbs = cronet_bidirectional_stream_create(ct->engine, s, &callbacks); - GPR_ASSERT(s->cbs); - s->read_closed = false; - s->response_trailers_received = false; - s->response_headers_received = false; - s->cronet_send_state = CRONET_SEND_IDLE; - s->cronet_recv_state = CRONET_RECV_IDLE; - } - GPR_ASSERT(!s->callback_list[CB_SEND_MESSAGE][0]); - s->callback_list[CB_SEND_MESSAGE][0] = op->on_complete; - next_send_step(s); - } - if (op->send_trailing_metadata) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, - "perform_stream_op - send_trailing_metadata: on_complete=%p", - op->on_complete); - } - GPR_ASSERT(!s->callback_list[CB_SEND_TRAILING_METADATA][0]); - s->callback_list[CB_SEND_TRAILING_METADATA][0] = op->on_complete; - if (s->cbs) { - // Send an "empty" write to the far end to signal that we're done. - // This will induce the server to send down trailers. - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "W: cronet_bidirectional_stream_write"); - } - cronet_bidirectional_stream_write(s->cbs, "abc", 0, true); - } else { - // We never created a stream. This was probably an empty request. - invoke_closing_callback(s); - } - } -} - -static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, - grpc_stream *gs, grpc_stream_refcount *refcount, - const void *server_data) { - stream_obj *s = (stream_obj *)gs; - memset(s->callback_list, 0, sizeof(s->callback_list)); - s->cbs = NULL; - gpr_mu_init(&s->recv_mu); - s->read_buffer = gpr_malloc(GRPC_HEADER_SIZE_IN_BYTES); - s->write_buffer = gpr_malloc(GRPC_HEADER_SIZE_IN_BYTES); - gpr_slice_buffer_init(&s->write_slice_buffer); - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "cronet_transport - init_stream"); - } - return 0; -} - -static void destroy_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, - grpc_stream *gs, void *and_free_memory) { - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "Destroy stream"); - } - stream_obj *s = (stream_obj *)gs; - s->cbs = NULL; - gpr_free(s->read_buffer); - gpr_free(s->write_buffer); - gpr_free(s->url); - gpr_mu_destroy(&s->recv_mu); - if (and_free_memory) { - gpr_free(and_free_memory); - } -} - -static void destroy_transport(grpc_exec_ctx *exec_ctx, grpc_transport *gt) { - grpc_cronet_transport *ct = (grpc_cronet_transport *)gt; - gpr_free(ct->host); - if (grpc_cronet_trace) { - gpr_log(GPR_DEBUG, "Destroy transport"); - } -} - -const grpc_transport_vtable grpc_cronet_vtable = { - sizeof(stream_obj), "cronet_http", init_stream, - set_pollset_do_nothing, perform_stream_op, NULL, - destroy_stream, destroy_transport, NULL}; diff --git a/src/python/grpcio/grpc/_cython/imports.generated.c b/src/python/grpcio/grpc/_cython/imports.generated.c index 09551472b5f..f0a40dbb35c 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.c +++ b/src/python/grpcio/grpc/_cython/imports.generated.c @@ -125,7 +125,6 @@ grpc_header_key_is_legal_type grpc_header_key_is_legal_import; grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_import; grpc_is_binary_header_type grpc_is_binary_header_import; grpc_call_error_to_string_type grpc_call_error_to_string_import; -grpc_cronet_secure_channel_create_type grpc_cronet_secure_channel_create_import; grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import; grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import; @@ -396,7 +395,6 @@ void pygrpc_load_imports(HMODULE library) { grpc_header_nonbin_value_is_legal_import = (grpc_header_nonbin_value_is_legal_type) GetProcAddress(library, "grpc_header_nonbin_value_is_legal"); grpc_is_binary_header_import = (grpc_is_binary_header_type) GetProcAddress(library, "grpc_is_binary_header"); grpc_call_error_to_string_import = (grpc_call_error_to_string_type) GetProcAddress(library, "grpc_call_error_to_string"); - grpc_cronet_secure_channel_create_import = (grpc_cronet_secure_channel_create_type) GetProcAddress(library, "grpc_cronet_secure_channel_create"); grpc_auth_property_iterator_next_import = (grpc_auth_property_iterator_next_type) GetProcAddress(library, "grpc_auth_property_iterator_next"); grpc_auth_context_property_iterator_import = (grpc_auth_context_property_iterator_type) GetProcAddress(library, "grpc_auth_context_property_iterator"); grpc_auth_context_peer_identity_import = (grpc_auth_context_peer_identity_type) GetProcAddress(library, "grpc_auth_context_peer_identity"); diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index 54c8aaad13e..d5e810b7cf4 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include @@ -326,9 +325,6 @@ extern grpc_is_binary_header_type grpc_is_binary_header_import; typedef const char *(*grpc_call_error_to_string_type)(grpc_call_error error); extern grpc_call_error_to_string_type grpc_call_error_to_string_import; #define grpc_call_error_to_string grpc_call_error_to_string_import -typedef grpc_channel *(*grpc_cronet_secure_channel_create_type)(void *engine, const char *target, const grpc_channel_args *args, void *reserved); -extern grpc_cronet_secure_channel_create_type grpc_cronet_secure_channel_create_import; -#define grpc_cronet_secure_channel_create grpc_cronet_secure_channel_create_import typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); extern grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; #define grpc_auth_property_iterator_next grpc_auth_property_iterator_next_import diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 5314329c2cb..dab62530aac 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -222,9 +222,6 @@ CORE_SOURCE_FILES = [ 'src/core/ext/client_config/uri_parser.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', - 'src/core/ext/transport/cronet/client/secure/cronet_channel_create.c', - 'src/core/ext/transport/cronet/transport/cronet_api_dummy.c', - 'src/core/ext/transport/cronet/transport/cronet_transport.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c', 'third_party/nanopb/pb_common.c', diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index cebbe8c40fe..bc43f9d36b5 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -125,7 +125,6 @@ grpc_header_key_is_legal_type grpc_header_key_is_legal_import; grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_import; grpc_is_binary_header_type grpc_is_binary_header_import; grpc_call_error_to_string_type grpc_call_error_to_string_import; -grpc_cronet_secure_channel_create_type grpc_cronet_secure_channel_create_import; grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import; grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import; @@ -392,7 +391,6 @@ void grpc_rb_load_imports(HMODULE library) { grpc_header_nonbin_value_is_legal_import = (grpc_header_nonbin_value_is_legal_type) GetProcAddress(library, "grpc_header_nonbin_value_is_legal"); grpc_is_binary_header_import = (grpc_is_binary_header_type) GetProcAddress(library, "grpc_is_binary_header"); grpc_call_error_to_string_import = (grpc_call_error_to_string_type) GetProcAddress(library, "grpc_call_error_to_string"); - grpc_cronet_secure_channel_create_import = (grpc_cronet_secure_channel_create_type) GetProcAddress(library, "grpc_cronet_secure_channel_create"); grpc_auth_property_iterator_next_import = (grpc_auth_property_iterator_next_type) GetProcAddress(library, "grpc_auth_property_iterator_next"); grpc_auth_context_property_iterator_import = (grpc_auth_context_property_iterator_type) GetProcAddress(library, "grpc_auth_context_property_iterator"); grpc_auth_context_peer_identity_import = (grpc_auth_context_peer_identity_type) GetProcAddress(library, "grpc_auth_context_peer_identity"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index d7ea6c574c8..b67361ca25b 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -43,7 +43,6 @@ #include #include #include -#include #include #include #include @@ -326,9 +325,6 @@ extern grpc_is_binary_header_type grpc_is_binary_header_import; typedef const char *(*grpc_call_error_to_string_type)(grpc_call_error error); extern grpc_call_error_to_string_type grpc_call_error_to_string_import; #define grpc_call_error_to_string grpc_call_error_to_string_import -typedef grpc_channel *(*grpc_cronet_secure_channel_create_type)(void *engine, const char *target, const grpc_channel_args *args, void *reserved); -extern grpc_cronet_secure_channel_create_type grpc_cronet_secure_channel_create_import; -#define grpc_cronet_secure_channel_create grpc_cronet_secure_channel_create_import typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); extern grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; #define grpc_auth_property_iterator_next grpc_auth_property_iterator_next_import diff --git a/test/core/surface/public_headers_must_be_c89.c b/test/core/surface/public_headers_must_be_c89.c index fd6ff2c26f5..3eeb55d033d 100644 --- a/test/core/surface/public_headers_must_be_c89.c +++ b/test/core/surface/public_headers_must_be_c89.c @@ -36,7 +36,6 @@ #include #include #include -#include #include #include #include diff --git a/third_party/objective_c/Cronet/cronet_c_for_grpc.h b/third_party/objective_c/Cronet/cronet_c_for_grpc.h deleted file mode 100644 index 15a511aebd0..00000000000 --- a/third_party/objective_c/Cronet/cronet_c_for_grpc.h +++ /dev/null @@ -1,202 +0,0 @@ -// Copyright 2016 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef COMPONENTS_CRONET_IOS_CRONET_C_FOR_GRPC_H_ -#define COMPONENTS_CRONET_IOS_CRONET_C_FOR_GRPC_H_ - -#ifdef __cplusplus -extern "C" { -#endif - -#include - -/* Cronet Engine API. */ - -/* Opaque object representing Cronet Engine. Created and configured outside - * of this API to facilitate sharing with other components */ -typedef struct cronet_engine { void* obj; } cronet_engine; - -void cronet_engine_add_quic_hint(cronet_engine* engine, - const char* host, - int port, - int alternate_port); - -/* Cronet Bidirectional Stream API */ - -/* Opaque object representing Cronet Bidirectional Stream. */ -typedef struct cronet_bidirectional_stream { - void* obj; - void* annotation; -} cronet_bidirectional_stream; - -/* A single request or response header element. */ -typedef struct cronet_bidirectional_stream_header { - const char* key; - const char* value; -} cronet_bidirectional_stream_header; - -/* Array of request or response headers or trailers. */ -typedef struct cronet_bidirectional_stream_header_array { - size_t count; - size_t capacity; - cronet_bidirectional_stream_header* headers; -} cronet_bidirectional_stream_header_array; - -/* Set of callbacks used to receive callbacks from bidirectional stream. */ -typedef struct cronet_bidirectional_stream_callback { - /* Invoked when request headers are sent. Indicates that stream has initiated - * the request. Consumer may call cronet_bidirectional_stream_write() to start - * writing data. - */ - void (*on_request_headers_sent)(cronet_bidirectional_stream* stream); - - /* Invoked when initial response headers are received. - * Consumer must call cronet_bidirectional_stream_read() to start reading. - * Consumer may call cronet_bidirectional_stream_write() to start writing or - * close the stream. Contents of |headers| is valid for duration of the call. - */ - void (*on_response_headers_received)( - cronet_bidirectional_stream* stream, - const cronet_bidirectional_stream_header_array* headers, - const char* negotiated_protocol); - - /* Invoked when data is read into the buffer passed to - * cronet_bidirectional_stream_read(). Only part of the buffer may be - * populated. To continue reading, call cronet_bidirectional_stream_read(). - * It may be invoked after on_response_trailers_received()}, if there was - * pending read data before trailers were received. - * - * If count is 0, it means the remote side has signaled that it will send no - * more data; future calls to cronet_bidirectional_stream_read() will result - * in the on_data_read() callback or on_succeded() callback if - * cronet_bidirectional_stream_write() was invoked with end_of_stream set to - * true. - */ - void (*on_read_completed)(cronet_bidirectional_stream* stream, - char* data, - int count); - - /** - * Invoked when all data passed to cronet_bidirectional_stream_write() is - * sent. - * To continue writing, call cronet_bidirectional_stream_write(). - */ - void (*on_write_completed)(cronet_bidirectional_stream* stream, - const char* data); - - /* Invoked when trailers are received before closing the stream. Only invoked - * when server sends trailers, which it may not. May be invoked while there is - * read data remaining in local buffer. Contents of |trailers| is valid for - * duration of the call. - */ - void (*on_response_trailers_received)( - cronet_bidirectional_stream* stream, - const cronet_bidirectional_stream_header_array* trailers); - - /** - * Invoked when there is no data to be read or written and the stream is - * closed successfully remotely and locally. Once invoked, no further callback - * methods will be invoked. - */ - void (*on_succeded)(cronet_bidirectional_stream* stream); - - /** - * Invoked if the stream failed for any reason after - * cronet_bidirectional_stream_start(). HTTP/2 error codes are - * mapped to chrome net error codes. Once invoked, no further callback methods - * will be invoked. - */ - void (*on_failed)(cronet_bidirectional_stream* stream, int net_error); - - /** - * Invoked if the stream was canceled via - * cronet_bidirectional_stream_cancel(). Once invoked, no further callback - * methods will be invoked. - */ - void (*on_canceled)(cronet_bidirectional_stream* stream); -} cronet_bidirectional_stream_callback; - -/* Create a new stream object that uses |engine| and |callback|. All stream - * tasks are performed asynchronously on the |engine| network thread. |callback| - * methods are invoked synchronously on the |engine| network thread, but must - * not run tasks on the current thread to prevent blocking networking operations - * and causing exceptions during shutdown. The |annotation| is stored in - * bidirectional stream for arbitrary use by application. - * - * Returned |cronet_bidirectional_stream*| is owned by the caller, and must be - * destroyed using |cronet_bidirectional_stream_destroy|. - * - * Both |calback| and |engine| must remain valid until stream is destroyed. - */ -cronet_bidirectional_stream* cronet_bidirectional_stream_create( - cronet_engine* engine, - void* annotation, - cronet_bidirectional_stream_callback* callback); - -/* TBD: The following methods return int. Should it be a custom type? */ - -/* Destroy stream object. Destroy could be called from any thread, including - * network thread, but is posted, so |stream| is valid until calling task is - * complete. - */ -int cronet_bidirectional_stream_destroy(cronet_bidirectional_stream* stream); - -/* Start the stream by sending request to |url| using |method| and |headers|. If - * |end_of_stream| is true, then no data is expected to be written. - */ -int cronet_bidirectional_stream_start( - cronet_bidirectional_stream* stream, - const char* url, - int priority, - const char* method, - const cronet_bidirectional_stream_header_array* headers, - bool end_of_stream); - -/* Read response data into |buffer| of |capacity| length. Must only be called at - * most once in response to each invocation of the - * on_response_headers_received() and on_read_completed() methods of the - * cronet_bidirectional_stream_callback. - * Each call will result in an invocation of one of the callback's - * on_read_completed method if data is read, its on_succeeded() method if - * the stream is closed, or its on_failed() method if there's an error. - */ -int cronet_bidirectional_stream_read(cronet_bidirectional_stream* stream, - char* buffer, - int capacity); - -/* Read response data into |buffer| of |capacity| length. Must only be called at - * most once in response to each invocation of the - * on_response_headers_received() and on_read_completed() methods of the - * cronet_bidirectional_stream_callback. - * Each call will result in an invocation of one of the callback's - * on_read_completed method if data is read, its on_succeeded() method if - * the stream is closed, or its on_failed() method if there's an error. - */ -int cronet_bidirectional_stream_write(cronet_bidirectional_stream* stream, - const char* buffer, - int count, - bool end_of_stream); - -/* Cancels the stream. Can be called at any time after - * cronet_bidirectional_stream_start(). The on_canceled() method of - * cronet_bidirectional_stream_callback will be invoked when cancelation - * is complete and no further callback methods will be invoked. If the - * stream has completed or has not started, calling - * cronet_bidirectional_stream_cancel() has no effect and on_canceled() will not - * be invoked. At most one callback method may be invoked after - * cronet_bidirectional_stream_cancel() has completed. - */ -int cronet_bidirectional_stream_cancel(cronet_bidirectional_stream* stream); - -/* Returns true if the |stream| was successfully started and is now done - * (succeeded, canceled, or failed). - * Returns false if the |stream| stream is not yet started or is in progress. - */ -bool cronet_bidirectional_stream_is_done(cronet_bidirectional_stream* stream); - -#ifdef __cplusplus -} -#endif - -#endif // COMPONENTS_CRONET_IOS_CRONET_C_FOR_GRPC_H_ diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index d1259e7aee3..8b13e6e7933 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -786,7 +786,6 @@ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_win32.h \ include/grpc/impl/codegen/time.h \ -include/grpc/grpc_cronet.h \ include/grpc/grpc_security.h \ include/grpc/grpc_security_constants.h \ include/grpc/census.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 6b7a8be8617..b3b34778743 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -786,7 +786,6 @@ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_win32.h \ include/grpc/impl/codegen/time.h \ -include/grpc/grpc_cronet.h \ include/grpc/grpc_security.h \ include/grpc/grpc_security_constants.h \ include/grpc/census.h \ @@ -914,42 +913,6 @@ src/core/ext/client_config/subchannel.h \ src/core/ext/client_config/subchannel_call_holder.h \ src/core/ext/client_config/subchannel_index.h \ src/core/ext/client_config/uri_parser.h \ -include/grpc/byte_buffer.h \ -include/grpc/grpc.h \ -include/grpc/impl/codegen/alloc.h \ -include/grpc/impl/codegen/atm.h \ -include/grpc/impl/codegen/atm_gcc_atomic.h \ -include/grpc/impl/codegen/atm_gcc_sync.h \ -include/grpc/impl/codegen/atm_win32.h \ -include/grpc/impl/codegen/byte_buffer.h \ -include/grpc/impl/codegen/compression_types.h \ -include/grpc/impl/codegen/connectivity_state.h \ -include/grpc/impl/codegen/grpc_types.h \ -include/grpc/impl/codegen/log.h \ -include/grpc/impl/codegen/port_platform.h \ -include/grpc/impl/codegen/propagation_bits.h \ -include/grpc/impl/codegen/slice.h \ -include/grpc/impl/codegen/slice_buffer.h \ -include/grpc/impl/codegen/status.h \ -include/grpc/impl/codegen/sync.h \ -include/grpc/impl/codegen/sync_generic.h \ -include/grpc/impl/codegen/sync_posix.h \ -include/grpc/impl/codegen/sync_win32.h \ -include/grpc/impl/codegen/time.h \ -include/grpc/status.h \ -include/grpc/support/alloc.h \ -include/grpc/support/atm.h \ -include/grpc/support/host_port.h \ -include/grpc/support/log.h \ -include/grpc/support/port_platform.h \ -include/grpc/support/slice.h \ -include/grpc/support/slice_buffer.h \ -include/grpc/support/string_util.h \ -include/grpc/support/sync.h \ -include/grpc/support/time.h \ -include/grpc/support/useful.h \ -src/core/lib/support/string.h \ -third_party/objective_c/Cronet/cronet_c_for_grpc.h \ src/core/ext/lb_policy/grpclb/load_balancer_api.h \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h \ third_party/nanopb/pb.h \ @@ -1108,9 +1071,6 @@ src/core/ext/client_config/subchannel_index.c \ src/core/ext/client_config/uri_parser.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ -src/core/ext/transport/cronet/client/secure/cronet_channel_create.c \ -src/core/ext/transport/cronet/transport/cronet_api_dummy.c \ -src/core/ext/transport/cronet/transport/cronet_transport.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 8c67d2f8440..3b3a49a5b26 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4140,8 +4140,7 @@ "grpc_transport_chttp2_client_insecure", "grpc_transport_chttp2_client_secure", "grpc_transport_chttp2_server_insecure", - "grpc_transport_chttp2_server_secure", - "grpc_transport_cronet_client_secure" + "grpc_transport_chttp2_server_secure" ], "headers": [], "language": "c", @@ -6015,7 +6014,6 @@ "tsi" ], "headers": [ - "include/grpc/grpc_cronet.h", "include/grpc/grpc_security.h", "include/grpc/grpc_security_constants.h", "src/core/lib/security/auth_filters.h", @@ -6031,7 +6029,6 @@ "language": "c", "name": "grpc_secure", "src": [ - "include/grpc/grpc_cronet.h", "include/grpc/grpc_security.h", "include/grpc/grpc_security_constants.h", "src/core/lib/http/httpcli_security_connector.c", @@ -6267,121 +6264,6 @@ "third_party": false, "type": "filegroup" }, - { - "deps": [], - "headers": [ - "include/grpc/byte_buffer.h", - "include/grpc/grpc.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", - "include/grpc/status.h", - "include/grpc/support/alloc.h", - "include/grpc/support/atm.h", - "include/grpc/support/host_port.h", - "include/grpc/support/log.h", - "include/grpc/support/port_platform.h", - "include/grpc/support/slice.h", - "include/grpc/support/slice_buffer.h", - "include/grpc/support/string_util.h", - "include/grpc/support/sync.h", - "include/grpc/support/time.h", - "include/grpc/support/useful.h", - "src/core/ext/transport/chttp2/transport/incoming_metadata.h", - "src/core/lib/channel/channel_stack.h", - "src/core/lib/channel/context.h", - "src/core/lib/debug/trace.h", - "src/core/lib/iomgr/closure.h", - "src/core/lib/iomgr/exec_ctx.h", - "src/core/lib/iomgr/pollset.h", - "src/core/lib/iomgr/pollset_set.h", - "src/core/lib/support/string.h", - "src/core/lib/surface/channel.h", - "src/core/lib/surface/channel_stack_type.h", - "src/core/lib/transport/byte_stream.h", - "src/core/lib/transport/metadata.h", - "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/transport.h", - "src/core/lib/transport/transport_impl.h", - "third_party/objective_c/Cronet/cronet_c_for_grpc.h" - ], - "language": "c", - "name": "grpc_transport_cronet_client_secure", - "src": [ - "include/grpc/byte_buffer.h", - "include/grpc/grpc.h", - "include/grpc/impl/codegen/alloc.h", - "include/grpc/impl/codegen/atm.h", - "include/grpc/impl/codegen/atm_gcc_atomic.h", - "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", - "include/grpc/impl/codegen/byte_buffer.h", - "include/grpc/impl/codegen/compression_types.h", - "include/grpc/impl/codegen/connectivity_state.h", - "include/grpc/impl/codegen/grpc_types.h", - "include/grpc/impl/codegen/log.h", - "include/grpc/impl/codegen/port_platform.h", - "include/grpc/impl/codegen/propagation_bits.h", - "include/grpc/impl/codegen/slice.h", - "include/grpc/impl/codegen/slice_buffer.h", - "include/grpc/impl/codegen/status.h", - "include/grpc/impl/codegen/sync.h", - "include/grpc/impl/codegen/sync_generic.h", - "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", - "include/grpc/impl/codegen/time.h", - "include/grpc/status.h", - "include/grpc/support/alloc.h", - "include/grpc/support/atm.h", - "include/grpc/support/host_port.h", - "include/grpc/support/log.h", - "include/grpc/support/port_platform.h", - "include/grpc/support/slice.h", - "include/grpc/support/slice_buffer.h", - "include/grpc/support/string_util.h", - "include/grpc/support/sync.h", - "include/grpc/support/time.h", - "include/grpc/support/useful.h", - "src/core/ext/transport/chttp2/transport/incoming_metadata.h", - "src/core/ext/transport/cronet/client/secure/cronet_channel_create.c", - "src/core/ext/transport/cronet/transport/cronet_api_dummy.c", - "src/core/ext/transport/cronet/transport/cronet_transport.c", - "src/core/lib/channel/channel_stack.h", - "src/core/lib/channel/context.h", - "src/core/lib/debug/trace.h", - "src/core/lib/iomgr/closure.h", - "src/core/lib/iomgr/exec_ctx.h", - "src/core/lib/iomgr/pollset.h", - "src/core/lib/iomgr/pollset_set.h", - "src/core/lib/support/string.h", - "src/core/lib/surface/channel.h", - "src/core/lib/surface/channel_stack_type.h", - "src/core/lib/transport/byte_stream.h", - "src/core/lib/transport/metadata.h", - "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/transport.h", - "src/core/lib/transport/transport_impl.h" - ], - "third_party": false, - "type": "filegroup" - }, { "deps": [], "headers": [ diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 7f0e5a83394..03f4eaa5bec 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -293,7 +293,6 @@ - @@ -423,42 +422,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -765,12 +728,6 @@ - - - - - - diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 6d1d69a913d..4617e3de0d7 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -439,15 +439,6 @@ src\core\ext\transport\chttp2\client\insecure - - src\core\ext\transport\cronet\client\secure - - - src\core\ext\transport\cronet\transport - - - src\core\ext\transport\cronet\transport - src\core\ext\lb_policy\grpclb @@ -585,9 +576,6 @@ include\grpc\impl\codegen - - include\grpc - include\grpc @@ -971,114 +959,6 @@ src\core\ext\client_config - - include\grpc - - - include\grpc - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc\impl\codegen - - - include\grpc - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - include\grpc\support - - - src\core\lib\support - - - third_party\objective_c\Cronet - src\core\ext\lb_policy\grpclb @@ -1130,9 +1010,6 @@ {def748f5-ed2a-a9bb-40d9-c31d00f0e13b} - - {31de82ea-dc6c-73fb-a640-979b8a7b240c} - {d538af37-07b2-062b-fa2a-d9f882cb2737} @@ -1214,18 +1091,6 @@ {6f34254e-e69f-c9b4-156d-5024bade5408} - - {1e9c85e9-5522-7ef8-0017-7e19990a6194} - - - {d0530883-75d9-b5f7-d594-26735a70ac7b} - - - {4fa6fe90-b7a8-5c8f-d629-db1e68d89eed} - - - {31518af8-5860-6d0d-ff78-4059fce29ec2} - {5b2ded3f-84a5-f6b4-2060-286c7d1dc945} @@ -1250,9 +1115,6 @@ {c4661d64-349f-01c1-1ba8-0602f9047595} - - {27f30339-d694-40f5-db07-4b89b9aeea73} - {a21971fb-304f-da08-b1b2-7bd8df8ac373} @@ -1271,12 +1133,6 @@ {93d6596d-330c-1d27-6f84-3c840e57869e} - - {3a56a516-857e-d2aa-95cc-11685baf4e8c} - - - {a165c6e3-0776-6f40-7351-d7865668e220} - From 91472967c7134003229ecc881f361a2c2a4b7ea2 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 9 May 2016 11:01:15 -0700 Subject: [PATCH 0366/1894] Progress converting to new error system --- .../chttp2/transport/chttp2_transport.c | 46 +++++++++++-------- .../ext/transport/chttp2/transport/internal.h | 8 ++-- .../ext/transport/chttp2/transport/writing.c | 10 ++-- src/core/lib/iomgr/tcp_server_posix.c | 3 +- 4 files changed, 39 insertions(+), 28 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 1b1dcabe71a..f2a3d3592b6 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -143,6 +143,7 @@ static void incoming_byte_stream_destroy_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_stream *s, void *byte_stream); static void fail_pending_writes(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, grpc_error *error); @@ -750,7 +751,8 @@ static void terminate_writing_with_lock(grpc_exec_ctx *exec_ctx, grpc_chttp2_stream_global *stream_global; while (grpc_chttp2_list_pop_closed_waiting_for_writing(&t->global, &stream_global)) { - fail_pending_writes(exec_ctx, stream_global, GRPC_ERROR_REF(error)); + fail_pending_writes(exec_ctx, &t->global, stream_global, + GRPC_ERROR_REF(error)); GRPC_CHTTP2_STREAM_UNREF(exec_ctx, stream_global, "finish_writes"); } @@ -860,10 +862,10 @@ static grpc_closure *add_closure_barrier(grpc_closure *closure) { return closure; } -void grpc_chttp2_complete_closure_step(grpc_exec_ctx *exec_ctx, - grpc_chttp2_stream_global *stream_global, - grpc_closure **pclosure, - grpc_error *error) { +void grpc_chttp2_complete_closure_step( + grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global, grpc_closure **pclosure, + grpc_error *error) { grpc_closure *closure = *pclosure; if (closure == NULL) { GRPC_ERROR_UNREF(error); @@ -874,6 +876,9 @@ void grpc_chttp2_complete_closure_step(grpc_exec_ctx *exec_ctx, if (closure->error == GRPC_ERROR_NONE) { closure->error = GRPC_ERROR_CREATE("Error in HTTP transport completing operation"); + closure->error = grpc_error_set_str( + closure->error, GRPC_ERROR_STR_TARGET_ADDRESS, + TRANSPORT_FROM_GLOBAL(transport_global)->peer_string); } closure->error = grpc_error_add_child(closure->error, error); } @@ -919,6 +924,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, /* use final_data as a barrier until enqueue time; the inital counter is dropped at the end of this function */ on_complete->next_data.scratch = CLOSURE_BARRIER_FIRST_REF_BIT; + on_complete->error = GRPC_ERROR_NONE; if (op->collect_stats != NULL) { GPR_ASSERT(stream_global->collecting_stats == NULL); @@ -957,7 +963,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, } } else { grpc_chttp2_complete_closure_step( - exec_ctx, stream_global, + exec_ctx, transport_global, stream_global, &stream_global->send_initial_metadata_finished, GRPC_ERROR_CREATE( "Attempt to send initial metadata after stream was closed")); @@ -970,7 +976,8 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, stream_global->send_message_finished = add_closure_barrier(on_complete); if (stream_global->write_closed) { grpc_chttp2_complete_closure_step( - exec_ctx, stream_global, &stream_global->send_message_finished, + exec_ctx, transport_global, stream_global, + &stream_global->send_message_finished, GRPC_ERROR_CREATE("Attempt to send message after stream was closed")); } else { stream_global->send_message = op->send_message; @@ -991,7 +998,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, } if (stream_global->write_closed) { grpc_chttp2_complete_closure_step( - exec_ctx, stream_global, + exec_ctx, transport_global, stream_global, &stream_global->send_trailing_metadata_finished, grpc_metadata_batch_is_empty(op->send_trailing_metadata) ? GRPC_ERROR_NONE @@ -1034,8 +1041,8 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); } - grpc_chttp2_complete_closure_step(exec_ctx, stream_global, &on_complete, - GRPC_ERROR_NONE); + grpc_chttp2_complete_closure_step(exec_ctx, transport_global, stream_global, + &on_complete, GRPC_ERROR_NONE); GPR_TIMER_END("perform_stream_op_locked", 0); } @@ -1205,7 +1212,7 @@ static void check_read_ops(grpc_exec_ctx *exec_ctx, &stream_global->received_trailing_metadata, stream_global->recv_trailing_metadata); grpc_chttp2_complete_closure_step( - exec_ctx, stream_global, + exec_ctx, transport_global, stream_global, &stream_global->recv_trailing_metadata_finished, GRPC_ERROR_NONE); } } @@ -1323,16 +1330,18 @@ void grpc_chttp2_fake_status(grpc_exec_ctx *exec_ctx, } static void fail_pending_writes(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, grpc_error *error) { grpc_chttp2_complete_closure_step( - exec_ctx, stream_global, &stream_global->send_initial_metadata_finished, - GRPC_ERROR_REF(error)); - grpc_chttp2_complete_closure_step( - exec_ctx, stream_global, &stream_global->send_trailing_metadata_finished, - GRPC_ERROR_REF(error)); + exec_ctx, transport_global, stream_global, + &stream_global->send_initial_metadata_finished, GRPC_ERROR_REF(error)); grpc_chttp2_complete_closure_step( - exec_ctx, stream_global, &stream_global->send_message_finished, error); + exec_ctx, transport_global, stream_global, + &stream_global->send_trailing_metadata_finished, GRPC_ERROR_REF(error)); + grpc_chttp2_complete_closure_step(exec_ctx, transport_global, stream_global, + &stream_global->send_message_finished, + error); } void grpc_chttp2_mark_stream_closed( @@ -1358,7 +1367,8 @@ void grpc_chttp2_mark_stream_closed( grpc_chttp2_list_add_closed_waiting_for_writing(transport_global, stream_global); } else { - fail_pending_writes(exec_ctx, stream_global, GRPC_ERROR_REF(error)); + fail_pending_writes(exec_ctx, transport_global, stream_global, + GRPC_ERROR_REF(error)); } } if (stream_global->read_closed && stream_global->write_closed) { diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 1a8b44d86e3..ff01f70319c 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -671,10 +671,10 @@ void grpc_chttp2_for_all_streams( void grpc_chttp2_parsing_become_skip_parser( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing); -void grpc_chttp2_complete_closure_step(grpc_exec_ctx *exec_ctx, - grpc_chttp2_stream_global *stream_global, - grpc_closure **pclosure, - grpc_error *error); +void grpc_chttp2_complete_closure_step( + grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, + grpc_chttp2_stream_global *stream_global, grpc_closure **pclosure, + grpc_error *error); void grpc_chttp2_run_with_global_lock(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *transport, diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index ff42fd249a4..ca56debc841 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -335,21 +335,21 @@ void grpc_chttp2_cleanup_writing( transport_global, transport_writing, &stream_global, &stream_writing)) { if (stream_writing->sent_initial_metadata) { grpc_chttp2_complete_closure_step( - exec_ctx, stream_global, + exec_ctx, transport_global, stream_global, &stream_global->send_initial_metadata_finished, GRPC_ERROR_NONE); } grpc_transport_move_one_way_stats(&stream_writing->stats, &stream_global->stats.outgoing); if (stream_writing->sent_message) { GPR_ASSERT(stream_writing->send_message == NULL); - grpc_chttp2_complete_closure_step(exec_ctx, stream_global, - &stream_global->send_message_finished, - GRPC_ERROR_NONE); + grpc_chttp2_complete_closure_step( + exec_ctx, transport_global, stream_global, + &stream_global->send_message_finished, GRPC_ERROR_NONE); stream_writing->sent_message = 0; } if (stream_writing->sent_trailing_metadata) { grpc_chttp2_complete_closure_step( - exec_ctx, stream_global, + exec_ctx, transport_global, stream_global, &stream_global->send_trailing_metadata_finished, GRPC_ERROR_NONE); } if (stream_writing->sent_trailing_metadata) { diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index bb51ba2c763..dca068fd25d 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -394,12 +394,13 @@ static grpc_error *add_socket_to_server(grpc_tcp_server *s, int fd, unsigned fd_index, grpc_tcp_listener **listener) { grpc_tcp_listener *sp = NULL; - int port; + int port = -1; char *addr_str; char *name; grpc_error *err = prepare_socket(fd, addr, addr_len, &port); if (err == GRPC_ERROR_NONE) { + GPR_ASSERT(port > 0); grpc_sockaddr_to_string(&addr_str, (struct sockaddr *)&addr, 1); gpr_asprintf(&name, "tcp-server-listener:%s", addr_str); gpr_mu_lock(&s->mu); From 82318676377aea1d2ad035681524584d1657711b Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Mon, 9 May 2016 11:21:20 -0700 Subject: [PATCH 0367/1894] Add explicit license to grpcio-tools setup.py --- tools/distrib/python/grpcio_tools/setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py index 4cc1a1eaf88..576f7ae32a5 100644 --- a/tools/distrib/python/grpcio_tools/setup.py +++ b/tools/distrib/python/grpcio_tools/setup.py @@ -83,7 +83,7 @@ def maybe_cythonize(exts): setuptools.setup( name='grpcio_tools', version=grpc_version.VERSION, - license='', + license='3-clause BSD', ext_modules=maybe_cythonize([ protoc_ext_module(), ]), From 86df5a8521d22e66e07ab00c735668cb4e07381f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 9 May 2016 11:23:05 -0700 Subject: [PATCH 0368/1894] Fix filter_causes_close --- src/core/ext/transport/chttp2/transport/parsing.c | 6 +++--- src/core/lib/iomgr/error.c | 2 +- test/core/end2end/tests/filter_causes_close.c | 8 +++++--- 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index 128e22ae421..e0bb3a02d7e 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -83,8 +83,8 @@ void grpc_chttp2_prepare_to_read( transport_global->settings[GRPC_SENT_SETTINGS], sizeof(transport_parsing->last_sent_settings)); transport_parsing->max_frame_size = - transport_global->settings[GRPC_ACKED_SETTINGS] - [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; + transport_global + ->settings[GRPC_ACKED_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; /* update the parsing view of incoming window */ while (grpc_chttp2_list_pop_unannounced_incoming_window_available( @@ -228,7 +228,7 @@ void grpc_chttp2_publish_reads( intptr_t reason; bool has_reason = grpc_error_get_int(stream_parsing->forced_close_error, GRPC_ERROR_INT_HTTP2_ERROR, &reason); - if (has_reason || reason != GRPC_CHTTP2_NO_ERROR) { + if (has_reason && reason != GRPC_CHTTP2_NO_ERROR) { grpc_status_code status_code = has_reason ? grpc_chttp2_http2_error_to_grpc_status( diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index 6d16a54d576..b936ec96526 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -392,7 +392,7 @@ static char *fmt_time(void *p) { pfx = ""; break; } - gpr_asprintf(&out, "%s%d.%09d", pfx, tm.tv_sec, tm.tv_nsec); + gpr_asprintf(&out, "\"%s%d.%09d\"", pfx, tm.tv_sec, tm.tv_nsec); return out; } diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c index 405e75294db..8fd847b878b 100644 --- a/test/core/end2end/tests/filter_causes_close.c +++ b/test/core/end2end/tests/filter_causes_close.c @@ -175,7 +175,7 @@ static void test_request(grpc_end2end_test_config config) { cq_verify(cqv); GPR_ASSERT(status == GRPC_STATUS_PERMISSION_DENIED); - GPR_ASSERT(0 == strcmp(details, "Random failure that's not preventable.")); + GPR_ASSERT(0 == strcmp(details, "Failure that's not preventable.")); gpr_free(details); grpc_metadata_array_destroy(&initial_metadata_recv); @@ -209,14 +209,16 @@ static void recv_im_ready(grpc_exec_ctx *exec_ctx, void *arg, if (error == GRPC_ERROR_NONE) { // close the stream with an error. gpr_slice message = - gpr_slice_from_copied_string("Random failure that's not preventable."); + gpr_slice_from_copied_string("Failure that's not preventable."); grpc_transport_stream_op op; memset(&op, 0, sizeof(op)); grpc_transport_stream_op_add_close(&op, GRPC_STATUS_PERMISSION_DENIED, &message); grpc_call_next_op(exec_ctx, elem, &op); } - calld->recv_im_ready->cb(exec_ctx, calld->recv_im_ready->cb_arg, false); + grpc_exec_ctx_push( + exec_ctx, calld->recv_im_ready, + GRPC_ERROR_CREATE_REFERENCING("Forced call to close", &error, 1), NULL); } static void start_transport_stream_op(grpc_exec_ctx *exec_ctx, From 49beb933a7af096c2b775ff220d38d79c5eee46c Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 9 May 2016 11:22:04 -0700 Subject: [PATCH 0369/1894] upgrade linux worker setup scripts --- tools/gce/create_linux_worker.sh | 2 +- tools/gce/linux_worker_init.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/gce/create_linux_worker.sh b/tools/gce/create_linux_worker.sh index dff0b1ce5f4..c41e4d299bf 100755 --- a/tools/gce/create_linux_worker.sh +++ b/tools/gce/create_linux_worker.sh @@ -43,7 +43,7 @@ gcloud compute instances create $INSTANCE_NAME \ --project="$CLOUD_PROJECT" \ --zone "$ZONE" \ --machine-type n1-standard-8 \ - --image ubuntu-14-04 \ + --image ubuntu-15-10 \ --boot-disk-size 1000 echo 'Created GCE instance, waiting 60 seconds for it to come online.' diff --git a/tools/gce/linux_worker_init.sh b/tools/gce/linux_worker_init.sh index ef6a5d175c9..afcf7a52d92 100755 --- a/tools/gce/linux_worker_init.sh +++ b/tools/gce/linux_worker_init.sh @@ -37,7 +37,7 @@ set -ex sudo apt-get update # Install JRE -sudo apt-get install -y openjdk-7-jre +sudo apt-get install -y openjdk-8-jre sudo apt-get install -y unzip lsof # Install Docker From b293c953d9238d157279f97ef477c5ae7da8df0c Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 9 May 2016 12:44:11 -0700 Subject: [PATCH 0370/1894] add more tests --- .../Grpc.Core.Tests/Internal/AsyncCallTest.cs | 35 +++++++++++++++---- 1 file changed, 29 insertions(+), 6 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs index abe9d4a2e62..6f8668d143e 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs @@ -181,13 +181,14 @@ namespace Grpc.Core.Internal.Tests } [Test] - public void ClientStreaming_WriteFailure() + public void ClientStreaming_WriteCompletionFailure() { var resultTask = asyncCall.ClientStreamingCallAsync(); var requestStream = new ClientRequestStream(asyncCall); var writeTask = requestStream.WriteAsync("request1"); fakeCall.SendCompletionHandler(false); + // TODO: maybe IOException or waiting for RPCException is more appropriate here. Assert.ThrowsAsync(typeof(InvalidOperationException), async () => await writeTask); fakeCall.UnaryResponseClientHandler(true, @@ -199,7 +200,7 @@ namespace Grpc.Core.Internal.Tests } [Test] - public void ClientStreaming_WriteAfterReceivingStatusFails() + public void ClientStreaming_WriteAfterReceivingStatusThrowsRpcException() { var resultTask = asyncCall.ClientStreamingCallAsync(); var requestStream = new ClientRequestStream(asyncCall); @@ -210,7 +211,28 @@ namespace Grpc.Core.Internal.Tests new Metadata()); AssertUnaryResponseSuccess(asyncCall, fakeCall, resultTask); + var ex = Assert.Throws(() => requestStream.WriteAsync("request1")); + //TODO: add assert. + } + + [Test] + public void ClientStreaming_WriteAfterCompleteThrowsInvalidOperationException() + { + var resultTask = asyncCall.ClientStreamingCallAsync(); + var requestStream = new ClientRequestStream(asyncCall); + + requestStream.CompleteAsync(); + Assert.Throws(typeof(InvalidOperationException), () => requestStream.WriteAsync("request1")); + + fakeCall.SendCompletionHandler(true); + + fakeCall.UnaryResponseClientHandler(true, + new ClientSideStatus(Status.DefaultSuccess, new Metadata()), + CreateResponsePayload(), + new Metadata()); + + AssertUnaryResponseSuccess(asyncCall, fakeCall, resultTask); } [Test] @@ -229,7 +251,7 @@ namespace Grpc.Core.Internal.Tests } [Test] - public void ClientStreaming_WriteAfterCancellationRequestFails() + public void ClientStreaming_WriteAfterCancellationRequestThrowsOperationCancelledException() { var resultTask = asyncCall.ClientStreamingCallAsync(); var requestStream = new ClientRequestStream(asyncCall); @@ -340,7 +362,7 @@ namespace Grpc.Core.Internal.Tests } [Test] - public void DuplexStreaming_WriteAfterReceivingStatusFails() + public void DuplexStreaming_WriteAfterReceivingStatusThrowsRpcException() { asyncCall.StartDuplexStreamingCall(); var requestStream = new ClientRequestStream(asyncCall); @@ -352,7 +374,8 @@ namespace Grpc.Core.Internal.Tests AssertStreamingResponseSuccess(asyncCall, fakeCall, readTask); - Assert.ThrowsAsync(typeof(InvalidOperationException), async () => await requestStream.WriteAsync("request1")); + var ex = Assert.ThrowsAsync(async () => await requestStream.WriteAsync("request1")); + //TODO: add assert. } [Test] @@ -372,7 +395,7 @@ namespace Grpc.Core.Internal.Tests } [Test] - public void DuplexStreaming_WriteAfterCancellationRequestFails() + public void DuplexStreaming_WriteAfterCancellationRequestThrowsOperationCancelledException() { asyncCall.StartDuplexStreamingCall(); var requestStream = new ClientRequestStream(asyncCall); From 6a64bfd982ea6dc7d09571bc875e789cdb7b3abe Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 9 May 2016 13:05:03 -0700 Subject: [PATCH 0371/1894] Progress converting to new error system --- src/core/lib/http/httpcli.c | 59 +++++++++++++++++++++++----------- src/core/lib/http/parser.c | 35 ++++++++++---------- src/core/lib/iomgr/tcp_posix.c | 7 ++-- test/core/http/httpcli_test.c | 2 ++ test/core/http/parser_test.c | 20 +++++++----- 5 files changed, 76 insertions(+), 47 deletions(-) diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index fa421588e26..474a6eb8c1d 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -39,12 +39,14 @@ #include #include #include +#include #include "src/core/lib/http/format_request.h" #include "src/core/lib/http/parser.h" #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/iomgr_internal.h" #include "src/core/lib/iomgr/resolve_address.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" #include "src/core/lib/iomgr/tcp_client.h" #include "src/core/lib/support/string.h" @@ -68,6 +70,7 @@ typedef struct { grpc_closure on_read; grpc_closure done_write; grpc_closure connected; + grpc_error *overall_error; } internal_request; static grpc_httpcli_get_override g_get_override = NULL; @@ -92,7 +95,8 @@ void grpc_httpcli_context_destroy(grpc_httpcli_context *context) { grpc_pollset_set_destroy(context->pollset_set); } -static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req); +static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req, + grpc_error *due_to_error); static void finish(grpc_exec_ctx *exec_ctx, internal_request *req, grpc_error *error) { @@ -112,9 +116,22 @@ static void finish(grpc_exec_ctx *exec_ctx, internal_request *req, grpc_iomgr_unregister_object(&req->iomgr_obj); gpr_slice_buffer_destroy(&req->incoming); gpr_slice_buffer_destroy(&req->outgoing); + GRPC_ERROR_UNREF(req->overall_error); gpr_free(req); } +static void append_error(internal_request *req, grpc_error *error) { + if (req->overall_error == GRPC_ERROR_NONE) { + req->overall_error = GRPC_ERROR_CREATE("Failed HTTP/1 client request"); + } + grpc_resolved_address *addr = &req->addresses->addrs[req->next_address - 1]; + char *addr_text = grpc_sockaddr_to_uri((struct sockaddr *)addr->addr); + req->overall_error = grpc_error_add_child( + req->overall_error, + grpc_error_set_str(error, GRPC_ERROR_STR_TARGET_ADDRESS, addr_text)); + gpr_free(addr_text); +} + static void do_read(grpc_exec_ctx *exec_ctx, internal_request *req) { grpc_endpoint_read(exec_ctx, req->ep, &req->incoming, &req->on_read); } @@ -124,27 +141,25 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, internal_request *req = user_data; size_t i; - for (i = 0; i < req->incoming.count; i++) { + GRPC_ERROR_REF(error); + + for (i = 0; error == GRPC_ERROR_NONE && i < req->incoming.count; i++) { if (GPR_SLICE_LENGTH(req->incoming.slices[i])) { req->have_read_byte = 1; - if (!grpc_http_parser_parse(&req->parser, req->incoming.slices[i])) { - finish(exec_ctx, req, 0); - return; - } + error = grpc_http_parser_parse(&req->parser, req->incoming.slices[i]); } } if (error == GRPC_ERROR_NONE) { do_read(exec_ctx, req); } else if (!req->have_read_byte) { - next_address(exec_ctx, req); + next_address(exec_ctx, req, GRPC_ERROR_REF(error)); } else { - grpc_error *err = grpc_http_parser_eof(&req->parser); - if (err == GRPC_ERROR_NONE && (req->parser.type != GRPC_HTTP_RESPONSE)) { - err = GRPC_ERROR_CREATE("Expected http response, got http request"); - } - finish(exec_ctx, req, err); + append_error(req, GRPC_ERROR_REF(error)); + finish(exec_ctx, req, error); } + + GRPC_ERROR_UNREF(error); } static void on_written(grpc_exec_ctx *exec_ctx, internal_request *req) { @@ -156,7 +171,7 @@ static void done_write(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { if (error == GRPC_ERROR_NONE) { on_written(exec_ctx, req); } else { - next_address(exec_ctx, req); + next_address(exec_ctx, req, GRPC_ERROR_REF(error)); } } @@ -171,7 +186,8 @@ static void on_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, internal_request *req = arg; if (!ep) { - next_address(exec_ctx, req); + next_address(exec_ctx, req, + GRPC_ERROR_CREATE("Unexplained handshake failure")); return; } @@ -184,7 +200,7 @@ static void on_connected(grpc_exec_ctx *exec_ctx, void *arg, internal_request *req = arg; if (!req->ep) { - next_address(exec_ctx, req); + next_address(exec_ctx, req, GRPC_ERROR_REF(error)); return; } req->handshaker->handshake( @@ -193,10 +209,16 @@ static void on_connected(grpc_exec_ctx *exec_ctx, void *arg, on_handshake_done); } -static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req) { +static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req, + grpc_error *error) { grpc_resolved_address *addr; + if (error != GRPC_ERROR_NONE) { + append_error(req, error); + } if (req->next_address == req->addresses->naddrs) { - finish(exec_ctx, req, 0); + finish(exec_ctx, req, + GRPC_ERROR_CREATE_REFERENCING("Failed HTTP requests to all targets", + &req->overall_error, 1)); return; } addr = &req->addresses->addrs[req->next_address++]; @@ -213,7 +235,7 @@ static void on_resolved(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { return; } req->next_address = 0; - next_address(exec_ctx, req); + next_address(exec_ctx, req, GRPC_ERROR_NONE); } static void internal_request_begin(grpc_exec_ctx *exec_ctx, @@ -233,6 +255,7 @@ static void internal_request_begin(grpc_exec_ctx *exec_ctx, request->handshaker ? request->handshaker : &grpc_httpcli_plaintext; req->context = context; req->pollset = pollset; + req->overall_error = GRPC_ERROR_NONE; grpc_closure_init(&req->on_read, on_read, req); grpc_closure_init(&req->done_write, done_write, req); gpr_slice_buffer_init(&req->incoming); diff --git a/src/core/lib/http/parser.c b/src/core/lib/http/parser.c index 680174c8426..92ed08ae511 100644 --- a/src/core/lib/http/parser.c +++ b/src/core/lib/http/parser.c @@ -174,14 +174,15 @@ static grpc_error *add_header(grpc_http_parser *parser) { GPR_ASSERT((size_t)(end - cur) >= parser->cur_line_end_length); hdr.value = buf2str(cur, (size_t)(end - cur) - parser->cur_line_end_length); - if (parser->type == GRPC_HTTP_RESPONSE) { - hdr_count = &parser->http.response->hdr_count; - hdrs = &parser->http.response->hdrs; - } else if (parser->type == GRPC_HTTP_REQUEST) { - hdr_count = &parser->http.request->hdr_count; - hdrs = &parser->http.request->hdrs; - } else { - return 0; + switch (parser->type) { + case GRPC_HTTP_RESPONSE: + hdr_count = &parser->http.response->hdr_count; + hdrs = &parser->http.response->hdrs; + break; + case GRPC_HTTP_REQUEST: + hdr_count = &parser->http.request->hdr_count; + hdrs = &parser->http.request->hdrs; + break; } if (*hdr_count == parser->hdr_capacity) { @@ -212,12 +213,13 @@ static grpc_error *finish_line(grpc_http_parser *parser) { parser->state = GRPC_HTTP_BODY; break; } - if (!add_header(parser)) { - return 0; + err = add_header(parser); + if (err != GRPC_ERROR_NONE) { + return err; } break; case GRPC_HTTP_BODY: - GPR_UNREACHABLE_CODE(return 0); + GPR_UNREACHABLE_CODE(return GRPC_ERROR_CREATE("Should never reach here")); } parser->cur_line_length = 0; @@ -248,29 +250,28 @@ static grpc_error *addbyte_body(grpc_http_parser *parser, uint8_t byte) { return GRPC_ERROR_NONE; } -static grpc_error *check_line(grpc_http_parser *parser) { +static bool check_line(grpc_http_parser *parser) { if (parser->cur_line_length >= 2 && parser->cur_line[parser->cur_line_length - 2] == '\r' && parser->cur_line[parser->cur_line_length - 1] == '\n') { - return GRPC_ERROR_NONE; + return true; } // HTTP request with \n\r line termiantors. else if (parser->cur_line_length >= 2 && parser->cur_line[parser->cur_line_length - 2] == '\n' && parser->cur_line[parser->cur_line_length - 1] == '\r') { - return GRPC_ERROR_NONE; + return true; } // HTTP request with only \n line terminators. else if (parser->cur_line_length >= 1 && parser->cur_line[parser->cur_line_length - 1] == '\n') { parser->cur_line_end_length = 1; - return GRPC_ERROR_NONE; + return true; } - return GRPC_ERROR_CREATE( - "Expected line ending (one of \\r\\n, \\n\\r, or \\n)"); + return false; } static grpc_error *addbyte(grpc_http_parser *parser, uint8_t byte) { diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 925bcf2f6ef..98b50294f2f 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -222,15 +222,14 @@ static void tcp_continue_read(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { /* We've consumed the edge, request a new one */ grpc_fd_notify_on_read(exec_ctx, tcp->em_fd, &tcp->read_closure); } else { - /* TODO(klempner): Log interesting errors */ gpr_slice_buffer_reset_and_unref(tcp->incoming_buffer); - call_read_cb(exec_ctx, tcp, 0); + call_read_cb(exec_ctx, tcp, GRPC_OS_ERROR(errno, "recvmsg")); TCP_UNREF(exec_ctx, tcp, "read"); } } else if (read_bytes == 0) { /* 0 read size ==> end of stream */ gpr_slice_buffer_reset_and_unref(tcp->incoming_buffer); - call_read_cb(exec_ctx, tcp, 0); + call_read_cb(exec_ctx, tcp, GRPC_ERROR_CREATE("EOF")); TCP_UNREF(exec_ctx, tcp, "read"); } else { GPR_ASSERT((size_t)read_bytes <= tcp->incoming_buffer->length); @@ -257,7 +256,7 @@ static void tcp_handle_read(grpc_exec_ctx *exec_ctx, void *arg /* grpc_tcp */, if (error != GRPC_ERROR_NONE) { gpr_slice_buffer_reset_and_unref(tcp->incoming_buffer); - call_read_cb(exec_ctx, tcp, 0); + call_read_cb(exec_ctx, tcp, GRPC_ERROR_REF(error)); TCP_UNREF(exec_ctx, tcp, "read"); } else { tcp_continue_read(exec_ctx, tcp); diff --git a/test/core/http/httpcli_test.c b/test/core/http/httpcli_test.c index 7b872879cc6..710f83ae6ef 100644 --- a/test/core/http/httpcli_test.c +++ b/test/core/http/httpcli_test.c @@ -103,6 +103,7 @@ static void test_get(int port) { } gpr_mu_unlock(g_mu); gpr_free(host); + grpc_http_response_destroy(&response); } static void test_post(int port) { @@ -139,6 +140,7 @@ static void test_post(int port) { } gpr_mu_unlock(g_mu); gpr_free(host); + grpc_http_response_destroy(&response); } static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, diff --git a/test/core/http/parser_test.c b/test/core/http/parser_test.c index 96313bfa228..d645d2879c4 100644 --- a/test/core/http/parser_test.c +++ b/test/core/http/parser_test.c @@ -65,7 +65,7 @@ static void test_request_succeeds(grpc_slice_split_mode split_mode, GPR_ASSERT(grpc_http_parser_parse(&parser, slices[i]) == GRPC_ERROR_NONE); gpr_slice_unref(slices[i]); } - GPR_ASSERT(grpc_http_parser_eof(&parser)); + GPR_ASSERT(grpc_http_parser_eof(&parser) == GRPC_ERROR_NONE); GPR_ASSERT(GRPC_HTTP_REQUEST == parser.type); GPR_ASSERT(0 == strcmp(expect_method, request.method)); @@ -96,6 +96,7 @@ static void test_request_succeeds(grpc_slice_split_mode split_mode, va_end(args); GPR_ASSERT(i == request.hdr_count); + grpc_http_request_destroy(&request); grpc_http_parser_destroy(&parser); gpr_free(slices); } @@ -109,6 +110,7 @@ static void test_succeeds(grpc_slice_split_mode split_mode, char *response_text, gpr_slice *slices; va_list args; grpc_http_response response; + memset(&response, 0, sizeof(response)); grpc_split_slices(split_mode, &input_slice, 1, &slices, &num_slices); gpr_slice_unref(input_slice); @@ -119,7 +121,7 @@ static void test_succeeds(grpc_slice_split_mode split_mode, char *response_text, GPR_ASSERT(grpc_http_parser_parse(&parser, slices[i]) == GRPC_ERROR_NONE); gpr_slice_unref(slices[i]); } - GPR_ASSERT(grpc_http_parser_eof(&parser)); + GPR_ASSERT(grpc_http_parser_eof(&parser) == GRPC_ERROR_NONE); GPR_ASSERT(GRPC_HTTP_RESPONSE == parser.type); GPR_ASSERT(expect_status == response.status); @@ -147,6 +149,7 @@ static void test_succeeds(grpc_slice_split_mode split_mode, char *response_text, va_end(args); GPR_ASSERT(i == response.hdr_count); + grpc_http_response_destroy(&response); grpc_http_parser_destroy(&parser); gpr_free(slices); } @@ -190,7 +193,7 @@ static void test_request_fails(grpc_slice_split_mode split_mode, size_t num_slices; size_t i; gpr_slice *slices; - int done = 0; + grpc_error *error = GRPC_ERROR_NONE; grpc_http_request request; memset(&request, 0, sizeof(request)); @@ -200,15 +203,16 @@ static void test_request_fails(grpc_slice_split_mode split_mode, grpc_http_parser_init(&parser, GRPC_HTTP_REQUEST, &request); for (i = 0; i < num_slices; i++) { - if (!done && !grpc_http_parser_parse(&parser, slices[i])) { - done = 1; + if (error == GRPC_ERROR_NONE) { + error = grpc_http_parser_parse(&parser, slices[i]); } gpr_slice_unref(slices[i]); } - if (!done && !grpc_http_parser_eof(&parser)) { - done = 1; + if (error == GRPC_ERROR_NONE) { + error = grpc_http_parser_eof(&parser); } - GPR_ASSERT(done); + GPR_ASSERT(error != GRPC_ERROR_NONE); + GRPC_ERROR_UNREF(error); grpc_http_request_destroy(&request); grpc_http_parser_destroy(&parser); From e6deeb1089988a5de5fdc64cf39d1b6fbc032af6 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 9 May 2016 13:14:32 -0700 Subject: [PATCH 0372/1894] Progress converting to new error system (HTTP fixes) --- src/core/lib/http/httpcli.c | 16 ++++++++-------- src/core/lib/iomgr/tcp_posix.c | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index 474a6eb8c1d..4bda734bfaa 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -141,12 +141,15 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, internal_request *req = user_data; size_t i; - GRPC_ERROR_REF(error); - - for (i = 0; error == GRPC_ERROR_NONE && i < req->incoming.count; i++) { + for (i = 0; i < req->incoming.count; i++) { if (GPR_SLICE_LENGTH(req->incoming.slices[i])) { req->have_read_byte = 1; - error = grpc_http_parser_parse(&req->parser, req->incoming.slices[i]); + grpc_error *err = + grpc_http_parser_parse(&req->parser, req->incoming.slices[i]); + if (err != GRPC_ERROR_NONE) { + finish(exec_ctx, req, err); + return; + } } } @@ -155,11 +158,8 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *user_data, } else if (!req->have_read_byte) { next_address(exec_ctx, req, GRPC_ERROR_REF(error)); } else { - append_error(req, GRPC_ERROR_REF(error)); - finish(exec_ctx, req, error); + finish(exec_ctx, req, grpc_http_parser_eof(&req->parser)); } - - GRPC_ERROR_UNREF(error); } static void on_written(grpc_exec_ctx *exec_ctx, internal_request *req) { diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 98b50294f2f..237611633ec 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -174,7 +174,7 @@ static void call_read_cb(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, tcp->read_cb = NULL; tcp->incoming_buffer = NULL; - cb->cb(exec_ctx, cb->cb_arg, error); + grpc_exec_ctx_push(exec_ctx, cb, error, NULL); } #define MAX_READ_IOVEC 4 From 19c7bf7871aa86814a56b6eb7053b55920b8e0c6 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 9 May 2016 13:03:59 -0700 Subject: [PATCH 0373/1894] fixup tests --- .../Grpc.Core.Tests/Internal/AsyncCallTest.cs | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs index 6f8668d143e..777a1c8c500 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs @@ -212,7 +212,23 @@ namespace Grpc.Core.Internal.Tests AssertUnaryResponseSuccess(asyncCall, fakeCall, resultTask); var ex = Assert.Throws(() => requestStream.WriteAsync("request1")); - //TODO: add assert. + Assert.AreEqual(Status.DefaultSuccess, ex.Status); + } + + [Test] + public void ClientStreaming_WriteAfterReceivingStatusThrowsRpcException2() + { + var resultTask = asyncCall.ClientStreamingCallAsync(); + var requestStream = new ClientRequestStream(asyncCall); + + fakeCall.UnaryResponseClientHandler(true, + new ClientSideStatus(new Status(StatusCode.OutOfRange, ""), new Metadata()), + CreateResponsePayload(), + new Metadata()); + + AssertUnaryResponseError(asyncCall, fakeCall, resultTask, StatusCode.OutOfRange); + var ex = Assert.Throws(() => requestStream.WriteAsync("request1")); + Assert.AreEqual(StatusCode.OutOfRange, ex.Status.StatusCode); } [Test] @@ -375,7 +391,7 @@ namespace Grpc.Core.Internal.Tests AssertStreamingResponseSuccess(asyncCall, fakeCall, readTask); var ex = Assert.ThrowsAsync(async () => await requestStream.WriteAsync("request1")); - //TODO: add assert. + Assert.AreEqual(Status.DefaultSuccess, ex.Status); } [Test] From 6220033e7df811e7b38afb7c9bd39887dd549e23 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 9 May 2016 12:45:27 -0700 Subject: [PATCH 0374/1894] change typo in the comment --- src/csharp/Grpc.Core/Internal/AsyncCall.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/csharp/Grpc.Core/Internal/AsyncCall.cs b/src/csharp/Grpc.Core/Internal/AsyncCall.cs index f522174bd0f..da1e6592d19 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCall.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCall.cs @@ -57,7 +57,7 @@ namespace Grpc.Core.Internal // Completion of a pending unary response if not null. TaskCompletionSource unaryResponseTcs; - // Indicates that steaming call has finished. + // Indicates that response streaming call has finished. TaskCompletionSource streamingCallFinishedTcs = new TaskCompletionSource(); // Response headers set here once received. From 98f2430d2d02ceff46b42f4e7e88786e04deb2d6 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 9 May 2016 13:04:30 -0700 Subject: [PATCH 0375/1894] throw RpcException from writes after finishing --- src/csharp/Grpc.Core/Internal/AsyncCall.cs | 13 +++++++++++++ src/csharp/Grpc.Core/Internal/AsyncCallBase.cs | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/csharp/Grpc.Core/Internal/AsyncCall.cs b/src/csharp/Grpc.Core/Internal/AsyncCall.cs index da1e6592d19..55351869b5c 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCall.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCall.cs @@ -443,6 +443,19 @@ namespace Grpc.Core.Internal } } + protected override void CheckSendingAllowed(bool allowFinished) + { + base.CheckSendingAllowed(true); + + // throwing RpcException if we already received status on client + // side makes the most sense. + // Note that this throws even for StatusCode.OK. + if (!allowFinished && finishedStatus.HasValue) + { + throw new RpcException(finishedStatus.Value.Status); + } + } + /// /// Handles receive status completion for calls with streaming response. /// diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs index 42234dcac21..4de23706b28 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs @@ -213,7 +213,7 @@ namespace Grpc.Core.Internal { } - protected void CheckSendingAllowed(bool allowFinished) + protected virtual void CheckSendingAllowed(bool allowFinished) { GrpcPreconditions.CheckState(started); CheckNotCancelled(); From 45fe17fb76fbcf6c0e7f55c53b8f8925ce1ccaf1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 9 May 2016 13:25:52 -0700 Subject: [PATCH 0376/1894] Fix leak --- test/core/util/port_server_client.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/core/util/port_server_client.c b/test/core/util/port_server_client.c index 8b8fc0983b6..167efb53692 100644 --- a/test/core/util/port_server_client.c +++ b/test/core/util/port_server_client.c @@ -117,6 +117,7 @@ void grpc_free_port_using_server(char *server, int port) { grpc_pollset_shutdown(&exec_ctx, pr.pollset, shutdown_closure); grpc_exec_ctx_finish(&exec_ctx); gpr_free(path); + grpc_http_response_destroy(&rsp); } typedef struct portreq { From 12fd55587d6bbba788f0601a4e106fc27b4cc8d0 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 9 May 2016 14:00:36 -0700 Subject: [PATCH 0377/1894] Build Node 6 artifacts --- tools/run_tests/build_artifact_node.bat | 2 +- tools/run_tests/build_artifact_node.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/run_tests/build_artifact_node.bat b/tools/run_tests/build_artifact_node.bat index 84c63c28a25..3c23ac1daea 100644 --- a/tools/run_tests/build_artifact_node.bat +++ b/tools/run_tests/build_artifact_node.bat @@ -27,7 +27,7 @@ @rem (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE @rem OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -set node_versions=0.12.0 1.0.0 1.1.0 2.0.0 3.0.0 4.0.0 5.0.0 +set node_versions=0.12.0 1.0.0 1.1.0 2.0.0 3.0.0 4.0.0 5.0.0 6.0.0 set PATH=%PATH%;C:\Program Files\nodejs\;%APPDATA%\npm diff --git a/tools/run_tests/build_artifact_node.sh b/tools/run_tests/build_artifact_node.sh index ef3476a0381..9d06472aa49 100755 --- a/tools/run_tests/build_artifact_node.sh +++ b/tools/run_tests/build_artifact_node.sh @@ -42,7 +42,7 @@ mkdir -p artifacts npm update -node_versions=( 0.12.0 1.0.0 1.1.0 2.0.0 3.0.0 4.0.0 5.0.0 ) +node_versions=( 0.12.0 1.0.0 1.1.0 2.0.0 3.0.0 4.0.0 5.0.0 6.0.0 ) for version in ${node_versions[@]} do From a301eaade83854cf172d39899232835f21e57690 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 6 May 2016 16:59:03 -0700 Subject: [PATCH 0378/1894] Allow servers to select compression level via initial MD. Setting the newly added compression_level field of grpc_op::send_initial_metadata by a server now has the effect of applying that compression level for the subsequent call messages leaving the server. The ultimate meaning of the level depends on the client's supported compression algorithms. --- grpc.def | 1 - include/grpc++/impl/codegen/call.h | 6 + include/grpc/compression.h | 7 - include/grpc/impl/codegen/grpc_types.h | 1 + .../lib/compression/compression_algorithm.c | 56 ----- src/core/lib/surface/call.c | 159 ++++++++++++-- src/csharp/ext/grpc_csharp_ext.c | 11 +- .../GRPCClient/private/GRPCWrappedCall.m | 1 + src/php/ext/grpc/call.c | 1 + .../grpcio/grpc/_cython/imports.generated.c | 2 - .../grpcio/grpc/_cython/imports.generated.h | 3 - src/ruby/ext/grpc/rb_grpc_imports.generated.c | 2 - src/ruby/ext/grpc/rb_grpc_imports.generated.h | 3 - test/core/bad_ssl/bad_ssl_test.c | 1 + test/core/client_config/lb_policies_test.c | 3 + .../set_initial_connect_string_test.c | 1 + test/core/compression/compression_test.c | 97 --------- test/core/end2end/dualstack_socket_test.c | 2 + test/core/end2end/fixtures/h2_ssl_cert.c | 1 + test/core/end2end/fixtures/proxy.c | 2 + test/core/end2end/fuzzers/client_fuzzer.c | 3 + test/core/end2end/goaway_server_test.c | 6 + .../core/end2end/invalid_call_argument_test.c | 7 +- test/core/end2end/no_server_test.c | 4 + test/core/end2end/tests/bad_hostname.c | 1 + test/core/end2end/tests/binary_metadata.c | 3 + test/core/end2end/tests/call_creds.c | 4 + test/core/end2end/tests/cancel_after_accept.c | 2 + .../end2end/tests/cancel_after_client_done.c | 2 + test/core/end2end/tests/cancel_after_invoke.c | 1 + .../core/end2end/tests/cancel_before_invoke.c | 1 + test/core/end2end/tests/cancel_with_status.c | 1 + test/core/end2end/tests/compressed_payload.c | 199 +++++++++++++----- test/core/end2end/tests/default_host.c | 2 + test/core/end2end/tests/disappearing_server.c | 2 + test/core/end2end/tests/filter_causes_close.c | 1 + .../end2end/tests/graceful_server_shutdown.c | 2 + test/core/end2end/tests/high_initial_seqno.c | 2 + test/core/end2end/tests/hpack_size.c | 2 + test/core/end2end/tests/idempotent_request.c | 2 + .../core/end2end/tests/invoke_large_request.c | 3 + test/core/end2end/tests/large_metadata.c | 3 + .../end2end/tests/max_concurrent_streams.c | 8 + test/core/end2end/tests/max_message_length.c | 2 + test/core/end2end/tests/negative_deadline.c | 1 + test/core/end2end/tests/payload.c | 3 + test/core/end2end/tests/ping_pong_streaming.c | 7 + test/core/end2end/tests/registered_call.c | 2 + test/core/end2end/tests/request_with_flags.c | 1 + .../core/end2end/tests/request_with_payload.c | 3 + .../end2end/tests/server_finishes_request.c | 2 + .../end2end/tests/shutdown_finishes_calls.c | 2 + .../end2end/tests/simple_delayed_request.c | 2 + test/core/end2end/tests/simple_metadata.c | 3 + test/core/end2end/tests/simple_request.c | 2 + test/core/end2end/tests/trailing_metadata.c | 3 + test/core/fling/client.c | 1 + test/core/surface/lame_client_test.c | 2 + 58 files changed, 403 insertions(+), 254 deletions(-) diff --git a/grpc.def b/grpc.def index 09a94a6cd0c..e807b8cf8ff 100644 --- a/grpc.def +++ b/grpc.def @@ -34,7 +34,6 @@ EXPORTS census_view_reset grpc_compression_algorithm_parse grpc_compression_algorithm_name - grpc_compression_algorithm_for_level grpc_compression_options_init grpc_compression_options_enable_algorithm grpc_compression_options_disable_algorithm diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h index d081b7d9c59..2acdf475f2b 100644 --- a/include/grpc++/impl/codegen/call.h +++ b/include/grpc++/impl/codegen/call.h @@ -47,7 +47,9 @@ #include #include #include + #include +#include #include struct grpc_byte_buffer; @@ -187,6 +189,8 @@ class CallOpSendInitialMetadata { flags_ = flags; initial_metadata_count_ = metadata.size(); initial_metadata_ = FillMetadataArray(metadata); + // TODO(dgq): expose compression level in API so it can be properly set. + compression_level_ = GRPC_COMPRESS_LEVEL_NONE; } protected: @@ -198,6 +202,7 @@ class CallOpSendInitialMetadata { op->reserved = NULL; op->data.send_initial_metadata.count = initial_metadata_count_; op->data.send_initial_metadata.metadata = initial_metadata_; + op->data.send_initial_metadata.compression_level = compression_level_; } void FinishOp(bool* status, int max_message_size) { if (!send_) return; @@ -209,6 +214,7 @@ class CallOpSendInitialMetadata { uint32_t flags_; size_t initial_metadata_count_; grpc_metadata* initial_metadata_; + grpc_compression_level compression_level_; }; class CallOpSendMessage { diff --git a/include/grpc/compression.h b/include/grpc/compression.h index 8de4b133d4c..04816b9f3a9 100644 --- a/include/grpc/compression.h +++ b/include/grpc/compression.h @@ -55,13 +55,6 @@ GRPCAPI int grpc_compression_algorithm_parse( GRPCAPI int grpc_compression_algorithm_name( grpc_compression_algorithm algorithm, char **name); -/** Returns the compression algorithm corresponding to \a level for the - * compression algorithms encoded in the \a accepted_encodings bitset. - * - * It abort()s for unknown levels . */ -GRPCAPI grpc_compression_algorithm grpc_compression_algorithm_for_level( - grpc_compression_level level, uint32_t accepted_encodings); - GRPCAPI void grpc_compression_options_init(grpc_compression_options *opts); /** Mark \a algorithm as enabled in \a opts. */ diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index 7b20cc14d43..29af70522c9 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -330,6 +330,7 @@ typedef struct grpc_op { struct { size_t count; grpc_metadata *metadata; + grpc_compression_level compression_level; } send_initial_metadata; grpc_byte_buffer *send_message; struct { diff --git a/src/core/lib/compression/compression_algorithm.c b/src/core/lib/compression/compression_algorithm.c index 7039364b7bc..142f3fffa5d 100644 --- a/src/core/lib/compression/compression_algorithm.c +++ b/src/core/lib/compression/compression_algorithm.c @@ -125,62 +125,6 @@ grpc_mdelem *grpc_compression_encoding_mdelem( return NULL; } -/* TODO(dgq): Add the ability to specify parameters to the individual - * compression algorithms */ -grpc_compression_algorithm grpc_compression_algorithm_for_level( - grpc_compression_level level, uint32_t accepted_encodings) { - GRPC_API_TRACE("grpc_compression_algorithm_for_level(level=%d)", 1, - ((int)level)); - if (level > GRPC_COMPRESS_LEVEL_HIGH) { - gpr_log(GPR_ERROR, "Unknown compression level %d.", (int)level); - abort(); - } - - const size_t num_supported = - GPR_BITCOUNT(accepted_encodings) - 1; /* discard NONE */ - if (level == GRPC_COMPRESS_LEVEL_NONE || num_supported == 0) { - return GRPC_COMPRESS_NONE; - } - - GPR_ASSERT(level > 0); - - /* Establish a "ranking" or compression algorithms in increasing order of - * compression. - * This is simplistic and we will probably want to introduce other dimensions - * in the future (cpu/memory cost, etc). */ - const grpc_compression_algorithm algos_ranking[] = {GRPC_COMPRESS_GZIP, - GRPC_COMPRESS_DEFLATE}; - - /* intersect algos_ranking with the supported ones keeping the ranked order */ - grpc_compression_algorithm - sorted_supported_algos[GRPC_COMPRESS_ALGORITHMS_COUNT]; - size_t algos_supported_idx = 0; - for (size_t i = 0; i < GPR_ARRAY_SIZE(algos_ranking); i++) { - const grpc_compression_algorithm alg = algos_ranking[i]; - for (size_t j = 0; j < num_supported; j++) { - if (GPR_BITGET(accepted_encodings, alg) == 1) { - /* if \a alg in supported */ - sorted_supported_algos[algos_supported_idx++] = alg; - break; - } - } - if (algos_supported_idx == num_supported) break; - } - - switch (level) { - case GRPC_COMPRESS_LEVEL_NONE: - abort(); /* should have been handled already */ - case GRPC_COMPRESS_LEVEL_LOW: - return sorted_supported_algos[0]; - case GRPC_COMPRESS_LEVEL_MED: - return sorted_supported_algos[num_supported / 2]; - case GRPC_COMPRESS_LEVEL_HIGH: - return sorted_supported_algos[num_supported - 1]; - default: - abort(); - }; -} - void grpc_compression_options_init(grpc_compression_options *opts) { opts->enabled_algorithms_bitset = (1u << GRPC_COMPRESS_ALGORITHMS_COUNT) - 1; opts->default_compression_algorithm = GRPC_COMPRESS_NONE; diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 9b2b94eedf5..911b5b80bb9 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -420,6 +420,65 @@ grpc_compression_algorithm grpc_call_test_only_get_compression_algorithm( return algorithm; } +static grpc_compression_algorithm compression_algorithm_for_level_locked( + grpc_call *call, grpc_compression_level level) { + /* Establish a "ranking" or compression algorithms in increasing order of + * compression. + * This is simplistic and we will probably want to introduce other + * dimensions + * in the future (cpu/memory cost, etc). */ + const grpc_compression_algorithm algos_ranking[] = {GRPC_COMPRESS_GZIP, + GRPC_COMPRESS_DEFLATE}; + const uint32_t accepted_encodings = call->encodings_accepted_by_peer; + if (level > GRPC_COMPRESS_LEVEL_HIGH) { + extern int grpc_compress_filter_trace; + if (grpc_compress_filter_trace) { + gpr_log(GPR_ERROR, + "Unknown compression level %d. Compression will be disabled.", + (int)level); + } + return GRPC_COMPRESS_NONE; + } + + const size_t num_supported = + GPR_BITCOUNT(accepted_encodings) - 1; /* discard NONE */ + if (level == GRPC_COMPRESS_LEVEL_NONE || num_supported == 0) { + return GRPC_COMPRESS_NONE; + } + + GPR_ASSERT(level > 0); + + /* intersect algos_ranking with the supported ones keeping the ranked order + */ + grpc_compression_algorithm + sorted_supported_algos[GRPC_COMPRESS_ALGORITHMS_COUNT]; + size_t algos_supported_idx = 0; + for (size_t i = 0; i < GPR_ARRAY_SIZE(algos_ranking); i++) { + const grpc_compression_algorithm alg = algos_ranking[i]; + for (size_t j = 0; j < num_supported; j++) { + if (GPR_BITGET(accepted_encodings, alg) == 1) { + /* if \a alg in supported */ + sorted_supported_algos[algos_supported_idx++] = alg; + break; + } + } + if (algos_supported_idx == num_supported) break; + } + + switch (level) { + case GRPC_COMPRESS_LEVEL_NONE: + abort(); /* should have been handled already */ + case GRPC_COMPRESS_LEVEL_LOW: + return sorted_supported_algos[0]; + case GRPC_COMPRESS_LEVEL_MED: + return sorted_supported_algos[num_supported / 2]; + case GRPC_COMPRESS_LEVEL_HIGH: + return sorted_supported_algos[num_supported - 1]; + default: + abort(); + }; +} + uint32_t grpc_call_test_only_get_message_flags(grpc_call *call) { uint32_t flags; gpr_mu_lock(&call->mu); @@ -545,15 +604,28 @@ static grpc_linked_mdelem *linked_from_md(grpc_metadata *md) { return (grpc_linked_mdelem *)&md->internal_data; } +static grpc_metadata *get_md_elem(grpc_metadata *metadata, + grpc_metadata *additional_metadata, int i, + int count) { + grpc_metadata *res = + i < count ? &metadata[i] : &additional_metadata[i - count]; + GPR_ASSERT(res); + return res; +} + static int prepare_application_metadata(grpc_call *call, int count, grpc_metadata *metadata, int is_trailing, - int prepend_extra_metadata) { + int prepend_extra_metadata, + grpc_metadata *additional_metadata, + int additional_metadata_count) { + int total_count = count + additional_metadata_count; int i; grpc_metadata_batch *batch = &call->metadata_batch[0 /* is_receiving */][is_trailing]; - for (i = 0; i < count; i++) { - grpc_metadata *md = &metadata[i]; + for (i = 0; i < total_count; i++) { + const grpc_metadata *md = + get_md_elem(metadata, additional_metadata, i, count); grpc_linked_mdelem *l = (grpc_linked_mdelem *)&md->internal_data; GPR_ASSERT(sizeof(grpc_linked_mdelem) == sizeof(md->internal_data)); l->md = grpc_mdelem_from_string_and_buffer( @@ -572,9 +644,10 @@ static int prepare_application_metadata(grpc_call *call, int count, break; } } - if (i != count) { + if (i != total_count) { for (int j = 0; j <= i; j++) { - grpc_metadata *md = &metadata[j]; + const grpc_metadata *md = + get_md_elem(metadata, additional_metadata, j, count); grpc_linked_mdelem *l = (grpc_linked_mdelem *)&md->internal_data; GRPC_MDELEM_UNREF(l->md); } @@ -595,24 +668,36 @@ static int prepare_application_metadata(grpc_call *call, int count, } } } - for (i = 1; i < count; i++) { - linked_from_md(&metadata[i])->prev = linked_from_md(&metadata[i - 1]); + for (i = 1; i < total_count; i++) { + grpc_metadata *md = get_md_elem(metadata, additional_metadata, i, count); + grpc_metadata *prev_md = + get_md_elem(metadata, additional_metadata, i - 1, count); + linked_from_md(md)->prev = linked_from_md(prev_md); } - for (i = 0; i < count - 1; i++) { - linked_from_md(&metadata[i])->next = linked_from_md(&metadata[i + 1]); + for (i = 0; i < total_count - 1; i++) { + grpc_metadata *md = get_md_elem(metadata, additional_metadata, i, count); + grpc_metadata *next_md = + get_md_elem(metadata, additional_metadata, i + 1, count); + linked_from_md(md)->next = linked_from_md(next_md); } - switch (prepend_extra_metadata * 2 + (count != 0)) { + + switch (prepend_extra_metadata * 2 + (total_count != 0)) { case 0: /* no prepend, no metadata => nothing to do */ batch->list.head = batch->list.tail = NULL; break; - case 1: + case 1: { /* metadata, but no prepend */ - batch->list.head = linked_from_md(&metadata[0]); - batch->list.tail = linked_from_md(&metadata[count - 1]); + grpc_metadata *first_md = + get_md_elem(metadata, additional_metadata, 0, count); + grpc_metadata *last_md = + get_md_elem(metadata, additional_metadata, total_count - 1, count); + batch->list.head = linked_from_md(first_md); + batch->list.tail = linked_from_md(last_md); batch->list.head->prev = NULL; batch->list.tail->next = NULL; break; + } case 2: /* prepend, but no md */ batch->list.head = &call->send_extra_metadata[0]; @@ -621,17 +706,22 @@ static int prepare_application_metadata(grpc_call *call, int count, batch->list.head->prev = NULL; batch->list.tail->next = NULL; break; - case 3: + case 3: { /* prepend AND md */ + grpc_metadata *first_md = + get_md_elem(metadata, additional_metadata, 0, count); + grpc_metadata *last_md = + get_md_elem(metadata, additional_metadata, total_count - 1, count); batch->list.head = &call->send_extra_metadata[0]; call->send_extra_metadata[call->send_extra_metadata_count - 1].next = - linked_from_md(&metadata[0]); - linked_from_md(&metadata[0])->prev = + linked_from_md(first_md); + linked_from_md(first_md)->prev = &call->send_extra_metadata[call->send_extra_metadata_count - 1]; - batch->list.tail = linked_from_md(&metadata[count - 1]); + batch->list.tail = linked_from_md(last_md); batch->list.head->prev = NULL; batch->list.tail->next = NULL; break; + } default: GPR_UNREACHABLE_CODE(return 0); } @@ -1229,7 +1319,29 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, error = GRPC_CALL_ERROR_TOO_MANY_OPERATIONS; goto done_with_error; } - if (op->data.send_initial_metadata.count > INT_MAX) { + /* process compression level */ + grpc_metadata compression_md; + memset(&compression_md, 0, sizeof(grpc_metadata)); + size_t additional_metadata_count = 0; + if (op->data.send_initial_metadata.compression_level > + GRPC_COMPRESS_LEVEL_NONE) { + if (call->is_client) { + error = GRPC_CALL_ERROR_NOT_ON_CLIENT; + goto done_with_error; + } + const grpc_compression_algorithm calgo = + compression_algorithm_for_level_locked( + call, op->data.send_initial_metadata.compression_level); + char *calgo_name; + grpc_compression_algorithm_name(calgo, &calgo_name); + compression_md.key = "grpc-internal-encoding-request"; + compression_md.value = calgo_name; + compression_md.value_length = strlen(calgo_name); + additional_metadata_count++; + } + + if (op->data.send_initial_metadata.count + additional_metadata_count > + INT_MAX) { error = GRPC_CALL_ERROR_INVALID_METADATA; goto done_with_error; } @@ -1237,7 +1349,8 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, call->sent_initial_metadata = 1; if (!prepare_application_metadata( call, (int)op->data.send_initial_metadata.count, - op->data.send_initial_metadata.metadata, 0, call->is_client)) { + op->data.send_initial_metadata.metadata, 0, call->is_client, + &compression_md, (int)additional_metadata_count)) { error = GRPC_CALL_ERROR_INVALID_METADATA; goto done_with_error; } @@ -1325,7 +1438,8 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, if (!prepare_application_metadata( call, (int)op->data.send_status_from_server.trailing_metadata_count, - op->data.send_status_from_server.trailing_metadata, 1, 1)) { + op->data.send_status_from_server.trailing_metadata, 1, 1, NULL, + 0)) { error = GRPC_CALL_ERROR_INVALID_METADATA; goto done_with_error; } @@ -1513,9 +1627,10 @@ uint8_t grpc_call_is_client(grpc_call *call) { return call->is_client; } grpc_compression_algorithm grpc_call_compression_for_level( grpc_call *call, grpc_compression_level level) { gpr_mu_lock(&call->mu); - const uint32_t accepted_encodings = call->encodings_accepted_by_peer; + grpc_compression_algorithm algo = + compression_algorithm_for_level_locked(call, level); gpr_mu_unlock(&call->mu); - return grpc_compression_algorithm_for_level(level, accepted_encodings); + return algo; } const char *grpc_call_error_to_string(grpc_call_error error) { diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 5b8ff9b819b..49198cb7085 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -503,6 +503,7 @@ grpcsharp_call_start_unary(grpc_call *call, grpcsharp_batch_context *ctx, grpc_metadata_array *initial_metadata, uint32_t write_flags) { /* TODO: don't use magic number */ grpc_op ops[6]; + memset(ops, 0, sizeof(ops)); ops[0].op = GRPC_OP_SEND_INITIAL_METADATA; grpcsharp_metadata_array_move(&(ctx->send_initial_metadata), initial_metadata); @@ -555,6 +556,7 @@ grpcsharp_call_start_client_streaming(grpc_call *call, grpc_metadata_array *initial_metadata) { /* TODO: don't use magic number */ grpc_op ops[4]; + memset(ops, 0, sizeof(ops)); ops[0].op = GRPC_OP_SEND_INITIAL_METADATA; grpcsharp_metadata_array_move(&(ctx->send_initial_metadata), initial_metadata); @@ -596,6 +598,7 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_start_server_streaming( size_t send_buffer_len, grpc_metadata_array *initial_metadata, uint32_t write_flags) { /* TODO: don't use magic number */ grpc_op ops[4]; + memset(ops, 0, sizeof(ops)); ops[0].op = GRPC_OP_SEND_INITIAL_METADATA; grpcsharp_metadata_array_move(&(ctx->send_initial_metadata), initial_metadata); @@ -638,6 +641,7 @@ grpcsharp_call_start_duplex_streaming(grpc_call *call, grpc_metadata_array *initial_metadata) { /* TODO: don't use magic number */ grpc_op ops[2]; + memset(ops, 0, sizeof(ops)); ops[0].op = GRPC_OP_SEND_INITIAL_METADATA; grpcsharp_metadata_array_move(&(ctx->send_initial_metadata), initial_metadata); @@ -684,6 +688,7 @@ grpcsharp_call_send_message(grpc_call *call, grpcsharp_batch_context *ctx, int32_t send_empty_initial_metadata) { /* TODO: don't use magic number */ grpc_op ops[2]; + memset(ops, 0, sizeof(ops)); size_t nops = send_empty_initial_metadata ? 2 : 1; ops[0].op = GRPC_OP_SEND_MESSAGE; ctx->send_message = string_to_byte_buffer(send_buffer, send_buffer_len); @@ -691,8 +696,6 @@ grpcsharp_call_send_message(grpc_call *call, grpcsharp_batch_context *ctx, ops[0].flags = write_flags; ops[0].reserved = NULL; ops[1].op = GRPC_OP_SEND_INITIAL_METADATA; - ops[1].data.send_initial_metadata.count = 0; - ops[1].data.send_initial_metadata.metadata = NULL; ops[1].flags = 0; ops[1].reserved = NULL; @@ -719,6 +722,7 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_send_status_from_server( size_t optional_send_buffer_len, uint32_t write_flags) { /* TODO: don't use magic number */ grpc_op ops[3]; + memset(ops, 0, sizeof(ops)); size_t nops = 1; ops[0].op = GRPC_OP_SEND_STATUS_FROM_SERVER; ops[0].data.send_status_from_server.status = status_code; @@ -743,8 +747,6 @@ GPR_EXPORT grpc_call_error GPR_CALLTYPE grpcsharp_call_send_status_from_server( } if (send_empty_initial_metadata) { ops[nops].op = GRPC_OP_SEND_INITIAL_METADATA; - ops[nops].data.send_initial_metadata.count = 0; - ops[nops].data.send_initial_metadata.metadata = NULL; ops[nops].flags = 0; ops[nops].reserved = NULL; nops++; @@ -784,6 +786,7 @@ grpcsharp_call_send_initial_metadata(grpc_call *call, grpc_metadata_array *initial_metadata) { /* TODO: don't use magic number */ grpc_op ops[1]; + memset(ops, 0, sizeof(ops)); ops[0].op = GRPC_OP_SEND_INITIAL_METADATA; grpcsharp_metadata_array_move(&(ctx->send_initial_metadata), initial_metadata); diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m index 16e5bff7ff7..f72ec9068e7 100644 --- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m +++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m @@ -72,6 +72,7 @@ _op.op = GRPC_OP_SEND_INITIAL_METADATA; _op.data.send_initial_metadata.count = metadata.count; _op.data.send_initial_metadata.metadata = metadata.grpc_metadataArray; + _op.data.send_initial_metadata.compression_level = 0; _handler = handler; } return self; diff --git a/src/php/ext/grpc/call.c b/src/php/ext/grpc/call.c index a0f3d160c64..227d61877ba 100644 --- a/src/php/ext/grpc/call.c +++ b/src/php/ext/grpc/call.c @@ -291,6 +291,7 @@ PHP_METHOD(Call, startBatch) { grpc_metadata_array_init(&recv_trailing_metadata); MAKE_STD_ZVAL(result); object_init(result); + memset(ops, 0, sizeof(ops)); /* "a" == 1 array */ if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "a", &array) == FAILURE) { diff --git a/src/python/grpcio/grpc/_cython/imports.generated.c b/src/python/grpcio/grpc/_cython/imports.generated.c index 09551472b5f..3daa6d6affc 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.c +++ b/src/python/grpcio/grpc/_cython/imports.generated.c @@ -72,7 +72,6 @@ census_view_get_data_type census_view_get_data_import; census_view_reset_type census_view_reset_import; grpc_compression_algorithm_parse_type grpc_compression_algorithm_parse_import; grpc_compression_algorithm_name_type grpc_compression_algorithm_name_import; -grpc_compression_algorithm_for_level_type grpc_compression_algorithm_for_level_import; grpc_compression_options_init_type grpc_compression_options_init_import; grpc_compression_options_enable_algorithm_type grpc_compression_options_enable_algorithm_import; grpc_compression_options_disable_algorithm_type grpc_compression_options_disable_algorithm_import; @@ -343,7 +342,6 @@ void pygrpc_load_imports(HMODULE library) { census_view_reset_import = (census_view_reset_type) GetProcAddress(library, "census_view_reset"); grpc_compression_algorithm_parse_import = (grpc_compression_algorithm_parse_type) GetProcAddress(library, "grpc_compression_algorithm_parse"); grpc_compression_algorithm_name_import = (grpc_compression_algorithm_name_type) GetProcAddress(library, "grpc_compression_algorithm_name"); - grpc_compression_algorithm_for_level_import = (grpc_compression_algorithm_for_level_type) GetProcAddress(library, "grpc_compression_algorithm_for_level"); grpc_compression_options_init_import = (grpc_compression_options_init_type) GetProcAddress(library, "grpc_compression_options_init"); grpc_compression_options_enable_algorithm_import = (grpc_compression_options_enable_algorithm_type) GetProcAddress(library, "grpc_compression_options_enable_algorithm"); grpc_compression_options_disable_algorithm_import = (grpc_compression_options_disable_algorithm_type) GetProcAddress(library, "grpc_compression_options_disable_algorithm"); diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index 54c8aaad13e..2a81352f0b5 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -167,9 +167,6 @@ extern grpc_compression_algorithm_parse_type grpc_compression_algorithm_parse_im typedef int(*grpc_compression_algorithm_name_type)(grpc_compression_algorithm algorithm, char **name); extern grpc_compression_algorithm_name_type grpc_compression_algorithm_name_import; #define grpc_compression_algorithm_name grpc_compression_algorithm_name_import -typedef grpc_compression_algorithm(*grpc_compression_algorithm_for_level_type)(grpc_compression_level level, uint32_t accepted_encodings); -extern grpc_compression_algorithm_for_level_type grpc_compression_algorithm_for_level_import; -#define grpc_compression_algorithm_for_level grpc_compression_algorithm_for_level_import typedef void(*grpc_compression_options_init_type)(grpc_compression_options *opts); extern grpc_compression_options_init_type grpc_compression_options_init_import; #define grpc_compression_options_init grpc_compression_options_init_import diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index cebbe8c40fe..07d52d83daa 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -72,7 +72,6 @@ census_view_get_data_type census_view_get_data_import; census_view_reset_type census_view_reset_import; grpc_compression_algorithm_parse_type grpc_compression_algorithm_parse_import; grpc_compression_algorithm_name_type grpc_compression_algorithm_name_import; -grpc_compression_algorithm_for_level_type grpc_compression_algorithm_for_level_import; grpc_compression_options_init_type grpc_compression_options_init_import; grpc_compression_options_enable_algorithm_type grpc_compression_options_enable_algorithm_import; grpc_compression_options_disable_algorithm_type grpc_compression_options_disable_algorithm_import; @@ -339,7 +338,6 @@ void grpc_rb_load_imports(HMODULE library) { census_view_reset_import = (census_view_reset_type) GetProcAddress(library, "census_view_reset"); grpc_compression_algorithm_parse_import = (grpc_compression_algorithm_parse_type) GetProcAddress(library, "grpc_compression_algorithm_parse"); grpc_compression_algorithm_name_import = (grpc_compression_algorithm_name_type) GetProcAddress(library, "grpc_compression_algorithm_name"); - grpc_compression_algorithm_for_level_import = (grpc_compression_algorithm_for_level_type) GetProcAddress(library, "grpc_compression_algorithm_for_level"); grpc_compression_options_init_import = (grpc_compression_options_init_type) GetProcAddress(library, "grpc_compression_options_init"); grpc_compression_options_enable_algorithm_import = (grpc_compression_options_enable_algorithm_type) GetProcAddress(library, "grpc_compression_options_enable_algorithm"); grpc_compression_options_disable_algorithm_import = (grpc_compression_options_disable_algorithm_type) GetProcAddress(library, "grpc_compression_options_disable_algorithm"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index d7ea6c574c8..6885e3926aa 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -167,9 +167,6 @@ extern grpc_compression_algorithm_parse_type grpc_compression_algorithm_parse_im typedef int(*grpc_compression_algorithm_name_type)(grpc_compression_algorithm algorithm, char **name); extern grpc_compression_algorithm_name_type grpc_compression_algorithm_name_import; #define grpc_compression_algorithm_name grpc_compression_algorithm_name_import -typedef grpc_compression_algorithm(*grpc_compression_algorithm_for_level_type)(grpc_compression_level level, uint32_t accepted_encodings); -extern grpc_compression_algorithm_for_level_type grpc_compression_algorithm_for_level_import; -#define grpc_compression_algorithm_for_level grpc_compression_algorithm_for_level_import typedef void(*grpc_compression_options_init_type)(grpc_compression_options *opts); extern grpc_compression_options_init_type grpc_compression_options_init_import; #define grpc_compression_options_init grpc_compression_options_init_import diff --git a/test/core/bad_ssl/bad_ssl_test.c b/test/core/bad_ssl/bad_ssl_test.c index c4ae212ec29..bb06ab0bb96 100644 --- a/test/core/bad_ssl/bad_ssl_test.c +++ b/test/core/bad_ssl/bad_ssl_test.c @@ -84,6 +84,7 @@ static void run_test(const char *target, size_t nops) { "/foo", "foo.test.google.fr:1234", deadline, NULL); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; diff --git a/test/core/client_config/lb_policies_test.c b/test/core/client_config/lb_policies_test.c index e766672cf5d..be79c3c049e 100644 --- a/test/core/client_config/lb_policies_test.c +++ b/test/core/client_config/lb_policies_test.c @@ -275,6 +275,7 @@ static int *perform_request(servers_fixture *f, grpc_channel *client, GPR_ASSERT(c); completed_client = 0; + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -327,6 +328,7 @@ static int *perform_request(servers_fixture *f, grpc_channel *client, } if (s_idx >= 0) { + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -415,6 +417,7 @@ static grpc_call **perform_multirequest(servers_fixture *f, kill_server(f, i); } + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; diff --git a/test/core/client_config/set_initial_connect_string_test.c b/test/core/client_config/set_initial_connect_string_test.c index 83058d9b2c3..2555eb393f0 100644 --- a/test/core/client_config/set_initial_connect_string_test.c +++ b/test/core/client_config/set_initial_connect_string_test.c @@ -133,6 +133,7 @@ static void start_rpc(int use_creds, int target_port) { state.call = grpc_channel_create_call( state.channel, NULL, GRPC_PROPAGATE_DEFAULTS, state.cq, "/Service/Method", "localhost", gpr_inf_future(GPR_CLOCK_REALTIME), NULL); + memset(&state.op, 0, sizeof(state.op)); state.op.op = GRPC_OP_SEND_INITIAL_METADATA; state.op.data.send_initial_metadata.count = 0; state.op.flags = 0; diff --git a/test/core/compression/compression_test.c b/test/core/compression/compression_test.c index 4c43746e335..ed6f9e72142 100644 --- a/test/core/compression/compression_test.c +++ b/test/core/compression/compression_test.c @@ -92,102 +92,6 @@ static void test_compression_algorithm_name(void) { /* the value of "name" is undefined upon failure */ } -static void test_compression_algorithm_for_level(void) { - gpr_log(GPR_DEBUG, "test_compression_algorithm_for_level"); - - { - /* accept only identity (aka none) */ - uint32_t accepted_encodings = 0; - GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */ - - GPR_ASSERT(GRPC_COMPRESS_NONE == - grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE, - accepted_encodings)); - - GPR_ASSERT(GRPC_COMPRESS_NONE == - grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW, - accepted_encodings)); - - GPR_ASSERT(GRPC_COMPRESS_NONE == - grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED, - accepted_encodings)); - - GPR_ASSERT(GRPC_COMPRESS_NONE == - grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH, - accepted_encodings)); - } - - { - /* accept only gzip */ - uint32_t accepted_encodings = 0; - GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */ - GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_GZIP); - - GPR_ASSERT(GRPC_COMPRESS_NONE == - grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE, - accepted_encodings)); - - GPR_ASSERT(GRPC_COMPRESS_GZIP == - grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW, - accepted_encodings)); - - GPR_ASSERT(GRPC_COMPRESS_GZIP == - grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED, - accepted_encodings)); - - GPR_ASSERT(GRPC_COMPRESS_GZIP == - grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH, - accepted_encodings)); - } - - { - /* accept only deflate */ - uint32_t accepted_encodings = 0; - GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */ - GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_DEFLATE); - - GPR_ASSERT(GRPC_COMPRESS_NONE == - grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE, - accepted_encodings)); - - GPR_ASSERT(GRPC_COMPRESS_DEFLATE == - grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW, - accepted_encodings)); - - GPR_ASSERT(GRPC_COMPRESS_DEFLATE == - grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED, - accepted_encodings)); - - GPR_ASSERT(GRPC_COMPRESS_DEFLATE == - grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH, - accepted_encodings)); - } - - { - /* accept gzip and deflate */ - uint32_t accepted_encodings = 0; - GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_NONE); /* always */ - GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_GZIP); - GPR_BITSET(&accepted_encodings, GRPC_COMPRESS_DEFLATE); - - GPR_ASSERT(GRPC_COMPRESS_NONE == - grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_NONE, - accepted_encodings)); - - GPR_ASSERT(GRPC_COMPRESS_GZIP == - grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_LOW, - accepted_encodings)); - - GPR_ASSERT(GRPC_COMPRESS_DEFLATE == - grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_MED, - accepted_encodings)); - - GPR_ASSERT(GRPC_COMPRESS_DEFLATE == - grpc_compression_algorithm_for_level(GRPC_COMPRESS_LEVEL_HIGH, - accepted_encodings)); - } -} - static void test_compression_enable_disable_algorithm(void) { grpc_compression_options options; grpc_compression_algorithm algorithm; @@ -221,7 +125,6 @@ int main(int argc, char **argv) { grpc_init(); test_compression_algorithm_parse(); test_compression_algorithm_name(); - test_compression_algorithm_for_level(); test_compression_enable_disable_algorithm(); grpc_shutdown(); diff --git a/test/core/end2end/dualstack_socket_test.c b/test/core/end2end/dualstack_socket_test.c index 81f76ea79c2..d556f29bafb 100644 --- a/test/core/end2end/dualstack_socket_test.c +++ b/test/core/end2end/dualstack_socket_test.c @@ -165,6 +165,7 @@ void test_connect(const char *server_host, const char *client_host, int port, "/foo", "foo.test.google.fr", deadline, NULL); GPR_ASSERT(c); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -199,6 +200,7 @@ void test_connect(const char *server_host, const char *client_host, int port, cq_expect_completion(cqv, tag(101), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; diff --git a/test/core/end2end/fixtures/h2_ssl_cert.c b/test/core/end2end/fixtures/h2_ssl_cert.c index cd031ca4826..7b56e1f50e3 100644 --- a/test/core/end2end/fixtures/h2_ssl_cert.c +++ b/test/core/end2end/fixtures/h2_ssl_cert.c @@ -321,6 +321,7 @@ static void simple_request_body(grpc_end2end_test_fixture f, NULL); GPR_ASSERT(c); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; diff --git a/test/core/end2end/fixtures/proxy.c b/test/core/end2end/fixtures/proxy.c index a6487a17ac2..2fcd14696c3 100644 --- a/test/core/end2end/fixtures/proxy.c +++ b/test/core/end2end/fixtures/proxy.c @@ -169,6 +169,7 @@ static void on_p2s_recv_initial_metadata(void *arg, int success) { grpc_op op; grpc_call_error err; + memset(&op, 0, sizeof(op)); if (!pc->proxy->shutdown) { op.op = GRPC_OP_SEND_INITIAL_METADATA; op.flags = 0; @@ -326,6 +327,7 @@ static void on_new_call(void *arg, int success) { if (success) { grpc_op op; + memset(&op, 0, sizeof(op)); proxy_call *pc = gpr_malloc(sizeof(*pc)); memset(pc, 0, sizeof(*pc)); pc->proxy = proxy; diff --git a/test/core/end2end/fuzzers/client_fuzzer.c b/test/core/end2end/fuzzers/client_fuzzer.c index afcf7638f72..5612b6621a5 100644 --- a/test/core/end2end/fuzzers/client_fuzzer.c +++ b/test/core/end2end/fuzzers/client_fuzzer.c @@ -31,6 +31,8 @@ * */ +#include + #include #include @@ -78,6 +80,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { size_t details_capacity = 0; grpc_op ops[6]; + memset(ops, 0, sizeof(ops)); grpc_op *op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; diff --git a/test/core/end2end/goaway_server_test.c b/test/core/end2end/goaway_server_test.c index 5f8c2641e76..3266793137c 100644 --- a/test/core/end2end/goaway_server_test.c +++ b/test/core/end2end/goaway_server_test.c @@ -132,6 +132,7 @@ int main(int argc, char **argv) { chan, NULL, GRPC_PROPAGATE_DEFAULTS, cq, "/foo", "127.0.0.1", GRPC_TIMEOUT_SECONDS_TO_DEADLINE(20), NULL); /* send initial metadata to probe connectivity */ + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -142,6 +143,7 @@ int main(int argc, char **argv) { (size_t)(op - ops), tag(0x101), NULL)); /* and receive status to probe termination */ + 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_recv1; @@ -183,6 +185,7 @@ int main(int argc, char **argv) { tag(0x9999)); /* listen for close on the server call to probe for finishing */ + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; op->data.recv_close_on_server.cancelled = &was_cancelled1; @@ -205,6 +208,7 @@ int main(int argc, char **argv) { chan, NULL, GRPC_PROPAGATE_DEFAULTS, cq, "/foo", "127.0.0.1", GRPC_TIMEOUT_SECONDS_TO_DEADLINE(20), NULL); /* send initial metadata to probe connectivity */ + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -215,6 +219,7 @@ int main(int argc, char **argv) { (size_t)(op - ops), tag(0x201), NULL)); /* and receive status to probe termination */ + 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_recv2; @@ -249,6 +254,7 @@ int main(int argc, char **argv) { cq_verify(cqv); /* listen for close on the server call to probe for finishing */ + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; op->data.recv_close_on_server.cancelled = &was_cancelled2; diff --git a/test/core/end2end/invalid_call_argument_test.c b/test/core/end2end/invalid_call_argument_test.c index cf42e92a1a3..35456607012 100644 --- a/test/core/end2end/invalid_call_argument_test.c +++ b/test/core/end2end/invalid_call_argument_test.c @@ -30,11 +30,15 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ + +#include +#include + #include #include #include #include -#include + #include "test/core/end2end/cq_verifier.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" @@ -74,6 +78,7 @@ static void prepare_test(int is_client) { g_state.cqv = cq_verifier_create(g_state.cq); g_state.details = NULL; g_state.details_capacity = 0; + memset(g_state.ops, 0, sizeof(g_state.ops)); if (is_client) { /* create a call, channel to a non existant server */ diff --git a/test/core/end2end/no_server_test.c b/test/core/end2end/no_server_test.c index 7a5cd2335f1..08af3821971 100644 --- a/test/core/end2end/no_server_test.c +++ b/test/core/end2end/no_server_test.c @@ -31,9 +31,12 @@ * */ +#include + #include #include #include + #include "test/core/end2end/cq_verifier.h" #include "test/core/util/test_config.h" @@ -65,6 +68,7 @@ int main(int argc, char **argv) { call = grpc_channel_create_call(chan, NULL, GRPC_PROPAGATE_DEFAULTS, cq, "/Foo", "nonexistant", deadline, NULL); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; diff --git a/test/core/end2end/tests/bad_hostname.c b/test/core/end2end/tests/bad_hostname.c index 3cb9b3d4b12..c9663c2155e 100644 --- a/test/core/end2end/tests/bad_hostname.c +++ b/test/core/end2end/tests/bad_hostname.c @@ -123,6 +123,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) { grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; diff --git a/test/core/end2end/tests/binary_metadata.c b/test/core/end2end/tests/binary_metadata.c index 994c3bf1dd2..3dd26120777 100644 --- a/test/core/end2end/tests/binary_metadata.c +++ b/test/core/end2end/tests/binary_metadata.c @@ -157,6 +157,7 @@ static void test_request_response_with_metadata_and_payload( grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 2; @@ -201,6 +202,7 @@ static void test_request_response_with_metadata_and_payload( cq_expect_completion(cqv, tag(101), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 2; @@ -219,6 +221,7 @@ static void test_request_response_with_metadata_and_payload( cq_expect_completion(cqv, tag(102), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; op->data.recv_close_on_server.cancelled = &was_cancelled; diff --git a/test/core/end2end/tests/call_creds.c b/test/core/end2end/tests/call_creds.c index b555bea740b..eee0cb8dedb 100644 --- a/test/core/end2end/tests/call_creds.c +++ b/test/core/end2end/tests/call_creds.c @@ -193,6 +193,7 @@ static void request_response_with_payload_and_call_creds( grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -248,6 +249,7 @@ static void request_response_with_payload_and_call_creds( /* Cannot set creds on the server call object. */ GPR_ASSERT(grpc_call_set_credentials(s, NULL) != GRPC_CALL_OK); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -265,6 +267,7 @@ static void request_response_with_payload_and_call_creds( cq_expect_completion(cqv, tag(102), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; op->data.recv_close_on_server.cancelled = &was_cancelled; @@ -410,6 +413,7 @@ static void test_request_with_server_rejecting_client_creds( grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + 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; diff --git a/test/core/end2end/tests/cancel_after_accept.c b/test/core/end2end/tests/cancel_after_accept.c index fc2a64a6c18..51c13da3b1e 100644 --- a/test/core/end2end/tests/cancel_after_accept.c +++ b/test/core/end2end/tests/cancel_after_accept.c @@ -136,6 +136,7 @@ static void test_cancel_after_accept(grpc_end2end_test_config config, grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + 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; @@ -174,6 +175,7 @@ static void test_cancel_after_accept(grpc_end2end_test_config config, cq_expect_completion(cqv, tag(2), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_RECV_MESSAGE; op->data.recv_message = &request_payload_recv; diff --git a/test/core/end2end/tests/cancel_after_client_done.c b/test/core/end2end/tests/cancel_after_client_done.c index 3bafa8c85fd..2b5a409deef 100644 --- a/test/core/end2end/tests/cancel_after_client_done.c +++ b/test/core/end2end/tests/cancel_after_client_done.c @@ -136,6 +136,7 @@ static void test_cancel_after_accept_and_writes_closed( grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + 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; @@ -178,6 +179,7 @@ static void test_cancel_after_accept_and_writes_closed( cq_expect_completion(cqv, tag(2), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_RECV_MESSAGE; op->data.recv_message = &request_payload_recv; diff --git a/test/core/end2end/tests/cancel_after_invoke.c b/test/core/end2end/tests/cancel_after_invoke.c index fc2751af8e1..85fbe9de7bb 100644 --- a/test/core/end2end/tests/cancel_after_invoke.c +++ b/test/core/end2end/tests/cancel_after_invoke.c @@ -131,6 +131,7 @@ static void test_cancel_after_invoke(grpc_end2end_test_config config, grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + 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; diff --git a/test/core/end2end/tests/cancel_before_invoke.c b/test/core/end2end/tests/cancel_before_invoke.c index 33005db9e45..d99062c6082 100644 --- a/test/core/end2end/tests/cancel_before_invoke.c +++ b/test/core/end2end/tests/cancel_before_invoke.c @@ -131,6 +131,7 @@ static void test_cancel_before_invoke(grpc_end2end_test_config config, grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + 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; diff --git a/test/core/end2end/tests/cancel_with_status.c b/test/core/end2end/tests/cancel_with_status.c index c3ee4a6a0ee..83629a9a028 100644 --- a/test/core/end2end/tests/cancel_with_status.c +++ b/test/core/end2end/tests/cancel_with_status.c @@ -122,6 +122,7 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t num_ops) { grpc_metadata_array_init(&initial_metadata_recv); grpc_metadata_array_init(&trailing_metadata_recv); + 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; diff --git a/test/core/end2end/tests/compressed_payload.c b/test/core/end2end/tests/compressed_payload.c index 589bc314f8e..13eb0e8b3d6 100644 --- a/test/core/end2end/tests/compressed_payload.c +++ b/test/core/end2end/tests/compressed_payload.c @@ -45,6 +45,7 @@ #include "src/core/lib/channel/channel_args.h" #include "src/core/lib/channel/compress_filter.h" +#include "src/core/lib/surface/call.h" #include "src/core/lib/surface/call_test_only.h" #include "test/core/end2end/cq_verifier.h" @@ -104,10 +105,13 @@ static void end_test(grpc_end2end_test_fixture *f) { static void request_with_payload_template( grpc_end2end_test_config config, const char *test_name, - uint32_t send_flags_bitmask, - grpc_compression_algorithm requested_compression_algorithm, - grpc_compression_algorithm expected_compression_algorithm, - grpc_metadata *client_metadata) { + uint32_t client_send_flags_bitmask, + grpc_compression_algorithm default_client_channel_compression_algorithm, + grpc_compression_algorithm default_server_channel_compression_algorithm, + grpc_compression_algorithm expected_algorithm_from_client, + grpc_compression_algorithm expected_algorithm_from_server, + grpc_metadata *client_init_metadata, + grpc_compression_level server_compression_level) { grpc_call *c; grpc_call *s; gpr_slice request_payload_slice; @@ -122,6 +126,8 @@ static void request_with_payload_template( grpc_metadata_array trailing_metadata_recv; grpc_metadata_array request_metadata_recv; grpc_byte_buffer *request_payload_recv = NULL; + grpc_byte_buffer *response_payload; + grpc_byte_buffer *response_payload_recv; grpc_call_details call_details; grpc_status_code status; grpc_call_error error; @@ -129,17 +135,22 @@ static void request_with_payload_template( size_t details_capacity = 0; int was_cancelled = 2; cq_verifier *cqv; - char str[1024]; + char request_str[1024]; + char response_str[1024]; - memset(str, 'x', 1023); - str[1023] = '\0'; - request_payload_slice = gpr_slice_from_copied_string(str); - request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); + memset(request_str, 'x', 1023); + request_str[1023] = '\0'; + + memset(response_str, 'y', 1023); + response_str[1023] = '\0'; + + request_payload_slice = gpr_slice_from_copied_string(request_str); + gpr_slice response_payload_slice = gpr_slice_from_copied_string(response_str); client_args = grpc_channel_args_set_compression_algorithm( - NULL, requested_compression_algorithm); + NULL, default_client_channel_compression_algorithm); server_args = grpc_channel_args_set_compression_algorithm( - NULL, requested_compression_algorithm); + NULL, default_server_channel_compression_algorithm); f = begin_test(config, test_name, client_args, server_args); cqv = cq_verifier_create(f.cq); @@ -153,26 +164,18 @@ static void request_with_payload_template( grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; - if (client_metadata != NULL) { + if (client_init_metadata != NULL) { op->data.send_initial_metadata.count = 1; - op->data.send_initial_metadata.metadata = client_metadata; + op->data.send_initial_metadata.metadata = client_init_metadata; } else { op->data.send_initial_metadata.count = 0; } op->flags = 0; op->reserved = NULL; op++; - op->op = GRPC_OP_SEND_MESSAGE; - op->data.send_message = request_payload; - op->flags = send_flags_bitmask; - op->reserved = NULL; - op++; - op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; - op->flags = 0; - op->reserved = NULL; - op++; op->op = GRPC_OP_RECV_INITIAL_METADATA; op->data.recv_initial_metadata = &initial_metadata_recv; op->flags = 0; @@ -191,9 +194,9 @@ static void request_with_payload_template( error = grpc_server_request_call(f.server, &s, &call_details, - &request_metadata_recv, f.cq, f.cq, tag(101)); + &request_metadata_recv, f.cq, f.cq, tag(100)); GPR_ASSERT(GRPC_CALL_OK == error); - cq_expect_completion(cqv, tag(101), 1); + cq_expect_completion(cqv, tag(100), 1); cq_verify(cqv); GPR_ASSERT( @@ -205,29 +208,103 @@ static void request_with_payload_template( GPR_ASSERT(GPR_BITGET(grpc_call_test_only_get_encodings_accepted_by_peer(s), GRPC_COMPRESS_GZIP) != 0); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; + op->data.send_initial_metadata.compression_level = server_compression_level; op->flags = 0; op->reserved = NULL; op++; - op->op = GRPC_OP_RECV_MESSAGE; - op->data.recv_message = &request_payload_recv; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; op->flags = 0; op->reserved = NULL; op++; - error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL); + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(101), NULL); GPR_ASSERT(GRPC_CALL_OK == error); - cq_expect_completion(cqv, tag(102), 1); - cq_verify(cqv); + for (int i = 0; i < 2; i++) { + request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); + response_payload = grpc_raw_byte_buffer_create(&response_payload_slice, 1); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message = request_payload; + op->flags = client_send_flags_bitmask; + op->reserved = NULL; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &response_payload_recv; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(2), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &request_payload_recv; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + cq_expect_completion(cqv, tag(102), 1); + cq_verify(cqv); + + GPR_ASSERT(request_payload_recv->type == GRPC_BB_RAW); + GPR_ASSERT(byte_buffer_eq_string(request_payload_recv, request_str)); + GPR_ASSERT(request_payload_recv->data.raw.compression == + expected_algorithm_from_client); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message = response_payload; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + cq_expect_completion(cqv, tag(103), 1); + cq_expect_completion(cqv, tag(2), 1); + cq_verify(cqv); + + GPR_ASSERT(response_payload_recv->type == GRPC_BB_RAW); + GPR_ASSERT(byte_buffer_eq_string(response_payload_recv, response_str)); + if (server_compression_level > GRPC_COMPRESS_LEVEL_NONE) { + const grpc_compression_algorithm algo_for_server_level = + grpc_call_compression_for_level(s, server_compression_level); + GPR_ASSERT(response_payload_recv->data.raw.compression == + algo_for_server_level); + } else { + GPR_ASSERT(response_payload_recv->data.raw.compression == + expected_algorithm_from_server); + } + + 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); + } + + gpr_slice_unref(request_payload_slice); + gpr_slice_unref(response_payload_slice); + memset(ops, 0, sizeof(ops)); op = ops; - op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; - op->data.recv_close_on_server.cancelled = &was_cancelled; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; op->flags = 0; op->reserved = NULL; op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(3), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + memset(ops, 0, sizeof(ops)); + op = ops; 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_OK; @@ -235,11 +312,13 @@ static void request_with_payload_template( op->flags = 0; op->reserved = NULL; op++; - error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL); + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(104), NULL); GPR_ASSERT(GRPC_CALL_OK == error); - cq_expect_completion(cqv, tag(103), 1); cq_expect_completion(cqv, tag(1), 1); + cq_expect_completion(cqv, tag(3), 1); + cq_expect_completion(cqv, tag(101), 1); + cq_expect_completion(cqv, tag(104), 1); cq_verify(cqv); GPR_ASSERT(status == GRPC_STATUS_OK); @@ -248,12 +327,6 @@ static void request_with_payload_template( GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr")); GPR_ASSERT(was_cancelled == 0); - GPR_ASSERT(request_payload_recv->type == GRPC_BB_RAW); - GPR_ASSERT(request_payload_recv->data.raw.compression == - expected_compression_algorithm); - - GPR_ASSERT(byte_buffer_eq_string(request_payload_recv, str)); - gpr_free(details); grpc_metadata_array_destroy(&initial_metadata_recv); grpc_metadata_array_destroy(&trailing_metadata_recv); @@ -265,10 +338,6 @@ static void request_with_payload_template( cq_verifier_destroy(cqv); - gpr_slice_unref(request_payload_slice); - grpc_byte_buffer_destroy(request_payload); - grpc_byte_buffer_destroy(request_payload_recv); - grpc_channel_args_destroy(client_args); grpc_channel_args_destroy(server_args); @@ -280,60 +349,78 @@ static void test_invoke_request_with_exceptionally_uncompressed_payload( grpc_end2end_test_config config) { request_with_payload_template( config, "test_invoke_request_with_exceptionally_uncompressed_payload", - GRPC_WRITE_NO_COMPRESS, GRPC_COMPRESS_GZIP, GRPC_COMPRESS_NONE, NULL); + GRPC_WRITE_NO_COMPRESS, GRPC_COMPRESS_GZIP, GRPC_COMPRESS_GZIP, + GRPC_COMPRESS_NONE, GRPC_COMPRESS_GZIP, NULL, GRPC_COMPRESS_LEVEL_NONE); } static void test_invoke_request_with_uncompressed_payload( grpc_end2end_test_config config) { request_with_payload_template( config, "test_invoke_request_with_uncompressed_payload", 0, - GRPC_COMPRESS_NONE, GRPC_COMPRESS_NONE, NULL); + GRPC_COMPRESS_NONE, GRPC_COMPRESS_NONE, GRPC_COMPRESS_NONE, + GRPC_COMPRESS_NONE, NULL, GRPC_COMPRESS_LEVEL_NONE); } static void test_invoke_request_with_compressed_payload( grpc_end2end_test_config config) { request_with_payload_template( config, "test_invoke_request_with_compressed_payload", 0, - GRPC_COMPRESS_GZIP, GRPC_COMPRESS_GZIP, NULL); + GRPC_COMPRESS_GZIP, GRPC_COMPRESS_GZIP, GRPC_COMPRESS_GZIP, + GRPC_COMPRESS_GZIP, NULL, GRPC_COMPRESS_LEVEL_NONE); +} + +static void test_invoke_request_with_server_level( + grpc_end2end_test_config config) { + request_with_payload_template( + config, "test_invoke_request_with_server_level", 0, GRPC_COMPRESS_NONE, + GRPC_COMPRESS_NONE, GRPC_COMPRESS_NONE, GRPC_COMPRESS_NONE /* ignored */, + NULL, GRPC_COMPRESS_LEVEL_HIGH); } static void test_invoke_request_with_compressed_payload_md_override( grpc_end2end_test_config config) { grpc_metadata gzip_compression_override; - grpc_metadata none_compression_override; + grpc_metadata identity_compression_override; gzip_compression_override.key = GRPC_COMPRESS_REQUEST_ALGORITHM_KEY; gzip_compression_override.value = "gzip"; - gzip_compression_override.value_length = 4; + gzip_compression_override.value_length = + strlen(gzip_compression_override.value); memset(&gzip_compression_override.internal_data, 0, sizeof(gzip_compression_override.internal_data)); - none_compression_override.key = GRPC_COMPRESS_REQUEST_ALGORITHM_KEY; - none_compression_override.value = "identity"; - none_compression_override.value_length = 4; - memset(&none_compression_override.internal_data, 0, - sizeof(none_compression_override.internal_data)); + identity_compression_override.key = GRPC_COMPRESS_REQUEST_ALGORITHM_KEY; + identity_compression_override.value = "identity"; + identity_compression_override.value_length = + strlen(identity_compression_override.value); + memset(&identity_compression_override.internal_data, 0, + sizeof(identity_compression_override.internal_data)); /* Channel default NONE (aka IDENTITY), call override to GZIP */ request_with_payload_template( config, "test_invoke_request_with_compressed_payload_md_override_1", 0, - GRPC_COMPRESS_NONE, GRPC_COMPRESS_GZIP, &gzip_compression_override); + GRPC_COMPRESS_NONE, GRPC_COMPRESS_NONE, GRPC_COMPRESS_GZIP, + GRPC_COMPRESS_NONE, &gzip_compression_override, GRPC_COMPRESS_LEVEL_NONE); /* Channel default DEFLATE, call override to GZIP */ request_with_payload_template( config, "test_invoke_request_with_compressed_payload_md_override_2", 0, - GRPC_COMPRESS_DEFLATE, GRPC_COMPRESS_GZIP, &gzip_compression_override); + GRPC_COMPRESS_DEFLATE, GRPC_COMPRESS_NONE, GRPC_COMPRESS_GZIP, + GRPC_COMPRESS_NONE, &gzip_compression_override, GRPC_COMPRESS_LEVEL_NONE); /* Channel default DEFLATE, call override to NONE (aka IDENTITY) */ request_with_payload_template( config, "test_invoke_request_with_compressed_payload_md_override_3", 0, - GRPC_COMPRESS_DEFLATE, GRPC_COMPRESS_NONE, &none_compression_override); + GRPC_COMPRESS_DEFLATE, GRPC_COMPRESS_NONE, GRPC_COMPRESS_NONE, + GRPC_COMPRESS_NONE, &identity_compression_override, + GRPC_COMPRESS_LEVEL_NONE); } void compressed_payload(grpc_end2end_test_config config) { test_invoke_request_with_exceptionally_uncompressed_payload(config); test_invoke_request_with_uncompressed_payload(config); test_invoke_request_with_compressed_payload(config); + test_invoke_request_with_server_level(config); test_invoke_request_with_compressed_payload_md_override(config); } diff --git a/test/core/end2end/tests/default_host.c b/test/core/end2end/tests/default_host.c index 44384a783ec..728ee597b50 100644 --- a/test/core/end2end/tests/default_host.c +++ b/test/core/end2end/tests/default_host.c @@ -131,6 +131,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) { grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -173,6 +174,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) { 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; diff --git a/test/core/end2end/tests/disappearing_server.c b/test/core/end2end/tests/disappearing_server.c index 03d1ded04cf..536fbd0d8a8 100644 --- a/test/core/end2end/tests/disappearing_server.c +++ b/test/core/end2end/tests/disappearing_server.c @@ -108,6 +108,7 @@ static void do_request_and_shutdown_server(grpc_end2end_test_fixture *f, grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -145,6 +146,7 @@ static void do_request_and_shutdown_server(grpc_end2end_test_fixture *f, - and still complete the request */ grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c index 99049aa6bd5..dae98233e02 100644 --- a/test/core/end2end/tests/filter_causes_close.c +++ b/test/core/end2end/tests/filter_causes_close.c @@ -134,6 +134,7 @@ static void test_request(grpc_end2end_test_config config) { grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; diff --git a/test/core/end2end/tests/graceful_server_shutdown.c b/test/core/end2end/tests/graceful_server_shutdown.c index 26198f3bdfc..f527b8617d9 100644 --- a/test/core/end2end/tests/graceful_server_shutdown.c +++ b/test/core/end2end/tests/graceful_server_shutdown.c @@ -122,6 +122,7 @@ static void test_early_server_shutdown_finishes_inflight_calls( grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -160,6 +161,7 @@ static void test_early_server_shutdown_finishes_inflight_calls( grpc_server_shutdown_and_notify(f.server, f.cq, tag(0xdead)); cq_verify_empty(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; diff --git a/test/core/end2end/tests/high_initial_seqno.c b/test/core/end2end/tests/high_initial_seqno.c index 374606dcb73..50e3c9cb898 100644 --- a/test/core/end2end/tests/high_initial_seqno.c +++ b/test/core/end2end/tests/high_initial_seqno.c @@ -128,6 +128,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) { grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -161,6 +162,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) { cq_expect_completion(cqv, tag(101), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; diff --git a/test/core/end2end/tests/hpack_size.c b/test/core/end2end/tests/hpack_size.c index 07d5d387b4c..ee889b77a1c 100644 --- a/test/core/end2end/tests/hpack_size.c +++ b/test/core/end2end/tests/hpack_size.c @@ -323,6 +323,7 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t index) { grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = GPR_ARRAY_SIZE(extra_metadata); @@ -357,6 +358,7 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t index) { cq_expect_completion(cqv, tag(101), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; diff --git a/test/core/end2end/tests/idempotent_request.c b/test/core/end2end/tests/idempotent_request.c index e53f3b2aaa8..dfedcfebee8 100644 --- a/test/core/end2end/tests/idempotent_request.c +++ b/test/core/end2end/tests/idempotent_request.c @@ -132,6 +132,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) { grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -174,6 +175,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) { 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; diff --git a/test/core/end2end/tests/invoke_large_request.c b/test/core/end2end/tests/invoke_large_request.c index 6410305451a..9c9ca951293 100644 --- a/test/core/end2end/tests/invoke_large_request.c +++ b/test/core/end2end/tests/invoke_large_request.c @@ -138,6 +138,7 @@ static void test_invoke_large_request(grpc_end2end_test_config config) { grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -181,6 +182,7 @@ static void test_invoke_large_request(grpc_end2end_test_config config) { cq_expect_completion(cqv, tag(101), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -198,6 +200,7 @@ static void test_invoke_large_request(grpc_end2end_test_config config) { cq_expect_completion(cqv, tag(102), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; op->data.recv_close_on_server.cancelled = &was_cancelled; diff --git a/test/core/end2end/tests/large_metadata.c b/test/core/end2end/tests/large_metadata.c index 0e5d6b4fe01..6631d207d26 100644 --- a/test/core/end2end/tests/large_metadata.c +++ b/test/core/end2end/tests/large_metadata.c @@ -138,6 +138,7 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) { grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 1; @@ -177,6 +178,7 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) { cq_expect_completion(cqv, tag(101), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -194,6 +196,7 @@ static void test_request_with_large_metadata(grpc_end2end_test_config config) { cq_expect_completion(cqv, tag(102), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; op->data.recv_close_on_server.cancelled = &was_cancelled; diff --git a/test/core/end2end/tests/max_concurrent_streams.c b/test/core/end2end/tests/max_concurrent_streams.c index 1bb53073cb0..41de74ff874 100644 --- a/test/core/end2end/tests/max_concurrent_streams.c +++ b/test/core/end2end/tests/max_concurrent_streams.c @@ -124,6 +124,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) { grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -157,6 +158,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) { cq_expect_completion(cqv, tag(101), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -270,6 +272,7 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) { f.server, &s1, &call_details, &request_metadata_recv, f.cq, f.cq, tag(101))); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -283,6 +286,7 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) { error = grpc_call_start_batch(c1, ops, (size_t)(op - ops), tag(301), NULL); GPR_ASSERT(GRPC_CALL_OK == error); + 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_recv1; @@ -300,6 +304,7 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) { error = grpc_call_start_batch(c1, ops, (size_t)(op - ops), tag(302), NULL); GPR_ASSERT(GRPC_CALL_OK == error); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -313,6 +318,7 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) { error = grpc_call_start_batch(c2, ops, (size_t)(op - ops), tag(401), NULL); GPR_ASSERT(GRPC_CALL_OK == error); + 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_recv2; @@ -354,6 +360,7 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) { } GPR_ASSERT(live_call == 300 || live_call == 400); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -388,6 +395,7 @@ static void test_max_concurrent_streams(grpc_end2end_test_config config) { cq_expect_completion(cqv, tag(201), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; diff --git a/test/core/end2end/tests/max_message_length.c b/test/core/end2end/tests/max_message_length.c index b5dbc1382a8..6d957ef55d2 100644 --- a/test/core/end2end/tests/max_message_length.c +++ b/test/core/end2end/tests/max_message_length.c @@ -140,6 +140,7 @@ static void test_max_message_length(grpc_end2end_test_config config) { grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -178,6 +179,7 @@ static void test_max_message_length(grpc_end2end_test_config config) { cq_expect_completion(cqv, tag(101), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; op->data.recv_close_on_server.cancelled = &was_cancelled; diff --git a/test/core/end2end/tests/negative_deadline.c b/test/core/end2end/tests/negative_deadline.c index 03e57a90f6f..fd56c8b4ff1 100644 --- a/test/core/end2end/tests/negative_deadline.c +++ b/test/core/end2end/tests/negative_deadline.c @@ -122,6 +122,7 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t num_ops) { grpc_metadata_array_init(&initial_metadata_recv); grpc_metadata_array_init(&trailing_metadata_recv); + 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; diff --git a/test/core/end2end/tests/payload.c b/test/core/end2end/tests/payload.c index bdfb1354068..443d85eecc4 100644 --- a/test/core/end2end/tests/payload.c +++ b/test/core/end2end/tests/payload.c @@ -131,6 +131,7 @@ static void request_response_with_payload(grpc_end2end_test_fixture f) { grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -174,6 +175,7 @@ static void request_response_with_payload(grpc_end2end_test_fixture f) { cq_expect_completion(cqv, tag(101), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -191,6 +193,7 @@ static void request_response_with_payload(grpc_end2end_test_fixture f) { cq_expect_completion(cqv, tag(102), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; op->data.recv_close_on_server.cancelled = &was_cancelled; diff --git a/test/core/end2end/tests/ping_pong_streaming.c b/test/core/end2end/tests/ping_pong_streaming.c index 15e1c6e338a..1d2f7943c1d 100644 --- a/test/core/end2end/tests/ping_pong_streaming.c +++ b/test/core/end2end/tests/ping_pong_streaming.c @@ -135,6 +135,7 @@ static void test_pingpong_streaming(grpc_end2end_test_config config, grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -164,6 +165,7 @@ static void test_pingpong_streaming(grpc_end2end_test_config config, cq_expect_completion(cqv, tag(100), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -182,6 +184,7 @@ static void test_pingpong_streaming(grpc_end2end_test_config config, request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); response_payload = grpc_raw_byte_buffer_create(&response_payload_slice, 1); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_MESSAGE; op->data.send_message = request_payload; @@ -196,6 +199,7 @@ static void test_pingpong_streaming(grpc_end2end_test_config config, error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(2), NULL); GPR_ASSERT(GRPC_CALL_OK == error); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_RECV_MESSAGE; op->data.recv_message = &request_payload_recv; @@ -207,6 +211,7 @@ static void test_pingpong_streaming(grpc_end2end_test_config config, cq_expect_completion(cqv, tag(102), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_MESSAGE; op->data.send_message = response_payload; @@ -228,6 +233,7 @@ static void test_pingpong_streaming(grpc_end2end_test_config config, gpr_slice_unref(request_payload_slice); gpr_slice_unref(response_payload_slice); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; op->flags = 0; @@ -236,6 +242,7 @@ static void test_pingpong_streaming(grpc_end2end_test_config config, error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(3), NULL); GPR_ASSERT(GRPC_CALL_OK == error); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_STATUS_FROM_SERVER; op->data.send_status_from_server.trailing_metadata_count = 0; diff --git a/test/core/end2end/tests/registered_call.c b/test/core/end2end/tests/registered_call.c index 3c4edbae7dc..ece6250ea13 100644 --- a/test/core/end2end/tests/registered_call.c +++ b/test/core/end2end/tests/registered_call.c @@ -125,6 +125,7 @@ static void simple_request_body(grpc_end2end_test_fixture f, void *rc) { grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -158,6 +159,7 @@ static void simple_request_body(grpc_end2end_test_fixture f, void *rc) { cq_expect_completion(cqv, tag(101), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; diff --git a/test/core/end2end/tests/request_with_flags.c b/test/core/end2end/tests/request_with_flags.c index 779895b9701..68545284dbe 100644 --- a/test/core/end2end/tests/request_with_flags.c +++ b/test/core/end2end/tests/request_with_flags.c @@ -131,6 +131,7 @@ static void test_invoke_request_with_flags( grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; diff --git a/test/core/end2end/tests/request_with_payload.c b/test/core/end2end/tests/request_with_payload.c index 77064040909..d94267e09cf 100644 --- a/test/core/end2end/tests/request_with_payload.c +++ b/test/core/end2end/tests/request_with_payload.c @@ -130,6 +130,7 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) { grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -167,6 +168,7 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) { cq_expect_completion(cqv, tag(101), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -184,6 +186,7 @@ static void test_invoke_request_with_payload(grpc_end2end_test_config config) { cq_expect_completion(cqv, tag(102), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; op->data.recv_close_on_server.cancelled = &was_cancelled; diff --git a/test/core/end2end/tests/server_finishes_request.c b/test/core/end2end/tests/server_finishes_request.c index a4f5319e5b4..a723c6fd2ca 100644 --- a/test/core/end2end/tests/server_finishes_request.c +++ b/test/core/end2end/tests/server_finishes_request.c @@ -126,6 +126,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) { grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -155,6 +156,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) { cq_expect_completion(cqv, tag(101), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; diff --git a/test/core/end2end/tests/shutdown_finishes_calls.c b/test/core/end2end/tests/shutdown_finishes_calls.c index 80287cd507a..abb6b26a875 100644 --- a/test/core/end2end/tests/shutdown_finishes_calls.c +++ b/test/core/end2end/tests/shutdown_finishes_calls.c @@ -115,6 +115,7 @@ static void test_early_server_shutdown_finishes_inflight_calls( grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -149,6 +150,7 @@ static void test_early_server_shutdown_finishes_inflight_calls( cq_expect_completion(cqv, tag(101), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; op->data.recv_close_on_server.cancelled = &was_cancelled; diff --git a/test/core/end2end/tests/simple_delayed_request.c b/test/core/end2end/tests/simple_delayed_request.c index 400b3a00274..e1fcc035bbd 100644 --- a/test/core/end2end/tests/simple_delayed_request.c +++ b/test/core/end2end/tests/simple_delayed_request.c @@ -117,6 +117,7 @@ static void simple_delayed_request_body(grpc_end2end_test_config config, grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -152,6 +153,7 @@ static void simple_delayed_request_body(grpc_end2end_test_config config, cq_expect_completion(cqv, tag(101), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; diff --git a/test/core/end2end/tests/simple_metadata.c b/test/core/end2end/tests/simple_metadata.c index 707b3c9512c..c9b1a03da52 100644 --- a/test/core/end2end/tests/simple_metadata.c +++ b/test/core/end2end/tests/simple_metadata.c @@ -141,6 +141,7 @@ static void test_request_response_with_metadata_and_payload( grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 2; @@ -185,6 +186,7 @@ static void test_request_response_with_metadata_and_payload( cq_expect_completion(cqv, tag(101), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 2; @@ -203,6 +205,7 @@ static void test_request_response_with_metadata_and_payload( cq_expect_completion(cqv, tag(102), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; op->data.recv_close_on_server.cancelled = &was_cancelled; diff --git a/test/core/end2end/tests/simple_request.c b/test/core/end2end/tests/simple_request.c index 42108425e6f..a8014e6894c 100644 --- a/test/core/end2end/tests/simple_request.c +++ b/test/core/end2end/tests/simple_request.c @@ -132,6 +132,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) { grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -174,6 +175,7 @@ static void simple_request_body(grpc_end2end_test_fixture f) { 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; diff --git a/test/core/end2end/tests/trailing_metadata.c b/test/core/end2end/tests/trailing_metadata.c index 4dd8c12cba9..41e0f009113 100644 --- a/test/core/end2end/tests/trailing_metadata.c +++ b/test/core/end2end/tests/trailing_metadata.c @@ -144,6 +144,7 @@ static void test_request_response_with_metadata_and_payload( grpc_metadata_array_init(&request_metadata_recv); grpc_call_details_init(&call_details); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 2; @@ -188,6 +189,7 @@ static void test_request_response_with_metadata_and_payload( cq_expect_completion(cqv, tag(101), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 2; @@ -206,6 +208,7 @@ static void test_request_response_with_metadata_and_payload( cq_expect_completion(cqv, tag(102), 1); cq_verify(cqv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; op->data.recv_close_on_server.cancelled = &was_cancelled; diff --git a/test/core/fling/client.c b/test/core/fling/client.c index 81562277ec0..123f2b5bbed 100644 --- a/test/core/fling/client.c +++ b/test/core/fling/client.c @@ -65,6 +65,7 @@ static void init_ping_pong_request(void) { grpc_metadata_array_init(&initial_metadata_recv); grpc_metadata_array_init(&trailing_metadata_recv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; diff --git a/test/core/surface/lame_client_test.c b/test/core/surface/lame_client_test.c index 12fa9de6cf3..285d8ea24dc 100644 --- a/test/core/surface/lame_client_test.c +++ b/test/core/surface/lame_client_test.c @@ -115,6 +115,7 @@ int main(int argc, char **argv) { GPR_ASSERT(call); cqv = cq_verifier_create(cq); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -133,6 +134,7 @@ int main(int argc, char **argv) { cq_expect_completion(cqv, tag(1), 0); 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; From 3080ede82c5ac0ba8b5df80f180c1b4aaef9b4ae Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 9 May 2016 14:55:34 -0700 Subject: [PATCH 0379/1894] Allow Ruby client code to set a user agent --- src/ruby/lib/grpc/generic/client_stub.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/ruby/lib/grpc/generic/client_stub.rb b/src/ruby/lib/grpc/generic/client_stub.rb index 68e167a69fc..12946fe819b 100644 --- a/src/ruby/lib/grpc/generic/client_stub.rb +++ b/src/ruby/lib/grpc/generic/client_stub.rb @@ -49,7 +49,12 @@ module GRPC fail(TypeError, '!Channel') unless alt_chan.is_a?(Core::Channel) return alt_chan end - kw['grpc.primary_user_agent'] = "grpc-ruby/#{VERSION}" + if kw['grpc.primary_user_agent'].nil? + kw['grpc.primary_user_agent'] = '' + else + kw['grpc.primary_user_agent'] += ' ' + end + kw['grpc.primary_user_agent'] += "grpc-ruby/#{VERSION}" unless creds.is_a?(Core::ChannelCredentials) || creds.is_a?(Symbol) fail(TypeError, '!ChannelCredentials or Symbol') end From 019a76e300f0170c4ecc09bdc008734ba75c6e6e Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 9 May 2016 14:57:29 -0700 Subject: [PATCH 0380/1894] Use local copy of node-pre-gyp on Windows to ensure that it is up to date --- tools/run_tests/build_artifact_node.bat | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/run_tests/build_artifact_node.bat b/tools/run_tests/build_artifact_node.bat index 3c23ac1daea..4f18985a120 100644 --- a/tools/run_tests/build_artifact_node.bat +++ b/tools/run_tests/build_artifact_node.bat @@ -38,12 +38,12 @@ call npm update || goto :error mkdir artifacts for %%v in (%node_versions%) do ( - call node-pre-gyp configure build --target=%%v --target_arch=%1 + call .\node_modules\.bin\node-pre-gyp.cmd configure build --target=%%v --target_arch=%1 @rem Try again after removing openssl headers rmdir "%HOMEDRIVE%%HOMEPATH%\.node-gyp\%%v\include\node\openssl" /S /Q rmdir "%HOMEDRIVE%%HOMEPATH%\.node-gyp\iojs-%%v\include\node\openssl" /S /Q - call node-pre-gyp build package testpackage --target=%%v --target_arch=%1 || goto :error + call .\node_modules\.bin\node-pre-gyp.cmd configure build --target=%%v --target_arch=%1 || goto :error xcopy /Y /I /S build\stage\* artifacts\ || goto :error ) From 33b3b2a3f0fac6105dca46adfe4d68b79fe00aca Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 9 May 2016 14:59:49 -0700 Subject: [PATCH 0381/1894] Fixed earlier fix with the right command --- tools/run_tests/build_artifact_node.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/build_artifact_node.bat b/tools/run_tests/build_artifact_node.bat index 4f18985a120..c5bd726db7e 100644 --- a/tools/run_tests/build_artifact_node.bat +++ b/tools/run_tests/build_artifact_node.bat @@ -43,7 +43,7 @@ for %%v in (%node_versions%) do ( @rem Try again after removing openssl headers rmdir "%HOMEDRIVE%%HOMEPATH%\.node-gyp\%%v\include\node\openssl" /S /Q rmdir "%HOMEDRIVE%%HOMEPATH%\.node-gyp\iojs-%%v\include\node\openssl" /S /Q - call .\node_modules\.bin\node-pre-gyp.cmd configure build --target=%%v --target_arch=%1 || goto :error + call .\node_modules\.bin\node-pre-gyp.cmd build package testpackage --target=%%v --target_arch=%1 || goto :error xcopy /Y /I /S build\stage\* artifacts\ || goto :error ) From 05e8c9a8b7958cace742ba102134df40a5ccf61e Mon Sep 17 00:00:00 2001 From: Eric Anderson Date: Mon, 9 May 2016 15:07:55 -0700 Subject: [PATCH 0382/1894] Connectivity state FATAL_FAILURE doesn't exist; it is SHUTDOWN In a previous version of the document we used FATAL_FAILURE instead of SHUTDOWN. This was changed when there was no case that would cause a fatal failure other than shutdown. However, one reference to the old name was missed. --- doc/connectivity-semantics-and-api.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/connectivity-semantics-and-api.md b/doc/connectivity-semantics-and-api.md index 5427900394b..cc007eaae3c 100644 --- a/doc/connectivity-semantics-and-api.md +++ b/doc/connectivity-semantics-and-api.md @@ -101,7 +101,7 @@ corresponding reasons. Empty cells denote disallowed transitions. Shutdown triggered by application. - FATAL_FAILURE + SHUTDOWN From 585ceca2143d4261c28fd244bfbefbe409cc0315 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 4 May 2016 12:54:14 -0700 Subject: [PATCH 0383/1894] Make namespacing of executables exposed by grpc-tools packages consistent between Node and Ruby --- src/node/tools/package.json | 4 ++-- src/ruby/tools/bin/{protoc.rb => grpc_tools_ruby_protoc.rb} | 0 ...c_grpc_ruby_plugin.rb => grpc_tools_ruby_protoc_plugin.rb} | 0 3 files changed, 2 insertions(+), 2 deletions(-) rename src/ruby/tools/bin/{protoc.rb => grpc_tools_ruby_protoc.rb} (100%) rename src/ruby/tools/bin/{protoc_grpc_ruby_plugin.rb => grpc_tools_ruby_protoc_plugin.rb} (100%) diff --git a/src/node/tools/package.json b/src/node/tools/package.json index 9bca5eab6f2..b8b4c9aea1b 100644 --- a/src/node/tools/package.json +++ b/src/node/tools/package.json @@ -16,8 +16,8 @@ } ], "bin": { - "grpc-tools-protoc": "./bin/protoc.js", - "grpc-tools-plugin": "./bin/protoc_plugin.js" + "grpc_tools_node_protoc": "./bin/protoc.js", + "grpc_tools_node_protoc_plugin": "./bin/protoc_plugin.js" }, "scripts": { "install": "./node_modules/.bin/node-pre-gyp install" diff --git a/src/ruby/tools/bin/protoc.rb b/src/ruby/tools/bin/grpc_tools_ruby_protoc.rb similarity index 100% rename from src/ruby/tools/bin/protoc.rb rename to src/ruby/tools/bin/grpc_tools_ruby_protoc.rb diff --git a/src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb b/src/ruby/tools/bin/grpc_tools_ruby_protoc_plugin.rb similarity index 100% rename from src/ruby/tools/bin/protoc_grpc_ruby_plugin.rb rename to src/ruby/tools/bin/grpc_tools_ruby_protoc_plugin.rb From f08d3af2077447f9b3161a529f4b35bb93f06fc7 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 4 May 2016 17:43:07 -0700 Subject: [PATCH 0384/1894] Updated template file --- templates/src/node/tools/package.json.template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/src/node/tools/package.json.template b/templates/src/node/tools/package.json.template index 4f673c48d1c..69ad71a3b83 100644 --- a/templates/src/node/tools/package.json.template +++ b/templates/src/node/tools/package.json.template @@ -18,8 +18,8 @@ } ], "bin": { - "grpc-tools-protoc": "./bin/protoc.js", - "grpc-tools-plugin": "./bin/protoc_plugin.js" + "grpc_tools_node_protoc": "./bin/protoc.js", + "grpc_tools_node_protoc_plugin": "./bin/protoc_plugin.js" }, "scripts": { "install": "./node_modules/.bin/node-pre-gyp install" From 9081198da9f2c151da8c08714556036c419d53bc Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 4 May 2016 10:27:12 -0700 Subject: [PATCH 0385/1894] Split Node examples into static and dynamic code generation examples --- examples/node/README.md | 10 +- examples/node/dynamic_codegen/README.md | 1 + .../{ => dynamic_codegen}/greeter_client.js | 2 +- .../{ => dynamic_codegen}/greeter_server.js | 2 +- .../route_guide/README.md | 0 .../route_guide/route_guide_client.js | 2 +- .../route_guide/route_guide_db.json | 0 .../route_guide/route_guide_server.js | 2 +- examples/node/package.json | 3 +- examples/node/static_codegen/README.md | 7 + .../node/static_codegen/greeter_client.js | 55 + .../node/static_codegen/greeter_server.js | 59 + .../node/static_codegen/helloworld_grpc_pb.js | 44 + examples/node/static_codegen/helloworld_pb.js | 332 ++++++ .../node/static_codegen/route_guide/README.md | 5 + .../route_guide/route_guide_client.js | 247 ++++ .../route_guide/route_guide_db.json | 601 ++++++++++ .../route_guide/route_guide_grpc_pb.js | 110 ++ .../route_guide/route_guide_pb.js | 1033 +++++++++++++++++ .../route_guide/route_guide_server.js | 261 +++++ 20 files changed, 2769 insertions(+), 7 deletions(-) create mode 100644 examples/node/dynamic_codegen/README.md rename examples/node/{ => dynamic_codegen}/greeter_client.js (96%) rename examples/node/{ => dynamic_codegen}/greeter_server.js (97%) rename examples/node/{ => dynamic_codegen}/route_guide/README.md (100%) rename examples/node/{ => dynamic_codegen}/route_guide/route_guide_client.js (99%) rename examples/node/{ => dynamic_codegen}/route_guide/route_guide_db.json (100%) rename examples/node/{ => dynamic_codegen}/route_guide/route_guide_server.js (99%) create mode 100644 examples/node/static_codegen/README.md create mode 100644 examples/node/static_codegen/greeter_client.js create mode 100644 examples/node/static_codegen/greeter_server.js create mode 100644 examples/node/static_codegen/helloworld_grpc_pb.js create mode 100644 examples/node/static_codegen/helloworld_pb.js create mode 100644 examples/node/static_codegen/route_guide/README.md create mode 100644 examples/node/static_codegen/route_guide/route_guide_client.js create mode 100644 examples/node/static_codegen/route_guide/route_guide_db.json create mode 100644 examples/node/static_codegen/route_guide/route_guide_grpc_pb.js create mode 100644 examples/node/static_codegen/route_guide/route_guide_pb.js create mode 100644 examples/node/static_codegen/route_guide/route_guide_server.js diff --git a/examples/node/README.md b/examples/node/README.md index 28878833ce6..14d779416ae 100644 --- a/examples/node/README.md +++ b/examples/node/README.md @@ -22,18 +22,24 @@ INSTALL TRY IT! ------- +There are two variants of these examples: one with code dynamically generated at runtime using Protobuf.js and one with code statically generated using `protoc`. The examples behave identically, and either server can be used with either client. + - Run the server ```sh $ # from this directory - $ node ./greeter_server.js & + $ node ./dynamic_codegen/greeter_server.js & + $ # OR + $ node ./static_codegen/greeter_server.js & ``` - Run the client ```sh $ # from this directory - $ node ./greeter_client.js + $ node ./dynamic_codegen/greeter_client.js + $ # OR + $ node ./dynamic_codegen/greeter_client.js ``` TUTORIAL diff --git a/examples/node/dynamic_codegen/README.md b/examples/node/dynamic_codegen/README.md new file mode 100644 index 00000000000..1a6ec17a3ee --- /dev/null +++ b/examples/node/dynamic_codegen/README.md @@ -0,0 +1 @@ +This is the dynamic code generation variant of the Node examples. Code in these examples is generated at runtime using Protobuf.js. diff --git a/examples/node/greeter_client.js b/examples/node/dynamic_codegen/greeter_client.js similarity index 96% rename from examples/node/greeter_client.js rename to examples/node/dynamic_codegen/greeter_client.js index 2820acbbb71..e24fb07f4c6 100644 --- a/examples/node/greeter_client.js +++ b/examples/node/dynamic_codegen/greeter_client.js @@ -31,7 +31,7 @@ * */ -var PROTO_PATH = __dirname + '/../protos/helloworld.proto'; +var PROTO_PATH = __dirname + '/../../protos/helloworld.proto'; var grpc = require('grpc'); var hello_proto = grpc.load(PROTO_PATH).helloworld; diff --git a/examples/node/greeter_server.js b/examples/node/dynamic_codegen/greeter_server.js similarity index 97% rename from examples/node/greeter_server.js rename to examples/node/dynamic_codegen/greeter_server.js index e7ad51f6009..aa43e4c6728 100644 --- a/examples/node/greeter_server.js +++ b/examples/node/dynamic_codegen/greeter_server.js @@ -31,7 +31,7 @@ * */ -var PROTO_PATH = __dirname + '/../protos/helloworld.proto'; +var PROTO_PATH = __dirname + '/../../protos/helloworld.proto'; var grpc = require('grpc'); var hello_proto = grpc.load(PROTO_PATH).helloworld; diff --git a/examples/node/route_guide/README.md b/examples/node/dynamic_codegen/route_guide/README.md similarity index 100% rename from examples/node/route_guide/README.md rename to examples/node/dynamic_codegen/route_guide/README.md diff --git a/examples/node/route_guide/route_guide_client.js b/examples/node/dynamic_codegen/route_guide/route_guide_client.js similarity index 99% rename from examples/node/route_guide/route_guide_client.js rename to examples/node/dynamic_codegen/route_guide/route_guide_client.js index fd05a59b63a..775b9addbfc 100644 --- a/examples/node/route_guide/route_guide_client.js +++ b/examples/node/dynamic_codegen/route_guide/route_guide_client.js @@ -31,7 +31,7 @@ * */ -var PROTO_PATH = __dirname + '/../../protos/route_guide.proto'; +var PROTO_PATH = __dirname + '/../../../protos/route_guide.proto'; var async = require('async'); var fs = require('fs'); diff --git a/examples/node/route_guide/route_guide_db.json b/examples/node/dynamic_codegen/route_guide/route_guide_db.json similarity index 100% rename from examples/node/route_guide/route_guide_db.json rename to examples/node/dynamic_codegen/route_guide/route_guide_db.json diff --git a/examples/node/route_guide/route_guide_server.js b/examples/node/dynamic_codegen/route_guide/route_guide_server.js similarity index 99% rename from examples/node/route_guide/route_guide_server.js rename to examples/node/dynamic_codegen/route_guide/route_guide_server.js index 6c01fac2465..6d59348cc92 100644 --- a/examples/node/route_guide/route_guide_server.js +++ b/examples/node/dynamic_codegen/route_guide/route_guide_server.js @@ -31,7 +31,7 @@ * */ -var PROTO_PATH = __dirname + '/../../protos/route_guide.proto'; +var PROTO_PATH = __dirname + '/../../../protos/route_guide.proto'; var fs = require('fs'); var parseArgs = require('minimist'); diff --git a/examples/node/package.json b/examples/node/package.json index d135df2464b..2cae031175e 100644 --- a/examples/node/package.json +++ b/examples/node/package.json @@ -3,7 +3,8 @@ "version": "0.1.0", "dependencies": { "async": "^1.5.2", - "grpc": "0.13.0", + "google-protobuf": "^3.0.0-alpha.5", + "grpc": "^0.14.0", "lodash": "^4.6.1", "minimist": "^1.2.0" } diff --git a/examples/node/static_codegen/README.md b/examples/node/static_codegen/README.md new file mode 100644 index 00000000000..fc97d34a386 --- /dev/null +++ b/examples/node/static_codegen/README.md @@ -0,0 +1,7 @@ +This is the static code generation variant of the Node examples. Code in these examples is pre-generated using protoc and the Node gRPC protoc plugin, and the generated code can be found in various `*_pb.js` files. The command line sequence for generating those files is as follows (assuming that `protoc` and `grpc_node_plugin` are present, and starting in the base directory of this package): + +```sh +cd ../protos +protoc --js_out=import_style=commonjs,binary:../node/static_codegen/ --grpc_out=../node/static_codegen --plugin=protoc-gen-grpc=grpc_node_plugin helloworld.proto +protoc --js_out=import_style=commonjs,binary:../node/static_codegen/route_guide/ --grpc_out=../node/static_codegen/route_guide/ --plugin=protoc-gen-grpc=grpc_node_plugin route_guide.proto +``` diff --git a/examples/node/static_codegen/greeter_client.js b/examples/node/static_codegen/greeter_client.js new file mode 100644 index 00000000000..da80cf34d8e --- /dev/null +++ b/examples/node/static_codegen/greeter_client.js @@ -0,0 +1,55 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +var messages = require('./helloworld_pb'); +var services = require('./helloworld_grpc_pb'); + +var grpc = require('grpc'); + +function main() { + var client = new services.GreeterClient('localhost:50051', + grpc.credentials.createInsecure()); + var user; + if (process.argv.length >= 3) { + user = process.argv[2]; + } else { + user = 'world'; + } + var request = new messages.HelloRequest(); + request.setName(user); + client.sayHello(request, function(err, response) { + console.log('Greeting:', response.getMessage()); + }); +} + +main(); diff --git a/examples/node/static_codegen/greeter_server.js b/examples/node/static_codegen/greeter_server.js new file mode 100644 index 00000000000..a1591b89fa6 --- /dev/null +++ b/examples/node/static_codegen/greeter_server.js @@ -0,0 +1,59 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +var messages = require('./helloworld_pb'); +var services = require('./helloworld_grpc_pb'); + +var grpc = require('grpc'); + +/** + * Implements the SayHello RPC method. + */ +function sayHello(call, callback) { + var reply = new messages.HelloReply(); + reply.setMessage('Hello ' + call.request.getName()); + callback(null, reply); +} + +/** + * Starts an RPC server that receives requests for the Greeter service at the + * sample server port + */ +function main() { + var server = new grpc.Server(); + server.addService(services.GreeterService, {sayHello: sayHello}); + server.bind('0.0.0.0:50051', grpc.ServerCredentials.createInsecure()); + server.start(); +} + +main(); diff --git a/examples/node/static_codegen/helloworld_grpc_pb.js b/examples/node/static_codegen/helloworld_grpc_pb.js new file mode 100644 index 00000000000..846f8b6bf57 --- /dev/null +++ b/examples/node/static_codegen/helloworld_grpc_pb.js @@ -0,0 +1,44 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('grpc'); +var helloworld_pb = require('./helloworld_pb.js'); + +function serialize_HelloReply(arg) { + if (!(arg instanceof helloworld_pb.HelloReply)) { + throw new Error('Expected argument of type HelloReply'); + } + return new Buffer(arg.serializeBinary()); +} + +function deserialize_HelloReply(buffer_arg) { + return helloworld_pb.HelloReply.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_HelloRequest(arg) { + if (!(arg instanceof helloworld_pb.HelloRequest)) { + throw new Error('Expected argument of type HelloRequest'); + } + return new Buffer(arg.serializeBinary()); +} + +function deserialize_HelloRequest(buffer_arg) { + return helloworld_pb.HelloRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var GreeterService = exports.GreeterService = { + sayHello: { + path: '/helloworld.Greeter/SayHello', + requestStream: false, + responseStream: false, + requestType: helloworld_pb.HelloRequest, + responseType: helloworld_pb.HelloReply, + requestSerialize: serialize_HelloRequest, + requestDeserialize: deserialize_HelloRequest, + responseSerialize: serialize_HelloReply, + responseDeserialize: deserialize_HelloReply, + }, +}; + +exports.GreeterClient = grpc.makeGenericClientConstructor(GreeterService); diff --git a/examples/node/static_codegen/helloworld_pb.js b/examples/node/static_codegen/helloworld_pb.js new file mode 100644 index 00000000000..6405bd90f10 --- /dev/null +++ b/examples/node/static_codegen/helloworld_pb.js @@ -0,0 +1,332 @@ +/** + * @fileoverview + * @enhanceable + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.helloworld.HelloReply', null, global); +goog.exportSymbol('proto.helloworld.HelloRequest', null, global); + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.helloworld.HelloRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.helloworld.HelloRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.helloworld.HelloRequest.displayName = 'proto.helloworld.HelloRequest'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.helloworld.HelloRequest.prototype.toObject = function(opt_includeInstance) { + return proto.helloworld.HelloRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.helloworld.HelloRequest} msg The msg instance to transform. + * @return {!Object} + */ +proto.helloworld.HelloRequest.toObject = function(includeInstance, msg) { + var f, obj = { + name: msg.getName() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.helloworld.HelloRequest} + */ +proto.helloworld.HelloRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.helloworld.HelloRequest; + return proto.helloworld.HelloRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.helloworld.HelloRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.helloworld.HelloRequest} + */ +proto.helloworld.HelloRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Class method variant: serializes the given message to binary data + * (in protobuf wire format), writing to the given BinaryWriter. + * @param {!proto.helloworld.HelloRequest} message + * @param {!jspb.BinaryWriter} writer + */ +proto.helloworld.HelloRequest.serializeBinaryToWriter = function(message, writer) { + message.serializeBinaryToWriter(writer); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.helloworld.HelloRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + this.serializeBinaryToWriter(writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format), + * writing to the given BinaryWriter. + * @param {!jspb.BinaryWriter} writer + */ +proto.helloworld.HelloRequest.prototype.serializeBinaryToWriter = function (writer) { + var f = undefined; + f = this.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * Creates a deep clone of this proto. No data is shared with the original. + * @return {!proto.helloworld.HelloRequest} The clone. + */ +proto.helloworld.HelloRequest.prototype.cloneMessage = function() { + return /** @type {!proto.helloworld.HelloRequest} */ (jspb.Message.cloneMessage(this)); +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.helloworld.HelloRequest.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, "")); +}; + + +/** @param {string} value */ +proto.helloworld.HelloRequest.prototype.setName = function(value) { + jspb.Message.setField(this, 1, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.helloworld.HelloReply = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.helloworld.HelloReply, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.helloworld.HelloReply.displayName = 'proto.helloworld.HelloReply'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.helloworld.HelloReply.prototype.toObject = function(opt_includeInstance) { + return proto.helloworld.HelloReply.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.helloworld.HelloReply} msg The msg instance to transform. + * @return {!Object} + */ +proto.helloworld.HelloReply.toObject = function(includeInstance, msg) { + var f, obj = { + message: msg.getMessage() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.helloworld.HelloReply} + */ +proto.helloworld.HelloReply.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.helloworld.HelloReply; + return proto.helloworld.HelloReply.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.helloworld.HelloReply} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.helloworld.HelloReply} + */ +proto.helloworld.HelloReply.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Class method variant: serializes the given message to binary data + * (in protobuf wire format), writing to the given BinaryWriter. + * @param {!proto.helloworld.HelloReply} message + * @param {!jspb.BinaryWriter} writer + */ +proto.helloworld.HelloReply.serializeBinaryToWriter = function(message, writer) { + message.serializeBinaryToWriter(writer); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.helloworld.HelloReply.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + this.serializeBinaryToWriter(writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format), + * writing to the given BinaryWriter. + * @param {!jspb.BinaryWriter} writer + */ +proto.helloworld.HelloReply.prototype.serializeBinaryToWriter = function (writer) { + var f = undefined; + f = this.getMessage(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * Creates a deep clone of this proto. No data is shared with the original. + * @return {!proto.helloworld.HelloReply} The clone. + */ +proto.helloworld.HelloReply.prototype.cloneMessage = function() { + return /** @type {!proto.helloworld.HelloReply} */ (jspb.Message.cloneMessage(this)); +}; + + +/** + * optional string message = 1; + * @return {string} + */ +proto.helloworld.HelloReply.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, "")); +}; + + +/** @param {string} value */ +proto.helloworld.HelloReply.prototype.setMessage = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +goog.object.extend(exports, proto.helloworld); diff --git a/examples/node/static_codegen/route_guide/README.md b/examples/node/static_codegen/route_guide/README.md new file mode 100644 index 00000000000..22bcf789863 --- /dev/null +++ b/examples/node/static_codegen/route_guide/README.md @@ -0,0 +1,5 @@ +#gRPC Basics: Node.js sample code + +The files in this folder are the samples used in [gRPC Basics: Node.js][], a detailed tutorial for using gRPC in Node.js. + +[gRPC Basics: Node.js]:http://www.grpc.io/docs/tutorials/basic/node.html diff --git a/examples/node/static_codegen/route_guide/route_guide_client.js b/examples/node/static_codegen/route_guide/route_guide_client.js new file mode 100644 index 00000000000..ecde78616b5 --- /dev/null +++ b/examples/node/static_codegen/route_guide/route_guide_client.js @@ -0,0 +1,247 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +var messages = require('./route_guide_pb'); +var services = require('./route_guide_grpc_pb'); + +var async = require('async'); +var fs = require('fs'); +var parseArgs = require('minimist'); +var path = require('path'); +var _ = require('lodash'); +var grpc = require('grpc'); + +var client = new services.RouteGuideClient('localhost:50051', + grpc.credentials.createInsecure()); + +var COORD_FACTOR = 1e7; + +/** + * Run the getFeature demo. Calls getFeature with a point known to have a + * feature and a point known not to have a feature. + * @param {function} callback Called when this demo is complete + */ +function runGetFeature(callback) { + var next = _.after(2, callback); + function featureCallback(error, feature) { + if (error) { + callback(error); + } + var latitude = feature.getLocation().getLatitude(); + var longitude = feature.getLocation().getLongitude(); + if (feature.getName() === '') { + console.log('Found no feature at ' + + latitude/COORD_FACTOR + ', ' + longitude/COORD_FACTOR); + } else { + console.log('Found feature called "' + feature.getName() + '" at ' + + latitude/COORD_FACTOR + ', ' + longitude/COORD_FACTOR); + } + next(); + } + var point1 = new messages.Point(); + point1.setLatitude(409146138); + point1.setLongitude(-746188906); + var point2 = new messages.Point(); + point2.setLatitude(0); + point2.setLongitude(0); + client.getFeature(point1, featureCallback); + client.getFeature(point2, featureCallback); +} + +/** + * Run the listFeatures demo. Calls listFeatures with a rectangle containing all + * of the features in the pre-generated database. Prints each response as it + * comes in. + * @param {function} callback Called when this demo is complete + */ +function runListFeatures(callback) { + var rect = new messages.Rectangle(); + var lo = new messages.Point(); + lo.setLatitude(400000000); + lo.setLongitude(-750000000); + rect.setLo(lo); + var hi = new messages.Point(); + hi.setLatitude(420000000); + hi.setLongitude(-730000000); + rect.setHi(hi); + console.log('Looking for features between 40, -75 and 42, -73'); + var call = client.listFeatures(rect); + call.on('data', function(feature) { + console.log('Found feature called "' + feature.getName() + '" at ' + + feature.getLocation().getLatitude()/COORD_FACTOR + ', ' + + feature.getLocation().getLongitude()/COORD_FACTOR); + }); + call.on('end', callback); +} + +/** + * Run the recordRoute demo. Sends several randomly chosen points from the + * pre-generated feature database with a variable delay in between. Prints the + * statistics when they are sent from the server. + * @param {function} callback Called when this demo is complete + */ +function runRecordRoute(callback) { + var argv = parseArgs(process.argv, { + string: 'db_path' + }); + fs.readFile(path.resolve(argv.db_path), function(err, data) { + if (err) callback(err); + // Transform the loaded features to Feature objects + var feature_list = _.map(JSON.parse(data), function(value) { + var feature = new messages.Feature(); + feature.setName(value.name); + var location = new messages.Point(); + location.setLatitude(value.location.latitude); + location.setLongitude(value.location.longitude); + feature.setLocation(location); + return feature; + }); + + var num_points = 10; + var call = client.recordRoute(function(error, stats) { + if (error) { + callback(error); + } + console.log('Finished trip with', stats.getPointCount(), 'points'); + console.log('Passed', stats.getFeatureCount(), 'features'); + console.log('Travelled', stats.getDistance(), 'meters'); + console.log('It took', stats.getElapsedTime(), 'seconds'); + callback(); + }); + /** + * Constructs a function that asynchronously sends the given point and then + * delays sending its callback + * @param {messages.Point} location The point to send + * @return {function(function)} The function that sends the point + */ + function pointSender(location) { + /** + * Sends the point, then calls the callback after a delay + * @param {function} callback Called when complete + */ + return function(callback) { + console.log('Visiting point ' + location.getLatitude()/COORD_FACTOR + + ', ' + location.getLongitude()/COORD_FACTOR); + call.write(location); + _.delay(callback, _.random(500, 1500)); + }; + } + var point_senders = []; + for (var i = 0; i < num_points; i++) { + var rand_point = feature_list[_.random(0, feature_list.length - 1)]; + point_senders[i] = pointSender(rand_point.getLocation()); + } + async.series(point_senders, function() { + call.end(); + }); + }); +} + +/** + * Run the routeChat demo. Send some chat messages, and print any chat messages + * that are sent from the server. + * @param {function} callback Called when the demo is complete + */ +function runRouteChat(callback) { + var call = client.routeChat(); + call.on('data', function(note) { + console.log('Got message "' + note.getMessage() + '" at ' + + note.getLocation().getLatitude() + ', ' + + note.getLocation().getLongitude()); + }); + + call.on('end', callback); + + var notes = [{ + location: { + latitude: 0, + longitude: 0 + }, + message: 'First message' + }, { + location: { + latitude: 0, + longitude: 1 + }, + message: 'Second message' + }, { + location: { + latitude: 1, + longitude: 0 + }, + message: 'Third message' + }, { + location: { + latitude: 0, + longitude: 0 + }, + message: 'Fourth message' + }]; + for (var i = 0; i < notes.length; i++) { + var note = notes[i]; + console.log('Sending message "' + note.message + '" at ' + + note.location.latitude + ', ' + note.location.longitude); + var noteMsg = new messages.RouteNote(); + noteMsg.setMessage(note.message); + var location = new messages.Point(); + location.setLatitude(note.location.latitude); + location.setLongitude(note.location.longitude); + noteMsg.setLocation(location); + call.write(noteMsg); + } + call.end(); +} + +/** + * Run all of the demos in order + */ +function main() { + async.series([ + runGetFeature, + runListFeatures, + runRecordRoute, + runRouteChat + ]); +} + +if (require.main === module) { + main(); +} + +exports.runGetFeature = runGetFeature; + +exports.runListFeatures = runListFeatures; + +exports.runRecordRoute = runRecordRoute; + +exports.runRouteChat = runRouteChat; diff --git a/examples/node/static_codegen/route_guide/route_guide_db.json b/examples/node/static_codegen/route_guide/route_guide_db.json new file mode 100644 index 00000000000..9d6a980ab7d --- /dev/null +++ b/examples/node/static_codegen/route_guide/route_guide_db.json @@ -0,0 +1,601 @@ +[{ + "location": { + "latitude": 407838351, + "longitude": -746143763 + }, + "name": "Patriots Path, Mendham, NJ 07945, USA" +}, { + "location": { + "latitude": 408122808, + "longitude": -743999179 + }, + "name": "101 New Jersey 10, Whippany, NJ 07981, USA" +}, { + "location": { + "latitude": 413628156, + "longitude": -749015468 + }, + "name": "U.S. 6, Shohola, PA 18458, USA" +}, { + "location": { + "latitude": 419999544, + "longitude": -740371136 + }, + "name": "5 Conners Road, Kingston, NY 12401, USA" +}, { + "location": { + "latitude": 414008389, + "longitude": -743951297 + }, + "name": "Mid Hudson Psychiatric Center, New Hampton, NY 10958, USA" +}, { + "location": { + "latitude": 419611318, + "longitude": -746524769 + }, + "name": "287 Flugertown Road, Livingston Manor, NY 12758, USA" +}, { + "location": { + "latitude": 406109563, + "longitude": -742186778 + }, + "name": "4001 Tremley Point Road, Linden, NJ 07036, USA" +}, { + "location": { + "latitude": 416802456, + "longitude": -742370183 + }, + "name": "352 South Mountain Road, Wallkill, NY 12589, USA" +}, { + "location": { + "latitude": 412950425, + "longitude": -741077389 + }, + "name": "Bailey Turn Road, Harriman, NY 10926, USA" +}, { + "location": { + "latitude": 412144655, + "longitude": -743949739 + }, + "name": "193-199 Wawayanda Road, Hewitt, NJ 07421, USA" +}, { + "location": { + "latitude": 415736605, + "longitude": -742847522 + }, + "name": "406-496 Ward Avenue, Pine Bush, NY 12566, USA" +}, { + "location": { + "latitude": 413843930, + "longitude": -740501726 + }, + "name": "162 Merrill Road, Highland Mills, NY 10930, USA" +}, { + "location": { + "latitude": 410873075, + "longitude": -744459023 + }, + "name": "Clinton Road, West Milford, NJ 07480, USA" +}, { + "location": { + "latitude": 412346009, + "longitude": -744026814 + }, + "name": "16 Old Brook Lane, Warwick, NY 10990, USA" +}, { + "location": { + "latitude": 402948455, + "longitude": -747903913 + }, + "name": "3 Drake Lane, Pennington, NJ 08534, USA" +}, { + "location": { + "latitude": 406337092, + "longitude": -740122226 + }, + "name": "6324 8th Avenue, Brooklyn, NY 11220, USA" +}, { + "location": { + "latitude": 406421967, + "longitude": -747727624 + }, + "name": "1 Merck Access Road, Whitehouse Station, NJ 08889, USA" +}, { + "location": { + "latitude": 416318082, + "longitude": -749677716 + }, + "name": "78-98 Schalck Road, Narrowsburg, NY 12764, USA" +}, { + "location": { + "latitude": 415301720, + "longitude": -748416257 + }, + "name": "282 Lakeview Drive Road, Highland Lake, NY 12743, USA" +}, { + "location": { + "latitude": 402647019, + "longitude": -747071791 + }, + "name": "330 Evelyn Avenue, Hamilton Township, NJ 08619, USA" +}, { + "location": { + "latitude": 412567807, + "longitude": -741058078 + }, + "name": "New York State Reference Route 987E, Southfields, NY 10975, USA" +}, { + "location": { + "latitude": 416855156, + "longitude": -744420597 + }, + "name": "103-271 Tempaloni Road, Ellenville, NY 12428, USA" +}, { + "location": { + "latitude": 404663628, + "longitude": -744820157 + }, + "name": "1300 Airport Road, North Brunswick Township, NJ 08902, USA" +}, { + "location": { + "latitude": 407113723, + "longitude": -749746483 + }, + "name": "" +}, { + "location": { + "latitude": 402133926, + "longitude": -743613249 + }, + "name": "" +}, { + "location": { + "latitude": 400273442, + "longitude": -741220915 + }, + "name": "" +}, { + "location": { + "latitude": 411236786, + "longitude": -744070769 + }, + "name": "" +}, { + "location": { + "latitude": 411633782, + "longitude": -746784970 + }, + "name": "211-225 Plains Road, Augusta, NJ 07822, USA" +}, { + "location": { + "latitude": 415830701, + "longitude": -742952812 + }, + "name": "" +}, { + "location": { + "latitude": 413447164, + "longitude": -748712898 + }, + "name": "165 Pedersen Ridge Road, Milford, PA 18337, USA" +}, { + "location": { + "latitude": 405047245, + "longitude": -749800722 + }, + "name": "100-122 Locktown Road, Frenchtown, NJ 08825, USA" +}, { + "location": { + "latitude": 418858923, + "longitude": -746156790 + }, + "name": "" +}, { + "location": { + "latitude": 417951888, + "longitude": -748484944 + }, + "name": "650-652 Willi Hill Road, Swan Lake, NY 12783, USA" +}, { + "location": { + "latitude": 407033786, + "longitude": -743977337 + }, + "name": "26 East 3rd Street, New Providence, NJ 07974, USA" +}, { + "location": { + "latitude": 417548014, + "longitude": -740075041 + }, + "name": "" +}, { + "location": { + "latitude": 410395868, + "longitude": -744972325 + }, + "name": "" +}, { + "location": { + "latitude": 404615353, + "longitude": -745129803 + }, + "name": "" +}, { + "location": { + "latitude": 406589790, + "longitude": -743560121 + }, + "name": "611 Lawrence Avenue, Westfield, NJ 07090, USA" +}, { + "location": { + "latitude": 414653148, + "longitude": -740477477 + }, + "name": "18 Lannis Avenue, New Windsor, NY 12553, USA" +}, { + "location": { + "latitude": 405957808, + "longitude": -743255336 + }, + "name": "82-104 Amherst Avenue, Colonia, NJ 07067, USA" +}, { + "location": { + "latitude": 411733589, + "longitude": -741648093 + }, + "name": "170 Seven Lakes Drive, Sloatsburg, NY 10974, USA" +}, { + "location": { + "latitude": 412676291, + "longitude": -742606606 + }, + "name": "1270 Lakes Road, Monroe, NY 10950, USA" +}, { + "location": { + "latitude": 409224445, + "longitude": -748286738 + }, + "name": "509-535 Alphano Road, Great Meadows, NJ 07838, USA" +}, { + "location": { + "latitude": 406523420, + "longitude": -742135517 + }, + "name": "652 Garden Street, Elizabeth, NJ 07202, USA" +}, { + "location": { + "latitude": 401827388, + "longitude": -740294537 + }, + "name": "349 Sea Spray Court, Neptune City, NJ 07753, USA" +}, { + "location": { + "latitude": 410564152, + "longitude": -743685054 + }, + "name": "13-17 Stanley Street, West Milford, NJ 07480, USA" +}, { + "location": { + "latitude": 408472324, + "longitude": -740726046 + }, + "name": "47 Industrial Avenue, Teterboro, NJ 07608, USA" +}, { + "location": { + "latitude": 412452168, + "longitude": -740214052 + }, + "name": "5 White Oak Lane, Stony Point, NY 10980, USA" +}, { + "location": { + "latitude": 409146138, + "longitude": -746188906 + }, + "name": "Berkshire Valley Management Area Trail, Jefferson, NJ, USA" +}, { + "location": { + "latitude": 404701380, + "longitude": -744781745 + }, + "name": "1007 Jersey Avenue, New Brunswick, NJ 08901, USA" +}, { + "location": { + "latitude": 409642566, + "longitude": -746017679 + }, + "name": "6 East Emerald Isle Drive, Lake Hopatcong, NJ 07849, USA" +}, { + "location": { + "latitude": 408031728, + "longitude": -748645385 + }, + "name": "1358-1474 New Jersey 57, Port Murray, NJ 07865, USA" +}, { + "location": { + "latitude": 413700272, + "longitude": -742135189 + }, + "name": "367 Prospect Road, Chester, NY 10918, USA" +}, { + "location": { + "latitude": 404310607, + "longitude": -740282632 + }, + "name": "10 Simon Lake Drive, Atlantic Highlands, NJ 07716, USA" +}, { + "location": { + "latitude": 409319800, + "longitude": -746201391 + }, + "name": "11 Ward Street, Mount Arlington, NJ 07856, USA" +}, { + "location": { + "latitude": 406685311, + "longitude": -742108603 + }, + "name": "300-398 Jefferson Avenue, Elizabeth, NJ 07201, USA" +}, { + "location": { + "latitude": 419018117, + "longitude": -749142781 + }, + "name": "43 Dreher Road, Roscoe, NY 12776, USA" +}, { + "location": { + "latitude": 412856162, + "longitude": -745148837 + }, + "name": "Swan Street, Pine Island, NY 10969, USA" +}, { + "location": { + "latitude": 416560744, + "longitude": -746721964 + }, + "name": "66 Pleasantview Avenue, Monticello, NY 12701, USA" +}, { + "location": { + "latitude": 405314270, + "longitude": -749836354 + }, + "name": "" +}, { + "location": { + "latitude": 414219548, + "longitude": -743327440 + }, + "name": "" +}, { + "location": { + "latitude": 415534177, + "longitude": -742900616 + }, + "name": "565 Winding Hills Road, Montgomery, NY 12549, USA" +}, { + "location": { + "latitude": 406898530, + "longitude": -749127080 + }, + "name": "231 Rocky Run Road, Glen Gardner, NJ 08826, USA" +}, { + "location": { + "latitude": 407586880, + "longitude": -741670168 + }, + "name": "100 Mount Pleasant Avenue, Newark, NJ 07104, USA" +}, { + "location": { + "latitude": 400106455, + "longitude": -742870190 + }, + "name": "517-521 Huntington Drive, Manchester Township, NJ 08759, USA" +}, { + "location": { + "latitude": 400066188, + "longitude": -746793294 + }, + "name": "" +}, { + "location": { + "latitude": 418803880, + "longitude": -744102673 + }, + "name": "40 Mountain Road, Napanoch, NY 12458, USA" +}, { + "location": { + "latitude": 414204288, + "longitude": -747895140 + }, + "name": "" +}, { + "location": { + "latitude": 414777405, + "longitude": -740615601 + }, + "name": "" +}, { + "location": { + "latitude": 415464475, + "longitude": -747175374 + }, + "name": "48 North Road, Forestburgh, NY 12777, USA" +}, { + "location": { + "latitude": 404062378, + "longitude": -746376177 + }, + "name": "" +}, { + "location": { + "latitude": 405688272, + "longitude": -749285130 + }, + "name": "" +}, { + "location": { + "latitude": 400342070, + "longitude": -748788996 + }, + "name": "" +}, { + "location": { + "latitude": 401809022, + "longitude": -744157964 + }, + "name": "" +}, { + "location": { + "latitude": 404226644, + "longitude": -740517141 + }, + "name": "9 Thompson Avenue, Leonardo, NJ 07737, USA" +}, { + "location": { + "latitude": 410322033, + "longitude": -747871659 + }, + "name": "" +}, { + "location": { + "latitude": 407100674, + "longitude": -747742727 + }, + "name": "" +}, { + "location": { + "latitude": 418811433, + "longitude": -741718005 + }, + "name": "213 Bush Road, Stone Ridge, NY 12484, USA" +}, { + "location": { + "latitude": 415034302, + "longitude": -743850945 + }, + "name": "" +}, { + "location": { + "latitude": 411349992, + "longitude": -743694161 + }, + "name": "" +}, { + "location": { + "latitude": 404839914, + "longitude": -744759616 + }, + "name": "1-17 Bergen Court, New Brunswick, NJ 08901, USA" +}, { + "location": { + "latitude": 414638017, + "longitude": -745957854 + }, + "name": "35 Oakland Valley Road, Cuddebackville, NY 12729, USA" +}, { + "location": { + "latitude": 412127800, + "longitude": -740173578 + }, + "name": "" +}, { + "location": { + "latitude": 401263460, + "longitude": -747964303 + }, + "name": "" +}, { + "location": { + "latitude": 412843391, + "longitude": -749086026 + }, + "name": "" +}, { + "location": { + "latitude": 418512773, + "longitude": -743067823 + }, + "name": "" +}, { + "location": { + "latitude": 404318328, + "longitude": -740835638 + }, + "name": "42-102 Main Street, Belford, NJ 07718, USA" +}, { + "location": { + "latitude": 419020746, + "longitude": -741172328 + }, + "name": "" +}, { + "location": { + "latitude": 404080723, + "longitude": -746119569 + }, + "name": "" +}, { + "location": { + "latitude": 401012643, + "longitude": -744035134 + }, + "name": "" +}, { + "location": { + "latitude": 404306372, + "longitude": -741079661 + }, + "name": "" +}, { + "location": { + "latitude": 403966326, + "longitude": -748519297 + }, + "name": "" +}, { + "location": { + "latitude": 405002031, + "longitude": -748407866 + }, + "name": "" +}, { + "location": { + "latitude": 409532885, + "longitude": -742200683 + }, + "name": "" +}, { + "location": { + "latitude": 416851321, + "longitude": -742674555 + }, + "name": "" +}, { + "location": { + "latitude": 406411633, + "longitude": -741722051 + }, + "name": "3387 Richmond Terrace, Staten Island, NY 10303, USA" +}, { + "location": { + "latitude": 413069058, + "longitude": -744597778 + }, + "name": "261 Van Sickle Road, Goshen, NY 10924, USA" +}, { + "location": { + "latitude": 418465462, + "longitude": -746859398 + }, + "name": "" +}, { + "location": { + "latitude": 411733222, + "longitude": -744228360 + }, + "name": "" +}, { + "location": { + "latitude": 410248224, + "longitude": -747127767 + }, + "name": "3 Hasta Way, Newton, NJ 07860, USA" +}] diff --git a/examples/node/static_codegen/route_guide/route_guide_grpc_pb.js b/examples/node/static_codegen/route_guide/route_guide_grpc_pb.js new file mode 100644 index 00000000000..1dd71331dbd --- /dev/null +++ b/examples/node/static_codegen/route_guide/route_guide_grpc_pb.js @@ -0,0 +1,110 @@ +// GENERATED CODE -- DO NOT EDIT! + +'use strict'; +var grpc = require('grpc'); +var route_guide_pb = require('./route_guide_pb.js'); + +function serialize_Feature(arg) { + if (!(arg instanceof route_guide_pb.Feature)) { + throw new Error('Expected argument of type Feature'); + } + return new Buffer(arg.serializeBinary()); +} + +function deserialize_Feature(buffer_arg) { + return route_guide_pb.Feature.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_Point(arg) { + if (!(arg instanceof route_guide_pb.Point)) { + throw new Error('Expected argument of type Point'); + } + return new Buffer(arg.serializeBinary()); +} + +function deserialize_Point(buffer_arg) { + return route_guide_pb.Point.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_Rectangle(arg) { + if (!(arg instanceof route_guide_pb.Rectangle)) { + throw new Error('Expected argument of type Rectangle'); + } + return new Buffer(arg.serializeBinary()); +} + +function deserialize_Rectangle(buffer_arg) { + return route_guide_pb.Rectangle.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_RouteNote(arg) { + if (!(arg instanceof route_guide_pb.RouteNote)) { + throw new Error('Expected argument of type RouteNote'); + } + return new Buffer(arg.serializeBinary()); +} + +function deserialize_RouteNote(buffer_arg) { + return route_guide_pb.RouteNote.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_RouteSummary(arg) { + if (!(arg instanceof route_guide_pb.RouteSummary)) { + throw new Error('Expected argument of type RouteSummary'); + } + return new Buffer(arg.serializeBinary()); +} + +function deserialize_RouteSummary(buffer_arg) { + return route_guide_pb.RouteSummary.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var RouteGuideService = exports.RouteGuideService = { + getFeature: { + path: '/routeguide.RouteGuide/GetFeature', + requestStream: false, + responseStream: false, + requestType: route_guide_pb.Point, + responseType: route_guide_pb.Feature, + requestSerialize: serialize_Point, + requestDeserialize: deserialize_Point, + responseSerialize: serialize_Feature, + responseDeserialize: deserialize_Feature, + }, + listFeatures: { + path: '/routeguide.RouteGuide/ListFeatures', + requestStream: false, + responseStream: true, + requestType: route_guide_pb.Rectangle, + responseType: route_guide_pb.Feature, + requestSerialize: serialize_Rectangle, + requestDeserialize: deserialize_Rectangle, + responseSerialize: serialize_Feature, + responseDeserialize: deserialize_Feature, + }, + recordRoute: { + path: '/routeguide.RouteGuide/RecordRoute', + requestStream: true, + responseStream: false, + requestType: route_guide_pb.Point, + responseType: route_guide_pb.RouteSummary, + requestSerialize: serialize_Point, + requestDeserialize: deserialize_Point, + responseSerialize: serialize_RouteSummary, + responseDeserialize: deserialize_RouteSummary, + }, + routeChat: { + path: '/routeguide.RouteGuide/RouteChat', + requestStream: true, + responseStream: true, + requestType: route_guide_pb.RouteNote, + responseType: route_guide_pb.RouteNote, + requestSerialize: serialize_RouteNote, + requestDeserialize: deserialize_RouteNote, + responseSerialize: serialize_RouteNote, + responseDeserialize: deserialize_RouteNote, + }, +}; + +exports.RouteGuideClient = grpc.makeGenericClientConstructor(RouteGuideService); diff --git a/examples/node/static_codegen/route_guide/route_guide_pb.js b/examples/node/static_codegen/route_guide/route_guide_pb.js new file mode 100644 index 00000000000..f604cd6d508 --- /dev/null +++ b/examples/node/static_codegen/route_guide/route_guide_pb.js @@ -0,0 +1,1033 @@ +/** + * @fileoverview + * @enhanceable + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.routeguide.Feature', null, global); +goog.exportSymbol('proto.routeguide.Point', null, global); +goog.exportSymbol('proto.routeguide.Rectangle', null, global); +goog.exportSymbol('proto.routeguide.RouteNote', null, global); +goog.exportSymbol('proto.routeguide.RouteSummary', null, global); + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.routeguide.Point = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routeguide.Point, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routeguide.Point.displayName = 'proto.routeguide.Point'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.routeguide.Point.prototype.toObject = function(opt_includeInstance) { + return proto.routeguide.Point.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.routeguide.Point} msg The msg instance to transform. + * @return {!Object} + */ +proto.routeguide.Point.toObject = function(includeInstance, msg) { + var f, obj = { + latitude: msg.getLatitude(), + longitude: msg.getLongitude() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.routeguide.Point} + */ +proto.routeguide.Point.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routeguide.Point; + return proto.routeguide.Point.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routeguide.Point} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routeguide.Point} + */ +proto.routeguide.Point.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setLatitude(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setLongitude(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Class method variant: serializes the given message to binary data + * (in protobuf wire format), writing to the given BinaryWriter. + * @param {!proto.routeguide.Point} message + * @param {!jspb.BinaryWriter} writer + */ +proto.routeguide.Point.serializeBinaryToWriter = function(message, writer) { + message.serializeBinaryToWriter(writer); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routeguide.Point.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + this.serializeBinaryToWriter(writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format), + * writing to the given BinaryWriter. + * @param {!jspb.BinaryWriter} writer + */ +proto.routeguide.Point.prototype.serializeBinaryToWriter = function (writer) { + var f = undefined; + f = this.getLatitude(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = this.getLongitude(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } +}; + + +/** + * Creates a deep clone of this proto. No data is shared with the original. + * @return {!proto.routeguide.Point} The clone. + */ +proto.routeguide.Point.prototype.cloneMessage = function() { + return /** @type {!proto.routeguide.Point} */ (jspb.Message.cloneMessage(this)); +}; + + +/** + * optional int32 latitude = 1; + * @return {number} + */ +proto.routeguide.Point.prototype.getLatitude = function() { + return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.routeguide.Point.prototype.setLatitude = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int32 longitude = 2; + * @return {number} + */ +proto.routeguide.Point.prototype.getLongitude = function() { + return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.routeguide.Point.prototype.setLongitude = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.routeguide.Rectangle = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routeguide.Rectangle, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routeguide.Rectangle.displayName = 'proto.routeguide.Rectangle'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.routeguide.Rectangle.prototype.toObject = function(opt_includeInstance) { + return proto.routeguide.Rectangle.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.routeguide.Rectangle} msg The msg instance to transform. + * @return {!Object} + */ +proto.routeguide.Rectangle.toObject = function(includeInstance, msg) { + var f, obj = { + lo: (f = msg.getLo()) && proto.routeguide.Point.toObject(includeInstance, f), + hi: (f = msg.getHi()) && proto.routeguide.Point.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.routeguide.Rectangle} + */ +proto.routeguide.Rectangle.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routeguide.Rectangle; + return proto.routeguide.Rectangle.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routeguide.Rectangle} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routeguide.Rectangle} + */ +proto.routeguide.Rectangle.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.routeguide.Point; + reader.readMessage(value,proto.routeguide.Point.deserializeBinaryFromReader); + msg.setLo(value); + break; + case 2: + var value = new proto.routeguide.Point; + reader.readMessage(value,proto.routeguide.Point.deserializeBinaryFromReader); + msg.setHi(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Class method variant: serializes the given message to binary data + * (in protobuf wire format), writing to the given BinaryWriter. + * @param {!proto.routeguide.Rectangle} message + * @param {!jspb.BinaryWriter} writer + */ +proto.routeguide.Rectangle.serializeBinaryToWriter = function(message, writer) { + message.serializeBinaryToWriter(writer); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routeguide.Rectangle.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + this.serializeBinaryToWriter(writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format), + * writing to the given BinaryWriter. + * @param {!jspb.BinaryWriter} writer + */ +proto.routeguide.Rectangle.prototype.serializeBinaryToWriter = function (writer) { + var f = undefined; + f = this.getLo(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.routeguide.Point.serializeBinaryToWriter + ); + } + f = this.getHi(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.routeguide.Point.serializeBinaryToWriter + ); + } +}; + + +/** + * Creates a deep clone of this proto. No data is shared with the original. + * @return {!proto.routeguide.Rectangle} The clone. + */ +proto.routeguide.Rectangle.prototype.cloneMessage = function() { + return /** @type {!proto.routeguide.Rectangle} */ (jspb.Message.cloneMessage(this)); +}; + + +/** + * optional Point lo = 1; + * @return {proto.routeguide.Point} + */ +proto.routeguide.Rectangle.prototype.getLo = function() { + return /** @type{proto.routeguide.Point} */ ( + jspb.Message.getWrapperField(this, proto.routeguide.Point, 1)); +}; + + +/** @param {proto.routeguide.Point|undefined} value */ +proto.routeguide.Rectangle.prototype.setLo = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.routeguide.Rectangle.prototype.clearLo = function() { + this.setLo(undefined); +}; + + +/** + * optional Point hi = 2; + * @return {proto.routeguide.Point} + */ +proto.routeguide.Rectangle.prototype.getHi = function() { + return /** @type{proto.routeguide.Point} */ ( + jspb.Message.getWrapperField(this, proto.routeguide.Point, 2)); +}; + + +/** @param {proto.routeguide.Point|undefined} value */ +proto.routeguide.Rectangle.prototype.setHi = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.routeguide.Rectangle.prototype.clearHi = function() { + this.setHi(undefined); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.routeguide.Feature = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routeguide.Feature, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routeguide.Feature.displayName = 'proto.routeguide.Feature'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.routeguide.Feature.prototype.toObject = function(opt_includeInstance) { + return proto.routeguide.Feature.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.routeguide.Feature} msg The msg instance to transform. + * @return {!Object} + */ +proto.routeguide.Feature.toObject = function(includeInstance, msg) { + var f, obj = { + name: msg.getName(), + location: (f = msg.getLocation()) && proto.routeguide.Point.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.routeguide.Feature} + */ +proto.routeguide.Feature.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routeguide.Feature; + return proto.routeguide.Feature.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routeguide.Feature} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routeguide.Feature} + */ +proto.routeguide.Feature.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 2: + var value = new proto.routeguide.Point; + reader.readMessage(value,proto.routeguide.Point.deserializeBinaryFromReader); + msg.setLocation(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Class method variant: serializes the given message to binary data + * (in protobuf wire format), writing to the given BinaryWriter. + * @param {!proto.routeguide.Feature} message + * @param {!jspb.BinaryWriter} writer + */ +proto.routeguide.Feature.serializeBinaryToWriter = function(message, writer) { + message.serializeBinaryToWriter(writer); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routeguide.Feature.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + this.serializeBinaryToWriter(writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format), + * writing to the given BinaryWriter. + * @param {!jspb.BinaryWriter} writer + */ +proto.routeguide.Feature.prototype.serializeBinaryToWriter = function (writer) { + var f = undefined; + f = this.getName(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = this.getLocation(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.routeguide.Point.serializeBinaryToWriter + ); + } +}; + + +/** + * Creates a deep clone of this proto. No data is shared with the original. + * @return {!proto.routeguide.Feature} The clone. + */ +proto.routeguide.Feature.prototype.cloneMessage = function() { + return /** @type {!proto.routeguide.Feature} */ (jspb.Message.cloneMessage(this)); +}; + + +/** + * optional string name = 1; + * @return {string} + */ +proto.routeguide.Feature.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, "")); +}; + + +/** @param {string} value */ +proto.routeguide.Feature.prototype.setName = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional Point location = 2; + * @return {proto.routeguide.Point} + */ +proto.routeguide.Feature.prototype.getLocation = function() { + return /** @type{proto.routeguide.Point} */ ( + jspb.Message.getWrapperField(this, proto.routeguide.Point, 2)); +}; + + +/** @param {proto.routeguide.Point|undefined} value */ +proto.routeguide.Feature.prototype.setLocation = function(value) { + jspb.Message.setWrapperField(this, 2, value); +}; + + +proto.routeguide.Feature.prototype.clearLocation = function() { + this.setLocation(undefined); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.routeguide.RouteNote = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routeguide.RouteNote, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routeguide.RouteNote.displayName = 'proto.routeguide.RouteNote'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.routeguide.RouteNote.prototype.toObject = function(opt_includeInstance) { + return proto.routeguide.RouteNote.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.routeguide.RouteNote} msg The msg instance to transform. + * @return {!Object} + */ +proto.routeguide.RouteNote.toObject = function(includeInstance, msg) { + var f, obj = { + location: (f = msg.getLocation()) && proto.routeguide.Point.toObject(includeInstance, f), + message: msg.getMessage() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.routeguide.RouteNote} + */ +proto.routeguide.RouteNote.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routeguide.RouteNote; + return proto.routeguide.RouteNote.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routeguide.RouteNote} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routeguide.RouteNote} + */ +proto.routeguide.RouteNote.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.routeguide.Point; + reader.readMessage(value,proto.routeguide.Point.deserializeBinaryFromReader); + msg.setLocation(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setMessage(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Class method variant: serializes the given message to binary data + * (in protobuf wire format), writing to the given BinaryWriter. + * @param {!proto.routeguide.RouteNote} message + * @param {!jspb.BinaryWriter} writer + */ +proto.routeguide.RouteNote.serializeBinaryToWriter = function(message, writer) { + message.serializeBinaryToWriter(writer); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routeguide.RouteNote.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + this.serializeBinaryToWriter(writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format), + * writing to the given BinaryWriter. + * @param {!jspb.BinaryWriter} writer + */ +proto.routeguide.RouteNote.prototype.serializeBinaryToWriter = function (writer) { + var f = undefined; + f = this.getLocation(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.routeguide.Point.serializeBinaryToWriter + ); + } + f = this.getMessage(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * Creates a deep clone of this proto. No data is shared with the original. + * @return {!proto.routeguide.RouteNote} The clone. + */ +proto.routeguide.RouteNote.prototype.cloneMessage = function() { + return /** @type {!proto.routeguide.RouteNote} */ (jspb.Message.cloneMessage(this)); +}; + + +/** + * optional Point location = 1; + * @return {proto.routeguide.Point} + */ +proto.routeguide.RouteNote.prototype.getLocation = function() { + return /** @type{proto.routeguide.Point} */ ( + jspb.Message.getWrapperField(this, proto.routeguide.Point, 1)); +}; + + +/** @param {proto.routeguide.Point|undefined} value */ +proto.routeguide.RouteNote.prototype.setLocation = function(value) { + jspb.Message.setWrapperField(this, 1, value); +}; + + +proto.routeguide.RouteNote.prototype.clearLocation = function() { + this.setLocation(undefined); +}; + + +/** + * optional string message = 2; + * @return {string} + */ +proto.routeguide.RouteNote.prototype.getMessage = function() { + return /** @type {string} */ (jspb.Message.getFieldProto3(this, 2, "")); +}; + + +/** @param {string} value */ +proto.routeguide.RouteNote.prototype.setMessage = function(value) { + jspb.Message.setField(this, 2, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.routeguide.RouteSummary = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.routeguide.RouteSummary, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.routeguide.RouteSummary.displayName = 'proto.routeguide.RouteSummary'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.routeguide.RouteSummary.prototype.toObject = function(opt_includeInstance) { + return proto.routeguide.RouteSummary.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.routeguide.RouteSummary} msg The msg instance to transform. + * @return {!Object} + */ +proto.routeguide.RouteSummary.toObject = function(includeInstance, msg) { + var f, obj = { + pointCount: msg.getPointCount(), + featureCount: msg.getFeatureCount(), + distance: msg.getDistance(), + elapsedTime: msg.getElapsedTime() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.routeguide.RouteSummary} + */ +proto.routeguide.RouteSummary.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.routeguide.RouteSummary; + return proto.routeguide.RouteSummary.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.routeguide.RouteSummary} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.routeguide.RouteSummary} + */ +proto.routeguide.RouteSummary.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt32()); + msg.setPointCount(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt32()); + msg.setFeatureCount(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt32()); + msg.setDistance(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt32()); + msg.setElapsedTime(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Class method variant: serializes the given message to binary data + * (in protobuf wire format), writing to the given BinaryWriter. + * @param {!proto.routeguide.RouteSummary} message + * @param {!jspb.BinaryWriter} writer + */ +proto.routeguide.RouteSummary.serializeBinaryToWriter = function(message, writer) { + message.serializeBinaryToWriter(writer); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.routeguide.RouteSummary.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + this.serializeBinaryToWriter(writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format), + * writing to the given BinaryWriter. + * @param {!jspb.BinaryWriter} writer + */ +proto.routeguide.RouteSummary.prototype.serializeBinaryToWriter = function (writer) { + var f = undefined; + f = this.getPointCount(); + if (f !== 0) { + writer.writeInt32( + 1, + f + ); + } + f = this.getFeatureCount(); + if (f !== 0) { + writer.writeInt32( + 2, + f + ); + } + f = this.getDistance(); + if (f !== 0) { + writer.writeInt32( + 3, + f + ); + } + f = this.getElapsedTime(); + if (f !== 0) { + writer.writeInt32( + 4, + f + ); + } +}; + + +/** + * Creates a deep clone of this proto. No data is shared with the original. + * @return {!proto.routeguide.RouteSummary} The clone. + */ +proto.routeguide.RouteSummary.prototype.cloneMessage = function() { + return /** @type {!proto.routeguide.RouteSummary} */ (jspb.Message.cloneMessage(this)); +}; + + +/** + * optional int32 point_count = 1; + * @return {number} + */ +proto.routeguide.RouteSummary.prototype.getPointCount = function() { + return /** @type {number} */ (jspb.Message.getFieldProto3(this, 1, 0)); +}; + + +/** @param {number} value */ +proto.routeguide.RouteSummary.prototype.setPointCount = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * optional int32 feature_count = 2; + * @return {number} + */ +proto.routeguide.RouteSummary.prototype.getFeatureCount = function() { + return /** @type {number} */ (jspb.Message.getFieldProto3(this, 2, 0)); +}; + + +/** @param {number} value */ +proto.routeguide.RouteSummary.prototype.setFeatureCount = function(value) { + jspb.Message.setField(this, 2, value); +}; + + +/** + * optional int32 distance = 3; + * @return {number} + */ +proto.routeguide.RouteSummary.prototype.getDistance = function() { + return /** @type {number} */ (jspb.Message.getFieldProto3(this, 3, 0)); +}; + + +/** @param {number} value */ +proto.routeguide.RouteSummary.prototype.setDistance = function(value) { + jspb.Message.setField(this, 3, value); +}; + + +/** + * optional int32 elapsed_time = 4; + * @return {number} + */ +proto.routeguide.RouteSummary.prototype.getElapsedTime = function() { + return /** @type {number} */ (jspb.Message.getFieldProto3(this, 4, 0)); +}; + + +/** @param {number} value */ +proto.routeguide.RouteSummary.prototype.setElapsedTime = function(value) { + jspb.Message.setField(this, 4, value); +}; + + +goog.object.extend(exports, proto.routeguide); diff --git a/examples/node/static_codegen/route_guide/route_guide_server.js b/examples/node/static_codegen/route_guide/route_guide_server.js new file mode 100644 index 00000000000..53628fb046f --- /dev/null +++ b/examples/node/static_codegen/route_guide/route_guide_server.js @@ -0,0 +1,261 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +var messages = require('./route_guide_pb'); +var services = require('./route_guide_grpc_pb'); + +var fs = require('fs'); +var parseArgs = require('minimist'); +var path = require('path'); +var _ = require('lodash'); +var grpc = require('grpc'); + +var COORD_FACTOR = 1e7; + +/** + * For simplicity, a point is a record type that looks like + * {latitude: number, longitude: number}, and a feature is a record type that + * looks like {name: string, location: point}. feature objects with name==='' + * are points with no feature. + */ + +/** + * List of feature objects at points that have been requested so far. + */ +var feature_list = []; + +/** + * Get a feature object at the given point, or creates one if it does not exist. + * @param {point} point The point to check + * @return {feature} The feature object at the point. Note that an empty name + * indicates no feature + */ +function checkFeature(point) { + var feature; + // Check if there is already a feature object for the given point + for (var i = 0; i < feature_list.length; i++) { + feature = feature_list[i]; + if (feature.getLocation().getLatitude() === point.getLatitude() && + feature.getLocation().getLongitude() === point.getLongitude()) { + return feature; + } + } + var name = ''; + feature = new messages.Feature(); + feature.setName(name); + feature.setLocation(point); + return feature; +} + +/** + * getFeature request handler. Gets a request with a point, and responds with a + * feature object indicating whether there is a feature at that point. + * @param {EventEmitter} call Call object for the handler to process + * @param {function(Error, feature)} callback Response callback + */ +function getFeature(call, callback) { + callback(null, checkFeature(call.request)); +} + +/** + * listFeatures request handler. Gets a request with two points, and responds + * with a stream of all features in the bounding box defined by those points. + * @param {Writable} call Writable stream for responses with an additional + * request property for the request value. + */ +function listFeatures(call) { + var lo = call.request.getLo(); + var hi = call.request.getHi(); + var left = _.min([lo.getLongitude(), hi.getLongitude()]); + var right = _.max([lo.getLongitude(), hi.getLongitude()]); + var top = _.max([lo.getLatitude(), hi.getLatitude()]); + var bottom = _.min([lo.getLatitude(), hi.getLatitude()]); + // For each feature, check if it is in the given bounding box + _.each(feature_list, function(feature) { + if (feature.getName() === '') { + return; + } + if (feature.getLocation().getLongitude() >= left && + feature.getLocation().getLongitude() <= right && + feature.getLocation().getLatitude() >= bottom && + feature.getLocation().getLatitude() <= top) { + call.write(feature); + } + }); + call.end(); +} + +/** + * Calculate the distance between two points using the "haversine" formula. + * This code was taken from http://www.movable-type.co.uk/scripts/latlong.html. + * @param start The starting point + * @param end The end point + * @return The distance between the points in meters + */ +function getDistance(start, end) { + function toRadians(num) { + return num * Math.PI / 180; + } + var lat1 = start.getLatitude() / COORD_FACTOR; + var lat2 = end.getLatitude() / COORD_FACTOR; + var lon1 = start.getLongitude() / COORD_FACTOR; + var lon2 = end.getLongitude() / COORD_FACTOR; + var R = 6371000; // metres + var φ1 = toRadians(lat1); + var φ2 = toRadians(lat2); + var Δφ = toRadians(lat2-lat1); + var Δλ = toRadians(lon2-lon1); + + var a = Math.sin(Δφ/2) * Math.sin(Δφ/2) + + Math.cos(φ1) * Math.cos(φ2) * + Math.sin(Δλ/2) * Math.sin(Δλ/2); + var c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1-a)); + + return R * c; +} + +/** + * recordRoute handler. Gets a stream of points, and responds with statistics + * about the "trip": number of points, number of known features visited, total + * distance traveled, and total time spent. + * @param {Readable} call The request point stream. + * @param {function(Error, routeSummary)} callback The callback to pass the + * response to + */ +function recordRoute(call, callback) { + var point_count = 0; + var feature_count = 0; + var distance = 0; + var previous = null; + // Start a timer + var start_time = process.hrtime(); + call.on('data', function(point) { + point_count += 1; + if (checkFeature(point).name !== '') { + feature_count += 1; + } + /* For each point after the first, add the incremental distance from the + * previous point to the total distance value */ + if (previous != null) { + distance += getDistance(previous, point); + } + previous = point; + }); + call.on('end', function() { + var summary = new messages.RouteSummary(); + summary.setPointCount(point_count); + summary.setFeatureCount(feature_count); + // Cast the distance to an integer + summary.setDistance(distance|0); + // End the timer + summary.setElapsedTime(process.hrtime(start_time)[0]); + callback(null, summary); + }); +} + +var route_notes = {}; + +/** + * Turn the point into a dictionary key. + * @param {point} point The point to use + * @return {string} The key for an object + */ +function pointKey(point) { + return point.getLatitude() + ' ' + point.getLongitude(); +} + +/** + * routeChat handler. Receives a stream of message/location pairs, and responds + * with a stream of all previous messages at each of those locations. + * @param {Duplex} call The stream for incoming and outgoing messages + */ +function routeChat(call) { + call.on('data', function(note) { + var key = pointKey(note.getLocation()); + /* For each note sent, respond with all previous notes that correspond to + * the same point */ + if (route_notes.hasOwnProperty(key)) { + _.each(route_notes[key], function(note) { + call.write(note); + }); + } else { + route_notes[key] = []; + } + // Then add the new note to the list + route_notes[key].push(note); + }); + call.on('end', function() { + call.end(); + }); +} + +/** + * Get a new server with the handler functions in this file bound to the methods + * it serves. + * @return {Server} The new server object + */ +function getServer() { + var server = new grpc.Server(); + server.addService(services.RouteGuideService, { + getFeature: getFeature, + listFeatures: listFeatures, + recordRoute: recordRoute, + routeChat: routeChat + }); + return server; +} + +if (require.main === module) { + // If this is run as a script, start a server on an unused port + var routeServer = getServer(); + routeServer.bind('0.0.0.0:50051', grpc.ServerCredentials.createInsecure()); + var argv = parseArgs(process.argv, { + string: 'db_path' + }); + fs.readFile(path.resolve(argv.db_path), function(err, data) { + if (err) throw err; + // Transform the loaded features to Feature objects + feature_list = _.map(JSON.parse(data), function(value) { + var feature = new messages.Feature(); + feature.setName(value.name); + var location = new messages.Point(); + location.setLatitude(value.location.latitude); + location.setLongitude(value.location.longitude); + feature.setLocation(location); + return feature; + }); + routeServer.start(); + }); +} + +exports.getServer = getServer; From 1da105e932e2f6f4d7f5f6c546ef975360473e80 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 5 May 2016 10:25:34 -0700 Subject: [PATCH 0386/1894] Improved description of examples bifurcation --- examples/node/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/node/README.md b/examples/node/README.md index 14d779416ae..59fb4a17f59 100644 --- a/examples/node/README.md +++ b/examples/node/README.md @@ -22,7 +22,7 @@ INSTALL TRY IT! ------- -There are two variants of these examples: one with code dynamically generated at runtime using Protobuf.js and one with code statically generated using `protoc`. The examples behave identically, and either server can be used with either client. +There are two ways to generate the code needed to work with protocol buffers in Node.js - one approach uses [Protobuf.js](https://github.com/dcodeIO/ProtoBuf.js/) to dynamically generate the code at runtime, the other uses code statically generated using the protocol buffer compiler `protoc`. The examples behave identically, and either server can be used with either client. - Run the server From 461233770f2aafe3188efefcfff7deecee3e441b Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 9 May 2016 15:28:42 -0700 Subject: [PATCH 0387/1894] grpc-accept-encoding checks --- src/core/lib/channel/compress_filter.c | 6 +++--- src/core/lib/channel/compress_filter.h | 2 +- src/core/lib/surface/call.c | 23 ++++++++++++++++++++++- src/core/lib/surface/init.c | 2 +- 4 files changed, 27 insertions(+), 6 deletions(-) diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 5510c79b183..e18bce7e567 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -47,7 +47,7 @@ #include "src/core/lib/support/string.h" #include "src/core/lib/transport/static_metadata.h" -int grpc_compress_filter_trace = 0; +int grpc_compression_trace = 0; typedef struct call_data { gpr_slice_buffer slices; /**< Buffers up input slices to be compressed */ @@ -171,7 +171,7 @@ static void finish_send_message(grpc_exec_ctx *exec_ctx, did_compress = grpc_msg_compress(calld->compression_algorithm, &calld->slices, &tmp); if (did_compress) { - if (grpc_compress_filter_trace) { + if (grpc_compression_trace) { char *algo_name; const size_t before_size = calld->slices.length; const size_t after_size = tmp.length; @@ -185,7 +185,7 @@ static void finish_send_message(grpc_exec_ctx *exec_ctx, gpr_slice_buffer_swap(&calld->slices, &tmp); calld->send_flags |= GRPC_WRITE_INTERNAL_COMPRESS; } else { - if (grpc_compress_filter_trace) { + if (grpc_compression_trace) { char *algo_name; GPR_ASSERT(grpc_compression_algorithm_name(calld->compression_algorithm, &algo_name)); diff --git a/src/core/lib/channel/compress_filter.h b/src/core/lib/channel/compress_filter.h index cf5879d82ef..0ce5d08837d 100644 --- a/src/core/lib/channel/compress_filter.h +++ b/src/core/lib/channel/compress_filter.h @@ -38,7 +38,7 @@ #define GRPC_COMPRESS_REQUEST_ALGORITHM_KEY "grpc-internal-encoding-request" -extern int grpc_compress_filter_trace; +extern int grpc_compression_trace; /** Compression filter for outgoing data. * diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 9b2b94eedf5..296a5f0d51b 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -261,6 +261,8 @@ grpc_call *grpc_call_create(grpc_channel *channel, grpc_call *parent_call, call->channel = channel; call->cq = cq; call->parent = parent_call; + /* Always support no compression */ + GPR_BITSET(&call->encodings_accepted_by_peer, GRPC_COMPRESS_NONE); call->is_client = server_transport_data == NULL; if (call->is_client) { GPR_ASSERT(add_initial_metadata_count < MAX_SEND_EXTRA_METADATA_COUNT); @@ -1087,6 +1089,24 @@ static void receiving_initial_metadata_ready(grpc_exec_ctx *exec_ctx, &call->metadata_batch[1 /* is_receiving */][0 /* is_trailing */]; grpc_metadata_batch_filter(md, recv_initial_filter, call); + /* make sure the received grpc-encoding is amongst the ones listed in + * grpc-accept-encoding */ + + GPR_ASSERT(call->encodings_accepted_by_peer != 0); + if (!GPR_BITGET(call->encodings_accepted_by_peer, + call->compression_algorithm)) { + extern int grpc_compression_trace; + if (grpc_compression_trace) { + char *algo_name; + grpc_compression_algorithm_name(call->compression_algorithm, + &algo_name); + gpr_log(GPR_ERROR, + "Compression algorithm (grpc-encoding = '%s') not present in " + "the bitset of accepted encodings (grpc-accept-encodings: " + "'0x%x')", + algo_name, call->encodings_accepted_by_peer); + } + } if (gpr_time_cmp(md->deadline, gpr_inf_future(md->deadline.clock_type)) != 0 && !call->is_client) { @@ -1474,7 +1494,8 @@ grpc_call_error grpc_call_start_batch(grpc_call *call, const grpc_op *ops, grpc_call_error err; GRPC_API_TRACE( - "grpc_call_start_batch(call=%p, ops=%p, nops=%lu, tag=%p, reserved=%p)", + "grpc_call_start_batch(call=%p, ops=%p, nops=%lu, tag=%p, " + "reserved=%p)", 5, (call, ops, (unsigned long)nops, tag, reserved)); if (reserved != NULL) { diff --git a/src/core/lib/surface/init.c b/src/core/lib/surface/init.c index 57c6897626a..1c8b7090156 100644 --- a/src/core/lib/surface/init.c +++ b/src/core/lib/surface/init.c @@ -164,7 +164,7 @@ void grpc_init(void) { grpc_register_tracer("channel_stack_builder", &grpc_trace_channel_stack_builder); grpc_register_tracer("http1", &grpc_http1_trace); - grpc_register_tracer("compression", &grpc_compress_filter_trace); + grpc_register_tracer("compression", &grpc_compression_trace); grpc_security_pre_init(); grpc_iomgr_init(); grpc_executor_init(); From 65ca9dcabc464a1ea9ea74b8891c77c27008dacd Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 4 May 2016 14:23:48 -0700 Subject: [PATCH 0388/1894] eliminate a thread switch when invoking server-side handler --- src/csharp/Grpc.Core/Server.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/csharp/Grpc.Core/Server.cs b/src/csharp/Grpc.Core/Server.cs index 5b61b7f060f..9b0895d8554 100644 --- a/src/csharp/Grpc.Core/Server.cs +++ b/src/csharp/Grpc.Core/Server.cs @@ -283,6 +283,8 @@ namespace Grpc.Core /// private void HandleNewServerRpc(bool success, BatchContextSafeHandle ctx) { + Task.Run(AllowOneRpc); + if (success) { ServerRpcNew newRpc = ctx.GetServerRpcNew(this); @@ -290,11 +292,9 @@ namespace Grpc.Core // after server shutdown, the callback returns with null call if (!newRpc.Call.IsInvalid) { - Task.Run(async () => await HandleCallAsync(newRpc)).ConfigureAwait(false); + HandleCallAsync(newRpc); // we don't need to await. } } - - AllowOneRpc(); } /// From 26cc1427e93e5f65a5a1a07edd275fdf713e7309 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 4 May 2016 17:21:17 -0700 Subject: [PATCH 0389/1894] start server with more than one allowed RPCs --- src/csharp/Grpc.Core/Server.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/csharp/Grpc.Core/Server.cs b/src/csharp/Grpc.Core/Server.cs index 9b0895d8554..fea76d557ad 100644 --- a/src/csharp/Grpc.Core/Server.cs +++ b/src/csharp/Grpc.Core/Server.cs @@ -48,6 +48,7 @@ namespace Grpc.Core /// public class Server { + const int InitialAllowRpcTokenCount = 10; static readonly ILogger Logger = GrpcEnvironment.Logger.ForType(); readonly AtomicCounter activeCallCounter = new AtomicCounter(); @@ -129,7 +130,13 @@ namespace Grpc.Core startRequested = true; handle.Start(); - AllowOneRpc(); + + // Starting with more than one AllowOneRpc tokens can significantly increase + // unary RPC throughput. + for (int i = 0; i < InitialAllowRpcTokenCount; i++) + { + AllowOneRpc(); + } } } From e458d8463548ff09acb4bdbe953f0e8baae2187b Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 9 May 2016 14:21:52 -0700 Subject: [PATCH 0390/1894] dont create dedicated threads for async client --- .../Grpc.IntegrationTesting/ClientRunners.cs | 23 ++++++------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs b/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs index b4572756f24..9eaf6bf7ce2 100644 --- a/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs +++ b/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs @@ -142,8 +142,7 @@ namespace Grpc.IntegrationTesting for (int i = 0; i < outstandingRpcsPerChannel; i++) { var timer = CreateTimer(loadParams, 1.0 / this.channels.Count / outstandingRpcsPerChannel); - var threadBody = GetThreadBody(channel, timer); - this.runnerTasks.Add(Task.Factory.StartNew(threadBody, TaskCreationOptions.LongRunning)); + this.runnerTasks.Add(RunClientAsync(channel, timer)); } } } @@ -269,38 +268,30 @@ namespace Grpc.IntegrationTesting } } - private Action GetThreadBody(Channel channel, IInterarrivalTimer timer) + private Task RunClientAsync(Channel channel, IInterarrivalTimer timer) { if (payloadConfig.PayloadCase == PayloadConfig.PayloadOneofCase.BytebufParams) { GrpcPreconditions.CheckArgument(clientType == ClientType.ASYNC_CLIENT, "Generic client only supports async API"); GrpcPreconditions.CheckArgument(rpcType == RpcType.STREAMING, "Generic client only supports streaming calls"); - return () => - { - RunGenericStreamingAsync(channel, timer).Wait(); - }; + return RunGenericStreamingAsync(channel, timer); } GrpcPreconditions.CheckNotNull(payloadConfig.SimpleParams); if (clientType == ClientType.SYNC_CLIENT) { GrpcPreconditions.CheckArgument(rpcType == RpcType.UNARY, "Sync client can only be used for Unary calls in C#"); - return () => RunUnary(channel, timer); + // create a dedicated thread for the synchronous client + return Task.Factory.StartNew(() => RunUnary(channel, timer), TaskCreationOptions.LongRunning); } else if (clientType == ClientType.ASYNC_CLIENT) { switch (rpcType) { case RpcType.UNARY: - return () => - { - RunUnaryAsync(channel, timer).Wait(); - }; + return RunUnaryAsync(channel, timer); case RpcType.STREAMING: - return () => - { - RunStreamingPingPongAsync(channel, timer).Wait(); - }; + return RunStreamingPingPongAsync(channel, timer); } } throw new ArgumentException("Unsupported configuration."); From 16713b91ccfabd5fd904051df17db86dae37b206 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 9 May 2016 14:34:11 -0700 Subject: [PATCH 0391/1894] enable previously disabled C# scenarios --- .../run_tests/performance/scenario_config.py | 20 +++++++++---------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index d3937096231..8b239951498 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -259,18 +259,16 @@ class CSharpLanguage: 'csharp_protobuf_sync_to_async_unary_ping_pong', rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='ASYNC_SERVER') - # TODO(jtattermusch): scenario works locally but fails on jenkins - #yield _ping_pong_scenario( - # 'csharp_protobuf_async_unary_qps_unconstrained', rpc_type='UNARY', - # client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', - # use_unconstrained_client=True, - # categories=[SMOKETEST]) + yield _ping_pong_scenario( + 'csharp_protobuf_async_unary_qps_unconstrained', rpc_type='UNARY', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + use_unconstrained_client=True, + categories=[SMOKETEST]) - # TODO(jtattermusch): scenario works locally but fails on jenkins - #yield _ping_pong_scenario( - # 'csharp_protobuf_async_streaming_qps_unconstrained', rpc_type='STREAMING', - # client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', - # use_unconstrained_client=True) + yield _ping_pong_scenario( + 'csharp_protobuf_async_streaming_qps_unconstrained', rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + use_unconstrained_client=True) yield _ping_pong_scenario( 'csharp_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY', From df0872f2a609c9fc448923ad6a466f9b9033a63a Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 9 May 2016 15:03:05 -0700 Subject: [PATCH 0392/1894] expose experimental API to set GrpcThreadPool size. --- src/csharp/Grpc.Core/GrpcEnvironment.cs | 34 +++++++++++++++++++++++-- 1 file changed, 32 insertions(+), 2 deletions(-) diff --git a/src/csharp/Grpc.Core/GrpcEnvironment.cs b/src/csharp/Grpc.Core/GrpcEnvironment.cs index a5c78cc9d7e..bee0ef1d62e 100644 --- a/src/csharp/Grpc.Core/GrpcEnvironment.cs +++ b/src/csharp/Grpc.Core/GrpcEnvironment.cs @@ -45,11 +45,12 @@ namespace Grpc.Core /// public class GrpcEnvironment { - const int THREAD_POOL_SIZE = 4; + const int MinDefaultThreadPoolSize = 4; static object staticLock = new object(); static GrpcEnvironment instance; static int refCount; + static int? customThreadPoolSize; static ILogger logger = new ConsoleLogger(); @@ -122,6 +123,23 @@ namespace Grpc.Core logger = customLogger; } + /// + /// Sets the number of threads in the gRPC thread pool that polls for internal RPC events. + /// Can be only invoke before the GrpcEnviroment is started and cannot be changed afterwards. + /// Setting thread pool size is an advanced setting and you should only use it if you know what you are doing. + /// Most users should rely on the default value provided by gRPC library. + /// Note: this method is part of an experimental API that can change or be removed without any prior notice. + /// + public static void SetThreadPoolSize(int threadCount) + { + lock (staticLock) + { + GrpcPreconditions.CheckState(instance == null, "Can only be set before GrpcEnvironment is initialized"); + GrpcPreconditions.CheckArgument(threadCount > 0, "threadCount needs to be a positive number"); + customThreadPoolSize = threadCount; + } + } + /// /// Creates gRPC environment. /// @@ -129,7 +147,7 @@ namespace Grpc.Core { GrpcNativeInit(); completionRegistry = new CompletionRegistry(this); - threadPool = new GrpcThreadPool(this, THREAD_POOL_SIZE); + threadPool = new GrpcThreadPool(this, GetThreadPoolSizeOrDefault()); threadPool.Start(); } @@ -200,5 +218,17 @@ namespace Grpc.Core debugStats.CheckOK(); } + + private int GetThreadPoolSizeOrDefault() + { + if (customThreadPoolSize.HasValue) + { + return customThreadPoolSize.Value; + } + // In systems with many cores, use half of the cores for GrpcThreadPool + // and the other half for .NET thread pool. This heuristic definitely needs + // more work, but seems to work reasonably well for a start. + return Math.Max(MinDefaultThreadPoolSize, Environment.ProcessorCount / 2); + } } } From 1e1fa0870f60b1c0d23da17b2aa7db9a3ca7f1ae Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 9 May 2016 15:18:11 -0700 Subject: [PATCH 0393/1894] dont lock to run server_request_call --- src/csharp/Grpc.Core/Server.cs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/csharp/Grpc.Core/Server.cs b/src/csharp/Grpc.Core/Server.cs index fea76d557ad..3a337ba8319 100644 --- a/src/csharp/Grpc.Core/Server.cs +++ b/src/csharp/Grpc.Core/Server.cs @@ -66,7 +66,7 @@ namespace Grpc.Core readonly TaskCompletionSource shutdownTcs = new TaskCompletionSource(); bool startRequested; - bool shutdownRequested; + volatile bool shutdownRequested; /// /// Create a new server. @@ -246,12 +246,9 @@ namespace Grpc.Core /// private void AllowOneRpc() { - lock (myLock) + if (!shutdownRequested) { - if (!shutdownRequested) - { - handle.RequestCall(HandleNewServerRpc, environment); - } + handle.RequestCall(HandleNewServerRpc, environment); } } From 0b405d54d496acc331f1511353b26e9f9a0e4598 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 9 May 2016 15:58:22 -0700 Subject: [PATCH 0394/1894] fixed wrong change --- src/core/lib/compression/message_compress.c | 2 +- src/core/lib/surface/byte_buffer_reader.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/lib/compression/message_compress.c b/src/core/lib/compression/message_compress.c index 699719a523d..cbe0b5a2856 100644 --- a/src/core/lib/compression/message_compress.c +++ b/src/core/lib/compression/message_compress.c @@ -194,5 +194,5 @@ int grpc_msg_decompress(grpc_compression_algorithm algorithm, break; } gpr_log(GPR_ERROR, "invalid compression algorithm %d", algorithm); - return -1; /* to distinguish it from GRPC_COMPRESS_NONE */ + return 0; } diff --git a/src/core/lib/surface/byte_buffer_reader.c b/src/core/lib/surface/byte_buffer_reader.c index c7f941525df..c97079f6385 100644 --- a/src/core/lib/surface/byte_buffer_reader.c +++ b/src/core/lib/surface/byte_buffer_reader.c @@ -64,7 +64,7 @@ void grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, if (is_compressed(reader->buffer_in)) { if (grpc_msg_decompress(reader->buffer_in->data.raw.compression, &reader->buffer_in->data.raw.slice_buffer, - &decompressed_slices_buffer) < 0) { + &decompressed_slices_buffer) == 0) { gpr_log(GPR_ERROR, "Unexpected error decompressing data for algorithm with enum " "value '%d'. Reading data as if it were uncompressed.", From dae51b0fe5fcc85d2ab698d417d711e39286b380 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 9 May 2016 19:30:04 -0700 Subject: [PATCH 0395/1894] fix compilation on windows --- src/csharp/Grpc.Core/Server.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/csharp/Grpc.Core/Server.cs b/src/csharp/Grpc.Core/Server.cs index 3a337ba8319..d538a4671f6 100644 --- a/src/csharp/Grpc.Core/Server.cs +++ b/src/csharp/Grpc.Core/Server.cs @@ -287,7 +287,7 @@ namespace Grpc.Core /// private void HandleNewServerRpc(bool success, BatchContextSafeHandle ctx) { - Task.Run(AllowOneRpc); + Task.Run(() => AllowOneRpc()); if (success) { From 15d2979b7d1e73a4af8123b7e9fe73c15273d00d Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 9 May 2016 23:27:05 -0700 Subject: [PATCH 0396/1894] update_perf_scripts --- tools/gce/create_linux_performance_worker.sh | 5 +++-- tools/gce/linux_performance_worker_init.sh | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/gce/create_linux_performance_worker.sh b/tools/gce/create_linux_performance_worker.sh index 8c9cc46a75c..96d5558d9a1 100755 --- a/tools/gce/create_linux_performance_worker.sh +++ b/tools/gce/create_linux_performance_worker.sh @@ -42,14 +42,15 @@ CLOUD_PROJECT=grpc-testing ZONE=us-central1-b # this zone allows 32core machines INSTANCE_NAME="${1:-grpc-performance-server1}" -MACHINE_TYPE=n1-standard-32 +MACHINE_TYPE=n1-standard-8 gcloud compute instances create $INSTANCE_NAME \ --project="$CLOUD_PROJECT" \ --zone "$ZONE" \ --machine-type $MACHINE_TYPE \ --image ubuntu-15-10 \ - --boot-disk-size 300 + --boot-disk-size 300 \ + --scope https://www.googleapis.com/auth/bigquery echo 'Created GCE instance, waiting 60 seconds for it to come online.' sleep 60 diff --git a/tools/gce/linux_performance_worker_init.sh b/tools/gce/linux_performance_worker_init.sh index df29581e69a..90aa527a3e4 100755 --- a/tools/gce/linux_performance_worker_init.sh +++ b/tools/gce/linux_performance_worker_init.sh @@ -94,6 +94,7 @@ sudo pip install tox # Node dependencies (nvm has to be installed under user jenkins) touch .profile curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.25.4/install.sh | bash +source ~/.nvm/nvm.sh nvm install 0.12 && npm config set cache /tmp/npm-cache nvm install 4 && npm config set cache /tmp/npm-cache nvm install 5 && npm config set cache /tmp/npm-cache From 5ecdda759a9b1c8cb1b10ad08d50bb1be7b9e332 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 10 May 2016 08:29:53 +0200 Subject: [PATCH 0397/1894] Processing the 0.14 release. --- Makefile | 2 +- build.yaml | 2 +- package.json | 2 +- src/core/lib/surface/version.c | 2 +- src/csharp/Grpc.Core/VersionInfo.cs | 2 +- src/csharp/build_packages.bat | 2 +- src/node/tools/package.json | 2 +- src/python/grpcio/grpc_version.py | 2 +- src/ruby/lib/grpc/version.rb | 2 +- src/ruby/tools/version.rb | 2 +- tools/distrib/python/grpcio_tools/grpc_version.py | 2 +- tools/doxygen/Doxyfile.c++ | 2 +- tools/doxygen/Doxyfile.c++.internal | 2 +- tools/doxygen/Doxyfile.core | 2 +- tools/doxygen/Doxyfile.core.internal | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 45003ad8b57..29fbb69b62a 100644 --- a/Makefile +++ b/Makefile @@ -407,7 +407,7 @@ E = @echo Q = @ endif -VERSION = 0.14.0-pre1 +VERSION = 0.14.0 CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) diff --git a/build.yaml b/build.yaml index a21dc688adf..dac4a5c10af 100644 --- a/build.yaml +++ b/build.yaml @@ -7,7 +7,7 @@ settings: '#3': Use "-preN" suffixes to identify pre-release versions '#4': Per-language overrides are possible with (eg) ruby_version tag here '#5': See the expand_version.py for all the quirks here - version: 0.14.0-pre1 + version: 0.14.0 filegroups: - name: census public_headers: diff --git a/package.json b/package.json index b22cfc1f938..a9107e82cf2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "0.14.0-pre1", + "version": "0.14.0", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "http://www.grpc.io/", diff --git a/src/core/lib/surface/version.c b/src/core/lib/surface/version.c index 0f4b1111f43..2a0bc5a47d2 100644 --- a/src/core/lib/surface/version.c +++ b/src/core/lib/surface/version.c @@ -36,4 +36,4 @@ #include -const char *grpc_version_string(void) { return "0.14.0-pre1"; } +const char *grpc_version_string(void) { return "0.14.0"; } diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index 70ce9a18df5..a22e287c6aa 100644 --- a/src/csharp/Grpc.Core/VersionInfo.cs +++ b/src/csharp/Grpc.Core/VersionInfo.cs @@ -53,6 +53,6 @@ namespace Grpc.Core /// /// Current version of gRPC C# /// - public const string CurrentVersion = "0.14.0-pre1"; + public const string CurrentVersion = "0.14.0"; } } diff --git a/src/csharp/build_packages.bat b/src/csharp/build_packages.bat index 9c7b877feab..68b52e211f5 100644 --- a/src/csharp/build_packages.bat +++ b/src/csharp/build_packages.bat @@ -1,7 +1,7 @@ @rem Builds gRPC NuGet packages @rem Current package versions -set VERSION=0.14.0-pre1 +set VERSION=0.14.0 set PROTOBUF_VERSION=3.0.0-beta2 @rem Packages that depend on prerelease packages (like Google.Protobuf) need to have prerelease suffix as well. diff --git a/src/node/tools/package.json b/src/node/tools/package.json index b8b4c9aea1b..25dadcd4cd9 100644 --- a/src/node/tools/package.json +++ b/src/node/tools/package.json @@ -1,6 +1,6 @@ { "name": "grpc-tools", - "version": "0.14.0-pre1", + "version": "0.14.0", "author": "Google Inc.", "description": "Tools for developing with gRPC on Node.js", "homepage": "http://www.grpc.io/", diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py index 87fadf9a979..f1d07120c06 100644 --- a/src/python/grpcio/grpc_version.py +++ b/src/python/grpcio/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! -VERSION='0.14.0rc1' +VERSION='0.14.0' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index 5117c85cea0..7a0a81bf000 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -29,5 +29,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '0.14.0.pre1' + VERSION = '0.14.0' end diff --git a/src/ruby/tools/version.rb b/src/ruby/tools/version.rb index ec085d2655b..80d109f82cd 100644 --- a/src/ruby/tools/version.rb +++ b/src/ruby/tools/version.rb @@ -29,6 +29,6 @@ module GRPC module Tools - VERSION = '0.14.0.pre1' + VERSION = '0.14.0' end end diff --git a/tools/distrib/python/grpcio_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_version.py index ee522a0bc31..6c37bc3d8bc 100644 --- a/tools/distrib/python/grpcio_tools/grpc_version.py +++ b/tools/distrib/python/grpcio_tools/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! -VERSION='0.14.0rc1' +VERSION='0.14.0' diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index f58f7e72817..d08a676a117 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.0-pre1 +PROJECT_NUMBER = 0.14.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index a7a17bac3fc..38fdbe98586 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.0-pre1 +PROJECT_NUMBER = 0.14.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index 8b13e6e7933..917200ed5a0 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.0-pre1 +PROJECT_NUMBER = 0.14.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index b3b34778743..b79f3951284 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.0-pre1 +PROJECT_NUMBER = 0.14.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a From 2c75731b689ad2fa569668468dfae684a6be9458 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Tue, 10 May 2016 09:26:34 +0200 Subject: [PATCH 0398/1894] The release branch is now 0.14.1-pre1. --- Makefile | 2 +- build.yaml | 2 +- composer.json | 2 +- package.json | 2 +- package.xml | 8 ++++---- src/core/lib/surface/version.c | 2 +- src/csharp/Grpc.Core/VersionInfo.cs | 4 ++-- src/csharp/build_packages.bat | 2 +- src/node/tools/package.json | 2 +- src/python/grpcio/grpc_version.py | 2 +- src/ruby/lib/grpc/version.rb | 2 +- src/ruby/tools/version.rb | 2 +- tools/distrib/python/grpcio_tools/grpc_version.py | 2 +- tools/doxygen/Doxyfile.c++ | 2 +- tools/doxygen/Doxyfile.c++.internal | 2 +- tools/doxygen/Doxyfile.core | 2 +- tools/doxygen/Doxyfile.core.internal | 2 +- 17 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 29fbb69b62a..0547faf5bb3 100644 --- a/Makefile +++ b/Makefile @@ -407,7 +407,7 @@ E = @echo Q = @ endif -VERSION = 0.14.0 +VERSION = 0.14.1-pre1 CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) diff --git a/build.yaml b/build.yaml index dac4a5c10af..1b7d4e03ab0 100644 --- a/build.yaml +++ b/build.yaml @@ -7,7 +7,7 @@ settings: '#3': Use "-preN" suffixes to identify pre-release versions '#4': Per-language overrides are possible with (eg) ruby_version tag here '#5': See the expand_version.py for all the quirks here - version: 0.14.0 + version: 0.14.1-pre1 filegroups: - name: census public_headers: diff --git a/composer.json b/composer.json index 97b1a5cb49b..0bf0ff4b45a 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "grpc/grpc", "type": "library", "description": "gRPC library for PHP", - "version": "0.14.0", + "version": "0.14.1", "keywords": ["rpc"], "homepage": "http://grpc.io", "license": "BSD-3-Clause", diff --git a/package.json b/package.json index a9107e82cf2..ae5fb0c6572 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "0.14.0", + "version": "0.14.1-pre1", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "http://www.grpc.io/", diff --git a/package.xml b/package.xml index ab6dee06318..c90d6f6b4b9 100644 --- a/package.xml +++ b/package.xml @@ -13,8 +13,8 @@ 2016-04-19 - 0.14.0 - 0.14.0 + 0.14.1 + 0.14.1 beta @@ -1014,8 +1014,8 @@ Update to wrap gRPC C Core version 0.10.0 - 0.14.0 - 0.14.0 + 0.14.1 + 0.14.1 beta diff --git a/src/core/lib/surface/version.c b/src/core/lib/surface/version.c index 2a0bc5a47d2..a7fa0f3565d 100644 --- a/src/core/lib/surface/version.c +++ b/src/core/lib/surface/version.c @@ -36,4 +36,4 @@ #include -const char *grpc_version_string(void) { return "0.14.0"; } +const char *grpc_version_string(void) { return "0.14.1-pre1"; } diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index a22e287c6aa..6c6a08775d4 100644 --- a/src/csharp/Grpc.Core/VersionInfo.cs +++ b/src/csharp/Grpc.Core/VersionInfo.cs @@ -48,11 +48,11 @@ namespace Grpc.Core /// /// Current AssemblyFileVersion of gRPC C# assemblies /// - public const string CurrentAssemblyFileVersion = "0.14.0.0"; + public const string CurrentAssemblyFileVersion = "0.14.1.0"; /// /// Current version of gRPC C# /// - public const string CurrentVersion = "0.14.0"; + public const string CurrentVersion = "0.14.1-pre1"; } } diff --git a/src/csharp/build_packages.bat b/src/csharp/build_packages.bat index 68b52e211f5..cf700d7581b 100644 --- a/src/csharp/build_packages.bat +++ b/src/csharp/build_packages.bat @@ -1,7 +1,7 @@ @rem Builds gRPC NuGet packages @rem Current package versions -set VERSION=0.14.0 +set VERSION=0.14.1-pre1 set PROTOBUF_VERSION=3.0.0-beta2 @rem Packages that depend on prerelease packages (like Google.Protobuf) need to have prerelease suffix as well. diff --git a/src/node/tools/package.json b/src/node/tools/package.json index 25dadcd4cd9..da85b6455b4 100644 --- a/src/node/tools/package.json +++ b/src/node/tools/package.json @@ -1,6 +1,6 @@ { "name": "grpc-tools", - "version": "0.14.0", + "version": "0.14.1-pre1", "author": "Google Inc.", "description": "Tools for developing with gRPC on Node.js", "homepage": "http://www.grpc.io/", diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py index f1d07120c06..e688e32c5f1 100644 --- a/src/python/grpcio/grpc_version.py +++ b/src/python/grpcio/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! -VERSION='0.14.0' +VERSION='0.14.1rc1' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index 7a0a81bf000..d8c2578c70c 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -29,5 +29,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '0.14.0' + VERSION = '0.14.1.pre1' end diff --git a/src/ruby/tools/version.rb b/src/ruby/tools/version.rb index 80d109f82cd..6dd5c339e2c 100644 --- a/src/ruby/tools/version.rb +++ b/src/ruby/tools/version.rb @@ -29,6 +29,6 @@ module GRPC module Tools - VERSION = '0.14.0' + VERSION = '0.14.1.pre1' end end diff --git a/tools/distrib/python/grpcio_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_version.py index 6c37bc3d8bc..cfd27d45c27 100644 --- a/tools/distrib/python/grpcio_tools/grpc_version.py +++ b/tools/distrib/python/grpcio_tools/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! -VERSION='0.14.0' +VERSION='0.14.1rc1' diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index d08a676a117..8ea1019f407 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.0 +PROJECT_NUMBER = 0.14.1-pre1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 38fdbe98586..cb444ef1370 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.0 +PROJECT_NUMBER = 0.14.1-pre1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index 917200ed5a0..34002354cf1 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.0 +PROJECT_NUMBER = 0.14.1-pre1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index b79f3951284..434f6c92a3b 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.0 +PROJECT_NUMBER = 0.14.1-pre1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a From cae4b1b39841213fdd14a1b89028ff16d6164eaf Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 10 May 2016 09:11:09 -0700 Subject: [PATCH 0399/1894] Progress converting to new error system (HTTP fixes) --- .../chttp2/transport/chttp2_transport.c | 6 ++-- .../lib/security/transport/secure_endpoint.c | 2 +- src/core/lib/surface/completion_queue.c | 2 ++ src/core/lib/surface/server.c | 33 ++++++++++++------- 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index f2a3d3592b6..22614ba1306 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1561,7 +1561,7 @@ static void reading_action(grpc_exec_ctx *exec_ctx, void *tp, (parse_unlocked -> post_parse_locked)? -> post_reading_action_locked */ grpc_chttp2_run_with_global_lock(exec_ctx, tp, NULL, reading_action_locked, - error, 0); + GRPC_ERROR_REF(error), 0); } static void reading_action_locked(grpc_exec_ctx *exec_ctx, @@ -1658,7 +1658,7 @@ static void post_reading_action_locked(grpc_exec_ctx *exec_ctx, error = GRPC_ERROR_CREATE("Transport closed"); } if (error != GRPC_ERROR_NONE) { - drop_connection(exec_ctx, t, error); + drop_connection(exec_ctx, t, GRPC_ERROR_REF(error)); t->endpoint_reading = 0; if (!t->executor.writing_active && t->ep) { grpc_endpoint_destroy(exec_ctx, t->ep); @@ -1680,6 +1680,8 @@ static void post_reading_action_locked(grpc_exec_ctx *exec_ctx, } else { UNREF_TRANSPORT(exec_ctx, t, "reading_action"); } + + GRPC_ERROR_UNREF(error); } /******************************************************************************* diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index a3f01ef83a9..23b51f33f60 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -138,7 +138,7 @@ static void call_read_cb(grpc_exec_ctx *exec_ctx, secure_endpoint *ep, } } ep->read_buffer = NULL; - grpc_exec_ctx_push(exec_ctx, ep->read_cb, GRPC_ERROR_REF(error), NULL); + grpc_exec_ctx_push(exec_ctx, ep->read_cb, error, NULL); SECURE_ENDPOINT_UNREF(exec_ctx, ep, "read"); } diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index 5bb93902889..b2d9965d331 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -285,6 +285,8 @@ void grpc_cq_end_op(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc, } GPR_TIMER_END("grpc_cq_end_op", 0); + + GRPC_ERROR_UNREF(error); } grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index ad4d0b54811..a622b5db9d1 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -235,7 +235,7 @@ struct grpc_server { static void publish_new_rpc(grpc_exec_ctx *exec_ctx, void *calld, grpc_error *error); static void fail_call(grpc_exec_ctx *exec_ctx, grpc_server *server, - requested_call *rc); + requested_call *rc, grpc_error *error); /* Before calling maybe_finish_shutdown, we must hold mu_global and not hold mu_call */ static void maybe_finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_server *server); @@ -344,11 +344,14 @@ static void request_matcher_zombify_all_pending_calls(grpc_exec_ctx *exec_ctx, static void request_matcher_kill_requests(grpc_exec_ctx *exec_ctx, grpc_server *server, - request_matcher *rm) { + request_matcher *rm, + grpc_error *error) { int request_id; while ((request_id = gpr_stack_lockfree_pop(rm->requests)) != -1) { - fail_call(exec_ctx, server, &server->requested_calls[request_id]); + fail_call(exec_ctx, server, &server->requested_calls[request_id], + GRPC_ERROR_REF(error)); } + GRPC_ERROR_UNREF(error); } /* @@ -641,16 +644,19 @@ static int num_channels(grpc_server *server) { } static void kill_pending_work_locked(grpc_exec_ctx *exec_ctx, - grpc_server *server) { + grpc_server *server, grpc_error *error) { registered_method *rm; request_matcher_kill_requests(exec_ctx, server, - &server->unregistered_request_matcher); + &server->unregistered_request_matcher, + GRPC_ERROR_REF(error)); request_matcher_zombify_all_pending_calls( exec_ctx, &server->unregistered_request_matcher); for (rm = server->registered_methods; rm; rm = rm->next) { - request_matcher_kill_requests(exec_ctx, server, &rm->request_matcher); + request_matcher_kill_requests(exec_ctx, server, &rm->request_matcher, + GRPC_ERROR_REF(error)); request_matcher_zombify_all_pending_calls(exec_ctx, &rm->request_matcher); } + GRPC_ERROR_UNREF(error); } static void maybe_finish_shutdown(grpc_exec_ctx *exec_ctx, @@ -660,7 +666,8 @@ static void maybe_finish_shutdown(grpc_exec_ctx *exec_ctx, return; } - kill_pending_work_locked(exec_ctx, server); + kill_pending_work_locked(exec_ctx, server, + GRPC_ERROR_CREATE("Server Shutdown")); if (server->root_channel_data.next != &server->root_channel_data || server->listeners_destroyed < num_listeners(server)) { @@ -1159,7 +1166,8 @@ void grpc_server_shutdown_and_notify(grpc_server *server, /* collect all unregistered then registered calls */ gpr_mu_lock(&server->mu_call); - kill_pending_work_locked(&exec_ctx, server); + kill_pending_work_locked(&exec_ctx, server, + GRPC_ERROR_CREATE("Server Shutdown")); gpr_mu_unlock(&server->mu_call); maybe_finish_shutdown(&exec_ctx, server); @@ -1235,13 +1243,13 @@ static grpc_call_error queue_call_request(grpc_exec_ctx *exec_ctx, request_matcher *rm = NULL; int request_id; if (gpr_atm_acq_load(&server->shutdown_flag)) { - fail_call(exec_ctx, server, rc); + fail_call(exec_ctx, server, rc, GRPC_ERROR_CREATE("Server Shutdown")); return GRPC_CALL_OK; } request_id = gpr_stack_lockfree_pop(server->request_freelist); if (request_id == -1) { /* out of request ids: just fail this one */ - fail_call(exec_ctx, server, rc); + fail_call(exec_ctx, server, rc, GRPC_ERROR_CREATE("Server Shutdown")); return GRPC_CALL_OK; } switch (rc->type) { @@ -1365,12 +1373,13 @@ done: } static void fail_call(grpc_exec_ctx *exec_ctx, grpc_server *server, - requested_call *rc) { + requested_call *rc, grpc_error *error) { *rc->call = NULL; rc->initial_metadata->count = 0; + GPR_ASSERT(error != GRPC_ERROR_NONE); server_ref(server); - grpc_cq_end_op(exec_ctx, rc->cq_for_notification, rc->tag, 0, + grpc_cq_end_op(exec_ctx, rc->cq_for_notification, rc->tag, error, done_request_event, rc, &rc->completion); } From 03b44ab74118cbaa7acc5fb04e5dd3aede28b787 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 10 May 2016 09:20:59 -0700 Subject: [PATCH 0400/1894] Install go --- tools/gce/linux_performance_worker_init.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/gce/linux_performance_worker_init.sh b/tools/gce/linux_performance_worker_init.sh index 90aa527a3e4..27f53cb0770 100755 --- a/tools/gce/linux_performance_worker_init.sh +++ b/tools/gce/linux_performance_worker_init.sh @@ -116,3 +116,6 @@ source ~/.rvm/scripts/rvm gem install bundler # Java dependencies - nothing as we already have Java JDK 8 + +# Go dependencies +sudo apt-get install golang-go From 7573dfc16ba6b10b95d354d60f6183907546096b Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 10 May 2016 09:33:23 -0700 Subject: [PATCH 0401/1894] Fixed references in grpc-tools gemspec --- src/ruby/tools/grpc-tools.gemspec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ruby/tools/grpc-tools.gemspec b/src/ruby/tools/grpc-tools.gemspec index af904de4a91..9fa4b66392d 100644 --- a/src/ruby/tools/grpc-tools.gemspec +++ b/src/ruby/tools/grpc-tools.gemspec @@ -18,5 +18,5 @@ Gem::Specification.new do |s| s.platform = Gem::Platform::RUBY - s.executables = %w( protoc.rb protoc_grpc_ruby_plugin.rb ) + s.executables = %w( grpc_tools_ruby_protoc.rb grpc_tools_ruby_protoc_plugin.rb ) end From 25665aa78ab1132031305c52330fd79de8ce436f Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 10 May 2016 09:47:05 -0700 Subject: [PATCH 0402/1894] Update linux_performance_worker_init.sh --- tools/gce/linux_performance_worker_init.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/gce/linux_performance_worker_init.sh b/tools/gce/linux_performance_worker_init.sh index 27f53cb0770..96e8a1353cb 100755 --- a/tools/gce/linux_performance_worker_init.sh +++ b/tools/gce/linux_performance_worker_init.sh @@ -118,4 +118,4 @@ gem install bundler # Java dependencies - nothing as we already have Java JDK 8 # Go dependencies -sudo apt-get install golang-go +sudo apt-get install -y golang-go From 78222f73830b6f52ab110ead8637075371c927fd Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 10 May 2016 09:55:38 -0700 Subject: [PATCH 0403/1894] Enable -Wextra-semi on compilers that support it Use some template magic to make warning detection much easier in the future. --- Makefile | 175 ++++++++++++----------- build.yaml | 2 +- templates/Makefile.template | 34 +++-- test/build/extra-semi.c | 34 +++++ test/build/no-shift-negative-value.c | 34 +++++ test/core/end2end/fixtures/h2_ssl_cert.c | 18 +-- 6 files changed, 191 insertions(+), 106 deletions(-) create mode 100644 test/build/extra-semi.c create mode 100644 test/build/no-shift-negative-value.c diff --git a/Makefile b/Makefile index dfd8461ea9c..0a7584f53b3 100644 --- a/Makefile +++ b/Makefile @@ -319,12 +319,19 @@ CHECK_SHADOW_WORKS_CMD = $(CC) -std=c99 -Werror -Wshadow -o $(TMPOUT) -c test/bu HAS_WORKING_SHADOW = $(shell $(CHECK_SHADOW_WORKS_CMD) 2> /dev/null && echo true || echo false) ifeq ($(HAS_WORKING_SHADOW),true) W_SHADOW=-Wshadow +NO_W_SHADOW=-Wno-shadow endif - -CHECK_NO_SHIFT_NEGATIVE_VALUE_CMD = $(CC) -std=c99 -Werror -Wno-shift-negative-value -o $(TMPOUT) -c test/build/empty.c -HAS_NO_SHIFT_NEGATIVE_VALUE = $(shell $(CHECK_NO_SHIFT_NEGATIVE_VALUE_CMD) 2> /dev/null && echo true || echo false) -ifeq ($(HAS_NO_SHIFT_NEGATIVE_VALUE),true) +CHECK_EXTRA_SEMI_WORKS_CMD = $(CC) -std=c99 -Werror -Wextra-semi -o $(TMPOUT) -c test/build/extra-semi.c +HAS_WORKING_EXTRA_SEMI = $(shell $(CHECK_EXTRA_SEMI_WORKS_CMD) 2> /dev/null && echo true || echo false) +ifeq ($(HAS_WORKING_EXTRA_SEMI),true) +W_EXTRA_SEMI=-Wextra-semi +NO_W_EXTRA_SEMI=-Wno-extra-semi +endif +CHECK_NO_SHIFT_NEGATIVE_VALUE_WORKS_CMD = $(CC) -std=c99 -Werror -Wno-shift-negative-value -o $(TMPOUT) -c test/build/no-shift-negative-value.c +HAS_WORKING_NO_SHIFT_NEGATIVE_VALUE = $(shell $(CHECK_NO_SHIFT_NEGATIVE_VALUE_WORKS_CMD) 2> /dev/null && echo true || echo false) +ifeq ($(HAS_WORKING_NO_SHIFT_NEGATIVE_VALUE),true) W_NO_SHIFT_NEGATIVE_VALUE=-Wno-shift-negative-value +NO_W_NO_SHIFT_NEGATIVE_VALUE=-Wshift-negative-value endif # The HOST compiler settings are used to compile the protoc plugins. @@ -341,7 +348,7 @@ ifdef EXTRA_DEFINES DEFINES += $(EXTRA_DEFINES) endif -CFLAGS += -std=c99 -Wsign-conversion -Wconversion $(W_SHADOW) +CFLAGS += -std=c99 -Wsign-conversion -Wconversion $(W_SHADOW) $(W_EXTRA_SEMI) ifeq ($(HAS_CXX11),true) CXXFLAGS += -std=c++11 else @@ -472,7 +479,7 @@ endif OPENSSL_ALPN_CHECK_CMD = $(CC) $(CPPFLAGS) $(CFLAGS) -o $(TMPOUT) test/build/openssl-alpn.c $(addprefix -l, $(OPENSSL_LIBS)) $(LDFLAGS) OPENSSL_NPN_CHECK_CMD = $(CC) $(CPPFLAGS) $(CFLAGS) -o $(TMPOUT) test/build/openssl-npn.c $(addprefix -l, $(OPENSSL_LIBS)) $(LDFLAGS) -BORINGSSL_COMPILE_CHECK_CMD = $(CC) $(CPPFLAGS) -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare -o $(TMPOUT) test/build/boringssl.c $(LDFLAGS) +BORINGSSL_COMPILE_CHECK_CMD = $(CC) $(CPPFLAGS) -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) -o $(TMPOUT) test/build/boringssl.c $(LDFLAGS) ZLIB_CHECK_CMD = $(CC) $(CPPFLAGS) $(CFLAGS) -o $(TMPOUT) test/build/zlib.c -lz $(LDFLAGS) PROTOBUF_CHECK_CMD = $(CXX) $(CPPFLAGS) $(CXXFLAGS) -o $(TMPOUT) test/build/protobuf.cc -lprotobuf $(LDFLAGS) @@ -4330,7 +4337,7 @@ PUBLIC_HEADERS_C += \ LIBBORINGSSL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_SRC)))) $(LIBBORINGSSL_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) $(LIBDIR)/$(CONFIG)/libboringssl.a: $(ZLIB_DEP) $(LIBBORINGSSL_OBJS) $(E) "[AR] Creating $@" @@ -4359,7 +4366,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_TEST_UTIL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_TEST_UTIL_SRC)))) $(LIBBORINGSSL_TEST_UTIL_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_TEST_UTIL_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_TEST_UTIL_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -4397,7 +4404,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_AES_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_AES_TEST_LIB_SRC)))) $(LIBBORINGSSL_AES_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_AES_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_AES_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -4435,7 +4442,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_ASN1_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_ASN1_TEST_LIB_SRC)))) $(LIBBORINGSSL_ASN1_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_ASN1_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_ASN1_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -4473,7 +4480,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_BASE64_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_BASE64_TEST_LIB_SRC)))) $(LIBBORINGSSL_BASE64_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_BASE64_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_BASE64_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -4511,7 +4518,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_BIO_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_BIO_TEST_LIB_SRC)))) $(LIBBORINGSSL_BIO_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_BIO_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_BIO_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -4549,7 +4556,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_BN_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_BN_TEST_LIB_SRC)))) $(LIBBORINGSSL_BN_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_BN_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_BN_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -4587,7 +4594,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_BYTESTRING_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_BYTESTRING_TEST_LIB_SRC)))) $(LIBBORINGSSL_BYTESTRING_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_BYTESTRING_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_BYTESTRING_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -4625,7 +4632,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_AEAD_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_AEAD_TEST_LIB_SRC)))) $(LIBBORINGSSL_AEAD_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_AEAD_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_AEAD_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -4663,7 +4670,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_CIPHER_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_CIPHER_TEST_LIB_SRC)))) $(LIBBORINGSSL_CIPHER_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_CIPHER_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_CIPHER_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -4701,7 +4708,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_CMAC_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_CMAC_TEST_LIB_SRC)))) $(LIBBORINGSSL_CMAC_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_CMAC_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_CMAC_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -4739,7 +4746,7 @@ PUBLIC_HEADERS_C += \ LIBBORINGSSL_CONSTANT_TIME_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_CONSTANT_TIME_TEST_LIB_SRC)))) $(LIBBORINGSSL_CONSTANT_TIME_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_CONSTANT_TIME_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_CONSTANT_TIME_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) $(LIBDIR)/$(CONFIG)/libboringssl_constant_time_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_CONSTANT_TIME_TEST_LIB_OBJS) $(E) "[AR] Creating $@" @@ -4766,7 +4773,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_ED25519_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_ED25519_TEST_LIB_SRC)))) $(LIBBORINGSSL_ED25519_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_ED25519_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_ED25519_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -4804,7 +4811,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_X25519_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_X25519_TEST_LIB_SRC)))) $(LIBBORINGSSL_X25519_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_X25519_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_X25519_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -4842,7 +4849,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_DH_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_DH_TEST_LIB_SRC)))) $(LIBBORINGSSL_DH_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_DH_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_DH_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -4880,7 +4887,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_DIGEST_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_DIGEST_TEST_LIB_SRC)))) $(LIBBORINGSSL_DIGEST_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_DIGEST_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_DIGEST_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -4918,7 +4925,7 @@ PUBLIC_HEADERS_C += \ LIBBORINGSSL_DSA_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_DSA_TEST_LIB_SRC)))) $(LIBBORINGSSL_DSA_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_DSA_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_DSA_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) $(LIBDIR)/$(CONFIG)/libboringssl_dsa_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_DSA_TEST_LIB_OBJS) $(E) "[AR] Creating $@" @@ -4945,7 +4952,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_EC_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_EC_TEST_LIB_SRC)))) $(LIBBORINGSSL_EC_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_EC_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_EC_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -4983,7 +4990,7 @@ PUBLIC_HEADERS_C += \ LIBBORINGSSL_EXAMPLE_MUL_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_EXAMPLE_MUL_LIB_SRC)))) $(LIBBORINGSSL_EXAMPLE_MUL_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_EXAMPLE_MUL_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_EXAMPLE_MUL_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) $(LIBDIR)/$(CONFIG)/libboringssl_example_mul_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_EXAMPLE_MUL_LIB_OBJS) $(E) "[AR] Creating $@" @@ -5010,7 +5017,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_ECDSA_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_ECDSA_TEST_LIB_SRC)))) $(LIBBORINGSSL_ECDSA_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_ECDSA_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_ECDSA_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -5048,7 +5055,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_ERR_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_ERR_TEST_LIB_SRC)))) $(LIBBORINGSSL_ERR_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_ERR_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_ERR_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -5086,7 +5093,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_EVP_EXTRA_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_EVP_EXTRA_TEST_LIB_SRC)))) $(LIBBORINGSSL_EVP_EXTRA_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_EVP_EXTRA_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_EVP_EXTRA_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -5124,7 +5131,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_EVP_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_EVP_TEST_LIB_SRC)))) $(LIBBORINGSSL_EVP_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_EVP_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_EVP_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -5162,7 +5169,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_PBKDF_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_PBKDF_TEST_LIB_SRC)))) $(LIBBORINGSSL_PBKDF_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_PBKDF_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_PBKDF_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -5200,7 +5207,7 @@ PUBLIC_HEADERS_C += \ LIBBORINGSSL_HKDF_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_HKDF_TEST_LIB_SRC)))) $(LIBBORINGSSL_HKDF_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_HKDF_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_HKDF_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) $(LIBDIR)/$(CONFIG)/libboringssl_hkdf_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_HKDF_TEST_LIB_OBJS) $(E) "[AR] Creating $@" @@ -5227,7 +5234,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_HMAC_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_HMAC_TEST_LIB_SRC)))) $(LIBBORINGSSL_HMAC_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_HMAC_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_HMAC_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -5265,7 +5272,7 @@ PUBLIC_HEADERS_C += \ LIBBORINGSSL_LHASH_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_LHASH_TEST_LIB_SRC)))) $(LIBBORINGSSL_LHASH_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_LHASH_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_LHASH_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) $(LIBDIR)/$(CONFIG)/libboringssl_lhash_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_LHASH_TEST_LIB_OBJS) $(E) "[AR] Creating $@" @@ -5292,7 +5299,7 @@ PUBLIC_HEADERS_C += \ LIBBORINGSSL_GCM_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_GCM_TEST_LIB_SRC)))) $(LIBBORINGSSL_GCM_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_GCM_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_GCM_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) $(LIBDIR)/$(CONFIG)/libboringssl_gcm_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_GCM_TEST_LIB_OBJS) $(E) "[AR] Creating $@" @@ -5319,7 +5326,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_PKCS12_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_PKCS12_TEST_LIB_SRC)))) $(LIBBORINGSSL_PKCS12_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_PKCS12_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_PKCS12_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -5357,7 +5364,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_PKCS8_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_PKCS8_TEST_LIB_SRC)))) $(LIBBORINGSSL_PKCS8_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_PKCS8_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_PKCS8_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -5395,7 +5402,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_POLY1305_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_POLY1305_TEST_LIB_SRC)))) $(LIBBORINGSSL_POLY1305_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_POLY1305_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_POLY1305_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -5433,7 +5440,7 @@ PUBLIC_HEADERS_C += \ LIBBORINGSSL_REFCOUNT_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_REFCOUNT_TEST_LIB_SRC)))) $(LIBBORINGSSL_REFCOUNT_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_REFCOUNT_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_REFCOUNT_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) $(LIBDIR)/$(CONFIG)/libboringssl_refcount_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_REFCOUNT_TEST_LIB_OBJS) $(E) "[AR] Creating $@" @@ -5460,7 +5467,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_RSA_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_RSA_TEST_LIB_SRC)))) $(LIBBORINGSSL_RSA_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_RSA_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_RSA_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -5498,7 +5505,7 @@ PUBLIC_HEADERS_C += \ LIBBORINGSSL_THREAD_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_THREAD_TEST_LIB_SRC)))) $(LIBBORINGSSL_THREAD_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_THREAD_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_THREAD_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) $(LIBDIR)/$(CONFIG)/libboringssl_thread_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_THREAD_TEST_LIB_OBJS) $(E) "[AR] Creating $@" @@ -5525,7 +5532,7 @@ PUBLIC_HEADERS_C += \ LIBBORINGSSL_PKCS7_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_PKCS7_TEST_LIB_SRC)))) $(LIBBORINGSSL_PKCS7_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_PKCS7_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_PKCS7_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) $(LIBDIR)/$(CONFIG)/libboringssl_pkcs7_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_PKCS7_TEST_LIB_OBJS) $(E) "[AR] Creating $@" @@ -5552,7 +5559,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_X509_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_X509_TEST_LIB_SRC)))) $(LIBBORINGSSL_X509_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_X509_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_X509_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -5590,7 +5597,7 @@ PUBLIC_HEADERS_C += \ LIBBORINGSSL_TAB_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_TAB_TEST_LIB_SRC)))) $(LIBBORINGSSL_TAB_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_TAB_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_TAB_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) $(LIBDIR)/$(CONFIG)/libboringssl_tab_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_TAB_TEST_LIB_OBJS) $(E) "[AR] Creating $@" @@ -5617,7 +5624,7 @@ PUBLIC_HEADERS_C += \ LIBBORINGSSL_V3NAME_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_V3NAME_TEST_LIB_SRC)))) $(LIBBORINGSSL_V3NAME_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_V3NAME_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_V3NAME_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) $(LIBDIR)/$(CONFIG)/libboringssl_v3name_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_V3NAME_TEST_LIB_OBJS) $(E) "[AR] Creating $@" @@ -5644,7 +5651,7 @@ PUBLIC_HEADERS_C += \ LIBBORINGSSL_PQUEUE_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_PQUEUE_TEST_LIB_SRC)))) $(LIBBORINGSSL_PQUEUE_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_PQUEUE_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_PQUEUE_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) $(LIBDIR)/$(CONFIG)/libboringssl_pqueue_test_lib.a: $(ZLIB_DEP) $(LIBBORINGSSL_PQUEUE_TEST_LIB_OBJS) $(E) "[AR] Creating $@" @@ -5671,7 +5678,7 @@ PUBLIC_HEADERS_CXX += \ LIBBORINGSSL_SSL_TEST_LIB_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBBORINGSSL_SSL_TEST_LIB_SRC)))) $(LIBBORINGSSL_SSL_TEST_LIB_OBJS): CPPFLAGS += -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX -$(LIBBORINGSSL_SSL_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare +$(LIBBORINGSSL_SSL_TEST_LIB_OBJS): CFLAGS += -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) ifeq ($(NO_PROTOBUF),true) @@ -11986,7 +11993,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_AES_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_AES_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_AES_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_AES_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12013,7 +12020,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_ASN1_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_ASN1_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_ASN1_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_ASN1_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12040,7 +12047,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_BASE64_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_BASE64_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_BASE64_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_BASE64_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12067,7 +12074,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_BIO_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_BIO_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_BIO_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_BIO_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12094,7 +12101,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_BN_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_BN_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_BN_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_BN_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12121,7 +12128,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_BYTESTRING_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_BYTESTRING_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_BYTESTRING_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_BYTESTRING_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12148,7 +12155,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_AEAD_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_AEAD_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_AEAD_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_AEAD_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12175,7 +12182,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_CIPHER_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_CIPHER_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_CIPHER_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_CIPHER_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12202,7 +12209,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_CMAC_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_CMAC_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_CMAC_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_CMAC_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12229,7 +12236,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_CONSTANT_TIME_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_CONSTANT_TIME_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_CONSTANT_TIME_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_CONSTANT_TIME_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12256,7 +12263,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_ED25519_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_ED25519_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_ED25519_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_ED25519_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12283,7 +12290,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_X25519_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_X25519_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_X25519_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_X25519_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12310,7 +12317,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_DH_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_DH_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_DH_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_DH_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12337,7 +12344,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_DIGEST_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_DIGEST_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_DIGEST_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_DIGEST_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12364,7 +12371,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_DSA_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_DSA_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_DSA_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_DSA_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12391,7 +12398,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_EC_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_EC_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_EC_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_EC_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12418,7 +12425,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_EXAMPLE_MUL_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_EXAMPLE_MUL_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_EXAMPLE_MUL_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_EXAMPLE_MUL_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12445,7 +12452,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_ECDSA_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_ECDSA_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_ECDSA_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_ECDSA_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12472,7 +12479,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_ERR_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_ERR_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_ERR_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_ERR_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12499,7 +12506,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_EVP_EXTRA_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_EVP_EXTRA_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_EVP_EXTRA_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_EVP_EXTRA_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12526,7 +12533,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_EVP_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_EVP_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_EVP_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_EVP_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12553,7 +12560,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_PBKDF_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_PBKDF_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_PBKDF_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_PBKDF_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12580,7 +12587,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_HKDF_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_HKDF_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_HKDF_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_HKDF_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12607,7 +12614,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_HMAC_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_HMAC_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_HMAC_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_HMAC_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12634,7 +12641,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_LHASH_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_LHASH_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_LHASH_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_LHASH_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12661,7 +12668,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_GCM_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_GCM_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_GCM_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_GCM_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12688,7 +12695,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_PKCS12_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_PKCS12_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_PKCS12_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_PKCS12_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12715,7 +12722,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_PKCS8_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_PKCS8_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_PKCS8_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_PKCS8_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12742,7 +12749,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_POLY1305_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_POLY1305_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_POLY1305_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_POLY1305_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12769,7 +12776,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_REFCOUNT_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_REFCOUNT_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_REFCOUNT_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_REFCOUNT_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12796,7 +12803,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_RSA_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_RSA_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_RSA_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_RSA_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12823,7 +12830,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_THREAD_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_THREAD_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_THREAD_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_THREAD_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12850,7 +12857,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_PKCS7_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_PKCS7_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_PKCS7_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_PKCS7_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12877,7 +12884,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_X509_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_X509_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_X509_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_X509_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12904,7 +12911,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_TAB_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_TAB_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_TAB_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_TAB_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12931,7 +12938,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_V3NAME_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_V3NAME_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_V3NAME_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_V3NAME_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12958,7 +12965,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_PQUEUE_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_PQUEUE_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_PQUEUE_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_PQUEUE_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE @@ -12985,7 +12992,7 @@ endif # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment -$(BORINGSSL_SSL_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value +$(BORINGSSL_SSL_TEST_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(BORINGSSL_SSL_TEST_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(BORINGSSL_SSL_TEST_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE diff --git a/build.yaml b/build.yaml index 5e47c084555..65e80a99ad2 100644 --- a/build.yaml +++ b/build.yaml @@ -3252,7 +3252,7 @@ configs: defaults: boringssl: CFLAGS: -Wno-sign-conversion -Wno-conversion -Wno-unused-value -Wno-unknown-pragmas - -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare + -Wno-implicit-function-declaration -Wno-unused-variable -Wno-sign-compare $(NO_W_EXTRA_SEMI) CPPFLAGS: -Ithird_party/boringssl/include -fvisibility=hidden -DOPENSSL_NO_ASM -D_GNU_SOURCE -DWIN32_LEAN_AND_MEAN -D_HAS_EXCEPTIONS=0 -DNOMINMAX global: diff --git a/templates/Makefile.template b/templates/Makefile.template index e84ceebf221..0d5f0ec5b53 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -49,6 +49,19 @@ sources_that_need_openssl = set() sources_that_don_t_need_openssl = set() + + # warnings we'd like, but that dont exist in all compilers + PREFERRED_WARNINGS=['shadow', 'extra-semi'] + CHECK_WARNINGS=PREFERRED_WARNINGS + ['no-shift-negative-value'] + + def warning_var(fmt, warning): + return fmt % warning.replace('-', '_').upper() + + def neg_warning(warning): + if warning[0:3] == 'no-': + return warning[3:] + else: + return 'no-' + warning %> @@ -187,17 +200,14 @@ CXX11_CHECK_CMD = $(CXX) -std=c++11 -o $(TMPOUT) -c test/build/c++11.cc HAS_CXX11 = $(shell $(CXX11_CHECK_CMD) 2> /dev/null && echo true || echo false) - CHECK_SHADOW_WORKS_CMD = $(CC) -std=c99 -Werror -Wshadow -o $(TMPOUT) -c test/build/shadow.c - HAS_WORKING_SHADOW = $(shell $(CHECK_SHADOW_WORKS_CMD) 2> /dev/null && echo true || echo false) - ifeq ($(HAS_WORKING_SHADOW),true) - W_SHADOW=-Wshadow - endif - - CHECK_NO_SHIFT_NEGATIVE_VALUE_CMD = $(CC) -std=c99 -Werror -Wno-shift-negative-value -o $(TMPOUT) -c test/build/empty.c - HAS_NO_SHIFT_NEGATIVE_VALUE = $(shell $(CHECK_NO_SHIFT_NEGATIVE_VALUE_CMD) 2> /dev/null && echo true || echo false) - ifeq ($(HAS_NO_SHIFT_NEGATIVE_VALUE),true) - W_NO_SHIFT_NEGATIVE_VALUE=-Wno-shift-negative-value + %for warning in CHECK_WARNINGS: + ${warning_var('CHECK_%s_WORKS_CMD', warning)} = $(CC) -std=c99 -Werror -W${warning} -o $(TMPOUT) -c test/build/${warning}.c + ${warning_var('HAS_WORKING_%s', warning)} = $(shell $(${warning_var('CHECK_%s_WORKS_CMD', warning)}) 2> /dev/null && echo true || echo false) + ifeq ($(${warning_var('HAS_WORKING_%s', warning)}),true) + ${warning_var('W_%s', warning)}=-W${warning} + ${warning_var('NO_W_%s', warning)}=-W${neg_warning(warning)} endif + %endfor # The HOST compiler settings are used to compile the protoc plugins. # In most cases, you won't have to change anything, but if you are @@ -213,7 +223,7 @@ DEFINES += $(EXTRA_DEFINES) endif - CFLAGS += -std=c99 -Wsign-conversion -Wconversion $(W_SHADOW) + CFLAGS += -std=c99 -Wsign-conversion -Wconversion ${' '.join(warning_var('$(W_%s)', warning) for warning in PREFERRED_WARNINGS)} ifeq ($(HAS_CXX11),true) CXXFLAGS += -std=c++11 else @@ -1698,7 +1708,7 @@ # boringssl needs an override to ensure that it does not include # system openssl headers regardless of other configuration # we do so here with a target specific variable assignment - $(${tgt.name.upper()}_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value + $(${tgt.name.upper()}_OBJS): CFLAGS := -Ithird_party/boringssl/include $(CFLAGS) -Wno-sign-conversion -Wno-conversion -Wno-unused-value $(NO_W_EXTRA_SEMI) $(${tgt.name.upper()}_OBJS): CXXFLAGS := -Ithird_party/boringssl/include $(CXXFLAGS) $(${tgt.name.upper()}_OBJS): CPPFLAGS += -DOPENSSL_NO_ASM -D_GNU_SOURCE % else: diff --git a/test/build/extra-semi.c b/test/build/extra-semi.c new file mode 100644 index 00000000000..60466dda786 --- /dev/null +++ b/test/build/extra-semi.c @@ -0,0 +1,34 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +int main(void) {} diff --git a/test/build/no-shift-negative-value.c b/test/build/no-shift-negative-value.c new file mode 100644 index 00000000000..58e4698aee2 --- /dev/null +++ b/test/build/no-shift-negative-value.c @@ -0,0 +1,34 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +int main(void) {} diff --git a/test/core/end2end/fixtures/h2_ssl_cert.c b/test/core/end2end/fixtures/h2_ssl_cert.c index cd031ca4826..f4dea2cc01a 100644 --- a/test/core/end2end/fixtures/h2_ssl_cert.c +++ b/test/core/end2end/fixtures/h2_ssl_cert.c @@ -143,11 +143,11 @@ static int fail_server_auth_check(grpc_channel_args *server_args) { chttp2_init_server_secure_fullstack(f, server_args, ssl_creds); \ } -SERVER_INIT(GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE); -SERVER_INIT(GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY); -SERVER_INIT(GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY); -SERVER_INIT(GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY); -SERVER_INIT(GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY); +SERVER_INIT(GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE) +SERVER_INIT(GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_BUT_DONT_VERIFY) +SERVER_INIT(GRPC_SSL_REQUEST_CLIENT_CERTIFICATE_AND_VERIFY) +SERVER_INIT(GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_BUT_DONT_VERIFY) +SERVER_INIT(GRPC_SSL_REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY) #define CLIENT_INIT_NAME(cert_type) \ chttp2_init_client_simple_ssl_secure_fullstack_##cert_type @@ -189,10 +189,10 @@ typedef enum { NONE, SELF_SIGNED, SIGNED, BAD_CERT_PAIR } certtype; grpc_channel_args_destroy(new_client_args); \ } -CLIENT_INIT(NONE); -CLIENT_INIT(SELF_SIGNED); -CLIENT_INIT(SIGNED); -CLIENT_INIT(BAD_CERT_PAIR); +CLIENT_INIT(NONE) +CLIENT_INIT(SELF_SIGNED) +CLIENT_INIT(SIGNED) +CLIENT_INIT(BAD_CERT_PAIR) #define TEST_NAME(enum_name, cert_type, result) \ "chttp2/ssl_" #enum_name "_" #cert_type "_" #result "_" From a46d21de37c60554dd455104dbbec37854515253 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 10 May 2016 09:57:51 -0700 Subject: [PATCH 0404/1894] fix TimeoutOnSleepingServer interop test --- src/csharp/Grpc.IntegrationTesting/InteropClient.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs index b3b1abf1bca..cff85086310 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs @@ -492,6 +492,10 @@ namespace Grpc.IntegrationTesting { // Deadline was reached before write has started. Eat the exception and continue. } + catch (RpcException) + { + // Deadline was reached before write has started. Eat the exception and continue. + } var ex = Assert.ThrowsAsync(async () => await call.ResponseStream.MoveNext()); // We can't guarantee the status code always DeadlineExceeded. See issue #2685. From 39e71c33d1a15b85af7c36f08736124a2537896f Mon Sep 17 00:00:00 2001 From: yang-g Date: Tue, 10 May 2016 10:21:41 -0700 Subject: [PATCH 0405/1894] fix compiling error --- test/cpp/end2end/end2end_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 40ba0c0b439..e3408bff75e 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -995,7 +995,7 @@ TEST_P(End2endTest, BinaryTrailerTest) { Status s = stub_->Echo(&context, request, &response); EXPECT_FALSE(s.ok()); auto trailers = context.GetServerTrailingMetadata(); - EXPECT_EQ(1, trailers.count(kDebugInfoTrailerKey)); + EXPECT_EQ(1u, trailers.count(kDebugInfoTrailerKey)); auto iter = trailers.find(kDebugInfoTrailerKey); EXPECT_EQ(expected_string, iter->second); // Parse the returned trailer into a DebugInfo proto. From 25dc53915b2469ae43c22e118a8f2e537eee200a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 10 May 2016 10:53:55 -0700 Subject: [PATCH 0406/1894] Fix workqueues, timer shutdown --- src/core/lib/iomgr/timer.c | 3 ++- src/core/lib/iomgr/workqueue_posix.c | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/lib/iomgr/timer.c b/src/core/lib/iomgr/timer.c index bd8769b11bf..99a66ee0429 100644 --- a/src/core/lib/iomgr/timer.c +++ b/src/core/lib/iomgr/timer.c @@ -105,7 +105,8 @@ void grpc_timer_list_init(gpr_timespec now) { void grpc_timer_list_shutdown(grpc_exec_ctx *exec_ctx) { int i; - run_some_expired_timers(exec_ctx, gpr_inf_future(g_clock_type), NULL, 0); + run_some_expired_timers(exec_ctx, gpr_inf_future(g_clock_type), NULL, + GRPC_ERROR_CREATE("Timer list shutdown")); for (i = 0; i < NUM_SHARDS; i++) { shard_type *shard = &g_shards[i]; gpr_mu_destroy(&shard->mu); diff --git a/src/core/lib/iomgr/workqueue_posix.c b/src/core/lib/iomgr/workqueue_posix.c index 66879ba7b32..297e8d31022 100644 --- a/src/core/lib/iomgr/workqueue_posix.c +++ b/src/core/lib/iomgr/workqueue_posix.c @@ -62,7 +62,7 @@ grpc_error *grpc_workqueue_create(grpc_exec_ctx *exec_ctx, sprintf(name, "workqueue:%p", (void *)(*workqueue)); (*workqueue)->wakeup_read_fd = grpc_fd_create( GRPC_WAKEUP_FD_GET_READ_FD(&(*workqueue)->wakeup_fd), name); - grpc_closure_init(&(*workqueue)->read_closure, on_readable, workqueue); + grpc_closure_init(&(*workqueue)->read_closure, on_readable, *workqueue); grpc_fd_notify_on_read(exec_ctx, (*workqueue)->wakeup_read_fd, &(*workqueue)->read_closure); return GRPC_ERROR_NONE; From 92d9106a35615101907cbf74e66f65768e2b5fa9 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 10 May 2016 11:53:19 -0700 Subject: [PATCH 0407/1894] dont use corelimit for throughput tests --- tools/run_tests/performance/scenario_config.py | 4 ---- 1 file changed, 4 deletions(-) diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index 8b239951498..8f76d0a02ea 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -29,7 +29,6 @@ # performance scenario configuration for various languages -SINGLE_MACHINE_CORES=8 WARMUP_SECONDS=5 JAVA_WARMUP_SECONDS=15 # Java needs more warmup time for JIT to kick in. BENCHMARK_SECONDS=30 @@ -197,7 +196,6 @@ class CXXLanguage: yield _ping_pong_scenario( 'cpp_protobuf_async_unary_qps_unconstrained_%s' % secstr, rpc_type='UNARY', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', - server_core_limit=SINGLE_MACHINE_CORES/2, use_unconstrained_client=True, secure=secure, categories=smoketest_categories) @@ -205,7 +203,6 @@ class CXXLanguage: yield _ping_pong_scenario( 'cpp_protobuf_async_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING', client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', - server_core_limit=SINGLE_MACHINE_CORES/2, use_unconstrained_client=True, secure=secure) @@ -213,7 +210,6 @@ class CXXLanguage: 'cpp_generic_async_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING', client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', use_unconstrained_client=True, use_generic_payload=True, - server_core_limit=SINGLE_MACHINE_CORES/2, secure=secure, categories=smoketest_categories) From c5943093b517c8672299307ac826e166509d1a6f Mon Sep 17 00:00:00 2001 From: yang-g Date: Tue, 10 May 2016 11:40:46 -0700 Subject: [PATCH 0408/1894] Change argument type to avoid undefined behavior --- test/core/client_config/lb_policies_test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/core/client_config/lb_policies_test.c b/test/core/client_config/lb_policies_test.c index e766672cf5d..2ec46124a89 100644 --- a/test/core/client_config/lb_policies_test.c +++ b/test/core/client_config/lb_policies_test.c @@ -438,9 +438,9 @@ static grpc_call **perform_multirequest(servers_fixture *f, return calls; } -static void assert_channel_connectivity( - grpc_channel *ch, size_t num_accepted_conn_states, - grpc_connectivity_state accepted_conn_state, ...) { +static void assert_channel_connectivity(grpc_channel *ch, + size_t num_accepted_conn_states, + int accepted_conn_state, ...) { size_t i; grpc_channel_stack *client_stack; grpc_channel_element *client_channel_filter; @@ -456,7 +456,7 @@ static void assert_channel_connectivity( grpc_exec_ctx_finish(&exec_ctx); va_start(ap, accepted_conn_state); for (i = 0; i < num_accepted_conn_states; i++) { - if (actual_conn_state == accepted_conn_state) { + if ((int)actual_conn_state == accepted_conn_state) { break; } accepted_conn_state = va_arg(ap, grpc_connectivity_state); From 6ab85d0c00cc60505991660afe40a20d936b14ff Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 10 May 2016 11:55:54 -0700 Subject: [PATCH 0409/1894] regenerate tests.json --- tools/run_tests/tests.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 1939da7aec4..f1d302f2ef2 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -23105,7 +23105,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -23131,7 +23131,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -23157,7 +23157,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -23313,7 +23313,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -23339,7 +23339,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -23365,7 +23365,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 4, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 5, \"benchmark_seconds\": 30, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ From 06a5dc4d5d44156d1d115b905ac4d64ecbae858a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 10 May 2016 12:37:27 -0700 Subject: [PATCH 0410/1894] Fix refcounting bug --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 22614ba1306..d994aa38718 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1589,7 +1589,7 @@ static void parsing_action(grpc_exec_ctx *exec_ctx, void *arg, grpc_chttp2_transport *t = arg; GPR_TIMER_BEGIN("reading_action.parse", 0); size_t i = 0; - grpc_error *errors[2] = {error, GRPC_ERROR_NONE}; + grpc_error *errors[2] = {GRPC_ERROR_REF(error), GRPC_ERROR_NONE}; for (; i < t->read_buffer.count && errors[1] == GRPC_ERROR_NONE; i++) { errors[1] = grpc_chttp2_perform_read(exec_ctx, &t->parsing, t->read_buffer.slices[i]); From 08eae3ddab24fb1168e0a5f7fce83b8c3788768f Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 10 May 2016 12:50:05 -0700 Subject: [PATCH 0411/1894] Make Node build_package script consistent with grpc-tools package.json file --- tools/run_tests/build_package_node.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/build_package_node.sh b/tools/run_tests/build_package_node.sh index 6bc9466b633..4646072a545 100755 --- a/tools/run_tests/build_package_node.sh +++ b/tools/run_tests/build_package_node.sh @@ -55,7 +55,7 @@ npm pack cp grpc-tools-*.tgz $artifacts/ tools_version=$(npm list | grep -oP '(?<=grpc-tools@)\S+') -output_dir=$artifacts/grpc-precompiled-binaries/node/grpc-tools/$tools_version +output_dir=$artifacts/grpc-precompiled-binaries/node/grpc-tools/v$tools_version mkdir -p $output_dir for arch in {x86,x64}; do From fc353d624944dcceeb67dd27e4fc48e747b17988 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 10 May 2016 12:58:03 -0700 Subject: [PATCH 0412/1894] Fix refcounting bug --- src/core/ext/client_config/client_channel.c | 2 +- src/core/ext/lb_policy/pick_first/pick_first.c | 1 - src/core/lib/transport/connectivity_state.c | 8 +++++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index 0b220c04d49..d00b9668122 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -147,7 +147,7 @@ static void on_lb_policy_state_changed_locked(grpc_exec_ctx *exec_ctx, w->chand->lb_policy = NULL; } set_channel_connectivity_state_locked(exec_ctx, w->chand, publish_state, - error, "lb_changed"); + GRPC_ERROR_REF(error), "lb_changed"); if (w->state != GRPC_CHANNEL_FATAL_FAILURE) { watch_lb_policy(exec_ctx, w->chand, w->lb_policy, w->state); } diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c index bc52e2804fc..6aa8688ed69 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -359,7 +359,6 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, GRPC_SUBCHANNEL_UNREF(exec_ctx, p->subchannels[p->num_subchannels], "pick_first"); if (p->num_subchannels == 0) { - GRPC_ERROR_REF(error); grpc_connectivity_state_set( exec_ctx, &p->state_tracker, GRPC_CHANNEL_FATAL_FAILURE, GRPC_ERROR_CREATE_REFERENCING("Pick first exhausted channels", diff --git a/src/core/lib/transport/connectivity_state.c b/src/core/lib/transport/connectivity_state.c index da0de276a2d..3286af9fb2f 100644 --- a/src/core/lib/transport/connectivity_state.c +++ b/src/core/lib/transport/connectivity_state.c @@ -152,9 +152,11 @@ void grpc_connectivity_state_set(grpc_exec_ctx *exec_ctx, grpc_error *error, const char *reason) { grpc_connectivity_state_watcher *w; if (grpc_connectivity_state_trace) { - gpr_log(GPR_DEBUG, "SET: %p %s: %s --> %s [%s]", tracker, tracker->name, - grpc_connectivity_state_name(tracker->current_state), - grpc_connectivity_state_name(state), reason); + const char *error_string = grpc_error_string(error); + gpr_log(GPR_DEBUG, "SET: %p %s: %s --> %s [%s] error=%p %s", tracker, + tracker->name, grpc_connectivity_state_name(tracker->current_state), + grpc_connectivity_state_name(state), reason, error, error_string); + grpc_error_free_string(error_string); } switch (state) { case GRPC_CHANNEL_CONNECTING: From 10dd6f299d904ff4a2cc2a9a4048d3d71f7f0877 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 10 May 2016 13:06:15 -0700 Subject: [PATCH 0413/1894] Fix refcounting bugs --- src/core/lib/surface/call.c | 3 +++ src/core/lib/surface/channel_ping.c | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 1ad635710a5..2dea2147cec 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1172,11 +1172,14 @@ static void finish_batch(grpc_exec_ctx *exec_ctx, void *bctlp, GRPC_ERROR_UNREF(error); error = GRPC_ERROR_NONE; } + GRPC_ERROR_UNREF(bctl->error); bctl->error = error; gpr_mu_unlock(&call->mu); if (gpr_unref(&bctl->steps_to_complete)) { post_batch_completion(exec_ctx, bctl); } + + GRPC_ERROR_UNREF(error); } static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/surface/channel_ping.c b/src/core/lib/surface/channel_ping.c index 3b4f1221f36..9818f9d2f24 100644 --- a/src/core/lib/surface/channel_ping.c +++ b/src/core/lib/surface/channel_ping.c @@ -55,8 +55,8 @@ static void ping_destroy(grpc_exec_ctx *exec_ctx, void *arg, static void ping_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { ping_result *pr = arg; - grpc_cq_end_op(exec_ctx, pr->cq, pr->tag, error, ping_destroy, pr, - &pr->completion_storage); + grpc_cq_end_op(exec_ctx, pr->cq, pr->tag, GRPC_ERROR_REF(error), ping_destroy, + pr, &pr->completion_storage); } void grpc_channel_ping(grpc_channel *channel, grpc_completion_queue *cq, From 1128019d578e67040465cf1c187ccff3bda5a467 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 6 May 2016 13:28:46 -0700 Subject: [PATCH 0414/1894] add netperf to init script --- tools/gce/linux_performance_worker_init.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/gce/linux_performance_worker_init.sh b/tools/gce/linux_performance_worker_init.sh index 96e8a1353cb..dc4784262e7 100755 --- a/tools/gce/linux_performance_worker_init.sh +++ b/tools/gce/linux_performance_worker_init.sh @@ -77,6 +77,9 @@ sudo apt-get install -y \ # perftools sudo apt-get install -y google-perftools libgoogle-perftools-dev +# netperf +sudo apt-get install -y netperf + # C++ dependencies sudo apt-get install -y libgflags-dev libgtest-dev libc++-dev clang From 4de2c3254bf9af853249d3ffc905dea8e982453c Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 10 May 2016 14:33:07 -0700 Subject: [PATCH 0415/1894] add support for running netperf scenario --- tools/gce/create_linux_performance_worker.sh | 2 +- .../run_tests/performance/bq_upload_result.py | 43 +++++++++++++++-- tools/run_tests/performance/run_netperf.sh | 45 ++++++++++++++++++ tools/run_tests/run_performance_tests.py | 47 ++++++++++++++++++- 4 files changed, 130 insertions(+), 7 deletions(-) create mode 100755 tools/run_tests/performance/run_netperf.sh diff --git a/tools/gce/create_linux_performance_worker.sh b/tools/gce/create_linux_performance_worker.sh index 96d5558d9a1..c9a0ffa4e10 100755 --- a/tools/gce/create_linux_performance_worker.sh +++ b/tools/gce/create_linux_performance_worker.sh @@ -50,7 +50,7 @@ gcloud compute instances create $INSTANCE_NAME \ --machine-type $MACHINE_TYPE \ --image ubuntu-15-10 \ --boot-disk-size 300 \ - --scope https://www.googleapis.com/auth/bigquery + --scopes https://www.googleapis.com/auth/bigquery echo 'Created GCE instance, waiting 60 seconds for it to come online.' sleep 60 diff --git a/tools/run_tests/performance/bq_upload_result.py b/tools/run_tests/performance/bq_upload_result.py index ebd28f75918..fbccf3bdcab 100755 --- a/tools/run_tests/performance/bq_upload_result.py +++ b/tools/run_tests/performance/bq_upload_result.py @@ -48,20 +48,47 @@ import big_query_utils _PROJECT_ID='grpc-testing' -def _upload_scenario_result_to_bigquery(dataset_id, table_id, result_file): +def _upload_netperf_latency_csv_to_bigquery(dataset_id, table_id, result_file): + with open(result_file, 'r') as f: + (col1, col2, col3) = f.read().split(',') + latency50 = float(col1.strip()) * 1000 + latency90 = float(col2.strip()) * 1000 + latency99 = float(col3.strip()) * 1000 + + scenario_result = { + 'scenario': { + 'name': 'netperf_tcp_rr' + }, + 'summary': { + 'latency50': latency50, + 'latency90': latency90, + 'latency99': latency99 + } + } + bq = big_query_utils.create_big_query() _create_results_table(bq, dataset_id, table_id) + if not _insert_result(bq, dataset_id, table_id, scenario_result, flatten=False): + print 'Error uploading result to bigquery.' + sys.exit(1) + + +def _upload_scenario_result_to_bigquery(dataset_id, table_id, result_file): with open(result_file, 'r') as f: scenario_result = json.loads(f.read()) + bq = big_query_utils.create_big_query() + _create_results_table(bq, dataset_id, table_id) + if not _insert_result(bq, dataset_id, table_id, scenario_result): print 'Error uploading result to bigquery.' sys.exit(1) -def _insert_result(bq, dataset_id, table_id, scenario_result): - _flatten_result_inplace(scenario_result) +def _insert_result(bq, dataset_id, table_id, scenario_result, flatten=True): + if flatten: + _flatten_result_inplace(scenario_result) _populate_metadata_inplace(scenario_result) row = big_query_utils.make_row(str(uuid.uuid4()), scenario_result) return big_query_utils.insert_rows(bq, @@ -127,9 +154,17 @@ argp.add_argument('--bq_result_table', required=True, default=None, type=str, help='Bigquery "dataset.table" to upload results to.') argp.add_argument('--file_to_upload', default='scenario_result.json', type=str, help='Report file to upload.') +argp.add_argument('--file_format', + choices=['scenario_result','netperf_latency_csv'], + default='scenario_result', + help='Format of the file to upload.') args = argp.parse_args() dataset_id, table_id = args.bq_result_table.split('.', 2) -_upload_scenario_result_to_bigquery(dataset_id, table_id, args.file_to_upload) + +if args.file_format == 'netperf_latency_csv': + _upload_netperf_latency_csv_to_bigquery(dataset_id, table_id, args.file_to_upload) +else: + _upload_scenario_result_to_bigquery(dataset_id, table_id, args.file_to_upload) print 'Successfully uploaded %s to BigQuery.\n' % args.file_to_upload diff --git a/tools/run_tests/performance/run_netperf.sh b/tools/run_tests/performance/run_netperf.sh new file mode 100755 index 00000000000..55a0c31bd22 --- /dev/null +++ b/tools/run_tests/performance/run_netperf.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -ex + +cd $(dirname $0)/../../.. + +netperf >netperf_latency.txt -P 0 -t TCP_RR -H "$NETPERF_SERVER_HOST" -- -o P50_LATENCY,P90_LATENCY,P99_LATENCY + +cat netperf_latency.txt + +if [ "$BQ_RESULT_TABLE" != "" ] +then + tools/run_tests/performance/bq_upload_result.py \ + --file_to_upload=netperf_latency.txt \ + --file_format=netperf_latency_csv \ + --bq_result_table="$BQ_RESULT_TABLE" +fi diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py index b1f5889e541..674d8645396 100755 --- a/tools/run_tests/run_performance_tests.py +++ b/tools/run_tests/run_performance_tests.py @@ -131,6 +131,25 @@ def create_quit_jobspec(workers, remote_host=None): verbose_success=True) +def create_netperf_jobspec(server_host='localhost', client_host=None, + bq_result_table=None): + """Runs netperf benchmark.""" + cmd = 'NETPERF_SERVER_HOST="%s" ' % server_host + if bq_result_table: + cmd += 'BQ_RESULT_TABLE="%s" ' % bq_result_table + cmd += 'tools/run_tests/performance/run_netperf.sh' + if client_host: + user_at_host = '%s@%s' % (_REMOTE_HOST_USERNAME, client_host) + cmd = 'ssh %s "cd ~/performance_workspace/grpc/ && "%s' % (user_at_host, pipes.quote(cmd)) + + return jobset.JobSpec( + cmdline=[cmd], + shortname='netperf', + timeout_seconds=60, + shell=True, + verbose_success=True) + + def archive_repo(languages): """Archives local version of repo including submodules.""" cmdline=['tar', '-cf', '../grpc.tar', '../grpc/'] @@ -244,12 +263,28 @@ def start_qpsworkers(languages, worker_hosts): def create_scenarios(languages, workers_by_lang, remote_host=None, regex='.*', - category='all', bq_result_table=None): + category='all', bq_result_table=None, + netperf=False, netperf_hosts=[]): """Create jobspecs for scenarios to run.""" all_workers = [worker for workers in workers_by_lang.values() for worker in workers] scenarios = [] + + if netperf: + if not netperf_hosts: + netperf_server='localhost' + netperf_client=None + elif len(netperf_hosts) == 1: + netperf_server=netperf_hosts[0] + netperf_client=netperf_hosts[0] + else: + netperf_server=netperf_hosts[0] + netperf_client=netperf_hosts[1] + scenarios.append(create_netperf_jobspec(server_host=netperf_server, + client_host=netperf_client, + bq_result_table=bq_result_table)) + for language in languages: for scenario_json in language.scenarios(): if re.search(args.regex, scenario_json['name']): @@ -316,6 +351,11 @@ argp.add_argument('--category', choices=['smoketest','all'], default='smoketest', help='Select a category of tests to run. Smoketest runs by default.') +argp.add_argument('--netperf', + default=False, + action='store_const', + const=True, + help='Run netperf benchmark as one of the scenarios.') args = argp.parse_args() @@ -360,7 +400,10 @@ try: remote_host=args.remote_driver_host, regex=args.regex, category=args.category, - bq_result_table=args.bq_result_table) + bq_result_table=args.bq_result_table, + netperf=args.netperf, + netperf_hosts=args.remote_worker_host) + if not scenarios: raise Exception('No scenarios to run') From 6de6971bdca299edf4632c978310a8ca08daa672 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 10 May 2016 12:09:56 -0700 Subject: [PATCH 0416/1894] explicitly specify request and response size for netperf --- tools/run_tests/performance/run_netperf.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/performance/run_netperf.sh b/tools/run_tests/performance/run_netperf.sh index 55a0c31bd22..298edbe0c3a 100755 --- a/tools/run_tests/performance/run_netperf.sh +++ b/tools/run_tests/performance/run_netperf.sh @@ -32,7 +32,7 @@ set -ex cd $(dirname $0)/../../.. -netperf >netperf_latency.txt -P 0 -t TCP_RR -H "$NETPERF_SERVER_HOST" -- -o P50_LATENCY,P90_LATENCY,P99_LATENCY +netperf >netperf_latency.txt -P 0 -t TCP_RR -H "$NETPERF_SERVER_HOST" -- -r 1,1 -o P50_LATENCY,P90_LATENCY,P99_LATENCY cat netperf_latency.txt From b08fa491c9f3d6059a26663f72633d2f66f35f4b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 10 May 2016 14:56:05 -0700 Subject: [PATCH 0417/1894] Fix refcounting bugs --- src/core/lib/surface/call.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 2dea2147cec..7709ef5738e 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -962,6 +962,7 @@ static void post_batch_completion(grpc_exec_ctx *exec_ctx, batch_control *bctl) { grpc_call *call = bctl->call; if (bctl->is_notify_tag_closure) { + /* unrefs bctl->error */ grpc_exec_ctx_push(exec_ctx, bctl->notify_tag, bctl->error, NULL); gpr_mu_lock(&call->mu); bctl->call->used_batches = @@ -970,6 +971,7 @@ static void post_batch_completion(grpc_exec_ctx *exec_ctx, gpr_mu_unlock(&call->mu); GRPC_CALL_INTERNAL_UNREF(exec_ctx, call, "completion"); } else { + /* unrefs bctl->error */ grpc_cq_end_op(exec_ctx, bctl->call->cq, bctl->notify_tag, bctl->error, finish_batch_completion, bctl, &bctl->cq_completion); } @@ -1173,7 +1175,7 @@ static void finish_batch(grpc_exec_ctx *exec_ctx, void *bctlp, error = GRPC_ERROR_NONE; } GRPC_ERROR_UNREF(bctl->error); - bctl->error = error; + bctl->error = GRPC_ERROR_REF(error); gpr_mu_unlock(&call->mu); if (gpr_unref(&bctl->steps_to_complete)) { post_batch_completion(exec_ctx, bctl); From e77e9b301039cc7164bc420d2e46621fb9cb1315 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 10 May 2016 15:16:24 -0700 Subject: [PATCH 0418/1894] fixed wrong malloc in test code for dns resolv --- .../client_config/resolvers/dns_resolver_connectivity_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/client_config/resolvers/dns_resolver_connectivity_test.c b/test/core/client_config/resolvers/dns_resolver_connectivity_test.c index f6067463d51..69c07d83f43 100644 --- a/test/core/client_config/resolvers/dns_resolver_connectivity_test.c +++ b/test/core/client_config/resolvers/dns_resolver_connectivity_test.c @@ -77,7 +77,7 @@ static grpc_error *my_resolve_address(const char *name, const char *addr, return GRPC_ERROR_CREATE("Forced Failure"); } else { gpr_mu_unlock(&g_mu); - *addrs = gpr_malloc(sizeof(*addrs)); + *addrs = gpr_malloc(sizeof(**addrs)); (*addrs)->naddrs = 1; (*addrs)->addrs = gpr_malloc(sizeof(*(*addrs)->addrs)); (*addrs)->addrs[0].len = 123; From 19cd009ec14c1a759fe4d0ef79eb3fab738137ca Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Tue, 10 May 2016 15:27:48 -0700 Subject: [PATCH 0419/1894] clang-format --- include/grpc++/impl/codegen/method_handler_impl.h | 14 ++++++++------ .../credentials/composite/composite_credentials.c | 1 - .../credentials/composite/composite_credentials.h | 1 - src/core/lib/security/credentials/credentials.c | 8 +++----- .../security/credentials/fake/fake_credentials.c | 1 - .../security/credentials/fake/fake_credentials.h | 1 - .../google_default/google_default_credentials.c | 2 +- .../google_default/google_default_credentials.h | 2 -- .../lib/security/credentials/iam/iam_credentials.c | 2 -- .../lib/security/credentials/iam/iam_credentials.h | 3 --- src/core/lib/security/credentials/jwt/json_token.c | 1 - .../lib/security/credentials/jwt/jwt_credentials.c | 1 - .../lib/security/credentials/jwt/jwt_credentials.h | 1 - .../credentials/oauth2/oauth2_credentials.c | 2 -- .../credentials/oauth2/oauth2_credentials.h | 2 -- .../credentials/plugin/plugin_credentials.c | 2 -- .../credentials/plugin/plugin_credentials.h | 3 --- .../lib/security/credentials/ssl/ssl_credentials.c | 4 ---- .../lib/security/credentials/ssl/ssl_credentials.h | 1 - src/core/lib/security/util/json_util.c | 1 - src/core/lib/security/util/json_util.h | 4 +--- test/core/security/jwt_verifier_test.c | 2 +- .../security/print_google_default_creds_token.c | 2 +- test/cpp/qps/client_async.cc | 12 ++++++++---- test/cpp/qps/server_async.cc | 6 ++++-- 25 files changed, 27 insertions(+), 52 deletions(-) diff --git a/include/grpc++/impl/codegen/method_handler_impl.h b/include/grpc++/impl/codegen/method_handler_impl.h index ad74efabc4b..21ac6c4fb55 100644 --- a/include/grpc++/impl/codegen/method_handler_impl.h +++ b/include/grpc++/impl/codegen/method_handler_impl.h @@ -44,10 +44,10 @@ namespace grpc { template class RpcMethodHandler : public MethodHandler { public: - RpcMethodHandler( - std::function func, - ServiceType* service) + RpcMethodHandler(std::function + func, + ServiceType* service) : func_(func), service_(service) {} void RunHandler(const HandlerParameter& param) GRPC_FINAL { @@ -88,7 +88,8 @@ class ClientStreamingHandler : public MethodHandler { public: ClientStreamingHandler( std::function*, ResponseType*)> func, + ServerReader*, ResponseType*)> + func, ServiceType* service) : func_(func), service_(service) {} @@ -124,7 +125,8 @@ class ServerStreamingHandler : public MethodHandler { public: ServerStreamingHandler( std::function*)> func, + ServerWriter*)> + func, ServiceType* service) : func_(func), service_(service) {} diff --git a/src/core/lib/security/credentials/composite/composite_credentials.c b/src/core/lib/security/credentials/composite/composite_credentials.c index 4a17f7c1b98..18189a8fb8c 100644 --- a/src/core/lib/security/credentials/composite/composite_credentials.c +++ b/src/core/lib/security/credentials/composite/composite_credentials.c @@ -260,4 +260,3 @@ grpc_channel_credentials *grpc_composite_channel_credentials_create( c->call_creds = grpc_call_credentials_ref(call_creds); return &c->base; } - diff --git a/src/core/lib/security/credentials/composite/composite_credentials.h b/src/core/lib/security/credentials/composite/composite_credentials.h index c83f74429f9..3e360c177f7 100644 --- a/src/core/lib/security/credentials/composite/composite_credentials.h +++ b/src/core/lib/security/credentials/composite/composite_credentials.h @@ -69,4 +69,3 @@ typedef struct { } grpc_composite_call_credentials; #endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_COMPOSITE_CREDENTIALS_H - diff --git a/src/core/lib/security/credentials/credentials.c b/src/core/lib/security/credentials/credentials.c index 29cf9ee8840..3dde6e587de 100644 --- a/src/core/lib/security/credentials/credentials.c +++ b/src/core/lib/security/credentials/credentials.c @@ -53,10 +53,9 @@ /* -- Common. -- */ -grpc_credentials_metadata_request * -grpc_credentials_metadata_request_create(grpc_call_credentials *creds, - grpc_credentials_metadata_cb cb, - void *user_data) { +grpc_credentials_metadata_request *grpc_credentials_metadata_request_create( + grpc_call_credentials *creds, grpc_credentials_metadata_cb cb, + void *user_data) { grpc_credentials_metadata_request *r = gpr_malloc(sizeof(grpc_credentials_metadata_request)); r->creds = grpc_call_credentials_ref(creds); @@ -230,4 +229,3 @@ grpc_server_credentials *grpc_find_server_credentials_in_args( } return NULL; } - diff --git a/src/core/lib/security/credentials/fake/fake_credentials.c b/src/core/lib/security/credentials/fake/fake_credentials.c index 2a5d225078f..54d7cf25819 100644 --- a/src/core/lib/security/credentials/fake/fake_credentials.c +++ b/src/core/lib/security/credentials/fake/fake_credentials.c @@ -136,4 +136,3 @@ grpc_call_credentials *grpc_md_only_test_credentials_create( c->is_async = is_async; return &c->base; } - diff --git a/src/core/lib/security/credentials/fake/fake_credentials.h b/src/core/lib/security/credentials/fake/fake_credentials.h index 10c2a0b5ce6..e2403b5d807 100644 --- a/src/core/lib/security/credentials/fake/fake_credentials.h +++ b/src/core/lib/security/credentials/fake/fake_credentials.h @@ -53,4 +53,3 @@ typedef struct { } grpc_md_only_test_credentials; #endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_CREDENTIALS_H - diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.c b/src/core/lib/security/credentials/google_default/google_default_credentials.c index da23bba62b9..a521d95abce 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.c +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.c @@ -41,8 +41,8 @@ #include "src/core/lib/http/httpcli.h" #include "src/core/lib/http/parser.h" -#include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" #include "src/core/lib/security/credentials/jwt/jwt_credentials.h" +#include "src/core/lib/security/credentials/oauth2/oauth2_credentials.h" #include "src/core/lib/support/env.h" #include "src/core/lib/support/load_file.h" #include "src/core/lib/surface/api_trace.h" diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.h b/src/core/lib/security/credentials/google_default/google_default_credentials.h index 33e8c2ec8d6..838989f6f0a 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.h +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.h @@ -43,5 +43,3 @@ void grpc_flush_cached_google_default_credentials(void); #endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_GOOGLE_DEFAULT_CREDENTIALS_H - - diff --git a/src/core/lib/security/credentials/iam/iam_credentials.c b/src/core/lib/security/credentials/iam/iam_credentials.c index ec0f2841f21..89defa7c60b 100644 --- a/src/core/lib/security/credentials/iam/iam_credentials.c +++ b/src/core/lib/security/credentials/iam/iam_credentials.c @@ -83,5 +83,3 @@ grpc_call_credentials *grpc_google_iam_credentials_create( c->iam_md, GRPC_IAM_AUTHORITY_SELECTOR_METADATA_KEY, authority_selector); return &c->base; } - - diff --git a/src/core/lib/security/credentials/iam/iam_credentials.h b/src/core/lib/security/credentials/iam/iam_credentials.h index 7110eaf4781..06b4db8bef2 100644 --- a/src/core/lib/security/credentials/iam/iam_credentials.h +++ b/src/core/lib/security/credentials/iam/iam_credentials.h @@ -42,6 +42,3 @@ typedef struct { } grpc_google_iam_credentials; #endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_IAM_CREDENTIALS_H - - - diff --git a/src/core/lib/security/credentials/jwt/json_token.c b/src/core/lib/security/credentials/jwt/json_token.c index fd3d0d6a64f..354c13133ef 100644 --- a/src/core/lib/security/credentials/jwt/json_token.c +++ b/src/core/lib/security/credentials/jwt/json_token.c @@ -318,4 +318,3 @@ void grpc_jwt_encode_and_sign_set_override( grpc_jwt_encode_and_sign_override func) { g_jwt_encode_and_sign_override = func; } - diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.c b/src/core/lib/security/credentials/jwt/jwt_credentials.c index 9fd0527a52a..8755a96af4f 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.c +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.c @@ -158,4 +158,3 @@ grpc_call_credentials *grpc_service_account_jwt_access_credentials_create( return grpc_service_account_jwt_access_credentials_create_from_auth_json_key( grpc_auth_json_key_create_from_string(json_key), token_lifetime); } - diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.h b/src/core/lib/security/credentials/jwt/jwt_credentials.h index 6faf6764149..6fba3dfcfd0 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.h +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.h @@ -60,4 +60,3 @@ grpc_service_account_jwt_access_credentials_create_from_auth_json_key( grpc_auth_json_key key, gpr_timespec token_lifetime); #endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_CREDENTIALS_H - diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c index 0984d1f53fa..973c6e1d17f 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c @@ -426,5 +426,3 @@ grpc_call_credentials *grpc_access_token_credentials_create( gpr_free(token_md_value); return &c->base; } - - diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h index 6cdcc68514e..658cde89c16 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h @@ -82,7 +82,6 @@ typedef struct { grpc_fetch_oauth2_func fetch_func; } grpc_oauth2_token_fetcher_credentials; - // Google refresh token credentials. typedef struct { grpc_oauth2_token_fetcher_credentials base; @@ -108,4 +107,3 @@ grpc_oauth2_token_fetcher_credentials_parse_server_response( grpc_credentials_md_store **token_md, gpr_timespec *token_lifetime); #endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_CREDENTIALS_H - diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.c b/src/core/lib/security/credentials/plugin/plugin_credentials.c index b075e145514..bae357321ea 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.c +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.c @@ -127,5 +127,3 @@ grpc_call_credentials *grpc_metadata_credentials_create_from_plugin( c->plugin = plugin; return &c->base; } - - diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.h b/src/core/lib/security/credentials/plugin/plugin_credentials.h index cdabbbd30f7..0b91d2f6162 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.h +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.h @@ -43,6 +43,3 @@ typedef struct { } grpc_plugin_credentials; #endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_PLUGIN_CREDENTIALS_H - - - diff --git a/src/core/lib/security/credentials/ssl/ssl_credentials.c b/src/core/lib/security/credentials/ssl/ssl_credentials.c index ee8d2e4365f..545bca9d98b 100644 --- a/src/core/lib/security/credentials/ssl/ssl_credentials.c +++ b/src/core/lib/security/credentials/ssl/ssl_credentials.c @@ -160,7 +160,6 @@ static void ssl_server_destruct(grpc_server_credentials *creds) { if (c->config.pem_root_certs != NULL) gpr_free(c->config.pem_root_certs); } - static grpc_security_status ssl_server_create_security_connector( grpc_server_credentials *creds, grpc_server_security_connector **sc) { grpc_ssl_server_credentials *c = (grpc_ssl_server_credentials *)creds; @@ -170,7 +169,6 @@ static grpc_security_status ssl_server_create_security_connector( static grpc_server_credentials_vtable ssl_server_vtable = { ssl_server_destruct, ssl_server_create_security_connector}; - static void ssl_build_server_config( const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, size_t num_key_cert_pairs, @@ -206,7 +204,6 @@ static void ssl_build_server_config( } } - grpc_server_credentials *grpc_ssl_server_credentials_create( const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, size_t num_key_cert_pairs, int force_client_auth, void *reserved) { @@ -241,4 +238,3 @@ grpc_server_credentials *grpc_ssl_server_credentials_create_ex( &c->config); return &c->base; } - diff --git a/src/core/lib/security/credentials/ssl/ssl_credentials.h b/src/core/lib/security/credentials/ssl/ssl_credentials.h index ea4bdabc048..f23dbdbe494 100644 --- a/src/core/lib/security/credentials/ssl/ssl_credentials.h +++ b/src/core/lib/security/credentials/ssl/ssl_credentials.h @@ -46,4 +46,3 @@ typedef struct { } grpc_ssl_server_credentials; #endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_SSL_SSL_CREDENTIALS_H */ - diff --git a/src/core/lib/security/util/json_util.c b/src/core/lib/security/util/json_util.c index 9eda12c6281..7eed039baa0 100644 --- a/src/core/lib/security/util/json_util.c +++ b/src/core/lib/security/util/json_util.c @@ -59,4 +59,3 @@ bool grpc_copy_json_string_property(const grpc_json *json, *copied_value = gpr_strdup(prop_value); return true; } - diff --git a/src/core/lib/security/util/json_util.h b/src/core/lib/security/util/json_util.h index 3046412729d..5959626a5fe 100644 --- a/src/core/lib/security/util/json_util.h +++ b/src/core/lib/security/util/json_util.h @@ -50,8 +50,6 @@ const char *grpc_json_get_string_property(const grpc_json *json, // Copies the value of the json child property specified by prop_name. // Returns false if the property was not found. bool grpc_copy_json_string_property(const grpc_json *json, - const char *prop_name, - char **copied_value); + const char *prop_name, char **copied_value); #endif // GRPC_CORE_LIB_SECURITY_UTIL_JSON_UTIL_H - diff --git a/test/core/security/jwt_verifier_test.c b/test/core/security/jwt_verifier_test.c index 50bf25171c9..7f4f4ffadfc 100644 --- a/test/core/security/jwt_verifier_test.c +++ b/test/core/security/jwt_verifier_test.c @@ -43,8 +43,8 @@ #include #include "src/core/lib/http/httpcli.h" -#include "src/core/lib/security/util/b64.h" #include "src/core/lib/security/credentials/jwt/json_token.h" +#include "src/core/lib/security/util/b64.h" #include "test/core/util/test_config.h" /* This JSON key was generated with the GCE console and revoked immediately. diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c index 10a5e5224ef..1b7036cf9ea 100644 --- a/test/core/security/print_google_default_creds_token.c +++ b/test/core/security/print_google_default_creds_token.c @@ -42,8 +42,8 @@ #include #include -#include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/composite/composite_credentials.h" +#include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/support/string.h" typedef struct { diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index e72cef28114..c32160a7d45 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -84,7 +84,8 @@ class ClientRpcContextUnaryImpl : public ClientRpcContext { std::function< std::unique_ptr>( BenchmarkService::Stub*, grpc::ClientContext*, const RequestType&, - CompletionQueue*)> start_req, + CompletionQueue*)> + start_req, std::function on_done) : context_(), stub_(stub), @@ -165,7 +166,8 @@ class AsyncClient : public ClientImpl { AsyncClient(const ClientConfig& config, std::function next_issue, - const RequestType&)> setup_ctx, + const RequestType&)> + setup_ctx, std::function(std::shared_ptr)> create_stub) : ClientImpl(config, create_stub), @@ -278,7 +280,8 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext { std::function>( BenchmarkService::Stub*, grpc::ClientContext*, CompletionQueue*, - void*)> start_req, + void*)> + start_req, std::function on_done) : context_(), stub_(stub), @@ -405,7 +408,8 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext { std::function next_issue, std::function( grpc::GenericStub*, grpc::ClientContext*, - const grpc::string& method_name, CompletionQueue*, void*)> start_req, + const grpc::string& method_name, CompletionQueue*, void*)> + start_req, std::function on_done) : context_(), stub_(stub), diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index a68f1ae7b67..1234542687d 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -73,7 +73,8 @@ class AsyncQpsServerTest : public Server { CompletionQueue *, ServerCompletionQueue *, void *)> request_streaming_function, std::function process_rpc) + ResponseType *)> + process_rpc) : Server(config) { char *server_address = NULL; @@ -190,7 +191,8 @@ class AsyncQpsServerTest : public Server { ServerRpcContextUnaryImpl( std::function *, - void *)> request_method, + void *)> + request_method, std::function invoke_method) : srv_ctx_(new ServerContextType), From 82c63ebc7655e87cdac172035b4d4474b18e2f2d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 10 May 2016 15:28:01 -0700 Subject: [PATCH 0420/1894] Fix refcounting bugs --- src/core/ext/client_config/subchannel.c | 5 +++++ src/core/lib/iomgr/error.c | 1 + src/core/lib/iomgr/tcp_client_posix.c | 2 ++ src/core/lib/iomgr/timer.c | 5 +++++ src/core/lib/security/transport/handshake.c | 5 +++++ 5 files changed, 18 insertions(+) diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c index 69b1fa5d343..ead28dbd123 100644 --- a/src/core/ext/client_config/subchannel.c +++ b/src/core/ext/client_config/subchannel.c @@ -606,6 +606,10 @@ static void on_alarm(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { GRPC_ERROR_REF(error); } if (error != GRPC_ERROR_NONE) { + const char *msg = grpc_error_string(error); + gpr_log(GPR_INFO, "Failed to connect to channel, retrying: %s", msg); + grpc_error_free_string(msg); + c->next_attempt = gpr_backoff_step(&c->backoff_state, gpr_now(GPR_CLOCK_MONOTONIC)); continue_connect(exec_ctx, c); @@ -614,6 +618,7 @@ static void on_alarm(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { gpr_mu_unlock(&c->mu); GRPC_SUBCHANNEL_WEAK_UNREF(exec_ctx, c, "connecting"); } + GRPC_ERROR_UNREF(error); } static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *arg, diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index b936ec96526..7e5d74b495c 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -223,6 +223,7 @@ static grpc_error *copy_error_and_unref(grpc_error *in) { return GRPC_ERROR_CREATE("unknown"); } grpc_error *out = gpr_malloc(sizeof(*out)); + gpr_log(GPR_DEBUG, "%p create copying", out); out->ints = gpr_avl_ref(in->ints); out->strs = gpr_avl_ref(in->strs); out->errs = gpr_avl_ref(in->errs); diff --git a/src/core/lib/iomgr/tcp_client_posix.c b/src/core/lib/iomgr/tcp_client_posix.c index c70f11b40a8..9c4ca1617f0 100644 --- a/src/core/lib/iomgr/tcp_client_posix.c +++ b/src/core/lib/iomgr/tcp_client_posix.c @@ -128,6 +128,8 @@ static void on_writable(grpc_exec_ctx *exec_ctx, void *acp, grpc_error *error) { grpc_closure *closure = ac->closure; grpc_fd *fd; + GRPC_ERROR_REF(error); + if (grpc_tcp_trace) { const char *str = grpc_error_string(error); gpr_log(GPR_DEBUG, "CLIENT_CONNECT: %s: on_writable: error=%s", diff --git a/src/core/lib/iomgr/timer.c b/src/core/lib/iomgr/timer.c index 99a66ee0429..b46c6df287d 100644 --- a/src/core/lib/iomgr/timer.c +++ b/src/core/lib/iomgr/timer.c @@ -239,6 +239,11 @@ void grpc_timer_init(grpc_exec_ctx *exec_ctx, grpc_timer *timer, } void grpc_timer_cancel(grpc_exec_ctx *exec_ctx, grpc_timer *timer) { + if (!g_initialized) { + /* must have already been cancelled, also the shard mutex is invalid */ + return; + } + shard_type *shard = &g_shards[shard_idx(timer)]; gpr_mu_lock(&shard->mu); if (!timer->triggered) { diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c index b3fc3d56d95..c87262f1245 100644 --- a/src/core/lib/security/transport/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -107,6 +107,10 @@ static void security_handshake_done(grpc_exec_ctx *exec_ctx, h->cb(exec_ctx, h->user_data, GRPC_SECURITY_OK, h->secure_endpoint, h->auth_context); } else { + const char *msg = grpc_error_string(error); + gpr_log(GPR_ERROR, "Security handshake failed: %s", msg); + grpc_error_free_string(msg); + if (h->secure_endpoint != NULL) { grpc_endpoint_shutdown(exec_ctx, h->secure_endpoint); grpc_endpoint_destroy(exec_ctx, h->secure_endpoint); @@ -123,6 +127,7 @@ static void security_handshake_done(grpc_exec_ctx *exec_ctx, GRPC_AUTH_CONTEXT_UNREF(h->auth_context, "handshake"); GRPC_SECURITY_CONNECTOR_UNREF(h->connector, "handshake"); gpr_free(h); + GRPC_ERROR_UNREF(error); } static void on_peer_checked(grpc_exec_ctx *exec_ctx, void *user_data, From 2b2f414dd1cb3d1f72c8f2713e381f1bb260b3f7 Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Tue, 10 May 2016 15:29:42 -0700 Subject: [PATCH 0421/1894] Fixing headers. --- .../credentials/composite/composite_credentials.h | 6 +++--- src/core/lib/security/credentials/fake/fake_credentials.h | 8 ++++---- .../google_default/google_default_credentials.h | 7 +++---- src/core/lib/security/credentials/iam/iam_credentials.h | 8 +++----- src/core/lib/security/credentials/jwt/jwt_credentials.h | 6 +++--- .../lib/security/credentials/oauth2/oauth2_credentials.h | 6 +++--- .../lib/security/credentials/plugin/plugin_credentials.h | 8 +++----- src/core/lib/security/util/json_util.h | 2 +- tools/dockerfile/grpc_clang_format/Dockerfile | 5 ++--- 9 files changed, 25 insertions(+), 31 deletions(-) diff --git a/src/core/lib/security/credentials/composite/composite_credentials.h b/src/core/lib/security/credentials/composite/composite_credentials.h index c83f74429f9..96d3b14cc42 100644 --- a/src/core/lib/security/credentials/composite/composite_credentials.h +++ b/src/core/lib/security/credentials/composite/composite_credentials.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_COMPOSITE_CREDENTIALS_H -#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_COMPOSITE_CREDENTIALS_H +#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_COMPOSITE_COMPOSITE_CREDENTIALS_H +#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_COMPOSITE_COMPOSITE_CREDENTIALS_H #include "src/core/lib/security/credentials/credentials.h" @@ -68,5 +68,5 @@ typedef struct { grpc_call_credentials_array inner; } grpc_composite_call_credentials; -#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_COMPOSITE_CREDENTIALS_H +#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_COMPOSITE_COMPOSITE_CREDENTIALS_H */ diff --git a/src/core/lib/security/credentials/fake/fake_credentials.h b/src/core/lib/security/credentials/fake/fake_credentials.h index 10c2a0b5ce6..9cf38084a3d 100644 --- a/src/core/lib/security/credentials/fake/fake_credentials.h +++ b/src/core/lib/security/credentials/fake/fake_credentials.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_CREDENTIALS_H -#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_CREDENTIALS_H +#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_FAKE_CREDENTIALS_H +#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_FAKE_CREDENTIALS_H #include "src/core/lib/security/credentials/credentials.h" @@ -40,6 +40,7 @@ /* Creates a fake transport security credentials object for testing. */ grpc_channel_credentials *grpc_fake_transport_security_credentials_create(void); + /* Creates a fake server transport security credentials object for testing. */ grpc_server_credentials *grpc_fake_transport_security_server_credentials_create( void); @@ -52,5 +53,4 @@ typedef struct { int is_async; } grpc_md_only_test_credentials; -#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_CREDENTIALS_H - +#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_FAKE_CREDENTIALS_H */ diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.h b/src/core/lib/security/credentials/google_default/google_default_credentials.h index 33e8c2ec8d6..fa3f1ae1bf7 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.h +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_GOOGLE_DEFAULT_CREDENTIALS_H -#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_GOOGLE_DEFAULT_CREDENTIALS_H +#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_GOOGLE_DEFAULT_GOOGLE_DEFAULT_CREDENTIALS_H +#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_GOOGLE_DEFAULT_GOOGLE_DEFAULT_CREDENTIALS_H #include "src/core/lib/security/credentials/credentials.h" @@ -42,6 +42,5 @@ void grpc_flush_cached_google_default_credentials(void); -#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_GOOGLE_DEFAULT_CREDENTIALS_H - +#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_GOOGLE_DEFAULT_GOOGLE_DEFAULT_CREDENTIALS_H */ diff --git a/src/core/lib/security/credentials/iam/iam_credentials.h b/src/core/lib/security/credentials/iam/iam_credentials.h index 7110eaf4781..58b77723fd0 100644 --- a/src/core/lib/security/credentials/iam/iam_credentials.h +++ b/src/core/lib/security/credentials/iam/iam_credentials.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_IAM_CREDENTIALS_H -#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_IAM_CREDENTIALS_H +#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_IAM_IAM_CREDENTIALS_H +#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_IAM_IAM_CREDENTIALS_H #include "src/core/lib/security/credentials/credentials.h" @@ -41,7 +41,5 @@ typedef struct { grpc_credentials_md_store *iam_md; } grpc_google_iam_credentials; -#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_IAM_CREDENTIALS_H - - +#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_IAM_IAM_CREDENTIALS_H */ diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.h b/src/core/lib/security/credentials/jwt/jwt_credentials.h index 6faf6764149..acc73dd47fc 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.h +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_CREDENTIALS_H -#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_CREDENTIALS_H +#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_CREDENTIALS_H +#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_CREDENTIALS_H #include "src/core/lib/security/credentials/credentials.h" #include "src/core/lib/security/credentials/jwt/json_token.h" @@ -59,5 +59,5 @@ grpc_call_credentials * grpc_service_account_jwt_access_credentials_create_from_auth_json_key( grpc_auth_json_key key, gpr_timespec token_lifetime); -#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_CREDENTIALS_H +#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_CREDENTIALS_H */ diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h index 6cdcc68514e..4d28fce629d 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_CREDENTIALS_H -#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_CREDENTIALS_H +#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_OAUTH2_CREDENTIALS_H +#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_OAUTH2_CREDENTIALS_H #include "src/core/lib/json/json.h" #include "src/core/lib/security/credentials/credentials.h" @@ -107,5 +107,5 @@ grpc_oauth2_token_fetcher_credentials_parse_server_response( const struct grpc_http_response *response, grpc_credentials_md_store **token_md, gpr_timespec *token_lifetime); -#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_CREDENTIALS_H +#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_OAUTH2_CREDENTIALS_H */ diff --git a/src/core/lib/security/credentials/plugin/plugin_credentials.h b/src/core/lib/security/credentials/plugin/plugin_credentials.h index cdabbbd30f7..5b285311524 100644 --- a/src/core/lib/security/credentials/plugin/plugin_credentials.h +++ b/src/core/lib/security/credentials/plugin/plugin_credentials.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_PLUGIN_CREDENTIALS_H -#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_PLUGIN_CREDENTIALS_H +#ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_PLUGIN_PLUGIN_CREDENTIALS_H +#define GRPC_CORE_LIB_SECURITY_CREDENTIALS_PLUGIN_PLUGIN_CREDENTIALS_H #include "src/core/lib/security/credentials/credentials.h" @@ -42,7 +42,5 @@ typedef struct { grpc_credentials_md_store *plugin_md; } grpc_plugin_credentials; -#endif // GRPC_CORE_LIB_SECURITY_CREDENTIALS_PLUGIN_CREDENTIALS_H - - +#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_PLUGIN_PLUGIN_CREDENTIALS_H */ diff --git a/src/core/lib/security/util/json_util.h b/src/core/lib/security/util/json_util.h index 3046412729d..7f3d4659c39 100644 --- a/src/core/lib/security/util/json_util.h +++ b/src/core/lib/security/util/json_util.h @@ -53,5 +53,5 @@ bool grpc_copy_json_string_property(const grpc_json *json, const char *prop_name, char **copied_value); -#endif // GRPC_CORE_LIB_SECURITY_UTIL_JSON_UTIL_H +#endif /* GRPC_CORE_LIB_SECURITY_UTIL_JSON_UTIL_H */ diff --git a/tools/dockerfile/grpc_clang_format/Dockerfile b/tools/dockerfile/grpc_clang_format/Dockerfile index 41239e9c23b..4338b83e32e 100644 --- a/tools/dockerfile/grpc_clang_format/Dockerfile +++ b/tools/dockerfile/grpc_clang_format/Dockerfile @@ -30,9 +30,8 @@ FROM ubuntu:wily RUN apt-get update RUN apt-get -y install wget -RUN echo deb http://llvm.org/apt/wily/ llvm-toolchain-wily main >> /etc/apt/sources.list -RUN echo deb-src http://llvm.org/apt/wily/ llvm-toolchain-wily main >> /etc/apt/sources.list -RUN wget -O - http://llvm.org/apt/llvm-snapshot.gpg.key| apt-key add - +RUN echo deb http://llvm.org/apt/wily/ llvm-toolchain-wily-3.8 main >> /etc/apt/sources.list +RUN echo deb-src http://llvm.org/apt/wily/ llvm-toolchain-wily-3.8 main >> /etc/apt/sources.list RUN apt-get update RUN apt-get -y install clang-format-3.8 ADD clang_format_all_the_things.sh / From c810a3817014044926545f9c65e4c45ccb25ef9f Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Wed, 11 May 2016 00:15:32 +0200 Subject: [PATCH 0422/1894] Bumping protobuf submodule to beta-3-pre1. --- third_party/protobuf | 2 +- tools/distrib/python/grpcio_tools/protoc_lib_deps.py | 2 +- tools/run_tests/sanity/check_submodules.sh | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/third_party/protobuf b/third_party/protobuf index d5fb408ddc2..a1938b2aa9c 160000 --- a/third_party/protobuf +++ b/third_party/protobuf @@ -1 +1 @@ -Subproject commit d5fb408ddc281ffcadeb08699e65bb694656d0bd +Subproject commit a1938b2aa9ca86ce7ce50c27ff9737c1008d2a03 diff --git a/tools/distrib/python/grpcio_tools/protoc_lib_deps.py b/tools/distrib/python/grpcio_tools/protoc_lib_deps.py index 9f31172170d..135ac5cbb3b 100644 --- a/tools/distrib/python/grpcio_tools/protoc_lib_deps.py +++ b/tools/distrib/python/grpcio_tools/protoc_lib_deps.py @@ -29,4 +29,4 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # AUTO-GENERATED BY make_grpcio_tools.py! -CC_FILES=['google/protobuf/compiler/zip_writer.cc', 'google/protobuf/compiler/subprocess.cc', 'google/protobuf/compiler/ruby/ruby_generator.cc', 'google/protobuf/compiler/python/python_generator.cc', 'google/protobuf/compiler/plugin.pb.cc', 'google/protobuf/compiler/plugin.cc', 'google/protobuf/compiler/objectivec/objectivec_primitive_field.cc', 'google/protobuf/compiler/objectivec/objectivec_oneof.cc', 'google/protobuf/compiler/objectivec/objectivec_message_field.cc', 'google/protobuf/compiler/objectivec/objectivec_message.cc', 'google/protobuf/compiler/objectivec/objectivec_map_field.cc', 'google/protobuf/compiler/objectivec/objectivec_helpers.cc', 'google/protobuf/compiler/objectivec/objectivec_generator.cc', 'google/protobuf/compiler/objectivec/objectivec_file.cc', 'google/protobuf/compiler/objectivec/objectivec_field.cc', 'google/protobuf/compiler/objectivec/objectivec_extension.cc', 'google/protobuf/compiler/objectivec/objectivec_enum_field.cc', 'google/protobuf/compiler/objectivec/objectivec_enum.cc', 'google/protobuf/compiler/js/js_generator.cc', 'google/protobuf/compiler/javanano/javanano_primitive_field.cc', 'google/protobuf/compiler/javanano/javanano_message_field.cc', 'google/protobuf/compiler/javanano/javanano_message.cc', 'google/protobuf/compiler/javanano/javanano_map_field.cc', 'google/protobuf/compiler/javanano/javanano_helpers.cc', 'google/protobuf/compiler/javanano/javanano_generator.cc', 'google/protobuf/compiler/javanano/javanano_file.cc', 'google/protobuf/compiler/javanano/javanano_field.cc', 'google/protobuf/compiler/javanano/javanano_extension.cc', 'google/protobuf/compiler/javanano/javanano_enum_field.cc', 'google/protobuf/compiler/javanano/javanano_enum.cc', 'google/protobuf/compiler/java/java_string_field_lite.cc', 'google/protobuf/compiler/java/java_string_field.cc', 'google/protobuf/compiler/java/java_shared_code_generator.cc', 'google/protobuf/compiler/java/java_service.cc', 'google/protobuf/compiler/java/java_primitive_field_lite.cc', 'google/protobuf/compiler/java/java_primitive_field.cc', 'google/protobuf/compiler/java/java_name_resolver.cc', 'google/protobuf/compiler/java/java_message_lite.cc', 'google/protobuf/compiler/java/java_message_field_lite.cc', 'google/protobuf/compiler/java/java_message_field.cc', 'google/protobuf/compiler/java/java_message_builder_lite.cc', 'google/protobuf/compiler/java/java_message_builder.cc', 'google/protobuf/compiler/java/java_message.cc', 'google/protobuf/compiler/java/java_map_field_lite.cc', 'google/protobuf/compiler/java/java_map_field.cc', 'google/protobuf/compiler/java/java_lazy_message_field_lite.cc', 'google/protobuf/compiler/java/java_lazy_message_field.cc', 'google/protobuf/compiler/java/java_helpers.cc', 'google/protobuf/compiler/java/java_generator_factory.cc', 'google/protobuf/compiler/java/java_generator.cc', 'google/protobuf/compiler/java/java_file.cc', 'google/protobuf/compiler/java/java_field.cc', 'google/protobuf/compiler/java/java_extension.cc', 'google/protobuf/compiler/java/java_enum_lite.cc', 'google/protobuf/compiler/java/java_enum_field_lite.cc', 'google/protobuf/compiler/java/java_enum_field.cc', 'google/protobuf/compiler/java/java_enum.cc', 'google/protobuf/compiler/java/java_doc_comment.cc', 'google/protobuf/compiler/java/java_context.cc', 'google/protobuf/compiler/csharp/csharp_wrapper_field.cc', 'google/protobuf/compiler/csharp/csharp_source_generator_base.cc', 'google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_message_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_reflection_class.cc', 'google/protobuf/compiler/csharp/csharp_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_message_field.cc', 'google/protobuf/compiler/csharp/csharp_message.cc', 'google/protobuf/compiler/csharp/csharp_map_field.cc', 'google/protobuf/compiler/csharp/csharp_helpers.cc', 'google/protobuf/compiler/csharp/csharp_generator.cc', 'google/protobuf/compiler/csharp/csharp_field_base.cc', 'google/protobuf/compiler/csharp/csharp_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_enum.cc', 'google/protobuf/compiler/csharp/csharp_doc_comment.cc', 'google/protobuf/compiler/cpp/cpp_string_field.cc', 'google/protobuf/compiler/cpp/cpp_service.cc', 'google/protobuf/compiler/cpp/cpp_primitive_field.cc', 'google/protobuf/compiler/cpp/cpp_message_field.cc', 'google/protobuf/compiler/cpp/cpp_message.cc', 'google/protobuf/compiler/cpp/cpp_map_field.cc', 'google/protobuf/compiler/cpp/cpp_helpers.cc', 'google/protobuf/compiler/cpp/cpp_generator.cc', 'google/protobuf/compiler/cpp/cpp_file.cc', 'google/protobuf/compiler/cpp/cpp_field.cc', 'google/protobuf/compiler/cpp/cpp_extension.cc', 'google/protobuf/compiler/cpp/cpp_enum_field.cc', 'google/protobuf/compiler/cpp/cpp_enum.cc', 'google/protobuf/compiler/command_line_interface.cc', 'google/protobuf/compiler/code_generator.cc', 'google/protobuf/wrappers.pb.cc', 'google/protobuf/wire_format.cc', 'google/protobuf/util/type_resolver_util.cc', 'google/protobuf/util/time_util.cc', 'google/protobuf/util/message_differencer.cc', 'google/protobuf/util/json_util.cc', 'google/protobuf/util/internal/utility.cc', 'google/protobuf/util/internal/type_info_test_helper.cc', 'google/protobuf/util/internal/type_info.cc', 'google/protobuf/util/internal/protostream_objectwriter.cc', 'google/protobuf/util/internal/protostream_objectsource.cc', 'google/protobuf/util/internal/proto_writer.cc', 'google/protobuf/util/internal/object_writer.cc', 'google/protobuf/util/internal/json_stream_parser.cc', 'google/protobuf/util/internal/json_objectwriter.cc', 'google/protobuf/util/internal/json_escaping.cc', 'google/protobuf/util/internal/field_mask_utility.cc', 'google/protobuf/util/internal/error_listener.cc', 'google/protobuf/util/internal/default_value_objectwriter.cc', 'google/protobuf/util/internal/datapiece.cc', 'google/protobuf/util/field_mask_util.cc', 'google/protobuf/util/field_comparator.cc', 'google/protobuf/unknown_field_set.cc', 'google/protobuf/type.pb.cc', 'google/protobuf/timestamp.pb.cc', 'google/protobuf/text_format.cc', 'google/protobuf/stubs/substitute.cc', 'google/protobuf/stubs/mathlimits.cc', 'google/protobuf/struct.pb.cc', 'google/protobuf/source_context.pb.cc', 'google/protobuf/service.cc', 'google/protobuf/reflection_ops.cc', 'google/protobuf/message.cc', 'google/protobuf/map_field.cc', 'google/protobuf/io/zero_copy_stream_impl.cc', 'google/protobuf/io/tokenizer.cc', 'google/protobuf/io/strtod.cc', 'google/protobuf/io/printer.cc', 'google/protobuf/io/gzip_stream.cc', 'google/protobuf/generated_message_reflection.cc', 'google/protobuf/field_mask.pb.cc', 'google/protobuf/extension_set_heavy.cc', 'google/protobuf/empty.pb.cc', 'google/protobuf/dynamic_message.cc', 'google/protobuf/duration.pb.cc', 'google/protobuf/descriptor_database.cc', 'google/protobuf/descriptor.pb.cc', 'google/protobuf/descriptor.cc', 'google/protobuf/compiler/parser.cc', 'google/protobuf/compiler/importer.cc', 'google/protobuf/api.pb.cc', 'google/protobuf/any.pb.cc', 'google/protobuf/any.cc', 'google/protobuf/wire_format_lite.cc', 'google/protobuf/stubs/time.cc', 'google/protobuf/stubs/strutil.cc', 'google/protobuf/stubs/structurally_valid.cc', 'google/protobuf/stubs/stringprintf.cc', 'google/protobuf/stubs/stringpiece.cc', 'google/protobuf/stubs/statusor.cc', 'google/protobuf/stubs/status.cc', 'google/protobuf/stubs/once.cc', 'google/protobuf/stubs/int128.cc', 'google/protobuf/stubs/common.cc', 'google/protobuf/stubs/bytestream.cc', 'google/protobuf/stubs/atomicops_internals_x86_msvc.cc', 'google/protobuf/stubs/atomicops_internals_x86_gcc.cc', 'google/protobuf/repeated_field.cc', 'google/protobuf/message_lite.cc', 'google/protobuf/io/zero_copy_stream_impl_lite.cc', 'google/protobuf/io/zero_copy_stream.cc', 'google/protobuf/io/coded_stream.cc', 'google/protobuf/generated_message_util.cc', 'google/protobuf/extension_set.cc', 'google/protobuf/arenastring.cc', 'google/protobuf/arena.cc'] +CC_FILES=['google/protobuf/compiler/zip_writer.cc', 'google/protobuf/compiler/subprocess.cc', 'google/protobuf/compiler/ruby/ruby_generator.cc', 'google/protobuf/compiler/python/python_generator.cc', 'google/protobuf/compiler/plugin.pb.cc', 'google/protobuf/compiler/plugin.cc', 'google/protobuf/compiler/objectivec/objectivec_primitive_field.cc', 'google/protobuf/compiler/objectivec/objectivec_oneof.cc', 'google/protobuf/compiler/objectivec/objectivec_message_field.cc', 'google/protobuf/compiler/objectivec/objectivec_message.cc', 'google/protobuf/compiler/objectivec/objectivec_map_field.cc', 'google/protobuf/compiler/objectivec/objectivec_helpers.cc', 'google/protobuf/compiler/objectivec/objectivec_generator.cc', 'google/protobuf/compiler/objectivec/objectivec_file.cc', 'google/protobuf/compiler/objectivec/objectivec_field.cc', 'google/protobuf/compiler/objectivec/objectivec_extension.cc', 'google/protobuf/compiler/objectivec/objectivec_enum_field.cc', 'google/protobuf/compiler/objectivec/objectivec_enum.cc', 'google/protobuf/compiler/js/js_generator.cc', 'google/protobuf/compiler/javanano/javanano_primitive_field.cc', 'google/protobuf/compiler/javanano/javanano_message_field.cc', 'google/protobuf/compiler/javanano/javanano_message.cc', 'google/protobuf/compiler/javanano/javanano_map_field.cc', 'google/protobuf/compiler/javanano/javanano_helpers.cc', 'google/protobuf/compiler/javanano/javanano_generator.cc', 'google/protobuf/compiler/javanano/javanano_file.cc', 'google/protobuf/compiler/javanano/javanano_field.cc', 'google/protobuf/compiler/javanano/javanano_extension.cc', 'google/protobuf/compiler/javanano/javanano_enum_field.cc', 'google/protobuf/compiler/javanano/javanano_enum.cc', 'google/protobuf/compiler/java/java_string_field_lite.cc', 'google/protobuf/compiler/java/java_string_field.cc', 'google/protobuf/compiler/java/java_shared_code_generator.cc', 'google/protobuf/compiler/java/java_service.cc', 'google/protobuf/compiler/java/java_primitive_field_lite.cc', 'google/protobuf/compiler/java/java_primitive_field.cc', 'google/protobuf/compiler/java/java_name_resolver.cc', 'google/protobuf/compiler/java/java_message_lite.cc', 'google/protobuf/compiler/java/java_message_field_lite.cc', 'google/protobuf/compiler/java/java_message_field.cc', 'google/protobuf/compiler/java/java_message_builder_lite.cc', 'google/protobuf/compiler/java/java_message_builder.cc', 'google/protobuf/compiler/java/java_message.cc', 'google/protobuf/compiler/java/java_map_field_lite.cc', 'google/protobuf/compiler/java/java_map_field.cc', 'google/protobuf/compiler/java/java_lazy_message_field_lite.cc', 'google/protobuf/compiler/java/java_lazy_message_field.cc', 'google/protobuf/compiler/java/java_helpers.cc', 'google/protobuf/compiler/java/java_generator_factory.cc', 'google/protobuf/compiler/java/java_generator.cc', 'google/protobuf/compiler/java/java_file.cc', 'google/protobuf/compiler/java/java_field.cc', 'google/protobuf/compiler/java/java_extension_lite.cc', 'google/protobuf/compiler/java/java_extension.cc', 'google/protobuf/compiler/java/java_enum_lite.cc', 'google/protobuf/compiler/java/java_enum_field_lite.cc', 'google/protobuf/compiler/java/java_enum_field.cc', 'google/protobuf/compiler/java/java_enum.cc', 'google/protobuf/compiler/java/java_doc_comment.cc', 'google/protobuf/compiler/java/java_context.cc', 'google/protobuf/compiler/csharp/csharp_wrapper_field.cc', 'google/protobuf/compiler/csharp/csharp_source_generator_base.cc', 'google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_message_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_reflection_class.cc', 'google/protobuf/compiler/csharp/csharp_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_message_field.cc', 'google/protobuf/compiler/csharp/csharp_message.cc', 'google/protobuf/compiler/csharp/csharp_map_field.cc', 'google/protobuf/compiler/csharp/csharp_helpers.cc', 'google/protobuf/compiler/csharp/csharp_generator.cc', 'google/protobuf/compiler/csharp/csharp_field_base.cc', 'google/protobuf/compiler/csharp/csharp_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_enum.cc', 'google/protobuf/compiler/csharp/csharp_doc_comment.cc', 'google/protobuf/compiler/cpp/cpp_string_field.cc', 'google/protobuf/compiler/cpp/cpp_service.cc', 'google/protobuf/compiler/cpp/cpp_primitive_field.cc', 'google/protobuf/compiler/cpp/cpp_message_field.cc', 'google/protobuf/compiler/cpp/cpp_message.cc', 'google/protobuf/compiler/cpp/cpp_map_field.cc', 'google/protobuf/compiler/cpp/cpp_helpers.cc', 'google/protobuf/compiler/cpp/cpp_generator.cc', 'google/protobuf/compiler/cpp/cpp_file.cc', 'google/protobuf/compiler/cpp/cpp_field.cc', 'google/protobuf/compiler/cpp/cpp_extension.cc', 'google/protobuf/compiler/cpp/cpp_enum_field.cc', 'google/protobuf/compiler/cpp/cpp_enum.cc', 'google/protobuf/compiler/command_line_interface.cc', 'google/protobuf/compiler/code_generator.cc', 'google/protobuf/wrappers.pb.cc', 'google/protobuf/wire_format.cc', 'google/protobuf/util/type_resolver_util.cc', 'google/protobuf/util/time_util.cc', 'google/protobuf/util/message_differencer.cc', 'google/protobuf/util/json_util.cc', 'google/protobuf/util/internal/utility.cc', 'google/protobuf/util/internal/type_info_test_helper.cc', 'google/protobuf/util/internal/type_info.cc', 'google/protobuf/util/internal/protostream_objectwriter.cc', 'google/protobuf/util/internal/protostream_objectsource.cc', 'google/protobuf/util/internal/proto_writer.cc', 'google/protobuf/util/internal/object_writer.cc', 'google/protobuf/util/internal/json_stream_parser.cc', 'google/protobuf/util/internal/json_objectwriter.cc', 'google/protobuf/util/internal/json_escaping.cc', 'google/protobuf/util/internal/field_mask_utility.cc', 'google/protobuf/util/internal/error_listener.cc', 'google/protobuf/util/internal/default_value_objectwriter.cc', 'google/protobuf/util/internal/datapiece.cc', 'google/protobuf/util/field_mask_util.cc', 'google/protobuf/util/field_comparator.cc', 'google/protobuf/unknown_field_set.cc', 'google/protobuf/type.pb.cc', 'google/protobuf/timestamp.pb.cc', 'google/protobuf/text_format.cc', 'google/protobuf/stubs/substitute.cc', 'google/protobuf/stubs/mathlimits.cc', 'google/protobuf/struct.pb.cc', 'google/protobuf/source_context.pb.cc', 'google/protobuf/service.cc', 'google/protobuf/reflection_ops.cc', 'google/protobuf/message.cc', 'google/protobuf/map_field.cc', 'google/protobuf/io/zero_copy_stream_impl.cc', 'google/protobuf/io/tokenizer.cc', 'google/protobuf/io/strtod.cc', 'google/protobuf/io/printer.cc', 'google/protobuf/io/gzip_stream.cc', 'google/protobuf/generated_message_reflection.cc', 'google/protobuf/field_mask.pb.cc', 'google/protobuf/extension_set_heavy.cc', 'google/protobuf/empty.pb.cc', 'google/protobuf/dynamic_message.cc', 'google/protobuf/duration.pb.cc', 'google/protobuf/descriptor_database.cc', 'google/protobuf/descriptor.pb.cc', 'google/protobuf/descriptor.cc', 'google/protobuf/compiler/parser.cc', 'google/protobuf/compiler/importer.cc', 'google/protobuf/api.pb.cc', 'google/protobuf/any.pb.cc', 'google/protobuf/any.cc', 'google/protobuf/wire_format_lite.cc', 'google/protobuf/stubs/time.cc', 'google/protobuf/stubs/strutil.cc', 'google/protobuf/stubs/structurally_valid.cc', 'google/protobuf/stubs/stringprintf.cc', 'google/protobuf/stubs/stringpiece.cc', 'google/protobuf/stubs/statusor.cc', 'google/protobuf/stubs/status.cc', 'google/protobuf/stubs/once.cc', 'google/protobuf/stubs/int128.cc', 'google/protobuf/stubs/common.cc', 'google/protobuf/stubs/bytestream.cc', 'google/protobuf/stubs/atomicops_internals_x86_msvc.cc', 'google/protobuf/stubs/atomicops_internals_x86_gcc.cc', 'google/protobuf/repeated_field.cc', 'google/protobuf/message_lite.cc', 'google/protobuf/io/zero_copy_stream_impl_lite.cc', 'google/protobuf/io/zero_copy_stream.cc', 'google/protobuf/io/coded_stream.cc', 'google/protobuf/generated_message_util.cc', 'google/protobuf/extension_set.cc', 'google/protobuf/arenastring.cc', 'google/protobuf/arena.cc'] diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index 3349d28cf9e..3b8d81b18fe 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -45,7 +45,7 @@ cat << EOF | awk '{ print $1 }' | sort > $want_submodules 05b155ff59114735ec8cd089f669c4c3d8f59029 third_party/gflags (v2.1.0-45-g05b155f) c99458533a9b4c743ed51537e25989ea55944908 third_party/googletest (release-1.7.0) f8ac463766281625ad710900479130c7fcb4d63b third_party/nanopb (nanopb-0.3.4-29-gf8ac463) - d5fb408ddc281ffcadeb08699e65bb694656d0bd third_party/protobuf (v3.0.0-beta-2) + a1938b2aa9ca86ce7ce50c27ff9737c1008d2a03 third_party/protobuf (v3.0.0-beta-3-pre1) 50893291621658f355bc5b4d450a8d06a563053d third_party/zlib (v1.2.8) EOF From d5520c13c2576e1602c42bfd1355c8007e102b6b Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 10 May 2016 16:03:12 -0700 Subject: [PATCH 0423/1894] fixes for resolve address --- src/core/lib/iomgr/resolve_address_posix.c | 4 +++- test/core/iomgr/resolve_address_test.c | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/lib/iomgr/resolve_address_posix.c b/src/core/lib/iomgr/resolve_address_posix.c index 7622c3e7dc4..9a320dc9520 100644 --- a/src/core/lib/iomgr/resolve_address_posix.c +++ b/src/core/lib/iomgr/resolve_address_posix.c @@ -173,7 +173,9 @@ static void do_request_thread(grpc_exec_ctx *exec_ctx, void *rp, } void grpc_resolved_addresses_destroy(grpc_resolved_addresses *addrs) { - gpr_free(addrs->addrs); + if (addrs != NULL) { + gpr_free(addrs->addrs); + } gpr_free(addrs); } diff --git a/test/core/iomgr/resolve_address_test.c b/test/core/iomgr/resolve_address_test.c index 023d7e6c686..4417d960432 100644 --- a/test/core/iomgr/resolve_address_test.c +++ b/test/core/iomgr/resolve_address_test.c @@ -62,7 +62,7 @@ static void must_succeed(grpc_exec_ctx *exec_ctx, void *argsp, args_struct *args = argsp; GPR_ASSERT(err == GRPC_ERROR_NONE); GPR_ASSERT(args->addrs != NULL); - GPR_ASSERT(args->addrs->naddrs > 1); + GPR_ASSERT(args->addrs->naddrs > 0); gpr_event_set(&args->ev, (void *)1); } From b6f853d0658397ad13c3fb6032114fa179738c70 Mon Sep 17 00:00:00 2001 From: yang-g Date: Tue, 10 May 2016 13:10:25 -0700 Subject: [PATCH 0424/1894] Add comment --- include/grpc++/impl/codegen/call.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h index c10c834b040..d457f03fa64 100644 --- a/include/grpc++/impl/codegen/call.h +++ b/include/grpc++/impl/codegen/call.h @@ -329,6 +329,8 @@ class CallOpGenericRecvMessage { template void RecvMessage(R* message) { + // Use an explicit base class pointer to avoid resolution error in the + // following unique_ptr::reset for some old implementations. CallOpGenericRecvMessageHelper::DeserializeFunc* func = new CallOpGenericRecvMessageHelper::DeserializeFuncType(message); deserialize_.reset(func); From 1eb8d54a1967edbc234d8abae5b1c4216c8bd867 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Tue, 10 May 2016 16:57:14 -0700 Subject: [PATCH 0425/1894] Added true async qps client --- .../grpcio/tests/qps/benchmark_client.py | 60 ++++++++++++++++--- src/python/grpcio/tests/qps/client_runner.py | 2 +- src/python/grpcio/tests/qps/worker_server.py | 5 +- .../run_tests/performance/scenario_config.py | 49 ++++++++------- 4 files changed, 81 insertions(+), 35 deletions(-) diff --git a/src/python/grpcio/tests/qps/benchmark_client.py b/src/python/grpcio/tests/qps/benchmark_client.py index eed0b0c6dac..b372ea01ade 100644 --- a/src/python/grpcio/tests/qps/benchmark_client.py +++ b/src/python/grpcio/tests/qps/benchmark_client.py @@ -39,6 +39,7 @@ except ImportError: from concurrent import futures from grpc.beta import implementations +from grpc.framework.interfaces.face import face from src.proto.grpc.testing import messages_pb2 from src.proto.grpc.testing import services_pb2 from tests.unit import resources @@ -141,10 +142,10 @@ class UnaryAsyncBenchmarkClient(BenchmarkClient): self._stub = None -class StreamingAsyncBenchmarkClient(BenchmarkClient): +class StreamingSyncBenchmarkClient(BenchmarkClient): def __init__(self, server, config, hist): - super(StreamingAsyncBenchmarkClient, self).__init__(server, config, hist) + super(StreamingSyncBenchmarkClient, self).__init__(server, config, hist) self._is_streaming = False self._pool = futures.ThreadPoolExecutor(max_workers=1) # Use a thread-safe queue to put requests on the stream @@ -167,12 +168,12 @@ class StreamingAsyncBenchmarkClient(BenchmarkClient): def _request_stream(self): self._is_streaming = True if self._generic: - response_stream = self._stub.inline_stream_stream( - 'grpc.testing.BenchmarkService', 'StreamingCall', - self._request_generator(), _TIMEOUT) + stream_callable = self._stub.stream_stream( + 'grpc.testing.BenchmarkService', 'StreamingCall') else: - response_stream = self._stub.StreamingCall(self._request_generator(), - _TIMEOUT) + stream_callable = self._stub.StreamingCall + + response_stream = stream_callable(self._request_generator(), _TIMEOUT) for _ in response_stream: end_time = time.time() self._handle_response(end_time - self._send_time_queue.get_nowait()) @@ -184,3 +185,48 @@ class StreamingAsyncBenchmarkClient(BenchmarkClient): yield request except queue.Empty: pass + + +class AsyncReceiver(face.ResponseReceiver): + """Receiver for async stream responses.""" + + def __init__(self, send_time_queue, response_handler): + self._send_time_queue = send_time_queue + self._response_handler = response_handler + + def initial_metadata(self, initial_mdetadata): + pass + + def response(self, response): + end_time = time.time() + self._response_handler(end_time - self._send_time_queue.get_nowait()) + + def complete(self, terminal_metadata, code, details): + pass + + +class StreamingAsyncBenchmarkClient(BenchmarkClient): + + def __init__(self, server, config, hist): + super(StreamingAsyncBenchmarkClient, self).__init__(server, config, hist) + self._send_time_queue = queue.Queue() + self._receiver = AsyncReceiver(self._send_time_queue, self._handle_response) + self._rendezvous = None + + def send_request(self): + if self._rendezvous is not None: + self._send_time_queue.put(time.time()) + self._rendezvous.consume(self._request) + + def start(self): + if self._generic: + stream_callable = self._stub.stream_stream( + 'grpc.testing.BenchmarkService', 'StreamingCall') + else: + stream_callable = self._stub.StreamingCall + self._rendezvous = stream_callable.event( + self._receiver, lambda *args: None, _TIMEOUT) + + def stop(self): + self._rendezvous.terminate() + self._rendezvous = None diff --git a/src/python/grpcio/tests/qps/client_runner.py b/src/python/grpcio/tests/qps/client_runner.py index a36c30ccc0a..1ede7d2af1b 100644 --- a/src/python/grpcio/tests/qps/client_runner.py +++ b/src/python/grpcio/tests/qps/client_runner.py @@ -89,9 +89,9 @@ class ClosedLoopClientRunner(ClientRunner): def start(self): self._is_running = True + self._client.start() for _ in xrange(self._request_count): self._client.send_request() - self._client.start() def stop(self): self._is_running = False diff --git a/src/python/grpcio/tests/qps/worker_server.py b/src/python/grpcio/tests/qps/worker_server.py index 0b3acc14e7d..1f9af5482cc 100644 --- a/src/python/grpcio/tests/qps/worker_server.py +++ b/src/python/grpcio/tests/qps/worker_server.py @@ -146,8 +146,9 @@ class WorkerServer(services_pb2.BetaWorkerServiceServicer): if config.rpc_type == control_pb2.UNARY: client = benchmark_client.UnarySyncBenchmarkClient( server, config, qps_data) - else: - raise Exception('STREAMING SYNC client not supported') + elif config.rpc_type == control_pb2.STREAMING: + client = benchmark_client.StreamingSyncBenchmarkClient( + server, config, qps_data) elif config.client_type == control_pb2.ASYNC_CLIENT: if config.rpc_type == control_pb2.UNARY: client = benchmark_client.UnaryAsyncBenchmarkClient( diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index d3937096231..30db85cf48e 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -355,39 +355,39 @@ class PythonLanguage: return 500 def scenarios(self): - # TODO(jtattermusch): this scenario reports QPS 0.0 - yield _ping_pong_scenario( - 'python_generic_async_streaming_ping_pong', rpc_type='STREAMING', - client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', - use_generic_payload=True, - categories=[SMOKETEST]) - - # TODO(jtattermusch): make this scenario work + # TODO(issue #6522): Empty streaming requests does not work for python #yield _ping_pong_scenario( - # 'python_protobuf_async_streaming_ping_pong', rpc_type='STREAMING', - # client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER') + # 'python_generic_async_streaming_ping_pong', rpc_type='STREAMING', + # client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', + # use_generic_payload=True, + # categories=[SMOKETEST]) - # TODO(jtattermusch): make this scenario work - #yield _ping_pong_scenario( - # 'python_protobuf_async_unary_ping_pong', rpc_type='UNARY', - # client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER') + yield _ping_pong_scenario( + 'python_protobuf_async_streaming_ping_pong', rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='SYNC_SERVER') + + yield _ping_pong_scenario( + 'python_protobuf_async_unary_ping_pong', rpc_type='UNARY', + client_type='ASYNC_CLIENT', server_type='SYNC_SERVER') yield _ping_pong_scenario( 'python_protobuf_sync_unary_ping_pong', rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='SYNC_SERVER', categories=[SMOKETEST]) - # TODO(jtattermusch): make this scenario work + # TODO(jtattermusch): + # The qps_worker server gets thread starved with ~6400 threads, the GIL + # enforces that a single thread runs at a time, with no way to set thread + # priority. Re-evaluate after changing DEEP and WIDE. #yield _ping_pong_scenario( # 'python_protobuf_sync_unary_qps_unconstrained', rpc_type='UNARY', # client_type='SYNC_CLIENT', server_type='SYNC_SERVER', # use_unconstrained_client=True) - # TODO(jtattermusch): make this scenario work - #yield _ping_pong_scenario( - # 'python_protobuf_async_streaming_qps_unconstrained', rpc_type='STREAMING', - # client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', - # use_unconstrained_client=True) + yield _ping_pong_scenario( + 'python_protobuf_async_streaming_qps_unconstrained', rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='SYNC_SERVER', + use_unconstrained_client=True) yield _ping_pong_scenario( 'python_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY', @@ -395,11 +395,10 @@ class PythonLanguage: server_language='c++', server_core_limit=1, async_server_threads=1, categories=[SMOKETEST]) - # TODO(jtattermusch): make this scenario work - #yield _ping_pong_scenario( - # 'python_to_cpp_protobuf_sync_streaming_ping_pong', rpc_type='STREAMING', - # client_type='SYNC_CLIENT', server_type='SYNC_SERVER', - # server_language='c++', server_core_limit=1, async_server_threads=1) + yield _ping_pong_scenario( + 'python_to_cpp_protobuf_sync_streaming_ping_pong', rpc_type='STREAMING', + client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + server_language='c++', server_core_limit=1, async_server_threads=1) def __str__(self): return 'python' From 8bda87ca59b74a60f354e025100d676b044ad610 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 10 May 2016 17:24:44 -0700 Subject: [PATCH 0426/1894] Fix most hpack fuzzers --- test/core/transport/chttp2/hpack_parser_fuzzer_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/transport/chttp2/hpack_parser_fuzzer_test.c b/test/core/transport/chttp2/hpack_parser_fuzzer_test.c index e41eda8653e..7c2efc3e9f7 100644 --- a/test/core/transport/chttp2/hpack_parser_fuzzer_test.c +++ b/test/core/transport/chttp2/hpack_parser_fuzzer_test.c @@ -50,7 +50,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_chttp2_hpack_parser parser; grpc_chttp2_hpack_parser_init(&parser); parser.on_header = onhdr; - grpc_chttp2_hpack_parser_parse(&parser, data, data + size); + GRPC_ERROR_UNREF(grpc_chttp2_hpack_parser_parse(&parser, data, data + size)); grpc_chttp2_hpack_parser_destroy(&parser); grpc_shutdown(); return 0; From d6a8397bccdc50dcea08402257cdeb14a2d7898f Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 10 May 2016 16:38:23 -0700 Subject: [PATCH 0427/1894] add more examples and improve existing ones --- .../MathClientServerTests.cs | 2 +- src/csharp/Grpc.Examples/MathExamples.cs | 38 +++++++++++++++++++ src/csharp/Grpc.Examples/MathServiceImpl.cs | 29 +++++++------- 3 files changed, 53 insertions(+), 16 deletions(-) diff --git a/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs b/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs index 875202b9509..ee11105efe7 100644 --- a/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs +++ b/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs @@ -92,7 +92,7 @@ namespace Math.Tests public void DivByZero() { var ex = Assert.Throws(() => client.Div(new DivArgs { Dividend = 0, Divisor = 0 })); - Assert.AreEqual(StatusCode.Unknown, ex.Status.StatusCode); + Assert.AreEqual(StatusCode.InvalidArgument, ex.Status.StatusCode); } [Test] diff --git a/src/csharp/Grpc.Examples/MathExamples.cs b/src/csharp/Grpc.Examples/MathExamples.cs index 60754209748..d260830b94d 100644 --- a/src/csharp/Grpc.Examples/MathExamples.cs +++ b/src/csharp/Grpc.Examples/MathExamples.cs @@ -32,6 +32,7 @@ using System; using System.Collections.Generic; using System.Threading.Tasks; +using Grpc.Core; using Grpc.Core.Utils; namespace Math @@ -109,5 +110,42 @@ namespace Math DivReply result = await client.DivAsync(new DivArgs { Dividend = sum.Num_, Divisor = numbers.Count }); Console.WriteLine("Avg Result: " + result); } + + /// + /// Shows how to handle a call ending with non-OK status. + /// + public static async Task HandleErrorExample(Math.MathClient client) + { + try + { + DivReply result = await client.DivAsync(new DivArgs { Dividend = 5, Divisor = 0 }); + } + catch (RpcException ex) + { + Console.WriteLine(string.Format("RPC ended with status {0}", ex.Status)); + } + } + + /// + /// Shows how to send request headers and how to access response headers + /// and response trailers. + /// + public static async Task MetadataExample(Math.MathClient client) + { + var requestHeaders = new Metadata + { + { "custom-header", "custom-value" } + }; + + var call = client.DivAsync(new DivArgs { Dividend = 5, Divisor = 0 }, requestHeaders); + + // Get response headers + Metadata responseHeaders = await call.ResponseHeadersAsync; + + var result = await call; + + // Get response trailers after the call has finished. + Metadata responseTrailers = call.GetTrailers(); + } } } diff --git a/src/csharp/Grpc.Examples/MathServiceImpl.cs b/src/csharp/Grpc.Examples/MathServiceImpl.cs index 79c56e57a85..a28020f62f3 100644 --- a/src/csharp/Grpc.Examples/MathServiceImpl.cs +++ b/src/csharp/Grpc.Examples/MathServiceImpl.cs @@ -52,23 +52,15 @@ namespace Math public override async Task Fib(FibArgs request, IServerStreamWriter responseStream, ServerCallContext context) { - if (request.Limit <= 0) - { - // keep streaming the sequence until cancelled. - IEnumerator fibEnumerator = FibInternal(long.MaxValue).GetEnumerator(); - while (!context.CancellationToken.IsCancellationRequested && fibEnumerator.MoveNext()) - { - await responseStream.WriteAsync(fibEnumerator.Current); - await Task.Delay(100); - } - } + var limit = request.Limit > 0 ? request.Limit : long.MaxValue; + var fibEnumerator = FibInternal(limit).GetEnumerator(); - if (request.Limit > 0) + // Keep streaming the sequence until the call is cancelled. + // Use CancellationToken from ServerCallContext to detect the cancellation. + while (!context.CancellationToken.IsCancellationRequested && fibEnumerator.MoveNext()) { - foreach (var num in FibInternal(request.Limit)) - { - await responseStream.WriteAsync(num); - } + await responseStream.WriteAsync(fibEnumerator.Current); + await Task.Delay(100); } } @@ -89,6 +81,13 @@ namespace Math static DivReply DivInternal(DivArgs args) { + if (args.Divisor == 0) + { + // One can finish the RPC with non-ok status by throwing RpcException instance. + // Alternatively, resulting status can be set using ServerCallContext.Status + throw new RpcException(new Status(StatusCode.InvalidArgument, "Division by zero")); + } + long quotient = args.Dividend / args.Divisor; long remainder = args.Dividend % args.Divisor; return new DivReply { Quotient = quotient, Remainder = remainder }; From f5929c5dac59197e64cbb13312e0533878780ee5 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 10 May 2016 17:47:16 -0700 Subject: [PATCH 0428/1894] HPACK parser fixes --- .../transport/chttp2/transport/hpack_parser.c | 73 +++++++++++-------- 1 file changed, 44 insertions(+), 29 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/hpack_parser.c b/src/core/ext/transport/chttp2/transport/hpack_parser.c index 609414b919f..003f31f5872 100644 --- a/src/core/ext/transport/chttp2/transport/hpack_parser.c +++ b/src/core/ext/transport/chttp2/transport/hpack_parser.c @@ -780,7 +780,7 @@ static grpc_error *finish_lithdr_incidx(grpc_chttp2_hpack_parser *p, on_hdr(p, grpc_mdelem_from_metadata_strings(GRPC_MDSTR_REF(md->key), take_string(p, &p->value)), 1); - if (err != GRPC_ERROR_NONE) return err; + if (err != GRPC_ERROR_NONE) return parse_error(p, cur, end, err); return parse_begin(p, cur, end); } @@ -792,7 +792,7 @@ static grpc_error *finish_lithdr_incidx_v(grpc_chttp2_hpack_parser *p, on_hdr(p, grpc_mdelem_from_metadata_strings(take_string(p, &p->key), take_string(p, &p->value)), 1); - if (err != GRPC_ERROR_NONE) return err; + if (err != GRPC_ERROR_NONE) return parse_error(p, cur, end, err); return parse_begin(p, cur, end); } @@ -843,7 +843,7 @@ static grpc_error *finish_lithdr_notidx(grpc_chttp2_hpack_parser *p, on_hdr(p, grpc_mdelem_from_metadata_strings(GRPC_MDSTR_REF(md->key), take_string(p, &p->value)), 0); - if (err != GRPC_ERROR_NONE) return err; + if (err != GRPC_ERROR_NONE) return parse_error(p, cur, end, err); return parse_begin(p, cur, end); } @@ -855,7 +855,7 @@ static grpc_error *finish_lithdr_notidx_v(grpc_chttp2_hpack_parser *p, on_hdr(p, grpc_mdelem_from_metadata_strings(take_string(p, &p->key), take_string(p, &p->value)), 0); - if (err != GRPC_ERROR_NONE) return err; + if (err != GRPC_ERROR_NONE) return parse_error(p, cur, end, err); return parse_begin(p, cur, end); } @@ -906,7 +906,7 @@ static grpc_error *finish_lithdr_nvridx(grpc_chttp2_hpack_parser *p, on_hdr(p, grpc_mdelem_from_metadata_strings(GRPC_MDSTR_REF(md->key), take_string(p, &p->value)), 0); - if (err != GRPC_ERROR_NONE) return err; + if (err != GRPC_ERROR_NONE) return parse_error(p, cur, end, err); return parse_begin(p, cur, end); } @@ -918,7 +918,7 @@ static grpc_error *finish_lithdr_nvridx_v(grpc_chttp2_hpack_parser *p, on_hdr(p, grpc_mdelem_from_metadata_strings(take_string(p, &p->key), take_string(p, &p->value)), 0); - if (err != GRPC_ERROR_NONE) return err; + if (err != GRPC_ERROR_NONE) return parse_error(p, cur, end, err); return parse_begin(p, cur, end); } @@ -967,7 +967,7 @@ static grpc_error *finish_max_tbl_size(grpc_chttp2_hpack_parser *p, } grpc_error *err = grpc_chttp2_hptbl_set_current_table_size(&p->table, p->index); - if (err != GRPC_ERROR_NONE) return err; + if (err != GRPC_ERROR_NONE) return parse_error(p, cur, end, err); return parse_begin(p, cur, end); } @@ -975,8 +975,10 @@ static grpc_error *finish_max_tbl_size(grpc_chttp2_hpack_parser *p, static grpc_error *parse_max_tbl_size(grpc_chttp2_hpack_parser *p, const uint8_t *cur, const uint8_t *end) { if (p->dynamic_table_update_allowed == 0) { - return GRPC_ERROR_CREATE( - "More than two max table size changes in a single frame"); + return parse_error( + p, cur, end, + GRPC_ERROR_CREATE( + "More than two max table size changes in a single frame")); } p->dynamic_table_update_allowed--; p->index = (*cur) & 0x1f; @@ -990,8 +992,10 @@ static grpc_error *parse_max_tbl_size_x(grpc_chttp2_hpack_parser *p, static const grpc_chttp2_hpack_parser_state and_then[] = { finish_max_tbl_size}; if (p->dynamic_table_update_allowed == 0) { - return GRPC_ERROR_CREATE( - "More than two max table size changes in a single frame"); + return parse_error( + p, cur, end, + GRPC_ERROR_CREATE( + "More than two max table size changes in a single frame")); } p->dynamic_table_update_allowed--; p->next_state = and_then; @@ -1004,7 +1008,9 @@ static grpc_error *parse_max_tbl_size_x(grpc_chttp2_hpack_parser *p, static grpc_error *parse_error(grpc_chttp2_hpack_parser *p, const uint8_t *cur, const uint8_t *end, grpc_error *err) { GPR_ASSERT(err != GRPC_ERROR_NONE); - p->last_error = GRPC_ERROR_REF(err); + if (p->last_error == GRPC_ERROR_NONE) { + p->last_error = GRPC_ERROR_REF(err); + } p->state = still_parse_error; return err; } @@ -1216,7 +1222,8 @@ static grpc_error *append_string(grpc_chttp2_hpack_parser *p, bits = inverse_base64[*cur]; ++cur; if (bits == 255) - return GRPC_ERROR_CREATE("Illegal base64 character"); + return parse_error(p, cur, end, + GRPC_ERROR_CREATE("Illegal base64 character")); else if (bits == 64) goto b64_byte0; p->base64_buffer = bits << 18; @@ -1230,7 +1237,8 @@ static grpc_error *append_string(grpc_chttp2_hpack_parser *p, bits = inverse_base64[*cur]; ++cur; if (bits == 255) - return GRPC_ERROR_CREATE("Illegal base64 character"); + return parse_error(p, cur, end, + GRPC_ERROR_CREATE("Illegal base64 character")); else if (bits == 64) goto b64_byte1; p->base64_buffer |= bits << 12; @@ -1244,7 +1252,8 @@ static grpc_error *append_string(grpc_chttp2_hpack_parser *p, bits = inverse_base64[*cur]; ++cur; if (bits == 255) - return GRPC_ERROR_CREATE("Illegal base64 character"); + return parse_error(p, cur, end, + GRPC_ERROR_CREATE("Illegal base64 character")); else if (bits == 64) goto b64_byte2; p->base64_buffer |= bits << 6; @@ -1258,7 +1267,8 @@ static grpc_error *append_string(grpc_chttp2_hpack_parser *p, bits = inverse_base64[*cur]; ++cur; if (bits == 255) - return GRPC_ERROR_CREATE("Illegal base64 character"); + return parse_error(p, cur, end, + GRPC_ERROR_CREATE("Illegal base64 character")); else if (bits == 64) goto b64_byte3; p->base64_buffer |= bits; @@ -1269,11 +1279,13 @@ static grpc_error *append_string(grpc_chttp2_hpack_parser *p, append_bytes(str, decoded, 3); goto b64_byte0; } - GPR_UNREACHABLE_CODE(return GRPC_ERROR_CREATE("Should never reach here")); + GPR_UNREACHABLE_CODE(return parse_error( + p, cur, end, GRPC_ERROR_CREATE("Should never reach here"))); } /* append a null terminator to a string */ -static grpc_error *finish_str(grpc_chttp2_hpack_parser *p) { +static grpc_error *finish_str(grpc_chttp2_hpack_parser *p, const uint8_t *cur, + const uint8_t *end) { uint8_t terminator = 0; uint8_t decoded[2]; uint32_t bits; @@ -1284,8 +1296,9 @@ static grpc_error *finish_str(grpc_chttp2_hpack_parser *p) { case B64_BYTE0: break; case B64_BYTE1: - return GRPC_ERROR_CREATE( - "illegal base64 encoding"); /* illegal encoding */ + return parse_error( + p, cur, end, + GRPC_ERROR_CREATE("illegal base64 encoding")); /* illegal encoding */ case B64_BYTE2: bits = p->base64_buffer; if (bits & 0xffff) { @@ -1294,7 +1307,7 @@ static grpc_error *finish_str(grpc_chttp2_hpack_parser *p) { bits & 0xffff); grpc_error *err = GRPC_ERROR_CREATE(msg); gpr_free(msg); - return err; + return parse_error(p, cur, end, err); } decoded[0] = (uint8_t)(bits >> 16); append_bytes(str, decoded, 1); @@ -1307,7 +1320,7 @@ static grpc_error *finish_str(grpc_chttp2_hpack_parser *p) { bits & 0xff); grpc_error *err = GRPC_ERROR_CREATE(msg); gpr_free(msg); - return err; + return parse_error(p, cur, end, err); } decoded[0] = (uint8_t)(bits >> 16); decoded[1] = (uint8_t)(bits >> 8); @@ -1341,9 +1354,9 @@ static grpc_error *add_huff_bytes(grpc_chttp2_hpack_parser *p, const uint8_t *cur, const uint8_t *end) { for (; cur != end; ++cur) { grpc_error *err = huff_nibble(p, *cur >> 4); - if (err != GRPC_ERROR_NONE) return err; + if (err != GRPC_ERROR_NONE) return parse_error(p, cur, end, err); err = huff_nibble(p, *cur & 0xf); - if (err != GRPC_ERROR_NONE) return err; + if (err != GRPC_ERROR_NONE) return parse_error(p, cur, end, err); } return GRPC_ERROR_NONE; } @@ -1366,13 +1379,13 @@ static grpc_error *parse_string(grpc_chttp2_hpack_parser *p, const uint8_t *cur, size_t given = (size_t)(end - cur); if (remaining <= given) { grpc_error *err = add_str_bytes(p, cur, cur + remaining); - if (err != GRPC_ERROR_NONE) return err; - err = finish_str(p); - if (err != GRPC_ERROR_NONE) return err; + if (err != GRPC_ERROR_NONE) return parse_error(p, cur, end, err); + err = finish_str(p, cur + remaining, end); + if (err != GRPC_ERROR_NONE) return parse_error(p, cur, end, err); return parse_next(p, cur + remaining, end); } else { grpc_error *err = add_str_bytes(p, cur, cur + given); - if (err != GRPC_ERROR_NONE) return err; + if (err != GRPC_ERROR_NONE) return parse_error(p, cur, end, err); GPR_ASSERT(given <= UINT32_MAX - p->strgot); p->strgot += (uint32_t)given; p->state = parse_string; @@ -1432,7 +1445,7 @@ static grpc_error *parse_value_string_with_indexed_key( grpc_chttp2_hpack_parser *p, const uint8_t *cur, const uint8_t *end) { bool is_binary = false; grpc_error *err = is_binary_indexed_header(p, &is_binary); - if (err != GRPC_ERROR_NONE) return err; + if (err != GRPC_ERROR_NONE) return parse_error(p, cur, end, err); return parse_value_string(p, cur, end, is_binary); } @@ -1454,6 +1467,7 @@ void grpc_chttp2_hpack_parser_init(grpc_chttp2_hpack_parser *p) { p->value.capacity = 0; p->value.length = 0; p->dynamic_table_update_allowed = 2; + p->last_error = GRPC_ERROR_NONE; grpc_chttp2_hptbl_init(&p->table); } @@ -1464,6 +1478,7 @@ void grpc_chttp2_hpack_parser_set_has_priority(grpc_chttp2_hpack_parser *p) { void grpc_chttp2_hpack_parser_destroy(grpc_chttp2_hpack_parser *p) { grpc_chttp2_hptbl_destroy(&p->table); + GRPC_ERROR_UNREF(p->last_error); gpr_free(p->key.str); gpr_free(p->value.str); } From 87f9e660f1e5ee85768e809aeee070e54f4e0b4c Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 10 May 2016 17:55:29 -0700 Subject: [PATCH 0429/1894] Fix encoding and piping problems with Node plugin wrapper --- src/node/tools/bin/protoc.js | 5 +++-- src/node/tools/bin/protoc_plugin.js | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/node/tools/bin/protoc.js b/src/node/tools/bin/protoc.js index 4d50c94b0f8..3bd1b84ffe4 100755 --- a/src/node/tools/bin/protoc.js +++ b/src/node/tools/bin/protoc.js @@ -51,6 +51,7 @@ execFile(protoc, process.argv.slice(2), function(error, stdout, stderr) { if (error) { throw error; } - console.log(stdout); - console.log(stderr); }); + +child_process.stdout.pipe(process.stdout); +child_process.stderr.pipe(process.stderr); diff --git a/src/node/tools/bin/protoc_plugin.js b/src/node/tools/bin/protoc_plugin.js index 281ec0d85e5..857882e1c34 100755 --- a/src/node/tools/bin/protoc_plugin.js +++ b/src/node/tools/bin/protoc_plugin.js @@ -47,10 +47,12 @@ var exe_ext = process.platform === 'win32' ? '.exe' : ''; var plugin = path.resolve(__dirname, 'grpc_node_plugin' + exe_ext); -execFile(plugin, process.argv.slice(2), function(error, stdout, stderr) { +var child_process = execFile(plugin, process.argv.slice(2), {encoding: 'buffer'}, function(error, stdout, stderr) { if (error) { throw error; } - console.log(stdout); - console.log(stderr); }); + +process.stdin.pipe(child_process.stdin); +child_process.stdout.pipe(process.stdout); +child_process.stderr.pipe(process.stderr); From 8291274e0e3f1a3d79aea3290cdbd7070eba8896 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 10 May 2016 17:56:29 -0700 Subject: [PATCH 0430/1894] Fixed variable --- src/node/tools/bin/protoc.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/node/tools/bin/protoc.js b/src/node/tools/bin/protoc.js index 3bd1b84ffe4..53fc5dc4280 100755 --- a/src/node/tools/bin/protoc.js +++ b/src/node/tools/bin/protoc.js @@ -47,7 +47,7 @@ var exe_ext = process.platform === 'win32' ? '.exe' : ''; var protoc = path.resolve(__dirname, 'protoc' + exe_ext); -execFile(protoc, process.argv.slice(2), function(error, stdout, stderr) { +var child_process = execFile(protoc, process.argv.slice(2), function(error, stdout, stderr) { if (error) { throw error; } From 03291c4a2b1a5ad9ecdbcdf5f241eb722510ab5e Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 10 May 2016 18:28:56 -0700 Subject: [PATCH 0431/1894] bind error in tcp server posix --- src/core/lib/iomgr/tcp_server_posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index dca068fd25d..b3486df7244 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -288,7 +288,7 @@ static grpc_error *prepare_socket(int fd, const struct sockaddr *addr, if (bind(fd, addr, (socklen_t)addr_len) < 0) { char *addr_str; grpc_sockaddr_to_string(&addr_str, addr, 0); - gpr_log(GPR_ERROR, "bind addr=%s: %s", addr_str, strerror(errno)); + err = GRPC_OS_ERROR(errno, "bind"); gpr_free(addr_str); goto error; } From f7b01874fde5b276500f69dcd83ca713cde2e10b Mon Sep 17 00:00:00 2001 From: thinkerou Date: Wed, 11 May 2016 10:23:26 +0800 Subject: [PATCH 0432/1894] add ownend and delete dtor --- src/php/ext/grpc/call.c | 1 - src/php/ext/grpc/call_credentials.c | 1 - src/php/ext/grpc/channel.c | 1 - src/php/ext/grpc/channel_credentials.c | 1 - src/php/ext/grpc/server.c | 1 - src/php/ext/grpc/server_credentials.c | 1 - src/php/ext/grpc/timeval.c | 6 +----- 7 files changed, 1 insertion(+), 11 deletions(-) diff --git a/src/php/ext/grpc/call.c b/src/php/ext/grpc/call.c index b19e8f017f9..a2c1c08169f 100644 --- a/src/php/ext/grpc/call.c +++ b/src/php/ext/grpc/call.c @@ -65,7 +65,6 @@ void free_wrapped_grpc_call(void *object TSRMLS_DC) { if (call->owned && call->wrapped != NULL) { grpc_call_destroy(call->wrapped); } - zend_object_std_dtor(&call->std TSRMLS_CC); efree(call); } diff --git a/src/php/ext/grpc/call_credentials.c b/src/php/ext/grpc/call_credentials.c index ce9cbdf2269..285c4e7c856 100644 --- a/src/php/ext/grpc/call_credentials.c +++ b/src/php/ext/grpc/call_credentials.c @@ -60,7 +60,6 @@ void free_wrapped_grpc_call_credentials(void *object TSRMLS_DC) { if (creds->wrapped != NULL) { grpc_call_credentials_release(creds->wrapped); } - zend_object_std_dtor(&creds->std TSRMLS_CC); efree(creds); } diff --git a/src/php/ext/grpc/channel.c b/src/php/ext/grpc/channel.c index 665430b99cd..eba2c81424d 100644 --- a/src/php/ext/grpc/channel.c +++ b/src/php/ext/grpc/channel.c @@ -64,7 +64,6 @@ void free_wrapped_grpc_channel(void *object TSRMLS_DC) { if (channel->wrapped != NULL) { grpc_channel_destroy(channel->wrapped); } - zend_object_std_dtor(&channel->std TSRMLS_CC); efree(channel); } diff --git a/src/php/ext/grpc/channel_credentials.c b/src/php/ext/grpc/channel_credentials.c index d5a6531b54e..ae9a9897fcd 100644 --- a/src/php/ext/grpc/channel_credentials.c +++ b/src/php/ext/grpc/channel_credentials.c @@ -59,7 +59,6 @@ void free_wrapped_grpc_channel_credentials(void *object TSRMLS_DC) { if (creds->wrapped != NULL) { grpc_channel_credentials_release(creds->wrapped); } - zend_object_std_dtor(&creds->std TSRMLS_CC); efree(creds); } diff --git a/src/php/ext/grpc/server.c b/src/php/ext/grpc/server.c index 0d12bbe5c29..ca129e76ca1 100644 --- a/src/php/ext/grpc/server.c +++ b/src/php/ext/grpc/server.c @@ -69,7 +69,6 @@ void free_wrapped_grpc_server(void *object TSRMLS_DC) { gpr_inf_future(GPR_CLOCK_REALTIME), NULL); grpc_server_destroy(server->wrapped); } - zend_object_std_dtor(&server->std TSRMLS_CC); efree(server); } diff --git a/src/php/ext/grpc/server_credentials.c b/src/php/ext/grpc/server_credentials.c index 25a2ca577d1..f3951b31fee 100644 --- a/src/php/ext/grpc/server_credentials.c +++ b/src/php/ext/grpc/server_credentials.c @@ -58,7 +58,6 @@ void free_wrapped_grpc_server_credentials(void *object TSRMLS_DC) { if (creds->wrapped != NULL) { grpc_server_credentials_release(creds->wrapped); } - zend_object_std_dtor(&creds->std TSRMLS_CC); efree(creds); } diff --git a/src/php/ext/grpc/timeval.c b/src/php/ext/grpc/timeval.c index 102361d404e..4fd069e19a1 100644 --- a/src/php/ext/grpc/timeval.c +++ b/src/php/ext/grpc/timeval.c @@ -53,11 +53,7 @@ zend_class_entry *grpc_ce_timeval; /* Frees and destroys an instance of wrapped_grpc_call */ -void free_wrapped_grpc_timeval(void *object TSRMLS_DC) { - wrapped_grpc_timeval *timeval = (wrapped_grpc_timeval *)object; - zend_object_std_dtor(&timeval->std TSRMLS_CC); - efree(object); -} +void free_wrapped_grpc_timeval(void *object TSRMLS_DC) { efree(object); } /* Initializes an instance of wrapped_grpc_timeval to be associated with an * object of a class specified by class_type */ From cfc8ae16b13116f598defe7a58931d80dd781578 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 10 May 2016 20:49:54 -0700 Subject: [PATCH 0433/1894] Fix connectivity bits --- src/core/ext/client_config/channel_connectivity.c | 12 +++++++++--- src/core/ext/client_config/subchannel.c | 6 +++++- src/core/lib/surface/completion_queue.c | 10 +++++++--- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/src/core/ext/client_config/channel_connectivity.c b/src/core/ext/client_config/channel_connectivity.c index ac685e11ea7..bef43d84ca0 100644 --- a/src/core/ext/client_config/channel_connectivity.c +++ b/src/core/ext/client_config/channel_connectivity.c @@ -131,6 +131,10 @@ static void partly_done(grpc_exec_ctx *exec_ctx, state_watcher *w, } gpr_mu_lock(&w->mu); + const char *msg = grpc_error_string(error); + gpr_log(GPR_DEBUG, "partly_done: d2c=%d phs=%d err=%s", due_to_completion, w->phase, msg); + grpc_error_free_string(msg); + if (due_to_completion) { GRPC_ERROR_UNREF(w->error); w->error = GRPC_ERROR_NONE; @@ -155,16 +159,18 @@ static void partly_done(grpc_exec_ctx *exec_ctx, state_watcher *w, if (delete) { delete_state_watcher(exec_ctx, w); } + + GRPC_ERROR_UNREF(error); } static void watch_complete(grpc_exec_ctx *exec_ctx, void *pw, grpc_error *error) { - partly_done(exec_ctx, pw, true, error); + partly_done(exec_ctx, pw, true, GRPC_ERROR_REF(error)); } static void timeout_complete(grpc_exec_ctx *exec_ctx, void *pw, grpc_error *error) { - partly_done(exec_ctx, pw, false, error); + partly_done(exec_ctx, pw, false, GRPC_ERROR_REF(error)); } void grpc_channel_watch_connectivity_state( @@ -189,7 +195,7 @@ void grpc_channel_watch_connectivity_state( grpc_closure_init(&w->on_complete, watch_complete, w); w->phase = WAITING; w->state = last_observed_state; - w->error = GRPC_ERROR_CREATE("Some error"); + w->error = GRPC_ERROR_CREATE("Timeout waiting for channel state"); w->cq = cq; w->tag = tag; w->channel = channel; diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c index ead28dbd123..3bfba47ea9e 100644 --- a/src/core/ext/client_config/subchannel.c +++ b/src/core/ext/client_config/subchannel.c @@ -605,7 +605,7 @@ static void on_alarm(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { } else { GRPC_ERROR_REF(error); } - if (error != GRPC_ERROR_NONE) { + if (error == GRPC_ERROR_NONE) { const char *msg = grpc_error_string(error); gpr_log(GPR_INFO, "Failed to connect to channel, retrying: %s", msg); grpc_error_free_string(msg); @@ -639,6 +639,10 @@ static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *arg, exec_ctx, &c->state_tracker, GRPC_CHANNEL_TRANSIENT_FAILURE, GRPC_ERROR_CREATE_REFERENCING("Connect Failed", &error, 1), "connect_failed"); + gpr_timespec time_til_next = gpr_time_sub(c->next_attempt, gpr_now(c->next_attempt.clock_type)); + const char *errmsg = grpc_error_string(error); + gpr_log(GPR_INFO, "Connect failed, retry in %d.%09d seconds: %s", time_til_next.tv_sec, time_til_next.tv_nsec, errmsg); + grpc_error_free_string(errmsg); grpc_timer_init(exec_ctx, &c->alarm, c->next_attempt, on_alarm, c, now); } gpr_mu_unlock(&c->mu); diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index b2d9965d331..3c04a9b734a 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -227,10 +227,14 @@ void grpc_cq_end_op(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc, #endif GPR_TIMER_BEGIN("grpc_cq_end_op", 0); - GRPC_API_TRACE( - "grpc_cq_end_op(exec_ctx=%p, cc=%p, tag=%p, error=%p, done=%p, " + if (grpc_api_trace) { + const char *errmsg = grpc_error_string(error); + GRPC_API_TRACE( + "grpc_cq_end_op(exec_ctx=%p, cc=%p, tag=%p, error=%s, done=%p, " "done_arg=%p, storage=%p)", - 7, (exec_ctx, cc, tag, error, done, done_arg, storage)); + 7, (exec_ctx, cc, tag, errmsg, done, done_arg, storage)); + grpc_error_free_string(errmsg); + } storage->tag = tag; storage->done = done; From 3b3069d062d8796292197977d69d0c1730227d1f Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 11 May 2016 08:43:01 -0700 Subject: [PATCH 0434/1894] Add some missing directories to package.json --- package.json | 2 ++ templates/package.json.template | 2 ++ 2 files changed, 4 insertions(+) diff --git a/package.json b/package.json index ae5fb0c6572..b256fadd618 100644 --- a/package.json +++ b/package.json @@ -67,6 +67,8 @@ "src/node/ext", "include/grpc", "src/core", + "src/boringssl", + "src/zlib", "third_party/nanopb", "third_party/zlib", "third_party/boringssl", diff --git a/templates/package.json.template b/templates/package.json.template index 11718b1ccbd..9d19ca06293 100644 --- a/templates/package.json.template +++ b/templates/package.json.template @@ -69,6 +69,8 @@ "src/node/ext", "include/grpc", "src/core", + "src/boringssl", + "src/zlib", "third_party/nanopb", "third_party/zlib", "third_party/boringssl", From 3b59b0f417571871acbb30a0cc817451d11eee17 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 10 May 2016 14:44:05 -0700 Subject: [PATCH 0435/1894] integrate Go qps worker --- .../performance/build_performance.sh | 5 +- .../performance/build_performance_go.sh | 44 +++++++++++ tools/run_tests/performance/kill_workers.sh | 3 + .../performance/remote_host_prepare.sh | 2 +- tools/run_tests/performance/run_worker_go.sh | 35 +++++++++ .../run_tests/performance/scenario_config.py | 76 +++++++++++++++++++ 6 files changed, 162 insertions(+), 3 deletions(-) create mode 100755 tools/run_tests/performance/build_performance_go.sh create mode 100755 tools/run_tests/performance/run_worker_go.sh diff --git a/tools/run_tests/performance/build_performance.sh b/tools/run_tests/performance/build_performance.sh index 8cfe1c48e99..352c6797579 100755 --- a/tools/run_tests/performance/build_performance.sh +++ b/tools/run_tests/performance/build_performance.sh @@ -33,8 +33,6 @@ set -ex cd $(dirname $0)/../../.. -#TODO(jtattermusch): add support for more languages - CONFIG=${CONFIG:-opt} # build C++ qps worker & driver always - we need at least the driver to @@ -53,6 +51,9 @@ do (cd ../grpc-java/ && ./gradlew -PskipCodegen=true :grpc-benchmarks:installDist) ;; + "go") + tools/run_tests/performance/build_performance_go.sh + ;; *) tools/run_tests/run_tests.py -l $language -c $CONFIG --build_only -j 8 ;; diff --git a/tools/run_tests/performance/build_performance_go.sh b/tools/run_tests/performance/build_performance_go.sh new file mode 100755 index 00000000000..3719cc5986d --- /dev/null +++ b/tools/run_tests/performance/build_performance_go.sh @@ -0,0 +1,44 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -ex + +cd $(dirname $0)/../../.. + +export GOPATH=$(pwd)/../gopath + +# Get grpc-go and the dependencies but get rid of the upstream/master version +go get google.golang.org/grpc +rm -rf "${GOPATH}/src/google.golang.org/grpc" + +# Get the revision of grpc-go we want to test +git clone --recursive ../grpc-go ${GOPATH}/src/google.golang.org/grpc + +(cd ${GOPATH}/src/google.golang.org/grpc/benchmark/worker && go install) diff --git a/tools/run_tests/performance/kill_workers.sh b/tools/run_tests/performance/kill_workers.sh index 7a8763424dc..f306f0c9912 100755 --- a/tools/run_tests/performance/kill_workers.sh +++ b/tools/run_tests/performance/kill_workers.sh @@ -52,3 +52,6 @@ ps -C python -o pid=,cmd= | grep 'qps_worker.py' | awk '{print $1}' | xargs kill # Java jps | grep LoadWorker | awk '{print $1}' | xargs kill -9 + +# Go +killall -9 worker || true diff --git a/tools/run_tests/performance/remote_host_prepare.sh b/tools/run_tests/performance/remote_host_prepare.sh index d7f539a74e8..f81102bbdc4 100755 --- a/tools/run_tests/performance/remote_host_prepare.sh +++ b/tools/run_tests/performance/remote_host_prepare.sh @@ -39,7 +39,7 @@ ssh "${USER_AT_HOST}" "rm -rf ~/performance_workspace && mkdir -p ~/performance_ # mess with the results, be rough and reboot the slave here # and wait for it to come back online. # could also kill jenkins. -ssh "${USER_AT_HOST}" "killall -9 qps_worker mono node ruby || true" +ssh "${USER_AT_HOST}" "killall -9 qps_worker mono node ruby worker || true" # push the current sources to the slave and unpack it. scp ../grpc.tar "${USER_AT_HOST}:~/performance_workspace" diff --git a/tools/run_tests/performance/run_worker_go.sh b/tools/run_tests/performance/run_worker_go.sh new file mode 100755 index 00000000000..f7f2ece1370 --- /dev/null +++ b/tools/run_tests/performance/run_worker_go.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -ex + +cd $(dirname $0)/../../.. + +../gopath/bin/worker $@ diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index a13e8b739f8..1ec70f1ab6d 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -521,6 +521,81 @@ class JavaLanguage: return 'java' +class GoLanguage: + + def __init__(self): + pass + self.safename = str(self) + + def worker_cmdline(self): + return ['tools/run_tests/performance/run_worker_go.sh'] + + def worker_port_offset(self): + return 600 + + def scenarios(self): + for secure in [True, False]: + secstr = 'secure' if secure else 'insecure' + smoketest_categories = [SMOKETEST] if secure else None + + yield _ping_pong_scenario( + 'go_generic_async_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', + use_generic_payload=True, async_server_threads=1, + secure=secure, + categories=smoketest_categories) + + yield _ping_pong_scenario( + 'go_protobuf_async_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + async_server_threads=1, + secure=secure) + + yield _ping_pong_scenario( + 'go_protobuf_async_unary_ping_pong_%s' % secstr, rpc_type='UNARY', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + async_server_threads=1, + secure=secure, + categories=smoketest_categories) + + yield _ping_pong_scenario( + 'go_protobuf_unary_ping_pong_%s' % secstr, rpc_type='UNARY', + client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + async_server_threads=1, + secure=secure) + + yield _ping_pong_scenario( + 'go_protobuf_async_unary_qps_unconstrained_%s' % secstr, rpc_type='UNARY', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + use_unconstrained_client=True, + secure=secure, + categories=smoketest_categories) + + yield _ping_pong_scenario( + 'go_protobuf_async_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + use_unconstrained_client=True, + secure=secure,) + + yield _ping_pong_scenario( + 'go_generic_async_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', + use_unconstrained_client=True, use_generic_payload=True, + secure=secure) + + yield _ping_pong_scenario( + 'go_generic_async_streaming_qps_one_server_core_%s' % secstr, rpc_type='STREAMING', + client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', + use_unconstrained_client=True, use_generic_payload=True, + async_server_threads=1, + secure=secure) + + # TODO(jtattermusch): add scenarios go vs C++ + + def __str__(self): + return 'go' + + LANGUAGES = { 'c++' : CXXLanguage(), 'csharp' : CSharpLanguage(), @@ -528,4 +603,5 @@ LANGUAGES = { 'ruby' : RubyLanguage(), 'java' : JavaLanguage(), 'python' : PythonLanguage(), + 'go' : GoLanguage(), } From 4bd3a7cecb78098516338a43552f72fc9b56573d Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 11 May 2016 09:29:08 -0700 Subject: [PATCH 0436/1894] change go scenarios to use sync api --- .../run_tests/performance/scenario_config.py | 39 +++++++------------ 1 file changed, 15 insertions(+), 24 deletions(-) diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index 1ec70f1ab6d..4fe66dff41d 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -538,56 +538,47 @@ class GoLanguage: secstr = 'secure' if secure else 'insecure' smoketest_categories = [SMOKETEST] if secure else None + # ASYNC_GENERIC_SERVER for Go actually uses a sync streaming server, + # but that's mostly because of lack of better name of the enum value. yield _ping_pong_scenario( - 'go_generic_async_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING', - client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', + 'go_generic_sync_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING', + client_type='SYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', use_generic_payload=True, async_server_threads=1, secure=secure, categories=smoketest_categories) yield _ping_pong_scenario( - 'go_protobuf_async_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING', - client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + 'go_protobuf_sync_streaming_ping_pong_%s' % secstr, rpc_type='STREAMING', + client_type='SYNC_CLIENT', server_type='SYNC_SERVER', async_server_threads=1, secure=secure) yield _ping_pong_scenario( - 'go_protobuf_async_unary_ping_pong_%s' % secstr, rpc_type='UNARY', - client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + 'go_protobuf_sync_unary_ping_pong_%s' % secstr, rpc_type='UNARY', + client_type='SYNC_CLIENT', server_type='SYNC_SERVER', async_server_threads=1, secure=secure, categories=smoketest_categories) yield _ping_pong_scenario( - 'go_protobuf_unary_ping_pong_%s' % secstr, rpc_type='UNARY', + 'go_protobuf_sync_unary_qps_unconstrained_%s' % secstr, rpc_type='UNARY', client_type='SYNC_CLIENT', server_type='SYNC_SERVER', - async_server_threads=1, - secure=secure) - - yield _ping_pong_scenario( - 'go_protobuf_async_unary_qps_unconstrained_%s' % secstr, rpc_type='UNARY', - client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', use_unconstrained_client=True, secure=secure, categories=smoketest_categories) yield _ping_pong_scenario( - 'go_protobuf_async_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING', - client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER', + 'go_protobuf_sync_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING', + client_type='SYNC_CLIENT', server_type='SYNC_SERVER', use_unconstrained_client=True, - secure=secure,) - - yield _ping_pong_scenario( - 'go_generic_async_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING', - client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', - use_unconstrained_client=True, use_generic_payload=True, secure=secure) + # ASYNC_GENERIC_SERVER for Go actually uses a sync streaming server, + # but that's mostly because of lack of better name of the enum value. yield _ping_pong_scenario( - 'go_generic_async_streaming_qps_one_server_core_%s' % secstr, rpc_type='STREAMING', - client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', + 'go_generic_sync_streaming_qps_unconstrained_%s' % secstr, rpc_type='STREAMING', + client_type='SYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', use_unconstrained_client=True, use_generic_payload=True, - async_server_threads=1, secure=secure) # TODO(jtattermusch): add scenarios go vs C++ From 9d8612054749b9f5cd5c2e001c8a288870b27c11 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 11 May 2016 10:12:57 -0700 Subject: [PATCH 0437/1894] clang-format --- .../grpc++/impl/codegen/method_handler_impl.h | 14 ++++---- src/core/lib/iomgr/ev_poll_posix.c | 9 +++-- .../set_initial_connect_string_test.c | 36 +++++++++++++++---- test/cpp/qps/client_async.cc | 12 ++++--- test/cpp/qps/server_async.cc | 6 ++-- 5 files changed, 56 insertions(+), 21 deletions(-) diff --git a/include/grpc++/impl/codegen/method_handler_impl.h b/include/grpc++/impl/codegen/method_handler_impl.h index ad74efabc4b..21ac6c4fb55 100644 --- a/include/grpc++/impl/codegen/method_handler_impl.h +++ b/include/grpc++/impl/codegen/method_handler_impl.h @@ -44,10 +44,10 @@ namespace grpc { template class RpcMethodHandler : public MethodHandler { public: - RpcMethodHandler( - std::function func, - ServiceType* service) + RpcMethodHandler(std::function + func, + ServiceType* service) : func_(func), service_(service) {} void RunHandler(const HandlerParameter& param) GRPC_FINAL { @@ -88,7 +88,8 @@ class ClientStreamingHandler : public MethodHandler { public: ClientStreamingHandler( std::function*, ResponseType*)> func, + ServerReader*, ResponseType*)> + func, ServiceType* service) : func_(func), service_(service) {} @@ -124,7 +125,8 @@ class ServerStreamingHandler : public MethodHandler { public: ServerStreamingHandler( std::function*)> func, + ServerWriter*)> + func, ServiceType* service) : func_(func), service_(service) {} diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 69489f4b532..0240ea0a01f 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -924,10 +924,10 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, for (i = 2; i < pfd_count; i++) { if (watchers[i].fd == NULL) { fd_end_poll(exec_ctx, &watchers[i], 0, 0); - continue; + } else { + fd_end_poll(exec_ctx, &watchers[i], pfds[i].revents & POLLIN_CHECK, + pfds[i].revents & POLLOUT_CHECK); } - fd_end_poll(exec_ctx, &watchers[i], pfds[i].revents & POLLIN_CHECK, - pfds[i].revents & POLLOUT_CHECK); } } @@ -963,6 +963,9 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, } keep_polling = 1; } + if (keep_polling) { + now = gpr_now(now.clock_type); + } } if (added_worker) { remove_worker(pollset, &worker); diff --git a/test/core/client_config/set_initial_connect_string_test.c b/test/core/client_config/set_initial_connect_string_test.c index 83058d9b2c3..5b7f222f7a9 100644 --- a/test/core/client_config/set_initial_connect_string_test.c +++ b/test/core/client_config/set_initial_connect_string_test.c @@ -37,6 +37,7 @@ #include #include #include +#include #include "src/core/ext/client_config/initial_connect_string.h" #include "src/core/lib/iomgr/sockaddr.h" @@ -139,7 +140,7 @@ static void start_rpc(int use_creds, int target_port) { state.op.reserved = NULL; GPR_ASSERT(GRPC_CALL_OK == grpc_call_start_batch(state.call, &state.op, (size_t)(1), NULL, NULL)); - grpc_completion_queue_next(state.cq, n_sec_deadline(1), NULL); + grpc_completion_queue_next(state.cq, n_sec_deadline(5), NULL); } static void cleanup_rpc(void) { @@ -157,12 +158,29 @@ static void cleanup_rpc(void) { gpr_free(state.target); } -static void poll_server_until_read_done(test_tcp_server *server) { - gpr_timespec deadline = n_sec_deadline(5); +typedef struct { + test_tcp_server *server; + gpr_event *signal_when_done; +} poll_args; + +static void actually_poll_server(void *arg) { + poll_args *pa = arg; + gpr_timespec deadline = n_sec_deadline(10); while (state.done == 0 && gpr_time_cmp(gpr_now(GPR_CLOCK_REALTIME), deadline) < 0) { - test_tcp_server_poll(server, 1); + test_tcp_server_poll(pa->server, 1); } + gpr_event_set(pa->signal_when_done, (void *)1); + gpr_free(pa); +} + +static void poll_server_until_read_done(test_tcp_server *server, + gpr_event *signal_when_done) { + gpr_thd_id id; + poll_args *pa = gpr_malloc(sizeof(*pa)); + pa->server = server; + pa->signal_when_done = signal_when_done; + gpr_thd_new(&id, actually_poll_server, pa, NULL); } static void match_initial_magic_string(gpr_slice_buffer *buffer) { @@ -180,20 +198,26 @@ static void match_initial_magic_string(gpr_slice_buffer *buffer) { } static void test_initial_string(test_tcp_server *server, int secure) { + gpr_event ev; + gpr_event_init(&ev); grpc_test_set_initial_connect_string_function(set_magic_initial_string); + poll_server_until_read_done(server, &ev); start_rpc(secure, server_port); - poll_server_until_read_done(server); + gpr_event_wait(&ev, gpr_inf_future(GPR_CLOCK_REALTIME)); match_initial_magic_string(&state.incoming_buffer); cleanup_rpc(); } static void test_initial_string_with_redirect(test_tcp_server *server, int secure) { + gpr_event ev; + gpr_event_init(&ev); int another_port = grpc_pick_unused_port_or_die(); grpc_test_set_initial_connect_string_function( reset_addr_and_set_magic_string); + poll_server_until_read_done(server, &ev); start_rpc(secure, another_port); - poll_server_until_read_done(server); + gpr_event_wait(&ev, gpr_inf_future(GPR_CLOCK_REALTIME)); match_initial_magic_string(&state.incoming_buffer); cleanup_rpc(); } diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index e72cef28114..c32160a7d45 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -84,7 +84,8 @@ class ClientRpcContextUnaryImpl : public ClientRpcContext { std::function< std::unique_ptr>( BenchmarkService::Stub*, grpc::ClientContext*, const RequestType&, - CompletionQueue*)> start_req, + CompletionQueue*)> + start_req, std::function on_done) : context_(), stub_(stub), @@ -165,7 +166,8 @@ class AsyncClient : public ClientImpl { AsyncClient(const ClientConfig& config, std::function next_issue, - const RequestType&)> setup_ctx, + const RequestType&)> + setup_ctx, std::function(std::shared_ptr)> create_stub) : ClientImpl(config, create_stub), @@ -278,7 +280,8 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext { std::function>( BenchmarkService::Stub*, grpc::ClientContext*, CompletionQueue*, - void*)> start_req, + void*)> + start_req, std::function on_done) : context_(), stub_(stub), @@ -405,7 +408,8 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext { std::function next_issue, std::function( grpc::GenericStub*, grpc::ClientContext*, - const grpc::string& method_name, CompletionQueue*, void*)> start_req, + const grpc::string& method_name, CompletionQueue*, void*)> + start_req, std::function on_done) : context_(), stub_(stub), diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index a68f1ae7b67..1234542687d 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -73,7 +73,8 @@ class AsyncQpsServerTest : public Server { CompletionQueue *, ServerCompletionQueue *, void *)> request_streaming_function, std::function process_rpc) + ResponseType *)> + process_rpc) : Server(config) { char *server_address = NULL; @@ -190,7 +191,8 @@ class AsyncQpsServerTest : public Server { ServerRpcContextUnaryImpl( std::function *, - void *)> request_method, + void *)> + request_method, std::function invoke_method) : srv_ctx_(new ServerContextType), From b85e9d43f04f58ccd62e7b704d1ba08fe5df77ae Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 11 May 2016 10:21:45 -0700 Subject: [PATCH 0438/1894] fix formatting --- include/grpc++/impl/codegen/method_handler_impl.h | 14 ++++++++------ test/cpp/qps/client_async.cc | 12 ++++++++---- test/cpp/qps/server_async.cc | 6 ++++-- 3 files changed, 20 insertions(+), 12 deletions(-) diff --git a/include/grpc++/impl/codegen/method_handler_impl.h b/include/grpc++/impl/codegen/method_handler_impl.h index ad74efabc4b..21ac6c4fb55 100644 --- a/include/grpc++/impl/codegen/method_handler_impl.h +++ b/include/grpc++/impl/codegen/method_handler_impl.h @@ -44,10 +44,10 @@ namespace grpc { template class RpcMethodHandler : public MethodHandler { public: - RpcMethodHandler( - std::function func, - ServiceType* service) + RpcMethodHandler(std::function + func, + ServiceType* service) : func_(func), service_(service) {} void RunHandler(const HandlerParameter& param) GRPC_FINAL { @@ -88,7 +88,8 @@ class ClientStreamingHandler : public MethodHandler { public: ClientStreamingHandler( std::function*, ResponseType*)> func, + ServerReader*, ResponseType*)> + func, ServiceType* service) : func_(func), service_(service) {} @@ -124,7 +125,8 @@ class ServerStreamingHandler : public MethodHandler { public: ServerStreamingHandler( std::function*)> func, + ServerWriter*)> + func, ServiceType* service) : func_(func), service_(service) {} diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index e72cef28114..c32160a7d45 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -84,7 +84,8 @@ class ClientRpcContextUnaryImpl : public ClientRpcContext { std::function< std::unique_ptr>( BenchmarkService::Stub*, grpc::ClientContext*, const RequestType&, - CompletionQueue*)> start_req, + CompletionQueue*)> + start_req, std::function on_done) : context_(), stub_(stub), @@ -165,7 +166,8 @@ class AsyncClient : public ClientImpl { AsyncClient(const ClientConfig& config, std::function next_issue, - const RequestType&)> setup_ctx, + const RequestType&)> + setup_ctx, std::function(std::shared_ptr)> create_stub) : ClientImpl(config, create_stub), @@ -278,7 +280,8 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext { std::function>( BenchmarkService::Stub*, grpc::ClientContext*, CompletionQueue*, - void*)> start_req, + void*)> + start_req, std::function on_done) : context_(), stub_(stub), @@ -405,7 +408,8 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext { std::function next_issue, std::function( grpc::GenericStub*, grpc::ClientContext*, - const grpc::string& method_name, CompletionQueue*, void*)> start_req, + const grpc::string& method_name, CompletionQueue*, void*)> + start_req, std::function on_done) : context_(), stub_(stub), diff --git a/test/cpp/qps/server_async.cc b/test/cpp/qps/server_async.cc index a68f1ae7b67..1234542687d 100644 --- a/test/cpp/qps/server_async.cc +++ b/test/cpp/qps/server_async.cc @@ -73,7 +73,8 @@ class AsyncQpsServerTest : public Server { CompletionQueue *, ServerCompletionQueue *, void *)> request_streaming_function, std::function process_rpc) + ResponseType *)> + process_rpc) : Server(config) { char *server_address = NULL; @@ -190,7 +191,8 @@ class AsyncQpsServerTest : public Server { ServerRpcContextUnaryImpl( std::function *, - void *)> request_method, + void *)> + request_method, std::function invoke_method) : srv_ctx_(new ServerContextType), From 4c2218e22930a4f17eaec4677470586e2d91e228 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 11 May 2016 10:27:08 -0700 Subject: [PATCH 0439/1894] Force wakeup after fd addition --- src/core/lib/iomgr/ev_poll_posix.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 0240ea0a01f..99874d49eb0 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -768,6 +768,7 @@ static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, } pollset->fds[pollset->fd_count++] = fd; GRPC_FD_REF(fd, "multipoller"); + pollset_kick(pollset, NULL); exit: gpr_mu_unlock(&pollset->mu); } From c1c6b3c80dcbd7b1b953ec7e5ff291c1b48badb9 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 11 May 2016 10:41:06 -0700 Subject: [PATCH 0440/1894] Update release version to 0.14.1 --- Makefile | 2 +- build.yaml | 2 +- package.json | 2 +- src/core/lib/surface/version.c | 2 +- src/csharp/Grpc.Core/VersionInfo.cs | 2 +- src/csharp/build_packages.bat | 2 +- src/node/tools/package.json | 2 +- src/python/grpcio/grpc_version.py | 2 +- src/ruby/lib/grpc/version.rb | 2 +- src/ruby/tools/version.rb | 2 +- tools/distrib/python/grpcio_tools/grpc_version.py | 2 +- tools/doxygen/Doxyfile.c++ | 2 +- tools/doxygen/Doxyfile.c++.internal | 2 +- tools/doxygen/Doxyfile.core | 2 +- tools/doxygen/Doxyfile.core.internal | 2 +- 15 files changed, 15 insertions(+), 15 deletions(-) diff --git a/Makefile b/Makefile index 0547faf5bb3..35154a1cc8f 100644 --- a/Makefile +++ b/Makefile @@ -407,7 +407,7 @@ E = @echo Q = @ endif -VERSION = 0.14.1-pre1 +VERSION = 0.14.1 CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) diff --git a/build.yaml b/build.yaml index 1b7d4e03ab0..31fa496833d 100644 --- a/build.yaml +++ b/build.yaml @@ -7,7 +7,7 @@ settings: '#3': Use "-preN" suffixes to identify pre-release versions '#4': Per-language overrides are possible with (eg) ruby_version tag here '#5': See the expand_version.py for all the quirks here - version: 0.14.1-pre1 + version: 0.14.1 filegroups: - name: census public_headers: diff --git a/package.json b/package.json index b256fadd618..eae26366144 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "0.14.1-pre1", + "version": "0.14.1", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "http://www.grpc.io/", diff --git a/src/core/lib/surface/version.c b/src/core/lib/surface/version.c index a7fa0f3565d..a77af060230 100644 --- a/src/core/lib/surface/version.c +++ b/src/core/lib/surface/version.c @@ -36,4 +36,4 @@ #include -const char *grpc_version_string(void) { return "0.14.1-pre1"; } +const char *grpc_version_string(void) { return "0.14.1"; } diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index 6c6a08775d4..bbf45f072ad 100644 --- a/src/csharp/Grpc.Core/VersionInfo.cs +++ b/src/csharp/Grpc.Core/VersionInfo.cs @@ -53,6 +53,6 @@ namespace Grpc.Core /// /// Current version of gRPC C# /// - public const string CurrentVersion = "0.14.1-pre1"; + public const string CurrentVersion = "0.14.1"; } } diff --git a/src/csharp/build_packages.bat b/src/csharp/build_packages.bat index cf700d7581b..62a7668c686 100644 --- a/src/csharp/build_packages.bat +++ b/src/csharp/build_packages.bat @@ -1,7 +1,7 @@ @rem Builds gRPC NuGet packages @rem Current package versions -set VERSION=0.14.1-pre1 +set VERSION=0.14.1 set PROTOBUF_VERSION=3.0.0-beta2 @rem Packages that depend on prerelease packages (like Google.Protobuf) need to have prerelease suffix as well. diff --git a/src/node/tools/package.json b/src/node/tools/package.json index da85b6455b4..a171e2539d7 100644 --- a/src/node/tools/package.json +++ b/src/node/tools/package.json @@ -1,6 +1,6 @@ { "name": "grpc-tools", - "version": "0.14.1-pre1", + "version": "0.14.1", "author": "Google Inc.", "description": "Tools for developing with gRPC on Node.js", "homepage": "http://www.grpc.io/", diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py index e688e32c5f1..c947beb9300 100644 --- a/src/python/grpcio/grpc_version.py +++ b/src/python/grpcio/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! -VERSION='0.14.1rc1' +VERSION='0.14.1' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index d8c2578c70c..de36ef0bbfd 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -29,5 +29,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '0.14.1.pre1' + VERSION = '0.14.1' end diff --git a/src/ruby/tools/version.rb b/src/ruby/tools/version.rb index 6dd5c339e2c..41a2cbc45b9 100644 --- a/src/ruby/tools/version.rb +++ b/src/ruby/tools/version.rb @@ -29,6 +29,6 @@ module GRPC module Tools - VERSION = '0.14.1.pre1' + VERSION = '0.14.1' end end diff --git a/tools/distrib/python/grpcio_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_version.py index cfd27d45c27..ec90c87010e 100644 --- a/tools/distrib/python/grpcio_tools/grpc_version.py +++ b/tools/distrib/python/grpcio_tools/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! -VERSION='0.14.1rc1' +VERSION='0.14.1' diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 8ea1019f407..8d42b5c0420 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.1-pre1 +PROJECT_NUMBER = 0.14.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index cb444ef1370..39b35dc29c1 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.1-pre1 +PROJECT_NUMBER = 0.14.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index 34002354cf1..943e5fe0575 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.1-pre1 +PROJECT_NUMBER = 0.14.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 434f6c92a3b..f8fcea1ac19 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.1-pre1 +PROJECT_NUMBER = 0.14.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a From 113cc3d2b461bb75b475161328634ef66c166e41 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 11 May 2016 10:56:53 -0700 Subject: [PATCH 0441/1894] Fix compile error --- test/core/bad_client/bad_client.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/bad_client/bad_client.c b/test/core/bad_client/bad_client.c index 76a8a718e9e..fa705717af3 100644 --- a/test/core/bad_client/bad_client.c +++ b/test/core/bad_client/bad_client.c @@ -81,7 +81,7 @@ typedef struct { gpr_event read_done; } read_args; -static void read_done(grpc_exec_ctx *exec_ctx, void *arg, bool success) { +static void read_done(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { read_args *a = arg; a->validator(&a->incoming); gpr_event_set(&a->read_done, (void *)1); From 878816956cdfb69d9074ab4cdb5d89d9f21bba74 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 11 May 2016 11:28:23 -0700 Subject: [PATCH 0442/1894] Update release version to 0.14.2-pre1 --- Makefile | 2 +- build.yaml | 2 +- composer.json | 2 +- package.json | 2 +- package.xml | 8 ++++---- src/core/lib/surface/version.c | 2 +- src/csharp/Grpc.Core/VersionInfo.cs | 4 ++-- src/csharp/build_packages.bat | 2 +- src/node/tools/package.json | 2 +- src/python/grpcio/grpc_version.py | 2 +- src/ruby/lib/grpc/version.rb | 2 +- src/ruby/tools/version.rb | 2 +- tools/distrib/python/grpcio_tools/grpc_version.py | 2 +- tools/doxygen/Doxyfile.c++ | 2 +- tools/doxygen/Doxyfile.c++.internal | 2 +- tools/doxygen/Doxyfile.core | 2 +- tools/doxygen/Doxyfile.core.internal | 2 +- 17 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 35154a1cc8f..64637e1ac3a 100644 --- a/Makefile +++ b/Makefile @@ -407,7 +407,7 @@ E = @echo Q = @ endif -VERSION = 0.14.1 +VERSION = 0.14.2-pre1 CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) diff --git a/build.yaml b/build.yaml index 31fa496833d..b0ef376bf9c 100644 --- a/build.yaml +++ b/build.yaml @@ -7,7 +7,7 @@ settings: '#3': Use "-preN" suffixes to identify pre-release versions '#4': Per-language overrides are possible with (eg) ruby_version tag here '#5': See the expand_version.py for all the quirks here - version: 0.14.1 + version: 0.14.2-pre1 filegroups: - name: census public_headers: diff --git a/composer.json b/composer.json index 0bf0ff4b45a..0abe77b35c2 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "grpc/grpc", "type": "library", "description": "gRPC library for PHP", - "version": "0.14.1", + "version": "0.14.2", "keywords": ["rpc"], "homepage": "http://grpc.io", "license": "BSD-3-Clause", diff --git a/package.json b/package.json index eae26366144..32b86018d93 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "0.14.1", + "version": "0.14.2-pre1", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "http://www.grpc.io/", diff --git a/package.xml b/package.xml index c90d6f6b4b9..e8386948a6d 100644 --- a/package.xml +++ b/package.xml @@ -13,8 +13,8 @@ 2016-04-19 - 0.14.1 - 0.14.1 + 0.14.2 + 0.14.2 beta @@ -1014,8 +1014,8 @@ Update to wrap gRPC C Core version 0.10.0 - 0.14.1 - 0.14.1 + 0.14.2 + 0.14.2 beta diff --git a/src/core/lib/surface/version.c b/src/core/lib/surface/version.c index a77af060230..c18ea7bb9f2 100644 --- a/src/core/lib/surface/version.c +++ b/src/core/lib/surface/version.c @@ -36,4 +36,4 @@ #include -const char *grpc_version_string(void) { return "0.14.1"; } +const char *grpc_version_string(void) { return "0.14.2-pre1"; } diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index bbf45f072ad..9b2f6ed1c38 100644 --- a/src/csharp/Grpc.Core/VersionInfo.cs +++ b/src/csharp/Grpc.Core/VersionInfo.cs @@ -48,11 +48,11 @@ namespace Grpc.Core /// /// Current AssemblyFileVersion of gRPC C# assemblies /// - public const string CurrentAssemblyFileVersion = "0.14.1.0"; + public const string CurrentAssemblyFileVersion = "0.14.2.0"; /// /// Current version of gRPC C# /// - public const string CurrentVersion = "0.14.1"; + public const string CurrentVersion = "0.14.2-pre1"; } } diff --git a/src/csharp/build_packages.bat b/src/csharp/build_packages.bat index 62a7668c686..ca5b290eb90 100644 --- a/src/csharp/build_packages.bat +++ b/src/csharp/build_packages.bat @@ -1,7 +1,7 @@ @rem Builds gRPC NuGet packages @rem Current package versions -set VERSION=0.14.1 +set VERSION=0.14.2-pre1 set PROTOBUF_VERSION=3.0.0-beta2 @rem Packages that depend on prerelease packages (like Google.Protobuf) need to have prerelease suffix as well. diff --git a/src/node/tools/package.json b/src/node/tools/package.json index a171e2539d7..321e3c3e7a5 100644 --- a/src/node/tools/package.json +++ b/src/node/tools/package.json @@ -1,6 +1,6 @@ { "name": "grpc-tools", - "version": "0.14.1", + "version": "0.14.2-pre1", "author": "Google Inc.", "description": "Tools for developing with gRPC on Node.js", "homepage": "http://www.grpc.io/", diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py index c947beb9300..eedb3811857 100644 --- a/src/python/grpcio/grpc_version.py +++ b/src/python/grpcio/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! -VERSION='0.14.1' +VERSION='0.14.2rc1' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index de36ef0bbfd..e0f1dee5967 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -29,5 +29,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '0.14.1' + VERSION = '0.14.2.pre1' end diff --git a/src/ruby/tools/version.rb b/src/ruby/tools/version.rb index 41a2cbc45b9..e19d7338ad7 100644 --- a/src/ruby/tools/version.rb +++ b/src/ruby/tools/version.rb @@ -29,6 +29,6 @@ module GRPC module Tools - VERSION = '0.14.1' + VERSION = '0.14.2.pre1' end end diff --git a/tools/distrib/python/grpcio_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_version.py index ec90c87010e..c22ccff4a26 100644 --- a/tools/distrib/python/grpcio_tools/grpc_version.py +++ b/tools/distrib/python/grpcio_tools/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! -VERSION='0.14.1' +VERSION='0.14.2rc1' diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 8d42b5c0420..739a49e7f30 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.1 +PROJECT_NUMBER = 0.14.2-pre1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 39b35dc29c1..8fbd577c369 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.1 +PROJECT_NUMBER = 0.14.2-pre1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index 943e5fe0575..203f3335357 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.1 +PROJECT_NUMBER = 0.14.2-pre1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index f8fcea1ac19..d677afa1751 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.14.1 +PROJECT_NUMBER = 0.14.2-pre1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a From 32ec1330570975bdb6135f158abcc706feb01c22 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 11 May 2016 12:22:53 -0700 Subject: [PATCH 0443/1894] fixes server_test --- .../chttp2/server/insecure/server_chttp2.c | 29 ++++++++++--------- src/core/lib/iomgr/error.h | 3 ++ src/core/lib/iomgr/tcp_server_posix.c | 9 +++--- 3 files changed, 24 insertions(+), 17 deletions(-) diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index a4d8880f615..3a2b9dda99c 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -96,6 +96,7 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { GRPC_API_TRACE("grpc_server_add_insecure_http2_port(server=%p, addr=%s)", 2, (server, addr)); + grpc_error **errors = NULL; err = grpc_blocking_resolve_address(addr, "https", &resolved); if (err != GRPC_ERROR_NONE) { goto error; @@ -106,8 +107,9 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { goto error; } - grpc_error **errors = gpr_malloc(sizeof(*errors) * resolved->naddrs); - for (i = 0; i < resolved->naddrs; i++) { + const size_t naddrs = resolved->naddrs; + errors = gpr_malloc(sizeof(*errors) * naddrs); + for (i = 0; i < naddrs; i++) { errors[i] = grpc_tcp_server_add_port( tcp, (struct sockaddr *)&resolved->addrs[i].addr, resolved->addrs[i].len, &port_temp); @@ -122,27 +124,22 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { } if (count == 0) { char *msg; - gpr_asprintf(&msg, "No address added out of total %d resolved", - resolved->naddrs); - err = GRPC_ERROR_CREATE_REFERENCING(msg, errors, resolved->naddrs); + gpr_asprintf(&msg, "No address added out of total %d resolved", naddrs); + err = GRPC_ERROR_CREATE_REFERENCING(msg, errors, naddrs); + gpr_free(msg); goto error; - } else if (count != resolved->naddrs) { + } else if (count != naddrs) { char *msg; gpr_asprintf(&msg, "Only %d addresses added out of total %d resolved", - count, resolved->naddrs); - err = GRPC_ERROR_CREATE_REFERENCING(msg, errors, resolved->naddrs); + count, naddrs); + err = GRPC_ERROR_CREATE_REFERENCING(msg, errors, naddrs); gpr_free(msg); const char *warning_message = grpc_error_string(err); gpr_log(GPR_INFO, "WARNING: %s", warning_message); grpc_error_free_string(warning_message); /* we managed to bind some addresses: continue */ - } else { - for (i = 0; i < resolved->naddrs; i++) { - GRPC_ERROR_UNREF(errors[i]); - } } - gpr_free(errors); grpc_resolved_addresses_destroy(resolved); /* Register with the server only upon success */ @@ -151,6 +148,7 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { /* Error path: cleanup and return */ error: + GPR_ASSERT(err != GRPC_ERROR_NONE); if (resolved) { grpc_resolved_addresses_destroy(resolved); } @@ -161,5 +159,10 @@ error: done: grpc_exec_ctx_finish(&exec_ctx); + for (i = 0; i < naddrs; i++) { + GRPC_ERROR_UNREF(errors[i]); + } + GRPC_ERROR_UNREF(err); + gpr_free(errors); return port_num; } diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index 2b9b9f00c08..0cc466e8c44 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -94,6 +94,9 @@ grpc_error *grpc_error_create(const char *file, int line, const char *desc, grpc_error **referencing, size_t num_referencing); #define GRPC_ERROR_CREATE(desc) \ grpc_error_create(__FILE__, __LINE__, desc, NULL, 0) + +// Create an error that references some other errors. This function adds a +// reference to each error in errs - it does not consume an existing reference #define GRPC_ERROR_CREATE_REFERENCING(desc, errs, count) \ grpc_error_create(__FILE__, __LINE__, desc, errs, count) diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index b3486df7244..db70fada96a 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -286,10 +286,7 @@ static grpc_error *prepare_socket(int fd, const struct sockaddr *addr, GPR_ASSERT(addr_len < ~(socklen_t)0); if (bind(fd, addr, (socklen_t)addr_len) < 0) { - char *addr_str; - grpc_sockaddr_to_string(&addr_str, addr, 0); err = GRPC_OS_ERROR(errno, "bind"); - gpr_free(addr_str); goto error; } @@ -312,9 +309,11 @@ error: if (fd >= 0) { close(fd); } - return grpc_error_set_int( + grpc_error *ret = grpc_error_set_int( GRPC_ERROR_CREATE_REFERENCING("Unable to configure socket", &err, 1), GRPC_ERROR_INT_FD, fd); + GRPC_ERROR_UNREF(err); + return ret; } /* event manager callback when reads are ready */ @@ -538,6 +537,8 @@ done: GRPC_ERROR_CREATE_REFERENCING("Failed to add port to server", errs, GPR_ARRAY_SIZE(errs)), GRPC_ERROR_STR_TARGET_ADDRESS, addr_str); + GRPC_ERROR_UNREF(errs[0]); + GRPC_ERROR_UNREF(errs[1]); gpr_free(addr_str); return err; } From 649d126ed3bcef2b22b6cc53a35a0ac75c0cee14 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 11 May 2016 12:26:39 -0700 Subject: [PATCH 0444/1894] set GOPATH when executing go worker --- tools/jenkins/run_performance.sh | 2 +- tools/run_tests/performance/run_worker_go.sh | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/jenkins/run_performance.sh b/tools/jenkins/run_performance.sh index 13a332751b2..c92f9750af0 100755 --- a/tools/jenkins/run_performance.sh +++ b/tools/jenkins/run_performance.sh @@ -34,4 +34,4 @@ set -ex # Enter the gRPC repo root cd $(dirname $0)/../.. -tools/run_tests/run_performance_tests.py -l c++ node ruby csharp python +tools/run_tests/run_performance_tests.py -l c++ node ruby csharp python go diff --git a/tools/run_tests/performance/run_worker_go.sh b/tools/run_tests/performance/run_worker_go.sh index f7f2ece1370..6b1242a4197 100755 --- a/tools/run_tests/performance/run_worker_go.sh +++ b/tools/run_tests/performance/run_worker_go.sh @@ -32,4 +32,6 @@ set -ex cd $(dirname $0)/../../.. -../gopath/bin/worker $@ +export GOPATH=$(pwd)/../gopath + +${GOPATH}/bin/worker $@ From 1095c315f810cdc677d3be929e5f950783fab277 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 11 May 2016 12:27:04 -0700 Subject: [PATCH 0445/1894] run netperf in smoketest as well --- tools/jenkins/run_performance.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/jenkins/run_performance.sh b/tools/jenkins/run_performance.sh index c92f9750af0..25268dd6505 100755 --- a/tools/jenkins/run_performance.sh +++ b/tools/jenkins/run_performance.sh @@ -34,4 +34,4 @@ set -ex # Enter the gRPC repo root cd $(dirname $0)/../.. -tools/run_tests/run_performance_tests.py -l c++ node ruby csharp python go +tools/run_tests/run_performance_tests.py -l c++ node ruby csharp python go --netperf From 0cc2acc479fb56b76223aed24ba30ed254be5a4a Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 11 May 2016 12:28:34 -0700 Subject: [PATCH 0446/1894] make --category smoketest explicit --- tools/jenkins/run_performance.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/jenkins/run_performance.sh b/tools/jenkins/run_performance.sh index 25268dd6505..940702be36c 100755 --- a/tools/jenkins/run_performance.sh +++ b/tools/jenkins/run_performance.sh @@ -34,4 +34,4 @@ set -ex # Enter the gRPC repo root cd $(dirname $0)/../.. -tools/run_tests/run_performance_tests.py -l c++ node ruby csharp python go --netperf +tools/run_tests/run_performance_tests.py -l c++ node ruby csharp python go --netperf --category smoketest From 56aa02383fd3f04750b8c442979863c25d5c23f1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 11 May 2016 12:37:04 -0700 Subject: [PATCH 0447/1894] Let execution contexts signal that they are done --- src/core/lib/iomgr/exec_ctx.c | 17 +++++++++++++++++ src/core/lib/iomgr/exec_ctx.h | 29 ++++++++++++++++++++++++----- 2 files changed, 41 insertions(+), 5 deletions(-) diff --git a/src/core/lib/iomgr/exec_ctx.c b/src/core/lib/iomgr/exec_ctx.c index 2146c7dd1f7..e4514790732 100644 --- a/src/core/lib/iomgr/exec_ctx.c +++ b/src/core/lib/iomgr/exec_ctx.c @@ -39,6 +39,22 @@ #include "src/core/lib/profiling/timers.h" +bool grpc_exec_ctx_ready_to_finish(grpc_exec_ctx *exec_ctx) { + if (!exec_ctx->cached_ready_to_finish) { + exec_ctx->cached_ready_to_finish = exec_ctx->check_ready_to_finish( + exec_ctx, exec_ctx->check_ready_to_finish_arg); + } + return exec_ctx->cached_ready_to_finish; +} + +bool grpc_never_ready_to_finish(grpc_exec_ctx *exec_ctx, void *arg_ignored) { + return false; +} + +bool grpc_always_ready_to_finish(grpc_exec_ctx *exec_ctx, void *arg_ignored) { + return true; +} + #ifndef GRPC_EXECUTION_CONTEXT_SANITIZER bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { bool did_something = 0; @@ -61,6 +77,7 @@ bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx) { } void grpc_exec_ctx_finish(grpc_exec_ctx *exec_ctx) { + exec_ctx->cached_ready_to_finish = true; grpc_exec_ctx_flush(exec_ctx); } diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h index 976cc403475..9d47a262f8c 100644 --- a/src/core/lib/iomgr/exec_ctx.h +++ b/src/core/lib/iomgr/exec_ctx.h @@ -53,6 +53,9 @@ typedef struct grpc_workqueue grpc_workqueue; * - track a list of work that needs to be delayed until the top of the * call stack (this provides a convenient mechanism to run callbacks * without worrying about locking issues) + * - provide a decision maker (via grpc_exec_ctx_ready_to_finish) that provides + * signal as to whether a borrowed thread should continue to do work or + * should actively try to finish up and get this thread back to its owner * * CONVENTIONS: * Instance of this must ALWAYS be constructed on the stack, never @@ -63,18 +66,26 @@ typedef struct grpc_workqueue grpc_workqueue; */ struct grpc_exec_ctx { grpc_closure_list closure_list; + bool cached_ready_to_finish; + void *check_ready_to_finish_arg; + bool (*check_ready_to_finish)(grpc_exec_ctx *exec_ctx, void *arg); }; -#define GRPC_EXEC_CTX_INIT \ - { GRPC_CLOSURE_LIST_INIT } +#define GRPC_EXEC_CTX_INIT_WITH_FINISH_CHECK(finish_check, finish_check_arg) \ + { GRPC_CLOSURE_LIST_INIT, false, finish_check_arg, finish_check } #else struct grpc_exec_ctx { - int unused; + bool cached_ready_to_finish; + void *check_ready_to_finish_arg; + bool (*check_ready_to_finish)(grpc_exec_ctx *exec_ctx, void *arg); }; -#define GRPC_EXEC_CTX_INIT \ - { 0 } +#define GRPC_EXEC_CTX_INIT_WITH_FINISH_CHECK(finish_check, finish_check_arg) \ + { false, finish_check_arg, finish_check } #endif +#define GRPC_EXEC_CTX_INIT \ + GRPC_EXEC_CTX_INIT_WITH_FINISH_CHECK(grpc_never_ready_to_finish, NULL) + /** Flush any work that has been enqueued onto this grpc_exec_ctx. * Caller must guarantee that no interfering locks are held. * Returns true if work was performed, false otherwise. */ @@ -86,6 +97,14 @@ void grpc_exec_ctx_finish(grpc_exec_ctx *exec_ctx); void grpc_exec_ctx_enqueue(grpc_exec_ctx *exec_ctx, grpc_closure *closure, bool success, grpc_workqueue *offload_target_or_null); +/** Returns true if we'd like to leave this execution context as soon as + possible: useful for deciding whether to do something more or not depending + on outside context */ +bool grpc_exec_ctx_ready_to_finish(grpc_exec_ctx *exec_ctx); +/** A finish check that is never ready to finish */ +bool grpc_never_ready_to_finish(grpc_exec_ctx *exec_ctx, void *arg_ignored); +/** A finish check that is always ready to finish */ +bool grpc_always_ready_to_finish(grpc_exec_ctx *exec_ctx, void *arg_ignored); /** Add a list of closures to be executed at the next flush/finish point. * Leaves \a list empty. */ void grpc_exec_ctx_enqueue_list(grpc_exec_ctx *exec_ctx, From ad17bf704e825f4c7f841cb63ebb4ccfe69219c1 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 11 May 2016 12:41:37 -0700 Subject: [PATCH 0448/1894] propagate jenkins env variables to netperf client --- tools/run_tests/run_performance_tests.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py index 674d8645396..a7728e7f7d5 100755 --- a/tools/run_tests/run_performance_tests.py +++ b/tools/run_tests/run_performance_tests.py @@ -137,6 +137,17 @@ def create_netperf_jobspec(server_host='localhost', client_host=None, cmd = 'NETPERF_SERVER_HOST="%s" ' % server_host if bq_result_table: cmd += 'BQ_RESULT_TABLE="%s" ' % bq_result_table + if client_host: + # If netperf is running remotely, the env variables populated by Jenkins + # won't be available on the client, but we need them for uploading results + # to BigQuery. + jenkins_job_name = os.getenv('JOB_NAME') + if jenkins_job_name: + cmd += 'JOB_NAME="%s" ' % jenkins_job_name + jenkins_build_number = os.getenv('BUILD_NUMBER') + if jenkins_build_number: + cmd += 'BUILD_NUMBER="%s" ' % jenkins_build_number + cmd += 'tools/run_tests/performance/run_netperf.sh' if client_host: user_at_host = '%s@%s' % (_REMOTE_HOST_USERNAME, client_host) From d151dcb12ca687edffcf63db1c7c1c0df520e695 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 11 May 2016 13:26:15 -0700 Subject: [PATCH 0449/1894] fix qps reporting in C# stress client --- src/csharp/Grpc.IntegrationTesting/StressTestClient.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/csharp/Grpc.IntegrationTesting/StressTestClient.cs b/src/csharp/Grpc.IntegrationTesting/StressTestClient.cs index 8db691cb048..4d6ca7ece57 100644 --- a/src/csharp/Grpc.IntegrationTesting/StressTestClient.cs +++ b/src/csharp/Grpc.IntegrationTesting/StressTestClient.cs @@ -311,7 +311,7 @@ namespace Grpc.IntegrationTesting var snapshot = histogram.GetSnapshot(true); var elapsedSnapshot = wallClockStopwatch.GetElapsedSnapshot(true); - return (long) (snapshot.Count / elapsedSnapshot.Seconds); + return (long) (snapshot.Count / elapsedSnapshot.TotalSeconds); } } } From 7d5111e26aafc990138da381354503e8e61f077e Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 11 May 2016 13:36:11 -0700 Subject: [PATCH 0450/1894] dont run go as part of smoketest --- tools/jenkins/run_performance.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/jenkins/run_performance.sh b/tools/jenkins/run_performance.sh index 940702be36c..99b920f6a09 100755 --- a/tools/jenkins/run_performance.sh +++ b/tools/jenkins/run_performance.sh @@ -34,4 +34,4 @@ set -ex # Enter the gRPC repo root cd $(dirname $0)/../.. -tools/run_tests/run_performance_tests.py -l c++ node ruby csharp python go --netperf --category smoketest +tools/run_tests/run_performance_tests.py -l c++ node ruby csharp python --netperf --category smoketest From 86cf1d23b1efcc63a6aec5a0533bfd60a36f3ef2 Mon Sep 17 00:00:00 2001 From: Carl Mastrangelo Date: Wed, 11 May 2016 13:31:08 -0700 Subject: [PATCH 0451/1894] Set GC params for Java Stress Test --- tools/run_tests/stress_test/configs/java.json | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/run_tests/stress_test/configs/java.json b/tools/run_tests/stress_test/configs/java.json index 2ce6c007804..c07d75e79de 100644 --- a/tools/run_tests/stress_test/configs/java.json +++ b/tools/run_tests/stress_test/configs/java.json @@ -21,6 +21,9 @@ "metricsArgs": { "metrics_server_address": "localhost:8081", "total_only": "true" + }, + "env": { + "STRESSTEST_CLIENT_OPTS":"-Xmx3g -Xms3g -XX:NewSize=1.5g -XX:MaxNewSize=1.5g" } } }, @@ -44,7 +47,10 @@ "serverPort": 8080, "serverArgs": { "port": 8080, - "use_tls": "false" + "use_tls": "false" + }, + "env": { + "TEST_SERVER_OPTS":"-Xmx3g -Xms3g -XX:NewSize=1.5g -XX:MaxNewSize=1.5g" } } }, From be187b08c616343086c62f7ae36b078e820a37c4 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Fri, 6 May 2016 15:32:58 -0700 Subject: [PATCH 0452/1894] Format changes to python protoc generation --- src/compiler/python_generator.cc | 110 +++++++++++++++---------------- 1 file changed, 52 insertions(+), 58 deletions(-) diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc index 8e76e6dce6f..cd5ddd88326 100644 --- a/src/compiler/python_generator.cc +++ b/src/compiler/python_generator.cc @@ -147,7 +147,8 @@ class IndentScope { // END FORMATTING BOILERPLATE // //////////////////////////////// -// TODO(protobuf team): Export `ModuleName` from protobuf's +// TODO(https://github.com/google/protobuf/issues/888): +// Export `ModuleName` from protobuf's // `src/google/protobuf/compiler/python/python_generator.cc` file. grpc::string ModuleName(const grpc::string& filename) { grpc::string basename = StripProto(filename); @@ -156,8 +157,23 @@ grpc::string ModuleName(const grpc::string& filename) { return basename + "_pb2"; } +// TODO(https://github.com/google/protobuf/issues/888): +// Export `ModuleAlias` from protobuf's +// `src/google/protobuf/compiler/python/python_generator.cc` file. +grpc::string ModuleAlias(const grpc::string& filename) { + grpc::string module_name = ModuleName(filename); + // We can't have dots in the module name, so we replace each with _dot_. + // But that could lead to a collision between a.b and a_dot_b, so we also + // duplicate each underscore. + module_name = StringReplace(module_name, "_", "__"); + module_name = StringReplace(module_name, ".", "_dot_"); + return module_name; +} + + bool GetModuleAndMessagePath(const Descriptor* type, - pair* out) { + const ServiceDescriptor* service, + grpc::string* out) { const Descriptor* path_elem_type = type; vector message_path; do { @@ -170,7 +186,9 @@ bool GetModuleAndMessagePath(const Descriptor* type, file_name.find_last_of(".proto") == file_name.size() - 1)) { return false; } - grpc::string module = ModuleName(file_name); + grpc::string service_file_name = service->file()->name(); + grpc::string module = service_file_name == file_name ? + "" : ModuleAlias(file_name) + "."; grpc::string message_type; for (auto path_iter = message_path.rbegin(); path_iter != message_path.rend(); ++path_iter) { @@ -178,7 +196,7 @@ bool GetModuleAndMessagePath(const Descriptor* type, } // no pop_back prior to C++11 message_type.resize(message_type.size() - 1); - *out = make_pair(module, message_type); + *out = module + message_type; return true; } @@ -210,7 +228,7 @@ static void PrintAllComments(const DescriptorType* desc, Printer* printer) { bool PrintBetaServicer(const ServiceDescriptor* service, Printer* out) { - out->Print("\n"); + out->Print("\n\n"); out->Print("class Beta$Service$Servicer(object):\n", "Service", service->name()); { @@ -234,7 +252,7 @@ bool PrintBetaServicer(const ServiceDescriptor* service, bool PrintBetaStub(const ServiceDescriptor* service, Printer* out) { - out->Print("\n"); + out->Print("\n\n"); out->Print("class Beta$Service$Stub(object):\n", "Service", service->name()); { IndentScope raii_class_indent(out); @@ -244,7 +262,7 @@ bool PrintBetaStub(const ServiceDescriptor* service, grpc::string arg_name = meth->client_streaming() ? "request_iterator" : "request"; auto methdict = ListToDict({"Method", meth->name(), "ArgName", arg_name}); - out->Print(methdict, "def $Method$(self, $ArgName$, timeout):\n"); + out->Print(methdict, "def $Method$(self, $ArgName$, timeout, metadata=None, with_call=False, protocol_options=None):\n"); { IndentScope raii_method_indent(out); PrintAllComments(meth, out); @@ -260,38 +278,31 @@ bool PrintBetaStub(const ServiceDescriptor* service, bool PrintBetaServerFactory(const grpc::string& package_qualified_service_name, const ServiceDescriptor* service, Printer* out) { - out->Print("\n"); + out->Print("\n\n"); out->Print("def beta_create_$Service$_server(servicer, pool=None, " "pool_size=None, default_timeout=None, maximum_timeout=None):\n", "Service", service->name()); { IndentScope raii_create_server_indent(out); map method_implementation_constructors; - map> - input_message_modules_and_classes; - map> - output_message_modules_and_classes; + map input_message_modules_and_classes; + map output_message_modules_and_classes; for (int i = 0; i < service->method_count(); ++i) { const MethodDescriptor* method = service->method(i); const grpc::string method_implementation_constructor = grpc::string(method->client_streaming() ? "stream_" : "unary_") + grpc::string(method->server_streaming() ? "stream_" : "unary_") + "inline"; - pair input_message_module_and_class; - if (!GetModuleAndMessagePath(method->input_type(), + grpc::string input_message_module_and_class; + if (!GetModuleAndMessagePath(method->input_type(), service, &input_message_module_and_class)) { return false; } - pair output_message_module_and_class; - if (!GetModuleAndMessagePath(method->output_type(), + grpc::string output_message_module_and_class; + if (!GetModuleAndMessagePath(method->output_type(), service, &output_message_module_and_class)) { return false; } - // Import the modules that define the messages used in RPCs. - out->Print("import $Module$\n", "Module", - input_message_module_and_class.first); - out->Print("import $Module$\n", "Module", - output_message_module_and_class.first); method_implementation_constructors.insert( make_pair(method->name(), method_implementation_constructor)); input_message_modules_and_classes.insert( @@ -307,13 +318,11 @@ bool PrintBetaServerFactory(const grpc::string& package_qualified_service_name, name_and_input_module_class_pair++) { IndentScope raii_indent(out); out->Print("(\'$PackageQualifiedServiceName$\', \'$MethodName$\'): " - "$InputTypeModule$.$InputTypeClass$.FromString,\n", + "$InputTypeModuleAndClass$.FromString,\n", "PackageQualifiedServiceName", package_qualified_service_name, "MethodName", name_and_input_module_class_pair->first, - "InputTypeModule", - name_and_input_module_class_pair->second.first, - "InputTypeClass", - name_and_input_module_class_pair->second.second); + "InputTypeModuleAndClass", + name_and_input_module_class_pair->second); } out->Print("}\n"); out->Print("response_serializers = {\n"); @@ -324,13 +333,11 @@ bool PrintBetaServerFactory(const grpc::string& package_qualified_service_name, name_and_output_module_class_pair++) { IndentScope raii_indent(out); out->Print("(\'$PackageQualifiedServiceName$\', \'$MethodName$\'): " - "$OutputTypeModule$.$OutputTypeClass$.SerializeToString,\n", + "$OutputTypeModuleAndClass$.SerializeToString,\n", "PackageQualifiedServiceName", package_qualified_service_name, "MethodName", name_and_output_module_class_pair->first, - "OutputTypeModule", - name_and_output_module_class_pair->second.first, - "OutputTypeClass", - name_and_output_module_class_pair->second.second); + "OutputTypeModuleAndClass", + name_and_output_module_class_pair->second); } out->Print("}\n"); out->Print("method_implementations = {\n"); @@ -366,37 +373,30 @@ bool PrintBetaStubFactory(const grpc::string& package_qualified_service_name, map dict = ListToDict({ "Service", service->name(), }); - out->Print("\n"); + out->Print("\n\n"); out->Print(dict, "def beta_create_$Service$_stub(channel, host=None," " metadata_transformer=None, pool=None, pool_size=None):\n"); { IndentScope raii_create_server_indent(out); map method_cardinalities; - map> - input_message_modules_and_classes; - map> - output_message_modules_and_classes; + map input_message_modules_and_classes; + map output_message_modules_and_classes; for (int i = 0; i < service->method_count(); ++i) { const MethodDescriptor* method = service->method(i); const grpc::string method_cardinality = grpc::string(method->client_streaming() ? "STREAM" : "UNARY") + "_" + - grpc::string(method->server_streaming() ? "STREAM" : "UNARY"); - pair input_message_module_and_class; - if (!GetModuleAndMessagePath(method->input_type(), + grpc::string(method->server_streaming() ? "STREAM" : "UNARY"); + grpc::string input_message_module_and_class; + if (!GetModuleAndMessagePath(method->input_type(), service, &input_message_module_and_class)) { return false; } - pair output_message_module_and_class; - if (!GetModuleAndMessagePath(method->output_type(), + grpc::string output_message_module_and_class; + if (!GetModuleAndMessagePath(method->output_type(), service, &output_message_module_and_class)) { return false; } - // Import the modules that define the messages used in RPCs. - out->Print("import $Module$\n", "Module", - input_message_module_and_class.first); - out->Print("import $Module$\n", "Module", - output_message_module_and_class.first); method_cardinalities.insert( make_pair(method->name(), method_cardinality)); input_message_modules_and_classes.insert( @@ -412,13 +412,11 @@ bool PrintBetaStubFactory(const grpc::string& package_qualified_service_name, name_and_input_module_class_pair++) { IndentScope raii_indent(out); out->Print("(\'$PackageQualifiedServiceName$\', \'$MethodName$\'): " - "$InputTypeModule$.$InputTypeClass$.SerializeToString,\n", + "$InputTypeModuleAndClass$.SerializeToString,\n", "PackageQualifiedServiceName", package_qualified_service_name, "MethodName", name_and_input_module_class_pair->first, - "InputTypeModule", - name_and_input_module_class_pair->second.first, - "InputTypeClass", - name_and_input_module_class_pair->second.second); + "InputTypeModuleAndClass", + name_and_input_module_class_pair->second); } out->Print("}\n"); out->Print("response_deserializers = {\n"); @@ -429,13 +427,11 @@ bool PrintBetaStubFactory(const grpc::string& package_qualified_service_name, name_and_output_module_class_pair++) { IndentScope raii_indent(out); out->Print("(\'$PackageQualifiedServiceName$\', \'$MethodName$\'): " - "$OutputTypeModule$.$OutputTypeClass$.FromString,\n", + "$OutputTypeModuleAndClass$.FromString,\n", "PackageQualifiedServiceName", package_qualified_service_name, "MethodName", name_and_output_module_class_pair->first, - "OutputTypeModule", - name_and_output_module_class_pair->second.first, - "OutputTypeClass", - name_and_output_module_class_pair->second.second); + "OutputTypeModuleAndClass", + name_and_output_module_class_pair->second); } out->Print("}\n"); out->Print("cardinalities = {\n"); @@ -463,8 +459,6 @@ bool PrintBetaStubFactory(const grpc::string& package_qualified_service_name, bool PrintPreamble(const FileDescriptor* file, const GeneratorConfiguration& config, Printer* out) { - out->Print("import abc\n"); - out->Print("import six\n"); out->Print("from $Package$ import implementations as beta_implementations\n", "Package", config.beta_package_root); out->Print("from $Package$ import interfaces as beta_interfaces\n", From aff7564c4d7a2765af136b5421e8e8a093d2b168 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 11 May 2016 14:56:05 -0700 Subject: [PATCH 0453/1894] update Greeter to 0.14.0 nugets --- examples/csharp/helloworld/.nuget/packages.config | 2 +- examples/csharp/helloworld/Greeter/Greeter.csproj | 10 +++++----- examples/csharp/helloworld/Greeter/packages.config | 5 ++--- .../helloworld/GreeterClient/GreeterClient.csproj | 10 +++++----- .../csharp/helloworld/GreeterClient/packages.config | 5 ++--- .../helloworld/GreeterServer/GreeterServer.csproj | 10 +++++----- .../csharp/helloworld/GreeterServer/packages.config | 5 ++--- examples/csharp/helloworld/generate_protos.bat | 2 +- 8 files changed, 23 insertions(+), 26 deletions(-) diff --git a/examples/csharp/helloworld/.nuget/packages.config b/examples/csharp/helloworld/.nuget/packages.config index 0f89a66e25f..bfd6c6723d9 100644 --- a/examples/csharp/helloworld/.nuget/packages.config +++ b/examples/csharp/helloworld/.nuget/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/examples/csharp/helloworld/Greeter/Greeter.csproj b/examples/csharp/helloworld/Greeter/Greeter.csproj index 1e9399f7981..0270cc25f7a 100644 --- a/examples/csharp/helloworld/Greeter/Greeter.csproj +++ b/examples/csharp/helloworld/Greeter/Greeter.csproj @@ -10,7 +10,7 @@ Greeter Greeter v4.5 - 96275748 + 745ac60f true @@ -35,9 +35,9 @@ False ..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll - + False - ..\packages\Grpc.Core.0.13.1\lib\net45\Grpc.Core.dll + ..\packages\Grpc.Core.0.14.0\lib\net45\Grpc.Core.dll @@ -61,11 +61,11 @@ - + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/examples/csharp/helloworld/Greeter/packages.config b/examples/csharp/helloworld/Greeter/packages.config index 7d24440b123..617fe6da7be 100644 --- a/examples/csharp/helloworld/Greeter/packages.config +++ b/examples/csharp/helloworld/Greeter/packages.config @@ -1,8 +1,7 @@  - - - + + \ No newline at end of file diff --git a/examples/csharp/helloworld/GreeterClient/GreeterClient.csproj b/examples/csharp/helloworld/GreeterClient/GreeterClient.csproj index e10a6058df1..877c450a50e 100644 --- a/examples/csharp/helloworld/GreeterClient/GreeterClient.csproj +++ b/examples/csharp/helloworld/GreeterClient/GreeterClient.csproj @@ -10,7 +10,7 @@ GreeterClient GreeterClient v4.5 - d94f6f5f + 63b59176 true @@ -35,9 +35,9 @@ False ..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll - + False - ..\packages\Grpc.Core.0.13.1\lib\net45\Grpc.Core.dll + ..\packages\Grpc.Core.0.14.0\lib\net45\Grpc.Core.dll @@ -59,11 +59,11 @@ - + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/examples/csharp/helloworld/GreeterClient/packages.config b/examples/csharp/helloworld/GreeterClient/packages.config index 7d24440b123..617fe6da7be 100644 --- a/examples/csharp/helloworld/GreeterClient/packages.config +++ b/examples/csharp/helloworld/GreeterClient/packages.config @@ -1,8 +1,7 @@  - - - + + \ No newline at end of file diff --git a/examples/csharp/helloworld/GreeterServer/GreeterServer.csproj b/examples/csharp/helloworld/GreeterServer/GreeterServer.csproj index 6c70f75087d..4d792dcf32e 100644 --- a/examples/csharp/helloworld/GreeterServer/GreeterServer.csproj +++ b/examples/csharp/helloworld/GreeterServer/GreeterServer.csproj @@ -10,7 +10,7 @@ GreeterServer GreeterServer v4.5 - 6f89e9f2 + 25ac2e80 true @@ -35,9 +35,9 @@ False ..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll - + False - ..\packages\Grpc.Core.0.13.1\lib\net45\Grpc.Core.dll + ..\packages\Grpc.Core.0.14.0\lib\net45\Grpc.Core.dll @@ -59,11 +59,11 @@ - + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/examples/csharp/helloworld/GreeterServer/packages.config b/examples/csharp/helloworld/GreeterServer/packages.config index 7d24440b123..617fe6da7be 100644 --- a/examples/csharp/helloworld/GreeterServer/packages.config +++ b/examples/csharp/helloworld/GreeterServer/packages.config @@ -1,8 +1,7 @@  - - - + + \ No newline at end of file diff --git a/examples/csharp/helloworld/generate_protos.bat b/examples/csharp/helloworld/generate_protos.bat index 99f81a7d821..aa3a77b288d 100644 --- a/examples/csharp/helloworld/generate_protos.bat +++ b/examples/csharp/helloworld/generate_protos.bat @@ -5,7 +5,7 @@ setlocal @rem enter this directory cd /d %~dp0 -set TOOLS_PATH=packages\Grpc.Tools.0.13.1\tools\windows_x86 +set TOOLS_PATH=packages\Grpc.Tools.0.14.0\tools\windows_x86 %TOOLS_PATH%\protoc.exe -I../../protos --csharp_out Greeter ../../protos/helloworld.proto --grpc_out Greeter --plugin=protoc-gen-grpc=%TOOLS_PATH%\grpc_csharp_plugin.exe From 4dae646a69f8c29182a7436ef4c1814725319ffd Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 11 May 2016 14:57:37 -0700 Subject: [PATCH 0454/1894] regenerate code --- .../helloworld/Greeter/HelloworldGrpc.cs | 144 +++++++++++++++--- 1 file changed, 122 insertions(+), 22 deletions(-) diff --git a/examples/csharp/helloworld/Greeter/HelloworldGrpc.cs b/examples/csharp/helloworld/Greeter/HelloworldGrpc.cs index 4014bc21e32..405f3bd7248 100644 --- a/examples/csharp/helloworld/Greeter/HelloworldGrpc.cs +++ b/examples/csharp/helloworld/Greeter/HelloworldGrpc.cs @@ -1,5 +1,35 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: helloworld.proto +// Original file comments: +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// #region Designer generated code using System; @@ -8,6 +38,9 @@ using System.Threading.Tasks; using Grpc.Core; namespace Helloworld { + /// + /// The greeting service definition. + /// public static class Greeter { static readonly string __ServiceName = "helloworld.Greeter"; @@ -22,66 +55,133 @@ namespace Helloworld { __Marshaller_HelloRequest, __Marshaller_HelloReply); - // service descriptor + /// Service descriptor public static global::Google.Protobuf.Reflection.ServiceDescriptor Descriptor { get { return global::Helloworld.HelloworldReflection.Descriptor.Services[0]; } } - // client interface + /// Client for Greeter + [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")] public interface IGreeterClient { + /// + /// Sends a greeting + /// global::Helloworld.HelloReply SayHello(global::Helloworld.HelloRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Sends a greeting + /// global::Helloworld.HelloReply SayHello(global::Helloworld.HelloRequest request, CallOptions options); + /// + /// Sends a greeting + /// AsyncUnaryCall SayHelloAsync(global::Helloworld.HelloRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); + /// + /// Sends a greeting + /// AsyncUnaryCall SayHelloAsync(global::Helloworld.HelloRequest request, CallOptions options); } - // server-side interface + /// Interface of server-side implementations of Greeter + [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")] public interface IGreeter { - Task SayHello(global::Helloworld.HelloRequest request, ServerCallContext context); + /// + /// Sends a greeting + /// + global::System.Threading.Tasks.Task SayHello(global::Helloworld.HelloRequest request, ServerCallContext context); } - // client stub - public class GreeterClient : ClientBase, IGreeterClient + /// Base class for server-side implementations of Greeter + public abstract class GreeterBase + { + /// + /// Sends a greeting + /// + public virtual global::System.Threading.Tasks.Task SayHello(global::Helloworld.HelloRequest request, ServerCallContext context) + { + throw new RpcException(new Status(StatusCode.Unimplemented, "")); + } + + } + + /// Client for Greeter + #pragma warning disable 0618 + public class GreeterClient : ClientBase, IGreeterClient + #pragma warning restore 0618 { public GreeterClient(Channel channel) : base(channel) { } - public global::Helloworld.HelloReply SayHello(global::Helloworld.HelloRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) + public GreeterClient(CallInvoker callInvoker) : base(callInvoker) + { + } + ///Protected parameterless constructor to allow creation of test doubles. + protected GreeterClient() : base() + { + } + ///Protected constructor to allow creation of configured clients. + protected GreeterClient(ClientBaseConfiguration configuration) : base(configuration) + { + } + + /// + /// Sends a greeting + /// + public virtual global::Helloworld.HelloReply SayHello(global::Helloworld.HelloRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) + { + return SayHello(request, new CallOptions(headers, deadline, cancellationToken)); + } + /// + /// Sends a greeting + /// + public virtual global::Helloworld.HelloReply SayHello(global::Helloworld.HelloRequest request, CallOptions options) { - var call = CreateCall(__Method_SayHello, new CallOptions(headers, deadline, cancellationToken)); - return Calls.BlockingUnaryCall(call, request); + return CallInvoker.BlockingUnaryCall(__Method_SayHello, null, options, request); } - public global::Helloworld.HelloReply SayHello(global::Helloworld.HelloRequest request, CallOptions options) + /// + /// Sends a greeting + /// + public virtual AsyncUnaryCall SayHelloAsync(global::Helloworld.HelloRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { - var call = CreateCall(__Method_SayHello, options); - return Calls.BlockingUnaryCall(call, request); + return SayHelloAsync(request, new CallOptions(headers, deadline, cancellationToken)); } - public AsyncUnaryCall SayHelloAsync(global::Helloworld.HelloRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) + /// + /// Sends a greeting + /// + public virtual AsyncUnaryCall SayHelloAsync(global::Helloworld.HelloRequest request, CallOptions options) { - var call = CreateCall(__Method_SayHello, new CallOptions(headers, deadline, cancellationToken)); - return Calls.AsyncUnaryCall(call, request); + return CallInvoker.AsyncUnaryCall(__Method_SayHello, null, options, request); } - public AsyncUnaryCall SayHelloAsync(global::Helloworld.HelloRequest request, CallOptions options) + protected override GreeterClient NewInstance(ClientBaseConfiguration configuration) { - var call = CreateCall(__Method_SayHello, options); - return Calls.AsyncUnaryCall(call, request); + return new GreeterClient(configuration); } } - // creates service definition that can be registered with a server + /// Creates a new client for Greeter + public static GreeterClient NewClient(Channel channel) + { + return new GreeterClient(channel); + } + + /// Creates service definition that can be registered with a server + #pragma warning disable 0618 public static ServerServiceDefinition BindService(IGreeter serviceImpl) + #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder(__ServiceName) .AddMethod(__Method_SayHello, serviceImpl.SayHello).Build(); } - // creates a new client - public static GreeterClient NewClient(Channel channel) + /// Creates service definition that can be registered with a server + #pragma warning disable 0618 + public static ServerServiceDefinition BindService(GreeterBase serviceImpl) + #pragma warning restore 0618 { - return new GreeterClient(channel); + return ServerServiceDefinition.CreateBuilder(__ServiceName) + .AddMethod(__Method_SayHello, serviceImpl.SayHello).Build(); } } From 526c99188aae8410b05046370abd71bbdf69006a Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 11 May 2016 15:04:50 -0700 Subject: [PATCH 0455/1894] update RouteGuide to 0.14.0 nugets --- examples/csharp/route_guide/.nuget/packages.config | 2 +- .../csharp/route_guide/RouteGuide/RouteGuide.csproj | 10 +++++----- examples/csharp/route_guide/RouteGuide/packages.config | 5 ++--- .../RouteGuideClient/RouteGuideClient.csproj | 10 +++++----- .../route_guide/RouteGuideClient/packages.config | 5 ++--- .../RouteGuideServer/RouteGuideServer.csproj | 10 +++++----- .../route_guide/RouteGuideServer/packages.config | 5 ++--- examples/csharp/route_guide/generate_protos.bat | 2 +- 8 files changed, 23 insertions(+), 26 deletions(-) diff --git a/examples/csharp/route_guide/.nuget/packages.config b/examples/csharp/route_guide/.nuget/packages.config index 0f89a66e25f..bfd6c6723d9 100644 --- a/examples/csharp/route_guide/.nuget/packages.config +++ b/examples/csharp/route_guide/.nuget/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/examples/csharp/route_guide/RouteGuide/RouteGuide.csproj b/examples/csharp/route_guide/RouteGuide/RouteGuide.csproj index eba1226b900..4f7222ebba3 100644 --- a/examples/csharp/route_guide/RouteGuide/RouteGuide.csproj +++ b/examples/csharp/route_guide/RouteGuide/RouteGuide.csproj @@ -11,7 +11,7 @@ RouteGuide v4.5 512 - e1e648e7 + 0a9fcb7a true @@ -35,9 +35,9 @@ False ..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll - + False - ..\packages\Grpc.Core.0.13.1\lib\net45\Grpc.Core.dll + ..\packages\Grpc.Core.0.14.0\lib\net45\Grpc.Core.dll False @@ -74,12 +74,12 @@ - + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + GRPC_CHANNEL_SHUTDOWN --- include/grpc/impl/codegen/connectivity_state.h | 2 +- src/core/ext/client_config/channel_connectivity.c | 2 +- src/core/ext/client_config/client_channel.c | 13 ++++++------- src/core/ext/client_config/subchannel.c | 4 ++-- src/core/ext/lb_policy/pick_first/pick_first.c | 10 +++++----- src/core/ext/lb_policy/round_robin/round_robin.c | 6 +++--- .../transport/chttp2/transport/chttp2_transport.c | 4 ++-- src/core/lib/surface/lame_client.c | 4 ++-- src/core/lib/surface/server.c | 2 +- src/core/lib/transport/connectivity_state.c | 8 ++++---- src/node/ext/node_grpc.cc | 2 +- src/php/ext/grpc/php_grpc.c | 2 +- src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi | 2 +- .../grpcio/grpc/_cython/_cygrpc/records.pyx.pxi | 2 +- src/ruby/ext/grpc/rb_channel.c | 2 +- test/core/end2end/fuzzers/api_fuzzer.c | 2 +- test/core/surface/lame_client_test.c | 4 ++-- test/core/transport/connectivity_state_test.c | 15 +++++++-------- 18 files changed, 42 insertions(+), 44 deletions(-) diff --git a/include/grpc/impl/codegen/connectivity_state.h b/include/grpc/impl/codegen/connectivity_state.h index 5bb9eb8f4ee..71865d8a566 100644 --- a/include/grpc/impl/codegen/connectivity_state.h +++ b/include/grpc/impl/codegen/connectivity_state.h @@ -49,7 +49,7 @@ typedef enum { /** channel has seen a failure but expects to recover */ GRPC_CHANNEL_TRANSIENT_FAILURE, /** channel has seen a failure that it cannot recover from */ - GRPC_CHANNEL_FATAL_FAILURE + GRPC_CHANNEL_SHUTDOWN } grpc_connectivity_state; #ifdef __cplusplus diff --git a/src/core/ext/client_config/channel_connectivity.c b/src/core/ext/client_config/channel_connectivity.c index 3ebc3336081..cc60f2485ad 100644 --- a/src/core/ext/client_config/channel_connectivity.c +++ b/src/core/ext/client_config/channel_connectivity.c @@ -62,7 +62,7 @@ grpc_connectivity_state grpc_channel_check_connectivity_state( "not a (u)client channel, but '%s'", client_channel_elem->filter->name); grpc_exec_ctx_finish(&exec_ctx); - return GRPC_CHANNEL_FATAL_FAILURE; + return GRPC_CHANNEL_SHUTDOWN; } typedef enum { diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index 9b5a078aece..b80eeb54b28 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -119,7 +119,7 @@ static void set_channel_connectivity_state_locked(grpc_exec_ctx *exec_ctx, grpc_connectivity_state state, const char *reason) { if ((state == GRPC_CHANNEL_TRANSIENT_FAILURE || - state == GRPC_CHANNEL_FATAL_FAILURE) && + state == GRPC_CHANNEL_SHUTDOWN) && chand->lb_policy != NULL) { /* cancel fail-fast picks */ grpc_lb_policy_cancel_picks( @@ -136,8 +136,7 @@ static void on_lb_policy_state_changed_locked( /* check if the notification is for a stale policy */ if (w->lb_policy != w->chand->lb_policy) return; - if (publish_state == GRPC_CHANNEL_FATAL_FAILURE && - w->chand->resolver != NULL) { + if (publish_state == GRPC_CHANNEL_SHUTDOWN && w->chand->resolver != NULL) { publish_state = GRPC_CHANNEL_TRANSIENT_FAILURE; grpc_resolver_channel_saw_error(exec_ctx, w->chand->resolver); GRPC_LB_POLICY_UNREF(exec_ctx, w->chand->lb_policy, "channel"); @@ -145,7 +144,7 @@ static void on_lb_policy_state_changed_locked( } set_channel_connectivity_state_locked(exec_ctx, w->chand, publish_state, "lb_changed"); - if (w->state != GRPC_CHANNEL_FATAL_FAILURE) { + if (w->state != GRPC_CHANNEL_SHUTDOWN) { watch_lb_policy(exec_ctx, w->chand, w->lb_policy, w->state); } } @@ -237,7 +236,7 @@ static void cc_on_config_changed(grpc_exec_ctx *exec_ctx, void *arg, chand->resolver = NULL; } set_channel_connectivity_state_locked( - exec_ctx, chand, GRPC_CHANNEL_FATAL_FAILURE, "resolver_gone"); + exec_ctx, chand, GRPC_CHANNEL_SHUTDOWN, "resolver_gone"); gpr_mu_unlock(&chand->mu_config); } @@ -292,8 +291,8 @@ static void cc_start_transport_op(grpc_exec_ctx *exec_ctx, } if (op->disconnect && chand->resolver != NULL) { - set_channel_connectivity_state_locked( - exec_ctx, chand, GRPC_CHANNEL_FATAL_FAILURE, "disconnect"); + set_channel_connectivity_state_locked(exec_ctx, chand, + GRPC_CHANNEL_SHUTDOWN, "disconnect"); grpc_resolver_shutdown(exec_ctx, chand->resolver); GRPC_RESOLVER_UNREF(exec_ctx, chand->resolver, "channel"); chand->resolver = NULL; diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c index cfd39e7cfbf..22032d95df7 100644 --- a/src/core/ext/client_config/subchannel.c +++ b/src/core/ext/client_config/subchannel.c @@ -480,11 +480,11 @@ static void subchannel_on_child_state_changed(grpc_exec_ctx *exec_ctx, void *p, if (iomgr_success) { if (sw->connectivity_state == GRPC_CHANNEL_TRANSIENT_FAILURE) { /* any errors on a subchannel ==> we're done, create a new one */ - sw->connectivity_state = GRPC_CHANNEL_FATAL_FAILURE; + sw->connectivity_state = GRPC_CHANNEL_SHUTDOWN; } grpc_connectivity_state_set(exec_ctx, &c->state_tracker, sw->connectivity_state, "reflect_child"); - if (sw->connectivity_state != GRPC_CHANNEL_FATAL_FAILURE) { + if (sw->connectivity_state != GRPC_CHANNEL_SHUTDOWN) { grpc_connected_subchannel_notify_on_state_change( exec_ctx, GET_CONNECTED_SUBCHANNEL(c, no_barrier), NULL, &sw->connectivity_state, &sw->closure); diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c index 0d215cd1968..b5797da8320 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -104,7 +104,7 @@ static void pf_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { pp = p->pending_picks; p->pending_picks = NULL; grpc_connectivity_state_set(exec_ctx, &p->state_tracker, - GRPC_CHANNEL_FATAL_FAILURE, "shutdown"); + GRPC_CHANNEL_SHUTDOWN, "shutdown"); /* cancel subscription */ if (selected != NULL) { grpc_connected_subchannel_notify_on_state_change( @@ -273,11 +273,11 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, } else if (selected != NULL) { if (p->checking_connectivity == GRPC_CHANNEL_TRANSIENT_FAILURE) { /* if the selected channel goes bad, we're done */ - p->checking_connectivity = GRPC_CHANNEL_FATAL_FAILURE; + p->checking_connectivity = GRPC_CHANNEL_SHUTDOWN; } grpc_connectivity_state_set(exec_ctx, &p->state_tracker, p->checking_connectivity, "selected_changed"); - if (p->checking_connectivity != GRPC_CHANNEL_FATAL_FAILURE) { + if (p->checking_connectivity != GRPC_CHANNEL_SHUTDOWN) { grpc_connected_subchannel_notify_on_state_change( exec_ctx, selected, p->base.interested_parties, &p->checking_connectivity, &p->connectivity_changed); @@ -343,7 +343,7 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, p->base.interested_parties, &p->checking_connectivity, &p->connectivity_changed); break; - case GRPC_CHANNEL_FATAL_FAILURE: + case GRPC_CHANNEL_SHUTDOWN: p->num_subchannels--; GPR_SWAP(grpc_subchannel *, p->subchannels[p->checking_subchannel], p->subchannels[p->num_subchannels]); @@ -351,7 +351,7 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, "pick_first"); if (p->num_subchannels == 0) { grpc_connectivity_state_set(exec_ctx, &p->state_tracker, - GRPC_CHANNEL_FATAL_FAILURE, + GRPC_CHANNEL_SHUTDOWN, "no_more_channels"); while ((pp = p->pending_picks)) { p->pending_picks = pp->next; diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index dcdc0c62857..7ab913b6457 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -243,7 +243,7 @@ static void rr_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { gpr_free(pp); } grpc_connectivity_state_set(exec_ctx, &p->state_tracker, - GRPC_CHANNEL_FATAL_FAILURE, "shutdown"); + GRPC_CHANNEL_SHUTDOWN, "shutdown"); for (i = 0; i < p->num_subchannels; i++) { subchannel_data *sd = p->subchannels[i]; grpc_subchannel_notify_on_state_change(exec_ctx, sd->subchannel, NULL, NULL, @@ -439,7 +439,7 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, GRPC_CHANNEL_TRANSIENT_FAILURE, "connecting_transient_failure"); break; - case GRPC_CHANNEL_FATAL_FAILURE: + case GRPC_CHANNEL_SHUTDOWN: if (sd->ready_list_node != NULL) { remove_disconnected_sc_locked(p, sd->ready_list_node); sd->ready_list_node = NULL; @@ -455,7 +455,7 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, unref = 1; if (p->num_subchannels == 0) { grpc_connectivity_state_set(exec_ctx, &p->state_tracker, - GRPC_CHANNEL_FATAL_FAILURE, + GRPC_CHANNEL_SHUTDOWN, "no_more_channels"); while ((pp = p->pending_picks)) { p->pending_picks = pp->next; diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index b6886a2201b..d0403cc6a25 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -444,7 +444,7 @@ static void close_transport_locked(grpc_exec_ctx *exec_ctx, void *arg_ignored) { if (!t->closed) { t->closed = 1; - connectivity_state_set(exec_ctx, &t->global, GRPC_CHANNEL_FATAL_FAILURE, + connectivity_state_set(exec_ctx, &t->global, GRPC_CHANNEL_SHUTDOWN, "close_transport"); if (t->ep) { allow_endpoint_shutdown_locked(exec_ctx, t); @@ -804,7 +804,7 @@ void grpc_chttp2_add_incoming_goaway( gpr_free(msg); gpr_slice_unref(goaway_text); transport_global->seen_goaway = 1; - connectivity_state_set(exec_ctx, transport_global, GRPC_CHANNEL_FATAL_FAILURE, + connectivity_state_set(exec_ctx, transport_global, GRPC_CHANNEL_SHUTDOWN, "got_goaway"); } diff --git a/src/core/lib/surface/lame_client.c b/src/core/lib/surface/lame_client.c index f50ec54cea9..0038f85330a 100644 --- a/src/core/lib/surface/lame_client.c +++ b/src/core/lib/surface/lame_client.c @@ -91,8 +91,8 @@ static void lame_start_transport_op(grpc_exec_ctx *exec_ctx, grpc_channel_element *elem, grpc_transport_op *op) { if (op->on_connectivity_state_change) { - GPR_ASSERT(*op->connectivity_state != GRPC_CHANNEL_FATAL_FAILURE); - *op->connectivity_state = GRPC_CHANNEL_FATAL_FAILURE; + GPR_ASSERT(*op->connectivity_state != GRPC_CHANNEL_SHUTDOWN); + *op->connectivity_state = GRPC_CHANNEL_SHUTDOWN; op->on_connectivity_state_change->cb( exec_ctx, op->on_connectivity_state_change->cb_arg, 1); } diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 505b5019683..9c006fcebf9 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -812,7 +812,7 @@ static void channel_connectivity_changed(grpc_exec_ctx *exec_ctx, void *cd, bool iomgr_status_ignored) { channel_data *chand = cd; grpc_server *server = chand->server; - if (chand->connectivity_state != GRPC_CHANNEL_FATAL_FAILURE) { + if (chand->connectivity_state != GRPC_CHANNEL_SHUTDOWN) { grpc_transport_op op; memset(&op, 0, sizeof(op)); op.on_connectivity_state_change = &chand->channel_connectivity_changed, diff --git a/src/core/lib/transport/connectivity_state.c b/src/core/lib/transport/connectivity_state.c index e24ee638fdd..74a5ef5c139 100644 --- a/src/core/lib/transport/connectivity_state.c +++ b/src/core/lib/transport/connectivity_state.c @@ -51,7 +51,7 @@ const char *grpc_connectivity_state_name(grpc_connectivity_state state) { return "READY"; case GRPC_CHANNEL_TRANSIENT_FAILURE: return "TRANSIENT_FAILURE"; - case GRPC_CHANNEL_FATAL_FAILURE: + case GRPC_CHANNEL_SHUTDOWN: return "FATAL_FAILURE"; } GPR_UNREACHABLE_CODE(return "UNKNOWN"); @@ -72,8 +72,8 @@ void grpc_connectivity_state_destroy(grpc_exec_ctx *exec_ctx, while ((w = tracker->watchers)) { tracker->watchers = w->next; - if (GRPC_CHANNEL_FATAL_FAILURE != *w->current) { - *w->current = GRPC_CHANNEL_FATAL_FAILURE; + if (GRPC_CHANNEL_SHUTDOWN != *w->current) { + *w->current = GRPC_CHANNEL_SHUTDOWN; success = 1; } else { success = 0; @@ -153,7 +153,7 @@ void grpc_connectivity_state_set(grpc_exec_ctx *exec_ctx, if (tracker->current_state == state) { return; } - GPR_ASSERT(tracker->current_state != GRPC_CHANNEL_FATAL_FAILURE); + GPR_ASSERT(tracker->current_state != GRPC_CHANNEL_SHUTDOWN); tracker->current_state = state; while ((w = tracker->watchers) != NULL) { *w->current = tracker->current_state; diff --git a/src/node/ext/node_grpc.cc b/src/node/ext/node_grpc.cc index 6b6e42737b5..f18ce01c6fd 100644 --- a/src/node/ext/node_grpc.cc +++ b/src/node/ext/node_grpc.cc @@ -220,7 +220,7 @@ void InitConnectivityStateConstants(Local exports) { Nan::Set(channel_state, Nan::New("TRANSIENT_FAILURE").ToLocalChecked(), TRANSIENT_FAILURE); Local FATAL_FAILURE( - Nan::New(GRPC_CHANNEL_FATAL_FAILURE)); + Nan::New(GRPC_CHANNEL_SHUTDOWN)); Nan::Set(channel_state, Nan::New("FATAL_FAILURE").ToLocalChecked(), FATAL_FAILURE); } diff --git a/src/php/ext/grpc/php_grpc.c b/src/php/ext/grpc/php_grpc.c index 762c01385c9..f4cb5b28cc8 100644 --- a/src/php/ext/grpc/php_grpc.c +++ b/src/php/ext/grpc/php_grpc.c @@ -227,7 +227,7 @@ PHP_MINIT_FUNCTION(grpc) { GRPC_CHANNEL_TRANSIENT_FAILURE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("Grpc\\CHANNEL_FATAL_FAILURE", - GRPC_CHANNEL_FATAL_FAILURE, + GRPC_CHANNEL_SHUTDOWN, CONST_CS | CONST_PERSISTENT); grpc_init_call(TSRMLS_C); diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi index d42c58050fb..05b8886df73 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi @@ -208,7 +208,7 @@ cdef extern from "grpc/_cython/loader.h": GRPC_CHANNEL_CONNECTING GRPC_CHANNEL_READY GRPC_CHANNEL_TRANSIENT_FAILURE - GRPC_CHANNEL_FATAL_FAILURE + GRPC_CHANNEL_SHUTDOWN ctypedef struct grpc_metadata: const char *key diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi index c7539f0d490..47800c067d1 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi @@ -33,7 +33,7 @@ class ConnectivityState: connecting = GRPC_CHANNEL_CONNECTING ready = GRPC_CHANNEL_READY transient_failure = GRPC_CHANNEL_TRANSIENT_FAILURE - fatal_failure = GRPC_CHANNEL_FATAL_FAILURE + fatal_failure = GRPC_CHANNEL_SHUTDOWN class ChannelArgKey: diff --git a/src/ruby/ext/grpc/rb_channel.c b/src/ruby/ext/grpc/rb_channel.c index 013321ffc8a..6943c93d4aa 100644 --- a/src/ruby/ext/grpc/rb_channel.c +++ b/src/ruby/ext/grpc/rb_channel.c @@ -373,7 +373,7 @@ static void Init_grpc_connectivity_states() { rb_define_const(grpc_rb_mConnectivityStates, "TRANSIENT_FAILURE", LONG2NUM(GRPC_CHANNEL_TRANSIENT_FAILURE)); rb_define_const(grpc_rb_mConnectivityStates, "FATAL_FAILURE", - LONG2NUM(GRPC_CHANNEL_FATAL_FAILURE)); + LONG2NUM(GRPC_CHANNEL_SHUTDOWN)); } void Init_grpc_channel() { diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c index e6cd88acee4..6bcddbd7699 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -674,7 +674,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { if (g_channel != NULL) { grpc_connectivity_state st = grpc_channel_check_connectivity_state(g_channel, 0); - if (st != GRPC_CHANNEL_FATAL_FAILURE) { + 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)); diff --git a/test/core/surface/lame_client_test.c b/test/core/surface/lame_client_test.c index 12fa9de6cf3..3286db5b1b8 100644 --- a/test/core/surface/lame_client_test.c +++ b/test/core/surface/lame_client_test.c @@ -49,7 +49,7 @@ static void *tag(intptr_t x) { return (void *)x; } void verify_connectivity(grpc_exec_ctx *exec_ctx, void *arg, bool success) { grpc_transport_op *op = arg; - GPR_ASSERT(GRPC_CHANNEL_FATAL_FAILURE == *op->connectivity_state); + GPR_ASSERT(GRPC_CHANNEL_SHUTDOWN == *op->connectivity_state); GPR_ASSERT(success); } @@ -104,7 +104,7 @@ int main(int argc, char **argv) { test_transport_op(chan); - GPR_ASSERT(GRPC_CHANNEL_FATAL_FAILURE == + GPR_ASSERT(GRPC_CHANNEL_SHUTDOWN == grpc_channel_check_connectivity_state(chan, 0)); cq = grpc_completion_queue_create(NULL); diff --git a/test/core/transport/connectivity_state_test.c b/test/core/transport/connectivity_state_test.c index 6bb7c3b06ba..38dea01cc6d 100644 --- a/test/core/transport/connectivity_state_test.c +++ b/test/core/transport/connectivity_state_test.c @@ -66,9 +66,8 @@ static void test_connectivity_state_name(void) { GPR_ASSERT( 0 == strcmp(grpc_connectivity_state_name(GRPC_CHANNEL_TRANSIENT_FAILURE), "TRANSIENT_FAILURE")); - GPR_ASSERT(0 == - strcmp(grpc_connectivity_state_name(GRPC_CHANNEL_FATAL_FAILURE), - "FATAL_FAILURE")); + GPR_ASSERT(0 == strcmp(grpc_connectivity_state_name(GRPC_CHANNEL_SHUTDOWN), + "FATAL_FAILURE")); } static void test_check(void) { @@ -119,26 +118,26 @@ static void test_subscribe_then_destroy(void) { GPR_ASSERT(g_counter == 0); grpc_connectivity_state_destroy(&exec_ctx, &tracker); grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(state == GRPC_CHANNEL_FATAL_FAILURE); + GPR_ASSERT(state == GRPC_CHANNEL_SHUTDOWN); GPR_ASSERT(g_counter == 1); } static void test_subscribe_with_failure_then_destroy(void) { grpc_connectivity_state_tracker tracker; grpc_closure *closure = grpc_closure_create(must_fail, THE_ARG); - grpc_connectivity_state state = GRPC_CHANNEL_FATAL_FAILURE; + grpc_connectivity_state state = GRPC_CHANNEL_SHUTDOWN; grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; gpr_log(GPR_DEBUG, "test_subscribe_with_failure_then_destroy"); g_counter = 0; - grpc_connectivity_state_init(&tracker, GRPC_CHANNEL_FATAL_FAILURE, "xxx"); + grpc_connectivity_state_init(&tracker, GRPC_CHANNEL_SHUTDOWN, "xxx"); GPR_ASSERT(0 == grpc_connectivity_state_notify_on_state_change( &exec_ctx, &tracker, &state, closure)); grpc_exec_ctx_flush(&exec_ctx); - GPR_ASSERT(state == GRPC_CHANNEL_FATAL_FAILURE); + GPR_ASSERT(state == GRPC_CHANNEL_SHUTDOWN); GPR_ASSERT(g_counter == 0); grpc_connectivity_state_destroy(&exec_ctx, &tracker); grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(state == GRPC_CHANNEL_FATAL_FAILURE); + GPR_ASSERT(state == GRPC_CHANNEL_SHUTDOWN); GPR_ASSERT(g_counter == 1); } From 29243ddb184de25df0d54e1259788c509cd8e983 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Thu, 2 Jun 2016 19:54:17 +0000 Subject: [PATCH 0837/1894] Python GA security API --- src/python/grpcio/grpc/__init__.py | 252 ++++++++++++++++++++- src/python/grpcio/grpc/_plugin_wrapping.py | 123 ++++++++++ 2 files changed, 368 insertions(+), 7 deletions(-) create mode 100644 src/python/grpcio/grpc/_plugin_wrapping.py diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py index 536aaa81cf1..bbf04ad03e8 100644 --- a/src/python/grpcio/grpc/__init__.py +++ b/src/python/grpcio/grpc/__init__.py @@ -352,6 +352,85 @@ class Call(six.with_metaclass(abc.ABCMeta, RpcContext)): raise NotImplementedError() +############ Authentication & Authorization Interfaces & Classes ############# + + +class ChannelCredentials(object): + """A value encapsulating the data required to create a secure Channel. + + This class has no supported interface - it exists to define the type of its + instances and its instances exist to be passed to other functions. + """ + + def __init__(self, credentials): + self._credentials = credentials + + +class CallCredentials(object): + """A value encapsulating data asserting an identity over a channel. + + A CallCredentials may be composed with ChannelCredentials to always assert + identity for every call over that Channel. + + This class has no supported interface - it exists to define the type of its + instances and its instances exist to be passed to other functions. + """ + + def __init__(self, credentials): + self._credentials = credentials + + +class AuthMetadataContext(six.with_metaclass(abc.ABCMeta)): + """Provides information to call credentials metadata plugins. + + Attributes: + service_url: A string URL of the service being called into. + method_name: A string of the fully qualified method name being called. + """ + + +class AuthMetadataPluginCallback(six.with_metaclass(abc.ABCMeta)): + """Callback object received by a metadata plugin.""" + + def __call__(self, metadata, error): + """Inform the gRPC runtime of the metadata to construct a CallCredentials. + + Args: + metadata: An iterable of 2-sequences (e.g. tuples) of metadata key/value + pairs. + error: An Exception to indicate error or None to indicate success. + """ + raise NotImplementedError() + + +class AuthMetadataPlugin(six.with_metaclass(abc.ABCMeta)): + """A specification for custom authentication.""" + + def __call__(self, context, callback): + """Implements authentication by passing metadata to a callback. + + Implementations of this method must not block. + + Args: + context: An AuthMetadataContext providing information on the RPC that the + plugin is being called to authenticate. + callback: An AuthMetadataPluginCallback to be invoked either synchronously + or asynchronously. + """ + raise NotImplementedError() + + +class ServerCredentials(object): + """A value encapsulating the data required to open a secure port on a Server. + + This class has no supported interface - it exists to define the type of its + instances and its instances exist to be passed to other functions. + """ + + def __init__(self, credentials): + self._credentials = credentials + + ######################## Multi-Callable Interfaces ########################### @@ -359,7 +438,9 @@ class UnaryUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): """Affords invoking a unary-unary RPC.""" @abc.abstractmethod - def __call__(self, request, timeout=None, metadata=None, with_call=False): + def __call__( + self, request, timeout=None, metadata=None, credentials=None, + with_call=False): """Synchronously invokes the underlying RPC. Args: @@ -367,6 +448,7 @@ class UnaryUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): timeout: An optional duration of time in seconds to allow for the RPC. metadata: An optional sequence of pairs of bytes to be transmitted to the service-side of the RPC. + credentials: An optional CallCredentials for the RPC. with_call: Whether or not to include return a Call for the RPC in addition to the response. @@ -382,7 +464,7 @@ class UnaryUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): raise NotImplementedError() @abc.abstractmethod - def future(self, request, timeout=None, metadata=None): + def future(self, request, timeout=None, metadata=None, credentials=None): """Asynchronously invokes the underlying RPC. Args: @@ -390,6 +472,7 @@ class UnaryUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): timeout: An optional duration of time in seconds to allow for the RPC. metadata: An optional sequence of pairs of bytes to be transmitted to the service-side of the RPC. + credentials: An optional CallCredentials for the RPC. Returns: An object that is both a Call for the RPC and a Future. In the event of @@ -404,7 +487,7 @@ class UnaryStreamMultiCallable(six.with_metaclass(abc.ABCMeta)): """Affords invoking a unary-stream RPC.""" @abc.abstractmethod - def __call__(self, request, timeout=None, metadata=None): + def __call__(self, request, timeout=None, metadata=None, credentials=None): """Invokes the underlying RPC. Args: @@ -412,6 +495,7 @@ class UnaryStreamMultiCallable(six.with_metaclass(abc.ABCMeta)): timeout: An optional duration of time in seconds to allow for the RPC. metadata: An optional sequence of pairs of bytes to be transmitted to the service-side of the RPC. + credentials: An optional CallCredentials for the RPC. Returns: An object that is both a Call for the RPC and an iterator of response @@ -426,7 +510,8 @@ class StreamUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): @abc.abstractmethod def __call__( - self, request_iterator, timeout=None, metadata=None, with_call=False): + self, request_iterator, timeout=None, metadata=None, credentials=None, + with_call=False): """Synchronously invokes the underlying RPC. Args: @@ -434,6 +519,7 @@ class StreamUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): timeout: An optional duration of time in seconds to allow for the RPC. metadata: An optional sequence of pairs of bytes to be transmitted to the service-side of the RPC. + credentials: An optional CallCredentials for the RPC. with_call: Whether or not to include return a Call for the RPC in addition to the response. @@ -449,7 +535,8 @@ class StreamUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): raise NotImplementedError() @abc.abstractmethod - def future(self, request_iterator, timeout=None, metadata=None): + def future( + self, request_iterator, timeout=None, metadata=None, credentials=None): """Asynchronously invokes the underlying RPC. Args: @@ -457,6 +544,7 @@ class StreamUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): timeout: An optional duration of time in seconds to allow for the RPC. metadata: An optional sequence of pairs of bytes to be transmitted to the service-side of the RPC. + credentials: An optional CallCredentials for the RPC. Returns: An object that is both a Call for the RPC and a Future. In the event of @@ -471,7 +559,8 @@ class StreamStreamMultiCallable(six.with_metaclass(abc.ABCMeta)): """Affords invoking a stream-stream RPC in any call style.""" @abc.abstractmethod - def __call__(self, request_iterator, timeout=None, metadata=None): + def __call__( + self, request_iterator, timeout=None, metadata=None, credentials=None): """Invokes the underlying RPC. Args: @@ -479,6 +568,7 @@ class StreamStreamMultiCallable(six.with_metaclass(abc.ABCMeta)): timeout: An optional duration of time in seconds to allow for the RPC. metadata: An optional sequence of pairs of bytes to be transmitted to the service-side of the RPC. + credentials: An optional CallCredentials for the RPC. Returns: An object that is both a Call for the RPC and an iterator of response @@ -690,7 +780,6 @@ class RpcMethodHandler(six.with_metaclass(abc.ABCMeta)): class HandlerCallDetails(six.with_metaclass(abc.ABCMeta)): """Describes an RPC that has just arrived for service. - Attributes: method: The method name of the RPC. invocation_metadata: The metadata from the invocation side of the RPC. @@ -750,6 +839,25 @@ class Server(six.with_metaclass(abc.ABCMeta)): """ raise NotImplementedError() + @abc.abstractmethod + def add_secure_port(self, address, server_credentials): + """Reserves a port for secure RPC service after this Server becomes active. + + This method may only be called before calling this Server's start method is + called. + + Args: + address: The address for which to open a port. + server_credentials: A ServerCredentials. + + Returns: + An integer port on which RPCs will be serviced after this link has been + started. This is typically the same number as the port number contained + in the passed address, but will likely be different if the port number + contained in the passed address was zero. + """ + raise NotImplementedError() + @abc.abstractmethod def start(self): """Starts this Server's service of RPCs. @@ -792,6 +900,120 @@ class Server(six.with_metaclass(abc.ABCMeta)): ################################# Functions ################################ +def ssl_channel_credentials( + root_certificates=None, private_key=None, certificate_chain=None): + """Creates a ChannelCredentials for use with an SSL-enabled Channel. + + Args: + root_certificates: The PEM-encoded root certificates or unset to ask for + them to be retrieved from a default location. + private_key: The PEM-encoded private key to use or unset if no private key + should be used. + certificate_chain: The PEM-encoded certificate chain to use or unset if no + certificate chain should be used. + + Returns: + A ChannelCredentials for use with an SSL-enabled Channel. + """ + if private_key is not None or certificate_chain is not None: + pair = _cygrpc.SslPemKeyCertPair(private_key, certificate_chain) + else: + pair = None + return ChannelCredentials( + _cygrpc.channel_credentials_ssl(root_certificates, pair)) + + +def metadata_call_credentials(metadata_plugin, name=None): + """Construct CallCredentials from an AuthMetadataPlugin. + + Args: + metadata_plugin: An AuthMetadataPlugin to use as the authentication behavior + in the created CallCredentials. + name: A name for the plugin. + + Returns: + A CallCredentials. + """ + from grpc import _plugin_wrapping + if name is None: + try: + effective_name = metadata_plugin.__name__ + except AttributeError: + effective_name = metadata_plugin.__class__.__name__ + else: + effective_name = name + return CallCredentials( + _plugin_wrapping.call_credentials_metadata_plugin( + metadata_plugin, effective_name)) + + +def composite_call_credentials(call_credentials, additional_call_credentials): + """Compose two CallCredentials to make a new one. + + Args: + call_credentials: A CallCredentials object. + additional_call_credentials: Another CallCredentials object to compose on + top of call_credentials. + + Returns: + A new CallCredentials composed of the two given CallCredentials. + """ + return CallCredentials( + _cygrpc.call_credentials_composite( + call_credentials._credentials, + additional_call_credentials._credentials)) + + +def composite_channel_credentials(channel_credentials, call_credentials): + """Compose a ChannelCredentials and a CallCredentials. + + Args: + channel_credentials: A ChannelCredentials. + call_credentials: A CallCredentials. + + Returns: + A ChannelCredentials composed of the given ChannelCredentials and + CallCredentials. + """ + return ChannelCredentials( + _cygrpc.channel_credentials_composite( + channel_credentials._credentials, call_credentials._credentials)) + + +def ssl_server_credentials( + private_key_certificate_chain_pairs, root_certificates=None, + require_client_auth=False): + """Creates a ServerCredentials for use with an SSL-enabled Server. + + Args: + private_key_certificate_chain_pairs: A nonempty sequence each element of + which is a pair the first element of which is a PEM-encoded private key + and the second element of which is the corresponding PEM-encoded + certificate chain. + root_certificates: PEM-encoded client root certificates to be used for + verifying authenticated clients. If omitted, require_client_auth must also + be omitted or be False. + require_client_auth: A boolean indicating whether or not to require clients + to be authenticated. May only be True if root_certificates is not None. + + Returns: + A ServerCredentials for use with an SSL-enabled Server. + """ + if len(private_key_certificate_chain_pairs) == 0: + raise ValueError( + 'At least one private key-certificate chain pair is required!') + elif require_client_auth and root_certificates is None: + raise ValueError( + 'Illegal to require client auth without providing root certificates!') + else: + return ServerCredentials( + _cygrpc.server_credentials_ssl( + root_certificates, + [_cygrpc.SslPemKeyCertPair(key, pem) + for key, pem in private_key_certificate_chain_pairs], + require_client_auth)) + + def channel_ready_future(channel): """Creates a Future tracking when a Channel is ready. @@ -825,6 +1047,22 @@ def insecure_channel(target, options=None): return _channel.Channel(target, None, options) +def secure_channel(target, credentials, options=None): + """Creates an insecure Channel to a server. + + Args: + target: The target to which to connect. + credentials: A ChannelCredentials instance. + options: A sequence of string-value pairs according to which to configure + the created channel. + + Returns: + A Channel to the target through which RPCs may be conducted. + """ + from grpc import _channel + return _channel.Channel(target, credentials, options) + + def server(generic_rpc_handlers, thread_pool, options=None): """Creates a Server with which RPCs can be serviced. diff --git a/src/python/grpcio/grpc/_plugin_wrapping.py b/src/python/grpcio/grpc/_plugin_wrapping.py new file mode 100644 index 00000000000..4e9cfe710cd --- /dev/null +++ b/src/python/grpcio/grpc/_plugin_wrapping.py @@ -0,0 +1,123 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import collections +import threading + +import grpc +from grpc._cython import cygrpc + + +class AuthMetadataContext( + collections.namedtuple( + 'AuthMetadataContext', ('service_url', 'method_name',)), + grpc.AuthMetadataContext): + pass + + +class AuthMetadataPluginCallback(grpc.AuthMetadataContext): + + def __init__(self, callback): + self._callback = callback + + def __call__(self, metadata, error): + self._callback(metadata, error) + + +class _WrappedCygrpcCallback(object): + + def __init__(self, cygrpc_callback): + self.is_called = False + self.error = None + self.is_called_lock = threading.Lock() + self.cygrpc_callback = cygrpc_callback + + def _invoke_failure(self, error): + # TODO(atash) translate different Exception superclasses into different + # status codes. + self.cygrpc_callback( + cygrpc.Metadata([]), cygrpc.StatusCode.internal, error.message) + + def _invoke_success(self, metadata): + try: + cygrpc_metadata = cygrpc.Metadata( + cygrpc.Metadatum(key, value) + for key, value in metadata) + except Exception as error: + self._invoke_failure(error) + return + self.cygrpc_callback(cygrpc_metadata, cygrpc.StatusCode.ok, '') + + def __call__(self, metadata, error): + with self.is_called_lock: + if self.is_called: + raise RuntimeError('callback should only ever be invoked once') + if self.error: + self._invoke_failure(self.error) + return + self.is_called = True + if error is None: + self._invoke_success(metadata) + else: + self._invoke_failure(error) + + def notify_failure(self, error): + with self.is_called_lock: + if not self.is_called: + self.error = error + + +class _WrappedPlugin(object): + + def __init__(self, plugin): + self.plugin = plugin + + def __call__(self, context, cygrpc_callback): + wrapped_cygrpc_callback = _WrappedCygrpcCallback(cygrpc_callback) + wrapped_context = AuthMetadataContext( + context.service_url, context.method_name) + try: + self.plugin( + wrapped_context, AuthMetadataPluginCallback(wrapped_cygrpc_callback)) + except Exception as error: + wrapped_cygrpc_callback.notify_failure(error) + raise + + +def call_credentials_metadata_plugin(plugin, name): + """ + Args: + plugin: A callable accepting a grpc.AuthMetadataContext + object and a callback (itself accepting a list of metadata key/value + 2-tuples and a None-able exception value). The callback must be eventually + called, but need not be called in plugin's invocation. + plugin's invocation must be non-blocking. + """ + return cygrpc.call_credentials_metadata_plugin( + cygrpc.CredentialsMetadataPlugin(_WrappedPlugin(plugin), name)) From e1ad41a0ff89ed215458441b4ee08e8d4ecd9670 Mon Sep 17 00:00:00 2001 From: Alistair Veitch Date: Thu, 2 Jun 2016 14:16:05 -0700 Subject: [PATCH 0838/1894] change Metric->Resource, simplify Resource definition --- src/core/ext/census/gen/census.pb.c | 38 +++++------ src/core/ext/census/gen/census.pb.h | 98 +++++++++++++---------------- src/proto/census/census.proto | 62 +++++++++--------- 3 files changed, 86 insertions(+), 112 deletions(-) diff --git a/src/core/ext/census/gen/census.pb.c b/src/core/ext/census/gen/census.pb.c index d614636c908..c73c2c9b7cc 100644 --- a/src/core/ext/census/gen/census.pb.c +++ b/src/core/ext/census/gen/census.pb.c @@ -53,23 +53,17 @@ const pb_field_t google_census_Timestamp_fields[3] = { PB_LAST_FIELD }; -const pb_field_t google_census_Metric_fields[5] = { - PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, google_census_Metric, name, name, 0), - PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, google_census_Metric, description, name, 0), - PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_Metric, unit, description, &google_census_Metric_MeasurementUnit_fields), - PB_FIELD( 4, INT32 , OPTIONAL, STATIC , OTHER, google_census_Metric, id, unit, 0), +const pb_field_t google_census_Resource_fields[4] = { + PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, google_census_Resource, name, name, 0), + PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, google_census_Resource, description, name, 0), + PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_Resource, unit, description, &google_census_Resource_MeasurementUnit_fields), PB_LAST_FIELD }; -const pb_field_t google_census_Metric_BasicUnit_fields[2] = { - PB_FIELD( 1, UENUM , OPTIONAL, STATIC , FIRST, google_census_Metric_BasicUnit, type, type, 0), - PB_LAST_FIELD -}; - -const pb_field_t google_census_Metric_MeasurementUnit_fields[4] = { - PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, google_census_Metric_MeasurementUnit, prefix, prefix, 0), - PB_FIELD( 2, MESSAGE , REPEATED, CALLBACK, OTHER, google_census_Metric_MeasurementUnit, numerator, prefix, &google_census_Metric_BasicUnit_fields), - PB_FIELD( 3, MESSAGE , REPEATED, CALLBACK, OTHER, google_census_Metric_MeasurementUnit, denominator, numerator, &google_census_Metric_BasicUnit_fields), +const pb_field_t google_census_Resource_MeasurementUnit_fields[4] = { + PB_FIELD( 1, INT32 , OPTIONAL, STATIC , FIRST, google_census_Resource_MeasurementUnit, prefix, prefix, 0), + PB_FIELD( 2, UENUM , REPEATED, CALLBACK, OTHER, google_census_Resource_MeasurementUnit, numerator, prefix, 0), + PB_FIELD( 3, UENUM , REPEATED, CALLBACK, OTHER, google_census_Resource_MeasurementUnit, denominator, numerator, 0), PB_LAST_FIELD }; @@ -124,8 +118,8 @@ const pb_field_t google_census_Tag_fields[3] = { const pb_field_t google_census_View_fields[6] = { PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, google_census_View, name, name, 0), PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, google_census_View, description, name, 0), - PB_FIELD( 3, INT32 , OPTIONAL, STATIC , OTHER, google_census_View, metric_id, description, 0), - PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_View, aggregation, metric_id, &google_census_AggregationDescriptor_fields), + PB_FIELD( 3, STRING , OPTIONAL, CALLBACK, OTHER, google_census_View, resource_name, description, 0), + PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_View, aggregation, resource_name, &google_census_AggregationDescriptor_fields), PB_FIELD( 5, STRING , REPEATED, CALLBACK, OTHER, google_census_View, tag_key, aggregation, 0), PB_LAST_FIELD }; @@ -139,10 +133,10 @@ const pb_field_t google_census_Aggregation_fields[6] = { PB_LAST_FIELD }; -const pb_field_t google_census_ViewAggregations_fields[4] = { - PB_FIELD( 1, MESSAGE , REPEATED, CALLBACK, FIRST, google_census_ViewAggregations, aggregation, aggregation, &google_census_Aggregation_fields), - PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_ViewAggregations, start, aggregation, &google_census_Timestamp_fields), - PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_ViewAggregations, end, start, &google_census_Timestamp_fields), +const pb_field_t google_census_Metric_fields[4] = { + PB_FIELD( 1, MESSAGE , REPEATED, CALLBACK, FIRST, google_census_Metric, aggregation, aggregation, &google_census_Aggregation_fields), + PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_Metric, start, aggregation, &google_census_Timestamp_fields), + PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_Metric, end, start, &google_census_Timestamp_fields), PB_LAST_FIELD }; @@ -156,7 +150,7 @@ const pb_field_t google_census_ViewAggregations_fields[4] = { * numbers or field sizes that are larger than what can fit in 8 or 16 bit * field descriptors. */ -PB_STATIC_ASSERT((pb_membersize(google_census_Metric, unit) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Metric, unit) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Distribution, range) < 65536 && pb_membersize(google_census_IntervalStats, window) < 65536 && pb_membersize(google_census_IntervalStats_Window, window_size) < 65536 && pb_membersize(google_census_View, aggregation) < 65536 && pb_membersize(google_census_Aggregation, data.distribution) < 65536 && pb_membersize(google_census_Aggregation, data.interval_stats) < 65536 && pb_membersize(google_census_Metric, unit) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Metric, unit) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 65536 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Distribution, range) < 65536 && pb_membersize(google_census_IntervalStats, window) < 65536 && pb_membersize(google_census_IntervalStats_Window, window_size) < 65536 && pb_membersize(google_census_View, aggregation) < 65536 && pb_membersize(google_census_Aggregation, data.distribution) < 65536 && pb_membersize(google_census_Aggregation, data.interval_stats) < 65536 && pb_membersize(google_census_Aggregation, tag) < 65536 && pb_membersize(google_census_ViewAggregations, aggregation) < 65536 && pb_membersize(google_census_ViewAggregations, start) < 65536 && pb_membersize(google_census_ViewAggregations, end) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_census_Duration_google_census_Timestamp_google_census_Metric_google_census_Metric_BasicUnit_google_census_Metric_MeasurementUnit_google_census_AggregationDescriptor_google_census_AggregationDescriptor_BucketBoundaries_google_census_AggregationDescriptor_IntervalBoundaries_google_census_Distribution_google_census_Distribution_Range_google_census_IntervalStats_google_census_IntervalStats_Window_google_census_Tag_google_census_View_google_census_Aggregation_google_census_ViewAggregations) +PB_STATIC_ASSERT((pb_membersize(google_census_Resource, unit) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Resource, unit) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Distribution, range) < 65536 && pb_membersize(google_census_IntervalStats, window) < 65536 && pb_membersize(google_census_IntervalStats_Window, window_size) < 65536 && pb_membersize(google_census_View, aggregation) < 65536 && pb_membersize(google_census_Aggregation, data.distribution) < 65536 && pb_membersize(google_census_Aggregation, data.interval_stats) < 65536 && pb_membersize(google_census_Resource, unit) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Resource, unit) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 65536 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 65536 && pb_membersize(google_census_Distribution, range) < 65536 && pb_membersize(google_census_IntervalStats, window) < 65536 && pb_membersize(google_census_IntervalStats_Window, window_size) < 65536 && pb_membersize(google_census_View, aggregation) < 65536 && pb_membersize(google_census_Aggregation, data.distribution) < 65536 && pb_membersize(google_census_Aggregation, data.interval_stats) < 65536 && pb_membersize(google_census_Aggregation, tag) < 65536 && pb_membersize(google_census_Metric, aggregation) < 65536 && pb_membersize(google_census_Metric, start) < 65536 && pb_membersize(google_census_Metric, end) < 65536), YOU_MUST_DEFINE_PB_FIELD_32BIT_FOR_MESSAGES_google_census_Duration_google_census_Timestamp_google_census_Resource_google_census_Resource_MeasurementUnit_google_census_AggregationDescriptor_google_census_AggregationDescriptor_BucketBoundaries_google_census_AggregationDescriptor_IntervalBoundaries_google_census_Distribution_google_census_Distribution_Range_google_census_IntervalStats_google_census_IntervalStats_Window_google_census_Tag_google_census_View_google_census_Aggregation_google_census_Metric) #endif #if !defined(PB_FIELD_16BIT) && !defined(PB_FIELD_32BIT) @@ -167,7 +161,7 @@ PB_STATIC_ASSERT((pb_membersize(google_census_Metric, unit) < 65536 && pb_member * numbers or field sizes that are larger than what can fit in the default * 8 bit descriptors. */ -PB_STATIC_ASSERT((pb_membersize(google_census_Metric, unit) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Metric, unit) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Distribution, range) < 256 && pb_membersize(google_census_IntervalStats, window) < 256 && pb_membersize(google_census_IntervalStats_Window, window_size) < 256 && pb_membersize(google_census_View, aggregation) < 256 && pb_membersize(google_census_Aggregation, data.distribution) < 256 && pb_membersize(google_census_Aggregation, data.interval_stats) < 256 && pb_membersize(google_census_Metric, unit) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Metric, unit) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, numerator) < 256 && pb_membersize(google_census_Metric_MeasurementUnit, denominator) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Distribution, range) < 256 && pb_membersize(google_census_IntervalStats, window) < 256 && pb_membersize(google_census_IntervalStats_Window, window_size) < 256 && pb_membersize(google_census_View, aggregation) < 256 && pb_membersize(google_census_Aggregation, data.distribution) < 256 && pb_membersize(google_census_Aggregation, data.interval_stats) < 256 && pb_membersize(google_census_Aggregation, tag) < 256 && pb_membersize(google_census_ViewAggregations, aggregation) < 256 && pb_membersize(google_census_ViewAggregations, start) < 256 && pb_membersize(google_census_ViewAggregations, end) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_census_Duration_google_census_Timestamp_google_census_Metric_google_census_Metric_BasicUnit_google_census_Metric_MeasurementUnit_google_census_AggregationDescriptor_google_census_AggregationDescriptor_BucketBoundaries_google_census_AggregationDescriptor_IntervalBoundaries_google_census_Distribution_google_census_Distribution_Range_google_census_IntervalStats_google_census_IntervalStats_Window_google_census_Tag_google_census_View_google_census_Aggregation_google_census_ViewAggregations) +PB_STATIC_ASSERT((pb_membersize(google_census_Resource, unit) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Resource, unit) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Distribution, range) < 256 && pb_membersize(google_census_IntervalStats, window) < 256 && pb_membersize(google_census_IntervalStats_Window, window_size) < 256 && pb_membersize(google_census_View, aggregation) < 256 && pb_membersize(google_census_Aggregation, data.distribution) < 256 && pb_membersize(google_census_Aggregation, data.interval_stats) < 256 && pb_membersize(google_census_Resource, unit) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Resource, unit) < 256 && pb_membersize(google_census_AggregationDescriptor, options.bucket_boundaries) < 256 && pb_membersize(google_census_AggregationDescriptor, options.interval_boundaries) < 256 && pb_membersize(google_census_Distribution, range) < 256 && pb_membersize(google_census_IntervalStats, window) < 256 && pb_membersize(google_census_IntervalStats_Window, window_size) < 256 && pb_membersize(google_census_View, aggregation) < 256 && pb_membersize(google_census_Aggregation, data.distribution) < 256 && pb_membersize(google_census_Aggregation, data.interval_stats) < 256 && pb_membersize(google_census_Aggregation, tag) < 256 && pb_membersize(google_census_Metric, aggregation) < 256 && pb_membersize(google_census_Metric, start) < 256 && pb_membersize(google_census_Metric, end) < 256), YOU_MUST_DEFINE_PB_FIELD_16BIT_FOR_MESSAGES_google_census_Duration_google_census_Timestamp_google_census_Resource_google_census_Resource_MeasurementUnit_google_census_AggregationDescriptor_google_census_AggregationDescriptor_BucketBoundaries_google_census_AggregationDescriptor_IntervalBoundaries_google_census_Distribution_google_census_Distribution_Range_google_census_IntervalStats_google_census_IntervalStats_Window_google_census_Tag_google_census_View_google_census_Aggregation_google_census_Metric) #endif diff --git a/src/core/ext/census/gen/census.pb.h b/src/core/ext/census/gen/census.pb.h index d040fe29e74..dfb53948204 100644 --- a/src/core/ext/census/gen/census.pb.h +++ b/src/core/ext/census/gen/census.pb.h @@ -45,14 +45,14 @@ extern "C" { #endif /* Enum definitions */ -typedef enum _google_census_Metric_BasicUnit_Measure { - google_census_Metric_BasicUnit_Measure_UNKNOWN = 0, - google_census_Metric_BasicUnit_Measure_BITS = 1, - google_census_Metric_BasicUnit_Measure_BYTES = 2, - google_census_Metric_BasicUnit_Measure_SECS = 3, - google_census_Metric_BasicUnit_Measure_CORES = 4, - google_census_Metric_BasicUnit_Measure_MAX_UNITS = 5 -} google_census_Metric_BasicUnit_Measure; +typedef enum _google_census_Resource_BasicUnit { + google_census_Resource_BasicUnit_UNKNOWN = 0, + google_census_Resource_BasicUnit_BITS = 1, + google_census_Resource_BasicUnit_BYTES = 2, + google_census_Resource_BasicUnit_SECS = 3, + google_census_Resource_BasicUnit_CORES = 4, + google_census_Resource_BasicUnit_MAX_UNITS = 5 +} google_census_Resource_BasicUnit; /* Struct definitions */ typedef struct _google_census_AggregationDescriptor_BucketBoundaries { @@ -89,17 +89,12 @@ typedef struct _google_census_Duration { int32_t nanos; } google_census_Duration; -typedef struct _google_census_Metric_BasicUnit { - bool has_type; - google_census_Metric_BasicUnit_Measure type; -} google_census_Metric_BasicUnit; - -typedef struct _google_census_Metric_MeasurementUnit { +typedef struct _google_census_Resource_MeasurementUnit { bool has_prefix; int32_t prefix; pb_callback_t numerator; pb_callback_t denominator; -} google_census_Metric_MeasurementUnit; +} google_census_Resource_MeasurementUnit; typedef struct _google_census_Tag { bool has_key; @@ -135,32 +130,29 @@ typedef struct _google_census_IntervalStats_Window { } google_census_IntervalStats_Window; typedef struct _google_census_Metric { + pb_callback_t aggregation; + bool has_start; + google_census_Timestamp start; + bool has_end; + google_census_Timestamp end; +} google_census_Metric; + +typedef struct _google_census_Resource { pb_callback_t name; pb_callback_t description; bool has_unit; - google_census_Metric_MeasurementUnit unit; - bool has_id; - int32_t id; -} google_census_Metric; + google_census_Resource_MeasurementUnit unit; +} google_census_Resource; typedef struct _google_census_View { pb_callback_t name; pb_callback_t description; - bool has_metric_id; - int32_t metric_id; + pb_callback_t resource_name; bool has_aggregation; google_census_AggregationDescriptor aggregation; pb_callback_t tag_key; } google_census_View; -typedef struct _google_census_ViewAggregations { - pb_callback_t aggregation; - bool has_start; - google_census_Timestamp start; - bool has_end; - google_census_Timestamp end; -} google_census_ViewAggregations; - typedef struct _google_census_Aggregation { pb_callback_t name; pb_callback_t description; @@ -177,9 +169,8 @@ typedef struct _google_census_Aggregation { /* Initializer values for message structs */ #define google_census_Duration_init_default {false, 0, false, 0} #define google_census_Timestamp_init_default {false, 0, false, 0} -#define google_census_Metric_init_default {{{NULL}, NULL}, {{NULL}, NULL}, false, google_census_Metric_MeasurementUnit_init_default, false, 0} -#define google_census_Metric_BasicUnit_init_default {false, (google_census_Metric_BasicUnit_Measure)0} -#define google_census_Metric_MeasurementUnit_init_default {false, 0, {{NULL}, NULL}, {{NULL}, NULL}} +#define google_census_Resource_init_default {{{NULL}, NULL}, {{NULL}, NULL}, false, google_census_Resource_MeasurementUnit_init_default} +#define google_census_Resource_MeasurementUnit_init_default {false, 0, {{NULL}, NULL}, {{NULL}, NULL}} #define google_census_AggregationDescriptor_init_default {0, {google_census_AggregationDescriptor_BucketBoundaries_init_default}} #define google_census_AggregationDescriptor_BucketBoundaries_init_default {{{NULL}, NULL}} #define google_census_AggregationDescriptor_IntervalBoundaries_init_default {{{NULL}, NULL}} @@ -188,14 +179,13 @@ typedef struct _google_census_Aggregation { #define google_census_IntervalStats_init_default {{{NULL}, NULL}} #define google_census_IntervalStats_Window_init_default {false, google_census_Duration_init_default, false, 0, false, 0} #define google_census_Tag_init_default {false, "", false, ""} -#define google_census_View_init_default {{{NULL}, NULL}, {{NULL}, NULL}, false, 0, false, google_census_AggregationDescriptor_init_default, {{NULL}, NULL}} +#define google_census_View_init_default {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, false, google_census_AggregationDescriptor_init_default, {{NULL}, NULL}} #define google_census_Aggregation_init_default {{{NULL}, NULL}, {{NULL}, NULL}, 0, {google_census_Distribution_init_default}, {{NULL}, NULL}} -#define google_census_ViewAggregations_init_default {{{NULL}, NULL}, false, google_census_Timestamp_init_default, false, google_census_Timestamp_init_default} +#define google_census_Metric_init_default {{{NULL}, NULL}, false, google_census_Timestamp_init_default, false, google_census_Timestamp_init_default} #define google_census_Duration_init_zero {false, 0, false, 0} #define google_census_Timestamp_init_zero {false, 0, false, 0} -#define google_census_Metric_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, false, google_census_Metric_MeasurementUnit_init_zero, false, 0} -#define google_census_Metric_BasicUnit_init_zero {false, (google_census_Metric_BasicUnit_Measure)0} -#define google_census_Metric_MeasurementUnit_init_zero {false, 0, {{NULL}, NULL}, {{NULL}, NULL}} +#define google_census_Resource_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, false, google_census_Resource_MeasurementUnit_init_zero} +#define google_census_Resource_MeasurementUnit_init_zero {false, 0, {{NULL}, NULL}, {{NULL}, NULL}} #define google_census_AggregationDescriptor_init_zero {0, {google_census_AggregationDescriptor_BucketBoundaries_init_zero}} #define google_census_AggregationDescriptor_BucketBoundaries_init_zero {{{NULL}, NULL}} #define google_census_AggregationDescriptor_IntervalBoundaries_init_zero {{{NULL}, NULL}} @@ -204,9 +194,9 @@ typedef struct _google_census_Aggregation { #define google_census_IntervalStats_init_zero {{{NULL}, NULL}} #define google_census_IntervalStats_Window_init_zero {false, google_census_Duration_init_zero, false, 0, false, 0} #define google_census_Tag_init_zero {false, "", false, ""} -#define google_census_View_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, false, 0, false, google_census_AggregationDescriptor_init_zero, {{NULL}, NULL}} +#define google_census_View_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, false, google_census_AggregationDescriptor_init_zero, {{NULL}, NULL}} #define google_census_Aggregation_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, 0, {google_census_Distribution_init_zero}, {{NULL}, NULL}} -#define google_census_ViewAggregations_init_zero {{{NULL}, NULL}, false, google_census_Timestamp_init_zero, false, google_census_Timestamp_init_zero} +#define google_census_Metric_init_zero {{{NULL}, NULL}, false, google_census_Timestamp_init_zero, false, google_census_Timestamp_init_zero} /* Field tags (for use in manual encoding/decoding) */ #define google_census_AggregationDescriptor_BucketBoundaries_bounds_tag 1 @@ -219,10 +209,9 @@ typedef struct _google_census_Aggregation { #define google_census_Distribution_Range_max_tag 2 #define google_census_Duration_seconds_tag 1 #define google_census_Duration_nanos_tag 2 -#define google_census_Metric_BasicUnit_type_tag 1 -#define google_census_Metric_MeasurementUnit_prefix_tag 1 -#define google_census_Metric_MeasurementUnit_numerator_tag 2 -#define google_census_Metric_MeasurementUnit_denominator_tag 3 +#define google_census_Resource_MeasurementUnit_prefix_tag 1 +#define google_census_Resource_MeasurementUnit_numerator_tag 2 +#define google_census_Resource_MeasurementUnit_denominator_tag 3 #define google_census_Tag_key_tag 1 #define google_census_Tag_value_tag 2 #define google_census_Timestamp_seconds_tag 1 @@ -234,18 +223,17 @@ typedef struct _google_census_Aggregation { #define google_census_IntervalStats_Window_window_size_tag 1 #define google_census_IntervalStats_Window_count_tag 2 #define google_census_IntervalStats_Window_mean_tag 3 -#define google_census_Metric_name_tag 1 -#define google_census_Metric_description_tag 2 -#define google_census_Metric_unit_tag 3 -#define google_census_Metric_id_tag 4 +#define google_census_Metric_aggregation_tag 1 +#define google_census_Metric_start_tag 2 +#define google_census_Metric_end_tag 3 +#define google_census_Resource_name_tag 1 +#define google_census_Resource_description_tag 2 +#define google_census_Resource_unit_tag 3 #define google_census_View_name_tag 1 #define google_census_View_description_tag 2 -#define google_census_View_metric_id_tag 3 +#define google_census_View_resource_name_tag 3 #define google_census_View_aggregation_tag 4 #define google_census_View_tag_key_tag 5 -#define google_census_ViewAggregations_aggregation_tag 1 -#define google_census_ViewAggregations_start_tag 2 -#define google_census_ViewAggregations_end_tag 3 #define google_census_Aggregation_distribution_tag 3 #define google_census_Aggregation_interval_stats_tag 4 @@ -256,9 +244,8 @@ typedef struct _google_census_Aggregation { /* Struct field encoding specification for nanopb */ extern const pb_field_t google_census_Duration_fields[3]; extern const pb_field_t google_census_Timestamp_fields[3]; -extern const pb_field_t google_census_Metric_fields[5]; -extern const pb_field_t google_census_Metric_BasicUnit_fields[2]; -extern const pb_field_t google_census_Metric_MeasurementUnit_fields[4]; +extern const pb_field_t google_census_Resource_fields[4]; +extern const pb_field_t google_census_Resource_MeasurementUnit_fields[4]; extern const pb_field_t google_census_AggregationDescriptor_fields[3]; extern const pb_field_t google_census_AggregationDescriptor_BucketBoundaries_fields[2]; extern const pb_field_t google_census_AggregationDescriptor_IntervalBoundaries_fields[2]; @@ -269,12 +256,11 @@ extern const pb_field_t google_census_IntervalStats_Window_fields[4]; extern const pb_field_t google_census_Tag_fields[3]; extern const pb_field_t google_census_View_fields[6]; extern const pb_field_t google_census_Aggregation_fields[6]; -extern const pb_field_t google_census_ViewAggregations_fields[4]; +extern const pb_field_t google_census_Metric_fields[4]; /* Maximum encoded size of messages (where known) */ #define google_census_Duration_size 22 #define google_census_Timestamp_size 22 -#define google_census_Metric_BasicUnit_size 2 #define google_census_Distribution_Range_size 18 #define google_census_IntervalStats_Window_size 44 #define google_census_Tag_size 516 diff --git a/src/proto/census/census.proto b/src/proto/census/census.proto index c869d851ff1..56c291ff17c 100644 --- a/src/proto/census/census.proto +++ b/src/proto/census/census.proto @@ -33,12 +33,12 @@ package google.census; // All the census protos. // -// Nomenclature note: capitalized names below (like Metric) are protos. +// Nomenclature note: capitalized names below (like Resource) are protos. // -// Census lets you define a Metric - something which can be measured, like the +// Census lets you define a Resource - something which can be measured, like the // latency of an RPC, the number of CPU cycles spent on an operation, or // anything else you care to measure. You can record individual instances of -// measurements (a double value) for every metric of interest. These +// measurements (a double value) for every Resource of interest. These // individual measurements are aggregated together into an Aggregation. There // are two Aggregation types available: Distribution (describes the // distribution of all measurements, possibly with a histogram) and @@ -47,8 +47,8 @@ package google.census; // // You can define how your stats are broken down by Tag values and which // Aggregations to use through a View. The corresponding combination of -// Metric/View/Aggregation which is available to census clients is called a -// ViewAggregation. +// Resource/View/Aggregation which is available to census clients is called a +// Metric. // The following two types are copied from @@ -85,26 +85,23 @@ message Timestamp { int32 nanos = 2; } -// Describes a metric -message Metric { - // name of metric, e.g. rpc_latency, cpu. +// Describes a Resource. +message Resource { + // name of resource, e.g. rpc_latency, cpu. Must be unique. string name = 1; - // More detailed description of the metric, used in documentation. + // More detailed description of the resource, used in documentation. string description = 2; // Fundamental units of measurement supported by Census // TODO(aveitch): expand this to include other S.I. units? - message BasicUnit { - enum Measure { - UNKNOWN = 0; - BITS = 1; - BYTES = 2; - SECS = 3; - CORES = 4; - MAX_UNITS = 5; - } - Measure type = 1; + enum BasicUnit { + UNKNOWN = 0; + BITS = 1; + BYTES = 2; + SECS = 3; + CORES = 4; + MAX_UNITS = 5; } // MeasurementUnit lets you build compound units of the form @@ -141,14 +138,11 @@ message Metric { repeated BasicUnit denominator = 3; } - // The units in which the Metric value is reported. + // The units in which Resource values are measured. MeasurementUnit unit = 3; - - // Metrics will be assigned an ID when registered. Invalid if <= 0. - int32 id = 4; } -// An Aggregation summarizes a series of individual Metric measurements, an +// An Aggregation summarizes a series of individual Resource measurements, an // AggregationDescriptor describes an Aggregation. message AggregationDescriptor { // At most one set of options. If neither option is set, a default type @@ -251,7 +245,7 @@ message IntervalStats { double mean = 3; } - // Full set of windows for this metric. + // Full set of windows for this aggregation. repeated Window window = 1; } @@ -264,24 +258,24 @@ message Tag { // A View specifies an Aggregation and a set of tag keys. The Aggregation will // be broken down by the unique set of matching tag values for each measurement. message View { - // Name of view. + // Name of view. Must be unique. string name = 1; // More detailed description, for documentation purposes. string description = 2; - // ID of Metric to associate with this View. - int32 metric_id = 3; + // Name of Resource to be broken down for this view. + string resource_name = 3; // Aggregation type to associate with this View. AggregationDescriptor aggregation = 4; - // Tag keys to match with a given Metric. If no keys are specified, then all - // stats for the Metric are recorded. Keys must be unique. + // Tag keys to match with a given Resource measurement. If no keys are + // specified, then all stats are recorded. Keys must be unique. repeated string tag_key = 5; } -// An Aggregation summarizes a series of individual Metric measures. +// An Aggregation summarizes a series of individual Resource measurements. message Aggregation { // Name of this aggregation. string name = 1; @@ -299,13 +293,13 @@ message Aggregation { repeated Tag tag = 5; } -// A ViewAggregations represents all the Aggregations for a particular view. -message ViewAggregations { +// A Metric represents all the Aggregations for a particular view. +message Metric { // Aggregations - each will have a unique set of tag values for the tag_keys // associated with the corresponding View. repeated Aggregation aggregation = 1; - // Start and end timestamps over which the value was accumulated. These + // Start and end timestamps over which the metric was accumulated. These // values are not relevant/defined for IntervalStats aggregations, which are // always accumulated over a fixed time period. Timestamp start = 2; From 1d2f28913e93481cc4b425c608dc7c59ebe026e4 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 2 Jun 2016 14:33:22 -0700 Subject: [PATCH 0839/1894] Add timestamps to custom log output --- src/node/ext/node_grpc.cc | 38 ++++++++++++++++++++++++-------------- src/node/index.js | 16 +++++++++++++--- 2 files changed, 37 insertions(+), 17 deletions(-) diff --git a/src/node/ext/node_grpc.cc b/src/node/ext/node_grpc.cc index 45762cad2e6..6daa1039342 100644 --- a/src/node/ext/node_grpc.cc +++ b/src/node/ext/node_grpc.cc @@ -40,6 +40,7 @@ #include "grpc/grpc_security.h" #include "grpc/support/alloc.h" #include "grpc/support/log.h" +#include "grpc/support/time.h" #include "call.h" #include "call_credentials.h" @@ -48,6 +49,7 @@ #include "server.h" #include "completion_queue_async_worker.h" #include "server_credentials.h" +#include "timeval.h" using v8::FunctionTemplate; using v8::Local; @@ -57,9 +59,14 @@ using v8::Object; using v8::Uint32; using v8::String; +typedef struct log_args { + gpr_log_func_args core_args; + gpr_timespec timestamp; +} log_args; + typedef struct logger_state { Nan::Callback *callback; - std::list *pending_args; + std::list *pending_args; uv_mutex_t mutex; uv_async_t async; // Indicates that a logger has been set @@ -327,35 +334,38 @@ NAN_METHOD(SetDefaultRootsPem) { NAUV_WORK_CB(LogMessagesCallback) { Nan::HandleScope scope; - std::list args; + std::list args; uv_mutex_lock(&grpc_logger_state.mutex); args.splice(args.begin(), *grpc_logger_state.pending_args); uv_mutex_unlock(&grpc_logger_state.mutex); /* Call the callback with each log message */ while (!args.empty()) { - gpr_log_func_args *arg = args.front(); + log_args *arg = args.front(); args.pop_front(); - Local file = Nan::New(arg->file).ToLocalChecked(); - Local line = Nan::New(arg->line); + Local file = Nan::New(arg->core_args.file).ToLocalChecked(); + Local line = Nan::New(arg->core_args.line); Local severity = Nan::New( - gpr_log_severity_string(arg->severity)).ToLocalChecked(); - Local message = Nan::New(arg->message).ToLocalChecked(); - const int argc = 4; - Local argv[argc] = {file, line, severity, message}; + gpr_log_severity_string(arg->core_args.severity)).ToLocalChecked(); + Local message = Nan::New(arg->core_args.message).ToLocalChecked(); + Local timestamp = Nan::New( + grpc::node::TimespecToMilliseconds(arg->timestamp)).ToLocalChecked(); + const int argc = 5; + Local argv[argc] = {file, line, severity, message, timestamp}; grpc_logger_state.callback->Call(argc, argv); - delete[] arg->message; + delete[] arg->core_args.message; delete arg; } } void node_log_func(gpr_log_func_args *args) { // TODO(mlumish): Use the core's log formatter when it becomes available - gpr_log_func_args *args_copy = new gpr_log_func_args; + log_args *args_copy = new log_args; size_t message_len = strlen(args->message) + 1; char *message = new char[message_len]; memcpy(message, args->message, message_len); - memcpy(args_copy, args, sizeof(gpr_log_func_args)); - args_copy->message = message; + memcpy(&args_copy->core_args, args, sizeof(gpr_log_func_args)); + args_copy->core_args.message = message; + args_copy->timestamp = gpr_now(GPR_CLOCK_REALTIME); uv_mutex_lock(&grpc_logger_state.mutex); grpc_logger_state.pending_args->push_back(args_copy); @@ -366,7 +376,7 @@ void node_log_func(gpr_log_func_args *args) { void init_logger() { memset(&grpc_logger_state, 0, sizeof(logger_state)); - grpc_logger_state.pending_args = new std::list(); + grpc_logger_state.pending_args = new std::list(); uv_mutex_init(&grpc_logger_state.mutex); uv_async_init(uv_default_loop(), &grpc_logger_state.async, diff --git a/src/node/index.js b/src/node/index.js index b85cec68414..9fb6faa5d7c 100644 --- a/src/node/index.js +++ b/src/node/index.js @@ -124,6 +124,10 @@ exports.load = function load(filename, format, options) { return loadObject(builder.ns, options); }; +var log_template = _.template( + '{severity} {timestamp}\t{file}:{line}]\t{message}', + {interpolate: /{([\s\S]+?)}/g}); + /** * Sets the logger function for the gRPC module. For debugging purposes, the C * core will log synchronously directly to stdout unless this function is @@ -134,9 +138,15 @@ exports.load = function load(filename, format, options) { */ exports.setLogger = function setLogger(logger) { common.logger = logger; - grpc.setDefaultLoggerCallback(function(file, line, severity, message) { - file = path.basename(file); - logger.error(severity + '\t' + file + ':' + line + ']\t' + message); + grpc.setDefaultLoggerCallback(function(file, line, severity, + message, timestamp) { + logger.error(log_template({ + file: path.basename(file), + line: line, + severity: severity, + message: message, + timestamp: timestamp.toISOString() + })); }); }; From f2874ef49a47eb1a8a1ea655ef5f1a1edf38f2ba Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 2 Jun 2016 15:30:55 -0700 Subject: [PATCH 0840/1894] Only send status and message with stream closure when needed It's never needed if: - the stream hasn't been created on the wire - we are on a client --- .../chttp2/transport/chttp2_transport.c | 160 +++++++++--------- 1 file changed, 81 insertions(+), 79 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index b6886a2201b..df8344a82ee 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1426,93 +1426,95 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, GPR_ASSERT(status >= 0 && (int)status < 100); - GPR_ASSERT(stream_global->id != 0); - - /* Hand roll a header block. - This is unnecessarily ugly - at some point we should find a more elegant - solution. - It's complicated by the fact that our send machinery would be dead by the - time we got around to sending this, so instead we ignore HPACK compression - and just write the uncompressed bytes onto the wire. */ - status_hdr = gpr_slice_malloc(15 + (status >= 10)); - p = GPR_SLICE_START_PTR(status_hdr); - *p++ = 0x40; /* literal header */ - *p++ = 11; /* len(grpc-status) */ - *p++ = 'g'; - *p++ = 'r'; - *p++ = 'p'; - *p++ = 'c'; - *p++ = '-'; - *p++ = 's'; - *p++ = 't'; - *p++ = 'a'; - *p++ = 't'; - *p++ = 'u'; - *p++ = 's'; - if (status < 10) { - *p++ = 1; - *p++ = (uint8_t)('0' + status); - } else { - *p++ = 2; - *p++ = (uint8_t)('0' + (status / 10)); - *p++ = (uint8_t)('0' + (status % 10)); - } - GPR_ASSERT(p == GPR_SLICE_END_PTR(status_hdr)); - len += (uint32_t)GPR_SLICE_LENGTH(status_hdr); - - if (optional_message) { - GPR_ASSERT(GPR_SLICE_LENGTH(*optional_message) < 127); - message_pfx = gpr_slice_malloc(15); - p = GPR_SLICE_START_PTR(message_pfx); - *p++ = 0x40; - *p++ = 12; /* len(grpc-message) */ + if (stream_global->id != 0 && !transport_global->is_client) { + /* Hand roll a header block. + This is unnecessarily ugly - at some point we should find a more elegant + solution. + It's complicated by the fact that our send machinery would be dead by the + time we got around to sending this, so instead we ignore HPACK + compression + and just write the uncompressed bytes onto the wire. */ + status_hdr = gpr_slice_malloc(15 + (status >= 10)); + p = GPR_SLICE_START_PTR(status_hdr); + *p++ = 0x40; /* literal header */ + *p++ = 11; /* len(grpc-status) */ *p++ = 'g'; *p++ = 'r'; *p++ = 'p'; *p++ = 'c'; *p++ = '-'; - *p++ = 'm'; - *p++ = 'e'; - *p++ = 's'; *p++ = 's'; + *p++ = 't'; *p++ = 'a'; - *p++ = 'g'; - *p++ = 'e'; - *p++ = (uint8_t)GPR_SLICE_LENGTH(*optional_message); - GPR_ASSERT(p == GPR_SLICE_END_PTR(message_pfx)); - len += (uint32_t)GPR_SLICE_LENGTH(message_pfx); - len += (uint32_t)GPR_SLICE_LENGTH(*optional_message); - } - - hdr = gpr_slice_malloc(9); - p = GPR_SLICE_START_PTR(hdr); - *p++ = (uint8_t)(len >> 16); - *p++ = (uint8_t)(len >> 8); - *p++ = (uint8_t)(len); - *p++ = GRPC_CHTTP2_FRAME_HEADER; - *p++ = GRPC_CHTTP2_DATA_FLAG_END_STREAM | GRPC_CHTTP2_DATA_FLAG_END_HEADERS; - *p++ = (uint8_t)(stream_global->id >> 24); - *p++ = (uint8_t)(stream_global->id >> 16); - *p++ = (uint8_t)(stream_global->id >> 8); - *p++ = (uint8_t)(stream_global->id); - GPR_ASSERT(p == GPR_SLICE_END_PTR(hdr)); - - gpr_slice_buffer_add(&transport_global->qbuf, hdr); - gpr_slice_buffer_add(&transport_global->qbuf, status_hdr); - if (optional_message) { - gpr_slice_buffer_add(&transport_global->qbuf, message_pfx); - gpr_slice_buffer_add(&transport_global->qbuf, - gpr_slice_ref(*optional_message)); - } - - gpr_slice_buffer_add( - &transport_global->qbuf, - grpc_chttp2_rst_stream_create(stream_global->id, GRPC_CHTTP2_NO_ERROR, - &stream_global->stats.outgoing)); - - if (optional_message) { - gpr_slice_ref(*optional_message); + *p++ = 't'; + *p++ = 'u'; + *p++ = 's'; + if (status < 10) { + *p++ = 1; + *p++ = (uint8_t)('0' + status); + } else { + *p++ = 2; + *p++ = (uint8_t)('0' + (status / 10)); + *p++ = (uint8_t)('0' + (status % 10)); + } + GPR_ASSERT(p == GPR_SLICE_END_PTR(status_hdr)); + len += (uint32_t)GPR_SLICE_LENGTH(status_hdr); + + if (optional_message) { + GPR_ASSERT(GPR_SLICE_LENGTH(*optional_message) < 127); + message_pfx = gpr_slice_malloc(15); + p = GPR_SLICE_START_PTR(message_pfx); + *p++ = 0x40; + *p++ = 12; /* len(grpc-message) */ + *p++ = 'g'; + *p++ = 'r'; + *p++ = 'p'; + *p++ = 'c'; + *p++ = '-'; + *p++ = 'm'; + *p++ = 'e'; + *p++ = 's'; + *p++ = 's'; + *p++ = 'a'; + *p++ = 'g'; + *p++ = 'e'; + *p++ = (uint8_t)GPR_SLICE_LENGTH(*optional_message); + GPR_ASSERT(p == GPR_SLICE_END_PTR(message_pfx)); + len += (uint32_t)GPR_SLICE_LENGTH(message_pfx); + len += (uint32_t)GPR_SLICE_LENGTH(*optional_message); + } + + hdr = gpr_slice_malloc(9); + p = GPR_SLICE_START_PTR(hdr); + *p++ = (uint8_t)(len >> 16); + *p++ = (uint8_t)(len >> 8); + *p++ = (uint8_t)(len); + *p++ = GRPC_CHTTP2_FRAME_HEADER; + *p++ = GRPC_CHTTP2_DATA_FLAG_END_STREAM | GRPC_CHTTP2_DATA_FLAG_END_HEADERS; + *p++ = (uint8_t)(stream_global->id >> 24); + *p++ = (uint8_t)(stream_global->id >> 16); + *p++ = (uint8_t)(stream_global->id >> 8); + *p++ = (uint8_t)(stream_global->id); + GPR_ASSERT(p == GPR_SLICE_END_PTR(hdr)); + + gpr_slice_buffer_add(&transport_global->qbuf, hdr); + gpr_slice_buffer_add(&transport_global->qbuf, status_hdr); + if (optional_message) { + gpr_slice_buffer_add(&transport_global->qbuf, message_pfx); + gpr_slice_buffer_add(&transport_global->qbuf, + gpr_slice_ref(*optional_message)); + } + + gpr_slice_buffer_add( + &transport_global->qbuf, + grpc_chttp2_rst_stream_create(stream_global->id, GRPC_CHTTP2_NO_ERROR, + &stream_global->stats.outgoing)); + + if (optional_message) { + gpr_slice_ref(*optional_message); + } } + grpc_chttp2_fake_status(exec_ctx, transport_global, stream_global, status, optional_message); grpc_chttp2_mark_stream_closed(exec_ctx, transport_global, stream_global, 1, From a65475c9f32c4ec1abf2c888012a7d4e346ddecc Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 2 Jun 2016 15:57:44 -0700 Subject: [PATCH 0841/1894] Document error.h better --- src/core/lib/iomgr/error.c | 6 +-- src/core/lib/iomgr/error.h | 75 +++++++++++++++++++++++++++++++------- 2 files changed, 62 insertions(+), 19 deletions(-) diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index 6c325ef34d5..fddaa8f4b26 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -89,14 +89,10 @@ static const gpr_avl_vtable avl_vtable_errs = { static const char *error_int_name(grpc_error_ints key) { switch (key) { - case GRPC_ERROR_INT_STATUS_CODE: - return "status_code"; case GRPC_ERROR_INT_ERRNO: return "errno"; case GRPC_ERROR_INT_FILE_LINE: return "file_line"; - case GRPC_ERROR_INT_WARNING: - return "warning"; case GRPC_ERROR_INT_STREAM_ID: return "stream_id"; case GRPC_ERROR_INT_GRPC_STATUS: diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index 695724c0be8..02c8cbe1154 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -39,49 +39,82 @@ #include -// Opaque representation of an error. -// Errors are refcounted objects that represent the result of an operation. -// Ownership laws: -// if a grpc_error is returned by a function, the caller owns a ref to that -// instance -// if a grpc_error is passed to a grpc_closure callback function (functions -// with the signature: -// void (*f)(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error)) -// then those functions do not automatically own a ref to error -// if a grpc_error is passed to *ANY OTHER FUNCTION* then that function takes -// ownership of the error +/// Opaque representation of an error. +/// Errors are refcounted objects that represent the result of an operation. +/// Ownership laws: +/// if a grpc_error is returned by a function, the caller owns a ref to that +/// instance +/// if a grpc_error is passed to a grpc_closure callback function (functions +/// with the signature: +/// void (*f)(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error)) +/// then those functions do not automatically own a ref to error +/// if a grpc_error is passed to *ANY OTHER FUNCTION* then that function takes +/// ownership of the error +/// Errors have: +/// a set of ints, strings, and timestamps that describe the error +/// always present are: +/// GRPC_ERROR_STR_FILE, GRPC_ERROR_INT_FILE_LINE - source location the error +/// was generated +/// GRPC_ERROR_STR_DESCRIPTION - a human readable description of the error +/// GRPC_ERROR_TIME_CREATED - a timestamp indicating when the error happened +/// an error can also have children; these are other errors that are believed +/// to have contributed to this one. By accumulating children, we can begin +/// to root cause high level failures from low level failures, without having +/// to derive execution paths from log lines typedef struct grpc_error grpc_error; typedef enum { + /// 'errno' from the operating system GRPC_ERROR_INT_ERRNO, + /// __LINE__ from the call site creating the error GRPC_ERROR_INT_FILE_LINE, - GRPC_ERROR_INT_STATUS_CODE, - GRPC_ERROR_INT_WARNING, + /// stream identifier: for errors that are associated with an individual + /// wire stream GRPC_ERROR_INT_STREAM_ID, + /// grpc status code representing this error GRPC_ERROR_INT_GRPC_STATUS, + /// offset into some binary blob (usually represented by + /// GRPC_ERROR_STR_RAW_BYTES) where the error occurred GRPC_ERROR_INT_OFFSET, + /// context sensitive index associated with the error GRPC_ERROR_INT_INDEX, + /// context sensitive size associated with the error GRPC_ERROR_INT_SIZE, + /// http2 error code associated with the error (see the HTTP2 RFC) GRPC_ERROR_INT_HTTP2_ERROR, + /// TSI status code associated with the error GRPC_ERROR_INT_TSI_CODE, + /// grpc_security_status associated with the error GRPC_ERROR_INT_SECURITY_STATUS, + /// WSAGetLastError() reported when this error occurred GRPC_ERROR_INT_WSA_ERROR, + /// File descriptor associated with this error GRPC_ERROR_INT_FD, } grpc_error_ints; typedef enum { + /// top-level textual description of this error GRPC_ERROR_STR_DESCRIPTION, + /// source file in which this error occurred GRPC_ERROR_STR_FILE, + /// operating system description of this error GRPC_ERROR_STR_OS_ERROR, + /// syscall that generated this error GRPC_ERROR_STR_SYSCALL, + /// peer that we were trying to communicate when this error occurred GRPC_ERROR_STR_TARGET_ADDRESS, + /// grpc status message associated with this error GRPC_ERROR_STR_GRPC_MESSAGE, + /// hex dump (or similar) with the data that generated this error GRPC_ERROR_STR_RAW_BYTES, + /// tsi error string associated with this error GRPC_ERROR_STR_TSI_ERROR, + /// filename that we were trying to read/write when this error occurred GRPC_ERROR_STR_FILENAME, } grpc_error_strs; typedef enum { + /// timestamp of error creation GRPC_ERROR_TIME_CREATED, } grpc_error_times; @@ -92,8 +125,17 @@ typedef enum { const char *grpc_error_string(grpc_error *error); void grpc_error_free_string(const char *str); +/// Create an error - but use GRPC_ERROR_CREATE instead grpc_error *grpc_error_create(const char *file, int line, const char *desc, grpc_error **referencing, size_t num_referencing); +/// Create an error (this is the preferred way of generating an error that is +/// not due to a system call - for system calls, use GRPC_OS_ERROR or +/// GRPC_WSA_ERROR as appropriate) +/// \a referencing is an array of num_referencing elements indicating one or +/// more errors that are believed to have contributed to this one +/// err = grpc_error_create(x, y, z, r, nr) is equivalent to: +/// err = grpc_error_create(x, y, z, NULL, 0); +/// for (i=0; i Date: Thu, 2 Jun 2016 16:00:54 -0700 Subject: [PATCH 0842/1894] Remove Ruby copy initializers. They don't make sense with wrapped structs, and we don't use them anyway --- src/ruby/ext/grpc/rb_call_credentials.c | 31 +-------------------- src/ruby/ext/grpc/rb_channel.c | 30 +------------------- src/ruby/ext/grpc/rb_channel_credentials.c | 32 +--------------------- src/ruby/ext/grpc/rb_grpc.c | 2 +- src/ruby/ext/grpc/rb_server.c | 31 +-------------------- src/ruby/ext/grpc/rb_server_credentials.c | 32 +--------------------- 6 files changed, 6 insertions(+), 152 deletions(-) diff --git a/src/ruby/ext/grpc/rb_call_credentials.c b/src/ruby/ext/grpc/rb_call_credentials.c index 79ca5b32ced..9b6675da846 100644 --- a/src/ruby/ext/grpc/rb_call_credentials.c +++ b/src/ruby/ext/grpc/rb_call_credentials.c @@ -211,35 +211,6 @@ VALUE grpc_rb_wrap_call_credentials(grpc_call_credentials *c, VALUE mark) { return rb_wrapper; } -/* Clones CallCredentials instances. - Gives CallCredentials a consistent implementation of Ruby's object copy/dup - protocol. */ -static VALUE grpc_rb_call_credentials_init_copy(VALUE copy, VALUE orig) { - grpc_rb_call_credentials *orig_cred = NULL; - grpc_rb_call_credentials *copy_cred = NULL; - - if (copy == orig) { - return copy; - } - - /* Raise an error if orig is not a credentials object or a subclass. */ - if (TYPE(orig) != T_DATA || - RDATA(orig)->dfree != (RUBY_DATA_FUNC)grpc_rb_call_credentials_free) { - rb_raise(rb_eTypeError, "not a %s", - rb_obj_classname(grpc_rb_cCallCredentials)); - } - - TypedData_Get_Struct(orig, grpc_rb_call_credentials, - &grpc_rb_call_credentials_data_type, orig_cred); - TypedData_Get_Struct(copy, grpc_rb_call_credentials, - &grpc_rb_call_credentials_data_type, copy_cred); - - /* use ruby's MEMCPY to make a byte-for-byte copy of the credentials - * wrapper object. */ - MEMCPY(copy_cred, orig_cred, grpc_rb_call_credentials, 1); - return copy; -} - /* The attribute used on the mark object to hold the callback */ static ID id_callback; @@ -308,7 +279,7 @@ void Init_grpc_call_credentials() { rb_define_method(grpc_rb_cCallCredentials, "initialize", grpc_rb_call_credentials_init, 1); rb_define_method(grpc_rb_cCallCredentials, "initialize_copy", - grpc_rb_call_credentials_init_copy, 1); + grpc_rb_cannot_init_copy, 1); rb_define_method(grpc_rb_cCallCredentials, "compose", grpc_rb_call_credentials_compose, -1); diff --git a/src/ruby/ext/grpc/rb_channel.c b/src/ruby/ext/grpc/rb_channel.c index 013321ffc8a..9d29b96a35b 100644 --- a/src/ruby/ext/grpc/rb_channel.c +++ b/src/ruby/ext/grpc/rb_channel.c @@ -231,34 +231,6 @@ static VALUE grpc_rb_channel_watch_connectivity_state(VALUE self, return Qnil; } -/* Clones Channel instances. - - Gives Channel a consistent implementation of Ruby's object copy/dup - protocol. */ -static VALUE grpc_rb_channel_init_copy(VALUE copy, VALUE orig) { - grpc_rb_channel *orig_ch = NULL; - grpc_rb_channel *copy_ch = NULL; - - if (copy == orig) { - return copy; - } - - /* Raise an error if orig is not a channel object or a subclass. */ - if (TYPE(orig) != T_DATA || - RDATA(orig)->dfree != (RUBY_DATA_FUNC)grpc_rb_channel_free) { - rb_raise(rb_eTypeError, "not a %s", rb_obj_classname(grpc_rb_cChannel)); - return Qnil; - } - - TypedData_Get_Struct(orig, grpc_rb_channel, &grpc_channel_data_type, orig_ch); - TypedData_Get_Struct(copy, grpc_rb_channel, &grpc_channel_data_type, copy_ch); - - /* use ruby's MEMCPY to make a byte-for-byte copy of the channel wrapper - * object. */ - MEMCPY(copy_ch, orig_ch, grpc_rb_channel, 1); - return copy; -} - /* Create a call given a grpc_channel, in order to call method. The request is not sent until grpc_call_invoke is called. */ static VALUE grpc_rb_channel_create_call(VALUE self, VALUE cqueue, @@ -387,7 +359,7 @@ void Init_grpc_channel() { /* Provides a ruby constructor and support for dup/clone. */ rb_define_method(grpc_rb_cChannel, "initialize", grpc_rb_channel_init, -1); rb_define_method(grpc_rb_cChannel, "initialize_copy", - grpc_rb_channel_init_copy, 1); + grpc_rb_cannot_init_copy, 1); /* Add ruby analogues of the Channel methods. */ rb_define_method(grpc_rb_cChannel, "connectivity_state", diff --git a/src/ruby/ext/grpc/rb_channel_credentials.c b/src/ruby/ext/grpc/rb_channel_credentials.c index cbb23885aa6..5b7aa3417e6 100644 --- a/src/ruby/ext/grpc/rb_channel_credentials.c +++ b/src/ruby/ext/grpc/rb_channel_credentials.c @@ -126,36 +126,6 @@ VALUE grpc_rb_wrap_channel_credentials(grpc_channel_credentials *c, VALUE mark) return rb_wrapper; } -/* Clones ChannelCredentials instances. - Gives ChannelCredentials a consistent implementation of Ruby's object copy/dup - protocol. */ -static VALUE grpc_rb_channel_credentials_init_copy(VALUE copy, VALUE orig) { - grpc_rb_channel_credentials *orig_cred = NULL; - grpc_rb_channel_credentials *copy_cred = NULL; - - if (copy == orig) { - return copy; - } - - /* Raise an error if orig is not a credentials object or a subclass. */ - if (TYPE(orig) != T_DATA || - RDATA(orig)->dfree != (RUBY_DATA_FUNC)grpc_rb_channel_credentials_free) { - rb_raise(rb_eTypeError, "not a %s", - rb_obj_classname(grpc_rb_cChannelCredentials)); - } - - TypedData_Get_Struct(orig, grpc_rb_channel_credentials, - &grpc_rb_channel_credentials_data_type, orig_cred); - TypedData_Get_Struct(copy, grpc_rb_channel_credentials, - &grpc_rb_channel_credentials_data_type, copy_cred); - - /* use ruby's MEMCPY to make a byte-for-byte copy of the credentials - * wrapper object. */ - MEMCPY(copy_cred, orig_cred, grpc_rb_channel_credentials, 1); - return copy; -} - - /* The attribute used on the mark object to hold the pem_root_certs. */ static ID id_pem_root_certs; @@ -271,7 +241,7 @@ void Init_grpc_channel_credentials() { rb_define_method(grpc_rb_cChannelCredentials, "initialize", grpc_rb_channel_credentials_init, -1); rb_define_method(grpc_rb_cChannelCredentials, "initialize_copy", - grpc_rb_channel_credentials_init_copy, 1); + grpc_rb_cannot_init_copy, 1); rb_define_method(grpc_rb_cChannelCredentials, "compose", grpc_rb_channel_credentials_compose, -1); rb_define_module_function(grpc_rb_cChannelCredentials, diff --git a/src/ruby/ext/grpc/rb_grpc.c b/src/ruby/ext/grpc/rb_grpc.c index 9246893f9fb..8527da52d27 100644 --- a/src/ruby/ext/grpc/rb_grpc.c +++ b/src/ruby/ext/grpc/rb_grpc.c @@ -85,7 +85,7 @@ VALUE grpc_rb_cannot_init(VALUE self) { VALUE grpc_rb_cannot_init_copy(VALUE copy, VALUE self) { (void)self; rb_raise(rb_eTypeError, - "initialization of %s only allowed from the gRPC native layer", + "Copy initialization of %s is not supported", rb_obj_classname(copy)); return Qnil; } diff --git a/src/ruby/ext/grpc/rb_server.c b/src/ruby/ext/grpc/rb_server.c index f108b8acfcd..c92059d12cc 100644 --- a/src/ruby/ext/grpc/rb_server.c +++ b/src/ruby/ext/grpc/rb_server.c @@ -154,35 +154,6 @@ static VALUE grpc_rb_server_init(VALUE self, VALUE cqueue, VALUE channel_args) { return self; } -/* Clones Server instances. - - Gives Server a consistent implementation of Ruby's object copy/dup - protocol. */ -static VALUE grpc_rb_server_init_copy(VALUE copy, VALUE orig) { - grpc_rb_server *orig_srv = NULL; - grpc_rb_server *copy_srv = NULL; - - if (copy == orig) { - return copy; - } - - /* Raise an error if orig is not a server object or a subclass. */ - if (TYPE(orig) != T_DATA || - RDATA(orig)->dfree != (RUBY_DATA_FUNC)grpc_rb_server_free) { - rb_raise(rb_eTypeError, "not a %s", rb_obj_classname(grpc_rb_cServer)); - } - - TypedData_Get_Struct(orig, grpc_rb_server, &grpc_rb_server_data_type, - orig_srv); - TypedData_Get_Struct(copy, grpc_rb_server, &grpc_rb_server_data_type, - copy_srv); - - /* use ruby's MEMCPY to make a byte-for-byte copy of the server wrapper - object. */ - MEMCPY(copy_srv, orig_srv, grpc_rb_server, 1); - return copy; -} - /* request_call_stack holds various values used by the * grpc_rb_server_request_call function */ typedef struct request_call_stack { @@ -378,7 +349,7 @@ void Init_grpc_server() { /* Provides a ruby constructor and support for dup/clone. */ rb_define_method(grpc_rb_cServer, "initialize", grpc_rb_server_init, 2); rb_define_method(grpc_rb_cServer, "initialize_copy", - grpc_rb_server_init_copy, 1); + grpc_rb_cannot_init_copy, 1); /* Add the server methods. */ rb_define_method(grpc_rb_cServer, "request_call", diff --git a/src/ruby/ext/grpc/rb_server_credentials.c b/src/ruby/ext/grpc/rb_server_credentials.c index 3b0fb6c910d..58ec852505c 100644 --- a/src/ruby/ext/grpc/rb_server_credentials.c +++ b/src/ruby/ext/grpc/rb_server_credentials.c @@ -111,36 +111,6 @@ static VALUE grpc_rb_server_credentials_alloc(VALUE cls) { wrapper); } -/* Clones ServerCredentials instances. - - Gives ServerCredentials a consistent implementation of Ruby's object copy/dup - protocol. */ -static VALUE grpc_rb_server_credentials_init_copy(VALUE copy, VALUE orig) { - grpc_rb_server_credentials *orig_ch = NULL; - grpc_rb_server_credentials *copy_ch = NULL; - - if (copy == orig) { - return copy; - } - - /* Raise an error if orig is not a server_credentials object or a subclass. */ - if (TYPE(orig) != T_DATA || - RDATA(orig)->dfree != (RUBY_DATA_FUNC)grpc_rb_server_credentials_free) { - rb_raise(rb_eTypeError, "not a %s", - rb_obj_classname(grpc_rb_cServerCredentials)); - } - - TypedData_Get_Struct(orig, grpc_rb_server_credentials, - &grpc_rb_server_credentials_data_type, orig_ch); - TypedData_Get_Struct(copy, grpc_rb_server_credentials, - &grpc_rb_server_credentials_data_type, copy_ch); - - /* use ruby's MEMCPY to make a byte-for-byte copy of the server_credentials - wrapper object. */ - MEMCPY(copy_ch, orig_ch, grpc_rb_server_credentials, 1); - return copy; -} - /* The attribute used on the mark object to preserve the pem_root_certs. */ static ID id_pem_root_certs; @@ -270,7 +240,7 @@ void Init_grpc_server_credentials() { rb_define_method(grpc_rb_cServerCredentials, "initialize", grpc_rb_server_credentials_init, 3); rb_define_method(grpc_rb_cServerCredentials, "initialize_copy", - grpc_rb_server_credentials_init_copy, 1); + grpc_rb_cannot_init_copy, 1); id_pem_key_certs = rb_intern("__pem_key_certs"); id_pem_root_certs = rb_intern("__pem_root_certs"); From a9d8c5564e37e2d42fa3a6f4546ac3507b1b03c8 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 2 Jun 2016 16:11:28 -0700 Subject: [PATCH 0843/1894] Provide reasons in error messages when streams are canceled with a connection drop --- .../chttp2/transport/chttp2_transport.c | 74 ++++++++++++++++--- .../ext/transport/chttp2/transport/internal.h | 3 + 2 files changed, 65 insertions(+), 12 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index b6886a2201b..52ac895271e 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -47,6 +47,7 @@ #include "src/core/ext/transport/chttp2/transport/internal.h" #include "src/core/ext/transport/chttp2/transport/status_conversion.h" #include "src/core/ext/transport/chttp2/transport/timeout_encoding.h" +#include "src/core/lib/http/parser.h" #include "src/core/lib/profiling/timers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/transport/static_metadata.h" @@ -107,7 +108,8 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, static void cancel_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, - grpc_status_code status); + grpc_status_code status, + gpr_slice *optional_message); static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, @@ -161,6 +163,8 @@ static void destruct_transport(grpc_exec_ctx *exec_ctx, GPR_ASSERT(t->ep == NULL); + gpr_slice_unref(t->optional_drop_message); + gpr_slice_buffer_destroy(&t->global.qbuf); gpr_slice_buffer_destroy(&t->writing.outbuf); @@ -260,6 +264,7 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, t->parsing.deframe_state = is_client ? GRPC_DTS_FH_0 : GRPC_DTS_CLIENT_PREFIX_0; t->writing.is_client = is_client; + t->optional_drop_message = gpr_empty_slice(); grpc_connectivity_state_init( &t->channel_callback.state_tracker, GRPC_CHANNEL_READY, is_client ? "client_transport" : "server_transport"); @@ -859,7 +864,7 @@ static void maybe_start_some_streams( grpc_chttp2_list_pop_waiting_for_concurrency(transport_global, &stream_global)) { cancel_from_api(exec_ctx, transport_global, stream_global, - GRPC_STATUS_UNAVAILABLE); + GRPC_STATUS_UNAVAILABLE, NULL); } } @@ -936,7 +941,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, if (op->cancel_with_status != GRPC_STATUS_OK) { cancel_from_api(exec_ctx, transport_global, stream_global, - op->cancel_with_status); + op->cancel_with_status, op->optional_close_message); } if (op->close_with_status != GRPC_STATUS_OK) { @@ -960,7 +965,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, "(%lu vs. %lu)", metadata_size, metadata_peer_limit); cancel_from_api(exec_ctx, transport_global, stream_global, - GRPC_STATUS_RESOURCE_EXHAUSTED); + GRPC_STATUS_RESOURCE_EXHAUSTED, NULL); } else { if (contains_non_ok_status(transport_global, op->send_initial_metadata)) { stream_global->seen_error = true; @@ -1015,7 +1020,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, "(%lu vs. %lu)", metadata_size, metadata_peer_limit); cancel_from_api(exec_ctx, transport_global, stream_global, - GRPC_STATUS_RESOURCE_EXHAUSTED); + GRPC_STATUS_RESOURCE_EXHAUSTED, NULL); } else { if (contains_non_ok_status(transport_global, op->send_trailing_metadata)) { @@ -1201,7 +1206,7 @@ static void check_read_ops(grpc_exec_ctx *exec_ctx, } if (stream_global->exceeded_metadata_size) { cancel_from_api(exec_ctx, transport_global, stream_global, - GRPC_STATUS_RESOURCE_EXHAUSTED); + GRPC_STATUS_RESOURCE_EXHAUSTED, NULL); } } grpc_chttp2_incoming_metadata_buffer_publish( @@ -1240,7 +1245,7 @@ static void check_read_ops(grpc_exec_ctx *exec_ctx, } if (stream_global->exceeded_metadata_size) { cancel_from_api(exec_ctx, transport_global, stream_global, - GRPC_STATUS_RESOURCE_EXHAUSTED); + GRPC_STATUS_RESOURCE_EXHAUSTED, NULL); } } if (stream_global->all_incoming_byte_streams_finished) { @@ -1303,7 +1308,8 @@ static void remove_stream(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, static void cancel_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, - grpc_status_code status) { + grpc_status_code status, + gpr_slice *optional_message) { if (!stream_global->read_closed || !stream_global->write_closed) { if (stream_global->id != 0) { gpr_slice_buffer_add( @@ -1313,8 +1319,12 @@ static void cancel_from_api(grpc_exec_ctx *exec_ctx, (uint32_t)grpc_chttp2_grpc_status_to_http2_error(status), &stream_global->stats.outgoing)); } + + if (optional_message) { + gpr_slice_ref(*optional_message); + } grpc_chttp2_fake_status(exec_ctx, transport_global, stream_global, status, - NULL); + optional_message); } if (status != GRPC_STATUS_OK && !stream_global->seen_error) { stream_global->seen_error = true; @@ -1519,16 +1529,23 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, 1); } +typedef struct { + grpc_exec_ctx *exec_ctx; + gpr_slice optional_drop_message; +} cancel_stream_cb_arg; + static void cancel_stream_cb(grpc_chttp2_transport_global *transport_global, void *user_data, grpc_chttp2_stream_global *stream_global) { - cancel_from_api(user_data, transport_global, stream_global, - GRPC_STATUS_UNAVAILABLE); + cancel_stream_cb_arg *arg = user_data; + cancel_from_api(arg->exec_ctx, transport_global, stream_global, + GRPC_STATUS_UNAVAILABLE, &arg->optional_drop_message); } static void end_all_the_calls(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) { - grpc_chttp2_for_all_streams(&t->global, exec_ctx, cancel_stream_cb); + cancel_stream_cb_arg arg = {exec_ctx, t->optional_drop_message}; + grpc_chttp2_for_all_streams(&t->global, &arg, cancel_stream_cb); } static void drop_connection(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) { @@ -1599,6 +1616,31 @@ static void reading_action_locked(grpc_exec_ctx *exec_ctx, } } +static bool try_http_parsing(grpc_exec_ctx *exec_ctx, + grpc_chttp2_transport *t) { + return false; + grpc_http_parser parser; + size_t i = 0; + bool success = false; + + grpc_http_parser_init(&parser); + grpc_http1_trace = 1; + + for (; i < t->read_buffer.count && + grpc_http_parser_parse(&parser, t->read_buffer.slices[i]); + i++) + ; + if (grpc_http_parser_eof(&parser) && parser.type == GRPC_HTTP_RESPONSE) { + success = true; + GRPC_CHTTP2_IF_TRACING(gpr_log( + GPR_DEBUG, "Trying to connect an http1.x server, received status:%d", + parser.http.response.status)); + } + + grpc_http_parser_destroy(&parser); + return success; +} + static void parsing_action(grpc_exec_ctx *exec_ctx, void *arg, bool success) { grpc_chttp2_transport *t = arg; GPR_TIMER_BEGIN("reading_action.parse", 0); @@ -1610,6 +1652,14 @@ static void parsing_action(grpc_exec_ctx *exec_ctx, void *arg, bool success) { ; if (i != t->read_buffer.count) { success = false; + gpr_slice_unref(t->optional_drop_message); + if (try_http_parsing(exec_ctx, t)) { + t->optional_drop_message = gpr_slice_from_copied_string( + "Connection dropped: received http1.x response"); + } else { + t->optional_drop_message = gpr_slice_from_copied_string( + "Connection dropped: received unparseable response"); + } } GPR_TIMER_END("reading_action.parse", 0); grpc_chttp2_run_with_global_lock(exec_ctx, t, NULL, post_parse_locked, diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 5872fd8e0a4..7f3339a6204 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -383,6 +383,9 @@ struct grpc_chttp2_transport { /** Transport op to be applied post-parsing */ grpc_transport_op *post_parsing_op; + + /** Message explaining the reason of dropping connection */ + gpr_slice optional_drop_message; }; typedef struct { From 4aaba75a822c6dde718d7fe646f7671b4f64d8a0 Mon Sep 17 00:00:00 2001 From: Alistair Veitch Date: Thu, 2 Jun 2016 17:11:46 -0700 Subject: [PATCH 0844/1894] initial implementation of resource handling --- BUILD | 12 + Makefile | 40 +++ binding.gyp | 2 + build.yaml | 14 + config.m4 | 2 + gRPC.podspec | 6 + grpc.def | 11 +- grpc.gemspec | 4 + include/grpc/census.h | 136 +++------- package.xml | 4 + src/core/ext/census/base_resources.c | 148 ++++++++++ src/core/ext/census/base_resources.h | 39 +++ src/core/ext/census/initialize.c | 20 +- src/core/ext/census/placeholders.c | 45 ---- src/core/ext/census/resource.c | 255 ++++++++++++++++++ src/core/ext/census/resource.h | 42 +++ .../grpcio/grpc/_cython/imports.generated.c | 22 +- .../grpcio/grpc/_cython/imports.generated.h | 33 +-- src/python/grpcio/grpc_core_dependencies.py | 2 + src/ruby/ext/grpc/rb_grpc_imports.generated.c | 22 +- src/ruby/ext/grpc/rb_grpc_imports.generated.h | 33 +-- test/core/census/README | 7 + test/core/census/data/resource_empty_name.pb | 1 + test/core/census/data/resource_empty_name.txt | 5 + test/core/census/data/resource_full.pb | 2 + test/core/census/data/resource_full.txt | 9 + .../core/census/data/resource_minimal_good.pb | 2 + .../census/data/resource_minimal_good.txt | 5 + test/core/census/data/resource_no_name.pb | 1 + test/core/census/data/resource_no_name.txt | 4 + .../core/census/data/resource_no_numerator.pb | 2 + .../census/data/resource_no_numerator.txt | 6 + test/core/census/data/resource_no_unit.pb | 2 + test/core/census/data/resource_no_unit.txt | 2 + test/core/census/resource_test.c | 157 +++++++++++ tools/doxygen/Doxyfile.core.internal | 4 + tools/run_tests/sources_and_headers.json | 22 ++ tools/run_tests/tests.json | 21 ++ vsprojects/buildtests_c.sln | 27 ++ vsprojects/vcxproj/grpc/grpc.vcxproj | 6 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 12 + .../grpc_unsecure/grpc_unsecure.vcxproj | 6 + .../grpc_unsecure.vcxproj.filters | 12 + .../census_resource_test.vcxproj | 199 ++++++++++++++ .../census_resource_test.vcxproj.filters | 21 ++ 45 files changed, 1194 insertions(+), 233 deletions(-) create mode 100644 src/core/ext/census/base_resources.c create mode 100644 src/core/ext/census/base_resources.h create mode 100644 src/core/ext/census/resource.c create mode 100644 src/core/ext/census/resource.h create mode 100644 test/core/census/README create mode 100644 test/core/census/data/resource_empty_name.pb create mode 100644 test/core/census/data/resource_empty_name.txt create mode 100644 test/core/census/data/resource_full.pb create mode 100644 test/core/census/data/resource_full.txt create mode 100644 test/core/census/data/resource_minimal_good.pb create mode 100644 test/core/census/data/resource_minimal_good.txt create mode 100644 test/core/census/data/resource_no_name.pb create mode 100644 test/core/census/data/resource_no_name.txt create mode 100644 test/core/census/data/resource_no_numerator.pb create mode 100644 test/core/census/data/resource_no_numerator.txt create mode 100644 test/core/census/data/resource_no_unit.pb create mode 100644 test/core/census/data/resource_no_unit.txt create mode 100644 test/core/census/resource_test.c create mode 100644 vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj create mode 100644 vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj.filters diff --git a/BUILD b/BUILD index 024a5182ce5..b3b75ed0bb8 100644 --- a/BUILD +++ b/BUILD @@ -299,11 +299,13 @@ cc_library( "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", "src/core/ext/census/aggregation.h", + "src/core/ext/census/base_resources.h", "src/core/ext/census/census_interface.h", "src/core/ext/census/census_rpc_stats.h", "src/core/ext/census/gen/census.pb.h", "src/core/ext/census/grpc_filter.h", "src/core/ext/census/mlog.h", + "src/core/ext/census/resource.h", "src/core/ext/census/rpc_metric_id.h", "src/core/lib/surface/init.c", "src/core/lib/channel/channel_args.c", @@ -469,6 +471,7 @@ cc_library( "src/core/ext/lb_policy/round_robin/round_robin.c", "src/core/ext/resolver/dns/native/dns_resolver.c", "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", + "src/core/ext/census/base_resources.c", "src/core/ext/census/context.c", "src/core/ext/census/gen/census.pb.c", "src/core/ext/census/grpc_context.c", @@ -478,6 +481,7 @@ cc_library( "src/core/ext/census/mlog.c", "src/core/ext/census/operation.c", "src/core/ext/census/placeholders.c", + "src/core/ext/census/resource.c", "src/core/ext/census/tracing.c", "src/core/plugin_registry/grpc_plugin_registry.c", ], @@ -647,11 +651,13 @@ cc_library( "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", "src/core/ext/census/aggregation.h", + "src/core/ext/census/base_resources.h", "src/core/ext/census/census_interface.h", "src/core/ext/census/census_rpc_stats.h", "src/core/ext/census/gen/census.pb.h", "src/core/ext/census/grpc_filter.h", "src/core/ext/census/mlog.h", + "src/core/ext/census/resource.h", "src/core/ext/census/rpc_metric_id.h", "src/core/lib/surface/init.c", "src/core/lib/surface/init_unsecure.c", @@ -786,6 +792,7 @@ cc_library( "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", "src/core/ext/lb_policy/round_robin/round_robin.c", + "src/core/ext/census/base_resources.c", "src/core/ext/census/context.c", "src/core/ext/census/gen/census.pb.c", "src/core/ext/census/grpc_context.c", @@ -795,6 +802,7 @@ cc_library( "src/core/ext/census/mlog.c", "src/core/ext/census/operation.c", "src/core/ext/census/placeholders.c", + "src/core/ext/census/resource.c", "src/core/ext/census/tracing.c", "src/core/plugin_registry/grpc_unsecure_plugin_registry.c", ], @@ -1512,6 +1520,7 @@ objc_library( "src/core/ext/lb_policy/round_robin/round_robin.c", "src/core/ext/resolver/dns/native/dns_resolver.c", "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", + "src/core/ext/census/base_resources.c", "src/core/ext/census/context.c", "src/core/ext/census/gen/census.pb.c", "src/core/ext/census/grpc_context.c", @@ -1521,6 +1530,7 @@ objc_library( "src/core/ext/census/mlog.c", "src/core/ext/census/operation.c", "src/core/ext/census/placeholders.c", + "src/core/ext/census/resource.c", "src/core/ext/census/tracing.c", "src/core/plugin_registry/grpc_plugin_registry.c", ], @@ -1693,11 +1703,13 @@ objc_library( "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", "src/core/ext/census/aggregation.h", + "src/core/ext/census/base_resources.h", "src/core/ext/census/census_interface.h", "src/core/ext/census/census_rpc_stats.h", "src/core/ext/census/gen/census.pb.h", "src/core/ext/census/grpc_filter.h", "src/core/ext/census/mlog.h", + "src/core/ext/census/resource.h", "src/core/ext/census/rpc_metric_id.h", ], includes = [ diff --git a/Makefile b/Makefile index 98f6e562c69..34daedc6d27 100644 --- a/Makefile +++ b/Makefile @@ -891,6 +891,7 @@ alpn_test: $(BINDIR)/$(CONFIG)/alpn_test api_fuzzer: $(BINDIR)/$(CONFIG)/api_fuzzer bin_encoder_test: $(BINDIR)/$(CONFIG)/bin_encoder_test census_context_test: $(BINDIR)/$(CONFIG)/census_context_test +census_resource_test: $(BINDIR)/$(CONFIG)/census_resource_test channel_create_test: $(BINDIR)/$(CONFIG)/channel_create_test chttp2_hpack_encoder_test: $(BINDIR)/$(CONFIG)/chttp2_hpack_encoder_test chttp2_status_conversion_test: $(BINDIR)/$(CONFIG)/chttp2_status_conversion_test @@ -1223,6 +1224,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/alpn_test \ $(BINDIR)/$(CONFIG)/bin_encoder_test \ $(BINDIR)/$(CONFIG)/census_context_test \ + $(BINDIR)/$(CONFIG)/census_resource_test \ $(BINDIR)/$(CONFIG)/channel_create_test \ $(BINDIR)/$(CONFIG)/chttp2_hpack_encoder_test \ $(BINDIR)/$(CONFIG)/chttp2_status_conversion_test \ @@ -1475,6 +1477,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/bin_encoder_test || ( echo test bin_encoder_test failed ; exit 1 ) $(E) "[RUN] Testing census_context_test" $(Q) $(BINDIR)/$(CONFIG)/census_context_test || ( echo test census_context_test failed ; exit 1 ) + $(E) "[RUN] Testing census_resource_test" + $(Q) $(BINDIR)/$(CONFIG)/census_resource_test || ( echo test census_resource_test failed ; exit 1 ) $(E) "[RUN] Testing channel_create_test" $(Q) $(BINDIR)/$(CONFIG)/channel_create_test || ( echo test channel_create_test failed ; exit 1 ) $(E) "[RUN] Testing chttp2_hpack_encoder_test" @@ -2637,6 +2641,7 @@ LIBGRPC_SRC = \ src/core/ext/lb_policy/round_robin/round_robin.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ src/core/ext/resolver/sockaddr/sockaddr_resolver.c \ + src/core/ext/census/base_resources.c \ src/core/ext/census/context.c \ src/core/ext/census/gen/census.pb.c \ src/core/ext/census/grpc_context.c \ @@ -2646,6 +2651,7 @@ LIBGRPC_SRC = \ src/core/ext/census/mlog.c \ src/core/ext/census/operation.c \ src/core/ext/census/placeholders.c \ + src/core/ext/census/resource.c \ src/core/ext/census/tracing.c \ src/core/plugin_registry/grpc_plugin_registry.c \ @@ -2961,6 +2967,7 @@ LIBGRPC_UNSECURE_SRC = \ third_party/nanopb/pb_encode.c \ src/core/ext/lb_policy/pick_first/pick_first.c \ src/core/ext/lb_policy/round_robin/round_robin.c \ + src/core/ext/census/base_resources.c \ src/core/ext/census/context.c \ src/core/ext/census/gen/census.pb.c \ src/core/ext/census/grpc_context.c \ @@ -2970,6 +2977,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/census/mlog.c \ src/core/ext/census/operation.c \ src/core/ext/census/placeholders.c \ + src/core/ext/census/resource.c \ src/core/ext/census/tracing.c \ src/core/plugin_registry/grpc_unsecure_plugin_registry.c \ @@ -6195,6 +6203,38 @@ endif endif +CENSUS_RESOURCE_TEST_SRC = \ + test/core/census/resource_test.c \ + +CENSUS_RESOURCE_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CENSUS_RESOURCE_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/census_resource_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/census_resource_test: $(CENSUS_RESOURCE_TEST_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) $(CENSUS_RESOURCE_TEST_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)/census_resource_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/census/resource_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_census_resource_test: $(CENSUS_RESOURCE_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(CENSUS_RESOURCE_TEST_OBJS:.o=.dep) +endif +endif + + CHANNEL_CREATE_TEST_SRC = \ test/core/surface/channel_create_test.c \ diff --git a/binding.gyp b/binding.gyp index 1e8b5e294f8..cc8077d5662 100644 --- a/binding.gyp +++ b/binding.gyp @@ -730,6 +730,7 @@ 'src/core/ext/lb_policy/round_robin/round_robin.c', 'src/core/ext/resolver/dns/native/dns_resolver.c', 'src/core/ext/resolver/sockaddr/sockaddr_resolver.c', + 'src/core/ext/census/base_resources.c', 'src/core/ext/census/context.c', 'src/core/ext/census/gen/census.pb.c', 'src/core/ext/census/grpc_context.c', @@ -739,6 +740,7 @@ 'src/core/ext/census/mlog.c', 'src/core/ext/census/operation.c', 'src/core/ext/census/placeholders.c', + 'src/core/ext/census/resource.c', 'src/core/ext/census/tracing.c', 'src/core/plugin_registry/grpc_plugin_registry.c', ], diff --git a/build.yaml b/build.yaml index f211575e925..0d192eee1d8 100644 --- a/build.yaml +++ b/build.yaml @@ -14,13 +14,16 @@ filegroups: - include/grpc/census.h headers: - src/core/ext/census/aggregation.h + - src/core/ext/census/base_resources.h - src/core/ext/census/census_interface.h - src/core/ext/census/census_rpc_stats.h - src/core/ext/census/gen/census.pb.h - src/core/ext/census/grpc_filter.h - src/core/ext/census/mlog.h + - src/core/ext/census/resource.h - src/core/ext/census/rpc_metric_id.h src: + - src/core/ext/census/base_resources.c - src/core/ext/census/context.c - src/core/ext/census/gen/census.pb.c - src/core/ext/census/grpc_context.c @@ -30,6 +33,7 @@ filegroups: - src/core/ext/census/mlog.c - src/core/ext/census/operation.c - src/core/ext/census/placeholders.c + - src/core/ext/census/resource.c - src/core/ext/census/tracing.c plugin: census_grpc_plugin uses: @@ -1192,6 +1196,16 @@ targets: - grpc - gpr_test_util - gpr +- name: census_resource_test + build: test + language: c + src: + - test/core/census/resource_test.c + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr - name: channel_create_test build: test language: c diff --git a/config.m4 b/config.m4 index e8506bb269c..b8a84291745 100644 --- a/config.m4 +++ b/config.m4 @@ -249,6 +249,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/lb_policy/round_robin/round_robin.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ src/core/ext/resolver/sockaddr/sockaddr_resolver.c \ + src/core/ext/census/base_resources.c \ src/core/ext/census/context.c \ src/core/ext/census/gen/census.pb.c \ src/core/ext/census/grpc_context.c \ @@ -258,6 +259,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/census/mlog.c \ src/core/ext/census/operation.c \ src/core/ext/census/placeholders.c \ + src/core/ext/census/resource.c \ src/core/ext/census/tracing.c \ src/core/plugin_registry/grpc_plugin_registry.c \ src/boringssl/err_data.c \ diff --git a/gRPC.podspec b/gRPC.podspec index 9c049f03b19..8187b40a29d 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -306,11 +306,13 @@ Pod::Spec.new do |s| 'third_party/nanopb/pb_decode.h', 'third_party/nanopb/pb_encode.h', 'src/core/ext/census/aggregation.h', + 'src/core/ext/census/base_resources.h', 'src/core/ext/census/census_interface.h', 'src/core/ext/census/census_rpc_stats.h', 'src/core/ext/census/gen/census.pb.h', 'src/core/ext/census/grpc_filter.h', 'src/core/ext/census/mlog.h', + 'src/core/ext/census/resource.h', 'src/core/ext/census/rpc_metric_id.h', 'include/grpc/byte_buffer.h', 'include/grpc/byte_buffer_reader.h', @@ -509,6 +511,7 @@ Pod::Spec.new do |s| 'src/core/ext/lb_policy/round_robin/round_robin.c', 'src/core/ext/resolver/dns/native/dns_resolver.c', 'src/core/ext/resolver/sockaddr/sockaddr_resolver.c', + 'src/core/ext/census/base_resources.c', 'src/core/ext/census/context.c', 'src/core/ext/census/gen/census.pb.c', 'src/core/ext/census/grpc_context.c', @@ -518,6 +521,7 @@ Pod::Spec.new do |s| 'src/core/ext/census/mlog.c', 'src/core/ext/census/operation.c', 'src/core/ext/census/placeholders.c', + 'src/core/ext/census/resource.c', 'src/core/ext/census/tracing.c', 'src/core/plugin_registry/grpc_plugin_registry.c' @@ -675,11 +679,13 @@ Pod::Spec.new do |s| 'third_party/nanopb/pb_decode.h', 'third_party/nanopb/pb_encode.h', 'src/core/ext/census/aggregation.h', + 'src/core/ext/census/base_resources.h', 'src/core/ext/census/census_interface.h', 'src/core/ext/census/census_rpc_stats.h', 'src/core/ext/census/gen/census.pb.h', 'src/core/ext/census/grpc_filter.h', 'src/core/ext/census/mlog.h', + 'src/core/ext/census/resource.h', 'src/core/ext/census/rpc_metric_id.h' ss.header_mappings_dir = '.' diff --git a/grpc.def b/grpc.def index b811f0ff129..f69370ae8ab 100644 --- a/grpc.def +++ b/grpc.def @@ -23,15 +23,10 @@ EXPORTS census_trace_scan_start census_get_trace_record census_trace_scan_end + census_define_resource + census_delete_resource + census_resource_id census_record_values - census_view_create - census_view_delete - census_view_metric - census_view_naggregations - census_view_tags - census_view_aggregrations - census_view_get_data - census_view_reset grpc_compression_algorithm_parse grpc_compression_algorithm_name grpc_compression_algorithm_for_level diff --git a/grpc.gemspec b/grpc.gemspec index 047845cd843..acb23bd043d 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -315,11 +315,13 @@ 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/ext/census/aggregation.h ) + s.files += %w( src/core/ext/census/base_resources.h ) s.files += %w( src/core/ext/census/census_interface.h ) s.files += %w( src/core/ext/census/census_rpc_stats.h ) s.files += %w( src/core/ext/census/gen/census.pb.h ) s.files += %w( src/core/ext/census/grpc_filter.h ) s.files += %w( src/core/ext/census/mlog.h ) + s.files += %w( src/core/ext/census/resource.h ) s.files += %w( src/core/ext/census/rpc_metric_id.h ) s.files += %w( src/core/lib/surface/init.c ) s.files += %w( src/core/lib/channel/channel_args.c ) @@ -488,6 +490,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/lb_policy/round_robin/round_robin.c ) s.files += %w( src/core/ext/resolver/dns/native/dns_resolver.c ) s.files += %w( src/core/ext/resolver/sockaddr/sockaddr_resolver.c ) + s.files += %w( src/core/ext/census/base_resources.c ) s.files += %w( src/core/ext/census/context.c ) s.files += %w( src/core/ext/census/gen/census.pb.c ) s.files += %w( src/core/ext/census/grpc_context.c ) @@ -497,6 +500,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/census/mlog.c ) s.files += %w( src/core/ext/census/operation.c ) s.files += %w( src/core/ext/census/placeholders.c ) + s.files += %w( src/core/ext/census/resource.c ) s.files += %w( src/core/ext/census/tracing.c ) s.files += %w( src/core/plugin_registry/grpc_plugin_registry.c ) s.files += %w( third_party/boringssl/crypto/aes/internal.h ) diff --git a/include/grpc/census.h b/include/grpc/census.h index 39d87ba119c..62ff45d8941 100644 --- a/include/grpc/census.h +++ b/include/grpc/census.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -56,9 +56,11 @@ enum census_features { /** Shutdown and startup census subsystem. The 'features' argument should be * the OR (|) of census_features values. If census fails to initialize, then - * census_initialize() will return a non-zero value. It is an error to call - * census_initialize() more than once (without an intervening - * census_shutdown()). */ + * census_initialize() will return -1, otherwise the set of enabled features + * (which may be smaller than that provided in the `features` argument, see + * census_supported()) is returned. It is an error to call census_initialize() + * more than once (without an intervening census_shutdown()). These functions + * are not thread-safe. */ CENSUSAPI int census_initialize(int features); CENSUSAPI void census_shutdown(void); @@ -430,30 +432,44 @@ CENSUSAPI int census_get_trace_record(census_trace_record *trace_record); CENSUSAPI void census_trace_scan_end(); /* Core stats collection API's. The following concepts are used: - * Aggregation: A collection of values. Census supports the following - aggregation types: - Sum - a single summation type. Typically used for keeping (e.g.) - counts of events. - Distribution - statistical distribution information, used for - recording average, standard deviation etc. - Histogram - a histogram of measurements falling in defined bucket - boundaries. - Window - a count of events that happen in reolling time window. - New aggregation types can be added by the user, if desired (see - census_register_aggregation()). - * Metric: Each measurement is for a single metric. Examples include RPC - latency, CPU seconds consumed, and bytes transmitted. - * View: A view is a combination of a metric, a tag set (in which the tag - values are regular expressions) and a set of aggregations. When a - measurement for a metric matches the view tags, it is recorded (for each - unique set of tags) against each aggregation. Each metric can have an - arbitrary number of views by which it will be broken down. + * Resource: Users record measurements for a single resource. Examples + include RPC latency, CPU seconds consumed, and bytes transmitted. + * Aggregation: An aggregation of a set of measurements. Census supports the + following aggregation types: + * Distribution - statistical distribution information, used for + recording average, standard deviation etc. Can include a histogram. + * Interval - a count of events that happen in a rolling time window. + * View: A view is a combination of a Resource, a set of tag keys and an + Aggregation. When a measurement for a Resource matches the View tags, it is + recorded (for each unique set of tag values) using the Aggregation type. + Each resource can have an arbitrary number of views by which it will be + broken down. + + Census uses protos to define each of the above, and output results. This + ensures unification across the different language and runtime + implementations. The proto definitions can be found in src/proto/census. */ +/* Define a new resource. `resource_pb` should contain an encoded Resource + protobuf, `resource_pb_size` being the size of the buffer. Returns a -ve + value on error, or a positive (>= 0) resource id (for use in + census_delete_resource() and census_record_values()). In order to be valid, a + resource must have a name, and at least one numerator in it's unit type. The + resource name must be unique, and an error will be returned if it is not. */ +CENSUSAPI int32_t census_define_resource(const uint8_t *resource_pb, + size_t resource_pb_size); + +/* Delete a resource created by census_define_resource(). */ +CENSUSAPI void census_delete_resource(int32_t resource_id); + +/* Determine the id of a resource, given it's name. returns -1 if the resource + does not exist. */ +CENSUSAPI int32_t census_resource_id(const char *name); + /* A single value to be recorded comprises two parts: an ID for the particular - * metric and the value to be recorded against it. */ + * resource and the value to be recorded against it. */ typedef struct { - uint32_t metric_id; + int32_t resource_id; double value; } census_value; @@ -461,78 +477,6 @@ typedef struct { CENSUSAPI void census_record_values(census_context *context, census_value *values, size_t nvalues); -/** Type representing a particular aggregation */ -typedef struct census_aggregation_ops census_aggregation_ops; - -/* Predefined aggregation types, for use with census_view_create(). */ -extern census_aggregation_ops census_agg_sum; -extern census_aggregation_ops census_agg_distribution; -extern census_aggregation_ops census_agg_histogram; -extern census_aggregation_ops census_agg_window; - -/** Information needed to instantiate a new aggregation. Used in view - construction via census_define_view(). */ -typedef struct { - const census_aggregation_ops *ops; - const void *create_arg; /* Aaggregation initialization argument. */ -} census_aggregation; - -/** A census view type. Opaque. */ -typedef struct census_view census_view; - -/** Create a new view. - @param metric_id Metric with which this view is associated. - @param tags tags that define the view. - @param aggregations aggregations to associate with the view - @param naggregations number of aggregations - - @return A new census view -*/ - -/* TODO(aveitch): consider if context is the right argument type to pass in - tags. */ -CENSUSAPI census_view *census_view_create( - uint32_t metric_id, const census_context *tags, - const census_aggregation *aggregations, size_t naggregations); - -/** Destroy a previously created view. */ -CENSUSAPI void census_view_delete(census_view *view); - -/** Metric ID associated with a view */ -CENSUSAPI size_t census_view_metric(const census_view *view); - -/** Number of aggregations associated with view. */ -CENSUSAPI size_t census_view_naggregations(const census_view *view); - -/** Get tags associated with view. */ -CENSUSAPI const census_context *census_view_tags(const census_view *view); - -/** Get aggregation descriptors associated with a view. */ -CENSUSAPI const census_aggregation *census_view_aggregrations( - const census_view *view); - -/** Holds all the aggregation data for a particular view instantiation. Forms - part of the data returned by census_view_data(). */ -typedef struct { - const census_context *tags; /* Tags for this set of aggregations. */ - const void **data; /* One data set for every aggregation in the view. */ -} census_view_aggregation_data; - -/** Census view data as returned by census_view_get_data(). */ -typedef struct { - size_t n_tag_sets; /* Number of unique tag sets that matched view. */ - const census_view_aggregation_data *data; /* n_tag_sets entries */ -} census_view_data; - -/** Get data from aggregations associated with a view. - @param view View from which to get data. - @return Full set of data for all aggregations for the view. -*/ -CENSUSAPI const census_view_data *census_view_get_data(const census_view *view); - -/** Reset all view data to zero for the specified view */ -CENSUSAPI void census_view_reset(census_view *view); - #ifdef __cplusplus } #endif diff --git a/package.xml b/package.xml index 6f6b8dd4bdb..575b7438fae 100644 --- a/package.xml +++ b/package.xml @@ -322,11 +322,13 @@ + + @@ -495,6 +497,7 @@ + @@ -504,6 +507,7 @@ + diff --git a/src/core/ext/census/base_resources.c b/src/core/ext/census/base_resources.c new file mode 100644 index 00000000000..8f0329a72bd --- /dev/null +++ b/src/core/ext/census/base_resources.c @@ -0,0 +1,148 @@ +/* + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include + +#include +#include + +#include "base_resources.h" +#include "gen/census.pb.h" +#include "third_party/nanopb/pb_encode.h" + +// Add base RPC resource definitions for use by RPC runtime. +// +// TODO(aveitch): All of these are currently hardwired definitions encoded in +// the code in this file. These should be converted to use an external +// configuration mechanism, in which these resources are defined in a text +// file, which is compiled to .pb format and read by still-to-be-written +// configuration functions. + +// Structure representing a MeasurementUnit proto. +typedef struct { + int32_t prefix; + int n_numerators; + const google_census_Resource_BasicUnit *numerators; + int n_denominators; + const google_census_Resource_BasicUnit *denominators; +} measurement_unit; + +// Encode a nanopb string. Expects the string argument to be passed in as `arg`. +static bool encode_string(pb_ostream_t *stream, const pb_field_t *field, + void *const *arg) { + if (!pb_encode_tag_for_field(stream, field)) { + return false; + } + return pb_encode_string(stream, (uint8_t *)*arg, strlen((const char *)*arg)); +} + +// Encode the numerators part of a measurement_unit (passed in as `arg`). +static bool encode_numerators(pb_ostream_t *stream, const pb_field_t *field, + void *const *arg) { + const measurement_unit *mu = (const measurement_unit *)*arg; + for (int i = 0; i < mu->n_numerators; i++) { + if (!pb_encode_tag_for_field(stream, field)) { + return false; + } + if (!pb_encode_varint(stream, mu->numerators[i])) { + return false; + } + } + return true; +} + +// Encode the denominators part of a measurement_unit (passed in as `arg`). +static bool encode_denominators(pb_ostream_t *stream, const pb_field_t *field, + void *const *arg) { + const measurement_unit *mu = (const measurement_unit *)*arg; + for (int i = 0; i < mu->n_denominators; i++) { + if (!pb_encode_tag_for_field(stream, field)) { + return false; + } + if (!pb_encode_varint(stream, mu->numerators[i])) { + return false; + } + } + return true; +} + +// Define a Resource, given the important details. Encodes a protobuf, which +// is then passed to census_define_resource. +static void define_resource(const char *name, const char *description, + const measurement_unit *unit) { + // nanopb generated type for Resource. Initialize encoding functions to NULL + // since we can't directly initialize them due to embedded union in struct. + google_census_Resource resource = { + {{NULL}, (void *)name}, + {{NULL}, (void *)description}, + true, // has_unit + {true, unit->prefix, {{NULL}, (void *)unit}, {{NULL}, (void *)unit}}}; + resource.name.funcs.encode = &encode_string; + resource.description.funcs.encode = &encode_string; + resource.unit.numerator.funcs.encode = &encode_numerators; + resource.unit.denominator.funcs.encode = &encode_denominators; + + // Buffer for storing encoded proto. + uint8_t buffer[512]; + pb_ostream_t stream = pb_ostream_from_buffer(buffer, 512); + if (!pb_encode(&stream, google_census_Resource_fields, &resource)) { + gpr_log(GPR_ERROR, "Error encoding resource %s.", name); + return; + } + int32_t mid = census_define_resource(buffer, stream.bytes_written); + if (mid < 0) { + gpr_log(GPR_ERROR, "Error defining resource %s.", name); + } +} + +// Define a resource for client RPC latency. +static void define_client_rpc_latency_resource() { + google_census_Resource_BasicUnit numerator = + google_census_Resource_BasicUnit_SECS; + measurement_unit unit = {0, 1, &numerator, 0, NULL}; + define_resource("client_rpc_latency", "Client RPC latency in seconds", &unit); +} + +// Define a resource for server RPC latency. +static void define_server_rpc_latency_resource() { + google_census_Resource_BasicUnit numerator = + google_census_Resource_BasicUnit_SECS; + measurement_unit unit = {0, 1, &numerator, 0, NULL}; + define_resource("server_rpc_latency", "Server RPC latency in seconds", &unit); +} + +// Define all base resources. This should be called by census initialization. +void define_base_resources() { + define_client_rpc_latency_resource(); + define_server_rpc_latency_resource(); +} diff --git a/src/core/ext/census/base_resources.h b/src/core/ext/census/base_resources.h new file mode 100644 index 00000000000..992e5f6ebea --- /dev/null +++ b/src/core/ext/census/base_resources.h @@ -0,0 +1,39 @@ +/* + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_EXT_CENSUS_BASE_RESOURCES_H +#define GRPC_CORE_EXT_CENSUS_BASE_RESOURCES_H + +// Define all base resources. This should be called by census initialization. +void define_base_resources(); + +#endif // GRPC_CORE_EXT_CENSUS_BASE_RESOURCES_H diff --git a/src/core/ext/census/initialize.c b/src/core/ext/census/initialize.c index 896276e44a1..118163512ad 100644 --- a/src/core/ext/census/initialize.c +++ b/src/core/ext/census/initialize.c @@ -32,19 +32,31 @@ */ #include +#include "base_resources.h" +#include "resource.h" static int features_enabled = CENSUS_FEATURE_NONE; int census_initialize(int features) { if (features_enabled != CENSUS_FEATURE_NONE) { // Must have been a previous call to census_initialize; return error - return 1; + return -1; } - features_enabled = features; - return 0; + features_enabled = features & CENSUS_FEATURE_ALL; + if (features & CENSUS_FEATURE_STATS) { + initialize_resources(); + define_base_resources(); + } + + return features_enabled; } -void census_shutdown(void) { features_enabled = CENSUS_FEATURE_NONE; } +void census_shutdown(void) { + if (features_enabled & CENSUS_FEATURE_STATS) { + shutdown_resources(); + } + features_enabled = CENSUS_FEATURE_NONE; +} int census_supported(void) { /* TODO(aveitch): improve this as we implement features... */ diff --git a/src/core/ext/census/placeholders.c b/src/core/ext/census/placeholders.c index fe23d13971a..9f99c5bdcfb 100644 --- a/src/core/ext/census/placeholders.c +++ b/src/core/ext/census/placeholders.c @@ -62,48 +62,3 @@ int census_trace_scan_start(int consume) { (void)consume; abort(); } - -const census_aggregation *census_view_aggregrations(const census_view *view) { - (void)view; - abort(); -} - -census_view *census_view_create(uint32_t metric_id, const census_context *tags, - const census_aggregation *aggregations, - size_t naggregations) { - (void)metric_id; - (void)tags; - (void)aggregations; - (void)naggregations; - abort(); -} - -const census_context *census_view_tags(const census_view *view) { - (void)view; - abort(); -} - -void census_view_delete(census_view *view) { - (void)view; - abort(); -} - -const census_view_data *census_view_get_data(const census_view *view) { - (void)view; - abort(); -} - -size_t census_view_metric(const census_view *view) { - (void)view; - abort(); -} - -size_t census_view_naggregations(const census_view *view) { - (void)view; - abort(); -} - -void census_view_reset(census_view *view) { - (void)view; - abort(); -} diff --git a/src/core/ext/census/resource.c b/src/core/ext/census/resource.c new file mode 100644 index 00000000000..632b899e415 --- /dev/null +++ b/src/core/ext/census/resource.c @@ -0,0 +1,255 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "resource.h" +#include "gen/census.pb.h" +#include "third_party/nanopb/pb_decode.h" + +#include +#include +#include +#include + +#include +#include + +// Internal representation of a resource. +typedef struct { + char *name; + // Pointer to raw protobuf used in resource definition. + uint8_t *raw_pb; +} resource; + +// Protect local resource data structures. +static gpr_mu resource_lock; + +// Deleteing and creating resources are relatively rare events, and should not +// be done in the critical path of performance sensitive code. We record +// current resource id's used in a simple array, and just search it each time +// we need to assign a new id, or look up a resource. +static resource **resources = NULL; + +// Number of entries in *resources +static size_t n_resources = 0; + +// Number of defined resources +static size_t n_defined_resources = 0; + +void initialize_resources() { + gpr_mu_init(&resource_lock); + gpr_mu_lock(&resource_lock); + GPR_ASSERT(resources == NULL && n_resources == 0 && n_defined_resources == 0); + // 8 seems like a reasonable size for initial number of resources. + n_resources = 8; + resources = gpr_malloc(n_resources * sizeof(resource *)); + memset(resources, 0, n_resources * sizeof(resource *)); + gpr_mu_unlock(&resource_lock); +} + +// Delete a resource given it's ID. Must be called with resource_lock held. +static void delete_resource_locked(size_t rid) { + GPR_ASSERT(resources[rid] != NULL && resources[rid]->raw_pb != NULL && + resources[rid]->name != NULL && n_defined_resources > 0); + gpr_free(resources[rid]->name); + gpr_free(resources[rid]->raw_pb); + gpr_free(resources[rid]); + resources[rid] = NULL; + n_defined_resources--; +} + +void shutdown_resources() { + gpr_mu_lock(&resource_lock); + for (size_t i = 0; i < n_resources; i++) { + if (resources[i] != NULL) { + delete_resource_locked(i); + } + } + GPR_ASSERT(n_defined_resources == 0); + gpr_free(resources); + resources = NULL; + n_resources = 0; + gpr_mu_unlock(&resource_lock); +} + +// Check the contents of string fields in a resource proto. +static bool validate_string(pb_istream_t *stream, const pb_field_t *field, + void **arg) { + resource *vresource = (resource *)*arg; + switch (field->tag) { + case google_census_Resource_name_tag: + // Name must have at least one character + if (stream->bytes_left == 0) { + gpr_log(GPR_INFO, "Zero-length Resource name."); + return false; + } + vresource->name = gpr_malloc(stream->bytes_left + 1); + vresource->name[stream->bytes_left] = '\0'; + if (!pb_read(stream, (uint8_t *)vresource->name, stream->bytes_left)) { + return false; + } + // Can't have same name as an existing resource. + for (size_t i = 0; i < n_resources; i++) { + resource *compare = resources[i]; + if (compare == vresource || compare == NULL) continue; + if (strcmp(compare->name, vresource->name) == 0) { + gpr_log(GPR_INFO, "Duplicate Resource name %s.", vresource->name); + return false; + } + } + break; + case google_census_Resource_description_tag: + // Description is optional, does not need validating, just skip. + if (!pb_read(stream, NULL, stream->bytes_left)) { + return false; + } + break; + default: + // No other string fields in Resource. Print warning and skip. + gpr_log(GPR_INFO, "Unknown string field type in Resource protobuf."); + if (!pb_read(stream, NULL, stream->bytes_left)) { + return false; + } + break; + } + return true; +} + +// Validate units field of a Resource proto. +static bool validate_units(pb_istream_t *stream, const pb_field_t *field, + void **arg) { + if (field->tag == google_census_Resource_MeasurementUnit_numerator_tag) { + *(bool *)*arg = true; // has_numerator = true. + } + while (stream->bytes_left) { + uint64_t value; + if (!pb_decode_varint(stream, &value)) { + return false; + } + } + return true; +} + +// Vlaidate the contents of a Resource proto. `id` is the intended resource id. +static bool validate_resource_pb(const uint8_t *resource_pb, + size_t resource_pb_size, size_t id) { + GPR_ASSERT(id < n_resources); + if (resource_pb == NULL) { + return false; + } + google_census_Resource vresource; + vresource.name.funcs.decode = &validate_string; + vresource.name.arg = resources[id]; + vresource.description.funcs.decode = &validate_string; + vresource.unit.numerator.funcs.decode = &validate_units; + bool has_numerator = false; + vresource.unit.numerator.arg = &has_numerator; + vresource.unit.denominator.funcs.decode = &validate_units; + + pb_istream_t stream = + pb_istream_from_buffer((uint8_t *)resource_pb, resource_pb_size); + if (!pb_decode(&stream, google_census_Resource_fields, &vresource)) { + return false; + } + // A Resource must have a name, a unit, with at least one numerator. + return (resources[id]->name != NULL && vresource.has_unit && has_numerator); +} + +int32_t census_define_resource(const uint8_t *resource_pb, + size_t resource_pb_size) { + // use next_id to optimize expected placement of next new resource. + static size_t next_id = 0; + if (resource_pb == NULL) { + return -1; + } + gpr_mu_lock(&resource_lock); + size_t id = n_resources; // resource ID - initialize to invalid value. + // Expand resources if needed. + if (n_resources == n_defined_resources) { + resource **new_resources = gpr_malloc(n_resources * 2 * sizeof(resource *)); + memcpy(new_resources, resources, n_resources * sizeof(resource *)); + memset(new_resources + n_resources, 0, n_resources * sizeof(resource *)); + gpr_free(resources); + resources = new_resources; + n_resources *= 2; + id = n_defined_resources; + } else { + GPR_ASSERT(n_defined_resources < n_resources); + // Find a free id. + for (size_t base = 0; base < n_resources; base++) { + id = (next_id + base) % n_resources; + if (resources[id] == NULL) break; + } + } + GPR_ASSERT(id < n_resources && resources[id] == NULL); + resources[id] = gpr_malloc(sizeof(resource)); + resources[id]->name = NULL; + // Validate pb, extract name. + if (!validate_resource_pb(resource_pb, resource_pb_size, id)) { + if (resources[id]->name != NULL) { + gpr_free(resources[id]->name); + } + gpr_free(resources[id]); + resources[id] = NULL; + gpr_mu_unlock(&resource_lock); + return -1; + } + next_id = (id + 1) % n_resources; + // Make copy of raw proto, and return. + resources[id]->raw_pb = gpr_malloc(resource_pb_size); + memcpy(resources[id]->raw_pb, resource_pb, resource_pb_size); + n_defined_resources++; + gpr_mu_unlock(&resource_lock); + return (int32_t)id; +} + +void census_delete_resource(int32_t rid) { + gpr_mu_lock(&resource_lock); + if (rid >= 0 && (size_t)rid < n_resources && resources[rid] != NULL) { + delete_resource_locked((size_t)rid); + } + gpr_mu_unlock(&resource_lock); +} + +int32_t census_resource_id(const char *name) { + gpr_mu_lock(&resource_lock); + for (int32_t id = 0; (size_t)id < n_resources; id++) { + if (resources[id] != NULL) { + if (strcmp(resources[id]->name, name) == 0) { + gpr_mu_unlock(&resource_lock); + return id; + } + } + } + gpr_mu_unlock(&resource_lock); + return -1; +} diff --git a/src/core/ext/census/resource.h b/src/core/ext/census/resource.h new file mode 100644 index 00000000000..5ad5a0f7a0c --- /dev/null +++ b/src/core/ext/census/resource.h @@ -0,0 +1,42 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +// Census-internal resource definition and manipluation functions. +#ifndef GRPC_CORE_EXT_CENSUS_RESOURCE_H +#define GRPC_CORE_EXT_CENSUS_RESOURCE_H + +// Initialize and shutdown the resources subsystem. +void initialize_resources(); +void shutdown_resources(); + +#endif /* GRPC_CORE_EXT_CENSUS_RESOURCE_H */ diff --git a/src/python/grpcio/grpc/_cython/imports.generated.c b/src/python/grpcio/grpc/_cython/imports.generated.c index f71cf128445..29ada16afdd 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.c +++ b/src/python/grpcio/grpc/_cython/imports.generated.c @@ -61,15 +61,10 @@ census_trace_print_type census_trace_print_import; census_trace_scan_start_type census_trace_scan_start_import; census_get_trace_record_type census_get_trace_record_import; census_trace_scan_end_type census_trace_scan_end_import; +census_define_resource_type census_define_resource_import; +census_delete_resource_type census_delete_resource_import; +census_resource_id_type census_resource_id_import; census_record_values_type census_record_values_import; -census_view_create_type census_view_create_import; -census_view_delete_type census_view_delete_import; -census_view_metric_type census_view_metric_import; -census_view_naggregations_type census_view_naggregations_import; -census_view_tags_type census_view_tags_import; -census_view_aggregrations_type census_view_aggregrations_import; -census_view_get_data_type census_view_get_data_import; -census_view_reset_type census_view_reset_import; grpc_compression_algorithm_parse_type grpc_compression_algorithm_parse_import; grpc_compression_algorithm_name_type grpc_compression_algorithm_name_import; grpc_compression_algorithm_for_level_type grpc_compression_algorithm_for_level_import; @@ -333,15 +328,10 @@ void pygrpc_load_imports(HMODULE library) { census_trace_scan_start_import = (census_trace_scan_start_type) GetProcAddress(library, "census_trace_scan_start"); census_get_trace_record_import = (census_get_trace_record_type) GetProcAddress(library, "census_get_trace_record"); census_trace_scan_end_import = (census_trace_scan_end_type) GetProcAddress(library, "census_trace_scan_end"); + census_define_resource_import = (census_define_resource_type) GetProcAddress(library, "census_define_resource"); + census_delete_resource_import = (census_delete_resource_type) GetProcAddress(library, "census_delete_resource"); + census_resource_id_import = (census_resource_id_type) GetProcAddress(library, "census_resource_id"); census_record_values_import = (census_record_values_type) GetProcAddress(library, "census_record_values"); - census_view_create_import = (census_view_create_type) GetProcAddress(library, "census_view_create"); - census_view_delete_import = (census_view_delete_type) GetProcAddress(library, "census_view_delete"); - census_view_metric_import = (census_view_metric_type) GetProcAddress(library, "census_view_metric"); - census_view_naggregations_import = (census_view_naggregations_type) GetProcAddress(library, "census_view_naggregations"); - census_view_tags_import = (census_view_tags_type) GetProcAddress(library, "census_view_tags"); - census_view_aggregrations_import = (census_view_aggregrations_type) GetProcAddress(library, "census_view_aggregrations"); - census_view_get_data_import = (census_view_get_data_type) GetProcAddress(library, "census_view_get_data"); - census_view_reset_import = (census_view_reset_type) GetProcAddress(library, "census_view_reset"); grpc_compression_algorithm_parse_import = (grpc_compression_algorithm_parse_type) GetProcAddress(library, "grpc_compression_algorithm_parse"); grpc_compression_algorithm_name_import = (grpc_compression_algorithm_name_type) GetProcAddress(library, "grpc_compression_algorithm_name"); grpc_compression_algorithm_for_level_import = (grpc_compression_algorithm_for_level_type) GetProcAddress(library, "grpc_compression_algorithm_for_level"); diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index a364075e9e3..f6dd79cadc2 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -134,33 +134,18 @@ extern census_get_trace_record_type census_get_trace_record_import; typedef void(*census_trace_scan_end_type)(); extern census_trace_scan_end_type census_trace_scan_end_import; #define census_trace_scan_end census_trace_scan_end_import +typedef int32_t(*census_define_resource_type)(const uint8_t *resource_pb, size_t resource_pb_size); +extern census_define_resource_type census_define_resource_import; +#define census_define_resource census_define_resource_import +typedef void(*census_delete_resource_type)(int32_t resource_id); +extern census_delete_resource_type census_delete_resource_import; +#define census_delete_resource census_delete_resource_import +typedef int32_t(*census_resource_id_type)(const char *name); +extern census_resource_id_type census_resource_id_import; +#define census_resource_id census_resource_id_import typedef void(*census_record_values_type)(census_context *context, census_value *values, size_t nvalues); extern census_record_values_type census_record_values_import; #define census_record_values census_record_values_import -typedef census_view *(*census_view_create_type)(uint32_t metric_id, const census_context *tags, const census_aggregation *aggregations, size_t naggregations); -extern census_view_create_type census_view_create_import; -#define census_view_create census_view_create_import -typedef void(*census_view_delete_type)(census_view *view); -extern census_view_delete_type census_view_delete_import; -#define census_view_delete census_view_delete_import -typedef size_t(*census_view_metric_type)(const census_view *view); -extern census_view_metric_type census_view_metric_import; -#define census_view_metric census_view_metric_import -typedef size_t(*census_view_naggregations_type)(const census_view *view); -extern census_view_naggregations_type census_view_naggregations_import; -#define census_view_naggregations census_view_naggregations_import -typedef const census_context *(*census_view_tags_type)(const census_view *view); -extern census_view_tags_type census_view_tags_import; -#define census_view_tags census_view_tags_import -typedef const census_aggregation *(*census_view_aggregrations_type)(const census_view *view); -extern census_view_aggregrations_type census_view_aggregrations_import; -#define census_view_aggregrations census_view_aggregrations_import -typedef const census_view_data *(*census_view_get_data_type)(const census_view *view); -extern census_view_get_data_type census_view_get_data_import; -#define census_view_get_data census_view_get_data_import -typedef void(*census_view_reset_type)(census_view *view); -extern census_view_reset_type census_view_reset_import; -#define census_view_reset census_view_reset_import typedef int(*grpc_compression_algorithm_parse_type)(const char *name, size_t name_length, grpc_compression_algorithm *algorithm); extern grpc_compression_algorithm_parse_type grpc_compression_algorithm_parse_import; #define grpc_compression_algorithm_parse grpc_compression_algorithm_parse_import diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index d0f23f42ccc..c7d042d5657 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -243,6 +243,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/lb_policy/round_robin/round_robin.c', 'src/core/ext/resolver/dns/native/dns_resolver.c', 'src/core/ext/resolver/sockaddr/sockaddr_resolver.c', + 'src/core/ext/census/base_resources.c', 'src/core/ext/census/context.c', 'src/core/ext/census/gen/census.pb.c', 'src/core/ext/census/grpc_context.c', @@ -252,6 +253,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/census/mlog.c', 'src/core/ext/census/operation.c', 'src/core/ext/census/placeholders.c', + 'src/core/ext/census/resource.c', 'src/core/ext/census/tracing.c', 'src/core/plugin_registry/grpc_plugin_registry.c', 'src/boringssl/err_data.c', diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index 3b62984defa..5d0f565ea83 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -61,15 +61,10 @@ census_trace_print_type census_trace_print_import; census_trace_scan_start_type census_trace_scan_start_import; census_get_trace_record_type census_get_trace_record_import; census_trace_scan_end_type census_trace_scan_end_import; +census_define_resource_type census_define_resource_import; +census_delete_resource_type census_delete_resource_import; +census_resource_id_type census_resource_id_import; census_record_values_type census_record_values_import; -census_view_create_type census_view_create_import; -census_view_delete_type census_view_delete_import; -census_view_metric_type census_view_metric_import; -census_view_naggregations_type census_view_naggregations_import; -census_view_tags_type census_view_tags_import; -census_view_aggregrations_type census_view_aggregrations_import; -census_view_get_data_type census_view_get_data_import; -census_view_reset_type census_view_reset_import; grpc_compression_algorithm_parse_type grpc_compression_algorithm_parse_import; grpc_compression_algorithm_name_type grpc_compression_algorithm_name_import; grpc_compression_algorithm_for_level_type grpc_compression_algorithm_for_level_import; @@ -329,15 +324,10 @@ void grpc_rb_load_imports(HMODULE library) { census_trace_scan_start_import = (census_trace_scan_start_type) GetProcAddress(library, "census_trace_scan_start"); census_get_trace_record_import = (census_get_trace_record_type) GetProcAddress(library, "census_get_trace_record"); census_trace_scan_end_import = (census_trace_scan_end_type) GetProcAddress(library, "census_trace_scan_end"); + census_define_resource_import = (census_define_resource_type) GetProcAddress(library, "census_define_resource"); + census_delete_resource_import = (census_delete_resource_type) GetProcAddress(library, "census_delete_resource"); + census_resource_id_import = (census_resource_id_type) GetProcAddress(library, "census_resource_id"); census_record_values_import = (census_record_values_type) GetProcAddress(library, "census_record_values"); - census_view_create_import = (census_view_create_type) GetProcAddress(library, "census_view_create"); - census_view_delete_import = (census_view_delete_type) GetProcAddress(library, "census_view_delete"); - census_view_metric_import = (census_view_metric_type) GetProcAddress(library, "census_view_metric"); - census_view_naggregations_import = (census_view_naggregations_type) GetProcAddress(library, "census_view_naggregations"); - census_view_tags_import = (census_view_tags_type) GetProcAddress(library, "census_view_tags"); - census_view_aggregrations_import = (census_view_aggregrations_type) GetProcAddress(library, "census_view_aggregrations"); - census_view_get_data_import = (census_view_get_data_type) GetProcAddress(library, "census_view_get_data"); - census_view_reset_import = (census_view_reset_type) GetProcAddress(library, "census_view_reset"); grpc_compression_algorithm_parse_import = (grpc_compression_algorithm_parse_type) GetProcAddress(library, "grpc_compression_algorithm_parse"); grpc_compression_algorithm_name_import = (grpc_compression_algorithm_name_type) GetProcAddress(library, "grpc_compression_algorithm_name"); grpc_compression_algorithm_for_level_import = (grpc_compression_algorithm_for_level_type) GetProcAddress(library, "grpc_compression_algorithm_for_level"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index 1428e6d71c3..4033e5e6263 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -134,33 +134,18 @@ extern census_get_trace_record_type census_get_trace_record_import; typedef void(*census_trace_scan_end_type)(); extern census_trace_scan_end_type census_trace_scan_end_import; #define census_trace_scan_end census_trace_scan_end_import +typedef int32_t(*census_define_resource_type)(const uint8_t *resource_pb, size_t resource_pb_size); +extern census_define_resource_type census_define_resource_import; +#define census_define_resource census_define_resource_import +typedef void(*census_delete_resource_type)(int32_t resource_id); +extern census_delete_resource_type census_delete_resource_import; +#define census_delete_resource census_delete_resource_import +typedef int32_t(*census_resource_id_type)(const char *name); +extern census_resource_id_type census_resource_id_import; +#define census_resource_id census_resource_id_import typedef void(*census_record_values_type)(census_context *context, census_value *values, size_t nvalues); extern census_record_values_type census_record_values_import; #define census_record_values census_record_values_import -typedef census_view *(*census_view_create_type)(uint32_t metric_id, const census_context *tags, const census_aggregation *aggregations, size_t naggregations); -extern census_view_create_type census_view_create_import; -#define census_view_create census_view_create_import -typedef void(*census_view_delete_type)(census_view *view); -extern census_view_delete_type census_view_delete_import; -#define census_view_delete census_view_delete_import -typedef size_t(*census_view_metric_type)(const census_view *view); -extern census_view_metric_type census_view_metric_import; -#define census_view_metric census_view_metric_import -typedef size_t(*census_view_naggregations_type)(const census_view *view); -extern census_view_naggregations_type census_view_naggregations_import; -#define census_view_naggregations census_view_naggregations_import -typedef const census_context *(*census_view_tags_type)(const census_view *view); -extern census_view_tags_type census_view_tags_import; -#define census_view_tags census_view_tags_import -typedef const census_aggregation *(*census_view_aggregrations_type)(const census_view *view); -extern census_view_aggregrations_type census_view_aggregrations_import; -#define census_view_aggregrations census_view_aggregrations_import -typedef const census_view_data *(*census_view_get_data_type)(const census_view *view); -extern census_view_get_data_type census_view_get_data_import; -#define census_view_get_data census_view_get_data_import -typedef void(*census_view_reset_type)(census_view *view); -extern census_view_reset_type census_view_reset_import; -#define census_view_reset census_view_reset_import typedef int(*grpc_compression_algorithm_parse_type)(const char *name, size_t name_length, grpc_compression_algorithm *algorithm); extern grpc_compression_algorithm_parse_type grpc_compression_algorithm_parse_import; #define grpc_compression_algorithm_parse grpc_compression_algorithm_parse_import diff --git a/test/core/census/README b/test/core/census/README new file mode 100644 index 00000000000..d5363b72333 --- /dev/null +++ b/test/core/census/README @@ -0,0 +1,7 @@ +Test source and data files for Census. + +binary proto files (*.pb) in data directory are generated from the *.txt file, +via: + +BASE="filename" +cat $BASE.txt | protoc --encode=google.census.Resource census.proto > $BASE.pb diff --git a/test/core/census/data/resource_empty_name.pb b/test/core/census/data/resource_empty_name.pb new file mode 100644 index 00000000000..4d547445fae --- /dev/null +++ b/test/core/census/data/resource_empty_name.pb @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/core/census/data/resource_empty_name.txt b/test/core/census/data/resource_empty_name.txt new file mode 100644 index 00000000000..271fd3274c2 --- /dev/null +++ b/test/core/census/data/resource_empty_name.txt @@ -0,0 +1,5 @@ +# Name is present, but empty. +name : '' +unit { + numerator : SECS +} diff --git a/test/core/census/data/resource_full.pb b/test/core/census/data/resource_full.pb new file mode 100644 index 00000000000..e4c6a2aef53 --- /dev/null +++ b/test/core/census/data/resource_full.pb @@ -0,0 +1,2 @@ + + full_resource"A resource with everything defined \ No newline at end of file diff --git a/test/core/census/data/resource_full.txt b/test/core/census/data/resource_full.txt new file mode 100644 index 00000000000..1aa2fafe3a4 --- /dev/null +++ b/test/core/census/data/resource_full.txt @@ -0,0 +1,9 @@ +# A full resource definition - all fields filled out. +name : 'full_resource' +description : 'A resource with everything defined' +unit { + # Megabits per second. + prefix : 6 + numerator : BITS + denominator : SECS +} diff --git a/test/core/census/data/resource_minimal_good.pb b/test/core/census/data/resource_minimal_good.pb new file mode 100644 index 00000000000..7100c462bf1 --- /dev/null +++ b/test/core/census/data/resource_minimal_good.pb @@ -0,0 +1,2 @@ + + minimal_good \ No newline at end of file diff --git a/test/core/census/data/resource_minimal_good.txt b/test/core/census/data/resource_minimal_good.txt new file mode 100644 index 00000000000..a7a7e71dd62 --- /dev/null +++ b/test/core/census/data/resource_minimal_good.txt @@ -0,0 +1,5 @@ +# A minimal "good" Resource definition: has a name and numerator/unit. +name : 'minimal_good' +unit { + numerator : SECS +} diff --git a/test/core/census/data/resource_no_name.pb b/test/core/census/data/resource_no_name.pb new file mode 100644 index 00000000000..4d547445fae --- /dev/null +++ b/test/core/census/data/resource_no_name.pb @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/test/core/census/data/resource_no_name.txt b/test/core/census/data/resource_no_name.txt new file mode 100644 index 00000000000..8f12a91d35e --- /dev/null +++ b/test/core/census/data/resource_no_name.txt @@ -0,0 +1,4 @@ +# The minimal good Resource without a name. +unit { + numerator : SECS +} diff --git a/test/core/census/data/resource_no_numerator.pb b/test/core/census/data/resource_no_numerator.pb new file mode 100644 index 00000000000..2a5cceee70c --- /dev/null +++ b/test/core/census/data/resource_no_numerator.pb @@ -0,0 +1,2 @@ + +resource_no_numeratorýÿÿÿÿÿÿÿÿ \ No newline at end of file diff --git a/test/core/census/data/resource_no_numerator.txt b/test/core/census/data/resource_no_numerator.txt new file mode 100644 index 00000000000..fc1fec74a24 --- /dev/null +++ b/test/core/census/data/resource_no_numerator.txt @@ -0,0 +1,6 @@ +# Resource without a numerator +name : 'resource_no_numerator' +unit { + prefix : -3 + denominator : SECS +} diff --git a/test/core/census/data/resource_no_unit.pb b/test/core/census/data/resource_no_unit.pb new file mode 100644 index 00000000000..9dca2620e0a --- /dev/null +++ b/test/core/census/data/resource_no_unit.pb @@ -0,0 +1,2 @@ + +resource_no_unit \ No newline at end of file diff --git a/test/core/census/data/resource_no_unit.txt b/test/core/census/data/resource_no_unit.txt new file mode 100644 index 00000000000..c5d5115cebf --- /dev/null +++ b/test/core/census/data/resource_no_unit.txt @@ -0,0 +1,2 @@ +# The minimal good resource without a unit +name : 'resource_no_unit' diff --git a/test/core/census/resource_test.c b/test/core/census/resource_test.c new file mode 100644 index 00000000000..bfb76bcfb5e --- /dev/null +++ b/test/core/census/resource_test.c @@ -0,0 +1,157 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/ext/census/resource.h" +#include +#include +#include +#include +#include +#include +#include +#include "src/core/ext/census/base_resources.h" +#include "test/core/util/test_config.h" + +// Test all the functionality for dealing with Resources. + +// Just startup and shutdown resources subsystem. +static void test_enable_disable() { + initialize_resources(); + shutdown_resources(); +} + +// A blank/empty initialization should not work. +static void test_empty_definition() { + initialize_resources(); + int32_t rid = census_define_resource(NULL, 0); + GPR_ASSERT(rid == -1); + uint8_t buffer[50] = {0}; + rid = census_define_resource(buffer, 50); + GPR_ASSERT(rid == -1); + shutdown_resources(); +} + +// Given a file name, read raw proto and define the resource included within. +// Returns resource id from census_define_resource(). +static int32_t define_resource_from_file(const char *file) { + const size_t buf_size = 512; + uint8_t buffer[buf_size]; + FILE *input = fopen(file, "r"); + GPR_ASSERT(input != NULL); + size_t nbytes = fread(buffer, 1, buf_size, input); + GPR_ASSERT(nbytes != 0 && nbytes < buf_size); + int32_t rid = census_define_resource(buffer, nbytes); + GPR_ASSERT(fclose(input) == 0); + return rid; +} + +// Test definition of a single resource, using a proto read from a file. The +// `succeed` parameter indicates whether we expect the definition to succeed or +// fail. `name` is used to check that the returned resource can be looked up by +// name. +static void test_define_single_resource(const char *file, const char *name, + bool succeed) { + gpr_log(GPR_INFO, "Test defining resource \"%s\"\n", name); + initialize_resources(); + int32_t rid = define_resource_from_file(file); + if (succeed) { + GPR_ASSERT(rid >= 0); + int32_t rid2 = census_resource_id(name); + GPR_ASSERT(rid == rid2); + } else { + GPR_ASSERT(rid < 0); + } + shutdown_resources(); +} + +// Try deleting various resources (both those that exist and those that don't). +static void test_delete_resource() { + initialize_resources(); + // Try deleting resource before any are defined. + census_delete_resource(0); + // Create and check a couple of resources. + int32_t rid1 = define_resource_from_file( + "test/core/census/data/resource_minimal_good.pb"); + int32_t rid2 = + define_resource_from_file("test/core/census/data/resource_full.pb"); + GPR_ASSERT(rid1 >= 0 && rid2 >= 0 && rid1 != rid2); + int32_t rid3 = census_resource_id("minimal_good"); + int32_t rid4 = census_resource_id("full_resource"); + GPR_ASSERT(rid1 == rid3 && rid2 == rid4); + // Try deleting non-existant resources. + census_delete_resource(-1); + census_delete_resource(rid1 + rid2 + 1); + census_delete_resource(10000000); + // Delete one of the previously defined resources and check for deletion. + census_delete_resource(rid1); + rid3 = census_resource_id("minimal_good"); + GPR_ASSERT(rid3 < 0); + // Check that re-adding works. + rid1 = define_resource_from_file( + "test/core/census/data/resource_minimal_good.pb"); + GPR_ASSERT(rid1 >= 0); + rid3 = census_resource_id("minimal_good"); + GPR_ASSERT(rid1 == rid3); + shutdown_resources(); +} + +// Test define base resources. +static void test_base_resources() { + initialize_resources(); + define_base_resources(); + int32_t rid1 = census_resource_id("client_rpc_latency"); + int32_t rid2 = census_resource_id("server_rpc_latency"); + GPR_ASSERT(rid1 >= 0 && rid2 >= 0 && rid1 != rid2); + shutdown_resources(); +} + +int main(int argc, char **argv) { + grpc_test_init(argc, argv); + test_enable_disable(); + test_empty_definition(); + test_define_single_resource("test/core/census/data/resource_minimal_good.pb", + "minimal_good", true); + test_define_single_resource("test/core/census/data/resource_full.pb", + "full_resource", true); + test_define_single_resource("test/core/census/data/resource_no_name.pb", + "resource_no_name", false); + test_define_single_resource("test/core/census/data/resource_no_numerator.pb", + "resource_no_numerator", false); + test_define_single_resource("test/core/census/data/resource_no_unit.pb", + "resource_no_unit", false); + test_define_single_resource("test/core/census/data/resource_empty_name.pb", + "resource_empty_name", false); + test_delete_resource(); + test_base_resources(); + return 0; +} diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 7446fec8244..51007a5da96 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -932,11 +932,13 @@ third_party/nanopb/pb_common.h \ third_party/nanopb/pb_decode.h \ third_party/nanopb/pb_encode.h \ src/core/ext/census/aggregation.h \ +src/core/ext/census/base_resources.h \ src/core/ext/census/census_interface.h \ src/core/ext/census/census_rpc_stats.h \ src/core/ext/census/gen/census.pb.h \ src/core/ext/census/grpc_filter.h \ src/core/ext/census/mlog.h \ +src/core/ext/census/resource.h \ src/core/ext/census/rpc_metric_id.h \ src/core/lib/surface/init.c \ src/core/lib/channel/channel_args.c \ @@ -1105,6 +1107,7 @@ src/core/ext/lb_policy/pick_first/pick_first.c \ src/core/ext/lb_policy/round_robin/round_robin.c \ src/core/ext/resolver/dns/native/dns_resolver.c \ src/core/ext/resolver/sockaddr/sockaddr_resolver.c \ +src/core/ext/census/base_resources.c \ src/core/ext/census/context.c \ src/core/ext/census/gen/census.pb.c \ src/core/ext/census/grpc_context.c \ @@ -1114,6 +1117,7 @@ src/core/ext/census/initialize.c \ src/core/ext/census/mlog.c \ src/core/ext/census/operation.c \ src/core/ext/census/placeholders.c \ +src/core/ext/census/resource.c \ src/core/ext/census/tracing.c \ src/core/plugin_registry/grpc_plugin_registry.c \ include/grpc/support/alloc.h \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index e0471234954..28f54e7c9e2 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -109,6 +109,22 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "census_resource_test", + "src": [ + "test/core/census/resource_test.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", @@ -5296,11 +5312,13 @@ "headers": [ "include/grpc/census.h", "src/core/ext/census/aggregation.h", + "src/core/ext/census/base_resources.h", "src/core/ext/census/census_interface.h", "src/core/ext/census/census_rpc_stats.h", "src/core/ext/census/gen/census.pb.h", "src/core/ext/census/grpc_filter.h", "src/core/ext/census/mlog.h", + "src/core/ext/census/resource.h", "src/core/ext/census/rpc_metric_id.h" ], "language": "c", @@ -5308,6 +5326,8 @@ "src": [ "include/grpc/census.h", "src/core/ext/census/aggregation.h", + "src/core/ext/census/base_resources.c", + "src/core/ext/census/base_resources.h", "src/core/ext/census/census_interface.h", "src/core/ext/census/census_rpc_stats.h", "src/core/ext/census/context.c", @@ -5322,6 +5342,8 @@ "src/core/ext/census/mlog.h", "src/core/ext/census/operation.c", "src/core/ext/census/placeholders.c", + "src/core/ext/census/resource.c", + "src/core/ext/census/resource.h", "src/core/ext/census/rpc_metric_id.h", "src/core/ext/census/tracing.c" ], diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 850f9474aec..a1946d27cf8 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -127,6 +127,27 @@ "windows" ] }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "census_resource_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index be8b5d40ace..d94a43501e0 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -180,6 +180,17 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "census_context_test", "vcxp {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "census_resource_test", "vcxproj\test\census_resource_test\census_resource_test.vcxproj", "{18CF99B5-3C61-EC3D-9509-3C95334C3B88}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "channel_create_test", "vcxproj\test\channel_create_test\channel_create_test.vcxproj", "{AFC88484-3A2E-32BC-25B2-23DF741D4F3D}" ProjectSection(myProperties) = preProject lib = "False" @@ -1707,6 +1718,22 @@ Global {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Release-DLL|Win32.Build.0 = Release|Win32 {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Release-DLL|x64.ActiveCfg = Release|x64 {5C1CFC2D-AF3C-D7CB-BA74-D267E91CBC73}.Release-DLL|x64.Build.0 = Release|x64 + {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug|Win32.ActiveCfg = Debug|Win32 + {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug|x64.ActiveCfg = Debug|x64 + {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release|Win32.ActiveCfg = Release|Win32 + {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release|x64.ActiveCfg = Release|x64 + {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug|Win32.Build.0 = Debug|Win32 + {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug|x64.Build.0 = Debug|x64 + {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release|Win32.Build.0 = Release|Win32 + {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release|x64.Build.0 = Release|x64 + {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Debug-DLL|x64.Build.0 = Debug|x64 + {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release-DLL|Win32.Build.0 = Release|Win32 + {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release-DLL|x64.ActiveCfg = Release|x64 + {18CF99B5-3C61-EC3D-9509-3C95334C3B88}.Release-DLL|x64.Build.0 = Release|x64 {AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Debug|Win32.ActiveCfg = Debug|Win32 {AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Debug|x64.ActiveCfg = Debug|x64 {AFC88484-3A2E-32BC-25B2-23DF741D4F3D}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 61a59e7c3f0..d5ac625eb22 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -441,11 +441,13 @@ + + @@ -783,6 +785,8 @@ + + @@ -801,6 +805,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 4bd436aa167..37b1f0993a8 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -502,6 +502,9 @@ src\core\ext\resolver\sockaddr + + src\core\ext\census + src\core\ext\census @@ -529,6 +532,9 @@ src\core\ext\census + + src\core\ext\census + src\core\ext\census @@ -1055,6 +1061,9 @@ src\core\ext\census + + src\core\ext\census + src\core\ext\census @@ -1070,6 +1079,9 @@ src\core\ext\census + + src\core\ext\census + src\core\ext\census diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index e29a275d5ab..5bb261486e9 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -405,11 +405,13 @@ + + @@ -685,6 +687,8 @@ + + @@ -703,6 +707,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index e5e4acc9a5d..3616227ac3e 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -409,6 +409,9 @@ src\core\ext\lb_policy\round_robin + + src\core\ext\census + src\core\ext\census @@ -436,6 +439,9 @@ src\core\ext\census + + src\core\ext\census + src\core\ext\census @@ -881,6 +887,9 @@ src\core\ext\census + + src\core\ext\census + src\core\ext\census @@ -896,6 +905,9 @@ src\core\ext\census + + src\core\ext\census + src\core\ext\census diff --git a/vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj b/vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj new file mode 100644 index 00000000000..c4fbd54e222 --- /dev/null +++ b/vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj @@ -0,0 +1,199 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {18CF99B5-3C61-EC3D-9509-3C95334C3B88} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + census_resource_test + static + Debug + static + Debug + + + census_resource_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj.filters b/vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj.filters new file mode 100644 index 00000000000..93faac55d07 --- /dev/null +++ b/vsprojects/vcxproj/test/census_resource_test/census_resource_test.vcxproj.filters @@ -0,0 +1,21 @@ + + + + + test\core\census + + + + + + {313aad4e-d33b-88c5-7d94-e04a4cb0c912} + + + {ff2d74ef-228a-1739-7fa7-7dccbec5b0c5} + + + {4f529bd9-396f-027c-bc49-f9a6bbc97c72} + + + + From 6238e5bf40f5771b52a41fe7e6d1a755e91c9f01 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 2 Jun 2016 17:26:39 -0700 Subject: [PATCH 0845/1894] Fix bad return value --- src/core/lib/iomgr/socket_utils_common_posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index d1721c910c4..7e2fd9fccff 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -236,7 +236,7 @@ grpc_error *grpc_create_dualstack_socket(const struct sockaddr *addr, int type, /* If this isn't an IPv4 address, then return whatever we've got. */ if (!grpc_sockaddr_is_v4mapped(addr, NULL)) { *dsmode = GRPC_DSMODE_IPV6; - return GRPC_ERROR_NONE; + return *newfd >= 0 ? GRPC_ERROR_NONE : GRPC_OS_ERROR(errno, "socket"); } /* Fall back to AF_INET. */ if (*newfd >= 0) { From e5ee38d0cfce43e1f61d7ae7313ba314af25825c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 2 Jun 2016 17:31:33 -0700 Subject: [PATCH 0846/1894] Provide more context in error --- src/core/lib/iomgr/socket_utils_common_posix.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index 7e2fd9fccff..61d94d660cd 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -49,6 +49,7 @@ #include #include +#include #include #include #include @@ -216,6 +217,16 @@ static int set_socket_dualstack(int fd) { } } +static grpc_error *error_for_fd(int fd, const struct sockaddr *addr) { + if (fd >= 0) return GRPC_ERROR_NONE; + char *addr_str; + grpc_sockaddr_to_string(&addr_str, addr, 0); + grpc_error *err = grpc_error_set_str(GRPC_OS_ERROR(errno, "socket"), + GRPC_ERROR_STR_TARGET_ADDRESS, addr_str); + gpr_free(err); + return err; +} + grpc_error *grpc_create_dualstack_socket(const struct sockaddr *addr, int type, int protocol, grpc_dualstack_mode *dsmode, @@ -236,7 +247,7 @@ grpc_error *grpc_create_dualstack_socket(const struct sockaddr *addr, int type, /* If this isn't an IPv4 address, then return whatever we've got. */ if (!grpc_sockaddr_is_v4mapped(addr, NULL)) { *dsmode = GRPC_DSMODE_IPV6; - return *newfd >= 0 ? GRPC_ERROR_NONE : GRPC_OS_ERROR(errno, "socket"); + return error_for_fd(*newfd, addr); } /* Fall back to AF_INET. */ if (*newfd >= 0) { @@ -246,10 +257,7 @@ grpc_error *grpc_create_dualstack_socket(const struct sockaddr *addr, int type, } *dsmode = family == AF_INET ? GRPC_DSMODE_IPV4 : GRPC_DSMODE_NONE; *newfd = socket(family, type, protocol); - if (*newfd == -1) { - return GRPC_OS_ERROR(errno, "socket"); - } - return GRPC_ERROR_NONE; + return error_for_fd(*newfd, addr); } #endif From 82ec451c427c0275964ee444d11238b07efeb94d Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 2 Jun 2016 18:34:34 -0700 Subject: [PATCH 0847/1894] Check if optional_drop_message is an empty slice --- .../ext/transport/chttp2/transport/chttp2_transport.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 52ac895271e..d0c94e6c463 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1531,7 +1531,7 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, typedef struct { grpc_exec_ctx *exec_ctx; - gpr_slice optional_drop_message; + gpr_slice *optional_drop_message; } cancel_stream_cb_arg; static void cancel_stream_cb(grpc_chttp2_transport_global *transport_global, @@ -1539,12 +1539,15 @@ static void cancel_stream_cb(grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global) { cancel_stream_cb_arg *arg = user_data; cancel_from_api(arg->exec_ctx, transport_global, stream_global, - GRPC_STATUS_UNAVAILABLE, &arg->optional_drop_message); + GRPC_STATUS_UNAVAILABLE, arg->optional_drop_message); } static void end_all_the_calls(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) { - cancel_stream_cb_arg arg = {exec_ctx, t->optional_drop_message}; + cancel_stream_cb_arg arg = {exec_ctx, + GPR_SLICE_IS_EMPTY(t->optional_drop_message) + ? NULL + : &t->optional_drop_message}; grpc_chttp2_for_all_streams(&t->global, &arg, cancel_stream_cb); } @@ -1618,13 +1621,11 @@ static void reading_action_locked(grpc_exec_ctx *exec_ctx, static bool try_http_parsing(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) { - return false; grpc_http_parser parser; size_t i = 0; bool success = false; grpc_http_parser_init(&parser); - grpc_http1_trace = 1; for (; i < t->read_buffer.count && grpc_http_parser_parse(&parser, t->read_buffer.slices[i]); From 91630f72e718326b8ab018d6d52f9a3c0bddca47 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 2 Jun 2016 19:03:54 -0700 Subject: [PATCH 0848/1894] Remove __inline --- src/core/ext/transport/chttp2/transport/bin_decoder.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.c b/src/core/ext/transport/chttp2/transport/bin_decoder.c index b44560b2ebc..38b5e46949b 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.c +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.c @@ -62,7 +62,7 @@ static uint8_t decode_table[] = { static const uint8_t tail_xtra[4] = {0, 0, 1, 2}; -static __inline bool input_is_valid(uint8_t *input_ptr, size_t length) { +static bool input_is_valid(uint8_t *input_ptr, size_t length) { size_t i; for (i = 0; i < length; ++i) { From 020087035bbaea4f414a5bd25bb820fd52d5ec78 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 2 Jun 2016 21:40:45 -0700 Subject: [PATCH 0849/1894] Polished RR policy and added policy doc preamble --- .../ext/lb_policy/round_robin/round_robin.c | 40 +++++++++++++++---- test/core/client_config/lb_policies_test.c | 32 ++++++--------- 2 files changed, 45 insertions(+), 27 deletions(-) diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index dcdc0c62857..a73ab0a4a64 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -31,6 +31,34 @@ * */ +/** Round Robin Policy. + * + * This policy keeps: + * - A circular list of ready (connected) subchannels, the + * *readylist*. An empty readylist consists solely of its root (dummy) node. + * - A pointer to the last element picked from the readylist, the *lastpick*. + * Initially set to point to the readylist's root. + * + * Behavior: + * - When a subchannel connects, it's *prepended* to the readylist's root node. + * Ie, if readylist = A <-> B <-> ROOT <-> C + * ^ ^ + * |____________________| + * and subchannel D becomes connected, the addition of D to the readylist + * results in readylist = A <-> B <-> D <-> ROOT <-> C + * ^ ^ + * |__________________________| + * - When a subchannel disconnects, it's removed from the readylist. If the + * subchannel being removed was the most recently picked, the *lastpick* + * pointer moves to the removed node's previous element. Note that if the + * readylist only had one element, this is still legal, as the lastpick would + * point to the dummy root node, for an empty readylist. + * - Upon picking, *lastpick* is updated to point to the returned (connected) + * subchannel. Note that it possible that the selected subchannel becomes + * disconnected in the interim between the selection and the actual usage of + * the subchannel by the caller. + */ + #include #include @@ -173,9 +201,7 @@ static void remove_disconnected_sc_locked(round_robin_lb_policy *p, return; } if (node == p->ready_list_last_pick) { - /* If removing the lastly picked node, reset the last pick pointer to the - * dummy root of the list */ - p->ready_list_last_pick = &p->ready_list; + p->ready_list_last_pick = p->ready_list_last_pick->prev; } /* removing last item */ @@ -344,8 +370,8 @@ static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, *target = grpc_subchannel_get_connected_subchannel(selected->subchannel); if (grpc_lb_round_robin_trace) { gpr_log(GPR_DEBUG, - "[RR PICK] TARGET <-- CONNECTED SUBCHANNEL %p (NODE %p)", - selected->subchannel, selected); + "[RR PICK] TARGET <-- CONNECTED SUBCHANNEL %p (NODE %p)", *target, + selected); } /* only advance the last picked pointer if the selection was used */ advance_last_picked_locked(p); @@ -524,7 +550,7 @@ static void round_robin_factory_ref(grpc_lb_policy_factory *factory) {} static void round_robin_factory_unref(grpc_lb_policy_factory *factory) {} -static grpc_lb_policy *create_round_robin(grpc_exec_ctx *exec_ctx, +static grpc_lb_policy *round_robin_create(grpc_exec_ctx *exec_ctx, grpc_lb_policy_factory *factory, grpc_lb_policy_args *args) { GPR_ASSERT(args->addresses != NULL); @@ -580,7 +606,7 @@ static grpc_lb_policy *create_round_robin(grpc_exec_ctx *exec_ctx, } static const grpc_lb_policy_factory_vtable round_robin_factory_vtable = { - round_robin_factory_ref, round_robin_factory_unref, create_round_robin, + round_robin_factory_ref, round_robin_factory_unref, round_robin_create, "round_robin"}; static grpc_lb_policy_factory round_robin_lb_policy_factory = { diff --git a/test/core/client_config/lb_policies_test.c b/test/core/client_config/lb_policies_test.c index 2ec46124a89..786f0b39b27 100644 --- a/test/core/client_config/lb_policies_test.c +++ b/test/core/client_config/lb_policies_test.c @@ -640,7 +640,7 @@ static void print_failed_expectations(const int *expected_connection_sequence, const size_t num_iters) { size_t i; for (i = 0; i < num_iters; i++) { - gpr_log(GPR_ERROR, "FAILURE: Iter, expected, actual:%d (%d, %d)", i, + gpr_log(GPR_ERROR, "FAILURE: Iter (expected, actual): %d (%d, %d)", i, expected_connection_sequence[i % expected_seq_length], actual_connection_sequence[i]); } @@ -664,8 +664,6 @@ static void verify_vanilla_round_robin(const servers_fixture *f, const int actual = actual_connection_sequence[i]; const int expected = expected_connection_sequence[i % expected_seq_length]; if (actual != expected) { - gpr_log(GPR_ERROR, "FAILURE: expected %d, actual %d at iter %d", expected, - actual, i); print_failed_expectations(expected_connection_sequence, actual_connection_sequence, expected_seq_length, num_iters); @@ -692,24 +690,21 @@ static void verify_vanishing_floor_round_robin( memcpy(expected_connection_sequence, actual_connection_sequence + 2, expected_seq_length * sizeof(int)); - /* first three elements of the sequence should be [<1st>, -1] */ - if (actual_connection_sequence[0] != expected_connection_sequence[0]) { - gpr_log(GPR_ERROR, "FAILURE: expected %d, actual %d at iter %d", - expected_connection_sequence[0], actual_connection_sequence[0], 0); - print_failed_expectations(expected_connection_sequence, - actual_connection_sequence, expected_seq_length, - 1u); - abort(); - } - + /* first two elements of the sequence should be [0 (1st server), -1 (failure)] + */ + GPR_ASSERT(actual_connection_sequence[0] == 0); GPR_ASSERT(actual_connection_sequence[1] == -1); + /* the next two element must be [3, 0], repeating from that point: the 3 is + * brought forth by servers 1 and 2 disappearing after the intial pick of 0 */ + GPR_ASSERT(actual_connection_sequence[2] == 3); + GPR_ASSERT(actual_connection_sequence[3] == 0); + + /* make sure that the expectation obliges */ for (i = 2; i < num_iters; i++) { const int actual = actual_connection_sequence[i]; const int expected = expected_connection_sequence[i % expected_seq_length]; if (actual != expected) { - gpr_log(GPR_ERROR, "FAILURE: expected %d, actual %d at iter %d", expected, - actual, i); print_failed_expectations(expected_connection_sequence, actual_connection_sequence, expected_seq_length, num_iters); @@ -757,8 +752,6 @@ static void verify_partial_carnage_round_robin( const int actual = actual_connection_sequence[i]; const int expected = expected_connection_sequence[i % expected_seq_length]; if (actual != expected) { - gpr_log(GPR_ERROR, "FAILURE: expected %d, actual %d at iter %d", expected, - actual, i); print_failed_expectations(expected_connection_sequence, actual_connection_sequence, expected_seq_length, num_iters); @@ -856,8 +849,6 @@ static void verify_rebirth_round_robin(const servers_fixture *f, const int expected = expected_connection_sequence[j++ % expected_seq_length]; if (actual != expected) { - gpr_log(GPR_ERROR, "FAILURE: expected %d, actual %d at iter %d", expected, - actual, i); print_failed_expectations(expected_connection_sequence, actual_connection_sequence, expected_seq_length, num_iters); @@ -887,7 +878,8 @@ int main(int argc, char **argv) { GPR_ASSERT(grpc_lb_policy_create(&exec_ctx, NULL, NULL) == NULL); spec = test_spec_create(NUM_ITERS, NUM_SERVERS); - /* everything is fine, all servers stay up the whole time and life's peachy */ + /* everything is fine, all servers stay up the whole time and life's peachy + */ spec->verifier = verify_vanilla_round_robin; spec->description = "test_all_server_up"; run_spec(spec); From 8d8f9a891baebde4146f85f6c82d0372469f3b33 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 3 Jun 2016 08:49:11 -0700 Subject: [PATCH 0850/1894] Fix refcounting algorithm --- src/core/lib/transport/metadata.c | 39 +++++++++++++++---------------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/src/core/lib/transport/metadata.c b/src/core/lib/transport/metadata.c index 82c8e239f68..751305e5d7c 100644 --- a/src/core/lib/transport/metadata.c +++ b/src/core/lib/transport/metadata.c @@ -129,7 +129,10 @@ typedef struct mdtab_shard { internal_metadata **elems; size_t count; size_t capacity; - size_t free; + /** Estimate of the number of unreferenced mdelems in the hash table. + This will eventually converge to the exact number, but it's instantaneous + accuracy is not guaranteed */ + gpr_atm free_estimate; } mdtab_shard; #define LOG2_STRTAB_SHARD_COUNT 5 @@ -217,7 +220,7 @@ void grpc_mdctx_global_init(void) { mdtab_shard *shard = &g_mdtab_shard[i]; gpr_mu_init(&shard->mu); shard->count = 0; - shard->free = 0; + gpr_atm_no_barrier_store(&shard->free_estimate, 0); shard->capacity = INITIAL_MDTAB_CAPACITY; shard->elems = gpr_malloc(sizeof(*shard->elems) * shard->capacity); memset(shard->elems, 0, sizeof(*shard->elems) * shard->capacity); @@ -281,10 +284,8 @@ static void ref_md_locked(mdtab_shard *shard, grpc_mdstr_as_c_string((grpc_mdstr *)md->key), grpc_mdstr_as_c_string((grpc_mdstr *)md->value)); #endif - if (0 == gpr_atm_no_barrier_fetch_add(&md->refcnt, 2)) { - shard->free--; - } else { - GPR_ASSERT(1 != gpr_atm_no_barrier_fetch_add(&md->refcnt, -1)); + if (0 == gpr_atm_no_barrier_fetch_add(&md->refcnt, 1)) { + gpr_atm_no_barrier_fetch_add(&shard->free_estimate, -1); } } @@ -447,6 +448,7 @@ static void gc_mdtab(mdtab_shard *shard) { size_t i; internal_metadata **prev_next; internal_metadata *md, *next; + gpr_atm num_freed = 0; GPR_TIMER_BEGIN("gc_mdtab", 0); for (i = 0; i < shard->capacity; i++) { @@ -463,13 +465,14 @@ static void gc_mdtab(mdtab_shard *shard) { } gpr_free(md); *prev_next = next; - shard->free--; + num_freed++; shard->count--; } else { prev_next = &md->bucket_next; } } } + gpr_atm_no_barrier_fetch_add(&shard->free_estimate, -num_freed); GPR_TIMER_END("gc_mdtab", 0); } @@ -504,7 +507,8 @@ static void grow_mdtab(mdtab_shard *shard) { } static void rehash_mdtab(mdtab_shard *shard) { - if (shard->free > shard->capacity / 4) { + if ((size_t)gpr_atm_no_barrier_load(&shard->free_estimate) > + shard->capacity / 4) { gc_mdtab(shard); } else { grow_mdtab(shard); @@ -553,7 +557,7 @@ grpc_mdelem *grpc_mdelem_from_metadata_strings(grpc_mdstr *mkey, /* not found: create a new pair */ md = gpr_malloc(sizeof(internal_metadata)); - gpr_atm_rel_store(&md->refcnt, 2); + gpr_atm_rel_store(&md->refcnt, 1); md->key = key; md->value = value; md->user_data = 0; @@ -645,7 +649,7 @@ grpc_mdelem *grpc_mdelem_ref(grpc_mdelem *gmd DEBUG_ARGS) { this function - meaning that no adjustment to mdtab_free is necessary, simplifying the logic here to be just an atomic increment */ /* use C assert to have this removed in opt builds */ - assert(gpr_atm_no_barrier_load(&md->refcnt) >= 2); + assert(gpr_atm_no_barrier_load(&md->refcnt) >= 1); gpr_atm_no_barrier_fetch_add(&md->refcnt, 1); return gmd; } @@ -662,18 +666,13 @@ void grpc_mdelem_unref(grpc_mdelem *gmd DEBUG_ARGS) { grpc_mdstr_as_c_string((grpc_mdstr *)md->key), grpc_mdstr_as_c_string((grpc_mdstr *)md->value)); #endif - if (2 == gpr_atm_full_fetch_add(&md->refcnt, -1)) { - uint32_t hash = GRPC_MDSTR_KV_HASH(md->key->hash, md->value->hash); + uint32_t hash = GRPC_MDSTR_KV_HASH(md->key->hash, md->value->hash); + if (1 == gpr_atm_full_fetch_add(&md->refcnt, -1)) { + /* once the refcount hits zero, some other thread can come along and + free md at any time: it's unsafe from this point on to access it */ mdtab_shard *shard = &g_mdtab_shard[SHARD_IDX(hash, LOG2_MDTAB_SHARD_COUNT)]; - GPR_TIMER_BEGIN("grpc_mdelem_unref.to_zero", 0); - gpr_mu_lock(&shard->mu); - if (1 == gpr_atm_no_barrier_load(&md->refcnt)) { - shard->free++; - gpr_atm_no_barrier_store(&md->refcnt, 0); - } - gpr_mu_unlock(&shard->mu); - GPR_TIMER_END("grpc_mdelem_unref.to_zero", 0); + gpr_atm_no_barrier_fetch_add(&shard->free_estimate, 1); } } From f5f290459a04a4d5afb555e7b6d7ccb23646e427 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 3 Jun 2016 11:29:55 -0700 Subject: [PATCH 0851/1894] Fix up some server setup bugs --- .../ext/transport/chttp2/server/insecure/server_chttp2.c | 6 +++++- .../transport/chttp2/server/secure/server_secure_chttp2.c | 6 +++++- test/core/surface/server_test.c | 7 +++++++ 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index c06d3eb60ae..2bcb295a052 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -152,6 +152,11 @@ error: } port_num = 0; + const char *msg = grpc_error_string(err); + gpr_log(GPR_ERROR, "%s", msg); + grpc_error_free_string(msg); + GRPC_ERROR_UNREF(err); + done: grpc_exec_ctx_finish(&exec_ctx); if (errors != NULL) { @@ -159,7 +164,6 @@ done: GRPC_ERROR_UNREF(errors[i]); } } - GRPC_ERROR_UNREF(err); gpr_free(errors); return port_num; } diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 2a50dd4c159..77947b52ab6 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -188,7 +188,11 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, 3, (server, addr, creds)); /* create security context */ - if (creds == NULL) goto error; + if (creds == NULL) { + err = GRPC_ERROR_CREATE( + "No credentials specified for secure server port (creds==NULL)"); + goto error; + } status = grpc_server_credentials_create_security_connector(creds, &sc); if (status != GRPC_SECURITY_OK) { char *msg; diff --git a/test/core/surface/server_test.c b/test/core/surface/server_test.c index 1e94c5a41b4..e9bc3772d98 100644 --- a/test/core/surface/server_test.c +++ b/test/core/surface/server_test.c @@ -32,9 +32,11 @@ */ #include +#include #include #include #include +#include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" @@ -86,8 +88,13 @@ void test_bind_server_twice(void) { gpr_asprintf(&addr, "[::]:%d", port); grpc_server_register_completion_queue(server1, cq, NULL); grpc_server_register_completion_queue(server2, cq, NULL); + GPR_ASSERT(0 == grpc_server_add_secure_http2_port(server2, addr, NULL)); GPR_ASSERT(port == grpc_server_add_insecure_http2_port(server1, addr)); GPR_ASSERT(0 == grpc_server_add_insecure_http2_port(server2, addr)); + grpc_server_credentials *fake_creds = + grpc_fake_transport_security_server_credentials_create(); + GPR_ASSERT(0 == grpc_server_add_secure_http2_port(server2, addr, fake_creds)); + grpc_server_credentials_release(fake_creds); grpc_server_shutdown_and_notify(server1, cq, NULL); grpc_server_shutdown_and_notify(server2, cq, NULL); grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_MONOTONIC), NULL); From 115ae4004ca40835202138a8a295c796a4762f7e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 3 Jun 2016 12:00:05 -0700 Subject: [PATCH 0852/1894] Add some tests --- test/core/surface/server_test.c | 58 +++++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/test/core/surface/server_test.c b/test/core/surface/server_test.c index e9bc3772d98..02eb432e2d2 100644 --- a/test/core/surface/server_test.c +++ b/test/core/surface/server_test.c @@ -34,8 +34,10 @@ #include #include #include +#include #include #include +#include "src/core/lib/iomgr/resolve_address.h" #include "src/core/lib/security/credentials/fake/fake_credentials.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" @@ -105,12 +107,68 @@ void test_bind_server_twice(void) { gpr_free(addr); } +void test_bind_server_to_addr(const char *host, bool secure) { + int port = grpc_pick_unused_port_or_die(); + char *addr; + gpr_join_host_port(&addr, host, port); + gpr_log(GPR_INFO, "Test bind to %s", addr); + + grpc_server *server = grpc_server_create(NULL, NULL); + if (secure) { + grpc_server_credentials *fake_creds = + grpc_fake_transport_security_server_credentials_create(); + GPR_ASSERT(grpc_server_add_secure_http2_port(server, addr, fake_creds)); + grpc_server_credentials_release(fake_creds); + } else { + GPR_ASSERT(grpc_server_add_insecure_http2_port(server, addr)); + } + grpc_completion_queue *cq = grpc_completion_queue_create(NULL); + grpc_server_register_completion_queue(server, cq, NULL); + grpc_server_start(server); + grpc_server_shutdown_and_notify(server, cq, NULL); + grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_MONOTONIC), NULL); + grpc_server_destroy(server); + grpc_completion_queue_destroy(cq); + gpr_free(addr); +} + +static int external_dns_works(const char *host) { + grpc_resolved_addresses *res; + grpc_error *error = grpc_blocking_resolve_address(host, "80", &res); + GRPC_ERROR_UNREF(error); + if (res != NULL) { + grpc_resolved_addresses_destroy(res); + return 1; + } + return 0; +} + +static void test_bind_server_to_addrs(const char **addrs, size_t n) { + for (size_t i = 0; i < n; i++) { + test_bind_server_to_addr(addrs[i], false); + test_bind_server_to_addr(addrs[i], true); + } +} + int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); test_register_method_fail(); test_request_call_on_no_server_cq(); test_bind_server_twice(); + + static const char *addrs[] = { + "::1", "127.0.0.1", "::ffff:127.0.0.1", "localhost", "0.0.0.0", "::", + }; + test_bind_server_to_addrs(addrs, GPR_ARRAY_SIZE(addrs)); + + if (external_dns_works("loopback46.unittest.grpc.io")) { + static const char *dns_addrs[] = { + "loopback46.unittest.grpc.io", "loopback4.unittest.grpc.io", + }; + test_bind_server_to_addrs(dns_addrs, GPR_ARRAY_SIZE(dns_addrs)); + } + grpc_shutdown(); return 0; } From 7a97fe2c10e5b55c5f28f7031c2c67fc47581e09 Mon Sep 17 00:00:00 2001 From: Alistair Veitch Date: Fri, 3 Jun 2016 12:10:45 -0700 Subject: [PATCH 0853/1894] use macro rather than constant in array size --- test/core/census/resource_test.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/core/census/resource_test.c b/test/core/census/resource_test.c index bfb76bcfb5e..1375d56a6bc 100644 --- a/test/core/census/resource_test.c +++ b/test/core/census/resource_test.c @@ -64,12 +64,12 @@ static void test_empty_definition() { // Given a file name, read raw proto and define the resource included within. // Returns resource id from census_define_resource(). static int32_t define_resource_from_file(const char *file) { - const size_t buf_size = 512; - uint8_t buffer[buf_size]; +#define BUF_SIZE 512 + uint8_t buffer[BUF_SIZE]; FILE *input = fopen(file, "r"); GPR_ASSERT(input != NULL); - size_t nbytes = fread(buffer, 1, buf_size, input); - GPR_ASSERT(nbytes != 0 && nbytes < buf_size); + size_t nbytes = fread(buffer, 1, BUF_SIZE, input); + GPR_ASSERT(nbytes != 0 && nbytes < BUF_SIZE); int32_t rid = census_define_resource(buffer, nbytes); GPR_ASSERT(fclose(input) == 0); return rid; From fd3857bbff5b87c74b0aa8d299638960d2122759 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 3 Jun 2016 12:24:03 -0700 Subject: [PATCH 0854/1894] fix propagation of make options under docker --- tools/run_tests/run_tests.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 0a5625c3f5b..f7282dddb85 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -254,9 +254,7 @@ class CLanguage(object): def _compiler_options(self, use_docker, compiler): """Returns docker distro and make options to use for given compiler.""" - if _is_use_docker_child(): - return ("already_under_docker", []) - if not use_docker: + if not use_docker and not _is_use_docker_child(): _check_compiler(compiler, ['default']) if compiler == 'gcc4.9' or compiler == 'default': From 23bb526710e5c95b121908835703525709325ee0 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 3 Jun 2016 13:12:30 -0700 Subject: [PATCH 0855/1894] fixed typo --- src/core/ext/lb_policy/round_robin/round_robin.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index a73ab0a4a64..d7870992f7e 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -34,8 +34,8 @@ /** Round Robin Policy. * * This policy keeps: - * - A circular list of ready (connected) subchannels, the - * *readylist*. An empty readylist consists solely of its root (dummy) node. + * - A circular list of ready (connected) subchannels, the *readylist*. An empty + * readylist consists solely of its root (dummy) node. * - A pointer to the last element picked from the readylist, the *lastpick*. * Initially set to point to the readylist's root. * @@ -54,7 +54,7 @@ * readylist only had one element, this is still legal, as the lastpick would * point to the dummy root node, for an empty readylist. * - Upon picking, *lastpick* is updated to point to the returned (connected) - * subchannel. Note that it possible that the selected subchannel becomes + * subchannel. Note that it's possible that the selected subchannel becomes * disconnected in the interim between the selection and the actual usage of * the subchannel by the caller. */ From 3623dc5cddaee5884c73c9e5c79f80f25e7d3dbe Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 3 Jun 2016 13:41:46 -0700 Subject: [PATCH 0856/1894] Move protobuf dependencies to config_protobuf.h --- .../reflection/proto_server_reflection.cc | 27 +++++++------------ .../reflection/proto_server_reflection.h | 6 ++--- include/grpc++/impl/codegen/config_protobuf.h | 22 +++++++++++++++ src/compiler/config.h | 18 +------------ 4 files changed, 34 insertions(+), 39 deletions(-) diff --git a/extensions/reflection/proto_server_reflection.cc b/extensions/reflection/proto_server_reflection.cc index fe4564ab723..e41c67cdbcf 100644 --- a/extensions/reflection/proto_server_reflection.cc +++ b/extensions/reflection/proto_server_reflection.cc @@ -37,21 +37,12 @@ #include #include -#include -#include #include #include "reflection/proto_server_reflection.h" using grpc::Status; using grpc::StatusCode; -using google::protobuf::MethodDescriptor; -using google::protobuf::ServiceDescriptor; -using google::protobuf::Descriptor; -using google::protobuf::FileDescriptor; -using google::protobuf::FieldDescriptor; -using google::protobuf::DescriptorPool; -using google::protobuf::FileDescriptorProto; using grpc::reflection::v1alpha::ServerReflectionRequest; using grpc::reflection::v1alpha::ExtensionRequest; using grpc::reflection::v1alpha::ServerReflectionResponse; @@ -64,7 +55,7 @@ using grpc::reflection::v1alpha::FileDescriptorResponse; namespace grpc { ProtoServerReflection::ProtoServerReflection() - : descriptor_pool_(DescriptorPool::generated_pool()) {} + : descriptor_pool_(protobuf::DescriptorPool::generated_pool()) {} void ProtoServerReflection::SetServiceList( const std::vector* services) { @@ -143,7 +134,7 @@ Status ProtoServerReflection::GetFileByName( return Status::CANCELLED; } - const FileDescriptor* file_desc = descriptor_pool_->FindFileByName(filename); + const protobuf::FileDescriptor* file_desc = descriptor_pool_->FindFileByName(filename); if (file_desc == nullptr) { return Status(StatusCode::NOT_FOUND, "File not found."); } @@ -159,7 +150,7 @@ Status ProtoServerReflection::GetFileContainingSymbol( return Status::CANCELLED; } - const FileDescriptor* file_desc = + const protobuf::FileDescriptor* file_desc = descriptor_pool_->FindFileContainingSymbol(symbol); if (file_desc == nullptr) { return Status(StatusCode::NOT_FOUND, "Symbol not found."); @@ -176,13 +167,13 @@ Status ProtoServerReflection::GetFileContainingExtension( return Status::CANCELLED; } - const Descriptor* desc = + const protobuf::Descriptor* desc = descriptor_pool_->FindMessageTypeByName(request->containing_type()); if (desc == nullptr) { return Status(StatusCode::NOT_FOUND, "Type not found."); } - const FieldDescriptor* field_desc = descriptor_pool_->FindExtensionByNumber( + const protobuf::FieldDescriptor* field_desc = descriptor_pool_->FindExtensionByNumber( desc, request->extension_number()); if (field_desc == nullptr) { return Status(StatusCode::NOT_FOUND, "Extension not found."); @@ -199,12 +190,12 @@ Status ProtoServerReflection::GetAllExtensionNumbers( return Status::CANCELLED; } - const Descriptor* desc = descriptor_pool_->FindMessageTypeByName(type); + const protobuf::Descriptor* desc = descriptor_pool_->FindMessageTypeByName(type); if (desc == nullptr) { return Status(StatusCode::NOT_FOUND, "Type not found."); } - std::vector extensions; + std::vector extensions; descriptor_pool_->FindAllExtensions(desc, &extensions); for (auto extension : extensions) { response->add_extension_number(extension->number()); @@ -214,14 +205,14 @@ Status ProtoServerReflection::GetAllExtensionNumbers( } void ProtoServerReflection::FillFileDescriptorResponse( - const FileDescriptor* file_desc, ServerReflectionResponse* response, + const protobuf::FileDescriptor* file_desc, ServerReflectionResponse* response, std::unordered_set* seen_files) { if (seen_files->find(file_desc->name()) != seen_files->end()) { return; } seen_files->insert(file_desc->name()); - FileDescriptorProto file_desc_proto; + protobuf::FileDescriptorProto file_desc_proto; grpc::string data; file_desc->CopyTo(&file_desc_proto); file_desc_proto.SerializeToString(&data); diff --git a/extensions/reflection/proto_server_reflection.h b/extensions/reflection/proto_server_reflection.h index d288b73d928..f9b98c5fb3a 100644 --- a/extensions/reflection/proto_server_reflection.h +++ b/extensions/reflection/proto_server_reflection.h @@ -40,8 +40,6 @@ #include #include -#include -#include #include #include @@ -83,14 +81,14 @@ class ProtoServerReflection GRPC_FINAL reflection::v1alpha::ExtensionNumberResponse* response); void FillFileDescriptorResponse( - const google::protobuf::FileDescriptor* file_desc, + const protobuf::FileDescriptor* file_desc, reflection::v1alpha::ServerReflectionResponse* response, std::unordered_set* seen_files); void FillErrorResponse(const Status& status, reflection::v1alpha::ErrorResponse* error_response); - const google::protobuf::DescriptorPool* descriptor_pool_; + const protobuf::DescriptorPool* descriptor_pool_; const std::vector* services_; }; diff --git a/include/grpc++/impl/codegen/config_protobuf.h b/include/grpc++/impl/codegen/config_protobuf.h index f1b6beaca73..4bee1bc4227 100644 --- a/include/grpc++/impl/codegen/config_protobuf.h +++ b/include/grpc++/impl/codegen/config_protobuf.h @@ -44,6 +44,19 @@ #define GRPC_CUSTOM_MESSAGE ::google::protobuf::Message #endif +#ifndef GRPC_CUSTOM_DESCRIPTOR +#include +#include +#define GRPC_CUSTOM_DESCRIPTOR ::google::protobuf::Descriptor +#define GRPC_CUSTOM_DESCRIPTORPOOL ::google::protobuf::DescriptorPool +#define GPRC_CUSTOM_FIELDDESCRIPTOR ::google::protobuf::FieldDescriptor +#define GRPC_CUSTOM_FILEDESCRIPTOR ::google::protobuf::FileDescriptor +#define GRPC_CUSTOM_FILEDESCRIPTORPROTO ::google::protobuf::FileDescriptorProto +#define GRPC_CUSTOM_METHODDESCRIPTOR ::google::protobuf::MethodDescriptor +#define GRPC_CUSTOM_SERVICEDESCRIPTOR ::google::protobuf::ServiceDescriptor +#define GRPC_CUSTOM_SOURCELOCATION ::google::protobuf::SourceLocation +#endif + #ifndef GRPC_CUSTOM_ZEROCOPYOUTPUTSTREAM #include #include @@ -60,6 +73,15 @@ namespace protobuf { typedef GRPC_CUSTOM_MESSAGE Message; typedef GRPC_CUSTOM_PROTOBUF_INT64 int64; +typedef GRPC_CUSTOM_DESCRIPTOR Descriptor; +typedef GRPC_CUSTOM_DESCRIPTORPOOL DescriptorPool; +typedef GPRC_CUSTOM_FIELDDESCRIPTOR FieldDescriptor; +typedef GRPC_CUSTOM_FILEDESCRIPTOR FileDescriptor; +typedef GRPC_CUSTOM_FILEDESCRIPTORPROTO FileDescriptorProto; +typedef GRPC_CUSTOM_METHODDESCRIPTOR MethodDescriptor; +typedef GRPC_CUSTOM_SERVICEDESCRIPTOR ServiceDescriptor; +typedef GRPC_CUSTOM_SOURCELOCATION SourceLocation; + namespace io { typedef GRPC_CUSTOM_ZEROCOPYOUTPUTSTREAM ZeroCopyOutputStream; typedef GRPC_CUSTOM_ZEROCOPYINPUTSTREAM ZeroCopyInputStream; diff --git a/src/compiler/config.h b/src/compiler/config.h index d8b95818dbb..631adbc5c1b 100644 --- a/src/compiler/config.h +++ b/src/compiler/config.h @@ -37,17 +37,6 @@ #include #include -#ifndef GRPC_CUSTOM_DESCRIPTOR -#include -#include -#define GRPC_CUSTOM_DESCRIPTOR ::google::protobuf::Descriptor -#define GRPC_CUSTOM_FILEDESCRIPTOR ::google::protobuf::FileDescriptor -#define GRPC_CUSTOM_FILEDESCRIPTORPROTO ::google::protobuf::FileDescriptorProto -#define GRPC_CUSTOM_METHODDESCRIPTOR ::google::protobuf::MethodDescriptor -#define GRPC_CUSTOM_SERVICEDESCRIPTOR ::google::protobuf::ServiceDescriptor -#define GRPC_CUSTOM_SOURCELOCATION ::google::protobuf::SourceLocation -#endif - #ifndef GRPC_CUSTOM_CODEGENERATOR #include #define GRPC_CUSTOM_CODEGENERATOR ::google::protobuf::compiler::CodeGenerator @@ -77,12 +66,7 @@ namespace grpc { namespace protobuf { -typedef GRPC_CUSTOM_DESCRIPTOR Descriptor; -typedef GRPC_CUSTOM_FILEDESCRIPTOR FileDescriptor; -typedef GRPC_CUSTOM_FILEDESCRIPTORPROTO FileDescriptorProto; -typedef GRPC_CUSTOM_METHODDESCRIPTOR MethodDescriptor; -typedef GRPC_CUSTOM_SERVICEDESCRIPTOR ServiceDescriptor; -typedef GRPC_CUSTOM_SOURCELOCATION SourceLocation; + namespace compiler { typedef GRPC_CUSTOM_CODEGENERATOR CodeGenerator; typedef GRPC_CUSTOM_GENERATORCONTEXT GeneratorContext; From debd1517b7c0e40a3be3a1de8774d6368c040a81 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Fri, 3 Jun 2016 21:08:57 +0000 Subject: [PATCH 0857/1894] A Cython-layer read-not-all-responses test --- src/python/grpcio/tests/tests.json | 1 + .../_read_some_but_not_all_responses_test.py | 251 ++++++++++++++++++ 2 files changed, 252 insertions(+) create mode 100644 src/python/grpcio/tests/unit/_cython/_read_some_but_not_all_responses_test.py diff --git a/src/python/grpcio/tests/tests.json b/src/python/grpcio/tests/tests.json index 81458b11da6..8dc47bf69dd 100644 --- a/src/python/grpcio/tests/tests.json +++ b/src/python/grpcio/tests/tests.json @@ -48,6 +48,7 @@ "_low_test.HangingServerShutdown", "_low_test.InsecureServerInsecureClient", "_not_found_test.NotFoundTest", + "_read_some_but_not_all_responses_test.ReadSomeButNotAllResponsesTest", "_rpc_test.RPCTest", "_sanity_test.Sanity", "_secure_interop_test.SecureInteropTest", diff --git a/src/python/grpcio/tests/unit/_cython/_read_some_but_not_all_responses_test.py b/src/python/grpcio/tests/unit/_cython/_read_some_but_not_all_responses_test.py new file mode 100644 index 00000000000..6ae7a90fbed --- /dev/null +++ b/src/python/grpcio/tests/unit/_cython/_read_some_but_not_all_responses_test.py @@ -0,0 +1,251 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""Test a corner-case at the level of the Cython API.""" + +import threading +import unittest + +from grpc._cython import cygrpc + +_INFINITE_FUTURE = cygrpc.Timespec(float('+inf')) +_EMPTY_FLAGS = 0 +_EMPTY_METADATA = cygrpc.Metadata(()) + + +class _ServerDriver(object): + + def __init__(self, completion_queue, shutdown_tag): + self._condition = threading.Condition() + self._completion_queue = completion_queue + self._shutdown_tag = shutdown_tag + self._events = [] + self._saw_shutdown_tag = False + + def start(self): + def in_thread(): + while True: + event = self._completion_queue.poll() + with self._condition: + self._events.append(event) + self._condition.notify() + if event.tag is self._shutdown_tag: + self._saw_shutdown_tag = True + break + thread = threading.Thread(target=in_thread) + thread.start() + + def done(self): + with self._condition: + return self._saw_shutdown_tag + + def first_event(self): + with self._condition: + while not self._events: + self._condition.wait() + return self._events[0] + + def events(self): + with self._condition: + while not self._saw_shutdown_tag: + self._condition.wait() + return tuple(self._events) + + +class _QueueDriver(object): + + def __init__(self, condition, completion_queue, due): + self._condition = condition + self._completion_queue = completion_queue + self._due = due + self._events = [] + self._returned = False + + def start(self): + def in_thread(): + while True: + event = self._completion_queue.poll() + with self._condition: + self._events.append(event) + self._due.remove(event.tag) + self._condition.notify_all() + if not self._due: + self._returned = True + return + thread = threading.Thread(target=in_thread) + thread.start() + + def done(self): + with self._condition: + return self._returned + + def event_with_tag(self, tag): + with self._condition: + while True: + for event in self._events: + if event.tag is tag: + return event + self._condition.wait() + + def events(self): + with self._condition: + while not self._returned: + self._condition.wait() + return tuple(self._events) + + +class ReadSomeButNotAllResponsesTest(unittest.TestCase): + + def testReadSomeButNotAllResponses(self): + server_completion_queue = cygrpc.CompletionQueue() + server = cygrpc.Server() + server.register_completion_queue(server_completion_queue) + port = server.add_http2_port('[::]:0') + server.start() + channel = cygrpc.Channel('localhost:{}'.format(port)) + + server_shutdown_tag = 'server_shutdown_tag' + server_driver = _ServerDriver(server_completion_queue, server_shutdown_tag) + server_driver.start() + + client_condition = threading.Condition() + client_due = set() + client_completion_queue = cygrpc.CompletionQueue() + client_driver = _QueueDriver( + client_condition, client_completion_queue, client_due) + client_driver.start() + + server_call_condition = threading.Condition() + server_send_initial_metadata_tag = 'server_send_initial_metadata_tag' + server_send_first_message_tag = 'server_send_first_message_tag' + server_send_second_message_tag = 'server_send_second_message_tag' + server_complete_rpc_tag = 'server_complete_rpc_tag' + server_call_due = set(( + server_send_initial_metadata_tag, + server_send_first_message_tag, + server_send_second_message_tag, + server_complete_rpc_tag, + )) + server_call_completion_queue = cygrpc.CompletionQueue() + server_call_driver = _QueueDriver( + server_call_condition, server_call_completion_queue, server_call_due) + server_call_driver.start() + + server_rpc_tag = 'server_rpc_tag' + request_call_result = server.request_call( + server_call_completion_queue, server_completion_queue, server_rpc_tag) + + client_call = channel.create_call( + None, _EMPTY_FLAGS, client_completion_queue, b'/twinkies', None, + _INFINITE_FUTURE) + client_receive_initial_metadata_tag = 'client_receive_initial_metadata_tag' + client_complete_rpc_tag = 'client_complete_rpc_tag' + with client_condition: + client_receive_initial_metadata_start_batch_result = ( + client_call.start_batch(cygrpc.Operations([ + cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS), + ]), client_receive_initial_metadata_tag)) + client_due.add(client_receive_initial_metadata_tag) + client_complete_rpc_start_batch_result = ( + client_call.start_batch(cygrpc.Operations([ + cygrpc.operation_send_initial_metadata( + _EMPTY_METADATA, _EMPTY_FLAGS), + cygrpc.operation_send_close_from_client(_EMPTY_FLAGS), + cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS), + ]), client_complete_rpc_tag)) + client_due.add(client_complete_rpc_tag) + + server_rpc_event = server_driver.first_event() + + with server_call_condition: + server_send_initial_metadata_start_batch_result = ( + server_rpc_event.operation_call.start_batch(cygrpc.Operations([ + cygrpc.operation_send_initial_metadata( + _EMPTY_METADATA, _EMPTY_FLAGS), + ]), server_send_initial_metadata_tag)) + server_send_first_message_start_batch_result = ( + server_rpc_event.operation_call.start_batch(cygrpc.Operations([ + cygrpc.operation_send_message(b'\x07', _EMPTY_FLAGS), + ]), server_send_first_message_tag)) + server_send_initial_metadata_event = server_call_driver.event_with_tag( + server_send_initial_metadata_tag) + server_send_first_message_event = server_call_driver.event_with_tag( + server_send_first_message_tag) + with server_call_condition: + server_send_second_message_start_batch_result = ( + server_rpc_event.operation_call.start_batch(cygrpc.Operations([ + cygrpc.operation_send_message(b'\x07', _EMPTY_FLAGS), + ]), server_send_second_message_tag)) + server_complete_rpc_start_batch_result = ( + server_rpc_event.operation_call.start_batch(cygrpc.Operations([ + cygrpc.operation_receive_close_on_server(_EMPTY_FLAGS), + cygrpc.operation_send_status_from_server( + cygrpc.Metadata(()), cygrpc.StatusCode.ok, b'test details', + _EMPTY_FLAGS), + ]), server_complete_rpc_tag)) + server_send_second_message_event = server_call_driver.event_with_tag( + server_send_second_message_tag) + server_complete_rpc_event = server_call_driver.event_with_tag( + server_complete_rpc_tag) + server_call_driver.events() + + with client_condition: + client_receive_first_message_tag = 'client_receive_first_message_tag' + client_receive_first_message_start_batch_result = ( + client_call.start_batch(cygrpc.Operations([ + cygrpc.operation_receive_message(_EMPTY_FLAGS), + ]), client_receive_first_message_tag)) + client_due.add(client_receive_first_message_tag) + client_receive_first_message_event = client_driver.event_with_tag( + client_receive_first_message_tag) + + client_call_cancel_result = client_call.cancel() + client_driver.events() + + server.shutdown(server_completion_queue, server_shutdown_tag) + server.cancel_all_calls() + server_driver.events() + + self.assertEqual(cygrpc.CallError.ok, request_call_result) + self.assertEqual( + cygrpc.CallError.ok, server_send_initial_metadata_start_batch_result) + self.assertEqual( + cygrpc.CallError.ok, client_receive_initial_metadata_start_batch_result) + self.assertEqual( + cygrpc.CallError.ok, client_complete_rpc_start_batch_result) + self.assertEqual(cygrpc.CallError.ok, client_call_cancel_result) + self.assertIs(server_rpc_tag, server_rpc_event.tag) + self.assertEqual( + cygrpc.CompletionType.operation_complete, server_rpc_event.type) + self.assertIsInstance(server_rpc_event.operation_call, cygrpc.Call) + self.assertEqual(0, len(server_rpc_event.batch_operations)) + + +if __name__ == '__main__': + unittest.main(verbosity=2) From c8074527b2c98e132061f79b48f06f0c5154b9fb Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 3 Jun 2016 14:36:11 -0700 Subject: [PATCH 0858/1894] Remove unnecessary headers --- .../impl/proto_server_reflection_plugin.h | 6 ++---- .../reflection/proto_server_reflection.cc | 3 --- .../reflection/proto_server_reflection.h | 3 --- .../proto_server_reflection_plugin.cc | 18 ++++++++++-------- .../proto_reflection_descriptor_database.h | 1 - 5 files changed, 12 insertions(+), 19 deletions(-) diff --git a/extensions/include/grpc++/impl/proto_server_reflection_plugin.h b/extensions/include/grpc++/impl/proto_server_reflection_plugin.h index df0abb2b16f..5bf1ff1bfcc 100644 --- a/extensions/include/grpc++/impl/proto_server_reflection_plugin.h +++ b/extensions/include/grpc++/impl/proto_server_reflection_plugin.h @@ -34,8 +34,6 @@ #ifndef GRPCXX_PROTO_SERVER_REFLECTION_PLUGIN_H #define GRPCXX_PROTO_SERVER_REFLECTION_PLUGIN_H -#include - #include #include @@ -58,7 +56,7 @@ class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin { bool has_sync_methods() const GRPC_OVERRIDE; private: - std::shared_ptr<::grpc::ProtoServerReflection> reflection_service; + std::shared_ptr<::grpc::ProtoServerReflection> reflection_service_; }; std::unique_ptr<::grpc::ServerBuilderPlugin> CreateProtoReflection(); @@ -70,7 +68,7 @@ static struct StaticPluginInitializer_reflection { StaticPluginInitializer_reflection() { grpc_AddServerBuilderPlugin_reflection(); } -} static_plugin_initializer_reflection_; +} static_plugin_initializer_reflection; } // namespace reflection } // namespace grpc diff --git a/extensions/reflection/proto_server_reflection.cc b/extensions/reflection/proto_server_reflection.cc index e41c67cdbcf..f3cf7958e84 100644 --- a/extensions/reflection/proto_server_reflection.cc +++ b/extensions/reflection/proto_server_reflection.cc @@ -31,9 +31,6 @@ * */ -#include -#include -#include #include #include diff --git a/extensions/reflection/proto_server_reflection.h b/extensions/reflection/proto_server_reflection.h index f9b98c5fb3a..71b316816c2 100644 --- a/extensions/reflection/proto_server_reflection.h +++ b/extensions/reflection/proto_server_reflection.h @@ -34,9 +34,6 @@ #ifndef GRPC_EXTENSIONS_REFLECTION_PROTO_SERVER_REFLECTION_H #define GRPC_EXTENSIONS_REFLECTION_PROTO_SERVER_REFLECTION_H -#include -#include -#include #include #include diff --git a/extensions/reflection/proto_server_reflection_plugin.cc b/extensions/reflection/proto_server_reflection_plugin.cc index d038a7fff59..465a8b9442e 100644 --- a/extensions/reflection/proto_server_reflection_plugin.cc +++ b/extensions/reflection/proto_server_reflection_plugin.cc @@ -42,31 +42,33 @@ namespace grpc { namespace reflection { ProtoServerReflectionPlugin::ProtoServerReflectionPlugin() - : reflection_service(new grpc::ProtoServerReflection()) {} + : reflection_service_(new grpc::ProtoServerReflection()) {} -grpc::string ProtoServerReflectionPlugin::name() { return "p1"; } +grpc::string ProtoServerReflectionPlugin::name() { + return "proto_server_reflection"; +} void ProtoServerReflectionPlugin::InitServer(grpc::ServerInitializer* si) { - si->RegisterService(reflection_service); + si->RegisterService(reflection_service_); } void ProtoServerReflectionPlugin::Finish(grpc::ServerInitializer* si) { - reflection_service->SetServiceList(si->GetServiceList()); + reflection_service_->SetServiceList(si->GetServiceList()); } void ProtoServerReflectionPlugin::ChangeArguments(const grpc::string& name, void* value) {} bool ProtoServerReflectionPlugin::has_sync_methods() const { - if (reflection_service != nullptr) { - return reflection_service->has_synchronous_methods(); + if (reflection_service_ != nullptr) { + return reflection_service_->has_synchronous_methods(); } return false; } bool ProtoServerReflectionPlugin::has_async_methods() const { - if (reflection_service != nullptr) { - return reflection_service->has_async_methods(); + if (reflection_service_ != nullptr) { + return reflection_service_->has_async_methods(); } return false; } diff --git a/test/cpp/util/proto_reflection_descriptor_database.h b/test/cpp/util/proto_reflection_descriptor_database.h index bc25fb0f5c7..c6f7b5f0466 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.h +++ b/test/cpp/util/proto_reflection_descriptor_database.h @@ -31,7 +31,6 @@ * */ -#include #include #include #include From 0bcbd79baa57c16d4ab64a070b5fbfc93293f543 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 1 Jun 2016 15:43:03 -0700 Subject: [PATCH 0859/1894] Functionality complete in ev_epoll_linux.c --- src/core/lib/iomgr/ev_epoll_linux.c | 1202 +++++++++++++-------------- 1 file changed, 591 insertions(+), 611 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 1201c10a7e0..ce42a9e7ce6 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -61,31 +61,27 @@ struct polling_island; /******************************************************************************* - * FD declarations + * Fd Declarations */ - struct grpc_fd { int fd; /* refst format: bit 0 : 1=Active / 0=Orphaned bits 1-n : refcount - - ref/unref by two to avoid altering the orphaned bit - - To orphan, unref by 1 */ + Ref/Unref by two to avoid altering the orphaned bit */ gpr_atm refst; gpr_mu mu; - int shutdown; + bool shutdown; int closed; - int released; + bool released; grpc_closure *read_closure; grpc_closure *write_closure; - /* Mutex protecting the 'polling_island' field */ + /* The polling island to which this fd belongs to and the mutex protecting the + the field */ gpr_mu pi_mu; - - /* The polling island to which this fd belongs to. - * An fd belongs to exactly one polling island */ struct polling_island *polling_island; struct grpc_fd *freelist_next; @@ -94,11 +90,7 @@ struct grpc_fd { grpc_iomgr_object iomgr_object; }; -/* Return 1 if this fd is orphaned, 0 otherwise */ -static bool fd_is_orphaned(grpc_fd *fd); - /* Reference counting for fds */ -/*#define GRPC_FD_REF_COUNT_DEBUG*/ #ifdef GRPC_FD_REF_COUNT_DEBUG static void fd_ref(grpc_fd *fd, const char *reason, const char *file, int line); static void fd_unref(grpc_fd *fd, const char *reason, const char *file, @@ -119,15 +111,15 @@ static void fd_global_shutdown(void); #define CLOSURE_READY ((grpc_closure *)1) /******************************************************************************* - * Polling Island + * Polling-island Declarations */ typedef struct polling_island { gpr_mu mu; int ref_cnt; - /* Pointer to the polling_island this merged into. If this is not NULL, all - the remaining fields in this pollset (i.e all fields except mu and ref_cnt) - are considered invalid and must be ignored */ + /* Points to the polling_island this merged into. + * If merged_to is not NULL, all the remaining fields (except mu and ref_cnt) + * are invalid and must be ignored */ struct polling_island *merged_to; /* The fd of the underlying epoll set */ @@ -144,15 +136,62 @@ typedef struct polling_island { struct polling_island *next_free; } polling_island; +/******************************************************************************* + * Pollset Declarations + */ + +struct grpc_pollset_worker { + int kicked_specifically; + pthread_t pt_id; /* TODO (sreek) - Add an abstraction here */ + struct grpc_pollset_worker *next; + struct grpc_pollset_worker *prev; +}; + +struct grpc_pollset { + gpr_mu mu; + grpc_pollset_worker root_worker; + bool kicked_without_pollers; + + bool shutting_down; /* Is the pollset shutting down ? */ + bool finish_shutdown_called; /* Is the 'finish_shutdown_locked()' called ? */ + grpc_closure *shutdown_done; /* Called after after shutdown is complete */ + + /* The polling island to which this pollset belongs to and the mutex + protecting the field */ + gpr_mu pi_mu; + struct polling_island *polling_island; +}; + +/******************************************************************************* + * Pollset-set Declarations + */ +struct grpc_pollset_set { + gpr_mu mu; + + size_t pollset_count; + size_t pollset_capacity; + grpc_pollset **pollsets; + + size_t pollset_set_count; + size_t pollset_set_capacity; + struct grpc_pollset_set **pollset_sets; + + size_t fd_count; + size_t fd_capacity; + grpc_fd **fds; +}; + +/******************************************************************************* + * Polling-island Definitions + */ + /* Polling island freelist */ static gpr_mu g_pi_freelist_mu; static polling_island *g_pi_freelist = NULL; -/* TODO: sreek - Should we hold a lock on fd or add a ref to the fd ? - * TODO: sreek - Should this add a ref to the grpc_fd ? */ /* The caller is expected to hold pi->mu lock before calling this function */ static void polling_island_add_fds_locked(polling_island *pi, grpc_fd **fds, - size_t fd_count) { + size_t fd_count, bool add_fd_refs) { int err; size_t i; struct epoll_event ev; @@ -162,11 +201,14 @@ static void polling_island_add_fds_locked(polling_island *pi, grpc_fd **fds, ev.data.ptr = fds[i]; err = epoll_ctl(pi->epoll_fd, EPOLL_CTL_ADD, fds[i]->fd, &ev); - if (err < 0 && errno != EEXIST) { - gpr_log(GPR_ERROR, "epoll_ctl add for fd: %d failed with error: %s", - fds[i]->fd, strerror(errno)); - /* TODO: sreek - Not sure if it is a good idea to continue here. We need a - * better way to bubble up this error instead of doing an abort() */ + if (err < 0) { + if (errno != EEXIST) { + /* TODO: sreek - We need a better way to bubble up this error instead of + just logging a message */ + gpr_log(GPR_ERROR, "epoll_ctl add for fd: %d failed with error: %s", + fds[i]->fd, strerror(errno)); + } + continue; } @@ -176,26 +218,30 @@ static void polling_island_add_fds_locked(polling_island *pi, grpc_fd **fds, } pi->fds[pi->fd_cnt++] = fds[i]; + if (add_fd_refs) { + GRPC_FD_REF(fds[i], "polling_island"); + } } } -/* TODO: sreek - Should we hold a lock on fd or add a ref to the fd ? - * TODO: sreek - Might have to unref the fds (assuming whether we add a ref to - * the fd when adding it to the epollset) */ /* The caller is expected to hold pi->mu lock before calling this function */ -static void polling_island_remove_all_fds_locked(polling_island *pi) { +static void polling_island_remove_all_fds_locked(polling_island *pi, + bool remove_fd_refs) { int err; size_t i; for (i = 0; i < pi->fd_cnt; i++) { - err = epoll_ctl(pi->epoll_fd, EPOLL_CTL_DEL, pi->fds[i]->fd, NULL); + if (remove_fd_refs) { + GRPC_FD_UNREF(pi->fds[i], "polling_island"); + } + err = epoll_ctl(pi->epoll_fd, EPOLL_CTL_DEL, pi->fds[i]->fd, NULL); if (err < 0 && errno != ENOENT) { gpr_log(GPR_ERROR, "epoll_ctl delete for fds[i]: %d failed with error: %s", i, pi->fds[i]->fd, strerror(errno)); - /* TODO: sreek - Not sure if it is a good idea to continue here. We need a - * better way to bubble up this error instead of doing an abort() */ + /* TODO: sreek - We need a better way to bubble up this error instead of + * just logging a message */ continue; } } @@ -203,22 +249,31 @@ static void polling_island_remove_all_fds_locked(polling_island *pi) { pi->fd_cnt = 0; } -/* TODO: sreek - Should we hold a lock on fd or add a ref to the fd ? - * TODO: sreek - Might have to unref the fd (assuming whether we add a ref to - * the fd when adding it to the epollset) */ /* The caller is expected to hold pi->mu lock before calling this function */ -static void polling_island_remove_fd_locked(polling_island *pi, grpc_fd *fd) { +static void polling_island_remove_fd_locked(polling_island *pi, grpc_fd *fd, + bool close_fd, bool remove_fd_ref) { int err; size_t i; - err = epoll_ctl(pi->epoll_fd, EPOLL_CTL_DEL, fd->fd, NULL); - if (err < 0 && errno != ENOENT) { - gpr_log(GPR_ERROR, "epoll_ctl delete for fd: %d failed with error; %s", - fd->fd, strerror(errno)); + + /* Calling close() on the fd will automatically remove it from the epoll set. + If not calling close(), the fd must be explicitly removed from the epoll + set */ + if (close_fd) { + close(fd->fd); + } else { + err = epoll_ctl(pi->epoll_fd, EPOLL_CTL_DEL, fd->fd, NULL); + if (err < 0 && errno != ENOENT) { + gpr_log(GPR_ERROR, "epoll_ctl delete for fd: %d failed with error; %s", + fd->fd, strerror(errno)); + } } for (i = 0; i < pi->fd_cnt; i++) { if (pi->fds[i] == fd) { pi->fds[i] = pi->fds[--pi->fd_cnt]; + if (remove_fd_ref) { + GRPC_FD_UNREF(fd, "polling_island"); + } break; } } @@ -227,6 +282,10 @@ static void polling_island_remove_fd_locked(polling_island *pi, grpc_fd *fd) { static polling_island *polling_island_create(grpc_fd *initial_fd, int initial_ref_cnt) { polling_island *pi = NULL; + struct epoll_event ev; + int err; + + /* Try to get one from the polling island freelist */ gpr_mu_lock(&g_pi_freelist_mu); if (g_pi_freelist != NULL) { pi = g_pi_freelist; @@ -242,13 +301,25 @@ static polling_island *polling_island_create(grpc_fd *initial_fd, pi->fd_cnt = 0; pi->fd_capacity = 0; pi->fds = NULL; + } - pi->epoll_fd = epoll_create1(EPOLL_CLOEXEC); - if (pi->epoll_fd < 0) { - gpr_log(GPR_ERROR, "epoll_create1() failed with error: %s", - strerror(errno)); - } - GPR_ASSERT(pi->epoll_fd >= 0); + pi->epoll_fd = epoll_create1(EPOLL_CLOEXEC); + if (pi->epoll_fd < 0) { + gpr_log(GPR_ERROR, "epoll_create1() failed with error: %s", + strerror(errno)); + } + GPR_ASSERT(pi->epoll_fd >= 0); + + ev.events = (uint32_t)(EPOLLIN | EPOLLET); + ev.data.ptr = NULL; + err = epoll_ctl(pi->epoll_fd, EPOLL_CTL_ADD, + GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd), &ev); + if (err < 0) { + gpr_log(GPR_ERROR, + "Failed to add grpc_global_wake_up_fd (%d) to the epoll set " + "(epoll_fd: %d) with error: %s", + GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd), pi->epoll_fd, + strerror(errno)); } pi->ref_cnt = initial_ref_cnt; @@ -256,10 +327,12 @@ static polling_island *polling_island_create(grpc_fd *initial_fd, pi->next_free = NULL; if (initial_fd != NULL) { - /* polling_island_add_fds_locked() expects the caller to hold a pi->mu - * lock. However, since this is a new polling island (and no one has a - * reference to it yet), it is okay to not acquire pi->mu here */ - polling_island_add_fds_locked(pi, &initial_fd, 1); + /* It is not really needed to get the pi->mu lock here. If this is a newly + created polling island (or one that we got from the freelist), no one + else would be holding a lock to it anyway */ + gpr_mu_lock(&pi->mu); + polling_island_add_fds_locked(pi, &initial_fd, 1, true); + gpr_mu_unlock(&pi->mu); } return pi; @@ -269,6 +342,9 @@ static void polling_island_delete(polling_island *pi) { GPR_ASSERT(pi->ref_cnt == 0); GPR_ASSERT(pi->fd_cnt == 0); + close(pi->epoll_fd); + pi->epoll_fd = -1; + pi->merged_to = NULL; gpr_mu_lock(&g_pi_freelist_mu); @@ -313,10 +389,20 @@ void polling_island_pair_update_and_lock(polling_island **p, bool pi_2_locked = false; int num_swaps = 0; + /* Loop until either pi_1 == pi_2 or until we acquired locks on both pi_1 + and pi_2 */ while (pi_1 != pi_2 && !(pi_1_locked && pi_2_locked)) { - // pi_1 is NOT equal to pi_2 - // pi_1 MAY be locked - + /* The following assertions are true at this point: + - pi_1 != pi_2 (else, the while loop would have exited) + - pi_1 MAY be locked + - pi_2 is NOT locked */ + + /* To maintain lock order consistency, always lock polling_island node with + lower address first. + First, make sure pi_1 < pi_2 before proceeding any further. If it turns + out that pi_1 > pi_2, unlock pi_1 if locked (because pi_2 is not locked + at this point and having pi_1 locked would violate the lock order) and + swap pi_1 and pi_2 so that pi_1 becomes less than pi_2 */ if (pi_1 > pi_2) { if (pi_1_locked) { gpr_mu_unlock(&pi_1->mu); @@ -327,14 +413,22 @@ void polling_island_pair_update_and_lock(polling_island **p, num_swaps++; } - // p1 < p2 - // p1 MAY BE locked - // p2 is NOT locked + /* The following assertions are true at this point: + - pi_1 != pi_2 + - pi_1 < pi_2 (address of pi_1 is less than that of pi_2) + - pi_1 MAYBE locked + - pi_2 is NOT locked */ + /* Lock pi_1 (if pi_1 is pointing to the terminal node in the list) */ if (!pi_1_locked) { gpr_mu_lock(&pi_1->mu); pi_1_locked = true; + /* If pi_1 is not terminal node (i.e pi_1->merged_to != NULL), we are not + done locking this polling_island yet. Release the lock on this node and + advance pi_1 to the next node in the list; and go to the beginning of + the loop (we can't proceed to locking pi_2 unless we locked pi_1 first) + */ if (pi_1->merged_to != NULL) { temp = pi_1->merged_to; polling_island_unref_and_unlock(pi_1, 1); @@ -345,13 +439,16 @@ void polling_island_pair_update_and_lock(polling_island **p, } } - // p1 is LOCKED - // p2 is UNLOCKED - // p1 != p2 + /* The following assertions are true at this point: + - pi_1 is locked + - pi_2 is unlocked + - pi_1 != pi_2 */ gpr_mu_lock(&pi_2->mu); pi_2_locked = true; + /* If pi_2 is not terminal node, we are not done locking this polling_island + yet. Release the lock and update pi_2 to the next node in the list */ if (pi_2->merged_to != NULL) { temp = pi_2->merged_to; polling_island_unref_and_unlock(pi_2, 1); @@ -360,14 +457,19 @@ void polling_island_pair_update_and_lock(polling_island **p, } } - // Either pi_1 == pi_2 OR we got both locks! + /* At this point, either pi_1 == pi_2 AND/OR we got both locks */ if (pi_1 == pi_2) { + /* We may or may not have gotten the lock. If we didn't, walk the rest of + the polling_island list and get the lock */ GPR_ASSERT(pi_1_locked || (!pi_1_locked && !pi_2_locked)); if (!pi_1_locked) { pi_1 = pi_2 = polling_island_update_and_lock(pi_1, 2, 0); } } else { GPR_ASSERT(pi_1_locked && pi_2_locked); + /* If we swapped pi_1 and pi_2 odd number of times, do one more swap so that + pi_1 and pi_2 point to the same polling_island lists they started off + with at the beginning of this function (i.e *p and *q respectively) */ if (num_swaps % 2 > 0) { GPR_SWAP(polling_island *, pi_1, pi_2); } @@ -378,26 +480,37 @@ void polling_island_pair_update_and_lock(polling_island **p, } polling_island *polling_island_merge(polling_island *p, polling_island *q) { - polling_island *merged = NULL; - + /* Get locks on both the polling islands */ polling_island_pair_update_and_lock(&p, &q); /* TODO: sreek: Think about this scenario some more. Is it possible ?. what * does it mean, when would this happen */ if (p == q) { - merged = p; + /* Nothing needs to be done here */ + gpr_mu_unlock(&p->mu); + return p; } - // Move all the fds from polling_island p to polling_island q - polling_island_add_fds_locked(q, p->fds, p->fd_cnt); - polling_island_remove_all_fds_locked(p); + /* Make sure that p points to the polling island with fewer fds than q */ + if (p->fd_cnt > q->fd_cnt) { + GPR_SWAP(polling_island *, p, q); + } + + /* "Merge" p with q i.e move all the fds from p (the polling_island with fewer + fds) to q. + Note: Not altering the ref counts on the affected fds here because they + would effectively remain unchanged */ + polling_island_add_fds_locked(q, p->fds, p->fd_cnt, false); + polling_island_remove_all_fds_locked(p, false); + /* The merged polling island inherits all the ref counts of the island merging + with it */ q->ref_cnt += p->ref_cnt; gpr_mu_unlock(&p->mu); gpr_mu_unlock(&q->mu); - return merged; + return q; } static void polling_island_global_init() { @@ -406,95 +519,10 @@ static void polling_island_global_init() { } /******************************************************************************* - * pollset declarations - */ - -struct grpc_pollset_worker { - int kicked_specifically; - pthread_t pt_id; - struct grpc_pollset_worker *next; - struct grpc_pollset_worker *prev; -}; - -struct grpc_pollset { - gpr_mu mu; - grpc_pollset_worker root_worker; - int shutting_down; - int called_shutdown; - int kicked_without_pollers; - grpc_closure *shutdown_done; - - int epoll_fd; - - /* Mutex protecting the 'polling_island' field */ - gpr_mu pi_mu; - - /* The polling island to which this fd belongs to. An fd belongs to exactly - one polling island */ - struct polling_island *polling_island; -}; - -/* Add an fd to a pollset */ -static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - struct grpc_fd *fd); - -static void pollset_set_add_fd(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *pollset_set, grpc_fd *fd); - -/* Convert a timespec to milliseconds: - - very small or negative poll times are clamped to zero to do a - non-blocking poll (which becomes spin polling) - - other small values are rounded up to one millisecond - - longer than a millisecond polls are rounded up to the next nearest - millisecond to avoid spinning - - infinite timeouts are converted to -1 */ -static int poll_deadline_to_millis_timeout(gpr_timespec deadline, - gpr_timespec now); - -/* Allow kick to wakeup the currently polling worker */ -#define GRPC_POLLSET_CAN_KICK_SELF 1 -/* As per pollset_kick, with an extended set of flags (defined above) - -- mostly for fd_posix's use. */ -static void pollset_kick_ext(grpc_pollset *p, - grpc_pollset_worker *specific_worker, - uint32_t flags); - -/* turn a pollset into a multipoller: platform specific */ -typedef void (*platform_become_multipoller_type)(grpc_exec_ctx *exec_ctx, - grpc_pollset *pollset, - struct grpc_fd **fds, - size_t fd_count); - -/* Return 1 if the pollset has active threads in pollset_work (pollset must - * be locked) */ -static int pollset_has_workers(grpc_pollset *pollset); - -/******************************************************************************* - * pollset_set definitions - */ - -struct grpc_pollset_set { - gpr_mu mu; - - size_t pollset_count; - size_t pollset_capacity; - grpc_pollset **pollsets; - - size_t pollset_set_count; - size_t pollset_set_capacity; - struct grpc_pollset_set **pollset_sets; - - size_t fd_count; - size_t fd_capacity; - grpc_fd **fds; -}; - -/******************************************************************************* - * fd_posix.c + * Fd Definitions */ -/* We need to keep a freelist not because of any concerns of malloc - * performance +/* We need to keep a freelist not because of any concerns of malloc performance * but instead so that implementations with multiple threads in (for example) * epoll_wait deal with the race between pollset removal and incoming poll * notifications. @@ -506,58 +534,16 @@ struct grpc_pollset_set { * If we keep the object freelisted, in the worst case losing this race just * becomes a spurious read notification on a reused fd. */ -/* TODO(klempner): We could use some form of polling generation count to know - * when these are safe to free. */ -/* TODO(klempner): Consider disabling freelisting if we don't have multiple - * threads in poll on the same fd */ -/* TODO(klempner): Batch these allocations to reduce fragmentation */ -static grpc_fd *fd_freelist = NULL; -static gpr_mu fd_freelist_mu; - -static void freelist_fd(grpc_fd *fd) { - gpr_mu_lock(&fd_freelist_mu); - fd->freelist_next = fd_freelist; - fd_freelist = fd; - grpc_iomgr_unregister_object(&fd->iomgr_object); - gpr_mu_unlock(&fd_freelist_mu); -} - -static grpc_fd *alloc_fd(int fd) { - grpc_fd *r = NULL; - - gpr_mu_lock(&fd_freelist_mu); - if (fd_freelist != NULL) { - r = fd_freelist; - fd_freelist = fd_freelist->freelist_next; - } - gpr_mu_unlock(&fd_freelist_mu); - - if (r == NULL) { - r = gpr_malloc(sizeof(grpc_fd)); - gpr_mu_init(&r->mu); - gpr_mu_init(&r->pi_mu); - } - /* TODO: sreek - check with ctiller on why we need to acquire a lock here */ - gpr_mu_lock(&r->mu); - gpr_atm_rel_store(&r->refst, 1); - r->shutdown = 0; - r->read_closure = CLOSURE_NOT_READY; - r->write_closure = CLOSURE_NOT_READY; - r->fd = fd; - r->polling_island = NULL; - r->freelist_next = NULL; - r->on_done_closure = NULL; - r->closed = 0; - r->released = 0; - gpr_mu_unlock(&r->mu); - return r; -} +/* The alarm system needs to be able to wakeup 'some poller' sometimes + * (specifically when a new alarm needs to be triggered earlier than the next + * alarm 'epoch'). This wakeup_fd gives us something to alert on when such a + * case occurs. */ +/* TODO: sreek: Right now, this wakes up all pollers */ +grpc_wakeup_fd grpc_global_wakeup_fd; -static void destroy(grpc_fd *fd) { - gpr_mu_destroy(&fd->mu); - gpr_free(fd); -} +static grpc_fd *fd_freelist = NULL; +static gpr_mu fd_freelist_mu; #ifdef GRPC_FD_REF_COUNT_DEBUG #define REF_BY(fd, n, reason) ref_by(fd, n, reason, __FILE__, __LINE__) @@ -588,12 +574,33 @@ static void unref_by(grpc_fd *fd, int n) { #endif old = gpr_atm_full_fetch_add(&fd->refst, -n); if (old == n) { - freelist_fd(fd); + /* Add the fd to the freelist */ + gpr_mu_lock(&fd_freelist_mu); + fd->freelist_next = fd_freelist; + fd_freelist = fd; + grpc_iomgr_unregister_object(&fd->iomgr_object); + gpr_mu_unlock(&fd_freelist_mu); } else { GPR_ASSERT(old > n); } } +/* Increment refcount by two to avoid changing the orphan bit */ +#ifdef GRPC_FD_REF_COUNT_DEBUG +static void fd_ref(grpc_fd *fd, const char *reason, const char *file, + int line) { + ref_by(fd, 2, reason, file, line); +} + +static void fd_unref(grpc_fd *fd, const char *reason, const char *file, + int line) { + unref_by(fd, 2, reason, file, line); +} +#else +static void fd_ref(grpc_fd *fd) { ref_by(fd, 2); } +static void fd_unref(grpc_fd *fd) { unref_by(fd, 2); } +#endif + static void fd_global_init(void) { gpr_mu_init(&fd_freelist_mu); } static void fd_global_shutdown(void) { @@ -602,91 +609,111 @@ static void fd_global_shutdown(void) { while (fd_freelist != NULL) { grpc_fd *fd = fd_freelist; fd_freelist = fd_freelist->freelist_next; - destroy(fd); + gpr_mu_destroy(&fd->mu); + gpr_free(fd); } gpr_mu_destroy(&fd_freelist_mu); } static grpc_fd *fd_create(int fd, const char *name) { - grpc_fd *r = alloc_fd(fd); + grpc_fd *new_fd = NULL; + + gpr_mu_lock(&fd_freelist_mu); + if (fd_freelist != NULL) { + new_fd = fd_freelist; + fd_freelist = fd_freelist->freelist_next; + } + gpr_mu_unlock(&fd_freelist_mu); + + if (new_fd == NULL) { + new_fd = gpr_malloc(sizeof(grpc_fd)); + gpr_mu_init(&new_fd->mu); + gpr_mu_init(&new_fd->pi_mu); + } - char *name2; - gpr_asprintf(&name2, "%s fd=%d", name, fd); - grpc_iomgr_register_object(&r->iomgr_object, name2); - gpr_free(name2); + /* Note: It is not really needed to get the new_fd->mu lock here. If this is a + newly created fd (or an fd we got from the freelist), no one else would be + holding a lock to it anyway. */ + gpr_mu_lock(&new_fd->mu); + + gpr_atm_rel_store(&new_fd->refst, 1); + new_fd->shutdown = false; + new_fd->read_closure = CLOSURE_NOT_READY; + new_fd->write_closure = CLOSURE_NOT_READY; + new_fd->fd = fd; + new_fd->polling_island = NULL; + new_fd->freelist_next = NULL; + new_fd->on_done_closure = NULL; + new_fd->closed = 0; + new_fd->released = false; + + gpr_mu_unlock(&new_fd->mu); + + char *fd_name; + gpr_asprintf(&fd_name, "%s fd=%d", name, fd); + grpc_iomgr_register_object(&new_fd->iomgr_object, fd_name); + gpr_free(fd_name); #ifdef GRPC_FD_REF_COUNT_DEBUG - gpr_log(GPR_DEBUG, "FD %d %p create %s", fd, r, name); + gpr_log(GPR_DEBUG, "FD %d %p create %s", fd, r, fd_name); #endif - return r; + return new_fd; } static bool fd_is_orphaned(grpc_fd *fd) { return (gpr_atm_acq_load(&fd->refst) & 1) == 0; } -static void close_fd_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { - fd->closed = 1; - if (!fd->released) { - close(fd->fd); - } else { - /* TODO: sreek - Check for deadlocks */ - - gpr_mu_lock(&fd->pi_mu); - fd->polling_island = - polling_island_update_and_lock(fd->polling_island, 1, 0); - - polling_island_remove_fd_locked(fd->polling_island, fd); - polling_island_unref_and_unlock(fd->polling_island, 1); - - fd->polling_island = NULL; - gpr_mu_unlock(&fd->pi_mu); - } - - grpc_exec_ctx_enqueue(exec_ctx, fd->on_done_closure, true, NULL); -} - static int fd_wrapped_fd(grpc_fd *fd) { - if (fd->released || fd->closed) { - return -1; - } else { - return fd->fd; + int ret_fd = -1; + gpr_mu_lock(&fd->mu); + if (!fd->released && !fd->closed) { + ret_fd = fd->fd; } + gpr_mu_unlock(&fd->mu); + + return ret_fd; } -/* TODO: sreek - do something here with the pollset island link */ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *on_done, int *release_fd, const char *reason) { + /* TODO(sreek) In ev_poll_posix.c,the lock is acquired a little later. Why? */ + gpr_mu_lock(&fd->mu); fd->on_done_closure = on_done; + + /* If release_fd is not NULL, we should be relinquishing control of the file + descriptor fd->fd (but we still own the grpc_fd structure). */ fd->released = release_fd != NULL; if (!fd->released) { shutdown(fd->fd, SHUT_RDWR); } else { *release_fd = fd->fd; } - gpr_mu_lock(&fd->mu); - REF_BY(fd, 1, reason); /* remove active status, but keep referenced */ - close_fd_locked(exec_ctx, fd); - gpr_mu_unlock(&fd->mu); - UNREF_BY(fd, 2, reason); /* drop the reference */ -} -/* increment refcount by two to avoid changing the orphan bit */ -#ifdef GRPC_FD_REF_COUNT_DEBUG -static void fd_ref(grpc_fd *fd, const char *reason, const char *file, - int line) { - ref_by(fd, 2, reason, file, line); -} + REF_BY(fd, 1, reason); /* Remove active status, but keep referenced */ + fd->closed = 1; -static void fd_unref(grpc_fd *fd, const char *reason, const char *file, - int line) { - unref_by(fd, 2, reason, file, line); -} -#else -static void fd_ref(grpc_fd *fd) { ref_by(fd, 2); } + /* Remove the fd from the polling island: + - Update the fd->polling_island to point to the latest polling island + - Remove the fd from the polling island. Also, call close() on the file + descriptor fd->fd ONLY if we haven't relinquised control (i.e + fd->released is 'false') + - Decrement the ref count on the polling island and det fd->polling_island + to NULL */ + gpr_mu_lock(&fd->pi_mu); -static void fd_unref(grpc_fd *fd) { unref_by(fd, 2); } -#endif + fd->polling_island = polling_island_update_and_lock(fd->polling_island, 1, 0); + polling_island_remove_fd_locked(fd->polling_island, fd, !fd->released, true); + polling_island_unref_and_unlock(fd->polling_island, 1); + fd->polling_island = NULL; + + gpr_mu_unlock(&fd->pi_mu); + + grpc_exec_ctx_enqueue(exec_ctx, fd->on_done_closure, true, NULL); + + gpr_mu_unlock(&fd->mu); + UNREF_BY(fd, 2, reason); /* Drop the reference */ +} static void notify_on_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st, grpc_closure *closure) { @@ -724,11 +751,13 @@ static int set_ready_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, } } -/* Do something here with the pollset island link (?) */ static void fd_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { gpr_mu_lock(&fd->mu); GPR_ASSERT(!fd->shutdown); - fd->shutdown = 1; + fd->shutdown = true; + + /* Flush any pending read and write closures. Since fd->shutdown is 'true' at + this point, the closures would be called with 'success = false' */ set_ready_locked(exec_ctx, fd, &fd->read_closure); set_ready_locked(exec_ctx, fd, &fd->write_closure); gpr_mu_unlock(&fd->mu); @@ -749,27 +778,39 @@ static void fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, } /******************************************************************************* - * pollset_posix.c + * Pollset Definitions */ -GPR_TLS_DECL(g_current_thread_poller); -GPR_TLS_DECL(g_current_thread_worker); +static void sig_handler(int sig_num) { + /* TODO: sreek - Remove this expensive log line */ + gpr_log(GPR_INFO, "Received signal %d", sig_num); +} -/** The alarm system needs to be able to wakeup 'some poller' sometimes - * (specifically when a new alarm needs to be triggered earlier than the next - * alarm 'epoch'). - * This wakeup_fd gives us something to alert on when such a case occurs. */ -grpc_wakeup_fd grpc_global_wakeup_fd; +/* Global state management */ +static void pollset_global_init(void) { + gpr_tls_init(&g_current_thread_poller); + gpr_tls_init(&g_current_thread_worker); + grpc_wakeup_fd_init(&grpc_global_wakeup_fd); + signal(SIGUSR1, sig_handler); +} -static void remove_worker(grpc_pollset *p, grpc_pollset_worker *worker) { - worker->prev->next = worker->next; - worker->next->prev = worker->prev; +static void pollset_global_shutdown(void) { + grpc_wakeup_fd_destroy(&grpc_global_wakeup_fd); + gpr_tls_destroy(&g_current_thread_poller); + gpr_tls_destroy(&g_current_thread_worker); } +/* Return 1 if the pollset has active threads in pollset_work (pollset must + * be locked) */ static int pollset_has_workers(grpc_pollset *p) { return p->root_worker.next != &p->root_worker; } +static void remove_worker(grpc_pollset *p, grpc_pollset_worker *worker) { + worker->prev->next = worker->next; + worker->next->prev = worker->prev; +} + static grpc_pollset_worker *pop_front_worker(grpc_pollset *p) { if (pollset_has_workers(p)) { grpc_pollset_worker *w = p->root_worker.next; @@ -792,241 +833,69 @@ static void push_front_worker(grpc_pollset *p, grpc_pollset_worker *worker) { worker->prev->next = worker->next->prev = worker; } -static void pollset_kick_ext(grpc_pollset *p, - grpc_pollset_worker *specific_worker, - uint32_t flags) { - GPR_TIMER_BEGIN("pollset_kick_ext", 0); - - /* pollset->mu already held */ - if (specific_worker != NULL) { - if (specific_worker == GRPC_POLLSET_KICK_BROADCAST) { - GPR_TIMER_BEGIN("pollset_kick_ext.broadcast", 0); - for (specific_worker = p->root_worker.next; - specific_worker != &p->root_worker; - specific_worker = specific_worker->next) { - pthread_kill(specific_worker->pt_id, SIGUSR1); +/* p->mu must be held before calling this function */ +static void pollset_kick(grpc_pollset *p, + grpc_pollset_worker *specific_worker) { + GPR_TIMER_BEGIN("pollset_kick", 0); + + grpc_pollset_worker *worker = specific_worker; + if (worker != NULL) { + if (worker == GRPC_POLLSET_KICK_BROADCAST) { + GPR_TIMER_BEGIN("pollset_kick.broadcast", 0); + if (pollset_has_workers(p)) { + for (worker = p->root_worker.next; worker != &p->root_worker; + worker = worker->next) { + pthread_kill(worker->pt_id, SIGUSR1); + } + } else { + p->kicked_without_pollers = true; } - p->kicked_without_pollers = 1; - GPR_TIMER_END("pollset_kick_ext.broadcast", 0); - } else if (gpr_tls_get(&g_current_thread_worker) != - (intptr_t)specific_worker) { - GPR_TIMER_MARK("different_thread_worker", 0); - specific_worker->kicked_specifically = 1; - /* TODO (sreek): Refactor this into a separate file*/ - pthread_kill(specific_worker->pt_id, SIGUSR1); - } else if ((flags & GRPC_POLLSET_CAN_KICK_SELF) != 0) { - GPR_TIMER_MARK("kick_yoself", 0); - specific_worker->kicked_specifically = 1; - pthread_kill(specific_worker->pt_id, SIGUSR1); + GPR_TIMER_END("pollset_kick.broadcast", 0); + } else { + GPR_TIMER_MARK("kicked_specifically", 0); + worker->kicked_specifically = true; + pthread_kill(worker->pt_id, SIGUSR1); } - } else if (gpr_tls_get(&g_current_thread_poller) != (intptr_t)p) { + } else { GPR_TIMER_MARK("kick_anonymous", 0); - specific_worker = pop_front_worker(p); - if (specific_worker != NULL) { - if (gpr_tls_get(&g_current_thread_worker) == (intptr_t)specific_worker) { - GPR_TIMER_MARK("kick_anonymous_not_self", 0); - push_back_worker(p, specific_worker); - specific_worker = pop_front_worker(p); - if ((flags & GRPC_POLLSET_CAN_KICK_SELF) == 0 && - gpr_tls_get(&g_current_thread_worker) == - (intptr_t)specific_worker) { - push_back_worker(p, specific_worker); - specific_worker = NULL; - } - } - if (specific_worker != NULL) { - GPR_TIMER_MARK("finally_kick", 0); - push_back_worker(p, specific_worker); - pthread_kill(specific_worker->pt_id, SIGUSR1); - } + worker = pop_front_worker(p); + if (worker != NULL) { + GPR_TIMER_MARK("finally_kick", 0); + push_back_worker(p, worker); + pthread_kill(worker->pt_id, SIGUSR1); } else { GPR_TIMER_MARK("kicked_no_pollers", 0); - p->kicked_without_pollers = 1; + p->kicked_without_pollers = true; } } - GPR_TIMER_END("pollset_kick_ext", 0); + GPR_TIMER_END("pollset_kick", 0); } -static void pollset_kick(grpc_pollset *p, - grpc_pollset_worker *specific_worker) { - pollset_kick_ext(p, specific_worker, 0); -} +static void kick_poller(void) { grpc_wakeup_fd_wakeup(&grpc_global_wakeup_fd); } -/* global state management */ +static void pollset_init(grpc_pollset *pollset, gpr_mu **mu) { + gpr_mu_init(&pollset->mu); + *mu = &pollset->mu; -static void sig_handler(int sig_num) { - gpr_log(GPR_INFO, "Received signal %d", sig_num); -} + pollset->root_worker.next = pollset->root_worker.prev = &pollset->root_worker; + pollset->kicked_without_pollers = false; -static void pollset_global_init(void) { - gpr_tls_init(&g_current_thread_poller); - gpr_tls_init(&g_current_thread_worker); - grpc_wakeup_fd_init(&grpc_global_wakeup_fd); - signal(SIGUSR1, sig_handler); -} + pollset->shutting_down = false; + pollset->finish_shutdown_called = false; + pollset->shutdown_done = NULL; -static void pollset_global_shutdown(void) { - grpc_wakeup_fd_destroy(&grpc_global_wakeup_fd); - gpr_tls_destroy(&g_current_thread_poller); - gpr_tls_destroy(&g_current_thread_worker); -} - -static void kick_poller(void) { grpc_wakeup_fd_wakeup(&grpc_global_wakeup_fd); } - -/* TODO: sreek. Try to Remove this forward declaration*/ -static void multipoll_with_epoll_pollset_create_efd(grpc_pollset *pollset); - -/* main interface */ - -static void pollset_init(grpc_pollset *pollset, gpr_mu **mu) { - gpr_mu_init(&pollset->mu); - *mu = &pollset->mu; - pollset->root_worker.next = pollset->root_worker.prev = &pollset->root_worker; gpr_mu_init(&pollset->pi_mu); pollset->polling_island = NULL; - pollset->shutting_down = 0; - pollset->called_shutdown = 0; - pollset->kicked_without_pollers = 0; - - multipoll_with_epoll_pollset_create_efd(pollset); -} - -/* TODO(sreek): Maybe merge multipoll_*_destroy() with pollset_destroy() - * function */ -static void multipoll_with_epoll_pollset_destroy(grpc_pollset *pollset); - -static void pollset_destroy(grpc_pollset *pollset) { - GPR_ASSERT(!pollset_has_workers(pollset)); - - multipoll_with_epoll_pollset_destroy(pollset); - - gpr_mu_destroy(&pollset->pi_mu); - gpr_mu_destroy(&pollset->mu); -} - -/* TODO(sreek) - Do something with the pollset island link (??) */ -static void pollset_reset(grpc_pollset *pollset) { - GPR_ASSERT(pollset->shutting_down); - GPR_ASSERT(!pollset_has_workers(pollset)); - pollset->shutting_down = 0; - pollset->called_shutdown = 0; - pollset->kicked_without_pollers = 0; -} - -/* TODO (sreek): Remove multipoll_with_epoll_finish_shutdown() declaration */ -static void multipoll_with_epoll_pollset_finish_shutdown(grpc_pollset *pollset); - -static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset) { - multipoll_with_epoll_pollset_finish_shutdown(pollset); - grpc_exec_ctx_enqueue(exec_ctx, pollset->shutdown_done, true, NULL); -} - -/* TODO(sreek): Remove multipoll_with_epoll_*_maybe_work_and_unlock - * declaration - */ -static void multipoll_with_epoll_pollset_maybe_work_and_unlock( - grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_pollset_worker *worker, - gpr_timespec deadline, gpr_timespec now); - -static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_pollset_worker **worker_hdl, gpr_timespec now, - gpr_timespec deadline) { - grpc_pollset_worker worker; - *worker_hdl = &worker; - - /* pollset->mu already held */ - int added_worker = 0; - int locked = 1; - int queued_work = 0; - int keep_polling = 0; - GPR_TIMER_BEGIN("pollset_work", 0); - /* this must happen before we (potentially) drop pollset->mu */ - worker.next = worker.prev = NULL; - worker.kicked_specifically = 0; - - /* TODO(sreek): Abstract this thread id stuff out into a separate file */ - worker.pt_id = pthread_self(); - /* If we're shutting down then we don't execute any extended work */ - if (pollset->shutting_down) { - GPR_TIMER_MARK("pollset_work.shutting_down", 0); - goto done; - } - /* Start polling, and keep doing so while we're being asked to - re-evaluate our pollers (this allows poll() based pollers to - ensure they don't miss wakeups) */ - keep_polling = 1; - while (keep_polling) { - keep_polling = 0; - if (!pollset->kicked_without_pollers) { - if (!added_worker) { - push_front_worker(pollset, &worker); - added_worker = 1; - gpr_tls_set(&g_current_thread_worker, (intptr_t)&worker); - } - gpr_tls_set(&g_current_thread_poller, (intptr_t)pollset); - GPR_TIMER_BEGIN("maybe_work_and_unlock", 0); - - multipoll_with_epoll_pollset_maybe_work_and_unlock( - exec_ctx, pollset, &worker, deadline, now); - - GPR_TIMER_END("maybe_work_and_unlock", 0); - locked = 0; - gpr_tls_set(&g_current_thread_poller, 0); - } else { - GPR_TIMER_MARK("pollset_work.kicked_without_pollers", 0); - pollset->kicked_without_pollers = 0; - } - /* Finished execution - start cleaning up. - Note that we may arrive here from outside the enclosing while() loop. - In that case we won't loop though as we haven't added worker to the - worker list, which means nobody could ask us to re-evaluate polling). */ - done: - if (!locked) { - queued_work |= grpc_exec_ctx_flush(exec_ctx); - gpr_mu_lock(&pollset->mu); - locked = 1; - } - } - if (added_worker) { - remove_worker(pollset, &worker); - gpr_tls_set(&g_current_thread_worker, 0); - } - - /* check shutdown conditions */ - if (pollset->shutting_down) { - if (pollset_has_workers(pollset)) { - pollset_kick(pollset, NULL); - } else if (!pollset->called_shutdown) { - pollset->called_shutdown = 1; - gpr_mu_unlock(&pollset->mu); - finish_shutdown(exec_ctx, pollset); - grpc_exec_ctx_flush(exec_ctx); - /* Continuing to access pollset here is safe -- it is the caller's - * responsibility to not destroy when it has outstanding calls to - * pollset_work. - * TODO(dklempner): Can we refactor the shutdown logic to avoid this? */ - gpr_mu_lock(&pollset->mu); - } - } - *worker_hdl = NULL; - GPR_TIMER_END("pollset_work", 0); -} - -/* TODO: (sreek) Do something with the pollset island link */ -static void pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_closure *closure) { - GPR_ASSERT(!pollset->shutting_down); - pollset->shutting_down = 1; - pollset->shutdown_done = closure; - pollset_kick(pollset, GRPC_POLLSET_KICK_BROADCAST); - - if (!pollset->called_shutdown && !pollset_has_workers(pollset)) { - pollset->called_shutdown = 1; - finish_shutdown(exec_ctx, pollset); - } } +/* Convert a timespec to milliseconds: + - Very small or negative poll times are clamped to zero to do a non-blocking + poll (which becomes spin polling) + - Other small values are rounded up to one millisecond + - Longer than a millisecond polls are rounded up to the next nearest + millisecond to avoid spinning + - Infinite timeouts are converted to -1 */ static int poll_deadline_to_millis_timeout(gpr_timespec deadline, gpr_timespec now) { gpr_timespec timeout; @@ -1034,6 +903,7 @@ static int poll_deadline_to_millis_timeout(gpr_timespec deadline, if (gpr_time_cmp(deadline, gpr_inf_future(deadline.clock_type)) == 0) { return -1; } + if (gpr_time_cmp(deadline, gpr_time_add(now, gpr_time_from_micros( max_spin_polling_us, GPR_TIMESPAN))) <= 0) { @@ -1044,10 +914,6 @@ static int poll_deadline_to_millis_timeout(gpr_timespec deadline, timeout, gpr_time_from_nanos(GPR_NS_PER_MS - 1, GPR_TIMESPAN))); } -/******************************************************************************* - * pollset_multipoller_with_epoll_posix.c - */ - static void set_ready(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st) { /* only one set_ready can be active at once (but there may be a racing notify_on) */ @@ -1064,94 +930,46 @@ static void fd_become_writable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { set_ready(exec_ctx, fd, &fd->write_closure); } -/* TODO: sreek - This function multipoll_with_epoll_pollset_add_fd() and - * finally_add_fd() in ev_poll_and_epoll_posix.c */ -static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_fd *fd) { - /* TODO sreek - Check if we need to get a pollset->mu lock here */ - gpr_mu_lock(&pollset->pi_mu); - gpr_mu_lock(&fd->pi_mu); - - polling_island *pi_new = NULL; - - if (fd->polling_island == pollset->polling_island) { - pi_new = fd->polling_island; - if (pi_new == NULL) { - pi_new = polling_island_create(fd, 2); - } - } else if (fd->polling_island == NULL) { - pi_new = polling_island_update_and_lock(pollset->polling_island, 1, 1); - } else if (pollset->polling_island == NULL) { - pi_new = polling_island_update_and_lock(fd->polling_island, 1, 1); - } else { - pi_new = polling_island_merge(fd->polling_island, pollset->polling_island); - } - - fd->polling_island = pollset->polling_island = pi_new; - - gpr_mu_unlock(&fd->pi_mu); - gpr_mu_unlock(&pollset->pi_mu); -} - -/* Creates an epoll fd and initializes the pollset */ -/* TODO: This has to be called ONLY from pollset_init function. and hence it - * does not acquire any lock */ -static void multipoll_with_epoll_pollset_create_efd(grpc_pollset *pollset) { - struct epoll_event ev; - int err; - - pollset->epoll_fd = epoll_create1(EPOLL_CLOEXEC); - if (pollset->epoll_fd < 0) { - gpr_log(GPR_ERROR, "epoll_create1 failed: %s", strerror(errno)); - abort(); - } - - ev.events = (uint32_t)(EPOLLIN | EPOLLET); - ev.data.ptr = NULL; - - err = epoll_ctl(pollset->epoll_fd, EPOLL_CTL_ADD, - GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd), &ev); - if (err < 0) { - gpr_log(GPR_ERROR, "epoll_ctl add for %d failed: %s", - GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd), - strerror(errno)); - } -} - /* TODO(klempner): We probably want to turn this down a bit */ #define GRPC_EPOLL_MAX_EVENTS 1000 - -static void multipoll_with_epoll_pollset_maybe_work_and_unlock( - grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_pollset_worker *worker, - gpr_timespec deadline, gpr_timespec now) { +static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, + grpc_pollset *pollset, int timeout_ms, + sigset_t *sig_mask) { struct epoll_event ep_ev[GRPC_EPOLL_MAX_EVENTS]; - int epoll_fd = pollset->epoll_fd; + int epoll_fd; int ep_rv; - int timeout_ms; + GPR_TIMER_BEGIN("pollset_work_and_unlock", 0); + + /* We need to get the epoll_fd to wait on. The epoll_fd is in inside the + polling island pointed by pollset->polling_island. + Acquire the following locks: + - pollset->mu (which we already have) + - pollset->pi_mu + - pollset->polling_island->mu */ + gpr_mu_lock(&pollset->pi_mu); + pollset->polling_island = + polling_island_update_and_lock(pollset->polling_island, 1, 0); - /* If you want to ignore epoll's ability to sanely handle parallel pollers, - * for a more apples-to-apples performance comparison with poll, add a - * if (pollset->counter != 0) { return 0; } - * here. - */ + epoll_fd = pollset->polling_island->epoll_fd; + /* Release the locks */ + polling_island_unref_and_unlock(pollset->polling_island, 0); /* Keep the ref*/ + gpr_mu_unlock(&pollset->pi_mu); gpr_mu_unlock(&pollset->mu); - timeout_ms = poll_deadline_to_millis_timeout(deadline, now); - do { - /* The following epoll_wait never blocks; it has a timeout of 0 */ - ep_rv = epoll_wait(epoll_fd, ep_ev, GRPC_EPOLL_MAX_EVENTS, timeout_ms); + ep_rv = epoll_pwait(epoll_fd, ep_ev, GRPC_EPOLL_MAX_EVENTS, timeout_ms, + sig_mask); + if (ep_rv < 0) { if (errno != EINTR) { - gpr_log(GPR_ERROR, "epoll_wait() failed: %s", strerror(errno)); + /* TODO (sreek) - Check for bad file descriptor error */ + gpr_log(GPR_ERROR, "epoll_pwait() failed: %s", strerror(errno)); } } else { int i; for (i = 0; i < ep_rv; ++i) { grpc_fd *fd = ep_ev[i].data.ptr; - /* TODO(klempner): We might want to consider making err and pri - * separate events */ int cancel = ep_ev[i].events & (EPOLLERR | EPOLLHUP); int read_ev = ep_ev[i].events & (EPOLLIN | EPOLLPRI); int write_ev = ep_ev[i].events & EPOLLOUT; @@ -1168,17 +986,179 @@ static void multipoll_with_epoll_pollset_maybe_work_and_unlock( } } } while (ep_rv == GRPC_EPOLL_MAX_EVENTS); + + GPR_TIMER_END("pollset_work_and_unlock", 0); +} + +/* Release the reference to pollset->polling_island and set it to NULL. + pollset->mu must be held */ +static void pollset_release_polling_island_locked(grpc_pollset *pollset) { + gpr_mu_lock(&pollset->pi_mu); + if (pollset->polling_island) { + pollset->polling_island = + polling_island_update_and_lock(pollset->polling_island, 1, 0); + polling_island_unref_and_unlock(pollset->polling_island, 1); + pollset->polling_island = NULL; + } + gpr_mu_unlock(&pollset->pi_mu); +} + +static void finish_shutdown_locked(grpc_exec_ctx *exec_ctx, + grpc_pollset *pollset) { + /* The pollset cannot have any workers if we are at this stage */ + GPR_ASSERT(!pollset_has_workers(pollset)); + + pollset->finish_shutdown_called = true; + pollset_release_polling_island_locked(pollset); + + grpc_exec_ctx_enqueue(exec_ctx, pollset->shutdown_done, true, NULL); +} + +/* pollset->mu lock must be held by the caller before calling this */ +static void pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, + grpc_closure *closure) { + GPR_TIMER_BEGIN("pollset_shutdown", 0); + GPR_ASSERT(!pollset->shutting_down); + pollset->shutting_down = true; + pollset->shutdown_done = closure; + pollset_kick(pollset, GRPC_POLLSET_KICK_BROADCAST); + + /* If the pollset has any workers, we cannot call finish_shutdown_locked() + because it would release the underlying polling island. In such a case, we + let the last worker call finish_shutdown_locked() from pollset_work() */ + if (!pollset_has_workers(pollset)) { + GPR_ASSERT(!pollset->finish_shutdown_called); + GPR_TIMER_MARK("pollset_shutdown.finish_shutdown_locked", 0); + finish_shutdown_locked(exec_ctx, pollset); + } + GPR_TIMER_END("pollset_shutdown", 0); } -static void multipoll_with_epoll_pollset_finish_shutdown( - grpc_pollset *pollset) {} +/* TODO(sreek) Is pollset_shutdown() guranteed to be called before this? */ +static void pollset_destroy(grpc_pollset *pollset) { + GPR_ASSERT(!pollset_has_workers(pollset)); + gpr_mu_destroy(&pollset->pi_mu); + gpr_mu_destroy(&pollset->mu); +} -static void multipoll_with_epoll_pollset_destroy(grpc_pollset *pollset) { - close(pollset->epoll_fd); +static void pollset_reset(grpc_pollset *pollset) { + GPR_ASSERT(pollset->shutting_down); + GPR_ASSERT(!pollset_has_workers(pollset)); + pollset->shutting_down = false; + pollset->finish_shutdown_called = false; + pollset->kicked_without_pollers = false; + /* TODO(sreek) - Should pollset->shutdown closure be set to NULL here? */ + pollset_release_polling_island_locked(pollset); +} + +/* pollset->mu lock must be held by the caller before calling this. + The function pollset_work() may temporarily release the lock (pollset->mu) + during the course of its execution but it will always re-acquire the lock and + ensure that it is held by the time the function returns */ +static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, + grpc_pollset_worker **worker_hdl, gpr_timespec now, + gpr_timespec deadline) { + GPR_TIMER_BEGIN("pollset_work", 0); + + int timeout_ms = poll_deadline_to_millis_timeout(deadline, now); + + sigset_t new_mask; + sigset_t orig_mask; + + grpc_pollset_worker worker; + worker.next = worker.prev = NULL; + worker.kicked_specifically = 0; + worker.pt_id = pthread_self(); + + *worker_hdl = &worker; + + if (pollset->kicked_without_pollers) { + /* If the pollset was kicked without pollers, pretend that the current + worker got the kick and skip polling. A kick indicates that there is some + work that needs attention like an event on the completion queue or an + alarm */ + GPR_TIMER_MARK("pollset_work.kicked_without_pollers", 0); + pollset->kicked_without_pollers = 0; + } else if (!pollset->shutting_down) { + sigemptyset(&new_mask); + sigaddset(&new_mask, SIGUSR1); + pthread_sigmask(SIG_BLOCK, &new_mask, &orig_mask); + sigdelset(&orig_mask, SIGUSR1); + + push_front_worker(pollset, &worker); + + pollset_work_and_unlock(exec_ctx, pollset, timeout_ms, &orig_mask); + grpc_exec_ctx_flush(exec_ctx); + + gpr_mu_lock(&pollset->mu); + remove_worker(pollset, &worker); + } + + /* If we are the last worker on the pollset (i.e pollset_has_workers() is + false at this point) and the pollset is shutting down, we may have to + finish the shutdown process by calling finish_shutdown_locked(). + See pollset_shutdown() for more details. + + Note: Continuing to access pollset here is safe; it is the caller's + responsibility to not destroy a pollset when it has outstanding calls to + pollset_work() */ + if (pollset->shutting_down && !pollset_has_workers(pollset) && + !pollset->finish_shutdown_called) { + GPR_TIMER_MARK("pollset_work.finish_shutdown_locked", 0); + finish_shutdown_locked(exec_ctx, pollset); + + gpr_mu_unlock(&pollset->mu); + grpc_exec_ctx_flush(exec_ctx); + gpr_mu_lock(&pollset->mu); + } + + *worker_hdl = NULL; + GPR_TIMER_END("pollset_work", 0); +} + +static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, + grpc_fd *fd) { + /* TODO sreek - Check if we need to get a pollset->mu lock here */ + gpr_mu_lock(&pollset->pi_mu); + gpr_mu_lock(&fd->pi_mu); + + polling_island *pi_new = NULL; + + /* 1) If fd->polling_island and pollset->polling_island are both non-NULL and + * equal, do nothing. + * 2) If fd->polling_island and pollset->polling_island are both NULL, create + * a new polling island (with a refcount of 2) and make the polling_island + * fields in both fd and pollset to point to the new island + * 3) If one of fd->polling_island or pollset->polling_island is NULL, update + * the NULL polling_island field to point to the non-NULL polling_island + * field (ensure that the refcount on the polling island is incremented by + * 1 to account for the newly added reference) + * 4) Finally, if fd->polling_island and pollset->polling_island are non-NULL + * and different, merge both the polling islands and update the + * polling_island fields in both fd and pollset to point to the merged + * polling island. + */ + if (fd->polling_island == pollset->polling_island) { + pi_new = fd->polling_island; + if (pi_new == NULL) { + pi_new = polling_island_create(fd, 2); + } + } else if (fd->polling_island == NULL) { + pi_new = polling_island_update_and_lock(pollset->polling_island, 1, 1); + } else if (pollset->polling_island == NULL) { + pi_new = polling_island_update_and_lock(fd->polling_island, 1, 1); + } else { + pi_new = polling_island_merge(fd->polling_island, pollset->polling_island); + } + + fd->polling_island = pollset->polling_island = pi_new; + + gpr_mu_unlock(&fd->pi_mu); + gpr_mu_unlock(&pollset->pi_mu); } /******************************************************************************* - * pollset_set_posix.c + * Pollset-set Definitions */ static grpc_pollset_set *pollset_set_create(void) { @@ -1200,6 +1180,45 @@ static void pollset_set_destroy(grpc_pollset_set *pollset_set) { gpr_free(pollset_set); } +static void pollset_set_add_fd(grpc_exec_ctx *exec_ctx, + grpc_pollset_set *pollset_set, grpc_fd *fd) { + size_t i; + gpr_mu_lock(&pollset_set->mu); + if (pollset_set->fd_count == pollset_set->fd_capacity) { + pollset_set->fd_capacity = GPR_MAX(8, 2 * pollset_set->fd_capacity); + pollset_set->fds = gpr_realloc( + pollset_set->fds, pollset_set->fd_capacity * sizeof(*pollset_set->fds)); + } + GRPC_FD_REF(fd, "pollset_set"); + pollset_set->fds[pollset_set->fd_count++] = fd; + for (i = 0; i < pollset_set->pollset_count; i++) { + pollset_add_fd(exec_ctx, pollset_set->pollsets[i], fd); + } + for (i = 0; i < pollset_set->pollset_set_count; i++) { + pollset_set_add_fd(exec_ctx, pollset_set->pollset_sets[i], fd); + } + gpr_mu_unlock(&pollset_set->mu); +} + +static void pollset_set_del_fd(grpc_exec_ctx *exec_ctx, + grpc_pollset_set *pollset_set, grpc_fd *fd) { + size_t i; + gpr_mu_lock(&pollset_set->mu); + for (i = 0; i < pollset_set->fd_count; i++) { + if (pollset_set->fds[i] == fd) { + pollset_set->fd_count--; + GPR_SWAP(grpc_fd *, pollset_set->fds[i], + pollset_set->fds[pollset_set->fd_count]); + GRPC_FD_UNREF(fd, "pollset_set"); + break; + } + } + for (i = 0; i < pollset_set->pollset_set_count; i++) { + pollset_set_del_fd(exec_ctx, pollset_set->pollset_sets[i], fd); + } + gpr_mu_unlock(&pollset_set->mu); +} + static void pollset_set_add_pollset(grpc_exec_ctx *exec_ctx, grpc_pollset_set *pollset_set, grpc_pollset *pollset) { @@ -1281,47 +1300,8 @@ static void pollset_set_del_pollset_set(grpc_exec_ctx *exec_ctx, gpr_mu_unlock(&bag->mu); } -static void pollset_set_add_fd(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *pollset_set, grpc_fd *fd) { - size_t i; - gpr_mu_lock(&pollset_set->mu); - if (pollset_set->fd_count == pollset_set->fd_capacity) { - pollset_set->fd_capacity = GPR_MAX(8, 2 * pollset_set->fd_capacity); - pollset_set->fds = gpr_realloc( - pollset_set->fds, pollset_set->fd_capacity * sizeof(*pollset_set->fds)); - } - GRPC_FD_REF(fd, "pollset_set"); - pollset_set->fds[pollset_set->fd_count++] = fd; - for (i = 0; i < pollset_set->pollset_count; i++) { - pollset_add_fd(exec_ctx, pollset_set->pollsets[i], fd); - } - for (i = 0; i < pollset_set->pollset_set_count; i++) { - pollset_set_add_fd(exec_ctx, pollset_set->pollset_sets[i], fd); - } - gpr_mu_unlock(&pollset_set->mu); -} - -static void pollset_set_del_fd(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *pollset_set, grpc_fd *fd) { - size_t i; - gpr_mu_lock(&pollset_set->mu); - for (i = 0; i < pollset_set->fd_count; i++) { - if (pollset_set->fds[i] == fd) { - pollset_set->fd_count--; - GPR_SWAP(grpc_fd *, pollset_set->fds[i], - pollset_set->fds[pollset_set->fd_count]); - GRPC_FD_UNREF(fd, "pollset_set"); - break; - } - } - for (i = 0; i < pollset_set->pollset_set_count; i++) { - pollset_set_del_fd(exec_ctx, pollset_set->pollset_sets[i], fd); - } - gpr_mu_unlock(&pollset_set->mu); -} - /******************************************************************************* - * event engine binding + * Event engine binding */ static void shutdown_engine(void) { From 17487f9a22bd57fa05a0b4196bbb19f62ef7eb6c Mon Sep 17 00:00:00 2001 From: yang-g Date: Fri, 3 Jun 2016 15:21:15 -0700 Subject: [PATCH 0860/1894] Make grpc++ independent of protobuf --- BUILD | 19 +- Makefile | 74 +++++-- build.yaml | 35 ++-- .../impl/codegen/core_codegen_interface.h | 2 +- include/grpc++/impl/proto_utils.h | 39 ---- include/grpc++/support/config_protobuf.h | 39 ---- src/compiler/config.h | 11 +- test/cpp/end2end/generic_end2end_test.cc | 2 +- test/cpp/qps/parse_json.cc | 2 - test/cpp/qps/parse_json.h | 2 +- test/cpp/qps/qps_json_driver.cc | 2 +- test/cpp/util/byte_buffer_proto_helper.h | 2 +- tools/doxygen/Doxyfile.c++ | 10 +- tools/doxygen/Doxyfile.c++.internal | 8 +- tools/run_tests/sources_and_headers.json | 42 ++-- vsprojects/vcxproj/grpc++/grpc++.vcxproj | 8 +- .../vcxproj/grpc++/grpc++.vcxproj.filters | 24 +-- .../grpc++_test_util/grpc++_test_util.vcxproj | 57 +++++ .../grpc++_test_util.vcxproj.filters | 194 ++++++++++++++++++ .../grpc++_unsecure/grpc++_unsecure.vcxproj | 8 +- .../grpc++_unsecure.vcxproj.filters | 24 +-- .../grpc_plugin_support.vcxproj | 3 - .../grpc_plugin_support.vcxproj.filters | 12 -- .../codegen_test_full.vcxproj | 4 +- .../codegen_test_full.vcxproj.filters | 12 +- .../codegen_test_minimal.vcxproj | 4 +- .../codegen_test_minimal.vcxproj.filters | 12 +- 27 files changed, 395 insertions(+), 256 deletions(-) delete mode 100644 include/grpc++/impl/proto_utils.h delete mode 100644 include/grpc++/support/config_protobuf.h diff --git a/BUILD b/BUILD index 024a5182ce5..b230b16216b 100644 --- a/BUILD +++ b/BUILD @@ -917,7 +917,6 @@ cc_library( "include/grpc++/impl/client_unary_call.h", "include/grpc++/impl/grpc_library.h", "include/grpc++/impl/method_handler_impl.h", - "include/grpc++/impl/proto_utils.h", "include/grpc++/impl/rpc_method.h", "include/grpc++/impl/rpc_service_method.h", "include/grpc++/impl/serialization_traits.h", @@ -942,6 +941,7 @@ cc_library( "include/grpc++/support/async_unary_call.h", "include/grpc++/support/byte_buffer.h", "include/grpc++/support/channel_arguments.h", + "include/grpc++/support/config.h", "include/grpc++/support/slice.h", "include/grpc++/support/status.h", "include/grpc++/support/status_code_enum.h", @@ -958,11 +958,11 @@ cc_library( "include/grpc++/impl/codegen/client_unary_call.h", "include/grpc++/impl/codegen/completion_queue.h", "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", "include/grpc++/impl/codegen/core_codegen_interface.h", "include/grpc++/impl/codegen/create_auth_context.h", "include/grpc++/impl/codegen/grpc_library.h", "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/proto_utils.h", "include/grpc++/impl/codegen/rpc_method.h", "include/grpc++/impl/codegen/rpc_service_method.h", "include/grpc++/impl/codegen/security/auth_context.h", @@ -1000,10 +1000,6 @@ cc_library( "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/time.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/config_protobuf.h", - "include/grpc++/support/config.h", - "include/grpc++/support/config_protobuf.h", ], includes = [ "include", @@ -1065,7 +1061,6 @@ cc_library( "include/grpc++/impl/client_unary_call.h", "include/grpc++/impl/grpc_library.h", "include/grpc++/impl/method_handler_impl.h", - "include/grpc++/impl/proto_utils.h", "include/grpc++/impl/rpc_method.h", "include/grpc++/impl/rpc_service_method.h", "include/grpc++/impl/serialization_traits.h", @@ -1090,6 +1085,7 @@ cc_library( "include/grpc++/support/async_unary_call.h", "include/grpc++/support/byte_buffer.h", "include/grpc++/support/channel_arguments.h", + "include/grpc++/support/config.h", "include/grpc++/support/slice.h", "include/grpc++/support/status.h", "include/grpc++/support/status_code_enum.h", @@ -1106,11 +1102,11 @@ cc_library( "include/grpc++/impl/codegen/client_unary_call.h", "include/grpc++/impl/codegen/completion_queue.h", "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", "include/grpc++/impl/codegen/core_codegen_interface.h", "include/grpc++/impl/codegen/create_auth_context.h", "include/grpc++/impl/codegen/grpc_library.h", "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/proto_utils.h", "include/grpc++/impl/codegen/rpc_method.h", "include/grpc++/impl/codegen/rpc_service_method.h", "include/grpc++/impl/codegen/security/auth_context.h", @@ -1148,10 +1144,6 @@ cc_library( "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_win32.h", "include/grpc/impl/codegen/time.h", - "include/grpc++/impl/codegen/config.h", - "include/grpc++/impl/codegen/config_protobuf.h", - "include/grpc++/support/config.h", - "include/grpc++/support/config_protobuf.h", ], includes = [ "include", @@ -1193,9 +1185,6 @@ cc_library( "src/compiler/ruby_generator.cc", ], hdrs = [ - "include/grpc++/support/config.h", - "include/grpc++/support/config_protobuf.h", - "include/grpc++/impl/codegen/config.h", "include/grpc++/impl/codegen/config_protobuf.h", ], includes = [ diff --git a/Makefile b/Makefile index 98f6e562c69..b6a55c716ba 100644 --- a/Makefile +++ b/Makefile @@ -3206,7 +3206,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/client_unary_call.h \ include/grpc++/impl/grpc_library.h \ include/grpc++/impl/method_handler_impl.h \ - include/grpc++/impl/proto_utils.h \ include/grpc++/impl/rpc_method.h \ include/grpc++/impl/rpc_service_method.h \ include/grpc++/impl/serialization_traits.h \ @@ -3231,6 +3230,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/support/async_unary_call.h \ include/grpc++/support/byte_buffer.h \ include/grpc++/support/channel_arguments.h \ + include/grpc++/support/config.h \ include/grpc++/support/slice.h \ include/grpc++/support/status.h \ include/grpc++/support/status_code_enum.h \ @@ -3247,11 +3247,11 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/codegen/client_unary_call.h \ include/grpc++/impl/codegen/completion_queue.h \ include/grpc++/impl/codegen/completion_queue_tag.h \ + include/grpc++/impl/codegen/config.h \ include/grpc++/impl/codegen/core_codegen_interface.h \ include/grpc++/impl/codegen/create_auth_context.h \ include/grpc++/impl/codegen/grpc_library.h \ include/grpc++/impl/codegen/method_handler_impl.h \ - include/grpc++/impl/codegen/proto_utils.h \ include/grpc++/impl/codegen/rpc_method.h \ include/grpc++/impl/codegen/rpc_service_method.h \ include/grpc++/impl/codegen/security/auth_context.h \ @@ -3289,10 +3289,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_win32.h \ include/grpc/impl/codegen/time.h \ - include/grpc++/impl/codegen/config.h \ - include/grpc++/impl/codegen/config_protobuf.h \ - include/grpc++/support/config.h \ - include/grpc++/support/config_protobuf.h \ LIBGRPC++_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_SRC)))) @@ -3417,8 +3413,62 @@ LIBGRPC++_TEST_UTIL_SRC = \ test/cpp/util/string_ref_helper.cc \ test/cpp/util/subprocess.cc \ test/cpp/util/test_credentials_provider.cc \ + src/cpp/codegen/codegen_init.cc \ PUBLIC_HEADERS_CXX += \ + include/grpc++/impl/codegen/async_stream.h \ + include/grpc++/impl/codegen/async_unary_call.h \ + include/grpc++/impl/codegen/call.h \ + include/grpc++/impl/codegen/call_hook.h \ + include/grpc++/impl/codegen/channel_interface.h \ + include/grpc++/impl/codegen/client_context.h \ + include/grpc++/impl/codegen/client_unary_call.h \ + include/grpc++/impl/codegen/completion_queue.h \ + include/grpc++/impl/codegen/completion_queue_tag.h \ + include/grpc++/impl/codegen/config.h \ + include/grpc++/impl/codegen/core_codegen_interface.h \ + include/grpc++/impl/codegen/create_auth_context.h \ + include/grpc++/impl/codegen/grpc_library.h \ + include/grpc++/impl/codegen/method_handler_impl.h \ + include/grpc++/impl/codegen/rpc_method.h \ + include/grpc++/impl/codegen/rpc_service_method.h \ + include/grpc++/impl/codegen/security/auth_context.h \ + include/grpc++/impl/codegen/serialization_traits.h \ + include/grpc++/impl/codegen/server_context.h \ + include/grpc++/impl/codegen/server_interface.h \ + include/grpc++/impl/codegen/service_type.h \ + include/grpc++/impl/codegen/status.h \ + include/grpc++/impl/codegen/status_code_enum.h \ + include/grpc++/impl/codegen/string_ref.h \ + include/grpc++/impl/codegen/stub_options.h \ + include/grpc++/impl/codegen/sync.h \ + include/grpc++/impl/codegen/sync_cxx11.h \ + include/grpc++/impl/codegen/sync_no_cxx11.h \ + include/grpc++/impl/codegen/sync_stream.h \ + include/grpc++/impl/codegen/time.h \ + include/grpc/impl/codegen/byte_buffer.h \ + include/grpc/impl/codegen/byte_buffer_reader.h \ + include/grpc/impl/codegen/compression_types.h \ + include/grpc/impl/codegen/connectivity_state.h \ + include/grpc/impl/codegen/grpc_types.h \ + include/grpc/impl/codegen/propagation_bits.h \ + include/grpc/impl/codegen/status.h \ + include/grpc/impl/codegen/alloc.h \ + include/grpc/impl/codegen/atm.h \ + include/grpc/impl/codegen/atm_gcc_atomic.h \ + include/grpc/impl/codegen/atm_gcc_sync.h \ + include/grpc/impl/codegen/atm_win32.h \ + include/grpc/impl/codegen/log.h \ + include/grpc/impl/codegen/port_platform.h \ + include/grpc/impl/codegen/slice.h \ + include/grpc/impl/codegen/slice_buffer.h \ + include/grpc/impl/codegen/sync.h \ + include/grpc/impl/codegen/sync_generic.h \ + include/grpc/impl/codegen/sync_posix.h \ + include/grpc/impl/codegen/sync_win32.h \ + include/grpc/impl/codegen/time.h \ + include/grpc++/impl/codegen/proto_utils.h \ + include/grpc++/impl/codegen/config_protobuf.h \ LIBGRPC++_TEST_UTIL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_TEST_UTIL_SRC)))) @@ -3469,6 +3519,7 @@ $(OBJDIR)/$(CONFIG)/test/cpp/util/create_test_channel.o: $(GENDIR)/src/proto/grp $(OBJDIR)/$(CONFIG)/test/cpp/util/string_ref_helper.o: $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc $(OBJDIR)/$(CONFIG)/test/cpp/util/subprocess.o: $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc $(OBJDIR)/$(CONFIG)/test/cpp/util/test_credentials_provider.o: $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/src/cpp/codegen/codegen_init.o: $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.pb.cc $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc LIBGRPC++_UNSECURE_SRC = \ @@ -3512,7 +3563,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/client_unary_call.h \ include/grpc++/impl/grpc_library.h \ include/grpc++/impl/method_handler_impl.h \ - include/grpc++/impl/proto_utils.h \ include/grpc++/impl/rpc_method.h \ include/grpc++/impl/rpc_service_method.h \ include/grpc++/impl/serialization_traits.h \ @@ -3537,6 +3587,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/support/async_unary_call.h \ include/grpc++/support/byte_buffer.h \ include/grpc++/support/channel_arguments.h \ + include/grpc++/support/config.h \ include/grpc++/support/slice.h \ include/grpc++/support/status.h \ include/grpc++/support/status_code_enum.h \ @@ -3553,11 +3604,11 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/impl/codegen/client_unary_call.h \ include/grpc++/impl/codegen/completion_queue.h \ include/grpc++/impl/codegen/completion_queue_tag.h \ + include/grpc++/impl/codegen/config.h \ include/grpc++/impl/codegen/core_codegen_interface.h \ include/grpc++/impl/codegen/create_auth_context.h \ include/grpc++/impl/codegen/grpc_library.h \ include/grpc++/impl/codegen/method_handler_impl.h \ - include/grpc++/impl/codegen/proto_utils.h \ include/grpc++/impl/codegen/rpc_method.h \ include/grpc++/impl/codegen/rpc_service_method.h \ include/grpc++/impl/codegen/security/auth_context.h \ @@ -3595,10 +3646,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_win32.h \ include/grpc/impl/codegen/time.h \ - include/grpc++/impl/codegen/config.h \ - include/grpc++/impl/codegen/config_protobuf.h \ - include/grpc++/support/config.h \ - include/grpc++/support/config_protobuf.h \ LIBGRPC++_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_UNSECURE_SRC)))) @@ -3658,9 +3705,6 @@ LIBGRPC_PLUGIN_SUPPORT_SRC = \ src/compiler/ruby_generator.cc \ PUBLIC_HEADERS_CXX += \ - include/grpc++/support/config.h \ - include/grpc++/support/config_protobuf.h \ - include/grpc++/impl/codegen/config.h \ include/grpc++/impl/codegen/config_protobuf.h \ LIBGRPC_PLUGIN_SUPPORT_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_PLUGIN_SUPPORT_SRC)))) diff --git a/build.yaml b/build.yaml index f211575e925..804ec27bd25 100644 --- a/build.yaml +++ b/build.yaml @@ -619,7 +619,6 @@ filegroups: - include/grpc++/impl/client_unary_call.h - include/grpc++/impl/grpc_library.h - include/grpc++/impl/method_handler_impl.h - - include/grpc++/impl/proto_utils.h - include/grpc++/impl/rpc_method.h - include/grpc++/impl/rpc_service_method.h - include/grpc++/impl/serialization_traits.h @@ -644,6 +643,7 @@ filegroups: - include/grpc++/support/async_unary_call.h - include/grpc++/support/byte_buffer.h - include/grpc++/support/channel_arguments.h + - include/grpc++/support/config.h - include/grpc++/support/slice.h - include/grpc++/support/status.h - include/grpc++/support/status_code_enum.h @@ -684,9 +684,8 @@ filegroups: deps: - grpc uses: - - grpc++_codegen - - grpc++_config -- name: grpc++_codegen + - grpc++_codegen_base +- name: grpc++_codegen_base language: c++ public_headers: - include/grpc++/impl/codegen/async_stream.h @@ -698,11 +697,11 @@ filegroups: - include/grpc++/impl/codegen/client_unary_call.h - include/grpc++/impl/codegen/completion_queue.h - include/grpc++/impl/codegen/completion_queue_tag.h + - include/grpc++/impl/codegen/config.h - include/grpc++/impl/codegen/core_codegen_interface.h - include/grpc++/impl/codegen/create_auth_context.h - include/grpc++/impl/codegen/grpc_library.h - include/grpc++/impl/codegen/method_handler_impl.h - - include/grpc++/impl/codegen/proto_utils.h - include/grpc++/impl/codegen/rpc_method.h - include/grpc++/impl/codegen/rpc_service_method.h - include/grpc++/impl/codegen/security/auth_context.h @@ -723,18 +722,16 @@ filegroups: - src/cpp/codegen/codegen_init.cc uses: - grpc_codegen - - grpc++_config_codegen -- name: grpc++_config +- name: grpc++_codegen_proto language: c++ public_headers: - - include/grpc++/support/config.h - - include/grpc++/support/config_protobuf.h + - include/grpc++/impl/codegen/proto_utils.h uses: - - grpc++_config_codegen -- name: grpc++_config_codegen + - grpc++_codegen_base + - grpc++_config_proto +- name: grpc++_config_proto language: c++ public_headers: - - include/grpc++/impl/codegen/config.h - include/grpc++/impl/codegen/config_protobuf.h libs: - name: gpr @@ -917,7 +914,7 @@ libs: dll: true filegroups: - grpc++_base - - grpc++_codegen + - grpc++_codegen_base secure: check vs_project_guid: '{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}' - name: grpc++_test_config @@ -952,6 +949,10 @@ libs: deps: - grpc++ - grpc_test_util + filegroups: + - grpc++_codegen_base + - grpc++_codegen_proto + - grpc++_config_proto - name: grpc++_unsecure build: all language: c++ @@ -964,7 +965,7 @@ libs: dll: true filegroups: - grpc++_base - - grpc++_codegen + - grpc++_codegen_base secure: false vs_project_guid: '{6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}' - name: grpc_plugin_support @@ -994,7 +995,7 @@ libs: - src/compiler/python_generator.cc - src/compiler/ruby_generator.cc filegroups: - - grpc++_config + - grpc++_config_proto secure: false vs_project_guid: '{B6E81D84-2ACB-41B8-8781-493A944C7817}' vs_props: @@ -2443,7 +2444,7 @@ targets: - grpc - gpr filegroups: - - grpc++_codegen + - grpc++_codegen_base - name: codegen_test_minimal gtest: true build: test @@ -2457,7 +2458,7 @@ targets: - src/proto/grpc/testing/stats.proto - test/cpp/codegen/codegen_test_minimal.cc filegroups: - - grpc++_codegen + - grpc++_codegen_base - name: credentials_test gtest: true build: test diff --git a/include/grpc++/impl/codegen/core_codegen_interface.h b/include/grpc++/impl/codegen/core_codegen_interface.h index aa9013c4cec..64d882ed5db 100644 --- a/include/grpc++/impl/codegen/core_codegen_interface.h +++ b/include/grpc++/impl/codegen/core_codegen_interface.h @@ -34,7 +34,7 @@ #ifndef GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H #define GRPCXX_IMPL_CODEGEN_CORE_CODEGEN_INTERFACE_H -#include +#include #include #include diff --git a/include/grpc++/impl/proto_utils.h b/include/grpc++/impl/proto_utils.h deleted file mode 100644 index a34cf9bd6c6..00000000000 --- a/include/grpc++/impl/proto_utils.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef GRPCXX_IMPL_PROTO_UTILS_H -#define GRPCXX_IMPL_PROTO_UTILS_H - -#include - -#endif // GRPCXX_IMPL_PROTO_UTILS_H diff --git a/include/grpc++/support/config_protobuf.h b/include/grpc++/support/config_protobuf.h deleted file mode 100644 index 3e7f169652d..00000000000 --- a/include/grpc++/support/config_protobuf.h +++ /dev/null @@ -1,39 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef GRPCXX_SUPPORT_CONFIG_PROTOBUF_H -#define GRPCXX_SUPPORT_CONFIG_PROTOBUF_H - -#include - -#endif // GRPCXX_SUPPORT_CONFIG_PROTOBUF_H diff --git a/src/compiler/config.h b/src/compiler/config.h index d8b95818dbb..f2abb851867 100644 --- a/src/compiler/config.h +++ b/src/compiler/config.h @@ -34,8 +34,7 @@ #ifndef SRC_COMPILER_CONFIG_H #define SRC_COMPILER_CONFIG_H -#include -#include +#include #ifndef GRPC_CUSTOM_DESCRIPTOR #include @@ -75,7 +74,15 @@ #define GRPC_CUSTOM_PARSEGENERATORPARAMETER ::google::protobuf::compiler::ParseGeneratorParameter #endif +#ifndef GRPC_CUSTOM_STRING +#include +#define GRPC_CUSTOM_STRING std::string +#endif + namespace grpc { + +typedef GRPC_CUSTOM_STRING string; + namespace protobuf { typedef GRPC_CUSTOM_DESCRIPTOR Descriptor; typedef GRPC_CUSTOM_FILEDESCRIPTOR FileDescriptor; diff --git a/test/cpp/end2end/generic_end2end_test.cc b/test/cpp/end2end/generic_end2end_test.cc index d0cf6aea9da..57efa5fa17f 100644 --- a/test/cpp/end2end/generic_end2end_test.cc +++ b/test/cpp/end2end/generic_end2end_test.cc @@ -38,7 +38,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/cpp/qps/parse_json.cc b/test/cpp/qps/parse_json.cc index df7a62f0a05..a90bf6153c6 100644 --- a/test/cpp/qps/parse_json.cc +++ b/test/cpp/qps/parse_json.cc @@ -31,8 +31,6 @@ * */ -#include - #include "test/cpp/qps/parse_json.h" #include diff --git a/test/cpp/qps/parse_json.h b/test/cpp/qps/parse_json.h index 4b8ca79f217..42d7d22c53c 100644 --- a/test/cpp/qps/parse_json.h +++ b/test/cpp/qps/parse_json.h @@ -34,8 +34,8 @@ #ifndef TEST_QPS_PARSE_JSON_H #define TEST_QPS_PARSE_JSON_H +#include #include -#include namespace grpc { namespace testing { diff --git a/test/cpp/qps/qps_json_driver.cc b/test/cpp/qps/qps_json_driver.cc index d7642f0e1ee..f5d739f893a 100644 --- a/test/cpp/qps/qps_json_driver.cc +++ b/test/cpp/qps/qps_json_driver.cc @@ -34,7 +34,7 @@ #include #include -#include +#include #include #include diff --git a/test/cpp/util/byte_buffer_proto_helper.h b/test/cpp/util/byte_buffer_proto_helper.h index 42cea59e333..007723c6910 100644 --- a/test/cpp/util/byte_buffer_proto_helper.h +++ b/test/cpp/util/byte_buffer_proto_helper.h @@ -36,8 +36,8 @@ #include +#include #include -#include namespace grpc { namespace testing { diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 798d68b0181..3ea0df94e57 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -772,7 +772,6 @@ include/grpc++/impl/call.h \ include/grpc++/impl/client_unary_call.h \ include/grpc++/impl/grpc_library.h \ include/grpc++/impl/method_handler_impl.h \ -include/grpc++/impl/proto_utils.h \ include/grpc++/impl/rpc_method.h \ include/grpc++/impl/rpc_service_method.h \ include/grpc++/impl/serialization_traits.h \ @@ -797,6 +796,7 @@ include/grpc++/support/async_stream.h \ include/grpc++/support/async_unary_call.h \ include/grpc++/support/byte_buffer.h \ include/grpc++/support/channel_arguments.h \ +include/grpc++/support/config.h \ include/grpc++/support/slice.h \ include/grpc++/support/status.h \ include/grpc++/support/status_code_enum.h \ @@ -813,11 +813,11 @@ include/grpc++/impl/codegen/client_context.h \ include/grpc++/impl/codegen/client_unary_call.h \ include/grpc++/impl/codegen/completion_queue.h \ include/grpc++/impl/codegen/completion_queue_tag.h \ +include/grpc++/impl/codegen/config.h \ include/grpc++/impl/codegen/core_codegen_interface.h \ include/grpc++/impl/codegen/create_auth_context.h \ include/grpc++/impl/codegen/grpc_library.h \ include/grpc++/impl/codegen/method_handler_impl.h \ -include/grpc++/impl/codegen/proto_utils.h \ include/grpc++/impl/codegen/rpc_method.h \ include/grpc++/impl/codegen/rpc_service_method.h \ include/grpc++/impl/codegen/security/auth_context.h \ @@ -854,11 +854,7 @@ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_win32.h \ -include/grpc/impl/codegen/time.h \ -include/grpc++/impl/codegen/config.h \ -include/grpc++/impl/codegen/config_protobuf.h \ -include/grpc++/support/config.h \ -include/grpc++/support/config_protobuf.h +include/grpc/impl/codegen/time.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index ce1d6ac3c1b..5107d8f6a10 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -772,7 +772,6 @@ include/grpc++/impl/call.h \ include/grpc++/impl/client_unary_call.h \ include/grpc++/impl/grpc_library.h \ include/grpc++/impl/method_handler_impl.h \ -include/grpc++/impl/proto_utils.h \ include/grpc++/impl/rpc_method.h \ include/grpc++/impl/rpc_service_method.h \ include/grpc++/impl/serialization_traits.h \ @@ -797,6 +796,7 @@ include/grpc++/support/async_stream.h \ include/grpc++/support/async_unary_call.h \ include/grpc++/support/byte_buffer.h \ include/grpc++/support/channel_arguments.h \ +include/grpc++/support/config.h \ include/grpc++/support/slice.h \ include/grpc++/support/status.h \ include/grpc++/support/status_code_enum.h \ @@ -813,11 +813,11 @@ include/grpc++/impl/codegen/client_context.h \ include/grpc++/impl/codegen/client_unary_call.h \ include/grpc++/impl/codegen/completion_queue.h \ include/grpc++/impl/codegen/completion_queue_tag.h \ +include/grpc++/impl/codegen/config.h \ include/grpc++/impl/codegen/core_codegen_interface.h \ include/grpc++/impl/codegen/create_auth_context.h \ include/grpc++/impl/codegen/grpc_library.h \ include/grpc++/impl/codegen/method_handler_impl.h \ -include/grpc++/impl/codegen/proto_utils.h \ include/grpc++/impl/codegen/rpc_method.h \ include/grpc++/impl/codegen/rpc_service_method.h \ include/grpc++/impl/codegen/security/auth_context.h \ @@ -855,10 +855,6 @@ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_win32.h \ include/grpc/impl/codegen/time.h \ -include/grpc++/impl/codegen/config.h \ -include/grpc++/impl/codegen/config_protobuf.h \ -include/grpc++/support/config.h \ -include/grpc++/support/config_protobuf.h \ src/cpp/client/secure_credentials.h \ src/cpp/common/core_codegen.h \ src/cpp/common/secure_auth_context.h \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index e0471234954..6eb720e29ea 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -1903,7 +1903,7 @@ "gpr", "grpc", "grpc++", - "grpc++_codegen" + "grpc++_codegen_base" ], "headers": [ "src/proto/grpc/testing/control.grpc.pb.h", @@ -1929,7 +1929,7 @@ }, { "deps": [ - "grpc++_codegen" + "grpc++_codegen_base" ], "headers": [ "src/proto/grpc/testing/control.grpc.pb.h", @@ -4207,7 +4207,7 @@ "deps": [ "grpc", "grpc++_base", - "grpc++_codegen" + "grpc++_codegen_base" ], "headers": [ "src/cpp/client/secure_credentials.h", @@ -4249,6 +4249,9 @@ { "deps": [ "grpc++", + "grpc++_codegen_base", + "grpc++_codegen_proto", + "grpc++_config_proto", "grpc_test_util" ], "headers": [ @@ -4292,7 +4295,7 @@ "gpr", "grpc", "grpc++_base", - "grpc++_codegen", + "grpc++_codegen_base", "grpc_unsecure" ], "headers": [], @@ -4306,7 +4309,7 @@ }, { "deps": [ - "grpc++_config" + "grpc++_config_proto" ], "headers": [ "src/compiler/config.h", @@ -6281,8 +6284,7 @@ { "deps": [ "grpc", - "grpc++_codegen", - "grpc++_config" + "grpc++_codegen_base" ], "headers": [ "include/grpc++/alarm.h", @@ -6297,7 +6299,6 @@ "include/grpc++/impl/client_unary_call.h", "include/grpc++/impl/grpc_library.h", "include/grpc++/impl/method_handler_impl.h", - "include/grpc++/impl/proto_utils.h", "include/grpc++/impl/rpc_method.h", "include/grpc++/impl/rpc_service_method.h", "include/grpc++/impl/serialization_traits.h", @@ -6322,6 +6323,7 @@ "include/grpc++/support/async_unary_call.h", "include/grpc++/support/byte_buffer.h", "include/grpc++/support/channel_arguments.h", + "include/grpc++/support/config.h", "include/grpc++/support/slice.h", "include/grpc++/support/status.h", "include/grpc++/support/status_code_enum.h", @@ -6349,7 +6351,6 @@ "include/grpc++/impl/client_unary_call.h", "include/grpc++/impl/grpc_library.h", "include/grpc++/impl/method_handler_impl.h", - "include/grpc++/impl/proto_utils.h", "include/grpc++/impl/rpc_method.h", "include/grpc++/impl/rpc_service_method.h", "include/grpc++/impl/serialization_traits.h", @@ -6374,6 +6375,7 @@ "include/grpc++/support/async_unary_call.h", "include/grpc++/support/byte_buffer.h", "include/grpc++/support/channel_arguments.h", + "include/grpc++/support/config.h", "include/grpc++/support/slice.h", "include/grpc++/support/status.h", "include/grpc++/support/status_code_enum.h", @@ -6415,7 +6417,6 @@ }, { "deps": [ - "grpc++_config_codegen", "grpc_codegen" ], "headers": [ @@ -6428,11 +6429,11 @@ "include/grpc++/impl/codegen/client_unary_call.h", "include/grpc++/impl/codegen/completion_queue.h", "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", "include/grpc++/impl/codegen/core_codegen_interface.h", "include/grpc++/impl/codegen/create_auth_context.h", "include/grpc++/impl/codegen/grpc_library.h", "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/proto_utils.h", "include/grpc++/impl/codegen/rpc_method.h", "include/grpc++/impl/codegen/rpc_service_method.h", "include/grpc++/impl/codegen/security/auth_context.h", @@ -6451,7 +6452,7 @@ "include/grpc++/impl/codegen/time.h" ], "language": "c++", - "name": "grpc++_codegen", + "name": "grpc++_codegen_base", "src": [ "include/grpc++/impl/codegen/async_stream.h", "include/grpc++/impl/codegen/async_unary_call.h", @@ -6462,11 +6463,11 @@ "include/grpc++/impl/codegen/client_unary_call.h", "include/grpc++/impl/codegen/completion_queue.h", "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", "include/grpc++/impl/codegen/core_codegen_interface.h", "include/grpc++/impl/codegen/create_auth_context.h", "include/grpc++/impl/codegen/grpc_library.h", "include/grpc++/impl/codegen/method_handler_impl.h", - "include/grpc++/impl/codegen/proto_utils.h", "include/grpc++/impl/codegen/rpc_method.h", "include/grpc++/impl/codegen/rpc_service_method.h", "include/grpc++/impl/codegen/security/auth_context.h", @@ -6490,17 +6491,16 @@ }, { "deps": [ - "grpc++_config_codegen" + "grpc++_codegen_base", + "grpc++_config_proto" ], "headers": [ - "include/grpc++/support/config.h", - "include/grpc++/support/config_protobuf.h" + "include/grpc++/impl/codegen/proto_utils.h" ], "language": "c++", - "name": "grpc++_config", + "name": "grpc++_codegen_proto", "src": [ - "include/grpc++/support/config.h", - "include/grpc++/support/config_protobuf.h" + "include/grpc++/impl/codegen/proto_utils.h" ], "third_party": false, "type": "filegroup" @@ -6508,13 +6508,11 @@ { "deps": [], "headers": [ - "include/grpc++/impl/codegen/config.h", "include/grpc++/impl/codegen/config_protobuf.h" ], "language": "c++", - "name": "grpc++_config_codegen", + "name": "grpc++_config_proto", "src": [ - "include/grpc++/impl/codegen/config.h", "include/grpc++/impl/codegen/config_protobuf.h" ], "third_party": false, diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index 65de5e97175..ea2e3b760c6 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -270,7 +270,6 @@ - @@ -295,6 +294,7 @@ + @@ -311,11 +311,11 @@ + - @@ -353,10 +353,6 @@ - - - - diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index ce50bd9de8d..be01bf480de 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -132,9 +132,6 @@ include\grpc++\impl - - include\grpc++\impl - include\grpc++\impl @@ -207,6 +204,9 @@ include\grpc++\support + + include\grpc++\support + include\grpc++\support @@ -255,6 +255,9 @@ include\grpc++\impl\codegen + + include\grpc++\impl\codegen + include\grpc++\impl\codegen @@ -267,9 +270,6 @@ include\grpc++\impl\codegen - - include\grpc++\impl\codegen - include\grpc++\impl\codegen @@ -381,18 +381,6 @@ include\grpc\impl\codegen - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\support - - - include\grpc++\support - diff --git a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj index 33860af620b..14bb50cd4a8 100644 --- a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj @@ -146,6 +146,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -194,6 +249,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters index b35ba1fd91c..03020148345 100644 --- a/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_test_util/grpc++_test_util.vcxproj.filters @@ -31,6 +31,170 @@ test\cpp\util + + src\cpp\codegen + + + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen\security + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + @@ -57,9 +221,39 @@ + + {af3e8efd-71b5-c047-7b1f-9896ff6b9dae} + + + {b8f8ac53-4ea7-9602-a5c8-592da3569a7e} + + + {e6ee8dea-0866-8e41-c115-c3a237f85295} + + + {67705040-57a2-dd65-b4e9-291d6512b10a} + + + {c977e49d-7e35-9e45-54c2-3ec17f4a2027} + + + {28c9540f-2a90-17a6-a18c-c8452c2efd93} + + + {cb0bbb9c-2cd0-46eb-225d-8614a13f30a5} + + + {48b3f0ad-af42-c9fd-74ce-d47ad7ffa748} + {21f220cf-c756-4172-000b-e8a1f0888097} + + {4409f847-2173-ea03-724b-c9181ec50f07} + + + {ba3b353d-1c24-1466-d62d-7da515f5e6f6} + {58b0e1e0-f329-64ce-86e5-8f125c02b96e} diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index 895e2233518..a3b4ec9d6d7 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -270,7 +270,6 @@ - @@ -295,6 +294,7 @@ + @@ -311,11 +311,11 @@ + - @@ -353,10 +353,6 @@ - - - - diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index ab305fa9297..8d7718feada 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -117,9 +117,6 @@ include\grpc++\impl - - include\grpc++\impl - include\grpc++\impl @@ -192,6 +189,9 @@ include\grpc++\support + + include\grpc++\support + include\grpc++\support @@ -240,6 +240,9 @@ include\grpc++\impl\codegen + + include\grpc++\impl\codegen + include\grpc++\impl\codegen @@ -252,9 +255,6 @@ include\grpc++\impl\codegen - - include\grpc++\impl\codegen - include\grpc++\impl\codegen @@ -366,18 +366,6 @@ include\grpc\impl\codegen - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - - - include\grpc++\support - - - include\grpc++\support - diff --git a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj index a81d31768d7..9828b8bcaf0 100644 --- a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj +++ b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj @@ -148,9 +148,6 @@ - - - diff --git a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj.filters b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj.filters index b3d2dc2f3d5..27eb935e074 100644 --- a/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_plugin_support/grpc_plugin_support.vcxproj.filters @@ -21,15 +21,6 @@ - - include\grpc++\support - - - include\grpc++\support - - - include\grpc++\impl\codegen - include\grpc++\impl\codegen @@ -95,9 +86,6 @@ {ec2a6e26-915b-ba1b-4f59-f361dc01105c} - - {1c34d005-1ffb-8a31-881a-c6bb431cda69} - {94c9769a-a6cd-49fd-2b30-e52d2d02ed91} diff --git a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj index 34e939cf845..9697740a572 100644 --- a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj +++ b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj @@ -169,11 +169,11 @@ + - @@ -211,8 +211,6 @@ - - diff --git a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters index d66236580c2..7bd4cafcc69 100644 --- a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters +++ b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters @@ -54,6 +54,9 @@ include\grpc++\impl\codegen + + include\grpc++\impl\codegen + include\grpc++\impl\codegen @@ -66,9 +69,6 @@ include\grpc++\impl\codegen - - include\grpc++\impl\codegen - include\grpc++\impl\codegen @@ -180,12 +180,6 @@ include\grpc\impl\codegen - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - diff --git a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj index 890d77df22c..825bb0b4f4f 100644 --- a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj +++ b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj @@ -169,11 +169,11 @@ + - @@ -211,8 +211,6 @@ - - diff --git a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters index 4e0ba656fc7..e43d9a8dcc3 100644 --- a/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters +++ b/vsprojects/vcxproj/test/codegen_test_minimal/codegen_test_minimal.vcxproj.filters @@ -54,6 +54,9 @@ include\grpc++\impl\codegen + + include\grpc++\impl\codegen + include\grpc++\impl\codegen @@ -66,9 +69,6 @@ include\grpc++\impl\codegen - - include\grpc++\impl\codegen - include\grpc++\impl\codegen @@ -180,12 +180,6 @@ include\grpc\impl\codegen - - include\grpc++\impl\codegen - - - include\grpc++\impl\codegen - From 4eb67b47a0918f5633585cfc3335476139d37685 Mon Sep 17 00:00:00 2001 From: Alistair Veitch Date: Fri, 3 Jun 2016 15:45:04 -0700 Subject: [PATCH 0861/1894] Proto tweaks --- src/core/ext/census/gen/census.pb.c | 25 +++++++------ src/core/ext/census/gen/census.pb.h | 49 ++++++++++++++++--------- src/proto/census/census.proto | 57 ++++++++++++++++++----------- 3 files changed, 82 insertions(+), 49 deletions(-) diff --git a/src/core/ext/census/gen/census.pb.c b/src/core/ext/census/gen/census.pb.c index c73c2c9b7cc..647f0635b74 100644 --- a/src/core/ext/census/gen/census.pb.c +++ b/src/core/ext/census/gen/census.pb.c @@ -67,9 +67,10 @@ const pb_field_t google_census_Resource_MeasurementUnit_fields[4] = { PB_LAST_FIELD }; -const pb_field_t google_census_AggregationDescriptor_fields[3] = { - PB_ONEOF_FIELD(options, 1, MESSAGE , ONEOF, STATIC , FIRST, google_census_AggregationDescriptor, bucket_boundaries, bucket_boundaries, &google_census_AggregationDescriptor_BucketBoundaries_fields), - PB_ONEOF_FIELD(options, 2, MESSAGE , ONEOF, STATIC , FIRST, google_census_AggregationDescriptor, interval_boundaries, interval_boundaries, &google_census_AggregationDescriptor_IntervalBoundaries_fields), +const pb_field_t google_census_AggregationDescriptor_fields[4] = { + PB_FIELD( 1, UENUM , OPTIONAL, STATIC , FIRST, google_census_AggregationDescriptor, type, type, 0), + PB_ONEOF_FIELD(options, 2, MESSAGE , ONEOF, STATIC , OTHER, google_census_AggregationDescriptor, bucket_boundaries, type, &google_census_AggregationDescriptor_BucketBoundaries_fields), + PB_ONEOF_FIELD(options, 3, MESSAGE , ONEOF, STATIC , OTHER, google_census_AggregationDescriptor, interval_boundaries, type, &google_census_AggregationDescriptor_IntervalBoundaries_fields), PB_LAST_FIELD }; @@ -124,19 +125,21 @@ const pb_field_t google_census_View_fields[6] = { PB_LAST_FIELD }; -const pb_field_t google_census_Aggregation_fields[6] = { +const pb_field_t google_census_Aggregation_fields[7] = { PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, google_census_Aggregation, name, name, 0), PB_FIELD( 2, STRING , OPTIONAL, CALLBACK, OTHER, google_census_Aggregation, description, name, 0), - PB_ONEOF_FIELD(data, 3, MESSAGE , ONEOF, STATIC , OTHER, google_census_Aggregation, distribution, description, &google_census_Distribution_fields), - PB_ONEOF_FIELD(data, 4, MESSAGE , ONEOF, STATIC , OTHER, google_census_Aggregation, interval_stats, description, &google_census_IntervalStats_fields), - PB_FIELD( 5, MESSAGE , REPEATED, CALLBACK, OTHER, google_census_Aggregation, tag, data.interval_stats, &google_census_Tag_fields), + PB_ONEOF_FIELD(data, 3, UINT64 , ONEOF, STATIC , OTHER, google_census_Aggregation, count, description, 0), + PB_ONEOF_FIELD(data, 4, MESSAGE , ONEOF, STATIC , OTHER, google_census_Aggregation, distribution, description, &google_census_Distribution_fields), + PB_ONEOF_FIELD(data, 5, MESSAGE , ONEOF, STATIC , OTHER, google_census_Aggregation, interval_stats, description, &google_census_IntervalStats_fields), + PB_FIELD( 6, MESSAGE , REPEATED, CALLBACK, OTHER, google_census_Aggregation, tag, data.interval_stats, &google_census_Tag_fields), PB_LAST_FIELD }; -const pb_field_t google_census_Metric_fields[4] = { - PB_FIELD( 1, MESSAGE , REPEATED, CALLBACK, FIRST, google_census_Metric, aggregation, aggregation, &google_census_Aggregation_fields), - PB_FIELD( 2, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_Metric, start, aggregation, &google_census_Timestamp_fields), - PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_Metric, end, start, &google_census_Timestamp_fields), +const pb_field_t google_census_Metric_fields[5] = { + PB_FIELD( 1, STRING , OPTIONAL, CALLBACK, FIRST, google_census_Metric, view_name, view_name, 0), + PB_FIELD( 2, MESSAGE , REPEATED, CALLBACK, OTHER, google_census_Metric, aggregation, view_name, &google_census_Aggregation_fields), + PB_FIELD( 3, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_Metric, start, aggregation, &google_census_Timestamp_fields), + PB_FIELD( 4, MESSAGE , OPTIONAL, STATIC , OTHER, google_census_Metric, end, start, &google_census_Timestamp_fields), PB_LAST_FIELD }; diff --git a/src/core/ext/census/gen/census.pb.h b/src/core/ext/census/gen/census.pb.h index dfb53948204..dae583f33d3 100644 --- a/src/core/ext/census/gen/census.pb.h +++ b/src/core/ext/census/gen/census.pb.h @@ -54,6 +54,13 @@ typedef enum _google_census_Resource_BasicUnit { google_census_Resource_BasicUnit_MAX_UNITS = 5 } google_census_Resource_BasicUnit; +typedef enum _google_census_AggregationDescriptor_AggregationType { + google_census_AggregationDescriptor_AggregationType_UNKNOWN = 0, + google_census_AggregationDescriptor_AggregationType_COUNT = 1, + google_census_AggregationDescriptor_AggregationType_DISTRIBUTION = 2, + google_census_AggregationDescriptor_AggregationType_INTERVAL = 3 +} google_census_AggregationDescriptor_AggregationType; + /* Struct definitions */ typedef struct _google_census_AggregationDescriptor_BucketBoundaries { pb_callback_t bounds; @@ -68,6 +75,8 @@ typedef struct _google_census_IntervalStats { } google_census_IntervalStats; typedef struct _google_census_AggregationDescriptor { + bool has_type; + google_census_AggregationDescriptor_AggregationType type; pb_size_t which_options; union { google_census_AggregationDescriptor_BucketBoundaries bucket_boundaries; @@ -130,6 +139,7 @@ typedef struct _google_census_IntervalStats_Window { } google_census_IntervalStats_Window; typedef struct _google_census_Metric { + pb_callback_t view_name; pb_callback_t aggregation; bool has_start; google_census_Timestamp start; @@ -158,6 +168,7 @@ typedef struct _google_census_Aggregation { pb_callback_t description; pb_size_t which_data; union { + uint64_t count; google_census_Distribution distribution; google_census_IntervalStats interval_stats; } data; @@ -171,7 +182,7 @@ typedef struct _google_census_Aggregation { #define google_census_Timestamp_init_default {false, 0, false, 0} #define google_census_Resource_init_default {{{NULL}, NULL}, {{NULL}, NULL}, false, google_census_Resource_MeasurementUnit_init_default} #define google_census_Resource_MeasurementUnit_init_default {false, 0, {{NULL}, NULL}, {{NULL}, NULL}} -#define google_census_AggregationDescriptor_init_default {0, {google_census_AggregationDescriptor_BucketBoundaries_init_default}} +#define google_census_AggregationDescriptor_init_default {false, (google_census_AggregationDescriptor_AggregationType)0, 0, {google_census_AggregationDescriptor_BucketBoundaries_init_default}} #define google_census_AggregationDescriptor_BucketBoundaries_init_default {{{NULL}, NULL}} #define google_census_AggregationDescriptor_IntervalBoundaries_init_default {{{NULL}, NULL}} #define google_census_Distribution_init_default {false, 0, false, 0, false, google_census_Distribution_Range_init_default, {{NULL}, NULL}} @@ -180,13 +191,13 @@ typedef struct _google_census_Aggregation { #define google_census_IntervalStats_Window_init_default {false, google_census_Duration_init_default, false, 0, false, 0} #define google_census_Tag_init_default {false, "", false, ""} #define google_census_View_init_default {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, false, google_census_AggregationDescriptor_init_default, {{NULL}, NULL}} -#define google_census_Aggregation_init_default {{{NULL}, NULL}, {{NULL}, NULL}, 0, {google_census_Distribution_init_default}, {{NULL}, NULL}} -#define google_census_Metric_init_default {{{NULL}, NULL}, false, google_census_Timestamp_init_default, false, google_census_Timestamp_init_default} +#define google_census_Aggregation_init_default {{{NULL}, NULL}, {{NULL}, NULL}, 0, {0}, {{NULL}, NULL}} +#define google_census_Metric_init_default {{{NULL}, NULL}, {{NULL}, NULL}, false, google_census_Timestamp_init_default, false, google_census_Timestamp_init_default} #define google_census_Duration_init_zero {false, 0, false, 0} #define google_census_Timestamp_init_zero {false, 0, false, 0} #define google_census_Resource_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, false, google_census_Resource_MeasurementUnit_init_zero} #define google_census_Resource_MeasurementUnit_init_zero {false, 0, {{NULL}, NULL}, {{NULL}, NULL}} -#define google_census_AggregationDescriptor_init_zero {0, {google_census_AggregationDescriptor_BucketBoundaries_init_zero}} +#define google_census_AggregationDescriptor_init_zero {false, (google_census_AggregationDescriptor_AggregationType)0, 0, {google_census_AggregationDescriptor_BucketBoundaries_init_zero}} #define google_census_AggregationDescriptor_BucketBoundaries_init_zero {{{NULL}, NULL}} #define google_census_AggregationDescriptor_IntervalBoundaries_init_zero {{{NULL}, NULL}} #define google_census_Distribution_init_zero {false, 0, false, 0, false, google_census_Distribution_Range_init_zero, {{NULL}, NULL}} @@ -195,16 +206,17 @@ typedef struct _google_census_Aggregation { #define google_census_IntervalStats_Window_init_zero {false, google_census_Duration_init_zero, false, 0, false, 0} #define google_census_Tag_init_zero {false, "", false, ""} #define google_census_View_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, {{NULL}, NULL}, false, google_census_AggregationDescriptor_init_zero, {{NULL}, NULL}} -#define google_census_Aggregation_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, 0, {google_census_Distribution_init_zero}, {{NULL}, NULL}} -#define google_census_Metric_init_zero {{{NULL}, NULL}, false, google_census_Timestamp_init_zero, false, google_census_Timestamp_init_zero} +#define google_census_Aggregation_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, 0, {0}, {{NULL}, NULL}} +#define google_census_Metric_init_zero {{{NULL}, NULL}, {{NULL}, NULL}, false, google_census_Timestamp_init_zero, false, google_census_Timestamp_init_zero} /* Field tags (for use in manual encoding/decoding) */ #define google_census_AggregationDescriptor_BucketBoundaries_bounds_tag 1 #define google_census_AggregationDescriptor_IntervalBoundaries_window_size_tag 1 #define google_census_IntervalStats_window_tag 1 -#define google_census_AggregationDescriptor_bucket_boundaries_tag 1 +#define google_census_AggregationDescriptor_bucket_boundaries_tag 2 -#define google_census_AggregationDescriptor_interval_boundaries_tag 2 +#define google_census_AggregationDescriptor_interval_boundaries_tag 3 +#define google_census_AggregationDescriptor_type_tag 1 #define google_census_Distribution_Range_min_tag 1 #define google_census_Distribution_Range_max_tag 2 #define google_census_Duration_seconds_tag 1 @@ -223,9 +235,10 @@ typedef struct _google_census_Aggregation { #define google_census_IntervalStats_Window_window_size_tag 1 #define google_census_IntervalStats_Window_count_tag 2 #define google_census_IntervalStats_Window_mean_tag 3 -#define google_census_Metric_aggregation_tag 1 -#define google_census_Metric_start_tag 2 -#define google_census_Metric_end_tag 3 +#define google_census_Metric_view_name_tag 1 +#define google_census_Metric_aggregation_tag 2 +#define google_census_Metric_start_tag 3 +#define google_census_Metric_end_tag 4 #define google_census_Resource_name_tag 1 #define google_census_Resource_description_tag 2 #define google_census_Resource_unit_tag 3 @@ -234,19 +247,21 @@ typedef struct _google_census_Aggregation { #define google_census_View_resource_name_tag 3 #define google_census_View_aggregation_tag 4 #define google_census_View_tag_key_tag 5 -#define google_census_Aggregation_distribution_tag 3 +#define google_census_Aggregation_count_tag 3 + +#define google_census_Aggregation_distribution_tag 4 -#define google_census_Aggregation_interval_stats_tag 4 +#define google_census_Aggregation_interval_stats_tag 5 #define google_census_Aggregation_name_tag 1 #define google_census_Aggregation_description_tag 2 -#define google_census_Aggregation_tag_tag 5 +#define google_census_Aggregation_tag_tag 6 /* Struct field encoding specification for nanopb */ extern const pb_field_t google_census_Duration_fields[3]; extern const pb_field_t google_census_Timestamp_fields[3]; extern const pb_field_t google_census_Resource_fields[4]; extern const pb_field_t google_census_Resource_MeasurementUnit_fields[4]; -extern const pb_field_t google_census_AggregationDescriptor_fields[3]; +extern const pb_field_t google_census_AggregationDescriptor_fields[4]; extern const pb_field_t google_census_AggregationDescriptor_BucketBoundaries_fields[2]; extern const pb_field_t google_census_AggregationDescriptor_IntervalBoundaries_fields[2]; extern const pb_field_t google_census_Distribution_fields[5]; @@ -255,8 +270,8 @@ extern const pb_field_t google_census_IntervalStats_fields[2]; extern const pb_field_t google_census_IntervalStats_Window_fields[4]; extern const pb_field_t google_census_Tag_fields[3]; extern const pb_field_t google_census_View_fields[6]; -extern const pb_field_t google_census_Aggregation_fields[6]; -extern const pb_field_t google_census_Metric_fields[4]; +extern const pb_field_t google_census_Aggregation_fields[7]; +extern const pb_field_t google_census_Metric_fields[5]; /* Maximum encoded size of messages (where known) */ #define google_census_Duration_size 22 diff --git a/src/proto/census/census.proto b/src/proto/census/census.proto index 56c291ff17c..c2a594b6415 100644 --- a/src/proto/census/census.proto +++ b/src/proto/census/census.proto @@ -121,7 +121,7 @@ message Resource { // denominator: SECS // denominator: SECS // - // To specify multiples (in power of 10) units, specify a non-zero prefix + // To specify multiples (in power of 10) of units, specify a non-zero prefix // value, for example: // // - MB/s (i.e. megabytes / s): @@ -145,22 +145,33 @@ message Resource { // An Aggregation summarizes a series of individual Resource measurements, an // AggregationDescriptor describes an Aggregation. message AggregationDescriptor { - // At most one set of options. If neither option is set, a default type - // of Distribution (without a histogram component) will be used. + enum AggregationType { + // Unspecified. Should not be used. + UNKNOWN = 0; + // A count of measurements made. + COUNT = 1; + // A Distribution. + DISTRIBUTION = 2; + // Counts over fixed time intervals. + INTERVAL = 3; + } + // The type of Aggregation. + AggregationType type = 1; + + // At most one set of options. It is illegal to specifiy an option for + // COUNT Aggregations. interval_boundaries must be set for INTERVAL types. + // bucket_boundaries are optional for DISTRIBUTION types. oneof options { - // Defines the histogram bucket boundaries for Distributions. - BucketBoundaries bucket_boundaries = 1; + // Defines histogram bucket boundaries for Distributions. + BucketBoundaries bucket_boundaries = 2; // Defines the time windows to record for IntervalStats. - IntervalBoundaries interval_boundaries = 2; + IntervalBoundaries interval_boundaries = 3; } // A Distribution may optionally contain a histogram of the values in the - // population. The bucket boundaries for that histogram is described by - // `bucket_boundaries`. - // - // Describes histogram bucket boundaries. Defines `size(bounds) + 1` (= N) - // buckets (for size(bounds) >= 1; if size(bounds) == 0, then no histogram - // will be defined. The boundaries for bucket index i are: + // population. The bucket boundaries for that histogram are described by + // `bucket_boundaries`. This defines `size(bounds) + 1` (= N) buckets. The + // boundaries for bucket index i are: // // [-infinity, bounds[i]) for i == 0 // [bounds[i-1], bounds[i]) for 0 < i < N-2 @@ -190,8 +201,8 @@ message AggregationDescriptor { // a specified set of histogram buckets, as defined in // Aggregation.bucket_options. // -// The summary statistics are the count, mean, sum of the squared deviation from -// the mean, the minimum, and the maximum of the set of population of values. +// The summary statistics are the count, mean, minimum, and the maximum of the +// set of population of values. // // Although it is not forbidden, it is generally a bad idea to include // non-finite values (infinities or NaNs) in the population of values, as this @@ -237,7 +248,7 @@ message Distribution { message IntervalStats { // Summary statistic over a single time window. message Window { - // The window duration. + // The window duration. Must be positive. Duration window_size = 1; // The number of measurements in this window. int64 count = 2; @@ -285,23 +296,27 @@ message Aggregation { // The data for this Aggregation. oneof data { - Distribution distribution = 3; - IntervalStats interval_stats = 4; + uint64 count = 3; + Distribution distribution = 4; + IntervalStats interval_stats = 5; } // Tags associated with this Aggregation. - repeated Tag tag = 5; + repeated Tag tag = 6; } // A Metric represents all the Aggregations for a particular view. message Metric { + // View associated with this Metric. + string view_name = 1; + // Aggregations - each will have a unique set of tag values for the tag_keys // associated with the corresponding View. - repeated Aggregation aggregation = 1; + repeated Aggregation aggregation = 2; // Start and end timestamps over which the metric was accumulated. These // values are not relevant/defined for IntervalStats aggregations, which are // always accumulated over a fixed time period. - Timestamp start = 2; - Timestamp end = 3; + Timestamp start = 3; + Timestamp end = 4; } From 73ef9154024290e86a3566a574c04992afc93d00 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 3 Jun 2016 15:25:05 -0700 Subject: [PATCH 0862/1894] epoll polling strategy now points to the new code --- src/core/lib/iomgr/ev_epoll_linux.c | 4 ---- src/core/lib/iomgr/ev_posix.c | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index ce42a9e7ce6..ab4224b2d56 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -788,16 +788,12 @@ static void sig_handler(int sig_num) { /* Global state management */ static void pollset_global_init(void) { - gpr_tls_init(&g_current_thread_poller); - gpr_tls_init(&g_current_thread_worker); grpc_wakeup_fd_init(&grpc_global_wakeup_fd); signal(SIGUSR1, sig_handler); } static void pollset_global_shutdown(void) { grpc_wakeup_fd_destroy(&grpc_global_wakeup_fd); - gpr_tls_destroy(&g_current_thread_poller); - gpr_tls_destroy(&g_current_thread_worker); } /* Return 1 if the pollset has active threads in pollset_work (pollset must diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index 96399ef8379..b6b113aed3f 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -44,7 +44,7 @@ #include #include -#include "src/core/lib/iomgr/ev_epoll_posix.h" +#include "src/core/lib/iomgr/ev_epoll_linux.h" #include "src/core/lib/iomgr/ev_poll_posix.h" #include "src/core/lib/support/env.h" @@ -62,7 +62,7 @@ typedef struct { } event_engine_factory; static const event_engine_factory g_factories[] = { - {"poll", grpc_init_poll_posix}, {"epoll", grpc_init_epoll_posix}, + {"poll", grpc_init_poll_posix}, {"epoll", grpc_init_epoll_linux}, }; static void add(const char *beg, const char *end, char ***ss, size_t *ns) { From 34b5861e5cddda7461a2991b861b9d9788dfa96a Mon Sep 17 00:00:00 2001 From: yang-g Date: Fri, 3 Jun 2016 17:30:09 -0700 Subject: [PATCH 0863/1894] Spliting filegroup. --- Makefile | 4 ---- build.yaml | 11 +++++++-- test/cpp/util/proto_file_parser.cc | 2 +- tools/run_tests/sources_and_headers.json | 24 +++++++++++++++---- .../codegen_test_full.vcxproj | 2 -- .../codegen_test_full.vcxproj.filters | 9 ------- 6 files changed, 30 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index 479492aa221..bbbb02a4943 100644 --- a/Makefile +++ b/Makefile @@ -10009,7 +10009,6 @@ CODEGEN_TEST_FULL_SRC = \ $(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 \ test/cpp/codegen/codegen_test_full.cc \ - src/cpp/codegen/codegen_init.cc \ CODEGEN_TEST_FULL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(CODEGEN_TEST_FULL_SRC)))) ifeq ($(NO_SECURE),true) @@ -10052,8 +10051,6 @@ $(OBJDIR)/$(CONFIG)/src/proto/grpc/testing/stats.o: $(LIBDIR)/$(CONFIG)/libgrpc $(OBJDIR)/$(CONFIG)/test/cpp/codegen/codegen_test_full.o: $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a -$(OBJDIR)/$(CONFIG)/src/cpp/codegen/codegen_init.o: $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a - deps_codegen_test_full: $(CODEGEN_TEST_FULL_OBJS:.o=.dep) ifneq ($(NO_SECURE),true) @@ -10062,7 +10059,6 @@ ifneq ($(NO_DEPS),true) 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)/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 CODEGEN_TEST_MINIMAL_SRC = \ diff --git a/build.yaml b/build.yaml index ccb276937be..84fadf8d329 100644 --- a/build.yaml +++ b/build.yaml @@ -143,6 +143,11 @@ filegroups: - include/grpc/impl/codegen/sync_posix.h - include/grpc/impl/codegen/sync_windows.h - include/grpc/impl/codegen/time.h +- name: grpc++_codegen_base_src + src: + - src/cpp/codegen/codegen_init.cc + uses: + - grpc++_codegen_base - name: grpc_base public_headers: - include/grpc/byte_buffer.h @@ -728,8 +733,6 @@ filegroups: - include/grpc++/impl/codegen/sync_no_cxx11.h - include/grpc++/impl/codegen/sync_stream.h - include/grpc++/impl/codegen/time.h - src: - - src/cpp/codegen/codegen_init.cc uses: - grpc_codegen - name: grpc++_codegen_proto @@ -927,6 +930,7 @@ libs: filegroups: - grpc++_base - grpc++_codegen_base + - grpc++_codegen_base_src secure: check vs_project_guid: '{C187A093-A0FE-489D-A40A-6E33DE0F9FEB}' - name: grpc++_test_config @@ -961,6 +965,7 @@ libs: - grpc_test_util filegroups: - grpc++_codegen_base + - grpc++_codegen_base_src - grpc++_codegen_proto - grpc++_config_proto - name: grpc++_unsecure @@ -976,6 +981,7 @@ libs: filegroups: - grpc++_base - grpc++_codegen_base + - grpc++_codegen_base_src secure: false vs_project_guid: '{6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}' - name: grpc_cli_libs @@ -2477,6 +2483,7 @@ targets: - test/cpp/codegen/codegen_test_minimal.cc filegroups: - grpc++_codegen_base + - grpc++_codegen_base_src - name: credentials_test gtest: true build: test diff --git a/test/cpp/util/proto_file_parser.cc b/test/cpp/util/proto_file_parser.cc index cf5cf17df88..25aec329eb3 100644 --- a/test/cpp/util/proto_file_parser.cc +++ b/test/cpp/util/proto_file_parser.cc @@ -37,8 +37,8 @@ #include #include -#include #include +#include namespace grpc { namespace testing { diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 6ea82578533..b050f33eed0 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -1928,7 +1928,8 @@ }, { "deps": [ - "grpc++_codegen_base" + "grpc++_codegen_base", + "grpc++_codegen_base_src" ], "headers": [ "src/proto/grpc/testing/control.grpc.pb.h", @@ -4241,7 +4242,8 @@ "deps": [ "grpc", "grpc++_base", - "grpc++_codegen_base" + "grpc++_codegen_base", + "grpc++_codegen_base_src" ], "headers": [ "src/cpp/client/secure_credentials.h", @@ -4284,6 +4286,7 @@ "deps": [ "grpc++", "grpc++_codegen_base", + "grpc++_codegen_base_src", "grpc++_codegen_proto", "grpc++_config_proto", "grpc_test_util" @@ -4327,6 +4330,7 @@ "grpc", "grpc++_base", "grpc++_codegen_base", + "grpc++_codegen_base_src", "grpc_unsecure" ], "headers": [], @@ -5555,6 +5559,19 @@ "third_party": false, "type": "filegroup" }, + { + "deps": [ + "grpc++_codegen_base" + ], + "headers": [], + "language": "c", + "name": "grpc++_codegen_base_src", + "src": [ + "src/cpp/codegen/codegen_init.cc" + ], + "third_party": false, + "type": "filegroup" + }, { "deps": [ "gpr", @@ -6549,8 +6566,7 @@ "include/grpc++/impl/codegen/sync_cxx11.h", "include/grpc++/impl/codegen/sync_no_cxx11.h", "include/grpc++/impl/codegen/sync_stream.h", - "include/grpc++/impl/codegen/time.h", - "src/cpp/codegen/codegen_init.cc" + "include/grpc++/impl/codegen/time.h" ], "third_party": false, "type": "filegroup" diff --git a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj index bbc33c48c32..e608f7ed3a3 100644 --- a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj +++ b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj @@ -255,8 +255,6 @@ - - diff --git a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters index a4be84f3a26..8fc8f3901b3 100644 --- a/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters +++ b/vsprojects/vcxproj/test/codegen_test_full/codegen_test_full.vcxproj.filters @@ -19,9 +19,6 @@ test\cpp\codegen - - src\cpp\codegen - @@ -207,12 +204,6 @@ {909027fc-be54-d7d9-3e0b-b034a6f7ff8f} - - {0944bc3e-4288-3a9e-81df-b4eb0910e74f} - - - {88566202-70b0-f87e-2ce8-3cd61e5a57da} - {84c6b0c4-1143-abcf-cc7b-3ee6ef87f16a} From 88ee12fbe98685e736366d6a151a10ed103f8979 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 3 Jun 2016 19:26:48 -0700 Subject: [PATCH 0864/1894] Handle pollsets and fds witn no polling islands and fix locking bug in pollset_add_fd --- src/core/lib/iomgr/ev_epoll_linux.c | 83 ++++++++++++++++------------- 1 file changed, 45 insertions(+), 38 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index ab4224b2d56..0fb1ccfa0fe 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -701,12 +701,14 @@ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, - Decrement the ref count on the polling island and det fd->polling_island to NULL */ gpr_mu_lock(&fd->pi_mu); - - fd->polling_island = polling_island_update_and_lock(fd->polling_island, 1, 0); - polling_island_remove_fd_locked(fd->polling_island, fd, !fd->released, true); - polling_island_unref_and_unlock(fd->polling_island, 1); - fd->polling_island = NULL; - + if (fd->polling_island != NULL) { + fd->polling_island = + polling_island_update_and_lock(fd->polling_island, 1, 0); + polling_island_remove_fd_locked(fd->polling_island, fd, !fd->released, + true); + polling_island_unref_and_unlock(fd->polling_island, 1); + fd->polling_island = NULL; + } gpr_mu_unlock(&fd->pi_mu); grpc_exec_ctx_enqueue(exec_ctx, fd->on_done_closure, true, NULL); @@ -926,13 +928,12 @@ static void fd_become_writable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { set_ready(exec_ctx, fd, &fd->write_closure); } -/* TODO(klempner): We probably want to turn this down a bit */ #define GRPC_EPOLL_MAX_EVENTS 1000 static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, int timeout_ms, sigset_t *sig_mask) { struct epoll_event ep_ev[GRPC_EPOLL_MAX_EVENTS]; - int epoll_fd; + int epoll_fd = -1; int ep_rv; GPR_TIMER_BEGIN("pollset_work_and_unlock", 0); @@ -943,45 +944,49 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, - pollset->pi_mu - pollset->polling_island->mu */ gpr_mu_lock(&pollset->pi_mu); - pollset->polling_island = - polling_island_update_and_lock(pollset->polling_island, 1, 0); - epoll_fd = pollset->polling_island->epoll_fd; + if (pollset->polling_island != NULL) { + pollset->polling_island = + polling_island_update_and_lock(pollset->polling_island, 1, 0); + epoll_fd = pollset->polling_island->epoll_fd; + gpr_mu_unlock(&pollset->polling_island->mu); + } - /* Release the locks */ - polling_island_unref_and_unlock(pollset->polling_island, 0); /* Keep the ref*/ gpr_mu_unlock(&pollset->pi_mu); gpr_mu_unlock(&pollset->mu); - do { - ep_rv = epoll_pwait(epoll_fd, ep_ev, GRPC_EPOLL_MAX_EVENTS, timeout_ms, - sig_mask); + /* If epoll_fd == -1, this is a blank pollset and does not have any fds yet */ + if (epoll_fd != -1) { + do { + ep_rv = epoll_pwait(epoll_fd, ep_ev, GRPC_EPOLL_MAX_EVENTS, timeout_ms, + sig_mask); - if (ep_rv < 0) { - if (errno != EINTR) { - /* TODO (sreek) - Check for bad file descriptor error */ - gpr_log(GPR_ERROR, "epoll_pwait() failed: %s", strerror(errno)); - } - } else { - int i; - for (i = 0; i < ep_rv; ++i) { - grpc_fd *fd = ep_ev[i].data.ptr; - int cancel = ep_ev[i].events & (EPOLLERR | EPOLLHUP); - int read_ev = ep_ev[i].events & (EPOLLIN | EPOLLPRI); - int write_ev = ep_ev[i].events & EPOLLOUT; - if (fd == NULL) { - grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); - } else { - if (read_ev || cancel) { - fd_become_readable(exec_ctx, fd); - } - if (write_ev || cancel) { - fd_become_writable(exec_ctx, fd); + if (ep_rv < 0) { + if (errno != EINTR) { + /* TODO (sreek) - Check for bad file descriptor error */ + gpr_log(GPR_ERROR, "epoll_pwait() failed: %s", strerror(errno)); + } + } else { + int i; + for (i = 0; i < ep_rv; ++i) { + grpc_fd *fd = ep_ev[i].data.ptr; + int cancel = ep_ev[i].events & (EPOLLERR | EPOLLHUP); + int read_ev = ep_ev[i].events & (EPOLLIN | EPOLLPRI); + int write_ev = ep_ev[i].events & EPOLLOUT; + if (fd == NULL) { + grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); + } else { + if (read_ev || cancel) { + fd_become_readable(exec_ctx, fd); + } + if (write_ev || cancel) { + fd_become_writable(exec_ctx, fd); + } } } } - } - } while (ep_rv == GRPC_EPOLL_MAX_EVENTS); + } while (ep_rv == GRPC_EPOLL_MAX_EVENTS); + } GPR_TIMER_END("pollset_work_and_unlock", 0); } @@ -1141,8 +1146,10 @@ static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, } } else if (fd->polling_island == NULL) { pi_new = polling_island_update_and_lock(pollset->polling_island, 1, 1); + gpr_mu_unlock(&pi_new->mu); } else if (pollset->polling_island == NULL) { pi_new = polling_island_update_and_lock(fd->polling_island, 1, 1); + gpr_mu_unlock(&pi_new->mu); } else { pi_new = polling_island_merge(fd->polling_island, pollset->polling_island); } From 79a6233bef501e1f51250351a55abc61cc024827 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Sat, 4 Jun 2016 14:01:03 -0700 Subject: [PATCH 0865/1894] Fix a few bugs in ev_epoll_linux.c 1. pollset_add_fd: Add fd to epoll set if fd->polling_island == NULL 2. close(fd) in fd_orphan instead of polling_island_remove_fd_locked() since fd->polling_island may be NULL 3. If pollset work() is interrupted, do a zero timeout epoll_wait(). pollset_work may be called without a polling island --- src/core/lib/iomgr/ev_epoll_linux.c | 125 +++++++++++++++++----------- 1 file changed, 78 insertions(+), 47 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 0fb1ccfa0fe..3aa26109f22 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -72,9 +72,14 @@ struct grpc_fd { gpr_atm refst; gpr_mu mu; + + /* Indicates that the fd is shutdown and that any pending read/write closures + should fail */ bool shutdown; - int closed; - bool released; + + /* The fd is either closed or we relinquished control of it. In either cases, + this indicates that the 'fd' on this structure is no longer valid */ + bool orphaned; grpc_closure *read_closure; grpc_closure *write_closure; @@ -251,16 +256,13 @@ static void polling_island_remove_all_fds_locked(polling_island *pi, /* The caller is expected to hold pi->mu lock before calling this function */ static void polling_island_remove_fd_locked(polling_island *pi, grpc_fd *fd, - bool close_fd, bool remove_fd_ref) { + bool is_fd_closed) { int err; size_t i; - /* Calling close() on the fd will automatically remove it from the epoll set. - If not calling close(), the fd must be explicitly removed from the epoll - set */ - if (close_fd) { - close(fd->fd); - } else { + /* If fd is already closed, then it would have been automatically been removed + from the epoll set */ + if (!is_fd_closed) { err = epoll_ctl(pi->epoll_fd, EPOLL_CTL_DEL, fd->fd, NULL); if (err < 0 && errno != ENOENT) { gpr_log(GPR_ERROR, "epoll_ctl delete for fd: %d failed with error; %s", @@ -271,9 +273,7 @@ static void polling_island_remove_fd_locked(polling_island *pi, grpc_fd *fd, for (i = 0; i < pi->fd_cnt; i++) { if (pi->fds[i] == fd) { pi->fds[i] = pi->fds[--pi->fd_cnt]; - if (remove_fd_ref) { - GRPC_FD_UNREF(fd, "polling_island"); - } + GRPC_FD_UNREF(fd, "polling_island"); break; } } @@ -644,8 +644,7 @@ static grpc_fd *fd_create(int fd, const char *name) { new_fd->polling_island = NULL; new_fd->freelist_next = NULL; new_fd->on_done_closure = NULL; - new_fd->closed = 0; - new_fd->released = false; + new_fd->orphaned = false; gpr_mu_unlock(&new_fd->mu); @@ -666,7 +665,7 @@ static bool fd_is_orphaned(grpc_fd *fd) { static int fd_wrapped_fd(grpc_fd *fd) { int ret_fd = -1; gpr_mu_lock(&fd->mu); - if (!fd->released && !fd->closed) { + if (!fd->orphaned) { ret_fd = fd->fd; } gpr_mu_unlock(&fd->mu); @@ -678,34 +677,35 @@ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *on_done, int *release_fd, const char *reason) { /* TODO(sreek) In ev_poll_posix.c,the lock is acquired a little later. Why? */ + bool is_fd_closed = false; gpr_mu_lock(&fd->mu); fd->on_done_closure = on_done; /* If release_fd is not NULL, we should be relinquishing control of the file descriptor fd->fd (but we still own the grpc_fd structure). */ - fd->released = release_fd != NULL; - if (!fd->released) { - shutdown(fd->fd, SHUT_RDWR); - } else { + if (release_fd != NULL) { *release_fd = fd->fd; + } else { + close(fd->fd); + is_fd_closed = true; } - REF_BY(fd, 1, reason); /* Remove active status, but keep referenced */ - fd->closed = 1; + fd->orphaned = true; + + /* Remove the active status but keep referenced. We want this grpc_fd struct + to be alive (and not added to freelist) until the end of this function */ + REF_BY(fd, 1, reason); /* Remove the fd from the polling island: - Update the fd->polling_island to point to the latest polling island - - Remove the fd from the polling island. Also, call close() on the file - descriptor fd->fd ONLY if we haven't relinquised control (i.e - fd->released is 'false') - - Decrement the ref count on the polling island and det fd->polling_island - to NULL */ + - Remove the fd from the polling island. + - Remove a ref to the polling island and set fd->polling_island to NULL */ gpr_mu_lock(&fd->pi_mu); if (fd->polling_island != NULL) { fd->polling_island = polling_island_update_and_lock(fd->polling_island, 1, 0); - polling_island_remove_fd_locked(fd->polling_island, fd, !fd->released, - true); + polling_island_remove_fd_locked(fd->polling_island, fd, is_fd_closed); + polling_island_unref_and_unlock(fd->polling_island, 1); fd->polling_island = NULL; } @@ -839,17 +839,20 @@ static void pollset_kick(grpc_pollset *p, grpc_pollset_worker *worker = specific_worker; if (worker != NULL) { if (worker == GRPC_POLLSET_KICK_BROADCAST) { - GPR_TIMER_BEGIN("pollset_kick.broadcast", 0); + gpr_log(GPR_DEBUG, "pollset_kick: broadcast!"); if (pollset_has_workers(p)) { + GPR_TIMER_BEGIN("pollset_kick.broadcast", 0); for (worker = p->root_worker.next; worker != &p->root_worker; worker = worker->next) { pthread_kill(worker->pt_id, SIGUSR1); } } else { + gpr_log(GPR_DEBUG, "pollset_kick: (broadcast) Kicked without pollers"); p->kicked_without_pollers = true; } GPR_TIMER_END("pollset_kick.broadcast", 0); } else { + gpr_log(GPR_DEBUG, "pollset_kick: kicked kicked_specifically"); GPR_TIMER_MARK("kicked_specifically", 0); worker->kicked_specifically = true; pthread_kill(worker->pt_id, SIGUSR1); @@ -860,9 +863,11 @@ static void pollset_kick(grpc_pollset *p, if (worker != NULL) { GPR_TIMER_MARK("finally_kick", 0); push_back_worker(p, worker); + gpr_log(GPR_DEBUG, "pollset_kick: anonymous kick"); pthread_kill(worker->pt_id, SIGUSR1); } else { GPR_TIMER_MARK("kicked_no_pollers", 0); + gpr_log(GPR_DEBUG, "pollset_kick: kicked without pollers"); p->kicked_without_pollers = true; } } @@ -935,6 +940,7 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, struct epoll_event ep_ev[GRPC_EPOLL_MAX_EVENTS]; int epoll_fd = -1; int ep_rv; + gpr_log(GPR_DEBUG, "pollset_work_and_unlock: Entering.."); GPR_TIMER_BEGIN("pollset_work_and_unlock", 0); /* We need to get the epoll_fd to wait on. The epoll_fd is in inside the @@ -949,6 +955,16 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, pollset->polling_island = polling_island_update_and_lock(pollset->polling_island, 1, 0); epoll_fd = pollset->polling_island->epoll_fd; + if (pollset->polling_island->fd_cnt == 0) { + gpr_log(GPR_DEBUG, "pollset_work_and_unlock: epoll_fd: %d, No other fds", + epoll_fd); + } + for (size_t i = 0; i < pollset->polling_island->fd_cnt; i++) { + gpr_log(GPR_DEBUG, + "pollset_work_and_unlock: epoll_fd: %d, fd_count: %d, fd[%d]: %d", + epoll_fd, pollset->polling_island->fd_cnt, i, + pollset->polling_island->fds[i]->fd); + } gpr_mu_unlock(&pollset->polling_island->mu); } @@ -958,36 +974,47 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, /* If epoll_fd == -1, this is a blank pollset and does not have any fds yet */ if (epoll_fd != -1) { do { + gpr_timespec before_epoll = gpr_now(GPR_CLOCK_PRECISE); + gpr_log(GPR_DEBUG, "pollset_work_and_unlock: epoll_wait()...."); ep_rv = epoll_pwait(epoll_fd, ep_ev, GRPC_EPOLL_MAX_EVENTS, timeout_ms, sig_mask); + gpr_timespec after_epoll = gpr_now(GPR_CLOCK_PRECISE); + int dur = gpr_time_to_millis(gpr_time_sub(after_epoll, before_epoll)); + gpr_log(GPR_DEBUG, + "pollset_work_and_unlock: DONE epoll_wait() : %d ms, ep_rv: %d", + dur, ep_rv); if (ep_rv < 0) { if (errno != EINTR) { /* TODO (sreek) - Check for bad file descriptor error */ gpr_log(GPR_ERROR, "epoll_pwait() failed: %s", strerror(errno)); + } else { + gpr_log(GPR_DEBUG, "pollset_work_and_unlock: 0-timeout epoll_wait()"); + ep_rv = epoll_wait(epoll_fd, ep_ev, GRPC_EPOLL_MAX_EVENTS, 0); + gpr_log(GPR_DEBUG, "pollset_work_and_unlock: ep_rv: %d", ep_rv); } - } else { - int i; - for (i = 0; i < ep_rv; ++i) { - grpc_fd *fd = ep_ev[i].data.ptr; - int cancel = ep_ev[i].events & (EPOLLERR | EPOLLHUP); - int read_ev = ep_ev[i].events & (EPOLLIN | EPOLLPRI); - int write_ev = ep_ev[i].events & EPOLLOUT; - if (fd == NULL) { - grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); - } else { - if (read_ev || cancel) { - fd_become_readable(exec_ctx, fd); - } - if (write_ev || cancel) { - fd_become_writable(exec_ctx, fd); - } + } + + int i; + for (i = 0; i < ep_rv; ++i) { + grpc_fd *fd = ep_ev[i].data.ptr; + int cancel = ep_ev[i].events & (EPOLLERR | EPOLLHUP); + int read_ev = ep_ev[i].events & (EPOLLIN | EPOLLPRI); + int write_ev = ep_ev[i].events & EPOLLOUT; + if (fd == NULL) { + grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); + } else { + if (read_ev || cancel) { + fd_become_readable(exec_ctx, fd); + } + if (write_ev || cancel) { + fd_become_writable(exec_ctx, fd); } } } } while (ep_rv == GRPC_EPOLL_MAX_EVENTS); } - + gpr_log(GPR_DEBUG, "pollset_work_and_unlock: Leaving.."); GPR_TIMER_END("pollset_work_and_unlock", 0); } @@ -1060,7 +1087,7 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_pollset_worker **worker_hdl, gpr_timespec now, gpr_timespec deadline) { GPR_TIMER_BEGIN("pollset_work", 0); - + gpr_log(GPR_DEBUG, "pollset_work: enter"); int timeout_ms = poll_deadline_to_millis_timeout(deadline, now); sigset_t new_mask; @@ -1079,6 +1106,7 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, work that needs attention like an event on the completion queue or an alarm */ GPR_TIMER_MARK("pollset_work.kicked_without_pollers", 0); + gpr_log(GPR_INFO, "pollset_work: kicked without pollers.."); pollset->kicked_without_pollers = 0; } else if (!pollset->shutting_down) { sigemptyset(&new_mask); @@ -1113,12 +1141,14 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, gpr_mu_lock(&pollset->mu); } + gpr_log(GPR_DEBUG, "pollset_work(): leaving"); *worker_hdl = NULL; GPR_TIMER_END("pollset_work", 0); } static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_fd *fd) { + gpr_log(GPR_DEBUG, "pollset_add_fd: pollset: %p, fd: %d", pollset, fd->fd); /* TODO sreek - Check if we need to get a pollset->mu lock here */ gpr_mu_lock(&pollset->pi_mu); gpr_mu_lock(&fd->pi_mu); @@ -1146,6 +1176,7 @@ static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, } } else if (fd->polling_island == NULL) { pi_new = polling_island_update_and_lock(pollset->polling_island, 1, 1); + polling_island_add_fds_locked(pollset->polling_island, &fd, 1, true); gpr_mu_unlock(&pi_new->mu); } else if (pollset->polling_island == NULL) { pi_new = polling_island_update_and_lock(fd->polling_island, 1, 1); From b5fe44ea0f7e5ef6f013d6c97725f93a74fed5ef Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Mon, 6 Jun 2016 09:50:38 +0200 Subject: [PATCH 0866/1894] Adding error details for JWT and oauth2. --- src/core/lib/security/credentials/jwt/jwt_credentials.c | 3 ++- .../lib/security/credentials/oauth2/oauth2_credentials.c | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.c b/src/core/lib/security/credentials/jwt/jwt_credentials.c index 0d29729da17..7f96e5247b0 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.c +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.c @@ -116,7 +116,8 @@ static void jwt_get_request_metadata(grpc_exec_ctx *exec_ctx, GRPC_CREDENTIALS_OK, NULL); grpc_credentials_md_store_unref(jwt_md); } else { - cb(exec_ctx, user_data, NULL, 0, GRPC_CREDENTIALS_ERROR, NULL); + cb(exec_ctx, user_data, NULL, 0, GRPC_CREDENTIALS_ERROR, + "Could not generate JWT."); } } diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c index 81457183d2d..a0e4b6fe8e9 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.c +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.c @@ -233,10 +233,11 @@ static void on_oauth2_token_fetcher_http_response( c->token_expiration = gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), token_lifetime); r->cb(exec_ctx, r->user_data, c->access_token_md->entries, - c->access_token_md->num_entries, status, NULL); + c->access_token_md->num_entries, GRPC_CREDENTIALS_OK, NULL); } else { c->token_expiration = gpr_inf_past(GPR_CLOCK_REALTIME); - r->cb(exec_ctx, r->user_data, NULL, 0, status, NULL); + r->cb(exec_ctx, r->user_data, NULL, 0, status, + "Error occured when fetching oauth2 token."); } gpr_mu_unlock(&c->mu); grpc_credentials_metadata_request_destroy(r); From 38c0cdee34697bacb95f34d1a4d31131d0df3af5 Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Mon, 6 Jun 2016 14:46:08 +0200 Subject: [PATCH 0867/1894] Fix double-free issue for optional_message. Also better end to end testing of plumbing of plugin error message. --- .../ext/transport/chttp2/transport/chttp2_transport.c | 8 +++----- test/cpp/end2end/end2end_test.cc | 6 +++++- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 1abc49f435e..b0da0578f5e 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1504,17 +1504,15 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, gpr_slice_buffer_add(&transport_global->qbuf, gpr_slice_ref(*optional_message)); } - gpr_slice_buffer_add( &transport_global->qbuf, grpc_chttp2_rst_stream_create(stream_global->id, GRPC_CHTTP2_NO_ERROR, &stream_global->stats.outgoing)); - - if (optional_message) { - gpr_slice_ref(*optional_message); - } } + if (optional_message) { + gpr_slice_ref(*optional_message); + } grpc_chttp2_fake_status(exec_ctx, transport_global, stream_global, status, optional_message); grpc_chttp2_mark_stream_closed(exec_ctx, transport_global, stream_global, 1, diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index f52aa52f39f..4602145f54b 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -75,6 +75,8 @@ bool CheckIsLocalhost(const grpc::string& addr) { addr.substr(0, kIpv6.size()) == kIpv6; } +const char kTestCredsPluginErrorMsg[] = "Could not find plugin metadata."; + class TestMetadataCredentialsPlugin : public MetadataCredentialsPlugin { public: static const char kMetadataKey[]; @@ -99,7 +101,7 @@ class TestMetadataCredentialsPlugin : public MetadataCredentialsPlugin { metadata->insert(std::make_pair(kMetadataKey, metadata_value_)); return Status::OK; } else { - return Status(StatusCode::NOT_FOUND, "Could not find plugin metadata."); + return Status(StatusCode::NOT_FOUND, kTestCredsPluginErrorMsg); } } @@ -1318,6 +1320,7 @@ TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginFailure) { Status s = stub_->Echo(&context, request, &response); EXPECT_FALSE(s.ok()); EXPECT_EQ(s.error_code(), StatusCode::UNAUTHENTICATED); + EXPECT_EQ(s.error_message(), kTestCredsPluginErrorMsg); } TEST_P(SecureEnd2endTest, NonBlockingAuthMetadataPluginAndProcessorSuccess) { @@ -1375,6 +1378,7 @@ TEST_P(SecureEnd2endTest, BlockingAuthMetadataPluginFailure) { Status s = stub_->Echo(&context, request, &response); EXPECT_FALSE(s.ok()); EXPECT_EQ(s.error_code(), StatusCode::UNAUTHENTICATED); + EXPECT_EQ(s.error_message(), kTestCredsPluginErrorMsg); } TEST_P(SecureEnd2endTest, ClientAuthContext) { From 7d3d4d48cd3a0b916d7f561f6fa525886fb34d8a Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Mon, 6 Jun 2016 14:48:41 +0200 Subject: [PATCH 0868/1894] Fixing clang-format. --- src/core/lib/security/credentials/credentials.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/core/lib/security/credentials/credentials.h b/src/core/lib/security/credentials/credentials.h index c6df6cdf2f7..b097233bee4 100644 --- a/src/core/lib/security/credentials/credentials.h +++ b/src/core/lib/security/credentials/credentials.h @@ -156,12 +156,9 @@ void grpc_credentials_md_store_unref(grpc_credentials_md_store *store); /* --- grpc_call_credentials. --- */ /* error_details must be NULL if status is GRPC_CREDENTIALS_OK. */ -typedef void (*grpc_credentials_metadata_cb)(grpc_exec_ctx *exec_ctx, - void *user_data, - grpc_credentials_md *md_elems, - size_t num_md, - grpc_credentials_status status, - const char *error_details); +typedef void (*grpc_credentials_metadata_cb)( + grpc_exec_ctx *exec_ctx, void *user_data, grpc_credentials_md *md_elems, + size_t num_md, grpc_credentials_status status, const char *error_details); typedef struct { void (*destruct)(grpc_call_credentials *c); From 139098c1882b03bd4571af03a5a7a6694f87e0dd Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 6 Jun 2016 08:10:08 -0700 Subject: [PATCH 0869/1894] Fix cast to avoid potential wraparound --- src/core/lib/transport/metadata.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/lib/transport/metadata.c b/src/core/lib/transport/metadata.c index 751305e5d7c..79de54beb59 100644 --- a/src/core/lib/transport/metadata.c +++ b/src/core/lib/transport/metadata.c @@ -507,8 +507,8 @@ static void grow_mdtab(mdtab_shard *shard) { } static void rehash_mdtab(mdtab_shard *shard) { - if ((size_t)gpr_atm_no_barrier_load(&shard->free_estimate) > - shard->capacity / 4) { + if (gpr_atm_no_barrier_load(&shard->free_estimate) > + (gpr_atm)(shard->capacity / 4)) { gc_mdtab(shard); } else { grow_mdtab(shard); From 4c11a20bf0b6b1d64a2800bcb06f76404294aa84 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Mon, 6 Jun 2016 09:23:25 -0700 Subject: [PATCH 0870/1894] Remove unused files --- BUILD | 6 - Makefile | 38 - binding.gyp | 1 - build.yaml | 14 - config.m4 | 1 - gRPC.podspec | 3 - grpc.gemspec | 2 - package.xml | 2 - src/core/lib/iomgr/ctiller_ev_epoll_linux.c | 461 ------- src/core/lib/iomgr/ev_epoll_linux.c | 2 +- src/core/lib/iomgr/ev_epoll_posix.c | 1209 ----------------- src/core/lib/iomgr/ev_epoll_posix.h | 41 - src/python/grpcio/grpc_core_dependencies.py | 1 - test/core/network_benchmarks/epoll_test.c | 263 ---- .../network_benchmarks/low_level_ping_pong.c | 2 - tools/doxygen/Doxyfile.core.internal | 2 - tools/run_tests/sources_and_headers.json | 19 - tools/run_tests/tests.json | 15 - vsprojects/vcxproj/grpc/grpc.vcxproj | 3 - vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 6 - .../grpc_unsecure/grpc_unsecure.vcxproj | 3 - .../grpc_unsecure.vcxproj.filters | 6 - 22 files changed, 1 insertion(+), 2099 deletions(-) delete mode 100644 src/core/lib/iomgr/ctiller_ev_epoll_linux.c delete mode 100644 src/core/lib/iomgr/ev_epoll_posix.c delete mode 100644 src/core/lib/iomgr/ev_epoll_posix.h delete mode 100644 test/core/network_benchmarks/epoll_test.c diff --git a/BUILD b/BUILD index a32352ebb30..70354a88101 100644 --- a/BUILD +++ b/BUILD @@ -179,7 +179,6 @@ cc_library( "src/core/lib/iomgr/endpoint.h", "src/core/lib/iomgr/endpoint_pair.h", "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_epoll_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -324,7 +323,6 @@ cc_library( "src/core/lib/iomgr/endpoint_pair_posix.c", "src/core/lib/iomgr/endpoint_pair_windows.c", "src/core/lib/iomgr/ev_epoll_linux.c", - "src/core/lib/iomgr/ev_epoll_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -551,7 +549,6 @@ cc_library( "src/core/lib/iomgr/endpoint.h", "src/core/lib/iomgr/endpoint_pair.h", "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_epoll_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -673,7 +670,6 @@ cc_library( "src/core/lib/iomgr/endpoint_pair_posix.c", "src/core/lib/iomgr/endpoint_pair_windows.c", "src/core/lib/iomgr/ev_epoll_linux.c", - "src/core/lib/iomgr/ev_epoll_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -1367,7 +1363,6 @@ objc_library( "src/core/lib/iomgr/endpoint_pair_posix.c", "src/core/lib/iomgr/endpoint_pair_windows.c", "src/core/lib/iomgr/ev_epoll_linux.c", - "src/core/lib/iomgr/ev_epoll_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", "src/core/lib/iomgr/exec_ctx.c", @@ -1573,7 +1568,6 @@ objc_library( "src/core/lib/iomgr/endpoint.h", "src/core/lib/iomgr/endpoint_pair.h", "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_epoll_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", diff --git a/Makefile b/Makefile index 235f32d9a30..1c83aec21e7 100644 --- a/Makefile +++ b/Makefile @@ -903,7 +903,6 @@ dns_resolver_connectivity_test: $(BINDIR)/$(CONFIG)/dns_resolver_connectivity_te dns_resolver_test: $(BINDIR)/$(CONFIG)/dns_resolver_test dualstack_socket_test: $(BINDIR)/$(CONFIG)/dualstack_socket_test endpoint_pair_test: $(BINDIR)/$(CONFIG)/endpoint_pair_test -epoll_test: $(BINDIR)/$(CONFIG)/epoll_test fd_conservation_posix_test: $(BINDIR)/$(CONFIG)/fd_conservation_posix_test fd_posix_test: $(BINDIR)/$(CONFIG)/fd_posix_test fling_client: $(BINDIR)/$(CONFIG)/fling_client @@ -1235,7 +1234,6 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/dns_resolver_test \ $(BINDIR)/$(CONFIG)/dualstack_socket_test \ $(BINDIR)/$(CONFIG)/endpoint_pair_test \ - $(BINDIR)/$(CONFIG)/epoll_test \ $(BINDIR)/$(CONFIG)/fd_conservation_posix_test \ $(BINDIR)/$(CONFIG)/fd_posix_test \ $(BINDIR)/$(CONFIG)/fling_client \ @@ -1499,8 +1497,6 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/dualstack_socket_test || ( echo test dualstack_socket_test failed ; exit 1 ) $(E) "[RUN] Testing endpoint_pair_test" $(Q) $(BINDIR)/$(CONFIG)/endpoint_pair_test || ( echo test endpoint_pair_test failed ; exit 1 ) - $(E) "[RUN] Testing epoll_test" - $(Q) $(BINDIR)/$(CONFIG)/epoll_test || ( echo test epoll_test failed ; exit 1 ) $(E) "[RUN] Testing fd_conservation_posix_test" $(Q) $(BINDIR)/$(CONFIG)/fd_conservation_posix_test || ( echo test fd_conservation_posix_test failed ; exit 1 ) $(E) "[RUN] Testing fd_posix_test" @@ -2491,7 +2487,6 @@ LIBGRPC_SRC = \ src/core/lib/iomgr/endpoint_pair_posix.c \ src/core/lib/iomgr/endpoint_pair_windows.c \ src/core/lib/iomgr/ev_epoll_linux.c \ - src/core/lib/iomgr/ev_epoll_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ @@ -2847,7 +2842,6 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/iomgr/endpoint_pair_posix.c \ src/core/lib/iomgr/endpoint_pair_windows.c \ src/core/lib/iomgr/ev_epoll_linux.c \ - src/core/lib/iomgr/ev_epoll_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ @@ -6581,38 +6575,6 @@ endif endif -EPOLL_TEST_SRC = \ - test/core/network_benchmarks/epoll_test.c \ - -EPOLL_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(EPOLL_TEST_SRC)))) -ifeq ($(NO_SECURE),true) - -# You can't build secure targets if you don't have OpenSSL. - -$(BINDIR)/$(CONFIG)/epoll_test: openssl_dep_error - -else - - - -$(BINDIR)/$(CONFIG)/epoll_test: $(EPOLL_TEST_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) $(EPOLL_TEST_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)/epoll_test - -endif - -$(OBJDIR)/$(CONFIG)/test/core/network_benchmarks/epoll_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a - -deps_epoll_test: $(EPOLL_TEST_OBJS:.o=.dep) - -ifneq ($(NO_SECURE),true) -ifneq ($(NO_DEPS),true) --include $(EPOLL_TEST_OBJS:.o=.dep) -endif -endif - - FD_CONSERVATION_POSIX_TEST_SRC = \ test/core/iomgr/fd_conservation_posix_test.c \ diff --git a/binding.gyp b/binding.gyp index 41e1b5bb416..255998aafd8 100644 --- a/binding.gyp +++ b/binding.gyp @@ -582,7 +582,6 @@ 'src/core/lib/iomgr/endpoint_pair_posix.c', 'src/core/lib/iomgr/endpoint_pair_windows.c', 'src/core/lib/iomgr/ev_epoll_linux.c', - 'src/core/lib/iomgr/ev_epoll_posix.c', 'src/core/lib/iomgr/ev_poll_posix.c', 'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/exec_ctx.c', diff --git a/build.yaml b/build.yaml index db9787546ad..75c7a76bdb3 100644 --- a/build.yaml +++ b/build.yaml @@ -166,7 +166,6 @@ filegroups: - src/core/lib/iomgr/endpoint.h - src/core/lib/iomgr/endpoint_pair.h - src/core/lib/iomgr/ev_epoll_linux.h - - src/core/lib/iomgr/ev_epoll_posix.h - src/core/lib/iomgr/ev_poll_posix.h - src/core/lib/iomgr/ev_posix.h - src/core/lib/iomgr/exec_ctx.h @@ -242,7 +241,6 @@ filegroups: - src/core/lib/iomgr/endpoint_pair_posix.c - src/core/lib/iomgr/endpoint_pair_windows.c - src/core/lib/iomgr/ev_epoll_linux.c - - src/core/lib/iomgr/ev_epoll_posix.c - src/core/lib/iomgr/ev_poll_posix.c - src/core/lib/iomgr/ev_posix.c - src/core/lib/iomgr/exec_ctx.c @@ -1321,18 +1319,6 @@ targets: - grpc - gpr_test_util - gpr -- name: epoll_test - build: test - language: c - src: - - test/core/network_benchmarks/epoll_test.c - deps: - - grpc_test_util - - grpc - - gpr_test_util - - gpr - platforms: - - linux - name: fd_conservation_posix_test build: test language: c diff --git a/config.m4 b/config.m4 index 4308295afda..e2d1c00b6e4 100644 --- a/config.m4 +++ b/config.m4 @@ -101,7 +101,6 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/iomgr/endpoint_pair_posix.c \ src/core/lib/iomgr/endpoint_pair_windows.c \ src/core/lib/iomgr/ev_epoll_linux.c \ - src/core/lib/iomgr/ev_epoll_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ diff --git a/gRPC.podspec b/gRPC.podspec index de55880125a..736ae98b543 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -182,7 +182,6 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/endpoint.h', 'src/core/lib/iomgr/endpoint_pair.h', 'src/core/lib/iomgr/ev_epoll_linux.h', - 'src/core/lib/iomgr/ev_epoll_posix.h', 'src/core/lib/iomgr/ev_poll_posix.h', 'src/core/lib/iomgr/ev_posix.h', 'src/core/lib/iomgr/exec_ctx.h', @@ -361,7 +360,6 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/endpoint_pair_posix.c', 'src/core/lib/iomgr/endpoint_pair_windows.c', 'src/core/lib/iomgr/ev_epoll_linux.c', - 'src/core/lib/iomgr/ev_epoll_posix.c', 'src/core/lib/iomgr/ev_poll_posix.c', 'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/exec_ctx.c', @@ -551,7 +549,6 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/endpoint.h', 'src/core/lib/iomgr/endpoint_pair.h', 'src/core/lib/iomgr/ev_epoll_linux.h', - 'src/core/lib/iomgr/ev_epoll_posix.h', 'src/core/lib/iomgr/ev_poll_posix.h', 'src/core/lib/iomgr/ev_posix.h', 'src/core/lib/iomgr/exec_ctx.h', diff --git a/grpc.gemspec b/grpc.gemspec index 54ae2eb68dd..01b2890493f 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -191,7 +191,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/endpoint.h ) s.files += %w( src/core/lib/iomgr/endpoint_pair.h ) s.files += %w( src/core/lib/iomgr/ev_epoll_linux.h ) - s.files += %w( src/core/lib/iomgr/ev_epoll_posix.h ) s.files += %w( src/core/lib/iomgr/ev_poll_posix.h ) s.files += %w( src/core/lib/iomgr/ev_posix.h ) s.files += %w( src/core/lib/iomgr/exec_ctx.h ) @@ -340,7 +339,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/endpoint_pair_posix.c ) s.files += %w( src/core/lib/iomgr/endpoint_pair_windows.c ) s.files += %w( src/core/lib/iomgr/ev_epoll_linux.c ) - s.files += %w( src/core/lib/iomgr/ev_epoll_posix.c ) s.files += %w( src/core/lib/iomgr/ev_poll_posix.c ) s.files += %w( src/core/lib/iomgr/ev_posix.c ) s.files += %w( src/core/lib/iomgr/exec_ctx.c ) diff --git a/package.xml b/package.xml index d8e82a8bc37..ba6e11fadc7 100644 --- a/package.xml +++ b/package.xml @@ -198,7 +198,6 @@ - @@ -347,7 +346,6 @@ - diff --git a/src/core/lib/iomgr/ctiller_ev_epoll_linux.c b/src/core/lib/iomgr/ctiller_ev_epoll_linux.c deleted file mode 100644 index 23c20a77aae..00000000000 --- a/src/core/lib/iomgr/ctiller_ev_epoll_linux.c +++ /dev/null @@ -1,461 +0,0 @@ -/* - * - * Copyright 2015-2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "src/core/lib/iomgr/ev_epoll_linux.h" - -#include -#include -#include -#include - -#include -#include -#include -#include - -#include "src/core/lib/iomgr/iomgr_internal.h" - -/* TODO(sreek) Remove this file */ - - -//////////////////////////////////////////////////////////////////////////////// -// Definitions - -#define STATE_NOT_READY ((gpr_atm)0) -#define STATE_READY ((gpr_atm)1) - -typedef enum { POLLABLE_FD, POLLABLE_EPOLL_SET } pollable_type; - -typedef struct { - pollable_type type; - int fd; - grpc_iomgr_object iomgr_object; -} pollable_object; - -typedef struct polling_island { - pollable_object pollable; - gpr_mu mu; - int refs; - grpc_fd *only_fd; - struct polling_island *became; - struct polling_island *next; -} polling_island; - -struct grpc_fd { - pollable_object pollable; - - // each event atomic is a tri state: - // STATE_NOT_READY - no event received, nobody waiting for it either - // STATE_READY - event received, nobody waiting for it - // closure pointer - no event received, upper layer is waiting for it - gpr_atm on_readable; - gpr_atm on_writable; - - // mutex guarding set_ready & shutdown state - gpr_mu set_ready_mu; - bool shutdown; - - // mutex protecting polling_island - gpr_mu polling_island_mu; - // current polling island - polling_island *polling_island; - - grpc_fd *next_free; -}; - -struct grpc_pollset_worker {}; - -struct grpc_pollset { - gpr_mu mu; - // current polling island - polling_island *polling_island; -}; - -//////////////////////////////////////////////////////////////////////////////// -// Polling island implementation - -static gpr_mu g_pi_freelist_mu; -static polling_island *g_first_free_pi; - -static void add_pollable_to_epoll_set(pollable_object *pollable, int epoll_set, - uint32_t events) { - struct epoll_event ev; - ev.events = events; - ev.data.ptr = pollable; - int err = epoll_ctl(epoll_set, EPOLL_CTL_ADD, pollable->fd, &ev); - if (err < 0) { - gpr_log(GPR_ERROR, "epoll_ctl add for %d faild: %s", pollable->fd, - strerror(errno)); - } -} - -static void add_fd_to_epoll_set(grpc_fd *fd, int epoll_set) { - add_pollable_to_epoll_set(&fd->pollable, epoll_set, - EPOLLIN | EPOLLOUT | EPOLLET); -} - -static void add_island_to_epoll_set(polling_island *pi, int epoll_set) { - add_pollable_to_epoll_set(&pi->pollable, epoll_set, EPOLLIN | EPOLLET); -} - -static polling_island *polling_island_create(grpc_fd *initial_fd) { - polling_island *r = NULL; - gpr_mu_lock(&g_pi_freelist_mu); - if (g_first_free_pi == NULL) { - r = gpr_malloc(sizeof(*r)); - r->pollable.type = POLLABLE_EPOLL_SET; - gpr_mu_init(&r->mu); - } else { - r = g_first_free_pi; - g_first_free_pi = r->next; - } - gpr_mu_unlock(&g_pi_freelist_mu); - - r->pollable.fd = epoll_create1(EPOLL_CLOEXEC); - GPR_ASSERT(r->pollable.fd >= 0); - - gpr_mu_lock(&r->mu); - r->only_fd = initial_fd; - r->refs = 2; // creation of a polling island => a referencing pollset & fd - gpr_mu_unlock(&r->mu); - - add_fd_to_epoll_set(initial_fd, r->pollable.fd); - return r; -} - -static void polling_island_delete(polling_island *p) { - gpr_mu_lock(&g_pi_freelist_mu); - p->next = g_first_free_pi; - g_first_free_pi = p; - gpr_mu_unlock(&g_pi_freelist_mu); -} - -static polling_island *polling_island_add(polling_island *p, grpc_fd *fd) { - gpr_mu_lock(&p->mu); - p->only_fd = NULL; - p->refs++; // new fd picks up a ref - gpr_mu_unlock(&p->mu); - - add_fd_to_epoll_set(fd, p->pollable.fd); - - return p; -} - -static void add_siblings_to(polling_island *siblings, polling_island *dest) { - polling_island *sibling_tail = dest; - while (sibling_tail->next != NULL) { - sibling_tail = sibling_tail->next; - } - sibling_tail->next = siblings; -} - -static polling_island *polling_island_merge(polling_island *a, - polling_island *b) { - GPR_ASSERT(a != b); - polling_island *out; - - gpr_mu_lock(&GPR_MIN(a, b)->mu); - gpr_mu_lock(&GPR_MAX(a, b)->mu); - - GPR_ASSERT(a->became == NULL); - GPR_ASSERT(b->became == NULL); - - if (a->only_fd == NULL && b->only_fd == NULL) { - b->became = a; - add_siblings_to(b, a); - add_island_to_epoll_set(b, a->pollable.fd); - out = a; - } else if (a->only_fd == NULL) { - GPR_ASSERT(b->only_fd != NULL); - add_fd_to_epoll_set(b->only_fd, a->pollable.fd); - b->became = a; - out = a; - } else if (b->only_fd == NULL) { - GPR_ASSERT(a->only_fd != NULL); - add_fd_to_epoll_set(a->only_fd, b->pollable.fd); - a->became = b; - out = b; - } else { - add_fd_to_epoll_set(b->only_fd, a->pollable.fd); - a->only_fd = NULL; - b->only_fd = NULL; - b->became = a; - out = a; - } - - gpr_mu_unlock(&a->mu); - gpr_mu_unlock(&b->mu); - - return out; -} - -static polling_island *polling_island_update_and_lock(polling_island *p) { - gpr_mu_lock(&p->mu); - if (p->became != NULL) { - do { - polling_island *from = p; - p = p->became; - gpr_mu_lock(&p->mu); - bool delete_from = 0 == --from->refs; - p->refs++; - gpr_mu_unlock(&from->mu); - if (delete_from) { - polling_island_delete(from); - } - } while (p->became != NULL); - } - return p; -} - -static polling_island *polling_island_ref(polling_island *p) { - gpr_mu_lock(&p->mu); - gpr_mu_unlock(&p->mu); - return p; -} - -static void polling_island_drop(polling_island *p) {} - -static polling_island *polling_island_update(polling_island *p, - int updating_owner_count) { - p = polling_island_update_and_lock(p); - GPR_ASSERT(p->refs != 0); - p->refs += updating_owner_count; - gpr_mu_unlock(&p->mu); - return p; -} - -//////////////////////////////////////////////////////////////////////////////// -// FD implementation - -static gpr_mu g_fd_freelist_mu; -static grpc_fd *g_first_free_fd; - -static grpc_fd *fd_create(int fd, const char *name) { - grpc_fd *r = NULL; - gpr_mu_lock(&g_fd_freelist_mu); - if (g_first_free_fd == NULL) { - r = gpr_malloc(sizeof(*r)); - r->pollable.type = POLLABLE_FD; - gpr_atm_rel_store(&r->on_readable, 0); - gpr_atm_rel_store(&r->on_writable, 0); - gpr_mu_init(&r->polling_island_mu); - gpr_mu_init(&r->set_ready_mu); - } else { - r = g_first_free_fd; - g_first_free_fd = r->next_free; - } - gpr_mu_unlock(&g_fd_freelist_mu); - - r->pollable.fd = fd; - grpc_iomgr_register_object(&r->pollable.iomgr_object, name); - r->next_free = NULL; - return r; -} - -static int fd_wrapped_fd(grpc_fd *fd) { return fd->pollable.fd; } - -static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, - grpc_closure *on_done, int *release_fd, - const char *reason) { - if (release_fd != NULL) { - *release_fd = fd->pollable.fd; - } else { - close(fd->pollable.fd); - } - - gpr_mu_lock(&fd->polling_island_mu); - if (fd->polling_island != NULL) { - polling_island_drop(fd->polling_island); - } - gpr_mu_unlock(&fd->polling_island_mu); - - gpr_mu_lock(&g_fd_freelist_mu); - fd->next_free = g_first_free_fd; - g_first_free_fd = fd; - grpc_iomgr_unregister_object(&fd->pollable.iomgr_object); - gpr_mu_unlock(&g_fd_freelist_mu); - - grpc_exec_ctx_enqueue(exec_ctx, on_done, true, NULL); -} - -static void notify_on(grpc_exec_ctx *exec_ctx, grpc_fd *fd, - grpc_closure *closure, gpr_atm *state) { - if (gpr_atm_acq_cas(state, STATE_NOT_READY, (gpr_atm)closure)) { - // state was not ready, and is now the closure - we're done */ - } else { - // cas failed - we MUST be in STATE_READY (can't request two notifications - // for the same event) - // flip back to not ready, enqueue the closure directly - GPR_ASSERT(gpr_atm_rel_cas(state, STATE_READY, STATE_NOT_READY)); - grpc_exec_ctx_enqueue(exec_ctx, closure, true, NULL); - } -} - -static void fd_notify_on_read(grpc_exec_ctx *exec_ctx, grpc_fd *fd, - grpc_closure *closure) { - notify_on(exec_ctx, fd, closure, &fd->on_readable); -} - -static void fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, - grpc_closure *closure) { - notify_on(exec_ctx, fd, closure, &fd->on_readable); -} - -static void destroy_fd_freelist(void) { - while (g_first_free_fd) { - grpc_fd *next = g_first_free_fd->next_free; - gpr_mu_destroy(&g_first_free_fd->polling_island_mu); - gpr_free(next); - g_first_free_fd = next; - } -} - -static void set_ready_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, - gpr_atm *state) { - if (gpr_atm_acq_cas(state, STATE_NOT_READY, STATE_READY)) { - // state was not ready, and is now ready - we're done - } else { - // cas failed - either there's a closure queued which we should consume OR - // the state was already STATE_READY - gpr_atm cur_state = gpr_atm_acq_load(state); - if (cur_state != STATE_READY) { - // state wasn't STATE_READY - it *must* have been a closure - // since it's illegal to ask for notification twice, it's safe to assume - // that we'll resume being the closure - GPR_ASSERT(gpr_atm_rel_cas(state, cur_state, STATE_NOT_READY)); - grpc_exec_ctx_enqueue(exec_ctx, (grpc_closure *)cur_state, !fd->shutdown, - NULL); - } - } -} - -static void fd_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { - gpr_mu_lock(&fd->set_ready_mu); - GPR_ASSERT(!fd->shutdown); - fd->shutdown = 1; - set_ready_locked(exec_ctx, fd, &fd->on_readable); - set_ready_locked(exec_ctx, fd, &fd->on_writable); - gpr_mu_unlock(&fd->set_ready_mu); -} - -//////////////////////////////////////////////////////////////////////////////// -// Pollset implementation - -static void pollset_init(grpc_pollset *pollset, gpr_mu **mu) { - gpr_mu_init(&pollset->mu); - *mu = &pollset->mu; - pollset->polling_island = NULL; -} - -static void pollset_destroy(grpc_pollset *pollset) { - gpr_mu_destroy(&pollset->mu); - if (pollset->polling_island) { - polling_island_drop(pollset->polling_island); - } -} - -static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - struct grpc_fd *fd) { - gpr_mu_lock(&pollset->mu); - gpr_mu_lock(&fd->polling_island_mu); - - polling_island *new; - - if (fd->polling_island == NULL) { - if (pollset->polling_island == NULL) { - new = polling_island_create(fd); - } else { - new = polling_island_add(pollset->polling_island, fd); - } - } else if (pollset->polling_island == NULL) { - new = polling_island_ref(fd->polling_island); - } else if (pollset->polling_island != fd->polling_island) { - new = polling_island_merge(pollset->polling_island, fd->polling_island); - } else { - new = polling_island_update(pollset->polling_island, 1); - } - - fd->polling_island = pollset->polling_island = new; - - gpr_mu_unlock(&fd->polling_island_mu); - gpr_mu_unlock(&pollset->mu); -} - -//////////////////////////////////////////////////////////////////////////////// -// Engine binding - -static void shutdown_engine(void) { destroy_fd_freelist(); } - -static const grpc_event_engine_vtable vtable = { - .pollset_size = sizeof(grpc_pollset), - - .fd_create = fd_create, - .fd_wrapped_fd = fd_wrapped_fd, - .fd_orphan = fd_orphan, - .fd_shutdown = fd_shutdown, - .fd_notify_on_read = fd_notify_on_read, - .fd_notify_on_write = fd_notify_on_write, - - .pollset_init = pollset_init, - .pollset_shutdown = pollset_shutdown, - .pollset_reset = pollset_reset, - .pollset_destroy = pollset_destroy, - .pollset_work = pollset_work, - .pollset_kick = pollset_kick, - .pollset_add_fd = pollset_add_fd, - - .pollset_set_create = pollset_set_create, - .pollset_set_destroy = pollset_set_destroy, - .pollset_set_add_pollset = pollset_set_add_pollset, - .pollset_set_del_pollset = pollset_set_del_pollset, - .pollset_set_add_pollset_set = pollset_set_add_pollset_set, - .pollset_set_del_pollset_set = pollset_set_del_pollset_set, - .pollset_set_add_fd = pollset_set_add_fd, - .pollset_set_del_fd = pollset_set_del_fd, - - .kick_poller = kick_poller, - - .shutdown_engine = shutdown_engine, -}; - -static bool is_epoll_available(void) { - abort(); - return false; -} - -const grpc_event_engine_vtable *grpc_init_poll_posix(void) { - if (!is_epoll_available()) { - return NULL; - } - return &vtable; -} diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 3aa26109f22..61106faef90 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -35,7 +35,7 @@ #ifdef GPR_POSIX_SOCKET -#include "src/core/lib/iomgr/ev_epoll_posix.h" +#include "src/core/lib/iomgr/ev_epoll_linux.h" #include #include diff --git a/src/core/lib/iomgr/ev_epoll_posix.c b/src/core/lib/iomgr/ev_epoll_posix.c deleted file mode 100644 index 5abd5b2a94c..00000000000 --- a/src/core/lib/iomgr/ev_epoll_posix.c +++ /dev/null @@ -1,1209 +0,0 @@ -/* - * - * Copyright 2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include - -#ifdef GPR_POSIX_SOCKET - -#include "src/core/lib/iomgr/ev_epoll_posix.h" - -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include "src/core/lib/iomgr/ev_posix.h" -#include "src/core/lib/iomgr/iomgr_internal.h" -#include "src/core/lib/iomgr/wakeup_fd_posix.h" -#include "src/core/lib/profiling/timers.h" -#include "src/core/lib/support/block_annotate.h" - - -/******************************************************************************* - * FD declarations - */ - -struct grpc_fd { - int fd; - /* refst format: - bit0: 1=active/0=orphaned - bit1-n: refcount - meaning that mostly we ref by two to avoid altering the orphaned bit, - and just unref by 1 when we're ready to flag the object as orphaned */ - gpr_atm refst; - - gpr_mu mu; - int shutdown; - int closed; - int released; - - grpc_closure *read_closure; - grpc_closure *write_closure; - - struct grpc_fd *freelist_next; - - grpc_closure *on_done_closure; - - grpc_iomgr_object iomgr_object; -}; - -/* Return 1 if this fd is orphaned, 0 otherwise */ -static bool fd_is_orphaned(grpc_fd *fd); - -/* Reference counting for fds */ -/*#define GRPC_FD_REF_COUNT_DEBUG*/ -#ifdef GRPC_FD_REF_COUNT_DEBUG -static void fd_ref(grpc_fd *fd, const char *reason, const char *file, int line); -static void fd_unref(grpc_fd *fd, const char *reason, const char *file, - int line); -#define GRPC_FD_REF(fd, reason) fd_ref(fd, reason, __FILE__, __LINE__) -#define GRPC_FD_UNREF(fd, reason) fd_unref(fd, reason, __FILE__, __LINE__) -#else -static void fd_ref(grpc_fd *fd); -static void fd_unref(grpc_fd *fd); -#define GRPC_FD_REF(fd, reason) fd_ref(fd) -#define GRPC_FD_UNREF(fd, reason) fd_unref(fd) -#endif - -static void fd_global_init(void); -static void fd_global_shutdown(void); - -#define CLOSURE_NOT_READY ((grpc_closure *)0) -#define CLOSURE_READY ((grpc_closure *)1) - -/******************************************************************************* - * pollset declarations - */ - -typedef struct grpc_cached_wakeup_fd { - grpc_wakeup_fd fd; - struct grpc_cached_wakeup_fd *next; -} grpc_cached_wakeup_fd; - -struct grpc_pollset_worker { - grpc_cached_wakeup_fd *wakeup_fd; - int reevaluate_polling_on_wakeup; - int kicked_specifically; - pthread_t pt_id; - struct grpc_pollset_worker *next; - struct grpc_pollset_worker *prev; -}; - -struct grpc_pollset { - gpr_mu mu; - grpc_pollset_worker root_worker; - int shutting_down; - int called_shutdown; - int kicked_without_pollers; - grpc_closure *shutdown_done; - - int epoll_fd; - - /* Local cache of eventfds for workers */ - grpc_cached_wakeup_fd *local_wakeup_cache; -}; - -/* Add an fd to a pollset */ -static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - struct grpc_fd *fd); - -static void pollset_set_add_fd(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *pollset_set, grpc_fd *fd); - -/* Convert a timespec to milliseconds: - - very small or negative poll times are clamped to zero to do a - non-blocking poll (which becomes spin polling) - - other small values are rounded up to one millisecond - - longer than a millisecond polls are rounded up to the next nearest - millisecond to avoid spinning - - infinite timeouts are converted to -1 */ -static int poll_deadline_to_millis_timeout(gpr_timespec deadline, - gpr_timespec now); - -/* Allow kick to wakeup the currently polling worker */ -#define GRPC_POLLSET_CAN_KICK_SELF 1 -/* Force the wakee to repoll when awoken */ -#define GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP 2 -/* As per pollset_kick, with an extended set of flags (defined above) - -- mostly for fd_posix's use. */ -static void pollset_kick_ext(grpc_pollset *p, - grpc_pollset_worker *specific_worker, - uint32_t flags); - -/* turn a pollset into a multipoller: platform specific */ -typedef void (*platform_become_multipoller_type)(grpc_exec_ctx *exec_ctx, - grpc_pollset *pollset, - struct grpc_fd **fds, - size_t fd_count); - -/* Return 1 if the pollset has active threads in pollset_work (pollset must - * be locked) */ -static int pollset_has_workers(grpc_pollset *pollset); - -static void remove_fd_from_all_epoll_sets(int fd); - -/******************************************************************************* - * pollset_set definitions - */ - -struct grpc_pollset_set { - gpr_mu mu; - - size_t pollset_count; - size_t pollset_capacity; - grpc_pollset **pollsets; - - size_t pollset_set_count; - size_t pollset_set_capacity; - struct grpc_pollset_set **pollset_sets; - - size_t fd_count; - size_t fd_capacity; - grpc_fd **fds; -}; - -/******************************************************************************* - * fd_posix.c - */ - -/* We need to keep a freelist not because of any concerns of malloc performance - * but instead so that implementations with multiple threads in (for example) - * epoll_wait deal with the race between pollset removal and incoming poll - * notifications. - * - * The problem is that the poller ultimately holds a reference to this - * object, so it is very difficult to know when is safe to free it, at least - * without some expensive synchronization. - * - * If we keep the object freelisted, in the worst case losing this race just - * becomes a spurious read notification on a reused fd. - */ -/* TODO(klempner): We could use some form of polling generation count to know - * when these are safe to free. */ -/* TODO(klempner): Consider disabling freelisting if we don't have multiple - * threads in poll on the same fd */ -/* TODO(klempner): Batch these allocations to reduce fragmentation */ -static grpc_fd *fd_freelist = NULL; -static gpr_mu fd_freelist_mu; - -static void freelist_fd(grpc_fd *fd) { - gpr_mu_lock(&fd_freelist_mu); - fd->freelist_next = fd_freelist; - fd_freelist = fd; - grpc_iomgr_unregister_object(&fd->iomgr_object); - gpr_mu_unlock(&fd_freelist_mu); -} - -static grpc_fd *alloc_fd(int fd) { - grpc_fd *r = NULL; - gpr_mu_lock(&fd_freelist_mu); - if (fd_freelist != NULL) { - r = fd_freelist; - fd_freelist = fd_freelist->freelist_next; - } - gpr_mu_unlock(&fd_freelist_mu); - if (r == NULL) { - r = gpr_malloc(sizeof(grpc_fd)); - gpr_mu_init(&r->mu); - } - - gpr_mu_lock(&r->mu); - gpr_atm_rel_store(&r->refst, 1); - r->shutdown = 0; - r->read_closure = CLOSURE_NOT_READY; - r->write_closure = CLOSURE_NOT_READY; - r->fd = fd; - r->freelist_next = NULL; - r->on_done_closure = NULL; - r->closed = 0; - r->released = 0; - gpr_mu_unlock(&r->mu); - return r; -} - -static void destroy(grpc_fd *fd) { - gpr_mu_destroy(&fd->mu); - gpr_free(fd); -} - -#ifdef GRPC_FD_REF_COUNT_DEBUG -#define REF_BY(fd, n, reason) ref_by(fd, n, reason, __FILE__, __LINE__) -#define UNREF_BY(fd, n, reason) unref_by(fd, n, reason, __FILE__, __LINE__) -static void ref_by(grpc_fd *fd, int n, const char *reason, const char *file, - int line) { - gpr_log(GPR_DEBUG, "FD %d %p ref %d %d -> %d [%s; %s:%d]", fd->fd, fd, n, - gpr_atm_no_barrier_load(&fd->refst), - gpr_atm_no_barrier_load(&fd->refst) + n, reason, file, line); -#else -#define REF_BY(fd, n, reason) ref_by(fd, n) -#define UNREF_BY(fd, n, reason) unref_by(fd, n) -static void ref_by(grpc_fd *fd, int n) { -#endif - GPR_ASSERT(gpr_atm_no_barrier_fetch_add(&fd->refst, n) > 0); -} - -#ifdef GRPC_FD_REF_COUNT_DEBUG -static void unref_by(grpc_fd *fd, int n, const char *reason, const char *file, - int line) { - gpr_atm old; - gpr_log(GPR_DEBUG, "FD %d %p unref %d %d -> %d [%s; %s:%d]", fd->fd, fd, n, - gpr_atm_no_barrier_load(&fd->refst), - gpr_atm_no_barrier_load(&fd->refst) - n, reason, file, line); -#else -static void unref_by(grpc_fd *fd, int n) { - gpr_atm old; -#endif - old = gpr_atm_full_fetch_add(&fd->refst, -n); - if (old == n) { - freelist_fd(fd); - } else { - GPR_ASSERT(old > n); - } -} - -static void fd_global_init(void) { gpr_mu_init(&fd_freelist_mu); } - -static void fd_global_shutdown(void) { - gpr_mu_lock(&fd_freelist_mu); - gpr_mu_unlock(&fd_freelist_mu); - while (fd_freelist != NULL) { - grpc_fd *fd = fd_freelist; - fd_freelist = fd_freelist->freelist_next; - destroy(fd); - } - gpr_mu_destroy(&fd_freelist_mu); -} - -static grpc_fd *fd_create(int fd, const char *name) { - grpc_fd *r = alloc_fd(fd); - char *name2; - gpr_asprintf(&name2, "%s fd=%d", name, fd); - grpc_iomgr_register_object(&r->iomgr_object, name2); - gpr_free(name2); -#ifdef GRPC_FD_REF_COUNT_DEBUG - gpr_log(GPR_DEBUG, "FD %d %p create %s", fd, r, name); -#endif - return r; -} - -static bool fd_is_orphaned(grpc_fd *fd) { - return (gpr_atm_acq_load(&fd->refst) & 1) == 0; -} - -static void close_fd_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { - fd->closed = 1; - if (!fd->released) { - close(fd->fd); - } else { - remove_fd_from_all_epoll_sets(fd->fd); - } - grpc_exec_ctx_enqueue(exec_ctx, fd->on_done_closure, true, NULL); -} - -static int fd_wrapped_fd(grpc_fd *fd) { - if (fd->released || fd->closed) { - return -1; - } else { - return fd->fd; - } -} - -static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, - grpc_closure *on_done, int *release_fd, - const char *reason) { - fd->on_done_closure = on_done; - fd->released = release_fd != NULL; - if (!fd->released) { - shutdown(fd->fd, SHUT_RDWR); - } else { - *release_fd = fd->fd; - } - gpr_mu_lock(&fd->mu); - REF_BY(fd, 1, reason); /* remove active status, but keep referenced */ - close_fd_locked(exec_ctx, fd); - gpr_mu_unlock(&fd->mu); - UNREF_BY(fd, 2, reason); /* drop the reference */ -} - -/* increment refcount by two to avoid changing the orphan bit */ -#ifdef GRPC_FD_REF_COUNT_DEBUG -static void fd_ref(grpc_fd *fd, const char *reason, const char *file, - int line) { - ref_by(fd, 2, reason, file, line); -} - -static void fd_unref(grpc_fd *fd, const char *reason, const char *file, - int line) { - unref_by(fd, 2, reason, file, line); -} -#else -static void fd_ref(grpc_fd *fd) { ref_by(fd, 2); } - -static void fd_unref(grpc_fd *fd) { unref_by(fd, 2); } -#endif - -static void notify_on_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, - grpc_closure **st, grpc_closure *closure) { - if (*st == CLOSURE_NOT_READY) { - /* not ready ==> switch to a waiting state by setting the closure */ - *st = closure; - } else if (*st == CLOSURE_READY) { - /* already ready ==> queue the closure to run immediately */ - *st = CLOSURE_NOT_READY; - grpc_exec_ctx_enqueue(exec_ctx, closure, !fd->shutdown, NULL); - } else { - /* upcallptr was set to a different closure. This is an error! */ - gpr_log(GPR_ERROR, - "User called a notify_on function with a previous callback still " - "pending"); - abort(); - } -} - -/* returns 1 if state becomes not ready */ -static int set_ready_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, - grpc_closure **st) { - if (*st == CLOSURE_READY) { - /* duplicate ready ==> ignore */ - return 0; - } else if (*st == CLOSURE_NOT_READY) { - /* not ready, and not waiting ==> flag ready */ - *st = CLOSURE_READY; - return 0; - } else { - /* waiting ==> queue closure */ - grpc_exec_ctx_enqueue(exec_ctx, *st, !fd->shutdown, NULL); - *st = CLOSURE_NOT_READY; - return 1; - } -} - -static void fd_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { - gpr_mu_lock(&fd->mu); - GPR_ASSERT(!fd->shutdown); - fd->shutdown = 1; - set_ready_locked(exec_ctx, fd, &fd->read_closure); - set_ready_locked(exec_ctx, fd, &fd->write_closure); - gpr_mu_unlock(&fd->mu); -} - -static void fd_notify_on_read(grpc_exec_ctx *exec_ctx, grpc_fd *fd, - grpc_closure *closure) { - gpr_mu_lock(&fd->mu); - notify_on_locked(exec_ctx, fd, &fd->read_closure, closure); - gpr_mu_unlock(&fd->mu); -} - -static void fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, - grpc_closure *closure) { - gpr_mu_lock(&fd->mu); - notify_on_locked(exec_ctx, fd, &fd->write_closure, closure); - gpr_mu_unlock(&fd->mu); -} - -/******************************************************************************* - * pollset_posix.c - */ - -GPR_TLS_DECL(g_current_thread_poller); -GPR_TLS_DECL(g_current_thread_worker); - -/** The alarm system needs to be able to wakeup 'some poller' sometimes - * (specifically when a new alarm needs to be triggered earlier than the next - * alarm 'epoch'). - * This wakeup_fd gives us something to alert on when such a case occurs. */ -grpc_wakeup_fd grpc_global_wakeup_fd; - -static void remove_worker(grpc_pollset *p, grpc_pollset_worker *worker) { - worker->prev->next = worker->next; - worker->next->prev = worker->prev; -} - -static int pollset_has_workers(grpc_pollset *p) { - return p->root_worker.next != &p->root_worker; -} - -static grpc_pollset_worker *pop_front_worker(grpc_pollset *p) { - if (pollset_has_workers(p)) { - grpc_pollset_worker *w = p->root_worker.next; - remove_worker(p, w); - return w; - } else { - return NULL; - } -} - -static void push_back_worker(grpc_pollset *p, grpc_pollset_worker *worker) { - worker->next = &p->root_worker; - worker->prev = worker->next->prev; - worker->prev->next = worker->next->prev = worker; -} - -static void push_front_worker(grpc_pollset *p, grpc_pollset_worker *worker) { - worker->prev = &p->root_worker; - worker->next = worker->prev->next; - worker->prev->next = worker->next->prev = worker; -} - -static void pollset_kick_ext(grpc_pollset *p, - grpc_pollset_worker *specific_worker, - uint32_t flags) { - GPR_TIMER_BEGIN("pollset_kick_ext", 0); - - /* pollset->mu already held */ - if (specific_worker != NULL) { - if (specific_worker == GRPC_POLLSET_KICK_BROADCAST) { - GPR_TIMER_BEGIN("pollset_kick_ext.broadcast", 0); - GPR_ASSERT((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) == 0); - for (specific_worker = p->root_worker.next; - specific_worker != &p->root_worker; - specific_worker = specific_worker->next) { - grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd); - } - p->kicked_without_pollers = 1; - GPR_TIMER_END("pollset_kick_ext.broadcast", 0); - } else if (gpr_tls_get(&g_current_thread_worker) != - (intptr_t)specific_worker) { - GPR_TIMER_MARK("different_thread_worker", 0); - if ((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) != 0) { - specific_worker->reevaluate_polling_on_wakeup = 1; - } - specific_worker->kicked_specifically = 1; - grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd); - /* TODO (sreek): Refactor this into a separate file*/ - pthread_kill(specific_worker->pt_id, SIGUSR1); - } else if ((flags & GRPC_POLLSET_CAN_KICK_SELF) != 0) { - GPR_TIMER_MARK("kick_yoself", 0); - if ((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) != 0) { - specific_worker->reevaluate_polling_on_wakeup = 1; - } - specific_worker->kicked_specifically = 1; - grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd); - } - } else if (gpr_tls_get(&g_current_thread_poller) != (intptr_t)p) { - GPR_ASSERT((flags & GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) == 0); - GPR_TIMER_MARK("kick_anonymous", 0); - specific_worker = pop_front_worker(p); - if (specific_worker != NULL) { - if (gpr_tls_get(&g_current_thread_worker) == (intptr_t)specific_worker) { - GPR_TIMER_MARK("kick_anonymous_not_self", 0); - push_back_worker(p, specific_worker); - specific_worker = pop_front_worker(p); - if ((flags & GRPC_POLLSET_CAN_KICK_SELF) == 0 && - gpr_tls_get(&g_current_thread_worker) == - (intptr_t)specific_worker) { - push_back_worker(p, specific_worker); - specific_worker = NULL; - } - } - if (specific_worker != NULL) { - GPR_TIMER_MARK("finally_kick", 0); - push_back_worker(p, specific_worker); - grpc_wakeup_fd_wakeup(&specific_worker->wakeup_fd->fd); - } - } else { - GPR_TIMER_MARK("kicked_no_pollers", 0); - p->kicked_without_pollers = 1; - } - } - - GPR_TIMER_END("pollset_kick_ext", 0); -} - -static void pollset_kick(grpc_pollset *p, - grpc_pollset_worker *specific_worker) { - pollset_kick_ext(p, specific_worker, 0); -} - -/* global state management */ - -static void sig_handler(int sig_num) { - gpr_log(GPR_INFO, "Received signal %d", sig_num); -} - -static void pollset_global_init(void) { - gpr_tls_init(&g_current_thread_poller); - gpr_tls_init(&g_current_thread_worker); - grpc_wakeup_fd_init(&grpc_global_wakeup_fd); - signal(SIGUSR1, sig_handler); -} - -static void pollset_global_shutdown(void) { - grpc_wakeup_fd_destroy(&grpc_global_wakeup_fd); - gpr_tls_destroy(&g_current_thread_poller); - gpr_tls_destroy(&g_current_thread_worker); -} - -static void kick_poller(void) { grpc_wakeup_fd_wakeup(&grpc_global_wakeup_fd); } - -/* TODO: sreek. Try to Remove this forward declaration*/ -static void multipoll_with_epoll_pollset_create_efd(grpc_pollset *pollset); - -/* main interface */ - -static void pollset_init(grpc_pollset *pollset, gpr_mu **mu) { - gpr_mu_init(&pollset->mu); - *mu = &pollset->mu; - pollset->root_worker.next = pollset->root_worker.prev = &pollset->root_worker; - pollset->shutting_down = 0; - pollset->called_shutdown = 0; - pollset->kicked_without_pollers = 0; - pollset->local_wakeup_cache = NULL; - pollset->kicked_without_pollers = 0; - - multipoll_with_epoll_pollset_create_efd(pollset); -} - -/* TODO(sreek): Maybe merge multipoll_*_destroy() with pollset_destroy() - * function */ -static void multipoll_with_epoll_pollset_destroy(grpc_pollset *pollset); - -static void pollset_destroy(grpc_pollset *pollset) { - GPR_ASSERT(!pollset_has_workers(pollset)); - - multipoll_with_epoll_pollset_destroy(pollset); - - while (pollset->local_wakeup_cache) { - grpc_cached_wakeup_fd *next = pollset->local_wakeup_cache->next; - grpc_wakeup_fd_destroy(&pollset->local_wakeup_cache->fd); - gpr_free(pollset->local_wakeup_cache); - pollset->local_wakeup_cache = next; - } - gpr_mu_destroy(&pollset->mu); -} - -static void pollset_reset(grpc_pollset *pollset) { - GPR_ASSERT(pollset->shutting_down); - GPR_ASSERT(!pollset_has_workers(pollset)); - pollset->shutting_down = 0; - pollset->called_shutdown = 0; - pollset->kicked_without_pollers = 0; -} - -/* TODO (sreek): Remove multipoll_with_epoll_finish_shutdown() declaration */ -static void multipoll_with_epoll_pollset_finish_shutdown(grpc_pollset *pollset); - -static void finish_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset) { - multipoll_with_epoll_pollset_finish_shutdown(pollset); - grpc_exec_ctx_enqueue(exec_ctx, pollset->shutdown_done, true, NULL); -} - -/* TODO(sreek): Remove multipoll_with_epoll_*_maybe_work_and_unlock declaration - */ -static void multipoll_with_epoll_pollset_maybe_work_and_unlock( - grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_pollset_worker *worker, - gpr_timespec deadline, gpr_timespec now); - -static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_pollset_worker **worker_hdl, gpr_timespec now, - gpr_timespec deadline) { - grpc_pollset_worker worker; - *worker_hdl = &worker; - - /* pollset->mu already held */ - int added_worker = 0; - int locked = 1; - int queued_work = 0; - int keep_polling = 0; - GPR_TIMER_BEGIN("pollset_work", 0); - /* this must happen before we (potentially) drop pollset->mu */ - worker.next = worker.prev = NULL; - worker.reevaluate_polling_on_wakeup = 0; - if (pollset->local_wakeup_cache != NULL) { - worker.wakeup_fd = pollset->local_wakeup_cache; - pollset->local_wakeup_cache = worker.wakeup_fd->next; - } else { - worker.wakeup_fd = gpr_malloc(sizeof(*worker.wakeup_fd)); - grpc_wakeup_fd_init(&worker.wakeup_fd->fd); - } - worker.kicked_specifically = 0; - - /* TODO(sreek): Abstract this thread id stuff out into a separate file */ - worker.pt_id = pthread_self(); - /* If we're shutting down then we don't execute any extended work */ - if (pollset->shutting_down) { - GPR_TIMER_MARK("pollset_work.shutting_down", 0); - goto done; - } - /* Start polling, and keep doing so while we're being asked to - re-evaluate our pollers (this allows poll() based pollers to - ensure they don't miss wakeups) */ - keep_polling = 1; - while (keep_polling) { - keep_polling = 0; - if (!pollset->kicked_without_pollers) { - if (!added_worker) { - push_front_worker(pollset, &worker); - added_worker = 1; - gpr_tls_set(&g_current_thread_worker, (intptr_t)&worker); - } - gpr_tls_set(&g_current_thread_poller, (intptr_t)pollset); - GPR_TIMER_BEGIN("maybe_work_and_unlock", 0); - - multipoll_with_epoll_pollset_maybe_work_and_unlock( - exec_ctx, pollset, &worker, deadline, now); - - GPR_TIMER_END("maybe_work_and_unlock", 0); - locked = 0; - gpr_tls_set(&g_current_thread_poller, 0); - } else { - GPR_TIMER_MARK("pollset_work.kicked_without_pollers", 0); - pollset->kicked_without_pollers = 0; - } - /* Finished execution - start cleaning up. - Note that we may arrive here from outside the enclosing while() loop. - In that case we won't loop though as we haven't added worker to the - worker list, which means nobody could ask us to re-evaluate polling). */ - done: - if (!locked) { - queued_work |= grpc_exec_ctx_flush(exec_ctx); - gpr_mu_lock(&pollset->mu); - locked = 1; - } - /* If we're forced to re-evaluate polling (via pollset_kick with - GRPC_POLLSET_REEVALUATE_POLLING_ON_WAKEUP) then we land here and force - a loop */ - if (worker.reevaluate_polling_on_wakeup) { - worker.reevaluate_polling_on_wakeup = 0; - pollset->kicked_without_pollers = 0; - if (queued_work || worker.kicked_specifically) { - /* If there's queued work on the list, then set the deadline to be - immediate so we get back out of the polling loop quickly */ - deadline = gpr_inf_past(GPR_CLOCK_MONOTONIC); - } - keep_polling = 1; - } - } - if (added_worker) { - remove_worker(pollset, &worker); - gpr_tls_set(&g_current_thread_worker, 0); - } - /* release wakeup fd to the local pool */ - worker.wakeup_fd->next = pollset->local_wakeup_cache; - pollset->local_wakeup_cache = worker.wakeup_fd; - /* check shutdown conditions */ - if (pollset->shutting_down) { - if (pollset_has_workers(pollset)) { - pollset_kick(pollset, NULL); - } else if (!pollset->called_shutdown) { - pollset->called_shutdown = 1; - gpr_mu_unlock(&pollset->mu); - finish_shutdown(exec_ctx, pollset); - grpc_exec_ctx_flush(exec_ctx); - /* Continuing to access pollset here is safe -- it is the caller's - * responsibility to not destroy when it has outstanding calls to - * pollset_work. - * TODO(dklempner): Can we refactor the shutdown logic to avoid this? */ - gpr_mu_lock(&pollset->mu); - } - } - *worker_hdl = NULL; - GPR_TIMER_END("pollset_work", 0); -} - -static void pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_closure *closure) { - GPR_ASSERT(!pollset->shutting_down); - pollset->shutting_down = 1; - pollset->shutdown_done = closure; - pollset_kick(pollset, GRPC_POLLSET_KICK_BROADCAST); - - if (!pollset->called_shutdown && !pollset_has_workers(pollset)) { - pollset->called_shutdown = 1; - finish_shutdown(exec_ctx, pollset); - } -} - -static int poll_deadline_to_millis_timeout(gpr_timespec deadline, - gpr_timespec now) { - gpr_timespec timeout; - static const int64_t max_spin_polling_us = 10; - if (gpr_time_cmp(deadline, gpr_inf_future(deadline.clock_type)) == 0) { - return -1; - } - if (gpr_time_cmp(deadline, gpr_time_add(now, gpr_time_from_micros( - max_spin_polling_us, - GPR_TIMESPAN))) <= 0) { - return 0; - } - timeout = gpr_time_sub(deadline, now); - return gpr_time_to_millis(gpr_time_add( - timeout, gpr_time_from_nanos(GPR_NS_PER_MS - 1, GPR_TIMESPAN))); -} - -/******************************************************************************* - * pollset_multipoller_with_epoll_posix.c - */ - -static void set_ready(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st) { - /* only one set_ready can be active at once (but there may be a racing - notify_on) */ - gpr_mu_lock(&fd->mu); - set_ready_locked(exec_ctx, fd, st); - gpr_mu_unlock(&fd->mu); -} - -static void fd_become_readable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { - set_ready(exec_ctx, fd, &fd->read_closure); -} - -static void fd_become_writable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { - set_ready(exec_ctx, fd, &fd->write_closure); -} - -/* TODO (sreek): Maybe this global list is not required. Double check*/ -struct epoll_fd_list { - int *epoll_fds; - size_t count; - size_t capacity; -}; - -static struct epoll_fd_list epoll_fd_global_list; -static gpr_once init_epoll_fd_list_mu = GPR_ONCE_INIT; -static gpr_mu epoll_fd_list_mu; - -static void init_mu(void) { gpr_mu_init(&epoll_fd_list_mu); } - -static void add_epoll_fd_to_global_list(int epoll_fd) { - gpr_once_init(&init_epoll_fd_list_mu, init_mu); - - gpr_mu_lock(&epoll_fd_list_mu); - if (epoll_fd_global_list.count == epoll_fd_global_list.capacity) { - epoll_fd_global_list.capacity = - GPR_MAX((size_t)8, epoll_fd_global_list.capacity * 2); - epoll_fd_global_list.epoll_fds = - gpr_realloc(epoll_fd_global_list.epoll_fds, - epoll_fd_global_list.capacity * sizeof(int)); - } - epoll_fd_global_list.epoll_fds[epoll_fd_global_list.count++] = epoll_fd; - gpr_mu_unlock(&epoll_fd_list_mu); -} - -static void remove_epoll_fd_from_global_list(int epoll_fd) { - gpr_mu_lock(&epoll_fd_list_mu); - GPR_ASSERT(epoll_fd_global_list.count > 0); - for (size_t i = 0; i < epoll_fd_global_list.count; i++) { - if (epoll_fd == epoll_fd_global_list.epoll_fds[i]) { - epoll_fd_global_list.epoll_fds[i] = - epoll_fd_global_list.epoll_fds[--(epoll_fd_global_list.count)]; - break; - } - } - gpr_mu_unlock(&epoll_fd_list_mu); -} - -static void remove_fd_from_all_epoll_sets(int fd) { - int err; - gpr_once_init(&init_epoll_fd_list_mu, init_mu); - gpr_mu_lock(&epoll_fd_list_mu); - if (epoll_fd_global_list.count == 0) { - gpr_mu_unlock(&epoll_fd_list_mu); - return; - } - for (size_t i = 0; i < epoll_fd_global_list.count; i++) { - err = epoll_ctl(epoll_fd_global_list.epoll_fds[i], EPOLL_CTL_DEL, fd, NULL); - if (err < 0 && errno != ENOENT) { - gpr_log(GPR_ERROR, "epoll_ctl del for %d failed: %s", fd, - strerror(errno)); - } - } - gpr_mu_unlock(&epoll_fd_list_mu); -} - -/* TODO: sreek - This function multipoll_with_epoll_pollset_add_fd() and - * finally_add_fd() in ev_poll_and_epoll_posix.c */ -static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_fd *fd) { - - /* TODO sreek - Check if we need to get a pollset->mu lock here */ - - struct epoll_event ev; - int err; - - /* Hold a ref to the fd to keep it from being closed during the add. This may - result in a spurious wakeup being assigned to this pollset whilst adding, - but that should be benign. */ - /* TODO: (sreek): Understand how a spurious wake up migh be assinged to this - * pollset..and how holding a reference will prevent the fd from being closed - * (and perhaps more importantly, see how can an fd be closed while being - * added to the epollset */ - GRPC_FD_REF(fd, "add fd"); - - gpr_mu_lock(&fd->mu); - if (fd->shutdown) { - gpr_mu_unlock(&fd->mu); - GRPC_FD_UNREF(fd, "add fd"); - return; - } - gpr_mu_unlock(&fd->mu); - - ev.events = (uint32_t)(EPOLLIN | EPOLLOUT | EPOLLET); - ev.data.ptr = fd; - err = epoll_ctl(pollset->epoll_fd, EPOLL_CTL_ADD, fd->fd, &ev); - if (err < 0) { - /* FDs may be added to a pollset multiple times, so EEXIST is normal. */ - if (errno != EEXIST) { - gpr_log(GPR_ERROR, "epoll_ctl add for %d failed: %s", fd->fd, - strerror(errno)); - } - } - - /* The fd might have been orphaned while we were adding it to the epoll set. - Close the fd in such a case (which will also take care of removing it from - the epoll set */ - gpr_mu_lock(&fd->mu); - if (fd_is_orphaned(fd) && !fd->closed) { - close_fd_locked(exec_ctx, fd); - } - gpr_mu_unlock(&fd->mu); - - GRPC_FD_UNREF(fd, "add fd"); -} - -/* Creates an epoll fd and initializes the pollset */ -/* TODO: This has to be called ONLY from pollset_init function. and hence it - * does not acquire any lock */ -static void multipoll_with_epoll_pollset_create_efd(grpc_pollset *pollset) { - struct epoll_event ev; - int err; - - pollset->epoll_fd = epoll_create1(EPOLL_CLOEXEC); - if (pollset->epoll_fd < 0) { - gpr_log(GPR_ERROR, "epoll_create1 failed: %s", strerror(errno)); - abort(); - } - add_epoll_fd_to_global_list(pollset->epoll_fd); - - ev.events = (uint32_t)(EPOLLIN | EPOLLET); - ev.data.ptr = NULL; - - err = epoll_ctl(pollset->epoll_fd, EPOLL_CTL_ADD, - GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd), &ev); - if (err < 0) { - gpr_log(GPR_ERROR, "epoll_ctl add for %d failed: %s", - GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd), - strerror(errno)); - } -} - -/* TODO(klempner): We probably want to turn this down a bit */ -#define GRPC_EPOLL_MAX_EVENTS 1000 - -static void multipoll_with_epoll_pollset_maybe_work_and_unlock( - grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_pollset_worker *worker, - gpr_timespec deadline, gpr_timespec now) { - struct epoll_event ep_ev[GRPC_EPOLL_MAX_EVENTS]; - int epoll_fd = pollset->epoll_fd; - int ep_rv; - int poll_rv; - int timeout_ms; - struct pollfd pfds[2]; - - /* If you want to ignore epoll's ability to sanely handle parallel pollers, - * for a more apples-to-apples performance comparison with poll, add a - * if (pollset->counter != 0) { return 0; } - * here. - */ - - gpr_mu_unlock(&pollset->mu); - - timeout_ms = poll_deadline_to_millis_timeout(deadline, now); - - pfds[0].fd = GRPC_WAKEUP_FD_GET_READ_FD(&worker->wakeup_fd->fd); - pfds[0].events = POLLIN; - pfds[0].revents = 0; - pfds[1].fd = epoll_fd; - pfds[1].events = POLLIN; - pfds[1].revents = 0; - - /* TODO(vpai): Consider first doing a 0 timeout poll here to avoid - even going into the blocking annotation if possible */ - GPR_TIMER_BEGIN("poll", 0); - GRPC_SCHEDULING_START_BLOCKING_REGION; - poll_rv = grpc_poll_function(pfds, 2, timeout_ms); - GRPC_SCHEDULING_END_BLOCKING_REGION; - GPR_TIMER_END("poll", 0); - - if (poll_rv < 0) { - if (errno != EINTR) { - gpr_log(GPR_ERROR, "poll() failed: %s", strerror(errno)); - } - } else if (poll_rv == 0) { - /* do nothing */ - } else { - if (pfds[0].revents) { - grpc_wakeup_fd_consume_wakeup(&worker->wakeup_fd->fd); - } - if (pfds[1].revents) { - do { - /* The following epoll_wait never blocks; it has a timeout of 0 */ - ep_rv = epoll_wait(epoll_fd, ep_ev, GRPC_EPOLL_MAX_EVENTS, 0); - if (ep_rv < 0) { - if (errno != EINTR) { - gpr_log(GPR_ERROR, "epoll_wait() failed: %s", strerror(errno)); - } - } else { - int i; - for (i = 0; i < ep_rv; ++i) { - grpc_fd *fd = ep_ev[i].data.ptr; - /* TODO(klempner): We might want to consider making err and pri - * separate events */ - int cancel = ep_ev[i].events & (EPOLLERR | EPOLLHUP); - int read_ev = ep_ev[i].events & (EPOLLIN | EPOLLPRI); - int write_ev = ep_ev[i].events & EPOLLOUT; - if (fd == NULL) { - grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); - } else { - if (read_ev || cancel) { - fd_become_readable(exec_ctx, fd); - } - if (write_ev || cancel) { - fd_become_writable(exec_ctx, fd); - } - } - } - } - } while (ep_rv == GRPC_EPOLL_MAX_EVENTS); - } - } -} - -static void multipoll_with_epoll_pollset_finish_shutdown( - grpc_pollset *pollset) {} - -static void multipoll_with_epoll_pollset_destroy(grpc_pollset *pollset) { - close(pollset->epoll_fd); - remove_epoll_fd_from_global_list(pollset->epoll_fd); -} - -/******************************************************************************* - * pollset_set_posix.c - */ - -static grpc_pollset_set *pollset_set_create(void) { - grpc_pollset_set *pollset_set = gpr_malloc(sizeof(*pollset_set)); - memset(pollset_set, 0, sizeof(*pollset_set)); - gpr_mu_init(&pollset_set->mu); - return pollset_set; -} - -static void pollset_set_destroy(grpc_pollset_set *pollset_set) { - size_t i; - gpr_mu_destroy(&pollset_set->mu); - for (i = 0; i < pollset_set->fd_count; i++) { - GRPC_FD_UNREF(pollset_set->fds[i], "pollset_set"); - } - gpr_free(pollset_set->pollsets); - gpr_free(pollset_set->pollset_sets); - gpr_free(pollset_set->fds); - gpr_free(pollset_set); -} - -static void pollset_set_add_pollset(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *pollset_set, - grpc_pollset *pollset) { - size_t i, j; - gpr_mu_lock(&pollset_set->mu); - if (pollset_set->pollset_count == pollset_set->pollset_capacity) { - pollset_set->pollset_capacity = - GPR_MAX(8, 2 * pollset_set->pollset_capacity); - pollset_set->pollsets = - gpr_realloc(pollset_set->pollsets, pollset_set->pollset_capacity * - sizeof(*pollset_set->pollsets)); - } - pollset_set->pollsets[pollset_set->pollset_count++] = pollset; - for (i = 0, j = 0; i < pollset_set->fd_count; i++) { - if (fd_is_orphaned(pollset_set->fds[i])) { - GRPC_FD_UNREF(pollset_set->fds[i], "pollset_set"); - } else { - pollset_add_fd(exec_ctx, pollset, pollset_set->fds[i]); - pollset_set->fds[j++] = pollset_set->fds[i]; - } - } - pollset_set->fd_count = j; - gpr_mu_unlock(&pollset_set->mu); -} - -static void pollset_set_del_pollset(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *pollset_set, - grpc_pollset *pollset) { - size_t i; - gpr_mu_lock(&pollset_set->mu); - for (i = 0; i < pollset_set->pollset_count; i++) { - if (pollset_set->pollsets[i] == pollset) { - pollset_set->pollset_count--; - GPR_SWAP(grpc_pollset *, pollset_set->pollsets[i], - pollset_set->pollsets[pollset_set->pollset_count]); - break; - } - } - gpr_mu_unlock(&pollset_set->mu); -} - -static void pollset_set_add_pollset_set(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *bag, - grpc_pollset_set *item) { - size_t i, j; - gpr_mu_lock(&bag->mu); - if (bag->pollset_set_count == bag->pollset_set_capacity) { - bag->pollset_set_capacity = GPR_MAX(8, 2 * bag->pollset_set_capacity); - bag->pollset_sets = - gpr_realloc(bag->pollset_sets, - bag->pollset_set_capacity * sizeof(*bag->pollset_sets)); - } - bag->pollset_sets[bag->pollset_set_count++] = item; - for (i = 0, j = 0; i < bag->fd_count; i++) { - if (fd_is_orphaned(bag->fds[i])) { - GRPC_FD_UNREF(bag->fds[i], "pollset_set"); - } else { - pollset_set_add_fd(exec_ctx, item, bag->fds[i]); - bag->fds[j++] = bag->fds[i]; - } - } - bag->fd_count = j; - gpr_mu_unlock(&bag->mu); -} - -static void pollset_set_del_pollset_set(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *bag, - grpc_pollset_set *item) { - size_t i; - gpr_mu_lock(&bag->mu); - for (i = 0; i < bag->pollset_set_count; i++) { - if (bag->pollset_sets[i] == item) { - bag->pollset_set_count--; - GPR_SWAP(grpc_pollset_set *, bag->pollset_sets[i], - bag->pollset_sets[bag->pollset_set_count]); - break; - } - } - gpr_mu_unlock(&bag->mu); -} - -static void pollset_set_add_fd(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *pollset_set, grpc_fd *fd) { - size_t i; - gpr_mu_lock(&pollset_set->mu); - if (pollset_set->fd_count == pollset_set->fd_capacity) { - pollset_set->fd_capacity = GPR_MAX(8, 2 * pollset_set->fd_capacity); - pollset_set->fds = gpr_realloc( - pollset_set->fds, pollset_set->fd_capacity * sizeof(*pollset_set->fds)); - } - GRPC_FD_REF(fd, "pollset_set"); - pollset_set->fds[pollset_set->fd_count++] = fd; - for (i = 0; i < pollset_set->pollset_count; i++) { - pollset_add_fd(exec_ctx, pollset_set->pollsets[i], fd); - } - for (i = 0; i < pollset_set->pollset_set_count; i++) { - pollset_set_add_fd(exec_ctx, pollset_set->pollset_sets[i], fd); - } - gpr_mu_unlock(&pollset_set->mu); -} - -static void pollset_set_del_fd(grpc_exec_ctx *exec_ctx, - grpc_pollset_set *pollset_set, grpc_fd *fd) { - size_t i; - gpr_mu_lock(&pollset_set->mu); - for (i = 0; i < pollset_set->fd_count; i++) { - if (pollset_set->fds[i] == fd) { - pollset_set->fd_count--; - GPR_SWAP(grpc_fd *, pollset_set->fds[i], - pollset_set->fds[pollset_set->fd_count]); - GRPC_FD_UNREF(fd, "pollset_set"); - break; - } - } - for (i = 0; i < pollset_set->pollset_set_count; i++) { - pollset_set_del_fd(exec_ctx, pollset_set->pollset_sets[i], fd); - } - gpr_mu_unlock(&pollset_set->mu); -} - -/******************************************************************************* - * event engine binding - */ - -static void shutdown_engine(void) { - fd_global_shutdown(); - pollset_global_shutdown(); -} - -static const grpc_event_engine_vtable vtable = { - .pollset_size = sizeof(grpc_pollset), - - .fd_create = fd_create, - .fd_wrapped_fd = fd_wrapped_fd, - .fd_orphan = fd_orphan, - .fd_shutdown = fd_shutdown, - .fd_notify_on_read = fd_notify_on_read, - .fd_notify_on_write = fd_notify_on_write, - - .pollset_init = pollset_init, - .pollset_shutdown = pollset_shutdown, - .pollset_reset = pollset_reset, - .pollset_destroy = pollset_destroy, - .pollset_work = pollset_work, - .pollset_kick = pollset_kick, - .pollset_add_fd = pollset_add_fd, - - .pollset_set_create = pollset_set_create, - .pollset_set_destroy = pollset_set_destroy, - .pollset_set_add_pollset = pollset_set_add_pollset, - .pollset_set_del_pollset = pollset_set_del_pollset, - .pollset_set_add_pollset_set = pollset_set_add_pollset_set, - .pollset_set_del_pollset_set = pollset_set_del_pollset_set, - .pollset_set_add_fd = pollset_set_add_fd, - .pollset_set_del_fd = pollset_set_del_fd, - - .kick_poller = kick_poller, - - .shutdown_engine = shutdown_engine, -}; - -const grpc_event_engine_vtable *grpc_init_epoll_posix(void) { - fd_global_init(); - pollset_global_init(); - return &vtable; -} - -#endif diff --git a/src/core/lib/iomgr/ev_epoll_posix.h b/src/core/lib/iomgr/ev_epoll_posix.h deleted file mode 100644 index 35319b4fc5d..00000000000 --- a/src/core/lib/iomgr/ev_epoll_posix.h +++ /dev/null @@ -1,41 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef GRPC_CORE_LIB_IOMGR_EV_EPOLL_POSIX_H -#define GRPC_CORE_LIB_IOMGR_EV_EPOLL_POSIX_H - -#include "src/core/lib/iomgr/ev_posix.h" - -const grpc_event_engine_vtable *grpc_init_epoll_posix(void); - -#endif /* GRPC_CORE_LIB_IOMGR_EV_EPOLL_POSIX_H */ diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 13bc6888d66..50a6f196d8d 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -95,7 +95,6 @@ CORE_SOURCE_FILES = [ 'src/core/lib/iomgr/endpoint_pair_posix.c', 'src/core/lib/iomgr/endpoint_pair_windows.c', 'src/core/lib/iomgr/ev_epoll_linux.c', - 'src/core/lib/iomgr/ev_epoll_posix.c', 'src/core/lib/iomgr/ev_poll_posix.c', 'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/exec_ctx.c', diff --git a/test/core/network_benchmarks/epoll_test.c b/test/core/network_benchmarks/epoll_test.c deleted file mode 100644 index a918dd9bb94..00000000000 --- a/test/core/network_benchmarks/epoll_test.c +++ /dev/null @@ -1,263 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/* TODO: sreek: REMOVE THIS FILE */ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include -#include - -int g_signal_num = SIGUSR1; - -int g_timeout_secs = 2; - -int g_eventfd_create = 1; -int g_eventfd_wakeup = 0; -int g_eventfd_teardown = 0; -int g_close_epoll_fd = 1; - -typedef struct thread_args { - gpr_thd_id id; - int epoll_fd; - int thread_num; -} thread_args; - -static int eventfd_create() { - if (!g_eventfd_create) { - return -1; - } - - int efd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); - GPR_ASSERT(efd >= 0); - return efd; -} - -static void eventfd_wakeup(int efd) { - if (!g_eventfd_wakeup) { - return; - } - - int err; - do { - err = eventfd_write(efd, 1); - } while (err < 0 && errno == EINTR); -} - -static void epoll_teardown(int epoll_fd, int fd) { - if (!g_eventfd_teardown) { - return; - } - - if (epoll_ctl(epoll_fd, EPOLL_CTL_DEL, fd, NULL) < 0) { - if (errno != ENOENT) { - gpr_log(GPR_ERROR, "epoll_ctl: %s", strerror(errno)); - GPR_ASSERT(0); - } - } -} - -/* Special case for epoll, where we need to create the fd ahead of time. */ -static int epoll_setup(int fd) { - int epoll_fd; - struct epoll_event ev; - - epoll_fd = epoll_create(1); - if (epoll_fd < 0) { - gpr_log(GPR_ERROR, "epoll_create: %s", strerror(errno)); - return -1; - } - - ev.events = (uint32_t)EPOLLIN; - ev.data.fd = fd; - if (epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fd, &ev) < 0) { - if (errno != EEXIST) { - gpr_log(GPR_ERROR, "epoll_ctl: %s", strerror(errno)); - return -1; - } - - gpr_log(GPR_ERROR, "epoll_ctl: The fd %d already exists", fd); - } - - return epoll_fd; -} - -#define GRPC_EPOLL_MAX_EVENTS 1000 -static void thread_main(void *args) { - int ep_rv; - struct epoll_event ep_ev[GRPC_EPOLL_MAX_EVENTS]; - int fd; - int i; - int cancel; - int read; - int write; - thread_args *thd_args = args; - sigset_t new_mask; - sigset_t orig_mask; - int keep_polling = 0; - - gpr_log(GPR_INFO, "Thread: %d Started", thd_args->thread_num); - - do { - keep_polling = 0; - - /* Mask the signal before getting the epoll_fd */ - gpr_log(GPR_INFO, "Thread: %d Blocking signal: %d", thd_args->thread_num, - g_signal_num); - sigemptyset(&new_mask); - sigaddset(&new_mask, g_signal_num); - pthread_sigmask(SIG_BLOCK, &new_mask, &orig_mask); - - gpr_log(GPR_INFO, "Thread: %d Waiting on epoll_wait()", - thd_args->thread_num); - ep_rv = epoll_pwait(thd_args->epoll_fd, ep_ev, GRPC_EPOLL_MAX_EVENTS, - g_timeout_secs * 5000, &orig_mask); - gpr_log(GPR_INFO, "Thread: %d out of epoll_wait. ep_rv = %d", - thd_args->thread_num, ep_rv); - - if (ep_rv < 0) { - if (errno != EINTR) { - gpr_log(GPR_ERROR, "Thread: %d. epoll_wait failed with error: %d", - thd_args->thread_num, errno); - } else { - gpr_log(GPR_INFO, - "Thread: %d. epoll_wait was interrupted. Polling again >>>>>>>", - thd_args->thread_num); - keep_polling = 1; - } - } else { - if (ep_rv == 0) { - gpr_log(GPR_INFO, - "Thread: %d - epoll_wait returned 0. Most likely a timeout. " - "Polling again", - thd_args->thread_num); - keep_polling = 1; - } - - for (i = 0; i < ep_rv; i++) { - fd = ep_ev[i].data.fd; - cancel = ep_ev[i].events & (EPOLLERR | EPOLLHUP); - read = ep_ev[i].events & (EPOLLIN | EPOLLPRI); - write = ep_ev[i].events & EPOLLOUT; - gpr_log(GPR_INFO, - "Thread: %d. epoll_wait returned that fd: %d has event of " - "interest. read: %d, write: %d, cancel: %d", - thd_args->thread_num, fd, read, write, cancel); - } - } - } while (keep_polling); -} - -static void close_fd(int fd) { - if (!g_close_epoll_fd) { - return; - } - - gpr_log(GPR_INFO, "*** Closing fd : %d ****", fd); - close(fd); - gpr_log(GPR_INFO, "*** Closed fd : %d ****", fd); -} - - -static void sig_handler(int sig_num) { - gpr_log(GPR_INFO, "<<<<< Received signal %d", sig_num); -} - -static void set_signal_handler() { - gpr_log(GPR_INFO, "Setting signal handler"); - signal(g_signal_num, sig_handler); -} - -#define NUM_THREADS 2 -int main(int argc, char **argv) { - int efd; - int epoll_fd; - int i; - thread_args thd_args[NUM_THREADS]; - gpr_thd_options options = gpr_thd_options_default(); - - set_signal_handler(); - - gpr_log(GPR_INFO, "Starting.."); - efd = eventfd_create(); - gpr_log(GPR_INFO, "Created event fd: %d", efd); - epoll_fd = epoll_setup(efd); - gpr_log(GPR_INFO, "Created epoll_fd: %d", epoll_fd); - - gpr_thd_options_set_joinable(&options); - for (i = 0; i < NUM_THREADS; i++) { - thd_args[i].thread_num = i; - thd_args[i].epoll_fd = epoll_fd; - gpr_log(GPR_INFO, "Starting thread: %d", i); - gpr_thd_new(&thd_args[i].id, thread_main, &thd_args[i], &options); - } - - sleep((unsigned)g_timeout_secs * 2); - - /* Send signals first */ - for (i = 0; i < NUM_THREADS; i++) { - gpr_log(GPR_INFO, "Sending signal to thread: %d", thd_args->thread_num); - pthread_kill(thd_args[i].id, g_signal_num); - gpr_log(GPR_INFO, "Sent signal to thread: %d >>>>>> ", - thd_args->thread_num); - } - - sleep((unsigned)g_timeout_secs * 2); - - close_fd(epoll_fd); - - sleep((unsigned)g_timeout_secs * 2); - - eventfd_wakeup(efd); - epoll_teardown(epoll_fd, efd); - - for (i = 0; i < NUM_THREADS; i++) { - gpr_thd_join(thd_args[i].id); - gpr_log(GPR_INFO, "Thread: %d joined", i); - } - - return 0; -} diff --git a/test/core/network_benchmarks/low_level_ping_pong.c b/test/core/network_benchmarks/low_level_ping_pong.c index b72a07778e0..1b40895a719 100644 --- a/test/core/network_benchmarks/low_level_ping_pong.c +++ b/test/core/network_benchmarks/low_level_ping_pong.c @@ -44,7 +44,6 @@ #include #include #include -#include #ifdef __linux__ #include #endif @@ -85,7 +84,6 @@ typedef struct thread_args { static int read_bytes(int fd, char *buf, size_t read_size, int spin) { size_t bytes_read = 0; ssize_t err; - do { err = read(fd, buf + bytes_read, read_size - bytes_read); if (err < 0) { diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index d968278f2a4..21ee1e6ff8a 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -808,7 +808,6 @@ src/core/lib/iomgr/closure.h \ src/core/lib/iomgr/endpoint.h \ src/core/lib/iomgr/endpoint_pair.h \ src/core/lib/iomgr/ev_epoll_linux.h \ -src/core/lib/iomgr/ev_epoll_posix.h \ src/core/lib/iomgr/ev_poll_posix.h \ src/core/lib/iomgr/ev_posix.h \ src/core/lib/iomgr/exec_ctx.h \ @@ -957,7 +956,6 @@ src/core/lib/iomgr/endpoint.c \ src/core/lib/iomgr/endpoint_pair_posix.c \ src/core/lib/iomgr/endpoint_pair_windows.c \ src/core/lib/iomgr/ev_epoll_linux.c \ -src/core/lib/iomgr/ev_epoll_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ src/core/lib/iomgr/exec_ctx.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 85b71a8255a..304a0e1e3a9 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -301,22 +301,6 @@ "third_party": false, "type": "target" }, - { - "deps": [ - "gpr", - "gpr_test_util", - "grpc", - "grpc_test_util" - ], - "headers": [], - "language": "c", - "name": "epoll_test", - "src": [ - "test/core/network_benchmarks/epoll_test.c" - ], - "third_party": false, - "type": "target" - }, { "deps": [ "gpr", @@ -5547,7 +5531,6 @@ "src/core/lib/iomgr/endpoint.h", "src/core/lib/iomgr/endpoint_pair.h", "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_epoll_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", "src/core/lib/iomgr/exec_ctx.h", @@ -5649,8 +5632,6 @@ "src/core/lib/iomgr/endpoint_pair_windows.c", "src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_epoll_posix.c", - "src/core/lib/iomgr/ev_epoll_posix.h", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.c", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index be7b72f61d2..850f9474aec 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -356,21 +356,6 @@ "windows" ] }, - { - "args": [], - "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "gtest": false, - "language": "c", - "name": "epoll_test", - "platforms": [ - "linux" - ] - }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index a67e4d16dad..ce523725e8e 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -317,7 +317,6 @@ - @@ -487,8 +486,6 @@ - - diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index bf9b7dc7dcf..d46676f2296 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -58,9 +58,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr @@ -683,9 +680,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index afc9a2ca1b2..d4dd428c2db 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -305,7 +305,6 @@ - @@ -453,8 +452,6 @@ - - diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index b7507f9a963..d14e7e7ab41 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -61,9 +61,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr @@ -581,9 +578,6 @@ src\core\lib\iomgr - - src\core\lib\iomgr - src\core\lib\iomgr From 5258412df9ea2941e8f49f75693f6ac052c5caff Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 6 Jun 2016 09:36:10 -0700 Subject: [PATCH 0871/1894] Fix platform ifdef --- src/core/lib/iomgr/error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index fddaa8f4b26..8143a85dea3 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -507,7 +507,7 @@ grpc_error *grpc_os_error(const char *file, int line, int err, GRPC_ERROR_STR_SYSCALL, call_name); } -#ifdef GPR_WIN32 +#ifdef GPR_WINDOWS grpc_error *grpc_wsa_error(const char *file, int line, int err, const char *call_name) { char *utf8_message = gpr_format_message(err); From 781720f82d2cb97f1447653c55d9504c46f86742 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 3 Jun 2016 17:40:28 -0700 Subject: [PATCH 0872/1894] get rid of servicename argument for server service definition. --- src/csharp/Grpc.Core.Tests/MockServiceHelper.cs | 2 +- src/csharp/Grpc.Core.Tests/ServerTest.cs | 2 +- src/csharp/Grpc.Core/AsyncClientStreamingCall.cs | 4 ++++ src/csharp/Grpc.Core/ServerServiceDefinition.cs | 10 +++------- src/csharp/Grpc.IntegrationTesting/GenericService.cs | 2 +- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/MockServiceHelper.cs b/src/csharp/Grpc.Core.Tests/MockServiceHelper.cs index 30473143452..4d904700569 100644 --- a/src/csharp/Grpc.Core.Tests/MockServiceHelper.cs +++ b/src/csharp/Grpc.Core.Tests/MockServiceHelper.cs @@ -102,7 +102,7 @@ namespace Grpc.Core.Tests marshaller, marshaller); - serviceDefinition = ServerServiceDefinition.CreateBuilder(ServiceName) + serviceDefinition = ServerServiceDefinition.CreateBuilder() .AddMethod(unaryMethod, (request, context) => unaryHandler(request, context)) .AddMethod(clientStreamingMethod, (requestStream, context) => clientStreamingHandler(requestStream, context)) .AddMethod(serverStreamingMethod, (request, responseStream, context) => serverStreamingHandler(request, responseStream, context)) diff --git a/src/csharp/Grpc.Core.Tests/ServerTest.cs b/src/csharp/Grpc.Core.Tests/ServerTest.cs index b40508accc7..fa693162ada 100644 --- a/src/csharp/Grpc.Core.Tests/ServerTest.cs +++ b/src/csharp/Grpc.Core.Tests/ServerTest.cs @@ -89,7 +89,7 @@ namespace Grpc.Core.Tests }; server.Start(); Assert.Throws(typeof(InvalidOperationException), () => server.Ports.Add("localhost", 9999, ServerCredentials.Insecure)); - Assert.Throws(typeof(InvalidOperationException), () => server.Services.Add(ServerServiceDefinition.CreateBuilder("serviceName").Build())); + Assert.Throws(typeof(InvalidOperationException), () => server.Services.Add(ServerServiceDefinition.CreateBuilder().Build())); server.ShutdownAsync().Wait(); } diff --git a/src/csharp/Grpc.Core/AsyncClientStreamingCall.cs b/src/csharp/Grpc.Core/AsyncClientStreamingCall.cs index 5646fed3d96..02b08d2a10c 100644 --- a/src/csharp/Grpc.Core/AsyncClientStreamingCall.cs +++ b/src/csharp/Grpc.Core/AsyncClientStreamingCall.cs @@ -127,6 +127,10 @@ namespace Grpc.Core /// Otherwise, requests cancellation of the call which should terminate all pending async operations associated with the call. /// As a result, all resources being used by the call should be released eventually. /// + /// + /// Normally, there is no need for you to dispose the call unless you want to utilize the + /// "Cancel" semantics of invoking Dispose. + /// public void Dispose() { disposeAction.Invoke(); diff --git a/src/csharp/Grpc.Core/ServerServiceDefinition.cs b/src/csharp/Grpc.Core/ServerServiceDefinition.cs index deb1431ca36..ac08c04bf6a 100644 --- a/src/csharp/Grpc.Core/ServerServiceDefinition.cs +++ b/src/csharp/Grpc.Core/ServerServiceDefinition.cs @@ -63,11 +63,10 @@ namespace Grpc.Core /// /// Creates a new builder object for ServerServiceDefinition. /// - /// The service name. /// The builder object. - public static Builder CreateBuilder(string serviceName) + public static Builder CreateBuilder() { - return new Builder(serviceName); + return new Builder(); } /// @@ -75,16 +74,13 @@ namespace Grpc.Core /// public class Builder { - readonly string serviceName; readonly Dictionary callHandlers = new Dictionary(); /// /// Creates a new instance of builder. /// - /// The service name. - public Builder(string serviceName) + public Builder() { - this.serviceName = serviceName; } /// diff --git a/src/csharp/Grpc.IntegrationTesting/GenericService.cs b/src/csharp/Grpc.IntegrationTesting/GenericService.cs index c6128264ac5..53fa1ee5f60 100644 --- a/src/csharp/Grpc.IntegrationTesting/GenericService.cs +++ b/src/csharp/Grpc.IntegrationTesting/GenericService.cs @@ -64,7 +64,7 @@ namespace Grpc.IntegrationTesting public static ServerServiceDefinition BindHandler(DuplexStreamingServerMethod handler) { - return ServerServiceDefinition.CreateBuilder(StreamingCallMethod.ServiceName) + return ServerServiceDefinition.CreateBuilder() .AddMethod(StreamingCallMethod, handler).Build(); } } From 562cd05bc97e24b2cba82777a8e8621fcc8ace37 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 6 Jun 2016 08:47:17 -0700 Subject: [PATCH 0873/1894] update C# codegen and regenerate --- src/compiler/csharp_generator.cc | 4 +--- src/csharp/Grpc.Examples/MathGrpc.cs | 4 ++-- src/csharp/Grpc.HealthCheck/HealthGrpc.cs | 4 ++-- src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs | 4 ++-- src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs | 8 ++++---- src/csharp/Grpc.IntegrationTesting/TestGrpc.cs | 12 ++++++------ 6 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/compiler/csharp_generator.cc b/src/compiler/csharp_generator.cc index 484fa3cdcc4..7bf05483415 100644 --- a/src/compiler/csharp_generator.cc +++ b/src/compiler/csharp_generator.cc @@ -559,9 +559,7 @@ void GenerateBindServiceMethod(Printer* out, const ServiceDescriptor *service, out->Print("{\n"); out->Indent(); - out->Print( - "return ServerServiceDefinition.CreateBuilder($servicenamefield$)\n", - "servicenamefield", GetServiceNameFieldName()); + out->Print("return ServerServiceDefinition.CreateBuilder()\n"); out->Indent(); out->Indent(); for (int i = 0; i < service->method_count(); i++) { diff --git a/src/csharp/Grpc.Examples/MathGrpc.cs b/src/csharp/Grpc.Examples/MathGrpc.cs index d700a18778b..0bc7b8c06e7 100644 --- a/src/csharp/Grpc.Examples/MathGrpc.cs +++ b/src/csharp/Grpc.Examples/MathGrpc.cs @@ -339,7 +339,7 @@ namespace Math { public static ServerServiceDefinition BindService(IMath serviceImpl) #pragma warning restore 0618 { - return ServerServiceDefinition.CreateBuilder(__ServiceName) + return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_Div, serviceImpl.Div) .AddMethod(__Method_DivMany, serviceImpl.DivMany) .AddMethod(__Method_Fib, serviceImpl.Fib) @@ -351,7 +351,7 @@ namespace Math { public static ServerServiceDefinition BindService(MathBase serviceImpl) #pragma warning restore 0618 { - return ServerServiceDefinition.CreateBuilder(__ServiceName) + return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_Div, serviceImpl.Div) .AddMethod(__Method_DivMany, serviceImpl.DivMany) .AddMethod(__Method_Fib, serviceImpl.Fib) diff --git a/src/csharp/Grpc.HealthCheck/HealthGrpc.cs b/src/csharp/Grpc.HealthCheck/HealthGrpc.cs index 51c6a39b1d8..40f9b95ae30 100644 --- a/src/csharp/Grpc.HealthCheck/HealthGrpc.cs +++ b/src/csharp/Grpc.HealthCheck/HealthGrpc.cs @@ -138,7 +138,7 @@ namespace Grpc.Health.V1 { public static ServerServiceDefinition BindService(IHealth serviceImpl) #pragma warning restore 0618 { - return ServerServiceDefinition.CreateBuilder(__ServiceName) + return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_Check, serviceImpl.Check).Build(); } @@ -147,7 +147,7 @@ namespace Grpc.Health.V1 { public static ServerServiceDefinition BindService(HealthBase serviceImpl) #pragma warning restore 0618 { - return ServerServiceDefinition.CreateBuilder(__ServiceName) + return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_Check, serviceImpl.Check).Build(); } diff --git a/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs b/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs index 9d31d1c5146..8c64f4ff728 100644 --- a/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs @@ -222,7 +222,7 @@ namespace Grpc.Testing { public static ServerServiceDefinition BindService(IMetricsService serviceImpl) #pragma warning restore 0618 { - return ServerServiceDefinition.CreateBuilder(__ServiceName) + return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_GetAllGauges, serviceImpl.GetAllGauges) .AddMethod(__Method_GetGauge, serviceImpl.GetGauge).Build(); } @@ -232,7 +232,7 @@ namespace Grpc.Testing { public static ServerServiceDefinition BindService(MetricsServiceBase serviceImpl) #pragma warning restore 0618 { - return ServerServiceDefinition.CreateBuilder(__ServiceName) + return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_GetAllGauges, serviceImpl.GetAllGauges) .AddMethod(__Method_GetGauge, serviceImpl.GetGauge).Build(); } diff --git a/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs b/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs index f7071ebf6be..171945e56e7 100644 --- a/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs @@ -227,7 +227,7 @@ namespace Grpc.Testing { public static ServerServiceDefinition BindService(IBenchmarkService serviceImpl) #pragma warning restore 0618 { - return ServerServiceDefinition.CreateBuilder(__ServiceName) + return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall) .AddMethod(__Method_StreamingCall, serviceImpl.StreamingCall).Build(); } @@ -237,7 +237,7 @@ namespace Grpc.Testing { public static ServerServiceDefinition BindService(BenchmarkServiceBase serviceImpl) #pragma warning restore 0618 { - return ServerServiceDefinition.CreateBuilder(__ServiceName) + return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall) .AddMethod(__Method_StreamingCall, serviceImpl.StreamingCall).Build(); } @@ -583,7 +583,7 @@ namespace Grpc.Testing { public static ServerServiceDefinition BindService(IWorkerService serviceImpl) #pragma warning restore 0618 { - return ServerServiceDefinition.CreateBuilder(__ServiceName) + return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_RunServer, serviceImpl.RunServer) .AddMethod(__Method_RunClient, serviceImpl.RunClient) .AddMethod(__Method_CoreCount, serviceImpl.CoreCount) @@ -595,7 +595,7 @@ namespace Grpc.Testing { public static ServerServiceDefinition BindService(WorkerServiceBase serviceImpl) #pragma warning restore 0618 { - return ServerServiceDefinition.CreateBuilder(__ServiceName) + return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_RunServer, serviceImpl.RunServer) .AddMethod(__Method_RunClient, serviceImpl.RunClient) .AddMethod(__Method_CoreCount, serviceImpl.CoreCount) diff --git a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs index cf43a77118c..9e356519556 100644 --- a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs @@ -449,7 +449,7 @@ namespace Grpc.Testing { public static ServerServiceDefinition BindService(ITestService serviceImpl) #pragma warning restore 0618 { - return ServerServiceDefinition.CreateBuilder(__ServiceName) + return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall) .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall) .AddMethod(__Method_StreamingOutputCall, serviceImpl.StreamingOutputCall) @@ -463,7 +463,7 @@ namespace Grpc.Testing { public static ServerServiceDefinition BindService(TestServiceBase serviceImpl) #pragma warning restore 0618 { - return ServerServiceDefinition.CreateBuilder(__ServiceName) + return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall) .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall) .AddMethod(__Method_StreamingOutputCall, serviceImpl.StreamingOutputCall) @@ -606,7 +606,7 @@ namespace Grpc.Testing { public static ServerServiceDefinition BindService(IUnimplementedService serviceImpl) #pragma warning restore 0618 { - return ServerServiceDefinition.CreateBuilder(__ServiceName) + return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build(); } @@ -615,7 +615,7 @@ namespace Grpc.Testing { public static ServerServiceDefinition BindService(UnimplementedServiceBase serviceImpl) #pragma warning restore 0618 { - return ServerServiceDefinition.CreateBuilder(__ServiceName) + return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build(); } @@ -757,7 +757,7 @@ namespace Grpc.Testing { public static ServerServiceDefinition BindService(IReconnectService serviceImpl) #pragma warning restore 0618 { - return ServerServiceDefinition.CreateBuilder(__ServiceName) + return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_Start, serviceImpl.Start) .AddMethod(__Method_Stop, serviceImpl.Stop).Build(); } @@ -767,7 +767,7 @@ namespace Grpc.Testing { public static ServerServiceDefinition BindService(ReconnectServiceBase serviceImpl) #pragma warning restore 0618 { - return ServerServiceDefinition.CreateBuilder(__ServiceName) + return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_Start, serviceImpl.Start) .AddMethod(__Method_Stop, serviceImpl.Stop).Build(); } From fcc8d971ff8b46bf88e0231fda713b274597af99 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 6 Jun 2016 09:44:02 -0700 Subject: [PATCH 0874/1894] get rid of deprecated server and client interface --- src/compiler/csharp_generator.cc | 112 +-------- src/csharp/Grpc.Examples/MathGrpc.cs | 109 +-------- src/csharp/Grpc.HealthCheck/HealthGrpc.cs | 32 +-- .../Grpc.IntegrationTesting/MetricsGrpc.cs | 63 +---- .../Grpc.IntegrationTesting/ServicesGrpc.cs | 192 +-------------- .../Grpc.IntegrationTesting/TestGrpc.cs | 226 +----------------- 6 files changed, 14 insertions(+), 720 deletions(-) diff --git a/src/compiler/csharp_generator.cc b/src/compiler/csharp_generator.cc index 7bf05483415..fc8feaf0fcc 100644 --- a/src/compiler/csharp_generator.cc +++ b/src/compiler/csharp_generator.cc @@ -119,18 +119,10 @@ std::string GetServiceClassName(const ServiceDescriptor* service) { return service->name(); } -std::string GetClientInterfaceName(const ServiceDescriptor* service) { - return "I" + service->name() + "Client"; -} - std::string GetClientClassName(const ServiceDescriptor* service) { return service->name() + "Client"; } -std::string GetServerInterfaceName(const ServiceDescriptor* service) { - return "I" + service->name(); -} - std::string GetServerClassName(const ServiceDescriptor* service) { return service->name() + "Base"; } @@ -302,86 +294,6 @@ void GenerateServiceDescriptorProperty(Printer* out, const ServiceDescriptor *se out->Print("\n"); } -void GenerateClientInterface(Printer* out, const ServiceDescriptor *service) { - out->Print("/// Client for $servicename$\n", - "servicename", GetServiceClassName(service)); - out->Print("[System.Obsolete(\"Client side interfaced will be removed " - "in the next release. Use client class directly.\")]\n"); - out->Print("public interface $name$\n", "name", - GetClientInterfaceName(service)); - out->Print("{\n"); - out->Indent(); - for (int i = 0; i < service->method_count(); i++) { - const MethodDescriptor *method = service->method(i); - MethodType method_type = GetMethodType(method); - - if (method_type == METHODTYPE_NO_STREAMING) { - // unary calls have an extra synchronous stub method - GenerateDocCommentBody(out, method); - out->Print( - "$response$ $methodname$($request$ request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));\n", - "methodname", method->name(), "request", - GetClassName(method->input_type()), "response", - GetClassName(method->output_type())); - - // overload taking CallOptions as a param - GenerateDocCommentBody(out, method); - out->Print( - "$response$ $methodname$($request$ request, CallOptions options);\n", - "methodname", method->name(), "request", - GetClassName(method->input_type()), "response", - GetClassName(method->output_type())); - } - - std::string method_name = method->name(); - if (method_type == METHODTYPE_NO_STREAMING) { - method_name += "Async"; // prevent name clash with synchronous method. - } - GenerateDocCommentBody(out, method); - out->Print( - "$returntype$ $methodname$($request_maybe$Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken));\n", - "methodname", method_name, "request_maybe", - GetMethodRequestParamMaybe(method), "returntype", - GetMethodReturnTypeClient(method)); - - // overload taking CallOptions as a param - GenerateDocCommentBody(out, method); - out->Print( - "$returntype$ $methodname$($request_maybe$CallOptions options);\n", - "methodname", method_name, "request_maybe", - GetMethodRequestParamMaybe(method), "returntype", - GetMethodReturnTypeClient(method)); - } - out->Outdent(); - out->Print("}\n"); - out->Print("\n"); -} - -void GenerateServerInterface(Printer* out, const ServiceDescriptor *service) { - out->Print("/// Interface of server-side implementations of $servicename$\n", - "servicename", GetServiceClassName(service)); - out->Print("[System.Obsolete(\"Service implementations should inherit" - " from the generated abstract base class instead.\")]\n"); - out->Print("public interface $name$\n", "name", - GetServerInterfaceName(service)); - out->Print("{\n"); - out->Indent(); - for (int i = 0; i < service->method_count(); i++) { - const MethodDescriptor *method = service->method(i); - GenerateDocCommentBody(out, method); - out->Print( - "$returntype$ $methodname$($request$$response_stream_maybe$, " - "ServerCallContext context);\n", - "methodname", method->name(), "returntype", - GetMethodReturnTypeServer(method), "request", - GetMethodRequestParamServer(method), "response_stream_maybe", - GetMethodResponseStreamMaybe(method)); - } - out->Outdent(); - out->Print("}\n"); - out->Print("\n"); -} - void GenerateServerClass(Printer* out, const ServiceDescriptor *service) { out->Print("/// Base class for server-side implementations of $servicename$\n", "servicename", GetServiceClassName(service)); @@ -414,12 +326,9 @@ void GenerateServerClass(Printer* out, const ServiceDescriptor *service) { void GenerateClientStub(Printer* out, const ServiceDescriptor *service) { out->Print("/// Client for $servicename$\n", "servicename", GetServiceClassName(service)); - out->Print("#pragma warning disable 0618\n"); out->Print( - "public class $name$ : ClientBase<$name$>, $interface$\n", - "name", GetClientClassName(service), - "interface", GetClientInterfaceName(service)); - out->Print("#pragma warning restore 0618\n"); + "public class $name$ : ClientBase<$name$>\n", + "name", GetClientClassName(service)); out->Print("{\n"); out->Indent(); @@ -546,16 +455,12 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) { out->Print("\n"); } -void GenerateBindServiceMethod(Printer* out, const ServiceDescriptor *service, - bool use_server_class) { +void GenerateBindServiceMethod(Printer* out, const ServiceDescriptor *service) { out->Print( "/// Creates service definition that can be registered with a server\n"); - out->Print("#pragma warning disable 0618\n"); out->Print( - "public static ServerServiceDefinition BindService($interface$ serviceImpl)\n", - "interface", use_server_class ? GetServerClassName(service) : - GetServerInterfaceName(service)); - out->Print("#pragma warning restore 0618\n"); + "public static ServerServiceDefinition BindService($implclass$ serviceImpl)\n", + "implclass", GetServerClassName(service)); out->Print("{\n"); out->Indent(); @@ -614,11 +519,7 @@ void GenerateService(Printer* out, const ServiceDescriptor *service, } GenerateServiceDescriptorProperty(out, service); - if (generate_client) { - GenerateClientInterface(out, service); - } if (generate_server) { - GenerateServerInterface(out, service); GenerateServerClass(out, service); } if (generate_client) { @@ -626,8 +527,7 @@ void GenerateService(Printer* out, const ServiceDescriptor *service, GenerateNewStubMethods(out, service); } if (generate_server) { - GenerateBindServiceMethod(out, service, false); - GenerateBindServiceMethod(out, service, true); + GenerateBindServiceMethod(out, service); } out->Outdent(); diff --git a/src/csharp/Grpc.Examples/MathGrpc.cs b/src/csharp/Grpc.Examples/MathGrpc.cs index 0bc7b8c06e7..9319e311ee6 100644 --- a/src/csharp/Grpc.Examples/MathGrpc.cs +++ b/src/csharp/Grpc.Examples/MathGrpc.cs @@ -81,97 +81,6 @@ namespace Math { get { return global::Math.MathReflection.Descriptor.Services[0]; } } - /// Client for Math - [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")] - public interface IMathClient - { - /// - /// Div divides args.dividend by args.divisor and returns the quotient and - /// remainder. - /// - global::Math.DivReply Div(global::Math.DivArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Div divides args.dividend by args.divisor and returns the quotient and - /// remainder. - /// - global::Math.DivReply Div(global::Math.DivArgs request, CallOptions options); - /// - /// Div divides args.dividend by args.divisor and returns the quotient and - /// remainder. - /// - AsyncUnaryCall DivAsync(global::Math.DivArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Div divides args.dividend by args.divisor and returns the quotient and - /// remainder. - /// - AsyncUnaryCall DivAsync(global::Math.DivArgs request, CallOptions options); - /// - /// DivMany accepts an arbitrary number of division args from the client stream - /// and sends back the results in the reply stream. The stream continues until - /// the client closes its end; the server does the same after sending all the - /// replies. The stream ends immediately if either end aborts. - /// - AsyncDuplexStreamingCall DivMany(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// DivMany accepts an arbitrary number of division args from the client stream - /// and sends back the results in the reply stream. The stream continues until - /// the client closes its end; the server does the same after sending all the - /// replies. The stream ends immediately if either end aborts. - /// - AsyncDuplexStreamingCall DivMany(CallOptions options); - /// - /// Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib - /// generates up to limit numbers; otherwise it continues until the call is - /// canceled. Unlike Fib above, Fib has no final FibReply. - /// - AsyncServerStreamingCall Fib(global::Math.FibArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib - /// generates up to limit numbers; otherwise it continues until the call is - /// canceled. Unlike Fib above, Fib has no final FibReply. - /// - AsyncServerStreamingCall Fib(global::Math.FibArgs request, CallOptions options); - /// - /// Sum sums a stream of numbers, returning the final result once the stream - /// is closed. - /// - AsyncClientStreamingCall Sum(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Sum sums a stream of numbers, returning the final result once the stream - /// is closed. - /// - AsyncClientStreamingCall Sum(CallOptions options); - } - - /// Interface of server-side implementations of Math - [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")] - public interface IMath - { - /// - /// Div divides args.dividend by args.divisor and returns the quotient and - /// remainder. - /// - global::System.Threading.Tasks.Task Div(global::Math.DivArgs request, ServerCallContext context); - /// - /// DivMany accepts an arbitrary number of division args from the client stream - /// and sends back the results in the reply stream. The stream continues until - /// the client closes its end; the server does the same after sending all the - /// replies. The stream ends immediately if either end aborts. - /// - global::System.Threading.Tasks.Task DivMany(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); - /// - /// Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib - /// generates up to limit numbers; otherwise it continues until the call is - /// canceled. Unlike Fib above, Fib has no final FibReply. - /// - global::System.Threading.Tasks.Task Fib(global::Math.FibArgs request, IServerStreamWriter responseStream, ServerCallContext context); - /// - /// Sum sums a stream of numbers, returning the final result once the stream - /// is closed. - /// - global::System.Threading.Tasks.Task Sum(IAsyncStreamReader requestStream, ServerCallContext context); - } - /// Base class for server-side implementations of Math public abstract class MathBase { @@ -217,9 +126,7 @@ namespace Math { } /// Client for Math - #pragma warning disable 0618 - public class MathClient : ClientBase, IMathClient - #pragma warning restore 0618 + public class MathClient : ClientBase { public MathClient(Channel channel) : base(channel) { @@ -335,21 +242,7 @@ namespace Math { } /// Creates service definition that can be registered with a server - #pragma warning disable 0618 - public static ServerServiceDefinition BindService(IMath serviceImpl) - #pragma warning restore 0618 - { - return ServerServiceDefinition.CreateBuilder() - .AddMethod(__Method_Div, serviceImpl.Div) - .AddMethod(__Method_DivMany, serviceImpl.DivMany) - .AddMethod(__Method_Fib, serviceImpl.Fib) - .AddMethod(__Method_Sum, serviceImpl.Sum).Build(); - } - - /// Creates service definition that can be registered with a server - #pragma warning disable 0618 public static ServerServiceDefinition BindService(MathBase serviceImpl) - #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_Div, serviceImpl.Div) diff --git a/src/csharp/Grpc.HealthCheck/HealthGrpc.cs b/src/csharp/Grpc.HealthCheck/HealthGrpc.cs index 40f9b95ae30..d0ade7d02be 100644 --- a/src/csharp/Grpc.HealthCheck/HealthGrpc.cs +++ b/src/csharp/Grpc.HealthCheck/HealthGrpc.cs @@ -58,23 +58,6 @@ namespace Grpc.Health.V1 { get { return global::Grpc.Health.V1.HealthReflection.Descriptor.Services[0]; } } - /// Client for Health - [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")] - public interface IHealthClient - { - global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Health.V1.HealthCheckRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - global::Grpc.Health.V1.HealthCheckResponse Check(global::Grpc.Health.V1.HealthCheckRequest request, CallOptions options); - AsyncUnaryCall CheckAsync(global::Grpc.Health.V1.HealthCheckRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - AsyncUnaryCall CheckAsync(global::Grpc.Health.V1.HealthCheckRequest request, CallOptions options); - } - - /// Interface of server-side implementations of Health - [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")] - public interface IHealth - { - global::System.Threading.Tasks.Task Check(global::Grpc.Health.V1.HealthCheckRequest request, ServerCallContext context); - } - /// Base class for server-side implementations of Health public abstract class HealthBase { @@ -86,9 +69,7 @@ namespace Grpc.Health.V1 { } /// Client for Health - #pragma warning disable 0618 - public class HealthClient : ClientBase, IHealthClient - #pragma warning restore 0618 + public class HealthClient : ClientBase { public HealthClient(Channel channel) : base(channel) { @@ -134,18 +115,7 @@ namespace Grpc.Health.V1 { } /// Creates service definition that can be registered with a server - #pragma warning disable 0618 - public static ServerServiceDefinition BindService(IHealth serviceImpl) - #pragma warning restore 0618 - { - return ServerServiceDefinition.CreateBuilder() - .AddMethod(__Method_Check, serviceImpl.Check).Build(); - } - - /// Creates service definition that can be registered with a server - #pragma warning disable 0618 public static ServerServiceDefinition BindService(HealthBase serviceImpl) - #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_Check, serviceImpl.Check).Build(); diff --git a/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs b/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs index 8c64f4ff728..22bd27ec0aa 100644 --- a/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs @@ -72,53 +72,6 @@ namespace Grpc.Testing { get { return global::Grpc.Testing.MetricsReflection.Descriptor.Services[0]; } } - /// Client for MetricsService - [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")] - public interface IMetricsServiceClient - { - /// - /// Returns the values of all the gauges that are currently being maintained by - /// the service - /// - AsyncServerStreamingCall GetAllGauges(global::Grpc.Testing.EmptyMessage request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns the values of all the gauges that are currently being maintained by - /// the service - /// - AsyncServerStreamingCall GetAllGauges(global::Grpc.Testing.EmptyMessage request, CallOptions options); - /// - /// Returns the value of one gauge - /// - global::Grpc.Testing.GaugeResponse GetGauge(global::Grpc.Testing.GaugeRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns the value of one gauge - /// - global::Grpc.Testing.GaugeResponse GetGauge(global::Grpc.Testing.GaugeRequest request, CallOptions options); - /// - /// Returns the value of one gauge - /// - AsyncUnaryCall GetGaugeAsync(global::Grpc.Testing.GaugeRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Returns the value of one gauge - /// - AsyncUnaryCall GetGaugeAsync(global::Grpc.Testing.GaugeRequest request, CallOptions options); - } - - /// Interface of server-side implementations of MetricsService - [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")] - public interface IMetricsService - { - /// - /// Returns the values of all the gauges that are currently being maintained by - /// the service - /// - global::System.Threading.Tasks.Task GetAllGauges(global::Grpc.Testing.EmptyMessage request, IServerStreamWriter responseStream, ServerCallContext context); - /// - /// Returns the value of one gauge - /// - global::System.Threading.Tasks.Task GetGauge(global::Grpc.Testing.GaugeRequest request, ServerCallContext context); - } - /// Base class for server-side implementations of MetricsService public abstract class MetricsServiceBase { @@ -142,9 +95,7 @@ namespace Grpc.Testing { } /// Client for MetricsService - #pragma warning disable 0618 - public class MetricsServiceClient : ClientBase, IMetricsServiceClient - #pragma warning restore 0618 + public class MetricsServiceClient : ClientBase { public MetricsServiceClient(Channel channel) : base(channel) { @@ -218,19 +169,7 @@ namespace Grpc.Testing { } /// Creates service definition that can be registered with a server - #pragma warning disable 0618 - public static ServerServiceDefinition BindService(IMetricsService serviceImpl) - #pragma warning restore 0618 - { - return ServerServiceDefinition.CreateBuilder() - .AddMethod(__Method_GetAllGauges, serviceImpl.GetAllGauges) - .AddMethod(__Method_GetGauge, serviceImpl.GetGauge).Build(); - } - - /// Creates service definition that can be registered with a server - #pragma warning disable 0618 public static ServerServiceDefinition BindService(MetricsServiceBase serviceImpl) - #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_GetAllGauges, serviceImpl.GetAllGauges) diff --git a/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs b/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs index 171945e56e7..9c99296115c 100644 --- a/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs @@ -67,58 +67,6 @@ namespace Grpc.Testing { get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[0]; } } - /// Client for BenchmarkService - [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")] - public interface IBenchmarkServiceClient - { - /// - /// One request followed by one response. - /// The server returns the client payload as-is. - /// - global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// One request followed by one response. - /// The server returns the client payload as-is. - /// - global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options); - /// - /// One request followed by one response. - /// The server returns the client payload as-is. - /// - AsyncUnaryCall UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// One request followed by one response. - /// The server returns the client payload as-is. - /// - AsyncUnaryCall UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options); - /// - /// One request followed by one response. - /// The server returns the client payload as-is. - /// - AsyncDuplexStreamingCall StreamingCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// One request followed by one response. - /// The server returns the client payload as-is. - /// - AsyncDuplexStreamingCall StreamingCall(CallOptions options); - } - - /// Interface of server-side implementations of BenchmarkService - [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")] - public interface IBenchmarkService - { - /// - /// One request followed by one response. - /// The server returns the client payload as-is. - /// - global::System.Threading.Tasks.Task UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context); - /// - /// One request followed by one response. - /// The server returns the client payload as-is. - /// - global::System.Threading.Tasks.Task StreamingCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); - } - /// Base class for server-side implementations of BenchmarkService public abstract class BenchmarkServiceBase { @@ -143,9 +91,7 @@ namespace Grpc.Testing { } /// Client for BenchmarkService - #pragma warning disable 0618 - public class BenchmarkServiceClient : ClientBase, IBenchmarkServiceClient - #pragma warning restore 0618 + public class BenchmarkServiceClient : ClientBase { public BenchmarkServiceClient(Channel channel) : base(channel) { @@ -223,19 +169,7 @@ namespace Grpc.Testing { } /// Creates service definition that can be registered with a server - #pragma warning disable 0618 - public static ServerServiceDefinition BindService(IBenchmarkService serviceImpl) - #pragma warning restore 0618 - { - return ServerServiceDefinition.CreateBuilder() - .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall) - .AddMethod(__Method_StreamingCall, serviceImpl.StreamingCall).Build(); - } - - /// Creates service definition that can be registered with a server - #pragma warning disable 0618 public static ServerServiceDefinition BindService(BenchmarkServiceBase serviceImpl) - #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall) @@ -289,112 +223,6 @@ namespace Grpc.Testing { get { return global::Grpc.Testing.ServicesReflection.Descriptor.Services[1]; } } - /// Client for WorkerService - [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")] - public interface IWorkerServiceClient - { - /// - /// 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. - /// - AsyncDuplexStreamingCall RunServer(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(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. - /// - AsyncDuplexStreamingCall RunServer(CallOptions 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. - /// - AsyncDuplexStreamingCall RunClient(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(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. - /// - AsyncDuplexStreamingCall RunClient(CallOptions options); - /// - /// Just return the core count - unary call - /// - global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Just return the core count - unary call - /// - global::Grpc.Testing.CoreResponse CoreCount(global::Grpc.Testing.CoreRequest request, CallOptions options); - /// - /// Just return the core count - unary call - /// - AsyncUnaryCall CoreCountAsync(global::Grpc.Testing.CoreRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Just return the core count - unary call - /// - AsyncUnaryCall CoreCountAsync(global::Grpc.Testing.CoreRequest request, CallOptions options); - /// - /// Quit this worker - /// - global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Quit this worker - /// - global::Grpc.Testing.Void QuitWorker(global::Grpc.Testing.Void request, CallOptions options); - /// - /// Quit this worker - /// - AsyncUnaryCall QuitWorkerAsync(global::Grpc.Testing.Void request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// Quit this worker - /// - AsyncUnaryCall QuitWorkerAsync(global::Grpc.Testing.Void request, CallOptions options); - } - - /// Interface of server-side implementations of WorkerService - [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")] - public interface IWorkerService - { - /// - /// 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. - /// - global::System.Threading.Tasks.Task RunServer(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); - /// - /// 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. - /// - global::System.Threading.Tasks.Task RunClient(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); - /// - /// Just return the core count - unary call - /// - global::System.Threading.Tasks.Task CoreCount(global::Grpc.Testing.CoreRequest request, ServerCallContext context); - /// - /// Quit this worker - /// - global::System.Threading.Tasks.Task QuitWorker(global::Grpc.Testing.Void request, ServerCallContext context); - } - /// Base class for server-side implementations of WorkerService public abstract class WorkerServiceBase { @@ -443,9 +271,7 @@ namespace Grpc.Testing { } /// Client for WorkerService - #pragma warning disable 0618 - public class WorkerServiceClient : ClientBase, IWorkerServiceClient - #pragma warning restore 0618 + public class WorkerServiceClient : ClientBase { public WorkerServiceClient(Channel channel) : base(channel) { @@ -579,21 +405,7 @@ namespace Grpc.Testing { } /// Creates service definition that can be registered with a server - #pragma warning disable 0618 - public static ServerServiceDefinition BindService(IWorkerService serviceImpl) - #pragma warning restore 0618 - { - return ServerServiceDefinition.CreateBuilder() - .AddMethod(__Method_RunServer, serviceImpl.RunServer) - .AddMethod(__Method_RunClient, serviceImpl.RunClient) - .AddMethod(__Method_CoreCount, serviceImpl.CoreCount) - .AddMethod(__Method_QuitWorker, serviceImpl.QuitWorker).Build(); - } - - /// Creates service definition that can be registered with a server - #pragma warning disable 0618 public static ServerServiceDefinition BindService(WorkerServiceBase serviceImpl) - #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_RunServer, serviceImpl.RunServer) diff --git a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs index 9e356519556..6c252013f84 100644 --- a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs @@ -105,127 +105,6 @@ namespace Grpc.Testing { get { return global::Grpc.Testing.TestReflection.Descriptor.Services[0]; } } - /// Client for TestService - [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")] - public interface ITestServiceClient - { - /// - /// One empty request followed by one empty response. - /// - global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// One empty request followed by one empty response. - /// - global::Grpc.Testing.Empty EmptyCall(global::Grpc.Testing.Empty request, CallOptions options); - /// - /// One empty request followed by one empty response. - /// - AsyncUnaryCall EmptyCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// One empty request followed by one empty response. - /// - AsyncUnaryCall EmptyCallAsync(global::Grpc.Testing.Empty request, CallOptions options); - /// - /// One request followed by one response. - /// - global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// One request followed by one response. - /// - global::Grpc.Testing.SimpleResponse UnaryCall(global::Grpc.Testing.SimpleRequest request, CallOptions options); - /// - /// One request followed by one response. - /// - AsyncUnaryCall UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// One request followed by one response. - /// - AsyncUnaryCall UnaryCallAsync(global::Grpc.Testing.SimpleRequest request, CallOptions options); - /// - /// One request followed by a sequence of responses (streamed download). - /// The server returns the payload with client desired type and sizes. - /// - AsyncServerStreamingCall StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// One request followed by a sequence of responses (streamed download). - /// The server returns the payload with client desired type and sizes. - /// - AsyncServerStreamingCall StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, CallOptions options); - /// - /// A sequence of requests followed by one response (streamed upload). - /// The server returns the aggregated size of client payload as the result. - /// - AsyncClientStreamingCall StreamingInputCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// A sequence of requests followed by one response (streamed upload). - /// The server returns the aggregated size of client payload as the result. - /// - AsyncClientStreamingCall StreamingInputCall(CallOptions 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. - /// - AsyncDuplexStreamingCall FullDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// 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. - /// - AsyncDuplexStreamingCall FullDuplexCall(CallOptions 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. - /// - AsyncDuplexStreamingCall HalfDuplexCall(Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// 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. - /// - AsyncDuplexStreamingCall HalfDuplexCall(CallOptions options); - } - - /// Interface of server-side implementations of TestService - [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")] - public interface ITestService - { - /// - /// One empty request followed by one empty response. - /// - global::System.Threading.Tasks.Task EmptyCall(global::Grpc.Testing.Empty request, ServerCallContext context); - /// - /// One request followed by one response. - /// - global::System.Threading.Tasks.Task UnaryCall(global::Grpc.Testing.SimpleRequest request, ServerCallContext context); - /// - /// One request followed by a sequence of responses (streamed download). - /// The server returns the payload with client desired type and sizes. - /// - global::System.Threading.Tasks.Task StreamingOutputCall(global::Grpc.Testing.StreamingOutputCallRequest request, IServerStreamWriter responseStream, ServerCallContext context); - /// - /// A sequence of requests followed by one response (streamed upload). - /// The server returns the aggregated size of client payload as the result. - /// - global::System.Threading.Tasks.Task StreamingInputCall(IAsyncStreamReader requestStream, ServerCallContext context); - /// - /// 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. - /// - global::System.Threading.Tasks.Task FullDuplexCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); - /// - /// 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. - /// - global::System.Threading.Tasks.Task HalfDuplexCall(IAsyncStreamReader requestStream, IServerStreamWriter responseStream, ServerCallContext context); - } - /// Base class for server-side implementations of TestService public abstract class TestServiceBase { @@ -287,9 +166,7 @@ namespace Grpc.Testing { } /// Client for TestService - #pragma warning disable 0618 - public class TestServiceClient : ClientBase, ITestServiceClient - #pragma warning restore 0618 + public class TestServiceClient : ClientBase { public TestServiceClient(Channel channel) : base(channel) { @@ -445,23 +322,7 @@ namespace Grpc.Testing { } /// Creates service definition that can be registered with a server - #pragma warning disable 0618 - public static ServerServiceDefinition BindService(ITestService serviceImpl) - #pragma warning restore 0618 - { - return ServerServiceDefinition.CreateBuilder() - .AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall) - .AddMethod(__Method_UnaryCall, serviceImpl.UnaryCall) - .AddMethod(__Method_StreamingOutputCall, serviceImpl.StreamingOutputCall) - .AddMethod(__Method_StreamingInputCall, serviceImpl.StreamingInputCall) - .AddMethod(__Method_FullDuplexCall, serviceImpl.FullDuplexCall) - .AddMethod(__Method_HalfDuplexCall, serviceImpl.HalfDuplexCall).Build(); - } - - /// Creates service definition that can be registered with a server - #pragma warning disable 0618 public static ServerServiceDefinition BindService(TestServiceBase serviceImpl) - #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_EmptyCall, serviceImpl.EmptyCall) @@ -496,38 +357,6 @@ namespace Grpc.Testing { get { return global::Grpc.Testing.TestReflection.Descriptor.Services[1]; } } - /// Client for UnimplementedService - [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")] - public interface IUnimplementedServiceClient - { - /// - /// A call that no server should implement - /// - global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// A call that no server should implement - /// - global::Grpc.Testing.Empty UnimplementedCall(global::Grpc.Testing.Empty request, CallOptions options); - /// - /// A call that no server should implement - /// - AsyncUnaryCall UnimplementedCallAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - /// - /// A call that no server should implement - /// - AsyncUnaryCall UnimplementedCallAsync(global::Grpc.Testing.Empty request, CallOptions options); - } - - /// Interface of server-side implementations of UnimplementedService - [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")] - public interface IUnimplementedService - { - /// - /// A call that no server should implement - /// - global::System.Threading.Tasks.Task UnimplementedCall(global::Grpc.Testing.Empty request, ServerCallContext context); - } - /// Base class for server-side implementations of UnimplementedService public abstract class UnimplementedServiceBase { @@ -542,9 +371,7 @@ namespace Grpc.Testing { } /// Client for UnimplementedService - #pragma warning disable 0618 - public class UnimplementedServiceClient : ClientBase, IUnimplementedServiceClient - #pragma warning restore 0618 + public class UnimplementedServiceClient : ClientBase { public UnimplementedServiceClient(Channel channel) : base(channel) { @@ -602,18 +429,7 @@ namespace Grpc.Testing { } /// Creates service definition that can be registered with a server - #pragma warning disable 0618 - public static ServerServiceDefinition BindService(IUnimplementedService serviceImpl) - #pragma warning restore 0618 - { - return ServerServiceDefinition.CreateBuilder() - .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build(); - } - - /// Creates service definition that can be registered with a server - #pragma warning disable 0618 public static ServerServiceDefinition BindService(UnimplementedServiceBase serviceImpl) - #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_UnimplementedCall, serviceImpl.UnimplementedCall).Build(); @@ -651,28 +467,6 @@ namespace Grpc.Testing { get { return global::Grpc.Testing.TestReflection.Descriptor.Services[2]; } } - /// Client for ReconnectService - [System.Obsolete("Client side interfaced will be removed in the next release. Use client class directly.")] - public interface IReconnectServiceClient - { - global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - global::Grpc.Testing.Empty Start(global::Grpc.Testing.ReconnectParams request, CallOptions options); - AsyncUnaryCall StartAsync(global::Grpc.Testing.ReconnectParams request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - AsyncUnaryCall StartAsync(global::Grpc.Testing.ReconnectParams request, CallOptions options); - global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - global::Grpc.Testing.ReconnectInfo Stop(global::Grpc.Testing.Empty request, CallOptions options); - AsyncUnaryCall StopAsync(global::Grpc.Testing.Empty request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)); - AsyncUnaryCall StopAsync(global::Grpc.Testing.Empty request, CallOptions options); - } - - /// Interface of server-side implementations of ReconnectService - [System.Obsolete("Service implementations should inherit from the generated abstract base class instead.")] - public interface IReconnectService - { - global::System.Threading.Tasks.Task Start(global::Grpc.Testing.ReconnectParams request, ServerCallContext context); - global::System.Threading.Tasks.Task Stop(global::Grpc.Testing.Empty request, ServerCallContext context); - } - /// Base class for server-side implementations of ReconnectService public abstract class ReconnectServiceBase { @@ -689,9 +483,7 @@ namespace Grpc.Testing { } /// Client for ReconnectService - #pragma warning disable 0618 - public class ReconnectServiceClient : ClientBase, IReconnectServiceClient - #pragma warning restore 0618 + public class ReconnectServiceClient : ClientBase { public ReconnectServiceClient(Channel channel) : base(channel) { @@ -753,19 +545,7 @@ namespace Grpc.Testing { } /// Creates service definition that can be registered with a server - #pragma warning disable 0618 - public static ServerServiceDefinition BindService(IReconnectService serviceImpl) - #pragma warning restore 0618 - { - return ServerServiceDefinition.CreateBuilder() - .AddMethod(__Method_Start, serviceImpl.Start) - .AddMethod(__Method_Stop, serviceImpl.Stop).Build(); - } - - /// Creates service definition that can be registered with a server - #pragma warning disable 0618 public static ServerServiceDefinition BindService(ReconnectServiceBase serviceImpl) - #pragma warning restore 0618 { return ServerServiceDefinition.CreateBuilder() .AddMethod(__Method_Start, serviceImpl.Start) From 9bc3d2d67f32f4dad8cd1319dd4f3fce48c1abee Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Mon, 6 Jun 2016 10:27:56 -0700 Subject: [PATCH 0875/1894] Minor comments --- src/core/lib/iomgr/ev_epoll_linux.c | 28 +++++++++++++++++----------- 1 file changed, 17 insertions(+), 11 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 61106faef90..d3abf3bd84f 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -144,10 +144,9 @@ typedef struct polling_island { /******************************************************************************* * Pollset Declarations */ - struct grpc_pollset_worker { int kicked_specifically; - pthread_t pt_id; /* TODO (sreek) - Add an abstraction here */ + pthread_t pt_id; /* Thread id of this worker */ struct grpc_pollset_worker *next; struct grpc_pollset_worker *prev; }; @@ -483,8 +482,7 @@ polling_island *polling_island_merge(polling_island *p, polling_island *q) { /* Get locks on both the polling islands */ polling_island_pair_update_and_lock(&p, &q); - /* TODO: sreek: Think about this scenario some more. Is it possible ?. what - * does it mean, when would this happen */ + /* TODO: sreek: Think about this scenario some more */ if (p == q) { /* Nothing needs to be done here */ gpr_mu_unlock(&p->mu); @@ -539,7 +537,10 @@ static void polling_island_global_init() { * (specifically when a new alarm needs to be triggered earlier than the next * alarm 'epoch'). This wakeup_fd gives us something to alert on when such a * case occurs. */ -/* TODO: sreek: Right now, this wakes up all pollers */ + +/* TODO: sreek: Right now, this wakes up all pollers. In future we should make + * sure to wake up one polling thread (which can wake up other threads if + * needed) */ grpc_wakeup_fd grpc_global_wakeup_fd; static grpc_fd *fd_freelist = NULL; @@ -676,7 +677,6 @@ static int fd_wrapped_fd(grpc_fd *fd) { static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *on_done, int *release_fd, const char *reason) { - /* TODO(sreek) In ev_poll_posix.c,the lock is acquired a little later. Why? */ bool is_fd_closed = false; gpr_mu_lock(&fd->mu); fd->on_done_closure = on_done; @@ -784,8 +784,9 @@ static void fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, */ static void sig_handler(int sig_num) { - /* TODO: sreek - Remove this expensive log line */ +#ifdef GPRC_EPOLL_DEBUG gpr_log(GPR_INFO, "Received signal %d", sig_num); +#endif } /* Global state management */ @@ -986,7 +987,10 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, if (ep_rv < 0) { if (errno != EINTR) { - /* TODO (sreek) - Check for bad file descriptor error */ + /* TODO (sreek) - Do not log an error in case of bad file descriptor + * (A bad file descriptor here would just mean that the epoll set was + * merged with another epoll set and that the current epoll_fd is + * closed) */ gpr_log(GPR_ERROR, "epoll_pwait() failed: %s", strerror(errno)); } else { gpr_log(GPR_DEBUG, "pollset_work_and_unlock: 0-timeout epoll_wait()"); @@ -1062,7 +1066,9 @@ static void pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, GPR_TIMER_END("pollset_shutdown", 0); } -/* TODO(sreek) Is pollset_shutdown() guranteed to be called before this? */ +/* pollset_shutdown is guaranteed to be called before pollset_destroy. So other + * than destroying the mutexes, there is nothing special that needs to be done + * here */ static void pollset_destroy(grpc_pollset *pollset) { GPR_ASSERT(!pollset_has_workers(pollset)); gpr_mu_destroy(&pollset->pi_mu); @@ -1075,7 +1081,7 @@ static void pollset_reset(grpc_pollset *pollset) { pollset->shutting_down = false; pollset->finish_shutdown_called = false; pollset->kicked_without_pollers = false; - /* TODO(sreek) - Should pollset->shutdown closure be set to NULL here? */ + pollset->shutdown_done = NULL; pollset_release_polling_island_locked(pollset); } @@ -1149,7 +1155,7 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_fd *fd) { gpr_log(GPR_DEBUG, "pollset_add_fd: pollset: %p, fd: %d", pollset, fd->fd); - /* TODO sreek - Check if we need to get a pollset->mu lock here */ + /* TODO sreek - Double check if we need to get a pollset->mu lock here */ gpr_mu_lock(&pollset->pi_mu); gpr_mu_lock(&fd->pi_mu); From 1495cb5b249e92ab20d1d7e63b0e627bd7cf2b4c Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Mon, 6 Jun 2016 10:58:06 -0700 Subject: [PATCH 0876/1894] Addressed reveiw comments about naming --- .../impl/proto_server_reflection_plugin.h | 11 ------ .../proto_server_reflection_plugin.cc | 10 ++++-- .../end2end/proto_server_reflection_test.cc | 1 + .../proto_reflection_descriptor_database.cc | 34 ++++++++----------- .../proto_reflection_descriptor_database.h | 4 +++ .../check_pb_files.sh | 3 -- 6 files changed, 27 insertions(+), 36 deletions(-) diff --git a/extensions/include/grpc++/impl/proto_server_reflection_plugin.h b/extensions/include/grpc++/impl/proto_server_reflection_plugin.h index 5bf1ff1bfcc..774d3439e75 100644 --- a/extensions/include/grpc++/impl/proto_server_reflection_plugin.h +++ b/extensions/include/grpc++/impl/proto_server_reflection_plugin.h @@ -59,17 +59,6 @@ class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin { std::shared_ptr<::grpc::ProtoServerReflection> reflection_service_; }; -std::unique_ptr<::grpc::ServerBuilderPlugin> CreateProtoReflection(); - -void grpc_AddServerBuilderPlugin_reflection(); - -// Force AddServerBuilderPlugin() to be called at static initialization time. -static struct StaticPluginInitializer_reflection { - StaticPluginInitializer_reflection() { - grpc_AddServerBuilderPlugin_reflection(); - } -} static_plugin_initializer_reflection; - } // namespace reflection } // namespace grpc diff --git a/extensions/reflection/proto_server_reflection_plugin.cc b/extensions/reflection/proto_server_reflection_plugin.cc index 465a8b9442e..8489adc7e11 100644 --- a/extensions/reflection/proto_server_reflection_plugin.cc +++ b/extensions/reflection/proto_server_reflection_plugin.cc @@ -73,17 +73,23 @@ bool ProtoServerReflectionPlugin::has_async_methods() const { return false; } -std::unique_ptr<::grpc::ServerBuilderPlugin> CreateProtoReflection() { +static std::unique_ptr<::grpc::ServerBuilderPlugin> CreateProtoReflection() { return std::unique_ptr<::grpc::ServerBuilderPlugin>( new ProtoServerReflectionPlugin()); } -void grpc_AddServerBuilderPlugin_reflection() { +static void AddProtoReflectionServerBuilderPlugin() { static bool already_here = false; if (already_here) return; already_here = true; ::grpc::ServerBuilder::InternalAddPluginFactory(&CreateProtoReflection); } +struct StaticProtoReflectionPluginInitializer { + StaticProtoReflectionPluginInitializer() { + AddProtoReflectionServerBuilderPlugin(); + } +} static_proto_reflection_plugin_initializer; + } // namespace reflection } // namespace grpc diff --git a/test/cpp/end2end/proto_server_reflection_test.cc b/test/cpp/end2end/proto_server_reflection_test.cc index ae770654ffe..300b2091139 100644 --- a/test/cpp/end2end/proto_server_reflection_test.cc +++ b/test/cpp/end2end/proto_server_reflection_test.cc @@ -140,6 +140,7 @@ class ProtoServerReflectionTest : public ::testing::Test { std::unordered_set known_types_; const google::protobuf::DescriptorPool* ref_desc_pool_; int port_; + reflection::ProtoServerReflectionPlugin plugin_; }; TEST_F(ProtoServerReflectionTest, CheckResponseWithLocalDescriptorPool) { diff --git a/test/cpp/util/proto_reflection_descriptor_database.cc b/test/cpp/util/proto_reflection_descriptor_database.cc index 6513a149928..6907d97bd5e 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.cc +++ b/test/cpp/util/proto_reflection_descriptor_database.cc @@ -69,10 +69,7 @@ bool ProtoReflectionDescriptorDatabase::FindFileByName( request.set_file_by_filename(filename); ServerReflectionResponse response; - stream_mutex_.lock(); - GetStream()->Write(request); - GetStream()->Read(&response); - stream_mutex_.unlock(); + DoOneRequest(request, response); if (response.message_response_case() == ServerReflectionResponse::MessageResponseCase::kFileDescriptorResponse) { @@ -117,10 +114,7 @@ bool ProtoReflectionDescriptorDatabase::FindFileContainingSymbol( request.set_file_containing_symbol(symbol_name); ServerReflectionResponse response; - stream_mutex_.lock(); - GetStream()->Write(request); - GetStream()->Read(&response); - stream_mutex_.unlock(); + DoOneRequest(request, response); if (response.message_response_case() == ServerReflectionResponse::MessageResponseCase::kFileDescriptorResponse) { @@ -174,10 +168,7 @@ bool ProtoReflectionDescriptorDatabase::FindFileContainingExtension( field_number); ServerReflectionResponse response; - stream_mutex_.lock(); - GetStream()->Write(request); - GetStream()->Read(&response); - stream_mutex_.unlock(); + DoOneRequest(request, response); if (response.message_response_case() == ServerReflectionResponse::MessageResponseCase::kFileDescriptorResponse) { @@ -227,10 +218,7 @@ bool ProtoReflectionDescriptorDatabase::FindAllExtensionNumbers( request.set_all_extension_numbers_of_type(extendee_type); ServerReflectionResponse response; - stream_mutex_.lock(); - GetStream()->Write(request); - GetStream()->Read(&response); - stream_mutex_.unlock(); + DoOneRequest(request, response); if (response.message_response_case() == ServerReflectionResponse::MessageResponseCase:: @@ -262,10 +250,7 @@ bool ProtoReflectionDescriptorDatabase::GetServices( request.set_list_services(""); ServerReflectionResponse response; - stream_mutex_.lock(); - GetStream()->Write(request); - GetStream()->Read(&response); - stream_mutex_.unlock(); + DoOneRequest(request, response); if (response.message_response_case() == ServerReflectionResponse::MessageResponseCase::kListServicesResponse) { @@ -319,4 +304,13 @@ ProtoReflectionDescriptorDatabase::GetStream() { return stream_; } +void ProtoReflectionDescriptorDatabase::DoOneRequest( + const ServerReflectionRequest& request, + ServerReflectionResponse& response) { + stream_mutex_.lock(); + GetStream()->Write(request); + GetStream()->Read(&response); + stream_mutex_.unlock(); +} + } // namespace grpc diff --git a/test/cpp/util/proto_reflection_descriptor_database.h b/test/cpp/util/proto_reflection_descriptor_database.h index c6f7b5f0466..7656a496c25 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.h +++ b/test/cpp/util/proto_reflection_descriptor_database.h @@ -91,6 +91,10 @@ class ProtoReflectionDescriptorDatabase const std::shared_ptr GetStream(); + void DoOneRequest( + const grpc::reflection::v1alpha::ServerReflectionRequest& request, + grpc::reflection::v1alpha::ServerReflectionResponse& response); + std::shared_ptr stream_; grpc::ClientContext ctx_; std::unique_ptr stub_; diff --git a/tools/dockerfile/grpc_check_generated_pb_files/check_pb_files.sh b/tools/dockerfile/grpc_check_generated_pb_files/check_pb_files.sh index b1af579a74b..62e41755ec1 100755 --- a/tools/dockerfile/grpc_check_generated_pb_files/check_pb_files.sh +++ b/tools/dockerfile/grpc_check_generated_pb_files/check_pb_files.sh @@ -33,9 +33,6 @@ set -e mkdir -p /var/local/git git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc -# copy service account keys if available -cp -r /var/local/jenkins/service_account $HOME || true - cd /var/local/git/grpc # build grpc cpp plugin for generating grpc pb files From 9d69e8082d3af7c79b7402a546f8bea255bc69e3 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 6 Jun 2016 11:37:50 -0700 Subject: [PATCH 0877/1894] Advertise transport selected in user-agent string --- src/core/lib/channel/channel_stack.c | 2 ++ src/core/lib/channel/channel_stack.h | 3 +++ src/core/lib/channel/channel_stack_builder.c | 4 ++-- src/core/lib/channel/http_client_filter.c | 13 +++++++++---- src/core/lib/channel/http_client_filter.h | 2 +- test/core/channel/channel_stack_test.c | 2 +- 6 files changed, 18 insertions(+), 8 deletions(-) diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index ad182d1f69f..224dd39d9b5 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -106,6 +106,7 @@ void grpc_channel_stack_init(grpc_exec_ctx *exec_ctx, int initial_refs, const grpc_channel_filter **filters, size_t filter_count, const grpc_channel_args *channel_args, + grpc_transport *optional_transport, const char *name, grpc_channel_stack *stack) { size_t call_size = ROUND_UP_TO_ALIGNMENT_SIZE(sizeof(grpc_call_stack)) + @@ -127,6 +128,7 @@ void grpc_channel_stack_init(grpc_exec_ctx *exec_ctx, int initial_refs, for (i = 0; i < filter_count; i++) { args.channel_stack = stack; args.channel_args = channel_args; + args.optional_transport = optional_transport; args.is_first = i == 0; args.is_last = i == (filter_count - 1); elems[i].filter = filters[i]; diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 36c17cb467f..88fbe7a968d 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -57,6 +57,8 @@ typedef struct grpc_call_stack grpc_call_stack; typedef struct { grpc_channel_stack *channel_stack; const grpc_channel_args *channel_args; + /** Transport, iff it is known */ + grpc_transport *optional_transport; int is_first; int is_last; } grpc_channel_element_args; @@ -187,6 +189,7 @@ void grpc_channel_stack_init(grpc_exec_ctx *exec_ctx, int initial_refs, grpc_iomgr_cb_func destroy, void *destroy_arg, const grpc_channel_filter **filters, size_t filter_count, const grpc_channel_args *args, + grpc_transport *optional_transport, const char *name, grpc_channel_stack *stack); /* Destroy a channel stack */ void grpc_channel_stack_destroy(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/channel/channel_stack_builder.c b/src/core/lib/channel/channel_stack_builder.c index a8646c95657..eda4968f486 100644 --- a/src/core/lib/channel/channel_stack_builder.c +++ b/src/core/lib/channel/channel_stack_builder.c @@ -257,8 +257,8 @@ void *grpc_channel_stack_builder_finish(grpc_exec_ctx *exec_ctx, // and initialize it grpc_channel_stack_init(exec_ctx, initial_refs, destroy, destroy_arg == NULL ? result : destroy_arg, filters, - num_filters, builder->args, builder->name, - channel_stack); + num_filters, builder->args, builder->transport, + builder->name, channel_stack); // run post-initialization functions i = 0; diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c index 516e708d1f0..55e87cd67c7 100644 --- a/src/core/lib/channel/http_client_filter.c +++ b/src/core/lib/channel/http_client_filter.c @@ -38,6 +38,7 @@ #include "src/core/lib/profiling/timers.h" #include "src/core/lib/support/string.h" #include "src/core/lib/transport/static_metadata.h" +#include "src/core/lib/transport/transport_impl.h" typedef struct call_data { grpc_linked_mdelem method; @@ -179,7 +180,8 @@ static grpc_mdelem *scheme_from_args(const grpc_channel_args *args) { return GRPC_MDELEM_SCHEME_HTTP; } -static grpc_mdstr *user_agent_from_args(const grpc_channel_args *args) { +static grpc_mdstr *user_agent_from_args(const grpc_channel_args *args, + const char *transport_name) { gpr_strvec v; size_t i; int is_first = 1; @@ -201,8 +203,8 @@ static grpc_mdstr *user_agent_from_args(const grpc_channel_args *args) { } } - gpr_asprintf(&tmp, "%sgrpc-c/%s (%s)", is_first ? "" : " ", - grpc_version_string(), GPR_PLATFORM_STRING); + gpr_asprintf(&tmp, "%sgrpc-c/%s (%s; %s)", is_first ? "" : " ", + grpc_version_string(), GPR_PLATFORM_STRING, transport_name); is_first = 0; gpr_strvec_add(&v, tmp); @@ -233,9 +235,12 @@ static void init_channel_elem(grpc_exec_ctx *exec_ctx, grpc_channel_element_args *args) { channel_data *chand = elem->channel_data; GPR_ASSERT(!args->is_last); + GPR_ASSERT(args->optional_transport != NULL); chand->static_scheme = scheme_from_args(args->channel_args); chand->user_agent = grpc_mdelem_from_metadata_strings( - GRPC_MDSTR_USER_AGENT, user_agent_from_args(args->channel_args)); + GRPC_MDSTR_USER_AGENT, + user_agent_from_args(args->channel_args, + args->optional_transport->vtable->name)); } /* Destructor for channel data */ diff --git a/src/core/lib/channel/http_client_filter.h b/src/core/lib/channel/http_client_filter.h index a884b36318a..47081175ea9 100644 --- a/src/core/lib/channel/http_client_filter.h +++ b/src/core/lib/channel/http_client_filter.h @@ -1,5 +1,4 @@ /* - * * Copyright 2015, Google Inc. * All rights reserved. * @@ -39,6 +38,7 @@ /* Processes metadata on the client side for HTTP2 transports */ extern const grpc_channel_filter grpc_http_client_filter; +/* Channel arg to override the http2 :scheme header */ #define GRPC_ARG_HTTP2_SCHEME "grpc.http2_scheme" #endif /* GRPC_CORE_LIB_CHANNEL_HTTP_CLIENT_FILTER_H */ diff --git a/test/core/channel/channel_stack_test.c b/test/core/channel/channel_stack_test.c index 1a5594bde86..2d7737a3b04 100644 --- a/test/core/channel/channel_stack_test.c +++ b/test/core/channel/channel_stack_test.c @@ -123,7 +123,7 @@ static void test_create_channel_stack(void) { channel_stack = gpr_malloc(grpc_channel_stack_size(&filters, 1)); grpc_channel_stack_init(&exec_ctx, 1, free_channel, channel_stack, &filters, - 1, &chan_args, "test", channel_stack); + 1, &chan_args, NULL, "test", channel_stack); GPR_ASSERT(channel_stack->count == 1); channel_elem = grpc_channel_stack_element(channel_stack, 0); channel_data = (int *)channel_elem->channel_data; From c09a3580a1e802e92dfc8a1184b9a95fc464b979 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Mon, 6 Jun 2016 14:28:55 +0000 Subject: [PATCH 0878/1894] Route Python Beta API through Python GA API --- src/python/grpcio/grpc/__init__.py | 15 + .../grpcio/grpc/_adapter/_implementations.py | 48 -- src/python/grpcio/grpc/_adapter/_low.py | 76 +-- src/python/grpcio/grpc/{beta => }/_auth.py | 6 +- src/python/grpcio/grpc/_server.py | 41 +- .../grpcio/grpc/beta/_client_adaptations.py | 566 ++++++++++++++++++ .../grpcio/grpc/beta/_server_adaptations.py | 359 +++++++++++ .../grpcio/grpc/beta/implementations.py | 220 ++----- src/python/grpcio/grpc/beta/interfaces.py | 89 +-- .../tests/unit/{beta => }/_auth_test.py | 2 +- .../grpcio/tests/unit/beta/test_utilities.py | 13 +- 11 files changed, 1020 insertions(+), 415 deletions(-) delete mode 100644 src/python/grpcio/grpc/_adapter/_implementations.py rename src/python/grpcio/grpc/{beta => }/_auth.py (94%) create mode 100644 src/python/grpcio/grpc/beta/_client_adaptations.py create mode 100644 src/python/grpcio/grpc/beta/_server_adaptations.py rename src/python/grpcio/tests/unit/{beta => }/_auth_test.py (99%) diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py index bbf04ad03e8..5ba5a4e1fdd 100644 --- a/src/python/grpcio/grpc/__init__.py +++ b/src/python/grpcio/grpc/__init__.py @@ -947,6 +947,21 @@ def metadata_call_credentials(metadata_plugin, name=None): metadata_plugin, effective_name)) +def access_token_call_credentials(access_token): + """Construct CallCredentials from an access token. + + Args: + access_token: A string to place directly in the http request + authorization header, ie "Authorization: Bearer ". + + Returns: + A CallCredentials. + """ + from grpc import _auth + return metadata_call_credentials( + _auth.AccessTokenCallCredentials(access_token)) + + def composite_call_credentials(call_credentials, additional_call_credentials): """Compose two CallCredentials to make a new one. diff --git a/src/python/grpcio/grpc/_adapter/_implementations.py b/src/python/grpcio/grpc/_adapter/_implementations.py deleted file mode 100644 index b85f228bf69..00000000000 --- a/src/python/grpcio/grpc/_adapter/_implementations.py +++ /dev/null @@ -1,48 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import collections - -from grpc.beta import interfaces - -class AuthMetadataContext(collections.namedtuple( - 'AuthMetadataContext', [ - 'service_url', - 'method_name' - ]), interfaces.GRPCAuthMetadataContext): - pass - - -class AuthMetadataPluginCallback(interfaces.GRPCAuthMetadataContext): - - def __init__(self, callback): - self._callback = callback - - def __call__(self, metadata, error): - self._callback(metadata, error) diff --git a/src/python/grpcio/grpc/_adapter/_low.py b/src/python/grpcio/grpc/_adapter/_low.py index 00788bd4cf8..48410167a07 100644 --- a/src/python/grpcio/grpc/_adapter/_low.py +++ b/src/python/grpcio/grpc/_adapter/_low.py @@ -30,8 +30,8 @@ import threading from grpc import _grpcio_metadata +from grpc import _plugin_wrapping from grpc._cython import cygrpc -from grpc._adapter import _implementations from grpc._adapter import _types _USER_AGENT = 'Python-gRPC-{}'.format(_grpcio_metadata.__version__) @@ -57,78 +57,8 @@ def channel_credentials_ssl( return cygrpc.channel_credentials_ssl(root_certificates, pair) -class _WrappedCygrpcCallback(object): - - def __init__(self, cygrpc_callback): - self.is_called = False - self.error = None - self.is_called_lock = threading.Lock() - self.cygrpc_callback = cygrpc_callback - - def _invoke_failure(self, error): - # TODO(atash) translate different Exception superclasses into different - # status codes. - self.cygrpc_callback( - cygrpc.Metadata([]), cygrpc.StatusCode.internal, error.message) - - def _invoke_success(self, metadata): - try: - cygrpc_metadata = cygrpc.Metadata( - cygrpc.Metadatum(key, value) - for key, value in metadata) - except Exception as error: - self._invoke_failure(error) - return - self.cygrpc_callback(cygrpc_metadata, cygrpc.StatusCode.ok, '') - - def __call__(self, metadata, error): - with self.is_called_lock: - if self.is_called: - raise RuntimeError('callback should only ever be invoked once') - if self.error: - self._invoke_failure(self.error) - return - self.is_called = True - if error is None: - self._invoke_success(metadata) - else: - self._invoke_failure(error) - - def notify_failure(self, error): - with self.is_called_lock: - if not self.is_called: - self.error = error - - -class _WrappedPlugin(object): - - def __init__(self, plugin): - self.plugin = plugin - - def __call__(self, context, cygrpc_callback): - wrapped_cygrpc_callback = _WrappedCygrpcCallback(cygrpc_callback) - wrapped_context = _implementations.AuthMetadataContext(context.service_url, - context.method_name) - try: - self.plugin( - wrapped_context, - _implementations.AuthMetadataPluginCallback(wrapped_cygrpc_callback)) - except Exception as error: - wrapped_cygrpc_callback.notify_failure(error) - raise - - -def call_credentials_metadata_plugin(plugin, name): - """ - Args: - plugin: A callable accepting a _types.AuthMetadataContext - object and a callback (itself accepting a list of metadata key/value - 2-tuples and a None-able exception value). The callback must be eventually - called, but need not be called in plugin's invocation. - plugin's invocation must be non-blocking. - """ - return cygrpc.call_credentials_metadata_plugin( - cygrpc.CredentialsMetadataPlugin(_WrappedPlugin(plugin), name)) +call_credentials_metadata_plugin = ( + _plugin_wrapping.call_credentials_metadata_plugin) class CompletionQueue(_types.CompletionQueue): diff --git a/src/python/grpcio/grpc/beta/_auth.py b/src/python/grpcio/grpc/_auth.py similarity index 94% rename from src/python/grpcio/grpc/beta/_auth.py rename to src/python/grpcio/grpc/_auth.py index 553d4b99918..3ae00ca23a7 100644 --- a/src/python/grpcio/grpc/beta/_auth.py +++ b/src/python/grpcio/grpc/_auth.py @@ -31,7 +31,7 @@ from concurrent import futures -from grpc.beta import interfaces +import grpc def _sign_request(callback, token, error): @@ -39,7 +39,7 @@ def _sign_request(callback, token, error): callback(metadata, error) -class GoogleCallCredentials(interfaces.GRPCAuthMetadataPlugin): +class GoogleCallCredentials(grpc.AuthMetadataPlugin): """Metadata wrapper for GoogleCredentials from the oauth2client library.""" def __init__(self, credentials): @@ -63,7 +63,7 @@ class GoogleCallCredentials(interfaces.GRPCAuthMetadataPlugin): self._pool.shutdown(wait=False) -class AccessTokenCallCredentials(interfaces.GRPCAuthMetadataPlugin): +class AccessTokenCallCredentials(grpc.AuthMetadataPlugin): """Metadata wrapper for raw access token credentials.""" def __init__(self, access_token): diff --git a/src/python/grpcio/grpc/_server.py b/src/python/grpcio/grpc/_server.py index c65070f1b3a..aae9f48ae6c 100644 --- a/src/python/grpcio/grpc/_server.py +++ b/src/python/grpcio/grpc/_server.py @@ -65,12 +65,23 @@ def _serialized_request(request_event): return request_event.batch_operations[0].received_message.bytes() -def _code(state): +def _application_code(code): + cygrpc_code = _common.STATUS_CODE_TO_CYGRPC_STATUS_CODE.get(code) + return cygrpc.StatusCode.unknown if cygrpc_code is None else cygrpc_code + + +def _completion_code(state): if state.code is None: return cygrpc.StatusCode.ok else: - code = _common.STATUS_CODE_TO_CYGRPC_STATUS_CODE.get(state.code) - return cygrpc.StatusCode.unknown if code is None else code + return _application_code(state.code) + + +def _abortion_code(state, code): + if state.code is None: + return code + else: + return _application_code(state.code) def _details(state): @@ -126,20 +137,22 @@ def _send_status_from_server(state, token): def _abort(state, call, code, details): if state.client is not _CANCELLED: + effective_code = _abortion_code(state, code) + effective_details = details if state.details is None else state.details if state.initial_metadata_allowed: operations = ( cygrpc.operation_send_initial_metadata( _EMPTY_METADATA, _EMPTY_FLAGS), cygrpc.operation_send_status_from_server( - _common.metadata(state.trailing_metadata), code, details, - _EMPTY_FLAGS), + _common.metadata(state.trailing_metadata), effective_code, + effective_details, _EMPTY_FLAGS), ) token = _SEND_INITIAL_METADATA_AND_SEND_STATUS_FROM_SERVER_TOKEN else: operations = ( cygrpc.operation_send_status_from_server( - _common.metadata(state.trailing_metadata), code, details, - _EMPTY_FLAGS), + _common.metadata(state.trailing_metadata), effective_code, + effective_details, _EMPTY_FLAGS), ) token = _SEND_STATUS_FROM_SERVER_TOKEN call.start_batch( @@ -346,7 +359,7 @@ def _unary_request(rpc_event, state, request_deserializer): def _call_behavior(rpc_event, state, behavior, argument, request_deserializer): context = _Context(rpc_event, state, request_deserializer) try: - return behavior(argument, context) + return behavior(argument, context), True except Exception as e: # pylint: disable=broad-except with state.condition: if e not in state.rpc_errors: @@ -354,7 +367,7 @@ def _call_behavior(rpc_event, state, behavior, argument, request_deserializer): logging.exception(details) _abort( state, rpc_event.operation_call, cygrpc.StatusCode.unknown, details) - return None + return None, False def _take_response_from_response_iterator(rpc_event, state, response_iterator): @@ -415,7 +428,7 @@ def _status(rpc_event, state, serialized_response): with state.condition: if state.client is not _CANCELLED: trailing_metadata = _common.metadata(state.trailing_metadata) - code = _code(state) + code = _completion_code(state) details = _details(state) operations = [ cygrpc.operation_send_status_from_server( @@ -440,9 +453,9 @@ def _unary_response_in_pool( response_serializer): argument = argument_thunk() if argument is not None: - response = _call_behavior( + response, proceed = _call_behavior( rpc_event, state, behavior, argument, request_deserializer) - if response is not None: + if proceed: serialized_response = _serialize_response( rpc_event, state, response, response_serializer) if serialized_response is not None: @@ -455,9 +468,9 @@ def _stream_response_in_pool( response_serializer): argument = argument_thunk() if argument is not None: - response_iterator = _call_behavior( + response_iterator, proceed = _call_behavior( rpc_event, state, behavior, argument, request_deserializer) - if response_iterator is not None: + if proceed: while True: response, proceed = _take_response_from_response_iterator( rpc_event, state, response_iterator) diff --git a/src/python/grpcio/grpc/beta/_client_adaptations.py b/src/python/grpcio/grpc/beta/_client_adaptations.py new file mode 100644 index 00000000000..621fcf2174f --- /dev/null +++ b/src/python/grpcio/grpc/beta/_client_adaptations.py @@ -0,0 +1,566 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""Translates gRPC's client-side API into gRPC's client-side Beta API.""" + +import grpc +from grpc._cython import cygrpc +from grpc.beta import interfaces +from grpc.framework.common import cardinality +from grpc.framework.foundation import future +from grpc.framework.interfaces.face import face + +_STATUS_CODE_TO_ABORTION_KIND_AND_ABORTION_ERROR_CLASS = { + grpc.StatusCode.CANCELLED: ( + face.Abortion.Kind.CANCELLED, face.CancellationError), + grpc.StatusCode.UNKNOWN: ( + face.Abortion.Kind.REMOTE_FAILURE, face.RemoteError), + grpc.StatusCode.DEADLINE_EXCEEDED: ( + face.Abortion.Kind.EXPIRED, face.ExpirationError), + grpc.StatusCode.UNIMPLEMENTED: ( + face.Abortion.Kind.LOCAL_FAILURE, face.LocalError), +} + + +def _fully_qualified_method(group, method): + return b'/{}/{}'.format(group, method) + + +def _effective_metadata(metadata, metadata_transformer): + non_none_metadata = () if metadata is None else metadata + if metadata_transformer is None: + return non_none_metadata + else: + return metadata_transformer(non_none_metadata) + + +def _credentials(grpc_call_options): + return None if grpc_call_options is None else grpc_call_options.credentials + + +def _abortion(rpc_error_call): + code = rpc_error_call.code() + pair = _STATUS_CODE_TO_ABORTION_KIND_AND_ABORTION_ERROR_CLASS.get(code) + error_kind = face.Abortion.Kind.LOCAL_FAILURE if pair is None else pair[0] + return face.Abortion( + error_kind, rpc_error_call.initial_metadata(), + rpc_error_call.trailing_metadata(), code, rpc_error_code.details()) + + +def _abortion_error(rpc_error_call): + code = rpc_error_call.code() + pair = _STATUS_CODE_TO_ABORTION_KIND_AND_ABORTION_ERROR_CLASS.get(code) + exception_class = face.AbortionError if pair is None else pair[1] + return exception_class( + rpc_error_call.initial_metadata(), rpc_error_call.trailing_metadata(), + code, rpc_error_call.details()) + + +class _InvocationProtocolContext(interfaces.GRPCInvocationContext): + + def disable_next_request_compression(self): + pass # TODO(https://github.com/grpc/grpc/issues/4078): design, implement. + + +class _Rendezvous(future.Future, face.Call): + + def __init__(self, response_future, response_iterator, call): + self._future = response_future + self._iterator = response_iterator + self._call = call + + def cancel(self): + return self._call.cancel() + + def cancelled(self): + return self._future.cancelled() + + def running(self): + return self._future.running() + + def done(self): + return self._future.done() + + def result(self, timeout=None): + try: + return self._future.result(timeout=timeout) + except grpc.RpcError as rpc_error_call: + raise _abortion_error(rpc_error_call) + except grpc.FutureTimeoutError: + raise future.TimeoutError() + except grpc.FutureCancelledError: + raise future.CancelledError() + + def exception(self, timeout=None): + try: + rpc_error_call = self._future.exception(timeout=timeout) + return _abortion_error(rpc_error_call) + except grpc.FutureTimeoutError: + raise future.TimeoutError() + except grpc.FutureCancelledError: + raise future.CancelledError() + + def traceback(self, timeout=None): + try: + return self._future.traceback(timeout=timeout) + except grpc.FutureTimeoutError: + raise future.TimeoutError() + except grpc.FutureCancelledError: + raise future.CancelledError() + + def add_done_callback(self, fn): + self._future.add_done_callback(lambda ignored_callback: fn(self)) + + def __iter__(self): + return self + + def _next(self): + try: + return next(self._iterator) + except grpc.RpcError as rpc_error_call: + raise _abortion_error(rpc_error_call) + + def __next__(self): + return self._next() + + def next(self): + return self._next() + + def is_active(self): + return self._call.is_active() + + def time_remaining(self): + return self._call.time_remaining() + + def add_abortion_callback(self, abortion_callback): + registered = self._call.add_callback( + lambda: abortion_callback(_abortion(self._call))) + return None if registered else _abortion(self._call) + + def protocol_context(self): + return _InvocationProtocolContext() + + def initial_metadata(self): + return self._call.initial_metadata() + + def terminal_metadata(self): + return self._call.terminal_metadata() + + def code(self): + return self._call.code() + + def details(self): + return self._call.details() + + +def _blocking_unary_unary( + channel, group, method, timeout, with_call, protocol_options, metadata, + metadata_transformer, request, request_serializer, response_deserializer): + try: + multi_callable = channel.unary_unary( + _fully_qualified_method(group, method), + request_serializer=request_serializer, + response_deserializer=response_deserializer) + effective_metadata = _effective_metadata(metadata, metadata_transformer) + if with_call: + response, call = multi_callable( + request, timeout=timeout, metadata=effective_metadata, + credentials=_credentials(protocol_options), with_call=True) + return response, _Rendezvous(None, None, call) + else: + return multi_callable( + request, timeout=timeout, metadata=effective_metadata, + credentials=_credentials(protocol_options)) + except grpc.RpcError as rpc_error_call: + raise _abortion_error(rpc_error_call) + + +def _future_unary_unary( + channel, group, method, timeout, protocol_options, metadata, + metadata_transformer, request, request_serializer, response_deserializer): + multi_callable = channel.unary_unary( + _fully_qualified_method(group, method), + request_serializer=request_serializer, + response_deserializer=response_deserializer) + effective_metadata = _effective_metadata(metadata, metadata_transformer) + response_future = multi_callable.future( + request, timeout=timeout, metadata=effective_metadata, + credentials=_credentials(protocol_options)) + return _Rendezvous(response_future, None, response_future) + + +def _unary_stream( + channel, group, method, timeout, protocol_options, metadata, + metadata_transformer, request, request_serializer, response_deserializer): + multi_callable = channel.unary_stream( + _fully_qualified_method(group, method), + request_serializer=request_serializer, + response_deserializer=response_deserializer) + effective_metadata = _effective_metadata(metadata, metadata_transformer) + response_iterator = multi_callable( + request, timeout=timeout, metadata=effective_metadata, + credentials=_credentials(protocol_options)) + return _Rendezvous(None, response_iterator, response_iterator) + + +def _blocking_stream_unary( + channel, group, method, timeout, with_call, protocol_options, metadata, + metadata_transformer, request_iterator, request_serializer, + response_deserializer): + try: + multi_callable = channel.stream_unary( + _fully_qualified_method(group, method), + request_serializer=request_serializer, + response_deserializer=response_deserializer) + effective_metadata = _effective_metadata(metadata, metadata_transformer) + if with_call: + response, call = multi_callable( + request_iterator, timeout=timeout, metadata=effective_metadata, + credentials=_credentials(protocol_options), with_call=True) + return response, _Rendezvous(None, None, call) + else: + return multi_callable( + request_iterator, timeout=timeout, metadata=effective_metadata, + credentials=_credentials(protocol_options)) + except grpc.RpcError as rpc_error_call: + raise _abortion_error(rpc_error_call) + + +def _future_stream_unary( + channel, group, method, timeout, protocol_options, metadata, + metadata_transformer, request_iterator, request_serializer, + response_deserializer): + multi_callable = channel.stream_unary( + _fully_qualified_method(group, method), + request_serializer=request_serializer, + response_deserializer=response_deserializer) + effective_metadata = _effective_metadata(metadata, metadata_transformer) + response_future = multi_callable.future( + request_iterator, timeout=timeout, metadata=effective_metadata, + credentials=_credentials(protocol_options)) + return _Rendezvous(response_future, None, response_future) + + +def _stream_stream( + channel, group, method, timeout, protocol_options, metadata, + metadata_transformer, request_iterator, request_serializer, + response_deserializer): + multi_callable = channel.stream_stream( + _fully_qualified_method(group, method), + request_serializer=request_serializer, + response_deserializer=response_deserializer) + effective_metadata = _effective_metadata(metadata, metadata_transformer) + response_iterator = multi_callable( + request_iterator, timeout=timeout, metadata=effective_metadata, + credentials=_credentials(protocol_options)) + return _Rendezvous(None, response_iterator, response_iterator) + + +class _UnaryUnaryMultiCallable(face.UnaryUnaryMultiCallable): + + def __init__( + self, channel, group, method, metadata_transformer, request_serializer, + response_deserializer): + self._channel = channel + self._group = group + self._method = method + self._metadata_transformer = metadata_transformer + self._request_serializer = request_serializer + self._response_deserializer = response_deserializer + + def __call__( + self, request, timeout, metadata=None, with_call=False, + protocol_options=None): + return _blocking_unary_unary( + self._channel, self._group, self._method, timeout, with_call, + protocol_options, metadata, self._metadata_transformer, request, + self._request_serializer, self._response_deserializer) + + def future(self, request, timeout, metadata=None, protocol_options=None): + return _future_unary_unary( + self._channel, self._group, self._method, timeout, protocol_options, + metadata, self._metadata_transformer, request, self._request_serializer, + self._response_deserializer) + + def event( + self, request, receiver, abortion_callback, timeout, + metadata=None, protocol_options=None): + raise NotImplementedError() + + +class _UnaryStreamMultiCallable(face.UnaryStreamMultiCallable): + + def __init__( + self, channel, group, method, metadata_transformer, request_serializer, + response_deserializer): + self._channel = channel + self._group = group + self._method = method + self._metadata_transformer = metadata_transformer + self._request_serializer = request_serializer + self._response_deserializer = response_deserializer + + def __call__(self, request, timeout, metadata=None, protocol_options=None): + return _unary_stream( + self._channel, self._group, self._method, timeout, protocol_options, + metadata, self._metadata_transformer, request, self._request_serializer, + self._response_deserializer) + + def event( + self, request, receiver, abortion_callback, timeout, + metadata=None, protocol_options=None): + raise NotImplementedError() + + +class _StreamUnaryMultiCallable(face.StreamUnaryMultiCallable): + + def __init__( + self, channel, group, method, metadata_transformer, request_serializer, + response_deserializer): + self._channel = channel + self._group = group + self._method = method + self._metadata_transformer = metadata_transformer + self._request_serializer = request_serializer + self._response_deserializer = response_deserializer + + def __call__( + self, request_iterator, timeout, metadata=None, with_call=False, + protocol_options=None): + return _blocking_stream_unary( + self._channel, self._group, self._method, timeout, with_call, + protocol_options, metadata, self._metadata_transformer, + request_iterator, self._request_serializer, self._response_deserializer) + + def future( + self, request_iterator, timeout, metadata=None, protocol_options=None): + return _future_stream_unary( + self._channel, self._group, self._method, timeout, protocol_options, + metadata, self._metadata_transformer, request_iterator, + self._request_serializer, self._response_deserializer) + + def event( + self, receiver, abortion_callback, timeout, metadata=None, + protocol_options=None): + raise NotImplementedError() + + +class _StreamStreamMultiCallable(face.StreamStreamMultiCallable): + + def __init__( + self, channel, group, method, metadata_transformer, request_serializer, + response_deserializer): + self._channel = channel + self._group = group + self._method = method + self._metadata_transformer = metadata_transformer + self._request_serializer = request_serializer + self._response_deserializer = response_deserializer + + def __call__( + self, request_iterator, timeout, metadata=None, protocol_options=None): + return _stream_stream( + self._channel, self._group, self._method, timeout, protocol_options, + metadata, self._metadata_transformer, request_iterator, + self._request_serializer, self._response_deserializer) + + def event( + self, receiver, abortion_callback, timeout, metadata=None, + protocol_options=None): + raise NotImplementedError() + + +class _GenericStub(face.GenericStub): + + def __init__( + self, channel, metadata_transformer, request_serializers, + response_deserializers): + self._channel = channel + self._metadata_transformer = metadata_transformer + self._request_serializers = request_serializers or {} + self._response_deserializers = response_deserializers or {} + + def blocking_unary_unary( + self, group, method, request, timeout, metadata=None, + with_call=None, protocol_options=None): + request_serializer = self._request_serializers.get((group, method,)) + response_deserializer = self._response_deserializers.get((group, method,)) + return _blocking_unary_unary( + self._channel, group, method, timeout, with_call, protocol_options, + metadata, self._metadata_transformer, request, request_serializer, + response_deserializer) + + def future_unary_unary( + self, group, method, request, timeout, metadata=None, + protocol_options=None): + request_serializer = self._request_serializers.get((group, method,)) + response_deserializer = self._response_deserializers.get((group, method,)) + return _future_unary_unary( + self._channel, group, method, timeout, protocol_options, metadata, + self._metadata_transformer, request, request_serializer, + response_deserializer) + + def inline_unary_stream( + self, group, method, request, timeout, metadata=None, + protocol_options=None): + request_serializer = self._request_serializers.get((group, method,)) + response_deserializer = self._response_deserializers.get((group, method,)) + return _unary_stream( + self._channel, group, method, timeout, protocol_options, metadata, + self._metadata_transformer, request, request_serializer, + response_deserializer) + + def blocking_stream_unary( + self, group, method, request_iterator, timeout, metadata=None, + with_call=None, protocol_options=None): + request_serializer = self._request_serializers.get((group, method,)) + response_deserializer = self._response_deserializers.get((group, method,)) + return _blocking_stream_unary( + self._channel, group, method, timeout, with_call, protocol_options, + metadata, self._metadata_transformer, request_iterator, + request_serializer, response_deserializer) + + def future_stream_unary( + self, group, method, request_iterator, timeout, metadata=None, + protocol_options=None): + request_serializer = self._request_serializers.get((group, method,)) + response_deserializer = self._response_deserializers.get((group, method,)) + return _future_stream_unary( + self._channel, group, method, timeout, protocol_options, metadata, + self._metadata_transformer, request_iterator, request_serializer, + response_deserializer) + + def inline_stream_stream( + self, group, method, request_iterator, timeout, metadata=None, + protocol_options=None): + request_serializer = self._request_serializers.get((group, method,)) + response_deserializer = self._response_deserializers.get((group, method,)) + return _stream_stream( + self._channel, group, method, timeout, protocol_options, metadata, + self._metadata_transformer, request_iterator, request_serializer, + response_deserializer) + + def event_unary_unary( + self, group, method, request, receiver, abortion_callback, timeout, + metadata=None, protocol_options=None): + raise NotImplementedError() + + def event_unary_stream( + self, group, method, request, receiver, abortion_callback, timeout, + metadata=None, protocol_options=None): + raise NotImplementedError() + + def event_stream_unary( + self, group, method, receiver, abortion_callback, timeout, + metadata=None, protocol_options=None): + raise NotImplementedError() + + def event_stream_stream( + self, group, method, receiver, abortion_callback, timeout, + metadata=None, protocol_options=None): + raise NotImplementedError() + + def unary_unary(self, group, method): + request_serializer = self._request_serializers.get((group, method,)) + response_deserializer = self._response_deserializers.get((group, method,)) + return _UnaryUnaryMultiCallable( + self._channel, group, method, self._metadata_transformer, + request_serializer, response_deserializer) + + def unary_stream(self, group, method): + request_serializer = self._request_serializers.get((group, method,)) + response_deserializer = self._response_deserializers.get((group, method,)) + return _UnaryStreamMultiCallable( + self._channel, group, method, self._metadata_transformer, + request_serializer, response_deserializer) + + def stream_unary(self, group, method): + request_serializer = self._request_serializers.get((group, method,)) + response_deserializer = self._response_deserializers.get((group, method,)) + return _StreamUnaryMultiCallable( + self._channel, group, method, self._metadata_transformer, + request_serializer, response_deserializer) + + def stream_stream(self, group, method): + request_serializer = self._request_serializers.get((group, method,)) + response_deserializer = self._response_deserializers.get((group, method,)) + return _StreamStreamMultiCallable( + self._channel, group, method, self._metadata_transformer, + request_serializer, response_deserializer) + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + return False + + +class _DynamicStub(face.DynamicStub): + + def __init__(self, generic_stub, group, cardinalities): + self._generic_stub = generic_stub + self._group = group + self._cardinalities = cardinalities + + def __getattr__(self, attr): + method_cardinality = self._cardinalities.get(attr) + if method_cardinality is cardinality.Cardinality.UNARY_UNARY: + return self._generic_stub.unary_unary(self._group, attr) + elif method_cardinality is cardinality.Cardinality.UNARY_STREAM: + return self._generic_stub.unary_stream(self._group, attr) + elif method_cardinality is cardinality.Cardinality.STREAM_UNARY: + return self._generic_stub.stream_unary(self._group, attr) + elif method_cardinality is cardinality.Cardinality.STREAM_STREAM: + return self._generic_stub.stream_stream(self._group, attr) + else: + raise AttributeError('_DynamicStub object has no attribute "%s"!' % attr) + + def __enter__(self): + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + return False + + +def generic_stub( + channel, host, metadata_transformer, request_serializers, + response_deserializers): + return _GenericStub( + channel, metadata_transformer, request_serializers, + response_deserializers) + + +def dynamic_stub( + channel, service, cardinalities, host, metadata_transformer, + request_serializers, response_deserializers): + return _DynamicStub( + _GenericStub( + channel, metadata_transformer, request_serializers, + response_deserializers), + service, cardinalities) diff --git a/src/python/grpcio/grpc/beta/_server_adaptations.py b/src/python/grpcio/grpc/beta/_server_adaptations.py new file mode 100644 index 00000000000..52eadf23158 --- /dev/null +++ b/src/python/grpcio/grpc/beta/_server_adaptations.py @@ -0,0 +1,359 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""Translates gRPC's server-side API into gRPC's server-side Beta API.""" + +import collections +import threading + +import grpc +from grpc.beta import interfaces +from grpc.framework.common import cardinality +from grpc.framework.common import style +from grpc.framework.foundation import abandonment +from grpc.framework.foundation import logging_pool +from grpc.framework.foundation import stream +from grpc.framework.interfaces.face import face + +_DEFAULT_POOL_SIZE = 8 + + +class _ServerProtocolContext(interfaces.GRPCServicerContext): + + def __init__(self, servicer_context): + self._servicer_context = servicer_context + + def peer(self): + return self._servicer_context.peer() + + def disable_next_response_compression(self): + pass # TODO(https://github.com/grpc/grpc/issues/4078): design, implement. + + +class _FaceServicerContext(face.ServicerContext): + + def __init__(self, servicer_context): + self._servicer_context = servicer_context + + def is_active(self): + return self._servicer_context.is_active() + + def time_remaining(self): + return self._servicer_context.time_remaining() + + def add_abortion_callback(self, abortion_callback): + raise NotImplementedError( + 'add_abortion_callback no longer supported server-side!') + + def cancel(self): + self._servicer_context.cancel() + + def protocol_context(self): + return _ServerProtocolContext(self._servicer_context) + + def invocation_metadata(self): + return self._servicer_context.invocation_metadata() + + def initial_metadata(self, initial_metadata): + self._servicer_context.send_initial_metadata(initial_metadata) + + def terminal_metadata(self, terminal_metadata): + self._servicer_context.set_terminal_metadata(terminal_metadata) + + def code(self, code): + self._servicer_context.set_code(code) + + def details(self, details): + self._servicer_context.set_details(details) + + +def _adapt_unary_request_inline(unary_request_inline): + def adaptation(request, servicer_context): + return unary_request_inline(request, _FaceServicerContext(servicer_context)) + return adaptation + + +def _adapt_stream_request_inline(stream_request_inline): + def adaptation(request_iterator, servicer_context): + return stream_request_inline( + request_iterator, _FaceServicerContext(servicer_context)) + return adaptation + + +class _Callback(stream.Consumer): + + def __init__(self): + self._condition = threading.Condition() + self._values = [] + self._terminated = False + self._cancelled = False + + def consume(self, value): + with self._condition: + self._values.append(value) + self._condition.notify_all() + + def terminate(self): + with self._condition: + self._terminated = True + self._condition.notify_all() + + def consume_and_terminate(self, value): + with self._condition: + self._values.append(value) + self._terminated = True + self._condition.notify_all() + + def cancel(self): + with self._condition: + self._cancelled = True + self._condition.notify_all() + + def draw_one_value(self): + with self._condition: + while True: + if self._cancelled: + raise abandonment.Abandoned() + elif self._values: + return self._values.pop(0) + elif self._terminated: + return None + else: + self._condition.wait() + + def draw_all_values(self): + with self._condition: + while True: + if self._cancelled: + raise abandonment.Abandoned() + elif self._terminated: + all_values = tuple(self._values) + self._values = None + return all_values + else: + self._condition.wait() + + +def _pipe_requests(request_iterator, request_consumer, servicer_context): + for request in request_iterator: + if not servicer_context.is_active(): + return + request_consumer.consume(request) + if not servicer_context.is_active(): + return + request_consumer.terminate() + + +def _adapt_unary_unary_event(unary_unary_event): + def adaptation(request, servicer_context): + callback = _Callback() + if not servicer_context.add_callback(callback.cancel): + raise abandonment.Abandoned() + unary_unary_event( + request, callback.consume_and_terminate, + _FaceServicerContext(servicer_context)) + return callback.draw_all_values()[0] + return adaptation + + +def _adapt_unary_stream_event(unary_stream_event): + def adaptation(request, servicer_context): + callback = _Callback() + if not servicer_context.add_callback(callback.cancel): + raise abandonment.Abandoned() + unary_stream_event( + request, callback, _FaceServicerContext(servicer_context)) + while True: + response = callback.draw_one_value() + if response is None: + return + else: + yield response + return adaptation + + +def _adapt_stream_unary_event(stream_unary_event): + def adaptation(request_iterator, servicer_context): + callback = _Callback() + if not servicer_context.add_callback(callback.cancel): + raise abandonment.Abandoned() + request_consumer = stream_unary_event( + callback.consume_and_terminate, _FaceServicerContext(servicer_context)) + request_pipe_thread = threading.Thread( + target=_pipe_requests, + args=(request_iterator, request_consumer, servicer_context,)) + request_pipe_thread.start() + return callback.draw_all_values()[0] + return adaptation + + +def _adapt_stream_stream_event(stream_stream_event): + def adaptation(request_iterator, servicer_context): + callback = _Callback() + if not servicer_context.add_callback(callback.cancel): + raise abandonment.Abandoned() + request_consumer = stream_stream_event( + callback, _FaceServicerContext(servicer_context)) + request_pipe_thread = threading.Thread( + target=_pipe_requests, + args=(request_iterator, request_consumer, servicer_context,)) + request_pipe_thread.start() + while True: + response = callback.draw_one_value() + if response is None: + return + else: + yield response + return adaptation + + +class _SimpleMethodHandler( + collections.namedtuple( + '_MethodHandler', + ('request_streaming', 'response_streaming', 'request_deserializer', + 'response_serializer', 'unary_unary', 'unary_stream', 'stream_unary', + 'stream_stream',)), + grpc.RpcMethodHandler): + pass + + +def _simple_method_handler( + implementation, request_deserializer, response_serializer): + if implementation.style is style.Service.INLINE: + if implementation.cardinality is cardinality.Cardinality.UNARY_UNARY: + return _SimpleMethodHandler( + False, False, request_deserializer, response_serializer, + _adapt_unary_request_inline(implementation.unary_unary_inline), None, + None, None) + elif implementation.cardinality is cardinality.Cardinality.UNARY_STREAM: + return _SimpleMethodHandler( + False, True, request_deserializer, response_serializer, None, + _adapt_unary_request_inline(implementation.unary_stream_inline), None, + None) + elif implementation.cardinality is cardinality.Cardinality.STREAM_UNARY: + return _SimpleMethodHandler( + True, False, request_deserializer, response_serializer, None, None, + _adapt_stream_request_inline(implementation.stream_unary_inline), + None) + elif implementation.cardinality is cardinality.Cardinality.STREAM_STREAM: + return _SimpleMethodHandler( + True, True, request_deserializer, response_serializer, None, None, + None, + _adapt_stream_request_inline(implementation.stream_stream_inline)) + elif implementation.style is style.Service.EVENT: + if implementation.cardinality is cardinality.Cardinality.UNARY_UNARY: + return _SimpleMethodHandler( + False, False, request_deserializer, response_serializer, + _adapt_unary_unary_event(implementation.unary_unary_event), None, + None, None) + elif implementation.cardinality is cardinality.Cardinality.UNARY_STREAM: + return _SimpleMethodHandler( + False, True, request_deserializer, response_serializer, None, + _adapt_unary_stream_event(implementation.unary_stream_event), None, + None) + elif implementation.cardinality is cardinality.Cardinality.STREAM_UNARY: + return _SimpleMethodHandler( + True, False, request_deserializer, response_serializer, None, None, + _adapt_stream_unary_event(implementation.stream_unary_event), None) + elif implementation.cardinality is cardinality.Cardinality.STREAM_STREAM: + return _SimpleMethodHandler( + True, True, request_deserializer, response_serializer, None, None, + None, _adapt_stream_stream_event(implementation.stream_stream_event)) + + +class _GenericRpcHandler(grpc.GenericRpcHandler): + + def __init__( + self, method_implementations, multi_method_implementation, + request_deserializers, response_serializers): + self._method_implementations = method_implementations + self._multi_method_implementation = multi_method_implementation + self._request_deserializers = request_deserializers or {} + self._response_serializers = response_serializers or {} + + def service(self, handler_call_details): + try: + group_name, method_name = handler_call_details.method.split(b'/')[1:3] + except ValueError: + return None + else: + method_implementation = self._method_implementations.get( + (group_name, method_name,)) + if method_implementation is not None: + return _simple_method_handler( + method_implementation, + self._request_deserializers.get((group_name, method_name,)), + self._response_serializers.get((group_name, method_name,))) + elif self._multi_method_implementation is None: + return None + else: + try: + return None #TODO(nathaniel): call the multimethod. + except face.NoSuchMethodError: + return None + + +class _Server(interfaces.Server): + + def __init__(self, server): + self._server = server + + def add_insecure_port(self, address): + return self._server.add_insecure_port(address) + + def add_secure_port(self, address, server_credentials): + return self._server.add_secure_port(address, server_credentials) + + def start(self): + self._server.start() + + def stop(self, grace): + return self._server.stop(grace) + + def __enter__(self): + self._server.start() + return self + + def __exit__(self, exc_type, exc_val, exc_tb): + self._server.stop(None) + return False + + +def server( + service_implementations, multi_method_implementation, request_deserializers, + response_serializers, thread_pool, thread_pool_size): + generic_rpc_handler = _GenericRpcHandler( + service_implementations, multi_method_implementation, + request_deserializers, response_serializers) + if thread_pool is None: + effective_thread_pool = logging_pool.pool( + _DEFAULT_POOL_SIZE if thread_pool_size is None else thread_pool_size) + else: + effective_thread_pool = thread_pool + return _Server(grpc.server((generic_rpc_handler,), effective_thread_pool)) diff --git a/src/python/grpcio/grpc/beta/implementations.py b/src/python/grpcio/grpc/beta/implementations.py index d8c32dd2f53..4ae6e7d6751 100644 --- a/src/python/grpcio/grpc/beta/implementations.py +++ b/src/python/grpcio/grpc/beta/implementations.py @@ -35,83 +35,20 @@ import enum import threading # pylint: disable=unused-import # cardinality and face are referenced from specification in this module. -from grpc._adapter import _intermediary_low -from grpc._adapter import _low +import grpc +from grpc import _auth from grpc._adapter import _types -from grpc.beta import _auth -from grpc.beta import _connectivity_channel -from grpc.beta import _server -from grpc.beta import _stub +from grpc.beta import _client_adaptations +from grpc.beta import _server_adaptations from grpc.beta import interfaces from grpc.framework.common import cardinality # pylint: disable=unused-import from grpc.framework.interfaces.face import face # pylint: disable=unused-import -_CHANNEL_SUBSCRIPTION_CALLBACK_ERROR_LOG_MESSAGE = ( - 'Exception calling channel subscription callback!') - -class ChannelCredentials(object): - """A value encapsulating the data required to create a secure Channel. - - This class and its instances have no supported interface - it exists to define - the type of its instances and its instances exist to be passed to other - functions. - """ - - def __init__(self, low_credentials): - self._low_credentials = low_credentials - - -def ssl_channel_credentials(root_certificates=None, private_key=None, - certificate_chain=None): - """Creates a ChannelCredentials for use with an SSL-enabled Channel. - - Args: - root_certificates: The PEM-encoded root certificates or unset to ask for - them to be retrieved from a default location. - private_key: The PEM-encoded private key to use or unset if no private key - should be used. - certificate_chain: The PEM-encoded certificate chain to use or unset if no - certificate chain should be used. - - Returns: - A ChannelCredentials for use with an SSL-enabled Channel. - """ - return ChannelCredentials(_low.channel_credentials_ssl( - root_certificates, private_key, certificate_chain)) - - -class CallCredentials(object): - """A value encapsulating data asserting an identity over an *established* - channel. May be composed with ChannelCredentials to always assert identity for - every call over that channel. - - This class and its instances have no supported interface - it exists to define - the type of its instances and its instances exist to be passed to other - functions. - """ - - def __init__(self, low_credentials): - self._low_credentials = low_credentials - - -def metadata_call_credentials(metadata_plugin, name=None): - """Construct CallCredentials from an interfaces.GRPCAuthMetadataPlugin. - - Args: - metadata_plugin: An interfaces.GRPCAuthMetadataPlugin to use in constructing - the CallCredentials object. - - Returns: - A CallCredentials object for use in a GRPCCallOptions object. - """ - if name is None: - try: - name = metadata_plugin.__name__ - except AttributeError: - name = metadata_plugin.__class__.__name__ - return CallCredentials( - _low.call_credentials_metadata_plugin(metadata_plugin, name)) +ChannelCredentials = grpc.ChannelCredentials +ssl_channel_credentials = grpc.ssl_channel_credentials +CallCredentials = grpc.CallCredentials +metadata_call_credentials = grpc.metadata_call_credentials def google_call_credentials(credentials): @@ -125,53 +62,9 @@ def google_call_credentials(credentials): """ return metadata_call_credentials(_auth.GoogleCallCredentials(credentials)) - -def access_token_call_credentials(access_token): - """Construct CallCredentials from an access token. - - Args: - access_token: A string to place directly in the http request - authorization header, ie "Authorization: Bearer ". - - Returns: - A CallCredentials object for use in a GRPCCallOptions object. - """ - return metadata_call_credentials( - _auth.AccessTokenCallCredentials(access_token)) - - -def composite_call_credentials(call_credentials, additional_call_credentials): - """Compose two CallCredentials to make a new one. - - Args: - call_credentials: A CallCredentials object. - additional_call_credentials: Another CallCredentials object to compose on - top of call_credentials. - - Returns: - A CallCredentials object for use in a GRPCCallOptions object. - """ - return CallCredentials( - _low.call_credentials_composite( - call_credentials._low_credentials, - additional_call_credentials._low_credentials)) - -def composite_channel_credentials(channel_credentials, - additional_call_credentials): - """Compose ChannelCredentials on top of client credentials to make a new one. - - Args: - channel_credentials: A ChannelCredentials object. - additional_call_credentials: A CallCredentials object to compose on - top of channel_credentials. - - Returns: - A ChannelCredentials object for use in a GRPCCallOptions object. - """ - return ChannelCredentials( - _low.channel_credentials_composite( - channel_credentials._low_credentials, - additional_call_credentials._low_credentials)) +access_token_call_credentials = grpc.access_token_call_credentials +composite_call_credentials = grpc.composite_call_credentials +composite_channel_credentials = grpc.composite_channel_credentials class Channel(object): @@ -182,11 +75,8 @@ class Channel(object): unsupported. """ - def __init__(self, low_channel, intermediary_low_channel): - self._low_channel = low_channel - self._intermediary_low_channel = intermediary_low_channel - self._connectivity_channel = _connectivity_channel.ConnectivityChannel( - low_channel) + def __init__(self, channel): + self._channel = channel def subscribe(self, callback, try_to_connect=None): """Subscribes to this Channel's connectivity. @@ -201,7 +91,7 @@ class Channel(object): attempt to connect if it is not already connected and ready to conduct RPCs. """ - self._connectivity_channel.subscribe(callback, try_to_connect) + self._channel.subscribe(callback, try_to_connect=try_to_connect) def unsubscribe(self, callback): """Unsubscribes a callback from this Channel's connectivity. @@ -210,7 +100,7 @@ class Channel(object): callback: A callable previously registered with this Channel from having been passed to its "subscribe" method. """ - self._connectivity_channel.unsubscribe(callback) + self._channel.unsubscribe(callback) def insecure_channel(host, port): @@ -224,9 +114,9 @@ def insecure_channel(host, port): Returns: A Channel to the remote host through which RPCs may be conducted. """ - intermediary_low_channel = _intermediary_low.Channel( - '%s:%d' % (host, port) if port else host, None) - return Channel(intermediary_low_channel._internal, intermediary_low_channel) # pylint: disable=protected-access + channel = grpc.insecure_channel( + host if port is None else '%s:%d' % (host, port)) + return Channel(channel) def secure_channel(host, port, channel_credentials): @@ -241,10 +131,9 @@ def secure_channel(host, port, channel_credentials): Returns: A secure Channel to the remote host through which RPCs may be conducted. """ - intermediary_low_channel = _intermediary_low.Channel( - '%s:%d' % (host, port) if port else host, - channel_credentials._low_credentials) - return Channel(intermediary_low_channel._internal, intermediary_low_channel) # pylint: disable=protected-access + channel = grpc.secure_channel( + host if port is None else '%s:%d' % (host, port), channel_credentials) + return Channel(channel) class StubOptions(object): @@ -308,12 +197,11 @@ def generic_stub(channel, options=None): A face.GenericStub on which RPCs can be made. """ effective_options = _EMPTY_STUB_OPTIONS if options is None else options - return _stub.generic_stub( - channel._intermediary_low_channel, effective_options.host, # pylint: disable=protected-access - effective_options.metadata_transformer, + return _client_adaptations.generic_stub( + channel._channel, # pylint: disable=protected-access + effective_options.host, effective_options.metadata_transformer, effective_options.request_serializers, - effective_options.response_deserializers, effective_options.thread_pool, - effective_options.thread_pool_size) + effective_options.response_deserializers) def dynamic_stub(channel, service, cardinalities, options=None): @@ -331,55 +219,16 @@ def dynamic_stub(channel, service, cardinalities, options=None): A face.DynamicStub with which RPCs can be invoked. """ effective_options = StubOptions() if options is None else options - return _stub.dynamic_stub( - channel._intermediary_low_channel, effective_options.host, service, # pylint: disable=protected-access - cardinalities, effective_options.metadata_transformer, + return _client_adaptations.dynamic_stub( + channel._channel, # pylint: disable=protected-access + service, cardinalities, effective_options.host, + effective_options.metadata_transformer, effective_options.request_serializers, - effective_options.response_deserializers, effective_options.thread_pool, - effective_options.thread_pool_size) - - -class ServerCredentials(object): - """A value encapsulating the data required to open a secure port on a Server. + effective_options.response_deserializers) - This class and its instances have no supported interface - it exists to define - the type of its instances and its instances exist to be passed to other - functions. - """ - def __init__(self, low_credentials): - self._low_credentials = low_credentials - - -def ssl_server_credentials( - private_key_certificate_chain_pairs, root_certificates=None, - require_client_auth=False): - """Creates a ServerCredentials for use with an SSL-enabled Server. - - Args: - private_key_certificate_chain_pairs: A nonempty sequence each element of - which is a pair the first element of which is a PEM-encoded private key - and the second element of which is the corresponding PEM-encoded - certificate chain. - root_certificates: PEM-encoded client root certificates to be used for - verifying authenticated clients. If omitted, require_client_auth must also - be omitted or be False. - require_client_auth: A boolean indicating whether or not to require clients - to be authenticated. May only be True if root_certificates is not None. - - Returns: - A ServerCredentials for use with an SSL-enabled Server. - """ - if len(private_key_certificate_chain_pairs) == 0: - raise ValueError( - 'At least one private key-certificate chain pairis required!') - elif require_client_auth and root_certificates is None: - raise ValueError( - 'Illegal to require client auth without providing root certificates!') - else: - return ServerCredentials(_low.server_credentials_ssl( - root_certificates, private_key_certificate_chain_pairs, - require_client_auth)) +ServerCredentials = grpc.ServerCredentials +ssl_server_credentials = grpc.ssl_server_credentials class ServerOptions(object): @@ -452,9 +301,8 @@ def server(service_implementations, options=None): An interfaces.Server with which RPCs can be serviced. """ effective_options = _EMPTY_SERVER_OPTIONS if options is None else options - return _server.server( + return _server_adaptations.server( service_implementations, effective_options.multi_method_implementation, effective_options.request_deserializers, effective_options.response_serializers, effective_options.thread_pool, - effective_options.thread_pool_size, effective_options.default_timeout, - effective_options.maximum_timeout) + effective_options.thread_pool_size) diff --git a/src/python/grpcio/grpc/beta/interfaces.py b/src/python/grpcio/grpc/beta/interfaces.py index 24de9ad1a8e..4343b6c4b52 100644 --- a/src/python/grpcio/grpc/beta/interfaces.py +++ b/src/python/grpcio/grpc/beta/interfaces.py @@ -30,53 +30,13 @@ """Constants and interfaces of the Beta API of gRPC Python.""" import abc -import enum import six -from grpc._adapter import _types +import grpc - -@enum.unique -class ChannelConnectivity(enum.Enum): - """Mirrors grpc_connectivity_state in the gRPC Core. - - Attributes: - IDLE: The channel is idle. - CONNECTING: The channel is connecting. - READY: The channel is ready to conduct RPCs. - TRANSIENT_FAILURE: The channel has seen a failure from which it expects to - recover. - FATAL_FAILURE: The channel has seen a failure from which it cannot recover. - """ - IDLE = (_types.ConnectivityState.IDLE, 'idle',) - CONNECTING = (_types.ConnectivityState.CONNECTING, 'connecting',) - READY = (_types.ConnectivityState.READY, 'ready',) - TRANSIENT_FAILURE = ( - _types.ConnectivityState.TRANSIENT_FAILURE, 'transient failure',) - FATAL_FAILURE = (_types.ConnectivityState.FATAL_FAILURE, 'fatal failure',) - - -@enum.unique -class StatusCode(enum.Enum): - """Mirrors grpc_status_code in the C core.""" - OK = 0 - CANCELLED = 1 - UNKNOWN = 2 - INVALID_ARGUMENT = 3 - DEADLINE_EXCEEDED = 4 - NOT_FOUND = 5 - ALREADY_EXISTS = 6 - PERMISSION_DENIED = 7 - RESOURCE_EXHAUSTED = 8 - FAILED_PRECONDITION = 9 - ABORTED = 10 - OUT_OF_RANGE = 11 - UNIMPLEMENTED = 12 - INTERNAL = 13 - UNAVAILABLE = 14 - DATA_LOSS = 15 - UNAUTHENTICATED = 16 +ChannelConnectivity = grpc.ChannelConnectivity +StatusCode = grpc.StatusCode class GRPCCallOptions(object): @@ -106,46 +66,9 @@ def grpc_call_options(disable_compression=False, credentials=None): """ return GRPCCallOptions(disable_compression, None, credentials) - -class GRPCAuthMetadataContext(six.with_metaclass(abc.ABCMeta)): - """Provides information to call credentials metadata plugins. - - Attributes: - service_url: A string URL of the service being called into. - method_name: A string of the fully qualified method name being called. - """ - - -class GRPCAuthMetadataPluginCallback(six.with_metaclass(abc.ABCMeta)): - """Callback object received by a metadata plugin.""" - - def __call__(self, metadata, error): - """Inform the gRPC runtime of the metadata to construct a CallCredentials. - - Args: - metadata: An iterable of 2-sequences (e.g. tuples) of metadata key/value - pairs. - error: An Exception to indicate error or None to indicate success. - """ - raise NotImplementedError() - - -class GRPCAuthMetadataPlugin(six.with_metaclass(abc.ABCMeta)): - """ - """ - - def __call__(self, context, callback): - """Invoke the plugin. - - Must not block. Need only be called by the gRPC runtime. - - Args: - context: A GRPCAuthMetadataContext providing information on what the - plugin is being used for. - callback: A GRPCAuthMetadataPluginCallback to be invoked either - synchronously or asynchronously. - """ - raise NotImplementedError() +GRPCAuthMetadataContext = grpc.AuthMetadataContext +GRPCAuthMetadataPluginCallback = grpc.AuthMetadataPluginCallback +GRPCAuthMetadataPlugin = grpc.AuthMetadataPlugin class GRPCServicerContext(six.with_metaclass(abc.ABCMeta)): diff --git a/src/python/grpcio/tests/unit/beta/_auth_test.py b/src/python/grpcio/tests/unit/_auth_test.py similarity index 99% rename from src/python/grpcio/tests/unit/beta/_auth_test.py rename to src/python/grpcio/tests/unit/_auth_test.py index 694928a91b7..c31f7b06f73 100644 --- a/src/python/grpcio/tests/unit/beta/_auth_test.py +++ b/src/python/grpcio/tests/unit/_auth_test.py @@ -33,7 +33,7 @@ import collections import threading import unittest -from grpc.beta import _auth +from grpc import _auth class MockGoogleCreds(object): diff --git a/src/python/grpcio/tests/unit/beta/test_utilities.py b/src/python/grpcio/tests/unit/beta/test_utilities.py index 0313e06a93e..66b5f72897c 100644 --- a/src/python/grpcio/tests/unit/beta/test_utilities.py +++ b/src/python/grpcio/tests/unit/beta/test_utilities.py @@ -29,7 +29,7 @@ """Test-appropriate entry points into the gRPC Python Beta API.""" -from grpc._adapter import _intermediary_low +import grpc from grpc.beta import implementations @@ -48,9 +48,8 @@ def not_really_secure_channel( An implementations.Channel to the remote host through which RPCs may be conducted. """ - hostport = '%s:%d' % (host, port) - intermediary_low_channel = _intermediary_low.Channel( - hostport, channel_credentials._low_credentials, - server_host_override=server_host_override) - return implementations.Channel( - intermediary_low_channel._internal, intermediary_low_channel) + target = '%s:%d' % (host, port) + channel = grpc.secure_channel( + target, ((b'grpc.ssl_target_name_override', server_host_override,),), + channel_credentials._credentials) + return implementations.Channel(channel) From 0601df3a04a91e5e731e829989fd93290e301d97 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Mon, 6 Jun 2016 13:08:06 -0700 Subject: [PATCH 0879/1894] Move reflection src/hdr to src/cpp/ext include/grpc++/ext --- BUILD | 16 +++--- Makefile | 29 +++++----- build.yaml | 16 +++--- .../ext}/proto_server_reflection_plugin.h | 0 .../grpc++/ext}/reflection.grpc.pb.h | 2 +- .../grpc++/ext}/reflection.pb.h | 0 .../cpp/ext}/proto_server_reflection.cc | 2 +- .../cpp/ext}/proto_server_reflection.h | 2 +- .../ext}/proto_server_reflection_plugin.cc | 4 +- .../cpp/ext}/reflection.grpc.pb.cc | 4 +- .../cpp/ext}/reflection.pb.cc | 2 +- templates/Makefile.template | 7 +-- .../end2end/proto_server_reflection_test.cc | 2 +- .../proto_reflection_descriptor_database.h | 2 +- .../extensions/gen_reflection_proto.sh | 6 +- tools/run_tests/sources_and_headers.json | 24 ++++---- .../grpc++_reflection.vcxproj | 16 +++--- .../grpc++_reflection.vcxproj.filters | 55 ++++++++++--------- 18 files changed, 95 insertions(+), 94 deletions(-) rename {extensions/include/grpc++/impl => include/grpc++/ext}/proto_server_reflection_plugin.h (100%) rename {extensions/include/grpc++/impl => include/grpc++/ext}/reflection.grpc.pb.h (99%) rename {extensions/include/grpc++/impl => include/grpc++/ext}/reflection.pb.h (100%) rename {extensions/reflection => src/cpp/ext}/proto_server_reflection.cc (99%) rename {extensions/reflection => src/cpp/ext}/proto_server_reflection.h (98%) rename {extensions/reflection => src/cpp/ext}/proto_server_reflection_plugin.cc (96%) rename {extensions/reflection => src/cpp/ext}/reflection.grpc.pb.cc (98%) rename {extensions/reflection => src/cpp/ext}/reflection.pb.cc (99%) diff --git a/BUILD b/BUILD index b47100ad9c4..312ec7df9c9 100644 --- a/BUILD +++ b/BUILD @@ -1000,16 +1000,16 @@ cc_library( cc_library( name = "grpc++_reflection", srcs = [ - "extensions/reflection/proto_server_reflection.h", - "extensions/reflection/proto_server_reflection.cc", - "extensions/reflection/proto_server_reflection_plugin.cc", - "extensions/reflection/reflection.grpc.pb.cc", - "extensions/reflection/reflection.pb.cc", + "src/cpp/ext/proto_server_reflection.h", + "src/cpp/ext/proto_server_reflection.cc", + "src/cpp/ext/proto_server_reflection_plugin.cc", + "src/cpp/ext/reflection.grpc.pb.cc", + "src/cpp/ext/reflection.pb.cc", ], hdrs = [ - "extensions/include/grpc++/impl/proto_server_reflection_plugin.h", - "extensions/include/grpc++/impl/reflection.grpc.pb.h", - "extensions/include/grpc++/impl/reflection.pb.h", + "include/grpc++/ext/proto_server_reflection_plugin.h", + "include/grpc++/ext/reflection.grpc.pb.h", + "include/grpc++/ext/reflection.pb.h", ], includes = [ "include", diff --git a/Makefile b/Makefile index 97377dba034..c63b88fedf6 100644 --- a/Makefile +++ b/Makefile @@ -84,7 +84,6 @@ BINDIR = $(BUILDDIR_ABSOLUTE)/bins OBJDIR = $(BUILDDIR_ABSOLUTE)/objs LIBDIR = $(BUILDDIR_ABSOLUTE)/libs GENDIR = $(BUILDDIR_ABSOLUTE)/gens -EXTDIR = $(BUILDDIR_ABSOLUTE)/extensions # Configurations @@ -370,7 +369,7 @@ CPPFLAGS += -fPIC LDFLAGS += -fPIC endif -INCLUDES = . include $(GENDIR) $(EXTDIR) $(EXTDIR)/include +INCLUDES = . include $(GENDIR) LDFLAGS += -Llibs/$(CONFIG) ifeq ($(SYSTEM),Darwin) @@ -2155,8 +2154,8 @@ install-headers_c: install-headers_cxx: $(E) "[INSTALL] Installing public C++ headers" - $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) -d $(prefix)/$(patsubst extensions/%,%,$(dir $(h))) && ) exit 0 || exit 1 - $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) $(h) $(prefix)/$(patsubst extensions/%,%,$(h)) && ) exit 0 || exit 1 + $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) -d $(prefix)/$(dir $(h)) && ) exit 0 || exit 1 + $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) $(h) $(prefix)/$(h) && ) exit 0 || exit 1 install-static: install-static_c install-static_cxx @@ -3391,15 +3390,15 @@ endif LIBGRPC++_REFLECTION_SRC = \ - extensions/reflection/proto_server_reflection.cc \ - extensions/reflection/proto_server_reflection_plugin.cc \ - extensions/reflection/reflection.grpc.pb.cc \ - extensions/reflection/reflection.pb.cc \ + src/cpp/ext/proto_server_reflection.cc \ + src/cpp/ext/proto_server_reflection_plugin.cc \ + src/cpp/ext/reflection.grpc.pb.cc \ + src/cpp/ext/reflection.pb.cc \ PUBLIC_HEADERS_CXX += \ - extensions/include/grpc++/impl/proto_server_reflection_plugin.h \ - extensions/include/grpc++/impl/reflection.grpc.pb.h \ - extensions/include/grpc++/impl/reflection.pb.h \ + include/grpc++/ext/proto_server_reflection_plugin.h \ + include/grpc++/ext/reflection.grpc.pb.h \ + include/grpc++/ext/reflection.pb.h \ LIBGRPC++_REFLECTION_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_REFLECTION_SRC)))) @@ -14544,10 +14543,6 @@ ifneq ($(OPENSSL_DEP),) # This is to ensure the embedded OpenSSL is built beforehand, properly # installing headers to their final destination on the drive. We need this # otherwise parallel compilation will fail if a source is compiled first. -extensions/reflection/proto_server_reflection.cc: $(OPENSSL_DEP) -extensions/reflection/proto_server_reflection_plugin.cc: $(OPENSSL_DEP) -extensions/reflection/reflection.grpc.pb.cc: $(OPENSSL_DEP) -extensions/reflection/reflection.pb.cc: $(OPENSSL_DEP) src/core/ext/transport/chttp2/client/secure/secure_channel_create.c: $(OPENSSL_DEP) src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c: $(OPENSSL_DEP) src/core/ext/transport/cronet/client/secure/cronet_channel_create.c: $(OPENSSL_DEP) @@ -14578,6 +14573,10 @@ src/cpp/common/auth_property_iterator.cc: $(OPENSSL_DEP) src/cpp/common/secure_auth_context.cc: $(OPENSSL_DEP) 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/ext/reflection.grpc.pb.cc: $(OPENSSL_DEP) +src/cpp/ext/reflection.pb.cc: $(OPENSSL_DEP) src/cpp/server/secure_server_credentials.cc: $(OPENSSL_DEP) src/csharp/ext/grpc_csharp_ext.c: $(OPENSSL_DEP) test/core/bad_client/bad_client.c: $(OPENSSL_DEP) diff --git a/build.yaml b/build.yaml index 420a64bcf7f..a9c2f3b5529 100644 --- a/build.yaml +++ b/build.yaml @@ -904,16 +904,16 @@ libs: build: all language: c++ public_headers: - - extensions/include/grpc++/impl/proto_server_reflection_plugin.h - - extensions/include/grpc++/impl/reflection.grpc.pb.h - - extensions/include/grpc++/impl/reflection.pb.h + - include/grpc++/ext/proto_server_reflection_plugin.h + - include/grpc++/ext/reflection.grpc.pb.h + - include/grpc++/ext/reflection.pb.h headers: - - extensions/reflection/proto_server_reflection.h + - src/cpp/ext/proto_server_reflection.h src: - - extensions/reflection/proto_server_reflection.cc - - extensions/reflection/proto_server_reflection_plugin.cc - - extensions/reflection/reflection.grpc.pb.cc - - extensions/reflection/reflection.pb.cc + - src/cpp/ext/proto_server_reflection.cc + - src/cpp/ext/proto_server_reflection_plugin.cc + - src/cpp/ext/reflection.grpc.pb.cc + - src/cpp/ext/reflection.pb.cc uses: - grpc++_base - name: grpc++_test_config diff --git a/extensions/include/grpc++/impl/proto_server_reflection_plugin.h b/include/grpc++/ext/proto_server_reflection_plugin.h similarity index 100% rename from extensions/include/grpc++/impl/proto_server_reflection_plugin.h rename to include/grpc++/ext/proto_server_reflection_plugin.h diff --git a/extensions/include/grpc++/impl/reflection.grpc.pb.h b/include/grpc++/ext/reflection.grpc.pb.h similarity index 99% rename from extensions/include/grpc++/impl/reflection.grpc.pb.h rename to include/grpc++/ext/reflection.grpc.pb.h index e49a1b3f509..0b4ef861472 100644 --- a/extensions/include/grpc++/impl/reflection.grpc.pb.h +++ b/include/grpc++/ext/reflection.grpc.pb.h @@ -70,7 +70,7 @@ #ifndef GRPC_reflection_2eproto__INCLUDED #define GRPC_reflection_2eproto__INCLUDED -#include +#include #include #include diff --git a/extensions/include/grpc++/impl/reflection.pb.h b/include/grpc++/ext/reflection.pb.h similarity index 100% rename from extensions/include/grpc++/impl/reflection.pb.h rename to include/grpc++/ext/reflection.pb.h diff --git a/extensions/reflection/proto_server_reflection.cc b/src/cpp/ext/proto_server_reflection.cc similarity index 99% rename from extensions/reflection/proto_server_reflection.cc rename to src/cpp/ext/proto_server_reflection.cc index f3cf7958e84..6e54bc27207 100644 --- a/extensions/reflection/proto_server_reflection.cc +++ b/src/cpp/ext/proto_server_reflection.cc @@ -36,7 +36,7 @@ #include -#include "reflection/proto_server_reflection.h" +#include "src/cpp/ext/proto_server_reflection.h" using grpc::Status; using grpc::StatusCode; diff --git a/extensions/reflection/proto_server_reflection.h b/src/cpp/ext/proto_server_reflection.h similarity index 98% rename from extensions/reflection/proto_server_reflection.h rename to src/cpp/ext/proto_server_reflection.h index 71b316816c2..e7ab1fdf346 100644 --- a/extensions/reflection/proto_server_reflection.h +++ b/src/cpp/ext/proto_server_reflection.h @@ -39,7 +39,7 @@ #include -#include +#include namespace grpc { diff --git a/extensions/reflection/proto_server_reflection_plugin.cc b/src/cpp/ext/proto_server_reflection_plugin.cc similarity index 96% rename from extensions/reflection/proto_server_reflection_plugin.cc rename to src/cpp/ext/proto_server_reflection_plugin.cc index 8489adc7e11..becc9493595 100644 --- a/extensions/reflection/proto_server_reflection_plugin.cc +++ b/src/cpp/ext/proto_server_reflection_plugin.cc @@ -31,12 +31,12 @@ * */ -#include +#include #include #include #include -#include "reflection/proto_server_reflection.h" +#include "src/cpp/ext/proto_server_reflection.h" namespace grpc { namespace reflection { diff --git a/extensions/reflection/reflection.grpc.pb.cc b/src/cpp/ext/reflection.grpc.pb.cc similarity index 98% rename from extensions/reflection/reflection.grpc.pb.cc rename to src/cpp/ext/reflection.grpc.pb.cc index e8a376c3f29..b046dfc1b8b 100644 --- a/extensions/reflection/reflection.grpc.pb.cc +++ b/src/cpp/ext/reflection.grpc.pb.cc @@ -36,8 +36,8 @@ // If you make any local change, they will be lost. // source: reflection.proto -#include -#include +#include +#include #include #include diff --git a/extensions/reflection/reflection.pb.cc b/src/cpp/ext/reflection.pb.cc similarity index 99% rename from extensions/reflection/reflection.pb.cc rename to src/cpp/ext/reflection.pb.cc index a6184f048ff..b73a65d0a02 100644 --- a/extensions/reflection/reflection.pb.cc +++ b/src/cpp/ext/reflection.pb.cc @@ -36,7 +36,7 @@ // source: reflection.proto #define INTERNAL_SUPPRESS_PROTOBUF_FIELD_DEPRECATION -#include +#include #include diff --git a/templates/Makefile.template b/templates/Makefile.template index aa7b8bb0e2d..0d5f0ec5b53 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -113,7 +113,6 @@ OBJDIR = $(BUILDDIR_ABSOLUTE)/objs LIBDIR = $(BUILDDIR_ABSOLUTE)/libs GENDIR = $(BUILDDIR_ABSOLUTE)/gens - EXTDIR = $(BUILDDIR_ABSOLUTE)/extensions # Configurations @@ -248,7 +247,7 @@ LDFLAGS += -fPIC endif - INCLUDES = . include $(GENDIR) $(EXTDIR) $(EXTDIR)/include + INCLUDES = . include $(GENDIR) LDFLAGS += -Llibs/$(CONFIG) ifeq ($(SYSTEM),Darwin) @@ -1289,8 +1288,8 @@ install-headers_cxx: $(E) "[INSTALL] Installing public C++ headers" - $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) -d $(prefix)/$(patsubst extensions/%,%,$(dir $(h))) && ) exit 0 || exit 1 - $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) $(h) $(prefix)/$(patsubst extensions/%,%,$(h)) && ) exit 0 || exit 1 + $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) -d $(prefix)/$(dir $(h)) && ) exit 0 || exit 1 + $(Q) $(foreach h, $(PUBLIC_HEADERS_CXX), $(INSTALL) $(h) $(prefix)/$(h) && ) exit 0 || exit 1 install-static: install-static_c install-static_cxx diff --git a/test/cpp/end2end/proto_server_reflection_test.cc b/test/cpp/end2end/proto_server_reflection_test.cc index 300b2091139..f8fc39b5535 100644 --- a/test/cpp/end2end/proto_server_reflection_test.cc +++ b/test/cpp/end2end/proto_server_reflection_test.cc @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/test/cpp/util/proto_reflection_descriptor_database.h b/test/cpp/util/proto_reflection_descriptor_database.h index 7656a496c25..d7b2163ceaf 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.h +++ b/test/cpp/util/proto_reflection_descriptor_database.h @@ -40,7 +40,7 @@ #include #include #include -#include +#include namespace grpc { diff --git a/tools/codegen/extensions/gen_reflection_proto.sh b/tools/codegen/extensions/gen_reflection_proto.sh index de970b9f7fe..45a1a9f4ec1 100755 --- a/tools/codegen/extensions/gen_reflection_proto.sh +++ b/tools/codegen/extensions/gen_reflection_proto.sh @@ -31,9 +31,9 @@ PROTO_DIR="src/proto/grpc/reflection/v1alpha" PROTO_FILE="reflection" -HEADER_DIR="extensions/include/grpc++/impl" -SRC_DIR="extensions/reflection" -INCLUDE_DIR="grpc++/impl" +HEADER_DIR="include/grpc++/ext" +SRC_DIR="src/cpp/ext" +INCLUDE_DIR="grpc++/ext" TMP_DIR="tmp" GRPC_PLUGIN="bins/opt/grpc_cpp_plugin" PROTOC=third_party/protobuf/src/protoc diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 7ad61845d5c..f41bb09adb1 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4375,22 +4375,22 @@ "grpc++_base" ], "headers": [ - "extensions/include/grpc++/impl/proto_server_reflection_plugin.h", - "extensions/include/grpc++/impl/reflection.grpc.pb.h", - "extensions/include/grpc++/impl/reflection.pb.h", - "extensions/reflection/proto_server_reflection.h" + "include/grpc++/ext/proto_server_reflection_plugin.h", + "include/grpc++/ext/reflection.grpc.pb.h", + "include/grpc++/ext/reflection.pb.h", + "src/cpp/ext/proto_server_reflection.h" ], "language": "c++", "name": "grpc++_reflection", "src": [ - "extensions/include/grpc++/impl/proto_server_reflection_plugin.h", - "extensions/include/grpc++/impl/reflection.grpc.pb.h", - "extensions/include/grpc++/impl/reflection.pb.h", - "extensions/reflection/proto_server_reflection.cc", - "extensions/reflection/proto_server_reflection.h", - "extensions/reflection/proto_server_reflection_plugin.cc", - "extensions/reflection/reflection.grpc.pb.cc", - "extensions/reflection/reflection.pb.cc" + "include/grpc++/ext/proto_server_reflection_plugin.h", + "include/grpc++/ext/reflection.grpc.pb.h", + "include/grpc++/ext/reflection.pb.h", + "src/cpp/ext/proto_server_reflection.cc", + "src/cpp/ext/proto_server_reflection.h", + "src/cpp/ext/proto_server_reflection_plugin.cc", + "src/cpp/ext/reflection.grpc.pb.cc", + "src/cpp/ext/reflection.pb.cc" ], "third_party": false, "type": "lib" diff --git a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj index 82b2b85f9eb..75c9e8e5911 100644 --- a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj +++ b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj @@ -147,21 +147,21 @@ - - - + + + - + - + - + - + - + diff --git a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters index a5457bed008..70d3d45372a 100644 --- a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters @@ -1,51 +1,54 @@ - - extensions\reflection + + src\cpp\ext - - extensions\reflection + + src\cpp\ext - - extensions\reflection + + src\cpp\ext - - extensions\reflection + + src\cpp\ext - - extensions\include\grpc++\impl + + include\grpc++\ext - - extensions\include\grpc++\impl + + include\grpc++\ext - - extensions\include\grpc++\impl + + include\grpc++\ext - - extensions\reflection + + src\cpp\ext - - {8fd45ce8-8f02-367f-e3f7-4c0ae0e36566} + + {e9441021-f78a-ec84-7efd-1883975feddb} - - {1a18dfcc-bedf-226e-6929-377aba53249b} + + {c66e66b4-a64e-79bf-40e8-1a1bac124a3d} - - {83bf0cce-01da-a93c-0ff3-a1abca63ec5f} + + {8d96203b-d3ce-2164-74a6-06e0ff2b09af} - - {d34e8821-f67b-a793-3419-e2781ab9b3ee} + + {5ec5476e-3d72-e3f9-4f05-3f7c31c13651} - - {11feb184-a1d9-5485-26f0-538ddb50deff} + + {a642ac8e-cec2-35d3-9a8a-78313d03b440} + + + {d0204618-0f6a-dbc6-cf41-ffc04e76075a} From 49fb84ab643fd1a676c526482b6e3960046262b9 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 3 Jun 2016 16:34:48 -0700 Subject: [PATCH 0880/1894] rename ChannelState.FatalFailure to ChannelState.Shutdown --- src/csharp/Grpc.Core.Tests/ChannelTest.cs | 6 +++--- src/csharp/Grpc.Core/Channel.cs | 14 +++++++------- src/csharp/Grpc.Core/ChannelState.cs | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/ChannelTest.cs b/src/csharp/Grpc.Core.Tests/ChannelTest.cs index 850d70ce926..db0ef3a4cd3 100644 --- a/src/csharp/Grpc.Core.Tests/ChannelTest.cs +++ b/src/csharp/Grpc.Core.Tests/ChannelTest.cs @@ -71,7 +71,7 @@ namespace Grpc.Core.Tests public void WaitForStateChangedAsync_InvalidArgument() { var channel = new Channel("localhost", ChannelCredentials.Insecure); - Assert.ThrowsAsync(typeof(ArgumentException), async () => await channel.WaitForStateChangedAsync(ChannelState.FatalFailure)); + Assert.ThrowsAsync(typeof(ArgumentException), async () => await channel.WaitForStateChangedAsync(ChannelState.Shutdown)); channel.ShutdownAsync().Wait(); } @@ -102,11 +102,11 @@ namespace Grpc.Core.Tests } [Test] - public async Task StateIsFatalFailureAfterShutdown() + public async Task StateIsShutdownAfterShutdown() { var channel = new Channel("localhost", ChannelCredentials.Insecure); await channel.ShutdownAsync(); - Assert.AreEqual(ChannelState.FatalFailure, channel.State); + Assert.AreEqual(ChannelState.Shutdown, channel.State); } [Test] diff --git a/src/csharp/Grpc.Core/Channel.cs b/src/csharp/Grpc.Core/Channel.cs index 886adfec334..2ec763bec15 100644 --- a/src/csharp/Grpc.Core/Channel.cs +++ b/src/csharp/Grpc.Core/Channel.cs @@ -104,7 +104,7 @@ namespace Grpc.Core /// /// Gets current connectivity state of this channel. - /// After channel is has been shutdown, ChannelState.FatalFailure will be returned. + /// After channel is has been shutdown, ChannelState.Shutdown will be returned. /// public ChannelState State { @@ -121,8 +121,8 @@ namespace Grpc.Core /// public Task WaitForStateChangedAsync(ChannelState lastObservedState, DateTime? deadline = null) { - GrpcPreconditions.CheckArgument(lastObservedState != ChannelState.FatalFailure, - "FatalFailure is a terminal state. No further state changes can occur."); + GrpcPreconditions.CheckArgument(lastObservedState != ChannelState.Shutdown, + "Shutdown is a terminal state. No further state changes can occur."); var tcs = new TaskCompletionSource(); var deadlineTimespec = deadline.HasValue ? Timespec.FromDateTime(deadline.Value) : Timespec.InfFuture; var handler = new BatchCompletionDelegate((success, ctx) => @@ -172,7 +172,7 @@ namespace Grpc.Core /// /// Allows explicitly requesting channel to connect without starting an RPC. /// Returned task completes once state Ready was seen. If the deadline is reached, - /// or channel enters the FatalFailure state, the task is cancelled. + /// or channel enters the Shutdown state, the task is cancelled. /// There is no need to call this explicitly unless your use case requires that. /// Starting an RPC on a new channel will request connection implicitly. /// @@ -182,9 +182,9 @@ namespace Grpc.Core var currentState = GetConnectivityState(true); while (currentState != ChannelState.Ready) { - if (currentState == ChannelState.FatalFailure) + if (currentState == ChannelState.Shutdown) { - throw new OperationCanceledException("Channel has reached FatalFailure state."); + throw new OperationCanceledException("Channel has reached Shutdown state."); } await WaitForStateChangedAsync(currentState, deadline).ConfigureAwait(false); currentState = GetConnectivityState(false); @@ -264,7 +264,7 @@ namespace Grpc.Core } catch (ObjectDisposedException) { - return ChannelState.FatalFailure; + return ChannelState.Shutdown; } } diff --git a/src/csharp/Grpc.Core/ChannelState.cs b/src/csharp/Grpc.Core/ChannelState.cs index d293b98f753..a6c3b2a4889 100644 --- a/src/csharp/Grpc.Core/ChannelState.cs +++ b/src/csharp/Grpc.Core/ChannelState.cs @@ -64,6 +64,6 @@ namespace Grpc.Core /// /// Channel has seen a failure that it cannot recover from /// - FatalFailure + Shutdown } } From e1bee5bd599396aa3c1171ef2b5af20deff58ee5 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 3 Jun 2016 16:41:50 -0700 Subject: [PATCH 0881/1894] improve comments in math.proto --- src/csharp/Grpc.Examples/MathGrpc.cs | 26 +++++++++++++------------- src/proto/math/math.proto | 6 +++--- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/csharp/Grpc.Examples/MathGrpc.cs b/src/csharp/Grpc.Examples/MathGrpc.cs index 9319e311ee6..4bbefcbe01a 100644 --- a/src/csharp/Grpc.Examples/MathGrpc.cs +++ b/src/csharp/Grpc.Examples/MathGrpc.cs @@ -85,8 +85,8 @@ namespace Math { public abstract class MathBase { /// - /// Div divides args.dividend by args.divisor and returns the quotient and - /// remainder. + /// Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient + /// and remainder. /// public virtual global::System.Threading.Tasks.Task Div(global::Math.DivArgs request, ServerCallContext context) { @@ -105,7 +105,7 @@ namespace Math { } /// - /// Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib + /// Fib generates numbers in the Fibonacci sequence. If FibArgs.limit > 0, Fib /// generates up to limit numbers; otherwise it continues until the call is /// canceled. Unlike Fib above, Fib has no final FibReply. /// @@ -144,32 +144,32 @@ namespace Math { } /// - /// Div divides args.dividend by args.divisor and returns the quotient and - /// remainder. + /// Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient + /// and remainder. /// public virtual global::Math.DivReply Div(global::Math.DivArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return Div(request, new CallOptions(headers, deadline, cancellationToken)); } /// - /// Div divides args.dividend by args.divisor and returns the quotient and - /// remainder. + /// Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient + /// and remainder. /// public virtual global::Math.DivReply Div(global::Math.DivArgs request, CallOptions options) { return CallInvoker.BlockingUnaryCall(__Method_Div, null, options, request); } /// - /// Div divides args.dividend by args.divisor and returns the quotient and - /// remainder. + /// Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient + /// and remainder. /// public virtual AsyncUnaryCall DivAsync(global::Math.DivArgs request, Metadata headers = null, DateTime? deadline = null, CancellationToken cancellationToken = default(CancellationToken)) { return DivAsync(request, new CallOptions(headers, deadline, cancellationToken)); } /// - /// Div divides args.dividend by args.divisor and returns the quotient and - /// remainder. + /// Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient + /// and remainder. /// public virtual AsyncUnaryCall DivAsync(global::Math.DivArgs request, CallOptions options) { @@ -196,7 +196,7 @@ namespace Math { return CallInvoker.AsyncDuplexStreamingCall(__Method_DivMany, null, options); } /// - /// Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib + /// Fib generates numbers in the Fibonacci sequence. If FibArgs.limit > 0, Fib /// generates up to limit numbers; otherwise it continues until the call is /// canceled. Unlike Fib above, Fib has no final FibReply. /// @@ -205,7 +205,7 @@ namespace Math { return Fib(request, new CallOptions(headers, deadline, cancellationToken)); } /// - /// Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib + /// Fib generates numbers in the Fibonacci sequence. If FibArgs.limit > 0, Fib /// generates up to limit numbers; otherwise it continues until the call is /// canceled. Unlike Fib above, Fib has no final FibReply. /// diff --git a/src/proto/math/math.proto b/src/proto/math/math.proto index 311e148c021..269c60bde83 100644 --- a/src/proto/math/math.proto +++ b/src/proto/math/math.proto @@ -55,8 +55,8 @@ message FibReply { } service Math { - // Div divides args.dividend by args.divisor and returns the quotient and - // remainder. + // Div divides DivArgs.dividend by DivArgs.divisor and returns the quotient + // and remainder. rpc Div (DivArgs) returns (DivReply) { } @@ -67,7 +67,7 @@ service Math { rpc DivMany (stream DivArgs) returns (stream DivReply) { } - // Fib generates numbers in the Fibonacci sequence. If args.limit > 0, Fib + // Fib generates numbers in the Fibonacci sequence. If FibArgs.limit > 0, Fib // generates up to limit numbers; otherwise it continues until the call is // canceled. Unlike Fib above, Fib has no final FibReply. rpc Fib (FibArgs) returns (stream Num) { From 6acc07d50dd33a63f492084ae035b268324bcff3 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 3 Jun 2016 17:03:30 -0700 Subject: [PATCH 0882/1894] improve the xmldocs on call cancellation and disposal --- src/csharp/Grpc.Core/AsyncDuplexStreamingCall.cs | 4 ++++ src/csharp/Grpc.Core/AsyncServerStreamingCall.cs | 4 ++++ src/csharp/Grpc.Core/AsyncUnaryCall.cs | 4 ++++ src/csharp/Grpc.Core/CallOptions.cs | 8 +++++++- 4 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/csharp/Grpc.Core/AsyncDuplexStreamingCall.cs b/src/csharp/Grpc.Core/AsyncDuplexStreamingCall.cs index e75108c7e57..68fd6d0b05e 100644 --- a/src/csharp/Grpc.Core/AsyncDuplexStreamingCall.cs +++ b/src/csharp/Grpc.Core/AsyncDuplexStreamingCall.cs @@ -117,6 +117,10 @@ namespace Grpc.Core /// Otherwise, requests cancellation of the call which should terminate all pending async operations associated with the call. /// As a result, all resources being used by the call should be released eventually. /// + /// + /// Normally, there is no need for you to dispose the call unless you want to utilize the + /// "Cancel" semantics of invoking Dispose. + /// public void Dispose() { disposeAction.Invoke(); diff --git a/src/csharp/Grpc.Core/AsyncServerStreamingCall.cs b/src/csharp/Grpc.Core/AsyncServerStreamingCall.cs index f9530919848..5777c726152 100644 --- a/src/csharp/Grpc.Core/AsyncServerStreamingCall.cs +++ b/src/csharp/Grpc.Core/AsyncServerStreamingCall.cs @@ -103,6 +103,10 @@ namespace Grpc.Core /// Otherwise, requests cancellation of the call which should terminate all pending async operations associated with the call. /// As a result, all resources being used by the call should be released eventually. /// + /// + /// Normally, there is no need for you to dispose the call unless you want to utilize the + /// "Cancel" semantics of invoking Dispose. + /// public void Dispose() { disposeAction.Invoke(); diff --git a/src/csharp/Grpc.Core/AsyncUnaryCall.cs b/src/csharp/Grpc.Core/AsyncUnaryCall.cs index 97df8f5e91b..d180c27922d 100644 --- a/src/csharp/Grpc.Core/AsyncUnaryCall.cs +++ b/src/csharp/Grpc.Core/AsyncUnaryCall.cs @@ -112,6 +112,10 @@ namespace Grpc.Core /// Otherwise, requests cancellation of the call which should terminate all pending async operations associated with the call. /// As a result, all resources being used by the call should be released eventually. /// + /// + /// Normally, there is no need for you to dispose the call unless you want to utilize the + /// "Cancel" semantics of invoking Dispose. + /// public void Dispose() { disposeAction.Invoke(); diff --git a/src/csharp/Grpc.Core/CallOptions.cs b/src/csharp/Grpc.Core/CallOptions.cs index 9ca88849ee5..35548cfc96b 100644 --- a/src/csharp/Grpc.Core/CallOptions.cs +++ b/src/csharp/Grpc.Core/CallOptions.cs @@ -88,7 +88,13 @@ namespace Grpc.Core } /// - /// Token that can be used for cancelling the call. + /// Token that can be used for cancelling the call on the client side. + /// Cancelling the token will request cancellation + /// of the remote call. Best effort will be made to deliver the cancellation + /// notification to the server and interaction of the call with the server side + /// will be terminated. Unless the call finishes before the cancellation could + /// happen (there is an inherent race), + /// the call will finish with StatusCode.Cancelled status. /// public CancellationToken CancellationToken { From a134fa7036d51e539714fa41b0ec780e084bab46 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 3 Jun 2016 17:24:50 -0700 Subject: [PATCH 0883/1894] improve docs on ShutdownAsync() for servers and channels --- src/csharp/Grpc.Core/Channel.cs | 11 +++++++++-- src/csharp/Grpc.Core/Server.cs | 6 ++++++ 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/csharp/Grpc.Core/Channel.cs b/src/csharp/Grpc.Core/Channel.cs index 2ec763bec15..9cee7526630 100644 --- a/src/csharp/Grpc.Core/Channel.cs +++ b/src/csharp/Grpc.Core/Channel.cs @@ -192,9 +192,16 @@ namespace Grpc.Core } /// - /// Waits until there are no more active calls for this channel and then cleans up - /// resources used by this channel. + /// Shuts down the channel cleanly. It is strongly recommended to shutdown + /// all previously created channels before exiting from the process. /// + /// + /// This method doesn't wait for all calls on this channel to finish (nor does + /// it explicitly cancel all outstanding calls). It is user's responsibility to make sure + /// all the calls on this channel have finished (successfully or with an error) + /// before shutting down the channel to ensure channel shutdown won't impact + /// the outcome of those remote calls. + /// public async Task ShutdownAsync() { lock (myLock) diff --git a/src/csharp/Grpc.Core/Server.cs b/src/csharp/Grpc.Core/Server.cs index 069185e13af..6bd79005617 100644 --- a/src/csharp/Grpc.Core/Server.cs +++ b/src/csharp/Grpc.Core/Server.cs @@ -152,6 +152,9 @@ namespace Grpc.Core /// cleans up used resources. The returned task finishes when shutdown procedure /// is complete. /// + /// + /// It is strongly recommended to shutdown all previously created servers before exiting from the process. + /// public async Task ShutdownAsync() { lock (myLock) @@ -173,6 +176,9 @@ namespace Grpc.Core /// Requests server shutdown while cancelling all the in-progress calls. /// The returned task finishes when shutdown procedure is complete. /// + /// + /// It is strongly recommended to shutdown all previously created servers before exiting from the process. + /// public async Task KillAsync() { lock (myLock) From 2f7f85684c8a4d338f60142754ae6bad4639a3ce Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 6 Jun 2016 13:34:56 -0700 Subject: [PATCH 0884/1894] regenerate projects to fix master --- BUILD | 8 ++++---- Makefile | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/BUILD b/BUILD index d515e961389..fe4b76636d8 100644 --- a/BUILD +++ b/BUILD @@ -566,7 +566,7 @@ cc_library( "src/core/lib/iomgr/sockaddr.h", "src/core/lib/iomgr/sockaddr_posix.h", "src/core/lib/iomgr/sockaddr_utils.h", - "src/core/lib/iomgr/sockaddr_win32.h", + "src/core/lib/iomgr/sockaddr_windows.h", "src/core/lib/iomgr/socket_utils_posix.h", "src/core/lib/iomgr/socket_windows.h", "src/core/lib/iomgr/tcp_client.h", @@ -802,7 +802,7 @@ cc_library( "src/core/lib/security/credentials/credentials_metadata.c", "src/core/lib/security/credentials/fake/fake_credentials.c", "src/core/lib/security/credentials/google_default/credentials_posix.c", - "src/core/lib/security/credentials/google_default/credentials_win32.c", + "src/core/lib/security/credentials/google_default/credentials_windows.c", "src/core/lib/security/credentials/google_default/google_default_credentials.c", "src/core/lib/security/credentials/iam/iam_credentials.c", "src/core/lib/security/credentials/jwt/json_token.c", @@ -841,7 +841,7 @@ cc_library( "include/grpc/impl/codegen/atm.h", "include/grpc/impl/codegen/atm_gcc_atomic.h", "include/grpc/impl/codegen/atm_gcc_sync.h", - "include/grpc/impl/codegen/atm_win32.h", + "include/grpc/impl/codegen/atm_windows.h", "include/grpc/impl/codegen/log.h", "include/grpc/impl/codegen/port_platform.h", "include/grpc/impl/codegen/slice.h", @@ -849,7 +849,7 @@ cc_library( "include/grpc/impl/codegen/sync.h", "include/grpc/impl/codegen/sync_generic.h", "include/grpc/impl/codegen/sync_posix.h", - "include/grpc/impl/codegen/sync_win32.h", + "include/grpc/impl/codegen/sync_windows.h", "include/grpc/impl/codegen/time.h", "include/grpc/grpc_cronet.h", "include/grpc/grpc_security.h", diff --git a/Makefile b/Makefile index a7923ea373e..81f0a605d2b 100644 --- a/Makefile +++ b/Makefile @@ -2872,7 +2872,7 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/security/credentials/credentials_metadata.c \ src/core/lib/security/credentials/fake/fake_credentials.c \ src/core/lib/security/credentials/google_default/credentials_posix.c \ - src/core/lib/security/credentials/google_default/credentials_win32.c \ + src/core/lib/security/credentials/google_default/credentials_windows.c \ src/core/lib/security/credentials/google_default/google_default_credentials.c \ src/core/lib/security/credentials/iam/iam_credentials.c \ src/core/lib/security/credentials/jwt/json_token.c \ @@ -2911,7 +2911,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/atm.h \ include/grpc/impl/codegen/atm_gcc_atomic.h \ include/grpc/impl/codegen/atm_gcc_sync.h \ - include/grpc/impl/codegen/atm_win32.h \ + include/grpc/impl/codegen/atm_windows.h \ include/grpc/impl/codegen/log.h \ include/grpc/impl/codegen/port_platform.h \ include/grpc/impl/codegen/slice.h \ @@ -2919,7 +2919,7 @@ PUBLIC_HEADERS_C += \ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ - include/grpc/impl/codegen/sync_win32.h \ + include/grpc/impl/codegen/sync_windows.h \ include/grpc/impl/codegen/time.h \ include/grpc/grpc_cronet.h \ include/grpc/grpc_security.h \ From d0e4deb8ef30b6364c2f642c4ac7b259a2665780 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 6 Jun 2016 13:35:06 -0700 Subject: [PATCH 0885/1894] Change constness --- src/core/lib/iomgr/error.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index 8143a85dea3..d0a38c7fbd8 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -510,14 +510,14 @@ grpc_error *grpc_os_error(const char *file, int line, int err, #ifdef GPR_WINDOWS grpc_error *grpc_wsa_error(const char *file, int line, int err, const char *call_name) { - char *utf8_message = gpr_format_message(err); + const char *utf8_message = gpr_format_message(err); grpc_error *error = grpc_error_set_str( grpc_error_set_str( grpc_error_set_int(grpc_error_create(file, line, "OS Error", NULL, 0), GRPC_ERROR_INT_WSA_ERROR, err), GRPC_ERROR_STR_OS_ERROR, utf8_message), GRPC_ERROR_STR_SYSCALL, call_name); - gpr_free(utf8_message); + gpr_free((void *)utf8_message); return error; } #endif From 7ae31a88980cba5e7e0173cad91e62dbfe1b0374 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Mon, 6 Jun 2016 14:21:11 -0700 Subject: [PATCH 0886/1894] Add more comments, fix format issues --- .../ext/proto_server_reflection_plugin.h | 10 +++-- src/cpp/ext/proto_server_reflection.cc | 14 ++++--- src/cpp/ext/proto_server_reflection.h | 22 +++++------ src/cpp/ext/proto_server_reflection_plugin.cc | 6 ++- .../proto_reflection_descriptor_database.h | 37 +++++++++++++++---- tools/distrib/check_include_guards.py | 2 + .../clang_format_all_the_things.sh | 2 +- .../sanity/check_sources_and_headers.py | 3 -- 8 files changed, 63 insertions(+), 33 deletions(-) diff --git a/include/grpc++/ext/proto_server_reflection_plugin.h b/include/grpc++/ext/proto_server_reflection_plugin.h index 774d3439e75..517c4737f59 100644 --- a/include/grpc++/ext/proto_server_reflection_plugin.h +++ b/include/grpc++/ext/proto_server_reflection_plugin.h @@ -31,8 +31,8 @@ * */ -#ifndef GRPCXX_PROTO_SERVER_REFLECTION_PLUGIN_H -#define GRPCXX_PROTO_SERVER_REFLECTION_PLUGIN_H +#ifndef GRPCXX_EXT_PROTO_SERVER_REFLECTION_PLUGIN_H +#define GRPCXX_EXT_PROTO_SERVER_REFLECTION_PLUGIN_H #include #include @@ -59,7 +59,11 @@ class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin { std::shared_ptr<::grpc::ProtoServerReflection> reflection_service_; }; +// Add proto reflection plugin to ServerBuilder. This function should be called +// at the static initialization time. +void InitProtoReflectionServerBuilderPlugin(); + } // namespace reflection } // namespace grpc -#endif // GRPCXX_PROTO_SERVER_REFLECTION_PLUGIN_H +#endif // GRPCXX_EXT_PROTO_SERVER_REFLECTION_PLUGIN_H diff --git a/src/cpp/ext/proto_server_reflection.cc b/src/cpp/ext/proto_server_reflection.cc index 6e54bc27207..348a035f0f3 100644 --- a/src/cpp/ext/proto_server_reflection.cc +++ b/src/cpp/ext/proto_server_reflection.cc @@ -131,7 +131,8 @@ Status ProtoServerReflection::GetFileByName( return Status::CANCELLED; } - const protobuf::FileDescriptor* file_desc = descriptor_pool_->FindFileByName(filename); + const protobuf::FileDescriptor* file_desc = + descriptor_pool_->FindFileByName(filename); if (file_desc == nullptr) { return Status(StatusCode::NOT_FOUND, "File not found."); } @@ -170,8 +171,9 @@ Status ProtoServerReflection::GetFileContainingExtension( return Status(StatusCode::NOT_FOUND, "Type not found."); } - const protobuf::FieldDescriptor* field_desc = descriptor_pool_->FindExtensionByNumber( - desc, request->extension_number()); + const protobuf::FieldDescriptor* field_desc = + descriptor_pool_->FindExtensionByNumber(desc, + request->extension_number()); if (field_desc == nullptr) { return Status(StatusCode::NOT_FOUND, "Extension not found."); } @@ -187,7 +189,8 @@ Status ProtoServerReflection::GetAllExtensionNumbers( return Status::CANCELLED; } - const protobuf::Descriptor* desc = descriptor_pool_->FindMessageTypeByName(type); + const protobuf::Descriptor* desc = + descriptor_pool_->FindMessageTypeByName(type); if (desc == nullptr) { return Status(StatusCode::NOT_FOUND, "Type not found."); } @@ -202,7 +205,8 @@ Status ProtoServerReflection::GetAllExtensionNumbers( } void ProtoServerReflection::FillFileDescriptorResponse( - const protobuf::FileDescriptor* file_desc, ServerReflectionResponse* response, + const protobuf::FileDescriptor* file_desc, + ServerReflectionResponse* response, std::unordered_set* seen_files) { if (seen_files->find(file_desc->name()) != seen_files->end()) { return; diff --git a/src/cpp/ext/proto_server_reflection.h b/src/cpp/ext/proto_server_reflection.h index e7ab1fdf346..23c130513d1 100644 --- a/src/cpp/ext/proto_server_reflection.h +++ b/src/cpp/ext/proto_server_reflection.h @@ -30,16 +30,14 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ - -#ifndef GRPC_EXTENSIONS_REFLECTION_PROTO_SERVER_REFLECTION_H -#define GRPC_EXTENSIONS_REFLECTION_PROTO_SERVER_REFLECTION_H +#ifndef GRPC_INTERNAL_CPP_EXT_PROTO_SERVER_REFLECTION_H +#define GRPC_INTERNAL_CPP_EXT_PROTO_SERVER_REFLECTION_H #include #include -#include - #include +#include namespace grpc { @@ -48,21 +46,23 @@ class ProtoServerReflection GRPC_FINAL public: ProtoServerReflection(); + // Add the full names of registered services void SetServiceList(const std::vector* services); + // implementation of ServerReflectionInfo(stream ServerReflectionRequest) rpc + // in ServerReflection service Status ServerReflectionInfo( ServerContext* context, ServerReaderWriter* - stream) GRPC_OVERRIDE; + reflection::v1alpha::ServerReflectionRequest>* stream) + GRPC_OVERRIDE; private: Status ListService(ServerContext* context, reflection::v1alpha::ListServiceResponse* response); - Status GetFileByName( - ServerContext* context, const grpc::string& file_name, - reflection::v1alpha::ServerReflectionResponse* response); + Status GetFileByName(ServerContext* context, const grpc::string& file_name, + reflection::v1alpha::ServerReflectionResponse* response); Status GetFileContainingSymbol( ServerContext* context, const grpc::string& symbol, @@ -91,4 +91,4 @@ class ProtoServerReflection GRPC_FINAL } // namespace grpc -#endif // GRPC_EXTENSIONS_REFLECTION_PROTO_SERVER_REFLECTION_H +#endif // GRPC_INTERNAL_CPP_EXT_PROTO_SERVER_REFLECTION_H diff --git a/src/cpp/ext/proto_server_reflection_plugin.cc b/src/cpp/ext/proto_server_reflection_plugin.cc index becc9493595..f31d102a9e6 100644 --- a/src/cpp/ext/proto_server_reflection_plugin.cc +++ b/src/cpp/ext/proto_server_reflection_plugin.cc @@ -78,16 +78,18 @@ static std::unique_ptr<::grpc::ServerBuilderPlugin> CreateProtoReflection() { new ProtoServerReflectionPlugin()); } -static void AddProtoReflectionServerBuilderPlugin() { +void InitProtoReflectionServerBuilderPlugin() { static bool already_here = false; if (already_here) return; already_here = true; ::grpc::ServerBuilder::InternalAddPluginFactory(&CreateProtoReflection); } +// Force InitProtoReflectionServerBuilderPlugin() to be called at static +// initialization time. struct StaticProtoReflectionPluginInitializer { StaticProtoReflectionPluginInitializer() { - AddProtoReflectionServerBuilderPlugin(); + InitProtoReflectionServerBuilderPlugin(); } } static_proto_reflection_plugin_initializer; diff --git a/test/cpp/util/proto_reflection_descriptor_database.h b/test/cpp/util/proto_reflection_descriptor_database.h index d7b2163ceaf..99c00675bb3 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.h +++ b/test/cpp/util/proto_reflection_descriptor_database.h @@ -30,6 +30,8 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ +#ifndef GRPC_TEST_CPP_PROTO_SERVER_REFLECTION_DATABSE_H +#define GRPC_TEST_CPP_PROTO_SERVER_REFLECTION_DATABSE_H #include #include @@ -39,11 +41,14 @@ #include #include #include -#include #include +#include namespace grpc { +// ProtoReflectionDescriptorDatabase takes a stub of ServerReflection and +// provides the methods defined by DescriptorDatabase interfaces. It can be used +// to feed a DescriptorPool instance. class ProtoReflectionDescriptorDatabase : public google::protobuf::DescriptorDatabase { public: @@ -55,28 +60,42 @@ class ProtoReflectionDescriptorDatabase virtual ~ProtoReflectionDescriptorDatabase(); - // DescriptorDatabase methods + // The following four methods implement DescriptorDatabase interfaces. + // + // Find a file by file name. Fills in in *output and returns true if found. + // Otherwise, returns false, leaving the contents of *output undefined. bool FindFileByName(const string& filename, google::protobuf::FileDescriptorProto* output) GRPC_OVERRIDE; + // Find the file that declares the given fully-qualified symbol name. + // If found, fills in *output and returns true, otherwise returns false + // and leaves *output undefined. bool FindFileContainingSymbol(const string& symbol_name, google::protobuf::FileDescriptorProto* output) GRPC_OVERRIDE; + // Find the file which defines an extension extending the given message type + // with the given field number. If found, fills in *output and returns true, + // otherwise returns false and leaves *output undefined. containing_type + // must be a fully-qualified type name. bool FindFileContainingExtension( const string& containing_type, int field_number, google::protobuf::FileDescriptorProto* output) GRPC_OVERRIDE; + // Finds the tag numbers used by all known extensions of + // extendee_type, and appends them to output in an undefined + // order. This method is best-effort: it's not guaranteed that the + // database will find all extensions, and it's not guaranteed that + // FindFileContainingExtension will return true on all of the found + // numbers. Returns true if the search was successful, otherwise + // returns false and leaves output unchanged. bool FindAllExtensionNumbers(const string& extendee_type, std::vector* output) GRPC_OVERRIDE; + // Provide a list of full names of registered services bool GetServices(std::vector* output); - grpc::reflection::v1alpha::ServerReflection::Stub* stub() { - return stub_.get(); - } - private: typedef ClientReaderWriter< grpc::reflection::v1alpha::ServerReflectionRequest, @@ -92,8 +111,8 @@ class ProtoReflectionDescriptorDatabase const std::shared_ptr GetStream(); void DoOneRequest( - const grpc::reflection::v1alpha::ServerReflectionRequest& request, - grpc::reflection::v1alpha::ServerReflectionResponse& response); + const grpc::reflection::v1alpha::ServerReflectionRequest& request, + grpc::reflection::v1alpha::ServerReflectionResponse& response); std::shared_ptr stream_; grpc::ClientContext ctx_; @@ -108,3 +127,5 @@ class ProtoReflectionDescriptorDatabase }; } // namespace grpc + +#endif // GRPC_TEST_CPP_METRICS_SERVER_H diff --git a/tools/distrib/check_include_guards.py b/tools/distrib/check_include_guards.py index 9c23a70e001..874ddfe53a1 100755 --- a/tools/distrib/check_include_guards.py +++ b/tools/distrib/check_include_guards.py @@ -171,6 +171,8 @@ args = argp.parse_args() KNOWN_BAD = set([ 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h', + 'include/grpc++/ext/reflection.grpc.pb.h', + 'include/grpc++/ext/reflection.pb.h', ]) diff --git a/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh b/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh index 6f4155944c3..eab7611b3f3 100755 --- a/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh +++ b/tools/dockerfile/grpc_clang_format/clang_format_all_the_things.sh @@ -44,7 +44,7 @@ for dir in $DIRS do for glob in $GLOB do - files="$files `find /local-code/$dir -name $glob -and -not -name *.generated.* -and -not -name *.pb.h -and -not -name *.pb.c`" + files="$files `find /local-code/$dir -name $glob -and -not -name *.generated.* -and -not -name *.pb.h -and -not -name *.pb.c -and -not -name *.pb.cc`" done done diff --git a/tools/run_tests/sanity/check_sources_and_headers.py b/tools/run_tests/sanity/check_sources_and_headers.py index 0eb804eb5b0..c028499ca63 100755 --- a/tools/run_tests/sanity/check_sources_and_headers.py +++ b/tools/run_tests/sanity/check_sources_and_headers.py @@ -57,9 +57,6 @@ def target_has_header(target, name): return True if name == 'src/core/lib/profiling/stap_probes.h': return True - if not name.startswith('extensions') \ - and target_has_header(target, 'extensions/' + name): - return True return False def produces_object(name): From c4d5112719f90b6948d0b8295164bb058bfeea3d Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 6 Jun 2016 14:56:02 -0700 Subject: [PATCH 0887/1894] moar renamings --- src/core/ext/lb_policy/pick_first/pick_first.c | 10 +++++----- .../ext/lb_policy/round_robin/round_robin.c | 8 ++++---- src/core/lib/http/httpcli.c | 4 ++-- src/core/lib/iomgr/polling_entity.c | 14 +++++++------- src/core/lib/iomgr/polling_entity.h | 14 +++++++------- .../google_default_credentials.c | 12 ++++++------ .../security/credentials/jwt/jwt_verifier.c | 2 +- src/core/lib/surface/call.c | 10 +++++----- src/core/lib/transport/transport.c | 4 ++-- test/core/http/httpcli_test.c | 14 +++++++------- test/core/http/httpscli_test.c | 14 +++++++------- test/core/security/oauth2_utils.c | 10 +++++----- .../print_google_default_creds_token.c | 8 ++++---- test/core/util/port_server_client.c | 18 +++++++++--------- 14 files changed, 71 insertions(+), 71 deletions(-) diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c index d428d41a623..103f091709a 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -118,7 +118,7 @@ static void pf_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { while (pp != NULL) { pending_pick *next = pp->next; *pp->target = NULL; - grpc_pops_del_to_pollset_set(exec_ctx, pp->pollent, + grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, p->base.interested_parties); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); gpr_free(pp); @@ -136,7 +136,7 @@ static void pf_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, while (pp != NULL) { pending_pick *next = pp->next; if (pp->target == target) { - grpc_pops_del_to_pollset_set(exec_ctx, pp->pollent, + grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, p->base.interested_parties); *target = NULL; grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); @@ -162,7 +162,7 @@ static void pf_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, pending_pick *next = pp->next; if ((pp->initial_metadata_flags & initial_metadata_flags_mask) == initial_metadata_flags_eq) { - grpc_pops_del_to_pollset_set(exec_ctx, pp->pollent, + grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, p->base.interested_parties); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); gpr_free(pp); @@ -222,7 +222,7 @@ static int pf_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, if (!p->started_picking) { start_picking(exec_ctx, p); } - grpc_pops_add_to_pollset_set(exec_ctx, pollent, p->base.interested_parties); + grpc_polling_entity_add_to_pollset_set(exec_ctx, pollent, p->base.interested_parties); pp = gpr_malloc(sizeof(*pp)); pp->next = p->pending_picks; pp->pollent = pollent; @@ -305,7 +305,7 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, while ((pp = p->pending_picks)) { p->pending_picks = pp->next; *pp->target = selected; - grpc_pops_del_to_pollset_set(exec_ctx, pp->pollent, + grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, p->base.interested_parties); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); gpr_free(pp); diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index e706a8ddd90..f58b2e41df2 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -262,7 +262,7 @@ static void rr_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, while (pp != NULL) { pending_pick *next = pp->next; if (pp->target == target) { - grpc_pops_del_to_pollset_set(exec_ctx, pp->pollent, + grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, p->base.interested_parties); *target = NULL; grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); @@ -288,7 +288,7 @@ static void rr_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, pending_pick *next = pp->next; if ((pp->initial_metadata_flags & initial_metadata_flags_mask) == initial_metadata_flags_eq) { - grpc_pops_del_to_pollset_set(exec_ctx, pp->pollent, + grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, p->base.interested_parties); *pp->target = NULL; grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); @@ -355,7 +355,7 @@ static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, if (!p->started_picking) { start_picking(exec_ctx, p); } - grpc_pops_add_to_pollset_set(exec_ctx, pollent, p->base.interested_parties); + grpc_polling_entity_add_to_pollset_set(exec_ctx, pollent, p->base.interested_parties); pp = gpr_malloc(sizeof(*pp)); pp->next = p->pending_picks; pp->pollent = pollent; @@ -407,7 +407,7 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, "[RR CONN CHANGED] TARGET <-- SUBCHANNEL %p (NODE %p)", selected->subchannel, selected); } - grpc_pops_del_to_pollset_set(exec_ctx, pp->pollent, + grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, p->base.interested_parties); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); gpr_free(pp); diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index 5e7c3267f2e..d49f020038e 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -97,7 +97,7 @@ static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req); static void finish(grpc_exec_ctx *exec_ctx, internal_request *req, int success) { - grpc_pops_del_to_pollset_set(exec_ctx, req->pollent, + grpc_polling_entity_del_from_pollset_set(exec_ctx, req->pollent, req->context->pollset_set); req->on_response(exec_ctx, req->user_data, success ? &req->parser.http.response : NULL); @@ -245,7 +245,7 @@ static void internal_request_begin( req->ssl_host_override = gpr_strdup(request->ssl_host_override); GPR_ASSERT(pollent); - grpc_pops_add_to_pollset_set(exec_ctx, req->pollent, + grpc_polling_entity_add_to_pollset_set(exec_ctx, req->pollent, req->context->pollset_set); grpc_resolve_address(exec_ctx, request->host, req->handshaker->default_port, on_resolved, req); diff --git a/src/core/lib/iomgr/polling_entity.c b/src/core/lib/iomgr/polling_entity.c index effe1a33ee7..45d7dccafa0 100644 --- a/src/core/lib/iomgr/polling_entity.c +++ b/src/core/lib/iomgr/polling_entity.c @@ -36,7 +36,7 @@ #include "src/core/lib/iomgr/polling_entity.h" -grpc_polling_entity grpc_pops_create_from_pollset_set( +grpc_polling_entity grpc_polling_entity_create_from_pollset_set( grpc_pollset_set *pollset_set) { grpc_polling_entity pollent; pollent.pollent.pollset_set = pollset_set; @@ -44,32 +44,32 @@ grpc_polling_entity grpc_pops_create_from_pollset_set( return pollent; } -grpc_polling_entity grpc_pops_create_from_pollset(grpc_pollset *pollset) { +grpc_polling_entity grpc_polling_entity_create_from_pollset(grpc_pollset *pollset) { grpc_polling_entity pollent; pollent.pollent.pollset = pollset; pollent.tag = POPS_POLLSET; return pollent; } -grpc_pollset *grpc_pops_pollset(grpc_polling_entity *pollent) { +grpc_pollset *grpc_polling_entity_pollset(grpc_polling_entity *pollent) { if (pollent->tag == POPS_POLLSET) { return pollent->pollent.pollset; } return NULL; } -grpc_pollset_set *grpc_pops_pollset_set(grpc_polling_entity *pollent) { +grpc_pollset_set *grpc_polling_entity_pollset_set(grpc_polling_entity *pollent) { if (pollent->tag == POPS_POLLSET_SET) { return pollent->pollent.pollset_set; } return NULL; } -bool grpc_pops_is_empty(const grpc_polling_entity *pollent) { +bool grpc_polling_entity_is_empty(const grpc_polling_entity *pollent) { return pollent->tag == POPS_NONE; } -void grpc_pops_add_to_pollset_set(grpc_exec_ctx *exec_ctx, +void grpc_polling_entity_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_polling_entity *pollent, grpc_pollset_set *pss_dst) { if (pollent->tag == POPS_POLLSET) { @@ -85,7 +85,7 @@ void grpc_pops_add_to_pollset_set(grpc_exec_ctx *exec_ctx, } } -void grpc_pops_del_to_pollset_set(grpc_exec_ctx *exec_ctx, +void grpc_polling_entity_del_from_pollset_set(grpc_exec_ctx *exec_ctx, grpc_polling_entity *pollent, grpc_pollset_set *pss_dst) { if (pollent->tag == POPS_POLLSET) { diff --git a/src/core/lib/iomgr/polling_entity.h b/src/core/lib/iomgr/polling_entity.h index c72b292ffe6..1750e28eb10 100644 --- a/src/core/lib/iomgr/polling_entity.h +++ b/src/core/lib/iomgr/polling_entity.h @@ -50,29 +50,29 @@ typedef struct grpc_polling_entity { enum pops_tag { POPS_NONE, POPS_POLLSET, POPS_POLLSET_SET } tag; } grpc_polling_entity; -grpc_polling_entity grpc_pops_create_from_pollset_set( +grpc_polling_entity grpc_polling_entity_create_from_pollset_set( grpc_pollset_set *pollset_set); -grpc_polling_entity grpc_pops_create_from_pollset(grpc_pollset *pollset); +grpc_polling_entity grpc_polling_entity_create_from_pollset(grpc_pollset *pollset); /** If \a pollent contains a pollset, return it. Otherwise, return NULL */ -grpc_pollset *grpc_pops_pollset(grpc_polling_entity *pollent); +grpc_pollset *grpc_polling_entity_pollset(grpc_polling_entity *pollent); /** If \a pollent contains a pollset_set, return it. Otherwise, return NULL */ -grpc_pollset_set *grpc_pops_pollset_set(grpc_polling_entity *pollent); +grpc_pollset_set *grpc_polling_entity_pollset_set(grpc_polling_entity *pollent); -bool grpc_pops_is_empty(const grpc_polling_entity *pollent); +bool grpc_polling_entity_is_empty(const grpc_polling_entity *pollent); /** Add the pollset or pollset_set in \a pollent to the destination pollset_set * \a * pss_dst */ -void grpc_pops_add_to_pollset_set(grpc_exec_ctx *exec_ctx, +void grpc_polling_entity_add_to_pollset_set(grpc_exec_ctx *exec_ctx, grpc_polling_entity *pollent, grpc_pollset_set *pss_dst); /** Delete the pollset or pollset_set in \a pollent from the destination * pollset_set \a * pss_dst */ -void grpc_pops_del_to_pollset_set(grpc_exec_ctx *exec_ctx, +void grpc_polling_entity_del_from_pollset_set(grpc_exec_ctx *exec_ctx, grpc_polling_entity *pollent, grpc_pollset_set *pss_dst); /* pollset_set specific */ diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.c b/src/core/lib/security/credentials/google_default/google_default_credentials.c index ef21c24a6c8..84d5bd3395c 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.c +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.c @@ -87,7 +87,7 @@ static void on_compute_engine_detection_http_response( } gpr_mu_lock(g_polling_mu); detector->is_done = 1; - grpc_pollset_kick(grpc_pops_pollset(&detector->pollent), NULL); + grpc_pollset_kick(grpc_polling_entity_pollset(&detector->pollent), NULL); gpr_mu_unlock(g_polling_mu); } @@ -108,7 +108,7 @@ static int is_stack_running_on_compute_engine(void) { grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(pollset, &g_polling_mu); - detector.pollent = grpc_pops_create_from_pollset(pollset); + detector.pollent = grpc_polling_entity_create_from_pollset(pollset); detector.is_done = 0; detector.success = 0; @@ -130,7 +130,7 @@ static int is_stack_running_on_compute_engine(void) { gpr_mu_lock(g_polling_mu); while (!detector.is_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&detector.pollent), &worker, + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&detector.pollent), &worker, gpr_now(GPR_CLOCK_MONOTONIC), gpr_inf_future(GPR_CLOCK_MONOTONIC)); } @@ -138,13 +138,13 @@ static int is_stack_running_on_compute_engine(void) { grpc_httpcli_context_destroy(&context); grpc_closure_init(&destroy_closure, destroy_pollset, - grpc_pops_pollset(&detector.pollent)); - grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(&detector.pollent), + grpc_polling_entity_pollset(&detector.pollent)); + grpc_pollset_shutdown(&exec_ctx, grpc_polling_entity_pollset(&detector.pollent), &destroy_closure); grpc_exec_ctx_finish(&exec_ctx); g_polling_mu = NULL; - gpr_free(grpc_pops_pollset(&detector.pollent)); + gpr_free(grpc_polling_entity_pollset(&detector.pollent)); return detector.success; } diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.c b/src/core/lib/security/credentials/jwt/jwt_verifier.c index c56715e55af..1f67db103c1 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.c +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.c @@ -342,7 +342,7 @@ static verifier_cb_ctx *verifier_cb_ctx_create( verifier_cb_ctx *ctx = gpr_malloc(sizeof(verifier_cb_ctx)); memset(ctx, 0, sizeof(verifier_cb_ctx)); ctx->verifier = verifier; - ctx->pollent = grpc_pops_create_from_pollset(pollset); + ctx->pollent = grpc_polling_entity_create_from_pollset(pollset); ctx->header = header; ctx->audience = gpr_strdup(audience); ctx->claims = claims; diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index decc37ef43b..908f90244ef 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -289,12 +289,12 @@ grpc_call *grpc_call_create( pollset_set_alternative == NULL && "Only one of 'cq' and 'pollset_set_alternative' should be non-NULL."); GRPC_CQ_INTERNAL_REF(cq, "bind"); - call->pollent = grpc_pops_create_from_pollset(grpc_cq_pollset(cq)); + call->pollent = grpc_polling_entity_create_from_pollset(grpc_cq_pollset(cq)); } if (pollset_set_alternative != NULL) { - call->pollent = grpc_pops_create_from_pollset_set(pollset_set_alternative); + call->pollent = grpc_polling_entity_create_from_pollset_set(pollset_set_alternative); } - if (!grpc_pops_is_empty(&call->pollent)) { + if (!grpc_polling_entity_is_empty(&call->pollent)) { grpc_call_stack_set_pollset_or_pollset_set( &exec_ctx, CALL_STACK_FROM_CALL(call), &call->pollent); } @@ -352,13 +352,13 @@ void grpc_call_set_completion_queue(grpc_exec_ctx *exec_ctx, grpc_call *call, grpc_completion_queue *cq) { GPR_ASSERT(cq); - if (grpc_pops_pollset_set(&call->pollent) != NULL) { + if (grpc_polling_entity_pollset_set(&call->pollent) != NULL) { gpr_log(GPR_ERROR, "A pollset_set is already registered for this call."); abort(); } call->cq = cq; GRPC_CQ_INTERNAL_REF(cq, "bind"); - call->pollent = grpc_pops_create_from_pollset(grpc_cq_pollset(cq)); + call->pollent = grpc_polling_entity_create_from_pollset(grpc_cq_pollset(cq)); grpc_call_stack_set_pollset_or_pollset_set( exec_ctx, CALL_STACK_FROM_CALL(call), &call->pollent); } diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c index 7449b16e20b..b65e157a02a 100644 --- a/src/core/lib/transport/transport.c +++ b/src/core/lib/transport/transport.c @@ -130,9 +130,9 @@ void grpc_transport_set_pops(grpc_exec_ctx *exec_ctx, grpc_transport *transport, grpc_polling_entity *pollent) { grpc_pollset *pollset; grpc_pollset_set *pollset_set; - if ((pollset = grpc_pops_pollset(pollent)) != NULL) { + if ((pollset = grpc_polling_entity_pollset(pollent)) != NULL) { transport->vtable->set_pollset(exec_ctx, transport, stream, pollset); - } else if ((pollset_set = grpc_pops_pollset_set(pollent)) != NULL) { + } else if ((pollset_set = grpc_polling_entity_pollset_set(pollent)) != NULL) { transport->vtable->set_pollset_set(exec_ctx, transport, stream, pollset_set); } else { diff --git a/test/core/http/httpcli_test.c b/test/core/http/httpcli_test.c index 0e6eebb4e97..e61975e2504 100644 --- a/test/core/http/httpcli_test.c +++ b/test/core/http/httpcli_test.c @@ -66,7 +66,7 @@ static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, GPR_ASSERT(0 == memcmp(expect, response->body, response->body_length)); gpr_mu_lock(g_mu); g_done = 1; - grpc_pollset_kick(grpc_pops_pollset(&g_pops), NULL); + grpc_pollset_kick(grpc_polling_entity_pollset(&g_pops), NULL); gpr_mu_unlock(g_mu); } @@ -91,7 +91,7 @@ static void test_get(int port) { gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&g_pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&g_pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); @@ -122,7 +122,7 @@ static void test_post(int port) { gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&g_pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&g_pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); @@ -133,7 +133,7 @@ static void test_post(int port) { } static void destroy_pops(grpc_exec_ctx *exec_ctx, void *p, bool success) { - grpc_pollset_destroy(grpc_pops_pollset(p)); + grpc_pollset_destroy(grpc_polling_entity_pollset(p)); } int main(int argc, char **argv) { @@ -182,18 +182,18 @@ int main(int argc, char **argv) { grpc_httpcli_context_init(&g_context); grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(pollset, &g_mu); - g_pops = grpc_pops_create_from_pollset(pollset); + g_pops = grpc_polling_entity_create_from_pollset(pollset); test_get(port); test_post(port); grpc_httpcli_context_destroy(&g_context); grpc_closure_init(&destroyed, destroy_pops, &g_pops); - grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(&g_pops), &destroyed); + grpc_pollset_shutdown(&exec_ctx, grpc_polling_entity_pollset(&g_pops), &destroyed); grpc_exec_ctx_finish(&exec_ctx); grpc_shutdown(); - gpr_free(grpc_pops_pollset(&g_pops)); + gpr_free(grpc_polling_entity_pollset(&g_pops)); gpr_subprocess_destroy(server); diff --git a/test/core/http/httpscli_test.c b/test/core/http/httpscli_test.c index 3d00766fc2f..90f0b8eeffb 100644 --- a/test/core/http/httpscli_test.c +++ b/test/core/http/httpscli_test.c @@ -66,7 +66,7 @@ static void on_finish(grpc_exec_ctx *exec_ctx, void *arg, GPR_ASSERT(0 == memcmp(expect, response->body, response->body_length)); gpr_mu_lock(g_mu); g_done = 1; - grpc_pollset_kick(grpc_pops_pollset(&g_pops), NULL); + grpc_pollset_kick(grpc_polling_entity_pollset(&g_pops), NULL); gpr_mu_unlock(g_mu); } @@ -92,7 +92,7 @@ static void test_get(int port) { gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&g_pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&g_pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); @@ -124,7 +124,7 @@ static void test_post(int port) { gpr_mu_lock(g_mu); while (!g_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&g_pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&g_pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), n_seconds_time(20)); gpr_mu_unlock(g_mu); grpc_exec_ctx_finish(&exec_ctx); @@ -135,7 +135,7 @@ static void test_post(int port) { } static void destroy_pops(grpc_exec_ctx *exec_ctx, void *p, bool success) { - grpc_pollset_destroy(grpc_pops_pollset(p)); + grpc_pollset_destroy(grpc_polling_entity_pollset(p)); } int main(int argc, char **argv) { @@ -185,18 +185,18 @@ int main(int argc, char **argv) { grpc_httpcli_context_init(&g_context); grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(pollset, &g_mu); - g_pops = grpc_pops_create_from_pollset(pollset); + g_pops = grpc_polling_entity_create_from_pollset(pollset); test_get(port); test_post(port); grpc_httpcli_context_destroy(&g_context); grpc_closure_init(&destroyed, destroy_pops, &g_pops); - grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(&g_pops), &destroyed); + grpc_pollset_shutdown(&exec_ctx, grpc_polling_entity_pollset(&g_pops), &destroyed); grpc_exec_ctx_finish(&exec_ctx); grpc_shutdown(); - gpr_free(grpc_pops_pollset(&g_pops)); + gpr_free(grpc_polling_entity_pollset(&g_pops)); gpr_subprocess_destroy(server); diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c index 5c34feb03d3..a341e33ef6f 100644 --- a/test/core/security/oauth2_utils.c +++ b/test/core/security/oauth2_utils.c @@ -70,7 +70,7 @@ static void on_oauth2_response(grpc_exec_ctx *exec_ctx, void *user_data, gpr_mu_lock(request->mu); request->is_done = 1; request->token = token; - grpc_pollset_kick(grpc_pops_pollset(&request->pops), NULL); + grpc_pollset_kick(grpc_polling_entity_pollset(&request->pops), NULL); gpr_mu_unlock(request->mu); } @@ -85,7 +85,7 @@ char *grpc_test_fetch_oauth2_token_with_credentials( grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(pollset, &request.mu); - request.pops = grpc_pops_create_from_pollset(pollset); + request.pops = grpc_polling_entity_create_from_pollset(pollset); request.is_done = 0; grpc_closure_init(&do_nothing_closure, do_nothing, NULL); @@ -98,15 +98,15 @@ char *grpc_test_fetch_oauth2_token_with_credentials( gpr_mu_lock(request.mu); while (!request.is_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&request.pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&request.pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), gpr_inf_future(GPR_CLOCK_MONOTONIC)); } gpr_mu_unlock(request.mu); - grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(&request.pops), + grpc_pollset_shutdown(&exec_ctx, grpc_polling_entity_pollset(&request.pops), &do_nothing_closure); grpc_exec_ctx_finish(&exec_ctx); - gpr_free(grpc_pops_pollset(&request.pops)); + gpr_free(grpc_polling_entity_pollset(&request.pops)); return request.token; } diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c index 6383883dec1..48defbe25ff 100644 --- a/test/core/security/print_google_default_creds_token.c +++ b/test/core/security/print_google_default_creds_token.c @@ -67,7 +67,7 @@ static void on_metadata_response(grpc_exec_ctx *exec_ctx, void *user_data, } gpr_mu_lock(sync->mu); sync->is_done = 1; - grpc_pollset_kick(grpc_pops_pollset(&sync->pops), NULL); + grpc_pollset_kick(grpc_polling_entity_pollset(&sync->pops), NULL); gpr_mu_unlock(sync->mu); } @@ -96,7 +96,7 @@ int main(int argc, char **argv) { grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(pollset, &sync.mu); - sync.pops = grpc_pops_create_from_pollset(pollset); + sync.pops = grpc_polling_entity_create_from_pollset(pollset); sync.is_done = 0; grpc_call_credentials_get_request_metadata( @@ -106,7 +106,7 @@ int main(int argc, char **argv) { gpr_mu_lock(sync.mu); while (!sync.is_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&sync.pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&sync.pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), gpr_inf_future(GPR_CLOCK_MONOTONIC)); gpr_mu_unlock(sync.mu); @@ -118,7 +118,7 @@ int main(int argc, char **argv) { grpc_exec_ctx_finish(&exec_ctx); grpc_channel_credentials_release(creds); - gpr_free(grpc_pops_pollset(&sync.pops)); + gpr_free(grpc_polling_entity_pollset(&sync.pops)); end: gpr_cmdline_destroy(cl); diff --git a/test/core/util/port_server_client.c b/test/core/util/port_server_client.c index 8326042c2df..f924d553d5f 100644 --- a/test/core/util/port_server_client.c +++ b/test/core/util/port_server_client.c @@ -57,7 +57,7 @@ typedef struct freereq { static void destroy_pops_and_shutdown(grpc_exec_ctx *exec_ctx, void *p, bool success) { - grpc_pollset *pollset = grpc_pops_pollset(p); + grpc_pollset *pollset = grpc_polling_entity_pollset(p); grpc_pollset_destroy(pollset); gpr_free(pollset); grpc_shutdown(); @@ -68,7 +68,7 @@ static void freed_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, freereq *pr = arg; gpr_mu_lock(pr->mu); pr->done = 1; - grpc_pollset_kick(grpc_pops_pollset(&pr->pops), NULL); + grpc_pollset_kick(grpc_polling_entity_pollset(&pr->pops), NULL); gpr_mu_unlock(pr->mu); } @@ -87,7 +87,7 @@ void grpc_free_port_using_server(char *server, int port) { grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(pollset, &pr.mu); - pr.pops = grpc_pops_create_from_pollset(pollset); + pr.pops = grpc_polling_entity_create_from_pollset(pollset); shutdown_closure = grpc_closure_create(destroy_pops_and_shutdown, &pr.pops); req.host = server; @@ -101,7 +101,7 @@ void grpc_free_port_using_server(char *server, int port) { gpr_mu_lock(pr.mu); while (!pr.done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&pr.pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&pr.pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1)); } @@ -109,7 +109,7 @@ void grpc_free_port_using_server(char *server, int port) { grpc_httpcli_context_destroy(&context); grpc_exec_ctx_finish(&exec_ctx); - grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(&pr.pops), + grpc_pollset_shutdown(&exec_ctx, grpc_polling_entity_pollset(&pr.pops), shutdown_closure); grpc_exec_ctx_finish(&exec_ctx); gpr_free(path); @@ -167,7 +167,7 @@ static void got_port_from_server(grpc_exec_ctx *exec_ctx, void *arg, GPR_ASSERT(port > 1024); gpr_mu_lock(pr->mu); pr->port = port; - grpc_pollset_kick(grpc_pops_pollset(&pr->pops), NULL); + grpc_pollset_kick(grpc_polling_entity_pollset(&pr->pops), NULL); gpr_mu_unlock(pr->mu); } @@ -184,7 +184,7 @@ int grpc_pick_port_using_server(char *server) { memset(&req, 0, sizeof(req)); grpc_pollset *pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(pollset, &pr.mu); - pr.pops = grpc_pops_create_from_pollset(pollset); + pr.pops = grpc_polling_entity_create_from_pollset(pollset); shutdown_closure = grpc_closure_create(destroy_pops_and_shutdown, &pr.pops); pr.port = -1; pr.server = server; @@ -201,14 +201,14 @@ int grpc_pick_port_using_server(char *server) { gpr_mu_lock(pr.mu); while (pr.port == -1) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_pops_pollset(&pr.pops), &worker, + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&pr.pops), &worker, gpr_now(GPR_CLOCK_MONOTONIC), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(1)); } gpr_mu_unlock(pr.mu); grpc_httpcli_context_destroy(&context); - grpc_pollset_shutdown(&exec_ctx, grpc_pops_pollset(&pr.pops), + grpc_pollset_shutdown(&exec_ctx, grpc_polling_entity_pollset(&pr.pops), shutdown_closure); grpc_exec_ctx_finish(&exec_ctx); From 85030e31a545b30b84018eab5709aaba412cbbe1 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 31 May 2016 12:48:35 -0700 Subject: [PATCH 0888/1894] register appdomain events --- .../Grpc.Core.Tests/Grpc.Core.Tests.csproj | 1 + .../Grpc.Core.Tests/ShutdownHookTest.cs | 70 +++++++++++++++++++ src/csharp/tests.json | 1 + 3 files changed, 72 insertions(+) create mode 100644 src/csharp/Grpc.Core.Tests/ShutdownHookTest.cs diff --git a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj index 47131fc454e..905e1e7f7e3 100644 --- a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj +++ b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj @@ -86,6 +86,7 @@ + diff --git a/src/csharp/Grpc.Core.Tests/ShutdownHookTest.cs b/src/csharp/Grpc.Core.Tests/ShutdownHookTest.cs new file mode 100644 index 00000000000..04649290777 --- /dev/null +++ b/src/csharp/Grpc.Core.Tests/ShutdownHookTest.cs @@ -0,0 +1,70 @@ +#region Copyright notice and license + +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#endregion + +using System; +using System.Diagnostics; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Grpc.Core; +using Grpc.Core.Internal; +using Grpc.Core.Utils; +using NUnit.Framework; + +namespace Grpc.Core.Tests +{ + public class ShutdownHookTest + { + const string Host = "127.0.0.1"; + + /// + /// Make sure that a non-shutdown channel can be cleaned up using + /// a AppDomain.ProcessExit hook. + /// + [Test] + public void AppDomainProcessExitHook() + { + var channel = new Channel(Host, 1000, ChannelCredentials.Insecure); + AppDomain.CurrentDomain.DomainUnload += (object sender, EventArgs e) => + { + Console.WriteLine("DomainUnload"); + channel.ShutdownAsync(); + }; + AppDomain.CurrentDomain.ProcessExit += (object sender, EventArgs e) => + { + Console.WriteLine("ProcessExit"); + channel.ShutdownAsync(); + }; + } + } +} diff --git a/src/csharp/tests.json b/src/csharp/tests.json index f6af3408d51..9d37c6fc9ed 100644 --- a/src/csharp/tests.json +++ b/src/csharp/tests.json @@ -25,6 +25,7 @@ "Grpc.Core.Tests.ResponseHeadersTest", "Grpc.Core.Tests.SanityTest", "Grpc.Core.Tests.ServerTest", + "Grpc.Core.Tests.ShutdownHookTest", "Grpc.Core.Tests.ShutdownTest", "Grpc.Core.Tests.TimeoutsTest", "Grpc.Core.Tests.UserAgentStringTest" From 5858441a2cbca00b711957b3763b958ea4e43f4f Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 31 May 2016 14:32:27 -0700 Subject: [PATCH 0889/1894] make environment shutdown asynchronous --- .../Grpc.Core.Tests/GrpcEnvironmentTest.cs | 12 ++++++------ .../Internal/CompletionQueueSafeHandleTest.cs | 4 ++-- src/csharp/Grpc.Core.Tests/PInvokeTest.cs | 2 +- src/csharp/Grpc.Core/Channel.cs | 2 +- src/csharp/Grpc.Core/GrpcEnvironment.cs | 18 ++++++++++++------ .../Grpc.Core/Internal/GrpcThreadPool.cs | 13 +++++++++++-- src/csharp/Grpc.Core/Server.cs | 4 ++-- 7 files changed, 35 insertions(+), 20 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/GrpcEnvironmentTest.cs b/src/csharp/Grpc.Core.Tests/GrpcEnvironmentTest.cs index 6fe382751a1..3ec2cf48cde 100644 --- a/src/csharp/Grpc.Core.Tests/GrpcEnvironmentTest.cs +++ b/src/csharp/Grpc.Core.Tests/GrpcEnvironmentTest.cs @@ -49,7 +49,7 @@ namespace Grpc.Core.Tests { Assert.IsNotNull(env.CompletionQueues.ElementAt(i)); } - GrpcEnvironment.Release(); + GrpcEnvironment.ReleaseAsync().Wait(); } [Test] @@ -58,8 +58,8 @@ namespace Grpc.Core.Tests var env1 = GrpcEnvironment.AddRef(); var env2 = GrpcEnvironment.AddRef(); Assert.AreSame(env1, env2); - GrpcEnvironment.Release(); - GrpcEnvironment.Release(); + GrpcEnvironment.ReleaseAsync().Wait(); + GrpcEnvironment.ReleaseAsync().Wait(); } [Test] @@ -68,10 +68,10 @@ namespace Grpc.Core.Tests Assert.AreEqual(0, GrpcEnvironment.GetRefCount()); var env1 = GrpcEnvironment.AddRef(); - GrpcEnvironment.Release(); + GrpcEnvironment.ReleaseAsync().Wait(); var env2 = GrpcEnvironment.AddRef(); - GrpcEnvironment.Release(); + GrpcEnvironment.ReleaseAsync().Wait(); Assert.AreNotSame(env1, env2); } @@ -80,7 +80,7 @@ namespace Grpc.Core.Tests public void ReleaseWithoutAddRef() { Assert.AreEqual(0, GrpcEnvironment.GetRefCount()); - Assert.Throws(typeof(InvalidOperationException), () => GrpcEnvironment.Release()); + Assert.ThrowsAsync(typeof(InvalidOperationException), async () => await GrpcEnvironment.ReleaseAsync()); } [Test] diff --git a/src/csharp/Grpc.Core.Tests/Internal/CompletionQueueSafeHandleTest.cs b/src/csharp/Grpc.Core.Tests/Internal/CompletionQueueSafeHandleTest.cs index 195119f920d..e9ec59eb3db 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/CompletionQueueSafeHandleTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/CompletionQueueSafeHandleTest.cs @@ -48,7 +48,7 @@ namespace Grpc.Core.Internal.Tests GrpcEnvironment.AddRef(); var cq = CompletionQueueSafeHandle.Create(); cq.Dispose(); - GrpcEnvironment.Release(); + GrpcEnvironment.ReleaseAsync().Wait(); } [Test] @@ -59,7 +59,7 @@ namespace Grpc.Core.Internal.Tests cq.Shutdown(); var ev = cq.Next(); cq.Dispose(); - GrpcEnvironment.Release(); + GrpcEnvironment.ReleaseAsync().Wait(); Assert.AreEqual(CompletionQueueEvent.CompletionType.Shutdown, ev.type); Assert.AreNotEqual(IntPtr.Zero, ev.success); Assert.AreEqual(IntPtr.Zero, ev.tag); diff --git a/src/csharp/Grpc.Core.Tests/PInvokeTest.cs b/src/csharp/Grpc.Core.Tests/PInvokeTest.cs index d2b2fc6a661..d3735c78807 100644 --- a/src/csharp/Grpc.Core.Tests/PInvokeTest.cs +++ b/src/csharp/Grpc.Core.Tests/PInvokeTest.cs @@ -65,7 +65,7 @@ namespace Grpc.Core.Tests cq.Dispose(); }); - GrpcEnvironment.Release(); + GrpcEnvironment.ReleaseAsync().Wait(); } /// diff --git a/src/csharp/Grpc.Core/Channel.cs b/src/csharp/Grpc.Core/Channel.cs index 9cee7526630..b58a6a7381b 100644 --- a/src/csharp/Grpc.Core/Channel.cs +++ b/src/csharp/Grpc.Core/Channel.cs @@ -220,7 +220,7 @@ namespace Grpc.Core handle.Dispose(); - await Task.Run(() => GrpcEnvironment.Release()).ConfigureAwait(false); + await GrpcEnvironment.ReleaseAsync().ConfigureAwait(false); } internal ChannelSafeHandle Handle diff --git a/src/csharp/Grpc.Core/GrpcEnvironment.cs b/src/csharp/Grpc.Core/GrpcEnvironment.cs index 18af1099f1b..6e56b6e8e3c 100644 --- a/src/csharp/Grpc.Core/GrpcEnvironment.cs +++ b/src/csharp/Grpc.Core/GrpcEnvironment.cs @@ -35,6 +35,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Runtime.InteropServices; +using System.Threading.Tasks; using Grpc.Core.Internal; using Grpc.Core.Logging; using Grpc.Core.Utils; @@ -79,21 +80,26 @@ namespace Grpc.Core } /// - /// Decrements the reference count for currently active environment and shuts down the gRPC environment if reference count drops to zero. - /// (and blocks until the environment has been fully shutdown). + /// Decrements the reference count for currently active environment and asynchronously shuts down the gRPC environment if reference count drops to zero. /// - internal static void Release() + internal static async Task ReleaseAsync() { + GrpcEnvironment instanceToShutdown = null; lock (staticLock) { GrpcPreconditions.CheckState(refCount > 0); refCount--; if (refCount == 0) { - instance.Close(); + instanceToShutdown = instance; instance = null; } } + + if (instanceToShutdown != null) + { + await instanceToShutdown.ShutdownAsync(); + } } internal static int GetRefCount() @@ -223,13 +229,13 @@ namespace Grpc.Core /// /// Shuts down this environment. /// - private void Close() + private async Task ShutdownAsync() { if (isClosed) { throw new InvalidOperationException("Close has already been called"); } - threadPool.Stop(); + await threadPool.StopAsync().ConfigureAwait(false); GrpcNativeShutdown(); isClosed = true; diff --git a/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs b/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs index 4de543bef7a..f50f2a6e39f 100644 --- a/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs +++ b/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs @@ -35,6 +35,7 @@ using System; using System.Collections.Generic; using System.Linq; using System.Threading; +using System.Threading.Tasks; using Grpc.Core.Logging; using Grpc.Core.Utils; @@ -53,6 +54,8 @@ namespace Grpc.Core.Internal readonly int poolSize; readonly int completionQueueCount; + bool stopRequested; + IReadOnlyCollection completionQueues; /// @@ -84,15 +87,21 @@ namespace Grpc.Core.Internal } } - public void Stop() + public Task StopAsync() { lock (myLock) { + GrpcPreconditions.CheckState(!stopRequested, "Stop already requested."); + stopRequested = true; + foreach (var cq in completionQueues) { cq.Shutdown(); } + } + return Task.Run(() => + { foreach (var thread in threads) { thread.Join(); @@ -102,7 +111,7 @@ namespace Grpc.Core.Internal { cq.Dispose(); } - } + }); } internal IReadOnlyCollection CompletionQueues diff --git a/src/csharp/Grpc.Core/Server.cs b/src/csharp/Grpc.Core/Server.cs index 6bd79005617..18a808e604e 100644 --- a/src/csharp/Grpc.Core/Server.cs +++ b/src/csharp/Grpc.Core/Server.cs @@ -169,7 +169,7 @@ namespace Grpc.Core await shutdownTcs.Task.ConfigureAwait(false); DisposeHandle(); - await Task.Run(() => GrpcEnvironment.Release()).ConfigureAwait(false); + await GrpcEnvironment.ReleaseAsync().ConfigureAwait(false); } /// @@ -194,7 +194,7 @@ namespace Grpc.Core await shutdownTcs.Task.ConfigureAwait(false); DisposeHandle(); - await Task.Run(() => GrpcEnvironment.Release()).ConfigureAwait(false); + await GrpcEnvironment.ReleaseAsync().ConfigureAwait(false); } internal void AddCallReference(object call) From 703c042ec00f1bef0b7e1e62276fe8b7fb36391a Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 31 May 2016 15:46:10 -0700 Subject: [PATCH 0890/1894] serverside shutdown hook test --- .../Grpc.Core.Tests/Grpc.Core.Tests.csproj | 1 + .../Grpc.Core.Tests/ShutdownHookServerTest.cs | 75 +++++++++++++++++++ .../Grpc.Core.Tests/ShutdownHookTest.cs | 13 ++-- .../Grpc.Core/Internal/GrpcThreadPool.cs | 2 +- src/csharp/tests.json | 1 + 5 files changed, 85 insertions(+), 7 deletions(-) create mode 100644 src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs diff --git a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj index 905e1e7f7e3..0a1e8a69380 100644 --- a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj +++ b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj @@ -87,6 +87,7 @@ + diff --git a/src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs b/src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs new file mode 100644 index 00000000000..7990a7d15f1 --- /dev/null +++ b/src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs @@ -0,0 +1,75 @@ +#region Copyright notice and license + +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#endregion + +using System; +using System.Diagnostics; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Grpc.Core; +using Grpc.Core.Internal; +using Grpc.Core.Utils; +using NUnit.Framework; + +namespace Grpc.Core.Tests +{ + public class ShutdownHookServerTest + { + const string Host = "127.0.0.1"; + + /// + /// Make sure that a non-shutdown server can be cleaned up using + /// a AppDomain.ProcessExit hook. + /// + [Test] + public void AppDomainProcessExitHook() + { + var helper = new MockServiceHelper(Host); + var server = helper.GetServer(); + server.Start(); + AppDomain.CurrentDomain.ProcessExit += (object sender, EventArgs e) => + { + // TODO: expose API for killing all servers + // TODO: expose API for closing all channels + server.KillAsync(); + GrpcEnvironment.ReleaseAsync(); + }; + } + + // TODO: test what happens if there's a pending completion in the cq (destroy on non-empty cq) + + // TODO: test what happens if there's an appdomain unload + + // TODO: tests involving a server... + } +} diff --git a/src/csharp/Grpc.Core.Tests/ShutdownHookTest.cs b/src/csharp/Grpc.Core.Tests/ShutdownHookTest.cs index 04649290777..301ae091c61 100644 --- a/src/csharp/Grpc.Core.Tests/ShutdownHookTest.cs +++ b/src/csharp/Grpc.Core.Tests/ShutdownHookTest.cs @@ -55,16 +55,17 @@ namespace Grpc.Core.Tests public void AppDomainProcessExitHook() { var channel = new Channel(Host, 1000, ChannelCredentials.Insecure); - AppDomain.CurrentDomain.DomainUnload += (object sender, EventArgs e) => - { - Console.WriteLine("DomainUnload"); - channel.ShutdownAsync(); - }; AppDomain.CurrentDomain.ProcessExit += (object sender, EventArgs e) => { - Console.WriteLine("ProcessExit"); + // TODO: expose API to shutdown all channels. channel.ShutdownAsync(); }; } + + // TODO: test what happens if there's a pending completion in the cq (destroy on non-empty cq) + + // TODO: test what happens if there's an appdomain unload + + // TODO: tests involving a server... } } diff --git a/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs b/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs index f50f2a6e39f..8643abf5364 100644 --- a/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs +++ b/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs @@ -128,7 +128,7 @@ namespace Grpc.Core.Internal var cq = completionQueues.ElementAt(cqIndex); var thread = new Thread(new ThreadStart(() => RunHandlerLoop(cq))); - thread.IsBackground = false; + thread.IsBackground = true; thread.Name = string.Format("grpc {0} (cq {1})", threadIndex, cqIndex); thread.Start(); diff --git a/src/csharp/tests.json b/src/csharp/tests.json index 9d37c6fc9ed..d80e95a3a4d 100644 --- a/src/csharp/tests.json +++ b/src/csharp/tests.json @@ -25,6 +25,7 @@ "Grpc.Core.Tests.ResponseHeadersTest", "Grpc.Core.Tests.SanityTest", "Grpc.Core.Tests.ServerTest", + "Grpc.Core.Tests.ShutdownHookServerTest", "Grpc.Core.Tests.ShutdownHookTest", "Grpc.Core.Tests.ShutdownTest", "Grpc.Core.Tests.TimeoutsTest", From 4aea5281de1fb5686ae5bb6305e51b704ac57317 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 1 Jun 2016 12:42:54 -0700 Subject: [PATCH 0891/1894] Add ShutdownChannelsAsync api --- src/csharp/Grpc.Core/Channel.cs | 2 ++ src/csharp/Grpc.Core/GrpcEnvironment.cs | 34 +++++++++++++++++++++++++ 2 files changed, 36 insertions(+) diff --git a/src/csharp/Grpc.Core/Channel.cs b/src/csharp/Grpc.Core/Channel.cs index b58a6a7381b..e0fc7180daf 100644 --- a/src/csharp/Grpc.Core/Channel.cs +++ b/src/csharp/Grpc.Core/Channel.cs @@ -88,6 +88,7 @@ namespace Grpc.Core this.handle = ChannelSafeHandle.CreateInsecure(target, nativeChannelArgs); } } + GrpcEnvironment.RegisterChannel(this); } /// @@ -209,6 +210,7 @@ namespace Grpc.Core GrpcPreconditions.CheckState(!shutdownRequested); shutdownRequested = true; } + GrpcEnvironment.UnregisterChannel(this); shutdownTokenSource.Cancel(); diff --git a/src/csharp/Grpc.Core/GrpcEnvironment.cs b/src/csharp/Grpc.Core/GrpcEnvironment.cs index 6e56b6e8e3c..c25022a5d4b 100644 --- a/src/csharp/Grpc.Core/GrpcEnvironment.cs +++ b/src/csharp/Grpc.Core/GrpcEnvironment.cs @@ -54,12 +54,15 @@ namespace Grpc.Core static int refCount; static int? customThreadPoolSize; static int? customCompletionQueueCount; + static readonly HashSet registeredChannels = new HashSet(); static ILogger logger = new ConsoleLogger(); + readonly object myLock = new object(); readonly GrpcThreadPool threadPool; readonly DebugStats debugStats = new DebugStats(); readonly AtomicCounter cqPickerCounter = new AtomicCounter(); + bool isClosed; /// @@ -110,6 +113,37 @@ namespace Grpc.Core } } + internal static void RegisterChannel(Channel channel) + { + lock (staticLock) + { + GrpcPreconditions.CheckNotNull(channel); + registeredChannels.Add(channel); + } + } + + internal static void UnregisterChannel(Channel channel) + { + lock (staticLock) + { + GrpcPreconditions.CheckNotNull(channel); + GrpcPreconditions.CheckArgument(registeredChannels.Remove(channel), "Channel not found in the registered channels set."); + } + } + + /// + /// Requests shutdown of all channels created by the current process. + /// + public static Task ShutdownChannelsAsync() + { + HashSet snapshot = null; + lock (staticLock) + { + snapshot = new HashSet(registeredChannels); + } + return Task.WhenAll(snapshot.Select((channel) => channel.ShutdownAsync())); + } + /// /// Gets application-wide logger used by gRPC. /// From 63386a1064f9b27b0590c1e10f7176a45b0a3f36 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 1 Jun 2016 12:47:46 -0700 Subject: [PATCH 0892/1894] deduplicate server shutdown logic --- src/csharp/Grpc.Core/Server.cs | 57 +++++++++++++++++----------------- 1 file changed, 28 insertions(+), 29 deletions(-) diff --git a/src/csharp/Grpc.Core/Server.cs b/src/csharp/Grpc.Core/Server.cs index 18a808e604e..88045a51c85 100644 --- a/src/csharp/Grpc.Core/Server.cs +++ b/src/csharp/Grpc.Core/Server.cs @@ -155,21 +155,9 @@ namespace Grpc.Core /// /// It is strongly recommended to shutdown all previously created servers before exiting from the process. /// - public async Task ShutdownAsync() + public Task ShutdownAsync() { - lock (myLock) - { - GrpcPreconditions.CheckState(startRequested); - GrpcPreconditions.CheckState(!shutdownRequested); - shutdownRequested = true; - } - - var cq = environment.CompletionQueues.First(); // any cq will do - handle.ShutdownAndNotify(HandleServerShutdown, cq); - await shutdownTcs.Task.ConfigureAwait(false); - DisposeHandle(); - - await GrpcEnvironment.ReleaseAsync().ConfigureAwait(false); + return ShutdownInternalAsync(false); } /// @@ -179,22 +167,9 @@ namespace Grpc.Core /// /// It is strongly recommended to shutdown all previously created servers before exiting from the process. /// - public async Task KillAsync() + public Task KillAsync() { - lock (myLock) - { - GrpcPreconditions.CheckState(startRequested); - GrpcPreconditions.CheckState(!shutdownRequested); - shutdownRequested = true; - } - - var cq = environment.CompletionQueues.First(); // any cq will do - handle.ShutdownAndNotify(HandleServerShutdown, cq); - handle.CancelAllCalls(); - await shutdownTcs.Task.ConfigureAwait(false); - DisposeHandle(); - - await GrpcEnvironment.ReleaseAsync().ConfigureAwait(false); + return ShutdownInternalAsync(true); } internal void AddCallReference(object call) @@ -212,6 +187,30 @@ namespace Grpc.Core activeCallCounter.Decrement(); } + /// + /// Shuts down the server. + /// + private async Task ShutdownInternalAsync(bool kill) + { + lock (myLock) + { + GrpcPreconditions.CheckState(startRequested); + GrpcPreconditions.CheckState(!shutdownRequested); + shutdownRequested = true; + } + + var cq = environment.CompletionQueues.First(); // any cq will do + handle.ShutdownAndNotify(HandleServerShutdown, cq); + if (kill) + { + handle.CancelAllCalls(); + } + await shutdownTcs.Task.ConfigureAwait(false); + DisposeHandle(); + + await GrpcEnvironment.ReleaseAsync().ConfigureAwait(false); + } + /// /// Adds a service definition. /// From 739ee1b159cd0925cbc448c4b95728926f1a0e60 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 1 Jun 2016 14:08:26 -0700 Subject: [PATCH 0893/1894] support GrpcEnvironment.KillServersAsync --- src/csharp/Grpc.Core/GrpcEnvironment.cs | 40 +++++++++++++++++++ .../Grpc.Core/Internal/GrpcThreadPool.cs | 15 +++++++ src/csharp/Grpc.Core/Server.cs | 26 +++++++++++- 3 files changed, 80 insertions(+), 1 deletion(-) diff --git a/src/csharp/Grpc.Core/GrpcEnvironment.cs b/src/csharp/Grpc.Core/GrpcEnvironment.cs index c25022a5d4b..ceaa2ec439a 100644 --- a/src/csharp/Grpc.Core/GrpcEnvironment.cs +++ b/src/csharp/Grpc.Core/GrpcEnvironment.cs @@ -55,6 +55,7 @@ namespace Grpc.Core static int? customThreadPoolSize; static int? customCompletionQueueCount; static readonly HashSet registeredChannels = new HashSet(); + static readonly HashSet registeredServers = new HashSet(); static ILogger logger = new ConsoleLogger(); @@ -131,6 +132,24 @@ namespace Grpc.Core } } + internal static void RegisterServer(Server server) + { + lock (staticLock) + { + GrpcPreconditions.CheckNotNull(server); + registeredServers.Add(server); + } + } + + internal static void UnregisterServer(Server server) + { + lock (staticLock) + { + GrpcPreconditions.CheckNotNull(server); + GrpcPreconditions.CheckArgument(registeredServers.Remove(server), "Server not found in the registered servers set."); + } + } + /// /// Requests shutdown of all channels created by the current process. /// @@ -144,6 +163,19 @@ namespace Grpc.Core return Task.WhenAll(snapshot.Select((channel) => channel.ShutdownAsync())); } + /// + /// Requests immediate shutdown of all servers created by the current process. + /// + public static Task KillServersAsync() + { + HashSet snapshot = null; + lock (staticLock) + { + snapshot = new HashSet(registeredServers); + } + return Task.WhenAll(snapshot.Select((server) => server.KillAsync())); + } + /// /// Gets application-wide logger used by gRPC. /// @@ -220,6 +252,14 @@ namespace Grpc.Core } } + internal bool IsAlive + { + get + { + return this.threadPool.IsAlive; + } + } + /// /// Picks a completion queue in a round-robin fashion. /// Shouldn't be invoked on a per-call basis (used at per-channel basis). diff --git a/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs b/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs index 8643abf5364..a446c1f99f2 100644 --- a/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs +++ b/src/csharp/Grpc.Core/Internal/GrpcThreadPool.cs @@ -114,6 +114,21 @@ namespace Grpc.Core.Internal }); } + /// + /// Returns true if there is at least one thread pool thread that hasn't + /// already stopped. + /// Threads can either stop because all completion queues shut down or + /// because all foreground threads have already shutdown and process is + /// going to exit. + /// + internal bool IsAlive + { + get + { + return threads.Any(t => t.ThreadState != ThreadState.Stopped); + } + } + internal IReadOnlyCollection CompletionQueues { get diff --git a/src/csharp/Grpc.Core/Server.cs b/src/csharp/Grpc.Core/Server.cs index 88045a51c85..e3468ee8420 100644 --- a/src/csharp/Grpc.Core/Server.cs +++ b/src/csharp/Grpc.Core/Server.cs @@ -86,6 +86,7 @@ namespace Grpc.Core { this.handle.RegisterCompletionQueue(cq); } + GrpcEnvironment.RegisterServer(this); } /// @@ -198,6 +199,7 @@ namespace Grpc.Core GrpcPreconditions.CheckState(!shutdownRequested); shutdownRequested = true; } + GrpcEnvironment.UnregisterServer(this); var cq = environment.CompletionQueues.First(); // any cq will do handle.ShutdownAndNotify(HandleServerShutdown, cq); @@ -205,12 +207,34 @@ namespace Grpc.Core { handle.CancelAllCalls(); } - await shutdownTcs.Task.ConfigureAwait(false); + + await ShutdownCompleteOrEnvironmentDeadAsync().ConfigureAwait(false); + DisposeHandle(); await GrpcEnvironment.ReleaseAsync().ConfigureAwait(false); } + /// + /// In case the environment's threadpool becomes dead, the shutdown completion will + /// never be delivered, but we need to release the environment's handle anyway. + /// + private async Task ShutdownCompleteOrEnvironmentDeadAsync() + { + while (true) + { + var task = await Task.WhenAny(shutdownTcs.Task, Task.Delay(20)).ConfigureAwait(false); + if (shutdownTcs.Task == task) + { + return; + } + if (!environment.IsAlive) + { + return; + } + } + } + /// /// Adds a service definition. /// From 25e3ba57b135d75ae1985fc1a94b5c498b8c8a40 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 1 Jun 2016 14:10:29 -0700 Subject: [PATCH 0894/1894] improve shutdown tests --- src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs | 7 +++---- src/csharp/Grpc.Core.Tests/ShutdownHookTest.cs | 4 ++-- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs b/src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs index 7990a7d15f1..2f40e1a8ef2 100644 --- a/src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs +++ b/src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs @@ -59,10 +59,9 @@ namespace Grpc.Core.Tests server.Start(); AppDomain.CurrentDomain.ProcessExit += (object sender, EventArgs e) => { - // TODO: expose API for killing all servers - // TODO: expose API for closing all channels - server.KillAsync(); - GrpcEnvironment.ReleaseAsync(); + var shutdownChannelsTask = GrpcEnvironment.ShutdownChannelsAsync(); + var killServersTask = GrpcEnvironment.KillServersAsync(); + Task.WaitAll(shutdownChannelsTask, killServersTask); }; } diff --git a/src/csharp/Grpc.Core.Tests/ShutdownHookTest.cs b/src/csharp/Grpc.Core.Tests/ShutdownHookTest.cs index 301ae091c61..da71ed7e2ec 100644 --- a/src/csharp/Grpc.Core.Tests/ShutdownHookTest.cs +++ b/src/csharp/Grpc.Core.Tests/ShutdownHookTest.cs @@ -55,10 +55,10 @@ namespace Grpc.Core.Tests public void AppDomainProcessExitHook() { var channel = new Channel(Host, 1000, ChannelCredentials.Insecure); + var channel2 = new Channel(Host, 1001, ChannelCredentials.Insecure); AppDomain.CurrentDomain.ProcessExit += (object sender, EventArgs e) => { - // TODO: expose API to shutdown all channels. - channel.ShutdownAsync(); + GrpcEnvironment.ShutdownChannelsAsync().Wait(); }; } From 018cfb8c14954b8c8b0d137dcd23d5bfc6919738 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 1 Jun 2016 14:44:09 -0700 Subject: [PATCH 0895/1894] update tests --- .../Grpc.Core.Tests/Grpc.Core.Tests.csproj | 3 +- ...nHookTest.cs => ShutdownHookClientTest.cs} | 13 +--- .../ShutdownHookPendingCallTest.cs | 76 +++++++++++++++++++ .../Grpc.Core.Tests/ShutdownHookServerTest.cs | 12 +-- src/csharp/tests.json | 3 +- 5 files changed, 83 insertions(+), 24 deletions(-) rename src/csharp/Grpc.Core.Tests/{ShutdownHookTest.cs => ShutdownHookClientTest.cs} (85%) create mode 100644 src/csharp/Grpc.Core.Tests/ShutdownHookPendingCallTest.cs diff --git a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj index 0a1e8a69380..d6adb5bb81c 100644 --- a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj +++ b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj @@ -86,8 +86,9 @@ - + + diff --git a/src/csharp/Grpc.Core.Tests/ShutdownHookTest.cs b/src/csharp/Grpc.Core.Tests/ShutdownHookClientTest.cs similarity index 85% rename from src/csharp/Grpc.Core.Tests/ShutdownHookTest.cs rename to src/csharp/Grpc.Core.Tests/ShutdownHookClientTest.cs index da71ed7e2ec..32c9d8034a5 100644 --- a/src/csharp/Grpc.Core.Tests/ShutdownHookTest.cs +++ b/src/csharp/Grpc.Core.Tests/ShutdownHookClientTest.cs @@ -43,16 +43,12 @@ using NUnit.Framework; namespace Grpc.Core.Tests { - public class ShutdownHookTest + public class ShutdownHookClientTest { const string Host = "127.0.0.1"; - /// - /// Make sure that a non-shutdown channel can be cleaned up using - /// a AppDomain.ProcessExit hook. - /// [Test] - public void AppDomainProcessExitHook() + public void ProcessExitHookCanCleanupAbandonedChannels() { var channel = new Channel(Host, 1000, ChannelCredentials.Insecure); var channel2 = new Channel(Host, 1001, ChannelCredentials.Insecure); @@ -61,11 +57,6 @@ namespace Grpc.Core.Tests GrpcEnvironment.ShutdownChannelsAsync().Wait(); }; } - - // TODO: test what happens if there's a pending completion in the cq (destroy on non-empty cq) - // TODO: test what happens if there's an appdomain unload - - // TODO: tests involving a server... } } diff --git a/src/csharp/Grpc.Core.Tests/ShutdownHookPendingCallTest.cs b/src/csharp/Grpc.Core.Tests/ShutdownHookPendingCallTest.cs new file mode 100644 index 00000000000..7f3f493a481 --- /dev/null +++ b/src/csharp/Grpc.Core.Tests/ShutdownHookPendingCallTest.cs @@ -0,0 +1,76 @@ +#region Copyright notice and license + +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#endregion + +using System; +using System.Diagnostics; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Grpc.Core; +using Grpc.Core.Internal; +using Grpc.Core.Utils; +using NUnit.Framework; + +namespace Grpc.Core.Tests +{ + public class ShutdownHookPendingCallTest + { + const string Host = "127.0.0.1"; + + [Test] + public void ProcessExitHookCanCleanupAbandonedCall() + { + AppDomain.CurrentDomain.ProcessExit += (object sender, EventArgs e) => + { + var shutdownChannelsTask = GrpcEnvironment.ShutdownChannelsAsync(); + var killServersTask = GrpcEnvironment.KillServersAsync(); + Task.WaitAll(shutdownChannelsTask, killServersTask); + }; + + var helper = new MockServiceHelper(Host); + var server = helper.GetServer(); + server.Start(); + var channel = helper.GetChannel(); + + var readyToShutdown = new TaskCompletionSource(); + helper.DuplexStreamingHandler = new DuplexStreamingServerMethod(async (requestStream, responseStream, context) => + { + readyToShutdown.SetResult(null); + await requestStream.ToListAsync(); + }); + + var call = Calls.AsyncDuplexStreamingCall(helper.CreateDuplexStreamingCall()); + readyToShutdown.Task.Wait(); // make sure handler is running + } + } +} diff --git a/src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs b/src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs index 2f40e1a8ef2..b223f5ee02c 100644 --- a/src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs +++ b/src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs @@ -47,12 +47,8 @@ namespace Grpc.Core.Tests { const string Host = "127.0.0.1"; - /// - /// Make sure that a non-shutdown server can be cleaned up using - /// a AppDomain.ProcessExit hook. - /// [Test] - public void AppDomainProcessExitHook() + public void ProcessExitHookCanCleanupAbandonedServers() { var helper = new MockServiceHelper(Host); var server = helper.GetServer(); @@ -64,11 +60,5 @@ namespace Grpc.Core.Tests Task.WaitAll(shutdownChannelsTask, killServersTask); }; } - - // TODO: test what happens if there's a pending completion in the cq (destroy on non-empty cq) - - // TODO: test what happens if there's an appdomain unload - - // TODO: tests involving a server... } } diff --git a/src/csharp/tests.json b/src/csharp/tests.json index d80e95a3a4d..7a106aa0f92 100644 --- a/src/csharp/tests.json +++ b/src/csharp/tests.json @@ -25,8 +25,9 @@ "Grpc.Core.Tests.ResponseHeadersTest", "Grpc.Core.Tests.SanityTest", "Grpc.Core.Tests.ServerTest", + "Grpc.Core.Tests.ShutdownHookClientTest", + "Grpc.Core.Tests.ShutdownHookPendingCallTest", "Grpc.Core.Tests.ShutdownHookServerTest", - "Grpc.Core.Tests.ShutdownHookTest", "Grpc.Core.Tests.ShutdownTest", "Grpc.Core.Tests.TimeoutsTest", "Grpc.Core.Tests.UserAgentStringTest" From 2f7414117cadca069b85789011ea43a6e262092d Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 1 Jun 2016 16:07:15 -0700 Subject: [PATCH 0896/1894] add appdomain unload test --- .../Grpc.Core.Tests/AppDomainUnloadTest.cs | 97 +++++++++++++++++++ .../Grpc.Core.Tests/Grpc.Core.Tests.csproj | 1 + src/csharp/tests.json | 1 + 3 files changed, 99 insertions(+) create mode 100644 src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs diff --git a/src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs b/src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs new file mode 100644 index 00000000000..60aae0e1e57 --- /dev/null +++ b/src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs @@ -0,0 +1,97 @@ +#region Copyright notice and license + +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#endregion + +using System; +using System.Diagnostics; +using System.Linq; +using System.Reflection; +using System.Threading; +using System.Threading.Tasks; +using Grpc.Core; +using Grpc.Core.Internal; +using Grpc.Core.Utils; +using NUnit.Framework; + +namespace Grpc.Core.Tests +{ + public class AppDomainUnloadTest + { + [Test] + public void AppDomainUnloadHookCanCleanupAbandonedCall() + { + var setup = new AppDomainSetup + { + ApplicationBase = AppDomain.CurrentDomain.BaseDirectory + }; + var childDomain = AppDomain.CreateDomain("test", null, setup); + var remoteObj = childDomain.CreateInstance(typeof(AppDomainTestClass).Assembly.GetName().Name, typeof(AppDomainTestClass).FullName); + + // Try to unload the appdomain once we've created a server and a channel inside the appdomain. + AppDomain.Unload(childDomain); + } + + public class AppDomainTestClass + { + const string Host = "127.0.0.1"; + + /// + /// Creates a server and a channel and initiates a call. The code is invoked from inside of an AppDomain + /// to test if AppDomain.Unload() work if Grpc is being used. + /// + public AppDomainTestClass() + { + AppDomain.CurrentDomain.DomainUnload += (object sender, EventArgs e) => + { + var shutdownChannelsTask = GrpcEnvironment.ShutdownChannelsAsync(); + var killServersTask = GrpcEnvironment.KillServersAsync(); + Task.WaitAll(shutdownChannelsTask, killServersTask); + }; + + var helper = new MockServiceHelper(Host); + var server = helper.GetServer(); + server.Start(); + var channel = helper.GetChannel(); + + var readyToShutdown = new TaskCompletionSource(); + helper.DuplexStreamingHandler = new DuplexStreamingServerMethod(async (requestStream, responseStream, context) => + { + readyToShutdown.SetResult(null); + await requestStream.ToListAsync(); + }); + + var call = Calls.AsyncDuplexStreamingCall(helper.CreateDuplexStreamingCall()); + readyToShutdown.Task.Wait(); // make sure handler is running + } + } + } +} diff --git a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj index d6adb5bb81c..074c9603dcf 100644 --- a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj +++ b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj @@ -89,6 +89,7 @@ + diff --git a/src/csharp/tests.json b/src/csharp/tests.json index 7a106aa0f92..7e7aee1093a 100644 --- a/src/csharp/tests.json +++ b/src/csharp/tests.json @@ -7,6 +7,7 @@ "Grpc.Core.Internal.Tests.CompletionQueueSafeHandleTest", "Grpc.Core.Internal.Tests.MetadataArraySafeHandleTest", "Grpc.Core.Internal.Tests.TimespecTest", + "Grpc.Core.Tests.AppDomainUnloadTest", "Grpc.Core.Tests.CallCredentialsTest", "Grpc.Core.Tests.CallOptionsTest", "Grpc.Core.Tests.ChannelCredentialsTest", From bdccdef0c6f0485f79d68985a46be878c5d26ce8 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 1 Jun 2016 16:29:14 -0700 Subject: [PATCH 0897/1894] autoregister grpc shutdown hooks --- src/csharp/Grpc.Core/GrpcEnvironment.cs | 29 +++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/src/csharp/Grpc.Core/GrpcEnvironment.cs b/src/csharp/Grpc.Core/GrpcEnvironment.cs index ceaa2ec439a..0359d9092a7 100644 --- a/src/csharp/Grpc.Core/GrpcEnvironment.cs +++ b/src/csharp/Grpc.Core/GrpcEnvironment.cs @@ -72,6 +72,8 @@ namespace Grpc.Core /// internal static GrpcEnvironment AddRef() { + ShutdownHooks.Register(); + lock (staticLock) { refCount++; @@ -337,5 +339,32 @@ namespace Grpc.Core // by default, create a completion queue for each thread return GetThreadPoolSizeOrDefault(); } + + private static class ShutdownHooks + { + static object staticLock = new object(); + static bool hooksRegistered; + + public static void Register() + { + lock (staticLock) + { + if (!hooksRegistered) + { + AppDomain.CurrentDomain.ProcessExit += ShutdownHookHandler; + AppDomain.CurrentDomain.DomainUnload += ShutdownHookHandler; + } + hooksRegistered = true; + } + } + + /// + /// Handler for AppDomain.DomainUnload and AppDomain.ProcessExit hooks. + /// + private static void ShutdownHookHandler(object sender, EventArgs e) + { + Task.WaitAll(GrpcEnvironment.ShutdownChannelsAsync(), GrpcEnvironment.KillServersAsync()); + } + } } } From ed5af1c6232ecf67b624d2a75b3960b838801698 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 1 Jun 2016 16:29:37 -0700 Subject: [PATCH 0898/1894] update tests --- src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs | 7 ------- src/csharp/Grpc.Core.Tests/ShutdownHookClientTest.cs | 5 ----- src/csharp/Grpc.Core.Tests/ShutdownHookPendingCallTest.cs | 7 ------- src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs | 6 ------ 4 files changed, 25 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs b/src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs index 60aae0e1e57..e605a310f9e 100644 --- a/src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs +++ b/src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs @@ -70,13 +70,6 @@ namespace Grpc.Core.Tests /// public AppDomainTestClass() { - AppDomain.CurrentDomain.DomainUnload += (object sender, EventArgs e) => - { - var shutdownChannelsTask = GrpcEnvironment.ShutdownChannelsAsync(); - var killServersTask = GrpcEnvironment.KillServersAsync(); - Task.WaitAll(shutdownChannelsTask, killServersTask); - }; - var helper = new MockServiceHelper(Host); var server = helper.GetServer(); server.Start(); diff --git a/src/csharp/Grpc.Core.Tests/ShutdownHookClientTest.cs b/src/csharp/Grpc.Core.Tests/ShutdownHookClientTest.cs index 32c9d8034a5..12b8452f64f 100644 --- a/src/csharp/Grpc.Core.Tests/ShutdownHookClientTest.cs +++ b/src/csharp/Grpc.Core.Tests/ShutdownHookClientTest.cs @@ -52,11 +52,6 @@ namespace Grpc.Core.Tests { var channel = new Channel(Host, 1000, ChannelCredentials.Insecure); var channel2 = new Channel(Host, 1001, ChannelCredentials.Insecure); - AppDomain.CurrentDomain.ProcessExit += (object sender, EventArgs e) => - { - GrpcEnvironment.ShutdownChannelsAsync().Wait(); - }; } - // TODO: test what happens if there's an appdomain unload } } diff --git a/src/csharp/Grpc.Core.Tests/ShutdownHookPendingCallTest.cs b/src/csharp/Grpc.Core.Tests/ShutdownHookPendingCallTest.cs index 7f3f493a481..175233840de 100644 --- a/src/csharp/Grpc.Core.Tests/ShutdownHookPendingCallTest.cs +++ b/src/csharp/Grpc.Core.Tests/ShutdownHookPendingCallTest.cs @@ -50,13 +50,6 @@ namespace Grpc.Core.Tests [Test] public void ProcessExitHookCanCleanupAbandonedCall() { - AppDomain.CurrentDomain.ProcessExit += (object sender, EventArgs e) => - { - var shutdownChannelsTask = GrpcEnvironment.ShutdownChannelsAsync(); - var killServersTask = GrpcEnvironment.KillServersAsync(); - Task.WaitAll(shutdownChannelsTask, killServersTask); - }; - var helper = new MockServiceHelper(Host); var server = helper.GetServer(); server.Start(); diff --git a/src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs b/src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs index b223f5ee02c..e7ea7a0bf59 100644 --- a/src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs +++ b/src/csharp/Grpc.Core.Tests/ShutdownHookServerTest.cs @@ -53,12 +53,6 @@ namespace Grpc.Core.Tests var helper = new MockServiceHelper(Host); var server = helper.GetServer(); server.Start(); - AppDomain.CurrentDomain.ProcessExit += (object sender, EventArgs e) => - { - var shutdownChannelsTask = GrpcEnvironment.ShutdownChannelsAsync(); - var killServersTask = GrpcEnvironment.KillServersAsync(); - Task.WaitAll(shutdownChannelsTask, killServersTask); - }; } } } From ec1588ba87d665cf629a8893d6070688a73ea7ef Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 6 Jun 2016 15:37:45 -0700 Subject: [PATCH 0899/1894] Ruby: Moved completion queue entirely into extension code --- src/ruby/ext/grpc/rb_call.c | 100 ++++++++--------- src/ruby/ext/grpc/rb_completion_queue.c | 83 ++------------ src/ruby/ext/grpc/rb_completion_queue.h | 9 +- src/ruby/ext/grpc/rb_grpc.c | 4 +- src/ruby/ext/grpc/rb_server.c | 138 ++++++++++++------------ 5 files changed, 126 insertions(+), 208 deletions(-) diff --git a/src/ruby/ext/grpc/rb_call.c b/src/ruby/ext/grpc/rb_call.c index b436057c163..f2c567c7da7 100644 --- a/src/ruby/ext/grpc/rb_call.c +++ b/src/ruby/ext/grpc/rb_call.c @@ -63,23 +63,10 @@ static VALUE grpc_rb_sBatchResult; * grpc_metadata_array. */ static VALUE grpc_rb_cMdAry; -/* id_cq is the name of the hidden ivar that preserves a reference to a - * completion queue */ -static ID id_cq; - -/* id_flags is the name of the hidden ivar that preserves the value of - * the flags used to create metadata from a Hash */ -static ID id_flags; - /* id_credentials is the name of the hidden ivar that preserves the value * of the credentials added to the call */ static ID id_credentials; -/* id_input_md is the name of the hidden ivar that preserves the hash used to - * create metadata, so that references to the strings it contains last as long - * as the call the metadata is added to. */ -static ID id_input_md; - /* id_metadata is name of the attribute used to access the metadata hash * received by the call and subsequently saved on it. */ static ID id_metadata; @@ -101,14 +88,23 @@ static VALUE sym_message; static VALUE sym_status; static VALUE sym_cancelled; +typedef struct grpc_rb_call { + grpc_call *wrapped; + grpc_completion_queue *queue; +} grpc_rb_call; + +static void destroy_call(grpc_rb_call *call) { + call = (grpc_rb_call *)p; + grpc_call_destroy(call->wrapped); + grpc_rb_completion_queue_destroy(call->queue); +} + /* Destroys a Call. */ static void grpc_rb_call_destroy(void *p) { - grpc_call* call = NULL; if (p == NULL) { return; } - call = (grpc_call *)p; - grpc_call_destroy(call); + destroy_call((grpc_rb_call*)p); } static size_t md_ary_datasize(const void *p) { @@ -167,15 +163,15 @@ const char *grpc_call_error_detail_of(grpc_call_error err) { /* Called by clients to cancel an RPC on the server. Can be called multiple times, from any thread. */ static VALUE grpc_rb_call_cancel(VALUE self) { - grpc_call *call = NULL; + grpc_rb_call *call = NULL; grpc_call_error err; if (RTYPEDDATA_DATA(self) == NULL) { //This call has been closed return Qnil; } - TypedData_Get_Struct(self, grpc_call, &grpc_call_data_type, call); - err = grpc_call_cancel(call, NULL); + TypedData_Get_Struct(self, grpc_rb_call, &grpc_call_data_type, call); + err = grpc_call_cancel(call->wrapped, NULL); if (err != GRPC_CALL_OK) { rb_raise(grpc_rb_eCallError, "cancel failed: %s (code=%d)", grpc_call_error_detail_of(err), err); @@ -189,10 +185,10 @@ static VALUE grpc_rb_call_cancel(VALUE self) { processed. */ static VALUE grpc_rb_call_close(VALUE self) { - grpc_call *call = NULL; - TypedData_Get_Struct(self, grpc_call, &grpc_call_data_type, call); + grpc_rb_call *call = NULL; + TypedData_Get_Struct(self, grpc_rb_call, &grpc_call_data_type, call); if(call != NULL) { - grpc_call_destroy(call); + destroy_call(call); RTYPEDDATA_DATA(self) = NULL; } return Qnil; @@ -201,14 +197,14 @@ static VALUE grpc_rb_call_close(VALUE self) { /* Called to obtain the peer that this call is connected to. */ static VALUE grpc_rb_call_get_peer(VALUE self) { VALUE res = Qnil; - grpc_call *call = NULL; + grpc_rb_call *call = NULL; char *peer = NULL; if (RTYPEDDATA_DATA(self) == NULL) { rb_raise(grpc_rb_eCallError, "Cannot get peer value on closed call"); return Qnil; } - TypedData_Get_Struct(self, grpc_call, &grpc_call_data_type, call); - peer = grpc_call_get_peer(call); + TypedData_Get_Struct(self, grpc_rb_call, &grpc_call_data_type, call); + peer = grpc_call_get_peer(call->wrapped); res = rb_str_new2(peer); gpr_free(peer); @@ -217,16 +213,16 @@ static VALUE grpc_rb_call_get_peer(VALUE self) { /* Called to obtain the x509 cert of an authenticated peer. */ static VALUE grpc_rb_call_get_peer_cert(VALUE self) { - grpc_call *call = NULL; + grpc_rb_call *call = NULL; VALUE res = Qnil; grpc_auth_context *ctx = NULL; if (RTYPEDDATA_DATA(self) == NULL) { rb_raise(grpc_rb_eCallError, "Cannot get peer cert on closed call"); return Qnil; } - TypedData_Get_Struct(self, grpc_call, &grpc_call_data_type, call); + TypedData_Get_Struct(self, grpc_rb_call, &grpc_call_data_type, call); - ctx = grpc_call_auth_context(call); + ctx = grpc_call_auth_context(call->wrapped); if (!ctx || !grpc_auth_context_peer_is_authenticated(ctx)) { return Qnil; @@ -326,21 +322,23 @@ static VALUE grpc_rb_call_set_write_flag(VALUE self, VALUE write_flag) { Sets credentials on a call */ static VALUE grpc_rb_call_set_credentials(VALUE self, VALUE credentials) { - grpc_call *call = NULL; + grpc_rb_call *call = NULL; grpc_call_credentials *creds; grpc_call_error err; if (RTYPEDDATA_DATA(self) == NULL) { rb_raise(grpc_rb_eCallError, "Cannot set credentials of closed call"); return Qnil; } - TypedData_Get_Struct(self, grpc_call, &grpc_call_data_type, call); + TypedData_Get_Struct(self, grpc_rb_call, &grpc_call_data_type, call); creds = grpc_rb_get_wrapped_call_credentials(credentials); - err = grpc_call_set_credentials(call, creds); + err = grpc_call_set_credentials(call->wrapped, creds); if (err != GRPC_CALL_OK) { rb_raise(grpc_rb_eCallError, "grpc_call_set_credentials failed with %s (code=%d)", grpc_call_error_detail_of(err), err); } + /* We need the credentials to be alive for as long as the call is alive, + but we don't care about destruction order. */ rb_ivar_set(self, id_credentials, credentials); return Qnil; } @@ -733,7 +731,6 @@ static VALUE grpc_run_batch_stack_build_result(run_batch_stack *st) { } /* call-seq: - cq = CompletionQueue.new ops = { GRPC::Core::CallOps::SEND_INITIAL_METADATA => , GRPC::Core::CallOps::SEND_MESSAGE => , @@ -741,7 +738,7 @@ static VALUE grpc_run_batch_stack_build_result(run_batch_stack *st) { } tag = Object.new timeout = 10 - call.start_batch(cq, tag, timeout, ops) + call.start_batch(tag, timeout, ops) Start a batch of operations defined in the array ops; when complete, post a completion of type 'tag' to the completion queue bound to the call. @@ -750,20 +747,20 @@ static VALUE grpc_run_batch_stack_build_result(run_batch_stack *st) { The order of ops specified in the batch has no significance. Only one operation of each type can be active at once in any given batch */ -static VALUE grpc_rb_call_run_batch(VALUE self, VALUE cqueue, VALUE tag, - VALUE timeout, VALUE ops_hash) { +static VALUE grpc_rb_call_run_batch(VALUE self, VALUE ops_hash) { run_batch_stack st; - grpc_call *call = NULL; + grpc_rb_call *call = NULL; grpc_event ev; grpc_call_error err; VALUE result = Qnil; VALUE rb_write_flag = rb_ivar_get(self, id_write_flag); unsigned write_flag = 0; + void *tag = (void*)&st; if (RTYPEDDATA_DATA(self) == NULL) { rb_raise(grpc_rb_eCallError, "Cannot run batch on closed call"); return Qnil; } - TypedData_Get_Struct(self, grpc_call, &grpc_call_data_type, call); + TypedData_Get_Struct(self, grpc_rb_call, &grpc_call_data_type, call); /* Validate the ops args, adding them to a ruby array */ if (TYPE(ops_hash) != T_HASH) { @@ -778,7 +775,7 @@ static VALUE grpc_rb_call_run_batch(VALUE self, VALUE cqueue, VALUE tag, /* call grpc_call_start_batch, then wait for it to complete using * pluck_event */ - err = grpc_call_start_batch(call, st.ops, st.op_num, ROBJECT(tag), NULL); + err = grpc_call_start_batch(call->wrapped, st.ops, st.op_num, tag, NULL); if (err != GRPC_CALL_OK) { grpc_run_batch_stack_cleanup(&st); rb_raise(grpc_rb_eCallError, @@ -786,12 +783,7 @@ static VALUE grpc_rb_call_run_batch(VALUE self, VALUE cqueue, VALUE tag, grpc_call_error_detail_of(err), err); return Qnil; } - ev = grpc_rb_completion_queue_pluck_event(cqueue, tag, timeout); - if (ev.type == GRPC_QUEUE_TIMEOUT) { - grpc_run_batch_stack_cleanup(&st); - rb_raise(grpc_rb_eOutOfTime, "grpc_call_start_batch timed out"); - return Qnil; - } + ev = grpc_rb_completion_queue_pluck(call->queue, tag, gpr_inf_future, NULL); /* Build and return the BatchResult struct result, if there is an error, it's reflected in the status */ @@ -900,7 +892,7 @@ void Init_grpc_call() { 1); /* Add ruby analogues of the Call methods. */ - rb_define_method(grpc_rb_cCall, "run_batch", grpc_rb_call_run_batch, 4); + rb_define_method(grpc_rb_cCall, "run_batch", grpc_rb_call_run_batch, 1); rb_define_method(grpc_rb_cCall, "cancel", grpc_rb_call_cancel, 0); rb_define_method(grpc_rb_cCall, "close", grpc_rb_call_close, 0); rb_define_method(grpc_rb_cCall, "peer", grpc_rb_call_get_peer, 0); @@ -921,9 +913,6 @@ void Init_grpc_call() { id_write_flag = rb_intern("write_flag"); /* Ids used by the c wrapping internals. */ - id_cq = rb_intern("__cq"); - id_flags = rb_intern("__flags"); - id_input_md = rb_intern("__input_md"); id_credentials = rb_intern("__credentials"); /* Ids used in constructing the batch result. */ @@ -947,15 +936,18 @@ void Init_grpc_call() { /* Gets the call from the ruby object */ grpc_call *grpc_rb_get_wrapped_call(VALUE v) { - grpc_call *c = NULL; - TypedData_Get_Struct(v, grpc_call, &grpc_call_data_type, c); - return c; + grpc_rb_call *call = NULL; + TypedData_Get_Struct(v, grpc_rb_call, &grpc_call_data_type, call); + return call->wrapped; } /* Obtains the wrapped object for a given call */ -VALUE grpc_rb_wrap_call(grpc_call *c) { - if (c == NULL) { +VALUE grpc_rb_wrap_call(grpc_call *c, grpc_completion_queue *q) { + if (c == NULL || q == NULL) { return Qnil; } - return TypedData_Wrap_Struct(grpc_rb_cCall, &grpc_call_data_type, c); + grpc_rb_call *wrapper = ALLOC(grpc_rb_call); + wrapper->wrapped = c; + wrapper->queue = q; + return TypedData_Wrap_Struct(grpc_rb_cCall, &grpc_call_data_type, wrapper); } diff --git a/src/ruby/ext/grpc/rb_completion_queue.c b/src/ruby/ext/grpc/rb_completion_queue.c index 9466402db0c..1ac2ef2f335 100644 --- a/src/ruby/ext/grpc/rb_completion_queue.c +++ b/src/ruby/ext/grpc/rb_completion_queue.c @@ -42,10 +42,6 @@ #include #include "rb_grpc.h" -/* grpc_rb_cCompletionQueue is the ruby class that proxies - * grpc_completion_queue. */ -static VALUE grpc_rb_cCompletionQueue = Qnil; - /* Used to allow grpc_completion_queue_next call to release the GIL */ typedef struct next_call_stack { grpc_completion_queue *cq; @@ -128,7 +124,7 @@ static void grpc_rb_completion_queue_shutdown_drain(grpc_completion_queue *cq) { } /* Helper function to free a completion queue. */ -static void grpc_rb_completion_queue_destroy(void *p) { +void grpc_rb_completion_queue_destroy(grpc_completion_queue *cq) { grpc_completion_queue *cq = NULL; if (p == NULL) { return; @@ -138,59 +134,22 @@ static void grpc_rb_completion_queue_destroy(void *p) { grpc_completion_queue_destroy(cq); } -static rb_data_type_t grpc_rb_completion_queue_data_type = { - "grpc_completion_queue", - {GRPC_RB_GC_NOT_MARKED, grpc_rb_completion_queue_destroy, - GRPC_RB_MEMSIZE_UNAVAILABLE, {NULL, NULL}}, - NULL, NULL, -#ifdef RUBY_TYPED_FREE_IMMEDIATELY - /* cannot immediately free because grpc_rb_completion_queue_shutdown_drain - * calls rb_thread_call_without_gvl. */ - 0, -#endif -}; - -/* Releases the c-level resources associated with a completion queue */ -static VALUE grpc_rb_completion_queue_close(VALUE self) { - grpc_completion_queue* cq = grpc_rb_get_wrapped_completion_queue(self); - grpc_rb_completion_queue_destroy(cq); - RTYPEDDATA_DATA(self) = NULL; - return Qnil; -} - -/* Allocates a completion queue. */ -static VALUE grpc_rb_completion_queue_alloc(VALUE cls) { - grpc_completion_queue *cq = grpc_completion_queue_create(NULL); - if (cq == NULL) { - rb_raise(rb_eArgError, "could not create a completion queue: not sure why"); - } - return TypedData_Wrap_Struct(cls, &grpc_rb_completion_queue_data_type, cq); -} - static void unblock_func(void *param) { next_call_stack *const next_call = (next_call_stack*)param; next_call->interrupted = 1; } -/* Blocks until the next event for given tag is available, and returns the - * event. */ -grpc_event grpc_rb_completion_queue_pluck_event(VALUE self, VALUE tag, - VALUE timeout) { +/* Does the same thing as grpc_completion_queue_pluck, while properly releasing + the GVL and handling interrupts */ +grpc_event rb_completion_queue_pluck(grpc_completion_queue queue, void *tag, + gpr_timespec deadline, void *reserved) { next_call_stack next_call; MEMZERO(&next_call, next_call_stack, 1); - TypedData_Get_Struct(self, grpc_completion_queue, - &grpc_rb_completion_queue_data_type, next_call.cq); - if (TYPE(timeout) == T_NIL) { - next_call.timeout = gpr_inf_future(GPR_CLOCK_REALTIME); - } else { - next_call.timeout = grpc_rb_time_timeval(timeout, /* absolute time*/ 0); - } - if (TYPE(tag) == T_NIL) { - next_call.tag = NULL; - } else { - next_call.tag = ROBJECT(tag); - } + next_call.cq = queue; + next_call.timeout = deadline; + next_call.tag = tag; next_call.event.type = GRPC_QUEUE_TIMEOUT; + (void)reserved; /* Loop until we finish a pluck without an interruption. The internal pluck function runs either until it is interrupted or it gets an event, or time runs out. @@ -210,27 +169,3 @@ grpc_event grpc_rb_completion_queue_pluck_event(VALUE self, VALUE tag, next_call.event.type == GRPC_QUEUE_TIMEOUT); return next_call.event; } - -void Init_grpc_completion_queue() { - grpc_rb_cCompletionQueue = - rb_define_class_under(grpc_rb_mGrpcCore, "CompletionQueue", rb_cObject); - - /* constructor: uses an alloc func without an initializer. Using a simple - alloc func works here as the grpc header does not specify any args for - this func, so no separate initialization step is necessary. */ - rb_define_alloc_func(grpc_rb_cCompletionQueue, - grpc_rb_completion_queue_alloc); - - /* close: Provides a way to close the underlying file descriptor without - waiting for ruby garbage collection. */ - rb_define_method(grpc_rb_cCompletionQueue, "close", - grpc_rb_completion_queue_close, 0); -} - -/* Gets the wrapped completion queue from the ruby wrapper */ -grpc_completion_queue *grpc_rb_get_wrapped_completion_queue(VALUE v) { - grpc_completion_queue *cq = NULL; - TypedData_Get_Struct(v, grpc_completion_queue, - &grpc_rb_completion_queue_data_type, cq); - return cq; -} diff --git a/src/ruby/ext/grpc/rb_completion_queue.h b/src/ruby/ext/grpc/rb_completion_queue.h index 42de43c3fbb..3543e86275c 100644 --- a/src/ruby/ext/grpc/rb_completion_queue.h +++ b/src/ruby/ext/grpc/rb_completion_queue.h @@ -41,15 +41,14 @@ /* Gets the wrapped completion queue from the ruby wrapper */ grpc_completion_queue *grpc_rb_get_wrapped_completion_queue(VALUE v); +void grpc_rb_completion_queue_destroy(grpc_completion_queue *cq); + /** * Makes the implementation of CompletionQueue#pluck available in other files * * This avoids having code that holds the GIL repeated at multiple sites. */ -grpc_event grpc_rb_completion_queue_pluck_event(VALUE self, VALUE tag, - VALUE timeout); - -/* Initializes the CompletionQueue class. */ -void Init_grpc_completion_queue(); +grpc_event rb_completion_queue_pluck(grpc_completion_queue queue, void *tag, + gpr_timespec deadline, void *reserved); #endif /* GRPC_RB_COMPLETION_QUEUE_H_ */ diff --git a/src/ruby/ext/grpc/rb_grpc.c b/src/ruby/ext/grpc/rb_grpc.c index 8527da52d27..188a62475d2 100644 --- a/src/ruby/ext/grpc/rb_grpc.c +++ b/src/ruby/ext/grpc/rb_grpc.c @@ -46,7 +46,6 @@ #include "rb_call_credentials.h" #include "rb_channel.h" #include "rb_channel_credentials.h" -#include "rb_completion_queue.h" #include "rb_loader.h" #include "rb_server.h" #include "rb_server_credentials.h" @@ -318,7 +317,7 @@ void Init_grpc_c() { grpc_rb_mGrpcCore = rb_define_module_under(grpc_rb_mGRPC, "Core"); grpc_rb_sNewServerRpc = rb_struct_define("NewServerRpc", "method", "host", - "deadline", "metadata", "call", "cq", NULL); + "deadline", "metadata", "call", NULL); grpc_rb_sStatus = rb_struct_define("Status", "code", "details", "metadata", NULL); sym_code = ID2SYM(rb_intern("code")); @@ -326,7 +325,6 @@ void Init_grpc_c() { sym_metadata = ID2SYM(rb_intern("metadata")); Init_grpc_channel(); - Init_grpc_completion_queue(); Init_grpc_call(); Init_grpc_call_credentials(); Init_grpc_channel_credentials(); diff --git a/src/ruby/ext/grpc/rb_server.c b/src/ruby/ext/grpc/rb_server.c index c92059d12cc..cf430495c8b 100644 --- a/src/ruby/ext/grpc/rb_server.c +++ b/src/ruby/ext/grpc/rb_server.c @@ -63,6 +63,22 @@ typedef struct grpc_rb_server { grpc_completion_queue *queue; } grpc_rb_server; +static void destroy_server(grpc_rb_server *server, gpr_timespec deadline) { + grpc_event ev; + if (server->wrapped != NULL) { + grpc_server_shutdown_and_notify(server->wrapped, server->queue, NULL); + ev = rb_completion_queue_pluck(server->queue, NULL, deadline, NULL); + if (ev.type == GRPC_QUEUE_TIMEOUT) { + grpc_server_cancel_all_calls(server->wrapped); + rb_completion_queue_pluck(server->queue, NULL, gpr_inf_future, NULL); + } + grpc_server_destroy(server->wrapped); + grpc_rb_completion_queue_destroy(server->queue); + server->wrapped = NULL; + server->queue = NULL; + } +} + /* Destroys server instances. */ static void grpc_rb_server_free(void *p) { grpc_rb_server *svr = NULL; @@ -71,16 +87,8 @@ static void grpc_rb_server_free(void *p) { }; svr = (grpc_rb_server *)p; - /* Deletes the wrapped object if the mark object is Qnil, which indicates - that no other object is the actual owner. */ - /* grpc_server_shutdown does not exist. Change this to something that does - or delete it */ - if (svr->wrapped != NULL && svr->mark == Qnil) { - // grpc_server_shutdown(svr->wrapped); - // Aborting to indicate a bug - abort(); - grpc_server_destroy(svr->wrapped); - } + // TODO(murgatroid99): Maybe don't wait forever for the server to shutdown + destroy_server(svr, gpr_inf_future); xfree(p); } @@ -122,17 +130,15 @@ static VALUE grpc_rb_server_alloc(VALUE cls) { /* call-seq: - cq = CompletionQueue.new - server = Server.new(cq, {'arg1': 'value1'}) + server = Server.new({'arg1': 'value1'}) Initializes server instances. */ -static VALUE grpc_rb_server_init(VALUE self, VALUE cqueue, VALUE channel_args) { - grpc_completion_queue *cq = NULL; +static VALUE grpc_rb_server_init(VALUE self, VALUE channel_args) { + grpc_completion_queue *cq = grpc_completion_queue_create(NULL); grpc_rb_server *wrapper = NULL; grpc_server *srv = NULL; grpc_channel_args args; MEMZERO(&args, grpc_channel_args, 1); - cq = grpc_rb_get_wrapped_completion_queue(cqueue); TypedData_Get_Struct(self, grpc_rb_server, &grpc_rb_server_data_type, wrapper); grpc_rb_hash_convert_to_channel_args(channel_args, &args); @@ -179,65 +185,57 @@ static void grpc_request_call_stack_cleanup(request_call_stack* st) { } /* call-seq: - cq = CompletionQueue.new - tag = Object.new - timeout = 10 - server.request_call(cqueue, tag, timeout) + server.request_call Requests notification of a new call on a server. */ -static VALUE grpc_rb_server_request_call(VALUE self, VALUE cqueue, - VALUE tag_new, VALUE timeout) { +static VALUE grpc_rb_server_request_call(VALUE self) { grpc_rb_server *s = NULL; grpc_call *call = NULL; grpc_event ev; grpc_call_error err; request_call_stack st; VALUE result; + void *tag = (void*)&st; + grpc_completion_queue *call_queue = grpc_completion_queue_create(NULL); gpr_timespec deadline; TypedData_Get_Struct(self, grpc_rb_server, &grpc_rb_server_data_type, s); if (s->wrapped == NULL) { rb_raise(rb_eRuntimeError, "destroyed!"); return Qnil; - } else { - grpc_request_call_stack_init(&st); - /* call grpc_server_request_call, then wait for it to complete using - * pluck_event */ - err = grpc_server_request_call( - s->wrapped, &call, &st.details, &st.md_ary, - grpc_rb_get_wrapped_completion_queue(cqueue), - grpc_rb_get_wrapped_completion_queue(s->mark), - ROBJECT(tag_new)); - if (err != GRPC_CALL_OK) { - grpc_request_call_stack_cleanup(&st); - rb_raise(grpc_rb_eCallError, - "grpc_server_request_call failed: %s (code=%d)", - grpc_call_error_detail_of(err), err); - return Qnil; - } - - ev = grpc_rb_completion_queue_pluck_event(s->mark, tag_new, timeout); - if (ev.type == GRPC_QUEUE_TIMEOUT) { - grpc_request_call_stack_cleanup(&st); - return Qnil; - } - if (!ev.success) { - grpc_request_call_stack_cleanup(&st); - rb_raise(grpc_rb_eCallError, "request_call completion failed"); - return Qnil; - } + } + grpc_request_call_stack_init(&st); + /* call grpc_server_request_call, then wait for it to complete using + * pluck_event */ + err = grpc_server_request_call( + s->wrapped, &call, &st.details, &st.md_ary, + call_queue, s->queue, tag); + if (err != GRPC_CALL_OK) { + grpc_request_call_stack_cleanup(&st); + rb_raise(grpc_rb_eCallError, + "grpc_server_request_call failed: %s (code=%d)", + grpc_call_error_detail_of(err), err); + return Qnil; + } - /* build the NewServerRpc struct result */ - deadline = gpr_convert_clock_type(st.details.deadline, GPR_CLOCK_REALTIME); - result = rb_struct_new( - grpc_rb_sNewServerRpc, rb_str_new2(st.details.method), - rb_str_new2(st.details.host), - rb_funcall(rb_cTime, id_at, 2, INT2NUM(deadline.tv_sec), - INT2NUM(deadline.tv_nsec)), - grpc_rb_md_ary_to_h(&st.md_ary), grpc_rb_wrap_call(call), cqueue, NULL); + ev = rb_completion_queue_pluck(s->queue, tag, + gpr_inf_future, NULL); + if (!ev.success) { grpc_request_call_stack_cleanup(&st); - return result; + rb_raise(grpc_rb_eCallError, "request_call completion failed"); + return Qnil; } - return Qnil; + + /* build the NewServerRpc struct result */ + deadline = gpr_convert_clock_type(st.details.deadline, GPR_CLOCK_REALTIME); + result = rb_struct_new( + grpc_rb_sNewServerRpc, rb_str_new2(st.details.method), + rb_str_new2(st.details.host), + rb_funcall(rb_cTime, id_at, 2, INT2NUM(deadline.tv_sec), + INT2NUM(deadline.tv_nsec)), + grpc_rb_md_ary_to_h(&st.md_ary), grpc_rb_wrap_call(call, call_queue), + NULL); + grpc_request_call_stack_cleanup(&st); + return result; } static VALUE grpc_rb_server_start(VALUE self) { @@ -275,19 +273,15 @@ static VALUE grpc_rb_server_destroy(int argc, VALUE *argv, VALUE self) { rb_scan_args(argc, argv, "11", &cqueue, &timeout); cq = grpc_rb_get_wrapped_completion_queue(cqueue); TypedData_Get_Struct(self, grpc_rb_server, &grpc_rb_server_data_type, s); - - if (s->wrapped != NULL) { - grpc_server_shutdown_and_notify(s->wrapped, cq, NULL); - ev = grpc_rb_completion_queue_pluck_event(cqueue, Qnil, timeout); - if (!ev.success) { - rb_warn("server shutdown failed, cancelling the calls, objects may leak"); - grpc_server_cancel_all_calls(s->wrapped); - return Qfalse; - } - grpc_server_destroy(s->wrapped); - s->wrapped = NULL; + if (TYPE(timeout) == T_NIL) { + deadline = gpr_inf_future(GPR_CLOCK_REALTIME); + } else { + deadline = grpc_rb_time_timeval(timeout, /* absolute time*/ 0); } - return Qtrue; + + destroy_server(s, deadline); + + return Qnil; } /* @@ -347,13 +341,13 @@ void Init_grpc_server() { rb_define_alloc_func(grpc_rb_cServer, grpc_rb_server_alloc); /* Provides a ruby constructor and support for dup/clone. */ - rb_define_method(grpc_rb_cServer, "initialize", grpc_rb_server_init, 2); + rb_define_method(grpc_rb_cServer, "initialize", grpc_rb_server_init, 1); rb_define_method(grpc_rb_cServer, "initialize_copy", grpc_rb_cannot_init_copy, 1); /* Add the server methods. */ rb_define_method(grpc_rb_cServer, "request_call", - grpc_rb_server_request_call, 3); + grpc_rb_server_request_call, 0); rb_define_method(grpc_rb_cServer, "start", grpc_rb_server_start, 0); rb_define_method(grpc_rb_cServer, "destroy", grpc_rb_server_destroy, -1); rb_define_alias(grpc_rb_cServer, "close", "destroy"); From d627c105847f0d262ce3886fb5b463dc914ddbd7 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Mon, 6 Jun 2016 15:49:32 -0700 Subject: [PATCH 0900/1894] Fix asan failures (i.e add pollset_global_shutdown), remove debug log lines --- src/core/lib/iomgr/ev_epoll_linux.c | 76 ++++++++++++++--------------- 1 file changed, 38 insertions(+), 38 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index d3abf3bd84f..0e00d4d216a 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -516,6 +516,21 @@ static void polling_island_global_init() { g_pi_freelist = NULL; } +static void polling_island_global_shutdown() { + polling_island *next; + gpr_mu_lock(&g_pi_freelist_mu); + gpr_mu_unlock(&g_pi_freelist_mu); + while (g_pi_freelist != NULL) { + next = g_pi_freelist->next_free; + gpr_mu_destroy(&g_pi_freelist->mu); + gpr_free(g_pi_freelist->fds); + gpr_free(g_pi_freelist); + g_pi_freelist = next; + } + + gpr_mu_destroy(&g_pi_freelist_mu); +} + /******************************************************************************* * Fd Definitions */ @@ -784,7 +799,7 @@ static void fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, */ static void sig_handler(int sig_num) { -#ifdef GPRC_EPOLL_DEBUG +#ifdef GRPC_EPOLL_DEBUG gpr_log(GPR_INFO, "Received signal %d", sig_num); #endif } @@ -792,7 +807,7 @@ static void sig_handler(int sig_num) { /* Global state management */ static void pollset_global_init(void) { grpc_wakeup_fd_init(&grpc_global_wakeup_fd); - signal(SIGUSR1, sig_handler); + signal(SIGUSR1, sig_handler); /* TODO: sreek - Do not hardcode SIGUSR1 */ } static void pollset_global_shutdown(void) { @@ -840,7 +855,6 @@ static void pollset_kick(grpc_pollset *p, grpc_pollset_worker *worker = specific_worker; if (worker != NULL) { if (worker == GRPC_POLLSET_KICK_BROADCAST) { - gpr_log(GPR_DEBUG, "pollset_kick: broadcast!"); if (pollset_has_workers(p)) { GPR_TIMER_BEGIN("pollset_kick.broadcast", 0); for (worker = p->root_worker.next; worker != &p->root_worker; @@ -848,12 +862,10 @@ static void pollset_kick(grpc_pollset *p, pthread_kill(worker->pt_id, SIGUSR1); } } else { - gpr_log(GPR_DEBUG, "pollset_kick: (broadcast) Kicked without pollers"); p->kicked_without_pollers = true; } GPR_TIMER_END("pollset_kick.broadcast", 0); } else { - gpr_log(GPR_DEBUG, "pollset_kick: kicked kicked_specifically"); GPR_TIMER_MARK("kicked_specifically", 0); worker->kicked_specifically = true; pthread_kill(worker->pt_id, SIGUSR1); @@ -864,11 +876,9 @@ static void pollset_kick(grpc_pollset *p, if (worker != NULL) { GPR_TIMER_MARK("finally_kick", 0); push_back_worker(p, worker); - gpr_log(GPR_DEBUG, "pollset_kick: anonymous kick"); pthread_kill(worker->pt_id, SIGUSR1); } else { GPR_TIMER_MARK("kicked_no_pollers", 0); - gpr_log(GPR_DEBUG, "pollset_kick: kicked without pollers"); p->kicked_without_pollers = true; } } @@ -941,7 +951,6 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, struct epoll_event ep_ev[GRPC_EPOLL_MAX_EVENTS]; int epoll_fd = -1; int ep_rv; - gpr_log(GPR_DEBUG, "pollset_work_and_unlock: Entering.."); GPR_TIMER_BEGIN("pollset_work_and_unlock", 0); /* We need to get the epoll_fd to wait on. The epoll_fd is in inside the @@ -952,22 +961,27 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, - pollset->polling_island->mu */ gpr_mu_lock(&pollset->pi_mu); - if (pollset->polling_island != NULL) { - pollset->polling_island = - polling_island_update_and_lock(pollset->polling_island, 1, 0); - epoll_fd = pollset->polling_island->epoll_fd; - if (pollset->polling_island->fd_cnt == 0) { - gpr_log(GPR_DEBUG, "pollset_work_and_unlock: epoll_fd: %d, No other fds", - epoll_fd); - } - for (size_t i = 0; i < pollset->polling_island->fd_cnt; i++) { - gpr_log(GPR_DEBUG, - "pollset_work_and_unlock: epoll_fd: %d, fd_count: %d, fd[%d]: %d", - epoll_fd, pollset->polling_island->fd_cnt, i, - pollset->polling_island->fds[i]->fd); - } - gpr_mu_unlock(&pollset->polling_island->mu); + if (pollset->polling_island == NULL) { + pollset->polling_island = polling_island_create(NULL, 1); + } + + pollset->polling_island = + polling_island_update_and_lock(pollset->polling_island, 1, 0); + epoll_fd = pollset->polling_island->epoll_fd; + +#ifdef GRPC_EPOLL_DEBUG + if (pollset->polling_island->fd_cnt == 0) { + gpr_log(GPR_DEBUG, "pollset_work_and_unlock: epoll_fd: %d, No other fds", + epoll_fd); + } + for (size_t i = 0; i < pollset->polling_island->fd_cnt; i++) { + gpr_log(GPR_DEBUG, + "pollset_work_and_unlock: epoll_fd: %d, fd_count: %d, fd[%d]: %d", + epoll_fd, pollset->polling_island->fd_cnt, i, + pollset->polling_island->fds[i]->fd); } +#endif + gpr_mu_unlock(&pollset->polling_island->mu); gpr_mu_unlock(&pollset->pi_mu); gpr_mu_unlock(&pollset->mu); @@ -975,16 +989,8 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, /* If epoll_fd == -1, this is a blank pollset and does not have any fds yet */ if (epoll_fd != -1) { do { - gpr_timespec before_epoll = gpr_now(GPR_CLOCK_PRECISE); - gpr_log(GPR_DEBUG, "pollset_work_and_unlock: epoll_wait()...."); ep_rv = epoll_pwait(epoll_fd, ep_ev, GRPC_EPOLL_MAX_EVENTS, timeout_ms, sig_mask); - gpr_timespec after_epoll = gpr_now(GPR_CLOCK_PRECISE); - int dur = gpr_time_to_millis(gpr_time_sub(after_epoll, before_epoll)); - gpr_log(GPR_DEBUG, - "pollset_work_and_unlock: DONE epoll_wait() : %d ms, ep_rv: %d", - dur, ep_rv); - if (ep_rv < 0) { if (errno != EINTR) { /* TODO (sreek) - Do not log an error in case of bad file descriptor @@ -993,9 +999,7 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, * closed) */ gpr_log(GPR_ERROR, "epoll_pwait() failed: %s", strerror(errno)); } else { - gpr_log(GPR_DEBUG, "pollset_work_and_unlock: 0-timeout epoll_wait()"); ep_rv = epoll_wait(epoll_fd, ep_ev, GRPC_EPOLL_MAX_EVENTS, 0); - gpr_log(GPR_DEBUG, "pollset_work_and_unlock: ep_rv: %d", ep_rv); } } @@ -1018,7 +1022,6 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, } } while (ep_rv == GRPC_EPOLL_MAX_EVENTS); } - gpr_log(GPR_DEBUG, "pollset_work_and_unlock: Leaving.."); GPR_TIMER_END("pollset_work_and_unlock", 0); } @@ -1093,7 +1096,6 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_pollset_worker **worker_hdl, gpr_timespec now, gpr_timespec deadline) { GPR_TIMER_BEGIN("pollset_work", 0); - gpr_log(GPR_DEBUG, "pollset_work: enter"); int timeout_ms = poll_deadline_to_millis_timeout(deadline, now); sigset_t new_mask; @@ -1112,7 +1114,6 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, work that needs attention like an event on the completion queue or an alarm */ GPR_TIMER_MARK("pollset_work.kicked_without_pollers", 0); - gpr_log(GPR_INFO, "pollset_work: kicked without pollers.."); pollset->kicked_without_pollers = 0; } else if (!pollset->shutting_down) { sigemptyset(&new_mask); @@ -1147,14 +1148,12 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, gpr_mu_lock(&pollset->mu); } - gpr_log(GPR_DEBUG, "pollset_work(): leaving"); *worker_hdl = NULL; GPR_TIMER_END("pollset_work", 0); } static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_fd *fd) { - gpr_log(GPR_DEBUG, "pollset_add_fd: pollset: %p, fd: %d", pollset, fd->fd); /* TODO sreek - Double check if we need to get a pollset->mu lock here */ gpr_mu_lock(&pollset->pi_mu); gpr_mu_lock(&fd->pi_mu); @@ -1347,6 +1346,7 @@ static void pollset_set_del_pollset_set(grpc_exec_ctx *exec_ctx, static void shutdown_engine(void) { fd_global_shutdown(); pollset_global_shutdown(); + polling_island_global_shutdown(); } static const grpc_event_engine_vtable vtable = { From e5012bac7a57df6b1993a1eaa9b8b3c4d7671975 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Mon, 6 Jun 2016 16:01:45 -0700 Subject: [PATCH 0901/1894] Remove redundant code --- src/core/lib/iomgr/ev_epoll_linux.c | 61 ++++++++++++++--------------- 1 file changed, 29 insertions(+), 32 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 0e00d4d216a..f7ac4ae1ff4 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -986,42 +986,39 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, gpr_mu_unlock(&pollset->pi_mu); gpr_mu_unlock(&pollset->mu); - /* If epoll_fd == -1, this is a blank pollset and does not have any fds yet */ - if (epoll_fd != -1) { - do { - ep_rv = epoll_pwait(epoll_fd, ep_ev, GRPC_EPOLL_MAX_EVENTS, timeout_ms, - sig_mask); - if (ep_rv < 0) { - if (errno != EINTR) { - /* TODO (sreek) - Do not log an error in case of bad file descriptor - * (A bad file descriptor here would just mean that the epoll set was - * merged with another epoll set and that the current epoll_fd is - * closed) */ - gpr_log(GPR_ERROR, "epoll_pwait() failed: %s", strerror(errno)); - } else { - ep_rv = epoll_wait(epoll_fd, ep_ev, GRPC_EPOLL_MAX_EVENTS, 0); - } + do { + ep_rv = epoll_pwait(epoll_fd, ep_ev, GRPC_EPOLL_MAX_EVENTS, timeout_ms, + sig_mask); + if (ep_rv < 0) { + if (errno != EINTR) { + /* TODO (sreek) - Do not log an error in case of bad file descriptor + * (A bad file descriptor here would just mean that the epoll set was + * merged with another epoll set and that the current epoll_fd is + * closed) */ + gpr_log(GPR_ERROR, "epoll_pwait() failed: %s", strerror(errno)); + } else { + ep_rv = epoll_wait(epoll_fd, ep_ev, GRPC_EPOLL_MAX_EVENTS, 0); } + } - int i; - for (i = 0; i < ep_rv; ++i) { - grpc_fd *fd = ep_ev[i].data.ptr; - int cancel = ep_ev[i].events & (EPOLLERR | EPOLLHUP); - int read_ev = ep_ev[i].events & (EPOLLIN | EPOLLPRI); - int write_ev = ep_ev[i].events & EPOLLOUT; - if (fd == NULL) { - grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); - } else { - if (read_ev || cancel) { - fd_become_readable(exec_ctx, fd); - } - if (write_ev || cancel) { - fd_become_writable(exec_ctx, fd); - } + int i; + for (i = 0; i < ep_rv; ++i) { + grpc_fd *fd = ep_ev[i].data.ptr; + int cancel = ep_ev[i].events & (EPOLLERR | EPOLLHUP); + int read_ev = ep_ev[i].events & (EPOLLIN | EPOLLPRI); + int write_ev = ep_ev[i].events & EPOLLOUT; + if (fd == NULL) { + grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); + } else { + if (read_ev || cancel) { + fd_become_readable(exec_ctx, fd); + } + if (write_ev || cancel) { + fd_become_writable(exec_ctx, fd); } } - } while (ep_rv == GRPC_EPOLL_MAX_EVENTS); - } + } + } while (ep_rv == GRPC_EPOLL_MAX_EVENTS); GPR_TIMER_END("pollset_work_and_unlock", 0); } From a2bc0ccb500f0fffcdd263420133b4a0d0cbad2d Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Mon, 6 Jun 2016 16:21:59 -0700 Subject: [PATCH 0902/1894] Get transport from transport global Avoid introducing cancel_stream_cb_arg --- .../chttp2/transport/chttp2_transport.c | 20 +++++++------------ 1 file changed, 7 insertions(+), 13 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index d0c94e6c463..43e9ca1ff56 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1529,26 +1529,20 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, 1); } -typedef struct { - grpc_exec_ctx *exec_ctx; - gpr_slice *optional_drop_message; -} cancel_stream_cb_arg; - static void cancel_stream_cb(grpc_chttp2_transport_global *transport_global, void *user_data, grpc_chttp2_stream_global *stream_global) { - cancel_stream_cb_arg *arg = user_data; - cancel_from_api(arg->exec_ctx, transport_global, stream_global, - GRPC_STATUS_UNAVAILABLE, arg->optional_drop_message); + grpc_chttp2_transport *transport = TRANSPORT_FROM_GLOBAL(transport_global); + cancel_from_api(user_data, transport_global, stream_global, + GRPC_STATUS_UNAVAILABLE, + GPR_SLICE_IS_EMPTY(transport->optional_drop_message) + ? NULL + : &transport->optional_drop_message); } static void end_all_the_calls(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) { - cancel_stream_cb_arg arg = {exec_ctx, - GPR_SLICE_IS_EMPTY(t->optional_drop_message) - ? NULL - : &t->optional_drop_message}; - grpc_chttp2_for_all_streams(&t->global, &arg, cancel_stream_cb); + grpc_chttp2_for_all_streams(&t->global, exec_ctx, cancel_stream_cb); } static void drop_connection(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t) { From ad162ba5a9f91481b71f233d1f4f8c15b01de644 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Mon, 6 Jun 2016 16:23:37 -0700 Subject: [PATCH 0903/1894] Core review comments and remove 'kicked_specifically' field as its not needed --- src/core/lib/iomgr/ev_epoll_linux.c | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index f7ac4ae1ff4..d5aac96fa46 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -145,7 +145,6 @@ typedef struct polling_island { * Pollset Declarations */ struct grpc_pollset_worker { - int kicked_specifically; pthread_t pt_id; /* Thread id of this worker */ struct grpc_pollset_worker *next; struct grpc_pollset_worker *prev; @@ -235,18 +234,16 @@ static void polling_island_remove_all_fds_locked(polling_island *pi, size_t i; for (i = 0; i < pi->fd_cnt; i++) { - if (remove_fd_refs) { - GRPC_FD_UNREF(pi->fds[i], "polling_island"); - } - err = epoll_ctl(pi->epoll_fd, EPOLL_CTL_DEL, pi->fds[i]->fd, NULL); if (err < 0 && errno != ENOENT) { - gpr_log(GPR_ERROR, - "epoll_ctl delete for fds[i]: %d failed with error: %s", i, - pi->fds[i]->fd, strerror(errno)); /* TODO: sreek - We need a better way to bubble up this error instead of - * just logging a message */ - continue; + * just logging a message */ + gpr_log(GPR_ERROR, "epoll_ctl deleting fds[%d]: %d failed with error: %s", + i, pi->fds[i]->fd, strerror(errno)); + } + + if (remove_fd_refs) { + GRPC_FD_UNREF(pi->fds[i], "polling_island"); } } @@ -264,7 +261,7 @@ static void polling_island_remove_fd_locked(polling_island *pi, grpc_fd *fd, if (!is_fd_closed) { err = epoll_ctl(pi->epoll_fd, EPOLL_CTL_DEL, fd->fd, NULL); if (err < 0 && errno != ENOENT) { - gpr_log(GPR_ERROR, "epoll_ctl delete for fd: %d failed with error; %s", + gpr_log(GPR_ERROR, "epoll_ctl deleting fd: %d failed with error; %s", fd->fd, strerror(errno)); } } @@ -867,7 +864,6 @@ static void pollset_kick(grpc_pollset *p, GPR_TIMER_END("pollset_kick.broadcast", 0); } else { GPR_TIMER_MARK("kicked_specifically", 0); - worker->kicked_specifically = true; pthread_kill(worker->pt_id, SIGUSR1); } } else { @@ -1100,7 +1096,6 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_pollset_worker worker; worker.next = worker.prev = NULL; - worker.kicked_specifically = 0; worker.pt_id = pthread_self(); *worker_hdl = &worker; From 1cf4ec7ad0e9693297eb3852f28ad5864cea3c7c Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 6 Jun 2016 16:33:14 -0700 Subject: [PATCH 0904/1894] merge leftover --- src/core/ext/load_reporting/load_reporting_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/ext/load_reporting/load_reporting_filter.c b/src/core/ext/load_reporting/load_reporting_filter.c index f49730fac31..f372f88c3a6 100644 --- a/src/core/ext/load_reporting/load_reporting_filter.c +++ b/src/core/ext/load_reporting/load_reporting_filter.c @@ -142,7 +142,7 @@ const grpc_channel_filter grpc_load_reporting_filter = { grpc_channel_next_op, sizeof(call_data), init_call_elem, - grpc_call_stack_ignore_set_pollset, + grpc_call_stack_ignore_set_pollset_or_pollset_set, destroy_call_elem, sizeof(channel_data), init_channel_elem, From 69ff63d158dc7c4aa00b52b71cf816f5c2a7ee30 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 6 Jun 2016 16:39:47 -0700 Subject: [PATCH 0905/1894] clang-format --- src/core/ext/lb_policy/pick_first/pick_first.c | 11 ++++++----- src/core/ext/lb_policy/round_robin/round_robin.c | 9 +++++---- src/core/lib/http/httpcli.c | 4 ++-- src/core/lib/iomgr/polling_entity.c | 14 ++++++++------ src/core/lib/iomgr/polling_entity.h | 11 ++++++----- .../google_default/google_default_credentials.c | 7 ++++--- src/core/lib/surface/call.c | 6 ++++-- test/core/http/httpcli_test.c | 3 ++- test/core/http/httpscli_test.c | 3 ++- test/core/security/oauth2_utils.c | 4 ++-- .../security/print_google_default_creds_token.c | 4 ++-- 11 files changed, 43 insertions(+), 33 deletions(-) diff --git a/src/core/ext/lb_policy/pick_first/pick_first.c b/src/core/ext/lb_policy/pick_first/pick_first.c index ce81cf9f671..cc559eb2da9 100644 --- a/src/core/ext/lb_policy/pick_first/pick_first.c +++ b/src/core/ext/lb_policy/pick_first/pick_first.c @@ -119,7 +119,7 @@ static void pf_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { pending_pick *next = pp->next; *pp->target = NULL; grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, - p->base.interested_parties); + p->base.interested_parties); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); gpr_free(pp); pp = next; @@ -137,7 +137,7 @@ static void pf_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, pending_pick *next = pp->next; if (pp->target == target) { grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, - p->base.interested_parties); + p->base.interested_parties); *target = NULL; grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); gpr_free(pp); @@ -163,7 +163,7 @@ static void pf_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, if ((pp->initial_metadata_flags & initial_metadata_flags_mask) == initial_metadata_flags_eq) { grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, - p->base.interested_parties); + p->base.interested_parties); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); gpr_free(pp); } else { @@ -222,7 +222,8 @@ static int pf_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, if (!p->started_picking) { start_picking(exec_ctx, p); } - grpc_polling_entity_add_to_pollset_set(exec_ctx, pollent, p->base.interested_parties); + grpc_polling_entity_add_to_pollset_set(exec_ctx, pollent, + p->base.interested_parties); pp = gpr_malloc(sizeof(*pp)); pp->next = p->pending_picks; pp->pollent = pollent; @@ -306,7 +307,7 @@ static void pf_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, p->pending_picks = pp->next; *pp->target = selected; grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, - p->base.interested_parties); + p->base.interested_parties); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); gpr_free(pp); } diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index 5ce6c4ff5b8..8645333c8e3 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -263,7 +263,7 @@ static void rr_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, pending_pick *next = pp->next; if (pp->target == target) { grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, - p->base.interested_parties); + p->base.interested_parties); *target = NULL; grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); gpr_free(pp); @@ -289,7 +289,7 @@ static void rr_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, if ((pp->initial_metadata_flags & initial_metadata_flags_mask) == initial_metadata_flags_eq) { grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, - p->base.interested_parties); + p->base.interested_parties); *pp->target = NULL; grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, false, NULL); gpr_free(pp); @@ -355,7 +355,8 @@ static int rr_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, if (!p->started_picking) { start_picking(exec_ctx, p); } - grpc_polling_entity_add_to_pollset_set(exec_ctx, pollent, p->base.interested_parties); + grpc_polling_entity_add_to_pollset_set(exec_ctx, pollent, + p->base.interested_parties); pp = gpr_malloc(sizeof(*pp)); pp->next = p->pending_picks; pp->pollent = pollent; @@ -408,7 +409,7 @@ static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, selected->subchannel, selected); } grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, - p->base.interested_parties); + p->base.interested_parties); grpc_exec_ctx_enqueue(exec_ctx, pp->on_complete, true, NULL); gpr_free(pp); } diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index d49f020038e..e8957bfe89d 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -98,7 +98,7 @@ static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req); static void finish(grpc_exec_ctx *exec_ctx, internal_request *req, int success) { grpc_polling_entity_del_from_pollset_set(exec_ctx, req->pollent, - req->context->pollset_set); + req->context->pollset_set); req->on_response(exec_ctx, req->user_data, success ? &req->parser.http.response : NULL); grpc_http_parser_destroy(&req->parser); @@ -246,7 +246,7 @@ static void internal_request_begin( GPR_ASSERT(pollent); grpc_polling_entity_add_to_pollset_set(exec_ctx, req->pollent, - req->context->pollset_set); + req->context->pollset_set); grpc_resolve_address(exec_ctx, request->host, req->handshaker->default_port, on_resolved, req); } diff --git a/src/core/lib/iomgr/polling_entity.c b/src/core/lib/iomgr/polling_entity.c index 45d7dccafa0..d1686aa12f6 100644 --- a/src/core/lib/iomgr/polling_entity.c +++ b/src/core/lib/iomgr/polling_entity.c @@ -44,7 +44,8 @@ grpc_polling_entity grpc_polling_entity_create_from_pollset_set( return pollent; } -grpc_polling_entity grpc_polling_entity_create_from_pollset(grpc_pollset *pollset) { +grpc_polling_entity grpc_polling_entity_create_from_pollset( + grpc_pollset *pollset) { grpc_polling_entity pollent; pollent.pollent.pollset = pollset; pollent.tag = POPS_POLLSET; @@ -58,7 +59,8 @@ grpc_pollset *grpc_polling_entity_pollset(grpc_polling_entity *pollent) { return NULL; } -grpc_pollset_set *grpc_polling_entity_pollset_set(grpc_polling_entity *pollent) { +grpc_pollset_set *grpc_polling_entity_pollset_set( + grpc_polling_entity *pollent) { if (pollent->tag == POPS_POLLSET_SET) { return pollent->pollent.pollset_set; } @@ -70,8 +72,8 @@ bool grpc_polling_entity_is_empty(const grpc_polling_entity *pollent) { } void grpc_polling_entity_add_to_pollset_set(grpc_exec_ctx *exec_ctx, - grpc_polling_entity *pollent, - grpc_pollset_set *pss_dst) { + grpc_polling_entity *pollent, + grpc_pollset_set *pss_dst) { if (pollent->tag == POPS_POLLSET) { GPR_ASSERT(pollent->pollent.pollset != NULL); grpc_pollset_set_add_pollset(exec_ctx, pss_dst, pollent->pollent.pollset); @@ -86,8 +88,8 @@ void grpc_polling_entity_add_to_pollset_set(grpc_exec_ctx *exec_ctx, } void grpc_polling_entity_del_from_pollset_set(grpc_exec_ctx *exec_ctx, - grpc_polling_entity *pollent, - grpc_pollset_set *pss_dst) { + grpc_polling_entity *pollent, + grpc_pollset_set *pss_dst) { if (pollent->tag == POPS_POLLSET) { GPR_ASSERT(pollent->pollent.pollset != NULL); grpc_pollset_set_del_pollset(exec_ctx, pss_dst, pollent->pollent.pollset); diff --git a/src/core/lib/iomgr/polling_entity.h b/src/core/lib/iomgr/polling_entity.h index 1750e28eb10..e81531053cf 100644 --- a/src/core/lib/iomgr/polling_entity.h +++ b/src/core/lib/iomgr/polling_entity.h @@ -52,7 +52,8 @@ typedef struct grpc_polling_entity { grpc_polling_entity grpc_polling_entity_create_from_pollset_set( grpc_pollset_set *pollset_set); -grpc_polling_entity grpc_polling_entity_create_from_pollset(grpc_pollset *pollset); +grpc_polling_entity grpc_polling_entity_create_from_pollset( + grpc_pollset *pollset); /** If \a pollent contains a pollset, return it. Otherwise, return NULL */ grpc_pollset *grpc_polling_entity_pollset(grpc_polling_entity *pollent); @@ -66,15 +67,15 @@ bool grpc_polling_entity_is_empty(const grpc_polling_entity *pollent); * \a * pss_dst */ void grpc_polling_entity_add_to_pollset_set(grpc_exec_ctx *exec_ctx, - grpc_polling_entity *pollent, - grpc_pollset_set *pss_dst); + grpc_polling_entity *pollent, + grpc_pollset_set *pss_dst); /** Delete the pollset or pollset_set in \a pollent from the destination * pollset_set \a * pss_dst */ void grpc_polling_entity_del_from_pollset_set(grpc_exec_ctx *exec_ctx, - grpc_polling_entity *pollent, - grpc_pollset_set *pss_dst); + grpc_polling_entity *pollent, + grpc_pollset_set *pss_dst); /* pollset_set specific */ #endif /* GRPC_CORE_LIB_IOMGR_POLLING_ENTITY_H */ diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.c b/src/core/lib/security/credentials/google_default/google_default_credentials.c index 84d5bd3395c..98df68e7b30 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.c +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.c @@ -130,8 +130,8 @@ static int is_stack_running_on_compute_engine(void) { gpr_mu_lock(g_polling_mu); while (!detector.is_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&detector.pollent), &worker, - gpr_now(GPR_CLOCK_MONOTONIC), + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&detector.pollent), + &worker, gpr_now(GPR_CLOCK_MONOTONIC), gpr_inf_future(GPR_CLOCK_MONOTONIC)); } gpr_mu_unlock(g_polling_mu); @@ -139,7 +139,8 @@ static int is_stack_running_on_compute_engine(void) { grpc_httpcli_context_destroy(&context); grpc_closure_init(&destroy_closure, destroy_pollset, grpc_polling_entity_pollset(&detector.pollent)); - grpc_pollset_shutdown(&exec_ctx, grpc_polling_entity_pollset(&detector.pollent), + grpc_pollset_shutdown(&exec_ctx, + grpc_polling_entity_pollset(&detector.pollent), &destroy_closure); grpc_exec_ctx_finish(&exec_ctx); g_polling_mu = NULL; diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 08b8dd2768d..e899bc8098b 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -264,10 +264,12 @@ grpc_call *grpc_call_create( pollset_set_alternative == NULL && "Only one of 'cq' and 'pollset_set_alternative' should be non-NULL."); GRPC_CQ_INTERNAL_REF(cq, "bind"); - call->pollent = grpc_polling_entity_create_from_pollset(grpc_cq_pollset(cq)); + call->pollent = + grpc_polling_entity_create_from_pollset(grpc_cq_pollset(cq)); } if (pollset_set_alternative != NULL) { - call->pollent = grpc_polling_entity_create_from_pollset_set(pollset_set_alternative); + call->pollent = + grpc_polling_entity_create_from_pollset_set(pollset_set_alternative); } if (!grpc_polling_entity_is_empty(&call->pollent)) { grpc_call_stack_set_pollset_or_pollset_set( diff --git a/test/core/http/httpcli_test.c b/test/core/http/httpcli_test.c index e61975e2504..6c27ea2651e 100644 --- a/test/core/http/httpcli_test.c +++ b/test/core/http/httpcli_test.c @@ -189,7 +189,8 @@ int main(int argc, char **argv) { grpc_httpcli_context_destroy(&g_context); grpc_closure_init(&destroyed, destroy_pops, &g_pops); - grpc_pollset_shutdown(&exec_ctx, grpc_polling_entity_pollset(&g_pops), &destroyed); + grpc_pollset_shutdown(&exec_ctx, grpc_polling_entity_pollset(&g_pops), + &destroyed); grpc_exec_ctx_finish(&exec_ctx); grpc_shutdown(); diff --git a/test/core/http/httpscli_test.c b/test/core/http/httpscli_test.c index 90f0b8eeffb..1b0bc600484 100644 --- a/test/core/http/httpscli_test.c +++ b/test/core/http/httpscli_test.c @@ -192,7 +192,8 @@ int main(int argc, char **argv) { grpc_httpcli_context_destroy(&g_context); grpc_closure_init(&destroyed, destroy_pops, &g_pops); - grpc_pollset_shutdown(&exec_ctx, grpc_polling_entity_pollset(&g_pops), &destroyed); + grpc_pollset_shutdown(&exec_ctx, grpc_polling_entity_pollset(&g_pops), + &destroyed); grpc_exec_ctx_finish(&exec_ctx); grpc_shutdown(); diff --git a/test/core/security/oauth2_utils.c b/test/core/security/oauth2_utils.c index a341e33ef6f..cb27a1a5641 100644 --- a/test/core/security/oauth2_utils.c +++ b/test/core/security/oauth2_utils.c @@ -98,8 +98,8 @@ char *grpc_test_fetch_oauth2_token_with_credentials( gpr_mu_lock(request.mu); while (!request.is_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&request.pops), &worker, - gpr_now(GPR_CLOCK_MONOTONIC), + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&request.pops), + &worker, gpr_now(GPR_CLOCK_MONOTONIC), gpr_inf_future(GPR_CLOCK_MONOTONIC)); } gpr_mu_unlock(request.mu); diff --git a/test/core/security/print_google_default_creds_token.c b/test/core/security/print_google_default_creds_token.c index 48defbe25ff..07c8c58d417 100644 --- a/test/core/security/print_google_default_creds_token.c +++ b/test/core/security/print_google_default_creds_token.c @@ -106,8 +106,8 @@ int main(int argc, char **argv) { gpr_mu_lock(sync.mu); while (!sync.is_done) { grpc_pollset_worker *worker = NULL; - grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&sync.pops), &worker, - gpr_now(GPR_CLOCK_MONOTONIC), + grpc_pollset_work(&exec_ctx, grpc_polling_entity_pollset(&sync.pops), + &worker, gpr_now(GPR_CLOCK_MONOTONIC), gpr_inf_future(GPR_CLOCK_MONOTONIC)); gpr_mu_unlock(sync.mu); grpc_exec_ctx_flush(&exec_ctx); From 4461da702ce8c23afae565201a60cea054421f49 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 6 Jun 2016 16:45:01 -0700 Subject: [PATCH 0906/1894] regenerated projects --- BUILD | 2 ++ Makefile | 1 + 2 files changed, 3 insertions(+) diff --git a/BUILD b/BUILD index 77f36d0359d..07196ed8f9c 100644 --- a/BUILD +++ b/BUILD @@ -560,6 +560,7 @@ cc_library( "src/core/lib/iomgr/iomgr.h", "src/core/lib/iomgr/iomgr_internal.h", "src/core/lib/iomgr/iomgr_posix.h", + "src/core/lib/iomgr/polling_entity.h", "src/core/lib/iomgr/pollset.h", "src/core/lib/iomgr/pollset_set.h", "src/core/lib/iomgr/pollset_set_windows.h", @@ -696,6 +697,7 @@ cc_library( "src/core/lib/iomgr/iomgr.c", "src/core/lib/iomgr/iomgr_posix.c", "src/core/lib/iomgr/iomgr_windows.c", + "src/core/lib/iomgr/polling_entity.c", "src/core/lib/iomgr/pollset_set_windows.c", "src/core/lib/iomgr/pollset_windows.c", "src/core/lib/iomgr/resolve_address_posix.c", diff --git a/Makefile b/Makefile index bc932224e6e..8ad31811392 100644 --- a/Makefile +++ b/Makefile @@ -2765,6 +2765,7 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/iomgr/iomgr.c \ src/core/lib/iomgr/iomgr_posix.c \ src/core/lib/iomgr/iomgr_windows.c \ + src/core/lib/iomgr/polling_entity.c \ src/core/lib/iomgr/pollset_set_windows.c \ src/core/lib/iomgr/pollset_windows.c \ src/core/lib/iomgr/resolve_address_posix.c \ From 8d829d0d6d29f3027fb7e83e528197b8a2d08808 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 6 Jun 2016 16:43:54 -0700 Subject: [PATCH 0907/1894] Add more Channel and Server constructor overloads --- src/csharp/Grpc.Core/Channel.cs | 26 ++++++++++++++++++++++++-- src/csharp/Grpc.Core/Server.cs | 12 ++++++++++-- 2 files changed, 34 insertions(+), 4 deletions(-) diff --git a/src/csharp/Grpc.Core/Channel.cs b/src/csharp/Grpc.Core/Channel.cs index e0fc7180daf..4f29c35b321 100644 --- a/src/csharp/Grpc.Core/Channel.cs +++ b/src/csharp/Grpc.Core/Channel.cs @@ -61,6 +61,17 @@ namespace Grpc.Core bool shutdownRequested; + /// + /// Creates a channel that connects to a specific host. + /// Port will default to 80 for an unsecure channel and to 443 for a secure channel. + /// + /// Target of the channel. + /// Credentials to secure the channel. + public Channel(string target, ChannelCredentials credentials) : + this(target, credentials, null) + { + } + /// /// Creates a channel that connects to a specific host. /// Port will default to 80 for an unsecure channel and to 443 for a secure channel. @@ -68,7 +79,7 @@ namespace Grpc.Core /// Target of the channel. /// Credentials to secure the channel. /// Channel options. - public Channel(string target, ChannelCredentials credentials, IEnumerable options = null) + public Channel(string target, ChannelCredentials credentials, IEnumerable options) { this.target = GrpcPreconditions.CheckNotNull(target, "target"); this.options = CreateOptionsDictionary(options); @@ -91,6 +102,17 @@ namespace Grpc.Core GrpcEnvironment.RegisterChannel(this); } + /// + /// Creates a channel that connects to a specific host and port. + /// + /// The name or IP address of the host. + /// The port. + /// Credentials to secure the channel. + public Channel(string host, int port, ChannelCredentials credentials) : + this(host, port, credentials, null) + { + } + /// /// Creates a channel that connects to a specific host and port. /// @@ -98,7 +120,7 @@ namespace Grpc.Core /// The port. /// Credentials to secure the channel. /// Channel options. - public Channel(string host, int port, ChannelCredentials credentials, IEnumerable options = null) : + public Channel(string host, int port, ChannelCredentials credentials, IEnumerable options) : this(string.Format("{0}:{1}", host, port), credentials, options) { } diff --git a/src/csharp/Grpc.Core/Server.cs b/src/csharp/Grpc.Core/Server.cs index e3468ee8420..ae7a8c9a9a1 100644 --- a/src/csharp/Grpc.Core/Server.cs +++ b/src/csharp/Grpc.Core/Server.cs @@ -67,11 +67,19 @@ namespace Grpc.Core bool startRequested; volatile bool shutdownRequested; + + /// + /// Creates a new server. + /// + public Server() : this(null) + { + } + /// - /// Create a new server. + /// Creates a new server. /// /// Channel options. - public Server(IEnumerable options = null) + public Server(IEnumerable options) { this.serviceDefinitions = new ServiceDefinitionCollection(this); this.ports = new ServerPortCollection(this); From d4b4009c3773a31e5fe48fb6cc0a6f9d859781a4 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Mon, 6 Jun 2016 17:03:05 -0700 Subject: [PATCH 0908/1894] Use Python namespace packages Before, namespace packages would break in auditwheel due to a superfluous check (fixed in the commit referenced in the Dockerfiles). Now, the auditwheel used in the manylinux1-support Docker images can handle namespace packages, and we may thus use them. This should alleviate future user pain w.r.t. installation of grpcio-tools causing loss of grpcio files and vice versa (e.g. requiring a reinstall of grpcio following installation of grpcio-tools). --- setup.py | 3 +-- tools/distrib/python/grpcio_tools/setup.py | 3 +-- .../grpc_artifact_python_manylinux_x64/Dockerfile | 7 +++++++ .../grpc_artifact_python_manylinux_x86/Dockerfile | 7 +++++++ 4 files changed, 16 insertions(+), 4 deletions(-) diff --git a/setup.py b/setup.py index f96824fa883..88f859246a8 100644 --- a/setup.py +++ b/setup.py @@ -234,8 +234,7 @@ setuptools.setup( ext_modules=CYTHON_EXTENSION_MODULES, packages=list(PACKAGES), package_dir=PACKAGE_DIRECTORIES, - # TODO(atash): Figure out why auditwheel doesn't like namespace packages. - #namespace_packages=['grpc'], + namespace_packages=['grpc'], package_data=PACKAGE_DATA, install_requires=INSTALL_REQUIRES, setup_requires=SETUP_REQUIRES, diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py index 576f7ae32a5..bb08ceaadad 100644 --- a/tools/distrib/python/grpcio_tools/setup.py +++ b/tools/distrib/python/grpcio_tools/setup.py @@ -88,8 +88,7 @@ setuptools.setup( protoc_ext_module(), ]), packages=setuptools.find_packages('.'), - # TODO(atash): Figure out why auditwheel doesn't like namespace packages. - #namespace_packages=['grpc'], + namespace_packages=['grpc'], install_requires=[ 'protobuf>=3.0.0a3', ], diff --git a/tools/dockerfile/grpc_artifact_python_manylinux_x64/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux_x64/Dockerfile index 3e31a2b623d..1d4e8e1a4a4 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux_x64/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_manylinux_x64/Dockerfile @@ -41,3 +41,10 @@ RUN /opt/python/cp27-cp27mu/bin/pip install cython RUN /opt/python/cp34-cp34m/bin/pip install cython RUN /opt/python/cp35-cp35m/bin/pip install cython +#################################################### +# Install auditwheel with fix for namespace packages +RUN git clone https://github.com/pypa/auditwheel /usr/local/src/auditwheel +RUN cd /usr/local/src/auditwheel && git checkout bf071b38c9fe78b025ea05c78b1cb61d7cb09939 +RUN /opt/python/cp35-cp35m/bin/pip install /usr/local/src/auditwheel +RUN rm /usr/local/bin/auditwheel +RUN cd /usr/local/bin && ln -s /opt/python/cp35-cp35m/bin/auditwheel diff --git a/tools/dockerfile/grpc_artifact_python_manylinux_x86/Dockerfile b/tools/dockerfile/grpc_artifact_python_manylinux_x86/Dockerfile index 5fe62c28b73..810499695ec 100644 --- a/tools/dockerfile/grpc_artifact_python_manylinux_x86/Dockerfile +++ b/tools/dockerfile/grpc_artifact_python_manylinux_x86/Dockerfile @@ -41,3 +41,10 @@ RUN /opt/python/cp27-cp27mu/bin/pip install cython RUN /opt/python/cp34-cp34m/bin/pip install cython RUN /opt/python/cp35-cp35m/bin/pip install cython +#################################################### +# Install auditwheel with fix for namespace packages +RUN git clone https://github.com/pypa/auditwheel /usr/local/src/auditwheel +RUN cd /usr/local/src/auditwheel && git checkout bf071b38c9fe78b025ea05c78b1cb61d7cb09939 +RUN /opt/python/cp35-cp35m/bin/pip install /usr/local/src/auditwheel +RUN rm /usr/local/bin/auditwheel +RUN cd /usr/local/bin && ln -s /opt/python/cp35-cp35m/bin/auditwheel From 571c12ef18ab9021bfaadac3434c5321d6297c38 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Mon, 6 Jun 2016 23:13:27 -0700 Subject: [PATCH 0909/1894] Remove AsyncStreaming client from python qps tests --- .../grpcio/tests/qps/benchmark_client.py | 45 ------------------- src/python/grpcio/tests/qps/qps_worker.py | 4 +- src/python/grpcio/tests/qps/worker_server.py | 5 +-- .../run_tests/performance/scenario_config.py | 8 ++-- 4 files changed, 7 insertions(+), 55 deletions(-) diff --git a/src/python/grpcio/tests/qps/benchmark_client.py b/src/python/grpcio/tests/qps/benchmark_client.py index b372ea01ade..aac218ed819 100644 --- a/src/python/grpcio/tests/qps/benchmark_client.py +++ b/src/python/grpcio/tests/qps/benchmark_client.py @@ -185,48 +185,3 @@ class StreamingSyncBenchmarkClient(BenchmarkClient): yield request except queue.Empty: pass - - -class AsyncReceiver(face.ResponseReceiver): - """Receiver for async stream responses.""" - - def __init__(self, send_time_queue, response_handler): - self._send_time_queue = send_time_queue - self._response_handler = response_handler - - def initial_metadata(self, initial_mdetadata): - pass - - def response(self, response): - end_time = time.time() - self._response_handler(end_time - self._send_time_queue.get_nowait()) - - def complete(self, terminal_metadata, code, details): - pass - - -class StreamingAsyncBenchmarkClient(BenchmarkClient): - - def __init__(self, server, config, hist): - super(StreamingAsyncBenchmarkClient, self).__init__(server, config, hist) - self._send_time_queue = queue.Queue() - self._receiver = AsyncReceiver(self._send_time_queue, self._handle_response) - self._rendezvous = None - - def send_request(self): - if self._rendezvous is not None: - self._send_time_queue.put(time.time()) - self._rendezvous.consume(self._request) - - def start(self): - if self._generic: - stream_callable = self._stub.stream_stream( - 'grpc.testing.BenchmarkService', 'StreamingCall') - else: - stream_callable = self._stub.StreamingCall - self._rendezvous = stream_callable.event( - self._receiver, lambda *args: None, _TIMEOUT) - - def stop(self): - self._rendezvous.terminate() - self._rendezvous = None diff --git a/src/python/grpcio/tests/qps/qps_worker.py b/src/python/grpcio/tests/qps/qps_worker.py index 3dda718638e..16926379a5b 100644 --- a/src/python/grpcio/tests/qps/qps_worker.py +++ b/src/python/grpcio/tests/qps/qps_worker.py @@ -43,9 +43,7 @@ def run_worker_server(port): server.add_insecure_port('[::]:{}'.format(port)) server.start() servicer.wait_for_quit() - # Drain outstanding requests for clean exit - time.sleep(2) - server.stop(0) + server.stop(2) if __name__ == '__main__': diff --git a/src/python/grpcio/tests/qps/worker_server.py b/src/python/grpcio/tests/qps/worker_server.py index 1f9af5482cc..d41f8377c2a 100644 --- a/src/python/grpcio/tests/qps/worker_server.py +++ b/src/python/grpcio/tests/qps/worker_server.py @@ -153,9 +153,8 @@ class WorkerServer(services_pb2.BetaWorkerServiceServicer): if config.rpc_type == control_pb2.UNARY: client = benchmark_client.UnaryAsyncBenchmarkClient( server, config, qps_data) - elif config.rpc_type == control_pb2.STREAMING: - client = benchmark_client.StreamingAsyncBenchmarkClient( - server, config, qps_data) + else: + raise Exception('Async streaming client not supported') else: raise Exception('Unsupported client type {}'.format(config.client_type)) diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index b55d728d840..81569e8b7a4 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -395,8 +395,8 @@ class PythonLanguage: # categories=[SMOKETEST]) yield _ping_pong_scenario( - 'python_protobuf_async_streaming_ping_pong', rpc_type='STREAMING', - client_type='ASYNC_CLIENT', server_type='SYNC_SERVER') + 'python_protobuf_sync_streaming_ping_pong', rpc_type='STREAMING', + client_type='SYNC_CLIENT', server_type='SYNC_SERVER') yield _ping_pong_scenario( 'python_protobuf_async_unary_ping_pong', rpc_type='UNARY', @@ -413,8 +413,8 @@ class PythonLanguage: unconstrained_client='sync') yield _ping_pong_scenario( - 'python_protobuf_async_streaming_qps_unconstrained', rpc_type='STREAMING', - client_type='ASYNC_CLIENT', server_type='SYNC_SERVER', + 'python_protobuf_sync_streaming_qps_unconstrained', rpc_type='STREAMING', + client_type='SYNC_CLIENT', server_type='SYNC_SERVER', unconstrained_client='async') yield _ping_pong_scenario( From 0cf4defa42dfd0e1f09ea3e1fae7c111a673244f Mon Sep 17 00:00:00 2001 From: Alistair Veitch Date: Tue, 7 Jun 2016 08:59:30 -0700 Subject: [PATCH 0910/1894] simplify base resource definition; misc comment updates --- src/core/ext/census/base_resources.c | 119 ++++------------------ src/core/ext/census/base_resources.h | 4 +- src/core/ext/census/resource.c | 142 +++++++++++++++++++-------- src/core/ext/census/resource.h | 29 +++++- 4 files changed, 148 insertions(+), 146 deletions(-) diff --git a/src/core/ext/census/base_resources.c b/src/core/ext/census/base_resources.c index 8f0329a72bd..f1ee41c5d97 100644 --- a/src/core/ext/census/base_resources.c +++ b/src/core/ext/census/base_resources.c @@ -30,15 +30,15 @@ * */ +#include "base_resources.h" + #include #include #include #include -#include "base_resources.h" -#include "gen/census.pb.h" -#include "third_party/nanopb/pb_encode.h" +#include "resource.h" // Add base RPC resource definitions for use by RPC runtime. // @@ -48,101 +48,24 @@ // file, which is compiled to .pb format and read by still-to-be-written // configuration functions. -// Structure representing a MeasurementUnit proto. -typedef struct { - int32_t prefix; - int n_numerators; - const google_census_Resource_BasicUnit *numerators; - int n_denominators; - const google_census_Resource_BasicUnit *denominators; -} measurement_unit; - -// Encode a nanopb string. Expects the string argument to be passed in as `arg`. -static bool encode_string(pb_ostream_t *stream, const pb_field_t *field, - void *const *arg) { - if (!pb_encode_tag_for_field(stream, field)) { - return false; - } - return pb_encode_string(stream, (uint8_t *)*arg, strlen((const char *)*arg)); -} - -// Encode the numerators part of a measurement_unit (passed in as `arg`). -static bool encode_numerators(pb_ostream_t *stream, const pb_field_t *field, - void *const *arg) { - const measurement_unit *mu = (const measurement_unit *)*arg; - for (int i = 0; i < mu->n_numerators; i++) { - if (!pb_encode_tag_for_field(stream, field)) { - return false; - } - if (!pb_encode_varint(stream, mu->numerators[i])) { - return false; - } - } - return true; -} - -// Encode the denominators part of a measurement_unit (passed in as `arg`). -static bool encode_denominators(pb_ostream_t *stream, const pb_field_t *field, - void *const *arg) { - const measurement_unit *mu = (const measurement_unit *)*arg; - for (int i = 0; i < mu->n_denominators; i++) { - if (!pb_encode_tag_for_field(stream, field)) { - return false; - } - if (!pb_encode_varint(stream, mu->numerators[i])) { - return false; - } - } - return true; -} - -// Define a Resource, given the important details. Encodes a protobuf, which -// is then passed to census_define_resource. -static void define_resource(const char *name, const char *description, - const measurement_unit *unit) { - // nanopb generated type for Resource. Initialize encoding functions to NULL - // since we can't directly initialize them due to embedded union in struct. - google_census_Resource resource = { - {{NULL}, (void *)name}, - {{NULL}, (void *)description}, - true, // has_unit - {true, unit->prefix, {{NULL}, (void *)unit}, {{NULL}, (void *)unit}}}; - resource.name.funcs.encode = &encode_string; - resource.description.funcs.encode = &encode_string; - resource.unit.numerator.funcs.encode = &encode_numerators; - resource.unit.denominator.funcs.encode = &encode_denominators; - - // Buffer for storing encoded proto. - uint8_t buffer[512]; - pb_ostream_t stream = pb_ostream_from_buffer(buffer, 512); - if (!pb_encode(&stream, google_census_Resource_fields, &resource)) { - gpr_log(GPR_ERROR, "Error encoding resource %s.", name); - return; - } - int32_t mid = census_define_resource(buffer, stream.bytes_written); - if (mid < 0) { - gpr_log(GPR_ERROR, "Error defining resource %s.", name); - } -} - -// Define a resource for client RPC latency. -static void define_client_rpc_latency_resource() { - google_census_Resource_BasicUnit numerator = - google_census_Resource_BasicUnit_SECS; - measurement_unit unit = {0, 1, &numerator, 0, NULL}; - define_resource("client_rpc_latency", "Client RPC latency in seconds", &unit); -} - -// Define a resource for server RPC latency. -static void define_server_rpc_latency_resource() { - google_census_Resource_BasicUnit numerator = - google_census_Resource_BasicUnit_SECS; - measurement_unit unit = {0, 1, &numerator, 0, NULL}; - define_resource("server_rpc_latency", "Server RPC latency in seconds", &unit); -} - // Define all base resources. This should be called by census initialization. void define_base_resources() { - define_client_rpc_latency_resource(); - define_server_rpc_latency_resource(); + google_census_Resource_BasicUnit numerator = + google_census_Resource_BasicUnit_SECS; + resource r = {"client_rpc_latency", // name + "Client RPC latency in seconds", // description + 0, // prefix + 1, // n_numerators + &numerator, // numerators + 0, // n_denominators + NULL}; // denominators + define_resource(&r); + r = (resource){"server_rpc_latency", // name + "Server RPC latency in seconds", // description + 0, // prefix + 1, // n_numerators + &numerator, // numerators + 0, // n_denominators + NULL}; // denominators + define_resource(&r); } diff --git a/src/core/ext/census/base_resources.h b/src/core/ext/census/base_resources.h index 992e5f6ebea..e5a7696db43 100644 --- a/src/core/ext/census/base_resources.h +++ b/src/core/ext/census/base_resources.h @@ -33,7 +33,7 @@ #ifndef GRPC_CORE_EXT_CENSUS_BASE_RESOURCES_H #define GRPC_CORE_EXT_CENSUS_BASE_RESOURCES_H -// Define all base resources. This should be called by census initialization. +/* Define all base resources. This should be called by census initialization. */ void define_base_resources(); -#endif // GRPC_CORE_EXT_CENSUS_BASE_RESOURCES_H +#endif /* GRPC_CORE_EXT_CENSUS_BASE_RESOURCES_H */ diff --git a/src/core/ext/census/resource.c b/src/core/ext/census/resource.c index 632b899e415..0ca0db94bad 100644 --- a/src/core/ext/census/resource.c +++ b/src/core/ext/census/resource.c @@ -32,7 +32,6 @@ */ #include "resource.h" -#include "gen/census.pb.h" #include "third_party/nanopb/pb_decode.h" #include @@ -43,13 +42,6 @@ #include #include -// Internal representation of a resource. -typedef struct { - char *name; - // Pointer to raw protobuf used in resource definition. - uint8_t *raw_pb; -} resource; - // Protect local resource data structures. static gpr_mu resource_lock; @@ -65,7 +57,7 @@ static size_t n_resources = 0; // Number of defined resources static size_t n_defined_resources = 0; -void initialize_resources() { +void initialize_resources(void) { gpr_mu_init(&resource_lock); gpr_mu_lock(&resource_lock); GPR_ASSERT(resources == NULL && n_resources == 0 && n_defined_resources == 0); @@ -78,16 +70,17 @@ void initialize_resources() { // Delete a resource given it's ID. Must be called with resource_lock held. static void delete_resource_locked(size_t rid) { - GPR_ASSERT(resources[rid] != NULL && resources[rid]->raw_pb != NULL && - resources[rid]->name != NULL && n_defined_resources > 0); + GPR_ASSERT(resources[rid] != NULL); gpr_free(resources[rid]->name); - gpr_free(resources[rid]->raw_pb); + gpr_free(resources[rid]->description); + gpr_free(resources[rid]->numerators); + gpr_free(resources[rid]->denominators); gpr_free(resources[rid]); resources[rid] = NULL; n_defined_resources--; } -void shutdown_resources() { +void shutdown_resources(void) { gpr_mu_lock(&resource_lock); for (size_t i = 0; i < n_resources; i++) { if (resources[i] != NULL) { @@ -128,8 +121,13 @@ static bool validate_string(pb_istream_t *stream, const pb_field_t *field, } break; case google_census_Resource_description_tag: - // Description is optional, does not need validating, just skip. - if (!pb_read(stream, NULL, stream->bytes_left)) { + if (stream->bytes_left == 0) { + return true; + } + vresource->description = gpr_malloc(stream->bytes_left + 1); + vresource->description[stream->bytes_left] = '\0'; + if (!pb_read(stream, (uint8_t *)vresource->description, + stream->bytes_left)) { return false; } break; @@ -144,17 +142,47 @@ static bool validate_string(pb_istream_t *stream, const pb_field_t *field, return true; } +// Decode numerators/denominators in a stream. The `count` and `bup` +// (BasicUnit pointer) are pointers to the approriate fields in a resource +// struct. +static bool validate_units_helper(pb_istream_t *stream, int *count, + google_census_Resource_BasicUnit **bup) { + while (stream->bytes_left) { + (*count)++; + // Have to allocate a new array of values. Normal case is 0 or 1, so + // this should normally not be an issue. + google_census_Resource_BasicUnit *new_bup = + gpr_malloc((size_t)*count * sizeof(google_census_Resource_BasicUnit)); + if (*count != 1) { + memcpy(new_bup, *bup, + (size_t)(*count - 1) * sizeof(google_census_Resource_BasicUnit)); + gpr_free(*bup); + } + *bup = new_bup; + if (!pb_decode_varint(stream, (uint64_t *)(*bup + *count - 1))) { + return false; + } + } + return true; +} + // Validate units field of a Resource proto. static bool validate_units(pb_istream_t *stream, const pb_field_t *field, void **arg) { - if (field->tag == google_census_Resource_MeasurementUnit_numerator_tag) { - *(bool *)*arg = true; // has_numerator = true. - } - while (stream->bytes_left) { - uint64_t value; - if (!pb_decode_varint(stream, &value)) { + resource *vresource = (resource *)(*arg); + switch (field->tag) { + case google_census_Resource_MeasurementUnit_numerator_tag: + return validate_units_helper(stream, &vresource->n_numerators, + &vresource->numerators); + break; + case google_census_Resource_MeasurementUnit_denominator_tag: + return validate_units_helper(stream, &vresource->n_denominators, + &vresource->denominators); + break; + default: + gpr_log(GPR_ERROR, "Unknown field type."); return false; - } + break; } return true; } @@ -170,10 +198,11 @@ static bool validate_resource_pb(const uint8_t *resource_pb, vresource.name.funcs.decode = &validate_string; vresource.name.arg = resources[id]; vresource.description.funcs.decode = &validate_string; + vresource.description.arg = resources[id]; vresource.unit.numerator.funcs.decode = &validate_units; - bool has_numerator = false; - vresource.unit.numerator.arg = &has_numerator; + vresource.unit.numerator.arg = resources[id]; vresource.unit.denominator.funcs.decode = &validate_units; + vresource.unit.denominator.arg = resources[id]; pb_istream_t stream = pb_istream_from_buffer((uint8_t *)resource_pb, resource_pb_size); @@ -181,17 +210,15 @@ static bool validate_resource_pb(const uint8_t *resource_pb, return false; } // A Resource must have a name, a unit, with at least one numerator. - return (resources[id]->name != NULL && vresource.has_unit && has_numerator); + return (resources[id]->name != NULL && vresource.has_unit && + resources[id]->n_numerators > 0); } -int32_t census_define_resource(const uint8_t *resource_pb, - size_t resource_pb_size) { +// Allocate a blank resource, and return associated ID. Must be called with +// resource_lock held. +size_t allocate_resource(void) { // use next_id to optimize expected placement of next new resource. static size_t next_id = 0; - if (resource_pb == NULL) { - return -1; - } - gpr_mu_lock(&resource_lock); size_t id = n_resources; // resource ID - initialize to invalid value. // Expand resources if needed. if (n_resources == n_defined_resources) { @@ -212,22 +239,25 @@ int32_t census_define_resource(const uint8_t *resource_pb, } GPR_ASSERT(id < n_resources && resources[id] == NULL); resources[id] = gpr_malloc(sizeof(resource)); - resources[id]->name = NULL; + memset(resources[id], 0, sizeof(resource)); + n_defined_resources++; + next_id = (id + 1) % n_resources; + return id; +} + +int32_t census_define_resource(const uint8_t *resource_pb, + size_t resource_pb_size) { + if (resource_pb == NULL) { + return -1; + } + gpr_mu_lock(&resource_lock); + size_t id = allocate_resource(); // Validate pb, extract name. if (!validate_resource_pb(resource_pb, resource_pb_size, id)) { - if (resources[id]->name != NULL) { - gpr_free(resources[id]->name); - } - gpr_free(resources[id]); - resources[id] = NULL; + delete_resource_locked(id); gpr_mu_unlock(&resource_lock); return -1; } - next_id = (id + 1) % n_resources; - // Make copy of raw proto, and return. - resources[id]->raw_pb = gpr_malloc(resource_pb_size); - memcpy(resources[id]->raw_pb, resource_pb, resource_pb_size); - n_defined_resources++; gpr_mu_unlock(&resource_lock); return (int32_t)id; } @@ -253,3 +283,31 @@ int32_t census_resource_id(const char *name) { gpr_mu_unlock(&resource_lock); return -1; } + +int32_t define_resource(const resource *base) { + GPR_ASSERT(base != NULL && base->name != NULL && base->n_numerators > 0 && + base->numerators != NULL); + gpr_mu_lock(&resource_lock); + size_t id = allocate_resource(); + size_t len = strlen(base->name) + 1; + resources[id]->name = gpr_malloc(len); + memcpy(resources[id]->name, base->name, len); + if (base->description) { + len = strlen(base->description); + resources[id]->description = gpr_malloc(len); + memcpy(resources[id]->description, base->description, len); + } + resources[id]->prefix = base->prefix; + resources[id]->n_numerators = base->n_numerators; + len = (size_t)base->n_numerators * sizeof(*base->numerators); + resources[id]->numerators = gpr_malloc(len); + memcpy(resources[id]->numerators, base->numerators, len); + resources[id]->n_denominators = base->n_denominators; + if (base->n_denominators != 0) { + len = (size_t)base->n_denominators * sizeof(*base->denominators); + resources[id]->denominators = gpr_malloc(len); + memcpy(resources[id]->denominators, base->denominators, len); + } + gpr_mu_unlock(&resource_lock); + return (int32_t)id; +} diff --git a/src/core/ext/census/resource.h b/src/core/ext/census/resource.h index 5ad5a0f7a0c..a0669f3a39b 100644 --- a/src/core/ext/census/resource.h +++ b/src/core/ext/census/resource.h @@ -31,12 +31,33 @@ * */ -// Census-internal resource definition and manipluation functions. +/* Census-internal resource definition and manipluation functions. */ #ifndef GRPC_CORE_EXT_CENSUS_RESOURCE_H #define GRPC_CORE_EXT_CENSUS_RESOURCE_H -// Initialize and shutdown the resources subsystem. -void initialize_resources(); -void shutdown_resources(); +#include +#include "gen/census.pb.h" + +/* Internal representation of a resource. */ +typedef struct { + char *name; + char *description; + int32_t prefix; + int n_numerators; + google_census_Resource_BasicUnit *numerators; + int n_denominators; + google_census_Resource_BasicUnit *denominators; +} resource; + +/* Initialize and shutdown the resources subsystem. */ +void initialize_resources(void); +void shutdown_resources(void); + +/* Add a new resource, given a proposed resource structure. Returns the + resource ID, or -ve on failure. + TODO(aveitch): this function exists to support addition of the base + resources. It should be removed when we have the ability to add resources + from configuration files. */ +int32_t define_resource(const resource *base); #endif /* GRPC_CORE_EXT_CENSUS_RESOURCE_H */ From 000aa457dccfb684136635647ff42b1fce58073f Mon Sep 17 00:00:00 2001 From: yang-g Date: Tue, 7 Jun 2016 13:08:39 -0700 Subject: [PATCH 0911/1894] add a test with empty request --- test/cpp/end2end/end2end_test.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index f52aa52f39f..e3667cf26bd 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -1014,6 +1014,16 @@ TEST_P(ProxyEnd2endTest, SimpleRpc) { SendRpc(stub_.get(), 1, false); } +TEST_P(ProxyEnd2endTest, SimpleRpcWithEmptyMessages) { + ResetStub(); + EchoRequest request; + EchoResponse response; + + ClientContext context; + Status s = stub_->Echo(&context, request, &response); + EXPECT_TRUE(s.ok()); +} + TEST_P(ProxyEnd2endTest, MultipleRpcs) { ResetStub(); std::vector threads; From 2569ebd64f551563d038463241976070ef7d1674 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 7 Jun 2016 13:13:01 -0700 Subject: [PATCH 0912/1894] Fix windows include --- src/core/lib/iomgr/error.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index d0a38c7fbd8..fb2caf919e4 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -44,7 +44,7 @@ #include #ifdef GPR_WIN32 -#include +#include #endif static void destroy_integer(void *key) {} @@ -510,14 +510,14 @@ grpc_error *grpc_os_error(const char *file, int line, int err, #ifdef GPR_WINDOWS grpc_error *grpc_wsa_error(const char *file, int line, int err, const char *call_name) { - const char *utf8_message = gpr_format_message(err); + char *utf8_message = gpr_format_message(err); grpc_error *error = grpc_error_set_str( grpc_error_set_str( grpc_error_set_int(grpc_error_create(file, line, "OS Error", NULL, 0), GRPC_ERROR_INT_WSA_ERROR, err), GRPC_ERROR_STR_OS_ERROR, utf8_message), GRPC_ERROR_STR_SYSCALL, call_name); - gpr_free((void *)utf8_message); + gpr_free(utf8_message); return error; } #endif From 5cdc9b9181b990a29cffaf797e3396d25017cd1e Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Tue, 7 Jun 2016 13:24:35 -0700 Subject: [PATCH 0913/1894] added comment about host parameter format (issue 4147) --- src/objective-c/GRPCClient/GRPCCall.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/objective-c/GRPCClient/GRPCCall.h b/src/objective-c/GRPCClient/GRPCCall.h index 7a77ae60b6a..b9e741dfa8f 100644 --- a/src/objective-c/GRPCClient/GRPCCall.h +++ b/src/objective-c/GRPCClient/GRPCCall.h @@ -220,6 +220,8 @@ extern id const kGRPCTrailersKey; * messages to the response side of the call indefinitely (depending on the semantics of the * specific remote method called). * To finish a call right away, invoke cancel. + * host parameter should not contain the scheme (http:// or https://), only the name or IP addr + * and the port number, for example @"localhost:5050". */ - (instancetype)initWithHost:(NSString *)host path:(NSString *)path From b43bda43ec86607449e446de37c4d357a437589c Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Tue, 7 Jun 2016 13:40:36 -0700 Subject: [PATCH 0914/1894] added comment about host parameter format (issue 4147) --- src/objective-c/ProtoRPC/ProtoRPC.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/objective-c/ProtoRPC/ProtoRPC.h b/src/objective-c/ProtoRPC/ProtoRPC.h index bd926b73287..642b8890ffb 100644 --- a/src/objective-c/ProtoRPC/ProtoRPC.h +++ b/src/objective-c/ProtoRPC/ProtoRPC.h @@ -38,6 +38,10 @@ @interface ProtoRPC : GRPCCall +/* + * host parameter should not contain the scheme (http:// or https://), only the name or IP addr + * and the port number, for example @"localhost:5050". + */ - (instancetype)initWithHost:(NSString *)host method:(ProtoMethod *)method requestsWriter:(GRXWriter *)requestsWriter From 660f1fdaf3290bfc996062e63387aa7e938136cc Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 7 Jun 2016 13:43:55 -0700 Subject: [PATCH 0915/1894] Fix windows #define --- src/core/lib/iomgr/error.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index fb2caf919e4..edf71b20389 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -43,7 +43,7 @@ #include #include -#ifdef GPR_WIN32 +#ifdef GPR_WINDOWS #include #endif From c6bf5f79b27be43e9fd3ab82273b62303d593708 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Tue, 7 Jun 2016 14:41:01 -0700 Subject: [PATCH 0916/1894] Use deps instead of uses in build.yaml --- BUILD | 1 + Makefile | 10 +++++----- build.yaml | 4 ++-- tools/run_tests/sources_and_headers.json | 2 +- vsprojects/grpc.sln | 3 +++ .../grpc++_reflection/grpc++_reflection.vcxproj | 5 +++++ 6 files changed, 17 insertions(+), 8 deletions(-) diff --git a/BUILD b/BUILD index 312ec7df9c9..bde9df99bc3 100644 --- a/BUILD +++ b/BUILD @@ -1016,6 +1016,7 @@ cc_library( ".", ], deps = [ + ":grpc++", ], ) diff --git a/Makefile b/Makefile index c63b88fedf6..2e5e667c7e1 100644 --- a/Makefile +++ b/Makefile @@ -3435,18 +3435,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc++.$(SHARED_EXT) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_reflection.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_reflection.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc++-imp else -$(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_REFLECTION_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc++.$(SHARED_EXT) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc++ else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_reflection.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_reflection.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_REFLECTION_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc++ $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_reflection$(SHARED_VERSION).so endif diff --git a/build.yaml b/build.yaml index a9c2f3b5529..0376d2f86ca 100644 --- a/build.yaml +++ b/build.yaml @@ -914,8 +914,8 @@ libs: - src/cpp/ext/proto_server_reflection_plugin.cc - src/cpp/ext/reflection.grpc.pb.cc - src/cpp/ext/reflection.pb.cc - uses: - - grpc++_base + deps: + - grpc++ - name: grpc++_test_config build: private language: c++ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index f41bb09adb1..6110b024578 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4372,7 +4372,7 @@ }, { "deps": [ - "grpc++_base" + "grpc++" ], "headers": [ "include/grpc++/ext/proto_server_reflection_plugin.h", diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln index dcb5e212fa0..df6ffd8516e 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -97,6 +97,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_reflection", "vcxpro ProjectSection(myProperties) = preProject lib = "True" EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} = {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} + EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_unsecure", "vcxproj\.\grpc++_unsecure\grpc++_unsecure.vcxproj", "{6EE56155-DF7C-4F6E-BFC4-F6F776BEB211}" ProjectSection(myProperties) = preProject diff --git a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj index 75c9e8e5911..cbb7c7c76ff 100644 --- a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj +++ b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj @@ -164,6 +164,11 @@ + + + {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} + + From 150e5025cb6535eb1387bdf7482f5f61243cdd71 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Tue, 7 Jun 2016 15:00:20 -0700 Subject: [PATCH 0917/1894] added ** for doc autogen. --- src/objective-c/ProtoRPC/ProtoRPC.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objective-c/ProtoRPC/ProtoRPC.h b/src/objective-c/ProtoRPC/ProtoRPC.h index 642b8890ffb..170d8b9c689 100644 --- a/src/objective-c/ProtoRPC/ProtoRPC.h +++ b/src/objective-c/ProtoRPC/ProtoRPC.h @@ -38,7 +38,7 @@ @interface ProtoRPC : GRPCCall -/* +/** * host parameter should not contain the scheme (http:// or https://), only the name or IP addr * and the port number, for example @"localhost:5050". */ From 6e9fab5ed67106da998ec368e8882ba7a245a9b1 Mon Sep 17 00:00:00 2001 From: Adam Michalik Date: Wed, 27 Apr 2016 16:52:51 -0700 Subject: [PATCH 0918/1894] Add support for establishing client channel using existing FD --- include/grpc/grpc.h | 6 + .../chttp2/client/insecure/channel_create.c | 141 +++++++++++++++--- 2 files changed, 129 insertions(+), 18 deletions(-) diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 6f7a67b715e..163d5291d30 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -240,6 +240,12 @@ GRPCAPI char *grpc_channel_get_target(grpc_channel *channel); GRPCAPI grpc_channel *grpc_insecure_channel_create( const char *target, const grpc_channel_args *args, void *reserved); +/** Create a client channel to 'target' using file descriptor 'fd'. The 'target' + argument will be used to indicate the name for this channel. See the comment + for grpc_insecure_channel_create for description of 'args' argument. */ +GRPCAPI grpc_channel *grpc_insecure_channel_create_from_fd( + const char *target, int fd, const grpc_channel_args *args); + /** Create a lame client: this client fails every operation attempted on it. */ GRPCAPI grpc_channel *grpc_lame_client_channel_create( const char *target, grpc_status_code error_code, const char *error_message); diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index c5d3d8d9cc8..8ed216db7b2 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -33,6 +33,7 @@ #include +#include #include #include @@ -47,6 +48,7 @@ #include "src/core/lib/channel/compress_filter.h" #include "src/core/lib/channel/http_client_filter.h" #include "src/core/lib/iomgr/tcp_client.h" +#include "src/core/lib/iomgr/tcp_posix.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/channel.h" @@ -139,31 +141,31 @@ typedef struct { gpr_refcount refs; grpc_channel_args *merge_args; grpc_channel *master; -} client_channel_factory; +} client_tcp_channel_factory; -static void client_channel_factory_ref( +static void client_tcp_channel_factory_ref( grpc_client_channel_factory *cc_factory) { - client_channel_factory *f = (client_channel_factory *)cc_factory; + client_tcp_channel_factory *f = (client_tcp_channel_factory *)cc_factory; gpr_ref(&f->refs); } -static void client_channel_factory_unref( +static void client_tcp_channel_factory_unref( grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory) { - client_channel_factory *f = (client_channel_factory *)cc_factory; + client_tcp_channel_factory *f = (client_tcp_channel_factory *)cc_factory; if (gpr_unref(&f->refs)) { if (f->master != NULL) { GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, f->master, - "client_channel_factory"); + "client_tcp_channel_factory"); } grpc_channel_args_destroy(f->merge_args); gpr_free(f); } } -static grpc_subchannel *client_channel_factory_create_subchannel( +static grpc_subchannel *client_tcp_channel_factory_create_subchannel( grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, grpc_subchannel_args *args) { - client_channel_factory *f = (client_channel_factory *)cc_factory; + client_tcp_channel_factory *f = (client_tcp_channel_factory *)cc_factory; connector *c = gpr_malloc(sizeof(*c)); grpc_channel_args *final_args = grpc_channel_args_merge(args->args, f->merge_args); @@ -178,11 +180,11 @@ static grpc_subchannel *client_channel_factory_create_subchannel( return s; } -static grpc_channel *client_channel_factory_create_channel( +static grpc_channel *client_tcp_channel_factory_create_channel( grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, const char *target, grpc_client_channel_type type, grpc_channel_args *args) { - client_channel_factory *f = (client_channel_factory *)cc_factory; + client_tcp_channel_factory *f = (client_tcp_channel_factory *)cc_factory; grpc_channel_args *final_args = grpc_channel_args_merge(args, f->merge_args); grpc_channel *channel = grpc_channel_create(exec_ctx, target, final_args, GRPC_CLIENT_CHANNEL, NULL); @@ -190,7 +192,7 @@ static grpc_channel *client_channel_factory_create_channel( grpc_resolver *resolver = grpc_resolver_create(target, &f->base); if (!resolver) { GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, channel, - "client_channel_factory_create_channel"); + "client_tcp_channel_factory_create_channel"); return NULL; } @@ -201,10 +203,11 @@ static grpc_channel *client_channel_factory_create_channel( return channel; } -static const grpc_client_channel_factory_vtable client_channel_factory_vtable = - {client_channel_factory_ref, client_channel_factory_unref, - client_channel_factory_create_subchannel, - client_channel_factory_create_channel}; +static const grpc_client_channel_factory_vtable +client_tcp_channel_factory_vtable = + {client_tcp_channel_factory_ref, client_tcp_channel_factory_unref, + client_tcp_channel_factory_create_subchannel, + client_tcp_channel_factory_create_channel}; /* Create a client channel: Asynchronously: - resolve target @@ -219,13 +222,115 @@ grpc_channel *grpc_insecure_channel_create(const char *target, (target, args, reserved)); GPR_ASSERT(!reserved); - client_channel_factory *f = gpr_malloc(sizeof(*f)); + client_tcp_channel_factory *f = gpr_malloc(sizeof(*f)); memset(f, 0, sizeof(*f)); - f->base.vtable = &client_channel_factory_vtable; + f->base.vtable = &client_tcp_channel_factory_vtable; gpr_ref_init(&f->refs, 1); f->merge_args = grpc_channel_args_copy(args); - grpc_channel *channel = client_channel_factory_create_channel( + grpc_channel *channel = client_tcp_channel_factory_create_channel( + &exec_ctx, &f->base, target, GRPC_CLIENT_CHANNEL_TYPE_REGULAR, NULL); + if (channel != NULL) { + f->master = channel; + GRPC_CHANNEL_INTERNAL_REF(f->master, "grpc_insecure_channel_create"); + } + grpc_client_channel_factory_unref(&exec_ctx, &f->base); + + grpc_exec_ctx_finish(&exec_ctx); + + return channel; /* may be NULL */ +} + +typedef struct { + grpc_client_channel_factory base; + + int fd; + + gpr_refcount refs; + grpc_channel_args *merge_args; + grpc_channel *master; +} client_fd_channel_factory; + +static void client_fd_channel_factory_ref( + grpc_client_channel_factory *cc_factory) { + client_fd_channel_factory *f = (client_fd_channel_factory *)cc_factory; + gpr_ref(&f->refs); +} + +static void client_fd_channel_factory_unref( + grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory) { + client_fd_channel_factory *f = (client_fd_channel_factory *)cc_factory; + if (gpr_unref(&f->refs)) { + if (f->master != NULL) { + GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, f->master, + "client_fd_channel_factory"); + } + grpc_channel_args_destroy(f->merge_args); + gpr_free(f); + } +} + +static grpc_subchannel *client_fd_channel_factory_create_subchannel( + grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, + grpc_subchannel_args *args) { + return NULL; +} + +static grpc_channel *client_fd_channel_factory_create_channel( + grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, + const char *target, grpc_client_channel_type type, + grpc_channel_args *args) { + client_fd_channel_factory *f = (client_fd_channel_factory *)cc_factory; + + // FIXME(xyzzyz): hack to get the authority sent. + grpc_arg default_authority_arg; + default_authority_arg.type = GRPC_ARG_STRING; + default_authority_arg.key = GRPC_ARG_DEFAULT_AUTHORITY; + default_authority_arg.value.string = "test.authority"; + grpc_channel_args *merged_args = grpc_channel_args_merge(args, f->merge_args); + grpc_channel_args *final_args = grpc_channel_args_copy_and_add( + merged_args, &default_authority_arg, 1); + grpc_channel_args_destroy(merged_args); + + int flags = fcntl(f->fd, F_GETFL, 0); + GPR_ASSERT(fcntl(f->fd, F_SETFL, flags | O_NONBLOCK) == 0); + + grpc_endpoint *client = grpc_tcp_create( + grpc_fd_create(f->fd, "client"), GRPC_TCP_DEFAULT_READ_SLICE_SIZE, + "fd-client"); + + grpc_transport *transport = + grpc_create_chttp2_transport(exec_ctx, final_args, client, 1); + GPR_ASSERT(transport); + grpc_channel *channel = grpc_channel_create( + exec_ctx, target, final_args, GRPC_CLIENT_DIRECT_CHANNEL, transport); + grpc_channel_args_destroy(final_args); + grpc_chttp2_transport_start_reading(exec_ctx, transport, NULL, 0); + + return channel; +} + +static const grpc_client_channel_factory_vtable +client_fd_channel_factory_vtable = + {client_fd_channel_factory_ref, client_fd_channel_factory_unref, + client_fd_channel_factory_create_subchannel, + client_fd_channel_factory_create_channel}; + +grpc_channel *grpc_insecure_channel_create_from_fd( + const char *target, int fd, const grpc_channel_args *args) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + GRPC_API_TRACE( + "grpc_insecure_channel_create(target=%p, fd=%d, args=%p)", 3, + (target, fd, args)); + + client_fd_channel_factory *f = gpr_malloc(sizeof(*f)); + memset(f, 0, sizeof(*f)); + f->base.vtable = &client_fd_channel_factory_vtable; + gpr_ref_init(&f->refs, 1); + f->merge_args = grpc_channel_args_copy(args); + f->fd = fd; + + grpc_channel *channel = client_fd_channel_factory_create_channel( &exec_ctx, &f->base, target, GRPC_CLIENT_CHANNEL_TYPE_REGULAR, NULL); if (channel != NULL) { f->master = channel; From d9b8db6c170006f6f457728a4a80698e27839081 Mon Sep 17 00:00:00 2001 From: Adam Michalik Date: Thu, 28 Apr 2016 13:35:39 -0700 Subject: [PATCH 0919/1894] Create channel directly. --- .../chttp2/client/insecure/channel_create.c | 131 +++++------------- 1 file changed, 31 insertions(+), 100 deletions(-) diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index 8ed216db7b2..ded0721e943 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -141,31 +141,31 @@ typedef struct { gpr_refcount refs; grpc_channel_args *merge_args; grpc_channel *master; -} client_tcp_channel_factory; +} client_channel_factory; -static void client_tcp_channel_factory_ref( +static void client_channel_factory_ref( grpc_client_channel_factory *cc_factory) { - client_tcp_channel_factory *f = (client_tcp_channel_factory *)cc_factory; + client_channel_factory *f = (client_channel_factory *)cc_factory; gpr_ref(&f->refs); } -static void client_tcp_channel_factory_unref( +static void client_channel_factory_unref( grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory) { - client_tcp_channel_factory *f = (client_tcp_channel_factory *)cc_factory; + client_channel_factory *f = (client_channel_factory *)cc_factory; if (gpr_unref(&f->refs)) { if (f->master != NULL) { GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, f->master, - "client_tcp_channel_factory"); + "client_channel_factory"); } grpc_channel_args_destroy(f->merge_args); gpr_free(f); } } -static grpc_subchannel *client_tcp_channel_factory_create_subchannel( +static grpc_subchannel *client_channel_factory_create_subchannel( grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, grpc_subchannel_args *args) { - client_tcp_channel_factory *f = (client_tcp_channel_factory *)cc_factory; + client_channel_factory *f = (client_channel_factory *)cc_factory; connector *c = gpr_malloc(sizeof(*c)); grpc_channel_args *final_args = grpc_channel_args_merge(args->args, f->merge_args); @@ -180,11 +180,11 @@ static grpc_subchannel *client_tcp_channel_factory_create_subchannel( return s; } -static grpc_channel *client_tcp_channel_factory_create_channel( +static grpc_channel *client_channel_factory_create_channel( grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, const char *target, grpc_client_channel_type type, grpc_channel_args *args) { - client_tcp_channel_factory *f = (client_tcp_channel_factory *)cc_factory; + client_channel_factory *f = (client_channel_factory *)cc_factory; grpc_channel_args *final_args = grpc_channel_args_merge(args, f->merge_args); grpc_channel *channel = grpc_channel_create(exec_ctx, target, final_args, GRPC_CLIENT_CHANNEL, NULL); @@ -192,7 +192,7 @@ static grpc_channel *client_tcp_channel_factory_create_channel( grpc_resolver *resolver = grpc_resolver_create(target, &f->base); if (!resolver) { GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, channel, - "client_tcp_channel_factory_create_channel"); + "client_channel_factory_create_channel"); return NULL; } @@ -203,11 +203,10 @@ static grpc_channel *client_tcp_channel_factory_create_channel( return channel; } -static const grpc_client_channel_factory_vtable -client_tcp_channel_factory_vtable = - {client_tcp_channel_factory_ref, client_tcp_channel_factory_unref, - client_tcp_channel_factory_create_subchannel, - client_tcp_channel_factory_create_channel}; +static const grpc_client_channel_factory_vtable client_channel_factory_vtable = + {client_channel_factory_ref, client_channel_factory_unref, + client_channel_factory_create_subchannel, + client_channel_factory_create_channel}; /* Create a client channel: Asynchronously: - resolve target @@ -222,13 +221,13 @@ grpc_channel *grpc_insecure_channel_create(const char *target, (target, args, reserved)); GPR_ASSERT(!reserved); - client_tcp_channel_factory *f = gpr_malloc(sizeof(*f)); + client_channel_factory *f = gpr_malloc(sizeof(*f)); memset(f, 0, sizeof(*f)); - f->base.vtable = &client_tcp_channel_factory_vtable; + f->base.vtable = &client_channel_factory_vtable; gpr_ref_init(&f->refs, 1); f->merge_args = grpc_channel_args_copy(args); - grpc_channel *channel = client_tcp_channel_factory_create_channel( + grpc_channel *channel = client_channel_factory_create_channel( &exec_ctx, &f->base, target, GRPC_CLIENT_CHANNEL_TYPE_REGULAR, NULL); if (channel != NULL) { f->master = channel; @@ -241,102 +240,34 @@ grpc_channel *grpc_insecure_channel_create(const char *target, return channel; /* may be NULL */ } -typedef struct { - grpc_client_channel_factory base; - - int fd; - - gpr_refcount refs; - grpc_channel_args *merge_args; - grpc_channel *master; -} client_fd_channel_factory; - -static void client_fd_channel_factory_ref( - grpc_client_channel_factory *cc_factory) { - client_fd_channel_factory *f = (client_fd_channel_factory *)cc_factory; - gpr_ref(&f->refs); -} - -static void client_fd_channel_factory_unref( - grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory) { - client_fd_channel_factory *f = (client_fd_channel_factory *)cc_factory; - if (gpr_unref(&f->refs)) { - if (f->master != NULL) { - GRPC_CHANNEL_INTERNAL_UNREF(exec_ctx, f->master, - "client_fd_channel_factory"); - } - grpc_channel_args_destroy(f->merge_args); - gpr_free(f); - } -} - -static grpc_subchannel *client_fd_channel_factory_create_subchannel( - grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, - grpc_subchannel_args *args) { - return NULL; -} - -static grpc_channel *client_fd_channel_factory_create_channel( - grpc_exec_ctx *exec_ctx, grpc_client_channel_factory *cc_factory, - const char *target, grpc_client_channel_type type, - grpc_channel_args *args) { - client_fd_channel_factory *f = (client_fd_channel_factory *)cc_factory; +grpc_channel *grpc_insecure_channel_create_from_fd( + const char *target, int fd, const grpc_channel_args *args) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + GRPC_API_TRACE( + "grpc_insecure_channel_create(target=%p, fd=%d, args=%p)", 3, + (target, fd, args)); - // FIXME(xyzzyz): hack to get the authority sent. grpc_arg default_authority_arg; default_authority_arg.type = GRPC_ARG_STRING; default_authority_arg.key = GRPC_ARG_DEFAULT_AUTHORITY; default_authority_arg.value.string = "test.authority"; - grpc_channel_args *merged_args = grpc_channel_args_merge(args, f->merge_args); grpc_channel_args *final_args = grpc_channel_args_copy_and_add( - merged_args, &default_authority_arg, 1); - grpc_channel_args_destroy(merged_args); + args, &default_authority_arg, 1); - int flags = fcntl(f->fd, F_GETFL, 0); - GPR_ASSERT(fcntl(f->fd, F_SETFL, flags | O_NONBLOCK) == 0); + int flags = fcntl(fd, F_GETFL, 0); + GPR_ASSERT(fcntl(fd, F_SETFL, flags | O_NONBLOCK) == 0); grpc_endpoint *client = grpc_tcp_create( - grpc_fd_create(f->fd, "client"), GRPC_TCP_DEFAULT_READ_SLICE_SIZE, + grpc_fd_create(fd, "client"), GRPC_TCP_DEFAULT_READ_SLICE_SIZE, "fd-client"); grpc_transport *transport = - grpc_create_chttp2_transport(exec_ctx, final_args, client, 1); + grpc_create_chttp2_transport(&exec_ctx, final_args, client, 1); GPR_ASSERT(transport); grpc_channel *channel = grpc_channel_create( - exec_ctx, target, final_args, GRPC_CLIENT_DIRECT_CHANNEL, transport); + &exec_ctx, target, final_args, GRPC_CLIENT_DIRECT_CHANNEL, transport); grpc_channel_args_destroy(final_args); - grpc_chttp2_transport_start_reading(exec_ctx, transport, NULL, 0); - - return channel; -} - -static const grpc_client_channel_factory_vtable -client_fd_channel_factory_vtable = - {client_fd_channel_factory_ref, client_fd_channel_factory_unref, - client_fd_channel_factory_create_subchannel, - client_fd_channel_factory_create_channel}; - -grpc_channel *grpc_insecure_channel_create_from_fd( - const char *target, int fd, const grpc_channel_args *args) { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - GRPC_API_TRACE( - "grpc_insecure_channel_create(target=%p, fd=%d, args=%p)", 3, - (target, fd, args)); - - client_fd_channel_factory *f = gpr_malloc(sizeof(*f)); - memset(f, 0, sizeof(*f)); - f->base.vtable = &client_fd_channel_factory_vtable; - gpr_ref_init(&f->refs, 1); - f->merge_args = grpc_channel_args_copy(args); - f->fd = fd; - - grpc_channel *channel = client_fd_channel_factory_create_channel( - &exec_ctx, &f->base, target, GRPC_CLIENT_CHANNEL_TYPE_REGULAR, NULL); - if (channel != NULL) { - f->master = channel; - GRPC_CHANNEL_INTERNAL_REF(f->master, "grpc_insecure_channel_create"); - } - grpc_client_channel_factory_unref(&exec_ctx, &f->base); + grpc_chttp2_transport_start_reading(&exec_ctx, transport, NULL, 0); grpc_exec_ctx_finish(&exec_ctx); From 46cc2acc3e0b33b469ad1461a33d92985082d52a Mon Sep 17 00:00:00 2001 From: Adam Michalik Date: Mon, 16 May 2016 11:12:04 -0700 Subject: [PATCH 0920/1894] add tests --- Makefile | 56 + grpc.def | 1 + .../grpcio/grpc/_cython/imports.generated.c | 2 + .../grpcio/grpc/_cython/imports.generated.h | 3 + src/ruby/ext/grpc/rb_grpc_imports.generated.c | 2 + src/ruby/ext/grpc/rb_grpc_imports.generated.h | 3 + test/core/end2end/fixtures/h2_fd.c | 160 + test/core/end2end/gen_build_yaml.py | 15 +- tools/run_tests/sources_and_headers.json | 34 + tools/run_tests/tests.json | 3900 +++++++++++------ 10 files changed, 2872 insertions(+), 1304 deletions(-) create mode 100644 test/core/end2end/fixtures/h2_fd.c diff --git a/Makefile b/Makefile index 5a5dd5e242c..62bcd31724f 100644 --- a/Makefile +++ b/Makefile @@ -1103,6 +1103,7 @@ bad_ssl_cert_test: $(BINDIR)/$(CONFIG)/bad_ssl_cert_test h2_census_test: $(BINDIR)/$(CONFIG)/h2_census_test h2_compress_test: $(BINDIR)/$(CONFIG)/h2_compress_test h2_fakesec_test: $(BINDIR)/$(CONFIG)/h2_fakesec_test +h2_fd_test: $(BINDIR)/$(CONFIG)/h2_fd_test h2_full_test: $(BINDIR)/$(CONFIG)/h2_full_test h2_full+pipe_test: $(BINDIR)/$(CONFIG)/h2_full+pipe_test h2_full+trace_test: $(BINDIR)/$(CONFIG)/h2_full+trace_test @@ -1118,6 +1119,7 @@ h2_ssl_proxy_test: $(BINDIR)/$(CONFIG)/h2_ssl_proxy_test h2_uds_test: $(BINDIR)/$(CONFIG)/h2_uds_test h2_census_nosec_test: $(BINDIR)/$(CONFIG)/h2_census_nosec_test h2_compress_nosec_test: $(BINDIR)/$(CONFIG)/h2_compress_nosec_test +h2_fd_nosec_test: $(BINDIR)/$(CONFIG)/h2_fd_nosec_test h2_full_nosec_test: $(BINDIR)/$(CONFIG)/h2_full_nosec_test h2_full+pipe_nosec_test: $(BINDIR)/$(CONFIG)/h2_full+pipe_nosec_test h2_full+trace_nosec_test: $(BINDIR)/$(CONFIG)/h2_full+trace_nosec_test @@ -1335,6 +1337,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/h2_census_test \ $(BINDIR)/$(CONFIG)/h2_compress_test \ $(BINDIR)/$(CONFIG)/h2_fakesec_test \ + $(BINDIR)/$(CONFIG)/h2_fd_test \ $(BINDIR)/$(CONFIG)/h2_full_test \ $(BINDIR)/$(CONFIG)/h2_full+pipe_test \ $(BINDIR)/$(CONFIG)/h2_full+trace_test \ @@ -1350,6 +1353,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/h2_uds_test \ $(BINDIR)/$(CONFIG)/h2_census_nosec_test \ $(BINDIR)/$(CONFIG)/h2_compress_nosec_test \ + $(BINDIR)/$(CONFIG)/h2_fd_nosec_test \ $(BINDIR)/$(CONFIG)/h2_full_nosec_test \ $(BINDIR)/$(CONFIG)/h2_full+pipe_nosec_test \ $(BINDIR)/$(CONFIG)/h2_full+trace_nosec_test \ @@ -13554,6 +13558,38 @@ endif endif +H2_FD_TEST_SRC = \ + test/core/end2end/fixtures/h2_fd.c \ + +H2_FD_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(H2_FD_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/h2_fd_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/h2_fd_test: $(H2_FD_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(H2_FD_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/h2_fd_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_fd.o: $(LIBDIR)/$(CONFIG)/libend2end_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_h2_fd_test: $(H2_FD_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(H2_FD_TEST_OBJS:.o=.dep) +endif +endif + + H2_FULL_TEST_SRC = \ test/core/end2end/fixtures/h2_full.c \ @@ -14010,6 +14046,26 @@ ifneq ($(NO_DEPS),true) endif +H2_FD_NOSEC_TEST_SRC = \ + test/core/end2end/fixtures/h2_fd.c \ + +H2_FD_NOSEC_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(H2_FD_NOSEC_TEST_SRC)))) + + +$(BINDIR)/$(CONFIG)/h2_fd_nosec_test: $(H2_FD_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(H2_FD_NOSEC_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) -o $(BINDIR)/$(CONFIG)/h2_fd_nosec_test + +$(OBJDIR)/$(CONFIG)/test/core/end2end/fixtures/h2_fd.o: $(LIBDIR)/$(CONFIG)/libend2end_nosec_tests.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util_unsecure.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_h2_fd_nosec_test: $(H2_FD_NOSEC_TEST_OBJS:.o=.dep) + +ifneq ($(NO_DEPS),true) +-include $(H2_FD_NOSEC_TEST_OBJS:.o=.dep) +endif + + H2_FULL_NOSEC_TEST_SRC = \ test/core/end2end/fixtures/h2_full.c \ diff --git a/grpc.def b/grpc.def index 3477bd91ae8..b042a696b3e 100644 --- a/grpc.def +++ b/grpc.def @@ -67,6 +67,7 @@ EXPORTS grpc_census_call_get_context grpc_channel_get_target grpc_insecure_channel_create + grpc_insecure_channel_create_from_fd grpc_lame_client_channel_create grpc_channel_destroy grpc_call_cancel diff --git a/src/python/grpcio/grpc/_cython/imports.generated.c b/src/python/grpcio/grpc/_cython/imports.generated.c index c80ee66c061..42b754429d0 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.c +++ b/src/python/grpcio/grpc/_cython/imports.generated.c @@ -105,6 +105,7 @@ grpc_census_call_set_context_type grpc_census_call_set_context_import; grpc_census_call_get_context_type grpc_census_call_get_context_import; grpc_channel_get_target_type grpc_channel_get_target_import; grpc_insecure_channel_create_type grpc_insecure_channel_create_import; +grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; grpc_lame_client_channel_create_type grpc_lame_client_channel_create_import; grpc_channel_destroy_type grpc_channel_destroy_import; grpc_call_cancel_type grpc_call_cancel_import; @@ -376,6 +377,7 @@ void pygrpc_load_imports(HMODULE library) { grpc_census_call_get_context_import = (grpc_census_call_get_context_type) GetProcAddress(library, "grpc_census_call_get_context"); grpc_channel_get_target_import = (grpc_channel_get_target_type) GetProcAddress(library, "grpc_channel_get_target"); grpc_insecure_channel_create_import = (grpc_insecure_channel_create_type) GetProcAddress(library, "grpc_insecure_channel_create"); + grpc_insecure_channel_create_from_fd_import = (grpc_insecure_channel_create_from_fd_type) GetProcAddress(library, "grpc_insecure_channel_create_from_fd"); grpc_lame_client_channel_create_import = (grpc_lame_client_channel_create_type) GetProcAddress(library, "grpc_lame_client_channel_create"); grpc_channel_destroy_import = (grpc_channel_destroy_type) GetProcAddress(library, "grpc_channel_destroy"); grpc_call_cancel_import = (grpc_call_cancel_type) GetProcAddress(library, "grpc_call_cancel"); diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index 7b8e98d9bf7..556ebfb8485 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -265,6 +265,9 @@ extern grpc_channel_get_target_type grpc_channel_get_target_import; typedef grpc_channel *(*grpc_insecure_channel_create_type)(const char *target, const grpc_channel_args *args, void *reserved); extern grpc_insecure_channel_create_type grpc_insecure_channel_create_import; #define grpc_insecure_channel_create grpc_insecure_channel_create_import +typedef grpc_channel *(*grpc_insecure_channel_create_from_fd_type)(const char *target, int fd, const grpc_channel_args *args); +extern grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; +#define grpc_insecure_channel_create_from_fd grpc_insecure_channel_create_from_fd_import typedef grpc_channel *(*grpc_lame_client_channel_create_type)(const char *target, grpc_status_code error_code, const char *error_message); extern grpc_lame_client_channel_create_type grpc_lame_client_channel_create_import; #define grpc_lame_client_channel_create grpc_lame_client_channel_create_import diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index f76462649d2..9563f18b7e3 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -105,6 +105,7 @@ grpc_census_call_set_context_type grpc_census_call_set_context_import; grpc_census_call_get_context_type grpc_census_call_get_context_import; grpc_channel_get_target_type grpc_channel_get_target_import; grpc_insecure_channel_create_type grpc_insecure_channel_create_import; +grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; grpc_lame_client_channel_create_type grpc_lame_client_channel_create_import; grpc_channel_destroy_type grpc_channel_destroy_import; grpc_call_cancel_type grpc_call_cancel_import; @@ -372,6 +373,7 @@ void grpc_rb_load_imports(HMODULE library) { grpc_census_call_get_context_import = (grpc_census_call_get_context_type) GetProcAddress(library, "grpc_census_call_get_context"); grpc_channel_get_target_import = (grpc_channel_get_target_type) GetProcAddress(library, "grpc_channel_get_target"); grpc_insecure_channel_create_import = (grpc_insecure_channel_create_type) GetProcAddress(library, "grpc_insecure_channel_create"); + grpc_insecure_channel_create_from_fd_import = (grpc_insecure_channel_create_from_fd_type) GetProcAddress(library, "grpc_insecure_channel_create_from_fd"); grpc_lame_client_channel_create_import = (grpc_lame_client_channel_create_type) GetProcAddress(library, "grpc_lame_client_channel_create"); grpc_channel_destroy_import = (grpc_channel_destroy_type) GetProcAddress(library, "grpc_channel_destroy"); grpc_call_cancel_import = (grpc_call_cancel_type) GetProcAddress(library, "grpc_call_cancel"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index 5d690a915d8..87dead533da 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -265,6 +265,9 @@ extern grpc_channel_get_target_type grpc_channel_get_target_import; typedef grpc_channel *(*grpc_insecure_channel_create_type)(const char *target, const grpc_channel_args *args, void *reserved); extern grpc_insecure_channel_create_type grpc_insecure_channel_create_import; #define grpc_insecure_channel_create grpc_insecure_channel_create_import +typedef grpc_channel *(*grpc_insecure_channel_create_from_fd_type)(const char *target, int fd, const grpc_channel_args *args); +extern grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; +#define grpc_insecure_channel_create_from_fd grpc_insecure_channel_create_from_fd_import typedef grpc_channel *(*grpc_lame_client_channel_create_type)(const char *target, grpc_status_code error_code, const char *error_message); extern grpc_lame_client_channel_create_type grpc_lame_client_channel_create_import; #define grpc_lame_client_channel_create grpc_lame_client_channel_create_import diff --git a/test/core/end2end/fixtures/h2_fd.c b/test/core/end2end/fixtures/h2_fd.c new file mode 100644 index 00000000000..64ca75f7ff3 --- /dev/null +++ b/test/core/end2end/fixtures/h2_fd.c @@ -0,0 +1,160 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include "src/core/ext/client_config/client_channel.h" +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/compress_filter.h" +#include "src/core/lib/channel/connected_channel.h" +#include "src/core/lib/channel/http_client_filter.h" +#include "src/core/lib/channel/http_server_filter.h" +#include "src/core/lib/iomgr/endpoint_pair.h" +#include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/iomgr/socket_utils_posix.h" +#include "src/core/lib/iomgr/tcp_posix.h" +#include "src/core/lib/iomgr/unix_sockets_posix.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/server.h" +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" + +/* chttp2 transport that is immediately available (used for testing + connected_channel without a client_channel */ + +static void server_setup_transport(void *ts, grpc_transport *transport) { + grpc_end2end_test_fixture *f = ts; + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_server_setup_transport(&exec_ctx, f->server, transport, + grpc_server_get_channel_args(f->server)); + grpc_exec_ctx_finish(&exec_ctx); +} + +typedef struct { + int fd_pair[2]; +} sp_fixture_data; + + +static void create_sockets(int sv[2]) { + int flags; + grpc_create_socketpair_if_unix(sv); + flags = fcntl(sv[0], F_GETFL, 0); + GPR_ASSERT(fcntl(sv[0], F_SETFL, flags | O_NONBLOCK) == 0); + flags = fcntl(sv[1], F_GETFL, 0); + GPR_ASSERT(fcntl(sv[1], F_SETFL, flags | O_NONBLOCK) == 0); + GPR_ASSERT(grpc_set_socket_no_sigpipe_if_possible(sv[0])); + GPR_ASSERT(grpc_set_socket_no_sigpipe_if_possible(sv[1])); +} + +static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( + grpc_channel_args *client_args, grpc_channel_args *server_args) { + sp_fixture_data* fixture_data = gpr_malloc(sizeof(*fixture_data)); + + grpc_end2end_test_fixture f; + memset(&f, 0, sizeof(f)); + f.fixture_data = fixture_data; + f.cq = grpc_completion_queue_create(NULL); + + create_sockets(fixture_data->fd_pair); + + return f; +} + +static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f, + grpc_channel_args *client_args) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + sp_fixture_data *sfd = f->fixture_data; + + f->client = grpc_insecure_channel_create_from_fd( + "fixture_client", sfd->fd_pair[0], client_args); + GPR_ASSERT(f->client); + + grpc_exec_ctx_finish(&exec_ctx); +} + +static void chttp2_init_server_socketpair(grpc_end2end_test_fixture *f, + grpc_channel_args *server_args) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + sp_fixture_data *sfd = f->fixture_data; + grpc_transport *transport; + GPR_ASSERT(!f->server); + f->server = grpc_server_create(server_args, NULL); + grpc_server_register_completion_queue(f->server, f->cq, NULL); + grpc_server_start(f->server); + grpc_endpoint *server_endpoint = grpc_tcp_create( + grpc_fd_create(sfd->fd_pair[1], "fixture_server"), + 65536 /* read_slice_size */, "fixture_server"); + + transport = + grpc_create_chttp2_transport(&exec_ctx, server_args, server_endpoint, 0); + server_setup_transport(f, transport); + grpc_chttp2_transport_start_reading(&exec_ctx, transport, NULL, 0); + grpc_exec_ctx_finish(&exec_ctx); +} + +static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture *f) { + gpr_free(f->fixture_data); +} + +/* All test configurations */ +static grpc_end2end_test_config configs[] = { + {"chttp2/socketpair", 0, chttp2_create_fixture_socketpair, + chttp2_init_client_socketpair, chttp2_init_server_socketpair, + chttp2_tear_down_socketpair}, +}; + +int main(int argc, char **argv) { + size_t i; + + grpc_test_init(argc, argv); + grpc_end2end_tests_pre_init(); + grpc_init(); + + for (i = 0; i < sizeof(configs) / sizeof(*configs); i++) { + grpc_end2end_tests(argc, argv, configs[i]); + } + + grpc_shutdown(); + + return 0; +} diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index cf1ba7c68ee..98b7cf5dcd7 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -45,6 +45,8 @@ default_unsecure_fixture_options = FixtureOptions( socketpair_unsecure_fixture_options = default_unsecure_fixture_options._replace(fullstack=False, dns_resolver=False) default_secure_fixture_options = default_unsecure_fixture_options._replace(secure=True) uds_fixture_options = default_unsecure_fixture_options._replace(dns_resolver=False, platforms=['linux', 'mac', 'posix']) +fd_fixture_options = default_unsecure_fixture_options._replace( + dns_resolver=False, fullstack=False, platforms=['linux', 'mac', 'posix']) # maps fixture name to whether it requires the security library @@ -52,6 +54,7 @@ END2END_FIXTURES = { 'h2_compress': default_unsecure_fixture_options, 'h2_census': default_unsecure_fixture_options, 'h2_fakesec': default_secure_fixture_options._replace(ci_mac=False), + 'h2_fd': fd_fixture_options, 'h2_full': default_unsecure_fixture_options, 'h2_full+pipe': default_unsecure_fixture_options._replace( platforms=['linux']), @@ -73,7 +76,8 @@ END2END_FIXTURES = { } TestOptions = collections.namedtuple( - 'TestOptions', 'needs_fullstack needs_dns proxyable secure traceable cpu_cost') + 'TestOptions', + 'needs_fullstack needs_dns proxyable secure traceable cpu_cost') default_test_options = TestOptions(False, False, True, False, True, 1.0) connectivity_test_options = default_test_options._replace(needs_fullstack=True) @@ -90,8 +94,10 @@ END2END_TESTS = { 'cancel_before_invoke': default_test_options._replace(cpu_cost=LOWCPU), 'cancel_in_a_vacuum': default_test_options._replace(cpu_cost=LOWCPU), 'cancel_with_status': default_test_options._replace(cpu_cost=LOWCPU), - 'compressed_payload': default_test_options._replace(proxyable=False, cpu_cost=LOWCPU), - 'connectivity': connectivity_test_options._replace(proxyable=False, cpu_cost=LOWCPU), + 'compressed_payload': default_test_options._replace(proxyable=False, + cpu_cost=LOWCPU), + 'connectivity': connectivity_test_options._replace(proxyable=False, + cpu_cost=LOWCPU), 'default_host': default_test_options._replace(needs_fullstack=True, needs_dns=True), 'disappearing_server': connectivity_test_options, @@ -117,7 +123,8 @@ END2END_TESTS = { 'server_finishes_request': default_test_options, 'shutdown_finishes_calls': default_test_options, 'shutdown_finishes_tags': default_test_options, - 'simple_delayed_request': connectivity_test_options._replace(cpu_cost=LOWCPU), + 'simple_delayed_request': connectivity_test_options._replace( + cpu_cost=LOWCPU), 'simple_metadata': default_test_options, 'simple_request': default_test_options, 'trailing_metadata': default_test_options, diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index e23c1cb6002..839bac1c218 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -3491,6 +3491,23 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "end2end_tests", + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "h2_fd_test", + "src": [ + "test/core/end2end/fixtures/h2_fd.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "end2end_tests", @@ -3746,6 +3763,23 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "end2end_nosec_tests", + "gpr", + "gpr_test_util", + "grpc_test_util_unsecure", + "grpc_unsecure" + ], + "headers": [], + "language": "c", + "name": "h2_fd_nosec_test", + "src": [ + "test/core/end2end/fixtures/h2_fd.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "end2end_nosec_tests", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 1ac87e28a43..e887dc74c39 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -6784,7 +6784,6 @@ "bad_hostname" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -6793,9 +6792,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -6806,7 +6804,6 @@ "binary_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -6815,9 +6812,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -6828,7 +6824,6 @@ "call_creds" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -6837,9 +6832,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -6850,7 +6844,6 @@ "cancel_after_accept" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -6859,9 +6852,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -6872,7 +6864,6 @@ "cancel_after_client_done" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -6881,9 +6872,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -6894,7 +6884,6 @@ "cancel_after_invoke" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -6903,9 +6892,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -6916,7 +6904,6 @@ "cancel_before_invoke" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -6925,9 +6912,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -6938,7 +6924,6 @@ "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -6947,9 +6932,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -6960,7 +6944,6 @@ "cancel_with_status" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -6969,9 +6952,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -6982,7 +6964,6 @@ "compressed_payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -6991,9 +6972,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7001,21 +6981,19 @@ }, { "args": [ - "connectivity" + "empty_batch" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7023,10 +7001,9 @@ }, { "args": [ - "default_host" + "filter_causes_close" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -7035,9 +7012,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7045,21 +7021,19 @@ }, { "args": [ - "disappearing_server" + "graceful_server_shutdown" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7067,10 +7041,9 @@ }, { "args": [ - "empty_batch" + "high_initial_seqno" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -7079,9 +7052,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7089,10 +7061,9 @@ }, { "args": [ - "filter_causes_close" + "hpack_size" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -7101,9 +7072,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7111,21 +7081,19 @@ }, { "args": [ - "graceful_server_shutdown" + "idempotent_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7133,10 +7101,9 @@ }, { "args": [ - "high_initial_seqno" + "invoke_large_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -7145,9 +7112,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7155,10 +7121,9 @@ }, { "args": [ - "hpack_size" + "large_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -7167,9 +7132,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7177,10 +7141,9 @@ }, { "args": [ - "idempotent_request" + "max_concurrent_streams" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -7189,9 +7152,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7199,21 +7161,19 @@ }, { "args": [ - "invoke_large_request" + "max_message_length" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7221,10 +7181,9 @@ }, { "args": [ - "large_metadata" + "negative_deadline" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -7233,9 +7192,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7243,10 +7201,9 @@ }, { "args": [ - "max_concurrent_streams" + "no_op" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -7255,9 +7212,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7265,10 +7221,9 @@ }, { "args": [ - "max_message_length" + "payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -7277,9 +7232,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7287,10 +7241,9 @@ }, { "args": [ - "negative_deadline" + "ping_pong_streaming" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -7299,9 +7252,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7309,10 +7261,9 @@ }, { "args": [ - "no_op" + "registered_call" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -7321,9 +7272,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7331,21 +7281,19 @@ }, { "args": [ - "payload" + "request_with_flags" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7353,10 +7301,9 @@ }, { "args": [ - "ping" + "request_with_payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -7365,9 +7312,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7375,10 +7321,9 @@ }, { "args": [ - "ping_pong_streaming" + "server_finishes_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -7387,9 +7332,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7397,10 +7341,9 @@ }, { "args": [ - "registered_call" + "shutdown_finishes_calls" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -7409,9 +7352,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7419,10 +7361,9 @@ }, { "args": [ - "request_with_flags" + "shutdown_finishes_tags" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -7431,9 +7372,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7441,10 +7381,9 @@ }, { "args": [ - "request_with_payload" + "simple_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -7453,9 +7392,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7463,10 +7401,9 @@ }, { "args": [ - "server_finishes_request" + "simple_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -7475,9 +7412,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7485,10 +7421,9 @@ }, { "args": [ - "shutdown_finishes_calls" + "trailing_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -7497,9 +7432,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full_test", + "name": "h2_fd_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -7507,7 +7441,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -7529,7 +7463,7 @@ }, { "args": [ - "simple_delayed_request" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -7537,7 +7471,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -7551,7 +7485,7 @@ }, { "args": [ - "simple_metadata" + "call_creds" ], "ci_platforms": [ "windows", @@ -7573,7 +7507,7 @@ }, { "args": [ - "simple_request" + "cancel_after_accept" ], "ci_platforms": [ "windows", @@ -7581,7 +7515,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -7595,7 +7529,7 @@ }, { "args": [ - "trailing_metadata" + "cancel_after_client_done" ], "ci_platforms": [ "windows", @@ -7603,7 +7537,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -7617,114 +7551,1490 @@ }, { "args": [ - "bad_hostname" + "cancel_after_invoke" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "binary_metadata" + "cancel_before_invoke" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "call_creds" + "cancel_in_a_vacuum" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_accept" + "cancel_with_status" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_client_done" + "compressed_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { "args": [ - "cancel_after_invoke" + "connectivity" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "filter_causes_close" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "idempotent_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_before_invoke" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_in_a_vacuum" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "cancel_with_status" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "compressed_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "empty_batch" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "filter_causes_close" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "high_initial_seqno" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "idempotent_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "invoke_large_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "large_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "max_message_length" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "negative_deadline" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "no_op" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "registered_call" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_flags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "request_with_payload" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "server_finishes_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_calls" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "shutdown_finishes_tags" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "simple_request" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, + { + "args": [ + "trailing_metadata" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", "platforms": [ "linux" ] }, + { + "args": [ + "bad_hostname" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "binary_metadata" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "call_creds" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_accept" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_invoke" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "cancel_before_invoke" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -7732,15 +9042,21 @@ "cancel_in_a_vacuum" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -7748,15 +9064,21 @@ "cancel_with_status" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -7764,15 +9086,21 @@ "compressed_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -7780,15 +9108,21 @@ "connectivity" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -7796,15 +9130,21 @@ "default_host" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -7812,15 +9152,21 @@ "disappearing_server" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -7828,15 +9174,21 @@ "empty_batch" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -7844,15 +9196,21 @@ "filter_causes_close" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -7860,15 +9218,21 @@ "graceful_server_shutdown" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -7876,31 +9240,21 @@ "high_initial_seqno" ], "ci_platforms": [ - "linux" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_full+pipe_test", - "platforms": [ - "linux" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -7908,15 +9262,21 @@ "idempotent_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -7924,15 +9284,21 @@ "invoke_large_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -7940,15 +9306,21 @@ "large_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -7956,15 +9328,21 @@ "max_concurrent_streams" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -7972,15 +9350,21 @@ "max_message_length" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -7988,15 +9372,21 @@ "negative_deadline" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -8004,15 +9394,21 @@ "no_op" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -8020,15 +9416,21 @@ "payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -8036,15 +9438,21 @@ "ping" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -8052,15 +9460,21 @@ "ping_pong_streaming" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -8068,15 +9482,21 @@ "registered_call" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -8084,15 +9504,21 @@ "request_with_flags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -8100,15 +9526,21 @@ "request_with_payload" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -8116,15 +9548,21 @@ "server_finishes_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -8132,15 +9570,21 @@ "shutdown_finishes_calls" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -8148,15 +9592,21 @@ "shutdown_finishes_tags" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -8164,15 +9614,21 @@ "simple_delayed_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -8180,15 +9636,21 @@ "simple_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -8196,15 +9658,21 @@ "simple_request" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -8212,15 +9680,21 @@ "trailing_metadata" ], "ci_platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+pipe_test", + "name": "h2_full+trace_test", "platforms": [ - "linux" + "windows", + "linux", + "mac", + "posix" ] }, { @@ -8230,14 +9704,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8252,14 +9725,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8274,14 +9746,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8296,14 +9767,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8318,14 +9788,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8340,14 +9809,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8362,14 +9830,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8384,14 +9851,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8406,14 +9872,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8428,14 +9893,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8450,14 +9914,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8472,14 +9935,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8494,14 +9956,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8516,14 +9977,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8538,14 +9998,34 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "graceful_server_shutdown" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8555,19 +10035,18 @@ }, { "args": [ - "graceful_server_shutdown" + "high_initial_seqno" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8577,19 +10056,18 @@ }, { "args": [ - "high_initial_seqno" + "hpack_size" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8604,14 +10082,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8626,14 +10103,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8648,14 +10124,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8670,14 +10145,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8692,14 +10166,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8714,14 +10187,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8736,14 +10208,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8758,14 +10229,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8780,14 +10250,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8802,14 +10271,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8824,14 +10292,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8846,14 +10313,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8868,14 +10334,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8890,14 +10355,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8912,14 +10376,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8934,14 +10397,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8956,14 +10418,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -8978,14 +10439,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -9000,14 +10460,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -9022,14 +10481,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_full+trace_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -9886,7 +11344,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -9907,7 +11365,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -9928,7 +11386,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -9949,7 +11407,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -9970,7 +11428,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -9991,7 +11449,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10012,7 +11470,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10033,7 +11491,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10054,49 +11512,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10117,7 +11533,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10127,7 +11543,7 @@ }, { "args": [ - "disappearing_server" + "empty_batch" ], "ci_platforms": [ "windows", @@ -10138,7 +11554,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10148,7 +11564,7 @@ }, { "args": [ - "empty_batch" + "filter_causes_close" ], "ci_platforms": [ "windows", @@ -10159,7 +11575,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10180,7 +11596,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10201,28 +11617,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "high_initial_seqno" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10243,7 +11638,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10264,7 +11659,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10285,7 +11680,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10306,28 +11701,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10348,7 +11722,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10369,7 +11743,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10390,7 +11764,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10411,28 +11785,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10453,7 +11806,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10474,7 +11827,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10495,28 +11848,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "request_with_payload" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10526,7 +11858,7 @@ }, { "args": [ - "server_finishes_request" + "request_with_payload" ], "ci_platforms": [ "windows", @@ -10537,7 +11869,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10547,7 +11879,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -10558,7 +11890,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10568,7 +11900,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -10579,7 +11911,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10600,7 +11932,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10621,7 +11953,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10642,7 +11974,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10663,7 +11995,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_proxy_test", "platforms": [ "windows", "linux", @@ -10684,7 +12016,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -10705,7 +12037,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -10726,7 +12058,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -10747,7 +12079,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -10768,7 +12100,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -10789,7 +12121,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -10810,7 +12142,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -10831,7 +12163,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -10852,7 +12184,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -10862,18 +12194,18 @@ }, { "args": [ - "default_host" + "compressed_payload" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -10894,7 +12226,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -10915,7 +12247,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -10925,18 +12257,18 @@ }, { "args": [ - "filter_causes_close" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -10946,18 +12278,18 @@ }, { "args": [ - "graceful_server_shutdown" + "high_initial_seqno" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -10978,7 +12310,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -10999,7 +12331,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11020,7 +12352,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11041,7 +12373,28 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11062,7 +12415,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11083,7 +12436,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11104,7 +12457,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11125,7 +12478,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11146,7 +12499,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11167,7 +12520,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11188,7 +12541,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11209,7 +12562,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11230,7 +12583,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11251,7 +12604,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11261,18 +12614,18 @@ }, { "args": [ - "simple_delayed_request" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11293,7 +12646,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11314,7 +12667,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11335,7 +12688,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_proxy_test", + "name": "h2_sockpair_test", "platforms": [ "windows", "linux", @@ -11356,7 +12709,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11377,7 +12730,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11398,7 +12751,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11419,7 +12772,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11440,7 +12793,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11461,7 +12814,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11482,7 +12835,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11503,7 +12856,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11524,7 +12877,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11545,7 +12898,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11566,7 +12919,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11587,7 +12940,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11608,7 +12961,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11629,28 +12982,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "windows", - "linux", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11671,7 +13003,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11692,7 +13024,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11713,7 +13045,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11734,7 +13066,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11755,7 +13087,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11776,7 +13108,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11797,7 +13129,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11818,7 +13150,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11839,7 +13171,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11860,7 +13192,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11881,7 +13213,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11902,7 +13234,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11923,7 +13255,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11944,7 +13276,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11965,7 +13297,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -11986,7 +13318,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12007,7 +13339,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12028,7 +13360,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_test", + "name": "h2_sockpair+trace_test", "platforms": [ "windows", "linux", @@ -12049,7 +13381,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12070,7 +13402,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12091,7 +13423,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12112,7 +13444,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12133,7 +13465,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12154,7 +13486,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12175,7 +13507,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12196,7 +13528,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12217,7 +13549,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12238,7 +13570,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12259,7 +13591,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12280,7 +13612,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12301,7 +13633,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12322,7 +13654,28 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12343,7 +13696,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12364,7 +13717,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12385,7 +13738,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12406,7 +13759,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12427,7 +13780,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12448,7 +13801,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12469,7 +13822,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12490,7 +13843,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12511,7 +13864,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12532,7 +13885,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12553,7 +13906,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12574,7 +13927,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12595,7 +13948,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12616,7 +13969,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12637,7 +13990,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12658,7 +14011,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12679,7 +14032,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12700,7 +14053,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair+trace_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -12715,13 +14068,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -12736,13 +14090,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -12757,13 +14112,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -12778,13 +14134,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -12799,13 +14156,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -12820,13 +14178,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -12841,13 +14200,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -12862,13 +14222,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -12883,13 +14244,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -12904,13 +14266,80 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "default_host" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "disappearing_server" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -12925,13 +14354,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -12946,13 +14376,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -12967,13 +14398,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -12988,13 +14420,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13009,13 +14442,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13030,13 +14464,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13051,13 +14486,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13072,13 +14508,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13093,13 +14530,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13114,13 +14552,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13135,13 +14574,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13156,13 +14596,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13177,13 +14618,36 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13198,13 +14662,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13219,13 +14684,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13240,13 +14706,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13261,13 +14728,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13282,13 +14750,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13303,13 +14772,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13324,13 +14794,36 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "simple_delayed_request" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13345,13 +14838,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13366,13 +14860,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13387,13 +14882,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_sockpair_1byte_test", + "name": "h2_ssl_test", "platforms": [ "windows", "linux", @@ -13415,7 +14911,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13437,7 +14933,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13459,7 +14955,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13481,7 +14977,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13503,7 +14999,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13525,7 +15021,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13547,7 +15043,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13569,7 +15065,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13591,7 +15087,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13613,7 +15109,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13635,7 +15131,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13657,7 +15153,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13679,7 +15175,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13701,7 +15197,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13723,7 +15219,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13745,7 +15241,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13767,7 +15263,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13789,7 +15285,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13811,7 +15307,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13833,7 +15329,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13855,7 +15351,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13877,7 +15373,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13899,7 +15395,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13921,7 +15417,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13943,7 +15439,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13965,7 +15461,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -13987,7 +15483,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14009,7 +15505,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14031,7 +15527,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14053,7 +15549,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14075,7 +15571,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14097,7 +15593,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14119,7 +15615,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14141,7 +15637,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14163,7 +15659,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14185,7 +15681,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14207,7 +15703,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14229,7 +15725,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_ssl_cert_test", "platforms": [ "windows", "linux", @@ -14244,14 +15740,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14266,14 +15761,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14288,14 +15782,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14310,14 +15803,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14332,14 +15824,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14354,14 +15845,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14376,14 +15866,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14398,14 +15887,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14420,58 +15908,13 @@ "ci_platforms": [ "windows", "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_cert_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "compressed_payload" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_cert_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14486,14 +15929,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14508,14 +15950,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14530,14 +15971,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14552,14 +15992,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14574,14 +16013,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14596,36 +16034,13 @@ "ci_platforms": [ "windows", "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_cert_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "hpack_size" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14640,14 +16055,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14662,14 +16076,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14684,36 +16097,13 @@ "ci_platforms": [ "windows", "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_cert_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "max_concurrent_streams" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14728,14 +16118,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14750,58 +16139,13 @@ "ci_platforms": [ "windows", "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_cert_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "no_op" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "payload" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14811,19 +16155,18 @@ }, { "args": [ - "ping" + "no_op" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14833,19 +16176,18 @@ }, { "args": [ - "ping_pong_streaming" + "payload" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14855,19 +16197,18 @@ }, { "args": [ - "registered_call" + "ping_pong_streaming" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14877,19 +16218,18 @@ }, { "args": [ - "request_with_flags" + "registered_call" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14904,14 +16244,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14926,14 +16265,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14948,14 +16286,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14970,14 +16307,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -14992,14 +16328,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -15014,14 +16349,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -15036,14 +16370,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -15058,14 +16391,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_cert_test", + "name": "h2_ssl_proxy_test", "platforms": [ "windows", "linux", @@ -15078,17 +16410,16 @@ "bad_hostname" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15099,17 +16430,16 @@ "binary_metadata" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15120,17 +16450,16 @@ "call_creds" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15141,17 +16470,16 @@ "cancel_after_accept" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15162,17 +16490,16 @@ "cancel_after_client_done" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15183,17 +16510,16 @@ "cancel_after_invoke" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15204,17 +16530,16 @@ "cancel_before_invoke" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15225,17 +16550,16 @@ "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15246,17 +16570,16 @@ "cancel_with_status" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15264,20 +16587,39 @@ }, { "args": [ - "default_host" + "compressed_payload" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "connectivity" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15288,17 +16630,16 @@ "disappearing_server" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15309,17 +16650,16 @@ "empty_batch" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15330,17 +16670,16 @@ "filter_causes_close" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15351,17 +16690,16 @@ "graceful_server_shutdown" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15372,17 +16710,36 @@ "high_initial_seqno" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "hpack_size" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15393,17 +16750,16 @@ "idempotent_request" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15414,17 +16770,16 @@ "invoke_large_request" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15435,17 +16790,36 @@ "large_metadata" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "max_concurrent_streams" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15456,17 +16830,16 @@ "max_message_length" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15477,17 +16850,16 @@ "negative_deadline" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15498,17 +16870,16 @@ "no_op" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15519,17 +16890,56 @@ "payload" ], "ci_platforms": [ - "windows", "linux", + "mac", + "posix" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "ping" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "ping_pong_streaming" + ], + "ci_platforms": [ + "linux", + "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15537,20 +16947,19 @@ }, { "args": [ - "ping_pong_streaming" + "registered_call" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15558,20 +16967,19 @@ }, { "args": [ - "registered_call" + "request_with_flags" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15582,17 +16990,16 @@ "request_with_payload" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15603,17 +17010,16 @@ "server_finishes_request" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15624,17 +17030,16 @@ "shutdown_finishes_calls" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15645,17 +17050,16 @@ "shutdown_finishes_tags" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15666,17 +17070,16 @@ "simple_delayed_request" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15687,17 +17090,16 @@ "simple_metadata" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15708,17 +17110,16 @@ "simple_request" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15729,17 +17130,16 @@ "trailing_metadata" ], "ci_platforms": [ - "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_proxy_test", + "name": "h2_uds_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -15750,6 +17150,7 @@ "bad_hostname" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -15758,8 +17159,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15770,6 +17172,7 @@ "binary_metadata" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -15778,8 +17181,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15787,19 +17191,21 @@ }, { "args": [ - "call_creds" + "cancel_after_accept" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15807,9 +17213,10 @@ }, { "args": [ - "cancel_after_accept" + "cancel_after_client_done" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -15818,8 +17225,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15827,9 +17235,10 @@ }, { "args": [ - "cancel_after_client_done" + "cancel_after_invoke" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -15838,8 +17247,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15847,9 +17257,10 @@ }, { "args": [ - "cancel_after_invoke" + "cancel_before_invoke" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -15858,8 +17269,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15867,9 +17279,10 @@ }, { "args": [ - "cancel_before_invoke" + "cancel_in_a_vacuum" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -15878,8 +17291,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15887,9 +17301,10 @@ }, { "args": [ - "cancel_in_a_vacuum" + "cancel_with_status" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -15898,8 +17313,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15907,9 +17323,10 @@ }, { "args": [ - "cancel_with_status" + "compressed_payload" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -15918,8 +17335,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15927,9 +17345,10 @@ }, { "args": [ - "compressed_payload" + "connectivity" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -15938,8 +17357,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15947,19 +17367,21 @@ }, { "args": [ - "connectivity" + "default_host" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15970,6 +17392,7 @@ "disappearing_server" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -15978,8 +17401,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -15990,6 +17414,7 @@ "empty_batch" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -15998,8 +17423,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16010,6 +17436,7 @@ "filter_causes_close" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16018,8 +17445,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16030,6 +17458,7 @@ "graceful_server_shutdown" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16038,8 +17467,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16050,6 +17480,7 @@ "high_initial_seqno" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16058,8 +17489,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16070,6 +17502,7 @@ "hpack_size" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16078,8 +17511,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16090,6 +17524,7 @@ "idempotent_request" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16098,8 +17533,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16110,6 +17546,7 @@ "invoke_large_request" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16118,8 +17555,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16130,6 +17568,7 @@ "large_metadata" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16138,8 +17577,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16150,6 +17590,7 @@ "max_concurrent_streams" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16158,8 +17599,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16170,6 +17612,7 @@ "max_message_length" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16178,8 +17621,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16190,6 +17634,7 @@ "negative_deadline" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16198,8 +17643,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16210,6 +17656,7 @@ "no_op" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16218,8 +17665,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16230,6 +17678,7 @@ "payload" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16238,8 +17687,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16250,6 +17700,7 @@ "ping" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16258,8 +17709,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16270,6 +17722,7 @@ "ping_pong_streaming" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16278,8 +17731,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16290,6 +17744,7 @@ "registered_call" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16298,8 +17753,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16310,6 +17766,7 @@ "request_with_flags" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16318,8 +17775,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16330,6 +17788,7 @@ "request_with_payload" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16338,8 +17797,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16350,6 +17810,7 @@ "server_finishes_request" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16358,8 +17819,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16370,6 +17832,7 @@ "shutdown_finishes_calls" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16378,8 +17841,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16390,6 +17854,7 @@ "shutdown_finishes_tags" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16398,8 +17863,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16410,6 +17876,7 @@ "simple_delayed_request" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16418,8 +17885,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16430,6 +17898,7 @@ "simple_metadata" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16438,8 +17907,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16450,6 +17920,7 @@ "simple_request" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16458,8 +17929,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16470,6 +17942,7 @@ "trailing_metadata" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -16478,8 +17951,9 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_uds_test", + "name": "h2_census_nosec_test", "platforms": [ + "windows", "linux", "mac", "posix" @@ -16490,7 +17964,6 @@ "bad_hostname" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16499,7 +17972,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16512,7 +17985,6 @@ "binary_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16521,7 +17993,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16534,7 +18006,6 @@ "cancel_after_accept" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16543,7 +18014,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16556,7 +18027,6 @@ "cancel_after_client_done" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16565,7 +18035,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16578,7 +18048,6 @@ "cancel_after_invoke" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16587,7 +18056,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16600,7 +18069,6 @@ "cancel_before_invoke" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16609,7 +18077,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16622,7 +18090,6 @@ "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16631,7 +18098,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16644,7 +18111,6 @@ "cancel_with_status" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16653,7 +18119,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16675,7 +18141,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16697,7 +18163,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16719,7 +18185,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16741,7 +18207,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16754,7 +18220,6 @@ "empty_batch" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16763,7 +18228,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16776,7 +18241,6 @@ "filter_causes_close" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16785,7 +18249,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16798,7 +18262,6 @@ "graceful_server_shutdown" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16807,7 +18270,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16820,7 +18283,6 @@ "high_initial_seqno" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16829,7 +18291,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16842,7 +18304,6 @@ "hpack_size" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16851,7 +18312,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16864,7 +18325,6 @@ "idempotent_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16873,7 +18333,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16886,7 +18346,6 @@ "invoke_large_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16895,7 +18354,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16908,7 +18367,6 @@ "large_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16917,7 +18375,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16930,7 +18388,6 @@ "max_concurrent_streams" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16939,7 +18396,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16952,7 +18409,6 @@ "max_message_length" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16961,7 +18417,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16974,7 +18430,6 @@ "negative_deadline" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -16983,7 +18438,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -16996,7 +18451,6 @@ "no_op" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -17005,7 +18459,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17018,7 +18472,6 @@ "payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -17027,7 +18480,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17049,7 +18502,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17062,7 +18515,6 @@ "ping_pong_streaming" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -17071,7 +18523,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17084,7 +18536,6 @@ "registered_call" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -17093,7 +18544,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17106,7 +18557,6 @@ "request_with_flags" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -17115,7 +18565,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17128,7 +18578,6 @@ "request_with_payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -17137,7 +18586,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17150,7 +18599,6 @@ "server_finishes_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -17159,7 +18607,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17172,7 +18620,6 @@ "shutdown_finishes_calls" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -17181,7 +18628,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17194,7 +18641,6 @@ "shutdown_finishes_tags" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -17203,7 +18649,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17225,7 +18671,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17238,7 +18684,6 @@ "simple_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -17247,7 +18692,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17260,7 +18705,6 @@ "simple_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -17269,7 +18713,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17282,7 +18726,6 @@ "trailing_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -17291,7 +18734,7 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_census_nosec_test", + "name": "h2_compress_nosec_test", "platforms": [ "windows", "linux", @@ -17313,9 +18756,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17335,9 +18777,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17357,9 +18798,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17379,9 +18819,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17401,9 +18840,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17423,9 +18861,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17445,9 +18882,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17467,9 +18903,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17480,29 +18915,6 @@ "compressed_payload" ], "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "connectivity" - ], - "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -17511,53 +18923,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "default_host" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "disappearing_server" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17577,9 +18944,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17599,9 +18965,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17621,9 +18986,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17643,9 +19007,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17665,9 +19028,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17687,9 +19049,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17709,9 +19070,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17731,9 +19091,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17753,9 +19112,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17775,9 +19133,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17797,9 +19154,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17819,9 +19175,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17841,31 +19196,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "ping" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17885,9 +19217,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17907,9 +19238,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17929,9 +19259,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17951,9 +19280,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17973,9 +19301,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -17995,9 +19322,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18017,31 +19343,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", - "platforms": [ - "windows", - "linux", - "mac", - "posix" - ] - }, - { - "args": [ - "simple_delayed_request" - ], - "ci_platforms": [ - "windows", - "linux", - "mac", - "posix" - ], - "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, - "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18061,9 +19364,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18083,9 +19385,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" @@ -18105,9 +19406,8 @@ "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_compress_nosec_test", + "name": "h2_fd_nosec_test", "platforms": [ - "windows", "linux", "mac", "posix" From 321b1fb1c2715a695f6c73f814c21f2418d5fd58 Mon Sep 17 00:00:00 2001 From: Adam Michalik Date: Mon, 16 May 2016 15:42:36 -0700 Subject: [PATCH 0921/1894] separate posix functionality to grpc_posix.h --- BUILD | 7 + Makefile | 5 + binding.gyp | 1 + build.yaml | 2 + config.m4 | 1 + gRPC.podspec | 2 + grpc.def | 1 + grpc.gemspec | 2 + include/grpc/grpc_posix.h | 65 ++++ package.xml | 2 + .../client/insecure/channel_create_posix.c | 94 ++++++ .../grpcio/grpc/_cython/imports.generated.c | 2 + .../grpcio/grpc/_cython/imports.generated.h | 4 + src/python/grpcio/grpc_core_dependencies.py | 1 + src/ruby/ext/grpc/rb_grpc_imports.generated.c | 2 + src/ruby/ext/grpc/rb_grpc_imports.generated.h | 4 + test/core/end2end/fixtures/h2_fd.c | 2 +- test/core/end2end/gen_build_yaml.py | 4 +- third_party/protobuf | 2 +- tools/doxygen/Doxyfile.core | 1 + tools/doxygen/Doxyfile.core.internal | 2 + tools/run_tests/sources_and_headers.json | 5 +- tools/run_tests/tests.json | 318 +++++++++--------- vsprojects/vcxproj/grpc/grpc.vcxproj | 3 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 6 + .../grpc_unsecure/grpc_unsecure.vcxproj | 3 + .../grpc_unsecure.vcxproj.filters | 6 + 27 files changed, 383 insertions(+), 164 deletions(-) create mode 100644 include/grpc/grpc_posix.h create mode 100644 src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c diff --git a/BUILD b/BUILD index 3b1f04f6d14..1e0f112ac17 100644 --- a/BUILD +++ b/BUILD @@ -463,6 +463,7 @@ cc_library( "src/core/ext/client_config/uri_parser.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", + "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", @@ -488,6 +489,7 @@ cc_library( "include/grpc/byte_buffer_reader.h", "include/grpc/compression.h", "include/grpc/grpc.h", + "include/grpc/grpc_posix.h", "include/grpc/status.h", "include/grpc/impl/codegen/byte_buffer.h", "include/grpc/impl/codegen/byte_buffer_reader.h", @@ -833,6 +835,7 @@ cc_library( "include/grpc/byte_buffer_reader.h", "include/grpc/compression.h", "include/grpc/grpc.h", + "include/grpc/grpc_posix.h", "include/grpc/status.h", "include/grpc/impl/codegen/byte_buffer.h", "include/grpc/impl/codegen/byte_buffer_reader.h", @@ -1106,6 +1109,7 @@ cc_library( "src/core/ext/transport/chttp2/transport/writing.c", "src/core/ext/transport/chttp2/alpn/alpn.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", + "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c", "src/core/ext/client_config/channel_connectivity.c", "src/core/ext/client_config/client_channel.c", "src/core/ext/client_config/client_channel_factory.c", @@ -1150,6 +1154,7 @@ cc_library( "include/grpc/byte_buffer_reader.h", "include/grpc/compression.h", "include/grpc/grpc.h", + "include/grpc/grpc_posix.h", "include/grpc/status.h", "include/grpc/impl/codegen/byte_buffer.h", "include/grpc/impl/codegen/byte_buffer_reader.h", @@ -1840,6 +1845,7 @@ objc_library( "src/core/ext/client_config/uri_parser.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", + "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", @@ -1865,6 +1871,7 @@ objc_library( "include/grpc/byte_buffer_reader.h", "include/grpc/compression.h", "include/grpc/grpc.h", + "include/grpc/grpc_posix.h", "include/grpc/status.h", "include/grpc/impl/codegen/byte_buffer.h", "include/grpc/impl/codegen/byte_buffer_reader.h", diff --git a/Makefile b/Makefile index 62bcd31724f..5eecfd74277 100644 --- a/Makefile +++ b/Makefile @@ -2635,6 +2635,7 @@ LIBGRPC_SRC = \ src/core/ext/client_config/uri_parser.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ + src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ @@ -2663,6 +2664,7 @@ PUBLIC_HEADERS_C += \ include/grpc/byte_buffer_reader.h \ include/grpc/compression.h \ include/grpc/grpc.h \ + include/grpc/grpc_posix.h \ include/grpc/status.h \ include/grpc/impl/codegen/byte_buffer.h \ include/grpc/impl/codegen/byte_buffer_reader.h \ @@ -2905,6 +2907,7 @@ PUBLIC_HEADERS_C += \ include/grpc/byte_buffer_reader.h \ include/grpc/compression.h \ include/grpc/grpc.h \ + include/grpc/grpc_posix.h \ include/grpc/status.h \ include/grpc/impl/codegen/byte_buffer.h \ include/grpc/impl/codegen/byte_buffer_reader.h \ @@ -3184,6 +3187,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/transport/chttp2/transport/writing.c \ src/core/ext/transport/chttp2/alpn/alpn.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ + src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \ src/core/ext/client_config/channel_connectivity.c \ src/core/ext/client_config/client_channel.c \ src/core/ext/client_config/client_channel_factory.c \ @@ -3231,6 +3235,7 @@ PUBLIC_HEADERS_C += \ include/grpc/byte_buffer_reader.h \ include/grpc/compression.h \ include/grpc/grpc.h \ + include/grpc/grpc_posix.h \ include/grpc/status.h \ include/grpc/impl/codegen/byte_buffer.h \ include/grpc/impl/codegen/byte_buffer_reader.h \ diff --git a/binding.gyp b/binding.gyp index 4d9e9a49066..901ab45750d 100644 --- a/binding.gyp +++ b/binding.gyp @@ -719,6 +719,7 @@ 'src/core/ext/client_config/uri_parser.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', + 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c', 'third_party/nanopb/pb_common.c', diff --git a/build.yaml b/build.yaml index 302e3f99e04..7ceaee9c6eb 100644 --- a/build.yaml +++ b/build.yaml @@ -154,6 +154,7 @@ filegroups: - include/grpc/byte_buffer_reader.h - include/grpc/compression.h - include/grpc/grpc.h + - include/grpc/grpc_posix.h - include/grpc/status.h headers: - src/core/lib/channel/channel_args.h @@ -561,6 +562,7 @@ filegroups: - name: grpc_transport_chttp2_client_insecure src: - src/core/ext/transport/chttp2/client/insecure/channel_create.c + - src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c uses: - grpc_transport_chttp2 - grpc_base diff --git a/config.m4 b/config.m4 index 54adac1bdc1..e3c5a81ae16 100644 --- a/config.m4 +++ b/config.m4 @@ -238,6 +238,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/client_config/uri_parser.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ + src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ diff --git a/gRPC.podspec b/gRPC.podspec index 8e8f3f551ce..df1afc81535 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -318,6 +318,7 @@ Pod::Spec.new do |s| 'include/grpc/byte_buffer_reader.h', 'include/grpc/compression.h', 'include/grpc/grpc.h', + 'include/grpc/grpc_posix.h', 'include/grpc/status.h', 'include/grpc/impl/codegen/byte_buffer.h', 'include/grpc/impl/codegen/byte_buffer_reader.h', @@ -499,6 +500,7 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/uri_parser.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', + 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c', 'third_party/nanopb/pb_common.c', diff --git a/grpc.def b/grpc.def index b042a696b3e..562ca515af2 100644 --- a/grpc.def +++ b/grpc.def @@ -89,6 +89,7 @@ EXPORTS grpc_header_nonbin_value_is_legal grpc_is_binary_header grpc_call_error_to_string + grpc_insecure_channel_create_from_fd grpc_auth_property_iterator_next grpc_auth_context_property_iterator grpc_auth_context_peer_identity diff --git a/grpc.gemspec b/grpc.gemspec index 49ea3b0858c..daddc799260 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -147,6 +147,7 @@ Gem::Specification.new do |s| s.files += %w( include/grpc/byte_buffer_reader.h ) s.files += %w( include/grpc/compression.h ) s.files += %w( include/grpc/grpc.h ) + s.files += %w( include/grpc/grpc_posix.h ) s.files += %w( include/grpc/status.h ) s.files += %w( include/grpc/impl/codegen/byte_buffer.h ) s.files += %w( include/grpc/impl/codegen/byte_buffer_reader.h ) @@ -478,6 +479,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_config/uri_parser.c ) s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2.c ) s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create.c ) + s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c ) s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.c ) s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c ) s.files += %w( third_party/nanopb/pb_common.c ) diff --git a/include/grpc/grpc_posix.h b/include/grpc/grpc_posix.h new file mode 100644 index 00000000000..4eedc10ef22 --- /dev/null +++ b/include/grpc/grpc_posix.h @@ -0,0 +1,65 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_GRPC_POSIX_H +#define GRPC_GRPC_POSIX_H + +#include +#include + +#ifdef __cplusplus +extern "C" { +#endif + +/*! \mainpage GRPC Core POSIX + * + * The GRPC Core POSIX library provides some POSIX-specific low-level + * functionality on top of GRPC Core. + */ + + +#ifdef GPR_POSIX_SOCKET + +/** Create a client channel to 'target' using file descriptor 'fd'. The 'target' + argument will be used to indicate the name for this channel. See the comment + for grpc_insecure_channel_create for description of 'args' argument. */ +GRPCAPI grpc_channel *grpc_insecure_channel_create_from_fd( + const char *target, int fd, const grpc_channel_args *args); + +#endif // GPR_POSIX_SOCKET + +#ifdef __cplusplus +} +#endif + +#endif /* GRPC_GRPC_POSIX_H */ diff --git a/package.xml b/package.xml index f780f8025b9..fb774c2e6a2 100644 --- a/package.xml +++ b/package.xml @@ -154,6 +154,7 @@ + @@ -485,6 +486,7 @@ + diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c new file mode 100644 index 00000000000..fdcf4c44306 --- /dev/null +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c @@ -0,0 +1,94 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifdef GPR_POSIX_SOCKET + +#include + +// #include +// #include +// #include + +// #include +// #include +// #include + +// #include "src/core/ext/client_config/client_channel.h" +// #include "src/core/ext/client_config/resolver_registry.h" +// #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +// #include "src/core/lib/channel/channel_args.h" +// #include "src/core/lib/channel/compress_filter.h" +// #include "src/core/lib/channel/http_client_filter.h" +// #include "src/core/lib/iomgr/tcp_client.h" +// #include "src/core/lib/iomgr/tcp_posix.h" +// #include "src/core/lib/surface/api_trace.h" +// #include "src/core/lib/surface/channel.h" + + +grpc_channel *grpc_insecure_channel_create_from_fd( + const char *target, int fd, const grpc_channel_args *args) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + GRPC_API_TRACE( + "grpc_insecure_channel_create(target=%p, fd=%d, args=%p)", 3, + (target, fd, args)); + + grpc_arg default_authority_arg; + default_authority_arg.type = GRPC_ARG_STRING; + default_authority_arg.key = GRPC_ARG_DEFAULT_AUTHORITY; + default_authority_arg.value.string = "test.authority"; + grpc_channel_args *final_args = grpc_channel_args_copy_and_add( + args, &default_authority_arg, 1); + + int flags = fcntl(fd, F_GETFL, 0); + GPR_ASSERT(fcntl(fd, F_SETFL, flags | O_NONBLOCK) == 0); + + grpc_endpoint *client = grpc_tcp_create( + grpc_fd_create(fd, "client"), GRPC_TCP_DEFAULT_READ_SLICE_SIZE, + "fd-client"); + + grpc_transport *transport = + grpc_create_chttp2_transport(&exec_ctx, final_args, client, 1); + GPR_ASSERT(transport); + grpc_channel *channel = grpc_channel_create( + &exec_ctx, target, final_args, GRPC_CLIENT_DIRECT_CHANNEL, transport); + grpc_channel_args_destroy(final_args); + grpc_chttp2_transport_start_reading(&exec_ctx, transport, NULL, 0); + + grpc_exec_ctx_finish(&exec_ctx); + + return channel != NULL ? channel : grpc_lame_client_channel_create( + target, GRPC_STATUS_INTERNAL, + "Failed to create client channel"); +} + +#endif // GPR_POSIX_SOCKET diff --git a/src/python/grpcio/grpc/_cython/imports.generated.c b/src/python/grpcio/grpc/_cython/imports.generated.c index 42b754429d0..8b8d8ba1ae3 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.c +++ b/src/python/grpcio/grpc/_cython/imports.generated.c @@ -127,6 +127,7 @@ grpc_header_key_is_legal_type grpc_header_key_is_legal_import; grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_import; grpc_is_binary_header_type grpc_is_binary_header_import; grpc_call_error_to_string_type grpc_call_error_to_string_import; +grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import; grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import; @@ -399,6 +400,7 @@ void pygrpc_load_imports(HMODULE library) { grpc_header_nonbin_value_is_legal_import = (grpc_header_nonbin_value_is_legal_type) GetProcAddress(library, "grpc_header_nonbin_value_is_legal"); grpc_is_binary_header_import = (grpc_is_binary_header_type) GetProcAddress(library, "grpc_is_binary_header"); grpc_call_error_to_string_import = (grpc_call_error_to_string_type) GetProcAddress(library, "grpc_call_error_to_string"); + grpc_insecure_channel_create_from_fd_import = (grpc_insecure_channel_create_from_fd_type) GetProcAddress(library, "grpc_insecure_channel_create_from_fd"); grpc_auth_property_iterator_next_import = (grpc_auth_property_iterator_next_type) GetProcAddress(library, "grpc_auth_property_iterator_next"); grpc_auth_context_property_iterator_import = (grpc_auth_context_property_iterator_type) GetProcAddress(library, "grpc_auth_context_property_iterator"); grpc_auth_context_peer_identity_import = (grpc_auth_context_peer_identity_type) GetProcAddress(library, "grpc_auth_context_peer_identity"); diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index 556ebfb8485..42ebb91274d 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -331,6 +332,9 @@ extern grpc_is_binary_header_type grpc_is_binary_header_import; typedef const char *(*grpc_call_error_to_string_type)(grpc_call_error error); extern grpc_call_error_to_string_type grpc_call_error_to_string_import; #define grpc_call_error_to_string grpc_call_error_to_string_import +typedef grpc_channel *(*grpc_insecure_channel_create_from_fd_type)(const char *target, int fd, const grpc_channel_args *args); +extern grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; +#define grpc_insecure_channel_create_from_fd grpc_insecure_channel_create_from_fd_import typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); extern grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; #define grpc_auth_property_iterator_next grpc_auth_property_iterator_next_import diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index b83c82cb926..0618b336d15 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -232,6 +232,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/client_config/uri_parser.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', + 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c', 'third_party/nanopb/pb_common.c', diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index 9563f18b7e3..82761e95ca3 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -127,6 +127,7 @@ grpc_header_key_is_legal_type grpc_header_key_is_legal_import; grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_import; grpc_is_binary_header_type grpc_is_binary_header_import; grpc_call_error_to_string_type grpc_call_error_to_string_import; +grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import; grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import; @@ -395,6 +396,7 @@ void grpc_rb_load_imports(HMODULE library) { grpc_header_nonbin_value_is_legal_import = (grpc_header_nonbin_value_is_legal_type) GetProcAddress(library, "grpc_header_nonbin_value_is_legal"); grpc_is_binary_header_import = (grpc_is_binary_header_type) GetProcAddress(library, "grpc_is_binary_header"); grpc_call_error_to_string_import = (grpc_call_error_to_string_type) GetProcAddress(library, "grpc_call_error_to_string"); + grpc_insecure_channel_create_from_fd_import = (grpc_insecure_channel_create_from_fd_type) GetProcAddress(library, "grpc_insecure_channel_create_from_fd"); grpc_auth_property_iterator_next_import = (grpc_auth_property_iterator_next_type) GetProcAddress(library, "grpc_auth_property_iterator_next"); grpc_auth_context_property_iterator_import = (grpc_auth_context_property_iterator_type) GetProcAddress(library, "grpc_auth_context_property_iterator"); grpc_auth_context_peer_identity_import = (grpc_auth_context_peer_identity_type) GetProcAddress(library, "grpc_auth_context_peer_identity"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index 87dead533da..e83285828cd 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -43,6 +43,7 @@ #include #include #include +#include #include #include #include @@ -331,6 +332,9 @@ extern grpc_is_binary_header_type grpc_is_binary_header_import; typedef const char *(*grpc_call_error_to_string_type)(grpc_call_error error); extern grpc_call_error_to_string_type grpc_call_error_to_string_import; #define grpc_call_error_to_string grpc_call_error_to_string_import +typedef grpc_channel *(*grpc_insecure_channel_create_from_fd_type)(const char *target, int fd, const grpc_channel_args *args); +extern grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; +#define grpc_insecure_channel_create_from_fd grpc_insecure_channel_create_from_fd_import typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); extern grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; #define grpc_auth_property_iterator_next grpc_auth_property_iterator_next_import diff --git a/test/core/end2end/fixtures/h2_fd.c b/test/core/end2end/fixtures/h2_fd.c index 64ca75f7ff3..1f4d2495e00 100644 --- a/test/core/end2end/fixtures/h2_fd.c +++ b/test/core/end2end/fixtures/h2_fd.c @@ -138,7 +138,7 @@ static void chttp2_tear_down_socketpair(grpc_end2end_test_fixture *f) { /* All test configurations */ static grpc_end2end_test_config configs[] = { - {"chttp2/socketpair", 0, chttp2_create_fixture_socketpair, + {"chttp2/fd", 0, chttp2_create_fixture_socketpair, chttp2_init_client_socketpair, chttp2_init_server_socketpair, chttp2_tear_down_socketpair}, }; diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index 98b7cf5dcd7..3d3bec1a69e 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -45,7 +45,7 @@ default_unsecure_fixture_options = FixtureOptions( socketpair_unsecure_fixture_options = default_unsecure_fixture_options._replace(fullstack=False, dns_resolver=False) default_secure_fixture_options = default_unsecure_fixture_options._replace(secure=True) uds_fixture_options = default_unsecure_fixture_options._replace(dns_resolver=False, platforms=['linux', 'mac', 'posix']) -fd_fixture_options = default_unsecure_fixture_options._replace( +fd_unsecure_fixture_options = default_unsecure_fixture_options._replace( dns_resolver=False, fullstack=False, platforms=['linux', 'mac', 'posix']) @@ -54,7 +54,7 @@ END2END_FIXTURES = { 'h2_compress': default_unsecure_fixture_options, 'h2_census': default_unsecure_fixture_options, 'h2_fakesec': default_secure_fixture_options._replace(ci_mac=False), - 'h2_fd': fd_fixture_options, + 'h2_fd': fd_unsecure_fixture_options, 'h2_full': default_unsecure_fixture_options, 'h2_full+pipe': default_unsecure_fixture_options._replace( platforms=['linux']), diff --git a/third_party/protobuf b/third_party/protobuf index 3470b6895aa..d5fb408ddc2 160000 --- a/third_party/protobuf +++ b/third_party/protobuf @@ -1 +1 @@ -Subproject commit 3470b6895aa659b7559ed678e029a5338e535f14 +Subproject commit d5fb408ddc281ffcadeb08699e65bb694656d0bd diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index 7489401d74b..72102b2fc50 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -764,6 +764,7 @@ INPUT = include/grpc/byte_buffer.h \ include/grpc/byte_buffer_reader.h \ include/grpc/compression.h \ include/grpc/grpc.h \ +include/grpc/grpc_posix.h \ include/grpc/status.h \ include/grpc/impl/codegen/byte_buffer.h \ include/grpc/impl/codegen/byte_buffer_reader.h \ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 849a60eea98..648d42c1df8 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -764,6 +764,7 @@ INPUT = include/grpc/byte_buffer.h \ include/grpc/byte_buffer_reader.h \ include/grpc/compression.h \ include/grpc/grpc.h \ +include/grpc/grpc_posix.h \ include/grpc/status.h \ include/grpc/impl/codegen/byte_buffer.h \ include/grpc/impl/codegen/byte_buffer_reader.h \ @@ -1095,6 +1096,7 @@ src/core/ext/client_config/subchannel_index.c \ src/core/ext/client_config/uri_parser.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ +src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 839bac1c218..204ff4ce808 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5631,6 +5631,7 @@ "include/grpc/byte_buffer_reader.h", "include/grpc/compression.h", "include/grpc/grpc.h", + "include/grpc/grpc_posix.h", "include/grpc/status.h", "src/core/lib/channel/channel_args.h", "src/core/lib/channel/channel_stack.h", @@ -5715,6 +5716,7 @@ "include/grpc/byte_buffer_reader.h", "include/grpc/compression.h", "include/grpc/grpc.h", + "include/grpc/grpc_posix.h", "include/grpc/status.h", "src/core/lib/channel/channel_args.c", "src/core/lib/channel/channel_args.h", @@ -6303,7 +6305,8 @@ "language": "c", "name": "grpc_transport_chttp2_client_insecure", "src": [ - "src/core/ext/transport/chttp2/client/insecure/channel_create.c" + "src/core/ext/transport/chttp2/client/insecure/channel_create.c", + "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c" ], "third_party": false, "type": "filegroup" diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index e887dc74c39..59933e39626 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -9704,13 +9704,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9725,13 +9726,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9746,13 +9748,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9767,13 +9770,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9788,13 +9792,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9809,13 +9814,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9830,13 +9836,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9851,13 +9858,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9872,13 +9880,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9893,13 +9902,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9914,13 +9924,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9935,13 +9946,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9956,13 +9968,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9977,13 +9990,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -9998,13 +10012,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10019,13 +10034,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10040,13 +10056,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10061,13 +10078,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10082,13 +10100,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10103,13 +10122,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10124,13 +10144,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10145,13 +10166,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10166,13 +10188,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10187,13 +10210,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10208,13 +10232,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10229,13 +10254,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10250,13 +10276,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10271,13 +10298,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10292,13 +10320,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10313,13 +10342,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10334,13 +10364,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10355,13 +10386,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10376,13 +10408,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10397,13 +10430,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10418,13 +10452,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10439,13 +10474,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10460,13 +10496,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10481,13 +10518,14 @@ "ci_platforms": [ "windows", "linux", + "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_oauth2_test", + "name": "h2_loadreporting_test", "platforms": [ "windows", "linux", @@ -10502,14 +10540,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10524,14 +10561,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10546,14 +10582,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10568,14 +10603,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10590,14 +10624,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10612,14 +10645,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10634,14 +10666,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10656,14 +10687,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10678,14 +10708,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10700,14 +10729,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10722,14 +10750,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10744,14 +10771,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10766,14 +10792,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10788,14 +10813,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10810,14 +10834,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10832,14 +10855,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10854,14 +10876,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10876,14 +10897,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10898,14 +10918,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10920,14 +10939,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10942,14 +10960,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10964,14 +10981,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -10986,14 +11002,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11008,14 +11023,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11030,14 +11044,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11052,14 +11065,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11074,14 +11086,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11096,14 +11107,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11118,14 +11128,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11140,14 +11149,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11162,14 +11170,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11184,14 +11191,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11206,14 +11212,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11228,14 +11233,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11250,14 +11254,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11272,14 +11275,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11294,14 +11296,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11316,14 +11317,13 @@ "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_loadreporting_test", + "name": "h2_oauth2_test", "platforms": [ "windows", "linux", @@ -11543,7 +11543,7 @@ }, { "args": [ - "empty_batch" + "disappearing_server" ], "ci_platforms": [ "windows", @@ -11564,7 +11564,7 @@ }, { "args": [ - "filter_causes_close" + "empty_batch" ], "ci_platforms": [ "windows", @@ -11627,7 +11627,7 @@ }, { "args": [ - "hpack_size" + "high_initial_seqno" ], "ci_platforms": [ "windows", @@ -11837,7 +11837,7 @@ }, { "args": [ - "request_with_flags" + "request_with_payload" ], "ci_platforms": [ "windows", @@ -11858,7 +11858,7 @@ }, { "args": [ - "request_with_payload" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -11879,7 +11879,7 @@ }, { "args": [ - "server_finishes_request" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -11900,7 +11900,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "shutdown_finishes_tags" ], "ci_platforms": [ "windows", @@ -12215,7 +12215,7 @@ }, { "args": [ - "disappearing_server" + "empty_batch" ], "ci_platforms": [ "windows", @@ -12236,7 +12236,7 @@ }, { "args": [ - "empty_batch" + "filter_causes_close" ], "ci_platforms": [ "windows", @@ -12299,7 +12299,7 @@ }, { "args": [ - "high_initial_seqno" + "hpack_size" ], "ci_platforms": [ "windows", @@ -12530,7 +12530,7 @@ }, { "args": [ - "request_with_payload" + "request_with_flags" ], "ci_platforms": [ "windows", @@ -12551,7 +12551,7 @@ }, { "args": [ - "server_finishes_request" + "request_with_payload" ], "ci_platforms": [ "windows", @@ -12572,7 +12572,7 @@ }, { "args": [ - "shutdown_finishes_calls" + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -12593,7 +12593,7 @@ }, { "args": [ - "shutdown_finishes_tags" + "shutdown_finishes_calls" ], "ci_platforms": [ "windows", @@ -17964,6 +17964,7 @@ "bad_hostname" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -17985,6 +17986,7 @@ "binary_metadata" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18006,6 +18008,7 @@ "cancel_after_accept" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18027,6 +18030,7 @@ "cancel_after_client_done" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18048,6 +18052,7 @@ "cancel_after_invoke" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18069,6 +18074,7 @@ "cancel_before_invoke" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18090,6 +18096,7 @@ "cancel_in_a_vacuum" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18111,6 +18118,7 @@ "cancel_with_status" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18220,6 +18228,7 @@ "empty_batch" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18241,6 +18250,7 @@ "filter_causes_close" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18262,6 +18272,7 @@ "graceful_server_shutdown" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18283,6 +18294,7 @@ "high_initial_seqno" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18304,6 +18316,7 @@ "hpack_size" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18325,6 +18338,7 @@ "idempotent_request" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18346,6 +18360,7 @@ "invoke_large_request" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18367,6 +18382,7 @@ "large_metadata" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18388,6 +18404,7 @@ "max_concurrent_streams" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18409,6 +18426,7 @@ "max_message_length" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18430,6 +18448,7 @@ "negative_deadline" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18451,6 +18470,7 @@ "no_op" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18472,6 +18492,7 @@ "payload" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18515,6 +18536,7 @@ "ping_pong_streaming" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18536,6 +18558,7 @@ "registered_call" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18557,6 +18580,7 @@ "request_with_flags" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18578,6 +18602,7 @@ "request_with_payload" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18599,6 +18624,7 @@ "server_finishes_request" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18620,6 +18646,7 @@ "shutdown_finishes_calls" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18641,6 +18668,7 @@ "shutdown_finishes_tags" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18684,6 +18712,7 @@ "simple_metadata" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18705,6 +18734,7 @@ "simple_request" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18726,6 +18756,7 @@ "trailing_metadata" ], "ci_platforms": [ + "windows", "linux", "mac", "posix" @@ -18747,7 +18778,6 @@ "bad_hostname" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -18768,7 +18798,6 @@ "binary_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -18789,7 +18818,6 @@ "cancel_after_accept" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -18810,7 +18838,6 @@ "cancel_after_client_done" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -18831,7 +18858,6 @@ "cancel_after_invoke" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -18852,7 +18878,6 @@ "cancel_before_invoke" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -18873,7 +18898,6 @@ "cancel_in_a_vacuum" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -18894,7 +18918,6 @@ "cancel_with_status" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -18935,7 +18958,6 @@ "empty_batch" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -18956,7 +18978,6 @@ "filter_causes_close" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -18977,7 +18998,6 @@ "graceful_server_shutdown" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -18998,7 +19018,6 @@ "high_initial_seqno" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -19019,7 +19038,6 @@ "hpack_size" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -19040,7 +19058,6 @@ "idempotent_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -19061,7 +19078,6 @@ "invoke_large_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -19082,7 +19098,6 @@ "large_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -19103,7 +19118,6 @@ "max_concurrent_streams" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -19124,7 +19138,6 @@ "max_message_length" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -19145,7 +19158,6 @@ "negative_deadline" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -19166,7 +19178,6 @@ "no_op" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -19187,7 +19198,6 @@ "payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -19208,7 +19218,6 @@ "ping_pong_streaming" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -19229,7 +19238,6 @@ "registered_call" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -19250,7 +19258,6 @@ "request_with_flags" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -19271,7 +19278,6 @@ "request_with_payload" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -19292,7 +19298,6 @@ "server_finishes_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -19313,7 +19318,6 @@ "shutdown_finishes_calls" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -19334,7 +19338,6 @@ "shutdown_finishes_tags" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -19355,7 +19358,6 @@ "simple_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -19376,7 +19378,6 @@ "simple_request" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" @@ -19397,7 +19398,6 @@ "trailing_metadata" ], "ci_platforms": [ - "windows", "linux", "mac", "posix" diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 2e8e7ca5dd6..4cc5f6011c8 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -271,6 +271,7 @@ + @@ -762,6 +763,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 4d58c8e9a5c..a8ac26514d9 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -469,6 +469,9 @@ src\core\ext\transport\chttp2\client\insecure + + src\core\ext\transport\chttp2\client\insecure + src\core\ext\lb_policy\grpclb @@ -549,6 +552,9 @@ include\grpc + + include\grpc + include\grpc diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 5f7bc887155..6edae2765dc 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -262,6 +262,7 @@ + @@ -634,6 +635,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 5006ac7e9b8..3279325eb1f 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -328,6 +328,9 @@ src\core\ext\transport\chttp2\client\insecure + + src\core\ext\transport\chttp2\client\insecure + src\core\ext\client_config @@ -465,6 +468,9 @@ include\grpc + + include\grpc + include\grpc From 3a3e14ca096e030bbbbeb7c52a4ef66f371d5166 Mon Sep 17 00:00:00 2001 From: Adam Michalik Date: Mon, 16 May 2016 15:48:12 -0700 Subject: [PATCH 0922/1894] revert channel_create.c --- .../chttp2/client/insecure/channel_create.c | 36 ------------------- 1 file changed, 36 deletions(-) diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create.c b/src/core/ext/transport/chttp2/client/insecure/channel_create.c index ded0721e943..c5d3d8d9cc8 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create.c @@ -33,7 +33,6 @@ #include -#include #include #include @@ -48,7 +47,6 @@ #include "src/core/lib/channel/compress_filter.h" #include "src/core/lib/channel/http_client_filter.h" #include "src/core/lib/iomgr/tcp_client.h" -#include "src/core/lib/iomgr/tcp_posix.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/channel.h" @@ -237,40 +235,6 @@ grpc_channel *grpc_insecure_channel_create(const char *target, grpc_exec_ctx_finish(&exec_ctx); - return channel; /* may be NULL */ -} - -grpc_channel *grpc_insecure_channel_create_from_fd( - const char *target, int fd, const grpc_channel_args *args) { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - GRPC_API_TRACE( - "grpc_insecure_channel_create(target=%p, fd=%d, args=%p)", 3, - (target, fd, args)); - - grpc_arg default_authority_arg; - default_authority_arg.type = GRPC_ARG_STRING; - default_authority_arg.key = GRPC_ARG_DEFAULT_AUTHORITY; - default_authority_arg.value.string = "test.authority"; - grpc_channel_args *final_args = grpc_channel_args_copy_and_add( - args, &default_authority_arg, 1); - - int flags = fcntl(fd, F_GETFL, 0); - GPR_ASSERT(fcntl(fd, F_SETFL, flags | O_NONBLOCK) == 0); - - grpc_endpoint *client = grpc_tcp_create( - grpc_fd_create(fd, "client"), GRPC_TCP_DEFAULT_READ_SLICE_SIZE, - "fd-client"); - - grpc_transport *transport = - grpc_create_chttp2_transport(&exec_ctx, final_args, client, 1); - GPR_ASSERT(transport); - grpc_channel *channel = grpc_channel_create( - &exec_ctx, target, final_args, GRPC_CLIENT_DIRECT_CHANNEL, transport); - grpc_channel_args_destroy(final_args); - grpc_chttp2_transport_start_reading(&exec_ctx, transport, NULL, 0); - - grpc_exec_ctx_finish(&exec_ctx); - return channel != NULL ? channel : grpc_lame_client_channel_create( target, GRPC_STATUS_INTERNAL, "Failed to create client channel"); From 8cf5303e8cc2e411420b0c69070dfdb838b182f3 Mon Sep 17 00:00:00 2001 From: Adam Michalik Date: Mon, 16 May 2016 16:08:05 -0700 Subject: [PATCH 0923/1894] more separation --- include/grpc/grpc_posix.h | 4 ++- .../client/insecure/channel_create_posix.c | 28 ++++++++----------- 2 files changed, 14 insertions(+), 18 deletions(-) diff --git a/include/grpc/grpc_posix.h b/include/grpc/grpc_posix.h index 4eedc10ef22..12bb287d1ac 100644 --- a/include/grpc/grpc_posix.h +++ b/include/grpc/grpc_posix.h @@ -34,7 +34,10 @@ #ifndef GRPC_GRPC_POSIX_H #define GRPC_GRPC_POSIX_H + #include +#include + #include #ifdef __cplusplus @@ -47,7 +50,6 @@ extern "C" { * functionality on top of GRPC Core. */ - #ifdef GPR_POSIX_SOCKET /** Create a client channel to 'target' using file descriptor 'fd'. The 'target' diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c index fdcf4c44306..7d28dbf8a9f 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c @@ -31,28 +31,22 @@ * */ +#include + #ifdef GPR_POSIX_SOCKET #include -// #include -// #include -// #include - -// #include -// #include -// #include +#include -// #include "src/core/ext/client_config/client_channel.h" -// #include "src/core/ext/client_config/resolver_registry.h" -// #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" -// #include "src/core/lib/channel/channel_args.h" -// #include "src/core/lib/channel/compress_filter.h" -// #include "src/core/lib/channel/http_client_filter.h" -// #include "src/core/lib/iomgr/tcp_client.h" -// #include "src/core/lib/iomgr/tcp_posix.h" -// #include "src/core/lib/surface/api_trace.h" -// #include "src/core/lib/surface/channel.h" +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/transport/transport.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/tcp_posix.h" +#include "src/core/lib/surface/api_trace.h" +#include "src/core/lib/surface/channel.h" grpc_channel *grpc_insecure_channel_create_from_fd( From a1f8b141f629fb30857da8f1dbc7f2d9ac09605f Mon Sep 17 00:00:00 2001 From: Adam Michalik Date: Mon, 16 May 2016 16:12:55 -0700 Subject: [PATCH 0924/1894] revert grpc.h --- include/grpc/grpc.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h index 163d5291d30..6f7a67b715e 100644 --- a/include/grpc/grpc.h +++ b/include/grpc/grpc.h @@ -240,12 +240,6 @@ GRPCAPI char *grpc_channel_get_target(grpc_channel *channel); GRPCAPI grpc_channel *grpc_insecure_channel_create( const char *target, const grpc_channel_args *args, void *reserved); -/** Create a client channel to 'target' using file descriptor 'fd'. The 'target' - argument will be used to indicate the name for this channel. See the comment - for grpc_insecure_channel_create for description of 'args' argument. */ -GRPCAPI grpc_channel *grpc_insecure_channel_create_from_fd( - const char *target, int fd, const grpc_channel_args *args); - /** Create a lame client: this client fails every operation attempted on it. */ GRPCAPI grpc_channel *grpc_lame_client_channel_create( const char *target, grpc_status_code error_code, const char *error_message); From f31a7ff597979986ac2dfea442be22c947a0c6c4 Mon Sep 17 00:00:00 2001 From: Adam Michalik Date: Fri, 20 May 2016 15:27:30 -0700 Subject: [PATCH 0925/1894] added missing include --- test/core/end2end/fixtures/h2_fd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/core/end2end/fixtures/h2_fd.c b/test/core/end2end/fixtures/h2_fd.c index 1f4d2495e00..9e3df58a52a 100644 --- a/test/core/end2end/fixtures/h2_fd.c +++ b/test/core/end2end/fixtures/h2_fd.c @@ -43,6 +43,7 @@ #include #include #include +#include #include "src/core/ext/client_config/client_channel.h" #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/compress_filter.h" @@ -125,8 +126,7 @@ static void chttp2_init_server_socketpair(grpc_end2end_test_fixture *f, grpc_fd_create(sfd->fd_pair[1], "fixture_server"), 65536 /* read_slice_size */, "fixture_server"); - transport = - grpc_create_chttp2_transport(&exec_ctx, server_args, server_endpoint, 0); + transport = grpc_create_chttp2_transport(&exec_ctx, server_args, server_endpoint, 0); server_setup_transport(f, transport); grpc_chttp2_transport_start_reading(&exec_ctx, transport, NULL, 0); grpc_exec_ctx_finish(&exec_ctx); From 1f2386562267e37c9f9c28173965275d391aec9e Mon Sep 17 00:00:00 2001 From: Adam Michalik Date: Fri, 20 May 2016 15:55:57 -0700 Subject: [PATCH 0926/1894] code formatting --- test/core/end2end/fixtures/h2_fd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/core/end2end/fixtures/h2_fd.c b/test/core/end2end/fixtures/h2_fd.c index 9e3df58a52a..bdda5d95792 100644 --- a/test/core/end2end/fixtures/h2_fd.c +++ b/test/core/end2end/fixtures/h2_fd.c @@ -126,7 +126,8 @@ static void chttp2_init_server_socketpair(grpc_end2end_test_fixture *f, grpc_fd_create(sfd->fd_pair[1], "fixture_server"), 65536 /* read_slice_size */, "fixture_server"); - transport = grpc_create_chttp2_transport(&exec_ctx, server_args, server_endpoint, 0); + transport = + grpc_create_chttp2_transport(&exec_ctx, server_args, server_endpoint, 0); server_setup_transport(f, transport); grpc_chttp2_transport_start_reading(&exec_ctx, transport, NULL, 0); grpc_exec_ctx_finish(&exec_ctx); From 4023382294f732fe8fa1ff8e10a3eed68c154ff0 Mon Sep 17 00:00:00 2001 From: Adam Michalik Date: Fri, 20 May 2016 15:53:01 -0700 Subject: [PATCH 0927/1894] Add support for establishing server channel using existing FD --- include/grpc/grpc_posix.h | 5 ++ .../server/insecure/server_chttp2_posix.c | 58 +++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c diff --git a/include/grpc/grpc_posix.h b/include/grpc/grpc_posix.h index 12bb287d1ac..b72ea5208db 100644 --- a/include/grpc/grpc_posix.h +++ b/include/grpc/grpc_posix.h @@ -58,6 +58,11 @@ extern "C" { GRPCAPI grpc_channel *grpc_insecure_channel_create_from_fd( const char *target, int fd, const grpc_channel_args *args); +/** Add the connected communication channel based on file descriptor 'fd' to the + 'server'. The 'fd' must be an open file descriptor corresponding to a + connected socket. */ +GRPCAPI void grpc_server_add_insecure_channel_from_fd(grpc_server *server, int fd); + #endif // GPR_POSIX_SOCKET #ifdef __cplusplus diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c new file mode 100644 index 00000000000..012fbb432a7 --- /dev/null +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c @@ -0,0 +1,58 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#ifdef GPR_POSIX_SOCKET + +#include +#include + +void grpc_server_add_insecure_channel_from_fd(grpc_server *server, int fd) { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + char *name; + gpr_asprintf(&name, "fd:%d", fd); + + grpc_endpoint *server_endpoint = grpc_tcp_create( + grpc_fd_create(fd, name), GRPC_TCP_DEFAULT_READ_SLICE_SIZE, name); + + grpc_channel_args *server_args = grpc_server_get_channel_args(server); + grpc_transport *transport = grpc_create_chttp2_transport( + &exec_ctx, server_args, server_endpoint, 0 /* is_client */); + grpc_server_setup_transport(&exec_ctx, server, transport, server_args); + + +} + + +#endif // GPR_POSIX_SOCKET From bf10c82bf805a6d9b87813650e581113c4c7b3ff Mon Sep 17 00:00:00 2001 From: Adam Michalik Date: Fri, 20 May 2016 16:13:32 -0700 Subject: [PATCH 0928/1894] implement support for adding external fd to server --- BUILD | 3 ++ Makefile | 2 + binding.gyp | 1 + build.yaml | 1 + config.m4 | 1 + gRPC.podspec | 1 + grpc.def | 2 +- grpc.gemspec | 1 + package.xml | 1 + .../server/insecure/server_chttp2_posix.c | 14 ++++-- .../grpcio/grpc/_cython/imports.generated.c | 4 +- .../grpcio/grpc/_cython/imports.generated.h | 6 +-- src/python/grpcio/grpc_core_dependencies.py | 1 + src/ruby/ext/grpc/rb_grpc_imports.generated.c | 4 +- src/ruby/ext/grpc/rb_grpc_imports.generated.h | 6 +-- test/core/end2end/fixtures/h2_fd.c | 47 ++++--------------- tools/doxygen/Doxyfile.core.internal | 1 + tools/run_tests/sources_and_headers.json | 3 +- vsprojects/vcxproj/grpc/grpc.vcxproj | 2 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 3 ++ .../grpc_unsecure/grpc_unsecure.vcxproj | 2 + .../grpc_unsecure.vcxproj.filters | 3 ++ 22 files changed, 55 insertions(+), 54 deletions(-) diff --git a/BUILD b/BUILD index 1e0f112ac17..f1f3b8bff7b 100644 --- a/BUILD +++ b/BUILD @@ -462,6 +462,7 @@ cc_library( "src/core/ext/client_config/subchannel_index.c", "src/core/ext/client_config/uri_parser.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", + "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", @@ -1086,6 +1087,7 @@ cc_library( "src/core/lib/transport/transport.c", "src/core/lib/transport/transport_op_string.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", + "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c", "src/core/ext/transport/chttp2/transport/bin_encoder.c", "src/core/ext/transport/chttp2/transport/chttp2_plugin.c", "src/core/ext/transport/chttp2/transport/chttp2_transport.c", @@ -1844,6 +1846,7 @@ objc_library( "src/core/ext/client_config/subchannel_index.c", "src/core/ext/client_config/uri_parser.c", "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", + "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", diff --git a/Makefile b/Makefile index 5eecfd74277..78900aedd8d 100644 --- a/Makefile +++ b/Makefile @@ -2634,6 +2634,7 @@ LIBGRPC_SRC = \ src/core/ext/client_config/subchannel_index.c \ src/core/ext/client_config/uri_parser.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ + src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ @@ -3164,6 +3165,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/transport/transport.c \ src/core/lib/transport/transport_op_string.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ + src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \ src/core/ext/transport/chttp2/transport/bin_encoder.c \ src/core/ext/transport/chttp2/transport/chttp2_plugin.c \ src/core/ext/transport/chttp2/transport/chttp2_transport.c \ diff --git a/binding.gyp b/binding.gyp index 901ab45750d..80077a99bd8 100644 --- a/binding.gyp +++ b/binding.gyp @@ -718,6 +718,7 @@ 'src/core/ext/client_config/subchannel_index.c', 'src/core/ext/client_config/uri_parser.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', + 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', diff --git a/build.yaml b/build.yaml index 7ceaee9c6eb..0a57965ab7b 100644 --- a/build.yaml +++ b/build.yaml @@ -578,6 +578,7 @@ filegroups: - name: grpc_transport_chttp2_server_insecure src: - src/core/ext/transport/chttp2/server/insecure/server_chttp2.c + - src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c uses: - grpc_transport_chttp2 - grpc_base diff --git a/config.m4 b/config.m4 index e3c5a81ae16..a760d982d13 100644 --- a/config.m4 +++ b/config.m4 @@ -237,6 +237,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/client_config/subchannel_index.c \ src/core/ext/client_config/uri_parser.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ + src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ diff --git a/gRPC.podspec b/gRPC.podspec index df1afc81535..2266e17205e 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -499,6 +499,7 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/subchannel_index.c', 'src/core/ext/client_config/uri_parser.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', + 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', diff --git a/grpc.def b/grpc.def index 562ca515af2..0046028949e 100644 --- a/grpc.def +++ b/grpc.def @@ -67,7 +67,6 @@ EXPORTS grpc_census_call_get_context grpc_channel_get_target grpc_insecure_channel_create - grpc_insecure_channel_create_from_fd grpc_lame_client_channel_create grpc_channel_destroy grpc_call_cancel @@ -90,6 +89,7 @@ EXPORTS grpc_is_binary_header grpc_call_error_to_string grpc_insecure_channel_create_from_fd + grpc_server_add_insecure_channel_from_fd grpc_auth_property_iterator_next grpc_auth_context_property_iterator grpc_auth_context_peer_identity diff --git a/grpc.gemspec b/grpc.gemspec index daddc799260..406e0477b92 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -478,6 +478,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_config/subchannel_index.c ) s.files += %w( src/core/ext/client_config/uri_parser.c ) s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2.c ) + s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c ) s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create.c ) s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c ) s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.c ) diff --git a/package.xml b/package.xml index fb774c2e6a2..edd81623499 100644 --- a/package.xml +++ b/package.xml @@ -485,6 +485,7 @@ + diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c index 012fbb432a7..1946f394d40 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c @@ -37,6 +37,14 @@ #include #include +#include + +#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" +#include "src/core/lib/channel/channel_args.h" +#include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/tcp_posix.h" +#include "src/core/lib/surface/server.h" void grpc_server_add_insecure_channel_from_fd(grpc_server *server, int fd) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -46,12 +54,12 @@ void grpc_server_add_insecure_channel_from_fd(grpc_server *server, int fd) { grpc_endpoint *server_endpoint = grpc_tcp_create( grpc_fd_create(fd, name), GRPC_TCP_DEFAULT_READ_SLICE_SIZE, name); - grpc_channel_args *server_args = grpc_server_get_channel_args(server); + const grpc_channel_args *server_args = grpc_server_get_channel_args(server); grpc_transport *transport = grpc_create_chttp2_transport( &exec_ctx, server_args, server_endpoint, 0 /* is_client */); grpc_server_setup_transport(&exec_ctx, server, transport, server_args); - - + grpc_chttp2_transport_start_reading(&exec_ctx, transport, NULL, 0); + grpc_exec_ctx_finish(&exec_ctx); } diff --git a/src/python/grpcio/grpc/_cython/imports.generated.c b/src/python/grpcio/grpc/_cython/imports.generated.c index 8b8d8ba1ae3..5c49f6cf3e9 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.c +++ b/src/python/grpcio/grpc/_cython/imports.generated.c @@ -105,7 +105,6 @@ grpc_census_call_set_context_type grpc_census_call_set_context_import; grpc_census_call_get_context_type grpc_census_call_get_context_import; grpc_channel_get_target_type grpc_channel_get_target_import; grpc_insecure_channel_create_type grpc_insecure_channel_create_import; -grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; grpc_lame_client_channel_create_type grpc_lame_client_channel_create_import; grpc_channel_destroy_type grpc_channel_destroy_import; grpc_call_cancel_type grpc_call_cancel_import; @@ -128,6 +127,7 @@ grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_import; grpc_is_binary_header_type grpc_is_binary_header_import; grpc_call_error_to_string_type grpc_call_error_to_string_import; grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; +grpc_server_add_insecure_channel_from_fd_type grpc_server_add_insecure_channel_from_fd_import; grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import; grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import; @@ -378,7 +378,6 @@ void pygrpc_load_imports(HMODULE library) { grpc_census_call_get_context_import = (grpc_census_call_get_context_type) GetProcAddress(library, "grpc_census_call_get_context"); grpc_channel_get_target_import = (grpc_channel_get_target_type) GetProcAddress(library, "grpc_channel_get_target"); grpc_insecure_channel_create_import = (grpc_insecure_channel_create_type) GetProcAddress(library, "grpc_insecure_channel_create"); - grpc_insecure_channel_create_from_fd_import = (grpc_insecure_channel_create_from_fd_type) GetProcAddress(library, "grpc_insecure_channel_create_from_fd"); grpc_lame_client_channel_create_import = (grpc_lame_client_channel_create_type) GetProcAddress(library, "grpc_lame_client_channel_create"); grpc_channel_destroy_import = (grpc_channel_destroy_type) GetProcAddress(library, "grpc_channel_destroy"); grpc_call_cancel_import = (grpc_call_cancel_type) GetProcAddress(library, "grpc_call_cancel"); @@ -401,6 +400,7 @@ void pygrpc_load_imports(HMODULE library) { grpc_is_binary_header_import = (grpc_is_binary_header_type) GetProcAddress(library, "grpc_is_binary_header"); grpc_call_error_to_string_import = (grpc_call_error_to_string_type) GetProcAddress(library, "grpc_call_error_to_string"); grpc_insecure_channel_create_from_fd_import = (grpc_insecure_channel_create_from_fd_type) GetProcAddress(library, "grpc_insecure_channel_create_from_fd"); + grpc_server_add_insecure_channel_from_fd_import = (grpc_server_add_insecure_channel_from_fd_type) GetProcAddress(library, "grpc_server_add_insecure_channel_from_fd"); grpc_auth_property_iterator_next_import = (grpc_auth_property_iterator_next_type) GetProcAddress(library, "grpc_auth_property_iterator_next"); grpc_auth_context_property_iterator_import = (grpc_auth_context_property_iterator_type) GetProcAddress(library, "grpc_auth_context_property_iterator"); grpc_auth_context_peer_identity_import = (grpc_auth_context_peer_identity_type) GetProcAddress(library, "grpc_auth_context_peer_identity"); diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index 42ebb91274d..701a3aec282 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -266,9 +266,6 @@ extern grpc_channel_get_target_type grpc_channel_get_target_import; typedef grpc_channel *(*grpc_insecure_channel_create_type)(const char *target, const grpc_channel_args *args, void *reserved); extern grpc_insecure_channel_create_type grpc_insecure_channel_create_import; #define grpc_insecure_channel_create grpc_insecure_channel_create_import -typedef grpc_channel *(*grpc_insecure_channel_create_from_fd_type)(const char *target, int fd, const grpc_channel_args *args); -extern grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; -#define grpc_insecure_channel_create_from_fd grpc_insecure_channel_create_from_fd_import typedef grpc_channel *(*grpc_lame_client_channel_create_type)(const char *target, grpc_status_code error_code, const char *error_message); extern grpc_lame_client_channel_create_type grpc_lame_client_channel_create_import; #define grpc_lame_client_channel_create grpc_lame_client_channel_create_import @@ -335,6 +332,9 @@ extern grpc_call_error_to_string_type grpc_call_error_to_string_import; typedef grpc_channel *(*grpc_insecure_channel_create_from_fd_type)(const char *target, int fd, const grpc_channel_args *args); extern grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; #define grpc_insecure_channel_create_from_fd grpc_insecure_channel_create_from_fd_import +typedef void(*grpc_server_add_insecure_channel_from_fd_type)(grpc_server *server, int fd); +extern grpc_server_add_insecure_channel_from_fd_type grpc_server_add_insecure_channel_from_fd_import; +#define grpc_server_add_insecure_channel_from_fd grpc_server_add_insecure_channel_from_fd_import typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); extern grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; #define grpc_auth_property_iterator_next grpc_auth_property_iterator_next_import diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 0618b336d15..0e4d962154f 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -231,6 +231,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/client_config/subchannel_index.c', 'src/core/ext/client_config/uri_parser.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', + 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index 82761e95ca3..c13d1a00d74 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -105,7 +105,6 @@ grpc_census_call_set_context_type grpc_census_call_set_context_import; grpc_census_call_get_context_type grpc_census_call_get_context_import; grpc_channel_get_target_type grpc_channel_get_target_import; grpc_insecure_channel_create_type grpc_insecure_channel_create_import; -grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; grpc_lame_client_channel_create_type grpc_lame_client_channel_create_import; grpc_channel_destroy_type grpc_channel_destroy_import; grpc_call_cancel_type grpc_call_cancel_import; @@ -128,6 +127,7 @@ grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_import; grpc_is_binary_header_type grpc_is_binary_header_import; grpc_call_error_to_string_type grpc_call_error_to_string_import; grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; +grpc_server_add_insecure_channel_from_fd_type grpc_server_add_insecure_channel_from_fd_import; grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import; grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import; @@ -374,7 +374,6 @@ void grpc_rb_load_imports(HMODULE library) { grpc_census_call_get_context_import = (grpc_census_call_get_context_type) GetProcAddress(library, "grpc_census_call_get_context"); grpc_channel_get_target_import = (grpc_channel_get_target_type) GetProcAddress(library, "grpc_channel_get_target"); grpc_insecure_channel_create_import = (grpc_insecure_channel_create_type) GetProcAddress(library, "grpc_insecure_channel_create"); - grpc_insecure_channel_create_from_fd_import = (grpc_insecure_channel_create_from_fd_type) GetProcAddress(library, "grpc_insecure_channel_create_from_fd"); grpc_lame_client_channel_create_import = (grpc_lame_client_channel_create_type) GetProcAddress(library, "grpc_lame_client_channel_create"); grpc_channel_destroy_import = (grpc_channel_destroy_type) GetProcAddress(library, "grpc_channel_destroy"); grpc_call_cancel_import = (grpc_call_cancel_type) GetProcAddress(library, "grpc_call_cancel"); @@ -397,6 +396,7 @@ void grpc_rb_load_imports(HMODULE library) { grpc_is_binary_header_import = (grpc_is_binary_header_type) GetProcAddress(library, "grpc_is_binary_header"); grpc_call_error_to_string_import = (grpc_call_error_to_string_type) GetProcAddress(library, "grpc_call_error_to_string"); grpc_insecure_channel_create_from_fd_import = (grpc_insecure_channel_create_from_fd_type) GetProcAddress(library, "grpc_insecure_channel_create_from_fd"); + grpc_server_add_insecure_channel_from_fd_import = (grpc_server_add_insecure_channel_from_fd_type) GetProcAddress(library, "grpc_server_add_insecure_channel_from_fd"); grpc_auth_property_iterator_next_import = (grpc_auth_property_iterator_next_type) GetProcAddress(library, "grpc_auth_property_iterator_next"); grpc_auth_context_property_iterator_import = (grpc_auth_context_property_iterator_type) GetProcAddress(library, "grpc_auth_context_property_iterator"); grpc_auth_context_peer_identity_import = (grpc_auth_context_peer_identity_type) GetProcAddress(library, "grpc_auth_context_peer_identity"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index e83285828cd..4a7d4b272a3 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -266,9 +266,6 @@ extern grpc_channel_get_target_type grpc_channel_get_target_import; typedef grpc_channel *(*grpc_insecure_channel_create_type)(const char *target, const grpc_channel_args *args, void *reserved); extern grpc_insecure_channel_create_type grpc_insecure_channel_create_import; #define grpc_insecure_channel_create grpc_insecure_channel_create_import -typedef grpc_channel *(*grpc_insecure_channel_create_from_fd_type)(const char *target, int fd, const grpc_channel_args *args); -extern grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; -#define grpc_insecure_channel_create_from_fd grpc_insecure_channel_create_from_fd_import typedef grpc_channel *(*grpc_lame_client_channel_create_type)(const char *target, grpc_status_code error_code, const char *error_message); extern grpc_lame_client_channel_create_type grpc_lame_client_channel_create_import; #define grpc_lame_client_channel_create grpc_lame_client_channel_create_import @@ -335,6 +332,9 @@ extern grpc_call_error_to_string_type grpc_call_error_to_string_import; typedef grpc_channel *(*grpc_insecure_channel_create_from_fd_type)(const char *target, int fd, const grpc_channel_args *args); extern grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; #define grpc_insecure_channel_create_from_fd grpc_insecure_channel_create_from_fd_import +typedef void(*grpc_server_add_insecure_channel_from_fd_type)(grpc_server *server, int fd); +extern grpc_server_add_insecure_channel_from_fd_type grpc_server_add_insecure_channel_from_fd_import; +#define grpc_server_add_insecure_channel_from_fd grpc_server_add_insecure_channel_from_fd_import typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); extern grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; #define grpc_auth_property_iterator_next grpc_auth_property_iterator_next_import diff --git a/test/core/end2end/fixtures/h2_fd.c b/test/core/end2end/fixtures/h2_fd.c index bdda5d95792..b162cf82485 100644 --- a/test/core/end2end/fixtures/h2_fd.c +++ b/test/core/end2end/fixtures/h2_fd.c @@ -35,47 +35,20 @@ #include #include -#include -#include #include -#include -#include -#include -#include +#include #include -#include "src/core/ext/client_config/client_channel.h" -#include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" -#include "src/core/lib/channel/compress_filter.h" -#include "src/core/lib/channel/connected_channel.h" -#include "src/core/lib/channel/http_client_filter.h" -#include "src/core/lib/channel/http_server_filter.h" -#include "src/core/lib/iomgr/endpoint_pair.h" -#include "src/core/lib/iomgr/iomgr.h" +#include #include "src/core/lib/iomgr/socket_utils_posix.h" -#include "src/core/lib/iomgr/tcp_posix.h" +#include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/unix_sockets_posix.h" -#include "src/core/lib/surface/channel.h" -#include "src/core/lib/surface/server.h" -#include "test/core/util/port.h" #include "test/core/util/test_config.h" -/* chttp2 transport that is immediately available (used for testing - connected_channel without a client_channel */ - -static void server_setup_transport(void *ts, grpc_transport *transport) { - grpc_end2end_test_fixture *f = ts; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_server_setup_transport(&exec_ctx, f->server, transport, - grpc_server_get_channel_args(f->server)); - grpc_exec_ctx_finish(&exec_ctx); -} - typedef struct { int fd_pair[2]; } sp_fixture_data; - static void create_sockets(int sv[2]) { int flags; grpc_create_socketpair_if_unix(sv); @@ -106,6 +79,7 @@ static void chttp2_init_client_socketpair(grpc_end2end_test_fixture *f, grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; sp_fixture_data *sfd = f->fixture_data; + GPR_ASSERT(!f->client); f->client = grpc_insecure_channel_create_from_fd( "fixture_client", sfd->fd_pair[0], client_args); GPR_ASSERT(f->client); @@ -117,19 +91,14 @@ static void chttp2_init_server_socketpair(grpc_end2end_test_fixture *f, grpc_channel_args *server_args) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; sp_fixture_data *sfd = f->fixture_data; - grpc_transport *transport; GPR_ASSERT(!f->server); f->server = grpc_server_create(server_args, NULL); + GPR_ASSERT(f->server); grpc_server_register_completion_queue(f->server, f->cq, NULL); grpc_server_start(f->server); - grpc_endpoint *server_endpoint = grpc_tcp_create( - grpc_fd_create(sfd->fd_pair[1], "fixture_server"), - 65536 /* read_slice_size */, "fixture_server"); - - transport = - grpc_create_chttp2_transport(&exec_ctx, server_args, server_endpoint, 0); - server_setup_transport(f, transport); - grpc_chttp2_transport_start_reading(&exec_ctx, transport, NULL, 0); + + grpc_server_add_insecure_channel_from_fd(f->server, sfd->fd_pair[1]); + grpc_exec_ctx_finish(&exec_ctx); } diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 648d42c1df8..64ab164d570 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -1095,6 +1095,7 @@ src/core/ext/client_config/subchannel_call_holder.c \ src/core/ext/client_config/subchannel_index.c \ src/core/ext/client_config/uri_parser.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ +src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 204ff4ce808..782aa373bf0 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6338,7 +6338,8 @@ "language": "c", "name": "grpc_transport_chttp2_server_insecure", "src": [ - "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c" + "src/core/ext/transport/chttp2/server/insecure/server_chttp2.c", + "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c" ], "third_party": false, "type": "filegroup" diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 4cc5f6011c8..4327ab93173 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -761,6 +761,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index a8ac26514d9..860575cc09d 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -466,6 +466,9 @@ src\core\ext\transport\chttp2\server\insecure + + src\core\ext\transport\chttp2\server\insecure + src\core\ext\transport\chttp2\client\insecure diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 6edae2765dc..3695ad44a0c 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -589,6 +589,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 3279325eb1f..a22e199f593 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -259,6 +259,9 @@ src\core\ext\transport\chttp2\server\insecure + + src\core\ext\transport\chttp2\server\insecure + src\core\ext\transport\chttp2\transport From da5d85d660495f68f03756590606ca59513c8b54 Mon Sep 17 00:00:00 2001 From: Adam Michalik Date: Wed, 25 May 2016 11:35:57 -0700 Subject: [PATCH 0929/1894] Add completion queue argument which is necessary after merge with master --- include/grpc/grpc_posix.h | 7 +++++-- .../chttp2/server/insecure/server_chttp2_posix.c | 8 ++++++-- test/core/end2end/fixtures/h2_fd.c | 2 +- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/include/grpc/grpc_posix.h b/include/grpc/grpc_posix.h index b72ea5208db..509e51e2c40 100644 --- a/include/grpc/grpc_posix.h +++ b/include/grpc/grpc_posix.h @@ -60,8 +60,11 @@ GRPCAPI grpc_channel *grpc_insecure_channel_create_from_fd( /** Add the connected communication channel based on file descriptor 'fd' to the 'server'. The 'fd' must be an open file descriptor corresponding to a - connected socket. */ -GRPCAPI void grpc_server_add_insecure_channel_from_fd(grpc_server *server, int fd); + connected socket. The 'cq' is a completion queue that will be getting events + from that descriptor. */ +GRPCAPI void grpc_server_add_insecure_channel_from_fd(grpc_server *server, + grpc_completion_queue *cq, + int fd); #endif // GPR_POSIX_SOCKET diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c index 1946f394d40..1807efc85d3 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c @@ -44,9 +44,12 @@ #include "src/core/lib/iomgr/endpoint.h" #include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/tcp_posix.h" +#include "src/core/lib/surface/completion_queue.h" #include "src/core/lib/surface/server.h" -void grpc_server_add_insecure_channel_from_fd(grpc_server *server, int fd) { +void grpc_server_add_insecure_channel_from_fd(grpc_server *server, + grpc_completion_queue *cq, + int fd) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; char *name; gpr_asprintf(&name, "fd:%d", fd); @@ -57,7 +60,8 @@ void grpc_server_add_insecure_channel_from_fd(grpc_server *server, int fd) { const grpc_channel_args *server_args = grpc_server_get_channel_args(server); grpc_transport *transport = grpc_create_chttp2_transport( &exec_ctx, server_args, server_endpoint, 0 /* is_client */); - grpc_server_setup_transport(&exec_ctx, server, transport, server_args); + grpc_endpoint_add_to_pollset(&exec_ctx, server_endpoint, grpc_cq_pollset(cq)); + grpc_server_setup_transport(&exec_ctx, server, transport, NULL, server_args); grpc_chttp2_transport_start_reading(&exec_ctx, transport, NULL, 0); grpc_exec_ctx_finish(&exec_ctx); } diff --git a/test/core/end2end/fixtures/h2_fd.c b/test/core/end2end/fixtures/h2_fd.c index b162cf82485..70790807223 100644 --- a/test/core/end2end/fixtures/h2_fd.c +++ b/test/core/end2end/fixtures/h2_fd.c @@ -97,7 +97,7 @@ static void chttp2_init_server_socketpair(grpc_end2end_test_fixture *f, grpc_server_register_completion_queue(f->server, f->cq, NULL); grpc_server_start(f->server); - grpc_server_add_insecure_channel_from_fd(f->server, sfd->fd_pair[1]); + grpc_server_add_insecure_channel_from_fd(f->server, f->cq, sfd->fd_pair[1]); grpc_exec_ctx_finish(&exec_ctx); } From b97e2d145efb4d0b407d18b43d3b7bb38bccf61f Mon Sep 17 00:00:00 2001 From: Adam Michalik Date: Thu, 2 Jun 2016 12:12:55 -0700 Subject: [PATCH 0930/1894] Add C++ support for using external FD --- BUILD | 8 +++ Makefile | 8 +++ build.yaml | 4 ++ include/grpc++/create_channel_posix.h | 57 +++++++++++++++++++ include/grpc++/grpc++.h | 2 + include/grpc++/server.h | 6 ++ include/grpc++/server_posix.h | 56 ++++++++++++++++++ include/grpc/grpc_posix.h | 4 +- include/grpc/impl/codegen/port_platform.h | 5 ++ .../client/insecure/channel_create_posix.c | 4 +- .../server/insecure/server_chttp2_posix.c | 4 +- src/cpp/client/create_channel_posix.cc | 57 +++++++++++++++++++ src/cpp/server/server.cc | 8 +++ src/cpp/server/server_posix.cc | 51 +++++++++++++++++ .../grpcio/grpc/_cython/imports.generated.h | 2 +- src/ruby/ext/grpc/rb_grpc_imports.generated.h | 2 +- tools/doxygen/Doxyfile.c++ | 2 + tools/doxygen/Doxyfile.c++.internal | 4 ++ tools/run_tests/sources_and_headers.json | 6 ++ vsprojects/vcxproj/grpc++/grpc++.vcxproj | 6 ++ .../vcxproj/grpc++/grpc++.vcxproj.filters | 12 ++++ .../grpc++_unsecure/grpc++_unsecure.vcxproj | 6 ++ .../grpc++_unsecure.vcxproj.filters | 12 ++++ 23 files changed, 318 insertions(+), 8 deletions(-) create mode 100644 include/grpc++/create_channel_posix.h create mode 100644 include/grpc++/server_posix.h create mode 100644 src/cpp/client/create_channel_posix.cc create mode 100644 src/cpp/server/server_posix.cc diff --git a/BUILD b/BUILD index f1f3b8bff7b..16bbdaa7cee 100644 --- a/BUILD +++ b/BUILD @@ -1236,6 +1236,7 @@ cc_library( "src/cpp/client/client_context.cc", "src/cpp/client/create_channel.cc", "src/cpp/client/create_channel_internal.cc", + "src/cpp/client/create_channel_posix.cc", "src/cpp/client/credentials.cc", "src/cpp/client/generic_stub.cc", "src/cpp/client/insecure_credentials.cc", @@ -1251,6 +1252,7 @@ cc_library( "src/cpp/server/server_builder.cc", "src/cpp/server/server_context.cc", "src/cpp/server/server_credentials.cc", + "src/cpp/server/server_posix.cc", "src/cpp/util/byte_buffer.cc", "src/cpp/util/slice.cc", "src/cpp/util/status.cc", @@ -1264,6 +1266,7 @@ cc_library( "include/grpc++/client_context.h", "include/grpc++/completion_queue.h", "include/grpc++/create_channel.h", + "include/grpc++/create_channel_posix.h", "include/grpc++/generic/async_generic_service.h", "include/grpc++/generic/generic_stub.h", "include/grpc++/grpc++.h", @@ -1291,6 +1294,7 @@ cc_library( "include/grpc++/server.h", "include/grpc++/server_builder.h", "include/grpc++/server_context.h", + "include/grpc++/server_posix.h", "include/grpc++/support/async_stream.h", "include/grpc++/support/async_unary_call.h", "include/grpc++/support/byte_buffer.h", @@ -1380,6 +1384,7 @@ cc_library( "src/cpp/client/client_context.cc", "src/cpp/client/create_channel.cc", "src/cpp/client/create_channel_internal.cc", + "src/cpp/client/create_channel_posix.cc", "src/cpp/client/credentials.cc", "src/cpp/client/generic_stub.cc", "src/cpp/client/insecure_credentials.cc", @@ -1395,6 +1400,7 @@ cc_library( "src/cpp/server/server_builder.cc", "src/cpp/server/server_context.cc", "src/cpp/server/server_credentials.cc", + "src/cpp/server/server_posix.cc", "src/cpp/util/byte_buffer.cc", "src/cpp/util/slice.cc", "src/cpp/util/status.cc", @@ -1408,6 +1414,7 @@ cc_library( "include/grpc++/client_context.h", "include/grpc++/completion_queue.h", "include/grpc++/create_channel.h", + "include/grpc++/create_channel_posix.h", "include/grpc++/generic/async_generic_service.h", "include/grpc++/generic/generic_stub.h", "include/grpc++/grpc++.h", @@ -1435,6 +1442,7 @@ cc_library( "include/grpc++/server.h", "include/grpc++/server_builder.h", "include/grpc++/server_context.h", + "include/grpc++/server_posix.h", "include/grpc++/support/async_stream.h", "include/grpc++/support/async_unary_call.h", "include/grpc++/support/byte_buffer.h", diff --git a/Makefile b/Makefile index 78900aedd8d..58358e23330 100644 --- a/Makefile +++ b/Makefile @@ -3431,6 +3431,7 @@ LIBGRPC++_SRC = \ src/cpp/client/client_context.cc \ src/cpp/client/create_channel.cc \ src/cpp/client/create_channel_internal.cc \ + src/cpp/client/create_channel_posix.cc \ src/cpp/client/credentials.cc \ src/cpp/client/generic_stub.cc \ src/cpp/client/insecure_credentials.cc \ @@ -3446,6 +3447,7 @@ LIBGRPC++_SRC = \ src/cpp/server/server_builder.cc \ src/cpp/server/server_context.cc \ src/cpp/server/server_credentials.cc \ + src/cpp/server/server_posix.cc \ src/cpp/util/byte_buffer.cc \ src/cpp/util/slice.cc \ src/cpp/util/status.cc \ @@ -3459,6 +3461,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/client_context.h \ include/grpc++/completion_queue.h \ include/grpc++/create_channel.h \ + include/grpc++/create_channel_posix.h \ include/grpc++/generic/async_generic_service.h \ include/grpc++/generic/generic_stub.h \ include/grpc++/grpc++.h \ @@ -3486,6 +3489,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/server.h \ include/grpc++/server_builder.h \ include/grpc++/server_context.h \ + include/grpc++/server_posix.h \ include/grpc++/support/async_stream.h \ include/grpc++/support/async_unary_call.h \ include/grpc++/support/byte_buffer.h \ @@ -3786,6 +3790,7 @@ LIBGRPC++_UNSECURE_SRC = \ src/cpp/client/client_context.cc \ src/cpp/client/create_channel.cc \ src/cpp/client/create_channel_internal.cc \ + src/cpp/client/create_channel_posix.cc \ src/cpp/client/credentials.cc \ src/cpp/client/generic_stub.cc \ src/cpp/client/insecure_credentials.cc \ @@ -3801,6 +3806,7 @@ LIBGRPC++_UNSECURE_SRC = \ src/cpp/server/server_builder.cc \ src/cpp/server/server_context.cc \ src/cpp/server/server_credentials.cc \ + src/cpp/server/server_posix.cc \ src/cpp/util/byte_buffer.cc \ src/cpp/util/slice.cc \ src/cpp/util/status.cc \ @@ -3814,6 +3820,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/client_context.h \ include/grpc++/completion_queue.h \ include/grpc++/create_channel.h \ + include/grpc++/create_channel_posix.h \ include/grpc++/generic/async_generic_service.h \ include/grpc++/generic/generic_stub.h \ include/grpc++/grpc++.h \ @@ -3841,6 +3848,7 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/server.h \ include/grpc++/server_builder.h \ include/grpc++/server_context.h \ + include/grpc++/server_posix.h \ include/grpc++/support/async_stream.h \ include/grpc++/support/async_unary_call.h \ include/grpc++/support/byte_buffer.h \ diff --git a/build.yaml b/build.yaml index 0a57965ab7b..a84309fe28d 100644 --- a/build.yaml +++ b/build.yaml @@ -635,6 +635,7 @@ filegroups: - include/grpc++/client_context.h - include/grpc++/completion_queue.h - include/grpc++/create_channel.h + - include/grpc++/create_channel_posix.h - include/grpc++/generic/async_generic_service.h - include/grpc++/generic/generic_stub.h - include/grpc++/grpc++.h @@ -662,6 +663,7 @@ filegroups: - include/grpc++/server.h - include/grpc++/server_builder.h - include/grpc++/server_context.h + - include/grpc++/server_posix.h - include/grpc++/support/async_stream.h - include/grpc++/support/async_unary_call.h - include/grpc++/support/byte_buffer.h @@ -684,6 +686,7 @@ filegroups: - src/cpp/client/client_context.cc - src/cpp/client/create_channel.cc - src/cpp/client/create_channel_internal.cc + - src/cpp/client/create_channel_posix.cc - src/cpp/client/credentials.cc - src/cpp/client/generic_stub.cc - src/cpp/client/insecure_credentials.cc @@ -699,6 +702,7 @@ filegroups: - src/cpp/server/server_builder.cc - src/cpp/server/server_context.cc - src/cpp/server/server_credentials.cc + - src/cpp/server/server_posix.cc - src/cpp/util/byte_buffer.cc - src/cpp/util/slice.cc - src/cpp/util/status.cc diff --git a/include/grpc++/create_channel_posix.h b/include/grpc++/create_channel_posix.h new file mode 100644 index 00000000000..0ca947d0447 --- /dev/null +++ b/include/grpc++/create_channel_posix.h @@ -0,0 +1,57 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPCXX_CREATE_CHANNEL_POSIX_H +#define GRPCXX_CREATE_CHANNEL_POSIX_H + +#include + +#include +#include + +namespace grpc { + +#ifdef GPR_SUPPORT_CHANNELS_FROM_FD + +/// Create a new \a Channel communicating over given file descriptor +/// +/// \param target The name of the target. +/// \param fd The file descriptor representing a socket. +std::shared_ptr CreateInsecureChannelFromFd( + const grpc::string& target, int fd); + +#endif // GPR_SUPPORT_CHANNELS_FROM_FD + +} // namespace grpc + +#endif // GRPCXX_CREATE_CHANNEL_POSIX_H diff --git a/include/grpc++/grpc++.h b/include/grpc++/grpc++.h index b7d5fb0bbcd..ef07e199759 100644 --- a/include/grpc++/grpc++.h +++ b/include/grpc++/grpc++.h @@ -57,8 +57,10 @@ #include #include #include +#include #include #include #include +#include #endif // GRPCXX_GRPCXX_H diff --git a/include/grpc++/server.h b/include/grpc++/server.h index a0ee0e98e47..7a8858ef194 100644 --- a/include/grpc++/server.h +++ b/include/grpc++/server.h @@ -93,6 +93,12 @@ class Server GRPC_FINAL : public ServerInterface, private GrpcLibraryCodegen { /// until all server objects in the process have been destroyed. static void SetGlobalCallbacks(GlobalCallbacks* callbacks); + // Returns a \em raw pointer to the underlying grpc_server instance. + grpc_server* c_server(); + + // Returns a \em raw pointer to the underlying CompletionQueue. + CompletionQueue* completion_queue(); + private: friend class AsyncGenericService; friend class ServerBuilder; diff --git a/include/grpc++/server_posix.h b/include/grpc++/server_posix.h new file mode 100644 index 00000000000..1595ba6e00e --- /dev/null +++ b/include/grpc++/server_posix.h @@ -0,0 +1,56 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPCXX_SERVER_POSIX_H +#define GRPCXX_SERVER_POSIX_H + +#include + +#include +#include + +namespace grpc { + +#ifdef GPR_SUPPORT_CHANNELS_FROM_FD + +/// Adds new client to a \a Server communicating over given file descriptor +/// +/// \param server The server to add a client to. +/// \param fd The file descriptor representing a socket. +void AddInsecureChannelFromFd(Server* server, int fd); + +#endif // GPR_SUPPORT_CHANNELS_FROM_FD + +} // namespace grpc + +#endif // GRPCXX_CREATE_CHANNEL_POSIX_H diff --git a/include/grpc/grpc_posix.h b/include/grpc/grpc_posix.h index 509e51e2c40..06cc3aad8a2 100644 --- a/include/grpc/grpc_posix.h +++ b/include/grpc/grpc_posix.h @@ -50,7 +50,7 @@ extern "C" { * functionality on top of GRPC Core. */ -#ifdef GPR_POSIX_SOCKET +#ifdef GPR_SUPPORT_CHANNELS_FROM_FD /** Create a client channel to 'target' using file descriptor 'fd'. The 'target' argument will be used to indicate the name for this channel. See the comment @@ -66,7 +66,7 @@ GRPCAPI void grpc_server_add_insecure_channel_from_fd(grpc_server *server, grpc_completion_queue *cq, int fd); -#endif // GPR_POSIX_SOCKET +#endif // GPR_SUPPORT_CHANNELS_FROM_FD #ifdef __cplusplus } diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index be4215a54bf..7fff36cb789 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -129,6 +129,7 @@ #define GPR_POSIX_SOCKETADDR 1 #define GPR_POSIX_NO_SPECIAL_WAKEUP_FD 1 #define GPR_POSIX_SOCKETUTILS 1 +#define GPR_SUPPORT_CHANNELS_FROM_FD 1 #define GPR_HAVE_UNIX_SOCKET 1 #define GPR_HAVE_IP_PKTINFO 1 #define GPR_HAVE_IPV6_RECVPKTINFO 1 @@ -168,6 +169,7 @@ #define GPR_POSIX_SYNC 1 #define GPR_POSIX_TIME 1 #define GPR_GETPID_IN_UNISTD_H 1 +#define GPR_SUPPORT_CHANNELS_FROM_FD 1 #define GPR_HAVE_MSG_NOSIGNAL 1 #define GPR_HAVE_UNIX_SOCKET 1 #define GPR_HAVE_IP_PKTINFO 1 @@ -194,6 +196,7 @@ #define GPR_POSIX_WAKEUP_FD 1 #define GPR_POSIX_SOCKET 1 #define GPR_POSIX_SOCKETADDR 1 +#define GPR_SUPPORT_CHANNELS_FROM_FD 1 #define GPR_HAVE_UNIX_SOCKET 1 #define GPR_HAVE_IP_PKTINFO 1 #define GPR_HAVE_IPV6_RECVPKTINFO 1 @@ -258,6 +261,7 @@ #define GPR_POSIX_SYNC 1 #define GPR_POSIX_TIME 1 #define GPR_GETPID_IN_UNISTD_H 1 +#define GPR_SUPPORT_CHANNELS_FROM_FD 1 #define GPR_HAVE_SO_NOSIGPIPE 1 #define GPR_HAVE_UNIX_SOCKET 1 #define GPR_HAVE_IP_PKTINFO 1 @@ -289,6 +293,7 @@ #define GPR_POSIX_SYNC 1 #define GPR_POSIX_TIME 1 #define GPR_GETPID_IN_UNISTD_H 1 +#define GPR_SUPPORT_CHANNELS_FROM_FD 1 #define GPR_HAVE_SO_NOSIGPIPE 1 #define GPR_HAVE_UNIX_SOCKET 1 #define GPR_HAVE_IP_PKTINFO 1 diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c index 7d28dbf8a9f..d3e27a59635 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c @@ -33,7 +33,7 @@ #include -#ifdef GPR_POSIX_SOCKET +#ifdef GPR_SUPPORT_CHANNELS_FROM_FD #include @@ -85,4 +85,4 @@ grpc_channel *grpc_insecure_channel_create_from_fd( "Failed to create client channel"); } -#endif // GPR_POSIX_SOCKET +#endif // GPR_SUPPORT_CHANNELS_FROM_FD diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c index 1807efc85d3..11e5c452893 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c @@ -33,7 +33,7 @@ #include -#ifdef GPR_POSIX_SOCKET +#ifdef GPR_SUPPORT_CHANNELS_FROM_FD #include #include @@ -67,4 +67,4 @@ void grpc_server_add_insecure_channel_from_fd(grpc_server *server, } -#endif // GPR_POSIX_SOCKET +#endif // GPR_SUPPORT_CHANNELS_FROM_FD diff --git a/src/cpp/client/create_channel_posix.cc b/src/cpp/client/create_channel_posix.cc new file mode 100644 index 00000000000..99ffebd3923 --- /dev/null +++ b/src/cpp/client/create_channel_posix.cc @@ -0,0 +1,57 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + + +#include +#include +#include +#include +#include + +#include "src/cpp/client/create_channel_internal.h" + +namespace grpc { + +#ifdef GPR_SUPPORT_CHANNELS_FROM_FD + +std::shared_ptr CreateInsecureChannelFromFd( + const grpc::string& target, int fd) { + internal::GrpcLibrary init_lib; + init_lib.init(); + return CreateChannelInternal( + "", grpc_insecure_channel_create_from_fd(target.c_str(), fd, nullptr)); +} + +#endif // GPR_SUPPORT_CHANNELS_FROM_FD + +} // namespace grpc diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index f6c3e5747c9..72a6150e960 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -329,6 +329,14 @@ void Server::SetGlobalCallbacks(GlobalCallbacks* callbacks) { g_callbacks.reset(callbacks); } +grpc_server* Server::c_server() { + return server_; +} + +CompletionQueue* Server::completion_queue() { + return &cq_; +} + static grpc_server_register_method_payload_handling PayloadHandlingForMethod( RpcServiceMethod* method) { switch (method->method_type()) { diff --git a/src/cpp/server/server_posix.cc b/src/cpp/server/server_posix.cc new file mode 100644 index 00000000000..7ed8cd069c7 --- /dev/null +++ b/src/cpp/server/server_posix.cc @@ -0,0 +1,51 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include + +#include + +namespace grpc { + +#ifdef GPR_SUPPORT_CHANNELS_FROM_FD + +void AddInsecureChannelFromFd(Server* server, int fd) { + grpc_server_add_insecure_channel_from_fd(server->c_server(), + server->completion_queue()->cq(), + fd); + +#endif // GPR_SUPPORT_CHANNELS_FROM_FD + +} + +} // namespace grpc diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index 701a3aec282..16bb5cdfab6 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -332,7 +332,7 @@ extern grpc_call_error_to_string_type grpc_call_error_to_string_import; typedef grpc_channel *(*grpc_insecure_channel_create_from_fd_type)(const char *target, int fd, const grpc_channel_args *args); extern grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; #define grpc_insecure_channel_create_from_fd grpc_insecure_channel_create_from_fd_import -typedef void(*grpc_server_add_insecure_channel_from_fd_type)(grpc_server *server, int fd); +typedef void(*grpc_server_add_insecure_channel_from_fd_type)(grpc_server *server, grpc_completion_queue *cq, int fd); extern grpc_server_add_insecure_channel_from_fd_type grpc_server_add_insecure_channel_from_fd_import; #define grpc_server_add_insecure_channel_from_fd grpc_server_add_insecure_channel_from_fd_import typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index 4a7d4b272a3..9c86a3690c5 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -332,7 +332,7 @@ extern grpc_call_error_to_string_type grpc_call_error_to_string_import; typedef grpc_channel *(*grpc_insecure_channel_create_from_fd_type)(const char *target, int fd, const grpc_channel_args *args); extern grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; #define grpc_insecure_channel_create_from_fd grpc_insecure_channel_create_from_fd_import -typedef void(*grpc_server_add_insecure_channel_from_fd_type)(grpc_server *server, int fd); +typedef void(*grpc_server_add_insecure_channel_from_fd_type)(grpc_server *server, grpc_completion_queue *cq, int fd); extern grpc_server_add_insecure_channel_from_fd_type grpc_server_add_insecure_channel_from_fd_import; #define grpc_server_add_insecure_channel_from_fd grpc_server_add_insecure_channel_from_fd_import typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 00177920209..49c0e1279ca 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -765,6 +765,7 @@ include/grpc++/channel.h \ include/grpc++/client_context.h \ include/grpc++/completion_queue.h \ include/grpc++/create_channel.h \ +include/grpc++/create_channel_posix.h \ include/grpc++/generic/async_generic_service.h \ include/grpc++/generic/generic_stub.h \ include/grpc++/grpc++.h \ @@ -792,6 +793,7 @@ include/grpc++/security/server_credentials.h \ include/grpc++/server.h \ include/grpc++/server_builder.h \ include/grpc++/server_context.h \ +include/grpc++/server_posix.h \ include/grpc++/support/async_stream.h \ include/grpc++/support/async_unary_call.h \ include/grpc++/support/byte_buffer.h \ diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 1c6884c0dfa..232951e16c2 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -765,6 +765,7 @@ include/grpc++/channel.h \ include/grpc++/client_context.h \ include/grpc++/completion_queue.h \ include/grpc++/create_channel.h \ +include/grpc++/create_channel_posix.h \ include/grpc++/generic/async_generic_service.h \ include/grpc++/generic/generic_stub.h \ include/grpc++/grpc++.h \ @@ -792,6 +793,7 @@ include/grpc++/security/server_credentials.h \ include/grpc++/server.h \ include/grpc++/server_builder.h \ include/grpc++/server_context.h \ +include/grpc++/server_posix.h \ include/grpc++/support/async_stream.h \ include/grpc++/support/async_unary_call.h \ include/grpc++/support/byte_buffer.h \ @@ -872,6 +874,7 @@ src/cpp/client/channel.cc \ src/cpp/client/client_context.cc \ src/cpp/client/create_channel.cc \ src/cpp/client/create_channel_internal.cc \ +src/cpp/client/create_channel_posix.cc \ src/cpp/client/credentials.cc \ src/cpp/client/generic_stub.cc \ src/cpp/client/insecure_credentials.cc \ @@ -887,6 +890,7 @@ src/cpp/server/server.cc \ src/cpp/server/server_builder.cc \ src/cpp/server/server_context.cc \ src/cpp/server/server_credentials.cc \ +src/cpp/server/server_posix.cc \ src/cpp/util/byte_buffer.cc \ src/cpp/util/slice.cc \ src/cpp/util/status.cc \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 782aa373bf0..fe6d3a23a0a 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6435,6 +6435,7 @@ "include/grpc++/client_context.h", "include/grpc++/completion_queue.h", "include/grpc++/create_channel.h", + "include/grpc++/create_channel_posix.h", "include/grpc++/generic/async_generic_service.h", "include/grpc++/generic/generic_stub.h", "include/grpc++/grpc++.h", @@ -6462,6 +6463,7 @@ "include/grpc++/server.h", "include/grpc++/server_builder.h", "include/grpc++/server_context.h", + "include/grpc++/server_posix.h", "include/grpc++/support/async_stream.h", "include/grpc++/support/async_unary_call.h", "include/grpc++/support/byte_buffer.h", @@ -6487,6 +6489,7 @@ "include/grpc++/client_context.h", "include/grpc++/completion_queue.h", "include/grpc++/create_channel.h", + "include/grpc++/create_channel_posix.h", "include/grpc++/generic/async_generic_service.h", "include/grpc++/generic/generic_stub.h", "include/grpc++/grpc++.h", @@ -6514,6 +6517,7 @@ "include/grpc++/server.h", "include/grpc++/server_builder.h", "include/grpc++/server_context.h", + "include/grpc++/server_posix.h", "include/grpc++/support/async_stream.h", "include/grpc++/support/async_unary_call.h", "include/grpc++/support/byte_buffer.h", @@ -6531,6 +6535,7 @@ "src/cpp/client/create_channel.cc", "src/cpp/client/create_channel_internal.cc", "src/cpp/client/create_channel_internal.h", + "src/cpp/client/create_channel_posix.cc", "src/cpp/client/credentials.cc", "src/cpp/client/generic_stub.cc", "src/cpp/client/insecure_credentials.cc", @@ -6548,6 +6553,7 @@ "src/cpp/server/server_builder.cc", "src/cpp/server/server_context.cc", "src/cpp/server/server_credentials.cc", + "src/cpp/server/server_posix.cc", "src/cpp/server/thread_pool_interface.h", "src/cpp/util/byte_buffer.cc", "src/cpp/util/slice.cc", diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index 660d14a07f6..558a33afbd9 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -263,6 +263,7 @@ + @@ -290,6 +291,7 @@ + @@ -384,6 +386,8 @@ + + @@ -414,6 +418,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index 6cca360f9f6..6b80d97e8e2 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -31,6 +31,9 @@ src\cpp\client + + src\cpp\client + src\cpp\client @@ -76,6 +79,9 @@ src\cpp\server + + src\cpp\server + src\cpp\util @@ -111,6 +117,9 @@ include\grpc++ + + include\grpc++ + include\grpc++\generic @@ -192,6 +201,9 @@ include\grpc++ + + include\grpc++ + include\grpc++\support diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index abf6efbc03f..d2886e0eeec 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -263,6 +263,7 @@ + @@ -290,6 +291,7 @@ + @@ -371,6 +373,8 @@ + + @@ -401,6 +405,8 @@ + + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 086fb5aa462..61b6f3e5487 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -16,6 +16,9 @@ src\cpp\client + + src\cpp\client + src\cpp\client @@ -61,6 +64,9 @@ src\cpp\server + + src\cpp\server + src\cpp\util @@ -96,6 +102,9 @@ include\grpc++ + + include\grpc++ + include\grpc++\generic @@ -177,6 +186,9 @@ include\grpc++ + + include\grpc++ + include\grpc++\support From 4ad746e4e0077ea95d3e937a046575701592dd3f Mon Sep 17 00:00:00 2001 From: Adam Michalik Date: Tue, 7 Jun 2016 15:02:59 -0700 Subject: [PATCH 0931/1894] clang-format, fix headers, windows fixes --- include/grpc++/create_channel_posix.h | 6 ++-- include/grpc++/server_posix.h | 4 +-- include/grpc/grpc_posix.h | 1 - .../client/insecure/channel_create_posix.c | 30 +++++++++++-------- .../server/insecure/server_chttp2_posix.c | 9 +++++- .../ext/transport/chttp2/transport/internal.h | 2 +- .../ext/transport/chttp2/transport/parsing.c | 4 +-- src/core/lib/support/avl.c | 5 ++-- src/cpp/client/create_channel_posix.cc | 5 ++-- src/cpp/server/server.cc | 8 ++--- src/cpp/server/server_posix.cc | 6 ++-- test/core/end2end/fixtures/h2_fd.c | 10 +++---- test/core/statistics/census_log_tests.c | 2 +- 13 files changed, 48 insertions(+), 44 deletions(-) diff --git a/include/grpc++/create_channel_posix.h b/include/grpc++/create_channel_posix.h index 0ca947d0447..0d961599420 100644 --- a/include/grpc++/create_channel_posix.h +++ b/include/grpc++/create_channel_posix.h @@ -36,8 +36,8 @@ #include -#include #include +#include namespace grpc { @@ -47,8 +47,8 @@ namespace grpc { /// /// \param target The name of the target. /// \param fd The file descriptor representing a socket. -std::shared_ptr CreateInsecureChannelFromFd( - const grpc::string& target, int fd); +std::shared_ptr CreateInsecureChannelFromFd(const grpc::string& target, + int fd); #endif // GPR_SUPPORT_CHANNELS_FROM_FD diff --git a/include/grpc++/server_posix.h b/include/grpc++/server_posix.h index 1595ba6e00e..e6066d4eaab 100644 --- a/include/grpc++/server_posix.h +++ b/include/grpc++/server_posix.h @@ -36,8 +36,8 @@ #include -#include #include +#include namespace grpc { @@ -53,4 +53,4 @@ void AddInsecureChannelFromFd(Server* server, int fd); } // namespace grpc -#endif // GRPCXX_CREATE_CHANNEL_POSIX_H +#endif // GRPCXX_SERVER_POSIX_H diff --git a/include/grpc/grpc_posix.h b/include/grpc/grpc_posix.h index 06cc3aad8a2..cff09006206 100644 --- a/include/grpc/grpc_posix.h +++ b/include/grpc/grpc_posix.h @@ -34,7 +34,6 @@ #ifndef GRPC_GRPC_POSIX_H #define GRPC_GRPC_POSIX_H - #include #include diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c index d3e27a59635..f1c24565001 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c @@ -41,34 +41,32 @@ #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" #include "src/core/lib/channel/channel_args.h" -#include "src/core/lib/transport/transport.h" -#include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/endpoint.h" +#include "src/core/lib/iomgr/exec_ctx.h" #include "src/core/lib/iomgr/tcp_posix.h" #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/channel.h" - +#include "src/core/lib/transport/transport.h" grpc_channel *grpc_insecure_channel_create_from_fd( const char *target, int fd, const grpc_channel_args *args) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - GRPC_API_TRACE( - "grpc_insecure_channel_create(target=%p, fd=%d, args=%p)", 3, - (target, fd, args)); + GRPC_API_TRACE("grpc_insecure_channel_create(target=%p, fd=%d, args=%p)", 3, + (target, fd, args)); grpc_arg default_authority_arg; default_authority_arg.type = GRPC_ARG_STRING; default_authority_arg.key = GRPC_ARG_DEFAULT_AUTHORITY; default_authority_arg.value.string = "test.authority"; - grpc_channel_args *final_args = grpc_channel_args_copy_and_add( - args, &default_authority_arg, 1); + grpc_channel_args *final_args = + grpc_channel_args_copy_and_add(args, &default_authority_arg, 1); int flags = fcntl(fd, F_GETFL, 0); GPR_ASSERT(fcntl(fd, F_SETFL, flags | O_NONBLOCK) == 0); - grpc_endpoint *client = grpc_tcp_create( - grpc_fd_create(fd, "client"), GRPC_TCP_DEFAULT_READ_SLICE_SIZE, - "fd-client"); + grpc_endpoint *client = + grpc_tcp_create(grpc_fd_create(fd, "client"), + GRPC_TCP_DEFAULT_READ_SLICE_SIZE, "fd-client"); grpc_transport *transport = grpc_create_chttp2_transport(&exec_ctx, final_args, client, 1); @@ -85,4 +83,12 @@ grpc_channel *grpc_insecure_channel_create_from_fd( "Failed to create client channel"); } -#endif // GPR_SUPPORT_CHANNELS_FROM_FD +#else // !GPR_SUPPORT_CHANNELS_FROM_FD + +grpc_channel *grpc_insecure_channel_create_from_fd( + const char *target, int fd, const grpc_channel_args *args) { + GPR_ASSERT(0); + return NULL; +} + +#endif // GPR_SUPPORT_CHANNELS_FROM_FD diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c index 11e5c452893..313e9b9208c 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c @@ -66,5 +66,12 @@ void grpc_server_add_insecure_channel_from_fd(grpc_server *server, grpc_exec_ctx_finish(&exec_ctx); } +#else // !GPR_SUPPORT_CHANNELS_FROM_FD -#endif // GPR_SUPPORT_CHANNELS_FROM_FD +void grpc_server_add_insecure_channel_from_fd(grpc_server *server, + grpc_completion_queue *cq, + int fd) { + GPR_ASSERT(0); +} + +#endif // GPR_SUPPORT_CHANNELS_FROM_FD diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 5872fd8e0a4..86a31cc50be 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -691,7 +691,7 @@ extern int grpc_flowctl_trace; if (!(grpc_http_trace)) \ ; \ else \ - stmt + stmt typedef enum { GRPC_CHTTP2_FLOWCTL_MOVE, diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index 4bd374b7fa7..8b6b0cebd0a 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -87,8 +87,8 @@ void grpc_chttp2_prepare_to_read( transport_global->settings[GRPC_SENT_SETTINGS], sizeof(transport_parsing->last_sent_settings)); transport_parsing->max_frame_size = - transport_global->settings[GRPC_ACKED_SETTINGS] - [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; + transport_global + ->settings[GRPC_ACKED_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; /* update the parsing view of incoming window */ while (grpc_chttp2_list_pop_unannounced_incoming_window_available( diff --git a/src/core/lib/support/avl.c b/src/core/lib/support/avl.c index 8d3ce23e6c3..c04675e01fb 100644 --- a/src/core/lib/support/avl.c +++ b/src/core/lib/support/avl.c @@ -73,8 +73,9 @@ static long node_height(gpr_avl_node *node) { #ifndef NDEBUG static long calculate_height(gpr_avl_node *node) { - return node == NULL ? 0 : 1 + GPR_MAX(calculate_height(node->left), - calculate_height(node->right)); + return node == NULL ? 0 + : 1 + GPR_MAX(calculate_height(node->left), + calculate_height(node->right)); } static gpr_avl_node *assert_invariants(gpr_avl_node *n) { diff --git a/src/cpp/client/create_channel_posix.cc b/src/cpp/client/create_channel_posix.cc index 99ffebd3923..60cfed3d623 100644 --- a/src/cpp/client/create_channel_posix.cc +++ b/src/cpp/client/create_channel_posix.cc @@ -31,7 +31,6 @@ * */ - #include #include #include @@ -44,8 +43,8 @@ namespace grpc { #ifdef GPR_SUPPORT_CHANNELS_FROM_FD -std::shared_ptr CreateInsecureChannelFromFd( - const grpc::string& target, int fd) { +std::shared_ptr CreateInsecureChannelFromFd(const grpc::string& target, + int fd) { internal::GrpcLibrary init_lib; init_lib.init(); return CreateChannelInternal( diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index 72a6150e960..50fc4733a16 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -329,13 +329,9 @@ void Server::SetGlobalCallbacks(GlobalCallbacks* callbacks) { g_callbacks.reset(callbacks); } -grpc_server* Server::c_server() { - return server_; -} +grpc_server* Server::c_server() { return server_; } -CompletionQueue* Server::completion_queue() { - return &cq_; -} +CompletionQueue* Server::completion_queue() { return &cq_; } static grpc_server_register_method_payload_handling PayloadHandlingForMethod( RpcServiceMethod* method) { diff --git a/src/cpp/server/server_posix.cc b/src/cpp/server/server_posix.cc index 7ed8cd069c7..8cb9753a125 100644 --- a/src/cpp/server/server_posix.cc +++ b/src/cpp/server/server_posix.cc @@ -40,12 +40,10 @@ namespace grpc { #ifdef GPR_SUPPORT_CHANNELS_FROM_FD void AddInsecureChannelFromFd(Server* server, int fd) { - grpc_server_add_insecure_channel_from_fd(server->c_server(), - server->completion_queue()->cq(), - fd); + grpc_server_add_insecure_channel_from_fd( + server->c_server(), server->completion_queue()->cq(), fd); #endif // GPR_SUPPORT_CHANNELS_FROM_FD - } } // namespace grpc diff --git a/test/core/end2end/fixtures/h2_fd.c b/test/core/end2end/fixtures/h2_fd.c index 70790807223..e938fe77301 100644 --- a/test/core/end2end/fixtures/h2_fd.c +++ b/test/core/end2end/fixtures/h2_fd.c @@ -36,18 +36,16 @@ #include #include -#include #include #include +#include #include -#include "src/core/lib/iomgr/socket_utils_posix.h" #include "src/core/lib/iomgr/exec_ctx.h" +#include "src/core/lib/iomgr/socket_utils_posix.h" #include "src/core/lib/iomgr/unix_sockets_posix.h" #include "test/core/util/test_config.h" -typedef struct { - int fd_pair[2]; -} sp_fixture_data; +typedef struct { int fd_pair[2]; } sp_fixture_data; static void create_sockets(int sv[2]) { int flags; @@ -62,7 +60,7 @@ static void create_sockets(int sv[2]) { static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( grpc_channel_args *client_args, grpc_channel_args *server_args) { - sp_fixture_data* fixture_data = gpr_malloc(sizeof(*fixture_data)); + sp_fixture_data *fixture_data = gpr_malloc(sizeof(*fixture_data)); grpc_end2end_test_fixture f; memset(&f, 0, sizeof(f)); diff --git a/test/core/statistics/census_log_tests.c b/test/core/statistics/census_log_tests.c index 8646a2fdf1d..4baae6a73bb 100644 --- a/test/core/statistics/census_log_tests.c +++ b/test/core/statistics/census_log_tests.c @@ -31,7 +31,6 @@ * */ -#include "src/core/ext/census/census_log.h" #include #include #include @@ -42,6 +41,7 @@ #include #include #include +#include "src/core/ext/census/census_log.h" #include "test/core/util/test_config.h" /* Fills in 'record' of size 'size'. Each byte in record is filled in with the From 0872d0894cec06cf802d652fbf795b07f989e9a0 Mon Sep 17 00:00:00 2001 From: Adam Michalik Date: Tue, 7 Jun 2016 15:18:48 -0700 Subject: [PATCH 0932/1894] revert protobuf --- third_party/protobuf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/third_party/protobuf b/third_party/protobuf index d5fb408ddc2..3470b6895aa 160000 --- a/third_party/protobuf +++ b/third_party/protobuf @@ -1 +1 @@ -Subproject commit d5fb408ddc281ffcadeb08699e65bb694656d0bd +Subproject commit 3470b6895aa659b7559ed678e029a5338e535f14 From 16ebf5a124026f8e9d59894b214d2e743590a93e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 7 Jun 2016 15:40:53 -0700 Subject: [PATCH 0933/1894] Fix transitional typo --- test/core/transport/connectivity_state_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/transport/connectivity_state_test.c b/test/core/transport/connectivity_state_test.c index 69c00a8ea0d..1050059eff7 100644 --- a/test/core/transport/connectivity_state_test.c +++ b/test/core/transport/connectivity_state_test.c @@ -68,7 +68,7 @@ static void test_connectivity_state_name(void) { 0 == strcmp(grpc_connectivity_state_name(GRPC_CHANNEL_TRANSIENT_FAILURE), "TRANSIENT_FAILURE")); GPR_ASSERT(0 == strcmp(grpc_connectivity_state_name(GRPC_CHANNEL_SHUTDOWN), - "FATAL_FAILURE")); + "SHUTDOWN")); } static void test_check(void) { From 30fb536053c549aa2a8507a2a0bcd238bda607dd Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 7 Jun 2016 16:24:17 -0700 Subject: [PATCH 0934/1894] PR comments (offline). --- include/grpc++/impl/codegen/call.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h index a9e5978b43b..770ef792904 100644 --- a/include/grpc++/impl/codegen/call.h +++ b/include/grpc++/impl/codegen/call.h @@ -202,8 +202,10 @@ class CallOpSendInitialMetadata { op->reserved = NULL; op->data.send_initial_metadata.count = initial_metadata_count_; op->data.send_initial_metadata.metadata = initial_metadata_; - memcpy(&op->data.send_initial_metadata.maybe_compression_level, - &maybe_compression_level_, sizeof(maybe_compression_level_)); + op->data.send_initial_metadata.maybe_compression_level.is_set = + maybe_compression_level_.is_set; + op->data.send_initial_metadata.maybe_compression_level.level = + maybe_compression_level_.level; } void FinishOp(bool* status, int max_message_size) { if (!send_) return; From 6f9501098ec0714f620b0913ffdc6f824f8aca14 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Tue, 7 Jun 2016 16:52:19 -0700 Subject: [PATCH 0935/1894] fix for issue 5548. Deprecated old classes and created subclasses. --- src/compiler/objective_c_generator.cc | 4 ++-- src/objective-c/ProtoRPC/ProtoMethod.h | 9 +++++++++ src/objective-c/ProtoRPC/ProtoMethod.m | 4 ++++ src/objective-c/ProtoRPC/ProtoRPC.h | 11 ++++++++++- src/objective-c/ProtoRPC/ProtoRPC.m | 6 +++++- src/objective-c/ProtoRPC/ProtoService.h | 15 +++++++++++++-- src/objective-c/ProtoRPC/ProtoService.m | 4 ++++ 7 files changed, 47 insertions(+), 6 deletions(-) diff --git a/src/compiler/objective_c_generator.cc b/src/compiler/objective_c_generator.cc index 465491e385f..75665cd5c0d 100644 --- a/src/compiler/objective_c_generator.cc +++ b/src/compiler/objective_c_generator.cc @@ -94,7 +94,7 @@ void PrintSimpleSignature(Printer *printer, const MethodDescriptor *method, void PrintAdvancedSignature(Printer *printer, const MethodDescriptor *method, map< ::grpc::string, ::grpc::string> vars) { vars["method_name"] = "RPCTo" + vars["method_name"]; - vars["return_type"] = "ProtoRPC *"; + vars["return_type"] = "GRPCProtoRPC *"; PrintMethodSignature(printer, method, vars); } @@ -199,7 +199,7 @@ void PrintMethodImplementations(Printer *printer, " marshalling and parsing.\n"); printer.Print(vars, "@interface $service_class$ :" - " ProtoService<$service_class$>\n"); + " GRPCProtoService<$service_class$>\n"); printer.Print( "- (instancetype)initWithHost:(NSString *)host" " NS_DESIGNATED_INITIALIZER;\n"); diff --git a/src/objective-c/ProtoRPC/ProtoMethod.h b/src/objective-c/ProtoRPC/ProtoMethod.h index a0ed2cf98a5..bd1a848c19a 100644 --- a/src/objective-c/ProtoRPC/ProtoMethod.h +++ b/src/objective-c/ProtoRPC/ProtoMethod.h @@ -37,6 +37,7 @@ * A fully-qualified proto service method name. Full qualification is needed because a gRPC endpoint * can implement multiple services. */ +__attribute__((deprecated("Please use GRPCProtoMethod."))) @interface ProtoMethod : NSObject @property(nonatomic, readonly) NSString *package; @property(nonatomic, readonly) NSString *service; @@ -48,3 +49,11 @@ service:(NSString *)service method:(NSString *)method; @end + +/** + * This subclass is empty now. Eventually we'll remove ProtoService class + * to avoid potential naming conflict + */ +@interface GRPCProtoMethod : ProtoMethod + +@end diff --git a/src/objective-c/ProtoRPC/ProtoMethod.m b/src/objective-c/ProtoRPC/ProtoMethod.m index 4b7ed63123c..e9978f38afe 100644 --- a/src/objective-c/ProtoRPC/ProtoMethod.m +++ b/src/objective-c/ProtoRPC/ProtoMethod.m @@ -53,3 +53,7 @@ } } @end + +@implementation GRPCProtoMethod + +@end diff --git a/src/objective-c/ProtoRPC/ProtoRPC.h b/src/objective-c/ProtoRPC/ProtoRPC.h index bd926b73287..55fefb0aa88 100644 --- a/src/objective-c/ProtoRPC/ProtoRPC.h +++ b/src/objective-c/ProtoRPC/ProtoRPC.h @@ -36,13 +36,22 @@ #import "ProtoMethod.h" +__attribute__((deprecated("Please use GRPCProtoRPC."))) @interface ProtoRPC : GRPCCall - (instancetype)initWithHost:(NSString *)host - method:(ProtoMethod *)method + method:(GRPCProtoMethod *)method requestsWriter:(GRXWriter *)requestsWriter responseClass:(Class)responseClass responsesWriteable:(id)responsesWriteable NS_DESIGNATED_INITIALIZER; - (void)start; @end + +/** + * This subclass is empty now. Eventually we'll remove ProtoService class + * to avoid potential naming conflict + */ +@interface GRPCProtoRPC : ProtoRPC + +@end diff --git a/src/objective-c/ProtoRPC/ProtoRPC.m b/src/objective-c/ProtoRPC/ProtoRPC.m index 9bf66f347ac..27c8b0eff7e 100644 --- a/src/objective-c/ProtoRPC/ProtoRPC.m +++ b/src/objective-c/ProtoRPC/ProtoRPC.m @@ -70,7 +70,7 @@ static NSError *ErrorForBadProto(id proto, Class expectedClass, NSError *parsing // Designated initializer - (instancetype)initWithHost:(NSString *)host - method:(ProtoMethod *)method + method:(GRPCProtoMethod *)method requestsWriter:(GRXWriter *)requestsWriter responseClass:(Class)responseClass responsesWriteable:(id)responsesWriteable { @@ -117,3 +117,7 @@ static NSError *ErrorForBadProto(id proto, Class expectedClass, NSError *parsing _responseWriteable = nil; } @end + +@implementation GRPCProtoRPC + +@end diff --git a/src/objective-c/ProtoRPC/ProtoService.h b/src/objective-c/ProtoRPC/ProtoService.h index 2e8cb33696b..edec8a4770f 100644 --- a/src/objective-c/ProtoRPC/ProtoService.h +++ b/src/objective-c/ProtoRPC/ProtoService.h @@ -33,17 +33,28 @@ #import -@class ProtoRPC; +@class GRPCProtoRPC; @protocol GRXWriteable; @class GRXWriter; + +__attribute__((deprecated("Please use GRPCProtoService."))) @interface ProtoService : NSObject - (instancetype)initWithHost:(NSString *)host packageName:(NSString *)packageName serviceName:(NSString *)serviceName NS_DESIGNATED_INITIALIZER; -- (ProtoRPC *)RPCToMethod:(NSString *)method +- (GRPCProtoRPC *)RPCToMethod:(NSString *)method requestsWriter:(GRXWriter *)requestsWriter responseClass:(Class)responseClass responsesWriteable:(id)responsesWriteable; @end + + +/** + * This subclass is empty now. Eventually we'll remove ProtoService class + * to avoid potential naming conflict + */ +@interface GRPCProtoService : ProtoService + +@end diff --git a/src/objective-c/ProtoRPC/ProtoService.m b/src/objective-c/ProtoRPC/ProtoService.m index fccc6aadc9c..597c3cf0fed 100644 --- a/src/objective-c/ProtoRPC/ProtoService.m +++ b/src/objective-c/ProtoRPC/ProtoService.m @@ -79,3 +79,7 @@ responsesWriteable:responsesWriteable]; } @end + +@implementation GRPCProtoService + +@end From a24d153619c82c0ef7a071fe81e78c5f0a4c268c Mon Sep 17 00:00:00 2001 From: Adam Michalik Date: Tue, 7 Jun 2016 16:55:47 -0700 Subject: [PATCH 0936/1894] fix windows build --- include/grpc/grpc_posix.h | 4 ---- .../transport/chttp2/server/insecure/server_chttp2_posix.c | 4 ++-- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/include/grpc/grpc_posix.h b/include/grpc/grpc_posix.h index cff09006206..9742b83374a 100644 --- a/include/grpc/grpc_posix.h +++ b/include/grpc/grpc_posix.h @@ -49,8 +49,6 @@ extern "C" { * functionality on top of GRPC Core. */ -#ifdef GPR_SUPPORT_CHANNELS_FROM_FD - /** Create a client channel to 'target' using file descriptor 'fd'. The 'target' argument will be used to indicate the name for this channel. See the comment for grpc_insecure_channel_create for description of 'args' argument. */ @@ -65,8 +63,6 @@ GRPCAPI void grpc_server_add_insecure_channel_from_fd(grpc_server *server, grpc_completion_queue *cq, int fd); -#endif // GPR_SUPPORT_CHANNELS_FROM_FD - #ifdef __cplusplus } #endif diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c index 313e9b9208c..b1c7a389dd8 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c @@ -31,12 +31,12 @@ * */ +#include +#include #include #ifdef GPR_SUPPORT_CHANNELS_FROM_FD -#include -#include #include #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" From 2dbc217e5e3f44e4b2037601a7c21b650edaa066 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Tue, 7 Jun 2016 15:03:57 -0700 Subject: [PATCH 0937/1894] Add common proto files to Python grpcio-tools --- tools/distrib/python/check_grpcio_tools.py | 2 +- .../python/grpcio_tools/grpc/tools/protoc.py | 5 ++- .../python/grpcio_tools/protoc_lib_deps.py | 4 +++ tools/distrib/python/grpcio_tools/setup.py | 33 +++++++++++++++-- tools/distrib/python/make_grpcio_tools.py | 35 ++++++++++++++----- 5 files changed, 65 insertions(+), 14 deletions(-) diff --git a/tools/distrib/python/check_grpcio_tools.py b/tools/distrib/python/check_grpcio_tools.py index baf2ff4effb..80c63278f42 100755 --- a/tools/distrib/python/check_grpcio_tools.py +++ b/tools/distrib/python/check_grpcio_tools.py @@ -37,7 +37,7 @@ OUT_OF_DATE_MESSAGE = """file {} is out of date Have you called tools/distrib/python/make_grpcio_tools.py since upgrading protobuf?""" -check_protoc_lib_deps_content = make.get_deps(make.BAZEL_DEPS_PROTOC_LIB_QUERY) +check_protoc_lib_deps_content = make.get_deps() with open(make.GRPC_PYTHON_PROTOC_LIB_DEPS, 'r') as protoc_lib_deps_file: if protoc_lib_deps_file.read() != check_protoc_lib_deps_content: diff --git a/tools/distrib/python/grpcio_tools/grpc/tools/protoc.py b/tools/distrib/python/grpcio_tools/grpc/tools/protoc.py index b4dd0ecae2e..1c69e78920c 100644 --- a/tools/distrib/python/grpcio_tools/grpc/tools/protoc.py +++ b/tools/distrib/python/grpcio_tools/grpc/tools/protoc.py @@ -29,10 +29,13 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +import pkg_resources import sys from grpc.tools import protoc_compiler if __name__ == '__main__': - protoc_compiler.run_main(sys.argv) + proto_include = pkg_resources.resource_filename('grpc.tools', '_proto') + protoc_compiler.run_main( + sys.argv + ['-I{}'.format(proto_include)]) diff --git a/tools/distrib/python/grpcio_tools/protoc_lib_deps.py b/tools/distrib/python/grpcio_tools/protoc_lib_deps.py index 135ac5cbb3b..cd4effa7ae8 100644 --- a/tools/distrib/python/grpcio_tools/protoc_lib_deps.py +++ b/tools/distrib/python/grpcio_tools/protoc_lib_deps.py @@ -30,3 +30,7 @@ # AUTO-GENERATED BY make_grpcio_tools.py! CC_FILES=['google/protobuf/compiler/zip_writer.cc', 'google/protobuf/compiler/subprocess.cc', 'google/protobuf/compiler/ruby/ruby_generator.cc', 'google/protobuf/compiler/python/python_generator.cc', 'google/protobuf/compiler/plugin.pb.cc', 'google/protobuf/compiler/plugin.cc', 'google/protobuf/compiler/objectivec/objectivec_primitive_field.cc', 'google/protobuf/compiler/objectivec/objectivec_oneof.cc', 'google/protobuf/compiler/objectivec/objectivec_message_field.cc', 'google/protobuf/compiler/objectivec/objectivec_message.cc', 'google/protobuf/compiler/objectivec/objectivec_map_field.cc', 'google/protobuf/compiler/objectivec/objectivec_helpers.cc', 'google/protobuf/compiler/objectivec/objectivec_generator.cc', 'google/protobuf/compiler/objectivec/objectivec_file.cc', 'google/protobuf/compiler/objectivec/objectivec_field.cc', 'google/protobuf/compiler/objectivec/objectivec_extension.cc', 'google/protobuf/compiler/objectivec/objectivec_enum_field.cc', 'google/protobuf/compiler/objectivec/objectivec_enum.cc', 'google/protobuf/compiler/js/js_generator.cc', 'google/protobuf/compiler/javanano/javanano_primitive_field.cc', 'google/protobuf/compiler/javanano/javanano_message_field.cc', 'google/protobuf/compiler/javanano/javanano_message.cc', 'google/protobuf/compiler/javanano/javanano_map_field.cc', 'google/protobuf/compiler/javanano/javanano_helpers.cc', 'google/protobuf/compiler/javanano/javanano_generator.cc', 'google/protobuf/compiler/javanano/javanano_file.cc', 'google/protobuf/compiler/javanano/javanano_field.cc', 'google/protobuf/compiler/javanano/javanano_extension.cc', 'google/protobuf/compiler/javanano/javanano_enum_field.cc', 'google/protobuf/compiler/javanano/javanano_enum.cc', 'google/protobuf/compiler/java/java_string_field_lite.cc', 'google/protobuf/compiler/java/java_string_field.cc', 'google/protobuf/compiler/java/java_shared_code_generator.cc', 'google/protobuf/compiler/java/java_service.cc', 'google/protobuf/compiler/java/java_primitive_field_lite.cc', 'google/protobuf/compiler/java/java_primitive_field.cc', 'google/protobuf/compiler/java/java_name_resolver.cc', 'google/protobuf/compiler/java/java_message_lite.cc', 'google/protobuf/compiler/java/java_message_field_lite.cc', 'google/protobuf/compiler/java/java_message_field.cc', 'google/protobuf/compiler/java/java_message_builder_lite.cc', 'google/protobuf/compiler/java/java_message_builder.cc', 'google/protobuf/compiler/java/java_message.cc', 'google/protobuf/compiler/java/java_map_field_lite.cc', 'google/protobuf/compiler/java/java_map_field.cc', 'google/protobuf/compiler/java/java_lazy_message_field_lite.cc', 'google/protobuf/compiler/java/java_lazy_message_field.cc', 'google/protobuf/compiler/java/java_helpers.cc', 'google/protobuf/compiler/java/java_generator_factory.cc', 'google/protobuf/compiler/java/java_generator.cc', 'google/protobuf/compiler/java/java_file.cc', 'google/protobuf/compiler/java/java_field.cc', 'google/protobuf/compiler/java/java_extension_lite.cc', 'google/protobuf/compiler/java/java_extension.cc', 'google/protobuf/compiler/java/java_enum_lite.cc', 'google/protobuf/compiler/java/java_enum_field_lite.cc', 'google/protobuf/compiler/java/java_enum_field.cc', 'google/protobuf/compiler/java/java_enum.cc', 'google/protobuf/compiler/java/java_doc_comment.cc', 'google/protobuf/compiler/java/java_context.cc', 'google/protobuf/compiler/csharp/csharp_wrapper_field.cc', 'google/protobuf/compiler/csharp/csharp_source_generator_base.cc', 'google/protobuf/compiler/csharp/csharp_repeated_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_message_field.cc', 'google/protobuf/compiler/csharp/csharp_repeated_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_reflection_class.cc', 'google/protobuf/compiler/csharp/csharp_primitive_field.cc', 'google/protobuf/compiler/csharp/csharp_message_field.cc', 'google/protobuf/compiler/csharp/csharp_message.cc', 'google/protobuf/compiler/csharp/csharp_map_field.cc', 'google/protobuf/compiler/csharp/csharp_helpers.cc', 'google/protobuf/compiler/csharp/csharp_generator.cc', 'google/protobuf/compiler/csharp/csharp_field_base.cc', 'google/protobuf/compiler/csharp/csharp_enum_field.cc', 'google/protobuf/compiler/csharp/csharp_enum.cc', 'google/protobuf/compiler/csharp/csharp_doc_comment.cc', 'google/protobuf/compiler/cpp/cpp_string_field.cc', 'google/protobuf/compiler/cpp/cpp_service.cc', 'google/protobuf/compiler/cpp/cpp_primitive_field.cc', 'google/protobuf/compiler/cpp/cpp_message_field.cc', 'google/protobuf/compiler/cpp/cpp_message.cc', 'google/protobuf/compiler/cpp/cpp_map_field.cc', 'google/protobuf/compiler/cpp/cpp_helpers.cc', 'google/protobuf/compiler/cpp/cpp_generator.cc', 'google/protobuf/compiler/cpp/cpp_file.cc', 'google/protobuf/compiler/cpp/cpp_field.cc', 'google/protobuf/compiler/cpp/cpp_extension.cc', 'google/protobuf/compiler/cpp/cpp_enum_field.cc', 'google/protobuf/compiler/cpp/cpp_enum.cc', 'google/protobuf/compiler/command_line_interface.cc', 'google/protobuf/compiler/code_generator.cc', 'google/protobuf/wrappers.pb.cc', 'google/protobuf/wire_format.cc', 'google/protobuf/util/type_resolver_util.cc', 'google/protobuf/util/time_util.cc', 'google/protobuf/util/message_differencer.cc', 'google/protobuf/util/json_util.cc', 'google/protobuf/util/internal/utility.cc', 'google/protobuf/util/internal/type_info_test_helper.cc', 'google/protobuf/util/internal/type_info.cc', 'google/protobuf/util/internal/protostream_objectwriter.cc', 'google/protobuf/util/internal/protostream_objectsource.cc', 'google/protobuf/util/internal/proto_writer.cc', 'google/protobuf/util/internal/object_writer.cc', 'google/protobuf/util/internal/json_stream_parser.cc', 'google/protobuf/util/internal/json_objectwriter.cc', 'google/protobuf/util/internal/json_escaping.cc', 'google/protobuf/util/internal/field_mask_utility.cc', 'google/protobuf/util/internal/error_listener.cc', 'google/protobuf/util/internal/default_value_objectwriter.cc', 'google/protobuf/util/internal/datapiece.cc', 'google/protobuf/util/field_mask_util.cc', 'google/protobuf/util/field_comparator.cc', 'google/protobuf/unknown_field_set.cc', 'google/protobuf/type.pb.cc', 'google/protobuf/timestamp.pb.cc', 'google/protobuf/text_format.cc', 'google/protobuf/stubs/substitute.cc', 'google/protobuf/stubs/mathlimits.cc', 'google/protobuf/struct.pb.cc', 'google/protobuf/source_context.pb.cc', 'google/protobuf/service.cc', 'google/protobuf/reflection_ops.cc', 'google/protobuf/message.cc', 'google/protobuf/map_field.cc', 'google/protobuf/io/zero_copy_stream_impl.cc', 'google/protobuf/io/tokenizer.cc', 'google/protobuf/io/strtod.cc', 'google/protobuf/io/printer.cc', 'google/protobuf/io/gzip_stream.cc', 'google/protobuf/generated_message_reflection.cc', 'google/protobuf/field_mask.pb.cc', 'google/protobuf/extension_set_heavy.cc', 'google/protobuf/empty.pb.cc', 'google/protobuf/dynamic_message.cc', 'google/protobuf/duration.pb.cc', 'google/protobuf/descriptor_database.cc', 'google/protobuf/descriptor.pb.cc', 'google/protobuf/descriptor.cc', 'google/protobuf/compiler/parser.cc', 'google/protobuf/compiler/importer.cc', 'google/protobuf/api.pb.cc', 'google/protobuf/any.pb.cc', 'google/protobuf/any.cc', 'google/protobuf/wire_format_lite.cc', 'google/protobuf/stubs/time.cc', 'google/protobuf/stubs/strutil.cc', 'google/protobuf/stubs/structurally_valid.cc', 'google/protobuf/stubs/stringprintf.cc', 'google/protobuf/stubs/stringpiece.cc', 'google/protobuf/stubs/statusor.cc', 'google/protobuf/stubs/status.cc', 'google/protobuf/stubs/once.cc', 'google/protobuf/stubs/int128.cc', 'google/protobuf/stubs/common.cc', 'google/protobuf/stubs/bytestream.cc', 'google/protobuf/stubs/atomicops_internals_x86_msvc.cc', 'google/protobuf/stubs/atomicops_internals_x86_gcc.cc', 'google/protobuf/repeated_field.cc', 'google/protobuf/message_lite.cc', 'google/protobuf/io/zero_copy_stream_impl_lite.cc', 'google/protobuf/io/zero_copy_stream.cc', 'google/protobuf/io/coded_stream.cc', 'google/protobuf/generated_message_util.cc', 'google/protobuf/extension_set.cc', 'google/protobuf/arenastring.cc', 'google/protobuf/arena.cc'] +PROTO_FILES=['google/protobuf/wrappers.proto', 'google/protobuf/type.proto', 'google/protobuf/timestamp.proto', 'google/protobuf/struct.proto', 'google/protobuf/source_context.proto', 'google/protobuf/field_mask.proto', 'google/protobuf/empty.proto', 'google/protobuf/duration.proto', 'google/protobuf/descriptor.proto', 'google/protobuf/compiler/plugin.proto', 'google/protobuf/api.proto', 'google/protobuf/any.proto'] + +CC_INCLUDE='third_party/protobuf/src' +PROTO_INCLUDE='third_party/protobuf/src' diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py index 576f7ae32a5..6537c266b32 100644 --- a/tools/distrib/python/grpcio_tools/setup.py +++ b/tools/distrib/python/grpcio_tools/setup.py @@ -28,9 +28,11 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. from distutils import extension +import errno import os import os.path import shlex +import shutil import sys import setuptools @@ -47,18 +49,41 @@ sys.path.insert(0, os.path.abspath('.')) # ourselves in w.r.t. the multitude of operating systems this ought to build on. # By default we assume a GCC-like compiler. EXTRA_COMPILE_ARGS = shlex.split(os.environ.get('GRPC_PYTHON_CFLAGS', - '-frtti -std=c++11')) + '-fno-wrapv -frtti -std=c++11')) EXTRA_LINK_ARGS = shlex.split(os.environ.get('GRPC_PYTHON_LDFLAGS', '-lpthread')) +GRPC_PYTHON_TOOLS_PACKAGE = 'grpc.tools' +GRPC_PYTHON_PROTO_RESOURCES_NAME = '_proto' + import protoc_lib_deps import grpc_version +def package_data(): + tools_path = GRPC_PYTHON_TOOLS_PACKAGE.replace('.', os.path.sep) + proto_resources_path = os.path.join(tools_path, + GRPC_PYTHON_PROTO_RESOURCES_NAME) + proto_files = [] + for proto_file in protoc_lib_deps.PROTO_FILES: + source = os.path.join(protoc_lib_deps.PROTO_INCLUDE, proto_file) + target = os.path.join(proto_resources_path, proto_file) + relative_target = os.path.join(GRPC_PYTHON_PROTO_RESOURCES_NAME, proto_file) + try: + os.makedirs(os.path.dirname(target)) + except OSError as error: + if error.errno == errno.EEXIST: + pass + else: + raise + shutil.copy(source, target) + proto_files.append(relative_target) + return {GRPC_PYTHON_TOOLS_PACKAGE: proto_files} + def protoc_ext_module(): plugin_sources = [ 'grpc/tools/main.cc', 'grpc_root/src/compiler/python_generator.cc'] + [ - os.path.join('third_party/protobuf/src', cc_file) + os.path.join(protoc_lib_deps.CC_INCLUDE, cc_file) for cc_file in protoc_lib_deps.CC_FILES] plugin_ext = extension.Extension( name='grpc.tools.protoc_compiler', @@ -67,7 +92,7 @@ def protoc_ext_module(): '.', 'grpc_root', 'grpc_root/include', - 'third_party/protobuf/src', + protoc_lib_deps.CC_INCLUDE, ], language='c++', define_macros=[('HAVE_PTHREAD', 1)], @@ -92,5 +117,7 @@ setuptools.setup( #namespace_packages=['grpc'], install_requires=[ 'protobuf>=3.0.0a3', + 'grpcio>=0.14.0', ], + package_data=package_data(), ) diff --git a/tools/distrib/python/make_grpcio_tools.py b/tools/distrib/python/make_grpcio_tools.py index 50fbdbb14c0..fd9b38b084b 100755 --- a/tools/distrib/python/make_grpcio_tools.py +++ b/tools/distrib/python/make_grpcio_tools.py @@ -67,11 +67,16 @@ DEPS_FILE_CONTENT=""" # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # AUTO-GENERATED BY make_grpcio_tools.py! -CC_FILES={} +CC_FILES={cc_files} +PROTO_FILES={proto_files} + +CC_INCLUDE={cc_include} +PROTO_INCLUDE={proto_include} """ # Bazel query result prefix for expected source files in protobuf. PROTOBUF_CC_PREFIX = '//:src/' +PROTOBUF_PROTO_PREFIX = '//:src/' GRPC_ROOT = os.path.abspath( os.path.join(os.path.dirname(os.path.abspath(__file__)), @@ -79,7 +84,8 @@ GRPC_ROOT = os.path.abspath( GRPC_PYTHON_ROOT = os.path.join(GRPC_ROOT, 'tools/distrib/python/grpcio_tools') -GRPC_PROTOBUF = os.path.join(GRPC_ROOT, 'third_party/protobuf/src') +GRPC_PYTHON_PROTOBUF_RELATIVE_ROOT = 'third_party/protobuf/src' +GRPC_PROTOBUF = os.path.join(GRPC_ROOT, GRPC_PYTHON_PROTOBUF_RELATIVE_ROOT) GRPC_PROTOC_PLUGINS = os.path.join(GRPC_ROOT, 'src/compiler') GRPC_PYTHON_PROTOBUF = os.path.join(GRPC_PYTHON_ROOT, 'third_party/protobuf/src') @@ -93,18 +99,29 @@ GRPC_PYTHON_INCLUDE = os.path.join(GRPC_PYTHON_ROOT, 'grpc_root/include') BAZEL_DEPS = os.path.join(GRPC_ROOT, 'tools/distrib/python/bazel_deps.sh') BAZEL_DEPS_PROTOC_LIB_QUERY = '//:protoc_lib' +BAZEL_DEPS_COMMON_PROTOS_QUERY = '//:well_known_protos' + +def bazel_query(query): + output = subprocess.check_output([BAZEL_DEPS, query]) + return output.splitlines() -def get_deps(query): +def get_deps(): """Write the result of the bazel query `query` against protobuf to `out_file`.""" - output = subprocess.check_output([BAZEL_DEPS, query]) - output = output.splitlines() + cc_files_output = bazel_query(BAZEL_DEPS_PROTOC_LIB_QUERY) cc_files = [ - name for name in output + name[len(PROTOBUF_CC_PREFIX):] for name in cc_files_output if name.endswith('.cc') and name.startswith(PROTOBUF_CC_PREFIX)] - cc_files = [cc_file[len(PROTOBUF_CC_PREFIX):] for cc_file in cc_files] - deps_file_content = DEPS_FILE_CONTENT.format(cc_files) + proto_files_output = bazel_query(BAZEL_DEPS_COMMON_PROTOS_QUERY) + proto_files = [ + name[len(PROTOBUF_PROTO_PREFIX):] for name in proto_files_output + if name.endswith('.proto') and name.startswith(PROTOBUF_PROTO_PREFIX)] + deps_file_content = DEPS_FILE_CONTENT.format( + cc_files=cc_files, + proto_files=proto_files, + cc_include=repr(GRPC_PYTHON_PROTOBUF_RELATIVE_ROOT), + proto_include=repr(GRPC_PYTHON_PROTOBUF_RELATIVE_ROOT)) return deps_file_content @@ -123,7 +140,7 @@ def main(): shutil.copytree(GRPC_INCLUDE, GRPC_PYTHON_INCLUDE) try: - protoc_lib_deps_content = get_deps(BAZEL_DEPS_PROTOC_LIB_QUERY) + protoc_lib_deps_content = get_deps() except Exception as error: # We allow this script to succeed even if we couldn't get the dependencies, # as then we can assume that even without a successful bazel run the From c524ec0121ae70c354fa507e11880a62511d7e20 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 7 Jun 2016 16:52:53 -0700 Subject: [PATCH 0938/1894] make Metadata.Entry a class --- src/csharp/Grpc.Core/Metadata.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/csharp/Grpc.Core/Metadata.cs b/src/csharp/Grpc.Core/Metadata.cs index e982fa0c486..f73f720094a 100644 --- a/src/csharp/Grpc.Core/Metadata.cs +++ b/src/csharp/Grpc.Core/Metadata.cs @@ -95,6 +95,7 @@ namespace Grpc.Core public void Insert(int index, Metadata.Entry item) { + GrpcPreconditions.CheckNotNull(item); CheckWriteable(); entries.Insert(index, item); } @@ -114,6 +115,7 @@ namespace Grpc.Core set { + GrpcPreconditions.CheckNotNull(value); CheckWriteable(); entries[index] = value; } @@ -121,6 +123,7 @@ namespace Grpc.Core public void Add(Metadata.Entry item) { + GrpcPreconditions.CheckNotNull(item); CheckWriteable(); entries.Add(item); } @@ -187,7 +190,7 @@ namespace Grpc.Core /// /// Metadata entry /// - public struct Entry + public class Entry { private static readonly Encoding Encoding = Encoding.ASCII; private static readonly Regex ValidKeyRegex = new Regex("^[a-z0-9_-]+$"); From 95e547ef9ec96d7693c86d007555b5ce68be3510 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 7 Jun 2016 17:14:42 -0700 Subject: [PATCH 0939/1894] add unstarted server test --- src/csharp/Grpc.Core.Tests/ServerTest.cs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/csharp/Grpc.Core.Tests/ServerTest.cs b/src/csharp/Grpc.Core.Tests/ServerTest.cs index fa693162ada..5f7144611e5 100644 --- a/src/csharp/Grpc.Core.Tests/ServerTest.cs +++ b/src/csharp/Grpc.Core.Tests/ServerTest.cs @@ -93,5 +93,12 @@ namespace Grpc.Core.Tests server.ShutdownAsync().Wait(); } + + [Test] + public void UnstartedServerDoesNotPreventShutdown() + { + // just create a server, don't start it, and make sure it doesn't prevent shutdown. + var server = new Server(); + } } } From 8ba42bec907e3e9cebd2621127caac22aed30a0d Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 7 Jun 2016 17:30:20 -0700 Subject: [PATCH 0940/1894] s/maybe_compression_level.compression_level/maybe_compression_level.level --- include/grpc/impl/codegen/grpc_types.h | 2 +- src/core/lib/surface/call.c | 3 +-- src/objective-c/GRPCClient/private/GRPCWrappedCall.m | 2 +- test/core/end2end/tests/compressed_payload.c | 2 +- 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/include/grpc/impl/codegen/grpc_types.h b/include/grpc/impl/codegen/grpc_types.h index a2090853864..c51ffa44930 100644 --- a/include/grpc/impl/codegen/grpc_types.h +++ b/include/grpc/impl/codegen/grpc_types.h @@ -338,7 +338,7 @@ typedef struct grpc_op { * Otherwise, \a compression_level won't be considered */ struct { uint8_t is_set; - grpc_compression_level compression_level; + grpc_compression_level level; } maybe_compression_level; } send_initial_metadata; grpc_byte_buffer *send_message; diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 6fc91cb7ea9..54c93f88297 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1370,8 +1370,7 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, bool level_set = false; if (op->data.send_initial_metadata.maybe_compression_level.is_set) { effective_compression_level = - op->data.send_initial_metadata.maybe_compression_level - .compression_level; + op->data.send_initial_metadata.maybe_compression_level.level; level_set = true; } else { const grpc_compression_options copts = diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m index 27723afb0e9..a3fa5938cdd 100644 --- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m +++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m @@ -73,7 +73,7 @@ _op.data.send_initial_metadata.count = metadata.count; _op.data.send_initial_metadata.metadata = metadata.grpc_metadataArray; _op.data.send_initial_metadata.maybe_compression_level.is_set = false; - _op.data.send_initial_metadata.maybe_compression_level.compression_level = 0; + _op.data.send_initial_metadata.maybe_compression_level.level = 0; _handler = handler; } return self; diff --git a/test/core/end2end/tests/compressed_payload.c b/test/core/end2end/tests/compressed_payload.c index 34947fbe9d8..ec5c012238e 100644 --- a/test/core/end2end/tests/compressed_payload.c +++ b/test/core/end2end/tests/compressed_payload.c @@ -379,7 +379,7 @@ static void request_with_payload_template( op->data.send_initial_metadata.count = 0; if (set_server_level) { op->data.send_initial_metadata.maybe_compression_level.is_set = true; - op->data.send_initial_metadata.maybe_compression_level.compression_level = + op->data.send_initial_metadata.maybe_compression_level.level = server_compression_level; } op->flags = 0; From 978f4a59fce4dfd1018b59b20913ed2a500bfbee Mon Sep 17 00:00:00 2001 From: Adam Michalik Date: Tue, 7 Jun 2016 17:40:31 -0700 Subject: [PATCH 0941/1894] fix compilation on windows --- .../transport/chttp2/client/insecure/channel_create_posix.c | 5 +++-- .../transport/chttp2/server/insecure/server_chttp2_posix.c | 1 + 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c index f1c24565001..ca435c25cec 100644 --- a/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c +++ b/src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c @@ -31,12 +31,13 @@ * */ +#include +#include +#include #include #ifdef GPR_SUPPORT_CHANNELS_FROM_FD -#include - #include #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c index b1c7a389dd8..d625ed1d9e5 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c @@ -33,6 +33,7 @@ #include #include +#include #include #ifdef GPR_SUPPORT_CHANNELS_FROM_FD From 9a36e6c7cd4daca929d5d3457edd0060a93030ca Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Tue, 7 Jun 2016 17:49:03 -0700 Subject: [PATCH 0942/1894] Changed Python Sync streaming qps to follow spec --- .../grpcio/tests/qps/benchmark_client.py | 63 +++++++++++++------ src/python/grpcio/tests/qps/client_runner.py | 5 +- .../run_tests/performance/scenario_config.py | 2 +- 3 files changed, 46 insertions(+), 24 deletions(-) diff --git a/src/python/grpcio/tests/qps/benchmark_client.py b/src/python/grpcio/tests/qps/benchmark_client.py index aac218ed819..e2922347f98 100644 --- a/src/python/grpcio/tests/qps/benchmark_client.py +++ b/src/python/grpcio/tests/qps/benchmark_client.py @@ -82,6 +82,7 @@ class BenchmarkClient: self._response_callbacks = [] def add_response_callback(self, callback): + """callback will be invoked as callback(client, query_time)""" self._response_callbacks.append(callback) @abc.abstractmethod @@ -95,10 +96,10 @@ class BenchmarkClient: def stop(self): pass - def _handle_response(self, query_time): + def _handle_response(self, client, query_time): self._hist.add(query_time * 1e9) # Report times in nanoseconds for callback in self._response_callbacks: - callback(query_time) + callback(client, query_time) class UnarySyncBenchmarkClient(BenchmarkClient): @@ -121,7 +122,7 @@ class UnarySyncBenchmarkClient(BenchmarkClient): start_time = time.time() self._stub.UnaryCall(self._request, _TIMEOUT) end_time = time.time() - self._handle_response(end_time - start_time) + self._handle_response(self, end_time - start_time) class UnaryAsyncBenchmarkClient(BenchmarkClient): @@ -136,19 +137,20 @@ class UnaryAsyncBenchmarkClient(BenchmarkClient): def _response_received(self, start_time, resp): resp.result() end_time = time.time() - self._handle_response(end_time - start_time) + self._handle_response(self, end_time - start_time) def stop(self): self._stub = None -class StreamingSyncBenchmarkClient(BenchmarkClient): +class _SyncStream(object): - def __init__(self, server, config, hist): - super(StreamingSyncBenchmarkClient, self).__init__(server, config, hist) + def __init__(self, stub, generic, request, handle_response): + self._stub = stub + self._generic = generic + self._request = request + self._handle_response = handle_response self._is_streaming = False - self._pool = futures.ThreadPoolExecutor(max_workers=1) - # Use a thread-safe queue to put requests on the stream self._request_queue = queue.Queue() self._send_time_queue = queue.Queue() @@ -157,15 +159,6 @@ class StreamingSyncBenchmarkClient(BenchmarkClient): self._request_queue.put(self._request) def start(self): - self._is_streaming = True - self._pool.submit(self._request_stream) - - def stop(self): - self._is_streaming = False - self._pool.shutdown(wait=True) - self._stub = None - - def _request_stream(self): self._is_streaming = True if self._generic: stream_callable = self._stub.stream_stream( @@ -175,8 +168,11 @@ class StreamingSyncBenchmarkClient(BenchmarkClient): response_stream = stream_callable(self._request_generator(), _TIMEOUT) for _ in response_stream: - end_time = time.time() - self._handle_response(end_time - self._send_time_queue.get_nowait()) + self._handle_response( + self, time.time() - self._send_time_queue.get_nowait()) + + def stop(self): + self._is_streaming = False def _request_generator(self): while self._is_streaming: @@ -185,3 +181,30 @@ class StreamingSyncBenchmarkClient(BenchmarkClient): yield request except queue.Empty: pass + + +class StreamingSyncBenchmarkClient(BenchmarkClient): + + def __init__(self, server, config, hist): + super(StreamingSyncBenchmarkClient, self).__init__(server, config, hist) + self._pool = futures.ThreadPoolExecutor( + max_workers=config.outstanding_rpcs_per_channel) + self._streams = [_SyncStream(self._stub, self._generic, + self._request, self._handle_response) + for _ in xrange(config.outstanding_rpcs_per_channel)] + self._curr_stream = 0 + + def send_request(self): + # Use a round_robin scheduler to determine what stream to send on + self._streams[self._curr_stream].send_request() + self._curr_stream = (self._curr_stream + 1) % len(self._streams) + + def start(self): + for stream in self._streams: + self._pool.submit(stream.start) + + def stop(self): + for stream in self._streams: + stream.stop() + self._pool.shutdown(wait=True) + self._stub = None diff --git a/src/python/grpcio/tests/qps/client_runner.py b/src/python/grpcio/tests/qps/client_runner.py index 1ede7d2af1b..2d1d981733b 100644 --- a/src/python/grpcio/tests/qps/client_runner.py +++ b/src/python/grpcio/tests/qps/client_runner.py @@ -98,7 +98,6 @@ class ClosedLoopClientRunner(ClientRunner): self._client.stop() self._client = None - def _send_request(self, response_time): + def _send_request(self, client, response_time): if self._is_running: - self._client.send_request() - + client.send_request() diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index 81569e8b7a4..2d5130e1e86 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -415,7 +415,7 @@ class PythonLanguage: yield _ping_pong_scenario( 'python_protobuf_sync_streaming_qps_unconstrained', rpc_type='STREAMING', client_type='SYNC_CLIENT', server_type='SYNC_SERVER', - unconstrained_client='async') + unconstrained_client='sync') yield _ping_pong_scenario( 'python_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY', From 5756c8fead48fb024fda5192c6c63a98a59573cf Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 7 Jun 2016 18:00:44 -0700 Subject: [PATCH 0943/1894] removed RANDOM and simplified req for compression --- src/proto/grpc/testing/messages.proto | 19 ++---- test/cpp/interop/interop_client.cc | 94 +++++++++++++-------------- test/cpp/interop/server_main.cc | 24 ++----- 3 files changed, 54 insertions(+), 83 deletions(-) diff --git a/src/proto/grpc/testing/messages.proto b/src/proto/grpc/testing/messages.proto index a063b470c7b..e1090156ab4 100644 --- a/src/proto/grpc/testing/messages.proto +++ b/src/proto/grpc/testing/messages.proto @@ -41,17 +41,6 @@ enum PayloadType { // Uncompressable binary format. UNCOMPRESSABLE = 1; - - // Randomly chosen from all other formats defined in this enum. - RANDOM = 2; -} - -// Compression algorithms -enum CompressionType { - // No compression - NONE = 0; - GZIP = 1; - DEFLATE = 2; } // A block of data, to simply increase gRPC message size. @@ -88,8 +77,8 @@ message SimpleRequest { // Whether SimpleResponse should include OAuth scope. bool fill_oauth_scope = 5; - // Compression algorithm to be used by the server for the response (stream) - CompressionType response_compression = 6; + // Whether to request the server to compress the response. + bool request_compressed_response = 6; // Whether server should return a given status EchoStatus response_status = 7; @@ -145,8 +134,8 @@ message StreamingOutputCallRequest { // Optional input payload sent along with the request. Payload payload = 3; - // Compression algorithm to be used by the server for the response (stream) - CompressionType response_compression = 6; + // Whether to request the server to compress the response. + bool request_compressed_response = 6; // Whether server should return a given status EchoStatus response_status = 7; diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index 189e4a8aabe..90e54fd3b65 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -67,30 +67,26 @@ const int kReceiveDelayMilliSeconds = 20; const int kLargeRequestSize = 271828; const int kLargeResponseSize = 314159; -CompressionType GetInteropCompressionTypeFromCompressionAlgorithm( - grpc_compression_algorithm algorithm) { - switch (algorithm) { - case GRPC_COMPRESS_NONE: - return CompressionType::NONE; - case GRPC_COMPRESS_GZIP: - return CompressionType::GZIP; - case GRPC_COMPRESS_DEFLATE: - return CompressionType::DEFLATE; - default: - GPR_ASSERT(false); - } -} - void NoopChecks(const InteropClientContextInspector& inspector, const SimpleRequest* request, const SimpleResponse* response) {} void CompressionChecks(const InteropClientContextInspector& inspector, const SimpleRequest* request, const SimpleResponse* response) { - GPR_ASSERT(request->response_compression() == - GetInteropCompressionTypeFromCompressionAlgorithm( - inspector.GetCallCompressionAlgorithm())); - if (request->response_compression() == NONE) { + const grpc_compression_algorithm received_compression = + inspector.GetCallCompressionAlgorithm(); + if (request->request_compressed_response() && + received_compression == GRPC_COMPRESS_NONE) { + if (request->request_compressed_response() && + received_compression == GRPC_COMPRESS_NONE) { + // Requested some compression, got NONE. This is an error. + gpr_log(GPR_ERROR, + "Failure: Requested compression but got uncompressed response " + "from server."); + abort(); + } + } + if (!request->request_compressed_response()) { GPR_ASSERT(!(inspector.GetMessageFlags() & GRPC_WRITE_INTERNAL_COMPRESS)); } else if (request->response_type() == PayloadType::COMPRESSABLE) { // requested compression and compressable response => results should always @@ -211,20 +207,22 @@ bool InteropClient::PerformLargeUnary(SimpleRequest* request, custom_checks_fn(inspector, request, response); // Payload related checks. - if (request->response_type() != PayloadType::RANDOM) { - GPR_ASSERT(response->payload().type() == request->response_type()); - } + GPR_ASSERT(response->payload().type() == request->response_type()); switch (response->payload().type()) { case PayloadType::COMPRESSABLE: GPR_ASSERT(response->payload().body() == grpc::string(kLargeResponseSize, '\0')); break; case PayloadType::UNCOMPRESSABLE: { - std::ifstream rnd_file(kRandomFile); - GPR_ASSERT(rnd_file.good()); - for (int i = 0; i < kLargeResponseSize; i++) { - GPR_ASSERT(response->payload().body()[i] == (char)rnd_file.get()); - } + // We don't really check anything: We can't assert that the payload is + // uncompressed because it's the server's prerogative to decide on that, + // and different implementations decide differently (ie, Java always + // compresses when requested to do so, whereas C core throws away the + // compressed payload if the output is larger than the input). + // In addition, we don't compare the actual random bytes received because + // asserting that data is sent/received properly isn't the purpose of this + // test. Moreover, different implementations are also free to use + // different sets of random bytes. } break; default: GPR_ASSERT(false); @@ -341,13 +339,13 @@ bool InteropClient::DoLargeUnary() { } bool InteropClient::DoLargeCompressedUnary() { - const CompressionType compression_types[] = {NONE, GZIP, DEFLATE}; - const PayloadType payload_types[] = {COMPRESSABLE, UNCOMPRESSABLE, RANDOM}; + const bool request_compression[] = {false, true}; + const PayloadType payload_types[] = {COMPRESSABLE, UNCOMPRESSABLE}; for (size_t i = 0; i < GPR_ARRAY_SIZE(payload_types); i++) { - for (size_t j = 0; j < GPR_ARRAY_SIZE(compression_types); j++) { + for (size_t j = 0; j < GPR_ARRAY_SIZE(request_compression); j++) { char* log_suffix; gpr_asprintf(&log_suffix, "(compression=%s; payload=%s)", - CompressionType_Name(compression_types[j]).c_str(), + request_compression[j] ? "true" : "false", PayloadType_Name(payload_types[i]).c_str()); gpr_log(GPR_DEBUG, "Sending a large compressed unary rpc %s.", @@ -355,7 +353,7 @@ bool InteropClient::DoLargeCompressedUnary() { SimpleRequest request; SimpleResponse response; request.set_response_type(payload_types[i]); - request.set_response_compression(compression_types[j]); + request.set_request_compressed_response(request_compression[j]); if (!PerformLargeUnary(&request, &response, CompressionChecks)) { gpr_log(GPR_ERROR, "Large compressed unary failed %s", log_suffix); @@ -452,23 +450,23 @@ bool InteropClient::DoResponseStreaming() { } bool InteropClient::DoResponseCompressedStreaming() { - const CompressionType compression_types[] = {NONE, GZIP, DEFLATE}; - const PayloadType payload_types[] = {COMPRESSABLE, UNCOMPRESSABLE, RANDOM}; + const bool request_compression[] = {false, true}; + const PayloadType payload_types[] = {COMPRESSABLE, UNCOMPRESSABLE}; for (size_t i = 0; i < GPR_ARRAY_SIZE(payload_types); i++) { - for (size_t j = 0; j < GPR_ARRAY_SIZE(compression_types); j++) { + for (size_t j = 0; j < GPR_ARRAY_SIZE(request_compression); j++) { ClientContext context; InteropClientContextInspector inspector(context); StreamingOutputCallRequest request; char* log_suffix; gpr_asprintf(&log_suffix, "(compression=%s; payload=%s)", - CompressionType_Name(compression_types[j]).c_str(), + request_compression[j] ? "true" : "false", PayloadType_Name(payload_types[i]).c_str()); gpr_log(GPR_DEBUG, "Receiving response streaming rpc %s.", log_suffix); request.set_response_type(payload_types[i]); - request.set_response_compression(compression_types[j]); + request.set_request_compressed_response(request_compression[j]); for (size_t k = 0; k < response_stream_sizes.size(); ++k) { ResponseParameters* response_parameter = @@ -483,9 +481,7 @@ bool InteropClient::DoResponseCompressedStreaming() { size_t k = 0; while (stream->Read(&response)) { // Payload related checks. - if (request.response_type() != PayloadType::RANDOM) { - GPR_ASSERT(response.payload().type() == request.response_type()); - } + GPR_ASSERT(response.payload().type() == request.response_type()); switch (response.payload().type()) { case PayloadType::COMPRESSABLE: GPR_ASSERT(response.payload().body() == @@ -503,17 +499,19 @@ bool InteropClient::DoResponseCompressedStreaming() { } // Compression related checks. - GPR_ASSERT(request.response_compression() == - GetInteropCompressionTypeFromCompressionAlgorithm( - inspector.GetCallCompressionAlgorithm())); - if (request.response_compression() == NONE) { + if (request.request_compressed_response()) { + GPR_ASSERT(inspector.GetCallCompressionAlgorithm() > + GRPC_COMPRESS_NONE); + if (request.response_type() == PayloadType::COMPRESSABLE) { + // requested compression and compressable response => results should + // always be compressed. + GPR_ASSERT(inspector.GetMessageFlags() & + GRPC_WRITE_INTERNAL_COMPRESS); + } + } else { + // requested *no* compression. GPR_ASSERT( !(inspector.GetMessageFlags() & GRPC_WRITE_INTERNAL_COMPRESS)); - } else if (request.response_type() == PayloadType::COMPRESSABLE) { - // requested compression and compressable response => results should - // always be compressed. - GPR_ASSERT(inspector.GetMessageFlags() & - GRPC_WRITE_INTERNAL_COMPRESS); } ++k; diff --git a/test/cpp/interop/server_main.cc b/test/cpp/interop/server_main.cc index 889874fe493..bbedda14d25 100644 --- a/test/cpp/interop/server_main.cc +++ b/test/cpp/interop/server_main.cc @@ -110,14 +110,7 @@ void MaybeEchoMetadata(ServerContext* context) { } } -bool SetPayload(PayloadType type, int size, Payload* payload) { - PayloadType response_type; - if (type == PayloadType::RANDOM) { - response_type = - rand() & 0x1 ? PayloadType::COMPRESSABLE : PayloadType::UNCOMPRESSABLE; - } else { - response_type = type; - } +bool SetPayload(PayloadType response_type, int size, Payload* payload) { payload->set_type(response_type); switch (response_type) { case PayloadType::COMPRESSABLE: { @@ -141,18 +134,9 @@ bool SetPayload(PayloadType type, int size, Payload* payload) { template void SetResponseCompression(ServerContext* context, const RequestType& request) { - switch (request.response_compression()) { - case grpc::testing::NONE: - context->set_compression_algorithm(GRPC_COMPRESS_NONE); - break; - case grpc::testing::GZIP: - context->set_compression_algorithm(GRPC_COMPRESS_GZIP); - break; - case grpc::testing::DEFLATE: - context->set_compression_algorithm(GRPC_COMPRESS_DEFLATE); - break; - default: - abort(); + if (request.request_compressed_response()) { + // Any level would do, let's go for HIGH because we are overachievers. + context->set_compression_level(GRPC_COMPRESS_LEVEL_HIGH); } } From d3ce0218d15c5b19a75fff6d6c8cc5af2066266d Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 7 Jun 2016 18:45:21 -0700 Subject: [PATCH 0944/1894] disabled bogus checks for streaming compressed --- test/cpp/interop/interop_client.cc | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index 90e54fd3b65..e67cb5ac9d4 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -488,12 +488,7 @@ bool InteropClient::DoResponseCompressedStreaming() { grpc::string(response_stream_sizes[k], '\0')); break; case PayloadType::UNCOMPRESSABLE: { - std::ifstream rnd_file(kRandomFile); - GPR_ASSERT(rnd_file.good()); - for (int n = 0; n < response_stream_sizes[k]; n++) { - GPR_ASSERT(response.payload().body()[n] == (char)rnd_file.get()); - } - } break; + break; default: GPR_ASSERT(false); } From 393ca51923e8274c4d0a3b09c021b4cd2482ff4c Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 7 Jun 2016 18:45:36 -0700 Subject: [PATCH 0945/1894] updated interop spec --- doc/interop-test-descriptions.md | 127 +++++++++---------------------- 1 file changed, 35 insertions(+), 92 deletions(-) diff --git a/doc/interop-test-descriptions.md b/doc/interop-test-descriptions.md index 6297b5cc3ef..7fd21c7022e 100644 --- a/doc/interop-test-descriptions.md +++ b/doc/interop-test-descriptions.md @@ -93,26 +93,24 @@ Client asserts: ### large_compressed_unary This test verifies compressed unary calls succeed in sending messages. It -sends one unary request for every combination of compression algorithm and -payload type. +sends one unary request for every payload type, with and without requesting a +compressed response from the server. In all scenarios, whether compression was actually performed is determined by -the compression bit in the response's message flags. The response's compression -value indicates which algorithm was used if said compression bit is set. +the compression bit in the response's message flags. Server features: * [UnaryCall][] * [Compressable Payload][] * [Uncompressable Payload][] -* [Random Payload][] Procedure: 1. Client calls UnaryCall with: ``` { - response_compression: + request_compressed_response: bool response_type: COMPRESSABLE response_size: 314159 payload:{ @@ -123,11 +121,10 @@ Procedure: Client asserts: * call was successful * response payload type is COMPRESSABLE - * response compression is consistent with the requested one. - * if `response_compression == NONE`, the response MUST NOT have the + * if `request_compressed_response` is false, the response MUST NOT have the + compressed message flag set. + * if `request_compressed_response` is true, the response MUST have the compressed message flag set. - * if `response_compression != NONE`, the response MUST have the compressed - message flag set. * response payload body is 314159 bytes in size * clients are free to assert that the response payload body contents are zero and comparing the entire response message against a golden response @@ -136,7 +133,7 @@ Procedure: 2. Client calls UnaryCall with: ``` { - response_compression: + request_compressed_response: bool response_type: UNCOMPRESSABLE response_size: 314159 payload:{ @@ -147,29 +144,11 @@ Procedure: Client asserts: * call was successful * response payload type is UNCOMPRESSABLE - * response compression is consistent with the requested one. - * the response MUST NOT have the compressed message flag set. + * the response MAY have the compressed message flag set. Some + implementations will choose to compress the payload even when the output + size if larger than the input. * response payload body is 314159 bytes in size - * clients are free to assert that the response payload body contents are - identical to the golden uncompressable data at `test/cpp/interop/rnd.dat`. - - 3. Client calls UnaryCall with: - ``` - { - response_compression: - response_type: RANDOM - response_size: 314159 - payload:{ - body: 271828 bytes of zeros - } - } - ``` - Client asserts: - * call was successful - * response payload type is either COMPRESSABLE or UNCOMPRESSABLE - * the behavior is consistent with the randomly chosen incoming payload type, - as described in their respective sections. ### client_streaming @@ -245,7 +224,7 @@ Procedure: size: 31415 } response_parameters:{ - size: 9 + size: 59 } response_parameters:{ size: 2653 @@ -272,7 +251,6 @@ Server features: * [StreamingOutputCall][] * [Compressable Payload][] * [Uncompressable Payload][] -* [Random Payload][] Procedure: @@ -280,13 +258,13 @@ Procedure: ``` { - response_compression: + request_compressed_response: bool response_type:COMPRESSABLE response_parameters:{ size: 31415 } response_parameters:{ - size: 9 + size: 59 } response_parameters:{ size: 2653 @@ -301,12 +279,11 @@ Procedure: * call was successful * exactly four responses * response payloads are COMPRESSABLE - * response compression is consistent with the requested one. - * if `response_compression == NONE`, the response MUST NOT have the - compressed message flag set. - * if `response_compression != NONE`, the response MUST have the compressed - message flag set. - * response payload bodies are sized (in order): 31415, 9, 2653, 58979 + * if `request_compressed_response` is false, the response's messages MUST + NOT have the compressed message flag set. + * if `request_compressed_response` is true, the response's messages MUST + have the compressed message flag set. + * response payload bodies are sized (in order): 31415, 59, 2653, 58979 * clients are free to assert that the response payload body contents are zero and comparing the entire response messages against golden responses @@ -315,13 +292,13 @@ Procedure: ``` { - response_compression: + request_compressed_response: bool response_type:UNCOMPRESSABLE response_parameters:{ size: 31415 } response_parameters:{ - size: 9 + size: 59 } response_parameters:{ size: 2653 @@ -336,40 +313,14 @@ Procedure: * call was successful * exactly four responses * response payloads are UNCOMPRESSABLE - * response compressions are consistent with the requested one. - * the responses MUST NOT have the compressed message flag set. - * response payload bodies are sized (in order): 31415, 9, 2653, 58979 + * the response MAY have the compressed message flag set. Some + implementations will choose to compress the payload even when the output + size if larger than the input. + * response payload bodies are sized (in order): 31415, 59, 2653, 58979 * clients are free to assert that the body of the responses are identical to the golden uncompressable data at `test/cpp/interop/rnd.dat`. - 3. Client calls StreamingOutputCall with: - - ``` - { - response_compression: - response_type:RANDOM - response_parameters:{ - size: 31415 - } - response_parameters:{ - size: 9 - } - response_parameters:{ - size: 2653 - } - response_parameters:{ - size: 58979 - } - } - ``` - - Client asserts: - * call was successful - * response payload type is either COMPRESSABLE or UNCOMPRESSABLE - * the behavior is consistent with the randomly chosen incoming payload type, - as described in their respective sections. - ### ping_pong This test verifies that full duplex bidi is supported. @@ -399,7 +350,7 @@ Procedure: { response_type: COMPRESSABLE response_parameters:{ - size: 9 + size: 59 } payload:{ body: 8 bytes of zeros @@ -932,9 +883,9 @@ Server implements EmptyCall which immediately returns the empty message. [UnaryCall]: #unarycall Server implements UnaryCall which immediately returns a SimpleResponse with a -payload body of size SimpleRequest.response_size bytes and type as appropriate -for the SimpleRequest.response_type. If the server does not support the -response_type, then it should fail the RPC with INVALID_ARGUMENT. +payload body of size `SimpleRequest.response_size` bytes and type as appropriate +for the `SimpleRequest.response_type`. If the server does not support the +`response_type`, then it should fail the RPC with `INVALID_ARGUMENT`. ### StreamingInputCall [StreamingInputCall]: #streaminginputcall @@ -974,15 +925,7 @@ COMPRESSABLE. When the client requests UNCOMPRESSABLE payload, the response includes a payload of the size requested containing uncompressable data and the payload type is -UNCOMPRESSABLE. A 512 kB dump from /dev/urandom is the current golden data, -stored at `test/cpp/interop/rnd.dat` - -### Random Payload -[Random Payload]: #random-payload - -When the client requests RANDOM payload, the response includes either a randomly -chosen COMPRESSABLE or UNCOMPRESSABLE payload. The data and the payload type -will be consistent with this choice. +UNCOMPRESSABLE. ### Echo Status [Echo Status]: #echo-status @@ -1004,8 +947,8 @@ key and the corresponding value back to the client as trailing metadata. [Observe ResponseParameters.interval_us]: #observe-responseparametersinterval_us In StreamingOutputCall and FullDuplexCall, server delays sending a -StreamingOutputCallResponse by the ResponseParameters's interval_us for that -particular response, relative to the last response sent. That is, interval_us +StreamingOutputCallResponse by the ResponseParameters's `interval_us` for that +particular response, relative to the last response sent. That is, `interval_us` acts like a sleep *before* sending the response and accumulates from one response to the next. @@ -1027,13 +970,13 @@ an email address. #### Echo OAuth scope [Echo OAuth Scope]: #echo-oauth-scope -If a SimpleRequest has fill_oauth_scope=true and that request was successfully +If a SimpleRequest has `fill_oauth_scope=true` and that request was successfully authenticated via OAuth, then the SimpleResponse should have oauth_scope filled with the scope of the method being invoked. Although a general server-side feature, most test servers won't implement this -feature. The TLS server grpc-test.sandbox.googleapis.com:443 supports this feature. -It requires at least the OAuth scope +feature. The TLS server `grpc-test.sandbox.googleapis.com:443` supports this +feature. It requires at least the OAuth scope `https://www.googleapis.com/auth/xapi.zoo` for authentication to succeed. Discussion: From 22a65e1a2b7c1782bc288d9e8af1c0c9f0f90795 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Tue, 7 Jun 2016 19:06:05 -0700 Subject: [PATCH 0946/1894] Added python jwt_token_creds interop test --- setup.py | 2 +- src/python/grpcio/grpc/_auth.py | 15 ++++++++++++++- src/python/grpcio/tests/interop/client.py | 3 +++ src/python/grpcio/tests/interop/methods.py | 13 +++++++++++++ tools/run_tests/run_interop_tests.py | 2 +- 5 files changed, 32 insertions(+), 3 deletions(-) diff --git a/setup.py b/setup.py index f96824fa883..0e2646d5d2f 100644 --- a/setup.py +++ b/setup.py @@ -202,7 +202,7 @@ TEST_PACKAGE_DATA = { } TESTS_REQUIRE = ( - 'oauth2client>=1.4.7', + 'oauth2client>=2.1.0', 'protobuf>=3.0.0a3', 'coverage>=4.0', ) + INSTALL_REQUIRES diff --git a/src/python/grpcio/grpc/_auth.py b/src/python/grpcio/grpc/_auth.py index 3ae00ca23a7..dea3221c9d8 100644 --- a/src/python/grpcio/grpc/_auth.py +++ b/src/python/grpcio/grpc/_auth.py @@ -29,6 +29,7 @@ """GRPCAuthMetadataPlugins for standard authentication.""" +import inspect from concurrent import futures import grpc @@ -46,9 +47,21 @@ class GoogleCallCredentials(grpc.AuthMetadataPlugin): self._credentials = credentials self._pool = futures.ThreadPoolExecutor(max_workers=1) + # Hack to determine if these are JWT creds and we need to pass + # additional_claims when getting a token + if 'additional_claims' in inspect.getargspec( + credentials.get_access_token).args: + self._is_jwt = True + else: + self._is_jwt = False + def __call__(self, context, callback): # MetadataPlugins cannot block (see grpc.beta.interfaces.py) - future = self._pool.submit(self._credentials.get_access_token) + if self._is_jwt: + future = self._pool.submit(self._credentials.get_access_token, + additional_claims={'aud': context.service_url}) + else: + future = self._pool.submit(self._credentials.get_access_token) future.add_done_callback(lambda x: self._get_token_callback(callback, x)) def _get_token_callback(self, callback, future): diff --git a/src/python/grpcio/tests/interop/client.py b/src/python/grpcio/tests/interop/client.py index e3d5545a020..8aa1ce30c1a 100644 --- a/src/python/grpcio/tests/interop/client.py +++ b/src/python/grpcio/tests/interop/client.py @@ -76,6 +76,9 @@ def _stub(args): creds = oauth2client_client.GoogleCredentials.get_application_default() scoped_creds = creds.create_scoped([args.oauth_scope]) call_creds = implementations.google_call_credentials(scoped_creds) + elif args.test_case == 'jwt_token_creds': + creds = oauth2client_client.GoogleCredentials.get_application_default() + call_creds = implementations.google_call_credentials(creds) else: call_creds = None if args.use_tls: diff --git a/src/python/grpcio/tests/interop/methods.py b/src/python/grpcio/tests/interop/methods.py index d5ef0c68bb9..7eac5115258 100644 --- a/src/python/grpcio/tests/interop/methods.py +++ b/src/python/grpcio/tests/interop/methods.py @@ -310,6 +310,16 @@ def _oauth2_auth_token(stub, args): (response.oauth_scope, args.oauth_scope)) +def _jwt_token_creds(stub, args): + json_key_filename = os.environ[ + oauth2client_client.GOOGLE_APPLICATION_CREDENTIALS] + wanted_email = json.load(open(json_key_filename, 'rb'))['client_email'] + response = _large_unary_common_behavior(stub, True, False) + if wanted_email != response.username: + raise ValueError( + 'expected username %s, got %s' % (wanted_email, response.username)) + + def _per_rpc_creds(stub, args): json_key_filename = os.environ[ oauth2client_client.GOOGLE_APPLICATION_CREDENTIALS] @@ -338,6 +348,7 @@ class TestCase(enum.Enum): EMPTY_STREAM = 'empty_stream' COMPUTE_ENGINE_CREDS = 'compute_engine_creds' OAUTH2_AUTH_TOKEN = 'oauth2_auth_token' + JWT_TOKEN_CREDS = 'jwt_token_creds' PER_RPC_CREDS = 'per_rpc_creds' TIMEOUT_ON_SLEEPING_SERVER = 'timeout_on_sleeping_server' @@ -364,6 +375,8 @@ class TestCase(enum.Enum): _compute_engine_creds(stub, args) elif self is TestCase.OAUTH2_AUTH_TOKEN: _oauth2_auth_token(stub, args) + elif self is TestCase.JWT_TOKEN_CREDS: + _jwt_token_creds(stub, args) elif self is TestCase.PER_RPC_CREDS: _per_rpc_creds(stub, args) else: diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index 053aabc9b5b..5aaefb1ae14 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -317,7 +317,7 @@ class PythonLanguage: 'PYTHONPATH': '{}/src/python/gens'.format(DOCKER_WORKDIR_ROOT)} def unimplemented_test_cases(self): - return _SKIP_ADVANCED + _SKIP_COMPRESSION + ['jwt_token_creds'] + return _SKIP_ADVANCED + _SKIP_COMPRESSION def unimplemented_test_cases_server(self): return _SKIP_ADVANCED + _SKIP_COMPRESSION From dfff4de040086d68bbdabf2d4a0c427b55987ebd Mon Sep 17 00:00:00 2001 From: "David G. Quintas" Date: Tue, 7 Jun 2016 19:57:33 -0700 Subject: [PATCH 0947/1894] Fix sed induced typo --- src/core/lib/iomgr/timer.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/core/lib/iomgr/timer.c b/src/core/lib/iomgr/timer.c index 05a2fc104fc..69d3babfdb4 100644 --- a/src/core/lib/iomgr/timer.c +++ b/src/core/lib/iomgr/timer.c @@ -278,9 +278,8 @@ static int refill_queue(shard_type *shard, gpr_timespec now) { return !grpc_timer_heap_is_empty(&shard->heap); } -/* This pollent the next non-cancelled timer with deadline <= now from the - queue, - or returns NULL if there isn't one. +/* This pops the next non-cancelled timer with deadline <= now from the + queue, or returns NULL if there isn't one. REQUIRES: shard->mu locked */ static grpc_timer *pop_one(shard_type *shard, gpr_timespec now) { grpc_timer *timer; From cf41d19a9e1c7edf77fb0362824214dc9308a075 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 7 Jun 2016 21:05:43 -0700 Subject: [PATCH 0948/1894] clang-format --- include/grpc++/impl/grpc_library.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/impl/grpc_library.h b/include/grpc++/impl/grpc_library.h index aaa9e4c8a54..1184d1bf093 100644 --- a/include/grpc++/impl/grpc_library.h +++ b/include/grpc++/impl/grpc_library.h @@ -37,8 +37,8 @@ #include #include -#include #include +#include #include namespace grpc { From 126ae106d61ca7b8d28b7c9da86ecaf5f2034748 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 7 Jun 2016 21:15:05 -0700 Subject: [PATCH 0949/1894] fixed silly typo --- test/cpp/interop/interop_client.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index e67cb5ac9d4..537fa317dac 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -487,7 +487,7 @@ bool InteropClient::DoResponseCompressedStreaming() { GPR_ASSERT(response.payload().body() == grpc::string(response_stream_sizes[k], '\0')); break; - case PayloadType::UNCOMPRESSABLE: { + case PayloadType::UNCOMPRESSABLE: break; default: GPR_ASSERT(false); From 37e516e7c99ed08da6b8619701b542e2bd15a732 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 7 Jun 2016 21:23:41 -0700 Subject: [PATCH 0950/1894] regenerated projects --- BUILD | 2 +- Makefile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BUILD b/BUILD index 5a6562336b1..378f61eb66a 100644 --- a/BUILD +++ b/BUILD @@ -678,7 +678,7 @@ cc_library( "src/core/lib/channel/connected_channel.c", "src/core/lib/channel/http_client_filter.c", "src/core/lib/channel/http_server_filter.c", - "src/core/lib/compression/compression_algorithm.c", + "src/core/lib/compression/compression.c", "src/core/lib/compression/message_compress.c", "src/core/lib/debug/trace.c", "src/core/lib/http/format_request.c", diff --git a/Makefile b/Makefile index 2940ff6ed55..05cb78930d9 100644 --- a/Makefile +++ b/Makefile @@ -2746,7 +2746,7 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/channel/connected_channel.c \ src/core/lib/channel/http_client_filter.c \ src/core/lib/channel/http_server_filter.c \ - src/core/lib/compression/compression_algorithm.c \ + src/core/lib/compression/compression.c \ src/core/lib/compression/message_compress.c \ src/core/lib/debug/trace.c \ src/core/lib/http/format_request.c \ From 20d802db98fc8aba78169567415b003a85b55b84 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 7 Jun 2016 22:04:10 -0700 Subject: [PATCH 0951/1894] removed unused vble --- test/cpp/interop/interop_client.cc | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index 537fa317dac..a0479e8f689 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -55,8 +55,6 @@ namespace grpc { namespace testing { -static const char* kRandomFile = "test/cpp/interop/rnd.dat"; - namespace { // The same value is defined by the Java client. const std::vector request_stream_sizes = {27182, 8, 1828, 45904}; From f6d09f2566561c9407c564a46901ff3a237ce115 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Tue, 7 Jun 2016 22:19:46 -0700 Subject: [PATCH 0952/1894] Fix command ordering for building Python artifacts Source packages were not getting the necessary C files due to `make_grpcio_tools.py` not being invoked before `sdist` through `setup.py`. --- tools/run_tests/build_artifact_python.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/run_tests/build_artifact_python.sh b/tools/run_tests/build_artifact_python.sh index 4320f978e30..55f8eb634ba 100755 --- a/tools/run_tests/build_artifact_python.sh +++ b/tools/run_tests/build_artifact_python.sh @@ -59,12 +59,14 @@ ${SETARCH_CMD} ${PYTHON} setup.py \ ${SETARCH_CMD} ${PYTHON} setup.py \ bdist_wheel +# Build gRPC tools package distribution +${PYTHON} tools/distrib/python/make_grpcio_tools.py + # Build gRPC tools package source distribution ${SETARCH_CMD} ${PYTHON} tools/distrib/python/grpcio_tools/setup.py \ sdist # Build gRPC tools package binary distribution -${PYTHON} tools/distrib/python/make_grpcio_tools.py CFLAGS="$CFLAGS -fno-wrapv" ${SETARCH_CMD} \ ${PYTHON} tools/distrib/python/grpcio_tools/setup.py bdist_wheel From 3f30e634a6eb72baebe03a1e4757029918076cae Mon Sep 17 00:00:00 2001 From: Robbie Shade Date: Wed, 8 Jun 2016 08:40:56 -0400 Subject: [PATCH 0953/1894] Adds functions to set snd/rcv socket buffer sizes. Used for non-default 1 MB UDP socket buffers. --- src/core/lib/iomgr/socket_utils_common_posix.c | 10 ++++++++++ src/core/lib/iomgr/socket_utils_posix.h | 8 ++++++++ src/core/lib/iomgr/udp_server.c | 14 ++++++++++++++ test/core/iomgr/fd_posix_test.c | 8 +++----- 4 files changed, 35 insertions(+), 5 deletions(-) diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index fa83ceef301..2147c86d4d1 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -111,6 +111,16 @@ int grpc_set_socket_ipv6_recvpktinfo_if_possible(int fd) { #endif } +int grpc_set_socket_sndbuf(int fd, int buffer_size_bytes) { + return 0 == setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &buffer_size_bytes, + sizeof(buffer_size_bytes)); +} + +int grpc_set_socket_rcvbuf(int fd, int buffer_size_bytes) { + return 0 == setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &buffer_size_bytes, + sizeof(buffer_size_bytes)); +} + /* set a socket to close on exec */ int grpc_set_socket_cloexec(int fd, int close_on_exec) { int oldflags = fcntl(fd, F_GETFD, 0); diff --git a/src/core/lib/iomgr/socket_utils_posix.h b/src/core/lib/iomgr/socket_utils_posix.h index a8f6e5e6586..7e41d1c8700 100644 --- a/src/core/lib/iomgr/socket_utils_posix.h +++ b/src/core/lib/iomgr/socket_utils_posix.h @@ -78,6 +78,14 @@ int grpc_set_socket_ip_pktinfo_if_possible(int fd); If IPV6_RECVPKTINFO is not available, returns 1. */ int grpc_set_socket_ipv6_recvpktinfo_if_possible(int fd); +/* Tries to set the socket's send buffer to given size. + Returns 1 on success, 0 on failure. */ +int grpc_set_socket_sndbuf(int fd, int buffer_size_bytes); + +/* Tries to set the socket's receive buffer to given size. + Returns 1 on success, 0 on failure. */ +int grpc_set_socket_rcvbuf(int fd, int buffer_size_bytes); + /* An enum to keep track of IPv4/IPv6 socket modes. Currently, this information is only used when a socket is first created, but diff --git a/src/core/lib/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.c index 98ffccd59b7..16150687d3d 100644 --- a/src/core/lib/iomgr/udp_server.c +++ b/src/core/lib/iomgr/udp_server.c @@ -210,6 +210,8 @@ static int prepare_socket(int fd, const struct sockaddr *addr, size_t addr_len) { struct sockaddr_storage sockname_temp; socklen_t sockname_len; + /* Set send/receive socket buffers to 1 MB */ + int buffer_size_bytes = 1024 * 1024; if (fd < 0) { goto error; @@ -239,6 +241,18 @@ static int prepare_socket(int fd, const struct sockaddr *addr, goto error; } + if (!grpc_set_socket_sndbuf(fd, buffer_size_bytes)) { + gpr_log(GPR_ERROR, "Failed to set send buffer size to %d bytes", + buf_size_bytes); + goto error; + } + + if (!grpc_set_socket_rcvbuf(fd, buffer_size_bytes)) { + gpr_log(GPR_ERROR, "Failed to set receive buffer size to %d bytes", + buf_size_bytes); + goto error; + } + return grpc_sockaddr_get_port((struct sockaddr *)&sockname_temp); error: diff --git a/test/core/iomgr/fd_posix_test.c b/test/core/iomgr/fd_posix_test.c index f97f33712eb..ad66542202c 100644 --- a/test/core/iomgr/fd_posix_test.c +++ b/test/core/iomgr/fd_posix_test.c @@ -68,17 +68,15 @@ static void create_test_socket(int port, int *socket_fd, struct sockaddr_in *sin) { int fd; int one = 1; - int buf_size = BUF_SIZE; + int buffer_size_bytes = BUF_SIZE; int flags; fd = socket(AF_INET, SOCK_STREAM, 0); setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)); /* Reset the size of socket send buffer to the minimal value to facilitate buffer filling up and triggering notify_on_write */ - GPR_ASSERT( - setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &buf_size, sizeof(buf_size)) != -1); - GPR_ASSERT( - setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &buf_size, sizeof(buf_size)) != -1); + GPR_ASSERT(grpc_set_socket_sndbuf(fd, buffer_size_bytes)); + GPR_ASSERT(grpc_set_socket_rcvbuf(fd, buffer_size_bytes)); /* Make fd non-blocking */ flags = fcntl(fd, F_GETFL, 0); GPR_ASSERT(fcntl(fd, F_SETFL, flags | O_NONBLOCK) == 0); From e2b30ebbb321eecb396ecd2934c756aeedd51e98 Mon Sep 17 00:00:00 2001 From: Robbie Shade Date: Wed, 8 Jun 2016 08:45:05 -0400 Subject: [PATCH 0954/1894] Adds include for socket utils. --- test/core/iomgr/fd_posix_test.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/core/iomgr/fd_posix_test.c b/test/core/iomgr/fd_posix_test.c index ad66542202c..0630f1d10e1 100644 --- a/test/core/iomgr/fd_posix_test.c +++ b/test/core/iomgr/fd_posix_test.c @@ -52,6 +52,7 @@ #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/iomgr.h" +#include "src/core/lib/iomgr/socket_utils_posix.h" #include "test/core/util/test_config.h" static gpr_mu *g_mu; From 080749e8ba5707d4c927baf92af4e82ce1718a7b Mon Sep 17 00:00:00 2001 From: "Matthew D. Steele" Date: Tue, 7 Jun 2016 13:55:04 -0400 Subject: [PATCH 0955/1894] Add interfaces for ServerAsyncReader/Writers --- include/grpc++/impl/codegen/async_stream.h | 43 ++++++++++++++----- .../grpc++/impl/codegen/impl/async_stream.h | 43 ++++++++++++++----- 2 files changed, 64 insertions(+), 22 deletions(-) diff --git a/include/grpc++/impl/codegen/async_stream.h b/include/grpc++/impl/codegen/async_stream.h index a607a471060..70a8b393120 100644 --- a/include/grpc++/impl/codegen/async_stream.h +++ b/include/grpc++/impl/codegen/async_stream.h @@ -298,8 +298,16 @@ class ClientAsyncReaderWriter GRPC_FINAL }; template -class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, - public AsyncReaderInterface { +class ServerAsyncReaderInterface : public ServerAsyncStreamingInterface, + public AsyncReaderInterface { + public: + virtual void Finish(const W& msg, const Status& status, void* tag) = 0; + + virtual void FinishWithError(const Status& status, void* tag) = 0; +}; + +template +class ServerAsyncReader GRPC_FINAL : public ServerAsyncReaderInterface { public: explicit ServerAsyncReader(ServerContext* ctx) : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} @@ -320,7 +328,7 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, call_.PerformOps(&read_ops_); } - void Finish(const W& msg, const Status& status, void* tag) { + void Finish(const W& msg, const Status& status, void* tag) GRPC_OVERRIDE { finish_ops_.set_output_tag(tag); if (!ctx_->sent_initial_metadata_) { finish_ops_.SendInitialMetadata(ctx_->initial_metadata_, @@ -337,7 +345,7 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, call_.PerformOps(&finish_ops_); } - void FinishWithError(const Status& status, void* tag) { + void FinishWithError(const Status& status, void* tag) GRPC_OVERRIDE { GPR_CODEGEN_ASSERT(!status.ok()); finish_ops_.set_output_tag(tag); if (!ctx_->sent_initial_metadata_) { @@ -362,8 +370,14 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, }; template -class ServerAsyncWriter GRPC_FINAL : public ServerAsyncStreamingInterface, - public AsyncWriterInterface { +class ServerAsyncWriterInterface : public ServerAsyncStreamingInterface, + public AsyncWriterInterface { + public: + virtual void Finish(const Status& status, void* tag) = 0; +}; + +template +class ServerAsyncWriter GRPC_FINAL : public ServerAsyncWriterInterface { public: explicit ServerAsyncWriter(ServerContext* ctx) : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} @@ -390,7 +404,7 @@ class ServerAsyncWriter GRPC_FINAL : public ServerAsyncStreamingInterface, call_.PerformOps(&write_ops_); } - void Finish(const Status& status, void* tag) { + void Finish(const Status& status, void* tag) GRPC_OVERRIDE { finish_ops_.set_output_tag(tag); if (!ctx_->sent_initial_metadata_) { finish_ops_.SendInitialMetadata(ctx_->initial_metadata_, @@ -413,9 +427,16 @@ class ServerAsyncWriter GRPC_FINAL : public ServerAsyncStreamingInterface, /// Server-side interface for asynchronous bi-directional streaming. template -class ServerAsyncReaderWriter GRPC_FINAL : public ServerAsyncStreamingInterface, - public AsyncWriterInterface, - public AsyncReaderInterface { +class ServerAsyncReaderWriterInterface : public ServerAsyncStreamingInterface, + public AsyncWriterInterface, + public AsyncReaderInterface { + public: + virtual void Finish(const Status& status, void* tag) = 0; +}; + +template +class ServerAsyncReaderWriter GRPC_FINAL + : public ServerAsyncReaderWriterInterface { public: explicit ServerAsyncReaderWriter(ServerContext* ctx) : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} @@ -448,7 +469,7 @@ class ServerAsyncReaderWriter GRPC_FINAL : public ServerAsyncStreamingInterface, call_.PerformOps(&write_ops_); } - void Finish(const Status& status, void* tag) { + void Finish(const Status& status, void* tag) GRPC_OVERRIDE { finish_ops_.set_output_tag(tag); if (!ctx_->sent_initial_metadata_) { finish_ops_.SendInitialMetadata(ctx_->initial_metadata_, diff --git a/include/grpc++/impl/codegen/impl/async_stream.h b/include/grpc++/impl/codegen/impl/async_stream.h index 8f99e7eea43..7d7a9568077 100644 --- a/include/grpc++/impl/codegen/impl/async_stream.h +++ b/include/grpc++/impl/codegen/impl/async_stream.h @@ -295,8 +295,16 @@ class ClientAsyncReaderWriter GRPC_FINAL }; template -class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, - public AsyncReaderInterface { +class ServerAsyncReaderInterface : public ServerAsyncStreamingInterface, + public AsyncReaderInterface { + public: + virtual void Finish(const W& msg, const Status& status, void* tag) = 0; + + virtual void FinishWithError(const Status& status, void* tag) = 0; +}; + +template +class ServerAsyncReader GRPC_FINAL : public ServerAsyncReaderInterface { public: explicit ServerAsyncReader(ServerContext* ctx) : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} @@ -316,7 +324,7 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, call_.PerformOps(&read_ops_); } - void Finish(const W& msg, const Status& status, void* tag) { + void Finish(const W& msg, const Status& status, void* tag) GRPC_OVERRIDE { finish_ops_.set_output_tag(tag); if (!ctx_->sent_initial_metadata_) { finish_ops_.SendInitialMetadata(ctx_->initial_metadata_); @@ -332,7 +340,7 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, call_.PerformOps(&finish_ops_); } - void FinishWithError(const Status& status, void* tag) { + void FinishWithError(const Status& status, void* tag) GRPC_OVERRIDE { GPR_CODEGEN_ASSERT(!status.ok()); finish_ops_.set_output_tag(tag); if (!ctx_->sent_initial_metadata_) { @@ -356,8 +364,14 @@ class ServerAsyncReader GRPC_FINAL : public ServerAsyncStreamingInterface, }; template -class ServerAsyncWriter GRPC_FINAL : public ServerAsyncStreamingInterface, - public AsyncWriterInterface { +class ServerAsyncWriterInterface : public ServerAsyncStreamingInterface, + public AsyncWriterInterface { + public: + virtual void Finish(const Status& status, void* tag) = 0; +}; + +template +class ServerAsyncWriter GRPC_FINAL : public ServerAsyncWriterInterface { public: explicit ServerAsyncWriter(ServerContext* ctx) : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} @@ -382,7 +396,7 @@ class ServerAsyncWriter GRPC_FINAL : public ServerAsyncStreamingInterface, call_.PerformOps(&write_ops_); } - void Finish(const Status& status, void* tag) { + void Finish(const Status& status, void* tag) GRPC_OVERRIDE { finish_ops_.set_output_tag(tag); if (!ctx_->sent_initial_metadata_) { finish_ops_.SendInitialMetadata(ctx_->initial_metadata_); @@ -404,9 +418,16 @@ class ServerAsyncWriter GRPC_FINAL : public ServerAsyncStreamingInterface, /// Server-side interface for asynchronous bi-directional streaming. template -class ServerAsyncReaderWriter GRPC_FINAL : public ServerAsyncStreamingInterface, - public AsyncWriterInterface, - public AsyncReaderInterface { +class ServerAsyncReaderWriterInterface : public ServerAsyncStreamingInterface, + public AsyncWriterInterface, + public AsyncReaderInterface { + public: + virtual void Finish(const Status& status, void* tag) = 0; +}; + +template +class ServerAsyncReaderWriter GRPC_FINAL + : public ServerAsyncReaderWriterInterface { public: explicit ServerAsyncReaderWriter(ServerContext* ctx) : call_(nullptr, nullptr, nullptr), ctx_(ctx) {} @@ -437,7 +458,7 @@ class ServerAsyncReaderWriter GRPC_FINAL : public ServerAsyncStreamingInterface, call_.PerformOps(&write_ops_); } - void Finish(const Status& status, void* tag) { + void Finish(const Status& status, void* tag) GRPC_OVERRIDE { finish_ops_.set_output_tag(tag); if (!ctx_->sent_initial_metadata_) { finish_ops_.SendInitialMetadata(ctx_->initial_metadata_); From 4f11ab1ffd20a3a0cf2c33a563fcd5437733c189 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Wed, 8 Jun 2016 10:40:00 -0700 Subject: [PATCH 0956/1894] addressed feedback. --- src/compiler/objective_c_generator.cc | 2 +- src/objective-c/ProtoRPC/ProtoMethod.h | 2 +- src/objective-c/ProtoRPC/ProtoRPC.h | 6 +++--- src/objective-c/ProtoRPC/ProtoRPC.m | 2 +- src/objective-c/ProtoRPC/ProtoService.h | 4 ++-- 5 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/compiler/objective_c_generator.cc b/src/compiler/objective_c_generator.cc index 75665cd5c0d..71a674174d7 100644 --- a/src/compiler/objective_c_generator.cc +++ b/src/compiler/objective_c_generator.cc @@ -94,7 +94,7 @@ void PrintSimpleSignature(Printer *printer, const MethodDescriptor *method, void PrintAdvancedSignature(Printer *printer, const MethodDescriptor *method, map< ::grpc::string, ::grpc::string> vars) { vars["method_name"] = "RPCTo" + vars["method_name"]; - vars["return_type"] = "GRPCProtoRPC *"; + vars["return_type"] = "GRPCProtoCall *"; PrintMethodSignature(printer, method, vars); } diff --git a/src/objective-c/ProtoRPC/ProtoMethod.h b/src/objective-c/ProtoRPC/ProtoMethod.h index bd1a848c19a..f9fdbb35ffd 100644 --- a/src/objective-c/ProtoRPC/ProtoMethod.h +++ b/src/objective-c/ProtoRPC/ProtoMethod.h @@ -51,7 +51,7 @@ __attribute__((deprecated("Please use GRPCProtoMethod."))) @end /** - * This subclass is empty now. Eventually we'll remove ProtoService class + * This subclass is empty now. Eventually we'll remove ProtoMethod class * to avoid potential naming conflict */ @interface GRPCProtoMethod : ProtoMethod diff --git a/src/objective-c/ProtoRPC/ProtoRPC.h b/src/objective-c/ProtoRPC/ProtoRPC.h index 55fefb0aa88..f22d731f68b 100644 --- a/src/objective-c/ProtoRPC/ProtoRPC.h +++ b/src/objective-c/ProtoRPC/ProtoRPC.h @@ -36,7 +36,7 @@ #import "ProtoMethod.h" -__attribute__((deprecated("Please use GRPCProtoRPC."))) +__attribute__((deprecated("Please use GRPCProtoCall."))) @interface ProtoRPC : GRPCCall - (instancetype)initWithHost:(NSString *)host @@ -49,9 +49,9 @@ __attribute__((deprecated("Please use GRPCProtoRPC."))) @end /** - * This subclass is empty now. Eventually we'll remove ProtoService class + * This subclass is empty now. Eventually we'll remove ProtoRPC class * to avoid potential naming conflict */ -@interface GRPCProtoRPC : ProtoRPC +@interface GRPCProtoCall : ProtoRPC @end diff --git a/src/objective-c/ProtoRPC/ProtoRPC.m b/src/objective-c/ProtoRPC/ProtoRPC.m index 27c8b0eff7e..fb0b566f199 100644 --- a/src/objective-c/ProtoRPC/ProtoRPC.m +++ b/src/objective-c/ProtoRPC/ProtoRPC.m @@ -118,6 +118,6 @@ static NSError *ErrorForBadProto(id proto, Class expectedClass, NSError *parsing } @end -@implementation GRPCProtoRPC +@implementation GRPCProtoCall @end diff --git a/src/objective-c/ProtoRPC/ProtoService.h b/src/objective-c/ProtoRPC/ProtoService.h index edec8a4770f..87d06e1ae59 100644 --- a/src/objective-c/ProtoRPC/ProtoService.h +++ b/src/objective-c/ProtoRPC/ProtoService.h @@ -33,7 +33,7 @@ #import -@class GRPCProtoRPC; +@class GRPCProtoCall; @protocol GRXWriteable; @class GRXWriter; @@ -44,7 +44,7 @@ __attribute__((deprecated("Please use GRPCProtoService."))) packageName:(NSString *)packageName serviceName:(NSString *)serviceName NS_DESIGNATED_INITIALIZER; -- (GRPCProtoRPC *)RPCToMethod:(NSString *)method +- (GRPCProtoCall *)RPCToMethod:(NSString *)method requestsWriter:(GRXWriter *)requestsWriter responseClass:(Class)responseClass responsesWriteable:(id)responsesWriteable; From cfd4102357187823f82d44e561aaa1d5b9a9e3fe Mon Sep 17 00:00:00 2001 From: Adam Michalik Date: Wed, 8 Jun 2016 10:59:48 -0700 Subject: [PATCH 0957/1894] fix memory leak --- .../transport/chttp2/server/insecure/server_chttp2_posix.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c index d625ed1d9e5..96bf4d6f308 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c @@ -38,6 +38,7 @@ #ifdef GPR_SUPPORT_CHANNELS_FROM_FD +#include #include #include "src/core/ext/transport/chttp2/transport/chttp2_transport.h" @@ -52,12 +53,15 @@ void grpc_server_add_insecure_channel_from_fd(grpc_server *server, grpc_completion_queue *cq, int fd) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + char *name; gpr_asprintf(&name, "fd:%d", fd); grpc_endpoint *server_endpoint = grpc_tcp_create( grpc_fd_create(fd, name), GRPC_TCP_DEFAULT_READ_SLICE_SIZE, name); + gpr_free(name); + const grpc_channel_args *server_args = grpc_server_get_channel_args(server); grpc_transport *transport = grpc_create_chttp2_transport( &exec_ctx, server_args, server_endpoint, 0 /* is_client */); From eb25a07a48d84f3426a9cc03f35faaa0b9a0c7c2 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Wed, 8 Jun 2016 10:59:48 -0700 Subject: [PATCH 0958/1894] Add filegroup grpc++_codegen_proto --- BUILD | 53 ++++++ Makefile | 53 ++++++ build.yaml | 2 + tools/run_tests/sources_and_headers.json | 3 +- .../grpc++_reflection.vcxproj | 53 ++++++ .../grpc++_reflection.vcxproj.filters | 177 ++++++++++++++++++ 6 files changed, 340 insertions(+), 1 deletion(-) diff --git a/BUILD b/BUILD index ba558b2cb98..d244a52bb3b 100644 --- a/BUILD +++ b/BUILD @@ -1374,6 +1374,59 @@ cc_library( "include/grpc++/ext/proto_server_reflection_plugin.h", "include/grpc++/ext/reflection.grpc.pb.h", "include/grpc++/ext/reflection.pb.h", + "include/grpc++/impl/codegen/proto_utils.h", + "include/grpc++/impl/codegen/async_stream.h", + "include/grpc++/impl/codegen/async_unary_call.h", + "include/grpc++/impl/codegen/call.h", + "include/grpc++/impl/codegen/call_hook.h", + "include/grpc++/impl/codegen/channel_interface.h", + "include/grpc++/impl/codegen/client_context.h", + "include/grpc++/impl/codegen/client_unary_call.h", + "include/grpc++/impl/codegen/completion_queue.h", + "include/grpc++/impl/codegen/completion_queue_tag.h", + "include/grpc++/impl/codegen/config.h", + "include/grpc++/impl/codegen/core_codegen_interface.h", + "include/grpc++/impl/codegen/create_auth_context.h", + "include/grpc++/impl/codegen/grpc_library.h", + "include/grpc++/impl/codegen/method_handler_impl.h", + "include/grpc++/impl/codegen/rpc_method.h", + "include/grpc++/impl/codegen/rpc_service_method.h", + "include/grpc++/impl/codegen/security/auth_context.h", + "include/grpc++/impl/codegen/serialization_traits.h", + "include/grpc++/impl/codegen/server_context.h", + "include/grpc++/impl/codegen/server_interface.h", + "include/grpc++/impl/codegen/service_type.h", + "include/grpc++/impl/codegen/status.h", + "include/grpc++/impl/codegen/status_code_enum.h", + "include/grpc++/impl/codegen/string_ref.h", + "include/grpc++/impl/codegen/stub_options.h", + "include/grpc++/impl/codegen/sync.h", + "include/grpc++/impl/codegen/sync_cxx11.h", + "include/grpc++/impl/codegen/sync_no_cxx11.h", + "include/grpc++/impl/codegen/sync_stream.h", + "include/grpc++/impl/codegen/time.h", + "include/grpc/impl/codegen/byte_buffer.h", + "include/grpc/impl/codegen/byte_buffer_reader.h", + "include/grpc/impl/codegen/compression_types.h", + "include/grpc/impl/codegen/connectivity_state.h", + "include/grpc/impl/codegen/grpc_types.h", + "include/grpc/impl/codegen/propagation_bits.h", + "include/grpc/impl/codegen/status.h", + "include/grpc/impl/codegen/alloc.h", + "include/grpc/impl/codegen/atm.h", + "include/grpc/impl/codegen/atm_gcc_atomic.h", + "include/grpc/impl/codegen/atm_gcc_sync.h", + "include/grpc/impl/codegen/atm_windows.h", + "include/grpc/impl/codegen/log.h", + "include/grpc/impl/codegen/port_platform.h", + "include/grpc/impl/codegen/slice.h", + "include/grpc/impl/codegen/slice_buffer.h", + "include/grpc/impl/codegen/sync.h", + "include/grpc/impl/codegen/sync_generic.h", + "include/grpc/impl/codegen/sync_posix.h", + "include/grpc/impl/codegen/sync_windows.h", + "include/grpc/impl/codegen/time.h", + "include/grpc++/impl/codegen/config_protobuf.h", ], includes = [ "include", diff --git a/Makefile b/Makefile index 44ea34d5101..01e6c404979 100644 --- a/Makefile +++ b/Makefile @@ -3632,6 +3632,59 @@ PUBLIC_HEADERS_CXX += \ include/grpc++/ext/proto_server_reflection_plugin.h \ include/grpc++/ext/reflection.grpc.pb.h \ include/grpc++/ext/reflection.pb.h \ + include/grpc++/impl/codegen/proto_utils.h \ + include/grpc++/impl/codegen/async_stream.h \ + include/grpc++/impl/codegen/async_unary_call.h \ + include/grpc++/impl/codegen/call.h \ + include/grpc++/impl/codegen/call_hook.h \ + include/grpc++/impl/codegen/channel_interface.h \ + include/grpc++/impl/codegen/client_context.h \ + include/grpc++/impl/codegen/client_unary_call.h \ + include/grpc++/impl/codegen/completion_queue.h \ + include/grpc++/impl/codegen/completion_queue_tag.h \ + include/grpc++/impl/codegen/config.h \ + include/grpc++/impl/codegen/core_codegen_interface.h \ + include/grpc++/impl/codegen/create_auth_context.h \ + include/grpc++/impl/codegen/grpc_library.h \ + include/grpc++/impl/codegen/method_handler_impl.h \ + include/grpc++/impl/codegen/rpc_method.h \ + include/grpc++/impl/codegen/rpc_service_method.h \ + include/grpc++/impl/codegen/security/auth_context.h \ + include/grpc++/impl/codegen/serialization_traits.h \ + include/grpc++/impl/codegen/server_context.h \ + include/grpc++/impl/codegen/server_interface.h \ + include/grpc++/impl/codegen/service_type.h \ + include/grpc++/impl/codegen/status.h \ + include/grpc++/impl/codegen/status_code_enum.h \ + include/grpc++/impl/codegen/string_ref.h \ + include/grpc++/impl/codegen/stub_options.h \ + include/grpc++/impl/codegen/sync.h \ + include/grpc++/impl/codegen/sync_cxx11.h \ + include/grpc++/impl/codegen/sync_no_cxx11.h \ + include/grpc++/impl/codegen/sync_stream.h \ + include/grpc++/impl/codegen/time.h \ + include/grpc/impl/codegen/byte_buffer.h \ + include/grpc/impl/codegen/byte_buffer_reader.h \ + include/grpc/impl/codegen/compression_types.h \ + include/grpc/impl/codegen/connectivity_state.h \ + include/grpc/impl/codegen/grpc_types.h \ + include/grpc/impl/codegen/propagation_bits.h \ + include/grpc/impl/codegen/status.h \ + include/grpc/impl/codegen/alloc.h \ + include/grpc/impl/codegen/atm.h \ + include/grpc/impl/codegen/atm_gcc_atomic.h \ + include/grpc/impl/codegen/atm_gcc_sync.h \ + include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/log.h \ + include/grpc/impl/codegen/port_platform.h \ + include/grpc/impl/codegen/slice.h \ + include/grpc/impl/codegen/slice_buffer.h \ + include/grpc/impl/codegen/sync.h \ + include/grpc/impl/codegen/sync_generic.h \ + include/grpc/impl/codegen/sync_posix.h \ + include/grpc/impl/codegen/sync_windows.h \ + include/grpc/impl/codegen/time.h \ + include/grpc++/impl/codegen/config_protobuf.h \ LIBGRPC++_REFLECTION_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_REFLECTION_SRC)))) diff --git a/build.yaml b/build.yaml index cd95e1d2d90..6328016d4cf 100644 --- a/build.yaml +++ b/build.yaml @@ -969,6 +969,8 @@ libs: - src/cpp/ext/reflection.pb.cc deps: - grpc++ + filegroups: + - grpc++_codegen_proto - name: grpc++_test_config build: private language: c++ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 163c313c4a2..2abd5084e9e 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4308,7 +4308,8 @@ }, { "deps": [ - "grpc++" + "grpc++", + "grpc++_codegen_proto" ], "headers": [ "include/grpc++/ext/proto_server_reflection_plugin.h", diff --git a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj index cbb7c7c76ff..7c3e63b2084 100644 --- a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj +++ b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj @@ -150,6 +150,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters index 70d3d45372a..d9cd49cc306 100644 --- a/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_reflection/grpc++_reflection.vcxproj.filters @@ -24,6 +24,165 @@ include\grpc++\ext + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen\security + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc++\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc++\impl\codegen + @@ -35,12 +194,30 @@ {e9441021-f78a-ec84-7efd-1883975feddb} + + {3b19b259-3bf4-c0fa-8e20-ed79acd63ac3} + {c66e66b4-a64e-79bf-40e8-1a1bac124a3d} {8d96203b-d3ce-2164-74a6-06e0ff2b09af} + + {4e57d72c-762f-20b1-bdb9-bc7088ca6fda} + + + {0f0f3943-7a9d-2b03-7eb1-2fbad4199428} + + + {e1b8bc6d-2cd2-1283-868a-dfd64c3dbab8} + + + {7bccc379-84fb-c1aa-19aa-a0cc09ac59ac} + + + {a1f1904b-e820-dd3c-b4b0-14a6e0ff9d19} + {5ec5476e-3d72-e3f9-4f05-3f7c31c13651} From 4b8550db49793fe756975e249b5e8323bf8d9969 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 8 Jun 2016 11:09:37 -0700 Subject: [PATCH 0959/1894] clang-format code --- src/core/ext/transport/chttp2/transport/internal.h | 2 +- src/core/ext/transport/chttp2/transport/parsing.c | 4 ++-- src/core/lib/support/avl.c | 5 ++--- test/core/statistics/census_log_tests.c | 2 +- 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 86a31cc50be..5872fd8e0a4 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -691,7 +691,7 @@ extern int grpc_flowctl_trace; if (!(grpc_http_trace)) \ ; \ else \ - stmt + stmt typedef enum { GRPC_CHTTP2_FLOWCTL_MOVE, diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index 8b6b0cebd0a..4bd374b7fa7 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -87,8 +87,8 @@ void grpc_chttp2_prepare_to_read( transport_global->settings[GRPC_SENT_SETTINGS], sizeof(transport_parsing->last_sent_settings)); transport_parsing->max_frame_size = - transport_global - ->settings[GRPC_ACKED_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; + transport_global->settings[GRPC_ACKED_SETTINGS] + [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; /* update the parsing view of incoming window */ while (grpc_chttp2_list_pop_unannounced_incoming_window_available( diff --git a/src/core/lib/support/avl.c b/src/core/lib/support/avl.c index c04675e01fb..8d3ce23e6c3 100644 --- a/src/core/lib/support/avl.c +++ b/src/core/lib/support/avl.c @@ -73,9 +73,8 @@ static long node_height(gpr_avl_node *node) { #ifndef NDEBUG static long calculate_height(gpr_avl_node *node) { - return node == NULL ? 0 - : 1 + GPR_MAX(calculate_height(node->left), - calculate_height(node->right)); + return node == NULL ? 0 : 1 + GPR_MAX(calculate_height(node->left), + calculate_height(node->right)); } static gpr_avl_node *assert_invariants(gpr_avl_node *n) { diff --git a/test/core/statistics/census_log_tests.c b/test/core/statistics/census_log_tests.c index 4baae6a73bb..8646a2fdf1d 100644 --- a/test/core/statistics/census_log_tests.c +++ b/test/core/statistics/census_log_tests.c @@ -31,6 +31,7 @@ * */ +#include "src/core/ext/census/census_log.h" #include #include #include @@ -41,7 +42,6 @@ #include #include #include -#include "src/core/ext/census/census_log.h" #include "test/core/util/test_config.h" /* Fills in 'record' of size 'size'. Each byte in record is filled in with the From 5855c478c69508f000baa4878f515d72b5f5a1e9 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 8 Jun 2016 12:56:56 -0700 Subject: [PATCH 0960/1894] Use poll if not linux, add read notifier pollset support and some groundwork for adding API that allows users to register custom kick signal number --- include/grpc/impl/codegen/port_platform.h | 1 + src/core/lib/iomgr/ev_epoll_linux.c | 72 ++++++++++++++++------- src/core/lib/iomgr/ev_posix.c | 2 +- 3 files changed, 54 insertions(+), 21 deletions(-) diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index be4215a54bf..7a6ec53fb4c 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -189,6 +189,7 @@ #define GPR_GCC_ATOMIC 1 #define GPR_GCC_TLS 1 #define GPR_LINUX 1 +#define GPR_LINUX_EPOLL 1 #define GPR_LINUX_LOG #define GPR_LINUX_MULTIPOLL_WITH_EPOLL 1 #define GPR_POSIX_WAKEUP_FD 1 diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index d5aac96fa46..69ab665e155 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -33,7 +33,7 @@ #include -#ifdef GPR_POSIX_SOCKET +#ifdef GPR_LINUX_EPOLL #include "src/core/lib/iomgr/ev_epoll_linux.h" @@ -60,6 +60,8 @@ struct polling_island; +static int grpc_poller_kick_signum; + /******************************************************************************* * Fd Declarations */ @@ -92,6 +94,9 @@ struct grpc_fd { struct grpc_fd *freelist_next; grpc_closure *on_done_closure; + /* The pollset that last noticed that the fd is readable */ + grpc_pollset *read_notifier_pollset; + grpc_iomgr_object iomgr_object; }; @@ -650,14 +655,15 @@ static grpc_fd *fd_create(int fd, const char *name) { gpr_mu_lock(&new_fd->mu); gpr_atm_rel_store(&new_fd->refst, 1); + new_fd->fd = fd; new_fd->shutdown = false; + new_fd->orphaned = false; new_fd->read_closure = CLOSURE_NOT_READY; new_fd->write_closure = CLOSURE_NOT_READY; - new_fd->fd = fd; new_fd->polling_island = NULL; new_fd->freelist_next = NULL; new_fd->on_done_closure = NULL; - new_fd->orphaned = false; + new_fd->read_notifier_pollset = NULL; gpr_mu_unlock(&new_fd->mu); @@ -765,6 +771,17 @@ static int set_ready_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, } } +static grpc_pollset *fd_get_read_notifier_pollset(grpc_exec_ctx *exec_ctx, + grpc_fd *fd) { + grpc_pollset *notifier = NULL; + + gpr_mu_lock(&fd->mu); + notifier = fd->read_notifier_pollset; + gpr_mu_unlock(&fd->mu); + + return notifier; +} + static void fd_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { gpr_mu_lock(&fd->mu); GPR_ASSERT(!fd->shutdown); @@ -801,16 +818,25 @@ static void sig_handler(int sig_num) { #endif } +static void poller_kick_init() { + grpc_poller_kick_signum = SIGRTMIN + 2; + signal(grpc_poller_kick_signum, sig_handler); +} + /* Global state management */ static void pollset_global_init(void) { grpc_wakeup_fd_init(&grpc_global_wakeup_fd); - signal(SIGUSR1, sig_handler); /* TODO: sreek - Do not hardcode SIGUSR1 */ + poller_kick_init(); } static void pollset_global_shutdown(void) { grpc_wakeup_fd_destroy(&grpc_global_wakeup_fd); } +static void pollset_worker_kick(grpc_pollset_worker *worker) { + pthread_kill(worker->pt_id, grpc_poller_kick_signum); +} + /* Return 1 if the pollset has active threads in pollset_work (pollset must * be locked) */ static int pollset_has_workers(grpc_pollset *p) { @@ -856,7 +882,7 @@ static void pollset_kick(grpc_pollset *p, GPR_TIMER_BEGIN("pollset_kick.broadcast", 0); for (worker = p->root_worker.next; worker != &p->root_worker; worker = worker->next) { - pthread_kill(worker->pt_id, SIGUSR1); + pollset_worker_kick(worker); } } else { p->kicked_without_pollers = true; @@ -864,7 +890,7 @@ static void pollset_kick(grpc_pollset *p, GPR_TIMER_END("pollset_kick.broadcast", 0); } else { GPR_TIMER_MARK("kicked_specifically", 0); - pthread_kill(worker->pt_id, SIGUSR1); + pollset_worker_kick(worker); } } else { GPR_TIMER_MARK("kick_anonymous", 0); @@ -872,7 +898,7 @@ static void pollset_kick(grpc_pollset *p, if (worker != NULL) { GPR_TIMER_MARK("finally_kick", 0); push_back_worker(p, worker); - pthread_kill(worker->pt_id, SIGUSR1); + pollset_worker_kick(worker); } else { GPR_TIMER_MARK("kicked_no_pollers", 0); p->kicked_without_pollers = true; @@ -924,20 +950,20 @@ static int poll_deadline_to_millis_timeout(gpr_timespec deadline, timeout, gpr_time_from_nanos(GPR_NS_PER_MS - 1, GPR_TIMESPAN))); } -static void set_ready(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st) { - /* only one set_ready can be active at once (but there may be a racing - notify_on) */ +static void fd_become_readable(grpc_exec_ctx *exec_ctx, grpc_fd *fd, + grpc_pollset *notifier) { + /* Need the fd->mu since we might be racing with fd_notify_on_read */ gpr_mu_lock(&fd->mu); - set_ready_locked(exec_ctx, fd, st); + set_ready_locked(exec_ctx, fd, &fd->read_closure); + fd->read_notifier_pollset = notifier; gpr_mu_unlock(&fd->mu); } -static void fd_become_readable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { - set_ready(exec_ctx, fd, &fd->read_closure); -} - static void fd_become_writable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { - set_ready(exec_ctx, fd, &fd->write_closure); + /* Need the fd->mu since we might be racing with fd_notify_on_write */ + gpr_mu_lock(&fd->mu); + set_ready_locked(exec_ctx, fd, &fd->write_closure); + gpr_mu_unlock(&fd->mu); } #define GRPC_EPOLL_MAX_EVENTS 1000 @@ -1007,7 +1033,7 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); } else { if (read_ev || cancel) { - fd_become_readable(exec_ctx, fd); + fd_become_readable(exec_ctx, fd, pollset); } if (write_ev || cancel) { fd_become_writable(exec_ctx, fd); @@ -1109,9 +1135,9 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, pollset->kicked_without_pollers = 0; } else if (!pollset->shutting_down) { sigemptyset(&new_mask); - sigaddset(&new_mask, SIGUSR1); + sigaddset(&new_mask, grpc_poller_kick_signum); pthread_sigmask(SIG_BLOCK, &new_mask, &orig_mask); - sigdelset(&orig_mask, SIGUSR1); + sigdelset(&orig_mask, grpc_poller_kick_signum); push_front_worker(pollset, &worker); @@ -1350,6 +1376,7 @@ static const grpc_event_engine_vtable vtable = { .fd_shutdown = fd_shutdown, .fd_notify_on_read = fd_notify_on_read, .fd_notify_on_write = fd_notify_on_write, + .fd_get_read_notifier_pollset = fd_get_read_notifier_pollset, .pollset_init = pollset_init, .pollset_shutdown = pollset_shutdown, @@ -1380,4 +1407,9 @@ const grpc_event_engine_vtable *grpc_init_epoll_linux(void) { return &vtable; } -#endif +#else /* defined(GPR_LINUX_EPOLL) */ +/* If GPR_LINUX_EPOLL is not defined, it means epoll is not available. Return + * NULL */ +const grpc_event_engine_vtable *grpc_init_epoll_linux(void) { return NULL; } + +#endif /* !defined(GPR_LINUX_EPOLL) */ diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index e0c3558a51e..2b15967adcc 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -63,8 +63,8 @@ typedef struct { } event_engine_factory; static const event_engine_factory g_factories[] = { - {"poll", grpc_init_poll_posix}, {"epoll", grpc_init_epoll_linux}, + {"poll", grpc_init_poll_posix}, {"legacy", grpc_init_poll_and_epoll_posix}, }; From 74e6e135e90b1ab47d14f9f835d90e93ba59f533 Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 8 Jun 2016 13:32:16 -0700 Subject: [PATCH 0961/1894] I was trigger-happy with changes to qps_worker in the hope of improving stability. I believe that this change was unneeded and actually may hurt matters by holding a lock for too long. Partially undoes #5444 , particular commit e7042b5 --- test/cpp/qps/client.h | 35 ++++++++++++++++++++++++++--------- 1 file changed, 26 insertions(+), 9 deletions(-) diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 2a89eb80182..047bd164082 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -125,13 +125,15 @@ class Client { if (reset) { Histogram* to_merge = new Histogram[threads_.size()]; for (size_t i = 0; i < threads_.size(); i++) { - threads_[i]->Swap(&to_merge[i]); - latencies.Merge(to_merge[i]); + threads_[i]->BeginSwap(&to_merge[i]); } - delete[] to_merge; - std::unique_ptr timer(new UsageTimer); timer_.swap(timer); + for (size_t i = 0; i < threads_.size(); i++) { + threads_[i]->EndSwap(); + latencies.Merge(to_merge[i]); + } + delete[] to_merge; timer_result = timer->Mark(); } else { // merge snapshots of each thread histogram @@ -213,6 +215,7 @@ class Client { public: Thread(Client* client, size_t idx) : done_(false), + new_stats_(nullptr), client_(client), idx_(idx), impl_(&Thread::ThreadFunc, this) {} @@ -225,9 +228,16 @@ class Client { impl_.join(); } - void Swap(Histogram* n) { + void BeginSwap(Histogram* n) { std::lock_guard g(mu_); - n->Swap(&histogram_); + new_stats_ = n; + } + + void EndSwap() { + std::unique_lock g(mu_); + while (new_stats_ != nullptr) { + cv_.wait(g); + }; } void MergeStatsInto(Histogram* hist) { @@ -241,11 +251,10 @@ class Client { void ThreadFunc() { for (;;) { - // lock since the thread should only be doing one thing at a time - std::lock_guard g(mu_); // run the loop body const bool thread_still_ok = client_->ThreadFunc(&histogram_, idx_); - // see if we're done + // lock, see if we're done + std::lock_guard g(mu_); if (!thread_still_ok) { gpr_log(GPR_ERROR, "Finishing client thread due to RPC error"); done_ = true; @@ -253,11 +262,19 @@ class Client { if (done_) { return; } + // check if we're resetting stats, swap out the histogram if so + if (new_stats_) { + new_stats_->Swap(&histogram_); + new_stats_ = nullptr; + cv_.notify_one(); + } } } std::mutex mu_; + std::condition_variable cv_; bool done_; + Histogram* new_stats_; Histogram histogram_; Client* client_; const size_t idx_; From 485cf40ab7d68b2624a5ab3be3842444f5835f14 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 8 Jun 2016 13:35:25 -0700 Subject: [PATCH 0962/1894] Fixed wrong spec and reworked streaming compressed case --- doc/interop-test-descriptions.md | 36 +++++++++++------------------- test/cpp/interop/interop_client.cc | 17 ++++++++------ 2 files changed, 23 insertions(+), 30 deletions(-) diff --git a/doc/interop-test-descriptions.md b/doc/interop-test-descriptions.md index 7fd21c7022e..6a76acd3a89 100644 --- a/doc/interop-test-descriptions.md +++ b/doc/interop-test-descriptions.md @@ -224,7 +224,7 @@ Procedure: size: 31415 } response_parameters:{ - size: 59 + size: 9 } response_parameters:{ size: 2653 @@ -261,20 +261,19 @@ Procedure: request_compressed_response: bool response_type:COMPRESSABLE response_parameters:{ - size: 31415 - } - response_parameters:{ - size: 59 - } - response_parameters:{ - size: 2653 + size: 31424 } response_parameters:{ - size: 58979 + size: 61632 } } ``` + Note that the `response_parameters` sizes are the sum of the usual streaming + response sizes (31415, 9, 2653, 58979) taken in successive pairs. This way, + we only keep a single list of sizes while making sure the individual message + sizes are large enough to trigger compression in all implementations. + Client asserts: * call was successful * exactly four responses @@ -283,7 +282,7 @@ Procedure: NOT have the compressed message flag set. * if `request_compressed_response` is true, the response's messages MUST have the compressed message flag set. - * response payload bodies are sized (in order): 31415, 59, 2653, 58979 + * response payload bodies are sized (in order): 31424, 61632 * clients are free to assert that the response payload body contents are zero and comparing the entire response messages against golden responses @@ -295,16 +294,10 @@ Procedure: request_compressed_response: bool response_type:UNCOMPRESSABLE response_parameters:{ - size: 31415 - } - response_parameters:{ - size: 59 - } - response_parameters:{ - size: 2653 + size: 31424 } response_parameters:{ - size: 58979 + size: 61632 } } ``` @@ -316,10 +309,7 @@ Procedure: * the response MAY have the compressed message flag set. Some implementations will choose to compress the payload even when the output size if larger than the input. - * response payload bodies are sized (in order): 31415, 59, 2653, 58979 - * clients are free to assert that the body of the responses are identical to - the golden uncompressable data at `test/cpp/interop/rnd.dat`. - + * response payload bodies are sized (in order): 31424, 61632 ### ping_pong @@ -350,7 +340,7 @@ Procedure: { response_type: COMPRESSABLE response_parameters:{ - size: 59 + size: 9 } payload:{ body: 8 bytes of zeros diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index a0479e8f689..7705bb15922 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -58,7 +58,7 @@ namespace testing { namespace { // The same value is defined by the Java client. const std::vector request_stream_sizes = {27182, 8, 1828, 45904}; -const std::vector response_stream_sizes = {31415, 59, 2653, 58979}; +const std::vector response_stream_sizes = {31415, 9, 2653, 58979}; const int kNumResponseMessages = 2000; const int kResponseMessageSize = 1030; const int kReceiveDelayMilliSeconds = 20; @@ -466,10 +466,11 @@ bool InteropClient::DoResponseCompressedStreaming() { request.set_response_type(payload_types[i]); request.set_request_compressed_response(request_compression[j]); - for (size_t k = 0; k < response_stream_sizes.size(); ++k) { + for (size_t k = 0; k < response_stream_sizes.size() / 2; ++k) { ResponseParameters* response_parameter = request.add_response_parameters(); - response_parameter->set_size(response_stream_sizes[k]); + response_parameter->set_size(response_stream_sizes[k] + + response_stream_sizes[k + 1]); } StreamingOutputCallResponse response; @@ -483,7 +484,9 @@ bool InteropClient::DoResponseCompressedStreaming() { switch (response.payload().type()) { case PayloadType::COMPRESSABLE: GPR_ASSERT(response.payload().body() == - grpc::string(response_stream_sizes[k], '\0')); + grpc::string(response_stream_sizes[k] + + response_stream_sizes[k + 1], + '\0')); break; case PayloadType::UNCOMPRESSABLE: break; @@ -513,14 +516,14 @@ bool InteropClient::DoResponseCompressedStreaming() { gpr_log(GPR_DEBUG, "Response streaming done %s.", log_suffix); gpr_free(log_suffix); - if (k < response_stream_sizes.size()) { + if (k < response_stream_sizes.size() / 2) { // stream->Read() failed before reading all the expected messages. This // is most likely due to a connection failure. gpr_log(GPR_ERROR, "DoResponseCompressedStreaming(): Responses read (k=%d) is " "less than the expected messages (i.e " - "response_stream_sizes.size() (%d)). (i=%d, j=%d)", - k, response_stream_sizes.size(), i, j); + "response_stream_sizes.size()/2 (%d)). (i=%d, j=%d)", + k, response_stream_sizes.size() / 2, i, j); return TransientFailureOrAbort(); } From 9065c8b1df3a106947eab71db678e2506aa4af5d Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 8 Jun 2016 14:31:21 -0700 Subject: [PATCH 0963/1894] more changes after offline chat with ejona --- doc/interop-test-descriptions.md | 85 ++++++++------------------------ 1 file changed, 20 insertions(+), 65 deletions(-) diff --git a/doc/interop-test-descriptions.md b/doc/interop-test-descriptions.md index 6a76acd3a89..63b0022c3f6 100644 --- a/doc/interop-test-descriptions.md +++ b/doc/interop-test-descriptions.md @@ -90,11 +90,11 @@ Client asserts: * clients are free to assert that the response payload body contents are zero and comparing the entire response message against a golden response -### large_compressed_unary +### server_compressed_unary -This test verifies compressed unary calls succeed in sending messages. It -sends one unary request for every payload type, with and without requesting a -compressed response from the server. +This test verifies compressed server-only unary calls succeed in sending +messages. It sends one unary request for every payload type, with and without +requesting a compressed response from the server. In all scenarios, whether compression was actually performed is determined by the compression bit in the response's message flags. @@ -103,7 +103,6 @@ the compression bit in the response's message flags. Server features: * [UnaryCall][] * [Compressable Payload][] -* [Uncompressable Payload][] Procedure: 1. Client calls UnaryCall with: @@ -130,26 +129,6 @@ Procedure: zero and comparing the entire response message against a golden response - 2. Client calls UnaryCall with: - ``` - { - request_compressed_response: bool - response_type: UNCOMPRESSABLE - response_size: 314159 - payload:{ - body: 271828 bytes of zeros - } - } - ``` - Client asserts: - * call was successful - * response payload type is UNCOMPRESSABLE - * the response MAY have the compressed message flag set. Some - implementations will choose to compress the payload even when the output - size if larger than the input. - * response payload body is 314159 bytes in size - - ### client_streaming This test verifies that client-only streaming succeeds. @@ -250,7 +229,6 @@ This test verifies that server-only compressed streaming succeeds. Server features: * [StreamingOutputCall][] * [Compressable Payload][] -* [Uncompressable Payload][] Procedure: @@ -258,46 +236,26 @@ Procedure: ``` { - request_compressed_response: bool + request_compressed_response: true response_type:COMPRESSABLE response_parameters:{ - size: 31424 + size: 31415 } response_parameters:{ - size: 61632 + size: 58979 } } ``` - Note that the `response_parameters` sizes are the sum of the usual streaming - response sizes (31415, 9, 2653, 58979) taken in successive pairs. This way, - we only keep a single list of sizes while making sure the individual message - sizes are large enough to trigger compression in all implementations. - - Client asserts: - * call was successful - * exactly four responses - * response payloads are COMPRESSABLE - * if `request_compressed_response` is false, the response's messages MUST - NOT have the compressed message flag set. - * if `request_compressed_response` is true, the response's messages MUST - have the compressed message flag set. - * response payload bodies are sized (in order): 31424, 61632 - * clients are free to assert that the response payload body contents are - zero and comparing the entire response messages against golden responses - - - 2. Client calls StreamingOutputCall with: - ``` { - request_compressed_response: bool - response_type:UNCOMPRESSABLE + request_compressed_response: false + response_type:COMPRESSABLE response_parameters:{ - size: 31424 + size: 31415 } response_parameters:{ - size: 61632 + size: 58979 } } ``` @@ -305,11 +263,15 @@ Procedure: Client asserts: * call was successful * exactly four responses - * response payloads are UNCOMPRESSABLE - * the response MAY have the compressed message flag set. Some - implementations will choose to compress the payload even when the output - size if larger than the input. - * response payload bodies are sized (in order): 31424, 61632 + * response payloads are COMPRESSABLE + * if `request_compressed_response` is false, the response's messages MUST + NOT have the compressed message flag set. + * if `request_compressed_response` is true, the response's messages MUST + have the compressed message flag set. + * response payload bodies are sized (in order): 31415, 58979 + * clients are free to assert that the response payload body contents are + zero and comparing the entire response messages against golden responses + ### ping_pong @@ -910,13 +872,6 @@ When the client requests COMPRESSABLE payload, the response includes a payload of the size requested containing all zeros and the payload type is COMPRESSABLE. -### Uncompressable Payload -[Uncompressable Payload]: #uncompressable-payload - -When the client requests UNCOMPRESSABLE payload, the response includes a payload -of the size requested containing uncompressable data and the payload type is -UNCOMPRESSABLE. - ### Echo Status [Echo Status]: #echo-status When the client sends a response_status in the request payload, the server closes From ac4b3a6e59802f9b84547126c8ac5a09683e5ae1 Mon Sep 17 00:00:00 2001 From: Yang Gao Date: Wed, 8 Jun 2016 15:00:25 -0700 Subject: [PATCH 0964/1894] Create command_line_tool.md --- doc/command_line_tool.md | 77 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 doc/command_line_tool.md diff --git a/doc/command_line_tool.md b/doc/command_line_tool.md new file mode 100644 index 00000000000..eff101b2d4e --- /dev/null +++ b/doc/command_line_tool.md @@ -0,0 +1,77 @@ +# gRPC command line tool + +## Overview + +This document describes the command line tool that comes with gRPC repository. It is desireable to have command line +tools written in other languages to roughly follow the same syntax and flags. + +At this point, the tool needs to be built from source, and it should be moved out to grpc-tools repository as a stand +alone application once it is mature enough. + +## Core funcitonality + +The command line tool can do the following things: + +- Send unary rpc. +- Attach metadata and display received metadata. +- Handle common authentication to server. +- Find the request/response types from a given proto file. +- Read proto request in text form. +- Read request in wire form (for protobuf messages, this means serialized binary form). +- Display proto response in text form. +- Write response in wire form to a file. + +The command line tool should support the following things: + +- List server services and methods through server reflection. +- Infer request/response types from server reflection result. +- Fine-grained auth control (such as, use this oauth token to talk to the server). +- Send streaming rpc. + +## Code location + +To use the tool, you need to get the grpc repository and in the grpc directory call + +``` +make grpc_cli +``` + +The main file can be found at +https://github.com/grpc/grpc/blob/master/test/cpp/util/grpc_cli.cc + +## Usage + +### Basic usage + +Send a rpc to a helloworld server at `localhost:50051`: + +``` +bins/opt/grpc_cli call localhost:50051 SayHello examples/protos/helloworld.proto \ + "name: 'world'" --enable_ssl=false +``` + +On success, the tool will print out + +``` +Rpc succeeded with OK status +Response: + message: "Hello world" +``` + +The `localhost:50051` part indicates the server you are connecting to. `SayHello` is (part of) the +gRPC method string. Then there is the path to the proto file containing the service definition, +if it is not under current directory, you can use `--proto_path` to specify a new search root. +`"name: 'world'"` is the text format of the request proto message. +We are not using ssl here by `--enable_ssl=false`. For information on more +flags, look at the comments of `grpc_cli.cc`. + +### Send non-proto rpc + +For using gRPC with protocols other than probobuf, you will need the exact method name string +and a file containing the raw bytes to be sent on the wire + +``` +bins/opt/grpc_cli call localhost:50051 /helloworld.Greeter/SayHello --input_binary_file=input.bin \ + --output_binary_file=output.bin +``` +On success, you will need to read or decode the response from the `output.bin` file. From cb79b29ac589ba0f17da1588430db4407f73b5f6 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Wed, 8 Jun 2016 15:07:54 -0700 Subject: [PATCH 0965/1894] fix for issue 6344. added printing of .proto file comments in generated code. --- src/compiler/objective_c_generator.cc | 33 ++++++++++++++++++++++++--- 1 file changed, 30 insertions(+), 3 deletions(-) diff --git a/src/compiler/objective_c_generator.cc b/src/compiler/objective_c_generator.cc index 71a674174d7..db0b61ee6f0 100644 --- a/src/compiler/objective_c_generator.cc +++ b/src/compiler/objective_c_generator.cc @@ -60,9 +60,34 @@ void PrintProtoRpcDeclarationAsPragma(Printer *printer, " returns ($server_stream$$response_type$)\n\n"); } +template +static void PrintAllComments(const DescriptorType* desc, Printer* printer) { + std::vector comments; + grpc_generator::GetComment(desc, grpc_generator::COMMENTTYPE_LEADING_DETACHED, + &comments); + grpc_generator::GetComment(desc, grpc_generator::COMMENTTYPE_LEADING, + &comments); + grpc_generator::GetComment(desc, grpc_generator::COMMENTTYPE_TRAILING, + &comments); + if (comments.empty()) { + return; + } + printer->Print("/**\n"); + for (auto it = comments.begin(); it != comments.end(); ++it) { + printer->Print(" * "); + size_t start_pos = it->find_first_not_of(' '); + if (start_pos != grpc::string::npos) { + printer->Print(it->c_str() + start_pos); + } + printer->Print("\n"); + } + printer->Print(" */\n"); +} + void PrintMethodSignature(Printer *printer, const MethodDescriptor *method, const map< ::grpc::string, ::grpc::string> &vars) { - // TODO(jcanizales): Print method comments. + // Print comment + PrintAllComments(method, printer); printer->Print(vars, "- ($return_type$)$method_name$With"); if (method->client_streaming()) { @@ -195,8 +220,10 @@ void PrintMethodImplementations(Printer *printer, printer.Print("@end\n\n"); printer.Print( - "// Basic service implementation, over gRPC, that only does" - " marshalling and parsing.\n"); + "/**\n" + " * Basic service implementation, over gRPC, that only does\n" + " * marshalling and parsing.\n" + " */\n"); printer.Print(vars, "@interface $service_class$ :" " GRPCProtoService<$service_class$>\n"); From 24b1062f42ef01bd47a458e94423f068ec1765f0 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 8 Jun 2016 15:20:17 -0700 Subject: [PATCH 0966/1894] Do not close epoll_fd while there are any pollers and add the ability to wake up all pollers when an island is merged --- src/core/lib/iomgr/ev_epoll_linux.c | 113 ++++++++++++++++++++-------- 1 file changed, 80 insertions(+), 33 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 69ab665e155..3a3c136a5aa 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -190,9 +190,18 @@ struct grpc_pollset_set { }; /******************************************************************************* - * Polling-island Definitions + * Polling island Definitions */ +/* The wakeup fd that is used to wake up all threads in a Polling island. This + is useful in the polling island merge operation where we need to wakeup all + the threads currently polling the smaller polling island (so that they can + start polling the new/merged polling island) + + NOTE: This fd is initialized to be readable and MUST NOT be consumed i.e the + threads that woke up MUST NOT call grpc_wakeup_fd_consume_wakeup() */ +static grpc_wakeup_fd polling_island_wakeup_fd; + /* Polling island freelist */ static gpr_mu g_pi_freelist_mu; static polling_island *g_pi_freelist = NULL; @@ -232,6 +241,25 @@ static void polling_island_add_fds_locked(polling_island *pi, grpc_fd **fds, } } +/* The caller is expected to hold pi->mu before calling this */ +static void polling_island_add_wakeup_fd_locked(polling_island *pi, + grpc_wakeup_fd *wakeup_fd) { + struct epoll_event ev; + int err; + + ev.events = (uint32_t)(EPOLLIN | EPOLLET); + ev.data.ptr = wakeup_fd; + err = epoll_ctl(pi->epoll_fd, EPOLL_CTL_ADD, + GRPC_WAKEUP_FD_GET_READ_FD(wakeup_fd), &ev); + if (err < 0) { + gpr_log(GPR_ERROR, + "Failed to add grpc_wake_up_fd (%d) to the epoll set (epoll_fd: %d)" + ". Error: %s", + GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd), pi->epoll_fd, + strerror(errno)); + } +} + /* The caller is expected to hold pi->mu lock before calling this function */ static void polling_island_remove_all_fds_locked(polling_island *pi, bool remove_fd_refs) { @@ -283,8 +311,6 @@ static void polling_island_remove_fd_locked(polling_island *pi, grpc_fd *fd, static polling_island *polling_island_create(grpc_fd *initial_fd, int initial_ref_cnt) { polling_island *pi = NULL; - struct epoll_event ev; - int err; /* Try to get one from the polling island freelist */ gpr_mu_lock(&g_pi_freelist_mu); @@ -311,17 +337,7 @@ static polling_island *polling_island_create(grpc_fd *initial_fd, } GPR_ASSERT(pi->epoll_fd >= 0); - ev.events = (uint32_t)(EPOLLIN | EPOLLET); - ev.data.ptr = NULL; - err = epoll_ctl(pi->epoll_fd, EPOLL_CTL_ADD, - GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd), &ev); - if (err < 0) { - gpr_log(GPR_ERROR, - "Failed to add grpc_global_wake_up_fd (%d) to the epoll set " - "(epoll_fd: %d) with error: %s", - GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd), pi->epoll_fd, - strerror(errno)); - } + polling_island_add_wakeup_fd_locked(pi, &grpc_global_wakeup_fd); pi->ref_cnt = initial_ref_cnt; pi->merged_to = NULL; @@ -496,13 +512,15 @@ polling_island *polling_island_merge(polling_island *p, polling_island *q) { GPR_SWAP(polling_island *, p, q); } - /* "Merge" p with q i.e move all the fds from p (the polling_island with fewer - fds) to q. - Note: Not altering the ref counts on the affected fds here because they - would effectively remain unchanged */ + /* "Merge" p with q i.e move all the fds from p (The one with fewer fds) to q + )Note that the refcounts on the fds being moved will not change here. This + is why the last parameter in the following two functions is 'false') */ polling_island_add_fds_locked(q, p->fds, p->fd_cnt, false); polling_island_remove_all_fds_locked(p, false); + /* Wakeup all the pollers (if any) on p so that they can pickup this change */ + polling_island_add_wakeup_fd_locked(p, &polling_island_wakeup_fd); + /* The merged polling island inherits all the ref counts of the island merging with it */ q->ref_cnt += p->ref_cnt; @@ -516,6 +534,8 @@ polling_island *polling_island_merge(polling_island *p, polling_island *q) { static void polling_island_global_init() { gpr_mu_init(&g_pi_freelist_mu); g_pi_freelist = NULL; + grpc_wakeup_fd_init(&polling_island_wakeup_fd); + grpc_wakeup_fd_wakeup(&polling_island_wakeup_fd); } static void polling_island_global_shutdown() { @@ -529,8 +549,9 @@ static void polling_island_global_shutdown() { gpr_free(g_pi_freelist); g_pi_freelist = next; } - gpr_mu_destroy(&g_pi_freelist_mu); + + grpc_wakeup_fd_destroy(&polling_island_wakeup_fd); } /******************************************************************************* @@ -973,6 +994,7 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, struct epoll_event ep_ev[GRPC_EPOLL_MAX_EVENTS]; int epoll_fd = -1; int ep_rv; + polling_island *pi = NULL; GPR_TIMER_BEGIN("pollset_work_and_unlock", 0); /* We need to get the epoll_fd to wait on. The epoll_fd is in inside the @@ -983,13 +1005,19 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, - pollset->polling_island->mu */ gpr_mu_lock(&pollset->pi_mu); - if (pollset->polling_island == NULL) { - pollset->polling_island = polling_island_create(NULL, 1); + pi = pollset->polling_island; + if (pi == NULL) { + pi = polling_island_create(NULL, 1); } - pollset->polling_island = - polling_island_update_and_lock(pollset->polling_island, 1, 0); - epoll_fd = pollset->polling_island->epoll_fd; + /* In addition to locking the polling island, add a ref so that the island + does not get destroyed (which means the epoll_fd won't be closed) while + we are are doing an epoll_wait() on the epoll_fd */ + pi = polling_island_update_and_lock(pi, 1, 1); + epoll_fd = pi->epoll_fd; + + /* Update the pollset->polling_island */ + pollset->polling_island = pi; #ifdef GRPC_EPOLL_DEBUG if (pollset->polling_island->fd_cnt == 0) { @@ -1013,25 +1041,29 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, sig_mask); if (ep_rv < 0) { if (errno != EINTR) { - /* TODO (sreek) - Do not log an error in case of bad file descriptor - * (A bad file descriptor here would just mean that the epoll set was - * merged with another epoll set and that the current epoll_fd is - * closed) */ gpr_log(GPR_ERROR, "epoll_pwait() failed: %s", strerror(errno)); } else { + /* We were interrupted. Save an interation by doing a zero timeout + epoll_wait to see if there are any other events of interest */ ep_rv = epoll_wait(epoll_fd, ep_ev, GRPC_EPOLL_MAX_EVENTS, 0); } } int i; for (i = 0; i < ep_rv; ++i) { - grpc_fd *fd = ep_ev[i].data.ptr; - int cancel = ep_ev[i].events & (EPOLLERR | EPOLLHUP); - int read_ev = ep_ev[i].events & (EPOLLIN | EPOLLPRI); - int write_ev = ep_ev[i].events & EPOLLOUT; - if (fd == NULL) { + void *data_ptr = ep_ev[i].data.ptr; + if (data_ptr == &grpc_global_wakeup_fd) { grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); + } else if (data_ptr == &polling_island_wakeup_fd) { + /* This means that our polling island is merged with a different + island. We do not have to do anything here since the subsequent call + to the function pollset_work_and_unlock() will pick up the correct + epoll_fd */ } else { + grpc_fd *fd = data_ptr; + int cancel = ep_ev[i].events & (EPOLLERR | EPOLLHUP); + int read_ev = ep_ev[i].events & (EPOLLIN | EPOLLPRI); + int write_ev = ep_ev[i].events & EPOLLOUT; if (read_ev || cancel) { fd_become_readable(exec_ctx, fd, pollset); } @@ -1041,6 +1073,21 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, } } } while (ep_rv == GRPC_EPOLL_MAX_EVENTS); + + GPR_ASSERT(pi != NULL); + + /* Before leaving, release the extra ref we added to the polling island */ + /* It is important to note that at this point 'pi' may not be the same as + * pollset->polling_island. This is because pollset->polling_island pointer + * gets updated whenever the underlying polling island is merged with another + * island and while we are doing epoll_wait() above, the polling island may + * have been merged */ + + /* TODO (sreek) - Change the ref count on polling island to gpr_atm so that + * we do not have to do this here */ + gpr_mu_lock(&pi->mu); + polling_island_unref_and_unlock(pi, 1); + GPR_TIMER_END("pollset_work_and_unlock", 0); } From e682e46a9e451a94cfcb1cf9c927185abd81fceb Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 8 Jun 2016 15:40:21 -0700 Subject: [PATCH 0967/1894] Add TODOs --- src/core/lib/iomgr/ev_epoll_linux.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 3a3c136a5aa..2e871a4f1ba 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -83,6 +83,7 @@ struct grpc_fd { this indicates that the 'fd' on this structure is no longer valid */ bool orphaned; + /* TODO: sreek - Move this a lockfree implementation */ grpc_closure *read_closure; grpc_closure *write_closure; @@ -166,6 +167,9 @@ struct grpc_pollset { /* The polling island to which this pollset belongs to and the mutex protecting the field */ + /* TODO: sreek: This lock might actually be adding more overhead to the + critical path (i.e pollset_work() function). Consider removing this lock + and just using the overall pollset lock */ gpr_mu pi_mu; struct polling_island *polling_island; }; From 3dbf4d61b26e2364a974e47f16f3a655d3eda908 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 8 Jun 2016 16:26:45 -0700 Subject: [PATCH 0968/1894] More TODOs --- src/core/lib/iomgr/ev_epoll_linux.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 2e871a4f1ba..046ec5e7407 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -83,7 +83,7 @@ struct grpc_fd { this indicates that the 'fd' on this structure is no longer valid */ bool orphaned; - /* TODO: sreek - Move this a lockfree implementation */ + /* TODO: sreek - Move this to a lockfree implementation */ grpc_closure *read_closure; grpc_closure *write_closure; @@ -124,6 +124,8 @@ static void fd_global_shutdown(void); /******************************************************************************* * Polling-island Declarations */ +/* TODO: sree: Consider making ref_cnt and merged_to to gpr_atm - This would + * significantly reduce the number of mutex acquisition calls. */ typedef struct polling_island { gpr_mu mu; int ref_cnt; @@ -177,6 +179,12 @@ struct grpc_pollset { /******************************************************************************* * Pollset-set Declarations */ +/* TODO: sreek - Change the pollset_set implementation such that a pollset_set + * directly points to a polling_island (and adding an fd/pollset/pollset_set to + * the current pollset_set would result in polling island merges. This would + * remove the need to maintain fd_count here. This will also significantly + * simplify the grpc_fd structure since we would no longer need to explicitly + * maintain the orphaned state */ struct grpc_pollset_set { gpr_mu mu; From e27d189f2165e904dbb3d61616edf3c643df71f0 Mon Sep 17 00:00:00 2001 From: David Klempner Date: Thu, 19 May 2016 13:50:16 -0700 Subject: [PATCH 0969/1894] Factor out json seriailzation code and move it into parse_json. This is for the same reasons as ParseJson, that is so that we can limit the scope of the proto namespace differences between internal and external. --- Makefile | 6 +++--- build.yaml | 5 ++--- test/cpp/qps/parse_json.cc | 15 +++++++++++++++ test/cpp/qps/parse_json.h | 3 +++ test/cpp/qps/report.cc | 18 +++--------------- tools/run_tests/sources_and_headers.json | 9 ++++----- vsprojects/vcxproj/qps/qps.vcxproj | 3 +++ vsprojects/vcxproj/qps/qps.vcxproj.filters | 6 ++++++ .../qps_json_driver/qps_json_driver.vcxproj | 5 ----- .../qps_json_driver.vcxproj.filters | 8 -------- 10 files changed, 39 insertions(+), 39 deletions(-) diff --git a/Makefile b/Makefile index fdbedfd276e..a2815ff6635 100644 --- a/Makefile +++ b/Makefile @@ -4255,6 +4255,7 @@ LIBQPS_SRC = \ test/cpp/qps/client_sync.cc \ test/cpp/qps/driver.cc \ test/cpp/qps/limit_cores.cc \ + test/cpp/qps/parse_json.cc \ test/cpp/qps/qps_worker.cc \ test/cpp/qps/report.cc \ test/cpp/qps/server_async.cc \ @@ -4310,6 +4311,7 @@ $(OBJDIR)/$(CONFIG)/test/cpp/qps/client_async.o: $(GENDIR)/src/proto/grpc/testin $(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/limit_cores.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 @@ -11331,7 +11333,6 @@ endif QPS_JSON_DRIVER_SRC = \ - test/cpp/qps/parse_json.cc \ test/cpp/qps/qps_json_driver.cc \ QPS_JSON_DRIVER_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(QPS_JSON_DRIVER_SRC)))) @@ -11363,8 +11364,6 @@ endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/qps/parse_json.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a - $(OBJDIR)/$(CONFIG)/test/cpp/qps/qps_json_driver.o: $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a deps_qps_json_driver: $(QPS_JSON_DRIVER_OBJS:.o=.dep) @@ -14577,6 +14576,7 @@ test/cpp/qps/client_async.cc: $(OPENSSL_DEP) test/cpp/qps/client_sync.cc: $(OPENSSL_DEP) test/cpp/qps/driver.cc: $(OPENSSL_DEP) test/cpp/qps/limit_cores.cc: $(OPENSSL_DEP) +test/cpp/qps/parse_json.cc: $(OPENSSL_DEP) test/cpp/qps/qps_worker.cc: $(OPENSSL_DEP) test/cpp/qps/report.cc: $(OPENSSL_DEP) test/cpp/qps/server_async.cc: $(OPENSSL_DEP) diff --git a/build.yaml b/build.yaml index 8c09c55335b..75d21b556d6 100644 --- a/build.yaml +++ b/build.yaml @@ -1120,6 +1120,7 @@ libs: - test/cpp/qps/histogram.h - test/cpp/qps/interarrival.h - test/cpp/qps/limit_cores.h + - test/cpp/qps/parse_json.h - test/cpp/qps/qps_worker.h - test/cpp/qps/report.h - test/cpp/qps/server.h @@ -1136,6 +1137,7 @@ libs: - test/cpp/qps/client_sync.cc - test/cpp/qps/driver.cc - test/cpp/qps/limit_cores.cc + - test/cpp/qps/parse_json.cc - test/cpp/qps/qps_worker.cc - test/cpp/qps/report.cc - test/cpp/qps/server_async.cc @@ -2811,10 +2813,7 @@ targets: build: test run: false language: c++ - headers: - - test/cpp/qps/parse_json.h src: - - test/cpp/qps/parse_json.cc - test/cpp/qps/qps_json_driver.cc deps: - qps diff --git a/test/cpp/qps/parse_json.cc b/test/cpp/qps/parse_json.cc index a90bf6153c6..be804281f81 100644 --- a/test/cpp/qps/parse_json.cc +++ b/test/cpp/qps/parse_json.cc @@ -61,5 +61,20 @@ void ParseJson(const grpc::string& json, const grpc::string& type, GPR_ASSERT(msg->ParseFromString(binary)); } +grpc::string SerializeJson(const GRPC_CUSTOM_MESSAGE& msg, + const grpc::string& type) { + std::unique_ptr type_resolver( + google::protobuf::util::NewTypeResolverForDescriptorPool( + "type.googleapis.com", + google::protobuf::DescriptorPool::generated_pool())); + grpc::string binary; + grpc::string json_string; + msg.SerializeToString(&binary); + auto status = + BinaryToJsonString(type_resolver.get(), type, binary, &json_string); + GPR_ASSERT(status.ok()); + return json_string; +} + } // testing } // grpc diff --git a/test/cpp/qps/parse_json.h b/test/cpp/qps/parse_json.h index 42d7d22c53c..ce1821f961d 100644 --- a/test/cpp/qps/parse_json.h +++ b/test/cpp/qps/parse_json.h @@ -43,6 +43,9 @@ namespace testing { void ParseJson(const grpc::string& json, const grpc::string& type, GRPC_CUSTOM_MESSAGE* msg); +grpc::string SerializeJson(const GRPC_CUSTOM_MESSAGE& msg, + const grpc::string& type); + } // testing } // grpc diff --git a/test/cpp/qps/report.cc b/test/cpp/qps/report.cc index 3ae41399cfc..2ec7d8676c2 100644 --- a/test/cpp/qps/report.cc +++ b/test/cpp/qps/report.cc @@ -35,11 +35,9 @@ #include -#include -#include - #include #include "test/cpp/qps/driver.h" +#include "test/cpp/qps/parse_json.h" #include "test/cpp/qps/stats.h" namespace grpc { @@ -104,18 +102,8 @@ void GprLogReporter::ReportTimes(const ScenarioResult& result) { } void JsonReporter::ReportQPS(const ScenarioResult& result) { - std::unique_ptr type_resolver( - google::protobuf::util::NewTypeResolverForDescriptorPool( - "type.googleapis.com", - google::protobuf::DescriptorPool::generated_pool())); - grpc::string binary; - grpc::string json_string; - result.SerializeToString(&binary); - auto status = BinaryToJsonString( - type_resolver.get(), "type.googleapis.com/grpc.testing.ScenarioResult", - binary, &json_string); - GPR_ASSERT(status.ok()); - + grpc::string json_string = + SerializeJson(result, "type.googleapis.com/grpc.testing.ScenarioResult"); std::ofstream output_file(report_file_); output_file << json_string; output_file.close(); diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 325aca18a76..b1e0126542b 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -2361,14 +2361,10 @@ "grpc_test_util", "qps" ], - "headers": [ - "test/cpp/qps/parse_json.h" - ], + "headers": [], "language": "c++", "name": "qps_json_driver", "src": [ - "test/cpp/qps/parse_json.cc", - "test/cpp/qps/parse_json.h", "test/cpp/qps/qps_json_driver.cc" ], "third_party": false, @@ -4546,6 +4542,7 @@ "test/cpp/qps/histogram.h", "test/cpp/qps/interarrival.h", "test/cpp/qps/limit_cores.h", + "test/cpp/qps/parse_json.h", "test/cpp/qps/qps_worker.h", "test/cpp/qps/report.h", "test/cpp/qps/server.h", @@ -4565,6 +4562,8 @@ "test/cpp/qps/interarrival.h", "test/cpp/qps/limit_cores.cc", "test/cpp/qps/limit_cores.h", + "test/cpp/qps/parse_json.cc", + "test/cpp/qps/parse_json.h", "test/cpp/qps/qps_worker.cc", "test/cpp/qps/qps_worker.h", "test/cpp/qps/report.cc", diff --git a/vsprojects/vcxproj/qps/qps.vcxproj b/vsprojects/vcxproj/qps/qps.vcxproj index 32413625ed3..004cf7c9f0e 100644 --- a/vsprojects/vcxproj/qps/qps.vcxproj +++ b/vsprojects/vcxproj/qps/qps.vcxproj @@ -152,6 +152,7 @@ + @@ -208,6 +209,8 @@ + + diff --git a/vsprojects/vcxproj/qps/qps.vcxproj.filters b/vsprojects/vcxproj/qps/qps.vcxproj.filters index 54d438f5363..d3a440ba730 100644 --- a/vsprojects/vcxproj/qps/qps.vcxproj.filters +++ b/vsprojects/vcxproj/qps/qps.vcxproj.filters @@ -28,6 +28,9 @@ test\cpp\qps + + test\cpp\qps + test\cpp\qps @@ -63,6 +66,9 @@ test\cpp\qps + + test\cpp\qps + test\cpp\qps diff --git a/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj b/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj index 3884c102365..d1dea3ec4ae 100644 --- a/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj +++ b/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj @@ -160,11 +160,6 @@ - - - - - diff --git a/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj.filters b/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj.filters index cde967fc27c..62b9be85cc3 100644 --- a/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj.filters +++ b/vsprojects/vcxproj/test/qps_json_driver/qps_json_driver.vcxproj.filters @@ -1,18 +1,10 @@ - - test\cpp\qps - test\cpp\qps - - - test\cpp\qps - - From 2bdde23c25b2df3f5b94100226ca2957e4e2cba4 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Wed, 8 Jun 2016 17:45:19 -0700 Subject: [PATCH 0970/1894] Remove zu specifiers --- .../ext/transport/chttp2/transport/bin_decoder.c | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/bin_decoder.c b/src/core/ext/transport/chttp2/transport/bin_decoder.c index 38b5e46949b..2d90b01cd8b 100644 --- a/src/core/ext/transport/chttp2/transport/bin_decoder.c +++ b/src/core/ext/transport/chttp2/transport/bin_decoder.c @@ -151,9 +151,9 @@ gpr_slice grpc_chttp2_base64_decode(gpr_slice input) { if (input_length % 4 != 0) { gpr_log(GPR_ERROR, "Base64 decoding failed, input of " - "grpc_chttp2_base64_decode has a length of %zu, which is not a " + "grpc_chttp2_base64_decode has a length of %d, which is not a " "multiple of 4.\n", - input_length); + (int)input_length); return gpr_empty_slice(); } @@ -196,18 +196,19 @@ gpr_slice grpc_chttp2_base64_decode_with_length(gpr_slice input, if (input_length % 4 == 1) { gpr_log(GPR_ERROR, "Base64 decoding failed, input of " - "grpc_chttp2_base64_decode_with_length has a length of %zu, which " + "grpc_chttp2_base64_decode_with_length has a length of %d, which " "has a tail of 1 byte.\n", - input_length); + (int)input_length); gpr_slice_unref(output); return gpr_empty_slice(); } if (output_length > input_length / 4 * 3 + tail_xtra[input_length % 4]) { gpr_log(GPR_ERROR, - "Base64 decoding failed, output_length %zu is longer " - "than the max possible output length %zu.\n", - output_length, input_length / 4 * 3 + tail_xtra[input_length % 4]); + "Base64 decoding failed, output_length %d is longer " + "than the max possible output length %d.\n", + (int)output_length, + (int)(input_length / 4 * 3 + tail_xtra[input_length % 4])); gpr_slice_unref(output); return gpr_empty_slice(); } From 82c3dd1f0a96944122d3a0e40242d592a2c7db64 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Wed, 8 Jun 2016 16:56:00 -0700 Subject: [PATCH 0971/1894] Add usage documentation to Python tools distribution --- tools/distrib/python/grpcio_tools/README.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tools/distrib/python/grpcio_tools/README.rst b/tools/distrib/python/grpcio_tools/README.rst index 10d2fe8c309..e9f137493ba 100644 --- a/tools/distrib/python/grpcio_tools/README.rst +++ b/tools/distrib/python/grpcio_tools/README.rst @@ -126,3 +126,13 @@ Help, I ... GCC 6.0), this is probably a bug where GCC chokes on constant expressions when the :code:`-fwrapv` flag is specified. You should consider setting your environment with :code:`CFLAGS=-fno-wrapv` or using clang (:code:`CC=clang`). + +Usage +----- + +Given protobuf include directories :code:`$INCLUDE`, an output directory +:code:`$OUTPUT`, and proto files :code:`$PROTO_FILES`, invoke as: + +:: + + $ python -m grpc.tools.protoc -I$INCLUDE --python_out=$OUTPUT --grpc_python_out=$OUTPUT $PROTO_FILES From 5842277ecbbbe694a828bd51934a28673f2f0a7f Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Mon, 25 Apr 2016 11:08:19 -0700 Subject: [PATCH 0972/1894] Make BoringSSL work with frameworks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cocoapods 1.0 keeps the directory structure of the public headers when creating a dynamic framework, so if we keep the header_mappings_dir as it was, includes would need to be of the form #include This means our header_mappings_dir has to be ‘include/openssl’ instead of ‘include’. Which in turn means that, for static libraries, we have to tell Cocoapods to prepend an ‘openssl’ directory to the headers. We do that with the ‘header_dir’ attribute of the podspec. --- src/objective-c/BoringSSL.podspec | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/src/objective-c/BoringSSL.podspec b/src/objective-c/BoringSSL.podspec index 4a6df910a75..3cd067e5d19 100644 --- a/src/objective-c/BoringSSL.podspec +++ b/src/objective-c/BoringSSL.podspec @@ -31,7 +31,7 @@ Pod::Spec.new do |s| s.name = 'BoringSSL' - s.version = '2.0' + s.version = '3.0' s.summary = 'BoringSSL is a fork of OpenSSL that is designed to meet Google’s needs.' # Adapted from the homepage: s.description = <<-DESC @@ -69,15 +69,19 @@ Pod::Spec.new do |s| s.source = { :git => 'https://boringssl.googlesource.com/boringssl', :tag => 'version_for_cocoapods_2.0' } + name = 'openssl' + s.module_name = name + s.header_dir = name + s.source_files = 'ssl/*.{h,c}', 'ssl/**/*.{h,c}', '*.{h,c}', 'crypto/*.{h,c}', 'crypto/**/*.{h,c}', 'include/openssl/*.h' - s.public_header_files = 'include/openssl/*.h' - s.header_mappings_dir = 'include' + s.header_mappings_dir = 'include/openssl' + s.module_map = 'include/openssl/module.modulemap' s.exclude_files = "**/*_test.*" @@ -92,6 +96,25 @@ Pod::Spec.new do |s| # included it in every bridged header). sed -E -i '.back' 's/\\*I,/*i,/g' include/openssl/rsa.h + # Replace `#include "../crypto/internal.h"` in e_tls.c with `#include "../internal.h"`. The + # former assumes crypto/ is in the headers search path, which is hard to enforce when using + # dynamic frameworks. The latters always works, being relative to the current file. + sed -E -i '.back' 's/crypto\\///g' crypto/cipher/e_tls.c + + # Add a module map and an umbrella header + cat > include/openssl/umbrella.h < include/openssl/module.modulemap < Date: Fri, 3 Jun 2016 17:33:18 -0700 Subject: [PATCH 0973/1894] Remove #include from BoringSSL MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Apple hasn’t created a module map for that system header, which means it can’t be used from frameworks. --- src/objective-c/BoringSSL.podspec | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/objective-c/BoringSSL.podspec b/src/objective-c/BoringSSL.podspec index 3cd067e5d19..1954a5c089b 100644 --- a/src/objective-c/BoringSSL.podspec +++ b/src/objective-c/BoringSSL.podspec @@ -115,6 +115,16 @@ Pod::Spec.new do |s| } EOF + # #include fails to compile when building a dynamic framework. libgit2 in + # https://github.com/libgit2/libgit2/commit/1ddada422caf8e72ba97dca2568d2bf879fed5f2 and libvpx + # in https://chromium.googlesource.com/webm/libvpx/+/1bec0c5a7e885ec792f6bb658eb3f34ad8f37b15 + # work around it by removing the include. We need four of its macros, so we expand them here. + sed -E -i '.back' '//d' include/openssl/bn.h + sed -E -i '.back' 's/PRIu32/"u"/g' include/openssl/bn.h + sed -E -i '.back' 's/PRIx32/"x"/g' include/openssl/bn.h + sed -E -i '.back' 's/PRIu64/"llu"/g' include/openssl/bn.h + sed -E -i '.back' 's/PRIx64/"llx"/g' include/openssl/bn.h + # This is a bit ridiculous, but requiring people to install Go in order to build is slightly # more ridiculous IMO. To save you from scrolling, this is the last part of the podspec. # TODO(jcanizales): Translate err_data_generate.go into a Bash or Ruby script. From e487a7271d21f60f1472a9c24ad3f026e048653c Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Sat, 30 Apr 2016 12:05:26 -0700 Subject: [PATCH 0974/1894] Separate Core, ProtoRuntime, and RxLibrary subspecs --- gRPC-Core.podspec | 658 ++++++++++++++++++ gRPC-ProtoRPC.podspec | 69 ++ gRPC-RxLibrary.podspec | 62 ++ gRPC.podspec | 651 +---------------- src/objective-c/tests/Podfile | 3 + ...ec.template => gRPC-Core.podspec.template} | 89 +-- 6 files changed, 838 insertions(+), 694 deletions(-) create mode 100644 gRPC-Core.podspec create mode 100644 gRPC-ProtoRPC.podspec create mode 100644 gRPC-RxLibrary.podspec rename templates/{gRPC.podspec.template => gRPC-Core.podspec.template} (51%) diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec new file mode 100644 index 00000000000..c924ab3a5df --- /dev/null +++ b/gRPC-Core.podspec @@ -0,0 +1,658 @@ +# GRPC CocoaPods podspec +# This file has been automatically generated from a template file. +# Please look at the templates directory instead. +# This file can be regenerated from the template by running +# tools/buildgen/generate_projects.sh + +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +Pod::Spec.new do |s| + s.name = 'gRPC-Core' + version = '0.14.0' + s.version = version + s.summary = 'Core cross-platform gRPC library, written in C' + s.homepage = 'http://www.grpc.io' + s.license = 'New BSD' + s.authors = { 'The gRPC contributors' => 'grpc-packages@google.com' } + + s.source = { + :git => 'https://github.com/grpc/grpc.git', + :tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}", + } + + s.ios.deployment_target = '7.1' + s.osx.deployment_target = '10.9' + s.requires_arc = false + + name = 'grpc' + s.module_name = name + s.header_dir = name + + s.source_files = 'src/core/lib/profiling/timers.h', + 'src/core/lib/support/backoff.h', + 'src/core/lib/support/block_annotate.h', + 'src/core/lib/support/env.h', + 'src/core/lib/support/load_file.h', + 'src/core/lib/support/murmur_hash.h', + 'src/core/lib/support/stack_lockfree.h', + 'src/core/lib/support/string.h', + 'src/core/lib/support/string_win32.h', + 'src/core/lib/support/thd_internal.h', + 'src/core/lib/support/time_precise.h', + 'src/core/lib/support/tmpfile.h', + 'include/grpc/support/alloc.h', + 'include/grpc/support/atm.h', + 'include/grpc/support/atm_gcc_atomic.h', + 'include/grpc/support/atm_gcc_sync.h', + 'include/grpc/support/atm_win32.h', + 'include/grpc/support/avl.h', + 'include/grpc/support/cmdline.h', + 'include/grpc/support/cpu.h', + 'include/grpc/support/histogram.h', + 'include/grpc/support/host_port.h', + 'include/grpc/support/log.h', + 'include/grpc/support/log_win32.h', + 'include/grpc/support/port_platform.h', + 'include/grpc/support/slice.h', + 'include/grpc/support/slice_buffer.h', + 'include/grpc/support/string_util.h', + 'include/grpc/support/subprocess.h', + 'include/grpc/support/sync.h', + 'include/grpc/support/sync_generic.h', + 'include/grpc/support/sync_posix.h', + 'include/grpc/support/sync_win32.h', + 'include/grpc/support/thd.h', + 'include/grpc/support/time.h', + 'include/grpc/support/tls.h', + 'include/grpc/support/tls_gcc.h', + 'include/grpc/support/tls_msvc.h', + 'include/grpc/support/tls_pthread.h', + 'include/grpc/support/useful.h', + 'include/grpc/impl/codegen/alloc.h', + 'include/grpc/impl/codegen/atm.h', + 'include/grpc/impl/codegen/atm_gcc_atomic.h', + 'include/grpc/impl/codegen/atm_gcc_sync.h', + 'include/grpc/impl/codegen/atm_win32.h', + 'include/grpc/impl/codegen/log.h', + 'include/grpc/impl/codegen/port_platform.h', + 'include/grpc/impl/codegen/slice.h', + 'include/grpc/impl/codegen/slice_buffer.h', + 'include/grpc/impl/codegen/sync.h', + 'include/grpc/impl/codegen/sync_generic.h', + 'include/grpc/impl/codegen/sync_posix.h', + 'include/grpc/impl/codegen/sync_win32.h', + 'include/grpc/impl/codegen/time.h', + 'src/core/lib/profiling/basic_timers.c', + 'src/core/lib/profiling/stap_timers.c', + 'src/core/lib/support/alloc.c', + 'src/core/lib/support/avl.c', + 'src/core/lib/support/backoff.c', + 'src/core/lib/support/cmdline.c', + 'src/core/lib/support/cpu_iphone.c', + 'src/core/lib/support/cpu_linux.c', + 'src/core/lib/support/cpu_posix.c', + 'src/core/lib/support/cpu_windows.c', + 'src/core/lib/support/env_linux.c', + 'src/core/lib/support/env_posix.c', + 'src/core/lib/support/env_win32.c', + 'src/core/lib/support/histogram.c', + 'src/core/lib/support/host_port.c', + 'src/core/lib/support/load_file.c', + 'src/core/lib/support/log.c', + 'src/core/lib/support/log_android.c', + 'src/core/lib/support/log_linux.c', + 'src/core/lib/support/log_posix.c', + 'src/core/lib/support/log_win32.c', + 'src/core/lib/support/murmur_hash.c', + 'src/core/lib/support/slice.c', + 'src/core/lib/support/slice_buffer.c', + 'src/core/lib/support/stack_lockfree.c', + 'src/core/lib/support/string.c', + 'src/core/lib/support/string_posix.c', + 'src/core/lib/support/string_util_win32.c', + 'src/core/lib/support/string_win32.c', + 'src/core/lib/support/subprocess_posix.c', + 'src/core/lib/support/subprocess_windows.c', + 'src/core/lib/support/sync.c', + 'src/core/lib/support/sync_posix.c', + 'src/core/lib/support/sync_win32.c', + 'src/core/lib/support/thd.c', + 'src/core/lib/support/thd_posix.c', + 'src/core/lib/support/thd_win32.c', + 'src/core/lib/support/time.c', + 'src/core/lib/support/time_posix.c', + 'src/core/lib/support/time_precise.c', + 'src/core/lib/support/time_win32.c', + 'src/core/lib/support/tls_pthread.c', + 'src/core/lib/support/tmpfile_msys.c', + 'src/core/lib/support/tmpfile_posix.c', + 'src/core/lib/support/tmpfile_win32.c', + 'src/core/lib/support/wrap_memcpy.c', + '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/compress_filter.h', + 'src/core/lib/channel/connected_channel.h', + 'src/core/lib/channel/context.h', + 'src/core/lib/channel/http_client_filter.h', + 'src/core/lib/channel/http_server_filter.h', + 'src/core/lib/compression/algorithm_metadata.h', + 'src/core/lib/compression/message_compress.h', + 'src/core/lib/debug/trace.h', + 'src/core/lib/http/format_request.h', + 'src/core/lib/http/httpcli.h', + 'src/core/lib/http/parser.h', + 'src/core/lib/iomgr/closure.h', + 'src/core/lib/iomgr/endpoint.h', + 'src/core/lib/iomgr/endpoint_pair.h', + 'src/core/lib/iomgr/ev_poll_and_epoll_posix.h', + 'src/core/lib/iomgr/ev_posix.h', + 'src/core/lib/iomgr/exec_ctx.h', + 'src/core/lib/iomgr/executor.h', + 'src/core/lib/iomgr/iocp_windows.h', + 'src/core/lib/iomgr/iomgr.h', + 'src/core/lib/iomgr/iomgr_internal.h', + 'src/core/lib/iomgr/iomgr_posix.h', + 'src/core/lib/iomgr/pollset.h', + 'src/core/lib/iomgr/pollset_set.h', + 'src/core/lib/iomgr/pollset_set_windows.h', + 'src/core/lib/iomgr/pollset_windows.h', + 'src/core/lib/iomgr/resolve_address.h', + 'src/core/lib/iomgr/sockaddr.h', + 'src/core/lib/iomgr/sockaddr_posix.h', + 'src/core/lib/iomgr/sockaddr_utils.h', + 'src/core/lib/iomgr/sockaddr_win32.h', + 'src/core/lib/iomgr/socket_utils_posix.h', + 'src/core/lib/iomgr/socket_windows.h', + 'src/core/lib/iomgr/tcp_client.h', + 'src/core/lib/iomgr/tcp_posix.h', + 'src/core/lib/iomgr/tcp_server.h', + 'src/core/lib/iomgr/tcp_windows.h', + 'src/core/lib/iomgr/time_averaged_stats.h', + 'src/core/lib/iomgr/timer.h', + 'src/core/lib/iomgr/timer_heap.h', + 'src/core/lib/iomgr/udp_server.h', + 'src/core/lib/iomgr/unix_sockets_posix.h', + 'src/core/lib/iomgr/wakeup_fd_pipe.h', + 'src/core/lib/iomgr/wakeup_fd_posix.h', + 'src/core/lib/iomgr/workqueue.h', + 'src/core/lib/iomgr/workqueue_posix.h', + 'src/core/lib/iomgr/workqueue_windows.h', + 'src/core/lib/json/json.h', + 'src/core/lib/json/json_common.h', + 'src/core/lib/json/json_reader.h', + 'src/core/lib/json/json_writer.h', + 'src/core/lib/surface/api_trace.h', + 'src/core/lib/surface/call.h', + 'src/core/lib/surface/call_test_only.h', + 'src/core/lib/surface/channel.h', + 'src/core/lib/surface/channel_init.h', + 'src/core/lib/surface/channel_stack_type.h', + 'src/core/lib/surface/completion_queue.h', + 'src/core/lib/surface/event_string.h', + 'src/core/lib/surface/init.h', + 'src/core/lib/surface/lame_client.h', + 'src/core/lib/surface/server.h', + 'src/core/lib/surface/surface_trace.h', + 'src/core/lib/transport/byte_stream.h', + 'src/core/lib/transport/connectivity_state.h', + 'src/core/lib/transport/metadata.h', + 'src/core/lib/transport/metadata_batch.h', + 'src/core/lib/transport/static_metadata.h', + 'src/core/lib/transport/transport.h', + 'src/core/lib/transport/transport_impl.h', + 'src/core/ext/transport/chttp2/transport/bin_encoder.h', + 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', + 'src/core/ext/transport/chttp2/transport/frame.h', + 'src/core/ext/transport/chttp2/transport/frame_data.h', + 'src/core/ext/transport/chttp2/transport/frame_goaway.h', + 'src/core/ext/transport/chttp2/transport/frame_ping.h', + 'src/core/ext/transport/chttp2/transport/frame_rst_stream.h', + 'src/core/ext/transport/chttp2/transport/frame_settings.h', + 'src/core/ext/transport/chttp2/transport/frame_window_update.h', + 'src/core/ext/transport/chttp2/transport/hpack_encoder.h', + 'src/core/ext/transport/chttp2/transport/hpack_parser.h', + 'src/core/ext/transport/chttp2/transport/hpack_table.h', + 'src/core/ext/transport/chttp2/transport/http2_errors.h', + 'src/core/ext/transport/chttp2/transport/huffsyms.h', + 'src/core/ext/transport/chttp2/transport/incoming_metadata.h', + 'src/core/ext/transport/chttp2/transport/internal.h', + 'src/core/ext/transport/chttp2/transport/status_conversion.h', + 'src/core/ext/transport/chttp2/transport/stream_map.h', + 'src/core/ext/transport/chttp2/transport/timeout_encoding.h', + 'src/core/ext/transport/chttp2/transport/varint.h', + 'src/core/ext/transport/chttp2/alpn/alpn.h', + 'src/core/lib/security/auth_filters.h', + 'src/core/lib/security/b64.h', + 'src/core/lib/security/credentials.h', + 'src/core/lib/security/handshake.h', + 'src/core/lib/security/json_token.h', + 'src/core/lib/security/jwt_verifier.h', + 'src/core/lib/security/secure_endpoint.h', + 'src/core/lib/security/security_connector.h', + 'src/core/lib/security/security_context.h', + 'src/core/lib/tsi/fake_transport_security.h', + 'src/core/lib/tsi/ssl_transport_security.h', + 'src/core/lib/tsi/ssl_types.h', + 'src/core/lib/tsi/transport_security.h', + 'src/core/lib/tsi/transport_security_interface.h', + 'src/core/ext/client_config/client_channel.h', + 'src/core/ext/client_config/client_channel_factory.h', + 'src/core/ext/client_config/client_config.h', + 'src/core/ext/client_config/connector.h', + 'src/core/ext/client_config/initial_connect_string.h', + 'src/core/ext/client_config/lb_policy.h', + 'src/core/ext/client_config/lb_policy_factory.h', + 'src/core/ext/client_config/lb_policy_registry.h', + 'src/core/ext/client_config/parse_address.h', + 'src/core/ext/client_config/resolver.h', + 'src/core/ext/client_config/resolver_factory.h', + 'src/core/ext/client_config/resolver_registry.h', + 'src/core/ext/client_config/subchannel.h', + 'src/core/ext/client_config/subchannel_call_holder.h', + 'src/core/ext/client_config/subchannel_index.h', + 'src/core/ext/client_config/uri_parser.h', + 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', + 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h', + 'third_party/nanopb/pb.h', + 'third_party/nanopb/pb_common.h', + 'third_party/nanopb/pb_decode.h', + 'third_party/nanopb/pb_encode.h', + 'src/core/ext/census/aggregation.h', + 'src/core/ext/census/census_interface.h', + 'src/core/ext/census/census_rpc_stats.h', + 'src/core/ext/census/grpc_filter.h', + 'src/core/ext/census/mlog.h', + 'src/core/ext/census/rpc_metric_id.h', + 'include/grpc/byte_buffer.h', + 'include/grpc/byte_buffer_reader.h', + 'include/grpc/compression.h', + 'include/grpc/grpc.h', + 'include/grpc/status.h', + 'include/grpc/impl/codegen/byte_buffer.h', + 'include/grpc/impl/codegen/byte_buffer_reader.h', + 'include/grpc/impl/codegen/compression_types.h', + 'include/grpc/impl/codegen/connectivity_state.h', + 'include/grpc/impl/codegen/grpc_types.h', + 'include/grpc/impl/codegen/propagation_bits.h', + 'include/grpc/impl/codegen/status.h', + 'include/grpc/impl/codegen/alloc.h', + 'include/grpc/impl/codegen/atm.h', + 'include/grpc/impl/codegen/atm_gcc_atomic.h', + 'include/grpc/impl/codegen/atm_gcc_sync.h', + 'include/grpc/impl/codegen/atm_win32.h', + 'include/grpc/impl/codegen/log.h', + 'include/grpc/impl/codegen/port_platform.h', + 'include/grpc/impl/codegen/slice.h', + 'include/grpc/impl/codegen/slice_buffer.h', + 'include/grpc/impl/codegen/sync.h', + 'include/grpc/impl/codegen/sync_generic.h', + 'include/grpc/impl/codegen/sync_posix.h', + 'include/grpc/impl/codegen/sync_win32.h', + 'include/grpc/impl/codegen/time.h', + 'include/grpc/grpc_security.h', + 'include/grpc/grpc_security_constants.h', + 'include/grpc/census.h', + 'src/core/lib/surface/init.c', + 'src/core/lib/channel/channel_args.c', + 'src/core/lib/channel/channel_stack.c', + 'src/core/lib/channel/channel_stack_builder.c', + 'src/core/lib/channel/compress_filter.c', + 'src/core/lib/channel/connected_channel.c', + 'src/core/lib/channel/http_client_filter.c', + 'src/core/lib/channel/http_server_filter.c', + 'src/core/lib/compression/compression_algorithm.c', + 'src/core/lib/compression/message_compress.c', + 'src/core/lib/debug/trace.c', + 'src/core/lib/http/format_request.c', + 'src/core/lib/http/httpcli.c', + 'src/core/lib/http/parser.c', + 'src/core/lib/iomgr/closure.c', + 'src/core/lib/iomgr/endpoint.c', + 'src/core/lib/iomgr/endpoint_pair_posix.c', + 'src/core/lib/iomgr/endpoint_pair_windows.c', + 'src/core/lib/iomgr/ev_poll_and_epoll_posix.c', + 'src/core/lib/iomgr/ev_posix.c', + 'src/core/lib/iomgr/exec_ctx.c', + 'src/core/lib/iomgr/executor.c', + 'src/core/lib/iomgr/iocp_windows.c', + 'src/core/lib/iomgr/iomgr.c', + 'src/core/lib/iomgr/iomgr_posix.c', + 'src/core/lib/iomgr/iomgr_windows.c', + 'src/core/lib/iomgr/pollset_set_windows.c', + 'src/core/lib/iomgr/pollset_windows.c', + 'src/core/lib/iomgr/resolve_address_posix.c', + 'src/core/lib/iomgr/resolve_address_windows.c', + 'src/core/lib/iomgr/sockaddr_utils.c', + 'src/core/lib/iomgr/socket_utils_common_posix.c', + 'src/core/lib/iomgr/socket_utils_linux.c', + 'src/core/lib/iomgr/socket_utils_posix.c', + 'src/core/lib/iomgr/socket_windows.c', + 'src/core/lib/iomgr/tcp_client_posix.c', + 'src/core/lib/iomgr/tcp_client_windows.c', + 'src/core/lib/iomgr/tcp_posix.c', + 'src/core/lib/iomgr/tcp_server_posix.c', + 'src/core/lib/iomgr/tcp_server_windows.c', + 'src/core/lib/iomgr/tcp_windows.c', + 'src/core/lib/iomgr/time_averaged_stats.c', + 'src/core/lib/iomgr/timer.c', + 'src/core/lib/iomgr/timer_heap.c', + 'src/core/lib/iomgr/udp_server.c', + 'src/core/lib/iomgr/unix_sockets_posix.c', + 'src/core/lib/iomgr/unix_sockets_posix_noop.c', + 'src/core/lib/iomgr/wakeup_fd_eventfd.c', + 'src/core/lib/iomgr/wakeup_fd_nospecial.c', + 'src/core/lib/iomgr/wakeup_fd_pipe.c', + 'src/core/lib/iomgr/wakeup_fd_posix.c', + 'src/core/lib/iomgr/workqueue_posix.c', + 'src/core/lib/iomgr/workqueue_windows.c', + 'src/core/lib/json/json.c', + 'src/core/lib/json/json_reader.c', + 'src/core/lib/json/json_string.c', + 'src/core/lib/json/json_writer.c', + 'src/core/lib/surface/alarm.c', + 'src/core/lib/surface/api_trace.c', + 'src/core/lib/surface/byte_buffer.c', + 'src/core/lib/surface/byte_buffer_reader.c', + 'src/core/lib/surface/call.c', + 'src/core/lib/surface/call_details.c', + 'src/core/lib/surface/call_log_batch.c', + 'src/core/lib/surface/channel.c', + 'src/core/lib/surface/channel_init.c', + 'src/core/lib/surface/channel_ping.c', + 'src/core/lib/surface/channel_stack_type.c', + 'src/core/lib/surface/completion_queue.c', + 'src/core/lib/surface/event_string.c', + 'src/core/lib/surface/lame_client.c', + 'src/core/lib/surface/metadata_array.c', + 'src/core/lib/surface/server.c', + 'src/core/lib/surface/validate_metadata.c', + 'src/core/lib/surface/version.c', + 'src/core/lib/transport/byte_stream.c', + 'src/core/lib/transport/connectivity_state.c', + 'src/core/lib/transport/metadata.c', + 'src/core/lib/transport/metadata_batch.c', + 'src/core/lib/transport/static_metadata.c', + 'src/core/lib/transport/transport.c', + 'src/core/lib/transport/transport_op_string.c', + 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c', + 'src/core/ext/transport/chttp2/transport/bin_encoder.c', + 'src/core/ext/transport/chttp2/transport/chttp2_plugin.c', + 'src/core/ext/transport/chttp2/transport/chttp2_transport.c', + 'src/core/ext/transport/chttp2/transport/frame_data.c', + 'src/core/ext/transport/chttp2/transport/frame_goaway.c', + 'src/core/ext/transport/chttp2/transport/frame_ping.c', + 'src/core/ext/transport/chttp2/transport/frame_rst_stream.c', + 'src/core/ext/transport/chttp2/transport/frame_settings.c', + 'src/core/ext/transport/chttp2/transport/frame_window_update.c', + 'src/core/ext/transport/chttp2/transport/hpack_encoder.c', + 'src/core/ext/transport/chttp2/transport/hpack_parser.c', + 'src/core/ext/transport/chttp2/transport/hpack_table.c', + 'src/core/ext/transport/chttp2/transport/huffsyms.c', + 'src/core/ext/transport/chttp2/transport/incoming_metadata.c', + 'src/core/ext/transport/chttp2/transport/parsing.c', + 'src/core/ext/transport/chttp2/transport/status_conversion.c', + 'src/core/ext/transport/chttp2/transport/stream_lists.c', + 'src/core/ext/transport/chttp2/transport/stream_map.c', + 'src/core/ext/transport/chttp2/transport/timeout_encoding.c', + 'src/core/ext/transport/chttp2/transport/varint.c', + 'src/core/ext/transport/chttp2/transport/writing.c', + 'src/core/ext/transport/chttp2/alpn/alpn.c', + 'src/core/lib/http/httpcli_security_connector.c', + 'src/core/lib/security/b64.c', + 'src/core/lib/security/client_auth_filter.c', + 'src/core/lib/security/credentials.c', + 'src/core/lib/security/credentials_metadata.c', + 'src/core/lib/security/credentials_posix.c', + 'src/core/lib/security/credentials_win32.c', + 'src/core/lib/security/google_default_credentials.c', + 'src/core/lib/security/handshake.c', + 'src/core/lib/security/json_token.c', + 'src/core/lib/security/jwt_verifier.c', + 'src/core/lib/security/secure_endpoint.c', + 'src/core/lib/security/security_connector.c', + 'src/core/lib/security/security_context.c', + 'src/core/lib/security/server_auth_filter.c', + 'src/core/lib/surface/init_secure.c', + 'src/core/lib/tsi/fake_transport_security.c', + 'src/core/lib/tsi/ssl_transport_security.c', + 'src/core/lib/tsi/transport_security.c', + 'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c', + 'src/core/ext/client_config/channel_connectivity.c', + 'src/core/ext/client_config/client_channel.c', + 'src/core/ext/client_config/client_channel_factory.c', + 'src/core/ext/client_config/client_config.c', + 'src/core/ext/client_config/client_config_plugin.c', + 'src/core/ext/client_config/connector.c', + 'src/core/ext/client_config/default_initial_connect_string.c', + 'src/core/ext/client_config/initial_connect_string.c', + 'src/core/ext/client_config/lb_policy.c', + 'src/core/ext/client_config/lb_policy_factory.c', + 'src/core/ext/client_config/lb_policy_registry.c', + 'src/core/ext/client_config/parse_address.c', + 'src/core/ext/client_config/resolver.c', + 'src/core/ext/client_config/resolver_factory.c', + 'src/core/ext/client_config/resolver_registry.c', + 'src/core/ext/client_config/subchannel.c', + 'src/core/ext/client_config/subchannel_call_holder.c', + 'src/core/ext/client_config/subchannel_index.c', + 'src/core/ext/client_config/uri_parser.c', + 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', + 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', + 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', + 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c', + 'third_party/nanopb/pb_common.c', + 'third_party/nanopb/pb_decode.c', + 'third_party/nanopb/pb_encode.c', + 'src/core/ext/lb_policy/pick_first/pick_first.c', + 'src/core/ext/lb_policy/round_robin/round_robin.c', + 'src/core/ext/resolver/dns/native/dns_resolver.c', + 'src/core/ext/resolver/sockaddr/sockaddr_resolver.c', + 'src/core/ext/census/context.c', + 'src/core/ext/census/grpc_context.c', + 'src/core/ext/census/grpc_filter.c', + 'src/core/ext/census/grpc_plugin.c', + 'src/core/ext/census/initialize.c', + 'src/core/ext/census/mlog.c', + 'src/core/ext/census/operation.c', + 'src/core/ext/census/placeholders.c', + 'src/core/ext/census/tracing.c', + 'src/core/plugin_registry/grpc_plugin_registry.c' + + s.private_header_files = 'src/core/lib/profiling/timers.h', + 'src/core/lib/support/backoff.h', + 'src/core/lib/support/block_annotate.h', + 'src/core/lib/support/env.h', + 'src/core/lib/support/load_file.h', + 'src/core/lib/support/murmur_hash.h', + 'src/core/lib/support/stack_lockfree.h', + 'src/core/lib/support/string.h', + 'src/core/lib/support/string_win32.h', + 'src/core/lib/support/thd_internal.h', + 'src/core/lib/support/time_precise.h', + 'src/core/lib/support/tmpfile.h', + '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/compress_filter.h', + 'src/core/lib/channel/connected_channel.h', + 'src/core/lib/channel/context.h', + 'src/core/lib/channel/http_client_filter.h', + 'src/core/lib/channel/http_server_filter.h', + 'src/core/lib/compression/algorithm_metadata.h', + 'src/core/lib/compression/message_compress.h', + 'src/core/lib/debug/trace.h', + 'src/core/lib/http/format_request.h', + 'src/core/lib/http/httpcli.h', + 'src/core/lib/http/parser.h', + 'src/core/lib/iomgr/closure.h', + 'src/core/lib/iomgr/endpoint.h', + 'src/core/lib/iomgr/endpoint_pair.h', + 'src/core/lib/iomgr/ev_poll_and_epoll_posix.h', + 'src/core/lib/iomgr/ev_posix.h', + 'src/core/lib/iomgr/exec_ctx.h', + 'src/core/lib/iomgr/executor.h', + 'src/core/lib/iomgr/iocp_windows.h', + 'src/core/lib/iomgr/iomgr.h', + 'src/core/lib/iomgr/iomgr_internal.h', + 'src/core/lib/iomgr/iomgr_posix.h', + 'src/core/lib/iomgr/pollset.h', + 'src/core/lib/iomgr/pollset_set.h', + 'src/core/lib/iomgr/pollset_set_windows.h', + 'src/core/lib/iomgr/pollset_windows.h', + 'src/core/lib/iomgr/resolve_address.h', + 'src/core/lib/iomgr/sockaddr.h', + 'src/core/lib/iomgr/sockaddr_posix.h', + 'src/core/lib/iomgr/sockaddr_utils.h', + 'src/core/lib/iomgr/sockaddr_win32.h', + 'src/core/lib/iomgr/socket_utils_posix.h', + 'src/core/lib/iomgr/socket_windows.h', + 'src/core/lib/iomgr/tcp_client.h', + 'src/core/lib/iomgr/tcp_posix.h', + 'src/core/lib/iomgr/tcp_server.h', + 'src/core/lib/iomgr/tcp_windows.h', + 'src/core/lib/iomgr/time_averaged_stats.h', + 'src/core/lib/iomgr/timer.h', + 'src/core/lib/iomgr/timer_heap.h', + 'src/core/lib/iomgr/udp_server.h', + 'src/core/lib/iomgr/unix_sockets_posix.h', + 'src/core/lib/iomgr/wakeup_fd_pipe.h', + 'src/core/lib/iomgr/wakeup_fd_posix.h', + 'src/core/lib/iomgr/workqueue.h', + 'src/core/lib/iomgr/workqueue_posix.h', + 'src/core/lib/iomgr/workqueue_windows.h', + 'src/core/lib/json/json.h', + 'src/core/lib/json/json_common.h', + 'src/core/lib/json/json_reader.h', + 'src/core/lib/json/json_writer.h', + 'src/core/lib/surface/api_trace.h', + 'src/core/lib/surface/call.h', + 'src/core/lib/surface/call_test_only.h', + 'src/core/lib/surface/channel.h', + 'src/core/lib/surface/channel_init.h', + 'src/core/lib/surface/channel_stack_type.h', + 'src/core/lib/surface/completion_queue.h', + 'src/core/lib/surface/event_string.h', + 'src/core/lib/surface/init.h', + 'src/core/lib/surface/lame_client.h', + 'src/core/lib/surface/server.h', + 'src/core/lib/surface/surface_trace.h', + 'src/core/lib/transport/byte_stream.h', + 'src/core/lib/transport/connectivity_state.h', + 'src/core/lib/transport/metadata.h', + 'src/core/lib/transport/metadata_batch.h', + 'src/core/lib/transport/static_metadata.h', + 'src/core/lib/transport/transport.h', + 'src/core/lib/transport/transport_impl.h', + 'src/core/ext/transport/chttp2/transport/bin_encoder.h', + 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', + 'src/core/ext/transport/chttp2/transport/frame.h', + 'src/core/ext/transport/chttp2/transport/frame_data.h', + 'src/core/ext/transport/chttp2/transport/frame_goaway.h', + 'src/core/ext/transport/chttp2/transport/frame_ping.h', + 'src/core/ext/transport/chttp2/transport/frame_rst_stream.h', + 'src/core/ext/transport/chttp2/transport/frame_settings.h', + 'src/core/ext/transport/chttp2/transport/frame_window_update.h', + 'src/core/ext/transport/chttp2/transport/hpack_encoder.h', + 'src/core/ext/transport/chttp2/transport/hpack_parser.h', + 'src/core/ext/transport/chttp2/transport/hpack_table.h', + 'src/core/ext/transport/chttp2/transport/http2_errors.h', + 'src/core/ext/transport/chttp2/transport/huffsyms.h', + 'src/core/ext/transport/chttp2/transport/incoming_metadata.h', + 'src/core/ext/transport/chttp2/transport/internal.h', + 'src/core/ext/transport/chttp2/transport/status_conversion.h', + 'src/core/ext/transport/chttp2/transport/stream_map.h', + 'src/core/ext/transport/chttp2/transport/timeout_encoding.h', + 'src/core/ext/transport/chttp2/transport/varint.h', + 'src/core/ext/transport/chttp2/alpn/alpn.h', + 'src/core/lib/security/auth_filters.h', + 'src/core/lib/security/b64.h', + 'src/core/lib/security/credentials.h', + 'src/core/lib/security/handshake.h', + 'src/core/lib/security/json_token.h', + 'src/core/lib/security/jwt_verifier.h', + 'src/core/lib/security/secure_endpoint.h', + 'src/core/lib/security/security_connector.h', + 'src/core/lib/security/security_context.h', + 'src/core/lib/tsi/fake_transport_security.h', + 'src/core/lib/tsi/ssl_transport_security.h', + 'src/core/lib/tsi/ssl_types.h', + 'src/core/lib/tsi/transport_security.h', + 'src/core/lib/tsi/transport_security_interface.h', + 'src/core/ext/client_config/client_channel.h', + 'src/core/ext/client_config/client_channel_factory.h', + 'src/core/ext/client_config/client_config.h', + 'src/core/ext/client_config/connector.h', + 'src/core/ext/client_config/initial_connect_string.h', + 'src/core/ext/client_config/lb_policy.h', + 'src/core/ext/client_config/lb_policy_factory.h', + 'src/core/ext/client_config/lb_policy_registry.h', + 'src/core/ext/client_config/parse_address.h', + 'src/core/ext/client_config/resolver.h', + 'src/core/ext/client_config/resolver_factory.h', + 'src/core/ext/client_config/resolver_registry.h', + 'src/core/ext/client_config/subchannel.h', + 'src/core/ext/client_config/subchannel_call_holder.h', + 'src/core/ext/client_config/subchannel_index.h', + 'src/core/ext/client_config/uri_parser.h', + 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', + 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h', + 'third_party/nanopb/pb.h', + 'third_party/nanopb/pb_common.h', + 'third_party/nanopb/pb_decode.h', + 'third_party/nanopb/pb_encode.h', + 'src/core/ext/census/aggregation.h', + 'src/core/ext/census/census_interface.h', + 'src/core/ext/census/census_rpc_stats.h', + 'src/core/ext/census/grpc_filter.h', + 'src/core/ext/census/mlog.h', + 'src/core/ext/census/rpc_metric_id.h' + + s.header_mappings_dir = 'include/grpc' + + src_root = '$(PODS_ROOT)/gRPC-Core' + # This isn't officially supported in Cocoapods. We've asked for an alternative: + # https://github.com/CocoaPods/CocoaPods/issues/4386 + public_build_settings = { + 'GRPC_SRC_ROOT' => src_root, + 'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(GRPC_SRC_ROOT)/include"', + } + private_build_settings = public_build_settings.merge({ + 'USE_HEADERMAP' => 'NO', + 'ALWAYS_SEARCH_USER_PATHS' => 'NO', + 'USER_HEADER_SEARCH_PATHS' => '"$(GRPC_SRC_ROOT)"', + }) + s.user_target_xcconfig = public_build_settings + s.pod_target_xcconfig = private_build_settings + + s.libraries = 'z' + s.dependency 'BoringSSL', '~> 3.0' +end diff --git a/gRPC-ProtoRPC.podspec b/gRPC-ProtoRPC.podspec new file mode 100644 index 00000000000..1ff539d5ee6 --- /dev/null +++ b/gRPC-ProtoRPC.podspec @@ -0,0 +1,69 @@ +# GRPC CocoaPods podspec +# This file has been automatically generated from a template file. +# Please look at the templates directory instead. +# This file can be regenerated from the template by running +# tools/buildgen/generate_projects.sh + +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +Pod::Spec.new do |s| + s.name = 'gRPC-ProtoRPC' + version = '0.14.0' + s.version = version + s.summary = 'RPC library for Protocol Buffers, based on gRPC' + s.homepage = 'http://www.grpc.io' + s.license = 'New BSD' + s.authors = { 'The gRPC contributors' => 'grpc-packages@google.com' } + + s.source = { + :git => 'https://github.com/grpc/grpc.git', + :tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}", + } + + s.ios.deployment_target = '7.1' + s.osx.deployment_target = '10.9' + + name = 'ProtoRPC' + s.module_name = name + s.header_dir = name + + src_dir = 'src/objective-c/ProtoRPC' + s.source_files = "#{src_dir}/*.{h,m}" + s.header_mappings_dir = "#{src_dir}" + + s.dependency 'gRPC', version + s.dependency 'gRPC-RxLibrary', version + s.dependency 'Protobuf', '~> 3.0.0-alpha-4' + # This is needed by all pods that depend on Protobuf: + s.pod_target_xcconfig = { + 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1', + } +end diff --git a/gRPC-RxLibrary.podspec b/gRPC-RxLibrary.podspec new file mode 100644 index 00000000000..6263878213e --- /dev/null +++ b/gRPC-RxLibrary.podspec @@ -0,0 +1,62 @@ +# GRPC CocoaPods podspec +# This file has been automatically generated from a template file. +# Please look at the templates directory instead. +# This file can be regenerated from the template by running +# tools/buildgen/generate_projects.sh + +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +Pod::Spec.new do |s| + s.name = 'gRPC-RxLibrary' + version = '0.14.0' + s.version = version + s.summary = 'Reactive Extensions library for iOS/OSX.' + s.homepage = 'http://www.grpc.io' + s.license = 'New BSD' + s.authors = { 'The gRPC contributors' => 'grpc-packages@google.com' } + + s.source = { + :git => 'https://github.com/grpc/grpc.git', + :tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}", + } + + s.ios.deployment_target = '7.1' + s.osx.deployment_target = '10.9' + + name = 'RxLibrary' + s.module_name = name + s.header_dir = name + + src_dir = 'src/objective-c/RxLibrary' + s.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}" + s.private_header_files = "#{src_dir}/private/*.h" + s.header_mappings_dir = "#{src_dir}" +end diff --git a/gRPC.podspec b/gRPC.podspec index 569f89bf7c0..e5556cc5448 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -36,652 +36,33 @@ Pod::Spec.new do |s| s.name = 'gRPC' - version = '0.12.0' + version = '0.14.0' s.version = version s.summary = 'gRPC client library for iOS/OSX' s.homepage = 'http://www.grpc.io' s.license = 'New BSD' s.authors = { 'The gRPC contributors' => 'grpc-packages@google.com' } - s.source = { :git => 'https://github.com/grpc/grpc.git', - :tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}" } - + s.source = { + :git => 'https://github.com/grpc/grpc.git', + :tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}", + } s.ios.deployment_target = '7.1' s.osx.deployment_target = '10.9' - s.requires_arc = true - - objc_dir = 'src/objective-c' - - # Reactive Extensions library for iOS. - s.subspec 'RxLibrary' do |ss| - src_dir = "#{objc_dir}/RxLibrary" - ss.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}" - ss.private_header_files = "#{src_dir}/private/*.h" - ss.header_mappings_dir = "#{objc_dir}" - end - - # Core cross-platform gRPC library, written in C. - s.subspec 'C-Core' do |ss| - ss.source_files = 'src/core/lib/profiling/timers.h', - 'src/core/lib/support/backoff.h', - 'src/core/lib/support/block_annotate.h', - 'src/core/lib/support/env.h', - 'src/core/lib/support/load_file.h', - 'src/core/lib/support/murmur_hash.h', - 'src/core/lib/support/stack_lockfree.h', - 'src/core/lib/support/string.h', - 'src/core/lib/support/string_win32.h', - 'src/core/lib/support/thd_internal.h', - 'src/core/lib/support/time_precise.h', - 'src/core/lib/support/tmpfile.h', - 'include/grpc/support/alloc.h', - 'include/grpc/support/atm.h', - 'include/grpc/support/atm_gcc_atomic.h', - 'include/grpc/support/atm_gcc_sync.h', - 'include/grpc/support/atm_win32.h', - 'include/grpc/support/avl.h', - 'include/grpc/support/cmdline.h', - 'include/grpc/support/cpu.h', - 'include/grpc/support/histogram.h', - 'include/grpc/support/host_port.h', - 'include/grpc/support/log.h', - 'include/grpc/support/log_win32.h', - 'include/grpc/support/port_platform.h', - 'include/grpc/support/slice.h', - 'include/grpc/support/slice_buffer.h', - 'include/grpc/support/string_util.h', - 'include/grpc/support/subprocess.h', - 'include/grpc/support/sync.h', - 'include/grpc/support/sync_generic.h', - 'include/grpc/support/sync_posix.h', - 'include/grpc/support/sync_win32.h', - 'include/grpc/support/thd.h', - 'include/grpc/support/time.h', - 'include/grpc/support/tls.h', - 'include/grpc/support/tls_gcc.h', - 'include/grpc/support/tls_msvc.h', - 'include/grpc/support/tls_pthread.h', - 'include/grpc/support/useful.h', - 'include/grpc/impl/codegen/alloc.h', - 'include/grpc/impl/codegen/atm.h', - 'include/grpc/impl/codegen/atm_gcc_atomic.h', - 'include/grpc/impl/codegen/atm_gcc_sync.h', - 'include/grpc/impl/codegen/atm_win32.h', - 'include/grpc/impl/codegen/log.h', - 'include/grpc/impl/codegen/port_platform.h', - 'include/grpc/impl/codegen/slice.h', - 'include/grpc/impl/codegen/slice_buffer.h', - 'include/grpc/impl/codegen/sync.h', - 'include/grpc/impl/codegen/sync_generic.h', - 'include/grpc/impl/codegen/sync_posix.h', - 'include/grpc/impl/codegen/sync_win32.h', - 'include/grpc/impl/codegen/time.h', - 'src/core/lib/profiling/basic_timers.c', - 'src/core/lib/profiling/stap_timers.c', - 'src/core/lib/support/alloc.c', - 'src/core/lib/support/avl.c', - 'src/core/lib/support/backoff.c', - 'src/core/lib/support/cmdline.c', - 'src/core/lib/support/cpu_iphone.c', - 'src/core/lib/support/cpu_linux.c', - 'src/core/lib/support/cpu_posix.c', - 'src/core/lib/support/cpu_windows.c', - 'src/core/lib/support/env_linux.c', - 'src/core/lib/support/env_posix.c', - 'src/core/lib/support/env_win32.c', - 'src/core/lib/support/histogram.c', - 'src/core/lib/support/host_port.c', - 'src/core/lib/support/load_file.c', - 'src/core/lib/support/log.c', - 'src/core/lib/support/log_android.c', - 'src/core/lib/support/log_linux.c', - 'src/core/lib/support/log_posix.c', - 'src/core/lib/support/log_win32.c', - 'src/core/lib/support/murmur_hash.c', - 'src/core/lib/support/slice.c', - 'src/core/lib/support/slice_buffer.c', - 'src/core/lib/support/stack_lockfree.c', - 'src/core/lib/support/string.c', - 'src/core/lib/support/string_posix.c', - 'src/core/lib/support/string_util_win32.c', - 'src/core/lib/support/string_win32.c', - 'src/core/lib/support/subprocess_posix.c', - 'src/core/lib/support/subprocess_windows.c', - 'src/core/lib/support/sync.c', - 'src/core/lib/support/sync_posix.c', - 'src/core/lib/support/sync_win32.c', - 'src/core/lib/support/thd.c', - 'src/core/lib/support/thd_posix.c', - 'src/core/lib/support/thd_win32.c', - 'src/core/lib/support/time.c', - 'src/core/lib/support/time_posix.c', - 'src/core/lib/support/time_precise.c', - 'src/core/lib/support/time_win32.c', - 'src/core/lib/support/tls_pthread.c', - 'src/core/lib/support/tmpfile_msys.c', - 'src/core/lib/support/tmpfile_posix.c', - 'src/core/lib/support/tmpfile_win32.c', - 'src/core/lib/support/wrap_memcpy.c', - '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/compress_filter.h', - 'src/core/lib/channel/connected_channel.h', - 'src/core/lib/channel/context.h', - 'src/core/lib/channel/http_client_filter.h', - 'src/core/lib/channel/http_server_filter.h', - 'src/core/lib/compression/algorithm_metadata.h', - 'src/core/lib/compression/message_compress.h', - 'src/core/lib/debug/trace.h', - 'src/core/lib/http/format_request.h', - 'src/core/lib/http/httpcli.h', - 'src/core/lib/http/parser.h', - 'src/core/lib/iomgr/closure.h', - 'src/core/lib/iomgr/endpoint.h', - 'src/core/lib/iomgr/endpoint_pair.h', - 'src/core/lib/iomgr/ev_poll_and_epoll_posix.h', - 'src/core/lib/iomgr/ev_posix.h', - 'src/core/lib/iomgr/exec_ctx.h', - 'src/core/lib/iomgr/executor.h', - 'src/core/lib/iomgr/iocp_windows.h', - 'src/core/lib/iomgr/iomgr.h', - 'src/core/lib/iomgr/iomgr_internal.h', - 'src/core/lib/iomgr/iomgr_posix.h', - 'src/core/lib/iomgr/pollset.h', - 'src/core/lib/iomgr/pollset_set.h', - 'src/core/lib/iomgr/pollset_set_windows.h', - 'src/core/lib/iomgr/pollset_windows.h', - 'src/core/lib/iomgr/resolve_address.h', - 'src/core/lib/iomgr/sockaddr.h', - 'src/core/lib/iomgr/sockaddr_posix.h', - 'src/core/lib/iomgr/sockaddr_utils.h', - 'src/core/lib/iomgr/sockaddr_win32.h', - 'src/core/lib/iomgr/socket_utils_posix.h', - 'src/core/lib/iomgr/socket_windows.h', - 'src/core/lib/iomgr/tcp_client.h', - 'src/core/lib/iomgr/tcp_posix.h', - 'src/core/lib/iomgr/tcp_server.h', - 'src/core/lib/iomgr/tcp_windows.h', - 'src/core/lib/iomgr/time_averaged_stats.h', - 'src/core/lib/iomgr/timer.h', - 'src/core/lib/iomgr/timer_heap.h', - 'src/core/lib/iomgr/udp_server.h', - 'src/core/lib/iomgr/unix_sockets_posix.h', - 'src/core/lib/iomgr/wakeup_fd_pipe.h', - 'src/core/lib/iomgr/wakeup_fd_posix.h', - 'src/core/lib/iomgr/workqueue.h', - 'src/core/lib/iomgr/workqueue_posix.h', - 'src/core/lib/iomgr/workqueue_windows.h', - 'src/core/lib/json/json.h', - 'src/core/lib/json/json_common.h', - 'src/core/lib/json/json_reader.h', - 'src/core/lib/json/json_writer.h', - 'src/core/lib/surface/api_trace.h', - 'src/core/lib/surface/call.h', - 'src/core/lib/surface/call_test_only.h', - 'src/core/lib/surface/channel.h', - 'src/core/lib/surface/channel_init.h', - 'src/core/lib/surface/channel_stack_type.h', - 'src/core/lib/surface/completion_queue.h', - 'src/core/lib/surface/event_string.h', - 'src/core/lib/surface/init.h', - 'src/core/lib/surface/lame_client.h', - 'src/core/lib/surface/server.h', - 'src/core/lib/surface/surface_trace.h', - 'src/core/lib/transport/byte_stream.h', - 'src/core/lib/transport/connectivity_state.h', - 'src/core/lib/transport/metadata.h', - 'src/core/lib/transport/metadata_batch.h', - 'src/core/lib/transport/static_metadata.h', - 'src/core/lib/transport/transport.h', - 'src/core/lib/transport/transport_impl.h', - 'src/core/ext/transport/chttp2/transport/bin_encoder.h', - 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', - 'src/core/ext/transport/chttp2/transport/frame.h', - 'src/core/ext/transport/chttp2/transport/frame_data.h', - 'src/core/ext/transport/chttp2/transport/frame_goaway.h', - 'src/core/ext/transport/chttp2/transport/frame_ping.h', - 'src/core/ext/transport/chttp2/transport/frame_rst_stream.h', - 'src/core/ext/transport/chttp2/transport/frame_settings.h', - 'src/core/ext/transport/chttp2/transport/frame_window_update.h', - 'src/core/ext/transport/chttp2/transport/hpack_encoder.h', - 'src/core/ext/transport/chttp2/transport/hpack_parser.h', - 'src/core/ext/transport/chttp2/transport/hpack_table.h', - 'src/core/ext/transport/chttp2/transport/http2_errors.h', - 'src/core/ext/transport/chttp2/transport/huffsyms.h', - 'src/core/ext/transport/chttp2/transport/incoming_metadata.h', - 'src/core/ext/transport/chttp2/transport/internal.h', - 'src/core/ext/transport/chttp2/transport/status_conversion.h', - 'src/core/ext/transport/chttp2/transport/stream_map.h', - 'src/core/ext/transport/chttp2/transport/timeout_encoding.h', - 'src/core/ext/transport/chttp2/transport/varint.h', - 'src/core/ext/transport/chttp2/alpn/alpn.h', - 'src/core/lib/security/auth_filters.h', - 'src/core/lib/security/b64.h', - 'src/core/lib/security/credentials.h', - 'src/core/lib/security/handshake.h', - 'src/core/lib/security/json_token.h', - 'src/core/lib/security/jwt_verifier.h', - 'src/core/lib/security/secure_endpoint.h', - 'src/core/lib/security/security_connector.h', - 'src/core/lib/security/security_context.h', - 'src/core/lib/tsi/fake_transport_security.h', - 'src/core/lib/tsi/ssl_transport_security.h', - 'src/core/lib/tsi/ssl_types.h', - 'src/core/lib/tsi/transport_security.h', - 'src/core/lib/tsi/transport_security_interface.h', - 'src/core/ext/client_config/client_channel.h', - 'src/core/ext/client_config/client_channel_factory.h', - 'src/core/ext/client_config/client_config.h', - 'src/core/ext/client_config/connector.h', - 'src/core/ext/client_config/initial_connect_string.h', - 'src/core/ext/client_config/lb_policy.h', - 'src/core/ext/client_config/lb_policy_factory.h', - 'src/core/ext/client_config/lb_policy_registry.h', - 'src/core/ext/client_config/parse_address.h', - 'src/core/ext/client_config/resolver.h', - 'src/core/ext/client_config/resolver_factory.h', - 'src/core/ext/client_config/resolver_registry.h', - 'src/core/ext/client_config/subchannel.h', - 'src/core/ext/client_config/subchannel_call_holder.h', - 'src/core/ext/client_config/subchannel_index.h', - 'src/core/ext/client_config/uri_parser.h', - 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', - 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h', - 'third_party/nanopb/pb.h', - 'third_party/nanopb/pb_common.h', - 'third_party/nanopb/pb_decode.h', - 'third_party/nanopb/pb_encode.h', - 'src/core/ext/census/aggregation.h', - 'src/core/ext/census/census_interface.h', - 'src/core/ext/census/census_rpc_stats.h', - 'src/core/ext/census/grpc_filter.h', - 'src/core/ext/census/mlog.h', - 'src/core/ext/census/rpc_metric_id.h', - 'include/grpc/byte_buffer.h', - 'include/grpc/byte_buffer_reader.h', - 'include/grpc/compression.h', - 'include/grpc/grpc.h', - 'include/grpc/status.h', - 'include/grpc/impl/codegen/byte_buffer.h', - 'include/grpc/impl/codegen/byte_buffer_reader.h', - 'include/grpc/impl/codegen/compression_types.h', - 'include/grpc/impl/codegen/connectivity_state.h', - 'include/grpc/impl/codegen/grpc_types.h', - 'include/grpc/impl/codegen/propagation_bits.h', - 'include/grpc/impl/codegen/status.h', - 'include/grpc/impl/codegen/alloc.h', - 'include/grpc/impl/codegen/atm.h', - 'include/grpc/impl/codegen/atm_gcc_atomic.h', - 'include/grpc/impl/codegen/atm_gcc_sync.h', - 'include/grpc/impl/codegen/atm_win32.h', - 'include/grpc/impl/codegen/log.h', - 'include/grpc/impl/codegen/port_platform.h', - 'include/grpc/impl/codegen/slice.h', - 'include/grpc/impl/codegen/slice_buffer.h', - 'include/grpc/impl/codegen/sync.h', - 'include/grpc/impl/codegen/sync_generic.h', - 'include/grpc/impl/codegen/sync_posix.h', - 'include/grpc/impl/codegen/sync_win32.h', - 'include/grpc/impl/codegen/time.h', - 'include/grpc/grpc_security.h', - 'include/grpc/grpc_security_constants.h', - 'include/grpc/census.h', - 'src/core/lib/surface/init.c', - 'src/core/lib/channel/channel_args.c', - 'src/core/lib/channel/channel_stack.c', - 'src/core/lib/channel/channel_stack_builder.c', - 'src/core/lib/channel/compress_filter.c', - 'src/core/lib/channel/connected_channel.c', - 'src/core/lib/channel/http_client_filter.c', - 'src/core/lib/channel/http_server_filter.c', - 'src/core/lib/compression/compression_algorithm.c', - 'src/core/lib/compression/message_compress.c', - 'src/core/lib/debug/trace.c', - 'src/core/lib/http/format_request.c', - 'src/core/lib/http/httpcli.c', - 'src/core/lib/http/parser.c', - 'src/core/lib/iomgr/closure.c', - 'src/core/lib/iomgr/endpoint.c', - 'src/core/lib/iomgr/endpoint_pair_posix.c', - 'src/core/lib/iomgr/endpoint_pair_windows.c', - 'src/core/lib/iomgr/ev_poll_and_epoll_posix.c', - 'src/core/lib/iomgr/ev_posix.c', - 'src/core/lib/iomgr/exec_ctx.c', - 'src/core/lib/iomgr/executor.c', - 'src/core/lib/iomgr/iocp_windows.c', - 'src/core/lib/iomgr/iomgr.c', - 'src/core/lib/iomgr/iomgr_posix.c', - 'src/core/lib/iomgr/iomgr_windows.c', - 'src/core/lib/iomgr/pollset_set_windows.c', - 'src/core/lib/iomgr/pollset_windows.c', - 'src/core/lib/iomgr/resolve_address_posix.c', - 'src/core/lib/iomgr/resolve_address_windows.c', - 'src/core/lib/iomgr/sockaddr_utils.c', - 'src/core/lib/iomgr/socket_utils_common_posix.c', - 'src/core/lib/iomgr/socket_utils_linux.c', - 'src/core/lib/iomgr/socket_utils_posix.c', - 'src/core/lib/iomgr/socket_windows.c', - 'src/core/lib/iomgr/tcp_client_posix.c', - 'src/core/lib/iomgr/tcp_client_windows.c', - 'src/core/lib/iomgr/tcp_posix.c', - 'src/core/lib/iomgr/tcp_server_posix.c', - 'src/core/lib/iomgr/tcp_server_windows.c', - 'src/core/lib/iomgr/tcp_windows.c', - 'src/core/lib/iomgr/time_averaged_stats.c', - 'src/core/lib/iomgr/timer.c', - 'src/core/lib/iomgr/timer_heap.c', - 'src/core/lib/iomgr/udp_server.c', - 'src/core/lib/iomgr/unix_sockets_posix.c', - 'src/core/lib/iomgr/unix_sockets_posix_noop.c', - 'src/core/lib/iomgr/wakeup_fd_eventfd.c', - 'src/core/lib/iomgr/wakeup_fd_nospecial.c', - 'src/core/lib/iomgr/wakeup_fd_pipe.c', - 'src/core/lib/iomgr/wakeup_fd_posix.c', - 'src/core/lib/iomgr/workqueue_posix.c', - 'src/core/lib/iomgr/workqueue_windows.c', - 'src/core/lib/json/json.c', - 'src/core/lib/json/json_reader.c', - 'src/core/lib/json/json_string.c', - 'src/core/lib/json/json_writer.c', - 'src/core/lib/surface/alarm.c', - 'src/core/lib/surface/api_trace.c', - 'src/core/lib/surface/byte_buffer.c', - 'src/core/lib/surface/byte_buffer_reader.c', - 'src/core/lib/surface/call.c', - 'src/core/lib/surface/call_details.c', - 'src/core/lib/surface/call_log_batch.c', - 'src/core/lib/surface/channel.c', - 'src/core/lib/surface/channel_init.c', - 'src/core/lib/surface/channel_ping.c', - 'src/core/lib/surface/channel_stack_type.c', - 'src/core/lib/surface/completion_queue.c', - 'src/core/lib/surface/event_string.c', - 'src/core/lib/surface/lame_client.c', - 'src/core/lib/surface/metadata_array.c', - 'src/core/lib/surface/server.c', - 'src/core/lib/surface/validate_metadata.c', - 'src/core/lib/surface/version.c', - 'src/core/lib/transport/byte_stream.c', - 'src/core/lib/transport/connectivity_state.c', - 'src/core/lib/transport/metadata.c', - 'src/core/lib/transport/metadata_batch.c', - 'src/core/lib/transport/static_metadata.c', - 'src/core/lib/transport/transport.c', - 'src/core/lib/transport/transport_op_string.c', - 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c', - 'src/core/ext/transport/chttp2/transport/bin_encoder.c', - 'src/core/ext/transport/chttp2/transport/chttp2_plugin.c', - 'src/core/ext/transport/chttp2/transport/chttp2_transport.c', - 'src/core/ext/transport/chttp2/transport/frame_data.c', - 'src/core/ext/transport/chttp2/transport/frame_goaway.c', - 'src/core/ext/transport/chttp2/transport/frame_ping.c', - 'src/core/ext/transport/chttp2/transport/frame_rst_stream.c', - 'src/core/ext/transport/chttp2/transport/frame_settings.c', - 'src/core/ext/transport/chttp2/transport/frame_window_update.c', - 'src/core/ext/transport/chttp2/transport/hpack_encoder.c', - 'src/core/ext/transport/chttp2/transport/hpack_parser.c', - 'src/core/ext/transport/chttp2/transport/hpack_table.c', - 'src/core/ext/transport/chttp2/transport/huffsyms.c', - 'src/core/ext/transport/chttp2/transport/incoming_metadata.c', - 'src/core/ext/transport/chttp2/transport/parsing.c', - 'src/core/ext/transport/chttp2/transport/status_conversion.c', - 'src/core/ext/transport/chttp2/transport/stream_lists.c', - 'src/core/ext/transport/chttp2/transport/stream_map.c', - 'src/core/ext/transport/chttp2/transport/timeout_encoding.c', - 'src/core/ext/transport/chttp2/transport/varint.c', - 'src/core/ext/transport/chttp2/transport/writing.c', - 'src/core/ext/transport/chttp2/alpn/alpn.c', - 'src/core/lib/http/httpcli_security_connector.c', - 'src/core/lib/security/b64.c', - 'src/core/lib/security/client_auth_filter.c', - 'src/core/lib/security/credentials.c', - 'src/core/lib/security/credentials_metadata.c', - 'src/core/lib/security/credentials_posix.c', - 'src/core/lib/security/credentials_win32.c', - 'src/core/lib/security/google_default_credentials.c', - 'src/core/lib/security/handshake.c', - 'src/core/lib/security/json_token.c', - 'src/core/lib/security/jwt_verifier.c', - 'src/core/lib/security/secure_endpoint.c', - 'src/core/lib/security/security_connector.c', - 'src/core/lib/security/security_context.c', - 'src/core/lib/security/server_auth_filter.c', - 'src/core/lib/surface/init_secure.c', - 'src/core/lib/tsi/fake_transport_security.c', - 'src/core/lib/tsi/ssl_transport_security.c', - 'src/core/lib/tsi/transport_security.c', - 'src/core/ext/transport/chttp2/client/secure/secure_channel_create.c', - 'src/core/ext/client_config/channel_connectivity.c', - 'src/core/ext/client_config/client_channel.c', - 'src/core/ext/client_config/client_channel_factory.c', - 'src/core/ext/client_config/client_config.c', - 'src/core/ext/client_config/client_config_plugin.c', - 'src/core/ext/client_config/connector.c', - 'src/core/ext/client_config/default_initial_connect_string.c', - 'src/core/ext/client_config/initial_connect_string.c', - 'src/core/ext/client_config/lb_policy.c', - 'src/core/ext/client_config/lb_policy_factory.c', - 'src/core/ext/client_config/lb_policy_registry.c', - 'src/core/ext/client_config/parse_address.c', - 'src/core/ext/client_config/resolver.c', - 'src/core/ext/client_config/resolver_factory.c', - 'src/core/ext/client_config/resolver_registry.c', - 'src/core/ext/client_config/subchannel.c', - 'src/core/ext/client_config/subchannel_call_holder.c', - 'src/core/ext/client_config/subchannel_index.c', - 'src/core/ext/client_config/uri_parser.c', - 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', - 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', - 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', - 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c', - 'third_party/nanopb/pb_common.c', - 'third_party/nanopb/pb_decode.c', - 'third_party/nanopb/pb_encode.c', - 'src/core/ext/lb_policy/pick_first/pick_first.c', - 'src/core/ext/lb_policy/round_robin/round_robin.c', - 'src/core/ext/resolver/dns/native/dns_resolver.c', - 'src/core/ext/resolver/sockaddr/sockaddr_resolver.c', - 'src/core/ext/census/context.c', - 'src/core/ext/census/grpc_context.c', - 'src/core/ext/census/grpc_filter.c', - 'src/core/ext/census/grpc_plugin.c', - 'src/core/ext/census/initialize.c', - 'src/core/ext/census/mlog.c', - 'src/core/ext/census/operation.c', - 'src/core/ext/census/placeholders.c', - 'src/core/ext/census/tracing.c', - 'src/core/plugin_registry/grpc_plugin_registry.c' - - ss.private_header_files = 'src/core/lib/profiling/timers.h', - 'src/core/lib/support/backoff.h', - 'src/core/lib/support/block_annotate.h', - 'src/core/lib/support/env.h', - 'src/core/lib/support/load_file.h', - 'src/core/lib/support/murmur_hash.h', - 'src/core/lib/support/stack_lockfree.h', - 'src/core/lib/support/string.h', - 'src/core/lib/support/string_win32.h', - 'src/core/lib/support/thd_internal.h', - 'src/core/lib/support/time_precise.h', - 'src/core/lib/support/tmpfile.h', - '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/compress_filter.h', - 'src/core/lib/channel/connected_channel.h', - 'src/core/lib/channel/context.h', - 'src/core/lib/channel/http_client_filter.h', - 'src/core/lib/channel/http_server_filter.h', - 'src/core/lib/compression/algorithm_metadata.h', - 'src/core/lib/compression/message_compress.h', - 'src/core/lib/debug/trace.h', - 'src/core/lib/http/format_request.h', - 'src/core/lib/http/httpcli.h', - 'src/core/lib/http/parser.h', - 'src/core/lib/iomgr/closure.h', - 'src/core/lib/iomgr/endpoint.h', - 'src/core/lib/iomgr/endpoint_pair.h', - 'src/core/lib/iomgr/ev_poll_and_epoll_posix.h', - 'src/core/lib/iomgr/ev_posix.h', - 'src/core/lib/iomgr/exec_ctx.h', - 'src/core/lib/iomgr/executor.h', - 'src/core/lib/iomgr/iocp_windows.h', - 'src/core/lib/iomgr/iomgr.h', - 'src/core/lib/iomgr/iomgr_internal.h', - 'src/core/lib/iomgr/iomgr_posix.h', - 'src/core/lib/iomgr/pollset.h', - 'src/core/lib/iomgr/pollset_set.h', - 'src/core/lib/iomgr/pollset_set_windows.h', - 'src/core/lib/iomgr/pollset_windows.h', - 'src/core/lib/iomgr/resolve_address.h', - 'src/core/lib/iomgr/sockaddr.h', - 'src/core/lib/iomgr/sockaddr_posix.h', - 'src/core/lib/iomgr/sockaddr_utils.h', - 'src/core/lib/iomgr/sockaddr_win32.h', - 'src/core/lib/iomgr/socket_utils_posix.h', - 'src/core/lib/iomgr/socket_windows.h', - 'src/core/lib/iomgr/tcp_client.h', - 'src/core/lib/iomgr/tcp_posix.h', - 'src/core/lib/iomgr/tcp_server.h', - 'src/core/lib/iomgr/tcp_windows.h', - 'src/core/lib/iomgr/time_averaged_stats.h', - 'src/core/lib/iomgr/timer.h', - 'src/core/lib/iomgr/timer_heap.h', - 'src/core/lib/iomgr/udp_server.h', - 'src/core/lib/iomgr/unix_sockets_posix.h', - 'src/core/lib/iomgr/wakeup_fd_pipe.h', - 'src/core/lib/iomgr/wakeup_fd_posix.h', - 'src/core/lib/iomgr/workqueue.h', - 'src/core/lib/iomgr/workqueue_posix.h', - 'src/core/lib/iomgr/workqueue_windows.h', - 'src/core/lib/json/json.h', - 'src/core/lib/json/json_common.h', - 'src/core/lib/json/json_reader.h', - 'src/core/lib/json/json_writer.h', - 'src/core/lib/surface/api_trace.h', - 'src/core/lib/surface/call.h', - 'src/core/lib/surface/call_test_only.h', - 'src/core/lib/surface/channel.h', - 'src/core/lib/surface/channel_init.h', - 'src/core/lib/surface/channel_stack_type.h', - 'src/core/lib/surface/completion_queue.h', - 'src/core/lib/surface/event_string.h', - 'src/core/lib/surface/init.h', - 'src/core/lib/surface/lame_client.h', - 'src/core/lib/surface/server.h', - 'src/core/lib/surface/surface_trace.h', - 'src/core/lib/transport/byte_stream.h', - 'src/core/lib/transport/connectivity_state.h', - 'src/core/lib/transport/metadata.h', - 'src/core/lib/transport/metadata_batch.h', - 'src/core/lib/transport/static_metadata.h', - 'src/core/lib/transport/transport.h', - 'src/core/lib/transport/transport_impl.h', - 'src/core/ext/transport/chttp2/transport/bin_encoder.h', - 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', - 'src/core/ext/transport/chttp2/transport/frame.h', - 'src/core/ext/transport/chttp2/transport/frame_data.h', - 'src/core/ext/transport/chttp2/transport/frame_goaway.h', - 'src/core/ext/transport/chttp2/transport/frame_ping.h', - 'src/core/ext/transport/chttp2/transport/frame_rst_stream.h', - 'src/core/ext/transport/chttp2/transport/frame_settings.h', - 'src/core/ext/transport/chttp2/transport/frame_window_update.h', - 'src/core/ext/transport/chttp2/transport/hpack_encoder.h', - 'src/core/ext/transport/chttp2/transport/hpack_parser.h', - 'src/core/ext/transport/chttp2/transport/hpack_table.h', - 'src/core/ext/transport/chttp2/transport/http2_errors.h', - 'src/core/ext/transport/chttp2/transport/huffsyms.h', - 'src/core/ext/transport/chttp2/transport/incoming_metadata.h', - 'src/core/ext/transport/chttp2/transport/internal.h', - 'src/core/ext/transport/chttp2/transport/status_conversion.h', - 'src/core/ext/transport/chttp2/transport/stream_map.h', - 'src/core/ext/transport/chttp2/transport/timeout_encoding.h', - 'src/core/ext/transport/chttp2/transport/varint.h', - 'src/core/ext/transport/chttp2/alpn/alpn.h', - 'src/core/lib/security/auth_filters.h', - 'src/core/lib/security/b64.h', - 'src/core/lib/security/credentials.h', - 'src/core/lib/security/handshake.h', - 'src/core/lib/security/json_token.h', - 'src/core/lib/security/jwt_verifier.h', - 'src/core/lib/security/secure_endpoint.h', - 'src/core/lib/security/security_connector.h', - 'src/core/lib/security/security_context.h', - 'src/core/lib/tsi/fake_transport_security.h', - 'src/core/lib/tsi/ssl_transport_security.h', - 'src/core/lib/tsi/ssl_types.h', - 'src/core/lib/tsi/transport_security.h', - 'src/core/lib/tsi/transport_security_interface.h', - 'src/core/ext/client_config/client_channel.h', - 'src/core/ext/client_config/client_channel_factory.h', - 'src/core/ext/client_config/client_config.h', - 'src/core/ext/client_config/connector.h', - 'src/core/ext/client_config/initial_connect_string.h', - 'src/core/ext/client_config/lb_policy.h', - 'src/core/ext/client_config/lb_policy_factory.h', - 'src/core/ext/client_config/lb_policy_registry.h', - 'src/core/ext/client_config/parse_address.h', - 'src/core/ext/client_config/resolver.h', - 'src/core/ext/client_config/resolver_factory.h', - 'src/core/ext/client_config/resolver_registry.h', - 'src/core/ext/client_config/subchannel.h', - 'src/core/ext/client_config/subchannel_call_holder.h', - 'src/core/ext/client_config/subchannel_index.h', - 'src/core/ext/client_config/uri_parser.h', - 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', - 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h', - 'third_party/nanopb/pb.h', - 'third_party/nanopb/pb_common.h', - 'third_party/nanopb/pb_decode.h', - 'third_party/nanopb/pb_encode.h', - 'src/core/ext/census/aggregation.h', - 'src/core/ext/census/census_interface.h', - 'src/core/ext/census/census_rpc_stats.h', - 'src/core/ext/census/grpc_filter.h', - 'src/core/ext/census/mlog.h', - 'src/core/ext/census/rpc_metric_id.h' - - ss.header_mappings_dir = '.' - # This isn't officially supported in Cocoapods. We've asked for an alternative: - # https://github.com/CocoaPods/CocoaPods/issues/4386 - ss.xcconfig = { - 'USE_HEADERMAP' => 'NO', - 'ALWAYS_SEARCH_USER_PATHS' => 'NO', - 'USER_HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Private/gRPC"', - 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Private/gRPC/include"' - } - - ss.requires_arc = false - ss.libraries = 'z' - ss.dependency 'BoringSSL', '~> 2.0' - - # ss.compiler_flags = '-GCC_WARN_INHIBIT_ALL_WARNINGS', '-w' - end - - # Objective-C wrapper around the core gRPC library. - s.subspec 'GRPCClient' do |ss| - src_dir = "#{objc_dir}/GRPCClient" - ss.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}" - ss.private_header_files = "#{src_dir}/private/*.h" - ss.header_mappings_dir = "#{objc_dir}" - ss.dependency 'gRPC/C-Core' - ss.dependency 'gRPC/RxLibrary' + name = 'GRPCClient' + s.module_name = name + s.header_dir = name - # Certificates, to be able to establish TLS connections: - ss.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] } - end + src_dir = 'src/objective-c/GRPCClient' + s.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}" + s.private_header_files = "#{src_dir}/private/*.h" + s.header_mappings_dir = "#{src_dir}" - # RPC library for ProtocolBuffers, based on gRPC - s.subspec 'ProtoRPC' do |ss| - src_dir = "#{objc_dir}/ProtoRPC" - ss.source_files = "#{src_dir}/*.{h,m}" - ss.header_mappings_dir = "#{objc_dir}" + s.dependency 'gRPC-Core', version + s.dependency 'gRPC-RxLibrary', version - ss.dependency 'gRPC/GRPCClient' - ss.dependency 'gRPC/RxLibrary' - ss.dependency 'Protobuf', '~> 3.0.0-alpha-4' - end + # Certificates, to be able to establish TLS connections: + s.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] } end diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile index 7fe047aa21f..4cb94715709 100644 --- a/src/objective-c/tests/Podfile +++ b/src/objective-c/tests/Podfile @@ -7,6 +7,9 @@ def shared_pods pod 'Protobuf', :path => "../../../third_party/protobuf" pod 'BoringSSL', :podspec => ".." pod 'gRPC', :path => "../../.." + pod 'gRPC-Core', :path => "../../.." + pod 'gRPC-RxLibrary', :path => "../../.." + pod 'gRPC-ProtoRPC', :path => "../../.." pod 'RemoteTest', :path => "RemoteTestClient" end diff --git a/templates/gRPC.podspec.template b/templates/gRPC-Core.podspec.template similarity index 51% rename from templates/gRPC.podspec.template rename to templates/gRPC-Core.podspec.template index a9948a41df4..ebc23e14904 100644 --- a/templates/gRPC.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -53,77 +53,48 @@ return out %> Pod::Spec.new do |s| - s.name = 'gRPC' - version = '0.12.0' + s.name = 'gRPC-Core' + version = '0.14.0' s.version = version - s.summary = 'gRPC client library for iOS/OSX' + s.summary = 'Core cross-platform gRPC library, written in C' s.homepage = 'http://www.grpc.io' s.license = 'New BSD' s.authors = { 'The gRPC contributors' => 'grpc-packages@google.com' } - s.source = { :git => 'https://github.com/grpc/grpc.git', - :tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}" } + s.source = { + :git => 'https://github.com/grpc/grpc.git', + :tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}", + } - s.ios.deployment_target = '7.1' s.osx.deployment_target = '10.9' - s.requires_arc = true - - objc_dir = 'src/objective-c' - - # Reactive Extensions library for iOS. - s.subspec 'RxLibrary' do |ss| - src_dir = "#{objc_dir}/RxLibrary" - ss.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}" - ss.private_header_files = "#{src_dir}/private/*.h" - ss.header_mappings_dir = "#{objc_dir}" - end - - # Core cross-platform gRPC library, written in C. - s.subspec 'C-Core' do |ss| - ss.source_files = ${(',\n' + 22*' ').join('\'%s\'' % f for f in grpc_files(libs))} - - ss.private_header_files = ${(',\n' + 30*' ').join('\'%s\'' % f for f in grpc_private_headers(libs))} - - ss.header_mappings_dir = '.' - # This isn't officially supported in Cocoapods. We've asked for an alternative: - # https://github.com/CocoaPods/CocoaPods/issues/4386 - ss.xcconfig = { - 'USE_HEADERMAP' => 'NO', - 'ALWAYS_SEARCH_USER_PATHS' => 'NO', - 'USER_HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Private/gRPC"', - 'HEADER_SEARCH_PATHS' => '"$(PODS_ROOT)/Headers/Private/gRPC/include"' - } - - ss.requires_arc = false - ss.libraries = 'z' - ss.dependency 'BoringSSL', '~> 2.0' + s.requires_arc = false - # ss.compiler_flags = '-GCC_WARN_INHIBIT_ALL_WARNINGS', '-w' - end + name = 'grpc' + s.module_name = name + s.header_dir = name - # Objective-C wrapper around the core gRPC library. - s.subspec 'GRPCClient' do |ss| - src_dir = "#{objc_dir}/GRPCClient" - ss.source_files = "#{src_dir}/*.{h,m}", "#{src_dir}/**/*.{h,m}" - ss.private_header_files = "#{src_dir}/private/*.h" - ss.header_mappings_dir = "#{objc_dir}" + s.source_files = ${(',\n' + 19*' ').join('\'%s\'' % f for f in grpc_files(libs))} - ss.dependency 'gRPC/C-Core' - ss.dependency 'gRPC/RxLibrary' + s.private_header_files = ${(',\n' + 27*' ').join('\'%s\'' % f for f in grpc_private_headers(libs))} - # Certificates, to be able to establish TLS connections: - ss.resource_bundles = { 'gRPCCertificates' => ['etc/roots.pem'] } - end + s.header_mappings_dir = 'include/grpc' - # RPC library for ProtocolBuffers, based on gRPC - s.subspec 'ProtoRPC' do |ss| - src_dir = "#{objc_dir}/ProtoRPC" - ss.source_files = "#{src_dir}/*.{h,m}" - ss.header_mappings_dir = "#{objc_dir}" + src_root = '$(PODS_ROOT)/gRPC-Core' + # This isn't officially supported in Cocoapods. We've asked for an alternative: + # https://github.com/CocoaPods/CocoaPods/issues/4386 + public_build_settings = { + 'GRPC_SRC_ROOT' => src_root, + 'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(GRPC_SRC_ROOT)/include"', + } + private_build_settings = public_build_settings.merge({ + 'USE_HEADERMAP' => 'NO', + 'ALWAYS_SEARCH_USER_PATHS' => 'NO', + 'USER_HEADER_SEARCH_PATHS' => '"$(GRPC_SRC_ROOT)"', + }) + s.user_target_xcconfig = public_build_settings + s.pod_target_xcconfig = private_build_settings - ss.dependency 'gRPC/GRPCClient' - ss.dependency 'gRPC/RxLibrary' - ss.dependency 'Protobuf', '~> 3.0.0-alpha-4' - end + s.libraries = 'z' + s.dependency 'BoringSSL', '~> 3.0' end From 547f0656fc8ce1c97bf5311ef571a1ea86076945 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Sun, 1 May 2016 19:52:21 -0700 Subject: [PATCH 0975/1894] Add modulemap for gRPC core --- gRPC-Core.podspec | 2 ++ include/grpc/module.modulemap | 5 +++++ templates/gRPC-Core.podspec.template | 2 ++ 3 files changed, 9 insertions(+) create mode 100644 include/grpc/module.modulemap diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index c924ab3a5df..54e652eb1a2 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -56,6 +56,8 @@ Pod::Spec.new do |s| s.module_name = name s.header_dir = name + s.module_map = 'include/grpc/module.modulemap' + s.source_files = 'src/core/lib/profiling/timers.h', 'src/core/lib/support/backoff.h', 'src/core/lib/support/block_annotate.h', diff --git a/include/grpc/module.modulemap b/include/grpc/module.modulemap new file mode 100644 index 00000000000..ae11a78b74a --- /dev/null +++ b/include/grpc/module.modulemap @@ -0,0 +1,5 @@ +framework module grpc { + umbrella header "grpc.h" + export * + module * { export * } +} diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index ebc23e14904..efe3738c420 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -74,6 +74,8 @@ s.module_name = name s.header_dir = name + s.module_map = 'include/grpc/module.modulemap' + s.source_files = ${(',\n' + 19*' ').join('\'%s\'' % f for f in grpc_files(libs))} s.private_header_files = ${(',\n' + 27*' ').join('\'%s\'' % f for f in grpc_private_headers(libs))} From fb4a54541a6e00c43e1671cda0a25e2eda4792df Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Fri, 3 Jun 2016 17:34:24 -0700 Subject: [PATCH 0976/1894] ProtoRPC: Framework-like import of proto runtime --- src/objective-c/ProtoRPC/ProtoRPC.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objective-c/ProtoRPC/ProtoRPC.m b/src/objective-c/ProtoRPC/ProtoRPC.m index 9bf66f347ac..b526708c580 100644 --- a/src/objective-c/ProtoRPC/ProtoRPC.m +++ b/src/objective-c/ProtoRPC/ProtoRPC.m @@ -33,7 +33,7 @@ #import "ProtoRPC.h" -#import +#import #import #import From 12e03fe30a97c8d4b8d7dcd0c8690b19cc4b35f7 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Wed, 8 Jun 2016 12:53:04 -0700 Subject: [PATCH 0977/1894] Tests Podfile: remove redundancy --- src/objective-c/tests/Podfile | 51 +++++++++++++++-------------------- 1 file changed, 21 insertions(+), 30 deletions(-) diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile index 4cb94715709..f36c60c9970 100644 --- a/src/objective-c/tests/Podfile +++ b/src/objective-c/tests/Podfile @@ -3,36 +3,27 @@ platform :ios, '8.0' install! 'cocoapods', :deterministic_uuids => false -def shared_pods - pod 'Protobuf', :path => "../../../third_party/protobuf" - pod 'BoringSSL', :podspec => ".." - pod 'gRPC', :path => "../../.." - pod 'gRPC-Core', :path => "../../.." - pod 'gRPC-RxLibrary', :path => "../../.." - pod 'gRPC-ProtoRPC', :path => "../../.." - pod 'RemoteTest', :path => "RemoteTestClient" +# Location of gRPC's repo root relative to this file. +GRPC_LOCAL_SRC = '../../..' + +# Install the dependencies in the main target plus all test targets. +%w( + Tests + AllTests + RxLibraryUnitTests + InteropTestsRemote + InteropTestsLocalSSL + InteropTestsLocalCleartext +).each do |target_name| + target target_name do + pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf" + pod 'BoringSSL', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c" + pod 'gRPC', :path => GRPC_LOCAL_SRC + pod 'gRPC-Core', :path => GRPC_LOCAL_SRC + pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC + pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC + pod 'RemoteTest', :path => "RemoteTestClient" + end end -target 'Tests' do - shared_pods -end - -target 'AllTests' do - shared_pods -end - -target 'RxLibraryUnitTests' do - shared_pods -end - -target 'InteropTestsRemote' do - shared_pods -end - -target 'InteropTestsLocalSSL' do - shared_pods -end - -target 'InteropTestsLocalCleartext' do - shared_pods end From eb71417df91abe8515f522b242003630e664e7df Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Wed, 8 Jun 2016 14:43:37 -0700 Subject: [PATCH 0978/1894] Podspec changes for generated code. --- src/objective-c/tests/RemoteTestClient/RemoteTest.podspec | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec b/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec index e1fd9910389..7bf81c94e49 100644 --- a/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec +++ b/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec @@ -23,13 +23,17 @@ Pod::Spec.new do |s| ms.header_mappings_dir = "." ms.requires_arc = false ms.dependency "Protobuf", "~> 3.0.0-alpha-4" + # This is needed by all pods that depend on Protobuf: + ms.pod_target_xcconfig = { + 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1', + } end s.subspec "Services" do |ss| ss.source_files = "*.pbrpc.{h,m}" ss.header_mappings_dir = "." ss.requires_arc = true - ss.dependency "gRPC", "~> 0.12" + ss.dependency "gRPC-ProtoRPC", "~> 0.14" ss.dependency "#{s.name}/Messages" end end From 2f46326213a466b24137b60d9a8660cb07ccfe31 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Wed, 8 Jun 2016 14:51:41 -0700 Subject: [PATCH 0979/1894] Pre-install hook in the Tests podspec for local dev of gRPC-Core --- src/objective-c/tests/Podfile | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile index f36c60c9970..41814f18afb 100644 --- a/src/objective-c/tests/Podfile +++ b/src/objective-c/tests/Podfile @@ -26,4 +26,36 @@ GRPC_LOCAL_SRC = '../../..' end end +# gRPC-Core.podspec needs to be modified to be successfully used for local development. A Podfile's +# pre_install hook lets us do that. The block passed to it runs after the podspecs are downloaded +# and before they are installed in the user project. +# +# This podspec searches for the gRPC core library headers under "$(PODS_ROOT)/gRPC-Core", where +# Cocoapods normally places the downloaded sources. When doing local development of the libraries, +# though, Cocoapods just takes the sources from whatever directory was specified using `:path`, and +# doesn't copy them under $(PODS_ROOT). When using static libraries, one can sometimes rely on the +# symbolic links to the pods headers that Cocoapods creates under "$(PODS_ROOT)/Headers". But those +# aren't created when using dynamic frameworks. So our solution is to modify the podspec on the fly +# to point at the local directory where the sources are. +# +# TODO(jcanizales): Send a PR to Cocoapods to get rid of this need. +pre_install do |installer| + # This is the gRPC-Core podspec object, as initialized by its podspec file. + grpc_core_spec = installer.pod_targets.find{|t| t.name == 'gRPC-Core'}.root_spec + + # Copied from gRPC-Core.podspec, except for the adjusted src_root: + + src_root = "$(PODS_ROOT)/../#{GRPC_LOCAL_SRC}" + + public_build_settings = { + 'GRPC_SRC_ROOT' => src_root, + 'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(GRPC_SRC_ROOT)/include"', + } + private_build_settings = public_build_settings.merge({ + 'USE_HEADERMAP' => 'NO', + 'ALWAYS_SEARCH_USER_PATHS' => 'NO', + 'USER_HEADER_SEARCH_PATHS' => '"$(GRPC_SRC_ROOT)"', + }) + grpc_core_spec.user_target_xcconfig = public_build_settings + grpc_core_spec.pod_target_xcconfig = private_build_settings end From 66c8ddd9201f1da0476f5f85ce27c34c867d27d0 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Wed, 8 Jun 2016 17:39:40 -0700 Subject: [PATCH 0980/1894] gRPC-Core.podspec: init submodules, for nanopb --- gRPC-Core.podspec | 1 + templates/gRPC-Core.podspec.template | 1 + 2 files changed, 2 insertions(+) diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 54e652eb1a2..5d21ca94ded 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -46,6 +46,7 @@ Pod::Spec.new do |s| s.source = { :git => 'https://github.com/grpc/grpc.git', :tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}", + :submodules => true, } s.ios.deployment_target = '7.1' diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index efe3738c420..a634d46a482 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -64,6 +64,7 @@ s.source = { :git => 'https://github.com/grpc/grpc.git', :tag => "release-#{version.gsub(/\./, '_')}-objectivec-#{version}", + :submodules => true, } s.ios.deployment_target = '7.1' From db502a79862c1db33da355e7c2ebaf97019132b6 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Wed, 8 Jun 2016 19:20:16 -0700 Subject: [PATCH 0981/1894] Update documentation and samples. --- gRPC-ProtoRPC.podspec | 2 +- src/objective-c/README.md | 12 ++++- .../RemoteTestClient/RemoteTest.podspec | 30 ++++++++----- src/objective-c/examples/Sample/Podfile | 18 ++++++-- .../Sample/Sample.xcodeproj/project.pbxproj | 44 ++++++++++++++----- src/objective-c/examples/SwiftSample/Podfile | 18 ++++++-- .../SwiftSample.xcodeproj/project.pbxproj | 36 ++++++++------- .../tests/RemoteTestClient/RemoteTest.podspec | 2 +- 8 files changed, 113 insertions(+), 49 deletions(-) diff --git a/gRPC-ProtoRPC.podspec b/gRPC-ProtoRPC.podspec index 1ff539d5ee6..6f66f928e6b 100644 --- a/gRPC-ProtoRPC.podspec +++ b/gRPC-ProtoRPC.podspec @@ -61,7 +61,7 @@ Pod::Spec.new do |s| s.dependency 'gRPC', version s.dependency 'gRPC-RxLibrary', version - s.dependency 'Protobuf', '~> 3.0.0-alpha-4' + s.dependency 'Protobuf', '~> 3.0.0-beta-2' # This is needed by all pods that depend on Protobuf: s.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1', diff --git a/src/objective-c/README.md b/src/objective-c/README.md index 30d9aad64cd..736c324ca95 100644 --- a/src/objective-c/README.md +++ b/src/objective-c/README.md @@ -47,6 +47,10 @@ Pod::Spec.new do |s| s.name = '' s.version = '0.0.1' s.license = '...' + s.authors = { '' => '' } + s.homepage = '...' + s.summary = '...' + s.source = { :git => 'https://github.com/...' } s.ios.deployment_target = '7.1' s.osx.deployment_target = '10.9' @@ -60,7 +64,11 @@ Pod::Spec.new do |s| ms.source_files = "*.pbobjc.{h,m}" ms.header_mappings_dir = "." ms.requires_arc = false - ms.dependency "Protobuf", "~> 3.0.0-alpha-4" + ms.dependency "Protobuf", "~> 3.0.0-beta-2" + # This is needed by all pods that depend on Protobuf: + ms.pod_target_xcconfig = { + 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1', + } end # The --objcgrpc_out plugin generates a pair of .pbrpc.h/.pbrpc.m files for each .proto file with @@ -69,7 +77,7 @@ Pod::Spec.new do |s| ss.source_files = "*.pbrpc.{h,m}" ss.header_mappings_dir = "." ss.requires_arc = true - ss.dependency "gRPC", "~> 0.12" + ss.dependency "gRPC-ProtoRPC", "~> 0.14" ss.dependency "#{s.name}/Messages" end end diff --git a/src/objective-c/examples/RemoteTestClient/RemoteTest.podspec b/src/objective-c/examples/RemoteTestClient/RemoteTest.podspec index 5addf26fc46..18a9443944a 100644 --- a/src/objective-c/examples/RemoteTestClient/RemoteTest.podspec +++ b/src/objective-c/examples/RemoteTestClient/RemoteTest.podspec @@ -1,7 +1,11 @@ Pod::Spec.new do |s| - s.name = "RemoteTest" - s.version = "0.0.1" - s.license = "New BSD" + s.name = 'RemoteTest' + s.version = '0.0.1' + s.license = 'New BSD' + s.authors = { 'gRPC contributors' => 'grpc-io@googlegroups.com' } + s.homepage = 'http://www.grpc.io/' + s.summary = 'RemoteTest example' + s.source = { :git => 'https://github.com/grpc/grpc.git' } s.ios.deployment_target = '7.1' s.osx.deployment_target = '10.9' @@ -11,18 +15,22 @@ Pod::Spec.new do |s| protoc --objc_out=. --objcgrpc_out=. *.proto CMD - s.subspec "Messages" do |ms| - ms.source_files = "*.pbobjc.{h,m}" - ms.header_mappings_dir = "." + s.subspec 'Messages' do |ms| + ms.source_files = '*.pbobjc.{h,m}' + ms.header_mappings_dir = '.' ms.requires_arc = false - ms.dependency "Protobuf", "~> 3.0.0-alpha-4" + ms.dependency 'Protobuf', '~> 3.0.0-beta-2' + # This is needed by all pods that depend on Protobuf: + ms.pod_target_xcconfig = { + 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1', + } end - s.subspec "Services" do |ss| - ss.source_files = "*.pbrpc.{h,m}" - ss.header_mappings_dir = "." + s.subspec 'Services' do |ss| + ss.source_files = '*.pbrpc.{h,m}' + ss.header_mappings_dir = '.' ss.requires_arc = true - ss.dependency "gRPC", "~> 0.12" + ss.dependency 'gRPC-ProtoRPC', '~> 0.14' ss.dependency "#{s.name}/Messages" end end diff --git a/src/objective-c/examples/Sample/Podfile b/src/objective-c/examples/Sample/Podfile index 93859fb7340..77e37e98afd 100644 --- a/src/objective-c/examples/Sample/Podfile +++ b/src/objective-c/examples/Sample/Podfile @@ -1,10 +1,20 @@ source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' -pod 'Protobuf', :path => "../../../../third_party/protobuf" -pod 'BoringSSL', :podspec => "../.." -pod 'gRPC', :path => "../../../.." -pod 'RemoteTest', :path => "../RemoteTestClient" +install! 'cocoapods', :deterministic_uuids => false + +# Location of gRPC's repo root relative to this file. +GRPC_LOCAL_SRC = '../../../..' target 'Sample' do + pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf" + + pod 'BoringSSL', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c" + + pod 'gRPC', :path => GRPC_LOCAL_SRC + pod 'gRPC-Core', :path => GRPC_LOCAL_SRC + pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC + pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC + + pod 'RemoteTest', :path => "../RemoteTestClient" end diff --git a/src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj b/src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj index 611eb6032d5..067ff3a13b9 100644 --- a/src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj +++ b/src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj @@ -12,10 +12,11 @@ 6369A2761A9322E20015FC5C /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6369A2751A9322E20015FC5C /* ViewController.m */; }; 6369A2791A9322E20015FC5C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6369A2771A9322E20015FC5C /* Main.storyboard */; }; 6369A27B1A9322E20015FC5C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6369A27A1A9322E20015FC5C /* Images.xcassets */; }; - FC81FE63CA655031F3524EC0 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DC7B7C4C0410F43B9621631 /* libPods.a */; }; + AF4A3AE4267AAFB18431B287 /* libPods-Sample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 0E797A3F68012317421BA87E /* libPods-Sample.a */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ + 0E797A3F68012317421BA87E /* libPods-Sample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Sample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; 2DC7B7C4C0410F43B9621631 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 6369A26A1A9322E20015FC5C /* Sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Sample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 6369A26E1A9322E20015FC5C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; @@ -26,6 +27,8 @@ 6369A2751A9322E20015FC5C /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 6369A2781A9322E20015FC5C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 6369A27A1A9322E20015FC5C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; + 7F4A2C3C7ABEB427FB51922C /* Pods-Sample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Sample.release.xcconfig"; path = "Pods/Target Support Files/Pods-Sample/Pods-Sample.release.xcconfig"; sourceTree = ""; }; + 7FB00EC776A4A5F68401AE2B /* Pods-Sample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Sample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Sample/Pods-Sample.debug.xcconfig"; sourceTree = ""; }; AC29DD6FCDF962F519FEBB0D /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; C68330F8D451CC6ACEABA09F /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ @@ -35,7 +38,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - FC81FE63CA655031F3524EC0 /* libPods.a in Frameworks */, + AF4A3AE4267AAFB18431B287 /* libPods-Sample.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -88,6 +91,8 @@ children = ( AC29DD6FCDF962F519FEBB0D /* Pods.debug.xcconfig */, C68330F8D451CC6ACEABA09F /* Pods.release.xcconfig */, + 7FB00EC776A4A5F68401AE2B /* Pods-Sample.debug.xcconfig */, + 7F4A2C3C7ABEB427FB51922C /* Pods-Sample.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -96,6 +101,7 @@ isa = PBXGroup; children = ( 2DC7B7C4C0410F43B9621631 /* libPods.a */, + 0E797A3F68012317421BA87E /* libPods-Sample.a */, ); name = Frameworks; sourceTree = ""; @@ -107,11 +113,12 @@ isa = PBXNativeTarget; buildConfigurationList = 6369A28D1A9322E20015FC5C /* Build configuration list for PBXNativeTarget "Sample" */; buildPhases = ( - 41F7486D8F66994B0BFB84AF /* Check Pods Manifest.lock */, + 41F7486D8F66994B0BFB84AF /* 📦 Check Pods Manifest.lock */, 6369A2661A9322E20015FC5C /* Sources */, 6369A2671A9322E20015FC5C /* Frameworks */, 6369A2681A9322E20015FC5C /* Resources */, - 04554623324BE4A838846086 /* Copy Pods Resources */, + 04554623324BE4A838846086 /* 📦 Copy Pods Resources */, + D2E32169A6ED4D88151F0046 /* 📦 Embed Pods Frameworks */, ); buildRules = ( ); @@ -167,29 +174,29 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 04554623324BE4A838846086 /* Copy Pods Resources */ = { + 04554623324BE4A838846086 /* 📦 Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Copy Pods Resources"; + name = "📦 Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Sample/Pods-Sample-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 41F7486D8F66994B0BFB84AF /* Check Pods Manifest.lock */ = { + 41F7486D8F66994B0BFB84AF /* 📦 Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Check Pods Manifest.lock"; + name = "📦 Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -197,6 +204,21 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; + D2E32169A6ED4D88151F0046 /* 📦 Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "📦 Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Sample/Pods-Sample-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -304,7 +326,7 @@ }; 6369A28E1A9322E20015FC5C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AC29DD6FCDF962F519FEBB0D /* Pods.debug.xcconfig */; + baseConfigurationReference = 7FB00EC776A4A5F68401AE2B /* Pods-Sample.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Sample/Info.plist; @@ -315,7 +337,7 @@ }; 6369A28F1A9322E20015FC5C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C68330F8D451CC6ACEABA09F /* Pods.release.xcconfig */; + baseConfigurationReference = 7F4A2C3C7ABEB427FB51922C /* Pods-Sample.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Sample/Info.plist; diff --git a/src/objective-c/examples/SwiftSample/Podfile b/src/objective-c/examples/SwiftSample/Podfile index f2df4a34a34..2e789c3ef1c 100644 --- a/src/objective-c/examples/SwiftSample/Podfile +++ b/src/objective-c/examples/SwiftSample/Podfile @@ -1,10 +1,20 @@ source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' -pod 'Protobuf', :path => "../../../../third_party/protobuf" -pod 'BoringSSL', :podspec => "../.." -pod 'gRPC', :path => "../../../.." -pod 'RemoteTest', :path => "../RemoteTestClient" +install! 'cocoapods', :deterministic_uuids => false + +# Location of gRPC's repo root relative to this file. +GRPC_LOCAL_SRC = '../../../..' target 'SwiftSample' do + pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf" + + pod 'BoringSSL', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c" + + pod 'gRPC', :path => GRPC_LOCAL_SRC + pod 'gRPC-Core', :path => GRPC_LOCAL_SRC + pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC + pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC + + pod 'RemoteTest', :path => "../RemoteTestClient" end diff --git a/src/objective-c/examples/SwiftSample/SwiftSample.xcodeproj/project.pbxproj b/src/objective-c/examples/SwiftSample/SwiftSample.xcodeproj/project.pbxproj index 2f5716082bf..2f9a41875d1 100644 --- a/src/objective-c/examples/SwiftSample/SwiftSample.xcodeproj/project.pbxproj +++ b/src/objective-c/examples/SwiftSample/SwiftSample.xcodeproj/project.pbxproj @@ -7,15 +7,16 @@ objects = { /* Begin PBXBuildFile section */ - 253D3A297105CA46DA960A11 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DC58ACA18DCCB1553531B885 /* libPods.a */; }; 633BFFC81B950B210007E424 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 633BFFC71B950B210007E424 /* AppDelegate.swift */; }; 633BFFCA1B950B210007E424 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 633BFFC91B950B210007E424 /* ViewController.swift */; }; 633BFFCD1B950B210007E424 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 633BFFCB1B950B210007E424 /* Main.storyboard */; }; 633BFFCF1B950B210007E424 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 633BFFCE1B950B210007E424 /* Images.xcassets */; }; + AE76C196CEB7CF33421129CD /* libPods-SwiftSample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = FBDB042A015267195A988FFB /* libPods-SwiftSample.a */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ 12C7B447AA80E624D93B5C54 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; + 5ABC04686A90EA11D0BD35A1 /* Pods-SwiftSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftSample.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftSample/Pods-SwiftSample.release.xcconfig"; sourceTree = ""; }; 633BFFC21B950B210007E424 /* SwiftSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 633BFFC61B950B210007E424 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 633BFFC71B950B210007E424 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -24,7 +25,9 @@ 633BFFCE1B950B210007E424 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 6367AD231B951655007FD3A4 /* Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Bridging-Header.h"; sourceTree = ""; }; C335CBC4C160E0D9EDEE646B /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; + C4278D3EA95326A34DF5D15F /* Pods-SwiftSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftSample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftSample/Pods-SwiftSample.debug.xcconfig"; sourceTree = ""; }; DC58ACA18DCCB1553531B885 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; + FBDB042A015267195A988FFB /* libPods-SwiftSample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SwiftSample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -32,7 +35,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 253D3A297105CA46DA960A11 /* libPods.a in Frameworks */, + AE76C196CEB7CF33421129CD /* libPods-SwiftSample.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -44,6 +47,8 @@ children = ( 12C7B447AA80E624D93B5C54 /* Pods.debug.xcconfig */, C335CBC4C160E0D9EDEE646B /* Pods.release.xcconfig */, + C4278D3EA95326A34DF5D15F /* Pods-SwiftSample.debug.xcconfig */, + 5ABC04686A90EA11D0BD35A1 /* Pods-SwiftSample.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -91,6 +96,7 @@ isa = PBXGroup; children = ( DC58ACA18DCCB1553531B885 /* libPods.a */, + FBDB042A015267195A988FFB /* libPods-SwiftSample.a */, ); name = Frameworks; sourceTree = ""; @@ -102,12 +108,12 @@ isa = PBXNativeTarget; buildConfigurationList = 633BFFE11B950B210007E424 /* Build configuration list for PBXNativeTarget "SwiftSample" */; buildPhases = ( - 6BEEB33CA2705D7D2F2210E6 /* Check Pods Manifest.lock */, + 6BEEB33CA2705D7D2F2210E6 /* 📦 Check Pods Manifest.lock */, 633BFFBE1B950B210007E424 /* Sources */, 633BFFBF1B950B210007E424 /* Frameworks */, 633BFFC01B950B210007E424 /* Resources */, - AC2F6F9AB1C090BB0BEE6E4D /* Copy Pods Resources */, - A1738A987353B0BF2C64F0F7 /* Embed Pods Frameworks */, + AC2F6F9AB1C090BB0BEE6E4D /* 📦 Copy Pods Resources */, + A1738A987353B0BF2C64F0F7 /* 📦 Embed Pods Frameworks */, ); buildRules = ( ); @@ -164,14 +170,14 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 6BEEB33CA2705D7D2F2210E6 /* Check Pods Manifest.lock */ = { + 6BEEB33CA2705D7D2F2210E6 /* 📦 Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Check Pods Manifest.lock"; + name = "📦 Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -179,34 +185,34 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - A1738A987353B0BF2C64F0F7 /* Embed Pods Frameworks */ = { + A1738A987353B0BF2C64F0F7 /* 📦 Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Embed Pods Frameworks"; + name = "📦 Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwiftSample/Pods-SwiftSample-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - AC2F6F9AB1C090BB0BEE6E4D /* Copy Pods Resources */ = { + AC2F6F9AB1C090BB0BEE6E4D /* 📦 Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Copy Pods Resources"; + name = "📦 Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwiftSample/Pods-SwiftSample-resources.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -320,7 +326,7 @@ }; 633BFFE21B950B210007E424 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 12C7B447AA80E624D93B5C54 /* Pods.debug.xcconfig */; + baseConfigurationReference = C4278D3EA95326A34DF5D15F /* Pods-SwiftSample.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Info.plist; @@ -333,7 +339,7 @@ }; 633BFFE31B950B210007E424 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C335CBC4C160E0D9EDEE646B /* Pods.release.xcconfig */; + baseConfigurationReference = 5ABC04686A90EA11D0BD35A1 /* Pods-SwiftSample.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Info.plist; diff --git a/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec b/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec index 7bf81c94e49..8e72b2c8fe3 100644 --- a/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec +++ b/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec @@ -22,7 +22,7 @@ Pod::Spec.new do |s| ms.source_files = "*.pbobjc.{h,m}" ms.header_mappings_dir = "." ms.requires_arc = false - ms.dependency "Protobuf", "~> 3.0.0-alpha-4" + ms.dependency "Protobuf", "~> 3.0.0-beta-2" # This is needed by all pods that depend on Protobuf: ms.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1', From 8e93533f65938a83760f522c9825cd903a307f03 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 8 Jun 2016 19:45:54 -0700 Subject: [PATCH 0982/1894] allow shutdown of unstarted server --- src/csharp/Grpc.Core.Tests/ServerTest.cs | 8 ++++++++ src/csharp/Grpc.Core/Server.cs | 3 +-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/ServerTest.cs b/src/csharp/Grpc.Core.Tests/ServerTest.cs index 5f7144611e5..3b51aa63300 100644 --- a/src/csharp/Grpc.Core.Tests/ServerTest.cs +++ b/src/csharp/Grpc.Core.Tests/ServerTest.cs @@ -94,6 +94,14 @@ namespace Grpc.Core.Tests server.ShutdownAsync().Wait(); } + [Test] + public void UnstartedServerCanBeShutdown() + { + var server = new Server(); + server.ShutdownAsync().Wait(); + Assert.Throws(typeof(InvalidOperationException), () => server.Start()); + } + [Test] public void UnstartedServerDoesNotPreventShutdown() { diff --git a/src/csharp/Grpc.Core/Server.cs b/src/csharp/Grpc.Core/Server.cs index ae7a8c9a9a1..3b554e5e87e 100644 --- a/src/csharp/Grpc.Core/Server.cs +++ b/src/csharp/Grpc.Core/Server.cs @@ -140,6 +140,7 @@ namespace Grpc.Core lock (myLock) { GrpcPreconditions.CheckState(!startRequested); + GrpcPreconditions.CheckState(!shutdownRequested); startRequested = true; handle.Start(); @@ -203,7 +204,6 @@ namespace Grpc.Core { lock (myLock) { - GrpcPreconditions.CheckState(startRequested); GrpcPreconditions.CheckState(!shutdownRequested); shutdownRequested = true; } @@ -215,7 +215,6 @@ namespace Grpc.Core { handle.CancelAllCalls(); } - await ShutdownCompleteOrEnvironmentDeadAsync().ConfigureAwait(false); DisposeHandle(); From 3775074c8606f728d1d58949aaa13852701d6471 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Wed, 8 Jun 2016 20:10:20 -0700 Subject: [PATCH 0983/1894] Clean up and document gRPC-Core.podspec better --- gRPC-Core.podspec | 49 ++++++++++++++++------------ templates/gRPC-Core.podspec.template | 21 ++++++++---- 2 files changed, 44 insertions(+), 26 deletions(-) diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 5d21ca94ded..6411e348be8 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -57,8 +57,37 @@ Pod::Spec.new do |s| s.module_name = name s.header_dir = name + s.header_mappings_dir = 'include/grpc' + + src_root = '$(PODS_ROOT)/gRPC-Core' + # This isn't officially supported in Cocoapods. We've asked for an alternative: + # https://github.com/CocoaPods/CocoaPods/issues/4386 + # + # The src_root value of $(PODS_ROOT)/gRPC-Core assumes Cocoapods is installing this pod from its + # remote repo. For local development of this library, enabled by using ":path" in the Podfile, + # that assumption is wrong. In such case, the following settings need to be reset with the + # appropriate value of src_root. This can be accomplished in the pre_install hook of the Podfile; + # see src/objective-c/tests/Podfile for an example. + public_build_settings = { + 'GRPC_SRC_ROOT' => src_root, + 'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(GRPC_SRC_ROOT)/include"', + } + private_build_settings = public_build_settings.merge({ + 'USE_HEADERMAP' => 'NO', + 'ALWAYS_SEARCH_USER_PATHS' => 'NO', + 'USER_HEADER_SEARCH_PATHS' => '"$(GRPC_SRC_ROOT)"', + }) + s.user_target_xcconfig = public_build_settings + s.pod_target_xcconfig = private_build_settings + + s.libraries = 'z' + s.dependency 'BoringSSL', '~> 3.0' + + # A module map is necessary for a dynamic framework to be correctly created by Cocoapods. s.module_map = 'include/grpc/module.modulemap' + # List of source files generated by a template. To save you from scrolling, this is the last part + # of the podspec. s.source_files = 'src/core/lib/profiling/timers.h', 'src/core/lib/support/backoff.h', 'src/core/lib/support/block_annotate.h', @@ -638,24 +667,4 @@ Pod::Spec.new do |s| 'src/core/ext/census/grpc_filter.h', 'src/core/ext/census/mlog.h', 'src/core/ext/census/rpc_metric_id.h' - - s.header_mappings_dir = 'include/grpc' - - src_root = '$(PODS_ROOT)/gRPC-Core' - # This isn't officially supported in Cocoapods. We've asked for an alternative: - # https://github.com/CocoaPods/CocoaPods/issues/4386 - public_build_settings = { - 'GRPC_SRC_ROOT' => src_root, - 'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(GRPC_SRC_ROOT)/include"', - } - private_build_settings = public_build_settings.merge({ - 'USE_HEADERMAP' => 'NO', - 'ALWAYS_SEARCH_USER_PATHS' => 'NO', - 'USER_HEADER_SEARCH_PATHS' => '"$(GRPC_SRC_ROOT)"', - }) - s.user_target_xcconfig = public_build_settings - s.pod_target_xcconfig = private_build_settings - - s.libraries = 'z' - s.dependency 'BoringSSL', '~> 3.0' end diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index a634d46a482..4572a6151f6 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -75,17 +75,17 @@ s.module_name = name s.header_dir = name - s.module_map = 'include/grpc/module.modulemap' - - s.source_files = ${(',\n' + 19*' ').join('\'%s\'' % f for f in grpc_files(libs))} - - s.private_header_files = ${(',\n' + 27*' ').join('\'%s\'' % f for f in grpc_private_headers(libs))} - s.header_mappings_dir = 'include/grpc' src_root = '$(PODS_ROOT)/gRPC-Core' # This isn't officially supported in Cocoapods. We've asked for an alternative: # https://github.com/CocoaPods/CocoaPods/issues/4386 + # + # The src_root value of $(PODS_ROOT)/gRPC-Core assumes Cocoapods is installing this pod from its + # remote repo. For local development of this library, enabled by using ":path" in the Podfile, + # that assumption is wrong. In such case, the following settings need to be reset with the + # appropriate value of src_root. This can be accomplished in the pre_install hook of the Podfile; + # see src/objective-c/tests/Podfile for an example. public_build_settings = { 'GRPC_SRC_ROOT' => src_root, 'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(GRPC_SRC_ROOT)/include"', @@ -100,4 +100,13 @@ s.libraries = 'z' s.dependency 'BoringSSL', '~> 3.0' + + # A module map is necessary for a dynamic framework to be correctly created by Cocoapods. + s.module_map = 'include/grpc/module.modulemap' + + # List of source files generated by a template. To save you from scrolling, this is the last part + # of the podspec. + s.source_files = ${(',\n' + 19*' ').join('\'%s\'' % f for f in grpc_files(libs))} + + s.private_header_files = ${(',\n' + 27*' ').join('\'%s\'' % f for f in grpc_private_headers(libs))} end From 8e4926c0eeb0df9e5c8029136e39f6c8700f0814 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 8 Jun 2016 20:33:19 -0700 Subject: [PATCH 0984/1894] pollset_kick optimization (do not kick any other thread if the current thread can be kicked) --- src/core/lib/iomgr/ev_epoll_linux.c | 153 ++++++++++++++++------------ 1 file changed, 87 insertions(+), 66 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 046ec5e7407..d45f87c2f8e 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -844,6 +844,8 @@ static void fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, /******************************************************************************* * Pollset Definitions */ +GPR_TLS_DECL(g_current_thread_pollset); +GPR_TLS_DECL(g_current_thread_worker); static void sig_handler(int sig_num) { #ifdef GRPC_EPOLL_DEBUG @@ -859,11 +861,15 @@ static void poller_kick_init() { /* Global state management */ static void pollset_global_init(void) { grpc_wakeup_fd_init(&grpc_global_wakeup_fd); + gpr_tls_init(&g_current_thread_pollset); + gpr_tls_init(&g_current_thread_worker); poller_kick_init(); } static void pollset_global_shutdown(void) { grpc_wakeup_fd_destroy(&grpc_global_wakeup_fd); + gpr_tls_destroy(&g_current_thread_pollset); + gpr_tls_destroy(&g_current_thread_worker); } static void pollset_worker_kick(grpc_pollset_worker *worker) { @@ -915,7 +921,9 @@ static void pollset_kick(grpc_pollset *p, GPR_TIMER_BEGIN("pollset_kick.broadcast", 0); for (worker = p->root_worker.next; worker != &p->root_worker; worker = worker->next) { - pollset_worker_kick(worker); + if (gpr_tls_get(&g_current_thread_worker) != (intptr_t)worker) { + pollset_worker_kick(worker); + } } } else { p->kicked_without_pollers = true; @@ -923,9 +931,18 @@ static void pollset_kick(grpc_pollset *p, GPR_TIMER_END("pollset_kick.broadcast", 0); } else { GPR_TIMER_MARK("kicked_specifically", 0); - pollset_worker_kick(worker); + if (gpr_tls_get(&g_current_thread_worker) != (intptr_t)worker) { + pollset_worker_kick(worker); + } } - } else { + } else if (gpr_tls_get(&g_current_thread_pollset) != (intptr_t)p) { + /* Since worker == NULL, it means that we can kick "any" worker on this + pollset 'p'. If 'p' happens to be the same pollset this thread is + currently polling (i.e in pollset_work() function), then there is no need + to kick any other worker since the current thread can just absorb the + kick. This is the reason why we enter this case only when + g_current_thread_pollset is != p */ + GPR_TIMER_MARK("kick_anonymous", 0); worker = pop_front_worker(p); if (worker != NULL) { @@ -999,6 +1016,69 @@ static void fd_become_writable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { gpr_mu_unlock(&fd->mu); } +/* Release the reference to pollset->polling_island and set it to NULL. + pollset->mu must be held */ +static void pollset_release_polling_island_locked(grpc_pollset *pollset) { + gpr_mu_lock(&pollset->pi_mu); + if (pollset->polling_island) { + pollset->polling_island = + polling_island_update_and_lock(pollset->polling_island, 1, 0); + polling_island_unref_and_unlock(pollset->polling_island, 1); + pollset->polling_island = NULL; + } + gpr_mu_unlock(&pollset->pi_mu); +} + +static void finish_shutdown_locked(grpc_exec_ctx *exec_ctx, + grpc_pollset *pollset) { + /* The pollset cannot have any workers if we are at this stage */ + GPR_ASSERT(!pollset_has_workers(pollset)); + + pollset->finish_shutdown_called = true; + pollset_release_polling_island_locked(pollset); + + grpc_exec_ctx_enqueue(exec_ctx, pollset->shutdown_done, true, NULL); +} + +/* pollset->mu lock must be held by the caller before calling this */ +static void pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, + grpc_closure *closure) { + GPR_TIMER_BEGIN("pollset_shutdown", 0); + GPR_ASSERT(!pollset->shutting_down); + pollset->shutting_down = true; + pollset->shutdown_done = closure; + pollset_kick(pollset, GRPC_POLLSET_KICK_BROADCAST); + + /* If the pollset has any workers, we cannot call finish_shutdown_locked() + because it would release the underlying polling island. In such a case, we + let the last worker call finish_shutdown_locked() from pollset_work() */ + if (!pollset_has_workers(pollset)) { + GPR_ASSERT(!pollset->finish_shutdown_called); + GPR_TIMER_MARK("pollset_shutdown.finish_shutdown_locked", 0); + finish_shutdown_locked(exec_ctx, pollset); + } + GPR_TIMER_END("pollset_shutdown", 0); +} + +/* pollset_shutdown is guaranteed to be called before pollset_destroy. So other + * than destroying the mutexes, there is nothing special that needs to be done + * here */ +static void pollset_destroy(grpc_pollset *pollset) { + GPR_ASSERT(!pollset_has_workers(pollset)); + gpr_mu_destroy(&pollset->pi_mu); + gpr_mu_destroy(&pollset->mu); +} + +static void pollset_reset(grpc_pollset *pollset) { + GPR_ASSERT(pollset->shutting_down); + GPR_ASSERT(!pollset_has_workers(pollset)); + pollset->shutting_down = false; + pollset->finish_shutdown_called = false; + pollset->kicked_without_pollers = false; + pollset->shutdown_done = NULL; + pollset_release_polling_island_locked(pollset); +} + #define GRPC_EPOLL_MAX_EVENTS 1000 static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, int timeout_ms, @@ -1103,69 +1183,6 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, GPR_TIMER_END("pollset_work_and_unlock", 0); } -/* Release the reference to pollset->polling_island and set it to NULL. - pollset->mu must be held */ -static void pollset_release_polling_island_locked(grpc_pollset *pollset) { - gpr_mu_lock(&pollset->pi_mu); - if (pollset->polling_island) { - pollset->polling_island = - polling_island_update_and_lock(pollset->polling_island, 1, 0); - polling_island_unref_and_unlock(pollset->polling_island, 1); - pollset->polling_island = NULL; - } - gpr_mu_unlock(&pollset->pi_mu); -} - -static void finish_shutdown_locked(grpc_exec_ctx *exec_ctx, - grpc_pollset *pollset) { - /* The pollset cannot have any workers if we are at this stage */ - GPR_ASSERT(!pollset_has_workers(pollset)); - - pollset->finish_shutdown_called = true; - pollset_release_polling_island_locked(pollset); - - grpc_exec_ctx_enqueue(exec_ctx, pollset->shutdown_done, true, NULL); -} - -/* pollset->mu lock must be held by the caller before calling this */ -static void pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_closure *closure) { - GPR_TIMER_BEGIN("pollset_shutdown", 0); - GPR_ASSERT(!pollset->shutting_down); - pollset->shutting_down = true; - pollset->shutdown_done = closure; - pollset_kick(pollset, GRPC_POLLSET_KICK_BROADCAST); - - /* If the pollset has any workers, we cannot call finish_shutdown_locked() - because it would release the underlying polling island. In such a case, we - let the last worker call finish_shutdown_locked() from pollset_work() */ - if (!pollset_has_workers(pollset)) { - GPR_ASSERT(!pollset->finish_shutdown_called); - GPR_TIMER_MARK("pollset_shutdown.finish_shutdown_locked", 0); - finish_shutdown_locked(exec_ctx, pollset); - } - GPR_TIMER_END("pollset_shutdown", 0); -} - -/* pollset_shutdown is guaranteed to be called before pollset_destroy. So other - * than destroying the mutexes, there is nothing special that needs to be done - * here */ -static void pollset_destroy(grpc_pollset *pollset) { - GPR_ASSERT(!pollset_has_workers(pollset)); - gpr_mu_destroy(&pollset->pi_mu); - gpr_mu_destroy(&pollset->mu); -} - -static void pollset_reset(grpc_pollset *pollset) { - GPR_ASSERT(pollset->shutting_down); - GPR_ASSERT(!pollset_has_workers(pollset)); - pollset->shutting_down = false; - pollset->finish_shutdown_called = false; - pollset->kicked_without_pollers = false; - pollset->shutdown_done = NULL; - pollset_release_polling_island_locked(pollset); -} - /* pollset->mu lock must be held by the caller before calling this. The function pollset_work() may temporarily release the lock (pollset->mu) during the course of its execution but it will always re-acquire the lock and @@ -1184,6 +1201,8 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, worker.pt_id = pthread_self(); *worker_hdl = &worker; + gpr_tls_set(&g_current_thread_pollset, (intptr_t)pollset); + gpr_tls_set(&g_current_thread_worker, (intptr_t)&worker); if (pollset->kicked_without_pollers) { /* If the pollset was kicked without pollers, pretend that the current @@ -1226,6 +1245,8 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, } *worker_hdl = NULL; + gpr_tls_set(&g_current_thread_pollset, (intptr_t)0); + gpr_tls_set(&g_current_thread_worker, (intptr_t)0); GPR_TIMER_END("pollset_work", 0); } From 0553a436610201b252cfce0ed5d2cea69da15e85 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 9 Jun 2016 00:42:41 -0700 Subject: [PATCH 0985/1894] Fix refcounting bug in polling_island_merge --- src/core/lib/iomgr/ev_epoll_linux.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index d45f87c2f8e..66bbae52b28 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -512,7 +512,6 @@ polling_island *polling_island_merge(polling_island *p, polling_island *q) { /* Get locks on both the polling islands */ polling_island_pair_update_and_lock(&p, &q); - /* TODO: sreek: Think about this scenario some more */ if (p == q) { /* Nothing needs to be done here */ gpr_mu_unlock(&p->mu); @@ -525,7 +524,7 @@ polling_island *polling_island_merge(polling_island *p, polling_island *q) { } /* "Merge" p with q i.e move all the fds from p (The one with fewer fds) to q - )Note that the refcounts on the fds being moved will not change here. This + Note that the refcounts on the fds being moved will not change here. This is why the last parameter in the following two functions is 'false') */ polling_island_add_fds_locked(q, p->fds, p->fd_cnt, false); polling_island_remove_all_fds_locked(p, false); @@ -533,9 +532,11 @@ polling_island *polling_island_merge(polling_island *p, polling_island *q) { /* Wakeup all the pollers (if any) on p so that they can pickup this change */ polling_island_add_wakeup_fd_locked(p, &polling_island_wakeup_fd); - /* The merged polling island inherits all the ref counts of the island merging - with it */ + /* - The merged polling island (i.e q) inherits all the ref counts of the + island merging with it (i.e p) + - The island p will lose a ref count */ q->ref_cnt += p->ref_cnt; + p->ref_cnt--; gpr_mu_unlock(&p->mu); gpr_mu_unlock(&q->mu); From ba947488012b89a13254e49a2c848d3ef6e3e1d0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 9 Jun 2016 08:03:49 -0700 Subject: [PATCH 0986/1894] Add error propagation --- src/core/lib/iomgr/socket_utils_common_posix.c | 12 ++++++++---- src/core/lib/iomgr/socket_utils_posix.h | 13 ++++--------- 2 files changed, 12 insertions(+), 13 deletions(-) diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index e2dfe398401..f4a2d60c2f6 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -117,14 +117,18 @@ grpc_error *grpc_set_socket_ipv6_recvpktinfo_if_possible(int fd) { return GRPC_ERROR_NONE; } -int grpc_set_socket_sndbuf(int fd, int buffer_size_bytes) { +grpc_error *grpc_set_socket_sndbuf(int fd, int buffer_size_bytes) { return 0 == setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &buffer_size_bytes, - sizeof(buffer_size_bytes)); + sizeof(buffer_size_bytes)) + ? GRPC_ERROR_NONE + : GRPC_OS_ERROR(errno, "setsockopt(SO_SNDBUF)"); } -int grpc_set_socket_rcvbuf(int fd, int buffer_size_bytes) { +grpc_error *grpc_set_socket_rcvbuf(int fd, int buffer_size_bytes) { return 0 == setsockopt(fd, SOL_SOCKET, SO_RCVBUF, &buffer_size_bytes, - sizeof(buffer_size_bytes)); + sizeof(buffer_size_bytes)) + ? GRPC_ERROR_NONE + : GRPC_OS_ERROR(errno, "setsockopt(SO_RCVBUF)"); } /* set a socket to close on exec */ diff --git a/src/core/lib/iomgr/socket_utils_posix.h b/src/core/lib/iomgr/socket_utils_posix.h index 4cbfc342e4e..30ff39dfa3f 100644 --- a/src/core/lib/iomgr/socket_utils_posix.h +++ b/src/core/lib/iomgr/socket_utils_posix.h @@ -66,27 +66,22 @@ grpc_error *grpc_set_socket_low_latency(int fd, int low_latency); int grpc_ipv6_loopback_available(void); /* Tries to set SO_NOSIGPIPE if available on this platform. - Returns 1 on success, 0 on failure. If SO_NO_SIGPIPE is not available, returns 1. */ grpc_error *grpc_set_socket_no_sigpipe_if_possible(int fd); /* Tries to set IP_PKTINFO if available on this platform. - Returns 1 on success, 0 on failure. If IP_PKTINFO is not available, returns 1. */ grpc_error *grpc_set_socket_ip_pktinfo_if_possible(int fd); /* Tries to set IPV6_RECVPKTINFO if available on this platform. - Returns 1 on success, 0 on failure. If IPV6_RECVPKTINFO is not available, returns 1. */ grpc_error *grpc_set_socket_ipv6_recvpktinfo_if_possible(int fd); -/* Tries to set the socket's send buffer to given size. - Returns 1 on success, 0 on failure. */ -int grpc_set_socket_sndbuf(int fd, int buffer_size_bytes); +/* Tries to set the socket's send buffer to given size. */ +grpc_error *grpc_set_socket_sndbuf(int fd, int buffer_size_bytes); -/* Tries to set the socket's receive buffer to given size. - Returns 1 on success, 0 on failure. */ -int grpc_set_socket_rcvbuf(int fd, int buffer_size_bytes); +/* Tries to set the socket's receive buffer to given size. */ +grpc_error *grpc_set_socket_rcvbuf(int fd, int buffer_size_bytes); /* An enum to keep track of IPv4/IPv6 socket modes. From 667557f22b1cc601c60d3227f209b8cf848738b5 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Thu, 9 Jun 2016 09:15:28 -0700 Subject: [PATCH 0987/1894] gRPC-Core.podspec: Clarify where the template is --- gRPC-Core.podspec | 12 ++++++------ templates/gRPC-Core.podspec.template | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 6411e348be8..68275e444b4 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -1,8 +1,7 @@ # GRPC CocoaPods podspec -# This file has been automatically generated from a template file. -# Please look at the templates directory instead. -# This file can be regenerated from the template by running -# tools/buildgen/generate_projects.sh +# This file has been automatically generated from a template file. Please make modifications to +# `templates/gRPC-Core.podspec.template` instead. This file can be regenerated from the template by +# running `tools/buildgen/generate_projects.sh`. # Copyright 2015, Google Inc. # All rights reserved. @@ -86,8 +85,9 @@ Pod::Spec.new do |s| # A module map is necessary for a dynamic framework to be correctly created by Cocoapods. s.module_map = 'include/grpc/module.modulemap' - # List of source files generated by a template. To save you from scrolling, this is the last part - # of the podspec. + # List of source files generated by a template: `templates/gRPC-Core.podspec.template`. It can be + # regenerated from the template by running `tools/buildgen/generate_projects.sh`. + # To save you from scrolling, this is the last part of the podspec. s.source_files = 'src/core/lib/profiling/timers.h', 'src/core/lib/support/backoff.h', 'src/core/lib/support/block_annotate.h', diff --git a/templates/gRPC-Core.podspec.template b/templates/gRPC-Core.podspec.template index 4572a6151f6..ee0ca4cafe0 100644 --- a/templates/gRPC-Core.podspec.template +++ b/templates/gRPC-Core.podspec.template @@ -1,10 +1,9 @@ %YAML 1.2 --- | # GRPC CocoaPods podspec - # This file has been automatically generated from a template file. - # Please look at the templates directory instead. - # This file can be regenerated from the template by running - # tools/buildgen/generate_projects.sh + # This file has been automatically generated from a template file. Please make modifications to + # `templates/gRPC-Core.podspec.template` instead. This file can be regenerated from the template by + # running `tools/buildgen/generate_projects.sh`. # Copyright 2015, Google Inc. # All rights reserved. @@ -104,8 +103,9 @@ # A module map is necessary for a dynamic framework to be correctly created by Cocoapods. s.module_map = 'include/grpc/module.modulemap' - # List of source files generated by a template. To save you from scrolling, this is the last part - # of the podspec. + # List of source files generated by a template: `templates/gRPC-Core.podspec.template`. It can be + # regenerated from the template by running `tools/buildgen/generate_projects.sh`. + # To save you from scrolling, this is the last part of the podspec. s.source_files = ${(',\n' + 19*' ').join('\'%s\'' % f for f in grpc_files(libs))} s.private_header_files = ${(',\n' + 27*' ').join('\'%s\'' % f for f in grpc_private_headers(libs))} From 727440216553c01925c0f5bc88293108bb3f051f Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 9 Jun 2016 09:42:06 -0700 Subject: [PATCH 0988/1894] Check epoll is actually available. set GPR_LINUX_EPOLL only in GLIBC ver 2.9 and above --- include/grpc/impl/codegen/port_platform.h | 2 +- src/core/lib/iomgr/ev_epoll_linux.c | 19 +++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index 7a6ec53fb4c..affef9e66b6 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -189,7 +189,6 @@ #define GPR_GCC_ATOMIC 1 #define GPR_GCC_TLS 1 #define GPR_LINUX 1 -#define GPR_LINUX_EPOLL 1 #define GPR_LINUX_LOG #define GPR_LINUX_MULTIPOLL_WITH_EPOLL 1 #define GPR_POSIX_WAKEUP_FD 1 @@ -201,6 +200,7 @@ #ifdef __GLIBC_PREREQ #if __GLIBC_PREREQ(2, 9) #define GPR_LINUX_EVENTFD 1 +#define GPR_LINUX_EPOLL 1 #endif #if __GLIBC_PREREQ(2, 10) #define GPR_LINUX_SOCKETUTILS 1 diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 66bbae52b28..d2d5d2852b9 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -1481,7 +1481,26 @@ static const grpc_event_engine_vtable vtable = { .shutdown_engine = shutdown_engine, }; +/* It is possible that GLIBC has epoll but the underlying kernel doesn't. + * Create a dummy epoll_fd to make sure epoll support is available */ +static bool is_epoll_available() { + int fd = epoll_create1(EPOLL_CLOEXEC); + if (fd < 0) { + gpr_log( + GPR_ERROR, + "epoll_create1 failed with error: %d. Not using epoll polling engine", + fd); + return false; + } + close(fd); + return true; +} + const grpc_event_engine_vtable *grpc_init_epoll_linux(void) { + if (!is_epoll_available()) { + return NULL; + } + fd_global_init(); pollset_global_init(); polling_island_global_init(); From c9dc83400beb65ed30c9e239e17b0eeeb1858fc6 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Thu, 9 Jun 2016 18:57:14 +0000 Subject: [PATCH 0989/1894] Document cardinality violation status codes --- doc/statuscodes.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/statuscodes.md b/doc/statuscodes.md index 84258c8d122..c918f9ed9ab 100644 --- a/doc/statuscodes.md +++ b/doc/statuscodes.md @@ -21,6 +21,8 @@ Only a subset of the pre-defined status codes are generated by the gRPC librarie | Flow-control protocol violation | INTERNAL | Both | | Error parsing returned status | UNKNOWN | Client | | Incorrect Auth metadata ( Credentials failed to get metadata, Incompatible credentials set on channel and call, Invalid host set in `:authority` metadata, etc.) | UNAUTHENTICATED | Both | +| Request cardinality violation (method requires exactly one request but client sent some other number of requests) | UNIMPLEMENTED | Server| +| Response cardinality violation (method requires exactly one response but server sent some other number of responses) | UNIMPLEMENTED | Client| | Error parsing response proto | INTERNAL | Client| | Error parsing request proto | INTERNAL | Server| From 5f8ad8954554369e262960449b204dc5b626b0f8 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Thu, 9 Jun 2016 19:22:41 +0000 Subject: [PATCH 0990/1894] Use == instead of is for cygrpc.OperationTypes --- src/python/grpcio/grpc/_channel.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/python/grpcio/grpc/_channel.py b/src/python/grpcio/grpc/_channel.py index d9eb5a4b770..7127110b09c 100644 --- a/src/python/grpcio/grpc/_channel.py +++ b/src/python/grpcio/grpc/_channel.py @@ -134,9 +134,9 @@ def _handle_event(event, state, response_deserializer): for batch_operation in event.batch_operations: operation_type = batch_operation.type state.due.remove(operation_type) - if operation_type is cygrpc.OperationType.receive_initial_metadata: + if operation_type == cygrpc.OperationType.receive_initial_metadata: state.initial_metadata = batch_operation.received_metadata - elif operation_type is cygrpc.OperationType.receive_message: + elif operation_type == cygrpc.OperationType.receive_message: serialized_response = batch_operation.received_message.bytes() if serialized_response is not None: response = _common.deserialize( @@ -146,7 +146,7 @@ def _handle_event(event, state, response_deserializer): _abort(state, grpc.StatusCode.INTERNAL, details) else: state.response = response - elif operation_type is cygrpc.OperationType.receive_status_on_client: + elif operation_type == cygrpc.OperationType.receive_status_on_client: state.trailing_metadata = batch_operation.received_metadata if state.code is None: code = _common.CYGRPC_STATUS_CODE_TO_STATUS_CODE.get( From c3b0ac1b85e9395482a458d5811c4ae321de6756 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 9 Jun 2016 13:57:40 -0700 Subject: [PATCH 0991/1894] Fix compile error on gcc --- src/core/lib/channel/channel_args.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/channel/channel_args.c b/src/core/lib/channel/channel_args.c index 7c701d5ec2d..79ceeb66b38 100644 --- a/src/core/lib/channel/channel_args.c +++ b/src/core/lib/channel/channel_args.c @@ -213,7 +213,7 @@ static int find_compression_algorithm_states_bitset(const grpc_channel_args *a, grpc_channel_args *grpc_channel_args_compression_algorithm_set_state( grpc_channel_args **a, grpc_compression_algorithm algorithm, int state) { - int *states_arg; + int *states_arg = NULL; grpc_channel_args *result = *a; const int states_arg_found = find_compression_algorithm_states_bitset(*a, &states_arg); From 857495ae449a3c528978047e716341e9e316d64b Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Thu, 9 Jun 2016 14:25:31 -0700 Subject: [PATCH 0992/1894] fix for #6834 Removed constants kPackageName and kServiceName so multiple services can be defined in one proto. --- src/compiler/objective_c_generator.cc | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/compiler/objective_c_generator.cc b/src/compiler/objective_c_generator.cc index 71a674174d7..6e14d2446f9 100644 --- a/src/compiler/objective_c_generator.cc +++ b/src/compiler/objective_c_generator.cc @@ -220,18 +220,13 @@ void PrintMethodImplementations(Printer *printer, {"service_class", ServiceClassName(service)}, {"package", service->file()->package()}}; - printer.Print(vars, - "static NSString *const kPackageName = @\"$package$\";\n"); - printer.Print( - vars, "static NSString *const kServiceName = @\"$service_name$\";\n\n"); - printer.Print(vars, "@implementation $service_class$\n\n"); printer.Print("// Designated initializer\n"); printer.Print("- (instancetype)initWithHost:(NSString *)host {\n"); - printer.Print( + printer.Print(vars, " return (self = [super initWithHost:host" - " packageName:kPackageName serviceName:kServiceName]);\n"); + " packageName:@\"$package$\" serviceName:@\"$service_name$\"]);\n"); printer.Print("}\n\n"); printer.Print( "// Override superclass initializer to disallow different" From 39a59efddb6a57a3f17e22aa3ce511300224c35e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 9 Jun 2016 15:26:27 -0700 Subject: [PATCH 0993/1894] Fix somewhat obvious error --- src/core/lib/iomgr/socket_utils_common_posix.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/iomgr/socket_utils_common_posix.c b/src/core/lib/iomgr/socket_utils_common_posix.c index f4a2d60c2f6..3a1371617e5 100644 --- a/src/core/lib/iomgr/socket_utils_common_posix.c +++ b/src/core/lib/iomgr/socket_utils_common_posix.c @@ -237,7 +237,7 @@ static grpc_error *error_for_fd(int fd, const struct sockaddr *addr) { grpc_sockaddr_to_string(&addr_str, addr, 0); grpc_error *err = grpc_error_set_str(GRPC_OS_ERROR(errno, "socket"), GRPC_ERROR_STR_TARGET_ADDRESS, addr_str); - gpr_free(err); + gpr_free(addr_str); return err; } From 74686ce7c4354020b4e48ba067ac7635d0e4edb2 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 9 Jun 2016 15:33:33 -0700 Subject: [PATCH 0994/1894] Completed interop spec, as well as code for c++ --- Makefile | 6 +- build.yaml | 2 +- doc/interop-test-descriptions.md | 161 +++++++++++++++--- src/proto/grpc/testing/messages.proto | 17 +- test/cpp/interop/client.cc | 63 +++++-- test/cpp/interop/interop_client.cc | 99 ++++++----- test/cpp/interop/interop_client.h | 6 +- .../{server_main.cc => interop_server.cc} | 61 +++++-- test/cpp/interop/rnd.dat | Bin 524288 -> 0 bytes test/cpp/interop/server_helper.cc | 4 + test/cpp/interop/server_helper.h | 1 + tools/run_tests/sources_and_headers.json | 2 +- .../interop_server_main.vcxproj | 2 +- .../interop_server_main.vcxproj.filters | 2 +- 14 files changed, 325 insertions(+), 101 deletions(-) rename test/cpp/interop/{server_main.cc => interop_server.cc} (83%) delete mode 100644 test/cpp/interop/rnd.dat diff --git a/Makefile b/Makefile index 5a5dd5e242c..7738a8d8ff0 100644 --- a/Makefile +++ b/Makefile @@ -4194,7 +4194,7 @@ LIBINTEROP_SERVER_MAIN_SRC = \ $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.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/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc \ - test/cpp/interop/server_main.cc \ + test/cpp/interop/interop_server.cc \ PUBLIC_HEADERS_CXX += \ @@ -4240,7 +4240,7 @@ ifneq ($(NO_DEPS),true) -include $(LIBINTEROP_SERVER_MAIN_OBJS:.o=.dep) endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/interop/server_main.o: $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.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/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc +$(OBJDIR)/$(CONFIG)/test/cpp/interop/interop_server.o: $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.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/test.pb.cc $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc LIBQPS_SRC = \ @@ -14569,8 +14569,8 @@ test/cpp/end2end/test_service_impl.cc: $(OPENSSL_DEP) test/cpp/interop/client.cc: $(OPENSSL_DEP) test/cpp/interop/client_helper.cc: $(OPENSSL_DEP) test/cpp/interop/interop_client.cc: $(OPENSSL_DEP) +test/cpp/interop/interop_server.cc: $(OPENSSL_DEP) test/cpp/interop/server_helper.cc: $(OPENSSL_DEP) -test/cpp/interop/server_main.cc: $(OPENSSL_DEP) test/cpp/qps/client_async.cc: $(OPENSSL_DEP) test/cpp/qps/client_sync.cc: $(OPENSSL_DEP) test/cpp/qps/driver.cc: $(OPENSSL_DEP) diff --git a/build.yaml b/build.yaml index 302e3f99e04..335e68409f7 100644 --- a/build.yaml +++ b/build.yaml @@ -1101,7 +1101,7 @@ libs: - src/proto/grpc/testing/empty.proto - src/proto/grpc/testing/messages.proto - src/proto/grpc/testing/test.proto - - test/cpp/interop/server_main.cc + - test/cpp/interop/interop_server.cc deps: - interop_server_helper - grpc++_test_util diff --git a/doc/interop-test-descriptions.md b/doc/interop-test-descriptions.md index 63b0022c3f6..a023d80c50d 100644 --- a/doc/interop-test-descriptions.md +++ b/doc/interop-test-descriptions.md @@ -90,26 +90,84 @@ Client asserts: * clients are free to assert that the response payload body contents are zero and comparing the entire response message against a golden response +### client_compressed_unary + +This test verifies the client can compress unary messages. It sends one +unary request for a compressable payload type, with and without compression. + +Server features: +* [UnaryCall][] +* [Compressed Request][] + +Procedure: + 1. Client calls UnaryCall with: + + ``` + { + expect_compressed_request: true + response_type: COMPRESSABLE + response_size: 314159 + payload:{ + body: 271828 bytes of zeros + } + } + ``` + + ``` + { + expect_compressed_request: false + response_type: COMPRESSABLE + response_size: 314159 + payload:{ + body: 271828 bytes of zeros + } + } + ``` + + Client asserts: + * call was successful + * response payload type is COMPRESSABLE + * if `request_compressed_response` is false, the response MUST NOT have the + compressed message flag set. + * if `request_compressed_response` is true, the response MUST have the + compressed message flag set. + * response payload body is 314159 bytes in size + * clients are free to assert that the response payload body contents are + zero and comparing the entire response message against a golden response + + ### server_compressed_unary -This test verifies compressed server-only unary calls succeed in sending -messages. It sends one unary request for every payload type, with and without -requesting a compressed response from the server. +This test verifies the server can compress unary messages. It sends one unary +request for a COMPRESSABLE payload type, with and without requesting a +compressed response from the server. -In all scenarios, whether compression was actually performed is determined by -the compression bit in the response's message flags. +Whether compression was actually performed is determined by the compression bit +in the response's message flags. Server features: * [UnaryCall][] * [Compressable Payload][] +* [Compressed Response][] Procedure: 1. Client calls UnaryCall with: ``` { - request_compressed_response: bool + request_compressed_response: true + response_type: COMPRESSABLE + response_size: 314159 + payload:{ + body: 271828 bytes of zeros + } + } + ``` + + ``` + { + request_compressed_response: false response_type: COMPRESSABLE response_size: 314159 payload:{ @@ -120,10 +178,10 @@ Procedure: Client asserts: * call was successful * response payload type is COMPRESSABLE - * if `request_compressed_response` is false, the response MUST NOT have the - compressed message flag set. - * if `request_compressed_response` is true, the response MUST have the + * when `request_compressed_response` is true, the response MUST have the compressed message flag set. + * when `request_compressed_response` is false, the response MUST NOT have + the compressed message flag set. * response payload body is 314159 bytes in size * clients are free to assert that the response payload body contents are zero and comparing the entire response message against a golden response @@ -224,11 +282,12 @@ Client asserts: ### server_compressed_streaming -This test verifies that server-only compressed streaming succeeds. +This test verifies that the server can compress streaming messages. Server features: * [StreamingOutputCall][] * [Compressable Payload][] +* [Compressed Response][] Procedure: @@ -262,17 +321,56 @@ Procedure: Client asserts: * call was successful - * exactly four responses + * exactly two responses * response payloads are COMPRESSABLE - * if `request_compressed_response` is false, the response's messages MUST + * when `request_compressed_response` is false, the response's messages MUST NOT have the compressed message flag set. - * if `request_compressed_response` is true, the response's messages MUST + * when `request_compressed_response` is true, the response's messages MUST have the compressed message flag set. * response payload bodies are sized (in order): 31415, 58979 * clients are free to assert that the response payload body contents are zero and comparing the entire response messages against golden responses +### client_compressed_streaming + +This test verifies that the client can compress streaming messages. + +Server features: +* [StreamingInputCall][] +* [Compressed Request][] + +Procedure: + 1. Client calls StreamingInputCall + 1. Client sends: + + ``` + { + expect_compressed_request: true + payload:{ + body: 27182 bytes of zeros + } + } + ``` + + 1. Client then sends: + + ``` + { + expect_compressed_request: false + payload:{ + body: 45904 bytes of zeros + } + } + ``` + + 6. Client half-closes + + Client asserts: + * call was successful + * response aggregated_payload_size is 73086 + + ### ping_pong This test verifies that full duplex bidi is supported. @@ -373,7 +471,8 @@ with desired oauth scope. The test uses `--default_service_account` with GCE service account email and `--oauth_scope` with the OAuth scope to use. For testing against -grpc-test.sandbox.googleapis.com, "https://www.googleapis.com/auth/xapi.zoo" should +grpc-test.sandbox.googleapis.com, "https://www.googleapis.com/auth/xapi.zoo" +should be passed in as `--oauth_scope`. Server features: @@ -400,7 +499,8 @@ Procedure: Client asserts: * call was successful -* received SimpleResponse.username equals the value of `--default_service_account` flag +* received SimpleResponse.username equals the value of + `--default_service_account` flag * received SimpleResponse.oauth_scope is in `--oauth_scope` * response payload body is 314159 bytes in size * clients are free to assert that the response payload body contents are zero @@ -444,7 +544,8 @@ Client asserts: * call was successful * received SimpleResponse.username is not empty and is in the json key file used by the auth library. The client can optionally check the username matches the -email address in the key file or equals the value of `--default_service_account` flag. +email address in the key file or equals the value of `--default_service_account` +flag. * response payload body is 314159 bytes in size * clients are free to assert that the response payload body contents are zero and comparing the entire response message against a golden response @@ -470,8 +571,8 @@ variable GOOGLE_APPLICATION_CREDENTIALS, *OR* if GCE credentials is used to fetch the token, `--default_service_account` can be used to pass in GCE service account email. - uses the flag `--oauth_scope` for the oauth scope. For testing against -grpc-test.sandbox.googleapis.com, "https://www.googleapis.com/auth/xapi.zoo" should -be passed as the `--oauth_scope`. +grpc-test.sandbox.googleapis.com, "https://www.googleapis.com/auth/xapi.zoo" +should be passed as the `--oauth_scope`. Server features: * [UnaryCall][] @@ -481,7 +582,8 @@ Server features: Procedure: 1. Client uses the auth library to obtain an authorization token - 2. Client configures the channel to use AccessTokenCredentials with the access token obtained in step 1 + 2. Client configures the channel to use AccessTokenCredentials with the access + token obtained in step 1 3. Client calls UnaryCall with the following message ``` @@ -502,17 +604,17 @@ json key file or GCE default service account email. Similar to the other auth tests, this test is only for cloud-to-prod path. -This test verifies unary calls succeed in sending messages using a JWT or a service account -credentials set on the RPC. +This test verifies unary calls succeed in sending messages using a JWT or a +service account credentials set on the RPC. The test - uses the flag `--service_account_key_file` with the path to a json key file downloaded from https://console.developers.google.com. Alternately, if using a usable auth implementation, it may specify the file location in the environment variable GOOGLE_APPLICATION_CREDENTIALS -- optionally uses the flag `--oauth_scope` for the oauth scope if implementator +- optionally uses the flag `--oauth_scope` for the oauth scope if implementator wishes to use service account credential instead of JWT credential. For testing -against grpc-test.sandbox.googleapis.com, oauth scope +against grpc-test.sandbox.googleapis.com, oauth scope "https://www.googleapis.com/auth/xapi.zoo" should be used. Server features: @@ -839,6 +941,19 @@ payload body of size `SimpleRequest.response_size` bytes and type as appropriate for the `SimpleRequest.response_type`. If the server does not support the `response_type`, then it should fail the RPC with `INVALID_ARGUMENT`. +### CompressedResponse +[CompressedResponse]: #compressedresponse + +When the client sets `SimpleRequest.request_compressed_response` to true, the +response is sent back compressed. + +### CompressedRequest +[CompressedRequest]: #compressedrequest + +When the client sets `SimpleRequest.expect_compressed_request ` to true, the +server expects the client request to be compressed. If it's not, it fails +the RPC with `INVALID_ARGUMENT`. + ### StreamingInputCall [StreamingInputCall]: #streaminginputcall diff --git a/src/proto/grpc/testing/messages.proto b/src/proto/grpc/testing/messages.proto index e1090156ab4..99b75dea3d5 100644 --- a/src/proto/grpc/testing/messages.proto +++ b/src/proto/grpc/testing/messages.proto @@ -38,9 +38,6 @@ package grpc.testing; enum PayloadType { // Compressable text format. COMPRESSABLE = 0; - - // Uncompressable binary format. - UNCOMPRESSABLE = 1; } // A block of data, to simply increase gRPC message size. @@ -82,6 +79,12 @@ message SimpleRequest { // Whether server should return a given status EchoStatus response_status = 7; + + // Whether the server should expect this request to be compressed. + bool expect_compressed_request = 8; + + // The type of payload. + PayloadType payload_type = 9; } // Unary response, as configured by the request. @@ -100,6 +103,12 @@ message StreamingInputCallRequest { // Optional input payload sent along with the request. Payload payload = 1; + // The type of payload. + PayloadType payload_type = 2; + + // Whether the server should expect this request to be compressed. + bool expect_compressed_request = 3; + // Not expecting any payload from the response. } @@ -135,7 +144,7 @@ message StreamingOutputCallRequest { Payload payload = 3; // Whether to request the server to compress the response. - bool request_compressed_response = 6; + bool request_compressed_response = 4; // Whether server should return a given status EchoStatus response_status = 7; diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc index 77278249794..c7d081100e2 100644 --- a/test/cpp/interop/client.cc +++ b/test/cpp/interop/client.cc @@ -40,7 +40,9 @@ #include #include #include +#include +#include "src/core/lib/support/string.h" #include "test/cpp/interop/client_helper.h" #include "test/cpp/interop/interop_client.h" #include "test/cpp/util/test_config.h" @@ -55,10 +57,14 @@ DEFINE_string(test_case, "large_unary", "Configure different test cases. Valid options are: " "empty_unary : empty (zero bytes) request and response; " "large_unary : single request and (large) response; " - "large_compressed_unary : single request and compressed (large) " - "response; " + + "client_compressed_unary : single compressed request; " + "server_compressed_unary : single compressed response; " + "client_streaming : request streaming with single response; " "server_streaming : single request with response streaming; " + "client_compressed_streaming : compressed request streaming with " + "single response; " "server_compressed_streaming : single request with compressed " "response streaming; " "slow_consumer : single request with response; " @@ -104,14 +110,18 @@ int main(int argc, char** argv) { client.DoEmpty(); } else if (FLAGS_test_case == "large_unary") { client.DoLargeUnary(); - } else if (FLAGS_test_case == "large_compressed_unary") { - client.DoLargeCompressedUnary(); + } else if (FLAGS_test_case == "server_compressed_unary") { + client.DoServerCompressedUnary(); + } else if (FLAGS_test_case == "client_compressed_unary") { + client.DoClientCompressedUnary(); } else if (FLAGS_test_case == "client_streaming") { client.DoRequestStreaming(); } else if (FLAGS_test_case == "server_streaming") { client.DoResponseStreaming(); } else if (FLAGS_test_case == "server_compressed_streaming") { - client.DoResponseCompressedStreaming(); + client.DoServerCompressedStreaming(); + } else if (FLAGS_test_case == "client_compressed_streaming") { + client.DoClientCompressedStreaming(); } else if (FLAGS_test_case == "slow_consumer") { client.DoResponseStreamingWithSlowConsumer(); } else if (FLAGS_test_case == "half_duplex") { @@ -144,9 +154,12 @@ int main(int argc, char** argv) { } else if (FLAGS_test_case == "all") { client.DoEmpty(); client.DoLargeUnary(); + client.DoClientCompressedUnary(); + client.DoServerCompressedUnary(); client.DoRequestStreaming(); client.DoResponseStreaming(); - client.DoResponseCompressedStreaming(); + client.DoClientCompressedStreaming(); + client.DoServerCompressedStreaming(); client.DoHalfDuplex(); client.DoPingPong(); client.DoCancelAfterBegin(); @@ -165,14 +178,36 @@ int main(int argc, char** argv) { } // compute_engine_creds only runs in GCE. } else { - gpr_log( - GPR_ERROR, - "Unsupported test case %s. Valid options are all|empty_unary|" - "large_unary|large_compressed_unary|client_streaming|server_streaming|" - "server_compressed_streaming|half_duplex|ping_pong|cancel_after_begin|" - "cancel_after_first_response|timeout_on_sleeping_server|empty_stream|" - "compute_engine_creds|jwt_token_creds|oauth2_auth_token|per_rpc_creds", - "status_code_and_message|custom_metadata", FLAGS_test_case.c_str()); + const char* testcases[] = + { "all", + "cancel_after_begin", + "cancel_after_first_response", + "client_compressed_streaming", + "client_compressed_unary", + "client_streaming", + "compute_engine_creds", + "custom_metadata", + "empty_stream", + "empty_unary", + "half_duplex", + "jwt_token_creds", + "large_unary", + "oauth2_auth_token", + "oauth2_auth_token", + "per_rpc_creds", + "per_rpc_creds", + "ping_pong", + "server_compressed_streaming", + "server_compressed_unary", + "server_streaming", + "status_code_and_message", + "timeout_on_sleeping_server"}; + char* joined_testcases = + gpr_strjoin_sep(testcases, GPR_ARRAY_SIZE(testcases), "\n", NULL); + + gpr_log(GPR_ERROR, "Unsupported test case %s. Valid options are\n%s", + FLAGS_test_case.c_str(), joined_testcases); + gpr_free(joined_testcases); ret = 1; } diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index 7705bb15922..e5d37514028 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -73,23 +73,22 @@ void CompressionChecks(const InteropClientContextInspector& inspector, const SimpleResponse* response) { const grpc_compression_algorithm received_compression = inspector.GetCallCompressionAlgorithm(); - if (request->request_compressed_response() && - received_compression == GRPC_COMPRESS_NONE) { - if (request->request_compressed_response() && - received_compression == GRPC_COMPRESS_NONE) { + if (request->request_compressed_response()) { + if (received_compression == GRPC_COMPRESS_NONE) { // Requested some compression, got NONE. This is an error. gpr_log(GPR_ERROR, "Failure: Requested compression but got uncompressed response " "from server."); abort(); } - } - if (!request->request_compressed_response()) { + if (request->response_type() == PayloadType::COMPRESSABLE) { + // requested compression and compressable response => results should + // always be compressed. + GPR_ASSERT(inspector.GetMessageFlags() & GRPC_WRITE_INTERNAL_COMPRESS); + } + } else { + // Didn't request compression -> make sure the response is uncompressed GPR_ASSERT(!(inspector.GetMessageFlags() & GRPC_WRITE_INTERNAL_COMPRESS)); - } else if (request->response_type() == PayloadType::COMPRESSABLE) { - // requested compression and compressable response => results should always - // be compressed. - GPR_ASSERT(inspector.GetMessageFlags() & GRPC_WRITE_INTERNAL_COMPRESS); } } } // namespace @@ -211,17 +210,6 @@ bool InteropClient::PerformLargeUnary(SimpleRequest* request, GPR_ASSERT(response->payload().body() == grpc::string(kLargeResponseSize, '\0')); break; - case PayloadType::UNCOMPRESSABLE: { - // We don't really check anything: We can't assert that the payload is - // uncompressed because it's the server's prerogative to decide on that, - // and different implementations decide differently (ie, Java always - // compresses when requested to do so, whereas C core throws away the - // compressed payload if the output is larger than the input). - // In addition, we don't compare the actual random bytes received because - // asserting that data is sent/received properly isn't the purpose of this - // test. Moreover, different implementations are also free to use - // different sets of random bytes. - } break; default: GPR_ASSERT(false); } @@ -336,9 +324,39 @@ bool InteropClient::DoLargeUnary() { return true; } -bool InteropClient::DoLargeCompressedUnary() { +bool InteropClient::DoClientCompressedUnary() { + const bool expect_compression[] = {false, true}; + const PayloadType payload_types[] = {COMPRESSABLE}; + for (size_t i = 0; i < GPR_ARRAY_SIZE(payload_types); i++) { + for (size_t j = 0; j < GPR_ARRAY_SIZE(expect_compression); j++) { + char* log_suffix; + gpr_asprintf(&log_suffix, "(compression=%s; payload=%s)", + expect_compression[j] ? "true" : "false", + PayloadType_Name(payload_types[i]).c_str()); + + gpr_log(GPR_DEBUG, "Sending compressed unary request %s.", log_suffix); + SimpleRequest request; + SimpleResponse response; + request.set_response_type(payload_types[i]); + request.set_expect_compressed_request(expect_compression[j]); + + if (!PerformLargeUnary(&request, &response, CompressionChecks)) { + gpr_log(GPR_ERROR, "Compressed unary request failed %s", log_suffix); + gpr_free(log_suffix); + return false; + } + + gpr_log(GPR_DEBUG, "Compressed unary request failed %s", log_suffix); + gpr_free(log_suffix); + } + } + + return true; +} + +bool InteropClient::DoServerCompressedUnary() { const bool request_compression[] = {false, true}; - const PayloadType payload_types[] = {COMPRESSABLE, UNCOMPRESSABLE}; + const PayloadType payload_types[] = {COMPRESSABLE}; for (size_t i = 0; i < GPR_ARRAY_SIZE(payload_types); i++) { for (size_t j = 0; j < GPR_ARRAY_SIZE(request_compression); j++) { char* log_suffix; @@ -346,7 +364,7 @@ bool InteropClient::DoLargeCompressedUnary() { request_compression[j] ? "true" : "false", PayloadType_Name(payload_types[i]).c_str()); - gpr_log(GPR_DEBUG, "Sending a large compressed unary rpc %s.", + gpr_log(GPR_DEBUG, "Sending unary request for compressed response %s.", log_suffix); SimpleRequest request; SimpleResponse response; @@ -354,12 +372,13 @@ bool InteropClient::DoLargeCompressedUnary() { request.set_request_compressed_response(request_compression[j]); if (!PerformLargeUnary(&request, &response, CompressionChecks)) { - gpr_log(GPR_ERROR, "Large compressed unary failed %s", log_suffix); + gpr_log(GPR_ERROR, "Request for compressed unary failed %s", + log_suffix); gpr_free(log_suffix); return false; } - gpr_log(GPR_DEBUG, "Large compressed unary done %s.", log_suffix); + gpr_log(GPR_DEBUG, "Request for compressed unary failed %s", log_suffix); gpr_free(log_suffix); } } @@ -447,9 +466,16 @@ bool InteropClient::DoResponseStreaming() { return true; } -bool InteropClient::DoResponseCompressedStreaming() { +bool InteropClient::DoClientCompressedStreaming() { + // XXX + return false; +} + +bool InteropClient::DoServerCompressedStreaming() { const bool request_compression[] = {false, true}; - const PayloadType payload_types[] = {COMPRESSABLE, UNCOMPRESSABLE}; + const PayloadType payload_types[] = {COMPRESSABLE}; + const std::vector response_stream_sizes = {31415, 58979}; + for (size_t i = 0; i < GPR_ARRAY_SIZE(payload_types); i++) { for (size_t j = 0; j < GPR_ARRAY_SIZE(request_compression); j++) { ClientContext context; @@ -466,11 +492,10 @@ bool InteropClient::DoResponseCompressedStreaming() { request.set_response_type(payload_types[i]); request.set_request_compressed_response(request_compression[j]); - for (size_t k = 0; k < response_stream_sizes.size() / 2; ++k) { + for (size_t k = 0; k < response_stream_sizes.size(); ++k) { ResponseParameters* response_parameter = request.add_response_parameters(); - response_parameter->set_size(response_stream_sizes[k] + - response_stream_sizes[k + 1]); + response_parameter->set_size(response_stream_sizes[k]); } StreamingOutputCallResponse response; @@ -484,11 +509,7 @@ bool InteropClient::DoResponseCompressedStreaming() { switch (response.payload().type()) { case PayloadType::COMPRESSABLE: GPR_ASSERT(response.payload().body() == - grpc::string(response_stream_sizes[k] + - response_stream_sizes[k + 1], - '\0')); - break; - case PayloadType::UNCOMPRESSABLE: + grpc::string(response_stream_sizes[k], '\0')); break; default: GPR_ASSERT(false); @@ -516,14 +537,14 @@ bool InteropClient::DoResponseCompressedStreaming() { gpr_log(GPR_DEBUG, "Response streaming done %s.", log_suffix); gpr_free(log_suffix); - if (k < response_stream_sizes.size() / 2) { + if (k < response_stream_sizes.size()) { // stream->Read() failed before reading all the expected messages. This // is most likely due to a connection failure. gpr_log(GPR_ERROR, - "DoResponseCompressedStreaming(): Responses read (k=%d) is " + "DoServerCompressedStreaming(): Responses read (k=%d) is " "less than the expected messages (i.e " "response_stream_sizes.size()/2 (%d)). (i=%d, j=%d)", - k, response_stream_sizes.size() / 2, i, j); + k, response_stream_sizes.size(), i, j); return TransientFailureOrAbort(); } diff --git a/test/cpp/interop/interop_client.h b/test/cpp/interop/interop_client.h index ae75762bb8f..ea44986fbc4 100644 --- a/test/cpp/interop/interop_client.h +++ b/test/cpp/interop/interop_client.h @@ -64,12 +64,14 @@ class InteropClient { bool DoEmpty(); bool DoLargeUnary(); - bool DoLargeCompressedUnary(); + bool DoServerCompressedUnary(); + bool DoClientCompressedUnary(); bool DoPingPong(); bool DoHalfDuplex(); bool DoRequestStreaming(); bool DoResponseStreaming(); - bool DoResponseCompressedStreaming(); + bool DoServerCompressedStreaming(); + bool DoClientCompressedStreaming(); bool DoResponseStreamingWithSlowConsumer(); bool DoCancelAfterBegin(); bool DoCancelAfterFirstResponse(); diff --git a/test/cpp/interop/server_main.cc b/test/cpp/interop/interop_server.cc similarity index 83% rename from test/cpp/interop/server_main.cc rename to test/cpp/interop/interop_server.cc index bbedda14d25..b328f478fa0 100644 --- a/test/cpp/interop/server_main.cc +++ b/test/cpp/interop/interop_server.cc @@ -48,6 +48,7 @@ #include #include +#include "src/core/lib/transport/byte_stream.h" #include "src/proto/grpc/testing/empty.grpc.pb.h" #include "src/proto/grpc/testing/messages.grpc.pb.h" #include "src/proto/grpc/testing/test.grpc.pb.h" @@ -78,7 +79,6 @@ using grpc::testing::TestService; using grpc::Status; static bool got_sigint = false; -static const char* kRandomFile = "test/cpp/interop/rnd.dat"; const char kEchoInitialMetadataKey[] = "x-grpc-test-echo-initial"; const char kEchoTrailingBinMetadataKey[] = "x-grpc-test-echo-trailing-bin"; @@ -117,16 +117,8 @@ bool SetPayload(PayloadType response_type, int size, Payload* payload) { std::unique_ptr body(new char[size]()); payload->set_body(body.get(), size); } break; - case PayloadType::UNCOMPRESSABLE: { - std::unique_ptr body(new char[size]()); - std::ifstream rnd_file(kRandomFile); - GPR_ASSERT(rnd_file.good()); - rnd_file.read(body.get(), size); - GPR_ASSERT(!rnd_file.eof()); // Requested more rnd bytes than available - payload->set_body(body.get(), size); - } break; default: - GPR_ASSERT(false); + return false; } return true; } @@ -140,6 +132,41 @@ void SetResponseCompression(ServerContext* context, } } +template +bool CheckExpectedCompression(const ServerContext& context, + const RequestType& request) { + const InteropServerContextInspector inspector(context); + const grpc_compression_algorithm received_compression = + inspector.GetCallCompressionAlgorithm(); + + if (request.expect_compressed_request()) { + if (received_compression == GRPC_COMPRESS_NONE) { + // Expected some compression, got NONE. This is an error. + gpr_log(GPR_ERROR, + "Failure: Expected compression but got uncompressed request " + "from client."); + return false; + } + if (request.payload_type() == PayloadType::COMPRESSABLE) { + if (!(inspector.GetMessageFlags() & GRPC_WRITE_INTERNAL_COMPRESS)) { + gpr_log(GPR_ERROR, + "Failure: Requested compression in a compressable request, but " + "compression bit in message flags not set."); + return false; + } + } + } else { + // Didn't expect compression -> make sure the request is uncompressed + if (inspector.GetMessageFlags() & GRPC_WRITE_INTERNAL_COMPRESS) { + gpr_log(GPR_ERROR, + "Failure: Didn't requested compression, but compression bit in " + "message flags set."); + return false; + } + } + return true; +} + class TestServiceImpl : public TestService::Service { public: Status EmptyCall(ServerContext* context, const grpc::testing::Empty* request, @@ -152,10 +179,15 @@ class TestServiceImpl : public TestService::Service { SimpleResponse* response) { MaybeEchoMetadata(context); SetResponseCompression(context, *request); + if (!CheckExpectedCompression(*context, *request)) { + return Status(grpc::StatusCode::INVALID_ARGUMENT, + "Compressed request expectation not met."); + } if (request->response_size() > 0) { if (!SetPayload(request->response_type(), request->response_size(), response->mutable_payload())) { - return Status(grpc::StatusCode::INTERNAL, "Error creating payload."); + return Status(grpc::StatusCode::INVALID_ARGUMENT, + "Error creating payload."); } } @@ -179,7 +211,8 @@ class TestServiceImpl : public TestService::Service { if (!SetPayload(request->response_type(), request->response_parameters(i).size(), response.mutable_payload())) { - return Status(grpc::StatusCode::INTERNAL, "Error creating payload."); + return Status(grpc::StatusCode::INVALID_ARGUMENT, + "Error creating payload."); } write_success = writer->Write(response); } @@ -196,6 +229,10 @@ class TestServiceImpl : public TestService::Service { StreamingInputCallRequest request; int aggregated_payload_size = 0; while (reader->Read(&request)) { + if (!CheckExpectedCompression(*context, request)) { + return Status(grpc::StatusCode::INVALID_ARGUMENT, + "Compressed request expectation not met."); + } if (request.has_payload()) { aggregated_payload_size += request.payload().body().size(); } diff --git a/test/cpp/interop/rnd.dat b/test/cpp/interop/rnd.dat deleted file mode 100644 index 8c7f38f9e0e01b33798cbe743bd5f873b6e0a1af..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 524288 zcmV(pK=8kv?7tv1DE+tQT%$)WUjgz!7gW_ie^{E{v2nb-0l>d60CCAP;RHo8=7TVI zX=?~j4{pUaww5d{@K#XuW&-Z~xivlDcGX1So5`!1E9192zjmb)a0Pza>H(KOCgN*v zqPwm?Mg;4o#y{}#I+`l$-Rq=EA^3YIhY5|QJP*I7@GhoS>C)Fx%95J7-knGrwLlw2 zXC)e98V|$+^J@ivRL4q!s2EX+=aaabN{{H);FLqPQ%IdpO-P`Pu^%TKjLI-?9T1BL zN@}dJH0OR?aq&Co`LDS%xwR&tnU#0}#-G_EB_^|FnBGmA7@bZ9f$M9NW%Jn>P%DGt>NgXk~r5M;v-3I~1$p?3)hYrVXH3acNBwAw+m}I)R!=j!? zKMrA_pCNt`<8^V1g&rP;?hb7Wki zNJPQ7gcVL~z+eZmJ+N5|Yfe0q8RpcN7IKo(#eMCqC3(Q2dls@AnDcq^@27N6?)_Ov z_xB{@4i8ObPyX;{W(-A_yf_OGvdt~2St^73Lq9(q`a>oy06 zp%8KzuPVfqjI+BZ(%v12C0YNqY3nr{+GlW^XP`)OE%YWxutHmQT-Xy~i5UqJYUK`; z0~pu%Pr$U?y<@?5S^l3ey*90G-(QLkmsF<=Vj^l6kctZn#zl>_&+$DLd1>dgItIXb zIPyU|mjS!$#mSq!A_|n>)oSU38FoTKV-NN#Y^tMOovgmM7`;KGjL#1J@D&b1BNEha zZRL{E-x?Z-4EO7U`P8`P`_&i+%!vx83D2FpUC0wO^HKaH=i0WWE5NpxT$Cn5xv z6lW?0CG9qW+-s%UwEmUN+aXGSW1DwTIu1hXHmunBpB6_Kr|6gzed!k07_=el7u7(v2^z{k(L zXJ9vF9a;y3smEH!+H!D9%`!Js3BTI&^#2!`1h~Kv3?wF644Xkm@Iiv%Lut3`$JGCxoFJ`Z2fz&+o;-fHi zGPTplrR$1Cb-H|x%6krl)crr;oS*EP$<1&vmmt<+HHe&#)%T;24mI9V4tp?Sn3o%* zd2n%tJ;<5IA*TkkY#;^W(;gCty_maRdQfSe+wxX(3cA@)c7lrd>!9JG$!a?Xz0l-B zKz4~O=OMe3Ye9LR$B#;UX7Tv;DBAJq(%1JrhN;p(wc1KI5nR_?4zEv9oJ?oT>^?@e zx=CYYFoj?nN;X}+%mk)9xhs^SUD#QdJBWcy2rzAJ-po!w$8<|njb$fWnxe%gerqvA z#&I6MMp_qojq4kAqU@cl$gzJ1ZZ!|B0Ul8XvFN%^BTj&GlRy3~|NUYb9PII+?%vR{ z8@j4NTS>Qezn9FQ-&D}RtH`UmHF=hRT}s~T$_QhBFiL+1A(jcE3_Wj_X40X69-i&a z=!MOy2n@%TMoy7|>8DFwi7j%++y?(TT5^HVHF06ZG|WU*3vNqpkiVSDKzLgjbQ9_gC2fZQ+qSy^x_(Dy#Yv)%BuhnciW=%8l# z2aqP#`3XOA2lsUZEZw$U8~8T~XW;&s-g?mKL$S1dqOD$YpIRgVwCmxtuxNMQP^V#C z$68v|2bn@R4E8xtXa!=cs)edfA=@i(NfMndtkStEn@FhFyy4Cty`Tk9Z1%;$ld}IE z)HmOmXRc*L&7#ouUUG&>HR6*<()QMfcGcew<;2W>cqH}Brx630UYJ$GQoXVH2yCDW zeW0?uV4Rn27bo*<=ANzwC9t{?YVWFF-`x&Qcvclhcmb!ETOLJCjMXok$yI(#e5UsB zMfP~3lkR#+o1t8$QjEkVWP!Q8hv}_jnK@HG)SDhrO{jtfsjo;%X-UjW{(!IFGkRul z`zA-_0^jEy^GYFne}EQWYEa1dvvcr2h?Q&1 zK`q`A?y0jZC`hJ3n|uACPpCbV_X7^);+-tP`U>tzGZ|_HKU6B){L2^G+`C|mA{Z6_ zm}y^h!Naj(IcaJLAQYj#ngrO*BO@z*5wlR2ojWA&Ua%OWMS1GCyQpl1gG&Cpc&LdK zxD6)a^lP$iO8AJt=_{oMfGkgJ9d3ou`K0xr(XHf?!#kUmDc4NryP-4bwmTJ`ZQOrg zFrWdFbZL{i0#ZdqXBF+mGkm%&*N1S`b>)hlGvf+^14{~Zi+b%wV&lTBmx$*THp45} zr)<&{GsPfotIWu{cv_+vv?uKR-xyU6w7Ut{{;F3AgFHGwulUXSxE>`C=jMlhT?JP3 zYq|bTcg)>Fn=EEYBwYwOWNK6aC-x&np)x8oz*viQs5tJ~&%JZZg6(B(I`hlviTBPl zf&a+dzOmTB+eBIlg_i$EgTqlD(XUy#s|0wxs~nLsiAvZViH)Cl`5ye~)cGBduA4L`xK?#cgHSN9yd8a8F^y9IBM+ugikUJ88ylEv#_EsA zkw#iC0?QmtPDA)1rkAzy!F7q*iAm^U{hhX7suU9mW;Hrje%DX2fc+%iFYCWp6%S4N zDup%AWMnQdOhR}C8Vhsx4P1tSK7fX}^r=$7Bq(gms+c##aRjV`Lhs^TgGwHf z(F$(UYRlr^qPeEpz39|qjEns1`zkuRieIf5pe5PzWKE{k_rb5GdydQ_om^LMz{fNX zsMwZVwz_VYou+8)@WyIC6aZONcTnO}YPvyvr&dUmNJncw*?)dpiRBj$3)J)ZV$h{+ zp-3RmFS}|*&<2m8D#L{|QFZzxzf{wW|g2CJ%}mv=gWz@5p{Q;c=Om6MtTv7pR{ z!963Ao7I}oc(g_gm*I{oD{Bk{D7B_&Js*%Ha6V7B?b#r3Li@E+BcBb>V&mkg-IT*e zA2f}7z@`d49M^Ia+~Ac~IE3h?v+lh8wqUo`j~l6zX|d&K#{7|HF8}}BV9P=|C&BPs z4i>vO%LNY|YQg-7R8V7Gt!`DQ;&Gp{x?6og_F!L&zqI;|TwhESA1SLe9G?TKmg>)2 z<8Zi?LwcfUqpbOz1btJ;o=W=CL_;6}7e)|K)yb=d&S!6oxBao2>WYD?MMt0zB7Gf% z&$(h&Oi^A?j&i>XO~3HUSs4aT&_v8RNk3FzV36P`k*KwFAg)FtVjQWvKeoc z0Fr+h3?u2J!}gUfT7sepC;E8cS>K&c*eNOS08LR#2OJOm>FBw0qR7Df&yf&LsEKb8 z_^{JvfQa6)(}yBzbT6J@a^lqfmW9B&p5I=--*6d@rk6PAn zU}RTA?&8qMkB1hY=q@;*`uU=;*!;s?ilbDY1N;k590GSY-E385I}HoXd_?a{!df0; z)FQ09z*<$js*bh{G6;g>3%#PG-A#Bx6f$}cZG!)d-YsH?GPO3x&$icSpM>QaM#F%8 z_-D;uHv;Uxs52FO-ecr0OIkhOme@(h%5I`3W-+2irAO+n^np>=G0Lxi$-^cw`XT6O zN!q~)746U&tNp-PD)5YkSg5(m2R45Ava>Zk4`&ZxX9I5wj(oEwxgtxWf+F6_sd7o9 z?}whLM}G9BG`u4IQP%}wQ_@Aee+nD@a_@dArh{ksdnIdxgKAvbT(>LiG^7!!x|MyX~BN#|C$f-k%+b;-NCpk~&+lJ8e|b@sCfw4LX+RjLMb@@NY&(ta zo?tjuP7Ln6<*&^z?XNW16q4`ko(vtx#NcsccpWu;llbC936E6sxf~g{ltpWOR(-zy z#8M^CA^Kz=QUX*pZ_i;+&HTk`-ZaGF+|_dZ8boH(pn#tqJ%;NAK@}#e<*aRZ?*pF6 zA}^-_sjlfw!wD3?pzol0$zrhWj@&@ydTDA+`fz}S9NG)0&YZM{rjKpr2eE)N33ite zgH#m?%R*b&l2jGe{I^Zc9)PbwQgZ7pAInrWDyH!n#el)O5#G4>h`GA89hr~=k>>N> ztnBx|&6={fBkP#}q0ai3W3r)}w#K=RM#_!j%TnZe8EiQ7x`kD2qIffGo0P+v*|#FD z)q7SqITLI6P5}8Ic*QFg%C$g|J4&AO6vfSw=hg9$b4PbSpsl6Cj$f7V?C9Tw(=xtE zLJtoTpF+RfT2meNnA`j^Dgyo|4CQPv%hN>lH9D!#y!dE4-}Tpdk>tfN-&G6k1_e6B zfWUs~pVd!WtvA(kcL0}JrBk$nc68;jNI7^tfgXcEmZhVYCuc0Y+bx-7>e5MW^yjfSJ)e=Hc<5lzOf-tYm@_$XP}5G4ehA30T{3T{q3aj{Y_eI+A^ph758xYbCFt2Oek z=PooMc;*VlLglNC)hK)nfVtz)6hEon4vuR}7M$Y7)XDbeGvIQ$O!`t4h=|?P5=8%7 z2V^rlsazIUJQ*vI<@Vdqfz#8q2)kFw7QDyPEK__ElqqH5k1+0UAIRu9UFkz)q?>U$(#%8=s8+e(lS68TS4>m|)C))^{`}f{FVv z>0#zumPqCh8-a(KwlYZ$et1b<2Ncg3ia@9eAW{8EZnK(W@shZI{=kfGw4#RplM8ne!-F3|RM4t+{bU{HhqS0^Oof zfb#`9I&r=>(1>1Ec*rTTC}Fju?^k|7Il_w*6CW4oHV-k*yBG*Mi7RNx$~fXgw7b_1 z>6c6yaS?LGM(B5e@9Mi-eMwasb4AMUKADIRli$7MPeB)Ip?@(~1qg2gd6SyQSdJcU z2H0_TB&n=LyQfl=pHDU`NaV$`t0Q>#lN`q!qM2~sxG_ySeyO$Sj;*&Kz;47d<~?gB zipmPT;_yblQY%ap4xC;K4ac|s2Sx*Fi#)6_O4@~($~j%3&Ke59RC?;dBqd(z-Ve0@ zl&*)vdk=Z&#JWNcvHuW;@iS)%%)B`gL;Zj-^sUh6r` zU>Ysmd-9jT&bANQUXTSQ=-i&BfGkh28cHu?mb;zFS^`O}T6O#b>4xv_aTUZpB=!@N zgN;TJ4ZUTrh##dt?8<3fvYJTZ_~jIOMxUpm;%~3l$x;hAhEo%$)D1K*?X!EU2a#gv zI}^Ioj4;lkZaP&oh`$HPH^v}smQpS$C%Wsd-`Fprao;PFmcEP?$ybT&W;dvrW#!9f zc21h_adHbJz~X~&spdcw@Oih*Nrpre_Q ztLb_~uZSuU(s#W5Pso6-uQbD$kEPTt$Tt|=#JJ!;lMuyWzgTt`9`%02MpYqt(m3TppWPff;8*R=OG|J-?fdJAL7pTsdDH-u9Ex?8>RJ1I6)+R z%Z~W20oUJs`G}=pyy4F~qx=94g1jZH$dyd!VV!2j11pDS2E|a~|v;IfBOY#N7%y;OQd>lN3l3 z*u$-8H7)4yp1M^|0f!$>+orCz=C3ummw!6oi^V%_sldq^=AqtN3?EgwOv^4)B;8O; z3c>3oU7K}nyQ>G%;ZZho5SH>HD`=ppN2%J|Q{WPwub53q@C4h&UZkF(>%pycB-Pc} zg}6}$2c&9;cm}&Cpi;=K!4Hq>6p)OuySx>6CKyI=lUh{=2bR$ST;J16>m-XtmOyTh zF9MX3oB%B?JklgeO6Mj2ot#6&&LB~Hm04+e60+P8_nx*4i}drNS);~jMqGgi-&0p} zI)iAazQ*p<R>77i&D-!R$ z{qkrxDvibj-3<+xgJ`M0~QPH&gs!`GRqr0QVo&NxufzWSB>6VM^C* z>iG4RjJ+ke9O@nE1$@2pmObcHnRmNbuJ8=~q5;kdam!NB7>0Gm+kdvYe!BWDJce-8I=paxq>+D%~1ijQ9T=_Sznj!8a zG2n7p=rdc&v$jfAU}|7gJ+Iu%eX-qTJEWDiXqhl`P!);&^T@&Vl=D#%=X(wGG)05> zFy^5&|LA7ix(_{3QcKgR0Dz<=S0?eMGwad4?xIZD(5?vU7N_VeJ#6mJz&wJELz<{-Usde8UqfFIm7yt(I`f#LKR>q2j~X_gG1 zaYg`pxh-A67^;}*Y+!e+3FiaQ`^4qrUBg>}$f@Z?o(AtcCQ!ZlUFbD!<_mj;`m^%ba0;|VH=Kmp-+QxQosztW^ zWo`1&8)M9902m+=7$nPZ&Bs1*yNQDM?$~N@+0TTZdysCl?(9U;u(or;flm~^9%J4_ z8ePj$dF8Z+WJA5UFk6BO2$<7QtxUJMm(pFqi$O7Yc3mkOK{;*tA*1DZ^D%|-=Z8Se z6NG`i^4wKdtXx-w*fycmpL2>@oNeZeqY)d742#%1t6O(fl;ABsUQbrzh{aRRcj@pE zQm{7DDLbSvzGyT$YyYu^#EKB}bljW`S+wSI7@NGme;ia-uBuO{gtL@_X`+LF={GWF#P+FgO%U+YpDMXc7V}zxTMl;ea;X2@_VHKw1iq9Ye zScy}%kL?MX#B+SNf!JLVZoW*e=un>P;zTV%1^ZD&qx@4k+pi0L;%ny_J9ZyX)RhTz zk>k~wnaok*{mS?0v#<#DBGvj+skdZ|vJ(=~Xy+uM$Qf{av8TU%hNi5yEa>nqmpj`k zUz2dKACzR*dQvl{zY7p0Wjm^QsbWhP6xPuS78qAXb<9@J#94|I5Z2HSVgW^H1dbsC zBQmRjXB1^|aq4Urg~-|-!TvU~LfQ45rX4#~oVtJQJSC1<-XtE@$OOj-t5x=I{M`v) zSi-);pshjmG8ojRdzzbp7j0aj6)|4PK4(Djv*N7-4~}gw=;Ywe%*ae^RUwTL&i74A z0zd1CJEi!Q&`Xf~D8v@-P~}A=vLmnt|K#*w?9u;=j&mn?d)CU+g>fhPjX<{L7%!$` z6D}H$3p#biUl|Qs{i$Z4xrz$S2V)8SGnhp^3ISC8BT^3Yj@|%PBHoXlIIkvt__K9D z@kx)|mY3Mc@6qYg6rkRwTo?ApF~$Y}6uY>k=E(rJ7{nVg3{~_`0PAEH9q%K2+YB70 z_O7nNU7i#2QOgNKY9HEtXLsFHsWv1a%n)4S;uBu~gfXCT9XSG~G^p$C_3WZ8!7mQ} zF$O~KvDOLXzV?KI>KB1f8j}zi5ip7}-IFrlG4J+^o!gfT7E`W!I=ZLl5~aCSD0au!Q|FWq3iA$vY(E|78uQ z@bY7!Qgy$m3iTA^G=}Cu`x$`GQ8($FnxYQdm|3&J5E3eV{q=L?S7-ZN`GtDAb0QS{ zZDp9X&Z#0#ir^G>9TL;Lx9f`_C1L4c^f#$@KwP7BPi7(zk9(9Crc0821ZcW9p_fbY zN(j>|!r8;_sfhWtDN34haF*w%#G$-#EmtDKuv2%s4ak)sa69!7 zyES8`+g|15cbPXeg)dZWA3ooN{~{eG6w$*AcL}(gn>iv?HCV35m{ijm@=1ZNiRL5J zP(ZA*wS^&i@UJ~Af$_<6D+@8mVjjTjBnyNYb6?DyNW~m~64nZMSek}aU?-!AOAwoJ zZ+TdQ6LTdob0|`@$Ep~KtM;2-U_Rfm`nKZ?#2?bGbHCXEqJcX1H!a4S533wV*gy~S z6UVO5&yyj4JupYZEwF3Zy`fOUqdlATpaa=tf1jz%=y&Rx*6&}INPAzW-*P{ z$>V>{nT#}^?yPcVvOxjIE-%kER$OJCpNtg2^Th51?yNNI@8A!Uc)Y#@H%Q~1GK~A5 zW=F)#ug1f8_b#z~Tmoolo{kg5+J4F`J01QH0Rbw}VYyj^k$96XKNVpGwDgbNjfRu1 z3BDditu^QA|HSe|OjvjZ{i-J$O-msJ^2qhWfZx5aY)d%|)CYcc-o0+qwcfw?AXK7~ zY>5a2;ge&x-*}3sA*YV5lkC+8Zl5gCpmlY_*&#Ja8uM8hG@A-Ee(=TKf7WMV*w(dy zqjk0>13>HNTikTj@oIZ`!x&P+&nmy*T|89k*;_IaBO+|^pxMgg3-Ae)9Xm6`3=K=! zBp`zeITi6%FkS=0(9wb^b0ERVXtYw^+5pF1M4mKG8(YS?FI7)ENe7US zR#*-B=n8&-%2GY`{W>$_gx{+23WD_4p!_8tn%uALP6!dGD*`OI>z6-N<*XJP*eXez zBIcwR(rrhTuuqljP`)tHq@O-T&7w+N`V}7THB)IR=VdM+vcV#3@FT@-BfyV~$5a2w zb)+|zX0##&oz0&}lqsIdKj5Nm*zbtTbTVc(8+qPIAe_&o@>0QdyH%Cq1-aPn{(1wJ zp0Kq`o$aByGOhsrlGumIc2QaLrf4!}TNR>ZSc4}5wEc&6hig>HUXoTF!PYoo_8LR( z-XdoI;Ta^PoJO@u`#5ux4)D^#$o^H*m?vd73 z)?JJe#>KGqJ9KZE!r>e2=;Onf^cs<8bcEKl9!-jwiGmd!FxH`|ICvbvFuo@C5@Oa{ z@Jw1&IL{4H;+Wu;XG$x~@wpE!=XJxVB~f=l?4UCLKHl+dXHc{MQQJuSmQ7>we zRvnv7S**T<7=f%9Fk!p_ffuS(-Gzo&;s}^v|My&!38MBnDL#2+jM#~twf6Dbt2gOE z#shq((4#?!SvofBzdI<9imPIeS~0oQq-a!z*gC6mv|;bB{Tf=J=L;?3FMz!5tADrFd+W4c*>>g^{K z_*?=P$u9{=m)m?b9Sjk|tyb41bs@>{1unrOezqtA*tn^XSk%}}w#f^xAwpAnK|T7X z*G)i!$QR6@1Vv0RgbD#0b($ zH=JK+HfxYM(hh#V=Me^^QEzb5>ZX^0nnDTd;)B6O1TMS)WJl2T@C9!32osFYm#*(} z`Y^_^V2RRY!kl6p$ar&g;TeM2rdg1att(8dl=e{w=ztO2rBo>#pr1HU+JTvoF~%H8 zr7WtO2QR3%rTMzrRtC>p7Oc_RH8_sUk z!b)nBRv}W54CGS8K%GyYR)daPtW^dd_&ZX=49+@ZYi!~G5e_YQV~GfSeS;mv~jOH z*wm-TSD|J-ofkKKH2NVS!&x*{(CuyQLdOVoosk^{5TPm`!X{G0QCgk7Py9?l0m|>@ zvTf59QLwc+b)g1lQD~>&G>O*m43${=rpFmJd$S4Vg&=f;v``-oLe4kF4XXP<1Mhz; z?F)gR!Y310O0-18^h4x+ZF~utDWAsCzZc_y6+WsnOSe^lOVT~7Q4en1=?F&Cfm~sc z-G~q+3F**t zpbFD;R?eD&Hw$w1S@8!3%#L0x#2al5b)w{OBg#t*{p;6flFSEO2=b_8{qCmF(>2># zM7~D@a*A*>fFjtF zmLd3Wf%nH04L6bQK@M6i!EGPfn?s#OM~-4Ua=!>wI1U?b6p~{RNWRZ-Y;v%a1l=Oy z4WllbY#~T|gN1;H@I(M>!#7eDy_Db~A{<>|td~X6d}-8i#R*Q)c{Fk6`Yu9zK3|)cx&uwBIA+)nk#A`)$@rE3P#ATOEfrS=Oi`J<%C_Pt}9D4OCNbX~Ue! zpUM=#QDBYE)k$lY9Qm_N3t4p3@L6ka;1<0QwHN#?a0k@&%ts|7xOk_UmoX{RB>huJ{@1c zBY~h%o&E2(h9De0L@MFHc><)i9l2yXXB9hTtT~Dv(deebdC$p(7InoO&G6o00HM}t z*(PW_I&+vs0C{Q)%1L%t`rR669&DkJ3P0#t#vxXxDj~TXM+VN}E%Zirfj?E#6M-Mo zjzDs*ONlTtnZrb}k4=)7aX9}DyMil5l%1%+y&NW%%+%Hjt+^9_($DQ8zbbRVPR1pR z(X76xRORl>LFZHn@63ZL81mh&1bdx2IwiY)BUc9Z<3wHv+S}`r>?DKN%`_+kh)-BGKH2$dZe?CsiAH8u3OIXGmT`(@gKP`YbRoM@R zc4bBuYX;&%rCy|AWO@Kgv^_7>N<*eJE6fX*3oxY7IV0Avw&MZ?qTwh7W%g+pC{yB0 zX%h1tL;5hgw>kD1rs89DFC75t*w=k91anC8ITZ3(2<^W@g9b63<;56#r?uk^ZW%LCl=33wX`+JF5e+)>UfSb<(~foLf* z((do&E4mpIAm1R=S_0FYG%jUR3SH5Kx(n@M1wi)BUsQczYLz`AMONA=7T>0S>L$Yf z>EV4_f;w1WLO~>Ly>2wG6Jw=wOU+v`Ox{?_pvzF%XPr-Dzy@fsTh7m-$o!|2$aKSFF3!2)@yZjEikx?m=ccEh>xC0u z;QW4nNLTpYDyyJ*s>CdNs_Zr>e{B31aymQ)RtV52t37GE<)@YXf(4U&Srq@29kL>O z#t;_W6cN>%;VNgLIX;Dn9w^h!iZ8!9x?TGHz!j$&mw-SE8ZCIM)}od_Q4oS+x*RGf zLRCbDTt%)R&x|FnJV@R6nto|67aFNLs)^LLXN{7V=WM!p;|CeA`5($S8~L8>tykXu z<9)0u8-SA1AjJGk$fc6cMk~h)cMcgJ@lVyZ+H1AOBTM0rr>;#J=wsd7dVaUOIqT zRn(S_xo2mY1hGGdlEzE|84E!M?-m)hz0~e>WlRY2su|B`FF|=sLo$CZU?uR=8lm*u zu01t=a!MU4I7`i#xV(Mtw&H%(&tX^P&~d^aCG1iBQR+)km@}@w?0-v`220M@r2c?x z0yI|RRx_tv&(CHY7vcZe8V^*JT{TOcUamnC^Tdsa?ce5&9yu*Qy$Y)unm@OP0d;U}HqF(r#~(=YnIoUQ{}>XM31?`HW@T381Pln5bx10WC$%v| z5Y8bIw+%xES9E{I!iWs|7%`6-R1uG?pk~=D;9`lfHrC6n0Hb}6{jw;=w=^YtJOF~W zU+aq;croup1N6HhmqsUfH5jEI))IE;9bqgK-b&C6OrHCNm&0(vK;FUU$N;+0ejs6W;E zAZ$S41r*@Y%l0x#gl(8|(KsDi#dJ8BLd*@Q4W>Hn8^mMZi?(*o-47j zi=hs&N53aSp+K(JuMRm=tbSDAdCm{g(!A-Vv$fMwwEdlE4-zHauV}X zAZuw=aQp=@2zDI#AFA-N`~yLZwZU{E*ROAzq|adg$xdN!@PVJhM84V)YH^>SE#AP; z2dWYM1E=W}A$~i!Mw-8*xH7rS%Py+TamJS9_y5vora(7iwOvAP{f9kV`s>V+L|^iI zm{L(Gc;wb91-BoW{vHM_+TqH0y0wymK_tVDI=^pg?-v3mjghiB;>a9<;PTWWbS z)0K3Prm$*Cp_$;>QAm?rCy4P#J*nI|0%;5Vj0b(uCPCm4FZrW+B){A~`6mqVjsQ}; zngo(LP|mndbUc6ZUnCCgK(cQEMy|M#Y z+(({d(omG!+DzW~;I!+kmc^YBU`{s)v$6uI&h!P&A9mka@mW`lgpWzhOh$ zj+I+PcL>IuYD4D7B&-Rd%21{Hp-n@^XjiFHA*!-5X}~=pcImQ3$q9)n7J{WF9NGv2 z*mdY*>rr+TZitgKh&$O~E>)l|A40Mm$b3qMNAtTb5xZWpZ)J#0%KbkB6$_9Ta9+oB zw>*4MAJ-b*@$?coU%HgVmY|>v!g*dcxvH57s9D%5{rmD9F&qf=VMgM!Tj`ze553@^ zpA43ReRe$ja#6j^+ug7!OpJRS3X;l@msZ5DdHUNK3tew_h^nrO6UPlRYQaB@P1cHs zsO~gY`&c7gN33n7agx#j)v_bMKpnHC$Mnq-`T03Mb(WB}vA(K-lqt4{E8ZQpXr)3SB7CE2RWKz3_43D zkTAD^vm6QKU*@9OYt&M-xkkP&ivT#c%=fBr34%q|8p0ADLZ4;jf(4 zW@?84AYpf4^v0MkhbGKpb0nF-0<%M{9x3?lKe_( zcMr}VnmNKEUafEY`lT2#z5u+YfLy->6)drE9}8JKBqQ$ch9@?5Ut+kRQ#%~pO zUuBco0gd8@^Qq15n*gfpDV;b zo{HrSAn-@tcls;hn-!tNkIYJ6yq?It;p?}fnrZ$+hvU5_Q737TY`}dO{xLE+aNFwo zC&NCQ;hRVEsIcJQif~1!P3%)!BrA@CSdLF7Vw*ox09jDeiAIj^kS)K=Y7LM#0*%g` z@7rMcsHelLS&cF|njC9u(Sp6UHL|n~ z^b~?A4-pKzLWsc-QB!X0*HVz15tJu_B4^sQHWw&l(sb}+rJ)b#_6dWVsa(X5IyCdJ zm*97JJEDT~^TMNFB}E#~X6!AQpzXzYPSz^DmJHZtU>JV7!3MF@h{6kI6d_BXxwlRb zV&|%2fQ#ml1XDl3ps0&_D_y$^ss3e{*<=6ormx6X#$(nXFMY&)=US4d! zIGRKiSwtn&^lKZmxKU&7=VZxD!H*&;Nq`&gVs#0zqNtJ=-|qZMN3tEJf;pS{_xE+lhp9-_PlgKGXN~Lg80fV7l9$7&Ej&@i+9_Sf#0`^9~4@5dZ z6oM?P8{ma|n$KOq@xlEhA4;^yzHF{Cp_g9YQ(BkqQA#Y_V<+gL#UzjK1In6teT-nr zgqTKh$`q6Igweuli@4`PuINllA5WyCpWF6$PZ) z$+Z(JwB$V$u0}%(P(Q@*A#=UtYrQqvdHg|0mOQ@)pc-3Pl#zEdLR{V+<@y}11)392 zlNOTo`yP^0bSo7S#@5ohq&fyDlRLgpxZt;j^jH-fVZ;EcQw-hEZ)g@v_8rjy$fJ~` z4v`q$(&FN;L)ZHExQ(VpYgXxrl{tqQ$rdD`ioOQxnh_^=FLrP>T?VaHU@+vaA!AMW zI((EDGtUHLb_=7%-%iSRf(RgF%$rZ%u`ArL5PxZx_WoJx?%#AF79DVB6cac4w(#u_ zu{|kHX`@xjn7f<8w%7593Zcr`SG8?ha5udGsR@SDVn3BTdU)4<%e5DyFU24Cz~K|O zd&u&)J&SS}Y?=|NEC`MeWk_V!=jQ@(0RfO@ncOJZm4skUF&hQ&aNqAmMhhHmNHDp^ z>^Yg;Y|UGyXV|KSIEze(h(eG3x(bj}QtnSa!xF5B^~J#IW+daA5q2viL>zV?N{Y0z z2a#Dg<&*7(y+qYwpQtT4N4@`23T5vFV zT`}jr2(u3$Pz|8KG`U66;ARfA1-w<2i#|QrxyL4(m4lR16YXGaMg&(4RyZ3}n&>s< zXIc&Jr3gVX&>qGfghLC|C~ni~-Q%sF3KaSF`63B-e4Z8pe(qZ-AusFD%ONnH5q39c=(N)k~WK+L+`|`41~T8rppH-A}4F3D&mKfv^2M6zbRx$<$l-!aR^Vd z9*JP?gqw~Er7{tEyA3aw+P#)I!sE;_A(zMiz?8rUH9c5&45>pXb^7T&(;^)wiGm4R zR=X*L>nwfW9JW$a%YL8}-tb`Sj3RXEGa^*B%Lvk-6+*(2*A`?lKY?d`R0h+45QKkX zQ?;YmZX=|{$l}`mVRY;;6wvOS@Sl4B>;V$7$(^LX2?1iJXzPb6Z|%pNQ?5|0!i_A@ z5t<`|Ls(Y$rP11j2QfHGCY;01GMWDZqJn=bOID70*2%wSPXvk-|HgQ$rKVK$S&jB~ zCp4N$ON;IGQP%M4L=hA0t9L4&pslhmeXQlKXfASGu^bN!|D48Y3!YHkAyZn(N1Rz_ zB;pTK_8Bf>ZCU?UZ=jreyw$G*P$$po)yXq4Ca29W94{rileZfe`fhJp9`0@vq;sAcnJ+ss{NffrNHf0n-7yCXS+GX*CrOc6(FOmvh14j7y8Fl+ev^-+m zf^0U=+THWe{SX=@U679w659H%X2-BuV})I$74%`?d@cUEC8Oqs?qF7c z3Um#}CP{6a7z^f(P~JHrI}ZwQC92LaTUX$wx`V3$R!oHjA<1!wIA4z*1GsvzoEO9Ng6$wF7CH(+OH z*_=CP2P9=6b~V!i;9uR`Mgt2`2OXWurqR8RgEr z#HJ5F6=eRh85kx%KCj0^$CMR9GrUT4!t=6sK)Vgy=QxQKx&5#hLMGo>Lo+(*BFGx6 zNu&lX#}fYYjg}uw=Vya$bjD}sIN^0<`(|9Kq`jcAo<8JM1%pMr%O6DRYX2OxL>x})kBcZXfp0JKg=nl zB}f;p@bzQz`j~O6W0i%HCBS8u&7R~eLeu~sK;XYq8%#;poxovk?K+Pmr67&0?P-(c zwH#auhfTD|v-^<_OyL;us~4Lzt+}s(a#Li0BkBhbOw1WUK6U7gEF_i6#`ne5+-*_$xpok0Y8Tgi}#1 zt8f5Urdm?|Jj~T=-%k(jsm|)S+%t?twVu(%jNT3?`C1B+28+_67REqAlJP>%cZYww zxRp73Z0;813Po3-DbD`(jq2s?Saz2%ydgaAAo&ZU`}A2!i-9}K+upDt9(z7?NHzs2 z!4R$sMBA-=@$wlj7Wt=v$NbOyqMWox8aSg<^=@ZuJfpl~k~-r1P7Fs|ilse0cr_w* z?4UT*XWpUQhZlr0eV=(X(^5^am~%1;x>C}YPAMv;OK_@z z;O{rxs~Kk%-VSmjCJka1Fo3;igjnM?3Y=tW3A&-bIzz|$%=A>gxUCmWI`rTS+Xx`P z8t@zoQ4hq>+*i1vxH8y|;y4q)G#G1Mucy7O#FwEr<=B5eM5H2-)zx>`w~wgNSQHow4p0#}!_&t+HnCcIm)Of8zU;ICbg zxU3vG@=)p^yDXUH?sV3|y}xnGmI-WovCr$to9lwE5HRnjTQ2bBSd7(u)I03)impnS zWfl8=HffIWj`B%VtQxk52H55*tdH)~Sblvt(>yl1+QiY^P{m)~wk382M%te?CY{sD zVR%t=!ORy6@jwTD3o*`D9pEa@INmo|F6L{tHs8U+d5xZ!(C+^V!{m|=KsDv)I*^L5 zNG@vMxJU;kR1=YpCBkvC!x#@s*mXHo1gMprHS33|wJ<_FrBhW7Gnrx4NJ~;8B z^XNJ}Q$!lApn0L7fx68H&;E;ZQ$Adn@q3hxfj$`4?83mOBEY3JVtbfy`SXC?$eQP& z#74DP#`K5CWUrBC^LjZgeWE&LY;IoCqJQutOIVkS;>Y_D(BTw=@Qcu?Lx}HGX_HW1 zQ@*68*P022bJ$9cMuUb!Y4FbP>yf#PVM27!W234l*L+NrYENe;Foi`7ydAsCD8$5l z?Q;V$j_J;@AF@xj#J4nD22EobQ8LrPvQ+Hl_}{vOJPL<(sSrN2O`HBuEtAYKF)Zb6 zZ?!$wMeibrCb!K*Oe(c@6_ljV)EKx1>4_Lq z0c{C{v2N8V<8Cd9-Eu)ZSs zH>n0$myP<9B|Y@9>EG|u(h!*y`^rJvFt_R1Kb~ zCkR4vCt|ES@(ewe0%20Wy3ah%<$s_J*J!b+_E0rN*vgJ4_?>9EKI(-pUl@wcgk4Pk z&*wkyr0^Wdq%p_1F@gxKK^#tB5uCGX#$LX5<#pFX>sYYzSn@4A)`#H}SYJBh?<$$1`$qr~m6Z!W)exHcs zQD4Bc>eWw_ohOhc4HQ2jI^Z%bBV&AKBNXm>GsdA5O~*OGCl9 z)`3=~tIzq@j8AR0d&}UFt_$}<_&l2xQl3*IXm5aA4?z~u8<`}loPI=BXm&c|km5~| z(pk_YkmHwn**kQ12@5(H*#)xwASgQEdpc~Qi%-F9?a6P%mBoiQ z%bN8c>#lefV)Q=9)rjLIC@!vcI|wT=r4n?yoJP~4pF5~iVZOLNP!drj*T%hmb}1PY z>5C6c-}WS@*f#Ocf3Zy)8t&jeG-_r!6H`cOS1f>zX6&o3v*?N5H-oX@z@NnsrbvsB zC7-oJW<3#6t@D$&AelrzBJ7aI=TTizBX)k>UX7*rMqs8ARmfM*!n@~Ma7JwVI8$sW z(&%kfmOJaXqHZQFWGbqSJr}+Qqrh6X!|0#Kg>2RIE|3cHk7j^n;}zCmh28uk>1^{SQVB(^8TKo@tFtiMZEhy%*7u+B6h&MY_Ig~a4jl8Ps$Alw^P+k98)i&L@IjQ z3fjSKOuvkG?vjEa%@;ZJ-9KSYKsh#c>Gn#{I@n$F#sG5Pg*h&vC4F{CM**!xnoujf zp2p*VXhXodG7_$xGia5iwy%l5X4ts1aZmzdD9k4l(=l* zqJ$gkVRpj)D$dWqa3o&hRbvty&%bWn!WVF4`DbQqj%~Vu!&D7cZzdZL}$hO!ndC1D1lZd~k^0UtLxT;YO4a{^ihp%J+`lD2(}_JDFzaTYEb4iIIFVPk;AMlxyY*Kn|lsk@t2Dm_c|>Cn2X2TXOd#6ShZuE)jjVU1p+Y%^L&;sjPw9`-F`S&&hR5S|{v(ebI4*Oii9e zOhTxx!Tinr2%qHYT`iLWg<3GIKmdYdI(Ted-G1&U533&NIlsi%hETPdlxd^(060kN zODa5Sqm%Kdx4+R9uLbAJ>&x8XvGmj_uhg$M6UiSG(IP48|dj) zX3#ImCF0p#@)wo<&wCJ>&d+UKD%8~K#EP}pt=V5EJM$BytOy`4fT6!!?A`9(3Ss#V zC=(X|E^D*)GY^t2W>CW~tgx-@vu zFaIGMmvc6`0806Ja>*@M()DQ!FuTF{P3(w=K9h(H3SLccog?pr1EHlWIa2v;u%5cG z3kQHGj7=m4nNpnFktn_LO%oXIk!}6+auI3U_6B^>CSHWy-1?M-Wg;E!nK*v#Z_}Lr zd1J`Q57gE&J)Y_CDa$u0uPs%;615=iHyQVZPDdQn%?a^nda(O{OhD5RGPlq>)v+h% zW{lvcHP>=Bi%Rh`~8#O0HQo?zfTbv*6c=-L7?ls8r-z_i{@30jskK)IVzL`m=r3(;ZN3BupalP`K6wF$oY} zO+?hSpVQ9ndX=S#-S%Hr8Z}KJatgSq7*=%y4j@t%o`vE(I6+>cajtObpno~f2k|JH zr!U$*#kon3k2OPTb*4Z6)Dz)9bA&_>bxdxf?DKoi3G#V>+>lAZ}(mgC^>=2g7w ze^*cYaG5clC|BtzO#WfVFlh9~u=4RRF#)DI+=Bci|9684fp#WP+rs7;mo3qycQ3Z} zvvl}oo>|4&9Yr^rza&+){N1y3Do$^Do!)nNd;UT*I;794C`df+yjw{Qm zb~2#o9s(mIHZ>^U!Vi+^uM88z;KC>(kt?!{g>zLgmZ4%ag}1;bwHs<=xQ>Y$rAL+) zk!#o8;DkVm!I`nF9}Qk4&%8}(|Bx%Wn!8rcyoynr-&uuuLyB_sR?e6CBgeZ3f;E}i}w}0ySbujX<(4{*#w?JXyejVc=pO`z{lfIjL#5mO8+B@jL)+= z{L?YWD72oYM8a>$TLtf>#U`aARl}Q86MRP#7g#UENq601_-MUC)1Fv;?}9k38gjv%f8nVqk>`N%uA0dvkQ!xF zPAr{7%3vIL?RTO$E7M9IcAEN|WBrAQ0Uv#6az+_uK?Rl#7a~AmtOzn#PPGd-UBbKM ztcg9$>^m3HP&jDHX=?kOxp_{S>gqLV^Om?#+!Tc3YDy)0NG zQKiX2EJR(ViHjG$ovhBtEv24Ay+~S@Xf3J#(b={)4gn5{+>;khQrj1cL~*jQ-uesQ zRu{TKA!aNlAQ=4G!G(#s;u{i;u&Ie$p1mGo_g-5YCv2j+=3(d`-Bp6Z;kya+5UdnQ_3M;%GFG2ny$C2-A#SalF zWB_#p=(2Nsn)6R@uiiWvP%s1ivL7AA6Mw~loaeoPCKF)X6AZXb;to8&Q<)M{KrBTg z^<>H%jeB}EF$4ezQz?aSZzmc}0T1hTR_~GG%sZ*}lO*<83pzz&Mq`-+DYap;1|8I;u%kHjTqAAr7&X`dE25JVy&$ z;t~7*MI+|;SGyj=)@A3N-P$PY($KxmH4$MWj}-KG@b&vuc9t?U4Fty>MsGt{?TwDe4+F~61e&B4}>7}i)?q@K86 zCd+09uKR`K^gdhvy8{)!i*m0}x?Y!%#qBY?yD7JKPIYaSqDgec=%5=Ge-~JPsUJoM z8ji=?4z7Xijj;5_e16%QCW{REaks*DguExep~?iC=%_KBAG>5f{vq5WT4hqrjc(~O za!lxoO@tq(`?JlEa1L6xbvk+mJmreAb5#OIf9*!~hFCK6ko$8bE)9&7kW=EWu30D@OG^)W6m3nL5WTK?}+N)-lXM8MdL@|LO_M0eP4T#gH57B^h^@Yz$j#5nm8h}b}quA1*Z443ODTN4z z;vn4LK@LxU%XX@tLG=quOwU(5dcKB>sq^j=4f@rhp^AZvEqE zFBcN8wcw4!aP%|E-SHkZvN&(b2X`yw6U5M8E{wau&w^XiEX=gJcO2zoYS@s*!;*1< zp?JzLKD%SG#biJcsmate<=ADL_F{I-gjoLkWhws^P? zk!U1iMJ0_mx(Pka?CYngXSLR1iT1n31^DUY7;#Zw4&o3+=5+J*{a98US;6@Mc^LyO zCti9ZYRXCOt}bVSyo$GjLIzCOz`5OKj<>;j6s&%Bq3}%YxMwyZGZdtD;CQ=fL`c3U z)i1DIQLh}~;S&(&14ofFRoCtaK%LgAl*$*)eG-VgXd&0V(HG9 z-Ka?4N*A7FS@3^#L2E@BO+nza#7RJd|-+BG!>*qBRt3?9m6n3o{ zIy`X6V)68q+AP&{qfc1#%UVuj3cFCryHzUq8TH0L3^|3S>hAZLGC+^Xcb>dKvyjM@ zt7-4`(|8LQ`)D0XP$jMwi*R>XD-!DG-^0Fp7fX9%7S*F+5+=jIYj7xQi{6=FUwoe8 zZ6m3pa?JR8s~_Z+GGh87|WaDXEezfFQ-#2^uT88` zhP_6EJyyzzhA9n`fBj}(Qmr;al`O99+Cou;=T)Qt^*xX5@-(K9k+Z8Y#LZl;8H-V0 zC-Tqs{<<56>YAJ{*vI!g^Fv%z?)&jC3~W~I;|mTZi7NNh%bzw~WqlB)BAp;->SxEo zAZw+-;LttY-o(Pbte3X%)*9nISdHMQ2d?VI+yWbv`Q{+bz9)Yw8gxi*LRIPFY;a82 zy8u`XhiXIEd-3(T#@F2z!e0yZ?O=<`UoZS3M5$g3z06!xWgWDw=;*mv(k#seqs5>@joCs@s0*QY!7{pz_&z?!`it8$F=)PbI`**{Dq$jJWXEccF{<+T zS!V{@;ePPbeV86)4%lz98|k2F1?^NkO7^ARMoHW&cZJJR zsPB>=(OSgk>;-gaGK07hgjHYC$8+(m-ueie7M^6R8dzMGxHbV%Nl!!jkg&bNKqY1G z&Y*jPBX3mQR54H^%E<*YXQB8M0n|_a0hv%QzxN;h>Iu?i(xVUO7LW6$;pvK|F@k-b z@%6*~#6M%`-FB=4F<;MTxdJ8Rilj;)TO-7A%G^(ly`&HD&!hv6be&<0Tx{?JN7OzE zv*_5I`=d}c@$K^=x2+Vnr=lB(iwIU%2HYh^rOg(jSxI~VEnkM4Tv{VOX0 zdPB+)YWT||d}jF2uxl*pFB*)@(%WSt0|Qjs5Su(-aiA1}XA$1p!@BLJnnekfKrZ!N zpR=!1Q#83q9z4t54c5(Vf{Z$NlAz|Bo1(A#g9htlg1Egb4T-P%>9*0AwLTg3t7@ez z-nhN^XRfB$941{F5mUN{NM$H}+S+STe1S|1%uTe~2uGv6gaRu?B`t*K5@x{Q6Y9r$&ZR9p+jvRDJA_fGF}+l+Mfj>9^BmAKIy)BC^XJ7e4-&l@`k#MhS&M>oT^-p>G zRAiAI^Lhs0yH@;cl*E7Q8X6{iEMCKYno2`q4@tjtjnMTKH5NB6Jz2_s_PjtF1DNn? zwVvKJ5=PS96zlnOj9T3?9upG)A!Ovzdi(I`)^E@>G)vE>?6->#LID?HHcoCQ?~lg4 zq%uE?e?T|Iy#p|KkT@gyQ;B8-X7hJ&f}2(6X~p!JrTQAW5CtMuw$o9YDY|~fsx&5l znUfF&()z!PxhhbL{h&Lw0+BH*jmG@TvL9$UXywawH;t2Zb2|?&{F$F&*&g?K_XA3j z($#cZZjH)G`w9bX+&|?0D2JbU)J5}j)6H?~!`gx;8qfTqmAyN_muxYMH=eKO#L& zkSpZ4Phj%ws_Tc2A^{$~OMI`_X`Y>+l17-L`o5lvMWpJiVnf( z95`e#j^^h^BLVL6Wh5;}(|1~_%r#7GxRd$WOUua$&vV~`9faALx{J>yCs3w@3x@vJ zf9A4KWy2Rq>umoW3;RZurX@N}jSy=L_0{Qv%3!AhOjb`jjYh|Rn@=GODiE`!2vuA8 zepXoYiZ!ph&Iy>m!f<5~?23o>g(1(4;BPjkbJrJX|3Vte4PM(l=lQ^)iuj5;+o2tC zhX;)tYi{HP_ac!ajbzu6M7PD<#gI%y<`{~D~xPb6-l(wX!s*RFvi2X~lJHO}UgUg1T6A`Lc4O#5O_4;uNC@>k)DmD$zHqL8JJGq@>`Ji^zq zKOeby03W`Ry}M|KC-PY@tomGY_7MLuKUu_(Fy0!K;pEXkxj{^GHq+DZd<^*ql&%F|Qh zdV|pP8?0C>AXw=c*8V&3ebfKeC9N$7@HKBqkp-sp?strl2Q`dbJbNMIB(aU#Q0GPNQqzy}f;%q`)}8nCJ_L z&K|76;1eOO{j5XNrWK;lO{7zdYIDw?X=%*glfEMun}}Js&gf(;?Z%q$V!0H2#j_$Q zJM(b_jk?*7>nWl7Pq)Jk?)U#10bt<#>EzEpGEZteYdv%_GD?j5=AmAFklk}6CYe?p z-OD&+RGf10h>QTa1KLyti^-7A%FL-FkQWnOn;&o5PXL|eXbnw!uY72-z^~P7+$!{8 zM>$s6X?s2k|By>e;UaxDI31uwTS6XIKh!!!lx(;n$ln%zPB}0`(i}|4t%~U-Bwrp1 z(8Sshg7~i={Nz9x`Cmt(?L1YdGJ<1UyBvL`q+E zRPxR@Uhf|n2ut{^4e^y)va>`9&^@P1xS5TlckKTuAJ0(8ov6)b#BxXJ$S}p>@6y)eLGMPq{SakJCG5D!B5+N#Q?yw>I zckQAM`(?<+9IqkYgQgXtZlqh3=tzR#Gpo^Shhy*Gg5+m;#NmN=!OGrHPJZTpAi z4HU`uaP$W=si3ah@v!>Fq5)Sa)R7#{$C=h-7#t!a`G+Q!zFyzusFe`@CJUvHoo|Zi z{H4q*E1vZqJSCO~0^aU&#^qP{X019^bxC6ZI5cm+J8hh(aillIUm<-KYN>_$4gF$rV6sLhj}VUu7X;w$VlG zMVek(?+}*T)igDZU(c-GO%Cw~>kzt|q`+KYgo1(gZVVa?ApWUMR)OmKPgg z9Jx?$izYf&++P~M;3uQ0fjw~&Q;0w1DE;X@ya^!09f5;p^cVtOSVP9)yD1NjrNR2i zl{^pRyry?Q=)%=Mn68E4hz<@Szkv0_9>Zh@W%Ud zcvFF2<6G54E*n2T;QCNpY!WRv4v`?0e3D|Y;E7-DXD1qP8`Z7Nju|K%aKd`kUEtYA zhSja{>ClIhKPCn9Jm>YqhL<(w(}=Uuc*6qicfFbLYv*Y~@V95c-!%IgPXv)E^d7Zs0k zQyr7B6cLUI`uCGbd79|pvkS(ODln*;gH?B>&}OhIGv{@D<|dpp3vxlO7KZfuOSdbR=R1NcyL_89w5D7aYPs?b)ah{dAAuULEh)0>kdrX(<|8+U7}z0R zMGnrzqs3N??O^DeE0KG2ktvU}un9PA-wIlUl;xi9oE9 zCBw)^cf{(x3JN;$Dq_p9cnHwL!W*fUThl19Q88_$#ZwgFn@!B?49I+~uJ@AJ`zeM4 z2VH!Eepm@tc;(3w5F6EXA(HX*VE^XzJifElK>GOKs9>9WHmc^orHXC)YMafavvZt; zWCedq72Ss+4Yt*optX^5|4l%F_L{%olWK4i&7H6Z<0z2yn97jx+4<862!Fv{mlLPh zb{aDOZlG_}>j^joo8@gI>^hg2Czh@PjwX^9UoWMeE)J$KK;zXMq&1O2_pg~Jy&3hW z>=)1y?1!Cxp2Q;PZ4WU03CGAGl`%e0IQ>4I_}R9fLoT)NH|HY_r0A~*=J2I~wKlv! z0f$)0s9^6MGG@K?Q4{-K;VpbY@n8*Ift?wBg6_|vd@sv@0lOc_jbIH~idY6TDnLCG zI@m+wi`1T?YVKaMvc9!Cbwab(15+RrC_QZJFcgFIao)e0uUUC6)^9GMlZ7SB?t+SI#CzAX#S7BJDgrAaa9k_iS2|glA70w#YH4 zMG@0-{_@Rzno+lVZbt!8=|cMcw2qrQ?-qSDmJmM)J|XD&^ul1=DqyFN!(=IM4_xo) zV?lShC_f8gEr^TZuGi>j8%jRN=7_cafTw~>O{MgT*>?4FX|%sdVaJext}$hs-|)Pe z#5up^{lzmL@!AJG=ogQ4%k{7s>-Y0e8(?u$1XX|P z&G~w%9S&(jL_f*Y;({p!3sv&D8V1xQga^05Ov5pgc7-S`RD?b#RJ=T4dD#ul$??zM z&LzAa$$p@_;pe9ZK+4qEZGz3t{F*(Jt7aoT;cLaLDE~s{eIG4QtqSRJ;(bgLdgOUu zwPLaXjbvY5_EUZji3?{n>GB`{54(?7`*k&~E=o|s_&t|1ieaEoFO$wj5(hMc33Kwj z!-OI9__d?W#B;2tI}c4f{yWQ*e{ccgmKo!lPWU|VeeVXAG4hxp4Te+LCq>zWoKQ~1 zTUi#dJu&=BnMJ;0K|$?_^Nrfgi&;apADCHeT0g(<5}-3k*+b9|Pz3T-`PoXnoxS*D=#k#>1E7cNgXWbMeE0ba?8b82-9=@Ule~Mk~qFzQaTS zS0;Q86IjG;#u}gkplRsrL2e70M9}7V+Lkd`_r_Gj9fbGKx~;H_*J)f}#+|voZYx0{ zzb_Xrm8_4x0Luz(+9#2(?$c8<(Nrmg>eCpI5mJiAR>E#$be-}7M8ht5h!9dAoHynY z`FTf5%|iBOqtsA!FwV4vZScRC0g#_1hF*lSw-h^R>wn$8m|=6K7M4&HTXQXu)CT8R zem+0N)Q&nVH>eC^eiy$2!_gF0)K3UMW5b-Huf4W?GF|Vwii5>j zFY&ZQIh59|fda>VyO#7fvP0uX;YF-M0(sE!w3T?nFl0mY8vf`E=llzdi+Zm6VLi~j zQDtt*^hwc-{CjTg9ZA`q6iVMp%pWVyf2Y^QE8;OLh`M9G%`Susz7b{#`=Fk zh?_k&!rp$pvxlK(<X2))*5NPF9WDqZ^nE-a( zc_CaE6~fh@P|t8)qHpSeYDl(=!O)QZI|LX)d2=GZ1ymM5cd$u#hieYMsI2E`+hFT% z`NQ_x9$8g4388oLi{;6?6Gql&AA>YI==;U5N)n=*pE^9wf4G2cDca|o5188-N2q|z zCX+>_N+k4O;aiwc{E~gvo69@2VWIHOpekf|#4Vb%wniwfhoRal(gl0;SJ0J861yU1 z18zJQUbx8~MF;w@&7}l58X0GH&|Xpyn6KRVAjCwSR$$3iO@!&=Du8OQbFAk&8oN^d z5+^Ddl(xKp{{;VsDr1IfA`%Q?`@P=+Xj#)n4ceA#)HtRP=!L5q9OI{li^l7{f)nkX z1PL#I+tO)|>j`H&$N*Z;>37~*#c-9ruaamCdToAh_=svd*eZ9}FIt5%Y&-G;^SQvn zQY=7cD8-5KT^0I_{0}Ut^|%NMhr;^ybna?ncT7$S-XZ2eJ37JDZ^V(DH&gYWEq)2s z=(2v4-J*5a1uR5ytki>HPsj$CL4|F$?i}LMhM2%30s$80qfP7H)V_jBb^O27B8f&N*LZGjM3zSf-d$PwuH z3ws7YvRn9yW#cA5rkp-X{0GX6Q+A|TGxY4V>YP7mgJrxPwifP!m0jO?54pr2xVg%8>8!5# zwm9KkzX&;R6($Kw8ZX6t6(qfSQ@aai880!_*R_V6@B?MkaS2O3XMxCtoJ$kRoAc&f zz(xC2^ZOD^*u(pkjai*E-ku#436394DJvl3!tuo zrJvASH5zcCn@1%uvpl+V^06qVZxn^In#L1@-goq_s};vynd;00<~Tr+kC>bltM!79 zGKU@HLCxr*@oh*;ZF;c^u|Hcvl2r~nxvg3Eo2dZR(^|nZ@?Y**%EAkXPiYr@*KdYh z$|r3G(=$mbfin3?^D+_c(}TMx5_In+Ym!tG3L9;}6n8s4H)prVU1ma?Cq>`^yvrh6 zYpVu2UbkQONCFk=4;)Xi`S8U?T181tYv+sc7pm&85IElK@u8*H)yS|qg*imlDjBA4 zvT{=bCwie1?t?WSzo}0#_`hdc4T6%GM!InTml@k6FB`t`K{-q{8l5k86V6!=xk zVwnc!g*?uPOzqdpn$Gaw7Dcw|i+=0pf_U>{!>*s%tq0)Nuy* z8;74H0`** zO}$B&PSZd=XXb-HAyCP^o+Q~rM`C7k>OS7dR+Tbz>9eImzC1+$QxfV?CXUOJHi4lO zrRjb{@8fCaQ2T`uBlJJuiyj8`tJo!(?U*f#xfU>Ds9(pmPWRW5>T6$xG57015d+8$ zL^=Sg)(`=O9alEWc{6$aWKtu4;GIPEzvt!&G0_d_q)*{77{iBc}gRZxZQvnhV0EruD8Ysg|m?Y$UwM*_XB{^|uHEUh0^3{SM@TES+bPfu7>GMeL8 zsW7UAxOV$$`hI#jTPyXSFuTsBqe|*42=PktVpsr;k*{hJIyab`f3+f@VSyg1J=8?t z+!&I_tJW1A(3vZWm*5>HyUymnLm^)B=r-1~^zW(kH~6G+R{L^a;cg<44w0f8<>ogi zYse!(Bp`g9^o674yz<-{ahWsRA`{SBDgy=ycHgkdj8La!qWh;Xt_j5Q|3XwVt`j;H zbPMO&hyfb?6<|?WgUImD^`bJ^ZcZexq%An1ik$TYwrlm_(W6V4V$h?uE8Vv3$UMn~ zHjk2v;Y`8CmBMCkv!>F|1}`K`v$&Ciuypp6!0vtb+O`kbiAkeLv7Sl>d9XO2%jOa} zd<=983do(voZ2MVvA2@aEn72Z(Zsp8%+Tuv3dvi|5w+KLW`2jOG86(zYOcK&klpw@ zR4U|Pf?yX_$m2_%IY<&0ITf`Fq(Oq$@{idGZ`tiLJ<>_;xLV`!vsYJ4 zS3P*JJx#!HrrOR|ztRIX&z4p`bL51B13YM(XQ;~yWbCHZw*f-z;enJ5`e^cKoTO~i zT#SH!^VCkvpG9O2or)kHA&?&)>I#r59r9by93O4hDiWv$aAJimxyyrpn`7rDH8vTp zd!*l)C50iziD8&MZp@TGv)QPq92?w+qQ16 zM|#n-%kUA0wQj5{Q2^IhI|pMo+(^XCd%@HEvVe74f2yp3EH_qd4r_>fHO~UuwIr#a zV8#F{Q9uBtap1f^WeM$~eez%)=(-8zRXLvdlHW%HXzcfTJ z9_4hS|CF;xLK5_n)29prYCV;7i&HkgRkyK57aH3im1wG@d=M_+fYNo%kmIX6%`}YJ zd8%y2+4`Utq+_B<@e%4OCB(&(*^%tf4&o=8S?5NFl-2K;i$*!$1rglvu!@5zQeZyA zG!1WOTa*8{>{IUE?6tu4l0(a~|3Xdf-msh9HFeJ@@y0u(!hCD!N_7Qd@U7q%s1kco zNzG&w{29!}cXJ}&|AFmVGwUd;@q}9HeChQn`(nl#H(WssBXq5^Rb^*Ug8o_y?;?XI zjMAMyvuW%XhZ1IBeFRkcV7q0h$K1JS<%aVI8nsk*V&JR1lewo$vNd_!vtwv0ULWOU zxiA>2_fR>+Q@VRw2tBDHsQ}XQ#k}`@8LN^7#5f#~0^ixA%&}qCM9Z)*51t0G7N=<{ zRYFhjxbajZoN++M(pwp+15bzCxZGA}2EftIjwFrf#eH6yHrk!(F(T~@eXbzUogWdd zf>4!2fMjb-nyz1K@Y2tj&P-wRnw7Vx>&W(zT+|-nOcLeI?0snbWy*MVj32k+k zji%!*dZ%0L9atuBem#>$moA#8Esp3WG{yG;hqn3%X(#_5MmZsSxMM8O-w~K9_}om% z+VEWditXNJ{+a>ko|Ky^D3}heze48p`&M|1iDWU^ATCs zmK89CV5C==0?X7H(Bs>2+L_7!REWkw%3%Bzdk9N_z)576`rU`?NW3QI1~W$|RHSvM z+ne`|JL4Z4C!KUl_5MSq@!zROdEIt2Ot!Z&(l}|_1q)WlMM#Dk`wCOFXDF_ zC(%Hh}sZxSuWE^DR1B?7~MsnV~^@ z(%*W&8O>YGgxDzmzSZ4y5OX>{bB4Rx#w#IfUPZ~#4dA0V89yImNm9qy&MAcOK0)_+ zWQrF5?((K5ii=w|ZS?JXA+4MQ=JN<^X0<>?epbt5^= znvTW!o??QmKzRxM#h&`5K&NgU=D?G`T!BT3B?j4(WZyC9hn0VMxog*rODM78KO^rK zAGyKfILUE5(Ga1;z-{70jcjEQb--@bpOnFQcG0A86xhEgJi3@_Nzv${k^^yt|CmJU zH2VkMhcXUZB-ls=>rCxA?jSv|3u1yO^;PJaxU zL7RxzqXLzOl9HIa2T9e9n6^e47|4|o^I?8tIwhr>Zzv$?XiPD=f1qWAxgCfKRG5KV zgo?tdQ(zwMhwSJpGbyE`O#Ud0)!n+7QvySAZ@R?Z zN(gXC*ZvgaLeA{z8Y9~mHF$2~;PmK~H??_ui6s?z#iwD$9xY;|u9+aVYZCSmQ~_uR ztwH)#V^yU1j!{7!S?|1qqAg@!qmr;QgCznp<30k6>KRoarC)=7#hJLq^2Bz?6Kymc}Yaz zHqI`f)E)wG88Id#@zwz=P6K}PZ7mh73}(s4BR<@o>|?!arHJ8&2+{S{+aH7D@p-Qr zjp^5gfNRUbi`g#X+8*d`8S71kU(Pp4tEF8@UNCI|^rJ!OoZGj`qx1)|TEEy-k3dXF zNm|I-8F?Rl57&5lL&DY#p=uVsZ0zdstUV5IrirfVQXGj!xz*yUoMFbPWwDs&ow@<*$cC^`h_b7CL_w+oA z%zCwcTm9$5a9Lv#AA^FF2%#L85|BN+twx9HN+=AJpw0JY&5rmUbo4**prcUSsUKYT zw-&SO3I@p<X0&;H zdR&oLwtzk<&{+HefuaB=K-s^zH5gyQU|rC9hFjOfl}J3sj(Fjv@7n+vOTjjF#|7=+ z93JfRXlAfY$Fuj z`&we7aTV>XMQP)|p6D-;tm)7>hTNq0?Xz*<_HvgaiHBQYQ~EV3ir`G?k_~NWGoFI} zE)3JzW1?8us!PYgBc!zQim)i_eT%TUNKbh4q`G?YWJ+eVj?%IFKDvu{KeMROHjFB= zdw-r>^W);-X+|T*6o9A~5pLDq#B9mB;mlRo=ZF)A+oAAEVtr(a?Fc*AaEwFP)xj&o z5M-kl?Oqwq4XfAahtx_Ble(N{3x6 zptp)&X6_vC5-K$>`mY>uQC@3eVH>koOGjd-%U{67RO}r4^<)fUTUoTq+KkO z7#hx|$(dHa#z|(`LgXj;26b40SYyY?OC`0gwzq@U!O`GT?Y5EXf9g&TqAGs1SF%XK zIVQ3Ids>q%i!)Hsfz02}=VVUa=X03V>=V>Esb#k@F?b3$XbMk(k%^n;rk=n+25w{G zo;b9fleRg3;MvO)7bUk8aqGX7jpQqP9eENRO_F-#Ye2ezNFzVmVy1nd<%5L=Q(aZZ z-KV*msRo)X0zdp2T>vSNPzfD;SFONspPF(qXPYvL>uu!Ce5Go3UzY|MjzlnyjlM5Q z2|khh^c7c^J5T2gyNo8yR(Mx2=x~2~r0)!Ywf-c96MH4BVvGoBTlIjS{H^L}nvRg; zG%Yq9aqdPSozKdsKD#pL3wGn($VLC;b-6tk?zX>y%A!*y38D~}%K)hjI4F$jBv0dp zPgZ)s!beMQ2-9r^s0-P}+%(Fmh!YDs{gwlvxN1JdXHBSj&RDUc_s(x5_KJWy^P6n| zs;=@?N_^4gp_Z}4mE(F?LlDahXvlxU#Y#?BiVQ6@on*{{eB7;vq+kJCnW$h$r8qEd z;Rr%^tcw}*SO`b#@zQ_(i*iag3gB#$xoG?QmV23yTzz8MIYW z9k&y!!g(K#bGiEnAu$kyMi@hTI*4sv5%%La?wwhug9Hv)d4HH_bzxog55;;($>Pac zRGN;18EJe?6AeqVGS|xgS)4ZsZX)30S_l}vcFhanzR&kF1LJLq)B$)lviv;tb0c1b z(6wL0KYC(>`QPN#f%p?c%n&i%=Jumq?#G!UN2AEb(>LxXw3?8qvV0(D*=$D7B}HG$ zzDPV*qH^MM=SYAMd~mr(504YI;aHFrKbkme@!F~N7Dv)$PR6$e&`jofx`x<(XR9aW z#jTMr4r0r~hW$dXXYR|G1Z>{smvQ1R63wfZB=aQb_>o?9qbmb0rX9ks`TU!bV90B0 zox=)C^Ia4l!;lvS3^aF06GYW^?pO=(Yf+O^*rb1~L%MLC?;W_KUA#OaOrBl5O1F}c zy|c1Xm(nYi<1?Vz7kNa0*%i2|Ebm%BikBhxg}wW{jb&^gqhO~jzjCBjjEf{OA7C`p z31S2R19m zRq%B-!nLU-ezYsb0XpPU2Qb=Jd#ac8_S9TW@SWQ@fV{#SMbNL*8{9?Ky$z%gml7ht zMZP9H$^mS2g8cVnd;n*Bl#U<|x!{EpRls$O>TL!azQak<)rwoDgiNq@?r4lMeNpsh z@U>^AEwkx)_~?$I4Hy={v?6w{;(C((9$Zk@E4nUo{$~gtNE|M@wSzJ@t&xeBgSaWa zVU$LQqzVN(2L0@o+)zd3raMdHBxcCyk}n9m9{gHL`1gJ`QZNoY6lsp?5(8X3%Zm_p zV2?xxMHs1i^_C7DjSVno2erz^<>bM4ZFNjQvlZ7mOWvB@zWu57HSWj`FSIoc)8a!2qBjMzSlFS$y zB|_jRV8%jNRMi$&)V;i7E=AvSo0d$ib3(w!hY<7g4=6CynS^(w?pRrb#P?shg?bKc zR4}VBU@UbD2ZjJp+xfSJl0agf2K`k>0~ zkUo! za%meyC=Eb?genX`8#W^ap>MH9^SNqdjCZj?9u4+R#;d$h>K!M)t;3%+0C(t#w23r# zjdb}~6N)2m8*}z0zHpRh22%M%r#euqXa(s@B~QThMa z^@w;K*ZT@m!>C_l41jjD*$mxf);6?af-Lts)NNv^OFb8H&|&^ z{15+@R4PW0G$ifk+HFO?zO=UO5;w7rQC_a9ikAAR`mdwlPN-UEd>j1TQ^BMWlf%ya zh}oBTZtrBkzMC|jzwxAxPsg`UT$VV>2Z7a^Vqcr?RD6?90>kr*sK(jP1RoJQzM~`K zj~G`S{oa(M`m3yq&8;PC2!iN#tVVZzf%bENEp521n1tj?|I#k7^vEgQg6C@1v7JZ> zHkQnLFAMczk7M6S?%m>{zx!nb!Su&-Icz_wu%ncLg(Id+4U1uo@})sslZ6w!0}S^O z8zcfCXG|F7{L+Cnt0{@ZyE-#$7wvqx9g3WuVhRJ8skmt1FpNbQF4>+(ar&*C0XjD% z;U@sUQvt+cnjjHy4W>!?!`y?4w&l9N2rh^rWK4E`#*eg3_hA@xWwI7qZV#4gjpei6 z;?!kPGH(2a#=Qb3EZrh=5V{^S6R9t%YOEffN30g$Obs%I51)&yIGs>w@;3+id;O zw`8+Hl|%EycA~4U(lj6o{ppe~gO(Ju_mK9nl<-vdIp?-~?Cvo-2>LW^u=7NR!D8ZDHdrgbP+1dJ<&% zK|~MvujhxY5fsK($uPhI`wV(@!oYGjbNM#~L^@#)*oRYwA)wk>z4~l7YN&SW0c6u9 z9@swT>QjP2B}1HoqSwR3Y%f;FsU%QJ<`>mdMb^htQQhBkg$Rm&+P3~r2Cmt;!X^nl zB`On~dro_VVo{$9&Pw~`e>wMCs`xR>?b#usi#v2{5kD@m0M+gAz#)6Q$5qZ_(0wVi z^-@ooj65n(LcJ$+rI5x6l7k^Syu{ynSKSE90(7o zH_Zz)`FTsLSB&in-Sv@LE~+fyN6|?is}b5~>(59OpCwzCDfD{>{#fnZx?X=#IyRfGD-fV#--jBBqfDKE!W3{hlFSX#oCN_@r1Y#t%qUk-!kcVgvyTaWOpV)A>4 zC1euF5r#5Z3+7@e143_8i975ZWSy{?DR?5D$)T~`oHaHisg}I+s$N&u^krEW{m>q>X#MO90lfDf@ zi3=QA$}&~aMSAMac5nfJ)L%FS+92vC!%HkU1cqFIZxIi3(VNibj!*dJ06;0(xfP;0 z(Sn3Z4u2N#U~(Zye}TIkP|n$f=b=5jVzG0;qzEm>%OG}d&}l>8k<88yl@-Bjj!JfB z;y?>-<*e%a2Zmzx^hD~nZsF}`vhB*ZT5iMSdLXfO0f@^`aJG$EPQac;D)q@ zzE)#-h#j`v?uDD3nItGv2!cj>*)y#Z$FP%R_AKQB?1@OL*$}1O0*sk)OBsVm6J+kn_J9+5fP14&DV+sNj zUxHPWtC>pC_~Jm$$!zI+YB4k4oe9AkTI{Od+%UZgg{IJjd&a^>f@7Ca3nr+*$5d$g z&S>oIm&7^llN8XE7&DKtR#(RmQ@rs%Ifp8l3?OkNZAuK2X#*hV7vy&0Gq#Pw0>cnN zt;2hrik8ASs~WBFPdhRa?&SY>Q2$7_8ncB&N9;>*Zx7=%(A@3nNO~gueyy!|aH7+A z|JlX-&G-KVOsn#2AUQ-FK#mr!OIYi51@QdD>Vn~4HUGK6(4S=YKbrtk3wwQGJ8q_V z>6yOtFOSkK!^?&zy+ME2^|b|DkIGBZVDKL^-W8J#j7ujJF8WIwE;H_eeu^-4B*Olx zVzQWwcG|64Oj@NPh8V=_tjFAbf>aQ{m@Yl3s7-T`Aq-_mCJw@o9WM%EYf9$vcPrCe z^}}iAJ`aqmf>hF-HT64zP&8{rukyf{+l`|?(+4?BkeU=b`$hN83b$2UP!3Mw$Xjp< zJJ3VyVE){_^tyM^oh{o;qX79iFeZa^=tOV7v?Y45aRF$Q6CfH0!V0Zmg8?z zE@whnAknD~t~#&mDp$}?5Q7NRIu;mgg!B7m-k%{Xtb3^W~~2LhZ|vo{h#*b8`$@f zbs(?i6daiNo6{R?_vTGTg^}iI9Qovj(5V@I;216@O>6ipdL?>N(^@EoDYw!s9j`~b zY#$aXjTk%P-FPJ;T4~-%T6VsLzmxI@sdPf@xnG|>rdDEG8=(hhG`7-&-hb-j zeCE8S^&GYS;HhfD__jV-z~2<^v!-U#t5_WJeZwsCy}8NI2#uvyVr;jCD=2~TRQVS9 zjS2HOcb>I01s8ULWzSG9m{N$`z>R{tRdDWgviE{-iKtTPXTl?xn-9&+dsLDf`v6K( zPM@ALP?tuf-2f>49p76_dw)M`Xt9nGV#@BK)_zyjFHb90p^($+niURU^1?|n6XoWN z_&X$!t1FIaYKnc&mPEqI-r{ry684*1Hq2EfSb%JYmzA9a+nU zCNrgAT?5yt{(I9vqh<%jqEE?RP&mS^zwc5VzB|__Gzb9Xy2bqTenvVeB%?pGz@QgH zSt5WLiQxNsIOJnz&8wdKewslES{p`D6bCZhf`oxO+lQm1emqPo=DKQ#noY zNwimygH(Jrn%m7d>l%t|B@oY}WG}2%n0A;ScVOFO^I;L_#oLomOa}zCHJa(f&Htde z{!kC!2u}!Cl0ad%Dtdx?h3#3_KZp+LP1GAPs(K;e7^;RGvk44u+eF+3L%6jf8>s?M zp;ekqpVSa{#_FZDRq56Uh|+JNp3T2~2eE29+mZS=XHYP8vA)LR??Vvg9_PmLW?Rp* ze!OJ!hwrgYjQlR>+G$+k6h&MY*au8%{gMZ~CR*I6@2}`v{<~fDf@nm6h&g5vCljuj zJ3C95$bgPW*6aNzcR**)u?N};o%~?I_}lOY-_2#ns^~bmKw6~*e8z0< zeY9yf6he~%sVJo<*{aB*UoWQ9##(vL6gEr(a<1iLD7^06UIPjqT+ z{OEr~)a&f_ZrQ*^cE+_CE3j6ympFzefzy`5rY89JSZ;f7+Tg`b*JFr?d z=r@W0y|)5d4UbF7g$_guB@OgDX)re&gpAa0bjHG;;;@<~JGqGS<#9KCgm<8`A6par znNF|_8(+^)VM|u3SZbrnBfLgT+2wnkzyWT-aKp`el`F{6XZ^;K$jztL*`!;3Hf2%f zc@<&+oXETC_d34D=?>uZq!y_uAlk#Gtb6&3-i9_@+{XDv%$3eXTgqu`aDssH??b?& z$PnK|f^=)D=QGtlfeW7#H3Sgg0hJhaa5fI#7|I#)fokY9E!xLIb1F`Pid95|?@Dz_Qb)L#Qbc7_L_Z6kF+)(kx0 z%aC5HS`Aplp83C)u;Ds=R~#sTVK&3zUXm(n>K6vX=8{FFM<)4Dq<4f`M^;TnGnq&I z{i94rSj3OilESu$taKMIakh?|V1-{NZ5p73J6x$5j<{@}3Pn(c4 zGOTLOq<80;ZR{6YVcHyRC}<6L2KA9d0?Xs|2m1tmZvOXn8JWw0et|NXei6S!`_VG3 zc^|1nQOUJM2nD)du3~gS(n{E0S{7~pLYw;r^0k=pJf3G?uGCp)PvB1vuk*FpBiR8n zy-^=U?@S3wOt;6U?`2~?>Cm}oX+nH_@D0f+@=^GxM&2t3TR+e6`nduT+=p*L_6zO+ zak6xa-C6*pHVgJXFg9Fp}}7+i%XylY=OO=^>qu+52m z0_mL7>jalsj6Df#pwFQ9ky`5kCP`Oz&eC)ABdX3sKfr;(P!Fsc#8C6D@>J+(tn|S) zhc<4U@pzNaAe*2xlj&6eu7wl(2VnRACfUkjhsGkLYdE=X)F~{DL8S!-B?M@_Y@5;q zPn%?Z^oOP?XU~rxeQ^mPB`WY0v9bdUdVdEbsdqm47tN72Sce1=)00|gOzh=~kA>6i zF#<^!5cJlOt7X1sPtM$PXd~L`6BbioOcCU(Z1V^zMz~oGgAk5?y4HVOm9;FiN5%xP zY^)9Q-%wF3C~xGyiWeKTYI-k;`SoLh>{W1cm9v0Su7fJZ+U8st996791wkO|8U{`k z?)SfWy=6Q1krOVfQj^9%y8cIM(fM!RdF@fHW)l-$QAXDDo*@#CiVCe%2hb;n_waW7EqR_RN+#&Wy@%}RD zFmW?QtD{f%QF!5!`a}7G2v(~aW3@YQK6%FT7FmAMKR6`-9z%!djSpUL55#Sr3s_cd zYq?!@11a32Idfbq*N7B|h@whcUtZ|HhVT|pugS8%yc|JQO}yt1!N{R&&PZ#VN(Mw) zi%H~)VD8`qM&dJfZe%HY#vvAWk|{5?J1@l!nk8`na1e*yes)@9R3ZorKQ1c{=q}Pu zRdY*}yvCg1m|kd}4w#DzKHHzST*v}aH3af012xu#-ZlWXD zTzab*27#l7gIV~~G1zDLbu@jJov_mO9fiodr$@1wr)-ojf0YtXT&g0_*NaP+K#2_o zquYKaT{T;Fu7d7v7JO648zxIGElRhSD+e%OhYq|-1ro~ z7w|=^4~G2ozAl70JWA_Zb{MoXk+CbXSS9}B!gy4#p*88{eOIaC%*IPv?Obd81$?!v z!13|&lK}Psvtvx_KC6f)f;gJ3KV!&y*r^f4X9d!@KfspOp<}bsrzzYl!LVkf3WeGr zg6a3|irEB?K(MY=YLl05C1OT58cSskLdHWr#ZI~|#@#a~#oKk%1hU(U~{eK#sYYnYaxLPq}|Z_d1nf|3O<$UNuO)uSc~lJKD53UQ9? z_-?> zuBd$DQ6D+0$iWiA7DDX=3r@8(JU*ew!J2GkU^0$8AgOU3hY$P`M^=nrSC$GdgX8yo zART;?2_xdhOoeZi`C(LhLvNVFfe|pcN@;F}D!;er|I~VxoW9Dgjv(7fYtOAjJJ~8~q-W;g~Yl zyr3A3(w{3`6}WqOyW*pg|0f5(NL?iKF#E}QD#IOR7+3U|j;_z@BK6c0n&K32z1R31RuZd< zfU>cOGju{jbJTyP&RD_a26shP9ro`4P~St~LH?z+|AN)zY*uxxt%$VC&Kvi~<IOO`no=DXfX&K^TBT)-xTr}$#{`f&SoRW7)&DB|@1*gT-IcOjWJxfzo~4_gxjzt2uoTX6Vo?e| zMU-yB|G^;G?u13K8)r}Y*r3`4Ene-nB`IjG$261xH;6pMg}2Kvxe9a5Mgx4JE@xuU zTYKq{N;ehfJbEOVym#X32x-Y&|AWWqiT+`9^TBqzUALu4wCAN_nsH%gv*IYA*SZA3 z1xh!JT_JGI^;>2qAV{CBfOtI$DWwk>^P(ZLl3s0zx2&TYX#~WMCn$1`HhA8S7S@Q_ zVGuqi9Uocpu2&HRo3~QN3$N0Bhr>aLi1FAKB+Q(tM4{}eBE~!OhOvtL{G9GMUkneQ z>GH*nxwbLDvl$PGAD}4JX-K4rS7vLOD|kK{(;|(8nX;r19?ftRF?Qo7xLcI4-8(r1 zRO4UXFa+>3IGvo>u5TwuldGQccmwqx)ldO-x^13Nf=hpj6jX|jNnj@udo3fci`rzOiD3C z2FaD?ht@7pzN9mnDG0^Cg)g+k9SCc~T%P*qfXec*b^w7KW5pPWnk;JD;)LNtSkt7M zsRTlKEi%+KE9b{EB^wM2{;}diNA4QXGo~{`YE#cE=R+3(L48K-;+HqAM8c1w#>(Y5 zwsbwiAPT;C$;YgDZ#_wT^XYN3xWMQ2b1`Bv*pAAzF+OD-X#}#!SzonvNFfHqKTK1G z|LM-g9QL)X$+R<3X6JD?M2}5yDWH+ZdS7#?nxg8h$^(al0nQdxJ_{o{FJ!=L0Ao02 zyAP_uFdtjj%5^07e5fSL1|C3d%mew|&rF7qAY^V@=%D(Q0d-|+_Eq(i{B)>^4QZ9x6UaD9#i16Q+YEs9DZ+|v0iaKtQ`l$HjDHz z^Jeal6;grL>vCu|$psa`t#L^JNBv2nrXGrB@~~sU+oqkbvHWUw*M;$v75L4?B7jzh z&+&|Z`}N_E7EYe++!e_P!Y8|tv;mjF!>>i3+YDIbsGLo0PsMA93=)>|Uus0Cc{}Dt za(#)`PJ!@=Z^BtO6`hr%EbjgB_#%hv^z4G;C#TpsA<@C_a={a%ZUFxx*ukSdV%e<|*!*)1xdOsNQ*CIq0uE$;*) z7`eO-Z%f}L>6eF(ap_-u5*c7ZgUU<&!op7td#j0uoFhsExm`V%?!JiJLi=6g;pA8K z(-|LU+$An#RhF?2*{wD*ThI*;YJKAgW)y)-N$+d7qR~cli{|zDwYR`c0G6$Bu7imm z=DXsFUn|8FzY?)WDek%5uix%{@PQ+%X+jW|cL!LCZQFYDuD=WLky;MWcTPZ}iCocn zOa6G1E}lQamZ4+HSEZ{} zTGyVcw#NQG#fVwdd%ic0S7#f4acqAm{#QB4L>*@Hm2xq~*I$}>>kiaXgm`SavOa?R z@e{(xZD~JFr|fVeQJ-T!60x$W{&+p0fXTDKsB>cpStxRCmXxs0K{-jiR$~Jn4k1Wt z!+{AB_cDXRUBH_Jv{zZTZtv_x*98FU+al{QZpv{Rm~7)3vR{xxoK^KNB1WYO|m86szX=chFHuL(ZBcZCv~!3|mau$PT|u#ZP7h2#h>)9MPi`@<*@42FvVCf-cjWoxnxk_4eWY4-Q&W|^4|6{{XKl@I zWICm0EY`OB!oLgZS2C|hop~))jrNcf zD62pycZ~zLIUG1A>j>7$$T|0E*2?u*#&)xdXJ`l9i-m-AzX}|ImwkcsFv)$d)A$V8 znc757KDJPtd@t!t@sLTc3WL8jll#CP1oG`xW+`S^3wtU3@(JtoZX2_h*V>+>`9D|< zB%Cnb?-~8mZL+2l)Cby*_^q?^+9CVU-k$lg4f+@iu1h7xjoW2=;_p!l$@-#G5G;aj zo>&T*jAKkCs<2QFjtcJDQ6RQ!p9$`6Kl>4i6faE2AK2ohY4x$i@fd4j$5j-__BW#{ zfkemNyRg|*3>X=P7QYz?bt~<;GYCv1rf677*?l}dB)Hd#?uqtsB1lnAB8sMX9>QoJ z4#gVF_kECdEj+%0A^H$B%&A)%*t0}r{<;4h9Y@-L1 zBJRKIsK;zig(s+B4I%8n{A)KxhwLh<6G^-W@2V zyhS!b$;RqLoZmOt(owE=qUtdMdr)P>8i$Vpo|=`*%*oI?~3q|Nbav z7&W~0oHw)Kyr2kk0P<@mmRYVO%EtSOK>#UiDIx`esg<4%Fqm8JXQpN#EK`uX{Bv1# z9K5Q^Fpiole$VH$H*yogdwWYX2>@kOh{EHagQ~_66Mz-g^Zhv9E4p{#YUji+RPULN z`5A zR$KQ}jc<6DV%i23H6t`w$W6F-H%HltNTwN`N#m?6Dveh9ycfH>hJ&l!8|B#yWLn*q ztp%d{3U|m1_h9qowEHt%l<58^VF?)_$O>M0^i2D_WT@os+|Kl1M-(4Vkf%z@-aC})ez#C8S%0XV)b=?G0|ta3~|m*c{VPshpPUx3G0FN<^8pd`y< z49x|MH~COUiJB`|&;`~MwgU|4|B;KOProNk8<>J`l3yC}w2&@lM5-2({`137H#pY| znw!;}hZ)R{GH~r{a@ub*=rO<)w*=N4Ya~r$30M{t(86Hi(v1j&-)KK;4zLZ8WlBj? zkVGN~xq>7mVMW7k)<_Xx@!2*E>*<;`u)KPxI;YDeOF>129McpapI9xM$Jf%D zZcv$lt)3?Qdjgt1y3drY!8$*?m|4zbMSqJgajsnGv7(dP8u*b z19pJp8!a2?#ayh|)a>LsWrdM17yh#)}k(`bB@^o}GPq^x!XS zQHaRwUOAEebtu7N2-`uO7SwyqOs;y*oa5)%LXIf&gNv$kNQ!*nL9-Z*L~v>jN}w_F^GvqT6@frCCUlu`Cf$v~Ez0N8fga<=w@<+pr!GUW;dN}}6qSU2?HwqDRw$R%% zkcHm?SVizJwI#xWY4BQ9oCH$#IK8X3{hQ-8wT`^mppua!B?WUMn#&JmKzh?)m3F47 zvTVrsa0Y22bl$gg7-8)%ts}*XOw3|`rSF1?X2P|$4C?R`qm&$%mJaBxuG49hZ%~;p zeOQ+Ku9dkrBzK6p`Ryky8W(Iwnus^y)atV#$v#)Q8`%!%YDD?mR#?>5H6*S9?p}Y9tEMx}{83l)4Rq+qFp6kwURc^|bOjZoOrNh&S3R^58z||;}(?G(f?1Zl! zQpk9?I$^F<c8~tdhtGfw`tUQ*o+S7WgW9D7 z)(Lq$kDwm3^?n!1w5v3mLv(1LVj*4;-jHsm02Oq;zmRNXt)&2Hm?z=r*y%Z&f#Fgq zFpA%YwS+%P8(EtQd9^T|ieC?HRn2nF=!&^N4*mbM)P90%g|$;NL7%b&O$qas@KW7u z?UeUkcbQ=|%f;tX{)17^jtKnh$ZOmn!HFFVt49sl`bKmcWIW3e$PZ(6srK&K^dt_g zj9eoNA5iWICtXE-txp@RD3G9UHJjRko1?4T42$%8)#cL6I@3j5Yu+~xvyDIV_Y)C* z`kG&Hut8J`@kTu}{cdW6&FBb#y~xwQ-r98Elvc0)mHyyl9=pqUOipzKI5U1Kd&J^6 zr`E6vz_C0MgPz-gTh5?Llx}%sW0hr8=HhxpLccBI^<-@uy@K%7a)(|h0E`hlUoRH~ z2%tqSuSA`1)8lesZcKOU|8d;thV8>{#3l_4f{9uet#H=3*cE!bQN{7TzTF~*Y@Y7Ec{*lN&2-F&a!v!D{~(t{L?E2l}A4mGkfMY3v(&s(LFfAU=`$Q#l< zdnLAmjK`0k`l*7i@uQsys=QxCe5T{y;_JHW$Yn|{jWDCY*NRtf#w$0BkXNBO%}#KW z)oU3)plbc=2v1e|2b6YVMLH!ps9^BJeH+yOTsu+<`Z_owyvo*mRtTag8*b#y{X7k7 z^1aiN;=3g3+9NZvcdd7M*wmGlO%5TQ zWS}!#s#ZXICEf?kr2_GGXzJHKA>Mq9#>Q=-{SAJjY@YrIyvM%dTN(>n(KcnJaIo5Qsh=S9XUL4Q}E%k;YaOH-5WO;}vUuCQ6#bj3`@ zwA3(!Eb0cr@{Jh1giVH=gXC-l{8;RPcMp5Xt1j8`fKUgCt1)hdUEy!%&WvN;mZXg% zLf~8EmkB>S^4bM=VUc^sf(OsdM7}3gPZCq!X(>_a@l7RVm(+aK>=Fo~J&rWj8oZ0X?SS}3X}c=%-EKEXONAVC7*_hT zdd~=8{5TE{giJu;joXcAcwU-T3mR(%8L|9EbUkPrGr`V8%EF23Xp8hPJ%7sXDZ~`s(mqyuB!GZNw9ZJ|m{grY;XhZfImk6J*i>RgnMMoZ!uxR?h@GWKkjtU6Q}y(hwY; z5a)}{>?^ls@SybbfFh)^t1}Osj6v6!<%j8OTL7GH!$q%upg@+=G}NK5?7A&DT!c}V z&tm)d0zrkfrL3`XWxUMNicyU%Be%UtH|j-*9xLtpawxJ-_gY-qS4%j#U@>Sk9lC_! zvbv|MjPyW9N6ho=wGH_if=fr4`MZkkCwgi)?H{V5(_}Uc^jw?7lVLj^);@b}b|;3p ze+F<*Un{b-7Q7k(|&1Gvp6TAJN$o)ZQg1M zQn@4O?|g{5o;l7rKcm+>H_kuo$U~54KGwfJ^s|h*CFru&5;(##2az96Py|y;G%1QR zWGVD7`D-RIE!o)rTMjCC+C^(i7iHv}QNv&geI0fH_~3xYAt}Z?t>nlt5hdGsm7?&M zF8^kRsy-%M&dW}9i-+y4guPSpQP5s@R8D>lgdRq4b>|Dae@^ov|7)53ZmW?h3g__c zkXbKQFJo@0gZDqouG54t{th6js|x~36^JzI?J)L!vY_R$J#A*cX9wfO>kUG+-`hS0 zb5Y3Q4)ue5R3)b435hEntNaNGznq34To&8eobYcV2P7*NCB;e5#Ro8@H;sAA>m{<+ zLxeh?1N~Aa4Ic}0ZEL!uMMMwwsM06OxOSoUG%VE1&FEXe-uai>+`=9Vo)#TrtG#?O z80M(JgvB7;koEh`hTbA+L>=n8W4#3BPS|*N9=zPtRgqR;k(vNIS~Y}Je7G@jt1zLD z0Y1+Zsk`!_bTB{fXLW8fO;XiO7ha@5{MK__?#)3NEv-9*_{I;LtOx(tY!tTC zb>y}3WuDZ3_T_lhbEGR=S7NsQYMB6a`Dbwx4ecLP%r z*&Rqarhx~fk3*v5FdD~BEW(&!_{=gQV(!Mt7fKSL^iTRYCCR$y^ngJsG>*O8UPCMq zzUGC&{-g95ZJ_jmt6CPV-5@SlntuEpCw3b63{OMPb<~@ZMz<&4MwRL7hGK&lmWgXd zq#O-m-~Q7SzwW+?7#Dc6{VBt=a$LZ!vtnOpVqz(+kny8_xTCx8spbERNRP;amc!>bVEaeL%e#*C?8s_yh4VuLsg z@V&#M1(&x}aS<6}g+U03e~ZaFsE@3ftNlHDPVUaD@m9$~;!>hMYK1t&P@t%V46|>i z0RrO{4-^i4zd4Qr)of8qG0AdiV>iAK58iVStqOkcTS4|bCLLByb4jG61YX)H9Ak9r zDpTU4tlA?vhW&z^tjBuM(9_FP=-7X8l9dudf1KbN4OEpaoIFA7AGIpC^gS`ip^Ra= zb9$3f3B0!#D?=LuEaB%APS4NkmzEKBrpW06UvNv3pA-T86tfdc@9PGLI=lZ+))&zc z6=K^9n9tgWse9K3Sz5@A1l$I3S+8mII##kt8HNGqIprRV42{h_f|eo;EY@NbMQ`lF zM8?~wrQ0hPeL#^tpiuD-IBl6VF7ZHTe;*D=0H#%131;x%KOy{A0n3r^H`d_LnFh)3 ztVPfKDU}UYD;Um^_T!e`g2s!T;EMn;`Vm1NZ|cJk4{IZ(z(E~9eYK6#mD96EDATg} zkuzyvV~!(;&w!owjQ{Q!@QIwm>vVPbO|osUA2W}(4Wpc&Ka==GpHYX6%d*BNf8tf+ zkJkt11%ycetS737w)1RX$m9u)F$9ZU`$Y*od%VD?ON?+>iNGnV;6nD2?u6cN)fRRs zan!(XXI3Y9$pn9on#zlYJ;ZGw@x@0$?P63-s3vxpUzi=wD14HczLPz4@IAJtUG&MK z{7_?AJ?p=aMpm75JI+3p_YTp7ScTU={&f^Kf(FM=zJPmt&$}N$@;|{B#eNb^NyfMT z-=T~QEbcxl?}^L8rPM%&sGn6U^s7Ddw+NLG^Z#Ek^#dhMrD~64Lx~g6>ISqU@EDrU z%4fl${lSVFApkc($iFFs5y)%5fM2H#ryO}zFc$GMKfDKBzr;v|@7i)AIjhJ_{uF!+ z+}Id(XQtxLk@;4f3aOE#04Q)YXmF(6E1~5);~f@mwrYQ&Edzx70i8`rf>T7NtgEb# znO$d&!J2{{TkQt4@^rV)e8o`VnjCI{B|hD((Uq&kO}K?M(!Iy@4Q3&}Hldo=6Buo&lfM@^*T^+I-?~%v zwlta6R^cQptX@@v+ z=vUneimg@!{y$$N)C#{n=kH2x|M?%Ex2|e}ssu^Q%KHehoMreXo6NGP~)X z1K^lP+P!lDg#j#A`QcU(x@w*aX994Q3J7oQKMP2Yd-BcPSm;aB{2l(T&W?OC`3@Xa z$Am6bhq6t`o}1DX?LC#z{<=s_*yUyO&WVKs$060QGs{u09<2>a`aA++1dPYQ zKd(HGHfkKkMu?V7 z@4|$6Yxr@kqG|ny4PWU;%#83@ZQ>x}gTmT$o+4_Xy0@vL9$2fCs_v3SwC z;vTB{(9%N&R1D9mr_?j)d!gTII^bYC_(7})Hpq-43VO!!}O7eZGHZ_v42 zdFqdL-W_DyL~+XUyiMZnP{^+@=d5a^03}+N|Adw-Y8xd*=}M6_D0q&wMAZ$yK)HZF zSKnH%^+LB&IdE0GR;cQC;-t?ja74`$bh#34c4dQZ=Pz6cRO-=^f?w}R8T)nBYaFn^ z$Ki8c7}$z}&@qZ}kRthE@x|eEXY@Fiv%|F9xZMIG5RatRuo}KiqDtzS{D(}@CMbD1 zmW|e!nOVzFKaf`)Ll+;ZG4DFb%Og_n#@t4I9Yczdml8z`6NtQU?b&=ZoNwpAH5}Vc zt@$3*`cS0BCmc<*YU$3(Y}rtvkCYO}f_=+^)H|%#5?&f1rHBn=F04}!G77{i9N_at zz3QOHJs5Yi#;c=PZO6}Q8bFuik_1C`1f)|UL**Q`QX=5Mgn7&G!2m~f7t~4 z#Y0|gbf%6?{3*@zvnAYFKCax&-G;eZF}Cs=&0-Ok!AFheLY=%nfvd&HCDGuCMT#S{ z0qtwsDtCN8u_nb&qrJDV{2dyDzFO5;o(4$_zM!ln7(<5fl&H@(3T~wea-^rn~>~J9+HH-BwNvc zE**Gvf3`$8joIPTWli07R$6phHP_t^Ro;$OrG}&4s7_9RwNk-4|;bX8&bAjll78y))|T(V^7qGaaFuko+C3;s)*NC zEZ_MTVg1Ennx3Z=kmNdh(K65BKMHZd1gOJ*a(Ld)zz) zPC<=Z+GQ%TU=$Uu5={~@{Ejr0p5YH)kt3vVCbG+7hs1tsi`)-P&|Iym`V5@xn*w)J z_Q2AEdx!Xh5A;j5RykJVf;+WXOX7QEzw-$vpbRey{q!TWerMEgXId_jpHGm>nC++{ z-FvWpLQ06nK#wu1VR?^r_F}S=N;kN88E!mHhyow2MbJyBw4DBIyluC?yRjFPeD*6! zfOcI_i-}Ve%D@`R&`v>{5@27EbP_yY;QJ)rJMC(D0KVgwS+4|0D>uWd2Ryb$$u|UY z$yRNhuAc1LJ@^Jq-+|KQm}h4gke$qQc2?A|raXu z+gUGJqeq04!FP%kx#OEpZOlq&*1QrKocrIuzr${7Rvq+)1u`TKNMV8=)X^@eisE5w zFk$qcUwTV11Mo%skb*%&s5qJT(F1WGvTe*IZih=EH|aAX`{7MPaSSEOF`})Uj~GqkvAja+>zt?WM7!68d0jN@ERF6e> zL!iQbi|$qFIV$h=r27Sr9&x$zut^(Py;GZBAl^QGk2CHVyvM1&xE+XG8ahEtID%0@ zICo#E^~wkrn1zqv5)_BOP+bMfW$G&H*1Hih&Q;2Q53?s=%#kUPeDhLhSdI*Im2~1? zW%X068U9xkD{b+{WNm*g$?ym}6Fi~J!F?VO<=7AEd1mnp5>h{OuydAISxl*z zOHcN5*UT9`7f_ca+a{k!N2Ex4T8CXhI()_-Es+_|`2zkE=~3Y8U)5)Bau=*4i-=&q zkXWDeqX(bdz1e!5K#}=AWq&+D^KwZQ8G^KR&I(bWJ2BDuK&@+#=l9(zmi?+v=SNxy0AQ;XG$Efcg%BTosZ6R2 zyCsx7K?!-BA#T+YX`IqLQ zv*_ZUb|bv{S$zSd+gS6Zevn&?KvLwsG!I{b;1;idh*vO>Z?luaksiOj(X9u#Ap5;L zjAW{ED_O$DqUzi_V4fQc(4H-IC>zsIcn~5Ov&Q6W&S+sXg4q%jO`a!%6NH!y7tS8Y zsvfD^@dU}OWw`n99!Assse?$B2(u7aC%EKtmGBXU49UgyOt_-KK~>2;8r|B$e05v! zy6&o?qHWH6cAtvF3|aS6VW|@(Av{P6{)=?Ik>(5#WaVHJKU2$gk0CrCQdP$qP0Cg0 zk2$axZvb|;@xXq@Z}_7QC5Q4HVXJ7I8OYPE#loRfrY%)c-)J0WteMYI(rL4zGQ=mJ zjnSYQS4E!zD$qel1@0Pv2LPmHnTc+$v8%O$?OOqVz)JJ{7Jv`KzrZ#Fpus@&0-~q} zBA%?JPD8mivwAhgQ^xm?&;s38tJeFhXS+oUCH`KFu8(U?G8;exHw}&>kiHMSYribx zn*F#mMy`~zGb$L#543v#(PDEg4`rc)c{=-I*FIqht>DTOFM{L*3u%0q+Mh0Jc|wmd zqaD!3TO?MP;i#^TG0tWncD|JH@iyW7`^2^e5^r7EnHP+Vyz)L;CZ)88O-l;1ts-Sa zXjMWgG?f*M^J%%5Q;UI7PTbA6OXAWfQSEXIFdy=qCSpjqP5+*9>(< zyQY+nRkohDY_3Agn}V{5AoQ43;U=#m%YhqZqebT=$k=qYaAOX*qmxJoO*o2b;D|Kt z`z7UIK2(M_5Z9z+DXpDXR+I8=_ea?_)yI6MZMMk#meAUHnB}G| zZ0N0NmmmRbVLim>sfC5mq*WV5%Mm->XA2m7%amz)E80NL^^U$(2Oc-zSuaP%;0{F_>l_e>%L2!}A(0GTF1|7(6aR>iTyIh?)D`VAbDAQLY-&WkhTXpqH! z$(%!^U~6fiin&rJCCNQ5Ar?I5lLVbifd!$l5eFX?07p;a1p`1va3GQ9Q=wLesQYgu zP#i=vK}vID8gH7rqelWP%gltUBG9(4 zk3)(lQh_ex0Qb0bmjRSKKltFrWVsF{SsyeDKH5PT6TwUYe}qV%`H}K;se57i^-=GT*YY<SUrsDYMh)~`p|;ikc$xq zkc)Ew5O4h+K^(+*woSk`!b{UgVD19@yN)=!Jw8_MK$vO8ZKI=|7O8#HcnuRlP|Jm} z26p!eX&kC6k0`6@QdfAcuG1hX{ zF@eH*gsl-S^CbAZJ z%A;Jje2@qfs|Jnte(pz%gx5(uI+0#gZ%E9RjYQ|WH?ve*y$GtPnLEoN-?hk#cN54{ z`lRqz>nO1G>nFlXWj81zjC+cKl17I7hMVNz{gTIlAgn)-l#bokrS0yvdbj;kZMzSCKm2to?;vmPk$R&cG-+ z6ROOHs1p{Ljm|WTW4Se}p*=}h`BS!3HERV_csZVTxymVrqcSiy z{SOc`^H=<((`#{F1PD_0IMhI92cztD7U&JN7!DO6NC0DEy$AE3LhlOg;e~oKtxF?N zpgB>>HwQh~H9dn&pn{p4F$2fPOq7u_$N>&__{F2wlm`F#PD)=x`JF+h$0}CPFQck? zxB)}?9HiZ9#V-xh*3PYoQdJ@vM+a4%B56@34*V7+@_bVd?;5Yj*{{R}fY9-vD&NNv zIiwIU;8~>p3<=N zWb^4fSh17Qh@$C%TS1BmPi1_kwnkW@?p|^i`wzF&9(2vnu&y(NQLhnVb*L_es}Di{ z^JM~cR9p5MbI0nOd7YV|Gb-AN;)F&%7@K}R21C!?)#}Gg(tQFeW zKsG~oOV6NuM~tSo*8a_*LXcx!`@*5<7X^JD{Uy^6aR;PN9m^0;TywiSFQQ&IPz&lo z`$puxTQCZ&B0yi?$&Ph>yLNvU(u(B!zhxsHi@8T4wdQJ##AR5GFs?o$_wn2)9ZgMrx@yhX$>K|lQZdZWa$}DPp2@xv(PF>%YG}bD0P_2EnqX@b& z9XZKC3}5efF--*EN$$Nbw~B>7xpbXMb93OS$r=h$`EdeN#Rltg*4loiCZ196=?hQ8 z3H1!9;NctW*>H%^_Z$F#bpH=V{hHEr8CDhpEbnjU=G!kZQq_;c*jr`r$;OE|@W`O2 zeZNg2AMp+CM|jL!-?(Y;>BcbCI~?gD5RrdY_5Vt-<_=wUVD%i;G;elO-iE@*o4uG6 zjsVJEfb69=q$ICzxjyhLU}>Iu^Ub>|-b$gyg<^}8)j$^zyh#jWcyFoE#OjZGr@-6~ zH$xS4Y@^=Ar*A1%8Z@cS*-6rPXHMMMTG7hZuP%2z{)+?#8El>Mb8VA?ycKUW7*hIS z)a*)K)m8qTqLiKu?;lVxeTN#&C}Pnx{~6Qm$|9EjUW3@Ofxehw!A==0@T+rt z&5NUNqM7>hF>?Ieclp-6YMZBajS}_#RWWXqJSz5Ey?AM`EZ4`3Co%f^qeaquECaHj zuB$ReR4AqvkZmD+^*{ESIMjb}+V~*pWc`ZsL0awl@BuZz}NlOm6CmoVs}K zYh57nI4=m0`OKcDp|gm-YM=N5pr@b;^t^a5l{KBHtO8s&78GmU_s+>is_qB-NJFy_ z2GQp7?K~8Rf)pS@z!^y_6&ePY@@I5#7BUlh3X%{>3{YMIT>A({;Sf=TQ3S8!lRMCGXle*|9PM_htI2@Ii&plY zjz(K;Fb~uc$EG$H>X^z$VEvx;T%7W^q622IWvj|MBQc2JBsOeTnga=!NYq;#wkJKP zfRGaK+cVd|ELRKYSGro>8M0_Vu_pA*#x?aWUa%iVM}=l#ThoLcoNinUJqm@$9aHZ} z2{;iR0+xC2Spr#=zgwHu21E}X+}K9Qy}a1uT7m9pX*w;P)-%?tX&|kUe3cZfE4B;h zHjxgJuaOGmpYoD)0zA7_z1FEhdO#Y^CgZ9K&kWPU#}iwN&Byz~j>^O7z(b1|{?0Qg z6DK%3wOUlQd{XI1?*QwMFWi@0bgxZTiRwF0m5w%x*Z+>A&!}q-axVY{EfVmzX*9F? z1sceD>*}Ia5L89Zt9ka?Z#pL3&z2~)DTeFINB|%e#CaU?O3{La`HOD*56HN5(jfZn zL8@xAT8u!(ica~CM1{vcD+h-V5ng~q>h#bM2Cy0o9)dDQFroXe^!Je-oCg!C9&Vl} zRTNa4KbmKV9kQ)Hb0<@7DQmt5|5M4OSq#?Mnduz8-}!^9G&Cg50iFn|SC3LxK}!mf zYAPY)){1FM$CNkeeI5P0LfGzRfT_pgue@9rK9x1kC9~C)fBsquQiAb8jFw1jYnvUS z7XjnT1fJg>)^x`*T0NDzd6u{dz2@ zk0mwhqI9@u8A}Xpq$Sk4eG4dx>1VK!*<4F1w^z-=3$SLi@WfxQ$z^HkyVzdLpA2xVW&dxw=QGyobOQC03Nx}_uv0$kI4)TOHOB7%U0e6<+!Y>7q+5+ zw&d$U;B7*d9c|vg$mrQA5)0uqbyXJ#HD|3dFiw}c#xW>+9Jqm4306=fR{SU-W^!0b zN#Tk_(QZoE_#Ry!%+xV-U-9y&52HI>jby#6@prz-3Y9O*&h@tyjy1^47b_xF+hOCcQlfb? z5on7m*_$CAgKRY&PQ7>7?_^VanDtwb?szxM=#XgGnmQ**`WLK{8#QL7K|ArSxpaAT zs$4e+XR{_znxANDL|{Wq`jQD(+_=C+OaTMpyLi{jDlLK<4n?=|dISbzqe?#VKN~$J zl}{N%9hKq_Q%R3S?%-p(n~i#rvHC*94wCo`XZZFw#P@00B{7I*M5FyS7RdQ~1j_g# zFK{w4599BO*}^l-zJk)fzxf_gmXmUUZO1-nbRss#^t=x@gwTicHRV zOKydy;CRq)NsjRek&+t$pWG0O887EDBQDM&3T4yuuweWw-Qvf|#n{{`P|!7&r!MfG zxdpG=QnJW`*pIcjB`viHDYmU78ZE1oVOX%wG<3ldMrip}+`E)CA9H1xt#%Wwnn>qn z>8YLF>g1H$Ek;Tg)1MXVA}ihTeTPWdlMKIzxsf<6_z<30!im!V5u#>uo~ce{_7aH~ zvFc1=bCA9p!yRFl?A&Iz9B-WfTc_2%jl$}T#q;t*gW5iS9gTq*t}u3379{UI>!#mI z@&+;&nRR|}JI}{6+S2tTE6Pm%Ym?pdnXYZ}HhNrR`}VLJat<`;tyR}^^~XM6%k*DQ z^s$4T`1UC>4kJ#$9p8yxgT)QNB%fNp>}I8Q2q;1-XUi|BlR#a)q3P;(yoC00IAkeOw*m}qSPDqH%O3Wn4r_W1M;zPfigWo)DzQrS`2^Iab88 z)}DIwOYkag{{G;GKw|?WW<8jfH1ow)mX5mxo*8tEO^>Kh?&mbV`wY-7M7#E}XEKk+ zp%whnd4Z_y4g%91LrhE}U>XBYw27*{_Dlx=oMmLDN?N=0x$ViH?VQ5$ zdkt1qL@!od%ZUdJ7#r)SeR6Yp5lZbrYPmQKr%ZkBC4m&@tCvqR(Cv<*>=~Il6G)gk z^=rzv?Dhf;_hG^;3P*00FV1GNOo$k0z!KEa@+`UNczoL=nL)b2!4)DIoJ{NVBr?my z+wJ12<_%IL5n9NMz4Z~{yqfK~ZJmoXc3)a0;-byNm9zd9OL&4f$M^92!Ssxx5Q7H% zgf6@&0$>-jZ*w7KL6}o4mhW$4(!&r9R3Eg{by_97mQyiqs#j4u7!fA|1HnJoY}Xo8zFI+pb+}YT4T$c#kf2gC#D6XW%(e_Bckm1Jdn zh5b0)IsCm_uti>xeYsDEuVC_kzcD_GTRP26W^^^*2l!^*+@p2s^#fyutONnzJay40 zR|Ok^FczNeDAp6O*ES#z02$$C#FA|DX7+m9Xs`6Hiqi6?^7i-3swkrB5m#QMn__Tn z2#Ro>a5ESHMOA(j-O>aKyHs@=2j8k28lXn}I&pWE`1}A-T6P>L!PJ2OpD771*J|(c z-l20b`b3Y5#PfxBS;!^h-k!&2MbfFA*&Gt>jZb;uSZJ|7F3eg%`*s z1@Fjnb2v(7U0Q?vd)ODID@rO1S`myXspSBHl@YHCT6ORgq7gvs8p|Laus<(G?x@V! zEwf3&e;y#c;@hm2wk$)kMKwcC(6wgAIy#{{YUv0~rveIXsz;TNyx7j?0D(Z~Ecm9@ z)oH5R0}>Vge|a+8G9U1S6hasHr6NF8UVEh7mIO|h3g(qPi;tJQ`8UOZYxR*(@yRVT z_^7qeBe_3yPZ3SsQXv+0u_!<4c;6Wa==8+n{7>uLBzIDPUy4e>@8x13+4b7+;)#3C zeZC-PA;AlS5(4<6g*OM4I{j2vDhTVk#Hm&&+xcnVltpUoH{)80^d=trl%g%j-16*{ z$Dl-vXL1P{O$gI7MnuPbNtXaGC^J_shNSPc#oAM0!QdiS-6|$s%gu2PH@9e>%B6vt zctLz#7)7Zx$JT)~Z zopdPQ00plID3SHU{DCBJ*n=(2g%tyY2%hj1KJ_^a*P(!;gb%dl-}9eiOG%`B%>dQPput3gArL#)M|?A3uhh{K+v?g@Kyu<7yWdXbo0Qbf z@Gt=O_A=?I=^uu@R1K0?0Wr&eLb@W|@-S{-KAA140`{{#A#DRkh=~g#yu4Rt95FMV zK@jSAOIX{gbFevw))Yc#aER&$hI!pUzoJ0kPly?8|9Y#@u!meAR$FEGvo$#sSYroK zBzz?JDOal995*B!ulX>d2vff9>!7kYTCI*+Dt(2Y#=Cwt-PfiEbP@EnjjE}wS)u_S zbNnAU7RdRAGrZc{{Mi47vt3rK;LoKh4`$8!?5fAx?}DvLRpMz6 zapDvQ=L~Vp-&hVkS(}(=%4l>lnKM8q=i$?``FCf1J5Jm$#OgJQRp51w&K|ZWd9yG; zv!*_6e!;JlX@PeJfviT`F77wpAHO1J%5KC(Bb|AHk=Es6oC~t^*%voS?sQ^ZsEw%a zK_-=?L!;I=u@}yY*iM!0iaz-DsP!_&+>W)*P4`FcqnAwkIbuI>h;A9I_;{GZlA+^7 zbs~TRal3TGm5yCxK<&!Ij^1cLkC3?0gk7gXVh_ z8@0dR@q2p_Byu995Z;1?^r z+$;}EI$&c%3Dl*;UIZ-mq5I5J{|iW(S|CP?;V$y6+WdxQOrx^VcsU8tc($XY6L9AO zUMY1kjxY-U_I(1qWNe$`ID1df{V!rA5N1PpWGJ6_>Gk-3NqF)jwZ<)OJt4oF14~5r ztT2&_yOuj8Q&1CqYz}uqFAWCzKCU+P`8zd01vMG3qmRO{;iTRmF;l$bo~Ct2r@_jD z#%s;cf--gRIXuXgIAt%+(>7Rcx2h8rnl)~3wF}RN;Im`>oO4^om(+u;du!z>TUEEn z!x8yN>9%cU-qTwy*P)Gds;gtt9s9N{DG}{KBHAW#<}t~2%tjEJodNH)BUVG7ljT8h z5Gqx9EgUuAJ)>!Pxe*V!k3!Ar3Z;=zCx6)3SPm5$P);Ow*u-1Q<_9nNQ@HKvi{Lt} zkm?HuMTvwq!GcEl-U>KUA+_sLr}E&O`wP@Usy!6kF4v#)G%>T-z3K!EFbEQ#a|`GV zOZUauE=~rl=B$;pS!wabCAwPO(8W~ifj+nPk+Ba>u{(tFHV{gwW&elR%2n;JdGz<~ zaf9K+K3q{mpZYJwQ-VG5rvQ&1F@Fng;NPGBt>yR#(0&5uaNDhC5>+w!xOtpSs4%(zwr&`wnw@jMxuV#S5xdWVTHi>HpKrGtk+PO;vrgW< zvQ2M-Zk-O&^rz1f!2|?{d@&Y&9;aOL%MW5f3TBd-mqsV7h!HB&cA3vmM5&lZ6)0`vprrAF zQnnmqC3Rs>Dxh?0kYP2InDo|A_pwtJJ z89R0(6AXf^1-DqE@a0X zl)NjVIq17{{Q^?X&I3`a+55Ah{8Y$mjsgUYR_5+61cL$UMsSV8=*|!}Q2DlR@1=Rl z>q4#l^JEeFW5Hhjeo&(Y^Y;fR}1=8 z5Zh4pa?h`pUWUr34`m5vrq$^a?+PXAwM@=4?XQ*We+fFkRyadKg{6@JWCd33%F<273PAgrB$#RPmc2*0p=?#DhA|0qn6 z$0^hsne%?dh|?n4P7nSsnEGp=s{2$qBhHkQ6`9AjS99Yy`Hs$MveDM zpJpVyX%~K;TlJ5`rmEq1=?>IHZ)EudQ3+fhyD@y`YAK#yB;%awi^VA3NHQi@UsC1I zq7RF6`9XKbn!|ZCG)jkj^OvA!og-~NypPQI+Uw*@pa#7GnK41P>pXzKEP9Q^L!$LP zj-0LS(c0j>A+QjQ9Vr)_MY)ddKW_kG?;xl|BQF)05>HI#I8PxhjoB%w*?q6mZBXLC9bsLeLst;Y&II_4;*kkDzM zBTpDEH%Tc%S3mHGa7T1o{Cg=E6tY-a@7Im%fk~9FbXcj2~lCX5}U`TR;JpD%OlA^kMK-=nfxkzLm*zX`(`eLK@^kgW< zYE$a1sGjE?9o!H}K-F`a;fp}~Il0o6O$5qSbvHjU*`XV2pYyaKIrx#54QR(ncjF&e zY6@>_98#Ai6c7m>kl& zGBq3(M<>A9^5^%&kIat}R-(Av&hX^+@xWm`fmI>AwI;2^Q}O^I2nfm+c1B81hA! zo*2f2EJJqPdS$`rCEgA@{dJVe^b9e~S4+gLoFsIJy4sITH~gX;RE1#yw}vhbBR#}) zz(-{Ny{@c+x{NNxD%m!dh`+=kFi?9yHb3J@l~Y}|+G1sa|J{eMNlgNXW|Xm+n57YE z8_E#VyvGzRU7$^5Mn$v|>#RPgp{PMJUHS)ys#cQ0fB6+xa;*Y7YSlzh#@|ZEVjl!< zF7h%GS$gCBM{#$t9^32FE`Mp`%i=cWy=T~T*J?Q3}IkkN)k zQsPtHPAhwk737;Js(;qd&)I{|fsJigrJhXmzjpvSXbh3RH5ltJ$c!erkAkz~%J#~9zSfwkK?#aF`_ z=msR28lgZ%D0%>+gL1GD+n&%f7nqrr*mk>hE=i{hMJUXCl9diC9hbIP;fm-;aS&~A z=jLUy2*IO!i#_o)KZvle)MaM|VH}1R%?)%vnupnx#g^*}!*@}+(#{L(c8kVu$%e^J zx!-RCer<=c<5W(ijlqDybgb{Jrvbwr6K7de?p`7_P>~TVM!l%>66O=uCq*lLm(m?o~?)wtrJwVs}qu&a8y5}Z2C|d#vxU$ z%E8*)bdNZh9t8wi1Go5?g8d2gD(WUQxe1j^0Yr8EGZAfmnzI}ruaRl*Z0|Med8Cx+ zI!;Jm8d*&j@HFP3QIqAi6Encv&_65-)|3I&{oq3czvszTRbC2>9CQkmKP)Pq6vgDU zSiEG=%Y(;1Tt+Z<0B;&ue%&UHdOqAi0HryZ?X?HI1@!Ly66YdHyX#ZVB@J78i< z{K8<|Bnm-2zWcMhJ)>nDUIsS*Df>hbyH4T-6|p`p@c5$CTGgaXTgD#F6iw>@#LY`=$vM&^)ZbUC{YgsDWl@=z~yBDd%uY z(nJNo?jpG(E(eAGS7#3#*Y9Nb#fRu}!&;RbQ4HS5^(rzEgt*Lbbyfje%?R_Iu^65Q zZECNzFz`S`=6RuJRo*5K4NJwYrz_yK-(gkok-^^lC3TF&GiJU&ZZ{mDu$JWU0Um3h z7YXWFxGb~V6RhEim1IVX>9Fb;78qfbI%_S_SBKn|M2{Cl>!;>S(Q1}VtAC5Pk!h*{ zj#6}?iU|0DD`-p<->X#Uvzk9xeuPVUVgfFS&me7;V?hD}-3V`gVal6&5$2;YfQUNd zI;1|wsZP(=TFbwY;w$ahL7?aOZ3D&}0mnQ%a?EugdtU(BG8;5Q)3 zf(c)AuFg_%NVBh$S;i@dFjwraf8;ps^Q5J%-HZzahd>^Hv{NQHNgh{0h4}%IzuaHBR>QTYzNt)KX@OoB0 zph7TKpC*7@Ov0AC7wx;hfEN9hRAW}sF-Vp1#$b&=oB zO=D%v45ZfqAGJ8uT5Yl+T#fZ7X~jM_D%%pzb-jn#vAf{rj}t! zR?{CBn$JDBnyA`k@0?7%P#bfcN8kg4o{8$EAtn!HG@txo4Or$2z-@f1ZC=0--fV{v zL$;5@=9f!YkdZ>+NEAZ+I}juPWFx%k3_}vQB0&wU3!KNe;b6bhX8P)_djAR*+58i9 z&8k=&%e4?(I(GxvKTSY_w^=!uX9a3w31rne-p)b=VWSzKU5t_{xtAC}%gcvN;dM4q zkVRv(dN4)aiecAl(4OInMthYX+JJqRbZpJZNF^qd5(u5-Ke9i&hQMo-mw4 zbJ+eFri?{*=4mcHzb}}%4o^INz5#b%agsWUCPZGVw%w zfTt8nu6AA74Em_C62Cm?eqfWp#D5X}PENG_b%|kUaY#2YkN$S<@Y-$H$3jF*>|9X)q14~HRl&j!l)0rpGr-X91!uQgxY|LHNrv2Q znKegDly>bzus65%&Tvb%gMs)ah*Sz;oQDGqp#_E^Un|MFMAI>ePyk=Qdj29_5|n9P z%k7`tj|wZEixu;7grFS^!lUPhVX~P$Ebcwyum`Hw(B;VA22e(He0^8f!%VH7$ugpY z>{6vLRqMdBop=UAGKuEm>0gPf-I=C)@dr$ag*h#Lt3DBBw048nSxB!b1)8;q!I55E z^5Rtnr)rCm-CE^)q*i(LYg@K923IYs zecTx>o%#i~j2U64ET5+@7&7(TR-ksgV<&?Y!DLe)GV{hewp7J7+W+fCpXGHe zG(R4m$C#l|$zpNM+`C#t5Ngh~zP6kQ+h zkLCYZx0w&v9{Y-~Gg}d>b5dBMDm!FNpvb@6eD45vZ~SzdvYn$(5c( zh{Mrb0@BdCTQV^$3rorvN9>?~bZa;`kAm8!w^*NKTU463`Dq)jF(1dAZ=d9$RX7~R zkzQ7xb~(8WiX1Dm3h<}789P>-ZZ$X4)0q*$3Wpt3GOg`TeZH?E;r11ZA*WGtuhECz zcfw4|2b^##V?@Rr;eK;8E}rNeVqU%;Lylm_bqM)Q43808h!Y>FUI7-O>rojxv>!Q) zKT7R;SN88@7HBTE);~(07~zJa<_sxq?F;;^ge&`12=7YWqG0AE_bT~N>OvS>wymQb zh}2$M4ly!aWm6~z3@zBZ?&e@ov^O+DY{J+G=oE7=F*rjS!@#s6iwtKh%ZgOf6$Kn^ zywVPQ@QJO@-dsP_lI~4?p3$ju@4E0U+%3%cRfnIvoE(JCT6l!x96An3mLwc7BUEoAbS<5zE085xOZY)#Wko`<0^eO4&=1#y}VQd_2#=;TSW zU)ezHQyk)&>=D^#arU!h%+Q)~L>bx1=GkwYojlIF@GPkI1N%nS6qZvLK~RwKO}Us& zs+(U}4Fs705vjP5coR8MW-T(af+4PLrUb zzKOv4yMTTejGMBPCAyUgkWh|>d{)1TRMRQboNC~AHu`0i0$lsu(89wQvY~=XL(m*) z1=RV4#(8#zB3Nmiq#1>1qWOi(pyuHKAU`Y`_BV|ntY6ozps>Zari+fslKbfVT+cod zwHCi4qm53w_CGS|Ra50O&g-3Y!{p7Xel64{X{K|e;^APhMSUYJ*z+pca|@cA&a6zC zia(e`DQWQB5z#1bd!X8YXgCrW?-Ez%f}`!09X>$ib|&8M0!Xt0{$$*U2DriW2~x!6 z+7mEg5j=0nsHc(2A&m&nV85tfv~w23G(IfKPV+dnaL9FYd+Js*z}gJ_j0)@;Xf7Ps z=wS-AxfZkR^R+3~G+~)W>BSyLK)D1`=E{}GOt;ZGWh>TkP&$RU_v-Y>lUU(^CfE|U zYJv(GTPdqxEObe<$Gu6|&jwNHDcVp_G|>W~j2*da*YiexapF+-qljoW$n1WXX&uwx zjG<9smuCjpjwKousW#s$-jDZs{e&tN`^@Bg5Ey(S)y-BehShOk$sVV+o^8%9Y`9iV z5$!#wCJ6O`Fe6~7|CNE2bMlR@OgnoLd@vvlV;!Y8umaBkoC?%|g$x@!cO-;gd_>Gu z4l*Y?-I8;xcd#=5%hz0E^R5Bsdo})X7I!S!30smdf6+b+G8!zgmn8&AV9P~Bj*c1i zcE|Ce{%CO;!KYFJgMrCt?sYyP55O<}|m z+;K2ZJG&TB=+Mb<0S15A%1(mh|?434Qv1^r|Z!rx7@lcVJQ(IxPTPlPeiLoMux z*BG+2*Q}f%A9HJ(vfT|#qi>nj%}17=+Q00YxBEbI=|nU(ohV*NOCeKwPa9TEj9{aI z?6ln!bH3SqPH>|RbWIF3dY_}xD6o^(wlPmIgpeJNO~7W}{_{n>4Nb9;z=!2)d2DD7 zWHX^@g_~A`W0b?R#${ME!D3kEcS(p3Ze0|RZ$WwufhUid9SuDYS10MG2Q?Cn^8;x$ zAR~*>BpZNYZoE=_)VQ1UGBSP}Go<-X3EZY#YwJXiT<5n*>jm-DdQxGlb?pVp%rbok zau(VO>}2DflHo>ZOj42VM0dPLMTBUY3W*b_&2;Sx@-e1H^Olia&2;#P9Z47xf@bjv zLVPqaqR;enR0Fd6mFpq`Mg%#eL1*K0{0SZCHv|#evF5Xtbi}_C_ZD`cXyth61NO%i zoGR){5xz8OJ3w8{dP8`MbF{vF2yr!0f_ruGB7oHM_K(RT!^E+z?7!3Ok|@lS?a60} zC^-_~(40!fH;1*a^^??JEUF1r-6|~2hV)BAuj2=>ta76aVGi&;nsyq?wW_q~v^DVn zoRzURMxIKp_eCKa;rc=lNhR~XG^_a$i;JDNdC%&-x(Yq8odIoT`R~lhGNE4>P>#tt z{@Jl*4Bx4u3gTm?#l44EjksLu#{}pXGsS%P#C>>kJk*n*+*w?%}ppcb2rX};@SCDXYqzZ$o_}t^c{RL6@9&pG6YdYLJ zTe^H~l9J+XkMx`DV1flAZBcKr(}^SNB9=`1rpKwIMeFskR_x?e;f%xgvk{)BscDG7 z>9>{tfa?AR>EoANkm{iZKD#Ey(AOOoFc18^1&cHmP%Sv?X=;3_d|+c4%`S#Pgw z9p&v(*4okJGOH&hvL;eNpZ_op7W=L(##zl@9W8XhFSrw0uqP_gb7A~9voOerm*Lef zPrCUAn~xZt<9#M<`M~K)1etWIyIXA~p4vre;-(xwoCus9+!^LOGWHT$nNc(?FDPzV zqNjK3etSR)g(q5;gX-$&)7s<7SjlP9ny(G4qYLp}@8-wMC3>LFkRn0q*Y3X{>|C(w+8 zkP>k55~yinTv;(%gSkK*G<#m`8cCKxX0mEmtX7FEpfr)rn83!fx|bb)%Z6`dVbAGq zj8=vNx|7yGG?ZVC?Kqrf^V%Md<(4q-3zUMY-Sa;D5x!t|L3Q%2s&)NQLN74sPEZoNQW+V|STZe_yziFZTXX!PrFToRi>DJ&>;v9Vgi!WDW zeV%vI8a(aJlAoF7^j7^9%r_1}_V`acl7^t&_lF8)IcbZ|8vDSEHrH_Kau8>#!DegD z(}m4gjHq%%AC0wGe0`UUlC8IkX7dYvCKrc0tA6@`g6;HkZ{3K z_5O(L;=LNgdJfxlyt5Jm&+=Q%(^O#Dkx;G%dybt@&>UY-a+D2fZ`-=o%D}VaCvOJP zpKQqK;3Hr8f+<7asU0jVS^}RzNf{c$s899x&ZnGfSC`lTorMz$*7mXkd6kqafnrOk zTefm_QxDHHp>{S%E@{TM>67RlmMnY>A;~DQ_N5zp8y+!!#V^}GTT(1}Gng7EywAF; zzjS@7y>HK^!vA)P!v*#X=2f~9 z%KKih4}HjI*wN)5T*MZ5e><)vI8wX`LtUOz%od`JvDR#;b6Oiowi$T8l?AZx8Ijb; z{u9yppM&R5ym~*%j^?V8EdfS{%ba{;JqP)zt64oE4Sk4@)4~i^)4|u<4$boUO1fSc zN09E|j_fxs9dJLx@?;5zpV;$ULNZU0 z_T}J%%RBdH6GKfox*t-jNAxocnfbg9cLQldjzSDfNp(5ngI&-I4k6&8*k{()nzs^!y?S-#<75T4{G0zGR1 z4U5++*AcLL4IE;bt)5QjDW5*YVC`|WgEnRn(DQSjBlKo$ZsRe8xyWSvU?loN9@L(P zFdu)QK_;tkd4;B%RSmxK`9+_uW+g%+p-_*OsJtdv7i_p^&4K-JbmSl>Kc;l)wwFZn zy#-fr?@j0`0?xSNR35YSCSYM>m*D&uMEl=HE`mKxSr=uMuU@Lk7h8^z*G)F`r;80= zDMv3=sCCs)Ha>I5-1W4~V4g`1#BoBV%hFdr`W_BVb318u{N6fA>S>vzQ+H4gbxL=s z?W$Qbf?_bvT=*WfX0}5gsj)VuhAOSdE|PB(&wGRIP@X7&<0~Pc@g(+97Pj{Ky2^!x zqZEPAMATg=$a=*P?F>F@KX)ghrkIWypgx_JWxYW);qz1JFqc*<&qXQQhj}Q~8Ayl; zu8XZ-q>{Zy^l?)HX(i$Bzo{qE$O1WNv5DuIS2ZgZr4MPvel$}hmu;e!ywa|&tJz;y z8p+r-$@n2_;~zT(xpiJ^NKwmpa88yn*xgYzXOIygDv3K0?Ig|#}V$WUt85tLQ z{+3k|_hfPV>#e$(_(kL@9qT0ktZiWLId4bJYw-#LI+SJr5OGOkqw4WoA6-QjTM<}4 znRylBShvlqchZ!f?5j6dZ2mH2STNlH+gXMEwTPUioB#Jg$JXANl%A;yB&4vy7A8w# zBhyGPPCKEFyB(N3GO}H~`u=<``!K(=4ZG{Kt*a(-} z`1@1zzy;P@wz5b=FPoh3o>3neI^L8xh^k3El2DKN%VXg;T|T==fO$m9=3{rGZBhFP zmhxh`LsZ9n$H=#b=O!wN1DL{driZRNW0*HVT18r*o=F2zpgK-@bO!mVjNMz^-AxQ7 zp+iK1Hs^kamJr7U&c{h8*P;P)?v1Y~_fd1HIB^Ou-2mnDmy7;av))Ki{LUnQMc;MK`XZa7X!R!d$VtsLe@!2#iB5n^ z>^wtPILk7zuJ}<6!>a&HfiJ8~Mwh!)hFM0Uewt%8K48WprjO8cY6eDzvcNDKDjL*v#g?ICH(f&vsZjSEmU6QhQIg|Qd?q;G; za~LYXg&KwK)q9SS58F62=J2Z2afu69Fe$WYRzJcq*p=Mjxv;wT<0?(a$z+7jqkqj8?MkiN(t+|^Oe=jd{#~4B3aL_KT*Cgw;DZIAI zcCm&o8QeCt*54Oxt*DLKf|68+Rqq(Zk;E<`_j#6mJF(uJF~#nHpf(fT@HFrN$_^?T z>Q!?#(N?O%Ap;tF4B0ahvGxlMtUGWkLznv?!yxmLkS#IK3NXX(mr+DR=18j(fc(m< z1W;9!gu~CG297gCP>@AZc|A;23=kHy72`S_e(KdjkWPyw7{($3Y+)iSqCkm0+1y@a zI46&OZ+Jc()VH9V{tt6~UbWBudDx=BY}hh6w*Q?20LpyKDBkhIH_7p?kVeofZiA0Y zYrY}?m_5dB5?U;BR2^Ft9c{w{^~Xkg1a8c4v|#$Q1_@e!TuTcwJY~Lq3%zi<+E(2h z@Lege*fKFR6PMkk=xU?ndFV|Ynl}=PZ7K>e=?SieHdmonE5fN5TDT6;9|FvoiL%>& zNg$w8%j%KHer)oU6oLv(0*gV)bQ%sE!j(FhpO)X-4+X5{2MHX>3iXA}@fexa?D0Jn zUZI^CA{oAIsCPyjoma-u{s5|4&^Hbh@j=ed@lgF%ZL3rM@S)O`-8;U&- zNxFn7&<&vHQv;Z#*~9p(PFw?Qr5Q0WHM>^Y@5C%`1{=THSP4)xP_CSMy_Q7^`dJIL zp4GOQ!9Tk%zTK7d>JSH>xLKXt zdky)Ep~xJSvD3ax4p!g;e4bHtorOi%G^pb%)X=QWO(&O`b%CozI8+{N2}6K zC7j;lCw)d6C0m)eiF$xg{v^vOa7PXYIxMxug=462?Z=^c7A)9=!DHSSd~8MVIpkVZ z`I@o-rE00B7VYVq$ipO*l9C2)1)Fnym6W<$83J1p&ClER!rK?J$1IJudgLG))tQ&c z7)npB1$}3U3;BM9J0`x@tGHzgs&yc#$>~BLh8yJu^+6Ww3x{P4tr|3yht$HAlIz_j z@|EK)u^_YQ7Y=$?VGHCSQp2q!XF$f_fJJr&0B+hpA$O7@myh4I&#+N8PX2P#WQ!pk zh}9ai;XC#)HbJmg8MH8ylNJQCqQIy725 z11w65AaAUgim27c_3DP5cvDtc_SsciHpGW?z(6f#G^(UtR!@Qj5eVKc#gHA__scGlY}^Td45`4dHqz6H~dX z!zq}j`l)a}g4J=>-`B(de_^qPb>6D`q?7(ep`{=5$OCm&n0+~l<}hxf+CzIT~@|#hhh`DE-6m_32ac|F|HR>iv?*?)EmCR-*oq*!sx~ zn#|Eop$>2?Zt+K&d4Ka_VFi|A!c*-BsMGb?6v%jlj+4YM zlE00#tDeqbh-jGZGpIub93s!%dt@leCrtP_-#&*z=)`G`Oteg9t6(m}@!;oIwxst& zz$!(;Kz5ka$H`wG-GZD)TVRcbw~iopKwg>xnU`#BZd>beA*697^(aPWD76j_qB({^ zZ%fk`xjn55-xVMaud0$@%KBxa%g%1=)|iLHW=Y8&!jxN{5UN+pt#`!A@==>*+`7e& z=S!xmaIoPf3#kyHKH!WqOkX;%i_FF2{;4b(3x1nHV?CW3&0$tr5>j2ix4F=^d|5SM_m%J`hGO13_T@4LO$ z+VIHzF{-d)vEs_pHJ^=cI|H|gaSGPG_tciai>Px+m`&kmb<3jswW?);fMRx=+P;^w zPGhvE@J^W=yRQrb_LY_;O5|gBxjWFxxET`3aS%U_y>Z5!X?0KmT{xSCPQfR6Qz=>N z0{7hMb?(0vMVd0wCTFgMo^9V_JYl>bJFZZ8KRaBvYX=amyzwIq{YCcx zN?A!?u{!SnI^kZz7C)eo>7$wDcWe><=Y8^v~H(*S17x7 zs*dW4xhUIWBOTSpZ#tsCZ{eTAFp5S|pbMy&&pBqnZo-(6|JE9x0_ zzi`vcj=eLGTz9>NSsl|!U4Ebqv@Hos>Vh8e)M_!;1fz2X-5_K1K{araDB!M_1H@~i zzOT?GMujZOtT_`V>u z`Hs97Id>$^vmMkP^i4stm4UK(x$bc8Xn4N@HNPkAiUcTo0h}TTE;J9QP1(HsEae&% z3Q4Y3ZyBkFS7{2%pcTl6fQBoqUTe@)YI(k}bSbdAqmLBIulP_N=s+FA++fvc97g{e zR-R$f-7K#C8-UWq15KI=-tJ>wdO~L=NI|p`7XGxWw4~$HD5g0@$gPA$#*V!420f{d zaW*^KTAbK47l}v*Ya9ae%ezGLg8n&FwlFQN;WBi_RmK+xDgVmS!~(M2Drg8748s6u zZjxnfabqwBB7ncIzALS`4EqOdFBuY0NxVf$14r3N{aAubHHtNv3f>4~#$%x)YZy*A z!LC8HL;&gN8e~`=L%nerp~UiU^yIv6_hWpPt1Q#FCNz-cS(d}}mc z)-+hiM(%q!3U?_yQA!*w%7p4$#qG6YAktt;oY?tp=2n)jF8#cQZG)_Wfkv#(w&nBx zFa3Zlm*wg%RKCuN@(V;ERDa=g!(JR7WpP*ehZLw=hD0VB?dE&ba&Q!L79W&k{}_2_ z3@3+erd0l%o1gIuInGh435A^7oF^lxlb-%OnI?zO z{GU@#tW6XXb}^j`{MWVi)5dmga-R_kneqTNCYZ8DTh29TL{7k;nGw{ zbs4UoBxV95uybK!7@LI3R_jY}c=VOZ`%+#=D=G6}@LXH(XiX zOpq8%n$IJ9mHK!zLLf28wvLpAuze6O)Mbk>2=0T&s_)*ZDajh(Mfw4WMk3ovXi6vJq39 zFfpd>>m**k4iA|SAT5DNz+0CIN8=DBDoY#MJ#!I_O4TSear=7idVvO+zB`j-_(wRm zmqnOf%)z>UFWy0&|J?BoR71I6R8JO|(ohj1?jI~P6`%qO;+{>;nSJ)G-FA92=$%>=ZtKLoAWa=Wb*{Qcdgu*2jac;M1Xg>NbF276Av&(@haxhLq-V0! zJs{l>>Zv?I1i=oFzxL>6G2%GcMk{$_{}g_+C!N%ObE6>8_FYpO!JremOp$Qik-<`}l~^pu5HB z^Z?RW{l=#^rlFzqyafW!ZF|FXIgRyt#9*}l>uW}dK{~I{s!rROGzEWsZDxC%_=agH zsUifHo3O}>oeAZFL~JVyb$@$&8+{9Q$;5aXfiho-3kEj^vA*{P2lYEX8`!|&K3gMj z8j3Uai|)5QM~A>8ADEKvpU(fRwT$^;<3p(@sv;Zx2BN0(vbR}2HYnfxkRyNS9e_y- z<5;J8>aCZ+>{aPP2S8?(m{Trl-dW7-@`y4dFa=u#opZ>O_m4U52_Mr;fNBTp?92dE z)mut!7dvwkt(T-T`=qETSbkuz_M~VGJ2n{H{mvA!)q8JE3DtU0)T2WXY7|q&F~}`9 z*aC12r9qOQq6KWYypl%{zROS;A30J_I<>->+WY&n^FIb(L zA@UzAyh{PmpYh97D%|@feC3Gj^=!gBm^RN}%T!DBx$?&TjFvJKjsoD~{Z|p-#VE0U z-eMaEE8N=IvTlR)3ZQ*I=aC1@ap}(G2a19tRZ5{ZnH zvxPd}6seA~&VOfUywQS0p1~}sx}xaMHx$Xle}w|H&^bEcBC$?$VJ^UD-YzrJD?SsG z0{EvmbpAoip7FW$$~{(Id=|2I$q#Yp>T8pgs1f{FG5i3fCeV?XSk3$28F`NZq0IoB za;7+q9VXGW?u0Z4_-I^lfN{&&=q)5%Tj;Oh^XEp5MrWQy)Au&HF$*M84i-PocZhgd zL<8Ej|6j;WOe=GX!lFkfS5zV<=^tF~WTu7f@$Nk54Mf?;did7DfE?_tSlD6s3mOk| z6s>kb{8(QeahrG)TMjhEdEF-GLE=%E`|0YusXp`8l7094)=592AI8Ux>FSAhlsbv{ zun!QvoE4)FrVZ?XRXA#RsFCh)e6U7|0F@iC4lfLJ?obC-I zd*@C8V@NY9FV4y0sA)CX8Yr#PaQJc&!bO^Ou4}{Vz&|}ordqlS{&XINCq7~>hZB`y z@q^~3wCyJ!SK_rHs+MzVWPQC$6eZMOz!vyW=TG_+s?mCQjPq(o*;r6+n8D^evdlF}l=x z#q7Vp?w3m4AP{szNaqAcXL#ug!`!HcArrV1l7A@}$$d*9Pw}xkFiBEaN$nZIR*~#s zrhs05os=ILzV|BwMhQm0DJa<*u2<-x2nb?-$RthcURwa)>4-=A zTBwlX=j%Q3h{5yW(KGv#J1{XMDo%)uL7h@q0>FkiT@r-sdq!9MTEKrr$glxqT(+Nl zI~i8?l8zch8ev$9RN!HtdhEAxwkZfD*T_q^TDn&+yFz&Ss4E3a_p_Qd%^)K5N+4n& zMuL|NLkBxXX6?4$DB=;)CUV8x=KC>$3-@mw>@Z~-D}<0wwCfz1VIcoSa|k*nZQnQ> zzj=ZjqSsGCDGWH@X(~!bWBmB;19y?T&0Fy4>S(P^)}`#?^&mOBICfO=^-pUz=Lhz- zqbYAsq6I;GY_`vrbiL(Z;=V0~Q5||$gwsv2r_!wCF>VTFH??qf=_xveC^JTxp?K8- z6OUsNvH8DaVQWhm(isX#K865KCKxRo`_*3D+YlS}oulXI`9v*FhjSpFZ3lF$?oD@` zg&4w%1SasNtOIb}aoJjWVZdimIc&5I38C+e4Y>W4@B_R(51ey79XC89w9*vGp5gq? zBneiL5KRQj!~+4sZ?ajsWqEP_wv)4X8~R*iv=vf zj&R$OTFKrd0rDMFQnDP}CD|UDm6qz1^4{H3I^s^m*D#1c91EKScN08oLQY`I?L3QJ zW5)QYcF#MtcIC7+pIfhl#M`0!s*+F{Bn&fXx%fpm8G$<+5a$$xc$WsP=E_5pcbrn2 zXtfd}5svZ(Wb@NN0Ll^p*yjP~EGTaiBo&ZiB{voIt)7w9zf~vGt|}#8k?KYKDX}fE zWr}7aL?SZu0nA&|6!1yb=Rc>k`6!n2QFY_MhuriRcBlfY7ip~fOPH`80Eu@5T1f5k z+E*<<noMj<_QksRR|_B%34ms@+K7~e%8_2;Ov`jL!a|Kefe2vV;hwd*d7-N>w&XaV5fhIN3qGmEgKBYn~?m_b|Kmq3NHR$Md3m1Y=qNmNCADy8= zOCiYkvesWRC?n5>l-Y)THXapbb*ko;fi}kU)|sNq`XSddgBvAb!X@#GO4i#0TYrix z_-OUHeZxYCg#ZZq*%_0~2R+qEB58IrdsXCC6&J0md%7lzkO@6f*{s2jO_;-65SCyxYA}F zrf8>1fKp15Za+G;?VZFZJ;Jli2mBUDD4)fFx=u5I*8Y2i#7JBD*hm- zHiw_j@8`$I)OuT6TNkZu227U!fo0Ujd3u29LhPUoK+rTJ^g@AO8pr%9L`fGB7I9?q0CPqx(=Ef3w3wjlTWfjXDB>;|`G%Nds%(l=YsF&Di137lZa zQf~eO^boMoEt!Yv0kW?m$!94=%uN$ugMggzu$f}xj0ji{Hc2sTZs;ZY51XUIHpb~* z6)|2CGqk+05`SAcx-vYpX30Q)=>p!Ts5P0&_tgiL#i`Lp)M`nxPxXqYhfA$LqKNO_ zTbf;2|I|GX;Rjn1CtO3_3j{@#5Td+X`Ym)@;O8Fk2$5)b*Qr)=3^^^oFZixlEu_P^(wvwlh!p|!21 zeTz9%XO*Q)T-vnNuDn(2QS7|#zaLi9xdx@%{I*NeY!QbD3-ek|Z^&Ap_}=&1w)DbX z2GxY%dabilfPBMaLM8>uQ4`gVW)z?gy3y-zcV@;y_7Nee_&%Z2fMD(SApN1U-JG2F z7TBulqO;*r_13?w{@Lsvu6dLCMJZ59%ScA?oHbwazP%=R9jQy;M^v&+svc355W2_L zOt&QXu?5A3N_z#u_b7X79Wk&9=IbGnK%_%o%aM}*G|O)?Yi~M+s+RyNXR)+4h{Ku> z`_;+3darM@huEI2yKDaIVrnMfbUdvE3xUu3OU_nvlG%3YxX0)=US`*OsTpqhKa#4t z0hCC-T0ku(F=X4u{CS2Z*;)W@$hj7~LOls>-VE-l@c`)(1Xj2*et6`g?6E{YXso0s zhQyZ;{nR*<>vdbpTffLA>`x&VOc1OtzWCw^wDjphRO8Gz{CVhBk?(t4Azs;#%r9p` zswigrV!+e(ZHqi2b*=0!EJn0#9J03?yLtdl7J;?{-pg94cI)QG+6HyAk#CIrPvfNq z9w?{-ytt?e^_?~rz;ZJqC+Fl^f!JJzbRWPvvKaz{W-B=mlQFG(0kcZ*d5ws&zKJS8 z@Ej0n=l9_IB!N0=LQohQ%4S!4)PP`J009;B@w+Mn%?^O`H^<>(VpWcH3FurYL_z4+7lPQ+P= z>))4CqT#KrFy?0yG=>f4G#@$9K41QV68*MLrX;TiV?2w%`1<8o>SyX4GJ#PaKX+xATt=RWI0 zunqIML$+KYJKU?(Ez;3^y?oo&9bSw^v0v=|_YxYAx&db{vh~Z!n;gk@L-ggYTbsrP zfQ1%Lf5* z14D@>Je8EP+&m8If zFP~v&{4#JxehND#^*gBFtp-3cnuHa`qb%qtj-|R=RA!D%T;E(9-+W^kOb`uSLY4ClyAxNNA+KzY@v5dIjd1-Pf%~YlA zki9$rQbGyIl&FnCH2j#(lIqR6DFzjCh+0eP#6%1FLa4!k)aHkH(j6a`p;{VhOa_a! z;|Y~1OON~LZ*Iuf6ox#>Hx*_J4Ta@c@O5V-0z9P1|9nUZeVEs*ee_(e>)xb9c4ba@ zi1zFH<$ePx2CV;;zeGDa$7P;DO6dpB#*mZXR327ZBbng((CcS>y0fX=6@Ld?rv?{$ zofdTffdy4(oq3P2bQahr7T!isjdd4Bjpk&F9I!NxPNu~hgbhiDCfT_E=MG~9d9Pfg_^d}S1ZSO1dS3%?q)S{-dgNn7 zb`&>8Dn+|*V6lG8&m(!f6?7G8L*TB!ygMy4oF}b2;^+GO zA|grne@Jpc=7mV0+|F1cYka;@Ka3f|)%BX#%ua&^30HFQLCzx?@k$IHXA~=x7s{${Jp?sliylh0Q%6BxTQ9)>{|p$ zqo=%|Dx4{I&?eUyTmah#}{RNn<%?avx-rW{#ZA~A#{H$8w<>3K-|L+K{)@U+F z;BdFhpzSn#ba3()8R6Q`;brwQUR07Cz7K8qLcNwx;7QQRf}b6P4Hh7_k^7 zi?)X}2hj-@Jlyekd_xL4oDkeOFG{i7jrm-VUnrfwa~Pq_?h>-gZKBPPkEcGn5>su( zbf_-f7J{kCK|j|e6H&cH4eqb;cCgQuI}s&id9C!lLq-0N50J=NSq33d=VMD4U>g}_ zky^_0Olp1N91%<2z9y7R9>v?Uusve<*kDGSED?DQpSs_4CXm?&OtCb1C2fK})eDbJ zfEuWsZn?s;!3iKSBQcyCu+>RAIZD{&`w`bcfgEgQ#iK-0&x|Jdc2Wk{%*fFoEE0kQ z=1@k%`N=*5w%9!WQ=#$<ynW=OKl~8cS^-8o*rmL zE!imqssD@Hc87K5%92EXzz}{8LsgCpnOIq93q;D4S1Ci zLt#YS;LACJHnXDUok#N_dC18QY6jeco>8LaqQsY&9D{a5J*s@Y*&#Ort_8&>IaXn_ z3_*!!`yCIhF6osPY!QL}3UD+~#(6_UW^t3?RS zByFP9yT~QUmj194^BQw>8vC5j4ZUK6t?`Nv`fx)u$U%2e?eGvA)sYP9&*M z;MYZf;^@E!KiT|eKT*_31Ayg5`}6>4p}jNqyyc`Tw?WN3wsZjQ+kDCV&@R{{dbBIiz{I_IN&OMQNeWp_G7OM3@ISj2Dn-V4p6V)g zTW+5agiQ%K9NYE|icDpfP<;4VtJxZahg4_N4)U<2M_%e3WiPYdEF36Oq%+**Qetiq z#OIrYt4v}D6jXK=062~)p!kPvJl03{3eOKEUTe4lj{R~?6QZSTS|1s@;01>_(76#O z3j`d4+HWAX4IZj+y3+O@R+_ndX3FKeG;?G6g-HzHnCRZtR!xXEuzn8}uHEb-^+cjB zfGlAEPrXwRu^rpbFjO<=E7IyrDfZ;u09*9mL%vX7W#l>p^m6y)xnaKM|x_i=A8 z9h@`!l!xrGU*hC#>oq*lzyO1!iz_pZImPU$puw!8g2y++pyMN<0Zea0k#>+Jv;_T- zE9*$C`pYAi)0Q5VoaYh4I|84Y&J%NpEcM?3vK;Q6t}UA(-q_rt3k2)qfs2*NMI-8Q zm=$=-GQX+nVv>8Zt*94p5zl3HwI*C4WU5q0!MP3PNg=)crNA*%u&#yw6t8d0x*&-Z zOmN;XbZ*Z8E$`!tJsr}z_1og0rj(;&k+Co>CF9IZ3EBH`bg8uf&zcZ8RP-zGt%X5P zs>=+81Z*yasPqiNzf<&N1RKK=#S*w~iMxl2mo3{JIf9@V=vF~nUTt*PQ%Nn%>qhQP z3}S}HPM5Ttj&ANi{<9l!nQu~$OG*M72n4-&VQL%lEb9@L9Vp#SmC0MqIaxAI>mzH! zF>!rX4mWh%GdRTmGy0AMhn$0LEBHxj_Y1>*Pmk7NrV-at`8vcH^w&sB7BVJxJx?eX zh?xri1m1kUr=02KmfTT}$5p2*V39V5Rr_Zqwv8v-Xqh2VtJzbJ|--zk|Y8bGMkqI^@8N!_TKOHW<)rhBI z`1)uRD;kN4?#apr#Mb<@haB3M z!)xnTmRy2CFXPaIPPBokO#9xbW39{QD^y{jzJJKIl9i=gnk?g^D<`2eDi;fdm3nAQ z;h8To3|N(0fk8D>1EP!4hS&Q5Si-G{x@LhC*{61(#IF-odirR7w=L|Hd3G7oqB#!R z;s0ng0-LQvI+a8+q#B!%&;nmu$OSbRs2X^SKMw=fmB>ml0s^n_J2?KnCF_Nn^@5I- z^9TbyMoP=}&?F--%jjR(63ur(F0^44dLi!gKyI2TS+pa49{7RKl_wEc#ciP%_mYM={2yjA~8H;r3nE6NWS(;Bq&1a&{$$-u!=i2);b;68@Q;IO{)NYM+c`k*Ttbc&N8_(C3QhwMg<0I zyy+^_sv`(hC7BRn#l+n7lH1>{8(fOGJeVj?cJ%nqS)At>BaTnFYv+4#_dHP&p{Jn? zVR?`&VS^<>PmI%t%uX$yWHczRb@iDJ+58N_EXB>Hz4Qx|jq{$ker!PDbcVIX`Og+@ zV1sdP1cdxd^hO7*km{Tpgrtg^YDz;?t|x|Rd`9tL6UQ-m)|_@UOXup+_eRx3SR#{- zQ8mPnXjSIh9`Ln{aO!>x(OMuNE+1)=0bJZWORLK`f^5lE7lzrsNdbcjPB0b1C2Fz0 zMc!b{*cUowBPNv@Pk8>|8^6Bwq9_?N!_q#}qFZK7%=^|Y>)NrnlbdCDo)Fg@$t!LS z_cYKad?(+59^;nTeD=o3vbp|9(^j{Z0O8kaqE4MY{OChdy~%QyUjsaLa^YZ zN|aMy(?+{^*5$sYjv5Tv9A2e7Xnu9{k^nzIz`sO#n#e&|3o>(2$iXFvJrJBJoe(Vr zIiiTtK}l-E`tZi^V+<->eVuh6k$m{YHd=i;Q#k=ssr*xmMa8)7^=!w?uGa<}MFF)w z%P7)cDLCoIV{1T)$H9lP8QPV+EfgH}5|WN7$y@f%%dj7D4HVmD!R4ZPnH!aaxfRbv z5^k$RtU@8K{?j(k>8yC-=e&NJu?%k`XJ1Oxgs2<)*d$imNIAe{V+-}koKrinM;Mwp>;*jSy|cD4yPTmJFYz3+E; z&88m`B^-uU$$;$99EEJ9z$Oj0Hs1n-b2?RQsUfh<3CUl$KX<l zkg8K5B7#kp0#VSHV5?{YowoG&C8Q8?6y-2N=?Htap4%e;t0RLZC51;@N4uvK$0fQ_ zF2OEKMIy{UQu>h>OfzfIi7<*MkAz9)*l$gn$=*@MzGNpbYRYZyG^{X0;c3R~=7u8P zrzN7ynS#(?@gYD<&_r(lI_>(@sqS(9Ij>)Xlsr7x8x|fMa3j1f^O_(l`1m>&si=B% zkJ|gOy6<3~-CA9uY~eCmc+QC&q0wwgsv}x)Lbjnf&~#loW_Lrz52~0_@$Eu~`rlgL zx;O+4PKJRL%s1xOl6i zaPi>OeXyg8WMgcDK2^loY?A?mXr`@tU?1Qe?GW-h?50UB9_;W_Y$d(XOXE3p}Z9gP=QsCuHP#{lP zZ8WV%CU);d#MC2W9nMj@Sha&lbaN)8^%d0hvMSMmIjA&QcO4Z1U!cqj0d;DTE!TPW z5{in*MB=jt`#j!#33=3Rcfih(<8KCj-nwwHf(0zsM z%e|%-a-7=q$YWuvL{UMIheDhLKgDPx{yoJH-mD^Y*1UUK)$}LvDzcD+cxBvZ@3sTLsOs(%d5?2b$!+XbCC4NkzwD<@$-{D zTM;jmYd!L*5rLJBJEZ8dNf!CbMAL7uYy6lV2ws$38z}}*32>lE%HkyvOP3w|Fe_j` z+P|-SkLp_UjA$o^#(L>WNSaq$-f!heBkH$GD8Dz;{?09Y_-6c$yh{4LR{yJ1i$TLq zx3rF4bpd!SjorxIJ)%8WuAdv>h zJ9d<+Q`nx6T&1M)dsDt;V3-58gWe$T17*{?j~Y^t^2*Ae9a3Hf_?G5$a8aJyB%kdb z4~9-HU}jp_K3QJ9in|3%q{n*_NrqAG04pGk`k?r^-T4R_Ue?=_NN%J~`%b2I*Zd>^ zk>rt{qGAF8U1*SdIJbo=6_jI-_8JfU^7^`@nN-?q>CetDxKMRFdlaJT6Fq48T<0y4 z5)&s-vG2$?1C?mP^AOTFuQ07gvGT#6n;Ng;*lE4^K2eXMZfbOG=kYHsAKu)e$OFDH zxqEOk6=rj|*^yA?Do2DLtJ5ael6#qX2@QRuoG3k|I;(a~s%I*zy!0^jm=HYmh91uQ zxAR6G9~}`tImkLWJgDMwoKUJrok7Kk3-d!Jy!cS*V8S<7ZX9=dnn6u6v*7B_k;vM= z3Q0?O8j?!0KNi%Macv(nnX3I3Iz)&}S`jCD-hEC8HNF*5;S99Yf+VUdJaC-tJsv@c z$b^&19*sbXZzz~Z`@4b=e-0z=@+}ZIZNFnmI7gePSk3W?D9_8*#~*4dn575=TzM1; zE)ff`Zz0j)2iVm;)XICnnNN!KBvlGb*IP!1JzcsP^Z(R!FNhkhMK|hk7M5uE55q9; z83Ic)Ya7Lg4b(yUl5SULe!w0}y`M?ZXKNqgbj(IG(^wJtHie8emx;R|9+me#2+|U- z2+X9P%i5$|%)l|pr7NacI>XMGU{JN1B%=^P8g7oFF(bj~?(Xv@1{_9RVY^ff3pYpj zXPhfX9G8E758myFT33HRYECII8 z!X2^E6Hok}v@>1|#b$i*pzYbHe%csRIR_w7LVTaga4UYAO`i;<+XT?zo9lps3 zk??a(TH4q3c9NE&Z)*~7D3PyJV;0ST5b`Qd?FVyRr+=|EzgAMv(^zIUgzD%Ona!?@ zXGxb?ipet>m$Z!bb$eR9C4)c;{n=Q~w~-4$dYtXk!@Vw^nj0(K!-l3XlB40@1HY_u zZ=5f{+G~Yzqf9>+lt+ISMlteCHA`G;LzyZD5N%pM z683%+?I#@7LuGns58HE}Mt|!JNQ$E#6kV+#?ojZrhH2;9O%gA2Ziqpu%yuO=(A4$l zY=U&@7Ba4}#&n`?Zsqm|exOAn32~c61cr2CBpmukUi8v=$}uExm)BZQ*XQI;essag zfEcS~R;R~ea#KHAFY%rb4+Op&}jD1AX7u{y|5>yNc`{lMI)SW}1DLxxOxJd)Oi|bEH5ujVvW-v=#iQRSZ zZN7W`hlTOAVWcoS7X*qcOh0SexcIos*;{4m;xBO%(KU`PpJP?bnt7qp+3Ro;f3$rR z^2RBl=$LtiA*TGRA*2`4Ew=}rXEJ}c5N^>lHh|2jAMFy^Hr^sW zufEU{(YGi-ir5&H9`znU`g&?zwr5X)ldbmbT90f}XUQqnPJ~!;!X~C->XB>2Jmb?3V9tvG!3DxIvJ;#2G-}%jHKtZFo*zzu zWfIOnqTa-Dg!j3dfZBdMu{Svb)rWCYLnHf2WTwR9m`_|bz%r;?xGB-^T2|f#Y;k`I z1rf@9Nn|e0Hqpr;-}QR63<RQ7VLG4#$j;k8O6(>%lQW$dulfs?h7L-mr#%q>&(%+`?yR$zY2ZT`ZvF?4nUZ40zV0Ac4K8#R0CAVtKFGo zF5gE(aRkroQVPPobU)29bY;#gaUmVfZU@`c&*ie=!glD>qksSP4U{3%>p-{Onykff z5@%x&L<73xa`v3CN3n}AqW-`D29JDxN&OW}XxNLF~ zDg9o{9`uqHMtYJiUu|!7111Y`KQT$3!|jx9BZYpQ)Bfkn=Y;DF3HhYM&JLr5u&A(= z?4(`K^MfAC<`h7f`k^O89c^Js0vK|wjDH`8TKB9~FkRG0$f8;mYHOSh`VcgpbWKPU z!;chQ*~XV9?*_8vM`0SfUuHXZ0ST5FtT>$Xa_*wK#zN}$QG8sgQGzlB2x8A_5x!Pd z4aPL{y$A_}hodWx5CV#Xfs0pJD?M}cm8}J7BgR{D8A*dBlBDD{WTj`^0tpT!Pw^t` z1y9Ly5AnxX6cRk=kw~*3$VI&H>20C0M0{>9%05h_u;sbNf>f$i7@-Od)CoikMst-# zK5+T6bFwog%YdZ%Ipewrd8M!}RgW{{dhr_w$iqz^!pAPCJfsDLuq`9G*$B-bffQ{ZKhvF?nkkMsw7Wb^C?sp!wQ($Had{dqk>` zccZQ?Xir;|Y_+NdlT8>owM&e1{Mu#Pqk~x=$xPC6IPTN(p~7%wG3&K;^U!?AwIU4J z*3$GVKl@2gDa#-`>PNs=7)Ol9x~X-qH=T(f8dHI>;*kI%0eA^&5e_os$fXDiD1x*N zG~vJ6!PCDUr3}eOc7SkkBX#gQTsg(b;Q+iyMQ4REMqZ4d;Gb?!V~fZ!R<#@DJgC#o zqF!>#_uFB%i{C|oFg>!NJ5*UxPGY)9P0$;o%ll^wA}5jj`w8NO;EwAhy!y@QEAQ|> zaD7iFf{0xHlVnkH!?4pNMmy)wYXAf~$}>u+!8>4$xaC%DrRqYumlL3fU3{}RHI4Dm z;aPG$#>-xd++{#=NvC^U>E;CD3|UYdZ>7=|lhGsfD?R6X0YqnS6AP>dJrm!^QRNUV z=PbN3t(@{;_dgkZ{1MXoj<283&Lf?k4C8SfG--U&LE2@9a&$zOf)`hnR@Uic*xukd zFQUponPxah5CnyjXzIs4n`SUr@+*reA(8V)aPFunvEo2~7|IXo9lN-Lef#^2y%yN- zRj13^5;5~BosEkN5nv3Nz_gq@5s`l-9@jW!gzNidfHRMl4g{e;!L1YjcI!LTB0paj z#pZZ?fnV#d&u$<_Z`ggjBQEr`&=itAU7}^1%$uB!9IGmq2+|4sHBfLdm7ixBa@xit zEo)VJAu9OZC9?21c2 z>T;bCWpgBaWSfLYNKE)%24ap zZ|Pc-n`YKC^-aus3ZBX+9Tg+{VfZq$MI=5jjN9-aOHa;my!cz`BmXuVhc(` z%3c2WU`TTRWGkVE%K|A(T2s_M1j;LZ*%?_A5h832wc~o56+zUz```}-BvpO06{9E9 zgcm->27hc=$A$QtcU+&8CFmlzirYGlCb}0vJJJw3m|CV%AIh5mb$bl^H2cf?T2`WY zK87u142nY!`bRDlf!|B8|85PEL8bQRM>gT|23jwHg^@$y2^FOMmDjW=^ zPO3`>O-?}+-iB-SM&#-us))CYp1n&Cdi4nH)#c5W7@?1y!kE<`o}gfH^6ePMFAqD^ zM_H`zfXar-#$Uo_YW?#ad9XWn&jrs8N|X2D^fWSeSeo)h2mFNuqj015T)+|!s?!jj zTk6e!yK^1IHlmQTp^es#Qk-GZZhsdcXH9A09SN5}oX~TtqTrq#eGcJV9~PT7vARDf zD|Q1ixE3`P9(a_Y49M6-Vd$TMXZMNAnfZX59FFE73&9erK5?Dnh4%(%Zt@ zGOX}TA_Ogqc9(=R9T?6xKjx)(Yay7Tq0zquR515IH9`-8Cgu>Ove|zhdLpv`l}1oD z%=(Y8RjSnkqp1@q;=#w}a6Tgh>Szgz>Jv7lgfIp)T~#OuJS1|_YLu@M!MF~O2ip0- zo|>25VzCl>|8efOsq{kd+l6uG@Q&4GD7hr}lM*Q50=Q00&t!*o=TG|`)nJPDyD>U! zu~8}*?jQ^!p|8qn-h6{9l%vI59#;6Q;?pC^dL7GCgdd|~$8 z=}F#v^uWEWzut@>h*|~LUf5Q^wmUc+fvl~b5Duw6sCpU*LfWw(j;h&*fVsknP{GXF zmLiEF%tt%3n7ON(kyr4okOy4KF$17g%gRaUH@iFXLkx&At95tMNGFL0{+*L?%J@!s{1}Zxh4lrrz!(@ z8$IJl9f^Mo_ol!E%9hzH5#?717_a!}zXBrv;0y*Z`C_r+Z<@<@{54%qqHxcPZKhr% z+Er|&yKunzH8uDC#k^Cmg$ya0_<+Kxt?O-%9dxiDGt-Juj}2V5eVppVvNNzHh}x;J z1|aaNTXPyTs3X_aWd*7vyL^8sy^V@e@E?(rS&vTcYBc%w5^_Okx{CHMj7JQnL7$DFpm_n`OhQe9(U-Pn$YfO$t#Xc;RUS#^*9YqWSgg4k;y(v1$`KCDBpVg%rR zvXoTwW)j;#6|hh{48p+*vL7ZhD^-F1;$xi++2L}^3ZlKhp1aF}jIK}q$%^mYrybn7 zV5Qk0s`_jL3=T1{T%L9Hb3QpcnN{?Q7Gu}K=fB0#shB#q8UgFj(T%-RPRST0ODk*T zm;wJHN;vG)@#zCGy)VD`A?t`!*c2~+CnMb3$QrLX!+ci{z6v{r%yA;k7<-Ya&RC&d z<G(qE&pG1>`zHsIiD)Z#93-ce|UnU|o_3`TmXB*nPTefgB37 zMhx5x%2nc6>`E?OBIn9Qb{`41FFHpPXwr|9brQwbE1MG6;%(NlJX3(+~!UzkwPD60R_=9DeRh_2N6M;?C{{y0PhOuZK7%OHyB;i-+%8W2lhCo6y9?UERU~@BO!T4MzfOZn&Q%^ zZvu=F9KySX?m2vEo2*d}l1OCaxseiI*~WV9ww=qP%x{3gD7+>tikCayf2V0H5HM=x zp=Fn=Q6x2t*DCBD1ou{;xdG}lT?6W-i__B3$d%Rp>bYWjmyAD8gs2&U^04V*ss=}{ zY{5N58PpH|n+}~B*b^xYft9W1lwyU>Sf!VTk$ZmTo~U<|ZH=2nVjMh;(1LA7IWS`gB{(B3hg_nf@LymhMpn`-W*Phstoj@r;vNhH+n z2%pb_kv;td9Mo!Eb-_4ia~m$vMs{!h%u+vGSgb-XuI?DYDbsrSLAU2mf#dJG`^5K=;L-(IYErHN$%(GN6$BW`O8 z2rFd@^$R4oKwIIa`NLNEu6iD{LQCFj#^oDrG2VLso$gap*_7$^*Cw8g zLgKJs*Nlz~hRpho@Pg}0W050TEYPDgSY&T$`JB_95`A%_OFUXG^HL{(%5K4+HYY9hRMDQQ(!V_tA9cd;k#JGd&GkuEk6lqekuE#;T+L z%El7EdPy7Bpp&_d-RFAubm(kRD3tu6x45y8Pef?Ss>=58;c}4R*|4c-3j`2@?ACS+ znY!)v9T)&RC_((sTAA;G-J9IAXtRp{CuvZ91B7+)`u~yABToOnomhvmH6*9o&)(Jg zO4T)Fwtg}5GW3gIyHgPq4F!|-Du*G$G>*Cc2X`IJI{qyz5zY7t15yO7S+t1Zr=-Ew2) z%TIB?UQvp_5YF)!9qk&j>X26Bi-79hKpG~$K3TRP3k`6`0}LE;wz@1?`>J>Xf6kCaraa ziDEadl%>ZM)hlPBGxYV(AMt~;k*xvoegKhJUH+yL=$0BwzxLK|tTSN3OeDqs|9uu>+m_ z^C7;CIxAS{hJJVVeQnVoYucM=AMFnS4t6$_^0yvv$&+xUL)|dfJ^rv2o#2q>*a@eo zwOm>-N}qP&`G{rwT3(anRY9EHXP6j>tgU`JJ&uUG#019dfz>neJ@;9>nvR2&4 zKpUC1-_yV1V&@z;>}QV9rOd)FZF6R`&ZkHC2uMdv)Qpq0_rjYSJQ1axn533;g59vX z4he>CjjWw5@SaDCN3NG4Ik_Wq9E`xP<&oSr_bqH$Xk^}h&#f_XXUC|RLap5BC1$G4 zJSr3bh6Vx8x5xW5JAS-OsKy#worhCKJRTb&UD z!!S02GX#GK5{T^@f9bdHj z2UvuLuet_IKpbAF8!tYd(WECvL5OZ4Q!bYMl{hdmE2G01=W>&NAYA1vi->_Ba>Q*Z zfGvGLX0Rm4qxbyzTAC?98H=gr0sil(x$1|AjAtUIPXr7FI**t3_kh_0Cw3p z4XG$VEA*5*EWTQ~94IVA_UMIf{5A~lYEW&=N;q=tZlu*;FByA+rW#pjW_9-pnfXQF zkr>PKJLM&>VrDNIPI?etuI-`Kuk)N^D&b&F)7@0^OklXA9ivY+bSyfU@mr{?Oyg8&`7 zbuo8>{zIRUR_Mi|1!*4@v2&R8NX2C|UDX%tjbJFSTac9c%A&ERM=rDWEjeI#YpAbbh$RcYO{qorb7)M+(?%tKG4-rggF(cF>pbAc4CIx?4|i(n2t7FmEn3UJh?9jsWaPs%BhSFg4ShYNL7|{s z_AG>7lAG_~yQF|aCd{Y-l8RRrFS0!s`X($xX?3shtJk)Iy9u1sl=0~rsJpUx6oDd+ z^_s^%<2Z`$+-ZhJ^$e*dwBp%*b#WUCpoLYbk|5`P?UZOQUekphB2Zt6=Z0YRMHJ`D zQB0U!8|KO<<&$ecsO(K}rJ9}I)!4eCU=WRp-tMeRHH+84J7no_nJo`g1iQlXEb-V6 zRtlOZ0PMG&gCV9YIRR~n-P9Z@NV&z}TRCvM+A)%i2p~}@#Y|;8epRdEZ%U#YG`zmX zM%$=VpJ--Eda5qsT0f~MJb5fT-*Eybt*VA$jU2+QlUObQxz zVrEDWu`{`RWBaOUMfH%3vwT%)*ES%r3Cv3-`<2At*FVOH4uZ41f>KwcjL`Rq(oTA` zh{+yzV!?&FK+=2QcjW{0g<+1Z(5e5zv9TvPyx;B$=!9;B;v9E5`bxvJwUN0 zT)xSU#*Tw2dl!p!)G_@Oa_fJgUMp0Fz!?1+=5NC&Q zVaFoihEjAsc6dhT*oMXZJPkclPZ3`NUX}j;$(WKcdrQB(ScE0(0m^TzsQU)bZ#$+( zUZKwk31RBJP#>W_vQPAny!|K3l;be6xcQnZ=rc5iX`Iu#{k`Xz8M7UeEgN+C3^%T|)otw-4?@spsOgZ9ZCeA;cN|C34 z{W)DXkFpLVoJa?30IQyxG`^NDP5kSn1#svPowyEVoGx5UN}^XthPliHVgchqNE+_{ z+hq$;7LRQJiO?IEel_pDO=Q6*Mf)T6cA-cdYblU!GlS!9;PtkM=lviF7)=qX4}*)s z=Zu^FtQrYVa48U4r$ZO0$>fo zRwnP@8(9X)mT?dEwqY0SO=-mYevfjgEOenlBH9CRafX2N#V@+A-PhK=E~S)?VJ4M# z0Hl~3q0ogDw89?q4>frFlxXmub3l_roZ=Nh8U@lb{|9^8L;7m2D)@~~^`RuDn2Y=* zTCN5-kF+!3)6c0k@sd#-ouB@x-0AUq3<&iJnzt2=2I`u|gsRJ)zc^sy{Ve%$pI^@B z0(+bU&&2N_ASg<}Py^y>?<87J%W#Ha_~?8lzSXyoBpE@Q^6&H#{HMw6`J-ZIUX`pA z|5bomJZ&^bo9mx;q_Br+N|=`(KgoM5vS+N%;FL~y$-;WjlgwXcmld2KkvmBcArm4I z-J?9aSi=!gZGBTY9PAc6fvLA@5R&ls`Is)3B)rvTr#HW+$h3|M#qp%?8@Q~01V~8M zfgd0kemrD-j=U=#3y*qnljkqNTvm?G_=;{9b~^^<_p3VyOMq~sqwNMR#fnHq$dPP< z|0l}g5A3#fI&0vt+OP zyq;K#9T_wie6EwWdN1d%ctQW70;=~DT0AjV0!!imNiSNdE=Ol_OCA!a3WXZC&1R9S z*Fo-wpr9-9%WmMnhc|gIyn^IhsNpf2dZ|J@4f$q7`5_qAV_65DHwX%YOU`CE!yEK^ zY)Hw=mkS+j-pmSH&noiT4a<6T#2x;Sm9r&hxAi!K>cp&BjtyRuHtQuVZJszF<}^KX zW|i(MBrV-Yi#+^j^r3|=UjBnDe+Yyy_@69ms;U%*{*u5&IpZvk0<#hWPFCY6p|!|Y zKzxVFHkIxpZWt&kYphwvgN06M6sWfS{&MUSc0+yuxfZc3J$`7~MHoTdK?Ve~t~Khw z=ar5=gVjwC-$sx@UGXxE3rx8c4pa!pdGuU&@hR^(q*vGG_Z`V)!*%(ZHD@peNU}un z#n8;nkTEkrO~+Cokx`FNkJAiC)qhPh{1LJ>5s_tV#8lcj~olCw{XScUwDxQcbH~C7yZ!ZOP zh4pvG&5bE<#s_B9yi?FCBR9uF&fvgZN4sZr3UZ~8WbX`T41R-Dsb^)bVz+i|g|6g# z>loBxwnF2ug5+U@->XGK)7sI#s)PWJXjPM1{@7!d;(*H-{_@;(bIeVmDkFDQZl~}f zuNq&xcoxpOL&-M){!R+jRf~nOZUmNEoZ=cfC8?JXmvV?M_PZiK?c%Sgq@>h59j8b#7U&5 zvrIQPVaNq~$?AC>G3ai`8Y7ZF9Yo`Ll2Z0k7umtdm`;pstz%=Mx0fB7Ef7$4`+OcP5s$N6PC+f>jX&HQWtpiB{| zA^J{9SgiMT2|M*o#a$bTWwHuD9{4I3xP1eiC(}s4sn&$Ig9!O^)#tui8RPehL+td- zosnfVK`_n34C=KQP zs+K;L_X?CJer}_Zj+`Y-a)FeJPVOMcrP=+mbi#%;yCZDQk)V(E_J3xan_W8lA2VdK zC@dVeY7Nw>ukL;^;*GY&wOHTg0I|vJ7RtZP(>bqmKFLC$VbHwzD2Xk*-o34+_KPi| zLUKyKn@)mbTN;Jxs zIhnB)B11RD(D=JA@wLu6L9wri=H`nJqJ>px{`$3D{ZV`cN_kV4o6sN~v^W1og#F80 zsDRQXI>pO5qmX27Bon3Rh8DHy8n~_#@b~b_jeeWWUBuXVEmUxuRQ4>|^KaLTE%M-f zL00TMQn-_L!8Mx7LWbdQwV;V5I`juG;oI->!P6rPt2$m2OOUl8)?&!&^2CvzJEH{N z)OgVCR*H%+QjS(Mej?W>EJ+6LsPj0J$LK}AZZ{1P-i{5#*>9=qIxYh)>nbbdhNl6J6d>$2CZ{Of6a<(N=mOPw#Z6tzzS)l72GYt_85q<*5 z5^Sg6&Me4_C-&qXQf_tSO1}&}pcG5h?}WNH=J?*EP)Zs#Gxu`FsiqQ03WjpddwtNm z5K}p&Of|FL?p&KLDFPUWI})b-UikbZMu}iX%+F%(s2pggigvUqmg0 ziI(s}S?ykYy;hIrO{={Z3RMyXm%SHkK$ z9HoGqmQL3V4jdQ=uEzOIXv6z}3@z6d{{rQEivqf1AP3mhxpOuWo+akkrBwZfw?`_L zaZ|}^FLm7ysN!NCD_a?gW7m}>7SeY?M@@7l*$H6U2SMm|j^lR^`3E8#c~v1GZXOA3 z<_nsB!V~r!JU8uIIS>qA{02!KJdQQFD3~e%x*^VOmY^ob}0`Un2wPjtE4G3#8tkcxj=Vg#I%Eq|bYP zjj75&FVl)Zjj8 z;bsO*Xz(9ZN4>;MdzZkGd}H}2&JD(aJQ||9zmQa8FsW4G5fscu0*A5iLW&RC7#eZ1 z$oNjwq*IH;H74)b+jjN(T8{rE|I|p!@}}?Zc2Oa;e+-n+D&kU3Tp`qt_aH-Hsd*92 z++uTcuF?TY_% zC1%>YD3~=})E#2QRdVQKU*P$)*ib=G&^pB$?9~Y=b`I#nmzdT-%C?V?_-<=8HyvfVYIwB z8n=HDZ3+~X&G`MY+xKdGPjmZ}%rPuu3t0+}*>+=k4hy06_D3*^wW(ak=uV9|Py#k8 zNnG4-nh%)+TsykXVqwyXyDW+@A|zK}t&VR3$z8=pb)9#b)~M5GVnWn3VViT-(yiqG zrWeoIDXbtEzYLKZ0*2J@dKELSql3oXdeBGGL<`>0uOp~@4*0p6X6#P3bib&m=%@s! z@O-tC67hV%F0F~-l>M&TG4a*4?7G}Z6g`d9OL`J_h5P|jii2pJ{KYU3qAUy6#`*w~ zm1$3HDNI-zp-Ci7#x-Ut;+qPlzr)8sDvN`SNF8Y6e#f{PBaQBe! z=qn~WefM155;DFaTO-sMn%-Z%(A}$z-93p?NpNJq`feQ*yV|M2qNO&*dPv%&`lJp( z8@#P92S|2Li|x1?PysZ0BZ_`NdcTb(!U@tnw)!$VuhU?-NmA_7VM>?t#EZ_!NlMki z)K%)rGW%+86$B1aRptDl99$}NZQ!%i;8~XkFpCRY4B4UhJdNJ&{c7u@7NIDu?xdTk z6KodbPs!lEV&sKFHPK`CG8(f{SI*v4=J6{=aPqS?`3CBlgAHoARM)?oEYAjcR%s#H z#=}=T!U_V-*m79b?V(aG);6$!Nd0MIbtkO6Y>1bD$D7xiNHG~dxw(aaLFus+a7bRZ zqk#tK%Qpy4b`dzo(e1_tizzK&`o3)KjqpT{7wILVt7mseYgn=;6;Crtug0PU9p3T? z64L1Bh1qfzo1kGdbLos{^s`9sqj#&W#EJJCNYJ#5(!CA#+sM^+E(gFLVixpjEWs_N zx>T&3(v>fi?0w)s8VT&3h6hw~yYDiVe}iP0%?`%)9^Bbe;KpL=5-7iaYm_h9`(;^q z|Hh>et2r6pJ{iaPO;hnv>lnvQVF5AKGnkUN?UeaepUr#Zj!?xe7UL!zYy^dDk=})S z^!X}&C?Df6_G+hkYYV-S!Nxp+jR zw0;#)k_8W$fxr;*kP>8;>H8XDv{9;c*UrDv0j;OWiYSCCWxVR}hk1#GW2r)z-6$bE zV3M7!{Wj8Qqxz^M^#G8QVa2xAmo(jh+-I}usL-dk?Uyt2BGN9BfeVr89b7sh>xi`V zcxDc1Ld!0eMAjsL|ADM(s9*pWWJOD*aIhN*36Ea1<)%mw=Kh1;vjNK1@`wMUuy-oL zvoBTRJ>R%$1){AA4ld#FXuG~TOV7dl5$?NTZ6}44Z*?ku-|??WyuC`}He*!BjJ!Tr zDV3b+ved{BA+o>grXC)Tx(vtGFlgP`j{n@4gy;H zDJw|L;VEA6c6u(PNG>=vO~m=2!Eroknr=@L>vv(Ip%3M-*G zbb~k;?QDnMHEDod9@dz@NZl-c!QPP}Nt!yEo4K5oWQ7 zGq9vsf)iLZEd24G1gf(T{m1%nGyBIur?MxN`*IYd4_xdKo@bkO|0B^!Xghx(*MV`k zyT0||4Nq(?`jwDrYh8^bd8I!i$A&Osyzl8RzEVa9Te8wlyP+@oK>syE9$c{aK&7t& zxnu9}oEybQ-Y0nkjg$8QyF<;ZTbS=@H^w@qMdgCL==zQc%)Hjz-?6AnK~ zVp481uXx=4R6~OW4qK0NClOnV`*LZgO9t5E@tB6TyAD+mAv2zIit&tRK^t1?l;>D= z><+}-0$;w-^&wrBjV0cbu9y#N`o>x_*GP2UsA42+=ulg4vE}Q(Map~rt0a^O5O#@$ zlQjzh{Et)7It>V&TKt_~eio<1MsvzGewdvPy4b7iVnPK%7m#2d3MN?GLI=V*2(HaE zgc6uEZuilp(5h7sN`kk%plV@JBliHEIkTFlIGKYRQncx!?QXxLD~}5CuzkKjaEc~RpF%5a;&}E=vk$U1 z1_#qgQtz;<|5kopB{<&=V81tmSWmvnfzjWC{(sIQc<^@ud^_d?cW72$0OjLC?UW-R zCoqz0p$#Dl`5TrghpeHnjh^pwO4czk*rDma1^PL>kz)Rr+NX2hU$tC!$kIVAi0>Kw zK;500U!q)|#t0*#F>X5)MRuCym+=JNGT^t$H}Jz{Os@lxko|0qe;c<` zx)h(LzNdB#zu3{0W?-YrDSfCumGBvFWAjy-qn)iGcpD5Z_a8@a-kmPTc6?iy*>V5J ziBH?7bbGEn%10m1@T&QjDDFmFWc@Pw#wZZEpD&|k6c!Hz=o>Co^g(j1MM!fX7s2wd zBOtfAn-69Dzg>VjQ>L|*xVhZqx&@qp4x3!?7;x8b|0ZIuSO%Sc1PU?anywGh%MFKx zmI)Vj$K)}2ed{BGLJo7-1{y#C^~Xrq{KjrAkK{i?kaC3!V^h7Bj`vjL({ms{D`KE} zXNQbHola&^H&7*1G#4}(M)SzJww^73FfY@MKqrv>3IY-R@;`}I9zF6oJKu}?(&|bo zqpm5CiMRtfhdRqQgviT8O!kt0A6BdWX{8VLMIZHSWq9`ZXGv60m6DY3-&TJ(q{Xvf zuIotWJR>f>d+xY;4Y)mQlJ7)tkL2J>ytU9o{JF>r5_{SSE$KMd}wgLlO~5J9QJqK)mQz`;7S_aCwh zh+n57w?YB+ihxF_zUo#O4;d$D!Zm3AaYC@l6-GdvLv%LTP)R#jVO?t3*ww+%xcHuLlE03BH+J;vf&T-yokSG9TcS>{ zgm|V+59jj0In=0uZ~eBc$79VN=XF@8W7XEBmZX=m_y~Z%xz_gzU;qxJ{($koe=o^D zR^hvrJ6Ii0W!Z5<>A>AQBRu32{MFs-2rwg|V%M<-Lp8ko*S5TDW}X!YsVX#_Gy0SL=GN*3jTJS3b?xN?gy*#pXt>9pt(-#scA6sSDru1nFh8t?2nGrW#};xDd*2OaTgM~(fB z3Ms`U-I(qMp$|3(RN`?FpnDJrE zg(j6|)KQA%ccy%Vrab;-EvI}d-vj7`s%pT|jMkK+qS+#ZbE{lFT}>bs&%7GtUr+R^ z)Z{9g>f!=?Xt6ppv!hU^9UTAk?W;}K33t3<2u@ncD#MYy{AI%8N8HQd-2ap}xu$3^ zWrdFLZp!}QI7?4qvCC1#)|;N`+qkc^RP2Y`GKyVe2A&9bj8Z>3qc}TB@|{|VoL;$b zfBSfw-y$g@*#9TAv8N4F$L)4qcZ?y<;b4R1_7e2!p(4>xGEny&ev=NIkT`uMbms=i z1~@klO8Uv9h-qIDH7I(nAoh7u_PVv{j*K|N?!a~VT38$<$QmDgN5`_czqeER9$sBel6vzv5uotc7kBvTJN;(7I@eU;sxzxWD() zz!oTqbiP^Lo!FmNlZF3C?ICcu_>zpfT1o}Kr-iE)>*)&Fx8BeZ8yZeoKh6KX9tS;p zr3W4gD=#LPby;9N6KD;T*pYDCj{0dweu<$So>Z8~R_Rvd9Tm~CgvUT1s& zDySzEA5wX46)+=rvy{-n|BS3OhIF)F3M=sv3Dxl~X2>ro0NWP1=96rxup4jY5-`*kCU=-x zrk=8|_sy!I5$(x|)928rGJzlQrRyOMmnVN)0JsHQ&!p2!;L_J1(H z+7R_7{YcviQzQBjYm5-zqaon|>RbSp9Z--9&xZ1_dddl0>>!$a5b&!81S7p^T_2}B zwf&|YQXg8(?EeCMoXX--SH~3A*w}VcS{pZJEEXgo_t*Bmxp+>CcvJ^3uHe>|u=F>1 zmmqg7>e$eRBREERpZt=Ce!Hoa;zJ+{ZRgDz+i9dZ?6=jmOT+QWP|w*7i+mI*BM3B7 zUh!Y*%If z=J>rf)RRMh$KI!;K)G`EPn(m{%8RIueijTS6@yY%Hru6whtkX1S*;e#iJw7Y7iCa@ zcGX~wb{NweQp_gb<2Uu{`(d?1_3k+@K3nn14nbe?|lNg|gmc}R61mmBr$E0NMW+lM190y_3c{R*A)bQ9BT3Fi= z({DE4>QX@0?PZkWs$xMU$^$h=*!ZZW5x2V2FC^NZ!n>IYU&cEAET z)dy&yaF;7_#d{az7^kHgbSXgrYWY*8Cs}2_^>K0D3E9ER!$8JMXOkY@UwQk?IruK= zbjV1-?Xgp;ygr;<#Hh&hkw?Cpx5FNn`itV!q1_#0RoRH>43kD#t>-)jIVRWzahznv zyFvlKRdiT0`N@ZBJE3IAhFJ~@g#SmWh=BeAkbzS=o6`_R$`hOWY*PaHc$D9j)p)-~ zsn#a4Wa&5mVlp4~2qCFBLLUF|Dv|QlPEKMLiHYPkAdf{qLH&Eb_HN|I=(o5pQhSW) zbPKZ+Ft$&!o0m|=k6p|Swx*)>2@as6DVy-b3Y*naC;Qo0+8sBli|Zu){e)mv{b8ps z?Pq#>Mqr3y)8{Qp^?__C*f%Y7+Pf>dv#W>G(%vfr2eC#|>mgGNK6{JS&Kvl3A{#mW z3dN8FsHWD?;yzlAh5E^xEq2^{Dpx>>5q;Bl>uObY^BCv zv<|1E-K&M=R>PK)Hnm{uZCs7)5c^H=QAZK}Tc?UUfFBgsQU>VsXUo%aOv&&ZW6^d8 zW4@AmfKwK)LCD$i5+_Sz$p;A4kmI?8T%<-X=+@Xrah(;zh0eY5p|7_0kDFKKi48kw z{mq!?F3JUw+76V_+pnvoYj>bqIIl)}o*S~2tw8A{)5KQGhk#*Olh?5c=f8rmZKK-h`uFwd1><|}wN**Rm>nmD{POd0H0249{nTi%MB=+YfjicwN z3?@8$7?q{gR$hzVZk0IAOWe?2MhLh3>*ZF-*C;>8{89q36ASV&(pl1j3fVk$!5*@b zpzGLfI+^Mvo1r|MaM2vNcUzL$0wtiegZWxJ-^|JmL_in5DlBry+f!#YM95h-+7)?i#$cpTbCws!lR@lT>Ct}7f z2T;XG95Kbq%Di3YG0dZ9^4cX`MLg&JQG!rN5(Xd`w_;5Vcg~@Fy}Y_p=s6VJh2Z)q zv5~{w7mZp~t)!n>UrJ1qi$f%zF`EwM3{>z-bXRX$c(;#i|2j!Yz+swAQFy};m!=t+ z=m5!c`h9kni21<%A`j1u()=VFD49#{^-ZV9c8Z7~S zA=HvY9E13cNVo~7vpGl377yw84Gidd?VD&v9jP&ZhL@4vj7u%GdI%8zEzO8`B}+YC zs~VLND4Z7D)e6jE4ON4i2t4nch8a&H3_X9jc8(~d=YW0R#7YPFKBaHxZ-6MduDvgzZcL%zv>P;+NuoRj<*HH>8RDPe*Yxx;05%84e_w zKMW^udXmys0f`{2g#08V_9H3c*?7n~!A-7ae#+3c=1XGyo9yE6I9p2Wu>h)_VZUu5 z5%R@}u;!_A)ONcbPt-e_maw_{raLthId#ZTam3P}r}l!4s859*ZPY6gGjDe40rgdi z^AG+OafxMNV%djmc6xpNTpIiLnn(~fHB06#Yt#HR>CIS$&q&qGcz4D)Qu>U}pzG68 zXCnaNoIPfslM@Nf?jMpMz-t80s`^UKKxJ@SC1@?hyZA8@gn^XvoMsczHBV8H$f3rS z#)ozWfT9QD?;Q}Wf8sEgimXNwT|`DJ=JqrXgM%ET(@)xEP`wLa2i8|VX&D@dgw2g} z(y=^Xn?bqwTOu~=7WU8zccCxv$C(gi#*(vp@7O{-kaGHu-rPll|My6F`vH{a)7K>- zn&e_pzY4MYTe~`>5NnJ2FW-fWZ+?y z0+Ld)^~kzcuOAi*+nlm-=mNjOTNC81*!>YgwA;Iw)_xV|2`l;9*G_60{38CIUpQ7M z!A4Hte>a1qmr}pT$95Q!oHF{Rgxg91e)H2$sJ7Nz0$bv^GN}G1Kk;c}tx+kMXAXq# z*%WG^Hk55{@D%~WK7i|W6~@8lll;p}T_RAYMsWWdEK$mFmNQz&hI}mcNn(>UW<871 zGGXViI*)9nJS$WWST8=Ob~ffc$5W(S@{=;r=pI!oIm`n3D^_lSN4EP1xePF6lyZ6A zE#6R>5t1uM=I7IHkg)$RWWKlXMr`2z{NLd5lmk{+!N4U(+M-7T*Qqgb)q=-FRym$( z)%WzP|MN?#fYmH}>V48##&m~C{qgcR85#iPD>%4fpZa$zPvn*Z(I0oKkS_Rpoz4LD zas5ym$8B#Sz~o{ra*5II)N%4(Fk40;L9}r*Q$bnERki}J2KzbR5;dCKk*nCP*3-Ld zF&^tKu5n6PR$G$QwP;@!+-){}jxCh3U#8*wC%>8plG(X3@m1<~c&;rDnjn$p-%_2D z`u*D+8>{d?)%+&L4H9sZQ%%36W(0C1FWoF-T&&pAb=_SZ4zI7ew3LeDaO?Z{4Dbt5 zgh2`ufwKiw=$Ll=ITH6CAh?_*`g_#|%+lF?zJDAxxB-#W`*7%`R`3oKZUY>s>}hka zYo{I+;3tVR1CUxBeJ3j`EvCZ~3IRZNBp0@!r?k&5bf5|4wPCSy1n({hFjp=F!gy! zI4N_sPpg9brD$ie#~=*iQ7!z5K!>)mG|oow!Q3gL-wb^&dej{OEQKxVxV_N!aN*+Z zOY#gAL)NN%<>pyt1;@Ooq!_1~p}=#uST_|l;a=V-O5Ng1QQt^pc_~uey*4WQxqswI zY)COKgAcnT=UGe}F~#j@Yx@6DAT~(US@JbO1DA=v5Xf_v4A9$fAQg*^Ig!FPBO}UAN(`$41ep8=#apr7G zP&N}HfD!MPG14Jo^IB?tN&y@j7)vafz+=9nj*3WAVIK5M4$sx>S$${x46^ogU3eF8 zGib|Ld61svD#rW@W{GDI#X2~9W);ZZ$BaH`?wr^ABK z;aa%}pSdTZGD0)17>{5{q=g71B=}pKtaJpIPcO4JTrAHZCd!ZL&39pr5U|m|Vb}@a_r@`=)W@N`IdgHJ*D5$%Y)^r?%C(dZ6 z4J4K=f%vD(hXgS8%FWGiIP`pg)7Bp!ry~RS=QelCJYz(6KIWPQ!wmyGI`t~c$>XCe z_joL^9P~9wQGt=@%`8iKQigD`k14fvrJ1hc$K54pT>{=^6~`_UiixDF!~xO!+>tS!XhC<;E_(r_zAZ~qWrwo5rq({G6x<%bnJUJ8uo z;@r-JqA;))xIeYP%EoR``jZuBA>9^WF#UT=lNu8DnPUxkCQUMi&YTwPF@*nJ$p}Yh zM)*W8Ps>)u0W2@wO);MwLT9l8TJNWHCyLn;f?Q%{9!R+_CZQI7ZkWkzKl*=-I!OQX zG7JVDjRHb*0IF0+{%LfeF=JzfDa3_mn~QgL2QRAEr>Ez2Nj}441{n^Xd!gSR2G4P#I zxCd9DXkg*#uFHHSk8}+9HU{w;!t)f^JM?~hxndj7Og#%TkQk>S3LPsPA_*33(N#jM%+R1w0eX0vwj34^sl_fj8bGPch6kOe`ByfOoS`X7GNA(rytJ{;}Kz_@kItN%zeT zReWc{YA83fPSMZ05zsV+wvt?vj=VacnZ|VAABD;x41uytoW;rlQ z@#gtF!w4>(qPQ%H<<(u??%fF=wnV&!T@v;P&fJ)ht;rn8F6}M6MAcaRw(}pQ8l_i9 zW5k#@&+AvxO zLzH3MsBJWM{;v-~IV<)rgIZ3jC-maG=`Rq*Ys1{K{qCj`GI&8<)mto? zmvNor!#@`NL)z}GVbLvaw^psr$k}r9wo|ytD*t7wP%tZP@!&r|hRmLhgf-b??g<93 z6x$}MAh*8^cB%r3f<**!0LrjqzOI^Ff*Z)US0yFlI3QEi|Gc+1Y^_u34KK-ipF48c z<9skaCzu3Ls@)GCmro$C#96$N62-u5lV%DM2gG;&+z#OrR-!vY=tU6gaFaqXNfV$b zHoOW+z3C{G#N~{|(P6JZ9TLZ{v>fet;N0^pUd>s?lOszvAG5V+*FPQgs@MT(3nA$% zg^Y5kr+z7suBxDf=V`&98_h@;usHAlSvVzVlV1u&z9Y@pmjGb78MDqI6~sj!7wf=xGj?59X@BL6I=O^24p|_~0 zZ3%87k*J%~wmv3HekcMxlf1rCwvEK5k=~WVp%}8x%ak!sxg}we!Q&^=L`X^P=p@W0 zesk$RmaRaVf7~+NF53-pk6{$@{kj7B8A#<&cO)X8T7KEr!!W|l`d)nlT};A4`ls!< z2&+webHMC;M>UjAYrgbUbyN0W*G4JhlQOlxbR^Y_ojP(Akx5*e`2#V{huk7CSLU?1 zdxV0TS!>BWm?v?{OUzWwXK->>tIFb(ct(*I6&D?e!y92rPS=~#?g4*CXaVBu8Eb1Q z03ZkRJ#n5;m7V9++B`mqAXu9k&sq}6dmhdjyyo)t)N)3q< zN;dONMZB0IF+r4NSh`&6V8J=RBK(q&%WWVi7_5wRBEK%sQJ)AsWLXvAS*cu74ad|m zG{)AoC>QIgFVvA`hLHf+?*tw%DvrK4esUMO_@GK@l*Z<#TlfRAgJDOpZX7ty4^|0%zG zdD;7Y;A8m|&8-vwVi>K&8y$Pki#BlLN&Iw~NUzJbLIz*V8XS%~3gUE5F-b#gL_hIg zqlS#Sa~X$cF<<`J@-FiYD8Ox#OLZ&_CLzVFU?T)M*=9MZW{BsW1Jo@4Iq=nUgKy#{ z*B#m`21AHmq8`y5+X3Ii!N3xA=~)SvVMis6cEx-@^;^#=ckTaut~fNC!NZ z*G@Ysr|(a4)kc6l?jKw9+rY8SisaCd>D1)cE@O>SjIN9W-rJzV{0QZnaEn*0r>;c) zs>XpIE+AtTI9SO$o1zC9jD9ehmxEU-M_*AyD8@W1csMaH&#?I2Y%psPP?jJoEK?Ls zbQ7Qu?#fLYY)EKWO;i?}D7m-zDOLUL$-i?&F3&*9g4!#T%jOG5ILD_seGWX=PpUqu zjKhze0g;!7)indV5xTNZRx)?gFus$AM!07&DlFld_B zQUc8V+PeM@>{*r78Mv4dF5Q^Oh#?K65){)G> z?sxT+xtkLdD2%0;7QBAG@Cnd z%NjES|8RtS*1NI>Z%qcxW2XvuICzYxD0s2ha~R2?XDyB6CPjj^9Y^Sr*l)VyL$ukp z>#@<(`Xw)t^rruIJ)zE$$hyN+FW#)S^gU=dqD8sS79RH&F`TI3waa54{({fG}xH zL26Ns))LFdMWKPRwoQmyk(mKac>8PSHVqs|MsL`^mxsf-SkE6!A;oV)zT zGLwjMli;mo=NR67bEJztfY*zg1$4~l8rDB!KzGlB1wUWV*Ywo)Vl#9^H!wt+m#CM1 zi(4a}u&@_(unsOTcsQ_@MD3JC9CSt0dHID!sV#}@!?5;+U{&Zdi4@_I=QLbDxD{w; zlaT*!P&#!@wc{{iO7er#!2lYd_z)q$YxIIg1%Uo{6p-`vA9i8&wr#C3Zfb#+@KWHR z=8pt!o}aoCLIaELr5ZmFtTGIxDz)75&ft<5SKqLF&i229w@5xFi^bVfv9i!o`Uw&p6m|HhfC8 z5U2x-gKH0zqIpM>qQ6PYn12Qwpmj?&jQ zXMj(yP3Kz2R@CXp0Xx(Z_RLGNR~~qSMEsQ=#mUC(Euuq~;x4_#@JA7I1n&jO*1 zL}(uv0!U1tlfbY@l%KTys;|36TIgvPX3&EQ?t~-np?K;wra`J7 zt~Z3+mb_}YH$}YT?m^WNd+8k~ZdJK@*_i0Z_ZmtW30$;bgB|%UK}E7%9P24a(fO4m z9K#D4l@kQuUl(UnMu1zsmr>Gv%1DVJ=k_%KNG_G!A$R!!vIffPy081%@O+&w^&=6uM z5iYrMnBh&}UIfz1cYn;RUgdOKMnkl!=alk(!rn`Ienl=Tjqkb_W<+F#f7W5if?;2a}3q z>qt_(4-Iyi^*+c&(8UITz5++Bq!sC*iSO4wjZnlDlj`e#b846v{@7OA=@R#ld01;s z8vg2o8mA~u`}}-s6&6GHfW^SC;m7=5qE(-T__wz6? zr#Q%nd;DWg*LubdHnm(sOn$gOiSc!n=3|lH(yB2VkkqLyb83lxj|Zt1{Llj;LH!T6 zzYzIH)iEbP1AdL?PZ_7`)6}UjJ^A>8_#n;@_Oyo!}L(!<0J%*WW!=Q!T#Z z#8ZdFN_S1tb#0ATDmI)<3BE~P#v^}HK|ncxm7J{ViLA{7_F)PVtQ8-oT{ z@B^$YxU@z8p6t!v1D8@1%mlLj{}k3`48mN|UkMK|u|s*+37fv_NHb~a+MZ_+z9rl{uB=LR;7NHw>h z3pWwks_dVCCs@A3>VvZi(N{3_8{ZnicYkjsbs(r@cWEUfUewcadWD)1KhGG9w3VF=$~Y5c*>fH6?_-eN%y+8iCV4`OY}7A(<`+(s8@%0H`47 zunp1B!QwR*RB-hrG;x|zuI}G9eI=sfy_0j2LazC<4r4VAc*`{PI=P?4_%~KGv%DEp zgc&PtvJ-t4W9fM2$3x?*y32}sD_Y=Onyr9y9b2z+?hRXs7*914RAEKaZngZu? zj}mKnz+?)9w&|M!Q+5kQ%$kf3nC{ipDogOY)v@;Kqj{IW7wiWag4g;0z9`UK zlTnaTSSU`%{H74f5cGlO=uR~Z8+9%r^B7#ICj+mwd0`ZM@SXuM7p}>Mo#tHss1&6% zrJ`U7_Sg>UNVsUO27#{sMBqLwc&7nNinnu&{gAS6ek~a=%-=rW4_coxFIuQy;#>uJ zMcp3{1n>ULMWy5frUrVEB2;_4j7Xpe(6p$ug#_YCRoI7|VZjT$2xztM!1v1v#raFjxzv{T)kbe)e9erl<{T)Iccj=q7c=Tx?cr2Sr{dJF^eUZy- zdn!i*{HtTz-cU|CLyr-{jCov&znFF2;TLzg3rT#3_zdHO{e5UACq|X1Bed(CW=_>G zl;pj9z3|Zk5)(-v=7PIq~?=ynQ{O|(kZ@K`qNg6!E$w(Y0oo=ml z%9KFc7co`9Je7-Ee|rKnOAu^X)zGZsI(+1u3;g5j#7^Q4p4Zy1%r(V~1XnF{*&`tC z!JE{x?dV|)4WrM_NY88cPX-k zt-~K{e(UcYP9wlSw z2xi2h;PPxPjm`b{+FHCp-kcP8U!&`dch9EL&qYRC<$&5X6Ev|1ZUZrHSwCoU+WeR= zN*Bnr01~1irVaqB&P7LLQ1Fn77^OM#2?gqJI>J_oPOeO9cF97PJBh~0`xbhv24GAt z=x!!i0WR4U*u4Zm#_lV@_R%kiJ1-USor=usY_8SRtrR9*=_9a{OX)XRUQ7TqvHs*D zlbq+=IotrWwH>P-T!!mR{m9Ci3buuow3-{~3h9tlo%-eN>*=B}(J3*Ysrb=NH zBZYpdBQcku-y2QJ*T31a-0W|igBcK@rCEsNnvv3anlB+tshAqY%gBc4r@ZTB6;_1B zgCW7xiV-sPwr-bNkaG&b(XYiwCzQBRf^%E@ssaTfOyP8e+pin8X)rQ7!N(0>@Bo}O z!Z&jhUTagky>3@k403cKrK;kS5zJ6V+n>sUgPvJceZrCnqe6sbmKCiE7ZKC?D5Bu zpM-G?LY-x)&Jg2z$zdr_8fyWSvoIT?W6fnCjKC9sAndK(%u`v@h1bf7?ebW9Rzy)- znKv&XT`-0Gk4r<2W}WBM+J;Ae1N)%E*oso{F#5MA401$=$@VLO2_{H6BZFGRRrtIE z8_xpQ;TF1B=E`XXf@cnps#Hm-qjlQs*k^s1i*QFd;n7MQK81}LegI_j3?D%NHNg4T zbyEq+MlxI-*`R$YUe(=l_lQ+_)L#M4Ie4CO#iBs7S_{5v+XA(_$)FPwa=fkr3}~J0 zB48L|Zu0g$ne}&ARA5J4fif1hPZugox2^e&1^Jy!m!v`In(s8iLP?l>(bLLPk0;`> zKn{erOad+{k{A9;GVGW7g12eRTFr5L|KjFc9ozSCqwi%MT98#{6s9O0|2O}Gs~2YR zRJ#%BKY}_$b!1Tb-AD;zdq9{dhrzYOw=7#~&GVK~HimUpi@#@Xe2}`j6D&lQWSwJy z>6Q)3V)qgSH6>AkS}@iM>Q~5Hum}$~*=fNo_6GVB+Z0sLwPZ^6dDu95~)N-pQ4$K4hlHgC@Ok$qF0*b3szDhcMJhqDV2stpJoi zFRxSk2(5g#g@Y`LHcXpJ!5TE29N-iM|2zPRt66m<7px)_AoiTb28M0DLcza^bk&Rr z8a^Dkp*=@d-USaVcBtWvl73?1L-sABSV;}sEZHt$vXJ4{Aks(PspwMJybn$zrGN^u zM_xOM8^>D*Xo!))R6SsCbbt}9L))Xs5Kt4`n-E|3N#+#lH7sL@Vn6`=1jI=*`dj-~ zZ-@=b$e11)8WxKB=v|9@l zI^oM68Xs#pL}4 z6lr7#h4ry$VoplmQi(D7xjLx_phs#?7krJPzsE6Kg0+~4N|3VC&w`Q(SwtrU2_e7M zFl7YUrd6w9p}BYKBfWvg38|~z0e@T9_Z0A}mY4QZ)%}`5kQNKJ0HQZT`Nf994{TFq z;k{Rjb8z-Uh`D?nO&0#wm1IJN?(N$@A=Ib=a}*&98BSH5LDGYRt2}t}`fM|;>4K$* zof`_O3BoE0MU6{pns)HtIb^5;mSQ8Vo3PFZ{plkwC&8;0e*6sjx#aWP8_S+vU3 zVMR6Qxcj2$(H2t*FxESZ?T|3Dz{OcXLj9iP=x2nSNsht4%6nU$+Lfo|`{9jsC0BaM zTR9&8aXUX59&1&p*p+dLuWHVd&KHguRKg=+m~HBs3*vf*p{+Kh@(|9xd$e7TNeqKT znzHTq=Fnc%TaQg+WW&44M&{INubo8Jxb_vE&;SF>adeJP&>MxS?tvCJ2i})>v$q!h zZ`*?M=DFndR*(PSD~_d%wi-b0ZJ5C>M)dkE7`y+wE1k(@r#MD~ayu2BQ@vr~Gu9wG zUqf-$?o(B4^GGZkz?PB)o-s;)E0I2_j(_@b*^!XQGssAe?SE~r)iNldlAi%48Xgkt z7#TGuCC30>PLRIGpT-d>+LcP8^PlfgAGc3vwtjR~Wl`hwH31~d2Qjq-WywS`e3*m8 zqWd37r}_`d8c++`M&TCP=C+N@>N;5ekA!~pMYK38TtYrt^XDu*P`&VmbkLf; zXON`&?V}cB?td)U>x>~6t<#OVsN$TzWq2FIu!1NHVg&Y;U`O0r_M_?4SL^d>pa{*< z*%=O;`zlw=<9Ppt5dDg*L5(3q(Q$vLyCMAkK=kv9PiEtH9cnruz_&VQ;5!wlsz>wU8nM!}Od;zz;hSZE}A^EVgyHs9;GCt`tWZXX$~BH;{CV-X}s7r+}NfGF%L|eFMuFn{eG+EiBMOi zMO@W0OYr}ZOe=^IAGu3y<%A;hHRXxlsyg${O^%8Cjr%T$?OW&P>wrW%I#m4W!YNV- z$2SWk?uCI_ z++!2Ho>>K_YFiJmrLR)U6%(0@Ejr?lFnDp6?SPYo7e5yW&yU{@ag}I&IKiW&({t{A zqQ?;F97y--qwf%12gn}zEg^*cWwDg|6sbW}_q2lc#?Ue_>6ixr{mdcT)R6-1CCU1- za0)#;#BW0FpDld>OfBCTv6M=RuRZz?)3S6B*8(O2jid4R`W+3iXSdqhvZeha&<^=k z`ewaW{;4F;fmPd@Zn#o!z*><>p66y9i==IWyeADH^~F+o8p<~M9h@niDElaIFe5VtS~%^4CDf zDVAc`{JiMX@ED*qpj|W`I7uEW-Gh?F>K3wzf9}B8E^l}kOX&ws`f)KTVXHe~d?5RC z&g)3}I2lKW&i|-c@_cK~x`y79iGXI&r}Mi5h^(_|3S;}i!kVS**R-t3$Iu9b1j`G@ zI1B3VbvP~U?CAPubuEy;qXd}0q?sF6cW@?g@|vB7vlyJ(b+gf>M3vg zz>Y-65IdgD$%n`1c(*CM(h@*a;D@ZHo4A< z;kxechL0fet&x1&#?^1mUBj3*O0C5;vriA0pHaZNhN`?#!kR*`Mm7z0uT!6B-!&uQ z@D+|F;Ln6(xgqQJ-`1k~)x5=Fauu7n6k;cC?g5id1dncDcwSwvFhlM_AXg$ddaxR?lkX9T4C{VM4Dw31+n&y%xa@?eRx+wwf?o zD^WKkVgtkLi{fSRFy|dB{Ty(3k(2o+fhpJ)m#j(V4fkOPk)s;nfy6wD95emek~DPG09+T9Yx3PqH?Al> z%efy{FC9wFC)yq^`J*`=e*5464LM1{lX_zP2^0dA-fH6H)n3IL2tr z+$4{ILwSboHZGHJ0MH^jAO^Rr2d_G0oOw-QwzKh90s9SFX9(0CI!gu(=qsk)2YT6!*GtxqCQlZ5A}`fBfHE`;Jl z_(0`)uy`MuH<0FR&O}Rmn&*lZT~lj--j>Z8d0kK;4mZqQIq{|nYDAl$;Sk=9O|GUd z4+7SivD-F#(G#BMH9TodNsJMYukzYXD8D8+n7(%!DK=8KTGHbS$-J41l_-%qgL55A z52x!f=047xd#7-BRdh@2Sc>Myxi}>@iSFVaPf*5F&xzH z=s!-A{HQh2`n!>*-HykKEWMsjOwBG`F^k;PzBqd}0?x=5@G*q=$>5mOnCjOox=3 z%G4^g1_Eprh5odRGn*|o=9)3YU5<0k)j5{$VB_o>9#!wLZ`cA%h79aFr5mJSBt!@(_JGcocjfW z^Olum;3f(}HG6Q~av|AL&-6Qjqknd+ zv_EP7Pexqs-9G5{!m{AK@r@Y_BC-cEHWRed%bj1MfABt=;7Bl*p^j5(H2t>fN`7!A9Z*b;qw+31$rZzc~w0TT(dx3 z7x(jIKmVrGSU+mffsxk;)}QXaZQ`3H#U&agND<&*9?zO~^PC{s+Ph;grCBZ`0N)sD zYB;^@WN5(&(X~#CFfWg>nXYP4V+vb}Vez~~k_Oo2y0LAGg7BwLrzYx{S4AX?UmjPc zM#D2^>EDF_>eW#t@R*1h)2*u=P8gN!83>1LpQT;Me`V7=4-(MaP2Ek@<*(UeoX)u~ z#{6`VrY~_{ zslEGGWrmZ47k{{GQtnG4Jn!cpofVoO!TdoxbZY z?h4#bM3U5Gk>lQuPL3^oXcGL(5U)`5Sg<0F5j_wXM;O}nbjS2`7t#p4znZ9+@3Xefc;hOhcS(xY(vf9!uqgMMIy>MRx)};19j@?KHw|ThX3ys81 z$iM>?9CNXrGR|VsDsf{z+1q#A6K{!zXWs-ZRN?PFnC@Di$?qC4B*#JZp~|Xz!nZIy zlH?P$U0gB*UKV(3XcjoFA}vn5_d7y)5dv6gjbjGSN`0Sf!TD4Fp|K#vi%vRz|AzvR z0UGgO4x_npXD}*m8mz^yr-T0A3%3^FY>i-)ebFG?g*|CDacUy=I&A^_e}_QP=*~l& zhx%eR%62zc(EAMCP63Nn99EopP5?zfy1yWfTtC;Son!Kije zsjynGJDMkT$&y~h(y59w6GHpu@(gv#a?aPgg{4KA!2+;ve$Hou1-&iYJ{`UBrJJpf zBrx<32!>l1YnXsFV9%sJ`)XOzVE);_!=;)KD#v?u$Y znYc!_p*9bbAA+yyCl35Mi?+Foy4oRhpF*Gmx7GgMX95-G*)*KnC~fiI?e{>Y6fBKJ z$O#O@u_h?@l>HSYVmzzDdgH;4c6^*suVSIhCFa3h%4r|32wz|ZX&?;`DN~NmY}{^Z zSUWKyC+QjJs+5^*{K~8jK~I4aax)cTT7#@ug##{|BMGF&Uh44F*lK5H%pwm{$y*y+ zNyq1K9JQaurikA|4lYE;CjC4}aua?y$1gGo!YaJWbTU3-fJi_*X(9*L(030~ZtQ9CioZT!_RmYLY49m(AV~WdTyOij@dDyUdbJ z9SI!S8$6b|L_Tqe<$v&2rMCZKU71nXok;NNiv?gL8Oj-6U5(z1g|HZ>P!=(`cgqds za8CWiR^TRh&{5(9-f>6WHC1i7-E)@5vGaX*@!5X=4U*MSQFZn!zcVhBntod!Zggjj zXD@3+=eRn@Nk6%303V%Yy1i&m7*rzKAd=lFr@!BZh!@Y|Z0Vb^i^v`g3IsC(}B1`g>E-~$r zG=};sL-S!i-cso8@Om(T#wFDV;gs=4lIxN_J!z2X8Hw^g*A>T%L~h1@MR#iAZ0GO< zAC-TaS515U9kz(qRGh^HpO)~VHwm=O*8!o=i)uaY1;Gyh!AALJn4URJP-6b$Sqw;u zUuP+MZnjS8%0F9i`^>U~(lw+vrN=UGmG7o(;+bCd>Tdwm$omE@LsME}E@}E6h;%1y z3+Bf6t;Xl!Pu}h{W^?%=tz0APWHXF7Xp?akl-fL!GgtE5?9{^l#=RftUmr>r&<@SY z(2j7xRlyis8D|f4G10LRz-6{V9SpuVOInp@jiLh`zzC$cDavGxAoE{y!=LkqUwL<8 zVQuHGZh4Q0kP02gaYTb!cj16miM(pPw5J;pMe@Sr=(Hwg0^kD1*k11@TKf=eWSEw+ zX0_dM$Vuh*=Hhc({w8-4Z)BhR!XB!d3gr9pG+8oxPr3wv}biAP1Oad4FynAO;rs9H`n{3 z-R{nKgzK&Hed+WXQCy%DiiB!YFxZ-Q)R|H!Sj`4|8|)a7?KC_onnrT#Qa0R5B(Ts* zo#Z4?zU&%-$FMw?Q~}x11>uw~?kNHvs1b!qkwWR`;0!j4`Lr^O_#n*Ic~SK|q6AT5 zvKUFTRdyA zPmS~dBLac+#0MsV{@RcS%sy#;LaW8_1NS>D*lx29>wv9aHYMzV*1fWH+c5J0_{RU&>aTh1*~y_rG5EDW<2d=w!H6vZh$fX5i8|tlc`vPe)K%Cf<^L8&mi6ZUo z(W+~rch9;8e+haCUhlj5Yb-_>&qiEP!A_G*GXNFWgGXlEyqr&*SXSB}WYL-mTDW){ zdv;C?DE~WOgPI8bj#QI1axx%;d)hA50k^_w2 zR`wE*RP-w%X#=oqx$L@ z5fI1^751=_76x#G4(t*k50Hz8jfcJL#yAZuwK-14(Q5{qx6h`%95m^+QsH~!UGuKB zAYk1VeNmf+Q)3t=+AXOZyLOfp*s`D?x?GY5JLcSu@F9Z9sGh&cBu-`w<4M~~3V!Eg z8C{cbvR_mnG{bl+B!jezQzp>cg}sfP2^j+suEbgGKy7SjdyPZa2go3kkc2!hcdoZ@XJS8I4{#=^;IO*~$onjTJ z&QnD=MpgPL(L(x4T74{p_02+}WvF^3FL$4OVX|a{M@HWxyM%a{$%BE;C?CkqnR0&Q z;w12^b3xPl!A2{%SKddm4}@1em&L1$c}m_# zUtY7Cn+$dvn-p(*0+cgZe2w@Ak7)tF1n;h;6;DdwZv)oIUY1IVsEPPaJ>u z>W{nGIcww@C0EI7g^=d14f6QA^|1&1Q$$$er#cDod{d{7j(l&AyraWNSpIxlx8I+qYNFGF zbZd%Aa)%)X>Ss)f;?C~_b@c2S%!JElq-&Ymff!Ygk1zr`H^d8mXMF;=N-S-m9Ifl# zL>-Km>4+Y%ZEF{c)MydB&Ah449MX>j7u)@PFpSufZihQPjd;oN)yUCe415$_iN%vN z!oG_Yv&b8ybEfK(PTJr~)t|)-^&xcG@4wyN-o}I=-TZI<0;iuc$odi`O~es2bENS% zBQ94&{jHC{u{phl;4cl&&nBa?^FQD8`w!y-n1IVfT8I`Y$Qe-PU)FAWD3}uNIS#5l z23*Wh$mw4J6h#MH3N#Qz>U`!ab7J{Fq=sd!F)liXLI>9sTOV!NsCf%Mmj*ce5G|co zt~$u#05T4up4A-i2JVcCKy@~0cRgLQ=e5HX9~1@WKXH&+8NW%j~ z$@3>qk4?vC<|LMyA+Ot%^By0FmDaQgm7K2?``V#cEVAH@JPtv^zIn{y=k(h7MO`Dm zE&p}bVkBr?f@k{V(B_!@f>NX!J>*byRPF$3s@`7_b`ykzngc)2*` zD|+bP2SJ6&@RT0DdoGH0P03cT4{g$T2Q^zgrNKPr?-J{P9__MFyrYr;<7LSQXk%{f zWR_(>gHlVK)~TrD2izh_j}UU$v-y#)qCRMN)4{F8abEu5+Ag>mxjl!gF$t{E`~FqwN1YGwOq7P1epCG#FwzS=N$q1JGA^VIaxVHr#HZe7}rZU|=v^>%$%VGYvSr=b+N_QQR!Arn_(4&o@Frl%{ zAbZJ$-j-ym6QhXdRa9i#o6Z}U>ZOxgdZWG(*Eshuhh|1g2{QE!LJv0i35bvzbzbH( z4N$~mt}{0+`cPs94i4w#`LXvradpJ1+YBu6kGg6kQH12KCqJk zl@gRE^`z%m(|NvXQmU7K^XCy?C|d2K?0;1h6|Jtbw{wl|9#lsLh|=+YKD~4R;Wh)* zgsMEtuUVU#AT)WvaA?juE;C59OMYXo7WcLG38SwcX|VrLac@xO691`6_Q{GwC@D=^ zxQC2D3HFAFkDr;KlPT^dEv0(i7rxKI6tYVOPu_P_v*fSZ$&yZ+$GfSB;iZwUpP zJzH(z7c1p&>!4OkXq^tkd%H|H(9n<|=QD<=dQ}aNxgy5L1mmCs*51|n^$Q_O6u@K- z8M6Y$AQzFCwM01tUOEKArf5ZcTqigqQE=}6-6nbfCZbICjzQ8~4^|rvAIq5P><2up zO?t$FDwIn~q`&KkZ@oV4xGO{BJHWIuME@3}U1GhMonSb|IOoaMo;d%HEHH&naFMRO zv616V(`IRfBVeCzkQ?ip(U_PDyNZC6{Uls<^ZLr9dASN?{^#s%@tFTONFME73pQ6v zT>3XrIRcgsKw*=t;bo-(w8~inQ&;NrZo@|PX_7{t^d`^I_I(il-m?^+Nf)up*&~P( zH9W;gil*!~`1h(8oURyJ3jC!(?vC1y?pNlMWlFPt|o62ISMvT9sP z;4qGLCt~6wTVx7YIw3J|k@eBv2}i3M(n?*v-jUG8AXk&!pE2PAYp<*Jw>KJ081p4u zsuk)^eKo>8`rnJ4kdXMgqDX}x3>)~u$EX|YRiY^Usu6u%(dvP|M)i23T>E5-6$8V( z5yijLFpJ>^y{xVh*h2Sknn0ZaVFgFM%4$9K35E23ow2r0q#P&GgQim7Lw0>#?$pu) z2Y9613fRPm2m1hXX0b)Pb`vFxH`~DsY1wrcf^bw+*|4k%do)+RG7gai8Mz_Phqk_u zWSlsW-V4~`;K?c={tC?Mx#Ru7QtXO`O7r}l6yvV;j-raHc8LArYw9~fFe3)Ab)%Cx zf_A?lPxuyz5r!_eiOdYl5cj!_LM|sQ@&SPj@4j4;dF~i{7lp7qc{V!^AA3JM zr0&c;yB-HIp4~weq4EW7eQ(3lw2Jmth3++&krj1~s~v1p4n30DT(qU8VC`?F6BUro zlvFofJBqOBh0EZVL91$;CI6ct!BU1q|8?F9qF5O(iE)HRO+>#=z#-dRyr&= zt4dvp)4`OK#JK4^G>2vP0>|tT9xbR^2T4IoIa){El+o@|yOI{*r`lwj)6f^qtp&OjSm=oi{&Yj zHe1tR3>}s0`n{pI@UZ|U$UAiP?sS$pK_A~ZH$_LSZPL=!1AzyFgj^he@+r=A$xbQD z%*s-3L)HNUiOU`Ay_*OeqeZN6{cvaw+X;p?UEo|UCjnRg;G^4d6k&TLadmRt>^}7c zWx@os&AL8#WQLsrIaTV)W3J6+$R!lAWaivXPF;AM80RMj+lSO?co6-d%Hf}^swh&^ z3N{(`@XHgXS$K7{mC|10*8uE&$&e%zI<5^j6jerUR!~m(zdZ&U0ih6$-e%2s6kR9z z8GUEYueBDOV$JR8(V3?x5l``LWA^&&S455fz~nm#MKpcikj7Gv8F3QKTh5RRev34c+>#-KTHEho5O`$&O(MlWm%-uc*$sj)BYy7L`p zasxvne|=oyHvyp?qpri0Rom<|ZA;`sj&Q?|EEP@$Phk?4TaaCPyYA~h$qzLOKhX~j z5&Zlfy5ka?oEDzfo+BdZvWC;-9J`fuq) z*o-p0ohhfL0`QJ4prqtJ3H!v$b=GuB|Bs0EqfYX$G)pWsjw{sK+!A71=C9?%WmU`R zKZotPr|PMfOVlw z;~IeZhma{po()bQnm%&1Jt7+;k!Fr_m+kaj+tBeGKx+P#*6-SQN^s_zJq*dgsJ3X< z-P3oGU406~_sh5rM1d8VW{R?^FEx}>GL(WKf7Qb|v;Jpu*l8~oHaGkzV!`@@YC21O zLFUHso?!Vq&l8@1%SxTcZlj;QdTVo@Q7fJ&EscT-J#gG0FR<4b@*h1lAD08pKAOit zPKv4Wdj}0zf;R|5tsZeA$0N59(TL)eUdJou9Hg$I1)ld(!^V=DjermEUr^Sc3j_9T5 z!%U%L(}9A^k&&ggs`E8Q{gT175SfK5Q8ot7CX|nRHYSC6X=~%zTp%&Z*Td@O$tfg$ z_?tbk_ydDQ@>)x97Xo(RAQl8$$s<@Stkq@6$hQ3i4=CPL6ok6f?-~-%C7j_-A7t%oL z{O!dGd~$RS)d$pCAv9{ya+ol`kl=z#&e)Lxac34b}BT&{5=1R?m}-ArhIp0_&zaXR%vO?*-< zzj*S@5GC!#@E=q?(5_jlAFmCQJ7fLGs~T27b-D4Yb#mQ6N687b2w$LCBb>w+hw-U# zeUWCsjZZ_95>ybRx^7zVN}^BE)2Nw%3Fyb* z>;Pu;x|Lnwfq7Gy)$)hr$WIsyJv1OGBF31<~D#Z=w2n)&Gv z{2CuQWzspX&k-o%Hk4t+?g+@fzWmE;Q87qv4HK@}sP`YoJ@f0W0bN85#77ht;;Cu5*tlu5F_inkI z>ooSQX%I)f&`P=yqT{%$-s1g1?3;ZUWD+^Xvphfo?LYhN7p{h<$q1@M@Dbx$WUd;y zkt1uV%pmzWkYk#d`m{%YLr>_i9@CrxM;=`5_%;K>551aqwJRk~Vm{QZIWpK6EogM5 zKo!l^k9gG{Fo{X%3P6wyM}udKG6<9M$03;NnTkUk_mV*dPr7CLP=d6PuDoamlMg7n zeSX)L`TD&*MmH6r0?e>v0W?&|`Msvo>$O21Mca}nw(gO0(nHS!Z(sfx;_-B4NV5ab6ahQ)>8wA_zf#CFOgwN)FFx)m zq|H|Lx~|jjX3dm*f`s#?zXP|llc<&EbSCup3qU$CtmT;JxN_LX`xv>BfSF>qzp#kq zolFlbx=c4|@3m8OBUsG7@Z^0bUmG1WYhe*2AvB~@^Px7gVAW;FqR`_7JkNJHg72tg zYe>%fwJ3y!?(z-!3=Ak3guVm`#FW z?K^9ff#bKCLAopPzFVW-p#8Ak*I~!A7md$7D-=;e!ka3GKr6vD9i?>OVs;R+r;f1G zZ?^;I3Fd6;q-?){b4WSv(o|4-eW)}t7DpZ;OrG`ai8+XV*Eo_J&VUh$w6QAo-IF*U zrnk9&nb16UMdM5^RZ7OI$sTz%QNQueN|;@UnP>B(yImsr6_|^ zclQN1&3IDALyw?1WZ06G81pf;bvRy8yvt-SB;K5$|1Y`IMh%3cdSeg@4alT7V_l-l z`=j-sm30U2>QVPQTK|6~_^^d7XCCd6dkRyhjECyebq#`~(3mB`plBvv+&I{%$)lGX zgpa;zIB&qU^j!R^C;6^2nqhL9nkOovfZA-8atxvFRCTUUPc(y}BOli%2vx#EIwtrB z`_8!H2BOAb`F6;s5X>g36Of0bxJ;b(F#|g~dCOfu44(;#S^%?rCwqhBQ;9`Zw&0?s zR~XMNW46z%rkP0kOU|M73Uf`yLpmrb+^hIUV$OIzFUUFxloxx3mX5RBf)yS}G5rpb{kbX#JORnE3iCI1N+d3hWf`d?f)I!TA#UOl1NqJYw2J2+9&H zg3z+%_h>EPA8EyMzhdl2V(RmgIQ@8Dke6YDDY?jd zEb6S8KT;cvnoxfBC!=xNl&%KcD}8Ijcq}ZAKPERLy~^oZGNzXSf=OU~?vh|Zji{o` z0o1amNGmB;Sok28ajsW0Ye zu#xzLi>Z_-nu79-W9{2aH48knZnRg5+=P^w*ICl-htP=S4NoAf9zht(gmRB@Z0dH8 zh}yUlAZ93Ykb^4T2yi6#S>QAbV@|Dtlp>MS%}&0+ZqI zXec?mSCgZ})mYBt-VhqAvcX`sXE!JN`97w4gs=Fab8^R{Bg=ORTPz z()7WcHZFoKV<7saJ?;Ir;RMpHrNO=M9v

urCNydN4+Gxc4#)lTVbrDOlb zw{sHV{}h<-CjNt#fh{RYtn7~t10Qha-Qpf_CQ+5p0!w<#Dl#gr)P;h1%CT876i+-{!U58dq5meB9V_6VVKQI=VE}xswnIxhc%`BAU?kde+Jxf; zC28dAy;#d0jmJ*&Dqslio0m)bJ$R5 zQZ?x?#1w=L;t}NO#o&)2y0Y9?7g$|yhUfGDPR6z8bO#_+>I99)^1Ph0jV&2#laxPGfp&54*Muk*(1Z$jt67UuNIoEw6+r2u4Bw!q41 zMOMQnZt5~QGc^<#x7-b;vE11;I|e#wS5i*Gw0;h zb%j`x`hIq}k%Ztx%HX!cuQXi1F6I=O#ikp#KTd|yBHX1)B&#Np%)88MTx(`mRjKa; z2e*yM!(0;X=7`7M7YP+1%Lwu^vvh>6^P%lhKKOgFX8alVG~oCQalMPgkR^j^F;t+O zyqa2$i(E&2DF;?e%-K8m40hjdSG5E{Se=hLET}259Yk%?llFWfjN)Xi-$?jHKE#x@ zk8ArY5+t#}0@-e&?VTZ!JICQN3s1Y`#4&lX17F#vnBm*&8pd>s#lSY#_@?bT{MI9< z^UhMI=1DQ9<~6zmjN9>lQY<}4z=@C)Z7+Kp;B|g)>lpDWsE9&oGi%AX7o5eT<-j^C zkon3Ar=EGTc@!=p;V1M0MT}XsmUcwp(I*VMU|aSbG29DE*1Rg=tYM|9gyb+lL5jA*zR;X9~Yt9c+0#%y9U5A15|v^krp^=tFBT z^(7dPzn?_jF@s%fn?q_N**(AxR4e9b4_en^EQ7{0=fgZjx7IXj`X912JoMO5njz^2W2E!hSq-$ar@Wd7SJEC>VNan);toB#clP1 zqG=r|n53FYqWOS%jq1o{A3xPQ_Y;)UTpV%VxIQvY6ew^I<;h01p?Q8r!`0^8KlSy( zpLdw^a-w&DM)yYYdLaIkJyLZj*WN3CP9QUkRd}3g%Wc*!%p%3Zmi&tgOZs@B z`u2zTFR5bv*{+mOs~;A2dR4}@93t_`@@FQ zM$3q>Of4QnS9r~dU1?kLyhkDgmBnu2^;*7!g-A9VcoN>Oi&O$^UH$wl=Z6PZ$_+ll z!(mTR{nI?F*oH#_q7;}aAJ&`&eKRpphrjXfNe*XcG*T9}gT5OqJx)$dkQ!lnVqBdF z)7NNM$h87F08!F^x_`X#BE5S+w;6dB@ zk&@;GOH~!0kI20p&3<}a4*5>Ni@HZ2G!`ixw{M)`rY}@rK_AO8Zb@W<32;7WILNn` zNjhPQKztG>B&D4ucFmLtY26TsDMwdnTtp%rV);!g|A($mDFrmB@5qjEo471L22_HC z=TLu{{kfr3&LvZO+vohXtXi*lu1pR;;?cbrZ$;%8)2;-o>W)~jvD2B|W8z5|6xYuC zBKJwAIwRM>HcTq4+NS|LP)yq_T_DY!xfbwZ<<zGFq zn&0x$0>i34i1Jisj+$uS{~8!rm^h-t;MG+IST-eRGJSPOd#~UnV2ny)bRr33*}9I_ zUtl0?=S4-KM4FJ3w{<4r6uB_z2uh*{Jg!ozgVQoRcXgg6#_(Eek|mp{B~dr#lyMu- zQ_$swOYsQ}zFYfu&j3*kqU^p;Yb*C6MyJ1ZL_51(8EqfySuX2zTnDOsJ^bG-1P!0BkT|_J41s;M>rfE=K$O2fr{JyX(|0sQioC zDTVlK$JvP7Ix4dxWr~71rj6>yb-+HL%)diL zV&Q_UnbXw}2Sp(CMiRELY!;bc+?9E9^+ZDe=at62AvAeE^jd5;`vTU$8E8JQGf@wi zMgBXhns+VxFzO`aF%_L(e0qy=o|Rs>#qynoWz&S$^t4jUYN0KVS!(4`Qu?EMWalG? zi+;h{7PqFN9hFD)+q@GI&|gp#$vQVe|FP&vi1)+I5b6!h>(~N;F+EsSBl&K^#^~4l0Na=&UGj*p%Tr|+yVI{ zFLtA+p@A-rW<1Oz*2Aj}l4QNmT=&JZwDg+7~Y)#Qbj02tOc08%b^41m_}-nvikh1}`ddxJzyB`GWpAMIv!c-Q7q2emuqedoIDn zm%l)qeeX2BWJ?6sHF{|Pb}L&EoIqZd^zaIyWsAAOr`qx%nW|M0UmR~+Rz2nL=y8T9 zHkc^H33EGeW@2}QbVq3xD}QOQ>PHUd>Ks2(35kvndQ#cMR(KybsV^F0?1loNUvica zQQ@{Nfb8p>W9Fy{IMl@KYn z@Yj673)>(=XmQIc`e)6gV==izOK+XX`WFU~T@(UXv%<7SL9f(gW&ws73nqlD$7ft) zt^B$QE=rjF0$^e`MuRbOQe0K*DVE7_JJ&Vt7>~ zZY`C^lflob&Do!L=_N977g z$~8PldR`oS=5G^NeMGX?OpIZDy2YYAPZf4Jw#k;RZ1|(4=Udu-L*ALWiC^8Xi_&pg z>k~f61KE#nzM>JUEb9zgXPmn-?rX~x8FT?N`QTbubL?F38VH1?6<|bTAY&yh5rtl# zVJ3uwG>`okEu69UjX+;K3={4Wr;CKc%G%-b_;u{01%uKl#T_fP)TuE`AIZ;#eUhw4 z0W$NUWh*9=*OYwP3(I=@Kd}~sh%*v?ZoUA-@%Xk}5C-(8+PA^N_@!?Ax-W(#7fjyO zsd)a{a%SsUrcRIs#O?_4<$Pcu!bqZLSU(tDzga10@Urk{vTRnuL^P#}^9{OU-khZ( ze{9LfR}gfde|3_1{GZUpaqfr4%56#u|F#7b;l}-$EOkHDp#VPYFUp{Eogrx;GRn9E ziy51@)OXY8arB{odonD|Ti-!a{Szy=KAL*Jh2q_l?+1TjH&`UddhH%x?;| z^KthuSM`{3F^n&|s!1RC7S~93CPkkR{!pxDdkKWu5<4`|F;T8Gy$hNP z{pqWK$8;cm0Srdo$)(N2<^w7=m6SZLB2IQ-RzNVpeCqZ7(79|nG_7K#GN;yL{+xfI zts~_)Wv^?|i|=Go&>(6oSG2ygG}0)09L1Z15IZj-4U`Lb zJK|mZq;e}DrJO`zo?X}|?Vf$fLcclhJut`Yy z&e7b;K-NtgZLin-w>+|!c6#RcHgroM8pe$`^x|q&M+pFVMOnUXv%wDXahAo zKroIi94BZe?LZOPbJ-3LyM1T6yC4bB`2tEUR4U27^armEyh*4S{vGGZJ>bq!rr*{v zC3D7D+4ra$U+y%a7bKnQubaya8o5eQ=TnR)y-+Yv^es-aN*N||(jos2F&Ll9ip%r- z*3PFsrjAusPOerCq4JJhI6~s?-}%KHRyJ3JI#I8P8Sk{hBMzkxTjd^Qw7YkWHj!V}qQg?2CjCjZ^XA}6lq!;h{6&aCF|WIifW)MS#ydKV;*nZ)ttOer&X76FjA$~e z{)N+fpd4O*qJiNv-q5*&Ce!y&xUQgPw@wR@fE4m0v*uN`@wYuJz)b`2tUA2mx=QyT za>EY%C5|KWJxGxhc=M{PXu?z$9p+K0sB5)Oz(*;eeH0b)Px? zvVTelgZ(J?i+_@zNDpRRu-Cj)_5&J*8_s_ONE{8Z5DVK1HLAhR>mRX5H52VOzDFCD zY;r;3yZb>)#l`W)^xfQb!Dik?RiZU=M3kfrk<+zfL`q2o4Kq0e z8Wj^HoX7EMfD`(yjLo#h?TESJ2T17u6>)K97E>ky{_@7b@A)y&M*i z6R3*DYK9|O^v{#O?RaPo`?!wdQL$x^7Z@__*uQR#e}nK1?~D*K_EoWU7$>=W8Gc}>O2k?T6o;!X>!5KMk2lDfY^5?6pm^o6zAWCP5)+4$hC$RYq(F{E9@e6HWLD2Bt7?(ZrkAUrQ)Qv{oSU)A}|`7TAkc?mhZV+6cu@ zpsbTP%ZY&(D3$~cFv&YD%|e|UN>r?O$)29QZAKNcO0z&FJ(I1!q`C+^Y--LKI1&5F zD&oW#Pk}ksC(nc;&ZXoCwq`<@Opfz0+t2quGWsTpU-aa$Sh5R1i}#*LIX394aNm-qM1Kk^$IFFATel|S!E^UHR#2n*H$62e|a{sj%W`d>B_gKB@QiVUYZ)o`_HP~3KlP39`O=kG5>UlwkwRGG99 zFID`q$_$oJs3JlXXoe)1fyD^cO*e%rXtmsKZ^vq!_@z%)5B#mvoKi?|z)@*%nEyl$ zdE-eIp28vXwo%NeiVHZDh$UNK0um%xy4algP<5#8yMfy;jk(aUkeK?SCFb~~pkq;< z#|i=y7^&jhkHPi~kMg{Jyu|#dBa**(H-aKIhZ?45y8|mih=|vG*yp^cyl=su8lJ2O zs;DYIPFt=)5XOaqbiGu9ZBLKpxy}s|R>9)(%w1;%hxoHhni!JY88?94qySA1;6vmZ zy(&9kC$D^_hGE*KQHJYHm*sBnk+Zk}!zvsIQYezGND)P@{HMS?R11XP4WivlwLv|r zlg#w@lZn3>s6in#t=qiU#eRz440e?zc~136psvu8H8+(L(xGPM;5P7Py#>xl`Xe&iX?X?D&4MOn^sCQ)_6k@p=8 zLrG&N5s10veCBvIwjft{9SaR1U0Y|Q@~cMxjkiYf%g9tcmGql^z&?rAdwdE?JkWGa z65u{>NVxE>dMIfF^zB7nrZG5ktF{bY4A}mzQ;UNdn?+FFUE7vt;Jz!M^kz~5fZg1r z{n1vv^HD1#+Tuj1{zsz`0fr?4Hs)`tSGMbLZ&bqfyh3sW)=c>@yzws6Gk=T#+BzY=4jW&|+?Ipi_^SiW0@n~i{ zUy%>%;P6t*d+~W~i;DBK`*>M>UjNjSXX2L@qs52}%^?T$NYUo$7>!D^!=W*Q<5KEL zZJ=Ab34Oa{+$xu1WS6)j*Asd23w2+g5=V?DotE2I!C+#GB7N}9WtP6@QXWOU6{6Vv zM+ADe4D5sWhMOVZ)#OOHIq^F9ez!PmM#jr03_e%`t4%TFd!o_+rM)j8_%?cT1RClN z`f}ukKHHSA#dG+-EAYuIX{*u*F4bq91GH!7AGW;omXSIUb*j}ej?0c!*!3B;r6F2c z)N7iLf)$^C3k&7>*lUk8xG*+jBH{IB;V{(6Vx-a}?e1Sx1li>8w#7vagQ{^hX$^BE zFYE-H@|Y}+h7>Tku|TVClIy^-9+2A0S-kE8e7%loxZwH9$+5p7W}|+Pc_tav$atge z#{82cw@x=oAQA_s9zp_e36)3v`p3I$6-%|+2$Ycm!(~D=V+iyKPSVp{h(NC@Vlmy} zB$O=JmHAuQ9RZ-qk*6gUdr^r*bzuIK3kWsOW!FWWNOpbt?7MOEy)t|EGyJE)O*D8~ zsw~h;4+jf{P4o&;ywY7JFJKLi?br@WL=st3x|DBM?&s1GEbTO74ZgHRI^!T=)xH#q@fb38OZ0h^{j z_(FAK*2Vf`45NZwxgnTrcUUHn9_z-g`M)%?~dsZKXr&93W2d(MPykMiL>K?90DVGZFVDFnnO4iOk2 ziML1VmQ#B4RA@T`IY=zolVtEuLE1meHx3aN^n#sIpz*3NdUHa&#)0ua0XngrAM^Sf zw)2qN#!QQn?H<+O`76Lju>}e9Gb|n0nFTyjGstANm}@dKSsWvjkO&Hqm2X02g&K!A zCD3iCNgBT((ODQOU53%GWyhwU7o88EqPaFMZj^%&6$^w<_LSsCoFBg=98yGT6FYS_ zm{OR0s;LE58|q3@Kn z=oS}wGFW!{VLOr9t0=;wKJ&98uwOcK-E&ej@PANO)D7C9lJ_&fXm^QRjqKRL z804i{?Td4UE&WqrDWsYaj+Ws00KtFd&Z?q?m3w?zv@$gq(3_!WH+92#NPC|v@`0{X z6lLtEUBidETju`<5i*) z20$n}102as6j}+_hB&OR6PZ~e5F-xE!++C@*HH2s8`1?|vql-Z<6ui`!F=Iy@Ow}? zqZPS;_SMH*O191FsxfFRPHuypJ#kod&}fE9UsJDk`(LOPNs|X{9XcNXcxz!ssS{r0 z{J4b05W(jeTxo!LQ6D&|%ri$Q$0(V9`$k;bY`^mnDD_Jb%cVhx+Tq?0hBj8y0`hRT z>ttfFTH}-=mEAD7^L#(x^gsplsEZ()+Un)Hh%8vcj2`*D?UpR*^<0OqWuQb6dFzhn z%|uz`cm!6Durr2N=_U8Z_C@NL@Z6rRXt7H>UF@lN`z&dIe=`q>2 z<+cvZYn_l>^a+kW)Yi6M-DHxc#cM8F32hz^mXyt>B2|s^tnL?NL&DzJWznbWN^6R^ zH+jVCicpNN+C#HXRCva6tD+7U?E}~EPA2kGOhduL)U{e7f{Z}9AlUGiU5O5ahrcVR zdd8_!nD7c)X%t?NmREl--%(L4PW#XZN$%_q!&^nIglnTOvq#gXHJU}S3qCHp%%)_&8hKxX+gq@ z!}A5fAxGW_wxTiIuHb50HgqgkM=&3?j;AEDg63R1sg&Rkjr-L{qJBSBIWFgq`_+we znQJLfGv1vwHJc0_tY6)-Q!@i;lsBZhKZy3AAQ!=7^M_*;QZ-cxflZTddrgN65O(mW z{n}iy7Clohq5VoacfDnO)yPODY7TNccQ!<(KScdN(elX!^stwqP;;=+AV(tDP~dXE zoFELdhF0gp+tCXSBxlb7_(3@YAO82+xJ*1=?Gi{c9CAg0F~H1H;NB_GV%8J=+O`<3 z$w$tk$YUijF;9Qw`4MY4#F=SHGy2U=8J!*|Q;{#zeER-YKroK3AsgPNVr$;WzM5GR zj_biez0&DWp13=!HYhoVI)4;q;SkM+3K3*5oQ%eVZI=VG1s1f<-3Y$_O1Hzh=6cn* zQGi2KUFOI`5Q9@*ffu?_N*$}!3frDThvU#6g=l=)3%VEUgQetNu6AF|6a*Oxm9^^# zS7@pTSG%Z`BrBxP7NW#PXk!A=3Bm1GxTQ~bky}G9QeZe;^gQWBPSVT z(6npQ{Bq0UdsyrcSv0KE)fd zmjrbDw$^8U6(XT&XQmRR5%uMvN)k|g=KarOZGsj57^`CppH_5D2LxJUXd z;Hv(fczhiPE;=?j73#Veb39%srpl{#>mkU{zq_p9WKBGEEvKYfZq2038ZX5 zN}1V{-JU+ntypsXrV5VDJq&ccv3nn9O2&8wOG zM9|S9tn0~FQ9PCR{}w=0VW)aBlA*^)H&?GH2*ySU(v5)l$K%6ZRQQKaI z8pGvA#2*Mf_r(NrH|k}pzp|o-JO{}utZR)zSFr?cYmo=JUB2G*q&(WHd&Re@Txb)@ zr7u*xy-v*sBHMF{-Lo-abjaeW(M&Xqsq;&p2$AwDA%wg?6a{@SRt-1C) zJD~2sp}5kf7yM&sa~u4wMv0K{HK2~ImwPfB$j5guAhSX_iQPG8uWtn|UlP1uJ?fq8 zCf)G%Bbv(}z-60rZ7U66{htw|2+|+&h^9oXVT07rnZ<#0YMT$XmcjK3zu0A-MXHs$ z+v}mW8`YrQ%h++qE--Atiu@0>+GCb6?Jq%XjF-N>-)W@ftfEC~+9W%QKk1h(iPM=O z-d3$$;ID5Td4AhHJGr?0fvX3TD@i&tDQ%6_Ef5UvA?y+ndZ=oncj5W=Ha*eYf?~lb zTY^QJ*Ac-=Tu1b08QNvqNsqCRys3K~hhM$E8tjQFEtFO!ZXk3N zH&`R)PWM9VwY&6E&CM2dpT$l^+XxnDAhu7T?{T5>032`UI4|?|TXt2q7d~v2J)0$o52Afw1N&3m`3r}zkhzJp0aX@5Js}Vv-VPS42 zw>_^Gvu)LY@rlq+r0|3YLU5xD+eo7=n~ruqqVLVGNj;$uZRraOP)c?nlToTDM}RF~ z?~NifJM#H{z*obih{GwK(oVZ=GC>56i|$6S2;Fd|;1!O8K&l7F0E$Ba{4GsMVmKE$ zB6o9$hIq2^7U|uWu}pNpFI%8VvZ+}LeuW4ap4C`K-K$5+6?*Su)yC7mXH=Wwk5)%{Yj@9^uRkMZpSNdG@>SnU0_EMuHyfFMeby$qvvXOW%!Y6OUAy12MSP+w3lmtBArZ-!YXw!K!-iaSY&q0o(BsHhnZ z9;%!CZL^JU^YZLuey9$%{jxTsqtA0bkfCW6lV;0XHtcTnrb?SY5xQzR&>;VT~X-4tY+VQ&jx+35EnZgb3i7KJnk zu16S9Za=348KW8>2Y7iO>qQBo=0C5T4oWk|$C$2Jtu{vas%2`)7^&E}2v* z2=;GXxO*CK_?M^^wuYiY8+3>1>|?%m4cD5z>~M^z!v~gK@ZW8+0NOuSG5*^WR|>Ux zvnnl50bMgfd33EIEeM}{2>IFFnzfI4^I8V4$D}nx@0mgD147S1Y658cdLwnvoUSjB z1}-4AVHjuhAkJBaC!q@V{Sg&x9N{RUfVo);>8XX%BZ)IjN)a}K`jBg?Y(p3WEgc2{)~bi zJAh4ffh&Dup@&WaW*7^haA1)@3)ZVPsr?@Z?}u|EC!wn;^IY}g^xT{ushEk)8yf|r ztiecT({;hQtk$PB^NB!iEv@$Zb7aa-Z>=3R3GvV$DilIweQn^#; z3=t-g9*CZUY|#fBa7_DNS~YTuT!OK?{_>AwQp~T&HAT0S2y#?G(Ta705laq(Iy7_K zwA2YaC3SY8*d^xeF`lSx(1%<9gG46fhh8~qQLU?9wf{N-9Oy}z58tXu3pW>o-&)*o zyl}*sT$cEkw-A}Xaj+@zPF#z7KRKPN1_rNn^V-4hrZ_i6kSRLL^Jj_(+fx$`Pq8*aW_D2e94EuSxs5=#H1%i$d_m@&2hb(gM@G|xjU-AC{H0;8i?-d5hx zy4WZE0mM10Qbg4dCH$gx@8aTqc=>GiZZj9<;Po>29q?IXS_G1AoZ}f#*5Wws)M)2}?Vrqs)lE zTXNg{v9Au)azSZ^&(nnF3da%c_Dan&pXADXtvo?)gpuKxG3eD#srz=4ufH->fJ>;j z{3_~9i>H=BeL~&_jQPU)Hw{$CFCixQ?ySZ2)S)>0mkRzK-h(X%6+R&+?6*0En3(f2 zNoEUe3e`Jp$T`!)>GC9W<9z1?>FD!yMbMAzwBiUNy!@g`VMt{+u)w1ShN^US>)ixx zY-0-Eg~`0OfyfHxFlF|J)~-^>V2UfB^UBAfZZ}W#*dM_&nNpTWB(a0n5^r>EuDvK_Lr#SJ)0Br#QH<>H%}q+90;xB|XlRH%s6A_@ych zG|B#(f{8R}I(%!pA#XR6p>PL%n|l;)H|l?`O9gS+=-#Gg^%l;hUxbd$WqK{a?PzXG zpvR9$de)ciV()=#`u57JLah@&u@;%inzv9)Qpe`{{A=K>*tS~l`4EetH(Zz|i=a}x zNI7$Mc-fLAopjT@-xG*l6V^7rbEmLAkV)y($(Li_4BrZ9&i8=9CIgUaCz)*-f&Z$I z2MMtTJhhjTHzQm?jY>f76B@bzf_~u))Ab(q$#LiAg5amM#%1~g^HrE76d?q4kggGap+KlTu=SZ#ikvLbHl1ZXMg%nzYNjK+>&4k4~cEK zUnvff^pR?;!WLaC9VNi78$H(`(Yg38X(|66TxM*RwMbk*5g^W=>Y|E~*3HmXX+zHU zD-7|LhE2p+JMWp19cVsLeOw_ey}G~t@;JzRfh3wrGmUs?GRLUS{cV@w)^5``Vo?E$ z4)sO^r?%o^;2>eUGfp599N&i5)KVO1DXq4mpM*b9~eBz%3dxUTWKp*pR}HX#x--S7J>YoYc0N(T{Yh-8b20 z#p#hX!{}Y2JlUI*9vk(*HGQY|KA$^jYGwga+nwhuX5%gquiBJ4Klsvs3N5;3X2z&X zg@#{VAH8F^DhJQ%THqI>Kk;D53z|2pA+f1q9K~(9JUytCdR%S=TA)p+z~f(2oYyFo zu+N3I{7YgJoMXr^*sVK{OP2b?>#boAAM>|vEsvWRbD$Wm%Hg8wBSBpG`4)~4+Uh9h z`(~Q~D43xamF__Or!v-h^#Q)s*hG7b#gr7il8W5;c!#F3<}pFSz{b4W4vj8 zqpR7$_ruC1pgYXwFVf|`q)+GshaJ4>x|oKp?8||2&VkbeP`Ue#QwjS~E9XWktw{Bu zLQU6 zT8zoZz~57ic*<^I@RJsS&z(&Gj6^FvYLjVf7rsKT{~=&IGh39puBwvJ=(Hw>SG~D+ z>n5-!bp)%QU2ESQ%Ns*15LZ53!~Vn8=l^D9ifQ9fncuB~i(5_L<4l#Q*D(u>^Km?~6H~7eA@s~=S{3wdLT#say3?shjrI%AFae(H;DSq$vYnWO0p|fOv zFy+ljA8@*I{|gRwOYiwMKZ)!ZsnEX!0q6-*>i(@_zNZg$Q{M@$?RYf;WgI6R%)^2) zA{jth=nG6BS(C!WWb6KEKIn8EaG~B-@yd5?NW8QTQ(DjuGW{f)is^1eJLP0e@y`bc@tmogrK*e2Sp1P+S-)yUyI4ffKz6F)J$B7Cm@n*;~XFF?pTMht57wPP2x6 z1W?Z0LIF^9u4$B*is2cqmI1cv*7S^ljaxJ#5Bge-84$ZzWCa^zT~L3!9kmQlGLk|Z z<8km`NmMg+tb+mki>mO!#w;LODt;@`Kpe;om@@Fe7bOkypwHW0U`45>Xoci)?QSv$ z2bc?+owLURdRp0LcvE%yAj%?cDl`qj&kNie(fLmL&})=J>1or%T_YK*-kxd4HOly+3E}2 za+DV*RQ((zhOE>qQZ0FlL37D0cD#Si<|W78d>6wXEc}#ovgN29{MCUmE3=8qOPv%+ zIzO`pxGEbQ5+ga=aifkrApB;@N6)r`D5++W?ISzSJ8sks6O}D$|BMIGhcHGCbV%QN z8MD)wc74xYVl6#o9n9N|UFav?wuci-PReZ?bQ|>urBb&k)>z1g;raoVezTxCd7B14 z#b-4MBRFHB%mK_oq5DvvxsMDsLf3h-_B-ydtT4q1aUs=wpVPUxXg%sA8>z0;VW>fg zn^?LSWE;hm9m{m|i4yrJYWyl+{2=*)@GWmN`mB;(fqLLcT0d^O-St0vS89A!nz3*@ zp{clhKr(V};v&FY=$k)o6`iNA=>u$j0F=*KYt}q~1awKfCK$rDr8z*R7@_&lML>7N zZI=_$fwSQ=yNkbamtl^?N~_d7WSBL^h-vv%#%@+g5v|~7{@a3ZF>PE152w98yRzNUY?_^I zN8#&-G`t@Mukn2$rnd}A&tuufs-j)&uuD~pyb!ueYD#p0nn}lKWIJFkb+E41({qcwon&02YBvp<087O8y%Eb8AP@~xY?EO3*d7^m~3QR*W>;ud-?&uv##x6UYdq|Dy=nNBOqNG{u<2 zdv4~&;6SBxnkn5wE0{H}B>}1i8*@P(ME>a|!C(sHUW4{QIFGdKyS6W52C|U?=9wGG z@i0>q0_%;>;lBJ*ZqTN@M1F(XGcG(F)X;E(5!h{VZ#5x8`J-Qv@Kur2Pur1i>LzNLw=%T1nG{su?bgs0}>hQ9Z0>+UGN??%P9<~)Pzr5v598+)PsLLaa37wh^Ly1ls_x5mz z04WnC@o$1D@aG>5Gn0d(PBZxUrkw|on~<{DXOapd2bPtJX8}ARixXzkHmj08;BevA ziK9dsiO?r!$YbIdTRk(nk*A_6EJOdhl1h|+5*D5%pfbhz*Zh(fYrFmAM&Vq{nSi?S zGy%NBqQJm9d zh9m|QeX1`(Zv}LClkqvoOBT%i5XW=%Y{GaFKp@yG#1&kQ?Mu*e8JLxsA7#Bm?=J+% zm`fv3Q?k;*C)K8w?PWv=ae;nLC2L=W|3?hakA8Z|cIboYvjS{O_&+JVc+17z>kU2jwSI*u29L+_&8lm{2 zpyD*nB(f-AN`;r2KJ3A%y(4!i0J?ta6{Bxm@RgZZVDg3f&2r#M_-e<^jr5Gnu3i)> z5UneV*kV|s4V3`4$9@&%akdM06IFb}Xn~Kz*cD~4^z*Prnn?D@)}}f4^MK3U1>6sY z`dl0?hvVaQ2_tEGdEwKBou7XQ=2lm&^4u`G8@{zogwi24;L=MKk0@ybC#}jsJ z?D3j}zi#8G#<-k&c{&j_^Tl3BWlZAzXFs6ARPGMlqIj%Y zA`F_+shV_g;PzuToUrU;X3FzVOkJp|lLysU#%D}LPS;h7`iWIYsyEIN&9<>&@MNyG zP)30%u>6ga+vB{g=_&m1BHdzKI%IGP0PC65A;qCu-jI(~{9(Y5{Gc`xm2QF0kKrw#qj-(&=Dq!)U0t$QDSGPfdjDv}#_OD1 z7U_r}85X~y{p7!-040CB-N9YW9n9+z2M`dKt^UG&ZI&deQN#!-R#s?5FUyKgG{{6EOU2pc|shts<;!R5-ZPY@#V1E(^M~%>T#a?`7tjssv z{Uqa;U{6;u?9o0H;>NB1IP|lcnAcayZjgW*7S)~tV7 zgH5F=Mo&Jyzb?jjfRy$Ht6vjvl^s~6OGl#@2`?CaCPC&9l{=N>C9_b*MV$>gWQ;g= zd859F(ke&`%M`Cq7_bdn+@pZ!#k#E+Ib*{UeE2!7#^!&axc%#cyIBEj%L<@)5$V5^ zq|1Ux{3-RVTGoQFiDqs9*g%FJ3jwH-peO%Nle|)!XG_d$Fw`*$2gxdv{juVn!M%wC zB#r3w&BS}uhp!`-$df~wUq}wlSdn+@&VK!WxIl)D*sbXNjzOL&{pb&rv=4Z87F3o; zj_&W38n%{QeC!ONs4bE;@xiLhC4F{7XVlcDTDKI5Oa02XHdZInmm67j^{D=i{_K$a zRjElhAC`i>a=nMAPrqHSF8>B)9z!D2#gX>vj=4DWXB{4Bh$)O`zBYnsLI( z$DK0Hk7^oLcG#T}>M>$GPKB@j0?%_p^$_&VfA06pRQGO3P{H*Sfwu8}X^&68nTg3; z=afItddDmdK^B74J5DpU$|;;4l6{m{*QAt;CXW8OLm#d38v`>YvKfmtFIPdDh=6ev z*WkuF{<`w)6SkJLm?A+2m*kIVy|YX|_Nl5&nLkF*;j7r}u-Qw~FULEP8EwnykNT_N zG-694i?Bzg+OGGkB+h~;!3^@EUS91-#JG`x7h<#aYV=T4&STUUz>YfH(Hz^%kvS}b ziT8-IAeZ^y=ZF+;BOE=#bZbdwVty%H^Toe#wK^lRlYMXK7-ilDdKT6$gr_c*-7&(b zrq%t2Kwp_m=q(PZ1VUM$dRVqW21EM+M!9%I%{@2`JyS4zHb7}ic{W~$N@sTYmrCoZ zRlibWsH{QtFk1_hvjD`HJDJsjGMOo|-xVy>aO7bzuGa9Aq(|{^h1VV)jN@ z&Zz?sjh70FhbSeW$>O!F>tu=CMsi11MqH4YP}XPM1-CE3hMMyH9S5DrG@;0wYU!f- zC(lM(O>C|h55t)!xfF%o^Ta>^Uc3ttrfw}invl>q4HEmh*>x$x1zDa0DPmt{{?f@6 zwG@mto1_8rVy*Zl%HMe$0dADhGss%1$q3)9EMr7$cr3j8xG>Z5UUgijnp(pA*u!o( zZWxTrlbwyIOIDNS_hqK^NA0oOdrWEEh9xk+kXOS9BN#BQDBj>Y1LKET2{Mp)RiwnE zfiaWBxy)h$UWZ@!neQ``PA=7S$CaZidqT)O@N{xc76d`rG_bn+$$iX-=tVaS9s`n z?I8Eh!O-+YwW+-@$_ZP!3%A_)W3nfVVu5mO8(KA4tzOM^o@RV-f~~ z38hN}nT*A#P?CfyH~`+dC$FAzGtS?Am|8C72tx7t_43x`_wJc(f@BW$w#cO)-ck=A z0ncP_1yz7l>1gx$kP>g(jO&52uHk-+q!N#Qix>L=GTaZl{|6~;HNm3h)z#l$z121J zy3gGrido>6c3LjbJpGL9eqSF&7!&W23d3{3dS5P#S-Zt;S7;TryQ7zid6&z^t7xeG^U%eiJk8d>!$QsIp&KngbT3pDy zmAUcbYCop{N5B)hQiQ^7(^3J6GvsuB2t_O}-p8KUg|lI-gM7PMNo^UBcWq1^&Q?%>RsE_DuU-;6Av)Am(c%T`3- z0oy63Y|XRv3=FQ(H$vBUGFsp_9BczttCNO*FZGVz~I-1aglEmV6i=inMocv8u9X#Y`&#7j>0bl@KbeVvC&w^Un5v^edqI=O`(|D>aJnYHgs6b-PThNLU1<(Pp?m zh6$uL5cKARTbDf?gV6+_jqu<*4~)3vF^i?zeYl(5Q$tibYo1t@k2`Q?0!~GQGYxp_ z-{9d%nEcB+YNpdCHQD3?<3Or2?&Okjf!0yDs=X!fgc+~F6ASN~T9B188{fTfN*C-F zx0(gwL=~>kJDti;h2pvABoD5d`}lbgLLD+#sCT0nfA8;tEglaUu;C&2r^FC z>W#A~7ZoKtvZl<3)Rs7@!F#W9D&gM&89kfCgHy>m(gcvz#Kwo3(VTrg!xFA$Gho8p zh%v=2V-^jR;i&S|UQg~R)xLBt24w-d0ib0A>~a^6!=LX&;k4je*9&{Kyolc%KyRWJpFdl)e-2;fhExj1qLac~jxi^+7-toq zYWFiJ=RoeIn6}7cRgs+}=x$9kQnqN2*_LbtB;vHO3$Nn3FVW5kAZ9bE zVxD@tMc?0TBgo|D&na`RiS{k#(1t%CdU@%xkZi*dR7Pe3_b;DdGzqZ0%QDmg_kt@_ zqLYG@4OW*OuMcRf0Wmlv!s)>TVpT#0JN-iw$$4TC@ubRtr39M;J?%7flCA-C*5YCA7m3$hV z@z|+`f%{$U#npyCmZi)@N(WTa{f6Bg`3`wi={?VaBR$pr>|>7;q3_5fzkwq@D>Ay= z=4%HYQHk}oTaDsjjViGYz$*0l)a(lbCrWn#c1!`ybM0-rJbErF^k87S$+FR%sGO8@ z6u!{c)DixIsQ+`i2mpxuVM?C+wYuc_3QA!a-zp-8b)JfuHq{XGw**l5q5{TdR#r1( z9-RqMxxbyZX_=nPuBjt1yM>1R4FR{ke=ufK;HPgAm7kbdb}_ILnE5ksJ}U>a-9Vsn zGlFM-Piu_lK>RNOohfn^L&Gb}hsVP#620?6Q<1o=(5x7#fmw{1s&H4Fa0Q+Z_9q4G zt&iJKA^fD$SGBgi$-x@CCVsiIGHCC%71B4l%_KtfagPRr$O?DOPz%OR#@oN}p826(`p zVd_&B5m;++sM3gz9j@o0*Np?4e-m|?eiB#9WE+u{<7e;}xVS64mqs-qp6hou zBu(CMgVTV^X)ua%o_n&@SnB$I+188>5A$So$an89TIzQTa?t+nUmOge|#xMAe?%O}YReL&m5x}rc36)_Dt zD&G1^2yqL$`C~zq1306~bm5!`Xb2(sx2|6s8D>n#_Nw)MKVDd3+W*Y4n3l;55;CV9 zxddoGa{|{WuBSTXCpL1Wmp%O(;JzpNN9ihBXin1?^ZO_tJg`kC%c<}lR{+G0$-=%IN zdTpL%FEO&r>>U!b&ePT5aXiLMim^|ffv7SaeAd!({>@5n){r)NNzv{5b^2?RbC$HL z5fXaQD-(_6mCol&bl`XTHq;LZEO>2Vz@`-7TzY*aak6h(9nV(|$j6K9}>{W`=_M35nLZU;zduk>?FE4_BJHHE0VBJOE+5bdLgjS|vqN;ZGrIEJ#T&?tZ}; zHc*~6vq&6gZ=8~;vBKC?&z5>`;oKeqO@nX6I~@8)%5aBy9=#4CISe6a(tnf<1IUl` zcP`zvLUvSGFxVc^78~xKms>gfvIvdFwU93YXFXUnB{QuyW&1=x&?$RM&6kCPtP7qd zB&Xm9iFT1qj@CriW*OM@9t)8c-o%%0@tVA0%*Zrf)f{mS!rVC1V!(z_oStUPP4NUy zf(@P+^C`5B^^XkymO1H)sDh87InF_QV=x(UI?P$6ufC38wFtoC70U%Ija57Uv-L;l z#tvFg_58UQGLb?&K&ETL-_+0RX0vx4umfQF4 zUa`!`jAj0t)g_d|u9iU2*^>%$L!MrD>@eQ7E62v&JHacNoeM7#PW`la#~KvR&q@7h z|N1bqS}x!g+we?WC9yQI)D>~CjM@1067d0u%$R$V<2cB-iPxz~IHi^wv6|g1mFzx! z^=@+CUJa~Dz%?OudCyHr7i+&ihrQVd@}GTqku$__CbxKFg``=GMEzkc4l3<$6hUv( z@Z~eRi@;l*NSxqT#kq~b{oob11D#PzV^PgC_#t6{Uo+4={e32tH3W!x;%Dj`&AgJj z5sI`>IV_eZqa!ga{IQthi`FC)rYt$^|yJq2CzZqLK_{J z4F(AO;5YX>k(feOyq|yoq;b2^{WLigyA?}gnyTg-xQY~y&&L5}mA4n3c>dS3IS-py z%=_Ocj4VU2rIhq?I(`QWPm|DO2mfVF#nHGFj|Nk7#m!$PMX2Tsmr2>vj^}RpJ`)dO=(L)EQOb4wuLSy)9ySm;tqYx-X~kQ^JK|FaaV3uNH7Vku$y6DomCHn5fC8|NfD5fxvCmgQ_AC+A0fI|>*LFC+Z;%mF! z5QZVkFfUFI|_Nf$=@pRn#@M^$CGBdM|}d zj}RCq(I!ONBqu{MW}Voic3)>3;q!_$KzuDxM~9~UfGzPYTb$5$Q!sCKIHqfYbjFlG zmo7B3Byrp+kZ-&t6!ubER7BOKA<(+IDC2;dyI*F$u;5b2fh+9~x)(5hSD6MUcEz*O zi{W3OwX52R^MJO$z)=p3vHv96x1Okb3S$A|I}SoD=$=!+&B0BEv46;=dx5SbHJ_Zg zseV1j%Rq~nH=Uy0atm}pgJDX7V2EGXzHj62XtBj5zsceJv#6XJ16rXoU3^izfpqF- zY8CTgI=u{A!sTrs-vdd}6$C)SZ_JnOM2^+U5Z7P8&{_?ZQ;=yfczB{p;Id6y)t?=S zHm*!`ux{e&O0?#oZn|rjJxGqV5}7}$_U>M`Q$sYZYJ4vFy@-kZ2EoRL3@F;aJ;#4b zb;W;SvxcD&jvl*Q6J+Nz(<$h%Ag_7R)rB7we*RTEeQ^OPJv;d0nq|4-#VV3D-5j8G zy~hT@I%(*Y8`ONXHUx<@cgH{>JC3gC`7o?7WUSS5f<_Rkz)dL(JS!)GI22_Ny@I28 zCR{89z{F;W5HkqX+JWN4J6>qb@&X0QK|ODNt=3k8kF5K^{a9UBGroW=g&lW=C{48%z6YoBL-TDPhaQ%FzN6B#KqlYDT7!`rI#2v8vWvm%B zPO=NSzIO=TI=ffF^eO?<6}|*w@;&XjhfY-x4yvO3xlnid>Y-0|kVQAj*ytS+%fDw5 zcuf$Zjl8a(8#Q!W?$<7WlpV$9U~j`b(;;8&1_fybe2&xywtt+glRD}1$f zF)eBoe&ZRK#)E5nH~wn%|BFt)!4oeynL7mpy=moK{#oX&RZGm}2+m6VW2|sZH?$bs z0XQbQCi4u3{u1w$)#XlI(lLv_k4A|h4CyRL647b5M4q$a)uJ9Y@t zFiI(k^{KcUM`^-H8F>y%>8-WvF;2;cA1X?Ak|y4N_6+woNVvf<(_0!z%f84Yae*yQ z7zcn5p$PUG`>ut7gT2E4QMzyhBudZxA>y4*(qFfh-&1pbH!%D-1QRk*tQ};=yUS^k ziIZf}#``4?#OscFU`;X;uOuU_swrQ$R3-#~^+q`3b}hEeT#6Oyh?jOGOXZ zmhkXEkNGRa-cabFbq>$9X%XYc!A_mQ8K$u-1)Nr6#?ZqeB(U2`ox)>$AWEcHQ`|Ou zRCWKPlQqA_MR6i>x;sChK>Z6A`6Ep?)YFu!fZdV;pn+O8H+S2+U{xU*?uaPkT#*>0 zOS)m!oxK)7#&5v0BvP>kVTB@wkqgr3=MjgZV3nAuTV_(hdX+^*+`i}LT@_z|e-tHC z`m5=z4dnM48Tl|t4WJS;1I!C|-0sy0)qOe3ZxZ^>1-U|F!Y){?;cMK-2T73GCx1aC zS+0y!$fral_dLIgzBq?Qz%C3C z7j)~Exm^JK{SN7*iwy?_3Veumq|($xn2^uKSUwk7R?;_bxxE*{sVOp`Csxj$T=#iJ zZa?IG(J#mFMBM|^Tg?BLZ3)!Xl>M*sI**dHf1bhf_2$PTe%hGXa$S?YHh{p6X{AFM(AJgfcoUlPp+UNd#B6wGLi zKWaoY*FnY!kjjwt)jI>TK_OH<=PBTmWL}FAVt6oiw|nnIg(JFhHG~9Z_-G*;)W)D^ z;Q2Y^Uw%H*6z|$M*EB;O`oFqO!!+S_e7}GwiZ=1dbOaCimFa>WG~yGw8wz6d!x zo93vBGTlXelm=QN7nu$cM|jxf^awi1)^;hCK^`!;-oyfaz`fMJwezAv3Er4GH{l|yF!>hnGxgUz@T7qTn6ac$i1&-6tf1VE9M+-VU9REl3C^`U2#Y;bas>J{-b0 zwr7@&i{3^`xE~j!X@N^d0o=T21~|Wyj&v|x;$W?rquXL(E;sp1r8)fR<7+-9=>9|! zEGQd#eMbYAFd3F|Y^*NbGK@@0rnQEzWfaWyjwGUD;jIzl!0UahdfW`rPr0K!N{5rH zTWL4`E2Q1shQWFme!%=6b>XD{oJB#$mrk^cYT{GI5;2VsZdkxBm$j|%QY_C2tE8f6 zDxWVnETwxu*puG0Q^-+Iy29swSm2yJx!DY1R_4g~nBoLIXx!S~tE+Z#Myt)umbVdrIrI!>h;QKlAqTEZQ~=e54h;&jiRq-ifGB&_fA2PxFk z0?>fTk?t`%OXuL;=FeV4aeiV#x)6_InD}+j75#HgI|Utq`fu$*y|?L-l;gB!$H(e! zfRky0u(dl^LBW0=g(cxrPdG^X`Uoj>GjIgycwHnn`yS`GYY3B=vk$ylyci99_nEQ@ zDHPf`WF>RxobPKgf=esNf1BoK5#*|!Rvs`LuG?2@Ri=NlTjjI~WbLLM^9EkIIo9-D zU8?gsIBkQv#~hzeJjcXPFc;d8*9?(P=yn~u#&z2jPsx`3`8I1qj;jQ|>y^PE?;Q>P ztklR@&57vmQd2oL5HK6lAR)3t_$e9^n8&P8ekD%r+(VNdPDwbro}tX@AuY__LVw7g zH$3cQkq7THDD6BMfic zf-#myhaX;p;>JUkDwocB#?UEnqaA^FLj=N8br#ySZ~hgr1#4-z)X~Olf?n#qxg9p0 zK_!VOcVk&7Co57JO}yM)>_-#T#8rmAQD+C&m-zl=UGU>>Is1;(Nk47&T@zAG&oQYa zTT4SrJ))FxSp8XM%tH(qg&rqvIMlqImSI#1q0$7X571#QDJhN3Dv?Adc8C(Rp0l;bDxReqv$+BzF?CgwQE?4#GZ6cFuYT|3EC8{< zU4!0hsUm30J2~26%=-wR7I3WDI*4V|BJPNoBx4T{$zf-^OT5JV9=o-ht8a%l! z|K4jCIuMDKvE5QE2O*j1ZxMYNwNepP#ScFG-;#IbkkkZE{M)BW|M;-OOEaq)x=j(C}&Igwc2=R8~9nEg-h7%A8{1;^$aOH_?LaI zA3zZ(-Ev~%J?*cA@ae?{$~2S{^&|R49~o7LQKV7wT!k{gB3MAlIOaEGr^dqNkAwUy zfy@v9YS=JmiJ&uO9octpJSt7B-S2vXFgn5a;uV`%)&dg5u@ZG>%azjZQ&^yq422 z4K&7Jj%A8j2}y+*z1WTj z1q8Q){x%o`H-#;O#SwG~x;6R!W=Xtj!DJbnNxV;vea_AIA09ebZgUHDJCbkt3ko%; z_pzhxHH(UYz2@cy!501l>P|!mAw4n9O26sb4r8}+*R}b9F@D3mor62;`T^X*59(p5 zw?D8vqzNNC`99=)G5{?=(!ZksKm*pet%}-~ z&e?7$4B1muY{Rq`@Yr%RnlK~- z#ozzw1y%bwazesQ#NAI&>8|OqZ^6)M(($3bf>u-T$L^9K+GM7 zvI#r+WQ9HX(jc}wXU1QQkT|ZcsMzbqiDUY9#A|}n<1OJ6sJu82d=5Wf0(6kF<84Dq z&|U9tAZb2)aK+Mobz=z1qN)Tj^Iea<%F|_`eh$jhvMjp zQPyreAXj4o#HwQ)(wCT;*pluItL1(D<<^6XNxbr>t0czJ=9VhYs9iOFnoNIxB;eXM}&gYMG^+-H1rZT-UGBSQt z2RtgD4Lu!vIfM$U&`6cuwMYvm--DhFU8mxoin z2lPqkuUSlHes60}nHY$Dd)!r%Otvaz?T^finwVHCFcJMs)sQsrp z5|D&GH}q})#dTv6z|>cDc9g)9#UeHfe0(yM7d_<05$a^sn6xtRwbVrhLZQ?O(AkKf zv0J#=gcQ??C~mUfkTMg+AfwS^Q=1EsW45>YKhtaO*z7h7s8^lzX6Juue#2K=iB5$8 zHe(l$%H+@*mW`O*mXL`uk>7b^4%ey8BR{SluE>3cCn*)c_Ac z9|0`C{#xtp3NDuX@t*RzqZ63r4rrNzc5b#BWFfv&=-eUJB!{oh0aq$|T&gDIrD0>I zN$6dwd=j)PjJJHXi5*u*ymqB_ZKDM@Y2Xx4r7uZb-|HC+uMatid!?qAN-aqEtu0Y* z!nFm<+O3Fb5l4gP@Ve_P$^SGK=TZz)KQ(!UE;^P;B$!c3vfU-(x%w{x#why7o5&{M zL@#Qr6unpYrnXdY%gJ8vH+3RWo}wLVZ9kIv3TPVFxzH%i;Rj}90lGtjIh;=K-kUVG zmejfGk|KB%(B(l?+Gw&Zemo0k+E}}e6`ku)2M#)nWT5{BBE)5!ivaZ_a$-lm3Eu9m z5#0|DNj!LapaKmjfyrCeBl@g^6^h=L=U*cmYR=YEcL~Bo)*-oOie1$Dpjm!y8cX&& zs4_EuK*U~HuX9nyygbi|%eEk9?y!YA`v@w&WiAY^zsFH?FQk(jsrYSV>HfdtGNN*i zT*CL0r>?|qC@u%S^bDzXN;BHb?FmPZ$B{y?vzIGO#r*=xYuBmqFvIWOA(}jgIGy*2 z9M-j>|8!znN?T+!jO>L_lD8C#j<)&tS-vf?Su<=`ZFLk3Mpiv_XsHiSmLl|BHlVeW zSS01FdO)4RQ91zLix;Fqrnx+Ql;4pM;zWuVIndC3r4K+$YQUqb1mkVP^(HR0d!?@i z0CTzfy~FNKoZ6&Nn@k-zqwk31PyHzppv$pKHLic4UlnbytVO6S#I#g{rmFKThyZjb_B z0m@}FP)?9IG*O?zUzD%R_mlj^jFBQbse(N;5j06rP#X#8!`CB-`d5(ba3MD@Ig{bhX{ z>X2gVB+FyK@_8jbzV0f|tWVyUXD5vcvTRHf>9X_(R#EooM{5jLiOhHX(TNWX-c06R z^dl;t1C4Sj^a~z9EW%mfMIl9+q0TER83Dk(AT5AQ|3L!>9-8z@6C~!|C%7aMI+Uuc znfvzSVI&MsFYJvP|Kx*4fw!_)b}r*Lhixki+S1i+IYJUxFviPsTNH7&td5P@%7M4eTNF+N_Pqzbyno$Pi%ITwIdp~pZRdHtJiOR+cZ?3LSP4F7q{F~7bz43O z_71B6ZQFcu=QW6u^Vl)4kDu83H9d8ki%okcZ8hx6RLS@{_&3NHgfv>#2b`P!p3<}p zt5s33*}#5Oy4L0~k4E0HULjl!7?8ekeXzHs=p&OyGo8BJ(F)XI36<8O-o@&?L*7AF z96wo&O7sLd#^K2nRAmQ5fssU|9lK<)z!|XYTxzKE_^XbxGcXWh=SQZu-v zWl;F#qbx3*zGM*E!&xJC1YNg2IgC?wdVmRdDAR>k6{~}zOG)Ddo!V=!SIY7Cp{}ne zWy{^4ln8spmO2<63#W<2_MKQ>%BzVhdkCsy$9mODXM8-;B}m9l6x`k(biF5#SN<`4 zA*lshjkuU76`oWFg2-!x`+&<+;&%MO@J9szh-=n#(>7QLo3Q-X`_69gM=I@gwr+X6 za4z{V)B4FNK{XplTL`uA7;MZ_p=~RXW&^~{U*GXx=`1BcL1~I4NtT+*ArxPOZ*dnqY$7lRl*{#KR~ahzc76RE?SPfT?_kkE_}HMbQ)w3 z(_9MVMB`6%Bf+vt*rn!hvQf?0nqmA@N(VG$*dZ};vD$J`7F9cCc>ME)fc^I0szCeP z6}KB%v^$kj#;Y#`^Q+@9j?HmC(Sy}7Eh-6!T=H+;4IK4G&-zyEQMD&TE#jeF_a8}I z4!45q5t{+G$#!=+Enj&{&sje?-(NdX7RwR1az|>FhqsmmMsCXc80VL-jNSE-a#mD> zDzPy<&r+{YX(UAN2$2HRm|pLiHklMacm;E_lQL6xabbPA$0g)t7fC8QuZdivza|+w zUv|kFph$tFX(5(VIQUq${Qfw%Huy23`tyi2jk^sKeEGYiTg1@IX&pzo8l1rY(cm>eDsXF#FCy8>H9gnN6bmg0N<%}e~oHx^|nRA*qe8?&(*qOy42045MfKJJaqD(nmF8@)bHd?vT z(w$s@2J*NWmog!|1Sb*=P~kpZ@DiX+du*~%VT`QYX1CB}W_Gby0N~6gNeq=R7h&xr z>m3Z6`ZoDLs}QI-q#%$<5j*uGUzJUPU0ox(8Fw|NMVL>fGegY#hFC3^&ud{GzWz9E za^P1k`afd`Zr4wzR=wIW`h>kA^QV{3`W|-|*{!_Wce4&SrlSG%7gAj<=VJ6LXBa+! zoLqoWq8<7?TVUr_qB40fm~P1GmyQ(c?5a%dR`1NDs?A+-*GadE*Nx9(?fK7VW?Vof zY8A2YdORsO`OYHPcs3By_;^avGazw_u8=G0&x7j0qyY?N4AtilUDd?~Rmujkx{+^r z#-_I5H_%p;cTlAa@d5wi7$V%O6u)jF_Y=ypoWQ`MV#aM@;VuSSm|2PrZUIY^nCk`` zpmUbxC&u02|F#P((sV_GC1pUCJJ4-F4J6ie8h|kMjtWGD_M@R#Ni5d}Ka*@=_fvMP zfhe`Xm&$9dqofK~jELMFrRpH2sBMvk=fjiC;7cqyT^UsW@en^$M^&GOuBR0{bJrk# zl!>~2Z&fx#dd5_WNII>L&aCcCl1qp2*WtNgKHMv0M6{lP;z`|8Xs(aTQ@T@h3PV{z zE8*QxaEKM#xTwci-%ootzE5+~e7ytz%gjEXe4Q&m5QHPr6orFbev9Hf7&ovQJ5kNp2uHWMKtk?A z^uu9|Fgb|GO)@&eKxq`vT;-v9cGa!Nbua%5HLh}d>Wg#upUq=ZGMc%<66u)joN4f2 zMX;qw+K^PHUYXPz!ixaHt3#=&tAZ#_;-U8*d>~Go9Wo6AIi(GI)g{j?U<}d)j=2CB z2mg5}j4xdOWGpi#_sBpQrHW!R9{YbJi8Ddhbt?b;dM;(7dKoj&+&^#`w&gFT=Qx#1Mppg6ULv`qQ9!XRWSPExBz zcI$ABQ|ap*$nvsL_g2ZZq!G`ICEKmy3JIXQhsE&;c3)L{pVv&cV8NFv zWrsBwdcVF7PxhCh7x0_PhN;%B8We|5(Hrj9f8;WoCf^FU2}tDy^4U|p)i5(%?K#|r+JR+<^3V@P8Y77us`OTV3AglJb<>rt z^SPK$ijP42&@mM1@swokhVHcA8dkMC!{t~rDumn)+cHV_3aHxdol78 zS*W$+s&J>Z07@hc3-3>$a<|q@iLaEU--q-)*P%FBoZ;*1m8r^Gmj0cu@j4pdjnHo6 zG-Hw}E$y>Wt8Nxb^c&vy+I)rq6ol8Kz%~R$BaOme5InY*HMtZDc7t*@{hOLY=8v20 zsvQ%{!IoYY;~ZQ>0j7uinESzGhVS#$kdiTK#nJ)Z9(vbvQ3uH~sUv1>ee;&pzL1CQ z_rQB)rHmPIoB{cr2IlSnGEbtD9k_OqAdkt04)!fnWot=Vb>uyL z7o|Lj!|Qf}QaqH;uMuL?04k~*`6+y%56`JV2-{2K@d)on@y!gre#LzWYxV#2;}-#Y z^+mkTy>x7XI$kwE>?Tcq^bjG>6!fo&f2aQ5_XhurfVU}IF_Rii(`KR)sg`F0T4eAD z;Nu(6FEls7Ke^if>9l15xIhR7iyccLS(=oDJ3Qw&JU)!_AsHGg+Q_lEeD?7E8 z10oy8VW;zp%W)-kepfY>fEl4mV}?cK3MDkqEbgNUvR9X|^erY{zRUAHNO@C-K6)V6 zEc0l(@SH~5;%7qo!63XweMMC>BxKUV9F6d41AsMFaUMpKt}&7WFf(wc09ZRf-_Y_m zS2&il(!Ts4>iBH(erfmJNA_d{(NA^T4q~VYP&x`thdHLCV z)>X9`NCI-$P@1Ba5t#R+lxD;ldTsTGh3GK7>D3C~npKiY3f0C);cJMS;9*5y59y>3|ogQPQ388*d zA)=^D$&V^ar?L2F7W>JF7A?4a@#UUWxTEbfym+weLLD|Wfg z;DGRt%Wjt1+Zo@v>Whj5__g6v9#Fxy*3GW!dAkGvPbH?QGUBj>*#O?CfKfY7vh^ar zm*MIfMlj#Y1$&$zbIsMq>J~{5k!-r5$fXRo?hPr}mfm=0+psYfzBY8_Tu()0_>*)~ zozMSY^GvdM_H&GHqkH7zV}A5L5bBC-hivt-1s9szBg<=9GI1GAa`^N*_Nn-bMG9Bri*BzYjP5dusOMp1l*ThScj*$E zf@_`5W{V3-24#7KcQ)GaAF7Y_V9H!sPTXpZ4@_`6qh-#wl^I4M#Z~2O$V;l0iMdg# zp~DYJBd4pSS&6TrL1^;BwV_&e8o*7vZ^sRqJwzE;2P zS#~(u%9dch@(-p)i|p8M6_O20IFlf6zH2Jb&?hi+GLPB%Wi`fv5G&MO#&3M;;rdZR z3SpL6F3QCXbq8(5h0liY_ffveCT0XaiN^NKZ0@7s8euU*fyL8;}B{#hcoepy&* zOdUvjx{bFy9Z)kj1i0Lre6~e(dZ!sxoagbtGR^9NuiHCDCh%Vuz@$X2V&Ut1Rov<1 zW4iK~D%U-n8YX`Mh>E=O5~+z5&(Vgy5SneL^~uq-)3|&+MEUS!rMl;W3&$Q&(3$?j zYDT9@L%dWVpP7(9-Xhb701SQU!Iz(j9?UEWve3n!NPB;)EfaA?n4e;U4{m7H&+36EWNVmxRQs<} z#@D=qHDgGiZNahW-UEJ#9sr?5NWeLZkb>1X2`MY^7yv74-`^W*duQJumVW)J5&!Rk z40|n|G+cgQ-sHQN1e1*lf(1#Jl(j9b+>602!8aueB#;*NKW8&@%-uUd1ufTP4Lr{A zPZ%|p*K8G#F){KC-TNvxGh-%L-O0BOpL!*U0 z%%HpU_{z83i6e+@?-2J~IuQp$uMHUV)erwbAcCEwy@1o`IIVC1Y)A&4)$dG#v zL+&XIE)SHO>7znqByi`}@jh$oExa0Zepr#_*cH~3ijBXA!$}fB24G=i46bNBt`~0W zFd#<{z(7RYAOK^&7G<}rDLgTymL0Pt6_pU{V49SL>`FZ(Fz21dyt;zaf{Gvts(co5 zW#sphzeTKnGxhAj1z6}pkJRVyeoOcl3ny;zH@GGtptYX8VR>nU!e3-0LwN^JZjNDi z+Io%o8qN03xlmjN#w!aIj;95t)}$jvVcgjhSB^*m7wK!ufQAwQR%A{u%duWl9DmQq z@TSzi7 zFNdQcZ!Pi4Bnoylb8ab_>lCcjS?y-9|F%GCm2+(QRKQCcQC@P~m+||xnwYSHczL2# z2-y%CuCkPf8tAL-xT2`_-~cQz$6SfhpRbv2mE;eOK*t-|&!A!nBdW^l)! z=mtI1{=y|i?rCiuwt8lS93r_AL+3@^-i5&Fhh61&j(YXUIlUBoh$gYo zezLf@x`k0M&z}JhO$SK{MH>XlK4%{QUOo!YaHGN4Hk;3_e)WHWgkk|B?2oWgrUKEy zJYS5s#kFuIy10-WCZU&Gt>rC#so%s|@e=yKyLvCmZ!LzZ4_%=KKcg8l4W8kP7bw7@ zKu;LN-oN^!M0ob%dE+OFbgH-`GolL_F8MX(RL0NHNS|yb!aVGkIC-=uUd6Dp0MEwA zC5(fz9(Qyb)dDAQ&X3Awr0-`+5ZN9ImrX;iu-KFMxYF|*$?s@@Nxg8JGwH4T>aSR- zLEm2zMgB}1L#_SqeZrdIJOqDg;I_*ro?QSQsDR(D6O%XX9d-z=#DtfoIvG1R^HSsw zhOt6Vpj-Hsf-#3%IlxU$j^5aLJ}{o( z;K$TWiafe10S7Xl^; zq&ic`+ineMI-X+X*^q z*y}V*VKk$dVH|7j`e1yReRLO;h?EEZbyG(@lo%#{g4i(3SCtTJwfyKFK=mYhTn={Q z#T241=G*Uscc&*~{S@&X{!pp8x;9bBZeTHKYh2&2n*`O(2`doPbRG(^UfCz&+p_tp z(>Xasz{&ioXyfB1OK0*-F`CD!h3-vgp=UcgBrCY95?Zun`{P_HRIbis%cz<2spsNRY>nL@uo?2-G?vS)&@fIT=EsR*|c9QB%f z4D|6H+{#Uh5#c*bo$+0)^@5{PJN;}2qQg3A-eByDKA_m_&9~Zf; z0r|4nR(=zb^Tba;;vrFenR4j*P%Kx3JD=xNhUC#c;WEK99=7qD`dr`k%Iz}?E$9wH z7+_+t?*9%ZfSR-v*6<9X*mOVE#(Vz-cPAvKP^ZPWhqL#K2c61?x5Wk%KS3kledt(J zF@w?>>412wjnH#_+5yDIM`O)mGoy8dTV2v3@plrG5RGI}gP_UJHg#64F1K_D2{W{! zhHBocDeY9|ZqujaztsN3FP~;)Wk$>S{X^M5vgp#48jOh7$|G*0y*e&k5~>%HlxDSxjcRA+R0N~8sL?L3;reW$=|98{#X53|sInQ2@*8yk+&sYB|y$Pc?q(QTj>^t!hY2l4NEmQIN+xM<6z zHLI1mF(DOC3sXg{-Az^%u)h03(m>m5J9bY1I@>VI=iN#S0?0sm;)SD|01OL#o_dEY z>acg2Sq0x@6lxE~+xFD)B{~y`_G3#%ZQK<_XL6DPq%WhOSdl-12%hg{Ow@;VsqyB2 z9^te%iY=p$tS=*SC-VFp(jF($Z zBvjTJGJV>ygfq?|t#i=LPX0(WCI-V%>a;>>?y}Ajz3B*75twENx!vw^(T}PI4pOPt zJ^4hyT6VgW!gBjFX#NI8)Ogqx2} zIEe7?E7P36pgso7>dr;ImnFQQ3X{y%$D!Lu>Ny!cn<^c48<@ze;J4uwDtT;HK!%xj9OWUIRj#$GX0K*y`{%VG^}*%jeN)oZ1lk z-TJXIC;#^NB5PS0E$kx|Z%3ulyos!$uEp?pRERzJSr{^90WAZ0WndDx&1hISyzZyo zhw7k25PQ*Dx@QxFC1QIz76uCHHpa!Y`h`}$H0RrlHRsHdzC5t6E~EatJiQfJdUz$e zK3$FX3}c0d5j61S4vM`eD^Ka@0@{isj0Tu_h;k@@2HFD@7B~9!w{Ug(Lr*x^!B%#F zSbLU*2MmIl?^R`1;D1t<){c(90($HK^|mIvWJ-#Gh8!E*iZ8&rQoxhRz`#@C2l<_j zLm$h3wzs1LkCKC(0lkq2Nn>F+5f41{-Q7cy25nc}I=v8?XJEbK>T!y&5eo&du#gRDL)qVHc^ zE}174oJ|DV>l3sq${{P_Vvng}65yb$ew)C&laFpIaFieo9;lF>0CRLTfhQ5)SsoIj zBD*0SsAmF6Dvn0`C$MJ*`mxZ2q)7+lUhmBbRa!iAbGmCR)QBz*LX>|dq351coP3Pk zJ?48*V$bYSUWS;n9ghBg66%!!nc@hiSI()RI~WbU&XS;AG-71Hb-idIs@t=snF=qR;MEkk}CsH@>#Y;!X%x`y>VsiI^x_~XK zz)x6wBz)+#2lj7qX3!S7@LdI{UK{0nE6G>FE@WiIQMEnDW+W2uKaCk~hHyQX6>=B! zGfxU(Q}u%Vw5IjDQjPb~Qu#{QS%9=P{c@7+5ZJN^39h;;D?J9!8m6rGS2!|sj~{>l z7U>=S1;omb3`)I%d+)(Z{5juruCNvIRK^4Xo%9;mvW3=o;KAk)I(+YF_;VitHH!d% zkE%t%F^*#|^>LjiJYCWp-zNS1L+9Sj?gwP!k9M;IqKwSo!k5Ox;ZehG0i4-OE`}|* zIGM|K9h*HJw46mQ^WgbkM2s!a4}lB8Gxw_nbQ|{?LWQ8J?E+n!fjJw|-M+<`@8bg4 zzIcUe*iyg~Cuof~pZ^@3!inX!)J@O>aWDlevA)AB8aS(DKr&tcvG`2j#=fqvF)>$I zx#fOTY9lN+Q$!3X&*GBQq$e$mc@2@?Y(u5hXy#X@Qpd`&}g@v$G?b@cu4riO=JBI@nUvmo14wI}KuCd5t}ab}>M} z&}i;#dkHBV2*8;!hclyZc8#>^U^32V3#R)@S1KITM!bll?hL{4T^8EKSDcboD-r*> zD_?s7LC_ryLW=~-{k+gnbhzb#&voQU8UHBGK32u zZiUy4mM8B1GhHp@nS^Zd@)j5`>MCVHnlUszO>3!d`VqA#Xro7H6XCU zuSV%bSkbx*jt`cmyX9C0Mx(JQ*ABBmm=Y0jHaNFzKNzgdlx-p6xa1kL?(P80c#*h- z2=SMbEN7C4(<~lnINumg+&3Dhd!;$86V_bBGrmzftcb7~u$rW&Mbb{&7I$SG=UghIvXdF)N+Liva zK^=Y@9WH>3&pB=ICFq<-Im6*sPDEYrppkG4CQkkaVhep?pesm#x=JKB*^n>32vJjE z`uDmY5Y7dAW^Mr-k}TJyB}sVDL^wY#Iu99rI^rj}!=FD61~I~Bzt52$F-^XsHFrTu zl2rR`k1V@7HE^8urHk;^Lcl-|X$-Tqly$4YGudBd)&OjBe26j3H4DPnaa77gHm5P1 zT{{>X=PI|{kv|C5sIOAquofLjGKe6O&Ni(D2K5*;8)#bpY>c;>oT+rlZMb^!vv}8>cQ^hA8 zMYw>-brr$)Rr|#62W|I)OBk*Q$tf%44m!#WN1|JCkvCB*4CB{rQe~$rxeSmRV%+KU%A=_fB?`&y|2nb*lHKTH%aL2z@H#7lj(1Z zy#7e>)XNQt?svkmEU+Ti&?fS!zaa2Z-%s2u`)nO)Og?)}ZDxYSlL=qq#-&E>6oCzN zG>QH=m&mVmtkQi^pTGgPl%=+S7Hm=LgjCya8+BRtt|yDcRI{F4fq&1zb-_>GWVKJK z=+C>ns+*MJ{LYGR`P(;k!AphT27e6!->DjH;fm4&mhwr-cmLq5TzptMHc;8~{QPk6 z!JEevqv{dd208mU)WHBk4V;RWnQ(=Xt+5HnFMdqrqY`S?%}o<4F0c_fLqv!*iT;?o zo&ww{Kr#MCo&03aTx`S6V)qxN7DJvHyw0gQ&xIu93{AE@nHDT@FhWhECPPFa7Y4f! zJH?R*_Y5*4y=fx|NZd>!3J?wU3vLMP&BKnkJppqHn)Ynkbd|&Z^E0fWLpr`Ps;Qj@ z%=6V*1&jwYqra|#?QLpjZYZME^t;IsoB!8S-4yDhreYd!;|q5H6Nv@8Y1>>F#E&}- z>-Ah_@LqTR0j@#fXFgZl7`#Y|Nc_<^RZq!Xkjxv?uB70-S1SE4t^^)bpDDm3LDwQLM$)3(Z? znT{;*+8mLZHTsNE7~Zt?#((>e)N#B1yHc#sqlOqF7s(%>&F!q_&+co?eslI>|gBrEeWt>48z+SRDsF@Q!>z4>eKlMTY z=Kv%^mj(CPo%FPhMIT56U~{bb*c8)un7NPzMzQc~x(#I921t98yJ+*W*}jLi`~}oB zWB|a9trL5aU5#KOOJA_HU^&R*6or1tmUdLn1sKQ4L>G`ryOhRq2muC+6dhejNDf?} zf__A2F5qiM%zuP8QrH)%KsP3hZt1&*ztX^K2HUX`W=X;Xdd`OB|{7Tt1sBuvMH zPZ<2BjWXn!t+_@RiAPmkS6I!Z39bpTy{ga-pyu>BFu_zJZipu45W!jXQ(g?|c8!9# z+@1Ty(fZbcX+72Rd7E^mm)<*nW||~HrOzs>*BT909rD{r)(`8Vp>a1f6oUl4L$QHq zn>pwc6QiKmMj54&e7c-t0dSarW(A=%qfMT{+at;VTRqd1OA0(^Or6KrnP}4jd_bh$ zksYyIe8Z-At=XtX0*%P}90q^>ge+3lxVf35nLj#WuA3}Wh>2E-SfOt@M?O)-j!)Nd zDC~7M&uyE8`{+(GIVqSgyRPl2q@)+;V#-X*F-`F>vVI~ycQ8K+%*-WQa;Td`%S>}S z&nyleqj3oHlJ#R#s|1pA_*lAJ*RbM{CO4?Ic$sAI9d1le^9w$E=bi(T;0zY8>^ZrK zy1yt^njM*E^c@ag-W0%6@o=$|Zr!0KtcDXa$oBm4nsTfw^HtjT5E-kwoC&3{DY(#q zFQnM{iZf|xugiCpp=K$0t6A-ilhKhc+h`-Z^7|)c>^CA;5fE?W8Pff;YO-kG`t;V9 zmQ%Eah+M+Ps1hX5J!{od-j)p%D_9mRl=9)p8SWqWNWsp+LHViYyN6-zW7w-(m}KKK zcY>{_Y;JLtz>jjHQ$#Q6_ERv(TWFjpj2Btx@Yq;sMzEHgTn^1{Ob?c7{?Yid?H3ID zKo9pegOuK@AvbF<1j@5aqPuxVq7XSJ49=0h>TahA;h6=COEIhW9QNXV zKw7RWOFB6Fx9wx`oc!s5b_P27$2GlmLp?@YM(oL4Byj zh${F~U(I;B;AO90?UuD2dy4C9@9JIz1^Sw>l*OvuDxub1-tFRb_a~LsKZZuAd_jIr zRrGZe9N;izLB}`A@W?*u@~>5Ro1d0Jk7SEieuAqsaud;)9UasyAHQ`>xeij!&#vMr zWLxe7=253+P64ays~C)r-)-xut{5a-J`)|QTEetWC4HD54Deb+7-yD6qG&RoA ztmf)GFjYX}9gC7em=9tt>_q|t;3-ELR#TEXPVnR6cuQG^ipiVSwwoZ z-eykT&uO%dl zj)a-=l=VWEh+06hj79`9QmF1(t)1?K`%w^!&fGYyx@z;j4qug4Y_iE=M4mx_Py{ld zhTaX<-mZ`7T&FzCybwXA5OyM+2bK5$iTIOeq_QTt5ncs#${P{ytxpDB>;)o@%cVqr zxFpG;q>A$S7waOT0SX4H13U+&CH{ZYW+^}2u^=RdhE93jWEUU6N;%wOxOwpat%BPsw` zW&xSQ;%*L3Umu?WB61G(U*4rtRmi`GdH^U|k^*P8n>ayJ*l`EoUIMwa8pX z7oJjIRzbW3L&-lP3v^snut#{HATIG{?~N6E`FyQ_80R;aj;_nxY~()_;S9{I67+xA zGFcu+-qvAp^39(?IR;^WpW7~#eMGi)0uQtyA%$q-dm>NzQ>Hx+np@~wEdKY0M_N|@ zZBvq$Dcn)LS!piTEi7(!evB^^sch0vW%kyj=ob;HnWLr{08S!i~44C`F3 zr|IWH`W{5S)kllk-3`7Q@5$H*ZEaSmd9b=v6&OJ<&AB_A++DFpBFcyxQaNydnaXKJ z0dzI#E?EqFCKzX}#74_dhW# z9#0i>rw4R<9D3)oXZhtZ4PgPZRSdz+D5Wq#P|>y=5B6YU@yE&-@hGd-^OP>zvvB_b=8IL;~PnMf*Y@AB-%?HFC9FVp5^NaCneB z$h#Fogo#Nrz6)uxNp;QoDKc-B%g5nqJQB_EfIdpSf%*du_|6j zS!6C8K(%`M3ovT99eL2+x6P}M3{5awUUSiXUp=ld3R@N!EGczNQ(6DQZACMZ41pLc zCZgo33(TDz;6qBn3P%1ok1yl#*#sb~_4DOVI7F;f#7-Ukm6h_PdaD=7v!hn;CP&}R zf(=k#D7iU~e|@FNd@ooP21sHz8=Xg|sc&`g=kITgyP_3`bGlp2sw*&YP8#9Y%$O{dGsMJK-(2 zkgmMGxS1|P9F?DdvX;6Ik_+AVO-IH%(k+=_Vf;)EqPD(aoDAzNVsjO|qfjDbHV-Qkx0oU!Ji<|)b0v&AJ{y3-WIPSNp`!Wt)F2X@124{t@ z%7=?UMftV9Y?eJ-Q#g>GWoK#`3juU4CNq+=*oMX=G>pGcEsDfm?!H50R4~paw&P70 z>kzTGnApwfHMnjwBOlt$sdPX+?j_VbGbooB_$rOF%RpJHsJv6k9@n{jGiS?|f**4v zHb&rX(v)qur?QSOuD)D}_F@Nf&PqNmQyrowjJH4DYct(skJW;~-NoP1|Fsg8Vy#DM zKe=-2*MC+F($22SJowepaxP&N6b(R3xg&yDVq-eIa*i<|DodF4>>vu`IW;WP-HNXZ zQD1}O0pO0hhIKlyCRJ8e&jaUU%?Zy{gkj@npS;qJ4&x~_LofLZs}jITqRSmN08jc+ ztKeU{kpd`Mne}Xoq`dMCSsu8o1QV)j9aJ1|uF6O#--TjDM%^(MML@-K-WmnJFeY;J zVv}Cf$V=)@T~7~YaRJ%S3X7ftaxP`~4x3EV1VQs1mbm~XtqaFx9sc-%a@>_sk?3FU z1tl-4c^*2RzF_@M2_|4Q`(^u(V>!@ahp8TmTinJaeaAJK`?9rYwX%cE0iPutpSPf_ zM3j_?RU8e*QLjup?An*-mv1u#;9m@n%L~ae#ZIc)>Qdjihh>t&%-#BiOE%?$TGhT| zyGIlI-^qTCzoFy`$R;ZI z&z%mP$9e)bAGO6SnziqFbfaArO;&|F?ObKQfkmfr;Fx6Zbn3ONQ&j%2=;^zaLSqdv z^5tm)T6Nq=ry6*n0L@?tozZ%K4@DJ)&uk+@fr4XVZY=tT)}pMFvVN-5$3=u|oX!arp=)RzLisT{F$CAsH> z!_@R0Xih>8;p|0kW$gE--9z&q+*`AmB5|7aFO4a7RA@V#XoL;)oT)(?{Pz;MNnb}e z$f^to8*^B`XZ)Z38#XuUpNAlqt&Ph}@yS<^6yE8F4iM^BHrb zI*=p)tGMju8rB$)Q)+D3ZsAiOJ}C84ShPk8M7kH_QRkf4;- zq(Lolm*?dJ?6X?d{c}^vm5HQc^Sh_4L$=zKDLf}@&p>MMR$x6ir z2*riIQl(6@m>WcVAaKt7r9XSeag6$=5Jnlxf6eJ%X}h5yB?73iYdOj{sH4owksMqL zvL$6o6Tt|gLFN2!5$6`1$#}%smM{Ta`HZp;^Ivk`g7D`jhf4B=Fe(NiPj#uzd#%Le zf8};BP2R++};9M0c5spA*9p^udGGr-jLm%*ip@+`C zVAg~bE#8+SA%=TGx=hg0?#5q`!|TO`HY6FcD{XzH3v_l_njXV41(kW4=|OcEa(pr| zTrafg23Tu)BHF^n77O>ZB~)RW>1sU=tDIq5PQ$QG6_dbZ)s90yc7htg^uXXV@AYWA zgl?arQ1ey~h~O>HMdqP~(<5Dsc11Lct4Y8D!1+2OVVV4RJOCgKy9np6NzL!Y( z+LgX0d*58Hjbj7aFmU;!(uXWS=>>kl!#be`1chO@LxVzw=EnFumDRi4!JqLvZz54M zVA&rYx0T+4pO=0J-w+iM^h~j|TCDpZmmz7v(F_alY%?HX!s2ZxvHJEWyWHB$sJhfYmbu}uY)#9iCK|sF0Pv20fbt7|j zCN`|~=n&t~|7aUil|?{+=yY51*JeKvczP{CzjI7gam3;p1r!l|?N=e3;*nEHsWY9Q z6}y`7=Yvs7k^?tVqCrVM*LxiSlpxjaer7xP?~KG=!QFcF(w_qSgX|-rf}|}N4Tt&5 z$;$Ja?xR84ecFb@9$>*s*q|h54~e*x5FA@RgCv?s>RcI+vQ?LWb2VwelVYUZ*3cF9 zY@CU#@V0omf(-~IfxGTN|k(J1_ zCqWI>c}a=vgwJPOBtk}8(UFelumrjV&Y>gLPJIYQ!*ek(hU{};Sc#Ld4mu`ZrsHE@ z@!L%F?z2P_vA`*Mw*`y{zVRtmSZ2x#Czh#GNzb{AiBOOJ)o;|SCZ@|1o&`z~$Iv~a zoRaA?;z${{sj-~qPLv}~G;8g17xRGbm+5JWbN6wyk0H_;w(U>3%}8XPL!a^iM7iA$? zDbg~M&F?sd-&080%xJ3PO55t<4qhWW_Fpo>s3jVd*VZw+>LR>7f6g1)ZXT+9-i8Sn ztHad6mnv%Y@TroRsTkm}DxHtSTpj(godx9F{ zqkraNeU@atu9V`ZUAOx|A+(e@k47jfQsL(>m5%$&C@4{p`>>Bi?$w0}<86D7_;!$z zH%$uE-Jz4f$laGvKZVtT+2PoD^Dffy+$@(#^(o;9W+R?WGg|DRHIUjlHkYN!|6mB~ zLA^jg9wRrHeBl4>&lx|MHs9@O!9Na!&}K1#S@AI>uP+ln@Vf~5wb%rG($1`D5xd%$ z0+$)8cXOrMmB;}L(xFlj+F}+RuIJ5ZDiz>tYEFH5t3I&JuPupEhlG9a#LNK$^4>%3 zU6d5)vhM?qg39EeG^mGVq59V}V85T5^mMgpdZtgr@SW>sq$DJmFrT{^AE%JFDsD!< zNAGZLPgl0c*}(!DBmEbQ*iqyAx+WgOVo9{PSqm>C;F8_bUt$;ybI4wkvlRyIV2bn4 z5`GGV;f~PC=wPQC-+#ntF&D5PFNa0X%=Q;i@FQ(EQ#6`U+cm_y2t1U*w^cQ`*0g^6 zaGd-uIkf0SNxa(Tt3S7;+m7czr%u_itcb4FK^ZSKM7;Q2N7V^|Ll15deV8U*PUuba zU$Dj%6-1k?<;VT)i^f$SX(p-4X?aKy!MhDio*@Jg>qYk9pkC#rO3p4bC+kRIzt#B3 zm!jKcn%9l4C#pV0ABfL$nHgXyQv~JkT3RGD1$*6-v$PBO-|5Cs-dAJ7PA5|NO&v7pxs)Z)2E`diQ;m(`I9@I)nsuZ( zn7@N3;J*7=ttaV<`TK*d2_)Wyq+|dj$4wST?6zo7YP@4@ig-`^f6|O;PZd2f4}f#y z#7?-?UTNTM`7;C#%9X%wTl~9hRD5A~iKf#rC?J&92GQ~F`)rUM`!0KCF@0|jCgMko z$yz$NhMJ>u0Vspeg{PP(wd}A2ku1#V7zD&8&0OvPgN|3lty_7LX9k+2AaaU?u;FGC zSUwlUOs8!5TPu!fPhaU%#9DiCf5Snhw6~lCIA}})kiMMIHFQ09zAuHaY0U#~C2Wh3 zwY`|qZZreNIFo0ARRDBo7v>EiD>iUKU?_LCb7gkpf}VR*uyBB!Y>^|5(>WU&WRcv%5hkW88NRe8YasJfmN z;n^P)`4_6f8(<$dwG~b!@qtjXX{ZiL1j3WC;`Dw}%R%+L?M)>E?Qp>Rzh=~VZP?^S z-VPM%mT07$3>za?v69MvSFQlFpFE@KaI+FOKCKqeW-!TEIb^w*WrLUTU2*x(3~tjd ztMTLw2v2k2zy3I(oR*+VOV?-qtO3uAs2ULz+4rWjx_{)mXk_q`u%-?E2Ob)l6tZt; ziYZM%##&`t?geKM&e4s>c9`mRTW+*)MRw`-oD!TYvhhe11Y5|v*uOC!a-H@+q2^4h z`HY2jAhLjUA=s)>E3`IzH4ED=$Os1aH2bZY3+hN^Y5>!Vsj%PCS*4in+1d6sbUeN9 zDreaaBN0~4>=t=1hJkElRP%5@2ja+gHfedrLRP92QVns7{U0yjK&aRFneNr5p{Vcm z9*?;n2nEM&T6d zwtt0iYtB0f@-Q7;TAAISVaYA^PF9lo@LjlcZcs9A@O{3;c>+T=AW<)U(Ci7!Ml|fA zRA#-RD}aGzE54Kts3cOk%{AhWR)N2R~flVtjeY?ASa0x)I#~)m%!b?JiL_Sbgx+}yW?Ix+- z(cQhYT98*Vp-siz4lt^_W@2Y!x6T_+_CGE{f0~syYunb4J#&0BGZg_TI~Yl(1zWsL zcDQ6v!FYL;=r=5*2+PMJX%h@}kR^UiJBSMF-t1SkT1fD7|<^G`tD**0da8(y#S3jYL zRaEnHBZ^VT^-~i6sX>;n@V4ZovorTo->6RR)MMA9-PX6w;#fS8?SE_5l%F?5Y1V5x z=DX$G%DC*_7gOldu3!qtTjWf1gw{X4OM@W;oMLN$+)4fHn7zX>F4UUIdB|kAk^1P zuM3<(2Xb9Uv7gY|%L%h}pIj#bBclY7^uON2@d20IN!ngGtArd=;KW0p#~&Z#MJaXg zSbI?oYgi6!6`Zc&o*0)iD-!p--aj882FkL&`6;s~u64u3J9j`v*0eu(BA9+9lpz=!7m|(M2q2fwBgot2?tZTM?S)(&h>?6W-*fG7FuTQ)S)fQ?KJwO$i5 zqf^_lT$Ut26|j@FVRN5$Oq5NyAWc*U-W&B{S$D~Z$DBw5QkM5ISI`@`T8X4W)v+D0 z2$u**$7BP?R@Ed_j+a)=9iY#5yUHvND@}^XB$?0rNld<)FL+%iLE6phTVUKz7H zwj6dex~2vFxWP^@z^BGwT>m~hem7O0+IlpnCj~2^kIQ~WRIAsi44$b5tl!j5RsCA0 zyeJ5)DgHiXxgCaUr;#P@k{X>E92nNdMHP|xl2tIrnVGW%2>M)%x2qY7mbcyQ@-lUq z%hGj_Iql~~dVmi-Jecc*knqS=GigTi{Jh;tQ|0b9xrnL4|IkSk44%jLFR0MDe9 z&oRswW7Nd!8RB`lEP`|sR^zJoWhkr|gqj^Z^He^m~7#Y;kL2 zwSdU-csNRMM%TV2{8~P}6<(mMVcqW3B6Bmfl2hF*h5z&)d6Dyb8MT9ARw zx{twtbvp5n6Nnx6F8CJdnK84gC#3fFLtIiPPJ4+)1jBakJJ3nUCND4`c3P{}4m6TQ zLqKAcN38S`fX5WjF@Ya!QUrI#B+q; z)UA6JLPL!2m_m2-FoB(IkvGp!SV>a@QOtp>l1%_%#I16esktw5qWwgKRmgi`PwZ6m zsd;}iKyr`tUc`VDaJ`|*A4q2WSndGv%KlAevu?;LtQHKaLYdHO1Sgcxo|ViJR)f2= zrYm0>vE0A^Z8$~Ft5-9xt-p_{P+KlB2%q}h7N^YL@l$n=s4h(ssycFCD2$(-n15dQ zzI{!tS8W^R(IB0=D8|y!xMJn+Xad#TPM7wE(zMV#R&3L-Uv5T{Kf8Pyyn4KJhW59{ zJs`|XapT_vqvG|}B%ii)b$GMQG-oV)@5vo8-i&iP6{+XENn7vDLRkO@bcAkArz0qv;sbl)0dZ`*}RuIW+I^O0Y$ zAm^7>touy*Y$-)Dsm$|XheVo(rbRS?cRw><^tq2M8;^46rwG1y1ia*Vyk&DTAlB*f1qi|M$?&{T7i&kJ;%0(;u3jeSucN91UTrB9~Pg|5S%c?B7Gm;~Jf8B`k9U_b)AdFo6(b}ORsQ|^B?P((s%NN-+xK@gGu-x`j1 z&!+-0LMY%`3GPx-Q%UKn4(4UZLs}sa@e>P6gUlfX$zwql;UdX2$0nLF#dULQ{p+Gp zLH7-L_B(mb>o?}^&|B>(h4@{A;g3_xbWV?s>;|47XSEx(CNO%QDf4Qn;`Gduzg97* zauNC^t%C430r?%|pn$LlYU)J9k7jEa3~Z)30n6O9oTJ*jH3xuM8z4mSPyN`ZMx*W5Hfydjb{ zHr_*_;v~g3QMr*BW0-2L*o>huFkS&((dhZI7bAM*LQTf0ul#L>xv)BPR~>GNNcsK4 z=PaompHr(ZS6b4fEpz&UC7OPb-OQ(qf~4)d-3q1E)zIzeTU0qt&5)UocQ`RHp;ZM6 z>dIinpejW&frmO?Q*b!-x-+eD7>@j>IKZlUnl}P8c1i-+Da$(ZMZw6C+;%Z96&aws zQfIcwg-aEVZE!p+2VD)-=K)P|C34Ko@Ia(YFc~@DH-YkufFBjiq*P8$$g4bg0TVUt;kGdMkaV<|As=eg_EfJKu};YuD#c#9(;@wh z#ra8Cw{5CZX+@!=l+AY_lmPzZa2g!ozLu-S4|0=-*X2I{-)7jsu+0SzTZ0M7rgiR70W~{O!khZKc3`!!l92{ zO(uq&i^bewXR>N+9?X(4WxmQPF5n%?pF-&PFPlq0#<={#z;+i(@ zyl>l9qb$(Sc%;Ww?Zv`d9zEI#k;x8H78Xuzosc9Nd&IRnOhu*MHoO1JZO-hHGWxym z=*2mQ!{txJ`U$|?VL0&Hl3`I7uUnneP#xH#ZfbNvfVtl0`ek+DtQbACKg+hR%sC~- zHi~`nsrYx(sP%C#Ts9l+%xdT$n6`O3TDk$%ggb@|xuDeaM*~*aRhFej3z2){6}uDm z*$4VEe*C|?+5X<$W|r#M4w~J5stDLNy%z<(eTP4!KABOF*SPBYt3ZtD7S&rbBhjRQ z?SyR&?dmNEFc2NstWA&eKkT8?GVwwRlGhk0BIX%4>;EkkAFprhWqp-HGt-6d6zwWG zvwS~)JrCNxaPc_EYb{ zH*ot+1k7c?2c%BT>LAtU6w6D4>q3tJt5@-_gAqiTc{KgN{yZlv;ON8wM{&dPdO4E{ zc)!gDYyrXeVLxpJeYXJM#H;@^$E)=&PcjcvbBysoo{|B6>hjl-zWvAx2$SuX^FWq<&G_XpkrW0p|gdJ{zt5>e~( zG!lFeu3byqhmn|if|8HKQKgSTeF!Cbt*Vl_L6_ztQa?>!ip+zkZ)S{wT>tfSNohP2 z#DQobXY9@^F|^ni;79%{6F9>%<%%5&QvNKT7@$ z69^Jo(D*XBPT)r$4jJ09y9+p5XSRI4RHFk(Sq1f$SGcaiUMAu#U-IHJ^iY`diZG>0 z;o(q=_Wr}3`39r@$7X$nUwN@_MfXR4xQfe=R6x`s8o|;svbvJ>`#|7zavRw)n#mQ&EZ+>iHo^cTi^?t}Dhh!{u zGYjjD*wf9+>FivfQZ=EIQ#}yS#N~l}TGt&&!?%9w+vP?B;*5y|H;dcKKrJao&}ED5 zr8buq2%~7y-nP|zrB3JaA-6p}cp64g-YwPX#Vk^9EQj^n2B`p7bSb*8Y{73TjbCPo z4X=qzi9XfRKODg@U8XPuSLZ!KOy>BIQLFs=iTgGp+RHuES<}iVMED9-LzUfm0bW-3 ztK-M}CcfW%DQz4y?t$tBq$D7q13W=TlsW=^C!u8EWgWy1w$P;f7HJ*Iw}|XI1)MduNjIl?V8cD z^=$~x*w2=cSSuR9boC~zDVMNR3vTjgrqP!UoC#?}I_wQE^jMLGUSBk+c z0J1Ee{l$?W?Id z&{CRP5*bg+Xr|L}7s1Rjs^%M>!g7@W%>Pbr_n8-jl~jflcYsmR_;jeV`K61&Z$BQz zh>0dD@#|ee*TC0$=(a6#H^+mAsKgSE$3fU$rjNd=O84D^Kuih|$j3Yq99|1*Ti6oJ zYCMKM2T?^s=Y*@H^LV1B&qOp*`tG`RTGQ>wiQ3GFO$|l1*W)r07omIdwRJt{ON235Kl{@ zySVfuEjo`{$uZsb=^p7C@58{GKu;V>!~&Bf7H`9$#}S~wZI(+8!3o*`Q3p4|kRr() zkr}gi(H0tl@UBHeZNQRbVD53pr2)znu=-OIPc7+DwtqcY&Cs95%i1-$80hb*)%$7+ zpB0?jD>LNCaj1JC%BzQH!XomVFmeF2J;>-*y47by_DliGde*9g&75HxrbvglxFIP| zAYdf@AqIx+GweIbOL`Tg9lIxfXHT2_oSEmxjPP%=hS~5Ah#|haLWjP z>Y7BiU^Z~3E}V?cb|h8rFQ#0-;E4m1%V1TtFo(p$YvD$Dx~Zf}&TN!Nd4604)i94m zUx|AHrjJE15rZ17A%jHmolh*FZ!`|Q!e=f$HG#ICwm1&QjEX(#&dG+gdvSu$2eTKN zhHR?pA(|W2PDI6N+t}M~e*28EwC@BX5ph06Z1J&7kcUQw`Q%@VKvZnWNU8D*bZCVM zBh)fZ%!#UFZLSO0WCt=ykqDlfgurZDK{Zr-7`j(bkX*G3`!>(4<(iPRO6U02i)s3c zM+H=#+qm>{zcL@1{N-cA2>hv4t(IY)+_DO{Ny_KrbrurR=c|PeUiMD{FfWWg0%RF` z;9ON`Srs1bDxjM)GQ%ANnHzuLu?mK*%6%(Mel)yc%)+aIqa(?RSL!r~#?7Iyfzsrv z{Y-XZf#q_8@lz+F=LzQKe7u@EbTXD*5d_p#zAMGP^yApp{Mv`N*faA??+2;`hnQW z`@2=D`si89g+@*mPFF+4Ao21oWjz+|k9-~{TY)#3dp0UIGybM|&*X>r6D z{`Av}ta@hbY6j?3ijvmn|J%NtUyMhm)RG~9$7;4>5y}cgO%bht5kJq7)!zw`IS{)7 zph)gu;VFXg-$rMTbgOQ5VnPj-#6w&_-FaxfY@$v+6Iboqj7tl9yYbY>0xTQK`Jp+( zzO`$B2t$b3A`_}IkSuev4Pd!uj^Q#=X2aHonKd1+7u@oo|8P!)D+iJNKo(Iw7jZo) zv~YdEtcF<>+{@3R{dFveebzk@-aW3HDidy1NQzQEedAy|p@YiN@c1V3GaWM!mDh#& z!NoP$eQjPChQ4W)R#*557OzqLtFqX!ByjsHTK~h%J#R$-?ZzKlY0DEn55oFGkU(tzFbxFd>HzqSQJrK*!TGGNczXIFX^7PzY zyEe)9)7LXsAGfpt zL=F0WhLP}{>r1mXg&0{{8YcgZ6!o5{1{Ds*$seH^1nk5#&Ssv_!&Qp?9>9Ym7nKb| z2n7OJ#0eK5B91}q48t$Nj-hD*gaFRH{>JT>yx-81S(`@U<^=ahT<8G;V5uY5Owzv_ zA8qfQ`CNtZXfaL|a_zLaa$38q%kAd6Z}tpWFi%nT8mmh*D$X!GL9@)n=+V{pp@Rax z(5EwM3kBOpn0S?#6)w3K!X!;0<+2>5BAat>Khc*@$K1xM271cn!QB3-FjSLFO)L}f9PUEOD zttV&R_^W~dcev6K0(}1NL^V4yS~PAerqEbJIQ!|y+AE%CMt{($IdZ#Pc?CxO;E+FW zv9DwnM$yB5)pJ6QD$x`JRHwR**TvK%zw^=-ygrJtc$dt<%#jwBz`G(}YtVe1-E^CE zToDS(XHeK7LeiAYnVC8F3kqEcGT~ESD;e@quud2L4Lp03u1mjv;i23b^vHHtvk2RA zm_k(gURD4 zliqQnNRqi#4mt{izuB}aSAckK5?zD3K(?Av9iW|ie&*z1jFl^gS#QxHyXEfO-dJfV z7i>$SOQ#9Dk&fHOb|zygR%!%WNQnLVjzMbafm;QfFdF9iz+p%RwEmN(LXx zSROPsfWCVLm_tlBsKZsrGkZsYCwt8HU$!|-d`~Ske~;?7%oa8n$?-TCWeZL+ z*Q2HGQg&o!^&;t#LaNjcd%H-5s-jd;EPvsL~qxw`et}#aMZa=IO#e-+0@u>nQNEKd#X{!`mS4=?zp ztZVRVP`@uS{z}G_NI_*O_DVAq6F0vS=)+|7lx;|2#e`L!TM=3U==nZGIiyL(iCAye z+@=Fcxa^S)zi8aGJ2G~SAuJ;4ZgHEh^n1Be8nTC&e=V??UxFC&aPsd24gTOj)~+%c zZds$cn}jpCka^OrV*{m5h(C2xxo)N555xV3s|+>GaA#Rzm=y}`uAoOFC-314M^2<3 zJp*(LZauEe$29jseu;sTO zc1ncG>@Lt4ln$^%o4SRL@-Q(p4jAeVagCo| z)-;chz*$qHbj4NrSnU#Vw=s+Pe%Ag=XmK+odY22@e)q!`R%yVrf*1HQS}3bYiZ(-CjoDy?^(DmLtq_pHQn&LG>6ZJ6qny`gDq&SvD1%Zif>f$Hs9k9X)2m;wZ5& z^Uo@yx>4d&Jb%v~fs`3b)iZ?9w@2tN<}zyh?N(9bi`A>pv}8o+AfyYS#*Uf#e3G~G zO)EcUs61b=QB{mcQVR#wmMw5M!a1yl=n~l*{b@3K-B)QJ{PNfu28#A}<2VAg4q<;s z?b?>?V|@>%;+1v%S1dBf#cDhnc;`AA6SnfMB*D=~tZtKu>&44lj+ol^G4mU7O2Q7s zQ`Ph8Yd&1r=}@G|Y=R7cGSBSHa&Wyay}Mz6S1&3Wb`kVvk+ zMrKT@7C|swapv4$tc*BXcLcu=r6+3prVP34Ds^{D-J=@^>CHF)XEm9hVIBOGsqsZ+ z1G$ih3>hktl40;@O;6fFvGzq8XmlX}7Z{alH|=}vI)gO`s&9Ri_#2Ggp#j5+^%qj} zRGL7i-`~Vmw5-3ALScC;VN1-ZyO`WXm&oq%^7yr0fJNMwYav@U@QeOajN|NY;!+SY;E01PR3tp<4Adkxt#}CX?=$pX!1PFH; z0=SCQxT+%}#-2LXF1FAerBcyBx=1X0y4WIb!oB&SO;Vh$UbLM$U`~^LZl3%|7Z0aC zoKq{_F-&Oj%;@U?W5TL9Dj8R_5xXg+-<4$=A1$LjPQLhN8w_nBPm^s-5$D{;xVsLZ zTK19OTlLZf(Gw8v#_Zr+Xm)4z`E(MK8e-P%Cp+bj@ywvTp_8>T@g{Q&hOfoMLMDHEq$Cd2C+~<{;0Y*&=MNH++TEz_1HQa9Nl_^P~bng!?kl! z)96R+%+Vm;*%TJQ4&rnpnE{i%^*EMsKobrVd3K+_cZuX&IsBn+k@eB76K$hy1wNKN zzpRhvMW{(=tGKsC89vk3T)0?Km$!_BnjW@eI~@P6Aw?8Y`(nfQFCUH#9WAeusr7oT zRt(ISk-R;XxThAfT4h`koaZnv&_o3o->4U1YV*(72hn)S=nl=f06s=J2ZMHJ5kR;d zA7g!EtYH<}hF^W-MqoQ%j4*%Pta^!o7x$~}BQsW}X6M4>^I{M|1UciwT`THgYKF;A zm0A$&z^h7nK~S_1TQp+P9j_eWC8lVu*iiy>Yf#M+*!B$pQtu=#e4=0WAQ4`;U$=d3 zBKy=fA_KueD7ecV0UU&D3R|B&x$oW>J+wVFDL5oT5d=6oB1o&)JZ<{4%|ko;FfgV& zr=1-Z?Zb5b8KZiDs}n#?bw$Dqrc*=X-w}!+-rN%x1$>lx!1xd}d&a)MZ%Eg2j32X} zEBPNWfw3x(;fP7xUKOl(S~#_h+>5GC!dXk)HsZK%O$3`d2z96w{8fms=a12-yC0U( zcUK?S!-80g0J*UbQTt{$_@$#JfU<{XxFgKeEIDe$EoC0IGv0BdQfmvdAYLkAF@TDc zCw`flj*dewOp$IeaGuh9y zJ+?>JHG?ZSd2@-f=rs-u%ZjL$O{}BHh15aZ?7*{$eo82yLd%poBc7BHZspKg_e(1q zy+7_%#F#R&N?lsU)hhDF0&>EP89nI8;T{trXydX$Iqxc5YuIT<+%|cccf(AyRXqyi8RiY_Z_~y1c!>6NL>Dwv6AqLs9o%O{ng7#4^!1$em@M4@ z|5aFmUPPirzhQFDz2+VATE(ZNcr3O$0y6i%ov_k)w~r1DX*b_t1dGjf1WCmhgHmf4ksV`{7Ng}i(3*sN5 z9sCr;m?$~FUY^R}*XGI)%k-8F9vkR(>z;lc$dWA~#Dqb< zeIJpRF77@i?ZcE*EgqJJaG(L;l$DeJ#gTC%878!b%eW zc&1;(0M+6_$aQ?ps_y^^<1KFUKr_sIVcfm6_J$_wa51_OlrO9oYA zk0(|DmyCjv7}dJCU$H_C{RmCWBzn!y^UL}gh5%zQ;Yq2ttxF~KbjHqMfmGxt4#iL} za!~G*LBR$_CSG;X{m|Lyc&p|-(%<4>fWY)VsZT#R7P)dsYET{Ce*x)Nnslou_Tw@h zo4FlF7*JKa zh{srjzlJap5e0SpmzkUgqe1^cLarJ{Z=~b)*^)VFHs09PXseJ9xW=Wi67E2tYbevr zXoS2rE@^zB&i!Bj`c~kybi8f-LTT#^TB7n^?lYpLAFu$(j1p2c1nt@8Ri-zh zB~5R-ak*G$qB4Sc>hFI_yAmJ11YJ+a2DM>+BxDM#p5jcp-2pfqi12tF5W52@w0W$| zFtPq{>%t;+xrK3iv;@k(!6JHE?T(+*(KAOr;97-353pmyT>2Fdv{cy~#*M|*i?m&w?|&a)td zh~XR$+$G3Z#n;4vT3y)Sk{!k?Cs%6-Drc=Bg3o=2ez8Ra;{T~3`b&~|!`>hfK=j5J znLn5H=!9+C)WSzISCsw2SBxS&ck;mC1t;E-x5|R5ekynZqoS8b2-G(v#$pQlT8m^`GM7J2|gld*)vJPaPSg3Ept{84lUR&qoIAKIkqou z7nmsC{N)beZb{$HpG(nl^4G+PDu9*s4L-9K0Ta_DzA$s zvvFZE0vP2W0u%+n|7oyc71UN4SP&C3uq{&72uIze3piTXTKfb8k5+4qlAG27~CQ!zT|WjRJY)g5IlIN(k7OAt;Sxg{8_$F9sbcUqCxivmPT6k1C8xNr?~o5U40hNzgN{3+y0z5 z+x7b)GFBpGnaZgH?U_&q@-m|~Guu6u6=H&u_74)JW z7u!`Q6fjQ~j5zKXDFG2~3L>eKBT$6c1!(&_S`S&jxo^;R!sDV=93ZlwWB1g#W?A0O zN5&$(9E@;aBoiw(c21nKdEPgH1QA5sF|V1vhQOqi5mT?q=J*z#(!YvKbp5Tc-v8m4 zlOU?B*rbBibbr24AT#)TlB$4Ix%#D2eeTPqVnMoQXr#q>C;ma<-#7!YRs&r`l-OCx z5TIJQfHNSDGdNe_Us6tT(?=?v+&tq;1GIxs4@`BGwS5~jcZk3%_W$~NKN~JA#mnvt zvnJiXqj_L0I7CBeF*_c)#bsK+u7AoELikq4-s2a-I#~Kwk+zY zU<=bV+B1{*lw_pxz~<0}8UuMuRx98aR#|7+O<*dZ_j|j1A~(aw0QIcxqz|8wkK69r z{Na--ukVPCvAg^;EJ@pobOn3`rgI0a%KPH?{*-ZA3swd)|#)Hxp(s~+H5qFwgO0@l|HfhktY zzpZdSr5#)acMlz-xkrZ`vJHo&{BNd8UzUBm60DTmS;diE z>C^G*ygBihd}olT*omOq-lR0#nPm!x7Rlq2PBs{av{ULXs0=y!Td!*G z;d{sD)KAVOddMUl7z)MlnXBNNU-n&ZkjPZ?D4ggf|MghQx{gm3LeaoNou}jsJ7e^P zNZ}c@m@hQFeR&v$X#PlS;Jp3K7AIdF_$*EQQZfdz$?DYzxKK1AkZ93i*F~nVm)PM>%EvFle*>6X#8WdMihk2U7@3*P z;m;H5#+$~@%?ZjSQ4EJd+A(RVSwpt?E^e5pcUrX8-%%6x<0Tjh_i(3-_v`FG>g`M$ z=Qx*gXb!VrN%^;WibmkK1IpDx^)seP5Re5UMejxazjF|XPml!p>jxyr<}ywPxp(|i zWqj7J%=gC~hzVSKsC(<9uZRau{=5AQ<)P&~;{$!Fy|q7$_2%Yz{gY%WDCkYQdm0S} zj0dEj@?wVD>ymIDjj6S!ao{?}4(Qr&mqP)M0XR%%*>EpF{n`xmV(V@efz?TC?1lN1 z)ZA)|qxwU}8Zu$%Vs6hf%W=)|vRY1gQl^0~a;Oov@D5Y~8Hx=A>c6+U){yw>kja64 zf%*s9*wE%zGC2`HDG_obc--`661XE_px8~1$b`;o417RCdn?T0zaw7*oi}tlpCr|4 z?WyChsd~MOZ6r<@AkyUAXY8|Nvts^W{N=Ohilmg&r7q~(9}laqQ>IUX7$$9_7G^D>*bYBV#htWN3i(g=XQIblD+U|dxfGaTdD-F}%GSI@|* zlJvp$uqXMQN9UoWp7O9j>7F@?w@WPjF&4O@&jzm(V%`sXDIO@OyhLYF+WJY!U047Wzt)EPJ+_dd$Y$2=x3`!I*k#5hkP0Lpb1nDMS%yyJB7NtIj__X3k57gR5c zhwdEVR2YMBbKa!5E0gR)^`btckW)bmGwb+DoP1|jBv zTi$t4<;Kd)4I!&5&H4M}ptweCb<7C_PJiC>8VE6E6a9NS-*-Rw42ds7S-VM#$v|PV;U9Q@F@F#h;L+dx?LZfEK&JM z&KV_qIqP3?NdB4F(Y$KE;gb1a%fs(0n+UJXONjc9-tqMV|&Eq#}3Cns_rg&(!|e7T(l z7}_thL@}Ax=qn ztZ|CYoL;cPCXP%xnDSjm@FXu7B^deQ-rk;Av8DqJ=1UBI)E%CoLNgxSYNIGSd#|A> z{Vp!8z}KXPQvufOuU$SZNq@V*n;0d_G^p5kQcneH#)d!V?4orK%#PYq#%C)by;FDE z{PS-l7^*56k0GeV;{gBQg_UL~^<^G5dMh<5vQQ;w5QM=479;?XTpfE-d47R7El5e{ zUKd~N#r*~QQmsAG>-*%tW=bK5CjatWdut;~SHQ*8!;z~xVMPQ|t(8(eA0VE>A>f5` z{vY}CSSbq2Meq~@nYZ#pzibBrc6R7IrPMwj`}iu0+E!$QZSR0c*~yx>=)^sPyJ$cE zYb=PHbtIYCd662-H%2|}DiA#OboAJCw{W=c0x$vX8zjF2?!?slaW=lgXdn&cO>cSS+;7+`jh8r{A3$dGiuY41(YaBo|)4x58^LbTG5js!scu2g-)~UMbfB z9tIXES->eqn2>LBOX*fJw9F1}h97}03nCC(eCeX>NY|=}ikMQ~3cd5qM>`svF>^U! z*Xzo94kCfz+Q9=p46b$?mOn1Gfp?I6&X>q7m`V`Zb%d>haz!3JaDQ5TcJUsH;*@q) zbY?lj z8EN1YOU{E6Jw~vvLYL>tN;wj*^$*ed)`w{56XSGJ|Cj>Z*l~Vj@~uP+km98v4#ljw ztmM|jb~0iEt&rA$S#W633y}U0Vlaq8m%q1=gAkHi02JLog88;taIRg`;&QTkLDI}y z^}@5xe`+VWd;ipE)>$yx?bDXHv1v`kk)w^}d$fDfv)Luet2JpGXz;<5RL)?t2ZYb-EuyH#ECXTwadQQ;1W%U))lC{Kc>5(p_>vd&ez7OLe73K=^rq#QBmM z)C5J}fCRU)wfp@2gF)I{UTq$QSut|W#}!_+8TV)%+~Ge%8=zkXL%HA$8vLZn@ZQ6E zBZmBexp~*hnOrePAFrsdMf5zZ-EQFlAp53BHQ7f8IxE2Znq8k6h7<7Pa+ z6(KWwm?S4aNP7tTZ%}&*mai7c5=I2^J2d1mM}`alx#xzcmKzFci8cE_CIpL`&~kI6 zZl`6!*0-QBK@q+e@HX#<#5=J`oup4ds0jDW@lU@~_a%Hh@TgiMAhZqJV)=^6yH_>m zD_N+1PtEQLJ{+2%OdQyi8n!R4yjI?f!1p}*DDq&AO5{A_L zVXF530C9`S&=Lw|1z4d7W@^xgmsPV3S-P){*@9`b-8-7OsWaU`rq5*{6iWH}bI=h? ztoQ6OXzxj}zNTJ3l(%Hv@CSQwe}(s0rlFSe*?D0+d4_8Mve!v+9Kn17PC6nH-(%Iin$>(_;}&s~#qh17Hep>VdD{$+XTKwem#~AR105O+SpFK! z-jfoJMNA#805-g~aAJ>zZ0pbfF_o77c`m-@cIO6b)=187Bb}WD(Y4MDFzhtk$HLpB z*nPrhTGzxPjc(uBKM>2%3Eau})_~}vUXo=RKR?Qn1G`Cv+A$5#+1@ZL=iYq36YffK z^h*t-ykOYivYXIk;-HO!t> zn6}HzQ3xN;6kOyPS3qdYLDsJwGmPBZhcx_TkY`Rekd?i~5uMYxaA3<#og=PHcSLS7 ze58Qpvd~WQ^bdc6pKxBGrHrZGUMtoi_-H;V5(pz$vmG0@1f%`e8ug5GzIi892Q00B zzXCAaGzw$lsXm8Iyx+lOyeCTzYVZSu+09^qgUt$m9IAV|#w@wV8t&4s6#>WiuzLV1 znL$PShNEj<)_3U>EC00xEuz8{6qSTpp#US`T>;-zPZ3!*9VUY#S$C+Je3VxMw;#3g zi2|PnK01gBwNN1(EYbzgxgAEso;1SHM~E+b@DPtr#60qq{U7c8{Q;^|25F zFISf8+1`;i0rRBg0V-teT90v)0qr$ba$_i@9>%$%B_9mwpy+Pn{1CfUyiV@aJ6gQU zfEGH(N?s13flcf3{t%whjHVi&o}|c|kU!?X>FNivj1*DC??l7x7LxPMF=k$Gz#II+ zfUW^-UIR<)s=A4;N~tlRU9LRNf9!xW$9!5N?4z|P6{4|%1eRb*V?Pj(U*}(UYCPc# zK~6VgEscxp{}kTDxwa8hXk|k9X8;iEM!T}P@u+4P)+;D&6e?xU_lpZ|+rJ%*mr1z& zTdYR*kThY-Q@U_5+}YW$ftAz+vxETuct)sSrWeYhELxkLTtE?SK?T?tJw<~Ym>d7B zmEVU4DPeLi)L``KjtAlR6F+>oKQz{@w(Gj^s2b~zhgtG=3iA^)p?NyvVjuQ>*N8Mr z=$5P~W8kOeGi#I|jnZ$ll+!E{d~BKym&W=^p|!ZlstIqlbB7&&)IsTtd=4|ozMu#r zDYW)#jNA#W<c`YJ}un4@Y=_WhjhKj=dI$>Km+7!UHynPM*+Dw#5z`=8s zyxw=?ZtkFDHC>7=ZzL9Vz<+e)wI*YQMyd(Srv6mjwgTCJ9+DW<;+MgO_4C81dX**5 zMe^$naN9;&-?Jy9@-(prTKyrK5}4DmI}@pNhqr#GdxZaWU3Lf;Nubz3%deEssnE>0 z=VCZ^)k=SZe6r#jDRs#{L(tLCC(a2~FW$G&U=Mo+YzD~$6-A5harkx$T>+E^YVQtS z$n`MK9}Nk0z30hAT9V}t&q8P?Mm$Nyl@uc7O+3=V#X4yLjoLe-0L5iQ!9L+x}#yx3K9@r77=_8hR=NwZ`VoKuEL)MgFUh;-hz5Hm$DNu>J zebUTF3w-OEt%Dbwm|Twv0#YcEDi1HMXMfqFoiq)H<9-FPvIok=>g4I$UV>AO7`;=6 z%EK>~yTX4uqt+ZxH=aN4f=CLZ9E*l+OYst~jH zs2?1%d(#tjCy{OkOTeqwOu_;LPgbmBC^mx*GP9myly`wxmHy7d{*>lL8^$LzUgUjF z_;8Y-@WdvlLp`pEnB!Man4!L7Fr$SR6U;$Nzq-MXZFT6DSwnauOv;~ddu!O~P?KKU ztC)-E%yb1IVwCOSC)Ngej()FUs{9XBEZBo#LD@Y^2MF*}s1EYdvI9?s=|+OTqD^h1^8cmW`)W1}z~h+gYX-IvUL&6+DV1 z#bqMx*Vz!qhbm)w>p-VUY-ACW26Zn)l0fVN%wb3gaS15k=o047+baEfGq*@-0tp0ZWMAKc8qG zL%}AAM5&HBU&0aX>NQb9%tMc=#UFRJKr3m!vgfJpL~_$i*UP)_u*%MbesJ%nb}RyK zI;>XL7nQRZz_(^J5Fum!jZE`Hxraaa#PO680$BKBEw3Ovp*5l*7OKHeQrnAumRd*w zMktoZU=P!81VM<6Smb|xWQiEb5{OSPddd?#>0!FUBy;Dz<~2=y=+f%OZIY8yr5s$a zm)Re*uo((ik`;EdX#}{?d>XVS8NH{T3kn&IQSmyzDg*=19;D(OMY9B|yi_kF>S+uf=Z{wV6uqwtqzyjP5T z2SOW1A?@&9uy$4-xsx$;lF&~42#)#Y#4gKK#aF#7ajymP|aW zc+jJ84!V{^Zd`+pTSW_{Js^sn$nF>lwo{OP?-!#5esS?z6e7JW%oTf@5FM^VRgqS9yd zLzJle^F38Iyd!h14iEeo&}v$`2XF?swv_#vwV?Z;Ro#(p{)#nsZCBos1exh;S$b&o zbH*tbqS@XmiFa8lur&PCakxu0Wp4h2OS;-Z>A))xe8|x^e1}qn9y$gaWNHnR70sc$ zaEfQwS3r`qI7ms9hHrH&9x>ejIuh9-*OU<3W36Wl!hL;FPCO0yg_UagrTL>iE!Q|} zK~AM>H_9=)Sa6W>EN?3b6xDoZaJqET`cgLKSBl#kFs*R_+OG|?EwEoH+bI6Nlb>4N zQItz*Ug=#KLzHXvU7ERs{D0f=E+-vY-H&(S22QQ^&9-IN#QFmw*;3OJ9p`!58_0aO zAm0#r+QT$V>qV-PQ6y`FgLfta{~A|TS$L234lAl-(>!P9j4=MO=^hKGf=UZKBP{Q- zUcg-T^hp4@7!_*e?c=tM3)Ta-f+cOBaph_jiKtEKqQO6qOx+mOFK)Las8f>Xb3xAB zK5t))H`5{`GkkABi)|R7^aS%ZYmE4SCRWwFts;~REc+2-Wra9rxhsf{IER_NX%<29}h6fYO!+77^K`Z_TVD&GFZ}We6DvM0D>hC@sFU7sEUS zL8;gYs13yXr-}fgMVYk*u83EOC%+Vu!Mq&X0&3+I$J8y?5SYrCXz7rYyZJotuS82_ z_MSSnz8`SOsgThkpWg9lR9d0zG!mF9^wMXuMVpa8uFlO5b_HB?(Cl_2IOSei8qX$o zB_T(;Ou7jRJO7ky?^96$Z>IS2+_1W=w_j|jO(eXSGb}>O#DvJ@u;%HD#{=rX+ukxea4xIXiy z!&du8bwJtwSlLSNoWae)jN)QUgAN9ah4hT^vOLEcr}^>UJ;p13MD**{|EHms>r;2hm7p zr-A1wGEipp{u4re+A(-q$c+G$L;JGyFCd{l&o;_*r;QelYbP~aD5F{vSv=Ub=Oo~a znP`H2ueb+CATo&(2^$no>76~c0XJ`)Y!SwUC3yv53N5RTaa%s$ym95Gub!YOs>e9x zSrFIWTd)2VQAyM4(Glt9DaMcx>E(WO_F%hf2-Cq?>8%QT3_`Y6??Fm^Su$t*=M3Rk zwPx%i3u3`=?nBkp&F*mGJcufzT!olG6f=uvv4A~>S!gGF=l z#+3+(Blza#bLD~KaIpkVW3)Y0R1=tSBIomVMwS8m5)ynUO5VU!y#>b^^D|3|I`N+= zps_SQ^=Y1=HR;hXWl8Ed>=^b=n+cg-elBS+UWnZO2h#)MOXF?q1!mIq3s+!;H52mm zyU~EX+;KV5r$a)zbIh~9OG?vQWn#f#dymXZ*uK&+4Ewn`uY{TNsorjfX%H1N)5QmH5 z!Kd(>J%ZsPM~qlJE)iz|5QMf4WHW=@^ndRuNf=PY0?W0^FrZ^-t|z4WF2l`gN}gKA z{%he;oh*8zCQ;ZL@KR29qdQ(o*2k&hm|+%fW8fnj6b#@g?hv#gMwfksplSL3^>WBw zE5%`w(7E%appv-7w8URz_&;Oz}|AgMxpgk{%Xd_CI4%M_#GNofp)J>BXO@k ztKyu@%Zt=ForI_AOUs$Cc$h`7`GngWZ zp!Obwu}$VgJ=(PUA|9(RyL@%K=?b)T&IwP1Q9=e{oSS6$-6!M`oUJ?ND+t1*g(@1R@NWMbPzd6H9v`7ILS>{VDSx(g5VTeoXaP0|up5SBixKQSk+qr7a!rsm?v?o$F-V?3 z(sRz_TNwhV#*C7QzoxA&|MEpp+zF@>ptt6al-yp;>L5_X^~H;yMZBiB^V`{#N!j9| zPT6vKyRaM%D}CDi@%0d$p%rm-3wn;w>hVlmS?(|^*qPxB&Xk*X%BSh6+G3}1j%UAN zxJ#kc6rqz)lks(WMeZUo@tOKpWOpv+p}sgkuB zyI2$z1NR2IjDrS7@ogl^7ReGd*g9)2I-O&H{ljs!%+1|$z;I-Zx~Y;Vxxf&&ivw$~ z(44hpU<4=|$(Vatlhdc!4T)nND+4TCl8t6#^&?sgkwv(*<|((|Ew zy=QriKecXdi;fSfIHH(34t-pR2D@}KQdRSy zncA&rBnJrIQ1yQ*-m>~`%%)wV5zLQ(+^ zYJOq|=6Dp7yR^~(CQ+-z1@zl}UOmXT-_N)Ua)x@NYe$6fG(u|A$$S$vvFKgz@`t^C|IYf@`FMFurf zCSpgV4%{yZze)p9Ms5{M{OcM|NMrEa)^S%tMvfyi`@5ngB*PRjS(E&D4C8htQODy_ z>IvO#TQIS?t7dXtB?5y94|y5Mqg^!k`lV?(_YW4^qY)1zb&AJ<6A()iL3J5*c4t%^ z21?b-Msg1KERroX=9s;D(P|;EM*vxT+7_Vx?LQGSNYz}vwpSJXg3gY|^a78xPLVu2 zCAe(agndI-az9_k7MBCB!TSkAA@#Mdl;nvuUO7Z1WpH8VZHL=$sB@y$Nb$%6w@+|b zO_TLsTOuQwS*n1pp~*siD+pNYvCL64M6q!jCvN|U82#P^S6u8MOmls+86fo(h$B>7 zyFo1+Ko6A~JAUy@ilaf)#-q4#ovXXe{*gZR@{vCbA}zVu?r%o$E7Y2o=84whYm7`O0M{j0GvR>F-t=2`VX( z84yF?(y(Gz(+xyRIH`qcbAl4}7xc?))7l0`tQ&U|0;)A8u`%%rWUb8}9yOyGGC5*y zS)&U}z6#?OeDtSY&>h4g-=(%x%2NN|9J zuF@f-+t38MLBd2n%N-tXpq^Pfj;D)8ptHw|$mz9BQ>t(|Oizf!7KkO7^zfT*4*w}4 zOqgAG(G$&-_)6N1CUpge;>B>64`<=yllHX=V$K?|$*H{yS9T}vx%9CSCn1u$q0P7@ z#NA$BBb`+Wt4?$7W&o%AuKDJzPqsPDcs89Z0Vrzd3^Kn9t9^NQ&O^idE1227p2M|8<@5$x zAjUT;uOAM`0UtHCT*&<);8<=F1zM8Y5&T5XAw8`oP-v}Zes=@e{OGFda39kl=uNo0 zOg;gVearbrc&vu{ZLF!1?gSU7M>#s(GJ#Crm8YSNX97N#r&7gWM^JP<#m2@HSxG?6 z<+lW-UCK)%9Y-`0rUD%z+5ylqC6-i%SG0^HnUw;5{Da? zHzZOxeNXA8$Q=rF(h#yw829VOBcTb7Rs7~P$M-`ozXqDpgfU%?=R4LN?VkeCZsC)x z)^1}f*0XRy4tM)no@`=m#E1I9K56Vie!U)vEw@>+T0zYEaHx)lj{)rDiu932W`0l# zFRt{ZJLngE9Srw7`p>T7L z29z7+tz9(@Y8>Lb>>*$yg{B;0lFOdP8rAmLeCTq81P^p`nNmmbkyFaHGY79j1IZqEykF2qhJlJ?>k2+L8Mj6I2 z48Xk;kwjHi*{8ogxnN}-sS%Wp!-t=I3L+dAg0E8FrY}OyngbwRavEfsxi08;F9nOY zU*1Qc_#e9ZlRo&zS>wl?@PUC<<5Y9Q&ql66G<`{|YnZ&MOk(}r#wZ;;<|erLdQqJ^ z6^_H!tbj!Q>)pO(=rh=mY=0~De?H`7sdmPhAn{?pw>{S&=+dmzP*2VN)@lJ?nql7X{=JH)YaFtsv&nTIs;iGz(_ zPk(yd#FP{JVe_th0}-ovZWx|{b?juQQz+Ewkk+LaAkoKq0z!(12H7snSYqea<_G)-UK`nKOsz;VrWHW8t> z&193d2)o{zkGG(n$B~-7Ihlx0`oP)4NH=107IX~##s@ilS1FKzKOuNUx+ng%u4BGz^LAN*GM z(sCQ=Tnk-VH>tk@Uz9PVx@MZaN5_QwS<*=MV%aT1J_eQ{i~T_*azx#!RqFl?Z*v zwV^Bc5lfV!<6G@k_&`Y${bHJUYbbesUF;=m_g10}iIlaF8qA;?Qok^X&&+TW%i(`-i7EnU)L_Jp8$FS13Z=`eIW%KrkQxUyu)?p#thH zoSB8sT*tNSlA-+}XHPY*hlgLuez+O(8vvPy#asJy{`=3?=!>|FRI0T2_rxxJ_8Jit{V+tTkhj5A3AKB$_G6ecIknsEbzW(jO<}tCLSxm zo|M5jdyPGx(jBsL7^T$fkpv3N82rWGW$*!*On9C?-Da)eSJKr_92>a6$&$chblU$U zT#k-qEWj3*LSC>ZYh+anJ10acIbvi6Xt_*aL@Wdk3~p>TD%p=pXja$y8)E7ny(ivd zaC7s&8=?z52G|HzL5$%2EV+A4SZ5}8)GL)F`KA2Ao3H^+t`}zG6SYk5%g_9+P4hl#o{&TLZDF5M0BRst{YfVL8ovl~ zovjl29Yoy(Y220rC5i=R$&m;~?im)?x# zh#FQ4=Q(PAu+nsWo`DD4ri(5+4CWa=AkP|siSJMwNpczhi5vWku8gp`<;R-BW-R== z?KaIX!V6?1w`~N6LL#xEqvP;HpLj~>I2NF$h7-zU+G(MVN3<3bm>1=q~weH3vKpA&3Td8Q<#>klh4 zpRTAhU7wGj_mJX!+CKb1da>Gi<=el#(LhZy-UKU6bV-?h92c1fpw7m$5zkijY|9Bo z`Q(Up05r9;Nq`U*s}susdh^0bWIO2YqB+i*n%WCL-JB3i11LrrTFHVXvRG#8Kc*E`o0vJ~O+$zcq&D9>aSFSANc4J) z#x_(Gt2?!>3dr0o)1CA)p#8-AHEd;F2lc0(xJWeao#4%1P@>8f?uKSI?6e}!sMg+< z9+ToVJmeA3-jE`)uQ;!G)Df!vvePvQn#hW^4Y_8LQXV8-rA7=ax_}Irl$g*YUM2E1 zEO3i7WN3<%isFMfXbcYR{%TeMQP1MD z7P_7jrgB|WCaSin!e0Mnx2+68!>iw8mlfu`bXAN}-9d|Cl9Y*pQ=)EqY!P4wYv*x1 zUvV@km#}tBE(R!PoLUK39x%Q4Pbc2Mlzhj;3NmM%Ie2^PDdNWl!^HR5a`5SL(19{B z-yO6>k1x=8M&qfTu57JiAtT z1@ia$r1b2zR$UEkgH&idSe!L5sd4p`T{xZP+1AC8C|FlO!?#m%^{Lli3RcHxI?fIrdpON!YDpvC+x6j$Xw(QeP3 z_0_H&#|d&(YL1G8*;Cn=lZp}^z4kpLlE-2FBpw9gk=b4|rn2GcsIzB>rT&Y% z(-#CQzSf`!SZp|T6_@-hJM|__D(vma^#;&mH-t6@M&_cv(x&^@LibwwL5Xhzka z8_uE~^cX@${miLx0isp~d>RZwBm-rPxnS71V10<}>SBB7voSKTj7S$mFtY5U=B&NF1yJr#xYf(>cOg<|hF!cuiC?jKrpTLv(t6U1r-Ms7z zJ-+40uDL^1o27444I;0w##N0_nh0tv1Tbl~p>>IGHg-&R{J)>cv3pRJ(H+Xoj|w+{ zt%t!mZ9(Dal+FpTQAx)2u}G`k#DkZG^qVv@t84Z@0CcJm;EI%Z6^tt8dCvI$%q$$; z=zbeuWEb`JS}5pO-B|`@r#qjAS98|6m&kJ({!*pJcoA?T@Rn9j74Zo_L4^^icD@0O ztn~1 zV>+7f=}}otTAB1(d|6iXuQ!&oc0!qBlY+<%%w@5w?Oh4=bQ1v~d>WK*eJJ`kHtrk* zFZU|eJe1E0qS7?X<2v2I>8-K+w!$MdJmT)8w_!&yC~GJzX;#G739#-{lv>#IszcP< z(^V)>Fbl1EQWytNwqg}dBc1POn$t1sDq zoS3_PU&?#L(_8h*o@|heX!hg$R_{kjXHl2|eO4vmt4xjx)Yd5mV!M)60?jlYXd3jg zQA11hc3E5d&Evx^=TTd?-y$n%`F!EZLm{s-Bq5bgcmB?%E@Uf8n?Y@bocTEw&@J$= zmsD)8qm58xvmk%2!o47q<6XuXMe<-47=09@14^Le#ekdhLT2g=qz4(=6RRTph``T91>E{}#T{Tys^8Beqta^6lQwW;)Qt z*(0ZSRZ)^qy_^H=7z$V&aiHE?6A{KSl{q?jrikgHE>N5k0z7IoX{KD$#`OQlTLT3N zE))&4?5Hamhho4})LkgCvDeYnI*GN2;Na55A8L1;T-*=rH{!o&p2+~kxxFx3t}+&1 z7U*OIx$ej&#@g~;yJhjx&}m)qyxb}NxCr;JpCqOID8-mWop;o(rZW2P@!1<`(a#{I zu9VLe6-D~?o%o9f`lAjoY9}2acb>;>SX+0UqRFYGzl0-LKC<^vb#TG{?vO&zO2LR% zYaS7PVemTJS+g>^;88vHFhj-HIusw%T6Q2_L)xV1ekDmdJ{s8lmo<%7$p5T?6Aqb_AdiSH?zHKmLg0v!lHdO~PL=<2$v0!KdWiLvh{(J)AhHn|9nI z1Fb~0K6aoU5x}3%kz=>U=B5QIDg~mmBd&HsV0XLNnC8K|bg7oS@FEod^;k_;1$E5E z&T53QYG?{~lRME-Ln<~r(0mm7X@n&3@0r#E8A+<#b_@GxJNy%emLfhGztPzAZ*1_#4_xFqDRw;oR8HlADQcE5 zzM)FYByQ%r6o%uLk9d(nH#PshTmDW#d8z`OJKVPPJ=Y=O6s(+SHBNHQddxLSg~Dj& zfv&t1V8wcoEP2oYn3?rgrk8yqS1DmUs@Zw>DEPt*p8 zmKK9STCF>8m83kj`!?uywq_PcoYmH_+yq^boJ+zoy6o5~L=y2VrsWGqU+f(f+f?WM zE2|EH`Ym3N5U8EfA_qt_eYm(|!i$nlNT` z+mslyr*9bVdvzqw3H<4(Qm)HdpD&1@o~^1im}bLZ9-v|TsQ75aMzA!O`{6AMG51^M zX~Urwda%KvLAI5G@;J|4mTNq9kNaFRg>_*T(dyl~IlK%H{B*VQjDb~HW6eP@Qw z0fTYK_HL=|yUKl-I|l?GeTBV0bz7V`*Il!7c>L;G-= z)8~8>L`i+5;~u`>qs!l;ldLTvKG089KJ8DUebkZ0bdr&15qs}RP=Gq*K#+{v8>kjz z`-uSm+o)z50_>QHzmC$TOOI-&C{_nb7E_bSi`<+~xV@Nia+0R*yyH>;o)Ak9cycBs zGzz^INE`$Ch%Q8~JQ+KnUESJjK7h+2qpJ)~hem2$o_LG#1k^8$9@_I3Kxp*oEwbHn z9|HdX5lO=9;$iFcRgLA9PTIH-2|XPkvi#!}n{BU?!9GrH{(?h4kL}5`Pdr6FP{~-gX0v98enk|B z%=#cAwcgcV5Es`T3`#tH2l)^BlV2G-iV)YQz$F5Ce(_g+03{l@U#?75@3+b%_4YE; zpbQGOgn$S`q%uzqQ#W^e-lYz8PgA>yrYBQGcASUq$m_VPLpGWcs>4co%#0BmzE)Qp z1D~(wa<-eFL53T)8_(ss@#1MEZ8L*z7&+bkHZV!sy&Gg3+cQrB2RsRyS2Jkv+Mb#+nP3qvE++wmoD z4?q9CPfR4?5N@19`GSt}YNA}|Yow=CU|UZR#j%Q(e_fhnoPCvLUt#MDBQb^y80E}W zHX8V?7~g7>1Fsrnqb%>n0%#1lVv%rf7^YgCDhaFKqUip7pbqTpo~TTHlJ0sH(S4@n zj|RvZvSPCzY*9RSW)z>WfenA0Y%yZnNb#p+hmP$kn zS0&*BMv~XW5{VXABQT9Q2t?1pq6Poc3S2VAx4Zu1`rOdM(l4UO{WW=%&xBsXS9a=J z#Q4*olmfBxIZGr(v@n2p?(SsSF|<@NhjA=q6`ImuBRvJ`ER6S|2hM*3zYNcC-OtjuOdDWwN)sJiL`oB{-vDg(RjzMz@GGq!vB~*~)bnQTtl=O|z<2pgZzVPxEGW+H5uv|DSTxGoh!IlAe(KGAKOe2Z`Bzfr-1wver z`s?1+P=5_zkAw7t<&3c@ENKHl&F4G-AK|)^pgFTi+P#LYjTo<9(;SB?qL7Zk7bxY2 zWjT*&e@oJu9n~VzdRhM~f}0|?lJ~ks(i+QK%qPeO+c`Ejcr*_n1MHJL(5%& zyG`T$Q#*RHXhZ)8_}eopRE+J|9$2%^cif>_S`ecGV9ME#kh@Yi2BT}pqKfT3litYfQCkTyjkS_=S~@z1uLFPYJf`!z#ba6Hjx)+Jt^7>-Q(ybj(U9^O3&MuGF^!R(q| zi>QoP?ARq|qf}Y}ul@e}B?W;nPd)BM=N-Xb-;bxDVO$5`Ta01AD84mZMs?=)g0NK4 zSevPAJMdH1EJSzm5yK+MBNXjM3qBQZp1n?>E@t6k{?vp^`iEQRadn5ge zy(0R(9b8Nlc43Vy1R{%>_iA=J6(|Qz7=uHJ*}XVv@X9DlgO+vfOZWaQZ2(^kmq3c~PPZcdVHJ^@d`T5_NFg(3r8yQ@e$C`n2X3oN4MvQ`$YcK!YrVaPJM zdvZ)X1E$#PqRiEcrzO=hlJb0uIQfk}`k zHA0|6AEoW_hsX6O2pk|2lfl9hz~KE<2e*}pk}iQt{dRue`3_&IUNq8pH*Yg6B~10u zX6OcU3<**PRmn(9f!&vK%lNKbJhwfk`hQPhRBuR+F9Ds*=2Z@RDqXuS4SgU4 z7vp@{#lIa9I@L(xQw$|tm7?;%{C7K!dXAoOoBAqDzGH%C5M^Z_(%tu_v&P-%Y4M{D z>FgIkaU_m@Rjf%;XAe#}qK2?uE8?Uh`}`?M3?y%~|PB`_1V#>v)=gO2xt59=mCZt|Atj zLut7R(*<+%jx%w<&k@Bm)WL%`s`!KZ#FUzLbefMvWH-NFEyJ6yD?jm=z1)Gub34QQ7hxn2StCPfKs-Kp zJ+K=6Iu3x|pqN{J@IVG!)z#IuH)sr^d`scE+$5i2sJY5t=>IAyG~}u0w2xpk4&ZgT zX#i7p3V|574M>kx!(&F12ciCkSt=Slu{fo)deCkW;vgm{R{tL3O2u%iOq$-;Kyw3< zRvIYYI-a>+o$~R<8W}ux3}Ind;>{6*!g)FT>^fF1hA~$XVr?$ecqbyL>ROwvA~)y2 z3p(VjLD0Ql*3IGXb)4Rib-aLbcH<|xC&~2y7k=qYp3VNVR@R)8?tD>%bP7_2Ggz{) zGo0?Q+1qSwLfqm6mg!!af92=SoODT&Y=yP+%!kNV7-JgAVw}%Z$x!4lypq<+K{F!Uw7j86M@&0mCP(OU)1}r^3a(Y!b9i)B6F32K7P z;kErc_#d6{vaHFiwnw#-OoKF)&|J}~%u)^=ov0*M>O9acWoEt0YbL%74GmI0%rEbb z`X)zHnT11@doAXq%Z@lG{gQ*RN@C5Rf`d3X32Mk()rKW#Ci($Avr#Q%_VI76Yg#;N zzsG9MAo0hITzss&eM>qfQSb|7I`RAj5^udK0|1efT8uCG6Yn!zf9j}V2)@tGE8^FR zfmw#8=AFy5Xa3L`s=yxcF{|>CFj@-?;pl|XGxwVJ(ZHGAr0BXzyDcw~ zA!1Y#5+^Qt@0>(2tV9cq>BVd2dFRXtw_s(-)Jw`p&=+8xJl4ac)dK03-LvM+V0?yT z0&Q(${y*R>LZ&2}uCjtKR8!P&Xu&^kLAjm18RyunOeBH5v(y3SiWsY>rMKpJj>GvH z?rVL%{;kt9$-(NIN!{~o`3G3uWhGGj9YjK$w26@9ath*ZyszPQYq#CV<4W zUy8LQd0uLV4ULAb{M%_wIQyzcvw)FSC?HLA0qoj}WR9vxUf)QFZ~f6*_%xlaUh~u0 z#|#&R1_X>S0W>pvUt1;ImvL2ESGmcY9GeZ7?G%V=r*}b8_)(P3jU}GNJl%|q< zo@owyx12MPT_neKmWB8V63f_!W+Pcv5q&JHl(#~SIG)xYlL{Vq3n4l zn)`r*(_JSs%e4pMYEi1B^9`L<@(%O8?SL4pIOaxN5b@4XIu3c~P}Wehx@r612=3`Q zkxZP2^ein}UQkNxn&yHVIOY5TBv-{Q_tuWW4}C!q45dUD3@knOU8np z;sxYLj)52LTWa1^7=9(hLS+uy4Va1M_na1PG(`zhU{*zR!Vf*7k53sX`EPQ%mAAOTx!BHX;y3V z&M>ryMgcH>R5+r;(S3&}II$Wxfb4q2f}0&Z8I(GaKQevsE}ZcT{0&3x36vpBxpfas zffRD;K>DRK)O8b;#fPK^lU1DlE#VJL!lAQ6byzgCsgPR2n6aa~I=IOuHkYNtL0zB7 zB_ncv1VZ)T`aqVfs}SFBShTk~2Z5ae3Tx|lqR$P-&p$NsMGP#gPn6#o{z+ z@{ZIbUfUBDO-wx3G;kZ}33%m{3^VgHLGw9%Z{nLrU87*kMKo&MFz~5l2jO%UJ7~Zl zYkGmQi+sFI0>f&>84em4(S#;0mbAaFO46{ya^q+-jB!N2PO0i&Mo;pu3%7sb=wquj z{TkY8@!8*|qO3kn5MYrDlJu3zAI@{d@sVCTP7v!pEtytHdIGTWAeN<+ zcHElJ?q7mIus8$5P0vn9Zf%&>PKBi8OiUdf-tYnB(9yF{>b8-jlA^aN&6vck^! z)^nl^k~p(WR9SXYIl!~V_$ zg%DH4;brYjy^k9ud1@Bt&~5`=(B$57M`B?0W*@h(C&a7~J~XVbMU*p0S~NlMp7wkF zY2o-GP8r$menPW>cOQVCV)qXv#}TkK8_9^8w1ABLO49>WTdTOntl}+Jc)T80uCxk$ zq3(m~%>Y7+H8Xl+g4##T#z`yj=t;Q5RmKE>-pA{TK^ZA9sv;N;mK9k)n+c@hXe8oG zf&(Vms|&5n*U5OEJ>&ZnDP}Z+;|kxf0(+*}1*dCf`-Y5lMteeG}BWr=$DiCj4 zhY)6k3T{6W=s+!s&JIcBEgSx!*j*qD%|1Q$ly^z=dD&kfB&9v#B(7rq6jrB64c+C2M4aJB`%PFVJ)AaMDt0ds%X|(cQV4X5>%WOu|o-xLkH=%}((W zafXI_+uE28J(r?N6;+I_N5Zq#y%ALk3N9O(d9&@7XPv7DNhWs1dqGvKr~wo#YXCh! z!oS(aYJoi1%6|T-dQCxufoLU;#zrsxGDb?&lO=KHwPgA$0g zaCyJI6z4#R9*)fez{g-59~9NgE!Bb0zFz6RUUxjS#VlhIj))s_k|BmV?M!t-2(Ep` z&qCC#m>cLc`$SB!H5yLo(?ne4srezY^&%j)y%7HY$s%&s z;|X3mszx^S;n<7=@{?*(lP7~zdi)i-xL}^-6rKgyq7KQ_tY<9yNbco#Y1?3E*F4i{ zTulGj1gnxaVB6x%z|?D!eqi`eQ|R537W0vmrBubHUDnTG)I>t~ff_($-eEKdnB)!J z<2~F<;5w}gN9HN?v^2#y9SnROxS;m|NZ-(tu@182_6p)&96ay>^sE@~m_6igDg{FIsVBR_PRuAuv`5uqqP@zpa9O>yBmMWBz}i#!2Jka-Bj~V4s$_Qe zb=<^cjq-A8cnYmNMXw!0vku|Ai@6|^W_Iz*v8%jzjOs&7o$%#Q#pN5Jb!HhERWu(hL10nd7A{X=~0%`A>4kIXGd zvc(1tzurgq#HPiD5hwG?9V4QQvd7)5ehb;Y{b-HfIr<2dCS2Y0oks#67O2l=2E+e! zprzCAa^()-xD&dNqCpRrQ9ozi4yh4wZleodKwIH#Nl-xCUYoblxhFlN?snTZG;aK9 z0V>SB{qQNza;ojCQoB8RO>2SI;2qDx_ti#pc&`m$LqkWMqJyp^(M2tVF7L8(0}SM; z=kN6_f4|gkKMAnWKH!1-!J|akIYumy({jtd;#2zKNvT|xJ3#b{LL~%|>Ndk8>Of7G z`C6KJ^!EkSxiyf3OV0n%R2xz@XXkWb$iftrC}FY=fKT07~qx;c&%@PnTtzwOWZkkkQ- zwQuLK0bC~*4f3w&Y)k)lfZnb~z_?rwHaPpu_;_}6C+8Ri91cCFCbwNnF9q;i-9Dv) z&cinx>LSHrk1;pF2&lv!Z(=Hvp9|V{0EB8r=mA$IDf_VT$*NK>91^pL%7NjV2+jyJ z;|s{M?75zajUx$Uwf^!zANe?auMF)~V~#GSRb4zz_3rGM4%X#~7!PzrRidzI%dVj@ zDd(-oF>9SazJJ%M<>2;d`_A06_O3wiWfH3)|G0u%5C}I%e_s;8 zaB(=~F7_2PfYj8#wHMzQPz}ru_-0rVgg;M(e9wJob=Bp}1BQJEkNU$*9&1(g%5(+f zfq8ON7_R5fEvw-5o#VNiV9Zwd_h*}x*{A{Z43*%%gRX6AJ&aEDLW7iSaF;l}M5A;F zj?8h-3&E+eMkNq5yFmPKrnb07<*SdLe1%jWF0&>c6KZr1)F8roTZ_2x)hW2r#h;Vf zc8!yGxvq{yZkay<`_I23aRk1b1aKV$&H{` z_E$mLs23j{7=hDecF9-3uO|#<*tJQh+$4Im2SLkB;JZ+vrf!ckKzA;d`+^=2SZM6!3^LhYfO?w5}M2n0-2$d)oG;vA0OGg zk|cR@|H_83oG`u+l*djY(!z5oDN$lKm8*?Lgf_(d==n*Hb&L2Qj?xBh6|k>uBk8Kr z8cRZ9R?WF@-LZC6&< zXOA+%kTw&`Mw`_q_~Ow~;VT1CiYb`x<(pmq}fjnk@w8>4SNJ6Y!u0# z!La7sPt+5$J|U0vJbd0nT(4cBAf9}PLX08Sg#&riI0;YNG(7M^T4Lg^XZR>Sc3+;`%_{Xi2%c4tL20F`lMr?)m3Ol-49=J`#L55uEsvKsYT(3aB1up+a!pvahkCB9E#2J)+wb$B^;~m)gFCwDrwS@;f z<>h`elj;{ z<`6Z4P=$b%?8A&~SUlLil(wvqAWr{ptj+@qDL*V^GnPYsTW|c`PI&|+FxU65jHQCT zLzECyrj04a~ju-gkO)z`1u8x78+6`D96hl}(_!EE0$p zG5Be**u}SJLJN}vZKZCHTsG-``(W~8U~eI1Yk$V%*)8@E_6b$2JA*R^s&3fU4B$2Z zEgWW|#H=xot!)idhm2%DHBa9MNiNPZ!xHrvRN$4#<8Eqp&fIW2^7#p|p^YNTq9#){ zXxX9td5fsLe)Y+t)3|+^ZAav0Zg8#ZnJQGe&M8GbGR56A+C=9fTm0qeUm+)&*gKG^ zs$4Mw{{__L6frO^yS6Pjc`_d^ubMa# zi=4K_#caKzW&lwE3QUbRmTco7XRE!U@@r_axAWxN^ESp0h(2nH?OdS^aPBzxMt;6O zhEd~XB+(Ul*O8?{qK5(((AF6t+iM(js2;>Sb{rC@(_PTxw9ka2+SJhbwCnxSnfl_d z^%c5B%iFqZGZwbk@&h$9CtqjO=HE#Ir z08`+@ z)IzPjKJ4A2)$G%RCNLV*IDQWM-om6KMPgYh?3(Cx@Xe}xpM}kgW*yA|)J>P3MQId1X)A(^*WTm6__{P^o?{;6x87v18 zR!2*^iW#BFn=QSHzfmXgOSik9F2jbuaWUFD*e}jp=I10zSisc`3*b!Q@%5A13kV>V zf)Oj6YRc{dCoipI0d5Si<2lb+Dk?N(t-<;2wO)OCS<_Xs3bOv6Z3$$}Y};1g;AKX^ z7BqG4KpXpW^fR_(w@QvoG`n%yCI5z_j~twaH6>;CuLh@L-bo4ZU8QBb-K$2m;&E!< z2H44p!pp{HQMje2^Hq6rVmX9Y*m)wl_^Ep|&N^GO>~pf!ms0;Rjz62w-JXj)yyVay zH&(wCZ}}Mj%Nlxudu7IY*e!BobF@nfCR3{G)c0Iz=vtD3d_mCs&X3kp0?Lzx^iA#3 z7x9;}E^vrKts8svnC^z(W_D`+L1fWUCJO5D%7+wK z6K?8ewgrjf9bYCJAF&o?RU*PSEA15z=C1`mu4>#kOZA@ed|B?Y3O?geCD-3P9wl14 z@*UVBd<^v1eDFaX<*6mfm5wxi-a6E8yuyE{<2y8IB!)B$K14jkF0;ILrrS|Tj7T@C zSM2ZAH)@>!_@~YhIbr3?v4YiBX2fD^0_YOnV5O(;XUgWC*MP=vcTgJ^^bhskr@@o}X zXYFeu2uTr>9D;ai`M=nd^OIi9S%^g^2fYZOoZ1om9;UR#U+{3lKmZt)B?}H$D;{{T z-LPTp%mDe%EUoUk-Z7pdEntDT9nSZo4U(%L?H>EQrZ==M;GoqgDJMD)@MT1<-uV5A z?CE{UYQ}~`x6{C-(@Q>|)qv}wX&xsW-EbgPYm%ANt!TscGff8>ay#N#RLp=QDn?!O zW~nmbSA=Dp?DbQ;a$mb%c?p;F3l`x5eZz9cYg>!}-GCkQpUBuYdW1m_N2cFhIb$Ks;ru}H5iO!mZ0z}C?2eg%tBj{()IyU`nc|NT0^!i{-RS6( zR0?oPsAtsDb&G6bu}vCY1jBM4`CK;zrJdpz^AuXsPsD{Z8Dt-Mt;-oRe5H-)MJtPj z7~0NQlN*-}d5tsJk3m^mo=<|g0e`EsYWR|Mtzrb_^o0tG#YA`}$aK4WCNttnKUrPd z_|n0Th+GWB0&PW}>K_a1K`Q&!8XRv#M`@5Gby>cs5*S_Hb|aP6OArhrqn*nkrcrz` zP(Fx#JtYGP1UQn<5GBi;Zn_&iO@@bZA@Y3G@3!0;4E((I@kAAh&FP(GD9R9{=PB|9 z!h>2*r;DRJb7M{iyq~@>JMq&c2f0M{JneCsTK)`enSYUT+N&?SH;U>$KU9E0E9VRzf!&K+eD<-$zi+#KxG%i$GzJ&swaFBg}X8Q8< z>zPBs#P$O5UEH&LPj}HqKZ+k{K)xv~!^hV9@t0H` zvD1_e*%jHPxRP?p7UP_p0ORZ|L#8SAqc;f6c)SW!m-wHp_PPPU)r%2aEBXlBXXLE) z25#W*QN+GEM2@31F%*AOc+6Xs=o|`rW4`!>YM4cEYQpV^Sxuje_vUV!|AXcd*qY%^ z+3U{~p}F4NTTl$9G}2xTTm3oNN_Oi8Dd4-D$$W;Ea`g22UbJdKAyauUg@6?ce{O;L zYUhRR#|eppuJ4x-*b?2k$8!X*>KjMdfU2@zFI_CFTis%V{-ijLESXmzA7fT1-z*Vd z3H=KA)PLzy?tvf+Of>&Ek*_T(exYf)y8DvNVn|Vdcp(cJv}6Z1`1~rLz&x@-`#2fZ z2_nNIjS#%{;omeT;ou?pj}0`_BGLr6${|&T(6PeYk+WSm$9=KE5TyE7W>^;?8(XV#VhatJ-4Z55CVz|kIkRl9+rQ^&`bugO>86L;x*l7eq*U*ZqSn|oqVO}@Zm=2*Ww|Ic$t zXQK&IhPv^FePG?|=t_|M_0gt37qTD7iVsr#pf&6VBpVvUS>!&ee^_@f0sPgc+OcezTDj!BA#})=) zoGA%26=_je6hkb$@}B0Uw*!@AZRyCC&Ymjb5B}eqBNF#78m{-hqX@iG7oQQ=0ayKr z#p7qNQdpMxdnTpqTc=zU zmnJuPoE);gKrD(zrF|&%x(r+HY6b8pO9t{=g{m?-YN~ljXhXYjV7=Mbjth|fjm{RuAfzj@E&ZQ>IKlj*kYna zve2uh$8`Vul&!m&kOsH@`uB~JpF5j{*NnzO>)AhtUWH-7$1XK(2c%+$IIq=FohW}k zUMC?L(WNJ1@}uoSC)}Yqq2z>6j^R2SYET{U5PXf52{GFZD2C}Ah3pWfzDB2TbT)Pl zc-7kM>(J*y0NAjA%2fyc<`}{`aPa;d8$V>)jV?H7Q)NC45^w zKd%~d4B!QXt-)My)Q{ZJ(-AkgW0Z2+QQ`De9N znJ0}?mqpAKil1$9vfPFjq>5~aH)gCS9Os*;>E#Ez;w&DU3`4#(jEyTQ1vHZO@P5P~ z#r|)jA9JwdA}aQtj-hJcI?w^E_Iac1CFrnM$S!rNWhU&RfAx%TlnO!x@!Q^Lg(OG+ zz%!0^t>Rq!QAnTmDt0=|rkf{@gYR7MN74{BGlK8-hg`X6i)r!GsXI>)Hh zO1zl^QQn$yYT|AlGK@0L(&iLYP`=6l!C6ToX~6YT$M38o);FQ($J8@$EG$`MhPrmX$Nz00H`Y5ra-=wr!K!)|1?nQX7YIt z@$z*7Uzm!ZffBW;=_{n1N-@06-;ByX@2mTCPhGs6H+0B7zUqEbwGEH&1~mDXknhF^ zVqCo7mcN_X)-NBkKtd2WFZbspb@5RZaR-pr|7ZT{T$usSzPTJYMl}Vt3eY23t)wYJ zyNj8NZjc@$eg9EH#*K`{VQF zI9Beb0>TXb#zp`DA{ny-7mOvl1 zA?03xto~90irX`_x+z9`kSW%=Z6>O)XLIm(#RHiF`S)o7SjUMR(#^=$Zq7cv%1)BA#u zdMv#vD7o~b7}a4{LbVbp_m%MQ{juq?>9ZNoD96-8ZCF_p?Z9Mh$=vz}!@Q>0#y-yL z9nfjlBHrArp00EG7od9|-4j1N;_nRPz3p~7j4efW;~ z0&P;$DiiC7MK`{y=!n=?X1v@oK0u*QuwTl%M$!QlPxzsmBkAC#ZlMt^+6GM2oQkqW;;4`#Ha+URM}}?i3K!nx=y{N%=^ZZYXb;=LhhtqneBJvDYM@E$eqJzdF4X zWH=lg&u_)e-X;J#WKZ!gq^f}&$OOp@xls!RZ_jl=GTaJaWd%p#vbjCiSZFXeOv1B1 zQ4pq?N_N-r}i?!;A{E*{BS95#~~Tg6+DY*5u9m(O{^isLQ{~D2+Cw zcjWJlYfpoi6M4^OXysC}M;;6!?mz$N?tD!^5J6LecbC|REeVR-MInGpK%VX?8=u*t z*hb#CDa=eOQV3Ag3aPHCfvqY|u=N{0GJ@rM|0HZ)wUP%>p$}oLt&=;=RABsZxW35yL!HgW$~yevwI+my--6%kOf%Vb zVg%aWX=2Zq!6)Q&Y#5xhz}mHEM>EKPTw>^)=|}Jm_!I2+1s5~>2kU+3|>d`gBswgOWzaUNCUH8cq@CX>H#|O5|7;G62Aay4lPE^AFy$j+&936uLET@^w zOm;h{F|pON_;W}JI~I~)VLRIn=hF=)TC`Z7AT-n?rf%$RR6e+KG}b~Yl@i@qeglW7 z{gKd2EVBouZYvE6WsqJdFpX4t|8Jk) zQt*c{*&*HY8q=k0gs$TA>A)chRq$enj7v|(YYSv(_qY1CW1bxO0=adEwAf$WTrvra z4Yq$1f#($7o$qHne-AT#!?hctVF2aci_RbvNMZ;6lT9S6W1@`mrO8mcjQi##lBJm_ z4}SygM0H*M=7;L&<{Ls6o_~1N zlY8n)I-%15taimx%JAr?cIdWM9nete$TIYK8MtXxE?}pS^$9JC5~!$Z~ze$?j01HXDO=ch;A4E|lhN zcrs3({E)e3kmNG)fy0L~3*5d5@DHN9;aEusm%pvF> zr@ExSWDS*5R{EpxUdkfPC9=d-Fe2nUSbd_BfyJ4e?vhlCtm7xye@siH z)^v&h4aAqLA|47D{;J% zvmQ-%??I{)EbOp~@V*hk`44jUe&azo#1s(wRTC8}^Xh{JYBHZa%FB?h^|ujOFkGt0 z%C{`@C=`2>0$Y8DUxAX-ZPlJZxADllvl!}6Oq7OELoDJ?O5eok*%V6UPYfEuqC{(0 zE?*;h^l%2ac7gnGQt5D@YZf>9uEQRRk~ODV;Bd1-9EFU=@B#at^}R_RL>bYJXb|zm zD_2}7Ozl2U1uuV-N?XngDsw2}@f2?CA!-RzVIrAM z8~%IFF^L;@8Mn@pXV9*B#+vVr_Cdb{VwDkfiZY=_)9ZvD+l^FZkcmfAH{S*iI&`91 zB_Qb4!HI-{aIm}%{EV|{3Oy0gT0(H_V+h+Uis~%BMysWME}b8Q=|MYXQGC&gZXeKv zaisM+dZpkmt>P!{rq~oj>6T^>frD&3uMRs!#tDQ69=R%Kmr429{dpj?C7f*jrJWX! z`qgfZHZNg9%)(c>aF?{;E2w6LWnb8y_O>C_%x14HAz+{=X2KwHmh@2`oFcL5?E8PwsHas%$ zm+Og9J>uRTw?v_OZQ0Azf!)T?alZ%uD+}cH#|0CKaNx@z5zq0JgQln?bmlsm=IPLb zto=G61<%&FDAZi|LCUBURKx5#>-?F2~t?CN8r6B#C^`_M`p&Lb)q#E?6T_3 zwtUZ8nx@sN+(@S++$N8lTQvf{S?4x04Si?6v*@hpQHA-UEuOwxAKKzvHtsB-apL`l z;vS1Wi+a+E>6HYd6BL!@Iym9@DO&{rq6_ik~Y?Br9vGnDK{W$=$KeJC82qf>e;BAs_FqsYn#7Wq; zWk-Gj;AYshd%237{fxd_WnNP(rz-3c1J!L=-8VA@3G5Wy^h&mYFg=$<-l-_Gd6L=% z3tiQw(h7a@HG(_V&z>~}PcsQS>x%}GYhB5%RpT2(EB-M1#PyX=2WJ;ldc8aX^+zdB zv#qExIb*vkVi)szXFZM!uNBUDukd_{9@7l%uc%;L)SHw`lsu73Fo@$-7)!qK1P)JT z3tJaS5x5P6hiv?oA}3;v1?N~T2T?I3aBVHPMFkZ$l&`?vNzc1ae8|qZis)S4q)7~V zwgl85Hcg5t*acie}efO1J6Dm3nf)cF~@B$|-%4iuUaK{I)Y6CIO4qBe854JR^20}48k3Nu6&C*Kh!y`U4($D&Bise7uvD~J%i@*yA7l-R zx&z$XM)0kEE82DTP9lmN2&PQlv-ws5cf=fH)L^k09-`_7@A%)vVv%6h#xVK+=w!;R zbpZ5-zIfgg8d&3UJ!fAp#X+g0+yBbi^F))X6`etwqEFb;uY+h}1a@`%yj8tgT5S2E z(S4sH`>W6S+nju-{QSs>f`l+Vqb1$9P#Z*G_>~S4mwS2_UBaIxS|3g$B5GW@qwghE zsNHI0&Z~tFOgUO0&A@CL_>*bWb&yq}5^2lmqTYI-qE?0Oj>`SHVXn)4m;n8;!}nKx zk90VVl&rA!9u`&Nyy}$n!nj3=FmMUiBL$qIx0z>*hHGu%0%+7{^O%B-x)N*~3@6@l zVC(I!xkI9xHm)ROzgGLSAp;Bas+2zvVjE}ZzdsfrMy69k0WXl$cJN<>SS>BMl^u&v zyHn-6RAFViO1;1!4~g`&_*cS-YFojlYTc!dvfx&@`9H*&&F2}TS}efJJoH}m%Q8JK zMCGUZXnmnQMy8jE;UIGczH=Y7KVvwB}xz!O`S2kSXK) zPK=dBR;=9p*_f411FqL`m%+o;K1oYl39IBT5OMiGeM#}~xjBlTDZh#&{j6B&->Yi7 zq^T;i)3v&!w{n2(T|lrg3*reIjff&8BSX83NxdLkWc70JC%#%JpYsKcwb;bSr^K#& zVUUs1f_-D1Gw_zWHYHk31F_nxxHa>aXEC^|{HTD=KDK~9rye~bNujy7l#+Ngv(5x)tn~~V}ujBxUR}0xhc$; zL^q<8DCPM(%t|g!sss-CduMyONB>d|cHBo}gqT;w9Rxo6S}33l|CVqwOP#yCT1^JEZlh^a>5)u*-0YOk_ewE$s;-+G>F4x6rpmE_;q!>o|m zo^%1D&f4IlBA@v<5rNX)WQ=r8C*e)l5h{26vw||Syj3t;GZ~ZH0yIRpg{=i=!EmvF zkih1p%}M>8ngg4-`YKj&x%Aq)piC4`g5YazxX)F@7RGHo|JwRnADsG#!3w#l65EvpwY2vsKxx3|h{Rka!ypqzw%kBE^RTpvkWx5!#_F3*4(?&cZ85AjBUP!s~WpuSF3<_loijW}&n} zX`sGZdv$|8$&rZybIf=C=~=estNC@(0qh4}0Jhc)^_;~suh1m)#xruD409~b?@+(x zS&2#uy;lSekmxrGfrOmwbAkX4R9KjPs;ZtO z&>hC!-4bC{j|BQ&eMQX;>NT@@oUfDwd>KT@_?xfh;jaS-dEmFb$he>_#8ez$W&m-O zdzuW9f9!DvwqaT$DDaRG#9&sVbf*RDDT1k_zFmyj{uH5tfF_huFBmU0HTcUGU&~g> z$QLTQ5&t&FI4EGUzK*kQiHX+Fmzy>6@DKw+lK zlWC#nSLd}=HkC?Vut*gkLr*JT&+7FS`2$4XXnaYZzM6IDmAa51LC2W+AYNB~2mVd=`>I_~b_1Y2kmHhHV z!<>NlWKF$A4S!SM0{n@E=yUuzjLHblYdTUZxoBR{E&t0-W--jPg=Uqw>l1&)G zb-GP>Ym@X-KPBSd2+J5)_7Z}{?GY=8gJ>!TkPi(N_*2!f%`KQp^{?$VX#hkiJ6-b^UZiOkyCy|6NN zSMkN=hLlzJ^FrLMWn4k$cLH*Gi$Z>njtUmU0hqpnJ?G2f4LQV-#SM$gGbyy?d044S z4~W%}mv;2#IJeY`&Yt573t`m^j+(vfmb3f4I2MDCEUm6uA1wI1NBmO!H;tpQz*vvf zohIphF8?29QKY^=@tH2bPWKK1kJuw47wI!l1Q#}cTfnB$+5dSLT7CQJ=RwjiqR?c0 z{D)n!2hBCSPI2ANBDO|+ykoAf!Ky1Z_LJ!wxnI|%ZGHcJ-8+?`44<~vG7-24cK&3w zwBq_aiw*Zfi-<+3;T1RbDFPvBEiL>c(g(5Obg{`!wRPp6vsuJD25fcP6Rb1BwNT%7 zIU_XI@7Ylga4eR{MzSDTwn5_j;(yzMO3m>+Sj`dZaNXqj%D zB_x_alOg9wCeuSBhy@B~JgQE(`<27wpg{bLg|Y;In_QE z1>M8*7~gFFADfKCrezcPskdnbC;A~+;yVg4n??w<(-JG6lY(4)we<>T+EM{yXaYLe zx+A~~`%@JSsfXv2s3NLCT%;QwC=<6C2DuB$NKv^%2w4h!ovh@b1grS zpY@p6p`q1D+SN;=Ue!8ky^tA;6zJ&+I5q#iPstzPAiNvY*^OhMn`qJ4r9n49sJgHa zVR(9Cyge>C6up{;&4STSH5fcfw{$0TfBg=wL4@Fu;|;^ifB5pkw-X(YU&c|zbP+F0=Fl1nV8II`3im7y-0^++a@m=2FJi- zV|K|s@CijQ+~hUs|I0j!nD$wy4`}eI{+V&k#r5XI!vQLoT>9!iROG70-1-(Uw=;j% z$djICh%z~^r{ktVV$&x0f+GY0REi)g*?@FcdNF@U-Q;IILZ!>>@7DBe?vGoT%x^#GEZ! zY^5tmrn2SEctvPj3beLEJZxsi-bigsh4t`%dyObA`K6<-qb&uB4Y>2|^LZWm>}n+; z5RY-VY!DR@9&@@c9JS)qo$&jcNK21Z4RFz=ad^ox-D~BoDymOqcZ_&epW(>o!}=S) zNMHlDy1b%&q9CPgc&yVbhaVN+ef$&JSZiW*Suol>x#rzwCA69leN2(kp;+smBtiK0 zra#b@-8dT&O0CLVy2+M-%zHC73a@FVi4{hZ{#)eX`+$pGM<=087RAS*sq@WpK6>NR zw*ib1C&DZjH#K2HZOO3SA&S7qQVngBFQCUV-UdpPhT15+f?!xhxbu@No7@f`jGR{) zlu1oH?0`}!IlQMoOt3f9SjoeQjN^^&1)+)M(3~;IMBv=XY1MDJK!Z)?;a6%Tujnf= zQ9jrfJV2JB>*wC&@trGCo*LyHU5ps!=4tu2YB9hfLWcx2WRsXjRpemHLHKpmRbw~T zoapLy@K>}%0E95%6O0MoX8k5YxZFUtk$@|Cl|pbDXbGdKg@FVKGJHqM^!09K1anry z*}uYsU@MC2L!B+c`fLAk2H)Q^~$K_Rx#D+}`XrA}}<%!aV$@#o^{?|R?9ZG@?W^}OhRh#Yzl03(n z+M!g&=UK)gbWI%9i~i((Rj~4M;p{SXr2Z1qUY0wH#-}Lq)Rht`;+tz)%%kBE}~&9=WS|~bA}}Y zXwvvr4Pq^qQ!UGUWnM#g02}1d_r=M@%a+u@=E?<+{F`dRS`a5Cyzjqd?SBbhh$554 z$M|7`W^W!YiXsD&X#UJ`LYCtJ3V&(2Z!<5P^So-ZiD;X&)3$}3#vQP1%g*zLQ{e#? zuV-^xV`dwh^bqp~29h(>UbWo2#ABCFolBg3By_LL3`?H24?-Hphgd@&N&ix>gapTcRL- zwAW;k``+m@Dwvk0ZvZ*V6~MTss>4Cskj2fuhiC;?7PT$mg{nwT8@`5kbec2*3iqVH zllY(EKl!1cQpOW^hv)Zi*xuLGUZIDxD@v5yFs66|s$a12=saywfpP-`vcA->&hzMF zUj-2&@cI={zQD{5iJ8qFzFtA3e`M<-7XpkyMKlA+Vb{dR)CgZ?AU#!LHVAb67V#pR z`Vp(^#0f{s#4ILmCSM9ctI!Bbe`hx%_`$poU4_zr?%4_ z`Y?I;{0>`oYlLVAIR&?eRq??gykBS39$(Anm$Fd&D9enw(34wDSf-kQgRAo@mrn9H z6)0WZq4wK|Gd^z#m_z1;8rT=DuYMo65rQv1X65U|Q=!En@&!ad2JJENL26UV=FpZS zEkdZy(`7)^4N$wH6pN376gM(hGq4ecN7eHrDGwbvKA0Fot(Tn-lzj$apBsh9k~xIt zoFoiA-048Wb%-)sJWuNC7!i)eXVl)FJV|Y-7&qZx+CNoVzn-0Xs<+5AZr)Ui_Rm3J zKk*h0I;E7A`PnC6`Z`8TwhU zVjB;}V8kdVTL4uiLiA&(Q^}uPO0;(03mI6R9Tbj~wt)dSB=K-OBY+&eIs2nZciF2> zT5>BXRAWHy(NfWn0h^6abrl0mcB-sA68xsb?;*zrP8z_+zUzpzMfWO^V!sr)WiBpJwfm(HNq{b&~? zqk`?Jn4~pX%Fcd=TrxlgffC2>L786=&&+n(_EJBGe`6z zas&**Z!Isq+EzJgItE$PmC7-=dDI!$kU&Q=B%pXo%3)YT?<&Eo_QA+hsh0`LD33DI zjpY;Ne0@@x=r0a8Hqf3^;W9L~u{h}4JHf7n3iBF^YDh(rtAj4V*|fZ=?cx(kHur-5 z_IHSb=6Zo(={+-55M%(PchLB>w}4wVYkyDJaA(qLjXpbG6hIL^XI`@rP zDhhzVf;xng34>%Ho$!3*_(Ll}N|7wX9r=#_LyG1g^LXNh?5lv{S2P%ls0TyR9wjFU z7a!A_0~LrkRwONyP)8Qb2D9nVHQX`6i)l$qHIR8dcMa^t!-7$*#w~tt$3W6ahmV)X zqQ!?xTrjyJCYQP?DVkov9h%-_G{VE$5Vsm_1}B@8oNK%#XF)7jhG{SEHZi9MW}Q|y zyj+&VXs8DEF!<{oyKskZHxAp#yyvuc| z4M#&gP!W8`4h?n#;wbg@6^{P~Ssuxk)#64?F0N$0bf13+?{`X9hpvj{B?)ykZC&)O z;>~Sr(L~1)(&>_%a5|7mZ#IcAslE@khuRa*lB-aseekuD)_q;Q6oe&Gzp_GLc?FCV zkTj*B;UGTCXGF8`3=%tfT+*KaSXnG3z0Fjj&5!us$p~-8#L8lgP4b<_T;)a3svu#} zb~$_!&RIb9EIBINOD_M;Rv8lT*^etNvnIgcz#?<4@ZE7@I}XMRUO%SDyTXLONGbHh z*WQ+9k>FL_^8x@{UO!?5ypyk;1=6#@^T^(wS#)O!Zon2kq@VQgH+!=7@JPT~mvF(E zn;!9{;nNo3Y%l2whJ(R_jyl^d|H^?B|MBoKXN&oOhR6{P>)t^ zbN}zV9-!(h$8Z^Om<;{^ML@d0>HtX4q1IoYFiYn=kR7q^desLb9O~e z<@Jysl<{xA=4NJP<1Hys+O1k(pn-J@M%(!i7%3k?@VR}F!}S~z18VF?`xtac z`}fpn0}<-~wS|7SDd_VTU-yu#N;Be7)H^vmjUo&Q$8viFkZ9<&tnVvfWf9r%i2^`r z`#-)|5BA`GjOByc#G7p(IEX*$&MTX)h!31I8-!z&8!XIu3b_x=UQ9s~`dy^aYOJNWdk5B<$;yW!<@^r3&vjoR&oss(t*|Ms*fldvsex2?h8IyS)}skiJ-{ zSQ%QwSJ9hKg7CM?mnh6I{1TsPl!cgVFfvj1;nU_NN~@%}sn67I+h8q$ECKH(HFrK` z*?&GGT!3N)aLy9k%bfa|1-Crc?E0ac_20_2CtDxgkJ~9PM2aN zh=d;=Lnr3mWc)_sgn1mXz)3JyRUoM9=BQ2O&y|r=judS@lqksEv&9Z67$7DGX>O?9 z_~nL#?=ZhKPFEvmRcE5$qlG6DS#||AznSk+?O0LpzHvQJXHS;_3N7Nx9URNh!y6&~Q1{SAM#6=6U+Zb`TO zhJU=Blk^T!CpdU!W{X9Q%*y^BiCNJrKi8LgHM#*Sy1%g~C!l2BD>ayclc4=iW@o)RBZF~YLozOK-{n+}35_wV}8M_u&?b+FT4 zGiY#OR9V(J>lPM%mZLttflDGnR%|GupG~GLX$T!P!$>FXP`%mT<|mz#Aq^Ie=ZM61 z&4b+f0jZfcRfxIcDf-XEA0vs8|G;{l$1J#^yYD-~KAjf+WhDG?56|9^L`?)D&_1dy z)GL2l(xqHVZUr>filH$ko`gW5Z(eQSI;80y5Ggy`k7~cC*1)d|14uIBl(I~gjqU;Z ze3r3C@k#v^X;zSKUY#_{NTUdHPNH>>_M$ACjK|}ITF#JJcoQaFj~bY)?*h_Hdcs`; z@8@GF1(I7V@G@9Vu3(;7MCDQU( zW-N1D( z)Lf^`L;AXh6um``<^8#GGdLi7C*|LAROqrza^y_eNX3J?@fG}H4Y3fLKK`v0dBl5Eco(EZ=* z5^4Jj^rVrHHBT+Vk)%BygboJPFOM+#!e@%zHOPU(ct8vbK>&ETP&s4p1};KSf%}R& z`W{=98-%Q+Xph1jk#x~-;y>(sap^C`7<2dobl;3$w)3dRQ$L4M34Y7is@3=!(eD(E zKNPwBkwLf$b(d)u^6E6I>=H-{Rq{z2Z(H{*bpB)}Sj25P_!sCHruF(A`u2m>LPL$^ zZu>qQ_fXfqPujZd?R{N) zucZ@RkMgtDeJ zExl{A`Xgug761-+w?QyY-&$n-q6)(G9AG5jeIdR|A407vnh>m4F=>DX-_OoLwuyAl z8>7gcYPti;c^@O-9&|7s1M}f7R^kC}mi^1aC(;%#+`Dxj7)?Zz`1&IoGY2Qw5Il#N z`~$D*e$2_xwXUR~grT|%i_jc}7n)Vn9^RtMj-h#mP~AJfmK1wr!R3g@HHQ{0Ex_5S z*~li22vT!nhqIMGN?^)9rDpF_6A3n~gQ9P0X`WHCVWyZk++ZPixpS@Ts=4tn$IQ*4 z`bFoH*&4iDS#RQK=D|m$iMAtqWJ~G)P1ZQzB)-~tUQl{IFF68Ln5i;o)NwzDRfV8_ zR15p%1t^vL7hd)0Eisv;M0H^#bl74j=$n|3P@5x4Tz3|Yz!0-O;A z>``0sFr4olk`!k+Gosb|{oo`5X{YkmMBmNwBnBM-|WuDdVGgXxwiO?~Ddtzyqm1KpgTEJ>enO0(e*nb2<$0 zs6~Z%5Av@CiZMJWzN=Z&$Q@uVLFiZP8V4FMZ>Oq#7SO$bPjWFe64K2gd~+HyRc-;( z13F-n@9fik7^=yh>Mt5tgmaJ@f#(}2PasfS--gYByK6Xvq#n%Set#Y^u=yY%W3POS zIapU7deg$ zfnXBlyIu1IS5XZ zPB7G*B8fM7a3}$%IBs|F8_@3i$UF; z8Jid@9is{f-?Q~hyQ@^*GQX*^R{PN(vLX52ZsI@%+sl(Uk-0|~PX>uVFuvl0yY3X; z1$xlf50C)V@YBL^Nr*39?<5Acnjuh&V98OHzQCh-`*_|)2EW>lHhfqZ5dlQ;SsJD6 zp`8z?dKx!%(nUnG6bZ*n0K$RkM1qh!WcVgr8MmR?`eV=<5;4xDo+TSN2=&HSQE(Rq zU^S4my(5#@e9b9{BPgs`e^g}uRI%}jyzMtTbQi2BgZB>w`QJ=akeJwt>j(!Yd;Z@` zk|T&rl52Y|@(1%|a_ffltI7pH9ST=^bEfIs!92oSNCd(#IkHHPKLu;6_9;&)-lE!v zlXXh~U@!!7>kJSp$I$U{d?Lmv`oJD2e0aNQqw? zCwB@jBpjk%!dljE;bJO&@RwYmvh|p2cZyq>eQS)ii{o15=$FiURN5CRh6$#wYd>CV z*l_rk?f@hluOD8rGo|hCAZVsYggJ*DZQWsFoi@dT@=VvFxp&G2Xf z(VRSeq_j)*(>WF7?1@sQn47T|YK|-!9qFN4$KWCr@nKOoh^pwk_3VBnO=LepVLGxo zgObt@y^*>&N*T(-7si$M>ycOziOw*lS-PAkV$Jqx<5~bUXFlUpf#U;*Uf*Oc+4><}Bn0gWlR*@_Itaghn6GIt^ma z$YWoPnNM(4xK|~~qm9ST1UlFC{@N%~CFS9N@mRbOz8vT6R4^kR<-@!AmwjhbOYbX< zy{UM|Kd*b|i$&tT*)-}Eh+};gNE@-4vK-zMhnBDd;FSEQOTd#{^xnNzXnt7S$^7<< zhbWjR{?F&7{0lPty1N$_fRCc5D6ym32=!9G(G@)u$h~}oBBtUhIyy^O2E&`~TmpMI z=hGsLjcIgs5CjFBZetrgLAw|)E8?MR)Rf>jr2Eysp};HX6v%k#4X{$y-QHAs31V*j zWlNZug7bLOj)m8&@eukxF@eVx*KYglU6Re=B19ga$Plj$8abCfa^1Ya z_8NdQO<*6c?RAd@jMKsB*Kg}%!&ab4MQ!X@= zwM_jamRzOmqlP<#e4E^e+-MdJI z)21#|mzS(lL*@JbEa6c<`hXm2^x+Fj<})1bK4r&eNhvU=?toy;ML`$p3Zimyz&QW> zj??pssfK4XM~Jx|t;#pS@r}906{4wlmegaDN+70Ep9pm-wVoi*z}W*kvv>u~*|Mr7*W$~jp~K-zJHrbm z6y6!w>RycV0%b2g-T@?9`DB3yLwr&fqxUlF0pNC9iG%mA$iF);XcW~vM5?sb znfvkJ8{+6%6b65m)>OI#hi3=>w_e_l9ZG-vAJXjJdLtujuzy9ahCD;>Fp$(#t@yAg zLjs|NtNA8?guGhgVCx&DNS>!Nh=q?_0EavJ0-Za$#GSIC_UJDsy_>;k*K7-x7K4H6 zXSCQIf(QHk{gvKYT(F+rJyNL!uz6xOUoG0d zWZL(im1x9`m!nW#*IqnjiV7ss+8fpft?0N}%6z$>mg1r2`*6wF4U8_HJr6`e?5T$x z!_~W6V`m4Tcl8P-Tui>!Kv3q|nQ=l`i21z_jc??GYo146f*#8D(JkSi)bYNvmN-q- z;o=);O^6b`3lPb(EF9h{8+~qRcFV+4MV)G*i@J7OvY47CBCRYucRgi&H9O3M_=S9r z1=#v+`eEvXVUv!L!(w8OpM@m$qJydLen$vQr=ceXf6C$Qhp3;EZ4aYBuj43aXzzoz~Ipc zm$8C@fLdQmc~9cnXKmjh;U@`QhXO^?gd%9mU0+v9`r#eG*-ruT!MYPn9lpEE1Q?c$ zwg9^5pUJe8zTXYyoKBzZj6!lh`D?VS{u_jQrxZ^T|B7MvHf1QXIAtEH%eb` zpknOqsj76>4Sd)46vf{g-Clz@?wU(v-WogYT`$lRgW^ z7J^e{>P}S+MU*h|p*RiByIl1@+SJi;Z2_hF&04cizm!XTUyH=Bd*)wg$qYPP-H<^m zD4ZNe~(>D|Wxe*$szfhzqZ(FA` zs1lAAU`6k8moN$!yR#bD{A^E(+0=v}7ruj@w{{DA*W!+YaAEgi)uNBdl4X@}Luz5iA%S85d3QenPBAa| zSnm8@gVc_cJdR?q#JM$HVMXJyTZ$RMl?uG9HvTh*%F}4kp(hlQax@D(%Ri7ru415z z(E6%1Tj0gVc`EraWu9N@+#%_>V9D;ESb-uBL9kcQn@>@A+s+?JzycKmS99g2W`YMx zSCdqL7#^TENnAzHZ~nA9ef+rskBGNZpez^oDHtKL>7Z3TTEY!3kW^Es z_XLD$fHuOWF$c4+^jesY!RY>P2Ic2oiHG@N5zQF%UWo|gvnE2vLms`^M4!g*<_RgE z&D6H4|F>yPkckG~0D7=z&M=7;ZPEZLmc}I3kOrBDXGLNkRL-JIS-6^ zvXpZGk0$QF!rhnN|7gGC@l_}?`V2=X2)O(tU8{Xv9RYZYb)o|MDgm#0#9)Tb|2*ks z-D6yXOeW>|gQb}~W9q~1J0#K~tR1C&hD=d`_$9D&RFeLQys7VCKh`^RA*!Q9pI7ao$r0cR*0`lhozv!n%9#B zvX~%G#+hOGHBA9e`Yzr(#X^l-52fyX6L%<^oBSe8SSe&1dz&B#C~G-kTpqqY zqwL|S1VNT1E0dT`Tw#AOBM8l|ChD!uH4U1ajFCta`Cu9>&8=bn9M5NxE5_nWGu#RJ zQ$_MA`pD=LhC+|(`7p@>X-AZS9-phKj#pF_z#f}N4wOYEx*3V9Sp(53u`ZLU zr5JBz$@^^2YZAF{=CU&9>BVNBz@*1ej2&pWe4q2K2eQ+kXKc4&qMYzfg3GFV3zDeJ z8r+92cHBH?zAnv?>6fvOiBw{|Al6R$A8+S4Tl}!f$6p;jp9+1y{i)_0#aaq_<=%RM zxN8i%uqVDXyW#}n?H1eMqKKBLxr-T>= zQ{JQxV7r-B>_tDtAeR?4E#8tl@`VOweHa&=QD0+|(=AW%#|fAnsFC~iTU~jx(M?Ya zdimtJ;C9Hyn|;5p`-~xvD!zR)qE|P`PGbcM4@LjjN_BZvEX%`CM@=l`KNvJ!cNq8~ zIo7^P#I2&?X>!MyAo#^E^$0q%7%dFUMyrzmhLD${D;MoCh_f}n?{5_ZkTZf8^Sm)2 z*ZjlKs?!Rb|E&-k=o6TXd#ylNEk=IXFZs@n{IZr0T!H-dIBl3jSCK*+xm!#SEm9*i zXpB2@4i6z6)|%G#{Du&8)<~c74Dg5uvZX<6_Yy9YhWwL1^__Kf!u#IC&nP!OdcpHZ z6Sv{lkVDC?F2cj_c;b=#u38tpbbr1g8R6C9OY0?tg*eBDK#e$cUm6lbEj?W6MK)RE z4YEYL$b*xd;!^k`Z2{VXCfdLRCUG6U6-JYie|jxJMFv|(tkowl2u}5o%e7Ne|uv7er+*s?w(Mk!BWavqvxzi2*&4doMDZAc5}2{&%$zG!b51Qbo}}jL&{u{8|2(pz5L{IToKH*CJ#;#+%%q_O)?17@uiBNEix&%&S7U( z@$<bWr%u5nqUhfI$p9pX+WO(gDEgxOLh^2s9TG^khX%FhXJLtW6>c>w@AOvYGM(|azTy#po>dr>f#LzS61`l{ zg^%n-AB`qr|M0cMD%gW+8)26cha)bNK2fn%i?7Pzs0xRB2P9tMnbXyhOa6reU&d{w zq7d8HO2mCWn>PLmAMwD{4fH=RA{0?oc}TG1r(hJuvVq`gFk~T3iSOeTPPn!}F3k{; zjG3}n_?8ZaGlO6(YE(|mBvrJyh$;+Y>|K(Odwiw=Mss)ovIc~ zs+~aXLnm&eeF>i*`Mc)9`Gb@B@xhx>)6k*&Jb~_-aK7=r(;c=PNCaUrekZ=ji%s5j zRB)bK1>ic$Q!#2O&6waFac1JGH%jNrLaRJE;=xZvJP2w$m|F$eQK%Y95gISHlJft^ zD@4{C9mE=&_%*_VKwJokZwPknR`gjI0MK*yk(7in4$Eo!yz8n*dJ(=-hbk4mt7Cqw z%e}oxpNJ-=#7Ea~`udV($os6@p8x?oo}I1B4)~FCayX^;TX6w$Yj%R<)xxWApuL{5 ziN8ayk-U9Nohq;air`59jlq8uNNGKdTfp6-hZVgyAqlywcY1j1a&hSHN6qE}5Xsq_ z!);Cy<1$c##y8ha5y9YlYW zI{)rRmp1)dyYb*CRFQWQdY}QlJ*{2*O~p&r_x1z{(iDjCOXW-hl7?V76EG?fSswN$ z9d5i+l=52&h0-tAuaB8J^&!UVh$FPcj#|BD@92T9nJ@OZ8%@pxIbuxCki^;u(|O}8 zN&{bDD_2woUixP;f9jl(7`+06&#XV**$(Xc#m026j%$fG#}TYAZOBlkvE7J%_P*I} z1U=}49(yE1Qm_*^+?vQJv3pn$R4_yyWaI}H4K&`-cvuuKy5v4i`gSEtO5cUHhgE*u zth5mxez!HsEm6m`Hy^v8!hpW>Nu%rdu3m3PNI5kw_wiUjwaXx z5l%4h5a$v!z>o&%>&IXiTt^mjfZZ!s{1ych7QudiXy*USWp2wAM|dBu=^httdaD%X zjdvjWr)D?!}7_~p@HL_S@1C2%gE=^Nw`w!gI=4_yOHcmeG0ZKtaBJNfO{|My=sqopV(Jb z!u4LLnx!JfZpR)xsr@p_qkm6;&EU^DJhq#(Vb%Rj)NZ2(L4nz=Pqr)iEy*F_S$Ha(2eY(y#J@i-`ts6*yCUGv6tZR)CV7Ksml7oGd}#wG^hs4 z?MZy3PI4}Oxe9Hs(q9B)`K9DGhoqc5I$%=pyq`-}<7AJz&u{f4yl)&;ePTLNBrftB z=ypytV-~tBqn;^P2?<(jOtHBTf!CUJvv!b|EjsS{9!fkv^CwXoLvQROr?ZzSKbEe+ zc;~?^KKlY)S@k&wejpZy zGHR=p;*PYXjkac85SyKu0YJ^2E@g|1{k?mcR2`~LF3=OYYfG?LI&}-ug^_-30*+)M z()p%k@C`N3u3$gC5>hxKBW$#sg`ZbMU}i;0^V6%OvnabwspJ0XoHJ-*3f^~$ZH8nE zZ~LWYB<>l(`%tUEaiTe=1UL{R;EV!5+!s+5ug*odCRrv%6Z7!pUf z7c$Q?I!@dMDy^VuQ_ffx))zSpp<%g&2$!^32<=eeGlsE4as>MXLNRN9rVVPzeKZny z_%^}bTUF$-iV*Af5J|F+8d`N+P_QTHL4ixGy7z?0|Z_bj#W~bt&n_J%uVZ{G1`#7JsD!3098lKP+1x>2;;bD5kX|&pZ#~A>FyJE zso-EQ&Ee(fM&}uvdkt{f)P}BW+O(fy`LLg{(#O`LN4~?~2fO*c|7pfby7l~x?9CUp z7W(y1!39@x;tLz;zD-n|Z1EF?z?05&u?H!drU-5kDRcXvkU0UpW%WV*)*$8JbcWZV zc0VsmzMh8&(x}wrf=H;_+xQ+DZgG;A>*ob0(Rg}-8Nv}eKW|6~9~i7&_Dm3|03E{S zODkQ=L4oJ8LGm^ez*K^xD&QUym}eDynfT7CYMs=`Ub8ct48QG=zmwe5_5#J)y-3do zPrxkeRq5!q-6Lw~#l%m7y?0_0Oo^o8Ypc4Y7r}|@XEQsPgMrUuhpTm3M$ssio2F^( z`eBAnvZrMS@P&^(W0^;n4&WJSh;?T0*V>3E(C)-OVN zic;ka0*|cT7(-lxqsJzSWfJ^4AP}uUD#{mi!cTPfu7;2Pzm8TFcqb;JIuzjsZ-5q{ zII$icawng{Rixo~Y?27yCR(EYc#VD3;k&ejt+Z|2xN7WN{~*(J_lgjJauyFBhWR>A zI0ri`E|IsN)zddSbBk9;*v{#QYr>;R3kGQ8OUw%988e&KQ2w8?m2F;87WDb*-glJa zz2FQqjLdcH31KU=Igz{`Qaqq3RI;^jCcj;k2z*jbb3KRj8=rbY_n{WY4dG^W1bF-X zY`2udwdBY;E5x0{XIc()in7M2c%^~?LNH#1_d4Ax2QA^)ZN{Eoo|u1cY200C;)uW8-ik!X@I~{AXZ@kGu0TuQ3H#0 zA4xcIolC`603ldP2d+tLHXK;O3dy>CP6^=FIyPyBl|)Idm9zm6j^9OPj}7R2vdKN7 z+0bemE!J`YuF398Qjvgs5?#hPlR}TA8rZ2aG7@W1!cK-{hi?lHkPouic8LwibHKHX z7{(q{%*>J$jzTe*ns~2x&|vZNN0k<)AP&san0061wp!`ORrY4-mD}J2GU!JPGn(bq zBVL$^GFvgEeyf;dDgRymZZ0u){49iL(sb{VGYbkFk2dVI#S~Maawj|e28B^AFmk1< zu*oREHJOd!pySRn$J}mkh7DG$V$jyhYu;;mZ-u{o^Mo^HOS+=YO5`x3;MFHBq=)t3&n4I~wtt7)Lt#T$(> zQ1Gn87T^zZ(Uc*7<>bUIdtDGH_kY$qX9JEOL&NH$Zd0y%YNzTpP4J8g{7Ge9ZoJbf zFcDB^K; z4ftV`r`^Hzjx8tj@;XVUyteN%=tw{{DtxUrO6-kAXsIC36kuOl;Z7dtNN zQ65(m;`XP?FaASh8H~RZ8i9%nAH$|qj8*nx<Wdtz$|^zcI_xo%2#S z!QLsFWwNVbsHc32T5zw-%!lmd*Y}Te{1V9x?W0UGI=c6zpke#!#dH2jTuCYFf^`D2 zA~UQwn?XoK=Qz=SgTPrU$({cKdryd)I9A3=t{0LJXWinfn@qK`$7M9HaV3vL zS|%y9Q_a*BIY%!DmqwTV3ADWk5C=G{S!(BFZwKac3nrXRy2WbKvGh0YKu3OrOTfFt z&9p^CM{EQMC?c09T5m#1k8z0*?GLm7&%W4p6i7QvU^Rx5vyC1^Ox=sCQqrfKy`yo- zG5X4wBTPZy4(#$SB|m&xOhfq_p7TqH7Eh`VMd8o5ES5E5r>1O`@wgaX^nldQmZH4X z4Pfy&*5Oj$TU-ROcc*5rqE|+~z)W&g3&)kawzWSZqwoOp$x_A1B?d}mV!OiqtK8Kt zVhp9Oa9T5wxZ%kojAIsO_)mq>c*-y$W9}&M*(#W(%ktOEA}q50`fWvSx!l!UxkXyD zRDOMojla_(w3Ty?jx!~-FD=R*tZU8R)lQd%9nt!~+E{E2lQJ_dw%Y#ccHx(vRyj_g z66%Cnnc}Zc%JaQ=n2HJP(Rz5n%D_1=g)lFJUFPW0Kq^6;LmUL#9|3O;@fRC_jc{4% z<=|>hOaqf+9&ndJg-?ED7zE||QcFh$zEhBr>7|{aUR$TocFDWNnH!3e{4AxkuntWq z{2YuQz{0C|r?lc|KGA+GbH-k8DQf0<%upqWfwr%^CYpcyWns!p!wTW>!s}mB*+Vb0 zD;Os;sM-WNjeeow)voxdG|QqI^Us9Hr_)U+GiAn~}mq5!h0ZLz)GuO12>DuuM-WHO8ZylCS!I77`# z;msV}>RS^rDO=I)t0XW*Nv}(PE|`M+5{dwQm+-pj!zwfQpM_#J8F>pliV0yPpAN7d z5qYR#MX42Zn4yu$YNz9EUB1=FP9Z7V^tXsn1xhba8ZW31-1Bfz83GMZfb#1A7YXX& zuubfV7trsr3>YWpucPB_#I} z`}_UD56l7o-*IOY7Hk4gq_Lrza$Z?qOH&0zL0a$)(qLP57Ev!GgqYCqbS1=ZeKYFL z)Pv&GiCVKk*aUvPmT}Iz=u;|oEP(|Ba_GR+OCFMv=US$*Ie{Obv>ty(NQ6UmZUSV3 z2`?rWJ?2=^#Q9HSkVNg&?I(j<Qzng31Q@riJk@vh*uUu(cd z6t1?A1_!!e*kzP_;Bs|o%?IQpf63l^gDBD*L#`%g3h^b!@qEB02z1aBm>>8MA@ZO% zTt;*?yyAJ_as-Xh-*X(IgFN(O5}(3`Co5}^%K+tYaf~j{*3BbLX$V>I%tPJ-8PT(A zbi^+KS+03swh{yUx_wV1xn>CG=7xy_ZjIzB7iqwyN0qz0){B2Tg9dMaS%B8WK3w&2 zj+&Nk&kHxfv`RJhkYM_UbD7Wf8a?v-vV^6&Hoqn%+ zXg&=??^7>&BJTLUAeTaMQC9|7HO;ieSj|y{09T^$TIy`Zk>_F52b46AgHtXue2E~@q-EqCPCZbUPHg~uG&A7nV|MsCKa0$yS9 zvZf5%xy6IT$^(rEbK|XMa{x{+YK5YAlZ=)G&CbX8%hxPA7krrRGkB1(z2#ips zh~l-3U3Q)n{?uwW)FQ(zsM9J|pv?gs5NXgKNW@lkLT6<;`tepNN8xqZQ|da7{D=GD z#zDJQLf3T_S$~|jPN+g4MZ3-vvLKTOFm!D_Z=o9TSWO=%8;@|l?>vM>K=ETRp1`(a zO_>oOtjM-3x!V^(=9N7oo(AI=%p1@51`rax@T581*n0|>`H2qssMi&(*E}Og#uvRJ zbCSfmPzbVR&FC_1S)_WF_aEgWLqruH%%h=4z%%i?IeWPs4;@QXH0aAAF&16P(^ogJ z9n{F|L>)Yu8c403g<^@2{E+$fZP0lc*@N8%9q&wP0`F*AJ`8{+3gS%V=ISvF0jI0< zIPcpH0s@)W);**kNw*H=_K{YsDziD9SP(3Nh)$O)V;VvoKd1gtLx}H(7dQA3?IG{^+&p8W8UrH0d-1_8)9? zD4Sq*#u|X`jWWs7@tFNkS;$_{M z`{l1ww||ki=0P}!ot&;E5eGMs{!7$D41XkIQ$!P|35-YVvluei>psK@`PbsN03CfD zTPN>GP*-fQNqG??&>6hpCLT#4hoc?D?KwHf&PLpXx)@9Z)-oU8ifInz;54tq&-^=> zpiy!$$zyE)Rg^vI%q{}E8nnK{ksd2~u(}Blyx!v}x-0#rpep;wMo0W08DaSR*O4gi zLcg}1xs`}(!7W72gdc5>jYH=(`+x1yJ@IEx^ z&PZr%n352rBu_f$Q^1={j6m*tPF0pPMy51uCTOmA6HU6%ipUw;2&#>1DrDOt~4+NO0% z$rNAJ5VT*b>+kwM;`1k&Q_Q^uAit*QB-ZafbG+fQpuXP$fsse7cZH#Vfg>4ZO0WKYblEoi z`?j>zd-W4<0IFXX6{=b+8rxr2s=F55iSnJvm2go0CrC!VSgU@73_)no`)0&#Z!Df~ zW#~s!82uRD)1&MZe;-{7AgHP888_5dY^_rL^c{m^;CZbgc;kC5fz!opHLRZwr9ZjO z1plqPQ}J_$jV}osbN;M)(zNWB#5R0s=O*M?QPnp2HhUFA_zXT!)jO4SieWKARH1jj zM9Tk-)X(F%o`JvrLLYb)FtbZ6f3+yX2>fAT{@+*Nu(P=fF@Z=v-UAc*zl)C?!Objh2Ht_a zuOEgst=Lv1GE(;UOao4RZM0FSx(_VDTLOx6^7`H6k-0}gX(ziS>fmU1kxGdZG!Jh^ zG81Cb18LYm1uk#h-6hnj_*ef-LZjvhTxZno@!Hss=KYef*ZmiLKP5?{)oRQ9kqy^D ze&&mW;oT8l9>~1V6F4j;jm8jbb~TwlsYb}0oYjLq=Fu;@_rf1^eSxYV^~{7d7i_#d z*bKE=@In~UcsuF1kB-zK6nSVw`h*LFJqK>*36`##$Q(pqm`uM!>YVdf#46?m=`Cwv zl)=%G5_%ihIU}JaSnxw)f!ab>db!IwaBOOLIbWL=wouy=x?|0L?1^LDz!T|~+h#5B zH}&bIZqqj;3i6vz{J@?sjZH|TwB0{T3Or<1zbjGL!ly*GjP|8DT9tKQH7R=Q0}X)t zZ%_0qToBtjK8~gF%Qn6DA@3eAn!F$ULif0~eR9n^1`*DP-1cjnube3DV+I=~q&0Yc z&-&lHL0!rBgoCjtveSD?8!0M@11-M3CtvW}y4mhY>f5v1R0c@6E@jBU2%)9JSgEj; zBxn!QGG6Y*pO*Ny0+v^Nlf9{<>fd<$5F-Zj9}~jynUEHQ`H;*sp44hdSfpEzlANax z4d7gIL8_zqaiw?#9gjH?z5p++Z149#g6W_b5va@aVyTd}^oe!0DfD|y;2s$^9Iy9< zBR`)mH*+tZ!FZw)#G4>5YpCX+d8L`un!?n#xG!*|IT+zhD(Sp?J-Pytbwt*!Qr6c0 zD;VzQ9%wKadu4iUR!wR;0x`>^Ug1CV6&|>-`Ey}4RiuKEt17Vv7 zfx9B%EQ46}*XK}ygj0f)>-Va-u3mrh`&wF-Y{|W*NnQ%*I99CS7$m0LsuAN1?xK?49(KPSn)_rgSuNPD^#y7OAx#cM>MoHZ+&%cr<~ z8|*-intPk~Pf5WG)8nmcBIAm=zoMmVe9<5RaKv@nSLATZV@BL{$Hl`f6v>H@{sXe>mDJZH9Pd~b)9EaA^J8e?#}RK=&Y4hk>_Ny zWpe~xJ?-~kmA6if0lqDd%^{@Bb%AP&s}A`2hl;E8Cf$rRxd2k!3Rt9MaLM5NHkl#< zh4{BLjEee#RK=1f2clafxJgq8>Txt#{uCln(cOXiQqW&5kK4;+-<;$QHbT9S5%=hN zP82<3+$d`BikYLRA3GUZGBr;(aS^3+hg3iMTq*>=6zX-^Ktn?Ge$-Wyc`}}Kmgch| zAY&n=`0@R|%iI!ygv%!}JnN=gLmA-o%YM6$GBMS({u;k`^$^i+k^Jp+TKQ@iVIr4# zs(8lyuJF2#ed<;Yj^W5-P|S_ZfBkt|3l`vdn7*=3lst-@_AArR^ayQoW&vLGv~Mst zy+t4LrrHjTlf0d2wbW!`PkYLWH zJ5luDoabi)uR4da44BtT?;mcLv_}G~pkMLK74gu}sM#@NRm4iCE99FnQIdng7H6F{Wh`amEtH46yWN7#tF0_wf?;-?bo1qgUo=T84dL|{lyNF50w zfL zh$`N8mVp)5+abK1`|$l|W|K4(FdhZL^jK!XqEF7r%z(^QV4)b$IGn%1DxGkY(pJ2+ zlaa4xD9UnjI4VwPDPwK`UBy;BtnHRoc$P{N>sHFqIcJm=9W}3PE0!lkVs~kBe_||x z4u5WnWNqag(-xtQ*+UF?M5&F_7EjC6>Y6pQ*vU8yj~{I?6>@LF$#tc-Z1=WSqM4>1NcPg+?sKVmoPRp4pZB(Zy_` z!Ou{Uj_b?dKmc;**IDVNe!KF%`5a6qnw}MI6ZS~O^Q2`xA7k1?5Y&(CAmxLmF;?rxDBJ@wE4nE|0 z_u}uEEj3gRKaTiEpm=^{eME}~ zf-~CJf53^f>P7vvhNiQZTh;kv)}K>@NehPGfz^Z${JHeEb`Nd*3)TgR%%%=MZ*oWa zA(PrNLa=&R!K6qAjw%CVs&fnxmqKX%1MY|#Bt(j-B$^EER5eOA{h3@j>by{G>q_j3 z@5a8T9E>N(2P9Fp5;$<4;bDT^(kLhPJL;{_k#EId9=Wt64|5r3ws#+=0R=&Rlu;uX=Ie{hK)L{aUEf9&600rOs#BmJn0 zuaZ%d=1@Lsp;Q-EleKZmyt}BgHfd5PF`^V*J@^f}=HU9QI*VJsa{yI9s=wqs_c2Ww zg&y^L2s|b)zGIfm=Uulf$csy(4ks48DeKy_&|JH9&C0+|y$`BgNE)rKBOpjS&_l~? zl%o|}$M$?XXjvNQ)yC7|^6XERlHJZcBh<$PV0bF=R|baj=_L?N3p)T%xk;sgV9#rL-9E3__&rM*m^$X4+a9UNK6aCh1fXql zP#8Op*Zi9PM$>a{8mtirKUT{%j>Kx?4r?iHJ0^s8Q@JS_k!6xge0tx(wG2jT{l^Jh1ngjC>42P$8Uj zY>NDFpMUzSP2!D&fK%qiQ;7R8Se=1GQ+wCO&bG*n!8v3Dh8b8PO1f6>$bOyqa$Yr} z7u&}dV<00bzXWW2y2h8bQ&b?E^!dfyTntrT+Vg1-nT+l8+XEX<)hU#iy2?JRED_ye zehDX^rPw@Jyr*qnR4HQvdgvY5Dqu434IYj^Ck7>fh<#ZNE0i=o3s9_u9e8Kz&tsCw ztP&r|Gxf?Q{0Xli&SV#yDY2=O6&{n7nUJ;_M*+C^@XL+X*nODsGx}E8N~zbDrHDVW z%SNGP(RH&=PB9j|!lXr%ad5C)kRgrQ!sNv(nz*TZL>h9SdoL->wf(QjIaD!zpMOHw zIK-A=JI{-&)|Dvbuz`;TS>Ml6!2@>4N=JCsbxetlq2Psyw8W9cuyyxVYkRw6>tvWH z_v%|SQA!L!Ir}i|c)T1sY#gcQwipZa_PleR{ND@>sxF3EeJ`$NpJH8+WWMhordUS@ zFAWI=Z9?dIhgL0ZJ~V`AEG5xM;Un@Ee;v*0n;3{`ZR=ADT^05lMvt#CaRx_tMZ^Hd zAY!V%+mVl>^){4B7*9?q>im~cQeUE7;JVYgr@B3=C+d;XB|r*FTXE(CUb*Gf3asvi zLm@ymaTrpU2U!oJ3zDXG2qfNN5!aZ%_Ub0ToR^G2r3w=_-(}SKQ3Np59-Wt3jo9{u zE@RHm_mJQI7+ZR=GD#0D884+CJge9S)OH+%KSv|peU}YI36@~1rw}TSj?<#p#Uqb! zZfjlab{7q#x#-r9DXGxB!A+|%k! z#^JpX=?F7&*^#`YQJny(i!5bMRpwzMzVdpfx(k#Sq&u$tcBEOR; zZGh(w=24w>LeVGuH=TY04Tcr*u?qE}0Yl$4b;L(p zxw*t)1NYLHi4c7MEz;$47rkiWT5ar>D*q;C*}lZ67?l|VQ`fmvSlhBvL^I-18hfsP zF#@v_18y%8E#|7Y46rM7VH~hJsV|S!QSfm%9EzUT>r)*A#yKZoh_;lpyoJ1hPq62k zs%3dS0cWzzA^79nrWRg6f~^iH9Mu@NFWQL3GNLc}#yzw&4vJ(_Q2-C5t``6dU}iA^ zTzPaUWhCdfqu8|Yi-syq=+WymbK@;UAy{dvclnVcIFhsZISd;15DdIS z{deu@*JHJm^jZMmbUgRQhoKpBsQrEIt4-1!5h%~n=+b&^^5l2#sGYeODfzt9$~5IZ z_o=)tHtt2KlBj;tjK>FDSB9l#)teqbNfR>fy-Y^}(u-6*M&Xfr)Cr-pyrF8&b3R~*Z$LSg6hM9ZfT39ambe&ml*yW4 zy2z!s0~5)dxG)OW>dVKucqie#h+s>R)fAvXuDbq89wCvz4c@#SR5)yColX)Jbc|Dg zFGxR{KWbAvjYG8ALEWHFC%qnfbk&W3ZF%^fS_YhH$6w{NH7(u3j30hAp)}p7;|L6?al6Ag$cym(Rd6IB_4pU@^?X_9QyyrjNbX>ei-w(!KGj zb%bhu^$pkk;5Cto`Z<9^i}yB*%AxR3GD`y{w>@lT^L5?_exywv^7SO%%yuHajfd<@ zM#ejiWv^VdxPV;^0uec#ZdNMTL*kt?=)(xJu+Xhjo|m{|*qhlXgX_2;fz2^@D-AD} zKuisAp$DY4zAxhlwgSffbYoty8XvxE`lo<;U{=}Anja49;j3Png64}A1v07X@$Cco zS2Eo#%=&HE%6d1q3lmX&FZy&8R~h=JWirTolKru3Zo~}0o;_cNo#>VMa#7OW!1y-I zg;K1$D-^ZuF>J4zXR5FaazW{pQ=;xPKyVF! zBnGEtf)bOAuY5M{`@?==47ZOiHFZg#9fWunVOyf)?$WTh*5NN-vKHb3@i(D9lrN6D z>Bq@Pz}fEQMlx#VB-9paifL6nQxS6OV&XpsKsiZAeo53Zs!kG z{@&_0h-0}GM?XMN5>;f6Pq7aLtS7SMj~yt>YM1+W1yY8@#6;>73VgMc14@$Bzaw{!)eD@Qh^&|3)WIjKaA5i*e5SaRj+Q&hl7ROB9-IJo9lgl=D zvkP7V(@!;9#VGS2k=!{PW=pPd%Ix=~Wz5f!)^S;A2yF6tfHh8MdhS2TIje9fJmc-9 zvVbfkS7HB--VS6GRxOE14K}Li7(mpd5gZ(ANnya@wbk?kjzNclT8t0Fv_$c!XIo+&G%dWE~4uK5Qw~itDkE21=AGow>melTr9fGnRkb4{P}#!`r!t zz?+H1*b$Y&)D1X=XVdHKMdG{dtX_w`{=g_^;Zgum=a z7gV+L?c>sX z%uND>DK_~ScX{j_6E)GK>T`tFY9DS$&rV2gcJQvJN!FCuDY>NjX~U{d577LU0GQ@a zGv1p+S=?uzueorlUO|(AAo;&u<>YW{H${BINkBq-sa`rR3Qv!cO6_J7WN;GdkXemC z_y`Yx2H31c7n_*Z&)(iTx4IqwP7U(#n#-YKVLiS^$6>c<o{o(5_%m5I4Y8))TVH2QoBv9)an%@K2hJS-H|KBc*&GsN&HlAsx;B zeX-0481v)hC>|}<4d7EFL)p!yFmNs6ZO*TDzl_ZtsHZ%wN5@_m+|{`TMsdpBsZ_#zgm zKuurXGW)?^!?0;IcYgnSazy*B$DV^n=Ob}D&0OeaJkoDpR(q`+li`=!iUky1#eU*R z5wX${enyNnpqU&^Y}>t(g#jQ%;|z`dnS7uWF7O*U_~TWpozF7@;MPbC5~xU$iKOMl z>Q|l&6JUj?eqWO8mRX^<_BxUh)|cS$1lAf_+O!TDdLxL+(She`fViDLWx-$QM@G!X zh5Q^LL8(@yJvCs5$M!MC$T` zAu&Pr%B!C|U_HD$IJPuoYcG;-U{W{_rOKP-8sF7dJv|Io=lA145O+oaF)bS(WOg<( zW-A#XcO0*)jRxr1;wR1Z=t@Tx< z{o2i|W0&#D5tak7v>Ua2wND`2fEa(k2Mau?hlI1=ZjlzHNjhn}0bDk*K5}u`C7$ht z7v74L4~E|^q^M8|MPhvpoA32GfuRYqv}Wk?2kskE8c%c9Fc#?`lrEmNxdOlX>2%IA zPV}LxqVjbRd^_0z1^>d-z|C(}#C($a^5hVT6OJQgp1Cx0Yz+F>Ncu*eFmUCCMU)xu zao@~#Kmo~YGHPb7@bwa#Nf>$#dL1!F#zjAC>HPgkQ7l6p-NFq%7Nb?5MJMasJq^=- zA!#{F({tkPJooeSHl8kXzAG8H2v6gSaXVL2*L}~}9LU<>d510fK9yDh1Q62y@JGfd zcAP*~0uXAY>-+b_{;+xFX@zM)Oj`S#)m`mOR5nepQ)E+AxYw)jj!kd_^HU|yHo|7n zdJa8b-kZ{DLwF=`lM_ly-r|D4_~CUIy156^z$Q)`ex*lRv;$pM_+Ce)18`)GgYhlk zft*K#WeE_qVo7_@IlND1YxLYVlSE(X_xWI*2Hi@GdRpOGKI&cn&H8VkBpg)%2Fy)W zD`&c{_5+h=l&Sy>c7r&S4IeJ{nOPE&lPUKg>P7i6K_J85D8{s?bBQG>xP05t+-R_e zCsXK!oEGvOI>#j5MWaGR$7R}R1Hi}Y3Tsq|vpW%KQ2!mM98kCP;{uByjOr=T@7Zoz zgY@HBd2L!yl_8wKu%4cv5N<~~yO+TBICAkFRC}_kk*FX1LfJc9 zsz0;`xq-I0|IO;q-rt#7Xf;ZbEUT<9I57Z8s9IM;B?P%ubI02}FHBtC1<~jhUf#_N z1HRH{aaQKwF-iX`4vj~cdCNK&akXO3EKLtBFh09TmKmFH!1`-ufF*8fW% zXm|0GssUDlC;m9XLw#48A4HLW~>4i#|Hvm%?MHakC7T3jW#$1Ag zgGPQ9$^eh;E{EVKH~iBcsz;3y$0NXa@w`p=h6v6%2s+=jrKLDZ@-2I*PlPcD%*cBL z<(^~?1rK>Q$8aJ*IzyiAhz#X8IVSjnYC-i*^Y79+4IdrB2_35ECmyXGUz6U0r z@f%mM$8|JMW>$N_X2G+MOiE6iIYdZ_)gR;*X-JOg4Y|kFO{p6!DH#h=RyLR*A{b1;%7C6wjlI-E z!QUr)IuXlx{)~6V@~(t4-`uEr@n9G-vnNb1&Pm)x0~4E`PUlq4*!bK4$x)yS ztVq~ifiEu_kI!oBnTdJB!F{5=8Q{=uXbG7(>ZJAbFdzfUSZ5M}7VyKD&|r6FlOI7H zY=wa7Rc=z%YqiWH1KK?ibocSS5CdK&5v3|;!!n%AC>Mtb0vx!w@G~G84*%MyHyA** zxHgaYPFrLs1IIx%j4Vp`g{l*|Sg35qE@$=7;gV0!esl~9s9kr)AN|fti6oTd3!;FV zPWm}@;PGAb6iNpG9Dv}V-=b_o8IjxMrH@^p4FpqaPvlm5n%u-)PBU;rtB!Yr8&y}M-{(%xw{ z`UQDS|jqKBKrW-eF>>6$Y zBA7}m-5K#pOfYLqS7!(EYT~W$9u?rn;U1h`%O#C zW6fpJ>gB=h4hwD3bdidufNkvvK!-AjV}OB}HLSIJPgp2P#_BXh-gblTj*b ze2u&b+?RE<+i&RMl`-K^QWX3oI+*UiTr~=$_#jR8Y!GZJohh$d?(zNhxPc)Y0?#-9 zjxh59sxkc+3RVhfJ9gQE<)Bwnj^4WNImd+MZ(Xgk%g(oR%Cx%{jDSq}Isnt^hrLLC z<4HC`vQ_Dl#Q;S|wFDY;?y;sMkUiM=G3c#ptV6#ur)BS18XZr!gTIc)IK#2Lf>`{3 zf4LxFhXa!beP^xUGY*#BI zyf1RcFGC`0UZeMaf6(XPhC}kRSUjX9Y>ojqiK95&!bK*Q5<0yeX}*v?mW8g`^G9_$ zGV;E7ef0yYLjnQ0(|{iA;A?~z-ZFeUQr{`swX=Xa516-B(UJ%x<4iq)v4T)>#}NKp zjYHEU>ZEO5-48o>wyuPM#j!;Q*^#dP~2KMFewGB14l+2Sonmj%7vudq=5SdJs&eXrU0uIrN-oBd{6TNa zgLp^nAjS}wYSX$FRit`sw_g)8MTI!mv!`?1G=58hVw%gbE1~4Lvh?N@AVCtLr@y*I zAk~OJcbzSxeQkA7)ECLr1i@PZ(_Ds>l4qVgCaU$9jsmW&(sWjMkkDd{>LFV0vb`UrAWDafB6?1VBy*0b`%=IL^|g?7$rLfLt|cGe1|X z0c+NI44eCCdTy&S;$U8)75C(iNURKNWf%@B$&<%B5_Yl;R^N6N|F zMzv&e%#}gk!Jsk8U z$)Yzkkf&?~*TQHlXivgeSdSjok~>Ot#(-toUq-K4Rlo1twinEDvC;&6wMt?7@~M=X zE;GnG)tytJQdb)*He_@oZ&`viV%95K{3I5;0BVgN-Gh8} zVFR!j#tiK^t)X`A-auD#OA!Wrt;k?RtR01M_pbm7sLy_k0k)B8cJCd(7@rHZK!{3x?Mgc87X{?NfFc(FzTpbXS*ls&2o33#110Wa7QCEr z+5<(aqpY5GmwB>?_vxfp7fA6$-ChXiucSmyF2j-tK2c@?BB#@orMA(RZzG$zxFeJk zB)1dEFuY5Xccza_-gJg#jb{txFIX7p6o#c_lg)OfHn=@Y{!4UwKKYIPOzUS~4LHmegTWxE#&2 zSI>b%5-Eu&xLjolJJH&c76=rxw^;?Bak>_QT=@r06H7U071VT{KN$Zxy|h3TR^sUi zf;mR92^L@eXv^3E?|R(tq%u4^uCU`Hg+Ls^`$)g z`u%0m40XxI8M80ruHAwj@qBE=Yn2u{3s+lCbL3B-NUE`!qea5X6tZU(zg+_5Lb|M{ z*%2_w{Bx0dGC#%WV@@IPKz8pQt)OM1d`*$;i7tI{?<9>K{eajI69N_wKN%&imfi!= z0IfUfzK@ZTvlm)4{mbl2+QYJKwLQ11GiRsT?dr?F-r$NNbIG!u^gAr_1^ z#0Mim#(XX9CK%c7g^JDVC(c6hz4&HBz(LHvh8?4MxJh*|`L53>U7wTsj(nL(B##Ro ze621G!Iy+44%irh?vQo(Ji_}*m$v#|45XKd<+~(ku09HPJ#ZH8^ml^z%WkLX)NuzX z8Zx}WgGx=K6P96L`16WpMMCc|_scCL0VJLb^nHzs(nk)idKmjdo$&)KEr$Cwf60_0 zqTYCL`v|$osF;WiFfIf%_+X~yhdNU>?ZZi&Qf+OLMezP+?>TI4*B<#G_fVA*F0+SW!4qe%@|$J!>T_~1oQc(g0j)`j38Rw_PoAvB_8E;7?Btynn}QVL<%V5xy9V@P$A;j$c0l zlHmWJ%Hfil2l=5}KD3cFVx+&Sdk!o)P{>9F2eBZPX0g)}Z|)Ld#qwQ5fslvJ4A$e^ zSsg*=z(7*9RhQ@$hOTsX+^ys1N>%#!t;lAU-q!3W*C=7x_a*JkQDOfNBJ{ghmVPGz zC$7BsEiw*wNXuHeZ^6S&LV=4zBzE#IFglxH0mm4mYfMgR8tZzZg2}81mS)y>OjFpW zQG&87D=Ti#ZwRfLNOZbb+rjS}uN(h&uAKJI4zO7QcW+y^l!w}0q@)VUn)wfpkH`q6?)jm#YDkBUdz+R55mO%}?gFvFr$7*dsRYrL zxZN$juHeT*Q4o+~Gvj%VZJ(cC^Md%zRt9^ykm8}QU63yugl*bdiYkERS-RSavAXvf zh^y5NTKxFLPjl@64(@`o%|}hTc%51r0Xd`exW!RuZn=0+nC@btQv2tK`cM&Fiuh8TYyfKf?TsNK01#0RJsNlK zJt^-B!T^YAnOqccAKz= zCT`ApyP&gyZH$j=neQR*;w(x!8kk;=&W+Kh1ZZDgJix2Xse~ro12efqf%cIlOFATp znhsl^>lDg_2%&;Nm6;1R$fB@Da@@azRmwpreKB=QodF%gT?@sflkLwSw%kCjfX&>y zjhDS!y!nE?9cD`4Z%1QecFSQFnb~vCuQhx%aZ+dIhy1_5qW>HC${VmdyA;Gv+|c`> z2C$Q)E^C3?y`<9oStwt$ahHS%?CpJ~P9t;tsTLc3Y`~_q8a)q*rGw7Z+_bX@SkJ20 zK2~}rM<4WxZ58@BnZ<|YE1*462T;tZ%9I(bYS}7nq)TaER*!x6(;QuLQsv-TjTIni zj5*oA#bdx1*@RG$(vB1`gtGXRYGWw!qGJWcg-E15F}J>C5lr~*g-qBTfq0`mciXFL zqV3u+&_&}Zq%^_EH0f<3kMr$aoiaXVO0>rzI5U@Tq-skT-t~0%y`(Upsp4}K%C7^# zyRmb#T4H7>2%x0#;j_8r{F~Mu#nW_RZKkNAxRAeq7mm1MF)ob(Bk*@90FY}#8L^0{{{!MJjkp^A29<%o z8YAdvKlpTT6|Fm{oTJ>SkU*N<@=DvXx~)5ho=(WmuuJ@v=d@~m4k{HJ{BJ|^He{$u z4pN*T8V0=K&hC3tp6?{Opb3Mjp7AFW!f_98x_TNO>;X_86ABoOI;t%D&WD~yzzRHis zr#p3mJyVfU6}=TUH6~^U&S>d$ z)cP;E>=XTA9+_`@TGpO~4wP5c2}(sBFB3620R^e(49&BcqWkz2{g^bSc#L3lyAXyW z4}0-vBrYKJZ|1Lr*}|{|NSf|ex)K2v@i19%+n&ovIH%1)H|bCH!bqu1us#yO#b%z5 z^b{CqL?LQ=xuQ$?DFW#eFv5HZ^S?RJrU0zv*R2?tQ9oV%dRq9`@X%5P#;o8n2|5ct zVEoV3uY2)JPz(TR;gf&-aLaS@ux!e?BfHYXzlGq-JQAX8CcXD}WRR^kFNV+Lv}d=( zxX-z*#g;vq89%p80^QBc9nqOX0TInV@2&rz-*bhJth?P=7}|YKi?@>xK&Rizmeih( zbnE6}0bTZPK#wc;IS<(z4z}lMxzj(||1(*ph}%@1tk~|TwXOkLnNYRAN{oOiR`ZQ1 zV;6h&O|<>o`UR*L`yqg^49XkYvi}2d@fwN%m=2$Fsa1^f7$O zmLdz2kd5G%fz>r<9JE9vhAs?ou-|VV6@S6!Z-wpKu6u&L7Ku|SyoAv7Hq@s>@y<;* zk$?Lzl{61chMu8QUYwgja|-asZ#!cKTR4z%^&Pg6%yd$}8xkO4V z`rlj$KPy7A`zvadjQVOM>{_p#2}u}FhIVEC?R}iCAtP;5l}p11{Ubxc07HH9hFXD| zimsyQlvKBk*}}!~2UV{(CFTn4YIn zQIxmsa_ud>L;~jEi(3-exjH9i{8^#TZ(MjRJGOnD-mx2hx&qxSqbLdnEOygPwx+l4 zhd+ih?UB@t&=TD&D!%$L=iaQtOW2%T3&xal_%Oi`r~OKvic>gM%y5y}nB}l`dY@V9 z_aBsFfO@42*FLwmr-7Mmk6&{(brbmPR0HZmgR0wYcEmD#{zZM5of#OdqEI!XehFQf z9i%AvqBvo>Avn4%T(7bP4;q6+%E3APHO2R|(A^VT26(&RO@+EYYP_vN>SN4Q*w1*) z=KnpwSk2V!-I1UG&zpXXz>(6W+SJR$vSO_@Lox<^+)h7ambHi%7y=7J4HV=RL2g+# z<(e(q+*$wJE~j(zD2y1pwhcm@4wB2VJZUxfZ5GJn3$YDpl=7Q76R*a z)(_PsLMpdCoiuweDx(Rc#XXxd;tupgw!lR6*pR-EOu^=yNo1~2K{b&Aw;*vY3kX`e z{CXhlR&LIRO`^WY2NwevE}Jxo7#Iwi)#>L?`8@KP=R^Kz6Hn(vI_u*i*;*l++g^g8=Bw!g*q4$qYAs%0rQ>-uvMpY>$gmKb_bb~zTE3I{8M;JB zmNyXm(iuGjDS~cO=F(%S0#lZ_bjyZbn^wD^$=uCkpP?T2wjn46ICJdv+tRf+Pc@hm z*UPKwmt5lxl9#`O-|(40-h|}ZF;$gIy_b^Gdq32;?${>j%Yh&BbMg2zyg2GyXwJWH z7N0nPIa(iW_)&Y5IxH%IKMB zi_}Ujv1E_+8s}0tXKQ)I+j0A)ADm_qVnQ(xhP;>zsEPFKNFOrZ4&pE!BX%8r@OI{u zF}mYl!UOoA$8V>;c4x)s``uwtpg^1W@FaJcY{u}Pi>Q1h$G~p+Wl-CaCet=>T><}} z3|3H6d0C=MO>lQ#X$+U%$uwp)cMkSho>!iFo8RWEB;*U6T%NtwezwI20W#IfaAK|x zCH;s$`;ZmJqJD30lyyUKs4>dSLeRGIh?J4_-?qL5A41mBkxNu-RYrJaBF`UJ> zWG0Lm0Xj15pIx>!#9QvB``m)-4`qeR12&4=QoI&_uBLi*{bN0#$!+K_hlILtAO(^h3#auq_| zjV{cX#!D}xDYvnWW66ke_y49X61RJ9R~Vj}wJ3HP`PDMEy$*3iIdZU@f4ZD_3lCLf zORcJn9)YrpNr6L+d`W0*Y_J8yj{a9ffAcpCCHClr#>~1zfA~)ueJf3;uvE9R(KugN zD{=Y0qu_udKqJy_FM8J8yfkBko@cHQ3P--r;N~1Uf59=s@ow-Q>5w6D-)TIXh;*}a zg~BNgU7?z@+yMaOja3z_38U!b1WZnJfV&6*zf`%rbI-)caltw5l!1I$k{Zj;C0>S& z?!Ac%C{ZFqS@VHuB4-exKY)qFOtZRZHiOwaReaM~!c%Q^{v4%V`G;A+lP8K5bsKHA zQ)3vQ$qElCYQi+zGSuD=^Amow_^zbA?{yPaK>kFfS){dfE?I<;OuTSi@cT`n-I z6uw8!py??_?9Hm>q#paT62e-(#K%D<|8kGQuK#bLnmPP~azek(BPo(+!U-qZ7Q#%$iIA|*EAMOu z2z%llCPg>wJmUcMoCm>El?&!oU*Q)~@I|R+X4binbz%JP?NCDG(_&t#-*#E7mKShl z6hf%XaOdstzDH$Xz&3MFK*}(?U(Q7h#A>n?VP}0~`c^fAM?Rd3?$^(FY?~9bXbJ}; zVm)W%Vfu8PMk4CJva8S#`t%rQX7^J}Kzs`+UO6sX<%m81tm4%63uWSBcJcbbh4iS3 zDv;MXo057+lv`{ykhHm%V~?wWO>%iDy6O|B=Lhz7MIA8KY>*>6{TW?$ts1Aa%ea5_ z7j8G8OoBjAoYn2S)4RbhvCU<$s8FeJ2JfPz@c7H$)ph(8+|P$XN2eoaTZ7Fb0YYrA z#cOp-A+zTy&2L?KnD=2Oe{9P?%(V^4hqvl${LS*%ng|57Nq$9??vK{Sp6^YmbZIQ6 z$=nCP1zj@!W}0XJQq_{_j3?XnGcd-0G`-Tk%p1w^uD5mUsU1nFiViG*Zbe8?LNr&u z(QQ{C4OuIa%Yh7BN-KBev3VMrOo{XZb5;O1;b=k?@+Z!N@Z<}TDUDfIPDW@dKhMvS zIf^aa$NR9m%ia*O4+(5SsKqpTbte1N%MG8o?)QSdO;H0<{uLxuBs#;`$6-)XzGwlW zL%Z9Uk6vlzLH3x0?1C<8_^p{Q% zF(SG#ot0sK`6cH57KZWCJ zKJRV=z(z7Q9$`cbkR=V3-JqdQ)Y7CuB7-HEQw<3|AhBqz>_yYp4agX z{-`2%%WZ*v4sC0}0-qauo9Pnzp-st95x%5u(`=;t-m;w<=pu0io|PD-J}%UqZlZF= zsuF|#H?xui2QCof4q;H9p4sTBv2)8n>)J{03CuH;RFGCW)`dNB46Kfsob@BcBVW~c z8xVa(>Gj?F>Hg4npQzMyAxL2pjM6k4s13kj2GEz+i{vD#tlC_ z?CvvCg#9w&$y3wzGo=Cg5NnbFfv5&tNiVU&k&6<4tv#SZkn9*kBb&cxDrO)$m^|+* zW0X2e9Y!6+U`e$%rjWi!E{l~;IcL?l5nZ)equrAnx~l?JJ-#g)Z=|XX4jDVP%Hs@r z_Y27xVv?`i|Fs9AWp!Oa7uZM&>wx7Nl$J;ztX_dy#2XpREltYhnKfV|mHk=*tR<@Z z)sy+$^DEEw&~V6RI7zF1wVVMtWi9&d$P^ISr?Gn>^=Fqc(0qa(%)2n~Y|!wP=NDp- z2I|ZbgS2p=c&i7@=jsSlu}TgVs=HHyIS+=jK~Sk%ERJOXR`4sw0D~uXamN@;Kr@)J z1BH`J_F@M*F{$+0ejFt|MgVeFamEXJ6h4{VtA5KeOPUQq9_eFcrngoFDM!G?Nwys~ zJ#tTz8?#cT+UM_3Vgy`xFB21n7~oF6ND0NhC3EYU!}lF$KqJW!>mnI@U)e?wxH4SU zVC?qqa8cH%)%+$;&;Qm|S{@dk5}tj1nh&mqv0{usY_!bb41bhQis`Oa0~U3AA?qE2 z5N&I`;bQ)Q2au>Nll8gu@Yj=^tMLq=u8V`9w>CJI*H(VAK{*tfDbsV{cg+%+T;NP~W13zR7?dz0HAb|W%Hj7HPOAYuKryAA-WHH;=0i78NCYI@ zMSx|Hp3~}u&Nd2&<^hR}GSN(84~Xd)!KuS6wO463*Z}2bR9P=Nq?k!3KQORm?y+Xg8(D%FC)!;o@$VTQ~akvT^ z;f+{5#`Gz&cpg%f^$|3?7|5r=L+^)d--z8Sp$zyDoXla|E|gC6d|v_y0Q}6IgGOrj z-ckxhBi`lO83x2~QRrBw1sN52<2QSEJ{HjWf_NLJ)WKrw9{y?4BPRh)P&>HPa7O#& zsbF*%M;vLhGls-dh1>_$xD3@V<77I>$GiJ*@jDlO2SU?NUj&g^J$1c*>L}Z}6J1xY}5V)}Sg=UI9vo6jY=WYfp zG=#c${OK)GOyPm`hz7?+WW`mrv*?u1)2{hhQM`M1LoG*3-qDK#S2HA3_P2D#@;0MJDja;I5aZ$8`p0sY+QA7x;f|;q#9t z*@4F5*sHyZE2d@ER^;tT41!9$LBr5$2LDGN7jc4gArC6qs!%ya<0Pm@%kQVf&jh>% z!M+cU7m8eM*iujdJGk15Um8m!i8I#G)IvD0Jt zBZL0dG}<5BbZ1TmVjV{J$L8}gfm{N*2QVval&~{auEsT+9{rAZk&yd2Z48&!Bx}AD z(Vx6}A+=pWUAMmlYrU1)DrEW<+QQ7e(Hfkwy-ni`w=20nR}Q52*6IGdP)7a~lV6>$ zv97m|mH)xtlCA~gWo%n4xtqsO5PkGP6wCpaD|zb8H#ybpvmOC2xoT#Hg&g;EWi)DtLf1uOoBmul`x~-A6fmm|LO*<)f7AT|oaH87#&=)vgJVXJM2~k^$ z1e@s-ld1uuFq5bo4&2Sete}|ia!c-cxo-4y|J9=6)a`u`Z<8ro;I$(%j|rpgy8oQC#CSY(yUQopQ7(qyDHVaRiKi^~}@CWK8l2^w2&Q?Lsk z)D6+uI<}@Y05b7>Pr`FHK4#CRLZbqmh&oW-==Cv*<_OXCJ3;|3gm33-d2N$+K@dFOSG{mLdk-7DGO z&2#?gpe0PLoxv?S(MI-!acMWhW}-V%X}@57qU0P2Id6^-H9{+u#$pC_h>AW#=W_Z=G!q%6C;ka@LyzMQ8+3t75fK zOA99Qf3)upQiI=WZj^j!$=gFI8C4?|THDE*FQf&Ss|e~rZ30iH3*6^F_t0jrT7}h} z#?*kT)RXt~hn(J19mWgy)?z0NyX&DVC+YIC@}J+FTvwRW!(HK(z&JYG=c|zO|G3Pa z7euCu40B%BMSQT^rKq;XY~dT==sR%OAEG!d!|^wNEFvfyBhYD#9z%5oK3)-SSAlSVSw&I?}qx0t;nLC#6`6r76s7T-6iFvsdt{ zssR^wn+9<{`<)*OvipbZzS!K>-RA!>$?nEtrW^usM~S@p>K+^|QHeZb2m8hvuo%EC#g*lrx7m2IgG@Rqw_-ChClM3}o?@eEc9iT~Z{5SS-y$~6 z%uPqW_v^;Gb~SOfUqiCzeKM6(xe}yESYar|`hsTvs$h8YV04jQ4eIk?NK z6gO+Va9f&Agn_2pHDbH82%nh)72lFyJDI>Bln}DbX4!U^R-<&YKq$=-@PJC5IDnm` zS2ru{6+DHxjE~+_OyX|FN*BtLIhxRF3b`|9#7KiAk=c8b#0!l2p4mYNg2<>93e8kDs4yp4-XcP{s?3 zR%RPGz#_(r8w@Y+D=`n{z3vS4GYQ@(*d8bNS2^bjU%V{W`Ipjx`pq_CWc4Q)o?lY4 zXRmnJzCnf`df}?!?3fwQ@(JEwEk0M1zrvgyHC#E|`gvZGkazQJET{8F!JLLwXy_#1 ziT~{n8nrmXxkXBS_l4+^PaJ4_zk0z-7cXiO2>woiHRr?z+&L^!>~f#8hm%@Ca~mmg z`(&4u@N_oYgE2Q~ySo!i>YI@(VHsb|4%tIN#;~>9sI>D_%vD!E!^Iw^MS8nrMS88X z0?(GZ5htr%4lW2kn1^!`C0%iqpgPD>gVT3D!)APhUfhV??*l&;yAS`pcIAV_WB~ak zjC6#1_Y6b^cGH?3g#|wthAW1xIwY=1W4C$CUtPewJF%RrVs5T%PLU+WuVjET%twC5$S8!Orw`sS?liUp| z#)#Hyf5@7WR?lUz5%4Q_W=m8gw>ysU=L6>lJuQPsa;g{lXJ&L~N%}lkgDA=){K|!n zEI-5&AFwdI`p$Qe!KFqUBDme9Jbz1u9$4#A6|et(hiL?ch^nvM=q)OSk|y78ug*#e z&Z)zTKK=c(5Dkg{w~J{G;GaY9sDQQ*)7H=|A? z?jm+B{_n|+Dx}Jk;0%AG1ry1NoI}K<+bvGw^z;L@gQh3uI$R;-kRw#;67q0zQf8@4`s^JU|pLH zvNrVk@OWm6dySogmGfCBKWQu~OC*2TZFV5VF+u0{Z%;G=hDHo!aYA(LmE!kd*6c{wh&Cvp~LS&C<~KKJkXQ<%ZAn1?1=a1Wfd{cfLi*Em`(a}d#o zYIpGgwoP8I?DiL^i>z|0ue#J+ZSte|%<96N{XK6#R`Kl2gx@PZtwG7%l8FjO^={GM zA*bQpw0on?%<*_lN82n^=+-RLX6GnN*&!r)4#u+Z9sOI+Gol&cM@y z&jI^Bai1I0OdemlAGLeDxBmF`jH;zdJZ~r%6eY^tod?T3#B8!Br}>kl3Ylc9;){B} zsv4H!sXD;O{)wxu=2qL3dBqQ7eCl-Z4rvWNQihD<@!YmDeQ1VBR}|U zx^VJPl`{?OnmBpe`d4{&AEDPb8>Mz7U3-@3EyqbcK@~FO{da*_Bv$VQ!z<%!NXeHy zUB+?NI|X4c@i%6N$_8glTwe8;&O84tPNsd>jnvMfKCE+7`i#qXMXxO+;jTZ8*5CAT z_ix=;pOaz<)@E$om^N(bSZT!!8TR{TypYRR=E8Bdedt$2&&e5^phYH6M7FMISrbUNu;LgH%xdk}jL_`i-AZ;YEm(L~tx{a`8a zCp6b>9=0>io-98rsW8k($P&h+sXGSNIdtJb^XCP-e_xa1_stmLu2bYN@9nS3$M2%C zg|!0_3j?SRZuL(la%$UZ;?I&N7$v?8pyVH-u^g+|5$>U?IH%?04KR8tB)8w=|4ks` zVRyP%PQBU{G1v;5F4W;KMo4Rg%+cI)7!am9XaacT6$@U2*Th)=g|!(Sv1+*62k%|E z^*Cb(G2{)sp?eBY{zTwYqAd$-s2@6XrrDX>;n+eK^lXIsRL4RytC3^IH4R7^;aj{0 z_5f%{ACB-!i)$h}^I;X8aZ^s9qie!uA)2+IN~@Bm@0ALegH7uFtN=7Zx#BchCu|rx z-P0o(zxp5|M&S`0Jr#}av0R905-Cu!-BsiL)?pa!eyqoQ~kLtbys-{5!&tX;Y{n-k5t_G2#OO%HH}bnu@*8D z)m|h|y^7#V6?ddkwT zrPaNh4SowKX$9pTEZh%Ew>{9;emD4=lD&kWfLVs#@AVLbB}e<0mOFhtB?xzczqAIO z7XL~o1kQr4#Z}62LXU}l2SG@nWA(r*!jbPKF)O6PomsoI7JHPdENp#xBZ`Nnk?#aT z6?4#uR(!&mw2n%kqEyS;vMBS`K3_%$W@qr*T>7U-Y1v>r=CY&lF-iM)A%H+0iFM@# z0>u1uR1mDq69OY~2@?7k7$iD{zo|2HCBP69*BNt>FAUu?8!5gU`QOGH1EOLpYX!g( zCe0Z0@J+FIueQ%g(-^$Sl45Ru7CTg+i(RONcqb530>H@id0Iz=|3|W zbb}2!R-EJ=UF8#IL@T>XrDA&DMy}||R8n!?yjdBkR1lDH{N_GgIj2CSMMJU`>o-kB z5Gt>G_FW?3s($NmU&u)m4IiqHjkZ=s`M|NCgkH{C+~lJ|tlbRamIBSF;o6;)W{T1J zOxb8>$fQ$`{e8FPTEeyWtKkaG8h4#;RWC+nL}hCpsQUugh?$F_Iv|)?zx) zIlsF(VaVzj{co}V?{|-gGSnW-dS8uoDhdbfEXgJo*8-x*v?ToJd%J;ip6`AXmBQRu zNrjcAJmxG3td3ZB$v{4SVitKNc1cxTd#pTncF?cSGK@ex@AoSW!P}GUM%IQV-~74L z&UZLb*8b25v#RQu@eBAX!2=1~1GM&)kC$VNgD>o4xN4YO<7erR2hC5cmWAo2zDIwc zg4`D@WKt+{PhYTry_;8Mzh}lR`DgRUDnU*UwW#<)Hs0)NeJUpoGg?rh*u*fU{7|gm zwtR97@){J2n@FP=lB?P?7a%zh=M!57Vv1LHF#KYw?egfRwRi5=d{v@>^zSWjj)a(AM`xs$9x_Zf1P5Q^K%qEdrPo-o!$nkj15C zD;+dceN6B&dC>nuR{>SIkoPiyWGUSaTU@f=vDS4w09Vqgy?G*v_pJdIQRllCde%pW zD+1rpr)3{eXJ*0zw3AgF%8U@>49tn8o^>PCiw2q0F`4bQ zVz39f;CKhsqHkhicZSCDQUxM$iyF)?_bq2xV;dZiWNM=sQ9g4v1c->*c`aL56 z%=Ek5)MDu#d+2I-pvFEpPw*~IxjS>0I->ID)iVD@DG`Jvuk>d^UiMM}UKMbvSi;4j z05-H%W5@An_f?7XYs}5M=$`PDs&~o36oc?@#J^J` zUlc9J(myh+{au-xo0A|#g}1id!kFf|$ZuY5^hd3h5u)#T^CUd9!toG9+Ca88gmAz6 z_)JJcCVJ3yz$cLhA{3IEV0pogXjYvp_bW`)@5gf5NE23UfqU(4dWy|NftpAWt*l}U ze5XpA@Fym$Q|V)AiN_@qUNcS$(MhtvbE5d{4i9iQq|z!J6^fxqb0nOW3YWS>trKY$ zy+rQMwK+Urt^1cXQ;I<{*v}8jU6mat|I-Mo?n*Z*odN1yJJ0baX$6SKin;mBWeT%zw<^wOrUYTf4*vt{ zco98(^0wtwW9C3)|6u{sfSI_AxmOC!`eW>!S3l(O#JVAVbGOy@bjUmmqgd+HbM5Rs z?J}9=#Oru1H*Vb~;yuX@Nm~XK0sk%t&ZVd%>RpP_%+*iyn)41s4VXA}1G%pL2+Jb$ zFa9et>XHadQhm0hTmz`8_sHWkY#3c(qCvohTMSLH1RB~da+$a8bqN%f{I=K9&v7SfGwSP#>nYC^RNzpA(xv^ zfCEC-YSJ|a9k(`La)&O0C}yReQjib|3A8H~Q4iIDwnNnQdx1{%6T59zGKNk3t9F@S z&UT!Nq^4)nObS|;vW!mm4W%e?E*PcaXZp1Pf0NgQ=_MW~S`a!_qAiUfDLqZ! zMC!5^t0>-^KYv(4JtOJe8-BvZNMIjUp{W?(t*lT_)38xHWBo$_U|E2g_I*trp{9%7 zh?V91rli+#7O=-7px|Us<(t_qFc~D)^_~%j_E+YyLO$sffwaoS`kOyzrdwfJ| z=nrcNDk=Kc`D|TsCyKzxmWJ#(P<%j5M|~21qZotCm#bG$S$GFSwrZBUZv_B}3RmuT zDqDw0$dCV3p-eYe{|>=fA#^ zvz4u!>zIYOEc@W9h`ovs+vT~1@Z!WQ^dCjeD%LP)-qa`PdZzd8f&dI=niot@{0sfr z){y?QU=yaw)eIkiI?kuw3ta|q{eKx#q#r!N6?-yWyfPyHV{--1s00`N=3I}-O0jw_ zN>KigpF_oPyqomq?-UNSxE9aVOj5hK%V!u^q~ltwgD0EmM=<||0q`OPfpMCeUIl54 z`?fZR^da&m7R#w3Wg7WI5ly)=GjZrs3^#bgDXmUqGDLzVbih8`f!&J;AR3 z`F%B{87E8K_j*Eqj-?#5FP20Coev{Q36WP}ZM5%tP#%KA!6J=(>}XSgSb=DoJ@abX zXTIWGX8Lr-Y*u&sTn=VCur<6fKxR#Qy`QebZ-7gd-J@W_ei3Jdk@lQZ@?}r>qS*FR z_GiUJ#8zA+gW1A5m(qs6R7Y)PVUe{p*PQ4pZO6o)wLEvS`OyHTA@#Ow8U4{zhkEIg z6iFYNS4HO~uF$cfC4vxu^KVdze{i|`mRig_g+m)S=m2;h33EadYrfz+ zhLj`2VKw>LS0_P{PdDY$XuqY48!?YCL#*q-MS81WP6X(djS=NrtE6YuFPZ8klLuYd zju6N2@Z5v;jg~|YpRevefIr3alnH#fJbfvA;77;qmbAW3A*C?A;^9RogRChLIs6;A zN4j(t%NFt}WlHcbaM?&ptS8ye`hiG%x_C+Xoc(`+Ge{WhL>f4;vNWASy!Z;zvMlso@O4j|6X4Kxi8>t zS+Ph3qURb*Ljl_#Nhsv_68P6RHw!kcGx@x4Vb96T(Emiq%;fodN_pFbm6#9u!?SBh zi4xlDug|h)TU3%8b&pGZfR+%bM08Eh*-&={^0rz)b2A_A25f3&W7DC|9uw5eZ! zb7{8Lkl`U^-;0H;1d$ENAD@3xA>j#fbRYe+XuDBKkF0hAf4smv0*RE~cqoz(@Ma?t zphvLnOlAzek)%jp!Wg4A!xQJt!)5_c-l^Ip+7EBmmtQ-hDH1y0UPJfFCT|qJWPd$qXocPt;N*2PXyqq0wqhV z*j-Ml?Rot5EXa@FpJK*MGEH*su;&>B#f zz|7pszFe#+)3NXDWu_EU6-u{2N8)79&%+C~ByRKNj#Rk=ngq3a(JW99R+^tn*UV=QqbnIvyA^1x5e z?R8v@hOJh^2KPa5S$Mw1O4gLhey3^EspBoe1+Vrg8rGxEwb}`p>4F;s4xfnc=Po~; zT2N{YR<%^x%scp<$&L=(96+b)5Rv~PE#op)U#ZCoK(f4NH%Xw)H%aN6-ZEkbeJ=kP z-n>(pf1mx)Sy_$y*C=#`@SPUhI~Z4PY`&Qa+y212t1z*l^E?& zE}lXk13dUk6A8yGTdelQL35M_uY()bB@~rF(rg2RZij1{Hrhb2~8IayTmAygX9LJ2-HblZQB}897Gu-__$X3PNo!V z^sYUdwRF0YFT%O&0Pe*|%(;@{bxRWgfCOt}1b!UEP>%|c>G@YQ9eR3zg903~FOrb} z-x+B7m*(!=9>J8;qe?7=7_GwkeoW+7J${vOO_bCaP&N@Ui7jn%hH-wL?YV9X*g~xI zsmrs>?d>1Io@N@36A%AIChHo?yYA5}^mUti=}j;JB&=ouhTb_J(>_~mkiT|vC=gU{ zHxH!@P%8xgU>8+~(T;9e=mRWITC2w)#y;q(Q__T1_gvn&{|+j5m8(qST_f-H6~S-? zo58$44mT_RCF}PH;&33%ZO%Q;_&^Eh$H=o&A3nlgN(aUmbio0`ezLEP0GkL_fj$g6 zK0@?Zz|&J|MC7Nc;t*~guX3mytWK-7{U6SS?R}#MY~q_Vak9*yOP7Wvj>!gh`!3Y! zSYy6~9tA?ZEMcEP&jYDxF>%=>+c3Nrb`>LJO3*UDENt`4$>0bdAKVBOq6FB>N#4Vz zKQG%{Ftr>j!swwEx%b~&qe2-+4ocDYa)C;%_ZXvWOHpb}opxB@S|elBvq`CWo@26{ zD#Y*$Ndj@Zjvy^;xq*A>Pr#rB>(|oO2C4?bwV~Qr174E{|0OtV7*mGWn^v6 zF*;S6p~95%aokZA&kW-!c36Lk4*5mH8=xbMU)=gny`c6^VB{>ekHLU#89^1mnC_s{ z1c9tDr+s-WBZrU}4?+_=%&Z&>jx_f}%HXABoK>_8k~#T7(3VqqTpGX=WH{d7J1df3 za}Ekd>Z|)S^{!VO)zz(V4g=#X05FlP1TXr|aO=75>DACBV1Y=FwYLw%nXJH8a_5n% zfX`RdN&SPX<;eqvk_Ni#ukf|3@xb=I30#_@Bgy9tIE)_iHIqt_W5jGBu9n-S-K^n( zbd=#9U70MndS50-)}AthJw+fcJ|`{L(|GufuuuHDc0D~oVC-=XpTPk2A} z*KHe^(+MYM-IiFxkPXFgY*bCbuh7a#6tJGR6wrN&P=}jexclzqj?!O>^-{Z>;ss8T zx+_zg?SOnXu&pK$!_2+nR5?iry3OE>;$JWYjePAu(qR%xsRpL#U}k??{!cuEH#{{5 z0VfL^JhT^pM4Qk*66;UdmAw==2Oc+Zq za6d4Tx&_cv6|WSnrCOT*rzc1Q@$k+lQQao4=B!jX=Ju#4=ESZp;iBjvRME(MP_PzM z=D$Re9&pmT3nwwW~!6n1!2aPt$oJ(!#)%x3ZD**r5)+N(MATTDH zT2Jt~fc03pUd;Y82gIP3mD;Xey5}2^K9Tib<=`W36|{G<;q)l2+0r7YBOJ7j@rn}8{MgG3 zb{Mkzukw%_dQYrGsqry^aLk=0J9ZnY&bJN*T)_h~lGC79vdwB?>v6Hr-!%98{aSf3 zoB~?Ov2HN)&idn07>Y&#tj+CBxPo;XucHkrSCHr5Y-wf13%N%(VX|Kk7Ck)1khGxF z=q(lKfq1aA)R|1^mZ*ynvm5=bxwS!l%Kx(z`HWed_PnIzE2~esg9w?Fw|FPZgw7Zq z5&uj9phfTtI~22SttSnUtqwbM_*y{uDB%>O z5-bD{%E&40RD%$m7J1O~m!7TqOZrL^RyQS~@`ZEF$IOHO!Y;gBAdftSch^}Tg5a46 zqA%9#VTQ~H%@QnTz_sKC;9x)4B_j|OV$P5UCfT5!_{Kz1bmou01eo5W*5h30DDaIexd{ zy7AoJ^{=9LnWS?Ah~B=~j}|Um1IUtoMxU6zgSDvBQ-j!t2UfffGq37qS;$EmsnHal zlH!hs9wVs&xWWSn0HS0lc~syWvF&g4eNsA=n@DDsR&W3aK6I|1)loH(p+<9rbEk_N zipuBca8fPcYHxomR!mro(xoqnmW~?hz4%7Xr}%7nn_z~WTV6QkaW1vJtTT#1=6bDZ zZ7CHhnaCM&w#?ENc0@YG0Q3`qWKUd!iYDXWT6jsc-W0%#Mw|8IsQv@{) zW82+Q@dYSgw%qpbl+ONgnVpCG?)*db?e8n_3KxGmU-3R?RGp5E?8{xn+XTIL=n$YW z4|^SE?Y)$1BPgT#F-KdPehut43I61b8mBx>#7q(l4Ed24amcAkLMdZ-I3ZqmEg$Cd zhm|1IlaWF+u<~lvO6>J6$YrWm=C=Dvp&pzCv}Ii}@cTUn(4lO*m&{@Orv;6P@X<&$ z=~pE^7TTyMYOdkXp(d{GLe5!}%6$eI^+^JpTahhnooXrz`JVK2WFHK4#G}2tldG^L z+#gWfDfZuF^{chc!N|J#()OMfHtAoJuk)wH_8&7MWJt3trv9b=sY$B4sGmfj`13l# zF&F0BoV@k|EfA~cFGzGH!%}l6qI!(5@@9L7_*(-6^v_YGgeAIG+ZHhz_0-{M??a{G zX}p{29EB1hI``>)sjLWTd75|RFx@6{?k!VZ>M>0KuMgzDaQC4|{?g9*0cy}7GeMS~ z)Zu6)XX@y<2QbE;2mkzwOZa^#V;x5U`PJ}kL^?c>`SPjWm9R5>P4n%4W#6V}ioSsQ zX7+r5{ZI)zEnD$Jf{CwZqQZfIAtv1tD_HZ#eda)-Dz^^lP0D%it+)6FQck8klN5rj zWa!IZGY9{GxI6l&PY48XEJ~c6ASd9(U3Z1)1_x76Qhy5?!Vits8g2% z6|Cg!b>=I*k~Xa^?xfc;e_zumrHVFl1d*2PlGmvDX8P5?kb>stlze05k>~LYi2kR8a7Sp~1x=$q?86W+)_Zvy$BA zeqx;_h(|uTUzNs-W2o4`9r9l~*yW*>7gc#D{o1F_wP8C^6A#J6sr;!Zydo15W%q3q z(wAtSKHL!>67Xf_qibA># zKyaj%}P*=nCx%8Qg^_#h7hp0UaXzm?~0XAJ{_DxrG#s4EjrTzQH8*BG1E;yIt?FS9vdt^6A`h~E$y5voN~@M&AYjFXljeB$6a?6Lbp zv(GPM%Ed8lp2~7c_PBN8jEC|ymG5+(cIYOhoDAmSb9jF}hkfalgb4lw`3^8H=jay} zxBeqAI9FS*H!-t-ITaU8gYFUIap)vFQ(mU%e`FiUUoR^%9lMc_v+lvTnZy2Twf&1@ z%7@k?)Uj-;*5>*EO7C@p*ZG3>HL-^$&hZ4ebqH0#_L!moz4+-=KKg!bZwIs4B2$T> za$916Zy{SEn(<79^c9`B?PFs%5}H7;tZ^Dr4zs1gRM^)Cs%lOu>nO)CPTJk_cKp3t^9;IG)%s^QSZxakMtc z{$lQ=hWVncaGQz^S4HX^Y(hpsft{@`=#vhW7e^`pWbzAK{S?BxelPrw!LIVbB^1s_ zFQ|_K+Abg6NPKUI-S2Zr~^jao<4JC8v1>}9f&Mf#WDupr=Q^Ifpf?qBT$LvlgN`VkkI>28YZx1 z7sb_t|4jJ%!eVVHDMlkm;|rwY(MesXslp-lH!PeoAJ?_xU;&YK5ok72pGkntU$DPhswj4Q|JpP1#8_MyRn~^Uv*wRv~OtlNRjl2~Y z+aVTF`!?0YkNmySR~$e=m8~hjspzIP9W{;_|Pv$0279aN>>lL}EqRJ>!lRe+O9i+LIgVtg; z34&No-ypRDWcRJy6b?C~NhAbf+py|tY}M*~gE#Nx8=$~!I#t{BVH)KXurtoYm>!N@ zb!QNRIL&P30GrDwc^ipR#<#jL%DU#mcKG%l5{JdPe?J+%hqnH~6pewz9{ujTs%4yH zu$;uYzO;_<&AN^WjKeMnph!l-Y9@G{ZIcYC=R}kjIOhMcXtk6fjr9ja(2a7>2aF#@ zD&V|?7Ix3YissxkY3p#QO&E!<-)Yir;xU*|aAA^7NFP%5YYM_~f+s-_quCzg*q{jLjG*l2)sH&whdCVyG)hUhG6lL}cu z@Kjp(@dQw5kk(i-(Mtm%gR*+*WCnJlP#(2sFLm{(Qzi^a8sda43Y=DlPO8aOq;7bS z9hfTs1ccd$d$oHIMgaSCQ95s6L{RNEh*!+d^ay<)l6v~0Srb;UW96SyE^>(kAhz|W zyk}RXp7B1tD25Q%K(1H0lM@Pu?jjgFisf)|NCtKb!{jKO*w7nH!>n<)5{WEE@!LWr zDV6rn1lB7ZDG*+P98Qr5jE6V}6e=V-=?6w^E(igY*d|NmhNC}oa6*AX|Do4#7Z4CB zOr}5Ddw8vo?M_;JX2=Pv^qoGNsaz#K#Ju(22a2=IxC}KNwGZmBS6oOB=+R+3_Zp)q zDr5Cimz~U~Xg>gn6h{Kjz-7%Dao|$Xa4C}#KPru0H7{M#m|5n6=;VGra+!_`tD>H0 zQ#Mva2!4dS5fsgLqk0Q(61~L7m|l@#C|G{?Y_gf%^RT}%2!Z2)p1)OG{fmTryYN6? zBw+T%rfdA`%F%mOoe7WPI`ZG6k9^I;j}CTh`)-#}4iL4@ZFLwL=s|0uP%%_=r40nX zAD>>jwmn0W1wh-KnSC!nj=P-SEvSH@r<8Y5%w)GJX1QF-6oYJ%1`S48dJn&-D%$Ut zBO)QM1}dJ+Fyi7)O{yKl1Y^%fq+$u*^(Mj8u!`v{d=c^|WiPLKF8}9zblhA|v$BdH zF-6+t5MX$VwpNS`%rG4eI^qf#kR=BL^k?K(R8tDpZs|TYxON>kTfJ-33OF&{XFwK`iLyYl4`l1kFKa6~{hEGGHR zEeRx@bzc%bb%6fBKoR=Sjv zV3)gc-%kJ@KV40+st*J4b($u~A!81dOJH;-`7(#y-PJd>R>L%2jVnjF>=Z`R&`Qgg zk$kwXqRh$X?59mRiSX!X2n7D=lHvM>7QvB6o{#5R+$(7Zy{Z}1ELDuNfl$JuTR!_)*b032s^W}@JjAk03h3*a;K}ifFHrbSx~F3?}R<} z1F~+vsVr%Mdr;f!!$g^4n$?U<0BH!vBRyy>jtaAXkM}@keA8;lsfb`=MPYQEs50nX zp<#TtHP~yebPvj$v^RT)SOPUsfSxNOtxGqE>^!1Ob=IUgU$MSpzq6%ts?$D1-sO{i zYiTzjy?WE(fyr+L=%zURlw5GiK1j7+r9i=6l=ULK`@IapjwA*Obm&2Lo(szn+J_S% zbD*?SlvsXYaYAOtofJdwhlRsYsek>ql|~QRLf;qfY{TxUr8SI%bf!@)&X#9E%EpZk zAg8*yXC&9;mQ#(Rus*LKr5jAL*b;r3#;&;qo7*dWq|rPh85`MArNVu%zbVdege z{I0E#Id4KQV83JR6id8MlwU9D#)UvH)U)b!dk;XEBi6v5ZrDq#3iNzBoP{KHQ^F>IBNt%i@$jZIohjvJSOZ zGA5}yCcjO<90m)t7Z2A>UeVP?m)-VC_&rkG@clNzO1E2chS7*MCN8Xb5A?j){s>qn~1C=A|^bI5!Ko0+N%alD_wek0~no*ZUd{KVwTp0gl!e#7AP0m6*bVo$K!_1Q9 zt%}3%q{o!SB;L4TFFS0}w5TVdHMLVtsfx+2{E~1MqF#@S)frKWqCuGw^N{Vy5o(&F z@h17W_C6oThkX3k9vh{F{;;1NiN5!;M^6nCAnXd$9VGShaI}}Q?zr8a@mFy7@8k=q z{XFaV%(2Go800V=o%RTA1+1Iu#t_Bf@D|e>L+RFM1jghi+VPQC9~jUWzcpUuI=*Pk zj)OX(RHR&c|KgBxca)mX+XwNsrxrbuSSHru;zb{8q#NfK3N|{p1k`VN3NqWAhfV!1 zMz9LF-n7b$gKnrM(!c@J#Q@Jl<72?Brdv>p{e13NF_Z|eXwl>eW;0}Yqfm~eP+KP+5N;8w8JnCMHz-@`kIg*w!6HD z;UVyozkK^D6YvbOSePmR2!NdsHHW)d**)L`;)@)~3$$RWaF!@(jckkp`Fj3w*pEjz zk8kT8w>hHmn%cHU6iyMtv8HMC{--)a#H|%@Oy3DNYhYj#*w4O}D3!4|T?IE2PO!sr zpPD+PXP8IU8*3G(wgk4v*hs^%yf?8q`zYP$y1oU6(fw%)%!u zppOwa={wVm-qIlkr5W&kUPCJs>o|EpfHPa{{!o)*H|)Xs1S{h{Sb=vz_1;xe*zne# zD#HDRS5X(s00;kTxn(S^bV47o{M)C>`LCzOsGTm4D}%8r4oug996O@@BA#W2+c?WG zsoD~ONkzU*(owA$i6krsA@bf7j_2-yyOCxA5}x!~YEFntpxH1s>JXvOY*l zkY33M+S!f0L=G|J7Bg?*AIU30RZ}lH+o@xS{8>;wf*slDOftfm-j~ZcM#Njjyczi> zbb?00fd89pC#=BC0SRe9{b&i%&^)7US7d6_p>A`HOW}@Id1*2kwcnPNbH!#;%CxrX5f1eN4wp;IO7v@g^9s8V6jKOG0 z;-z7dQHk4vR|G2Vyq;)v^BSC0@E+;b&iMj%OGa`L4zp_3w=oNsi>co}C}@~zm^@{A zP;@n98F005{-N`^PhorpCS97NRrw&q$u)maysr)X(&L2WQ7g;jb)CZx*_i-G(8z7~ zx$uH4g$0xY^gHO__F)(N#nV%7QC8;V4azWa@Ex4nfZckpltMc#Vs@D4MxfX&22Tt+ z&^rH7RdSxi;(qWOuRhxc_}&BtUbh8jOE#b0A!9dC_HFdFc+-^q5Y>*1(zzam`t&o0 zcaJGf&+y3e?v)KP4)N8{q^*JBQ-N!C+{wBS+p)%D-_QIF+_JlA4jLZ6CmD!6c?6!D z_a=j@ZS1TejJ7tNfcG93VjG=BW~(ZPL6<*ppup}(dRUY>aH;13jc!xV^^pP>$#Hlw zPClH!lca8B#yea?uz5Uf?4?#d?Y{O~66H>&cg~rq_qS(^QP{v9Le_e7yVCe5PH*AI zva1zmu8TJ2s@vjF+bNXXTpIY5I5{nz_|;Kk3#mXKE{ zn3aA$iKc-`CHa_F!i6zw-ir0+f>w8#M6?8N~AGS^S>&LwaQ5v6f8 z*h6zHiO|v~N{A6}8;~xoE#Zgs*{8z6#g}|%!E-Yuc|Vx4bj9Zwq%TO|wgQbSY=c(% zg@r(yCGI1MAhz2k=y13Y*{%~SInq8kS(O&6Qy7LUEMGxVel4r^=Cpyyc&!1RlDS^) zo(DIR2h?VxQ}u|jQH4OZd__{F{ts9HGm?ITlZ8WXDrC+DrNK3kwVal6p)MO0<+p~h90S<^ z#SPT4Bgp}*#r7c~2KdCC`4t>AcR*pI_fT7eoyte<#}0pLGyC_5yJFe}YoQ|SdI?V2 z+Tey}@OMAilrd2x-Pj@{25IYcaOaDacVI=}*tyc_^)qFI307UdX@m166*T(s1a#(? z2JT7&$STeFK8pbCLh$m3)OG{0F(E`RGnj;}894eHxU2V4?{WM4dNZU$?{y*!K`mdCDS7Of{SQ@gv8s(3a8!X=BtLQ{#0@aCNAqhobs6Ut zaZr%D0*OB_JKd`Ag&g;r4##4@@!)vgfx!yJSmya}aPs-855Yc^>sXAdvtKM%Xv;_! zwkPRHb1>{KL2E}4mGXfK6hhmG;)t1ockFV=;s)vt{-@Hj z=0p^jlxpOk^{RLUQnkWVV}64j;^vG+7^t3JJ)^Tc6Y!AV;o`u847g1NT@)0nbHiYk zKzaJNBPK*Ik{vgT9aN1TS}-xO6||qdz>=QF5#PwJffTo|Hf^j)Y?ihaLP=LyR|{)T z#gT<98iPcdWXrZh51kC=&}s0V>I`Z3jBdx+vo5g`T9BCQWhtV)ID~jlqVAuO#wo2D zTrz~NI;L7NI0$XsZ~RshE>=}r$`*-Kj1>GO!$UTAzIskh9Ive>i3;(VVgofibdeoW zN#;UqMG)F9#AfA~HP4oVe7QceQa$2OYKkPLJqnz^c_APWA1}A6ZgLzSP!?jJ=qoe6 zERPX0*Ll%$bhtGr_>)hH0YtaO80~pe_SnUK4tU`0Y z8ZqEiVoo-v3V2PXonY~t)lYH9nNB0Y(tcdaum}aM21+UCwliN{-?!6Y2_cVEi_5QB z3h0ss_>N`Wz+-XNLc%{Z`I-(r>S%#{Li`30ytn+86>%HZgHCV$%R#JbW0VrHTtwbB z&;}pmg+?3teSm1^p-}i*XK)+61y_ng(s?R&|3{PBs6eC(EQts8m?}(N+Ay#~S5h;iIVt@BC`` z!G&S0;G2XxH7DtMDCZ9VU|Geptb2`lg6E@5Mk-=SblDNhGANwrg!O9S9Z{WRQ?}_v|L#l?W>0GWnAOC@FiTU%5VZH5Wev z;zhw0bfOxqkr3;nVhmbdO@Pn2{$9>_<2|-nodht|Alv+_99%Ul( z&0s-*kUc4Nr5&&E!_D)t8<1AEaEJ!6Dc8F^I%VR!Kak26Q3vEg$1JRzxd3-69u^f= zudfIHnh@6zT<-0Dk4TFWu{9D%tQ!!0I(5?*{~hC@-gPPD4qBJyK=-%OiCeAd`$zND zAFqVXNQ&_(3hRX6v4Gy-dg$IsGN5G0r5hc?sfnXw{+#I64m8eC^6&UFC*9MwpHG7^ zAM;m9&;M1HD+u~_n(wT)2a|+hm2Why(xCi6Mx8#}I~1ASo}x~0;o{FGuVeIK`>Nyt zuL_brJiM5k$2wdIH=`E2AYoD9=c1Exbi>elGcw^2GuSV9lrP*Os0bl2mt&>8dtdg+ zCRh;wPy^sc)29PtNRKi{K4_hnHWR9_5|t;C@eq4G)!S^-lOIEMUZta2GiIAIsNOR?!rqileY+3&F%F8JdoZ2!@=E3@V*67xQ(LvtzI}L-ia4h4o5fvAjr~D`)8F8tWM`14_ zZa$=$`r}Naf@*%7L}%4v8s%5B>zT&b<4`E~Fbjm>i%@Y#cUWwn_xd&`Jp8R!ABtuz zbU$$~dyU~Nc~^+|=W`f=sFGyHQ|kyNgU~_QpOC+sS;Ch^Bv@X4`6$#A)4Y%@vz zJP<>?D}~kL_TZaO#+bCw=+8am6B%I&1;nvxmIN15wE?}H4vo{|d)J$0Qii>J-Hdw9 zh_M2+k1+wWZ8hgKX^PDk+BtnMxHU+1`{YwxW@yV1yD&*ne@)B@A(vKQW2@tOb~L{< zg`?OPCqC9zY+t-0;oA-)kb|V3KO&UAvr&I-M8{r>F4`moDlUMT%Z=eCc1#?OE*t9wzZChJ@2gQb*;0m-EX_(6wy z8WzBrU#iYquXu@QUajMp%q&&Uuu}VgR(L$G0trSw9bIJ?Y=j#dX|fS83Lnn~Y)Lz7 z*U5hKqND|r0%%)rcJ<^@O{wOEu;J**A`fPVZwLz(0jw=26^@#lF|i0DYJh?$R{%Re z#J>Z<77ISbS^bNtx__?_ZYTfycr(t~`NGTF!^K{ESZ_|XY5P;K&l?Y0%hV$ZjVJ+0 zib4skbY$>=3k)lMAFJ^#3r`WZp9Gn4UA8H7uy|3(N%w9M`bAc~_qJ&_)1TL%c?hWK zQ6IEbPhjs1K?73enzgRRjNZ=19rhb>y9A1WcZsoXh4LU`hreL zqy(P3fTR~hkH};E2v;aH#@sVXI@0o`!2jfPx1x>JECo;C7Hsg~oaGxy%=i0Mu{SUz zExL*C1+{`Fm%`ope^1Qu&X;Y6g_IGAS?W}o*)ZaGkB4pUDtV2qv8C4oAwoO>>KIPm zM>nw-46Vjk^E*a97xV(LR|l4s93KBRclV5()LrqCb+J>K;nNl-D4U&`t>W`VTeIrp z{RHJbG(p67GN6MzSX(M$FHeoV<(#=z3S3I;=WICmBV%ObxRh=KA^t zc`O>T_7!rf4Mw3Y*z_#G8%0}0C1bgc%;g)2O7_nr32K=bf>7?Q_Grjwf{Hbx-w7xC zPBkU8v#9h)RlXOEn{w{4)5vO_)Vgx+$1ru0$~bY?IgPja9)3@-kGYy=5^OOd687fc z?>^Juc)l50fiQoSF3{t@#yEjjST!oYa4GxTu%rI`%3{>5Lz$c{_Zip+Z~9A93rEKW z&Va&KWne_|%%Ed!HC$s(5UCho8Bye}d=N|PoUoO+u@AaVj8DnHLxn4L7)s(eIihxW zl~dkNcrDfZ)!3Q6uT^RzOn%88t+EK~KXIiQDS;xYtFU?iF9_f#$f*RKIxNw#wQv0N z@|lk!MN+H0p_z2WEgOOPJllL1O7)XLKCJ*siBF{`E8rMllnOR5YPT?n7YJ*V4!Ck0@KiDpb+f=vk%uV z>-z3aq5~X#R2|_-*`jqywNLZ+d18GTbWF|j5K+Gy7Snh$JeR)eR_Q7Nxi}Zy;1aFN zd2ZqUIgy(a$5V(=UI84AGfg7XM=NhVvod`e%d7*88_7F`=!p z1`s-L-v(Wl9n|Z=jO~)a^+ZgH*ipO7fMnF9*_BM~SLErTzPR@@2Ah1VdUw6iaM+S@ zQ$7T>Ob0AsBVg0Y4W9nXgAIW^HFVQMC44Ks!%4->YkUXf@t5Q7610N)Pu7zq>84r$ zKpZjKP`>-xdodVw*B@f*Eo(K~5l@fL$r2TC$Y_vq4f-UNa*(>Pm1*Doswsr*wW}MG z7b}Ak2?_Sr(Bh;2&b@r-3khmHl&`&QiZY_Z__~m=O2T{q!1jy`@}uwc%; zKuv=tD*1h(M8h|*vg6Ibe%bW zG-oidf(?c+yx>*()UB0dZ0m;3OYI@+!%O=0uqsq_@k83k&Z8~ zMWNIhc6Q9k&mPEp0ak$Xy1R6&mEqZ{YroHQRmjN+{n(s%_c!RSiP#)!@=@u z{U#%7x;FkceL(5g2zlqo zRJS6gtr2{))nUFp0yp!Vb5Qg}1$H*F4>)UUJN+LAklPbU#~*c>RO8sF@zSNXV*lS0 zPz69Npe{qi9y+TWh@0aX9p(wvY#Pq~svX75nyN!c<4>yuRYs9szpBl=^NeR1xhJB1 zI9`j(&DPWQ#6dPq#W|@RwJF5^-+|q20zkn(U+~Exq!e@GXd8q^bVri%!0XP;MVGdum?UL(i;m+M zu+)9uJmlrY!E=DfG5SDIH^Ty0E7FzeD13EhyPa3ugizsG6Y|{L1>6ZZTX` z;?BaJ2DaW;^Wyc55{X!rzstp56Qh2#R{wN1l4BdMzTgbMJ$VFsn~E6FXAPE~`}< z|8Qx)Jy}`ZpBzXHdo!N^_ceJRa&NDlSM+aH6s-tIx4G~EDfV?H}f ze=Z~YPdXTtl^&p*(hhlDkSPBZfIN5v?74XmCE4cRS)w3pA3s;smKuuj;^Ox$G2=z$ z|Gr#GBdRD%xA$3PA|9%rwchF+^i7nPOXQ{OlXp|D!otZZ>~%tZ@RHQQHR}v8pK4Cy zp@itYmV-?eKj`2X@6c!*b>Ec+k%|-L2`yDQgQQ!P%a@U=d)m1u2@mL5+P|)8Z>iE9 z(B~C$7WHM2!H>X!q(oya9S2ZSZB@%kwpn9d8{`}T$am740@#K_l_NvkD9pTA-XX!e zeK54u=n+B>9)`^fDrY&yGzHvq)}zQy2ftWpkXXa@tIp+CZ__NYZdjfZ{ui~Ak}=E- zO0ry$xBk0e6AR-=MT%#5^kZvd5Kw%eWg!~+@S4P}wwtH`AX0a_s_8pRUMNI@o|<6W zT)*t*uwJUe`NPFy6{bN{F;tfmvu6|;r!US0*1}I1d6kW#2{&1XmpXb`wrjH2^1>rk&)<%c)};d(yd zt;?Gaownw!XWZ82r6s5cb{zv6G)znRptn<78<{@*D72fRI`3=@!-7JyJa|RQh^%)sXHh|D8-^9 zNZMJZj3{oP+*NbxJB^5~pl(L>UoICpXX4*FHXV2@TcK4Wi6jpfdII-M-hE^uBs0JD z4BZ-|LC<$?Gd5fUT1jceW*(Fs8vxZ(c3tl>j*~#@6DIkXL`7610Z!SM2v>Xc! zS5PFqHa_k8B_y+d{d9b&37=>ck+H?s^jshR3|M+jc@41%ukKsv7C8i>7N(YEb2^`( zrjUHWJy4P}^KR}vV+``d!<6+(8$^|T6Ce503`V004Ku9HYTKtV8%+BntM7{sYEVHd0R1z%nvO42vV#Rv$5azgeukoeYEaoRK0T=0Naabry#q7r0V`k4>_?NBhHd=i!62*X=<3KmFtb_-M z#L=E zKr|e^GLx56Kr;rmFD-Obz5FcBsll=bpj=GcXU1A}&7Eg$`cl+r=K$<}LnB4uAd&7- z)bKpTQzCzjf#jjQZDvqoOv}G%RIA;zx-BARtXMm1a*iC3qhr~jTBz6cB?bWxe7C?U zMdMnFz(1&^YOtH^o7#j~O4Js39wfHNqwjWyZgox8&|%0oQmXt>*2r+>^0CF^>xbsZ z0vrE7UJlqr0M5EjnqqIw+Mc&V|O8kvj#aj~# zowrwj+@DP#`JPOf(Q$m_(rA;9LrT@I{r=}(?kDDS%c4;qtuO63f5xq#X(I9yE zlpfkSHp>_Z$ec>-G#exQ+qYx@GJ3m6FDCkPjwW@A^?}Gq-VN~F%e#(?}qrrBg2R8nEUmLxL`SOR5TkT5J-1HS{i zH0@GgAps+(WioF~!4lY372^iD8Eqm4Ux1Gn2YD@K`t-MobOxq$EwtU|;PK!+_Sze- zeloY{IMLQzun`N?W)Q8%oIbm5Pet}YRZ=<*jA%w^_qd6gxm&g`8Nic43#0WMxZ@Pb z-01^r-Sm8tSw_>4r|!Y^kiXU|&*1K8XJLK+mW70{Z6C}ThF2@xDd~E-@s$uo>IF~q zg+p`9dfmcMmL^;Ib1k5Ko;g^qzKwA>vt*tsUp5N6Y#m{w$~Ozmdx$GebrOwE+u`gK z3i1t)E{3VB-cPy_8w>Fp=)>^(dwI6h0t=ibU&@3CS+Efbpl~i?N+v&dV;q3xOi$MF zH!hENBsz;O?Aj3z5{@-$5>3OmA2+NXM}pOJ_mJZEF5TxO=+IMqb3nErV>|5Lr))tY zu<0(xJDVi`RJtYDdOplHbo$~tE8?_w+b{UH6PmZp2_}omS`ayI3(Yhdf)ZKV{K|El zxQsu91*G5~%jSn!V|Hb{FrWU#-F)Hv7u7vUHF6RXEOpQx!WmUH*GW1z$k!yr*1|Rm z^DOubbC1oCmJ)rBa3*h`_zTq9J*I89H_M8|^XSb=sP?ed)rZRO*GAf*CERu;Vb_!{ z-rio&XMm)H(XJv1%4Jpf&K+8W?BP{tR%dL)?i_eX{Eiya?gMRbIe4`_~Kf zT*Qo6@LpBjmKI}zx9DS%Z7=rhP>wMQV|X5v7zL2QwQSYI)VVZa=FQ)v09R zrIwn6&Q4L6yu-6^#*x`Uj+^ z4&`|~&hfnJ@6jDU!=q~_#bEDi+HtBhhr*n&%e5_iQBVh=Z_bU%Mi3-=!n7JZg|hya z+;!qdTMGFQHT>}Y zJY7P-gsP+r zD)`*RViq;i_kkolJZgUC54gP2-1}C>@VQmJp`S$<1&@q^vuAasZ>>Cb!z8h`8DMd- z#2X0u=tKlSGcC3TnVqyxnim^;^uXNp|K+JV8>_ak*nw)J+C+)6M`xmZ@blEpaAUj( zTwu^1(`l`&)-|I^SN|X~uEW!=&|{V9MhNl?ma5!8F&obiTcBGEXyGpc3rSmv2h&2% z>LNeUTRcHFLS06s>U`H~%pV}gQSI370kRq#DCp-T7G0ELCSA<>fu3p#teg{UpQ-xh zR9WVPgv^O0%<@%iMx!N!V(?J|m@Nj;)9#^$a}o^SI3UQru!j2J@zAfr<^efCcTj*j z6!j~kM*q=Lc}`~EIPRWK(m%irXymY~b&ivvaS2?)zv$?z)_sC;Y0_-hQgJZMNoxSv zU5@dI%Gr*=^LYkXP8UQpQ8cpz@aY7QOLW{8RI=_(Cemv|Jg8qogqP&+YV!y-dl(|w zqcyWr{ixFctC%EvB!ULIW&KcvGMExYPjG@QfLT%kNhzcN{?L}VT9r`F-U9ps?bXtGtBgo%+MkeeZ?EH*Vr-K2WfHi$ zg@@lsjL^nNH?+Kva~t>E6*;lF=)weqF6{hHsPdN2TvO=22%WbA?+ce0YVZ=8I-Qh)rq-Y>*$<`I+j{hWXXs(mj!}k2HQI&~cVy{TqRj*{s z&h_q%-1Fpm=6Eo;V2Dov!rK?2eyj77)Fv~s9@(6k&UN7^_5H$2{?u{&f@9CL_9e@Cy>Wt! z;Ej1z_hZt!a(20U4+6f*w+f!^S8@G)A&qfyx@sReZx=xj<-XO~pkC)gBl~VCggqp! zv_ZPAguAcu-cSfF$D>}&`3>ENQ0V|o?7k;LFmiYL-jdtqskTfLjG6>3 zyNX@lyOl>i_Vgh#uQW8n*Fnc82DgJCN4{kB0qD3wd0}K3K9?nU}Sn?>qJ#V!<>3I{|+hEJ5 z#S%UCD12=Aaa;+7T~HThBeZsUfF)rJ?3CBr>D4Ts^B>igbAuU4|37|LFF>QX3Tfhk zh0ZO$q96EcUWBl_%(X0SbaNbi7iFx_hQ8))ZVeb28AMGG-7^!{9>kLK^+REe*uI60 zK)3D;M;Q`v6IHj18Dmyu3mP5@A;%StNl{5hYIU3q3J;AU;y|!!W1hq;(Boh5B>Cm6 zaP$9pho&k1tBx>*XKa2`{!M!*wAmSj4oWdSg29xY;gXo zN(d48agn~(xSq3b8$C5u=fPdyV4Y(T-(oa+k>}1R*eQ<5Z{&0hYU?r@9~4x(rF|0Q zL?H_HEy@rZ_BMd8TD0>K3U0_YHE3z&{P9x)8-gKsZEf0-vZN8O2*RsJxRAH#xBBaR z@B!Lzzp&H2Ox43$4Pq;klM|$$$ILojB*!=LVT!CDcnEV3drQs@oUNDBir|U;sdD#<05%n&33{X2@sqb?Q<%uGw!m0?=IhW^>oAS|;O?Ume z1sLArV&4J1w=e3G3hG`1!{Q>L{Xm`G%NCzftn_An+5@roPE#I)QHKLuY3+8C`a~Ld z3(Z68hQ)iu@;+(sNGmHobz*6aZCEW*?ho*MpU1^bz58+d_gMMgF|t9*I^|)5%8`fg zL;9&bJGC?=0U`CnHl8XBRe+f?Xr)Ye?44^irQ@I(Ket(F`#VH|%oNl;k{}8m#T9;? z?Y2cl1?G!Z@UsmmW#Tvt>NIxzD{scXJ!V%w2!3c56SBVorqF9rkW!wFgk3r{vrI~v zas2;_zE2)A&q*}${MOmp@lB)Xe_VW5{9z5$p=Rd>7pOlWY{y;M`=(LO)lK{GflVY~ z&Z1locS!rnz%bQ8qp)u@W1K_WGdl3FJPLu-_AswOq|uB5DVda{Ww~B?;G3A{`->_m zX@m~Xb4#wwdo@)Zxz1n6EViH1suqYiD2C6YLQe)) z_v9`6q0{r-{g|`6V{u@HZ(#m_`gI!RpzV1udCZZ)^+!n7Ikt*vrXbAb*e;VKd`6sK zkqi#*Fc8K@hZ=(kGhpz90EhBrh-%-8Vco18{6#tvuo!;y-HLCjCYye&7;*rTYXQ6; zfE+xP>;4INq-`0`MFh)&$&Tr8y9-)Dd#7*@eMHA36t}l8REn&?JgqQ>*%o# zI4S!Lp$Y10X8mE(02Cdl-W_DZQVm?Ch|`Q+4!!#O|h3WGq#Ag~Hz~nQtebw)l}2v-9Osll2^pyI*Q!A`=1Gd7Yu}#2qmx!ZkFuMfcFqc*$er z21-T1G3)LSk8;c*jOZ>d;A;ga$KOq4wQqT=HJ)ksn?1rEeAIbER5AQ6 z{L^n+UPD*QJQ{9$tC?+UPD^gnwSf$Fj|m8OA>QdpCn$uts~g651vtm}Yz+uwkNLZd zUmuRJ8}D?X{A33d3%+N3A}PGsG(dB+GF5`TY1k2<^F9tnFBpe73dC!Z94;})^kdH-+4$PZEKX8BD89uVP+ z*JwVSpvqN)nVu*mP%lF~IJo{~cEq_*dPGKxaks(T-#is7vF>E~O4p_i(5C22h@e+G zEWUiFXkU|RUgdE`+X(02Pe*2ODc`)#iN$-6`K^-4_I#4~i|u-r14eLWiqMcEU#0Ew z)+GG8;6nF|lyLP?R?F66D2)12|ISbXaj{u=0mhd~_}e|Ppl?+la1Tq)m+?KBQw!Y* zebx9sFPEKC4Kbxmk9c|&{pBYb4Xpp2$T(ARFmxP@icbn3d2TrSjG3|&otrC)VOS}$ z`c00}pO|2a#k8oP0tYNhdij!|snx%EQ>dgbt9ekWbe_=>gqSSAhpsl4MXv7$HvWf4 zRvh9PvBYAGDra`S4!bk({{YMDNv9qN>uSb?ovMP1%nFVnob~e(9lM}WBKwWJ`mn~P z=}QS^N*}ZjU=ShxV*53MRR>c@h9Hya{N0KlY|^NS;IRUgc27O({KEi z3zlu!H@atT*xuS$2_n_FCeW8VETG^8VGkH_Cse3{4HDtkp7 zH!qaQG$Ip}wwO;E-*rRgckw$iF?$sn)P$h+(Kf33W!p2)IfjG8N8*557o{e^6D7nP&Hv1Gx|kyD8#PqW<+YQi`=s|Cjxt8UBSK$I8ayr(ryQfRpeo{jz2rq z|BAV(vPB&n$TzXjSb>Y8WfSC{I00z76#jzj?lYR+C_+-$`6UyG07UWkj11o_NVNWb zgx3CGuZmneE0%^VPo}qhL^Tv}+%Nr+lvsxrB!9RUgVQaze{C1R)yQ#^`J#Nsw1pgyM zy#pp8M3W?gQPDU~D)8d9M@|R_VQ|MIm419PWEZV~QNB2G*-><@^A;tv0WR~MSDk=! z54Qs4S}E_D+D4V}-< zR*4o7l38=g9Zq4B1yJ<<6rawL%PZSdWz>htL;1Ikbg#V>{FLhHKcF>uL6|dOy%m7n zQNopPT;B!$iZ$|pw$qim4^Y7dfv`6Z5!6@WndftQfh~mSA6Bw3aN_5KMj)uV0o)0) z46dTtC&>$pX$b9ED`F$=n0G{&Cgk+2yW%<0ZIy1St3Tny7ub;;u$@N}l=>;x8iDcu zk)Ln4QSs6+dK6S^mxDf|P;nA1_U#hvLbJt9@vvvT$UMD5FdSqI&{B(MwB{r_oEk0R zoRB-OYQVv1J|c`Akaqo28DQ10c|b+gd8iFsc;$TX9IP^IuA<@p#bUhN3E7JT2-cvG zUJ^M(BbBX_d~UsgP9X&cEAm2LO`k4_`JfdSZ;!4#NO15`pEqyA?d( zMaClU2!JtCIBXT<_O6p8k5;-5w^L~kAgzOTBM4|S%+Q zr~|(=9HayyiH6A|=L4XHC3nli`czzg-k(t$K~+^I`+NnFWvDHR#OR#rg9t7dx45Xr zirKl9QLYO0!U|_W{}Lre*;K9Wla;LaSd`dz0nMv$5nTy|5+i0e!POl@{wPGws|w1G zZ4YUpC22tc2I?58YdS121kT?5`_@{=q7HQw%@r2Y8U9kkTuf@w$FV5TJwHpqQ^%fC`1N-71w>qlxE%&)|O2c2RtnTHC zWKP`<$++Z+Ch7J(alo?6#wG?U3Nmsbq6UT%^PGuU`dx@;)z17CBL2yi6*ep}(i;4ELDxHuT5_7~s<}??Rs;hUlh2erSR+$k> z0B$3|Ud}oFyH>_W8m=%`=ytJ15=|v@ZmL~r84GIR5;{GJoiMsE#U|8{$Wfz#L`IKfv{#eXO!_a2%~ z)}TtikEXJr7TzHQoB=9vAf;PNMY-hochO5Gx^3X9g7ClruUJD1!!=dV06r0hBKxAz!Sm z7~E}!(!{XbagqaHprD>7UM zzwyz;R99&d^1ii|8+@!LDlE~!j0WMa7oWV7y^^ky>8aTc96ER#cuCiQv4C~Qrf}Lq(jI@s5n*`3%^vr(U78?)0XnZig9t9!voPK5C+mv}mpTT4O(% zw$a}zbP5pXE>OfUI)G)~LS`J@l`Sv+-J%gwdN)W`g>!SlgPXilL z+iUin=_ZpYgx8Su;-wKy#}zUB1Ko|*-nx)xN@zZFt2`u`*(GhZv=f6MV_L#A%|Uw^ zv*>3jr?Y&0UG0qHp`<{8Sf~##(?MJ3MNrq~7pXz1Tb{9UYV(W`)zvmMj=mBoElP*Y zK${D7Q2hEEHamP5ca?)>Wv>nYmRkwR5wWc2M^#8+WBv*M`s$I;X6|O@&sk^jCDST@ z`hMp6IDWDE{_=sd+YA#XR zVKVZQ;UujW&SPDxqSfED9YMqZ8vzzi1@7?E5}wz` zjIradFwDP5_*?4C2c5JrognzOFb;`Is5>&ROIlGPGrf}?pdIjdC`^UYsi zALkYON_e2-{cFAKmSn<3DHT&*u$pvSHnoQg6m>kPK`ih?*e0AY1PGAtmV_QDrT2jGDhXLx*XBZ zY%v!TahTe`R=Y?QziiHVy?da)bC?E;P=6si6MIYva`h-8sSvUDES2a8R$97E_HQt6 zEqaA3U(siF?KXG?<=V&30AW=EKiEWOVSvZ+{a^wUp6q(-xIL<)m|}0P_O!W1lnmby4kvRb@-R zNjw57Ij?IzkYnFSCvFGQ-ep2hSNf_wktqlafUii5rrmmJ**3XECI4DuBO|=E1#clLk)r+fs*#Ioxo-+f zup#<>;KTmHzSpuB^_#$eGa!Q10U%jwe_Q05s%BR|$NZFgnri3za-v&(iY-;7)IRQy zh};eGw3UPAb@T16`Sk$i{(Z2r0^D4*)bk`X)RiK>qmP=tWsb+sc>=ay5+fsVpTxPP zw-04@e13GCZYmSDCx_irB2dXk7W;K#retd{KOi&E1rIDd$Z~kFkl`+ov*s;h?7i&G zPuCFG=d|lJyh*mm%IgI2E{ec>WIDu++KPYXh8HSh=zjlNtJKQ%9(u^wZZvH`rPyQQ-E-2j_k?rz zc>{*3nXVtDT~llp3xau%Rt9He`MIB)$}`Kl)^0#hzm!eQU7PqI(9j$-7(oj)5ji7|!I3yC2 z?#g!Opie)6jZ4%`6wyfimm3CC?qSo1KO&iVCpLr%e9c2-7Iik+JQB=+i*NABF@>a+E5>jY{<@Bs86_hIIs%sE z$SBD&J87zA^OzctoeVThcKnD?>{b12I1y9rDn}zcN>oHe=G7_Cg})fGTGl>R>sEc!C8JYOJORNU7FMzf%(u4Cb-EY z2wEsyq+&U8pZ#)!IGYDpJEg~mJUcuxQrQ+TO~5E7A*^&=W0kKIf+%#+s3wI~>mf_~6H`FQ~mgaW75SO|_ip^ZVf!gK*1nesAG(DaUf zl?E(TBykekXUvI4-%eIL&Bm4bc^$^te*M}nB|GQcy%dS=40#g*;g+=X9-=f5DLf*O z!`n$*{}Xcpg(<$ld;qT?L%~1|_kj~syR|?XY1h)jhWDB*UTo!)mS9!QBX*hmdrLdd zA2X-~=3Ygv-*}+`3)JtYOn6zEr$D2I^Sz#O@?qQ?+wrq=%xMGu-+YRAwmJnESP1`; zV?2Iw7X+B19GV;tUm%IBi!g)d6=$l>7Na%fs5o5nsRFXdR(SS&*YIC2bm(7d=GTwt zWaWqY&^!tRAf(4E=#4*RvZCEj%L zz=O3U>Jup9Y((UXv(awI-R7&s$jy+HUlGbm@v!eP-Ekm&nEipd$GAF~otUbz7X`;* zw3xYIeG9ONS-%2HWSr(Yu%&vPniQKz6IsDUa?bcj!nw%w5HEQ?<;hS3&JQr_?8)OF zuv2N!eA2LX_^PT)Z7X^=*dbZS$R9;Y3_aB-n$9lU+1VSYLw`i=#jszKDVn1{F#i8- zP$=Si**v}so%M3R-C}GDUu@Va7oq3^F<+Rnok?_DlZh06*6noH@eiW|_mC=y7Q4{+ zyEf@)$Wi6j&7ydLn!VW-R_fMIZ)*fD@PgogyzZEn><%Dtdwpph89rsLQ*O9V#r4lj z1-DfE6_NpWQfKZw@a-QOc{Dj^?w4zH@NqEjTmCCMCG>V&F0-uIDq#`CI+7~+*K5V; z3X&iW;X~;IKp)HYnXP^>k)zfGsbz{}sD^+838*TA+FhwN3X+QcDo>#ZB@y(^uROl#UFe#ds}8 zL@&uZ&0b}N=gBjuZ}xZ8?ly=#ZK$xS++9J1&Oj9;Df68yl`mv?O8qB_gCKq($h%`~ z;J7H#;iHlgh&Gs!bs}vs65M{PMa+8X4>GxFcatwW)b!@qR;|h;!cnAHqvVDdoJu+} zzT_wMK$%w})+Qa)_i~`8kP2oJhWOgaa@LmZz=Cbp!{4ZwhiHkUofCgs39!B&K_n2n z9W=nix`iV^qnsTAz6CuSmB4BBFg*|r3N6HCQ%3;)vS$t7iDJ-{96BKxsv323`g4dC zH%AA#izsc3BPojn2u)rCdk@+QPAEniNZE&ck!%_&V=^ddeRf{WC@47yu&yAZ*{T8d z)i00C13o=qsUV7uM!f8?PwHfwDpCbXkGWxN%B0Jh*o5?%upt%%&?SH&JbKq5wP7O# z<}3O>atZvp-xmhf!r@Kx1hAKnJd%(?%TZjP;fS}05X=~N>i^Efd&=*K|&uq;5o4_4MDyC=NN+ zVMgaYkSw$A(6*2R1qwBj>(ERHUvLue>#A({1iwViRpndWK;Ua8w&(9B-)|nP{yzx*PH?JnnhBESUl zYr&YhIbdJSLhVSp3oaFBW@?6P%Z9j*FPyOlcAO{S8Yn;iaixQyuWnWv2xWj7=E|-g z0vgMaZU!m3-43bnRgW@R-zKyMrL&-`@%xA7cj>n$-xZWlV*9RZyT1V+e}!BPvtFI# ziWsZ%YcOkq4RyXs*@0*2BepB*?3r3rT8a&szxt3jdJiw6I)h@L$^W;`J()5z*}G+= zb)QH#|E=e!=Vs)minaTS4$|GXHNWkRVzJzqk&TfeBZM8#U;C1;Cma){zwAERNZ#JX z&4G9HH#buV35JI17JkbP@HR|&>|Ukg69q7Ygs}uiOTW8K);juEE<|UhUs8+91Hwzq zX7(!xyOk6(AmLtkR7K?kx+zN1SKO2P%b;Q;Ep>5k0nK_Zz^{-~z!2Bv0yeMUmK|Mp z{49a;4y&Q@fK@5^c^8A`<-RV6;DuMu(S6D+YKj8%4sZS@co(5g#``5dC#=S}Zx<9l zcY2|pokl(Pofe>PA18$z<5q`1FKk98yqZ;%3$1*0)0j0w5lxA~dl#%;Y@3--Vd7g@ z*Q5h+8KsJWl0gP^!#VLH8(KiJ!Hrs+iWzs)1k(dtP0&D1uK`JwH2ltp{)wF~V7c!1 z_4}b8MLulZh2Rj~T?&|e!eNBUz$RkX{oM0V(Rj~lH!Fz#8rZib)p}P3ua4{_`oiI} zp?*Rog`i$L$ur?gYWxyIVu;vGeJGXsQZod2*QQe*ZSp|VB7Tth1UZE{f)d@E?)?d* zKYx)mZA)YtRD`);VWjiTqhtrIF0j&fj^ug7W$6=^xx{U}^YD}$06NtR2Y|56*%BZT z2ckLpL!0o(H}?YWf4G;bWe3IA2sJs6UnSWq8bVcGMt8KYEsErB=tsf^5syO2}N zY#5x`09t%QT~dN&k;&c|q&{g(U}TZWx*ZCzH{1{i?p}p}U^^5K((~NefxBIjw7pSc zwLMC$ZkKi?ZuOf@UdTv?UJ}B8U3iRQw{k?3ef?O$SHg70_A8IR7^iYxx;DUgeFC%C z{0(*Erl)e{msyq+gmY7N$#Tt7jDBk4J(z9rO(*s)vK|RR0_lxx{s96tYsxUA$Iz%8 z9|?^}T>jS+?ffoH6Cwj)Sx7YsNM$=D{79)Xh8PtYz_WgZ?@;?jx2^b|EJ08BUY1Q!DPX z*P$|^=3=%7>K&#eWd<{9B?0g0NSh$f8LKZ;3ib1^d@4y?ds7Zf#RTXrMy!xDGs~J`$#QMZ54mq?e!A z9G_mcfD$&Su5G$s(}uKH1c`Fi1Z6x`t!DU5+wu1dLS6~=fqhnS;1%qC5ZPXHXt`;( zG}|p+GprAS;})Ll%WmwInw=-I17*W%CqkUE?2ZqAOUI~a(@}-iM&R#HEHDR3<5m7I z75Eu91xSR6kQDOqDr}!)Eclp5D2T6bNUf$+i4CNNi#-qYX9D#%L`qmrP2*-?!*FUX zuq4!<1BHy3^KSV%pAWLiq^Y3lB#iH6-Qm#8EYC_oph?26-Kx5Bj7Kb~gmXDr5H*F^ z#QTa@dz$qU63vv>RcRNag>H%xP`3Bn_z;~|Z~Juy*sw;fjsrl?;r-dj&~l_O!*gD6 z%1(HZ?reoIq{8KI+DvI%l_a1>U2qW68PYb4@I=oo{3fm|!}AO(BzoIG*(>H=l#sK3 z_RKm+5|F-Ot7Z~90x_Yi2gM$9KUs9n**)$>M-e3p`ZgPFCVxg)!U30(C3lFz@J-J` z$-H6(>l9jId-?*|YOPl$2k*eGj(Vk%($z(X#I{occ1fbhSv2m9iBBfjx?c~wLcDwv zY=!dmyGOC@N-(aAV0dlhJ2q@Z?`YtnJkvFJp#_gBQi{_ef10xHlPINgKGyIxh<5l& zR#F{k1AbO5Q*Rv=6U=ZmxKukvPXvd~W)aIWx|Nbn{~uC-7hOgF3uB&x)n_Sr^r^gG z*foIMQ}DCgH>CLrs)Mkf`_p?ogyrQjaHGNJg=rjg?-VQfjpbWqVG?I{2ik&r99lrk zwfm_}&R2xh#@m=m>1pZh=hSpQ{Z{PjUk59$s0HfQ*=DUl^SFUTp((ZeV^?FH-UptbbV~oSA_QxwzW4>Oyo~C~A3BrfDXu z=C>)STK%PPqM%4ZJcgeU)yIzYet{8#9b%k0*d^tN$SK0SZFkmOw+p%_VX`9>Xfc1P z`$_rh?}fKEaZnW~)U?_}+a7mP`~Rlo?F>i_^-Aj^)D>Iq36uyVRKN%{B=eb0wSMkGC?6r ze}7(h2>?Bh&AUW%m-!JLFv^o=(tDZxz$woZe=^_ZJv?!8n$6=y%5yOx?eB?v zcFuxz$z(@TC$_v}*!%uh4lXT=f|sPg9lOoYdV^fQLx$PAN-(>X53C~I(Knf=Ag~KE z#ZxKtLVZq%_AmQsThpO0b*Tg0m?%uCH-9)Y2&k3AMTsvIOqU~0Nu7qJD=|TlLO&0s zs6p5~zfHD5A71#;Ec3pOW)0W`lSV=pa2)?p!j5nZAga(L18$Lhij$h$%lsr9cA}B8WUncGG~m zpQxATgn@rXi&|ezc-%A0lbd!TS?P^WvWqnAk9(akU@nNE!32N8cHioAm2sn|O5j@^ z5d-E_SzuOXIjp^m%6oNY!8+e~I6eBYc1oI+ez8n9aO3w(U$#w))L;v8Iqv)SEU9jJ zBZd=Ldy9P~W5GJnlz=V0o$(0H?9pk0l!Wq?(0T74L8VS+PW!*33$97Td*Dz+;qdsHJ8KCl2hYQulA(uKCI4&>Kw2#D0bN zl|lgu?7k!wG}-hMg+F#xFP-HEGgAU5gncTvoOv%+;mw}2oLsPRttmg414ddp;x(p# zYXFSwig^gxJR$z$$c(o5j*o-;XUtk5#{vi}LNDO1C{ESWJ72D1(aZV3?UEqI^o*ycIX*etr z%bdAy&z=1$_5zO!EEvi*LU>5KR}VaQSK$}K_lF55ABlddxO+EgwsB<(Q(~a%zFOWAi{e)_nJcII(xrj+uL7}H@u<%#ET-A zXPZrp{&pyYe3FUg;n!%sg)oECeRIXz1TZwAGgvc%1JMZOc8& zu>(W8N;s4$&A%?OYr)nf`_491D9<;8!$`X&I1iqd#*5Nx(;&U)?MfvMAFJH!%H}s% zJj7wSTWH(HY1VTsA@9w4V3hg1%I?{R8}pU#H2AePi3^8ms|ny|t1k2&&p&apJ2nsA zy~Qit?sLF>Ww5|W{e$_)0_mRPlZh*3Y8w4g-=(tj;H>(xWs($JTzahqtM*PA#O?dt z&5kObptNT8f5x@jk*vm3`G-A@A2p1KDsQpr!a?E zbbmN#;BtK*;FFfAX!BqyrBR;GPP~PBf9M!BtAR=iz^+<_i6M%yzeSQ5GhQX<{)o@i zuo18@q-JB=KB=^lV;1F?(P+RzDA<1uBZC%c1yzw+uZv+gmWZ1^pECncb|?p$x4@ zO1dUKPb2S5hG7&KlF2$$(sY;83ZRE0Jt;Ws9o^?J??NX>7Z_Iee21nu#u^X+Z(sUY zol}45LBEfi7~QtUIZ}O+JS2p5V$NdLABI}B+OpWn8n{PDG;qCRsonh+X6aCsu}Fc? z-(Jwjl*|*sFC`pnd{<3E{7H~yq_Xqy3W@m zfutAgD$Kj6S4bDeeDJlGCSkb^8IYX22G6WZ?PyrV-~Wa*|MrUxiSwsQQw3p7y9@u( zP(4Q%{Y|JZ0B((BdG3$@AdQVg(7X`pH3eif-!hyAK9z^gIdF`xhmvtPGf)WnR-~mT` z3MKL6zaZ_rgW2H=m{)ECoO$u^XHv?#fs{Gy%qwWCL!s}@Jkb`ZM3w|~znS{DGs2au zBq-#qUVqr57^zmgCWou#SDe|1y}14eB;aygVNh`tqv2sH|3wmYinOA~q9}x-0C2Tr z+ht$5{sCaD{?)SHk#`3}Fvj3T_|#v+gl`E%WhVe{3=&5n8_FTaj1AyS|(r#5% z$P>swN)pztq@o|$XYi14 z{?wqZ3@~zU<~~|UeLWaywo(9AVuP%Rvftrw=4Z07ATX7LjMD8v)Rk8^+ERr_(=bTF zK)y+|K?V(G4Jmd#XoIc$ykU)WyRi?>lT>E%A@O{jYWq^M^^(cWoQe*Q*{4PFUBKv; zUY`^Sk33Q^qnSqnRp?;RiSEnD$Lwp-(VgVy1W@5pGhXoV`Stxsq)f6q30Xw~b9Q|G zieWkSGe%0GcJSYp1Au3C*ou?3unQQPB>Q&mK?J z@~8JOrtDlQc>1UHBM{}Q$GLWV`ULyW;}ZN}pGVd_ktQzvLvZt_>tI7Gtldbxq2dE$ z$~_i@+H)68Ye{e1F+Gj+EmWr!I4@LWsE)P*T2v+^d&OEc>DK;_G}XUD*O)cEpqF;P_;T6-{=&w2h`gfT=IN^udC6IxcrhgKG5qMSTI_At+!l4G3PQ5X}$Gn z<^3tn@;p>bZjV&>7s~&*cNU=~97`UqtIRNk<%`SPLsH|s|7st*MIvUow#?xeWPtM* zFO3Z)y!D*}(L|{nDWdNB&ubl%l`MIFXR6KXo^{j#8?wW9Zv#SoUjZ;QyBsZLbt!n)h;y>v;#EC!04p7`j^5fM zA(ZVW1RioLz_SU;QQ{C&%OhmDF86P7KcZ7~L^fX<48eJO%D|3A$3ub>kEs9VjPt+R zWME!bun5LMn4U)6e4L-a(4 z=4si?2BJs>zyo2xmpH!TCRY^=a0_v?Dfs*&CdjF?T|zfaNi}e0?>z3#_eBde&V@{l z;kOoT|Mi9b$32V-CzAFBld3rX7GeGWtIpZPpbL5T@FbagA0^n;Q7hqvY>|L=Uk5k; z)pTDqH2uqt^~D+7oPE2L21cx0)RPt`9==tJ9eh;AwZwUe3q1;>){ zGg+`S=I#U}`mJ9Swca}=xEEYb%PMxq6Mm5(S!f@U(B(%BLWd^fw-(Yzn!FG(GfO>f za6xY90Tu5rMgq$r=b(QIr+~Lz!}Ue$7#6wL&wXkL*ybjH!?scS-&W#kjhEI9vg6rq z8I?LD3??gPl@{p9j|VoN5~aqKIJ(Zp$6{mJn}+}{)zwnAyi*iDGL&V0lQqa707Rq? z8){wpI1i4|OqMj_Qu36Laz%na&*GKpo=&}&m9}U4!5N_y^of`yrS6Kk`oPZsm#`Q>`80#YPK+rLI?auld}~!o^$8$sO)LPh1l=DZ%E_Eq zen>)k3wR@UC`n`i#{(ggD9ZHaiPkd!AZ@F=FVf^@P*{=eCY?GDfv$W=a7b`!3V89# zg*sHbA!oi`mmR%e$DF3`9;fr4>P!#t_VX5fUVsA_#FVGn2&>Skc--?}(?Nosi@Xi- zQl-_4tI81~%6nD#Mr!xpxlo&!Z=m`lB#VOz%UbqUcsB{U5>B|V2&^oA#4`xvUzu#> z(ynY-csp##Pf8E!Ux)XR04=%-a*lW7 zi^Is*!(s(BuU#8K8>de;HWNnUHh$)M$8T{t2n#bTnc{|Z7FsMLYt>6s_|942Kl@Xu zKWX$}EB6mmo~v@lIPQF9*x#k9-Ouaek+)JVVQKco(-hE%79O{aZgo)00-08@^ox3T zy}3RpnF5OZz+t(WOA$|meb_q`awO9&$8d=U7Y$u*2**Mci zLOR4b*bB$h;H~s?!li7j3D~b7Pf7+HX#=iE5MUB%GM?UDW)*+^qb_EBC(?CyruB*7 zvN_q#Pan#yJQeZMMm$!U@03jUxMs!LUF2vENa@ni8b;)9i?-9hN>rJGczZbE1m5Qr zc>;UDkByubTxE6yn7bao02hpVGbOz7q<7E!rnA~OH!-HpKB%`g&&{&9LCGj2DAd+_ zXfFzc1fyuxUoHJ}NDnA5J(@(r!|WJtp~fPEl@CLJpWVRxy;m~9a>c8?IgjBKZIW`y zl4A#x@AGb=@;HS3Xeq07H*j|DWs<3)?_cArAvoi&2k*aLaAn;m*u1OynY)E)&rdgSE#d zrCj~_s60*}^;qxD2;0t*OIOl5X$dv1cY?L+g5PPGLuq3 z%2)&boW``Sr1o=WXmj^2J1}n3gtN)O*eLhY6*B9Y$=gNsGk!cHat)zB7^H?kx-8U+ zi5pdR@`X!^^aXK-Bg59IY!9L!sNOgAl7PI%2#1)p9?AbJ!hjE_#mY&4<)poDU=cu^ zfQVHD&Bte_0dM0X6l#UZGGac6r_9)CbwV*^XAcaL7H;W0t&h!fDNJ%(xg z@}(icz}n?i2`1a@kKwtjLbV3AN6RTgus`!0^>K0k$F{| zsa!O!*0eS?fNQ;%`USjpnDEYu0qas-n*Z>TC&n7``1I>0?yY|vXWhUH(oU5nsG^0PDsbGJN*J?VtW`_;FZ8oL8tS)iWKLZ8x@EJ#|Lx zQbJtxr+w}c()=yFvKyPLd_!MITADs3nb$D6zFiJ|hXuTX^}MyHrdA}uvIS*^9LZOV zYkkJ%J&VNPppo&22XvOUihBX)K}=L?q11^Ai=NsvK3pjcP@93Ep`^nFbR$tY2{#c* zn|c)ckN~3Sa9<_XpmT;diL6aFHyGUn?8^f@FcMn1SdRGb2}EXg-egk-U5-%DOFKs$ z5I#Sj^bR0t%9nSpNLw+b%CVe%qHLr0gQP~I^JIM!&r1Q@D2J#;?j#!nc4y5q#v4!# z%2&N7hv-^7*^FYuZoP}y_Et#)wDpYvPI?ug-YZukM)kR&_@m@{o{KR|NJf55c|2G6 z)oS4Z#@@UpyAr=dcEG1q+0EWnj=th zL>Oi>!~i1!_F9bIqPyG*PuwN$=*I#}GyA6oF4{r78*Eq{b%oPZ&KJ%OdUUXO=aN+J zb3O#iI|Qca#W}p9y1O=$VKoi>9AiS=7I0VtS#$tjddEViriP|iG^pF4ERVb~T&u^$ zO7t)LRbF$zoaDD5F!rOJ!RQC!hVV`Zl&8KA>zLz1r`n?F!0%3?HKGTlN9;$d~Yn&_XnUP%#UboK+rH9-imNs4??8~r886cCA7 z--?`U6m6>H+0LFK`!>vzhZ{^^fzJhz-7QsZZe$_R!+I>09?>`?)%5U6t}?Y+l=2oR zy+1N9PxCn*C$EF7~K3$uu*W6}2sX3#L%W?QFqacZdp{8n!2oZKUm0A?X-X z<))L3FLuPjQR=>LeId$wrmB0jxYzTt5G?g@p0OVmSQ^x4gIhhj?en+2f0~M| zpOYXYQ|@hN4PnG%pc~+T$3THBV1=OwvAc7U4W6$D0RhlC)7xY*WFul^S>`Wq( zxt1W4j$9GV1B3_}l~_dGzG$VOF1$Y(zTR9`qTTa1gsK>F3wNVc00r2|fiy;@mr@~5 zGA91dyv&xRVNGa1+`?S_R; zs-zYvWi68ntG;1}eH<;uOs9p^NTF&wymMZ+(oJl@Hf9`YSW7uX#r$o@BDfytxzxFM zWAzaFvjfx+CO(Z868m-d&yWk{G7YSRDIU`h&vbHhVRv>NM3{7e+UY!!9e?|Rmb6r5 zRENuz1am4~(BcW!n(uZoY{%S8>&>Lx|I0rA&IBGL&?%J%MVu48V>g=Zyyr5UzSL4= zGcemt4_Dir#nO9FzFn`_2TAdaTz5$B@AnRZd;*fgfqNMY)1%{4dvV;)edELD>Ei(xsEVP9!%LBF=0npr!u!B999Q!zrGJvLva{-Z84sB6Jbqs0Cu&ae3yAuT^gD+mMy6c6Q*GMOD?mfAwV z&;9JJH#8N{mAqL7!YtxW{vpw_^eofV;tA5u%Z?`l*Ky*gF9hdkknLKMja16h=P+tu zubCUQ>Cu8K3ZHrl-$lVREq zb*-gAZH+E44-uzGn_S>n9#P4)%J)xe&8-LQVOE?5R@T;sIZ5ukZ%H&ATP+Xfz(>9H zTV_~L!W@(+NVBn78lYOjhDt%r2e=#HyCr9XObY^u{%;i$qsLX#zW~6_=#umq{_IES zb(DddvNb$o&&9gKaIVQTys`>2G`a3Z@4TEUUayw6(_? z8BigGVxG6ji)A;~N{ys*K)0*x%8P_R-dN-jdcI3i0#KY=e>={qKp=!^ZRgG!6>^-j zj1D%ZJpvYx(~;XWnNaiJ%Qbc}4fuHX+=NA*Y^P2aXy8=A^ThM&x~7F5ZGJ6L2wT4& zJmC6;w{D~6c%1n;*x*gu_GY4T%Zx*vKmp2PeJhd|jiu`|l+}Jq-+LX)&^7yhCr!47 z##4e;t3w4eNvKCNhvB-^!q5hNrpyk8vbG2#7OKEAWseINsc2WI z&pDkp4tyh%XgqJIY|oJylA7@)SWBlytDO<5pX)8 zAugMqi9HRTJWq`!J(*EH;l)nn@4|&eg+j};0d&BdxPD}5&`$X(2&}l`>J^hswS(H{%AJ`&>n%@ zo4n%pkr8QoCYW|3l1n9vyZ%I;Mhy>h-Bc84vAOip>lidkPwsC|n^ULxe|{PvA_=+txV27jtKbIG4rK*(9&?e_icL*e zyN?%ARG9#MsUU^r$dE#%!dxLc2|cR%XEQUHcDBZlIYZ_V&x(bht@6nO=5*ptd0nxM zkmd7sz(h@zGja7+*3fsw-=Ct+LeT<}8}oW&ByNl}W$mDQ%rOrx&wdt~E^*}V3Ua{_+N4KHa(~GxVU!6^ zLIK!=q=YoW6kweMyuM0h9ZUAV27n8vhG7)#rw`z`@lhV-`WV!B6^D&7+5o!TQ;<35 zo0~N-u|4-qlVrO+P;+f*irjf&ujUN+Vj!k+j7CA4d^xCvNTfv12B2H{Bp^Ix^J2bi zYZTe5^-H|iXc>QbIC4GM4-J9{#(MUfbhVx1Ve73~bLoXABHVY-g29=1HA#%pcHHfZRsn z;IgN!!WF1~VO?zcih$m%!5x@#igwtAus^$n$vyL%=D#QS)>ly(H2%EMnOe0y(jB4L z4NJ6i{xz+3`CPi|yxZDOq;=`uoWA`<;Vhw;gt7j4_|41P>dz4XONQk!E z&$4sWsc8upFjj=w;T5&DU{)LeFxLJaFqEb~YEw57mI=wU+z5%JVi2{Nwf}-obM5-` z1$Tf;Vb16B5_Vs37vkY!&~EJMT+)Vda2gFL^`U_GS%YsGen31N4X9N{NZ_=TZB!YL zkT7*>>61d3@riL68O2TSK3DA#vJ;n`ebv+3Dg+E>uH%XEH&Wf|ZJ>|ff-kswbTSH? zQv`DT9%1mgCFx(BZM4SXrWDK-(CRVF)JIN-?lL6xrha_qI263G^z3xhYCQBX1}w&S z4BJ@oW($p@dnZq;UZ?57j{T8tNPFeE`Jjxy%ZJiOa)1-(WK4ByJr?JUZ4LQY+-eU1 zzEnrLA&Fpp*iB-JkVao;H#stSadSXf@+nI-b=XHOI?M+~q~Z+N%&uNytD2k&2S9vh zPMNMwwLd?$6BlfdPvk6Cj`HAAH@aF)H$s@N2Ce+0+}LQsM%~$6349CkUOPQnw8D4a z>-^xzy*^tj(Vy>3_vzCL#71SAaC-#<4k9jBR)7_0E79H3Nb;S~`&18Qn=zj7Ym^;) z7(o`iv{*8qtilIIf8POy0Vd&R?XVGnc0>ezmEA@uV>*D$^ne%FMU3 zl*mnW%T(U>Ny!2L_6x8a;EqD(QpQr;*d;TY>%VpL?}8d>>(YL zY|REB_#cs2ra!R@85U%oY5pSxJV0cG4L~3^ZPxg zyRjD$#%2vem%r z>a1Z5e8!f{7+l`;!(?Jx2^xL<;5XjGF_i|(78f;h-mQhDWq@S8GGwMLJG??zWo3YJ zJyy8C*R(k1U1bsWv!fu4R9q$u?rao-X_xfwPhNYAkJ<>FkZ65F_z>(N#wlQ4M9+R8 zGlNQni?LT75^=tb-$S5e#?^&*UCz*tj*LsH=cOnUA_YeBU&(J^eHV4~7CPY4ePuL4 zbaSCbVXhS9pINDt;gDQ*D?K zz>Ff#t=#Ph?LcQtf)`2984#nEBY}2|SR4WuU2)_2U{E@og1w^O)ZSeo7T7cJTUz>i zJ&dKO4EJ5mVV2t1+?Iml_fv?Tp9SI>fAB9G*9ixc_eI1d<91@UB}Y$turb2pI~(6Z z+ZX+H%1=$@VX}4mqvaih7m0iv_=pIz@{8kb$-aWALJiO1iQx}Rp0#?sIT zbg1TOG_M$iV+&wu)l@pp(67o>m3h@tcvQr*31&;wo6`ql1Y%rljb^%VT2UnS$|(+Y2N zDpN3g&_$}(vtUl7ojz+pUpavClzB{Hw+GeiLEW0?JNEg=geHP3$tmT{G-cAbdvsFG z`bJ((Sx;L3#bR+gUr|M5JQHH2Y&J|^t#mG*hk8CA*v0HNzgNKg3 zVD-{}BC0&!;kTSdC)wy`X)cpcU1Fyld{STNr|2k!nGV23TE^QS9*{j+&$7OjJ-yA4 zg;!Yper=P+XtVrzhLcI#5mT#%OE`%oW*qLQ^UM!79AMaE<(3G4_Hpx1vZe9$At z(e7f`i*m#_6Bq9HTHuH*0Wp9L#)LJsNzGaKE(;(+=Fg?}Sn2@n67TS2t^NWAdy;$I z>cxV^+HcKXE~emsL}2I}Nv#Ah$oK7wljSc7HTqGLl;quIIKY#fp;v4Q+Db@Ul;{LLG9aa3^ zDMI_$LWcS>*G?PR*SQS6V9K_98JQZ(qfrd&F*+hxZe0EG?!)bj1w2?>vlDcW&JOaJ zIl)?F{ZZh1!Rl2UIh&NS;wjZg;9F1*dQ+6DL9^1?Ua9wH&iq@0lZ~yrK0Q`|{3hiI ziWonh%NBejirh-Tt^%pq8Pi7XNDLOLa9T5`9w>}4STv!H<)GT1{{pQLtIGFb97S;* zHL1Q>92R{_vqeE#U?2qZ7kHkdv^~_6>6i+N>S|jvQVw^BD5aw6YwE}ZmZ*&eMm~nj zxqNe6bItP=iC>91!Li(>JQWy<+1G_bsvv0gi&s|tISsiZJn9Z)L>5$3Fq%$MQ&k#` zbECu`c|N0;Tl$c6K@PPVci_jjU@hD;^Mr!D0D2};h-#+|AMwl(Q&j-p3S`N^5jI(V>7=xQ8(G$~^+PjV z7F^Llqsic>igDd2&_>9maEvlw1mgYm`znG4iR=|J)I1k@vMyI(HBYc{x8J=}b-+M(?&$A_wQxPzCGlRaq=4Q?yxD)>#`3T92}=++);;q{eCBe!$+9VS zSG+a}hi3*2DIOUpYv%PVeVy|p#$Q=*7@~VaP47Rh6`owhiu>)J_p)@HGG@7>kZY^| zH}T$zVpQ%rCD8+{v1I)m+Bd`du9plar5=+ORk{G>pdXld^EY%ZGD-pY4{a<$;ZM{E z$36&5@UW3)k3{w<#CVW`|4`MQ14D6RRp_bO$dl$&q)38?q_bmFVKYSFD&1u#+4jhL zSYAN>{n=BGl*#T&*mF7V$f`G+mZFo$%9U7&bHHI*I$j`CJMip9gHbl~bLO!~n2vDO zGvf1*9mY!&_>ZapkLzc)I2JWs?G&V5F#2~Q;x2ki_S{4RmAX^Fs!^_dd4lrXKWDRn zELC`mem^79fj1mz;5sol_m>LAyvo7bppM|sI&@Ovq04(EuSB8NBz0Yk_Zf$mq-R}- z&w|UBsNC&k4kbRK%NYIq>}5#~i6Gm#tJdp3LP1t(0{(q8VKESK=BJ@B5c(*X zGxhtWH8rF!rsup!y(dD&vrRv{Axe20_4~ePWf*qVH$DO$(_)Qx4*|p}Wl|YPyVNoMcQEOge3RJK9Qe1(xW$5j}og zT23QmVu|EeU)pcV4Qz)&S{rZ{muvL(X9fT?EihhAf+-m@MYE_ zobEl+r6n}Eo)1k_(Bc0U=QJy{<-mHmQ$ zslZ zG~i_^s^5#!59Dn14QUf@sDD%Vg22RIoUaOiM zcc^1N5j3=4kXJ*73=KniTL26Z2FG~28T04W!a^sgSF=?oPN5{Fr|4Y5J)oZRYMTN` z3rnF^JszC8YXi`Z)>t~#rqHoHDnOZP;C^q^Dy)$k`c#8fr9p`e{6ndJg5eNBQE$91 zpzakI7R(Wfb_S0g$$}pn68PZGHP)uClmke^#jJXHl*WwXDbL>(sUv6%g8reg6Y<NHYh;N=BtCt#KKx4pW@W;D(%v=@O!j9Y7=$g7YwKsoDqMV9JL7) z1>oy6B4hL#{Y!73GlU`VHUWYD^yX@MO)Q5HuC0z*x;VWA6-b>jreNtRV{(|ADG<0NzIK4&Hj{on-D~WzL zh#F%Fd_;UWWjIfru8?|?)lUTf5l}&_o=OOBTD<$3uCSBVff$gGFE*kApKgSKHQ9y3 ztGTP9gu+%v$o_MdNMJ`*3GATO_c~u}tr$sTsi(nKA`>#~{yDk*{Y_lTP zAGi*qni`Zsei;~20|sq%CR*41WxrLPu-239F1`s(_~JR43b66Du_~4|inf+ut{(bj zXJjW1VO1CCtn9pu1}uHlScU=xaC;gxJjON`51%3I${jKrfDWP|Z#_7_*<1f8M#TeE z{f@BN{khwPsiP#r4baC>oh2!1JVl?cOQw^uU= zY&HDm8(cXp)d~r97&|c zaAOVXGCyG7o#^gxjEmBr(ZJ979*c68m)={xb=>4=_!8tRYsz>v=QIq<(W=F7L%yYC<$(M8XfPSV zpwxO|#VC8NDZ2jv(>LL?6bor-GPoX3!wFY9a)q)|gI>go;v-pqGA*y``pzw_|kdT;eZ+vIYW-)&JF# znJ^$2KSi$NxeCJSXpzk>rdPO)<1YZ=5<;;}LB?gupxxb`Ut#oCN(t@9>ZZzwdxN6l zw%_=R*#zMgQNE@z}0}~W$enkU6H0!Bv#i^O10QUOm5^h(5K^1vp z!IG~zm%EEA#G7`)?8M;}*g81J_+i6H)~!iogCfMF(j2vGWZ{zM#DO$UfCwzMB@g7kH#Tblr?fF%%W$ z!U9GL1O&ne(6G&N0?lquarFBfW_GNH+bbqBO%t~G!a%HV^jU)l!>XLaA3Sn%ApzB2 z?=s*f0H_$glh$M5R|?Ue_q?`vt~t@7y%LO^l=!j9y*i^ z%c~Dh9JW3n<3G?96qg=cH2W$T@&`HV^t6cd1rjS?F8er`c=xVQ^;oBlld~RFxot2O zCsvcmD*4&mN&wQXh7J>)8@Sft0^M7iS7FxebX)2mY*=68x;JP<1gR(%Ahv2mnMn94 z*G0HLbf*{5+^3yBDX=8Ol#?(G9FtWmMAOk~y{=p`_x2KnfGW7e;BlylQapaIwB1px zP+7o>9RSVTffp&Us`u}nCiPT+b~ZV(Na(&XRsbw%9oWWBP~wjBYaf~webF8aS(M)Q0Rx#wro zObLBAM~i%Cr^GDL<(CFpKW4^_81lcTnapmM(ke zOKy6S$!_GgMrcDLFS*e6x2^I!C6jm!@KITX@VA2@7n)p5f{Zgfmf5a^CM)38BZ8{F z0C8b6=x*BIHpaxixoD|aW>$r_S-@*&`YL?u$@WTlgDAMvJ=`8Rq37sV zJf0DvY2BJc^9hcn0mSq_$v3c^X*)$ZC1*h;@C6-LzxD9FW2hWsJ1dNZ*D&Wj_jPCi z#~hG}tReprq{ux3ym!GxBL|%0yQn#52%}8=aF$6OH8Ngh2~Vul!9G((J8Q${OH4|O zJKmlW;m?C9jW+X#&}XU`f|}(Jj#;!?XCd=V=zc(jR^!m6SVSMEt)5E-`3uJ1Oq-hs zD7ogb9cJjg>cIjtE+h`M1)kjZ2(7e^u6xfNxt9C4F%3)|D~0r&5o(=+;z7^W$x7yo zV7_RK2vtmf$*$Dz@o?E1W;ZdUv3NFc5k#}Jg{qS3t=%KbXi*sK9s$fNXa)lZ4R9`& zdq4X%nnXae+;75wE4p2HO%)*sC#aVoY#XW`Yw+hu$dc-jK5gFo|UZJqEJasx&Z6OPo?H#R&M zj`?24$MyRf?J$N#8-dbio!zlL*g00fESpSLa~xQ0V`PydY=8ypU`LPiou-6xLIivR z?&B$8h9B4f&#)&%CX93y4CrZ9p*VEWd_Yk8adhM3M(ck=eo5d3Wx7KefxlP#z^-3r z;yB^jZFcv4ofZCTgnU4tYYv&UA%V!2T%(mJLZaCC!@jzB%NCW6n@@1^iE+*T-LlC|B=gb% zq=N2SF}bCrwY|2s9u_)dgEC`VYqANSpTb&{eJU$0TN=iv>V!+|-;y(^2p8!ZW@pp# z#Sf&#(mJ#(9YEDp5y;33*B@ViA=Wo-`O7+w9q}&t9Sh2$E82NwqB*}-U=Lz$47!J{ zE0ezaRL9Qp{?81zvIfSve3ohDvcfSd{e0thM3-!Ux!Y2&giRjkQTCS3(;&Uk zUMUMGCR>d|%nA_zPYO~eXY=}XmVlj_4~JQCus;`+JmW`Nz2vR4ol!0&?F1 zefEnr0yowF!Rq06Bx?MS_d5A4N%R}*?f1n zi=4B^D`~5aQ{mK|1JMo&j(&e8P_)isM+=-2Z{b?_N{sETdY zwCV)Z*6aS=hW#tllz>yoILev2j~lEf-dgD2-~3+3@H+_Rd}Say6}#&&#NQoLKAKGT z^ZS72&gaz4(hG#@&xV%b7pv73H~!%cN~hbtkxI(aZ}pl|MQPN88a=H&qhUr6n`YTm z7PMRj85dol8zyl6aTH!0dfz2|F^+bT*7K{B!sMk#gOi=5>#8%e+ARm$zLz!9mJ#)s zQnpx}(aGkFo?b7_tzyozuYr>9C)=(w*p@@H=)+M}h8rQR5iL!jtkz6?DiPzb4ULk{ zkxF^}WrBj(vYOs$s9>>>49h1;Kf?MX7UV~}!RyKM1!Mq=csdW;6|ulw)D4jJC6f|5 zdSj$hgI*@twZ^KpNdx!Y*aEj(S+k-_qOJC>+UygRM>jyLqVZIgQ&3^aOND4@^|Ml` z^Ua>kn}fe zpI4#{{G2Jv$wO;)^VsV4A=*VI&be}6AZrqR7!F&Z+gXcdbC6#E!4!?I+(&}=O;n)O zP0}YZ4g4mgHDq{e^c+(*Idndraym1JzE52xdU}Ruu0I-o90+=3J7U@t&7q!(!&C$~ zF2R>1&bpME;mn0W8d~rVE%?rylNquOEN(A+&H?3*B;$62Kh)wzGLf}oh&{^1fm)C)3V${3R8~(DLnCthl-BTdQl%7XN=_!y@-AiP$EC2dkKy=CCBYZ$ zK%0*_JbstwQ&{`I`+| zWi?O9ZSin&%Dm;U*AJ11o&Yi2RHQ(2Ac{H4zWN*`&28J3YI|OhxguU-Dbj9Ovii>( zEnxpN0V~B=99UjEygU6Y>K!9C8~mIYG-%Ukb)^Dmw6vG%2U^8)CH*lXgYtT+rdZ=z&0d)W>)Q`)5pm~h%I{{Hm4G8B-nLU9B<~J*l{tqZU$xsXoPA>0%&I;jM3DiT z(5w^pWbh05M|EV}FYi55gHk7M>}=BcrEe}`|MV2KMy!}V1ZRu+mGi;=i#YlgC7FGu z`XWOWom6t@)}ghlg?lVs7Q~a-iYxcFZTQzr99%_*eVBK@RT8ul>oqPjvu48y5@R_G z!xaX1`@$X)y#z@H@`5CA(7moo1=sB|%U!Dt5|(H*)4SS~_ag6NHcrfq!p!p-oLHoL z$krWyTwm~Lp4NL`gS^%?B4O{gyR<$=3(Qi$-7e+X&h6Sz8RlS!Pti=*lLUFI>x;jb zf25?g%WW12xHn?L4&?oZ;8CY=5{BV$If+Uo>^F#CsMy4)Q&==iX|DQSG603=;eHQZ)W3EHpj+Wi3nR$u-) zOUmRDqCK{*jSY8(!n{50S<1~G^AO%}zBv9+?BS2(bK}K0Z5=Zk z|2sJG-V=xrj=5XacRXPRE7bq|6~#VVTewS43RY+y<7C8i`C;QE;sIE6Gi2~~_BxyK5%m2dG8A1p568KgTosLMqKJ=|7-{G)tk|M5x zLvm%FVDD=l_LPeKzjd^sqBW!XuZwn9K^ zxVE)9cN_Qo3Rm`?sMc-XFX002z>sicsnNFKZOVGNiI)6vxHN)TPSoHyZK~#WezG-2 zSF0%Ejw;o+Fq$2%1>6P!*YwRXnC}WaJl&s&he31gstoEFTzM0h{(`3BwMGQb z5QA0XaAQs!ST(gm3gXf!5E$$vTF>DN0Ox9d1{Hes`Gni4iL%c|*Jp*6Sk(N@gj}g; zpB%pr#O*JpQ6?xs+X!YM;T2Y3CYL^$e@_Y8dDad_#NV`h(0f)m-vPiL?2h~yc`7)g(lGIiZ7Sb&Bqu8dSZra#twuQNl*w9 z_-M?HQJq-_WRXJPaOcl;hV+hZXeXtHQnD6iU30h36kd(_)6E>iWd7V|(VY{-{`4dS zkjIm0bakz7B1id!(*Ywl9N2B1g_x_NS~VG zJj+6TIpUcIYIsIZjEpm1xU7yXV%V_xki?hgxKtexCiw1_sWNM(-#HeVylVCKWjQ00 zhGz0L0_5;o93HNcDE zpAPgR6YpYA5M~rcc9-^Y6UK}fd*zcXujnoh$!gq5yN_sYt{jfs;qUwqz_YAx;1NazW z7Nhz+E=|wxaaUm4nT5w4khUgD`xlG4d>(%20&WNk2tx~-<8|x^b2Y%ok=_BaBgc8` zkbgUw7All&q2&PaD)4(;MOC1}RF;NjjfSrbMGBd$i|Wrhaay$UfF&@qPLd_J4re+N zLjNJX62HLc1;e||&OQV(cRerTnFJ&FOlzU^U(JS4T30>>%q24VYi6{nI+ zyMFoLduq`bj>wR5p~Ucm^Kbd16w7aGI(m?lBh9hI_jG2&xhI{;fqpJ2K)>Er6sZpo zhs?EDdx6kIYU@3UvL?d`hteNAMNK#%YonMK5w99sUKehRbf9KoG59tpSN&?Xhd3YY3urjHsR1jQ!4UKxEf%Kq_6&EDbplvZ*D-e!}ogiSphukWG!IM zUQYbnL=j1p`f6YxE!-V@hU~_d{qiDX<;wzE=%}Z8E?mJRmUF6k$A+$iE!zPqfd)NJ<1P!D5bS@SaYC4vY7=A0dZ55qdo);vcDJB0N?hju*zD8}+jGYwEDYdL4 zo9>G654r#?X8u@vQgMBFT^f3Bb%!@_UL6!#cbq%|zNjDdU9qFO|W(EuL z4i_Qs+Ft~Pj^`fC{}8r55}Y^=7i%eKZ;q9O4dM^Ym4dJu_q2IdB$HeqfhfJ*z^B3{ zGxHL~q^J!^o4auC8l><}S#&xdZ&r0GqKH;rLWZXE!NMOj@$C&#x`>si%d=+T*@HzM z!`G{bT3`dLmfGdxs2&Npl?wV97RO==qm$JaT2nY2tUPa;s3L8A$=9)YCoXnusKv-W z`BGwOQN#uP?1@l)V>ES#48sZ^Fc{Nsq4>Gp^V4CWMp@eLy-=b0-Y69@9Kxx@e zfDZ1Ovv^Km36dIgbWl|f>zf`W)upWlGr8cQfrzC+SDKDKzo`&1QhaL97R z{%jr=!PIMBU{zt{%1y4Fxx` zgFj=Z26Nzg9oRx#>L?Yb0*B&L;n&SjY1#L8Mp=nx>hY$+cZ9fawjze`ey3V@^`?i$ zai@D3q`|X%cLn>FlT-A~xL<`q79oZ9i>heC-?Om?Om#+yfj<7Ma}5FF2?fqx!(M2v=rp2Sv3x{LcJR&13v$g;kj z0t64 z;!;9|wA(i&BZt`6od9F}_yZLOs+j$CUKu`*&a6={p!}m)n~Nf`x|WhYuqXGzR4pSw z(T?^aW!I#Nc7N0)w8za(Vg+WfnNIcQ9TK9=tbk>~HyP4VRIMIlgSTrLIf=u7;OpQBk^HCH=u@n@6?P{HwD~Jw`cL2`dP;91zKC0 zfDZOk8)w2}H3vBb1G>hV12K`T`iUeaQ8IgmrbMfF5PrE1QN5LUF809RVkC;U?R^Kd z4_{S9<0m$PLjhq<4wkWw?)8MP5l@(+jCEb+g5^U(^cx^K&I))8Z<~BwadA0Ev8B^+ zZ_k!a<(nbl=Yh=w_sa#=qgRS@XBKJZ?yJo_t;0EWM+J`qCF$cNVdq7oz#{?Dm@gGC z7b@yL-699AHc{C$ZAPo!{OItlK_xj0oQny+ud!=D)*w`Y2qdet1KctKFQ7(UlTh6^ z6r=!}X>yKbSs_x+F5GHMi3FQx*g`izu9Dy&taxEBI^ zffV*;jm8j-Zwlx#F9piSvH?vso0A35Ck@;os49XGc7Qp~Wex*+S^jYq82@V{izbYSS|F*?d;Qh4-{`8iX44f>tr;K}||{tD9v>im$n zr=O#Gwew~tsJ?2IE@6`oF3e0}4JxrHD^0n1X{%%U>Q_Tv^Nh*_Y=cCdG}{rE8*B~REoyz zR&AgLTO~1j=Gs-#wg=Tu{UWXV<*#^+>fHG5sC_?xKl60RkuJgcd3g3rN-@v#Mh0sCMu}3*0#3Y{{Delff-qEq|T34i*--tnjg=-#<)vZP5d00FD@)DoW={C=5tON zNbT-vfcy}`RF79&5GR6|Ly&WaeS@whP?l&{(1ivW#bktvk{q@@aa!y`!6dau_MV#3 zOla-%h{v6&U;!Y7bnqY}5b|3d5ITjvB0@Ij-XCd z$$BkDr>$yn`DOfB3p=;z{j}@+vn)%u56b(;b;bX;pCl{BP?elE!BW!p(=B?ufDu5l z=DMjfp7-Wc)Q1#Bq7TxJzQ1G zefREq>i5-XVQRHvo1qGAY7~+h{6r$`q+UAjhOlu0ZY66=uaAQ5TY#9AhN%0e>R%)~3n-Nou z^vH^OM*}OwutoKZYi-~$cX)iZZ3I_byVuJ-9@-NPma#~N$eu8+R6^1jYEvga+R)-| zL?kXVl_0_sML&(%h4HU+FJbA;OTsiz!7~1xQZCS#D3cMcBbjpVHGg-Q0|iu#H+$FJ zg$~>@l3>Vup>uY5S=@9QUm4*yvb(*JEJ)je7@V_JRGy!iR-Y=uz@8 zB)J^T>N1K)GFYG}a(n`!rKpKp3I)r=1KaqFSUS9_y#P1zvl#gHY)CB~LNXy&7s{Uw z=;|1G*l60q@}iTTy8;MhGM-{~bAIlXjG2b5+y#O$c9>u;{6LSP*fq${k=WQE0_pta zd^YbcUFPU>9^#TXkB7p70T3$%Ye(mr+~kJR9^PE3K1nybaB0TkbK>B0F)r$8&(#mz-eXn@6vKxz70-}b z_4zmR%u?80pbx7p%nVl+DkQb^NtDDPWGAN(lmX;LC69nJUV*UgWC%G3Fe5;N(OU&1dKdb916 zYYnZKCO@Fg0Uvsm6MZ+C`0W7>Zz$@@8mgF6Z)X7qw&XlgxJtN`mV?1ny59Y^3(uoa zzgj^~;NmVpMt67wlAKnmXIX|3<{CZpjpc$Fk%$AlIaSA^+uZL$+e(hE0b)u*7eg^| z1;6PyJ`_d;)-$Iy(A{x-m`_}o)iaKc-FL}fvDM%A{v}FDv)hv8VpCbx9M)Fl`{jh- z?0fncGw=y&O_*2J0(O}Wf{%Gtw=!#LGHgzyl%WOPEdm{zJIhvlPSsI13J)qx2!S{J z;WS?{&*`Hkl3H4Ls#lv;lx>u?MTs)OARztiZ>S>x@1+-J>bf}b>H zB?#Uq!2kB`Y9w8Rd53-)C~m8xyU-IcMv_Ch=U0MMqy+|<-1*1X|5Lx5=-S3l2faU$ z(Ng~|?DU9x*?FepW~@3&r=c_9RoSyJCn}84ttdWk5S~MUy;ReT1{mqb2ug|q!3uB; zY`sqTufe@v%&#hmz1y;86`igo$sAb_`U~O?I0sT(n87FWwck02_}B zV7Tg`6OJ0fH)KDW)Lw2;`xu7#yNleuE+$*wmquA*{oSq=U=kYzZ0!e+HJrMn9S696 zy6~)HE;Z&=X7i8>E~ig1mea4(X%gs-jVbu)k+!DAs7XPB;kiMjGLIi6p!O?yJKNXdW}xvPnn4zgEX zaInPfix8pRrMmG84nK}ZS#DC};^Y<&BAnQQN^(b~fTsyGF~5aUg%SmWu{SEkLB?zpAwOXD-5#HzbTICB_&c=F?BAvo?c}Mt_mP=>ucV<6C+2EH(HKhU<<|K#) zWq3zkp2j-W4!<-I83bmIgAwW!=^Q^BU~88rvFR123UQP%hT!tybP;hqBW3_gbW#IlO(p|K|MEIUT1hDBn!j>K%6kX?o~{RP8bu; z#HPzSj5<@v*=YML4q`C!vj*n5NDZS(+BGV?XYw4a>>=-Fy zBp)8LOdETHk@5(qyrQAeFX(G|HeU?wJf&K3!#q{{VP07WewjpR8wp~2L0jWzuI%ii z!U;3B3Gzx=O*W0$S9%q_O?3>;5n-Pi$9mg}$l2#8X?@4YgMn!c@%^k$f<{8yzYC;` zad>;SDZwUh?rGBH(H47FZ_(#t&nw-}>2Hzc|dM0(N+ zzZ)2r@s4NEzaJoc%qF1iyCYNK(QhmVP}Ac8Sv*m= z_iVDCF@!-fdMiI^*>zX7{*O5>L_TwW-yo;{96Norq9Edqg00&f=`}C=aXQ!?w5K;r zyd=^p<#c_7qre%L9@6jzpc_Uy2C~wL16U_grVmqgX($Qg*l#agbd|zu?~KvOnbt}=xr1|2D*r-a$rf-rnrYM|ZHUNm0c>=m(FLzkaWOD94Yd?v3qR5gOtGyZ zNx>Y(^KtbrY0Af!I}cVKi+b>FFSqJvI#`Y#3x>5@(IzMEP`7vW=Id?S)S%yIA! z2jr+{t4P_k7{CB|#0xMY5gr-c;-Ik8Q3`_J!XRHbLQ7SC3VF!(8XiE?za~&XJ##5V zI#)9&NA&zXXq9Vrb3|4Ge=f9!+@W#hNGzAb1$=RQvx2`PB0R4$itlG0V;{e!(*wx$ z{G@H_E50J@K?rk?sF=9_j2YTu>l}8?joF}dIuSaOhK*!AZ$%cW#3B2f?$$tTI)NAv z7KqB;0TtElsn$)1EF#9w=a$d=x!(@XY$SL2X4pZXKj*XUHMAK*{B|sqAuWAgsn0}t z>(8@;W?=}Z^nYY;CqohQ)AxFQi`Mp}N=#;5%Eg%{K{|9e^!XopP91x4OwKq}|(r9d=gNRQJe8C?Q(SPH1X&I5bQ1cnd;SSZI$6o*gt zOzTd&3ZcMcE@`mXVnUMs%q`z(e>EI=-WDhk#y1SuVCLR>@GR$;B$CsjEav1K2LKsU zjNY4=j~oznHJB20UhvWnFG0v0BeZ&My{Q8{Rh>>zcqrhhLDCPp{MtHd0z?8hyQ7~A z!hm*w2!5yKUw+(&jWNYYaevj$i3EcZuSBSNd2Bp`r2|TsA{+a>8}~v~7%T+dDsGWw z9W4vNo2$RG8F7J31MgAgoFGwgo7y*kUc=m3?pC&*+%n`gKEvsR@~%8chkla!F8Q8* zlb3>SQ_U3>J2r!am@Wm%vIYqhF|6I=NTxc7Regs&?l-(f+Eqod_q#tqy+@`JLI+(Q z+d`z+dALF!X{c6M2>lY$8NH6FSxd3-Ixx!`lK#pvo%{GLF|ygaTIR35Xxi5?a(%0r>YB;2uI zP4qzWxaSJ)xg!yiAtab6&&%5;Q4J1GDSywg^iTdQ9jnPc?p3;4(8hmdDvCbaRatdu z`9ONwdl7Tu0N)p-3$z?-5!SM;4fHWQ3KvB zx{(&bLY2mAD0Oxaw?#YLh}Zw4^>l8Uo{ANhO=oZ`tK1aNu;uxcrA2m${McI_mj3Ga`XR9XSsk0Yd)gAVuKd9OVuJ}tG$yTJ{&$Xvy z$t}g>3_jS5^GQYkO)VvUBlBuC!8N;fU4m8qSI43ZM6ZZ_@uHRiJg=9?DoPX1xW4r3OV7TkD zfA`O_V&CNr8E#LbqKkpD72}@!7F*pIsNORf73zPi_=__YcbfitJRc%4o5yrbtX}9016c8dj)C0NlekiuC&2Tm@v;osAqpy@%AKuN#RNoeIA)M9q?a0F)B-y9KA}Z7{`IFsWobIRDkM() z96eRO&Ch;zgaKe_4Up@Kis5@!P-`dk||t$LoR`N9!>NG zCvJSRlO=J1!csMgx8nxv0ZpmNQp1#q_nTesYk;e?gAk;L^mg3l$9q20OoyuzR)~t_ znItKy=-TZtQu@klJ+JVo*Rsm)L2gZWv<&4&;nCv``eT(9Svdp3Ct_f%>CZ==wQq+!5`YOd$6!y_?_9*5~%c^!8>%GC$hL)l{ zb$78{b(tX|OuYROlr&VA-{rJaxz1LmwhVn#3P4C zJPk&@xY?rc>IChjY9)^$(Po%fHLvjr9>gqLPc4Xki!1M)(_Cxa!B)}pf#0f8UdJz` z$i*~CeSrhqRArA7AMlDthQ|;b$W>t^1J}oxX&}qrTbFGmP3O!=0;lLrJxL_t-Hx-w z+BhQtIB`^d6n=J5qpp;Zg_W~4GAM5}=Zr%4Jkb`ux`mFZn3Rc_GJ{GKMWUp_5k-TZ z9Z4@~)*mVI+#8)^#2$CgIht022%W!OKe_nOQNjdLSJaY@UUQ!CO97+lJT$a0 z```ucPxPos>3r1eUQ%+rT`r;kTJNa|mRGQu;j}lOxwnuV&}2|Cgj&N<^x^VN48u+C z0pTM8+jorD$zvw@${2bi>3v!`7Lp~9pmO|7y}dRJm7QaX6@SgHHm&j2H2Mu6@om8S zutfo7nX-))8yk1LU+926w{I{X>>>;hoEDY{Nh^v-d1D}>10xiTe#WO?vD@&N!2cq& z9;e|GS|dvEw$}TXvb4+?BsKW8nJEB(ESejew7z%E)BfmY$SvG6P}LyC>>cX3${q6VGVyBNrhkHUU$3AdT38D zN)RWS4L(gWTf)W-)XZ4#&DFP|=_o+n=?l2c1-;JMn%kTnRTd&tBX?d3N$p#)8t$SA zZ-oP`NwmP)Cy7H0rk^~*<5K|1b)`JO6loMS3G^nWKll)UiK3zA3G7_|zUQnkD%j;A zvk)&%qb8j+I4xQzhatLhhB0Gz$h<^iB}8bo{la2qefC~BLnSJZv|>JELJZ<%#*BvV zRmJlCLs(;EY4PN4R&pYjbORqg=XL7F|NM;g_F>H%;3kecE`NT4T*cXQcnK#`^u4PG zZ`JeqpL#+d${mBk-aww3p2l1<=-AydV2RmHJ!BI_4NuUm&)mkOhC)Pk>?-lR%pd%B z-qwo&2h+n5 z@6m;N%I!=3f=!ZBeDV(nl0->#)0uNH&FeY^?+e&S(8cbH>F&ItIE^fws%B^T@Xs`n z@dNoS`3AUtNkz+^S|SdFIJGp7qcQ3pQHN{kKVNI$k9lIITa4HPmWiq# zwOXArIG518TIH?G4Nrq_^ImG1GU7j#IHqDHZxDN6$=miTQ^PY?1FmW#lY%$6rDh}7 zgxC!RkzYDoUL-tU(oq#-mG9$PH6lQkn(_eojntggYu;9GTsI7a=zSoh3FnemlZN?< zT(a@y;DH_nSy3RTyG}9Y)@d&#Z{@5{Fksp_$dEs7H8!cyy*kD#8eXd%IY#h%t)Pz4 zmS7fe-_#$dh@a-IZca1UDi4W(Po&dGuo_d?uhx$4tYAj6B<~xJ;G!8!70kLWIw1D< zf3&tLZ+S)P?~RYQvK+q{ovx~jSz^h3A{&kSbGzLiv^IT0z$e_?4~_VYrB8y>5>F zuVd!E6(H6z-+I`K46?t${V+caC4`T`Z!!?w@Sj#Iu#+gS%9oCdLcq~26ubZdV4r}{ zzA>m(x<3H^I{6y#kbJBQRUpqlq)A=5vLqknOBvOOxN2P$@4nl%f^Zmyn<@2ErBehU z*^VO|_;WmlDUoE3&Src;WBPIrf$gi{>3o9fhm8bDcy>t}3EIf&Da^QSxy0X> zqJ5crK{TM~*eViwLIL4)*{dSoE3fIdh<_y=RC|#54*#4^pxTF#MX9W`fE~4pq~Cgw$U_G&K4^7~ zU#wXe7bCQ@@0dm?7f1tw-hTC}#MEphh$VcA$ti`iJZ|^llqW#^TaL94N|}IgDxT1y ze+B6%73*h9&g(AU?*eKrDbfo(OcGhxMJwsI+4rl!3r;@A@h`;=v_tg(~u zyZXp2j=ykm)Whl`#|NG4l>7vIH4O`CanzGu*jV(`&nz@%J-Zu}G47${wZd9GuU7~XpNB8yx9a#N*o*%Z6zr)RADM^r;UUdkaX4gggC#nEqB!Z= zOBVd}uliN+hZIcS8-4wl*#mMc*jHZK!&2=ZCj!B306I#GKSLdA(b%_Toveb(O) zRg$2xOT@0u5#%y-PUm!13B37au3qiOjeno&dXfDc8T!sub9^W+5Brf z{ne|Jb5`pF%sgz~&68D1AaL#t%ip zFud4v)P!Y8DTACmvEP&-lLK5e2@T`4U)>LHmY#!L&O|8N!$u}PEUpo_dFT(GYkwzJ zOvHpXGEq@t1Bo8QGoa)Ww&YNhkCYMAWD9?~PcI43=6Ff4IUfC3ZAGKt6`jl4io3+K zXeH){tEQoX00!*|yqIRB1A&K11p9JLy2z4S&o zjlD~bSPOJ^m$Neh)gL9=7R6#VH&GLJopn0=diCdgTMmy0i&7nbno!mEl?FAC-?>%vR`?;y*! zfA`G>$Qkpjq8M~FhIf9HwvH@b)UHoB%Br8?fl+}(e}o->aN4$DHyk?|2A&5&ULS$9 z6IpqK^_kvXD=$+`w9U@ozI6BFEIZpq+}`>!i=mhJV16z}ECuxQ8m-kAOEHg2qUgg2 zMcgbBP7EiJK)ZKj#)iV;CxD*-m5V~nFNc`#J|bgIw>+EGE^?Q5**%vAcHQ+NenoK+ zpH3%XpIdUnBcp-XvEwj$pPRbnp7X=QU<15gju*L4EJ5tL#W-Z|omKQ63xhuvi`hkI|H4hQiIcYY11PdU#KE+T~SRL%4?x9a*{t=8`2AHHL`N$P8eQBne>L#gYHXS~&-YON%iPBp!oaEg;q_`{7grWunDY8TxADq%GEF^P*>{r4*>EqO9; zGMa(({hAL%;%Jc6H;U+q=t@O`QYqT*UwvYL&R`*sKo&w9aAbfa7j)?lM;FAWRU$G~ z@TCjZi?W<~4WPkB6W#XLd{njtJ>pg{!^f7;QjoV}@c25pvr{n=V6H@4POqeZaKRH+ z*)yzx@R=A2xGo~cUZKk`M`3(mhx@0086kaqAd4?lk?cSdlBoo+-gL9r<4_ULe5qsqLm2KI5?b3@OoqxMq4#HZ?0 z96Go$>|^qpk*V8gdKD$yw*758q^Q6558s>ty<)%o;veWezdBr-RVDNR0mB-5wN?T1 zvn#vir z1JxX73!& z%4nm!*SR+3^&$0|D$N>u?m(@Kb#Ln~Y)ajk>RUdD;V4NnD^n#PB-N2ttK=`hOYoMZ zL;Bh9$>`itS!1~g8jotELs3Aw1~N+#+p z2bEaEJ|{+u5}H89^ZWD=)*lI679)m_wgL;N8fT2?5ttOcv7+%z6;r2hOaE|YAcJ>I zSmu@{stHBjK$vNPdPh`}jHv<(?k&CsWM?3FwiMnLgWa57r#e5KKoTT}2w~MqdZoe( z=v3GS&b0C7dTQxy`z6hG`nN{265!y=%zgWv#|Nkk@c94)IbGRaTNkommFt_^ zs;EQ&eJS5JOwMR+XlEFzn@;N&Jzn!cFs+(Go%hDO{(lV7ee}MWL38<674n~^YAEd| zagkDM=OHhl64rM+(b1D<%1}@H_%hoZH034^Lb^nMjmIj;~-g12lKmhc{JCFpZ1;Oe3I`-BYZxC6F%Fo4oaTcQyUMx!ZaQ8mLOW~Tz5`+xw)8#R~lf_kDozbZT~ znUglzxo`N7Rx5)WCH1%L4xaj%v@2fKQpJs~pB~0xHy}9F9Av$4kpAb>`$QF;G-(5+ z=DxQ^g(~!sY^TF3Dz)=1BGlaQE0Z&zDm3SY-qTh;BZ9A$qFHhg@4Aiyy%xaj=DTT5 z-H$IgW_kRaWe$WN6jd7TFg-F7^WjxilVnr|>AVU_pI7$_`$C5RIaS1XXT4;wVXkop zkmNLCg;iA_%4nWMuzFlf;~R;-U_U+ME-QVqsdWwrLDjN+r5G_1|JAhlo97Hpu9mK) ze{y{RMyAohlzijKTfC(2fkr{z954CvTlGnqPZ&m&>tk&-TU4hE`M#PsogpM3diE2x>#y?O>G6k87(%x@n`?-7QO`GHS_j+CbL{({JO$iS0 zyMwdxrzjc=N(Vi0Y;kHfWYyb0V`)>*WncFsjM0|*H~zv|->@9-^<$7GEyQA?i)c8K=$H{BLBxdNXU+{9<{w zWsjIS!uO%>Z9fA?7=@+m6~t86*loK#?NeY0t?cD*;T)(Q5=g$=v_g&C^Tm$QH;D$6 zZ4i%>FEz0Ec0M(B9Vr(AY_h6`D7nd36`|bFuR=b?&^zv#R?j+kQPFdAUe8hMBZz$U z3c~jwvpVF@!W<_JC2Dr0bD;SYFq=*7|A4pJ$D=;q34Tl<2UC|TD0e;J2M+ul!cte8 z54q?YoT%00Y(gi=YHyO$gJM-4%KttmG*GfMC|w^S7pOQDph80fcfi@1?Nm&Lq!cpI zYx&@v0q56vbtd7T5Q;OfGtb{b;kI0cVMU2zJ=;!K$I*POaWB?y< z?)onVvtQq)VbS@^naASvEs6GzJ&nJZR@l}Nd*7sa2%lgGbrKXbY`K5_;gzUVUls`9 zET$>ey2Eb@{9q7G5XZIRCj=<=xCm5x3oCtgF$m+effM6Q1)Of%l6NrZXjJMSPPMth zptI3DZDwcrZsE3OAT(fQ48ymZuB1q~v%{|;TTi8X4;3X4tN#tIq3h-nJLvgU?|!Mv zmodMJcOjxzQ5nVBLw;F~=SylG0y2BDj0A!qPGDe|P{0!Y;#?p#_YAiMWRkE~Ph;4M z(Zcj2LlY_@{qgXH+Rr38nnuqLD{<}&KR!_7NzUP>Z!y0R$cee+RdG5u7t^FT#SMW=eWKC6u?^ZTcp>BgTHq_1le`~j(e zq>h;umGGExqyEv)p#V)lvcJtx+SS^(K6?y-pus@d!*GU^(c~b9=<}q(|7A8BXcV)V zCgmbR4ET{~4H|;d<_E&eI)7?Vbp{z%XR>ZVpBm&uy;#JnGlCjEXqp+yWZO-l4Mq6ipNh5 zQ`R&Xv9ge?*7U|kna%e^AAX0^XT)S$m++ya^Vk{XI(%y73bo6SHnkXp=;b$)k(>8E zyKVSjtKmMfI;MH&$lwv^XdDvaY^h72^_Y2GE*>h5pXa*!BFv3Rv15$u5$YWviA(;x z8e@T1Z;$nq@0FBU*>6wVu_2E%akd*#^^pV2;(Uv|fO}xWJd_j6BSGk#ZK!6;9IYQ#f%g_lidQXJ{fs9mLu(bPE)8l|XF$HxIpY(c0H9)_$!?AQ~rvynBIX(+-QmGy5< z-4YRY6`L>VDCkI$EAyu)c92S*H|(N|S^ddwf`Y zoN1!vI1h5=KZ8R@>V$mle~c~na6!@cpZ*5?1c#4~ujhRc#4Xn;3}jd~YK0BIbj*HG zPunW4az|t0GXKs61_g=;hL^bH$J2iLrQ1lew3C6HGwd6erR1)epp#Zz_r8Xx!>^P| zgH2=o!jv4$51`5Hdcbl!;BKmw)J`Yt5LLh#6l~V$Ia@3Pe;9aGF&zkBxX8n6MJ3Ej z{bhU|3yHPpiOjHW>Sn-d$0yICp5C#|1B{5x(r+lbId57>=Y>5cN`LuVq{?03mOWKJ z-Cm2$JLitBe}DLt`WmjeKN?E7gQ)dQ-QPiZvWVpSf;Fgw)ZqwM9SD*D>}oBR$kEua zVb5E@*OyYOC*=LW_w>!vC}@|?8mI`mbuJ;laYoY?#G`Q(REukkUyHF}?*@P?HAWfKf5$58-ItGJw4 z-84m76OQAQCCyL9`RyFS!6n@D5DDjn$VbfOrGeH3-Lz5-q76XHD{&tb4%C4wLI0Q~ z;%YdtaJBPEhh<+g)s5>9!jDTZ zM$5ASmZXHu#O*0mZhIVdr0V5YM{3$(wUB)?zEV8GK3>4QefX3AJDtdRe^PBATV+c= zJWsnwEi`Eap%w2xjABO${V9nnt6fr(R&u4>FFILCQ^P=iIB*SR091_c>iI-?)#XEQ zo_^i(52+*GLN0LwKMQ5gmB#BcQJ8GU(>{)1?lbp+%J8>^PH1A1=BM`DoM@ws$^9xe znz5;o3>>%gFD}h#Gl2y8u6ngb^y`^|S5j}M@R)RD?Fg zLRsC`;B_=LGt6 zn=U&!1qr5$nIQL;+idtS&Bmw-9M7e1rwn5K&&v*g?(mU?H{E0x#q`x7=M)D-DP04` zLFPrUl;zub^(KFdB~!>6tP-x2sc(A7hHPNLIG10(tPOV34ta|-w}$9L*N0dwI@f=& zL|1yA`;q<|&&a{t!97xg9Ixg)7Ob!Nx4}8)^-^f0;LqwNrq$!#z+I&DC`rrrAWH0Fx= z{*^#Nd`=HfCbV~?_4Pc3LoVr0*}xjgKiiJlS~hKHsnh`8mziKVC#XuM-Gt6nxQtyW zeC|;Bzpe6q6xC1IC8ei`fTkm}jHdgQw$<0g1R4v+-O&naVn}VR-Sx}sg~%)t3$uyD zrGUcHvzds#1`jyF#E(_KLL>d z8qClN{n^oN9COW2_o~PkrM8lIWeX3LeCyJ>y;yU4aCMU_d=>>sSPCEYe z!rP!N1Nsj)C?Qb+w{{?LYdxBMDlmr}pi zDf<-9m zD%GAUjH@^BH|wO`IU*S{GoR(No3G57^N|FdNqp3Ap#c;Sd-ZZMkcOmf3bgRcs|fv@ zY}iul*ROAc$~QmBz#q@A?V{xshVL-ChN@)DS_w{p&JMzX5>4&bihnxfT}rAcA`N4d zmDx2)z>3;Sn|jpNSH}i$BuFe=nwgXJMpk2sv3o_i#6f(vekabEk(2RNE)Db}8tHHk z6ZkHO>~H%9f8=8^1*JLy1SKVXqoRjkjzGRW`c5Z~b(oqdDE!I9P)_@<-YfcJT&h_@ z0_4PdE*aCLE`SpmEggnTZyb=mCf?2p@sO&M7m>CRWaJ}&u?PG_u(E7RR?~KDtIUV~ zxo9Ox+Kf~-TNDl>*wtQbN1o|)vGY!$fC%WXWk+RAiE3#_X}F%MBsG*O<_Q;-7*NEs zG0ul%qiSg?o@)Ws(#;GJ{?m1Dir7OIi1yTPJu`5!3Y!^)5?NfDu0!b5PZ-V^P)t1W)yaf25Uc+ushuJbh4FQetd!JZx2PgS~0Pr_rVlQqf<478OL(M`8l1WFnZ z3NTmBvW{i(XUqR6%C^HYJem!}|((8-MrxoR+cUR{rSI5Dh7 z{Y;-*QgJE2WgZS41fK>V(GmEhxM;5G@@RpQl;iOLvczl2){jO!z*5dK67H^X3lUN$ z&fVIX6Jmos(ToJWLTePcfBs<6AT)S6MQg4E&giLr{upotRdrx+M(M}F0Ey<;CzmP^ zhogq@@z@iS3euEH(DDtz9y>_B>KN*ACYO+|;Pa+{_)pL|?%nKVJ|a0Y1)D8xu`;8A zhxx?<{tPIv%a@v)R9R*CnA~%5$(r75a=x*M!d)2AEfo%8>FX6oQ#&*++=O;{E@`mu zolwp%L%CLFGsP;mk!R9J6)*j~n0TzJ|>%eREhCWE7ctP*hoCY(wT6#4lj^qpuV z(X473^vwusOqCo17f>@X$~jzbDv}wy28MXVCI&4PtDHw{{<+YY0#O9~_%GVp_SZ2Y zruZ8MJkRYRRq_)D=$+VYu! z3o(o0fWZfor3<_U{_gjd;}Pe`YIsoVCWzgoxq$CL?8BFed`}je$~}+4R>9+#8Ykcp!wZXvO%hKuQpin*wj%RM&Ycv`72gCRFn9sNaL% z=xTD%=FFp^Ago~4nD`f#CCTSGs?1xdr(rUMfSrv?&A?~3_QIZ5=*{2^(aLnM#}Bzh zygM?3Wjs=4_)lBe^s@Iu=($Khy_%BrKuvcUIY$xFc3W13W~XR=^xc44sIojS`-;uK z7TvQH=4PgVEVdiVBF}I_93_VV*lEJ<-5W~jtWMlK4}@gdkTFW*^=n>qdw45WhcR&@ z&ZCd)d(M!&`{qxE9!czCQ`PF>*7`)lL0Py+1()--Sr|#l1$eH{u6Z%2Nn3LVTxju| zE?wP%-#ZD(al;?|qo#S?#(<%)nLfVmTuR;)YP#rk#anYINxJR>>kyABT;+r}UNJzQ zRDba9zd6yF3Fsh*yV2}9?yp3f@!A`ZRZswh2$XCWQkP!{r9C^@D_Rm`YMD94kN^Mi z;fJi-IcZ*?-YF4$UBl><+xz|JiJAwKuB_fZD~xck>H6%;QM0mpeF-(F=;aV1K)3;C zQxLgps0za7pCXs}elzx+%vUs*DjmZ*2#}t#gXdhnyIMUxMJ05Ej3PL*EuhL<60wQ< zz#i9R)i61FqQ?bRl2lqPqJOljf>t%3^?l4w^j(wPheg|EhBX$W-{PCaRUDNa;$~Wd zgQb~@Hw&MfHqfskPu8X;o;KR<+)JLgRCyHEyx=7C)m8BMeZwDxfaLw9S4Vf(4fb1B zJUa;BtQ!B_WaBsCYZ^M0<_8*KYWmazc12m6dG-R&2{MdZ)`$mQ_gN<3so(d)nHWyj zXCMD*HORc&Fje*{r7ttaqhy~qvSM~@95lo!e&HLAcbb$oM((u0T;0)VDQaqIs8qPY zF!eb{xumJ~c|`5B_rF>ffEKbHSR$UCD-x6DLCegzQ6$V8p0muFUiXd*vns?dMVPgJ z#q5F6R5d2CnD*Lwygur07@81z0w~l>sdZ-o0rX^zr5%}hl)(olbwDphSakORZ;M)% zn52P64y2o+**72l;zV1GsK}la(iFj#HI|YJcPWoIhUNmR9jfnSpwANIV;dv&ziVV^ z8?pAy(zY$C+gQ>~jZNvZPgv{r|7y(>?C&R;B1kLnTYmkKg7yusZo+Hs|L&99cx+#i z)LrN&AL1T0)}@scU(aF+;$-UA9xSoq`$pfbuP*FmO8w=f@Dnv77NBhc8_UwnZXEs# zySZ<#UFRI7fv^-c#yZ30fsV&DQxlxNxFqU{WVf4nBcgPxJLU(6&QI1jv>*e8T{Bha z_B)!T!oCuJG}#hSfsjSsn*BjCO+29ggXRkk#H`toX{z=GDb*sR5DlP|@g~%IR|GU` zH`daI;rnU%L>%`HpW_$Ynh>3?W>h^uqy65u_St*r2g>$JV7Wq>D_S|Qbha5xjP+M1 zrTjiRwctw@aP}g$u~QDFTO~Rtfv@~(D}bJ;*0x3uUM=rWwh}PEm!jl%JgynbFN?#^ekx zhCh*-h&%N{H)p9MG-}n4a)e~G@`VX{S-!hU{q6{QIDi6)>+@$dqGTK=`(6q;T0CMy z#nBI-6%BbEz&$p@b5(x-a5dJzfnY8Exo*HFohyYa^XW{{3`>EIn)v>H^ZWY`(v0_!?c<2+ z*tpfLj=)f7WG~0tjsv{WPSyGl!`JqI@o$i@vHOcCdD!G!ES+7zK?q)~YHN=GrMiJk zhuMJX_4wz#4o*VcL5?X5^Ekl#dBW&F$e}fshix)3@9`)*WNjTMAA7Ce;s$Dm)OS#! zM2I`h)jcpIzim4P88Ujbbe=yZYtV2rJ{O;|9$Qj<>m)f*%R)lMaGZg`bNkR9Y1aw7 z?u7!2c)0}eZ`AdBCP13$XY16iv%!BjZIz%QJdc6Gzp)0RO^(Zh zg{zNOeplEMNF_f{kY4iut8;Yy%pEjXZdljr+TK1gR!n9dKtD>)Kf2Nzl z5)*vXT7@1V-I=}W(k?=Z>7qu9Z9*#2_zzSZa;N)quSOw=rE(vNvx#_XQDh%;lg|Kj z$^x#qtk*0}@Wudu8Nrl9j2Qsz+zAR4cygp=v93Vjs?%%rp?K$7oMQLub^{C`yeWf1 z#trCrBIkB*1XIZ4FE8MGS#jh1e1D_bJ9uMH-Ln@TKIgNs(lfU1CDrxVI^w3F0M^WN zQ$8(syW~9WFcB+tag$7vC8u&bt96a4Vq8?h9YqvmI_ zM@|jM3%C4QCb8 zCDn!qB)?#X>i<&XvkjaR5hotPc>d+hJThU;P z>EC?PqPyyN6DWCWx=7Z_BQnAuzZ<9pP+BJ-bV0dLBQEN2l}tnE9<0eVxU)TVGHWXo z!*BtXj5|(Y%KM6iM~FqNm1c;oVC)(LurCG7v%w4<{}bA(Llf_!kb^Alp@O_okl2-mX z@&AG`nnwjI8)8$jl=UC1TTZRN06h{@0xUm5GlzchZu()qeb2IdZ1IJ1#8GPu*Tih5 z?;Uo>u|LglQP1x@*Z&jBni0uX0zGfcZD}%}r__0*;4xB7o2158tL9q%?HoBYTa7#q zu2{XcVC&dYHd>#5aOqm?L(>yfN=D2Pg=sy=sR&2suD803w|fa6SlGWcVz*et~ti)Yp<6PoO$)finq2;g%gLmL{Ci~?A3z;)1L z>1=zQ)ldsE9It2sM->-GO?+u{R#6yQs#FPp~1q{E`)6ZO4Ia;AMX& zEoaCGV6D3QoVFVgJ`cx4g%e=_nMqb|dY!OU@n%urhKG%!LEAs{OQJCiYwYfg{@5Tk z3s*hCkVD)IoQX{zwrV40On56~2>M;CUi~orbDxrw9JM6?EsF`$OPDAmc)Ae4d#Nq6 zhS|9)$2`LK>Vr%|M{h{ZeFriPCmCl_?}-){*f^@KCv#R6wdZ1W@fR*2$Ov^N;{V-Q z%)gTYBx{}RO^aSHE7Ceu{hqis%gVSnL{HcEK`_VgNcNr0{bJS9yj8IkCbm3VSKp%t ztbHfhO!oS zB_pv_rS(B;m?2<^S2yY|FCq=zXaXkq+|v>dj5tO0j=*4@|LRp#M2gWY?pCRP2+)R@ zV`UyvuVO;Dz33uM{0XC87QGwu zC5N0&O}@mRNGP%N%O{Ir2)v3>jP4!jN~s`;AWWZG{;tx?pbG?POzdFf80xnhHH#u> zS>KJ-KJ5$EB&1XL;|1Hybco+%u!u7eH(U-DqnV)T0>;2S9e}E!p!8LL=qEo-$c-Hj zK%9V&4pRqfYa#=WG|Dh>5t_R)6NP2XYeA7_9Vm{D{#LkF&=1gIOQ{vbnSgq`Bq-++zNE;L_1pnVx?ZXDg86ENF=9m;7BhvjdM0N|Nrnn#{v z0L6IrU5$(}&}B?Ln?u3W3&wmNWqLAPmN_JqFi)J{1Ra4@jr}}Vr!JU1iK8snCUZhP4o;VdR5l~6c2leN#sC@+sgszu6n@wf)0G`$K;oMp5Q%?R(kD#P&n{7IM0S0 zXmG0gwn8{l-`fl=HCX;(_InJxoqp3mVo$r`BzulX8tP5C1I1Qu5YQ>^7-r@Qt#d$` zPhCJ#8XmyL21)Xkb(6M|ya~TBef2+_E?xI(OdinEG?5 zQ*=sKEgBu1_?@lW-9*Qbf0I7AhUf@v51ZiEYdvyfNeEY&yP&4!OR>Yv0}E2r@8mRQ zF%!*X&yrldlY+TxG8Bd;n2!~_27Rn*u{$C?UYT&NToV=lI%BQnbAA&Sj{339V`5Gl zO}BD_}e2shpIHa$sBi()shwXnB2UQ5yOmN=5MGe9r?>} zd^C`;bFLHXZjRH=z){jXo}*3E^nPckU;=7tXr&)-*gX$td>{WR$D@3Gh-H**=p^0+ z;5b}@j8i)g=6-zBn@Hjh10bFRpRS)urZA6=Bv}7${&OreEso76bR%6IgB2A>wBT;q zN_dZ=HBkpXxUUD%UMAzS)&~I7tX`UtH5-B`Q|X+~x(r8!mDA_h#l&>rxtw!&WWWi0 zE#bpp4Tc(oDiPJ5PtYz9IkZPs-fFjQHIg|GuhKISmf@=0x5V@>Y3htUvN2+kZQW|n zAP~Kh+|`Y1sg%gv&e8{GBS=-75hW9%-ObwIB?)2f~FN)*?C`$XWDypi9ScP!eVlWo}dZ0A6 z|8I&T$>Gl4|3`0|PGj~NaK`PI=7ez$`aWOi*XBz2sj#6z=(^eZkyoNC*`+LKp2%31 zVwULm@!t%!3<1g<5tStoUkqB1M#W6X#Md)P-E8V(5nuW)N;1*~sE)Aap9zhmoPjpy z3E0Bvrvb?u0^5t-G)jk`JBhW%BCoC~V^Z4-@&fxVcI6JhNM_o|yX^e^UL=(rBfkW# z#8SnEGrFC$%txBao?j2Td&^_h#Su-C0G(*u6pLnJU2LE%fc-MgLLf(2C`yRuX|7o7r$?-Wbr)ksR()!hCOe zd|)!9rD2v<`qQFc@TvaYzF*_M18DYo7~W6V0Z9b6aU@j&mdV>HYmiU-0v*y@vk=RA z1Rl%MdRLL^FeL+ zzi{^MbL9b&-vnNQzC#_^9R`~SV^Ul!CReBk65^?%m z?hTsW+X{deegB_d+qGFd7EWQ6AC`TNTT2OH3EO(VQv&vY0TbdZ7p!J-6O(^j7k4}x z+ls5Kb)XH`BuPk4%!Y`r#DK@jGh^sZogjy)2I{eQlS8CqS8^XQtk;URo;nrvC|@@kM{%ZOC`VJ zy#K?Lv(PX*0h5rM2MiF89U*e00ydX_yM z!(ob}kC_kWN6r;E%T}C*NIP<6(KDPJThY&?l@{BFgY=_H;FjR<@Kb1m{pw*O1dS(@ zgPVw(nG7h)Q!Y0og*fJSX9_>vz9&Y{brRx=lte{#ekex<*?J6>y6WgEN{K8xQ|Cqgow8(c#l<3<8Yjh| zIcBS|BZ|H9m0nl~|F;M8ZBYh&HZEqvWH1|+2VD)81Ff?m==S&C-=Sj$mWv>@td${KT=_o(P2X3FngaweeI;j_=U)#s*5kUNKnEUZINf8#6fyoKK zt%!v!Lsqbwzm6sqYCO3yYxT{DE-%7rS1OO-XJ7&yG^G@GX+BVG@{=EFUezWulpygu zY6t{P6+UVyRqlv7R#=}twP7wvO<3ih1tI7V+H*%vu%WDGd)#9bGt%aECot`VVPt?F|y4oy6p z%y?rnA!CDkLr0^gMvW8XegG0gpN8@7>S*yx16O&SV&(3f4>?3JmB$n#xiY zkON2oG+Uk8)9E<8e6vh+*)j~WGQ+Ph_y;b?tuD5~NCSpXWAck*xN@p7FHK1wJd-Mb z#o>%}8Nqe3BgkAny7HmUN-h(-VTtEW{E696&1rFR+jZLpFYz zkyuSrH7UL8=~_dLN4K+I)T3{20RRdFdIJ!a5SJln5kb=@EKqaWu@VHx~IQVORN%DJD?)JY3>(#dXlfKTWEl)h)#5 zHkt|(&$`qmBJEm|bce{gl=OdWn>z9RjE*((AlTPH*+6!-a-w0rRSO)BGs8Rna1PF= z2o;-o8f0cLiXIXT&EUbH79-(O?*_z90ocCh%aI+O5l3y2Zqcbc9xMwB9g)r7xceHJ z8TZ>Sxwh2TO~}7Mfh$%3h-b$OFix4iBo4jfF^VZlWYDDa(K1}L2Fi}o_@R}=#Kd=( z$C=513h*F%{9)F(IxG4LeVsTEHDV=hx{U#Gh=7<@QQOsx>3b16ldhx2Q#s7s)@Rx-%di1p}ot;eD`gZ>Al$>@Ow@AF!&1sZ?fDiabPxuN9HXSfr^6Vg*yDHcQSY* zCb?9iZ0?bdwecWg=enlxUKkB16i%i7HK&<}G1S(P1g!M`oFHI8b_}5>KqsetWvJRz ztz+1~2(lW#pRDPndzc+T(5g0Z1sGI_EzOBJa{61m~Tju9V2nzkW;EUFh9I>jK zKpqOOUWeQWcBub1mRlMQykdA;DAvt>w;r*Qaqy)**Z;LaM%VN;pznltQQVCZx(o@y zCHtp0ihbd)gxCVhd40vIqu)t6B|Ag_CmmQcgEbf!TAGTHNZMY1NGPsXc=c8&>Vx(R z?)VON6^M)Cb^aeXNQ!y#ORYT$J5FMu#q%ucr^>42L#3zg`du5X!BQ&=UF3^VrKw5X z9p#G04-7wMA#u?lGBfxudkdVdPPjp`1Gh?hl17GPbshFMZp$BI7vK{731F4Od=}>w zg68yT453?Hm|jGfX5?_lEQB`N`STQT{6Ybk!{mg`+582afq;nI(@Fn>g8fDrvRS;n z@m`jt(4)2F$htj!v~fje+sEsB6L){Y7~Pv*{Q^tcCof$Xo4~VX(cT!0Z@d-j20d^> z3?1E$P#2n}DF2O)R(6IU>VXIvqK-f_r^sSEGsGY#l<qpBM&PkuEwwcf=`sUCetbwvzyG_YosVn*WYm!NH7<^l{e1 z9axVN zb8G-1yEE(aeZNFnK}fQ*!5+YjuNokd2G-rTS}cJ$SDc0w&OybOA;7<;B+i+z3UDW> zbpO=jH-EGAW6R-bMMFkUWr)=5SqZy%k zy{_1w*!Ijar}ASK?VVI@c_JA+{UHIj%K#C(5S&6!<1W!ksiur&d7zI<@};Yz4P&-% zB4RYlnNlR&_LDjMsv+;|B6$lJg@jmKsu#IF50blF|LO{avZ-Qz7seOgrsh7xbhpfj?^wq&IncC9}BC|oa` zB22|zfzaAFXagi8;54P1gt? z_58DQp(%uua6{UN2g%gBg7p+m%hhD0?S^D-Mo0Q2w0K4ygQQe51~;ndpEp?*G zOSMG$8o4b`q3^8`u*EmxTm=!mUvg*Vn+`&Ht7AogGS;kM&1&TfUW94t*w1_9#fe0o z3UDDUVwfS!F4Pg7ur`fpiHSY;Cvw!@`uNj8>_igbs=CmVp9&+a?olG$$g0;+5*d#% z@ua1T^o&7mO`!WBo^MDYL8&l=6%-~PSF;;U8*mN$w)(t>j&GE=UuBJIuMViQmzFP| zrtVf^mmc!crAVecmoKl=X!Mr;`CP4%43bc!ruaUUu5MzC!8d2qghwJ(edC&t>SBrm5C`?>1^g%s+05I-&~rB>uBj< zUz~fZv-no)?pnoshSmJ|u)qt;?cW-210wJki5 zLK`fYIa-@!RIA|-72cs{!qyr%Ku3a@I%oi@oMq$JP$Yl)*=+#yIyS%+<^X{|;PVI#u!)RCd$p?Zx;hq=E+XFqC^c zK=js`m+|&sgnN!b@+@f8W90e?OQz$mvv6GSgs9xDn?xaYf80EWF2ntjKf-C#BvN^* z;!F&Z$PazXKi*@otTXx=xrvoxUgFwKX>|Yhl}Lq6VqHgJx9b4_snoUu zbl?(!%v4<9e+^Q1Uqeo@gY<#pR`a+ObW}_#?VbJlf-?2 zd~Ljx-WW2#1-K18fSXkg{X5RlT&ah73Mhov8^zwq>=9*4s&5}0N&_!#Dojwg=Pe?n zkE&~+bY*dLmx?wMiC&UZ>ZL3ts14_gXwl(e2Gb_*ptIlK0_#}*%T~*|P;pTLQxFG% zOXL6WWJyASptFMecMVKpghrb9M79Qo!~)+vikzmwdwlbV&p>R4 zBAwYC_BJF%QCumsqBuxsp#IngrO-`$7O$FgZDc56i5vDEcqgu6U&@aKJFuXr)7Z_p zIl}kyysCj}$UqZb!UbSZk}bg~teekeNHr*#0NxS0EMu`?^%5FD#5{$hEO1z=C#C;l z)Bwf5!Ac2w3r!<8$w}yk;+=VY3u_I{Otb2V9wcu@hYgUD>{U&a|EKH6HereJ zvi~#Dn#5MPCvnum|Lp&%@4jW8#q2Kbbm!{xs9?I^d*1O3vub zBc_oux=UCy?oFnUTSQ{9(+Bi6f0}4ezGjVij53@svZZwe=%95kdvcX2)G4bgJuayk zTt+PH^{6xWVLY0?+_CMa4moW)EnSb7L&p~Jw@@UBHy9#F0fE8x(03Bs7N}4dLhxwu z!j%@1BBlrgmWKd88V@hE*UA|F7&2Uee#zc?jwKZ9ER8GaANw#QnsuWW&(#<0f?&s@ z>sGPxjRgM2)VrvC)T^c-BHIPa^o@eWq-9~+CH=rmL2Ws8d51Clze;AK`V0#%qu_`@ z{rSlF_6cH1G=G$)<86(iLZ6T=r03jD4;ROz1q#MFNJLmZd(?^t_EN9SO0x;2U6MsE z6WVf0bSTw2G#;BNY&6Hlv~@Ttc$H8aqPx}FZaYrl=1-_k39i& zycVPEWI)-;MP+NpWe%#b61glvW|z8(R|M|s?6nBJywMTC<)$=bL8^!mDqT^k(dt*& zOTm9GbtTAjIJqPrDndbBW6h);I)D}xX}nYIXDRFivsvDV7yrPPjjlE8s^N&F;~juQ z%_}G_?*g26{TXRG$|NkQ{-@NOR4Zy)WV7vmBQ<*J|Wjxe1_*3gb^< znHoMoRvAzS9{jK*+_%RqLUkE;8SeT;=b=#&m_Ko%upKEtni5~?=8jM^WmbYRwGKDU zg%U(y-mEv>!=wT>xF<*xj25!Mo3Ch%36em-_&rw~_19n;eDUW_z z4n7_JxWT@bHu)my)biW~^=_iYESh08ph$|?F5ABx?!iylLwC%;;iXs@d4pRu$S}*) zJZ&~i0S%^Af$rFgQYqYqbmKRTVi>EC9iS|NniSkF%uV-(AWo9ot~a0Y{f%{+*z;5F zVDB9=*x9&;K=2;(XG!?p+ib{MJ+7S~$AQ--+U3j-_Od6F0=R_0t{a@nsi%K6q7>X+ zo9>W2zjY|CWUicT(_n*57Ah$$%n=g-Y#GNiyV3TPgd7ePh03YA&Gro?*dh^w!6MGG z7xaqaj9F znH|MDS#{xjQ>dVwA6)WD{KRWL?X#Eg_%u@2$RdTYRp)zK7;Lj0i4uKL`*O7K9BXpm zyqXV3Gq~d^=->k2Ww{4GXWkTst?w6_m1C^+vGfd7{)>7*F4o-$#sbIZz36a2Ek%dJ zg+;FI*Ut(FTr>QZ6APLRTByM2|17(aRn0Uqp_3D5r)j;jSyzl} zr2X6&sPW@6P*w>V@@{6R?TO^{eNl8e`99IhNT^1)g67i=ioLKss*-!?arXeu+cj)d ztRHIHm*kn!F)?3AWZI}FcH+efBAUi)AI&){FVr8Py>1F(B_&+xl`UlO0-G@PVvk*o zkK@r|aeQ2!4|6$+_?GO+^R$Nu32LI0u=zF@zx+OnMWU=BQ@Q_@ywO_K-*J#BtrQ!x zzyzay-33YXZ;L*H#5e?0BEyYlN#6y_IMo0?`ISSQ01r@JPa0=BU4Y++PP^LN;N}sf z8k(q#Zxnw6T=Nz|(mzN{J?C|Q17}tDT+oszxQu3PGVxK)01%N)NLR4aUIiy7s%XM0 zX2JL(DnE`f-X_Ns-fSmjc^|s-Kbo+uS8(Z0!q%wN+OCs;2tmRITK|ot+EL`PuBy=P zubyELJQ5;v`+HbYkdIZt04Sf5(cPEJ@U!^_OU zp$AE6Uet~k9b2y@BMSO5w|JY2`k-E;SIuWkl6b_bN^C$WJ7A=wtlEL0v`Y#V`^Nt=&aw=JochmMcg6}BK2d- zVV1GHv4qJgUleda$iA>W4RUlrtg^5lcblAgq75u%&PH* zBccyAM+O>C<}lL}I2|4Kq>b3>JaNbvH71r-LrAqiuG=T-n+mvra;QQX)WTw8!HZI#vQ?*M6D&Rbw5;} zb=Kmlg3`wfx7X%yE2tzL2}_h z246TX6jhL@D$;y@FYeU8@mqbvt${$Bg-|~he27^XS1!SsmK!r3Ul5-D!(K}nMYxft zw7Fs(nCa+W$@$=$A{OE@LxA>D^cXx=HdJ7U<-*TFQP-sbc0xmB#;<&`-YZZ!-)tev zqP#b9yFjZ#&9;V1V0DZ}Ge3s=*#+K=04~G5-kSNf(6utfaUl)O=W!SmanM;|$r65I zB!CBA$gPAwqbB3<@go=!X+d`37>}v{RF3)Tt~+12L%iVWOE{67Dn|0lU(87BWNCeFX7lq6;<`m#F8k+wv;klP(MO#UzqN3n+V&Y~?bDj&f zuqTR2C9L{ry8YZxeNLFy4!@T9f~^|ZhLz9Pi>?qgM;-1md_Q;$sb~T?A zMUswXYP@5xx4(6n*B$+Ty>jm#@f4Fkc%9I$Ap;KjtGEk|XIp;eknyMOOXFs%QA$c> z=Au?@c*YLaRw#oV-;UDu`w1N!;q3mj>KXH#K<8P{rd&O~+-34mmbMP*0+&2(+WTe+ z*thOJ&cSDI7)xz)oK|T1K1Xm!kov*0gTs@wlC&sruEo`awNAx5|9mye>qj2g-=+$X z78jB_D5CnBLI4=fzh^7UfB-Olp-sqLXMy;e8>xcnw6Pw*v`$Q@c`}S?FsrSqm3~__ zVK%6Y56W9fZt)!o6?*$(VzQ=yIHC{{Ic>6^Q=g}!q+qo1$l3lt6+WZU^~+iN#IY!l+$L~Ag#J$iDYB= z$-^12Jo4!o>F?d*fiS}>X9^E0=sj(l9{9%;`c0pvY~~+3?Rtbx)mg^BQm{6r_w_}* z1V=j8h|r`C*MD@J$)o&?jM$x3Vo(#}O7DssWOgnHIU3CGfZ~*JhFSq9{6_*9+uI++ zAa7kCN?`AdGtY4}p}RcV;lYyaIeN*SMZRzQXXyCau$g8N4=csl^JkJnb7@?v)SicO zHr4OjZmifZvG2P+zhOo9W2e`FfKpO2iWV5_pE1ziQsxVTYVp2g)MO6l+|i3Nh`i54 z3XCET^|YV;ii{tq_Msf`4-G(Zewus7(^~<;Cm~(Byu!x$np0I9f+v#CZlmb7+P^*1 zH5$HCY;ICoI#634L%jTA@E|ESJ8x8SSLCwGO=OI*okMJC^Jv}7%4#;zZx}k%Ngm6E zJ8h~&e!a+au?KaBww({VDYlSmgZvYEh|JNLBJwdp0rqO5u=in=C7z;zALJy}=0`GQ zRQHzhXqMVh!Sv&Qfty|T6e2tt3i?iWcgDDrrdg7oPri%`^B;TK$j`MtTBiIsWwR?c z>ZU%3J?pXLPlAeJ8IqAY8MV(DYJkJ<0k`B4?p?kKq^IqGYMJNFm-WzJ@)V+$N(j8< z8%D{5I{8AP#sxKm1|WCA9{+u#pX3$|MuEyIV*XTHRsV$+WQuW@Oq#GPBd>IR{eQT0 zkpHj$uL7rC{8yZU_e}sCl@v#7^%{L{JW%_9_sLtG=I|gKjCTc_=*(m$IR9D;v$#HR zTr+B}UrYEUt#{gvFSS95wGQ=W#~JiNI9Z%G?GKVegA3vgQdWf1a6?`cFAf(x01hkN z@)aK-e2#8D^g~iMK}08-82W|n==7yNvrN9b+O(GPPdYjmXhfaT>-VG2*ZgLk;dqfC zp=Oj|N_=vlWT%i7AG)rMoz#mkpRur2r zMF;x)&kIZ37C)W;j!6-x-mkTh5-0!V0KlYrDvHI{M56k4M$?K`+;x6+gOfYh5N#aUO?8y+iLC%Mwe5t$re%41h;z%WS)S^*${WR@hF=;Y*tmO) z{KA1`XHtgyx*=+{@Igk0eKCP?Wi&o|9v3lphr zvc29D@;NPv#xEPtE0k~L^NN<}ZJfqLvoM5A;y;=5 z^s#IxaHLPWe(AXYn=cFdjk&Vh_ZlXy^Cb}FC@VvbQjh8_S>3itFRit-dL>*tA=Hwbm9eVH9P9ISvB(JBQvnF%tt&Uf+MlNDGTVg zbT3Q)aRZ?F)xsq;=0|3f$Nropv%-i`>>Fj_H{c8^Ho9BKgcigRJT8m%3#)Fu@#2!2 z`2ctG8L9oc(4XLT264?jS!^rloFO<7dw{7Pfw%{a^l7CvX(IJ~kjgyVFPa0GPq}~= z3EHzU#8xk1pS<0>v2Ha$`+~~I3Xtn&FuZy^#9J1VRFu61)Q5=wZU$A(nV(+%SZEDq z8TLIwHOS7=iD)|RsLiP+izG&1?9i^fWFu};E4w&w?k;R9Bgk7F3M-W83-j0yB-N{S}myncU-$sWkf<46iw+HJxq>vArWmXZQJ61^m z>AH-;d8*+?jlJ54#KlIu>@B|JXP1Rfkd?M%%m$B4@wgg7(PN#pB zNk#mx_FC_h-np6fE)h-cS4U=_@pC`M>9*QB27}zllHB>!aG@aEN%`)XtVk}_aj6os4&7R#Kk0*aIR!hu=% zMx!wsJb7;-;o&qPoEv&0IcfY>-5=YLuD4yLg+LHczEuVx>R_zjyIowX@MBd}Oe_@^ zmMhUx;RnPO-=4C7*Z-_qC;X)Fz|d5D-*bZ={&YpF9$%e$vAbH0Vdj{_%hDC%2Jx+V z7w~^!NbpD{+3C>I13^A^Y|*sc@hKQ*wKVbJxg;DnsiCMWaKg|d!9d1*#~!h4SYxPB zL?jCbf74b)E%UKS5j+xiqOM=w{Q4o)$)Qn+srtRMNXI=@_axstFE8P|tE#n1Ha&~o zsCO!p*{m=kc#lUuJT5#b7O0-!nEa2l5d-0hZ~UM`t4KmFS6vNfEZO~A1|#tU`67-- zl-(5$2t>aZB!Km2qUkH@oOVdf20_iAnMIm^cXo)*)5U9uBc(5ew}z3gU4~$Du+^Qf z)V76&7DO5jf8cADWYaO zJo8CP2_%Hw5Q|kwUD8@?xB9@-v9r~6uxU{5| z5juNj&!uwz{B1(8_-BT_Lu`>r&RcycQk$FqSVDrukLhmPUd7P~p2f}8lNP;1*q-aO zE(fX`f{SADx~kOV*LhQ7`eiX_zTsZp9p>b&u!NQR=c+!ioo{6lN~B;Zn%Q=Dj~nDi zR=6)ku2k*6W*@e{ZwTG%t@$L$Y)KakPmf#}A&mrN+S_1tLv_9FS;!mq_{0Bpxb?b0 z4L~NHa0gb}xz-bSBrWtE_pt47W{A=?jRg#q<@T!X&*pc(*%KJ|% zVcglkOFN*v;FFdd16M)(HQuzHiN6lx*Y?PP>uw4rpTcKeC;foa+>>PzeJDTjqXX() z(AX`a>z$+X;wn2E4=>wLOkXDYP>JuQrHaE06!&3H%U;NdW}Bu#4=J(c~*)#agPvEU#)iWxfkR z=2^ktTF%Je=CY`(4fT0MW6=G|f(tp(tXyo}qwi7`AS!dtn($t^O7B2eL6Z5~(F5{8 zdZEd6BW_=EV_0XJKVhYDM?QgRE9)b|X4Ox#9lh}R8CpwO2n} z5P_y@jcg7smUbIgt+UsrQBgccz++^Z&eBAo)8p$bbXl@Zvk-()ksq=%mHk0xE?)&j zl>e!(PXl+$xu291pj<6Zw6pN{X5T62hgHlc$;lox**0HuIy8h>0BU%7VIW=1zO`5r zCPW;H%I9sl-kzSxyHXyXpRth!#bvy!r*@K@^0jmo-d1uQ4+oD@A3KUuSmi(jl4O2# zBI4lbt@h}PC$`PJL3^j)^JS`9yDWEAc4WkQtcK|NYjrqL`ZnAMEpm0aO&PL)?rO@dhq3?5J_^TvqHi^Ha|(ED9KE zi8mq!9V7SE-%sIX%%qK=CkkJ1N^2LIVP6TR`ms%hZMA)L%W%uEl_8R>GMa9&OY*Ap zpp5{bQ2R7F@C0y3d{}J=K;i9@%`N}1Da}Kux^HRr#Jwy3Hl>&o^XB%u=eF&s5>Wq+ z7XThpMf1S?HJn@x2-L|_<-Y%QALF}gVjiQhz}5%GjHL{XtprYBGh&uv#lo*y$Sk{6VH-IH_ksFB%) z`ieo*ZxPE{q5rt)XuAlV0+%!(WmpS|odeJ{4o0Y)G|Jt%&x%4d@Caf!d>INKkVX?@ zwVRJ6YD`)o$jTg!$EvtaB)#4Q9x$Vek3bS_`$GDI&Rdh-QPw{DxVh%2#6o|p)>7jO z55S=wp7!nCdTT9{&t7^1ua7e5Bn9cWNG<|%96#D6w5F@1(S4`&XwESNd?OHASn6(QUkscg3V&ggt1_GCNqL-7kad z;Y*jPnuG{YY#w-^S<2*?O0WM^!)$#kQmIE}vBymDZJ?PNb#(;goXcHm5D_*9ie<%U zpk1`DBTBiRtQc7!;t9xdo>;Zj{0_2}Q^9<;-fuk#{vqS2>n3$I`m!()NGv*Jqf5ue zHF>F0x0$+w!CyX`hI7dv*2i z@K?p@4rYe(-0ghB=CzZ(+vsYzb}ShJQ7aA;LE)>O=pDN6+=uS@u_S}ahkG86F*eZ* z-wHI9!ZJV&>~==G(16b*g1(t-?h3myFXrC1%hRz-u^I0=v@TUjoou+2exQzN^l z^2kh90)dI#vVu6NDNR$fog`5qbf#bRg1xJcl$dPtYOJ0W zg(W1)*PQe#N|YCea{Da8*z%uR-&ibwJr;WSB;a%C%SXuhj1Lx1*KXI_q5#Z-hm7l< zNVzPsO*(%dgAQzy1N$&SSb#@Myrxp2>^r)YcW{O6`j+|x%Opw|ClnisiLF+4E(Gdj z5MgpN)Fe|<4rIl5A~{oMYCj0<79{fGfa-eAvXPgSdY3&WL^-(hYEoK5CfYF})nY(1gua_}KMt@X}`>gZqFL5&5l(tvssO>aH0|pwq{zPHm>`*h?~c=Dq}Z zX}Mjhc5~ZHbZWJO@p8 z7(&VuWM)_`_MeIE(4myRpi)0scplo2*ZJn)d8NeDi=(ewl zcf3ahSN9P}2qS?-#Uev@JYwM&LDIpC_mg8YqEhC=>dx1Hu)iqkbnjV3x58Ft%1x(; zUe1W$`c|AL=BYs&D<=te7e5j61njoO;(Xz31GYI;WiaN#)ad&-V|}}ay6@R@9((e| zbz4wxrYSNA%>WVQ1D7vr$>rn^2m6<|fs&MLI7|XV)=)|)@(SzKV4VM-8Sp1jQrFAo zr$Axvk|sXQ53wj+^I9no6@D>^gYZ=3Mky%YR(U(&&2_lc>^3!<`2y=Pnx!Y`=FIw? zCAX-k!XCKCpx~C&Zms8B5+E45yd2%F}FL{FzRPkI* z1JLjS)71fnIT22&JUg;d`KP64;Y%bVQM^G$fH+rK!IC<0fKF$#FEGbJ()1XFzQLys z_C!fK0oz?2A{b0`83E4*;c(P03DRm5Ix6S{MVV5IU!QY*t5tqtVYYTV$I+RC?1$HF zm;Ziv2t9d)^Mh^i8T|dlc zBm?%dE)P^D!(9DhTa_5sV9}T3NKt0?g9H}zhJ{}*mIL+x`B=VlDxd9v`c&JdJglV@ ziDTfnNqy~34q{&pC?%i>56Wo_;J>2IrZ}AE0VU~_yamh#URlpn{sdM$=DxCXfp4iZ zLAc~iMsx+ag9$28Y?jFxBMj@*!x&ar^sc{I;ftnPu>=!S!MDUmB(zQ=?iX|P=6w@N z83@`1i~>}~VJ|$iL^l<(M8Gmx=hUwh<-_p#6qlNtBYU+ABha8il?G5A7GqLh z91}znJb&Rz4N7yDi4^5p=gUac%m{g4tKSf3Di@X)i zuT9*`B_fDG_5)=TXiHAAAn8!@=GWw3FKd8i`RHW5kiJmC=XUU=OB$ZLZ$VP?8efrK z?bVz~jgJmCe16S^%oPv#b+RbNl_%xq){7i@a9n`-10p%DEpluX>%<+~xL+G~5m1EL zj?lwF7eDOV9{uss?}`Za;%&TrQGz^G!e_3=?7zi#on~cKg_0@h6~uf^!&8ROeQ@LDc2hmuW>1Pk zi0cxNOO|4w9zs!A42ccE<0`0=FLGcqv+v269;!vLa*l>IS;|fQ8O~P+A)IrWhR~$M=XY{<-&Zq@9=luBS|mM746R)_p!1E znH)nh0hA&Mt-A^wwvO;hS-)#OifUQ18}h~Gy@zyIgSY!mRDcwp2Mq`3^A7(2G3YcoJg#S{SZYBE3$Ladcpv+jEEGBht$F%zL1RdQPvHT8R zf4oyl?@?DMI`nax0fycZ?qO9-3nzq}0zxW(809x9!pLa;N_y4i{WIb|o}z{;#8%bZ zO}({}9R;EGF{Y4FyfRfyfj$z6>O=!vZg!dM;Ko8;CLUM6)+;WM+Ly~IJ~BZuwf$00 z2U4ph34%R%lXk!4E3@LB-SPE$$&tneSZQaICTys(x^hu@sdsy@hzc^?YHWCKBt(QZ z{jHHvL%kqv96)11iP3wQxZ^pVaa%Q`<&Dc^bXJG$=#$293?G|SA$8_8In%hhwQVzq zVR>7JvsMjA@p$%QrCNtG5Z+y6iYS&Yv*OF>o@sWfdFhS}6xtu?h_@EK3KehgP95t3 zA4yrIg=R{-t*kwXg0bchFGe~g3kMPr&kt4;+gr+NH0jPTxtm9jHojH|w9t>2gfUfU zw*|I`ekMY2B+(4f7=E=}780c?5F#+PuYk7cD%a4(x<6m*B-5cDwCVKY6wnZBQ-tSb zLf&L1Oa^_pj-MgYa-3u)LesY&^_;5~;-piczc-M23AFElwrTE&;w27k%7KmSgEw3N z^;h$)kXj!t9Md1Oz?2BSxMi|d=K+({s@J#UZDR&x7xgRz z@7asKI%LDhd{drUmaZMBO_PWt^q(Q5sEd|{u<7(=%{42KYU;3MLm;vnuu}?tG7Kfq zWQ%$>@tN6ZlS#@Tqbs33(KoOEs9{k8&+7`ts6*m1Y*Sfqx&^w_8F=PXPAvx#UyT^y zkP%9;mREJv`?8Tud8E81-E;m;L_{NrYey4HVZq9{VOB0!y&9udN%d6>iVE|-%IK9} ziPGO~jn#(@Vskg2S1K{Ua)iqxs^)Aea!uk5%x{ToBaS))U`^j2C*_m#IT?%!YZCs#)Vot z1Kyrg!xDCWYYK#Vj7u@*Zgv$*Z#F5fZt)xhH6*o$Ks9h79x8~Bd!4%^zk z|H9QA=>+?F=Y5`$=u&G!uWw z^sq!fQLrTJ^;<5MT1_NJIFn<^rY_1o7u_(oZC@_>&a`2{BU(5wYOitui#S+<=drKQ$!<#Jfv6 zmz^&707E1*e(&}0qX-ePYjK!%*f_yAC%*3h%&#{a%vGF-JZA6oT3+Vq9Bdb@Y#oN~ zcM-AMt#D%aP)Wb1tt3zHcNHYPpBrYH&rZQ&Z1A8V8frHaA%uJEC>vVAK|79~Rix}_ zGBYp_4{Z_$qHw^K%fWfD2`RpTS6=9yF)|N`;<^^d?kz(MQv~#Pfqf!eU#%NlY<04G zyMY|L_Nty1lZ8ZC8_HS1r*>XAh*t&kWc2`tuJ|N|_(9lA+d%kT zHBeZmct^PL$NvX4kPx@SE7N0{mE7gTspJd7a@^WVRL%g9Vt0Q!Y@pWxbuHY_hs?e) z-e1nuvP}W*Jds*N2UAB!OeDcE+08d^W9R^cRQ>Wd@=a~oS_7Q^@E13S4!__Wtzzby za-Nl#T)^Iy${H;e5#BhE(V3f-pg+g(kYMk$h`Lc6=#~|EO!gX0eD(>F-K@2a#O!3- zT1_v2$Cr|=`XmD5CoM5}^}{Ap5pG{!yhAWo_ssbo=B+Hp)*;F~{ms$jo5*5rP)cGS z|C}gmLF>L*xRr3TjD#nlBx|N01EF2_$4t*DCq8`6na62DWdIBIo9tnC;O@KSIN*m6 za%6RGjguuPCsk|*tx=PDKH)meuy2ks=eZa)F@biqs$xwk%n%zyR{HDa;Hj-5g&9|C zEi3WQNRiYP6HI>FSh%j!FnelI+KCmwvZX`WUPF2`xk`3Ef*8D~6rBlnUu(fREUTqD zM=He5W#0Cw0M97+oW_&g)kj!%tc{u_wlV$dKM0vaNTygSC1G8?M~^wyAQU)#;Ip{H z>Hy-rSHsErctGa`M{tBG5;2g55$7!wY4+1TLCMmo3j*#@ z)$xI5huj!Cs(l(h-IZ{Hi>hFs^9G`!Ycs4 z_eeqV1}glQQzaegksM@kYA#$r-Okl|7lp!V!R<*zSEZmNf26vIyiAY#9A$1l`1m$d(Jds>tQg)1A@DHMVk6^6;>_%F5Z;Xf?Lw zaPFnf)yv3cWe;3Y#NaqiqwzqeG2|&O_k7sP{Ag!CYSv{_1R~S1tljawEoC)S{4z1! zoR`L!upxr?%{p1pQN2JX zwS2=R=IB58?naY=SjFP>rP}J@QRORuqtX%1-wvb&B}pw-)?_)t&*# z|7BH9OPlI`b=BGmp#w$QK?B0`K-XT-E4#CjsW|~?T(JvLI;AVJ@^AZGu=LEz?N4J@ z*O8~A!Fi$W-amh1I2ro}In+}V{X_qoaFCI<&pfiHWL(mtJphC`QG6jM`_=RF{-x!RJ*3(*Rlm3cnVb~`eF@HMR(%B&XUbD6BZSt83z3DGaA#hVO0=;! z=~yd(Ahv@4SI{-TM){ay{n8p^xzfaP1=l}Q~2tnk5mM%!RyV!_tL+McIr zB7*lKbc@QN*`A1qmoOMlvb_Lck*{6Ftd1Av0%l=+Z_bBoFZ)lZvPv|DJJ3rKkV?>i zQ&w8w)loaO=28Chx8#M$zsa~qK^q3|n0qzXH4Y{F;7T=qwYH6JF_b|^I>lOE1S-!a&{aSH|mP7Y#$ z(@r?puezp%$=)*NGW3m_YbrJCB~&ef6_9sYGaW!=-%0`!2G7 zrNakb+@+m%i~QF`e6fVWLR?>StnjY5v2{<|4V!g5XBDk45-&$;>pglYem_lqgWQC% z>iP=@V`89G=!h`Gl*fP_($__0d>WV-Nx18UC+mAC@=GeQ-YGj{3mRq7mlACuuN$qA zJW-L~hxtOT8}gsZ9}JalD8Tn$eBWiRVZo6(!7Gci4g**L>jCh0&+ICKWBZJW=`tsKk^SYFM6oyLjoas>P~Cb(}R6A}SWa1O=5| z+@4t6`zyXsB9aEC8bSs0oTu5ztMWD7k^|Tyv78IL7Bet$S*-_OAv6g~o^ij;H?0Rr z!dS&4EF2O%bY>E=}zbyzfgZ9j<<+`1bPoi!0J8PGQBoDwW4YFKxt0TY^=-ja- z_#b5pA#wl?a2a279!qdvw z?m+qUHZ{{B%e!TM{o@HDQjECZ^6f>vkXrBZ$Ra%g&d=TdS>@)DHHfgRD161bX_}8% zX2CT>*-U?A0%lt`OQI@9cS=m<7JbiegErtv+RNXw26|8DbR(jH9eiUDVMRIRm*L!A zk!tN@;9mpCpX8BUo_rHv*7aB?#@YM*@gHrGs@!?BIb#*Tu8g#|FoQ(*q<2Vpaa`$Q z+KQw&07%aq9&RZzEgyG#WcXg#m%Ut#0E-p?Tc%l{%uc$-iM`}f6d~d+WS>QA*yrUg zcebATp}$QebK43$w;vA;3u2dHZmo!x9|vw{TGhN%|C7;cI9&h9Pq?>=HG1^_{O^blPv)^(2Tc zJ2H`qgJ-72xW}{VHN}|1r^IN(ZgTuAbSFAiOug-3`8?`>ucwiiS~B{ny?lc_YQ8&P zJeM3Oiv4tw)m#>!55Fm9lVScxD>}*24emsuy7fvw{tKm;9*G-QYRZ@k*7PQwZ;VCC zIu~>x0_hS5rnHA~avE%jKBD$L12es{!g2EA?fd?kC_HBggbOWPbcd?(g`kSRZgObT7n~#N3Gl^15aWHVDNb4aU$+e|5vzAlcrL$r* zXb!oNd=2ufX7PX-NAtqR3DDzoQ)^5m2M;03#+XATiX0M;{oEA*Zh!>|8n{x3z|WYbBnG?KO0Za;W#|89wc7b7+3(W z4ksg%AktzK{|Pk?M$7l<)*}BDK;K&kS}{^wv@sezrMLSQ=@+=pf`EGvq&|#voHjCa4KOs(u z%nBj%B3_$Uu|~8^ERA>1nTsFi%O2Nvi(00m#@eP_Ylk9mDBcm+C5yi=d4(5d;k$2 zT>oElm)Q^Obz1S};dF-1!FH`GW3jZ<2avf>!s#NZjo4jHiwdmC`M#T*ZHVO8`J3G@ z(e|9Sn{D8!F6Zh%X;%XCf=2&)dKe8yxqzFKfRqOoK6gHOjIs95Tx}KK$T8T>-%YFg zJxCU?w|pj(KL7*WPQ1@gQpQ3Z4>dp6hN%2QSRSIWa3CJ#tvA<@HVmYL`}qFaxvj~# z>zFHz%$@Z`=1plQbNB z(!@Zh{S<4u%ZBj!tx^R0ViK8>J0T5Wp+x8SgzTNAe~SBE&{gDd-$|7zRJlQf04{Si zYN~#?4h&FSIatSNd$XIdNWm2!DG1Xj*(B*+>D-WN!m=V=*nn#w@L?ksqyn@;y)f@R zR9&lUY+sv9Umc$>N;WAf?y;>#d#$OFhG<5`Y`h#>;)wM>2VbjyGr>%06-TzFwWuyK zXmQW`+zfy4m?y?Oh|6Zx3UTvH2gjO*$hn-_Cp6o3q|Qt&){92QNL!X57Nc1lpC1h> zobEeATOyIxHRIb8W>bNF3d;^azP$o-qjw3QQ)tdGl1+@MQa7#Ccz3P~xR?6i zi+CA;ff-n8L_CDmn!>-kMsq0AHBKNd=S?_hg8k4_IZE^}d!!aIjlK*!lq4t`L8}cw zZb(r(TbZ_XuGt->WNV{V)g_7D$HmAAQK&h|MPfn^o;oD-TU=qkA7swW<&&0zd=bzA zC5>T@dpI4YYCUQ^z6Wxa#|mvhz1yp3e-Hb8C9l=T+|Esd6Ku48PK)R zcO9R}XWWVb8-8LF3hzfpYPJosr-`^2Vg;V8tmSSNU8&E}o94E}nD_|{`=0cS?*o>; zL;S#=2ksLwI9^l~Yd7?_7)&dO^022ge$8cETA#JYas&}Vc0uC*4wUt+gnFyWIes85 z%0DdIp3tJ9JXd&wFHB86r&?fKF|vWg#_D}-1Jzp8vjUKYPH#6Ts?&D~mtl?2gdI&(0D>Vi^q8Z`0P zd09}D8tx zNju>C?$y8PT@sbz{Q~st)|P9dI*W`YSQipA`uK=5k)jg#EBzYDbAIJ}{}Ap!o$VLD z9=-Wrltemo`*o1OFoOO|(&`y$Lb(4;56RDIyTCX6Wi-~>D23+~ zh}3f$hUga$iaKRXGrj4H_ypoa93FDB4o%x)x&WIh^u(F!V0y)T1p4XnyoWfv47WYc zgVJ}fb)?+~`d?yu;tNU;l`yIGXK_0(JoKp96F~A}3uI8fq=7{Hdq6Lp^IPZ15?G-` zQB&QS3tE(b9M`K?4ztx;h3?iXNa#LzSltbj!kq#jtxUN3F<*yg;LLr&4OVpb8AN_-QkMY|&%decP!7!UGxW;a>fJ4}5YHUFY=ZkL3J!?jYjs|4;x^F^{iDgL zzUl{*k19*|;hw2TbgzF%3z6&!f0tPe-5Pp-elRnaM0LKsD@Eav9m*JmYgR#MrjE@$v-0jd7V2c?j7n)vzf2!VwYVfZy;2K^RF)S90 zHx?zA!pBvi0`IY4tt)v0Rrn_Q8T>G1tObOSUSImrawjX zOq6s92-K`~5HI>5kBm<|uukat7G0>4<&(c+TvzIfg@C2$n4#lfOcu8*gU8Ng3-J?@z|l-R>`yV4lWT6nTM}O=uD1BoHL0IDY#7 zkMHfy8^7Xd*tktPheH3hB~Qwom}Ltqg~&#JW0*vCsGA$UF=%fvo)W6#W9TB!Y+*zD z-_?fLkG7?nyKx>9tdJ;z_w?q393pP!5*C<9uKW!S8>SlH>}5K{HNe@;^HK z_*jKQbGhce&T>Nj#mL(}9-*MjoBEy~UBc~($0y6kII;lHciV(`rz2#ev+=RJc@NMK z)5@-+w2~pj$AwhSp+|uI3oj6Hsw1H)VYHV2>gLJd^qBRa;XY@yjC{5f(&oQMiYj!h z@+WW}1|_6u@9lFb~!?cl&S`X`=3TuQb}0ZAu+#V*=FTJ>rAN|Ax~1UQc}g z5}EQT$Mi?#?kdwVW|#c+-HCC}_X=LZ$6L&=6a+_!lF`RpL7 zU1)94d(mJFpX0}O=#{5E7L`b$t~jhLm8Odsrzcwv4hu_&SFHxa@OWkmFhkyHu)#H5 zTpRgs$A$YqDf*W0|J(L+FD7lZcVTCX4TTO_1KQMsE)6L7VH-RSE+A3yGT_OJt>6lLTSOV2k=M$jf=?>P|5VnN{ZfZR z0`k(daz^8*prXB=xEZsXJ>0O3C9eTqXoI1d{IdNHI9Hk5P6iAtmv#FcxLzVnkWX^k zW~}4?dDWHiA0!$~gncrYT>{Z_T6Gn>4bZGOTZn_PSTh-izy;0UgR$LYD+bj0o#mSu z4Q)CK)=fjEvT4!R2N`j8UPCnZ_UlUn99-4F-jI@)tqN!Ki7W7*#Fg;DM{M(viPoyA z2C%C*;>nKv(elyVBgL_$0?3%7@#!6nF{%F2BqG!5WKaOix^!`}aE3NwFF}veE`}hznrmnu z7^5^>a74nwXA?$}94Wi_QSUDL-!>UH;xNRY3A3eES$Vf%z z={p-RbCa^;{KD*3(7M6?r9ULnEvpd<+cBxYI{a06?YC=j4Z_mi%%r9(2F}#CK8fh- zvD8S@nw1DBqwHPgQ#Rcd`wB_pl0H)LY8nIwcho7=1Ez^Wf{5#fQB#K@*lqyb4%{4y zOfEwQ92b4B2;;ZQ;-D97RG@GTwesK<)8BYb7M*M1lm4F9ppA+I{mX}h#Kp!ywC(%( z3{~}6k1x*$&hy{cSZgsTW;AeJOpGLHV>NOp5Wjk=1#2ATtsa%pCgyx+t{X{qjjixT zHqBx*wQ-J+ZDEfTVaQeQ+><3=n@iYNQV z7d7j%`+-&xKIwcmxu6GQE%_ zVOvUbYi(}JAwIWR9SS!M<*<1|bRJVQJ2upUP2^%9JDN+K%NquUVu?0SFhIw?9cQbU zK&v^;4EafZ>+46&V1@go_Lu=_)+oLy(x^a5yUN~IkkOtT)AoNJ&?s7Ygn0V{hME`0JGQELbT0bxzJBf2`a#&||B z;vU;yU7W)?^dkbyUN?sj(Amw@R6lkzy?hL^i2kdo&W;obfqL;K9YFn{PjaBnay!7q z+DHWjzGO2;@OGIu_8&qal}70oc%5oPV2S9QIW(-O06BtwwAkll-9nl^ag#K(}FIhtPsTijH`(qQEcR#MER{pi;QY*Y$d$c|` zA<&`B7ksh#TAOZ`+quz8ZfB}nCP0qxGFk;9xru6dUhE^wn)zZ%jOEryP+<-54mN{3 z2>OX%3tT3*@k6o$!1Dg`*E6L-4Kb+ehtt{E4D+KeQe})mgI+TFq~D}Vyje7{R-_LP zIql+WoJ_>q-;31fVB&N=XRMT10~hM=PZu1Psr`VGyTGVffp8SUkMi0&tcKwAZ7a)| z5~30AAcyjS|B)HffchX(oofRUlVl?T-Pk7BG_%^Q0MTS=R5nA}I9~@${Cfelq*?EPYZY&QB-DC7 zwmM5-5s8dLx{ygEs4}+fJOo|n8-t0`025Ci@8LyoV2{K)b)!^2_D~b!MEuC|X;{G4 z!`BUY8*Fh-x9};Q&?8)Yx^Tq}YfUH;oEUrzHeiRxX@$20)Jfe=95oh+Nbz0&5Bc}m zcwx>LqR^ys<~3)i-1oQY!XT?WAhQSyL}Cs3*oj485B>rTFq((qgKWaJs!cd$5R;s- zI-s?C($W^;%6hWSp!frTYAReLwJhX5?fA??9*GPMnprOZJwU?0Ia7eu!L;LO*@}WS!c@@TOUgK9R#Kuy`|wzf=c>XVBAs(B9Q^9Npzg5GJz`AgVcJC~iO zx&cEiLF*RzHhl=Rh7S(Vj7f7&L0NErx>kaO;^-KjAc#G|6J+{ z(tlk22HY+PBjqxOdUh8$30nd*|HFAy`fA(E}ecG_VaxbBAaLLY1W`Q+jeIkcS5y_ z(YRVNjJ1&XDqK0BV{()cU=G`{*1uJrtNi_7a6RE?ZsqY?W=vbUFdX{&Pl1`8B)*zj zZ-kq^Vh%1)wm?2mw1Yl~AR`8MElw|buKL%*F4Zxg1btT6iwZP3chPXP+j0yFB%Crl zx@z;gLSRuHO#So!2c_@!knwZ5UCp{-Rvz&|YHdnrz@~$&E9y7JO&5~Xee$GJ81_yp zhC&r)LK&>b!1+8+q3}#}J|qz#j{2!a0il2;zH-bmshe*+@(G&Y-pvj9W2_o1aB_lV((j$AsJwy~=azO&i#u zNJ&X5q2k>aa>ZNhB+#=Ee`yt5#mv&c`$lk$io0=i3$m28$be-jO8TlQ72J5scLjrt z=x(saK#7IH*qO-Rdri4KzF)+<%juj7!81cTe(`Uhywnc+>j793v8xU%MSESO`FU+g!&5&dz*H&IE z1dSg~dlla~VbPn6(fsr4q>zw`M+;L@*0|iS@GQHS=wJ;OkbCaEX=0X1UCj1Gyu*8# zWbeawCeUrJiQizx8R9Pov!I;3_o_(>fBzKsBfgEiKJuf=?(kq0dk!t3!e`e4zpzhD z!8T*&M};;Q3cBIFFc&oTfD}~;K*1PRW{1RzntFK{Wa%~c82(w{G|}N(Z`P{B3M%h{ zboPOKLU=6tR$DVI3q=8T)6^d(Y3qtLhT0vCpq1T);x%C<*UWD6`Xsb#+$G<=R@7@^ zxSF6?Z5@nTpmgDaKiX|GVTRX>Rx00&O$EJe(bZFryffnPdk1rE=lXhMMQ3N*T`Xy& z9fk4~jP(vsCH`@cZv>0ZuPW>y&r#SmKgPgJCRwkv^~y-N0gdq$14yoWlwmoORPtw- ztXXN-x6n;IBrNk4uI}GN6%fU4j42U?j7ealbGi%8GSBtFpB2~W9?})h%xO1%H%0OF z*6LD#$0;{g^7pMQ;ghc))XLUw8D?i7mC^_c$+VF+PAbn$rHs!o#%iat&~O+7+E;H3AwgiMqD>mw?WtTkTr zgV7DdmlyGX?zFQqehF8whqUpEzs&}#Y&W5jSCYhNM058Pe_j(?DnOxWjbZ%7VwdlG z`-{x2CGHU(-yELD$ssRFFz;i)VuW;9 z4w$IVWeKhw*<%dm=P$C-MZO6!f z9srLf{%tCEottEK{CuPGA0%4-E5k``crWBz=l{=Xz+FRlLcUAsSPlx_qyH$+`{9A9 zGKA^UTXHXRQhW}ixbWeMDyw(z3Y8=hBN4i0naMC!qBrkvy|-Ub z;$$5aF{f1dKhE!>vB=T+VjL^2*~i=q#FtGr*o{<4>R@9X9%0`du1+^GeFi7KEZV5n zfV)GpJ(lE(G|)-@?uiL5;;Z@AnBpru?p$#&-mo%C9VtH!dUOp1uguEdeE=$3yH6=g_emn5l#ttWFWTsckl@rc z1(<_+^$R?__o~XOcpFe@MoM@Piv0IGAy~`Lk0(2~3trd@ECYdAn7|r2-1+A*=l1Nc zHd4h8HU7x8aA zyFT2JrB(9fKMb8U4+h+1D;Rhdm|C8x3RvVImFg?n^g~M}Q;#FN`RbaqPlNpzF$Iqp zQ?6Pb?BctGm^j2>|E&72eSi1JXzF4R0SMAWHrO(^a?@dT+01hPE0+dob}vt(*?TDH zM^v>0WNcng`oE2h!oXxDx92ovc%KPo@gmxO<2Uy*p;SZ0$9{U324UR7+b3DEi_hEH z_VHO^8^JZ3gR-AeFO5BT?iMDMg#bBWcb)AIo+kKL`aU&E6o5+)+-e=h6iAKNUGocgt&vGk-Np=ePmuvx&!YUB=lXhb>@yy zf+Wlv`?5wa%Oo&EkZHVJ(xJ2CfYXnQk_wiLV;6Ly_*M;GhtYUP5V?NeW~y&7STe5Z{-;y}mk1?0eJj zFpnwsQ*p@SZXln^C_rcx)sn@9uyuPem`Sxt(sIzia$`BFP}}=RjB>R^PUtC95-GPF z%SiolL{Ee=<{L&iZ05lF`1V<2WJjC}DJ6OMH0j9q!pNKMYb%hmz=TpZS_q@PXR5Y- zejzs8j(?w|#>a41{?Qfo8USF!x`mC;u8#CU$jH{|liA?V8FdAq9Fg6ae*dOpfrAah zykvcYIbm?yk@qUbR4AR-QfWIb!to=xZ`*1lG7lCvHZ0H`q@vk{Mo6voBe17K=2Nz; zs2G4IKX|I1EPI)Hwq7DlZ&|Ay^bV*O0-DK|jbC_f@H(kGHR7W9LZRVjS%lP0rHYZY zhKUZ7|n@m z4&OmbO-dO(pvl)RyUfz9=3bvMI1#H>ROA{0KorV5z8@ceww)AL`P_+a(l}-=^3*qNO*(>)f zmt>3LBe0CvlFcVNKAVf3%Lp2Q#Wmb`b;F#iUhkIA87Ie47DjS2 z{?J*upIJ~+gfPV;x#U4&1cj#+eK`eGdwi6_&VX1%lb0?gKxYi!STYE-QUMGg6p2!_ z+0``HMY5BL3@I|U;l5?d4BY!K<52R|#(7{1{=i!EHuZv85Zzc4-HuKfbJAu?>8xd1 ziPA&;n^kHZGXtjmh}ONnbjP^=^jp>+{xGPjkCVRmM)k&4Q^1kZ4`_&dhya9SmTIYF zsj~c8^PGI2ES9!bZHXiB)w*%E-JZlDEbZNJA|6fH@nqlzgFFn&1H29EB?QY5C&5L! zEwJXg|17uyhbh1b@)~uGZ*i#v#i?zTebc))sS|5GbDG8nQ)(I^+~{~9%A)bMSc-4- zs7g9EwY1d*{EMIlT5=E^6+Sc+Sb+rOjqD4EjQ7BR)xB0 zUW8>uNj-hEuT^$OjIYj?o`s-^qMw_{#6?B|5yI5Js*okj4;mmkSv7s%vM{iLlY|TP z5U7LZRE#d^TgeJh9TrQ$ibbp~|88d*Ie|wmBHn7uzn0Bh3jAQvw=BnR#|>YPf`O_b?-!1lwamrvc884rJ2r)C7dzR~%Wdj@ zq1vm~wavkG)S*9=S%=(yfppWnbfc`XbIAJ3>ya@Oc(nf4tR<`$KdBTT2y%0al!n2U zlf%@f5qI?&r3(&b9gvuz<`X~h-IwnwHNY7n#7Ph2E?$}*joFJ8WV zyws-y!E^eQ7*A#(`Ye>cUoU-Z;a&Af5})dc&>|LFAWF3^t-5FkU>ZYg3s6YOypBm9 zeBeh90>(Vn`H%*@oZ#o%Z6n96nF(N2(MrAiXpp1s-HAG zNaP27KPxUCq7>wB^b^Vsi_;EBrA^hz3`CEer7HqJxJJV8YlT+~HW&iX)1l~dMjA+o zt=*ZpQ$h`tMmA}*!GOw^L+fFj0`2o_z_pC~XjI=Y{tcJCQjj??ezezc?=MIlALv{= zEsKUFJpnav4VGI|?lt+2$j+XPOx zTm&Ly?Xb`gXmdpZ>ymOUX>vxu4E8k!8W+katRtIZf*2ICjvD}pGH|k965d-GyKlQb zV!$hHgxM7Ool);P_g57@o_=FGy#Yx&jEgMLC(^vNb*cC?;19U$#PjMItbXRU_a-|~ zP80uLU^;(fx11{@p7C%XK}?YIi+rIAnh~&g1A^^uroUR99XmXBp7*UNL@Gp9lluO0 znNZA&)U_V8?^!(&^24B1{Iuj)>k;<;Bq)8!2A$<++rZAs-?h!+ZQY;N&s&oi;pXYC zu6_nIs7i?54CMLRr*21vnNXnVy27)B7<$(B^VXoy{2P&_aM-mGzx+v_j=e;%(O1!| zY@O;>lu^28wYkHTw0fb6%s~29%cKQ8^WTV|6M_Z2!S65W;5c^lv8|fgoOEJh%{&Ay zthb~STNCa40y&*2cIno}iS1PZ3V=4AX5H0BrqeJxi}5vYq)E7dXnu1pHG`=i1gq5_ zVm%8#@1i;qbn@O&a}91A?Qpo@NY~iI5g{kc?Vzh)oKpT>?_`Sd&H7YoSPbtbI}-!52Al%$tF;nV1bM&rr&-i&AG}Wd$4baJ zX(93R!#Jv_(yHdQbi;FrTF5J%_23sE*#ulvo`yjb zszbLHv>iHqcDs$~lVKnsm^0nKm<5{MTf2hUC19&Us>)X7f{Y{`nLlf|1YZ&jBglMr zt;i#RLaKm%xvLJhwUcnPwNDVZS^3mSQX)Oar zll$@@59B^GPwW8$0NN?pJd0EF1$CkeW$w=cwP(!Ne$LV_#s8`ffN(i$~IGds_@yp zx`$3yHa;*Pu|q|~cPfqn>fi2wG!1zvl=&mJGZi~IqvDedQv#ye{@a*TY#n($mM2xm zoNL@M9cu;%!3`@5U)^x}6hMtBaPNm*s>si7Kv?mrPd|w$fzj*TECHi4puH-0FI*)X zC@lgpC@sTAF$L??Sh=M}hq>)<0UU%LiUW)eCAGPgn3Tj&eCuZR8NOLV9a%rPuxgb(s*7P2O_1D-B0H7 z9)0GBeK6h&lxYG>*K~7ti3rt)Y>AaqA!kX?8O&R9_MtlhNiP{?Z{T6yz;m3OzYRZg zlcVmu()3AwsOM$3X*0gY=L5+)Ibyv8$a}y~Dp2Obh=EluI*^ErwJDySK5R9-0qnfy ztwS&&?=mi{D4)uN_@`GQ4vdzL%+0xhnteBl(FDy|3?{Ba#`yM5K^e5@Rt|+m-15BnNrH_aGAtbG?sUM?HG=bB8m71kP`puXcwkHZ0p z%2CWxoDL3xHEPr-N2!y>*c| z`ux=5eZP%cSKy>6tCkrm8O?4UF_q5u6{CcD}>JFH<|6P}VEW7k@O3g+SO&n6~ z^?`!q2zfwiHl7{ZL1vZTciwxlCP8>Qo+kbT&K_(Qs0dcXe<1VlU$LRU$Q{-BlCHhY zWYTTh2Ggw?d}O*pd}{X6tQ!iJmD6;Tt=Kh3HP<^RKl!u{fM(aX6)fE8kS^CS`LZ6_cp$(qWK?|#rZRATo%8+t)2 zS8+GA8zvYBR|~?qmzlQYY%Gr8kKS~#+Esq%AJV2yjTL#R?vm-&yf@(R0~Qmpyz zhrZrFt|{=?FX&Q!5S>9PFgp;aQGoc2qVEd<&ngY~NL+>e9MrlTD#4J~x6P=n<3CG_ zq$SYprYWl0J%tr}os1(HmPJHZM~cO#_Rlw(cQF1zfilR9V2OwUBW%{Ux*HDj@ZySg zJ9cKnFLna?_*|@SVoa?(xuz%gmFjRvpO?%|zHDSu(E{%e`*u+iE)CT{UWo4%#L}H` zX_T@P_ql5VHqZFi_Cq8`OohlLUcc)@UGtj-C8K(%XmUH4v)eK@Kpg=AS~n>5M|Ww2U; zsMJPXO0a6;GldKn?ZI3+B=arCgb@K&!s& zIk(`I+g3%T^4}@4?VOW{0WPlAY93n;)vjI)bzNw`}Z zfsWU@_^$)5iVp!G)8ZSY2+E?p!+-s5fLnc`OG{YQ$>m7H9)wXkr|=iM89(~j$ryW| z!He;*&pTcP;qT$c-jbuPFostjm-*nS;`#ZopQkEMfvRhh;@&-z>USmAAYb@ELlVpn zPO1E@J!<~y3|E3M;pKyMS-f7_J}#4h8f7ECz{BpvF9UOwXRK_Meo@2wTd_%D)A_DR z{xKZ}=L8FxEAdI4O&q+Ri+=#wSv}LvAIopvdkc{tAsCAVt0Q>SNR;og<;R;Nlhy+W zv1{VPMaY_eL!CB|o+BlZX?Q?U+SmCE(s4zZl$LVXkV!_fRAtksLnk;uqgjTM7M&kX zQI3|evKg*mYgB&pmu$EjwKHc!Jmf!8~*rGups?*cmFt7{WdlI13h`ddo z4%sD|*(!97TyqwLa4MOD0u4-=qd>*9NY|Koq+5>n{gq17kS3kZfk>617LOl50|u0K z=JyqV=LN7ebN4AexM{x+bgmaq*9(9)na-h~p3EB(gT#`xUx7u+2Q0ybB1e>)5MSX; z+FXcPsTbU-u)i|h9ecEK6B|j}*BIeZfjGgloiwSN5&>H{hq)86>m6I3N|+}{x{UyC zSXb|l>KeN|q(HhGDMb)mDa2(MFy*1%rB%Sq*v!>$Tjq`{3aF5wPEkMS>{a%}?!owx zR~kf@$q>WVO^u%cH|XNM@iWY5Uhm&}KdGcT?L0^!@O8c&dNL(qt%!`S4{Y%@CIjJl z$puaIBO6Z^2gODJ+z{#`aqy;!3>RVFDG;3Mr7~(%jRaoDlq?A60-*`;^K?zYvFw+N z7>@-q;Pm86K8ya5@Qk#Ym^wvrV8HO%AZcu{|7f;{(!QU1_nW(W>6q%s8mY)A_@&y_ zin!xs{bR6*Re)y3deBdro(IpG$Z{Cclv&-AmDso1Sa0Ko}}&nA2p43;m+6^e4a zFPFrvgAZB9aY8ry@SUIZ7{XGrokEasnt%&>{t~wmw?vPu!1($|I2E?a&xwW2zW6=S z#L?Kz`u%?*Cd1@pLFo{^YLhbvU}wO)>bFmn!Aouv?oFiH#h7j}9WexPnd0F)4DkN0 zO)+e5OmWpJ{lt``>outabQX~GSlPEA{s>&DP%F^Pgh2Gt@N?cQ2zml>Vx_9h!jda8 zVq$HzFSiYDQBZ-Ic1yQJvGBA@1<8T4jgF+L`wqb4Zv`Z zFjgPdNzS`iYha|+1OG4XAgsPT}#)rkS3hT`s5ptApgeXq_Seb<5G;WnPjtIQm0s#1wTy&PNYElHO^YhgpylJ)ByT{B3rsmw6q=FN@w`gj(VF@zG0xuaiUpy zgZY7W>-s0c)zl%P5^-UL&e?e@@ir^s(TvDnAHpcC@k&d?Y0D7CtBMaGMDyM?v5YU9 z<4YH6LfWcXcPHKtBME`B$`mX85@~#zq!0Eg2Ui?ij`1HW)gl%pma0JxFY!1s5JN6$ zOSC?^6&?E_CqUy>Q$_7re&C4lxoNk&^kI9__NZJcO>a&0AS;6kbwG)k71?a7F`2>- z7EPd!hdo= z>njtGWvGP#t!bv8{DZ?wFY}WPy18DWUKDR2KW&LEg~SSvwAEL}8uHQs@cb+QQHRUk z*uKSH8p{WN;=cbuQo>$TAst!cUTzwfBL?ozKjJa@-0IiOv*2jqq+=OLml z`%`&_u)or@C<*X!ZM2}IntbS)badd&I##^mmKMJWpz2hs?9@qwF%4Odbno%MTZwN* zE$jP&(xq|^+3m`U+}E`=^2r32>DzKF*&{mJK(&U{(D?N8ENW;Iy)D@rXvdq8`jhsZ z@H~s%A=2G&>ws9|OO14r zcZo&R(2T(C(TNQ323Ua){SkAySHzhjIp&mN9R#nn^w00FdR2&fvHNt*T#}4{WcyQ~ zXx)ZxGqX%w*A__U%XDsMKc&FC)Ke_L5@e}CXnGmzBzGv-B)&fhuPDb?D zW5KI^c!{bnEGKPX?ioPedu=ec)L+P4yRSW-(SX%NoDzlTxaPx)=3>1U5yd1dwQkm8 z@R@5-_W8hDs`@pf3EoZZY9k3~A14-shTqS8q_(HGG0XM5xHJhipU&q|U5{m0UWh)E z1T|<}J}v$Apvo5_62ak6OFB|m>RoA+HD}PB3hr9@+r`DH-6jQKTw9UyM2C7gnkrOn zqC%G9-Lb5r7!uadbwXH=dihmAMUJx}( z4XKg=4IDd zj(v~HGDmbEw%s1#?pt9TXb{cYyF=Hk%bT*VC#v?8Ih}Zd9rk<2x<6O1&~+(TQ5J=| z#tk(qR0=<%4T0^XN(Krf+y~t^bApX2?)4M8l?}=X7bBH`%eg5NTCSl|{7u3r(F#8D zzphnsugUv~V>BkF%fpDlF&lNkyHHb$-h3_7CfTp1onun{<#(&T28TaQWP9(4DH#8C zJSR8*wKD`#2HtcKpv1%jqY=ZC9zTz$*MZB9mValp>vNI7weknvFQ05i& z@_wuUtya(!9zQrKI{ZXj^SK4|+;o3)_%_y{v~q1@wm{aJ3WjbaRE|{QAUM)mgbN1_ zGE-V0oT#@we=Fa28IRn7c$E~mvec+4rF zRd&^_79x_ch7MsdKk=syy7CfJygSN(O(=KXC`8-FR>A`9E~}b*0g<`=+s{=AppFy? zV&l9z-SFp(8%k*D=JTmdM0h8+O+$WE^jX|}!autyDD*bVC~%UrR*Z`Iu|CWgokA>#wxqQ@ z@m2#4F)H;M5UV?1l>ze-n3Y^~2GjE^zo%b8&Trj zX0q?mCggb7VO5S_^3~G-Z4zI!6AWiqvxQuIuopD+ePiB^Gr9}KIriAVDJw`FAKYH5 z$Y|Bv7_%&;TSoBRre5Q`<`!hYqwI`8;I>?)vCE@ZoQ5{z^T@t zGB{Jv=@*Sb7b-W;Yk!v(=8y2SA4Z-X!f^byNDW5Z0P?laI!&$odt z5a@Mk5F%3&_kkr1LWE|d`g7GGNRz*Q4%q|HlNs}!16ZiP@1rD`&ghswpBf^bV@SXD z_m#leYR-7N;Ka2|pz1H0uU*2XoA(z)U!-U}R-TUj8Yw`^A<`_5bjN``YtZl%s-IL6 zeuTi1R%2psAXO^l7k&^@PF2mTdz^3n)*-NbvFSg{&u2Wg{*SDtt%C+?vezS#R~{p( z(@oYPpnqFQMWwVfwLf}vn&r>YBB4h)>B5my#uefG_k_mu!8wd@>xJZghgl)yJfi+# zQEA5~-C0WPBaojSoq(}c#|Fp!4|Q}wNQpCk2|KJ0iJQlUFatIJiMyaF)pKu){+ML? zI5V?|vzD6e$7~~nN5?z?RCPk%4$(2dW`fgPVoL!$o$(>UN-9#dIv%f zl5@$9k!P0Zyi0?Az3>yHAk4DST%H+x15P78*H+1;X(Bcv)>-S|ZjBF4$P{LFtpDHuF_aZWl?MP`DJ*e>6=XBM;i%!4@xU;d5ta zpyx!nF|8(|TeEU}XMF;2jFKk5L?Ce?1hur@Axfl78KQSW=8Jqvgs;@uSQ$L9lnA3s+5J=V093o% zI@(e|9Tw=3Px5JwVtX+x@cOgm?6uw~&mb-~b}t)y@EJSzZjIj`x}9PQRI=$aq69HQBtL4GLD+nTZ#Rs0@*) z{6K5A*IUcgr4V%8`lU=l-$ONQdZqoLhA}u?i1Q6JVx0ubi}LXPb8-kc+ju z)+}+FgV7>OeEMVQ_?(#rg3r)MSJtswuI_kI)ZiXcAjp2+qI|UgKHFwV(ND>{WHSU4 z6Xgt;bev63tQ2$GMI^wE5lLoE4%q47Csy=$Wwf91nOib+JJz2F0uLjr5SCO=I8JlB zvz_r&^u@?Z{zMM7H2WE>Yb)H2`}MTdZy4Pj%){Lwu*=xp^*H?QvHG1B*b^asz5xj5 zKM=tI)WrFRm)Tr$rs;X~)v|9-mZMO`$Qvd>0aA1CF6=+nfB+vI1IWlDOjz#*R&7)4V#{k>zu5UvA5{Mf(bX?BlXxqiiM;b3IWH)Z_S8;eS}YZ`P6I z;IixM>gu{u#ykqr8Qq(W2$skxMhpBcohS|QHag&2z10!Yq{9@Y;aznpC(FE#yp66v zouA073&t`)%zr9F8C$}_VjoaQkdm(!jfO!Mx--2h6W8;_Yg&n5t5wuxWWb?B5_Pt> zT5$WQ0%>Mo)w&_48y|p^B-Hz3C}PF0tsFG&vBG|bRo(CDWsC8HHe%W$2bJq%`LnVW-Ew1;drSQsIOD8%J{J#oM=UM%wCbc+*F#?mKQg{~%4K1E+iZu!1EN*-5b{ zdq{Chy?v?(BK<4m3L+|AW6W3LkVcu|N>eg|A8$zEuxiyy$flm$icN67Q=yrkpOXP* zSSjZ*9EYKGuJ7f+Y zjsh3iWym=kZiKLby$sqh984U@{=MDqLH?H9fD3mX-zT}|iBapNh{DTysUtnxW^p!V`nTDzygbdk;UHMymjB_ois|Jw1E+}hmI-YI8r<* z<|cYbDqVQpFtD=Zw^^6aPBTuaygE-6sZ`C29!)*D12q)Ubj8yntl^X9QyO|-7ErZl z!7V415%cfem+M1avGkNfKD+ja?Zl5)1Za`RcW-b~4_MO`j}Z7h1Y7|nqFR*5S6DUX z2UPIr(L(i~%6)LO93uS~TNNQ=8w-18$3;G>hWzV0oV>Ig`Y^H{!%a&aJ1pmwvnYcM4awU?90R zhDb(ooA(ISeOcEpz?KZfS|5-3Xmg>5`0c|5U+#~Y;kA2Tu&c{0ndG=$M;lb!QBOZF zB2;iBE7M*E+D9~&;YHyfD2-SBRlRLDGw(auFV@5@5*r&g8M#NN$c?AbbpGadSmJ+f zRsZ1cWLgQ_>b3&~H`+aXowyVPBTI$T$n>#$X~zn=%){mMRP#!PkPu0_hrE#DptOc> zWYq<{>j8@WLQL-QN1s%4-MKTNP#XPy*Kg#OPkwB%HR0s(5q260lSW#vMzm?LV8V8P zcQ|^F0;xLz$v+T&DW>saTRe#sH#Gb^e>g%5B28T~MVs7DC~KLFH(|Ldpo3uty81Dm zT-)NcTkJkKi|KR60zHPIPJ6GLWfhXp{-Kf$7Se6lw~CspU5%Y)$svqnA^PU7DKZ^- zTWrsHX6ou5nL>n}Joc$0-W3i0+?^wZ)3OW z8O1zJ@Nl{_Sj5tH9DZLI#@VCwO7R$q^zw}x`?T!`WoYMzgSVOeRN1-|@H(ReRbn;8 z?eRfoz7{|!g+n8oM$oFa(JxHwmTMuNXwaQ4thSj@SVss%F%Kpo3ib@?@2A%A@fX=T z8fDYpYvXA|E1Xe@+%{-wTcpJ@uZ-H&5pb5A&FJkil!+1z2d6VoMWg)UWun18eG?7_ zqkI{oV_s2h{5U6=*G)u+$7YLS?&NyvVAr+{y0!s=!XO7mi};mE+ecR~K7mO}2T8Gc zByF}zfiBk$DIp1$t z2uyDxXVV=*aAteEGd8|jGH`1ugwCn&(JkIrEb~u3HJqlz+1Frx=&&N7)x}wZNbg%} ztFc!w_9x6vWEBL8(%pAh>{jf~3L~5$-D9wHaZIsCgD@c(K!w^Cg)`%m_;DloQSqi) zZdbc&E(=u1`kV%j?nQt?4c)_OX=RZoF9|FNgvr&V)WlcgJ35jqSN|L|p@o|fvb8s1 zF`+u@VqED{z5{!?F;@@mVmH~fYDPDF+cTzsxs%QZ96ZDWa1n!iLv3eLZHnrh^!U>F z4NM%STO9Yhq`fpT1;Vq20cSc&l3O`IuusIf)^ZkK7*rikrUXPnR3^dp4rD))e*FjK zD^|!7HRKScbA$A$6p>X6u8(?u3e0aXa#)x5J_W{jk@FW~0f;?zdu&4-y&Z%es$;p( znWETxkY&`xoxlOW#7cPdyJUC2FjF=Ux<%lA06BfK31UPvFS|tSTP6Skfvj?3kQi1@q@WQT=k^DIDq-l_r%8*b zdDl@HL4%31#5YyAtu z1W{uH*qI~n-K4HQsiJou?dAWey!{mX)2YN#>Yf8568?5qYfqMeK3x+(prFkk!dPq4 zufJ|HsCR-&E?hF>Szn0A1ocDNQ*sw@(SX=&5cMdHKxJ7^Oucb(*SDhHWLk`(3|O>> z$pWHpi0r|XSvp3T&((6acU+sUo$(Vvo4J%DjxCio5e7}$IJP0(QPeBFHy=d>-piSzi(9Vv zQ>h46xo1}|s?Iuo%r{wS?mv`ds%>(xf-rG?i}wuOpOI9>ap6RJAfS;F{C3wb?@qH==x0^r->tT z_t8+bh;%mNeh?iG20|mQz`XOcA7Y=qZK%r*sYpn%KMk`arUmkYpY}`ScSbE45BC$5 z!&Z7%fq$jyjCtChQ~M$+Q5y0qMs6=86@qZN*)cff+Y^sp2Nj-4c{y9G6YHu?yngWt z3aIhe;lNW*7LININyquzv}jzsB)Xow8XVz!=~Q*EYFn45Hu1oaR*to3SOeji&yE3gOi z`6HrN5LN>0n)xSD*k7iAY(Yz^58b=+Yif8g8X*o|Z$W}oGz1j=5za!Vw*@^*x@;*3q3G}X+gD;bBs?UO!f9JMlWWsLXPF%u^U>8i+q@X<(DkdnPnbUL+4CRI2=Z70 zz7B3I(bTENvbDrsN?5s6W_bLb6rg9p|kPm9qF^I)dvp>phTU$(3MB#*stPB;k7guB{Aw4 zC{&d-G4}NlGA1tkJ!l{PH$gwwUH|{=A}83Z z1!jx3b0=@lqU6&sq=*&eCN}apWWS1gCt9T=95 QZiorw&PpQM)~y_2dHJ4qa8sb zXA;_;hRd48gUk6N6c(1{+r+0SZNUKV+U`$x{CPl&@!BTd>rGq4KmHp7WVNtc*&-A3 zuz?1lxs~j!pSA^4`J4MJJarAnvn}(*JIzW}M`yk&T?X|JUev3BA}S5BO|pprK|EH$ z=o-=K%m)L_?X-GMF{0{IQdR`UKkjIX_xi4(N`Zw9oXvgUKC*H=}Z=8etROX->xRY*+ed z=VX84J=La@!;ajG{RGIkjob^;`319@ai2O9P}eTSv){=(f{Ja_1%wN|+%wj~ZJgr1 z_J?knvph@YQz(WKQ3Ezu#cQmT=*z$um}2anX4_`ah$idh`v}+uj`0ac*QZK*kvR9M zr7oaid^NjM#lw|SEO+viNEV6(9ruRFP?OYi8-6RerWF{QXfTMsIl$(zvSsh%o@8tf z-;n&Uk$(zM{f< z)yC-<8_k*qhY{VHt)!SA6=Hg{S{;2JadOib*whcQL0`2-EdTPHf&5KlDX*VI%m?44 zdyc6 z{E2`fuVkjS4x^c^s9f)B#2sZ6EntL)D7RCdtW*nvT_|StcYYG`O^&54% z$IL<{B8i)Bpd*p{hGPvlm%dYvHk+u)Nb*IXRrEax5L#WZcvT!4tER(rvkQ+USx*Ci z9RzwrS|~0z10HykabF{fY_K?*%(IZUp%)=3Q{$~esoQ?mig1jm4u)d_ZC9HiWU;Q$ z)>ctW#*xvCK{02e`dH1ka}Mie>!dIdpAozR3VnqyCOeXqBZo9Db(7G7(s;bE+0BIo z8>#QAA5+B3sn;$Jobijgv--v_RmEzQ020Ur4p@;G$Ty65N8ka_@Rr zmL(xH@Bx%e8xV>?ZI#@*Cl+C}x4 z+kyBvAjAtxFxO#s4DI|_=gL|JPHlyKd@NzQ35>QsP-Nwq`AXYKXMRUd5rA`GYJk&S zGT^7xGnYJ=pjX`B@bx{N>cC;TltVtSkA1rvA<|JbSgysIdIouNQXDuH_;de~H^GPe*-*{8|D0uhbgq zm;lr*LFiivZ6yFUt^8r)j4y0__UgdL1G!Z@aS1g((cFHU+wSd0$;u+hgcdtxMXTDf z`9NK%V1R5GQ4TT0M^D@UD;3~H0J0Kx#~`CaHW|y??Q*cFAp5?YMI)2FGF{h_>B+Gz zc1YZ;$@5ZJVQzWUSnp=t{`v;SOJDHsx`&0 ze*x#|H6MJ$s3;>hpdQE&uCR1RbGX$J7_hoEM!46dfWJsVPx1>x;zJq_+Y5O^=uCV* z5BsbL=YrDqCTI8v6b11^WVU_dQA72FJp~_=y}6FSzAwjZn?R^{d%gyt5S23<%tcU^ zF3`pP0q@PMO&0$1F3Q|{)A|`f_$C;eLQZxFc%Y0iZF6Zw=$hv%5v1HtP@fyUe2zWQRQm3O~RH-S#@wo1r_?`f3a zi%NOaCjU8aju~lbVZXeLmgvJzZwU2!=S3ukc;ZPwoffGyp+w z0%nkz=#oQ4a}!$gY@=Z)hDfy51??aIgl-R*I2hgF5hJ&9TOpRsMbs|=ozOtPm z$(`NWfs6~RUv?1WsExijjDp57TItJ-PUBm<iN0CKl@N`b>I!YjVfMq~mE(`I@#Pposy^Sn8U`uSyAIWsU1}1jjJh_a;-3u16 zb_Yj%7$C6?c1LK*Sk$&JwmL#y;fiXNuY`l^tV2(PEZ?w|fbS6J2Ri4yZPnOzN3r>z zYbQ#9srFkY))W^hRknCn$6cX8aa=S4mJ_;EPcnHl86G9g%3lJ6L#}$tfR7Hgws+rx zXat@5gRAK?R@uYAEPMckK-0KB&z}Z{@i*q_)ZwsDvjgb5IS< z(!Xq?Z~%!K;J1t>0Me?Lj8AzN)Soz>P6_Vo1gDk8GiRU1*@s#_fu%Bhr2+q9bXdNv z70=SoVKFUZ+sm^`Q5mWh9(V2Of%zFyshst_W%Gm@_83TAMM@n`6w(F!G`PM{Y!i06 zoES)(l(7MZqzWWCDTveWYffss{6-!uj!f7CQCEWmi3z1ht^S35#_7^tT8}-Ct{LC z;_HtbU0`{l`lKq(Q{>rCSaGWvZp2ili#9h_H$vI3V>No{we_+OSzBTe_o)0}hYWZE zn4F(6%PSLKR1*7LFD2-Um-ueyBM}}Lu=IPn2JccUU;xoXHU6z0EU&tF_+xeQ)H>se zsbJouZ|RVhZ{V0eHIr!R>KeFbj%__VLg!Yl?UWt-G`b|N@LU-G6@;ZY)Z!|e5;^`q zxYjS>UUtP$LvpOF1j{~MESEt&9tt!i#!fjqUwR=er#|Zv#>O6Esq9VBAMZV*xKTuhos3yCx_OQRtPFe+0X zT$tqn3dj99T(uQ?jQ1;Kfo!QBHMkdne22oKX7dEYxz%iQTU0Jp3y9Q6!~cZNfRV!U zjKTsQk*tpVl@oC9P;h%==CZ4am~C#ASzFDemk|16E}gwikG~Mv?i*ORE;6Q4R)T|b zk5j=omDe@JIb88S_C;^dHsZ*_ZJrH zmW{YK;OV)xPUWE1jjq%}C3b5E+XxeU@Fn>zg&X|lVn?Bv+ErXtuwS%1tfHig%r_VD z3c3SLXdFBfsjP>R4)d1yXC=X)(FXb#XIsoN_Z*vWH3*N6YkM%g)mc*R2nSv__KkqP zH9|!Ti_sZ=+k7|ddrJs(Gg}QovZr|#bidDL5q_lRZ+`^T&ZnC~%f*}Ni?i#D$_o_M ze0k7@1Vn*0YNd1()x9tD{5e!R<$eMhhzF^W_OT6-71Qc(avFh(m@c_$eJINL!uDl# z58KZbDSnbafq!%M2!lY>1uV9EO$^ zcDjSna$+-tM>1)XbR9~;Q_V|4sU6?J_EsC!8^2W`sUsj!R6tDw# z%O`n7T7iz=l>T`bCt{e-Dx?yuz)IgSsb6!)zGbbV;)iQ*OPc=_eRg*NPUaB(jTqe- z|I2K3RbL>>kT5P%SS$A73+L3RNbH_jt}O{w?|)y%9$P3^lZB218LOSUXsQl&>@rkr z1cY_(Iv=uU`(umHXxZl4)?;NSq*T{yH4>XS_5zo-xcatP>w}3vbSnPs7BC9RYrUU_ z^z`uNFPH(kTS0gCCKhk|#6NFknPj;kufatG${iM_w0UP4jJ3NJi2QUZRc|`bjUpY{ z^7JBf7i2aSgTfr6#|9qUC)*HQBw!X0gum0IBdmuqDcFr7}7Grvk5_%mzG5b z6)@}fGCf=`U~O}h_oaaGeaQv8XFo?o*#q3IQyz9loTwNg4X_a?PawKym0_vFHh4(~ zTb9J>6}o|#mdWWW(0c@xL0pFnGyN{u7%-&pqH6b);y|Fb&3Uam{ALAq{eHXtAA5 z!UCBRwhU6FP_1^~rI_qXihjOs90%$_ItH0f;B(}@euVOyS)^-(KL?ZIjrXhmkZnil z8Zvb|es&X28itF4x9(^wS)Cyv%hAY5LCq1wdOjJG)8W#o=StQm0(Pre;AJows9sIL=Gs7l?WfBM;P)jhSx6wp>5pF4|QQCj#jiRDWbT_H=JowllY1( z$zpLqWdJ4eGLD*I8f#Ts*16@8P$<~_l&$KvrKI)`jc*wM%XI$eG({eJnERqO4|%0eO9t!CSnWzFcc*Nf)De+FYc7DeHPJw&H(IqUCUX%O4LXI%P7RnOG4oua!E)H zi-(sDWI5qVZ^S(_CUM+AohEw-$9GoBs2}dY-MsS8pU>=x3_iY=?rGn?p8Lz}jZPYY zisD^6rZ(Hu{K>aYKv2a5;lFHX8{eRc1Hv{%UPA&;|JEVoNed3VjJ11#TlSC)J8ES` zWxc#sbN@E@*OrcJGM>>nN4P5H*wcVW%2^f=4_6JxV|NH(Bbz}d#g|^y+532S;@faI zS+M;EinPKo#9ytYp7ZV4_<0nRP{X0@d02$2!_`V8zP$_Dv1)!w{^D4Lw*|OtX1_vY zdHyXF_xB7HdUinPwU8Q*GU=E+Qd zs-XoY{P-(3uUfM9aFBN4BB20s*=$?^hkHqIW_Vtko@R%v5?hz)&;&zXN+1w4rkv1K zWH`~}U%V~nD(GE;Rxh@FK{ZPVB_WDn=WJaL?w+a7{{SDz@Z0>Iqy1ECQC45r2HOFC zo<-@vtPo>YDorU{g{+}YhJLnU^Xtesnlz*ZPHRvaO*Yc54R@U%W5RV$?GM0owx@XN z>8j=kjB%=gPdo!4YuP3r4`fB^olyQHA_`2Rj%_lN;MF}dVevv!3k~%(8k9B%qm-11;W@ z4hh8O^h1yLCjB`6>%z(0i(6&%Lmn756m#K6NEv&{XNJ~NSbx@t@s?&muw80jpl+|V z@M?0%6!uHkEo}+^Rj56^;9@%kJD4VFw<8@-Pv6TH7xhvs*=E{(`luA*(25N^Mr&z* zvovl-4arDACE5E6R~wh-Q7LVkf0V1Ay$t$VW#qZP{tP0MJFOhbyl&1|t`&g=b{mj9 zl4f-QL|7`C{L2LGjxLIp;hLJ}poU>%L~RkLXJb=reBH*jKhc{Dc?~svKG1J?cmAG0 z8Ex?t#Z2HQKQBIp2bfb}ZHdJ0)*NE%V;gEtDX2}Gqm5zGEHa2FfHm}x+6i^`ZTfVi?2 zM6SQu*i0%qk0Qm{KlOzDSLSg!e(r}%5Jd`~zblBJB>82&Fq<<K^lf(QlyR#wqrAZoJ_UUrm!|Dxjb{PO2xHAPq+JXWGguK~JS;+9!1!dm^)fE&HB5R8i@ zhP>9w5R`YmzQf;6h5;7f8jx=Ux_xYwTQ)7E1UZw%`Xhlb;SLc~93hLo@{7rvt=P7( z)j+TS5CjMuSsh3$4%Zl0u`SA!Lr{^rl5u2Z(gngaachq`O8J+73_0jW0vKtY*KJde5<``F~{?h%cXY=GHM@y1=EXf=Qwz}GA zc1OuywG9)Ll;34IJ5%KpI#K+ne8)$)p(i)<=9`ep-lQPwT*iP+I+YG|l83`M=~gUB zPyvb`2C^TeYi#;tQhJ`7T@V{;nPD|?dR~rYMGHcdHgXX;iK5?U_}q+*;6)KNefE~v zRcQqCSU)wdY19*kPR|>_>O;+(~By z+?gV*H^VElP3H=MMKlC?WCto&T6SQfRDS+zqm1*9|4QUWJGGJn_vAXmqx@z*klDsd z>XJ`~p`-U3#!PT2PE*;CYy`(-ju&nMmqo~h7(^O@CNCTS@O03h&kX4(_uYe1fJCkIx-d`0)W?iWg|wbp%}OE+B+>EcQea(PRXNttIM>p@DD! z;gW{wz|m7u{)D|Il!{kxOpnyb*eBR0Um934wm}wkDi(dsxqq!nSW z5g7no{SMr>ii=wC->T#MC6!juk2zbQ`kNYC2wWX;>n@z;`u~}istC?C5 zsCqJg-ASmR^jkY9dOunE5e)8?)M-Q*7X-C0QW5^WlN--wFgvA3T)%}drF}V&nf(7A@S*~( zA2b}o=jM;8-I1WWR3DK;63Q`?9|ITIC8S(hy;?T(ypYbajB$5}IpWJD5(Y0=Li zOFh^>7Z-O)%qk}QsD`x@M?tOf7Df?8_L5O(>u%R@yLNwg*vrmXRU-@{d7{;K28N4|K)gE|h$v9UM!;+NGJnLev0evszn(Sv@1snBr0$J6 zOfbd&H#Sk ztf8l9W-Z^t&hbuxYE@U{_M{!~j$*M@9kknqxurHeNx(F$b!-Lz=rU6W9giCIc!J_I z)mls-NWUOl<^l;?HZtJUk=O(e5tD1Bt{$58NuCB@!UvpAGYHAWU=66F*pO_R$}~1c zqaRwSQ#vI6p7KN0?b1YfAink?tKIqS5*lNbBlG?V`u_xvt@a1by7`~FszFaR-fknX z1_`N=Qyu&6tZaY~&U91+8Zzhk01Dm6 zqL~#S$^__d_T7q+FOiEJsM(vYGOhIuZtscOK1TAN8MC*>4?+-Rn>vAIrF~k8EUh3e z|8s#Pg7~CmB%H|=a}X|kjS3ee#&)-0E;q3U?dVd{;(FPCQe3Y~KdHC=0b27u(}4}D zGl!Gx1tc%A{Vq}i6;exp$BT7f5U|QylFChn{>;K!jKT-T8p&u)W<7}R;LgOiJ8Wna za26@lYY3o8hYmWhj?H`_=GR~MdG{ilawfYQU`wakl;H{3V+#+m_L+jRT%@jPMWCf# zwaFSH6z&VIor95>q4}oY2Y>so!g%$_M4lb_#hx+zxkkH>jr<_eLO>FwyFhiBZ z{cw#eSgjTv9W_A1KW@lI5d;TG6jCc$dCR=?iD-6>nWYYUF@U5oWcwLWUXs;a|Dcte zpa>4@TGAxrqyVkk-sgyU7;YnsOSs2D_JI&1;-9M(7%FS~Rpo8wU6>O>(2|(zV*gFA zP_gab73i8RF3%hlzW=K~pp<&C_c2|mtdvIpNP&{*xIqJ7<#N(0Q19&e{)3O_Z`e(T zq|=k82k8kfd;>yX+K01Q4fq*=qO0q8Co9MCw~9QuJv@uQ01i#JGCsWt>RgjI+6YS+ zWTT!t`HGu+B&np;+^+FAH>?7XzL?9^L>J2!=Ugd@azL6BA)V1F6=3Bx6jontRh&rd^1V z;=16KM;gWvBEewVpD4fBNtF{k+Yf^^)v_QNIC&ilN-sd`rXu3 z3I>!;%Bbv1M+*3>8knisVEX|*gPqVpchEZ@x$b=m@!YCzCs$aC5(P?kD zk1asU0k?c@jM?sPV#}w0lcGmLL&{0RO<_;X1oUsVD#^ONBs~1-U@hIz#||G?eqqtU zgP|rD$Bowa;!&eU=2|wTyTVT5sPencKEr%(GQDv?>RYI+{V8MgLVugg^J@smkWbY8 z=!4wLnoERytL5xHM|kPyyc!22_y^U!z8=X3BY$It%vN?EnIDz4x%VSjx~M_Q*3=k*l?9 zU>&S%<33^g=Y{Czt=IklrPe0VP2ryQKNWIJ0b8zyt+8J0?2SeWm(?*~ab4;%DA1l9 z;Y0w3vKu{vFK5uDLQGg1N>tlmlIdGjGYB2T@B4QFHf?G3^Oil}$_A$vA|ZjcUS!&n z%8P3^4qLgxjU_sR`-o_X?4KSEgTJ2ctGw*iAB#^15HJD5%l=nS%c?Y%ko*Ij_+k+X zlSOHx@lM;eiCuQOf;}`79CXQh3nm^lsVgWWBU$h`|DZT)+%g9{>Z-gD_Qv~x>hv8S zuSe#MP(-DKBd;f3-Nrx2iSLIbrnS-3sQC?#H=Uvn!f2dO(L0g|(ZdUfG4gRcM za=;*;dMIARIm8H(1>kJ7bI2VdCfbXNTM}oJJ(v?VUyc}}W2Q^o!u#(Wckz8&0IU*i z>sA|#Xsl1k%Rfyl^W&FF>Kl%@4rR)RQ??}kqQ2ccX;xs-#|@8G{X z5~O{gb-t5vGXdjUy>sU9;`vj1bWSXjmHBlFJK+mTl(ki|`%>6cen7g#NK0gU1#qKO zL)CdUr%I#b)Xsl`J)Xf$ zhf+Oit|4a*vG9~Vt#g9pd!pQL6O|Jnym7qnO7>IA*!$)Ph?J*@GZthRBPY?mktC!E z>1df}DHL6hB-8-;VRqe`M#M?>{0yeS5Ua*paA_?jcAUaaNEGqiT+RJgqv7fLY4^jF zS$Gi&3ZJ2@?DDZk4a1^eO6@4CGpC~q{a;$BGW&_X>dqsJyifvtTk6$GmzeKhWvuag zYIG$Dq!Q>FTUT>%SBvltF+DeYs$zs!J|yha-W5?!Amhpsn!`Mvv$E#0jX;rN1)35C zKVN;%FK>U?O5&P|trq0fm#m`6^qW{xLi&XTml&0JsS1LG11y!%^Wg#t{)FbT?;hzE&#xLaWf zLgs%pRpSIqq@^M)1RZ~N1Hl|eHBS!VnTipcW`aNk%!qU*^s}K0aU+=-m;>deo?T|j$LV~9-6u~?X7VtFk zkY@iEeRieCRb-*SR~NCKppvb_JJmQ8kh_Eu(uUUKtZ?m?>W!S~{b&zGmATOf&MHs+ z%qe$JZQd|#p4Ocl?DvVLldp8b9^3*Crl7|5(z2}sT)k@^cHM$VEcGlM?CftpD;-@w zVvP~58ToL}Op3NjQ03in4`zMb?&I0L<;Zv&M3Kpgw^57ur4U3Joq@@l%US%gB+-mz zqdXbzl}0<=J@I>6iLw08srGa)I12ysJqA_?6#*ow?+(Ac_DXN^VCcWzMpVzLNY`xn z{h_5UqTDQFDNdHgK5qL%a0y#4)$WE`!G0&_ToeH1 zZ}0AkUd@oHvhfHO7n8}}8S}UjL=Qz{EDgVo(hF5NEH{V^w;aI0j!8D z?3}fAQie4R6k~b?HmJ>ErBDTfL8oe9h|ZJ5i*sEta1e$o zXN(}1F!~?cc*C#C^*qVii(4j>UBZ-7NpzGKpL7A?r}F(PxyOJ9`64GD@`)uAIfm}5J?A5h@wxCYzRyR=gG_tZQ-%T} zfLHAv0#j)$$s)!imq|5+4IK0(4la5%Z6on5Ikk0^TCXE#Y2a0YYQ0b&bOhtSw|)gfn7z z8^cEaW}>=;&pM!_zjIx@44zxMXzLV8wf-X6AMW&`tGt>?*!LH({2i~xKeWeZvU!I$ zRh#BU)SHk0hI}Jtt<(6i;t>hWt-0NgQ-|HSi%5T@=OI^TK;`9z!JQG6Bt5*9IvMF4 z@=lc0aC3QRRBvH+sGrqaYqM>&kCmUGYZoVScK$D-R|Z1H%k0b}Fl`z#Y0%oTDiv7` z4njr!U2{3kmWot>8Cb74{Zu7#n&pBV8P(wRu`}FAO{PqvX z45LR?)86|_lxVK3?{Eq{EL5QF0V~+Ma?V4*CJGm{X}}n3v$O0$0E(`lE{wG+SpivX zwqF6rXdw=HHv9w^j#NZg`hQMtHiTC*T{1(d$J6 zJdJU^;jCU@A&9MgO$_QKuNK-7EZm&NbSm_27jnqM`PaPDNhpU4ZUcONp;Ely6gkf! zPpjPs@F*vb+(ZSy%uG!S8S4DNtDW?LUsOK!8Aboj0~|Qj3&E{Qz2ys|Q64$ot>i9W zX7A^y3u~ZN+b*IL9RKMAN>{h}ZIyR$UH`4+{2|DRpp=8o5x@aY!*{Zq1<6pS(|=ux zWY;qOod`t05!1$7dxPzzM{$~&(ch?&4zb>^?y`$Wm81W4#pzzybRO86+dpGl2zGJY z?lCW2r8eDI+J-jelqUY+WkD8|KAlI1DteafQL?$|P^=+tw^amkz3ObJ&^@@d>o<(l z$z$MR67ah{3iKQUEe<5>=0b@Nf_0M4yw`U7>f1DjK#CJ7;&rfbl8wT^0Z!n`szlpY9>=XUQnsnQD~S(a!frfNq-M z>DCavS~PE6x85M)x8eN*@6&p;B)=n%Qvjs(?j$jBa|_@d!2G>0m+T6|2u;VJlzxGn zuFZkKcX%L(rs4UTK1=_}t3y05wVk13RqVv&&cpQHKc_3i28L33KheTD z3XxQ$XIqw2qiMV@K`)V=oCv3{M2#G+4Y9~2rwq&8D1QhVO1L3!SPqyQq&i6~lHo*- z`b*5_Sh8=OBHZn#-0UMmX3hb}){V1^D~S8BTBe~-I!pnqKU`LAdBsgX?H`NExu@Fn zSUhm=xN<=s2rq2G|8z>RdRTi_vyw(-EBC{B4r|2*Dgh0F=gKhFqU*Jb(&qEG1Vn-z zeQHz=3N<8}762_DM?)7!NVZgaNfO`|f3iIGZy9p~DSrKTxU^&jQY1W+1+aIz8G{lr zzGjHicza}fO;)~nVB!BE`MIvPr*uDJ0n%C-=R{FIR$#>#5sz~n0ep0-Wo|+g>Y)YQ z0H!jNlFSmkQYxQNHFxO0V5;>6jv=UpLJxnKm7aM=UqL3&xLfYRP`hgu%J<_r?!|Utz~CeY6E18bAT~=t6 z4WJY9ylL2IL^WtG|3K4H=*-Oq?4{a9;b?it$sUMvs$-ANLVycDgd|VCIlaMQBD`7z zE=Y?C%CwmL$sEei{Z+0#E+k)*(?%z;!u2*3cCLzeP6x(??_@96h+E#PxAFy1Fdv%Q zs1>1g`U>VkkPW()Z-T!NlnIx{f$!S`-6DB}|2*ol?;c?Y9`_455tq6kyLUjK-T$(p zxZ~B%`^)F_(bbzdDzy+nbzE7c!;J&ZCh-Y+Y7MrqQ-q;4)=v%w4l1=JK-6w)<)S#C z&La$M#FuNu=0@nVLp{2b`#Em1ew||0yrPs@fa%+G9s?^nw28b6L9p@k6!ZzeZQucW z+i%0l*ra|_C>RMq3~+3Q9OUHIf}jw_No2*Hr#)n7@BrE?V`-Y9pU!qgTBg_!GA#~^ zg+kIpz?iOG>LbEAxaW`NA84P+vS)Ix-R>_0-|=xYod(&CyF3B~SI@BQ0OCNb!Oe3H#SC-MZwcD4Dn328qV zX~~4c6}o9&#lt}ucH{IT9PRc8FS13LnVLJZM>Gh=6%Gfhcp{7Q=q6tG6N<_81yQ?g z8HB5bZ?7)n9PCYGgls~y!%-0^@6T8vb7y_VisrDc0@WJ^07W1H3TXxeB0TOJMg!1Z zMr*Zr1s82g6uXxbXBOnI$2qNq+n^J|pdGv6$+^8@OAR5ppfq9J_b7IMxvqxD29RXD zb@J#uAJg9@a@8dIaTB8E%Jv1{+hkLKE!kg~p-0rqVdHvsrjw zuGoSBO}nN)hu1D%;$Jx)SQl zyKFi!B3X@Po)Z~HG?t^{Ha;K)n#w+>5z^k}!?zJ&K9tQ}?1aWJQf)rQ>52IWfX@wJ zu$%OyAD*JiAN&MKN!t67d&o6nuX=k}0a%XOqE-{CPxL*nP?p$`xP0dQFunkL5psIY zQiw%+t~NbY+o%gDy~~6G|53>m1a3Hhs{rXsL{88H81j{ zZp7M<9*>PVlWNcmO9oo~M{d4&xu#SBnpy`d0s%d3>www&1HD1UbLnrXrP);s(cu#G*XnL$RyC{j)$#nKTmG6TO9Ub zr2w%VMKYMTEMC}!Jt>ucmvVFLRI#-YCgf*AZ|QGBweRJQmtM2N=+Mt45tq(gwCni- zPpPn`*a41pZYqnDf{wj{>K+hkyx?u|N$nWNS6}%kG60k!PKS6#6)&KUFULUudt{=< zU{9u9Iwx(3%|3rYFYe59xSIRFxyTWTsFxZ2JKS%?>pg|ky+G{PbP{cE_kVVUT5fu= z^#rTXN5dL`=h!E@1zj@iZkeqw#Pgj4Ix;+gaVN`^m0v89#h2`;z-8C;G(s`4Rok?C zv-;&mvOkhE?-aZ<6Q3Bz2?7|mxzTNRMx{?;Tw`Uqfq^_f7Gz|SC;{JdIl_%GxANIE zlrW&y5iL*rKx7U zA$gD};T*$AF^$TMhX^4(x~M5O&Xxt!@swz>N3|BegffZn}k%qqUQ zjBV~e^=>PgWelt`j;?=B{rx+CfIjcV%J#;;Y>3bVj3R}9U=^$j_`W+GfQS$V^=gX^ zS_AwQv(Z&klrr#KC{?h->8$&`I!XcXULVjp*P!-FwB7XHS-Z^rjVho-0Np}fxRxoK zDuVr{5WNNEfSYgJU@{Bl4PG^?kJ|83PxDD61nazB*ytGmnlTuy7|2|chxRGM+f9hn zDpw4ux{?nk!cRH7dNPZh^sACZW<0WV#zKIrcN%VfUhR+!8W>@dX$V^9FvW7>Sy89< z@P-`~6pN$iZ6e}ri{@nxv42%#Hy{e7;At48k=K)+t{Vy4s<*4X=2!vcNixbuz51Vy zU8|5aoXrAwv7Wv^H%R&FrTr~|plQb&i?Ui3wIIjx#~pWu5By^yfR7_R3kYCy9WV4- z<9!o!0}b=de!sa=J=cD6b+aiuKM_R6t$2m(z7a#yUsNI3HR1p=9yq$4DmPF&|&_p^b{I26=18#2-w>C}oqBB4&!_Aa^5kpXrOXp(O zAhB{kM^&oVy->DO5m4`q zo-)!egJeIq7sg{Z&VLwCd8EPMTCvTTSVpX5Eue z6=P+@9o7Z>>V)X|ul@-gqChr|=j@`^aA8jG*QUysrD%KEiXLZE~>tNd3{G4`pK#7cgv!F&ad) zUSoFtnF)l{$~ZGzC1Rg0e%+CluyxEKbtCejEDjmiu-d~M#8PZj1MXw^rl8y|x$q5l zslM`~2J~(-sP*MX8bc^hy_C3>Xl7{Vr|c-%Y&EKn07_HAyxQTXJ~qtiJ%$FXfLTKC zszW@@L97ZEW^?~RQ2R{-9ZrKL?%I$U^`aee9vbv=UiW!Tl8Z~FU6>8Z7gtx`gYKW7 z=h%R?=_t-zwB8G}N@eIy;<7vHpgPH zu}J?G`NcD`SV^`5-e!4z3B*tVI0B{*jSz*USfRem5=E5&I;4F@if0D5(QYIsEubP@^FAon=2%K1)RLkLj8-3 z$0NQI^)wF}cRh?ju)#mK2r~RL8#L>39_g80ke0>WnZ`YNyvRu2X;#$fj$s)@y2tv| zRbVR#QJ=j(*3!Fq2rzj$@_ZutK$mBX%sZX4x{E5JY#ivMMFI-(j^U%aa@kYG*EpF) z9^F~Lh04EC__^aZ>|d$u#s3`pB@8{6uhX!UA}pLD!oD26FVV7WR?>Y(NuY)@bdMZo zG^h_N8~w`R2(sP11e##GQ9{y+XNT!#w_0=|2t!nxZ2T00US~MS?X<|oxPT*at=oiO zM}!ZNprecyO35O)F<{ul$3Ik^)@CkJ6!X-z&b}0S_QEKxrQ>g5r>XRnh8E{Clp#Z5 z$L3pAf)rA^1jFW&k;ryPV)i*BJGv#rI60ec8ls8>8CZ8e7dCmAgD{3lh>=lzn9uy? zAZ9rd)}?W`@QG-)liWa!VL6)&8?LOeBPLOiVGMwt-AJLzLZCy(h}5xfl&x;Oz9KyP zoYW3sm}WRAibZ8KWN&DcVf&mzXM+hm(s3r#W0!RO;uM=}%QThX6|7*`6V5>qd!X*6LcCAjmfc&Oa;S8K6U|GS(hQP;Gc6_=EoZwNu2f?U;$36D0> z)}+wyjY@Qx0~rIk>7pu)fz@=`xP427L}b!Xm+DULf?zed8*eeti&=-*TtOtl*bw>cmxuB7++*$oI#w>qjGS&(t!M$_YMfAjwHgYUcDZIQ=#D> z>Uqy~(RaqSN$FMEsbw6}giEnhde&xKi>WVb(!Qh_Wy%O{=T4k)|RZEMP!bao!y_fsoE}3!chKiu?YIG)8rg?9IOF3-bLrDqVa`gmOElS z=u^`VRyrDV^yA70TRV61ivD8VXYvnf$ljR`kbd!flb2~(?-1*+S()*BF zVkOZ`BCw;cc22t@|8fLwIppCH)OHDKFzp*~Zy2?fIr=^FlVuA8Iv}8#cM^r83_oCn zSc$4$2RBPHlTdw+OJ=P$#q0?L0^vy^>IFso3WpGTZ$9*yw1JsqW#>KR!yB;N&U)Xz z0H@x~1nXD_cRf+1zeMo&vl_3MzeEbhSEfZXoaSZZ4jV0T7GW!!vdFJW$_d~?!}@!O zV0Qf511`YNL$0#`KXMu#s9TH%(!x41k)5>{RR3H^XAsNs zUU5&2WweMsxf8bie5CLW|mO@Z;*`#NSz7VYVkm*A+kE<>AwR5F=Eu$hl z`3)QpSnEpr3052XR~n%oZbVT5BWqz-`U}j})=7NistR9C_Z#*g=sg9!e-n`vGd178vF)b+iNS|{Dr}RHYy|(UrRhfD?Q5xwb`y781nal@N!T?u3x?JZe zCttZeGVyFnNYk@q1|7KvqVn~+T#@=qT~c@SxDnJb$7GDS71`>}vl zNkjX9kFFnUi_BJP&fFt2HEFkqEA$Gi{&ARdrXLG#DBcBMoK-JR|5}~YgocnZE z5i1ZzhX_Es)Vu;dK859a$Mf!?j2BMmn@ep*{h9c)pwK~}*316L^E~&fRBj1u*L4I^ zZE~n0ceO(X<~xr4%b#&`F!O=QBPV&kDh$mxjSk zORI@upkuh~nU*#yytjs&7@xI%ytz4 z4ro-KM1Eq}XV0!hBOn_+lwzj+QFwA_ZO;lFgdh$Nc8{=;ae^{pGzMip zwRh*-2C0G#gJBL7a{x5;yu<3YS-q4uXEO!Pt$Vy-f{pT&JY|UGA`|g0Qt;m#3htUb zMUpl)^L$xFkE_6v+}VKi=t0N9?$RaNVbRdyR;0-%_z${r51BZwXUc9Mv~VQ8ok|(K zn-Fc6<5MpCDHFCxkkoTz!aJnik&5aEY;zq*qu=mO4HBRQyBwsEk(#w_eiVnAhLjd5 zt6ZWMCFvo;o7_>{|F>Tu5&S~ayZkr&30iv)f;9? zg>XhKkjX-vHuHpq6p1en6>@sm#J`C1aQEJC3ZbZ{9+koOX2qu}u@ijB?8+K!4AYX= z??~2e)qx#hBTR=pq*ph4WLTbBrrqSRuU`=vtlNbm@n0m#^efD(IX3VahMc`tKRm8H z1$`RUBv$IP z&L~s<{}J4ewGpq2>S*R;X#7`?F*`;U6<2N16Efe@PaJRVKz5O^pd{qena3y_#F zNrzKutRXYxeK)axZEFO{0a}3{CB+oWQ!-o-`05$aCh|MN3a}pbcBpDM_o#raFH4_P z1!0vPe60sMB_eF*U+CqBeN&->yudmMD4|TEnOd)&NJp!x)av?H zKWUJz8ycG{yc9xcle;4+LztC>Z>8G2KM4Xl!4?pG9v}74?Ao>;9b14ONjW^qF*XQJ3eae~jfL;4igyfUK`o=~NDY(3U$JaDM3>sjt#J zHiITxA&mnJw4jfC>^Ps1>?Z=aVQ<+i_K0`JU0~lqix1K#;Iw|KMlY2>{H5*_o?mA3 zC4CQdLc7ab$G+f~Tws$IsyPCWd23B#)2PotSIr%{i37o%9vxA8Dz8Vh%2lLvkhajJ zU=pDO8N#RYMdJ4}t8^)TdoxzOeJ&rxNE<6h9D@qRa2E;b$Deg7Kuuf_XRoW|MEdf< zN+`S{DYdTIe4{p%K8XUv2uqQP3YXQOz7$!mW}CtV+FwO&fy@wuH$$nPK3XH~O$IGK zJ>TG2Sld`#c6BQrYcPrYGGj+DpuEQp-4KV3RrDpeH2^wzrdoG}_NY={ZSB21uH&kr zB5A@l**p>Bk8=74s&2{+-6 z*~YfS)Pj9@j3JD(b1h(!*urHi`Ww|Ttx-{=i?+-cLS4Tfuf%rNl!|k5PIDG4br_hW zrgClwVlvyc-4ytwOwABY`@ zuSmCXR=0AmL+!Lv2?aUH(IObeBb98vyR?0!dvsF--q3S&xpg_Q;irH*In14uS7mFd zuA|q3^5E9(=wn$L8)#@+mS;0G%?|CxF?R!W`Uqj$r40*p9Ihjt0{5{Mfbjx%)K{Z^ zEinx8B=YWIHIAyf@-#0Rb!~NSeA~=1k z@C!c2rJq$$+V2|mWDrDIJZeyk2rr5j1;3W{k1X=zDjE%h@n9b5g zN&I}Uy>z;F_O&&{3<2-01uo#l5Uvh?Tix?0NoNxf`=z{pKw%p-%V);bn%XUbfZH(iDN!lg<3m{m6V)g= zJ&-MicnekV!z9%`A*bmL&K|G8Uw23t%UF<&(yi|V$YuixwpJ`L!XqQ`hF{714zEBt zRbPfvdOq|nzPDySlgkk;9V+Hrpwy?$K%6W#)+2-#86|_i(cFrZ2+={JQnt%GB6Q3# zAV1B|aAS$CyJTS+C!$5JioT_o&Vru9ZvG2`Ee4{kN=PCTp)+59LP^L)!6*V6ztXk5 zx|87haYhTcj*;k4Y;mtg=w7vJ*!m_5WB|L2MP;ZEQLza)pY2Xg^nq2nty`V z@clxpdPns?Q&HJwr`FQs6$}%9h-ax-SgX1AXf|p?3+>M8SD7WT4&Th7wlKis=xp&t z2f~GQj8m z6v>Wrh;odI=gZF`--_WV6ZzXnT^5+7Z(j=lcA(q^8vVd9;@N+M(983v$KetZE1!lJ zuflqJ?L2uBIXOquO)E8=VSq9~9elZnqm9}g) z!=MBaP<~3wVEC|@vNHbtHZC6=GS+(LGBGejeko*1M>WsXI^l!rBBs0`e<}QO^!Z>m zvbW6b`3*rVi?e0y_veAl(E(w7&~x6EY+oxpfGAtXH--o1wcCtW7PS8oM`ha&OuzaFFXLa5qU3a~dWf-H0UzTW-MTd7+O{cK`fCO-=M8^5UctaU0 zcT(2M$`+CzF-69Y`q6nH5+QIUopS17?XNr<5xhDgmIV_RC#h^9$Vr3{yP@B{B1jcW z!nj%;Lip(hE~HAS5)H-15?P}vG5811d=WO=_|^Zg_WMpV*VfOw1Cby<`IvU_D&~-G zaf-h5UYg%-1+ssU;y+$W1v>}ns47nlzPnZ%-rz`XfMlTH5>uTfj`78R!N~(qy>z+5 zBMR#WVy|Y{%vY>MPMzo&G(57$AX%v?Riad?=i=1|XVQstC5M_a6TxkKjXZHAtJbHO zyatTZU;GwS+o8dG=nUh%`cf$7Wt)3RV(`JTh1?lJSifL}pXJo6BwN4-_v%{)JP0dA zozH}R2rRl;grfw@LYHax$v{oox=ZGI$1O+}v@m<3A)^Jq7PX}wNoq&^&hw4!1mUuj_=G0< zdfn2(Vw!84q-{^ed>-TkpID4*tvaiWH&=evJ4F|tG= zr3K8agEx+A0XVhhilS77c&esUfAE)Kr&YWl>Bvo%*0>00-3(pqd|8Kwg<3uKIWqzg zbCbR^q!yxbv0O_2b575TmD(P)t1H7(xGF#W?Aa7P$$6B%wOaVYSQ>Mv#<2{4jb7Bp z(dJWaWVUTup2Z0Lvm)*Sm1phdho9XP?{^i+EYLld!O}!|aC6Jk%-+F# zgYuW}zb~ul%61s3z88p+XZT%Tw=}ThYMB=sFVPJ7(~m4SA-_*qn4~An8N73CCdUU~ z)_uEl0}UwwEz|dv2nV@FPsW!`b<=B!|8Y2fN3@VUwe0B=4?aBk{7|%VH6nDV(>5$Q zc?|0m4Re7TB^Ou2WvGr{uVs!lc)5M$N(Zq4i2Rz;Z{oc1r0C{|2T1lhgcWBwrcz%} zi93>HU!uYLN&*pte&-K;czTww`(<71g zkQvDnDk4J~W9e^lkih{`m$}r|FDKiZNc%s6UIES`V&FFU*m8fGRm^*^b&H(uT5w5F zq2({EfD>VPG?t8J%b7$GN3Y<98$VFufknjjdnr9O&Lf3e)TlN3GhA!SMxz^=+Kj2a znpu(hBJHSE^mI0u^EbedpL1)s&i5U&-Lp9#NfTiY&qh?uq1WX&oMXdlaaN}=J{FyL ziO7~*TWjRBj-=zxGoTbdYHgzV6LdDMc9CjRK^Qmz9~ju%(VVK}*A))F`@F(H8zomV zW)(7n{H+QrjFP5TwX28<YXaDqTS-BYiE_eubcNj?yiv0>0 zG9QHfv=hxtXW5>C3f&szLb~^IuK`vXt&Xm_R=@lHOPSQ?lZvy(kLuJp0#d zc2va^jOg3U7>l)ZBKAYn9*sq5YXs#__~HM&0;0ehYYR;!Vc9Bd?Cu@S(+5LiK0G4( zTWN&EP^(~I`!mJ%AnEncx&dXS{H8e&(G}vIh8N=+W#RoZzFAw|5gb3vxH+3Hw;m?UhO97@{Gab?nB#q;HS7xJCL8U92WOj`QO<4@lRBQ=cg$qn^21CoO`?I( zP&TP8!8l{B^p5w?MK4-yo9G4F>5LPtc(>$l`~jqQcWt7AMi{p7_`3QoZ?I)dh1e)C zVfK_J?DxHC7~Gd4X|xW0 zL_G=~vC(Nt(~OU;^3Bv@@*S3kh8L zcN-=Xhz2*kHj8!m`e4OGb)^VTOzToXr2GpO({8;_%jVMKGIbCjzXK?&Ha$W~UK~Tx zkuCuh0by{zm9W=GMthP52ywstNOI=-EWNfrQ^r~@l*!M|6!*#=9u)D~RdJo0uanP* z1!c_!r0{Xr0h=6Zdn}o?T?dgZ-faT@=iTa08SmkGJb3o_`zm~u2F>@ng6XT2G$hrcUxI-PU zs2cA_-iegkD8YKy$;suR-PEz&CBaoa<`{#5g$wzuX*m@4?R@ww7a@#1)W{ zVKIRQ4iTV*V>nM{>7R?$P$s5zW%W!tVwPDShz7kc zV*1{)rT6y@HY1b`lNvWFPK7Pw%joH14}$_N#!toZKd-IAMu7^${+mM%n1FyB8-EuH zGB>QFI-Q&;Rh{Z1ptI^^gv&cVxHA-r>g*+ztTSjtLU)+e!)O1IY=v87Y_=&QSU#el z*%vfOwe48fAla7(4${pkc899PG_Y(dmSb01X4m6)GIt;rdqH(-z`2`o; zCOOPJ7ygX=qed)bF0C=8`zv@?jOk#?Sb6S60fKar*iuV-5rVA-0s9rYDCs6vzAdpj zI4%e)&yLdX#sc?XXhQHAR~??d3aWQ?VuS}&$zVGk-b7?N&2o?tG-`1I*9~fmQGnOP zcqi|B`kyqH9%?03;L5-oSqo@fBqu?>F;HnEF511_{J(ApcTfQ(Wl;z~QugoO4i0(F zbiVWwDxIN`6+m5X*pNm**tFtviFm;teSS4>=$fp2;g0p;bkjVSuU^8_8Xe0&KyQL* zE$T1sf;LMgwr!J-G!(j>^?!4hf3jUr)jeQ53kwS-RoUM{>rKVbhK|4n2oojmVJP*H z6zIENun>1vq86p_3lE=r2Ops~H7ubz`S$sKFYn>g%MeIs);QKjl1;0z1amVg;(5^q z2eNF!iP!Y7G&YzA@nW&XG6e_;chWW+JVgd?QXbzY=cGSHEE?8xIEG&4hLF$RwDYSS zVf>by)FwGXqheMN&XC=pb^406%U^8v=WOfC#6VNVEJc-Q8%Y#$IxU;1vg?(Y@S_?6 zCU!mDyzDmb1hyz`c(L zJEPpGb0#Q~t5Ak!DdMD*hd{wYr#ePjZCkLw`A6QzKiv( z;rpL3jxH%XO%rsA1^4cm{@(qLYN&Y3QqU4K5XQzBn1JH1)|e;b%Z#h6^L{gjqQliP zjqRNlzHZJ2P={~te7{w^dS8$Wj9p}4*{!cp8qi4=MNS($zL#yRtY$~?2S zISz`9dQ@S>DDazoJ;&~l|9sIgLI8AEjFX0^vOz}RBkDnakv%B{l= zlQ&f>FvnNxS*SJE;4n(7Bm-gPTE`wt--Ajswg#C9rAuMy&4>cUYVZxgqNzn6fE-f# z?;M%Ill7Czw`WOCOr&6^dP??RI(vrQ>KZF-YGKR&e_Mh7#R29PpWG`;fy$V%75}Il zVw(pXxuARKW$5Y|d@D?`sq48*D$~NFHVrA4tYO^>R%kP4-F;!+z#s4_SDP_RJ6g|^ zOL$=ZKfo9xKh(&i;);h`Bh+1#gPD2%+e>?#HB-RCeY>`S$`DMWao{JOO0B}p@aQxY z@U3YcsnwlySe|$F8T!s2ru?eO_S63Y9tFg? z%%@=g>+G=$0RCieV)&F*8VJpBhwG&6&G^R;Y<+s_oU#1bqGXMBrGFDflHs<)^nzXLUA`7sb)_+-r+DhRnp9a>;8OBJx!`o((nuH$&W@<)K|o*lym{Gy6==mgMJseOfIg#V-!Lc< zeJ(<4`ZaJjJIyN>RIRlwuDfXl97FVUtd#bFYnwI)n2bYi%?Tmi7;YTCz=Bted4?$| zaPVyV8-h`r>87yZ;nXb`=nSYiNWJ+2KdH|XJWG_su(&9~qn$3+C7H1{4EuQef{>zF z5O@jwp{UB3zwP?m65x!d;!*mi9j)^D@bDn7igVxT%X^L7mBQ4lDoP>IRz;j}Xi~dF&w|PkdN7b)HD1Z)m+yn8a_)$w z{keWWV-^um+^~o5ONKC4UZudfCsZ@p%SUWJ6#m_Dcq4i9^~nra6ygn$TdLbvC~|$D zJ=nmsMK|@cWww)O2zUi4?8t3{f3OeO(QwF#OjMDXPf(F2RQvMQmu{H?942qwQ8yOfHovY-dIAF zRKS!IH$aSiR8bHap%Me&)p_VU9+6) z$L5r*v(uDi%tA>uj(B|wT-X&sj6@zIK>el0OkD05@QyTXy&^~vZKSeVbVn~84Of!1 zd`{TlY(5UTp9@E`qaD~+Dx=LdI?jcX2T?z z_4c)+!mi2-kcsH;FuIFC?6b)nX;Hx)(ui!Mr~P-(S-}Nz$YrUI9jHsdEi@#`sztw2 zFQIjo!k7}Hohm3xPYOzq3D3nW!&H|d^nEWXfa!CUxD8j5;$mlb`B7p(F3BWB?AeC( zE{7n-&-uDx7j7eaSOwESZm;PXw?~BOEMP=L6D)fTAM) zmvHg)AE-DP(H2sxVZZ)@Kq_`C;OY5@CWXT{#ESlDT;#+3Sg*sDU2n_Q+pM$1+)`&M z11$w63CEhyWe|V-0!T3sX9jN0C z+w#dI5n4~lpCY1(%KgGG3VpHVRAn-;2J#8Nc&_}hlRz*k)ieRtmjG{tMoHn(NNDB^ z&bYOkzv#MRIJ@Kz!Tu)MlBE(6g;ShR578Z5g5S~X+Wh%&1Pf5%#1`mK<%7GO8A(m# zsGv+gLOQv|D99!!v>4=xHwuc2#gO+HuXkWM7K}YzCWl9(92nV?Z-^qP#7A5es_uUl z*WPdtj7Sq?U?N^e5C?b9+mhwA3bFU!TV`WuAc*z-yD;G)A;d4-F_)fqOcy^2)#Km< zP%Ooxr+3k!ZcKt!l&{wRhhQvp*yJ@^E*`nIurLSyypa#lyTXB&+#${8NTuys zrdu?S@o7l=M@DH4(Yc=Mxxo_jV0Ztvx~|)J4-9p)gUBMaLjFv?V|MB}`;&3}&*K>IuAO(afWE7d$UTYU_TxoMWs1M^xI_v-2!C)hyZ z_aIq4Qw5$qt>A(?8T`;cUFwzu5|J(@8)4^M3MQK24)_DQu4X~do3a^8Pu|PS z+Au5b^6s*+dXb1pr5L7Xz3N7?dNIqt`JkB^{t9%?1r^2;YmtPj&;JYrXwIwgn#Ra) z>NF-Zu~a_Ju~hM^D;QghOLUJe0&~QL1zFfT<1umgvD3y-r}sI&)W^g8b&BY&GKKf= zD+B*+w0xntI<#Bv{fW;~-3tFct!6WD3MNFJ=gxJyFC*6_L>(KwLlg5qZUgDC9d1O7 zrUBYo0}vCPzYyQ^vhj4}BWhtus%hpFIhN?+c3%*weiEh{-k?q^fs$%r1Zg|O?JUJ^ z;>9S`n4gM|^jlRW%9d+WTqcg53b;u-*W7>fKWnXcM?zSGRUob11BzBJ2hdiWX50zb z8Z{9IWwjsLZWuJpHtS`H$GeCF&Jj!_FslZ6C<9Mk3v)=5rspF7C%!d5`ksHETK=s7 zf@TvUbe?TZlY%sb+Ac8ROx<~Cjo-xR6WOPMn+Ym}%0^|w%ysy_ftxD|Z=T2C!3eSG zt??7g#&bagu?4jM?w)Y`aDzHHZ7TT=)Be92uASicD8!4ZdD$mkt@(6kYU!(K>Jks0uY_AoA32B)TNBNBbVv$T6+?YGTjX&;EXOv0}RIy)W1b{l!8Ns8yH0 z$W@z#&k##984^ZyZ~8ZM`|ltwngsxmP{mkBRUNwv&k@A86>|kU7iS*EKuj#ZqM9u8 z5ORq4Fz@n~<{vmK@KT~@@GufZ1v9d#-1Bnb`=V!iBJv%&LJkjZA!HE%8jP-VsUJwC z@e7{P-IS5ocm}VGRyKvGZBnsQJ{-5G&m8D^l( zwS3Ar+BfU6^Z;`~653h`M^(DvIUK)Az-?tmc*jq2w<|yff2U%=(e3dvY4760kV7bL z>CkmS&qipx8;wPT0K|NUN*9)SU3$mZ`qw-o+cv=r(dV-BayJc^Ws&2d>y*bG*>nCq z$mgbZYJdilZf1?_OG(sTiu zZRNQF*ppLlK#0fy|FvyymQ)W>RR~8;t|TWZMl-e)Uximcf2u5IYW&WpAGLRbTP=t3 z$`!^nzte|FJGDqB<#?R%O|c@NW(Tu3Py{ZizI99 zkB*r6GmQxm)os%rbi$cuCkEu5dotCQ4ve!`_$z))da9vxHMbqW>nsK6X}3G`0V=a-&Cf+bD47TEZvC%d;UPbY&+UX6PsHhPn6E&I3|jMW&*kRL1Y%3!%4lce9d!SBsGLXu>nSd^!YDtZ(%|USaf)!s zDYin=!hSNn9^;NhzxfZ)KYlY5*^fN2B-N-gp1iKLeNDy5L$S48mQ6`7!EEZdT9t7p zZ_yJ$uolT6)1;u`4JC%!ey)U@jp8^x6LG-EpcPyDBc70@pl6Q?FN|T?h9{3zSLC$- zpY#JM?|IhXcXG7W@eyp8WL;Q0tc5B?Z+4qB@$ribT zp?ko1cUJ|WVIy%Uw#6tZPS5jJ9Y%?CI?!GuN-YJQ52>H>CEjLalj-nSsqX#TS7EVT7 zkVfO1tO|%UWxipBG9rw10$t^v3EmV_8ZX9&v0yR_Ym@x3N)3kk!l5jZF_z4MD&N;% z_{b)+!|R(s(CNf<%K&~zM89r44cgOYu#o;#0T6P%&qOmn&roX6P-4F#`ryhfZ#?qz z>I#Mel5lSf=56AGB+;iAZyTgjWcIT~teiKQm1T=$ZX|4%&KfQZF)QX57N8~q*vFC5GkJRsj?m(y=sM>H_>8_k(0UjxK^1~Kp|%)9!%Q@_7q2zp$Uk$`2!APt@X zg1T0yUHz@Z3ckju@6~+ZosE(J%zKrjPPr4FqLFH7>A?*QHK$%?2IhPK6t+&;BY8%s z5-d7h;#XyG*<8m_MKju(wvM$iK=}wO&_w2D4V%VU8V@ zTZe}h1^S+n!adx2@S?pBU!IMVI167kHRkSvN#<~^kGLxsd0rRE647wWpaM+6t?LRyNVO9jBF>!%O_~tE!5DiO53NZ_d+7^i&rREWi2_hWPKz^RGX^RI~8;gjQ4sU%9lU z^Ut7i_n06YmKwAz2Ird7`Y$I zqaZFVsMZ}~w|J>Z9N-;c?N=^I%_OmIA-J7NP?_QiL2|hLuf*4g*(cSrl4&>0d(n@B zxn-8u_nSs$rk7Je;CU||_s`(G6TGe2de3_nQu&;Nf0A>v)YZ$MC19{$x(<2#x6NSg z8D#lHpK!I3lRszuemi*p4>ftH>3Cz5`f*kDkt*;0E9NG-Tv7hv_&zC+?bO3Vh&CrG<_ z49fp^HQQYRhCXEX)SB;+o;H``MqXireh?aS-%*(@WEcbdsFX21C1wBl*+Djwr z6ev14adTd5nCmZ4dW*N1OkQ+I4OfA~(}b`R0bfMHgf?En0&Cj*Vc}N7#&jnxhsn{& z?r9@`+LwC&CVtE4=d{CTD~4~ZUTD)Lx&_kd%>euJ&}Q1PrmgtL9jJwvEEZ2^EB4`( z`wq}6K@c8Vyo2oj$Nky^R)Wz!CPY=DvcXr9#YKlp%cY#G^-w+$a{~6h8e9D1j+UZp zDY}^$>70!EJX|@R^;7%_&`ybhEe@|s`Oycr%!J~5W>>eQF6;w;pzgfINVuZ&B*^G< zy>0}t=mx!RAZ11>#;XjSLlarW;8}<_ajlXCnb!S{APlRX?S%F8%!JFF#zB`px-$lR zOuA3b(stnzV_!CAE-49*^*Pxr(UFspVTK`b{NrC=P~jCuKo;xXm;mVBpQwPMpDtS5 z9%Y(7AA)$=^~SawZWI6&__R>X<&#Y-$Ap&jj25&@bfm1c zdcfrC1!3UwFQVWZmWB+2)ST^-D6T-Zs7r)|AVmG6&BB}=MiQX?1$z70V7}yes~|$1 z=2076Af=W@i{fNrdmA8o$-cY#j`a6eOT>(t)Lh|IMl)>SgrZ)3JaSUdF)@TsY!ikO z`{(bIjFb#~jI1Jr+oF{2;>29_3(Arv!Z)@gtKHJYUf8LvYYZ>rn>gi^K=ymJbH63F z1sSOUQ193+K$8xW*2DNZCb2l$r1fJUAp$I?;1vKexV^!pf|w*^Br)mKaF=xGkpv>U zfCilwX)gN$k{fOAp1c@Xr)vx^b;#aP(G2FlmgV zIed}|4dPGjMtc99*WABv26WHNm?}$LV~Q*hj8a;%Rhd9W^)@kti93?Cy-_+__iL8{ z;^EbyWlVnau^NpLiGCJ~VCJ^;1PlA#nwRGEc*K1pBKDI3=Km+Y;sv=&55Hp0B2#a>GZ`XVBA``M9AG907zuQYxwQ1 zcfT8cM=1i)YA`Hb z78_iH?!KheZh@6k0%CEGb=mL{2PNNu{E6aoo^buM#8MM zY{IfbR7a5$UD03j8^sIHK%#l@{p`_fQS$GSe zHImr%VY2nx-78LM5r|^2ueC~adP3m`-C0hJQ!=kx$A?gZRNvlb;htoUJZT^aO8hzxLRX)TiY0_#pd7Ch(AhekyrAuE&$Rf z-0az#m%gE-kM7S+%@salk(azFX3)p>`Em3l-*}aBp4BP9jmZ9w(?`X!X#)wgqc%?1+5+E#y_Up_YW z-DRCM1uHfc>_TG^_VjC-jRzCH3}FGTk@=95MLd1ZQp8u0dER+q^A6FBP^Kl1_g2@d zZ%bW&;IINoxPr;^;E5VBmiGd=;(h9N-{a9|hrjFX$OPnbpHQPO0A<=_`C5h|o z=a|w=wif7JLu{D294`J~xxqMu5ZOtYFm`>>2a8%S3DJ^hjV7cbAsEdnA4TRbJAp>y zYy-@2F$FcmicUqX)zJ9a6v;hx#NGotiUm%0dqAQW-d}`N1&Gq}wJ?X(80H!Piw_*tp#Ia)Zl%x^xQ&D+$fiNLX|IyAPXvWCz1hcdp!Xhu(&JnQ_R z$WV4pOxC8c%=18`tW{lc@^Ihn9naeP)Twm0;Aum|F@1eo5jdkm&&x!r1@K;E)#vFj z6Ls9~M~ocg->=e$`3YjfzM1S+d+yvdw%4sMHiKLI*Eu!-x$T_})L?WD!bvx>y5uFztnjrkC{1HCw!@7-R7gTO9+!AriDEazY`Acj4vW{jtC|n2tje5dltF# z3JRL$?R7%iGE-myxeO>WMHqBY$${UL9ZG-eeSl8{3Oa)XAq*Lo_HQ_|L5(LI48PU)nwM7(En` zvlCcs+`7TNzX|Qis~i?#o-{J#?c(Z~L$#1Cm(F^aqprfDfuYL6{QQhz6tMf!orIJ1 zU#CxlCnEJwT(mB96G1J!=Mm_zWKm?5lo~(t_ZqU;nstr}!9!EX_9{GXQNRO9=HgtX z@K_y1T~NT9|6Qp&_nO8b$oRt#oBkR0IWY`Xzc(a*4>u;+mGKf-L7Lga=t9dY{rZ0R zj(}mquo|R+_dRuwQo2NU7hf$+v37ve{5tG`Pp=L{LNemLIz#Da}GlrXzn@c)DcGC3nK@L6{RoFb;eZ!p_31SD{;9 z>5X;R7J!4kH1h0nd~{0=N&QvW5t-xiyVgsAQR~GAYykT>J=f)v7%#8SpQO)Qtap)x11(Ntpq#(V0+i-y1@f;Iv({N?J!pUD{BGRd^xN6ohw7%~w+wOUz;Y5qGf}5|c*{ zsZo0IcHejhaG|`Zvf|-!D}36D2mJlWf|@c3>YRYp45__(Q3&Ta`KNXR5C=J#@<@KQ zM{y3YAa*nBz3E1})6coxIGDoxJ)C|3?nXQD)FWjgUD)~ zur4pm$f~~zo`p2`Lnp186i3LsT~>?kDymNYoT}<9O!bY(=FPSotQ5~dO8j=Kdn0$~ zjn9D{*m_KWSd@aI=uS@r5aEC_evB-z_NrgvhPRep)o`8E>axf8c+uGdD#T#swC5d8 zaU**5Df0{rk}bN@E!%3yvhRuUC+`b=ZKBO*& z%0J=TTy4?vi2r zsQe~sI@R(sv++G>cnW>r{*>>IDhlVA&WEETn44~_*9KZ9sm-!mp*&G?7^0~8c!dBt z05(a5yowzM4!&G9S>;#R0o5t_tXB4|&i0G+*L*f>Im6j) z-!s8|+0hBQ(;qkdJR3#F#)xC12oJT$kUr($(g+05sPcdAFA(F1g_jVwLY}tYlT_as zXGU>OY(tlrvAMQW;VP_L!@MUW=ooxE1_p*nEh=PbQb$4Vk>P+l9e0038<^FPu(4?q zqC)>Qm=cd`Ze!Rk&`x9wxw}K1LsNek(sv=H@Z%W;dRv0pD-pbA;;)n$tXHLdWla8X zJB#6cKgbhT?t2D}YAgl`!!M>N54aGGf;sR+0XHrvd5mVL;1)J}eyzFe3v{x(NJ7*< z#aVNhGv7na>m7%ho#HdTgl>5F-^ zQU#(O*!m6uPZ7+iAo<5M_~Tu5$xXNE5Yu}!OJ)Dw-o;bDx!8f&@*cpTW|p06=gv7d z>!ZLhu?=DOt5WgVMe=36G60X)R6&r5O5W-^%1@imReO>WvBvY7Ro0gGPp{p6`u(#7Fx@HlTtuzZEB<++3JC61| z4ggI+vcF8Gi38GjRF!;@6Is3HeK|qw(ppERb7#9V|KKmDcmxnOYgiYpOiWzys@}$% zL4$#dDMbqX)6Bauk1Kryzfi8;d84KGOA831SWvN^)N7fP1bVF~_1W>?COn~9Ctf#R z^HJp7`nBP^%!jQ#q5HaorJwnhQ^y>+OuSk0H-2h(+7A$rY>;;t|DTSruopegTkG@3 z2_n$rW##5~FW0hB}^G zu^2$+^h>OzayW0oegG8zaZmo^v-OCNO z;n3&Sf*pODG02~D^K>2`z+QTC)LuRRa9Y#vb<$>x5^-yD<(@UTGC6uDNdlowdp$hM zNmMbMU1P*Zm(w?fVppf!`~4gVp?`1a()xuwJ_-PhC56H*lE^JEH>_ddZb-@A8)^$E zn3my@&kt_?h!noQEsFWlSk$x|>>0sh^ROEv_*tFFLl#+*aNFX4 zjt!k%Zz`LP_p@<X~B()A-VDjeD;>g9K9e;90XDj9k z4AdBc(dpo`$dR#aT%ITHCrcP?>p-Qnn{THfG@s5sBlpf)iD|Z6sTqndD&*jjH7N56w-(_L2pgZBRX@$`MT_up+tQ!PaOMwv&@!h}Ff488Dd~Sj|6A4Q>4c%Y;u0 z*@4TJ?|}%U3z8Sc-$-`#Nv&3VMe&+iQ+rV8}$To&cOKoFE@_X zgbykx4C5;F3;uE{@8Ex0O37?t=f)2?cZs0=A*uV7-thIALrHycj-U)5eyGNxz)gcP znNFr#xztD^8V^|HrH1y2QEyvJZ7!4ZI@~QpY(*q_dd?i367To7ja7(PE=`=o^M;a% zce{Gd)LvYpA6J@!9TE41sLBW0zdN98zx8=A6N3(Nz?QByO!yIHaJRTXym43q8kSJc zU0(RVRXuza3VF5F5J=l;0q()I7k ztY&^XNYC*6O%|A9MyCJuP)6Z;H?77y!?1MV4b~B@cU)KX_LRj z^?JhA>wfuGHzWZT&orZQWI2tkUMFk+PiUa+Q z$UGu0i^$6|;o5#d@gT2rSE(YlwtQ`?1j2BS>~iA${!AKN!QVn&$kvzzD1I{@iQ#8F zwpw4Ax*Ao#A-7PS5O=>wAH*q(D-(g{Z;9J##a0y;A>Ku24#rfzpRd}Pz%L?FGwyvo zxUNo>`B-?lk;(cgAi#MS+O(oIr{4A|Zhp%qehnYhJ)#Q8th3FCokUZ@CO7RmX+7j26e+}pmm>c6Kd*-xrGOy}I3brPUWZ8!-j z^@+oto`D)EAYY1W|I3r1iVR>Mab7KyytO_um(=vg<@@LgM`WW-wTp#c*etW=9cc({(f6mFTrNTZ+$-QII^$gIhG!3OMhc{ zo6Czh^;)}w-$fk|LhNK4?yAt5O3Jg`{R7$h{W-l&WW)uZwiXy=$;)WcpL$ve(3-8~ zr$3`9-4HyBk)lC;^_64_b;`eLOz3`~XqlQr1E2nq9{MfT&#l_5U`Ele1O;lJB{VJ< zhD0uHn$M%;Qj7`5B17-4ULEua8O#r6U;Dr*=Uy|trO;=*~T2PVr=q-|q5T2OK z4)zse^ww&{;b7MZ|b|pT0y0aUlNEggxeN9;MTJnIZ2b^+;PEE(|IHOkWhh zOc-ZRgIWRb2MxukE}AHdeY&IKSpl1-mlp7x5oB3p`P4;zWI+wn1-g7|o{RcBPCzQ} zoL6=uYnF#ifJu+kBfXU)#94L-L|}L5Bgnr$8-2}9s1VVRrQ={5P#F{wfw14VA#$KU zCIF)&KG7&LMy~{tdtvwNo|vQBdkSjh7aOfT%*eq@ib96+Q5Tp}`@1Iu6;08==6TF! zi=3C(FmjKhbY_C3a-vQDaL{USlm;^OczHy>&!)!{JduAXM3_ zp$>VKP%2F;ghKVSKI9vX8wcEWXJJ z!a`?I-A{pHcXAqe#uNkaQOiq~)d`yycbl>L_UZ^D!#0pB| z#;N>DUs4ic$Sq zosGAhX>)#5j89Q{hR1U{` zAe~o&ebfU@T6RI~C!f}73m;1l&TJQ?+;QkDNKUCLiz8G4qL!Wj$zb|_*X^DX7QFPb z=>Qq?oNt|%Xs28W9ko*7W@{BBqSoxXks*O}x<64HYa0ru`dOW!x62!6?m`pP?M{x0 z#23CpmZ;TMvCa)+fR7#v*2YqY?Z_UIo`p;XTC-*Go^6k$ycAyXpeg3CKo`EVpr&d( z{t9#w!Q7$l`?K53A7kEuf>`0pO(>ttL z(m+Unu^Fq#W{S=7P+Iv^i%^(6yH=7V_BgYG=eCu^zBSg6QCt-zB2||+21R*~*-X&h z=dO?^_~RQ`B%}ksHJ?8B*xqcX5hDg4b}`<%N73WV!q?V{)Xf+_Fc1f zKZZTPqp^*xYexk^Alg zcB$!F&S;Dc4lPHI%eR50c-_+v$Lf(^tM0Qoyb8H<7Lga~ z%*~Yzqz|SrLh~Z4}$aHr?*!hejl( zfrm>=FMG2*b#XgfZFZgo;JNJbR%gBt_X2>`6XV6WD{GC5Ga}pMQF7H%zaX&5b#x0# z<#nn~@^UN9!#zLDi`43|+(|SRO`n-}13epP9=XgMeL^&Lc17C#p>)66`njR%V{C3$0l00T_hc6di)?_WOO18R9K>CaZS@{EZWTox zu$ibJJ}d7s(=TLON%__M2xgP@64%Y$7;Oi^{qFRRUz5#L8#xcao}G{J54!~8$~xPJ z{#%f?Icy4O7DfQENy>&K7Yc4DL^9|%t1@ZI@-z#pHueBLmtLkX_W5~uaQkUY?$L4t zN`sCxqNNBY_{5QO{ncA%lF~vLe5}fCv6(fnrmeW(hzbH1WD(qohRN6*7)`HhlXfxW zXxkT*-ghYL?!@$@3Wqcqd22q&8A$2OpBH;(CUy^Vz7bFxf-xCnmRJ3plSN2w5Ypl_ zW$gJ^u|uIcIFWflpR93Vf5Nv#E_}9*)WFxVz`(e=U%DH8hfh~s$$WzDs z*)^9){Zlpq?83dimxk(NmW2xwHiZ#@SJ*fQ^3h?4ULx4b`3F-1AVJtye}w;|CYP!e z#3wR07rzne>tVrjDitecmL9O{o7481u1h^}08Q;^Tg?FZkJCUY8j-OZwCC2qfy_?F zHTcO~sd%8iTLrfj?%vq!IwI4XJN%@R*QjJ8zjS@M&kE*QJF8XcRWeP$tj0vxaDn5N z2xm;=Pp#K0=Op}9L}x^NPMFQSRu_jxSLiBb*pPLb(G1)? z(qv`$o1=0Pl*Jy2j-n40vr_#J`;9cn>by4w^Uh`qXPx6B*T}a+bR(W(;XxsDN%JB+ zM%nw%AtQKStP#|-z#@>vm+U`(&o_^AMtD&-#$wp+sAhc`n6;*+XjeezKy83d;T+kAQ#!s7j9$#g{8kn?1=GWV{~(lE zsaQpV9c0^hApMdHgv+}ZkbA&#;qIfrcKpm88x0h+@8SzLkJn3<2z*r*h0%Z1QaiXD zGPrPm8JGZp!ai(2Fnc9#ZF|=MLm-eZY`fY@qIu2sbE{Xn1I@j*QeRyp2l6O%Ec4db zrY@~sE%ouU=(`MC!NQR-C3yZmxYyjIE$$&PQ>1%UnavtPZdv=(^IUg^gyMH)DN*2N zQ2TL%Jz}oGh0Rng;B&SYdoI-yTf#ZkgPqfm)DI_QOZV{(ioZDj;U`p$uzRTFO*xXo zzTG#hZ|P~bJT*0OEV4#VKe6sp)9r@#N-*MW0WqWKJ*WQY)S3zF6#jm6P!{SJw!m+P83FOx z=g&3T*}x?}*jpwj7kk>v6rS9YQ6p%cjDpiR53uZsM)V6T26#y^z1uijz<-{EfN(rs z7c!n9m`yRolgnBb6&*;16<`AXhq+#40cM9*dT^Wave{-pPFlhL=h_6De!%5MG@PbMgD(?+mdqO_< zG?$yj=!)fTzrfbtx;c6YzPImAVWq`|*UiitdO5AkkV0G%!|=q!qo~otSD;AIDzbFe zKJ^E=FHPQ zATj`TRZ5LrA2!_aK`c%bA$b&b-y2TQUFafCPOWApB#{|esrgU18~)qO{nOYOMie34Nt{IWrh6q(iEPh_g>(_1e0czalYjn z65#dg!F8`{CCI;}o9U8%`-NSSMF18=Y7>Csa~6h6;IWZKp)SZ|dAztWWC95dlAU8YMG`ghOq zH60m9e>Rg}XMB52l?-_KWScarSFp9-8c5I*muBa)F^q2Zh_Wt*4R__t``4khaZ6RB z`Mgysu9>=;;vYJ%p}R5tlTAW5f@Tpc?(YyQVMiqc9P(3Y{XBSeYedlWpyLSu$|$*7*$cd5E)$7VdMf+x1etUZB)ZFsjrJAm^##bh&F_W& z(D0B4ZINT&XJM|j{()gWZn%GgHpF-cky*k*EJOE;8Upo;vrQ2~itlzhzeJ8m znug4&v8!qtT{d8*_>MDViG8oak~A{;?5xVd>_zU!WNZlxSK-$<{;eduMzSF@y!La~ z+AMD0r4nG7Z!J7k*M+)PuBL;{Ob|Uv^6J7pOZfRII~)J4H}hxl0*O8lVKd^wo$=c4 z9k&DS#+gn%YZ|=s*%z2mb;)1ol4T4kKM~+@VbH@;hc;``Ku|)%V?k0UVipapC1`%I+SG2X6lpI&{wTD@c^rsb*{!sK{J(>m2v zZA}TSAdu|j1+J%799f?PWk-ZQ4!-Zi^sbjRLR5c|7BPp148Gob=!fGV+*EdESY1RS zF)@0GY{p)|xFEBh$mk};;*&+mkqe91Ay40n3Ml|H0|+IaVizf`6Ybt-ahdkDTses> zjpf3F`RJj!1>v8zdz)%arS@}?i)=m7}J=?(Um!C17TU(vbT z<>mWWZ-hGi#>~Ifl5Hr5<3t4Mz9LQpEXt-@!x$0bnmqdra6nmOBkWrPaYbq73X8;F z+)OJC`BatxcH>;$6y~4ZUc->a^eKntc`8mcE>xV~5o?bJa^V_A)1QKXhc>q+HC;Tm zvzSNQrMTktJ{{^_UeSt=xU6}Y3-_Ok8h>%LZ;}S0)z^O=i=>yMchZPx@28BDCWU1 z7_lk7VQ*DnKP3mLu`3hWV$KFrCYs)=0j~sE+6pBi*Y>5YD<+SgF`_q@I3uLrg_$Gf zT4lB!lH$jbPz;Ej_Ggr}`W>0lU4{z`lmYw5;3vD6E~h`uoRA!kOLGIWWcU^Wj_I1RKALFW9{dU{$-V_6& zrd?urPB>*!ER*&yo-w6wk_R-vl2$`d=OjaNTVSmj*SX;tBjVtX*q^u+j2CxdU2EFS zuk%?=OmLAImH#kDtu%mrmt26=Onh6G#VX;3Q$!*UOrhILpz_%pTj~ia&`OWFzzOiR+%p-L zx(v1I^43VaUu`vPRx-oa@z*f6vRiEU9X>(7nNiA!!fdoGz;%VXsAdoT(mlgSixP+{ ztp~a>$U3{Tb~CfEGA{~?<(<#IV;d(zXfoZ5Kc+vwAC&SLlJ>zdmX6la^gl#eZ@%x* z)KiZXonm+-yL!3IRO?w-XOTiH( zDN9c%yMx14t3|bSY<0G5bJ{lEOE(0-yXsW*}Yx3$DPZN)tAo(8I zr4Yrj2@8;xXh~*SW=p4L*Ei^h>BCcX(UF*jiV|mNpPF?3bKql${Qen`elE@FC zBbBZda4<%8vi8AOf%PaY9*%>!Ns$r}!tPVB!&?>!hm?%I`Q%uxv( z>0*blX7vbVs`#311HYSJ}3;|f>xWiZg3~cI?XB;*wozqlQk~8h1=h*-Ysp<$^?R&;CN^F3~s+W9$tuH_- z{ZohHhA?D=`jP|AL|;pva)n0o-|e&nQBw<9M>mM+{mNb zengqH#4nD_2B%$;WQ-aUT7AZUnT*+wRiH9meha)$!b!c8t!=iBht>UOMNw8=XVJ8+9B+u^a%Dg@am0W&~)xW8M8G*V-n zG}-NT8>1&vPi`I3hXe=-17HDIyyVw`0XI2=vvf4&oiz_$LWmV2shC zdDmxeqLAg9T@Vu6O6BuN8`u=~AHFzPhp|A_l^A7Pi=VcwkK(XUgK|z=VDqX1DHVAp zlJ?JU2oA=%sOY30g6}LYAgE}}w(M_@F!_iQFtJn?d2&N>7h*3+bGtxq2e*sK;Tt5^(L!if)E1eX;^p+pY^kAkN#q=WoYkO z-{~^n4bmoFy!UQ!86#>%yh>~}akLbB_8D&VZcW_^4XuxB3#N7zLSkMX)kUVm9j5#I z&Aw{hqu~?Ku07S?)T7l{&Wi+EJb5TJDm?W)}c{_TLCXXfde8HtiJCP4c0>TMn709U%|MQ~9c)gJ6RVa?<&CqWi(UxOQy^eMO6zrRA@`82l|>&vs+t3e zs#fvb;MCz6rG)V)ACTCesx_Ef$M6~p&=Xeg|WYM24oK~k^>PFJWUqo zhkCnFDzCf|tb*f<4Ty|LPK@eN;JM_}5hwXf_O=~H-_tE|K35la+x|9(yo5@ecLd9% zET(xiFvqB9m{)C-4HGx{S-662<-VAeZdK4c&fvV253 z3#?&HpamxS}kz$(g6az3S5Z*&pcr^GO-=%3U^@CzW z*;ZZW9&zdS$wU31jb)c+ADY0LE{}iXmm~k7eFe#{Sb4u*Yvj;Na|TSJs$!0Lx@7M?dkJJ5?9tEK zXHy=Ap$@=ht9}rmj>SzxqKaNR^g%UF*91E*FOK41ae4il&uq<@$wk_@1ROWYWGCdm zi`2Wj_-Vjw(l2N&zYhHUIur4Qf6JzcuH)j-&TDH-d)RAvs!Sdt5DH2UW*iBOQ^`kT z#4)+XxOi(Uh>e`;zG`6ia-n;fyv6)1sdi7^9D0}17 zd!x>>U5*y)Kwz-7e9n3!6(V*yIz_?N>*MsYJ6yH|-m|ue?94d(C#2(r)qf^cU?nB% z7IHp4)$b!;5`d4Oss4tKVMf1@$Z|lF>$X)q;Vv~sNdv2Q_D4?YAT5>U z?{vkXsdWBwUtMcu@mUAnf#$DbIwE&xA0eIUd7je(2_IW90Bufj1YJ((qH-rOQoYyz zqIU#w7Fsa%0vu0E=7a4v@@x!}H96S`%h_@OuOF?$p&Y!;LUtwK&@9y}xqi0M&j33rlyYgt zzn6_JYFla3PhY-VAgdfe+1-%au42emSyH#0$BbMEAwroiN%fkrnVgJ!PCB_;qjeob zV+^)w?G-5heCA^}8n2SIez$X~keNhVA(nho+AcSOtJ156E2brme5eE{_-&SMt(8P^ zHP^_R*~^;SUy=XP2P-`bdA?=SqSZ8`Z>Wkh`%uIxDFJ)F^`J5$B;U!#+&Qf-0A{~-59`lfz)R_(K z*j&hzSwXn4r7`)L)F*0R@bKHIxmql4mFu9~0%4L2nVe(3?~m-@n{9zW^u;W#@C}@# zya6rZdYeaaz6)gveS`RmCU2XRf~wpzpcx%K(dt;PW=2Tyl^}7)ROG~Xl3AcA#iubI z5U_YD7?1YG>jmz)vNKWbM|ekj4AuA1bcNTCnH+e{)@4nA(Z(NP?xX%b$;AuUKI%8>IaB5bMj)Zur~fY zcLWWx5vZslOVpIb8hqk%L38EeH;RK5GpM0DQq+CD({Ev&*WY(l0)uW+Q@0VXKq>43 z@-PcYM=)w>W0om7JGEa?wz?KGd0Dp!?QS?;D3jx@ucdbXV8?a^>Sl(nS9|-Whizi9 zoxJuWA3SJ(#QqFrWG1U^p`^ocj`jr!B3_b$9;0aV2gBWnq-L;`gIh}p)1k3Y8oZ^yc#1qhldHpH$!7;o(>%REKi>$*XpDetPbf4LX;Iz z>c274y52C_C3o+B1K=_No;k#d7FF%ZlNT6Xap*(43>$SKy?}2m!_}s+ZgyjVsi#rh zA>I7vn&r{RtYm8x%sPv+@vn=%hSV$Ay(Pv`ZuP93-@$iocp@4h>1vPjJ4_jD6-_N`#z@ z+**$FlR0@geOXJdx542BkC6h-)w&u+m85+%r_HIWd^X{{1mT1Jt?xnakE$*wRYjrC z8vsF$UF0|{0xJ8jk$S3@8V>?4>VNuoERsUV;~UpH!wZF+yN@I_dmZF2?MB8MIb8Ek zV3EXtwbkcVQTfWL*yNek1qBo%UE)^wo8T7%Us7mQY0-*OC*_3K?Gd}*@ zi9|a0$w-GU(X}5}p}ggzec1t(EuNh$*J_QjQI!_g`Y`G2dZ9RTa_VmN>OM=AX&V^; z(PL}sG9B)F@~U7&c%n@m=fA0VguL1GVv>Rrp6vJTmWTKlW8TcvwTGLSJieDQfcqa4R;O)w}!Kg1{%Cw zFKAg0zhssCjbgb?fILb|tINP-i<{`&z0VoSBKGnMyYX<$rUB(Zv4rRPX9aZ3IApX= zcksTFULT4x6|8Pz4L=9^`CS`1T~)<#KcW=!+qqog{|C z*q|6=WL#ND>^2$$McusYiias5$xlCs=i+GIxLGr{$^eZdmI)OBL+hsK`jA@e>FT6j5w1mC*!-v#qMD0@)}3ATj-~ zeMC{6&19I*$X}6dGZUyk&n)1)A5p)=QatA87uxL>8lAOo$$aY^J8Kck-_2=clXSWELSV+_`dTty?6l zi=qad4<0%1b*R^n6jZk-2fI=7R;56EZC^2_nveKV+!r#z6=p`H2mE@~gn zZWKu9;OwcZX$PC$w!M$9#AGm=WAIvA4J8U)J@`%ZR{iNo6P+d z8eW=|x-!*`=u9Ld)lek5Tl2W!m$Q6h-6R;t-CG~=X$AgMK{wX!h&6ZeUJZ6i`&^I{ zt|gb*^5X$U_h(AI_^-WuX!0k8NHTMk5k|6m0o7Zk;>W9(amAuVpw>0yp|*>Y9i7a0 z;~b4(id^JuM4J+@#m>qtN=Oi$ZHVZ3sFj0H`UWTLT3po+KfQ27GS62aZdD4@b z2FGb$I@V)9%^c$^b=m>zq=jUcP4-ydsHZ7xSEpO}HE;P8?D=;;>MS}xBv12UQ5PoL zx<*Qy{}lQ-Z`15Y)1KB(-2n={t26yFVi(r+Q+FhgtR}640YX(LAq5oB2*~_91jIds zQNol2>AA45B}sc4e_ZG9bc22RUI@RqpN7@Cz^N!wR5yE#8SD%RMDk00`)HqI3vSNDh+r3XjYNuqIm ztN%@waF{+{Nbh^l=7>eExNoqK-RC ziGHY1nXeO{f?oWak=c^to7ch@d$Q45l_d~fbgN9UX9>*}UYh}D(YeH}2}!=xX9e#g z?+j_X0zJIBA%vy3@f6jEYp{PFPwo3~4%5Q~<|HvTc)3s^l+5Y(F-D~8Ucx`*+KmTW zBjS2lb4W+%r_v-e_s-iC5i4zx%4L~^p*Qp*=9DDTORh*=8dieF_RJTX_BB6l_*2aJ z${Fs4hdro@!7O<*)bMXXf47f8%Eu&XR{Kt6B>>(N-?C_McPT{$U?1c=q=IS6In__Q z%)iy}9iwLC-X=pVN$}y!_Z1}V?#)-wOzP`Mn++}a%U<;P-OePY5aS~|)HFvC%};yY z6*b3$fd&uc)!2!XMTuSD5ax1@VtApVPlV6bt`V$3ED|6wZ2VK$`MRe3oi#a|jr7^tfn}vnr!)R(0squ6P}8a_thtJuds`Wjndqz4Ip>Z&oQQwY zaW@3<8cCAe7E_vp@TmE02jbpl7(7`fI>$lT#W242OI1kM{Le_RUFX@=9NdWhHvGP^ zSJPW)J=e(${*J*b0E!(FoCD0w)@*WSX%inmILqGg+a#k^1N2w61O-Zu)XE%guvZ=* zk)}>W!iKu)dt|l>BE!?tbrKDFa6S&0qC#o1HEa$)bTm5bUsx+B6ZIECn7n`qBz2M~ z3&NKg4s(i~X*|!>Aosc9&_P&23fcnBBoFj>4=$G6iez<-0K?{X{WoGfXTO67i~Rm2 zZrUHlq$Q#fPdc0z4mL%WepEPQTMJI*V!-@0c8=R*DrIE=hFte|QM-UZf9a?zP&9_c zSCcP&6JWX^kINJP9>Ng9p}+U#n4qjAJJqsM@ua)nq*YN5YrHsJ0dF@|ks%z>h^{sJ~Iipt=6@`UKm+&1|@s$ zWgZ~TnO1D-`rP&H!(m({?EQ#iL4slz%vi{M%cjL0bS7ZS2cHYk#^KoaUdlaf;gbVg zEdk7o%CVeZ+R>MeMl7me?CEr_YUrH6Y(^_0&u=aGE^KWT$;6 zGB$C(sKfN1LdfmKa>la&80HXKmCOc~^KWdbi#Y^O8{sEI&|l}G>I?AOe`wFa+LTw( z=Jl`^#z=^ArdprXhK8%tBX^797k`I(H-q$wApO{4&{S#oXXZ}Ih#)2^n=dC#8*`n^ z3gdVSFTe|jZw_)ZjXshF4R5-)&J8}mV{Cuz7OXp1+_+EkgXzb)b-Jp;XzLm=d1)eb zwP{^C%na8jLSS_#7t=AbBF_o$WgIAhOZRi4xE#I|COhMRF8)2Y?%`CMfb}SjFJ;oA zW_KCHhfDAcJ=@j)l;Xv6P?o=MpC8}sXKCY}y{D4~fcNZ8;QE5Pq|XiM7^HjQcvns3 zIe~jqQY@2&J4cWFgB4Q`T8Kzhxm}PdQwK<5B;BIr)79V6>$%O0$1lcjf5uT%}13gFhCGTCZcq zD^XC(Qy6PEsm}=oV^1v0UycN4Har9GYy$j-7fHYGLp}?ICuQ@51k!kaCN~>@AYMRB zk$VaScO6W!35}#0>tR2n(-^^H$M8Ng2yhW?USNm8zPZQU*VH}a0HgH^6W7kO0%<4h zA-Z7`q*hT0pV=`n3r~`B-kqz(EE!?+Xq>*qsV2UNc2O88-Fk@}e98=ENDm$u3+ig{ z^u8(S|?lV-*&6Jb6Qnn8j^ds`697yq7@^s~>feCFyz#TCDTU|ef{@grD} zqw;S!zreQwUDgDJ{7BB^k85TTsr~aDCQA{{RK>XQUktuNyaC? zp(c{Th!`?;V{X*DKO~kHd{)nUr40oQu&_)*clViIQ&1&lRMJ&9eKNK?fS4D=qRrPb zTJdwm)xkGROeM+6<5l9=S`!*mr=*7;1er8w|9C9R*6J{$2tZbOR#i5fSQfGy|!hvat|))qbWQNmyBe-YE;RV6X%H6*K*+z}?PDbAiM;QNktV zn75&B&IXmsQ0Xh<%gCD{KHXV)*B`Dsw{A5RrjXGp4#)ABBuJMM2Z`E|;#}RnNSyWD zs6awp-n$mPk)Kw~Buv`jU1U_XT#=BG}8 zWs=H765c7#SwD0pRUZa6cFcGi*@R3xfKy^@U2SbaKMWlTHNKaqod0_RkQK@{V>prs zS;ay0Im!HMsjmEiQ0DYYB6|iVj?hv#%lVigr_^^E>zB z)G#Ndp;s5n0Ayf~dAVBy9Oa0~>giQ)TwL(U#j;O#8b1X(mrTSPJ&qB18cs!kcExDe zR$|4yBS*I#l6CA=-0qtl6~H^<=L;Ubs`UysR9E>dZb=N{O#f?(d)@|PIug_Z4@GMO zEsCnH(q!hYjo~$O3EEA(cXil)1yhmRFNcqVOUg1_DwkeTGaUB$6|VPJmw8LQDml~k zB1)f@(?CE1BaF4Z+}cK0U(iGr#5WX8)*C>KmM^y)#>^iSs-z+1U!p+g6Y5E+FBr`I z!+Z(^8lCGK%$M-tlJMf-VfTO`(%r8?Nqb!xAC=tTDJ5$y!;#R>^QM0$DRiE6(tp}C z`knipGrh&F^-&!hSGv{ zeImTSYFOH5_!_9htQbjIZ?J)V{g>?FJSR~X-3m4l*L>j%V#{af({Ad#Z@%i-MnnG8h4BD|s(306g;& zapm4(PcFIPy}-xM%LHn+12p<-IJQJYEInFZAY!vpRZH3dj&1hC?h0Y`XsfLZ7#hOe zQgTK1p+_@X>zna3xUE~FzUM~C;0nBCi`jA)#)fA0CrMFpA7Hh`>{;Tv_}t$Cz4^EV zMtF7|v-Pr%M{ZxAoZbpR49NexN9&PJLN8b+4l`$#e4HK>jko_r=vur;%6DTo4ldpw znW2B-np)IT*$bx(^;bo;I*j|FKdmYl4i*v5Y(%WJuCP93U3uRW_F@84PkM}%gq;H+ zD}<}CEfXz!9}n}VnS$Npe~*UQwOL_4_TY&Q7ToEI`vD`)nU`9e6C(i1pSpyk_2>fu z2v`eA*C}?YTYwj6Bm&Fqq-sHmf-VgWow>Vf@ai8h$7s_|n5;1EFjp+6WN(&LW%M;t zk2kIPZm`a=SzbjT9XhgbxwdvSG~matXU2@%qHgaJZw|u*-mqgqI;-s_ zq>C3yIcGl!1oq0sSci*lPk?f2p?x=R)90wWxL8FO$q9Vx{B;k~R+lG!CDOZ9aJ8V5hCPo%M z4C^^4U1Ou3A*02L(FVSUBLK#rYli~Zsk^t55~cD^Yi3f}(gZ2D!h>rV)X))^c7=ob z(Hd>@wh;-1_L;@A;s8%VeNmpDUb4@Aqs$tNj?J|_Vpvx}Q4+5!a;NQlQ&Mq%;|& zApCnYFH_7+-W1UX495xMa8NN+jLV@C;R+EsvKG}P58}IF|BWR{<~F!<38##;DN0!l zVvzA7Mq2H3uX&QX|8_5NZ1M30m8^ZPWw&~@R=rmwKkE@f#vs}Yke7AA%YFme#=uco z^MOqBz+T{_%hESZ!*e%7CblLdHdP+uJmXW^_K#akhiUi=)NmMaQMni}yXqT41^`yR z-Yq2K{gL1!yl6TGf7ICcM|9$YFD@W}5lc!jG!AfQ3$siIT9E1T(}-D%?jUK$xsf)v zR4rJwuLy0>a)CGj}QjxW#fOjSg`#UzuCceUROlC%O5xIPOt4b;^g~GbNQ0}`6 zGTurvez3BNJ{{RQMwmBNPCQMrFj#}-YO@9+TXv)>^adjUS3s!0k*Ec{C7M>eg%Oq< z8^kkN!e?W{5uWl*BdE3u((_F}{&7ygdx8bE1y48+?+3Vm03WX0{MM8A{?)Ef)c@AQ zj2pa1$lf_#1UhygW1Y|>0t|O^2igiDK&V1cK%R8Zr9(zJS4s54>fX0R;EEJR1n16d zCpDz3L`v^0+Km^tzr=16$r?xP6fnH9uSk z5Z2*bnEO_Ky262FaN6BKs%P#6k$g#JY&Km0&hE_5|}uw2Ku5UPQ6+rIa4C^G6| z>C$yuF~|w~^ad$lqNR3c1Y3LCVsUn}lftNJ^-0<+P#cS6y{=AzwLsa5ZK&KQdr%S( zb)cijQo1dKhs3mdW6w!9gar4OV5dyDitnlb<)NX zQwOOwNq14@7a+?uCR34dDQSGodC&|bY)70g|7y)hH@@g=EgeeS$c038<#eX+vcbU8 zr*AaY5A0Kj06v#$f+G!LMDl^-@rNj}ZHnD>xRD&n z&Gnz=p3WKffM2X4eNUh-Fn%>xd>cEcE9i`y)s^K6kuVnjD!H#e9?U?LG`HMsKq$P3 z_shw9N^UtMOC?lLLXA1&l!qc!n%LaZRKUy=*cwO1B|{aQr_&NRP5Jaar&^*A_Kp+9 z_n5JU-bj@L`jf};;kQ|g-GO=j&}U1Q>EG9Ua{?ehW{gmd@rR8fVGWklVMo}^Nxv%E zxx2}nbzOC_x@4Xx!lONGRX%Lboet<5y{A$J_Ux$xwLO;w z#D~GP(5z2sZ0cdij{a91qy{kiw<9ekU_ST8<2s2 z6aW#4N4nEH3XRRIqo7JZa)&K@eC!4Va(@BLkhe!m?~n-ft~^yr#l@;Dxk*X*4ak~n zMih-Tv&2wz^0#YTSCd{{1EKA02|7Ss#5zIyXFQ6kXcK{hhSavoWLc*~e<31cX>NZu z;Aq$W0L);Wta2}1HvtNJq7oe{37Jx_wtWR=OK78{7_s;iVj7S$-F4f`zk@`8xTeMS z7P&&sI4#6dC+$TE&)e>IYapWu)lfw-Z(h{=*vQEXbJ*?Ho#6%y#HwagyjRv2NjUer%-D~f)<3O95=)4wF}e&Q zgBC7~5$z6SQ)ZOxTY?#Ua)+A~6sg!-eZ*H(fY6-Lu+a3~9w9dZqeehQ6^gA3@(YP*@++(H zYhM&OHb#QBOlCglBtO$vLkDLAywQw3GpFIHzzr|A3O^?Y+@I}1F3rPv9_WS@h3vFE z{P!@>bS)KReUqS-{t!iTJ+(98el#j4BD>ulj`QbZ@ATnM+xYCQ4EI8#qZu%Cb|Xbf z0O;HiymLD?Ll1E6Q0@13C^(4xWSk9YYQV8E&W8Ru^fV+@6x#ZEK#-kI=?X~KlP6t$ zrthUC>oH4&x6gX(H1l-57!L-0&Z0?fWaSqI%K8BHJWy&JKnHlq!Dl4z3DzyWwEbAN zJ3LZN8r!Zpu1|C=W=#oSw73S~fF)Us_8wO9AA|~Zix;5U-s1@*uVO&NiUHoCJ%yzg zC#U~ojuZlCW}4N%Tptn8scipi(ZuYCBA?4oT|4I~EdNakc15hhDZQ$@_b4aTcFc6j zj@HsH!%==df(RMkMKX8Va|@Dsk`{+sSwGlhqnOyP7FSH|47S(wvVuPWEC48+Kp8$IKF96*Tp6>4sSVUAI{8 z@#obbQ`CC(K+h=IgNaDx%^LO*OMs)gcXo*t$;lg=Rk9EPNW)*d&TJt5!nz^JT@GJvD7jotuKe zpL7QwIl2HM#b2xM#HpLE9-VSN)w}EPDgmj2t_UP%?lh|nx+iJB2Jlf0I58@Q3)g!2 zKAByAsY3z7ChPYTFWBBkF#`LHRB<>Bs~{GdUqsyXNx$C2{(6DhhiRm}i%;U-wenISv)DHohD7NTST(X_Y(&sVRN5haeis1q#R5fl=qLlhPNFv& zoeUb^W0WWP;abVrK!uvLjtrgB=awR@*~$4{OCCEzs16~=iA_8M>6D3T(*519ag#Vb zh#$6XDvHUn_xFr=*J#*=M-e=%mAdp?*57KtaZ=J*D9VrW6wv4A8>SDsX`DC?!yAh2 z5BUjlEp}57<^F>yHbwnu-pg5NYf?4v5X#y7)^iNrz5213<8%kII?(RTN##myNn50T zD&e$Z?Iz;VY`(GFsr6qG3NV@_K$`I-2Dm51e#5##MQ)w5&Lc0m;Ini# zO2l?7tXdyuhKga#Cw&PiGoBEIPDW!D1!fKK-Ox^=zG!n6{D~bNX@}0)UiF?jWYyBW z*xj2c$ZJ4eJiHtfen+Io9lgLqown{8ElcqI9h1Y!XACzgO<%rZgt?d21UhX4rQpoU z^;?S>8dzWFL42bHjU_lR@!D%2orl~T=O6E`alXN};vQZ?GVH7txgul;)L%y$!To)N zjmZNnb!GHGS+lT=0vQo0x?B(eq*i4^zgkJj{R zTtx9Hn@_&h2{bbG!TX3y@E2Xft=EMi(MrJc;`ky*EO)VdbB!S|I478JwS{Ow+h>B9 zVg9^t(08jCvTchRII&y#BO~~A8+~j7`4chCCCg(6L=b) zBkfSFWa6X9JK@myT$gXX<8c1bVG1hX0Jp$r ztDjhFP|VZpxpo;YmwL{+c^BI`=`J`pF4L@PM@=CT{8ekNqXuG71@1AF>y`bXKG3G1 za9VjGQBv9Gpy(td`tQXkvV@djp`Uulqk{_aG4+=?Z6s24T9Jg2Yjx&2Yq;b75YSBC z{|Vsv4JQ|Kmk_D|Ju-#lS)I{yIq?}52i`JdCMr#q>zQ(>JPl%li*;x^%^>ZmZV-31 zg*`^`-oK)r7*UW4>|{Vyp&htJ3-^YAFD$HrCvuNQ^FEd@{FLpQWQO~P5Nu|kUur@Z zk)KC7Wzo3VJGP2SJ01r?+Et4)<4-1D`HQLV-c#gxNnN}j(BSTBMNK+z*v>3@XgoL< z2rRB-?|v=Q*75@?+0tsr$?@jX+GL8GNeu0bpqM@^RiRQI!Nd#aU5Lc3%K)-7WXP2O zgY6s?-8l*lAxDTR;7cwQ7i>HUT3;k^W&8PF+PhOJbh{)CNz~Iw*eDw|7k1><#d(ES zujAfPDta;fwJY zCwR|Zr75QrUd)ua&pd@2 zqeS#8kQz5$LKtq=xHo~<=J}?qP9)#bHFraB_8hzVh4eq=V?&lzpZ`^Lq4i@_*RDtA z2sIuyQYbg-*u;qR>k6rYXO;)2*!Zc($CI7-1ann+kvSs3{v8QL4kIw9+c6kKgq{*m zU{w6y=%}cer`Ce?S{NP?WeH=P)*B6N{UuS$+y$$*Kot6)JzdUGI%xN5e95lhhDB1OJQ48JiIgZ2Nz3x8-b?^M+UN#t#- zBW-fMwVYTlPF^4EYFkdRiT=k*A#k_yyeE=JWksuj7RHnnGIU(RGAf36^76lMCFCUH!5)s9mk8c2z zdLr8{rr|Av+=l65Vu;R(7RV^9;GJ{?M{#SG=&doCsPiQn(G_>aPGzi~$p<%426BxZ zeeFins30E2u9SR3rCcZI>E^NA&s5=VxDMjVbxR`SN_+98XR4NZErO)8S^Dv8ur>T( zW=%~6UM>o_z^tOujW{BoW|e`~QY_r9q2Ft6ux~jMqzrG753XT~ym8_tq&3LM1vTQz z=l&YWEG(1G^!-6#$PC6*Pzj}hz5UAr-|A>U0I|CgIBQ=UNaSn)vvP^LFR)Qo3(Fgc*1GmzA$7MVUNb}#}UC2Hya=4!+q z=f|p8Xvc0)hqw?rFqQ;NgWSBw%o!op`+TqUP@|ppo@4<@H;pPxw7-RPl4rAk(DjCU z#%9t1KtylQp@|_0&)Ym=`Z|OLOQxfBPz3I2wfs4>?H#65g$RmH^7Oh<*NvmbfD^&S zV60&gwn~P-fr%5zYBhi@BPH@leJP4p(rN>ADF$#Ly($NN3;}}C@z9a}Bp7aw+;ni* z3bK~ol2+1Z1w)q#cO?H47*btI?lyE9>~zIhb{?6kRaDxgdrk8T?`CiolJ@sWB^KT(vy-ucB?UMAKbU@E z)&W;-))()Bmv7E=7bVmPUz_qF4L`?zGo6Gk&&sI8HJRIKI0lWG_+zj#(0VZcZLcL` zyqkJ9|InT_c$Syb>;N?)7R)NV zUr}gv{TPD}cn1us>{VD9ZKn7WG=Gy|p+^SbhIJ?>o(k6bXs9heBm-eWh2J z7H~obhJgPBo4SFJ@zvY;qzqbdcd1btaEDf+91=n%d1BU!mcmh-m82Xw`oRS~1&-R` zD;eI@{PZ8&BUa-~YC1=6ba;%TEVh6TmuA~Dy=`JMwH#nn{xCbx+%6nLse@ZRZCEmD z6Vhto%ia}zD2i77(IcPJfKH1PXjycn`A}OB@c5`)bQT8iXps=13YZlqua9@f9aAu4 zxGt+ngA*cQW`y1>)+B2Qvhv=;n+hOzfhAPc`g;bHbFac$OF<6=!Wz9GsmF37|FDl7rcVv6oLOV%Oo5+UE{17T&xK zk|m)ksy#Y2K?PavFKFBON%Ba#NHnE?=nAhp2AV@EiE|mWZ-Y}pqv}L{>t{}8TV^Xb zj;H%jb{m@2D2Kj)#G{E-8|As*qx!Xl=WTxJoR}h8%Ki%Wk^&7IYnW0@xXlFkQEW?# zG3$4f3T+oHYz~H;@jpLWq#T`zFV*W32NR0EPWbD zYx_9d9+Thvd#J;ETu7r?tcIg0o2jqsFA_AVI@or0@Y+YMNE5aT8#+S;eI2cnMi@$9 zesNs&OUX*&UbY8IEfwZ13BFdY$su=(@YeWv6zlkal$TL z@Im_oLtT@{bCnr=x5)Se-iC?dw*{QGY|Pl`F~qpeeKEL& zgw}h#dB*V_v=%>h$uXtpdZ4)TgUBvA>W9lYYKZv2p{3;gs0{gJU-h2IOP-=c7658q zrg}7=i5rtNSB4{Rk+R@`<=VPODCOFLo!@&f0DP3&b(`ab7`g;% z^vDJ&D@z-Zo9-r{gX`tN^x!Dhx+Qcdy6wYZ49v9qlvOzU;yu=;K9#&ibbMi8dh0mh zBG*RSCG}l7rC-6z<1ewgQ}*Z3!LC4z)`O1~6`u%EO5`OB=x}v?YAI8}w=rf&Qa6b5 zf(I!8KX);WW@BnKE66a#A@xjHG7BMjK^J!>ZA3%(g;6i_K3ImIEl5O=FcZG`^wVsR zrBvbQKge6mj6HA=b}w0m>NA+b$9pU=8yRQQPdp=i&v;}%*qiYymwQi%deI~ zOD5EYZjk&lJF?jt^LB?1@g@U=ZY6nd&QZxlv*Olub-5LhOvYD-S<53Vz>RhCQh=}7 zTA&05xZG}+GAL~(p2=R-pi4sz(&74<&v8y9Xq8R8w42$v%x_(OyUCQ4Ee+={PDk*uh+`K0@Z zb0W+W@1q_U==2FE&F#yCU9~F z8@Y>9NZs-$G3InS>zHcjN8H^}Jr_w<5#B4>LM-#+Y)$w{na~l}{m0k0Hh@tJZ8?V* zy;F;al32OPL^FM*=;3H<2}W^P*xknJ5CEO2dKEMh54TIsSTUEMB5PR^ZTh>b{W8B? z`TxC(Tv7l|)qSd5WJB%#2sJ6;_xQ2$J^yZHE6hx7e$^xa9nUh?$VX#$wQi{j>@rUY ziKCn=hc_>$Vjzm9$4k8X@L6zzrjZjTE5g}Jc+xNduXmw1cjQbvFTEX4rIx~x{|FR4dX z{13R<&P<45o_)~NJT)fEV}fz`82q&G2BYP{C*B`0Hccn>B3B#zv|h+6bE(Tm122W7d6lOW(Ki3PK{oG*>4%-Lyq8iA-3j zdmbAk#lbWR|3fo5)WK~<3rszp(t-*)py_L)NC-WjRlK#$a7z(!GP~T%4~cFb`fF*C z1k~*eBd>`YBCpNH6R06gpC=F#ahdJ))#!u#H!;R|7^dL>A~*%qW*A)8=L8HX6!k>- zcPz1c<)yIVM=da272y(p|56+IPWp?a%hPdJlEgVvw{yPpKj2X@h-Q;@xsCPmqO;w0BzgIF*M5&?Pc0z`x)ffR#y)p4+{rG446Jl-U~3Y9 zh0Z1cz|+#@5N$W_rtPN5oqTNa`O5i~jARP)yj9yH=3zAU90#Rw;+d7~nts-1!v7L; z(X8Y$Vg(C6Tiv&7GC{-Mszi7-puWNuz&GJsWf%en)rTz}t&qH-4Oe&vY-sXfl)Bcr z2ib5M^3P0b8CNbFCZUk9^A7x0NnO_o#CwCD<$yQ;>%V%$S9ik8%_KMWCr?rhyL^zR zL@E%tsM}YRO)_W$uL+j_SfolTZ|GC=wSXWUlaPi!=dd&%T#VS%y*z1LdCAoB?oPo? zcv>8<-#Nu$HYO!J?|?`!QlPn~KufHE<-1Z~9sI#wT-3{~C38JU_C9=zEI&=6*F_2V zN1eesOXR~MQYx$;vBP_TNS0w>RnX)2_F`6n+$tyj)mLNR3qga`>~FC&F=15OVk-qGXxp=;&{ z=>?7DK{##<`Bk7;Xf%Qe59Sxj7qjXc8aOIM4E0#D_D&$J#9{}yz_tb`+Moj{nJW;e zvtsTTc;LPS-#1^{1g?9H(pNYWA9s<-_FY{I-)8~1r^DPN9|H@`*vPbASGJU|gI^k4_a!_GaB)X-9f{_4Q8Vd$T9iq%$Opzi=QJ9)zho^+&(`62)e*VKLD@UMwZq-z}G+&?8r!Lr!#ZE zxAQDdsR#>jvw&`*^h4nYQ65#rSTqQg!Bcq#)ahEF7|tu*`2pB^*CvI(%ehz9r)0^< zHuw+Y>m@ORe^s-8*h3G5!Px5OyaI7uQuttOsxT>$?ZX!Zb@5vDAAFM#(L1CfoO!Mc zY5s;#QgF6p5BOl+}-`$7SL9hOe_&%67G)n5W&-jgAeBQ0U(=^IotJz~Al{?Vj zP4krs8Q3B#X_}w_dOs6Ar%{IaBS{_CBK~{OdBc>_6=!>y}PJSxBkeLd3p8IiIee5 zFmBvy$?>^K%>K(qaQ~b5%EIigKN@Uz9VUKf7i<3;fEvx1n#V6SUiOdnO=d^arU@yJ zz+*F1Qrl$7)h9JJ8>6JY-^CU_%KLpBA z=v>Rl@%^x4%S{Axn!r)`3w9Vd zllv~$bpZ?B`wxS7Pv`-q(CegohFq?Fq0we6ViEz!W%1bc@IZrDpS1$v6d@TOV~aMO zSAOdBP$4eF@Pz)JKBn}jkzgCY;jR}9=5)VZM?z{0tw{u7<(2x`N0NzUt{bh6GCD)| z=b2wNnUXDN;en=Ju6~Wz)n&62SQjcpdGjryNZX;n8Z-1t_X-Q4yd0IV^z9D zX9_H}dIr$Pg=IgbhuG0p2@H!AiRQ}nU*vfZzqbTLYGbM3!{?)KOfk#K|I$rafcTNi30WuS0MQWP+ zB&Cj<&aA_p?O{dqnAs4sy6z~XW)doLH-hGR7G(^mh56XsDt6q(K|?Ir9cr{kK_}pn@Gfr4rEjLCpQ6CBjg* z7bBX%adSkDyAe2$I+OV`O)-s_G1dPr!KRSn59~H;h8L)B)K-i~G_X^;5$78r!L4QE zj6$=uH`vx8P{KT^$DLu!6RU#O#@e#C@9YRuJyU_Xb?EgDrdn{5s^#Lx%?QtD|1o68 zGs}6>4+7`?rkN3M*m40L#pt~ePu&D5g-yL;10Z5j)>Oq>mN881 zC^{(-sf>N*;rUtycbW#Q!=k*O!id@(-B9Z(sHu6!?9tN6aBAP1(6`s_a*jPXw>M^SYYnLS=iAJZjG@dYKYNCs{ zw;LeSdjfpN2#dPy*WxM+Lrt61$~uQ6oxN>5AcWog*H(Eeym(3QDaKyltIH|)wZesR z)DVLPWuob`7x2%Gcu*dU0$xl}27U5-VG$`0xL0j~38A8J!fWZrv_NUN097$12ms5r z3JT4+I7Xt$B^Sm{ovrzugsbIF3gIs45GmGP$;QZi2Ez!5D=S(7)#5Y;Eo4LGps3_@OjlS%;JYB!Wn)UCgSZrVY2SRC zeCV^7`+1GA!^*GVFyTG1THT?XBZaWrJsSLqa}Zxd4b5qqGEf50GJ_4J1NCc!n_t4{ zduD^&rzX`ZR)*EtMwVP;TLnR;`_kwjH043T6@H5Rv87j7ja-R0P`!u4`O9 zMGWsQ2OWfzz)ELzvGNQIeC;r*;dqLSow_Itc_EQJb=*4D(b`!D8p^mz;JYf^{wHTElD(X|3W_dCXRleC@%qgU*Ih!VG$kYCz;!D)` zyJPog!$2BT2(g-Zb~)$FP}RM{c+FD8j9L)y4n4~Ui!VAQmWeTR$AW_{AGdvWZ;W}g zw7m~s%NP006~qxBYpGn!Fz-MKBRzaMp%`2WM&B}lMxt;x*|n~vZ&H<0Jg>5;&bjI; zN-6dvTN^TSw?^aVw*1-oJQKBnRo6)cl;F;A0&q6IVjZM_Y23d$vo9H}_x^y1hL=X$ zWdGEeaRoFo@f=GDXj}q+ICh8x6w5x~TDh6+qqRR0R0pHs$v*QMZ4qEv|3QD=`^}6a zCNn(#Pw`l#SwwJwI%otNI3JK=XP$2x02}3|$O<-DoGC^?lNoA>o#p|`AnI(;fLBEM zr>!giZG+Mz1ieJ*J!9RO={PfePIoBFtu)Y}1l=PeyTGV=)|;2m16B|TRx$+`+6AJ6p?F{*e zRCailc}PKVH4Y~iUvZ&AQ=Du8X4mX32%;Yg`oskvH2o}Hqj3i+2m3Psp%_imUM-~P9j9$_r{HnbhNgW2bu_hi7R`% zBQ5C_)Pw(9cwFk=zTk0gDo;ZqcOIF|S<5Ebnf(``BRhONVt(bEBxEXi6(QRt(CxDa zfn|@}hxcYA{t@<#&ru@kM4Qf3(fb?OP^Z~}@jq4@;uabBS;Guuz~0eT+Dt2&@}&%s zm06ro4VHlUS(*OHrC(%ZZ){Nl2=EczV=7tasS`=EMnlAfZQhl>l)vJ27hR>onDC&O zwFlQE!FGR>c1LJ$rwNBfZ69E`l>{^n65mHMU8Bcn$H+un7#InlZ-keU@U~j$1(3*x zVETBj>3&uxGjIgtLM$ery6q=_2OmJz=@lfwRwbRDQ62;JG4+n`z01fCY;JsGRVUX1 zDyR10GD<9i)iI)iS;7u6I_d!#Q*I59I}x)c!(KoHQoL0gK@QE>f(ozy&5|8%aR~99E{rpgeS*k00E{C^IAs5mSN1tp z$!Hi+u|a3wgg>F)#W{Go`rZoOmZMVTL;A;a1-#p5uqNwuIGL%e*GsWQ~+b>Xm_yhGl$p zPyFAlaRqPhbh>IKKJ4xTEKo$IHymvqCmqZ_h^T{j2JvJK4dQ?V5IZ5`1a0C%qyEc{ z&8Av2DFt>TEWR}x3?lHNJh!-xWHNq;sq)}NYCrW=<5I7!JJ5iv?D-kanBaYRRb88%` zLoRN&&f2SQ%7G}LycX4>HK$=8D^`m|Zp2^eu1 z^qO&TQ*bbKTq?Nq{yD;S7>Jk!`mV;d9Gw(%K?U$ii;XBZT?Ea$vgsW6aiYv`+)^{{|?|qTkplyjpC5>;!&EK&(+Z&M!PHH|{mKMZsf{T3) z@-DIj->vK%Q9Ou#_%Hekr#{-0?{tq1(T=;LUZUSYXT24n8xV;o=P0ZRBnQ|tpQ_1i zTqV{O)Km-wZIlzryGa9a~PF%tOH-!y=cBR zYKUQ*>c=nnO`J#%4*4RP&)eV$LQo-hj4GLM{IgA)t;&Y7D-0hPxH1naU=X`cuTw4t zyry~g;BlIHFEh zTk8_D@_6IvGA8N-+3g5$#uGQVFBI{N{+lHKCh{bo%xIuv(eME`V8!+ijafCyF`uE` zeDnER5j?yO7o`r*+d`s2stqv9Kee=vgG(+=_B_sYKdzZWWO<_p)VAz>c74y`9c`tD z-5MmcYy-S(Pa;St^vKHEL}jY|Ie$550UQ%6#Cy)($NkB-2Y->N**LB%cf_y4 zj6?9uAE}v|Mj{`;}{OoiZWb=7mu+LfOvHv}Uf zxT_tU3NXvU{8DmaToc+NgpGjZVX?GJhtv8k;MOssEvu)~O8MEr1cqSyY|vxejyO!C z2(l1gZBb@UiPYi3kR(h(?eOkYUCVZmKFbU<59s>`Ja{I7g_S|ujc1cQdp*q;~Pj}&8u2ns})&!hIEB9Jx#Xj0v&|e4-;%?`iGTe?7t!pKmc14I_7$ZaYq@bpg|X@Q*B-LWk5yg8@P>=J z1@_IbBFbC2fOak#$#4yaskDe>Xrd9>pP-v>S`ZzGdR_jriGi2VMVeYM19BFD(tu3H z;1RIIhdXsvk@-3vg-;_sOLPG+{rXTAH;64b95=~AG=cVKh!oyJ)d}h|5PAg`xZBJa z|A_{f7-7Muuft@3rU4LR&m+FIeTI*GBPy|j-6Wwh@6zuor;e6XfpD(d9rYh$Oi z28`RWrRD~_0<}x=VhJC=Xm2>z0~;l7biCEF#+P=3*Fs6nz|KEOD5~L6>RVuV}>Bv-$ z23>RhKE>2DGcNH1cRzBL0hn4})z)NtfSZt!7%K*nm^BzLuW@AUH)yhGK?g2thb8Ax zdvWK)*3O!ob3qqS5LbfH%#*0&;ZDxE2Iu}Lwx)X#2EE8DudVq<`Byapy`L%U1Z?7* zU=;3dHaEpEYFwPk@9=4E$zZ-EB@Y+(;FzwIthd{qHXpi4`bdn&wmbu{sa7O9S?tsP ze8UF$N8s>o5&~sA+tepdAnDsrY*1fNQ!B#r@Ev!zt|fpsHtLp?EaDE*@%?d+%K*{q z5zwI*ZjSpvJcZ7tZ@fLkn)znkqPQ%tHpKfX6&kTj1z54`JueDu#Ad`Bbalj{qLx4= z{y_M|{O_lpmc0KE7#YeW02)R+Y12O7rm)6FBN8~s1Ruznbp)3+3MK%{AX304j`uYu zhXA@l0Up1lpYtpzTL(32#F&HsnMD6u&SokhUZ;>9j)7z5UxlfjPklV&?$Sr1+p^ZW z<)ybvjK)VUQvsrkBT`v+-O=U(r<-;aXmhbvG2<{^V<=Lc8UB|}-Xa$LfMvffuc5k?;>!L> z>2S;-!ygLb(!5|>nD>(S5TGEz+$Vz!!9Ktw;;ZuEn{+*8^SrhS;!kDcYi-EvQX|zP zs2zjYVVoyDk1vC_wBx-DJD0I=*B2b+sUFw z~T9n z5+=3f3u4HC@_bMr!$wi#Z0ulSbv^515whmZ-KC+&4pgk!|)-y&$Z8`Q+mqR6n++AF;Sw#tg2obEoUwE$p(Mk#dDF?;hOTyHM{QJgGH&!^-%< zvDry_Nuc}g2vRrKqJKjX&|M#@xie}DV0y83*ZC8t3slau0Zuw1`Nj~Kj!o|}_Pkzmg60r0> z$ToE`4g`{E{;l)Z23js$Bo}c%9nTe5ocIrv7`O;UchW;qz)2UZRu9y)tQJW23$g>X z4i3D(#0w$3><@1x>=Y!cKAQiij{WSUAQ7SsivbB|XH&>0R-JuT2Ukwwz|EZaCBfOb z-WIHB@{%{`|1uwSE#MFum0=DUaKZU0)}_FAn&(-6c-rWqW2}*qcr+})j-@E6 z{#xhE>&PPeNf$TmuYn3LW@3W^ekAwaV!H1^aaOZaI7~fJ)sm+PtF{Q5j;=ud@&VhB zRB=Gkk0vZX>EZWmogXVc>&{5FA6<@(3~xd#yU|e>3)@7NKPYBU1D!Qb>6%AQF=22X z#)RS`GKywhdmzOy4D?D z(ZU1ICkoizGY|@00fiM>en8sc*wU}^#U!1$x(;%X%C==*HeGH}vHIjfL{WG%l-V%k zYGf{GiKRo{=2u?vhr!B?u2D4Y<}+2*2Azwr!m^C)lUr*?LEnK0<6-i0_buMM9aPP< zOr5&qp#VD2Jau;ekBPK5l2%}7pYVZ2!due&J|BW2qMe0XGMPtqWfH+j3>N&9wUBPXfCrVBXFbEGap zq2sQozZE&H{3M>!;Bc3wh6Sxqjqi=+Wb^+@FXk{#?Nvfqcs03WSc>(Aaa4#5?&L}j z=rq6+azFyz{zG%H{;s9HGUEoglhF`ucs$uc+5Xkup_JNvu6fyPr90$vh%Vpq#`Wjx zPg1Um{pl22_3&-!svltZ+Rc|)$=sKVC96tC;&`L^)*c3Kxv(#Ep}8!40U`6buy=F% z9)2XKxnqc-#2T)|jl_wZF^L+XX>V9oi3$$T6*>cvHTnt!Bh0=-iPV-Se^cD5gWKr# zhIMpn0-PX1SoVqARThqeoQgDimhzGnDr+G43{`3dL*dSZLBfDk%J3{+#sl{cT#Q5O z3q(Om!thQB?6+me$r(hXa)xtTKyB0whJi*g!1VEk(IyK=hSg*5E=vOLjeBSFGqT1=7cBf#lRQ3f!Rwl&+*%ys=YVbK;6Kb$8=!bIugqBh{GN`^?YFC^P zMXJ<7qpP|Dl%}-6Z=NEgpsRy{s*^4Hd%vt}8K78SHjaXfB-}WArwM>vcnY7RERWDLxCaR2{l%xEQJqF z2U}6?@WQDa6)8tqzfN-k`@l_Nt9k0=iD+B&kfjqGNky!e&UsjYJR(vn9dr9P?dAVr zzj~UVYB5|}A%k!ZuaaaU4T&!aZuwDMC)u|EML@d0BaqZ0Md5o(Zv^fgR*M0v2rmKT zNo_C7jWL{EF%-e+YT}LvMlcGvP%Z@^{_fIDbLHfWmM2xH%}yEXYAn5`|c zb^q?2#zrGx73>uVZNUb?L)CU~K+R(lkQ}i|_#ZBF^8N%zYnloP7iZ+|_n%MC)J~eZ z=9gh}*-ZpY^UZp1T{xh9N^QlNG`3w6Eu$kgXQwN|&=0O%PB?m&go#F2gE8)+9CEPO zd3OML{PI8_1ado=4`_JD2I)VRMpkmFQY>bB1ZL5xRHWig)|2f^Vfi5Ktpv>7kDb`f z73bQs z%tmt3Ly#+8nu|7Q(mlc6<{timtN;&%VBF$VtpC{dLA6nP{7|Kuu7+|I$wy%GnM-`@ zxphAp=^*qIBdvK5?B<`EF;qz-i!FKWc@20aLpByYO_VGk-7)kdWiLZq*~c*6kBrMM zMN13q`^*|IkMLTt6TH_7^@sPh+fX;bw%L#M+z(@>;mqYXSWesR&iIgO5yh2w} zN{fz5HF#NquYQH7^E z)gK1AykCuKR^{2Y%5>aYN2y?A;GUd1!2sKY3AK1gShDA(VX_4Y=^pHV@WRp8kCrY; zEs`i|3v}mzc@>F)LU4VLiOutGJL`k>y0!`J3<4U5pZ4qalgt#s(PBC~&KJK}Q7Eq1 z_>khfP}9>Y=D&FuO0?&%43qg+KjIBOgcua%`=^K5328K2&usb{pF=rO&g+}XqP(>1 zLWwv+M2@yrqAZBs^EXG^u#W;x;0whS8O9!_R5h15@}FKC=Fa9CWTAC=ME$-Qfb*ZA z?r3qgsF2jz@ZRkC@`v{v_-Haya7a&YNC$P6rJb>&&%GfxgNRLLkRU9YNlZp0LdX7m zT4#R6PFBWwTA)wNa2A3Vf0%6=rAQ@03gf(JD3!5gyJ~)$M3+E@RUhqX#Yzt6~jol|eR|Ly#c|9UN8KMme(HdZ(K%|J!V(b2HwpYm*ctkt&yEV^Ak z>EM&ozvWCboj_Fw?TBaMLLf6G4#+`JcqlyUy=^VfuQ2-#bdSi{r>|Pn55S_$lNqNW zMdOzHgWyPKLE@KTfI~O=(Y*bV7QqhPEf0V}Cl8E@0S~7ymp%9DTVoKB)Bdt#nVf6` z=V`f2brfr|0Dv?8n#kN7^Ne-psn@r!mbm1$oU8RSukCz#7|ih3wJf94v^o9k{8o7v zR4M7mf-Ej1*sU!QZCrgDH`oxV>mw(<^0C@C+-n%;v`W?)G;ziHM~Tw10A~pSwjauoa{92>sK{M0K1N5H^oHOy?O}41W&xB~YT-?{~jTDLK2} zq;vn3kz9NMkKQ$Vb&C$1`IVsmH6USP)(?)U)yzirbxGsL<^R*_Oem|QMNq1COVbZ- zLBm05G3cVG0B@ta&d$W=IYnIh;L%d-d04nD+kzTQXgv2%(@@WI*=SZ{}vIKQ^7 z$lfh5DwjX1Zl4T)*w&cu=(tv z5;>ntS5_`plwQp znJL_WhAz@Z4=$GOwTL@ze6wxw^ZD2kCjb+k?8}39jT3RJYK$Ud*g8iq*7Sy*Gf2gi z4_Hl0D?KWA3e&@<3WXQ6+~rfVN^EFdE)tFAff^m0sCnD=0gt7Vaiwt>EkGFO@^pI6 z1Q4OSDuVY9sVyhG0*b-F4i27-+v;rKHyB7I-}Ohu;-BiU6=Bd%tn^4$7`)FZ=Q8Q`-HL~6ISg);ztQv%Crl1oT^@Q&9Q=o@&CR4u`y%g+wfH5q5^#NX8`L zSgfHvFr5?BLdDiF{$DM7Xzr(A_j3G~NxXtuEz&0jFdSWyj$&G8FVBc(-~ zNB*W+y&1erEI`;9haj=WroW#JuINcHn+b??oH-ax3xrf}zs{RLRr#%; zUTob&hCk|k4=>>&;uFVR{0nuOX;YvvVJ2?)FGYex8S@4hT!K)<_Yo5CAM0iN0$2b@ zm95B2I0mIN>X)e>%N^g9Eka;c@~!UH$(dHaFmsIBLPAKP@d!wTYpW0anMOa)xK{uP zIS}4G{0r6=Z6855xc-w|pqe)0Do&$2@cf3UPO(h|mz&7qPd^^7&3w8jCg-`!6byD9 zV8m9M73x#2!M)E| z!|wH9qd6rK89s^@3dD;xjM>IVab#H-j=iIx_xyx=>@3V?r-G1L${1K%Nh)Hjpdr*_ zqD^Gp6Q?d{WfUPgJd$%2q(KQ1idW;dgoiLji{ThpD!u4t-g)Uz=Bi+T=dr)_t|6wt zx#s#guIGF2@FZyzN_=hehOF?*X+Rf4G9l^qtDiA$CZ%`|YhaNJS=+PG zen$P>xDBTkJtU=qPrONxd4e}j&xV^9g2EbUfc3fz0-sbs-Ik(!X!0&;_9mQWSgeRz=;Rh ztdeI;1vJH4W&UE!_3vjMhA&VTQI!kJB9kuvj8a_ z3jYM|TRv-6d4~L<(6_34vKX)BqM<08N3PO@j6)@9mCUy*`LGFk?GYaEpFqMppo@QS zpSVWlr3+zdz2zBB#PB(R2sk8o0}Zury+?RVW|K!|%FVk)ZE0P&*}d7zc+~@O=$5Wx zV``JVt}2RYoyqBB`#wXps(kPRJbn|AAgMew4NuVZnqOr?hgBj8E$j(|UinH3dw-!o zkZRzKY+E3s=EKEgT;1noPw>i-r@f#Xz?{ypeQ&v@YUL))7U5AyD~pQT!Le(n(3iKu z+NeHwjdvDl?ILA)R^j)n%}C8wk#`_598LloOPdijjYv@sNkOi7UI^)M`aFO{-1dCy zno*r4cvd_H*BcrWYrES2{+baeE+NlEypXv(ITF+lV8kI3pM2*ga~&M^F#g<4mLP0% zjC<3x6Dq~O6*OSi710eh*1NON9+o6O7TZ=wV`$qp=cJ)Z&7O2H!SF5Lq!~5}&SRSI zKLD=U>eO5!Wai~R?up?NpAE2Dr|gOD;hOx6Rf6RweROf25kLq>r!G`Oc>p>aGX`F+ zr^ArBN$qZ|R6`pt19w~`w5tn$^J@qD-x=*-MkWf!{a3iS)5Ih*2^BmyxnKiGA8(O%)UmXpXx_Q{)xpLIG3TR#zlT=72@V6ibfY z<=T{iV>Q)PDR!=MDRE=_CS2&tni2dJ|7L&=wy*~8tp=N|GrFF4x&{}Z!CU2UFn6P+ zpLDIQe=Nw?PjdQH;eh+~vfWda?1ga^-9sKGsrPqP*2pP#&6;h(bz}&0NZZh7OhZQ~ z=7l#5VSRfDWoRH##ODl3u(Fp>a`xDayHClfuYMJTk{D)NI|pI^#_}hSY3EWUF6iso zij<1(-6~KJ^?YbQKhatw8u{t(4}A8?Gtj%iR6(;wu9+E32f1n1oBrUvKe}(8)s<@o%ZHtbod-)EDy!{fr zse@*|JY7BcdM#;_Y*na-wjRgzGyVG$%y=%vBrmJo0nkTtP318xJJc9x;p~s?)H&g4VxEPb^%wGUe7^n z!2~Y^f4||qo?X53>&PX-=v6tDd_~O`R_Y{v=ixP z<=@jM>Ojzc(sNeNRjYHNyM#w>d85?Smj0$>EE{CuyZlKwQ9M)9Mx>cEnI{WAs6XY= zrE_VUnOETXn0QZ2ltSi^((NoWDK7PJ5*i$oWXz>e5xPp$6Lu*2JLWe0kv5lY9dzv0 zO?Y(eeb@@(<_8#=n3DOv%mJw^4>^33%DB^n{^G0%b5egSnyN-gU?{$VI$`c(>nYl8 zhFaNo!z1Z`Ibb3WMDudUK0wk#{!Qm&a{}<#E>ZH!5#Dk-I^Fwp+GvlmnkQJwGo>(E zT**ytFLvCOGBl?+tTehmd^eC5_Qo_GE#Pr zm{D6_Dm<&fYk%i$W^WjuD8J#MH*V|d zcj1<-84mM==jYASLhBhX{wxr(?^cYbYSXB3w>at0>C-OPhDlwT+lXX9mh=Ol%=$FT z?eKFm55yR-Cf~4;t%0Ww;lWy?6TJsRcE&)*YQj^g|Ay6tjer~>4POs(k|?mse4<#8 ziCSrYZV|^jVtD3l+TK&!Ut8cYV6>6+ z-Ic658-wG!4sok#{l(JV-gV=i8&Zkhj?u$)+ga*N5{L0+uxsx63}``mlt;Bo4K`H+(9+R z;c`gvDDR=7yNp)Wed!E|a zTulG|fyX}6fs;zrZ!0t=3>M{5e-ZJ?_~Z+bY>Z68TW~&#GIi6$zz!Xs=xyuqjACwl>7rg@`obn#=5> zcW9oD_#ox-&8fBlgQ;A`u8_MEW`7`Y#1i%S{y$)Y1YRTpni&qgVL1_x@ZA9FaMZE;~CBIuXqbNB?L-#j;k3nDI&b zC4fR*nDcWTFL+V7C` zK6lB-hBY-co(@<<(oA4vyt*-gu(d;NnM(O6;7GKI3?0h+pueWNeKQ#cL${c`^t%-l zC+FCZ)tYS;@hy^(a@{a;_|wnZfNIJaKD>RuEM)N6s!Z?u!lOwxfm(yvq??GI)!zEH zV$jh$d|hrPf3SAlb&w(@lnlV>y-xg^2ig_O(@+upcDxc->Opk6A)iMgFU=ne#N$0&`ZE$8wh^4>PCGqhQdbk{Qn?~QyX7ZxBVNfZ7$0A~(fMi~qZfW3msyw2?S6U81*=c79nsge}OB=ysKw zx|c|}S7Iwc_z%{G&=iToTD*1k*p85&|jA=K&c0=lpJ*FEa;O8uNRPqN~SH^Entv}j7Q6D zO9Cp>a2YY!GUEjU5AM{SAU#BfeQU)v;+P+~AlZ8`^Rrs+de%_nDQW=D=o}rZ!6X#z z7o$l{siVWrKElon0cc^z+b-k}If_S#O$Z}a*cuhKb2e1vktkH~^EN9aE>>C%h zV9&?utT}B_J9zBpURr#wh>tBAtFNxo$yjOr{?nb}Pcuv8YO`94}6AK!Z{?-5cN^6lc`7{Jw`}~k;NJz%x$#bz2oF@^^DKGB@W>CqX zI|x^zhfBT1RfQw!b1I<>yX1Ihq_P;19|j~0c=bjg2JO1hX5|2~%u+y}TrjKe zv+OK6sKV(@)e7|^s{@fP^=!uUaNPXvtCkHuGx|rxL%fC~vR@t)1Z*L$WgmcDC%_J0 zG@GFd=?M@b5h_qZElb8#FdtVWKEYO*;NY9 z9tx4}P%KWLVqkG^KD*MXZbsKiLA}q+A)9NBF*pNQ6!dJr(%;k_O=?3lA2s)xD_clT zj&H#d14g6ij(&@QVY4@Pwm*dB08w<^#eNeN&i%(?JwdK$P*7o78X`$4+iZx@H@a*r z9XdK(JgU3ITZ@{Zt1#@-Xg)wI)2Dcuy_BXifPo3|P*qFAdiPgN0aBTrGnLwK-;Ryc;se z?8H7@{P^KZcg@aC}W9sXVjV{dyBu322m6IF;T7NoHjtOIT_-89oX*nBg0MY z0{AA9ED8L(SVA`(j9=Y%(s(&BBZF2ATO;P5m`*5L zM`d)!L1;noHkK21_EnO!xQXQlao#El8vPQgWVu$m>w+A;NWziGb}Y7_+xXD#IZ#^i zC3)9LTPmrrp47|Jee%hH_?k?!sxPS$R;HE|#5x!l73xf=q)7em6l1BP26x4ucM}cB zJtq~;Ns6q=we%C%8?l_AWRd1H*EW&sP3!#+dl!x6v>0_?JA6}@j8XBKh{9rEZdcAo zC%Ypk6wUV4v3S+At-ko9(m}@qUQUatvuZ|p47BYcxGE&aQX2{6ZBHNi`pP?OiVdh+ zq)f&3oLPoKU+8A{Po5pvO-_^?`*sj1volkrNJ3$c(mpQulfJ~l&5wsTbZqtly&N>5 zA;wqEgm>oayaZwUD#WZ&n&dd{(;dv3`Cl4U1vb}?q7lc4;B@#AF4FQcwXRj}Zsk@_ zn=2)Yb{Qg}D9tR@f{++o=j6o7p3nK`G&-mK@vVBGH!y#>{xYQPn0%#QMAwKM;qQ+8 znvG9Sq1a+QtL1r)>fZ79g*;+ijfvF84I`#OTzZk)_w94HAHQB16$$_!oQ4b<%idN! zb*jXemH?}MfSy#b8%PU*Qd8t3^es@*b}bt-N-w+K3G+k~dkIXES`}bz|IjZDF>duccMwg=w~1rMfuzWjM- zCl44j6~|P;Q>Z1ZYum!uS=~U#8}#KzQt%55e|9JD_Ky==8^Z&)g}GP@Dn1v!?GLqb z@h2PxEW>Olf^N!S**mh}j|mTZ_JL4N+r7g;jyKIhmxdyB5E2~D6{UClk<&pdIXAyP z+>wDVX(mIS%guhS;?%U6(?oa#&>BmB94XyuLzPH6ZO0VNjB9quq57WSc8?bp-*!0O zFb6@nE01c{)SKAW3Id-kf#j!nO=(?;CZ8FH-X1Qpc-Qo&a<(YE<%it;uqwW8CyG#O z#8(QpK2Qg*M`z8u$pi|NhEW!M;YK4qY9+bx7<;9iFH=ByiL1#$``0~fcRlnt1k%^5 zEH3-C6nD#jUDIU24vVuJsxTynkpYQ*2l>kEh*T2PZ3;vI4l=>n`wPw46$h?~10&w# zM?Gu8fgyHfV>o-NW3`RbC3)r6b$QPn<g1~X?N5Mmu(LlKyr&k7qPzy;e%3NB zTyPpQgTWSeJgIiCjcDqZryV3msUIq`mtefBQ-p8nS!b(mfNt<-<1X#H%{>P)_6S$0 zXnmh>`;<0>38j%g{xhN)#T>OMX@4AEW9g3+UG2jIA=J56dqC{VLfm>2NIs$D^6V2T z2l+M{_2*#o2mGVN*kld~VwB_G;U~Z*Jig=3K?djz^UZ-3fbeiDLObnygM9fg)NTTr}VuE*tV4N}`i5%)Q+MdVlg%f*VR7~DY{%X=mmRH&9i38GJ z8U-H`*xmES_6<{^<^0-2+?~aq9B~M$eICADl|BaSr`R}xIqVC1O!6YU6nqN%Zw_L; zvMa%U6^saP4_Dk9Og>oBwE|r`=@Cf+pof>;PNPONXcb$Z14%OXs?-d9`~ zdAbvw<0AlY8b~rc!MCKrq|SEQcRwZD>|#(qh}FG!vE*$HrCZ)GuV6iCT8p_bQ6cOv zsPxot(XivhHJ(+XW!%O>J@m2i!;S^xHf$#1)mAUXe8ZG-pr)gIJaVgMd5VoW=l8?w@j?ziLBIY zio$QzR}=zKY~}IECY{^d+25H0i@5&7DR;K>a&6wO0Cn_Jrip~ULS9Il-RvV_l&6)! z{2Uu^xvLy>z~lI02E3a+1jmVCeY3y}@+vno>N{VsK$a*5UrD)B;ikd1W5fcqRg zewpnxo;Ymnqdq|^kV6Cl8C^~wk`M79bb&}AkH`J~KMxZ_%>Gbg=#+?1)*yJUTsF3d zu^ClxK55<^a4XF#G3Tz8TIHTAftyq6#l}@(o!|iOe|*f8xftpTFWpXF__~(KQC!up z1>5*@`eHe3k*oEU&Zc^(8VV<0WO3alv4^ys*K~l7MQG*lZ6nXRe=dRtJ+E=-OA9C@ zy}2rc7xQP7e(*mB78lksG80vJ+*-Uqs)Z(_f{n2XRYi1psfG%5e$7nWs2NLy&mH}C z1PbZr8px!jNC)hJ!M#HkY*rRtGXSJU4*yx)>*&4O+2XFc*qS-YTVwiawH1HHEVT!z zHaUKvm-nga4LI49o3dgp)9UQW0$X4uXKK@qqvGiUVa>CNZP=&H{-KJ?ioRTQ5i59n z)hla)ROUqiN!G41u@Z?QxE7umJJ-)`omsq_Ko#d3#@pv$%H5WLoyD|83cf{n?H^0b zRIA*#AmQEeaQ}lH@K$ibe@sI>xty54Ai`<{F-}yiO|(>RjAeator364{@q7kZz!7B zf^Seaasj_yKV})8F7l0d!5hQdK$N;epcrP`F*jj?Nrfv6ov|dc%lg%pBaoP@-Y+Ma zRL!lRdxPT4xSaQxx}tRXP0}25jt}X2qQc`=1|R1u7M?XNn~5-nI*$ukMTpZ1ZBIES zn#nTOt0(VXJ)d${Da}hp@JQ9j>%9AGqo$?&@|jk=mo7nwA2kFRg>%J1kvr~k6-WrU zl?N8{urr5x5QS1i=F~TSV&Ah4JY5BE*&Hae=cOxrn+?HkdMD?RC~ZuK`7D3rpOpL`X&?0e}9qj5egm8^tKc*mIdev^XW%40l!7Ki{JTcG!1? zMmBTQF?r=4(^pty!9q}eE*c=7ZJVz#mZ0U9V}DQH`fsd~5(`C*DV2<}e+M8of~E;QuvI`# z9d33+ZV59q>g6?X9dYDC!rd}Cy{xXPH8y$F#?~mXuW~Leoxm>}SX=2ICs4 z`Sw^Uy!Dd0B{}sFdB(GJLeQ<9e*uoyoBX2;@AX~j3hq}<4MuiFWDCSq2IH)NVt?$e zMXu;zX=j(WV;Am;gPO;d(Mlv_Cr-LDa=^ZaQ%?j4nVRQEIcF{D$Q_IW`dgw<@cn4i zZRBwTN&&9vGRDy>LjxU;ZBKlPk#)_9x%p7Fu|JR$Exe%($w))o76l0?8Wmo&9hFC+ z9U#uW<*%G!BJ26cPMk!Jnd#(; zu|s95__e<&%@+mTF%u!F`UmI7ziFjJa_O(*6)X{!bC-w+=zeZ1Pd=J?4;vN4i1fNh z&k94!*^+M_=^V?fCbMy_iK%I`;&u`#t)q6uluA}QfT9d>fqm{UOLbI9rWyAOT}_7n zqr7(a=F4EMXiQwwH%*T1XL`q; zX|3^PKyvf8b@=bm&(v+CoU^*OR8G7%CDk-4)uWnit2eB6tH~;aC8uoWBVkoZjAE$x9L%E)emZWO(UPkwz1I$_&_M{L6WYPzWM4mW^e5OqwwP{BBIm9!RGP z0%_Sb>Heu_+)ZwHIgRv6Y0iwdPcm1P9zzExYf(FS8KX%zU}Z3XusMau$YthCymYc~@1$hdZZ zA%LPMYQ<Fx9wcko zeqaFs@j(EGuj4;;VBx}>BCHWK!YpTR+plhZzhx0VVLZ?u3^1=8LmtJMT zBTI&GFR0ehegt4Jn^h%g4bp)+Bjx<(s)UKHgRAcv7;w^yTyrkY)U6@pfAl;DGdg}| z&}6(DY^&LIv&3MR7Biy|{ZaaPhDoB6EbhevyetU>G1}rEKVInaIUM0Ub^6;-j$m2U zpp#nYy7an$(SyaPMYI@`iBk@f!T!(O^ODaB|Bms)zW#+Ns-77shhS>(|VnbI~tCX}C-kRezx5uxR3OIbhKV)kI~i zaxl%ua0<&ir0>?W0@KoymI5^xzbszZlEn={z@DI5e8#(+H=hZ;?~1^7JS)0R;1)I7 zq@RY2Ro_2fCipwoG6B;?JcWTa4!9AruToE3-SYkapB9%*K^mVk}07VhCD>p`a2ZdugBl zfnoQum-D3_h*c`uD`C-*F8q*}82**o)hw+d&zMjjgaVr2;3-dtGu_3FSKe7|KYTW1 zC9ZVH;D@{gH}O`E5`Rz$0R`lrdjCMNfy7?RjQ19!&o z`Sj3~YP$@&9;cXY@uTKiiF`skEb9=iEr5%WYJZ~--*4vqke59?eE+(gx&O&1Mkq8V zLX18WVW0;qEFH{}NC~p}H%yZ1!7=#0#*C|S5CeDd=#5YAqi1+|rr(nqZuuZhPEw4* z7}dds2m%F@?t=K+Sy+#)=5Kwja_Cm7(czXVLiZwm6qUuuIOf={nGQ#2T8+e(xC|xc zsOJC7#d>Xh^6GB7Z^H)^BZf z+TA-W9*VkHt@o3PovvK!pAPiZN&4+oV$Zx(|{%q@oH;cQQ;} z_!FCkoQybPTi=u@b(Qc8jn(@EQ#=>P`yMpY`K3J$W?i5`2~*cn^#AwVHM>_QSUN`G zV{Bv(h|%~I1}t+ zx<^Y^a6nr8xaYj36WYap1EgHsfv`o%5YFiPGvvfi3`~)4dU7HO5DP!_MA9W9UK5z4 zAEEk5qzJhl9Cz#@?so&tBO!QI6<)1_Q3OH{w+UIr@O_V0Le}I!cANL=`19gFH zBImpNx2^mY7{|h*Rl6gTU3Vv>APVZ_)K*XCVq-e>W4KRERXGBL{gpoF-H?WIFHS4# z>$>(Cdmb*!oF~K?^$yNV_uS6k(CC6U-;xniZ86RY9>0;yv;wg8$0X7=ek7e5wHw}3p8tlv~ zhyFbQ?Y`-l-6pv!I=0ub9D~$;Ep6|9omVOGjOi8fKuzZe=JFa3Cy(Wt|J8$fGo(A% zk<%x`>7q2Wel2ektR~oatr%3P8wR7S^J#KDs>2PGoDODlWM(eb0sr-=nkNV^E}(T< zDg3WOezyCu&1TTwjac#GNqxbC{@+(C_mbbF$Ot$gc?q45u6xh-eQ*Zw8RaPD(x*pd zT15GUArfUTKDD1mCiBxqg8vDxVI4D79X5ru3ud)nz6i#C0WX_53s$A6=9evV09s`C zyQD(nvTfKR5b=Ok0Sq!yL*YQ@Jud1pjW@S)pzecTC2;YG(P2(>de)0io%eH&5m{!wn?5N?%F$c)kTqv&Ijuz`hg~65BrTWWZX`bl*nmN0gF8y z6Y`H!=lh-DvWGrD(bYO$+7oKZJpu2gAjAh`)sAI7Weq={wBN7rD)~V`% zQjE0OxU5EVB*}^*0fjYieF;n5=vjcJwqA*5H$(B+3ob2-Tct5@Tw3O$b7Y`IG7nRetMM?Of#2er?^sfinDef}4NHSQHE` zcF)z6@eW;YaP<=n!kW#=^P07?e&zV9?(dg#~#dP*e7I0);PNC3M@c0bU)=_12?wDvil$8k8JW&MNTKTV)i zM@1B+XMk<@65l5QC0&MG;9DmTupM8MHJ#p zAbCP@2y}y_g+znc{=p=6DLb)iyy?4W8W^)4^Tp4#MtQ<$Y4}1|(Wwra;)j$I=9rE> z_d4sS($JUSawP-$(4C%!O8=Dw&y8ytCh#Q`NYH<^RxLRn9Re!{t_K_yUEROY zL&Hfr2~=j;%2X;o{N{r8uQHJA!&gro08~|#Q&RRlamv+=>w$JjZG=x{-g9IYK?Z9^ssRJ!Kq%#*qv6-yU>H;6dyU53cf5 zQP0^y>$1l_%Gg%hTI}ZW5vEuR^!!e`k)w(T*TT8F!Q%Utsnp!rtL*; zevz_0-JO~IquszH4ctTJ92@c>nliF{1m%nc!H@#=J^gLgOXjktqPp~&5=j^%%7i44 zNf9v<4w0u?O$d?L8S{p)>t;Skh~`gH25$-Z)B!vrD#M}RX`AWxbWHbdQAJUX-?qqt z8G8pRRh?T4S8WP`6FsR&&D>y{$vmiYEMk3Y+k&Z9U?PQtCN72HYh56| ze0}OSn1=Hw+{=HS7kED7R#qMpkihp0tRW-F%CLb?lv^Carm_aXqCvY_$HN| zAvgjir;{v$9yN@KUhr==M)ry$nMn3is^*HoTD=ZC^2{??LQ0aNe8DZgsOZ3yUnZ@{ zsI}(CSu^RABz!;0$QR)^-0q=;dz$-I4R&{=VnD>8k|WfCV<0{`S{AceGd(a-bWP`2 zeS-lYUvFMwPPSRQkg~nyi58yWCwP<_DrT$;NO7kTSN^Q@1jykWNO-gR;A}iYS^6oV zbW)>%4@>K(b?u&9@omD2_oMmn_!nn`mroZ{M9(b?j$0nu6%TG_=Ta{N8wQI~|afum&*(b!m-QuZ%ULlgsk{P5|6v4+Gp>)f8P;yHG zy_KRH7v5TE6#6Zdhe_pTiP%7C#l&re`*hZ4Kl70U>R8=l671n%W_=xCsI@js=bE%v zcqgjM-b10qd7%H%2yRt|%o{Xri{>h&F>-u^WCO9`iW2uGNabANhU-fO40E0y^@T3; zMU#j~yFH4dw~tunIdF;91g-x>{WA2O5m<7#IW! zaj}Z+Rf14&&UqB2pF*)u{NRU=*GsOsqqTAB$QnLMFQ(QStMZNq;uj^I5yQJCTDAV#<&E#>TwG@GmO!FC*(p~vf0htOi z3$zAdUc&I6O~uyw==HF=JXAE1QiS6EuVU4;#NOp}LTPg!MyFx&*PX~vKfeXp1);HgG%P&F$nZr{G~m*I0a z00a$MMZ!R}wqJA{9!!nwmq-RsQ3k%H+JZ6xW<>--EV=%W!k#w39%!EHQhZ)nCMj&t zJkO2F=UdpNCp6UQ5qi0INjw1&tQmI3Hy+(HDpW=me@Dm~vOTg6xFo671p>hV2K+kj zK5oJQBD`#G0YA!MW!L^tL`f^a4JXvU_UV|?M)kCb1t{^wu$;nMF{B*xUAB1MJP+Y7jFFch#Iq@xqrpXXnz8bDq|~{hDij zQ??(|ajAl^vz(Uyz?fCNGe|RZ69OL*36CS)@4A7WOr zfTDNc=0jjj+y{mG$>YKM3`h2{Z>Z;B8Mv1MV7uIidAQg;vnwooYWq6J%R3%5>_<$? z0IlfNOL*yz%Nqe0nKJVfeCzKateyk>7x<@7P~S1q9ckvx=$ZoY82ORYv$L(yNZB0Y zbD4q=k+d0KTv57E?oJe#W7DD{diz;+?_ju97f*(QCb|NSuNvDrZaso;;?9cSf7(Q2 zJ^>6JmBKWs@@gUzOOIMc+ithXbFL1u#z}XExF}Cd9?Yq?{(8tPzK#{upFl$YY+htX zP#NDHD^x=hTC^nHa3b;KN4)HMB;s5XY|kd>nK6aK3BYUjw>!bDV5lx^f3vKte8@0E z)J7W0sw--|!fs=7+MDhG0X+%i>raK6a> z)wSi?l_#w`11!T#c`JWP7yk9tFRg}s8OTHJRzm=u+;1UGywW~>uD3c*W8iI;!PxkG z0rH>2GCm70F)=|#!IlH8S0!h3So}YS`FZ+(93oY@-hsBrF)I>L%eT?4ee+hjK0n^7 z_Y7()>*rsow(IbxJE+s|7zqI)_Kbh#8nBAw;JxO_;KrauoRvngtDTv~R7j}eEnL%A zq-nX512L@)3ie{{oqV=1dV1e}J%pdIQ0^5z zNAw#SIk79I8QurpZl4#Kzgc;JHZs9+CUL9aiLod}0~>hG)~zU5b`2dbj+5Nf{Rak4 zpQ&TGocg9=Tj6h=i~`6%EXSD+oWU#-`;R$cjoF=+b?JE6aq`r*p@$8Nv5NA^%gz<2kk>~mycP&vpS7PLFw%YRtGS-+Y(AvDmc&0|4Ip~s4ZFNhQgBlb zXPdrNyp}IO0izP$7#0*K#4;a`%sJ%-fd)t8u4u8gFa2_YJ!+hR!n$P{t~84tl+QTB z0;`v@SK7DPy&&rppET?v8KLNlU1*Z*(k=Fej9aBSYur_%S-2oeW&I%mbJp~4>;vtvnd}&SJ4|`7BUJ!)M zMNHE?8gXJA?=V@Yj#nsr#&@z(8--i=sE7YnCQnb=p(^6KXF_M;;Z?TaT)z`45U53~ zwEl^W&2c|L*2qh`31d=wGrnV!JktFtL1SCg2n}ESQiQc{Qq>BHKun-*zN3x`g2;`y@4u258Kk3v*`T^gyrXxQ6$8o>46Hm%M5f zU)j(2->NsCRWOgNT$J?JvlsF`XWYqBp?@rz*IoK`8?PYMoK-f9CE$JCf|*=!;cEer zrT~|_kYX_z70xR14(nASPo9Iy5}`hYQM*SXz+(nitl{P3arLmVNH{QkM>nlLH&woCR9K029{*=q~IAJXxV;rer z3vfmQ?sEWWM&Fl@=C3*xUD0=&Ps~1O*0gG1vwA?880a!RW{@5v8nwATGi%B>KWDK? zYgcv3!C70}AW@{LjpPJR)>c5cOc+(cp!%y&3Rn1d1!9{qp6nnrE z9~lU`C!oaC38NIi6@QsZ?L{|MdHi}&u(CWG*R>_@^jh1{pc~&L)@R2cwke7Ivt>T5g?&Xk&y;54O1<4T0K)$X0 zg5Sn0boPIeOz4Q-%yaF{C(r)v!MDyVW*<`SGOWkn^D|dhAB~Iz0}-MMO#zT=u&6@8 z$fh0YhtJo$>PX~QY^t+!L`I9_Vq;be1s5|VOEohY#UrCpr6(Ja;Zc~<9tpzZlBxjY_ ziGKXznX&*kaAO8@usN|@w~pKhmWAfA1q|D=O(UqkWMZa)ZZe`1))^b~i&$c?C1A0u z=E-jx_;1Ho2IXWbGI*&qK{$BQ@`BZ?-36Op*&wx=*^GEd3ag1dmSUIe5pB8`2s0yO z__IF3;2(fQLlZjR-0mxiS^t5lwj>1E(w1-k1xc=f;^Yz*MNXB%~gIZL2TEi zrRyDbU#&+M2laBbjJXFLY7cJHCNpCe2r&k6qDjIix47Gak>c1z(Mi>a_&vSL$CrXg zVdn@e4cEc~WHSk@V^T3nKLy!@mD~3y+OJ-~al(_(2~Vg=%tS;9=*z9q1E)j^*Mgla zcqq`Jz6R0U`w*F!tg{X^-&zkqO@!hv8lfbfn~0Jwf%?&IVg>V?&2-LtraQv3J1+na zz%j0L38A0TQ#@#IAKG__@1;g%fu(~d(NYoa3G)EV9VVO6F>bIwR4-@JOG=9y{l6sz zsQK&Po=5a9wrgt+W(z(7tx}@8CK;xA8v*9;Xh!8H!F!+w^pP(M+^aW!;MEI)tJvN? z^CkJf{+g{`NqNPI&+nq@&|P4; zS?KIjU_mgia19Cm$XQ}LL@V`a-rGo@nx2+~a@YO~-~Bo@8WLfx_T328nQttv>;zC` z7IwhEJp7n1PhKnfE*;-elHqDyW0Q(cpWv@@FIEzR80j<;fOPwOO2qs4#SyZi`_YY*MVUIxUYHQ@=sqmbw_y3OJH zR<-Yn!ftf$Nz~I2mxbdzAS8Z`;?bSGosslz;iDYD=4GY?q{uT)SrK5k&%AcIwOzI? z>zkD+>$E?I)(LCsw?P5ds__w{1(GHPxwLjH{ql4Jacp4*)%r3QHv;cyV8w1JwvRk0 zx=FgzQJJ1f69QDRXk~rsfS8(9XTwE|tw&7oMwT==609Z(m*?c}1WEheK`CfmssV1U z)83#nRwM>|qmaHrrEG0zo4d_mrlB@fMmkzs9$uDvXUs@c58QR9=gGP*{!rW;f9#>1 zM|J}xsQM^w$ljFXRJJoHIh}97d!e*}|E0**zd1OUixyTvc!nxgRbthR1P&lan0YM; z&VE~ry}xx+2x<1k#e9)aE33FK=1|plx^Ot#cWpwduV`{E;UFY55lIt%9Y<+eo^2`A zpWg9!HTUIoW7Nl$?g-53;`&$d_kL1dFt%zRvv*xCYRPJB{9a~K#fk8%Uf6i_d-{lx ztqY`Bp+kGagrz3H2tjR+c2P!yQuXlY7?8D+@fbR!h=4TZSU^V|&9YD#q(-RO-V!y1FL%y=Y8rTZ9t*cB4J4|%NBzEFK z9u%I^%TH~Bpy>;w5@_#l1C4N!DD}LNk3}4>UrbY=RYfXYo-)@@!IU-qeynJ z(%q8$1}k>1!kt2Q8hvGg0s1&zu$h`pngdP?4B41A9A{N=&@BjFK}7kHIgRMwvvUFd zX5Wd5sd2=iKU=uEYX8{AlnMQ?02%LR3%=kMVS>|J2+^gw8g-!NuKrqYmw4hB-7*X6 z-ZwSVz6S?sxjJ}^Mb1E5E;J(gDF_IK; zYB{iTqg`V(XS}{J=B$a9ZKYs_5wugXlSLn~PSRtCk)x+T92I#T z+3=#~zpm507Zx0UPZaeCTq>0>6dAFGIe_ra#)6rvw`H@r)k(E!F z?z8u4RgdaAW!va(tc8iXpfeX;MHkdr&iQDkN{V;589pIL`TCjw%98Xrc6!&xxW5y2 zj|Zb^x1v4)B}G6CshuABndi8_wS-7b_5yDdYfO^l8?igdpTjd6N;opHUDLQe*3wT~ zn_wbG5lRdBQeq?ph*^$f<0#`6nYz5c3KS!U8D4ikgLR6gc!pgAI{p<*d|xF8A}qvd|M$0AYS!_k*5T4rf0xKpUS4`W=J{=i$@4yvA}220?VY;3!I@T0ONd zH9P&VPnUM~U&gc;e@?F`z5J8g=Guw!x3<0yAn(d(&Tpy(0Ur z;~L)etA%WO*qbbMRPYIH2ELv7F%Ik?Gc@z?>0VAh#bv>th}l%NP_H5INqY6aRXJzA z9vvPp_WC8{Z0Z9kq8H%OY@JtejtZ&Sz591vWWVD~I(dX8El$TOp9o5guf3ONZ(Ssm z^wi?D9!#qf!z+4D6Q@1HOI4kM3CA3U*OL3CB6Wo)=QpnzgY=UNpQ@a^oz+8MtM;UB zhfQbtIxBZI+GS^LWc~ELc`)}9M`cbA)D)@AeGwiG;@C-L4=S>WH#S=waEk4zXqBD`48N#FWyp=x zaEo5LL>g&Zp$j%Dk+3|b4;}jW^t27-FzX{3-f!Q8H}3XDLpFK3~$C}L442q?3*{1bHFc{bNzJ{!Do;8MiRC_xw4q#}h z;)FGMA?p=~B7xOY0zPZFTk}oDv8?TJ-3Zz#MMlqIYJRj*lU)X$8kB&}bG!Q7>C{ewvulb%# z*|YwL1}=L%G#;qpi#!1|R}Cy6)5@+-A!h>H$PV+Z|8;sp-xC&c zZuxrWTq3FE$@pRnhbnTtnA^K*;&+!VDbhdsb*v|IBnUnHG3;}(N{4w)2F=)A<-UT1 z&4<&zwj>1~HC=zg5}TQBL^h+@)=0UEIqxY0yJ3SEmwFy4A3`?fC6$X5ADq31f|mEk zaYq4=q7Z^?zhwK+8VB?JO z7C&QY^p$EmywH`-QN$G2jQbHL8f|PCB)TASTy+fwpG<%@HS%Z)i91^VSqDHFh2NsN z3UcKuonZ-}s2d&H({irozV-2D{OncRHQIupMO@9*;j`IZVeqWad`3w?iNgtEfTVf4 zjoVz>xQDYLj2wr6x$D}IrM3L;$$_q!J8`z9REoiTa|n(#O6;I>f~%c{mAz8A1LJ6g zFK{mTk&l9~w(Ua|W$ul%;E86Y5lh8_yVEUi7JcxS@oselTzhj!0C$jf95Q=da{`H?c>HB*%wO2Ae z3dfG@e!Q`1trI;{Y}e05%2g1=PY)T;f+KSzAnoZl!)~3egmA6#CqtYsS6x-bz!&-;gvdy_;S!;g(2H~pg7}tNQ+|_p zrwRc%fw4TjuC?t!WqK`w!g3IMkqYuM?rau>a6uIh`;r%POQxJN;+evwKL-i^$<{lf zL?y2snVdAV&D}BJ`|PC!*A!}1xa>k!R?YNoi8peu00nyps2W!we-H}#@s zWm%aFj6`+Q(5h!xm8Hb8OzjaGdomisz@&6L6YTJx6gI9pesesHE{4pzq`vA{9>ohC zB|7Gr<-R&2s+V$5%vWTtITii_KL^$qvX_5xEPZ8$0mQRL>JHCq0q*q;R0}^3P2_R% zW>k&vTe3lqRfRuQvZ@@mFd>h0>Il#hvXZ-Vl`^=N_q)}8e_M;OAT#`f)?sn6hz~#? zEBiWC!8rf8KiKUSwba;yqzi>b()AwWgXl1K@TYKE#qBZC);WSse?=@trvOZjOU3SL zNwA_<+0cxU_KT%WvY%21aNYivWbfHXQ4g>=NpqfKgk(N*buV&u?LhK0IBBK5Hh*Xn zuSN;2%racad1$9tLl{G66G}jN5jrb${cr{#nCCey`*G}3WR`+CTt{PQ^Pfnf;_9Sm z=J!_j|}%+-a3;OM1S_Hri+uWt5;;Ph0jeaxM;T=V4?&JblD~RqniTRc1}KvLi`}7{eU7z9-}Kk3E*80&ob>1GtdvpeFw@8)pUP97 zko&DwWLw84p#`1M`r?nc@Sm%aTi3abo$ZvW%{{E6>(GJ*QhSPGSQ>!@(GB#<5J_6! z$e~NIvgTtM`Lz1T*FqmW4Y@i2w(nOmtI5PmH7z4#VMM#H;ml{Wl1*t7B_N&?6^j=B z++Hgc7KKZ2C>6VQ5NK!Ch;w2tiBoYr9OHDiA7lTBcd3l!u_*uR> zca}_4ES{*9;4LMHawGc5ColnEwMFt=dB>QnS%}043KYq&Cmp34jJ0c%{#q+gu(Jq~ zBU~`GHM}(h3fKCkED-6u)h}*Najk5`r-0_rXRRTl2kj70u9$mc+It;|fTRJ(L2?VY zXs?x#T~d)k70ym0lZc|uOb^>*9QV}JJ5(^EO4N)+xGM8{j*=PGagNSyB|9>RccKHG ztFX`E@=n!_so9bh&an|MfR{nl@dUwy&iJN>X91yONi|GsT=^wG9uFkg>V_(|ii2mKALtmKBHy!` zrP~6r6$}(2LF?B6%Y$#`sr;l)YxfXZxb?^`C{6&q{oW~@=Q~BNaYMf|JOptx%#@9) z{D|>(f&uS`&%os}a<#9D38kS;U^BILO@tjA_P^fU_{bL;82p&??_$~_&<43j1t1>I z4^}5|1x#UiW(YBG`zCI?gz@ddO68u&R)C(uwBxFp0mR&gZ*_wg7ct%^r}k zV>IaWQV|`O!klrUuS%Nv4%PT^ZMpeQyBsN6l4p`9TmlSz*BBlxz4Xt@$>i`wy;!A` zfGaiCwxZ_a;Sq21PnSEhWo22KjP+3BUH={CUtlJZZrXv=9l4{_+h!J0Fc`@GHaNCD z(r7mvXm^#l){?!_L{j_pIe%_^*BlbpZAAH4^`J0}WN`c#Lg za>!qZl+ADiiOv7b1H=_~+DMw;8Q$ENBEQA(Y`P#vD>cQ6ZYKJY2_St&UU8kC!i?a8 z3ye|rdN3NwHW@O2w$*?x&6(J?+=-kht9Y9Qu)mau&sTf`wgf1{Bf+>9Cts)0DuYu6 zbD@x&>j&V9(3axJ|C(b#b9SpE4*+#+xqgwlR2+IaF*MTc67ZQ3UUbDFP(r`ft4;9S zY4t>(5V@|CTZq}@NhR0(nX|!3o1Sz_Ro1(5?0;aeYn5;B*${oc9>y4&ge-!8S1xP3 zK;~eT0^%G8mxL>+&1JKS(7lnk9zxE=eh-F=wjlOx&g~!&B%~Sy5wqdDn1`^}zqW^1 zUqscQgqe!ub583ddV;c%jV|dO4%Zf%QnE_hz8)Se*LX^fv@G?o*C6b?xXKDJu|Vm> z^j%+E3KR_b^o~CkYM5pE?Fymv*7v4&Tp6~tBW2%CS~v-b)uhJbYV`W)5Mm6y#d*wy z0G8)%eH_G$hdAZil7s($g+VF-n8oIl$Gars4cN_Ev9QpUYjJc|1<-x(ade(GKt^mv6Sm|)TPVrv}; z?nnyGMTptON3?KGkP?xa@AcYck9rX0=80wFIqQrIXI0~Sr7;%I$}V0Vte0*Gfh7Y# zdy_@>T9qU^=*ZSbonmELRIN1$j;lKC5|X3OXtHXA9B*>YiayVJR1)9ii_$dI(PZOM^#7s%&e7u79* zEST;`^;uSQB8?*>&Vr`hShzcwrdO*{|1P;kj?j&bx*{@YL>6u?`XwP?MFOAf^Nn!06RcEG=r?5zaYss)+ zxwqrz`*<^tK^Cg9Six4N?Nh-UAZM%VY7ppZ+;>)C-XH?JzQGY6Q3s!rGx*~ zW}>{9338fqpR|G;jBI@>Foe@j)G`|}GLSgO8nmjbgC9<%wXhC|TXK4HM4q8mwj@3M zxA%g6Gsl)d8Kh0AnftIBO$?FY zX2G^*H$hz*cR{_jR)vjjP!R3z4C!~hFyDc}P*89#4Pu~OX`iu|-#dRTLe*}4^0npn zibP@!w)~LnM)sXIOF&aze%UtHcY9L~$~I|;mQEm^78@e{E*6T$U$S75*6FGl5n{CG zEo3hJpsE5WVX(?~r1>-%{t@<)x`^ilKMM=6`znU=#(1TKm99%yPhh>(w9&RGRdc&> zE9`U5G+_D@e!w4^9!+ZlO>BV+kEVdUY0VR#+?Fr=s`FjCz_Q<}#)S=&|MxFe486IP z!WG3ur$iHMU`(R(zwvj322y@+;)B{H97r9xUs!QG1X;&u(Wn9R0T=_HJEXtri79)L z1m_NaOp+;mKxXSqZQlD7_nWB2%lNSlSIP0$a?_T_x;+LzZD01riBLb$MErmHaJQuI zR@Zk|{{x%*c@6+5s;Dm1bupH4f$}eJ{_?68$ARb;vD3PZ0^r$&bxRR#7?3a1dr2-^ z3_N}7VHSY7QK}XFaUNi^&API9>DroeB)=g@c06C6E1c|E4dM>!g-0Njo(J&<;G)tR zbtOsM1wwHjjgijmY;)X+#jTC5Bbkx z4*#9QNQ(N4_9DJ+SGnHOr%E!2?5qcv4whtRW;X_Z23|4SV zswK18j7OBB;(Zhkz^_$EAUf;fs`$fgD^S?F?m!=RF;4HgZDo;;So@rQL3)t@w2@Vl zG@jvxM6+D?nMc^RYp9*OL}9t0s&dr%P4)JmDh?F-`&9Aeh%oNhQLQ3Sx#`+h3sDKeL=eZRQYs@qJRDY~{Be&+sSiLybN7gj zs4(bO1+J#rspgam2&bspF@@;FG}bvq{g>Q9^%azNJv|pi+T+}l7bIXn#lXp1Gp`gaEU_Bzh(marLWTiJ47fh!h zlDAnEXTxM%ob$Ms2qgo9RIAlLyS-OImseIz`W2MuNP z84Osi#v)c8ewC#9pd2yT@G6ZSVB4Jgj3zYYKf6ivzZh8;q8dJyuFlRClgD&I?`X#5 zS0`TL*ynsS^8xNpxP^#zO z`}9lFVa2$bJi;+68E*V~%C1Ts&$?Pzr0$xu?ERYfBnV+{50$;wZ7?<2T zp@ZKbK#0luxKwvda#VhFd_#c1J;vms&_3om4EsxCcfY$#4DsgU%<`d)7tT&Orh$`p zpO3HJrcHevG@c$ZAo65}TCGT?k~<4-S^#fzXt7c|K57Esy&m_;tA+3I!T5W>j!+G^ zqLo|Sw^jeOme4&EuFF+N3?dCIu+^g0AYbWfzaTl}tV{t)R4V2=o1deUo1n&&;tb}) zi8iwPKdf`UX-5PO*gMoCIlm2vVM!e@h+8|%K^fy++CQB7c5L!Czxe`6a4URh*6|W38MZPRsQxz0PMbmOQySNXXyv zMW7NYqut;|-$H>+L`+526SV&}F0%1583W6%pq#p_c&4G2@o!~DaZoAqX4N~_j4nXw zUxz8{XOMe-pC~R87@~eJhhG}zneld?`yN+^BP@bHej}=`L;1=!HFeJUfdwa3Jf~#7 z7#H>k)Q1`PNI1fJ6E_*=kTdTXLCS-X4`7rsOy;4a43ZQMi#hBoh_U{&WQjQJc=zRs z2?-YuR|Qp`3I0#PQIDaVpK6%H;k^*Hh<8qYrZU{ML z?B70N9&+u(tU+_f=G6X1KqQ2)_1R+B>x&7bN~iU}{$nMlf0Gd&G5E3)lcSXLj&7qg z=D><{?k9d@FqEBoDE|*;G*16ngi>vIW1T#+L^=|ymZ!2sM%I>42xJJqV?H7;(ma)q zmRo}?FP`;+(R54KcxHV&$tR@J5U9nUU)Za|F5b3gDF9=!JUH-dmaM*J9X`~xsD0PB zYInA#Ub}sE%iM{QnPX2)NYTKsUOH+GOOy&U7Iwwcw(@n`)bapks6e z5@<6*vbUoVs61N+wqZd`X*`3g#4L;O>p*a@j}k*=?G8boB1j^9W6T!3H>x|Law)(9-nJKQzjc8$$miNHj~w%wQOC zK<$?CT;8%VNqv`^vCGKVlqX?B;cn(8bH#evVQ8XM$;uPt^~8fP7DCFB)A~ZE7y?0o zoSQ=M3l=>IGg2}kLCa1neB*N*cU>8TkzN@#{DK3-De@%*HyuW>YckFP9R+ughCd`=QGXA>8CM+Kq@FnDW|0>!SZUJFk`L98*@SyK3tQ5N{C&uK?N$=9Y zZ5|x&DH(K%Fwg}~QmB;AQ#9bYt5u1Yno41Z5BZ_=n0#WiU}U6~3{5>g2QE56tR8GC zg53l{7XPajgGH)dzROo|yt$mPr(+|Hl#X|-bB8J?H3r*__kp_1nkL=V`NT(r0%dni zHA0BpFZbI0m|5UV@N%kYjJIYQoo);Z;A4!ct(+fcm49a;DSD2T7+DTDQ{G+hb@-Qr zd?+o?EEgPtfq6yLn$j(xk^X8fpuS5kG`n|zI>C){d_P>!w$p_YPs9*fG>lC-RaPg{!NsBtg^0=2B*S(4xd$~=+nGEIVBdToLUsSO`L@;DYWTI+sq#OVFc8&!#RN1U8f9 zKCy{77MHc-xL@s{k%vggZ7c|ELL)xkH@O)0p`5}FNRIqo5`|8@-8=I)E5;IC!Z^}E zqL9{!us3b*LB#jUAEX-J3g@UB{&FtyUr}_T%f~f|k+L6nCae4x9V!v}q8d~`Jqs(m z)oXm$3S;t4W`OGXM=r>QRlvzbhCx@Oj5I8$!YZ{^jad%kRYTaF;P7DCBG*G_P4Ige zF_q`&Ln&11EAK9^9oOBFM-_&5dgHI8qebmqgS2QK#DUjJqkViMdPSyWJvQ8k&BN?3!Drs1W~8 zW0*X`V_@$j-n^G68NhF?_HWw-*_8kP(BYnzztf`*tP{~i-$gWYO&nE-iNAz(^rGme zGD@T?{o#)4_KjG)K2RMAyo?4~D%SGfFP!}!WL|4qFzb|hT+_6P z_qCedzKPJ_fvVz8LPnFPj<%BWx+?--m{?cat{7%5`n-YLWeFp7*SK(al~jF{6F=Nw zq3a zBIaMo?8{7k7$(ZXCZOwND!5w4y}(CE$`2$gHK4)F+F=Y3fd=XKn72KfeK0O;#<$fm zl({Yew`v>U=jtnS(G%RGvOPwLJ@Z62U$<@sdUTrj12ft3z3)dIKB$6+u0|PicV#9m1&uA zr#uw;#2ktc*Sqv{pmapD{rQ+Ohh{RKm}kBlX4wHbl5nPt-bkMJFN7k8ADUm}(9%e8 zsw|<&joAR+wa+QIUb3#YT$XA#J)m_4m_5;V|54kQm~=mKKxH=7R8#_i5)6;5R;vq3 zYTmkgF+lyyrXKv}I4^#x-m2x1O8h&cd}{66GAX;zd*g28@vf)2P)g&iUt~PH6!FFu;6q0S%h&4JF2 z3%ge%v#a3=lkF;vbu&8(R0iMlm*-+T@~HZ~xS$&L$F4Dh%_%NLjsAp!euxbkL#Cb=@apzBMoK$8m|NrVs$udN>Uc``+NiIaKFTx=$&(odiOEM5nYKT94~ zN^8-=cLtF7jA89PI0zh&<^k!zLm%B=^xp$z^Iuh;7=v4@-_rIo1cSqSfVx8uvgwvix$fv!5!;W*K}hA&FXXX;J?^k)=zWLBQm zFq$Bju<%lE-fzhH7mmz0FwA$~Od&1QU7)m&8tHx%)bk8j)*gPDy)!)@0Y7;8{{Y#$ zu^r#aYutBn2za#(L2g8nqHafpTq_re2JM@^TLh=)D^DjGm}`OYviZhrrasgB`Jo*8 z6+nqRb5tBk2Xx}PBsMZHf0a^N!vC3CB;*$+V15OkX%Z&@FOkp{<>Z61E8Bruc%@iN z%tPU&xesYh(RKQU!H<#Jd2IX{Dx=2Jfbw(pOoju^N%e{GTY~}&hxaN*v)Sm@T=_n3 zp=m0*P*lK?$wVGf5b{`s%352oJ9S!MSlrmr=yh&4c%V$#@iN@hZ0a=Lp3!;WqbTl= z#Ec;?cyZbp@h;utA+lDZFu`0d6ertQAZ{i=5u$!G(N#LGG3{lKG4u(dl)oRbba;Pg zBhTjoQP$I80s+Swx1xE47N_%L^)sykvH}Qmyb^Pc%8$tQ(euuaIGKc*tEin{???AivXDn>$0Yq zXVMpI%WyrT%McG#-r)E5LPg?dNf zxEVkJu;z#NZ6v?vu(ILrStIxM317BmDJ0o&TJ6h#KZ56}=DnzvHO((y`RhP>-iT-9}_ z0{m*tSV^?>#W`#vm1~KHKmGMeE*hM-Z|o5&Q(~S6SbJ%aeZ_%MWo=$q|xg?K7uDjzjbKuZ|CIc)l;+6uxFYEjzrc1OR9T|v?Rtf-N3|u7*>G1Yer#3)~|*@upo!Lf6!J& zFN24BK7b#RNAvUXwL^xwqFj&`$ypdgg-crm95?61ssM1IH$N zp+f5oVj`ehn1aO|ArW6Pm(ZKNwKMAvj4lQ8;=NqlnB8bJHhv-ZZ&d*rXsK2qplY*r z3B4++-I9BlrbFbhe!lKFnd=>e%?WD+=1~x-6GoVLa!}$Cw9;-8{{w&##6VKTTqZ79 zgk;E)=ss_0S5>fExR=X+*-dTJoN%NWGg$rbV{NE@w3c*f^G>ISfIU{|=OWS-)G3{i!!Lit<0%6$(dPj3Q_Rfh;dV1?XTXZNEAeM5KQ^ zuZ^hhyKb)+SD|MTVm6J2YoA)ANUHXHFD^&kZ9%{~w~&Nx)kQ_3t$=~*UGwIU)+ytH z-(R{sk-uGR&(xO@@qFfar{4Z~4xUP($qFj}2k-^JSY|A^gG+x-@S$`E#`mXkHw!!U zRo!Eed%0t(Bs3JIVW5_-Xsd75NJk8RL5EyvF)=QU7iYm$dz_G*4AKGjva%e}1SZ*4 zyfoomh=SR`)9|-Sl1BiiK$Q^*+iuwsH&M=17zBDkjTt#%~vae;l+W-+)OArvPyj>%sAuv+QT24O~mU?`A3X$J9< zCfm8gm3MRXTyO^KlB%=ctt&NBd^uyIspw6WHbC%Y^G>8}?pf8Ax41tQfIDQ^Yg@s3 zJ`MGCjUD{w5o{~*KTPi)Ry|K=$4Lbo>SI0Yp?<+H>v9|)M1{uzk>VsiQ5|#@*V$%| zi=BDH1R(#jvW>dOZFJ43O%Xc5qNnkRJJKVGudJfl7-p7NB-b;%=5WB4zz z;Iur;?3e6V>YoLcVBG3JOqc@BmH1|vc^z)}qepnMI5j$(1s$St6r@mWe}b1TWLWwk zkSXn#ao37>3Z=6p9Hf8hzRsZ}FQ(Fxj+~Si?Q?H?f^`W9jhQ~s6&{4by}L^?EEvZ<=MJ(z+2+ZjO$l(WvIrs9>*R~5zZZhbZR{8N~1JOH2 z79zv+7r_K zSTOA4zyHK4%4n1)O_oYxDo-oS%?g9?iHf&7f+@A_8^eAC6_TOn;qy0n2A$63>ahA; z;OU)#-b-u4WC}ZN`+rmWGZayD8C{87RBjOmAS-?Y1;KQxnjj}!u&cTzPiUY7KOTeI z25ytfky0bn3lN2N0!dE>4GedMvLjy!h*jrcy~9pQduX4*+#fmZlvcTUlz@aqr`cm2?kKHxR^m9zN zT^iRS@aF^pJTq#Jh)z56Z3Ncp!2 zDSgw!_i@TkCba}24@Lfl;t(~vE+g(8-0p{v{KMfyQ{YB=JbiR*WEiYY7~NJ%6u=!k z64|&^eMvl7&0=dcLY$lpX?BHVgZEPVf~GLyp6x+j-UbKtCmhVGCkk%WSdMgqY=?~? z6m%QDuw9tEuuuvjA&RRcDa@?W}O32{+3*@kJ&2=j?lpsQ5 zumcqsnX8?YW1skMAckZQa=3QpS0#3Boxj0|l6%Ud=U>%-XEsa<)0)flM#z(XbS0Bz zX@9goLU;8CMa)N`|G1vL+8ozPa{fAQOG` zq((*#vHHb;ZA&6hJ>B-rlFxVPP3C6|W%evckE)9pg>0wwA3i{}51^Ty20A%eg+z#1 zgq=qW+$XzB`)O&L^?YnrfA&B`r5LhQ*0ul+yzOQc#mkGJ<{^1|>x z1gJ>I@LXe(uM@Y|MDMx(D=&{MmW8y8y!SHB9Q^j6rin;$dbIiEE(VFK;sUsTDR#R3 zub$IOE`h@{&8zqfq7p;3!;!$C)U-hIJB}MP;!TC7Df~A+W5&mk1VR*Zfjv)(0zjm*5bjvp0(?!li=TuW=kF71_IqsFn( zH@Ha|_K`pU2Cb*h!>pTFBrUf$RotnZuhX9EYVvyh`DH;j#Ce$nmRR4<<{<^VKZ1ud zI8Drp;GC*Yn(Bj*8%Gtz{h~&H!Je3z_h}Jd1)}c;lfsU5gK%h`pys=7Z+s*J5g_3z zjJ?p+J0LrUGzZW*4FN{Oeg1u;lLXOc$;VCJ)V9<;W!npqn&6?a3@L{*w>UjMaZIYwH8^N41J9?98L)#%T zYUa~S0#ayc*jC%m<#oUTglN89tc(Xl`$7<3W$>hb7efM$MWu) ziM#JhR!LIg|1dznk?Kc#>8L3bA@bCdp))~^YQV7u5V7V;leI2tX6XC>$|w7xP8q|X ztv^h_u|up*gt3hCnaF!|X4~NyR?6xeVwlV67sUQUjMKU>U&P0@33$pegHqnuX_>(F zB%5-*qwZ8@Ix!(>VmMhDU%y|rN7}v0!Ct1-w$0#PDjmuCjfL&1hzJ~Nk(LQPQ*kLh z5aE^XWz;LX!Mqb?bS@GMBlMcx&27sZ<8B?fmfLZ7I`n2_P}BWxLip3pYhiCCNOZPB z(EM)fWkCFJC$YfRr z_1VUkP(m~s(*aH0bo{pUgYls?K^u+AA)|bwf>w_q=*^W$?rGp7|6Ma)WpD;KSN7zGw;oh#1u@G@ z$OW>KCY1y_1j2GTi9-$fO0fiNB1b zWM5<$O-8v1FP*d2Jmgc(4jjr<%C|6Va=l26A)i&S zK~nFmzO04^`~1qC`HsJip}C13=EC&WM)hvKrh|ufMT0)6oAyC^`ew>LLa3&1dq7k( z_F_X(S4N;I!n0rm0CI{se6+1AtJ@^gk|L_jT2du=A$<^exP5{!y(J?TE3kn81am2b z1wFu3>CPfXh(@A+Xf%{-UB@(5ARXzX+;tb(xbIkF(&DwhSR@5L3Z&)WlCkYW&_BXg zc*|!!LLCtTyG*z4D(tETr}7mrB$>KQT-ekj4&nj{H)lkHtAJRJRG(s{&ebdFtm+qP z0bR?#!PU<>6}*LnqXyKaUiUvvguh85&9dZwUib=RA%XMG0rR&4SiXF%NjXRq`BL+B zoS4WPHFc<0xL8$-0S)z8cO=uhMNr|9hf~=%yCdSUpmegq^*f|!K*y?$iIu@o$a_S0 z$;|z#Z)=rBI5Y5aV<27nI15<`R_sg8NO62~c25%iK-QIAmux91_^8~A0kGn4%567h zZRCm?vs~eClrhmIL8!MBpPWZ`(9tcLasShWr0QO#*;Zb+4fr))gL{3N8)4v{FquP{ z>UDgYdu&4V$5sS&(++D7qltVwEe5{9*aUY?mVyctZkSa2efq^VYm{1MqNt9ZZ1-5Y zNJp@7Cu9SkdNzZhy9gT&yr*XV*A!&rHv*x_rs;iIOh5fPwn5>05u(2{@5}+&@Rqk4 z`V?b$209Ex&=jG)?4TMa*d#WDG(K}S_CWPRqF56)CzX|=f{?qP4~gft`!t>7qR z3scIeH(+z|u~!8wz45+(gr8_g(sU_5Ri>uCUVn)eM+{RTivlOq*> zuL)s*#t~3f|GXk)={32u(5mHVL|A@ZvYCKbTu}wj}ig844Hs?WZgkT~MG0sj&ZMc<0S`_-H zMDJDaVF5#)0&~*x)(SY zQ;DmNXPWN}iTK*3Ww0Q}x_Pp-cH{CMd4jV$+@m+R% zd6|Z3C3rmN?__w%q84g^6YbYy#n`RM3vVZrhHldr1?Ki@()(rkGj(K7fgDSK+sroW z4nqi7JWCu~uX=^<0Vh+B@$I+LTwgsoo!?L&19XX%pl?_@HPu-HL|4@Pu1_9)l16(H zCYk~&?ayXA7lL60wIh(U$e!!8%q;i5yD$2gf@`5_Qn0Sb?7oe5zp;2zONsOcdu*G@ zmUQ`YiZ9N-oWK)pg4NSpvNt8?i|Dj%=n*Okt%=(uRH;+12v1vgF>DTHQHcU|k%e#% z@2%VE6-+Fj+xI{9pldl@i}H}j{(uc;B26Ck+cl@`R|uFp5<~&)sD(>ZuX(bPJ=9@} z{|eLPr-SNd_rVL z-#*;^?(h1A3_nC`2IK~7Y}W2%I>VC{(@iIW(bq^K3^|ZNqkP&!bDrRu797@!yt^6L z4~lz`gwohoIsY|b<(Oz1Kx&J5i>--7WA5(P=V*G7_m`<~T@iqEV6@>@q}ARSGAT=`}TlXxM-u zRAuuOAa!GjoBi@y>}>I$s~cD|K+R!~uFpvjE6Sh>RJ8t-cjHPRJreGGQCu!?BN()K z5JC23A-Jd?S(VU6?Ux1Cm=*V%^9LQjRxo0A{<@jmQQMYxR3QJ6wFo1LzYk+}kf8=n z+o~ZU2|6A|r9$$^0lNXvcan7DU&{PKQ%tB*QDXa=9J5WOvA-0r$W?sjO;JoeG@%9} zZZk!YB5B@C#+_VofZV_k z5uTO=G3hF1&BQxABUI1|ukvcm6Sl)cDZN(w-Uwxgca^}yW^}mY^swwW?{@B=&@$2boplkr>Qq4K!izxj)~AS1*ht}FJF5;KiqFq z;6lt((q>mSxTHHjiPs`@EVsk^7hj*Z-5-?@zc$a;%l7zg1~m?^AgwG>ybWj~{IW6c zPfZ^*5qWP4gur`BTn72Ky`T+``HtgjxV#q5j#SW%!1*5bi(i>jUay9H9HD`YAK>Xq z4hY2CtYF#c)xlEsfZ7729Glj&8+i_90Wz$l&wD-9wbQXhajHw#9hy4VMMAK#x7T=7 z@DqH1^&d5~ezWIU{+=u)u6n0Os4d${YMXxXfsb!VBgv|%2Zpw}LBMex^OPhN9Hj+PX`rM#-& zDiz&^Z;?b{X>CSd(m>q`F{(Odya95R3x8`m?f8O4VPfsmL$CbBKx%MU&ow&ZIGpZb z)s>fcK4sUe;^z5w|88kv49RSu`lvI85`DZ1IQszxb@^3>MXV6bY!o?O|Cp&cS7zi# zZz^HO7>3_t+3*#|8>0H5ip*#VA=yC&Cqatvu0F7AsNlt7cLJIvY;yOGgaEg^;u&ZL zj2A)a9WM^v7H%{n0IfP}uP~lsgZ-K^d6Er-R{aYByAjo~Uvk7(Qi4Icn>%mp^j#XsJvZx6J$X4KT&_o!20z4#? z>a*-I@cA}3e~c-7P#qkst!gP$^+gi&|MY!AcbrpRFi6DX%vyn1x_++c8COeTOF6Ls zyxtBAKyY1nCL;uQPDoW=S#PNYY^o;6k%L{2){D&8)yPBTT57x@>XcJz>T4}LR{JhU zOT~_>Zwo5ivMWlmx%WPgytbNuKo3I&hu0y@2DyU7kdc(v{*Z>a4s3f@W5;Tb6PQ6} z^p9rz5#tfW80-EdDTE;(Ob?WI+sCT*oB|d9ZPU^G^q|HuCe*{Nu_E1>7 zxq#;-t*lCA6_QK6Ak&;(6;YosZD0G_#WpB^3^7MRLZG4WxEjendurQ1-B$Hd7LaAs>;5xC4n1K{Q!GOw3f14xG0a$2e@8VCzCS32SMAi$y)Qf&Du6BcF{U2|$= z0NU)JWB26n8D+|*)*`tyCX{kYooP@7jH)GmV#i<(+CNEbHZ|$vB9fOWH}k`=GC`?j z06DnZ!NDiqL{(PB7p1|no#N4YiI1sdZze<-h7H+>lI0cHJdnooCE)@p z-KsVb+InxJUg$75&meOaOIj5|0k865-{)C#r&+ULyn=|MHjB1FCE^p~+$=|RNXWNN zNfod+RBmad2?op!=hZvQBDxR|e>A_E7lk>W*0U!`qv2w%Q53Vt2vB?_tbl;eybSxc ziMF;)uZ;i3KJ!!0WQ(sc^p>gJ5M1ge#{M;e@-z?^`|QoV43yBV075xRcWb>#*?u1_ zq^LX<3==V8k^rS7OEB@^GP1r^2>K#6Dt6vF8k%ejKO|ySqB0ZRNus^4Hc)vBNjtCJ zEUrZ-EG^ma&DuYewGg2Q_@air0LUBxqd^TbdvibR+T)m5x(iF%!*9djUKCXv9YHV+ zoYKCTsU$u8DV1^D`ow>-oaW-vcJKl{{qS z4eQI$2qF9DHEwKhA<$bBgU+4u!rTvHqG8Zf#UbiI#Et_sP>n0lJrU}DfN;5(a>T#5 zG1S0Nx(x47&1d$B#S1AU5{Oi46o|R_3Wej~;)60xNAbp_UHnvoEG`f+A9i?16!a>~OFpnoB&gWiSLWl&>I&`ecXG!x_6h+y!q)dm%lCL7pYA zQvoX*A+z8)-#JeXWBO+LiwOV|8FCIDnci)30oMC@{dSg}rRx}IRs<}xW<@k|OT&gj z&mqQ7E2|5T1?FPUdEb%00{xIEISa-UG0G_7u@86I`zY=jyl@Gi@L<+kpLUM)n>-+- z9>Pwe^$~gtEb4MCC$2uM8L#}I2_g6GE=3ca*_tw?s9^9MjR7CNFP4(T*(2_?wCLSm0#^fXJJ zVCF8$#*+YSfAMF5gEYuq2#S8=5<&v#L0-V+boBvh&RTC^{{yBe&Ii-Oeu^De2Glya zr=wIfp3H|X#mesgsRhB-?%J2jndAI*Elkc+?A@jW=(Z8y@Z;hGdX+|^S;L$P(GgpLr1X!jp&u(G~-iE-B> zx95?Ra1wQ~=)14juyQE=8DI|6hW{y@JRU8V)bh}GmkFd4-TV~(k3ITLvr8(Nf-P7B zWUik{3kFi0KTb|Vg?yoR8y@Aj0VDv2y{jLr4gz;l;Y#~s~t09ffg2_ZhSEiCS9_)%EVC{tZ^1h_+v;B+Uwo;?R^A5kiuq7p!e z05+0KBoEOMv`PGyMMigz$~HaC-Wing?!gMa?V~4b%&yj-JHlB)mo<>`yfvfkp&Cp6 zd)GU7=Zr`@+ONBTiFt+^fvmXg0QuSdj@ndci6PKejXhxHB@kA*KUD39gYxw8GVgxg z4?$0&pKydb8-OQ;nLGMm3wkP@4tY|%on8*ZSP}nu7B*7zbyrQ)JihW?fm4J2rlbB2 zE{Dk#^#=f6N@GkQ7QLp^T|9f52+Xi9z0sXj{C5EfQ%LOoC7qr2TVo?td=V!?~w08UU^}1|=(We_X0FZS$0**65}7Di0I6 z2yBQSFUSy)582TUwuA;4$+{iMB|@nIP{|R9%cc;trj-#=_)-RGeAXK=K52W1E=9R| z!RV0m1Gxq7VIf0KP*ASsB3J~FDNJ)j-ieC2XPv}*X|=SFH9y^)qA(hO|o%_pB>t0FO!mpb6s`wMbksMtxNXbBG!k-AxHRu^*+rqd%f|Z1sH)1-PA5RrE~SU0d;qCiU_1#$*Cc zqd+y9kIn>$W1nrN6QaNK`Kq(5Z0}wCiJ4PkbWvp6gG;5%%IQSZHigjwm2Db-jabiH zXBhQvjrw$=ADBhZ++--A$U_r}nDshg?(Z8GF&`4a-Y*>Z*Dv(`qkfvvL7|ESk)%fR zXNcwsv1}A)VvrRWU?#|1&W)k?7_Jl1D&egDtQLO&a|vH9k|R9uw}pO(|CaUJLX&iq ziu8ndxv-Klq(@&Fthg3PAB*c_P)aQ;!yx^7%Z#crTY(VWJD_Ci03X7pC8?CbD3=D4 zs_9jbpTK8$DQrT?)wdD0692E74j1fVG5fxe`=M9-IfXc&ho6J^3J^WIr+4g6jEDm6 zIoUZ<&1nR>^Q-4%!*8qu_GR*ct4Q zXMgpQ(;8r7<)C#k_=U`1P*$iHvtMhN437tNm=nGpHB-w8xxmFS#Q53nt2H>Q3`ru_ zpUX<9I`lsa7mipol;0r+Op;jz}im{FId|dbI383?+QF_$rXg z67<6^WMMRm>RHd9Q(0Nnz78i;cFE=HKPIxL2x&|8KzkK!lzw!(Qe`N#r%@KfoG$&8 zq4d>|#%_PtSX+yo&M}3P>F|9JGDqcV&3TAy(s~~C6pq&{3Vc*Cw~Uj>G`1g!m@|1=Ir}P3-pZOYTnBW>L;{UL6QsH0{-;t?lRi}PN49De}y zk!Pd>>23yQV)DczFQE}gBQI;Aydax5KKPFM<@7=G0cV*myz387c0vUkjMgG$f&X-jBB>Qgs5 zQ^3m*9D#{aQ$1UIBPX{MqdHExn7gBv-7Gj_G@OdCpZR`8t1QUM!VRlrln?6zl>*0j zw~G%jaB#!*un#FI(P`Ls>s%7ow8JL!Vz>T`lUf{2aELKimpAJDycsLO9UmLKoxHCj zU^?7l{wHBRasLVy0J+r*%-cmg)q}Wb-;Tjz0VcSAd@sCB&OIr_6#5zUUDXK@=_EC4 z5qjV%L+D-@{)nUlM!{iko`}C2{XH@kvPU+!57-#l>tSg zJ(4;*^T`fi+1;zq8aER;W8H6ZW7-&BpJ5ZvQ}C~YRgLOpH1gh=6_>8m%EC^FzL989 z%bER~2|(tj?iEaXQhg!$U zv!a}sHREnFl&UALFd;p(<~8?Gtqtk5ei??(wWPg02~&+l_&F4C6j62j=vQ66J;!(G zot$|dNecyAt;3w_WFx&egr5UX-Ru`C)XEq(fA^kpHBWBhhyx4GUz=t3HvR@=0v3?M z@?|}Bq$F&>W@BeGrjECw+HL{e{fxA=eZ&0ToejHtY{SpvrGV2%&>cF#6OqwbRnGdF zIl?k`I>vyNd)tr@+^XjZW|ZYFxF}L%?^)kEnk728S>E|~y`X23e`3b9G(#3I+|a<> zJN?*`P$Hp-jJE!-HHGV}SGeaSo9teo2(-=X(H?j`V4YFd@DwFbiyOkAGNfcrH{3@Q zU|Zh@L>nG}qERXi3T?2|r4)FgnXA_nyYJH~vT8Kk=RUM{|J~hi@n>82l6o$aMz$?6yac?emR4A6v=6RNz z;_b5?2mF#}y$^ji*7;Hfm)ECTC@IWI=fhzV33 zw$)h);nN4jA$c}KH|<`sfD6wUad-!gm9Eu{|AU;$M4Zm5Qt9dmySay6Kr2!N@UL5I zw4}|!;o9R;MvHX!mIc+e8M@0r2Lhb#33QH>^WLd^Uxy5y$ftm0F-Rto)p{PeduiQ9 zw)1JCo7_$=79|c|4%~mVob3MSOF29` z&DCf%N5P#N*cvNhGeBM}c#?hGE0DhYBIAd5tQFB0vEd%}x}Df`x2JoUI?!Pzu=sAd z*mk9GpmYjrY0OOQrtrgfN-F9E01&&%mql&zRi3}y7#aNVfWKf;F0W<- zqiU1RjOc&2JjHc=+7YT>)SjBS}>!?U?{{vao3DPV^N|j$Vs{e@%SfHyK*;u zXy56RSDRy@9*L^6un8x8dUYu|4qf{0JTNK%oW zfViNSJqmD#ZK4)VOU8jAo=T?otnffvdZ0cbG5HkImA%tLGO%6+g9+$F3@WURE^X5J zNB_@KwuN>9%G-()fSp(*H}W9rt>7>&b7`0p=KiUq2&UYt9lZ9O+g)d!zljTZN@4oy zSPP3t%w{2nFtvbOdbDFVt=GTE6+}rG@l$ioE2^?8?7!8vxU{FeqDAKZeD#EljDfve zsm$bIPDfZAA26#!ZYBR-;ItfHyYBs>BUvu|(7VVXE!Aydl9T$F+=pO86J$6k_B2M{ zX)saD3k}o#Yk??XkN26+a4s*%<=yflwd0Cax2RJFEV)CbTvdJHshoWqBv7R*)%h*O z{2FQY*kLchllV+C09s<+Ob%6dAlD@=zmNT2Ijr(Q&a_q#HY`wtcshCUR3F>95)YQ? zGs<1KVWgFwy|1-Gm?nJR4{LGY*57E;SE~r9F{-p=!jG3jrGv=XeJaKK+!=F*!oo95 zP>YIAVZo{Cj{cb4=Z< z@a3VT2Qh9=YV%xvdO54@jO3vmt0BMEf>-Ak;u_0=BW>NfhD>A}I1=mkobt`lDkLN` zp!9&bTsREEi$@8iF-iasqY?QFMo-fU-xFL>8Ve zrW*dzev(PmfSdxSeoZI&H^E80HoTDk%6E{N?r7vI)C$h@YF(C1-o!P4CFXhRxqxG<36u(`{ms3Ql%%d*o^W&Rbn7@e8V@5YOhNi z#ASNx6YO3`Hi*Ec0UDoky*C!A!;O)?!_M{7sx6;Iy{}S^_;9k)7gE}4;;O0Tz+)0= zwryVQe3ppJ%R%bg?UH0R*Tim#zDQ*gYKqd%n`HdB9G*>w!3r+-ZSUSz-2>sZahh~H zHG#oB0O-dr^}R=?c&_02Gt~YPgUK;tBo$415DbY3%^$$Dl>)qP8k-XEPm%E5~FX+f2xcaC9o)pYNXNcAufl_b@eLesm{7`lCcSRJdOajvF|c^W$X z!^5Ovyb5=|J0`+7-9@jOc}fRjDP6(7ezC8PfM>DBoYsT_xTKmbBIk|Xahor`2o^STCMtU{L}a2Hj23Srllq93KCMuoMh6#UxbhrI{gpD#1hNf9il zO5yp@E(J4I-ZGE;{b@gOI7 zx{lyT=cu;m%mvBHX5w)o3Y)c)f?Ln}kA@K5+!8+{b~^R66A8*n^KxIPSm<#`7ENPt zd67OZbJ3YX>1oa7oMFmjrNGFcCSL`M#f1gHa8G^6QYs5^ zo6&Pfk_sz#(p-`iiu_$8)DR869h|VG2|dCewwj}V|FX#wgJr7hKpdhu69ebTY{k^X zs}JN8>&;DQKw;Xo#SuY9o@=5TVbs5jhM&)0E^-Cr6==#sbKM9BDMcIgNUQ`i? zqEwY=L|*xJl~bI$dJ6ZL7jA$Z^u=wcqanqA&-fv@^w6V7Ga%4d=kuZ;!}J0S=au&# z%<#?eVNwb?xZio?n-%s4=P$R1l+_3E;e>wN9%4Zym@Nmbi7{FR8|}ze;FdQK#mlfa zxSr`kg`MI=NZNihx*8E9ItcsmGS&{EAn?8;WaG3M_@m-q8QATrXSypeKGQ(}V<}Ln zt}(CJh~)d9YE1dEUNBiS_6K5!>-vMy=!FWHrwAY)Yd8^AM&2jrU@?}<)weTYC1LPa z;f={W8qXdZw@f3UYH6sbT}Glym?ZtstJd;1`Yi|8#-P&n1}YXb-^oRrt&iGNir=U} zr!^nL2Mh&oBp@Gz0A95l-_EVh=A&a;_Q&o%XiV=(=R9SMPe5q$3$r2-2UT}?D_WZu z)X4J#t&3=g>fEeqR0PnUW;Y!nfrU6M$Ag5#XtZ8FB_!vqRU?FT$w2N)zf~&AgiSMP z!4EZ*Jok-V@%!v5Cw8hVc$8md8B5@=ZyG2~J$k&#z3uiJOZF6c9IrbPIP%g4Y@v&P z@!n(;fqe8rLxO?HK2(qO^NjBR*3a74dALpDjl820nHVKrqAlN9PHPTN$AwH2i5r*PNfEo+ z&z!mF1}ss|KR74H7IQQNGLyrE_lTm5o=b~|5C*A!^K`7W#x1S{Q^u@A;RpxY!IVci zdN_JkTNS4H;9gY5L;b!z@$dmTQfNLUM!amEDq`%k(ZuPxz~O~OF={m^-Ak*9 zPO4b1K$&YESg$b6ym?=#=-qx)Dp`>CGz85@5~fs+?Vz#lio+D#lY)KOh2-v8I2HOB zS)2qSIA@5HNrinzZvh$zUM`|B2b2=Qwxzy7u6`|p2?^FkKrNDItHqjB_b!UCKQlBO zh^p-*%!p9Q?KX>8Vh;1sf$(BU=0+R3cnv&Ut2y2cw}LZN#I&|B+uh5OMaSrVCHh++ zPu%EByg~J4me6SJ=^vO;CNSf~=+YtQHnJU!K8d0KPt0k=5gh-mNLkV-wF(roecE*d z0*Hi^JQC}5)!)+#6QeY(GWd2&ub5o-%e-D<(f|CEhuArv=cREp^~{%8x)G=u?~2Jp zAEYh#Hw`(jl5R!pTA)Xsh+LVxcS~e022hrYbqrOJVeXAqOlk`qrcr#7c*sVR_wkwy zF0%@qxiIi^<84s!0oz+2{=taAZqO++eA<&{`YR*Juyc8FEFh z>@EBR*}x*`UNHhiE@??lQ^Cci6PYi-!+Ik8S>}POBzI}RbJ1ey&&-$ytDep?uqMNp z`0TC?Vg22bWHC`0=kdwkB_$I7>OCQoMq93HNNb8>0Q{wxTm^_RaDH-gA{4Ozh0ghSvm91QHt5b0by=Fz$9DbXJW45~a2I znKLpm8ooLz6m2ldk3NXl?e`e%oHj)bnoW^Ghhp^s4k(cNm=A+1yqn-iLY-a^mbZv@ zihxCSud2P43nz(oR_bEzBNw$pWYPNvNPotM-UH=nnjSAjXqsX9BZ~H9Wg_nqcX${f zm`TA7-E5HRh7u)ZR;2v~K;#r9#kCr;9W=*I__~D_T7DiK6@u4iB3=kSyM*KBbE2hx zd6Lov-ZY-grjXw-a9ZPDf!k?;4=0hcoh-ix6NZ2K;mn8wKP$8Rw(_bWLHlH3uq{>^ zr%tAb=SZ(9>Pw8Jih5+;NHVSh77H7yZ}N?PG~A?V4a&8>AVDq=R%!k3_<(D10Ml8) z&0cmJ<`fdoXW--`Wdrb_&vti~Yaj#mj$=TA7fRIvD zQte$dihfT3Q+#&aF=c4;T`Oe@**X<>)b(J%&ubSCgeFcEyO)w5<{Pk4DMV63@gm|N zR^gg*iRd=PrU?MdrJ9p#K0w+IFNo)%p$hdj$?Ih*F3Hsr_`RaLTKl6|47<3EQiFIL6)L=#WKm!%x|uFBz0vS};VWwK2KmVv zb5zklBvdUbGNrA6#iP}Y?EKUNHWlE!=+*T2c?SB}QTb&}jSL@GwBU7h>%Ie-xvRKj zc6C^_%xYXRUR5EiqTK2nL%Yw{0ys1<%~E0+&9=ek@!U(#swmQs!)z+W zhAG^=6Ng2Iab8@+*+GDK%cjDm7x5xRQj%62UxQSPS9f&Zof|G^ox99X&Hs3hLcc2E zBN|MZur9*-6SOZMM%P1RHt<)#$4dj`comMDt>=>SwAMGAw0N$TgI;}O~D_r#aP2Y7NJ0eA-? z2T_6$;v!`~X{ZB!@i%^sz4^0A+(~y3HxSiEr`Hs57*1iRs=QH-zPcajMCN7|6N=%^&#?>=`jVD�(EG#S!)Co9H zi+Eqksmsv_rMAVgEcbj=f<>y@n;UD2O9pd|S!Oxn->4mnYXyr{{^t#Z%&q;6rQd<` zuFH&B&uc!mzT`RvuHL_{YYEk6CN5*(!L~14lZ#1&K?qQ>%Hwz%AsJCp10?2ew8kdb z9F@y*+Roc^KCbPba4)>50N}^r05GafnMu=T8@tI}Wl`$_+(Y^wRG<6K<`Q5}+q`9o!Q*CW6ERb5lABM6KHmUeNK8y{& zz>E8+ol`LWL)~8lgk!czqs?MHE%Y+hu-7$wJ4ix&%fN=8p#jw84xrEYbDWy(S&p=x zzucGuXSq7$w}vWV?}j9JthgPa%~?ZoM`{&J1(mDn;1$UTQ{cg=IXQ0Wtol0Ot`GjP z&5F!Vj4?XNk>NI9)%g)hEM4S;6`W9hL8Ww&h}O+@%~k z|2t8}ru8JaA{r;BVf&PYQI4dz%cutwd8JAxy|PraopL2rmT!Orh{ckls}|T?P$yeQ z`S_!7jsHST#h>sh6+M1S?`V6_F&+?vQM%Z3QX8HI>M3s5ij*158ljkT&R3QY0J-rJ zt$t&bH3-XhHJ^;Nbvij4Oqn!hSIcZn`EHtRT#21Y2JjzPLxae#ctR6_E%44i78Q`W zbgDXj&X9+$q_4Ntaw!Sna1SM^DSg&RR0aj=QAQ$2DL**%wO5fN@KMGOi&-3<;~5a< zWA>~AgUU2rgPT4alLu@dDs~Eec}ccakEMpwuu_9*+;fj)JcLAb9HqWPlZrWuT2xhg zL{dCl{6bu%5aO%js$s=DkDrLIW4yceYHiQ0nAKkO8wXpG)lJ)P-l8lp`ymJ~pA!2#-3Q9?dlsic|4 zF4o}w+W9n?wt1N(y`&1%gCbmfk;sChx5z(C;d-~?=6~Wa%cn)mj9Z;YN@Y%QCR3UhTL_3^PPatpE0*w3&qyeUt%d@d@pbI>Gxj0xk3Ll}na z$mhWH@t|>dWWLY+=g6cFn`&(hA_m&^?7^noRH{KN6AJ)}2i@=C40`4D`W#+ZuTu7g z(Dh(5arBp=_||afxww(h3tKXg%UG$Ck+0Qv7)j);OI)8TGN<)ZUmdy#m%8s0>P}Tg zF#s6k&Mfsho7%?RpP~^iXi!51gn7kE&p=@^lYyk=(m)1yJR9v?>@m!x8YCEUoBlHG zZjg`Q6levrtqV9|UmErcg9Tz(V~s+J6q_hFVug-$u3hrR?;X@;bMUZE>?pXkPFSY zX(cffQV9>hy}gEJG#(azNBa^u_47xkBTV?9B+J^0>F~La%_gnVQ}z1(g9*`caV#Py zZok4iYNz$UeTT|p_Cyn~hT&h@*OwUoHxtu7zJ+vcQC{0H-lYJgOFBnbuMLn)n|{Um zaQZ4~;>;G783#LjLibie-q#kj)K?|#9Y{NLmWPXBvM_pD{@&7m8_43}8u)X3^hFKCTd*Ifx<8_nSDTla5(B8r zsk_U~D#K%B$`^CeA8@@6T|FA*iOJv_fh@mVsb6dmKSpIM5$tgTs$H}WRg7_=(tR6^ zSn2V7Oq?Co+5!(BxW+Ln>Bh0>MG|Qbc_9ZRMI|#r(hdAO)n*{+PpeSNL7&1#u8989 zmfx|o;$rum@_=NUh!5(X0!n3pjiv59IHN#Zwq}Y zIBq-W0suewRBhk}GNFf+fE^JIjP9aeY9!0krpWOJJ~^t^owk`oPca~u;KjFWl3Wc= z?;gyw1qg@sJ|W0PgQTG%Lh|{OaD{0CA|JHqN!K9zwZI!$Rql&~)Y~bd74Nl}_5V}L zqSdqm)-G6=hVYC$P0S7SNdh25iOotT2%7c?!{ZZ&D-2@FXnQp>tzo7g^jJPKuC?-g zH;e&Vn);K_p+#rs8N8fnHa$@ubvK-XJBz1kD0gU17hHbwGPc;RHK&BVDQMG6a%4_W z^b4x@KU7F)MhbaTsA{wOd$wqi%VPe&AT^7X!37098`VqFuUrYAq`ZhM)Z|?NF-)&W zNR720nOFO%DYP^mKCCX!v@WE&8mZ6q6o$CO|5HnohFPG6mQwvP7JaZ1F*NevaM8t_ z`my{I7|C$2WfFeZs{!r@sxN_+s4`M9wl?As;G9{R??aUlm4roz@ki8JU;f{!j^5%{ znnmayWL(p@5iZ{;9{t#Gzxr}d6hN8bF-ABbSEA@fL96o8e5j}gwMx7Oh;;Uj;r3^R zvWG>lrWDU%mpeNV6D&(F^&a%78Ojj7G>~~jdeF0kkPa{?tv2ns+&5GcZd-bnb9{M2 zxNsr2o9Uft{aJ?{92u^ln#6*b`4MHZtL(e z=&60zs?$ho0N$OqvoT>~T_yZoe!~hyHJsEw{xfLH$Vsg-MQ9ChQ+F8K3+2ou^>XQ? zY8w`XY8tT#5lORBB`25#DksS(W!h>Z{|ES9u65L+RwTzUtAq8WbC7X2>{Le?CsC2h zgMB&-irI86Bu=L8?Dd==cS?NT-3Yf3I0GlvhxAWd<)4J_3e-$w>8R_qf6|D#NTA=u z+jpqcec`FJ^iAI#_Yh@@up#m=5S2n#fLFAV+uII-F1EH|_fr4ig^jtQ7r}WgL4ZeR zRS1o5yH8HfSA#9R(SYAZs(Rb=S|`~`u}5wAtyO{!kKHUxC{qbk`k^TcGtMiN*0nRg z-}yoD7lI~=iLo*00B=Fvpms7`OcIsiyh{dp!Er7-;C%|ZQRzw{mEpZO$&!ncDhp3O zvY(VJIdIW#IfthcD8a@W_&WaPe?{Zz5=$Mv{?tA084UEGPD$mz(W-BZ!-@L&ATGDc z`PoCPU=|w{4q8l!v#iY^;Wl%vvm(YGJlIt4OjEaKbflplBe_)A>krUY8Wz3`Yyup7 zRak`1JJLfvr$ts22ohGn0!LV!^~?``iPgj;@@}^?t!-<{ivD1KzSOf)@1q$Z?`tNv!1kJtgA-AI?8X14n+HP^+HQc&7RT_qum%IU{}e)@zEPkPlW0_`#WVD!Tck zdE1aSzDE5%UT@O0@$)3((XI9gfb*-t7?J0Ftg&~owxFbQ63qL4c>zB6Z?ub59)$!Ak5w?_{t6X1@kbz8Q31n0eCjsGoBzi|CrE zE;$8+V1hiSVh33`T14i|F_?eG0um+h2*>NpqAgQUZ(B*R-I}yG>ykM%9fz}xyEza_ zy_CCb8(&xdRBP9X%H^B^lAD;JQlBW>jws9-VuJcF_D8a-r*mU>Y>VIgkRj8H_R+VI zaYR0kOKeU+fqFY|2UB+77T4{z9|VO_{^SN9x0tI{RZ~YM8?I#}x6-ju15I0fWfi#{o8C$Nz8^B`7wQAO>w&f#if0UiPXketn%;0wr#rw10f4a^KyY)R7=kl&=HvuLBS+ z$YW8KJlzryA!jT)PV6f3W;vqXa1I{Tqaqa_yk|Bp@9zFU9 zU}*uYEW)D}3^^L+0g_3Y^gq&P{M5%mms}nJ&`NtlYW}t*m9rKb{?QS+7>6EwdMuK7OM9lVu%Ix>H}ONBmy15S z`58>LfPqzOI7?0hhGOvs%!H$$LleweSOBAP!d`sVzy4fvO+)N4YDD}AED4rP&L76V zbL^D0ibbhKU|j+7y~&9l?o*Xu6oYZ~^jQ;!^EG_F6JjAo{0xwZ8`ZLtth4ai!RQtI z<2-VauoH`5 zCmk+QXcXD1!%JXr@r<>@F}^VeQcf?LdS^ChoK+Wc{4^Ctuu9t+qU(&{S?pR&aK7m$ z2%B$gj$K$jLY(n(mh#QcF&=W=-{rcgnWx+aPv5V{TBXK?7U)}V%k48M0GXm$9(azg zKy|=kTU%(tm%c2y0I|tQ0G>O%8=7k#{_^^O5ZlQVLrZf!7Ej2dt-X@ufOf>KpvYPb z0|{GRB_@n*wq8;Fo80^zNY^NSS_-x;pdTsJcOUDn2lNnIl-~_8#d8c6P1^dZ|A!&; zv>&ZTl_Nv#eUxyMjCn0OgR#D>a{~VRc0g$7h3h@cK|4+G#Q~5VgSny$Kr0{*uesmu z>aih&2O%iwkv(6rdap`QGFn|DX|(I(b5hz7BG4!v4qpM`Vw`LqK8OIb#}pp-zTr54 zX%73NjcxiU);9XhcVdca6ere-B6oJB9ib>6I#*93m1jvE!j~83un6+J=$L!`TRvgRpY~R#=8nq`93sy=JFl?FUA{ ze&%D%Mt@d^Bb(f*9fyU}?By1rbec#Qv?+{fX`adfR~iODL8;hwSi)9lywan6F%{q- zMqOA^N?=qa9C`TdWk}Zpu{)Zo$NFi0{`uUap?sPEq>JguefoX|&>8~yrI-1h&kVWj z>hbd(8~HGWS3jc=epL_jFceuEls_V9#~%4I-Rfokh7-N>vbgd>}GA|kooqC9NitfWBAe@Vmw)D9P9)JkyVUlm(0MBzH;%`sh zb1(m_wz=y-$IE{gZ8P?+f&3d^MKptYIO}YkX!k%NRT5YJhQfg&;!(lX4YaYJNMkSn z?mUR$gTV%BdzkYu_ceD;BrdyM`N6}}^-Nir3Iy2oKS0re$E1GYdMAw4Z7~ai&eShh z`q6W9{wtcl?z1!}>MBt~9DI1ouI8y~_5`u3U`vLeE`!ZJNH^L$q|iD9fB7e9g^7l~ zLfD*=UpMzG_J?rB>UulUwP6+5csQlHxNMqpn%4K5%3#fA#Aa%=6`zSBxNMvi=w_f{ zQ_kg@6S}q1&bDx21s4E(Tf3`~DQJ25-IY%G;D#4SaV9ae=38IJndd%&FFt;{8(294 zQcI0#dh+jV(D8YLBAJ~=*6hf7)tUV@Rsnl=$WaTO)?Y#xlJYC+djnW~qf@z#c-Pl6 z!YCJZ2k5oZu$Sy|^H<0zNyJK{%)Z;~L5j@}5p_?S}}9hsiL`kL3riy(XommL~f_zi0GC0 zXt+m)r#grWVa|S_KSRJzR#1;cZt;`}f)vbUabLx+a@xZhfyW{wX=0S5Q^+F{NThA} zP<6E9VCu9q-yQJ@iWq8^WRp(ZA6~I`aVI|;CIR7R@?>tjNQuhimS+2K`%?^HnP#To zTY29}*W$4!lX<$uff`CadmDE$>nnc>33oMz&yx#aw;9OAv;HgPMPNa=dX4O`G16x) z=z-KTaL!k`sp}QU56PSauB%g6B$YK}{eMst*g8iBvBa1a^zYZp*rA3BmRUJx0ginJ z&vfr{)64ThEzjnRc~X3~s1L;(Ro?cc3wc7*0){OHeFFBM<72w+p{K^e-SM>@5?_L` z&8(0#d{uQNbVTe+{J}ksjALhgLN)(gnmR!3p?8s|U+#-{Vz|I=bNP?(NnISUht?4Y zuExII$c*dEvG}#W5$m)an4K>OnS;3Bb{^zMu7@;%`o`&uTFu$Fw{<>JRitU6RgxLF zRQr3P$dMs601nYr-m`q(G#&KdjTtBXj#x_s7s`UpY4JACmudaW%CT~mfg|XnGz09k zaIVO3*(ikzBR_%oZt2WBZoQa*f=Q|F;FL=^BKZ)AeU#=r7qp+I>lD525&D6y*Q2fO zIIvAvTarP)5_nRD;XG}Wik-D0_y07Q(VgUWFWzos^HsI|K0`bO8ZRZ-(mrFo@2x;fSOYgcp>lo$~cx<}9dpfD+xCOB@cR6s)Z0~s|YC3Rl zc6*T*5XN-;dJHoce*}caqB$M2gl_swPJ|NmhSEi_yml09FCc7 z6EZ`!y=Vj5gp9};om1f`4C|-vDxrGN0BEU)a@8xpL=l_$g{zHp+arfIw4ZsFqZ_?Q z&oUPehC;5EEme1eam$N+{S;&;F0q@ap75M5M%h#w5eDTOq1UtPLgNZComlpx3L*K_ zDcDcg(qwIKh)I6-G0R06uBXi?Bo;_`5R&~#(lNgzkcg-x|6&_U5fu89mPkpA(jkYj z`bxS3$704I?RMH8QTkB}R(>Noj?*@qzAQIesG1%ickI@=SmX$#Upl3N>5W7%Jp+20 z;!jfKUS6_qiI|%adakRu;0kvtJ*+y<{MOvt>lxcCx2&q3iOrAxo08IRLoQ`FQt=}Y zkCBV5VpPtW4wLMWlBbfdZvmg52HgBc*PqM(7>TeQdgPB z>SHHh^CkX07N*E8^s=N?TVy0odR-IvY4U~o3j+p(@q$9mHb~mibmakU1l7ic*rhAB zS5r{luuh{)Lg_dqts70=$gj*O*})I%xPV-^fJ0YJ%?y?p11ggodtR#pynQWr^gWk_ zQOFHazlq~n(`wX7GX*=Cdn2*&`}6{ekl9pQ5DV?mGPixxW)4I;SG=1J!iKBdcgQet zgQs)QOW>K2tSE7=SlTVXF?BlOS}RF)Uo4U)(RPl9Y*ZKVvfZ@BJNod!OVeg*CkEc1 zX2o9MM43FiIO=CpddRv^GQ1kgU0`i~_<8=Ov!ow1I3e?Fxvsnyq^a5VxsgkS?(v+) z-B*LCDyUG01)?&q! zCWD-TY!3oJ`-*1L^xd{_i9gp)O&A|>J+pp3C0Zyp`3c$$_#NuN1@>;AAu$d6n<=i` zBpNEb3Bp7iRLCfnGsiaKFPp8$Os+Vdr)pQ&S@qgP@tb-gx7$14ck(Z;U=RFAJ^0f) zISM`93lgZVdF3t_Tq~kE1za4*GBeqmFH1aCr8H{Ib`UQPotl8vAnsAAN%NumQG5N{ z09eF3_e}qQA4Ip1gIJ>j^(;f;Sk-Y*sgr+>_-CZRFQKVZ?O>`8NNv2S(!bl0{~HV& zmRStL8HL^2F5-z&vB1B~AQ(Zg!tIe;DnO8G4)HT zZx;jChXu}fuWn|ZbXNeai!R_CurLNQVm2xv{jd`Q{{%hk1e*DTY@&^Y+%S^Nd;Lkr zqFCL0>vN_@TgxlD_Zx8vMv!uVcuTZ4B~7nW47dz2zpUfY)G_Be9p3p(q=x!KddKA*nOU3bdP}o zjV#9oTU9w6EodBq4==yn({x4`h9e*-7stP9uvHSBPK_Wi9F%L5g8_;o=#U58|`=ZKet3AhEfDsmoTGpuZA z3|w;|%3k2f2U&AMO)AQNzw8e-M6IK%4IvEiw`aG&I6e{2mVuko2y^26d2UeTOVw^7 zm*|KMw|G4GB!z(QEjHX!0ji>;zmhr`8h}+mz<-1gA^Shd$ioc(6TD!(7lk4%DvH^h zXoOb07}T#hX_67t63@H$mHR)pl)z1#@plg%Xr9CFbY%Ld7tFmS`F=6GC@+kIzk)pq zF9!@!g~6RKjaGuuq`b0qgkrs`rTZQmM;gjO$@^g4e(DbxX2s&?rP8Ys0@QAc*Y3`Z z@z@~szP1lb@f;N`AALJu=dvg5coY{FV^=T#GDQZ|H=#rdPia)e)Y`0Ju~KC5nkt(! zUWFa+gwTR2lW;LAFdr9>{;hvMK9bS$P6q6Oe$d**@jZxCxp{_@JY z6}gdt@AQ#w;hBzE$H`+>Q_DB;X8}(_@R{V#*siwu&6rqRWZPBk;H@ovKp{2!C^gBb(^hy*$T8&ghxOA;-0rhCB;->@Se)MtV)$ zX~t`QRS&NH6EwQ$D=H8{k0BZbF&8*vjgkH~{Che8YppRw<~qg)A)iOtac#uCvIhYItS5%gjT9Nk$7e7q;#hh z235Xk4Bj{K?YWp%RNF|N#q3@Bs2$s()Q~bq{G|>9lXn}_hTHk& z?t_uoh9a1qLWb$BY}T*xEeEH5w}S#N9cUx%->Nw1FqB-ioS39+Et{7Y?rHNDt>I+$ ze$^tL#x!U|>uY#O!BSf?KdCBMcJ;94G(7Rjc2yc?$J%|KWO26?zYt-a)h5jgZ;-Ew zYpv$I{26?P_*B^*4!)D0;o1(+aZg{w^~YD;P}=)U=hUo^Czz2Ai0G;a#YiSTI#ZZ- z0q2z>S`p;D4wvjLkg{xY{}oYQ|5KIN{KXfrhpp3OQG{?Bs^6dsLILbfRSs)%@e{V( z>#~!>j}NC~w-e8BiKxgmM72s! zfwEo)nRLmi4I0!I@myxGX?}^xVR$m94OX+JJ~+aICfw(RIrjAUll4qOnxF5W6Fc=u7cF>z2*?z5k!B zWpSnY+T9bOy5_q?-X=77YMoNm&4`DnGUL^a&Vdv1q!h6Ar*%^`$+g%1^tMdH`vhF) zh)l|jK-31?5ru7qbVoPb^KI;#y-LGAfiGn)lCgF1O_fXF6{6+un07%6#j5Zje4*)c zD8s@YWoAM>U)mv9KYI6+x$G1vRUG?8t3o>B|OujVWMzIb0|=;tj&C^OCA zcP#LO_B-d(f-^LqIs2YRCl*Otr|V|@ilCbjtGE1C1>y1CCK;sQ)`|9V*qizP~K6W3IqDBWs1i zYU;~F@dcKwF9%5hHFs$XD~L3xmDj!CkXY^(l&=<*XV$1fj+T##{g5nSS>|SUTV;=i zfWYL=H%xjZ^qAzS|2UIp@&)RR+BsV}?Pjt}=IjaHwmn?-&{Hyd=t5{oNUPo&8)2)4 zPsFK4cb@M3z~ut-69f#Ke^_xQ7R^1E&iuOk;fH3y-)_LFp!ZaeHcrTlG>5tdqFY0v zu5g>Mf$4t?{(O}#p3G6C*cZ)`t8&SU$vJ(YI!VpSW^3fU7UlKir2(DCi*6Pi=iui7 zpJ?By3JaHT{wNw+=ySg zEbZC{zKt*$97f+zQ}}L`p>=aj)~K_TVyCmWPBRY`U14U>;S%XpE<~6;!F?DC{)nJ- zf2>!|WQ2ngL_udn*aDm37ZBgQFhA)dx=ChC=z;6&n0KxF@ai=` zKtt5^yvRa6C~d+5L9CQ$$so^A-fdd;66N$=1Jie}pT@DqCT>zoBkUcJm$=G5_ieUQ zEhsH^cQgpx%1`f?Y~fy|TaWe)Ww$UhQQY}4v7u*IQ~rz5EJ#$r6fDo|X)saQp5d5K zSKzvjmP>})OfV-=8-TmarrIc#LP^|D^QgAJyxPA0$-WYAIOf(fw%2J`C4dBww0 zF!0G094#4bYUaVRRAEU%2j`8W!Ts1B6LM_D$@^GW(n4ogtW3(gkZ4=#vRI*MbRI!f zDGQq&D@QX~4lKdOJ8(Zc>Wz-CpfHdv1CjTil3I@&+sh@QwtzyTsKF&z+s9JbLk*g= zA@G6R&4xu$WdMfZ4Aan2EQd`RG()CuDs_@_q&HtSxVm01On>72Xt@F#r_Ugfd?JXq1uBMm@H zZ~)lIfh~MwIu9Zsu87FsfX=6Ry^3dFHRw!}8X~qV_>67f|Ox0igDV&5&fCmS{8k~ z(h0h6dy2Crizca^s*WKjgKF6NoXOX{6C(8u5G0KCyLui}D?$rFaY3q1171Pi#^(7u zU>&uokOGaesDFgSsFJFpLyH;_F~8R1@mH5wg`+U-V7s<9U$M3@*ZAEi^dfR8XRecB zi~NA#EO0lfFLu&gxqbc#qmXI&gKU`DG8V7{hVnibNtJAo&2)(o7b#nAb;DWxj6JT@ zGHM?)c>56#Gp^RHzvxl|g{(HutPdfPQr*!4BZGm`dM->-afk9#02oCzIlsz=SLoe> zbh0X)mzaq!XJnTgb?*De_F|$c6nM-2ZhOF_=Pi?LJ8g=J|L`ne6E%tCVa%6e zt}+wfa>=WRFJ_6c?OH^0l!OA^^2~pEOZ|2WV%wA8%*H{q-8at`{x~@li_whld1UQD z!@_fM^*I<|08Ct(EAem96TZ9m?umY?y2vGZri%s1)PqeX}e1tIP2l0|+!;+0Ez0z3PWO=b10CLm;9eM>C~<9DxD-CSZ0p zAgc2#-v5Tg;>EZ=V;}4O;7PDymA7f+p1YDOd^3eR?YCjT$To|v@*{u~%%%yXx~@5# zJ?O5A(&UAjl#jJDqS{oL=XYWF`Nj-{;sCp=LO(kdIy)JvJEsXuHFw{$B;#?M1P${o zDQ7utESbQb-G8U=E-%I7;s;C8az}G+!_h(YTCc4@r=8iW-&@AUhJ%JNb2xZmtj7JN z<|bmx7B|FDW~~wXsmQX1_?y@t=+PLmDBwVKo^y0Fx(cVvIo39)L!bs3>6i@cZcLr^ z@__{L&d5K=IYl5X=YIZp8=^m(uSD#LjuWF>V0%p&i#&nISRcljxScwH^-ek4YL-sfn7|iQ(x< zCMFXvAHD*MpQ?*7TbKvZIm5T1q*OO^)+E^p2pxf}vk151KS20F`mlGc@60(MYFe{; zvl7fE+DQ0J-bSCi`nyyAjVWd=AAjjY*U6hx-x}@^Kr^H~(y8%6%s%V5v#z>Qu8>?t zh5DxKcP8GsVT>tJbgc6og9y|bGnUQorqxnmF^4LD+P>uVWaK0ikDJNMlIP<8*LHQ` z0@;Bg>y$=FZ6x|M<5_LgG}`&k_fceWn+JrhO^ChUcumN*ckUT1T$&qeuYp^j9J@Mf zQG0HEC{rvgeaB2D+7X#&>!tfx@cQ~GYB z#|3hE*|eWsh(5hQNaLEr!0SD~nt{%`4pJ(nzEhBnAJIDQGR-?p#F#JJWZeY9c%8JZ zq~$wb@}y-}Hy?64c!AA0fMUJ$Z@cEWD^SvRU()x4f`)x{eXQ29`18~sf2Deba%5=0 z@z00s;pR_IA=f=hu9ghoUb$GisoYy zBh||8G#RK_31mtX_ybs)Fp4Y@Yi;F_xpcEeQPRcd|2cmqJrJ}Z9vP=B08O{L^i2P^ z>mUZ*pVRz=IS3ZTsT*}7I0s|l{2{tH?a5{zkw3h@;W__zd@_NqEB@J&nk&D6!{#RXtS@u{x` zN|Sy$H`;kLUH96BSD7zanhm)+BBhK^XZgkEbJkCEtVUMQ9_M8nX%FGa(da@vv)tMu zB12P8k81jZjr4SJMjtU!;!x_1O~1O3cuuQN`2V~n5aLD+5cy8BpjTc1S=v`Z)2~Kb z$H1Bgz}{{LrWHh<1i6BPipnJtPHFpp=nql?9rBCc=WbwQ)y|v&PQCIIpt$lrU5dlJ z-uDj@0ppz}3>3=E7?v3pQ-c6u8S?t0E$-B=0Ct|DRLtnrs$()Ol&HBpK{=ieBsP?n zv=8K+ybZ4fQFvsAxz>8BdY<((X0X`q+lfO|h|oN`Yjm6|MaV7S`%FO!8`u}JL~w(6Mz5hGpasC2lMF6&a@f%NfOKR&llN+-y4}&-@rCZGN&Pfw(8Q( zI}apH0X0x$l-bshNPu61T;5w|pueOzes!zOlk^6O92u=<5^rju?KXt(YG^tc8)*Q8 zY2>MC4%{iXZMLE<{iz$2cb|cCD)b8vZRmLosqCd2plOkoq<}ytiUxOBMXV2Z;CUBl zvkwnUbY#MhURSf*{VENkx>X!C+8=n}*R8<05MtPbwq*ydEH$tRFKNC{Atmk7vkmsK zyp}64hxGbh*wd63#c=$OzH?Jc8fBhJ`N1d`ADl>7(TPv<5EMxZoU~`)bG}t9jMp-| zZo`Uxj<%kz_LrD0(^JN#>+4RK(VsY6)@rlgQqW`JYpu|lGzJQ-Gs+W+Vbm5zF*A=4 z=WR<)7GT(JOd)-vG9S#i+uI0(;Yh0R@BEc+fi8jl0fvtYQ2%O^@-I4 zccNPMSp)Lf?ozOzv{t_snI+Xby_qD0;kugu>lobd@e$W!u_HvYlabsbQ$|Oihiiac z&pfpT*gx>9C=X))y!l2HVt4*2IXu<{ zkyHum;Z3`RF%20KqJvu{^ReXtJ~)ZB2zteuJj^1JY089HDc^biSIDu5{m0rtKSUqq z4+$|pcW9*7`iFHA+rjGLED2;t4l{yz}0Q_rH-@ zIp1zE=QSQT{I zFFp2J%U#5onExPhg$5NTM0A(xJmxw`;HN%u+x0>(E<>~w8)v5L=p>f=HSRdS19M}> zs{Q&8IUd^==Mpu^8ICb>er;!Ww~MrKvgv033)S=0r$J*~;%_p7u)e*f3VEa#|C%uY zF6^JZXj&_ZR=M$D_i+OKtJM|umyPXx`Z(xByG;WHvLW-RwPrrRdF&Q0)XTM@OT1@V z?LSM5_jWC6JB7Tf6ESjvKgi#n7JuZa--*?hE3OCMSfd>Q?6L#NRjNc!E*~RUaa7@-DpfOxx zNYf8x6i9REwxZ<>*wMJTOm`Ei@8#NQqb+(GW*9MhSYpVGg`{N@^er`bxaD=&nxT#W z6C=ahU|<-I7v3FD$EpjCURP+Q1a3Z<)9xqX;_k4vpEzW%La=!Nox z*u0iu;j-9|ENwEC@J-Ho-hyKFY1I`lBKb|n^39>YvUtKdy!VjhzTA5eh;1k|eiZzB zLnm`Gt*?~7OCF1$zVGwed%)XX)QTl`V@yzX6#k`4j>Gr-y_?Z(^dvL6!ofw#2JWHtgMfQ+f` zk?XT5`!@H3`XJ+eXVb2Y{k46*hc%ASgP1aQA0Vt&7eyWr3w>NEX)L=yRorJe^qYV| z=SlF3=RYngFn*B6o?)azuhArmoE4g=Pm~HW>F2-KEFMp&=J2cE7B) z9DMSNFz#QkB+g+8NKZ2u4Y6}L6nggP$B0yp%skk-PJ&@R>S>OeVKZp_+YO5%mNmE38xbIu^hqhpQSr+xE{mL z8+YgHmM=NTm&gL``evbn#T0m9Nkp@@RR^|_%V{Z4@5 zn)7v3IA9PaHogLUzi#lF{`Kw8r^|XSn~O2JurDx+#Y)S8k&g+Wdk23X#hVcr(ojnH z1O;j{Bz>w5$$;EC@w+gGZWtncmAXMRbmFd=qe~AWQFibBPp1cgoc!IZo2>!eQi8}@ z%L{LqL$hRi!wa2lETIcXh1&baEU0&Jtm|SPE4`@5N*pP~D#{HsN%W_Qodm4cGU3GA z)cn|>!J%$@Z$5qbz?g4v-v*)0w;y{@Y)Nk_hhDmMEE$e83ccVoZJs7bL)JH3nu=A7 zn^s1zl+trErfsOy7xw(Hk_XMDi}bHwQ#iuCefU?XfpRGkd=k%3qZH)>z|hw^&y1;U z)rJ@mERFFUEsPxgCk(|8R)_NNafp3_rxshp9)~Bkc*yhs)uH^JJwW#U94|CbVA_Ox zUHcQ9Q;`-o699j%-`dFZz;a5#AqX87tS+&d+C*Ac^g;qSc<&9~29@8vw+g-CN5tuX z$KsZ&FDyen>)An=kp=14GKd#+hscr9MDWSHW#uaDEM?h;vU-SdcE)1A-C^tJ4rmnQ zEFBFLTCo3#?k(47dcsr4pNIq~fi-bp#u54|Q-2Sk8#c?e-e{C%lQpQT8J$wc0ua+{R-v1< zI};2?R6a^}vOm8}RhN#u-8W0d9$G(?sw>Cg8%2?$qrx4vX}(hbA!JekIgN(Ex%_w< zdo19P0<}q2^8OFeNo(t{zcHXI5;B5g$NsYgvGRw4r2x&=uby-;!jZx1B6{==n(r|n z+@bo21=>heFD`xtORE@$+e9sVlMkZ*2WQ+*K<*`5Z}BL}!X-k&hoJe-4k*Dsb*Bri zfX^&k-~EhqU1D-aY}T0+6?eCJ;CPk9A{8LyWhv$qk#~6uwrv`ljIA&92fy;mF^-l& zX7`Sbr~#-=8FD{xh%j3XG~KTIqaGZ>3(+j_L$qlZ%!&lCe30mY4q86ZXJ{U0*fK23 zIc8PS+9t5aFUhjonn!Hss7xC;7#hs*s=)b@x~s$d(r;w>@@@i_9+h%-Oa`WV5gV+Z zicy5d(-;pH(W^2kH^D*laxP|K^}K^^|CbRoUuUh73StrWgv`bd=s@7^2{2Z#V-adK z&GnWPV|D``{sOB?m1bN6H3jHjvA6$}+!m4b{>C33tp3$+m-MMQ+7w-@f?s zx)26C!~c2{4VCOQWSOJsHhD04Vg^N$@|D0B0IGm!Chqd_5qTojK{J8V6br{Q{(Y#_ zx8(IjEO1`K67Zuym#Y7;kNoY0l=_=@F_Br|ulxNVGfPa+4qzOD-^6|C8j#yl*Ne>* z#a^Y?o38fb<}+(KLHJndb9R~u?s(MmKWhs0TNnf64iivjt!&p_3D0R ze#KtCfM6)UEYRZrz-Ng0d>pJkp3z4a^Ch3!2oXd&QnPtG?SVkNKZhqTJMhh{o4%!lFNAU#co!9C}?P6*xOgvWKAsG$ci=TRO9erk_PoE|!|v^iLRIb~9(^i1pf zKLKAOX@{h0sird)LKq=}bH!GIIV?^`)s)%IStlOYxpD9aM0Jra%mkG=MX8!3A0`J7 z$X3sxX>n=5eRoD<3Z8_{&)8W}0|6gz9HB;|a&F&I4n|N>%xi4uwFL~>*G?kdPNXZE z54D&#Nw=IrMA9%sanM>L#4d{^h7f;jr7<0Lp>V+R5+6>|Q$dkUIoJ1m`y|2OSoE#f zx{eE!M6xa$YA38+T396q?0^P@#PFh-+}aSsU0h-=!j^ULD4R@sKJf)H+pp{vjsdKY zKUzngu=%D8w+IC<KH7zWG~KL53?^t(p=~QO@`q@tL58JOlM01 z4CKva(u-oR6H#s9;F4resx_mtsTkzw^t#$+mm3ammQ(A6KRL!^n-ana5Wm;uq7hsV z)iF9dG=Eg+PP;=qYM<#MUiYH3ru^_7{Uh#*Ey3-EkLkRfeQ>JG-94P6nEnO0fL~v- z^qg21I>cGrTzOXhn)o87>dT0aBQPw^l93589^j5`jEIT>hqQdqC zLq|*U#qk-ay1+mR*KQVgQ*z~%Hg;%n8xeyoeP%z|qdms${4E^tKEFg>f$F=1$!V4^B^ObV|?WB z91Wulqd&+-CT;0g8F*B?uEm3{J4Q_V6M2KHp8US>4Aq~M6e?8hS6Qhc6MRSt^Z7#G z-}3+(?1cv6IXeI z$nuO7=hU6W6$S?dtyHKI2==L2xu`y&IHYkKH`M}K)?WMXQz@|Is#=62G!cc0JvV2P z+xaM=_a9|Lu*T0{4Y4^HH052ROoYSTfneN&!*1nbJwiFk{fBHo>i)iT+YeFbPX8Av zthoe%OGbeRx6kcPqoEqE(2sfLx_D&XpdF49S6 zPu{5{dfr=P2e;g*2mO?39cU;^`(bsIurC=D%R{(kdbix2EDqj5BR<-)q@sBOMduNQ;i9_C7pt-(FVliG_ejQovUd#!eP6i>iyxDQNZmtFmR-DL`d~0 z&ezL5fpsIz-^JVGW|lsL=hs$aTWy>Sk3Ky`5clsQNmKUTuS~YYHjs4ylpvoe<68LA z^zLwwn0Ekf(g$RN?k?v>;2^+OqSd$K=G|+t0Z|au2Sx1}bYa{;-@4SW-T)p){`RO| z^4?tB+fljsNJU8}4*)cb&N%WI{ncC>0wPf+6IPGRK_-jI(5#4NRUmwg7N+2j`AWL? zq=84K#YG0MBw20`nj+fXmn?!+LB7!{8eoPrnQyv~Xw}0R;E?p+ohBlJ0zA~njt*vz zCzg>Fk|FNla=nPJ;|30vT(RMZR@aaXi0Ts_JG9&@wHk5UIobOVA`x}&;eCmne0viJ z`oJ%Po=#AUhkv1>T!$3T^s{!WP-J|8A7JJRR_>NH ztf@qS9%{#G`SEB&EI5!ZvgBUE<`iO9rvrwqNlS(PI~CMj)K(zW8aGqo`y0~`?hz`s z{d%mrpVz$rnqx$#TKDEI7N7iG*-kU82bHitA;ABLhdgYHd3RyWCx{gcrY^?$mYPb6 z@az*{-+c&4@Ui;_Y2Hss&07Z4_W^C2R$h^ETkj2UVydCGeGCC>o~9vV)-MWdGwsAxaX5sUhGNiKEU{RN57 z5Oi=E_w8}SE$4?AVCsew_Vd)iPZ0V)TZB-rp2Fzn$C)>rj!7(yk7YG_p@I=(HIjBJ zdpJ2lmzx6|&w;KG{Lqe+q$aV@Ki;od6PJU;ctV^}M2}uM4ueYlgrCX2-JTn(HBlZF z8G1rQH`r^**$naH@+n9QqZKZK>3UYNi__g+)_r?Gsl@BVbCj`pA|(JVo!+wj4o@nd z4reOU1}3Tq>F5^~+#8GS3Uh_TrNI&DRbGxw5zsoD`M{!7tqHN+b0sZ>C8L!1$4FnH zLZy6R4Lbg}V{+y=0SB0JLe>(v^T%xkH0*rgX6vUMWLsKguFL z0iOpkJCsn^yjF3{lU-03?m4jL({Pp}3kWt6JNHD9c;kuNsIdqqX1?+zKA9ElFPH|= z=$bEb2K9S6JGtc)no~eE4WY9f5S3TbWlD>q4gZ0TrO5o44SQ%8GqSOU;kDD*te&Q9 zFzB=j(**q#2l3fquV!yFvK%a2yhDXMok=KX3`2SiVs1i{IjFH++TbP7K%cl^HJ^hqcO06Jih?*>1RW&mm2QEA`hDkL8wW+F zJU&)Z;V1;(kYe8v;xtg(L*NWvlFqqnZXiTHc792R?>q^J*APr3o)OrU*j(!RGm;4L1`FDfi;`7u^3(mc1x5{(& z7SLCv{-YaoLde!+Y7kmr*+~>Hfi_6HDE5^$=A&YDBZSQ#NP0ln$hVKS#(k*PCfE_Y zrTbWBO(2naucdPr3~9e?1Qqf2-##H2+T05Ij=nsd9OqoPoqx^MSU(7UtgnSpobA>R z&ti&$x1>#eP1O0!tD#%%v>UL_E6g~kh4vkI44a0-j zLU}hQ{XTR50$g{c!_5giqo8i}%%os~F_x&v7nx?4rK_&@)nW-RTc}_1Z}bLDG46b8 zW*v8xI2hUY#z^)*zfD&VJmx-P-JRlyWQ7lHIw?V__z<1!Z*bRmy=hnYzk$6HtMYK5 zXYT_bRGl&y4dz|iT~4~U#>H#&A5W*%xRP+`VGz(QGELZ$sa6*$(+>i}eI3~~mT5#@ z9csG}5ssc4W>V3rQ_*?#65S{1;x;i!k6J>HRt$MLIjYHd0q;#GF$}RgvfJB0+{hOV zfuGoqRF`dFrp_*k5jS|jLTMCd1L zp!&2_NL%Q5G2r(|3BM{c>(e+t{}2BUGcqAprk({oL5&=7rY$$EGQura@G~Skk>}g)W#C9!UvvQNR03T~CTtqBXZ@qb+iv0x}Z;7ZBUJf8%LW0PA#ye#QIs z8>^EJh_2HwVYk~#G-EuyBVuoeD(EcDygXxOsCnw&AL4szOCvu1c|}2<0kKo7KSy)Y zo;fYPDjTVU1y_@d7w0lB{#izBO0r~3zAaH%!-*MGUwozBa2ylQ{T!srOtZ>iumvWJ zsE)t&)MnuUWh5r|s`iE#BjpIW4bPD;lAuXYQPiqJNb;hX33ao9z=O7(DT6NqdihTm_4#~&5=oBdSC;gs(7x*OB`3r;q2+e`|44i=cvSbpJEJXk~`UODqxAxWrH&8pLS8xl2ENEZ<9eD7yVj5X6Y3t5|amls8_x z>~5kM5b9RcJ&Ie>8Q9OgnweVt^!C1RsMNj`s(a)fnH1OBd?^I5-JCr;J_*2>{zQfz zx7VBU=n2oBXK2F+1$imiEp2yN%5c%gRTnpYw)k;eLEogbsTIYLJY3kXUC3t9HM`4H z3np+&dRqzhOrE1kPfYn_g}*DV*;=I>#xSNYwU=FKWDOHXuwLR1RsjQ-obkwpTq}QG zZi7Bmpk>U23T0cxMdiG_NGmwp5m7Zz5cJl7*>OS; z>xcWTob1_tGS3+xdri+BVn$>62|TG5OqSZ}XsS`8xZc?JXJa4_x)6A|M63_xOftP5 z$@Wo|VjeiYcspAX9EMlkap=!yPdT2tcPwb1KNfz)Dwpb9_IW?#C81ZJ852D0AlFpNCrk*?-S5Osq$zYIU-#^aKl`AiJ+#Woo6(wR(-0XiDCb4&LpJzBvd$7eyChgh z=HpjiN6@15i7{BEOWq7MF>w|V)y$Q;s>KI2uJsU)3*&V6c-%Ihe$Ys7|XDDtKNk z*`G3WMATkKVeR`F{N9XsGr{(oH6k;w#P(bsZLW*W%ga$ZSFEx+<3{)rsufrFrksY* zWUDtA__n{r!MNBp}yx>B6wr zI#9iQyJAf0(5gmBErfgOd$}VJI0{%mUl9EN=n>fu+Fv%cBMY;xT@HBX_He+M z^J#zXc=Z&{e|7=$hZGNUV8s)8?tU}$0g8K8kr|}~Q>SC4d4vkM)IBB@&bsFM7ATgk zLNWCIz6d{*)SR2c15S0G;U6M5Pgx4jLI_BU>9iLp}49%=R6QdKQ zv39M(lj*Qea~X+X)F)77b`bi&;B4^uFe2aZG}O7FxvRdv&{9c5KWE>074Ml*@CpdB z8{j$j{7=0iJ2|=jjJ{^2LTJeoGF+6K%|8$)d*=v}gm0Y0#dxr-8YdSV`QY4%#jo;M z4KNb-KA&Wzl+eTDD0F%@5F#-1DiH6k!Ei-c1BmUtmJ;cMwb=lPbl6Em-M<&BNQNiN z(mMrsbBoXRTwGa=W6mRf1{6ygCm(mu1R&ewK0o}ZCj7ZPWN#6Nfo)prKhf{@>z2Z1 zsx{|KLGU_}J9jyljG@_r{k-sFATAE?uLwskIrPu2W*~rGtt3 zPtve9QwJX?ZEPtlf6I9UR?!><%HwBiMFNwNS&5nL-HIjn44#Lc#HcQv1xaUBoacV2C^mSMWxRBOS9_iQ&V(;A#WG1X5K$n=-kdtp{im}Jk#8Z!vKTtZ$N>;{K&O%-jRKXHC z!9Khxl>x)aUO}t5|DqAKi-#JRtU4{U1dkylY%-gUrLW)SGS92q=X5zBuz6okMi9x- zwA_7QsG@Ac!~`RC`D@Ia7bnJ3R@WbyDt?5?W2l~R7?yb}ebq*gOXxK?n*xls)=HmT zulBk=m3z}}182x@nnY!&1CRMuEBX)DoCdi6c^ABJi{=*WZp3=85>6j-1u*2Il$!)z z!!gilARB6$@F3XiXIdId1B5mI?_ltZ`mLF-g3V8O-@Da#CR%i|Fz$z}m@qgB{(X2x zP(YqgyY-Dw1M*?$>oB1}lwZO)r?ToHlBr%oKFbl48G%?zah*EBT7m1nuTQNQxx|aH z8ZCNt{Zc$gk+zNDwshRcaD zwC$X}E%M0WWl|b?m~eX3EJEODdfVbpI_sfE0<2?Jb)+d@K?HNR*Z)8_R?VOl+H3W` zBFNn?^RVVHJ-)N)=fWN7_v*3u z4~#fbfe!JPUQ<{((u(}ktp-_z6EJh|4uKEj8@quBdi&87mc$aXQ{320%MF-uAT==o z9K4mp$-7?8?0kgDk?+A|?;WI4aFX~&h&8=z2c~Js6?FMbrt<|Y?InI;L|=PZ8?neW zg9Mb4+M6pehdSm~6m5KaKkz*i>x2=80aU7tl#x1!(8%nF*kW_PDx1xKX5_OP#J)Kr z=p|42+~=-0WNs(4VWCWw=@V0bZ*NWE>&x!`b(P_!G!xzMA<_PXHa6vd;% zIl%eg{jOVoX|>L$HnASyl@yqUwvzR53X>Mbma&08#IoRU;77p)Vm)5nWx^OX+Yq7j zT_6n(^4x41$`lM~T6ZXs9$oTlfr@ZbBEW1ZCc3^|>1q_&TRgH}7>_*V$7+ocyCFG}X7{c4d;cQHv@!=H>a#ULTjfWYHF* zwK)6|45Dsi$L*l=TWf6*5obX=Zzc{9*Y>peYg$xgSbj|opJ8m+n?=GoU2kWuDWZRF zA6p+M3Ccu{jjI8|m-rO(D6m$lL{xXsuj}Bx8n@Po;7>~v5*Nj7Q$^8R>dMpERuCpg z5Cv28I*6{!vYhEd!tqPP%Zb9KI0d$aa^)^SSlucDw{Fblo^OobOFD!-Y+L|^i zFhHaiH?%q7>zwu4T>G7tyaZ!elWV}f@LycI`IU$D7$b^*(ia=P43@4QjZy3N+JP9w z+&C%}5>Ks%s6v#}B_1g;C**uRPx9aNo;puKrWXw9@6&g{90PL~tWkTYPi`nVs1E{i zYO;d8&5wz-rx`Xx9M|y5V-As7T3*{Kkhu~^)J1k0kNS2FCyN_B-8OpJE zA$J)8x`b(kvTjpvio5=-fCgFB@r~XCmmu=&1Mx^a)bGQ6d)rSj*TAG;vG>>{v5>It zdDSh6WQ19({k-hX+I;ij{zY#7cGfNTN&g(sQQr+uyDJwb{gr1dE;&?MVmHtrZ-$`t zFJo4;#v&AKhc~FNxd9Xr+y&i1c^Sh}&P5=6R{bV#rnQT zVRAHjovbFC#5Cq1#}fvvw|fq|4Ih*xrKWRwp# zK^ONu1<9QE{^oBtrx~w1BE2|{DFbdK!;D|IUxdiXUuXP$+vIKCq~XJv!}9aqP%B+= zomEUvfXWF8D(!0O_4cJqqwb|{kw+7MVn~L(rhKtU;I~W0f>E5e$h`))P+|#7Id-*H zuDJ)ImL!1uKt0{Gs^PeZx~GKXLpba-Z@lXq<=-MgUi0A8bK;F0rppH2@oN%K7gGMO z2c=S^KM221Cj)thzmh^<26$h2^oH`QBY7YAua)+G3rl~X-@=>mIbIg#ix+q`S^y$O-D2(CFm?cC zs-hGYxvmU8&6kwNm?=Rzsv9TeWDq4{1GQQ5*~Thb?kis~gWsDz!ovknkq>caFcaZT zH{4I`ob;@1>8++Nof1OCe~F?IBYNQ~zm%i0OAU=9;v+4ikh_vmjueXfVxP)RZ0NF| zC0@AGLTkuDZT(%do!aqvSAWOPykDqabA&$0lUmQbE+Nf7F_b0VvH(NCXLpO;3~U>0 z_0|nWj`uUQwc}nac1O{dRh>rYmw2y^ zQdZ8>IN(rc?IMs67+nADGzSPvHt+Ll!h;PxI3_ivD1)CRc%Doo{ZJip6WK?f22}K` zb2{vT!?xuX37TDNJqZw3Dh^d@HW;%wG#T=t2Jwt<(CiMd53RY-7Kt$>i}}>T9Bwta zxQZGxtk|N#GatpTsdhwATt3K)fQ;D`T=33XGW@fdX+1g1p4hWCpp!m(DRd6c z%XpQ@#9ssnLL}k3Y+rn}P}wx^Nmtlvg37hU8iRHF-qWsJKV` zrY)lt6>UAUomOt^SZGLIqB`B-Rh!EJO#bbG{e$N4md396zIS(!$QFk4uBWM3C!SCfx$=L{E#^m#XC8Zf6u zFSh;3ID0)g3z>x|sFMuDRyU!(wR8w=<+JZJ0I={3w%>~s(6e(c^Ii*Ej@*jFyC$3_ z2ZW>iKG*!nj7|_2A~v_WzPrs12+4jK=}lSwwan|ZoJ(uTu6K5A1Oiesll^$C!px}G z@i}h|OYCVPGFurhP2jyQQbLyn{KQytxb|&+V|ed1WYeDH1l+!POd!Er5SA&1VSrG( z1{R`OtnF(~4i;e}+x1U~VjH$sHy|CsXUI)1g)?Z<9=HcRMhj(|m!@qv$6FTu?fil? z4L{5fjQoBC@P8F) zwh_?e$VcV@m=!d=&ONP)%PKAuDhnTSmSg&8TP56!@v9?e`LV}&d-4#FgUC5oy+kU- zz(2E`OIXV;&IE;dgECVB2^^Ljfk-fPb#6$qATrvd_NR;1B7@%)GOV&Th7A+*7x$wB z6+NIH?1HT(0oJjk8&-ToJxyd9B^6fcPIOxZ#4Fjfnq6b9Po5z&istBiG8wYh&cVdX zUm7&#UkE1^n5K89gTvs<>t`D@@*d3tHGPWDj_ouQpRu&Fu&{{$&#fQsJ`f>18;4ja z0;?<&{$NKr!n7Ds`lO%)0oN{n6AGJ1dK=fW)GeW!IDd=Nk zuyzg55LT|)o4|*7K9K?mpmch`zE7~pQwTq2e3C3XK^2^0?{_FAYg}=|`P=AE!uaC>p z?Brsv={TS)fwE40S3mCWF;02J(Mod-68sEKt{Cz;Ogw@{0^7y$qdJ&DNIE8GAy_Iu z;zhtV_zM7_BQGG?zg;!No3O6umtk93>=kC?A{Cs+;7)ddwI2l4`n2@Q?F7xGU-9)V zy*^xxh7Z`Yk1M;5pr~j&;0w?x%(lh)q@8nCL8UV#M_lw>8*llx9+ zH4)C;nTG*=2^sf&-qUHp=+4bVOZ6kWKnj1;igMKi5Y)G)(=Jf(!bEB6QKPxtV@cyUK)fedPqbnS3;-# zC-gR7!(aj~_vDIwzeJnfhr}?u!l!V>V~*R&tT2x1T)%}6aljIa<6HX2Sj7t{N>Y(n zeGeOZhTDMB=@Qz@8P}dEw6>b&dyG*)1EIl1X*O&Dq#rqM0dc9n>!~ro{zv7VI@a%~ zzN}J_9*&tbK$7LMgVaDa(Pu^PJ~HJ;4Q z-IuOdoRkXdb(;qg#b7%6&4KjfszXM`v1NN0y_&ZIWys@Sx=X`1D)C+c#y|4+#uz&h zW=Bi1@pwGxCt(n3w6b-FtQP418WpijdvznEOG;&H_Q?T4@K;D8vTMSIXenb zQeN4u@(YY&I$@X$t{zXA4x5mlb1jxq?;781*)T>_gONqk`^gE5ZWVLu8bb?eiaukz z6bMF&!y`#c)}EV{MlTi5$|;(G_mw}=%Sv2}{9uQ8H5PHd*vu5ZQ7r|qEKN6qC@($F#>lu3zB|e%pvTmPR>ek4`9aH4YD{Sqdz@41b?2$LOZ^`(ER}_(- zuUGGpRM#_WVOi(8qe1U0M2_2x@(*bk!FAS0Q%(_`wt8xxC>(b+8B~VVG6D4-4}=GO z6D77q7HmUm;fP)Oy5~ivJVucx zR9oVX{vwCxG1|D7`xIKtJ3U)6rsui<02*-7qYPqffAItW0#Nt8G*E%O%yMReU+HXf zj3eM7v0&6rjE+G1UAkv)(%|rq683rW)0LC(;nRf2Eu&AT3wBH#q97koFFvq^A%MQH zO|n9WXA!Urq8S8Jz2>5NCeQ#X8nvjN;5N@`Am*^-mJ4-NCW$rgl+m(e>3RZZF&2$C*R*R{8~g*>i~A;o zN#^>ZfqwR8_KU(XMLdWsobgl40(;_RyG|<)mzS#!TkrJ&VpJiVpt!S*wres*4X%_% zthf%Ue4{l5`^ej;%*o0NtiH&t?DwvEPj>ST5|d%f+LH3O*h<-iMB|8m-ynK&eveq3 z8|e(fmVRkGV0|}ERnT_C;C4rX8pFTf@p&CFUVB^dC|`&LuKB7M)?prDcoqB7gsr9D zziy3ukN()AhFB?%kp-;+{ev>(?hI6)oJC!%$c}M)$pwfv3pcb{RyBKyovuqp;RiI% z{NhAp-0)|3%nEw6TcR}e_!kr5nIKu0l(g@>adzk&(q-#co4p!t4 zdC*6aZAN2zLn9`_8!0CkIYUPR_l;%Ot*;3@oSR*{CVR*A0&|L|u7$OM7>@+Ak|q zK?#6DFZk>RNd?KydoN%znah$yg&PLR*hg%t>=01cvwJC3n!t<-(XzZX!r;}VN2e(@ z4>OQh&KMb)kJIygxQQ~VXaRxvh6G*CG2S)n=ZJLee(5p6_5&fQPX3uBNtsgGGuTfw z4}R;?9WNXyn;*^Nr|pVRpCh72<_@?G6Ww1W0lTiu-!~^x9Fp`PPwq{}^wwbV)%I8= z-6N9_wlTS%6E*`+e&h%W^dw(iaI_YYhkOGqyUUicV`0bn!E{bE^X1sOzgZuxDT2GB z7Oo){-}TsM39Ynv7WULctH5wQ!V{4Ix*DF0sw?j&nmxJAhR=O)TCFs=_}EI`!S9sR zm~MR2Sg`Fy+AfM}Zeg~z(?uz~UcCtvCZaKbtkaf)3nO60wsW(S*=;L)!cd#n9HgBr zM2NYc1KNC&rh1Wi$+eoB(il!Bw6~EkYL2vik|0eTH9>p@>`gKOXt`Y}yBBF@w|3je zJXZ;u#&ilK4B9tMhBaIHSYp()yKMlR#=CU@&==49t9AneAvk?=+1$DV6Ul^vz-{jkTo}7;q)o~b3xFr>NeGCsRlsv!6hxE zx!dpj=K6);XQU!Ra&`8@|%m~#BH+nhUi8SVWR~RF$=K%X^}uIY|j)? zC$Nvz6Aul7<@FnWNCG>5SHgBT!C`1#qrF-pZ0|P%Uo_ka>NL$bEP;SL{pjWvymPs5 zk3Q%R;{Jj$WOjP}(MBIM%%>~()KPx5RY=ZYcCnNDiSVYAc)x!o6rtDfLJ9xl4L$jY z$Es?-xk6Cz*LPQ<9Bp(9MYfgSAmF&@%GfHUVclgdJ4O)cdBT9cboN$mt&t;By z#Pba==9+xG7Fk&>5_*dREa^tz74k?@eF4BOuV2F4C8!FSE}2oMFDxQeTPXDyV;UGM z7y2aK4#$N^_E|v;5yZqm>=sa|HqUEW-kRCdMpe@u1-E7c6CVR|1el>wSO?2s_;d%t zP_=w~`|RzPn7m|oSKQN`Bi(|lhS?`_$$zAEq7nYQP`-7WyYC?XBWu-xb*P*yEQ}VO z0E~U%(IqALdE|vAIxfO+Kbh|lX8n48@Cz#cd?`(GNwb%n-rhV!0z^o0FT7=Vl)uv} z#fUuGO^Lwy1(gYXkgh#&S%60&9|&`=D>)21BJ1-RhfuJz+1I-(>CUwT89QA(J%E?N zOp%>Y4-do<0wL_FkV?eKkfy(7`Zl=U-)bGr*5qFX{B_kbWt1HH(gw~mB1Tjyh%w4? zyWNUHYtI&L{1n#5Nk7w9)}~F{F_D8SJVB+Z_CR{I?m1#D3WK30CUXV+pz$PP43U4M zxZ3*CZbiH7N4x82{V* zpDTp-0woI}>Gm%xnc3e0pz@M!s>)2EDFN0f=@>rpa)@OKp1Evz?K{Ke|3ltkhRCSU zGKqpoS`ym7I6VomKP~<-KahglH&Gyz!w{C&jpW9or`d)56s0Pksv1%f7SI(B>Lp8k zP`$#t8ww4ya|S7j@1@%(Ah>p#UZH_{qk!o<*%sH;#Uo-U(H2+3X$Bn41{~4DfS+@3 zdu_7@5<2_I1DKLB?&x^c`nX)tvDP{W%%?-{X0~t<0(tLaXiK+kr$qQFmL6cL!{;q@ zpU`s&HAm=mWT27+qEF*H{eCpu{(Wo*nJl+Wre9$%#+YG~v<*-pTy91Or-!#W4I5#- zq5|T_n4aP99O;)S)~qOz#bw$ECGC!CF;LS#X%`Yv(h54^g^2PUL1D$g8DJpb&!VJE zk7rFWuojiQnKDBmwP1N$2q8O2hX9K%Yk1s@p3^ybL7P)DfuozYJ^Fuq=MRWMU)V#J zK&79O7?hD(6RKR>f*oq^b}G3v*?qGovm&?jd7k`K#4oee6(!L^j02!_gVGld4ap_WSYi0|OTF#)ypXKFz9dcg~u_{@)3A2 zORjYYXTHh{_?t){nv9^+#ySu+E{Px(P6uxNO7p}W00YP){1>JV7ZMZ0%@{8;f&g6P zQX{uP=J==Xoc|OAV0eJjUm+9fdp1jq(U0vR`9frD4bXfR)YP?x>P$5klZD(VP^ zO5{*KCsw0MfyJZIcex!$P4iH*i@pc>fi&|K%q1Te)%!T!2p_t@q6NyotzNY!V=}i| zB|EIW<`u_JZ%t#DrxWTv=Kq_c=NR+#i|e*%R*{e5^Z!?D>H_}g;zLp@DLsvXQja8P zO9upo@?1x^gJb~A{W|a!gN-YK;qo!WH}y@>z8X;A%7*3)NzXhd-a%J&xoJ4kmBDB5Lu+slf+HuY&F@sPI zKDGBCT?DY7lhZ)oQhuUoxHJMW6<_(cM%j%tWKVvLVi}fPqz%pmcm|>UyjzOSUVP6CbJt>9E!acsA zm-J36$T5R%_KBSQy;95)zkTB7fg+VYjCrWXz$&&oOw3#A2rH@;v@Z0R^*98z4)87h?UM%!9_; zF~Oisafp{x=7&I@dfcJMfOgy2`cz`q50iqevT?SuBrZT^X zMfC}i_F%7{^~P6t;Hjolf#tqqHc~ewd6SlttLKmuoD3-g9Hb$mEt*-CV=F;bnFiit zgbtIZIBxpiZV|wbi}8C8Kw1+YY90|F{}aKT6~!>;3Nv2$Y2JyiI6obj)=axlMo|(dgD8%G_jYjhM;yEpIgUZsXk}AVF(%#*mgKL2Tqb zA(lFYg?98O5q<*P!l3Qa%S5OWj}L!r&??A4Ec8bbglT2TGe_R&E_e)o^e=%FzQ}I}7C{sKWeoHNF);4> z0#CO$Ks1-X0G@b0FAoE`8+wZ9ygGUefvA~Ck1{zM3XvsH+egN6EROGa5>p_ghj<}A zg}}Ovk8Zv=HKJk*%jaeiaju3U!LQhsaA_72t?mrW8k`IuTH+=(B3UDPT@6 zqgy^~iEa*~d?ly9g}ll@D3T;Zp%N{COFBR*9!r?ZW}I7nhwHpA8)P2xKE<#5ljacn zF&7Ktl9LD-qYf*Np&l$+0ALxSiVLMwKr2P5WlL8*VF`%SJ9_HROK)YM*M5%0n^pc5 zO8YkfV;0b&Ayc9&nZS{g_Y3Q@YiD^Sx%El94uv0DxOK_r2LGfA*MjV>BzlfH0>8HL z9YB`;5D3Fi&56MWcV!m2Cab`ok$-%~T2AXat?j4oVP{=e{Wt^l+UJJz`&wQm9x} z`~e}PH#gCDsuW(nGBRQu@TYyo0D@6@{1rf}5eBylRxop)D-g7?+!e$Ys7Ouh@1+XR z^blzN5&=_faIqMC`Pjv*A5CF7EC~pS5oh}AtPRR8#hOm*&9b5XA1i%OO>BZYN?)Ma zh<8)B-+ds5(C*9iwZ}H_K_yWD!tR`#Kt#SIJEMP0o!dKjrt-NMV+d)T2IyLru$k)+ zr)bISl>LiL;1{usd)9;aNBCZ?j++LD`pyw|-Prd{e?E5HK%!cQl-cd$xD$j`Hs8e3 zd}o(rs^&1H4;fq~)|oF?wrKuFx?BzO_B-ooA0mE{7Ym05*d5tp3i5OodNzzpao%)o zByZMVT({pQ#8CoNRV4{`K4RK-9RK7x*eW9c;eXi~PN*9_La%?+%py>AHfo~#eZv(~ zSt+VcX%ev#QeVwiHf1n~CXo5WtfXCWkY+!gnG_miVtaY*y{a%Ax~#J~)7*D{;7Fwg z_AjiBkyaKZR|0!cgrM<9KFvnu6r{he2YcT=Oo_Gf%@5a_l`fR#JT@0GOl9}Da}F~c z9LTYlPFYC13RRnW3NXCCdmL)9G64usYwmzdL5CQa4VRPgz8*}|Aa%gq)H$Zoy@_n0 zmQ#+A9_BknqO-glwJ^u1p6uWT>9!Nta7fBI{DB?ne}VvQCT9n(R{3Fw=?taxOP)$` z4P=%%;acLScQa=cnr^A#5H|-9uOn*U`vkKx z29&Z}wcNhA|GnGWlk;t)voPhV;p~)J`7o5;n~oRnm>i{q!}*4u@5M0f!I-`%Bx%~^ z8$t$Sh*iQ@K{X>EihGu1skMpMAc%%1ksWX$%wrq3!1K7i0E4n|4m8wveFEgHi8Wtk z=OvF`Jy-Rl60Dv}K7bqnwNDG3qOD|sk-DOhU6^TWfy^4;9yJlkx=KVny61#)n9@c_ z@AY-hrBe!I3a{*lzBOza00FdFmWm!FGm9uX@$Gg>)~Cz@@pklxnR|yLW>zYCs~&2Bn5+^t=!7k~3b)O+ zy@wDE3`Wv)KH*#JsXj7sp<0WbFCOip3k6O7ZP0_K-UCHyZ+IGTd=VxHu0vb& zh+_5M+_RzYJaOLKN81(1{4D04i@4q~RnsQT^`G#iCYLJ$Kb9Eg2o^-JU3IaNq5l&+ z%yqg&)cL4aa01`ibDDt+z`5uy=iFWiIyu0e>u0Wnd83@if|*{V@Mc(h$m) zD`|MxEW#(KOtnfr=L}oRKhC*ld(vS9PQH|ouqqZy)flLtp|sIGfUBfcNtOKQ^tl=adPK6a#p+5tx#}B^jl*r~+Phmd`H*SKh%!Rb7y+c7Fu) zLNriC5_Sr3R_RPi2F;WHt&1U|WW)ka#m}rIx=yZjrV2Bm*-K?4CKi%tJ7> zpld#7+=cuLz?m-0V~ZN%tfb2RRSVuq$3nOKoX1|{eEC%Y%CBGPJg3sbdA^_+}+>`i7s;;q)ez z9P2==W(qYwg%OfGXcHo#IbFZH4x0Fn>vcN}_Pk=JoJE*J&t#5T0H8{T3Zi7rjZEKh zY|)p`C}}B^9`St^4RGq$MG$3*IOS=;sD@0&rE6A(g=C$Ioa| zq_8l)>89Et7o%g*QxoqJV=u0YdGJiVtX@$VNL^rQmW5G99^2b)Ro-;oJxG7duA z{NqKP7$3bkrj-hbz=$x}REcA*!U-3sjZrcX-$SC^3bxLrq*Px6OO(_ze?m>-^h{I+ zXkqHXTH+O6J=@0EVV z0xc~dB%ndTLKKeZ<7-CEoeP^W4qM0X6$3R8`SFk5VMAIQk5HUy?&JhYsBR#?h%5?0 zMe^M{-G?8CGOzkM!1_ilpH+?eEitu;f}4Xf-|SF1UPV{F0pNf$+`(ChdBjN|d18m- zrzdywEggLPrQS@a)e0LM@WcC8%$9GR3qAV4QC|I1HM7$O{+_IX3drsvUC%rF-j}=s zr!eFHa}8+@Xu715;)JX2_(n~b^xF=SuGGCF{q@n}Pi^*Ll!=q{=ab^!cl|*O#aYDd zm(rfzlk_DrPBd%;_s2B+f{XNfiI#g%DxMpFD=}!;_+rj!3Md|bz=GKBGzYaqsvegb zvnAuQV&o=lZ(Vw1bh97|kEY}dH?@_-j?rK?GZWJteW3oRo{bpvOqrn1Lu*0zbrYJr zn2Qm;C`xe5M)*(JZhh!iT1*#W=DgWa>cm4w9wsU3IzTY~O}26pDNN|OnhbrY2=N!v1r)xh^Yo<{!k0HW!*Oz zu<|t!m-4hFGjZADUhi(JkQ-3S|J)i?4^lK&E!}!1xBj>cq*JH(7XbksTs)E1z{6zY z%r;C%8T#m%mri@^+A@i`*tMur-snws;MqvL6KDslvXe}BMC2~5xa_F895nI4m}r@H z2#!Pq6bfCR`14hwU34}w_W<;2Do^huJDDAxKi)E|)*oK%&v7X3b56h;S`FWn*WyqP z9YCB%EEJK@<0g;g${wJu9GSbfkpWEd^qqk6? zQQQn(jgB9ZUH^wVAPXa4VJM*Ob8?0S|MI3G^aL+JX~_&*E48f?ZWlF?e6*BP=MVnS1w) zIvD9PV-tihQ%Ps=nl0E|uEV2{&53R8?3f4*XCaK~un0wAz*_6R*uneBX&Sj&a)>=y zq{|-d1)0rOT*Y=I^%%Bx=2zG%Yo7)SP5ajp08W5?MDn*%+$@}n2F?V&9Z8>3GK>r-AZ?7Lt2D>e6cm>4f>&$QV9pwV?s8%2l(175b-yFICyxiT{ zUk9Pkvt*nN{|p-eew)0VL*1BXsWcGM$vp+pqaAF1sfhPEpYKA74)=UIIkp=VV)}SQ z+^C~e;YB?V&Jb%xq20aYc}Wl=yX5)gaend5|LQF)ZvOt=Ld3N2vJ99{H|BW|#?ZZm zkwk-4Me&uT`R#b@6|L)+cD==;CfD{B|L#RwI%v+W2;HyF8ff4fB7B4{S!2JmW!1wx zRYb$1Jj=a*4~Q*_3_Ho4KEmLrq}LNB+T7Y z>NmRZbyC~Nu1k%jMCvZWKXWc)d8Ad-=Tw7zJ6gV`lJQ zVr!qT6ET;Kd~{>V?es4g)Ffg`4IF!yImi+QJmqnx>E}ueV+w6ei*PC;l{$8Cji`)% z_kHgZXGdGQ5k=ZiVH2d82@X|riX#pl2J+j910yd6%)a8jrnYeY`6)UdF=gWom1H~V z@rYotetkH4)yj5+P8Dv=)0G)hj{4+>K>`F~jcPjpf&lT$1Wta+)o?x%W2CmofVQWJ z_zYrBU_INPs3P&~BT^6B^Leiagh;KZbmy=(u5m2 zNRULlmBGaR4wfbB_%-gbdYWqXFFU(9 zI&bL$lB=*>6_S!?uB2d2}*^n0Eg z$CX|?Ue5nSB&}b-K>d0pEFXq?nzu2TQjV?q=4H$ z5LL{99#if@oA)*e-q6}P>cqP$NAGn9QRh~s>YvemonAEhD#5sForeK|_ zGu>T4@@5VMJVzA#gVtHT3fYGM!wMD_XxsK!Z*u-;&52be-iJMIShwe62JhKvRv7 zzrVb{yaz_a2hC#F$V1EE2|p-Km;et`S9M?!x1jYiAR37LBo0&8LT^ccnQGl6P5fkA zOTH#kdM_s?kD_x;el`tPeZ13$F+o5c0nJ9n?oOupk8Lm~e{A5`%E%*GQN8GA7~&CL zI#>(AP@-~f*4bI%{e1uSa(`<9PtRKpWnqD!;IAYX6ElSMz&qxz*Sys3xHbFAP{hB= z1twdH50m)UbB(x)GfovMMtJl9zpw`=fzET{|kdc!21E;4^I`(%L%WTlX$(jQ=QG6 zxT*0Tj|`Mk3i2#I787uTm~5!OHM;J!lFB9_P2$I7>UudWN;~EgtCTiYV7HSVe)868 z)P}%`HGgg0vXR`bFcPAz0q5)50n=$$i}DJtYo|o!$OvF&i;)__IULsC$A8v zBKwY}3FRV&HyFKF!LBO9!AjGW} zW*Sg?as0c2QNw~ieT#cx?z_X(RV3P{A5#Sa0_Yf$AMzzo>Ys|e|8{G~4hH>RJbF=l zy2mB`v0_}4OB(RcMz0R^(U0=EI~E79}VrJY{H1IR7y!?KD&a)dn5x>7_tB z(g_{g`%p3dbzmruE#*it8&?iMFx=%|>K%&E8tvhi1B6H%F_|97^VrCPUNmdq6YSWa zKZ$%#+&m`#>)8+JpW7*>42$wOn2R$MHrjB_3Fg47OW)Mt+1WM{ z3oXdo_L`u*gjZTg+HaNsNTN)4W8O-c?4c`kBUSAZG79M{7ULd!391wS8yw5?{D=to zuvRk7-7gsntj06I{mo<$eNlvv%S#EV`h26^jITMt4>X}KO~Y(fTb|+ucu=^)FhF`N zarh{IopbyKe|U!s7z+&=?SM#JptXCTwQ2tq7vNX+2)B8yZBXo>^K%Mxv~|^bhU4g~ zBSv3;XV}ufh=_IBxYV{OR8bdR?6a?d>2=l^MVCD9@=jyuxJ8U|c{oP62O`3?M|d!5 z36-uFX3vVV^(ed;f%?Rm^n(We`dGZ$K9hZf7JMird?Zwk;+I|iNMCV`ohD|){q-}% zoQCy1Zjl`YfZze(q9R0sE=E=h-*@}L1YjX}`YsTiD-mXcZ0DlXC^ctfm_ z@+GS#%XIOpSYJt2=Sc&NCQ_v~^?q$60Y{g?dNSQW96P@F3nN!QwPU$71BP$nlu^A{ zvZO##L4-AVdw~1RtybYM!crks3kK`D&u|y1#`#Zv0Vb>$WGIvbslVl{ zSF$$glc*abDzVAU`_v1)zwoHoQ6Zd|11JiXYRaOK@;XkG?L$Phz?jtPyXmix^+J_^~S$~6| zYa;yf0<<1L;mU11R*Z~Py0ruf6kU&nNb0T?O?vYiD($tA^tpw}S1%cNe974Y()~?} zwtd#1xX`qhb^RsOB5zWc6(lLyahuLAvCE~tFPCXT2#7NZ2%$`(XRk?QF z&Yjd*c4IShb)7cBRF*C|oyvUz(MB7t36U@(O^UpdtYQIuttEODe|36t@5Xv|e^*=o zTMNc8dUv8tep8L}g9;U$Fj55QEI@wScdj{#R~^98KmK*GCBk#T)U0&JOYrE?x<{c~OcM(d8$W@I!f@{aOrU752;keTU_UJ3N|$L>a*))K)U5>K?pC#LG!jZ4Ltgu-E{0zB1X8n=kvb!i8;^>XvAI$ZRM zZ$+GCzP+NP$IDz#KHhHK{<{_0w0+E}x{1z|4_rZXxRc&#zqO1&7;iMW< zo0nWXg+=79W;25msZ_9KjytjFD;*jf?-m25kJ6vk&e+ zWMFP;`%h^Rrpc7}pM#KLykM5%Gb(c>`tWCI z8a;q43f*V^8)oH7t??m;2d$GobTySMwz?rMu=YMn@g^G+OjM@0Pes#CmUD4!8I>fI@?n7iBifcEJACq#!P{V+0kQp~ z*(l>mSoE{uOg2d~jOyT&4w0DrwU{1)^Ko1oGv5fPh716Q>j>#CmdijEM9=W3lw}g-IfKQF?_-oRXU#<5bKZeVb+vMax~IX7e5( zxF--PrfVn25Rs9tsZu#CZ8t#TjqogG_0hGiTjscqb3;uCUwgO;I)WK+R6DD_BTOC{ z!x=IDNsa_cYaY}6Qw zSj+{{*yBd@i^?qK7CXpN1RSB4=n_we0pvFPDjFOI3a1mT0yl>m&n&UG{v}7vy|O*e zC&^>EaV}9JoV~0Y|)f0Hn;0+rsTuprVk(--yL^iwZ zq=bTgr{cj(!({_7m8mrbsxZG!=4Ga5Esv|q<`4G)>%&P?QOrD>{&+&SzDjX48W6Xp-xj1e&+135q;N2>G2tm6MvIp{) zvgE8!fNwM`8I3>jiURQNNE~%z+uxvZG`CL85;1Me@(qvJ($CKr0rySnyeS{NzP1WLTYH_Z#qZ` z=HOLbBpbK6SceTB)I)-K6G{jN*jV=4=CN-=!@YM|C4W`0_FVWgYMn~Aov<2lJs~Xv z6q8C?&&BRLd6PV#Q`@(2soJAxfu`z^Jl?MJVWJA_$CDC=+x-XqT{d~RX&G*QvpXce zSwH{smmu-46C^ZrhIB3gm3asrdcYxt*p&sEyA*P0iCiuyc{X9!BJpS&!eln;F608u zzwxq&>>c}r{9Mz-+0LLkU08xd6F^79%+olxv4E9Q;jI|PjG}qOzhqj(V!hrhdu%4C z&I{Ca_}8YJVEYW@K2(oj5rQ)ZE_QIGZtZJE;EZH0UF6T^Bg+tQ9Q*5g=&U}a{-(IZ)%J$A z7(GcULK{+i@p$69$nZVJeI>&+M*)Eir9O&3y0C{VsIGO_F8f6ugQt~_%j&S9d`qx0 zgvI7TtM||m!jA!#gQ7&Y0q2_r%5XzsU}-(@7{!pMmMz)|0jH@|kOd#f*RgjEKDE@) z&8h2)$VDjIB&O|6fINKymuy5DbR^2|I}*~`Mz5aG$_-OfN!GTU*WvcdH5OW83w4g^ z#b=sPXa~uv(BlE&&F9BZL4a_pC30T*>%9`}V*@Zj7qlUwNbg;+k9)@F9)sRBMz(9fZccK0v2wY`W8IIvh-X z$r?$TiC;p@m^fT*bq)O-zP|>3RCd6iI;e>>Yg@X#Wj~cviB`u{%pE?syvCNo)zOuQ+C;^(OdKwzattH)UIOZS4TMmk6Aj8fpb#+ z--N--uwCfozDOvKSmg03m-do5^#S%TPR~W=uE>U!LRrrq!(0&Z$j{{uF9UEz(>y4! zn3clL9!J6=SRe%h{(Rp!cXSe{bKRI|iI>^txV7K3uY%lvSOa}Dhu9K*(-Hs=xZ(yiDD@qgrcraa6yzo9XN?KhZKJy z76(>}9mEKxb>FYe$sj7yBp&_sXri1-$>o})Hhn*GIy;TBi_{;MeKxzs^L+lkZa%9x zNgl;kBp=~R=3%1(TjcI?T|JUQ2nP+XE`|tR0%9`km&b=G`PT6D=tLvWIC@lk8$KCs zP$IaZVHooE9tRpV9bO(%?|6~!tB2>5Rv)z;Uz`UQP$Z-YaIi)%SE<5Sg3sW3tz^b+W?KWwUEGTk*5qAK>tXR#eK%8P)l$>W~JI^0w*$ORp zb?HX6KczQ}8{D+`?z2x6@%mWleKdJoJ0Zqod8)b;n0?au*oXe4Tz+ZO8F{ITUze6T zxJ%uamR4yf@Qo3A3b%38Mx!d6I8C@WV~WMD*tO{N%Oe(Su4CCAblob@!a}v|F)MB^ z!msjhddPl?J?nYnFS7yVHXI1u#}?nczR;+8W%_j&+hwKf!ITD-oJyggk?c!HswFf{i=rvV&?@Y)#0!;aRhg#c(NlqNg% zA)hXCmkfX$MvhRI#HE&yMo8KTLN%Jr)ErICR-4qlC>G#i6+^KP+qdxUHr-SLBuzH za`Xy>1!b8%os2U*WIUCD$vZ!)X>2kRTijhEGvt;o&A?^0bJA9&@HOjG&!n3~J8qQ$ zt5H7LO<6kww>`|Y{R64mVcQO;r97KwPhyu^7p`M-$SnyL&7-HHO8o77Jqx{KQj9i z#`-hR(9zRq{06QkbD_kGPs})VJQUYtSJDqwEY$Bl5(}`vs-s_de2rnFAF!qk00QMS zTFiG7Fub0QRCJnC@Nm##Le>CJ<2~hEU9_~htaixQPl1%3U5-)ZeBe!Y(eJ%9UM!*@ zs6L3L_nsGc})` zRhj>$n&$cZV?SboveWfj%};MOjn0tUZ%DPU3+o7I9y&Rok!*52S0W>RDb7lMIaG4_ ze`j=`&xR3iJQpImCYpU)WqU>#wfh!(txB zMt<>d#3~?I~!J#yuO6zcyiZ1PUEH{P@LU3?Kh{Z`gA{(pH77fu*}A-HxRC^ zq;hR|qCBV&pZR4#G`g3?h9xnH)DCF87}gP?$Q%f zB2Dxp9GiH!8EQbMc8(`fO21OO$iCGC>I8{@t1w$RD~UtM$83?qflZk+;M-n8b!%LD zyBQcZElUgvWyxEkg#k>Eev4zIjEFW|W9zT@V?xyqs0IX#{9ad01{imV`CITnvB)Ga z^#JZj6)6fv$-is_4mg0;0{AYRBh5M_&n4ptFmQ9cPwoB1yo{U*=MI@gyxc=~N-^y& zZK#bM_YF`b3%5qqxwg7c0Et2=cNbgNxu4=dC7WL_Ka(Fdz%o007#T93avw1)ozQ{; zkp^lW0Z13rcjl$_&`Q75L;fvuwGwSVs@c{}=3dNcBdr4ptwb#>OzMJzs(euLjRs`r z4pCJJJuqaIk+|eoOVwvlG^%XmicPehunLxeu>cH6nQ71CLs*?sOz0u8jvc6I0k|(TZ>1@ue~UO|z}3FYLfPOk zU3d!E3pZKhL-)$YIrII$FEcvKx4Z5PgQi&A#l=x;g0&1Lm5re!QkzpVolAHACF4(i zoH4<(so5}jvN*oR=+O%&PV8&?jlnVUa1B~w*U{;3*Ns~93e}d5BhAfFgMnYpf-k(f zC%L}kfum|g@*G6TxHg@yEwYE|%#5DUB5j(N$?%{5KAC7-#kx$S>+CNF+7-!V(Wx7bf8ZfDa(TU6=8cc*@@M(YT@joj=$osFS5rFfh>gjunXT@QDHJd(74 zNzhHcX}t;y*ycal#VG?^B?XKh%a}cgm)tanmWK(7w^04&c zop0yWZXj%i|9_b{CnHqnxbtpmN#OeJ_`c$eK*FY}pYTtGa1x+yKiO5yl^baj1l=ah zf}7jt7BMpTs)+2~PZujNqNSRnlQY9|Y9VY48kx7+OSO>iaDgfT5H3zrH#R&zeF}#@ zI6OAfdMz>mHnR!NVungw6@f1!Wf9hqc}R~yNnQ$$_lLL|oYn}eB=T=5(i1VO%k(oT z%}f%_(FjFoF>FKcz$Amm%Qpf2RhYBzbtQt$2(mX~2MrjAZ|dVAY(tsNs}q&EfBGJ$ zHMa+38T%`eeXhI+Z1e|lJsz!COu`t9ulVWW-_R;g5KP*rFHM<6UX=qVyck;~!Y(E; zOL|b0{Eio<3+0SfJx-n*7V8i9hvbyuc7JM~7TWr^(9F##I_j8Byj$E1$}8sfwU)DJ ze8cvV>?>{l?WOrSC6YVvBTyX@I6alERrnA_qKO3>YH>oyGn9`MY$)H8opVj{PQH3O z?_JZvfU6K!y~bdqwIxd?VU3XBU98!xlRT3!6{-{Fs<)t~1~F_dXc zc;p<4Ak0@@c!x#7$TabAhuuOT_lEwkmKeiN3Yn9 z#ApPi(bz8+p_j&P;_9U^3}ik5DMP5w9tzi1=l5O=CmL_u`P6XLw)*yW67TETuT<$y zoEn$m`#0_+|A+^$SOTa*0u~7gT@22=JlCMe*zlRIiSI6|ja6~d8b+!K@a$W6t@68I zkcWD^srkaYU#Ol`g0)2R^uLw6=AkYVKw4qoIh0N#YhCv;$X*2dQ16ss-`R1Wh8i2A zJc}cKp(?5-K~OXn4C&kN!v~;~H4SoSJ%xR%%&>$yOnbvrwx`Z@51eHV3_1cgaULT{ zBn^8kqk#%S!_Q)Ogaw*hA)J!z4*qJcdIGU!RTZ}c81D2ohG#(@fX_HnWxzeSAczCX z{Cx!7Z+Sp$XE_KHGx7Ow#)%R%`IS#Eh&~hRG!{a$CXtNT0q5GhH;h>=CZ3sutp;{- zaY=j8q>d@&oVR-qStM=*+dh8HGOK%(b{w8$^tZ2lf4}KcgWC$iC-T?3|BM;M>9K)4 za2V)sEh`zXMfyG&Rdb+2PAa%IeVhycgrRV6YswPhCE?XYYLC?F4X@;jR{FGZF^Kl= z%)9nIt#xML_O!Z7abnYT{dxuQ=Oj%zm#gF^Pw3+nXr?>;_7lF21VC;xR_i21+AZrv z=-Od687@E5B~9kB8pkV0)l@O*a_WdeIIpmDpRa=tV*ottZVy2_Rk2e*tm{9&B@Y`F z)8ONuPC=qOFhvxq=X=Qx>4jS=4#WzYikVw>Addjc_mmmDT5Gex&ho9 zc8MzwyP^r2I3N?vImo5wIBT#)5qSeJ_ZglR_uO7-H~=tWeGD*|5{E@q-bLFdQ)?UP z+8c?V#J)pF#`vu&QhWY}89l9vG=ZtzU2YdXlitls&Y=9m+x&Y4Zda^yhMj~t(HArS z<)8DY=IxsYlvr9o5FBlGkymO`S}NNo(9qL6ZjkX_#w(Glis1tx<7tEt-ny48K$4Pb z{x-CiZS=cS%a8=w^>moAsQe`vYwziY#p}0;Yy*D9mob62m}2+(YerawS}@amCA}Ng zY_@89E1W2Evt*}Vzo@cSGTGp*;VUbXs5kX66cEqtGuIq$$nE?&oVF6pyW{sR^}FrJ zI!+`K6NgVBIeC_dG}<{HCuA#W4&M)louo*{pV8&M4@ zNj+k5y`97w&XWdI<*%t72z3m8%$Gk7mmCw1=-GGvrZY;Q_L0H~F^Xo_gy$Z{=Q8s1 zqN4IzWZ_Kwdx6M8U(duyl>Wbtpb1w}+7I&B<=cHhL6?U;_)$bMi%Bxsew>k$4ihhh z!!-4?hfHn&f;1e+e*M0ofT1R%UoMAc8tI4~SDL5bUSJBmJSU^H`?JWIk8=qV6|yH@ z-5?bw*)L-)0E-Fk%-F5R8ENyH4T3s=jT}PT65fb8Ky0N27zqH!K0~s;qh;2z12F8w zDxp_o9&+qB?#hLh?E<|w&v7dQ}QyjE^bllvS#nD3XkYy3E4(TVIGz%dTj z1q~zx%3Ij0%S`XUo&Jns{+v5E7}vHoo+)g$)ub? z@474RBH(df*+c>ns}?J=Id2VmRBU84KM#>WU-y`*c;w}fh2we3wT6g_;Z;H60HSY@ zApr4^80%cDq7^$U1I7P{7qj=MD;H`a9Sm<%L(2<3Jiui!3WP`T?{fxw>ws`Jf=blM zt>QT^K!EAAn>py+*hFF_5@kk?Hek<6EnfAcOYL}U)WbMkTnz6I2l;mdmw3&`xu8ni z=(#R5@233sM|C>_WJvmnsOu!X1*U0?@ccx+`ReRcgX3kZEI}%LF zF);Y7!hL-{0svBoOac4XKRLba4<755dbP)ToR_Q_;I&($@^z|&fVzx95Zz~=C(u>% zg=@~_2(&oBTl8A8IPPO5aukR#1;Of43pZ^I>#HT&&p z(+l*ryS3JY*e(EXUH2#{20qkc%x_rmWtnIys;o|Vges7u%@)d{w47Q7{xh>hKHKa0 z41w%|1-}7Ff$BI=^YrM*B-(2l=))8$wiN>d4{E;M!dYJJ7;Cv#Km2qM0GRzEV$rja zO+`zPhiKaOo%|MFnF?jtj(DEfyY@Wj?O1R9J$(5$OH|tL)dsB8JYGzB5l^T(elyRhLo_N8gj|dR~89R-nLO3RLvXi0xj5h)I-MT*nr62 z_JH72C%59t4m^;tl@#;hE;GpjX*+WSHLq%DiT_AWksP)-Pr&TJQ*I0QVUl z5=JVP$H1;(&jo#InU+BqURZSQl63ysk&FXj2LNi~&TUMHnFy1x)dys#5Ecu%u%I(^ z{MFYPs|2AR1BrHUzQmax`LXOvGDP%20syCW==Lkpdy8_>e?~OVt4Ggy8{S!&PHPN= zOY5>wJjyWEm-Il|>F(dz^8vaLZp@sQ%>40N@sf`3=~oq>`~}l5>VLPB3kbsQRcV^{Bn$GYFVed)F9=uj?%w7S;@6(qy(@L2wkl4I-c-8#E}b zd=Ew5Gxp=e?K$pQQf%g2Q9vj~ZkqZMLVJ}N(I_|g1TE$)?ubm>QO@}nt`v5;Nm(O&}Rn?EajskU z%7m9uUyw}Wj^h@yNx%edUa20?VO6$vbwYHyta(|DJ7xtFm{Hrq0<^^&7#fa3tYjIt zC-$mU>9&K+TfIx!2V9?q0m2MTxhF(fO$u=mo|unzHK=UuoLmZLCjDU)U!tly>Df8J z19hN9>kZR4)QLIGy|_hA+mp0V&dG#EzdNZVCo6U%m{rG8yUq_c-L)wAd)NjEm;iCb z9c96u)yumhJ1weWXV}*F)BA2Nmy7bi z5Auh&tzAX*4E&J~1xbxqjCfXvJ_JMD<(G6*WnKOlNRLJGgRMRtb1&B-6s+VZKYTjG zJ?s|R)7(;YPk_puZ^E z1&|$tJ`=X1{A0`#;#4gdbNpgVle#Y_YoZLCZ+jHjMq`2Y=YZtsd#jjAlq4`3^pu~I zcgSio1Rpmm8C&3rodyUG)^PcB1gVk_4vxwvMf5-PLT_y0q7|S#A)Y+#Rnjh3+9W4& zKc!87zwECqU<@KeF32b)EPbO08GH0+s)hh_F5pQRe8U&lK<$N~@r~YoChNFJI)+V& zcDlRbcQ{2B?)8Ikt_rTY?z)rUst@MiF3An^A&Lj%pgVfoR0?wLc{qu2*c!Ak-1WjO z2JP(=`!d`j>C2YlNy)=^tAxZ35f}|thbzdZ2vB5LjMs!B*Rp&`04ZJ6osF~S z+XM`iF2vzR1)gi}4WL=Yp}XW>q!=Yb^7NDM`I?amfRME;?w z>)WKU*bx*gleV8eJIHW3p|QnpodaVI_}kIP;j()^|1E-a9##c4TjSwk`9$|Z<9y_B zPyNy02lAuFqz1)wZ+Cdzy|+9)2Jx|abs$&SXUT5Zpc@~n@J|Smtz8)Jvv|S=G$ChT zC_^=MZYuZ2&(=o*uAFaSI1!;(yTBzGZs3qqEQ&i@J_`NYz0UzzG2`>86lvO3F7OEJ1AuMT-G)`z6+Rqi5;F3{M#VhZLAtk zQIXJVK!>&kLAE`U1^RTupUtyh*US)!=$HO0a&d7o^ndxDmztqW*P+Dd# z8!)TmZr*-z^aHAx$&j0%h8Y5V&nf(Uec^S*B44_$MsZMC-$k*pUSPi@>IEB8+qhDL zRr|vV?0OfOZxKA@+Wf_-T7(Z474{-ck2kK`{D3=mWv}`Fg9YZb9eY{UtC9<2J7sxp z5e#yEhXE|q84}(X2$1klUQ+t|TMNt+{#yTTv~d>9nWAOaFZ?+IN}kpq$rRD73v^&F zf~i|);TCb@LMx0S0$wJXo8B0S;alWijR**S1YsM}cUD7Z%J#1r+Akf%JedSH=dfiu z-DBSUD#*eBQ+4mwWAM^B|6sM|&-3?{*Gz$Lu>A2ShsDwQ+;^uPXc^-|1Bh9=2!!~r z;l~}%_cPBFodgkcNN#Mu!@`bDb#G2TN$D{{!NR-3fGM6h>uBvqSOrTE%I$TMjdX8d zRgva*yaF)w=N)>Udxv%{m=B6nJsGBx%d9g?k|z>Rqjl(C!q>kDqA+63{{b~Z`ydAV zlhKhQ#=sWNZ=%}Qd!td9(h>;#NgW=@&LLp^YQMb*Q~N?yw}U>5cb9DAasjsL8;w5z zg9yB#*zVLG#5EncvLoEg`Ikuyf{El4l^}8>7wUTY5_BJIkwb3Iyfh4p#H2W)U%s@b44 zm4+((tXo}NLsObh=C#s2zb8_R>>cKlbNK_Lh1!}*9`fLZp~zKBuebg_7#pW3ELqzt zyDIj}&w*1bKn!?Of|VY%P{Q2%fQkaBt?2U){QN4R>*CIg!f|ld8E7IB-GiS9Uv=gK zzNh9E69eE^)L5}6m~uB{W~oS2Q*uulwzz-<)>C{6`ajF5og=XPdpyoQ+tYiu0AzQ@N+;4LO1hGel;YO}EX zh5~KxUKS-#3mph;{%s`euLX*+%JHePXS|eRU-lzD;6jY-y7C=ZpS29Qx|G`Ibq`oF za>Na|(|?bgvGO|*l%-9Dm#e*}WlPlu@3z-GrsI6fQl;+AgO7gYA?Gt$;|p zU0bKSzczrP?nZRk2&4t{{5D>yDY_yNL)|o zbhQm*yUUNr^=(e;gD!E4IAJHXT;h4fLWy0VQbsik;d|2KX+-d8`)k&Y2ZK}Whjl#I zp6P>7NKF)~{4xC(vQ(F#^G_vP_xnQi{`?%-03QwDP&97!8YT@DtcH|(@6;&DfN;!M zW6x-D1NqM|U=`(J0tEJ!da?&fB}UfR&VNblsqVha^ULJ^?PF7js<+c(eGOy=q7=%G zv;%QG%40_wlod3WPF@M&Z&xhBkb@bgQi_}nP?(#UA96sCb??-|r(1mgFlUFQ2#%r^1*9^G^zfG@D)Bq!}}d zu*u*!Hk7JDg2!5#Pw3XScIy?RTeBJ9V#CI}xoh5Xro03VDlMY_UE>MxC}J+xkU?dG zTj>%~N~-(h{d8i)?G}xX%M}90&m10x9Lesv#Ejm>teDEl7UFvc$-+UnK~heW7mSccoyE~_T&Jj^9>N=W3tvu>^sisB=d zQF&3$MutQd(@BEM7=$B?d3sdwX1D z0!oh3`}lJOa|pu_ysG}Z_`R7Yhr-CICY?yk!uSvYHGe~AP;dODsM(d<9`XT9REb6YcjdIpi+(NA?uVS?D@J)=XdnK{?EK* zE#q_zo#|6M*&D_D12HO+yq=O$shhVf@BF(D=>cf|PoO=TE*X!@&Y;2bA2iw<E43AgWJNv1FxlwG+Ac7kK|S^1WiD%IJrqJHC>?vU#?`6jAEVTNfIPin7U*xT^? zdW>#_l(VtI1?WUV$|_dfuV|y&u*{A-Y*B_&h~bIh>cy=`u13M{Qt1!M%uF-a+=HV; z1@VL07+7;J#8#xB*|`Grc0_}4<}+xwNH{g;{^vQk)2?Ngl(c~A>YtmFM0lGImO!^1 z(F7ODY(_MLj3?p}5-5S#OK9fbswg)sgP2#ZHSA9A4f>c)>sIGYGz| z$XX~j_y$x)aaCWOv24D|gEZq*ib)Q2c?^Mkr%eVl6mucgg9RW}$f{Gti90J_td;CB zzNqxgOJ|CKYVnR`>lqxv2H@oV-uD%zWGb3uKR%lAe{nXt`RLO+L`<_YEPjdu1Kj|1 zznzF&v(0n$9jiE?=%yLflR7PbOnK7Rc_GKj30^m)aB8#z0Bdvt=X)#~dd+W%}tqGP~0 z^F-m?NRTf-l-2%Jys2&t%Wr{F-SkG5WOsyJQSE>kIE5boKZ@NwqVSHCSf%$8mQrQz zY`=jrCWAm!rGl50JXnk3F`^e?cCz~ft&uVIGJPiMa&7JaV%jx|>D*QhQB2&x?Y)ZH z?e!uL@MhSyl1kpq#4dc1Xmy-P5YWg~2i1Lr%IpB3Lcu(nRW#u2;+qQ}_g+_BN@^t# zXm&EaWSc7MW|fznFdqu-tO^axAfyzjx_t*Ps-NTNRcnllWL-?gZ4(Y*C1;PR8~FOu zMp3cs1LG^CYP_v@hX!wcn6XdhJVg&`6EegqB2rrl%(d>DdR$TZTTRQMvC}zzVan#-s5LvvBvh(}&ch?Gc(&2bwt!UQ2VTPoN8UKsvLnX<`PiIDCA9li#z+J5PLc%dZk*J61U zPyEXVmRK5b)7p*oawS0CwVp)K_TPi@uFl&KJH}VG{JbF+Orl3C`H0pz0Nsc~7 zrXu37y|1?2sa!&lFFPLYfbE$JaNCO!6oe;Mg^|Cw}|LeeLCyxEaV z1tS8_%8{H-&lo=9vlrKL6yGxOO|O#{63BrpLA4C`2-$S#x<8cP<6%MFXC>(38-)Yb z2vc#;Bu?D)=9HPCX;FRPP z#y(1vBm+PYJr#9(Lbeng5nxQo0XJaqoC~lWu$B3@QK{D%c2pjF^cg2eWAe!futQLR zL#LkpKZ6y)zcOx*@&rmgKch1{vm_%$CK!sQQpP_SGMRwkg2rDscSqFva=BT6QS)f? z{ZR$b438dNid^U)58T|MG%zl|^KT0V;;wxAdb}~r$DhXKo*$$3hhNxruXy!FSe;AJwKEo}xg}Z4Bn_STHVc=}0uycy$N0&+ zKEqQx#R0p_^47#LfSIV72!Oxk=+|eIF{gx|sbr;~&mW2q=fQ4T;DaH4qg^M8e-9q1 z8>a^rgTW{d@Yj>!(TFUDH976S+~+Pe$y zbCltXzk0yEH6GWEEkx)jSm5wK&U(e_I*qh$RuIU0M!1QA9_ z!IFUv9>)lJy4&2nVJ>K{+Zwkls9e3Rdv9UEwP~dhrr*PCVUX4Cygd|;J9(`PaSF)_ ziKL-&M@cYw%nL#vJbDddu@LOF!5EkGq%|%di&eDejDrm~%Yn;4NqnC@Yj5qe%0mD& z`k3jC;B-r*!?if0VnL@=C6q;HDPU(`l*g@S*W3iSg;b{)x5Sp55K&s0X>il(>SP}u zQNJY>umLCXAQy-{&D7bIR#)ZDjlJyS1h2#%$l_PKs=+;{Id(WOoOcc0-} zT=vcgg?K0_PHGVCq`jk`g1@~1%u4mr(CdOX z6}3_~$rU5IqAyq1tc1hfHVurw&_b%ev0MXu60tuv{aKc8`bw4pZwKu+K{JkR!3IcO z8FAND^ETcC;PIEESL}Folb0?_aI&DSWl6d%S{9Nw(*oUnjPOR7Mow5e`cw4lZ_=@1 z?j*@ZE0bc?B1U5fjYr8|OGeOA>XglBL?AbZskF#UlRE%?*d8Cf2vuG_N2oFUcF)IN znON3x5TEy`YsdC2>ZxdLslg%EA&kMyLryDC@$=t_*_>F0;QAT}6{m0vqyl~1T(fh; z9`3ClRH;A?3>QFxj3)HMWQWf_I|w)2xAA(of9?h~Osw}mi+E~R)-giC&lBFYcbc*uYebzM%-?M zQ4Id!!*@_0_1HnxchS?-cu_6iUTpN9)u;gI;aPLuziYu9@YhWor^i*}Q=~sj3MeFU ztkElt?{ja`C)00HB(%VuexPx^L0@#N*>VkI_eRd1(&>0?OWpm1QCzwm{AuwuiBCq< zH2ahpJBlE_pT@m@?Pk@rHP;?Ge-& zE?1~6zbXXRq}U9P|)qS?C-~Al5eQ7HD!wHQobXxPF z&Ljx8)VZV*Xo`j0*qL2%0Gza0>8u0AigxrFPGw<>p8|{!1{@tMEP-aB%c+ZT;bXGE z{jiwRnHl}@M()WSJt|gB4KRO}g3WU|ol&Nk!;f=@IPqgJzq8@5WKiBhFA+p1W}(pI zE_&G6TG*q(Auu_geSvK11Fel_YpACAXeKTs?cCPpQ1AoyBubl4DD;)hRo+F{oF_X* z0p8;O=Tv8<)b%k=w#pdI`?hUP=J#S7G&H5puLxrP&HdYXiWLTn7#S}=PxvKNbMtr3 zKWlJX{+QSdF5ZN0s?i(j%GgTth4XfVX9rhi+{Wq=2s`Afmu%edJD^-j3sPOLQA|`n zTBYy%+7<_xu+RYTcz?n ztJy>jlT*d2gwwr;06WHl{m7u482pN2i@x>Xj)}PN2#F3ZMS9+?XnZd3YhTy7R1-O= zR00qKy!Owv{g7!=?OcF6Vx1%daiFI^6gRyagT=DWEE|`=Wp~%G@@Bh;!fK9HUR%Lk z(6_K6J7FPL&K~LyP;CX+0aD{ynWSl)H%+g-aWPOF8wj5>I>AYswHq9-Tz83VlU`pL zNFL9d1aU3f&SBCYVI@Ce&3HTti0prEy4VA6p+eBarvmnasj{%REg9Z4K0g%z5+q zd*|HZ$DDO{LfB@RT*v|B2Xjf1yR^>+hAqEjTB@}%`K$gB+;Nu1W=(TWcyns-VUZGv z7pPJFjjfN~(fh7&ODY9?|2+!iIJ@xOs}S#ebJ#1jT(OU%kdyJO2(%U#iI|s`W9{6f zBrl?drU0k~-7?m;8tLwZ6I=vLm(4FEzoX>-DB=5vbi$J|9B#a6h`yZZ@%JU^jk*hxcqE>gOWEI1eq&1s=rUe(q$N8+__f0Wq`#_|A(yKt7h& zQhV}FE2Hv$ako6wlqo&vv1lN76Ymxrr6o@+#o0}=({(P0c!)}8d~``-ifUy2v)=iu zBNfF$cgdipLaQx!Livqi3~aML`#vE9yPM4Y5RB`oueQU@fao(}(`vCm6KyrZ(tO550#{ z;2cYfB%9jxQFea+iK~=vo@v(yh*qb4>yb|H-3Iu&BF7Lv?$3=c{-b7-bwwi`l+_lk z=$$0YRP{&%JS%_IK&g%@v93^MRGE3%pxzBVw`-AY$$(_1{_jyK<-TiIE`mSTK1JDO;>1nRp7}X-kD=_xA`;H=Cm>9KYJyzI z)l2hT>iI93*vOUF;{K>JhVbT_VP4M}*XB`bT=&#!vm(*mSx43~XJZ}Hylg2(Pt%@N z79NHlhqPYj8oXS0W!{VqU#Dk)BXd_lUQQ}1SN0100Jpx%>vhxwMu8<68HPUmDa^kn zLb4=xGA1z)K2_1;4BK&zBh0e;?{U6D=K$`#WOPPRrcVF!QpMkue1Cjt26u`fOKenk z7Qk#E8VU%gyM~Th3LyWy?}g)-Q74QgfjCK{n|^7Pzk_Dt6966Hrysnka^@=544 zkL=~3q~_RLrkvd(k02`=@=*zDXYC)h%%i`sNpnguW&PsY_6R7*$$Mm$jd7ZE%`GVs z{{fCrR(QVWPgWv3Q{+wr^Jt_4UTjILEpsJ2vX_#|p$bdbL%O*t%k6egjL8~#LpIVr zze#1~ayu*6;SYlU~f?_~gr?gj;&9qkRa(BwIDua=m`X-9=`vgzU0zk25i8wRV0%r4;fFDJMB_`^@F$<3vZyK_e0Ik}SlSJe^wHoq!`Zzne9Y*7 zxMj2zoU``@DRY#CP9HhV7-0(0Wodueqn|6VT)N+K=UO` z<+a0J@kJ!!#}^e;*M9E|`9UU6VoPXXs~{z^D0{tPe4ykmSHX1dPRk-OpU zZ6$ZWs+_!!ArGeO`mr+}90g}FYTCjqigknum0%IyRVMu(v4Wh#nzr{-W-E~7pCz+S hY_RWnvXt!;6BB^L!h&!yDt`#9*7Iy)KL39)t@N~W73lx~ diff --git a/test/cpp/interop/server_helper.cc b/test/cpp/interop/server_helper.cc index c6d891ad71b..8b0b511bcb8 100644 --- a/test/cpp/interop/server_helper.cc +++ b/test/cpp/interop/server_helper.cc @@ -72,6 +72,10 @@ uint32_t InteropServerContextInspector::GetEncodingsAcceptedByClient() const { return grpc_call_test_only_get_encodings_accepted_by_peer(context_.call_); } +uint32_t InteropServerContextInspector::GetMessageFlags() const { + return grpc_call_test_only_get_message_flags(context_.call_); +} + std::shared_ptr InteropServerContextInspector::GetAuthContext() const { return context_.auth_context(); diff --git a/test/cpp/interop/server_helper.h b/test/cpp/interop/server_helper.h index 12865e40324..a1da14a4c8d 100644 --- a/test/cpp/interop/server_helper.h +++ b/test/cpp/interop/server_helper.h @@ -54,6 +54,7 @@ class InteropServerContextInspector { bool IsCancelled() const; grpc_compression_algorithm GetCallCompressionAlgorithm() const; uint32_t GetEncodingsAcceptedByClient() const; + uint32_t GetMessageFlags() const; private: const ::grpc::ServerContext& context_; diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index e23c1cb6002..5aea0af0a2f 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4519,7 +4519,7 @@ "language": "c++", "name": "interop_server_main", "src": [ - "test/cpp/interop/server_main.cc" + "test/cpp/interop/interop_server.cc" ], "third_party": false, "type": "lib" diff --git a/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj b/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj index 075750afc6d..18971d6a341 100644 --- a/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj +++ b/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj @@ -171,7 +171,7 @@ - + diff --git a/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj.filters b/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj.filters index 51a6b9e73c3..4ee8135c045 100644 --- a/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj.filters +++ b/vsprojects/vcxproj/interop_server_main/interop_server_main.vcxproj.filters @@ -10,7 +10,7 @@ src\proto\grpc\testing - + test\cpp\interop From 161f76304ed6c5198019e8188fddef7db92f4efb Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 9 Jun 2016 15:46:53 -0700 Subject: [PATCH 0995/1894] Fix ipv4-only listening --- src/core/lib/iomgr/tcp_server_posix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index 2ba7408ab2f..6fb547bb367 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -512,9 +512,9 @@ grpc_error *grpc_tcp_server_add_port(grpc_tcp_server *s, const void *addr, if (port == 0 && sp != NULL) { grpc_sockaddr_set_port((struct sockaddr *)&wild4, sp->port); } - addr = (struct sockaddr *)&wild4; - addr_len = sizeof(wild4); } + addr = (struct sockaddr *)&wild4; + addr_len = sizeof(wild4); } errs[1] = grpc_create_dualstack_socket(addr, SOCK_STREAM, 0, &dsmode, &fd); From 203b20c9b26501105a1faa22132729514660dc8b Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 9 Jun 2016 15:50:02 -0700 Subject: [PATCH 0996/1894] Add g++ --- .../tools/dockerfile/test/cxx_wheezy_x64/Dockerfile.template | 4 +++- tools/dockerfile/test/cxx_wheezy_x64/Dockerfile | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/templates/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile.template b/templates/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile.template index 79567987817..e77b3d9e414 100644 --- a/templates/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile.template @@ -36,7 +36,9 @@ RUN apt-get update && apt-get install -y ${'\\'} gcc-4.4 ${'\\'} - gcc-4.4-multilib + gcc-4.4-multilib ${'\\'} + g++-4.4 ${'\\'} + g++-4.4-multilib RUN wget ${openssl_fallback.base_uri + openssl_fallback.tarball} diff --git a/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile b/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile index 6f330f9166c..dd9a79b1ed5 100644 --- a/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile +++ b/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile @@ -70,7 +70,9 @@ RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev c RUN apt-get update && apt-get install -y \ gcc-4.4 \ - gcc-4.4-multilib + gcc-4.4-multilib \ + g++-4.4 \ + g++-4.4-multilib RUN wget https://openssl.org/source/old/1.0.2/openssl-1.0.2f.tar.gz From 7b3fa9e54fda047237f47be2c13fc015bb0546a4 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 9 Jun 2016 16:12:53 -0700 Subject: [PATCH 0997/1894] Reworded spec. --- doc/interop-test-descriptions.md | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/doc/interop-test-descriptions.md b/doc/interop-test-descriptions.md index a023d80c50d..ebeb62753b4 100644 --- a/doc/interop-test-descriptions.md +++ b/doc/interop-test-descriptions.md @@ -92,8 +92,10 @@ Client asserts: ### client_compressed_unary -This test verifies the client can compress unary messages. It sends one -unary request for a compressable payload type, with and without compression. +This test verifies the client can compress unary messages. It sends two +unary requests with their payloads marked as COMPRESSABLE. One request will be +sent compressed and its `expect_compressed_request` set to true. Conversely for +the uncompressed case. Server features: * [UnaryCall][] @@ -138,9 +140,9 @@ Procedure: ### server_compressed_unary -This test verifies the server can compress unary messages. It sends one unary -request for a COMPRESSABLE payload type, with and without requesting a -compressed response from the server. +This test verifies the server can compress unary messages. It sends two unary +requests for a COMPRESSABLE payload type, expecting the server response to be +compressed or not according to the `request_compressed_response` boolean. Whether compression was actually performed is determined by the compression bit in the response's message flags. From 3c63c8fda0f67cf792f6be601f1c74eaa4e6d2f1 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 9 Jun 2016 16:16:58 -0700 Subject: [PATCH 0998/1894] Update new fixture --- test/core/end2end/fixtures/h2_fd.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/core/end2end/fixtures/h2_fd.c b/test/core/end2end/fixtures/h2_fd.c index e938fe77301..89fa02517df 100644 --- a/test/core/end2end/fixtures/h2_fd.c +++ b/test/core/end2end/fixtures/h2_fd.c @@ -54,8 +54,8 @@ static void create_sockets(int sv[2]) { GPR_ASSERT(fcntl(sv[0], F_SETFL, flags | O_NONBLOCK) == 0); flags = fcntl(sv[1], F_GETFL, 0); GPR_ASSERT(fcntl(sv[1], F_SETFL, flags | O_NONBLOCK) == 0); - GPR_ASSERT(grpc_set_socket_no_sigpipe_if_possible(sv[0])); - GPR_ASSERT(grpc_set_socket_no_sigpipe_if_possible(sv[1])); + GPR_ASSERT(grpc_set_socket_no_sigpipe_if_possible(sv[0]) == GRPC_ERROR_NONE); + GPR_ASSERT(grpc_set_socket_no_sigpipe_if_possible(sv[1]) == GRPC_ERROR_NONE); } static grpc_end2end_test_fixture chttp2_create_fixture_socketpair( From 509246f59bb82432caf2ce5f16cf6f96c6ff3899 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Thu, 9 Jun 2016 16:28:02 -0700 Subject: [PATCH 0999/1894] implement interval_us functionality Implemented ability to sleep before sending response as intended by the ResponseParameters proto. --- test/cpp/interop/server_main.cc | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/cpp/interop/server_main.cc b/test/cpp/interop/server_main.cc index bbedda14d25..062857f3d6b 100644 --- a/test/cpp/interop/server_main.cc +++ b/test/cpp/interop/server_main.cc @@ -181,6 +181,14 @@ class TestServiceImpl : public TestService::Service { response.mutable_payload())) { return Status(grpc::StatusCode::INTERNAL, "Error creating payload."); } + int time_us; + if ((time_us = request->response_parameters(i).interval_us()) > 0) { + // Sleep before response if needed + gpr_timespec sleep_time = + gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), + gpr_time_from_micros(time_us, GPR_TIMESPAN)); + gpr_sleep_until(sleep_time); + } write_success = writer->Write(response); } if (write_success) { @@ -218,6 +226,14 @@ class TestServiceImpl : public TestService::Service { response.mutable_payload()->set_type(request.payload().type()); response.mutable_payload()->set_body( grpc::string(request.response_parameters(0).size(), '\0')); + int time_us; + if ((time_us = request.response_parameters(0).interval_us()) > 0) { + // Sleep before response if needed + gpr_timespec sleep_time = + gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), + gpr_time_from_micros(time_us, GPR_TIMESPAN)); + gpr_sleep_until(sleep_time); + } write_success = stream->Write(response); } } From c7be7c688829281b543428ec22029d4d09bd2a9c Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 9 Jun 2016 17:08:50 -0700 Subject: [PATCH 1000/1894] Add an API at the core level to disable signals or use a different signal number --- include/grpc/grpc_posix.h | 8 +++++ src/core/lib/iomgr/ev_epoll_linux.c | 45 ++++++++++++++++++++++------- 2 files changed, 43 insertions(+), 10 deletions(-) diff --git a/include/grpc/grpc_posix.h b/include/grpc/grpc_posix.h index 9742b83374a..5e89ae3b1ee 100644 --- a/include/grpc/grpc_posix.h +++ b/include/grpc/grpc_posix.h @@ -63,6 +63,14 @@ GRPCAPI void grpc_server_add_insecure_channel_from_fd(grpc_server *server, grpc_completion_queue *cq, int fd); +/** GRPC Core POSIX library may internally use signals to optimize some work. + The library uses (SIGRTMIN + 2) signal by default. Use this API to instruct + the library to use a different signal i.e 'signum' instead. + Note: + - To prevent GRPC library from using any signals, pass a 'signum' of -1 + - This API is optional but if called, it MUST be called before grpc_init() */ +GRPCAPI void grpc_use_signal(int signum); + #ifdef __cplusplus } #endif diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index d2d5d2852b9..7e01ac144f2 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -31,6 +31,7 @@ * */ +#include #include #ifdef GPR_LINUX_EPOLL @@ -58,9 +59,26 @@ #include "src/core/lib/profiling/timers.h" #include "src/core/lib/support/block_annotate.h" -struct polling_island; +static int grpc_wakeup_signal = -1; +static bool is_grpc_wakeup_signal_initialized = false; + +/* Implements the function defined in grpc_posix.h. This function might be + * called before even calling grpc_init() to set either a different signal to + * use. If signum == -1, then the use of signals is disabled */ +void grpc_use_signal(int signum) { + grpc_wakeup_signal = signum; + is_grpc_wakeup_signal_initialized = true; -static int grpc_poller_kick_signum; + if (grpc_wakeup_signal < 0) { + gpr_log(GPR_INFO, + "Use of signals is disabled. Epoll engine will not be used"); + } else { + gpr_log(GPR_INFO, "epoll engine will be using signal: %d", + grpc_wakeup_signal); + } +} + +struct polling_island; /******************************************************************************* * Fd Declarations @@ -854,10 +872,7 @@ static void sig_handler(int sig_num) { #endif } -static void poller_kick_init() { - grpc_poller_kick_signum = SIGRTMIN + 2; - signal(grpc_poller_kick_signum, sig_handler); -} +static void poller_kick_init() { signal(grpc_wakeup_signal, sig_handler); } /* Global state management */ static void pollset_global_init(void) { @@ -874,7 +889,7 @@ static void pollset_global_shutdown(void) { } static void pollset_worker_kick(grpc_pollset_worker *worker) { - pthread_kill(worker->pt_id, grpc_poller_kick_signum); + pthread_kill(worker->pt_id, grpc_wakeup_signal); } /* Return 1 if the pollset has active threads in pollset_work (pollset must @@ -1214,9 +1229,9 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, pollset->kicked_without_pollers = 0; } else if (!pollset->shutting_down) { sigemptyset(&new_mask); - sigaddset(&new_mask, grpc_poller_kick_signum); + sigaddset(&new_mask, grpc_wakeup_signal); pthread_sigmask(SIG_BLOCK, &new_mask, &orig_mask); - sigdelset(&orig_mask, grpc_poller_kick_signum); + sigdelset(&orig_mask, grpc_wakeup_signal); push_front_worker(pollset, &worker); @@ -1497,19 +1512,29 @@ static bool is_epoll_available() { } const grpc_event_engine_vtable *grpc_init_epoll_linux(void) { + /* If use of signals is disabled, we cannot use epoll engine*/ + if (is_grpc_wakeup_signal_initialized && grpc_wakeup_signal < 0) { + return NULL; + } + if (!is_epoll_available()) { return NULL; } + if (!is_grpc_wakeup_signal_initialized) { + grpc_use_signal(SIGRTMIN + 2); + } + fd_global_init(); pollset_global_init(); polling_island_global_init(); return &vtable; } -#else /* defined(GPR_LINUX_EPOLL) */ +#else /* defined(GPR_LINUX_EPOLL) */ /* If GPR_LINUX_EPOLL is not defined, it means epoll is not available. Return * NULL */ const grpc_event_engine_vtable *grpc_init_epoll_linux(void) { return NULL; } +void grpc_use_signal(int signum) {} #endif /* !defined(GPR_LINUX_EPOLL) */ From ce350a5925147f8a1721d42942e346766ffa322e Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 9 Jun 2016 17:22:35 -0700 Subject: [PATCH 1001/1894] override->GRPC_OVERRIDE Remove range-based fors --- include/grpc++/impl/codegen/call.h | 2 +- include/grpc++/impl/codegen/core_codegen.h | 42 +++++++++++----------- src/compiler/cpp_generator.cc | 7 ++-- src/compiler/generator_helpers.h | 3 +- 4 files changed, 28 insertions(+), 26 deletions(-) diff --git a/include/grpc++/impl/codegen/call.h b/include/grpc++/impl/codegen/call.h index 4f550b42a2d..f075fd78965 100644 --- a/include/grpc++/impl/codegen/call.h +++ b/include/grpc++/impl/codegen/call.h @@ -325,7 +325,7 @@ class DeserializeFuncType GRPC_FINAL : public DeserializeFunc { return SerializationTraits::Deserialize(buf, message_, max_message_size); } - ~DeserializeFuncType() override {} + ~DeserializeFuncType() GRPC_OVERRIDE {} private: R* message_; // Not a managed pointer because management is external to this diff --git a/include/grpc++/impl/codegen/core_codegen.h b/include/grpc++/impl/codegen/core_codegen.h index 656b11e7e72..0526e4a4156 100644 --- a/include/grpc++/impl/codegen/core_codegen.h +++ b/include/grpc++/impl/codegen/core_codegen.h @@ -42,42 +42,42 @@ namespace grpc { /// Implementation of the core codegen interface. class CoreCodegen : public CoreCodegenInterface { private: - grpc_completion_queue* grpc_completion_queue_create(void* reserved) override; - void grpc_completion_queue_destroy(grpc_completion_queue* cq) override; + grpc_completion_queue* grpc_completion_queue_create(void* reserved) GRPC_OVERRIDE; + void grpc_completion_queue_destroy(grpc_completion_queue* cq) GRPC_OVERRIDE; grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, void* tag, gpr_timespec deadline, - void* reserved) override; + void* reserved) GRPC_OVERRIDE; - void* gpr_malloc(size_t size) override; - void gpr_free(void* p) override; + void* gpr_malloc(size_t size) GRPC_OVERRIDE; + void gpr_free(void* p) GRPC_OVERRIDE; - void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) override; + void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) GRPC_OVERRIDE; void grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader, - grpc_byte_buffer* buffer) override; + grpc_byte_buffer* buffer) GRPC_OVERRIDE; void grpc_byte_buffer_reader_destroy( - grpc_byte_buffer_reader* reader) override; + grpc_byte_buffer_reader* reader) GRPC_OVERRIDE; int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader, - gpr_slice* slice) override; + gpr_slice* slice) GRPC_OVERRIDE; grpc_byte_buffer* grpc_raw_byte_buffer_create(gpr_slice* slice, - size_t nslices) override; + size_t nslices) GRPC_OVERRIDE; - gpr_slice gpr_slice_malloc(size_t length) override; - void gpr_slice_unref(gpr_slice slice) override; - gpr_slice gpr_slice_split_tail(gpr_slice* s, size_t split) override; - void gpr_slice_buffer_add(gpr_slice_buffer* sb, gpr_slice slice) override; - void gpr_slice_buffer_pop(gpr_slice_buffer* sb) override; + gpr_slice gpr_slice_malloc(size_t length) GRPC_OVERRIDE; + void gpr_slice_unref(gpr_slice slice) GRPC_OVERRIDE; + gpr_slice gpr_slice_split_tail(gpr_slice* s, size_t split) GRPC_OVERRIDE; + void gpr_slice_buffer_add(gpr_slice_buffer* sb, gpr_slice slice) GRPC_OVERRIDE; + void gpr_slice_buffer_pop(gpr_slice_buffer* sb) GRPC_OVERRIDE; - void grpc_metadata_array_init(grpc_metadata_array* array) override; - void grpc_metadata_array_destroy(grpc_metadata_array* array) override; + void grpc_metadata_array_init(grpc_metadata_array* array) GRPC_OVERRIDE; + void grpc_metadata_array_destroy(grpc_metadata_array* array) GRPC_OVERRIDE; - gpr_timespec gpr_inf_future(gpr_clock_type type) override; + gpr_timespec gpr_inf_future(gpr_clock_type type) GRPC_OVERRIDE; - virtual const Status& ok() override; - virtual const Status& cancelled() override; + virtual const Status& ok() GRPC_OVERRIDE; + virtual const Status& cancelled() GRPC_OVERRIDE; - void assert_fail(const char* failed_assertion) override; + void assert_fail(const char* failed_assertion) GRPC_OVERRIDE; }; } // namespace grpc diff --git a/src/compiler/cpp_generator.cc b/src/compiler/cpp_generator.cc index e2f127094ad..2288ba41636 100644 --- a/src/compiler/cpp_generator.cc +++ b/src/compiler/cpp_generator.cc @@ -73,9 +73,10 @@ void PrintIncludes(Printer *printer, const std::vector& headers, c vars["l"] = params.use_system_headers ? '<' : '"'; vars["r"] = params.use_system_headers ? '>' : '"'; - if (!params.grpc_search_path.empty()) { - vars["l"] += params.grpc_search_path; - if (params.grpc_search_path.back() != '/') { + auto& s = params.grpc_search_path; + if (!s.empty()) { + vars["l"] += s; + if (s[s.size()-1] != '/') { vars["l"] += '/'; } } diff --git a/src/compiler/generator_helpers.h b/src/compiler/generator_helpers.h index 53391bc41ab..9a88c2bfccd 100644 --- a/src/compiler/generator_helpers.h +++ b/src/compiler/generator_helpers.h @@ -253,7 +253,8 @@ inline void GetComment(const grpc::protobuf::FileDescriptor *desc, inline grpc::string GenerateCommentsWithPrefix( const std::vector &in, const grpc::string &prefix) { std::ostringstream oss; - for (const grpc::string &elem : in) { + for (auto it = in.begin(); it != in.end(); it++) { + const grpc::string& elem = *it; if (elem.empty()) { oss << prefix << "\n"; } else if (elem[0] == ' ') { From 0aa822b20f1c99acdba62e1c3d570a67d6f783a9 Mon Sep 17 00:00:00 2001 From: Yang Gao Date: Thu, 9 Jun 2016 17:23:38 -0700 Subject: [PATCH 1002/1894] minor fixes --- doc/command_line_tool.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/doc/command_line_tool.md b/doc/command_line_tool.md index eff101b2d4e..89a70548b8b 100644 --- a/doc/command_line_tool.md +++ b/doc/command_line_tool.md @@ -8,7 +8,7 @@ tools written in other languages to roughly follow the same syntax and flags. At this point, the tool needs to be built from source, and it should be moved out to grpc-tools repository as a stand alone application once it is mature enough. -## Core funcitonality +## Core functionality The command line tool can do the following things: @@ -30,10 +30,10 @@ The command line tool should support the following things: ## Code location -To use the tool, you need to get the grpc repository and in the grpc directory call +To use the tool, you need to get the grpc repository and in the grpc directory execute ``` -make grpc_cli +$ make grpc_cli ``` The main file can be found at @@ -46,7 +46,7 @@ https://github.com/grpc/grpc/blob/master/test/cpp/util/grpc_cli.cc Send a rpc to a helloworld server at `localhost:50051`: ``` -bins/opt/grpc_cli call localhost:50051 SayHello examples/protos/helloworld.proto \ +$ bins/opt/grpc_cli call localhost:50051 SayHello examples/protos/helloworld.proto \ "name: 'world'" --enable_ssl=false ``` @@ -71,7 +71,7 @@ For using gRPC with protocols other than probobuf, you will need the exact metho and a file containing the raw bytes to be sent on the wire ``` -bins/opt/grpc_cli call localhost:50051 /helloworld.Greeter/SayHello --input_binary_file=input.bin \ +$ bins/opt/grpc_cli call localhost:50051 /helloworld.Greeter/SayHello --input_binary_file=input.bin \ --output_binary_file=output.bin ``` On success, you will need to read or decode the response from the `output.bin` file. From b645a2d3ceb5199ef6f76e75f60d39432eef71ff Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 9 Jun 2016 18:39:06 -0700 Subject: [PATCH 1003/1894] Remove another range-based for Do not make explicit comparisons against nullptr; only use implicit typecast to bool --- src/cpp/server/server.cc | 6 +++--- src/cpp/server/server_builder.cc | 7 ++++--- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/cpp/server/server.cc b/src/cpp/server/server.cc index f6c3e5747c9..67d6ca7f6c5 100644 --- a/src/cpp/server/server.cc +++ b/src/cpp/server/server.cc @@ -67,7 +67,7 @@ static std::shared_ptr g_callbacks = nullptr; static gpr_once g_once_init_callbacks = GPR_ONCE_INIT; static void InitGlobalCallbacks() { - if (g_callbacks == nullptr) { + if (!g_callbacks) { g_callbacks.reset(new DefaultGlobalCallbacks()); } } @@ -324,8 +324,8 @@ Server::~Server() { } void Server::SetGlobalCallbacks(GlobalCallbacks* callbacks) { - GPR_ASSERT(g_callbacks == nullptr); - GPR_ASSERT(callbacks != nullptr); + GPR_ASSERT(!g_callbacks); + GPR_ASSERT(callbacks); g_callbacks.reset(callbacks); } diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index 54feac39825..243a0563bad 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -54,7 +54,8 @@ ServerBuilder::ServerBuilder() : max_message_size_(-1), generic_service_(nullptr) { grpc_compression_options_init(&compression_options_); gpr_once_init(&once_init_plugin_list, do_plugin_list_init); - for (auto factory : (*g_plugin_factory_list)) { + for (auto it = g_plugin_factory_list->begin(); it != g_plugin_factory_list->end(); it++) { + auto& factory = *it; std::unique_ptr plugin = factory(); plugins_[plugin->name()] = std::move(plugin); } @@ -103,7 +104,7 @@ std::unique_ptr ServerBuilder::BuildAndStart() { bool has_sync_methods = false; for (auto it = services_.begin(); it != services_.end(); ++it) { if ((*it)->service->has_synchronous_methods()) { - if (thread_pool == nullptr) { + if (!thread_pool) { thread_pool.reset(CreateDefaultThreadPool()); has_sync_methods = true; break; @@ -115,7 +116,7 @@ std::unique_ptr ServerBuilder::BuildAndStart() { (*option)->UpdateArguments(&args); (*option)->UpdatePlugins(&plugins_); } - if (thread_pool == nullptr) { + if (!thread_pool) { for (auto plugin = plugins_.begin(); plugin != plugins_.end(); plugin++) { if ((*plugin).second->has_sync_methods()) { thread_pool.reset(CreateDefaultThreadPool()); From cd3bb6b16ed1c9b485ee219af51d96d461d9a174 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 9 Jun 2016 20:05:50 -0700 Subject: [PATCH 1004/1894] Fix broken assert --- test/core/iomgr/fd_posix_test.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/core/iomgr/fd_posix_test.c b/test/core/iomgr/fd_posix_test.c index c506645b9da..7bb80f3050a 100644 --- a/test/core/iomgr/fd_posix_test.c +++ b/test/core/iomgr/fd_posix_test.c @@ -76,8 +76,8 @@ static void create_test_socket(int port, int *socket_fd, setsockopt(fd, SOL_SOCKET, SO_REUSEADDR, &one, sizeof(one)); /* Reset the size of socket send buffer to the minimal value to facilitate buffer filling up and triggering notify_on_write */ - GPR_ASSERT(grpc_set_socket_sndbuf(fd, buffer_size_bytes)); - GPR_ASSERT(grpc_set_socket_rcvbuf(fd, buffer_size_bytes)); + GPR_ASSERT(grpc_set_socket_sndbuf(fd, buffer_size_bytes) == GRPC_ERROR_NONE); + GPR_ASSERT(grpc_set_socket_rcvbuf(fd, buffer_size_bytes) == GRPC_ERROR_NONE); /* Make fd non-blocking */ flags = fcntl(fd, F_GETFL, 0); GPR_ASSERT(fcntl(fd, F_SETFL, flags | O_NONBLOCK) == 0); From 05bec5c0ab7574531ba17368ea67f91fa07b09af Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 9 Jun 2016 23:01:24 -0700 Subject: [PATCH 1005/1894] Fix uninitialized variable --- src/cpp/client/client_context.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/cpp/client/client_context.cc b/src/cpp/client/client_context.cc index d3e5ce0c4a6..0ba77a5057f 100644 --- a/src/cpp/client/client_context.cc +++ b/src/cpp/client/client_context.cc @@ -63,6 +63,7 @@ ClientContext::ClientContext() call_(nullptr), call_canceled_(false), deadline_(gpr_inf_future(GPR_CLOCK_REALTIME)), + census_context_(nullptr), propagate_from_call_(nullptr) { g_client_callbacks->DefaultConstructor(this); } From 41c7d01feac733622a592f854ed8af59a28a9849 Mon Sep 17 00:00:00 2001 From: vjpai Date: Fri, 10 Jun 2016 00:24:42 -0700 Subject: [PATCH 1006/1894] First draft of C++ style guide, minor changes to C --- doc/c-style-guide.md | 2 +- doc/cpp-style-guide.md | 78 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 79 insertions(+), 1 deletion(-) create mode 100644 doc/cpp-style-guide.md diff --git a/doc/c-style-guide.md b/doc/c-style-guide.md index 87de8892ddd..d6f9bbd7d4a 100644 --- a/doc/c-style-guide.md +++ b/doc/c-style-guide.md @@ -11,7 +11,7 @@ General - Layout rules are defined by clang-format, and all code should be passed through clang-format. A (docker-based) script to do so is included in - tools/distrib/clang_format_code.sh. + [tools/distrib/clang\_format\_code.sh] (../tools/distrib/clang_format_code.sh). Header Files ------------ diff --git a/doc/cpp-style-guide.md b/doc/cpp-style-guide.md new file mode 100644 index 00000000000..c16f6ffc42d --- /dev/null +++ b/doc/cpp-style-guide.md @@ -0,0 +1,78 @@ +GRPC C++ STYLE GUIDE +===================== + +Background +---------- + +Here we document style rules for C++ usage in the gRPC C++ bindings +and tests. + +General +------- + +- The majority of gRPC's C++ requirements are drawn from the [Google C++ style +guide] (https://google.github.io/styleguide/cppguide.html) + - However, gRPC has some additional requirements to maintain + [portability] (#portability) +- As in C, layout rules are defined by clang-format, and all code +should be passed through clang-format. A (docker-based) script to do +so is included in [tools/distrib/clang\_format\_code.sh] +(../tools/distrib/clang_format_code.sh). + + +Portability Restrictions +------------------- + +gRPC supports a large number of compilers, ranging from those that are +missing many key C++11 features to those that have quite detailed +analysis. As a result, gRPC compiles with a high level of warnings and +treat all warnings as errors. gRPC also forbids the use of some common +C++11 constructs. Here are some guidelines, to be extended as needed: +- Do not use range-based for. Expressions of the form + ```c + for (auto& i: vec) { + // code + } + ``` + are not allowed and should be replaced with code such as + ```c + for (auto it = vec.begin; it != vec.end(); it++) { + auto& i = *it; + // code + } + ``` +- Do not use lambda of any kind (no capture, explicit capture, or +default capture). Other C++ functional features such as +`std::function` or `std::bind` are allowed +- Do not use brace-list initializers. +- Do not compare a pointer to `nullptr` . This is because gcc 4.4 + does not support `nullptr` directly and gRPC implements a subset of + its features in [include/grpc++/impl/codegen/config.h] + (../include/grpc++/impl/codegen/config.h). Instead, pointers should + be checked for validity using their implicit conversion to `bool`. + In other words, use `if (p)` rather than `if (p != nullptr)` +- Do not use `final` or `override` as these are not supported by some + compilers. Instead use `GRPC_FINAL` and `GRPC_OVERRIDE` . These + compile down to the traditional C++ forms for compilers that support + them but are just elided if the compiler does not support those features. +- In the [include] (../../../tree/master/include/grpc++) and [src] + (../../../tree/master/src/cpp) directory trees, you should also not + use certain STL objects like `std::mutex`, `std::lock_guard`, + `std::unique_lock`, `std::nullptr`, `std::thread` . Instead, use + `grpc::mutex`, `grpc::lock_guard`, etc., which are gRPC + implementations of the prominent features of these objects that are + not always available. You can use the `std` versions of those in +- Similarly, in the same directories, do not use `std::chrono` unless + it is guarded by `#ifndef GRPC_CXX0X_NO_CHRONO` . For platforms that + lack`std::chrono,` there is a C-language timer called gpr_timespec that can + be used instead. +- `std::unique_ptr` must be used with extreme care in any kind of + collection. For example `vector` does not work in + gcc 4.4 if the vector is constructed to its full size at + initialization but does work if elements are added to the vector + using functions like `push_back`. `map` and other pair-based + collections do not work with `unique_ptr` under gcc 4.4. The issue + is that many of these collection implementations assume a copy + constructor + to be available. + From 967e378f197604f67cd48ddba259c191992ea6b0 Mon Sep 17 00:00:00 2001 From: vjpai Date: Fri, 10 Jun 2016 00:29:03 -0700 Subject: [PATCH 1007/1894] More docs --- doc/cpp-style-guide.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/doc/cpp-style-guide.md b/doc/cpp-style-guide.md index c16f6ffc42d..5feefae06a2 100644 --- a/doc/cpp-style-guide.md +++ b/doc/cpp-style-guide.md @@ -34,6 +34,7 @@ C++11 constructs. Here are some guidelines, to be extended as needed: // code } ``` + are not allowed and should be replaced with code such as ```c for (auto it = vec.begin; it != vec.end(); it++) { @@ -41,6 +42,7 @@ C++11 constructs. Here are some guidelines, to be extended as needed: // code } ``` + - Do not use lambda of any kind (no capture, explicit capture, or default capture). Other C++ functional features such as `std::function` or `std::bind` are allowed From e4e865f0c08485d26562f91071169880b0feab4f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 10 Jun 2016 00:29:59 -0700 Subject: [PATCH 1008/1894] Fix fuzzing detected bug --- src/core/ext/load_reporting/load_reporting.c | 3 +- .../0e79b68aa8b9c336f0bbf9029928c53079711423 | Bin 0 -> 523 bytes .../1560af88445d6c1e8b1300047f33056dce198e02 | Bin 0 -> 405 bytes .../48caf755ddcc6c45d3416ba6ab44709f360eb82b | Bin 0 -> 142 bytes .../7030cb2c62b289459e459bc54bd84c8d7e6f5a98 | Bin 0 -> 564 bytes .../81f8c545d77d93e6cb8239e9e4a4d7f8f8beeee9 | Bin 0 -> 853 bytes .../b7d02f4d12cd0b5442a04675e69f98fbdabc775a | Bin 0 -> 251 bytes .../ce6a90cb7d395fea7aa54ee9f7061cc45f5494d7 | Bin 0 -> 560 bytes ...h-482e9bdce0e13df2a77eef75a1c07d38ee28f4ab | Bin 0 -> 232 bytes .../e94428d78182060ff6309dd626cf6b3ebeed88d6 | Bin 0 -> 550 bytes tools/run_tests/tests.json | 153 ++++++++++++++++++ 11 files changed, 155 insertions(+), 1 deletion(-) create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/0e79b68aa8b9c336f0bbf9029928c53079711423 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/1560af88445d6c1e8b1300047f33056dce198e02 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/48caf755ddcc6c45d3416ba6ab44709f360eb82b create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/7030cb2c62b289459e459bc54bd84c8d7e6f5a98 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/81f8c545d77d93e6cb8239e9e4a4d7f8f8beeee9 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/b7d02f4d12cd0b5442a04675e69f98fbdabc775a create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/ce6a90cb7d395fea7aa54ee9f7061cc45f5494d7 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/crash-482e9bdce0e13df2a77eef75a1c07d38ee28f4ab create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/e94428d78182060ff6309dd626cf6b3ebeed88d6 diff --git a/src/core/ext/load_reporting/load_reporting.c b/src/core/ext/load_reporting/load_reporting.c index 60082dbaaae..9e4d32676fc 100644 --- a/src/core/ext/load_reporting/load_reporting.c +++ b/src/core/ext/load_reporting/load_reporting.c @@ -76,7 +76,8 @@ static bool is_load_reporting_enabled(const grpc_channel_args *a) { if (a == NULL) return false; for (size_t i = 0; i < a->num_args; i++) { if (0 == strcmp(a->args[i].key, GRPC_ARG_ENABLE_LOAD_REPORTING)) { - return a->args[i].value.pointer.p != NULL; + return a->args[i].type == GRPC_ARG_POINTER && + a->args[i].value.pointer.p != NULL; } } return false; diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/0e79b68aa8b9c336f0bbf9029928c53079711423 b/test/core/end2end/fuzzers/api_fuzzer_corpus/0e79b68aa8b9c336f0bbf9029928c53079711423 new file mode 100644 index 0000000000000000000000000000000000000000..5b16d9d759a7a585141dedf8a7a2e125df2be281 GIT binary patch literal 523 zcmZuuu}T9$5PiGEWiQH+QmmqZV1lL)w1~)ozaWTUah%DZ!5HJ*1O+*s$tU8qeDwU^FW(w76{C* z!+_iiry7c(jU>Wp(I+1-5@8>2ww;{syA(3tv@HD;0OD1s?QRtDR)6s_FM-md*^no#t zY7W(1(xM}C^ePKZpwhs}3QnS3Ei;Xxj%BQ91E~3+I3CIXKBpucMOPGF%Qx|$KLKje z)teT11)lZ((u_i=q^g7KNCmUvc3wPcdQOx>zv93+U1PAO-iwH`P zr8ArcZMXKss;EuHuDM&KS^8Zx!%<@)XcpwVN6mYgV{&*Us)=S`)l-*k=8K_w0%j=} OIXIun1~Y}O1-<~7>5*vw literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/1560af88445d6c1e8b1300047f33056dce198e02 b/test/core/end2end/fuzzers/api_fuzzer_corpus/1560af88445d6c1e8b1300047f33056dce198e02 new file mode 100644 index 0000000000000000000000000000000000000000..008dcac29ab7ef5256d670e4bd87d8f62a02fb39 GIT binary patch literal 405 zcmXX?u};H441IShr%Qo~nJE<#&$vtz7`liYkWK$hKkN{`TKV zRC|SX8;~s{_QKY-$sfi1OjI^}PkYO-JY^34$0<;i@H7U8wZ;X53Jml~m$(4*a6HYE I*%%&{|2JKGQvd(} literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/48caf755ddcc6c45d3416ba6ab44709f360eb82b b/test/core/end2end/fuzzers/api_fuzzer_corpus/48caf755ddcc6c45d3416ba6ab44709f360eb82b new file mode 100644 index 0000000000000000000000000000000000000000..f29e9a7983b7dfec60bd5f39faa2098a6df7e798 GIT binary patch literal 142 zcmW;E!3n}Z5Czaba~Q^mslk)cOTY>&!V<#ZO=K3c4J-(jU=L}+QWmUZ9r92A@c(1! zvR!=Ueh)!2jS6zG{CqY)o`pzqb cNM|j)GeAKxw!1^rvS355sD%)|#!f%LA9ZOXlmGw# literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/7030cb2c62b289459e459bc54bd84c8d7e6f5a98 b/test/core/end2end/fuzzers/api_fuzzer_corpus/7030cb2c62b289459e459bc54bd84c8d7e6f5a98 new file mode 100644 index 0000000000000000000000000000000000000000..035f23e8997040ba16d2c00fd695843087186f9f GIT binary patch literal 564 zcmZ`$u}T9$5PiGovKQsB6sxEZ%%Ld+n}{6v3xWt1$C(Uz7?U`6xqz)H#Luw5$|jwS zzhRR`tt|Y2buLj+&}EC+o%d$uz0oOgP7Ld`HbbAR<$NP}t7w?~_+Z~sSliR4G7JUg zS7AWziE|Cb&_)8`)ajiMC2(@&Ar%fc0w;Htl;>ygodAfJp|(!B-)fv?S%15cbdxNJ zJ5frP1M0RY>JBbWWUk#%n)qb_vRwB6!8z;4t@9|0PdXH($rZJ!)oTl%&;DI<-$Di*M)4WOot(q2az@F`_cH@={#Cth*V z9so;H)f-KUIe6Cl761JUCEz-&!kiTUB5I>oX}o^4W>zljA6vzK}YES2YqK=5Ep&}&_7y%NMijWasA)-QJu-xRSwMf(O>^KrDmWq)0 z8f>0evUTBWuy_H)$iTpGJlknS+e}y<-r4Wnz5D&1PKYyNSf{m_x5--0?(|(t!(^`p z&n*Srr`ojUfuyxJVLmj>cg^Z)P+ZQaG6%?cZilAP2OYwzxX`yyl^QIE{v{!!+6-Q<%hWX+*>0k=(=A zhLX=DMP#!N&lvU7Dxh}Pb=&mjj=sqiXHZ$-)+e=osEp8jE=SBW$tLQKxvmrUvvDr+sx#VajW z5&Pn%W?XcBZY$1#6F3X?@r6u7U*FG5?VKI_p8>$pR>N}<6gz`Y?*)@V0Z+QGrmzcj zy34j+JeKT#jjcD9S3q7eZBW@uOwW=2Ib&LnZN*ubI0@?gQijZ0s86;p98I!lzF9?2$uvPvbUHY_X zwn>psknl23GSl3Fd(WNg)wHZC-hg&2o&_$Dtux0?{4~Gl2`yYPuxVYen6+$Iv#mTm zm$F~JYGzrkxq5-8Yy=Aq;t57THqwSLo&AhJb_%@717PBza8e={YX1*@scgqT=Ds;l za3>G*{-~s!=1muZdzg{s-5ZZ>)3r5!_~V`6GHDCLzh}zqZGvyjAx}em0o@2!=u;AH O33{%l?Yc0ENbm=U!$aNx literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/ce6a90cb7d395fea7aa54ee9f7061cc45f5494d7 b/test/core/end2end/fuzzers/api_fuzzer_corpus/ce6a90cb7d395fea7aa54ee9f7061cc45f5494d7 new file mode 100644 index 0000000000000000000000000000000000000000..c5c9c27938380110a5f3cd2ea7b65081d71fe631 GIT binary patch literal 560 zcmZuuJ!>055PiEi%bsiwl_r&JgOG%+!eAE);UIs(U<@gavou&D`tscA4$|fdE#-tmVAZ``gek`PYjtmZJ7& zZ5l-+Wnl{jA%qw4IUeJ68Fg}_&}(T=Qo7_cou nG4x!DS<-a{u1eWpqt;qsU;!_=5t(Efd0jkRVa}4OO9lJ~aGIO* literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/crash-482e9bdce0e13df2a77eef75a1c07d38ee28f4ab b/test/core/end2end/fuzzers/api_fuzzer_corpus/crash-482e9bdce0e13df2a77eef75a1c07d38ee28f4ab new file mode 100644 index 0000000000000000000000000000000000000000..b83e382f18c755967e343e96db1cac2b99f4ba4a GIT binary patch literal 232 zcmXAjF-k*G5Jm3{pU2Bjd|;O{Hln|XosCG`frVrNAr4UpKVg!*w}B6WOA&sR9b^r* zHoviO4dFS)JIyWbxpU9wFSELqC3quxD+-_4rD^cuHC|Pj;Ziu0$>lw}GEGDyhY=hk zlUb00okr0isJr_#G>HEv0b1yKK3=Y7&noMcZeQ!giTpCMz4)QW<_+0@M9^VsO%>lX zUC#b#%uY6YVb^qR5+C0m6epD}NRF9kH$oo+F8-1QdcJ1^>_FC1 F;1_CjKkNVi literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/e94428d78182060ff6309dd626cf6b3ebeed88d6 b/test/core/end2end/fuzzers/api_fuzzer_corpus/e94428d78182060ff6309dd626cf6b3ebeed88d6 new file mode 100644 index 0000000000000000000000000000000000000000..570de0eef1aed67f31e64c06e9d740b9af4cd172 GIT binary patch literal 550 zcmZuuJ!>056r5eGWluJT%aBU4L0G~T*kBh5;eJFw1Y8_v=^+VAXZhV1aT^sT|K+MQ z>eS?Kq`4+><-$K;{d6*cfR`<1ci+4>v!fH@oEX+=Z3>^P<@}`g+|)4n^)yYF=lHBm zvk0WjZ^3}vZ_YIoLmL6Y>Cy`icR<*~lb)0Pc9w_2H(g8r9suGGP-hcfrlbD!BJD3{ z@hpwzVM6yA#Ul#iY;hx!D3JdCP8GMHArxV3HT9>r9@GS*b(uajvmEdwE=GF=W3%mjhC!7)h literal 0 HcmV?d00001 diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 6624e399d49..07ab7d6f90f 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -27495,6 +27495,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/0e79b68aa8b9c336f0bbf9029928c53079711423" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/0ea509d249ae28faba8980aacb972c7ea28d3fd5" @@ -27954,6 +27971,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/1560af88445d6c1e8b1300047f33056dce198e02" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/157586c7c0ba8fd0dc9bfc2426229a7da934cec2" @@ -31915,6 +31949,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/48caf755ddcc6c45d3416ba6ab44709f360eb82b" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/48f56289592da153b3c50bcc26ad6d4d3a7e443b" @@ -34737,6 +34788,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/7030cb2c62b289459e459bc54bd84c8d7e6f5a98" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/705c87b99197c87eb2ed148f8b3fdc60f8616f15" @@ -36063,6 +36131,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/81f8c545d77d93e6cb8239e9e4a4d7f8f8beeee9" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/820d5ba2e9d91563dae39a1b02833fbef1e6d8f1" @@ -39684,6 +39769,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/b7d02f4d12cd0b5442a04675e69f98fbdabc775a" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/b7f282fbd77193d822df9c8156370398e1fd099c" @@ -41554,6 +41656,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/ce6a90cb7d395fea7aa54ee9f7061cc45f5494d7" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/ceecce905981d8291a79fe32f89e8be688dfee7e" @@ -41724,6 +41843,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/crash-482e9bdce0e13df2a77eef75a1c07d38ee28f4ab" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/crash-4ae4941b4c3f857966a0e3c05f789a0a5ae15bbf" @@ -44121,6 +44257,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/e94428d78182060ff6309dd626cf6b3ebeed88d6" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/ea2cf809383d8725bec1b44ab774f04b3e6d5ae5" From 3a6385b53e4a5f9f123fc067dd136db8dc27951a Mon Sep 17 00:00:00 2001 From: vjpai Date: Fri, 10 Jun 2016 00:37:11 -0700 Subject: [PATCH 1009/1894] Add ref to test --- doc/cpp-style-guide.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/cpp-style-guide.md b/doc/cpp-style-guide.md index 5feefae06a2..b89ba99e4d7 100644 --- a/doc/cpp-style-guide.md +++ b/doc/cpp-style-guide.md @@ -63,7 +63,8 @@ default capture). Other C++ functional features such as `std::unique_lock`, `std::nullptr`, `std::thread` . Instead, use `grpc::mutex`, `grpc::lock_guard`, etc., which are gRPC implementations of the prominent features of these objects that are - not always available. You can use the `std` versions of those in + not always available. You can use the `std` versions of those in [test] + (../../../tree/master/test/cpp) - Similarly, in the same directories, do not use `std::chrono` unless it is guarded by `#ifndef GRPC_CXX0X_NO_CHRONO` . For platforms that lack`std::chrono,` there is a C-language timer called gpr_timespec that can From eac07c3cc8bad2c704931186aa4e23851d30df56 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Fri, 10 Jun 2016 01:36:53 -0700 Subject: [PATCH 1010/1894] WIP --- src/cpp/server/server_builder.cc | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index 243a0563bad..ea5dfbfe8ea 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -54,10 +54,15 @@ ServerBuilder::ServerBuilder() : max_message_size_(-1), generic_service_(nullptr) { grpc_compression_options_init(&compression_options_); gpr_once_init(&once_init_plugin_list, do_plugin_list_init); - for (auto it = g_plugin_factory_list->begin(); it != g_plugin_factory_list->end(); it++) { + for (auto it = g_plugin_factory_list->begin(); + it != g_plugin_factory_list->end(); it++) { auto& factory = *it; std::unique_ptr plugin = factory(); - plugins_[plugin->name()] = std::move(plugin); + auto name = plugin->name(); + ServerBuilderPlugin* plugin_ptr = plugin.release(); + plugins_[name] = nullptr; + auto pl = plugins_.find(name); + pl->second.reset(plugin_ptr); } } From bd67b559f50639a5ad8152c591fac945e8a843f1 Mon Sep 17 00:00:00 2001 From: vjpai Date: Fri, 10 Jun 2016 01:58:12 -0700 Subject: [PATCH 1011/1894] this_thread --- doc/cpp-style-guide.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/cpp-style-guide.md b/doc/cpp-style-guide.md index b89ba99e4d7..271ff3984c3 100644 --- a/doc/cpp-style-guide.md +++ b/doc/cpp-style-guide.md @@ -78,4 +78,5 @@ default capture). Other C++ functional features such as is that many of these collection implementations assume a copy constructor to be available. - +- Don't use `std::this_thread` . Use `gpr_sleep_until` for sleeping a thread. + From 492fd961824447e7f12974893dd9bbf37291e5cc Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 10 Jun 2016 09:03:34 -0700 Subject: [PATCH 1012/1894] generate_projects.sh after adding grpc_use_signal() API --- BUILD | 2 ++ Makefile | 1 + grpc.def | 1 + src/python/grpcio/grpc/_cython/imports.generated.c | 2 ++ src/python/grpcio/grpc/_cython/imports.generated.h | 3 +++ src/ruby/ext/grpc/rb_grpc_imports.generated.c | 2 ++ src/ruby/ext/grpc/rb_grpc_imports.generated.h | 3 +++ 7 files changed, 14 insertions(+) diff --git a/BUILD b/BUILD index 68b066d5593..43855751cbc 100644 --- a/BUILD +++ b/BUILD @@ -556,6 +556,7 @@ cc_library( "src/core/lib/iomgr/closure.h", "src/core/lib/iomgr/endpoint.h", "src/core/lib/iomgr/endpoint_pair.h", + "src/core/lib/iomgr/ev_epoll_linux.h", "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", "src/core/lib/iomgr/ev_poll_posix.h", "src/core/lib/iomgr/ev_posix.h", @@ -693,6 +694,7 @@ cc_library( "src/core/lib/iomgr/endpoint.c", "src/core/lib/iomgr/endpoint_pair_posix.c", "src/core/lib/iomgr/endpoint_pair_windows.c", + "src/core/lib/iomgr/ev_epoll_linux.c", "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", "src/core/lib/iomgr/ev_poll_posix.c", "src/core/lib/iomgr/ev_posix.c", diff --git a/Makefile b/Makefile index 620299ed15b..4d8b060760a 100644 --- a/Makefile +++ b/Makefile @@ -2764,6 +2764,7 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/iomgr/endpoint.c \ src/core/lib/iomgr/endpoint_pair_posix.c \ src/core/lib/iomgr/endpoint_pair_windows.c \ + src/core/lib/iomgr/ev_epoll_linux.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ diff --git a/grpc.def b/grpc.def index 0046028949e..9f70ce61a30 100644 --- a/grpc.def +++ b/grpc.def @@ -90,6 +90,7 @@ EXPORTS grpc_call_error_to_string grpc_insecure_channel_create_from_fd grpc_server_add_insecure_channel_from_fd + grpc_use_signal grpc_auth_property_iterator_next grpc_auth_context_property_iterator grpc_auth_context_peer_identity diff --git a/src/python/grpcio/grpc/_cython/imports.generated.c b/src/python/grpcio/grpc/_cython/imports.generated.c index 5c49f6cf3e9..a025b99047d 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.c +++ b/src/python/grpcio/grpc/_cython/imports.generated.c @@ -128,6 +128,7 @@ grpc_is_binary_header_type grpc_is_binary_header_import; grpc_call_error_to_string_type grpc_call_error_to_string_import; grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; grpc_server_add_insecure_channel_from_fd_type grpc_server_add_insecure_channel_from_fd_import; +grpc_use_signal_type grpc_use_signal_import; grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import; grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import; @@ -401,6 +402,7 @@ void pygrpc_load_imports(HMODULE library) { grpc_call_error_to_string_import = (grpc_call_error_to_string_type) GetProcAddress(library, "grpc_call_error_to_string"); grpc_insecure_channel_create_from_fd_import = (grpc_insecure_channel_create_from_fd_type) GetProcAddress(library, "grpc_insecure_channel_create_from_fd"); grpc_server_add_insecure_channel_from_fd_import = (grpc_server_add_insecure_channel_from_fd_type) GetProcAddress(library, "grpc_server_add_insecure_channel_from_fd"); + grpc_use_signal_import = (grpc_use_signal_type) GetProcAddress(library, "grpc_use_signal"); grpc_auth_property_iterator_next_import = (grpc_auth_property_iterator_next_type) GetProcAddress(library, "grpc_auth_property_iterator_next"); grpc_auth_context_property_iterator_import = (grpc_auth_context_property_iterator_type) GetProcAddress(library, "grpc_auth_context_property_iterator"); grpc_auth_context_peer_identity_import = (grpc_auth_context_peer_identity_type) GetProcAddress(library, "grpc_auth_context_peer_identity"); diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index 16bb5cdfab6..5bdbbce89b5 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -335,6 +335,9 @@ extern grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_fr typedef void(*grpc_server_add_insecure_channel_from_fd_type)(grpc_server *server, grpc_completion_queue *cq, int fd); extern grpc_server_add_insecure_channel_from_fd_type grpc_server_add_insecure_channel_from_fd_import; #define grpc_server_add_insecure_channel_from_fd grpc_server_add_insecure_channel_from_fd_import +typedef void(*grpc_use_signal_type)(int signum); +extern grpc_use_signal_type grpc_use_signal_import; +#define grpc_use_signal grpc_use_signal_import typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); extern grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; #define grpc_auth_property_iterator_next grpc_auth_property_iterator_next_import diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.c b/src/ruby/ext/grpc/rb_grpc_imports.generated.c index c13d1a00d74..8e24ef38ed5 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.c +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.c @@ -128,6 +128,7 @@ grpc_is_binary_header_type grpc_is_binary_header_import; grpc_call_error_to_string_type grpc_call_error_to_string_import; grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; grpc_server_add_insecure_channel_from_fd_type grpc_server_add_insecure_channel_from_fd_import; +grpc_use_signal_type grpc_use_signal_import; grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import; grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import; @@ -397,6 +398,7 @@ void grpc_rb_load_imports(HMODULE library) { grpc_call_error_to_string_import = (grpc_call_error_to_string_type) GetProcAddress(library, "grpc_call_error_to_string"); grpc_insecure_channel_create_from_fd_import = (grpc_insecure_channel_create_from_fd_type) GetProcAddress(library, "grpc_insecure_channel_create_from_fd"); grpc_server_add_insecure_channel_from_fd_import = (grpc_server_add_insecure_channel_from_fd_type) GetProcAddress(library, "grpc_server_add_insecure_channel_from_fd"); + grpc_use_signal_import = (grpc_use_signal_type) GetProcAddress(library, "grpc_use_signal"); grpc_auth_property_iterator_next_import = (grpc_auth_property_iterator_next_type) GetProcAddress(library, "grpc_auth_property_iterator_next"); grpc_auth_context_property_iterator_import = (grpc_auth_context_property_iterator_type) GetProcAddress(library, "grpc_auth_context_property_iterator"); grpc_auth_context_peer_identity_import = (grpc_auth_context_peer_identity_type) GetProcAddress(library, "grpc_auth_context_peer_identity"); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index 9c86a3690c5..d6e2a367999 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -335,6 +335,9 @@ extern grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_fr typedef void(*grpc_server_add_insecure_channel_from_fd_type)(grpc_server *server, grpc_completion_queue *cq, int fd); extern grpc_server_add_insecure_channel_from_fd_type grpc_server_add_insecure_channel_from_fd_import; #define grpc_server_add_insecure_channel_from_fd grpc_server_add_insecure_channel_from_fd_import +typedef void(*grpc_use_signal_type)(int signum); +extern grpc_use_signal_type grpc_use_signal_import; +#define grpc_use_signal grpc_use_signal_import typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); extern grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; #define grpc_auth_property_iterator_next grpc_auth_property_iterator_next_import From 8da8511762f9b59d4715abf4861a4578e04530cd Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 10 Jun 2016 09:13:10 -0700 Subject: [PATCH 1013/1894] Expand corpus, make one-shot runners not self-check leaks (to give ASAN a chance) --- test/core/client_config/uri_fuzzer_test.c | 4 + test/core/end2end/fuzzers/api_fuzzer.c | 3 +- test/core/end2end/fuzzers/client_fuzzer.c | 13 +- test/core/end2end/fuzzers/server_fuzzer.c | 13 +- .../05551028437699c8650f5d08eb5f95ee25adf436 | Bin 0 -> 49 bytes .../06285b50669cc16463db009ac821f99cf1ec2e24 | Bin 0 -> 650 bytes .../23c582f6e23c7bbc9ae7b039b3b4e2ccdea3d5d2 | Bin 0 -> 1106 bytes .../395aea4fcfea081fc0d2733fff2d14405439fa72 | Bin 0 -> 2047 bytes .../404e234751b01dd0b51f9e7610f787253b074528 | Bin 0 -> 650 bytes .../4123bd764c04385191342ea64918408140313714 | Bin 0 -> 47 bytes .../4f96a5fba4d11401eb22d4b1e365fbbb2d684f24 | Bin 0 -> 315 bytes .../609706c57e848ea58d7ca14fe6cc253322f3e8ce | Bin 0 -> 59 bytes .../89cd90fb47bb9eb289e8126b26021ee00d572d95 | Bin 0 -> 48 bytes .../99a1acc96512c1155f91afa378e2345726d307c3 | Bin 0 -> 660 bytes ...h-ccf36bef9318fe6d5e5e1560c5485cdc87d0a701 | Bin 0 -> 104 bytes .../ec4949487fa84f0cead39521b51f837af9dc784a | Bin 0 -> 46 bytes ...t-0292270056246b7a4ccd2e7d0356665cef307ef2 | Bin 0 -> 2046 bytes ...t-098ec93ded3a20e6043d11e9cc6066351e257f8e | Bin 0 -> 2047 bytes ...t-1dc659f500e7bee41a4fee4423ade8332c162cc0 | Bin 0 -> 2046 bytes ...t-350b5da741597222c98fe86768432507850317f5 | Bin 0 -> 2047 bytes ...t-395aea4fcfea081fc0d2733fff2d14405439fa72 | Bin 0 -> 2047 bytes ...t-45cf8ac5faa9c7b15baf9281e8d7e0b4e103f0e0 | Bin 0 -> 2046 bytes ...t-60a9f77951c5059616764894e1963d83d478edfe | Bin 0 -> 2047 bytes ...t-97a338fa892093ed5013a76b96b35dd112df3342 | Bin 0 -> 2047 bytes ...t-a1b2cfcf0997acb13a32fc5c004f57d9e9bc4275 | Bin 0 -> 2047 bytes ...t-a1ed26e6f82ca0e81e3f415bd8b0b8b520d3927b | Bin 0 -> 2046 bytes ...t-f412afea6b01aa53da919a41a65ffbf9885f2d65 | Bin 0 -> 2047 bytes test/core/http/fuzzer.c | 4 + test/core/json/fuzzer.c | 4 + test/core/nanopb/fuzzer_response.c | 3 + test/core/nanopb/fuzzer_serverlist.c | 3 + .../chttp2/hpack_parser_fuzzer_test.c | 5 +- test/core/util/one_corpus_entry_fuzzer.c | 7 + tools/run_tests/tests.json | 391 ++++++++++++++++++ 34 files changed, 438 insertions(+), 12 deletions(-) create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/05551028437699c8650f5d08eb5f95ee25adf436 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/06285b50669cc16463db009ac821f99cf1ec2e24 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/23c582f6e23c7bbc9ae7b039b3b4e2ccdea3d5d2 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/395aea4fcfea081fc0d2733fff2d14405439fa72 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/404e234751b01dd0b51f9e7610f787253b074528 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/4123bd764c04385191342ea64918408140313714 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/4f96a5fba4d11401eb22d4b1e365fbbb2d684f24 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/609706c57e848ea58d7ca14fe6cc253322f3e8ce create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/89cd90fb47bb9eb289e8126b26021ee00d572d95 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/99a1acc96512c1155f91afa378e2345726d307c3 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/crash-ccf36bef9318fe6d5e5e1560c5485cdc87d0a701 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/ec4949487fa84f0cead39521b51f837af9dc784a create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-0292270056246b7a4ccd2e7d0356665cef307ef2 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-098ec93ded3a20e6043d11e9cc6066351e257f8e create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-1dc659f500e7bee41a4fee4423ade8332c162cc0 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-350b5da741597222c98fe86768432507850317f5 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-395aea4fcfea081fc0d2733fff2d14405439fa72 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-45cf8ac5faa9c7b15baf9281e8d7e0b4e103f0e0 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-60a9f77951c5059616764894e1963d83d478edfe create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-97a338fa892093ed5013a76b96b35dd112df3342 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-a1b2cfcf0997acb13a32fc5c004f57d9e9bc4275 create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-a1ed26e6f82ca0e81e3f415bd8b0b8b520d3927b create mode 100644 test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-f412afea6b01aa53da919a41a65ffbf9885f2d65 diff --git a/test/core/client_config/uri_fuzzer_test.c b/test/core/client_config/uri_fuzzer_test.c index eb976fc9f53..f297140559c 100644 --- a/test/core/client_config/uri_fuzzer_test.c +++ b/test/core/client_config/uri_fuzzer_test.c @@ -31,6 +31,7 @@ * */ +#include #include #include @@ -38,6 +39,9 @@ #include "src/core/ext/client_config/uri_parser.h" +bool squelch = true; +bool leak_check = true; + int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { char *s = gpr_malloc(size + 1); memcpy(s, data, size); diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c index 3cae0bd7782..dd93c4a817f 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -50,7 +50,8 @@ //////////////////////////////////////////////////////////////////////////////// // logging -static const bool squelch = true; +bool squelch = true; +bool leak_check = true; static void dont_log(gpr_log_func_args *args) {} diff --git a/test/core/end2end/fuzzers/client_fuzzer.c b/test/core/end2end/fuzzers/client_fuzzer.c index 5612b6621a5..79b23d78569 100644 --- a/test/core/end2end/fuzzers/client_fuzzer.c +++ b/test/core/end2end/fuzzers/client_fuzzer.c @@ -41,7 +41,8 @@ #include "test/core/util/memory_counters.h" #include "test/core/util/mock_endpoint.h" -static const bool squelch = true; +bool squelch = true; +bool leak_check = true; static void discard_write(gpr_slice slice) {} @@ -53,7 +54,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_test_only_set_metadata_hash_seed(0); struct grpc_memory_counters counters; if (squelch) gpr_set_log_function(dont_log); - grpc_memory_counters_init(); + if (leak_check) grpc_memory_counters_init(); grpc_init(); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -156,8 +157,10 @@ done: grpc_byte_buffer_destroy(response_payload_recv); } grpc_shutdown(); - counters = grpc_memory_counters_snapshot(); - grpc_memory_counters_destroy(); - GPR_ASSERT(counters.total_size_relative == 0); + 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/end2end/fuzzers/server_fuzzer.c b/test/core/end2end/fuzzers/server_fuzzer.c index 0a7d6d92aac..80f568ac927 100644 --- a/test/core/end2end/fuzzers/server_fuzzer.c +++ b/test/core/end2end/fuzzers/server_fuzzer.c @@ -38,7 +38,8 @@ #include "test/core/util/memory_counters.h" #include "test/core/util/mock_endpoint.h" -static const bool squelch = true; +bool squelch = true; +bool leak_check = true; static void discard_write(gpr_slice slice) {} @@ -51,7 +52,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_test_only_set_metadata_hash_seed(0); struct grpc_memory_counters counters; if (squelch) gpr_set_log_function(dont_log); - grpc_memory_counters_init(); + if (leak_check) grpc_memory_counters_init(); grpc_init(); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; @@ -120,8 +121,10 @@ done: grpc_server_destroy(server); grpc_completion_queue_destroy(cq); grpc_shutdown(); - counters = grpc_memory_counters_snapshot(); - grpc_memory_counters_destroy(); - GPR_ASSERT(counters.total_size_relative == 0); + 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/end2end/fuzzers/server_fuzzer_corpus/05551028437699c8650f5d08eb5f95ee25adf436 b/test/core/end2end/fuzzers/server_fuzzer_corpus/05551028437699c8650f5d08eb5f95ee25adf436 new file mode 100644 index 0000000000000000000000000000000000000000..c61aff87e99b3377985e44b628e217e4a10f6a43 GIT binary patch literal 49 vcmWFt@>I}L@CXSB&^OXE;N{}w3ibt&3=9k%EI@*RL6d=<5ybl600ImE%)bbc literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/06285b50669cc16463db009ac821f99cf1ec2e24 b/test/core/end2end/fuzzers/server_fuzzer_corpus/06285b50669cc16463db009ac821f99cf1ec2e24 new file mode 100644 index 0000000000000000000000000000000000000000..d480552344b12045ec680b47c6644de0bd97e653 GIT binary patch literal 650 zcmbtSO-sZu5KWhgwYrdl-isGM*lt&kz35R7VsZNivT3#nWRuX&f))Rq|H9ic1uc^>p0*wF&C zo#%8xs+3A$*^{1!X0z#)6=OO}&ZSW6=L>YRaY_Wv`Ih_8qK_~8cJYtIVgIfc2&~(H s`b1|Q^p%JP&0agNW&nR$W5{(2!vc3H@NUAxzpHTD*Ym9Z7H?XiPtP}lVgLXD literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/23c582f6e23c7bbc9ae7b039b3b4e2ccdea3d5d2 b/test/core/end2end/fuzzers/server_fuzzer_corpus/23c582f6e23c7bbc9ae7b039b3b4e2ccdea3d5d2 new file mode 100644 index 0000000000000000000000000000000000000000..20b4cf800c7c378771c760e6973b5e80811efc6e GIT binary patch literal 1106 zcmbVLO;3X`7%m&?hA!ctcj8HxF__+V*;Nll;`Rr+(m|7sHt>>c{ycw-zhFlXwk%G@ zzEBe0w9VTG-sdBDdv?0c(_|8O4}HI5b*%A=t_UGhz54ku^vbZ$h7v>E@@7JKQ=Hlt z!;HjqPR$rVs@u{aaN~#GG3DVI% Jd$m>=6@1%?FHGSYfD$NdCapxh9re+j1@v<+n57oR*w^L4b2s@;f;vCyZF4GYF9;5UT@>Q>pom~0P@-xj^-@Q7hY zWPNu;>P!=sUscVc0tVkXNvAty1gOsR#P5aCgqjjMS>#}?k^)E?owd#i{xD(!LZGDt zwJ?p;?PG%n1%zAK_({KS+x|++uLxJ?mbt22tS1&Ei u<7XxH@Uvm>f0M9aLa%R$GaR@+gS${K=0J6^%gf>UI8e;zmF1H;I`9v!s!HJi literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/404e234751b01dd0b51f9e7610f787253b074528 b/test/core/end2end/fuzzers/server_fuzzer_corpus/404e234751b01dd0b51f9e7610f787253b074528 new file mode 100644 index 0000000000000000000000000000000000000000..56a2f93726c5ca957aba30586b4b2ca9d9ccf849 GIT binary patch literal 650 zcmbtSO-lnY5KYR8Yjq(9y)Rz;pu1Z=?nRG!5Et7&kY>|OAWgz%3Re7c{wI$G&2H@> z6;W^?!@SANBl9NJ(|vlG-c6@fah;EoVKSUNbRHoT`QvSXa2H{+S6T`pF6PD*Guo2< z(lNmoJQ4ubqXh?H>Zp30Ov$jMOOIL!s{>^iRibe~j+oKFHDs`|oKS0(WE7;)MblbF zjys=G#<+!yYi4Sxo0FQ)6$L($weR$Nqo$OW41mYbQmJ_BP|`PUJEG=A+Mnk^@7Rxq z(RQBG8Lcy>q-Rfi9#)L=D=$VqPS2Ip%jXMpv+k6@oeQlDp+_HI_U+;yiNpR~4k#=g tW+Bm807E6>jb^W_pk@R9w8lsn2b%@%Qjpz5fPYuvwyzgO|1I8(MxR-?gCYO` literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/4123bd764c04385191342ea64918408140313714 b/test/core/end2end/fuzzers/server_fuzzer_corpus/4123bd764c04385191342ea64918408140313714 new file mode 100644 index 0000000000000000000000000000000000000000..18d908f6ab36746b4f3e637d6a5ca9832de32fd9 GIT binary patch literal 47 xcmWFt@>I}L@CXSB&^OXE;N{}w3ibt&3=9k%EI@*RL6dOF z^~jpKym{GtP1DrMTvOmvOA2g4a;C^JI<9#1cnRKHqniJ}0~>Pn`{30zYZI#IA7D)< z&(o{|b+%Y2bYT~&H{)O!A7dGBI^0_L^ZZ4UBQiPL@3ZOmVt?c!?YOveOA6SPDhP3) MAN|q~j0aJE0}U2X1ONa4 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/609706c57e848ea58d7ca14fe6cc253322f3e8ce b/test/core/end2end/fuzzers/server_fuzzer_corpus/609706c57e848ea58d7ca14fe6cc253322f3e8ce new file mode 100644 index 0000000000000000000000000000000000000000..1ac7cc9036dda75c98f351ef894bc4cea0682f36 GIT binary patch literal 59 wcmWFt@>I}L@CXSB&^OXE;N{}w3ibt&3=9k`KnwI}L@CXSB&^OXE;N{}w3ibt&3=9k%EI@*RL6dq47EfW%~qfza^Cam;??BqP;J@BIiq?_kv z{Zb@c3NMb^26#H1-1}urrtwG$RlnYnhmUp@L5u$jy&uY7w0${bSUc~;tfTZTY%I8{ t%a8A{RdhQXbh|qe4$(I}L@CXSB&^OXE;N{}w3ibt&3=9k%Dpo*}fkA?uk%i&80^|Px6tyDhMFq*a hj6ekij7F(>$@wXndFdQLr3@f32FCvlaKO;O001Bt7aRZp literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/ec4949487fa84f0cead39521b51f837af9dc784a b/test/core/end2end/fuzzers/server_fuzzer_corpus/ec4949487fa84f0cead39521b51f837af9dc784a new file mode 100644 index 0000000000000000000000000000000000000000..e6ea5327d88cb2bb310d7d65efb5fe37d6a874d6 GIT binary patch literal 46 vcmWFt@>I}L@CXSB&^OXE;N{}w3ibt&3=9k%EI@*RL6d* z6g4-k)ZJZ+I|YOr+4@a?Z_|BA%gzWFSNb*^ZVyqfa{Tto$g8UD^HU3O#06p_yL8iP$U2V literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-098ec93ded3a20e6043d11e9cc6066351e257f8e b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-098ec93ded3a20e6043d11e9cc6066351e257f8e new file mode 100644 index 0000000000000000000000000000000000000000..b8fa2c077eda26ab17ee584145d8954ab121ea05 GIT binary patch literal 2047 zcmeHDu};G<5KSP65>d$m>=6@1O&l1ru)=_dNPghzToX&KZ8;Z-^6d;bSvz&19deSN z?oQ8l_g?w+o;)RQbzSn8EMLaUxcV3|2!hBzAFCi7vyfdC7N}eBtucH9j$IeM=x~Qo zM`V4qL+VTum7i73;sOR=IZ68)Wdx|s^u%t3(S({(+FN8`t&##r8qHg01-lzD1tHK< zidvXP>h`|DtpdWeZ2V6@Z{7Y#%Pt5P-|oRe;uq|VFv+}m zlgyjsz3S^DeNNw-rsA)8k;F+{?v9l19x>{P ztly4Ey=kNBvu;>i!ss_A>2#xv0M(m;*sU;{P*X-Hiwvw)QUFP#dFQNPcN1nH1X{{a z3)4#7-M4s9K)98ySNeb3?nhd7LAW6YQlT4IJPznG=={OM9@1jH@6THY@ytTYY pAC=VO_fzopI~xmU^pO0Mb*>34B!PM%K2{s&Bv76sUbTx);16T+N}K=y literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-350b5da741597222c98fe86768432507850317f5 b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-350b5da741597222c98fe86768432507850317f5 new file mode 100644 index 0000000000000000000000000000000000000000..4364289907f9c10ac026c3f04adb59691762ef54 GIT binary patch literal 2047 zcmeHDO;3YB5Cz3piB0yPcjC#K@}WmAUiHvOgg-D{rm)GnyIF?B`rD1T@DF+_2PT=9 zndHsKd&TE_^c1~SRgu0V**aW@^kpwi(eSD zM8WGYt)U!EIp6&8-cs>r~^Lb_YWR4E}17&ATE&u=k literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-395aea4fcfea081fc0d2733fff2d14405439fa72 b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-395aea4fcfea081fc0d2733fff2d14405439fa72 new file mode 100644 index 0000000000000000000000000000000000000000..c83226294aae3a3a076196a863137794946a94bb GIT binary patch literal 2047 zcmeHDJx{|h5OpAk5>d$m>=6@1%?FHGSYfD$NdCapxh9re+j1@v<+n57oR*w^L4b2s@;f;vCyZF4GYF9;5UT@>Q>pom~0P@-xj^-@Q7hY zWPNu;>P!=sUscVc0tVkXNvAty1gOsR#P5aCgqjjMS>#}?k^)E?owd#i{xD(!LZGDt zwJ?p;?PG%n1%zAK_({KS+x|++uLxJ?mbt22tS1&Ei u<7XxH@Uvm>f0M9aLa%R$GaR@+gS${K=0J6^%gf>UI8e;zmF1H;I`9v!s!HJi literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-45cf8ac5faa9c7b15baf9281e8d7e0b4e103f0e0 b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-45cf8ac5faa9c7b15baf9281e8d7e0b4e103f0e0 new file mode 100644 index 0000000000000000000000000000000000000000..70b2eecbd632a92d2e4a5200f08884b26370687e GIT binary patch literal 2046 zcmeHDJx{|h5Ort}C8ClC*dr#2nhzMWu)X`Ke5aqcX@8{USAdy8r+H literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-60a9f77951c5059616764894e1963d83d478edfe b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-60a9f77951c5059616764894e1963d83d478edfe new file mode 100644 index 0000000000000000000000000000000000000000..0063c63f73370676ad2b47ed594e89b4cc1c1103 GIT binary patch literal 2047 zcmeHHu};G<5KSP65>d$m>=6@1O&l1ru)=_dNPghzToX&KZ8;Z-^6d;b5kJs{swgMj z)1CBuckc}@KVFlEj*co|o3BL+bb`Sh_0!m$e3MPY%u1>YLOH{jT1(Tfgu z7P%1US{O~JDW$zd2G%MmfTYp9byl#O5mOKX zEv2Z1X{2s%8{8@&T+7D4^z+v3m$dARa6t~FLf5l+=+ULndcxfXnp7z1%VZiSc%D6a zX<44!E2)RiRq*^h2@5Cm`sO&mf%5~nGxcZ=R7czV?-u|56Q`)FIK`vqoBz&%AF+l? A;s5{u literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-97a338fa892093ed5013a76b96b35dd112df3342 b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-97a338fa892093ed5013a76b96b35dd112df3342 new file mode 100644 index 0000000000000000000000000000000000000000..3a231db3e4ba5d21499a8865a4045bb868a66ffa GIT binary patch literal 2047 zcmeHDO-sW-5KS~<8!YTW@4-_m&4(Uy@v4VnF!=-1%`{oq?k<}NSbv*8&4Zi#gdR%3 z49sH&=FQA|#piqU6unhdk-j9^DqMx-Za~lT0+%i}ocYn5N<{7m~P*;`4)y<5iZDrkZ3y=_8r<78aME`hdSm`xH1~o@ia@G zowOv2)>5ecYvaBCj>7yAoxXn>KWFK_K8rPzF6=;g;d}GBDLRl(@u~Tz={WEQ8Rbiz literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-a1b2cfcf0997acb13a32fc5c004f57d9e9bc4275 b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-a1b2cfcf0997acb13a32fc5c004f57d9e9bc4275 new file mode 100644 index 0000000000000000000000000000000000000000..1a213469ddaccc32277e6d2fae71aa31cf2fb699 GIT binary patch literal 2047 zcmeHDO-sW-5KU~vHdxq$-h-!Bnh!nZ;#Ch~F!=-1%`{oq?k<}NSbw_*H~9-CJ(LX0 zV+Q8Utu12?BF;Z|Kp;g*g!`Z`tF>sEC zVpLq$LN$*y9wZR%MD3XF->&%;hTRY@$%2q*I~MjG+87#l@U(|I=2EyZ8sG6WOJ1C{ yB#SmusQzc`z5R{G{1KhM>1#8+#HAD#mlB$F&Pkv=hdgtyB!T=&e9Sf`O5h*1p-Tw> literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-a1ed26e6f82ca0e81e3f415bd8b0b8b520d3927b b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-a1ed26e6f82ca0e81e3f415bd8b0b8b520d3927b new file mode 100644 index 0000000000000000000000000000000000000000..c00d51de994a53935432593d2bdda4cf96ad8ea7 GIT binary patch literal 2046 zcmeHDJx{|h5OpAk5>d$m>=6@1%?FHGSYfD$NdCapxh9re+j1@v<+n57oR*w^L4b2s@;f;vCyZF4GYF9;5UT@>Q>pom~0P@-xj^-@Q7hY zWPNu;>P!=sUscVc0tVkXNvAty1gOsR#P5aCgqjjMS>#}?k^)E?owd#i{xD(!LZGDt zwJ?p;?PG%n1%zAK_({KS+x|++uLxJ?mbt22tS1&Ei u<7XxH@Uvm>f0M9aLa%R$GaR@+gS${K=0J6^%gf>UI8e;zmF1HeI`9u;$x7h> literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-f412afea6b01aa53da919a41a65ffbf9885f2d65 b/test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-f412afea6b01aa53da919a41a65ffbf9885f2d65 new file mode 100644 index 0000000000000000000000000000000000000000..171446cb1e08db5709645e225a836fbe98335556 GIT binary patch literal 2047 zcmeHIu};G<5KSP65>d$m>=6@1O&l1ru)=_dNPfU|u8D;1|X$RQZCMw^nn#F|}Xz~j8SK3OUJKH0>mewE`OmXjk3Fowu0+ltq^-i*zv8F;w zaF~LTwo#_NZD6Yf!df--lK9r`w{q+ZVS!#K4Zdgb(1TA!OMttLXi}*awaG*$d7eFz zv@B2VwKBukDtP{xgoRTjeRCY(!1)2#8G1Aas-tb57oUy;#p#?fU-It`MD(A1{*Cn) D92-oN literal 0 HcmV?d00001 diff --git a/test/core/http/fuzzer.c b/test/core/http/fuzzer.c index 7e4f4eb993d..c3c634f2813 100644 --- a/test/core/http/fuzzer.c +++ b/test/core/http/fuzzer.c @@ -31,6 +31,7 @@ * */ +#include #include #include @@ -38,6 +39,9 @@ #include "src/core/lib/http/parser.h" +bool squelch = true; +bool leak_check = true; + int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_http_parser parser; grpc_http_parser_init(&parser); diff --git a/test/core/json/fuzzer.c b/test/core/json/fuzzer.c index e94b41ca999..26c5c25caf1 100644 --- a/test/core/json/fuzzer.c +++ b/test/core/json/fuzzer.c @@ -31,6 +31,7 @@ * */ +#include #include #include @@ -40,6 +41,9 @@ #include "src/core/lib/json/json.h" #include "test/core/util/memory_counters.h" +bool squelch = true; +bool leak_check = true; + int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { char *s; struct grpc_memory_counters counters; diff --git a/test/core/nanopb/fuzzer_response.c b/test/core/nanopb/fuzzer_response.c index b4e386020a7..21a5d7b9685 100644 --- a/test/core/nanopb/fuzzer_response.c +++ b/test/core/nanopb/fuzzer_response.c @@ -38,6 +38,9 @@ #include "src/core/ext/lb_policy/grpclb/load_balancer_api.h" +bool squelch = true; +bool leak_check = true; + int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size); grpc_grpclb_response *response; diff --git a/test/core/nanopb/fuzzer_serverlist.c b/test/core/nanopb/fuzzer_serverlist.c index d4ec74f0e79..df2044d9077 100644 --- a/test/core/nanopb/fuzzer_serverlist.c +++ b/test/core/nanopb/fuzzer_serverlist.c @@ -38,6 +38,9 @@ #include "src/core/ext/lb_policy/grpclb/load_balancer_api.h" +bool squelch = true; +bool leak_check = true; + int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { gpr_slice slice = gpr_slice_from_copied_buffer((const char *)data, size); grpc_grpclb_serverlist *serverlist; diff --git a/test/core/transport/chttp2/hpack_parser_fuzzer_test.c b/test/core/transport/chttp2/hpack_parser_fuzzer_test.c index e41eda8653e..1e3d2d39d88 100644 --- a/test/core/transport/chttp2/hpack_parser_fuzzer_test.c +++ b/test/core/transport/chttp2/hpack_parser_fuzzer_test.c @@ -40,12 +40,15 @@ #include "src/core/ext/transport/chttp2/transport/hpack_parser.h" +bool squelch = true; +bool leak_check = true; + static void onhdr(void *ud, grpc_mdelem *md) { GRPC_MDELEM_UNREF(md); } static void dont_log(gpr_log_func_args *args) {} int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_test_only_set_metadata_hash_seed(0); - gpr_set_log_function(dont_log); + if (squelch) gpr_set_log_function(dont_log); grpc_init(); grpc_chttp2_hpack_parser parser; grpc_chttp2_hpack_parser_init(&parser); diff --git a/test/core/util/one_corpus_entry_fuzzer.c b/test/core/util/one_corpus_entry_fuzzer.c index 41f9558211a..be32a8a2cf4 100644 --- a/test/core/util/one_corpus_entry_fuzzer.c +++ b/test/core/util/one_corpus_entry_fuzzer.c @@ -31,13 +31,20 @@ * */ +#include + #include #include "src/core/lib/support/load_file.h" extern int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size); +extern bool squelch; +extern bool leak_check; + int main(int argc, char **argv) { int ok = 0; + squelch = false; + leak_check = false; gpr_slice buffer = gpr_load_file(argv[1], 0, &ok); GPR_ASSERT(ok); LLVMFuzzerTestOneInput(GPR_SLICE_START_PTR(buffer), GPR_SLICE_LENGTH(buffer)); diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 6624e399d49..1faf6be0388 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -72630,6 +72630,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/05551028437699c8650f5d08eb5f95ee25adf436" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/05c3a0390d0f52d241728926fa901599a47e4606" @@ -72664,6 +72681,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/06285b50669cc16463db009ac821f99cf1ec2e24" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/06bd2f82fefb9943787d63ea359f9b77072380c2" @@ -73463,6 +73497,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/23c582f6e23c7bbc9ae7b039b3b4e2ccdea3d5d2" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/23f261e44d54a2736f6e288128d98db9e5015206" @@ -74092,6 +74143,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/395aea4fcfea081fc0d2733fff2d14405439fa72" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/39ea47bb.bin" @@ -74279,6 +74347,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/404e234751b01dd0b51f9e7610f787253b074528" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/407607d2.bin" @@ -74313,6 +74398,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/4123bd764c04385191342ea64918408140313714" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/418f392319c44d06a018ce4c62569d527829177a" @@ -74670,6 +74772,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/4f96a5fba4d11401eb22d4b1e365fbbb2d684f24" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/4f97bd97ab5dc6b4c0f62f8459be8a9593dc83b3" @@ -75214,6 +75333,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/609706c57e848ea58d7ca14fe6cc253322f3e8ce" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/61e798bdd49b339983fea4ccfe18efe44afbd69b" @@ -76013,6 +76149,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/89cd90fb47bb9eb289e8126b26021ee00d572d95" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/8b186384.bin" @@ -76387,6 +76540,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/99a1acc96512c1155f91afa378e2345726d307c3" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/9a176b6f7e0dc5f681a1788d8954f76fabd08cad" @@ -77662,6 +77832,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/crash-ccf36bef9318fe6d5e5e1560c5485cdc87d0a701" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/crash-dae0f07934a527989f23f06e630710ff6ca8c809" @@ -78155,6 +78342,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/ec4949487fa84f0cead39521b51f837af9dc784a" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/ed8da77f.bin" @@ -78648,6 +78852,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-0292270056246b7a4ccd2e7d0356665cef307ef2" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-082763e16153cb6b8f3f5308cd060e822f475e5a" @@ -78665,6 +78886,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-098ec93ded3a20e6043d11e9cc6066351e257f8e" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-0aa52e00ddd54f8e129430852c2da95650c354b0" @@ -78767,6 +79005,57 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-1dc659f500e7bee41a4fee4423ade8332c162cc0" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-350b5da741597222c98fe86768432507850317f5" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-395aea4fcfea081fc0d2733fff2d14405439fa72" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-3991c873ba814d0cd03a67d25fff0c8fe8713aca" @@ -78801,6 +79090,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-45cf8ac5faa9c7b15baf9281e8d7e0b4e103f0e0" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-4c6da955e4c101b81a62b2f8e934d94a62ae534b" @@ -78852,6 +79158,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-60a9f77951c5059616764894e1963d83d478edfe" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-63ebf780ee6c2003eba622686a4bf94c503ad96e" @@ -79005,6 +79328,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-97a338fa892093ed5013a76b96b35dd112df3342" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-9a176b6f7e0dc5f681a1788d8954f76fabd08cad" @@ -79039,6 +79379,40 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-a1b2cfcf0997acb13a32fc5c004f57d9e9bc4275" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-a1ed26e6f82ca0e81e3f415bd8b0b8b520d3927b" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-a61a28cf78149518466b87e5463ec5c771dc504e" @@ -79311,6 +79685,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-f412afea6b01aa53da919a41a65ffbf9885f2d65" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "server_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/server_fuzzer_corpus/slow-unit-f67be653815f6c2c10eea55c8009e1167ac9c20b" From 64c0e8d4bcf5f6822cdef368ee84074c3ea234c7 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 10 Jun 2016 11:19:51 -0700 Subject: [PATCH 1014/1894] Add format check for gpr_log and gpr_asprintf --- include/grpc/impl/codegen/log.h | 4 ++- include/grpc/support/string_util.h | 3 +- .../ext/lb_policy/round_robin/round_robin.c | 2 +- .../ext/resolver/dns/native/dns_resolver.c | 3 +- .../chttp2/server/insecure/server_chttp2.c | 7 ++-- .../server/secure/server_secure_chttp2.c | 7 ++-- .../chttp2/transport/chttp2_transport.c | 23 ++++++++---- .../ext/transport/chttp2/transport/parsing.c | 4 +-- src/core/lib/channel/compress_filter.c | 12 +++---- src/core/lib/iomgr/iomgr.c | 9 ++--- src/core/lib/support/string.c | 10 ++++++ src/core/lib/support/string.h | 4 +++ src/core/lib/surface/call.c | 4 +-- src/core/lib/surface/call_log_batch.c | 2 +- src/core/lib/transport/metadata.c | 4 +-- test/core/client_config/lb_policies_test.c | 13 +++---- .../set_initial_connect_string_test.c | 6 ++-- test/core/compression/message_compress_test.c | 15 ++++---- test/core/end2end/tests/cancel_with_status.c | 2 +- test/core/end2end/tests/negative_deadline.c | 2 +- test/core/iomgr/endpoint_tests.c | 6 ++-- test/core/iomgr/fd_posix_test.c | 2 +- test/core/iomgr/tcp_posix_test.c | 24 +++++++------ test/core/support/slice_test.c | 4 +-- test/core/support/string_test.c | 35 ++++++++++++++++++- test/core/surface/completion_queue_test.c | 4 +-- test/core/transport/chttp2/bin_encoder_test.c | 3 +- test/core/transport/metadata_test.c | 5 +-- 28 files changed, 146 insertions(+), 73 deletions(-) diff --git a/include/grpc/impl/codegen/log.h b/include/grpc/impl/codegen/log.h index aa86fc4c179..9090a34cd55 100644 --- a/include/grpc/impl/codegen/log.h +++ b/include/grpc/impl/codegen/log.h @@ -34,6 +34,7 @@ #ifndef GRPC_IMPL_CODEGEN_LOG_H #define GRPC_IMPL_CODEGEN_LOG_H +#include #include #include /* for abort() */ @@ -74,7 +75,8 @@ const char *gpr_log_severity_string(gpr_log_severity severity); /* Log a message. It's advised to use GPR_xxx above to generate the context * for each message */ GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, - const char *format, ...); + const char *format, ...) + __attribute__((format(printf, 4, 5))); GPRAPI void gpr_log_message(const char *file, int line, gpr_log_severity severity, const char *message); diff --git a/include/grpc/support/string_util.h b/include/grpc/support/string_util.h index f981bc0db0b..c68577b6269 100644 --- a/include/grpc/support/string_util.h +++ b/include/grpc/support/string_util.h @@ -54,7 +54,8 @@ GPRAPI char *gpr_strdup(const char *src); On error, returns -1 and sets *strp to NULL. If the format string is bad, the result is undefined. */ -GPRAPI int gpr_asprintf(char **strp, const char *format, ...); +GPRAPI int gpr_asprintf(char **strp, const char *format, ...) + __attribute__((format(printf, 2, 3))); #ifdef __cplusplus } diff --git a/src/core/ext/lb_policy/round_robin/round_robin.c b/src/core/ext/lb_policy/round_robin/round_robin.c index da2cdfe8e90..40dd7c59400 100644 --- a/src/core/ext/lb_policy/round_robin/round_robin.c +++ b/src/core/ext/lb_policy/round_robin/round_robin.c @@ -333,7 +333,7 @@ static void start_picking(grpc_exec_ctx *exec_ctx, round_robin_lb_policy *p) { p->started_picking = 1; if (grpc_lb_round_robin_trace) { - gpr_log(GPR_DEBUG, "LB_POLICY: p=%p num_subchannels=%d", p, + gpr_log(GPR_DEBUG, "LB_POLICY: p=%p num_subchannels=%" PRIuPTR, p, p->num_subchannels); } diff --git a/src/core/ext/resolver/dns/native/dns_resolver.c b/src/core/ext/resolver/dns/native/dns_resolver.c index 620ba4e2aa0..5efc95e0fa6 100644 --- a/src/core/ext/resolver/dns/native/dns_resolver.c +++ b/src/core/ext/resolver/dns/native/dns_resolver.c @@ -183,7 +183,8 @@ static void dns_on_resolved(grpc_exec_ctx *exec_ctx, void *arg, gpr_timespec now = gpr_now(GPR_CLOCK_MONOTONIC); gpr_timespec next_try = gpr_backoff_step(&r->backoff_state, now); gpr_timespec timeout = gpr_time_sub(next_try, now); - gpr_log(GPR_DEBUG, "dns resolution failed: retrying in %d.%09d seconds", + gpr_log(GPR_DEBUG, + "dns resolution failed: retrying in %" PRId64 ".%09d seconds", timeout.tv_sec, timeout.tv_nsec); GPR_ASSERT(!r->have_retry_timer); r->have_retry_timer = true; diff --git a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c index 0428bb1e3dc..c95dd20d1d8 100644 --- a/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c +++ b/src/core/ext/transport/chttp2/server/insecure/server_chttp2.c @@ -111,13 +111,14 @@ int grpc_server_add_insecure_http2_port(grpc_server *server, const char *addr) { } } if (count == 0) { - gpr_log(GPR_ERROR, "No address added out of total %d resolved", + gpr_log(GPR_ERROR, "No address added out of total %" PRIuPTR " resolved", resolved->naddrs); goto error; } if (count != resolved->naddrs) { - gpr_log(GPR_ERROR, "Only %d addresses added out of total %d resolved", - count, resolved->naddrs); + gpr_log(GPR_ERROR, + "Only %d addresses added out of total %" PRIuPTR " resolved", count, + resolved->naddrs); } grpc_resolved_addresses_destroy(resolved); diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index ebbefbcd893..e3437e5ed3d 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -229,13 +229,14 @@ int grpc_server_add_secure_http2_port(grpc_server *server, const char *addr, } } if (count == 0) { - gpr_log(GPR_ERROR, "No address added out of total %d resolved", + gpr_log(GPR_ERROR, "No address added out of total %" PRIuPTR " resolved", resolved->naddrs); goto error; } if (count != resolved->naddrs) { - gpr_log(GPR_ERROR, "Only %d addresses added out of total %d resolved", - count, resolved->naddrs); + gpr_log(GPR_ERROR, + "Only %d addresses added out of total %" PRIuPTR " resolved", count, + resolved->naddrs); /* if it's an error, don't we want to goto error; here ? */ } grpc_resolved_addresses_destroy(resolved); diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 046b3950012..047f164eca8 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1972,10 +1972,13 @@ static char *format_flowctl_context_var(const char *context, const char *var, int64_t val, uint32_t id, char **scope) { char *underscore_pos; + char *buf; char *result; if (context == NULL) { *scope = NULL; - gpr_asprintf(&result, "%s(%lld)", var, val); + gpr_asprintf(&buf, "%s(%" PRId64 ")", var, val); + result = gpr_strpad(buf, ' ', 40); + gpr_free(buf); return result; } underscore_pos = strchr(context, '_'); @@ -1986,7 +1989,9 @@ static char *format_flowctl_context_var(const char *context, const char *var, gpr_asprintf(scope, "%s[%d]", tmp, id); gpr_free(tmp); } - gpr_asprintf(&result, "%s.%s(%lld)", underscore_pos + 1, var, val); + gpr_asprintf(&buf, "%s.%s(%" PRId64 ")", underscore_pos + 1, var, val); + result = gpr_strpad(buf, ' ', 40); + gpr_free(buf); return result; } @@ -2007,6 +2012,8 @@ void grpc_chttp2_flowctl_trace(const char *file, int line, const char *phase, uint32_t stream_id, int64_t val1, int64_t val2) { char *scope1; char *scope2; + char *tmp_phase; + char *tmp_scope1; char *label1 = format_flowctl_context_var(context1, var1, val1, stream_id, &scope1); char *label2 = @@ -2014,14 +2021,18 @@ void grpc_chttp2_flowctl_trace(const char *file, int line, const char *phase, char *clisvr = is_client ? "client" : "server"; char *prefix; - gpr_asprintf(&prefix, "FLOW % 8s: %s % 11s ", phase, clisvr, scope1); + tmp_phase = gpr_strpad(phase, ' ', 8); + tmp_scope1 = gpr_strpad(scope1, ' ', 11); + gpr_asprintf(&prefix, "FLOW %s: %s %s ", phase, clisvr, scope1); + gpr_free(tmp_phase); + gpr_free(tmp_scope1); switch (op) { case GRPC_CHTTP2_FLOWCTL_MOVE: GPR_ASSERT(samestr(scope1, scope2)); if (val2 != 0) { gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, - "%sMOVE % 40s <- % 40s giving %d", prefix, label1, label2, + "%sMOVE %s <- %s giving %" PRId64, prefix, label1, label2, val1 + val2); } break; @@ -2029,7 +2040,7 @@ void grpc_chttp2_flowctl_trace(const char *file, int line, const char *phase, GPR_ASSERT(val2 >= 0); if (val2 != 0) { gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, - "%sCREDIT % 40s by % 40s giving %d", prefix, label1, label2, + "%sCREDIT %s by %s giving %" PRId64, prefix, label1, label2, val1 + val2); } break; @@ -2037,7 +2048,7 @@ void grpc_chttp2_flowctl_trace(const char *file, int line, const char *phase, GPR_ASSERT(val2 >= 0); if (val2 != 0) { gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, - "%sDEBIT % 40s by % 40s giving %d", prefix, label1, label2, + "%sDEBIT %s by %s giving %" PRId64, prefix, label1, label2, val1 - val2); } break; diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index 4bd374b7fa7..8f72a4ff992 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -534,14 +534,14 @@ static grpc_chttp2_parse_error update_incoming_window( grpc_chttp2_stream_parsing *stream_parsing) { uint32_t incoming_frame_size = transport_parsing->incoming_frame_size; if (incoming_frame_size > transport_parsing->incoming_window) { - gpr_log(GPR_ERROR, "frame of size %d overflows incoming window of %d", + gpr_log(GPR_ERROR, "frame of size %d overflows incoming window of %" PRId64, transport_parsing->incoming_frame_size, transport_parsing->incoming_window); return GRPC_CHTTP2_CONNECTION_ERROR; } if (incoming_frame_size > stream_parsing->incoming_window) { - gpr_log(GPR_ERROR, "frame of size %d overflows incoming window of %d", + gpr_log(GPR_ERROR, "frame of size %d overflows incoming window of %" PRId64, transport_parsing->incoming_frame_size, stream_parsing->incoming_window); return GRPC_CHTTP2_CONNECTION_ERROR; diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 4fe9a7f045a..32f4f8d37e5 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -177,8 +177,8 @@ static void finish_send_message(grpc_exec_ctx *exec_ctx, const float savings_ratio = 1.0f - (float)after_size / (float)before_size; GPR_ASSERT(grpc_compression_algorithm_name(calld->compression_algorithm, &algo_name)); - gpr_log(GPR_DEBUG, - "Compressed[%s] %d bytes vs. %d bytes (%.2f%% savings)", + gpr_log(GPR_DEBUG, "Compressed[%s] %" PRIuPTR " bytes vs. %" PRIuPTR + " bytes (%.2f%% savings)", algo_name, before_size, after_size, 100 * savings_ratio); } gpr_slice_buffer_swap(&calld->slices, &tmp); @@ -188,10 +188,10 @@ static void finish_send_message(grpc_exec_ctx *exec_ctx, char *algo_name; GPR_ASSERT(grpc_compression_algorithm_name(calld->compression_algorithm, &algo_name)); - gpr_log( - GPR_DEBUG, - "Algorithm '%s' enabled but decided not to compress. Input size: %d", - algo_name, calld->slices.length); + gpr_log(GPR_DEBUG, + "Algorithm '%s' enabled but decided not to compress. Input size: " + "%" PRIuPTR, + algo_name, calld->slices.length); } } diff --git a/src/core/lib/iomgr/iomgr.c b/src/core/lib/iomgr/iomgr.c index 60cef8ba777..89292a153ed 100644 --- a/src/core/lib/iomgr/iomgr.c +++ b/src/core/lib/iomgr/iomgr.c @@ -96,7 +96,8 @@ void grpc_iomgr_shutdown(void) { gpr_time_sub(gpr_now(GPR_CLOCK_REALTIME), last_warning_time), gpr_time_from_seconds(1, GPR_TIMESPAN)) >= 0) { if (g_root_object.next != &g_root_object) { - gpr_log(GPR_DEBUG, "Waiting for %d iomgr objects to be destroyed", + gpr_log(GPR_DEBUG, + "Waiting for %" PRIuPTR " iomgr objects to be destroyed", count_objects()); } last_warning_time = gpr_now(GPR_CLOCK_REALTIME); @@ -114,9 +115,9 @@ void grpc_iomgr_shutdown(void) { if (gpr_cv_wait(&g_rcv, &g_mu, short_deadline)) { if (gpr_time_cmp(gpr_now(GPR_CLOCK_REALTIME), shutdown_deadline) > 0) { if (g_root_object.next != &g_root_object) { - gpr_log(GPR_DEBUG, - "Failed to free %d iomgr objects before shutdown deadline: " - "memory leaks are likely", + gpr_log(GPR_DEBUG, "Failed to free %" PRIuPTR + " iomgr objects before shutdown deadline: " + "memory leaks are likely", count_objects()); dump_objects("LEAKED"); if (grpc_iomgr_abort_on_leaks()) { diff --git a/src/core/lib/support/string.c b/src/core/lib/support/string.c index a2ab6c5f1fc..789bd6408be 100644 --- a/src/core/lib/support/string.c +++ b/src/core/lib/support/string.c @@ -194,6 +194,16 @@ int int64_ttoa(int64_t value, char *string) { return i; } +char *gpr_strpad(const char *str, char flag, size_t length) { + const size_t str_length = strlen(str); + const size_t out_length = str_length > length ? str_length : length; + char *out = gpr_malloc(out_length + 1); + memset(out, flag, out_length - str_length); + memcpy(out + out_length - str_length, str, str_length); + out[out_length] = 0; + return out; +} + char *gpr_strjoin(const char **strs, size_t nstrs, size_t *final_length) { return gpr_strjoin_sep(strs, nstrs, "", final_length); } diff --git a/src/core/lib/support/string.h b/src/core/lib/support/string.h index ea58610914e..30f5aef7665 100644 --- a/src/core/lib/support/string.h +++ b/src/core/lib/support/string.h @@ -83,6 +83,10 @@ int int64_ttoa(int64_t value, char *output); /* Reverse a run of bytes */ void gpr_reverse_bytes(char *str, int len); +/* Pad a string with flag characters. The given length specifies the minimum + field width. The input string is never truncated. */ +char *gpr_strpad(const char *str, char flag, size_t length); + /* Join a set of strings, returning the resulting string. Total combined length (excluding null terminator) is returned in total_length if it is non-null. */ diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index a9b1e25a771..c613f325dc1 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1182,7 +1182,7 @@ static void validate_filtered_metadata(grpc_exec_ctx *exec_ctx, if (algo >= GRPC_COMPRESS_ALGORITHMS_COUNT) { gpr_asprintf(&error_msg, "Invalid compression algorithm value '%d'.", algo); - gpr_log(GPR_ERROR, error_msg); + gpr_log(GPR_ERROR, "%s", error_msg); close_with_status(exec_ctx, call, GRPC_STATUS_UNIMPLEMENTED, error_msg); } else if (grpc_compression_options_is_algorithm_enabled( &compression_options, algo) == 0) { @@ -1191,7 +1191,7 @@ static void validate_filtered_metadata(grpc_exec_ctx *exec_ctx, grpc_compression_algorithm_name(algo, &algo_name); gpr_asprintf(&error_msg, "Compression algorithm '%s' is disabled.", algo_name); - gpr_log(GPR_ERROR, error_msg); + gpr_log(GPR_ERROR, "%s", error_msg); close_with_status(exec_ctx, call, GRPC_STATUS_UNIMPLEMENTED, error_msg); } else { call->incoming_compression_algorithm = algo; diff --git a/src/core/lib/surface/call_log_batch.c b/src/core/lib/surface/call_log_batch.c index a6d1d5149f1..31c074f15dc 100644 --- a/src/core/lib/surface/call_log_batch.c +++ b/src/core/lib/surface/call_log_batch.c @@ -112,7 +112,7 @@ void grpc_call_log_batch(char *file, int line, gpr_log_severity severity, size_t i; for (i = 0; i < nops; i++) { tmp = grpc_op_string(&ops[i]); - gpr_log(file, line, severity, "ops[%d]: %s", i, tmp); + gpr_log(file, line, severity, "ops[%" PRIuPTR "]: %s", i, tmp); gpr_free(tmp); } } diff --git a/src/core/lib/transport/metadata.c b/src/core/lib/transport/metadata.c index 79de54beb59..0677f297660 100644 --- a/src/core/lib/transport/metadata.c +++ b/src/core/lib/transport/metadata.c @@ -235,7 +235,7 @@ void grpc_mdctx_global_shutdown(void) { gc_mdtab(shard); /* TODO(ctiller): GPR_ASSERT(shard->count == 0); */ if (shard->count != 0) { - gpr_log(GPR_DEBUG, "WARNING: %d metadata elements were leaked", + gpr_log(GPR_DEBUG, "WARNING: %" PRIuPTR " metadata elements were leaked", shard->count); if (grpc_iomgr_abort_on_leaks()) { abort(); @@ -248,7 +248,7 @@ void grpc_mdctx_global_shutdown(void) { gpr_mu_destroy(&shard->mu); /* TODO(ctiller): GPR_ASSERT(shard->count == 0); */ if (shard->count != 0) { - gpr_log(GPR_DEBUG, "WARNING: %d metadata strings were leaked", + gpr_log(GPR_DEBUG, "WARNING: %" PRIuPTR " metadata strings were leaked", shard->count); for (size_t j = 0; j < shard->capacity; j++) { for (internal_string *s = shard->strs[j]; s; s = s->bucket_next) { diff --git a/test/core/client_config/lb_policies_test.c b/test/core/client_config/lb_policies_test.c index 1534360dea0..3160312db6f 100644 --- a/test/core/client_config/lb_policies_test.c +++ b/test/core/client_config/lb_policies_test.c @@ -135,7 +135,7 @@ static void drain_cq(grpc_completion_queue *cq) { } static void kill_server(const servers_fixture *f, size_t i) { - gpr_log(GPR_INFO, "KILLING SERVER %d", i); + gpr_log(GPR_INFO, "KILLING SERVER %" PRIuPTR, i); GPR_ASSERT(f->servers[i] != NULL); grpc_server_shutdown_and_notify(f->servers[i], f->cq, tag(10000)); GPR_ASSERT( @@ -157,7 +157,7 @@ typedef struct request_data { static void revive_server(const servers_fixture *f, request_data *rdata, size_t i) { int got_port; - gpr_log(GPR_INFO, "RAISE AGAIN SERVER %d", i); + gpr_log(GPR_INFO, "RAISE AGAIN SERVER %" PRIuPTR, i); GPR_ASSERT(f->servers[i] == NULL); gpr_log(GPR_DEBUG, "revive: %s", f->servers_hostports[i]); @@ -311,7 +311,7 @@ static int *perform_request(servers_fixture *f, grpc_channel *client, .type != GRPC_QUEUE_TIMEOUT) { GPR_ASSERT(ev.type == GRPC_OP_COMPLETE); read_tag = ((int)(intptr_t)ev.tag); - gpr_log(GPR_DEBUG, "EVENT: success:%d, type:%d, tag:%d iter:%d", + gpr_log(GPR_DEBUG, "EVENT: success:%d, type:%d, tag:%d iter:%" PRIuPTR, ev.success, ev.type, read_tag, iter_num); if (ev.success && read_tag >= 1000) { GPR_ASSERT(s_idx == -1); /* only one server must reply */ @@ -643,7 +643,8 @@ static void print_failed_expectations(const int *expected_connection_sequence, const size_t num_iters) { size_t i; for (i = 0; i < num_iters; i++) { - gpr_log(GPR_ERROR, "FAILURE: Iter (expected, actual): %d (%d, %d)", i, + gpr_log(GPR_ERROR, + "FAILURE: Iter (expected, actual): %" PRIuPTR " (%d, %d)", i, expected_connection_sequence[i % expected_seq_length], actual_connection_sequence[i]); } @@ -726,8 +727,8 @@ static void verify_total_carnage_round_robin( const int actual = actual_connection_sequence[i]; const int expected = -1; if (actual != expected) { - gpr_log(GPR_ERROR, "FAILURE: expected %d, actual %d at iter %d", expected, - actual, i); + gpr_log(GPR_ERROR, "FAILURE: expected %d, actual %d at iter %" PRIuPTR, + expected, actual, i); abort(); } } diff --git a/test/core/client_config/set_initial_connect_string_test.c b/test/core/client_config/set_initial_connect_string_test.c index 438b9492369..9f47671f4df 100644 --- a/test/core/client_config/set_initial_connect_string_test.c +++ b/test/core/client_config/set_initial_connect_string_test.c @@ -69,7 +69,7 @@ static void handle_read(grpc_exec_ctx *exec_ctx, void *arg, bool success) { GPR_ASSERT(success); gpr_slice_buffer_move_into(&state.temp_incoming_buffer, &state.incoming_buffer); - gpr_log(GPR_DEBUG, "got %d bytes, magic is %d bytes", + gpr_log(GPR_DEBUG, "got %" PRIuPTR " bytes, magic is %" PRIuPTR " bytes", state.incoming_buffer.length, strlen(magic_connect_string)); if (state.incoming_buffer.length > strlen(magic_connect_string)) { gpr_atm_rel_store(&state.done_atm, 1); @@ -173,8 +173,8 @@ static void actually_poll_server(void *arg) { bool done = gpr_atm_acq_load(&state.done_atm) != 0; gpr_timespec time_left = gpr_time_sub(deadline, gpr_now(GPR_CLOCK_REALTIME)); - gpr_log(GPR_DEBUG, "done=%d, time_left=%d.%09d", done, time_left.tv_sec, - time_left.tv_nsec); + gpr_log(GPR_DEBUG, "done=%d, time_left=%" PRIuPTR ".%09d", done, + time_left.tv_sec, time_left.tv_nsec); if (done || gpr_time_cmp(time_left, gpr_time_0(GPR_TIMESPAN)) < 0) { break; } diff --git a/test/core/compression/message_compress_test.c b/test/core/compression/message_compress_test.c index 1a93903346f..47ecf72e08e 100644 --- a/test/core/compression/message_compress_test.c +++ b/test/core/compression/message_compress_test.c @@ -66,13 +66,14 @@ static void assert_passthrough(gpr_slice value, char *algorithm_name; GPR_ASSERT(grpc_compression_algorithm_name(algorithm, &algorithm_name) != 0); - gpr_log(GPR_INFO, - "assert_passthrough: value_length=%d value_hash=0x%08x " - "algorithm='%s' uncompressed_split='%s' compressed_split='%s'", - GPR_SLICE_LENGTH(value), gpr_murmur_hash3(GPR_SLICE_START_PTR(value), - GPR_SLICE_LENGTH(value), 0), - algorithm_name, grpc_slice_split_mode_name(uncompressed_split_mode), - grpc_slice_split_mode_name(compressed_split_mode)); + gpr_log( + GPR_INFO, "assert_passthrough: value_length=%" PRIuPTR + " value_hash=0x%08x " + "algorithm='%s' uncompressed_split='%s' compressed_split='%s'", + GPR_SLICE_LENGTH(value), + gpr_murmur_hash3(GPR_SLICE_START_PTR(value), GPR_SLICE_LENGTH(value), 0), + algorithm_name, grpc_slice_split_mode_name(uncompressed_split_mode), + grpc_slice_split_mode_name(compressed_split_mode)); gpr_slice_buffer_init(&input); gpr_slice_buffer_init(&compressed_raw); diff --git a/test/core/end2end/tests/cancel_with_status.c b/test/core/end2end/tests/cancel_with_status.c index 83629a9a028..673c7051ad1 100644 --- a/test/core/end2end/tests/cancel_with_status.c +++ b/test/core/end2end/tests/cancel_with_status.c @@ -112,7 +112,7 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t num_ops) { char *details = NULL; size_t details_capacity = 0; - gpr_log(GPR_DEBUG, "test with %d ops", num_ops); + gpr_log(GPR_DEBUG, "test with %" PRIuPTR " ops", num_ops); c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo", "foo.test.google.fr:1234", deadline, diff --git a/test/core/end2end/tests/negative_deadline.c b/test/core/end2end/tests/negative_deadline.c index fd56c8b4ff1..dff7992f63b 100644 --- a/test/core/end2end/tests/negative_deadline.c +++ b/test/core/end2end/tests/negative_deadline.c @@ -112,7 +112,7 @@ static void simple_request_body(grpc_end2end_test_fixture f, size_t num_ops) { char *details = NULL; size_t details_capacity = 0; - gpr_log(GPR_DEBUG, "test with %d ops", num_ops); + gpr_log(GPR_DEBUG, "test with %" PRIuPTR " ops", num_ops); c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, "/foo", "foo.test.google.fr:1234", deadline, diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c index 52082c3c6b7..6d15ecf141d 100644 --- a/test/core/iomgr/endpoint_tests.c +++ b/test/core/iomgr/endpoint_tests.c @@ -188,13 +188,15 @@ static void read_and_write_test(grpc_endpoint_test_config config, grpc_endpoint_test_fixture f = begin_test(config, "read_and_write_test", slice_size); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - gpr_log(GPR_DEBUG, "num_bytes=%d write_size=%d slice_size=%d shutdown=%d", + gpr_log(GPR_DEBUG, "num_bytes=%" PRIuPTR " write_size=%" PRIuPTR + " slice_size=%" PRIuPTR " shutdown=%d", num_bytes, write_size, slice_size, shutdown); if (shutdown) { gpr_log(GPR_INFO, "Start read and write shutdown test"); } else { - gpr_log(GPR_INFO, "Start read and write test with %d bytes, slice size %d", + gpr_log(GPR_INFO, "Start read and write test with %" PRIuPTR + " bytes, slice size %" PRIuPTR, num_bytes, slice_size); } diff --git a/test/core/iomgr/fd_posix_test.c b/test/core/iomgr/fd_posix_test.c index 0630f1d10e1..24ba474680f 100644 --- a/test/core/iomgr/fd_posix_test.c +++ b/test/core/iomgr/fd_posix_test.c @@ -398,7 +398,7 @@ static void test_grpc_fd(void) { client_wait_and_shutdown(&cl); server_wait_and_shutdown(&sv); GPR_ASSERT(sv.read_bytes_total == cl.write_bytes_total); - gpr_log(GPR_INFO, "Total read bytes %d", sv.read_bytes_total); + gpr_log(GPR_INFO, "Total read bytes %" PRIdPTR, sv.read_bytes_total); } typedef struct fd_change_data { diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index 7a98fa0e506..19ba258303e 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -151,7 +151,7 @@ static void read_cb(grpc_exec_ctx *exec_ctx, void *user_data, bool success) { read_bytes = count_slices(state->incoming.slices, state->incoming.count, ¤t_data); state->read_bytes += read_bytes; - gpr_log(GPR_INFO, "Read %d bytes of %d", read_bytes, + gpr_log(GPR_INFO, "Read %" PRIuPTR " bytes of %" PRIuPTR, read_bytes, state->target_read_bytes); if (state->read_bytes >= state->target_read_bytes) { gpr_mu_unlock(g_mu); @@ -170,8 +170,8 @@ static void read_test(size_t num_bytes, size_t slice_size) { gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(20); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - gpr_log(GPR_INFO, "Read test of size %d, slice size %d", num_bytes, - slice_size); + gpr_log(GPR_INFO, "Read test of size %" PRIuPTR ", slice size %" PRIuPTR, + num_bytes, slice_size); create_sockets(sv); @@ -179,7 +179,7 @@ static void read_test(size_t num_bytes, size_t slice_size) { grpc_endpoint_add_to_pollset(&exec_ctx, ep, g_pollset); written_bytes = fill_socket_partial(sv[0], num_bytes); - gpr_log(GPR_INFO, "Wrote %d bytes", written_bytes); + gpr_log(GPR_INFO, "Wrote %" PRIuPTR " bytes", written_bytes); state.ep = ep; state.read_bytes = 0; @@ -216,7 +216,7 @@ static void large_read_test(size_t slice_size) { gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(20); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - gpr_log(GPR_INFO, "Start large read test, slice size %d", slice_size); + gpr_log(GPR_INFO, "Start large read test, slice size %" PRIuPTR, slice_size); create_sockets(sv); @@ -225,7 +225,7 @@ static void large_read_test(size_t slice_size) { grpc_endpoint_add_to_pollset(&exec_ctx, ep, g_pollset); written_bytes = fill_socket(sv[0]); - gpr_log(GPR_INFO, "Wrote %d bytes", written_bytes); + gpr_log(GPR_INFO, "Wrote %" PRIuPTR " bytes", written_bytes); state.ep = ep; state.read_bytes = 0; @@ -344,8 +344,9 @@ static void write_test(size_t num_bytes, size_t slice_size) { gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(20); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - gpr_log(GPR_INFO, "Start write test with %d bytes, slice size %d", num_bytes, - slice_size); + gpr_log(GPR_INFO, + "Start write test with %" PRIuPTR " bytes, slice size %" PRIuPTR, + num_bytes, slice_size); create_sockets(sv); @@ -404,8 +405,9 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) { int fd_released_done = 0; grpc_closure_init(&fd_released_cb, &on_fd_released, &fd_released_done); - gpr_log(GPR_INFO, "Release fd read_test of size %d, slice size %d", num_bytes, - slice_size); + gpr_log(GPR_INFO, + "Release fd read_test of size %" PRIuPTR ", slice size %" PRIuPTR, + num_bytes, slice_size); create_sockets(sv); @@ -414,7 +416,7 @@ static void release_fd_test(size_t num_bytes, size_t slice_size) { grpc_endpoint_add_to_pollset(&exec_ctx, ep, g_pollset); written_bytes = fill_socket_partial(sv[0], num_bytes); - gpr_log(GPR_INFO, "Wrote %d bytes", written_bytes); + gpr_log(GPR_INFO, "Wrote %" PRIuPTR " bytes", written_bytes); state.ep = ep; state.read_bytes = 0; diff --git a/test/core/support/slice_test.c b/test/core/support/slice_test.c index 2df38376a9f..0da483a3216 100644 --- a/test/core/support/slice_test.c +++ b/test/core/support/slice_test.c @@ -164,7 +164,7 @@ static void test_slice_split_head_works(size_t length) { size_t i; LOG_TEST_NAME("test_slice_split_head_works"); - gpr_log(GPR_INFO, "length=%d", length); + gpr_log(GPR_INFO, "length=%" PRIuPTR, length); /* Create a slice in which each byte is equal to the distance from it to the beginning of the slice. */ @@ -192,7 +192,7 @@ static void test_slice_split_tail_works(size_t length) { size_t i; LOG_TEST_NAME("test_slice_split_tail_works"); - gpr_log(GPR_INFO, "length=%d", length); + gpr_log(GPR_INFO, "length=%" PRIuPTR, length); /* Create a slice in which each byte is equal to the distance from it to the beginning of the slice. */ diff --git a/test/core/support/string_test.c b/test/core/support/string_test.c index d5f8107f211..3380482787e 100644 --- a/test/core/support/string_test.c +++ b/test/core/support/string_test.c @@ -156,7 +156,7 @@ static void test_asprintf(void) { LOG_TEST_NAME("test_asprintf"); /* Print an empty string. */ - GPR_ASSERT(gpr_asprintf(&buf, "") == 0); + GPR_ASSERT(gpr_asprintf(&buf, "%s", "") == 0); GPR_ASSERT(buf[0] == '\0'); gpr_free(buf); @@ -334,6 +334,38 @@ static void test_int64toa() { GPR_ASSERT(0 == strcmp("-9223372036854775808", buf)); } +static void test_strpad() { + char *padded; + + padded = gpr_strpad("foo", ' ', 5); + GPR_ASSERT(0 == strcmp(" foo", padded)); + gpr_free(padded); + + padded = gpr_strpad("foo", ' ', 4); + GPR_ASSERT(0 == strcmp(" foo", padded)); + gpr_free(padded); + + padded = gpr_strpad("foo", ' ', 3); + GPR_ASSERT(0 == strcmp("foo", padded)); + gpr_free(padded); + + padded = gpr_strpad("foo", ' ', 2); + GPR_ASSERT(0 == strcmp("foo", padded)); + gpr_free(padded); + + padded = gpr_strpad("foo", ' ', 1); + GPR_ASSERT(0 == strcmp("foo", padded)); + gpr_free(padded); + + padded = gpr_strpad("foo", ' ', 0); + GPR_ASSERT(0 == strcmp("foo", padded)); + gpr_free(padded); + + padded = gpr_strpad("foo", '0', 5); + GPR_ASSERT(0 == strcmp("00foo", padded)); + gpr_free(padded); +} + int main(int argc, char **argv) { grpc_test_init(argc, argv); test_strdup(); @@ -346,5 +378,6 @@ int main(int argc, char **argv) { test_strsplit(); test_ltoa(); test_int64toa(); + test_strpad(); return 0; } diff --git a/test/core/surface/completion_queue_test.c b/test/core/surface/completion_queue_test.c index 49a1fc441f0..2fcd7f5a938 100644 --- a/test/core/surface/completion_queue_test.c +++ b/test/core/surface/completion_queue_test.c @@ -348,8 +348,8 @@ static void test_threading(size_t producers, size_t consumers) { size_t total_consumed = 0; static int optid = 101; - gpr_log(GPR_INFO, "%s: %d producers, %d consumers", "test_threading", - producers, consumers); + gpr_log(GPR_INFO, "%s: %" PRIuPTR " producers, %" PRIuPTR " consumers", + "test_threading", producers, consumers); /* start all threads: they will wait for phase1 */ for (i = 0; i < producers + consumers; i++) { diff --git a/test/core/transport/chttp2/bin_encoder_test.c b/test/core/transport/chttp2/bin_encoder_test.c index 095861e9741..08d10735a5a 100644 --- a/test/core/transport/chttp2/bin_encoder_test.c +++ b/test/core/transport/chttp2/bin_encoder_test.c @@ -88,7 +88,8 @@ static void expect_combined_equiv(const char *s, size_t len, int line) { char *t = gpr_dump_slice(input, GPR_DUMP_HEX | GPR_DUMP_ASCII); char *e = gpr_dump_slice(expect, GPR_DUMP_HEX | GPR_DUMP_ASCII); char *g = gpr_dump_slice(got, GPR_DUMP_HEX | GPR_DUMP_ASCII); - gpr_log(GPR_ERROR, "FAILED:%d:\ntest: %s\ngot: %s\nwant: %s", t, g, e); + gpr_log(GPR_ERROR, "FAILED:%d:\ntest: %s\ngot: %s\nwant: %s", line, t, g, + e); gpr_free(t); gpr_free(e); gpr_free(g); diff --git a/test/core/transport/metadata_test.c b/test/core/transport/metadata_test.c index a4e9694a93e..007892930cf 100644 --- a/test/core/transport/metadata_test.c +++ b/test/core/transport/metadata_test.c @@ -166,7 +166,7 @@ static void test_things_stick_around(void) { grpc_init(); for (i = 0; i < nstrs; i++) { - gpr_asprintf(&buffer, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%dx", i); + gpr_asprintf(&buffer, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%" PRIuPTR "x", i); strs[i] = grpc_mdstr_from_string(buffer); shuf[i] = i; gpr_free(buffer); @@ -188,7 +188,8 @@ static void test_things_stick_around(void) { for (i = 0; i < nstrs; i++) { GRPC_MDSTR_UNREF(strs[shuf[i]]); for (j = i + 1; j < nstrs; j++) { - gpr_asprintf(&buffer, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%dx", shuf[j]); + gpr_asprintf(&buffer, "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx%" PRIuPTR "x", + shuf[j]); test = grpc_mdstr_from_string(buffer); GPR_ASSERT(test == strs[shuf[j]]); GRPC_MDSTR_UNREF(test); From 9e693b520f6105df525b3f2c6c46ba5e438bc4f9 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 10 Jun 2016 18:20:49 +0000 Subject: [PATCH 1015/1894] Re-enable squeltch --- test/core/end2end/fuzzers/api_fuzzer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/end2end/fuzzers/api_fuzzer.c b/test/core/end2end/fuzzers/api_fuzzer.c index 617d8058d27..d013daecfc2 100644 --- a/test/core/end2end/fuzzers/api_fuzzer.c +++ b/test/core/end2end/fuzzers/api_fuzzer.c @@ -50,7 +50,7 @@ //////////////////////////////////////////////////////////////////////////////// // logging -static const bool squelch = !true; +static const bool squelch = true; static void dont_log(gpr_log_func_args *args) {} From 1281e7ca2cc579de6ababf808fd508d81365fa67 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 10 Jun 2016 18:24:18 +0000 Subject: [PATCH 1016/1894] fuzzer corpus --- .../01a344a0256386cc8abb8dcb65cb55e1244f7f97 | Bin 0 -> 345 bytes .../01c59f0a030fa11c4af1b7c0cc85846e9ef3f6b9 | Bin 0 -> 527 bytes .../1239eef13562df4ff59856900eee2f871a2fd0f3 | Bin 0 -> 531 bytes .../179817dab786637b3621ace60a9ab4c7c79432a4 | Bin 0 -> 530 bytes .../23982956d17d2f55e61a5d9111b1c0c7ee530214 | Bin 0 -> 522 bytes .../2a2ca2f6a1c03067f87bad61515688edc234bacc | Bin 0 -> 526 bytes .../2ce30739d22f5380f96400f261fd26e95cc33927 | Bin 0 -> 529 bytes .../2ec78409a7d3625126387512a1c58cae2ff0bcf7 | Bin 0 -> 352 bytes .../3f31d328c16207904d201406f7e9708360d5799b | Bin 0 -> 1243 bytes .../4d345f45f808c5b0541976b5dff98c603611e9ab | Bin 0 -> 477 bytes .../56e0bd235d4ea1de80d753b2b12d03d43cd0aa06 | Bin 0 -> 539 bytes .../57d4ef9e72f97aa8a1e6689f3be092fc2b24315c | Bin 0 -> 174 bytes .../5c37a2f980223e737574dba8239378f643800c28 | Bin 0 -> 742 bytes .../5e31ededf3b3189d252148c450de7a8778653e72 | Bin 0 -> 526 bytes .../5f61659c332f6153f9a59746bc02064155443b4a | Bin 0 -> 522 bytes .../6be9f2d2967566ac929c27a27de40af792a6da90 | Bin 0 -> 473 bytes .../6c34a6b47ef9e11e02f7675087d888c2c994b010 | Bin 0 -> 544 bytes .../6ce0f95767e8b1c58ff313d10f1a3eb1f9ab8496 | Bin 0 -> 524 bytes .../6d6d70df4499b8595851100ffb833d397cc87a18 | Bin 0 -> 533 bytes .../6e77e1cd328bb98d954043230716863c5133c1c4 | Bin 0 -> 269 bytes .../71f9eafe17e974062938a6a12433ce723fe07d40 | Bin 0 -> 791 bytes .../78d8b2a1732c4528d6acdb21c236f417a0f85798 | Bin 0 -> 531 bytes .../7b44a92a28ff5c96be7c4dae5c56a9e5fa272ad3 | Bin 0 -> 542 bytes .../7f2a2a365669c88559036ed998b074b1b9a31e0b | Bin 0 -> 449 bytes .../8a13b47235d2967f5a5419cb0ad8d241a750a365 | Bin 0 -> 526 bytes .../8a6ccd18dbc530ed34afd4a73beeff0449040c25 | Bin 0 -> 526 bytes .../8e226a7f67b7c6e9d439c3627bfa5644af992593 | Bin 0 -> 551 bytes .../a19cc971908189b5febf6fb5e8578c91dd666715 | Bin 0 -> 526 bytes .../b06102e16c740796a9d30e07b9e564b65f7513da | Bin 0 -> 345 bytes .../b63da75ca24aac41285dd14de6712179a3fbc0d1 | Bin 0 -> 527 bytes .../b79553c903c06619d53395ee67896c1554def055 | Bin 0 -> 525 bytes .../ba46bf502f75c1e66fb89e18c270da8e5a62207f | Bin 0 -> 338 bytes .../bdfa6991c33f312c46ac27bdd8089be1670f0ac2 | Bin 0 -> 578 bytes .../d19a252c00c74403389fe9e057cffeee39a4d2e0 | Bin 0 -> 599 bytes .../ea421a728134ad3a95a32f081c2bafa9d989836f | Bin 0 -> 527 bytes .../f2ee773064f643871134a017d35fd5d8ae74d35c | Bin 0 -> 527 bytes .../f38d6347f6044dbc3978ef7e5d5adfb7fc8aceb9 | Bin 0 -> 483 bytes .../f4b66d285bd0328e511625b1c696662a0b0b2e70 | Bin 0 -> 526 bytes .../fbc7dd3fbb6abc462ab0493bfe3a8505f12fe4a5 | Bin 0 -> 535 bytes .../ff7f9df969df7fe6c9c1515528404b55f9d237b6 | Bin 0 -> 1242 bytes tools/run_tests/tests.json | 680 ++++++++++++++++++ 41 files changed, 680 insertions(+) create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/01a344a0256386cc8abb8dcb65cb55e1244f7f97 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/01c59f0a030fa11c4af1b7c0cc85846e9ef3f6b9 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/1239eef13562df4ff59856900eee2f871a2fd0f3 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/179817dab786637b3621ace60a9ab4c7c79432a4 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/23982956d17d2f55e61a5d9111b1c0c7ee530214 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/2a2ca2f6a1c03067f87bad61515688edc234bacc create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/2ce30739d22f5380f96400f261fd26e95cc33927 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/2ec78409a7d3625126387512a1c58cae2ff0bcf7 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/3f31d328c16207904d201406f7e9708360d5799b create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/4d345f45f808c5b0541976b5dff98c603611e9ab create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/56e0bd235d4ea1de80d753b2b12d03d43cd0aa06 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/57d4ef9e72f97aa8a1e6689f3be092fc2b24315c create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/5c37a2f980223e737574dba8239378f643800c28 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/5e31ededf3b3189d252148c450de7a8778653e72 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/5f61659c332f6153f9a59746bc02064155443b4a create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/6be9f2d2967566ac929c27a27de40af792a6da90 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/6c34a6b47ef9e11e02f7675087d888c2c994b010 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/6ce0f95767e8b1c58ff313d10f1a3eb1f9ab8496 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/6d6d70df4499b8595851100ffb833d397cc87a18 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/6e77e1cd328bb98d954043230716863c5133c1c4 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/71f9eafe17e974062938a6a12433ce723fe07d40 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/78d8b2a1732c4528d6acdb21c236f417a0f85798 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/7b44a92a28ff5c96be7c4dae5c56a9e5fa272ad3 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/7f2a2a365669c88559036ed998b074b1b9a31e0b create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/8a13b47235d2967f5a5419cb0ad8d241a750a365 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/8a6ccd18dbc530ed34afd4a73beeff0449040c25 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/8e226a7f67b7c6e9d439c3627bfa5644af992593 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/a19cc971908189b5febf6fb5e8578c91dd666715 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/b06102e16c740796a9d30e07b9e564b65f7513da create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/b63da75ca24aac41285dd14de6712179a3fbc0d1 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/b79553c903c06619d53395ee67896c1554def055 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/ba46bf502f75c1e66fb89e18c270da8e5a62207f create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/bdfa6991c33f312c46ac27bdd8089be1670f0ac2 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/d19a252c00c74403389fe9e057cffeee39a4d2e0 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/ea421a728134ad3a95a32f081c2bafa9d989836f create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/f2ee773064f643871134a017d35fd5d8ae74d35c create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/f38d6347f6044dbc3978ef7e5d5adfb7fc8aceb9 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/f4b66d285bd0328e511625b1c696662a0b0b2e70 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/fbc7dd3fbb6abc462ab0493bfe3a8505f12fe4a5 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/ff7f9df969df7fe6c9c1515528404b55f9d237b6 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/01a344a0256386cc8abb8dcb65cb55e1244f7f97 b/test/core/end2end/fuzzers/api_fuzzer_corpus/01a344a0256386cc8abb8dcb65cb55e1244f7f97 new file mode 100644 index 0000000000000000000000000000000000000000..5ec993f3d02d1f7326290a3c706a1ce2b34e1075 GIT binary patch literal 345 zcmX|-&q~8U5XQe9>$0s9EWL=Qf*>Y`fLBE#zCs@$tm)7eqlQhIpf{l>-=!xXz>9Ao zUUE@SKEk@2s&ksZ-^~1|WK*+&`X-W1z)G3=II=`=(d1Hba&%5|&?K&nf-xl6zB?Df zfTSPY$0KH@$l}5*ZnU{imrgR(Grq0h`@7n_s*00%Ug+#Pt@KsSX}Ngdc*@z`lub;M z%V#EPSk+G#2AvJo5U1M|$gr{e;qF>O)QNSAt+Qz0JwiLi4t7ayX8Nmk9YP88fYC^} zsE7V1b7|=H_rKcz2b`^14YA3YI*IJt!HW^?-bz`Lktg9n(3cmsJk)uPp)MAnKVXj0 RKd>!y#L8g8ssnZy{s7Y|V9o#l literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/01c59f0a030fa11c4af1b7c0cc85846e9ef3f6b9 b/test/core/end2end/fuzzers/api_fuzzer_corpus/01c59f0a030fa11c4af1b7c0cc85846e9ef3f6b9 new file mode 100644 index 0000000000000000000000000000000000000000..a836e0560dbfb7d91a1bf7b78ceb734ea828af3b GIT binary patch literal 527 zcmZuuJxeQ55Iy&zm%CAdrM${01`~WKY##WK6$}4BAP5%Ax*2paZsP1m(AFU0f7!|= zosECPW*gtDEiBjB4HkmKEoSDPGjnD}UlV7*&qn0M;Vlg*7!PHR z-jSjBiKIK(?D3FMTO)_sU)D|2nU?e>Bc@Q9TgninShrDm8pQ@yu&NE9YISiuk`8=M zi5K}-{8f3tV zRBcSEasdt7_=LZ|g%Ywx8&+XK%Kw*Yqt|J=@$-jS-^N|z7g56cX+E*d>m-1~Nfkl~ zvyO*zzvI>(Syd|&$!r!`otXYDuHk57ZfWY5dpyeGLBOM46r=F!BsZZR57-vo8~OXf SX7O=fqT+HQQ%uDhEbtG8E|o|C literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/179817dab786637b3621ace60a9ab4c7c79432a4 b/test/core/end2end/fuzzers/api_fuzzer_corpus/179817dab786637b3621ace60a9ab4c7c79432a4 new file mode 100644 index 0000000000000000000000000000000000000000..cf3531fe410886054ebcc7023e944265f6cf9df1 GIT binary patch literal 530 zcmZuuO-my|5Pe-}(-S3lTowd_5KPbkJ?z0{8SyU&B6t|aq|m__W6fj&Ud>_gzs$)? zZeIKwUgo0yinhk!7g+S+byvN5uevB>DOlhLl{!t-}fUG5%6wMAhIjq?V6e(Sg-aB72tTOnJi#bDG9S|pbB!zc|1%mIKI@slC(bt zR-0zBeyZq5=sePc5 Ma;hWD)EXS{3KG_l1^@s6 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/23982956d17d2f55e61a5d9111b1c0c7ee530214 b/test/core/end2end/fuzzers/api_fuzzer_corpus/23982956d17d2f55e61a5d9111b1c0c7ee530214 new file mode 100644 index 0000000000000000000000000000000000000000..146b1b6e5219fb4da5153186e32c64675eca44f8 GIT binary patch literal 522 zcmZuuv1%JZ6r5e`WluJT%HT?lKu97{VQ>l=bC6#!m_Ul-Bt4|VvaGy2tsrew82`&v zZq%vCZ=|^~^-^n*|I#~ft zc{SLS#Q_2vJgZ;7g%WTNR^gy7Yo0dxl(y|pZ_VjDd<%XNWvsvN-C8FZc;I4FCQyQ` zf?*f+{mG71+1yB4by!ta`nO1ir}kdYHY(1qI`=Zt6bLF*2c5{O-H`1%lsrEOn5A77 N;9?^NwhBWF`~wH*kxT#p literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/2a2ca2f6a1c03067f87bad61515688edc234bacc b/test/core/end2end/fuzzers/api_fuzzer_corpus/2a2ca2f6a1c03067f87bad61515688edc234bacc new file mode 100644 index 0000000000000000000000000000000000000000..48d26daa5a56dbfff367fc00d0593129370080ed GIT binary patch literal 526 zcmZuu!Ac`R5Pe-_o1W}4cw9W`3c(C+4uT6tmH~f35Md9)m=rn~W42~80k6(M{FgcH zB{whrhL^dxo;>&gy_Lj+%Wl)qMOD3euliBWQnJ8#B0CG&IVrcJmo~wcKaLI^$DQwF z+p}2P!VOrkf0UA71f;J*y8J4~t3biW+mY8xc+31-0$4u7d_9xNpm$yrligl6&WbD@ zB{~0`@_4|>czSuNqBvHHaHUHYTU3n*1 zo^}n>|3IPb&OATqic^>}_PT`E6SWr+q1nJkd?E{&B~hM_lt9k7NXF?UCs+DWk`1T8 znobR>rfwl{!C&$JvoPA+g)?aB@M^zqZBl^1lH>W-$rro1gPY(tb1w9-TGy3og9i?( zCWRqO3vZ;1Bfowxrdg}hu%%xMyXaXp!}Hck&^)g9jyku>X;CYSLObZh&fNFK%|i9` Sn|6!Vn;KGAy29L`?|?rqcaY2g literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/2ce30739d22f5380f96400f261fd26e95cc33927 b/test/core/end2end/fuzzers/api_fuzzer_corpus/2ce30739d22f5380f96400f261fd26e95cc33927 new file mode 100644 index 0000000000000000000000000000000000000000..725aa4565454d41b38659bdceb3ac897bd4abf0b GIT binary patch literal 529 zcmZuuziZo25dPjHc|0jWcr2ZghML%<9y+v;5>zte9|(j%2BFADENsip>4$08no#<` zXzJoEOa6^6TH1~!Lq_!^Cqp2|8}8kG-`#h2`kJ^PhOM({res?O3rtbxtJ^j{H;n)cR$R(|>MwEJE9 g7?g0NUUSGU)a@bL_VYo|+~`2X<yX@)QQj{t`Knmin+jA*eybqKu8>AE1GmP9D$a` z4MZG)Vj0Kbv&GZ=-kW(#rG!cXI1$;p5av+LoF>rhg2hkIv@t7W(>H8hdu32Df`z0v z4PgSvb}9#0nD%umqbhk#R(v;m+n4?*ar}8?LId0(jbR=yRm0Iq(^5*jI#%AKd=foK zxOzAb*uFf%EU2*aI?20Ua}87Zq|062A=(l4uulW-$A8f@ZJdM6Z~%0157_|Ohe#Rd z<-hS8ESvVq7;-xs-lea@<#RCYu+dNYG3RJwbwiR#R3XmRKAx_o_o{CZkp%{4V649Z D5yD)v literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/3f31d328c16207904d201406f7e9708360d5799b b/test/core/end2end/fuzzers/api_fuzzer_corpus/3f31d328c16207904d201406f7e9708360d5799b new file mode 100644 index 0000000000000000000000000000000000000000..4791cfd3736f899f347c5c3f38ae82bf75299319 GIT binary patch literal 1243 zcma)+F^dyH6vy9;=P-#9?zl#*E(UU!MI#C-oXCn_A$SND%VzT~x0r0=>}I33E_euj z2tUALVUsS6m9?GNY@=dnX|cYUO>j+e;*erycHWye|KIrCu7%p;zVwDfKKSYz#e*| z9tE{IhVPMrP{yzCD=?#)0y{j(TTh|Y+FQhsj&uuWMjNtSLwMOOZrZ{7t)hg%>SY*F%MAQ!xjv&P3qS490P zysUgf3>E)SJXpq>1Hj!RbAi!O4M%alnHMKs(^?tVzSeFX7>O@{WuFXdLao`Bb&hQ- zzdTng+fK+5%TpHrE(`%ppQQzeq5I5HqhKD33GB^7 za*M^UCmGLk*=cie7NJ!@8p{eC(oc`Fo&Y&E3KTOtz13-+(pLc~RH%Gy;3ly7p^|2C zn}Qdc^Gu})A))GYI?zjlbjjggQtQ@OfHDp9R+CD|3^Sck8fMl)K9cm;{#?CV*OZDW z*M6f^yONZKyfrH|;2A)H6+p(yAG+$fGoivAw~s*tD_yhNH0?iKQ$XSW(KedO=C;vf zbOS7%zPr2d`chFN$f~oAv9<3$myBl>y9e5NMx`BhFn}F*?8C+uI0y6xrhA}+(kRww F{RULtStS4f literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/4d345f45f808c5b0541976b5dff98c603611e9ab b/test/core/end2end/fuzzers/api_fuzzer_corpus/4d345f45f808c5b0541976b5dff98c603611e9ab new file mode 100644 index 0000000000000000000000000000000000000000..47c4276301ed5fba4b35d776dcc1d3518d7e2318 GIT binary patch literal 477 zcmZ{h%}T>S6ot>+)?peYD;F*cg0=xuaaoayuTWfv*k0P=UznyTcHM>eE?M~=zJUnY z_z;5Qodm>)-aNoV|!!}|Ey|FUGw^E^9?&*xb>xlQu)=8lu)V#D#2 zCy!IMh)MJEm4%H>@p5TVpP+;q?og=vYsa60yn-r5PN1BeDDXEz)x|FMNH;kxs;ydY zwRY-_(m=!U;plW6KU>moq1fz2D6IQ(YFj~V6)FiY(J?5&Lq7#AO^qcpj_Z=9p}YQ- z0+~xq;M*KG1BHSVs|1QfEI-iM7$ra7&H*hiowP|)!!i&S8LwZ5EzUj9ANJ;71Vunw VZArGng4!>QiX>c?)b_og-48Mghk*b9 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/56e0bd235d4ea1de80d753b2b12d03d43cd0aa06 b/test/core/end2end/fuzzers/api_fuzzer_corpus/56e0bd235d4ea1de80d753b2b12d03d43cd0aa06 new file mode 100644 index 0000000000000000000000000000000000000000..9bd9fe4ad44560a427f9d89f10e180f559ef1784 GIT binary patch literal 539 zcmZuuyKWOf6g@KvqgjJiE>WsHB+Fib3+Nn0EAb1FqDU!LYx~MxaMtGTE26~(;$OB( z<1P(dz9G#vfr^3;nB2941cK2NXJ*d1_uM%;BQA+yoz|xE$yzS^!OxC{DKF37Sqgin z+H|T=X#N2V$lY_Pp%~f-5Y2#o@%avj`n(@F*-vL)7U?wNn$*2f>3`6`}#i1K*6peRc|(Uc~%oHB;m zPm#8B~rQu4UW;stlbBXOu^2 zd_~bxK8=%U0d%FTw{Ge^c-H$1|NjA2VyrrEgZvaSpMKFwM%Bf<>far*)eNiXsM literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/5c37a2f980223e737574dba8239378f643800c28 b/test/core/end2end/fuzzers/api_fuzzer_corpus/5c37a2f980223e737574dba8239378f643800c28 new file mode 100644 index 0000000000000000000000000000000000000000..3e3432fc623dd1401356cc78d496a8d5625db55e GIT binary patch literal 742 zcma))!D#^Dx;hc9+E6p=UBfavo3wA7xIy zf@j}Agz=!@BLvb`&m^uw1nbn@)z$sg{}<(KOSUkMNLL{nW6Q&_Y@n;r^tIv1)0d=& z)kLmQxC;&bA}c5h(!TNulv>zq7G-wzCbgHzg}j)g3tktn{{G_MX{lNkMfM^(US{d+ zEGg2{b58Qr6-RTPZRWxik>>m(3mcpA{VR(uh7DBwfI>a09Df(&3#fA91jCk^J~#?Z|~=UvNiA) z&Om)Q5ywTX`Wrdt8`uA9%6-_1fI!uLu2@7KHAV#}f7^Hbw|`2;t_y|0s|elJ%?P5O c>-KFEgc$r_&Mkeqm8SGV44Hv7$MLHC1-t~+7ytkO literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/5e31ededf3b3189d252148c450de7a8778653e72 b/test/core/end2end/fuzzers/api_fuzzer_corpus/5e31ededf3b3189d252148c450de7a8778653e72 new file mode 100644 index 0000000000000000000000000000000000000000..f8d4762cd53e52658dd8bfc214243aa2f5ed982e GIT binary patch literal 526 zcmZuuu}T9$5PiGovKQsB6f2_;OwbgT5jpS|1Q9HbGa2+W#yEGmh^;Baf4RygosFH} zU~`RHS@;3#Tuwp3VT;+F_vX#)(+P1#4C}NuW1p<$Y@_v2(=gf5{+^|vv8zpO90<%` zg#o!2&NLK58%c!Iq)$Gm5@8=~w49vpdsV2HZNCcu@iNrb2@kvN(=;7!x8p&a#!){^ z=xRjIT?z-Ii({FI0uk`5vAER!#W@{D-SaSwj{6iQ@eTE;OP4)HTN_FqNJwO}d&Vqk zIaFs}`=&W|^m;8Tj-ax@$r4VYRVy=%VigNm)CN#9rGAo#0-sPC4x$SRFXf{+?u~#Y zY3ogjd=8%V{^b9^LJ7DDt1u_ce~8-XI!)IP*GzpAx8563!uqM&*Jfga19m1w1SQDQ z8_t53TX|$vEKS6)nO~({`rSOp6pq%biKaomz2CSKA(O)^VGT3_s~$US$G&)aCSaCw Ok%RMztT0vRSl|m!OOtZ| literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/5f61659c332f6153f9a59746bc02064155443b4a b/test/core/end2end/fuzzers/api_fuzzer_corpus/5f61659c332f6153f9a59746bc02064155443b4a new file mode 100644 index 0000000000000000000000000000000000000000..790bcc1f0b2187c11b0c1c59fee3aaf9966b57cc GIT binary patch literal 522 zcmZuuu}UjJ6g@NOFdJpDd{`NUV8VMT1YZ%61%E*h!D3mHi!R0(?`|ewYl_GFm#u8l z+4vha+o+X=A28nCSSUJ7acAy1bI+NhGh#;!>$Nu1kgR35-Fa8vyYys6S^s?sw1ge7w_5M`@lW!#Jbs z361&`k0zI=B8eh)I$WsYYV;@0`8erc#CdW$q&Q1&Xh8j|fpEIoPeVQq zddoUA?Ww0HF*t#8krxYIR;N)_8s!F7u&NE9>OomHlmUE3c|1xkDZY|#;&d>S?L#%3{P7NLG!5CJ#77xnWjKcp;~A~R^9j5PD9D_uYg(FWdSZ` K;$W`Ov%otk8S5P)Z=b=g+Q*<(S_Hef0}wn)TR2%bZ%LtFd{({zhH_fUM7oV@xBzJUn2 z_z;5YY;w?xbDID8W(JqU#9$nvUI%0h+kPkph?QI#ijU7xch@no#h?co=v_2W45--> zAHFIz<9r(BytvQ!DP2j!G@H>w0qpZ<|A(b&UKIH#n#}WTdYcy6^&O?l#fG9Anm*nL zSA?3DFC=Va?DGXfE!`5-8217_SUdU@z#F&t6#}%?*1v{? Rb5I%;vYp6>+I|vf_XCBghqnL# literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/6c34a6b47ef9e11e02f7675087d888c2c994b010 b/test/core/end2end/fuzzers/api_fuzzer_corpus/6c34a6b47ef9e11e02f7675087d888c2c994b010 new file mode 100644 index 0000000000000000000000000000000000000000..243e93f3d03b9313f02f401ff00e4b61c5b3759e GIT binary patch literal 544 zcmZXR%}T>S6otNE>5`qaE7dYOJVgTc^mnmxc#cCdwQUbDhl+lywu!G)baEj87$1$r9y-aWq$nyQbmBiRWLrlf^8!Fib90@->SJ#Ri9AeT9K6 zhXq(#79&d{@grz+{&A_lRRrzaq6f)fK-s$1LgRyK6f6F`rj*)Whe;FCa5zix1zvNV ArT_o{ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/6ce0f95767e8b1c58ff313d10f1a3eb1f9ab8496 b/test/core/end2end/fuzzers/api_fuzzer_corpus/6ce0f95767e8b1c58ff313d10f1a3eb1f9ab8496 new file mode 100644 index 0000000000000000000000000000000000000000..f1dcb2c2609bd5770918a245b405775d3f4c56c8 GIT binary patch literal 524 zcmZuuO-my|5Pe-})036Kqj>TIf(e?#!g`1-1O5d;1P{ZQ6gn7VteH%}t2v1OWlnp^ z&5M7-%Uslx2Y*0YlX%!=Z5q0|t6sfV{U~E8Sl~R7orLV16g%zr2Ei7mM~9B1=5Ml% zNu*`r1}xY=OF=LK(o-QV{*dEEpy1=3w%7f2|33k+tikM^%c$46$n(+9PC88UG#SJh z-;8D{FFN2Drii?b;B~bdbwsE(@B=Gk0W&AcvVjuFIp^^(x#IX*ze&>m7+BS= z!L%xu5V+u<`1@BFEpEXXENSx^xJdy5OO9vTCtG%N7k9xcb0+k(7}phQf(H(!RRTkn zYGhpIrG>RHwo3zeXSPF PS0$vJ>IgG~t^+;+zqygT literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/6d6d70df4499b8595851100ffb833d397cc87a18 b/test/core/end2end/fuzzers/api_fuzzer_corpus/6d6d70df4499b8595851100ffb833d397cc87a18 new file mode 100644 index 0000000000000000000000000000000000000000..1a770cc52e9973e3bed345d8341ffc47e595062a GIT binary patch literal 533 zcmZuuu}T9$5S<<4vUkd1DOQPsCP4#QDstj42tlwoE|(!WOfGTnvH@FDi2stx#?Hpd z+ScY8?frmrE~g=4hArOg&YRhJ4`b4XG^h+wjvZ1;n`%9?5u~}gI9KHEo}#qJE|)oF zkU-hHHV8rkN(RiS(U)!(;9lt_v-uP`r$1o+06=;Z#6d?7gGM(=hKG$X3X{<9c`@CL zC<@4nM*SB5iCiAwxmo zxUDrwrzNnI^#?D%1;NENPy$Na{FjIlEA+JUdbuqt`*3G{62%%{iiMTQeE>L_q&^5P novDDh+%IIm#?GQ$d%1T14P)^oi1e)x)l_qD7j-uEZ0q?Oom7$2 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/6e77e1cd328bb98d954043230716863c5133c1c4 b/test/core/end2end/fuzzers/api_fuzzer_corpus/6e77e1cd328bb98d954043230716863c5133c1c4 new file mode 100644 index 0000000000000000000000000000000000000000..f321eab18de593ff66a055120ecb4e73b86cb8fc GIT binary patch literal 269 zcmXX>O-jR15dPk@4bLb6Z_sYE%_4%!fJD4Pab41Ou))%Vm->RP1A^dDvhoUE!%bW$ zcmx;Y6r9!f!F+$Gc~yXFcAg!q5Cu)d);d28Vr6Ke`Hki5?23Z0$@Gn)F#@oBD1>pq zovT*KX1}j4lWkev=Nrz~i{;~%-g`j>007(LFmO#;LSrX@u1?N2ahVx$!067?IVXtUgkeDzyDl0oJ5cb>5MciBc+--WLY}f z?T^AZrVFp!(}sk~o^~HvlYVEErjy&9D2~!790v)#oKoDUAfE2`xLxwOfKzv@tJ*6$qe<9*5u{;n zOhFPI(t!F01J3D4MadCy5?R?>jm2pc5Z=0URC{LV3lBeq$b7>y7(Q;JiX_S{T*76k z0I?{PBx5e1hm;0!xKF_WBh=Ag3T&{dotMQLY|H*9zW6Hy|J;Tpu*TwNiBicX&9|Ri zSIrxEWq&0~wER$yYh@Wj1n%W!2*H0=uIbEo&DCQq%8i_@TsX-_y7C*dODi6|Ytgu( zz}RZ9co>{~W{lp_uwezCLGBpZuKS<+#hq^J4Y#EV*p+AtE#DHyp0;MrUymlwS9#aV zGv3hn$po9t?>j>0z-t&A;@u-&4_DsGOKD86%a$ZZ+%50YU2Gc7mC6FT$eG=|a_PZ2 vn*=-y_}{FLpMEdAk~s5fePJ&nJ$?UcmG3hLOP;w@kE?}W@|1|l^P=nzy)5E@ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/78d8b2a1732c4528d6acdb21c236f417a0f85798 b/test/core/end2end/fuzzers/api_fuzzer_corpus/78d8b2a1732c4528d6acdb21c236f417a0f85798 new file mode 100644 index 0000000000000000000000000000000000000000..77c2b2864c9b4271e2cf8b7b31a6e5376487920d GIT binary patch literal 531 zcmaJ;!AiqG5S=V_*+dBiFXG8sD7I)0f)_<1{z9P$9zvRqZLm%2B-w&jd+=v+^3t0Z z@h`mOqMrSLIBgUa#bpm~XXnklnI~c-jRdL?LQZW|O6#3gVF{4>ynU+BZ5#_}OkJ7E+ip+EFuyhmy%eCzMa@~B zRlro{5Bzr&3{Gx>GN8h>KZ!z$8qVuy+p@L`H|7gsOyWVv3$FO(1i;ZO_rc)oMUb@H vDmL%Q$g4BW8#%%LxJ^D)ZEPu+KpT8B_RXz-_<#zsN5av0|oF7M&y)8 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/7b44a92a28ff5c96be7c4dae5c56a9e5fa272ad3 b/test/core/end2end/fuzzers/api_fuzzer_corpus/7b44a92a28ff5c96be7c4dae5c56a9e5fa272ad3 new file mode 100644 index 0000000000000000000000000000000000000000..dac2af4edba107d89fce7ba18efc6e57a2078190 GIT binary patch literal 542 zcmZXR!AiqG6h-e0=`gJt=+0%kQQJi-E(=oe2V4}_A&n1PENPge3Ahdjg5MzsS@{Rz zC%AQ!jY7Xc#+js`=*(swbMKpX&ve6i5Jj{EPe^5?AT<}cD@m&CXs9`Cu{Sw5<)V{M zjD)*A2#{vx2&TY=we5pd;>|iqHco)q!gR4t;=M`c*2Z^ZEc+XFQQSexrwr`n(li>5 zib`ua^|+wqnYbvbGAEhcpDEONqg3RhObe~G+WYrQ@RgNe(57zit_2_RnF$L^K{R GGJFHV+MH?t literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/7f2a2a365669c88559036ed998b074b1b9a31e0b b/test/core/end2end/fuzzers/api_fuzzer_corpus/7f2a2a365669c88559036ed998b074b1b9a31e0b new file mode 100644 index 0000000000000000000000000000000000000000..be6cc539f7439535cf09a4ec947679fa6eab0ae5 GIT binary patch literal 449 zcmaiw%}T>S6ot=R+F=?c(4EV4V{H}@#g!ltU!jQ05aY!Lr45rbMb`mA@Ht#%<(s&7 zlZ}FppfFAp{43&J-2?aMoUb2eDJW-MvW7B5a^bR4y4;YyRj_h=pg3ILBk6>8j9d>A zY#wY2p+T};U4y`>9wx!0D6*YklEukcRK&;U9OdaH2Ruz?C-%dOF=jA$9tvFnS1>(@ zn?rlXr_HJ%W7IexncuOs!K%F8*LW|dhS=?rD@O~%kJjBBq703Fe{YQM*oJ_{!wOcZ zYd1VVR89Rlf)ePoqW^!+*7_Dc(-u0O=GjaaQO?O+r^UtZxY648IhRqdbCKtx-A+18^E4U6 z8Q+X~*yDIOzB*G$94SFKS0y#|2h7DN>0QQoayH;NOK-W)z3aYWI%GL}WCgJ+9t3qX zN|^2E{8#52!xWL%3A{$TQD=l|4NF)i3z#>aEE{NlIp;hcCRZF^>n};#9|J4e zGniK80sGw{aIdGiO4-e$U5sg__`j{b`lJ zkfqugDWbMteG*fxOx3P8w`#NKMMZ0P-kfWiMdjX6^IoYeN+nWo6V1q(r>?k3sGk1R RYSH(qgp^aAVrI~Fz<*SKl8*oY literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/8a6ccd18dbc530ed34afd4a73beeff0449040c25 b/test/core/end2end/fuzzers/api_fuzzer_corpus/8a6ccd18dbc530ed34afd4a73beeff0449040c25 new file mode 100644 index 0000000000000000000000000000000000000000..93fc40f58131c0924af2e8ecd52ebe028b29e332 GIT binary patch literal 526 zcmZuuu}T9$5PiGovKJ*-ij^@KOwbex7K)ts3xOb59A`3^!z9MJ%LQyrA^yu%HtB5q z4V!D!+QRaj%c&?hY%w$Y-prdB9TLaHu$k6oQYLFT-fCne4HKWWPAs{#BW+3(S77CJ z7*O`iv4&!3BaU$D^v>GCvK+ zZX;WJWRTh7AAt3C!LTeEMGE8ED~RsbvB5W6o`f| zaYd8v8h(Su4Ny_=0n0c!PA9S2;?2&ynK%2iBlg6wL2I*#$@0LazkN@`_&4XTEM>_{ zZF-wb%Hk6kQ25SXLou`wAe8?Y`eE6xp?nr(hae~Ibx5NbQ+qOAEWFys0xQ*_hyRT4EK7>^`lJ5Vg+UQf-^fp0eG=(3n*!^H_c~hcy!IGJ>H6w=1XU!AEf$MBI*M54_bFw ob9SD55&;GcqR#IGNoLjcnC&JOv(KcOCEqsSW@{tt6vh_#3#8(j@Bjb+ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/a19cc971908189b5febf6fb5e8578c91dd666715 b/test/core/end2end/fuzzers/api_fuzzer_corpus/a19cc971908189b5febf6fb5e8578c91dd666715 new file mode 100644 index 0000000000000000000000000000000000000000..8e331bc106374fe1dc6c4d0b91b7c65f1dc5e29d GIT binary patch literal 526 zcmZuuJxc>Y5PiGovKQsB6e~XHEd)97F9;%79A`4{eyGbkJ@Kp8Xb2jOyVo*Q2U}IoR&6}+>wyTx~E;nIBGf6 z_O$qGWF@_@8$h|B6bq$9vsPsq#Uf@fs|}#WLP^pU0Y0HL>_z7kUdWg@?hJrADe4W2 zdQa(Du(mRN^+*k+sg9~5i}n&tmCN5T0} KJdC6_Sl|;J8Rg zjp`x;=BAj&g~{%&4o41Cz*e73xjpeQTYY9;&)*ZIiZX&Pq2yK7^9FpA43|H+sgc2A4W3&G(PGxNT0=9?M4CC-RpORdeWN!D`K8B-Rz8{;2Z+@pGuxbKV5QMUrgZ z48tf)LVxMSv`r}r$cxg|^d*B_X^^lV#hW!J@*SicCfBGqi;W+A@e+T!BrguX(u{)j zOy(Gl48=Dj-N|M@KQd}-ACEd%2DOBc`GDImhXjGm?(Z*9e(*{trx;S1+ z2cA>nMgEGswJeImSqikIsNPWF{mX8_)RFMKFL?wVJk+Z~iIj;xB--u^xTt8?i`(TtKVPJ#|@{%+j;A$<&T eI8v`VV;Aap$+iyO3Yse&C^+9c76*|A3;Y3(nUx0s literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/b79553c903c06619d53395ee67896c1554def055 b/test/core/end2end/fuzzers/api_fuzzer_corpus/b79553c903c06619d53395ee67896c1554def055 new file mode 100644 index 0000000000000000000000000000000000000000..55fdc1eb8e5054aff959917c91cad9a8fd5a3ea3 GIT binary patch literal 525 zcmZuuJxc>Y5PiGovKQsB6e~Y4nxH`}EFyB^Ul2sFI4;Rx4r7dSmkZdMLi{gR*`%}a zZ`fR;))toMZ2SPhVT;+__h#PA(+P1#3|ne#Mm|}~*=D`0XqfEm_{dUFJBxCW~*BgKD++UOOUtevi!l`Y(QuS5y!r*9K7X9BQ4E+QyF zI%hZw>gCcSt72hnKfd=OIQ=G?QPSF%ph=ML9arz9k3kMkd~qgLp&pxTr+UbqT9JrXSUiBmTwp%tUm&0e9wn8{cH4LaTbnd0 z9>F3`b`_jrm^XRv&18rMmcRm6i0s(0a}wsg0w}t6>}Qu`+tDkFx+yHUylDv|AX}CD zc7(~VRokevlG#`C)=vI3CWS+iuj2^Zqd1tS8#U?aG-fKrEl&?qGs1I=pXdCgdr0uuGFI-Nc+0a0ZIIy8I05EGcRS^=*RYgLx2o`Ttqq yBIa8d>NgjV;QR7@uojc|qTc1VIq&Jy>X^bu)yFj}pU#%E2lcf`XvD!aSp5KR@mb6O literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/bdfa6991c33f312c46ac27bdd8089be1670f0ac2 b/test/core/end2end/fuzzers/api_fuzzer_corpus/bdfa6991c33f312c46ac27bdd8089be1670f0ac2 new file mode 100644 index 0000000000000000000000000000000000000000..2c7c25c0630cd9013ea60a6ebd64b45de9ab00f7 GIT binary patch literal 578 zcmZvZJxc>Y5Qb-$xNM??*hvaW6hCt471}9s;$IMgU~yb7Lvom0&b^O7T2uL7QrXzq z_&03MLai+<1lPIb3`DYQF}pkO%+B-j5LJQ-q~=@<%P6Hv_6=R)Ad>6L3yIe585gCY zMQP<42tfU!5)MoO7Zi}DfuE{53rO80HSPTT|KUe#ZD;^g8^8`bDsati6a~ko=X;Uo z^z0CCWAt6L{kY%SQGgaTDbK#9vi@_;k=YF#_r{K#RuApa8(|yWL7QeVxxnxNNrW=F zKUXkar3tW;6}% X+|o{F4PoA!TeFBcuT`01)%g7jl*g$N literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/d19a252c00c74403389fe9e057cffeee39a4d2e0 b/test/core/end2end/fuzzers/api_fuzzer_corpus/d19a252c00c74403389fe9e057cffeee39a4d2e0 new file mode 100644 index 0000000000000000000000000000000000000000..964a5001345bf6a8c38368e62d87c28e9d7f9c96 GIT binary patch literal 599 zcmZvZzfQw25XR3|vD|>FvLOc4g80)4GL)?d1@Q_<6%s>~rl&L_O^cnTs4Ja#mrg8f zEW8Fw8GxCAfgxO)fK*Y-!`Z&?&iDJcMirw1nQ$&fC6rRd2ld3@AmXcwbBWg8DHq1b zqO?*41Yq)_Vh&6J7Zi}DhM%gH1*C3~ns$Ev{{Vn$1K5$L2CmtSqQSB0hkoQcfvxdo zh@p#iIPA4|6`(~8O4+wm+WSw_FuMcCy|yE#9iXlKF?P`HcW4fi3)BxtB9!s{nS%K; zrofsjyd-L)1m9@HA+Xp=Xo!SX-AE%2vkI)j8W#X;-bw3#Iw%h#J9K(z_X(8pJ41jn zRV_|t(*hJ_aUouQ3yhL$AQ=>>_^*%)Ud6|q%WY9TguCK9W&`$|Tf2u^J098rhF;VK z)QUf6AY`2S18_2#Il!nyYMP3zdb0VX*sMH}UpX<#;~!#uJn(@pbJ^`WVTgo1N>R4A k{2&EL#B-ZpiGDNp*-Jg6@9k%vHB5hze_pFR=bhm94}Bi4dH?_b literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/ea421a728134ad3a95a32f081c2bafa9d989836f b/test/core/end2end/fuzzers/api_fuzzer_corpus/ea421a728134ad3a95a32f081c2bafa9d989836f new file mode 100644 index 0000000000000000000000000000000000000000..d44736f753a6f41972c08c7553d0cdbbbc14a624 GIT binary patch literal 527 zcmaJ;!AiqG5S?A>vWXH3Uc{5NP}-t72woJ4_zQ(1cnC2a+F+a3NxB8E_TbOtfK2(@`SC0K=>fjC-| zj%v*ce9>g4AdFY=5(P)wUS<;VO<0Ewserd*a!E4e0o2E|83!Zu$E*`Yy(vJIn_BZc ztAM4gANk*}Ah@^%T0n(+e*vYEHC)uscU5fm{LummPK*cRWWy2G+l_xvcj}H|7Q!-~&~TliC0P literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/f2ee773064f643871134a017d35fd5d8ae74d35c b/test/core/end2end/fuzzers/api_fuzzer_corpus/f2ee773064f643871134a017d35fd5d8ae74d35c new file mode 100644 index 0000000000000000000000000000000000000000..eea043539fbbf5ddfd921bb9cc02352b9c9d79a8 GIT binary patch literal 527 zcmZuuu}T9$6r5e+vKQsB6su?;n4l>HEfhKN7Xm@BIL^yM4`Yn)E*G#hh1mNUSJ|Yq z@i%O)QENZoe3vLFx@_@wcjnE!9UT*=#IS|dX6%x+oNly=s)k8VI!Bhg#(_4~u_rLM z1_LTyIMq-LZKM!RlRmgRFNEC{w(PI--v@wr1#0Vzhhh6XNrv0)Xb>e)(D!4y9?>8q ze=xc{6;I@efIGLvrS=cb`7j7C{3JN-lOIPn)T8jKC!Dr66hD%X$foy)jM=JYPj{Bm(XO#GZ;FA0+`6!NhBVbv&I+HxB zz_HG+`u|%f0XJb4D$@L$sEuBuY5jQJtZm}fc_WHhKhNj2X&D2sKgk0qK}t3coO-Qd z^@&x!Jdwa=d6jYLckzsZ>T^R=FWc!f?nK8RgCnpq#s<{W9^2VrSI}JgK+f4jMwp5< GSl|;(c9LxX literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/f38d6347f6044dbc3978ef7e5d5adfb7fc8aceb9 b/test/core/end2end/fuzzers/api_fuzzer_corpus/f38d6347f6044dbc3978ef7e5d5adfb7fc8aceb9 new file mode 100644 index 0000000000000000000000000000000000000000..28ed5bb36214f2a5e99722ca7b0f12057cd4e65b GIT binary patch literal 483 zcmZvZ%}&EG49A^lL|H)-(=Le9BqYQt(E~>&RKzRr09DpmTgBFuG)*e4e{Fw_?=>{$ZGqh$@tzo!4!`JM1uz>r8tlk?ul6`pLpX*LF4~&zrrM4`GUxyd z28>h(y5ESo=I{IcY`q`AcvC50ZA{zHcOU0(npLM8A|d>mL=A%f)QuhX)#4NSDocRx zff=pRJX>iKakT R7Rw32!>~Thev<>le*xg#jkf>* literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/f4b66d285bd0328e511625b1c696662a0b0b2e70 b/test/core/end2end/fuzzers/api_fuzzer_corpus/f4b66d285bd0328e511625b1c696662a0b0b2e70 new file mode 100644 index 0000000000000000000000000000000000000000..b3e38dfcc57bb766c1f37714b00052df7ec162d3 GIT binary patch literal 526 zcmZuuu}T9$5PiGovKQsB6f2_;OwbgT5jpS|gdkWPXENw%jB)OA5nEG;|8kX0IvYE` z!R8vZvhV}exkN$HVT;+F_vX#)(+P1#4C}NuBcH70Y@_jB(JH7T@LA~ zLt%e-ek3zdAOikuEH1Twa83qM=PXR4qaKAxd`(^I&_$Qg)P|CK5)#?$jxmi&4%M31 zzNwEKyO{~laqS@ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/fbc7dd3fbb6abc462ab0493bfe3a8505f12fe4a5 b/test/core/end2end/fuzzers/api_fuzzer_corpus/fbc7dd3fbb6abc462ab0493bfe3a8505f12fe4a5 new file mode 100644 index 0000000000000000000000000000000000000000..e2bb4511012f8b08270dcf06f5a9a51323262149 GIT binary patch literal 535 zcmZuuJxe4(5PjWf)3eHAC>QyGi@V%yaDfMkj2QR_1Q9M6#@WIhZk=6gzR=V~#Q!pp z$z~@04U`*Q9xdlUYu<)$dv&J`%yd@b0Xy+!)`+vf2({@3!=z1ev#wM7P_kzCE%kSEly=99Y|?|A}T)v^f_vbBkZcojaLh fP{0wZYCAhnkGpJ}$Bv-6)`60Xsbet{X|TW>p3#^j literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/ff7f9df969df7fe6c9c1515528404b55f9d237b6 b/test/core/end2end/fuzzers/api_fuzzer_corpus/ff7f9df969df7fe6c9c1515528404b55f9d237b6 new file mode 100644 index 0000000000000000000000000000000000000000..ca8dccd65ed254cf5359dcb0da4b04ea0a01fab2 GIT binary patch literal 1242 zcma)+F^dyH6vy9;=P-#9?zl#*E(UU!MI#C-oXCn_A$SND%VzT~x0r0=>}I33E_euj z2tUALVUsS6m9?GNY@=dnX|cYUO>j+e;*erycHWye|KI~l*x`9z6Rl~EU+IMtV6h!}W5{V()m*;@vOTx}7r6jn=B6+l z&;_cGkrTK>bVj6;@_Q42ZOU3nvUCe7vhvq_^DZzt+ycp9i;^z`x!`r2H9kJNBI;M+ zW#t=UsQ8EC!7|nu0PZH43yh9xHj4AjxH#dO*2=W@wRY>gNP7V+`(#iPX^j?3I>)w^ zU!E(LZ71Z28D3oPk8pSgDpbDqZxh)3P)W16 zO~H%Jd8X2YkWh6x9q6S&y5#ULsdZ;8K$(7dt4SqfhMCSN4Kr&YA4&Raf3DuGYf8nG zYrj#dT}etq-kO#A?+l>83Ls-`!n!eW|DsWYyWm*xGlWOUAQ`-2?4BqtcE$7{HD@_F-cSoCEs*(ml{YX%uU; Fegk_QSik@P literal 0 HcmV?d00001 diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 67fddc712a6..2af103044fa 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -26339,6 +26339,40 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/01a344a0256386cc8abb8dcb65cb55e1244f7f97" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/01c59f0a030fa11c4af1b7c0cc85846e9ef3f6b9" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/01f52e31dfffdab89d83acd39925c3dd81baa76f" @@ -27733,6 +27767,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/1239eef13562df4ff59856900eee2f871a2fd0f3" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/1254c9256157e6362003c97c8c93d8cd67a28772" @@ -28175,6 +28226,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/179817dab786637b3621ace60a9ab4c7c79432a4" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/17cfb281eaa8a17d77e08c3648bb93f3b5aa5297" @@ -29008,6 +29076,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/23982956d17d2f55e61a5d9111b1c0c7ee530214" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/240afe42d3e2834c46a79d9df0dd6ca018831398" @@ -29467,6 +29552,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/2a2ca2f6a1c03067f87bad61515688edc234bacc" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/2a410e3d783bc93e63206e28f92b6a40e1db09cf" @@ -29688,6 +29790,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/2ce30739d22f5380f96400f261fd26e95cc33927" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/2d5613b7bc0f5060eb1fa0449face6a9c503b589" @@ -29892,6 +30011,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/2ec78409a7d3625126387512a1c58cae2ff0bcf7" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/2ef149e8fd68e06fcb7ba2fb43a17cc1dcfd989b" @@ -31065,6 +31201,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/3f31d328c16207904d201406f7e9708360d5799b" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/3f36ae935255c4bbd2bd8d4a85bfa92bba02225c" @@ -32170,6 +32323,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/4d345f45f808c5b0541976b5dff98c603611e9ab" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/4d472e5a8e8ee92be6f23a101babbc601dd2512c" @@ -32765,6 +32935,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/56e0bd235d4ea1de80d753b2b12d03d43cd0aa06" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/56f3ca8174d263240113de88e7547e7b1c5cb2cf" @@ -32867,6 +33054,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/57d4ef9e72f97aa8a1e6689f3be092fc2b24315c" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/57da1745490c2f21ecb86370f1f72f77752bc739" @@ -33190,6 +33394,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/5c37a2f980223e737574dba8239378f643800c28" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/5c388b60e622e14c9abfb5b46c65207a319e09e4" @@ -33411,6 +33632,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/5e31ededf3b3189d252148c450de7a8778653e72" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/5e880db498f9baae544cdbc23476873d8766ac58" @@ -33530,6 +33768,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/5f61659c332f6153f9a59746bc02064155443b4a" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/5f7eee027cbd6ae8e989150d9bd8a4fd39654c01" @@ -34363,6 +34618,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/6be9f2d2967566ac929c27a27de40af792a6da90" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/6bfbea131237606756a12f275e736045c0956536" @@ -34397,6 +34669,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/6c34a6b47ef9e11e02f7675087d888c2c994b010" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/6c5707e8b1aa9a70ec87014cd660df4a7b910ee3" @@ -34465,6 +34754,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/6ce0f95767e8b1c58ff313d10f1a3eb1f9ab8496" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/6ce9895c780428861d12440946508c6641352544" @@ -34482,6 +34788,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/6d6d70df4499b8595851100ffb833d397cc87a18" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/6ded157ecd3fce79fa69c51ee9ecb4639013e6ba" @@ -34533,6 +34856,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/6e77e1cd328bb98d954043230716863c5133c1c4" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/6e97f4e782ca976d4890199d48fcfd64173e24f9" @@ -34839,6 +35179,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/71f9eafe17e974062938a6a12433ce723fe07d40" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/7217d93c1da3ae8ed085a5e6988227dcf430cd89" @@ -35383,6 +35740,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/78d8b2a1732c4528d6acdb21c236f417a0f85798" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/792276ed826b9078ecfbd51e0136962f5e10ed6e" @@ -35485,6 +35859,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/7b44a92a28ff5c96be7c4dae5c56a9e5fa272ad3" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/7b4b493ac5a36d3b3fed0b66bc504206548a3537" @@ -35893,6 +36284,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/7f2a2a365669c88559036ed998b074b1b9a31e0b" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/7fe7a6ab57422c40c7e0e2333c3bbb6ae6a0d9a3" @@ -36556,6 +36964,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/8a13b47235d2967f5a5419cb0ad8d241a750a365" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/8a4183e6bb75036228a42039d678fca0ea6751b7" @@ -36573,6 +36998,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/8a6ccd18dbc530ed34afd4a73beeff0449040c25" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/8a912877743b165b233303efaf502f5092b3c5b0" @@ -36930,6 +37372,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/8e226a7f67b7c6e9d439c3627bfa5644af992593" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/8e94dd64fdbf453f06b351d6a8f77a43cc34e4bc" @@ -38239,6 +38698,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/a19cc971908189b5febf6fb5e8578c91dd666715" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/a1b04c2504a75f50d47875bd1db804cef3674cf0" @@ -39174,6 +39650,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/b06102e16c740796a9d30e07b9e564b65f7513da" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/b0ff62377b87b846f720a70f0b7f7bdc76aa1315" @@ -39599,6 +40092,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/b63da75ca24aac41285dd14de6712179a3fbc0d1" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/b6694ec2d425e8ce6ad9ff712a999fabfa5ce113" @@ -39684,6 +40194,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/b79553c903c06619d53395ee67896c1554def055" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/b7f282fbd77193d822df9c8156370398e1fd099c" @@ -39956,6 +40483,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/ba46bf502f75c1e66fb89e18c270da8e5a62207f" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/baab31938837e1a3cb49ca12fb886fcbb7d48501" @@ -40432,6 +40976,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/bdfa6991c33f312c46ac27bdd8089be1670f0ac2" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/be0ccf7b9b4581e01a42e9cad6343c93ccf6f362" @@ -42387,6 +42948,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/d19a252c00c74403389fe9e057cffeee39a4d2e0" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/d1ade96319d9de82cf3b0480d226a5ad9f31eaa1" @@ -44155,6 +44733,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/ea421a728134ad3a95a32f081c2bafa9d989836f" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/ea6cc4b0a83ac8d578c4927f3c9d5a57a4464df3" @@ -44818,6 +45413,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/f2ee773064f643871134a017d35fd5d8ae74d35c" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/f2f014c6ef70e40f9334096f34584ea4f1f882d7" @@ -44852,6 +45464,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/f38d6347f6044dbc3978ef7e5d5adfb7fc8aceb9" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/f3c0468b37c09b998096d18cd13a522dec09888b" @@ -44903,6 +45532,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/f4b66d285bd0328e511625b1c696662a0b0b2e70" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/f4d74d507a7171e5f116bf750a20435eeaf81f3f" @@ -45515,6 +46161,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/fbc7dd3fbb6abc462ab0493bfe3a8505f12fe4a5" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/fbeb44db0fc0f6b70c226053448c7170f62543b1" @@ -45770,6 +46433,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/ff7f9df969df7fe6c9c1515528404b55f9d237b6" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/ff8ffcfafaf420d6fee1cfa087204975ab8e14d6" From eca1f715a92b1a3381020f2b527ebafedeb26743 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 10 Jun 2016 18:38:52 +0000 Subject: [PATCH 1017/1894] fuzzer corpus --- .../0a90826e3173642be15ea005c2cbe8ca36ac1c3d | Bin 0 -> 325 bytes .../110e019793b395202dfd8b499edc372cdaccff21 | Bin 0 -> 693 bytes .../19549ded404f9a9581d32a1827da96ff1420f0ae | Bin 0 -> 551 bytes .../295d24a7705fe1821606f9224f241a7596481bed | Bin 0 -> 629 bytes .../314ea0a2c481639b6559b063399299259c43c9bb | Bin 0 -> 527 bytes .../31ef9c4ed85ae1b4e8a027fc5a1d3037dbbf3b3a | Bin 0 -> 542 bytes .../35cf9a1a6f81db0829d854fd3716916bae081c8c | Bin 0 -> 1047 bytes .../541e87b9d3dc75ad40cb47935ed4de83b25af5b9 | Bin 0 -> 895 bytes .../81437c61aeca9becc91003af7b835dc65a3e03e4 | Bin 0 -> 561 bytes .../84505278558cc406dc36109deab239f1e4cf1518 | Bin 0 -> 795 bytes .../9dd5d09e1538e12b091c35d252ee43684d0f07bd | Bin 0 -> 353 bytes .../aa0c7fda7faff932bf36e10d15ab2180ab1bca27 | Bin 0 -> 545 bytes .../b4b8ba878466fc6c4e1939e38c38aa64026b055b | Bin 0 -> 525 bytes .../b9eb50c5eb99cf0b419efa2cb8d7fdf2e71f6634 | Bin 0 -> 470 bytes .../c77bd1e9d9be2b6d1362cbb15f63cf749aa113ea | Bin 0 -> 325 bytes .../d02fb86e7e236a2253a2eadb0599f5dc261e4048 | Bin 0 -> 346 bytes .../d6d7dc448cc24272ce216dbc7365ebe6e6b7b367 | Bin 0 -> 694 bytes .../d85482b6a40d7edee97709df0ed02558dca4c079 | Bin 0 -> 574 bytes .../ddf932a29b8250746ec310af224f95d4a51cb745 | Bin 0 -> 634 bytes .../e18816dbe46249fb0160b8f06c2b71f6943d3d21 | Bin 0 -> 532 bytes tools/run_tests/tests.json | 340 ++++++++++++++++++ 21 files changed, 340 insertions(+) create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/0a90826e3173642be15ea005c2cbe8ca36ac1c3d create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/110e019793b395202dfd8b499edc372cdaccff21 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/19549ded404f9a9581d32a1827da96ff1420f0ae create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/295d24a7705fe1821606f9224f241a7596481bed create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/314ea0a2c481639b6559b063399299259c43c9bb create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/31ef9c4ed85ae1b4e8a027fc5a1d3037dbbf3b3a create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/35cf9a1a6f81db0829d854fd3716916bae081c8c create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/541e87b9d3dc75ad40cb47935ed4de83b25af5b9 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/81437c61aeca9becc91003af7b835dc65a3e03e4 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/84505278558cc406dc36109deab239f1e4cf1518 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/9dd5d09e1538e12b091c35d252ee43684d0f07bd create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/aa0c7fda7faff932bf36e10d15ab2180ab1bca27 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/b4b8ba878466fc6c4e1939e38c38aa64026b055b create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/b9eb50c5eb99cf0b419efa2cb8d7fdf2e71f6634 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/c77bd1e9d9be2b6d1362cbb15f63cf749aa113ea create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/d02fb86e7e236a2253a2eadb0599f5dc261e4048 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/d6d7dc448cc24272ce216dbc7365ebe6e6b7b367 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/d85482b6a40d7edee97709df0ed02558dca4c079 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/ddf932a29b8250746ec310af224f95d4a51cb745 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/e18816dbe46249fb0160b8f06c2b71f6943d3d21 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/0a90826e3173642be15ea005c2cbe8ca36ac1c3d b/test/core/end2end/fuzzers/api_fuzzer_corpus/0a90826e3173642be15ea005c2cbe8ca36ac1c3d new file mode 100644 index 0000000000000000000000000000000000000000..bb6cf96d279cd7a48a89742ce6320efcd6eae4e7 GIT binary patch literal 325 zcmXX?Jxjw-6g}@!A1_skbEg(T+YAvM>rnqgaSpLwY*E^9lfI&JKoR^Q4w+oKb@3;- zx@1xDCpbJ`TF-R2a6ay#jK#9RI3m4lu`yzMI&`@tvn-uU9%npW$TYu$SZZ~k!S2IT zC;{nO+lIomq%YAV&(qUrk|yJuI8QEbInJi{9Pw;Czw!~??$42u0(f|L2I~33TZD96 zROFl)MWi`<4<300cD5IM>~(OSu;Y_!7lb_XDbPcs_erk zGyvs!1Hl(_CiM3IptZfw0cS;(Ky7bghoSpzuSHe+g`Z-xgdZZLZ|z+jAJjG`SPjdQ R(cz=F)hJak5Caon^#?72VNn18 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/110e019793b395202dfd8b499edc372cdaccff21 b/test/core/end2end/fuzzers/api_fuzzer_corpus/110e019793b395202dfd8b499edc372cdaccff21 new file mode 100644 index 0000000000000000000000000000000000000000..3a148cc1275e4ff29bf134d654774368ab7cde56 GIT binary patch literal 693 zcmZuu!DfsU3NB!f) zV*aE*nN1eSG*0R5l4c`{XUmgAS&5wV51XyH9({{)JWob%;ze>er8u3uqcM$6$HM7r zL+J++64~s6u|BO5YOtw8)5|@57lBKt%z2UEoY)JEKqBgostKC=kP5S}Pf*(XF>(7l` zn@I>BcwSTqlpyP5ICGJ|cgd>SE+npXT6I|Zr|b+*yUju?S3Vtfbneb&lqnI^zz#aj zs>=aeiGyrtsEM`l_}^SViqtMt^`&g@?Wr>^+%p-#(yuDPWg)6p>OH)L`t-7>wD)!> z&Zl(a{MvVU)z;U}i}8)`xNY~A-mHO*@pdkLu1s)c#ULV)2x4#w8FMDTU@!p}$5|faBeJZ_omSvBDuVyz zDmUtk!5`tq%{58te86Q+XBQz^wwT?0Z{C}IWal9}p^U||z*R)68z=s4uWAvjKRNp3 z9ysb8kZsK)#f96j;ObF4!3fA|p`ro;Yuo=-pY z(@C1A$vDpV>x?HujwiE=Q+36WDuj(Osl`XnoZbHUG#P%0^W=2Qah6_j&cn+y<@CvN zcEfFDvGdo5f_k+In86DQZFgSr4<~ni2IJSGO6RC_^;&gBD7WzvugC&srIlr4)sPYA z@g%w6_);w=Fdd3)aK>R=QpG%$fM8 zS2YlA4Z7#KrO^307hr!;LZeDTqvNfhTeo7$jfE!IM5;LYr30YioyOfVD)x>#-&NG2 fK%g+Ev36i?2jW(TkBXMs6iO);I?qyl!U2B(h?AKu literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/295d24a7705fe1821606f9224f241a7596481bed b/test/core/end2end/fuzzers/api_fuzzer_corpus/295d24a7705fe1821606f9224f241a7596481bed new file mode 100644 index 0000000000000000000000000000000000000000..58a48144911ee8f08daca2367c3bbe46194f0cc2 GIT binary patch literal 629 zcmaLTu}T9$5C-6X2VFK%4y_a`MbLOcM9Zi|tn9@)oN+KgiO1Zz2R1ebg5aa15p|CG;yWUA_@k+fDNA1N{8too(E9staoqO%0 zJ(i7`ndf;WIdBGNpe}ZxB&4Ohcp>M^cAYdQmrPeWV`I-Z1cOuULp6pe& zlx;dCaBIGxTHXl7G)6E=!|y$nyy!2$C=3D0--l3nVorqaNM`{XV{I*Tz-nGZQ03d9 z4{nC;b?R1BF_wFtL7{vumiooUqqqx7_zQ55^-f0w-?6=ExH-2@x|%h8ou|VG9r((B+CFT6VE{xtg}E5*Kn{TT;Sv3>@XD-^iKKd%1Y@K@K;@|$abu>XS=TOYWD J9yieF+BXGmid9qyNzfF677;n{7X%S3jx%{^Fp2Tq*5dY;Wn{;XX z4V!D!%EDGy-z5r)E?d0aoq02FN5{k|F|5F>{7aUuPKaxsWnmthi}bt(LC&c&S@YE$c~Exd*{6hDv<$)@*=*(zmF z%|-2-+Q`wf3^{~K11Dn$+to`&rIDAhgk^02H4}^Du88nCC1F46QFtX^#hvyLSdp&Y zIL{W~S?^c<|1Fe&Yp@Cn()^pKjb5k8=E;Ux-@>i;LKL%poR4f%3Bm#U<2-^AWRVW1 zLEWuQS>-EZiENfw5tx1z&v3LkH#7;d-J{B#=$H&%fvTVqST$|39r+UKo`6}N^9-Dg KWrB%9(*mE7*_BcN literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/31ef9c4ed85ae1b4e8a027fc5a1d3037dbbf3b3a b/test/core/end2end/fuzzers/api_fuzzer_corpus/31ef9c4ed85ae1b4e8a027fc5a1d3037dbbf3b3a new file mode 100644 index 0000000000000000000000000000000000000000..2edcd8e592e7da3b4eff4b7f6df7b0a0f7d1700e GIT binary patch literal 542 zcmZvZu}&L75QhIxS#}~L%c#Hgp}fRoJVj9oSnJ#TF`P2z(dep zmBt+n;w@;dA*oYQEps+VLCRF4o%v?|*!rQ~gN?QPkKSO;z<4HC=cW$yf%!}OR zX_1ulb4o=+y>xZR$>sw3q zn-rB0(%JgNJ|2YidsfX_CFU)>Ypv6NTFq4h1gc@NwG=jw>ug*Ul)2pJ?kXu=>ImCV Y_j_z-(F?`9La=~$H5#rfxn*u&0lI{oy8r+H literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/35cf9a1a6f81db0829d854fd3716916bae081c8c b/test/core/end2end/fuzzers/api_fuzzer_corpus/35cf9a1a6f81db0829d854fd3716916bae081c8c new file mode 100644 index 0000000000000000000000000000000000000000..836e04a1bdc7572d71f72b16495f84325970557b GIT binary patch literal 1047 zcmaKsPiqrF7{;F&;xHQ}^eCPZ3#l74Qo$ZtB%&W7vojDFMFxdqesE@ok;>sjSjmovpet3`#irVkrA1M40Iu-npQ|_liX<(WeJr$ zZ$Hu0sy~vdJZo!m0 z`0PQmKkCQ*a1ccFazdjn1*6HZ!#z=p52!5KGWP6CHK%7`_eBtgor3`dQU5jds5|a) zQBx|4J`z`vPToH@aHE_->|c`=ChSIlwEa^MM=JS*qqy#PYeItcPR&3Smn2jbQx}rH@F?(DS1Y7UmReU LyO~w&yT5=x(L*12 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/541e87b9d3dc75ad40cb47935ed4de83b25af5b9 b/test/core/end2end/fuzzers/api_fuzzer_corpus/541e87b9d3dc75ad40cb47935ed4de83b25af5b9 new file mode 100644 index 0000000000000000000000000000000000000000..4eabbd5a8fac98138297a81e545e6c1218836fc6 GIT binary patch literal 895 zcmaKrv5wO~5Qb+*$7&r=bS0v?a8e)^1cAgAK_??#A>xEYVL8s+okik=wc{XKEFD7P zQC!iaOG8CXOXCI*B_+i&Yv&~Ah*-Ip-JO4D_W#zHkj_YhGKg~7CZ%+C*EKB!nY|o7 zQ{;7zQMQ&Ir?n420-0|*Ll7EJa=@A%{njUS!0HoL^S7D*y8%G@CW!lIdLH)A({%o* zAH`7`1rtA^*9(e6^5eyH#66M61=@96+SYDp&gVh+%1?vQg#09WOJfRWW7hOhQu2vd zL@N96R6{jd1&F~lY|Gx#(09J#0z~E+zJ%f7wrqq@9>8_Dff7Jem6Bw_74#XUejH4D zeC9gPGUZOE-_#Z;M z09}E@_Sw<26Tr}6O=9I0kB8m&yepvqhugOgxC>%E(5jjov3Rq%E_IPJ5$?_&2X6y!x-b-*5dY;Wn{+n* zhD{o^vhV}exr>FOxLon}cHYc;^K?R-5yLvI&DbYvIooKxS2av_a(G}VXzXiK9S2h8 z*I+>InKKQ=&_;l8n)Ja(b0F-ajh2(|>;C%zAYOsmI^$uteV(Sn?RGqf(>Usf30;q9 z(4}xNx;zz46vzO7E{luV-#F*PsCyBn(P^K;B)*{@b+3BDX=_8t0||+2cF!nJHHYdf zXx}u)j$Xv!2r3JlcyMxB)dFeEYFNaQHh?MzB}rcf@EN7yAiAXRO7_HYZv-q$S8p=Q zEAXuM1ONRON{XAX3KeNC_&+CYSwU%~?5>SoqiOwk-K=fm)_WyNSU=5oVl#=#0eh2K z1SOS4ew+m@xBAFxwmgwg%S?+%^_v)jqxxL+G{|=j8+RhcljQ5XbMG+NbA$qDm}?si9IyEC?!N5i;T{L{vx&mg}5ai_{5c=S5}35(tTp zl8Gf73tyv)7eEXQh>78G&n}fhD+ZoCoPECkz5nlz1+gUt;}G?tOUAJ6>(G^);8m^g zdj~<==c6ZvqTNTRJBvsZy4#@PjM!NO#ekYE-VnV3{on&HJn+f~{m{vC{(iXuKztL_ zy(6Bb!{f4??G3X$E3;%07xeNcZ`wklAi})6l{q2pFz~vqt(u{+q!ob zUI$-@3dT>ZU1RfNHsw;7q;t;7Q}8G}19E3lf)&O9534!>B|<(`wo&MAePmT{RT6cR zG~4r}8tBju@#{Y^4uyZivDf={M{x!42Al!){;5PB;{B>d=gerG^5g%(yxB(Mf&E2h s9Rz?QyYBYF?5|61TZ4XPr%h)SE%!#dZw0!Br3&`hfC+qW<+EG;2Eh~J)Bpeg literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/9dd5d09e1538e12b091c35d252ee43684d0f07bd b/test/core/end2end/fuzzers/api_fuzzer_corpus/9dd5d09e1538e12b091c35d252ee43684d0f07bd new file mode 100644 index 0000000000000000000000000000000000000000..79ca2676601e12f72e21129c7c94b8fd486fa52f GIT binary patch literal 353 zcmYk2zfJ=&4934$RpdL+sUu=)RjITYfVmYq#4A)h0E1s3C+=2+P68qE988&5y0P#G ztSnie;t?2vugAX(jvf2^*$!3WYw_SjWSc^meLZs;K%+C3a(bePSs|M~Ve_U`1r;M$ zNP1Nl#)E7}*~7xbmn}vqc|%spuJ*cr`jdq5$AR%JaDz04xj$EiqoX!bO1wH$-K2UH z9Z0yoJN4L}Jisidu=6I#n@)2HQb_x}%o%qGM^-^4+Ckf!lrJB-3K^oL$T zHyK3%c~Lg%@|-U7JJqD7Z2bdrKZyO{+DrZJkh~HOi;U~%jj z#L`MBayJcP6nt8CQL4ebj#aEl1&BqbBpGr8)2Gyn{1JI$-kk}18L-Z* z)^t9r!P3^RczG6ri<{5_H75TCN+lcgwEc3ir5gLVv)+jkBcCh5I?s8FS2&)|eF!cs l{W5Z?U5eMueodS|e#y$PG${R86#Vpax7=Y5PiGEWiQHMVIfw=Ku8WvAz~4c1OI{$1dHQLhIklb+`C-B))eA@xymM8 z8vlmPHELzy4_N1N2!1SE3^VV|n>Qn4GAS8oE2Wycq_s(#-bYnJrRS$7n*7GGRMn}^ zFn1dYWM51wAq=GAfH^JtG~F^_cDLzS{({Rzi4%WI0GUmQy@46`+LuW(-fu^vD2c*h z5Yz31Mm-8flj{qfihP!Eiw4}NQ2)UhhrO#H2``2e#L*q~sdv+7N?R(5pNKi6(?^5l zt7Z_L73r$h)Y2gA+lL`<^oj4w{fEiE{jKXUQZg^29>Q8`m z?&{3)tO7?nzv3dh@h=O(=@zs=g`0m9rIIz8*UxrTZ5Q{>8&PcJbLm#6dg>mwoXNIMEIndnC4o({ntfMkG1*(CDuf?Kc^wi~(9%9oP QF6S9cHe&~KfsO{g0Jsp5H~;_u literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/b9eb50c5eb99cf0b419efa2cb8d7fdf2e71f6634 b/test/core/end2end/fuzzers/api_fuzzer_corpus/b9eb50c5eb99cf0b419efa2cb8d7fdf2e71f6634 new file mode 100644 index 0000000000000000000000000000000000000000..00d6aa2a2cba8897c773091f1659b820c58fdce8 GIT binary patch literal 470 zcmZuu!AiqG5S?A>vWXIU6i=-Mu|<3Es7SZ%&6|-al0gD(rSudQT9euDSyzHGaCLF6(ce3j$}N1xc`ZHyG`__VM)MJK`ch%~fJ{Pdp3ex@;ogHd-e8B_ z!s07?%t096vI)!4bE`~3*@8{jk_teqmC|&|3N*$nNWvKgbDk8%qa2{gRh?yd-vCED zzw-ZIK`^)rT0nz~e-ovWZCrIOcUAiU?wmKol;l(GSDR`N04K{b1i{Gl5RBimJC7vF U=8`v74~B8_oqGn0ow}jbC+nz!l>h($ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/c77bd1e9d9be2b6d1362cbb15f63cf749aa113ea b/test/core/end2end/fuzzers/api_fuzzer_corpus/c77bd1e9d9be2b6d1362cbb15f63cf749aa113ea new file mode 100644 index 0000000000000000000000000000000000000000..d56d793d15449587324cd30caffe37ded81ddd18 GIT binary patch literal 325 zcmXX?Jx>Bb5Pdtr%^n(JO$9Mgx#EnLSm1vk)|ca)2$8^L?pUJrB^ncdh{aVlbTs}A zn`_kg6D-yRoa$vV?_(b2ES3ev5$R=%jS)N5p(`Yr<=I?{IOlXBlj0s?snvl7yAKbc z1f)0IHWY3pdyU3LkzGXNEJ^R;A{k9N&LfJi-~MmuoK((pg!P zb7mNk=KPI)2sZZlO0b<~1=XjP?kydE`e+L%J8<6G`3ajFM5sI1#{uo_C_!0QJs5=s zpge9M_+rk5-v1x8_B3?BWmzXsyPeoU=ziO4QT1WztJpRn{*J!2S9N@}kukw)P@NBt QpHw;0s8rAw0~28N2g^5LK>z>% literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/d02fb86e7e236a2253a2eadb0599f5dc261e4048 b/test/core/end2end/fuzzers/api_fuzzer_corpus/d02fb86e7e236a2253a2eadb0599f5dc261e4048 new file mode 100644 index 0000000000000000000000000000000000000000..f73c10927a5ef4c141bba9869f5c425e749a61f1 GIT binary patch literal 346 zcmZvYu};G<5Qcvr#c~6RsJbAgNJxle$iN6fLA*jIrpmOZwxU4fq>fYa0v zT)i?;!^*x~8Ehh2L!9qYEYrsEmtSlJVGHLcJ0DpTUW6{e9`;FYd-`p+PN4*Pz;GzM z>Y@M5Tp4=*JJ5y$fs3}&5Zj!wMdm(^-i+uDT8~0z0YxA|Kf&1XKrfdV=yC!2kJt`2 N$f|h6YD4Te{RMsuU|9eF literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/d6d7dc448cc24272ce216dbc7365ebe6e6b7b367 b/test/core/end2end/fuzzers/api_fuzzer_corpus/d6d7dc448cc24272ce216dbc7365ebe6e6b7b367 new file mode 100644 index 0000000000000000000000000000000000000000..e49fe7d3bec17b526d7c8fa6399aa5f905857138 GIT binary patch literal 694 zcmZuuO>5Lp6g}_JK3-x8U5cxYg=r?}D1t6V$^-wxU=dt|bmr0yPN(BbCV_4nu=roH z>Sk6J#Gl~SO+eI@3xB}#CaLuUA0gc2-E+@9=g5?7P8QlpsfvKKws{zR_a#*Ra{Nq_ z>F-PB7lzw{9Vn3dWOE5&Ar%*l8PE@V&=rh62qVYO^*3J>L8u3cZf*dww;}Ey+2v$- zoMp>L!`Wh%CG$9?*DG2~C|;~i4tXasOb~Qy*@pWM$ni3nyo$5ra87YLJEJL0PN$3+ zN=4}Xmi10Z)5>)&Kts!Oa6`fejws0wp7r?9qDn#a-3AhjZ^MQEKIf zPOi>51qVDW>jXk7c99*-P2}!eSy6A7oL3uHla~C(JHyd#x6s;DkH>vkm;rVZ{Re<`{!jX zozr7>KBXJyTi^NBSl>9$#`FG&R>H?`ySLPjd6OD7gK z7XAiH7=W39fgxPlP^qGphqHa}o$q;hgepY^GUr?j4U|%)2hCjPAkyp03yId=85jD{ zqBNrh0x*A7DF>#23kpcnz%SLF1*C41ns#~q{{Vn$1K3edg|69;(H+JlFe6%BPgk5xRyEKQ%1xAlZB9!UFxq|7^ zC%{@O+z^dnj_)*L0xY$18X~9F)QgBiR)bYo;{t$9J4KOC9aIlvJ8%YQ-x4V0brXOp zRn^AXqyn1M7UJc%z$m!^l0k)v{|UL^b$r^n+7|UgxYs@qBgJ24^UAca0pN6;Ilw5h z@J6LpGv9nxEUS*?cL|2__@`JOg&y!_X1aYR2$1N;1+mVS=NFs^Z0Y73L2i|H_6lnV R^ZwkLMa*Tb>J)2^Kfmg5r8WQn literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/ddf932a29b8250746ec310af224f95d4a51cb745 b/test/core/end2end/fuzzers/api_fuzzer_corpus/ddf932a29b8250746ec310af224f95d4a51cb745 new file mode 100644 index 0000000000000000000000000000000000000000..62ba3d5ffe805237747d829f7796046f70bb1304 GIT binary patch literal 634 zcmZ|MF>4e-6bJDC49PHi%8^o1n2t9WiXw+MM;tT6Wtej}2GH_3VV3 zNlnvJK5AZqo$hbIfZ|svp%~hvyX#PR%JcWdVbjd+7l*TI`fSovkDt?|K6*t39Zyf5 z$Pzy{}811;whU!a_Cdj&rhm6JQd8l38H>0yi-=wuuC|5># zI?Bp>snQ4=xP{w#wY!qF!H-}SRsbdS3bOA+HS5pI0iD~Y6r5e+vKJ*-ij^@COwbg97K)ts7Xm@BIL_pe9Olb+mkZdMLhSt+SJ|Yq z@o(5%qt^a_^If8#=(5Gz-I+J@c63M_6T@a&n`w!x<#?x_6*WwJ(LA%{R!_7kPF;bO zwqQWn3&$FYp^X&6snG|wmW8le!j}DY{`&wBZ$RyJdE9RFqG-I|2!=rv_j@3p z5cvNl^6M!ee%NKhC0+9b%fKy6o!3K;4Vep&>xUDl8@q`GXd76t20ZJ z0vzl7s{g-*5^xPxp&-q_iQ4Eg%`4~Iro4+==Zz?2{k)vl#(50D@htVB1S#1(aO~Ez z%_mmr`b+{_ Date: Wed, 8 Jun 2016 13:06:44 -0700 Subject: [PATCH 1018/1894] Initial Python3 support Notable Changes: -Convert all str types to byte types at cython layer (ascii encoding) -Use six for packages that have different names in Python2/Python3 -By default, unit tests are compiled/run in Python2.7 and Python3.4 -Ensure MACOSX_BUILD_TARGET is at least 10.7 --- setup.py | 12 ++++ src/python/grpcio/commands.py | 2 +- src/python/grpcio/grpc/_channel.py | 10 +-- src/python/grpcio/grpc/_common.py | 13 ++++ .../grpcio/grpc/_cython/_cygrpc/call.pyx.pxi | 7 +- .../grpc/_cython/_cygrpc/channel.pyx.pxi | 24 ++----- .../grpc/_cython/_cygrpc/credentials.pxd.pxi | 2 +- .../grpc/_cython/_cygrpc/credentials.pyx.pxi | 53 +++------------ .../grpc/_cython/_cygrpc/grpc_string.pyx.pxi | 39 +++++++++++ .../grpc/_cython/_cygrpc/records.pyx.pxi | 68 ++++--------------- .../grpc/_cython/_cygrpc/server.pyx.pxi | 7 +- src/python/grpcio/grpc/_cython/cygrpc.pyx | 1 + src/python/grpcio/grpc/_links/service.py | 6 +- src/python/grpcio/grpc/_server.py | 14 ++-- .../grpcio/grpc/beta/_client_adaptations.py | 17 ++--- .../grpcio/grpc/beta/_server_adaptations.py | 46 +++++++------ .../grpcio/tests/qps/benchmark_client.py | 5 +- src/python/grpcio/tests/qps/client_runner.py | 9 ++- src/python/grpcio/tests/stress/client.py | 6 +- .../unit/_adapter/_intermediary_low_test.py | 43 ++++++------ .../grpcio/tests/unit/_adapter/_low_test.py | 16 ++--- .../grpcio/tests/unit/_cython/cygrpc_test.py | 2 +- .../tests/unit/_links/_transmission_test.py | 2 +- src/python/grpcio/tests/unit/_rpc_test.py | 8 ++- .../tests/unit/beta/_beta_features_test.py | 4 +- .../grpcio/tests/unit/beta/_not_found_test.py | 2 +- .../framework/interfaces/base/test_cases.py | 6 +- src/python/grpcio/tests/unit/test_common.py | 4 ++ tools/gce/linux_performance_worker_init.sh | 4 ++ tools/run_tests/build_python.sh | 15 ++++ tools/run_tests/run_python.sh | 1 + tools/run_tests/run_tests.py | 29 ++++---- 32 files changed, 243 insertions(+), 234 deletions(-) create mode 100644 src/python/grpcio/grpc/_cython/_cygrpc/grpc_string.pyx.pxi diff --git a/setup.py b/setup.py index 018d0470f43..e2de96de358 100644 --- a/setup.py +++ b/setup.py @@ -33,9 +33,11 @@ import os import os.path import shutil import sys +import sysconfig from distutils import core as _core from distutils import extension as _extension +import pkg_resources import setuptools from setuptools.command import egg_info @@ -110,6 +112,16 @@ if "linux" in sys.platform or "darwin" in sys.platform: DEFINE_MACROS += (('PyMODINIT_FUNC', pymodinit),) +# By default, Python3 distutils enforces compatibility of +# c plugins (.so files) with the OSX version Python3 was built with. +# For Python3.4, this is OSX 10.6, but we need Thread Local Support (__thread) +if 'darwin' in sys.platform and PY3: + mac_target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') + if mac_target and (pkg_resources.parse_version(mac_target) < + pkg_resources.parse_version('10.7.0')): + os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.7' + + def cython_extensions(module_names, extra_sources, include_dirs, libraries, define_macros, build_with_cython=False): # Set compiler directives linetrace argument only if we care about tracing; diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py index 295dab2d274..3e974eba0a3 100644 --- a/src/python/grpcio/commands.py +++ b/src/python/grpcio/commands.py @@ -191,7 +191,7 @@ class BuildProtoModules(setuptools.Command): except subprocess.CalledProcessError as e: sys.stderr.write( 'warning: Command:\n{}\nMessage:\n{}\nOutput:\n{}'.format( - command, e.message, e.output)) + command, str(e), e.output)) # Generated proto directories dont include __init__.py, but # these are needed for python package resolution diff --git a/src/python/grpcio/grpc/_channel.py b/src/python/grpcio/grpc/_channel.py index d9eb5a4b770..555a92a3634 100644 --- a/src/python/grpcio/grpc/_channel.py +++ b/src/python/grpcio/grpc/_channel.py @@ -85,7 +85,7 @@ def _deadline(timeout): def _unknown_code_details(unknown_cygrpc_code, details): - return b'Server sent unknown code {} and details "{}"'.format( + return 'Server sent unknown code {} and details "{}"'.format( unknown_cygrpc_code, details) @@ -142,7 +142,7 @@ def _handle_event(event, state, response_deserializer): response = _common.deserialize( serialized_response, response_deserializer) if response is None: - details = b'Exception deserializing response!' + details = 'Exception deserializing response!' _abort(state, grpc.StatusCode.INTERNAL, details) else: state.response = response @@ -186,7 +186,7 @@ def _consume_request_iterator( if state.code is None and not state.cancelled: if serialized_request is None: call.cancel() - details = b'Exception serializing request!' + details = 'Exception serializing request!' _abort(state, grpc.StatusCode.INTERNAL, details) return else: @@ -230,7 +230,7 @@ class _Rendezvous(grpc.RpcError, grpc.Future, grpc.Call): if self._state.code is None: self._call.cancel() self._state.cancelled = True - _abort(self._state, grpc.StatusCode.CANCELLED, b'Cancelled!') + _abort(self._state, grpc.StatusCode.CANCELLED, 'Cancelled!') self._state.condition.notify_all() return False @@ -402,7 +402,7 @@ def _start_unary_request(request, timeout, request_serializer): if serialized_request is None: state = _RPCState( (), _EMPTY_METADATA, _EMPTY_METADATA, grpc.StatusCode.INTERNAL, - b'Exception serializing request!') + 'Exception serializing request!') rendezvous = _Rendezvous(state, None, None, deadline) return deadline, deadline_timespec, None, rendezvous else: diff --git a/src/python/grpcio/grpc/_common.py b/src/python/grpcio/grpc/_common.py index a3fb66cd077..b8688a0149a 100644 --- a/src/python/grpcio/grpc/_common.py +++ b/src/python/grpcio/grpc/_common.py @@ -97,3 +97,16 @@ def serialize(message, serializer): def deserialize(serialized_message, deserializer): return _transform(serialized_message, deserializer, 'Exception deserializing message!') + + +def _encode(s): + if isinstance(s, bytes): + return s + else: + return s.encode('ascii') + + +def fully_qualified_method(group, method): + group = _encode(group) + method = _encode(method) + return b'/' + group + b'/' + method diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi index 1bfe6344e07..a09bbc75fe6 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi @@ -55,6 +55,7 @@ cdef class Call: def cancel( self, grpc_status_code error_code=GRPC_STATUS__DO_NOT_USE, details=None): + details = str_to_bytes(details) if not self.is_valid: raise ValueError("invalid call object cannot be used from Python") if (details is None) != (error_code == GRPC_STATUS__DO_NOT_USE): @@ -63,12 +64,6 @@ cdef class Call: cdef grpc_call_error result cdef char *c_details = NULL if error_code != GRPC_STATUS__DO_NOT_USE: - if isinstance(details, bytes): - pass - elif isinstance(details, basestring): - details = details.encode() - else: - raise TypeError("expected details to be str or bytes") self.references.append(details) c_details = details with nogil: diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi index c26bc083cf3..866cff0d019 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi @@ -34,18 +34,13 @@ cdef class Channel: def __cinit__(self, target, ChannelArgs arguments=None, ChannelCredentials channel_credentials=None): + target = str_to_bytes(target) cdef grpc_channel_args *c_arguments = NULL cdef char *c_target = NULL self.c_channel = NULL self.references = [] if arguments is not None: c_arguments = &arguments.c_args - if isinstance(target, bytes): - pass - elif isinstance(target, basestring): - target = target.encode() - else: - raise TypeError("expected target to be str or bytes") c_target = target if channel_credentials is None: with nogil: @@ -62,25 +57,14 @@ cdef class Channel: def create_call(self, Call parent, int flags, CompletionQueue queue not None, method, host, Timespec deadline not None): + method = str_to_bytes(method) + host = str_to_bytes(host) if queue.is_shutting_down: raise ValueError("queue must not be shutting down or shutdown") - if isinstance(method, bytes): - pass - elif isinstance(method, basestring): - method = method.encode() - else: - raise TypeError("expected method to be str or bytes") cdef char *method_c_string = method cdef char *host_c_string = NULL - if host is None: - pass - elif isinstance(host, bytes): + if host is not None: host_c_string = host - elif isinstance(host, basestring): - host = host.encode() - host_c_string = host - else: - raise TypeError("expected host to be str, bytes, or None") cdef Call operation_call = Call() operation_call.references = [self, method, host, queue] cdef grpc_call *parent_call = NULL diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi index 19a59e08f3f..d377a675200 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pxd.pxi @@ -54,7 +54,7 @@ cdef class ServerCredentials: cdef class CredentialsMetadataPlugin: cdef object plugin_callback - cdef str plugin_name + cdef bytes plugin_name cdef grpc_metadata_credentials_plugin make_c_plugin(self) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi index 1ba86457af5..470382d6091 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi @@ -82,7 +82,7 @@ cdef class ServerCredentials: cdef class CredentialsMetadataPlugin: - def __cinit__(self, object plugin_callback, str name): + def __cinit__(self, object plugin_callback, name): """ Args: plugin_callback (callable): Callback accepting a service URL (str/bytes) @@ -93,6 +93,7 @@ cdef class CredentialsMetadataPlugin: successful). name (str): Plugin name. """ + name = str_to_bytes(name) if not callable(plugin_callback): raise ValueError('expected callable plugin_callback') self.plugin_callback = plugin_callback @@ -129,7 +130,8 @@ cdef void plugin_get_metadata( grpc_credentials_plugin_metadata_cb cb, void *user_data) with gil: def python_callback( Metadata metadata, grpc_status_code status, - const char *error_details): + error_details): + error_details = str_to_bytes(error_details) cb(user_data, metadata.c_metadata_array.metadata, metadata.c_metadata_array.count, status, error_details) cdef CredentialsMetadataPlugin self = state @@ -148,14 +150,7 @@ def channel_credentials_google_default(): def channel_credentials_ssl(pem_root_certificates, SslPemKeyCertPair ssl_pem_key_cert_pair): - if pem_root_certificates is None: - pass - elif isinstance(pem_root_certificates, bytes): - pass - elif isinstance(pem_root_certificates, basestring): - pem_root_certificates = pem_root_certificates.encode() - else: - raise TypeError("expected str or bytes for pem_root_certificates") + pem_root_certificates = str_to_bytes(pem_root_certificates) cdef ChannelCredentials credentials = ChannelCredentials() cdef const char *c_pem_root_certificates = NULL if pem_root_certificates is not None: @@ -207,12 +202,7 @@ def call_credentials_google_compute_engine(): def call_credentials_service_account_jwt_access( json_key, Timespec token_lifetime not None): - if isinstance(json_key, bytes): - pass - elif isinstance(json_key, basestring): - json_key = json_key.encode() - else: - raise TypeError("expected json_key to be str or bytes") + json_key = str_to_bytes(json_key) cdef CallCredentials credentials = CallCredentials() cdef char *json_key_c_string = json_key with nogil: @@ -223,12 +213,7 @@ def call_credentials_service_account_jwt_access( return credentials def call_credentials_google_refresh_token(json_refresh_token): - if isinstance(json_refresh_token, bytes): - pass - elif isinstance(json_refresh_token, basestring): - json_refresh_token = json_refresh_token.encode() - else: - raise TypeError("expected json_refresh_token to be str or bytes") + json_refresh_token = str_to_bytes(json_refresh_token) cdef CallCredentials credentials = CallCredentials() cdef char *json_refresh_token_c_string = json_refresh_token with nogil: @@ -238,18 +223,8 @@ def call_credentials_google_refresh_token(json_refresh_token): return credentials def call_credentials_google_iam(authorization_token, authority_selector): - if isinstance(authorization_token, bytes): - pass - elif isinstance(authorization_token, basestring): - authorization_token = authorization_token.encode() - else: - raise TypeError("expected authorization_token to be str or bytes") - if isinstance(authority_selector, bytes): - pass - elif isinstance(authority_selector, basestring): - authority_selector = authority_selector.encode() - else: - raise TypeError("expected authority_selector to be str or bytes") + authorization_token = str_to_bytes(authorization_token) + authority_selector = str_to_bytes(authority_selector) cdef CallCredentials credentials = CallCredentials() cdef char *authorization_token_c_string = authorization_token cdef char *authority_selector_c_string = authority_selector @@ -272,16 +247,10 @@ def call_credentials_metadata_plugin(CredentialsMetadataPlugin plugin): def server_credentials_ssl(pem_root_certs, pem_key_cert_pairs, bint force_client_auth): + pem_root_certs = str_to_bytes(pem_root_certs) cdef char *c_pem_root_certs = NULL - if pem_root_certs is None: - pass - elif isinstance(pem_root_certs, bytes): - c_pem_root_certs = pem_root_certs - elif isinstance(pem_root_certs, basestring): - pem_root_certs = pem_root_certs.encode() + if pem_root_certs is not None: c_pem_root_certs = pem_root_certs - else: - raise TypeError("expected pem_root_certs to be str or bytes") pem_key_cert_pairs = list(pem_key_cert_pairs) for pair in pem_key_cert_pairs: if not isinstance(pair, SslPemKeyCertPair): diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc_string.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/grpc_string.pyx.pxi new file mode 100644 index 00000000000..274f038e0ac --- /dev/null +++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc_string.pyx.pxi @@ -0,0 +1,39 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + +# This function will ascii encode unicode string inputs if neccesary. +# In Python3, unicode strings are the default str type. +cdef bytes str_to_bytes(object s): + if s is None or isinstance(s, bytes): + return s + elif isinstance(s, unicode): + return s.encode('ascii') + else: + raise TypeError('Expected bytes, str, or unicode, not {}'.format(type(s))) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi index e0219b00865..2e52953c0a3 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi @@ -235,18 +235,13 @@ cdef class ByteBuffer: if data is None: self.c_byte_buffer = NULL return - if isinstance(data, bytes): - pass - elif isinstance(data, basestring): - data = data.encode() - elif isinstance(data, ByteBuffer): + if isinstance(data, ByteBuffer): data = (data).bytes() if data is None: self.c_byte_buffer = NULL return else: - raise TypeError("expected value to be of type str, bytes, or " - "ByteBuffer, not {}".format(type(data))) + data = str_to_bytes(data) cdef char *c_data = data cdef gpr_slice data_slice @@ -302,19 +297,8 @@ cdef class ByteBuffer: cdef class SslPemKeyCertPair: def __cinit__(self, private_key, certificate_chain): - if isinstance(private_key, bytes): - self.private_key = private_key - elif isinstance(private_key, basestring): - self.private_key = private_key.encode() - else: - raise TypeError("expected private_key to be of type str or bytes") - if isinstance(certificate_chain, bytes): - self.certificate_chain = certificate_chain - elif isinstance(certificate_chain, basestring): - self.certificate_chain = certificate_chain.encode() - else: - raise TypeError("expected certificate_chain to be of type str or bytes " - "or int") + self.private_key = str_to_bytes(private_key) + self.certificate_chain = str_to_bytes(certificate_chain) self.c_pair.private_key = self.private_key self.c_pair.certificate_chain = self.certificate_chain @@ -322,27 +306,16 @@ cdef class SslPemKeyCertPair: cdef class ChannelArg: def __cinit__(self, key, value): - if isinstance(key, bytes): - self.key = key - elif isinstance(key, basestring): - self.key = key.encode() - else: - raise TypeError("expected key to be of type str or bytes") - if isinstance(value, bytes): - self.value = value - self.c_arg.type = GRPC_ARG_STRING - self.c_arg.value.string = self.value - elif isinstance(value, basestring): - self.value = value.encode() - self.c_arg.type = GRPC_ARG_STRING - self.c_arg.value.string = self.value - elif isinstance(value, int): + self.key = str_to_bytes(key) + self.c_arg.key = self.key + if isinstance(value, int): self.value = int(value) self.c_arg.type = GRPC_ARG_INTEGER self.c_arg.value.integer = self.value else: - raise TypeError("expected value to be of type str or bytes or int") - self.c_arg.key = self.key + self.value = str_to_bytes(value) + self.c_arg.type = GRPC_ARG_STRING + self.c_arg.value.string = self.value cdef class ChannelArgs: @@ -375,18 +348,8 @@ cdef class ChannelArgs: cdef class Metadatum: def __cinit__(self, key, value): - if isinstance(key, bytes): - self._key = key - elif isinstance(key, basestring): - self._key = key.encode() - else: - raise TypeError("expected key to be of type str or bytes") - if isinstance(value, bytes): - self._value = value - elif isinstance(value, basestring): - self._value = value.encode() - else: - raise TypeError("expected value to be of type str or bytes") + self._key = str_to_bytes(key) + self._value = str_to_bytes(value) self.c_metadata.key = self._key self.c_metadata.value = self._value self.c_metadata.value_length = len(self._value) @@ -601,12 +564,7 @@ def operation_send_close_from_client(int flags): def operation_send_status_from_server( Metadata metadata, grpc_status_code code, details, int flags): - if isinstance(details, bytes): - pass - elif isinstance(details, basestring): - details = details.encode() - else: - raise TypeError("expected a str or bytes object for details") + details = str_to_bytes(details) cdef Operation op = Operation() op.c_op.type = GRPC_OP_SEND_STATUS_FROM_SERVER op.c_op.flags = flags diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi index 55948755b2f..c8a73e65d6f 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi @@ -103,12 +103,7 @@ cdef class Server: def add_http2_port(self, address, ServerCredentials server_credentials=None): - if isinstance(address, bytes): - pass - elif isinstance(address, basestring): - address = address.encode() - else: - raise TypeError("expected address to be a str or bytes") + address = str_to_bytes(address) self.references.append(address) cdef int result cdef char *address_c_string = address diff --git a/src/python/grpcio/grpc/_cython/cygrpc.pyx b/src/python/grpcio/grpc/_cython/cygrpc.pyx index 8823ea5ef5e..cf146f5a048 100644 --- a/src/python/grpcio/grpc/_cython/cygrpc.pyx +++ b/src/python/grpcio/grpc/_cython/cygrpc.pyx @@ -35,6 +35,7 @@ import sys # TODO(atash): figure out why the coverage tool gets confused about the Cython # coverage plugin when the following files don't have a '.pxi' suffix. +include "grpc/_cython/_cygrpc/grpc_string.pyx.pxi" include "grpc/_cython/_cygrpc/call.pyx.pxi" include "grpc/_cython/_cygrpc/channel.pyx.pxi" include "grpc/_cython/_cygrpc/credentials.pyx.pxi" diff --git a/src/python/grpcio/grpc/_links/service.py b/src/python/grpcio/grpc/_links/service.py index 11310e22409..5fc4994ca0e 100644 --- a/src/python/grpcio/grpc/_links/service.py +++ b/src/python/grpcio/grpc/_links/service.py @@ -33,6 +33,7 @@ import abc import enum import logging import threading +import six import time from grpc._adapter import _intermediary_low @@ -177,7 +178,10 @@ class _Kernel(object): call = service_acceptance.call call.accept(self._completion_queue, call) try: - group, method = service_acceptance.method.split(b'/')[1:3] + service_method = service_acceptance.method + if six.PY3: + service_method = service_method.decode('latin1') + group, method = service_method.split('/')[1:3] except ValueError: logging.info('Illegal path "%s"!', service_acceptance.method) return diff --git a/src/python/grpcio/grpc/_server.py b/src/python/grpcio/grpc/_server.py index aae9f48ae6c..f4f67204977 100644 --- a/src/python/grpcio/grpc/_server.py +++ b/src/python/grpcio/grpc/_server.py @@ -85,7 +85,7 @@ def _abortion_code(state, code): def _details(state): - return b'' if state.details is None else state.details + return '' if state.details is None else state.details class _HandlerCallDetails( @@ -189,7 +189,7 @@ def _receive_message(state, call, request_deserializer): if request is None: _abort( state, call, cygrpc.StatusCode.internal, - b'Exception deserializing request!') + 'Exception deserializing request!') else: state.request = request state.condition.notify_all() @@ -340,7 +340,7 @@ def _unary_request(rpc_event, state, request_deserializer): state.condition.wait() if state.request is None: if state.client is _CLOSED: - details = b'"{}" requires exactly one request message.'.format( + details = '"{}" requires exactly one request message.'.format( rpc_event.request_call_details.method) # TODO(5992#issuecomment-220761992): really, what status code? _abort( @@ -363,7 +363,7 @@ def _call_behavior(rpc_event, state, behavior, argument, request_deserializer): except Exception as e: # pylint: disable=broad-except with state.condition: if e not in state.rpc_errors: - details = b'Exception calling application: {}'.format(e) + details = 'Exception calling application: {}'.format(e) logging.exception(details) _abort( state, rpc_event.operation_call, cygrpc.StatusCode.unknown, details) @@ -378,7 +378,7 @@ def _take_response_from_response_iterator(rpc_event, state, response_iterator): except Exception as e: # pylint: disable=broad-except with state.condition: if e not in state.rpc_errors: - details = b'Exception iterating responses: {}'.format(e) + details = 'Exception iterating responses: {}'.format(e) logging.exception(details) _abort( state, rpc_event.operation_call, cygrpc.StatusCode.unknown, details) @@ -391,7 +391,7 @@ def _serialize_response(rpc_event, state, response, response_serializer): with state.condition: _abort( state, rpc_event.operation_call, cygrpc.StatusCode.internal, - b'Failed to serialize response!') + 'Failed to serialize response!') return None else: return serialized_response @@ -544,7 +544,7 @@ def _handle_unrecognized_method(rpc_event): cygrpc.operation_receive_close_on_server(_EMPTY_FLAGS), cygrpc.operation_send_status_from_server( _EMPTY_METADATA, cygrpc.StatusCode.unimplemented, - b'Method not found!', _EMPTY_FLAGS), + 'Method not found!', _EMPTY_FLAGS), ) rpc_state = _RPCState() rpc_event.operation_call.start_batch( diff --git a/src/python/grpcio/grpc/beta/_client_adaptations.py b/src/python/grpcio/grpc/beta/_client_adaptations.py index 621fcf2174f..024808c5404 100644 --- a/src/python/grpcio/grpc/beta/_client_adaptations.py +++ b/src/python/grpcio/grpc/beta/_client_adaptations.py @@ -30,6 +30,7 @@ """Translates gRPC's client-side API into gRPC's client-side Beta API.""" import grpc +from grpc import _common from grpc._cython import cygrpc from grpc.beta import interfaces from grpc.framework.common import cardinality @@ -48,10 +49,6 @@ _STATUS_CODE_TO_ABORTION_KIND_AND_ABORTION_ERROR_CLASS = { } -def _fully_qualified_method(group, method): - return b'/{}/{}'.format(group, method) - - def _effective_metadata(metadata, metadata_transformer): non_none_metadata = () if metadata is None else metadata if metadata_transformer is None: @@ -184,7 +181,7 @@ def _blocking_unary_unary( metadata_transformer, request, request_serializer, response_deserializer): try: multi_callable = channel.unary_unary( - _fully_qualified_method(group, method), + _common.fully_qualified_method(group, method), request_serializer=request_serializer, response_deserializer=response_deserializer) effective_metadata = _effective_metadata(metadata, metadata_transformer) @@ -205,7 +202,7 @@ def _future_unary_unary( channel, group, method, timeout, protocol_options, metadata, metadata_transformer, request, request_serializer, response_deserializer): multi_callable = channel.unary_unary( - _fully_qualified_method(group, method), + _common.fully_qualified_method(group, method), request_serializer=request_serializer, response_deserializer=response_deserializer) effective_metadata = _effective_metadata(metadata, metadata_transformer) @@ -219,7 +216,7 @@ def _unary_stream( channel, group, method, timeout, protocol_options, metadata, metadata_transformer, request, request_serializer, response_deserializer): multi_callable = channel.unary_stream( - _fully_qualified_method(group, method), + _common.fully_qualified_method(group, method), request_serializer=request_serializer, response_deserializer=response_deserializer) effective_metadata = _effective_metadata(metadata, metadata_transformer) @@ -235,7 +232,7 @@ def _blocking_stream_unary( response_deserializer): try: multi_callable = channel.stream_unary( - _fully_qualified_method(group, method), + _common.fully_qualified_method(group, method), request_serializer=request_serializer, response_deserializer=response_deserializer) effective_metadata = _effective_metadata(metadata, metadata_transformer) @@ -257,7 +254,7 @@ def _future_stream_unary( metadata_transformer, request_iterator, request_serializer, response_deserializer): multi_callable = channel.stream_unary( - _fully_qualified_method(group, method), + _common.fully_qualified_method(group, method), request_serializer=request_serializer, response_deserializer=response_deserializer) effective_metadata = _effective_metadata(metadata, metadata_transformer) @@ -272,7 +269,7 @@ def _stream_stream( metadata_transformer, request_iterator, request_serializer, response_deserializer): multi_callable = channel.stream_stream( - _fully_qualified_method(group, method), + _common.fully_qualified_method(group, method), request_serializer=request_serializer, response_deserializer=response_deserializer) effective_metadata = _effective_metadata(metadata, metadata_transformer) diff --git a/src/python/grpcio/grpc/beta/_server_adaptations.py b/src/python/grpcio/grpc/beta/_server_adaptations.py index 52eadf23158..79e6ca87eb5 100644 --- a/src/python/grpcio/grpc/beta/_server_adaptations.py +++ b/src/python/grpcio/grpc/beta/_server_adaptations.py @@ -33,6 +33,7 @@ import collections import threading import grpc +from grpc import _common from grpc.beta import interfaces from grpc.framework.common import cardinality from grpc.framework.common import style @@ -287,36 +288,43 @@ def _simple_method_handler( None, _adapt_stream_stream_event(implementation.stream_stream_event)) +def _flatten_method_pair_map(method_pair_map): + method_pair_map = method_pair_map or {} + flat_map = {} + for method_pair in method_pair_map: + method = _common.fully_qualified_method(method_pair[0], method_pair[1]) + flat_map[method] = method_pair_map[method_pair] + return flat_map + + class _GenericRpcHandler(grpc.GenericRpcHandler): def __init__( self, method_implementations, multi_method_implementation, request_deserializers, response_serializers): - self._method_implementations = method_implementations + self._method_implementations = _flatten_method_pair_map( + method_implementations) + self._request_deserializers = _flatten_method_pair_map( + request_deserializers) + self._response_serializers = _flatten_method_pair_map( + response_serializers) self._multi_method_implementation = multi_method_implementation - self._request_deserializers = request_deserializers or {} - self._response_serializers = response_serializers or {} def service(self, handler_call_details): - try: - group_name, method_name = handler_call_details.method.split(b'/')[1:3] - except ValueError: + method_implementation = self._method_implementations.get( + handler_call_details.method) + if method_implementation is not None: + return _simple_method_handler( + method_implementation, + self._request_deserializers.get(handler_call_details.method), + self._response_serializers.get(handler_call_details.method)) + elif self._multi_method_implementation is None: return None else: - method_implementation = self._method_implementations.get( - (group_name, method_name,)) - if method_implementation is not None: - return _simple_method_handler( - method_implementation, - self._request_deserializers.get((group_name, method_name,)), - self._response_serializers.get((group_name, method_name,))) - elif self._multi_method_implementation is None: + try: + return None #TODO(nathaniel): call the multimethod. + except face.NoSuchMethodError: return None - else: - try: - return None #TODO(nathaniel): call the multimethod. - except face.NoSuchMethodError: - return None class _Server(interfaces.Server): diff --git a/src/python/grpcio/tests/qps/benchmark_client.py b/src/python/grpcio/tests/qps/benchmark_client.py index e2922347f98..1b100bb168d 100644 --- a/src/python/grpcio/tests/qps/benchmark_client.py +++ b/src/python/grpcio/tests/qps/benchmark_client.py @@ -31,12 +31,9 @@ import abc import time -try: - import Queue as queue # Python 2.x -except ImportError: - import queue # Python 3 from concurrent import futures +from six.moves import queue from grpc.beta import implementations from grpc.framework.interfaces.face import face diff --git a/src/python/grpcio/tests/qps/client_runner.py b/src/python/grpcio/tests/qps/client_runner.py index 2d1d981733b..1fd58687ad4 100644 --- a/src/python/grpcio/tests/qps/client_runner.py +++ b/src/python/grpcio/tests/qps/client_runner.py @@ -34,7 +34,7 @@ ClientRunner invokes either periodically or in response to some event. """ import abc -import thread +import threading import time @@ -61,15 +61,18 @@ class OpenLoopClientRunner(ClientRunner): super(OpenLoopClientRunner, self).__init__(client) self._is_running = False self._interval_generator = interval_generator + self._dispatch_thread = threading.Thread( + target=self._dispatch_requests, args=()) def start(self): self._is_running = True self._client.start() - thread.start_new_thread(self._dispatch_requests, ()) - + self._dispatch_thread.start() + def stop(self): self._is_running = False self._client.stop() + self._dispatch_thread.join() self._client = None def _dispatch_requests(self): diff --git a/src/python/grpcio/tests/stress/client.py b/src/python/grpcio/tests/stress/client.py index e2e016760c8..0de2532cd88 100644 --- a/src/python/grpcio/tests/stress/client.py +++ b/src/python/grpcio/tests/stress/client.py @@ -30,10 +30,10 @@ """Entry point for running stress tests.""" import argparse -import Queue import threading from grpc.beta import implementations +from six.moves import queue from src.proto.grpc.testing import metrics_pb2 from src.proto.grpc.testing import test_pb2 @@ -94,7 +94,7 @@ def run_test(args): test_cases = _parse_weighted_test_cases(args.test_cases) test_servers = args.server_addresses.split(',') # Propagate any client exceptions with a queue - exception_queue = Queue.Queue() + exception_queue = queue.Queue() stop_event = threading.Event() hist = histogram.Histogram(1, 1) runners = [] @@ -121,7 +121,7 @@ def run_test(args): if timeout_secs < 0: timeout_secs = None raise exception_queue.get(block=True, timeout=timeout_secs) - except Queue.Empty: + except queue.Empty: # No exceptions thrown, success pass finally: diff --git a/src/python/grpcio/tests/unit/_adapter/_intermediary_low_test.py b/src/python/grpcio/tests/unit/_adapter/_intermediary_low_test.py index 22d4b019c7f..09ebdeff335 100644 --- a/src/python/grpcio/tests/unit/_adapter/_intermediary_low_test.py +++ b/src/python/grpcio/tests/unit/_adapter/_intermediary_low_test.py @@ -164,15 +164,15 @@ class EchoTest(unittest.TestCase): self.assertIsNotNone(service_accepted) self.assertIs(service_accepted.kind, _low.Event.Kind.SERVICE_ACCEPTED) self.assertIs(service_accepted.tag, service_tag) - self.assertEqual(method, service_accepted.service_acceptance.method) - self.assertEqual(self.host, service_accepted.service_acceptance.host) + self.assertEqual(method.encode(), service_accepted.service_acceptance.method) + self.assertEqual(self.host.encode(), service_accepted.service_acceptance.host) self.assertIsNotNone(service_accepted.service_acceptance.call) metadata = dict(service_accepted.metadata) - self.assertIn(client_metadata_key, metadata) - self.assertEqual(client_metadata_value, metadata[client_metadata_key]) - self.assertIn(client_binary_metadata_key, metadata) + self.assertIn(client_metadata_key.encode(), metadata) + self.assertEqual(client_metadata_value.encode(), metadata[client_metadata_key.encode()]) + self.assertIn(client_binary_metadata_key.encode(), metadata) self.assertEqual(client_binary_metadata_value, - metadata[client_binary_metadata_key]) + metadata[client_binary_metadata_key.encode()]) server_call = service_accepted.service_acceptance.call server_call.accept(self.server_completion_queue, finish_tag) server_call.add_metadata(server_leading_metadata_key, @@ -186,12 +186,12 @@ class EchoTest(unittest.TestCase): self.assertEqual(_low.Event.Kind.METADATA_ACCEPTED, metadata_accepted.kind) self.assertEqual(metadata_tag, metadata_accepted.tag) metadata = dict(metadata_accepted.metadata) - self.assertIn(server_leading_metadata_key, metadata) - self.assertEqual(server_leading_metadata_value, - metadata[server_leading_metadata_key]) - self.assertIn(server_leading_binary_metadata_key, metadata) + self.assertIn(server_leading_metadata_key.encode(), metadata) + self.assertEqual(server_leading_metadata_value.encode(), + metadata[server_leading_metadata_key.encode()]) + self.assertIn(server_leading_binary_metadata_key.encode(), metadata) self.assertEqual(server_leading_binary_metadata_value, - metadata[server_leading_binary_metadata_key]) + metadata[server_leading_binary_metadata_key.encode()]) for datum in test_data: client_call.write(datum, write_tag, _low.WriteFlags.WRITE_NO_COMPRESS) @@ -277,17 +277,17 @@ class EchoTest(unittest.TestCase): self.assertIsNone(read_accepted.bytes) self.assertEqual(_low.Event.Kind.FINISH, finish_accepted.kind) self.assertEqual(finish_tag, finish_accepted.tag) - self.assertEqual(_low.Status(_low.Code.OK, details), finish_accepted.status) + self.assertEqual(_low.Status(_low.Code.OK, details.encode()), finish_accepted.status) metadata = dict(finish_accepted.metadata) - self.assertIn(server_trailing_metadata_key, metadata) - self.assertEqual(server_trailing_metadata_value, - metadata[server_trailing_metadata_key]) - self.assertIn(server_trailing_binary_metadata_key, metadata) + self.assertIn(server_trailing_metadata_key.encode(), metadata) + self.assertEqual(server_trailing_metadata_value.encode(), + metadata[server_trailing_metadata_key.encode()]) + self.assertIn(server_trailing_binary_metadata_key.encode(), metadata) self.assertEqual(server_trailing_binary_metadata_value, - metadata[server_trailing_binary_metadata_key]) + metadata[server_trailing_binary_metadata_key.encode()]) self.assertSetEqual(set(key for key, _ in finish_accepted.metadata), - set((server_trailing_metadata_key, - server_trailing_binary_metadata_key,))) + set((server_trailing_metadata_key.encode(), + server_trailing_binary_metadata_key.encode(),))) self.assertSequenceEqual(test_data, server_data) self.assertSequenceEqual(test_data, client_data) @@ -302,7 +302,8 @@ class EchoTest(unittest.TestCase): self._perform_echo_test([_BYTE_SEQUENCE]) def testManyOneByteEchoes(self): - self._perform_echo_test(_BYTE_SEQUENCE) + self._perform_echo_test( + [_BYTE_SEQUENCE[i:i+1] for i in range(len(_BYTE_SEQUENCE))]) def testManyManyByteEchoes(self): self._perform_echo_test(_BYTE_SEQUENCE_SEQUENCE) @@ -409,7 +410,7 @@ class CancellationTest(unittest.TestCase): finish_event = self.client_events.get() self.assertEqual(_low.Event.Kind.FINISH, finish_event.kind) - self.assertEqual(_low.Status(_low.Code.CANCELLED, 'Cancelled'), + self.assertEqual(_low.Status(_low.Code.CANCELLED, b'Cancelled'), finish_event.status) self.assertSequenceEqual(test_data, server_data) diff --git a/src/python/grpcio/tests/unit/_adapter/_low_test.py b/src/python/grpcio/tests/unit/_adapter/_low_test.py index ec46617996b..e09a1f2564f 100644 --- a/src/python/grpcio/tests/unit/_adapter/_low_test.py +++ b/src/python/grpcio/tests/unit/_adapter/_low_test.py @@ -148,11 +148,11 @@ class InsecureServerInsecureClient(unittest.TestCase): # Check that Python's user agent string is a part of the full user agent # string received_initial_metadata_dict = dict(received_initial_metadata) - self.assertIn('user-agent', received_initial_metadata_dict) - self.assertIn('Python-gRPC-{}'.format(_grpcio_metadata.__version__), - received_initial_metadata_dict['user-agent']) - self.assertEqual(method, request_event.call_details.method) - self.assertEqual(host, request_event.call_details.host) + self.assertIn(b'user-agent', received_initial_metadata_dict) + self.assertIn('Python-gRPC-{}'.format(_grpcio_metadata.__version__).encode(), + received_initial_metadata_dict[b'user-agent']) + self.assertEqual(method.encode(), request_event.call_details.method) + self.assertEqual(host.encode(), request_event.call_details.host) self.assertLess(abs(deadline - request_event.call_details.deadline), deadline_tolerance) @@ -198,12 +198,12 @@ class InsecureServerInsecureClient(unittest.TestCase): test_common.metadata_transmitted(server_initial_metadata, client_result.initial_metadata)) elif client_result.type == _types.OpType.RECV_MESSAGE: - self.assertEqual(response, client_result.message) + self.assertEqual(response.encode(), client_result.message) elif client_result.type == _types.OpType.RECV_STATUS_ON_CLIENT: self.assertTrue( test_common.metadata_transmitted(server_trailing_metadata, client_result.trailing_metadata)) - self.assertEqual(server_status_details, client_result.status.details) + self.assertEqual(server_status_details.encode(), client_result.status.details) self.assertEqual(server_status_code, client_result.status.code) self.assertEqual(set([ _types.OpType.SEND_INITIAL_METADATA, @@ -220,7 +220,7 @@ class InsecureServerInsecureClient(unittest.TestCase): self.assertNotIn(client_result.type, found_server_op_types) found_server_op_types.add(server_result.type) if server_result.type == _types.OpType.RECV_MESSAGE: - self.assertEqual(request, server_result.message) + self.assertEqual(request.encode(), server_result.message) elif server_result.type == _types.OpType.RECV_CLOSE_ON_SERVER: self.assertFalse(server_result.cancelled) self.assertEqual(set([ diff --git a/src/python/grpcio/tests/unit/_cython/cygrpc_test.py b/src/python/grpcio/tests/unit/_cython/cygrpc_test.py index 4039c1b99bd..a006a20ce3f 100644 --- a/src/python/grpcio/tests/unit/_cython/cygrpc_test.py +++ b/src/python/grpcio/tests/unit/_cython/cygrpc_test.py @@ -37,7 +37,7 @@ from tests.unit import test_common from tests.unit import resources -_SSL_HOST_OVERRIDE = 'foo.test.google.fr' +_SSL_HOST_OVERRIDE = b'foo.test.google.fr' _CALL_CREDENTIALS_METADATA_KEY = 'call-creds-key' _CALL_CREDENTIALS_METADATA_VALUE = 'call-creds-value' _EMPTY_FLAGS = 0 diff --git a/src/python/grpcio/tests/unit/_links/_transmission_test.py b/src/python/grpcio/tests/unit/_links/_transmission_test.py index 888684d197d..1f6edd18ca7 100644 --- a/src/python/grpcio/tests/unit/_links/_transmission_test.py +++ b/src/python/grpcio/tests/unit/_links/_transmission_test.py @@ -153,7 +153,7 @@ class RoundTripTest(unittest.TestCase): invocation_mate.tickets()[-1].termination, links.Ticket.Termination.COMPLETION) self.assertIs(invocation_mate.tickets()[-1].code, test_code) - self.assertEqual(invocation_mate.tickets()[-1].message, test_message) + self.assertEqual(invocation_mate.tickets()[-1].message, test_message.encode()) def _perform_scenario_test(self, scenario): test_operation_id = object() diff --git a/src/python/grpcio/tests/unit/_rpc_test.py b/src/python/grpcio/tests/unit/_rpc_test.py index 1c7a14c5d01..b33bff490c7 100644 --- a/src/python/grpcio/tests/unit/_rpc_test.py +++ b/src/python/grpcio/tests/unit/_rpc_test.py @@ -29,6 +29,8 @@ """Test of gRPC Python's application-layer API.""" +from __future__ import division + import itertools import threading import unittest @@ -41,9 +43,9 @@ from tests.unit.framework.common import test_constants from tests.unit.framework.common import test_control _SERIALIZE_REQUEST = lambda bytestring: bytestring * 2 -_DESERIALIZE_REQUEST = lambda bytestring: bytestring[len(bytestring) / 2:] +_DESERIALIZE_REQUEST = lambda bytestring: bytestring[len(bytestring) // 2:] _SERIALIZE_RESPONSE = lambda bytestring: bytestring * 3 -_DESERIALIZE_RESPONSE = lambda bytestring: bytestring[:len(bytestring) / 3] +_DESERIALIZE_RESPONSE = lambda bytestring: bytestring[:len(bytestring) // 3] _UNARY_UNARY = b'/test/UnaryUnary' _UNARY_STREAM = b'/test/UnaryStream' @@ -189,7 +191,7 @@ class RPCTest(unittest.TestCase): self._server.add_generic_rpc_handlers((_GenericHandler(self._handler),)) self._server.start() - self._channel = grpc.insecure_channel(b'localhost:%d' % port) + self._channel = grpc.insecure_channel('localhost:%d' % port) # TODO(nathaniel): Why is this necessary, and only in some development # environments? diff --git a/src/python/grpcio/tests/unit/beta/_beta_features_test.py b/src/python/grpcio/tests/unit/beta/_beta_features_test.py index bb2893a21b9..3a9701b8ebe 100644 --- a/src/python/grpcio/tests/unit/beta/_beta_features_test.py +++ b/src/python/grpcio/tests/unit/beta/_beta_features_test.py @@ -42,8 +42,8 @@ from tests.unit.framework.common import test_constants _SERVER_HOST_OVERRIDE = 'foo.test.google.fr' -_PER_RPC_CREDENTIALS_METADATA_KEY = 'my-call-credentials-metadata-key' -_PER_RPC_CREDENTIALS_METADATA_VALUE = 'my-call-credentials-metadata-value' +_PER_RPC_CREDENTIALS_METADATA_KEY = b'my-call-credentials-metadata-key' +_PER_RPC_CREDENTIALS_METADATA_VALUE = b'my-call-credentials-metadata-value' _GROUP = 'group' _UNARY_UNARY = 'unary-unary' diff --git a/src/python/grpcio/tests/unit/beta/_not_found_test.py b/src/python/grpcio/tests/unit/beta/_not_found_test.py index 44fcd1e13c2..37b8c49120f 100644 --- a/src/python/grpcio/tests/unit/beta/_not_found_test.py +++ b/src/python/grpcio/tests/unit/beta/_not_found_test.py @@ -61,7 +61,7 @@ class NotFoundTest(unittest.TestCase): def test_future_stream_unary_not_found(self): rpc_future = self._generic_stub.future_stream_unary( - 'grupe', 'mevvod', b'def', test_constants.LONG_TIMEOUT) + 'grupe', 'mevvod', [b'def'], test_constants.LONG_TIMEOUT) with self.assertRaises(face.LocalError) as exception_assertion_context: rpc_future.result() self.assertIs( diff --git a/src/python/grpcio/tests/unit/framework/interfaces/base/test_cases.py b/src/python/grpcio/tests/unit/framework/interfaces/base/test_cases.py index 4f8e26c9a26..5d16bf98be3 100644 --- a/src/python/grpcio/tests/unit/framework/interfaces/base/test_cases.py +++ b/src/python/grpcio/tests/unit/framework/interfaces/base/test_cases.py @@ -29,6 +29,8 @@ """Tests of the base interface of RPC Framework.""" +from __future__ import division + import logging import random import threading @@ -54,13 +56,13 @@ class _Serialization(test_interfaces.Serialization): return request + request def deserialize_request(self, serialized_request): - return serialized_request[:len(serialized_request) / 2] + return serialized_request[:len(serialized_request) // 2] def serialize_response(self, response): return response * 3 def deserialize_response(self, serialized_response): - return serialized_response[2 * len(serialized_response) / 3:] + return serialized_response[2 * len(serialized_response) // 3:] def _advance(quadruples, operator, controller): diff --git a/src/python/grpcio/tests/unit/test_common.py b/src/python/grpcio/tests/unit/test_common.py index 7b4d20dccbe..b779f65e7e9 100644 --- a/src/python/grpcio/tests/unit/test_common.py +++ b/src/python/grpcio/tests/unit/test_common.py @@ -61,6 +61,10 @@ def metadata_transmitted(original_metadata, transmitted_metadata): original = collections.defaultdict(list) for key_value_pair in original_metadata: key, value = tuple(key_value_pair) + if not isinstance(key, bytes): + key = key.encode() + if not isinstance(value, bytes): + value = value.encode() original[key].append(value) transmitted = collections.defaultdict(list) for key_value_pair in transmitted_metadata: diff --git a/tools/gce/linux_performance_worker_init.sh b/tools/gce/linux_performance_worker_init.sh index dc4784262e7..9b8d1d1eb74 100755 --- a/tools/gce/linux_performance_worker_init.sh +++ b/tools/gce/linux_performance_worker_init.sh @@ -69,6 +69,10 @@ sudo apt-get install -y \ python-pip \ python-setuptools \ python-yaml \ + python3-dev \ + python3-pip \ + python3-setuptools \ + python3-yaml \ telnet \ unzip \ wget \ diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh index 4cc6881ef5a..b1c90df824c 100755 --- a/tools/run_tests/build_python.sh +++ b/tools/run_tests/build_python.sh @@ -34,6 +34,7 @@ set -ex cd $(dirname $0)/../.. TOX_PYTHON_ENV="$1" +PY_VERSION="${TOX_PYTHON_ENV: -2}" ROOT=`pwd` export LD_LIBRARY_PATH=$ROOT/libs/$CONFIG @@ -51,11 +52,25 @@ fi tox -e ${TOX_PYTHON_ENV} --notest +# We force the .so naming convention in PEP 3149 for side by side installation support +# Note this is the default in Python3, but explicitly disabled for Darwin, so we only +# use this hack for our testing environment. +if [ "$PY_VERSION" -gt "27" ] +then + mv $ROOT/src/python/grpcio/grpc/_cython/cygrpc.so $ROOT/src/python/grpcio/grpc/_cython/cygrpc.so.backup || true +fi + $ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/setup.py build $ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/setup.py build_py $ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/setup.py build_ext --inplace $ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/setup.py gather --test +if [ "$PY_VERSION" -gt "27" ] +then + mv $ROOT/src/python/grpcio/grpc/_cython/cygrpc.so $ROOT/src/python/grpcio/grpc/_cython/cygrpc.cpython-${PY_VERSION}m.so || true + mv $ROOT/src/python/grpcio/grpc/_cython/cygrpc.so.backup $ROOT/src/python/grpcio/grpc/_cython/cygrpc.so || true +fi + # Build the health checker $ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/src/python/grpcio_health_checking/setup.py build $ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/src/python/grpcio_health_checking/setup.py build_py diff --git a/tools/run_tests/run_python.sh b/tools/run_tests/run_python.sh index 7a3ce6b821a..8059059d41b 100755 --- a/tools/run_tests/run_python.sh +++ b/tools/run_tests/run_python.sh @@ -55,3 +55,4 @@ fi mkdir -p $ROOT/reports rm -rf $ROOT/reports/python-coverage (mv -T $ROOT/htmlcov $ROOT/reports/python-coverage) || true + diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index f7282dddb85..f4582ad3a74 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -374,7 +374,7 @@ class PythonLanguage(object): def configure(self, config, args): self.config = config self.args = args - self._tox_env = self._get_tox_env(self.args.compiler) + self._tox_envs = self._get_tox_envs(self.args.compiler) def test_specs(self): # load list of known test suites @@ -386,19 +386,21 @@ class PythonLanguage(object): os.path.abspath('src/python/grpcio_health_checking')) if self.config.build_config != 'gcov': return [self.config.job_spec( - ['tools/run_tests/run_python.sh', self._tox_env], + ['tools/run_tests/run_python.sh', tox_env], None, environ=dict(environment.items() + [('GRPC_PYTHON_TESTRUNNER_FILTER', suite_name)]), - shortname='py.test.%s' % suite_name, + shortname='%s.test.%s' % (tox_env, suite_name), timeout_seconds=5*60) - for suite_name in tests_json] + for suite_name in tests_json + for tox_env in self._tox_envs] else: - return [self.config.job_spec(['tools/run_tests/run_python.sh'], + return [self.config.job_spec(['tools/run_tests/run_python.sh', tox_env], None, environ=environment, - shortname='py.test.coverage', - timeout_seconds=15*60)] + shortname='%s.test.coverage' % tox_env, + timeout_seconds=15*60) + for tox_env in self._tox_envs] def pre_build_steps(self): @@ -411,7 +413,8 @@ class PythonLanguage(object): return [] def build_steps(self): - return [['tools/run_tests/build_python.sh', self._tox_env]] + return [['tools/run_tests/build_python.sh', tox_env] + for tox_env in self._tox_envs] def post_tests_steps(self): return [] @@ -422,12 +425,14 @@ class PythonLanguage(object): def dockerfile_dir(self): return 'tools/dockerfile/test/python_jessie_%s' % _docker_arch_suffix(self.args.arch) - def _get_tox_env(self, compiler): + def _get_tox_envs(self, compiler): """Returns name of tox environment based on selected compiler.""" - if compiler == 'python2.7' or compiler == 'default': - return 'py27' + if compiler == 'default': + return ('py27', 'py34') + elif compiler == 'python2.7': + return ('py27',) elif compiler == 'python3.4': - return 'py34' + return ('py34',) else: raise Exception('Compiler %s not supported.' % compiler) From 15855f3e7fbf8407393e70dd3c92ee2b0a871430 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Fri, 10 Jun 2016 12:25:32 -0700 Subject: [PATCH 1019/1894] Switch server builder plugin API to something that will work with gcc4.4 --- include/grpc++/impl/server_builder_option.h | 2 +- include/grpc++/server_builder.h | 2 +- src/cpp/server/server_builder.cc | 13 +++----- test/cpp/end2end/async_end2end_test.cc | 4 +-- .../cpp/end2end/server_builder_plugin_test.cc | 32 ++++++++++++------- 5 files changed, 28 insertions(+), 25 deletions(-) diff --git a/include/grpc++/impl/server_builder_option.h b/include/grpc++/impl/server_builder_option.h index 2b7e89f5e5d..f736cab0e41 100644 --- a/include/grpc++/impl/server_builder_option.h +++ b/include/grpc++/impl/server_builder_option.h @@ -50,7 +50,7 @@ class ServerBuilderOption { virtual void UpdateArguments(ChannelArguments* args) = 0; /// Alter the ServerBuilderPlugin map that will be added into ServerBuilder. virtual void UpdatePlugins( - std::map >* + std::vector >* plugins) = 0; }; diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index 8525cb70cbb..e1f485f0912 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -150,7 +150,7 @@ class ServerBuilder { std::vector ports_; std::vector cqs_; std::shared_ptr creds_; - std::map> plugins_; + std::vector> plugins_; AsyncGenericService* generic_service_; }; diff --git a/src/cpp/server/server_builder.cc b/src/cpp/server/server_builder.cc index ea5dfbfe8ea..ff57c264973 100644 --- a/src/cpp/server/server_builder.cc +++ b/src/cpp/server/server_builder.cc @@ -57,12 +57,7 @@ ServerBuilder::ServerBuilder() for (auto it = g_plugin_factory_list->begin(); it != g_plugin_factory_list->end(); it++) { auto& factory = *it; - std::unique_ptr plugin = factory(); - auto name = plugin->name(); - ServerBuilderPlugin* plugin_ptr = plugin.release(); - plugins_[name] = nullptr; - auto pl = plugins_.find(name); - pl->second.reset(plugin_ptr); + plugins_.emplace_back(factory()); } } @@ -123,7 +118,7 @@ std::unique_ptr ServerBuilder::BuildAndStart() { } if (!thread_pool) { for (auto plugin = plugins_.begin(); plugin != plugins_.end(); plugin++) { - if ((*plugin).second->has_sync_methods()) { + if ((*plugin)->has_sync_methods()) { thread_pool.reset(CreateDefaultThreadPool()); has_sync_methods = true; break; @@ -172,7 +167,7 @@ std::unique_ptr ServerBuilder::BuildAndStart() { } } for (auto plugin = plugins_.begin(); plugin != plugins_.end(); plugin++) { - (*plugin).second->InitServer(initializer); + (*plugin)->InitServer(initializer); } if (generic_service_) { server->RegisterAsyncGenericService(generic_service_); @@ -198,7 +193,7 @@ std::unique_ptr ServerBuilder::BuildAndStart() { return nullptr; } for (auto plugin = plugins_.begin(); plugin != plugins_.end(); plugin++) { - (*plugin).second->Finish(initializer); + (*plugin)->Finish(initializer); } return server; } diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index b8398015006..df9a86dcfae 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -208,11 +208,11 @@ class ServerBuilderSyncPluginDisabler : public ::grpc::ServerBuilderOption { void UpdateArguments(ChannelArguments* arg) GRPC_OVERRIDE {} void UpdatePlugins( - std::map>* plugins) + std::vector >* plugins) GRPC_OVERRIDE { auto plugin = plugins->begin(); while (plugin != plugins->end()) { - if ((*plugin).second->has_sync_methods()) { + if ((*plugin)->has_sync_methods()) { plugins->erase(plugin++); } else { plugin++; diff --git a/test/cpp/end2end/server_builder_plugin_test.cc b/test/cpp/end2end/server_builder_plugin_test.cc index 1c1095087a3..cad48316b92 100644 --- a/test/cpp/end2end/server_builder_plugin_test.cc +++ b/test/cpp/end2end/server_builder_plugin_test.cc @@ -114,14 +114,14 @@ class InsertPluginServerBuilderOption : public ServerBuilderOption { void UpdateArguments(ChannelArguments* arg) GRPC_OVERRIDE {} void UpdatePlugins( - std::map>* plugins) + std::vector >* plugins) GRPC_OVERRIDE { plugins->clear(); std::unique_ptr plugin( new TestServerBuilderPlugin()); if (register_service_) plugin->SetRegisterService(); - (*plugins)[plugin->name()] = std::move(plugin); + plugins->emplace_back(std::move(plugin)); } void SetRegisterService() { register_service_ = true; } @@ -162,7 +162,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam { void InsertPlugin() { if (GetParam()) { // Add ServerBuilder plugin in static initialization - EXPECT_TRUE(builder_->plugins_[PLUGIN_NAME] != nullptr); + CheckPresent(); } else { // Add ServerBuilder plugin using ServerBuilder::SetOption() builder_->SetOption(std::unique_ptr( @@ -173,10 +173,8 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam { void InsertPluginWithTestService() { if (GetParam()) { // Add ServerBuilder plugin in static initialization - EXPECT_TRUE(builder_->plugins_[PLUGIN_NAME] != nullptr); - auto plugin = static_cast( - builder_->plugins_[PLUGIN_NAME].get()); - EXPECT_TRUE(plugin != nullptr); + auto plugin = CheckPresent(); + EXPECT_TRUE(plugin); plugin->SetRegisterService(); } else { // Add ServerBuilder plugin using ServerBuilder::SetOption() @@ -192,7 +190,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam { builder_->AddListeningPort(server_address, InsecureServerCredentials()); cq_ = builder_->AddCompletionQueue(); server_ = builder_->BuildAndStart(); - EXPECT_TRUE(builder_->plugins_[PLUGIN_NAME] != nullptr); + EXPECT_TRUE(CheckPresent()); } void ResetStub() { @@ -202,10 +200,8 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam { } void TearDown() GRPC_OVERRIDE { - EXPECT_TRUE(builder_->plugins_[PLUGIN_NAME] != nullptr); - auto plugin = static_cast( - builder_->plugins_[PLUGIN_NAME].get()); - EXPECT_TRUE(plugin != nullptr); + auto plugin = CheckPresent(); + EXPECT_TRUE(plugin); EXPECT_TRUE(plugin->init_server_is_called()); EXPECT_TRUE(plugin->finish_is_called()); server_->Shutdown(); @@ -230,6 +226,18 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam { std::unique_ptr server_; TestServiceImpl service_; int port_; + private: + TestServerBuilderPlugin* CheckPresent() { + auto it = builder_->plugins_.begin(); + for ( ; it != builder_->plugins_.end(); it++) { + if ((*it)->name() == PLUGIN_NAME) break; + } + if (it != builder_->plugins_.end()) { + return static_cast(it->get()); + } else { + return nullptr; + } + } }; TEST_P(ServerBuilderPluginTest, PluginWithoutServiceTest) { From 1f24af879c507927203f11301e6ff2439bdbeff8 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 10 Jun 2016 13:15:07 -0700 Subject: [PATCH 1020/1894] Restricted the check to GUNC --- include/grpc/impl/codegen/log.h | 3 +-- include/grpc/impl/codegen/port_platform.h | 9 +++++++++ include/grpc/support/string_util.h | 4 ++-- src/core/lib/support/log_linux.c | 4 ++-- .../core/client_config/set_initial_connect_string_test.c | 2 +- 5 files changed, 15 insertions(+), 7 deletions(-) diff --git a/include/grpc/impl/codegen/log.h b/include/grpc/impl/codegen/log.h index 9090a34cd55..e5010c29da8 100644 --- a/include/grpc/impl/codegen/log.h +++ b/include/grpc/impl/codegen/log.h @@ -75,8 +75,7 @@ const char *gpr_log_severity_string(gpr_log_severity severity); /* Log a message. It's advised to use GPR_xxx above to generate the context * for each message */ GPRAPI void gpr_log(const char *file, int line, gpr_log_severity severity, - const char *format, ...) - __attribute__((format(printf, 4, 5))); + const char *format, ...) GPRC_PRINT_FORMAT_CHECK(4, 5); GPRAPI void gpr_log_message(const char *file, int line, gpr_log_severity severity, const char *message); diff --git a/include/grpc/impl/codegen/port_platform.h b/include/grpc/impl/codegen/port_platform.h index 7fff36cb789..9640ab60089 100644 --- a/include/grpc/impl/codegen/port_platform.h +++ b/include/grpc/impl/codegen/port_platform.h @@ -434,6 +434,15 @@ typedef unsigned __int64 uint64_t; #endif #endif +#ifndef GPRC_PRINT_FORMAT_CHECK +#ifdef __GNUC__ +#define GPRC_PRINT_FORMAT_CHECK(FORMAT_STR, ARGS) \ + __attribute__((format(printf, FORMAT_STR, ARGS))) +#else +#define GPRC_PRINT_FORMAT_CHECK(FORMAT_STR, ARGS) +#endif +#endif /* GPRC_PRINT_FORMAT_CHECK */ + #if GPR_FORBID_UNREACHABLE_CODE #define GPR_UNREACHABLE_CODE(STATEMENT) #else diff --git a/include/grpc/support/string_util.h b/include/grpc/support/string_util.h index c68577b6269..05cbd3b8c92 100644 --- a/include/grpc/support/string_util.h +++ b/include/grpc/support/string_util.h @@ -54,8 +54,8 @@ GPRAPI char *gpr_strdup(const char *src); On error, returns -1 and sets *strp to NULL. If the format string is bad, the result is undefined. */ -GPRAPI int gpr_asprintf(char **strp, const char *format, ...) - __attribute__((format(printf, 2, 3))); +GPRAPI int gpr_asprintf(char **strp, const char *format, + ...) GPRC_PRINT_FORMAT_CHECK(2, 3); #ifdef __cplusplus } diff --git a/src/core/lib/support/log_linux.c b/src/core/lib/support/log_linux.c index ca04c022e3f..508fae4eec3 100644 --- a/src/core/lib/support/log_linux.c +++ b/src/core/lib/support/log_linux.c @@ -95,9 +95,9 @@ void gpr_default_log(gpr_log_func_args *args) { strcpy(time_buffer, "error:strftime"); } - gpr_asprintf(&prefix, "%s%s.%09d %7tu %s:%d]", + gpr_asprintf(&prefix, "%s%s.%09" PRId32 " %7ld %s:%d]", gpr_log_severity_string(args->severity), time_buffer, - (int)(now.tv_nsec), gettid(), display_file, args->line); + now.tv_nsec, gettid(), display_file, args->line); fprintf(stderr, "%-60s %s\n", prefix, args->message); gpr_free(prefix); diff --git a/test/core/client_config/set_initial_connect_string_test.c b/test/core/client_config/set_initial_connect_string_test.c index 9f47671f4df..63371a6b341 100644 --- a/test/core/client_config/set_initial_connect_string_test.c +++ b/test/core/client_config/set_initial_connect_string_test.c @@ -173,7 +173,7 @@ static void actually_poll_server(void *arg) { bool done = gpr_atm_acq_load(&state.done_atm) != 0; gpr_timespec time_left = gpr_time_sub(deadline, gpr_now(GPR_CLOCK_REALTIME)); - gpr_log(GPR_DEBUG, "done=%d, time_left=%" PRIuPTR ".%09d", done, + gpr_log(GPR_DEBUG, "done=%d, time_left=%" PRId64 ".%09" PRId32, done, time_left.tv_sec, time_left.tv_nsec); if (done || gpr_time_cmp(time_left, gpr_time_0(GPR_TIMESPAN)) < 0) { break; From 08f9a9bbf93cc4b1586167c49da17490cf7983e4 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 10 Jun 2016 20:57:05 +0000 Subject: [PATCH 1021/1894] fuzzer corpus --- .../06eee533524c6723881c1591956edf704e0180d9 | Bin 0 -> 865 bytes .../17fa8e029e35c88857b7abcad88609cf2d1ca9a4 | Bin 0 -> 532 bytes .../1870298c7042983e7716097018a031d105e397fd | Bin 0 -> 550 bytes .../1917c5996ac82e13143a414eb9448f171fdd751a | Bin 0 -> 525 bytes .../202a15693f991889b5fdd97f016a5410778b07e1 | Bin 0 -> 526 bytes .../20a10c9a0c8cc48fd6317000f70070a0b2451e60 | Bin 0 -> 527 bytes .../21357c3613a47180eb668b1c6c849ce9096a46eb | Bin 0 -> 523 bytes .../2372fe3d96fda1dae8846a781905c6c408555d3a | Bin 0 -> 1223 bytes .../2858613c057a236dbe306cca44df29232f6b48b3 | Bin 0 -> 894 bytes .../2a1d70b04f4aba0ec93899485f0807a209a4b207 | Bin 0 -> 529 bytes .../2ffb878075ebb3d2d778c8aabcb0e96cb51060f0 | Bin 0 -> 525 bytes .../30c74b7b5c92bb602d26c3d703c267e288b432a2 | Bin 0 -> 528 bytes .../3396a31b1075465bf358eb7836e6f5347a0be591 | Bin 0 -> 759 bytes .../376f42635e918cc28706b82ad8923cc7401aa9e6 | Bin 0 -> 526 bytes .../3db644687c6a09fae4267f05b63a969f28024f87 | Bin 0 -> 532 bytes .../3f2e5f90e1a93df61a1c9c09b8c9116149eec526 | Bin 0 -> 524 bytes .../521e1e27b0997a0dc168f628e8a0497f7f93ea6d | Bin 0 -> 522 bytes .../5611060a04db105e03cc74da57352b8a09c411e0 | Bin 0 -> 554 bytes .../59db3f98b38747d4a35524c1b3d31b5e90f53775 | Bin 0 -> 605 bytes .../5ddce6103cb33bc58571c8135b620443740e3646 | Bin 0 -> 532 bytes .../60ad6847b1fe72ee81decf28dcffa30ce372af6a | Bin 0 -> 526 bytes .../6245a105123761558a71a9207b3048d2f3d691f0 | Bin 0 -> 527 bytes .../682fdabcfc7243e9c93108d6b2d7d3e920e81970 | Bin 0 -> 528 bytes .../6ad7afcf2d12025faf0e1812ee7a0a5d754620c6 | Bin 0 -> 543 bytes .../6cfe000a50ad8b908b3efa3af94c5df6382ff33d | Bin 0 -> 527 bytes .../6e3d43e98d7be45ecc1863eedfeb85a4cae4a007 | Bin 0 -> 529 bytes .../72160b48e0995ee82f116d77a7fb23a028c10932 | Bin 0 -> 527 bytes .../756d77e9fb9ed9dac1db0b1c8cdcc6e05e47329b | Bin 0 -> 528 bytes .../79975e5fb34f3569b0d2e40d34d6f7ab1bf82cf2 | Bin 0 -> 526 bytes .../7cfe9fd65c3daa43067dfc99dac2814b763b9f48 | Bin 0 -> 895 bytes .../8272e45483cb4cc7113b0ffad71f9218542f9cd7 | Bin 0 -> 268 bytes .../92a87c7a2f2e336f92529bc40deee614dd8b4486 | Bin 0 -> 523 bytes .../a36a34472604c8107353872e77a84873ff8a9170 | Bin 0 -> 529 bytes .../b1e28018e26e6baaba5a907e5e6ff9b7a7942018 | Bin 0 -> 893 bytes .../b4f6d203097dcd1778f4a912cdc3af96ffb681de | Bin 0 -> 525 bytes .../b7c3f40ef32cd843e331fb49521c0d614dfbecc9 | Bin 0 -> 526 bytes .../bf5923216eb069edaf4e135ab7ee426c04d99a25 | Bin 0 -> 548 bytes .../c09288284e4859b8a85421b19d3c6d0109cdab08 | Bin 0 -> 302 bytes .../ca5a1e4fccc55aa977b841d8d67e6991a4371860 | Bin 0 -> 550 bytes .../cd4272fec464c45438dce72eb9381971ed0207de | Bin 0 -> 472 bytes .../cd7cf401276531cea7e4221f249f527f231a5bcb | Bin 0 -> 528 bytes .../d1d35a1d2148c62c6021479d4153e65511b33cc1 | Bin 0 -> 561 bytes .../d29cf6979d8d58b4cb779a629ebee62d7e42fc9b | Bin 0 -> 561 bytes .../e16a0f378b50b28dae4458b795c8c80cf869901a | Bin 0 -> 523 bytes .../ec56dad56975e8279b2b229288dff3bb0ceaf661 | Bin 0 -> 350 bytes .../fcc42c56cb8847716474703b5a650f41dce98b38 | Bin 0 -> 533 bytes tools/run_tests/tests.json | 782 ++++++++++++++++++ 47 files changed, 782 insertions(+) create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/06eee533524c6723881c1591956edf704e0180d9 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/17fa8e029e35c88857b7abcad88609cf2d1ca9a4 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/1870298c7042983e7716097018a031d105e397fd create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/1917c5996ac82e13143a414eb9448f171fdd751a create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/202a15693f991889b5fdd97f016a5410778b07e1 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/20a10c9a0c8cc48fd6317000f70070a0b2451e60 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/21357c3613a47180eb668b1c6c849ce9096a46eb create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/2372fe3d96fda1dae8846a781905c6c408555d3a create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/2858613c057a236dbe306cca44df29232f6b48b3 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/2a1d70b04f4aba0ec93899485f0807a209a4b207 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/2ffb878075ebb3d2d778c8aabcb0e96cb51060f0 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/30c74b7b5c92bb602d26c3d703c267e288b432a2 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/3396a31b1075465bf358eb7836e6f5347a0be591 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/376f42635e918cc28706b82ad8923cc7401aa9e6 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/3db644687c6a09fae4267f05b63a969f28024f87 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/3f2e5f90e1a93df61a1c9c09b8c9116149eec526 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/521e1e27b0997a0dc168f628e8a0497f7f93ea6d create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/5611060a04db105e03cc74da57352b8a09c411e0 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/59db3f98b38747d4a35524c1b3d31b5e90f53775 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/5ddce6103cb33bc58571c8135b620443740e3646 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/60ad6847b1fe72ee81decf28dcffa30ce372af6a create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/6245a105123761558a71a9207b3048d2f3d691f0 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/682fdabcfc7243e9c93108d6b2d7d3e920e81970 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/6ad7afcf2d12025faf0e1812ee7a0a5d754620c6 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/6cfe000a50ad8b908b3efa3af94c5df6382ff33d create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/6e3d43e98d7be45ecc1863eedfeb85a4cae4a007 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/72160b48e0995ee82f116d77a7fb23a028c10932 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/756d77e9fb9ed9dac1db0b1c8cdcc6e05e47329b create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/79975e5fb34f3569b0d2e40d34d6f7ab1bf82cf2 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/7cfe9fd65c3daa43067dfc99dac2814b763b9f48 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/8272e45483cb4cc7113b0ffad71f9218542f9cd7 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/92a87c7a2f2e336f92529bc40deee614dd8b4486 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/a36a34472604c8107353872e77a84873ff8a9170 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/b1e28018e26e6baaba5a907e5e6ff9b7a7942018 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/b4f6d203097dcd1778f4a912cdc3af96ffb681de create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/b7c3f40ef32cd843e331fb49521c0d614dfbecc9 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/bf5923216eb069edaf4e135ab7ee426c04d99a25 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/c09288284e4859b8a85421b19d3c6d0109cdab08 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/ca5a1e4fccc55aa977b841d8d67e6991a4371860 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/cd4272fec464c45438dce72eb9381971ed0207de create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/cd7cf401276531cea7e4221f249f527f231a5bcb create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/d1d35a1d2148c62c6021479d4153e65511b33cc1 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/d29cf6979d8d58b4cb779a629ebee62d7e42fc9b create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/e16a0f378b50b28dae4458b795c8c80cf869901a create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/ec56dad56975e8279b2b229288dff3bb0ceaf661 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/fcc42c56cb8847716474703b5a650f41dce98b38 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/06eee533524c6723881c1591956edf704e0180d9 b/test/core/end2end/fuzzers/api_fuzzer_corpus/06eee533524c6723881c1591956edf704e0180d9 new file mode 100644 index 0000000000000000000000000000000000000000..4335fc754fe2f93b2240c453aac3e9dbfb296454 GIT binary patch literal 865 zcmaiyJ&)5s5Qb+*$7&OhbtR%oKmuZcktjjPCu+JACnSoMEd)}Ro_ra7*K?an?*C-bbDP@YAuI(ep;_3cF zMgH{%DEkYa^Bfp}CHd792*LnL4p=jyU*@0LN%PV#unO_9$9oVG1900|w<@jM8h=`0veNvF{(nou~Ku*O44=?7vF zsp9RPf#&p=Ansj2M~)VjzVV1Th{Cr#gyrM*>jk?7RhB-?eeai!hx+(dC;Uh15SX`VmH z*!b@D`NnNB&bd&6sJ=8*ahEkkT}KPwwO2kFQSFvY-#W|1AF}bf?oKS*hT`CbHf(T` zP?+g4J3l)-)Nu;M5Y5jUCBO+-^xLgwZCS;I}3~VhZbuaT5xgtA6)*y O(+a0;khb7rs(u6XVfrxu literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/17fa8e029e35c88857b7abcad88609cf2d1ca9a4 b/test/core/end2end/fuzzers/api_fuzzer_corpus/17fa8e029e35c88857b7abcad88609cf2d1ca9a4 new file mode 100644 index 0000000000000000000000000000000000000000..83c2b4f3dcb21ba72fb531cd2c50ccace42a0d77 GIT binary patch literal 532 zcmZuuu}T9$5PiGovKJ*-iXbRLNP-5muu$a0Ul2sFILubZQm#gE|2j(J^C3lU_R*)rWe$ei6G;-;{PB=cpGE<-H?NzfGxqc* zBW6%}=w${kr`xEIM!ALsENTO&x|4H5>A;tiMoD}_(XA|s2NxNzBvpe+Sp{916bOV|dD((`-eX$_yTay54N5L1GRIT| G!UCWAgOOMO literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/1870298c7042983e7716097018a031d105e397fd b/test/core/end2end/fuzzers/api_fuzzer_corpus/1870298c7042983e7716097018a031d105e397fd new file mode 100644 index 0000000000000000000000000000000000000000..42a78f4eb62a8e09c4e23fe66a70036993a6f404 GIT binary patch literal 550 zcmZuuu}<7T5PiFX)%rju%7_YrAl!*uks?T-$PooUfP|1zSjIPS7KiT`uYH1+Q-t^z zS81-J$#2lOA*m@Sov{y!NQ}0aoq2EO&5XVx&WT|wt<9uO)^fhxty&r;|8aC+$=~{> zO>45oY5PiGEWiQHMDOP?!FhPTbT14c)zaRv`;y9B*4`YmTmkZdMLi{gR*`%}a zZ`fR;Ru=w%buLjsblBqU&b)au`*cE_5yLvI&B!NfIooKwS2av_a&%}Zs2yli9R*V6 zufTxZGiMr#p^X6H)airUGa&5tM#IVZy8lf8#7j_HXFTXM&(n0U-HiKj8b`e_q3a>_ zI~4YZm!~ol1tQ?j#^O@@hqKc>A4HvtFpW-o6ejTvb*XdJ6;4wdN*+i^WV3t5G^#mN zYfk&7K63OT8xEnez{w6yqERi8MzMlO*x8Z8 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/202a15693f991889b5fdd97f016a5410778b07e1 b/test/core/end2end/fuzzers/api_fuzzer_corpus/202a15693f991889b5fdd97f016a5410778b07e1 new file mode 100644 index 0000000000000000000000000000000000000000..70df23d052d4b4ba1b6d93062f6711bbf18bdaae GIT binary patch literal 526 zcmZuuF;Cl25dPi+o}N<_F(M`cYScuK0VIYXFJnZfTg}>*>gn-#yW$ zHS-15-i86yKe^CQ3~j^_PLH1WZ0QL5OxW^XWBF(R|MLLxCe;1~r_tcjx%6-lC$Wpe zNs!S^PDw;Tl3$;HWRNfQ9aEB}Q+Dzl1zG%!#uQD*GR9zJ zD0?93PPVxJ%n(~atArY^>9*<3YWgJ;=1_%S%M7(xztwme)iyq0T^m5XsLQg6bl?ke zK@wh5FqJ)VJkEg)sp`$EauuHS-uUllp#CzpO?VqTKbP@Moqg*K?}b;Jnh~|AA=H})N8KT Zg?b#aeF=^P&5aIJT+TgVqCObPBSaLf@ z+B6$m>{7OX0hN!OX()y^;s~cp&pcc^!XEAjUEaTdWGY0RsN(?fXQ=NJo(KK&B$@B_ z!zfHbf9l0_nNk#x7o``YZ3em0AYng>=QBX}XJ&o@B%nDsxL2q7>^jDo>->!bg1422i!SIG#!e zo>1aN{snn6Srmuk6xfui&a%ii;8^FK|NkhIfV;2?8&dp@sEuyXs(t#^w7%iS`9l=5 z{#~rkkX2^@4sQz|N|1}@57F)R$}bPBip`~csWwdYx%6MrjFQ@GK`S@kKk3{_AA=l@ dz^XHLpdJp`?pL2ZL35=81?Nl0VkOdGfmdbpmFoZi literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/21357c3613a47180eb668b1c6c849ce9096a46eb b/test/core/end2end/fuzzers/api_fuzzer_corpus/21357c3613a47180eb668b1c6c849ce9096a46eb new file mode 100644 index 0000000000000000000000000000000000000000..4ed1578c8d3433b2b93b85cbbc3f2b7f8b728ac9 GIT binary patch literal 523 zcmZuuJxc>Y5PiGovKQq@DOP?!NP?yiw1~)oe?btz;y9B*gZXmqasgXYi2uamDw}jR z{tcUJ)XKsiu+Ak4iVj=M?z}hiW}l9UQ({=BwHfjDg35t5rEwrI ze+>rYo;lS}3~eM4PK`eJc%BIRxLS8|zV3eu0Pzac_Bjt*jf*51?le06P7-y)n65_D zZ&BDE_0B{R1=8Q2tKwqx56ZFQ1L zYyqD2e&zqaLJ7DAtFR!=zlqxDb((ITY?$>e+<31 J!BnAXflpKgksSa4 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/2372fe3d96fda1dae8846a781905c6c408555d3a b/test/core/end2end/fuzzers/api_fuzzer_corpus/2372fe3d96fda1dae8846a781905c6c408555d3a new file mode 100644 index 0000000000000000000000000000000000000000..d29897c239f46780ec113fc87a73ea3862e30bfc GIT binary patch literal 1223 zcmaKs!D|yi6vn?9+hI1!(s~jP(pYHIpb>lUkRmI3@DC_0f`^c%k9IXp<0RPyPl5|d z!J8+~dJ*>ICE%eT;y+-oUiPBJo1VnO`erw&n;P8YFgrUl@4fH)y^%dK0U792N>@>+ zwFxTKv?QT|`|Gzgc}q8?Duo^|a~GgM=@%172m`4CsX}*!ewxjEz?(ODGyg~LCm;H) zE>1oIWG+Bl-7(!(ZMWa=uGajH-}jsCMvop1sMDfGXRx=$X_3dlTzeX6W5XBr>~@>2 zhmC%7t4)ob|CqL^wZF}KYEn_}9q}g8!KYgW*;9%k>a$$qN|@4D6AT~%FXb{)eySxq zl1LVC7U!e_L>8#mYjXgzL;XglxkrtCmdg0s17MC1b)qDmfuo&?@$^{;Uc3S=FvEwB zH%cYTG+exQS(UHgsq>AfXXMAcTpd^=fcH_-gy5B#27y;iFCH3^%tdTjt_!b|$DA`# zTI7T(+8KKB>iW`ij-wF6;bqpyC5Xei(V_c`yc?Krc74c#{n=sGe#QQ=|Dk)zfB6pp z79Do-f3DQn&diqb_hnHw5%3JDhIp~T3{~Z|D3NKZ*C$Lnm~I;9Hr2HsxoaZxxghj> zYq#0yQ2SJsml!20ZC>L9;nOPwBBX}Jd>tb(aT0UM$&nh_l%2(%=Jr%Dv$eou;aZ@s-vV>zsFWh-x zf;D%+BFN!}+^kZk_HGdw$Jwj|I#jRw_V&mwo{CM#iLso^z`}CgI6%qe#)J;MSBS5V VQC@?NxR4=t5i~5>d~w0f`~l}yQ;q-t literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/2858613c057a236dbe306cca44df29232f6b48b3 b/test/core/end2end/fuzzers/api_fuzzer_corpus/2858613c057a236dbe306cca44df29232f6b48b3 new file mode 100644 index 0000000000000000000000000000000000000000..8f934748e7c12b129d63286aa3aaa9654fe5de77 GIT binary patch literal 894 zcmaKrzi-n(6vy8^mD4#Ot0Q7+s1%3=K_J0Uij4RdA}S;X%W+;?i^K_M$3d*M1VZ9Z z@x+oX3llRdix-L*85xduc8Ux{oIHHbe!uSfIb%vXCk@IV%B4$6>HMZ=ItVg$11ac~J;*Qp%0$`V`Iz@H31CDYUT{haOHlhx=(4wfyJ}3b@T$^Iu>zscHv%U+ZXhH3aJ&}@2=P?QBDrZGD{4yGyOUDV%i6aa6)C=lM+wlB_hV8SfZ6|=C{l?IhU)~?~-tt!oB{)33y}msV>jSOo%>z!}yj)khESLyS xXUl=z)?gUIIsL{^{|y#H!Jt<*Ue!RnjX7-C&+U$JtM+7fTa#(UW%%B#egP#Z^|Sy0 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/2a1d70b04f4aba0ec93899485f0807a209a4b207 b/test/core/end2end/fuzzers/api_fuzzer_corpus/2a1d70b04f4aba0ec93899485f0807a209a4b207 new file mode 100644 index 0000000000000000000000000000000000000000..a04bc00691dee4bd365a6b76b142eb1cf5160893 GIT binary patch literal 529 zcmY*WJxe4(5PjWvP0xBPhGOIgF79$}V4&b4BL@BfK@JRtakkLGb#|@!SiJN^#Q!pp z$z~@04U57&e)?=v8o3Q;HOI6yoPwSK~*pnIAmqm6DD zg-PfSyqGRhiURVY^!#|0L9R4N*pK4TkP}G1(X1BYH+8R03_7B}O?SJEvo@B-pDsxMjq7>^iDo>+W#4LVl1E^YF91o-g zpHSjO{yCj_Ls=Dv{S=s!y3SRR&%m+HH~)Y1^;;N9&}~?S87cq8)J8ASWaam=S^9;) z&NETW`k~sLtSpmD0KMzNhZ5kpxi7-qPPuT;s#na}_bIMAn0^t_C~0LXXyWEu2dx`v gW01p(8d3xsri`^DD<Y5PiGovKQsB6sxEZOwb?}77;n{F9;%79A`4!xpo%@6Ei~rxW6w7}jZRCO%oq`C8|#p<(i){XI)TYge1bBoLV2 zgaNrn&NUQ68%c!IrguL0N`!r|)^T#a?|mT-#?dfL=rW^G zpGMjFu_(#{Y41y)C$d~m{y{k%NBy%fjgE&DCh-*wsDCjKPFEXB?np>v^IJw8jS{Li zt9{d+IC_@#GN?RovVfE5H0lgh6LXl?22h`4l4L0D`GnGN6rEFeA%Dd2AOjYprB_tt z3_R=o%KxuI3AhcbYAvd$XMU5l(aSVlJzO!%>$vt_h!WNhqTNz%eR077J4F>i39`0^ z^PuCF?paj}h4}SpSM8R572R;O`Xy=_l$-ml8<}fR!mD8|v;wQ{du%7ZSh_7}miMXz MmxZh`Rp?pZ1N>fjxyxm; zT7v==Zww&}q+-CN7HM3}(oRFpgulSpSz7Y6HP=Mdc;Syioh zLGPS#29dc1hbVZp?Gj0>YS_h|RDf73CCQi-%#czq@+ag?`KL@cm;w9T)mp6b3M_5? zz`x%@aB&M-pu)|!M5$z*mW^wv>c@DnK8O+{UpIMmR?Y$F{ukQWrv7BlD5$Y9v~=^s lUh|Q46mnQRqH>N+h?g^?*N0QCHl+`&OupaDhX&us3Ce=BuY3We<~E&%sa<|Z>^9yAVm#+n4(q?qAIT&n>zU9BNpp71LXA!F`MpIOgBmJ&LV+HZj(-T_4OB69!pTXD2L427 z_VEDH+-i0+-rZL-SJwaw#w*vIgJaf9n*}$vLhC7k<;NaJxvK8HEh2K@F9;%79B1;-!x-bc%LQyrA^yu%HtB5q z4V!D!%EAv=-z5r)E?d0aoq02FM<>J?F|5oM|YAHc|+uNgsSPFNA%x(Q>lC&VL^O;uWZ^Gah!^=V?0JZpVW-jiY{;(Dfb- zx)csZm#5;10uk`%wz$;(!8spB-HR}dPWu!l@eTE;d({(8TN_FqNJwO}d&X>4bEwXO z_Dyr_=tU+RL1lrH8Jw(EwX8IX8Wypn4WMR1NzxYqKBF`oM3)p^$v<)28v)DG)teM~ z1)lYO)&Ji@3AhQXP?6@}L~ZmMP3y<&W^EI<-YZeU`e{C{%_Ic}>`jUYN|0qVoCPhn z`pBwSo=9G^xXQHjn|Ow!`rObo$afAKccNpE!z*D8Gy-p`bciB<00~8+I34E^oG@oI_a$g!MTq}$ z6^%QZ{0*9GAZ3(-@|d%eB2rdcjAq_@^JYfh5a-0OwbrI^$y(002X$M+aFF!mF=$tVuVkF)FZEe3g_pK=f<(+Q_i4l|C@TQr=@X%JrdX>dL!KZ)*WMB!v4 zV+@ZCC66S{$>tA7jKyo0P=_npHT_>jO)oNH29fi%DY6GZ+y(Ae+ z3%;P#kArKv@+Yz>jz$@+?>suI{=@)R{@kD3-^l{_XhR)6RT=Yxj9XQ-CV0VIbZj`1%P-FYU7yut@=rl^f&9BUMGpVVN4eT z>OHn7>nWLx`{Ytbmij^7&NzfF677;n{7X%S3j!W{;V2ttIvOsA5 zIt<9YaH^pg+6WL$gFg9q4n%!iZ#voE-!jO2)3Ee20Ekziw$FIfZJj5{Xs6X5_LFE3 zKE!lAreT-D;rOy6nJ5qge;$iV?_ZkpQPjN%lc+PGFz(+_kGfYq(X_Oo_>n|JHoa%e zRwajOFKP*rIeN8RA48>qlRG$B%}R+higheuSsOsjjN*7827E?IIE*eSypng~es2t{ z$f@3>$QR&Q?+^a}FO-lQunG$^Sn9OV8#Jw+Y?_TN+{rQann998FWra``YRJ#*Llfx@nHPiyDp4x0PU;5k=GRwHg N!TCh;PZio0_yUT)k*oj! literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/5611060a04db105e03cc74da57352b8a09c411e0 b/test/core/end2end/fuzzers/api_fuzzer_corpus/5611060a04db105e03cc74da57352b8a09c411e0 new file mode 100644 index 0000000000000000000000000000000000000000..cd30ed8f27192d2984033bf9917c90894ec678e7 GIT binary patch literal 554 zcmZuuu}<7T5PiFX)%p@yl!yv~a&V{QiWDFbMUE)=0VEVDg=KsLXXWr6q2MQaWQ_D3CJRVs_@un>RE1nz$f_ZL~I}Pu6m=KWus$rucYzY=d`w zO{Q0FPn?^BDJXmxP;<|PhGJ+VjuZ~)H=nH>p*Y(Y4tf6ql4%iLqKgB>n|OW6^LW$} zzZoTI;*w|@W^|oX8dI3&SLZJo6bQfLD9z?Gc9M>BPTURJn#nwlKZPzjpHi45pJ`0- zY%H^kjtyl$NSc!^zQ1R5)~le7*0pa2WkU}#W)4*Zjm*%94STJpQE%fJo@)cBPF+)ZZP#{UA0{h%`d literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/59db3f98b38747d4a35524c1b3d31b5e90f53775 b/test/core/end2end/fuzzers/api_fuzzer_corpus/59db3f98b38747d4a35524c1b3d31b5e90f53775 new file mode 100644 index 0000000000000000000000000000000000000000..46274c5b74cf173f2f7384d89eb7b6d691821fbf GIT binary patch literal 605 zcmZ{i&q~8U5XNW6x@@Ziym@R9Y#T8Zj}?jd3Zdr^+o3IL4VyHDqvYg!_y!{8 z;=xA{Tqn(;LhGJ3nSa0ezQu@iLK>7ol&M8Z>7--x2c({~E)}_l=O`Pg%V}seK?1$; z4TJ`iW#v8yG1lSG3H9_g(D(kFJNm(xW-;h8fBb)#t0r+Ao;qifFc@C@ad34*el%T> zGos<$h`Ah;6n(r9!;wm!E_f{PY2+aK+i1ydYUq=h=O7Z-FqPqBH_97A(S#k?MOjt= zY~gCx<*MbT*pp!Bz&-JtM~(8;;ypVyB-(r%krf~^0R<1wp{^hY>X$M|9;!4d&%x+O zC#s?wtU?Jb0c3hc?MhG(z`Y7)LJsEdP+us)e}0T%vNCjBLx~kik5O3O(vFH|F9@gb z2Y+RiTzbW+-bSy?npvY5PiGovKQsB6e~XHEfhKNF9;%79A`2lhcU*vFR(R*Kg9Mbn{+nf zzp%MRt*xxixkN$HVT;+__vX!;(GhV<3|ngL8p^EYbiG;DG)#JWbZE(|?`u=bJb}5( zFrf08Qw_z?MiP^`4SMI}X(H@nVaxft|NQ`n7oj%0JZ!gmaXj2=g@Z5-gT5cpRYHR{ z`Ge%*OnM?u1l+0;S+2ByaC*a_eeTD>S)cqUyrvGdFFV3%X+zOHX_JsmpAHyMsG^ob z?aqqDMmHWc_>DfS1!1^JgUD-JseupmX9 zQIXHUvCgmj|5qphH((WJr1&>c8@)o~wUbq|vVj}tl_=tM{W$e((`psK-lzzm1UeZ+ z>NU%y2Uf+xNR~Doj^Om0G>wwhrX7vFeEX<=D?$c29D!A@*ZZ8>da?H|d=ZriqXbge>Rl{`UhQUWD2>;X$W;nx=!zcHEECIO>H7T@I<= zp|C$ZKbDp#5Fx*+M3yV*ADq)c)Hw^&=(tB=5?@i5Iu~8xw6&q+j)X+kJ?%0kQOlvW zXT@JLE9r&Z5XuFmSSTf0wJOsn>X^g4Hh`K4B}q>N_=M81ADvTpA!FjWI|LS_s5dI| z8F<$FmH+<=CEzBk!i*IECTgRXX}o&4VwTr&?Y$ButRJU#t*e#*+>eR~N|2KoxS&-o zJ+LYkMzXHyTm+}zq-T`0Dh;h!Zye;C`;8mXG05QwtXg6N>S3F0=6_JIC1{ra+Z+Yw LBk?en-e7@GBN3C+ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/6245a105123761558a71a9207b3048d2f3d691f0 b/test/core/end2end/fuzzers/api_fuzzer_corpus/6245a105123761558a71a9207b3048d2f3d691f0 new file mode 100644 index 0000000000000000000000000000000000000000..ea9e457b77825378c4d695ca3610a8bce5f5409e GIT binary patch literal 527 zcmZuuu}T9$6r5e+vKQsB6f0vOn4l>HEh2K@F9;%79B1;-!x-bc%LQyrA^yu%HtB5q z4V!D!%EAv=-z5r)E?d0aoq02FM<>J?F|5NpUb zzXk(x&zxx}hBi_NsYxGvG%tjHw9#_1zs`Rj0OA#>tur2W+vjOI+-}E%IE|xzn9%he z4Z0K#Mwh2ziUJYv=f1eq{=qpPM%{}rjZXU%Ch-mRsC(5DPFovF9!N-JvwOyDRdcA$ zg7!^w?C3>C96@D)lNp?>R<*1&iZv`^NgF`Tgp#B$0(?ekIEXGOypoUNxHkfprK>k7 z@(Mib{i^@Jg%WTRR-q!zzlqxD8cplR>!!AeTkn-9Vf{28*Jcuf1NJ6G1SQBa8_t53 zTYY3zEKek`Szcva`b|8;QGIS`8ss~NjXTjX$l;Z+1{#4?j~%vS-%_wEXfA!A;Cvz@ JOvPHq0-sxSk+A>( literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/682fdabcfc7243e9c93108d6b2d7d3e920e81970 b/test/core/end2end/fuzzers/api_fuzzer_corpus/682fdabcfc7243e9c93108d6b2d7d3e920e81970 new file mode 100644 index 0000000000000000000000000000000000000000..0138558e443d6a02a89185fab33c76dcf79da57c GIT binary patch literal 528 zcmZuuF>ljQ5dPj%czO;f>WG+5;WujHh*1!xZo5Czkxt zYi+ulK9gVcU_kX97aEG8jX1)Y&@VpSJHkF43tiryfMgm(n`q+z@nfiGOHQNNxpV3B zS)9Z!4p%`&S2-mS1xbE+cEliG8aNJ;xttiOi8(L7b zUdSA?6GPb-lI~=S&un@|cJ(4z8nEZ_N zs?uENCVwN1n#5I#{DAf7WP<}4wissKn|ZTO*TkL}HfU{DF6MYF#i4NTTAKi zjW&Z-DzNwf1{8j>*H8>?BoWSt{_Nr7LNc)%0;mRY6&`ygC<^l*-Du7s{QQN1V$=UVO-0emf9Yi+zC;xvHO28vng&i6GK-5Mb(&qTxkvV*h zFVSzJn)Q$VT|{Hxst2SUgSy%+hWfaI=;RHtHKD7Ptc~t(k}b literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/6cfe000a50ad8b908b3efa3af94c5df6382ff33d b/test/core/end2end/fuzzers/api_fuzzer_corpus/6cfe000a50ad8b908b3efa3af94c5df6382ff33d new file mode 100644 index 0000000000000000000000000000000000000000..56618545ad856afb2590b14b3ec5a046df93f813 GIT binary patch literal 527 zcmZuuu}T9$5PiGovKJ+!6strbn4l>HEh2K_F9;%79A`4yj^_?u?B-)iC)5z;s!KyZZDksJ9AV@;Kq$C)IHx%5;M{(3212yUD zP4jFCp7nm^|KCChxCN`QB+X0Wv-Pym4VrD9ZJ5S39=s2tnDy&oUz-*-00+}Ngc4-o z4X1wFtGaKSeVfZ7u}O{A}-}`6zP?GI#XW4a literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/6e3d43e98d7be45ecc1863eedfeb85a4cae4a007 b/test/core/end2end/fuzzers/api_fuzzer_corpus/6e3d43e98d7be45ecc1863eedfeb85a4cae4a007 new file mode 100644 index 0000000000000000000000000000000000000000..38e2e33721a83950441d060d5073736d3ba768c8 GIT binary patch literal 529 zcmZuuJx?1!5PiEMt34B0lo1sU!iufnB8n)8qC*t<14sxZ#pyVY;Dk9lv-cs=#zKf6 z!9Tc)#vKhUKY`{NNKKLQn6rtZNLg($GyC4mn|<05=ftqJ)~0BawVc1}*DVc`f7{!= zBES1tn^xfqti1*Us_!}1Pz-G(5KfPtcz+QHdtcacUvhb90DtQM@f)bkBc4Qq<20Ro z=nUc{PUCPCxbS;MNkl=CogQv5$d>^rhl!hvISm{|8OP}vg!FZAJPD(dAPo;k6u9^Y z4JjHAWs$+IA$LvM+!bW=%N@r2v`VP$SGsL_MNJQ~WCoS{wX9Lg>9?9lqgul+A1SXC=i`+EUw4AZ|vGiq922%7oj$Gz@_ h%rPk8iAh$B>_Xjavz;efg62jCDlVs<#Z08Z0?!Qwmizz! literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/72160b48e0995ee82f116d77a7fb23a028c10932 b/test/core/end2end/fuzzers/api_fuzzer_corpus/72160b48e0995ee82f116d77a7fb23a028c10932 new file mode 100644 index 0000000000000000000000000000000000000000..be6505ac15773ecd65b720ef463f95b9d92ef647 GIT binary patch literal 527 zcmZuuJx?1!5PiEct387(mr*LfiiNGjMG6;2(M1&e0VE44#p!$=!4doH%zap-#X?d3 z%T;OI(eO8Dt^w*4DUUgu2q7`rVrKTenKv^!CeDaqORdeKLDq71&@Jm4Ci`}BWXWxR z(Wbs|1=iSw0hM>0X()y^;s~che|flZggq3tyysXxD!@w~Abtn+>5S(=?>tH7pL<~x zCZRv^V)~I%6p$CC)6oY8xl%u2KZ@rwPUJgCIZQ55an9#{@ZC%N(S*D>{7GX9W@8zn zcVrIZKP27BX1~8O)>hA<23xveI*XF-Wx^CHb4!__6zkS2PovnyHg>cD)LLB}Pox8% zQQ}4Zl)RbjiNkRUG^MJuEb%8*c&O!;e1FKMz;{S=-=sjAsPWR2;M_f4%L^12z zYH_l!thxelcwP7k3%N$)SaiGH^8F2~qPevHHo)py`cX8aq}E2z%FX*H?O)QzAcrIM csw=jkZU$`EL0`~Z=|I8x(y>_C3k6u<2@xKZVgLXD literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/756d77e9fb9ed9dac1db0b1c8cdcc6e05e47329b b/test/core/end2end/fuzzers/api_fuzzer_corpus/756d77e9fb9ed9dac1db0b1c8cdcc6e05e47329b new file mode 100644 index 0000000000000000000000000000000000000000..e662e294a8f83b66da85cbd0c86e38fa21ffb211 GIT binary patch literal 528 zcmZuuu}&L75PiFX)t-YaN<@W&uwsk2h!6z`9iqq&AR&|#r{g?=6Xxv9-kk+47D9YP z{@|)K?r8W8nrnbM1?6SVP81=6CyynKcTiokiU=opD7^GGhjn`;|;liFF&br%|rq1D3P_)J&gq z1L?r0lmpM?@|2UcN0ivJ^OqgymxKmKT1o4EF# zi5%;PdUdj~yuJgldsBu`f*d!$if+GKt=_XLmnZgh4y^B`Uqmx1TAvG=`o-2^`&RlG f6!4^;l{>bf?swSEf^9)_tpg<&6VGBQ(qMr<&+L{j literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/79975e5fb34f3569b0d2e40d34d6f7ab1bf82cf2 b/test/core/end2end/fuzzers/api_fuzzer_corpus/79975e5fb34f3569b0d2e40d34d6f7ab1bf82cf2 new file mode 100644 index 0000000000000000000000000000000000000000..ad1b3b317faaec854215ed68056d0a1aa863eb45 GIT binary patch literal 526 zcmZuuu}T9$5PiGovKQsB6sxEZOwbe-7J{7k3xWt1$C(Uz7-O8f?18N*{1Dr#YyuWG z;$PTYqt;ed=Uk$o=&;4??tAm*&FF;K5yO^R`-U=W*{!w8nuc*l`+Jsx#*Q|%ED)Gq zhXIw(>@*ZZ8>da?H|d=ZriqXbge>Rl{`UhQUWD2>;X$W;nx=!zcHEECIO>H7T@I<= zp|C$ZKbDp#5Fx*+M3yV*ADq)c)Hw^&=(tB=5?@i5Iu~8xw6&q+j)X+kJ?%0kQOlvW zXT@JLE9r&Z5XuFmSSTf0wJOsn>X^g4Hh`K4B}q>N_=M81ADvTpA!FjWI|LS_s5dI| z8F<$FmH+<=CEzBk!i*IECTgRXX}o&4VwTr&?Y$ButRJU#t*e#*+>eR~N|2KoxS&-o zJ+LYkMzXHyTm+}zq-T`0I&EkixEYVL8s+okik=wc{XKEP;^t zDXwVJrJHL;wItVg$7>S^Dhe?t=s}Uv!QjG@xXIWBT+{pEL$XpKvsPoBh8R0Hm*hxO1lG(cnDG=Jy71 z5@&HZ2~v8opd_LoSxiUV6Zu@gZQ9bd_Me!;!TCIlo(EYtnoy9&uV_rsY|JqOl$3rT z4kDGmd!(UWof5?HC3IzfY3M6IaRDOt4L`#0@;cT+sP^G9TtNvS>Pl%k;R^bUvLFek z6wFvC9gi0PA!l`ps@wxdIXiayDF}A%gA%aE$u9y?VwYA2pPt^3-P`cm`9_p#{MbBL z<(31$gQ5ySu&afm5!-no^IE#QxUhv6YcD}mpKH`i+M?Z-IrlwteXT`xwcv@k@bd7x ztN~c~qHH)!!jcl#lyQrg~q7ie*m@d z`HKz9XVqgR}Y#TrKwb literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/8272e45483cb4cc7113b0ffad71f9218542f9cd7 b/test/core/end2end/fuzzers/api_fuzzer_corpus/8272e45483cb4cc7113b0ffad71f9218542f9cd7 new file mode 100644 index 0000000000000000000000000000000000000000..0da408ead0e7ae386007215a5868303174bfd835 GIT binary patch literal 268 zcmXYsu}Z^W6ot=!u|H{*pqrDlQ`-y?9JBZkB2E&LdTE0pgq!#mItQG5luoWbg`0y* z927eE04mo+Jllcu9nLx0lo_aEaV+qZ$gX|%JaMzdDk%!i+731ij07)xTPG!U@6l@xT@>&EX>Lts*^P5xXL#FU5A1%Rh>+BQzH#<4;{ihT*62| zr%g+$X-F5gdhBMf=lU-68f{^s0r_^mR(|i+-NC$wGtcLWpJ1d$2oc&b_HjUiKLn=v jeEOclGuT6C+U>QE;Rkai)R4XEUphAn6d)8FMVb2rrL$3J literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/92a87c7a2f2e336f92529bc40deee614dd8b4486 b/test/core/end2end/fuzzers/api_fuzzer_corpus/92a87c7a2f2e336f92529bc40deee614dd8b4486 new file mode 100644 index 0000000000000000000000000000000000000000..4d31488b22fffdc8baf3c45c70a89e6d64f31237 GIT binary patch literal 523 zcmZuuu}T9$5PiGEWiQHMDOScnFhNsTSVZK&UkC)j;)rpG2T6=`m&*ruh4?R5*`%}a zH*Bs^D+@nholCR`I!rOU``*l(eL5yiiD8}AX6}=Ast|VXpyecg&VL^O;vJ}?Ax{VGnScJVoMu9EvLlsC`=+AQW8%3V+wEOn>f0j0o&5m%Zj`L&w6Y1|F=*AZo(>5 zr1>vV8(pJC{bJwL4sq|j6UD4wR_oeSOmM(yR`j6+SvtdM&~m%atcvYS>{_~2nx#KP vGaS`df)+vEZ9E)jsxUdc64gK>ukv{(r7 zBlrhb(YQ-P%TJ)WhES)VT;}W~$~60S=grKUecBP1#IRm#Q+3H&E_a8%qhZST$4B2O z?7z{bQ-wn7Zoz>3Z!R?yLmL57GoV{OSplg&*&QlCl5Ik+dU-D2y)*`hpF+Jj=UFnk z$n)8LZ?Zm zQC!iaOLG-9EsYyMl#~?9tery%M66uQuIHbb{lCSSI3)&S5%s)5#&CMuvvmZWKJOkI z@>`El*XO>ZHTFOQ*)N=ef%>A+`{1W`Dq zU?M*8a4-Ydm8!L@$akP-Y8&zPQ&5uJ2BTm{ieCy*W0My9pPt>+%>#H-`$iNqUQ`!0 zslx#9C@VrxlIqwn;&xmpxaN&xbFoGXOI#bYh_7o<#pe>VaCTtVT~2+^-dM6Kb~AYo zmsuWu*QNgsy~-;LLjAKZf$Ukmn0B^w>P#>PkQ}OU_R-m<} z`yW2r@ce~F+;eN)O#n;#6^MnOA9h>s(9%YySvfXH;N s9Jp->bdv(72Ni`(KrdXrDS3D+bHuP;+Z~fu>yzDEn~aT=k$1EB4ZoH4kpKVy literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/b4f6d203097dcd1778f4a912cdc3af96ffb681de b/test/core/end2end/fuzzers/api_fuzzer_corpus/b4f6d203097dcd1778f4a912cdc3af96ffb681de new file mode 100644 index 0000000000000000000000000000000000000000..5804a7632a2052b25a7f24e8946a0f376f520142 GIT binary patch literal 525 zcmZuuu}T9$6r5e+vKJ*-ij`3a8Z?EVg(4^ZLLdkh$C*6zFp2Tq*5L>_FDw}jR z{)WvpYV8NC?=ERXmn~*@XWpB)qhsQf7}jZRCN;8_)9t3KYMAt*eP+pToM=;>_(H2~ zz<}I4ry7c(jR4W?&^LGHK-3*k%U+!SJ^;jPPb9w8Dm%q-KS)Bpq9hoG0}5{Cqd4k~fmNyM zP4lb*&w9V`|F=*=hE=FY?Naw_J#BQIW?Sc*roM{@?~^EI{Wc%hrbP$?4aFvls*O-JfRgSHlSXQ*iHl=3YkksIcHND JU?$FBfgke4lWqV2 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/b7c3f40ef32cd843e331fb49521c0d614dfbecc9 b/test/core/end2end/fuzzers/api_fuzzer_corpus/b7c3f40ef32cd843e331fb49521c0d614dfbecc9 new file mode 100644 index 0000000000000000000000000000000000000000..4b010f4f224bcae10bca8dc1f1e303633f0574bb GIT binary patch literal 526 zcmZuuJxc>Y5PiGovKQsB6sxEhP0%2M76v)-F9;%79A`4n0`sdd zpz@hB4aLw#60_>p>79=px$f9U!j_{=%iZPU?>j&|54CZ|{dV&_P5Yb8xEH5!)D085 z9#F4MVQ+AGy27A9>ib`+*tP!UY&FmOQTrlHqth;hNqj>cYF~9^jOKx%2NDk1?0%my ziAoN&JFR_FAC~kY0}i0Fpp+3xiAKd`8buW|nAHYQlSWC>l?Hr9Y1oS{DZG+3aoiaI zbIO(VMnyga&w79I|6id5T!&SdlJY-9ZS*3Imyegs;yP}-O z&Ku5xM!E3Fs+b$ukMGS0PQQt2l(hUMXdL9*hqXKDW01oWXPk{SsK;Hllgo~v+37&R M`N*>vi!@l^6X;}+UjP6A literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/bf5923216eb069edaf4e135ab7ee426c04d99a25 b/test/core/end2end/fuzzers/api_fuzzer_corpus/bf5923216eb069edaf4e135ab7ee426c04d99a25 new file mode 100644 index 0000000000000000000000000000000000000000..f1363ceff82bde94b6194e1c39c39840dc8d1ced GIT binary patch literal 548 zcmZuuF;2rk5ZqhB>0*#YNtu8INd%Ul1R*1SfRG|23d?a;iA55^**;6Oq(J;76%7xd zqNb&B13eEgdkI7-a=K#Hx3lA&!GyFS4XQ+xxl2lE(`c0rf;2Z*7mED7Gn7v5bDLWO z2~>V+gCI1ZWWbyz{pj`_JSp8~Hs5*8odwLvs{WKjPdGRPt<8Tlp zbf3{EqF|H_JN!@N8+0w7l(y0f%CXlUhtX}2hMfTgN&G-vitf5h@sN@iVh$j&^y{U%B@zRg!w#s&d! zIw?XB+&c3CadlwGf#vRUUi+NRip1D`38MIz+iDs%Tx*y$+4xpa_YU6vn@MupzAybaRq+YMUXVV-|e}kxmklcxW%i5O0!O=o}CPAElG4PvPd^ z5(fnbA3)`LL(X)D-}mR7gH0hpB`eJet|4;P9=op6vsIkuoJD07r#De@B(rNvX!6Ez zz~=2;X$pk`IZ7|pAq19cng*+?Doz4fbfPLwGLA~QNqet-1q&5DbQ;K9Rx-8;d{=Xx za+KG%iOu*i#!Mz(Q=uB*9%cyfcnP6=I&NArCby47Tq7Tp7{nK J-a#c+x-voVl-P8<9B&oT+JzW~pdXg~3d(0eGz2+muZuL=6WqrGZ2+}fgOc&1Y$Nbjzwe-iVXtYiFb%r21DP>;m;W rt~T0c&FMw*SqK<3h&sO$B$-vWXKdH8n0+eUEcLblHyhEjRj|NcYYdw< literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/cd4272fec464c45438dce72eb9381971ed0207de b/test/core/end2end/fuzzers/api_fuzzer_corpus/cd4272fec464c45438dce72eb9381971ed0207de new file mode 100644 index 0000000000000000000000000000000000000000..949e154e3cac1390a5673b78b73aa100e0147816 GIT binary patch literal 472 zcmZ{h%}T>S5XWbyb=g+Q*<(S_Hed>Zmllcm3c+)T?a&s#!Zh7t&pn9ml9N}Tp>H5U zEAxfQ(_=59I^$OKuFsr&p-E>zLSL&;t$hDHbRO z)NF~5Ka`qrK8bQ(JZAiou0$}+X7p45`~2DeVX2xIMSc;D=Xo}{PmApCfzst-L(!Bb z&r{)wP}B0AgpG`SyJo0gw*)mhz(5byj=lwX1n((;2ZwNkx~XZQfC;c4 zwVu=uibD;KPU6cXdS%qRKvMc4Sav^7Z7Wb)1(l?i&@oT~jru&)f*|*`IyK#%8LV&i~ V`pb}D4oag!wqrR^+cyI3{r~}{hl&6I literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/cd7cf401276531cea7e4221f249f527f231a5bcb b/test/core/end2end/fuzzers/api_fuzzer_corpus/cd7cf401276531cea7e4221f249f527f231a5bcb new file mode 100644 index 0000000000000000000000000000000000000000..603c37907ed893d658fa9b88a38af96b1477640a GIT binary patch literal 528 zcmZuuu}T9$5PiGovKQsB6sxEZOwbg97K)ts3xOb59A`4Z=yDOnZ~P!D`t5e*Uk%3#QI_C*Cyo}fZb6ZKnZd(gv4tU zOZTkug^?_5IvBy}SLqoAtxg*nd)Zd2b|X3l861I?Ypg-t@32kXck;Fc&GLVnA?Iu) K9>!Jy7Wf2=Y5PiGovKQsB6e~X{EFyAX;U5r0usF_SNDgC+bC(O)nnL_9SJ|Yq z@o(6qQ7a37z&dxaP!yLd-rmled2gOhh%;hXr?naRWG!c#_4kT~$wUMJ2aX5s^0w*4voO-1|8q-xQU{M=Dm4lL`Cj+=cY1of0DZG+BaoipPOVZUF zPxCo=*873~{tG3=HCTl?X)gFbCkVF$PB)Gu4wI-#xD0i5Qc^E2^rf239>b*^YdP UeGkiy@~ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/d29cf6979d8d58b4cb779a629ebee62d7e42fc9b b/test/core/end2end/fuzzers/api_fuzzer_corpus/d29cf6979d8d58b4cb779a629ebee62d7e42fc9b new file mode 100644 index 0000000000000000000000000000000000000000..b6daf7691ebc3ed1b28c29a19ecc56a7c107e293 GIT binary patch literal 561 zcmaJ;u}T9$5PiGovKQsB6sxEZOwbe}77;nH@CO7DERHi7^f1Oace#MADa7BfzRD(@ zjlW@&My)LTfOYO-p(rj_yuF<_^WHq25NE`&PHQvt$y(0V8t)YilN}%ISqf^q+Ej*t zl=)Q{kbCA#Lou`wAe=gV@Zl5)`*5w{64~sIQJzW; z)tc45sSh2!h{FL?7C7v>TWp8E U#J-J1$MP&HEh2K@F9;%79B1;-V2ttIoN6eBHUdP`qz^ut15qDsw4Cg(^WO)6cm-#o4DT_1Itp?%Zj`L z&w9V`|F=*=Zo(>5r1-Z`8@)!;`tiD1+r+K+N))qxnvZK!3Bdt-SrI`AvrLB5pygH{ zSryBf#5GH+3`@U>XE>_Q4NZgmuyMDOslw#&N>&4nz^ca%+leoM?h2X3Mv;T_OeUBr HbS&@*NnVnO literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/ec56dad56975e8279b2b229288dff3bb0ceaf661 b/test/core/end2end/fuzzers/api_fuzzer_corpus/ec56dad56975e8279b2b229288dff3bb0ceaf661 new file mode 100644 index 0000000000000000000000000000000000000000..c3a9711d625ac8cebd67cc6cb9d03e97909d7fcc GIT binary patch literal 350 zcmYjNy-EZ@4E`n@!|W=HrHI9eaPCc^)*dqAD;z$6MP6VQcVA#p5v+ZRscf#Z@eyoo z20_I~P>8wpM5hQzzMmvR4ab%voDkWrV&`I8do7^VspBv?R-jg3=-aXjDxjBY3=5WL z&0!+QE?qWZ^3&j=WKu2%#j79V_@_uaAA2VDz!k*7+@7h0r-MF|h@0<|<>sDM#jd?M zi5Om)V2-G=(@ywRm$`u1ZiDD-UoImdkFkbz8Y%rtLfVlhJT#@s}D z{C_nt>+`uWxz-6bp@{Adu7Jbh E8}r^@_y7O^ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/fcc42c56cb8847716474703b5a650f41dce98b38 b/test/core/end2end/fuzzers/api_fuzzer_corpus/fcc42c56cb8847716474703b5a650f41dce98b38 new file mode 100644 index 0000000000000000000000000000000000000000..095375a96d062f665d1c4efb3c176c4392d392a3 GIT binary patch literal 533 zcmZ`$%}T>S7@S>n*;FYWMG!1Pu|)+vcu-2jR}e(-5Muq%VvY6NBz*vT5Z@&yFTHv3 zHN51aK1KXC^#>0wIm~8fcIMmBjyNZVt+Y1dCRxk*Mz?BcnEdSc$WqwuY10^oE#c|r z8Vsm<6$r)9Mu4a~WclO^2ok+~{~iFu%TQZ9>Th4A>1cO*kPOm6Jd7OOWt8+OO0t`C z2}PmzoaJI~efg`o8pZwVD2>mD6uH?!pAwfj7;;Y}BC`48A){W60&0I=H%(_;(VNVe zLFHj3GgPv=4UaU+H7sCJ8$i`g&JD$ZFDZ?Z_=ciec_|)TWWbW#8cfP!4uK77{00C1 z{2?gec3>6ebGKLbS?}qbUw_15-RW41W zu(~h*f;;e~=?@8xiq>aQreU#q+47c)1c&HB6Cb7AT00+ DgRqgK literal 0 HcmV?d00001 diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 23e41106874..a482b0c5c10 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -26849,6 +26849,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/06eee533524c6723881c1591956edf704e0180d9" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/07.bin" @@ -28311,6 +28328,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/17fa8e029e35c88857b7abcad88609cf2d1ca9a4" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/17fb35db0b73c331a66120dbc491300b2d1665e0" @@ -28345,6 +28379,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/1870298c7042983e7716097018a031d105e397fd" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/1887558eb48d6a4341610fd0395cef8e87744044" @@ -28413,6 +28464,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/1917c5996ac82e13143a414eb9448f171fdd751a" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/1949f4a75f7d501d5279a01f58a444640379bd78" @@ -28974,6 +29042,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/202a15693f991889b5fdd97f016a5410778b07e1" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/20322515ebf6df572cb2f596d8a20d3d8893193d" @@ -29042,6 +29127,40 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/20a10c9a0c8cc48fd6317000f70070a0b2451e60" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/21357c3613a47180eb668b1c6c849ce9096a46eb" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/2193a1e20caee37676d08c88154a462acf120fb0" @@ -29127,6 +29246,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/2372fe3d96fda1dae8846a781905c6c408555d3a" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/23982956d17d2f55e61a5d9111b1c0c7ee530214" @@ -29467,6 +29603,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/2858613c057a236dbe306cca44df29232f6b48b3" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/285b0b9b11fe506527c880d3a866ba94f8038cdf" @@ -29620,6 +29773,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/2a1d70b04f4aba0ec93899485f0807a209a4b207" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/2a2ca2f6a1c03067f87bad61515688edc234bacc" @@ -30232,6 +30402,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/2ffb878075ebb3d2d778c8aabcb0e96cb51060f0" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/3017e9f66dacf5a01f8c7d65b8a72d4f68aa6a28" @@ -30317,6 +30504,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/30c74b7b5c92bb602d26c3d703c267e288b432a2" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/30d6ca02d96fe1d1b91b7fa5180789a6cc9d0d45" @@ -30572,6 +30776,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/3396a31b1075465bf358eb7836e6f5347a0be591" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/3399ac8bb9e0d3a2cbf22a95d1e20c70e2415e41" @@ -30793,6 +31014,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/376f42635e918cc28706b82ad8923cc7401aa9e6" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/37bc0646132afe8c79cda5e76de150a473fc0680" @@ -31252,6 +31490,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/3db644687c6a09fae4267f05b63a969f28024f87" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/3dedcaf501bc9718e5d372862b081fc9fdfb3959" @@ -31320,6 +31575,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/3f2e5f90e1a93df61a1c9c09b8c9116149eec526" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/3f31d328c16207904d201406f7e9708360d5799b" @@ -32748,6 +33020,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/521e1e27b0997a0dc168f628e8a0497f7f93ea6d" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/5220909c423d2b321e8459355c965fb330288565" @@ -33037,6 +33326,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/5611060a04db105e03cc74da57352b8a09c411e0" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/5677b3500e9353856c8d87fbe1476a22df4231f8" @@ -33326,6 +33632,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/59db3f98b38747d4a35524c1b3d31b5e90f53775" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/59de0a42d012ca3dd8b7fa2f1b1c6642cb86fad4" @@ -33751,6 +34074,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/5ddce6103cb33bc58571c8135b620443740e3646" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/5e1391f44f904fa54e66ec174e4c8879921e842a" @@ -33955,6 +34295,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/60ad6847b1fe72ee81decf28dcffa30ce372af6a" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/60e8618c075ec5fd47a1699271c6da1b5befd579" @@ -34125,6 +34482,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/6245a105123761558a71a9207b3048d2f3d691f0" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/629eac0e7443a273b5c351757c03fe15a0b87c1c" @@ -34550,6 +34924,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/682fdabcfc7243e9c93108d6b2d7d3e920e81970" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/6868e669f4b9a77ae5227767ec455fe6f82e55a1" @@ -34720,6 +35111,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/6ad7afcf2d12025faf0e1812ee7a0a5d754620c6" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/6b1e10a936df3b42720ebc9179fb74aa147f8b14" @@ -34924,6 +35332,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/6cfe000a50ad8b908b3efa3af94c5df6382ff33d" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/6d6d70df4499b8595851100ffb833d397cc87a18" @@ -34992,6 +35417,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/6e3d43e98d7be45ecc1863eedfeb85a4cae4a007" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/6e77e1cd328bb98d954043230716863c5133c1c4" @@ -35332,6 +35774,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/72160b48e0995ee82f116d77a7fb23a028c10932" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/7217d93c1da3ae8ed085a5e6988227dcf430cd89" @@ -35638,6 +36097,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/756d77e9fb9ed9dac1db0b1c8cdcc6e05e47329b" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/75755ae5cb0ae4f711dd15925f9f681d23408bb8" @@ -35944,6 +36420,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/79975e5fb34f3569b0d2e40d34d6f7ab1bf82cf2" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/79ac297c667d2ae77c05d2af275b05138439ee5b" @@ -36250,6 +36743,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/7cfe9fd65c3daa43067dfc99dac2814b763b9f48" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/7d33039255c9611d0e9e0cc7e230f87ad55c007f" @@ -36658,6 +37168,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/8272e45483cb4cc7113b0ffad71f9218542f9cd7" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/839b0cad1196be563cec8e8a55184fc001b8401a" @@ -37814,6 +38341,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/92a87c7a2f2e336f92529bc40deee614dd8b4486" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/92d44998655e82d89a614c7b6a2f08c5fc7f8805" @@ -39038,6 +39582,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/a36a34472604c8107353872e77a84873ff8a9170" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/a380f7e56171dc69269afb6364216bc69925eb8a" @@ -39905,6 +40466,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/b1e28018e26e6baaba5a907e5e6ff9b7a7942018" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/b23f1233d0e21c4aaaebe2fe5931903698b2408c" @@ -40194,6 +40772,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/b4f6d203097dcd1778f4a912cdc3af96ffb681de" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/b51853fe4f799f7f959922fda1b3500668a45157" @@ -40432,6 +41027,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/b7c3f40ef32cd843e331fb49521c0d614dfbecc9" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/b7f282fbd77193d822df9c8156370398e1fd099c" @@ -41384,6 +41996,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/bf5923216eb069edaf4e135ab7ee426c04d99a25" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/bfe2840aecee88c5301aedd16a6ac8cea0262005" @@ -41435,6 +42064,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/c09288284e4859b8a85421b19d3c6d0109cdab08" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/c0bb5f00fc14ea4f2000f75e6d1d94f23e6203f6" @@ -42166,6 +42812,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/ca5a1e4fccc55aa977b841d8d67e6991a4371860" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/ca6add6699d063e2212335264ad3e004327afc1a" @@ -42302,6 +42965,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/cd4272fec464c45438dce72eb9381971ed0207de" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/cd4f2c59f0cf55d9a73fb0b96d701c784c446048" @@ -42336,6 +43016,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/cd7cf401276531cea7e4221f249f527f231a5bcb" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/cdc064f39a9a67210b1be6b195d38d5d0d73eaa0" @@ -43271,6 +43968,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/d1d35a1d2148c62c6021479d4153e65511b33cc1" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/d22287b96b3dcb840fc65e4be60e409fb0f6bfe5" @@ -43339,6 +44053,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/d29cf6979d8d58b4cb779a629ebee62d7e42fc9b" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/d2c828ee88b3e352fad3263f1e1ff901a41fc7a6" @@ -44478,6 +45209,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/e16a0f378b50b28dae4458b795c8c80cf869901a" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/e18816dbe46249fb0160b8f06c2b71f6943d3d21" @@ -45260,6 +46008,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/ec56dad56975e8279b2b229288dff3bb0ceaf661" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/ec97d4ee730261bdc3b14349a3346fd45929bd17" @@ -46620,6 +47385,23 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/api_fuzzer_corpus/fcc42c56cb8847716474703b5a650f41dce98b38" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "api_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/api_fuzzer_corpus/fd4d68895bc219f52d93f3f2f302ff138e8ffeda" From 0ba114408ebb153b29c85dd8be9847095a6a6954 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 10 Jun 2016 15:15:44 -0700 Subject: [PATCH 1022/1894] Fix gpr_log format mismatches in c++ tests --- include/grpc/support/string_util.h | 4 ++-- .../ext/transport/chttp2/transport/chttp2_transport.c | 4 ++-- test/cpp/end2end/async_end2end_test.cc | 3 ++- test/cpp/interop/client.cc | 5 +++-- test/cpp/interop/interop_client.cc | 10 ++++++---- test/cpp/interop/metrics_client.cc | 2 +- test/cpp/qps/driver.cc | 8 ++++---- test/cpp/qps/parse_json.cc | 2 +- 8 files changed, 21 insertions(+), 17 deletions(-) diff --git a/include/grpc/support/string_util.h b/include/grpc/support/string_util.h index 05cbd3b8c92..952cbfc26b9 100644 --- a/include/grpc/support/string_util.h +++ b/include/grpc/support/string_util.h @@ -54,8 +54,8 @@ GPRAPI char *gpr_strdup(const char *src); On error, returns -1 and sets *strp to NULL. If the format string is bad, the result is undefined. */ -GPRAPI int gpr_asprintf(char **strp, const char *format, - ...) GPRC_PRINT_FORMAT_CHECK(2, 3); +GPRAPI int gpr_asprintf(char **strp, const char *format, ...) + GPRC_PRINT_FORMAT_CHECK(2, 3); #ifdef __cplusplus } diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 047f164eca8..c37867a6aa0 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -957,7 +957,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, if (metadata_size > metadata_peer_limit) { gpr_log(GPR_DEBUG, "to-be-sent initial metadata size exceeds peer limit " - "(%lu vs. %lu)", + "(%" PRIuPTR " vs. %" PRIuPTR ")", metadata_size, metadata_peer_limit); cancel_from_api(exec_ctx, transport_global, stream_global, GRPC_STATUS_RESOURCE_EXHAUSTED); @@ -1012,7 +1012,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, if (metadata_size > metadata_peer_limit) { gpr_log(GPR_DEBUG, "to-be-sent trailing metadata size exceeds peer limit " - "(%lu vs. %lu)", + "(%" PRIuPTR " vs. %" PRIuPTR ")", metadata_size, metadata_peer_limit); cancel_from_api(exec_ctx, transport_global, stream_global, GRPC_STATUS_RESOURCE_EXHAUSTED); diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index b8398015006..5915187d438 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -231,7 +231,8 @@ class TestScenario { void Log() const { gpr_log(GPR_INFO, "Scenario: disable_blocking %d, credentials %s, message size %d", - disable_blocking, credentials_type.c_str(), message_content.size()); + disable_blocking, credentials_type.c_str(), + (int)(message_content.size())); } bool disable_blocking; const grpc::string credentials_type; diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc index 77278249794..addaf174f2b 100644 --- a/test/cpp/interop/client.cc +++ b/test/cpp/interop/client.cc @@ -171,8 +171,9 @@ int main(int argc, char** argv) { "large_unary|large_compressed_unary|client_streaming|server_streaming|" "server_compressed_streaming|half_duplex|ping_pong|cancel_after_begin|" "cancel_after_first_response|timeout_on_sleeping_server|empty_stream|" - "compute_engine_creds|jwt_token_creds|oauth2_auth_token|per_rpc_creds", - "status_code_and_message|custom_metadata", FLAGS_test_case.c_str()); + "compute_engine_creds|jwt_token_creds|oauth2_auth_token|per_rpc_creds|" + "status_code_and_message|custom_metadata", + FLAGS_test_case.c_str()); ret = 1; } diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index a0479e8f689..f9813f38c17 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -433,7 +433,7 @@ bool InteropClient::DoResponseStreaming() { // most likely due to connection failure. gpr_log(GPR_ERROR, "DoResponseStreaming(): Read fewer streams (%d) than " - "response_stream_sizes.size() (%d)", + "response_stream_sizes.size() (%" PRIu64 ")", i, response_stream_sizes.size()); return TransientFailureOrAbort(); } @@ -517,9 +517,11 @@ bool InteropClient::DoResponseCompressedStreaming() { // stream->Read() failed before reading all the expected messages. This // is most likely due to a connection failure. gpr_log(GPR_ERROR, - "DoResponseCompressedStreaming(): Responses read (k=%d) is " + "DoResponseCompressedStreaming(): Responses read (k=%" PRIuPTR + ") is " "less than the expected messages (i.e " - "response_stream_sizes.size() (%d)). (i=%d, j=%d)", + "response_stream_sizes.size() (%" PRIu64 ")). (i=%" PRIuPTR + ", j=%" PRIuPTR ")", k, response_stream_sizes.size(), i, j); return TransientFailureOrAbort(); } @@ -608,7 +610,7 @@ bool InteropClient::DoHalfDuplex() { // most likely due to a connection failure gpr_log(GPR_ERROR, "DoHalfDuplex(): Responses read (i=%d) are less than the expected " - "number of messages response_stream_sizes.size() (%d)", + "number of messages response_stream_sizes.size() (%" PRIu64 ")", i, response_stream_sizes.size()); return TransientFailureOrAbort(); } diff --git a/test/cpp/interop/metrics_client.cc b/test/cpp/interop/metrics_client.cc index c8c2215fab1..7a0cb994df5 100644 --- a/test/cpp/interop/metrics_client.cc +++ b/test/cpp/interop/metrics_client.cc @@ -76,7 +76,7 @@ bool PrintMetrics(std::unique_ptr stub, bool total_only, while (reader->Read(&gauge_response)) { if (gauge_response.value_case() == GaugeResponse::kLongValue) { if (!total_only) { - gpr_log(GPR_INFO, "%s: %ld", gauge_response.name().c_str(), + gpr_log(GPR_INFO, "%s: %lld", gauge_response.name().c_str(), gauge_response.long_value()); } overall_qps += gauge_response.long_value(); diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 57d8c22a954..83dbdc3e59e 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -244,8 +244,8 @@ std::unique_ptr RunScenario( // where class contained in std::vector must have a copy constructor auto* servers = new ServerData[num_servers]; for (size_t i = 0; i < num_servers; i++) { - gpr_log(GPR_INFO, "Starting server on %s (worker #%d)", workers[i].c_str(), - i); + gpr_log(GPR_INFO, "Starting server on %s (worker #%" PRIuPTR ")", + workers[i].c_str(), i); servers[i].stub = WorkerService::NewStub( CreateChannel(workers[i], InsecureChannelCredentials())); @@ -307,8 +307,8 @@ std::unique_ptr RunScenario( auto* clients = new ClientData[num_clients]; for (size_t i = 0; i < num_clients; i++) { const auto& worker = workers[i + num_servers]; - gpr_log(GPR_INFO, "Starting client on %s (worker #%d)", worker.c_str(), - i + num_servers); + gpr_log(GPR_INFO, "Starting client on %s (worker #%" PRIuPTR ")", + worker.c_str(), i + num_servers); clients[i].stub = WorkerService::NewStub( CreateChannel(worker, InsecureChannelCredentials())); ClientConfig per_client_config = client_config; diff --git a/test/cpp/qps/parse_json.cc b/test/cpp/qps/parse_json.cc index be804281f81..e4fc35fa414 100644 --- a/test/cpp/qps/parse_json.cc +++ b/test/cpp/qps/parse_json.cc @@ -55,7 +55,7 @@ void ParseJson(const grpc::string& json, const grpc::string& type, grpc::string errmsg(status.error_message()); gpr_log(GPR_ERROR, "Failed to convert json to binary: errcode=%d msg=%s", status.error_code(), errmsg.c_str()); - gpr_log(GPR_ERROR, "JSON: ", json.c_str()); + gpr_log(GPR_ERROR, "JSON: %s", json.c_str()); abort(); } GPR_ASSERT(msg->ParseFromString(binary)); From beaa35724c4eb67eb5f890d6f66e0fd3b2f50aaa Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 10 Jun 2016 15:46:14 -0700 Subject: [PATCH 1023/1894] Fix type mismatch for type_size --- src/core/ext/transport/chttp2/transport/parsing.c | 6 ++++-- test/cpp/end2end/async_end2end_test.cc | 8 ++++---- test/cpp/end2end/zookeeper_test.cc | 2 +- test/cpp/interop/interop_client.cc | 6 +++--- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index 8f72a4ff992..3c74258352e 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -649,7 +649,8 @@ static void on_initial_header(void *tp, grpc_mdelem *md) { if (new_size > metadata_size_limit) { if (!stream_parsing->exceeded_metadata_size) { gpr_log(GPR_DEBUG, - "received initial metadata size exceeds limit (%lu vs. %lu)", + "received initial metadata size exceeds limit (%" PRIuPTR + " vs. %" PRIuPTR ")", new_size, metadata_size_limit); stream_parsing->seen_error = true; stream_parsing->exceeded_metadata_size = true; @@ -695,7 +696,8 @@ static void on_trailing_header(void *tp, grpc_mdelem *md) { if (new_size > metadata_size_limit) { if (!stream_parsing->exceeded_metadata_size) { gpr_log(GPR_DEBUG, - "received trailing metadata size exceeds limit (%lu vs. %lu)", + "received trailing metadata size exceeds limit (%" PRIuPTR + " vs. %" PRIuPTR ")", new_size, metadata_size_limit); stream_parsing->seen_error = true; stream_parsing->exceeded_metadata_size = true; diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index 5915187d438..8229bda6bf2 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -229,10 +229,10 @@ class TestScenario { credentials_type(creds_type), message_content(content) {} void Log() const { - gpr_log(GPR_INFO, - "Scenario: disable_blocking %d, credentials %s, message size %d", - disable_blocking, credentials_type.c_str(), - (int)(message_content.size())); + gpr_log( + GPR_INFO, + "Scenario: disable_blocking %d, credentials %s, message size %" PRIuPTR, + disable_blocking, credentials_type.c_str(), message_content.size()); } bool disable_blocking; const grpc::string credentials_type; diff --git a/test/cpp/end2end/zookeeper_test.cc b/test/cpp/end2end/zookeeper_test.cc index 12853a1b985..b44668fe84f 100644 --- a/test/cpp/end2end/zookeeper_test.cc +++ b/test/cpp/end2end/zookeeper_test.cc @@ -101,7 +101,7 @@ class ZookeeperTest : public ::testing::Test { zookeeper_address_ = addr_str; gpr_free(addr); } - gpr_log(GPR_DEBUG, zookeeper_address_.c_str()); + gpr_log(GPR_DEBUG, "%s, " zookeeper_address_.c_str()); // Connects to zookeeper server zoo_set_debug_level(ZOO_LOG_LEVEL_WARN); diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index f9813f38c17..0bf1fd6f737 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -433,7 +433,7 @@ bool InteropClient::DoResponseStreaming() { // most likely due to connection failure. gpr_log(GPR_ERROR, "DoResponseStreaming(): Read fewer streams (%d) than " - "response_stream_sizes.size() (%" PRIu64 ")", + "response_stream_sizes.size() (%" PRIuPTR ")", i, response_stream_sizes.size()); return TransientFailureOrAbort(); } @@ -520,7 +520,7 @@ bool InteropClient::DoResponseCompressedStreaming() { "DoResponseCompressedStreaming(): Responses read (k=%" PRIuPTR ") is " "less than the expected messages (i.e " - "response_stream_sizes.size() (%" PRIu64 ")). (i=%" PRIuPTR + "response_stream_sizes.size() (%" PRIuPTR ")). (i=%" PRIuPTR ", j=%" PRIuPTR ")", k, response_stream_sizes.size(), i, j); return TransientFailureOrAbort(); @@ -610,7 +610,7 @@ bool InteropClient::DoHalfDuplex() { // most likely due to a connection failure gpr_log(GPR_ERROR, "DoHalfDuplex(): Responses read (i=%d) are less than the expected " - "number of messages response_stream_sizes.size() (%" PRIu64 ")", + "number of messages response_stream_sizes.size() (%" PRIuPTR ")", i, response_stream_sizes.size()); return TransientFailureOrAbort(); } From 654db3d33e8e972ce5a3b20e642870acc20ec96c Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 10 Jun 2016 15:48:11 -0700 Subject: [PATCH 1024/1894] Regenerate build files --- src/python/grpcio/grpc/_cython/imports.generated.h | 4 ++-- src/ruby/ext/grpc/rb_grpc_imports.generated.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index 16bb5cdfab6..62865f8a0e9 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -482,7 +482,7 @@ extern grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_impo typedef grpc_byte_buffer *(*grpc_raw_byte_buffer_from_reader_type)(grpc_byte_buffer_reader *reader); extern grpc_raw_byte_buffer_from_reader_type grpc_raw_byte_buffer_from_reader_import; #define grpc_raw_byte_buffer_from_reader grpc_raw_byte_buffer_from_reader_import -typedef void(*gpr_log_type)(const char *file, int line, gpr_log_severity severity, const char *format, ...); +typedef void(*gpr_log_type)(const char *file, int line, gpr_log_severity severity, const char *format, ...) GPRC_PRINT_FORMAT_CHECK(4, 5); extern gpr_log_type gpr_log_import; #define gpr_log gpr_log_import typedef void(*gpr_log_message_type)(const char *file, int line, gpr_log_severity severity, const char *message); @@ -821,7 +821,7 @@ extern gpr_format_message_type gpr_format_message_import; typedef char *(*gpr_strdup_type)(const char *src); extern gpr_strdup_type gpr_strdup_import; #define gpr_strdup gpr_strdup_import -typedef int(*gpr_asprintf_type)(char **strp, const char *format, ...); +typedef int(*gpr_asprintf_type)(char **strp, const char *format, ...) GPRC_PRINT_FORMAT_CHECK(2, 3); extern gpr_asprintf_type gpr_asprintf_import; #define gpr_asprintf gpr_asprintf_import typedef const char *(*gpr_subprocess_binary_extension_type)(); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index 9c86a3690c5..e9845cd7e25 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -482,7 +482,7 @@ extern grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_impo typedef grpc_byte_buffer *(*grpc_raw_byte_buffer_from_reader_type)(grpc_byte_buffer_reader *reader); extern grpc_raw_byte_buffer_from_reader_type grpc_raw_byte_buffer_from_reader_import; #define grpc_raw_byte_buffer_from_reader grpc_raw_byte_buffer_from_reader_import -typedef void(*gpr_log_type)(const char *file, int line, gpr_log_severity severity, const char *format, ...); +typedef void(*gpr_log_type)(const char *file, int line, gpr_log_severity severity, const char *format, ...) GPRC_PRINT_FORMAT_CHECK(4, 5); extern gpr_log_type gpr_log_import; #define gpr_log gpr_log_import typedef void(*gpr_log_message_type)(const char *file, int line, gpr_log_severity severity, const char *message); @@ -821,7 +821,7 @@ extern gpr_format_message_type gpr_format_message_import; typedef char *(*gpr_strdup_type)(const char *src); extern gpr_strdup_type gpr_strdup_import; #define gpr_strdup gpr_strdup_import -typedef int(*gpr_asprintf_type)(char **strp, const char *format, ...); +typedef int(*gpr_asprintf_type)(char **strp, const char *format, ...) GPRC_PRINT_FORMAT_CHECK(2, 3); extern gpr_asprintf_type gpr_asprintf_import; #define gpr_asprintf gpr_asprintf_import typedef const char *(*gpr_subprocess_binary_extension_type)(); From bcf5023bb6ad3ddeef99b9a703b2fa245450a77a Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 10 Jun 2016 16:22:57 -0700 Subject: [PATCH 1025/1894] Fix zookeeper_test --- test/cpp/end2end/zookeeper_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cpp/end2end/zookeeper_test.cc b/test/cpp/end2end/zookeeper_test.cc index b44668fe84f..fdc500e5352 100644 --- a/test/cpp/end2end/zookeeper_test.cc +++ b/test/cpp/end2end/zookeeper_test.cc @@ -101,7 +101,7 @@ class ZookeeperTest : public ::testing::Test { zookeeper_address_ = addr_str; gpr_free(addr); } - gpr_log(GPR_DEBUG, "%s, " zookeeper_address_.c_str()); + gpr_log(GPR_DEBUG, "%s", zookeeper_address_.c_str()); // Connects to zookeeper server zoo_set_debug_level(ZOO_LOG_LEVEL_WARN); From 0de6cea2077925926e68e38f7f2a9f355f7df6b5 Mon Sep 17 00:00:00 2001 From: Martin Dyring-Andersen Date: Fri, 10 Jun 2016 20:59:44 -0400 Subject: [PATCH 1026/1894] Fix scope problem when GPR_SUPPORT_CHANNELS_FROM_FD is not defined --- src/cpp/server/server_posix.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/cpp/server/server_posix.cc b/src/cpp/server/server_posix.cc index 8cb9753a125..c3aa2adc60e 100644 --- a/src/cpp/server/server_posix.cc +++ b/src/cpp/server/server_posix.cc @@ -42,8 +42,8 @@ namespace grpc { void AddInsecureChannelFromFd(Server* server, int fd) { grpc_server_add_insecure_channel_from_fd( server->c_server(), server->completion_queue()->cq(), fd); +} #endif // GPR_SUPPORT_CHANNELS_FROM_FD -} } // namespace grpc From dd8d84ebb576630f7114b97a6677c1983687cfb4 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 10 Jun 2016 19:10:42 -0700 Subject: [PATCH 1027/1894] spec comments addressed --- doc/interop-test-descriptions.md | 212 ++++++++++++-------------- src/proto/grpc/testing/messages.proto | 20 +-- 2 files changed, 106 insertions(+), 126 deletions(-) diff --git a/doc/interop-test-descriptions.md b/doc/interop-test-descriptions.md index ebeb62753b4..3dd7807dec0 100644 --- a/doc/interop-test-descriptions.md +++ b/doc/interop-test-descriptions.md @@ -68,14 +68,12 @@ control (even if compression is enabled on the channel). Server features: * [UnaryCall][] -* [Compressable Payload][] Procedure: 1. Client calls UnaryCall with: ``` { - response_type: COMPRESSABLE response_size: 314159 payload:{ body: 271828 bytes of zeros @@ -85,29 +83,39 @@ Procedure: Client asserts: * call was successful -* response payload type is COMPRESSABLE * response payload body is 314159 bytes in size * clients are free to assert that the response payload body contents are zero and comparing the entire response message against a golden response ### client_compressed_unary -This test verifies the client can compress unary messages. It sends two -unary requests with their payloads marked as COMPRESSABLE. One request will be -sent compressed and its `expect_compressed_request` set to true. Conversely for -the uncompressed case. +This test verifies the client can compress unary messages. It sends an initial +inconsistent request to verify whether the server supports the +[CompressedRequest][] feature. If it does, it should catch the inconsistency and +fail the call with an `INVALID_ARGUMENT` status. If the feature is supported, it +proceeds with two unary calls, for compressed and uncompressed payloads. Server features: * [UnaryCall][] -* [Compressed Request][] +* [CompressedRequest][] Procedure: - 1. Client calls UnaryCall with: + 1. Client calls UnaryCall with the feature probe, an **uncompressed** message: + ``` + { + expect_compressed: false + response_size: 314159 + payload:{ + body: 271828 bytes of zeros + } + } + ``` + + 1. Client calls UnaryCall with the *compressed* message: ``` { - expect_compressed_request: true - response_type: COMPRESSABLE + expect_compressed: true response_size: 314159 payload:{ body: 271828 bytes of zeros @@ -115,10 +123,11 @@ Procedure: } ``` + 1. Client calls UnaryCall with the *uncompressed* message: + ``` { - expect_compressed_request: false - response_type: COMPRESSABLE + expect_compressed: false response_size: 314159 payload:{ body: 271828 bytes of zeros @@ -127,22 +136,18 @@ Procedure: ``` Client asserts: - * call was successful - * response payload type is COMPRESSABLE - * if `request_compressed_response` is false, the response MUST NOT have the - compressed message flag set. - * if `request_compressed_response` is true, the response MUST have the - compressed message flag set. - * response payload body is 314159 bytes in size - * clients are free to assert that the response payload body contents are - zero and comparing the entire response message against a golden response + * First call was unsuccessful with `INVALID_ARGUMENT` status. Subsequent + calls were successful. + * Response payload body is 314159 bytes in size. + * Clients are free to assert that the response payload body contents are + zero and comparing the entire response message against a golden response. ### server_compressed_unary This test verifies the server can compress unary messages. It sends two unary -requests for a COMPRESSABLE payload type, expecting the server response to be -compressed or not according to the `request_compressed_response` boolean. +requests, expecting the server response to be +compressed or not according to the `response_compressed` boolean. Whether compression was actually performed is determined by the compression bit in the response's message flags. @@ -150,16 +155,14 @@ in the response's message flags. Server features: * [UnaryCall][] -* [Compressable Payload][] -* [Compressed Response][] +* [CompressedResponse][] Procedure: 1. Client calls UnaryCall with: ``` { - request_compressed_response: true - response_type: COMPRESSABLE + response_compressed: true response_size: 314159 payload:{ body: 271828 bytes of zeros @@ -169,8 +172,7 @@ Procedure: ``` { - request_compressed_response: false - response_type: COMPRESSABLE + response_compressed: false response_size: 314159 payload:{ body: 271828 bytes of zeros @@ -179,10 +181,9 @@ Procedure: ``` Client asserts: * call was successful - * response payload type is COMPRESSABLE - * when `request_compressed_response` is true, the response MUST have the + * when `response_compressed` is true, the response MUST have the compressed message flag set. - * when `request_compressed_response` is false, the response MUST NOT have + * when `response_compressed` is false, the response MUST NOT have the compressed message flag set. * response payload body is 314159 bytes in size * clients are free to assert that the response payload body contents are @@ -195,7 +196,6 @@ This test verifies that client-only streaming succeeds. Server features: * [StreamingInputCall][] -* [Compressable Payload][] Procedure: 1. Client calls StreamingInputCall @@ -245,20 +245,70 @@ Client asserts: * call was successful * response aggregated_payload_size is 74922 + +### client_compressed_streaming + +This test verifies the client can compress streaming messages. It sends an +initial inconsistent streaming call comprised of a single message to verify if +the server implements the [CompressedRequest][] feature. If it does, the client +will then send another streaming call, comprised of two messages: the first one +compressed with `expect_compressed` true; the second one uncompressed with +`expected_compressed` false. + +Procedure: + 1. Client calls StreamingInputCall + 1. Client sends the following feature-probing *uncompressed* message + + ``` + { + expect_compressed: true + payload:{ + body: 27182 bytes of zeros + } + } + ``` + If the call fails with `INVALID_ARGUMENT`, the test fails. Otherwise, we + continue. + + 1. Client then sends the *compressed* message + + ``` + { + expect_compressed: true + payload:{ + body: 27182 bytes of zeros + } + } + ``` + 1. And finally, the *uncompressed* message: + ``` + { + expect_compressed: false + payload:{ + body: 45904 bytes of zeros + } + } + ``` + 1. Client half-closes + + Client asserts: + * First call was unsuccessful with `INVALID_ARGUMENT` status. Subsequent + calls were successful. + * Response aggregated_payload_size is 73086. + + ### server_streaming This test verifies that server-only streaming succeeds. Server features: * [StreamingOutputCall][] -* [Compressable Payload][] Procedure: 1. Client calls StreamingOutputCall with: ``` { - response_type:COMPRESSABLE response_parameters:{ size: 31415 } @@ -277,7 +327,6 @@ Procedure: Client asserts: * call was successful * exactly four responses -* response payloads are COMPRESSABLE * response payload bodies are sized (in order): 31415, 9, 2653, 58979 * clients are free to assert that the response payload body contents are zero and comparing the entire response messages against golden responses @@ -288,8 +337,7 @@ This test verifies that the server can compress streaming messages. Server features: * [StreamingOutputCall][] -* [Compressable Payload][] -* [Compressed Response][] +* [CompressedResponse][] Procedure: @@ -297,8 +345,7 @@ Procedure: ``` { - request_compressed_response: true - response_type:COMPRESSABLE + response_compressed: true response_parameters:{ size: 31415 } @@ -310,8 +357,7 @@ Procedure: ``` { - request_compressed_response: false - response_type:COMPRESSABLE + response_compressed: false response_parameters:{ size: 31415 } @@ -324,69 +370,27 @@ Procedure: Client asserts: * call was successful * exactly two responses - * response payloads are COMPRESSABLE - * when `request_compressed_response` is false, the response's messages MUST + * when `response_compressed` is false, the response's messages MUST NOT have the compressed message flag set. - * when `request_compressed_response` is true, the response's messages MUST + * when `response_compressed` is true, the response's messages MUST have the compressed message flag set. * response payload bodies are sized (in order): 31415, 58979 * clients are free to assert that the response payload body contents are zero and comparing the entire response messages against golden responses -### client_compressed_streaming - -This test verifies that the client can compress streaming messages. - -Server features: -* [StreamingInputCall][] -* [Compressed Request][] - -Procedure: - 1. Client calls StreamingInputCall - 1. Client sends: - - ``` - { - expect_compressed_request: true - payload:{ - body: 27182 bytes of zeros - } - } - ``` - - 1. Client then sends: - - ``` - { - expect_compressed_request: false - payload:{ - body: 45904 bytes of zeros - } - } - ``` - - 6. Client half-closes - - Client asserts: - * call was successful - * response aggregated_payload_size is 73086 - - ### ping_pong This test verifies that full duplex bidi is supported. Server features: * [FullDuplexCall][] -* [Compressable Payload][] Procedure: 1. Client calls FullDuplexCall with: ``` { - response_type: COMPRESSABLE response_parameters:{ size: 31415 } @@ -400,7 +404,6 @@ Procedure: ``` { - response_type: COMPRESSABLE response_parameters:{ size: 9 } @@ -414,7 +417,6 @@ Procedure: ``` { - response_type: COMPRESSABLE response_parameters:{ size: 2653 } @@ -428,7 +430,6 @@ Procedure: ``` { - response_type: COMPRESSABLE response_parameters:{ size: 58979 } @@ -443,7 +444,6 @@ Procedure: Client asserts: * call was successful * exactly four responses -* response payloads are COMPRESSABLE * response payload bodies are sized (in order): 31415, 9, 2653, 58979 * clients are free to assert that the response payload body contents are zero and comparing the entire response messages against golden responses @@ -479,7 +479,6 @@ be passed in as `--oauth_scope`. Server features: * [UnaryCall][] -* [Compressable Payload][] * [Echo Authenticated Username][] * [Echo OAuth Scope][] @@ -489,7 +488,6 @@ Procedure: ``` { - response_type: COMPRESSABLE response_size: 314159 payload:{ body: 271828 bytes of zeros @@ -523,7 +521,6 @@ variable GOOGLE_APPLICATION_CREDENTIALS. Server features: * [UnaryCall][] -* [Compressable Payload][] * [Echo Authenticated Username][] * [Echo OAuth Scope][] @@ -533,7 +530,6 @@ Procedure: ``` { - response_type: COMPRESSABLE response_size: 314159 payload:{ body: 271828 bytes of zeros @@ -578,7 +574,6 @@ should be passed as the `--oauth_scope`. Server features: * [UnaryCall][] -* [Compressable Payload][] * [Echo Authenticated Username][] * [Echo OAuth Scope][] @@ -621,7 +616,6 @@ against grpc-test.sandbox.googleapis.com, oauth scope Server features: * [UnaryCall][] -* [Compressable Payload][] * [Echo Authenticated Username][] * [Echo OAuth Scope][] @@ -652,7 +646,6 @@ by the server. Server features: * [UnaryCall][] * [FullDuplexCall][] -* [Compressable Payload][] * [Echo Metadata][] Procedure: @@ -667,7 +660,6 @@ Procedure: ``` { - response_type: COMPRESSABLE response_size: 314159 payload:{ body: 271828 bytes of zeros @@ -686,7 +678,6 @@ Procedure: ``` { - response_type: COMPRESSABLE response_size: 314159 payload:{ body: 271828 bytes of zeros @@ -792,14 +783,12 @@ from the server. Server features: * [FullDuplexCall][] -* [Compressable Payload][] Procedure: 1. Client starts FullDuplexCall with ``` { - response_type: COMPRESSABLE response_parameters:{ size: 31415 } @@ -946,15 +935,17 @@ for the `SimpleRequest.response_type`. If the server does not support the ### CompressedResponse [CompressedResponse]: #compressedresponse -When the client sets `SimpleRequest.request_compressed_response` to true, the -response is sent back compressed. +When the client sets `response_compressed` to true, the server's response is +sent back compressed. Note that `response_compressed` is present on both +`SimpleRequest` (unary) and `StreamingOutputCallRequest` (streaming). ### CompressedRequest [CompressedRequest]: #compressedrequest -When the client sets `SimpleRequest.expect_compressed_request ` to true, the -server expects the client request to be compressed. If it's not, it fails -the RPC with `INVALID_ARGUMENT`. +When the client sets `expect_compressed` to true, the server expects the client +request to be compressed. If it's not, it fails the RPC with `INVALID_ARGUMENT`. +Note that `response_compressed` is present on both `SimpleRequest` (unary) and +`StreamingOutputCallRequest` (streaming). ### StreamingInputCall [StreamingInputCall]: #streaminginputcall @@ -982,13 +973,6 @@ payload body of size ResponseParameters.size bytes, as specified by its respective ResponseParameters. After receiving half close and sending all responses, it closes with OK. -### Compressable Payload -[Compressable Payload]: #compressable-payload - -When the client requests COMPRESSABLE payload, the response includes a payload -of the size requested containing all zeros and the payload type is -COMPRESSABLE. - ### Echo Status [Echo Status]: #echo-status When the client sends a response_status in the request payload, the server closes diff --git a/src/proto/grpc/testing/messages.proto b/src/proto/grpc/testing/messages.proto index 99b75dea3d5..782fd40989d 100644 --- a/src/proto/grpc/testing/messages.proto +++ b/src/proto/grpc/testing/messages.proto @@ -34,6 +34,7 @@ syntax = "proto3"; package grpc.testing; +// DEPRECATED, don't use. To be removed shortly. // The type of payload that should be returned. enum PayloadType { // Compressable text format. @@ -42,6 +43,7 @@ enum PayloadType { // A block of data, to simply increase gRPC message size. message Payload { + // DEPRECATED, don't use. To be removed shortly. // The type of data in body. PayloadType type = 1; // Primary contents of payload. @@ -57,12 +59,12 @@ message EchoStatus { // Unary request. message SimpleRequest { + // DEPRECATED, don't use. To be removed shortly. // Desired payload type in the response from the server. // If response_type is RANDOM, server randomly chooses one from other formats. PayloadType response_type = 1; // Desired payload size in the response from the server. - // If response_type is COMPRESSABLE, this denotes the size before compression. int32 response_size = 2; // Optional input payload sent along with the request. @@ -75,16 +77,13 @@ message SimpleRequest { bool fill_oauth_scope = 5; // Whether to request the server to compress the response. - bool request_compressed_response = 6; + bool response_compressed = 6; // Whether server should return a given status EchoStatus response_status = 7; // Whether the server should expect this request to be compressed. - bool expect_compressed_request = 8; - - // The type of payload. - PayloadType payload_type = 9; + bool expect_compressed = 8; } // Unary response, as configured by the request. @@ -103,11 +102,8 @@ message StreamingInputCallRequest { // Optional input payload sent along with the request. Payload payload = 1; - // The type of payload. - PayloadType payload_type = 2; - // Whether the server should expect this request to be compressed. - bool expect_compressed_request = 3; + bool expect_compressed = 2; // Not expecting any payload from the response. } @@ -121,7 +117,6 @@ message StreamingInputCallResponse { // Configuration for a particular response. message ResponseParameters { // Desired payload sizes in responses from the server. - // If response_type is COMPRESSABLE, this denotes the size before compression. int32 size = 1; // Desired interval between consecutive responses in the response stream in @@ -131,6 +126,7 @@ message ResponseParameters { // Server-streaming request. message StreamingOutputCallRequest { + // DEPRECATED, don't use. To be removed shortly. // Desired payload type in the response from the server. // If response_type is RANDOM, the payload from each response in the stream // might be of different types. This is to simulate a mixed type of payload @@ -144,7 +140,7 @@ message StreamingOutputCallRequest { Payload payload = 3; // Whether to request the server to compress the response. - bool request_compressed_response = 4; + bool response_compressed = 6; // Whether server should return a given status EchoStatus response_status = 7; From eb16b3dc3cd579931d730ba3fef1f7008f649003 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 10 Jun 2016 23:06:25 -0700 Subject: [PATCH 1028/1894] Fix ref counting bug --- src/core/lib/iomgr/ev_epoll_linux.c | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 7e01ac144f2..617afad1975 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -1127,20 +1127,7 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, /* Update the pollset->polling_island */ pollset->polling_island = pi; -#ifdef GRPC_EPOLL_DEBUG - if (pollset->polling_island->fd_cnt == 0) { - gpr_log(GPR_DEBUG, "pollset_work_and_unlock: epoll_fd: %d, No other fds", - epoll_fd); - } - for (size_t i = 0; i < pollset->polling_island->fd_cnt; i++) { - gpr_log(GPR_DEBUG, - "pollset_work_and_unlock: epoll_fd: %d, fd_count: %d, fd[%d]: %d", - epoll_fd, pollset->polling_island->fd_cnt, i, - pollset->polling_island->fds[i]->fd); - } -#endif - gpr_mu_unlock(&pollset->polling_island->mu); - + polling_island_unref_and_unlock(pollset->polling_island, 0); /* Keep the ref*/ gpr_mu_unlock(&pollset->pi_mu); gpr_mu_unlock(&pollset->mu); @@ -1190,10 +1177,7 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, * gets updated whenever the underlying polling island is merged with another * island and while we are doing epoll_wait() above, the polling island may * have been merged */ - - /* TODO (sreek) - Change the ref count on polling island to gpr_atm so that - * we do not have to do this here */ - gpr_mu_lock(&pi->mu); + polling_island_update_and_lock(pi, 1, 0); /* No new ref added */ polling_island_unref_and_unlock(pi, 1); GPR_TIMER_END("pollset_work_and_unlock", 0); From 77a927be5af179eba8f9c272950800dd03b349a7 Mon Sep 17 00:00:00 2001 From: vjpai Date: Sat, 11 Jun 2016 08:10:45 -0700 Subject: [PATCH 1029/1894] Digraph --- doc/cpp-style-guide.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/doc/cpp-style-guide.md b/doc/cpp-style-guide.md index 271ff3984c3..9408c4abd68 100644 --- a/doc/cpp-style-guide.md +++ b/doc/cpp-style-guide.md @@ -79,4 +79,7 @@ default capture). Other C++ functional features such as constructor to be available. - Don't use `std::this_thread` . Use `gpr_sleep_until` for sleeping a thread. - +- [Some adjacent character combinations cause problems] + (https://en.wikipedia.org/wiki/Digraphs_and_trigraphs#C). If declaring a + template against some class relative to the global namespace, + `<::name` will be non-portable. Separate the `<` from the `:` and use `< ::name`. From 6d258c59d3137f29426ed7f6cc5afa376c2a50c6 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 10 Jun 2016 09:36:51 -0700 Subject: [PATCH 1030/1894] add support for clang3.5, clang3.7 and gcc4.6 --- .../cxx_ubuntu1604_x64/Dockerfile.template | 6 ++++ .../test/cxx_ubuntu1604_x64/Dockerfile | 6 ++++ tools/run_tests/run_tests.py | 31 +++++++++++++------ 3 files changed, 34 insertions(+), 9 deletions(-) diff --git a/templates/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile.template b/templates/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile.template index c11cefd283b..e39537975bf 100644 --- a/templates/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile.template @@ -34,6 +34,12 @@ <%include file="../../apt_get_basic.include"/> <%include file="../../cxx_deps.include"/> <%include file="../../run_tests_addons.include"/> + + # The clang-3.6 symlink for the default clang version was added + # to Ubuntu 16.04 recently, so make sure it's installed. + # Also install clang3.7. + RUN apt-get update && apt-get -y install clang-3.6 clang-3.7 && apt-get clean + # Define the default command. CMD ["bash"] \ No newline at end of file diff --git a/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile b/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile index 02d3c0d9ad6..d356433163e 100644 --- a/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile +++ b/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile @@ -82,5 +82,11 @@ RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins + +# The clang-3.6 symlink for the default clang version was added +# to Ubuntu 16.04 recently, so make sure it's installed. +# Also install clang3.7. +RUN apt-get update && apt-get -y install clang-3.6 clang-3.7 && apt-get clean + # Define the default command. CMD ["bash"] diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index f7282dddb85..4490bac898d 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -246,11 +246,17 @@ class CLanguage(object): def makefile_name(self): return 'Makefile' - def _clang_make_options(self): - return ['CC=clang', 'CXX=clang++', 'LD=clang', 'LDXX=clang++'] - - def _gcc44_make_options(self): - return ['CC=gcc-4.4', 'CXX=g++-4.4', 'LD=gcc-4.4', 'LDXX=g++-4.4'] + def _clang_make_options(self, version_suffix=''): + return ['CC=clang%s' % version_suffix, + 'CXX=clang++%s' % version_suffix, + 'LD=clang%s' % version_suffix, + 'LDXX=clang++%s' % version_suffix] + + def _gcc_make_options(self, version_suffix): + return ['CC=gcc%s' % version_suffix, + 'CXX=g++%s' % version_suffix, + 'LD=gcc%s' % version_suffix, + 'LDXX=g++%s' % version_suffix] def _compiler_options(self, use_docker, compiler): """Returns docker distro and make options to use for given compiler.""" @@ -260,13 +266,20 @@ class CLanguage(object): if compiler == 'gcc4.9' or compiler == 'default': return ('jessie', []) elif compiler == 'gcc4.4': - return ('wheezy', self._gcc44_make_options()) + return ('wheezy', self._gcc_make_options(version_suffix='-4.4')) + elif compiler == 'gcc4.6': + return ('wheezy', self._gcc_make_options(version_suffix='-4.6')) elif compiler == 'gcc5.3': return ('ubuntu1604', []) elif compiler == 'clang3.4': + # on ubuntu1404, clang-3.4 alias doesn't exist, just use 'clang' return ('ubuntu1404', self._clang_make_options()) + elif compiler == 'clang3.5': + return ('jessie', self._clang_make_options(version_suffix='-3.5')) elif compiler == 'clang3.6': - return ('ubuntu1604', self._clang_make_options()) + return ('ubuntu1604', self._clang_make_options(version_suffix='-3.6')) + elif compiler == 'clang3.7': + return ('ubuntu1604', self._clang_make_options(version_suffix='-3.7')) else: raise Exception('Compiler %s not supported.' % compiler) @@ -816,8 +829,8 @@ argp.add_argument('--arch', help='Selects architecture to target. For some platforms "default" is the only supported choice.') argp.add_argument('--compiler', choices=['default', - 'gcc4.4', 'gcc4.9', 'gcc5.3', - 'clang3.4', 'clang3.6', + 'gcc4.4', 'gcc4.6', 'gcc4.9', 'gcc5.3', + 'clang3.4', 'clang3.5', 'clang3.6', 'clang3.7', 'vs2010', 'vs2013', 'vs2015', 'python2.7', 'python3.4', 'node0.12', 'node4', 'node5'], From 7aabab711176d425ba16b15ed8c0def84bfcee23 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Wed, 11 May 2016 13:51:13 -0700 Subject: [PATCH 1031/1894] Added unit test for empty request/responses --- src/python/grpcio/tests/tests.json | 1 + .../grpcio/tests/unit/_empty_message_test.py | 137 ++++++++++++++++++ 2 files changed, 138 insertions(+) create mode 100644 src/python/grpcio/tests/unit/_empty_message_test.py diff --git a/src/python/grpcio/tests/tests.json b/src/python/grpcio/tests/tests.json index 8dc47bf69dd..53b2998b786 100644 --- a/src/python/grpcio/tests/tests.json +++ b/src/python/grpcio/tests/tests.json @@ -28,6 +28,7 @@ "_crust_over_core_over_links_face_interface_test.GenericInvokerFutureInvocationAsynchronousEventServiceTest", "_crust_over_core_over_links_face_interface_test.MultiCallableInvokerBlockingInvocationInlineServiceTest", "_crust_over_core_over_links_face_interface_test.MultiCallableInvokerFutureInvocationAsynchronousEventServiceTest", + "_empty_message_test.EmptyMessageTest", "_face_interface_test.DynamicInvokerBlockingInvocationInlineServiceTest", "_face_interface_test.DynamicInvokerFutureInvocationAsynchronousEventServiceTest", "_face_interface_test.GenericInvokerBlockingInvocationInlineServiceTest", diff --git a/src/python/grpcio/tests/unit/_empty_message_test.py b/src/python/grpcio/tests/unit/_empty_message_test.py new file mode 100644 index 00000000000..f324f6216b7 --- /dev/null +++ b/src/python/grpcio/tests/unit/_empty_message_test.py @@ -0,0 +1,137 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import unittest + +import grpc +from grpc.framework.foundation import logging_pool + +from tests.unit.framework.common import test_constants + +_REQUEST = b'' +_RESPONSE = b'' + +_UNARY_UNARY = b'/test/UnaryUnary' +_UNARY_STREAM = b'/test/UnaryStream' +_STREAM_UNARY = b'/test/StreamUnary' +_STREAM_STREAM = b'/test/StreamStream' + + +def handle_unary_unary(request, servicer_context): + return _RESPONSE + + +def handle_unary_stream(request, servicer_context): + for _ in range(test_constants.STREAM_LENGTH): + yield _RESPONSE + + +def handle_stream_unary(request_iterator, servicer_context): + for request in request_iterator: + pass + return _RESPONSE + + +def handle_stream_stream(request_iterator, servicer_context): + for request in request_iterator: + yield _RESPONSE + + +class _MethodHandler(grpc.RpcMethodHandler): + + def __init__(self, request_streaming, response_streaming): + self.request_streaming = request_streaming + self.response_streaming = response_streaming + self.request_deserializer = None + self.response_serializer = None + self.unary_unary = None + self.unary_stream = None + self.stream_unary = None + self.stream_stream = None + if self.request_streaming and self.response_streaming: + self.stream_stream = handle_stream_stream + elif self.request_streaming: + self.stream_unary = handle_stream_unary + elif self.response_streaming: + self.unary_stream = handle_unary_stream + else: + self.unary_unary = handle_unary_unary + + +class _GenericHandler(grpc.GenericRpcHandler): + + def service(self, handler_call_details): + if handler_call_details.method == _UNARY_UNARY: + return _MethodHandler(False, False) + elif handler_call_details.method == _UNARY_STREAM: + return _MethodHandler(False, True) + elif handler_call_details.method == _STREAM_UNARY: + return _MethodHandler(True, False) + elif handler_call_details.method == _STREAM_STREAM: + return _MethodHandler(True, True) + else: + return None + + +class EmptyMessageTest(unittest.TestCase): + + def setUp(self): + self._server_pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY) + self._server = grpc.server((_GenericHandler(),), self._server_pool) + port = self._server.add_insecure_port('[::]:0') + self._server.start() + self._channel = grpc.insecure_channel('localhost:%d' % port) + + def tearDown(self): + self._server.stop(0) + + def testUnaryUnary(self): + response = self._channel.unary_unary(_UNARY_UNARY)(_REQUEST) + self.assertEqual(_RESPONSE, response) + + def testUnaryStream(self): + response_iterator = self._channel.unary_stream(_UNARY_STREAM)(_REQUEST) + self.assertSequenceEqual( + [_RESPONSE] * test_constants.STREAM_LENGTH, list(response_iterator)) + + def testStreamUnary(self): + response = self._channel.stream_unary(_STREAM_UNARY)( + [_REQUEST] * test_constants.STREAM_LENGTH) + self.assertEqual(_RESPONSE, response) + + def testStreamStream(self): + response_iterator = self._channel.stream_stream(_STREAM_STREAM)( + [_REQUEST] * test_constants.STREAM_LENGTH) + self.assertSequenceEqual( + [_RESPONSE] * test_constants.STREAM_LENGTH, list(response_iterator)) + + +if __name__ == '__main__': + unittest.main(verbosity=2) + From dbaf05e13d1f98db9329f3e04d80d1b90e9ee231 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Sun, 12 Jun 2016 22:16:56 -0700 Subject: [PATCH 1032/1894] Add a test of connecting many times in a row --- Makefile | 36 ++++ build.yaml | 10 + .../surface/concurrent_connectivity_test.c | 62 +++--- .../surface/sequential_connectivity_test.c | 175 +++++++++++++++ tools/run_tests/sources_and_headers.json | 16 ++ tools/run_tests/tests.json | 21 ++ vsprojects/buildtests_c.sln | 27 +++ .../sequential_connectivity_test.vcxproj | 199 ++++++++++++++++++ ...quential_connectivity_test.vcxproj.filters | 21 ++ 9 files changed, 536 insertions(+), 31 deletions(-) create mode 100644 test/core/surface/sequential_connectivity_test.c create mode 100644 vsprojects/vcxproj/test/sequential_connectivity_test/sequential_connectivity_test.vcxproj create mode 100644 vsprojects/vcxproj/test/sequential_connectivity_test/sequential_connectivity_test.vcxproj.filters diff --git a/Makefile b/Makefile index a8facad99d4..8df8648f994 100644 --- a/Makefile +++ b/Makefile @@ -977,6 +977,7 @@ no_server_test: $(BINDIR)/$(CONFIG)/no_server_test resolve_address_test: $(BINDIR)/$(CONFIG)/resolve_address_test secure_channel_create_test: $(BINDIR)/$(CONFIG)/secure_channel_create_test secure_endpoint_test: $(BINDIR)/$(CONFIG)/secure_endpoint_test +sequential_connectivity_test: $(BINDIR)/$(CONFIG)/sequential_connectivity_test server_chttp2_test: $(BINDIR)/$(CONFIG)/server_chttp2_test server_fuzzer: $(BINDIR)/$(CONFIG)/server_fuzzer server_test: $(BINDIR)/$(CONFIG)/server_test @@ -1300,6 +1301,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/resolve_address_test \ $(BINDIR)/$(CONFIG)/secure_channel_create_test \ $(BINDIR)/$(CONFIG)/secure_endpoint_test \ + $(BINDIR)/$(CONFIG)/sequential_connectivity_test \ $(BINDIR)/$(CONFIG)/server_chttp2_test \ $(BINDIR)/$(CONFIG)/server_test \ $(BINDIR)/$(CONFIG)/set_initial_connect_string_test \ @@ -1612,6 +1614,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/secure_channel_create_test || ( echo test secure_channel_create_test failed ; exit 1 ) $(E) "[RUN] Testing secure_endpoint_test" $(Q) $(BINDIR)/$(CONFIG)/secure_endpoint_test || ( echo test secure_endpoint_test failed ; exit 1 ) + $(E) "[RUN] Testing sequential_connectivity_test" + $(Q) $(BINDIR)/$(CONFIG)/sequential_connectivity_test || ( echo test sequential_connectivity_test failed ; exit 1 ) $(E) "[RUN] Testing server_chttp2_test" $(Q) $(BINDIR)/$(CONFIG)/server_chttp2_test || ( echo test server_chttp2_test failed ; exit 1 ) $(E) "[RUN] Testing server_test" @@ -9257,6 +9261,38 @@ endif endif +SEQUENTIAL_CONNECTIVITY_TEST_SRC = \ + test/core/surface/sequential_connectivity_test.c \ + +SEQUENTIAL_CONNECTIVITY_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(SEQUENTIAL_CONNECTIVITY_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/sequential_connectivity_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/sequential_connectivity_test: $(SEQUENTIAL_CONNECTIVITY_TEST_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) $(SEQUENTIAL_CONNECTIVITY_TEST_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)/sequential_connectivity_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/surface/sequential_connectivity_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_sequential_connectivity_test: $(SEQUENTIAL_CONNECTIVITY_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(SEQUENTIAL_CONNECTIVITY_TEST_OBJS:.o=.dep) +endif +endif + + SERVER_CHTTP2_TEST_SRC = \ test/core/surface/server_chttp2_test.c \ diff --git a/build.yaml b/build.yaml index 29db148c52d..96086ea7dc0 100644 --- a/build.yaml +++ b/build.yaml @@ -2133,6 +2133,16 @@ targets: - grpc - gpr_test_util - gpr +- name: sequential_connectivity_test + build: test + language: c + src: + - test/core/surface/sequential_connectivity_test.c + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr - name: server_chttp2_test build: test language: c diff --git a/test/core/surface/concurrent_connectivity_test.c b/test/core/surface/concurrent_connectivity_test.c index 4ddca2103ac..f447a688875 100644 --- a/test/core/surface/concurrent_connectivity_test.c +++ b/test/core/surface/concurrent_connectivity_test.c @@ -1,35 +1,35 @@ /* -* -* Copyright 2016, Google Inc. -* All rights reserved. -* -* Redistribution and use in source and binary forms, with or without -* modification, are permitted provided that the following conditions are -* met: -* -* * Redistributions of source code must retain the above copyright -* notice, this list of conditions and the following disclaimer. -* * Redistributions in binary form must reproduce the above -* copyright notice, this list of conditions and the following disclaimer -* in the documentation and/or other materials provided with the -* distribution. -* * Neither the name of Google Inc. nor the names of its -* contributors may be used to endorse or promote products derived from -* this software without specific prior written permission. -* -* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -* -*/ + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ #include #include diff --git a/test/core/surface/sequential_connectivity_test.c b/test/core/surface/sequential_connectivity_test.c new file mode 100644 index 00000000000..0da10fd7c5d --- /dev/null +++ b/test/core/surface/sequential_connectivity_test.c @@ -0,0 +1,175 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include +#include + +#include "src/core/lib/channel/channel_args.h" +#include "test/core/end2end/data/ssl_test_data.h" +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" + +typedef struct test_fixture { + const char *name; + void (*add_server_port)(grpc_server *server, const char *addr); + grpc_channel *(*create_channel)(const char *addr); +} test_fixture; + +#define NUM_CONNECTIONS 1000 + +typedef struct { + grpc_server *server; + grpc_completion_queue *cq; +} server_thread_args; + +static void server_thread_func(void *args) { + server_thread_args *a = args; + grpc_event ev = grpc_completion_queue_next( + a->cq, gpr_inf_future(GPR_CLOCK_REALTIME), NULL); + GPR_ASSERT(ev.type == GRPC_OP_COMPLETE); + GPR_ASSERT(ev.tag == NULL); + GPR_ASSERT(ev.success == true); +} + +static void run_test(const test_fixture *fixture) { + gpr_log(GPR_INFO, "TEST: %s", fixture->name); + + grpc_init(); + + char *addr; + gpr_join_host_port(&addr, "::", grpc_pick_unused_port_or_die()); + + grpc_server *server = grpc_server_create(NULL, NULL); + fixture->add_server_port(server, addr); + grpc_completion_queue *server_cq = grpc_completion_queue_create(NULL); + grpc_server_register_completion_queue(server, server_cq, NULL); + grpc_server_start(server); + + server_thread_args sta = {server, server_cq}; + gpr_thd_id server_thread; + gpr_thd_options thdopt = gpr_thd_options_default(); + gpr_thd_options_set_joinable(&thdopt); + gpr_thd_new(&server_thread, server_thread_func, &sta, &thdopt); + + grpc_completion_queue *cq = grpc_completion_queue_create(NULL); + grpc_channel *channels[NUM_CONNECTIONS]; + for (size_t i = 0; i < NUM_CONNECTIONS; i++) { + channels[i] = fixture->create_channel(addr); + + gpr_timespec connect_deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(30); + grpc_connectivity_state state; + while ((state = grpc_channel_check_connectivity_state(channels[i], 1)) != + GRPC_CHANNEL_READY) { + grpc_channel_watch_connectivity_state(channels[i], state, + connect_deadline, cq, NULL); + grpc_event ev = grpc_completion_queue_next( + cq, gpr_inf_future(GPR_CLOCK_REALTIME), NULL); + GPR_ASSERT(ev.type == GRPC_OP_COMPLETE); + GPR_ASSERT(ev.tag == NULL); + GPR_ASSERT(ev.success == true); + } + } + + grpc_server_shutdown_and_notify(server, server_cq, NULL); + gpr_thd_join(server_thread); + + grpc_completion_queue_shutdown(server_cq); + grpc_completion_queue_shutdown(cq); + + while (grpc_completion_queue_next(server_cq, + gpr_inf_future(GPR_CLOCK_REALTIME), NULL) + .type != GRPC_QUEUE_SHUTDOWN) + ; + while ( + grpc_completion_queue_next(cq, gpr_inf_future(GPR_CLOCK_REALTIME), NULL) + .type != GRPC_QUEUE_SHUTDOWN) + ; + + for (size_t i = 0; i < NUM_CONNECTIONS; i++) { + grpc_channel_destroy(channels[i]); + } + + grpc_server_destroy(server); + grpc_completion_queue_destroy(server_cq); + grpc_completion_queue_destroy(cq); + + grpc_shutdown(); +} + +static void insecure_test_add_port(grpc_server *server, const char *addr) { + grpc_server_add_insecure_http2_port(server, addr); +} + +static grpc_channel *insecure_test_create_channel(const char *addr) { + return grpc_insecure_channel_create(addr, NULL, NULL); +} + +static const test_fixture insecure_test = { + "insecure", insecure_test_add_port, insecure_test_create_channel, +}; + +static void secure_test_add_port(grpc_server *server, const char *addr) { + grpc_ssl_pem_key_cert_pair pem_cert_key_pair = {test_server1_key, + test_server1_cert}; + grpc_server_credentials *ssl_creds = + grpc_ssl_server_credentials_create(NULL, &pem_cert_key_pair, 1, 0, NULL); + grpc_server_add_secure_http2_port(server, addr, ssl_creds); +} + +static grpc_channel *secure_test_create_channel(const char *addr) { + grpc_channel_credentials *ssl_creds = + grpc_ssl_credentials_create(NULL, NULL, NULL); + grpc_arg ssl_name_override = {GRPC_ARG_STRING, + GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, + {"foo.test.google.fr"}}; + grpc_channel_args *new_client_args = + grpc_channel_args_copy_and_add(NULL, &ssl_name_override, 1); + grpc_channel *channel = + grpc_secure_channel_create(ssl_creds, addr, new_client_args, NULL); + grpc_channel_args_destroy(new_client_args); + return channel; +} + +static const test_fixture secure_test = { + "secure", secure_test_add_port, secure_test_create_channel, +}; + +int main(int argc, char **argv) { + grpc_test_init(argc, argv); + + run_test(&insecure_test); + run_test(&secure_test); +} diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 3c6bcc3db46..1a0bc496387 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -1440,6 +1440,22 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "sequential_connectivity_test", + "src": [ + "test/core/surface/sequential_connectivity_test.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 67fddc712a6..c441e7731ed 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -1491,6 +1491,27 @@ "windows" ] }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "sequential_connectivity_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index a4a33205a2a..3288a74b88d 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -1209,6 +1209,17 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "secure_endpoint_test", "vcx {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "sequential_connectivity_test", "vcxproj\test\sequential_connectivity_test\sequential_connectivity_test.vcxproj", "{F164F666-C866-D607-E1DF-E7BF3CF98255}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "server_chttp2_test", "vcxproj\test\server_chttp2_test\server_chttp2_test.vcxproj", "{BF9F909B-8266-6AAC-A81B-05F8210AA8CA}" ProjectSection(myProperties) = preProject lib = "False" @@ -3232,6 +3243,22 @@ Global {A7747106-A6BC-62D4-2A21-04A4F0CC2683}.Release-DLL|Win32.Build.0 = Release|Win32 {A7747106-A6BC-62D4-2A21-04A4F0CC2683}.Release-DLL|x64.ActiveCfg = Release|x64 {A7747106-A6BC-62D4-2A21-04A4F0CC2683}.Release-DLL|x64.Build.0 = Release|x64 + {F164F666-C866-D607-E1DF-E7BF3CF98255}.Debug|Win32.ActiveCfg = Debug|Win32 + {F164F666-C866-D607-E1DF-E7BF3CF98255}.Debug|x64.ActiveCfg = Debug|x64 + {F164F666-C866-D607-E1DF-E7BF3CF98255}.Release|Win32.ActiveCfg = Release|Win32 + {F164F666-C866-D607-E1DF-E7BF3CF98255}.Release|x64.ActiveCfg = Release|x64 + {F164F666-C866-D607-E1DF-E7BF3CF98255}.Debug|Win32.Build.0 = Debug|Win32 + {F164F666-C866-D607-E1DF-E7BF3CF98255}.Debug|x64.Build.0 = Debug|x64 + {F164F666-C866-D607-E1DF-E7BF3CF98255}.Release|Win32.Build.0 = Release|Win32 + {F164F666-C866-D607-E1DF-E7BF3CF98255}.Release|x64.Build.0 = Release|x64 + {F164F666-C866-D607-E1DF-E7BF3CF98255}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {F164F666-C866-D607-E1DF-E7BF3CF98255}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {F164F666-C866-D607-E1DF-E7BF3CF98255}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {F164F666-C866-D607-E1DF-E7BF3CF98255}.Debug-DLL|x64.Build.0 = Debug|x64 + {F164F666-C866-D607-E1DF-E7BF3CF98255}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {F164F666-C866-D607-E1DF-E7BF3CF98255}.Release-DLL|Win32.Build.0 = Release|Win32 + {F164F666-C866-D607-E1DF-E7BF3CF98255}.Release-DLL|x64.ActiveCfg = Release|x64 + {F164F666-C866-D607-E1DF-E7BF3CF98255}.Release-DLL|x64.Build.0 = Release|x64 {BF9F909B-8266-6AAC-A81B-05F8210AA8CA}.Debug|Win32.ActiveCfg = Debug|Win32 {BF9F909B-8266-6AAC-A81B-05F8210AA8CA}.Debug|x64.ActiveCfg = Debug|x64 {BF9F909B-8266-6AAC-A81B-05F8210AA8CA}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/test/sequential_connectivity_test/sequential_connectivity_test.vcxproj b/vsprojects/vcxproj/test/sequential_connectivity_test/sequential_connectivity_test.vcxproj new file mode 100644 index 00000000000..2367b3ea08c --- /dev/null +++ b/vsprojects/vcxproj/test/sequential_connectivity_test/sequential_connectivity_test.vcxproj @@ -0,0 +1,199 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {F164F666-C866-D607-E1DF-E7BF3CF98255} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + sequential_connectivity_test + static + Debug + static + Debug + + + sequential_connectivity_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/sequential_connectivity_test/sequential_connectivity_test.vcxproj.filters b/vsprojects/vcxproj/test/sequential_connectivity_test/sequential_connectivity_test.vcxproj.filters new file mode 100644 index 00000000000..e2b0d038a6a --- /dev/null +++ b/vsprojects/vcxproj/test/sequential_connectivity_test/sequential_connectivity_test.vcxproj.filters @@ -0,0 +1,21 @@ + + + + + test\core\surface + + + + + + {432df9fa-0f9a-912a-8413-adc38d9c27ca} + + + {42030451-0f78-add5-87be-b81131bcc0f5} + + + {34047576-8f8d-eeb2-d596-35be59941f62} + + + + From 58e589644403b10afb31ffd45befabe13b652db8 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Mon, 13 Jun 2016 00:52:56 -0700 Subject: [PATCH 1033/1894] Fix bad merge --- src/core/lib/iomgr/ev_epoll_linux.c | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 617afad1975..a8a874cd4b0 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -550,14 +550,14 @@ polling_island *polling_island_merge(polling_island *p, polling_island *q) { /* Wakeup all the pollers (if any) on p so that they can pickup this change */ polling_island_add_wakeup_fd_locked(p, &polling_island_wakeup_fd); + p->merged_to = q; + /* - The merged polling island (i.e q) inherits all the ref counts of the island merging with it (i.e p) - The island p will lose a ref count */ q->ref_cnt += p->ref_cnt; - p->ref_cnt--; - - gpr_mu_unlock(&p->mu); - gpr_mu_unlock(&q->mu); + polling_island_unref_and_unlock(p, 1); /* Decrement refcount */ + polling_island_unref_and_unlock(q, 0); /* Just Unlock. Don't decrement ref */ return q; } @@ -1110,7 +1110,7 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, Acquire the following locks: - pollset->mu (which we already have) - pollset->pi_mu - - pollset->polling_island->mu */ + - pollset->polling_island->mu (call polling_island_update_and_lock())*/ gpr_mu_lock(&pollset->pi_mu); pi = pollset->polling_island; @@ -1144,8 +1144,7 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, } } - int i; - for (i = 0; i < ep_rv; ++i) { + for (int i = 0; i < ep_rv; ++i) { void *data_ptr = ep_ev[i].data.ptr; if (data_ptr == &grpc_global_wakeup_fd) { grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); @@ -1177,7 +1176,7 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, * gets updated whenever the underlying polling island is merged with another * island and while we are doing epoll_wait() above, the polling island may * have been merged */ - polling_island_update_and_lock(pi, 1, 0); /* No new ref added */ + pi = polling_island_update_and_lock(pi, 1, 0); /* No new ref added */ polling_island_unref_and_unlock(pi, 1); GPR_TIMER_END("pollset_work_and_unlock", 0); From a286b040a90d4a17cb4bb5c51e0dbe09de0a713b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 13 Jun 2016 15:20:39 +0000 Subject: [PATCH 1034/1894] small fixes --- src/core/lib/surface/call.c | 3 +++ src/core/lib/surface/completion_queue.c | 7 ++++++- src/core/lib/surface/completion_queue.h | 2 ++ src/core/lib/surface/init.c | 1 + test/core/surface/sequential_connectivity_test.c | 2 +- tools/run_tests/performance/kill_workers.sh | 10 +++++----- 6 files changed, 18 insertions(+), 7 deletions(-) diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index f65d962fa82..fd3876eb7de 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1109,6 +1109,9 @@ static void receiving_slice_ready(grpc_exec_ctx *exec_ctx, void *bctlp, call->receiving_slice); continue_receiving_slices(exec_ctx, bctl); } else { + if (grpc_trace_operation_failures) { + GRPC_LOG_IF_ERROR("receiving_slice_ready", GRPC_ERROR_REF(error)); + } grpc_byte_stream_destroy(exec_ctx, call->receiving_stream); call->receiving_stream = NULL; grpc_byte_buffer_destroy(*call->receiving_buffer); diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index ecc127876b1..eaad6148425 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -50,6 +50,8 @@ #include "src/core/lib/surface/event_string.h" #include "src/core/lib/surface/surface_trace.h" +int grpc_trace_operation_failures; + typedef struct { grpc_pollset_worker **worker; void *tag; @@ -231,12 +233,15 @@ void grpc_cq_end_op(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc, #endif GPR_TIMER_BEGIN("grpc_cq_end_op", 0); - if (grpc_api_trace) { + if (grpc_api_trace || (grpc_trace_operation_failures && error != GRPC_ERROR_NONE)) { const char *errmsg = grpc_error_string(error); GRPC_API_TRACE( "grpc_cq_end_op(exec_ctx=%p, cc=%p, tag=%p, error=%s, done=%p, " "done_arg=%p, storage=%p)", 7, (exec_ctx, cc, tag, errmsg, done, done_arg, storage)); + if (grpc_trace_operation_failures) { + gpr_log(GPR_ERROR, "Operation failed: tag=%p, error=%s", tag, errmsg); + } grpc_error_free_string(errmsg); } diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index a866858cb5b..b9dd1092b68 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -39,6 +39,8 @@ #include #include "src/core/lib/iomgr/pollset.h" +extern int grpc_trace_operation_failures; + typedef struct grpc_cq_completion { /** user supplied tag */ void *tag; diff --git a/src/core/lib/surface/init.c b/src/core/lib/surface/init.c index 1c8b7090156..f07039cb94c 100644 --- a/src/core/lib/surface/init.c +++ b/src/core/lib/surface/init.c @@ -165,6 +165,7 @@ void grpc_init(void) { &grpc_trace_channel_stack_builder); grpc_register_tracer("http1", &grpc_http1_trace); grpc_register_tracer("compression", &grpc_compression_trace); + grpc_register_tracer("op_failure", &grpc_trace_operation_failures); grpc_security_pre_init(); grpc_iomgr_init(); grpc_executor_init(); diff --git a/test/core/surface/sequential_connectivity_test.c b/test/core/surface/sequential_connectivity_test.c index 0da10fd7c5d..0354cfa1e05 100644 --- a/test/core/surface/sequential_connectivity_test.c +++ b/test/core/surface/sequential_connectivity_test.c @@ -70,7 +70,7 @@ static void run_test(const test_fixture *fixture) { grpc_init(); char *addr; - gpr_join_host_port(&addr, "::", grpc_pick_unused_port_or_die()); + gpr_join_host_port(&addr, "localhost", grpc_pick_unused_port_or_die()); grpc_server *server = grpc_server_create(NULL, NULL); fixture->add_server_port(server, addr); diff --git a/tools/run_tests/performance/kill_workers.sh b/tools/run_tests/performance/kill_workers.sh index f306f0c9912..279cc7df294 100755 --- a/tools/run_tests/performance/kill_workers.sh +++ b/tools/run_tests/performance/kill_workers.sh @@ -39,19 +39,19 @@ cd $(dirname $0)/../../.. killall -9 qps_worker || true # C# -ps -C mono -o pid=,cmd= | grep QpsWorker | awk '{print $1}' | xargs kill -9 +ps -C mono -o pid=,cmd= | grep QpsWorker | awk '{print $1}' | xargs kill -9 || true # Ruby -ps -C ruby -o pid=,cmd= | grep 'qps/worker.rb' | awk '{print $1}' | xargs kill -9 +ps -C ruby -o pid=,cmd= | grep 'qps/worker.rb' | awk '{print $1}' | xargs kill -9 || true # Node -ps -C node -o pid=,cmd= | grep 'performance/worker.js' | awk '{print $1}' | xargs kill -9 +ps -C node -o pid=,cmd= | grep 'performance/worker.js' | awk '{print $1}' | xargs kill -9 || true # Python -ps -C python -o pid=,cmd= | grep 'qps_worker.py' | awk '{print $1}' | xargs kill -9 +ps -C python -o pid=,cmd= | grep 'qps_worker.py' | awk '{print $1}' | xargs kill -9 || true # Java -jps | grep LoadWorker | awk '{print $1}' | xargs kill -9 +jps | grep LoadWorker | awk '{print $1}' | xargs kill -9 || true # Go killall -9 worker || true From fb2a5df57eb6abcc27bff77d6e13ad4c4ce7f594 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 13 Jun 2016 15:30:55 +0000 Subject: [PATCH 1035/1894] Corpus --- .../0170e921ff5d052b228a26529116ea47fe9d3f0b | Bin 0 -> 526 bytes .../0963f5f7578c64e9c17d0ad9e4a99ced875cf813 | Bin 0 -> 72 bytes .../0b151bf8080f87bd38c9b8521b3b96c40c708463 | Bin 0 -> 524 bytes .../10f53c34f02d8c051fe0b8759aec08057433a497 | Bin 0 -> 572 bytes .../1727c0f6369bfb17d1b40ffa3d3f6b8be8a45c62 | Bin 0 -> 784 bytes .../1b09a1e5994952cda58b8339492f6850936a61f4 | Bin 0 -> 849 bytes .../282003073c8b88d7ad43ce75677777cdb754228c | Bin 0 -> 525 bytes .../2aaee068ca624dcb746af9dc14591b24db033ffc | Bin 0 -> 528 bytes .../350a1f6d0fe784667d7ae78e1ed783cdf2263bfd | Bin 0 -> 555 bytes .../368f9368e43f7e743653d46360836b3db1b1ba8a | Bin 0 -> 532 bytes .../36dea0ab5bc764c2eb2f428bcbe2786e64da8bd3 | Bin 0 -> 592 bytes .../3dc1bcb27ed0616a2b905025a8898759d94a934d | Bin 0 -> 700 bytes .../4d5e7091c1c67867f2760543d9a8a7256007bdef | Bin 0 -> 867 bytes .../4e8dbf3eb7d11a4fdb994f281454be2a7ebb091c | Bin 0 -> 531 bytes .../4eedb47e422ce761fc5b279582e56c7d1f3ed180 | Bin 0 -> 744 bytes .../5967be7b53e3bac677c726d30a513949e06e1fde | Bin 0 -> 402 bytes .../598c513564bc043f831876ea61cb8283d43f6726 | Bin 0 -> 467 bytes .../6619768ddd830ebe29021e827961fddb78751086 | Bin 0 -> 550 bytes .../7590589db6b56b4e7db9333fba8d723b6461e0a6 | Bin 0 -> 524 bytes .../85a50177266a832eca0563d37ccb03890f12c665 | Bin 0 -> 546 bytes .../85afba0cb1eb440ed95ee5793a70c7e5d8465148 | Bin 0 -> 593 bytes .../8bdd4dc6dee56fb6965655425ca378f784a42b6a | Bin 0 -> 267 bytes .../8c6776521d0f100708ecb9f8504e572d586b8a21 | Bin 0 -> 534 bytes .../908b1f170a721682465838d0c0eca40810beb722 | Bin 0 -> 790 bytes .../92882ccad7fc3e7bc1df7dfa5954a6d591d5dbc2 | Bin 0 -> 524 bytes .../9345e2de4f0476428d941c53013535fbda8a2bca | Bin 0 -> 849 bytes .../9b014aa18fb8c033458b6d5fdb351e60d16e8bce | Bin 0 -> 553 bytes .../a151b36f390273fb440d2e35ab93acc5540bfed6 | Bin 0 -> 530 bytes .../a1b0fdbc2160dfe8c1eed409eb60042c819a843a | Bin 0 -> 545 bytes .../a44288607b76ce6df9fe7e196138a587cf4badc9 | Bin 0 -> 527 bytes .../b2c5f4f8e2129a4201b2525cba8723241bbd8c79 | Bin 0 -> 467 bytes .../b51db02b904ceee344fe48179d0c784c59ca2934 | Bin 0 -> 705 bytes .../b6ce8604e3c14c6867cd2a78cef144ddd2fbb4c1 | Bin 0 -> 468 bytes .../c8b5d9fdb7ade3538abb794a3231d5777a1640a4 | Bin 0 -> 230 bytes .../cea57d6a128cc7cd195cb2390bfde28047d6acf8 | Bin 0 -> 291 bytes .../d07965987a51541498871433e0fc6313884569d3 | Bin 0 -> 548 bytes .../d425e534ec074932b5cf4dc9a6cf4fc0683fd690 | Bin 0 -> 554 bytes .../d8f08b0e061e86e94650aa16f99cae81cd696ca3 | Bin 0 -> 581 bytes .../dbcaf0a6bd4960e8d0c518494b89bd9b941cfc8e | Bin 0 -> 524 bytes .../ddc34d5e97ac12572e6c39a336d219d91fa992b1 | Bin 0 -> 790 bytes .../e8b1814f9a0942322aeb190ae0ad35105784e101 | Bin 0 -> 528 bytes .../e8bc4c1b1ffb23de5af2c8fe20599c05f94567ad | Bin 0 -> 524 bytes .../eab5589ebcdd4596996f0a6de6408a0f3e13437b | Bin 0 -> 475 bytes .../f6d8d78857d868c2f477da7506a1976354f2631d | Bin 0 -> 877 bytes .../fb324303c6d5819d6f353f78d087e29adba51836 | Bin 0 -> 375 bytes tools/run_tests/tests.json | 765 ++++++++++++++++++ 46 files changed, 765 insertions(+) create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/0170e921ff5d052b228a26529116ea47fe9d3f0b create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/0963f5f7578c64e9c17d0ad9e4a99ced875cf813 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/0b151bf8080f87bd38c9b8521b3b96c40c708463 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/10f53c34f02d8c051fe0b8759aec08057433a497 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/1727c0f6369bfb17d1b40ffa3d3f6b8be8a45c62 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/1b09a1e5994952cda58b8339492f6850936a61f4 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/282003073c8b88d7ad43ce75677777cdb754228c create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/2aaee068ca624dcb746af9dc14591b24db033ffc create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/350a1f6d0fe784667d7ae78e1ed783cdf2263bfd create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/368f9368e43f7e743653d46360836b3db1b1ba8a create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/36dea0ab5bc764c2eb2f428bcbe2786e64da8bd3 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/3dc1bcb27ed0616a2b905025a8898759d94a934d create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/4d5e7091c1c67867f2760543d9a8a7256007bdef create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/4e8dbf3eb7d11a4fdb994f281454be2a7ebb091c create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/4eedb47e422ce761fc5b279582e56c7d1f3ed180 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/5967be7b53e3bac677c726d30a513949e06e1fde create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/598c513564bc043f831876ea61cb8283d43f6726 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/6619768ddd830ebe29021e827961fddb78751086 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/7590589db6b56b4e7db9333fba8d723b6461e0a6 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/85a50177266a832eca0563d37ccb03890f12c665 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/85afba0cb1eb440ed95ee5793a70c7e5d8465148 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/8bdd4dc6dee56fb6965655425ca378f784a42b6a create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/8c6776521d0f100708ecb9f8504e572d586b8a21 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/908b1f170a721682465838d0c0eca40810beb722 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/92882ccad7fc3e7bc1df7dfa5954a6d591d5dbc2 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/9345e2de4f0476428d941c53013535fbda8a2bca create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/9b014aa18fb8c033458b6d5fdb351e60d16e8bce create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/a151b36f390273fb440d2e35ab93acc5540bfed6 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/a1b0fdbc2160dfe8c1eed409eb60042c819a843a create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/a44288607b76ce6df9fe7e196138a587cf4badc9 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/b2c5f4f8e2129a4201b2525cba8723241bbd8c79 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/b51db02b904ceee344fe48179d0c784c59ca2934 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/b6ce8604e3c14c6867cd2a78cef144ddd2fbb4c1 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/c8b5d9fdb7ade3538abb794a3231d5777a1640a4 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/cea57d6a128cc7cd195cb2390bfde28047d6acf8 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/d07965987a51541498871433e0fc6313884569d3 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/d425e534ec074932b5cf4dc9a6cf4fc0683fd690 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/d8f08b0e061e86e94650aa16f99cae81cd696ca3 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/dbcaf0a6bd4960e8d0c518494b89bd9b941cfc8e create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/ddc34d5e97ac12572e6c39a336d219d91fa992b1 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/e8b1814f9a0942322aeb190ae0ad35105784e101 create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/e8bc4c1b1ffb23de5af2c8fe20599c05f94567ad create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/eab5589ebcdd4596996f0a6de6408a0f3e13437b create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/f6d8d78857d868c2f477da7506a1976354f2631d create mode 100644 test/core/end2end/fuzzers/api_fuzzer_corpus/fb324303c6d5819d6f353f78d087e29adba51836 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/0170e921ff5d052b228a26529116ea47fe9d3f0b b/test/core/end2end/fuzzers/api_fuzzer_corpus/0170e921ff5d052b228a26529116ea47fe9d3f0b new file mode 100644 index 0000000000000000000000000000000000000000..e837f03018598a588e7518f7aae1a7c0dc4ec791 GIT binary patch literal 526 zcmZuuJxc>Y6r5dj*^6>mij^M_Owbg977;n{F9;%79B1;-V2tryvH=?lQ;7fNDjT~r z{tcUJ)XKtESl{Io6kN7=yKiP^-i}U*9Wkue+KfW7mfd>&y`o{<@xi{OsJf?3WfTc4 zT!sPpXLcHjp^X&6snG`?mW8kn*Xv&P_qlA`)QWe%I{@(_)aEJoTaB~9pug4V^g1r- z#wlG5sn?>oH@r9zPZWtjSlZ%3`xoV`pR~^7L2}Zi_|tozcCM*St;@FX8ro3$Ktd$z z?itfn$)K9EIyAMBrx%%W2<0L#b4-L@uN0L=zKl7{YXhjMSekZ4gimP@_mT^WFXgYe z(;fl~@@g>7vl#?7_*4IX3nkzhtilZN!_!8u(Bsx Z!+#D2#z!rW)-pH%bpZh*1K0om3;>x069NDL literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/0b151bf8080f87bd38c9b8521b3b96c40c708463 b/test/core/end2end/fuzzers/api_fuzzer_corpus/0b151bf8080f87bd38c9b8521b3b96c40c708463 new file mode 100644 index 0000000000000000000000000000000000000000..8459a6629efdb2a4fb1db9a6329117fba8318253 GIT binary patch literal 524 zcmZuuu}T9$5PiGEWiQHMDOPGAn4l>HEh2K@F9<=fIL>4+!6e4H%LQyrA%2Kpag|Lv z8-K&*8nv?U1J+5RpyIH_?9O}h=FRGuI3)H}2+{&>NdoC+F+VjlTtecm->!-P0o60XZV1JxPP=cK8 zAPuT+^^sM+JeL2O??rI>O=gCp(tMyvknJ9oZ$!sr@TRCT%7Imnb+#kl2DB$&mU5nf M@5ka`qENTMCyWS@!vFvP literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/10f53c34f02d8c051fe0b8759aec08057433a497 b/test/core/end2end/fuzzers/api_fuzzer_corpus/10f53c34f02d8c051fe0b8759aec08057433a497 new file mode 100644 index 0000000000000000000000000000000000000000..471890c4c97aa39706cb04c4cdb619f7639ee9ba GIT binary patch literal 572 zcmaiy!Ab)$5QhI5YRFbuJc@Xz2(`P1)^m%j)JG_NfFAM!Dek_&f+BeKDfZ;0H$i*^ zuU__2#Ya$xlk7?h3MPAd0!~*^ca(}UJ!BGLS(7?Je)jQs`pDNP-FF%qa|%PpXPrON}?=N zhG*On#=<4*Bq08VQ{qS7`LfAhn#J$l=*&qaSUOr|)!D3nL*+JF0AGN(Ruv+vh2b9B eH`O!3BL>0<{vYtI=Fvt~|HuwSR;sx262LcjaG6p7 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/1727c0f6369bfb17d1b40ffa3d3f6b8be8a45c62 b/test/core/end2end/fuzzers/api_fuzzer_corpus/1727c0f6369bfb17d1b40ffa3d3f6b8be8a45c62 new file mode 100644 index 0000000000000000000000000000000000000000..8c8a1036b8653f765a2475ced3faf74e14828363 GIT binary patch literal 784 zcmZvaPm9w)7{;F&)?re+-9%wB7A=dy9x4*hk5F6$4c_s{eEMn+^T8E7Y^TGdFKmhSwt6$xdZ z^&e^Sn-8U`tb9IJ+k*nRFUCp;1F1ORoHqS3hh?C(Ic#+tKWF=Ye*k1|K-?Xf#h^Qm zj$b8@q(Cz7wVm$E#D}5E9uQuA(XxAc{^=H02Iv zL~$?=XA~T>QD!n+0=rz+OR{tep7uoE<9xThiM$J6ITn1p4K1)$#zm@BvQF#9(_5;3 z2d}+vM3Ir73dId=Z7Fybz6@p*Md65oDa}Xm7##;ZNU{)uD-_hM-*GojjmUNrMycNC zByFoBzc+adM~!mSwVxjJn{P!TneVE0iLU$)-U3zjIj#S=EllzTPD6aiEqjt=(z!^I z(*5qqNA^2YNa5vIsEMYp#c9vzqQe3AH>^HOVbVl+Sg~5>s@aL(U@O)FJ&i2)gT?Ng8^U-m8M0p(!qa(11AhSB C^V>N9 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/1b09a1e5994952cda58b8339492f6850936a61f4 b/test/core/end2end/fuzzers/api_fuzzer_corpus/1b09a1e5994952cda58b8339492f6850936a61f4 new file mode 100644 index 0000000000000000000000000000000000000000..86af616087ef837b9a5fc70975f7d745d99c863a GIT binary patch literal 849 zcmaizL5tHs6vzKFti!ZwaBm)41$SFCg5aeh5x>IXB8Y@EeY9b_X`G}9>(zkEf;Yd$ zp1k-0Joz2GbPoz1J$e{llD6Bj3x*tCCi8!9-v9SzH%KDLluS+r+DfSkhqN~Nb!+>5 z+m=xIn}e5{ya&&vY8M_$oemVp{$Le^fm9rDo*w-%hfTm44_VFc^83mU0_ORDW z)-R&e$Zt)@I?vh1w|G`A0tnt(5i@cPY_~#c7%9no3+cXM`y~ozu*t9SE~Ge}r`#&{ zi*d3s2uqbJKCe|PKGWIkD40+%@`ooGrC3|;GOgP4O)ytzE@A#3I!HL=OOXEqr-tpP literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/282003073c8b88d7ad43ce75677777cdb754228c b/test/core/end2end/fuzzers/api_fuzzer_corpus/282003073c8b88d7ad43ce75677777cdb754228c new file mode 100644 index 0000000000000000000000000000000000000000..154f3bd6f9ba654c2a2300be0f2c9883357a03da GIT binary patch literal 525 zcmZuuu}T9$6r5e+vKJ+!6sxEZG-!|%7K)ts3qlYqjx%}aVT|$J*5L>_FDw}j^ z{0*CH)Y=bN-(74(mn~*@XWpB)qhsQf7}jZRCN;8_)2)`PYMAu=^u&_iJkq8*@r71v zz<}Hvry7c(jR4VX(-(IaK-67P%l{8M)N5ZQ?NKL*hEWoQgCM56F%5eZ z497PY;)#4|P+QpIqW6y`8FkuMqp)`!B+d;eh@*SzQ}4Dfnzl9+zmSN?rccL=a#b^^ zgC$)v+Y?9cGU6C2^_>jiWVNaV(#RWF#)>w8Dm%sTAV@;Kq$C)IHx%5;M{(3219hqD zP4lb*&w9V`|F=*=hE=FY?Naw_J#F+l%{I?A%=!)n-(bmhtoWS5@rz% zr+&+=%~|F3spM70Rivdq#WEaimVRDmezteoe3U*089bpCDK??z2W%&T_l3-*qnxv; K3@{UCu)sGQ+LR;! literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/2aaee068ca624dcb746af9dc14591b24db033ffc b/test/core/end2end/fuzzers/api_fuzzer_corpus/2aaee068ca624dcb746af9dc14591b24db033ffc new file mode 100644 index 0000000000000000000000000000000000000000..ee202ea18148fef2b5104b08eba115ecd40517f5 GIT binary patch literal 528 zcmZuuy-or_5T4uMW)BS^u`yO6kpR&vEG#tUd+i@GY*g zp|df*h0Qf;?E|cH9F0GdEoOJ;oB8JZM2w`7Kp7$Ayn;$;-E5n(0I9D!3Lo9Zxsc_# z%Vm{4kbvfmv;d1hNKP2jI{2dQDq%Er8O>*X|N8-ev;)@BfTn>nOp@ub6GmYY`XevK zn;Av{deLm$V@~MufJ#A&^4U2i89F&;IQ4^TFY$XL^y2Uq`xs36jB$j-_z4+=O21wZ ztfHKPb-E!cvNbpOu1L?o(yrkp3`e`1X9BWq*n}-1fwyCFaXjJyG{B@8`D64ZtP_R( z89r}4mpB&1*$x~;YTt((JwuY_ZA Hpa8xBJ8YD0 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/350a1f6d0fe784667d7ae78e1ed783cdf2263bfd b/test/core/end2end/fuzzers/api_fuzzer_corpus/350a1f6d0fe784667d7ae78e1ed783cdf2263bfd new file mode 100644 index 0000000000000000000000000000000000000000..83f2053a9956142e9781c6735ed1cfb8a35254f6 GIT binary patch literal 555 zcmZWmv2GJV5PiD}t389Pl!z+9(#bx73y@M6p_BN9ND&gn>0*!U6ZXZ-p7#(fE)Wf0 zautocH2IA**8mj-AF#|hA&SImid{PsN!zb!zIA5$VWNM<(iCWL rqj#4!C#Ufj5n<3E>O7ATr&e7~*w%e9{6xB0>TLsVwl=~}VPb*5oST~R literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/368f9368e43f7e743653d46360836b3db1b1ba8a b/test/core/end2end/fuzzers/api_fuzzer_corpus/368f9368e43f7e743653d46360836b3db1b1ba8a new file mode 100644 index 0000000000000000000000000000000000000000..dae700917067da40b56008804157d0e2f1ff5661 GIT binary patch literal 532 zcmZuuJx?1!5Pdt4)t-Y+l!yv~WMM0D5eW(qI>cW?u-Y<#srv$*V2J>YolYZ|kO($P_@i4?K5zTyG*F9*u$k>%uu$!6^G zyF&pCn$s#__CBb^&akNYx4O(=@}O29wVrOPi3rsOK4OKe(jLW4Zc3XoC+AtU}mqzH+^a_&Zn#pQAt`+O2DmJ;z3 z_z$jVu1iD5Z%E??s3|Cy*>gAviII!9yYpt|y|FD=Di)Bp)-8KXB-N9lk1bsF?&uA1 z(tl-Lyi7E$w*v?Ew^CUcfprR$GvHrxyavQ1$I8~Pd(h(@*gOC%4`H62%6vRJE6e$d zQ9jGdJe#HkUoLny=5)3=KY1+RL>u%%0j(Q)Z#d6KXY*|QJ}tA8DW^sLfhRn^n5d4C zbzFS0V5KotpI!?tp%FJQhxcsH4VIq2tH=dRm3WomHHL9O7VQr1l??r(8!_#6O~3EVQl|Z>D&Tp)8*!C12S@#D z?d;GXQcuHb`!F|$LhHkUW=oh1?PkH&Syc(NuYcJ z|8NzJyGV#npryG6s3|Cy*>e;(S)ER^vu|eJycwMnm&CA6YqRW-wOk(dU8rHoH^Wm) zQTK&5;W83fXBP(KesZay7}|&-F+KXrXKO>E&m>yDo4Y)Cz{U>{KY)5V;cPUxD2nX) zAf2T}noQ%I-YsZ0qIkBrJb%ofNb(n)%<^o`g*=ZIoEGmgQ;ynF8 zV;arJ(#GJ_Q2v#qI@$8-C8IrI4Rw4^cT8{T=$CZ3fGQ&=Jvcf2&|4bKF1B%B8$h+} z@_Z^4ctS-yOD-v%i%y)57r>5W4XUQzLSTc99oW0P9-#!>gH_mC+ijpWdXHB7uOFGc zC-@lrCdyfV_ri%@rJn+DQZ)&bAia~zsP7(LvubuK`)>{O)6##0GaT)&39X{~XxRNM zH4SP6lFv`E3w3?$C)vt+$0&&pp_(7{!GYrH6P$(m_Nr>Mb9Ok;M)u@Z*H%>dd0oA% zqNljA6vyAameVDms3T%(iUh<0BQb)I5p%bS3W?$5IIpcm?1Zy@0oGcogv3Y5 z)P;?u6EiD|mx37i0LQbPR82|6$;0#A`@eVh{y)sfSTdj-qMY?eDPtdau8Sb;o4uEc zf_u+Vc4q;n^|nC*xgW+N2m>fNV9kL3nEf_j^**clTm1if06^w8h)0KJ8u>?gK7HcH zX`IL5SZDOEpfn<#7RiwBL;*MGwbwFr?@OAaX&AlLc{m)C&fMH{lja0MT^HvfVMaIHX*sVM2Ps zgEH}`0NCQHowAy5LPvF0;`O^AIC%g{z$O=83Q=O8zTExxdPnvj!g1#(QD*S0eXz22 z19*@C&&nzU!O68f264S(h;aQ0yL81%Tw`WqOgrSMiIdQL&;>WsJb^TaRRg%4>c*j=M0=Iw=&@Vz$dahg(;>mi#zIXKWs z2DXpp_x%#!1e^l#`4yw-;p4JG=hWU32mdNB{sl13HNed9>_5a@AT_9&YLHqGwaSt@ L2WyJO9)tB49Vq#t literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/4e8dbf3eb7d11a4fdb994f281454be2a7ebb091c b/test/core/end2end/fuzzers/api_fuzzer_corpus/4e8dbf3eb7d11a4fdb994f281454be2a7ebb091c new file mode 100644 index 0000000000000000000000000000000000000000..c2895f60f9655802f9f4beebf0c2eb62c91c169a GIT binary patch literal 531 zcmZuuJ!{-R5PiEi%jz5sm%&A_V{+sU`-&J`oCyjp@&^nikV441!Ipj2$)lAHyUh_o z{)?(K*SX2xNTVi6og!7(jC?l6kY$VccyH#-j4p^PVpy-WnRUrpu3im%N5fPf4i7Aa zy*Ju)W}(2k&#?gm^541APz-Iv5LTal^U=}}{*mzI-}#bg0S|G2_!-pB3Fpc1)VX|j zm}aR<<4IJ|Wl33b5glhGy<|`*^&Q7qkx$u4Iw?7IS8)03;b|Tx=aGw#ClnRwHH|5m zj%ASHf!QyLxy39L!gVBXX#2yF1k{(lroz6r z!B3)s^|y9$vahPW1F-+8i4|sYkM29s9S;2Z4Xb8tZvQNS?Y;Cb(F{*pOF@gU-aG7l kmOchG0;$*Du?KZCV%s_j;hx~RRf2}=d0?@yX9}>uKYRL>fB*mh literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/4eedb47e422ce761fc5b279582e56c7d1f3ed180 b/test/core/end2end/fuzzers/api_fuzzer_corpus/4eedb47e422ce761fc5b279582e56c7d1f3ed180 new file mode 100644 index 0000000000000000000000000000000000000000..e75ebcfda94df6afa76d98647ab562ec29205cf6 GIT binary patch literal 744 zcmZ{iv2GJV5QhI<;?>@PP6`zjvK1+Du5eIFTj(Mvptn+67iSb3qO-Mj))E!PNr@uS zQKhFrx{4+p65qT7&(+Ff}1#)Z!yZ03c5XG`PYNw_BN;+_!<_@>UPHgXnl}v?ohI@(nS?^Ou0M@$0BiwIN=RL d+w2O}et-J{uHr<69yBUMFggkj&-NU+{tY<;&bI&n literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/5967be7b53e3bac677c726d30a513949e06e1fde b/test/core/end2end/fuzzers/api_fuzzer_corpus/5967be7b53e3bac677c726d30a513949e06e1fde new file mode 100644 index 0000000000000000000000000000000000000000..76c0024049465bdfc87e8c46e0a6b1bae045de19 GIT binary patch literal 402 zcmXX?Jxc>Y5PiEQ%U(3W+A2ZuFqvOR^Fu=fmhWq+(}e;z@WO#aH8gKO82=KMKA0GUCZKOu&@J{|RbB!MLX-?bw#g zT0eV&Qs5p=Lp+{AkS{xFE}hf8wp1p0F-$btKAaHBs$~$}s%)r(nKPekc?w|zCkT$q zuN6Ouyoq&etciNTkq~K~JwpprP%WDZ>R-krB;QM4vZJIk+reS4Jts!AwnY@cahgXE zEAPjF?|!%5NaUNTb}Nu`BM!tC*~xFk=U6DKcneQAgY1Yk_&7g-JcFmv+bw*~8B}1P MOFF|Tpgk=90D<&+SO5S3 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/598c513564bc043f831876ea61cb8283d43f6726 b/test/core/end2end/fuzzers/api_fuzzer_corpus/598c513564bc043f831876ea61cb8283d43f6726 new file mode 100644 index 0000000000000000000000000000000000000000..9c9acf277733ff29477388aed44ddb939e28259a GIT binary patch literal 467 zcmZuuu}T9$5S?A(au+37S|*B;gm{IeA}1-tUI?PaabAYxFu6Nt_bzCwSojhCK`I+N z8-K&*8U;%~V4XxI2rgT^ot-x`?~ODRCR%Ew0tp-|rJB^xaj0mvZB>FQ&W^he=x^;y zRh{^pR;z;ow69c15Cl>&U``7^srL<--D5W2pErNZ5*Bd)q%{!R1Ii+AXiT=_#Yt@9 za1`k9GRKbygCrlHZxW!-_2)xoDVacHlv8Z3fH|k$FbkuLz=Y=`40L>reT>pR>+re? z^&@h7JSy%F2|n0oQT=;Qyl_IJpImfQq$T{+BA1Y~a(z$+~J}X$KY>+13u+ kxbKLX4xIi>~ z$yI6GrQtVdt^q0vK46)%LliOEVrFOF%$s@I5qo0TptV`YWO-oI-@d0|{M*wLOIh+- zo8CH;viJxF6uz_9Pz-Iv5zLVO@Y&w6md^%hkarXRp9lc)L#U@SUQR|Ab-jExDyymfqBW=iCk$}kh zFN~e_8mRF-9h>1g&=1Rg1?96KD+IB$*LfQ45$@xGHh|goMDPELy*iYLf3q?-+1tAC)$C*5m!)Nb^W#;BP@gD8o@eh|~$m|_)E;(3)6j*-iu>37Hp;a?YkQ Jz)YOM0^hHAlWqV2 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/85a50177266a832eca0563d37ccb03890f12c665 b/test/core/end2end/fuzzers/api_fuzzer_corpus/85a50177266a832eca0563d37ccb03890f12c665 new file mode 100644 index 0000000000000000000000000000000000000000..7c2870f1f212fe53748f5e616596789c76a875d2 GIT binary patch literal 546 zcmZuuy-ve05I$SQN&<>tV{Ad9KY|X7AXLOFAXP{RStdQT5p8N5#}TY_K)g#Q79N0! zcVOuPI}Z@94M_a-m3@Z73ZBPtiCu;1!&UJVehkZdtC;Dgq9|ou8g~*x5Pa zBFH-g4XYpki`RzZzzlFfaN=p=hv}9VV(b!{&e!{Y0RYV=u)V&~QF~ym-fzcAY-2T) zDPCuoL@1MN#1?gJ;*l~pGNYeM)yKp_3ArC=6Y<7x+f1GhnV`BMk*bD=6k_U{-}ySmOeq9G<2_8esZpWuitX$Fw^W z_cDNWV)ZApX$5@G|8-xU1xC$H@EBBx{2Ryxui?}7%h{Hw?ZTb^j+h$$Jl`By;~Z`A s0uCoL1&mtfNyC@gC1~B`S04WHicqU{|jI4W{Q2Opp~muo%PqSTVsTX1r?AP8>0f{Sn` z7dJtC1G~CpQScEQ;z?VzI+zT}3FqYe|Ch|g-8N*8OhN|QNvQ?_X>F2<3ONFY^=(bj z@}^X!LBx47Sb_q%7v4e`Nabr6AaH29&04G9@2=Ha-MD$w=*RoV)abR(D5OsFo;8Xp}OD^@0pkb>QfgwVgsFk>lQu zM_BSZ3A=Qnyt9gq2u2s7s-44viOg|A0VLvMEYeI;12BC4%MF& z50LNnyeMKwc@*D>dQ(|OKKW?EaV?SAn2Kj|n?OA7L54;!mGTspi4W*x8Vs!$c0HPJ zGME5)K4&5$$u^roj?wUQ*^Jfb;ypv+h5hhkQ={V@7CBKydT1&h53rHi7=q>I5b*0q Zq4T(}?ac=sjIb&HnbDVF$MaID;1jfJqQC$E literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/8bdd4dc6dee56fb6965655425ca378f784a42b6a b/test/core/end2end/fuzzers/api_fuzzer_corpus/8bdd4dc6dee56fb6965655425ca378f784a42b6a new file mode 100644 index 0000000000000000000000000000000000000000..b54fd8645668bc8844e4afdb300488d8bf010e70 GIT binary patch literal 267 zcmXYsK}y455QX1AwBa{Oz#FtH+bklu3`oT*6xStf2OE?o{E2_ibwCh2N;Y~0ui+*x z6g+~9ae~h34b1!Ao8zp^K@~gC4pxYQCSq%yp9QgQXrkrikBFR85H<@vqiBKvEbl5| z9B}Q*O|q-&@+`S6ikoc5*><(QuerjD8dp{RzzOd+#a0sr)O7lNVq6P6LM+Vlm11H# zZ9hoFE)xo>SJoPA{nLf=hY35FbWBk&Z-hU!-5rcyh{h{V;&4!eeu6_B(fH3}`nH?H e8jJwb_T4DL!54Go=v^2#}BpR~m;}K)N${AF9Nmoo`QqY@> zIEG67LS`srHOmfZljQ5Xb-TseQ5ovcgs|poU6mVnGm_Pr$~|B@BQVIxtf7I6EmS&?gUPKi~iEe*e32Fo_@&(iv%3MoKkv$g*_S z>W{)WrVFp!lbVFeo^~HvaFI1UneIieLDdZ(Ta7Ju~!$ho3@ZzTp`RAGcOU5{pe- z!eyxdQ58y(F&EH7N`pAuqhOyA>S!

a1$#i((D7W&agl{1t+KZo?8-WAU>@sbquZ zTTia5#tpo(zY--{eyGN^tSn=Qz`cACLhzrZYdZ5?bM;7zMLlOLD<|1VSAJu5Y00B^ zEgF{;7~9e-9tOvs8Kbu{Y*@l)klTi~mi^ED;!d~uhTBpF>{7Ierf-QOPg^r*>CsLn znmj+xd$~O0y2ei?*l2v;7CHxB!`Kk-9`Sm(@>af(#`L;uNpi^D@-E%QhS6MUQ9u_t zvzwPLJgd{p1eOjkN25_70z6$$K}4Sa7x7F Hc~SNo^Ofe6 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/92882ccad7fc3e7bc1df7dfa5954a6d591d5dbc2 b/test/core/end2end/fuzzers/api_fuzzer_corpus/92882ccad7fc3e7bc1df7dfa5954a6d591d5dbc2 new file mode 100644 index 0000000000000000000000000000000000000000..b53afb9b9471e8e0cb184edcbc250a603d303d2b GIT binary patch literal 524 zcmZuuu}T9$5PiGEWiQHMDOPGAn4m!{EFyB?F9<=fIL>4+!6e4H%LQyrA%2Kpag|Lv z8-K&*8nv?U1J+5RpyIH_?9O}h=FRGuI3)H}2+{&>NdoC+F+VjlTtecm->!-P0o60XZV1JxPP=cK8 zAPuT+^^sM+JeL2O??rI>O=gCp(tMyvknJ3mZ$!sr@TRCT%7Imnb+#kl2DB$&mU5nf M@5ka`qENTMCyM%!z5oCK literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/9345e2de4f0476428d941c53013535fbda8a2bca b/test/core/end2end/fuzzers/api_fuzzer_corpus/9345e2de4f0476428d941c53013535fbda8a2bca new file mode 100644 index 0000000000000000000000000000000000000000..634bfbc7a46ca4b49bc88f3e5f7e111de333781c GIT binary patch literal 849 zcmaiz&2G~`6ot=>(vcIuqC1ueNVJK-NGyYp5wB2DAt7Wr&Q)VIbF^J z@6Z(+9)K0^z$RUQ#F8ZobH{GdRJ6kK;(F|JXYToqx5G4sG^7jCaB3-4>5}8<;;OaX zQQebJ#jCyN4*B<=O4TcUmb!f?Q2m`%5E@c(!F`7GTkp38cid++-{;T&z5qzyfp~bJ z)5x1;S^C(ElQ@gRd0^;GPDw;Tk{?a@oIdw=+mqhXcJB?%@hlCa!ypSMa|%rSmZlUf zrY!O#na{*3a*C5@8qL)^g&1#1R}IUWe(=~iMB!&qikh!cueRf0*~bmslnM~dPR7i6 z1ARbQkc3AREZ969PjlclckNco(+;{$_fmcJDg=K#gadTAIoDfOD3u)0mwVq{-c^GK zc-Q?&WVHO+PV5u~+xQw!s$~elpITsAu6b==M|4-Q`x2!)-o)2>7g1tz!=v)Nc4Z?7 z=Q34(T+3E`=8MH)IHPbHOg?2~u=de5FcLfK}PaX zbtdcD+4H3O54y7zIt#2t*CbQ6(aa*7JdSSZUL^N2T+s$XEGx@Htax->T-fhZxnrYe U|B!|P*s+Ah!quynFd;0Bb!2%W?)M2e6oP8WM*pRg}x?z~2{xQNo^ zGg4he<1P)qL30gIrN{>?b9RU#vD)Iz&b*m7`*ca{h+)0fW)+g6c}mS>N zyVkkhZsB?MC7n}QW)n(hR7|QVVh_AsHyM<)*xKfj*gv~w)$FguOLN&;>3XsL6Nx%c s-JRA=QXd^h=OVzMM$kGQAxf;e9AtQ_P(+x3?B)<4;L@ zRT_6Rh`*q@2B@j1He)+QqGYti+ueEd-puHV*b~DBt<5YVYuPKj9fYoi@t;pVT8eky zYtx;@k{I=1K;e$PhGJ+VKv;cx;?p${{;9C#{J#JD0T6FN?Va;98(ug!-5=&f?(%e! zRP?o`BBP|JFGu2vViAbe#(1gy2j^m%W?vGQjwX~;`8OIXy8|c{1U-qlnhtHSP2(onfLD7E|D`7{et;+c z!AmcC_XFajQK;Hw53{rL-pre~<;NjlLfVi9RUpdTA*Hlgm20*O8$p_@i*rTp-YH5u zcNyx`K>`(TO@kmbpkz4nwCGcJtAH81jOP3O{{I0$dK<*yK*vF6n5OYjCyc^0^haJo zw;4qNc~Lg*@tiL6JJqDRY`p||7{-2ZNFSR8u> z;&=@m*~$xgXVn=9}8d%Eu6|c^M;Nli20W~K70iwhPJ@39=?#RXg+*=<+iN=>ourh|Xcnv4hxetO% lOTRR(v`g~3*{|IB;}=$jr9tV(qF~w2{c^i?h*>$i`UP1;kwO3f literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/a44288607b76ce6df9fe7e196138a587cf4badc9 b/test/core/end2end/fuzzers/api_fuzzer_corpus/a44288607b76ce6df9fe7e196138a587cf4badc9 new file mode 100644 index 0000000000000000000000000000000000000000..095e02e09059597f8e5cc73913abb5db3b354152 GIT binary patch literal 527 zcmZuuJx{|x4E3GL=@L+c#DbV86;)e71_lNY3jd)}g~Sl0t<^@fX>ro4#KJ%Z{!Ay9 zZY+p@!IA}-`2oRcy6|D$;Jfp)pWl-)l0gEUOR44#YHduTmD>`Oxo&Ip>K9VkbC0W> zeNce;8yN|LKq^ic(med4&MILrbr{TNegFFbfV2zZctF#hJ4}-4i5o^?5(Xnb#@iW2 zJ@lj5xXYB#;{i^|ii+6Un{$a-IAZo8FH+ZeV5+iv|WGXK?)XNmAb99{;iwKg0F;Qa-ade E0T4Ko*Z=?k literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/b2c5f4f8e2129a4201b2525cba8723241bbd8c79 b/test/core/end2end/fuzzers/api_fuzzer_corpus/b2c5f4f8e2129a4201b2525cba8723241bbd8c79 new file mode 100644 index 0000000000000000000000000000000000000000..61188e2bdea0b8f4c19a905ee2f7c1e4505b23d0 GIT binary patch literal 467 zcmZuuu}%U(5PiGB%^ezIX$cw)5Tvlw7z~B6Hz7ug%W+KLA{^)J-4Sgy7Jh_(KxJcR z<8Ro|XzvG{18Rtgn=RhX&YPL{Mknk?R$JnX7*4LWnUu(JIIGt4qK3&XPTP;v+Bwvw zIB7{*sSE?k-#F7y3~dAmr$(RL`3A!72wU#YTR!Fq%Q!&10kzxbIA{)%B;IR=QJ94O z(6jzkN>M;wl#aUF3~EXJ#gOrs6VFnRa+q90IOokl><5=#;&+GS+3<#X6pVYKquDlO zpGex%N%nBWSe)V%YJWwSOl^|WyGTr-vQ{o4ayj+l9BItTSjCz)fLe@a?NB;!pAs+f zN92vgC=Pomur5{IyV0s0nQvaF0)S6T)MKX@p%4x^PAN+HgS+)pkw6hj*^B&SDz`D|@S_L*eMbMq}fe89#J5I=x=I^k?IxG0M3 z`5>L8MVd_GoZc;HHX`puJX>6zKW0!QO$ttCc{b-lVnz#2i}xt9XM>9@8NH2*EsbUu+qka{ zpjwG}K9vqUp(36omlV$h7N_F{up?E2s;RdS*kEG^_AalFP!imORoGhFZK5`Mk5>Dy zADO);_!#^q%2|K+^aNVzVFD*rlR!zNcXAo^-NS2E%}!ahw{5l2wiuw>izJrZH;$4A3;C4^QM+X6XUDqzy*@}!m07Pz@u?X46oRTI>>6=PLX OLCW9?p{xz|3;qM_8^)9X literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/b6ce8604e3c14c6867cd2a78cef144ddd2fbb4c1 b/test/core/end2end/fuzzers/api_fuzzer_corpus/b6ce8604e3c14c6867cd2a78cef144ddd2fbb4c1 new file mode 100644 index 0000000000000000000000000000000000000000..55fcf2676b54b8041d2d9588b4df16ee417de716 GIT binary patch literal 468 zcmZuuu};G<5ItMPassLt87Tbs%agyrlQ%ZTnVbUIPE@SXZJ`d zciQ2y`X(sA>WvBsf@fdg$Sfrr7>sg??KLpw+#h9ObQ##NKgPhsH#op39k33+ ztI#|lw?|z(91|>#I|FgBBI};=rWL-k#vDY^saQqDr{&Hg3FRiN!kSb7VlkgFV{So1 zv_TS1Fi6=ciU&EsI@3CL<*WvdcK*cwXF+hW2Um# mTjvAOkbIqc$rcv87>yOc;e8qMT0p#zD4Q%zf(FG#pL_w5%Y|YU6vn@M(92Dg%#IbICK;l*ie&H+#JNO!Frd(K8gFn9=*!&Qtx)<1t}a;| zd<3DVw}apK`}qEl?NZ0p2vESt7nT$L~L`E%WHJ)1tfwY)@tIi%Efn*ZeDxB3c$Vx(gN#0)sXF%c+^AsSJ) z%uAsS#YZ_iC%!2(TK!PN>>)=~75ax&jQ39eSys@+zC`&f93XMYXB95*%8!@~NW^8p E4lYYUWB>pF literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/cea57d6a128cc7cd195cb2390bfde28047d6acf8 b/test/core/end2end/fuzzers/api_fuzzer_corpus/cea57d6a128cc7cd195cb2390bfde28047d6acf8 new file mode 100644 index 0000000000000000000000000000000000000000..97dcc4f304f3c4487a3c683139afe03291a05b5f GIT binary patch literal 291 zcmW-au}Z^W6ot=!(VsuHrXUWE6`__48M;dbAE7vhXfLf;ZMjJk+yjd5lF7wQP#>YI zOBN9y!QuCsGaL?w!*_^atI%;WIwRYw5|)y}AuQN`YJ?Gxm6GKMrrkEjKc`0O2Y3hb z=2aJUOWx`p}b*o$|(!2Ta{&FxqWct0eNjctyut6vcWH wFITIZY{A(qy}U0thnTi@UiX9l{Wzj;t9;KV%?<(=yd=$JI(k%UgFqbc2azRJ*Z=?k literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/d07965987a51541498871433e0fc6313884569d3 b/test/core/end2end/fuzzers/api_fuzzer_corpus/d07965987a51541498871433e0fc6313884569d3 new file mode 100644 index 0000000000000000000000000000000000000000..6106a4e6969b69b51693217afdca73f2768ac717 GIT binary patch literal 548 zcmZuuu}%U(5S<-yvz&%lT7o7DL`k&Nm^1!?F(D=vmlGy%@i=hzSd6U{#($x*@dK=^ zZEdd6-VZouIVBWsu6VOIZ{E&(Xh>VqpmIbxsgP3I)|9(7v%G#wqZq9jVAFb)je zjw$I-kcf}K=hO5YLddGH2J0vR#9Yakm=$!7(jW;36b#uX9d*Y5 z8$7f;&1NMitFmwsi)sli--6)w1}Fg~9{)#0i8XrJe!JX~wLN$!e-Rmtuf@vBx*!0K zr&$PsTjxF?y1)u62H{;WAY;NF1u-SPv=1(?6OpMZ=>uI)d-Zt|e5(}6x literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/d425e534ec074932b5cf4dc9a6cf4fc0683fd690 b/test/core/end2end/fuzzers/api_fuzzer_corpus/d425e534ec074932b5cf4dc9a6cf4fc0683fd690 new file mode 100644 index 0000000000000000000000000000000000000000..5c8828e6121d3bdb9925f8e06bbe8d0afabe976d GIT binary patch literal 554 zcmZuu!AiqG5S?A>vWXJ(=CM_qlOvg5urg3+ZfLD7E|D`7{et;+c z!AmcC_XFZ2RjAr!53{rL-pstW5u_1tjVeb4vgBM84oa!=Wx3r>X>${{et%6WIPhrD1nyOnT6blE_3s z>}$NuFbUC5ve6X{>QMt{KB}sEFF+oKX%OD{Cb){x*U=sJF&y^^)8(k2kU%K&#}fth zv8TWeSGXhGqQrMvI|G(`CQPBE)3M8H9hfy?71p=_V09<0V``uVX#6A?p+6?^RMgJ^ z)```c%%%;nr1dLao&`q5E=UFqBL4w$!CUye{d&G7T6=JBeIRPZU#{bE5t^9vtv$+f tQu7jyCbIw-L8_$UOMMe0I~i9ve~jaE=S*1nQWq>5+pbh@LP`pdy*}#ADEuZNe7D5$UwT#@M9Mlmb#2ZvS~-4dT(a zZe4WiZF}ch04JBE%V}GtP^AV9c5jl}$vhhL?4&=6pm1a3&>zlb@wq>YgYdRD3;JX3 zO-H23@p1cXBWBCWm2S|V$055PiEi%bpw#l_8ZCgOEg`B48H^;lO`EAOb0llQc+2^p&~O3e-kL$bY#i zjXE{{8*Z+#U8Tqm*vv@@#3aKOvpet2yxFHSVn+dk~#qwX}%S8u!NBF)oe z7H9N%O$&+_>-kV5Q6&AtlPa!8|3#UulF_F)Plhv!vvf;i8ZF1d>1spScM=j=_l4~J=39SZ#>=0hHEGndD+2BbZS+mQC{F2&$R*6aZ;AeWCBkpj~B_D;-&l(r{gtH zm$t#KEY1+v;7R`fS119uVHM7#`5&S-xcSb)4tY;3-EZiD-$R| zR@ShKI{xK>RaxJOUq`ztxAdcEhNsJupnX(a^_yR1jwujSs3w|`RfitiO(>3D3z(%` O7T{th8|)Q&7Wf5ZWs%tc literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/ddc34d5e97ac12572e6c39a336d219d91fa992b1 b/test/core/end2end/fuzzers/api_fuzzer_corpus/ddc34d5e97ac12572e6c39a336d219d91fa992b1 new file mode 100644 index 0000000000000000000000000000000000000000..1b5ebce44d8f151ab07fc78b6e3cb1768d4511fc GIT binary patch literal 790 zcmZvaL5tH+5Xb-TvHN(bQtEB-AX^u@ZO{sW9wHL)D->5jB&O}q2D{n%lBTd%1B&2B z$!RY=2z&7pc=NEAcu?`M2am4AN!pdF`^aIEm-)}k?>|=#rvYR{CLse|NU7#^(%K~L z!PpN&y705t+T3M@`Zg4(I5CNYFp!D^mg~?Dv$qUbc&}|2{H)&p zzW~T=LEIdf>7YA~{^o56?K_qU$GZcL6S{X^?+qi_w zQURhW6h#v*U`7;sp}$Yw0V6cQa0WD3)k^bh1D3Y_iZA{O!9RDP1vXgxJW(pyq{YsY z>#BJJudJ^`k&z#&akWkoh6vnCb032LEL}5+YZq6KjmR4*TUj~DM%wZlvx`d}{cFLb zq`=sgUhyzE`OFxdm0_b2K7-sXXlL2~!p-jVT5q^5mBA`STWGmj96LtO>wi3&K40g( zT%Jk8;3pGoHoxx*lLD_%SP<_X@p{TLgUM26w{zIJauEa+isozCT;X`>c)?&Qz+$<-V_QN`&M%LGl~+ C3Fejn literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/e8b1814f9a0942322aeb190ae0ad35105784e101 b/test/core/end2end/fuzzers/api_fuzzer_corpus/e8b1814f9a0942322aeb190ae0ad35105784e101 new file mode 100644 index 0000000000000000000000000000000000000000..bb11018c69a5f0bf7ea6644c0f40928c87a1ae50 GIT binary patch literal 528 zcmZ`$%}T>S7@S?|vZ+#f6hUYy6kD{19u+7uVA&~&K+ z1Ik_nLNT-vAfg6YzWM@!L@xW^4*>B#)X9Knz1A>_X6;rm38KIsc_H1+Y0@KaG9Py( z6uG(SHW%mKKQzOc-@El9zdIr?4DP8}dn2jZ+wo#DNDCc@uw3-cr-S7}wd)~0%l2j`tAWc{+8*T#7dz}YhOp@f;2!?D}U4%V#F@=_Yx y6qfg;KO{3Us%-Y6r5e+vKJ*-idAADXwVd*7K)ts7X%S3jx%}aVZMBKxqz)H#Ma+&l})-d z{tcUJ)Y>1gzDsOGmn~*@XWpB)qhsQf7}jZR#uc)b)6J$UYnb%%?9`IqIM${-_Jvld z!hqZxry7c(jR4VX(HEaDfT+(!E&J#E_W>YYgW9>~VY_vcw1#_0)Q^%V>;^I2ji}$I zpg-zei6`=geg%Y-AS)ORw2lhrI2NF%Re87tZVYThW0yFn82H6=km>`^d~f8wY!0#>D_ zH_5XSJnQ|!|KCCh8CIbrwdcBL>uIBFG_7B3nA$cTybq$7_3L6t^sLxJur9DfS(94e2UKsm9n={>@xgh~!QumrrBU+p?Ho|^q2oGfs!-zfE6H`e8WqhS@?Vh@0d=+V+OU9j Q3Zp`s_e7$)9|i4x0P~cH00000 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/f6d8d78857d868c2f477da7506a1976354f2631d b/test/core/end2end/fuzzers/api_fuzzer_corpus/f6d8d78857d868c2f477da7506a1976354f2631d new file mode 100644 index 0000000000000000000000000000000000000000..86ded50ca0de9a8b1c208dd51a2e6ad746101291 GIT binary patch literal 877 zcmaiyzl#$=6vw~wJcmt`aHUu!3YrAXf#n?%v9>!r1dCy_d3RY%HgR^dQCkCo;6Eay zvaz$d%G%au8x>3cfbs3_L< z=!H?3g#OsX{Bq7wz$Thc1~L=(r9q<{%Qm4=$r;W3;Dt&2!I(`PzTqJU)1l<_NOSy& zC5gTC{UeLw)K^gZSE->p3&%fX#W_^kcd~?&)2-(gA#36qu9F5-(J79fjHSg1CnoYI zY^L&1HXP1@T>@&$Y_)@$SCbAG_Jviwg_7V7JcS)8zD^`fE&hD_>$6+Bbq{ZAKbd1o zr{%(4n(F`@EHfWULUVB}(RRIv@ULgDkn#$|De7DjlNwFzYp|=zSx8ep^UQ`5-@Z0; zX=vmPqD0iMN+2aS@yIJ~DX5{cZxSrir|lf2s;p_h>u!FrD%)KOf$OL){nCZt`E+Vk z4m9y!87nGB5eJDGi2T#zV>5}7wt|r_w_}j~eRm1GgY!PB4^IWsF6}Kda?U$kgVDQ8 cPVXEY=L&Raarz&2w!n49)+SXOqzPhw0m>o$jQ{`u literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/api_fuzzer_corpus/fb324303c6d5819d6f353f78d087e29adba51836 b/test/core/end2end/fuzzers/api_fuzzer_corpus/fb324303c6d5819d6f353f78d087e29adba51836 new file mode 100644 index 0000000000000000000000000000000000000000..0316705e5c2300b6e65eee9d34be0465a394b280 GIT binary patch literal 375 zcmXX?O-jQ+6#iyt!!$~uJC}7+(<~ymj7Y>Q6xSh*4;u_IOwuX3E(jGb;2pa13SPra zHVPhMeAD_?-{bv!KjXZrFwUD2vL$UuLs==kbwEmK6M7MM;C4 Date: Mon, 13 Jun 2016 09:02:24 -0700 Subject: [PATCH 1036/1894] Fix leaks --- test/core/surface/sequential_connectivity_test.c | 6 +++++- test/cpp/qps/client.h | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/test/core/surface/sequential_connectivity_test.c b/test/core/surface/sequential_connectivity_test.c index 0da10fd7c5d..2fba3927ba7 100644 --- a/test/core/surface/sequential_connectivity_test.c +++ b/test/core/surface/sequential_connectivity_test.c @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -70,7 +71,7 @@ static void run_test(const test_fixture *fixture) { grpc_init(); char *addr; - gpr_join_host_port(&addr, "::", grpc_pick_unused_port_or_die()); + gpr_join_host_port(&addr, "localhost", grpc_pick_unused_port_or_die()); grpc_server *server = grpc_server_create(NULL, NULL); fixture->add_server_port(server, addr); @@ -127,6 +128,7 @@ static void run_test(const test_fixture *fixture) { grpc_completion_queue_destroy(cq); grpc_shutdown(); + gpr_free(addr); } static void insecure_test_add_port(grpc_server *server, const char *addr) { @@ -147,6 +149,7 @@ static void secure_test_add_port(grpc_server *server, const char *addr) { grpc_server_credentials *ssl_creds = grpc_ssl_server_credentials_create(NULL, &pem_cert_key_pair, 1, 0, NULL); grpc_server_add_secure_http2_port(server, addr, ssl_creds); + grpc_server_credentials_release(ssl_creds); } static grpc_channel *secure_test_create_channel(const char *addr) { @@ -160,6 +163,7 @@ static grpc_channel *secure_test_create_channel(const char *addr) { grpc_channel *channel = grpc_secure_channel_create(ssl_creds, addr, new_client_args, NULL); grpc_channel_args_destroy(new_client_args); + grpc_channel_credentials_release(ssl_creds); return channel; } diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 2a89eb80182..5850dfa1095 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -319,7 +319,7 @@ class ClientImpl : public Client { gpr_log(GPR_INFO, "Connecting to %s", target.c_str()); GPR_ASSERT(channel_->WaitForConnected( gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), - gpr_time_from_seconds(30, GPR_TIMESPAN)))); + gpr_time_from_seconds(1200, GPR_TIMESPAN)))); stub_ = create_stub(channel_); } Channel* get_channel() { return channel_.get(); } From 6b943e55fa4dc383f731bc8d30eb2c6116265771 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Mon, 13 Jun 2016 09:19:46 -0700 Subject: [PATCH 1037/1894] Fixed bug with server initial metadata type translation --- src/python/grpcio/grpc/_server.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/grpcio/grpc/_server.py b/src/python/grpcio/grpc/_server.py index f4f67204977..2f99e5b4125 100644 --- a/src/python/grpcio/grpc/_server.py +++ b/src/python/grpcio/grpc/_server.py @@ -254,7 +254,7 @@ class _Context(grpc.ServicerContext): else: if self._state.initial_metadata_allowed: operation = cygrpc.operation_send_initial_metadata( - cygrpc.Metadata(initial_metadata), _EMPTY_FLAGS) + _common.metadata(initial_metadata), _EMPTY_FLAGS) self._rpc_event.operation_call.start_batch( cygrpc.Operations((operation,)), _send_initial_metadata(self._state)) From e05d31962dec34466417e17370dc3a169b6e5eb6 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Wed, 18 May 2016 15:06:39 -0700 Subject: [PATCH 1038/1894] php: add channel argument to BaseStub constructor --- src/php/lib/Grpc/BaseStub.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/php/lib/Grpc/BaseStub.php b/src/php/lib/Grpc/BaseStub.php index 2de1b337e53..70644fac872 100755 --- a/src/php/lib/Grpc/BaseStub.php +++ b/src/php/lib/Grpc/BaseStub.php @@ -52,8 +52,9 @@ class BaseStub * - 'update_metadata': (optional) a callback function which takes in a * metadata array, and returns an updated metadata array * - 'grpc.primary_user_agent': (optional) a user-agent string + * @param $channel Channel An already created Channel object */ - public function __construct($hostname, $opts) + public function __construct($hostname, $opts, $channel = null) { $this->hostname = $hostname; $this->update_metadata = null; @@ -77,7 +78,15 @@ class BaseStub 'required. Please see one of the '. 'ChannelCredentials::create methods'); } - $this->channel = new Channel($hostname, $opts); + if ($channel) { + if (!is_a($channel, 'Channel')) { + throw new \Exception("The channel argument is not a". + "Channel object"); + } + $this->channel = $channel; + } else { + $this->channel = new Channel($hostname, $opts); + } } /** From a011572c8171cad96c3d630987afc8782883068c Mon Sep 17 00:00:00 2001 From: yang-g Date: Mon, 13 Jun 2016 09:49:58 -0700 Subject: [PATCH 1039/1894] cloning from the local repo --- test/distrib/cpp/run_distrib_test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/distrib/cpp/run_distrib_test.sh b/test/distrib/cpp/run_distrib_test.sh index 5c21a1e19ec..dfe9867a602 100755 --- a/test/distrib/cpp/run_distrib_test.sh +++ b/test/distrib/cpp/run_distrib_test.sh @@ -30,7 +30,7 @@ set -ex -git clone https://github.com/grpc/grpc.git +git clone $EXTERNAL_GIT_ROOT cd grpc && git submodule update --init cd third_party/protobuf && ./autogen.sh && \ From 97da6473b4a52579fc2f9ed03b56c8078daec6d0 Mon Sep 17 00:00:00 2001 From: vjpai Date: Mon, 13 Jun 2016 09:56:26 -0700 Subject: [PATCH 1040/1894] Manual clang-format --- include/grpc++/impl/codegen/core_codegen.h | 10 ++++++---- include/grpc++/impl/server_builder_option.h | 3 +-- test/cpp/end2end/async_end2end_test.cc | 3 +-- test/cpp/end2end/server_builder_plugin_test.cc | 6 +++--- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/include/grpc++/impl/codegen/core_codegen.h b/include/grpc++/impl/codegen/core_codegen.h index 0526e4a4156..6be46315e54 100644 --- a/include/grpc++/impl/codegen/core_codegen.h +++ b/include/grpc++/impl/codegen/core_codegen.h @@ -42,7 +42,8 @@ namespace grpc { /// Implementation of the core codegen interface. class CoreCodegen : public CoreCodegenInterface { private: - grpc_completion_queue* grpc_completion_queue_create(void* reserved) GRPC_OVERRIDE; + grpc_completion_queue* grpc_completion_queue_create(void* reserved) + GRPC_OVERRIDE; void grpc_completion_queue_destroy(grpc_completion_queue* cq) GRPC_OVERRIDE; grpc_event grpc_completion_queue_pluck(grpc_completion_queue* cq, void* tag, gpr_timespec deadline, @@ -55,8 +56,8 @@ class CoreCodegen : public CoreCodegenInterface { void grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader, grpc_byte_buffer* buffer) GRPC_OVERRIDE; - void grpc_byte_buffer_reader_destroy( - grpc_byte_buffer_reader* reader) GRPC_OVERRIDE; + void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader* reader) + GRPC_OVERRIDE; int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader, gpr_slice* slice) GRPC_OVERRIDE; @@ -66,7 +67,8 @@ class CoreCodegen : public CoreCodegenInterface { gpr_slice gpr_slice_malloc(size_t length) GRPC_OVERRIDE; void gpr_slice_unref(gpr_slice slice) GRPC_OVERRIDE; gpr_slice gpr_slice_split_tail(gpr_slice* s, size_t split) GRPC_OVERRIDE; - void gpr_slice_buffer_add(gpr_slice_buffer* sb, gpr_slice slice) GRPC_OVERRIDE; + void gpr_slice_buffer_add(gpr_slice_buffer* sb, + gpr_slice slice) GRPC_OVERRIDE; void gpr_slice_buffer_pop(gpr_slice_buffer* sb) GRPC_OVERRIDE; void grpc_metadata_array_init(grpc_metadata_array* array) GRPC_OVERRIDE; diff --git a/include/grpc++/impl/server_builder_option.h b/include/grpc++/impl/server_builder_option.h index f736cab0e41..bd2018fa6b2 100644 --- a/include/grpc++/impl/server_builder_option.h +++ b/include/grpc++/impl/server_builder_option.h @@ -50,8 +50,7 @@ class ServerBuilderOption { virtual void UpdateArguments(ChannelArguments* args) = 0; /// Alter the ServerBuilderPlugin map that will be added into ServerBuilder. virtual void UpdatePlugins( - std::vector >* - plugins) = 0; + std::vector>* plugins) = 0; }; } // namespace grpc diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index df9a86dcfae..535d8d5d3dc 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -207,8 +207,7 @@ class ServerBuilderSyncPluginDisabler : public ::grpc::ServerBuilderOption { public: void UpdateArguments(ChannelArguments* arg) GRPC_OVERRIDE {} - void UpdatePlugins( - std::vector >* plugins) + void UpdatePlugins(std::vector>* plugins) GRPC_OVERRIDE { auto plugin = plugins->begin(); while (plugin != plugins->end()) { diff --git a/test/cpp/end2end/server_builder_plugin_test.cc b/test/cpp/end2end/server_builder_plugin_test.cc index cad48316b92..75f23b64a73 100644 --- a/test/cpp/end2end/server_builder_plugin_test.cc +++ b/test/cpp/end2end/server_builder_plugin_test.cc @@ -113,8 +113,7 @@ class InsertPluginServerBuilderOption : public ServerBuilderOption { void UpdateArguments(ChannelArguments* arg) GRPC_OVERRIDE {} - void UpdatePlugins( - std::vector >* plugins) + void UpdatePlugins(std::vector>* plugins) GRPC_OVERRIDE { plugins->clear(); @@ -226,10 +225,11 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam { std::unique_ptr server_; TestServiceImpl service_; int port_; + private: TestServerBuilderPlugin* CheckPresent() { auto it = builder_->plugins_.begin(); - for ( ; it != builder_->plugins_.end(); it++) { + for (; it != builder_->plugins_.end(); it++) { if ((*it)->name() == PLUGIN_NAME) break; } if (it != builder_->plugins_.end()) { From 5fa6b5db394d62d13a161c94780e12ed2ce79bae Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 13 Jun 2016 10:03:35 -0700 Subject: [PATCH 1041/1894] regenerate PHP's package.xml --- package.xml | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/package.xml b/package.xml index 9fa63e30909..1c658df79c4 100644 --- a/package.xml +++ b/package.xml @@ -1072,20 +1072,5 @@ Update to wrap gRPC C Core version 0.10.0 - Updated functions with TSRM macros for ZTS support #6607 - - - 0.15.0 - 0.15.0 - - - beta - beta - - 2016-05-19 - BSD - -- TBD - - From e4fd5b9fe2f95209606571b0761928369ee507ec Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 13 Jun 2016 10:10:21 -0700 Subject: [PATCH 1042/1894] C# merge fixups --- src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs | 1 + src/csharp/Grpc.Core/Channel.cs | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs index 74b104e5a4b..98e27a17a1d 100644 --- a/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs +++ b/src/csharp/Grpc.Core.Tests/Internal/AsyncCallTest.cs @@ -210,6 +210,7 @@ namespace Grpc.Core.Internal.Tests new Metadata()); AssertUnaryResponseSuccess(asyncCall, fakeCall, resultTask); + var writeTask = requestStream.WriteAsync("request1"); var ex = Assert.ThrowsAsync(async () => await writeTask); Assert.AreEqual(Status.DefaultSuccess, ex.Status); diff --git a/src/csharp/Grpc.Core/Channel.cs b/src/csharp/Grpc.Core/Channel.cs index e485f0807cb..4f29c35b321 100644 --- a/src/csharp/Grpc.Core/Channel.cs +++ b/src/csharp/Grpc.Core/Channel.cs @@ -31,7 +31,6 @@ using System; using System.Collections.Generic; -using System.Linq; using System.Threading; using System.Threading.Tasks; From e7479f5efc7e8fe1f7f65ca82142737e545a4b50 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 13 Jun 2016 10:27:23 -0700 Subject: [PATCH 1043/1894] Revert accidental change --- test/cpp/qps/client.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 5850dfa1095..2a89eb80182 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -319,7 +319,7 @@ class ClientImpl : public Client { gpr_log(GPR_INFO, "Connecting to %s", target.c_str()); GPR_ASSERT(channel_->WaitForConnected( gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), - gpr_time_from_seconds(1200, GPR_TIMESPAN)))); + gpr_time_from_seconds(30, GPR_TIMESPAN)))); stub_ = create_stub(channel_); } Channel* get_channel() { return channel_.get(); } From 5ea4a99d8ccb7f1bc19b78e8cd86b770f1ddcc8e Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 13 Jun 2016 10:36:41 -0700 Subject: [PATCH 1044/1894] Finished removing CompletionQueue from Ruby API, made some changes for clarity --- src/ruby/ext/grpc/rb_call.c | 11 +- src/ruby/ext/grpc/rb_call.h | 2 +- src/ruby/ext/grpc/rb_channel.c | 23 +--- src/ruby/ext/grpc/rb_completion_queue.c | 7 +- src/ruby/ext/grpc/rb_completion_queue.h | 2 +- src/ruby/ext/grpc/rb_server.c | 32 +++-- src/ruby/lib/grpc/generic/active_call.rb | 70 ++++------ src/ruby/lib/grpc/generic/bidi_call.rb | 34 ++--- src/ruby/lib/grpc/generic/client_stub.rb | 11 +- src/ruby/lib/grpc/generic/rpc_server.rb | 40 ++---- src/ruby/lib/grpc/generic/service.rb | 2 +- src/ruby/spec/call_spec.rb | 3 +- src/ruby/spec/channel_spec.rb | 5 +- src/ruby/spec/client_server_spec.rb | 90 +++++-------- src/ruby/spec/completion_queue_spec.rb | 42 ------ src/ruby/spec/generic/active_call_spec.rb | 148 ++++++++++------------ src/ruby/spec/generic/client_stub_spec.rb | 75 ++++------- src/ruby/spec/generic/rpc_server_spec.rb | 34 +---- src/ruby/spec/pb/health/checker_spec.rb | 2 - src/ruby/spec/server_spec.rb | 44 +++---- 20 files changed, 235 insertions(+), 442 deletions(-) delete mode 100644 src/ruby/spec/completion_queue_spec.rb diff --git a/src/ruby/ext/grpc/rb_call.c b/src/ruby/ext/grpc/rb_call.c index f2c567c7da7..c1f5075b52a 100644 --- a/src/ruby/ext/grpc/rb_call.c +++ b/src/ruby/ext/grpc/rb_call.c @@ -94,7 +94,6 @@ typedef struct grpc_rb_call { } grpc_rb_call; static void destroy_call(grpc_rb_call *call) { - call = (grpc_rb_call *)p; grpc_call_destroy(call->wrapped); grpc_rb_completion_queue_destroy(call->queue); } @@ -783,8 +782,11 @@ static VALUE grpc_rb_call_run_batch(VALUE self, VALUE ops_hash) { grpc_call_error_detail_of(err), err); return Qnil; } - ev = grpc_rb_completion_queue_pluck(call->queue, tag, gpr_inf_future, NULL); - + ev = rb_completion_queue_pluck(call->queue, tag, + gpr_inf_future(GPR_CLOCK_REALTIME), NULL); + if (!ev.success) { + rb_raise(grpc_rb_eCallError, "call#run_batch failed somehow"); + } /* Build and return the BatchResult struct result, if there is an error, it's reflected in the status */ result = grpc_run_batch_stack_build_result(&st); @@ -943,10 +945,11 @@ grpc_call *grpc_rb_get_wrapped_call(VALUE v) { /* Obtains the wrapped object for a given call */ VALUE grpc_rb_wrap_call(grpc_call *c, grpc_completion_queue *q) { + grpc_rb_call *wrapper; if (c == NULL || q == NULL) { return Qnil; } - grpc_rb_call *wrapper = ALLOC(grpc_rb_call); + wrapper = ALLOC(grpc_rb_call); wrapper->wrapped = c; wrapper->queue = q; return TypedData_Wrap_Struct(grpc_rb_cCall, &grpc_call_data_type, wrapper); diff --git a/src/ruby/ext/grpc/rb_call.h b/src/ruby/ext/grpc/rb_call.h index 24adb3477ba..56becdc5a4e 100644 --- a/src/ruby/ext/grpc/rb_call.h +++ b/src/ruby/ext/grpc/rb_call.h @@ -42,7 +42,7 @@ grpc_call* grpc_rb_get_wrapped_call(VALUE v); /* Gets the VALUE corresponding to given grpc_call. */ -VALUE grpc_rb_wrap_call(grpc_call* c); +VALUE grpc_rb_wrap_call(grpc_call *c, grpc_completion_queue *q); /* Provides the details of an call error */ const char* grpc_call_error_detail_of(grpc_call_error err); diff --git a/src/ruby/ext/grpc/rb_channel.c b/src/ruby/ext/grpc/rb_channel.c index 9d29b96a35b..f5190b85f74 100644 --- a/src/ruby/ext/grpc/rb_channel.c +++ b/src/ruby/ext/grpc/rb_channel.c @@ -55,11 +55,6 @@ static ID id_channel; * GCed before the channel */ static ID id_target; -/* id_cqueue is the name of the hidden ivar that preserves a reference to the - * completion queue used to create the call, preserved so that it does not get - * GCed before the channel */ -static ID id_cqueue; - /* id_insecure_channel is used to indicate that a channel is insecure */ static VALUE id_insecure_channel; @@ -233,10 +228,9 @@ static VALUE grpc_rb_channel_watch_connectivity_state(VALUE self, /* Create a call given a grpc_channel, in order to call method. The request is not sent until grpc_call_invoke is called. */ -static VALUE grpc_rb_channel_create_call(VALUE self, VALUE cqueue, - VALUE parent, VALUE mask, - VALUE method, VALUE host, - VALUE deadline) { +static VALUE grpc_rb_channel_create_call(VALUE self, VALUE parent, + VALUE mask, VALUE method, + VALUE host, VALUE deadline) { VALUE res = Qnil; grpc_rb_channel *wrapper = NULL; grpc_call *call = NULL; @@ -256,7 +250,7 @@ static VALUE grpc_rb_channel_create_call(VALUE self, VALUE cqueue, parent_call = grpc_rb_get_wrapped_call(parent); } - cq = grpc_rb_get_wrapped_completion_queue(cqueue); + cq = grpc_completion_queue_create(NULL); TypedData_Get_Struct(self, grpc_rb_channel, &grpc_channel_data_type, wrapper); ch = wrapper->wrapped; if (ch == NULL) { @@ -273,15 +267,11 @@ static VALUE grpc_rb_channel_create_call(VALUE self, VALUE cqueue, method_chars); return Qnil; } - res = grpc_rb_wrap_call(call); + res = grpc_rb_wrap_call(call, cq); /* Make this channel an instance attribute of the call so that it is not GCed * before the call. */ rb_ivar_set(res, id_channel, self); - - /* Make the completion queue an instance attribute of the call so that it is - * not GCed before the call. */ - rb_ivar_set(res, id_cqueue, cqueue); return res; } @@ -368,13 +358,12 @@ void Init_grpc_channel() { rb_define_method(grpc_rb_cChannel, "watch_connectivity_state", grpc_rb_channel_watch_connectivity_state, 4); rb_define_method(grpc_rb_cChannel, "create_call", - grpc_rb_channel_create_call, 6); + grpc_rb_channel_create_call, 5); rb_define_method(grpc_rb_cChannel, "target", grpc_rb_channel_get_target, 0); rb_define_method(grpc_rb_cChannel, "destroy", grpc_rb_channel_destroy, 0); rb_define_alias(grpc_rb_cChannel, "close", "destroy"); id_channel = rb_intern("__channel"); - id_cqueue = rb_intern("__cqueue"); id_target = rb_intern("__target"); rb_define_const(grpc_rb_cChannel, "SSL_TARGET", ID2SYM(rb_intern(GRPC_SSL_TARGET_NAME_OVERRIDE_ARG))); diff --git a/src/ruby/ext/grpc/rb_completion_queue.c b/src/ruby/ext/grpc/rb_completion_queue.c index 1ac2ef2f335..1a69a175c4c 100644 --- a/src/ruby/ext/grpc/rb_completion_queue.c +++ b/src/ruby/ext/grpc/rb_completion_queue.c @@ -125,11 +125,6 @@ static void grpc_rb_completion_queue_shutdown_drain(grpc_completion_queue *cq) { /* Helper function to free a completion queue. */ void grpc_rb_completion_queue_destroy(grpc_completion_queue *cq) { - grpc_completion_queue *cq = NULL; - if (p == NULL) { - return; - } - cq = (grpc_completion_queue *)p; grpc_rb_completion_queue_shutdown_drain(cq); grpc_completion_queue_destroy(cq); } @@ -141,7 +136,7 @@ static void unblock_func(void *param) { /* Does the same thing as grpc_completion_queue_pluck, while properly releasing the GVL and handling interrupts */ -grpc_event rb_completion_queue_pluck(grpc_completion_queue queue, void *tag, +grpc_event rb_completion_queue_pluck(grpc_completion_queue *queue, void *tag, gpr_timespec deadline, void *reserved) { next_call_stack next_call; MEMZERO(&next_call, next_call_stack, 1); diff --git a/src/ruby/ext/grpc/rb_completion_queue.h b/src/ruby/ext/grpc/rb_completion_queue.h index 3543e86275c..9f8f6aa5fff 100644 --- a/src/ruby/ext/grpc/rb_completion_queue.h +++ b/src/ruby/ext/grpc/rb_completion_queue.h @@ -48,7 +48,7 @@ void grpc_rb_completion_queue_destroy(grpc_completion_queue *cq); * * This avoids having code that holds the GIL repeated at multiple sites. */ -grpc_event rb_completion_queue_pluck(grpc_completion_queue queue, void *tag, +grpc_event rb_completion_queue_pluck(grpc_completion_queue *queue, void *tag, gpr_timespec deadline, void *reserved); #endif /* GRPC_RB_COMPLETION_QUEUE_H_ */ diff --git a/src/ruby/ext/grpc/rb_server.c b/src/ruby/ext/grpc/rb_server.c index cf430495c8b..1ed2c35da34 100644 --- a/src/ruby/ext/grpc/rb_server.c +++ b/src/ruby/ext/grpc/rb_server.c @@ -70,7 +70,8 @@ static void destroy_server(grpc_rb_server *server, gpr_timespec deadline) { ev = rb_completion_queue_pluck(server->queue, NULL, deadline, NULL); if (ev.type == GRPC_QUEUE_TIMEOUT) { grpc_server_cancel_all_calls(server->wrapped); - rb_completion_queue_pluck(server->queue, NULL, gpr_inf_future, NULL); + rb_completion_queue_pluck(server->queue, NULL, + gpr_inf_future(GPR_CLOCK_REALTIME), NULL); } grpc_server_destroy(server->wrapped); grpc_rb_completion_queue_destroy(server->queue); @@ -82,13 +83,17 @@ static void destroy_server(grpc_rb_server *server, gpr_timespec deadline) { /* Destroys server instances. */ static void grpc_rb_server_free(void *p) { grpc_rb_server *svr = NULL; + gpr_timespec deadline; if (p == NULL) { return; }; svr = (grpc_rb_server *)p; - // TODO(murgatroid99): Maybe don't wait forever for the server to shutdown - destroy_server(svr, gpr_inf_future); + deadline = gpr_time_add( + gpr_now(GPR_CLOCK_REALTIME), + gpr_time_from_seconds(2, GPR_TIMESPAN)); + + destroy_server(svr, deadline); xfree(p); } @@ -154,9 +159,6 @@ static VALUE grpc_rb_server_init(VALUE self, VALUE channel_args) { wrapper->wrapped = srv; wrapper->queue = cq; - /* Add the cq as the server's mark object. This ensures the ruby cq can't be - GCed before the server */ - wrapper->mark = cqueue; return self; } @@ -218,7 +220,7 @@ static VALUE grpc_rb_server_request_call(VALUE self) { } ev = rb_completion_queue_pluck(s->queue, tag, - gpr_inf_future, NULL); + gpr_inf_future(GPR_CLOCK_REALTIME), NULL); if (!ev.success) { grpc_request_call_stack_cleanup(&st); rb_raise(grpc_rb_eCallError, "request_call completion failed"); @@ -251,27 +253,23 @@ static VALUE grpc_rb_server_start(VALUE self) { /* call-seq: - cq = CompletionQueue.new - server = Server.new(cq, {'arg1': 'value1'}) + server = Server.new({'arg1': 'value1'}) ... // do stuff with server ... ... // to shutdown the server - server.destroy(cq) + server.destroy() ... // to shutdown the server with a timeout - server.destroy(cq, timeout) + server.destroy(timeout) Destroys server instances. */ static VALUE grpc_rb_server_destroy(int argc, VALUE *argv, VALUE self) { - VALUE cqueue = Qnil; VALUE timeout = Qnil; - grpc_completion_queue *cq = NULL; - grpc_event ev; + gpr_timespec deadline; grpc_rb_server *s = NULL; - /* "11" == 1 mandatory args, 1 (timeout) is optional */ - rb_scan_args(argc, argv, "11", &cqueue, &timeout); - cq = grpc_rb_get_wrapped_completion_queue(cqueue); + /* "01" == 0 mandatory args, 1 (timeout) is optional */ + rb_scan_args(argc, argv, "01", &timeout); TypedData_Get_Struct(self, grpc_rb_server, &grpc_rb_server_data_type, s); if (TYPE(timeout) == T_NIL) { deadline = gpr_inf_future(GPR_CLOCK_REALTIME); diff --git a/src/ruby/lib/grpc/generic/active_call.rb b/src/ruby/lib/grpc/generic/active_call.rb index b03ddbc193c..18126c44323 100644 --- a/src/ruby/lib/grpc/generic/active_call.rb +++ b/src/ruby/lib/grpc/generic/active_call.rb @@ -75,17 +75,10 @@ module GRPC # if a keyword value is a list, multiple metadata for it's key are sent # # @param call [Call] a call on which to start and invocation - # @param q [CompletionQueue] the completion queue # @param metadata [Hash] the metadata - def self.client_invoke(call, q, metadata = {}) + def self.client_invoke(call, metadata = {}) fail(TypeError, '!Core::Call') unless call.is_a? Core::Call - unless q.is_a? Core::CompletionQueue - fail(TypeError, '!Core::CompletionQueue') - end - metadata_tag = Object.new - call.run_batch(q, metadata_tag, INFINITE_FUTURE, - SEND_INITIAL_METADATA => metadata) - metadata_tag + call.run_batch(SEND_INITIAL_METADATA => metadata) end # Creates an ActiveCall. @@ -102,26 +95,21 @@ module GRPC # deadline is the absolute deadline for the call. # # @param call [Call] the call used by the ActiveCall - # @param q [CompletionQueue] the completion queue used to accept - # the call. This queue will be closed on call completion. # @param marshal [Function] f(obj)->string that marshal requests # @param unmarshal [Function] f(string)->obj that unmarshals responses # @param deadline [Fixnum] the deadline for the call to complete - # @param metadata_tag [Object] the object use obtain metadata for clients - # @param started [true|false] indicates if the call has begun - def initialize(call, q, marshal, unmarshal, deadline, started: true, - metadata_tag: nil) + # @param started [true|false] indicates that metadata was sent + # @param metadata_received [true|false] indicates if metadata has already + # been received. Should always be true for server calls + def initialize(call, marshal, unmarshal, deadline, started: true, + metadata_received: false) fail(TypeError, '!Core::Call') unless call.is_a? Core::Call - unless q.is_a? Core::CompletionQueue - fail(TypeError, '!Core::CompletionQueue') - end @call = call - @cq = q @deadline = deadline @marshal = marshal - @started = started @unmarshal = unmarshal - @metadata_tag = metadata_tag + @metadata_received = metadata_received + @metadata_sent = started @op_notifier = nil end @@ -168,7 +156,7 @@ module GRPC SEND_CLOSE_FROM_CLIENT => nil } ops[RECV_STATUS_ON_CLIENT] = nil if assert_finished - batch_result = @call.run_batch(@cq, self, INFINITE_FUTURE, ops) + batch_result = @call.run_batch(ops) return unless assert_finished @call.status = batch_result.status op_is_done @@ -179,8 +167,7 @@ module GRPC # # It blocks until the remote endpoint acknowledges by sending a status. def finished - batch_result = @call.run_batch(@cq, self, INFINITE_FUTURE, - RECV_STATUS_ON_CLIENT => nil) + batch_result = @call.run_batch(RECV_STATUS_ON_CLIENT => nil) unless batch_result.status.nil? if @call.metadata.nil? @call.metadata = batch_result.status.metadata @@ -192,7 +179,6 @@ module GRPC op_is_done batch_result.check_status @call.close - @cq.close end # remote_send sends a request to the remote endpoint. @@ -203,9 +189,10 @@ module GRPC # @param marshalled [false, true] indicates if the object is already # marshalled. def remote_send(req, marshalled = false) + # TODO(murgatroid99): ensure metadata was sent GRPC.logger.debug("sending #{req}, marshalled? #{marshalled}") payload = marshalled ? req : @marshal.call(req) - @call.run_batch(@cq, self, INFINITE_FUTURE, SEND_MESSAGE => payload) + @call.run_batch(SEND_MESSAGE => payload) end # send_status sends a status to the remote endpoint. @@ -222,7 +209,7 @@ module GRPC SEND_STATUS_FROM_SERVER => Struct::Status.new(code, details, metadata) } ops[RECV_CLOSE_ON_SERVER] = nil if assert_finished - @call.run_batch(@cq, self, INFINITE_FUTURE, ops) + @call.run_batch(ops) nil end @@ -234,11 +221,11 @@ module GRPC # raising BadStatus def remote_read ops = { RECV_MESSAGE => nil } - ops[RECV_INITIAL_METADATA] = nil unless @metadata_tag.nil? - batch_result = @call.run_batch(@cq, self, INFINITE_FUTURE, ops) - unless @metadata_tag.nil? + ops[RECV_INITIAL_METADATA] = nil unless @metadata_received + batch_result = @call.run_batch(ops) + unless @metadata_received @call.metadata = batch_result.metadata - @metadata_tag = nil + @metadata_received = true end GRPC.logger.debug("received req: #{batch_result}") unless batch_result.nil? || batch_result.message.nil? @@ -318,7 +305,7 @@ module GRPC # a list, multiple metadata for its key are sent # @return [Object] the response received from the server def request_response(req, metadata: {}) - start_call(metadata) unless @started + start_call(metadata) remote_send(req) writes_done(false) response = remote_read @@ -342,7 +329,7 @@ module GRPC # a list, multiple metadata for its key are sent # @return [Object] the response received from the server def client_streamer(requests, metadata: {}) - start_call(metadata) unless @started + start_call(metadata) requests.each { |r| remote_send(r) } writes_done(false) response = remote_read @@ -368,7 +355,7 @@ module GRPC # a list, multiple metadata for its key are sent # @return [Enumerator|nil] a response Enumerator def server_streamer(req, metadata: {}) - start_call(metadata) unless @started + start_call(metadata) remote_send(req) writes_done(false) replies = enum_for(:each_remote_read_then_finish) @@ -407,10 +394,9 @@ module GRPC # a list, multiple metadata for its key are sent # @return [Enumerator, nil] a response Enumerator def bidi_streamer(requests, metadata: {}, &blk) - start_call(metadata) unless @started - bd = BidiCall.new(@call, @cq, @marshal, @unmarshal, - metadata_tag: @metadata_tag) - @metadata_tag = nil # run_on_client ensures metadata is read + start_call(metadata) + bd = BidiCall.new(@call, @marshal, @unmarshal, + metadata_received: @metadata_received) bd.run_on_client(requests, @op_notifier, &blk) end @@ -426,7 +412,7 @@ module GRPC # # @param gen_each_reply [Proc] generates the BiDi stream replies def run_server_bidi(gen_each_reply) - bd = BidiCall.new(@call, @cq, @marshal, @unmarshal) + bd = BidiCall.new(@call, @marshal, @unmarshal) bd.run_on_server(gen_each_reply) end @@ -449,9 +435,9 @@ module GRPC # @param metadata [Hash] metadata to be sent to the server. If a value is # a list, multiple metadata for its key are sent def start_call(metadata = {}) - return if @started - @metadata_tag = ActiveCall.client_invoke(@call, @cq, metadata) - @started = true + return if @metadata_sent + @metadata_tag = ActiveCall.client_invoke(@call, metadata) + @metadata_sent = true end def self.view_class(*visible_methods) diff --git a/src/ruby/lib/grpc/generic/bidi_call.rb b/src/ruby/lib/grpc/generic/bidi_call.rb index 238f409a1d6..f4f9d1b3ddc 100644 --- a/src/ruby/lib/grpc/generic/bidi_call.rb +++ b/src/ruby/lib/grpc/generic/bidi_call.rb @@ -52,23 +52,18 @@ module GRPC # deadline is the absolute deadline for the call. # # @param call [Call] the call used by the ActiveCall - # @param q [CompletionQueue] the completion queue used to accept - # the call # @param marshal [Function] f(obj)->string that marshal requests # @param unmarshal [Function] f(string)->obj that unmarshals responses - # @param metadata_tag [Object] tag object used to collect metadata - def initialize(call, q, marshal, unmarshal, metadata_tag: nil) + # @param metadata_received [true|false] indicates if metadata has already + # been received. Should always be true for server calls + def initialize(call, marshal, unmarshal, metadata_received: false) fail(ArgumentError, 'not a call') unless call.is_a? Core::Call - unless q.is_a? Core::CompletionQueue - fail(ArgumentError, 'not a CompletionQueue') - end @call = call - @cq = q @marshal = marshal @op_notifier = nil # signals completion on clients @readq = Queue.new @unmarshal = unmarshal - @metadata_tag = metadata_tag + @metadata_received = metadata_received @reads_complete = false @writes_complete = false @complete = false @@ -124,7 +119,6 @@ module GRPC @done_mutex.synchronize do return unless @reads_complete && @writes_complete && !@complete @call.close - @cq.close @complete = true end end @@ -132,11 +126,11 @@ module GRPC # performs a read using @call.run_batch, ensures metadata is set up def read_using_run_batch ops = { RECV_MESSAGE => nil } - ops[RECV_INITIAL_METADATA] = nil unless @metadata_tag.nil? - batch_result = @call.run_batch(@cq, self, INFINITE_FUTURE, ops) - unless @metadata_tag.nil? + ops[RECV_INITIAL_METADATA] = nil unless @metadata_received + batch_result = @call.run_batch(ops) + unless @metadata_received @call.metadata = batch_result.metadata - @metadata_tag = nil + @metadata_received = true end batch_result end @@ -161,20 +155,18 @@ module GRPC def write_loop(requests, is_client: true) GRPC.logger.debug('bidi-write-loop: starting') - write_tag = Object.new count = 0 requests.each do |req| GRPC.logger.debug("bidi-write-loop: #{count}") count += 1 payload = @marshal.call(req) - @call.run_batch(@cq, write_tag, INFINITE_FUTURE, - SEND_MESSAGE => payload) + # Fails if status already received + @call.run_batch(SEND_MESSAGE => payload) end GRPC.logger.debug("bidi-write-loop: #{count} writes done") if is_client GRPC.logger.debug("bidi-write-loop: client sent #{count}, waiting") - @call.run_batch(@cq, write_tag, INFINITE_FUTURE, - SEND_CLOSE_FROM_CLIENT => nil) + @call.run_batch(SEND_CLOSE_FROM_CLIENT => nil) GRPC.logger.debug('bidi-write-loop: done') notify_done @writes_complete = true @@ -195,7 +187,6 @@ module GRPC Thread.new do GRPC.logger.debug('bidi-read-loop: starting') begin - read_tag = Object.new count = 0 # queue the initial read before beginning the loop loop do @@ -208,8 +199,7 @@ module GRPC GRPC.logger.debug("bidi-read-loop: null batch #{batch_result}") if is_client - batch_result = @call.run_batch(@cq, read_tag, INFINITE_FUTURE, - RECV_STATUS_ON_CLIENT => nil) + batch_result = @call.run_batch(RECV_STATUS_ON_CLIENT => nil) @call.status = batch_result.status batch_result.check_status GRPC.logger.debug("bidi-read-loop: done status #{@call.status}") diff --git a/src/ruby/lib/grpc/generic/client_stub.rb b/src/ruby/lib/grpc/generic/client_stub.rb index cddca13d173..9d6bd3bf590 100644 --- a/src/ruby/lib/grpc/generic/client_stub.rb +++ b/src/ruby/lib/grpc/generic/client_stub.rb @@ -90,19 +90,16 @@ module GRPC # when present, this is the default timeout used for calls # # @param host [String] the host the stub connects to - # @param q [Core::CompletionQueue] used to wait for events - now deprecated - # since each new active call gets its own separately # @param creds [Core::ChannelCredentials|Symbol] the channel credentials, or # :this_channel_is_insecure # @param channel_override [Core::Channel] a pre-created channel # @param timeout [Number] the default timeout to use in requests # @param channel_args [Hash] the channel arguments - def initialize(host, q, creds, + def initialize(host, creds, channel_override: nil, timeout: nil, propagate_mask: nil, channel_args: {}) - fail(TypeError, '!CompletionQueue') unless q.is_a?(Core::CompletionQueue) @ch = ClientStub.setup_channel(channel_override, host, creds, channel_args) alt_host = channel_args[Core::Channel::SSL_TARGET] @@ -441,15 +438,13 @@ module GRPC deadline = from_relative_time(@timeout) if deadline.nil? # Provide each new client call with its own completion queue - call_queue = Core::CompletionQueue.new - call = @ch.create_call(call_queue, - parent, # parent call + call = @ch.create_call(parent, # parent call @propagate_mask, # propagation options method, nil, # host use nil, deadline) call.set_credentials! credentials unless credentials.nil? - ActiveCall.new(call, call_queue, marshal, unmarshal, deadline, + ActiveCall.new(call, marshal, unmarshal, deadline, started: false) end end diff --git a/src/ruby/lib/grpc/generic/rpc_server.rb b/src/ruby/lib/grpc/generic/rpc_server.rb index ab7333d1337..c92a532a500 100644 --- a/src/ruby/lib/grpc/generic/rpc_server.rb +++ b/src/ruby/lib/grpc/generic/rpc_server.rb @@ -159,16 +159,6 @@ module GRPC # Signal check period is 0.25s SIGNAL_CHECK_PERIOD = 0.25 - # setup_cq is used by #initialize to constuct a Core::CompletionQueue from - # its arguments. - def self.setup_cq(alt_cq) - return Core::CompletionQueue.new if alt_cq.nil? - unless alt_cq.is_a? Core::CompletionQueue - fail(TypeError, '!CompletionQueue') - end - alt_cq - end - # setup_connect_md_proc is used by #initialize to validate the # connect_md_proc. def self.setup_connect_md_proc(a_proc) @@ -191,10 +181,6 @@ module GRPC # * pool_size: the size of the thread pool the server uses to run its # threads # - # * completion_queue_override: when supplied, this will be used as the - # completion_queue that the server uses to receive network events, - # otherwise its creates a new instance itself - # # * creds: [GRPC::Core::ServerCredentials] # the credentials used to secure the server # @@ -212,11 +198,9 @@ module GRPC def initialize(pool_size:DEFAULT_POOL_SIZE, max_waiting_requests:DEFAULT_MAX_WAITING_REQUESTS, poll_period:DEFAULT_POLL_PERIOD, - completion_queue_override:nil, connect_md_proc:nil, server_args:{}) @connect_md_proc = RpcServer.setup_connect_md_proc(connect_md_proc) - @cq = RpcServer.setup_cq(completion_queue_override) @max_waiting_requests = max_waiting_requests @poll_period = poll_period @pool_size = pool_size @@ -226,7 +210,7 @@ module GRPC # running_state can take 4 values: :not_started, :running, :stopping, and # :stopped. State transitions can only proceed in that order. @running_state = :not_started - @server = Core::Server.new(@cq, server_args) + @server = Core::Server.new(server_args) end # stops a running server @@ -240,7 +224,7 @@ module GRPC transition_running_state(:stopping) end deadline = from_relative_time(@poll_period) - @server.close(@cq, deadline) + @server.close(deadline) @pool.stop end @@ -355,7 +339,8 @@ module GRPC return an_rpc if @pool.jobs_waiting <= @max_waiting_requests GRPC.logger.warn("NOT AVAILABLE: too many jobs_waiting: #{an_rpc}") noop = proc { |x| x } - c = ActiveCall.new(an_rpc.call, an_rpc.cq, noop, noop, an_rpc.deadline) + c = ActiveCall.new(an_rpc.call, noop, noop, an_rpc.deadline, + metadata_received: true) c.send_status(GRPC::Core::StatusCodes::RESOURCE_EXHAUSTED, '') nil end @@ -366,7 +351,8 @@ module GRPC return an_rpc if rpc_descs.key?(mth) GRPC.logger.warn("UNIMPLEMENTED: #{an_rpc}") noop = proc { |x| x } - c = ActiveCall.new(an_rpc.call, an_rpc.cq, noop, noop, an_rpc.deadline) + c = ActiveCall.new(an_rpc.call, noop, noop, an_rpc.deadline, + metadata_received: true) c.send_status(GRPC::Core::StatusCodes::UNIMPLEMENTED, '') nil end @@ -374,11 +360,9 @@ module GRPC # handles calls to the server def loop_handle_server_calls fail 'not started' if running_state == :not_started - loop_tag = Object.new while running_state == :running begin - comp_queue = Core::CompletionQueue.new - an_rpc = @server.request_call(comp_queue, loop_tag, INFINITE_FUTURE) + an_rpc = @server.request_call break if (!an_rpc.nil?) && an_rpc.call.nil? active_call = new_active_server_call(an_rpc) unless active_call.nil? @@ -410,15 +394,13 @@ module GRPC return nil if an_rpc.nil? || an_rpc.call.nil? # allow the metadata to be accessed from the call - handle_call_tag = Object.new an_rpc.call.metadata = an_rpc.metadata # attaches md to call for handlers GRPC.logger.debug("call md is #{an_rpc.metadata}") connect_md = nil unless @connect_md_proc.nil? connect_md = @connect_md_proc.call(an_rpc.method, an_rpc.metadata) end - an_rpc.call.run_batch(an_rpc.cq, handle_call_tag, INFINITE_FUTURE, - SEND_INITIAL_METADATA => connect_md) + an_rpc.call.run_batch(SEND_INITIAL_METADATA => connect_md) return nil unless available?(an_rpc) return nil unless implemented?(an_rpc) @@ -426,9 +408,9 @@ module GRPC # Create the ActiveCall GRPC.logger.info("deadline is #{an_rpc.deadline}; (now=#{Time.now})") rpc_desc = rpc_descs[an_rpc.method.to_sym] - c = ActiveCall.new(an_rpc.call, an_rpc.cq, - rpc_desc.marshal_proc, rpc_desc.unmarshal_proc(:input), - an_rpc.deadline) + c = ActiveCall.new(an_rpc.call, rpc_desc.marshal_proc, + rpc_desc.unmarshal_proc(:input), an_rpc.deadline, + metadata_received: true) mth = an_rpc.method.to_sym [c, mth] end diff --git a/src/ruby/lib/grpc/generic/service.rb b/src/ruby/lib/grpc/generic/service.rb index f30242ee801..7cb9f1cc99d 100644 --- a/src/ruby/lib/grpc/generic/service.rb +++ b/src/ruby/lib/grpc/generic/service.rb @@ -168,7 +168,7 @@ module GRPC # @param kw [KeywordArgs] the channel arguments, plus any optional # args for configuring the client's channel def initialize(host, creds, **kw) - super(host, Core::CompletionQueue.new, creds, **kw) + super(host, creds, **kw) end # Used define_method to add a method for each rpc_desc. Each method diff --git a/src/ruby/spec/call_spec.rb b/src/ruby/spec/call_spec.rb index ae3ce0748a2..1c44b333de7 100644 --- a/src/ruby/spec/call_spec.rb +++ b/src/ruby/spec/call_spec.rb @@ -96,7 +96,6 @@ describe GRPC::Core::CallOps do end describe GRPC::Core::Call do - let(:client_queue) { GRPC::Core::CompletionQueue.new } let(:test_tag) { Object.new } let(:fake_host) { 'localhost:10101' } @@ -154,7 +153,7 @@ describe GRPC::Core::Call do end def make_test_call - @ch.create_call(client_queue, nil, nil, 'dummy_method', nil, deadline) + @ch.create_call(nil, nil, 'dummy_method', nil, deadline) end def deadline diff --git a/src/ruby/spec/channel_spec.rb b/src/ruby/spec/channel_spec.rb index 355f95c9d79..740eac631a3 100644 --- a/src/ruby/spec/channel_spec.rb +++ b/src/ruby/spec/channel_spec.rb @@ -37,7 +37,6 @@ end describe GRPC::Core::Channel do let(:fake_host) { 'localhost:0' } - let(:cq) { GRPC::Core::CompletionQueue.new } def create_test_cert GRPC::Core::ChannelCredentials.new(load_test_certs[0]) @@ -122,7 +121,7 @@ describe GRPC::Core::Channel do deadline = Time.now + 5 blk = proc do - ch.create_call(cq, nil, nil, 'dummy_method', nil, deadline) + ch.create_call(nil, nil, 'dummy_method', nil, deadline) end expect(&blk).to_not raise_error end @@ -133,7 +132,7 @@ describe GRPC::Core::Channel do deadline = Time.now + 5 blk = proc do - ch.create_call(cq, nil, nil, 'dummy_method', nil, deadline) + ch.create_call(nil, nil, 'dummy_method', nil, deadline) end expect(&blk).to raise_error(RuntimeError) end diff --git a/src/ruby/spec/client_server_spec.rb b/src/ruby/spec/client_server_spec.rb index aedeca272d3..5440e6d0233 100644 --- a/src/ruby/spec/client_server_spec.rb +++ b/src/ruby/spec/client_server_spec.rb @@ -34,27 +34,23 @@ include GRPC::Core shared_context 'setup: tags' do let(:sent_message) { 'sent message' } let(:reply_text) { 'the reply' } - before(:example) do - @client_tag = Object.new - @server_tag = Object.new - end def deadline Time.now + 5 end def server_allows_client_to_proceed - recvd_rpc = @server.request_call(@server_queue, @server_tag, deadline) + recvd_rpc = @server.request_call expect(recvd_rpc).to_not eq nil server_call = recvd_rpc.call ops = { CallOps::SEND_INITIAL_METADATA => {} } - svr_batch = server_call.run_batch(@server_queue, @server_tag, deadline, ops) + svr_batch = server_call.run_batch(ops) expect(svr_batch.send_metadata).to be true server_call end def new_client_call - @ch.create_call(@client_queue, nil, nil, '/method', nil, deadline) + @ch.create_call(nil, nil, '/method', nil, deadline) end end @@ -91,8 +87,7 @@ shared_examples 'basic GRPC message delivery is OK' do CallOps::SEND_INITIAL_METADATA => {}, CallOps::SEND_MESSAGE => sent_message } - batch_result = call.run_batch(@client_queue, @client_tag, deadline, - client_ops) + batch_result = call.run_batch(client_ops) expect(batch_result.send_metadata).to be true expect(batch_result.send_message).to be true @@ -101,8 +96,7 @@ shared_examples 'basic GRPC message delivery is OK' do server_ops = { CallOps::RECV_MESSAGE => nil } - svr_batch = server_call.run_batch(@server_queue, @server_tag, deadline, - server_ops) + svr_batch = server_call.run_batch(server_ops) expect(svr_batch.message).to eq(sent_message) end @@ -118,8 +112,7 @@ shared_examples 'basic GRPC message delivery is OK' do CallOps::SEND_INITIAL_METADATA => {}, CallOps::SEND_MESSAGE => sent_message } - batch_result = call.run_batch(@client_queue, @client_tag, deadline, - client_ops) + batch_result = call.run_batch(client_ops) expect(batch_result.send_metadata).to be true expect(batch_result.send_message).to be true @@ -129,8 +122,7 @@ shared_examples 'basic GRPC message delivery is OK' do CallOps::RECV_MESSAGE => nil, CallOps::SEND_MESSAGE => reply_text } - svr_batch = server_call.run_batch(@server_queue, @server_tag, deadline, - server_ops) + svr_batch = server_call.run_batch(server_ops) expect(svr_batch.message).to eq(sent_message) expect(svr_batch.send_message).to be true end @@ -147,8 +139,7 @@ shared_examples 'basic GRPC message delivery is OK' do CallOps::SEND_INITIAL_METADATA => {}, CallOps::SEND_MESSAGE => sent_message } - batch_result = call.run_batch(@client_queue, @client_tag, deadline, - client_ops) + batch_result = call.run_batch(client_ops) expect(batch_result.send_metadata).to be true expect(batch_result.send_message).to be true @@ -158,8 +149,7 @@ shared_examples 'basic GRPC message delivery is OK' do server_ops = { CallOps::SEND_STATUS_FROM_SERVER => the_status } - svr_batch = server_call.run_batch(@server_queue, @server_tag, deadline, - server_ops) + svr_batch = server_call.run_batch(server_ops) expect(svr_batch.message).to eq nil expect(svr_batch.send_status).to be true end @@ -176,8 +166,7 @@ shared_examples 'basic GRPC message delivery is OK' do CallOps::SEND_INITIAL_METADATA => {}, CallOps::SEND_MESSAGE => sent_message } - batch_result = call.run_batch(@client_queue, @client_tag, deadline, - client_ops) + batch_result = call.run_batch(client_ops) expect(batch_result.send_metadata).to be true expect(batch_result.send_message).to be true @@ -189,8 +178,7 @@ shared_examples 'basic GRPC message delivery is OK' do CallOps::SEND_MESSAGE => reply_text, CallOps::SEND_STATUS_FROM_SERVER => the_status } - svr_batch = server_call.run_batch(@server_queue, @server_tag, deadline, - server_ops) + svr_batch = server_call.run_batch(server_ops) expect(svr_batch.message).to eq sent_message expect(svr_batch.send_status).to be true expect(svr_batch.send_message).to be true @@ -202,8 +190,7 @@ shared_examples 'basic GRPC message delivery is OK' do CallOps::RECV_MESSAGE => nil, CallOps::RECV_STATUS_ON_CLIENT => nil } - batch_result = call.run_batch(@client_queue, @client_tag, deadline, - client_ops) + batch_result = call.run_batch(client_ops) expect(batch_result.send_close).to be true expect(batch_result.message).to eq reply_text expect(batch_result.status).to eq the_status @@ -212,8 +199,7 @@ shared_examples 'basic GRPC message delivery is OK' do server_ops = { CallOps::RECV_CLOSE_ON_SERVER => nil } - svr_batch = server_call.run_batch(@server_queue, @server_tag, deadline, - server_ops) + svr_batch = server_call.run_batch(server_ops) expect(svr_batch.send_close).to be true end end @@ -244,8 +230,7 @@ shared_examples 'GRPC metadata delivery works OK' do CallOps::SEND_INITIAL_METADATA => md } blk = proc do - call.run_batch(@client_queue, @client_tag, deadline, - client_ops) + call.run_batch(client_ops) end expect(&blk).to raise_error end @@ -255,15 +240,14 @@ shared_examples 'GRPC metadata delivery works OK' do @valid_metadata.each do |md| recvd_rpc = nil rcv_thread = Thread.new do - recvd_rpc = @server.request_call(@server_queue, @server_tag, deadline) + recvd_rpc = @server.request_call end call = new_client_call client_ops = { CallOps::SEND_INITIAL_METADATA => md } - batch_result = call.run_batch(@client_queue, @client_tag, deadline, - client_ops) + batch_result = call.run_batch(client_ops) expect(batch_result.send_metadata).to be true # confirm the server can receive the client metadata @@ -296,7 +280,7 @@ shared_examples 'GRPC metadata delivery works OK' do @bad_keys.each do |md| recvd_rpc = nil rcv_thread = Thread.new do - recvd_rpc = @server.request_call(@server_queue, @server_tag, deadline) + recvd_rpc = @server.request_call end call = new_client_call @@ -305,7 +289,7 @@ shared_examples 'GRPC metadata delivery works OK' do client_ops = { CallOps::SEND_INITIAL_METADATA => nil } - call.run_batch(@client_queue, @client_tag, deadline, client_ops) + call.run_batch(client_ops) # server gets the invocation rcv_thread.join @@ -314,8 +298,7 @@ shared_examples 'GRPC metadata delivery works OK' do CallOps::SEND_INITIAL_METADATA => md } blk = proc do - recvd_rpc.call.run_batch(@server_queue, @server_tag, deadline, - server_ops) + recvd_rpc.call.run_batch(server_ops) end expect(&blk).to raise_error end @@ -324,7 +307,7 @@ shared_examples 'GRPC metadata delivery works OK' do it 'sends an empty hash if no metadata is added' do recvd_rpc = nil rcv_thread = Thread.new do - recvd_rpc = @server.request_call(@server_queue, @server_tag, deadline) + recvd_rpc = @server.request_call end call = new_client_call @@ -333,7 +316,7 @@ shared_examples 'GRPC metadata delivery works OK' do client_ops = { CallOps::SEND_INITIAL_METADATA => nil } - call.run_batch(@client_queue, @client_tag, deadline, client_ops) + call.run_batch(client_ops) # server gets the invocation but sends no metadata back rcv_thread.join @@ -342,14 +325,13 @@ shared_examples 'GRPC metadata delivery works OK' do server_ops = { CallOps::SEND_INITIAL_METADATA => nil } - server_call.run_batch(@server_queue, @server_tag, deadline, server_ops) + server_call.run_batch(server_ops) # client receives nothing as expected client_ops = { CallOps::RECV_INITIAL_METADATA => nil } - batch_result = call.run_batch(@client_queue, @client_tag, deadline, - client_ops) + batch_result = call.run_batch(client_ops) expect(batch_result.metadata).to eq({}) end @@ -357,7 +339,7 @@ shared_examples 'GRPC metadata delivery works OK' do @valid_metadata.each do |md| recvd_rpc = nil rcv_thread = Thread.new do - recvd_rpc = @server.request_call(@server_queue, @server_tag, deadline) + recvd_rpc = @server.request_call end call = new_client_call @@ -366,7 +348,7 @@ shared_examples 'GRPC metadata delivery works OK' do client_ops = { CallOps::SEND_INITIAL_METADATA => nil } - call.run_batch(@client_queue, @client_tag, deadline, client_ops) + call.run_batch(client_ops) # server gets the invocation but sends no metadata back rcv_thread.join @@ -375,14 +357,13 @@ shared_examples 'GRPC metadata delivery works OK' do server_ops = { CallOps::SEND_INITIAL_METADATA => md } - server_call.run_batch(@server_queue, @server_tag, deadline, server_ops) + server_call.run_batch(server_ops) # client receives nothing as expected client_ops = { CallOps::RECV_INITIAL_METADATA => nil } - batch_result = call.run_batch(@client_queue, @client_tag, deadline, - client_ops) + batch_result = call.run_batch(client_ops) replace_symbols = Hash[md.each_pair.collect { |x, y| [x.to_s, y] }] expect(batch_result.metadata).to eq(replace_symbols) end @@ -393,9 +374,7 @@ end describe 'the http client/server' do before(:example) do server_host = '0.0.0.0:0' - @client_queue = GRPC::Core::CompletionQueue.new - @server_queue = GRPC::Core::CompletionQueue.new - @server = GRPC::Core::Server.new(@server_queue, nil) + @server = GRPC::Core::Server.new(nil) server_port = @server.add_http2_port(server_host, :this_port_is_insecure) @server.start @ch = Channel.new("0.0.0.0:#{server_port}", nil, :this_channel_is_insecure) @@ -403,7 +382,7 @@ describe 'the http client/server' do after(:example) do @ch.close - @server.close(@server_queue, deadline) + @server.close(deadline) end it_behaves_like 'basic GRPC message delivery is OK' do @@ -425,11 +404,9 @@ describe 'the secure http client/server' do before(:example) do certs = load_test_certs server_host = '0.0.0.0:0' - @client_queue = GRPC::Core::CompletionQueue.new - @server_queue = GRPC::Core::CompletionQueue.new server_creds = GRPC::Core::ServerCredentials.new( nil, [{ private_key: certs[1], cert_chain: certs[2] }], false) - @server = GRPC::Core::Server.new(@server_queue, nil) + @server = GRPC::Core::Server.new(nil) server_port = @server.add_http2_port(server_host, server_creds) @server.start args = { Channel::SSL_TARGET => 'foo.test.google.fr' } @@ -438,7 +415,7 @@ describe 'the secure http client/server' do end after(:example) do - @server.close(@server_queue, deadline) + @server.close(deadline) end it_behaves_like 'basic GRPC message delivery is OK' do @@ -454,7 +431,7 @@ describe 'the secure http client/server' do expected_md = { 'k1' => 'updated-v1', 'k2' => 'v2' } recvd_rpc = nil rcv_thread = Thread.new do - recvd_rpc = @server.request_call(@server_queue, @server_tag, deadline) + recvd_rpc = @server.request_call end call = new_client_call @@ -462,8 +439,7 @@ describe 'the secure http client/server' do client_ops = { CallOps::SEND_INITIAL_METADATA => md } - batch_result = call.run_batch(@client_queue, @client_tag, deadline, - client_ops) + batch_result = call.run_batch(client_ops) expect(batch_result.send_metadata).to be true # confirm the server can receive the client metadata diff --git a/src/ruby/spec/completion_queue_spec.rb b/src/ruby/spec/completion_queue_spec.rb deleted file mode 100644 index 886a7f263ba..00000000000 --- a/src/ruby/spec/completion_queue_spec.rb +++ /dev/null @@ -1,42 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -require 'grpc' - -describe GRPC::Core::CompletionQueue do - before(:example) do - @cq = GRPC::Core::CompletionQueue.new - end - - describe '#new' do - it 'is constructed successufully' do - expect { GRPC::Core::CompletionQueue.new }.not_to raise_error - end - end -end diff --git a/src/ruby/spec/generic/active_call_spec.rb b/src/ruby/spec/generic/active_call_spec.rb index d9c9780c93b..b4e6f9ee028 100644 --- a/src/ruby/spec/generic/active_call_spec.rb +++ b/src/ruby/spec/generic/active_call_spec.rb @@ -39,13 +39,8 @@ describe GRPC::ActiveCall do before(:each) do @pass_through = proc { |x| x } - @server_tag = Object.new - @tag = Object.new - - @client_queue = GRPC::Core::CompletionQueue.new - @server_queue = GRPC::Core::CompletionQueue.new host = '0.0.0.0:0' - @server = GRPC::Core::Server.new(@server_queue, nil) + @server = GRPC::Core::Server.new(nil) server_port = @server.add_http2_port(host, :this_port_is_insecure) @server.start @ch = GRPC::Core::Channel.new("0.0.0.0:#{server_port}", nil, @@ -53,16 +48,15 @@ describe GRPC::ActiveCall do end after(:each) do - @server.close(@server_queue, deadline) + @server.close(deadline) end describe 'restricted view methods' do before(:each) do call = make_test_call - md_tag = ActiveCall.client_invoke(call, @client_queue) - @client_call = ActiveCall.new(call, @client_queue, @pass_through, - @pass_through, deadline, - metadata_tag: md_tag) + ActiveCall.client_invoke(call) + @client_call = ActiveCall.new(call, @pass_through, + @pass_through, deadline) end describe '#multi_req_view' do @@ -89,46 +83,42 @@ describe GRPC::ActiveCall do describe '#remote_send' do it 'allows a client to send a payload to the server' do call = make_test_call - md_tag = ActiveCall.client_invoke(call, @client_queue) - @client_call = ActiveCall.new(call, @client_queue, @pass_through, - @pass_through, deadline, - metadata_tag: md_tag) + ActiveCall.client_invoke(call) + @client_call = ActiveCall.new(call, @pass_through, + @pass_through, deadline) msg = 'message is a string' @client_call.remote_send(msg) # check that server rpc new was received - recvd_rpc = @server.request_call(@server_queue, @server_tag, deadline) + recvd_rpc = @server.request_call expect(recvd_rpc).to_not eq nil recvd_call = recvd_rpc.call # Accept the call, and verify that the server reads the response ok. - server_ops = { - CallOps::SEND_INITIAL_METADATA => {} - } - recvd_call.run_batch(@server_queue, @server_tag, deadline, server_ops) - server_call = ActiveCall.new(recvd_call, @server_queue, @pass_through, - @pass_through, deadline) + server_call = ActiveCall.new(recvd_call, @pass_through, + @pass_through, deadline, + metadata_received: true) expect(server_call.remote_read).to eq(msg) end it 'marshals the payload using the marshal func' do call = make_test_call - ActiveCall.client_invoke(call, @client_queue) + ActiveCall.client_invoke(call) marshal = proc { |x| 'marshalled:' + x } - client_call = ActiveCall.new(call, @client_queue, marshal, - @pass_through, deadline) + client_call = ActiveCall.new(call, marshal, @pass_through, deadline) msg = 'message is a string' client_call.remote_send(msg) # confirm that the message was marshalled - recvd_rpc = @server.request_call(@server_queue, @server_tag, deadline) + recvd_rpc = @server.request_call recvd_call = recvd_rpc.call server_ops = { CallOps::SEND_INITIAL_METADATA => nil } - recvd_call.run_batch(@server_queue, @server_tag, deadline, server_ops) - server_call = ActiveCall.new(recvd_call, @server_queue, @pass_through, - @pass_through, deadline) + recvd_call.run_batch(server_ops) + server_call = ActiveCall.new(recvd_call, @pass_through, + @pass_through, deadline, + metadata_received: true) expect(server_call.remote_read).to eq('marshalled:' + msg) end @@ -136,23 +126,24 @@ describe GRPC::ActiveCall do TEST_WRITE_FLAGS.each do |f| it "successfully makes calls with write_flag set to #{f}" do call = make_test_call - ActiveCall.client_invoke(call, @client_queue) + ActiveCall.client_invoke(call) marshal = proc { |x| 'marshalled:' + x } - client_call = ActiveCall.new(call, @client_queue, marshal, + client_call = ActiveCall.new(call, marshal, @pass_through, deadline) msg = 'message is a string' client_call.write_flag = f client_call.remote_send(msg) # confirm that the message was marshalled - recvd_rpc = @server.request_call(@server_queue, @server_tag, deadline) + recvd_rpc = @server.request_call recvd_call = recvd_rpc.call server_ops = { CallOps::SEND_INITIAL_METADATA => nil } - recvd_call.run_batch(@server_queue, @server_tag, deadline, server_ops) - server_call = ActiveCall.new(recvd_call, @server_queue, @pass_through, - @pass_through, deadline) + recvd_call.run_batch(server_ops) + server_call = ActiveCall.new(recvd_call, @pass_through, + @pass_through, deadline, + metadata_received: true) expect(server_call.remote_read).to eq('marshalled:' + msg) end end @@ -162,8 +153,8 @@ describe GRPC::ActiveCall do it 'sends metadata to the server when present' do call = make_test_call metadata = { k1: 'v1', k2: 'v2' } - ActiveCall.client_invoke(call, @client_queue, metadata) - recvd_rpc = @server.request_call(@server_queue, @server_tag, deadline) + ActiveCall.client_invoke(call, metadata) + recvd_rpc = @server.request_call recvd_call = recvd_rpc.call expect(recvd_call).to_not be_nil expect(recvd_rpc.metadata).to_not be_nil @@ -175,10 +166,9 @@ describe GRPC::ActiveCall do describe '#remote_read' do it 'reads the response sent by a server' do call = make_test_call - md_tag = ActiveCall.client_invoke(call, @client_queue) - client_call = ActiveCall.new(call, @client_queue, @pass_through, - @pass_through, deadline, - metadata_tag: md_tag) + ActiveCall.client_invoke(call) + client_call = ActiveCall.new(call, @pass_through, + @pass_through, deadline) msg = 'message is a string' client_call.remote_send(msg) server_call = expect_server_to_receive(msg) @@ -188,10 +178,9 @@ describe GRPC::ActiveCall do it 'saves no metadata when the server adds no metadata' do call = make_test_call - md_tag = ActiveCall.client_invoke(call, @client_queue) - client_call = ActiveCall.new(call, @client_queue, @pass_through, - @pass_through, deadline, - metadata_tag: md_tag) + ActiveCall.client_invoke(call) + client_call = ActiveCall.new(call, @pass_through, + @pass_through, deadline) msg = 'message is a string' client_call.remote_send(msg) server_call = expect_server_to_receive(msg) @@ -203,10 +192,9 @@ describe GRPC::ActiveCall do it 'saves metadata add by the server' do call = make_test_call - md_tag = ActiveCall.client_invoke(call, @client_queue) - client_call = ActiveCall.new(call, @client_queue, @pass_through, - @pass_through, deadline, - metadata_tag: md_tag) + ActiveCall.client_invoke(call) + client_call = ActiveCall.new(call, @pass_through, + @pass_through, deadline) msg = 'message is a string' client_call.remote_send(msg) server_call = expect_server_to_receive(msg, k1: 'v1', k2: 'v2') @@ -219,10 +207,9 @@ describe GRPC::ActiveCall do it 'get a nil msg before a status when an OK status is sent' do call = make_test_call - md_tag = ActiveCall.client_invoke(call, @client_queue) - client_call = ActiveCall.new(call, @client_queue, @pass_through, - @pass_through, deadline, - metadata_tag: md_tag) + ActiveCall.client_invoke(call) + client_call = ActiveCall.new(call, @pass_through, + @pass_through, deadline) msg = 'message is a string' client_call.remote_send(msg) client_call.writes_done(false) @@ -236,11 +223,10 @@ describe GRPC::ActiveCall do it 'unmarshals the response using the unmarshal func' do call = make_test_call - md_tag = ActiveCall.client_invoke(call, @client_queue) + ActiveCall.client_invoke(call) unmarshal = proc { |x| 'unmarshalled:' + x } - client_call = ActiveCall.new(call, @client_queue, @pass_through, - unmarshal, deadline, - metadata_tag: md_tag) + client_call = ActiveCall.new(call, @pass_through, + unmarshal, deadline) # confirm the client receives the unmarshalled message msg = 'message is a string' @@ -254,17 +240,16 @@ describe GRPC::ActiveCall do describe '#each_remote_read' do it 'creates an Enumerator' do call = make_test_call - client_call = ActiveCall.new(call, @client_queue, @pass_through, + client_call = ActiveCall.new(call, @pass_through, @pass_through, deadline) expect(client_call.each_remote_read).to be_a(Enumerator) end it 'the returns an enumerator that can read n responses' do call = make_test_call - md_tag = ActiveCall.client_invoke(call, @client_queue) - client_call = ActiveCall.new(call, @client_queue, @pass_through, - @pass_through, deadline, - metadata_tag: md_tag) + ActiveCall.client_invoke(call) + client_call = ActiveCall.new(call, @pass_through, + @pass_through, deadline) msg = 'message is a string' reply = 'server_response' client_call.remote_send(msg) @@ -279,10 +264,9 @@ describe GRPC::ActiveCall do it 'the returns an enumerator that stops after an OK Status' do call = make_test_call - md_tag = ActiveCall.client_invoke(call, @client_queue) - client_call = ActiveCall.new(call, @client_queue, @pass_through, - @pass_through, deadline, - metadata_tag: md_tag) + ActiveCall.client_invoke(call) + client_call = ActiveCall.new(call, @pass_through, + @pass_through, deadline) msg = 'message is a string' reply = 'server_response' client_call.remote_send(msg) @@ -302,10 +286,9 @@ describe GRPC::ActiveCall do describe '#writes_done' do it 'finishes ok if the server sends a status response' do call = make_test_call - md_tag = ActiveCall.client_invoke(call, @client_queue) - client_call = ActiveCall.new(call, @client_queue, @pass_through, - @pass_through, deadline, - metadata_tag: md_tag) + ActiveCall.client_invoke(call) + client_call = ActiveCall.new(call, @pass_through, + @pass_through, deadline) msg = 'message is a string' client_call.remote_send(msg) expect { client_call.writes_done(false) }.to_not raise_error @@ -318,10 +301,9 @@ describe GRPC::ActiveCall do it 'finishes ok if the server sends an early status response' do call = make_test_call - md_tag = ActiveCall.client_invoke(call, @client_queue) - client_call = ActiveCall.new(call, @client_queue, @pass_through, - @pass_through, deadline, - metadata_tag: md_tag) + ActiveCall.client_invoke(call) + client_call = ActiveCall.new(call, @pass_through, + @pass_through, deadline) msg = 'message is a string' client_call.remote_send(msg) server_call = expect_server_to_receive(msg) @@ -334,10 +316,9 @@ describe GRPC::ActiveCall do it 'finishes ok if writes_done is true' do call = make_test_call - md_tag = ActiveCall.client_invoke(call, @client_queue) - client_call = ActiveCall.new(call, @client_queue, @pass_through, - @pass_through, deadline, - metadata_tag: md_tag) + ActiveCall.client_invoke(call) + client_call = ActiveCall.new(call, @pass_through, + @pass_through, deadline) msg = 'message is a string' client_call.remote_send(msg) server_call = expect_server_to_receive(msg) @@ -355,17 +336,16 @@ describe GRPC::ActiveCall do end def expect_server_to_be_invoked(**kw) - recvd_rpc = @server.request_call(@server_queue, @server_tag, deadline) + recvd_rpc = @server.request_call expect(recvd_rpc).to_not eq nil recvd_call = recvd_rpc.call - recvd_call.run_batch(@server_queue, @server_tag, deadline, - CallOps::SEND_INITIAL_METADATA => kw) - ActiveCall.new(recvd_call, @server_queue, @pass_through, - @pass_through, deadline) + recvd_call.run_batch(CallOps::SEND_INITIAL_METADATA => kw) + ActiveCall.new(recvd_call, @pass_through, @pass_through, deadline, + metadata_received: true, started: true) end def make_test_call - @ch.create_call(@client_queue, nil, nil, '/method', nil, deadline) + @ch.create_call(nil, nil, '/method', nil, deadline) end def deadline diff --git a/src/ruby/spec/generic/client_stub_spec.rb b/src/ruby/spec/generic/client_stub_spec.rb index 168e7fb7919..6034b5419c9 100644 --- a/src/ruby/spec/generic/client_stub_spec.rb +++ b/src/ruby/spec/generic/client_stub_spec.rb @@ -29,11 +29,14 @@ require 'grpc' +Thread.abort_on_exception = true + def wakey_thread(&blk) n = GRPC::Notifier.new t = Thread.new do blk.call(n) end + t.abort_on_exception = true n.wait t end @@ -54,15 +57,13 @@ describe 'ClientStub' do before(:each) do Thread.abort_on_exception = true @server = nil - @server_queue = nil @method = 'an_rpc_method' @pass = OK @fail = INTERNAL - @cq = GRPC::Core::CompletionQueue.new end after(:each) do - @server.close(@server_queue) unless @server_queue.nil? + @server.close(from_relative_time(2)) unless @server.nil? end describe '#new' do @@ -70,7 +71,7 @@ describe 'ClientStub' do it 'can be created from a host and args' do opts = { channel_args: { a_channel_arg: 'an_arg' } } blk = proc do - GRPC::ClientStub.new(fake_host, @cq, :this_channel_is_insecure, **opts) + GRPC::ClientStub.new(fake_host, :this_channel_is_insecure, **opts) end expect(&blk).not_to raise_error end @@ -81,7 +82,7 @@ describe 'ClientStub' do channel_override: @ch } blk = proc do - GRPC::ClientStub.new(fake_host, @cq, :this_channel_is_insecure, **opts) + GRPC::ClientStub.new(fake_host, :this_channel_is_insecure, **opts) end expect(&blk).not_to raise_error end @@ -92,7 +93,7 @@ describe 'ClientStub' do channel_args: { a_channel_arg: 'an_arg' }, channel_override: Object.new } - GRPC::ClientStub.new(fake_host, @cq, :this_channel_is_insecure, **opts) + GRPC::ClientStub.new(fake_host, :this_channel_is_insecure, **opts) end expect(&blk).to raise_error end @@ -100,7 +101,7 @@ describe 'ClientStub' do it 'cannot be created with bad credentials' do blk = proc do opts = { channel_args: { a_channel_arg: 'an_arg' } } - GRPC::ClientStub.new(fake_host, @cq, Object.new, **opts) + GRPC::ClientStub.new(fake_host, Object.new, **opts) end expect(&blk).to raise_error end @@ -115,7 +116,7 @@ describe 'ClientStub' do } } creds = GRPC::Core::ChannelCredentials.new(certs[0], nil, nil) - GRPC::ClientStub.new(fake_host, @cq, creds, **opts) + GRPC::ClientStub.new(fake_host, creds, **opts) end expect(&blk).to_not raise_error end @@ -130,7 +131,7 @@ describe 'ClientStub' do it 'should send a request to/receive a reply from a server' do server_port = create_test_server th = run_request_response(@sent_msg, @resp, @pass) - stub = GRPC::ClientStub.new("localhost:#{server_port}", @cq, + stub = GRPC::ClientStub.new("localhost:#{server_port}", :this_channel_is_insecure) expect(get_response(stub)).to eq(@resp) th.join @@ -141,7 +142,7 @@ describe 'ClientStub' do host = "localhost:#{server_port}" th = run_request_response(@sent_msg, @resp, @pass, k1: 'v1', k2: 'v2') - stub = GRPC::ClientStub.new(host, @cq, :this_channel_is_insecure) + stub = GRPC::ClientStub.new(host, :this_channel_is_insecure) expect(get_response(stub)).to eq(@resp) th.join end @@ -151,7 +152,7 @@ describe 'ClientStub' do alt_host = "localhost:#{server_port}" th = run_request_response(@sent_msg, @resp, @pass) ch = GRPC::Core::Channel.new(alt_host, nil, :this_channel_is_insecure) - stub = GRPC::ClientStub.new('ignored-host', @cq, + stub = GRPC::ClientStub.new('ignored-host', :this_channel_is_insecure, channel_override: ch) expect(get_response(stub)).to eq(@resp) @@ -162,7 +163,7 @@ describe 'ClientStub' do server_port = create_test_server host = "localhost:#{server_port}" th = run_request_response(@sent_msg, @resp, @fail) - stub = GRPC::ClientStub.new(host, @cq, :this_channel_is_insecure) + stub = GRPC::ClientStub.new(host, :this_channel_is_insecure) blk = proc { get_response(stub) } expect(&blk).to raise_error(GRPC::BadStatus) th.join @@ -182,7 +183,8 @@ describe 'ClientStub' do def get_response(stub) op = stub.request_response(@method, @sent_msg, noop, noop, return_op: true, - metadata: { k1: 'v1', k2: 'v2' }) + metadata: { k1: 'v1', k2: 'v2' }, + deadline: from_relative_time(2)) expect(op).to be_a(GRPC::ActiveCall::Operation) op.execute end @@ -196,7 +198,7 @@ describe 'ClientStub' do before(:each) do server_port = create_test_server host = "localhost:#{server_port}" - @stub = GRPC::ClientStub.new(host, @cq, :this_channel_is_insecure) + @stub = GRPC::ClientStub.new(host, :this_channel_is_insecure) @metadata = { k1: 'v1', k2: 'v2' } @sent_msgs = Array.new(3) { |i| 'msg_' + (i + 1).to_s } @resp = 'a_reply' @@ -262,7 +264,7 @@ describe 'ClientStub' do server_port = create_test_server host = "localhost:#{server_port}" th = run_server_streamer(@sent_msg, @replys, @pass) - stub = GRPC::ClientStub.new(host, @cq, :this_channel_is_insecure) + stub = GRPC::ClientStub.new(host, :this_channel_is_insecure) expect(get_responses(stub).collect { |r| r }).to eq(@replys) th.join end @@ -271,7 +273,7 @@ describe 'ClientStub' do server_port = create_test_server host = "localhost:#{server_port}" th = run_server_streamer(@sent_msg, @replys, @fail) - stub = GRPC::ClientStub.new(host, @cq, :this_channel_is_insecure) + stub = GRPC::ClientStub.new(host, :this_channel_is_insecure) e = get_responses(stub) expect { e.collect { |r| r } }.to raise_error(GRPC::BadStatus) th.join @@ -282,7 +284,7 @@ describe 'ClientStub' do host = "localhost:#{server_port}" th = run_server_streamer(@sent_msg, @replys, @fail, k1: 'v1', k2: 'v2') - stub = GRPC::ClientStub.new(host, @cq, :this_channel_is_insecure) + stub = GRPC::ClientStub.new(host, :this_channel_is_insecure) e = get_responses(stub) expect { e.collect { |r| r } }.to raise_error(GRPC::BadStatus) th.join @@ -327,7 +329,7 @@ describe 'ClientStub' do it 'supports sending all the requests first', bidi: true do th = run_bidi_streamer_handle_inputs_first(@sent_msgs, @replys, @pass) - stub = GRPC::ClientStub.new(@host, @cq, :this_channel_is_insecure) + stub = GRPC::ClientStub.new(@host, :this_channel_is_insecure) e = get_responses(stub) expect(e.collect { |r| r }).to eq(@replys) th.join @@ -335,7 +337,7 @@ describe 'ClientStub' do it 'supports client-initiated ping pong', bidi: true do th = run_bidi_streamer_echo_ping_pong(@sent_msgs, @pass, true) - stub = GRPC::ClientStub.new(@host, @cq, :this_channel_is_insecure) + stub = GRPC::ClientStub.new(@host, :this_channel_is_insecure) e = get_responses(stub) expect(e.collect { |r| r }).to eq(@sent_msgs) th.join @@ -343,7 +345,7 @@ describe 'ClientStub' do it 'supports a server-initiated ping pong', bidi: true do th = run_bidi_streamer_echo_ping_pong(@sent_msgs, @pass, false) - stub = GRPC::ClientStub.new(@host, @cq, :this_channel_is_insecure) + stub = GRPC::ClientStub.new(@host, :this_channel_is_insecure) e = get_responses(stub) expect(e.collect { |r| r }).to eq(@sent_msgs) th.join @@ -372,26 +374,6 @@ describe 'ClientStub' do it_behaves_like 'bidi streaming' end - - describe 'without enough time to run' do - before(:each) do - @sent_msgs = Array.new(3) { |i| 'msg_' + (i + 1).to_s } - @replys = Array.new(3) { |i| 'reply_' + (i + 1).to_s } - server_port = create_test_server - @host = "localhost:#{server_port}" - end - - it 'should fail with DeadlineExceeded', bidi: true do - @server.start - stub = GRPC::ClientStub.new(@host, @cq, :this_channel_is_insecure) - blk = proc do - e = stub.bidi_streamer(@method, @sent_msgs, noop, noop, - deadline: from_relative_time(0.001)) - e.collect { |r| r } - end - expect(&blk).to raise_error GRPC::BadStatus, /Deadline Exceeded/ - end - end end def run_server_streamer(expected_input, replys, status, **kw) @@ -460,21 +442,18 @@ describe 'ClientStub' do end def create_test_server - @server_queue = GRPC::Core::CompletionQueue.new - @server = GRPC::Core::Server.new(@server_queue, nil) + @server = GRPC::Core::Server.new(nil) @server.add_http2_port('0.0.0.0:0', :this_port_is_insecure) end def expect_server_to_be_invoked(notifier) @server.start notifier.notify(nil) - server_tag = Object.new - recvd_rpc = @server.request_call(@server_queue, server_tag, - INFINITE_FUTURE) + recvd_rpc = @server.request_call recvd_call = recvd_rpc.call recvd_call.metadata = recvd_rpc.metadata - recvd_call.run_batch(@server_queue, server_tag, Time.now + 2, - SEND_INITIAL_METADATA => nil) - GRPC::ActiveCall.new(recvd_call, @server_queue, noop, noop, INFINITE_FUTURE) + recvd_call.run_batch(SEND_INITIAL_METADATA => nil) + GRPC::ActiveCall.new(recvd_call, noop, noop, INFINITE_FUTURE, + metadata_received: true) end end diff --git a/src/ruby/spec/generic/rpc_server_spec.rb b/src/ruby/spec/generic/rpc_server_spec.rb index 943502cea23..901c84fc783 100644 --- a/src/ruby/spec/generic/rpc_server_spec.rb +++ b/src/ruby/spec/generic/rpc_server_spec.rb @@ -135,8 +135,6 @@ describe GRPC::RpcServer do @pass = 0 @fail = 1 @noop = proc { |x| x } - - @server_queue = GRPC::Core::CompletionQueue.new end describe '#new' do @@ -148,28 +146,6 @@ describe GRPC::RpcServer do expect(&blk).not_to raise_error end - it 'can be created with a completion queue override' do - opts = { - server_args: { a_channel_arg: 'an_arg' }, - completion_queue_override: @server_queue - } - blk = proc do - RpcServer.new(**opts) - end - expect(&blk).not_to raise_error - end - - it 'cannot be created with a bad completion queue override' do - blk = proc do - opts = { - server_args: { a_channel_arg: 'an_arg' }, - completion_queue_override: Object.new - } - RpcServer.new(**opts) - end - expect(&blk).to raise_error - end - it 'cannot be created with invalid ServerCredentials' do blk = proc do opts = { @@ -294,7 +270,6 @@ describe GRPC::RpcServer do context 'with no connect_metadata' do before(:each) do server_opts = { - completion_queue_override: @server_queue, poll_period: 1 } @srv = RpcServer.new(**server_opts) @@ -309,8 +284,7 @@ describe GRPC::RpcServer do @srv.wait_till_running req = EchoMsg.new blk = proc do - cq = GRPC::Core::CompletionQueue.new - stub = GRPC::ClientStub.new(@host, cq, :this_channel_is_insecure, + stub = GRPC::ClientStub.new(@host, :this_channel_is_insecure, **client_opts) stub.request_response('/unknown', req, marshal, unmarshal) end @@ -325,8 +299,7 @@ describe GRPC::RpcServer do @srv.wait_till_running req = EchoMsg.new blk = proc do - cq = GRPC::Core::CompletionQueue.new - stub = GRPC::ClientStub.new(@host, cq, :this_channel_is_insecure, + stub = GRPC::ClientStub.new(@host, :this_channel_is_insecure, **client_opts) stub.request_response('/an_rpc', req, marshal, unmarshal) end @@ -422,7 +395,6 @@ describe GRPC::RpcServer do it 'should return RESOURCE_EXHAUSTED on too many jobs', server: true do opts = { server_args: { a_channel_arg: 'an_arg' }, - completion_queue_override: @server_queue, pool_size: 1, poll_period: 1, max_waiting_requests: 0 @@ -466,7 +438,6 @@ describe GRPC::RpcServer do end before(:each) do server_opts = { - completion_queue_override: @server_queue, poll_period: 1, connect_md_proc: test_md_proc } @@ -502,7 +473,6 @@ describe GRPC::RpcServer do context 'with trailing metadata' do before(:each) do server_opts = { - completion_queue_override: @server_queue, poll_period: 1 } @srv = RpcServer.new(**server_opts) diff --git a/src/ruby/spec/pb/health/checker_spec.rb b/src/ruby/spec/pb/health/checker_spec.rb index f3d121a31ef..de11c9fedf7 100644 --- a/src/ruby/spec/pb/health/checker_spec.rb +++ b/src/ruby/spec/pb/health/checker_spec.rb @@ -168,11 +168,9 @@ describe Grpc::Health::Checker do CheckerStub = Grpc::Health::Checker.rpc_stub_class before(:each) do - @server_queue = GRPC::Core::CompletionQueue.new server_host = '0.0.0.0:0' @client_opts = { channel_override: @ch } server_opts = { - completion_queue_override: @server_queue, poll_period: 1 } @srv = RpcServer.new(**server_opts) diff --git a/src/ruby/spec/server_spec.rb b/src/ruby/spec/server_spec.rb index 439b19fb8db..003d8f69d57 100644 --- a/src/ruby/spec/server_spec.rb +++ b/src/ruby/spec/server_spec.rb @@ -43,19 +43,15 @@ describe Server do GRPC::Core::ServerCredentials.new(*load_test_certs) end - before(:each) do - @cq = GRPC::Core::CompletionQueue.new - end - describe '#start' do it 'runs without failing' do - blk = proc { Server.new(@cq, nil).start } + blk = proc { Server.new(nil).start } expect(&blk).to_not raise_error end it 'fails if the server is closed' do - s = Server.new(@cq, nil) - s.close(@cq) + s = Server.new(nil) + s.close expect { s.start }.to raise_error(RuntimeError) end end @@ -63,19 +59,19 @@ describe Server do describe '#destroy' do it 'destroys a server ok' do s = start_a_server - blk = proc { s.destroy(@cq) } + blk = proc { s.destroy } expect(&blk).to_not raise_error end it 'can be called more than once without error' do s = start_a_server begin - blk = proc { s.destroy(@cq) } + blk = proc { s.destroy } expect(&blk).to_not raise_error blk.call expect(&blk).to_not raise_error ensure - s.close(@cq) + s.close end end end @@ -84,7 +80,7 @@ describe Server do it 'closes a server ok' do s = start_a_server begin - blk = proc { s.close(@cq) } + blk = proc { s.close } expect(&blk).to_not raise_error ensure s.close(@cq) @@ -93,7 +89,7 @@ describe Server do it 'can be called more than once without error' do s = start_a_server - blk = proc { s.close(@cq) } + blk = proc { s.close } expect(&blk).to_not raise_error blk.call expect(&blk).to_not raise_error @@ -104,16 +100,16 @@ describe Server do describe 'for insecure servers' do it 'runs without failing' do blk = proc do - s = Server.new(@cq, nil) + s = Server.new(nil) s.add_http2_port('localhost:0', :this_port_is_insecure) - s.close(@cq) + s.close end expect(&blk).to_not raise_error end it 'fails if the server is closed' do - s = Server.new(@cq, nil) - s.close(@cq) + s = Server.new(nil) + s.close blk = proc do s.add_http2_port('localhost:0', :this_port_is_insecure) end @@ -125,16 +121,16 @@ describe Server do let(:cert) { create_test_cert } it 'runs without failing' do blk = proc do - s = Server.new(@cq, nil) + s = Server.new(nil) s.add_http2_port('localhost:0', cert) - s.close(@cq) + s.close end expect(&blk).to_not raise_error end it 'fails if the server is closed' do - s = Server.new(@cq, nil) - s.close(@cq) + s = Server.new(nil) + s.close blk = proc { s.add_http2_port('localhost:0', cert) } expect(&blk).to raise_error(RuntimeError) end @@ -142,8 +138,8 @@ describe Server do end shared_examples '#new' do - it 'takes a completion queue with nil channel args' do - expect { Server.new(@cq, nil) }.to_not raise_error + it 'takes nil channel args' do + expect { Server.new(nil) }.to_not raise_error end it 'does not take a hash with bad keys as channel args' do @@ -194,14 +190,14 @@ describe Server do describe '#new with an insecure channel' do def construct_with_args(a) - proc { Server.new(@cq, a) } + proc { Server.new(a) } end it_behaves_like '#new' end def start_a_server - s = Server.new(@cq, nil) + s = Server.new(nil) s.add_http2_port('0.0.0.0:0', :this_port_is_insecure) s.start s From ddc3ebb6ea694b252c27e149507bec4df427a592 Mon Sep 17 00:00:00 2001 From: yang-g Date: Mon, 13 Jun 2016 10:40:32 -0700 Subject: [PATCH 1045/1894] add missing language tag --- build.yaml | 11 +++++----- tools/run_tests/sources_and_headers.json | 26 ++++++++++++------------ 2 files changed, 19 insertions(+), 18 deletions(-) diff --git a/build.yaml b/build.yaml index a94fb052a5d..8589ba28f8e 100644 --- a/build.yaml +++ b/build.yaml @@ -143,11 +143,6 @@ filegroups: - include/grpc/impl/codegen/sync_posix.h - include/grpc/impl/codegen/sync_windows.h - include/grpc/impl/codegen/time.h -- name: grpc++_codegen_base_src - src: - - src/cpp/codegen/codegen_init.cc - uses: - - grpc++_codegen_base - name: grpc_base public_headers: - include/grpc/byte_buffer.h @@ -747,6 +742,12 @@ filegroups: - include/grpc++/impl/codegen/time.h uses: - grpc_codegen +- name: grpc++_codegen_base_src + language: c++ + src: + - src/cpp/codegen/codegen_init.cc + uses: + - grpc++_codegen_base - name: grpc++_codegen_proto language: c++ public_headers: diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index fd522ee1739..1d73434f3dc 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5607,19 +5607,6 @@ "third_party": false, "type": "filegroup" }, - { - "deps": [ - "grpc++_codegen_base" - ], - "headers": [], - "language": "c", - "name": "grpc++_codegen_base_src", - "src": [ - "src/cpp/codegen/codegen_init.cc" - ], - "third_party": false, - "type": "filegroup" - }, { "deps": [ "gpr", @@ -6636,6 +6623,19 @@ "third_party": false, "type": "filegroup" }, + { + "deps": [ + "grpc++_codegen_base" + ], + "headers": [], + "language": "c++", + "name": "grpc++_codegen_base_src", + "src": [ + "src/cpp/codegen/codegen_init.cc" + ], + "third_party": false, + "type": "filegroup" + }, { "deps": [ "grpc++_codegen_base", From 1fa96c5c49b4fda6ebd2be0cfe353297e3e92e0b Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 13 Jun 2016 10:48:22 -0700 Subject: [PATCH 1046/1894] Removed an extra mark object, fixed some documentation --- src/ruby/ext/grpc/rb_server.c | 20 ++------------------ src/ruby/ext/grpc/rb_server_credentials.c | 4 ++-- 2 files changed, 4 insertions(+), 20 deletions(-) diff --git a/src/ruby/ext/grpc/rb_server.c b/src/ruby/ext/grpc/rb_server.c index 1ed2c35da34..a7d53350920 100644 --- a/src/ruby/ext/grpc/rb_server.c +++ b/src/ruby/ext/grpc/rb_server.c @@ -53,11 +53,8 @@ static ID id_at; /* id_insecure_server is used to indicate that a server is insecure */ static VALUE id_insecure_server; -/* grpc_rb_server wraps a grpc_server. It provides a peer ruby object, - 'mark' to minimize copying when a server is created from ruby. */ +/* grpc_rb_server wraps a grpc_server. */ typedef struct grpc_rb_server { - /* Holder of ruby objects involved in constructing the server */ - VALUE mark; /* The actual server */ grpc_server *wrapped; grpc_completion_queue *queue; @@ -98,21 +95,9 @@ static void grpc_rb_server_free(void *p) { xfree(p); } -/* Protects the mark object from GC */ -static void grpc_rb_server_mark(void *p) { - grpc_rb_server *server = NULL; - if (p == NULL) { - return; - } - server = (grpc_rb_server *)p; - if (server->mark != Qnil) { - rb_gc_mark(server->mark); - } -} - static const rb_data_type_t grpc_rb_server_data_type = { "grpc_server", - {grpc_rb_server_mark, grpc_rb_server_free, GRPC_RB_MEMSIZE_UNAVAILABLE, + {GRPC_RB_GC_NOT_MARKED, grpc_rb_server_free, GRPC_RB_MEMSIZE_UNAVAILABLE, {NULL, NULL}}, NULL, NULL, @@ -129,7 +114,6 @@ static const rb_data_type_t grpc_rb_server_data_type = { static VALUE grpc_rb_server_alloc(VALUE cls) { grpc_rb_server *wrapper = ALLOC(grpc_rb_server); wrapper->wrapped = NULL; - wrapper->mark = Qnil; return TypedData_Wrap_Struct(cls, &grpc_rb_server_data_type, wrapper); } diff --git a/src/ruby/ext/grpc/rb_server_credentials.c b/src/ruby/ext/grpc/rb_server_credentials.c index 58ec852505c..cb7545b3645 100644 --- a/src/ruby/ext/grpc/rb_server_credentials.c +++ b/src/ruby/ext/grpc/rb_server_credentials.c @@ -46,8 +46,8 @@ static VALUE grpc_rb_cServerCredentials = Qnil; /* grpc_rb_server_credentials wraps a grpc_server_credentials. It provides a - peer ruby object, 'mark' to minimize copying when a server credential is - created from ruby. */ + peer ruby object, 'mark' to hold references to objects involved in + constructing the server credentials. */ typedef struct grpc_rb_server_credentials { /* Holder of ruby objects involved in constructing the server credentials */ VALUE mark; From 0f47a6808ed69325a6a67f2adc1f8d663d265db3 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 13 Jun 2016 10:52:46 -0700 Subject: [PATCH 1047/1894] Finish merge --- test/core/http/response_fuzzer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/core/http/response_fuzzer.c b/test/core/http/response_fuzzer.c index c453e1d667b..acde7c80a4b 100644 --- a/test/core/http/response_fuzzer.c +++ b/test/core/http/response_fuzzer.c @@ -38,6 +38,9 @@ #include "src/core/lib/http/parser.h" +bool squelch = true; +bool leak_check = true; + int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_http_parser parser; grpc_http_response response; From f38f2bb4319e51bd4af43f057d1cc20956af21fb Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Mon, 13 Jun 2016 10:55:02 -0700 Subject: [PATCH 1048/1894] php: remove explicit version in composer.json --- composer.json | 1 - templates/composer.json.template | 1 - 2 files changed, 2 deletions(-) diff --git a/composer.json b/composer.json index b77a59e351c..05ac0037146 100644 --- a/composer.json +++ b/composer.json @@ -2,7 +2,6 @@ "name": "grpc/grpc", "type": "library", "description": "gRPC library for PHP", - "version": "0.15.0", "keywords": ["rpc"], "homepage": "http://grpc.io", "license": "BSD-3-Clause", diff --git a/templates/composer.json.template b/templates/composer.json.template index 275b4655ced..7d2029c218f 100644 --- a/templates/composer.json.template +++ b/templates/composer.json.template @@ -4,7 +4,6 @@ "name": "grpc/grpc", "type": "library", "description": "gRPC library for PHP", - "version": "${settings.php_version.php()}", "keywords": ["rpc"], "homepage": "http://grpc.io", "license": "BSD-3-Clause", From aee9d1aa7dcae6371cf28ac2efde8dd513a89c9e Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Fri, 10 Jun 2016 13:11:23 -0700 Subject: [PATCH 1049/1894] Added check for signals in poll() Also removed the unused pluck() function --- .../_cython/_cygrpc/completion_queue.pxd.pxi | 3 - .../_cython/_cygrpc/completion_queue.pyx.pxi | 59 +++++++------------ .../grpcio/grpc/_cython/_cygrpc/grpc.pxi | 6 ++ .../grpc/_cython/_cygrpc/server.pyx.pxi | 2 +- 4 files changed, 27 insertions(+), 43 deletions(-) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pxd.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pxd.pxi index a67c9636843..01089c3dc0b 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pxd.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pxd.pxi @@ -31,9 +31,6 @@ cdef class CompletionQueue: cdef grpc_completion_queue *c_completion_queue - cdef object pluck_condition - cdef int num_plucking - cdef int num_polling cdef bint is_shutting_down cdef bint is_shutdown diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi index cdae39d5194..90266516fed 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/completion_queue.pyx.pxi @@ -32,6 +32,8 @@ cimport cpython import threading import time +cdef int _INTERRUPT_CHECK_PERIOD_MS = 200 + cdef class CompletionQueue: @@ -40,9 +42,6 @@ cdef class CompletionQueue: self.c_completion_queue = grpc_completion_queue_create(NULL) self.is_shutting_down = False self.is_shutdown = False - self.pluck_condition = threading.Condition() - self.num_plucking = 0 - self.num_polling = 0 cdef _interpret_event(self, grpc_event event): cdef OperationTag tag = None @@ -83,45 +82,27 @@ cdef class CompletionQueue: def poll(self, Timespec deadline=None): # We name this 'poll' to avoid problems with CPython's expectations for # 'special' methods (like next and __next__). + cdef gpr_timespec c_increment + cdef gpr_timespec c_timeout cdef gpr_timespec c_deadline with nogil: + c_increment = gpr_time_from_millis(_INTERRUPT_CHECK_PERIOD_MS, GPR_TIMESPAN) c_deadline = gpr_inf_future(GPR_CLOCK_REALTIME) - if deadline is not None: - c_deadline = deadline.c_time - cdef grpc_event event - - # Poll within a critical section to detect contention - with self.pluck_condition: - assert self.num_plucking == 0, 'cannot simultaneously pluck and poll' - self.num_polling += 1 - with nogil: - event = grpc_completion_queue_next( - self.c_completion_queue, c_deadline, NULL) - with self.pluck_condition: - self.num_polling -= 1 - return self._interpret_event(event) - - def pluck(self, OperationTag tag, Timespec deadline=None): - # Plucking a 'None' tag is equivalent to passing control to GRPC core until - # the deadline. - cdef gpr_timespec c_deadline = gpr_inf_future( - GPR_CLOCK_REALTIME) - if deadline is not None: - c_deadline = deadline.c_time - cdef grpc_event event - - # Pluck within a critical section to detect contention - with self.pluck_condition: - assert self.num_polling == 0, 'cannot simultaneously pluck and poll' - assert self.num_plucking < GRPC_MAX_COMPLETION_QUEUE_PLUCKERS, ( - 'cannot pluck more than {} times simultaneously'.format( - GRPC_MAX_COMPLETION_QUEUE_PLUCKERS)) - self.num_plucking += 1 - with nogil: - event = grpc_completion_queue_pluck( - self.c_completion_queue, tag, c_deadline, NULL) - with self.pluck_condition: - self.num_plucking -= 1 + if deadline is not None: + c_deadline = deadline.c_time + + while True: + c_timeout = gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), c_increment) + if gpr_time_cmp(c_timeout, c_deadline) > 0: + c_timeout = c_deadline + event = grpc_completion_queue_next( + self.c_completion_queue, c_timeout, NULL) + if event.type != GRPC_QUEUE_TIMEOUT or gpr_time_cmp(c_timeout, c_deadline) == 0: + break; + + # Handle any signals + with gil: + cpython.PyErr_CheckSignals() return self._interpret_event(event) def shutdown(self): diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi index 05b8886df73..168b9751aa2 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi @@ -80,6 +80,12 @@ cdef extern from "grpc/_cython/loader.h": gpr_timespec gpr_convert_clock_type(gpr_timespec t, gpr_clock_type target_clock) nogil + gpr_timespec gpr_time_from_millis(int64_t ms, gpr_clock_type type) nogil + + gpr_timespec gpr_time_add(gpr_timespec a, gpr_timespec b) nogil + + int gpr_time_cmp(gpr_timespec a, gpr_timespec b) nogil + ctypedef enum grpc_status_code: GRPC_STATUS_OK GRPC_STATUS_CANCELLED diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi index 55948755b2f..6ce589dbdc2 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi @@ -99,7 +99,7 @@ cdef class Server: with nogil: grpc_server_start(self.c_server) # Ensure the core has gotten a chance to do the start-up work - self.backup_shutdown_queue.pluck(None, Timespec(None)) + self.backup_shutdown_queue.poll(Timespec(None)) def add_http2_port(self, address, ServerCredentials server_credentials=None): From 773a8825bcb9cae06af18263b112b8f8fd96f10d Mon Sep 17 00:00:00 2001 From: yang-g Date: Mon, 13 Jun 2016 11:09:29 -0700 Subject: [PATCH 1050/1894] Minor fixes --- src/core/lib/iomgr/udp_server.c | 4 ++-- src/cpp/server/server_posix.cc | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/lib/iomgr/udp_server.c b/src/core/lib/iomgr/udp_server.c index 16150687d3d..1ebccf2ee2e 100644 --- a/src/core/lib/iomgr/udp_server.c +++ b/src/core/lib/iomgr/udp_server.c @@ -243,13 +243,13 @@ static int prepare_socket(int fd, const struct sockaddr *addr, if (!grpc_set_socket_sndbuf(fd, buffer_size_bytes)) { gpr_log(GPR_ERROR, "Failed to set send buffer size to %d bytes", - buf_size_bytes); + buffer_size_bytes); goto error; } if (!grpc_set_socket_rcvbuf(fd, buffer_size_bytes)) { gpr_log(GPR_ERROR, "Failed to set receive buffer size to %d bytes", - buf_size_bytes); + buffer_size_bytes); goto error; } diff --git a/src/cpp/server/server_posix.cc b/src/cpp/server/server_posix.cc index 8cb9753a125..c3aa2adc60e 100644 --- a/src/cpp/server/server_posix.cc +++ b/src/cpp/server/server_posix.cc @@ -42,8 +42,8 @@ namespace grpc { void AddInsecureChannelFromFd(Server* server, int fd) { grpc_server_add_insecure_channel_from_fd( server->c_server(), server->completion_queue()->cq(), fd); +} #endif // GPR_SUPPORT_CHANNELS_FROM_FD -} } // namespace grpc From 2bab9a833933ca5c055e558f689545c546b5e89b Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 13 Jun 2016 11:46:47 -0700 Subject: [PATCH 1051/1894] add LogLevel enum --- src/csharp/Grpc.Core/Grpc.Core.csproj | 1 + src/csharp/Grpc.Core/Logging/LogLevel.cs | 59 ++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 src/csharp/Grpc.Core/Logging/LogLevel.cs diff --git a/src/csharp/Grpc.Core/Grpc.Core.csproj b/src/csharp/Grpc.Core/Grpc.Core.csproj index a8b7b5f00d9..db04a8a68b1 100644 --- a/src/csharp/Grpc.Core/Grpc.Core.csproj +++ b/src/csharp/Grpc.Core/Grpc.Core.csproj @@ -136,6 +136,7 @@ + diff --git a/src/csharp/Grpc.Core/Logging/LogLevel.cs b/src/csharp/Grpc.Core/Logging/LogLevel.cs new file mode 100644 index 00000000000..d64e1f5fd0f --- /dev/null +++ b/src/csharp/Grpc.Core/Logging/LogLevel.cs @@ -0,0 +1,59 @@ +#region Copyright notice and license + +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#endregion + +using System; +using System.Collections.Generic; + +namespace Grpc.Core.Logging +{ + ///

Standard logging levels. + public enum LogLevel + { + /// + /// Debug severity. + /// + Debug = 0, + /// + /// Info severity. + /// + Info, + /// + /// Warning severity. + /// + Warning, + /// + /// Error severity. + /// + Error + } +} From 488fd0ec3139cabea924bb5d5c249114d8b7ba1e Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Mon, 13 Jun 2016 12:37:12 -0700 Subject: [PATCH 1052/1894] Add an option --regex_exclude to block certain tests from running --- tools/run_tests/run_tests.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index f7282dddb85..4201402b06f 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -776,6 +776,7 @@ argp.add_argument('-n', '--runs_per_test', default=1, type=runs_per_test_type, help='A positive integer or "inf". If "inf", all tests will run in an ' 'infinite loop. Especially useful in combination with "-f"') argp.add_argument('-r', '--regex', default='.*', type=str) +argp.add_argument('--regex_exclude', default='', type=str) argp.add_argument('-j', '--jobs', default=multiprocessing.cpu_count(), type=int) argp.add_argument('-s', '--slowdown', default=1.0, type=float) argp.add_argument('-f', '--forever', @@ -1187,7 +1188,9 @@ def _build_and_run( spec for language in languages for spec in language.test_specs() - if re.search(args.regex, spec.shortname)) + if (re.search(args.regex, spec.shortname) and + (args.regex_exclude == '' or + not re.search(args.regex_exclude, spec.shortname)))) # When running on travis, we want out test runs to be as similar as possible # for reproducibility purposes. if args.travis: From 504b3b9cc45cb9dc57618c92a396a681a42ac37d Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 13 Jun 2016 12:47:09 -0700 Subject: [PATCH 1053/1894] set default gRPC C# logging level to Info --- src/csharp/Grpc.Core/Grpc.Core.csproj | 1 + src/csharp/Grpc.Core/GrpcEnvironment.cs | 3 +- .../Grpc.Core/Logging/LogLevelFilterLogger.cs | 160 ++++++++++++++++++ 3 files changed, 163 insertions(+), 1 deletion(-) create mode 100644 src/csharp/Grpc.Core/Logging/LogLevelFilterLogger.cs diff --git a/src/csharp/Grpc.Core/Grpc.Core.csproj b/src/csharp/Grpc.Core/Grpc.Core.csproj index db04a8a68b1..a796911b99f 100644 --- a/src/csharp/Grpc.Core/Grpc.Core.csproj +++ b/src/csharp/Grpc.Core/Grpc.Core.csproj @@ -137,6 +137,7 @@ +
diff --git a/src/csharp/Grpc.Core/GrpcEnvironment.cs b/src/csharp/Grpc.Core/GrpcEnvironment.cs index 0359d9092a7..e9e4cb4cbb3 100644 --- a/src/csharp/Grpc.Core/GrpcEnvironment.cs +++ b/src/csharp/Grpc.Core/GrpcEnvironment.cs @@ -47,6 +47,7 @@ namespace Grpc.Core ///
public class GrpcEnvironment { + const LogLevel DefaultLogLevel = LogLevel.Info; const int MinDefaultThreadPoolSize = 4; static object staticLock = new object(); @@ -57,7 +58,7 @@ namespace Grpc.Core static readonly HashSet registeredChannels = new HashSet(); static readonly HashSet registeredServers = new HashSet(); - static ILogger logger = new ConsoleLogger(); + static ILogger logger = new LogLevelFilterLogger(new ConsoleLogger(), DefaultLogLevel); readonly object myLock = new object(); readonly GrpcThreadPool threadPool; diff --git a/src/csharp/Grpc.Core/Logging/LogLevelFilterLogger.cs b/src/csharp/Grpc.Core/Logging/LogLevelFilterLogger.cs new file mode 100644 index 00000000000..4eeb79c783d --- /dev/null +++ b/src/csharp/Grpc.Core/Logging/LogLevelFilterLogger.cs @@ -0,0 +1,160 @@ +#region Copyright notice and license + +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +#endregion + +using System; +using System.Collections.Generic; +using System.Globalization; +using System.IO; +using Grpc.Core.Utils; + +namespace Grpc.Core.Logging +{ + /// Logger that filters out messages below certain log level. + public class LogLevelFilterLogger : ILogger + { + readonly ILogger innerLogger; + readonly LogLevel logLevel; + + /// + /// Creates and instance of LogLevelFilter. + /// + public LogLevelFilterLogger(ILogger logger, LogLevel logLevel) + { + this.innerLogger = GrpcPreconditions.CheckNotNull(logger); + this.logLevel = logLevel; + } + + /// + /// Returns a logger associated with the specified type. + /// + public virtual ILogger ForType() + { + var newInnerLogger = innerLogger.ForType(); + if (object.ReferenceEquals(this.innerLogger, newInnerLogger)) + { + return this; + } + return new LogLevelFilterLogger(newInnerLogger, logLevel); + } + + /// Logs a message with severity Debug. + public void Debug(string message) + { + if (logLevel <= LogLevel.Debug) + { + innerLogger.Debug(message); + } + } + + /// Logs a formatted message with severity Debug. + public void Debug(string format, params object[] formatArgs) + { + if (logLevel <= LogLevel.Debug) + { + innerLogger.Debug(format, formatArgs); + } + } + + /// Logs a message with severity Info. + public void Info(string message) + { + if (logLevel <= LogLevel.Info) + { + innerLogger.Info(message); + } + } + + /// Logs a formatted message with severity Info. + public void Info(string format, params object[] formatArgs) + { + if (logLevel <= LogLevel.Info) + { + innerLogger.Info(format, formatArgs); + } + } + + /// Logs a message with severity Warning. + public void Warning(string message) + { + if (logLevel <= LogLevel.Warning) + { + innerLogger.Warning(message); + } + } + + /// Logs a formatted message with severity Warning. + public void Warning(string format, params object[] formatArgs) + { + if (logLevel <= LogLevel.Warning) + { + innerLogger.Warning(format, formatArgs); + } + } + + /// Logs a message and an associated exception with severity Warning. + public void Warning(Exception exception, string message) + { + if (logLevel <= LogLevel.Warning) + { + innerLogger.Warning(exception, message); + } + } + + /// Logs a message with severity Error. + public void Error(string message) + { + if (logLevel <= LogLevel.Error) + { + innerLogger.Error(message); + } + } + + /// Logs a formatted message with severity Error. + public void Error(string format, params object[] formatArgs) + { + if (logLevel <= LogLevel.Error) + { + innerLogger.Error(format, formatArgs); + } + } + + /// Logs a message and an associated exception with severity Error. + public void Error(Exception exception, string message) + { + if (logLevel <= LogLevel.Error) + { + innerLogger.Error(exception, message); + } + } + } +} From 4547940d0671b528f2ace782466af94150cb7902 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Mon, 13 Jun 2016 20:14:18 +0000 Subject: [PATCH 1054/1894] Python GA code generation --- src/compiler/python_generator.cc | 148 ++++- src/compiler/python_generator.h | 1 + src/compiler/python_plugin.cc | 1 + src/python/grpcio/grpc/__init__.py | 96 +++ src/python/grpcio/grpc/_utilities.py | 26 +- .../protoc_plugin/_python_plugin_test.py | 583 ++++++++++++++++++ src/python/grpcio/tests/tests.json | 1 + 7 files changed, 853 insertions(+), 3 deletions(-) create mode 100644 src/python/grpcio/tests/protoc_plugin/_python_plugin_test.py diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc index cd5ddd88326..15cda474ccd 100644 --- a/src/compiler/python_generator.cc +++ b/src/compiler/python_generator.cc @@ -342,7 +342,7 @@ bool PrintBetaServerFactory(const grpc::string& package_qualified_service_name, out->Print("}\n"); out->Print("method_implementations = {\n"); for (auto name_and_implementation_constructor = - method_implementation_constructors.begin(); + method_implementation_constructors.begin(); name_and_implementation_constructor != method_implementation_constructors.end(); name_and_implementation_constructor++) { @@ -457,8 +457,149 @@ bool PrintBetaStubFactory(const grpc::string& package_qualified_service_name, return true; } +bool PrintStub(const grpc::string& package_qualified_service_name, + const ServiceDescriptor* service, Printer* out) { + out->Print("\n\n"); + out->Print("class $Service$Stub(object):\n", "Service", service->name()); + { + IndentScope raii_class_indent(out); + PrintAllComments(service, out); + out->Print("\n"); + out->Print("def __init__(self, channel):\n"); + { + IndentScope raii_init_indent(out); + out->Print("\"\"\"Constructor.\n"); + out->Print("\n"); + out->Print("Args:\n"); + { + IndentScope raii_args_indent(out); + out->Print("channel: A grpc.Channel.\n"); + } + out->Print("\"\"\"\n"); + for (int i = 0; i < service->method_count(); ++i) { + auto method = service->method(i); + auto multi_callable_constructor = + grpc::string(method->client_streaming() ? "stream" : "unary") + + "_" + + grpc::string(method->server_streaming() ? "stream" : "unary"); + grpc::string request_module_and_class; + if (!GetModuleAndMessagePath(method->input_type(), service, + &request_module_and_class)) { + return false; + } + grpc::string response_module_and_class; + if (!GetModuleAndMessagePath(method->output_type(), service, + &response_module_and_class)) { + return false; + } + out->Print("self.$Method$ = channel.$MultiCallableConstructor$(\n", + "Method", method->name(), + "MultiCallableConstructor", multi_callable_constructor); + { + IndentScope raii_first_attribute_indent(out); + IndentScope raii_second_attribute_indent(out); + out->Print( + "'/$PackageQualifiedService$/$Method$',\n", + "PackageQualifiedService", package_qualified_service_name, + "Method", method->name()); + out->Print( + "request_serializer=$RequestModuleAndClass$.SerializeToString,\n", + "RequestModuleAndClass", request_module_and_class); + out->Print( + "response_deserializer=$ResponseModuleAndClass$.FromString,\n", + "ResponseModuleAndClass", response_module_and_class); + out->Print(")\n"); + } + } + } + } + return true; +} + +bool PrintServicer(const ServiceDescriptor* service, Printer* out) { + out->Print("\n\n"); + out->Print("class $Service$Servicer(object):\n", "Service", service->name()); + { + IndentScope raii_class_indent(out); + PrintAllComments(service, out); + for (int i = 0; i < service->method_count(); ++i) { + auto method = service->method(i); + grpc::string arg_name = method->client_streaming() ? + "request_iterator" : "request"; + out->Print("\n"); + out->Print("def $Method$(self, $ArgName$, context):\n", + "Method", method->name(), "ArgName", arg_name); + { + IndentScope raii_method_indent(out); + PrintAllComments(method, out); + out->Print("context.set_code(grpc.StatusCode.UNIMPLEMENTED)\n"); + out->Print("context.set_details('Method not implemented!')\n"); + out->Print("raise NotImplementedError('Method not implemented!')\n"); + } + } + } + return true; +} + +bool PrintAddServicerToServer(const grpc::string& package_qualified_service_name, + const ServiceDescriptor* service, Printer* out) { + out->Print("\n\n"); + out->Print("def add_$Service$Servicer_to_server(servicer, server):\n", + "Service", service->name()); + { + IndentScope raii_class_indent(out); + out->Print("rpc_method_handlers = {\n"); + { + IndentScope raii_dict_first_indent(out); + IndentScope raii_dict_second_indent(out); + for (int i = 0; i < service->method_count(); ++i) { + auto method = service->method(i); + auto method_handler_constructor = + grpc::string(method->client_streaming() ? "stream" : "unary") + + "_" + + grpc::string(method->server_streaming() ? "stream" : "unary") + + "_rpc_method_handler"; + grpc::string request_module_and_class; + if (!GetModuleAndMessagePath(method->input_type(), service, + &request_module_and_class)) { + return false; + } + grpc::string response_module_and_class; + if (!GetModuleAndMessagePath(method->output_type(), service, + &response_module_and_class)) { + return false; + } + out->Print("'$Method$': grpc.$MethodHandlerConstructor$(\n", + "Method", method->name(), + "MethodHandlerConstructor", method_handler_constructor); + { + IndentScope raii_call_first_indent(out); + IndentScope raii_call_second_indent(out); + out->Print("servicer.$Method$,\n", "Method", method->name()); + out->Print("request_deserializer=$RequestModuleAndClass$.FromString,\n", + "RequestModuleAndClass", request_module_and_class); + out->Print("response_serializer=$ResponseModuleAndClass$.SerializeToString,\n", + "ResponseModuleAndClass", response_module_and_class); + } + out->Print("),\n"); + } + } + out->Print("}\n"); + out->Print("generic_handler = grpc.method_handlers_generic_handler(\n"); + { + IndentScope raii_call_first_indent(out); + IndentScope raii_call_second_indent(out); + out->Print("'$PackageQualifiedServiceName$', rpc_method_handlers)\n", + "PackageQualifiedServiceName", package_qualified_service_name); + } + out->Print("server.add_generic_rpc_handlers((generic_handler,))\n"); + } + return true; +} + bool PrintPreamble(const FileDescriptor* file, const GeneratorConfiguration& config, Printer* out) { + out->Print("import $Package$\n", "Package", config.grpc_package_root); out->Print("from $Package$ import implementations as beta_implementations\n", "Package", config.beta_package_root); out->Print("from $Package$ import interfaces as beta_interfaces\n", @@ -487,7 +628,10 @@ pair GetServices(const FileDescriptor* file, for (int i = 0; i < file->service_count(); ++i) { auto service = file->service(i); auto package_qualified_service_name = package + service->name(); - if (!(PrintBetaServicer(service, &out) && + if (!(PrintStub(package_qualified_service_name, service, &out) && + PrintServicer(service, &out) && + PrintAddServicerToServer(package_qualified_service_name, service, &out) && + PrintBetaServicer(service, &out) && PrintBetaStub(service, &out) && PrintBetaServerFactory(package_qualified_service_name, service, &out) && PrintBetaStubFactory(package_qualified_service_name, service, &out))) { diff --git a/src/compiler/python_generator.h b/src/compiler/python_generator.h index e56b6790ef9..fc51b48daec 100644 --- a/src/compiler/python_generator.h +++ b/src/compiler/python_generator.h @@ -43,6 +43,7 @@ namespace grpc_python_generator { // Data pertaining to configuration of the generator with respect to anything // that may be used internally at Google. struct GeneratorConfiguration { + grpc::string grpc_package_root; grpc::string beta_package_root; }; diff --git a/src/compiler/python_plugin.cc b/src/compiler/python_plugin.cc index 92a07b2f80a..fc76ee5ec6d 100644 --- a/src/compiler/python_plugin.cc +++ b/src/compiler/python_plugin.cc @@ -38,6 +38,7 @@ int main(int argc, char* argv[]) { grpc_python_generator::GeneratorConfiguration config; + config.grpc_package_root = "grpc"; config.beta_package_root = "grpc.beta"; grpc_python_generator::PythonGrpcGenerator generator(config); return grpc::protobuf::compiler::PluginMain(argc, argv, &generator); diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py index 5ba5a4e1fdd..a8897501d1c 100644 --- a/src/python/grpcio/grpc/__init__.py +++ b/src/python/grpcio/grpc/__init__.py @@ -900,6 +900,102 @@ class Server(six.with_metaclass(abc.ABCMeta)): ################################# Functions ################################ +def unary_unary_rpc_method_handler( + behavior, request_deserializer=None, response_serializer=None): + """Creates an RpcMethodHandler for a unary-unary RPC method. + + Args: + behavior: The implementation of an RPC method as a callable behavior taking + a single request value and returning a single response value. + request_deserializer: An optional request deserialization behavior. + response_serializer: An optional response serialization behavior. + + Returns: + An RpcMethodHandler for a unary-unary RPC method constructed from the given + parameters. + """ + from grpc import _utilities + return _utilities.RpcMethodHandler( + False, False, request_deserializer, response_serializer, behavior, None, + None, None) + + +def unary_stream_rpc_method_handler( + behavior, request_deserializer=None, response_serializer=None): + """Creates an RpcMethodHandler for a unary-stream RPC method. + + Args: + behavior: The implementation of an RPC method as a callable behavior taking + a single request value and returning an iterator of response values. + request_deserializer: An optional request deserialization behavior. + response_serializer: An optional response serialization behavior. + + Returns: + An RpcMethodHandler for a unary-stream RPC method constructed from the + given parameters. + """ + from grpc import _utilities + return _utilities.RpcMethodHandler( + False, True, request_deserializer, response_serializer, None, behavior, + None, None) + + +def stream_unary_rpc_method_handler( + behavior, request_deserializer=None, response_serializer=None): + """Creates an RpcMethodHandler for a stream-unary RPC method. + + Args: + behavior: The implementation of an RPC method as a callable behavior taking + an iterator of request values and returning a single response value. + request_deserializer: An optional request deserialization behavior. + response_serializer: An optional response serialization behavior. + + Returns: + An RpcMethodHandler for a stream-unary RPC method constructed from the + given parameters. + """ + from grpc import _utilities + return _utilities.RpcMethodHandler( + True, False, request_deserializer, response_serializer, None, None, + behavior, None) + + +def stream_stream_rpc_method_handler( + behavior, request_deserializer=None, response_serializer=None): + """Creates an RpcMethodHandler for a stream-stream RPC method. + + Args: + behavior: The implementation of an RPC method as a callable behavior taking + an iterator of request values and returning an iterator of response + values. + request_deserializer: An optional request deserialization behavior. + response_serializer: An optional response serialization behavior. + + Returns: + An RpcMethodHandler for a stream-stream RPC method constructed from the + given parameters. + """ + from grpc import _utilities + return _utilities.RpcMethodHandler( + True, True, request_deserializer, response_serializer, None, None, None, + behavior) + + +def method_handlers_generic_handler(service, method_handlers): + """Creates a grpc.GenericRpcHandler from RpcMethodHandlers. + + Args: + service: A service name to be used for the given method handlers. + method_handlers: A dictionary from method name to RpcMethodHandler + implementing the named method. + + Returns: + A GenericRpcHandler constructed from the given parameters. + """ + from grpc import _utilities + return _utilities.DictionaryGenericHandler(service, method_handlers) + + def ssl_channel_credentials( root_certificates=None, private_key=None, certificate_chain=None): """Creates a ChannelCredentials for use with an SSL-enabled Channel. diff --git a/src/python/grpcio/grpc/_utilities.py b/src/python/grpcio/grpc/_utilities.py index a4ca9b7282c..4850967fbc7 100644 --- a/src/python/grpcio/grpc/_utilities.py +++ b/src/python/grpcio/grpc/_utilities.py @@ -29,16 +29,41 @@ """Internal utilities for gRPC Python.""" +import collections import threading import time +import six + import grpc +from grpc import _common from grpc.framework.foundation import callable_util _DONE_CALLBACK_EXCEPTION_LOG_MESSAGE = ( 'Exception calling connectivity future "done" callback!') +class RpcMethodHandler( + collections.namedtuple( + '_RpcMethodHandler', + ('request_streaming', 'response_streaming', 'request_deserializer', + 'response_serializer', 'unary_unary', 'unary_stream', 'stream_unary', + 'stream_stream',)), + grpc.RpcMethodHandler): + pass + + +class DictionaryGenericHandler(grpc.GenericRpcHandler): + + def __init__(self, service, method_handlers): + self._method_handlers = { + _common.fully_qualified_method(service, method): method_handler + for method, method_handler in six.iteritems(method_handlers)} + + def service(self, handler_call_details): + return self._method_handlers.get(handler_call_details.method) + + class _ChannelReadyFuture(grpc.Future): def __init__(self, channel): @@ -144,4 +169,3 @@ def channel_ready_future(channel): ready_future = _ChannelReadyFuture(channel) ready_future.start() return ready_future - diff --git a/src/python/grpcio/tests/protoc_plugin/_python_plugin_test.py b/src/python/grpcio/tests/protoc_plugin/_python_plugin_test.py new file mode 100644 index 00000000000..1c9cbb0d0c3 --- /dev/null +++ b/src/python/grpcio/tests/protoc_plugin/_python_plugin_test.py @@ -0,0 +1,583 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import collections +from concurrent import futures +import contextlib +import distutils.spawn +import errno +import os +import shutil +import subprocess +import sys +import tempfile +import threading +import unittest + +from six import moves + +import grpc +from tests.unit.framework.common import test_constants + +# Identifiers of entities we expect to find in the generated module. +STUB_IDENTIFIER = 'TestServiceStub' +SERVICER_IDENTIFIER = 'TestServiceServicer' +ADD_SERVICER_TO_SERVER_IDENTIFIER = 'add_TestServiceServicer_to_server' + + +class _ServicerMethods(object): + + def __init__(self, response_pb2, payload_pb2): + self._condition = threading.Condition() + self._paused = False + self._fail = False + self._response_pb2 = response_pb2 + self._payload_pb2 = payload_pb2 + + @contextlib.contextmanager + def pause(self): # pylint: disable=invalid-name + with self._condition: + self._paused = True + yield + with self._condition: + self._paused = False + self._condition.notify_all() + + @contextlib.contextmanager + def fail(self): # pylint: disable=invalid-name + with self._condition: + self._fail = True + yield + with self._condition: + self._fail = False + + def _control(self): # pylint: disable=invalid-name + with self._condition: + if self._fail: + raise ValueError() + while self._paused: + self._condition.wait() + + def UnaryCall(self, request, unused_rpc_context): + response = self._response_pb2.SimpleResponse() + response.payload.payload_type = self._payload_pb2.COMPRESSABLE + response.payload.payload_compressable = 'a' * request.response_size + self._control() + return response + + def StreamingOutputCall(self, request, unused_rpc_context): + for parameter in request.response_parameters: + response = self._response_pb2.StreamingOutputCallResponse() + response.payload.payload_type = self._payload_pb2.COMPRESSABLE + response.payload.payload_compressable = 'a' * parameter.size + self._control() + yield response + + def StreamingInputCall(self, request_iter, unused_rpc_context): + response = self._response_pb2.StreamingInputCallResponse() + aggregated_payload_size = 0 + for request in request_iter: + aggregated_payload_size += len(request.payload.payload_compressable) + response.aggregated_payload_size = aggregated_payload_size + self._control() + return response + + def FullDuplexCall(self, request_iter, unused_rpc_context): + for request in request_iter: + for parameter in request.response_parameters: + response = self._response_pb2.StreamingOutputCallResponse() + response.payload.payload_type = self._payload_pb2.COMPRESSABLE + response.payload.payload_compressable = 'a' * parameter.size + self._control() + yield response + + def HalfDuplexCall(self, request_iter, unused_rpc_context): + responses = [] + for request in request_iter: + for parameter in request.response_parameters: + response = self._response_pb2.StreamingOutputCallResponse() + response.payload.payload_type = self._payload_pb2.COMPRESSABLE + response.payload.payload_compressable = 'a' * parameter.size + self._control() + responses.append(response) + for response in responses: + yield response + + +class _Service( + collections.namedtuple( + '_Service', ('servicer_methods', 'server', 'stub',))): + """A live and running service. + + Attributes: + servicer_methods: The _ServicerMethods servicing RPCs. + server: The grpc.Server servicing RPCs. + stub: A stub on which to invoke RPCs. + """ + + +def _CreateService(service_pb2, response_pb2, payload_pb2): + """Provides a servicer backend and a stub. + + Args: + service_pb2: The service_pb2 module generated by this test. + response_pb2: The response_pb2 module generated by this test. + payload_pb2: The payload_pb2 module generated by this test. + + Returns: + A _Service with which to test RPCs. + """ + servicer_methods = _ServicerMethods(response_pb2, payload_pb2) + + class Servicer(getattr(service_pb2, SERVICER_IDENTIFIER)): + + def UnaryCall(self, request, context): + return servicer_methods.UnaryCall(request, context) + + def StreamingOutputCall(self, request, context): + return servicer_methods.StreamingOutputCall(request, context) + + def StreamingInputCall(self, request_iter, context): + return servicer_methods.StreamingInputCall(request_iter, context) + + def FullDuplexCall(self, request_iter, context): + return servicer_methods.FullDuplexCall(request_iter, context) + + def HalfDuplexCall(self, request_iter, context): + return servicer_methods.HalfDuplexCall(request_iter, context) + + server = grpc.server( + (), futures.ThreadPoolExecutor(max_workers=test_constants.POOL_SIZE)) + getattr(service_pb2, ADD_SERVICER_TO_SERVER_IDENTIFIER)(Servicer(), server) + port = server.add_insecure_port('[::]:0') + server.start() + channel = grpc.insecure_channel('localhost:{}'.format(port)) + stub = getattr(service_pb2, STUB_IDENTIFIER)(channel) + return _Service(servicer_methods, server, stub) + + +def _CreateIncompleteService(service_pb2): + """Provides a servicer backend that fails to implement methods and its stub. + + Args: + service_pb2: The service_pb2 module generated by this test. + + Returns: + A _Service with which to test RPCs. The returned _Service's + servicer_methods implements none of the methods required of it. + """ + + class Servicer(getattr(service_pb2, SERVICER_IDENTIFIER)): + pass + + server = grpc.server( + (), futures.ThreadPoolExecutor(max_workers=test_constants.POOL_SIZE)) + getattr(service_pb2, ADD_SERVICER_TO_SERVER_IDENTIFIER)(Servicer(), server) + port = server.add_insecure_port('[::]:0') + server.start() + channel = grpc.insecure_channel('localhost:{}'.format(port)) + stub = getattr(service_pb2, STUB_IDENTIFIER)(channel) + return _Service(None, server, stub) + + +def _streaming_input_request_iterator(request_pb2, payload_pb2): + for _ in range(3): + request = request_pb2.StreamingInputCallRequest() + request.payload.payload_type = payload_pb2.COMPRESSABLE + request.payload.payload_compressable = 'a' + yield request + + +def _streaming_output_request(request_pb2): + request = request_pb2.StreamingOutputCallRequest() + sizes = [1, 2, 3] + request.response_parameters.add(size=sizes[0], interval_us=0) + request.response_parameters.add(size=sizes[1], interval_us=0) + request.response_parameters.add(size=sizes[2], interval_us=0) + return request + + +def _full_duplex_request_iterator(request_pb2): + request = request_pb2.StreamingOutputCallRequest() + request.response_parameters.add(size=1, interval_us=0) + yield request + request = request_pb2.StreamingOutputCallRequest() + request.response_parameters.add(size=2, interval_us=0) + request.response_parameters.add(size=3, interval_us=0) + yield request + + +class PythonPluginTest(unittest.TestCase): + """Test case for the gRPC Python protoc-plugin. + + While reading these tests, remember that the futures API + (`stub.method.future()`) only gives futures for the *response-unary* + methods and does not exist for response-streaming methods. + """ + + def setUp(self): + # Assume that the appropriate protoc and grpc_python_plugins are on the + # path. + protoc_command = 'protoc' + protoc_plugin_filename = distutils.spawn.find_executable( + 'grpc_python_plugin') + if not os.path.isfile(protoc_command): + # Assume that if we haven't built protoc that it's on the system. + protoc_command = 'protoc' + + # Ensure that the output directory exists. + self.outdir = tempfile.mkdtemp() + + # Find all proto files + paths = [] + root_dir = os.path.dirname(os.path.realpath(__file__)) + proto_dir = os.path.join(root_dir, 'protos') + for walk_root, _, filenames in os.walk(proto_dir): + for filename in filenames: + if filename.endswith('.proto'): + path = os.path.join(walk_root, filename) + paths.append(path) + + # Invoke protoc with the plugin. + cmd = [ + protoc_command, + '--plugin=protoc-gen-python-grpc=%s' % protoc_plugin_filename, + '-I %s' % root_dir, + '--python_out=%s' % self.outdir, + '--python-grpc_out=%s' % self.outdir + ] + paths + subprocess.check_call(' '.join(cmd), shell=True, env=os.environ, + cwd=os.path.dirname(os.path.realpath(__file__))) + + # Generated proto directories dont include __init__.py, but + # these are needed for python package resolution + for walk_root, _, _ in os.walk(os.path.join(self.outdir, 'protos')): + path = os.path.join(walk_root, '__init__.py') + open(path, 'a').close() + + sys.path.insert(0, self.outdir) + + import protos.payload.test_payload_pb2 as payload_pb2 + import protos.requests.r.test_requests_pb2 as request_pb2 + import protos.responses.test_responses_pb2 as response_pb2 + import protos.service.test_service_pb2 as service_pb2 + self._payload_pb2 = payload_pb2 + self._request_pb2 = request_pb2 + self._response_pb2 = response_pb2 + self._service_pb2 = service_pb2 + + def tearDown(self): + try: + shutil.rmtree(self.outdir) + except OSError as exc: + if exc.errno != errno.ENOENT: + raise + sys.path.remove(self.outdir) + + def testImportAttributes(self): + # check that we can access the generated module and its members. + self.assertIsNotNone( + getattr(self._service_pb2, STUB_IDENTIFIER, None)) + self.assertIsNotNone( + getattr(self._service_pb2, SERVICER_IDENTIFIER, None)) + self.assertIsNotNone( + getattr(self._service_pb2, ADD_SERVICER_TO_SERVER_IDENTIFIER, None)) + + def testUpDown(self): + service = _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2) + self.assertIsNotNone(service.servicer_methods) + self.assertIsNotNone(service.server) + self.assertIsNotNone(service.stub) + + def testIncompleteServicer(self): + service = _CreateIncompleteService(self._service_pb2) + request = self._request_pb2.SimpleRequest(response_size=13) + with self.assertRaises(grpc.RpcError) as exception_context: + service.stub.UnaryCall(request) + self.assertIs( + exception_context.exception.code(), grpc.StatusCode.UNIMPLEMENTED) + + def testUnaryCall(self): + service = _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2) + request = self._request_pb2.SimpleRequest(response_size=13) + response = service.stub.UnaryCall(request) + expected_response = service.servicer_methods.UnaryCall( + request, 'not a real context!') + self.assertEqual(expected_response, response) + + def testUnaryCallFuture(self): + service = _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2) + request = self._request_pb2.SimpleRequest(response_size=13) + # Check that the call does not block waiting for the server to respond. + with service.servicer_methods.pause(): + response_future = service.stub.UnaryCall.future(request) + response = response_future.result() + expected_response = service.servicer_methods.UnaryCall( + request, 'not a real RpcContext!') + self.assertEqual(expected_response, response) + + def testUnaryCallFutureExpired(self): + service = _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2) + request = self._request_pb2.SimpleRequest(response_size=13) + with service.servicer_methods.pause(): + response_future = service.stub.UnaryCall.future( + request, timeout=test_constants.SHORT_TIMEOUT) + with self.assertRaises(grpc.RpcError) as exception_context: + response_future.result() + self.assertIs( + exception_context.exception.code(), grpc.StatusCode.DEADLINE_EXCEEDED) + self.assertIs(response_future.code(), grpc.StatusCode.DEADLINE_EXCEEDED) + + def testUnaryCallFutureCancelled(self): + service = _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2) + request = self._request_pb2.SimpleRequest(response_size=13) + with service.servicer_methods.pause(): + response_future = service.stub.UnaryCall.future(request) + response_future.cancel() + self.assertTrue(response_future.cancelled()) + self.assertIs(response_future.code(), grpc.StatusCode.CANCELLED) + + def testUnaryCallFutureFailed(self): + service = _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2) + request = self._request_pb2.SimpleRequest(response_size=13) + with service.servicer_methods.fail(): + response_future = service.stub.UnaryCall.future(request) + self.assertIsNotNone(response_future.exception()) + self.assertIs(response_future.code(), grpc.StatusCode.UNKNOWN) + + def testStreamingOutputCall(self): + service = _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2) + request = _streaming_output_request(self._request_pb2) + responses = service.stub.StreamingOutputCall(request) + expected_responses = service.servicer_methods.StreamingOutputCall( + request, 'not a real RpcContext!') + for expected_response, response in moves.zip_longest( + expected_responses, responses): + self.assertEqual(expected_response, response) + + def testStreamingOutputCallExpired(self): + service = _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2) + request = _streaming_output_request(self._request_pb2) + with service.servicer_methods.pause(): + responses = service.stub.StreamingOutputCall( + request, timeout=test_constants.SHORT_TIMEOUT) + with self.assertRaises(grpc.RpcError) as exception_context: + list(responses) + self.assertIs( + exception_context.exception.code(), grpc.StatusCode.DEADLINE_EXCEEDED) + + def testStreamingOutputCallCancelled(self): + service = _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2) + request = _streaming_output_request(self._request_pb2) + responses = service.stub.StreamingOutputCall(request) + next(responses) + responses.cancel() + with self.assertRaises(grpc.RpcError) as exception_context: + next(responses) + self.assertIs(responses.code(), grpc.StatusCode.CANCELLED) + + def testStreamingOutputCallFailed(self): + service = _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2) + request = _streaming_output_request(self._request_pb2) + with service.servicer_methods.fail(): + responses = service.stub.StreamingOutputCall(request) + self.assertIsNotNone(responses) + with self.assertRaises(grpc.RpcError) as exception_context: + next(responses) + self.assertIs(exception_context.exception.code(), grpc.StatusCode.UNKNOWN) + + def testStreamingInputCall(self): + service = _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2) + response = service.stub.StreamingInputCall( + _streaming_input_request_iterator( + self._request_pb2, self._payload_pb2)) + expected_response = service.servicer_methods.StreamingInputCall( + _streaming_input_request_iterator(self._request_pb2, self._payload_pb2), + 'not a real RpcContext!') + self.assertEqual(expected_response, response) + + def testStreamingInputCallFuture(self): + service = _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2) + with service.servicer_methods.pause(): + response_future = service.stub.StreamingInputCall.future( + _streaming_input_request_iterator( + self._request_pb2, self._payload_pb2)) + response = response_future.result() + expected_response = service.servicer_methods.StreamingInputCall( + _streaming_input_request_iterator(self._request_pb2, self._payload_pb2), + 'not a real RpcContext!') + self.assertEqual(expected_response, response) + + def testStreamingInputCallFutureExpired(self): + service = _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2) + with service.servicer_methods.pause(): + response_future = service.stub.StreamingInputCall.future( + _streaming_input_request_iterator( + self._request_pb2, self._payload_pb2), + timeout=test_constants.SHORT_TIMEOUT) + with self.assertRaises(grpc.RpcError) as exception_context: + response_future.result() + self.assertIsInstance(response_future.exception(), grpc.RpcError) + self.assertIs( + response_future.exception().code(), grpc.StatusCode.DEADLINE_EXCEEDED) + self.assertIs( + exception_context.exception.code(), grpc.StatusCode.DEADLINE_EXCEEDED) + + def testStreamingInputCallFutureCancelled(self): + service = _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2) + with service.servicer_methods.pause(): + response_future = service.stub.StreamingInputCall.future( + _streaming_input_request_iterator( + self._request_pb2, self._payload_pb2)) + response_future.cancel() + self.assertTrue(response_future.cancelled()) + with self.assertRaises(grpc.FutureCancelledError): + response_future.result() + + def testStreamingInputCallFutureFailed(self): + service = _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2) + with service.servicer_methods.fail(): + response_future = service.stub.StreamingInputCall.future( + _streaming_input_request_iterator( + self._request_pb2, self._payload_pb2)) + self.assertIsNotNone(response_future.exception()) + self.assertIs(response_future.code(), grpc.StatusCode.UNKNOWN) + + def testFullDuplexCall(self): + service = _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2) + responses = service.stub.FullDuplexCall( + _full_duplex_request_iterator(self._request_pb2)) + expected_responses = service.servicer_methods.FullDuplexCall( + _full_duplex_request_iterator(self._request_pb2), + 'not a real RpcContext!') + for expected_response, response in moves.zip_longest( + expected_responses, responses): + self.assertEqual(expected_response, response) + + def testFullDuplexCallExpired(self): + request_iterator = _full_duplex_request_iterator(self._request_pb2) + service = _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2) + with service.servicer_methods.pause(): + responses = service.stub.FullDuplexCall( + request_iterator, timeout=test_constants.SHORT_TIMEOUT) + with self.assertRaises(grpc.RpcError) as exception_context: + list(responses) + self.assertIs( + exception_context.exception.code(), grpc.StatusCode.DEADLINE_EXCEEDED) + + def testFullDuplexCallCancelled(self): + service = _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2) + request_iterator = _full_duplex_request_iterator(self._request_pb2) + responses = service.stub.FullDuplexCall(request_iterator) + next(responses) + responses.cancel() + with self.assertRaises(grpc.RpcError) as exception_context: + next(responses) + self.assertIs( + exception_context.exception.code(), grpc.StatusCode.CANCELLED) + + def testFullDuplexCallFailed(self): + request_iterator = _full_duplex_request_iterator(self._request_pb2) + service = _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2) + with service.servicer_methods.fail(): + responses = service.stub.FullDuplexCall(request_iterator) + with self.assertRaises(grpc.RpcError) as exception_context: + next(responses) + self.assertIs(exception_context.exception.code(), grpc.StatusCode.UNKNOWN) + + def testHalfDuplexCall(self): + service = _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2) + def half_duplex_request_iterator(): + request = self._request_pb2.StreamingOutputCallRequest() + request.response_parameters.add(size=1, interval_us=0) + yield request + request = self._request_pb2.StreamingOutputCallRequest() + request.response_parameters.add(size=2, interval_us=0) + request.response_parameters.add(size=3, interval_us=0) + yield request + responses = service.stub.HalfDuplexCall(half_duplex_request_iterator()) + expected_responses = service.servicer_methods.HalfDuplexCall( + half_duplex_request_iterator(), 'not a real RpcContext!') + for expected_response, response in moves.zip_longest( + expected_responses, responses): + self.assertEqual(expected_response, response) + + def testHalfDuplexCallWedged(self): + condition = threading.Condition() + wait_cell = [False] + @contextlib.contextmanager + def wait(): # pylint: disable=invalid-name + # Where's Python 3's 'nonlocal' statement when you need it? + with condition: + wait_cell[0] = True + yield + with condition: + wait_cell[0] = False + condition.notify_all() + def half_duplex_request_iterator(): + request = self._request_pb2.StreamingOutputCallRequest() + request.response_parameters.add(size=1, interval_us=0) + yield request + with condition: + while wait_cell[0]: + condition.wait() + service = _CreateService( + self._service_pb2, self._response_pb2, self._payload_pb2) + with wait(): + responses = service.stub.HalfDuplexCall( + half_duplex_request_iterator(), timeout=test_constants.SHORT_TIMEOUT) + # half-duplex waits for the client to send all info + with self.assertRaises(grpc.RpcError) as exception_context: + next(responses) + self.assertIs( + exception_context.exception.code(), grpc.StatusCode.DEADLINE_EXCEEDED) + + +if __name__ == '__main__': + unittest.main(verbosity=2) diff --git a/src/python/grpcio/tests/tests.json b/src/python/grpcio/tests/tests.json index 53b2998b786..391bb39ef57 100644 --- a/src/python/grpcio/tests/tests.json +++ b/src/python/grpcio/tests/tests.json @@ -49,6 +49,7 @@ "_low_test.HangingServerShutdown", "_low_test.InsecureServerInsecureClient", "_not_found_test.NotFoundTest", + "_python_plugin_test.PythonPluginTest", "_read_some_but_not_all_responses_test.ReadSomeButNotAllResponsesTest", "_rpc_test.RPCTest", "_sanity_test.Sanity", From a8d0a5d5e7cc0795904827e0388a707db4fd70e6 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Mon, 13 Jun 2016 14:28:59 -0700 Subject: [PATCH 1055/1894] Added Python GA API metadata tests --- src/python/grpcio/tests/tests.json | 1 + .../grpcio/tests/unit/_metadata_test.py | 216 ++++++++++++++++++ 2 files changed, 217 insertions(+) create mode 100644 src/python/grpcio/tests/unit/_metadata_test.py diff --git a/src/python/grpcio/tests/tests.json b/src/python/grpcio/tests/tests.json index 8dc47bf69dd..3c38dfc9990 100644 --- a/src/python/grpcio/tests/tests.json +++ b/src/python/grpcio/tests/tests.json @@ -47,6 +47,7 @@ "_lonely_invocation_link_test.LonelyInvocationLinkTest", "_low_test.HangingServerShutdown", "_low_test.InsecureServerInsecureClient", + "_metadata_test.MetadataTest", "_not_found_test.NotFoundTest", "_read_some_but_not_all_responses_test.ReadSomeButNotAllResponsesTest", "_rpc_test.RPCTest", diff --git a/src/python/grpcio/tests/unit/_metadata_test.py b/src/python/grpcio/tests/unit/_metadata_test.py new file mode 100644 index 00000000000..77b39012619 --- /dev/null +++ b/src/python/grpcio/tests/unit/_metadata_test.py @@ -0,0 +1,216 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +"""Tests server and client side metadata API.""" + +import unittest +import weakref + +import grpc +from grpc import _grpcio_metadata +from grpc.framework.foundation import logging_pool + +from tests.unit import test_common +from tests.unit.framework.common import test_constants + +_CHANNEL_ARGS = (('grpc.primary_user_agent', 'primary-agent'), + ('grpc.secondary_user_agent', 'secondary-agent')) + +_REQUEST = b'\x00\x00\x00' +_RESPONSE = b'\x00\x00\x00' + +_UNARY_UNARY = b'/test/UnaryUnary' +_UNARY_STREAM = b'/test/UnaryStream' +_STREAM_UNARY = b'/test/StreamUnary' +_STREAM_STREAM = b'/test/StreamStream' + +_USER_AGENT = 'Python-gRPC-{}'.format(_grpcio_metadata.__version__) + +_CLIENT_METADATA = ( + (b'client-md-key', b'client-md-key'), + (b'client-md-key-bin', b'\x00\x01') +) + +_SERVER_INITIAL_METADATA = ( + (b'server-initial-md-key', b'server-initial-md-value'), + (b'server-initial-md-key-bin', b'\x00\x02') +) + +_SERVER_TRAILING_METADATA = ( + (b'server-trailing-md-key', b'server-trailing-md-value'), + (b'server-trailing-md-key-bin', b'\x00\x03') +) + + +def user_agent(metadata): + for key, val in metadata: + if key == b'user-agent': + return val.decode('ascii') + raise KeyError('No user agent!') + + +def validate_client_metadata(test, servicer_context): + test.assertTrue(test_common.metadata_transmitted( + _CLIENT_METADATA, servicer_context.invocation_metadata())) + test.assertTrue(user_agent(servicer_context.invocation_metadata()) + .startswith('primary-agent ' + _USER_AGENT)) + test.assertTrue(user_agent(servicer_context.invocation_metadata()) + .endswith('secondary-agent')) + + +def handle_unary_unary(test, request, servicer_context): + validate_client_metadata(test, servicer_context) + servicer_context.send_initial_metadata(_SERVER_INITIAL_METADATA) + servicer_context.set_trailing_metadata(_SERVER_TRAILING_METADATA) + return _RESPONSE + + +def handle_unary_stream(test, request, servicer_context): + validate_client_metadata(test, servicer_context) + servicer_context.send_initial_metadata(_SERVER_INITIAL_METADATA) + servicer_context.set_trailing_metadata(_SERVER_TRAILING_METADATA) + for _ in range(test_constants.STREAM_LENGTH): + yield _RESPONSE + + +def handle_stream_unary(test, request_iterator, servicer_context): + validate_client_metadata(test, servicer_context) + servicer_context.send_initial_metadata(_SERVER_INITIAL_METADATA) + servicer_context.set_trailing_metadata(_SERVER_TRAILING_METADATA) + # TODO(issue:#6891) We should be able to remove this loop + for request in request_iterator: + pass + return _RESPONSE + + +def handle_stream_stream(test, request_iterator, servicer_context): + validate_client_metadata(test, servicer_context) + servicer_context.send_initial_metadata(_SERVER_INITIAL_METADATA) + servicer_context.set_trailing_metadata(_SERVER_TRAILING_METADATA) + # TODO(issue:#6891) We should be able to remove this loop, + # and replace with return; yield + for request in request_iterator: + yield _RESPONSE + + +class _MethodHandler(grpc.RpcMethodHandler): + + def __init__(self, test, request_streaming, response_streaming): + self.request_streaming = request_streaming + self.response_streaming = response_streaming + self.request_deserializer = None + self.response_serializer = None + self.unary_unary = None + self.unary_stream = None + self.stream_unary = None + self.stream_stream = None + if self.request_streaming and self.response_streaming: + self.stream_stream = lambda x, y: handle_stream_stream(test, x, y) + elif self.request_streaming: + self.stream_unary = lambda x, y: handle_stream_unary(test, x, y) + elif self.response_streaming: + self.unary_stream = lambda x, y: handle_unary_stream(test, x, y) + else: + self.unary_unary = lambda x, y: handle_unary_unary(test, x, y) + + +class _GenericHandler(grpc.GenericRpcHandler): + + def __init__(self, test): + self._test = test + + def service(self, handler_call_details): + if handler_call_details.method == _UNARY_UNARY: + return _MethodHandler(self._test, False, False) + elif handler_call_details.method == _UNARY_STREAM: + return _MethodHandler(self._test, False, True) + elif handler_call_details.method == _STREAM_UNARY: + return _MethodHandler(self._test, True, False) + elif handler_call_details.method == _STREAM_STREAM: + return _MethodHandler(self._test, True, True) + else: + return None + + +class MetadataTest(unittest.TestCase): + + def setUp(self): + self._server_pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY) + self._server = grpc.server((_GenericHandler(weakref.proxy(self)),), + self._server_pool) + port = self._server.add_insecure_port('[::]:0') + self._server.start() + self._channel = grpc.insecure_channel('localhost:%d' % port, + options=_CHANNEL_ARGS) + + def tearDown(self): + self._server.stop(0) + + def testUnaryUnary(self): + multi_callable = self._channel.unary_unary(_UNARY_UNARY) + unused_response, call = multi_callable( + _REQUEST, metadata=_CLIENT_METADATA, with_call=True) + self.assertTrue(test_common.metadata_transmitted( + _SERVER_INITIAL_METADATA, call.initial_metadata())) + self.assertTrue(test_common.metadata_transmitted( + _SERVER_TRAILING_METADATA, call.trailing_metadata())) + + def testUnaryStream(self): + multi_callable = self._channel.unary_stream(_UNARY_STREAM) + call = multi_callable(_REQUEST, metadata=_CLIENT_METADATA) + self.assertTrue(test_common.metadata_transmitted( + _SERVER_INITIAL_METADATA, call.initial_metadata())) + for _ in call: + pass + self.assertTrue(test_common.metadata_transmitted( + _SERVER_TRAILING_METADATA, call.trailing_metadata())) + + def testStreamUnary(self): + multi_callable = self._channel.stream_unary(_STREAM_UNARY) + unused_response, call = multi_callable( + [_REQUEST] * test_constants.STREAM_LENGTH, + metadata=_CLIENT_METADATA, with_call=True) + self.assertTrue(test_common.metadata_transmitted( + _SERVER_INITIAL_METADATA, call.initial_metadata())) + self.assertTrue(test_common.metadata_transmitted( + _SERVER_TRAILING_METADATA, call.trailing_metadata())) + + def testStreamStream(self): + multi_callable = self._channel.stream_stream(_STREAM_STREAM) + call = multi_callable([_REQUEST] * test_constants.STREAM_LENGTH, + metadata=_CLIENT_METADATA) + self.assertTrue(test_common.metadata_transmitted( + _SERVER_INITIAL_METADATA, call.initial_metadata())) + for _ in call: + pass + self.assertTrue(test_common.metadata_transmitted( + _SERVER_TRAILING_METADATA, call.trailing_metadata())) + + +if __name__ == '__main__': + unittest.main(verbosity=2) From f24665fdd8a69927c482902d9780e953f5a37a04 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Mon, 13 Jun 2016 09:27:40 -0700 Subject: [PATCH 1056/1894] Fix create_[secure/insecure]_channel argument order --- src/python/grpcio/grpc/__init__.py | 4 ++-- src/python/grpcio/tests/unit/beta/test_utilities.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py index 5ba5a4e1fdd..2cedb19b6dd 100644 --- a/src/python/grpcio/grpc/__init__.py +++ b/src/python/grpcio/grpc/__init__.py @@ -1059,7 +1059,7 @@ def insecure_channel(target, options=None): A Channel to the target through which RPCs may be conducted. """ from grpc import _channel - return _channel.Channel(target, None, options) + return _channel.Channel(target, options, None) def secure_channel(target, credentials, options=None): @@ -1075,7 +1075,7 @@ def secure_channel(target, credentials, options=None): A Channel to the target through which RPCs may be conducted. """ from grpc import _channel - return _channel.Channel(target, credentials, options) + return _channel.Channel(target, options, credentials) def server(generic_rpc_handlers, thread_pool, options=None): diff --git a/src/python/grpcio/tests/unit/beta/test_utilities.py b/src/python/grpcio/tests/unit/beta/test_utilities.py index 66b5f72897c..e374b203ce9 100644 --- a/src/python/grpcio/tests/unit/beta/test_utilities.py +++ b/src/python/grpcio/tests/unit/beta/test_utilities.py @@ -50,6 +50,6 @@ def not_really_secure_channel( """ target = '%s:%d' % (host, port) channel = grpc.secure_channel( - target, ((b'grpc.ssl_target_name_override', server_host_override,),), - channel_credentials._credentials) + target, channel_credentials._credentials, + ((b'grpc.ssl_target_name_override', server_host_override,),)) return implementations.Channel(channel) From 89af61e464e810f86d9071d280b2f51a4fe9c8be Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 13 Jun 2016 15:29:40 -0700 Subject: [PATCH 1057/1894] Attempt to fix bug breaking perf tests --- .../ext/client_config/channel_connectivity.c | 21 ++++++++++++------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/src/core/ext/client_config/channel_connectivity.c b/src/core/ext/client_config/channel_connectivity.c index b5304947a38..20c01a9a7cf 100644 --- a/src/core/ext/client_config/channel_connectivity.c +++ b/src/core/ext/client_config/channel_connectivity.c @@ -75,7 +75,6 @@ typedef enum { typedef struct { gpr_mu mu; callback_phase phase; - grpc_error *error; grpc_closure on_complete; grpc_timer alarm; grpc_connectivity_state state; @@ -95,7 +94,6 @@ static void delete_state_watcher(grpc_exec_ctx *exec_ctx, state_watcher *w) { abort(); } gpr_mu_destroy(&w->mu); - GRPC_ERROR_UNREF(w->error); gpr_free(w); } @@ -131,17 +129,25 @@ static void partly_done(grpc_exec_ctx *exec_ctx, state_watcher *w, } gpr_mu_lock(&w->mu); - const char *msg = grpc_error_string(error); - grpc_error_free_string(msg); if (due_to_completion) { - GRPC_ERROR_UNREF(w->error); - w->error = GRPC_ERROR_NONE; + if (grpc_trace_operation_failures) { + GRPC_LOG_IF_ERROR("watch_completion_error", GRPC_ERROR_REF(error)); + } + GRPC_ERROR_UNREF(error); + error = GRPC_ERROR_NONE; + } else { + if (error == GRPC_ERROR_NONE) { + error = + GRPC_ERROR_CREATE("Timed out waiting for connection state change"); + } else if (error == GRPC_ERROR_CANCELLED) { + error = GRPC_ERROR_NONE; + } } switch (w->phase) { case WAITING: w->phase = CALLING_BACK; - grpc_cq_end_op(exec_ctx, w->cq, w->tag, GRPC_ERROR_REF(w->error), + grpc_cq_end_op(exec_ctx, w->cq, w->tag, GRPC_ERROR_REF(error), finished_completion, w, &w->completion_storage); break; case CALLING_BACK: @@ -194,7 +200,6 @@ void grpc_channel_watch_connectivity_state( grpc_closure_init(&w->on_complete, watch_complete, w); w->phase = WAITING; w->state = last_observed_state; - w->error = GRPC_ERROR_CREATE("Timeout waiting for channel state"); w->cq = cq; w->tag = tag; w->channel = channel; From 8b48191854e9528abfdaf14d2cfee1538501cef9 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Mon, 13 Jun 2016 15:18:38 -0700 Subject: [PATCH 1058/1894] Set back to the default log function after using an override --- src/core/lib/support/log.c | 4 +++- test/core/support/log_test.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/core/lib/support/log.c b/src/core/lib/support/log.c index 882abf673c1..bae0957df72 100644 --- a/src/core/lib/support/log.c +++ b/src/core/lib/support/log.c @@ -96,4 +96,6 @@ void gpr_log_verbosity_init() { } } -void gpr_set_log_function(gpr_log_func f) { g_log_func = f; } +void gpr_set_log_function(gpr_log_func f) { + g_log_func = f ? f : gpr_default_log; +} diff --git a/test/core/support/log_test.c b/test/core/support/log_test.c index 0ae298aa4c0..807a8175d79 100644 --- a/test/core/support/log_test.c +++ b/test/core/support/log_test.c @@ -78,11 +78,13 @@ int main(int argc, char **argv) { gpr_set_log_function(test_callback); gpr_log_message(GPR_INFO, "hello 1 2 3"); gpr_log(GPR_INFO, "hello %d %d %d", 1, 2, 3); + gpr_set_log_function(NULL); /* gpr_log_verbosity_init() will be effective only once, and only before * gpr_set_log_verbosity() is called */ gpr_setenv("GRPC_VERBOSITY", "ERROR"); gpr_log_verbosity_init(); + test_log_function_reached(GPR_ERROR); test_log_function_unreached(GPR_INFO); test_log_function_unreached(GPR_DEBUG); From 46f4a681d255bf8352a0a9622e1c59a24ba30d08 Mon Sep 17 00:00:00 2001 From: yang-g Date: Mon, 13 Jun 2016 15:31:27 -0700 Subject: [PATCH 1059/1894] minor fixes --- test/distrib/cpp/run_distrib_test.sh | 8 ++++---- tools/dockerfile/distribtest/cpp_jessie_x64/Dockerfile | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/test/distrib/cpp/run_distrib_test.sh b/test/distrib/cpp/run_distrib_test.sh index dfe9867a602..bc84b84b8f3 100755 --- a/test/distrib/cpp/run_distrib_test.sh +++ b/test/distrib/cpp/run_distrib_test.sh @@ -30,13 +30,13 @@ set -ex -git clone $EXTERNAL_GIT_ROOT -cd grpc && git submodule update --init +git clone --recursive $EXTERNAL_GIT_ROOT +cd grpc cd third_party/protobuf && ./autogen.sh && \ -./configure && make -j12 && make check && make install && ldconfig +./configure && make -j4 && make check && make install && ldconfig -cd ../.. && make -j12 && make install +cd ../.. && make -j4 && make install cd examples/cpp/helloworld diff --git a/tools/dockerfile/distribtest/cpp_jessie_x64/Dockerfile b/tools/dockerfile/distribtest/cpp_jessie_x64/Dockerfile index b02208faed1..c24b1c451d3 100644 --- a/tools/dockerfile/distribtest/cpp_jessie_x64/Dockerfile +++ b/tools/dockerfile/distribtest/cpp_jessie_x64/Dockerfile @@ -29,7 +29,7 @@ FROM debian:jessie -# Install packages for gRPC and protobuf +# Install packages needed for gRPC and protobuf RUN apt-get update && apt-get install -y \ autoconf \ automake \ From ed7428526cea1f7b54a126ef9cdb2c1456c47f2c Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Fri, 10 Jun 2016 13:19:31 -0700 Subject: [PATCH 1060/1894] Added cleanup to the server thread's join method. When the Python Interpreter exits, it first attempts to join any outstanding threads. This is problematic if a server is created as a top-level variable or referenced by a reference cycle, as join() will hang. This adds cleanup behavior to the server thread's join(). --- src/python/grpcio/grpc/_common.py | 42 +++++++ src/python/grpcio/grpc/_server.py | 31 +++-- src/python/grpcio/tests/tests.json | 1 + src/python/grpcio/tests/unit/_rpc_test.py | 7 -- .../grpcio/tests/unit/_thread_cleanup_test.py | 117 ++++++++++++++++++ 5 files changed, 180 insertions(+), 18 deletions(-) create mode 100644 src/python/grpcio/tests/unit/_thread_cleanup_test.py diff --git a/src/python/grpcio/grpc/_common.py b/src/python/grpcio/grpc/_common.py index b8688a0149a..1fd1704f18b 100644 --- a/src/python/grpcio/grpc/_common.py +++ b/src/python/grpcio/grpc/_common.py @@ -30,6 +30,8 @@ """Shared implementation.""" import logging +import threading +import time import six @@ -110,3 +112,43 @@ def fully_qualified_method(group, method): group = _encode(group) method = _encode(method) return b'/' + group + b'/' + method + + +class CleanupThread(threading.Thread): + """A threading.Thread subclass supporting custom behavior on join(). + + On Python Interpreter exit, Python will attempt to join outstanding threads + prior to garbage collection. We may need to do additional cleanup, and + we accomplish this by overriding the join() method. + """ + + def __init__(self, behavior, group=None, target=None, name=None, + args=(), kwargs={}): + """Constructor. + + Args: + behavior (function): Function called on join() with a single + argument, timeout, indicating the maximum duration of + `behavior`, or None indicating `behavior` has no deadline. + `behavior` must be idempotent. + group (None): should be None. Reseved for future extensions + when ThreadGroup is implemented. + target (function): The function to invoke when this thread is + run. Defaults to None. + name (str): The name of this thread. Defaults to None. + args (tuple[object]): A tuple of arguments to pass to `target`. + kwargs (dict[str,object]): A dictionary of keyword arguments to + pass to `target`. + """ + super(CleanupThread, self).__init__(group=group, target=target, + name=name, args=args, kwargs=kwargs) + self._behavior = behavior + + def join(self, timeout=None): + start_time = time.time() + self._behavior(timeout) + end_time = time.time() + if timeout is not None: + timeout -= end_time - start_time + timeout = max(timeout, 0) + super(CleanupThread, self).join(timeout) diff --git a/src/python/grpcio/grpc/_server.py b/src/python/grpcio/grpc/_server.py index f4f67204977..2d9b96afbfa 100644 --- a/src/python/grpcio/grpc/_server.py +++ b/src/python/grpcio/grpc/_server.py @@ -60,6 +60,8 @@ _CANCELLED = 'cancelled' _EMPTY_FLAGS = 0 _EMPTY_METADATA = cygrpc.Metadata(()) +_UNEXPECTED_EXIT_SERVER_GRACE = 1.0 + def _serialized_request(request_event): return request_event.batch_operations[0].received_message.bytes() @@ -670,17 +672,6 @@ def _serve(state): return -def _start(state): - with state.lock: - if state.stage is not _ServerStage.STOPPED: - raise ValueError('Cannot start already-started server!') - state.server.start() - state.stage = _ServerStage.STARTED - _request_call(state) - thread = threading.Thread(target=_serve, args=(state,)) - thread.start() - - def _stop(state, grace): with state.lock: if state.stage is _ServerStage.STOPPED: @@ -719,6 +710,24 @@ def _stop(state, grace): return shutdown_event +def _start(state): + with state.lock: + if state.stage is not _ServerStage.STOPPED: + raise ValueError('Cannot start already-started server!') + state.server.start() + state.stage = _ServerStage.STARTED + _request_call(state) + def cleanup_server(timeout): + if timeout is None: + _stop(state, _UNEXPECTED_EXIT_SERVER_GRACE).wait() + else: + _stop(state, timeout).wait() + + thread = _common.CleanupThread( + cleanup_server, target=_serve, args=(state,)) + thread.start() + + class Server(grpc.Server): def __init__(self, generic_handlers, thread_pool): diff --git a/src/python/grpcio/tests/tests.json b/src/python/grpcio/tests/tests.json index 8dc47bf69dd..fcf2001b806 100644 --- a/src/python/grpcio/tests/tests.json +++ b/src/python/grpcio/tests/tests.json @@ -52,6 +52,7 @@ "_rpc_test.RPCTest", "_sanity_test.Sanity", "_secure_interop_test.SecureInteropTest", + "_thread_cleanup_test.CleanupThreadTest", "_transmission_test.RoundTripTest", "_transmission_test.TransmissionTest", "_utilities_test.ChannelConnectivityTest", diff --git a/src/python/grpcio/tests/unit/_rpc_test.py b/src/python/grpcio/tests/unit/_rpc_test.py index b33bff490c7..8773e962847 100644 --- a/src/python/grpcio/tests/unit/_rpc_test.py +++ b/src/python/grpcio/tests/unit/_rpc_test.py @@ -193,13 +193,6 @@ class RPCTest(unittest.TestCase): self._channel = grpc.insecure_channel('localhost:%d' % port) - # TODO(nathaniel): Why is this necessary, and only in some development - # environments? - def tearDown(self): - del self._channel - del self._server - del self._server_pool - def testUnrecognizedMethod(self): request = b'abc' diff --git a/src/python/grpcio/tests/unit/_thread_cleanup_test.py b/src/python/grpcio/tests/unit/_thread_cleanup_test.py new file mode 100644 index 00000000000..3e4f317edcd --- /dev/null +++ b/src/python/grpcio/tests/unit/_thread_cleanup_test.py @@ -0,0 +1,117 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +"""Tests for CleanupThread.""" + +import threading +import time +import unittest + +from grpc import _common + +_SHORT_TIME = 0.5 +_LONG_TIME = 2.0 +_EPSILON = 0.1 + + +def cleanup(timeout): + if timeout is not None: + time.sleep(timeout) + else: + time.sleep(_LONG_TIME) + + +def slow_cleanup(timeout): + # Don't respect timeout + time.sleep(_LONG_TIME) + + +class CleanupThreadTest(unittest.TestCase): + + def testTargetInvocation(self): + event = threading.Event() + def target(arg1, arg2, arg3=None): + self.assertEqual('arg1', arg1) + self.assertEqual('arg2', arg2) + self.assertEqual('arg3', arg3) + event.set() + + cleanup_thread = _common.CleanupThread(behavior=lambda x: None, + target=target, name='test-name', + args=('arg1', 'arg2'), kwargs={'arg3': 'arg3'}) + cleanup_thread.start() + cleanup_thread.join() + self.assertEqual(cleanup_thread.name, 'test-name') + self.assertTrue(event.is_set()) + + def testJoinNoTimeout(self): + cleanup_thread = _common.CleanupThread(behavior=cleanup) + cleanup_thread.start() + start_time = time.time() + cleanup_thread.join() + end_time = time.time() + self.assertAlmostEqual(_LONG_TIME, end_time - start_time, delta=_EPSILON) + + def testJoinTimeout(self): + cleanup_thread = _common.CleanupThread(behavior=cleanup) + cleanup_thread.start() + start_time = time.time() + cleanup_thread.join(_SHORT_TIME) + end_time = time.time() + self.assertAlmostEqual(_SHORT_TIME, end_time - start_time, delta=_EPSILON) + + def testJoinTimeoutSlowBehavior(self): + cleanup_thread = _common.CleanupThread(behavior=slow_cleanup) + cleanup_thread.start() + start_time = time.time() + cleanup_thread.join(_SHORT_TIME) + end_time = time.time() + self.assertAlmostEqual(_LONG_TIME, end_time - start_time, delta=_EPSILON) + + def testJoinTimeoutSlowTarget(self): + event = threading.Event() + def target(): + event.wait(_LONG_TIME) + cleanup_thread = _common.CleanupThread(behavior=cleanup, target=target) + cleanup_thread.start() + start_time = time.time() + cleanup_thread.join(_SHORT_TIME) + end_time = time.time() + self.assertAlmostEqual(_SHORT_TIME, end_time - start_time, delta=_EPSILON) + event.set() + + def testJoinZeroTimeout(self): + cleanup_thread = _common.CleanupThread(behavior=cleanup) + cleanup_thread.start() + start_time = time.time() + cleanup_thread.join(0) + end_time = time.time() + self.assertAlmostEqual(0, end_time - start_time, delta=_EPSILON) + +if __name__ == '__main__': + unittest.main(verbosity=2) From 449c64bc660ada0afc73e8b4a54456beaf380c18 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 13 Jun 2016 16:26:50 -0700 Subject: [PATCH 1061/1894] Getting handshake timeouts in place --- .../chttp2/client/secure/secure_channel_create.c | 9 +++++---- src/core/lib/http/httpcli.c | 3 ++- src/core/lib/http/httpcli.h | 2 +- src/core/lib/http/httpcli_security_connector.c | 4 +++- src/core/lib/iomgr/ev_poll_posix.c | 3 +++ src/core/lib/iomgr/tcp_posix.c | 4 ++-- src/core/lib/security/transport/handshake.c | 12 +++++------- src/core/lib/security/transport/handshake.h | 12 +++++------- src/core/lib/security/transport/secure_endpoint.c | 4 ++-- src/core/lib/security/transport/security_connector.c | 8 +++++--- src/core/lib/security/transport/security_connector.h | 6 +++--- 11 files changed, 36 insertions(+), 31 deletions(-) diff --git a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c index 6f972ecf415..721ba82d8f7 100644 --- a/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c +++ b/src/core/ext/transport/chttp2/client/secure/secure_channel_create.c @@ -119,9 +119,9 @@ static void on_secure_handshake_done(grpc_exec_ctx *exec_ctx, void *arg, static void on_initial_connect_string_sent(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { connector *c = arg; - grpc_channel_security_connector_do_handshake(exec_ctx, c->security_connector, - c->connecting_endpoint, - on_secure_handshake_done, c); + grpc_channel_security_connector_do_handshake( + exec_ctx, c->security_connector, c->connecting_endpoint, c->args.deadline, + on_secure_handshake_done, c); } static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { @@ -143,7 +143,8 @@ static void connected(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { &c->initial_string_sent); } else { grpc_channel_security_connector_do_handshake( - exec_ctx, c->security_connector, tcp, on_secure_handshake_done, c); + exec_ctx, c->security_connector, tcp, c->args.deadline, + on_secure_handshake_done, c); } } else { memset(c->result, 0, sizeof(*c->result)); diff --git a/src/core/lib/http/httpcli.c b/src/core/lib/http/httpcli.c index 3792cdf0796..18135bcb58e 100644 --- a/src/core/lib/http/httpcli.c +++ b/src/core/lib/http/httpcli.c @@ -78,6 +78,7 @@ static grpc_httpcli_post_override g_post_override = NULL; static void plaintext_handshake(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *endpoint, const char *host, + gpr_timespec deadline, void (*on_done)(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *endpoint)) { @@ -206,7 +207,7 @@ static void on_connected(grpc_exec_ctx *exec_ctx, void *arg, req->handshaker->handshake( exec_ctx, req, req->ep, req->ssl_host_override ? req->ssl_host_override : req->host, - on_handshake_done); + req->deadline, on_handshake_done); } static void next_address(grpc_exec_ctx *exec_ctx, internal_request *req, diff --git a/src/core/lib/http/httpcli.h b/src/core/lib/http/httpcli.h index 479c40f87ee..662e176f4cc 100644 --- a/src/core/lib/http/httpcli.h +++ b/src/core/lib/http/httpcli.h @@ -57,7 +57,7 @@ typedef struct grpc_httpcli_context { typedef struct { const char *default_port; void (*handshake)(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *endpoint, - const char *host, + const char *host, gpr_timespec deadline, void (*on_done)(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *endpoint)); } grpc_httpcli_handshaker; diff --git a/src/core/lib/http/httpcli_security_connector.c b/src/core/lib/http/httpcli_security_connector.c index 55909289684..aeecad8bc64 100644 --- a/src/core/lib/http/httpcli_security_connector.c +++ b/src/core/lib/http/httpcli_security_connector.c @@ -61,6 +61,7 @@ static void httpcli_ssl_destroy(grpc_security_connector *sc) { static void httpcli_ssl_do_handshake(grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, grpc_endpoint *nonsecure_endpoint, + gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data) { grpc_httpcli_ssl_channel_security_connector *c = @@ -163,6 +164,7 @@ static void on_secure_transport_setup_done(grpc_exec_ctx *exec_ctx, void *rp, static void ssl_handshake(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, const char *host, + gpr_timespec deadline, void (*on_done)(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *endpoint)) { grpc_channel_security_connector *sc = NULL; @@ -181,7 +183,7 @@ static void ssl_handshake(grpc_exec_ctx *exec_ctx, void *arg, pem_root_certs, pem_root_certs_size, host, &sc) == GRPC_SECURITY_OK); grpc_channel_security_connector_do_handshake( - exec_ctx, sc, tcp, on_secure_transport_setup_done, c); + exec_ctx, sc, tcp, deadline, on_secure_transport_setup_done, c); GRPC_SECURITY_CONNECTOR_UNREF(&sc->base, "httpcli"); } diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 87d48a47aba..532c10ce3bd 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -715,6 +715,7 @@ static grpc_error *pollset_kick_ext(grpc_pollset *p, } GPR_TIMER_END("pollset_kick_ext", 0); + GRPC_LOG_IF_ERROR("pollset_kick_ext", GRPC_ERROR_REF(error)); return error; } @@ -843,6 +844,7 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, worker.wakeup_fd = gpr_malloc(sizeof(*worker.wakeup_fd)); error = grpc_wakeup_fd_init(&worker.wakeup_fd->fd); if (error != GRPC_ERROR_NONE) { + GRPC_LOG_IF_ERROR("pollset_work", GRPC_ERROR_REF(error)); return error; } } @@ -1022,6 +1024,7 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, } *worker_hdl = NULL; GPR_TIMER_END("pollset_work", 0); + GRPC_LOG_IF_ERROR("pollset_work", GRPC_ERROR_REF(error)); return error; } diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 2f7c50ce358..808367a4e04 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -160,7 +160,7 @@ static void call_read_cb(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, grpc_error *error) { grpc_closure *cb = tcp->read_cb; - if (grpc_tcp_trace) { + if (false && grpc_tcp_trace) { size_t i; const char *str = grpc_error_string(error); gpr_log(GPR_DEBUG, "read: error=%s", str); @@ -394,7 +394,7 @@ static void tcp_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, grpc_tcp *tcp = (grpc_tcp *)ep; grpc_error *error = GRPC_ERROR_NONE; - if (grpc_tcp_trace) { + if (false && grpc_tcp_trace) { size_t i; for (i = 0; i < buf->count; i++) { diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c index 63c9129ae88..c329c763df4 100644 --- a/src/core/lib/security/transport/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -304,13 +304,11 @@ static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, } } -void grpc_do_security_handshake(grpc_exec_ctx *exec_ctx, - tsi_handshaker *handshaker, - grpc_security_connector *connector, - bool is_client_side, - grpc_endpoint *nonsecure_endpoint, - grpc_security_handshake_done_cb cb, - void *user_data) { +void grpc_do_security_handshake( + grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker, + grpc_security_connector *connector, bool is_client_side, + grpc_endpoint *nonsecure_endpoint, gpr_timespec deadline, + grpc_security_handshake_done_cb cb, void *user_data) { grpc_security_connector_handshake_list *handshake_node; grpc_security_handshake *h = gpr_malloc(sizeof(grpc_security_handshake)); memset(h, 0, sizeof(grpc_security_handshake)); diff --git a/src/core/lib/security/transport/handshake.h b/src/core/lib/security/transport/handshake.h index 6ed850b3153..c0906dd6af0 100644 --- a/src/core/lib/security/transport/handshake.h +++ b/src/core/lib/security/transport/handshake.h @@ -38,13 +38,11 @@ #include "src/core/lib/security/transport/security_connector.h" /* Calls the callback upon completion. Takes owership of handshaker. */ -void grpc_do_security_handshake(grpc_exec_ctx *exec_ctx, - tsi_handshaker *handshaker, - grpc_security_connector *connector, - bool is_client_side, - grpc_endpoint *nonsecure_endpoint, - grpc_security_handshake_done_cb cb, - void *user_data); +void grpc_do_security_handshake( + grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker, + grpc_security_connector *connector, bool is_client_side, + grpc_endpoint *nonsecure_endpoint, gpr_timespec deadline, + grpc_security_handshake_done_cb cb, void *user_data); void grpc_security_handshake_shutdown(grpc_exec_ctx *exec_ctx, void *handshake); diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index 97302a2328a..7650d68e892 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -128,7 +128,7 @@ static void flush_read_staging_buffer(secure_endpoint *ep, uint8_t **cur, static void call_read_cb(grpc_exec_ctx *exec_ctx, secure_endpoint *ep, grpc_error *error) { - if (grpc_trace_secure_endpoint) { + if (false && grpc_trace_secure_endpoint) { size_t i; for (i = 0; i < ep->read_buffer->count; i++) { char *data = gpr_dump_slice(ep->read_buffer->slices[i], @@ -256,7 +256,7 @@ static void endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *secure_ep, gpr_slice_buffer_reset_and_unref(&ep->output_buffer); - if (grpc_trace_secure_endpoint) { + if (false && grpc_trace_secure_endpoint) { for (i = 0; i < slices->count; i++) { char *data = gpr_dump_slice(slices->slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index 03b64c51216..a02c5798d42 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -127,12 +127,12 @@ void grpc_server_security_connector_shutdown( void grpc_channel_security_connector_do_handshake( grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, - grpc_endpoint *nonsecure_endpoint, grpc_security_handshake_done_cb cb, - void *user_data) { + grpc_endpoint *nonsecure_endpoint, gpr_timespec deadline, + grpc_security_handshake_done_cb cb, void *user_data) { if (sc == NULL || nonsecure_endpoint == NULL) { cb(exec_ctx, user_data, GRPC_SECURITY_ERROR, NULL, NULL); } else { - sc->do_handshake(exec_ctx, sc, nonsecure_endpoint, cb, user_data); + sc->do_handshake(exec_ctx, sc, nonsecure_endpoint, deadline, cb, user_data); } } @@ -310,6 +310,7 @@ static void fake_channel_check_call_host(grpc_exec_ctx *exec_ctx, static void fake_channel_do_handshake(grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, grpc_endpoint *nonsecure_endpoint, + gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data) { grpc_do_security_handshake(exec_ctx, tsi_create_fake_handshaker(1), &sc->base, @@ -413,6 +414,7 @@ static grpc_security_status ssl_create_handshaker( static void ssl_channel_do_handshake(grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, grpc_endpoint *nonsecure_endpoint, + gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data) { grpc_ssl_channel_security_connector *c = diff --git a/src/core/lib/security/transport/security_connector.h b/src/core/lib/security/transport/security_connector.h index 84e586deaa0..b7c0942891d 100644 --- a/src/core/lib/security/transport/security_connector.h +++ b/src/core/lib/security/transport/security_connector.h @@ -143,7 +143,7 @@ struct grpc_channel_security_connector { grpc_security_call_host_check_cb cb, void *user_data); void (*do_handshake)(grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *sc, - grpc_endpoint *nonsecure_endpoint, + grpc_endpoint *nonsecure_endpoint, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data); }; @@ -156,8 +156,8 @@ void grpc_channel_security_connector_check_call_host( /* Handshake. */ void grpc_channel_security_connector_do_handshake( grpc_exec_ctx *exec_ctx, grpc_channel_security_connector *connector, - grpc_endpoint *nonsecure_endpoint, grpc_security_handshake_done_cb cb, - void *user_data); + grpc_endpoint *nonsecure_endpoint, gpr_timespec deadline, + grpc_security_handshake_done_cb cb, void *user_data); /* --- server_security_connector object. --- From 41622a8e389e8eda38d6d3bfbf34cbf35f437156 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Mon, 13 Jun 2016 16:43:14 -0700 Subject: [PATCH 1062/1894] Fix tsan failures --- Makefile | 1 + build.yaml | 1 + src/core/lib/iomgr/ev_epoll_linux.c | 27 ++++++++++++++++++++++++++- 3 files changed, 28 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4d8b060760a..28d6842c76c 100644 --- a/Makefile +++ b/Makefile @@ -200,6 +200,7 @@ LD_tsan = clang LDXX_tsan = clang++ CPPFLAGS_tsan = -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS LDFLAGS_tsan = -fsanitize=thread +DEFINES_tsan = _GRPC_TSAN DEFINES_tsan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=5 VALID_CONFIG_stapprof = 1 diff --git a/build.yaml b/build.yaml index 85b66d985bb..139ab3e8bca 100644 --- a/build.yaml +++ b/build.yaml @@ -3231,6 +3231,7 @@ configs: CPPFLAGS: -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS CXX: clang++ + DEFINES: _GRPC_TSAN LD: clang LDFLAGS: -fsanitize=thread LDXX: clang++ diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index a8a874cd4b0..35a15e00c96 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -236,6 +236,17 @@ static grpc_wakeup_fd polling_island_wakeup_fd; static gpr_mu g_pi_freelist_mu; static polling_island *g_pi_freelist = NULL; +#ifdef _GRPC_TSAN +/* Currently TSAN may incorrectly flag data races between epoll_ctl and + epoll_wait for any grpc_fd structs that are added to the epoll set via + epoll_ctl and are returned (within a very short window) via epoll_wait(). + + To work-around this race, we establish a happens-before relation between + the code just-before epoll_ctl() and the code after epoll_wait() by using + this atomic */ +gpr_atm g_epoll_sync; +#endif + /* The caller is expected to hold pi->mu lock before calling this function */ static void polling_island_add_fds_locked(polling_island *pi, grpc_fd **fds, size_t fd_count, bool add_fd_refs) { @@ -243,6 +254,11 @@ static void polling_island_add_fds_locked(polling_island *pi, grpc_fd **fds, size_t i; struct epoll_event ev; +#ifdef _GRPC_TSAN + /* See the definition of g_epoll_sync for more context */ + gpr_atm_rel_store(&g_epoll_sync, 0); +#endif + for (i = 0; i < fd_count; i++) { ev.events = (uint32_t)(EPOLLIN | EPOLLOUT | EPOLLET); ev.data.ptr = fds[i]; @@ -361,6 +377,7 @@ static polling_island *polling_island_create(grpc_fd *initial_fd, } pi->epoll_fd = epoll_create1(EPOLL_CLOEXEC); + if (pi->epoll_fd < 0) { gpr_log(GPR_ERROR, "epoll_create1() failed with error: %s", strerror(errno)); @@ -1144,6 +1161,11 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, } } +#ifdef _GRPC_TSAN + /* See the definition of g_poll_sync for more details */ + gpr_atm_acq_load(&g_epoll_sync); +#endif + for (int i = 0; i < ep_rv; ++i) { void *data_ptr = ep_ev[i].data.ptr; if (data_ptr == &grpc_global_wakeup_fd) { @@ -1514,10 +1536,13 @@ const grpc_event_engine_vtable *grpc_init_epoll_linux(void) { return &vtable; } -#else /* defined(GPR_LINUX_EPOLL) */ +#else /* defined(GPR_LINUX_EPOLL) */ +#if defined(GPR_POSIX_SOCKET) +#include "src/core/lib/iomgr/ev_posix.h" /* If GPR_LINUX_EPOLL is not defined, it means epoll is not available. Return * NULL */ const grpc_event_engine_vtable *grpc_init_epoll_linux(void) { return NULL; } +#endif /* defined(GPR_POSIX_SOCKET) */ void grpc_use_signal(int signum) {} #endif /* !defined(GPR_LINUX_EPOLL) */ From ec066b3d32ed484961cd73e84822455da4f65ca3 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Mon, 13 Jun 2016 18:10:23 -0700 Subject: [PATCH 1063/1894] Add http2 status code in error_message if it's not 200 --- .../chttp2/transport/chttp2_transport.c | 2 +- src/core/lib/channel/channel_stack.c | 11 +++++++ src/core/lib/channel/channel_stack.h | 5 ++++ src/core/lib/channel/http_client_filter.c | 8 ++++- src/core/lib/transport/transport.c | 30 +++++++++++++++++++ src/core/lib/transport/transport.h | 5 ++++ 6 files changed, 59 insertions(+), 2 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 2375a4587fe..38da36c192c 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -943,7 +943,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, if (op->cancel_with_status != GRPC_STATUS_OK) { cancel_from_api(exec_ctx, transport_global, stream_global, - op->cancel_with_status, op->optional_close_message); + op->cancel_with_status, op->optional_cancel_message); } if (op->close_with_status != GRPC_STATUS_OK) { diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index bbba85d80ba..b52b1af83aa 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -266,3 +266,14 @@ void grpc_call_element_send_cancel(grpc_exec_ctx *exec_ctx, op.cancel_with_status = GRPC_STATUS_CANCELLED; grpc_call_next_op(exec_ctx, cur_elem, &op); } + +void grpc_call_element_send_cancel_with_message(grpc_exec_ctx *exec_ctx, + grpc_call_element *cur_elem, + grpc_status_code status, + gpr_slice *optional_message) { + grpc_transport_stream_op op; + memset(&op, 0, sizeof(op)); + grpc_transport_stream_op_add_cancellation_with_message(&op, status, + optional_message); + grpc_call_next_op(exec_ctx, cur_elem, &op); +} diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 41dd4a0d8a1..d72c015b677 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -273,6 +273,11 @@ void grpc_call_log_op(char *file, int line, gpr_log_severity severity, void grpc_call_element_send_cancel(grpc_exec_ctx *exec_ctx, grpc_call_element *cur_elem); +void grpc_call_element_send_cancel_with_message(grpc_exec_ctx *exec_ctx, + grpc_call_element *cur_elem, + grpc_status_code status, + gpr_slice *optional_message); + extern int grpc_trace_channel; #define GRPC_CALL_LOG_OP(sev, elem, op) \ diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c index 792f0d8ae68..94645bebb24 100644 --- a/src/core/lib/channel/http_client_filter.c +++ b/src/core/lib/channel/http_client_filter.c @@ -76,7 +76,13 @@ static grpc_mdelem *client_recv_filter(void *user_data, grpc_mdelem *md) { if (md == GRPC_MDELEM_STATUS_200) { return NULL; } else if (md->key == GRPC_MDSTR_STATUS) { - grpc_call_element_send_cancel(a->exec_ctx, a->elem); + char *message_string; + gpr_asprintf(&message_string, "Received http2 header with status: %s", + grpc_mdstr_as_c_string(md->value)); + gpr_slice message = gpr_slice_from_copied_string(message_string); + gpr_free(message_string); + grpc_call_element_send_cancel_with_message(a->exec_ctx, a->elem, + GRPC_STATUS_CANCELLED, &message); return NULL; } else if (md == GRPC_MDELEM_CONTENT_TYPE_APPLICATION_SLASH_GRPC) { return NULL; diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c index b65e157a02a..3ed72adab89 100644 --- a/src/core/lib/transport/transport.c +++ b/src/core/lib/transport/transport.c @@ -164,6 +164,7 @@ void grpc_transport_stream_op_add_cancellation(grpc_transport_stream_op *op, GPR_ASSERT(status != GRPC_STATUS_OK); if (op->cancel_with_status == GRPC_STATUS_OK) { op->cancel_with_status = status; + op->optional_cancel_message = NULL; } if (op->close_with_status != GRPC_STATUS_OK) { op->close_with_status = GRPC_STATUS_OK; @@ -189,6 +190,35 @@ static void free_message(grpc_exec_ctx *exec_ctx, void *p, bool iomgr_success) { gpr_free(cmd); } +void grpc_transport_stream_op_add_cancellation_with_message( + grpc_transport_stream_op *op, grpc_status_code status, + gpr_slice *optional_message) { + close_message_data *cmd; + GPR_ASSERT(status != GRPC_STATUS_OK); + if (op->cancel_with_status != GRPC_STATUS_OK) { + if (optional_message) { + gpr_slice_unref(*optional_message); + } + return; + } + if (optional_message) { + cmd = gpr_malloc(sizeof(*cmd)); + cmd->message = *optional_message; + cmd->then_call = op->on_complete; + grpc_closure_init(&cmd->closure, free_message, cmd); + op->on_complete = &cmd->closure; + op->optional_cancel_message = &cmd->message; + } + op->cancel_with_status = status; + if (op->close_with_status != GRPC_STATUS_OK) { + op->close_with_status = GRPC_STATUS_OK; + if (op->optional_close_message != NULL) { + gpr_slice_unref(*op->optional_close_message); + op->optional_close_message = NULL; + } + } +} + void grpc_transport_stream_op_add_close(grpc_transport_stream_op *op, grpc_status_code status, gpr_slice *optional_message) { diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index ed06fc3ed21..9e528ce8cbf 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -137,6 +137,7 @@ typedef struct grpc_transport_stream_op { /** If != GRPC_STATUS_OK, cancel this stream */ grpc_status_code cancel_with_status; + gpr_slice *optional_cancel_message; /** If != GRPC_STATUS_OK, send grpc-status, grpc-message, and close this stream for both reading and writing */ @@ -221,6 +222,10 @@ void grpc_transport_stream_op_finish_with_failure(grpc_exec_ctx *exec_ctx, void grpc_transport_stream_op_add_cancellation(grpc_transport_stream_op *op, grpc_status_code status); +void grpc_transport_stream_op_add_cancellation_with_message( + grpc_transport_stream_op *op, grpc_status_code status, + gpr_slice *optional_message); + void grpc_transport_stream_op_add_close(grpc_transport_stream_op *op, grpc_status_code status, gpr_slice *optional_message); From 058c9de8b28275484d9eef3c7d4cab45a52ec53e Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 13 Jun 2016 19:04:43 -0700 Subject: [PATCH 1064/1894] Added to server's shutdown docstrings --- include/grpc++/impl/codegen/server_interface.h | 8 ++++++++ include/grpc++/server_builder.h | 17 ++++++++++++++--- 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/include/grpc++/impl/codegen/server_interface.h b/include/grpc++/impl/codegen/server_interface.h index 7b7d5aa90b6..3a3e052d9ef 100644 --- a/include/grpc++/impl/codegen/server_interface.h +++ b/include/grpc++/impl/codegen/server_interface.h @@ -62,6 +62,10 @@ class ServerInterface : public CallHook { /// Shutdown the server, blocking until all rpc processing finishes. /// Forcefully terminate pending calls after \a deadline expires. /// + /// All completion queue associated with the server (for example, for async + /// serving) must be shutdown *after* this method has returned: + /// See \a ServerBuilder::AddCompletionQueue for details. + /// /// \param deadline How long to wait until pending rpcs are forcefully /// terminated. template @@ -70,6 +74,10 @@ class ServerInterface : public CallHook { } /// Shutdown the server, waiting for all rpc processing to finish. + /// + /// All completion queue associated with the server (for example, for async + /// serving) must be shutdown *after* this method has returned: + /// See \a ServerBuilder::AddCompletionQueue for details. void Shutdown() { ShutdownInternal(gpr_inf_future(GPR_CLOCK_MONOTONIC)); } /// Block waiting for all work to complete. diff --git a/include/grpc++/server_builder.h b/include/grpc++/server_builder.h index 54f01d11b5d..aa7588d34d3 100644 --- a/include/grpc++/server_builder.h +++ b/include/grpc++/server_builder.h @@ -119,9 +119,20 @@ class ServerBuilder { std::shared_ptr creds, int* selected_port = nullptr); - /// Add a completion queue for handling asynchronous services - /// Caller is required to keep this completion queue live until - /// the server is destroyed. + /// Add a completion queue for handling asynchronous services. + /// + /// Caller is required to shutdown the server prior to shutting down the + /// returned completion queue. A typical usage scenario: + /// + /// // While building the server: + /// ServerBuilder builder; + /// ... + /// cq_ = builder.AddCompletionQueue(); + /// server_ = builder.BuildAndStart(); + /// + /// // While shutting down the server; + /// server_->Shutdown(); + /// cq_->Shutdown(); // Always *after* the associated server's Shutdown()! /// /// \param is_frequently_polled This is an optional parameter to inform GRPC /// library about whether this completion queue would be frequently polled From ad2c4778fc560f10f38550428189c97c9e2bc5a1 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Mon, 13 Jun 2016 19:06:54 -0700 Subject: [PATCH 1065/1894] Rename _GRPC_TSAN to GRPC_TSAN --- Makefile | 2 +- build.yaml | 2 +- src/core/lib/iomgr/ev_epoll_linux.c | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Makefile b/Makefile index 040ebd4102b..e35e360785b 100644 --- a/Makefile +++ b/Makefile @@ -200,7 +200,7 @@ LD_tsan = clang LDXX_tsan = clang++ CPPFLAGS_tsan = -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS LDFLAGS_tsan = -fsanitize=thread -DEFINES_tsan = _GRPC_TSAN +DEFINES_tsan = GRPC_TSAN DEFINES_tsan += GRPC_TEST_SLOWDOWN_BUILD_FACTOR=5 VALID_CONFIG_stapprof = 1 diff --git a/build.yaml b/build.yaml index 0847232b504..3d327f8bffd 100644 --- a/build.yaml +++ b/build.yaml @@ -3266,7 +3266,7 @@ configs: CPPFLAGS: -O0 -fsanitize=thread -fno-omit-frame-pointer -Wno-unused-command-line-argument -DGPR_NO_DIRECT_SYSCALLS CXX: clang++ - DEFINES: _GRPC_TSAN + DEFINES: GRPC_TSAN LD: clang LDFLAGS: -fsanitize=thread LDXX: clang++ diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 35a15e00c96..006c2a8ee7f 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -236,7 +236,7 @@ static grpc_wakeup_fd polling_island_wakeup_fd; static gpr_mu g_pi_freelist_mu; static polling_island *g_pi_freelist = NULL; -#ifdef _GRPC_TSAN +#ifdef GRPC_TSAN /* Currently TSAN may incorrectly flag data races between epoll_ctl and epoll_wait for any grpc_fd structs that are added to the epoll set via epoll_ctl and are returned (within a very short window) via epoll_wait(). @@ -245,7 +245,7 @@ static polling_island *g_pi_freelist = NULL; the code just-before epoll_ctl() and the code after epoll_wait() by using this atomic */ gpr_atm g_epoll_sync; -#endif +#endif /* defined(GRPC_TSAN) */ /* The caller is expected to hold pi->mu lock before calling this function */ static void polling_island_add_fds_locked(polling_island *pi, grpc_fd **fds, @@ -254,10 +254,10 @@ static void polling_island_add_fds_locked(polling_island *pi, grpc_fd **fds, size_t i; struct epoll_event ev; -#ifdef _GRPC_TSAN +#ifdef GRPC_TSAN /* See the definition of g_epoll_sync for more context */ gpr_atm_rel_store(&g_epoll_sync, 0); -#endif +#endif /* defined(GRPC_TSAN) */ for (i = 0; i < fd_count; i++) { ev.events = (uint32_t)(EPOLLIN | EPOLLOUT | EPOLLET); @@ -1161,10 +1161,10 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, } } -#ifdef _GRPC_TSAN +#ifdef GRPC_TSAN /* See the definition of g_poll_sync for more details */ gpr_atm_acq_load(&g_epoll_sync); -#endif +#endif /* defined(GRPC_TSAN) */ for (int i = 0; i < ep_rv; ++i) { void *data_ptr = ep_ev[i].data.ptr; From 289dcb1b68c236d11a8f5a89827e95af94a7df12 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Mon, 13 Jun 2016 19:10:15 -0700 Subject: [PATCH 1066/1894] Rename gpr_strpad as gpr_leftpad --- .../chttp2/transport/chttp2_transport.c | 8 ++++---- src/core/lib/support/string.c | 2 +- src/core/lib/support/string.h | 2 +- test/core/support/string_test.c | 18 +++++++++--------- 4 files changed, 15 insertions(+), 15 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 6dbe9b70f3e..6e8640f1b32 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -2024,7 +2024,7 @@ static char *format_flowctl_context_var(const char *context, const char *var, if (context == NULL) { *scope = NULL; gpr_asprintf(&buf, "%s(%" PRId64 ")", var, val); - result = gpr_strpad(buf, ' ', 40); + result = gpr_leftpad(buf, ' ', 40); gpr_free(buf); return result; } @@ -2037,7 +2037,7 @@ static char *format_flowctl_context_var(const char *context, const char *var, gpr_free(tmp); } gpr_asprintf(&buf, "%s.%s(%" PRId64 ")", underscore_pos + 1, var, val); - result = gpr_strpad(buf, ' ', 40); + result = gpr_leftpad(buf, ' ', 40); gpr_free(buf); return result; } @@ -2068,8 +2068,8 @@ void grpc_chttp2_flowctl_trace(const char *file, int line, const char *phase, char *clisvr = is_client ? "client" : "server"; char *prefix; - tmp_phase = gpr_strpad(phase, ' ', 8); - tmp_scope1 = gpr_strpad(scope1, ' ', 11); + tmp_phase = gpr_leftpad(phase, ' ', 8); + tmp_scope1 = gpr_leftpad(scope1, ' ', 11); gpr_asprintf(&prefix, "FLOW %s: %s %s ", phase, clisvr, scope1); gpr_free(tmp_phase); gpr_free(tmp_scope1); diff --git a/src/core/lib/support/string.c b/src/core/lib/support/string.c index 789bd6408be..30c1e67647a 100644 --- a/src/core/lib/support/string.c +++ b/src/core/lib/support/string.c @@ -194,7 +194,7 @@ int int64_ttoa(int64_t value, char *string) { return i; } -char *gpr_strpad(const char *str, char flag, size_t length) { +char *gpr_leftpad(const char *str, char flag, size_t length) { const size_t str_length = strlen(str); const size_t out_length = str_length > length ? str_length : length; char *out = gpr_malloc(out_length + 1); diff --git a/src/core/lib/support/string.h b/src/core/lib/support/string.h index 30f5aef7665..2b6bb3eec61 100644 --- a/src/core/lib/support/string.h +++ b/src/core/lib/support/string.h @@ -85,7 +85,7 @@ void gpr_reverse_bytes(char *str, int len); /* Pad a string with flag characters. The given length specifies the minimum field width. The input string is never truncated. */ -char *gpr_strpad(const char *str, char flag, size_t length); +char *gpr_leftpad(const char *str, char flag, size_t length); /* Join a set of strings, returning the resulting string. Total combined length (excluding null terminator) is returned in total_length diff --git a/test/core/support/string_test.c b/test/core/support/string_test.c index 3380482787e..553a824b3fa 100644 --- a/test/core/support/string_test.c +++ b/test/core/support/string_test.c @@ -334,34 +334,34 @@ static void test_int64toa() { GPR_ASSERT(0 == strcmp("-9223372036854775808", buf)); } -static void test_strpad() { +static void test_leftpad() { char *padded; - padded = gpr_strpad("foo", ' ', 5); + padded = gpr_leftpad("foo", ' ', 5); GPR_ASSERT(0 == strcmp(" foo", padded)); gpr_free(padded); - padded = gpr_strpad("foo", ' ', 4); + padded = gpr_leftpad("foo", ' ', 4); GPR_ASSERT(0 == strcmp(" foo", padded)); gpr_free(padded); - padded = gpr_strpad("foo", ' ', 3); + padded = gpr_leftpad("foo", ' ', 3); GPR_ASSERT(0 == strcmp("foo", padded)); gpr_free(padded); - padded = gpr_strpad("foo", ' ', 2); + padded = gpr_leftpad("foo", ' ', 2); GPR_ASSERT(0 == strcmp("foo", padded)); gpr_free(padded); - padded = gpr_strpad("foo", ' ', 1); + padded = gpr_leftpad("foo", ' ', 1); GPR_ASSERT(0 == strcmp("foo", padded)); gpr_free(padded); - padded = gpr_strpad("foo", ' ', 0); + padded = gpr_leftpad("foo", ' ', 0); GPR_ASSERT(0 == strcmp("foo", padded)); gpr_free(padded); - padded = gpr_strpad("foo", '0', 5); + padded = gpr_leftpad("foo", '0', 5); GPR_ASSERT(0 == strcmp("00foo", padded)); gpr_free(padded); } @@ -378,6 +378,6 @@ int main(int argc, char **argv) { test_strsplit(); test_ltoa(); test_int64toa(); - test_strpad(); + test_leftpad(); return 0; } From bb3948813cd3329218a2487ae295800ad2997716 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 9 Jun 2016 21:14:33 -0700 Subject: [PATCH 1067/1894] Fix namespace package usage Turns out that Python namespace packages may be asymmetrical. The contents of a particular package that was installed first (here grpcio) appears to retain its contents in the installation directory when all other distributions declare that package as a namespace package (here grpcio-tools). --- setup.py | 1 - src/python/grpcio/grpc/__init__.py | 2 -- 2 files changed, 3 deletions(-) diff --git a/setup.py b/setup.py index e2de96de358..f73501b8b35 100644 --- a/setup.py +++ b/setup.py @@ -246,7 +246,6 @@ setuptools.setup( ext_modules=CYTHON_EXTENSION_MODULES, packages=list(PACKAGES), package_dir=PACKAGE_DIRECTORIES, - namespace_packages=['grpc'], package_data=PACKAGE_DATA, install_requires=INSTALL_REQUIRES, setup_requires=SETUP_REQUIRES, diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py index 5ba5a4e1fdd..cf6eb1d25cd 100644 --- a/src/python/grpcio/grpc/__init__.py +++ b/src/python/grpcio/grpc/__init__.py @@ -29,8 +29,6 @@ """gRPC's Python API.""" -__import__('pkg_resources').declare_namespace(__name__) - import abc import enum From ae134945ad935c83c0c32199be115632dd0f3b4b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 14 Jun 2016 08:31:48 -0700 Subject: [PATCH 1068/1894] Handshake timeout implemented, and compiles --- .../chttp2/server/secure/server_secure_chttp2.c | 8 +++++--- src/core/lib/http/httpcli_security_connector.c | 2 +- src/core/lib/security/transport/handshake.c | 11 +++++++++++ .../lib/security/transport/security_connector.c | 17 +++++++++++------ .../lib/security/transport/security_connector.h | 4 ++-- 5 files changed, 30 insertions(+), 12 deletions(-) diff --git a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c index 77947b52ab6..103107c6a7c 100644 --- a/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c +++ b/src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c @@ -129,9 +129,11 @@ static void on_accept(grpc_exec_ctx *exec_ctx, void *statep, grpc_endpoint *tcp, state->state = statep; state_ref(state->state); state->accepting_pollset = accepting_pollset; - grpc_server_security_connector_do_handshake(exec_ctx, state->state->sc, - acceptor, tcp, - on_secure_handshake_done, state); + grpc_server_security_connector_do_handshake( + exec_ctx, state->state->sc, acceptor, tcp, + gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), + gpr_time_from_seconds(120, GPR_TIMESPAN)), + on_secure_handshake_done, state); } /* Server callback: start listening on our ports */ diff --git a/src/core/lib/http/httpcli_security_connector.c b/src/core/lib/http/httpcli_security_connector.c index aeecad8bc64..a57d93bb7bb 100644 --- a/src/core/lib/http/httpcli_security_connector.c +++ b/src/core/lib/http/httpcli_security_connector.c @@ -80,7 +80,7 @@ static void httpcli_ssl_do_handshake(grpc_exec_ctx *exec_ctx, cb(exec_ctx, user_data, GRPC_SECURITY_ERROR, NULL, NULL); } else { grpc_do_security_handshake(exec_ctx, handshaker, &sc->base, true, - nonsecure_endpoint, cb, user_data); + nonsecure_endpoint, deadline, cb, user_data); } } diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c index c329c763df4..ff338f8084b 100644 --- a/src/core/lib/security/transport/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -39,6 +39,7 @@ #include #include #include +#include "src/core/lib/iomgr/timer.h" #include "src/core/lib/security/context/security_context.h" #include "src/core/lib/security/transport/secure_endpoint.h" #include "src/core/lib/security/transport/tsi_error.h" @@ -61,6 +62,7 @@ typedef struct { grpc_closure on_handshake_data_sent_to_peer; grpc_closure on_handshake_data_received_from_peer; grpc_auth_context *auth_context; + grpc_timer timer; } grpc_security_handshake; static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, @@ -100,6 +102,7 @@ static void security_connector_remove_handshake(grpc_security_handshake *h) { static void security_handshake_done(grpc_exec_ctx *exec_ctx, grpc_security_handshake *h, grpc_error *error) { + grpc_timer_cancel(exec_ctx, &h->timer); if (!h->is_client_side) { security_connector_remove_handshake(h); } @@ -304,6 +307,12 @@ static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, } } +static void on_timeout(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { + if (error == GRPC_ERROR_NONE) { + grpc_endpoint_shutdown(exec_ctx, arg); + } +} + void grpc_do_security_handshake( grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker, grpc_security_connector *connector, bool is_client_side, @@ -338,6 +347,8 @@ void grpc_do_security_handshake( gpr_mu_unlock(&server_connector->mu); } send_handshake_bytes_to_peer(exec_ctx, h); + grpc_timer_init(exec_ctx, &h->timer, deadline, on_timeout, + h->wrapped_endpoint, gpr_now(deadline.clock_type)); } void grpc_security_handshake_shutdown(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/security/transport/security_connector.c b/src/core/lib/security/transport/security_connector.c index a02c5798d42..f0ee6770e5f 100644 --- a/src/core/lib/security/transport/security_connector.c +++ b/src/core/lib/security/transport/security_connector.c @@ -139,11 +139,13 @@ void grpc_channel_security_connector_do_handshake( void grpc_server_security_connector_do_handshake( grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, grpc_tcp_server_acceptor *acceptor, grpc_endpoint *nonsecure_endpoint, - grpc_security_handshake_done_cb cb, void *user_data) { + gpr_timespec deadline, grpc_security_handshake_done_cb cb, + void *user_data) { if (sc == NULL || nonsecure_endpoint == NULL) { cb(exec_ctx, user_data, GRPC_SECURITY_ERROR, NULL, NULL); } else { - sc->do_handshake(exec_ctx, sc, acceptor, nonsecure_endpoint, cb, user_data); + sc->do_handshake(exec_ctx, sc, acceptor, nonsecure_endpoint, deadline, cb, + user_data); } } @@ -314,17 +316,19 @@ static void fake_channel_do_handshake(grpc_exec_ctx *exec_ctx, grpc_security_handshake_done_cb cb, void *user_data) { grpc_do_security_handshake(exec_ctx, tsi_create_fake_handshaker(1), &sc->base, - true, nonsecure_endpoint, cb, user_data); + true, nonsecure_endpoint, deadline, cb, user_data); } static void fake_server_do_handshake(grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, grpc_tcp_server_acceptor *acceptor, grpc_endpoint *nonsecure_endpoint, + gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data) { grpc_do_security_handshake(exec_ctx, tsi_create_fake_handshaker(0), &sc->base, - false, nonsecure_endpoint, cb, user_data); + false, nonsecure_endpoint, deadline, cb, + user_data); } static grpc_security_connector_vtable fake_channel_vtable = { @@ -429,7 +433,7 @@ static void ssl_channel_do_handshake(grpc_exec_ctx *exec_ctx, cb(exec_ctx, user_data, status, NULL, NULL); } else { grpc_do_security_handshake(exec_ctx, handshaker, &sc->base, true, - nonsecure_endpoint, cb, user_data); + nonsecure_endpoint, deadline, cb, user_data); } } @@ -437,6 +441,7 @@ static void ssl_server_do_handshake(grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, grpc_tcp_server_acceptor *acceptor, grpc_endpoint *nonsecure_endpoint, + gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data) { grpc_ssl_server_security_connector *c = @@ -448,7 +453,7 @@ static void ssl_server_do_handshake(grpc_exec_ctx *exec_ctx, cb(exec_ctx, user_data, status, NULL, NULL); } else { grpc_do_security_handshake(exec_ctx, handshaker, &sc->base, false, - nonsecure_endpoint, cb, user_data); + nonsecure_endpoint, deadline, cb, user_data); } } diff --git a/src/core/lib/security/transport/security_connector.h b/src/core/lib/security/transport/security_connector.h index b7c0942891d..c2ddf5ee1eb 100644 --- a/src/core/lib/security/transport/security_connector.h +++ b/src/core/lib/security/transport/security_connector.h @@ -174,14 +174,14 @@ struct grpc_server_security_connector { void (*do_handshake)(grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, grpc_tcp_server_acceptor *acceptor, - grpc_endpoint *nonsecure_endpoint, + grpc_endpoint *nonsecure_endpoint, gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data); }; void grpc_server_security_connector_do_handshake( grpc_exec_ctx *exec_ctx, grpc_server_security_connector *sc, grpc_tcp_server_acceptor *acceptor, grpc_endpoint *nonsecure_endpoint, - grpc_security_handshake_done_cb cb, void *user_data); + gpr_timespec deadline, grpc_security_handshake_done_cb cb, void *user_data); void grpc_server_security_connector_shutdown( grpc_exec_ctx *exec_ctx, grpc_server_security_connector *connector); From 07611574142d639f3632289dae806306618e6503 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 14 Jun 2016 08:44:14 -0700 Subject: [PATCH 1069/1894] Fix merge error --- test/core/end2end/fuzzers/client_fuzzer.c | 1 - 1 file changed, 1 deletion(-) diff --git a/test/core/end2end/fuzzers/client_fuzzer.c b/test/core/end2end/fuzzers/client_fuzzer.c index 06101941365..79b23d78569 100644 --- a/test/core/end2end/fuzzers/client_fuzzer.c +++ b/test/core/end2end/fuzzers/client_fuzzer.c @@ -54,7 +54,6 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) { grpc_test_only_set_metadata_hash_seed(0); struct grpc_memory_counters counters; if (squelch) gpr_set_log_function(dont_log); - grpc_memory_counters_init(); if (leak_check) grpc_memory_counters_init(); grpc_init(); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; From fc25b5f2a8499c378f26c72f039b01faf52acd51 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 14 Jun 2016 09:50:15 -0700 Subject: [PATCH 1070/1894] Fix use-after-free --- src/core/lib/security/transport/handshake.c | 32 ++++++++++++++------- 1 file changed, 21 insertions(+), 11 deletions(-) diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c index ff338f8084b..b374ca7633b 100644 --- a/src/core/lib/security/transport/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -63,6 +63,7 @@ typedef struct { grpc_closure on_handshake_data_received_from_peer; grpc_auth_context *auth_context; grpc_timer timer; + gpr_refcount refs; } grpc_security_handshake; static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, @@ -99,6 +100,19 @@ static void security_connector_remove_handshake(grpc_security_handshake *h) { gpr_mu_unlock(&sc->mu); } +static void unref_handshake(grpc_security_handshake *h) { + if (gpr_unref(&h->refs)) { + if (h->handshaker != NULL) tsi_handshaker_destroy(h->handshaker); + if (h->handshake_buffer != NULL) gpr_free(h->handshake_buffer); + gpr_slice_buffer_destroy(&h->left_overs); + gpr_slice_buffer_destroy(&h->outgoing); + gpr_slice_buffer_destroy(&h->incoming); + GRPC_AUTH_CONTEXT_UNREF(h->auth_context, "handshake"); + GRPC_SECURITY_CONNECTOR_UNREF(h->connector, "handshake"); + gpr_free(h); + } +} + static void security_handshake_done(grpc_exec_ctx *exec_ctx, grpc_security_handshake *h, grpc_error *error) { @@ -122,14 +136,7 @@ static void security_handshake_done(grpc_exec_ctx *exec_ctx, } h->cb(exec_ctx, h->user_data, GRPC_SECURITY_ERROR, NULL, NULL); } - if (h->handshaker != NULL) tsi_handshaker_destroy(h->handshaker); - if (h->handshake_buffer != NULL) gpr_free(h->handshake_buffer); - gpr_slice_buffer_destroy(&h->left_overs); - gpr_slice_buffer_destroy(&h->outgoing); - gpr_slice_buffer_destroy(&h->incoming); - GRPC_AUTH_CONTEXT_UNREF(h->auth_context, "handshake"); - GRPC_SECURITY_CONNECTOR_UNREF(h->connector, "handshake"); - gpr_free(h); + unref_handshake(h); GRPC_ERROR_UNREF(error); } @@ -308,9 +315,11 @@ static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, } static void on_timeout(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { + grpc_security_handshake *h = arg; if (error == GRPC_ERROR_NONE) { - grpc_endpoint_shutdown(exec_ctx, arg); + grpc_endpoint_shutdown(exec_ctx, h->wrapped_endpoint); } + unref_handshake(h); } void grpc_do_security_handshake( @@ -329,6 +338,7 @@ void grpc_do_security_handshake( h->wrapped_endpoint = nonsecure_endpoint; h->user_data = user_data; h->cb = cb; + gpr_ref_init(&h->refs, 2); /* timer and handshake proper each get a ref */ grpc_closure_init(&h->on_handshake_data_sent_to_peer, on_handshake_data_sent_to_peer, h); grpc_closure_init(&h->on_handshake_data_received_from_peer, @@ -347,8 +357,8 @@ void grpc_do_security_handshake( gpr_mu_unlock(&server_connector->mu); } send_handshake_bytes_to_peer(exec_ctx, h); - grpc_timer_init(exec_ctx, &h->timer, deadline, on_timeout, - h->wrapped_endpoint, gpr_now(deadline.clock_type)); + grpc_timer_init(exec_ctx, &h->timer, deadline, on_timeout, h, + gpr_now(deadline.clock_type)); } void grpc_security_handshake_shutdown(grpc_exec_ctx *exec_ctx, From 6668d51b3c6544ab988a503977e0e80475ac5d3e Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Wed, 18 May 2016 14:05:09 -0700 Subject: [PATCH 1071/1894] php: add call getTrailingMetadata API --- src/php/lib/Grpc/AbstractCall.php | 10 ++++++++++ src/php/lib/Grpc/BidiStreamingCall.php | 1 + src/php/lib/Grpc/ClientStreamingCall.php | 4 +++- src/php/lib/Grpc/ServerStreamingCall.php | 1 + src/php/lib/Grpc/UnaryCall.php | 4 +++- 5 files changed, 18 insertions(+), 2 deletions(-) diff --git a/src/php/lib/Grpc/AbstractCall.php b/src/php/lib/Grpc/AbstractCall.php index 712af91eb28..c86d2988055 100644 --- a/src/php/lib/Grpc/AbstractCall.php +++ b/src/php/lib/Grpc/AbstractCall.php @@ -39,6 +39,7 @@ abstract class AbstractCall protected $call; protected $deserialize; protected $metadata; + protected $trailing_metadata; /** * Create a new Call wrapper object. @@ -66,6 +67,7 @@ abstract class AbstractCall $this->call = new Call($channel, $method, $deadline); $this->deserialize = $deserialize; $this->metadata = null; + $this->trailing_metadata = null; if (isset($options['call_credentials_callback']) && is_callable($call_credentials_callback = $options['call_credentials_callback'])) { @@ -83,6 +85,14 @@ abstract class AbstractCall return $this->metadata; } + /** + * @return The trailing metadata sent by the server. + */ + public function getTrailingMetadata() + { + return $this->trailing_metadata; + } + /** * @return string The URI of the endpoint. */ diff --git a/src/php/lib/Grpc/BidiStreamingCall.php b/src/php/lib/Grpc/BidiStreamingCall.php index bf813c12e76..95e51c5088d 100644 --- a/src/php/lib/Grpc/BidiStreamingCall.php +++ b/src/php/lib/Grpc/BidiStreamingCall.php @@ -112,6 +112,7 @@ class BidiStreamingCall extends AbstractCall OP_RECV_STATUS_ON_CLIENT => true, ]); + $this->trailing_metadata = $status_event->status->metadata; return $status_event->status; } } diff --git a/src/php/lib/Grpc/ClientStreamingCall.php b/src/php/lib/Grpc/ClientStreamingCall.php index 500cfe0d7a0..315a406735f 100644 --- a/src/php/lib/Grpc/ClientStreamingCall.php +++ b/src/php/lib/Grpc/ClientStreamingCall.php @@ -86,6 +86,8 @@ class ClientStreamingCall extends AbstractCall ]); $this->metadata = $event->metadata; - return [$this->deserializeResponse($event->message), $event->status]; + $status = $event->status; + $this->trailing_metadata = $status->metadata; + return [$this->deserializeResponse($event->message), $status]; } } diff --git a/src/php/lib/Grpc/ServerStreamingCall.php b/src/php/lib/Grpc/ServerStreamingCall.php index da48523717e..53599fe4ae8 100644 --- a/src/php/lib/Grpc/ServerStreamingCall.php +++ b/src/php/lib/Grpc/ServerStreamingCall.php @@ -91,6 +91,7 @@ class ServerStreamingCall extends AbstractCall OP_RECV_STATUS_ON_CLIENT => true, ]); + $this->trailing_metadata = $status_event->status->metadata; return $status_event->status; } } diff --git a/src/php/lib/Grpc/UnaryCall.php b/src/php/lib/Grpc/UnaryCall.php index b57903d6d07..b114b771b84 100644 --- a/src/php/lib/Grpc/UnaryCall.php +++ b/src/php/lib/Grpc/UnaryCall.php @@ -75,6 +75,8 @@ class UnaryCall extends AbstractCall OP_RECV_STATUS_ON_CLIENT => true, ]); - return [$this->deserializeResponse($event->message), $event->status]; + $status = $event->status; + $this->trailing_metadata = $status->metadata; + return [$this->deserializeResponse($event->message), $status]; } } From 1e44766bfc3975af2f223a2e2442ba5794f86bc9 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Tue, 14 Jun 2016 19:09:49 +0000 Subject: [PATCH 1072/1894] Drop unnecessary future division import We only ever use floor division (//) in the module. --- src/python/grpcio/tests/unit/_rpc_test.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/python/grpcio/tests/unit/_rpc_test.py b/src/python/grpcio/tests/unit/_rpc_test.py index b33bff490c7..886ed87f251 100644 --- a/src/python/grpcio/tests/unit/_rpc_test.py +++ b/src/python/grpcio/tests/unit/_rpc_test.py @@ -29,8 +29,6 @@ """Test of gRPC Python's application-layer API.""" -from __future__ import division - import itertools import threading import unittest From ec4359ddc1b905b12784babfcb4cebb3a1e67478 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 11 Apr 2016 20:55:44 -0700 Subject: [PATCH 1073/1894] add support for CoreCLR --- src/csharp/.gitignore | 2 + src/csharp/Grpc.Auth/Grpc.Auth.xproj | 19 ++++ src/csharp/Grpc.Auth/project.json | 35 +++++++ .../Grpc.Core.Tests/Grpc.Core.Tests.xproj | 19 ++++ .../Grpc.Core.Tests/NUnitVersionTest.cs | 2 +- src/csharp/Grpc.Core.Tests/SanityTest.cs | 2 + src/csharp/Grpc.Core.Tests/project.json | 28 ++++++ src/csharp/Grpc.Core/Grpc.Core.csproj | 2 +- src/csharp/Grpc.Core/Grpc.Core.nuspec | 12 +-- src/csharp/Grpc.Core/Grpc.Core.xproj | 19 ++++ .../Internal/DefaultSslRootsOverride.cs | 2 +- .../Grpc.Core/Internal/NativeExtension.cs | 2 +- src/csharp/Grpc.Core/Internal/PlatformApis.cs | 2 +- .../Internal/SafeHandleZeroIsInvalid.cs | 2 +- src/csharp/Grpc.Core/project.json | 56 +++++++++++ src/csharp/Grpc.Dnx.sln | 94 +++++++++++++++++++ .../Grpc.Examples.MathClient.xproj | 19 ++++ .../Grpc.Examples.MathClient/project.json | 26 +++++ .../Grpc.Examples.MathServer.xproj | 19 ++++ .../Grpc.Examples.MathServer/project.json | 26 +++++ .../Grpc.Examples.Tests.xproj | 19 ++++ .../MathClientServerTests.cs | 8 +- src/csharp/Grpc.Examples.Tests/project.json | 28 ++++++ src/csharp/Grpc.Examples/Grpc.Examples.xproj | 19 ++++ src/csharp/Grpc.Examples/project.json | 24 +++++ .../Grpc.HealthCheck.Tests.xproj | 19 ++++ .../Grpc.HealthCheck.Tests/project.json | 28 ++++++ .../Grpc.HealthCheck/Grpc.HealthCheck.xproj | 19 ++++ src/csharp/Grpc.HealthCheck/project.json | 32 +++++++ .../Grpc.IntegrationTesting.Client.xproj | 19 ++++ .../project.json | 15 +++ .../Grpc.IntegrationTesting.QpsWorker.xproj | 19 ++++ .../project.json | 15 +++ .../Grpc.IntegrationTesting.Server.xproj | 19 ++++ .../project.json | 15 +++ .../Grpc.IntegrationTesting.xproj | 19 ++++ .../Grpc.IntegrationTesting/project.json | 21 +++++ src/csharp/build_packages.bat | 12 +-- .../grpc.native.csharp.nuspec | 27 ------ .../src/csharp/build_packages.bat.template | 12 +-- 40 files changed, 722 insertions(+), 55 deletions(-) create mode 100644 src/csharp/Grpc.Auth/Grpc.Auth.xproj create mode 100644 src/csharp/Grpc.Auth/project.json create mode 100644 src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.xproj create mode 100644 src/csharp/Grpc.Core.Tests/project.json create mode 100644 src/csharp/Grpc.Core/Grpc.Core.xproj create mode 100644 src/csharp/Grpc.Core/project.json create mode 100644 src/csharp/Grpc.Dnx.sln create mode 100644 src/csharp/Grpc.Examples.MathClient/Grpc.Examples.MathClient.xproj create mode 100644 src/csharp/Grpc.Examples.MathClient/project.json create mode 100644 src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.xproj create mode 100644 src/csharp/Grpc.Examples.MathServer/project.json create mode 100644 src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.xproj create mode 100644 src/csharp/Grpc.Examples.Tests/project.json create mode 100644 src/csharp/Grpc.Examples/Grpc.Examples.xproj create mode 100644 src/csharp/Grpc.Examples/project.json create mode 100644 src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.xproj create mode 100644 src/csharp/Grpc.HealthCheck.Tests/project.json create mode 100644 src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.xproj create mode 100644 src/csharp/Grpc.HealthCheck/project.json create mode 100644 src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.xproj create mode 100644 src/csharp/Grpc.IntegrationTesting.Client/project.json create mode 100644 src/csharp/Grpc.IntegrationTesting.QpsWorker/Grpc.IntegrationTesting.QpsWorker.xproj create mode 100644 src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json create mode 100644 src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.xproj create mode 100644 src/csharp/Grpc.IntegrationTesting.Server/project.json create mode 100644 src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.xproj create mode 100644 src/csharp/Grpc.IntegrationTesting/project.json delete mode 100644 src/csharp/grpc.native.csharp/grpc.native.csharp.nuspec diff --git a/src/csharp/.gitignore b/src/csharp/.gitignore index 0f96a482219..fc2875a1dd5 100644 --- a/src/csharp/.gitignore +++ b/src/csharp/.gitignore @@ -1,5 +1,7 @@ +*.xproj.user *.userprefs *.csproj.user +*.lock.json StyleCop.Cache test-results packages diff --git a/src/csharp/Grpc.Auth/Grpc.Auth.xproj b/src/csharp/Grpc.Auth/Grpc.Auth.xproj new file mode 100644 index 00000000000..c3a6fa2947b --- /dev/null +++ b/src/csharp/Grpc.Auth/Grpc.Auth.xproj @@ -0,0 +1,19 @@ + + + + 14.0.25123 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + c82631ed-06d1-4458-87bc-8257d12307a8 + Grpc.Auth + ..\Grpc.Core\artifacts\obj\$(MSBuildProjectName) + ..\Grpc.Core\artifacts\bin\$(MSBuildProjectName)\ + + + + 2.0 + + + \ No newline at end of file diff --git a/src/csharp/Grpc.Auth/project.json b/src/csharp/Grpc.Auth/project.json new file mode 100644 index 00000000000..513325f7491 --- /dev/null +++ b/src/csharp/Grpc.Auth/project.json @@ -0,0 +1,35 @@ +{ + "version": "0.14.0-anexperiment", + + "title": "gRPC C# Auth", + "summary": "Auth library for C# implementation of gRPC - an RPC library and framework", + "description": "Auth library for C# implementation of gRPC - an RPC library and framework. See project site for more info.", + "authors": ["Google Inc."], + "owners": ["grpc-packages"], + "licenseUrl": "https://github.com/grpc/grpc/blob/master/LICENSE", + "projectUrl": "https://github.com/grpc/grpc", + "requireLicenseAcceptance": false, + "copyright": "Copyright 2015, Google Inc.", + "tags": ["gRPC RPC Protocol HTTP/2 Auth OAuth2"], + + "compile": "**/*.cs", + "resourceFiles": ["../../../etc/roots.pem"], + + "dependencies": { + "Grpc.Core": "0.14.0-anexperiment", + "Google.Apis.Auth": "1.11.1" + }, + "frameworks": { + "net45": { }, + "dotnet54": { + "imports": [ + "net45" + ], + "dependencies": { + "Microsoft.CSharp": "4.0.1-beta-23516", + "Microsoft.NETCore.Portable.Compatibility": "1.0.1-beta-23516", + "System.Threading.Tasks": "4.0.11-beta-23516" + } + } + } +} diff --git a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.xproj b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.xproj new file mode 100644 index 00000000000..e6595118fb1 --- /dev/null +++ b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.xproj @@ -0,0 +1,19 @@ + + + + 14.0.25123 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + 759e23b2-fc04-4695-902d-b073cded3599 + Grpc.Core.Tests + ..\artifacts\obj\$(MSBuildProjectName) + ..\artifacts\bin\$(MSBuildProjectName)\ + + + + 2.0 + + + \ No newline at end of file diff --git a/src/csharp/Grpc.Core.Tests/NUnitVersionTest.cs b/src/csharp/Grpc.Core.Tests/NUnitVersionTest.cs index 3fa6ad09c02..1a9e441611d 100644 --- a/src/csharp/Grpc.Core.Tests/NUnitVersionTest.cs +++ b/src/csharp/Grpc.Core.Tests/NUnitVersionTest.cs @@ -56,7 +56,7 @@ namespace Grpc.Core.Tests Console.Error.WriteLine("You are using and old version of NUnit that doesn't support async tests and skips them instead. " + "This test has failed to indicate that."); Console.Error.Flush(); - Environment.Exit(1); + throw new Exception("NUnitVersionTest has failed."); } } diff --git a/src/csharp/Grpc.Core.Tests/SanityTest.cs b/src/csharp/Grpc.Core.Tests/SanityTest.cs index 3830f0cbacf..9e995d40c03 100644 --- a/src/csharp/Grpc.Core.Tests/SanityTest.cs +++ b/src/csharp/Grpc.Core.Tests/SanityTest.cs @@ -45,6 +45,7 @@ namespace Grpc.Core.Tests { public class SanityTest { +#if !DOTNET5_4 /// /// Because we depend on a native library, sometimes when things go wrong, the /// entire NUnit test process crashes. To be able to track down problems better, @@ -121,5 +122,6 @@ namespace Grpc.Core.Tests } return result; } +#endif } } diff --git a/src/csharp/Grpc.Core.Tests/project.json b/src/csharp/Grpc.Core.Tests/project.json new file mode 100644 index 00000000000..0c5d9354358 --- /dev/null +++ b/src/csharp/Grpc.Core.Tests/project.json @@ -0,0 +1,28 @@ +{ + "compile": "**/*.cs", + "compilationOptions": { + "emitEntryPoint": true + }, + + "content": "../nativelibs/**", + + "dependencies": { + "Grpc.Core": "0.14.0-anexperiment", + "NUnit": "3.2.0", + "NUnitLite": "3.2.0-*" + }, + "frameworks": { + "net45": { }, + "dotnet54": { + "imports": [ + "portable-net45" + ], + "dependencies": { + "Microsoft.NETCore.App": { + "type": "platform", + "version": "1.0.0-rc2-23931" + } + } + } + } +} diff --git a/src/csharp/Grpc.Core/Grpc.Core.csproj b/src/csharp/Grpc.Core/Grpc.Core.csproj index a796911b99f..e460f004473 100644 --- a/src/csharp/Grpc.Core/Grpc.Core.csproj +++ b/src/csharp/Grpc.Core/Grpc.Core.csproj @@ -148,7 +148,7 @@ - Resources\roots.pem + roots.pem \ No newline at end of file diff --git a/src/csharp/Grpc.Core/Grpc.Core.nuspec b/src/csharp/Grpc.Core/Grpc.Core.nuspec index 0ada0049c2a..fa2c1fbff22 100644 --- a/src/csharp/Grpc.Core/Grpc.Core.nuspec +++ b/src/csharp/Grpc.Core/Grpc.Core.nuspec @@ -24,11 +24,11 @@ - - - - - - + + + + + + diff --git a/src/csharp/Grpc.Core/Grpc.Core.xproj b/src/csharp/Grpc.Core/Grpc.Core.xproj new file mode 100644 index 00000000000..f5d1bf2eef5 --- /dev/null +++ b/src/csharp/Grpc.Core/Grpc.Core.xproj @@ -0,0 +1,19 @@ + + + + 14.0 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + dc9908b6-f291-4fc8-a46d-2ea2551790ec + Grpc.Core + ..\artifacts\obj\$(MSBuildProjectName) + ..\artifacts\bin\$(MSBuildProjectName)\ + + + + 2.0 + + + \ No newline at end of file diff --git a/src/csharp/Grpc.Core/Internal/DefaultSslRootsOverride.cs b/src/csharp/Grpc.Core/Internal/DefaultSslRootsOverride.cs index aa4dafd7f2a..2a96e9920c0 100644 --- a/src/csharp/Grpc.Core/Internal/DefaultSslRootsOverride.cs +++ b/src/csharp/Grpc.Core/Internal/DefaultSslRootsOverride.cs @@ -46,7 +46,7 @@ namespace Grpc.Core.Internal /// internal static class DefaultSslRootsOverride { - const string RootsPemResourceName = "Grpc.Core.Resources.roots.pem"; + const string RootsPemResourceName = "Grpc.Core.roots.pem"; static object staticLock = new object(); /// diff --git a/src/csharp/Grpc.Core/Internal/NativeExtension.cs b/src/csharp/Grpc.Core/Internal/NativeExtension.cs index b45ba19c24d..6c219621df5 100644 --- a/src/csharp/Grpc.Core/Internal/NativeExtension.cs +++ b/src/csharp/Grpc.Core/Internal/NativeExtension.cs @@ -118,7 +118,7 @@ namespace Grpc.Core.Internal { var assembly = typeof(NativeExtension).GetTypeInfo().Assembly; #if DOTNET5_4 - // Assembly.EscapedCodeBase does not exit under CoreCLR, but assemblies imported from a nuget package + // Assembly.EscapedCodeBase does not exist under CoreCLR, but assemblies imported from a nuget package // don't seem to be shadowed by DNX-based projects at all. return assembly.Location; #else diff --git a/src/csharp/Grpc.Core/Internal/PlatformApis.cs b/src/csharp/Grpc.Core/Internal/PlatformApis.cs index 5d8c44b589e..3331a1f9fac 100644 --- a/src/csharp/Grpc.Core/Internal/PlatformApis.cs +++ b/src/csharp/Grpc.Core/Internal/PlatformApis.cs @@ -53,7 +53,7 @@ namespace Grpc.Core.Internal static PlatformApis() { -#if DNXCORE50 +#if DOTNET5_4 isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux); isMacOSX = RuntimeInformation.IsOSPlatform(OSPlatform.OSX); isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); diff --git a/src/csharp/Grpc.Core/Internal/SafeHandleZeroIsInvalid.cs b/src/csharp/Grpc.Core/Internal/SafeHandleZeroIsInvalid.cs index 702aea2883a..230faacff63 100644 --- a/src/csharp/Grpc.Core/Internal/SafeHandleZeroIsInvalid.cs +++ b/src/csharp/Grpc.Core/Internal/SafeHandleZeroIsInvalid.cs @@ -39,7 +39,7 @@ namespace Grpc.Core.Internal /// /// Safe handle to wrap native objects. /// - internal abstract class SafeHandleZeroIsInvalid : SafeHandle + internal abstract class SafeHandleZeroIsInvalid : System.Runtime.InteropServices.SafeHandle { public SafeHandleZeroIsInvalid() : base(IntPtr.Zero, true) { diff --git a/src/csharp/Grpc.Core/project.json b/src/csharp/Grpc.Core/project.json new file mode 100644 index 00000000000..8aece57856c --- /dev/null +++ b/src/csharp/Grpc.Core/project.json @@ -0,0 +1,56 @@ +{ + "version": "0.14.0-anexperiment", + + "title": "gRPC C# Core", + "summary": "Core C# implementation of gRPC - an RPC library and framework", + "description": "Core C# implementation of gRPC - an RPC library and framework. See project site for more info.", + "authors": [ "Google Inc." ], + "owners": [ "grpc-packages" ], + "licenseUrl": "https://github.com/grpc/grpc/blob/master/LICENSE", + "projectUrl": "https://github.com/grpc/grpc", + "requireLicenseAcceptance": false, + "copyright": "Copyright 2015, Google Inc.", + "tags": [ "gRPC RPC Protocol HTTP/2" ], + + "compile": "**/*.cs", + "resourceFiles": [ "../../../etc/roots.pem" ], + + "content": "../nativelibs/**", + + "packInclude": { + "build/net45/": "Grpc.Core.targets", + "build/native/bin/windows_x86/": "../nativelibs/windows_x86/grpc_csharp_ext.dll", + "build/native/bin/windows_x64/": "../nativelibs/windows_x64/grpc_csharp_ext.dll", + "build/native/bin/linux_x86/": "../nativelibs/linux_x86/libgrpc_csharp_ext.so", + "build/native/bin/linux_x64/": "../nativelibs/linux_x64/libgrpc_csharp_ext.so", + "build/native/bin/macosx_x86/": "../nativelibs/macosx_x86/libgrpc_csharp_ext.dylib", + "build/native/bin/macosx_x64/": "../nativelibs/macosx_x64/libgrpc_csharp_ext.dylib" + }, + + "dependencies": { + "Ix-Async": "1.2.5" + }, + "frameworks": { + "net45": { }, + "dotnet54": { + "imports": [ + "portable-net45" + ], + "dependencies": { + "Microsoft.CSharp": "4.0.1-beta-23516", + "System.Collections": "4.0.11-beta-23516", + "System.Collections.Concurrent": "4.0.11-beta-23516", + "System.Console": "4.0.0-beta-23516", + "System.Linq": "4.0.1-beta-23516", + "System.Threading": "4.0.11-beta-23516", + "System.Threading.Thread": "4.0.0-beta-23516", + "System.Reflection": "4.1.0-beta-23516", + "System.Text.Encoding": "4.0.11-beta-23516", + "System.Text.RegularExpressions": "4.0.11-beta-23516", + "System.IO": "4.0.11-beta-23516", + "System.IO.FileSystem": "4.0.1-beta-23516", + "System.Runtime.InteropServices.RuntimeInformation": "4.0.0-beta-23516" + } + } + } +} diff --git a/src/csharp/Grpc.Dnx.sln b/src/csharp/Grpc.Dnx.sln new file mode 100644 index 00000000000..6a7e2e27482 --- /dev/null +++ b/src/csharp/Grpc.Dnx.sln @@ -0,0 +1,94 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 14 +VisualStudioVersion = 14.0.25123.0 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Grpc.Core", "Grpc.Core\Grpc.Core.xproj", "{DC9908B6-F291-4FC8-A46D-2EA2551790EC}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Grpc.Auth", "Grpc.Auth\Grpc.Auth.xproj", "{C82631ED-06D1-4458-87BC-8257D12307A8}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Grpc.Core.Tests", "Grpc.Core.Tests\Grpc.Core.Tests.xproj", "{759E23B2-FC04-4695-902D-B073CDED3599}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Grpc.Examples", "Grpc.Examples\Grpc.Examples.xproj", "{C77B792D-FC78-4CE2-9522-B40B0803C636}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Grpc.Examples.MathClient", "Grpc.Examples.MathClient\Grpc.Examples.MathClient.xproj", "{FD48DECA-1622-4173-B1D9-2101CF5E7C5F}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Grpc.Examples.MathServer", "Grpc.Examples.MathServer\Grpc.Examples.MathServer.xproj", "{58579368-5372-4E67-ACD6-9B59CB9FA698}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Grpc.Examples.Tests", "Grpc.Examples.Tests\Grpc.Examples.Tests.xproj", "{C61714A6-F633-44FB-97F4-C91F425C1D15}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Grpc.HealthCheck", "Grpc.HealthCheck\Grpc.HealthCheck.xproj", "{3BE4AD0B-2BF0-4D68-B625-F6018EF0DCFA}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Grpc.HealthCheck.Tests", "Grpc.HealthCheck.Tests\Grpc.HealthCheck.Tests.xproj", "{43DAFAC6-5343-4621-960E-A8A977EA3F0B}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Grpc.IntegrationTesting", "Grpc.IntegrationTesting\Grpc.IntegrationTesting.xproj", "{20354386-3E71-4046-A269-3BC2A06F3EC8}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Grpc.IntegrationTesting.Client", "Grpc.IntegrationTesting.Client\Grpc.IntegrationTesting.Client.xproj", "{48EA5BBE-70E2-4198-869D-D7E59C45F30D}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Grpc.IntegrationTesting.QpsWorker", "Grpc.IntegrationTesting.QpsWorker\Grpc.IntegrationTesting.QpsWorker.xproj", "{661B70D7-F56A-46E0-9B81-6227B591B5E7}" +EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Grpc.IntegrationTesting.Server", "Grpc.IntegrationTesting.Server\Grpc.IntegrationTesting.Server.xproj", "{881F7AD1-A84E-47A2-9402-115C63C4031E}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {DC9908B6-F291-4FC8-A46D-2EA2551790EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {DC9908B6-F291-4FC8-A46D-2EA2551790EC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {DC9908B6-F291-4FC8-A46D-2EA2551790EC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {DC9908B6-F291-4FC8-A46D-2EA2551790EC}.Release|Any CPU.Build.0 = Release|Any CPU + {C82631ED-06D1-4458-87BC-8257D12307A8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C82631ED-06D1-4458-87BC-8257D12307A8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C82631ED-06D1-4458-87BC-8257D12307A8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C82631ED-06D1-4458-87BC-8257D12307A8}.Release|Any CPU.Build.0 = Release|Any CPU + {759E23B2-FC04-4695-902D-B073CDED3599}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {759E23B2-FC04-4695-902D-B073CDED3599}.Debug|Any CPU.Build.0 = Debug|Any CPU + {759E23B2-FC04-4695-902D-B073CDED3599}.Release|Any CPU.ActiveCfg = Release|Any CPU + {759E23B2-FC04-4695-902D-B073CDED3599}.Release|Any CPU.Build.0 = Release|Any CPU + {C77B792D-FC78-4CE2-9522-B40B0803C636}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C77B792D-FC78-4CE2-9522-B40B0803C636}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C77B792D-FC78-4CE2-9522-B40B0803C636}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C77B792D-FC78-4CE2-9522-B40B0803C636}.Release|Any CPU.Build.0 = Release|Any CPU + {FD48DECA-1622-4173-B1D9-2101CF5E7C5F}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {FD48DECA-1622-4173-B1D9-2101CF5E7C5F}.Debug|Any CPU.Build.0 = Debug|Any CPU + {FD48DECA-1622-4173-B1D9-2101CF5E7C5F}.Release|Any CPU.ActiveCfg = Release|Any CPU + {FD48DECA-1622-4173-B1D9-2101CF5E7C5F}.Release|Any CPU.Build.0 = Release|Any CPU + {58579368-5372-4E67-ACD6-9B59CB9FA698}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {58579368-5372-4E67-ACD6-9B59CB9FA698}.Debug|Any CPU.Build.0 = Debug|Any CPU + {58579368-5372-4E67-ACD6-9B59CB9FA698}.Release|Any CPU.ActiveCfg = Release|Any CPU + {58579368-5372-4E67-ACD6-9B59CB9FA698}.Release|Any CPU.Build.0 = Release|Any CPU + {C61714A6-F633-44FB-97F4-C91F425C1D15}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {C61714A6-F633-44FB-97F4-C91F425C1D15}.Debug|Any CPU.Build.0 = Debug|Any CPU + {C61714A6-F633-44FB-97F4-C91F425C1D15}.Release|Any CPU.ActiveCfg = Release|Any CPU + {C61714A6-F633-44FB-97F4-C91F425C1D15}.Release|Any CPU.Build.0 = Release|Any CPU + {3BE4AD0B-2BF0-4D68-B625-F6018EF0DCFA}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {3BE4AD0B-2BF0-4D68-B625-F6018EF0DCFA}.Debug|Any CPU.Build.0 = Debug|Any CPU + {3BE4AD0B-2BF0-4D68-B625-F6018EF0DCFA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {3BE4AD0B-2BF0-4D68-B625-F6018EF0DCFA}.Release|Any CPU.Build.0 = Release|Any CPU + {43DAFAC6-5343-4621-960E-A8A977EA3F0B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {43DAFAC6-5343-4621-960E-A8A977EA3F0B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {43DAFAC6-5343-4621-960E-A8A977EA3F0B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {43DAFAC6-5343-4621-960E-A8A977EA3F0B}.Release|Any CPU.Build.0 = Release|Any CPU + {20354386-3E71-4046-A269-3BC2A06F3EC8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {20354386-3E71-4046-A269-3BC2A06F3EC8}.Debug|Any CPU.Build.0 = Debug|Any CPU + {20354386-3E71-4046-A269-3BC2A06F3EC8}.Release|Any CPU.ActiveCfg = Release|Any CPU + {20354386-3E71-4046-A269-3BC2A06F3EC8}.Release|Any CPU.Build.0 = Release|Any CPU + {48EA5BBE-70E2-4198-869D-D7E59C45F30D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {48EA5BBE-70E2-4198-869D-D7E59C45F30D}.Debug|Any CPU.Build.0 = Debug|Any CPU + {48EA5BBE-70E2-4198-869D-D7E59C45F30D}.Release|Any CPU.ActiveCfg = Release|Any CPU + {48EA5BBE-70E2-4198-869D-D7E59C45F30D}.Release|Any CPU.Build.0 = Release|Any CPU + {661B70D7-F56A-46E0-9B81-6227B591B5E7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {661B70D7-F56A-46E0-9B81-6227B591B5E7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {661B70D7-F56A-46E0-9B81-6227B591B5E7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {661B70D7-F56A-46E0-9B81-6227B591B5E7}.Release|Any CPU.Build.0 = Release|Any CPU + {881F7AD1-A84E-47A2-9402-115C63C4031E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {881F7AD1-A84E-47A2-9402-115C63C4031E}.Debug|Any CPU.Build.0 = Debug|Any CPU + {881F7AD1-A84E-47A2-9402-115C63C4031E}.Release|Any CPU.ActiveCfg = Release|Any CPU + {881F7AD1-A84E-47A2-9402-115C63C4031E}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/src/csharp/Grpc.Examples.MathClient/Grpc.Examples.MathClient.xproj b/src/csharp/Grpc.Examples.MathClient/Grpc.Examples.MathClient.xproj new file mode 100644 index 00000000000..a8dc195a6dc --- /dev/null +++ b/src/csharp/Grpc.Examples.MathClient/Grpc.Examples.MathClient.xproj @@ -0,0 +1,19 @@ + + + + 14.0.25123 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + fd48deca-1622-4173-b1d9-2101cf5e7c5f + Grpc.Examples.MathClient + ..\artifacts\obj\$(MSBuildProjectName) + ..\artifacts\bin\$(MSBuildProjectName)\ + + + + 2.0 + + + \ No newline at end of file diff --git a/src/csharp/Grpc.Examples.MathClient/project.json b/src/csharp/Grpc.Examples.MathClient/project.json new file mode 100644 index 00000000000..67af09721ce --- /dev/null +++ b/src/csharp/Grpc.Examples.MathClient/project.json @@ -0,0 +1,26 @@ +{ + "compile": "**/*.cs", + "compilationOptions": { + "emitEntryPoint": true + }, + + "content": "../nativelibs/**", + + "dependencies": { + "Grpc.Examples": "1.0.0" + }, + "frameworks": { + "net45": { }, + "dotnet54": { + "imports": [ + "portable-net45" + ], + "dependencies": { + "Microsoft.NETCore.App": { + "type": "platform", + "version": "1.0.0-rc2-23931" + } + } + } + } +} diff --git a/src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.xproj b/src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.xproj new file mode 100644 index 00000000000..40746f1f946 --- /dev/null +++ b/src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.xproj @@ -0,0 +1,19 @@ + + + + 14.0.25123 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + 58579368-5372-4e67-acd6-9b59cb9fa698 + Grpc.Examples.MathServer + ..\artifacts\obj\$(MSBuildProjectName) + ..\artifacts\bin\$(MSBuildProjectName)\ + + + + 2.0 + + + \ No newline at end of file diff --git a/src/csharp/Grpc.Examples.MathServer/project.json b/src/csharp/Grpc.Examples.MathServer/project.json new file mode 100644 index 00000000000..67af09721ce --- /dev/null +++ b/src/csharp/Grpc.Examples.MathServer/project.json @@ -0,0 +1,26 @@ +{ + "compile": "**/*.cs", + "compilationOptions": { + "emitEntryPoint": true + }, + + "content": "../nativelibs/**", + + "dependencies": { + "Grpc.Examples": "1.0.0" + }, + "frameworks": { + "net45": { }, + "dotnet54": { + "imports": [ + "portable-net45" + ], + "dependencies": { + "Microsoft.NETCore.App": { + "type": "platform", + "version": "1.0.0-rc2-23931" + } + } + } + } +} diff --git a/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.xproj b/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.xproj new file mode 100644 index 00000000000..c744816a811 --- /dev/null +++ b/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.xproj @@ -0,0 +1,19 @@ + + + + 14.0.25123 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + c61714a6-f633-44fb-97f4-c91f425c1d15 + Grpc.Examples.Tests + ..\artifacts\obj\$(MSBuildProjectName) + ..\artifacts\bin\$(MSBuildProjectName)\ + + + + 2.0 + + + \ No newline at end of file diff --git a/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs b/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs index ee11105efe7..324c209ca1d 100644 --- a/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs +++ b/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs @@ -110,7 +110,7 @@ namespace Math.Tests { var responses = await call.ResponseStream.ToListAsync(); CollectionAssert.AreEqual(new List { 1, 1, 2, 3, 5, 8 }, - responses.ConvertAll((n) => n.Num_)); + responses.Select((n) => n.Num_)); } } @@ -162,7 +162,7 @@ namespace Math.Tests { using (var call = client.Sum()) { - var numbers = new List { 10, 20, 30 }.ConvertAll(n => new Num { Num_ = n }); + var numbers = new List { 10, 20, 30 }.Select(n => new Num { Num_ = n }); await call.RequestStream.WriteAllAsync(numbers); var result = await call.ResponseAsync; @@ -185,8 +185,8 @@ namespace Math.Tests await call.RequestStream.WriteAllAsync(divArgsList); var result = await call.ResponseStream.ToListAsync(); - CollectionAssert.AreEqual(new long[] { 3, 4, 3 }, result.ConvertAll((divReply) => divReply.Quotient)); - CollectionAssert.AreEqual(new long[] { 1, 16, 1 }, result.ConvertAll((divReply) => divReply.Remainder)); + CollectionAssert.AreEqual(new long[] { 3, 4, 3 }, result.Select((divReply) => divReply.Quotient)); + CollectionAssert.AreEqual(new long[] { 1, 16, 1 }, result.Select((divReply) => divReply.Remainder)); } } } diff --git a/src/csharp/Grpc.Examples.Tests/project.json b/src/csharp/Grpc.Examples.Tests/project.json new file mode 100644 index 00000000000..e61aa65abfc --- /dev/null +++ b/src/csharp/Grpc.Examples.Tests/project.json @@ -0,0 +1,28 @@ +{ + "compile": "**/*.cs", + "compilationOptions": { + "emitEntryPoint": true + }, + + "content": "../nativelibs/**", + + "dependencies": { + "Grpc.Examples": "1.0.0", + "NUnit": "3.2.0", + "NUnitLite": "3.2.0-*" + }, + "frameworks": { + "net45": { }, + "dotnet54": { + "imports": [ + "portable-net45" + ], + "dependencies": { + "Microsoft.NETCore.App": { + "type": "platform", + "version": "1.0.0-rc2-23931" + } + } + } + } +} diff --git a/src/csharp/Grpc.Examples/Grpc.Examples.xproj b/src/csharp/Grpc.Examples/Grpc.Examples.xproj new file mode 100644 index 00000000000..aa3ad680fd8 --- /dev/null +++ b/src/csharp/Grpc.Examples/Grpc.Examples.xproj @@ -0,0 +1,19 @@ + + + + 14.0.25123 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + c77b792d-fc78-4ce2-9522-b40b0803c636 + Grpc.Examples + ..\artifacts\obj\$(MSBuildProjectName) + ..\artifacts\bin\$(MSBuildProjectName)\ + + + + 2.0 + + + \ No newline at end of file diff --git a/src/csharp/Grpc.Examples/project.json b/src/csharp/Grpc.Examples/project.json new file mode 100644 index 00000000000..c78de89cf89 --- /dev/null +++ b/src/csharp/Grpc.Examples/project.json @@ -0,0 +1,24 @@ +{ + "compile": "**/*.cs", + + "content": "../nativelibs/**", + + "dependencies": { + "Grpc.Core": "0.0.1", + "Google.Protobuf": "3.0.0-beta2" + }, + "frameworks": { + "net45": { }, + "dotnet54": { + "imports": [ + "portable-net45" + ], + "dependencies": { + "Microsoft.NETCore.App": { + "type": "platform", + "version": "1.0.0-rc2-23931" + } + } + } + } +} diff --git a/src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.xproj b/src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.xproj new file mode 100644 index 00000000000..db05ccf7a4f --- /dev/null +++ b/src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.xproj @@ -0,0 +1,19 @@ + + + + 14.0.25123 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + 43dafac6-5343-4621-960e-a8a977ea3f0b + Grpc.HealthCheck.Tests + ..\artifacts\obj\$(MSBuildProjectName) + ..\artifacts\bin\$(MSBuildProjectName)\ + + + + 2.0 + + + \ No newline at end of file diff --git a/src/csharp/Grpc.HealthCheck.Tests/project.json b/src/csharp/Grpc.HealthCheck.Tests/project.json new file mode 100644 index 00000000000..5ecb17c9671 --- /dev/null +++ b/src/csharp/Grpc.HealthCheck.Tests/project.json @@ -0,0 +1,28 @@ +{ + "compile": "**/*.cs", + "compilationOptions": { + "emitEntryPoint": true + }, + + "content": "../nativelibs/**", + + "dependencies": { + "Grpc.HealthCheck": "1.0.0", + "NUnit": "3.2.0", + "NUnitLite": "3.2.0-*" + }, + "frameworks": { + "net45": { }, + "dotnet54": { + "imports": [ + "portable-net45" + ], + "dependencies": { + "Microsoft.NETCore.App": { + "type": "platform", + "version": "1.0.0-rc2-23931" + } + } + } + } +} diff --git a/src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.xproj b/src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.xproj new file mode 100644 index 00000000000..18701779d19 --- /dev/null +++ b/src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.xproj @@ -0,0 +1,19 @@ + + + + 14.0.25123 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + 3be4ad0b-2bf0-4d68-b625-f6018ef0dcfa + Grpc.HealthCheck + ..\artifacts\obj\$(MSBuildProjectName) + ..\artifacts\bin\$(MSBuildProjectName)\ + + + + 2.0 + + + \ No newline at end of file diff --git a/src/csharp/Grpc.HealthCheck/project.json b/src/csharp/Grpc.HealthCheck/project.json new file mode 100644 index 00000000000..0984d43deca --- /dev/null +++ b/src/csharp/Grpc.HealthCheck/project.json @@ -0,0 +1,32 @@ +{ + "version": "0.14.0-anexperiment", + + "title": "gRPC C# Healthchecking", + "summary": "Implementation of gRPC health service", + "description": "Example implementation of grpc.health.v1 service that can be used for health-checking.", + "authors": [ "Google Inc." ], + "owners": [ "grpc-packages" ], + "licenseUrl": "https://github.com/grpc/grpc/blob/master/LICENSE", + "projectUrl": "https://github.com/grpc/grpc", + "requireLicenseAcceptance": false, + "copyright": "Copyright 2015, Google Inc.", + "tags": [ "gRPC health check" ], + + "compile": "**/*.cs", + + "dependencies": { + "Grpc.Core": "0.14.0-anexperiment", + "Google.Protobuf": "3.0.0-beta2" + }, + "frameworks": { + "net45": { }, + "dotnet54": { + "imports": [ + "portable-net45" + ], + "dependencies": { + "Microsoft.CSharp": "4.0.1-beta-23516" + } + } + } +} diff --git a/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.xproj b/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.xproj new file mode 100644 index 00000000000..82e044ec212 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.xproj @@ -0,0 +1,19 @@ + + + + 14.0.25123 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + 48ea5bbe-70e2-4198-869d-d7e59c45f30d + Grpc.IntegrationTesting.Client + ..\artifacts\obj\$(MSBuildProjectName) + ..\artifacts\bin\$(MSBuildProjectName)\ + + + + 2.0 + + + \ No newline at end of file diff --git a/src/csharp/Grpc.IntegrationTesting.Client/project.json b/src/csharp/Grpc.IntegrationTesting.Client/project.json new file mode 100644 index 00000000000..e023a9815b1 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Client/project.json @@ -0,0 +1,15 @@ +{ + "compile": "**/*.cs", + "compilationOptions": { + "emitEntryPoint": true + }, + + "content": "../nativelibs/**", + + "dependencies": { + "Grpc.IntegrationTesting": "1.0.0" + }, + "frameworks": { + "net45": { } + } +} diff --git a/src/csharp/Grpc.IntegrationTesting.QpsWorker/Grpc.IntegrationTesting.QpsWorker.xproj b/src/csharp/Grpc.IntegrationTesting.QpsWorker/Grpc.IntegrationTesting.QpsWorker.xproj new file mode 100644 index 00000000000..7348004c982 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.QpsWorker/Grpc.IntegrationTesting.QpsWorker.xproj @@ -0,0 +1,19 @@ + + + + 14.0.25123 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + 661b70d7-f56a-46e0-9b81-6227b591b5e7 + Grpc.IntegrationTesting.QpsWorker + ..\artifacts\obj\$(MSBuildProjectName) + ..\artifacts\bin\$(MSBuildProjectName)\ + + + + 2.0 + + + \ No newline at end of file diff --git a/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json new file mode 100644 index 00000000000..e023a9815b1 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json @@ -0,0 +1,15 @@ +{ + "compile": "**/*.cs", + "compilationOptions": { + "emitEntryPoint": true + }, + + "content": "../nativelibs/**", + + "dependencies": { + "Grpc.IntegrationTesting": "1.0.0" + }, + "frameworks": { + "net45": { } + } +} diff --git a/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.xproj b/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.xproj new file mode 100644 index 00000000000..fc43c41fd89 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.xproj @@ -0,0 +1,19 @@ + + + + 14.0.25123 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + 881f7ad1-a84e-47a2-9402-115c63c4031e + Grpc.IntegrationTesting.Server + ..\artifacts\obj\$(MSBuildProjectName) + ..\artifacts\bin\$(MSBuildProjectName)\ + + + + 2.0 + + + \ No newline at end of file diff --git a/src/csharp/Grpc.IntegrationTesting.Server/project.json b/src/csharp/Grpc.IntegrationTesting.Server/project.json new file mode 100644 index 00000000000..e023a9815b1 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Server/project.json @@ -0,0 +1,15 @@ +{ + "compile": "**/*.cs", + "compilationOptions": { + "emitEntryPoint": true + }, + + "content": "../nativelibs/**", + + "dependencies": { + "Grpc.IntegrationTesting": "1.0.0" + }, + "frameworks": { + "net45": { } + } +} diff --git a/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.xproj b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.xproj new file mode 100644 index 00000000000..69e89fa5770 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.xproj @@ -0,0 +1,19 @@ + + + + 14.0.25123 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + 20354386-3e71-4046-a269-3bc2a06f3ec8 + Grpc.IntegrationTesting + ..\artifacts\obj\$(MSBuildProjectName) + ..\artifacts\bin\$(MSBuildProjectName)\ + + + + 2.0 + + + \ No newline at end of file diff --git a/src/csharp/Grpc.IntegrationTesting/project.json b/src/csharp/Grpc.IntegrationTesting/project.json new file mode 100644 index 00000000000..f2cda96e7be --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting/project.json @@ -0,0 +1,21 @@ +{ + "compile": "**/*.cs", + "compilationOptions": { + "emitEntryPoint": true + }, + + "content": "../nativelibs/**", + + "dependencies": { + "Grpc.Auth": "0.0.1", + "Grpc.Core": "0.0.1", + "Google.Protobuf": "3.0.0-beta2", + "CommandLineParser": "1.9.71", + "Moq": "4.2.1510.2205", + "NUnit": "3.2.0", + "NUnitLite": "3.2.0-*" + }, + "frameworks": { + "net45": { } + } +} diff --git a/src/csharp/build_packages.bat b/src/csharp/build_packages.bat index 1cc63da9703..63f8c30bc7e 100644 --- a/src/csharp/build_packages.bat +++ b/src/csharp/build_packages.bat @@ -41,12 +41,12 @@ set NUGET=C:\nuget\nuget.exe @rem Collect the artifacts built by the previous build step if running on Jenkins @rem TODO(jtattermusch): is there a better way to do this? -xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=windows\artifacts\* Grpc.Core\windows_x86\ -xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=windows\artifacts\* Grpc.Core\windows_x64\ -xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=linux\artifacts\* Grpc.Core\linux_x86\ -xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=linux\artifacts\* Grpc.Core\linux_x64\ -xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=macos\artifacts\* Grpc.Core\macosx_x86\ -xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=macos\artifacts\* Grpc.Core\macosx_x64\ +xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=windows\artifacts\* nativelibs\windows_x86\ +xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=windows\artifacts\* nativelibs\windows_x64\ +xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=linux\artifacts\* nativelibs\linux_x86\ +xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=linux\artifacts\* nativelibs\linux_x64\ +xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=macos\artifacts\* nativelibs\macosx_x86\ +xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=macos\artifacts\* nativelibs\macosx_x64\ @rem Collect protoc artifacts built by the previous build step xcopy /Y /I ..\..\architecture=x86,language=protoc,platform=windows\artifacts\* protoc_plugins\windows_x86\ diff --git a/src/csharp/grpc.native.csharp/grpc.native.csharp.nuspec b/src/csharp/grpc.native.csharp/grpc.native.csharp.nuspec deleted file mode 100644 index cc688e2bc71..00000000000 --- a/src/csharp/grpc.native.csharp/grpc.native.csharp.nuspec +++ /dev/null @@ -1,27 +0,0 @@ - - - - grpc.native.csharp - $version$ - Google Inc. - grpc-packages - https://github.com/grpc/grpc/blob/master/LICENSE - http://github.com/grpc/grpc - false - Native extension needed by gRPC C# library. This is not the package you are looking for, it is only meant to be used as a dependency. - Release of gRPC C core $version$ libraries. - Copyright 2015 - gRPC C# Native Extension - Native library required by gRPC C# - gRPC native - - - - - - - - - - - diff --git a/templates/src/csharp/build_packages.bat.template b/templates/src/csharp/build_packages.bat.template index 122435af2e8..ea2acb661ee 100644 --- a/templates/src/csharp/build_packages.bat.template +++ b/templates/src/csharp/build_packages.bat.template @@ -43,12 +43,12 @@ @rem Collect the artifacts built by the previous build step if running on Jenkins @rem TODO(jtattermusch): is there a better way to do this? - xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=windows\artifacts\* Grpc.Core\windows_x86${"\\"} - xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=windows\artifacts\* Grpc.Core\windows_x64${"\\"} - xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=linux\artifacts\* Grpc.Core\linux_x86${"\\"} - xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=linux\artifacts\* Grpc.Core\linux_x64${"\\"} - xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=macos\artifacts\* Grpc.Core\macosx_x86${"\\"} - xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=macos\artifacts\* Grpc.Core\macosx_x64${"\\"} + xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=windows\artifacts\* nativelibs\windows_x86${"\\"} + xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=windows\artifacts\* nativelibs\windows_x64${"\\"} + xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=linux\artifacts\* nativelibs\linux_x86${"\\"} + xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=linux\artifacts\* nativelibs\linux_x64${"\\"} + xcopy /Y /I ..\..\architecture=x86,language=csharp,platform=macos\artifacts\* nativelibs\macosx_x86${"\\"} + xcopy /Y /I ..\..\architecture=x64,language=csharp,platform=macos\artifacts\* nativelibs\macosx_x64${"\\"} @rem Collect protoc artifacts built by the previous build step xcopy /Y /I ..\..\architecture=x86,language=protoc,platform=windows\artifacts\* protoc_plugins\windows_x86${"\\"} From 7ed39a1ef165d297c681acb4170af2c89c9b6743 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Tue, 14 Jun 2016 10:41:12 -0700 Subject: [PATCH 1074/1894] PHP stress client in stress test framework --- src/php/bin/stress_client.sh | 35 +++++ .../Dockerfile.template | 65 ++++++++ .../grpc_interop_stress_php/Dockerfile | 140 ++++++++++++++++++ .../build_interop_stress.sh | 54 +++++++ .../stress_test/configs/php-cxx.json | 93 ++++++++++++ 5 files changed, 387 insertions(+) create mode 100755 src/php/bin/stress_client.sh create mode 100644 templates/tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile.template create mode 100644 tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile create mode 100755 tools/dockerfile/stress_test/grpc_interop_stress_php/build_interop_stress.sh create mode 100644 tools/run_tests/stress_test/configs/php-cxx.json diff --git a/src/php/bin/stress_client.sh b/src/php/bin/stress_client.sh new file mode 100755 index 00000000000..8c49b7aa4b6 --- /dev/null +++ b/src/php/bin/stress_client.sh @@ -0,0 +1,35 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -e +cd $(dirname $0) +source ./determine_extension_dir.sh +php $extension_dir -d max_execution_time=300 \ + ../tests/interop/stress_client.php $@ 1>&2 diff --git a/templates/tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile.template b/templates/tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile.template new file mode 100644 index 00000000000..4cd069da34e --- /dev/null +++ b/templates/tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile.template @@ -0,0 +1,65 @@ +%YAML 1.2 +--- | + # Copyright 2015, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM debian:jessie + + <%include file="../../apt_get_basic.include"/> + <%include file="../../ruby_deps.include"/> + <%include file="../../gcp_api_libraries.include"/> + <%include file="../../php_deps.include"/> + <%include file="../../run_tests_addons.include"/> + # ronn: a ruby tool used to convert markdown to man pages, used during the + # install of Protobuf extensions + # + # rake: a ruby version of make used to build the PHP Protobuf extension + RUN /bin/bash -l -c "rvm all do gem install ronn rake" + + # Install composer + RUN curl -sS https://getcomposer.org/installer | php + RUN mv composer.phar /usr/local/bin/composer + + # As an attempt to work around #4212, try to prefetch Protobuf-PHP dependency + # into composer cache to prevent "composer install" from cloning on each build. + RUN git clone --mirror https://github.com/stanley-cheung/Protobuf-PHP.git ${'\\'} + /root/.composer/cache/vcs/git-github.com-stanley-cheung-Protobuf-PHP.git/ + + # Download the patched PHP protobuf so that PHP gRPC clients can be generated + # from proto3 schemas. + RUN git clone https://github.com/stanley-cheung/Protobuf-PHP.git /var/local/git/protobuf-php + + RUN /bin/bash -l -c "rvm use ruby-2.1 ${'\\'} + && cd /var/local/git/protobuf-php ${'\\'} + && rvm all do rake pear:package version=1.0 ${'\\'} + && pear install Protobuf-1.0.tgz" + + # Define the default command. + CMD ["bash"] + diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile b/tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile new file mode 100644 index 00000000000..c29aaf7c3f3 --- /dev/null +++ b/tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile @@ -0,0 +1,140 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +FROM debian:jessie + +# Install Git and basic packages. +RUN apt-get update && apt-get install -y \ + autoconf \ + autotools-dev \ + build-essential \ + bzip2 \ + ccache \ + curl \ + gcc \ + gcc-multilib \ + git \ + golang \ + gyp \ + lcov \ + libc6 \ + libc6-dbg \ + libc6-dev \ + libgtest-dev \ + libtool \ + make \ + perl \ + strace \ + python-dev \ + python-setuptools \ + python-yaml \ + telnet \ + unzip \ + wget \ + zip && apt-get clean + +#================ +# Build profiling +RUN apt-get update && apt-get install -y time && apt-get clean + +#================== +# Ruby dependencies + +# Install rvm +RUN gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 +RUN \curl -sSL https://get.rvm.io | bash -s stable + +# Install Ruby 2.1 +RUN /bin/bash -l -c "rvm install ruby-2.1" +RUN /bin/bash -l -c "rvm use --default ruby-2.1" +RUN /bin/bash -l -c "echo 'gem: --no-ri --no-rdoc' > ~/.gemrc" +RUN /bin/bash -l -c "echo 'export PATH=/usr/local/rvm/bin:$PATH' >> ~/.bashrc" +RUN /bin/bash -l -c "echo 'rvm --default use ruby-2.1' >> ~/.bashrc" +RUN /bin/bash -l -c "gem install bundler --no-ri --no-rdoc" + +# Google Cloud platform API libraries +RUN apt-get update && apt-get install -y python-pip && apt-get clean +RUN pip install --upgrade google-api-python-client + + +#================= +# PHP dependencies + +# Install dependencies + +RUN /bin/bash -l -c "echo 'deb http://packages.dotdeb.org wheezy-php55 all' \ + >> /etc/apt/sources.list.d/dotdeb.list" +RUN /bin/bash -l -c "echo 'deb-src http://packages.dotdeb.org wheezy-php55 all' \ + >> /etc/apt/sources.list.d/dotdeb.list" +RUN wget http://www.dotdeb.org/dotdeb.gpg -O- | apt-key add - + +RUN apt-get update && apt-get install -y \ + git php5 php5-dev phpunit unzip + +# Prepare ccache +RUN ln -s /usr/bin/ccache /usr/local/bin/gcc +RUN ln -s /usr/bin/ccache /usr/local/bin/g++ +RUN ln -s /usr/bin/ccache /usr/local/bin/cc +RUN ln -s /usr/bin/ccache /usr/local/bin/c++ +RUN ln -s /usr/bin/ccache /usr/local/bin/clang +RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ + +#====================== +# Zookeeper dependencies +# TODO(jtattermusch): is zookeeper still needed? +RUN apt-get install -y libzookeeper-mt-dev + +RUN mkdir /var/local/jenkins + +# ronn: a ruby tool used to convert markdown to man pages, used during the +# install of Protobuf extensions +# +# rake: a ruby version of make used to build the PHP Protobuf extension +RUN /bin/bash -l -c "rvm all do gem install ronn rake" + +# Install composer +RUN curl -sS https://getcomposer.org/installer | php +RUN mv composer.phar /usr/local/bin/composer + +# As an attempt to work around #4212, try to prefetch Protobuf-PHP dependency +# into composer cache to prevent "composer install" from cloning on each build. +RUN git clone --mirror https://github.com/stanley-cheung/Protobuf-PHP.git \ + /root/.composer/cache/vcs/git-github.com-stanley-cheung-Protobuf-PHP.git/ + +# Download the patched PHP protobuf so that PHP gRPC clients can be generated +# from proto3 schemas. +RUN git clone https://github.com/stanley-cheung/Protobuf-PHP.git /var/local/git/protobuf-php + +RUN /bin/bash -l -c "rvm use ruby-2.1 \ + && cd /var/local/git/protobuf-php \ + && rvm all do rake pear:package version=1.0 \ + && pear install Protobuf-1.0.tgz" + +# Define the default command. +CMD ["bash"] diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_php/build_interop_stress.sh b/tools/dockerfile/stress_test/grpc_interop_stress_php/build_interop_stress.sh new file mode 100755 index 00000000000..87262f1d629 --- /dev/null +++ b/tools/dockerfile/stress_test/grpc_interop_stress_php/build_interop_stress.sh @@ -0,0 +1,54 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# +# Builds PHP interop server and client in a base image. +set -ex + +mkdir -p /var/local/git +git clone --recursive /var/local/jenkins/grpc /var/local/git/grpc + +# copy service account keys if available +cp -r /var/local/jenkins/service_account $HOME || true + +cd /var/local/git/grpc +rvm --default use ruby-2.1 + +make install-certs + +# gRPC core and protobuf need to be installed +make install + +(cd src/php/ext/grpc && phpize && ./configure && make) + +(cd third_party/protobuf && make install) + +(cd src/php && composer install) + +(cd src/php && protoc-gen-php -i tests/interop/ -o tests/interop/ tests/interop/test.proto) diff --git a/tools/run_tests/stress_test/configs/php-cxx.json b/tools/run_tests/stress_test/configs/php-cxx.json new file mode 100644 index 00000000000..03254b368c8 --- /dev/null +++ b/tools/run_tests/stress_test/configs/php-cxx.json @@ -0,0 +1,93 @@ +{ + "dockerImages": { + "grpc_stress_cxx_opt" : { + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", + "dockerFileDir": "grpc_interop_stress_cxx", + "buildType": "opt" + }, + "grpc_stress_php": { + "buildScript": "tools/run_tests/dockerize/build_interop_stress_image.sh", + "dockerFileDir": "grpc_interop_stress_php" + } + }, + + "clientTemplates": { + "baseTemplates": { + "default": { + "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_client.py", + "pollIntervalSecs": 60, + "clientArgs": { + "num_channels_per_server":5, + "num_stubs_per_channel":10, + "test_cases": "empty_unary:1,large_unary:1,client_streaming:1,server_streaming:1,empty_stream:1", + "metrics_port": 8081 + }, + "metricsPort": 8081, + "metricsArgs": { + "metrics_server_address": "localhost:8081" + } + } + }, + "templates": { + "php_client": { + "baseTemplate": "default", + "stressClientCmd": [ + "/var/local/git/grpc/src/php/bin/stress_client.sh" + ], + "metricsClientCmd": [ + "php", + "/var/local/git/grpc/src/php/tests/interop/metrics_client.php" + ] + } + } + }, + + "serverTemplates": { + "baseTemplates":{ + "default": { + "wrapperScriptPath": "/var/local/git/grpc/tools/gcp/stress_test/run_server.py", + "serverPort": 8080, + "serverArgs": { + "port": 8080 + } + } + }, + "templates": { + "cxx_server_opt": { + "baseTemplate": "default", + "stressServerCmd": ["/var/local/git/grpc/bins/opt/interop_server"] + } + } + }, + + "testMatrix": { + "serverPodSpecs": { + "stress-server-cxx-php": { + "serverTemplate": "cxx_server_opt", + "dockerImage": "grpc_stress_cxx_opt", + "numInstances": 1 + } + }, + + "clientPodSpecs": { + "stress-client-php": { + "clientTemplate": "php_client", + "dockerImage": "grpc_stress_php", + "numInstances": 20, + "serverPodSpec": "stress-server-cxx-php" + } + } + }, + + "globalSettings": { + "buildDockerImages": true, + "pollIntervalSecs": 60, + "testDurationSecs": 7200, + "kubernetesProxyPort": 8010, + "datasetIdNamePrefix": "stress_test_php_cxx_opt", + "summaryTableId": "summary", + "qpsTableId": "qps", + "podWarmupSecs": 60 + } +} + From 04422141292aefa489cd6cb5f05a1d2f2de7f20f Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Tue, 14 Jun 2016 20:10:52 +0000 Subject: [PATCH 1075/1894] UNIMPLEMENTED status for cardinality violation --- src/python/grpcio/grpc/_server.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/python/grpcio/grpc/_server.py b/src/python/grpcio/grpc/_server.py index 2f99e5b4125..1d62292e90c 100644 --- a/src/python/grpcio/grpc/_server.py +++ b/src/python/grpcio/grpc/_server.py @@ -342,10 +342,9 @@ def _unary_request(rpc_event, state, request_deserializer): if state.client is _CLOSED: details = '"{}" requires exactly one request message.'.format( rpc_event.request_call_details.method) - # TODO(5992#issuecomment-220761992): really, what status code? _abort( state, rpc_event.operation_call, - cygrpc.StatusCode.unavailable, details) + cygrpc.StatusCode.unimplemented, details) return None elif state.client is _CANCELLED: return None From 4de40cae0a60c508792723e1a613caa6e96ed122 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Tue, 14 Jun 2016 13:42:23 -0700 Subject: [PATCH 1076/1894] Fixes #2868 --- src/objective-c/GRPCClient/GRPCCall.m | 1 - 1 file changed, 1 deletion(-) diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m index 0eb10656ddc..e9678f38a9c 100644 --- a/src/objective-c/GRPCClient/GRPCCall.m +++ b/src/objective-c/GRPCClient/GRPCCall.m @@ -76,7 +76,6 @@ NSString * const kGRPCTrailersKey = @"io.grpc.TrailersKey"; NSString *_host; NSString *_path; GRPCWrappedCall *_wrappedCall; - dispatch_once_t _callAlreadyInvoked; GRPCConnectivityMonitor *_connectivityMonitor; // The C gRPC library has less guarantees on the ordering of events than we From 8df99f2ac5bd92463d4cb676abbcde0fe2f4beae Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 14 Jun 2016 13:53:05 -0700 Subject: [PATCH 1077/1894] Try to get some more debug info --- src/core/lib/security/transport/handshake.c | 23 +++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c index b374ca7633b..2e91206e59f 100644 --- a/src/core/lib/security/transport/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -66,6 +66,17 @@ typedef struct { gpr_refcount refs; } grpc_security_handshake; +static void dump_state(const char *state, grpc_security_handshake *h, + grpc_error *error) { + gpr_timespec ttl = + gpr_time_sub(h->timer.deadline, gpr_now(h->timer.deadline.clock_type)); + const char *msg = grpc_error_string(error); + gpr_log(GPR_DEBUG, "%p: %s ttl=%d.%09d err=%s", h, state, ttl.tv_sec, + ttl.tv_nsec, msg); + grpc_error_free_string(msg); + GRPC_ERROR_UNREF(error); +} + static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, void *setup, grpc_error *error); @@ -116,6 +127,7 @@ static void unref_handshake(grpc_security_handshake *h) { static void security_handshake_done(grpc_exec_ctx *exec_ctx, grpc_security_handshake *h, grpc_error *error) { + dump_state("done", h, GRPC_ERROR_REF(error)); grpc_timer_cancel(exec_ctx, &h->timer); if (!h->is_client_side) { security_connector_remove_handshake(h); @@ -144,6 +156,9 @@ static void on_peer_checked(grpc_exec_ctx *exec_ctx, void *user_data, grpc_security_status status, grpc_auth_context *auth_context) { grpc_security_handshake *h = user_data; + dump_state("on_peer_checked", h, + grpc_error_set_int(GRPC_ERROR_CREATE("on_peer_checked"), + GRPC_ERROR_INT_SECURITY_STATUS, status)); tsi_frame_protector *protector; tsi_result result; if (status != GRPC_SECURITY_OK) { @@ -176,6 +191,9 @@ static void check_peer(grpc_exec_ctx *exec_ctx, grpc_security_handshake *h) { tsi_peer peer; tsi_result result = tsi_handshaker_extract_peer(h->handshaker, &peer); + dump_state( + "check_peer", h, + grpc_set_tsi_error_result(GRPC_ERROR_CREATE("peer_extraction"), result)); if (result != TSI_OK) { security_handshake_done( exec_ctx, h, grpc_set_tsi_error_result( @@ -192,6 +210,7 @@ static void send_handshake_bytes_to_peer(grpc_exec_ctx *exec_ctx, tsi_result result = TSI_OK; gpr_slice to_send; + dump_state("send_handshake_bytes_to_peer", h, GRPC_ERROR_NONE); do { size_t to_send_size = h->handshake_buffer_size - offset; result = tsi_handshaker_get_bytes_to_send_to_peer( @@ -231,6 +250,7 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, size_t num_left_overs; int has_left_overs_in_current_slice = 0; + dump_state("on_handshake_data_received_from_peer", h, GRPC_ERROR_REF(error)); if (error != GRPC_ERROR_NONE) { security_handshake_done( exec_ctx, h, @@ -294,6 +314,7 @@ static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, void *handshake, grpc_error *error) { grpc_security_handshake *h = handshake; + dump_state("on_handshake_data_sent_to_peer", h, GRPC_ERROR_REF(error)); /* Make sure that write is OK. */ if (error != GRPC_ERROR_NONE) { if (handshake != NULL) @@ -316,6 +337,7 @@ static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, static void on_timeout(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_security_handshake *h = arg; + dump_state("on_timeout", h, GRPC_ERROR_REF(error)); if (error == GRPC_ERROR_NONE) { grpc_endpoint_shutdown(exec_ctx, h->wrapped_endpoint); } @@ -346,6 +368,7 @@ void grpc_do_security_handshake( gpr_slice_buffer_init(&h->left_overs); gpr_slice_buffer_init(&h->outgoing); gpr_slice_buffer_init(&h->incoming); + dump_state("grpc_do_security_handshake", h, GRPC_ERROR_NONE); if (!is_client_side) { grpc_server_security_connector *server_connector = (grpc_server_security_connector *)connector; From 9627e2c5f7f14d78c40a231516f527a5b38e6b8f Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Tue, 14 Jun 2016 16:07:59 -0700 Subject: [PATCH 1078/1894] Fix a typo in php stress client that was causing the php client to ignore any explicitly passed port --- src/php/tests/interop/stress_client.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/php/tests/interop/stress_client.php b/src/php/tests/interop/stress_client.php index 419ef5be438..f9cfe8aba54 100644 --- a/src/php/tests/interop/stress_client.php +++ b/src/php/tests/interop/stress_client.php @@ -102,7 +102,7 @@ if (empty($raw_args['server_addresses'])) { } $args['metrics_port'] = empty($raw_args['metrics_port']) ? - '8081' : $args['metrics_port']; + '8081' : $raw_args['metrics_port']; $args['test_duration_secs'] = empty($raw_args['test_duration_secs']) || $raw_args['test_duration_secs'] == -1 ? From f2ce4307bfc639a1cde97b704c7df29246cf6ae3 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 14 Jun 2016 16:11:48 -0700 Subject: [PATCH 1079/1894] fix terminal encoding for cocoapods --- src/objective-c/tests/build_tests.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/objective-c/tests/build_tests.sh b/src/objective-c/tests/build_tests.sh index e7ad31e4031..8547bfd3a83 100755 --- a/src/objective-c/tests/build_tests.sh +++ b/src/objective-c/tests/build_tests.sh @@ -33,6 +33,9 @@ set -e +# CocoaPods requires the terminal to be using UTF-8 encoding. +export LANG=en_US.UTF-8 + cd $(dirname $0) hash pod 2>/dev/null || { echo >&2 "Cocoapods needs to be installed."; exit 1; } From 88651de8a713b068eaf499d36bf0b67c0cc9e8e3 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Tue, 14 Jun 2016 16:30:58 -0700 Subject: [PATCH 1080/1894] Fixes #2646 Pass NULL in the host parameter of grpc_channel_create_call --- src/objective-c/GRPCClient/private/GRPCChannel.m | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.m b/src/objective-c/GRPCClient/private/GRPCChannel.m index d3192c983d1..6cd4cb0ca30 100644 --- a/src/objective-c/GRPCClient/private/GRPCChannel.m +++ b/src/objective-c/GRPCClient/private/GRPCChannel.m @@ -199,9 +199,7 @@ grpc_channel_args * buildChannelArgs(NSDictionary *dictionary) { NULL, GRPC_PROPAGATE_DEFAULTS, queue.unmanagedQueue, path.UTF8String, - // Get "host" from "host:port" - // TODO(jcanizales): Use NSURLs throughout, to clarify these. - [_host componentsSeparatedByString:@":"][0].UTF8String, + NULL, gpr_inf_future(GPR_CLOCK_REALTIME), NULL); } From 350c1517819c883f8a31b75f243e2a699d8b57a4 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 14 Jun 2016 17:08:27 -0700 Subject: [PATCH 1081/1894] pr comments --- doc/interop-test-descriptions.md | 39 ++++++++++----------------- src/proto/grpc/testing/messages.proto | 25 ++++++++++++----- 2 files changed, 32 insertions(+), 32 deletions(-) diff --git a/doc/interop-test-descriptions.md b/doc/interop-test-descriptions.md index 3dd7807dec0..480625c6ba7 100644 --- a/doc/interop-test-descriptions.md +++ b/doc/interop-test-descriptions.md @@ -89,11 +89,10 @@ Client asserts: ### client_compressed_unary -This test verifies the client can compress unary messages. It sends an initial -inconsistent request to verify whether the server supports the -[CompressedRequest][] feature. If it does, it should catch the inconsistency and -fail the call with an `INVALID_ARGUMENT` status. If the feature is supported, it -proceeds with two unary calls, for compressed and uncompressed payloads. +This test verifies the client can compress unary messages by sending two unary +calls, for compressed and uncompressed payloads. It sends an initial probing +request to verify whether the server supports the [CompressedRequest][] feature. +If it doesn't, the call is expected to fail with an `INVALID_ARGUMENT` status. Server features: * [UnaryCall][] @@ -140,14 +139,14 @@ Procedure: calls were successful. * Response payload body is 314159 bytes in size. * Clients are free to assert that the response payload body contents are - zero and comparing the entire response message against a golden response. + zeros and comparing the entire response message against a golden response. ### server_compressed_unary This test verifies the server can compress unary messages. It sends two unary -requests, expecting the server response to be -compressed or not according to the `response_compressed` boolean. +requests, expecting the server's response to be compressed or not according to +the `response_compressed` boolean. Whether compression was actually performed is determined by the compression bit in the response's message flags. @@ -158,7 +157,7 @@ Server features: * [CompressedResponse][] Procedure: - 1. Client calls UnaryCall with: + 1. Client calls UnaryCall with `SimpleRequest`s: ``` { @@ -257,7 +256,8 @@ compressed with `expect_compressed` true; the second one uncompressed with Procedure: 1. Client calls StreamingInputCall - 1. Client sends the following feature-probing *uncompressed* message + 1. Client sends the following feature-probing *uncompressed* + `StreamingInputCallRequest` message ``` { @@ -305,7 +305,7 @@ Server features: * [StreamingOutputCall][] Procedure: - 1. Client calls StreamingOutputCall with: + 1. Client calls StreamingOutputCall with `StreamingOutputCallRequest`: ``` { @@ -341,27 +341,16 @@ Server features: Procedure: - 1. Client calls StreamingOutputCall with: - - ``` - { - response_compressed: true - response_parameters:{ - size: 31415 - } - response_parameters:{ - size: 58979 - } - } - ``` + 1. Client calls StreamingOutputCall with `StreamingOutputCallRequest`: ``` { - response_compressed: false response_parameters:{ + response_compressed: true size: 31415 } response_parameters:{ + response_compressed: false size: 58979 } } diff --git a/src/proto/grpc/testing/messages.proto b/src/proto/grpc/testing/messages.proto index 782fd40989d..1812dc74029 100644 --- a/src/proto/grpc/testing/messages.proto +++ b/src/proto/grpc/testing/messages.proto @@ -32,6 +32,8 @@ syntax = "proto3"; +import "google/protobuf/wrappers.proto"; + package grpc.testing; // DEPRECATED, don't use. To be removed shortly. @@ -76,8 +78,11 @@ message SimpleRequest { // Whether SimpleResponse should include OAuth scope. bool fill_oauth_scope = 5; - // Whether to request the server to compress the response. - bool response_compressed = 6; + // Whether to request the server to compress the response. This field is + // "nullable" in order to interoperate seamlessly with clients not able to + // implement the full compression tests by introspecting the call to verify + // the response's compression status. + google.protobuf.BoolValue response_compressed = 6; // Whether server should return a given status EchoStatus response_status = 7; @@ -102,8 +107,11 @@ message StreamingInputCallRequest { // Optional input payload sent along with the request. Payload payload = 1; - // Whether the server should expect this request to be compressed. - bool expect_compressed = 2; + // Whether the server should expect this request to be compressed. This field + // is "nullable" in order to interoperate seamlessly with servers not able to + // implement the full compression tests by introspecting the call to verify + // the request's compression status. + BoolValue expect_compressed = 2; // Not expecting any payload from the response. } @@ -122,6 +130,12 @@ message ResponseParameters { // Desired interval between consecutive responses in the response stream in // microseconds. int32 interval_us = 2; + + // Whether to request the server to compress the response. This field is + // "nullable" in order to interoperate seamlessly with clients not able to + // implement the full compression tests by introspecting the call to verify + // the response's compression status. + BoolValue compressed = 3; } // Server-streaming request. @@ -139,9 +153,6 @@ message StreamingOutputCallRequest { // Optional input payload sent along with the request. Payload payload = 3; - // Whether to request the server to compress the response. - bool response_compressed = 6; - // Whether server should return a given status EchoStatus response_status = 7; } From b8d50af3a58f99a4c0d379d9a68f7bc4dd383f7e Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 13 Jun 2016 17:24:15 -0700 Subject: [PATCH 1082/1894] deduplicate send finished handler --- src/csharp/Grpc.Core/Internal/AsyncCall.cs | 2 +- .../Grpc.Core/Internal/AsyncCallBase.cs | 27 +------------------ 2 files changed, 2 insertions(+), 27 deletions(-) diff --git a/src/csharp/Grpc.Core/Internal/AsyncCall.cs b/src/csharp/Grpc.Core/Internal/AsyncCall.cs index 895be690a59..f549c528762 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCall.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCall.cs @@ -267,7 +267,7 @@ namespace Grpc.Core.Internal halfcloseRequested = true; return Task.FromResult(null); } - call.StartSendCloseFromClient(HandleSendCloseFromClientFinished); + call.StartSendCloseFromClient(HandleSendFinished); halfcloseRequested = true; streamingWriteTcs = new TaskCompletionSource(); diff --git a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs index cb8366c2166..eb9c3ea62d1 100644 --- a/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs +++ b/src/csharp/Grpc.Core/Internal/AsyncCallBase.cs @@ -248,7 +248,7 @@ namespace Grpc.Core.Internal } /// - /// Handles send completion. + /// Handles send completion (including SendCloseFromClient). /// protected void HandleSendFinished(bool success) { @@ -271,31 +271,6 @@ namespace Grpc.Core.Internal } } - /// - /// Handles halfclose (send close from client) completion. - /// - protected void HandleSendCloseFromClientFinished(bool success) - { - TaskCompletionSource origTcs = null; - lock (myLock) - { - origTcs = streamingWriteTcs; - streamingWriteTcs = null; - - ReleaseResourcesIfPossible(); - } - - if (!success) - { - // TODO(jtattermusch): this method is same as HandleSendFinished (only the error message differs). - origTcs.SetException(new InvalidOperationException("Sending close from client has failed.")); - } - else - { - origTcs.SetResult(null); - } - } - /// /// Handles send status from server completion. /// From 2eb09ee543e5ce9e34e895b5d2a6fbff79d6ddc6 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 14 Jun 2016 17:50:20 -0700 Subject: [PATCH 1083/1894] improve docs for IAsyncStreamReader --- src/csharp/Grpc.Core/IAsyncStreamReader.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/csharp/Grpc.Core/IAsyncStreamReader.cs b/src/csharp/Grpc.Core/IAsyncStreamReader.cs index 49e1ea78325..aa3b802a50f 100644 --- a/src/csharp/Grpc.Core/IAsyncStreamReader.cs +++ b/src/csharp/Grpc.Core/IAsyncStreamReader.cs @@ -41,10 +41,24 @@ namespace Grpc.Core { /// /// A stream of messages to be read. + /// Messages can be awaited await reader.MoveNext(), that returns true + /// if there is a message available and false if there are no more messages + /// (i.e. the stream has been closed). + /// + /// On the client side, the last invocation of MoveNext() either returns false + /// if the call has finished successfully or throws RpcException if call finished + /// with an error. Once the call finishes, subsequent invocations of MoveNext() will + /// continue yielding the same result (returning false or throwing an exception). + /// + /// + /// On the server side, MoveNext() does not throw exceptions. + /// In case of a failure, the request stream will appear to be finished + /// (MoveNext will return false) and the CancellationToken + /// associated with the call will be cancelled to signal the failure. + /// /// /// The message type. public interface IAsyncStreamReader : IAsyncEnumerator { - // TODO(jtattermusch): consider just using IAsyncEnumerator instead of this interface. } } From 95123ceb9bc1b4683518a75ad1a0fb8c0b962ab0 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 15 Jun 2016 08:02:38 -0700 Subject: [PATCH 1084/1894] Add a test for multiple endpoint shutdowns --- test/core/iomgr/endpoint_tests.c | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c index 6d15ecf141d..b9331fd8fe2 100644 --- a/test/core/iomgr/endpoint_tests.c +++ b/test/core/iomgr/endpoint_tests.c @@ -253,6 +253,41 @@ static void read_and_write_test(grpc_endpoint_test_config config, grpc_exec_ctx_finish(&exec_ctx); } +static void must_fail(grpc_exec_ctx *exec_ctx, void *arg, bool success) { + GPR_ASSERT(!success); + ++*(int *)arg; +} + +static void multiple_shutdown_test(grpc_endpoint_test_config config) { + grpc_endpoint_test_fixture f = begin_test(config, "read_and_write_test", 128); + int fail_count = 0; + + gpr_slice_buffer incoming; + gpr_slice_buffer_init(&incoming); + + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_endpoint_read(&exec_ctx, f.client_ep, &incoming, + grpc_closure_create(must_fail, &fail_count)); + grpc_exec_ctx_flush(&exec_ctx); + GPR_ASSERT(fail_count == 0); + grpc_endpoint_shutdown(&exec_ctx, f.client_ep); + grpc_exec_ctx_flush(&exec_ctx); + GPR_ASSERT(fail_count == 1); + grpc_endpoint_read(&exec_ctx, f.client_ep, &incoming, + grpc_closure_create(must_fail, &fail_count)); + grpc_exec_ctx_flush(&exec_ctx); + GPR_ASSERT(fail_count == 2); + grpc_endpoint_shutdown(&exec_ctx, f.client_ep); + grpc_exec_ctx_flush(&exec_ctx); + GPR_ASSERT(fail_count == 2); + + gpr_slice_buffer_destroy(&incoming); + + grpc_endpoint_destroy(&exec_ctx, f.client_ep); + grpc_endpoint_destroy(&exec_ctx, f.server_ep); + grpc_exec_ctx_finish(&exec_ctx); +} + void grpc_endpoint_tests(grpc_endpoint_test_config config, grpc_pollset *pollset, gpr_mu *mu) { size_t i; @@ -264,5 +299,6 @@ void grpc_endpoint_tests(grpc_endpoint_test_config config, for (i = 1; i < 1000; i = GPR_MAX(i + 1, i * 5 / 4)) { read_and_write_test(config, 40320, i, i, 0); } + multiple_shutdown_test(config); g_pollset = NULL; } From 20410921f7028b4b9bae71b327031ddb071c69d3 Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 15 Jun 2016 09:21:42 -0700 Subject: [PATCH 1085/1894] Exclude boringssl tests and libs from C++ build if EMBED_OPENSSL is not true --- Makefile | 53 +++++++++++++++++++++++++++++++++++++ templates/Makefile.template | 24 +++++++++++++++++ 2 files changed, 77 insertions(+) diff --git a/Makefile b/Makefile index fdbedfd276e..81bb9388f4f 100644 --- a/Makefile +++ b/Makefile @@ -1207,7 +1207,12 @@ 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++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a $(LIBDIR)/$(CONFIG)/libboringssl_test_util.a $(LIBDIR)/$(CONFIG)/libboringssl_aes_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_asn1_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_base64_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bio_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bn_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_bytestring_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_aead_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cipher_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_cmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ed25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x25519_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_dh_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_digest_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ec_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ecdsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_err_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_extra_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_evp_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pbkdf_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_hmac_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs12_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_pkcs8_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_poly1305_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_rsa_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_x509_test_lib.a $(LIBDIR)/$(CONFIG)/libboringssl_ssl_test_lib.a +else +privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libinterop_client_helper.a $(LIBDIR)/$(CONFIG)/libinterop_client_main.a $(LIBDIR)/$(CONFIG)/libinterop_server_helper.a $(LIBDIR)/$(CONFIG)/libinterop_server_main.a $(LIBDIR)/$(CONFIG)/libqps.a +endif + ifeq ($(HAS_ZOOKEEPER),true) privatelibs_zookeeper: @@ -1370,6 +1375,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/uri_fuzzer_test_one_entry \ +ifeq ($(EMBED_OPENSSL),true) buildtests_cxx: buildtests_zookeeper privatelibs_cxx \ $(BINDIR)/$(CONFIG)/alarm_cpp_test \ $(BINDIR)/$(CONFIG)/async_end2end_test \ @@ -1452,6 +1458,53 @@ buildtests_cxx: buildtests_zookeeper privatelibs_cxx \ $(BINDIR)/$(CONFIG)/boringssl_pqueue_test \ $(BINDIR)/$(CONFIG)/boringssl_ssl_test \ +else +buildtests_cxx: buildtests_zookeeper privatelibs_cxx \ + $(BINDIR)/$(CONFIG)/alarm_cpp_test \ + $(BINDIR)/$(CONFIG)/async_end2end_test \ + $(BINDIR)/$(CONFIG)/auth_property_iterator_test \ + $(BINDIR)/$(CONFIG)/channel_arguments_test \ + $(BINDIR)/$(CONFIG)/cli_call_test \ + $(BINDIR)/$(CONFIG)/client_crash_test \ + $(BINDIR)/$(CONFIG)/client_crash_test_server \ + $(BINDIR)/$(CONFIG)/codegen_test_full \ + $(BINDIR)/$(CONFIG)/codegen_test_minimal \ + $(BINDIR)/$(CONFIG)/credentials_test \ + $(BINDIR)/$(CONFIG)/cxx_byte_buffer_test \ + $(BINDIR)/$(CONFIG)/cxx_slice_test \ + $(BINDIR)/$(CONFIG)/cxx_string_ref_test \ + $(BINDIR)/$(CONFIG)/cxx_time_test \ + $(BINDIR)/$(CONFIG)/end2end_test \ + $(BINDIR)/$(CONFIG)/generic_end2end_test \ + $(BINDIR)/$(CONFIG)/golden_file_test \ + $(BINDIR)/$(CONFIG)/grpc_cli \ + $(BINDIR)/$(CONFIG)/grpclb_api_test \ + $(BINDIR)/$(CONFIG)/hybrid_end2end_test \ + $(BINDIR)/$(CONFIG)/interop_client \ + $(BINDIR)/$(CONFIG)/interop_server \ + $(BINDIR)/$(CONFIG)/interop_test \ + $(BINDIR)/$(CONFIG)/json_run_localhost \ + $(BINDIR)/$(CONFIG)/metrics_client \ + $(BINDIR)/$(CONFIG)/mock_test \ + $(BINDIR)/$(CONFIG)/qps_interarrival_test \ + $(BINDIR)/$(CONFIG)/qps_json_driver \ + $(BINDIR)/$(CONFIG)/qps_openloop_test \ + $(BINDIR)/$(CONFIG)/qps_worker \ + $(BINDIR)/$(CONFIG)/reconnect_interop_client \ + $(BINDIR)/$(CONFIG)/reconnect_interop_server \ + $(BINDIR)/$(CONFIG)/secure_auth_context_test \ + $(BINDIR)/$(CONFIG)/secure_sync_unary_ping_pong_test \ + $(BINDIR)/$(CONFIG)/server_builder_plugin_test \ + $(BINDIR)/$(CONFIG)/server_crash_test \ + $(BINDIR)/$(CONFIG)/server_crash_test_client \ + $(BINDIR)/$(CONFIG)/shutdown_test \ + $(BINDIR)/$(CONFIG)/status_test \ + $(BINDIR)/$(CONFIG)/streaming_throughput_test \ + $(BINDIR)/$(CONFIG)/stress_test \ + $(BINDIR)/$(CONFIG)/thread_stress_test \ + +endif + ifeq ($(HAS_ZOOKEEPER),true) buildtests_zookeeper: privatelibs_zookeeper \ diff --git a/templates/Makefile.template b/templates/Makefile.template index 079fef65ae8..02039541e65 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -923,6 +923,7 @@ pc_cxx_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc + ifeq ($(EMBED_OPENSSL),true) privatelibs_cxx: \ % for lib in libs: % if 'Makefile' in lib.get('build_system', ['Makefile']): @@ -931,6 +932,18 @@ % endif % endif % endfor + + else + privatelibs_cxx: \ + % for lib in libs: + % if 'Makefile' in lib.get('build_system', ['Makefile']): + % if lib.build == 'private' and lib.language == 'c++' and not lib.get('external_deps', None) and not lib.boringssl: + $(LIBDIR)/$(CONFIG)/lib${lib.name}.a\ + % endif + % endif + % endfor + + endif ifeq ($(HAS_ZOOKEEPER),true) @@ -958,12 +971,23 @@ % endfor + ifeq ($(EMBED_OPENSSL),true) buildtests_cxx: buildtests_zookeeper privatelibs_cxx <%text>\ % for tgt in targets: % if tgt.build == 'test' and tgt.language == 'c++' and not tgt.get('external_deps', None): $(BINDIR)/$(CONFIG)/${tgt.name} <%text>\ % endif % endfor + + else + buildtests_cxx: buildtests_zookeeper privatelibs_cxx <%text>\ + % for tgt in targets: + % if tgt.build == 'test' and tgt.language == 'c++' and not tgt.get('external_deps', None) and not tgt.boringssl: + $(BINDIR)/$(CONFIG)/${tgt.name} <%text>\ + % endif + % endfor + + endif ifeq ($(HAS_ZOOKEEPER),true) From 52f231212f0385bae40dd6e45ed1c4bf823bf3c2 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 15 Jun 2016 09:34:14 -0700 Subject: [PATCH 1086/1894] Make {endpoint,fd}_shutdown idempotent --- src/core/lib/iomgr/endpoint.h | 2 +- src/core/lib/iomgr/ev_poll_and_epoll_posix.c | 24 ++++++++++++---- src/core/lib/iomgr/ev_poll_posix.c | 24 ++++++++++++---- src/core/lib/iomgr/ev_posix.c | 4 +++ src/core/lib/iomgr/ev_posix.h | 6 +++- src/core/lib/iomgr/tcp_posix.c | 2 +- test/core/iomgr/endpoint_tests.c | 30 +++++++++++--------- test/core/iomgr/tcp_posix_test.c | 2 +- 8 files changed, 67 insertions(+), 27 deletions(-) diff --git a/src/core/lib/iomgr/endpoint.h b/src/core/lib/iomgr/endpoint.h index 3877ceb1e26..f9808bbda18 100644 --- a/src/core/lib/iomgr/endpoint.h +++ b/src/core/lib/iomgr/endpoint.h @@ -82,7 +82,7 @@ char *grpc_endpoint_get_peer(grpc_endpoint *ep); void grpc_endpoint_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, gpr_slice_buffer *slices, grpc_closure *cb); -/* Causes any pending read/write callbacks to run immediately with +/* Causes any pending and future read/write callbacks to run immediately with success==0 */ void grpc_endpoint_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep); void grpc_endpoint_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep); diff --git a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c index 943c404f917..ef8bbd62772 100644 --- a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c +++ b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c @@ -515,7 +515,9 @@ static void fd_unref(grpc_fd *fd) { unref_by(fd, 2); } static void notify_on_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st, grpc_closure *closure) { - if (*st == CLOSURE_NOT_READY) { + if (fd->shutdown) { + grpc_exec_ctx_enqueue(exec_ctx, closure, false, NULL); + } else if (*st == CLOSURE_NOT_READY) { /* not ready ==> switch to a waiting state by setting the closure */ *st = closure; } else if (*st == CLOSURE_READY) { @@ -557,13 +559,24 @@ static void set_read_notifier_pollset_locked( static void fd_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { gpr_mu_lock(&fd->mu); - GPR_ASSERT(!fd->shutdown); - fd->shutdown = 1; - set_ready_locked(exec_ctx, fd, &fd->read_closure); - set_ready_locked(exec_ctx, fd, &fd->write_closure); + /* only shutdown once */ + if (!fd->shutdown) { + fd->shutdown = 1; + /* signal read/write closed to OS so that future operations fail */ + shutdown(fd->fd, SHUT_RDWR); + set_ready_locked(exec_ctx, fd, &fd->read_closure); + set_ready_locked(exec_ctx, fd, &fd->write_closure); + } gpr_mu_unlock(&fd->mu); } +static bool fd_is_shutdown(grpc_fd *fd) { + gpr_mu_lock(&fd->mu); + bool r = fd->shutdown; + gpr_mu_unlock(&fd->mu); + return r; +} + static void fd_notify_on_read(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *closure) { gpr_mu_lock(&fd->mu); @@ -1938,6 +1951,7 @@ static const grpc_event_engine_vtable vtable = { .fd_wrapped_fd = fd_wrapped_fd, .fd_orphan = fd_orphan, .fd_shutdown = fd_shutdown, + .fd_is_shutdown = fd_is_shutdown, .fd_notify_on_read = fd_notify_on_read, .fd_notify_on_write = fd_notify_on_write, .fd_get_read_notifier_pollset = fd_get_read_notifier_pollset, diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 0167999dada..63130328693 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -421,7 +421,9 @@ static void fd_unref(grpc_fd *fd) { unref_by(fd, 2); } static void notify_on_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st, grpc_closure *closure) { - if (*st == CLOSURE_NOT_READY) { + if (fd->shutdown) { + grpc_exec_ctx_enqueue(exec_ctx, closure, false, NULL); + } else if (*st == CLOSURE_NOT_READY) { /* not ready ==> switch to a waiting state by setting the closure */ *st = closure; } else if (*st == CLOSURE_READY) { @@ -463,13 +465,24 @@ static void set_read_notifier_pollset_locked( static void fd_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { gpr_mu_lock(&fd->mu); - GPR_ASSERT(!fd->shutdown); - fd->shutdown = 1; - set_ready_locked(exec_ctx, fd, &fd->read_closure); - set_ready_locked(exec_ctx, fd, &fd->write_closure); + /* only shutdown once */ + if (!fd->shutdown) { + fd->shutdown = 1; + /* signal read/write closed to OS so that future operations fail */ + shutdown(fd->fd, SHUT_RDWR); + set_ready_locked(exec_ctx, fd, &fd->read_closure); + set_ready_locked(exec_ctx, fd, &fd->write_closure); + } gpr_mu_unlock(&fd->mu); } +static bool fd_is_shutdown(grpc_fd *fd) { + gpr_mu_lock(&fd->mu); + bool r = fd->shutdown; + gpr_mu_unlock(&fd->mu); + return r; +} + static void fd_notify_on_read(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *closure) { gpr_mu_lock(&fd->mu); @@ -1172,6 +1185,7 @@ static const grpc_event_engine_vtable vtable = { .fd_wrapped_fd = fd_wrapped_fd, .fd_orphan = fd_orphan, .fd_shutdown = fd_shutdown, + .fd_is_shutdown = fd_is_shutdown, .fd_notify_on_read = fd_notify_on_read, .fd_notify_on_write = fd_notify_on_write, .fd_get_read_notifier_pollset = fd_get_read_notifier_pollset, diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index 6477b05dcd8..a17ee17945a 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -153,6 +153,10 @@ void grpc_fd_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { g_event_engine->fd_shutdown(exec_ctx, fd); } +bool grpc_fd_is_shutdown(grpc_fd *fd) { + return g_event_engine->fd_is_shutdown(fd); +} + void grpc_fd_notify_on_read(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *closure) { g_event_engine->fd_notify_on_read(exec_ctx, fd, closure); diff --git a/src/core/lib/iomgr/ev_posix.h b/src/core/lib/iomgr/ev_posix.h index 344bf63438a..53457aa9d53 100644 --- a/src/core/lib/iomgr/ev_posix.h +++ b/src/core/lib/iomgr/ev_posix.h @@ -55,6 +55,7 @@ typedef struct grpc_event_engine_vtable { grpc_closure *closure); void (*fd_notify_on_write)(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *closure); + bool (*fd_is_shutdown)(grpc_fd *fd); grpc_pollset *(*fd_get_read_notifier_pollset)(grpc_exec_ctx *exec_ctx, grpc_fd *fd); @@ -116,7 +117,10 @@ int grpc_fd_wrapped_fd(grpc_fd *fd); void grpc_fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *on_done, int *release_fd, const char *reason); -/* Cause any current callbacks to error out with GRPC_CALLBACK_CANCELLED. */ +/* Has grpc_fd_shutdown been called on an fd? */ +bool grpc_fd_is_shutdown(grpc_fd *fd); + +/* Cause any current and future callbacks to fail. */ void grpc_fd_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd); /* Register read interest, causing read_cb to be called once when fd becomes diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index e2869224f1f..1bfc190f7aa 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -408,7 +408,7 @@ static void tcp_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, if (buf->length == 0) { GPR_TIMER_END("tcp_write", 0); - grpc_exec_ctx_enqueue(exec_ctx, cb, true, NULL); + grpc_exec_ctx_enqueue(exec_ctx, cb, !grpc_fd_is_shutdown(tcp->em_fd), NULL); return; } tcp->outgoing_buffer = buf; diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c index b9331fd8fe2..bf3d19c6fc3 100644 --- a/test/core/iomgr/endpoint_tests.c +++ b/test/core/iomgr/endpoint_tests.c @@ -253,35 +253,39 @@ static void read_and_write_test(grpc_endpoint_test_config config, grpc_exec_ctx_finish(&exec_ctx); } -static void must_fail(grpc_exec_ctx *exec_ctx, void *arg, bool success) { - GPR_ASSERT(!success); - ++*(int *)arg; +static void inc_on_failure(grpc_exec_ctx *exec_ctx, void *arg, bool success) { + *(int *)arg += (success == false); } static void multiple_shutdown_test(grpc_endpoint_test_config config) { - grpc_endpoint_test_fixture f = begin_test(config, "read_and_write_test", 128); + grpc_endpoint_test_fixture f = + begin_test(config, "multiple_shutdown_test", 128); int fail_count = 0; - gpr_slice_buffer incoming; - gpr_slice_buffer_init(&incoming); + gpr_slice_buffer slice_buffer; + gpr_slice_buffer_init(&slice_buffer); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_endpoint_read(&exec_ctx, f.client_ep, &incoming, - grpc_closure_create(must_fail, &fail_count)); + grpc_endpoint_read(&exec_ctx, f.client_ep, &slice_buffer, + grpc_closure_create(inc_on_failure, &fail_count)); grpc_exec_ctx_flush(&exec_ctx); GPR_ASSERT(fail_count == 0); grpc_endpoint_shutdown(&exec_ctx, f.client_ep); grpc_exec_ctx_flush(&exec_ctx); GPR_ASSERT(fail_count == 1); - grpc_endpoint_read(&exec_ctx, f.client_ep, &incoming, - grpc_closure_create(must_fail, &fail_count)); + grpc_endpoint_read(&exec_ctx, f.client_ep, &slice_buffer, + grpc_closure_create(inc_on_failure, &fail_count)); grpc_exec_ctx_flush(&exec_ctx); GPR_ASSERT(fail_count == 2); + grpc_endpoint_write(&exec_ctx, f.client_ep, &slice_buffer, + grpc_closure_create(inc_on_failure, &fail_count)); + grpc_exec_ctx_flush(&exec_ctx); + GPR_ASSERT(fail_count == 3); grpc_endpoint_shutdown(&exec_ctx, f.client_ep); grpc_exec_ctx_flush(&exec_ctx); - GPR_ASSERT(fail_count == 2); + GPR_ASSERT(fail_count == 3); - gpr_slice_buffer_destroy(&incoming); + gpr_slice_buffer_destroy(&slice_buffer); grpc_endpoint_destroy(&exec_ctx, f.client_ep); grpc_endpoint_destroy(&exec_ctx, f.server_ep); @@ -293,12 +297,12 @@ void grpc_endpoint_tests(grpc_endpoint_test_config config, size_t i; g_pollset = pollset; g_mu = mu; + multiple_shutdown_test(config); read_and_write_test(config, 10000000, 100000, 8192, 0); read_and_write_test(config, 1000000, 100000, 1, 0); read_and_write_test(config, 100000000, 100000, 1, 1); for (i = 1; i < 1000; i = GPR_MAX(i + 1, i * 5 / 4)) { read_and_write_test(config, 40320, i, i, 0); } - multiple_shutdown_test(config); g_pollset = NULL; } diff --git a/test/core/iomgr/tcp_posix_test.c b/test/core/iomgr/tcp_posix_test.c index 19ba258303e..1112e8a3aa5 100644 --- a/test/core/iomgr/tcp_posix_test.c +++ b/test/core/iomgr/tcp_posix_test.c @@ -517,8 +517,8 @@ int main(int argc, char **argv) { grpc_init(); g_pollset = gpr_malloc(grpc_pollset_size()); grpc_pollset_init(g_pollset, &g_mu); - run_tests(); grpc_endpoint_tests(configs[0], g_pollset, g_mu); + run_tests(); grpc_closure_init(&destroyed, destroy_pollset, g_pollset); grpc_pollset_shutdown(&exec_ctx, g_pollset, &destroyed); grpc_exec_ctx_finish(&exec_ctx); From 8d9dff511811bd8e0c92bd56fd682db14033424b Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 15 Jun 2016 09:35:39 -0700 Subject: [PATCH 1087/1894] prevent interfering of project.json files with .csproj files in VS2015 --- src/csharp/Grpc.Auth/Grpc.Auth.csproj | 1 + src/csharp/Grpc.Auth/Grpc.Auth.project.json | 8 ++++++++ src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj | 1 + src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.project.json | 8 ++++++++ src/csharp/Grpc.Core/Grpc.Core.csproj | 1 + src/csharp/Grpc.Core/Grpc.Core.project.json | 8 ++++++++ .../Grpc.Examples.MathClient.csproj | 3 +++ .../Grpc.Examples.MathClient.project.json | 8 ++++++++ .../Grpc.Examples.MathServer.csproj | 3 +++ .../Grpc.Examples.MathServer.project.json | 8 ++++++++ src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj | 1 + .../Grpc.Examples.Tests/Grpc.Examples.Tests.project.json | 8 ++++++++ src/csharp/Grpc.Examples/Grpc.Examples.csproj | 1 + src/csharp/Grpc.Examples/Grpc.Examples.project.json | 8 ++++++++ .../Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.csproj | 1 + .../Grpc.HealthCheck.Tests.project.json | 8 ++++++++ src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.csproj | 1 + src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.project.json | 8 ++++++++ .../Grpc.IntegrationTesting.Client.csproj | 1 + .../Grpc.IntegrationTesting.Client.project.json | 8 ++++++++ .../Grpc.IntegrationTesting.QpsWorker.csproj | 1 + .../Grpc.IntegrationTesting.QpsWorker.project.json | 8 ++++++++ .../Grpc.IntegrationTesting.Server.csproj | 1 + .../Grpc.IntegrationTesting.Server.project.json | 8 ++++++++ .../Grpc.IntegrationTesting.StressClient.csproj | 5 ++++- .../Grpc.IntegrationTesting.StressClient.project.json | 8 ++++++++ .../Grpc.IntegrationTesting.csproj | 1 + .../Grpc.IntegrationTesting.project.json | 8 ++++++++ 28 files changed, 133 insertions(+), 1 deletion(-) create mode 100644 src/csharp/Grpc.Auth/Grpc.Auth.project.json create mode 100644 src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.project.json create mode 100644 src/csharp/Grpc.Core/Grpc.Core.project.json create mode 100644 src/csharp/Grpc.Examples.MathClient/Grpc.Examples.MathClient.project.json create mode 100644 src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.project.json create mode 100644 src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.project.json create mode 100644 src/csharp/Grpc.Examples/Grpc.Examples.project.json create mode 100644 src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.project.json create mode 100644 src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.project.json create mode 100644 src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.project.json create mode 100644 src/csharp/Grpc.IntegrationTesting.QpsWorker/Grpc.IntegrationTesting.QpsWorker.project.json create mode 100644 src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.project.json create mode 100644 src/csharp/Grpc.IntegrationTesting.StressClient/Grpc.IntegrationTesting.StressClient.project.json create mode 100644 src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.project.json diff --git a/src/csharp/Grpc.Auth/Grpc.Auth.csproj b/src/csharp/Grpc.Auth/Grpc.Auth.csproj index 3acea7d2f83..1fa14fc3dfb 100644 --- a/src/csharp/Grpc.Auth/Grpc.Auth.csproj +++ b/src/csharp/Grpc.Auth/Grpc.Auth.csproj @@ -81,6 +81,7 @@ + \ No newline at end of file diff --git a/src/csharp/Grpc.Auth/Grpc.Auth.project.json b/src/csharp/Grpc.Auth/Grpc.Auth.project.json new file mode 100644 index 00000000000..c2f5bcb1637 --- /dev/null +++ b/src/csharp/Grpc.Auth/Grpc.Auth.project.json @@ -0,0 +1,8 @@ +{ + "frameworks": { + "net45": { } + }, + "runtimes": { + "win": { } + } +} diff --git a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj index 074c9603dcf..f6c226567d9 100644 --- a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj +++ b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.csproj @@ -99,6 +99,7 @@ + Designer diff --git a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.project.json b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.project.json new file mode 100644 index 00000000000..c2f5bcb1637 --- /dev/null +++ b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.project.json @@ -0,0 +1,8 @@ +{ + "frameworks": { + "net45": { } + }, + "runtimes": { + "win": { } + } +} diff --git a/src/csharp/Grpc.Core/Grpc.Core.csproj b/src/csharp/Grpc.Core/Grpc.Core.csproj index e460f004473..1952ee37121 100644 --- a/src/csharp/Grpc.Core/Grpc.Core.csproj +++ b/src/csharp/Grpc.Core/Grpc.Core.csproj @@ -141,6 +141,7 @@ + diff --git a/src/csharp/Grpc.Core/Grpc.Core.project.json b/src/csharp/Grpc.Core/Grpc.Core.project.json new file mode 100644 index 00000000000..c2f5bcb1637 --- /dev/null +++ b/src/csharp/Grpc.Core/Grpc.Core.project.json @@ -0,0 +1,8 @@ +{ + "frameworks": { + "net45": { } + }, + "runtimes": { + "win": { } + } +} diff --git a/src/csharp/Grpc.Examples.MathClient/Grpc.Examples.MathClient.csproj b/src/csharp/Grpc.Examples.MathClient/Grpc.Examples.MathClient.csproj index 35c0646a3fd..65bf236def6 100644 --- a/src/csharp/Grpc.Examples.MathClient/Grpc.Examples.MathClient.csproj +++ b/src/csharp/Grpc.Examples.MathClient/Grpc.Examples.MathClient.csproj @@ -57,4 +57,7 @@ Grpc.Examples + + + \ No newline at end of file diff --git a/src/csharp/Grpc.Examples.MathClient/Grpc.Examples.MathClient.project.json b/src/csharp/Grpc.Examples.MathClient/Grpc.Examples.MathClient.project.json new file mode 100644 index 00000000000..c2f5bcb1637 --- /dev/null +++ b/src/csharp/Grpc.Examples.MathClient/Grpc.Examples.MathClient.project.json @@ -0,0 +1,8 @@ +{ + "frameworks": { + "net45": { } + }, + "runtimes": { + "win": { } + } +} diff --git a/src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.csproj b/src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.csproj index 74d79b44d98..26b42b6936d 100644 --- a/src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.csproj +++ b/src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.csproj @@ -57,4 +57,7 @@ Grpc.Examples + + + \ No newline at end of file diff --git a/src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.project.json b/src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.project.json new file mode 100644 index 00000000000..c2f5bcb1637 --- /dev/null +++ b/src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.project.json @@ -0,0 +1,8 @@ +{ + "frameworks": { + "net45": { } + }, + "runtimes": { + "win": { } + } +} diff --git a/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj b/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj index 3fd28c65282..4c7d89309af 100644 --- a/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj +++ b/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.csproj @@ -69,6 +69,7 @@ + diff --git a/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.project.json b/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.project.json new file mode 100644 index 00000000000..c2f5bcb1637 --- /dev/null +++ b/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.project.json @@ -0,0 +1,8 @@ +{ + "frameworks": { + "net45": { } + }, + "runtimes": { + "win": { } + } +} diff --git a/src/csharp/Grpc.Examples/Grpc.Examples.csproj b/src/csharp/Grpc.Examples/Grpc.Examples.csproj index 30170ab03c7..3dfa84e896e 100644 --- a/src/csharp/Grpc.Examples/Grpc.Examples.csproj +++ b/src/csharp/Grpc.Examples/Grpc.Examples.csproj @@ -69,6 +69,7 @@ + \ No newline at end of file diff --git a/src/csharp/Grpc.Examples/Grpc.Examples.project.json b/src/csharp/Grpc.Examples/Grpc.Examples.project.json new file mode 100644 index 00000000000..c2f5bcb1637 --- /dev/null +++ b/src/csharp/Grpc.Examples/Grpc.Examples.project.json @@ -0,0 +1,8 @@ +{ + "frameworks": { + "net45": { } + }, + "runtimes": { + "win": { } + } +} diff --git a/src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.csproj b/src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.csproj index a5ee4fdb46c..aefacfbcc01 100644 --- a/src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.csproj +++ b/src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.csproj @@ -74,6 +74,7 @@ + diff --git a/src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.project.json b/src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.project.json new file mode 100644 index 00000000000..c2f5bcb1637 --- /dev/null +++ b/src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.project.json @@ -0,0 +1,8 @@ +{ + "frameworks": { + "net45": { } + }, + "runtimes": { + "win": { } + } +} diff --git a/src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.csproj b/src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.csproj index 2697b74f59e..7db8b2d38e2 100644 --- a/src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.csproj +++ b/src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.csproj @@ -65,6 +65,7 @@ + diff --git a/src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.project.json b/src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.project.json new file mode 100644 index 00000000000..c2f5bcb1637 --- /dev/null +++ b/src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.project.json @@ -0,0 +1,8 @@ +{ + "frameworks": { + "net45": { } + }, + "runtimes": { + "win": { } + } +} diff --git a/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.csproj b/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.csproj index 339a754c02c..91fb3ce5bcf 100644 --- a/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.csproj +++ b/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.csproj @@ -83,6 +83,7 @@ + \ No newline at end of file diff --git a/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.project.json b/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.project.json new file mode 100644 index 00000000000..c2f5bcb1637 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.project.json @@ -0,0 +1,8 @@ +{ + "frameworks": { + "net45": { } + }, + "runtimes": { + "win": { } + } +} diff --git a/src/csharp/Grpc.IntegrationTesting.QpsWorker/Grpc.IntegrationTesting.QpsWorker.csproj b/src/csharp/Grpc.IntegrationTesting.QpsWorker/Grpc.IntegrationTesting.QpsWorker.csproj index 0dc2751b045..dda26a68923 100644 --- a/src/csharp/Grpc.IntegrationTesting.QpsWorker/Grpc.IntegrationTesting.QpsWorker.csproj +++ b/src/csharp/Grpc.IntegrationTesting.QpsWorker/Grpc.IntegrationTesting.QpsWorker.csproj @@ -59,5 +59,6 @@ + \ No newline at end of file diff --git a/src/csharp/Grpc.IntegrationTesting.QpsWorker/Grpc.IntegrationTesting.QpsWorker.project.json b/src/csharp/Grpc.IntegrationTesting.QpsWorker/Grpc.IntegrationTesting.QpsWorker.project.json new file mode 100644 index 00000000000..c2f5bcb1637 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.QpsWorker/Grpc.IntegrationTesting.QpsWorker.project.json @@ -0,0 +1,8 @@ +{ + "frameworks": { + "net45": { } + }, + "runtimes": { + "win": { } + } +} diff --git a/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.csproj b/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.csproj index 27a56503086..f73d99dbd1a 100644 --- a/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.csproj +++ b/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.csproj @@ -83,6 +83,7 @@ + \ No newline at end of file diff --git a/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.project.json b/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.project.json new file mode 100644 index 00000000000..c2f5bcb1637 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.project.json @@ -0,0 +1,8 @@ +{ + "frameworks": { + "net45": { } + }, + "runtimes": { + "win": { } + } +} diff --git a/src/csharp/Grpc.IntegrationTesting.StressClient/Grpc.IntegrationTesting.StressClient.csproj b/src/csharp/Grpc.IntegrationTesting.StressClient/Grpc.IntegrationTesting.StressClient.csproj index d6eba74289e..8bd3d789138 100644 --- a/src/csharp/Grpc.IntegrationTesting.StressClient/Grpc.IntegrationTesting.StressClient.csproj +++ b/src/csharp/Grpc.IntegrationTesting.StressClient/Grpc.IntegrationTesting.StressClient.csproj @@ -1,4 +1,4 @@ - + Debug @@ -57,4 +57,7 @@ Grpc.IntegrationTesting + + + \ No newline at end of file diff --git a/src/csharp/Grpc.IntegrationTesting.StressClient/Grpc.IntegrationTesting.StressClient.project.json b/src/csharp/Grpc.IntegrationTesting.StressClient/Grpc.IntegrationTesting.StressClient.project.json new file mode 100644 index 00000000000..c2f5bcb1637 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.StressClient/Grpc.IntegrationTesting.StressClient.project.json @@ -0,0 +1,8 @@ +{ + "frameworks": { + "net45": { } + }, + "runtimes": { + "win": { } + } +} diff --git a/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj index 00890494088..3a0764230d6 100644 --- a/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj +++ b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.csproj @@ -129,6 +129,7 @@ + Designer diff --git a/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.project.json b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.project.json new file mode 100644 index 00000000000..c2f5bcb1637 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.project.json @@ -0,0 +1,8 @@ +{ + "frameworks": { + "net45": { } + }, + "runtimes": { + "win": { } + } +} From c58b3bbbaf01f3492aedce5bc88cd11873a4b8a0 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 15 Jun 2016 09:47:31 -0700 Subject: [PATCH 1088/1894] rename Grpc.Dnx.sln --- src/csharp/{Grpc.Dnx.sln => Grpc.Dotnet.sln} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename src/csharp/{Grpc.Dnx.sln => Grpc.Dotnet.sln} (100%) diff --git a/src/csharp/Grpc.Dnx.sln b/src/csharp/Grpc.Dotnet.sln similarity index 100% rename from src/csharp/Grpc.Dnx.sln rename to src/csharp/Grpc.Dotnet.sln From 5ff32fa9fde85d664b60b0a9ff4d0799e2e0a2b3 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 15 Jun 2016 09:49:40 -0700 Subject: [PATCH 1089/1894] update .xproj files --- src/csharp/Grpc.Auth/Grpc.Auth.xproj | 3 +-- src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.xproj | 3 +-- src/csharp/Grpc.Core/Grpc.Core.xproj | 3 +-- .../Grpc.Examples.MathClient/Grpc.Examples.MathClient.xproj | 3 +-- .../Grpc.Examples.MathServer/Grpc.Examples.MathServer.xproj | 3 +-- src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.xproj | 3 +-- src/csharp/Grpc.Examples/Grpc.Examples.xproj | 3 +-- src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.xproj | 3 +-- src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.xproj | 3 +-- .../Grpc.IntegrationTesting.Client.xproj | 3 +-- .../Grpc.IntegrationTesting.QpsWorker.xproj | 3 +-- .../Grpc.IntegrationTesting.Server.xproj | 3 +-- .../Grpc.IntegrationTesting/Grpc.IntegrationTesting.xproj | 3 +-- 13 files changed, 13 insertions(+), 26 deletions(-) diff --git a/src/csharp/Grpc.Auth/Grpc.Auth.xproj b/src/csharp/Grpc.Auth/Grpc.Auth.xproj index c3a6fa2947b..dd3d94c574a 100644 --- a/src/csharp/Grpc.Auth/Grpc.Auth.xproj +++ b/src/csharp/Grpc.Auth/Grpc.Auth.xproj @@ -9,9 +9,8 @@ c82631ed-06d1-4458-87bc-8257d12307a8 Grpc.Auth ..\Grpc.Core\artifacts\obj\$(MSBuildProjectName) - ..\Grpc.Core\artifacts\bin\$(MSBuildProjectName)\ + .\bin\ - 2.0 diff --git a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.xproj b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.xproj index e6595118fb1..05823291542 100644 --- a/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.xproj +++ b/src/csharp/Grpc.Core.Tests/Grpc.Core.Tests.xproj @@ -9,9 +9,8 @@ 759e23b2-fc04-4695-902d-b073cded3599 Grpc.Core.Tests ..\artifacts\obj\$(MSBuildProjectName) - ..\artifacts\bin\$(MSBuildProjectName)\ + .\bin\ - 2.0 diff --git a/src/csharp/Grpc.Core/Grpc.Core.xproj b/src/csharp/Grpc.Core/Grpc.Core.xproj index f5d1bf2eef5..137236ffdb6 100644 --- a/src/csharp/Grpc.Core/Grpc.Core.xproj +++ b/src/csharp/Grpc.Core/Grpc.Core.xproj @@ -9,9 +9,8 @@ dc9908b6-f291-4fc8-a46d-2ea2551790ec Grpc.Core ..\artifacts\obj\$(MSBuildProjectName) - ..\artifacts\bin\$(MSBuildProjectName)\ + .\bin\ - 2.0 diff --git a/src/csharp/Grpc.Examples.MathClient/Grpc.Examples.MathClient.xproj b/src/csharp/Grpc.Examples.MathClient/Grpc.Examples.MathClient.xproj index a8dc195a6dc..4655bd43774 100644 --- a/src/csharp/Grpc.Examples.MathClient/Grpc.Examples.MathClient.xproj +++ b/src/csharp/Grpc.Examples.MathClient/Grpc.Examples.MathClient.xproj @@ -9,9 +9,8 @@ fd48deca-1622-4173-b1d9-2101cf5e7c5f Grpc.Examples.MathClient ..\artifacts\obj\$(MSBuildProjectName) - ..\artifacts\bin\$(MSBuildProjectName)\ + .\bin\ - 2.0 diff --git a/src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.xproj b/src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.xproj index 40746f1f946..38a449e8f29 100644 --- a/src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.xproj +++ b/src/csharp/Grpc.Examples.MathServer/Grpc.Examples.MathServer.xproj @@ -9,9 +9,8 @@ 58579368-5372-4e67-acd6-9b59cb9fa698 Grpc.Examples.MathServer ..\artifacts\obj\$(MSBuildProjectName) - ..\artifacts\bin\$(MSBuildProjectName)\ + .\bin\ - 2.0 diff --git a/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.xproj b/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.xproj index c744816a811..9cecd18b2e4 100644 --- a/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.xproj +++ b/src/csharp/Grpc.Examples.Tests/Grpc.Examples.Tests.xproj @@ -9,9 +9,8 @@ c61714a6-f633-44fb-97f4-c91f425c1d15 Grpc.Examples.Tests ..\artifacts\obj\$(MSBuildProjectName) - ..\artifacts\bin\$(MSBuildProjectName)\ + .\bin\ - 2.0 diff --git a/src/csharp/Grpc.Examples/Grpc.Examples.xproj b/src/csharp/Grpc.Examples/Grpc.Examples.xproj index aa3ad680fd8..d1d7e6d9816 100644 --- a/src/csharp/Grpc.Examples/Grpc.Examples.xproj +++ b/src/csharp/Grpc.Examples/Grpc.Examples.xproj @@ -9,9 +9,8 @@ c77b792d-fc78-4ce2-9522-b40b0803c636 Grpc.Examples ..\artifacts\obj\$(MSBuildProjectName) - ..\artifacts\bin\$(MSBuildProjectName)\ + .\bin\ - 2.0 diff --git a/src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.xproj b/src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.xproj index db05ccf7a4f..724c5b2a160 100644 --- a/src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.xproj +++ b/src/csharp/Grpc.HealthCheck.Tests/Grpc.HealthCheck.Tests.xproj @@ -9,9 +9,8 @@ 43dafac6-5343-4621-960e-a8a977ea3f0b Grpc.HealthCheck.Tests ..\artifacts\obj\$(MSBuildProjectName) - ..\artifacts\bin\$(MSBuildProjectName)\ + .\bin\ - 2.0 diff --git a/src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.xproj b/src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.xproj index 18701779d19..5806a7af979 100644 --- a/src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.xproj +++ b/src/csharp/Grpc.HealthCheck/Grpc.HealthCheck.xproj @@ -9,9 +9,8 @@ 3be4ad0b-2bf0-4d68-b625-f6018ef0dcfa Grpc.HealthCheck ..\artifacts\obj\$(MSBuildProjectName) - ..\artifacts\bin\$(MSBuildProjectName)\ + .\bin\ - 2.0 diff --git a/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.xproj b/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.xproj index 82e044ec212..7f456cfaef1 100644 --- a/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.xproj +++ b/src/csharp/Grpc.IntegrationTesting.Client/Grpc.IntegrationTesting.Client.xproj @@ -9,9 +9,8 @@ 48ea5bbe-70e2-4198-869d-d7e59c45f30d Grpc.IntegrationTesting.Client ..\artifacts\obj\$(MSBuildProjectName) - ..\artifacts\bin\$(MSBuildProjectName)\ + .\bin\ - 2.0 diff --git a/src/csharp/Grpc.IntegrationTesting.QpsWorker/Grpc.IntegrationTesting.QpsWorker.xproj b/src/csharp/Grpc.IntegrationTesting.QpsWorker/Grpc.IntegrationTesting.QpsWorker.xproj index 7348004c982..15bec443d6c 100644 --- a/src/csharp/Grpc.IntegrationTesting.QpsWorker/Grpc.IntegrationTesting.QpsWorker.xproj +++ b/src/csharp/Grpc.IntegrationTesting.QpsWorker/Grpc.IntegrationTesting.QpsWorker.xproj @@ -9,9 +9,8 @@ 661b70d7-f56a-46e0-9b81-6227b591b5e7 Grpc.IntegrationTesting.QpsWorker ..\artifacts\obj\$(MSBuildProjectName) - ..\artifacts\bin\$(MSBuildProjectName)\ + .\bin\ - 2.0 diff --git a/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.xproj b/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.xproj index fc43c41fd89..689eb0b8425 100644 --- a/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.xproj +++ b/src/csharp/Grpc.IntegrationTesting.Server/Grpc.IntegrationTesting.Server.xproj @@ -9,9 +9,8 @@ 881f7ad1-a84e-47a2-9402-115c63c4031e Grpc.IntegrationTesting.Server ..\artifacts\obj\$(MSBuildProjectName) - ..\artifacts\bin\$(MSBuildProjectName)\ + .\bin\ - 2.0 diff --git a/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.xproj b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.xproj index 69e89fa5770..357300ecb9b 100644 --- a/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.xproj +++ b/src/csharp/Grpc.IntegrationTesting/Grpc.IntegrationTesting.xproj @@ -9,9 +9,8 @@ 20354386-3e71-4046-a269-3bc2a06f3ec8 Grpc.IntegrationTesting ..\artifacts\obj\$(MSBuildProjectName) - ..\artifacts\bin\$(MSBuildProjectName)\ + .\bin\ - 2.0 From ae7b048de4c6b8691dcd89b1a4442aa08ce3392d Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 15 Jun 2016 09:52:57 -0700 Subject: [PATCH 1090/1894] upgrade protobuf to 3.0.0-beta3 in project.json files --- src/csharp/Grpc.Examples/project.json | 2 +- src/csharp/Grpc.HealthCheck/project.json | 2 +- src/csharp/Grpc.IntegrationTesting/project.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/csharp/Grpc.Examples/project.json b/src/csharp/Grpc.Examples/project.json index c78de89cf89..f259459a717 100644 --- a/src/csharp/Grpc.Examples/project.json +++ b/src/csharp/Grpc.Examples/project.json @@ -5,7 +5,7 @@ "dependencies": { "Grpc.Core": "0.0.1", - "Google.Protobuf": "3.0.0-beta2" + "Google.Protobuf": "3.0.0-beta3" }, "frameworks": { "net45": { }, diff --git a/src/csharp/Grpc.HealthCheck/project.json b/src/csharp/Grpc.HealthCheck/project.json index 0984d43deca..220224819f8 100644 --- a/src/csharp/Grpc.HealthCheck/project.json +++ b/src/csharp/Grpc.HealthCheck/project.json @@ -16,7 +16,7 @@ "dependencies": { "Grpc.Core": "0.14.0-anexperiment", - "Google.Protobuf": "3.0.0-beta2" + "Google.Protobuf": "3.0.0-beta3" }, "frameworks": { "net45": { }, diff --git a/src/csharp/Grpc.IntegrationTesting/project.json b/src/csharp/Grpc.IntegrationTesting/project.json index f2cda96e7be..93cabf21bcf 100644 --- a/src/csharp/Grpc.IntegrationTesting/project.json +++ b/src/csharp/Grpc.IntegrationTesting/project.json @@ -9,7 +9,7 @@ "dependencies": { "Grpc.Auth": "0.0.1", "Grpc.Core": "0.0.1", - "Google.Protobuf": "3.0.0-beta2", + "Google.Protobuf": "3.0.0-beta3", "CommandLineParser": "1.9.71", "Moq": "4.2.1510.2205", "NUnit": "3.2.0", From c7ab6dba009a07a68d0c5f81a88613439be45406 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 15 Jun 2016 10:04:12 -0700 Subject: [PATCH 1091/1894] Add a byte to avert a crash (which should be investigated sometime) --- test/core/iomgr/endpoint_tests.c | 1 + 1 file changed, 1 insertion(+) diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c index bf3d19c6fc3..35c647a4543 100644 --- a/test/core/iomgr/endpoint_tests.c +++ b/test/core/iomgr/endpoint_tests.c @@ -277,6 +277,7 @@ static void multiple_shutdown_test(grpc_endpoint_test_config config) { grpc_closure_create(inc_on_failure, &fail_count)); grpc_exec_ctx_flush(&exec_ctx); GPR_ASSERT(fail_count == 2); + gpr_slice_buffer_add(&slice_buffer, gpr_slice_from_copied_string("a")); grpc_endpoint_write(&exec_ctx, f.client_ep, &slice_buffer, grpc_closure_create(inc_on_failure, &fail_count)); grpc_exec_ctx_flush(&exec_ctx); From a9d8fef0397295a9f9fd3433a4d9ce02f2396093 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 15 Jun 2016 10:05:22 -0700 Subject: [PATCH 1092/1894] Fix merge error --- src/core/lib/iomgr/error.c | 2 +- src/core/lib/iomgr/ev_poll_and_epoll_posix.c | 3 ++- src/core/lib/iomgr/ev_poll_posix.c | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index 68b44667e5b..540fb4fa7e4 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -421,7 +421,7 @@ static char *fmt_time(void *p) { pfx = ""; break; } - gpr_asprintf(&out, "\"%s%d.%09d\"", pfx, tm.tv_sec, tm.tv_nsec); + gpr_asprintf(&out, "\"%s%" PRId64 ".%09d\"", pfx, tm.tv_sec, tm.tv_nsec); return out; } diff --git a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c index 40a232c5e9f..9e306af5fac 100644 --- a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c +++ b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c @@ -526,7 +526,8 @@ static grpc_error *fd_shutdown_error(bool shutdown) { static void notify_on_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st, grpc_closure *closure) { if (fd->shutdown) { - grpc_exec_ctx_enqueue(exec_ctx, closure, false, NULL); + grpc_exec_ctx_sched(exec_ctx, closure, GRPC_ERROR_CREATE("FD shutdown"), + NULL); } else if (*st == CLOSURE_NOT_READY) { /* not ready ==> switch to a waiting state by setting the closure */ *st = closure; diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 1f4336946fd..45c0a5e9546 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -431,7 +431,8 @@ static grpc_error *fd_shutdown_error(bool shutdown) { static void notify_on_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st, grpc_closure *closure) { if (fd->shutdown) { - grpc_exec_ctx_enqueue(exec_ctx, closure, false, NULL); + grpc_exec_ctx_sched(exec_ctx, closure, GRPC_ERROR_CREATE("FD shutdown"), + NULL); } else if (*st == CLOSURE_NOT_READY) { /* not ready ==> switch to a waiting state by setting the closure */ *st = closure; From 7dce09255d3862979b7009e26ef0d562dcdea589 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 15 Jun 2016 10:11:11 -0700 Subject: [PATCH 1093/1894] Fix merge errors --- src/core/ext/client_config/subchannel.c | 4 ++-- src/core/lib/security/transport/handshake.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c index 42ed9945732..468067ea57c 100644 --- a/src/core/ext/client_config/subchannel.c +++ b/src/core/ext/client_config/subchannel.c @@ -644,8 +644,8 @@ static void subchannel_connected(grpc_exec_ctx *exec_ctx, void *arg, 0) { gpr_log(GPR_INFO, "Retry immediately"); } else { - gpr_log(GPR_INFO, "Retry in %d.%09d seconds", time_til_next.tv_sec, - time_til_next.tv_nsec); + gpr_log(GPR_INFO, "Retry in %" PRId64 ".%09d seconds", + time_til_next.tv_sec, time_til_next.tv_nsec); } grpc_timer_init(exec_ctx, &c->alarm, c->next_attempt, on_alarm, c, now); grpc_error_free_string(errmsg); diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c index 2e91206e59f..45af6cb08af 100644 --- a/src/core/lib/security/transport/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -71,7 +71,7 @@ static void dump_state(const char *state, grpc_security_handshake *h, gpr_timespec ttl = gpr_time_sub(h->timer.deadline, gpr_now(h->timer.deadline.clock_type)); const char *msg = grpc_error_string(error); - gpr_log(GPR_DEBUG, "%p: %s ttl=%d.%09d err=%s", h, state, ttl.tv_sec, + gpr_log(GPR_DEBUG, "%p: %s ttl=%" PRId64 ".%09d err=%s", h, state, ttl.tv_sec, ttl.tv_nsec, msg); grpc_error_free_string(msg); GRPC_ERROR_UNREF(error); From efa8430e39be4c3fe12085846b044a2e5de5cbe9 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 15 Jun 2016 10:23:34 -0700 Subject: [PATCH 1094/1894] Enforce gcc-4.4 compatibility on test_credentials_provider by changing a map to 2 vectors. Additional minor changes needed (e.g., override->GRPC_OVERRIDE, nullptr->grpc::nullptr) --- test/cpp/util/test_credentials_provider.cc | 56 ++++++++++++++-------- 1 file changed, 35 insertions(+), 21 deletions(-) diff --git a/test/cpp/util/test_credentials_provider.cc b/test/cpp/util/test_credentials_provider.cc index 9c09a73115b..fa572cb9cac 100644 --- a/test/cpp/util/test_credentials_provider.cc +++ b/test/cpp/util/test_credentials_provider.cc @@ -69,19 +69,27 @@ class CredentialsProvider { class DefaultCredentialsProvider : public CredentialsProvider { public: - ~DefaultCredentialsProvider() override {} + ~DefaultCredentialsProvider() GRPC_OVERRIDE {} - void AddSecureType( - const grpc::string& type, - std::unique_ptr type_provider) override { + void AddSecureType(const grpc::string& type, + std::unique_ptr type_provider) + GRPC_OVERRIDE { // This clobbers any existing entry for type, except the defaults, which // can't be clobbered. grpc::unique_lock lock(mu_); - added_secure_types_[type] = std::move(type_provider); + auto it = std::find(added_secure_type_names_.begin(), + added_secure_type_names_.end(), type); + if (it == added_secure_type_names_.end()) { + added_secure_type_names_.push_back(type); + added_secure_type_providers_.push_back(std::move(type_provider)); + } else { + added_secure_type_providers_[it - added_secure_type_names_.begin()] = + std::move(type_provider); + } } std::shared_ptr GetChannelCredentials( - const grpc::string& type, ChannelArguments* args) override { + const grpc::string& type, ChannelArguments* args) GRPC_OVERRIDE { if (type == grpc::testing::kInsecureCredentialsType) { return InsecureChannelCredentials(); } else if (type == grpc::testing::kTlsCredentialsType) { @@ -90,17 +98,19 @@ class DefaultCredentialsProvider : public CredentialsProvider { return SslCredentials(ssl_opts); } else { grpc::unique_lock lock(mu_); - auto it(added_secure_types_.find(type)); - if (it == added_secure_types_.end()) { + auto it(std::find(added_secure_type_names_.begin(), + added_secure_type_names_.end(), type)); + if (it == added_secure_type_names_.end()) { gpr_log(GPR_ERROR, "Unsupported credentials type %s.", type.c_str()); - return nullptr; + return grpc::nullptr; } - return it->second->GetChannelCredentials(args); + return added_secure_type_providers_[it - added_secure_type_names_.begin()] + ->GetChannelCredentials(args); } } std::shared_ptr GetServerCredentials( - const grpc::string& type) override { + const grpc::string& type) GRPC_OVERRIDE { if (type == grpc::testing::kInsecureCredentialsType) { return InsecureServerCredentials(); } else if (type == grpc::testing::kTlsCredentialsType) { @@ -112,32 +122,36 @@ class DefaultCredentialsProvider : public CredentialsProvider { return SslServerCredentials(ssl_opts); } else { grpc::unique_lock lock(mu_); - auto it(added_secure_types_.find(type)); - if (it == added_secure_types_.end()) { + auto it(std::find(added_secure_type_names_.begin(), + added_secure_type_names_.end(), type)); + if (it == added_secure_type_names_.end()) { gpr_log(GPR_ERROR, "Unsupported credentials type %s.", type.c_str()); - return nullptr; + return grpc::nullptr; } - return it->second->GetServerCredentials(); + return added_secure_type_providers_[it - added_secure_type_names_.begin()] + ->GetServerCredentials(); } } - std::vector GetSecureCredentialsTypeList() override { + std::vector GetSecureCredentialsTypeList() GRPC_OVERRIDE { std::vector types; types.push_back(grpc::testing::kTlsCredentialsType); grpc::unique_lock lock(mu_); - for (const auto& type_pair : added_secure_types_) { - types.push_back(type_pair.first); + for (auto it = added_secure_type_names_.begin(); + it != added_secure_type_names_.end(); it++) { + types.push_back(*it); } return types; } private: grpc::mutex mu_; - std::unordered_map > - added_secure_types_; + std::vector added_secure_type_names_; + std::vector> + added_secure_type_providers_; }; gpr_once g_once_init_provider = GPR_ONCE_INIT; -CredentialsProvider* g_provider = nullptr; +CredentialsProvider* g_provider = grpc::nullptr; void CreateDefaultProvider() { g_provider = new DefaultCredentialsProvider; } From 9aa5f23645b624f22ef66150600bd1772c8d2654 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 15 Jun 2016 10:50:23 -0700 Subject: [PATCH 1095/1894] Switch out a using with a typedef --- test/cpp/interop/interop_client.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/cpp/interop/interop_client.h b/test/cpp/interop/interop_client.h index ae75762bb8f..c8d6810c12e 100644 --- a/test/cpp/interop/interop_client.h +++ b/test/cpp/interop/interop_client.h @@ -45,9 +45,9 @@ namespace grpc { namespace testing { // Function pointer for custom checks. -using CheckerFn = - std::function; +typedef std::function + CheckerFn; class InteropClient { public: From 06ea541ed955e931668a032fc5d9ac096d37e088 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 15 Jun 2016 10:57:50 -0700 Subject: [PATCH 1096/1894] Provide nullptr->std::function cast --- include/grpc++/impl/codegen/config.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/grpc++/impl/codegen/config.h b/include/grpc++/impl/codegen/config.h index d782d5f5713..cf88efa1d16 100644 --- a/include/grpc++/impl/codegen/config.h +++ b/include/grpc++/impl/codegen/config.h @@ -78,6 +78,7 @@ #endif #ifdef GRPC_CXX0X_NO_NULLPTR +#include #include namespace grpc { const class { @@ -95,6 +96,10 @@ const class { return std::shared_ptr(static_cast(0)); } operator bool() const { return false; } + template + operator std::function() const { + return std::function(); + } private: void operator&() const = delete; From 08e071abe086ec26fc99b55c2d3284f02eace575 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 15 Jun 2016 10:58:15 -0700 Subject: [PATCH 1097/1894] Specify template parent explicitly --- test/cpp/qps/client_async.cc | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index 6ad4c320b55..3d98ab09390 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -249,7 +249,8 @@ class AsyncUnaryClient GRPC_FINAL : public AsyncClient { public: explicit AsyncUnaryClient(const ClientConfig& config) - : AsyncClient(config, SetupCtx, BenchmarkStubCreator) { + : AsyncClient( + config, SetupCtx, BenchmarkStubCreator) { StartThreads(num_async_threads_); } ~AsyncUnaryClient() GRPC_OVERRIDE { EndThreads(); } @@ -376,7 +377,8 @@ class AsyncStreamingClient GRPC_FINAL : public AsyncClient { public: explicit AsyncStreamingClient(const ClientConfig& config) - : AsyncClient(config, SetupCtx, BenchmarkStubCreator) { + : AsyncClient( + config, SetupCtx, BenchmarkStubCreator) { StartThreads(num_async_threads_); } @@ -511,7 +513,8 @@ class GenericAsyncStreamingClient GRPC_FINAL : public AsyncClient { public: explicit GenericAsyncStreamingClient(const ClientConfig& config) - : AsyncClient(config, SetupCtx, GenericStubCreator) { + : AsyncClient(config, SetupCtx, + GenericStubCreator) { StartThreads(num_async_threads_); } From 43b6373b427b987afd15b72c68533700aa624b44 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 15 Jun 2016 11:19:29 -0700 Subject: [PATCH 1098/1894] Add well known protos to Node and Ruby tools packages --- src/node/tools/package.json | 1 + tools/run_tests/build_package_node.sh | 6 ++++++ tools/run_tests/build_package_ruby.sh | 7 ++++++- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/node/tools/package.json b/src/node/tools/package.json index d4849c2e388..c34b259e2e0 100644 --- a/src/node/tools/package.json +++ b/src/node/tools/package.json @@ -34,6 +34,7 @@ "index.js", "bin/protoc.js", "bin/protoc_plugin.js", + "bin/google/protobuf", "LICENSE" ], "main": "index.js" diff --git a/tools/run_tests/build_package_node.sh b/tools/run_tests/build_package_node.sh index 4646072a545..1d60d72de40 100755 --- a/tools/run_tests/build_package_node.sh +++ b/tools/run_tests/build_package_node.sh @@ -58,6 +58,8 @@ tools_version=$(npm list | grep -oP '(?<=grpc-tools@)\S+') output_dir=$artifacts/grpc-precompiled-binaries/node/grpc-tools/v$tools_version mkdir -p $output_dir +well_known_protos=( any api compiler/plugin descriptor duration empty field_mask source_context struct timestamp type wrappers ) + for arch in {x86,x64}; do case arch in x86) @@ -83,6 +85,10 @@ for arch in {x86,x64}; do input_dir="$EXTERNAL_GIT_ROOT/architecture=$arch,language=protoc,platform=$plat/artifacts" cp $input_dir/protoc* bin/ cp $input_dir/grpc_node_plugin* bin/ + mkdir -p bin/google/protobuf + for proto in "${well_known_protos[@]}"; do + cp $base/third_party/protobuf/src/google/protobuf/$proto.proto bin/google/protobuf/ + done tar -czf $output_dir/$node_plat-$node_arch.tar.gz bin/ done done diff --git a/tools/run_tests/build_package_ruby.sh b/tools/run_tests/build_package_ruby.sh index e44428bf7e3..e55ec0e0919 100755 --- a/tools/run_tests/build_package_ruby.sh +++ b/tools/run_tests/build_package_ruby.sh @@ -40,6 +40,8 @@ mkdir -p artifacts/ # and we only collect them here to deliver them to the distribtest phase. cp -r $EXTERNAL_GIT_ROOT/architecture={x86,x64},language=ruby,platform={windows,linux,macos}/artifacts/* artifacts/ || true +well_known_protos=( any api compiler/plugin descriptor duration empty field_mask source_context struct timestamp type wrappers ) + # TODO: all the artifact builder configurations generate a grpc-VERSION.gem # source distribution package, and only one of them will end up # in the artifacts/ directory. They should be all equivalent though. @@ -56,9 +58,12 @@ for arch in {x86,x64}; do for plat in {windows,linux,macos}; do input_dir="$EXTERNAL_GIT_ROOT/architecture=$arch,language=protoc,platform=$plat/artifacts" output_dir="$base/src/ruby/tools/bin/${ruby_arch}-${plat}" - mkdir -p $output_dir + mkdir -p $output_dir/google/protobuf cp $input_dir/protoc* $output_dir/ cp $input_dir/grpc_ruby_plugin* $output_dir/ + for proto in "${well_known_protos[@]}"; do + cp $base/third_party/protobuf/src/google/protobuf/$proto.proto $output_dir/google/protobuf/ + done done done From f66c6d074770870d7dc7f56f018bd9d8cdc38669 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 15 Jun 2016 11:21:58 -0700 Subject: [PATCH 1099/1894] Fix compiler/plugin.proto copying to the wrong place --- tools/run_tests/build_package_node.sh | 2 +- tools/run_tests/build_package_ruby.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/run_tests/build_package_node.sh b/tools/run_tests/build_package_node.sh index 1d60d72de40..7d47af7b701 100755 --- a/tools/run_tests/build_package_node.sh +++ b/tools/run_tests/build_package_node.sh @@ -87,7 +87,7 @@ for arch in {x86,x64}; do cp $input_dir/grpc_node_plugin* bin/ mkdir -p bin/google/protobuf for proto in "${well_known_protos[@]}"; do - cp $base/third_party/protobuf/src/google/protobuf/$proto.proto bin/google/protobuf/ + cp $base/third_party/protobuf/src/google/protobuf/$proto.proto bin/google/protobuf/$proto.proto done tar -czf $output_dir/$node_plat-$node_arch.tar.gz bin/ done diff --git a/tools/run_tests/build_package_ruby.sh b/tools/run_tests/build_package_ruby.sh index e55ec0e0919..4116e29debb 100755 --- a/tools/run_tests/build_package_ruby.sh +++ b/tools/run_tests/build_package_ruby.sh @@ -62,7 +62,7 @@ for arch in {x86,x64}; do cp $input_dir/protoc* $output_dir/ cp $input_dir/grpc_ruby_plugin* $output_dir/ for proto in "${well_known_protos[@]}"; do - cp $base/third_party/protobuf/src/google/protobuf/$proto.proto $output_dir/google/protobuf/ + cp $base/third_party/protobuf/src/google/protobuf/$proto.proto $output_dir/google/protobuf/$proto.proto done done done From cf4205dff54d8e3920f98dac28049770b5f8f044 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 15 Jun 2016 11:22:20 -0700 Subject: [PATCH 1100/1894] Compilation error --- src/core/lib/iomgr/ev_epoll_linux.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 006c2a8ee7f..1fb59474640 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -317,7 +317,7 @@ static void polling_island_remove_all_fds_locked(polling_island *pi, if (err < 0 && errno != ENOENT) { /* TODO: sreek - We need a better way to bubble up this error instead of * just logging a message */ - gpr_log(GPR_ERROR, "epoll_ctl deleting fds[%d]: %d failed with error: %s", + gpr_log(GPR_ERROR, "epoll_ctl deleting fds[%zu]: %d failed with error: %s", i, pi->fds[i]->fd, strerror(errno)); } From 245e997084d04f3aef839327506a5a070e08ba14 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 15 Jun 2016 11:23:09 -0700 Subject: [PATCH 1101/1894] Change cleanup step in node package build to account for well known protos --- tools/run_tests/build_package_node.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/build_package_node.sh b/tools/run_tests/build_package_node.sh index 7d47af7b701..6f7211b53fe 100755 --- a/tools/run_tests/build_package_node.sh +++ b/tools/run_tests/build_package_node.sh @@ -81,7 +81,7 @@ for arch in {x86,x64}; do node_plat=$plat ;; esac - rm bin/* + rm -r bin/* input_dir="$EXTERNAL_GIT_ROOT/architecture=$arch,language=protoc,platform=$plat/artifacts" cp $input_dir/protoc* bin/ cp $input_dir/grpc_node_plugin* bin/ From 12bf3801b8dd298a2cfd89f45499d5f681e27ed6 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 15 Jun 2016 11:24:10 -0700 Subject: [PATCH 1102/1894] Got carried away with grpc:: --- test/cpp/util/test_credentials_provider.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test/cpp/util/test_credentials_provider.cc b/test/cpp/util/test_credentials_provider.cc index fa572cb9cac..9d762ce6576 100644 --- a/test/cpp/util/test_credentials_provider.cc +++ b/test/cpp/util/test_credentials_provider.cc @@ -102,7 +102,7 @@ class DefaultCredentialsProvider : public CredentialsProvider { added_secure_type_names_.end(), type)); if (it == added_secure_type_names_.end()) { gpr_log(GPR_ERROR, "Unsupported credentials type %s.", type.c_str()); - return grpc::nullptr; + return nullptr; } return added_secure_type_providers_[it - added_secure_type_names_.begin()] ->GetChannelCredentials(args); @@ -126,7 +126,7 @@ class DefaultCredentialsProvider : public CredentialsProvider { added_secure_type_names_.end(), type)); if (it == added_secure_type_names_.end()) { gpr_log(GPR_ERROR, "Unsupported credentials type %s.", type.c_str()); - return grpc::nullptr; + return nullptr; } return added_secure_type_providers_[it - added_secure_type_names_.begin()] ->GetServerCredentials(); @@ -151,7 +151,7 @@ class DefaultCredentialsProvider : public CredentialsProvider { }; gpr_once g_once_init_provider = GPR_ONCE_INIT; -CredentialsProvider* g_provider = grpc::nullptr; +CredentialsProvider* g_provider = nullptr; void CreateDefaultProvider() { g_provider = new DefaultCredentialsProvider; } From a63271c77f7ee4802761535f8c844f789328ad9f Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 15 Jun 2016 12:56:38 -0700 Subject: [PATCH 1103/1894] Deal with to_string, proper usage of nullptr, and lack of map::emplace --- include/grpc++/impl/codegen/config.h | 12 ++++++++++++ test/cpp/end2end/async_end2end_test.cc | 4 ++-- test/cpp/end2end/end2end_test.cc | 12 ++++++------ test/cpp/end2end/test_service_impl.cc | 3 ++- test/cpp/end2end/thread_stress_test.cc | 4 ++-- test/cpp/util/metrics_server.cc | 4 ++-- test/cpp/util/test_credentials_provider.cc | 9 +-------- 7 files changed, 27 insertions(+), 21 deletions(-) diff --git a/include/grpc++/impl/codegen/config.h b/include/grpc++/impl/codegen/config.h index cf88efa1d16..0c754388681 100644 --- a/include/grpc++/impl/codegen/config.h +++ b/include/grpc++/impl/codegen/config.h @@ -54,6 +54,7 @@ // nullptr was added in gcc 4.6 #if (__GNUC__ * 100 + __GNUC_MINOR__ < 406) #define GRPC_CXX0X_NO_NULLPTR 1 +#define GRPC_CXX0X_LIMITED_TOSTRING 1 #endif // final and override were added in gcc 4.7 #if (__GNUC__ * 100 + __GNUC_MINOR__ < 407) @@ -116,6 +117,17 @@ namespace grpc { typedef GRPC_CUSTOM_STRING string; +#ifdef GRPC_CXX0X_LIMITED_TOSTRING +inline grpc::string to_string(const int x) { + return std::to_string(static_cast(x)); +} +inline grpc::string to_string(const unsigned int x) { + return std::to_string(static_cast(x)); +} +#else +using std::to_string; +#endif + } // namespace grpc #endif // GRPCXX_IMPL_CODEGEN_CONFIG_H diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index 535d8d5d3dc..2e0c9da1074 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -938,7 +938,7 @@ class AsyncEnd2endServerTryCancelTest : public AsyncEnd2endTest { // Client sends 3 messages (tags 3, 4 and 5) for (int tag_idx = 3; tag_idx <= 5; tag_idx++) { - send_request.set_message("Ping " + std::to_string(tag_idx)); + send_request.set_message("Ping " + grpc::to_string(tag_idx)); cli_stream->Write(send_request, tag(tag_idx)); Verifier(GetParam().disable_blocking) .Expect(tag_idx, true) @@ -1104,7 +1104,7 @@ class AsyncEnd2endServerTryCancelTest : public AsyncEnd2endTest { // Server sends three messages (tags 3, 4 and 5) // But if want_done tag is true, we might also see tag 11 for (int tag_idx = 3; tag_idx <= 5; tag_idx++) { - send_response.set_message("Pong " + std::to_string(tag_idx)); + send_response.set_message("Pong " + grpc::to_string(tag_idx)); srv_stream.Write(send_response, tag(tag_idx)); // Note that we'll add something to the verifier and verify that // something was seen, but it might be tag 11 and not what we diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index f52aa52f39f..81318866c9e 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -329,7 +329,7 @@ class End2endServerTryCancelTest : public End2endTest { // Send server_try_cancel value in the client metadata context.AddMetadata(kServerTryCancelRequest, - std::to_string(server_try_cancel)); + grpc::to_string(server_try_cancel)); auto stream = stub_->RequestStream(&context, &response); @@ -402,7 +402,7 @@ class End2endServerTryCancelTest : public End2endTest { // Send server_try_cancel in the client metadata context.AddMetadata(kServerTryCancelRequest, - std::to_string(server_try_cancel)); + grpc::to_string(server_try_cancel)); request.set_message("hello"); auto stream = stub_->ResponseStream(&context, request); @@ -413,7 +413,7 @@ class End2endServerTryCancelTest : public End2endTest { break; } EXPECT_EQ(response.message(), - request.message() + std::to_string(num_msgs_read)); + request.message() + grpc::to_string(num_msgs_read)); num_msgs_read++; } gpr_log(GPR_INFO, "Read %d messages", num_msgs_read); @@ -479,14 +479,14 @@ class End2endServerTryCancelTest : public End2endTest { // Send server_try_cancel in the client metadata context.AddMetadata(kServerTryCancelRequest, - std::to_string(server_try_cancel)); + grpc::to_string(server_try_cancel)); auto stream = stub_->BidiStream(&context); int num_msgs_read = 0; int num_msgs_sent = 0; while (num_msgs_sent < num_messages) { - request.set_message("hello " + std::to_string(num_msgs_sent)); + request.set_message("hello " + grpc::to_string(num_msgs_sent)); if (!stream->Write(request)) { break; } @@ -548,7 +548,7 @@ TEST_P(End2endServerTryCancelTest, RequestEchoServerCancel) { ClientContext context; context.AddMetadata(kServerTryCancelRequest, - std::to_string(CANCEL_BEFORE_PROCESSING)); + grpc::to_string(CANCEL_BEFORE_PROCESSING)); Status s = stub_->Echo(&context, request, &response); EXPECT_FALSE(s.ok()); EXPECT_EQ(grpc::StatusCode::CANCELLED, s.error_code()); diff --git a/test/cpp/end2end/test_service_impl.cc b/test/cpp/end2end/test_service_impl.cc index cbaee922289..52abd80d690 100644 --- a/test/cpp/end2end/test_service_impl.cc +++ b/test/cpp/end2end/test_service_impl.cc @@ -33,6 +33,7 @@ #include "test/cpp/end2end/test_service_impl.h" +#include #include #include @@ -253,7 +254,7 @@ Status TestServiceImpl::ResponseStream(ServerContext* context, } for (int i = 0; i < kNumResponseStreamsMsgs; i++) { - response.set_message(request->message() + std::to_string(i)); + response.set_message(request->message() + grpc::to_string(i)); writer->Write(response); } diff --git a/test/cpp/end2end/thread_stress_test.cc b/test/cpp/end2end/thread_stress_test.cc index 94541f9a453..1e73f88917b 100644 --- a/test/cpp/end2end/thread_stress_test.cc +++ b/test/cpp/end2end/thread_stress_test.cc @@ -230,7 +230,7 @@ class CommonStressTestSyncServer : public CommonStressTest { }; class CommonStressTestAsyncServer - : public CommonStressTest<::grpc::testing::EchoTestService::AsyncService> { + : public CommonStressTest< ::grpc::testing::EchoTestService::AsyncService> { public: void SetUp() GRPC_OVERRIDE { shutting_down_ = false; @@ -394,7 +394,7 @@ class AsyncClientEnd2endTest : public ::testing::Test { for (int i = 0; i < num_rpcs; ++i) { AsyncClientCall* call = new AsyncClientCall; EchoRequest request; - request.set_message("Hello: " + std::to_string(i)); + request.set_message("Hello: " + grpc::to_string(i)); call->response_reader = common_.GetStub()->AsyncEcho(&call->context, request, &cq_); call->response_reader->Finish(&call->response, &call->status, diff --git a/test/cpp/util/metrics_server.cc b/test/cpp/util/metrics_server.cc index cc6b39b7532..1c7cd6382a8 100644 --- a/test/cpp/util/metrics_server.cc +++ b/test/cpp/util/metrics_server.cc @@ -99,7 +99,7 @@ std::shared_ptr MetricsServiceImpl::CreateQpsGauge( std::lock_guard lock(mu_); std::shared_ptr qps_gauge(new QpsGauge()); - const auto p = qps_gauges_.emplace(name, qps_gauge); + const auto p = qps_gauges_.insert(std::make_pair(name, qps_gauge)); // p.first is an iterator pointing to > pair. // p.second is a boolean which is set to 'true' if the QpsGauge is @@ -114,7 +114,7 @@ std::shared_ptr MetricsServiceImpl::CreateQpsGauge( std::unique_ptr MetricsServiceImpl::StartServer(int port) { gpr_log(GPR_INFO, "Building metrics server.."); - const grpc::string address = "0.0.0.0:" + std::to_string(port); + const grpc::string address = "0.0.0.0:" + grpc::to_string(port); ServerBuilder builder; builder.AddListeningPort(address, grpc::InsecureServerCredentials()); diff --git a/test/cpp/util/test_credentials_provider.cc b/test/cpp/util/test_credentials_provider.cc index 9d762ce6576..6e68f59e6ac 100644 --- a/test/cpp/util/test_credentials_provider.cc +++ b/test/cpp/util/test_credentials_provider.cc @@ -41,15 +41,9 @@ #include "test/core/end2end/data/ssl_test_data.h" +namespace grpc { namespace { -using grpc::ChannelArguments; -using grpc::ChannelCredentials; -using grpc::InsecureChannelCredentials; -using grpc::InsecureServerCredentials; -using grpc::ServerCredentials; -using grpc::SslCredentialsOptions; -using grpc::SslServerCredentialsOptions; using grpc::testing::CredentialTypeProvider; // Provide test credentials. Thread-safe. @@ -162,7 +156,6 @@ CredentialsProvider* GetProvider() { } // namespace -namespace grpc { namespace testing { void AddSecureType(const grpc::string& type, From 679c75f0a67d65f115bb44521f49da3db14c2ad2 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 15 Jun 2016 13:08:00 -0700 Subject: [PATCH 1104/1894] Deal with issues surrounding const members of classes used in containers --- test/cpp/end2end/async_end2end_test.cc | 11 +++++++---- test/cpp/end2end/end2end_test.cc | 9 ++++++--- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index 2e0c9da1074..029bdc8bce1 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -233,8 +233,11 @@ class TestScenario { disable_blocking, credentials_type.c_str(), message_content.size()); } bool disable_blocking; - const grpc::string credentials_type; - const grpc::string message_content; + // Although the below grpc::string's are logically const, we can't declare + // them const because of a limitation in the way old compilers (e.g., gcc-4.4) + // manage vector insertion using a copy constructor + grpc::string credentials_type; + grpc::string message_content; }; class AsyncEnd2endTest : public ::testing::TestWithParam { @@ -1395,9 +1398,9 @@ std::vector CreateTestScenarios(bool test_disable_blocking, for (auto cred = credentials_types.begin(); cred != credentials_types.end(); ++cred) { for (auto msg = messages.begin(); msg != messages.end(); msg++) { - scenarios.push_back(TestScenario(false, *cred, *msg)); + scenarios.emplace_back(false, *cred, *msg); if (test_disable_blocking) { - scenarios.push_back(TestScenario(true, *cred, *msg)); + scenarios.emplace_back(true, *cred, *msg); } } } diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 81318866c9e..97863500409 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -199,7 +199,10 @@ class TestScenario { credentials_type.c_str()); } bool use_proxy; - const grpc::string credentials_type; + // Although the below grpc::string is logically const, we can't declare + // them const because of a limitation in the way old compilers (e.g., gcc-4.4) + // manage vector insertion using a copy constructor + grpc::string credentials_type; }; class End2endTest : public ::testing::TestWithParam { @@ -1421,9 +1424,9 @@ std::vector CreateTestScenarios(bool use_proxy, } for (auto it = credentials_types.begin(); it != credentials_types.end(); ++it) { - scenarios.push_back(TestScenario(false, *it)); + scenarios.emplace_back(false, *it); if (use_proxy) { - scenarios.push_back(TestScenario(true, *it)); + scenarios.emplace_back(true, *it); } } return scenarios; From c61c235fac8e2fbb1968852108f95029b67970d4 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 14 Jun 2016 18:20:38 -0700 Subject: [PATCH 1105/1894] moar pr comments --- doc/interop-test-descriptions.md | 95 ++++++++++++++++----------- src/proto/grpc/testing/messages.proto | 6 +- 2 files changed, 61 insertions(+), 40 deletions(-) diff --git a/doc/interop-test-descriptions.md b/doc/interop-test-descriptions.md index 480625c6ba7..a4f9abecfae 100644 --- a/doc/interop-test-descriptions.md +++ b/doc/interop-test-descriptions.md @@ -90,19 +90,21 @@ Client asserts: ### client_compressed_unary This test verifies the client can compress unary messages by sending two unary -calls, for compressed and uncompressed payloads. It sends an initial probing -request to verify whether the server supports the [CompressedRequest][] feature. -If it doesn't, the call is expected to fail with an `INVALID_ARGUMENT` status. +calls, for compressed and uncompressed payloads. It also sends an initial +probing request to verify whether the server supports the [CompressedRequest][] +feature by checking if the probing call fails with an `INVALID_ARGUMENT` status. Server features: * [UnaryCall][] * [CompressedRequest][] Procedure: - 1. Client calls UnaryCall with the feature probe, an **uncompressed** message: + 1. Client calls UnaryCall with the feature probe, an *uncompressed* message: ``` { - expect_compressed: false + expect_compressed:{ + value: true + } response_size: 314159 payload:{ body: 271828 bytes of zeros @@ -114,7 +116,9 @@ Procedure: ``` { - expect_compressed: true + expect_compressed:{ + value: true + } response_size: 314159 payload:{ body: 271828 bytes of zeros @@ -126,7 +130,9 @@ Procedure: ``` { - expect_compressed: false + expect_compressed:{ + value: false + } response_size: 314159 payload:{ body: 271828 bytes of zeros @@ -135,8 +141,8 @@ Procedure: ``` Client asserts: - * First call was unsuccessful with `INVALID_ARGUMENT` status. Subsequent - calls were successful. + * First call failed with `INVALID_ARGUMENT` status. + * Subsequent calls were successful. * Response payload body is 314159 bytes in size. * Clients are free to assert that the response payload body contents are zeros and comparing the entire response message against a golden response. @@ -149,7 +155,8 @@ requests, expecting the server's response to be compressed or not according to the `response_compressed` boolean. Whether compression was actually performed is determined by the compression bit -in the response's message flags. +in the response's message flags. *Note that some languages may not have access +to the message flags*. Server features: @@ -157,11 +164,13 @@ Server features: * [CompressedResponse][] Procedure: - 1. Client calls UnaryCall with `SimpleRequest`s: + 1. Client calls UnaryCall with `SimpleRequest`: ``` { - response_compressed: true + response_compressed:{ + value: true + } response_size: 314159 payload:{ body: 271828 bytes of zeros @@ -171,7 +180,9 @@ Procedure: ``` { - response_compressed: false + response_compressed:{ + value: false + } response_size: 314159 payload:{ body: 271828 bytes of zeros @@ -184,7 +195,7 @@ Procedure: compressed message flag set. * when `response_compressed` is false, the response MUST NOT have the compressed message flag set. - * response payload body is 314159 bytes in size + * response payload body is 314159 bytes in size in both cases. * clients are free to assert that the response payload body contents are zero and comparing the entire response message against a golden response @@ -247,21 +258,20 @@ Client asserts: ### client_compressed_streaming -This test verifies the client can compress streaming messages. It sends an -initial inconsistent streaming call comprised of a single message to verify if -the server implements the [CompressedRequest][] feature. If it does, the client -will then send another streaming call, comprised of two messages: the first one -compressed with `expect_compressed` true; the second one uncompressed with -`expected_compressed` false. +This test verifies the client can compress requests on per-message basis by +performing a two-request streaming call. It also sends an initial probing +request to verify whether the server supports the [CompressedRequest][] feature +by checking if the probing call fails with an `INVALID_ARGUMENT` status. Procedure: - 1. Client calls StreamingInputCall - 1. Client sends the following feature-probing *uncompressed* - `StreamingInputCallRequest` message + 1. Client calls `StreamingInputCall` and sends the following feature-probing + *uncompressed* `StreamingInputCallRequest` message ``` { - expect_compressed: true + expect_compressed:{ + value: true + } payload:{ body: 27182 bytes of zeros } @@ -270,31 +280,37 @@ Procedure: If the call fails with `INVALID_ARGUMENT`, the test fails. Otherwise, we continue. - 1. Client then sends the *compressed* message + 1. Client calls `StreamingInputCall` again, sending the *compressed* message ``` { - expect_compressed: true + expect_compressed:{ + value: true + } payload:{ body: 27182 bytes of zeros } } ``` - 1. And finally, the *uncompressed* message: + + 1. And finally, the *uncompressed* message ``` { - expect_compressed: false + expect_compressed:{ + value: false + } payload:{ body: 45904 bytes of zeros } } ``` + 1. Client half-closes - Client asserts: - * First call was unsuccessful with `INVALID_ARGUMENT` status. Subsequent - calls were successful. - * Response aggregated_payload_size is 73086. +Client asserts: +* First call fails with `INVALID_ARGUMENT`. +* Next calls succeeds. +* Response aggregated payload size is 73086. ### server_streaming @@ -333,7 +349,8 @@ Client asserts: ### server_compressed_streaming -This test verifies that the server can compress streaming messages. +This test verifies that the server can compress streaming messages and disable +compression on individual messages. Server features: * [StreamingOutputCall][] @@ -346,12 +363,16 @@ Procedure: ``` { response_parameters:{ - response_compressed: true + compressed: { + value: true + } size: 31415 } response_parameters:{ - response_compressed: false - size: 58979 + compressed: { + value: false + } + size: 92653 } } ``` @@ -363,7 +384,7 @@ Procedure: NOT have the compressed message flag set. * when `response_compressed` is true, the response's messages MUST have the compressed message flag set. - * response payload bodies are sized (in order): 31415, 58979 + * response payload bodies are sized (in order): 31415, 92653 * clients are free to assert that the response payload body contents are zero and comparing the entire response messages against golden responses diff --git a/src/proto/grpc/testing/messages.proto b/src/proto/grpc/testing/messages.proto index 1812dc74029..e4e748a6913 100644 --- a/src/proto/grpc/testing/messages.proto +++ b/src/proto/grpc/testing/messages.proto @@ -88,7 +88,7 @@ message SimpleRequest { EchoStatus response_status = 7; // Whether the server should expect this request to be compressed. - bool expect_compressed = 8; + google.protobuf.BoolValue expect_compressed = 8; } // Unary response, as configured by the request. @@ -111,7 +111,7 @@ message StreamingInputCallRequest { // is "nullable" in order to interoperate seamlessly with servers not able to // implement the full compression tests by introspecting the call to verify // the request's compression status. - BoolValue expect_compressed = 2; + google.protobuf.BoolValue expect_compressed = 2; // Not expecting any payload from the response. } @@ -135,7 +135,7 @@ message ResponseParameters { // "nullable" in order to interoperate seamlessly with clients not able to // implement the full compression tests by introspecting the call to verify // the response's compression status. - BoolValue compressed = 3; + google.protobuf.BoolValue compressed = 3; } // Server-streaming request. From edcd4e247dcc97ce176bd24fb0d627473335db96 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 15 Jun 2016 14:21:24 -0700 Subject: [PATCH 1106/1894] Disable fuzzed tests on TSAN --- tools/buildgen/plugins/make_fuzzer_tests.py | 2 +- tools/run_tests/tests.json | 12906 +++++++++++++----- 2 files changed, 9672 insertions(+), 3236 deletions(-) diff --git a/tools/buildgen/plugins/make_fuzzer_tests.py b/tools/buildgen/plugins/make_fuzzer_tests.py index 7c6fd535700..1d215e9fe0f 100644 --- a/tools/buildgen/plugins/make_fuzzer_tests.py +++ b/tools/buildgen/plugins/make_fuzzer_tests.py @@ -49,7 +49,7 @@ def mako_plugin(dictionary): tests.append({ 'name': new_target['name'], 'args': [fn], - 'exclude_configs': [], + 'exclude_configs': ['tsan'], 'uses_polling': False, 'platforms': ['linux'], 'ci_platforms': ['linux'], diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 5a84a41b638..86f7ea4a61c 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -26321,7 +26321,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26338,7 +26340,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26355,7 +26359,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26372,7 +26378,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26389,7 +26397,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26406,7 +26416,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26423,7 +26435,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26440,7 +26454,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26457,7 +26473,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26474,7 +26492,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26491,7 +26511,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26508,7 +26530,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26525,7 +26549,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26542,7 +26568,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26559,7 +26587,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26576,7 +26606,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26593,7 +26625,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26610,7 +26644,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26627,7 +26663,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26644,7 +26682,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26661,7 +26701,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26678,7 +26720,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26695,7 +26739,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26712,7 +26758,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26729,7 +26777,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26746,7 +26796,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26763,7 +26815,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26780,7 +26834,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26797,7 +26853,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26814,7 +26872,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26831,7 +26891,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26848,7 +26910,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26865,7 +26929,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26882,7 +26948,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26899,7 +26967,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26916,7 +26986,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26933,7 +27005,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26950,7 +27024,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26967,7 +27043,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -26984,7 +27062,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27001,7 +27081,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27018,7 +27100,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27035,7 +27119,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27052,7 +27138,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27069,7 +27157,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27086,7 +27176,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27103,7 +27195,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27120,7 +27214,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27137,7 +27233,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27154,7 +27252,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27171,7 +27271,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27188,7 +27290,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27205,7 +27309,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27222,7 +27328,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27239,7 +27347,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27256,7 +27366,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27273,7 +27385,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27290,7 +27404,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27307,7 +27423,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27324,7 +27442,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27341,7 +27461,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27358,7 +27480,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27375,7 +27499,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27392,7 +27518,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27409,7 +27537,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27426,7 +27556,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27443,7 +27575,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27460,7 +27594,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27477,7 +27613,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27494,7 +27632,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27511,7 +27651,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27528,7 +27670,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27545,7 +27689,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27562,7 +27708,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27579,7 +27727,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27596,7 +27746,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27613,7 +27765,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27630,7 +27784,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27647,7 +27803,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27664,7 +27822,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27681,7 +27841,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27698,7 +27860,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27715,7 +27879,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27732,7 +27898,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27749,7 +27917,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27766,7 +27936,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27783,7 +27955,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27800,7 +27974,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27817,7 +27993,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27834,7 +28012,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27851,7 +28031,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27868,7 +28050,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27885,7 +28069,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27902,7 +28088,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27919,7 +28107,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27936,7 +28126,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27953,7 +28145,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27970,7 +28164,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -27987,7 +28183,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28004,7 +28202,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28021,7 +28221,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28038,7 +28240,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28055,7 +28259,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28072,7 +28278,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28089,7 +28297,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28106,7 +28316,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28123,7 +28335,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28140,7 +28354,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28157,7 +28373,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28174,7 +28392,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28191,7 +28411,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28208,7 +28430,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28225,7 +28449,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28242,7 +28468,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28259,7 +28487,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28276,7 +28506,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28293,7 +28525,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28310,7 +28544,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28327,7 +28563,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28344,7 +28582,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28361,7 +28601,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28378,7 +28620,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28395,7 +28639,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28412,7 +28658,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28429,7 +28677,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28446,7 +28696,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28463,7 +28715,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28480,7 +28734,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28497,7 +28753,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28514,7 +28772,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28531,7 +28791,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28548,7 +28810,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28565,7 +28829,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28582,7 +28848,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28599,7 +28867,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28616,7 +28886,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28633,7 +28905,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28650,7 +28924,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28667,7 +28943,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28684,7 +28962,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28701,7 +28981,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28718,7 +29000,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28735,7 +29019,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28752,7 +29038,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28769,7 +29057,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28786,7 +29076,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28803,7 +29095,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28820,7 +29114,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28837,7 +29133,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28854,7 +29152,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28871,7 +29171,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28888,7 +29190,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28905,7 +29209,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28922,7 +29228,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28939,7 +29247,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28956,7 +29266,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28973,7 +29285,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -28990,7 +29304,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29007,7 +29323,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29024,7 +29342,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29041,7 +29361,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29058,7 +29380,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29075,7 +29399,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29092,7 +29418,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29109,7 +29437,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29126,7 +29456,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29143,7 +29475,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29160,7 +29494,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29177,7 +29513,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29194,7 +29532,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29211,8 +29551,10 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], - "flaky": false, + "exclude_configs": [ + "tsan" + ], + "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", "platforms": [ @@ -29228,7 +29570,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29245,7 +29589,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29262,7 +29608,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29279,7 +29627,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29296,7 +29646,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29313,7 +29665,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29330,7 +29684,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29347,7 +29703,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29364,7 +29722,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29381,7 +29741,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29398,7 +29760,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29415,7 +29779,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29432,7 +29798,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29449,7 +29817,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29466,7 +29836,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29483,7 +29855,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29500,7 +29874,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29517,7 +29893,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29534,7 +29912,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29551,7 +29931,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29568,7 +29950,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29585,7 +29969,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29602,7 +29988,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29619,7 +30007,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29636,7 +30026,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29653,7 +30045,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29670,7 +30064,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29687,7 +30083,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29704,7 +30102,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29721,7 +30121,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29738,7 +30140,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29755,7 +30159,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29772,7 +30178,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29789,7 +30197,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29806,7 +30216,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29823,7 +30235,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29840,7 +30254,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29857,7 +30273,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29874,7 +30292,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29891,7 +30311,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29908,7 +30330,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29925,7 +30349,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29942,7 +30368,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29959,7 +30387,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29976,7 +30406,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -29993,7 +30425,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30010,7 +30444,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30027,7 +30463,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30044,7 +30482,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30061,7 +30501,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30078,7 +30520,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30095,7 +30539,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30112,7 +30558,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30129,7 +30577,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30146,7 +30596,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30163,7 +30615,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30180,7 +30634,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30197,7 +30653,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30214,7 +30672,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30231,7 +30691,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30248,7 +30710,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30265,7 +30729,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30282,7 +30748,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30299,7 +30767,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30316,7 +30786,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30333,7 +30805,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30350,7 +30824,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30367,7 +30843,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30384,7 +30862,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30401,7 +30881,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30418,7 +30900,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30435,7 +30919,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30452,7 +30938,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30469,7 +30957,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30486,7 +30976,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30503,7 +30995,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30520,7 +31014,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30537,7 +31033,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30554,7 +31052,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30571,7 +31071,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30588,7 +31090,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30605,7 +31109,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30622,7 +31128,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30639,7 +31147,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30656,7 +31166,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30673,7 +31185,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30690,7 +31204,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30707,7 +31223,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30724,7 +31242,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30741,7 +31261,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30758,7 +31280,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30775,7 +31299,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30792,7 +31318,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30809,7 +31337,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30826,7 +31356,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30843,7 +31375,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30860,7 +31394,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30877,7 +31413,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30894,7 +31432,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30911,7 +31451,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30928,7 +31470,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30945,7 +31489,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30962,7 +31508,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30979,7 +31527,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -30996,7 +31546,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31013,7 +31565,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31030,7 +31584,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31047,7 +31603,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31064,7 +31622,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31081,7 +31641,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31098,7 +31660,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31115,7 +31679,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31132,7 +31698,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31149,7 +31717,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31166,7 +31736,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31183,7 +31755,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31200,7 +31774,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31217,7 +31793,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31234,7 +31812,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31251,7 +31831,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31268,7 +31850,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31285,7 +31869,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31302,7 +31888,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31319,7 +31907,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31336,7 +31926,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31353,7 +31945,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31370,7 +31964,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31387,7 +31983,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31404,7 +32002,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31421,7 +32021,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31438,7 +32040,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31455,7 +32059,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31472,7 +32078,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31489,7 +32097,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31506,7 +32116,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31523,7 +32135,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31540,7 +32154,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31557,7 +32173,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31574,7 +32192,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31591,7 +32211,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31608,7 +32230,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31625,7 +32249,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31642,7 +32268,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31659,7 +32287,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31676,7 +32306,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31693,7 +32325,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31710,7 +32344,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31727,7 +32363,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31744,7 +32382,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31761,7 +32401,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31778,7 +32420,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31795,7 +32439,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31812,7 +32458,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31829,7 +32477,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31846,7 +32496,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31863,7 +32515,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31880,7 +32534,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31897,7 +32553,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31914,7 +32572,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31931,7 +32591,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31948,7 +32610,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31965,7 +32629,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31982,7 +32648,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -31999,7 +32667,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32016,7 +32686,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32033,7 +32705,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32050,7 +32724,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32067,7 +32743,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32084,7 +32762,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32101,7 +32781,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32118,7 +32800,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32135,7 +32819,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32152,7 +32838,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32169,7 +32857,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32186,7 +32876,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32203,7 +32895,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32220,7 +32914,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32237,7 +32933,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32254,7 +32952,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32271,7 +32971,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32288,7 +32990,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32305,7 +33009,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32322,7 +33028,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32339,7 +33047,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32356,7 +33066,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32373,7 +33085,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32390,7 +33104,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32407,7 +33123,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32424,7 +33142,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32441,7 +33161,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32458,7 +33180,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32475,7 +33199,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32492,7 +33218,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32509,7 +33237,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32526,7 +33256,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32543,7 +33275,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32560,7 +33294,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32577,7 +33313,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32594,7 +33332,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32611,7 +33351,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32628,7 +33370,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32645,7 +33389,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32662,7 +33408,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32679,7 +33427,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32696,7 +33446,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32713,7 +33465,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32730,7 +33484,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32747,7 +33503,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32764,7 +33522,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32781,7 +33541,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32798,7 +33560,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32815,7 +33579,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32832,7 +33598,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32849,7 +33617,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32866,7 +33636,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32883,7 +33655,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32900,7 +33674,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32917,7 +33693,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32934,7 +33712,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32951,7 +33731,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32968,7 +33750,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -32985,7 +33769,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33002,7 +33788,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33019,7 +33807,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33036,7 +33826,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33053,7 +33845,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33070,7 +33864,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33087,7 +33883,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33104,7 +33902,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33121,7 +33921,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33138,7 +33940,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33155,7 +33959,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33172,7 +33978,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33189,7 +33997,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33206,7 +34016,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33223,7 +34035,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33240,7 +34054,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33257,7 +34073,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33274,7 +34092,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33291,7 +34111,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33308,7 +34130,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33325,7 +34149,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33342,7 +34168,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33359,7 +34187,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33376,7 +34206,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33393,7 +34225,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33410,7 +34244,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33427,7 +34263,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33444,7 +34282,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33461,7 +34301,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33478,7 +34320,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33495,7 +34339,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33512,7 +34358,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33529,7 +34377,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33546,7 +34396,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33563,7 +34415,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33580,7 +34434,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33597,7 +34453,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33614,7 +34472,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33631,7 +34491,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33648,7 +34510,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33665,7 +34529,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33682,7 +34548,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33699,7 +34567,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33716,7 +34586,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33733,7 +34605,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33750,7 +34624,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33767,7 +34643,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33784,7 +34662,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33801,7 +34681,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33818,7 +34700,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33835,7 +34719,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33852,7 +34738,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33869,7 +34757,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33886,7 +34776,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33903,7 +34795,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33920,7 +34814,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33937,7 +34833,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33954,7 +34852,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33971,7 +34871,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -33988,7 +34890,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34005,7 +34909,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34022,7 +34928,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34039,7 +34947,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34056,7 +34966,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34073,7 +34985,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34090,7 +35004,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34107,7 +35023,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34124,7 +35042,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34141,7 +35061,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34158,7 +35080,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34175,7 +35099,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34192,7 +35118,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34209,7 +35137,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34226,7 +35156,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34243,7 +35175,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34260,7 +35194,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34277,7 +35213,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34294,7 +35232,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34311,7 +35251,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34328,7 +35270,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34345,7 +35289,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34362,7 +35308,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34379,7 +35327,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34396,7 +35346,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34413,7 +35365,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34430,7 +35384,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34447,7 +35403,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34464,7 +35422,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34481,7 +35441,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34498,7 +35460,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34515,7 +35479,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34532,7 +35498,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34549,7 +35517,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34566,7 +35536,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34583,7 +35555,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34600,7 +35574,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34617,7 +35593,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34634,7 +35612,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34651,7 +35631,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34668,7 +35650,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34685,7 +35669,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34702,7 +35688,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34719,7 +35707,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34736,7 +35726,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34753,7 +35745,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34769,8 +35763,10 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, - "exclude_configs": [], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34787,7 +35783,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34804,7 +35802,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34821,7 +35821,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34838,7 +35840,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34855,7 +35859,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34872,7 +35878,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34889,7 +35897,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34906,7 +35916,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34923,7 +35935,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34940,7 +35954,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34957,7 +35973,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34974,7 +35992,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -34991,7 +36011,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35008,7 +36030,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35025,7 +36049,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35042,7 +36068,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35059,7 +36087,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35076,7 +36106,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35093,7 +36125,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35110,7 +36144,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35127,7 +36163,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35144,7 +36182,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35161,7 +36201,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35178,7 +36220,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35195,7 +36239,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35212,7 +36258,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35229,7 +36277,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35246,7 +36296,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35263,7 +36315,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35280,7 +36334,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35297,7 +36353,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35314,7 +36372,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35331,7 +36391,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35348,7 +36410,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35365,7 +36429,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35382,7 +36448,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35399,7 +36467,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35416,7 +36486,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35433,7 +36505,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35450,7 +36524,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35467,7 +36543,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35484,7 +36562,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35501,7 +36581,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35518,7 +36600,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35535,7 +36619,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35552,7 +36638,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35569,7 +36657,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35586,7 +36676,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35603,7 +36695,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35620,7 +36714,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35637,7 +36733,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35654,7 +36752,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35671,7 +36771,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35688,7 +36790,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35705,7 +36809,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35722,7 +36828,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35739,7 +36847,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35756,7 +36866,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35773,7 +36885,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35790,7 +36904,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35807,7 +36923,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35824,7 +36942,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35841,7 +36961,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35858,7 +36980,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35875,7 +36999,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35892,7 +37018,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35909,7 +37037,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35926,7 +37056,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35943,7 +37075,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35960,7 +37094,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35977,7 +37113,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -35994,7 +37132,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36011,7 +37151,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36028,7 +37170,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36045,7 +37189,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36062,7 +37208,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36079,7 +37227,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36096,7 +37246,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36113,7 +37265,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36130,7 +37284,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36147,7 +37303,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36164,7 +37322,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36181,7 +37341,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36198,7 +37360,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36215,7 +37379,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36232,7 +37398,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36249,7 +37417,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36266,7 +37436,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36283,7 +37455,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36300,7 +37474,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36317,7 +37493,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36334,7 +37512,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36351,7 +37531,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36368,7 +37550,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36385,7 +37569,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36402,7 +37588,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36419,7 +37607,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36436,7 +37626,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36453,7 +37645,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36470,7 +37664,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36487,7 +37683,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36504,7 +37702,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36521,7 +37721,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36538,7 +37740,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36555,7 +37759,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36572,7 +37778,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36589,7 +37797,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36606,7 +37816,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36623,7 +37835,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36640,7 +37854,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36657,7 +37873,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36674,7 +37892,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36691,7 +37911,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36708,7 +37930,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36725,7 +37949,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36742,7 +37968,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36759,7 +37987,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36776,7 +38006,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36793,7 +38025,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36810,7 +38044,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36827,7 +38063,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36844,7 +38082,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36861,7 +38101,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36878,7 +38120,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36895,7 +38139,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36912,7 +38158,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36929,7 +38177,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36946,7 +38196,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36963,7 +38215,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36980,7 +38234,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -36997,7 +38253,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37014,7 +38272,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37031,7 +38291,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37048,7 +38310,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37065,7 +38329,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37082,7 +38348,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37099,7 +38367,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37116,7 +38386,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37133,7 +38405,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37150,7 +38424,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37167,7 +38443,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37184,7 +38462,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37201,7 +38481,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37218,7 +38500,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37235,7 +38519,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37252,7 +38538,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37269,7 +38557,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37286,7 +38576,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37303,7 +38595,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37320,7 +38614,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37337,7 +38633,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37354,7 +38652,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37371,7 +38671,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37388,7 +38690,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37405,7 +38709,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37422,7 +38728,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37439,7 +38747,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37456,7 +38766,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37473,7 +38785,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37490,7 +38804,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37507,7 +38823,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37524,7 +38842,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37541,7 +38861,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37558,7 +38880,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37575,7 +38899,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37592,7 +38918,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37609,7 +38937,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37626,7 +38956,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37643,7 +38975,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37659,8 +38993,10 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, - "exclude_configs": [], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37677,7 +39013,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37694,7 +39032,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37711,7 +39051,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37728,7 +39070,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37745,7 +39089,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37762,7 +39108,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37779,7 +39127,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37796,7 +39146,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37813,7 +39165,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37830,7 +39184,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37847,7 +39203,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37864,7 +39222,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37881,7 +39241,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37898,7 +39260,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37915,7 +39279,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37932,7 +39298,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37949,7 +39317,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37966,7 +39336,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -37983,7 +39355,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38000,7 +39374,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38017,7 +39393,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38034,7 +39412,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38051,7 +39431,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38068,7 +39450,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38085,7 +39469,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38102,7 +39488,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38119,7 +39507,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38136,7 +39526,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38153,7 +39545,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38170,7 +39564,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38187,7 +39583,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38204,7 +39602,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38221,7 +39621,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38238,7 +39640,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38255,7 +39659,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38272,7 +39678,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38289,7 +39697,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38306,7 +39716,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38323,7 +39735,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38340,7 +39754,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38357,7 +39773,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38374,7 +39792,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38391,7 +39811,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38408,7 +39830,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38425,7 +39849,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38442,7 +39868,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38459,7 +39887,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38476,7 +39906,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38493,7 +39925,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38510,7 +39944,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38527,7 +39963,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38544,7 +39982,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38561,7 +40001,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38578,7 +40020,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38595,7 +40039,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38612,7 +40058,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38629,7 +40077,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38646,7 +40096,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38663,7 +40115,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38680,7 +40134,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38697,7 +40153,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38714,7 +40172,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38731,7 +40191,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38748,7 +40210,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38765,7 +40229,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38782,7 +40248,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38799,7 +40267,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38816,7 +40286,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38833,7 +40305,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38850,7 +40324,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38867,7 +40343,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38884,7 +40362,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38901,7 +40381,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38918,7 +40400,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38935,7 +40419,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38952,7 +40438,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38969,7 +40457,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -38986,7 +40476,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39003,7 +40495,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39020,7 +40514,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39037,7 +40533,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39054,7 +40552,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39071,7 +40571,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39088,7 +40590,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39105,7 +40609,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39122,7 +40628,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39139,7 +40647,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39156,7 +40666,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39173,7 +40685,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39190,7 +40704,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39207,7 +40723,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39224,7 +40742,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39241,7 +40761,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39258,7 +40780,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39275,7 +40799,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39292,7 +40818,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39309,7 +40837,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39326,7 +40856,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39343,7 +40875,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39360,7 +40894,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39377,7 +40913,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39394,7 +40932,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39411,7 +40951,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39428,7 +40970,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39445,7 +40989,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39462,7 +41008,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39479,7 +41027,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39496,7 +41046,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39513,7 +41065,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39530,7 +41084,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39547,7 +41103,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39564,7 +41122,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39581,7 +41141,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39598,7 +41160,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39615,7 +41179,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39632,7 +41198,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39649,7 +41217,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39666,7 +41236,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39683,7 +41255,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39700,7 +41274,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39717,7 +41293,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39734,7 +41312,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39751,7 +41331,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39768,7 +41350,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39785,7 +41369,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39802,7 +41388,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39819,7 +41407,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39836,7 +41426,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39853,7 +41445,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39870,7 +41464,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39887,7 +41483,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39904,7 +41502,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39921,7 +41521,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39938,7 +41540,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39955,7 +41559,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39972,7 +41578,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -39989,7 +41597,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40006,7 +41616,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40023,7 +41635,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40040,7 +41654,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40057,7 +41673,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40074,7 +41692,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40091,7 +41711,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40108,7 +41730,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40125,7 +41749,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40142,7 +41768,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40159,7 +41787,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40176,7 +41806,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40193,7 +41825,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40210,7 +41844,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40227,7 +41863,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40244,7 +41882,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40261,7 +41901,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40278,7 +41920,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40295,7 +41939,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40312,7 +41958,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40329,7 +41977,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40346,7 +41996,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40363,7 +42015,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40380,7 +42034,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40397,7 +42053,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40414,7 +42072,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40431,7 +42091,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40448,7 +42110,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40465,7 +42129,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40482,7 +42148,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40499,7 +42167,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40516,7 +42186,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40533,7 +42205,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40549,8 +42223,10 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, - "exclude_configs": [], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40567,7 +42243,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40584,7 +42262,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40601,7 +42281,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40618,7 +42300,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40635,7 +42319,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40652,7 +42338,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40669,7 +42357,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40686,7 +42376,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40703,7 +42395,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40720,7 +42414,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40737,7 +42433,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40754,7 +42452,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40771,7 +42471,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40788,7 +42490,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40805,7 +42509,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40822,7 +42528,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40839,7 +42547,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40856,7 +42566,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40873,7 +42585,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40890,7 +42604,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40907,7 +42623,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40924,7 +42642,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40941,7 +42661,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40958,7 +42680,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40975,7 +42699,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -40992,7 +42718,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41009,7 +42737,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41026,7 +42756,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41043,7 +42775,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41060,7 +42794,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41077,7 +42813,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41094,7 +42832,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41111,7 +42851,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41128,7 +42870,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41145,7 +42889,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41162,7 +42908,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41179,7 +42927,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41196,7 +42946,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41213,7 +42965,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41230,7 +42984,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41247,7 +43003,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41264,7 +43022,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41281,7 +43041,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41298,7 +43060,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41315,7 +43079,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41332,7 +43098,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41349,7 +43117,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41366,7 +43136,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41383,7 +43155,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41400,7 +43174,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41417,7 +43193,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41434,7 +43212,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41451,7 +43231,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41468,7 +43250,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41485,7 +43269,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41502,7 +43288,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41519,7 +43307,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41536,7 +43326,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41553,7 +43345,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41570,7 +43364,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41587,7 +43383,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41604,7 +43402,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41621,7 +43421,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41638,7 +43440,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41655,7 +43459,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41672,7 +43478,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41689,7 +43497,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41706,7 +43516,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41723,7 +43535,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41740,7 +43554,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41757,7 +43573,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41774,7 +43592,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41791,7 +43611,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41808,7 +43630,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41825,7 +43649,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41842,7 +43668,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41859,7 +43687,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41876,7 +43706,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41893,7 +43725,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41910,7 +43744,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41927,7 +43763,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41944,7 +43782,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41961,7 +43801,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41978,7 +43820,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -41995,7 +43839,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42012,7 +43858,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42029,7 +43877,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42046,7 +43896,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42063,7 +43915,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42080,7 +43934,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42097,7 +43953,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42114,7 +43972,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42131,7 +43991,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42148,7 +44010,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42165,7 +44029,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42182,7 +44048,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42199,7 +44067,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42216,7 +44086,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42233,7 +44105,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42250,7 +44124,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42267,7 +44143,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42284,7 +44162,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42301,7 +44181,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42318,7 +44200,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42335,7 +44219,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42352,7 +44238,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42369,7 +44257,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42386,7 +44276,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42403,7 +44295,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42420,7 +44314,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42437,7 +44333,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42454,7 +44352,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42471,7 +44371,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42488,7 +44390,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42505,7 +44409,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42522,7 +44428,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42539,7 +44447,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42556,7 +44466,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42573,7 +44485,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42590,7 +44504,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42607,7 +44523,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42624,7 +44542,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42641,7 +44561,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42658,7 +44580,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42675,7 +44599,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42692,7 +44618,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42709,7 +44637,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42726,7 +44656,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42743,7 +44675,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42760,7 +44694,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42777,7 +44713,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42794,7 +44732,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42811,7 +44751,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42828,7 +44770,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42845,7 +44789,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42862,7 +44808,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42879,7 +44827,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42896,7 +44846,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42913,7 +44865,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42930,7 +44884,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42947,7 +44903,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42964,7 +44922,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42981,7 +44941,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -42998,7 +44960,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43015,7 +44979,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43032,7 +44998,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43049,7 +45017,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43066,7 +45036,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43083,7 +45055,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43100,7 +45074,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43117,7 +45093,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43134,7 +45112,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43151,7 +45131,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43168,7 +45150,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43185,7 +45169,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43202,7 +45188,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43219,7 +45207,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43236,7 +45226,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43253,7 +45245,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43270,7 +45264,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43287,7 +45283,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43304,7 +45302,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43321,7 +45321,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43338,7 +45340,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43355,7 +45359,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43372,7 +45378,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43389,7 +45397,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43406,7 +45416,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43423,7 +45435,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43439,8 +45453,10 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, - "exclude_configs": [], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43457,7 +45473,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43474,7 +45492,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43491,7 +45511,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43508,7 +45530,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43525,7 +45549,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43542,7 +45568,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43559,7 +45587,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43576,7 +45606,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43593,7 +45625,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43610,7 +45644,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43627,7 +45663,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43644,7 +45682,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43661,7 +45701,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43678,7 +45720,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43695,7 +45739,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43712,7 +45758,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43729,7 +45777,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43746,7 +45796,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43763,7 +45815,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43780,7 +45834,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43797,7 +45853,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43814,7 +45872,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43831,7 +45891,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43848,7 +45910,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43865,7 +45929,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43882,7 +45948,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43899,7 +45967,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43916,7 +45986,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43933,7 +46005,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43950,7 +46024,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43967,7 +46043,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -43984,7 +46062,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44001,7 +46081,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44018,7 +46100,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44035,7 +46119,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44052,7 +46138,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44069,7 +46157,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44086,7 +46176,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44103,7 +46195,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44120,7 +46214,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44137,7 +46233,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44154,7 +46252,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44171,7 +46271,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44188,7 +46290,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44205,7 +46309,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44222,7 +46328,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44239,7 +46347,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44256,7 +46366,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44273,7 +46385,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44290,7 +46404,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44307,7 +46423,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44324,7 +46442,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44341,7 +46461,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44358,7 +46480,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44375,7 +46499,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44392,7 +46518,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44409,7 +46537,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44426,7 +46556,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44443,7 +46575,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44460,7 +46594,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44477,7 +46613,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44494,7 +46632,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44511,7 +46651,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44528,7 +46670,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44545,7 +46689,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44562,7 +46708,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44579,7 +46727,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44596,7 +46746,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44613,7 +46765,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44630,7 +46784,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44647,7 +46803,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44664,7 +46822,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44681,7 +46841,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44698,7 +46860,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44715,7 +46879,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44732,7 +46898,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44749,7 +46917,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44766,7 +46936,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44783,7 +46955,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44800,7 +46974,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44817,7 +46993,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44834,7 +47012,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44851,7 +47031,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44868,7 +47050,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44885,7 +47069,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44902,7 +47088,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44919,7 +47107,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44936,7 +47126,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44953,7 +47145,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44970,7 +47164,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -44987,7 +47183,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45004,7 +47202,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45021,7 +47221,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45038,7 +47240,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45055,7 +47259,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45072,7 +47278,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45089,7 +47297,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45106,7 +47316,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45123,7 +47335,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45140,7 +47354,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45157,7 +47373,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45174,7 +47392,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45191,7 +47411,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45208,7 +47430,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45225,7 +47449,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45242,7 +47468,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45259,7 +47487,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45276,7 +47506,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45293,7 +47525,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45310,7 +47544,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45327,7 +47563,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45344,7 +47582,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45361,7 +47601,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45378,7 +47620,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45395,7 +47639,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45412,7 +47658,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45429,7 +47677,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45446,7 +47696,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45463,7 +47715,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45480,7 +47734,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45497,7 +47753,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45514,7 +47772,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45531,7 +47791,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45548,7 +47810,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45565,7 +47829,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45582,7 +47848,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45599,7 +47867,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45616,7 +47886,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45633,7 +47905,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45650,7 +47924,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45667,7 +47943,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45684,7 +47962,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45701,7 +47981,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45718,7 +48000,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45735,7 +48019,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45752,7 +48038,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45769,7 +48057,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45786,7 +48076,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45803,7 +48095,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45820,7 +48114,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45837,7 +48133,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45854,7 +48152,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45871,7 +48171,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45888,7 +48190,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45905,7 +48209,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45922,7 +48228,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45939,7 +48247,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45956,7 +48266,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45973,7 +48285,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -45990,7 +48304,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46007,7 +48323,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46024,7 +48342,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46041,7 +48361,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46058,7 +48380,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46075,7 +48399,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46092,7 +48418,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46109,7 +48437,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "api_fuzzer_one_entry", @@ -46126,7 +48456,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46143,7 +48475,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46160,7 +48494,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46177,7 +48513,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46194,7 +48532,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46211,7 +48551,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46228,7 +48570,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46245,7 +48589,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46262,7 +48608,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46279,7 +48627,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46296,7 +48646,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46313,7 +48665,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46329,8 +48683,10 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, - "exclude_configs": [], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46347,7 +48703,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46364,7 +48722,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46381,7 +48741,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46398,7 +48760,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46415,7 +48779,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46432,7 +48798,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46449,7 +48817,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46466,7 +48836,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46483,7 +48855,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46500,7 +48874,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46517,7 +48893,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46534,7 +48912,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46551,7 +48931,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46568,7 +48950,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46585,7 +48969,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46602,7 +48988,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46619,7 +49007,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46636,7 +49026,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46653,7 +49045,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46670,7 +49064,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46687,7 +49083,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46704,7 +49102,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46721,7 +49121,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46738,7 +49140,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46755,7 +49159,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46772,7 +49178,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46789,7 +49197,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46806,7 +49216,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46823,7 +49235,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46840,7 +49254,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46857,7 +49273,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46874,7 +49292,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46891,7 +49311,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46908,7 +49330,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46925,7 +49349,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46942,7 +49368,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46959,7 +49387,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46976,7 +49406,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -46993,7 +49425,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47010,7 +49444,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47027,7 +49463,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47044,7 +49482,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47061,7 +49501,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47078,7 +49520,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47095,7 +49539,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47112,7 +49558,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47129,7 +49577,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47146,7 +49596,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47163,7 +49615,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47180,7 +49634,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47197,7 +49653,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47214,7 +49672,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47231,7 +49691,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47248,7 +49710,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47265,7 +49729,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47282,7 +49748,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47299,7 +49767,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47316,7 +49786,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47333,7 +49805,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47350,7 +49824,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47367,7 +49843,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47384,7 +49862,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47401,7 +49881,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47418,7 +49900,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47435,7 +49919,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47452,7 +49938,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47469,7 +49957,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47486,7 +49976,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47503,7 +49995,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47520,7 +50014,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47537,7 +50033,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47554,7 +50052,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47571,7 +50071,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47588,7 +50090,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47605,7 +50109,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47622,7 +50128,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47639,7 +50147,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47656,7 +50166,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47673,7 +50185,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47690,7 +50204,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47707,7 +50223,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47724,7 +50242,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47741,7 +50261,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47758,7 +50280,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47775,7 +50299,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47792,7 +50318,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47809,7 +50337,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47826,7 +50356,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47843,7 +50375,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47860,7 +50394,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47877,7 +50413,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47894,7 +50432,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47911,7 +50451,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47928,7 +50470,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47945,7 +50489,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47962,7 +50508,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47979,7 +50527,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -47996,7 +50546,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48013,7 +50565,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48030,7 +50584,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48047,7 +50603,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48064,7 +50622,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48081,7 +50641,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48098,7 +50660,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48115,7 +50679,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48132,7 +50698,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48149,7 +50717,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48166,7 +50736,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48183,7 +50755,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48200,7 +50774,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48217,7 +50793,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48234,7 +50812,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48251,7 +50831,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48268,7 +50850,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48285,7 +50869,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48302,7 +50888,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48319,7 +50907,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48336,7 +50926,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48353,7 +50945,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48370,7 +50964,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48387,7 +50983,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48404,7 +51002,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48421,7 +51021,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48438,7 +51040,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48455,7 +51059,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48472,7 +51078,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48489,7 +51097,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48506,7 +51116,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48523,7 +51135,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48540,7 +51154,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48557,7 +51173,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48574,7 +51192,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48591,7 +51211,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48608,7 +51230,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48625,7 +51249,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48642,7 +51268,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48659,7 +51287,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48676,7 +51306,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48693,7 +51325,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48710,7 +51344,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48727,7 +51363,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48744,7 +51382,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48761,7 +51401,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48778,7 +51420,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48795,7 +51439,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48812,7 +51458,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48829,7 +51477,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48846,7 +51496,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48863,7 +51515,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48880,7 +51534,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48897,7 +51553,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48914,7 +51572,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48931,7 +51591,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48948,7 +51610,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48965,7 +51629,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48982,7 +51648,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -48999,7 +51667,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49016,7 +51686,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49033,7 +51705,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49050,7 +51724,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49067,7 +51743,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49084,7 +51762,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49101,7 +51781,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49118,7 +51800,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49135,7 +51819,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49152,7 +51838,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49169,7 +51857,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49186,7 +51876,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49203,7 +51895,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49219,8 +51913,10 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, - "exclude_configs": [], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49237,7 +51933,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49254,7 +51952,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49271,7 +51971,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49288,7 +51990,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49305,7 +52009,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49322,7 +52028,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49339,7 +52047,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49356,7 +52066,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49373,7 +52085,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49390,7 +52104,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49407,7 +52123,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49424,7 +52142,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49441,7 +52161,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49458,7 +52180,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49475,7 +52199,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49492,7 +52218,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49509,7 +52237,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49526,7 +52256,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49543,7 +52275,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49560,7 +52294,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49577,7 +52313,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49594,7 +52332,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49611,7 +52351,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49628,7 +52370,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49645,7 +52389,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49662,7 +52408,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49679,7 +52427,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49696,7 +52446,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49713,7 +52465,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49730,7 +52484,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49747,7 +52503,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49764,7 +52522,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49781,7 +52541,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49798,7 +52560,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49815,7 +52579,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49832,7 +52598,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49849,7 +52617,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49866,7 +52636,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49883,7 +52655,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49900,7 +52674,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49917,7 +52693,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49934,7 +52712,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49951,7 +52731,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49968,7 +52750,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -49985,7 +52769,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50002,7 +52788,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50019,7 +52807,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50036,7 +52826,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50053,7 +52845,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50070,7 +52864,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50087,7 +52883,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50104,7 +52902,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50121,7 +52921,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50138,7 +52940,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50155,7 +52959,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50172,7 +52978,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50189,7 +52997,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50206,7 +53016,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50223,7 +53035,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50240,7 +53054,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50257,7 +53073,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50274,7 +53092,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50291,7 +53111,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50308,7 +53130,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50325,7 +53149,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50342,7 +53168,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50359,7 +53187,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50376,7 +53206,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50393,7 +53225,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50410,7 +53244,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50427,7 +53263,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50444,7 +53282,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50461,7 +53301,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50478,7 +53320,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50495,7 +53339,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50512,7 +53358,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50529,7 +53377,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50546,7 +53396,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50563,7 +53415,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50580,7 +53434,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50597,7 +53453,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50614,7 +53472,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50631,7 +53491,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50648,7 +53510,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50665,7 +53529,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50682,7 +53548,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50699,7 +53567,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50716,7 +53586,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50733,7 +53605,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50750,7 +53624,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50767,7 +53643,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50784,7 +53662,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50801,7 +53681,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50818,7 +53700,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50835,7 +53719,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50852,7 +53738,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50869,7 +53757,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50886,7 +53776,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50903,7 +53795,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50920,7 +53814,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50937,7 +53833,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50954,7 +53852,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50971,7 +53871,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -50988,7 +53890,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51005,7 +53909,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51022,7 +53928,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51039,7 +53947,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51056,7 +53966,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51073,7 +53985,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51090,7 +54004,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51107,7 +54023,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51124,7 +54042,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51141,7 +54061,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51158,7 +54080,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51175,7 +54099,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51192,7 +54118,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51209,7 +54137,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51226,7 +54156,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51243,7 +54175,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51260,7 +54194,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51277,7 +54213,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51294,7 +54232,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51311,7 +54251,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51328,7 +54270,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51345,7 +54289,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51362,7 +54308,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51379,7 +54327,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51396,7 +54346,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51413,7 +54365,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51430,7 +54384,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51447,7 +54403,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51464,7 +54422,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51481,7 +54441,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51498,7 +54460,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51515,7 +54479,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51532,7 +54498,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51549,7 +54517,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51566,7 +54536,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51583,7 +54555,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51600,7 +54574,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51617,7 +54593,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51634,7 +54612,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51651,7 +54631,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51668,7 +54650,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51685,7 +54669,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51702,7 +54688,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51719,7 +54707,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51736,7 +54726,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51753,7 +54745,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51770,7 +54764,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51787,7 +54783,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51804,7 +54802,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51821,7 +54821,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51838,7 +54840,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51855,7 +54859,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51872,7 +54878,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51889,7 +54897,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51906,7 +54916,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51923,7 +54935,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51940,7 +54954,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51957,7 +54973,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51974,7 +54992,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -51991,7 +55011,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52008,7 +55030,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52025,7 +55049,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52042,7 +55068,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52059,7 +55087,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52076,7 +55106,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52093,7 +55125,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52109,8 +55143,10 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, - "exclude_configs": [], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52127,7 +55163,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52144,7 +55182,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52161,7 +55201,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52178,7 +55220,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52195,7 +55239,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52212,7 +55258,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52229,7 +55277,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52246,7 +55296,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52263,7 +55315,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52280,7 +55334,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52297,7 +55353,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52314,7 +55372,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52331,7 +55391,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52348,7 +55410,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52365,7 +55429,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52382,7 +55448,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52399,7 +55467,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52416,7 +55486,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52433,7 +55505,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52450,7 +55524,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52467,7 +55543,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52484,7 +55562,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52501,7 +55581,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52518,7 +55600,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52535,7 +55619,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52552,7 +55638,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52569,7 +55657,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52586,7 +55676,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52603,7 +55695,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52620,7 +55714,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52637,7 +55733,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52654,7 +55752,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52671,7 +55771,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52688,7 +55790,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52705,7 +55809,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52722,7 +55828,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52739,7 +55847,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52756,7 +55866,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52773,7 +55885,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52790,7 +55904,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52807,7 +55923,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52824,7 +55942,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52841,7 +55961,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52858,7 +55980,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52875,7 +55999,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52892,7 +56018,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52909,7 +56037,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52926,7 +56056,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52943,7 +56075,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52960,7 +56094,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52977,7 +56113,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -52994,7 +56132,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53011,7 +56151,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53028,7 +56170,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53045,7 +56189,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53062,7 +56208,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53079,7 +56227,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53096,7 +56246,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53113,7 +56265,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53130,7 +56284,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53147,7 +56303,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53164,7 +56322,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53181,7 +56341,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53198,7 +56360,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53215,7 +56379,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53232,7 +56398,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53249,7 +56417,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53266,7 +56436,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53283,7 +56455,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53300,7 +56474,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53317,7 +56493,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53334,7 +56512,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53351,7 +56531,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53368,7 +56550,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53385,7 +56569,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53402,7 +56588,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53419,7 +56607,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53436,7 +56626,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53453,7 +56645,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53470,7 +56664,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53487,7 +56683,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53504,7 +56702,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53521,7 +56721,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53538,7 +56740,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53555,7 +56759,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53572,7 +56778,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53589,7 +56797,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53606,7 +56816,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53623,7 +56835,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53640,7 +56854,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53657,7 +56873,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53674,7 +56892,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53691,7 +56911,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53708,7 +56930,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53725,7 +56949,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53742,7 +56968,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53759,7 +56987,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53776,7 +57006,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53793,7 +57025,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53810,7 +57044,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53827,7 +57063,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53844,7 +57082,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53861,7 +57101,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53878,7 +57120,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53895,7 +57139,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53912,7 +57158,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53929,7 +57177,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53946,7 +57196,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53963,7 +57215,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53980,7 +57234,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -53997,7 +57253,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -54014,7 +57272,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -54031,7 +57291,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -54048,7 +57310,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -54065,7 +57329,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -54082,7 +57348,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -54099,7 +57367,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -54116,7 +57386,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -54133,7 +57405,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -54150,7 +57424,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -54167,7 +57443,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -54184,7 +57462,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -54201,7 +57481,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -54218,7 +57500,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -54235,7 +57519,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "client_fuzzer_one_entry", @@ -54252,7 +57538,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54269,7 +57557,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54286,7 +57576,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54303,7 +57595,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54320,7 +57614,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54337,7 +57633,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54354,7 +57652,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54371,7 +57671,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54388,7 +57690,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54405,7 +57709,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54422,7 +57728,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54439,7 +57747,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54456,7 +57766,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54473,7 +57785,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54490,7 +57804,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54507,7 +57823,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54524,7 +57842,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54541,7 +57861,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54558,7 +57880,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54575,7 +57899,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54592,7 +57918,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54609,7 +57937,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54626,7 +57956,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54643,7 +57975,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54660,7 +57994,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54677,7 +58013,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54694,7 +58032,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54711,7 +58051,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54728,7 +58070,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54745,7 +58089,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54762,7 +58108,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54779,7 +58127,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54796,7 +58146,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54813,7 +58165,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54830,7 +58184,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54847,7 +58203,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54864,7 +58222,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54881,7 +58241,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54898,7 +58260,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54915,7 +58279,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54932,7 +58298,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54949,7 +58317,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54966,7 +58336,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54983,7 +58355,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -54999,8 +58373,10 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, - "exclude_configs": [], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55017,7 +58393,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55034,7 +58412,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55051,7 +58431,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55068,7 +58450,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55085,7 +58469,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55102,7 +58488,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55119,7 +58507,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55136,7 +58526,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55153,7 +58545,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55170,7 +58564,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55187,7 +58583,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55204,7 +58602,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55221,7 +58621,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55238,7 +58640,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55255,7 +58659,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55272,7 +58678,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55289,7 +58697,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55306,7 +58716,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55323,7 +58735,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55340,7 +58754,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55357,7 +58773,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55374,7 +58792,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55391,7 +58811,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55408,7 +58830,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55425,7 +58849,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55442,7 +58868,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55459,7 +58887,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55476,7 +58906,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55493,7 +58925,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55510,7 +58944,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55527,7 +58963,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55544,7 +58982,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55561,7 +59001,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55578,7 +59020,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55595,7 +59039,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55612,7 +59058,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55629,7 +59077,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55646,7 +59096,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55663,7 +59115,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55680,7 +59134,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55697,7 +59153,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55714,7 +59172,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55731,7 +59191,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55748,7 +59210,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55765,7 +59229,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55782,7 +59248,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55799,7 +59267,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55816,7 +59286,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55833,7 +59305,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55850,7 +59324,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55867,7 +59343,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55884,7 +59362,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55901,7 +59381,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55918,7 +59400,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55935,7 +59419,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55952,7 +59438,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55969,7 +59457,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -55986,7 +59476,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56003,7 +59495,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56020,7 +59514,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56037,7 +59533,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56054,7 +59552,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56071,7 +59571,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56088,7 +59590,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56105,7 +59609,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56122,7 +59628,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56139,7 +59647,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56156,7 +59666,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56173,7 +59685,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56190,7 +59704,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56207,7 +59723,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56224,7 +59742,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56241,7 +59761,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56258,7 +59780,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56275,7 +59799,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56292,7 +59818,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56309,7 +59837,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56326,7 +59856,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56343,7 +59875,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56360,7 +59894,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56377,7 +59913,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56394,7 +59932,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56411,7 +59951,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56428,7 +59970,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56445,7 +59989,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56462,7 +60008,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56479,7 +60027,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56496,7 +60046,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56513,7 +60065,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56530,7 +60084,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56547,7 +60103,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56564,7 +60122,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56581,7 +60141,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56598,7 +60160,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56615,7 +60179,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56632,7 +60198,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56649,7 +60217,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56666,7 +60236,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56683,7 +60255,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56700,7 +60274,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56717,7 +60293,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56734,7 +60312,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56751,7 +60331,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56768,7 +60350,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56785,7 +60369,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56802,7 +60388,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56819,7 +60407,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56836,7 +60426,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56853,7 +60445,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56870,7 +60464,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56887,7 +60483,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56904,7 +60502,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56921,7 +60521,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56938,7 +60540,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56955,7 +60559,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56972,7 +60578,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -56989,7 +60597,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57006,7 +60616,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57023,7 +60635,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57040,7 +60654,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57057,7 +60673,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57074,7 +60692,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57091,7 +60711,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57108,7 +60730,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57125,7 +60749,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57142,7 +60768,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57159,7 +60787,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57176,7 +60806,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57193,7 +60825,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57210,7 +60844,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57227,7 +60863,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57244,7 +60882,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57261,7 +60901,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57278,7 +60920,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57295,7 +60939,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57312,7 +60958,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57329,7 +60977,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57346,7 +60996,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57363,7 +61015,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57380,7 +61034,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57397,7 +61053,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57414,7 +61072,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57431,7 +61091,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57448,7 +61110,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57465,7 +61129,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57482,7 +61148,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57499,7 +61167,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57516,7 +61186,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57533,7 +61205,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57550,7 +61224,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57567,7 +61243,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57584,7 +61262,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57601,7 +61281,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57618,7 +61300,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57635,7 +61319,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57652,7 +61338,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57669,7 +61357,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57686,7 +61376,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57703,7 +61395,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57720,7 +61414,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57737,7 +61433,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57754,7 +61452,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57771,7 +61471,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57788,7 +61490,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57805,7 +61509,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57822,7 +61528,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57839,7 +61547,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57856,7 +61566,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57873,7 +61585,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57889,8 +61603,10 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, - "exclude_configs": [], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57907,7 +61623,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57924,7 +61642,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57941,7 +61661,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57958,7 +61680,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57975,7 +61699,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -57992,7 +61718,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58009,7 +61737,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58026,7 +61756,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58043,7 +61775,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58060,7 +61794,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58077,7 +61813,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58094,7 +61832,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58111,7 +61851,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58128,7 +61870,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58145,7 +61889,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58162,7 +61908,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58179,7 +61927,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58196,7 +61946,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58213,7 +61965,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58230,7 +61984,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58247,7 +62003,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58264,7 +62022,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58281,7 +62041,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58298,7 +62060,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58315,7 +62079,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58332,7 +62098,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58349,7 +62117,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58366,7 +62136,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58383,7 +62155,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58400,7 +62174,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58417,7 +62193,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58434,7 +62212,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58451,7 +62231,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58468,7 +62250,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58485,7 +62269,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58502,7 +62288,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58519,7 +62307,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58536,7 +62326,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58553,7 +62345,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58570,7 +62364,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58587,7 +62383,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58604,7 +62402,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58621,7 +62421,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58638,7 +62440,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58655,7 +62459,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58672,7 +62478,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58689,7 +62497,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58706,7 +62516,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58723,7 +62535,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58740,7 +62554,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58757,7 +62573,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58774,7 +62592,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58791,7 +62611,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58808,7 +62630,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58825,7 +62649,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58842,7 +62668,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58859,7 +62687,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58876,7 +62706,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58893,7 +62725,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58910,7 +62744,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58927,7 +62763,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58944,7 +62782,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58961,7 +62801,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58978,7 +62820,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -58995,7 +62839,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59012,7 +62858,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59029,7 +62877,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59046,7 +62896,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59063,7 +62915,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59080,7 +62934,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59097,7 +62953,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59114,7 +62972,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59131,7 +62991,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59148,7 +63010,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59165,7 +63029,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59182,7 +63048,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59199,7 +63067,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59216,7 +63086,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59233,7 +63105,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59250,7 +63124,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59267,7 +63143,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59284,7 +63162,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59301,7 +63181,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59318,7 +63200,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59335,7 +63219,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59352,7 +63238,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59369,7 +63257,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59386,7 +63276,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59403,7 +63295,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59420,7 +63314,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59437,7 +63333,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59454,7 +63352,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59471,7 +63371,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59488,7 +63390,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59505,7 +63409,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59522,7 +63428,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59539,7 +63447,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59556,7 +63466,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59573,7 +63485,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59590,7 +63504,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59607,7 +63523,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59624,7 +63542,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59641,7 +63561,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59658,7 +63580,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59675,7 +63599,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59692,7 +63618,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59709,7 +63637,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59726,7 +63656,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59743,7 +63675,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59760,7 +63694,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59777,7 +63713,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59794,7 +63732,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59811,7 +63751,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "hpack_parser_fuzzer_test_one_entry", @@ -59828,7 +63770,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -59845,7 +63789,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -59862,7 +63808,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -59879,7 +63827,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -59896,7 +63846,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -59913,7 +63865,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -59930,7 +63884,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -59947,7 +63903,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -59964,7 +63922,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -59981,7 +63941,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -59998,7 +63960,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60015,7 +63979,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60032,7 +63998,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60049,7 +64017,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60066,7 +64036,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60083,7 +64055,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60100,7 +64074,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60117,7 +64093,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60134,7 +64112,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60151,7 +64131,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60168,7 +64150,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60185,7 +64169,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60202,7 +64188,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60219,7 +64207,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60236,7 +64226,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60253,7 +64245,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60270,7 +64264,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60287,7 +64283,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60304,7 +64302,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60321,7 +64321,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60338,7 +64340,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60355,7 +64359,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60372,7 +64378,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60389,7 +64397,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60406,7 +64416,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60423,7 +64435,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60440,7 +64454,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60457,7 +64473,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60474,7 +64492,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60491,7 +64511,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60508,7 +64530,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60525,7 +64549,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60542,7 +64568,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60559,7 +64587,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60576,7 +64606,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60593,7 +64625,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60610,7 +64644,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60627,7 +64663,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60644,7 +64682,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60661,7 +64701,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60678,7 +64720,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60695,7 +64739,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60712,7 +64758,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60729,7 +64777,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60746,7 +64796,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60763,7 +64815,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60779,8 +64833,10 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, - "exclude_configs": [], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60797,7 +64853,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60814,7 +64872,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60831,7 +64891,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60848,7 +64910,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60865,7 +64929,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60882,7 +64948,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60899,7 +64967,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60916,7 +64986,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60933,7 +65005,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60950,7 +65024,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60967,7 +65043,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -60984,7 +65062,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -61001,7 +65081,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -61018,7 +65100,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "http_fuzzer_test_one_entry", @@ -61035,7 +65119,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61052,7 +65138,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61069,7 +65157,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61086,7 +65176,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61103,7 +65195,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61120,7 +65214,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61137,7 +65233,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61154,7 +65252,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61171,7 +65271,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61188,7 +65290,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61205,7 +65309,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61222,7 +65328,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61239,7 +65347,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61256,7 +65366,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61273,7 +65385,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61290,7 +65404,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61307,7 +65423,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61324,7 +65442,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61341,7 +65461,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61358,7 +65480,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61375,7 +65499,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61392,7 +65518,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61409,7 +65537,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61426,7 +65556,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61443,7 +65575,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61460,7 +65594,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61477,7 +65613,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61494,7 +65632,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61511,7 +65651,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61528,7 +65670,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61545,7 +65689,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61562,7 +65708,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61579,7 +65727,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61596,7 +65746,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61613,7 +65765,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61630,7 +65784,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61647,7 +65803,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61664,7 +65822,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61681,7 +65841,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61698,7 +65860,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61715,7 +65879,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61732,7 +65898,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61749,7 +65917,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61766,7 +65936,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61783,7 +65955,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61800,7 +65974,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61817,7 +65993,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61834,7 +66012,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61851,7 +66031,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61868,7 +66050,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61885,7 +66069,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61902,7 +66088,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61919,7 +66107,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61936,7 +66126,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61953,7 +66145,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61970,7 +66164,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -61987,7 +66183,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62004,7 +66202,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62021,7 +66221,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62038,7 +66240,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62055,7 +66259,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62072,7 +66278,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62089,7 +66297,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62106,7 +66316,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62123,7 +66335,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62140,7 +66354,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62157,7 +66373,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62174,7 +66392,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62191,7 +66411,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62208,7 +66430,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62225,7 +66449,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62242,7 +66468,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62259,7 +66487,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62276,7 +66506,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62293,7 +66525,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62310,7 +66544,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62327,7 +66563,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62344,7 +66582,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62361,7 +66601,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62378,7 +66620,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62395,7 +66639,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62412,7 +66658,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62429,7 +66677,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62446,7 +66696,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62463,7 +66715,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62480,7 +66734,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62497,7 +66753,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62514,7 +66772,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62531,7 +66791,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62548,7 +66810,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62565,7 +66829,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62582,7 +66848,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62599,7 +66867,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62616,7 +66886,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62633,7 +66905,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62650,7 +66924,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62667,7 +66943,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62684,7 +66962,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62701,7 +66981,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62718,7 +67000,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62735,7 +67019,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62752,7 +67038,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62769,7 +67057,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62786,7 +67076,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62803,7 +67095,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62820,7 +67114,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62837,7 +67133,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62854,7 +67152,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62871,7 +67171,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62888,7 +67190,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62905,7 +67209,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62922,7 +67228,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62939,7 +67247,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62956,7 +67266,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62973,7 +67285,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -62990,7 +67304,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63007,7 +67323,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63024,7 +67342,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63041,7 +67361,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63058,7 +67380,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63075,7 +67399,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63092,7 +67418,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63109,7 +67437,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63126,7 +67456,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63143,7 +67475,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63160,7 +67494,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63177,7 +67513,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63194,7 +67532,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63211,7 +67551,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63228,7 +67570,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63245,7 +67589,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63262,7 +67608,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63279,7 +67627,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63296,7 +67646,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63313,7 +67665,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63330,7 +67684,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63347,7 +67703,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63364,7 +67722,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63381,7 +67741,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63398,7 +67760,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63415,7 +67779,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63432,7 +67798,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63449,7 +67817,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63466,7 +67836,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63483,7 +67855,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63500,7 +67874,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63517,7 +67893,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63534,7 +67912,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63551,7 +67931,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63568,7 +67950,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63585,7 +67969,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63602,7 +67988,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63619,7 +68007,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63636,7 +68026,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63653,7 +68045,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63669,8 +68063,10 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, - "exclude_configs": [], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63687,7 +68083,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63704,7 +68102,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63721,7 +68121,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63738,7 +68140,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63755,7 +68159,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63772,7 +68178,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63789,7 +68197,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63806,7 +68216,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63823,7 +68235,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63840,7 +68254,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63857,7 +68273,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63874,7 +68292,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63891,7 +68311,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63908,7 +68330,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63925,7 +68349,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63942,7 +68368,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63959,7 +68387,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63976,7 +68406,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -63993,7 +68425,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64010,7 +68444,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64027,7 +68463,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64044,7 +68482,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64061,7 +68501,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64078,7 +68520,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64095,7 +68539,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64112,7 +68558,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64129,7 +68577,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64146,7 +68596,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64163,7 +68615,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64180,7 +68634,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64197,7 +68653,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64214,7 +68672,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64231,7 +68691,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64248,7 +68710,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64265,7 +68729,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64282,7 +68748,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64299,7 +68767,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64316,7 +68786,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64333,7 +68805,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64350,7 +68824,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64367,7 +68843,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64384,7 +68862,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64401,7 +68881,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64418,7 +68900,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64435,7 +68919,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64452,7 +68938,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64469,7 +68957,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64486,7 +68976,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64503,7 +68995,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64520,7 +69014,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64537,7 +69033,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64554,7 +69052,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64571,7 +69071,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64588,7 +69090,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64605,7 +69109,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64622,7 +69128,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64639,7 +69147,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64656,7 +69166,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64673,7 +69185,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64690,7 +69204,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64707,7 +69223,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64724,7 +69242,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64741,7 +69261,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64758,7 +69280,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64775,7 +69299,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64792,7 +69318,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64809,7 +69337,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64826,7 +69356,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64843,7 +69375,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64860,7 +69394,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64877,7 +69413,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64894,7 +69432,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64911,7 +69451,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64928,7 +69470,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64945,7 +69489,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64962,7 +69508,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64979,7 +69527,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -64996,7 +69546,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65013,7 +69565,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65030,7 +69584,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65047,7 +69603,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65064,7 +69622,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65081,7 +69641,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65098,7 +69660,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65115,7 +69679,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65132,7 +69698,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65149,7 +69717,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65166,7 +69736,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65183,7 +69755,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65200,7 +69774,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65217,7 +69793,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65234,7 +69812,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65251,7 +69831,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65268,7 +69850,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65285,7 +69869,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65302,7 +69888,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65319,7 +69907,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65336,7 +69926,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65353,7 +69945,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65370,7 +69964,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65387,7 +69983,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65404,7 +70002,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65421,7 +70021,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65438,7 +70040,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65455,7 +70059,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65472,7 +70078,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65489,7 +70097,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65506,7 +70116,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65523,7 +70135,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65540,7 +70154,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65557,7 +70173,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65574,7 +70192,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65591,7 +70211,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65608,7 +70230,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65625,7 +70249,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65642,7 +70268,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65659,7 +70287,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65676,7 +70306,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65693,7 +70325,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65710,7 +70344,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65727,7 +70363,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65744,7 +70382,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65761,7 +70401,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65778,7 +70420,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65795,7 +70439,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65812,7 +70458,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65829,7 +70477,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65846,7 +70496,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65863,7 +70515,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65880,7 +70534,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65897,7 +70553,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65914,7 +70572,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65931,7 +70591,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65948,7 +70610,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65965,7 +70629,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65982,7 +70648,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -65999,7 +70667,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66016,7 +70686,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66033,7 +70705,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66050,7 +70724,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66067,7 +70743,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66084,7 +70762,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66101,7 +70781,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66118,7 +70800,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66135,7 +70819,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66152,7 +70838,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66169,7 +70857,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66186,7 +70876,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66203,7 +70895,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66220,7 +70914,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66237,7 +70933,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66254,7 +70952,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66271,7 +70971,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66288,7 +70990,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66305,7 +71009,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66322,7 +71028,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66339,7 +71047,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66356,7 +71066,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66373,7 +71085,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66390,7 +71104,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66407,7 +71123,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66424,7 +71142,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66441,7 +71161,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66458,7 +71180,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66475,7 +71199,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66492,7 +71218,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66509,7 +71237,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66526,7 +71256,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66543,7 +71275,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66559,8 +71293,10 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, - "exclude_configs": [], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66577,7 +71313,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66594,7 +71332,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66611,7 +71351,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66628,7 +71370,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66645,7 +71389,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66662,7 +71408,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66679,7 +71427,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66696,7 +71446,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66713,7 +71465,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66730,7 +71484,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66747,7 +71503,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66764,7 +71522,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66781,7 +71541,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66798,7 +71560,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66815,7 +71579,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66832,7 +71598,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66849,7 +71617,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66866,7 +71636,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66883,7 +71655,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66900,7 +71674,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66917,7 +71693,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66934,7 +71712,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "json_fuzzer_test_one_entry", @@ -66951,7 +71731,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -66968,7 +71750,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -66985,7 +71769,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67002,7 +71788,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67019,7 +71807,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67036,7 +71826,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67053,7 +71845,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67070,7 +71864,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67087,7 +71883,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67104,7 +71902,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67121,7 +71921,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67138,7 +71940,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67155,7 +71959,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67172,7 +71978,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67189,7 +71997,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67206,7 +72016,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67223,7 +72035,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67240,7 +72054,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67257,7 +72073,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67274,7 +72092,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67291,7 +72111,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67308,7 +72130,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67325,7 +72149,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67342,7 +72168,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67359,7 +72187,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67376,7 +72206,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67393,7 +72225,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67410,7 +72244,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67427,7 +72263,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67444,7 +72282,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67461,7 +72301,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67478,7 +72320,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67495,7 +72339,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67512,7 +72358,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67529,7 +72377,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67546,7 +72396,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67563,7 +72415,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67580,7 +72434,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67597,7 +72453,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67614,7 +72472,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67631,7 +72491,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67648,7 +72510,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67665,7 +72529,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67682,7 +72548,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67699,7 +72567,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67716,7 +72586,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67733,7 +72605,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67750,7 +72624,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67767,7 +72643,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67784,7 +72662,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67801,7 +72681,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67818,7 +72700,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67835,7 +72719,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67852,7 +72738,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67869,7 +72757,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67886,7 +72776,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67903,7 +72795,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67920,7 +72814,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67937,7 +72833,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67954,7 +72852,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67971,7 +72871,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -67988,7 +72890,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -68005,7 +72909,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_response_test_one_entry", @@ -68022,7 +72928,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68039,7 +72947,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68056,7 +72966,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68073,7 +72985,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68090,7 +73004,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68107,7 +73023,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68124,7 +73042,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68141,7 +73061,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68158,7 +73080,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68175,7 +73099,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68192,7 +73118,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68209,7 +73137,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68226,7 +73156,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68243,7 +73175,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68260,7 +73194,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68277,7 +73213,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68294,7 +73232,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68311,7 +73251,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68328,7 +73270,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68345,7 +73289,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68362,7 +73308,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68379,7 +73327,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68396,7 +73346,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68413,7 +73365,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68430,7 +73384,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68447,7 +73403,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68464,7 +73422,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68481,7 +73441,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68498,7 +73460,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68515,7 +73479,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68532,7 +73498,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68549,7 +73517,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68566,7 +73536,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68583,7 +73555,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68600,7 +73574,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68617,7 +73593,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68634,7 +73612,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68651,7 +73631,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68668,7 +73650,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68685,7 +73669,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68702,7 +73688,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68719,7 +73707,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68736,7 +73726,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68753,7 +73745,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68770,7 +73764,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68787,7 +73783,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68804,7 +73802,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68821,7 +73821,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68838,7 +73840,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68855,7 +73859,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68872,7 +73878,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68889,7 +73897,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68906,7 +73916,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68923,7 +73935,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68940,7 +73954,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68957,7 +73973,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68974,7 +73992,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -68991,7 +74011,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69008,7 +74030,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69025,7 +74049,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69042,7 +74068,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69059,7 +74087,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69076,7 +74106,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69093,7 +74125,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69110,7 +74144,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69127,7 +74163,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69144,7 +74182,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69161,7 +74201,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69178,7 +74220,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69195,7 +74239,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69212,7 +74258,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69229,7 +74277,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69246,7 +74296,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69263,7 +74315,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69280,7 +74334,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69297,7 +74353,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69314,7 +74372,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69331,7 +74391,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69348,7 +74410,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69365,7 +74429,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69382,7 +74448,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69399,7 +74467,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69416,7 +74486,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69433,7 +74505,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69449,8 +74523,10 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, - "exclude_configs": [], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69467,7 +74543,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69484,7 +74562,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69501,7 +74581,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69518,7 +74600,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69535,7 +74619,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69552,7 +74638,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69569,7 +74657,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69586,7 +74676,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69603,7 +74695,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69620,7 +74714,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69637,7 +74733,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69654,7 +74752,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69671,7 +74771,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69688,7 +74790,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69705,7 +74809,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69722,7 +74828,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69739,7 +74847,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69756,7 +74866,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69773,7 +74885,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69790,7 +74904,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69807,7 +74923,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69824,7 +74942,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69841,7 +74961,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69858,7 +74980,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69875,7 +74999,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69892,7 +75018,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69909,7 +75037,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69926,7 +75056,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69943,7 +75075,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69960,7 +75094,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69977,7 +75113,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -69994,7 +75132,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70011,7 +75151,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70028,7 +75170,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70045,7 +75189,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70062,7 +75208,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70079,7 +75227,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70096,7 +75246,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70113,7 +75265,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70130,7 +75284,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70147,7 +75303,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70164,7 +75322,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70181,7 +75341,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70198,7 +75360,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70215,7 +75379,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70232,7 +75398,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70249,7 +75417,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70266,7 +75436,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70283,7 +75455,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70300,7 +75474,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70317,7 +75493,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70334,7 +75512,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70351,7 +75531,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70368,7 +75550,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70385,7 +75569,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70402,7 +75588,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70419,7 +75607,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70436,7 +75626,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70453,7 +75645,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70470,7 +75664,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70487,7 +75683,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70504,7 +75702,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70521,7 +75721,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70538,7 +75740,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70555,7 +75759,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70572,7 +75778,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70589,7 +75797,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70606,7 +75816,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70623,7 +75835,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70640,7 +75854,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70657,7 +75873,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70674,7 +75892,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70691,7 +75911,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70708,7 +75930,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70725,7 +75949,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70742,7 +75968,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70759,7 +75987,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70776,7 +76006,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70793,7 +76025,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70810,7 +76044,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70827,7 +76063,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70844,7 +76082,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70861,7 +76101,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70878,7 +76120,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70895,7 +76139,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70912,7 +76158,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70929,7 +76177,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70946,7 +76196,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70963,7 +76215,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70980,7 +76234,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -70997,7 +76253,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71014,7 +76272,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71031,7 +76291,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71048,7 +76310,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71065,7 +76329,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71082,7 +76348,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71099,7 +76367,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71116,7 +76386,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71133,7 +76405,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71150,7 +76424,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71167,7 +76443,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71184,7 +76462,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71201,7 +76481,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71218,7 +76500,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71235,7 +76519,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71252,7 +76538,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71269,7 +76557,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71286,7 +76576,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71303,7 +76595,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71320,7 +76614,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71337,7 +76633,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71354,7 +76652,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71371,7 +76671,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71388,7 +76690,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71405,7 +76709,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71422,7 +76728,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71439,7 +76747,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71456,7 +76766,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71473,7 +76785,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71490,7 +76804,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71507,7 +76823,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71524,7 +76842,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71541,7 +76861,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71558,7 +76880,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71575,7 +76899,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71592,7 +76918,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71609,7 +76937,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71626,7 +76956,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71643,7 +76975,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71660,7 +76994,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71677,7 +77013,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71694,7 +77032,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71711,7 +77051,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71728,7 +77070,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71745,7 +77089,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71762,7 +77108,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71779,7 +77127,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71796,7 +77146,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71813,7 +77165,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71830,7 +77184,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71847,7 +77203,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71864,7 +77222,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71881,7 +77241,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71898,7 +77260,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71915,7 +77279,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71932,7 +77298,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71949,7 +77317,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71966,7 +77336,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -71983,7 +77355,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72000,7 +77374,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72017,7 +77393,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72034,7 +77412,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72051,7 +77431,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72068,7 +77450,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72085,7 +77469,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72102,7 +77488,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72119,7 +77507,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72136,7 +77526,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72153,7 +77545,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72170,7 +77564,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72187,7 +77583,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72204,7 +77602,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72221,7 +77621,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72238,7 +77640,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72255,7 +77659,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72272,7 +77678,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72289,7 +77697,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72306,7 +77716,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72323,7 +77735,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72339,8 +77753,10 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, - "exclude_configs": [], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72357,7 +77773,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72374,7 +77792,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72391,7 +77811,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72408,7 +77830,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72425,7 +77849,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72442,7 +77868,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72459,7 +77887,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72476,7 +77906,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72493,7 +77925,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72510,7 +77944,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72527,7 +77963,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72544,7 +77982,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72561,7 +78001,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72578,7 +78020,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72595,7 +78039,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72612,7 +78058,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72629,7 +78077,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "nanopb_fuzzer_serverlist_test_one_entry", @@ -72646,7 +78096,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -72663,7 +78115,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -72680,7 +78134,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -72697,7 +78153,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -72714,7 +78172,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -72731,7 +78191,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -72748,7 +78210,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -72765,7 +78229,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -72782,7 +78248,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -72799,7 +78267,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -72816,7 +78286,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -72833,7 +78305,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -72850,7 +78324,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -72867,7 +78343,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -72884,7 +78362,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -72901,7 +78381,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -72918,7 +78400,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -72935,7 +78419,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -72952,7 +78438,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -72969,7 +78457,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -72986,7 +78476,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73003,7 +78495,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73020,7 +78514,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73037,7 +78533,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73054,7 +78552,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73071,7 +78571,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73088,7 +78590,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73105,7 +78609,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73122,7 +78628,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73139,7 +78647,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73156,7 +78666,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73173,7 +78685,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73190,7 +78704,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73207,7 +78723,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73224,7 +78742,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73241,7 +78761,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73258,7 +78780,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73275,7 +78799,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73292,7 +78818,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73309,7 +78837,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73326,7 +78856,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73343,7 +78875,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73360,7 +78894,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73377,7 +78913,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73394,7 +78932,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73411,7 +78951,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73428,7 +78970,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73445,7 +78989,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73462,7 +79008,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73479,7 +79027,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73496,7 +79046,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73513,7 +79065,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73530,7 +79084,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73547,7 +79103,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73564,7 +79122,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73581,7 +79141,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73598,7 +79160,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73615,7 +79179,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73632,7 +79198,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73649,7 +79217,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73666,7 +79236,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73683,7 +79255,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73700,7 +79274,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73717,7 +79293,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73734,7 +79312,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73751,7 +79331,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73768,7 +79350,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73785,7 +79369,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73802,7 +79388,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73819,7 +79407,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73836,7 +79426,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73853,7 +79445,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73870,7 +79464,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73887,7 +79483,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73904,7 +79502,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73921,7 +79521,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73938,7 +79540,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73955,7 +79559,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73972,7 +79578,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -73989,7 +79597,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74006,7 +79616,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74023,7 +79635,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74040,7 +79654,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74057,7 +79673,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74074,7 +79692,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74091,7 +79711,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74108,7 +79730,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74125,7 +79749,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74142,7 +79768,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74159,7 +79787,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74176,7 +79806,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74193,7 +79825,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74210,7 +79844,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74227,7 +79863,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74244,7 +79882,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74261,7 +79901,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74278,7 +79920,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74295,7 +79939,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74312,7 +79958,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74329,7 +79977,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74346,7 +79996,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74363,7 +80015,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74380,7 +80034,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74397,7 +80053,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74414,7 +80072,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74431,7 +80091,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74448,7 +80110,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74465,7 +80129,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74482,7 +80148,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74499,7 +80167,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74516,7 +80186,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74533,7 +80205,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74550,7 +80224,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74567,7 +80243,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74584,7 +80262,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74601,7 +80281,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74618,7 +80300,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74635,7 +80319,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74652,7 +80338,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74669,7 +80357,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74686,7 +80376,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74703,7 +80395,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74720,7 +80414,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74737,7 +80433,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74754,7 +80452,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74771,7 +80471,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74788,7 +80490,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74805,7 +80509,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74822,7 +80528,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74839,7 +80547,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74856,7 +80566,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74873,7 +80585,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74890,7 +80604,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74907,7 +80623,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74924,7 +80642,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74941,7 +80661,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74958,7 +80680,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74975,7 +80699,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -74992,7 +80718,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75009,7 +80737,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75026,7 +80756,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75043,7 +80775,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75060,7 +80794,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75077,7 +80813,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75094,7 +80832,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75111,7 +80851,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75128,7 +80870,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75145,7 +80889,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75162,7 +80908,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75179,7 +80927,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75196,7 +80946,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75213,7 +80965,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75229,8 +80983,10 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, - "exclude_configs": [], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75247,7 +81003,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75264,7 +81022,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75281,7 +81041,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75298,7 +81060,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75315,7 +81079,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75332,7 +81098,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75349,7 +81117,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75366,7 +81136,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75383,7 +81155,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75400,7 +81174,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75417,7 +81193,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75434,7 +81212,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75451,7 +81231,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75468,7 +81250,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75485,7 +81269,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75502,7 +81288,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75519,7 +81307,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75536,7 +81326,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75553,7 +81345,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75570,7 +81364,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75587,7 +81383,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75604,7 +81402,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75621,7 +81421,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75638,7 +81440,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75655,7 +81459,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75672,7 +81478,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75689,7 +81497,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75706,7 +81516,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75723,7 +81535,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75740,7 +81554,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75757,7 +81573,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75774,7 +81592,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75791,7 +81611,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75808,7 +81630,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75825,7 +81649,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75842,7 +81668,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75859,7 +81687,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75876,7 +81706,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75893,7 +81725,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75910,7 +81744,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75927,7 +81763,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75944,7 +81782,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75961,7 +81801,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75978,7 +81820,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -75995,7 +81839,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76012,7 +81858,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76029,7 +81877,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76046,7 +81896,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76063,7 +81915,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76080,7 +81934,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76097,7 +81953,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76114,7 +81972,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76131,7 +81991,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76148,7 +82010,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76165,7 +82029,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76182,7 +82048,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76199,7 +82067,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76216,7 +82086,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76233,7 +82105,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76250,7 +82124,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76267,7 +82143,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76284,7 +82162,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76301,7 +82181,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76318,7 +82200,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76335,7 +82219,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76352,7 +82238,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76369,7 +82257,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76386,7 +82276,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76403,7 +82295,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76420,7 +82314,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76437,7 +82333,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76454,7 +82352,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76471,7 +82371,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76488,7 +82390,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76505,7 +82409,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76522,7 +82428,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76539,7 +82447,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76556,7 +82466,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76573,7 +82485,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76590,7 +82504,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76607,7 +82523,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76624,7 +82542,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76641,7 +82561,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76658,7 +82580,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76675,7 +82599,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76692,7 +82618,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76709,7 +82637,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76726,7 +82656,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76743,7 +82675,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76760,7 +82694,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76777,7 +82713,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76794,7 +82732,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76811,7 +82751,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76828,7 +82770,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76845,7 +82789,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76862,7 +82808,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76879,7 +82827,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76896,7 +82846,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76913,7 +82865,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76930,7 +82884,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76947,7 +82903,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76964,7 +82922,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76981,7 +82941,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -76998,7 +82960,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77015,7 +82979,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77032,7 +82998,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77049,7 +83017,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77066,7 +83036,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77083,7 +83055,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77100,7 +83074,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77117,7 +83093,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77134,7 +83112,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77151,7 +83131,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77168,7 +83150,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77185,7 +83169,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77202,7 +83188,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77219,7 +83207,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77236,7 +83226,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77253,7 +83245,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77270,7 +83264,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77287,7 +83283,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77304,7 +83302,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77321,7 +83321,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77338,7 +83340,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77355,7 +83359,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77372,7 +83378,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77389,7 +83397,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77406,7 +83416,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77423,7 +83435,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77440,7 +83454,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77457,7 +83473,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77474,7 +83492,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77491,7 +83511,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77508,7 +83530,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77525,7 +83549,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77542,7 +83568,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77559,7 +83587,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77576,7 +83606,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77593,7 +83625,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77610,7 +83644,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77627,7 +83663,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77644,7 +83682,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77661,7 +83701,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77678,7 +83720,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77695,7 +83739,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77712,7 +83758,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77729,7 +83777,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77746,7 +83796,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77763,7 +83815,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77780,7 +83834,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77797,7 +83853,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77814,7 +83872,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77831,7 +83891,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77848,7 +83910,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77865,7 +83929,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77882,7 +83948,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77899,7 +83967,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77916,7 +83986,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77933,7 +84005,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77950,7 +84024,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77967,7 +84043,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -77984,7 +84062,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78001,7 +84081,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78018,7 +84100,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78035,7 +84119,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78052,7 +84138,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78069,7 +84157,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78086,7 +84176,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78103,7 +84195,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78119,8 +84213,10 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, - "exclude_configs": [], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78137,7 +84233,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78154,7 +84252,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78171,7 +84271,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78188,7 +84290,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78205,7 +84309,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78222,7 +84328,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78239,7 +84347,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78256,7 +84366,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78273,7 +84385,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78290,7 +84404,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78307,7 +84423,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78324,7 +84442,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78341,7 +84461,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78358,7 +84480,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78375,7 +84499,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78392,7 +84518,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78409,7 +84537,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78426,7 +84556,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78443,7 +84575,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78460,7 +84594,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78477,7 +84613,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78494,7 +84632,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78511,7 +84651,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78528,7 +84670,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78545,7 +84689,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78562,7 +84708,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78579,7 +84727,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78596,7 +84746,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78613,7 +84765,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78630,7 +84784,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78647,7 +84803,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78664,7 +84822,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78681,7 +84841,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78698,7 +84860,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78715,7 +84879,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78732,7 +84898,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78749,7 +84917,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78766,7 +84936,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78783,7 +84955,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78800,7 +84974,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78817,7 +84993,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78834,7 +85012,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78851,7 +85031,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78868,7 +85050,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78885,7 +85069,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78902,7 +85088,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78919,7 +85107,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78936,7 +85126,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78953,7 +85145,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78970,7 +85164,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -78987,7 +85183,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79004,7 +85202,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79021,7 +85221,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79038,7 +85240,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79055,7 +85259,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79072,7 +85278,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79089,7 +85297,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79106,7 +85316,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79123,7 +85335,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79140,7 +85354,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79157,7 +85373,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79174,7 +85392,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79191,7 +85411,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79208,7 +85430,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79225,7 +85449,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79242,7 +85468,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79259,7 +85487,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79276,7 +85506,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79293,7 +85525,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79310,7 +85544,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79327,7 +85563,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79344,7 +85582,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79361,7 +85601,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79378,7 +85620,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79395,7 +85639,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79412,7 +85658,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79429,7 +85677,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79446,7 +85696,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79463,7 +85715,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79480,7 +85734,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79497,7 +85753,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79514,7 +85772,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79531,7 +85791,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79548,7 +85810,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79565,7 +85829,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79582,7 +85848,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79599,7 +85867,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79616,7 +85886,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79633,7 +85905,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79650,7 +85924,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79667,7 +85943,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79684,7 +85962,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79701,7 +85981,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79718,7 +86000,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79735,7 +86019,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79752,7 +86038,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79769,7 +86057,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79786,7 +86076,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79803,7 +86095,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79820,7 +86114,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79837,7 +86133,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79854,7 +86152,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79871,7 +86171,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79888,7 +86190,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79905,7 +86209,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79922,7 +86228,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79939,7 +86247,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "server_fuzzer_one_entry", @@ -79956,7 +86266,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -79973,7 +86285,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -79990,7 +86304,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80007,7 +86323,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80024,7 +86342,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80041,7 +86361,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80058,7 +86380,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80075,7 +86399,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80092,7 +86418,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80109,7 +86437,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80126,7 +86456,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80143,7 +86475,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80160,7 +86494,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80177,7 +86513,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80194,7 +86532,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80211,7 +86551,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80228,7 +86570,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80245,7 +86589,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80262,7 +86608,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80279,7 +86627,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80296,7 +86646,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80313,7 +86665,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80330,7 +86684,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80347,7 +86703,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80364,7 +86722,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80381,7 +86741,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80398,7 +86760,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80415,7 +86779,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80432,7 +86798,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80449,7 +86817,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80466,7 +86836,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80483,7 +86855,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80500,7 +86874,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80517,7 +86893,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80534,7 +86912,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80551,7 +86931,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80568,7 +86950,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80585,7 +86969,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80602,7 +86988,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80619,7 +87007,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80636,7 +87026,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80653,7 +87045,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80670,7 +87064,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80687,7 +87083,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80704,7 +87102,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80721,7 +87121,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80738,7 +87140,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80755,7 +87159,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80772,7 +87178,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80789,7 +87197,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80806,7 +87216,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80823,7 +87235,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80840,7 +87254,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80857,7 +87273,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80874,7 +87292,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80891,7 +87311,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80908,7 +87330,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80925,7 +87349,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80942,7 +87368,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80959,7 +87387,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80976,7 +87406,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -80993,7 +87425,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", @@ -81010,7 +87444,9 @@ "linux" ], "cpu_cost": 0.1, - "exclude_configs": [], + "exclude_configs": [ + "tsan" + ], "flaky": false, "language": "c", "name": "uri_fuzzer_test_one_entry", From 635c1caf3b943d634f43a5bec4c16b937c595782 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 15 Jun 2016 14:30:03 -0700 Subject: [PATCH 1107/1894] Fixed ruby timeout_on_sleeping_server implementation --- src/ruby/pb/test/client.rb | 28 +++++++++++++++++++++++----- 1 file changed, 23 insertions(+), 5 deletions(-) diff --git a/src/ruby/pb/test/client.rb b/src/ruby/pb/test/client.rb index b6695482a28..146623e0abf 100755 --- a/src/ruby/pb/test/client.rb +++ b/src/ruby/pb/test/client.rb @@ -197,6 +197,25 @@ class PingPongPlayer end end +class BlockingEnumerator + include Grpc::Testing + include Grpc::Testing::PayloadType + + def initialize(req_size, sleep_time) + @req_size = req_size + @sleep_time = sleep_time + end + + def each_item + return enum_for(:each_item) unless block_given? + req_cls = StreamingOutputCallRequest + req = req_cls.new(payload: Payload.new(body: nulls(@req_size))) + yield req + # Sleep until after the deadline should have passed + sleep(@sleep_time) + end +end + # defines methods corresponding to each interop test case. class NamedTests include Grpc::Testing @@ -315,11 +334,10 @@ class NamedTests end def timeout_on_sleeping_server - msg_sizes = [[27_182, 31_415]] - ppp = PingPongPlayer.new(msg_sizes) - deadline = GRPC::Core::TimeConsts::from_relative_time(0.001) - resps = @stub.full_duplex_call(ppp.each_item, deadline: deadline) - resps.each { |r| ppp.queue.push(r) } + enum = BlockingEnumerator.new(27_182, 2) + deadline = GRPC::Core::TimeConsts::from_relative_time(1) + resps = @stub.full_duplex_call(enum.each_item, deadline: deadline) + resps.each { } # wait to receive each request (or timeout) fail 'Should have raised GRPC::BadStatus(DEADLINE_EXCEEDED)' rescue GRPC::BadStatus => e assert("#{__callee__}: status was wrong") do From 123f137728a639558a3b3d863e6fe9e42dd2c40b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 15 Jun 2016 15:06:14 -0700 Subject: [PATCH 1108/1894] Allow forcing the use of the default polling strategy [instead of all strategies] --- tools/run_tests/run_tests.py | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index f7282dddb85..2de21204c3f 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -62,6 +62,11 @@ os.chdir(_ROOT) _FORCE_ENVIRON_FOR_WRAPPERS = {} +_POLLING_STRATEGIES = { + 'linux': ['poll', 'legacy'] +} + + def platform_string(): return jobset.platform_string() @@ -153,14 +158,8 @@ class CLanguage(object): def test_specs(self): out = [] binaries = get_c_tests(self.args.travis, self.test_lang) - POLLING_STRATEGIES = { - 'windows': ['all'], - 'mac': ['all'], - 'posix': ['all'], - 'linux': ['poll', 'legacy'] - } for target in binaries: - polling_strategies = (POLLING_STRATEGIES[self.platform] + polling_strategies = (_POLLING_STRATEGIES.get(self.platform, ['all']) if target.get('uses_polling', True) else ['all']) for polling_strategy in polling_strategies: @@ -382,7 +381,7 @@ class PythonLanguage(object): tests_json = json.load(tests_json_file) environment = dict(_FORCE_ENVIRON_FOR_WRAPPERS) environment['PYTHONPATH'] = '{}:{}'.format( - os.path.abspath('src/python/gens'), + os.path.abspath('src/python/gens'), os.path.abspath('src/python/grpcio_health_checking')) if self.config.build_config != 'gcov': return [self.config.job_spec( @@ -836,8 +835,13 @@ argp.add_argument('--update_submodules', default=[], nargs='*', argp.add_argument('-a', '--antagonists', default=0, type=int) argp.add_argument('-x', '--xml_report', default=None, type=str, help='Generates a JUnit-compatible XML report') +argp.add_argument('--force_default_poller', default=False, action='store_const', const=True, + help='Dont try to iterate over many polling strategies when they exist') args = argp.parse_args() +if args.force_default_poller: + _POLLING_STRATEGIES = {} + jobset.measure_cpu_costs = args.measure_cpu_costs # update submodules if necessary From a6c9a9121ec68a6754f4020bed357498bb237b37 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 15 Jun 2016 10:11:43 -0700 Subject: [PATCH 1109/1894] update project.json --- src/csharp/Grpc.Auth/project.json | 25 +++++------ src/csharp/Grpc.Core.Tests/project.json | 14 +++--- src/csharp/Grpc.Core/project.json | 44 +++++++++---------- .../Grpc.Examples.MathClient/project.json | 13 +++--- .../Grpc.Examples.MathServer/project.json | 13 +++--- src/csharp/Grpc.Examples.Tests/project.json | 13 +++--- src/csharp/Grpc.Examples/project.json | 13 ++++-- .../Grpc.HealthCheck.Tests/project.json | 15 ++++--- src/csharp/Grpc.HealthCheck/project.json | 30 ++++++++----- .../project.json | 13 +++--- .../project.json | 13 +++--- .../project.json | 13 +++--- .../Grpc.IntegrationTesting/project.json | 14 +++--- 13 files changed, 133 insertions(+), 100 deletions(-) diff --git a/src/csharp/Grpc.Auth/project.json b/src/csharp/Grpc.Auth/project.json index 513325f7491..25579982a9d 100644 --- a/src/csharp/Grpc.Auth/project.json +++ b/src/csharp/Grpc.Auth/project.json @@ -1,20 +1,17 @@ { "version": "0.14.0-anexperiment", - "title": "gRPC C# Auth", - "summary": "Auth library for C# implementation of gRPC - an RPC library and framework", - "description": "Auth library for C# implementation of gRPC - an RPC library and framework. See project site for more info.", - "authors": ["Google Inc."], - "owners": ["grpc-packages"], - "licenseUrl": "https://github.com/grpc/grpc/blob/master/LICENSE", - "projectUrl": "https://github.com/grpc/grpc", - "requireLicenseAcceptance": false, + "authors": [ "Google Inc." ], "copyright": "Copyright 2015, Google Inc.", - "tags": ["gRPC RPC Protocol HTTP/2 Auth OAuth2"], - - "compile": "**/*.cs", - "resourceFiles": ["../../../etc/roots.pem"], - + "packOptions": { + "summary": "Auth library for C# implementation of gRPC - an RPC library and framework", + "description": "Auth library for C# implementation of gRPC - an RPC library and framework. See project site for more info.", + "owners": [ "grpc-packages" ], + "licenseUrl": "https://github.com/grpc/grpc/blob/master/LICENSE", + "projectUrl": "https://github.com/grpc/grpc", + "requireLicenseAcceptance": false, + "tags": [ "gRPC RPC Protocol HTTP/2 Auth OAuth2" ], + }, "dependencies": { "Grpc.Core": "0.14.0-anexperiment", "Google.Apis.Auth": "1.11.1" @@ -28,7 +25,7 @@ "dependencies": { "Microsoft.CSharp": "4.0.1-beta-23516", "Microsoft.NETCore.Portable.Compatibility": "1.0.1-beta-23516", - "System.Threading.Tasks": "4.0.11-beta-23516" + "System.Threading.Tasks": "4.0.11-beta-23516" } } } diff --git a/src/csharp/Grpc.Core.Tests/project.json b/src/csharp/Grpc.Core.Tests/project.json index 0c5d9354358..dc90e04ccfb 100644 --- a/src/csharp/Grpc.Core.Tests/project.json +++ b/src/csharp/Grpc.Core.Tests/project.json @@ -1,13 +1,17 @@ { - "compile": "**/*.cs", - "compilationOptions": { + "buildOptions": { + "compile": "**/*.cs", + "copyToOutput": { + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll" + } + }, "emitEntryPoint": true }, - - "content": "../nativelibs/**", - "dependencies": { "Grpc.Core": "0.14.0-anexperiment", + "Newtonsoft.Json": "8.0.3", "NUnit": "3.2.0", "NUnitLite": "3.2.0-*" }, diff --git a/src/csharp/Grpc.Core/project.json b/src/csharp/Grpc.Core/project.json index 8aece57856c..a916bbd09ab 100644 --- a/src/csharp/Grpc.Core/project.json +++ b/src/csharp/Grpc.Core/project.json @@ -1,32 +1,30 @@ { "version": "0.14.0-anexperiment", - "title": "gRPC C# Core", - "summary": "Core C# implementation of gRPC - an RPC library and framework", - "description": "Core C# implementation of gRPC - an RPC library and framework. See project site for more info.", "authors": [ "Google Inc." ], - "owners": [ "grpc-packages" ], - "licenseUrl": "https://github.com/grpc/grpc/blob/master/LICENSE", - "projectUrl": "https://github.com/grpc/grpc", - "requireLicenseAcceptance": false, "copyright": "Copyright 2015, Google Inc.", - "tags": [ "gRPC RPC Protocol HTTP/2" ], - - "compile": "**/*.cs", - "resourceFiles": [ "../../../etc/roots.pem" ], - - "content": "../nativelibs/**", - - "packInclude": { - "build/net45/": "Grpc.Core.targets", - "build/native/bin/windows_x86/": "../nativelibs/windows_x86/grpc_csharp_ext.dll", - "build/native/bin/windows_x64/": "../nativelibs/windows_x64/grpc_csharp_ext.dll", - "build/native/bin/linux_x86/": "../nativelibs/linux_x86/libgrpc_csharp_ext.so", - "build/native/bin/linux_x64/": "../nativelibs/linux_x64/libgrpc_csharp_ext.so", - "build/native/bin/macosx_x86/": "../nativelibs/macosx_x86/libgrpc_csharp_ext.dylib", - "build/native/bin/macosx_x64/": "../nativelibs/macosx_x64/libgrpc_csharp_ext.dylib" + "packOptions": { + "summary": "Core C# implementation of gRPC - an RPC library and framework", + "description": "Core C# implementation of gRPC - an RPC library and framework. See project site for more info.", + "owners": [ "grpc-packages" ], + "licenseUrl": "https://github.com/grpc/grpc/blob/master/LICENSE", + "projectUrl": "https://github.com/grpc/grpc", + "requireLicenseAcceptance": false, + "tags": [ "gRPC RPC Protocol HTTP/2" ], + "files": { + "build/net45/": "Grpc.Core.targets", + "build/native/bin/windows_x86/": "../nativelibs/windows_x86/grpc_csharp_ext.dll", + "build/native/bin/windows_x64/": "../nativelibs/windows_x64/grpc_csharp_ext.dll", + "build/native/bin/linux_x86/": "../nativelibs/linux_x86/libgrpc_csharp_ext.so", + "build/native/bin/linux_x64/": "../nativelibs/linux_x64/libgrpc_csharp_ext.so", + "build/native/bin/macosx_x86/": "../nativelibs/macosx_x86/libgrpc_csharp_ext.dylib", + "build/native/bin/macosx_x64/": "../nativelibs/macosx_x64/libgrpc_csharp_ext.dylib" + } + }, + "buildOptions": { + "compile": "**/*.cs", + "embed": [ "../../../etc/roots.pem" ] }, - "dependencies": { "Ix-Async": "1.2.5" }, diff --git a/src/csharp/Grpc.Examples.MathClient/project.json b/src/csharp/Grpc.Examples.MathClient/project.json index 67af09721ce..4abf8a5e34f 100644 --- a/src/csharp/Grpc.Examples.MathClient/project.json +++ b/src/csharp/Grpc.Examples.MathClient/project.json @@ -1,11 +1,14 @@ { - "compile": "**/*.cs", - "compilationOptions": { + "buildOptions": { + "compile": "**/*.cs", + "copyToOutput": { + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll" + } + }, "emitEntryPoint": true }, - - "content": "../nativelibs/**", - "dependencies": { "Grpc.Examples": "1.0.0" }, diff --git a/src/csharp/Grpc.Examples.MathServer/project.json b/src/csharp/Grpc.Examples.MathServer/project.json index 67af09721ce..4abf8a5e34f 100644 --- a/src/csharp/Grpc.Examples.MathServer/project.json +++ b/src/csharp/Grpc.Examples.MathServer/project.json @@ -1,11 +1,14 @@ { - "compile": "**/*.cs", - "compilationOptions": { + "buildOptions": { + "compile": "**/*.cs", + "copyToOutput": { + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll" + } + }, "emitEntryPoint": true }, - - "content": "../nativelibs/**", - "dependencies": { "Grpc.Examples": "1.0.0" }, diff --git a/src/csharp/Grpc.Examples.Tests/project.json b/src/csharp/Grpc.Examples.Tests/project.json index e61aa65abfc..bd74812c153 100644 --- a/src/csharp/Grpc.Examples.Tests/project.json +++ b/src/csharp/Grpc.Examples.Tests/project.json @@ -1,11 +1,14 @@ { - "compile": "**/*.cs", - "compilationOptions": { + "buildOptions": { + "compile": "**/*.cs", + "copyToOutput": { + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll" + } + }, "emitEntryPoint": true }, - - "content": "../nativelibs/**", - "dependencies": { "Grpc.Examples": "1.0.0", "NUnit": "3.2.0", diff --git a/src/csharp/Grpc.Examples/project.json b/src/csharp/Grpc.Examples/project.json index f259459a717..e2b4c10422f 100644 --- a/src/csharp/Grpc.Examples/project.json +++ b/src/csharp/Grpc.Examples/project.json @@ -1,14 +1,19 @@ { - "compile": "**/*.cs", - - "content": "../nativelibs/**", + "buildOptions": { + "compile": "**/*.cs" + }, "dependencies": { "Grpc.Core": "0.0.1", "Google.Protobuf": "3.0.0-beta3" }, "frameworks": { - "net45": { }, + "net45": { + "frameworkAssemblies": { + "System.Runtime": "", + "System.IO": "" + } + }, "dotnet54": { "imports": [ "portable-net45" diff --git a/src/csharp/Grpc.HealthCheck.Tests/project.json b/src/csharp/Grpc.HealthCheck.Tests/project.json index 5ecb17c9671..248a1324f60 100644 --- a/src/csharp/Grpc.HealthCheck.Tests/project.json +++ b/src/csharp/Grpc.HealthCheck.Tests/project.json @@ -1,13 +1,16 @@ { - "compile": "**/*.cs", - "compilationOptions": { + "buildOptions": { + "compile": "**/*.cs", + "copyToOutput": { + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll" + } + }, "emitEntryPoint": true }, - - "content": "../nativelibs/**", - "dependencies": { - "Grpc.HealthCheck": "1.0.0", + "Grpc.HealthCheck": "0.0.1", "NUnit": "3.2.0", "NUnitLite": "3.2.0-*" }, diff --git a/src/csharp/Grpc.HealthCheck/project.json b/src/csharp/Grpc.HealthCheck/project.json index 220224819f8..ad42df595d4 100644 --- a/src/csharp/Grpc.HealthCheck/project.json +++ b/src/csharp/Grpc.HealthCheck/project.json @@ -1,25 +1,31 @@ { "version": "0.14.0-anexperiment", - "title": "gRPC C# Healthchecking", - "summary": "Implementation of gRPC health service", - "description": "Example implementation of grpc.health.v1 service that can be used for health-checking.", "authors": [ "Google Inc." ], - "owners": [ "grpc-packages" ], - "licenseUrl": "https://github.com/grpc/grpc/blob/master/LICENSE", - "projectUrl": "https://github.com/grpc/grpc", - "requireLicenseAcceptance": false, "copyright": "Copyright 2015, Google Inc.", - "tags": [ "gRPC health check" ], - - "compile": "**/*.cs", - + "packOptions": { + "summary": "Implementation of gRPC health service", + "description": "Example implementation of grpc.health.v1 service that can be used for health-checking.", + "owners": [ "grpc-packages" ], + "licenseUrl": "https://github.com/grpc/grpc/blob/master/LICENSE", + "projectUrl": "https://github.com/grpc/grpc", + "requireLicenseAcceptance": false, + "tags": [ "gRPC health check" ] + }, + "buildOptions": { + "compile": "**/*.cs" + }, "dependencies": { "Grpc.Core": "0.14.0-anexperiment", "Google.Protobuf": "3.0.0-beta3" }, "frameworks": { - "net45": { }, + "net45": { + "frameworkAssemblies": { + "System.Runtime": "", + "System.IO": "" + } + }, "dotnet54": { "imports": [ "portable-net45" diff --git a/src/csharp/Grpc.IntegrationTesting.Client/project.json b/src/csharp/Grpc.IntegrationTesting.Client/project.json index e023a9815b1..6ad74d59984 100644 --- a/src/csharp/Grpc.IntegrationTesting.Client/project.json +++ b/src/csharp/Grpc.IntegrationTesting.Client/project.json @@ -1,11 +1,14 @@ { - "compile": "**/*.cs", - "compilationOptions": { + "buildOptions": { + "compile": "**/*.cs", + "copyToOutput": { + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll" + } + }, "emitEntryPoint": true }, - - "content": "../nativelibs/**", - "dependencies": { "Grpc.IntegrationTesting": "1.0.0" }, diff --git a/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json index e023a9815b1..6ad74d59984 100644 --- a/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json +++ b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json @@ -1,11 +1,14 @@ { - "compile": "**/*.cs", - "compilationOptions": { + "buildOptions": { + "compile": "**/*.cs", + "copyToOutput": { + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll" + } + }, "emitEntryPoint": true }, - - "content": "../nativelibs/**", - "dependencies": { "Grpc.IntegrationTesting": "1.0.0" }, diff --git a/src/csharp/Grpc.IntegrationTesting.Server/project.json b/src/csharp/Grpc.IntegrationTesting.Server/project.json index e023a9815b1..6ad74d59984 100644 --- a/src/csharp/Grpc.IntegrationTesting.Server/project.json +++ b/src/csharp/Grpc.IntegrationTesting.Server/project.json @@ -1,11 +1,14 @@ { - "compile": "**/*.cs", - "compilationOptions": { + "buildOptions": { + "compile": "**/*.cs", + "copyToOutput": { + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll" + } + }, "emitEntryPoint": true }, - - "content": "../nativelibs/**", - "dependencies": { "Grpc.IntegrationTesting": "1.0.0" }, diff --git a/src/csharp/Grpc.IntegrationTesting/project.json b/src/csharp/Grpc.IntegrationTesting/project.json index 93cabf21bcf..0093531fa9e 100644 --- a/src/csharp/Grpc.IntegrationTesting/project.json +++ b/src/csharp/Grpc.IntegrationTesting/project.json @@ -1,11 +1,8 @@ { - "compile": "**/*.cs", - "compilationOptions": { + "buildOptions": { + "compile": "**/*.cs", "emitEntryPoint": true }, - - "content": "../nativelibs/**", - "dependencies": { "Grpc.Auth": "0.0.1", "Grpc.Core": "0.0.1", @@ -16,6 +13,11 @@ "NUnitLite": "3.2.0-*" }, "frameworks": { - "net45": { } + "net45": { + "frameworkAssemblies": { + "System.Runtime": "", + "System.IO": "" + } + } } } From 635fafc398df035d45e0f56fe24fb21477805067 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 15 Jun 2016 15:10:51 -0700 Subject: [PATCH 1110/1894] dont register shutdownhooks for dotnet5.4 --- src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs | 14 ++++++++------ src/csharp/Grpc.Core/GrpcEnvironment.cs | 4 ++++ 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs b/src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs index e605a310f9e..d2c641cf2f8 100644 --- a/src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs +++ b/src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs @@ -32,13 +32,7 @@ #endregion using System; -using System.Diagnostics; -using System.Linq; -using System.Reflection; -using System.Threading; using System.Threading.Tasks; -using Grpc.Core; -using Grpc.Core.Internal; using Grpc.Core.Utils; using NUnit.Framework; @@ -46,6 +40,13 @@ namespace Grpc.Core.Tests { public class AppDomainUnloadTest { +#if DOTNET5_4 + [Test] + [Ignore("Not supported for CoreCLR")] + public void AppDomainUnloadHookCanCleanupAbandonedCall() + { + } +#else [Test] public void AppDomainUnloadHookCanCleanupAbandonedCall() { @@ -86,5 +87,6 @@ namespace Grpc.Core.Tests readyToShutdown.Task.Wait(); // make sure handler is running } } +#endif } } diff --git a/src/csharp/Grpc.Core/GrpcEnvironment.cs b/src/csharp/Grpc.Core/GrpcEnvironment.cs index e9e4cb4cbb3..37f9dce7c2f 100644 --- a/src/csharp/Grpc.Core/GrpcEnvironment.cs +++ b/src/csharp/Grpc.Core/GrpcEnvironment.cs @@ -352,8 +352,12 @@ namespace Grpc.Core { if (!hooksRegistered) { + // TODO(jtattermusch): register shutdownhooks for CoreCLR as well +#if !DOTNET5_4 + AppDomain.CurrentDomain.ProcessExit += ShutdownHookHandler; AppDomain.CurrentDomain.DomainUnload += ShutdownHookHandler; +#endif } hooksRegistered = true; } From 5fe21a11bb8c3b5af62094ae9932ebb0d45b3f2b Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 15 Jun 2016 16:00:00 -0700 Subject: [PATCH 1111/1894] Fix run_interop_tests override_server option --- tools/run_tests/run_interop_tests.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index edbdf05e2a2..81ba729d315 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -465,7 +465,8 @@ def cloud_to_prod_jobspec(language, test_case, server_host_name, flake_retries=5 if args.allow_flakes else 0, timeout_retries=2 if args.allow_flakes else 0, kill_handler=_job_kill_handler) - test_job.container_name = container_name + if docker_image: + test_job.container_name = container_name return test_job @@ -501,7 +502,8 @@ def cloud_to_cloud_jobspec(language, test_case, server_name, server_host, flake_retries=5 if args.allow_flakes else 0, timeout_retries=2 if args.allow_flakes else 0, kill_handler=_job_kill_handler) - test_job.container_name = container_name + if docker_image: + test_job.container_name = container_name return test_job From aee10fd73c0fc23c6c7ac1fea0874c54107c1a50 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 15 Jun 2016 16:03:29 -0700 Subject: [PATCH 1112/1894] Fix windows tests for idempotent shutdown --- test/core/iomgr/endpoint_tests.c | 37 +++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c index 35c647a4543..aab3c0c611a 100644 --- a/test/core/iomgr/endpoint_tests.c +++ b/test/core/iomgr/endpoint_tests.c @@ -222,7 +222,7 @@ static void read_and_write_test(grpc_endpoint_test_config config, even when bytes_written is unsigned. */ state.bytes_written -= state.current_write_size; read_and_write_test_write_handler(&exec_ctx, &state, 1); - grpc_exec_ctx_finish(&exec_ctx); + grpc_exec_ctx_flush(&exec_ctx); grpc_endpoint_read(&exec_ctx, state.read_ep, &state.incoming, &state.done_read); @@ -233,7 +233,7 @@ static void read_and_write_test(grpc_endpoint_test_config config, gpr_log(GPR_DEBUG, "shutdown write"); grpc_endpoint_shutdown(&exec_ctx, state.write_ep); } - grpc_exec_ctx_finish(&exec_ctx); + grpc_exec_ctx_flush(&exec_ctx); gpr_mu_lock(g_mu); while (!state.read_done || !state.write_done) { @@ -243,7 +243,7 @@ static void read_and_write_test(grpc_endpoint_test_config config, gpr_now(GPR_CLOCK_MONOTONIC), deadline); } gpr_mu_unlock(g_mu); - grpc_exec_ctx_finish(&exec_ctx); + grpc_exec_ctx_flush(&exec_ctx); end_test(config); gpr_slice_buffer_destroy(&state.outgoing); @@ -257,6 +257,20 @@ static void inc_on_failure(grpc_exec_ctx *exec_ctx, void *arg, bool success) { *(int *)arg += (success == false); } +static void wait_for_fail_count(grpc_exec_ctx *exec_ctx, int *fail_count, int want_fail_count) { + grpc_exec_ctx_flush(exec_ctx); + for (int i = 0; i < 5 && *fail_count < want_fail_count; i++) { + grpc_pollset_worker *worker = NULL; + gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME); + gpr_timespec deadline = gpr_time_add(now, gpr_time_from_seconds(1, GPR_TIMESPAN)); + gpr_mu_lock(g_mu); + grpc_pollset_work(exec_ctx, g_pollset, &worker, now, deadline); + gpr_mu_unlock(g_mu); + grpc_exec_ctx_flush(exec_ctx); + } + GPR_ASSERT(*fail_count == want_fail_count); +} + static void multiple_shutdown_test(grpc_endpoint_test_config config) { grpc_endpoint_test_fixture f = begin_test(config, "multiple_shutdown_test", 128); @@ -266,25 +280,21 @@ static void multiple_shutdown_test(grpc_endpoint_test_config config) { gpr_slice_buffer_init(&slice_buffer); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + grpc_endpoint_add_to_pollset(&exec_ctx, f.client_ep, g_pollset); grpc_endpoint_read(&exec_ctx, f.client_ep, &slice_buffer, grpc_closure_create(inc_on_failure, &fail_count)); - grpc_exec_ctx_flush(&exec_ctx); - GPR_ASSERT(fail_count == 0); + wait_for_fail_count(&exec_ctx, &fail_count, 0); grpc_endpoint_shutdown(&exec_ctx, f.client_ep); - grpc_exec_ctx_flush(&exec_ctx); - GPR_ASSERT(fail_count == 1); + wait_for_fail_count(&exec_ctx, &fail_count, 1); grpc_endpoint_read(&exec_ctx, f.client_ep, &slice_buffer, grpc_closure_create(inc_on_failure, &fail_count)); - grpc_exec_ctx_flush(&exec_ctx); - GPR_ASSERT(fail_count == 2); + wait_for_fail_count(&exec_ctx, &fail_count, 2); gpr_slice_buffer_add(&slice_buffer, gpr_slice_from_copied_string("a")); grpc_endpoint_write(&exec_ctx, f.client_ep, &slice_buffer, grpc_closure_create(inc_on_failure, &fail_count)); - grpc_exec_ctx_flush(&exec_ctx); - GPR_ASSERT(fail_count == 3); + wait_for_fail_count(&exec_ctx, &fail_count, 3); grpc_endpoint_shutdown(&exec_ctx, f.client_ep); - grpc_exec_ctx_flush(&exec_ctx); - GPR_ASSERT(fail_count == 3); + wait_for_fail_count(&exec_ctx, &fail_count, 3); gpr_slice_buffer_destroy(&slice_buffer); @@ -306,4 +316,5 @@ void grpc_endpoint_tests(grpc_endpoint_test_config config, read_and_write_test(config, 40320, i, i, 0); } g_pollset = NULL; + g_mu = NULL; } From c8762faf46a8e95e3de70e422a43d4925d4d6a86 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 15 Jun 2016 16:06:41 -0700 Subject: [PATCH 1113/1894] clang-format code --- test/core/iomgr/endpoint_tests.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/core/iomgr/endpoint_tests.c b/test/core/iomgr/endpoint_tests.c index aab3c0c611a..0f26c0edfdd 100644 --- a/test/core/iomgr/endpoint_tests.c +++ b/test/core/iomgr/endpoint_tests.c @@ -257,12 +257,14 @@ static void inc_on_failure(grpc_exec_ctx *exec_ctx, void *arg, bool success) { *(int *)arg += (success == false); } -static void wait_for_fail_count(grpc_exec_ctx *exec_ctx, int *fail_count, int want_fail_count) { +static void wait_for_fail_count(grpc_exec_ctx *exec_ctx, int *fail_count, + int want_fail_count) { grpc_exec_ctx_flush(exec_ctx); for (int i = 0; i < 5 && *fail_count < want_fail_count; i++) { grpc_pollset_worker *worker = NULL; gpr_timespec now = gpr_now(GPR_CLOCK_REALTIME); - gpr_timespec deadline = gpr_time_add(now, gpr_time_from_seconds(1, GPR_TIMESPAN)); + gpr_timespec deadline = + gpr_time_add(now, gpr_time_from_seconds(1, GPR_TIMESPAN)); gpr_mu_lock(g_mu); grpc_pollset_work(exec_ctx, g_pollset, &worker, now, deadline); gpr_mu_unlock(g_mu); From 9f6a80597771eae74760b23a66737eb8960f8fd7 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 15 Jun 2016 17:39:03 -0700 Subject: [PATCH 1114/1894] Allow disabling traces, add trace variables for pluck and timeout events --- BUILD | 4 -- build.yaml | 1 - gRPC.podspec | 2 - grpc.gemspec | 1 - package.xml | 1 - src/core/lib/debug/trace.c | 8 +++- src/core/lib/surface/call.h | 1 - src/core/lib/surface/completion_queue.c | 29 +++++++---- src/core/lib/surface/completion_queue.h | 3 ++ src/core/lib/surface/init.c | 7 ++- src/core/lib/surface/surface_trace.h | 48 ------------------- tools/doxygen/Doxyfile.core.internal | 1 - tools/run_tests/sources_and_headers.json | 2 - vsprojects/vcxproj/grpc/grpc.vcxproj | 1 - vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 3 -- .../grpc_unsecure/grpc_unsecure.vcxproj | 1 - .../grpc_unsecure.vcxproj.filters | 3 -- 17 files changed, 36 insertions(+), 80 deletions(-) delete mode 100644 src/core/lib/surface/surface_trace.h diff --git a/BUILD b/BUILD index f049e3c4056..bf001ac7273 100644 --- a/BUILD +++ b/BUILD @@ -228,7 +228,6 @@ cc_library( "src/core/lib/surface/init.h", "src/core/lib/surface/lame_client.h", "src/core/lib/surface/server.h", - "src/core/lib/surface/surface_trace.h", "src/core/lib/transport/byte_stream.h", "src/core/lib/transport/connectivity_state.h", "src/core/lib/transport/metadata.h", @@ -606,7 +605,6 @@ cc_library( "src/core/lib/surface/init.h", "src/core/lib/surface/lame_client.h", "src/core/lib/surface/server.h", - "src/core/lib/surface/surface_trace.h", "src/core/lib/transport/byte_stream.h", "src/core/lib/transport/connectivity_state.h", "src/core/lib/transport/metadata.h", @@ -949,7 +947,6 @@ cc_library( "src/core/lib/surface/init.h", "src/core/lib/surface/lame_client.h", "src/core/lib/surface/server.h", - "src/core/lib/surface/surface_trace.h", "src/core/lib/transport/byte_stream.h", "src/core/lib/transport/connectivity_state.h", "src/core/lib/transport/metadata.h", @@ -2061,7 +2058,6 @@ objc_library( "src/core/lib/surface/init.h", "src/core/lib/surface/lame_client.h", "src/core/lib/surface/server.h", - "src/core/lib/surface/surface_trace.h", "src/core/lib/transport/byte_stream.h", "src/core/lib/transport/connectivity_state.h", "src/core/lib/transport/metadata.h", diff --git a/build.yaml b/build.yaml index a83ebc595ad..11cc9347cb0 100644 --- a/build.yaml +++ b/build.yaml @@ -224,7 +224,6 @@ filegroups: - src/core/lib/surface/init.h - src/core/lib/surface/lame_client.h - src/core/lib/surface/server.h - - src/core/lib/surface/surface_trace.h - src/core/lib/transport/byte_stream.h - src/core/lib/transport/connectivity_state.h - src/core/lib/transport/metadata.h diff --git a/gRPC.podspec b/gRPC.podspec index d3665d51744..622be89ca74 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -231,7 +231,6 @@ Pod::Spec.new do |s| 'src/core/lib/surface/init.h', 'src/core/lib/surface/lame_client.h', 'src/core/lib/surface/server.h', - 'src/core/lib/surface/surface_trace.h', 'src/core/lib/transport/byte_stream.h', 'src/core/lib/transport/connectivity_state.h', 'src/core/lib/transport/metadata.h', @@ -606,7 +605,6 @@ Pod::Spec.new do |s| 'src/core/lib/surface/init.h', 'src/core/lib/surface/lame_client.h', 'src/core/lib/surface/server.h', - 'src/core/lib/surface/surface_trace.h', 'src/core/lib/transport/byte_stream.h', 'src/core/lib/transport/connectivity_state.h', 'src/core/lib/transport/metadata.h', diff --git a/grpc.gemspec b/grpc.gemspec index 9f3ae048a70..e0a8ff00a42 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -240,7 +240,6 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/surface/init.h ) s.files += %w( src/core/lib/surface/lame_client.h ) s.files += %w( src/core/lib/surface/server.h ) - s.files += %w( src/core/lib/surface/surface_trace.h ) s.files += %w( src/core/lib/transport/byte_stream.h ) s.files += %w( src/core/lib/transport/connectivity_state.h ) s.files += %w( src/core/lib/transport/metadata.h ) diff --git a/package.xml b/package.xml index b25e42c1c01..fef06ef9eed 100644 --- a/package.xml +++ b/package.xml @@ -247,7 +247,6 @@ - diff --git a/src/core/lib/debug/trace.c b/src/core/lib/debug/trace.c index 555f497b784..c56046785b3 100644 --- a/src/core/lib/debug/trace.c +++ b/src/core/lib/debug/trace.c @@ -88,7 +88,11 @@ static void parse(const char *s) { split(s, &strings, &nstrings); for (i = 0; i < nstrings; i++) { - grpc_tracer_set_enabled(strings[i], 1); + if (strings[i][0] == '-') { + grpc_tracer_set_enabled(strings[i] + 1, 0); + } else { + grpc_tracer_set_enabled(strings[i], 1); + } } for (i = 0; i < nstrings; i++) { @@ -117,7 +121,7 @@ int grpc_tracer_set_enabled(const char *name, int enabled) { tracer *t; if (0 == strcmp(name, "all")) { for (t = tracers; t; t = t->next) { - *t->flag = 1; + *t->flag = enabled; } } else { int found = 0; diff --git a/src/core/lib/surface/call.h b/src/core/lib/surface/call.h index b640345c21d..3a78fe3aa36 100644 --- a/src/core/lib/surface/call.h +++ b/src/core/lib/surface/call.h @@ -37,7 +37,6 @@ #include "src/core/lib/channel/channel_stack.h" #include "src/core/lib/channel/context.h" #include "src/core/lib/surface/api_trace.h" -#include "src/core/lib/surface/surface_trace.h" #include #include diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index 5eb7cf1bf4f..de2b674d0e0 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -48,7 +48,6 @@ #include "src/core/lib/surface/api_trace.h" #include "src/core/lib/surface/call.h" #include "src/core/lib/surface/event_string.h" -#include "src/core/lib/surface/surface_trace.h" typedef struct { grpc_pollset_worker **worker; @@ -91,6 +90,18 @@ struct grpc_completion_queue { static gpr_mu g_freelist_mu; static grpc_completion_queue *g_freelist; +int grpc_cq_pluck_trace; +int grpc_cq_event_timeout_trace; + +#define GRPC_SURFACE_TRACE_RETURNED_EVENT(cq, event) \ + if (grpc_api_trace && \ + (grpc_cq_pluck_trace || (event)->type != GRPC_QUEUE_TIMEOUT)) { \ + char *_ev = grpc_event_string(event); \ + gpr_log(GPR_INFO, "RETURN_EVENT[%p]: %s", cq, _ev); \ + gpr_free(_ev); \ + } + + static void on_pollset_shutdown_done(grpc_exec_ctx *exec_ctx, void *cc, bool success); @@ -396,13 +407,15 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, GPR_TIMER_BEGIN("grpc_completion_queue_pluck", 0); - GRPC_API_TRACE( - "grpc_completion_queue_pluck(" - "cc=%p, tag=%p, " - "deadline=gpr_timespec { tv_sec: %lld, tv_nsec: %d, clock_type: %d }, " - "reserved=%p)", - 6, (cc, tag, (long long)deadline.tv_sec, (int)deadline.tv_nsec, - (int)deadline.clock_type, reserved)); + if (grpc_cq_pluck_trace) { + GRPC_API_TRACE( + "grpc_completion_queue_pluck(" + "cc=%p, tag=%p, " + "deadline=gpr_timespec { tv_sec: %lld, tv_nsec: %d, clock_type: %d }, " + "reserved=%p)", + 6, (cc, tag, (long long)deadline.tv_sec, (int)deadline.tv_nsec, + (int)deadline.clock_type, reserved)); + } GPR_ASSERT(!reserved); deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC); diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index 3d0dd13c53b..108445b28f1 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -39,6 +39,9 @@ #include #include "src/core/lib/iomgr/pollset.h" +extern int grpc_cq_pluck_trace; +extern int grpc_cq_event_timeout_trace; + typedef struct grpc_cq_completion { /** user supplied tag */ void *tag; diff --git a/src/core/lib/surface/init.c b/src/core/lib/surface/init.c index 1c8b7090156..499ecffc2ae 100644 --- a/src/core/lib/surface/init.c +++ b/src/core/lib/surface/init.c @@ -57,7 +57,6 @@ #include "src/core/lib/surface/init.h" #include "src/core/lib/surface/lame_client.h" #include "src/core/lib/surface/server.h" -#include "src/core/lib/surface/surface_trace.h" #include "src/core/lib/transport/connectivity_state.h" #include "src/core/lib/transport/transport_impl.h" @@ -165,6 +164,12 @@ void grpc_init(void) { &grpc_trace_channel_stack_builder); grpc_register_tracer("http1", &grpc_http1_trace); grpc_register_tracer("compression", &grpc_compression_trace); + grpc_register_tracer("queue_pluck", &grpc_cq_pluck_trace); + // Default pluck trace to 1 + grpc_cq_pluck_trace = 1; + grpc_register_tracer("queue_timeout", &grpc_cq_event_timeout_trace); + // Default timeout trace to 1 + grpc_cq_event_timeout_trace = 1; grpc_security_pre_init(); grpc_iomgr_init(); grpc_executor_init(); diff --git a/src/core/lib/surface/surface_trace.h b/src/core/lib/surface/surface_trace.h deleted file mode 100644 index a69a0fff577..00000000000 --- a/src/core/lib/surface/surface_trace.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef GRPC_CORE_LIB_SURFACE_SURFACE_TRACE_H -#define GRPC_CORE_LIB_SURFACE_SURFACE_TRACE_H - -#include -#include "src/core/lib/debug/trace.h" -#include "src/core/lib/surface/api_trace.h" - -#define GRPC_SURFACE_TRACE_RETURNED_EVENT(cq, event) \ - if (grpc_api_trace) { \ - char *_ev = grpc_event_string(event); \ - gpr_log(GPR_INFO, "RETURN_EVENT[%p]: %s", cq, _ev); \ - gpr_free(_ev); \ - } - -#endif /* GRPC_CORE_LIB_SURFACE_SURFACE_TRACE_H */ diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index aee866adf46..337ce16551a 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -857,7 +857,6 @@ src/core/lib/surface/event_string.h \ src/core/lib/surface/init.h \ src/core/lib/surface/lame_client.h \ src/core/lib/surface/server.h \ -src/core/lib/surface/surface_trace.h \ src/core/lib/transport/byte_stream.h \ src/core/lib/transport/connectivity_state.h \ src/core/lib/transport/metadata.h \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 4aad52c69d0..f9c497afcdd 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5762,7 +5762,6 @@ "src/core/lib/surface/init.h", "src/core/lib/surface/lame_client.h", "src/core/lib/surface/server.h", - "src/core/lib/surface/surface_trace.h", "src/core/lib/transport/byte_stream.h", "src/core/lib/transport/connectivity_state.h", "src/core/lib/transport/metadata.h", @@ -5921,7 +5920,6 @@ "src/core/lib/surface/metadata_array.c", "src/core/lib/surface/server.c", "src/core/lib/surface/server.h", - "src/core/lib/surface/surface_trace.h", "src/core/lib/surface/validate_metadata.c", "src/core/lib/surface/version.c", "src/core/lib/transport/byte_stream.c", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index ec0c984f2e7..c69623bf736 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -366,7 +366,6 @@ - diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 273f73b2a30..593024993fa 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -839,9 +839,6 @@ src\core\lib\surface - - src\core\lib\surface - src\core\lib\transport diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index bba099d803c..28dcd8269eb 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -355,7 +355,6 @@ - diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 78a8777f942..058ae653cad 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -749,9 +749,6 @@ src\core\lib\surface - - src\core\lib\surface - src\core\lib\transport From 2a6c68361adbf10af5e4971b064aaf61c20cdbfc Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 15 Jun 2016 18:11:08 -0700 Subject: [PATCH 1115/1894] Fixed printf/gpr_log format. The faulty line is behind a preprocessor define that isn't on by default. --- src/core/ext/client_config/lb_policy.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/core/ext/client_config/lb_policy.c b/src/core/ext/client_config/lb_policy.c index 20535398d69..dc1612428ec 100644 --- a/src/core/ext/client_config/lb_policy.c +++ b/src/core/ext/client_config/lb_policy.c @@ -60,8 +60,9 @@ static gpr_atm ref_mutate(grpc_lb_policy *c, gpr_atm delta, : gpr_atm_no_barrier_fetch_add(&c->ref_pair, delta); #ifdef GRPC_LB_POLICY_REFCOUNT_DEBUG gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, - "LB_POLICY: %p % 12s 0x%08x -> 0x%08x [%s]", c, purpose, old_val, - old_val + delta, reason); + "LB_POLICY: 0x%" PRIxPTR " %12s 0x%" PRIxPTR " -> 0x%" PRIxPTR + " [%s]", + (intptr_t)c, purpose, old_val, old_val + delta, reason); #endif return old_val; } From dbe2b9e976d50ce7971df32dc9a3122525dad3ce Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Wed, 15 Jun 2016 20:23:04 -0700 Subject: [PATCH 1116/1894] Enable treating warnings as errors in objc tests --- src/objective-c/tests/GRPCClientTests.m | 16 ++++++++-------- src/objective-c/tests/InteropTests.m | 10 ++++++---- .../tests/Tests.xcodeproj/project.pbxproj | 4 ++++ 3 files changed, 18 insertions(+), 12 deletions(-) diff --git a/src/objective-c/tests/GRPCClientTests.m b/src/objective-c/tests/GRPCClientTests.m index 9a8d4253241..2eca7bf5498 100644 --- a/src/objective-c/tests/GRPCClientTests.m +++ b/src/objective-c/tests/GRPCClientTests.m @@ -48,9 +48,9 @@ static NSString * const kPackage = @"grpc.testing"; static NSString * const kService = @"TestService"; static NSString * const kRemoteSSLHost = @"grpc-test.sandbox.googleapis.com"; -static ProtoMethod *kInexistentMethod; -static ProtoMethod *kEmptyCallMethod; -static ProtoMethod *kUnaryCallMethod; +static GRPCProtoMethod *kInexistentMethod; +static GRPCProtoMethod *kEmptyCallMethod; +static GRPCProtoMethod *kUnaryCallMethod; /** Observer class for testing that responseMetadata is KVO-compliant */ @interface PassthroughObserver : NSObject @@ -109,13 +109,13 @@ static ProtoMethod *kUnaryCallMethod; [GRPCCall useInsecureConnectionsForHost:kHostAddress]; // This method isn't implemented by the remote server. - kInexistentMethod = [[ProtoMethod alloc] initWithPackage:kPackage + kInexistentMethod = [[GRPCProtoMethod alloc] initWithPackage:kPackage service:kService method:@"Inexistent"]; - kEmptyCallMethod = [[ProtoMethod alloc] initWithPackage:kPackage + kEmptyCallMethod = [[GRPCProtoMethod alloc] initWithPackage:kPackage service:kService method:@"EmptyCall"]; - kUnaryCallMethod = [[ProtoMethod alloc] initWithPackage:kPackage + kUnaryCallMethod = [[GRPCProtoMethod alloc] initWithPackage:kPackage service:kService method:@"UnaryCall"]; } @@ -303,7 +303,7 @@ static ProtoMethod *kUnaryCallMethod; // Try to set parameters to nil for GRPCCall. This should cause an exception @try { - GRPCCall *call = [[GRPCCall alloc] initWithHost:nil + GRPCCall *call __unused = [[GRPCCall alloc] initWithHost:nil path:nil requestsWriter:nil]; XCTFail(@"Did not receive an exception when parameters are nil"); @@ -316,7 +316,7 @@ static ProtoMethod *kUnaryCallMethod; GRXWriter *requestsWriter = [GRXWriter emptyWriter]; [requestsWriter finishWithError:nil]; @try { - GRPCCall *call = [[GRPCCall alloc] initWithHost:kHostAddress + GRPCCall *call __unused = [[GRPCCall alloc] initWithHost:kHostAddress path:kUnaryCallMethod.HTTPPath requestsWriter:requestsWriter]; XCTFail(@"Did not receive an exception when GRXWriter has incorrect state."); diff --git a/src/objective-c/tests/InteropTests.m b/src/objective-c/tests/InteropTests.m index 781c500f73e..60a83259fa6 100644 --- a/src/objective-c/tests/InteropTests.m +++ b/src/objective-c/tests/InteropTests.m @@ -58,7 +58,7 @@ requestedResponseSize:(NSNumber *)responseSize { RMTStreamingOutputCallRequest *request = [self message]; RMTResponseParameters *parameters = [RMTResponseParameters message]; - parameters.size = responseSize.integerValue; + parameters.size = (int)responseSize.integerValue; [request.responseParametersArray addObject:parameters]; request.payload.body = [NSMutableData dataWithLength:payloadSize.unsignedIntegerValue]; return request; @@ -80,7 +80,9 @@ #pragma mark Tests +#ifdef GRPC_COMPILE_WITH_CRONET static cronet_engine *cronetEngine = NULL; +#endif @implementation InteropTests { RMTTestService *_service; @@ -186,7 +188,7 @@ static cronet_engine *cronetEngine = NULL; RMTStreamingOutputCallRequest *request = [RMTStreamingOutputCallRequest message]; for (NSNumber *size in expectedSizes) { RMTResponseParameters *parameters = [RMTResponseParameters message]; - parameters.size = [size integerValue]; + parameters.size = (int)[size integerValue]; [request.responseParametersArray addObject:parameters]; } @@ -282,7 +284,7 @@ static cronet_engine *cronetEngine = NULL; // A buffered pipe to which we never write any value acts as a writer that just hangs. GRXBufferedPipe *requestsBuffer = [[GRXBufferedPipe alloc] init]; - ProtoRPC *call = [_service RPCToStreamingInputCallWithRequestsWriter:requestsBuffer + GRPCProtoCall *call = [_service RPCToStreamingInputCallWithRequestsWriter:requestsBuffer handler:^(RMTStreamingInputCallResponse *response, NSError *error) { XCTAssertEqual(error.code, GRPC_STATUS_CANCELLED); @@ -313,7 +315,7 @@ static cronet_engine *cronetEngine = NULL; [requestsBuffer writeValue:request]; - __block ProtoRPC *call = + __block GRPCProtoCall *call = [_service RPCToFullDuplexCallWithRequestsWriter:requestsBuffer eventHandler:^(BOOL done, RMTStreamingOutputCallResponse *response, diff --git a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj index b0429617c01..59a6af2e11e 100644 --- a/src/objective-c/tests/Tests.xcodeproj/project.pbxproj +++ b/src/objective-c/tests/Tests.xcodeproj/project.pbxproj @@ -823,6 +823,7 @@ "$(inherited)", ); GCC_SYMBOLS_PRIVATE_EXTERN = NO; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; @@ -859,6 +860,7 @@ ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_C_LANGUAGE_STANDARD = gnu99; GCC_NO_COMMON_BLOCKS = YES; + GCC_TREAT_WARNINGS_AS_ERRORS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; @@ -875,6 +877,7 @@ 635697DC1B14FC11007A7283 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { + GCC_TREAT_WARNINGS_AS_ERRORS = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; }; @@ -883,6 +886,7 @@ 635697DD1B14FC11007A7283 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { + GCC_TREAT_WARNINGS_AS_ERRORS = YES; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; }; From e44d53757a57c86c1a3e2019688093c66221f44f Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 15 Jun 2016 22:15:00 -0700 Subject: [PATCH 1117/1894] De-lambda-ify --- test/cpp/end2end/hybrid_end2end_test.cc | 169 ++++++++++++------------ 1 file changed, 84 insertions(+), 85 deletions(-) diff --git a/test/cpp/end2end/hybrid_end2end_test.cc b/test/cpp/end2end/hybrid_end2end_test.cc index 2c05db345b4..cdc770d93a6 100644 --- a/test/cpp/end2end/hybrid_end2end_test.cc +++ b/test/cpp/end2end/hybrid_end2end_test.cc @@ -347,47 +347,48 @@ class HybridEnd2endTest : public ::testing::Test { } grpc::testing::UnimplementedService::Service unimplemented_service_; - std::vector > cqs_; + std::vector> cqs_; std::unique_ptr stub_; std::unique_ptr server_; std::ostringstream server_address_; }; TEST_F(HybridEnd2endTest, AsyncEcho) { - EchoTestService::WithAsyncMethod_Echo service; + typedef EchoTestService::WithAsyncMethod_Echo SType; + SType service; SetUpServer(&service, nullptr, nullptr); ResetStub(); - std::thread echo_handler_thread( - [this, &service] { HandleEcho(&service, cqs_[0].get(), false); }); + std::thread echo_handler_thread(HandleEcho, &service, + cqs_[0].get(), false); TestAllMethods(); echo_handler_thread.join(); } TEST_F(HybridEnd2endTest, AsyncEchoRequestStream) { - EchoTestService::WithAsyncMethod_RequestStream< - EchoTestService::WithAsyncMethod_Echo > - service; + typedef EchoTestService::WithAsyncMethod_RequestStream< + EchoTestService::WithAsyncMethod_Echo> + SType; + SType service; SetUpServer(&service, nullptr, nullptr); ResetStub(); - std::thread echo_handler_thread( - [this, &service] { HandleEcho(&service, cqs_[0].get(), false); }); - std::thread request_stream_handler_thread( - [this, &service] { HandleClientStreaming(&service, cqs_[1].get()); }); + std::thread echo_handler_thread(HandleEcho, &service, cqs_[0].get(), false); + std::thread request_stream_handler_thread(HandleClientStreaming, &service, cqs_[1].get()); TestAllMethods(); echo_handler_thread.join(); request_stream_handler_thread.join(); } TEST_F(HybridEnd2endTest, AsyncRequestStreamResponseStream) { - EchoTestService::WithAsyncMethod_RequestStream< - EchoTestService::WithAsyncMethod_ResponseStream > - service; + typedef EchoTestService::WithAsyncMethod_RequestStream< + EchoTestService::WithAsyncMethod_ResponseStream> + SType; + SType service; SetUpServer(&service, nullptr, nullptr); ResetStub(); - std::thread response_stream_handler_thread( - [this, &service] { HandleServerStreaming(&service, cqs_[0].get()); }); - std::thread request_stream_handler_thread( - [this, &service] { HandleClientStreaming(&service, cqs_[1].get()); }); + std::thread response_stream_handler_thread(HandleServerStreaming, + &service, cqs_[0].get()); + std::thread request_stream_handler_thread(HandleClientStreaming, + &service, cqs_[1].get()); TestAllMethods(); response_stream_handler_thread.join(); request_stream_handler_thread.join(); @@ -395,16 +396,17 @@ TEST_F(HybridEnd2endTest, AsyncRequestStreamResponseStream) { // Add a second service with one sync method. TEST_F(HybridEnd2endTest, AsyncRequestStreamResponseStream_SyncDupService) { - EchoTestService::WithAsyncMethod_RequestStream< - EchoTestService::WithAsyncMethod_ResponseStream > - service; + typedef EchoTestService::WithAsyncMethod_RequestStream< + EchoTestService::WithAsyncMethod_ResponseStream> + SType; + SType service; TestServiceImplDupPkg dup_service; SetUpServer(&service, &dup_service, nullptr); ResetStub(); - std::thread response_stream_handler_thread( - [this, &service] { HandleServerStreaming(&service, cqs_[0].get()); }); - std::thread request_stream_handler_thread( - [this, &service] { HandleClientStreaming(&service, cqs_[1].get()); }); + std::thread response_stream_handler_thread(HandleServerStreaming, + &service, cqs_[0].get()); + std::thread request_stream_handler_thread(HandleClientStreaming, + &service, cqs_[1].get()); TestAllMethods(); SendEchoToDupService(); response_stream_handler_thread.join(); @@ -413,18 +415,18 @@ TEST_F(HybridEnd2endTest, AsyncRequestStreamResponseStream_SyncDupService) { // Add a second service with one async method. TEST_F(HybridEnd2endTest, AsyncRequestStreamResponseStream_AsyncDupService) { - EchoTestService::WithAsyncMethod_RequestStream< - EchoTestService::WithAsyncMethod_ResponseStream > - service; + typedef EchoTestService::WithAsyncMethod_RequestStream< + EchoTestService::WithAsyncMethod_ResponseStream> + SType; + SType service; duplicate::EchoTestService::AsyncService dup_service; SetUpServer(&service, &dup_service, nullptr); ResetStub(); - std::thread response_stream_handler_thread( - [this, &service] { HandleServerStreaming(&service, cqs_[0].get()); }); - std::thread request_stream_handler_thread( - [this, &service] { HandleClientStreaming(&service, cqs_[1].get()); }); - std::thread echo_handler_thread( - [this, &dup_service] { HandleEcho(&dup_service, cqs_[2].get(), true); }); + std::thread response_stream_handler_thread(HandleServerStreaming, + &service, cqs_[0].get()); + std::thread request_stream_handler_thread(HandleClientStreaming, + &service, cqs_[1].get()); + std::thread echo_handler_thread(HandleEcho, &dup_service, cqs_[2].get(), true); TestAllMethods(); SendEchoToDupService(); response_stream_handler_thread.join(); @@ -437,25 +439,24 @@ TEST_F(HybridEnd2endTest, GenericEcho) { AsyncGenericService generic_service; SetUpServer(&service, nullptr, &generic_service); ResetStub(); - std::thread generic_handler_thread([this, &generic_service] { - HandleGenericCall(&generic_service, cqs_[0].get()); - }); + std::thread generic_handler_thread(HandleGenericCall, &generic_service, + cqs_[0].get()); TestAllMethods(); generic_handler_thread.join(); } TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream) { - EchoTestService::WithAsyncMethod_RequestStream< - EchoTestService::WithGenericMethod_Echo > - service; + typedef EchoTestService::WithAsyncMethod_RequestStream< + EchoTestService::WithGenericMethod_Echo> + SType; + SType service; AsyncGenericService generic_service; SetUpServer(&service, nullptr, &generic_service); ResetStub(); - std::thread generic_handler_thread([this, &generic_service] { - HandleGenericCall(&generic_service, cqs_[0].get()); - }); - std::thread request_stream_handler_thread( - [this, &service] { HandleClientStreaming(&service, cqs_[1].get()); }); + std::thread generic_handler_thread(HandleGenericCall, &generic_service, + cqs_[0].get()); + std::thread request_stream_handler_thread(HandleClientStreaming, + &service, cqs_[1].get()); TestAllMethods(); generic_handler_thread.join(); request_stream_handler_thread.join(); @@ -463,18 +464,18 @@ TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream) { // Add a second service with one sync method. TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream_SyncDupService) { - EchoTestService::WithAsyncMethod_RequestStream< - EchoTestService::WithGenericMethod_Echo > - service; + typedef EchoTestService::WithAsyncMethod_RequestStream< + EchoTestService::WithGenericMethod_Echo> + SType; + SType service; AsyncGenericService generic_service; TestServiceImplDupPkg dup_service; SetUpServer(&service, &dup_service, &generic_service); ResetStub(); - std::thread generic_handler_thread([this, &generic_service] { - HandleGenericCall(&generic_service, cqs_[0].get()); - }); - std::thread request_stream_handler_thread( - [this, &service] { HandleClientStreaming(&service, cqs_[1].get()); }); + std::thread generic_handler_thread(HandleGenericCall, &generic_service, + cqs_[0].get()); + std::thread request_stream_handler_thread(HandleClientStreaming, + &service, cqs_[1].get()); TestAllMethods(); SendEchoToDupService(); generic_handler_thread.join(); @@ -483,20 +484,19 @@ TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream_SyncDupService) { // Add a second service with one async method. TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream_AsyncDupService) { - EchoTestService::WithAsyncMethod_RequestStream< - EchoTestService::WithGenericMethod_Echo > - service; + typedef EchoTestService::WithAsyncMethod_RequestStream< + EchoTestService::WithGenericMethod_Echo> + SType; + SType service; AsyncGenericService generic_service; duplicate::EchoTestService::AsyncService dup_service; SetUpServer(&service, &dup_service, &generic_service); ResetStub(); - std::thread generic_handler_thread([this, &generic_service] { - HandleGenericCall(&generic_service, cqs_[0].get()); - }); - std::thread request_stream_handler_thread( - [this, &service] { HandleClientStreaming(&service, cqs_[1].get()); }); - std::thread echo_handler_thread( - [this, &dup_service] { HandleEcho(&dup_service, cqs_[2].get(), true); }); + std::thread generic_handler_thread(HandleGenericCall, &generic_service, + cqs_[0].get()); + std::thread request_stream_handler_thread(HandleClientStreaming, + &service, cqs_[1].get()); + std::thread echo_handler_thread(HandleEcho, &dup_service, cqs_[2].get(), true); TestAllMethods(); SendEchoToDupService(); generic_handler_thread.join(); @@ -505,20 +505,20 @@ TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream_AsyncDupService) { } TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStreamResponseStream) { - EchoTestService::WithAsyncMethod_RequestStream< + typedef EchoTestService::WithAsyncMethod_RequestStream< EchoTestService::WithGenericMethod_Echo< - EchoTestService::WithAsyncMethod_ResponseStream > > - service; + EchoTestService::WithAsyncMethod_ResponseStream>> + SType; + SType service; AsyncGenericService generic_service; SetUpServer(&service, nullptr, &generic_service); ResetStub(); - std::thread generic_handler_thread([this, &generic_service] { - HandleGenericCall(&generic_service, cqs_[0].get()); - }); - std::thread request_stream_handler_thread( - [this, &service] { HandleClientStreaming(&service, cqs_[1].get()); }); - std::thread response_stream_handler_thread( - [this, &service] { HandleServerStreaming(&service, cqs_[2].get()); }); + std::thread generic_handler_thread(HandleGenericCall, &generic_service, + cqs_[0].get()); + std::thread request_stream_handler_thread(HandleClientStreaming, + &service, cqs_[1].get()); + std::thread response_stream_handler_thread(HandleServerStreaming, + &service, cqs_[2].get()); TestAllMethods(); generic_handler_thread.join(); request_stream_handler_thread.join(); @@ -526,21 +526,20 @@ TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStreamResponseStream) { } TEST_F(HybridEnd2endTest, GenericEchoRequestStreamAsyncResponseStream) { - EchoTestService::WithGenericMethod_RequestStream< + typedef EchoTestService::WithGenericMethod_RequestStream< EchoTestService::WithGenericMethod_Echo< - EchoTestService::WithAsyncMethod_ResponseStream > > - service; + EchoTestService::WithAsyncMethod_ResponseStream>> + SType; + SType service; AsyncGenericService generic_service; SetUpServer(&service, nullptr, &generic_service); ResetStub(); - std::thread generic_handler_thread([this, &generic_service] { - HandleGenericCall(&generic_service, cqs_[0].get()); - }); - std::thread generic_handler_thread2([this, &generic_service] { - HandleGenericCall(&generic_service, cqs_[1].get()); - }); - std::thread response_stream_handler_thread( - [this, &service] { HandleServerStreaming(&service, cqs_[2].get()); }); + std::thread generic_handler_thread(HandleGenericCall, &generic_service, + cqs_[0].get()); + std::thread generic_handler_thread2(HandleGenericCall, &generic_service, + cqs_[1].get()); + std::thread response_stream_handler_thread(HandleServerStreaming, + &service, cqs_[2].get()); TestAllMethods(); generic_handler_thread.join(); generic_handler_thread2.join(); @@ -552,7 +551,7 @@ TEST_F(HybridEnd2endTest, GenericEchoRequestStreamAsyncResponseStream) { TEST_F(HybridEnd2endTest, GenericMethodWithoutGenericService) { EchoTestService::WithGenericMethod_RequestStream< EchoTestService::WithGenericMethod_Echo< - EchoTestService::WithAsyncMethod_ResponseStream > > + EchoTestService::WithAsyncMethod_ResponseStream>> service; SetUpServer(&service, nullptr, nullptr); EXPECT_EQ(nullptr, server_.get()); From 20bf126da605e3c765ddc494ce92de3a7ff32795 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Wed, 15 Jun 2016 22:21:48 -0700 Subject: [PATCH 1118/1894] clang-format --- include/grpc++/impl/codegen/core_codegen.h | 2 +- test/cpp/end2end/hybrid_end2end_test.cc | 80 ++++++++++++---------- 2 files changed, 44 insertions(+), 38 deletions(-) diff --git a/include/grpc++/impl/codegen/core_codegen.h b/include/grpc++/impl/codegen/core_codegen.h index 6be46315e54..b0c4c57e66a 100644 --- a/include/grpc++/impl/codegen/core_codegen.h +++ b/include/grpc++/impl/codegen/core_codegen.h @@ -68,7 +68,7 @@ class CoreCodegen : public CoreCodegenInterface { void gpr_slice_unref(gpr_slice slice) GRPC_OVERRIDE; gpr_slice gpr_slice_split_tail(gpr_slice* s, size_t split) GRPC_OVERRIDE; void gpr_slice_buffer_add(gpr_slice_buffer* sb, - gpr_slice slice) GRPC_OVERRIDE; + gpr_slice slice) GRPC_OVERRIDE; void gpr_slice_buffer_pop(gpr_slice_buffer* sb) GRPC_OVERRIDE; void grpc_metadata_array_init(grpc_metadata_array* array) GRPC_OVERRIDE; diff --git a/test/cpp/end2end/hybrid_end2end_test.cc b/test/cpp/end2end/hybrid_end2end_test.cc index cdc770d93a6..7e0c0e8a7ca 100644 --- a/test/cpp/end2end/hybrid_end2end_test.cc +++ b/test/cpp/end2end/hybrid_end2end_test.cc @@ -358,8 +358,8 @@ TEST_F(HybridEnd2endTest, AsyncEcho) { SType service; SetUpServer(&service, nullptr, nullptr); ResetStub(); - std::thread echo_handler_thread(HandleEcho, &service, - cqs_[0].get(), false); + std::thread echo_handler_thread(HandleEcho, &service, cqs_[0].get(), + false); TestAllMethods(); echo_handler_thread.join(); } @@ -367,12 +367,14 @@ TEST_F(HybridEnd2endTest, AsyncEcho) { TEST_F(HybridEnd2endTest, AsyncEchoRequestStream) { typedef EchoTestService::WithAsyncMethod_RequestStream< EchoTestService::WithAsyncMethod_Echo> - SType; + SType; SType service; SetUpServer(&service, nullptr, nullptr); ResetStub(); - std::thread echo_handler_thread(HandleEcho, &service, cqs_[0].get(), false); - std::thread request_stream_handler_thread(HandleClientStreaming, &service, cqs_[1].get()); + std::thread echo_handler_thread(HandleEcho, &service, cqs_[0].get(), + false); + std::thread request_stream_handler_thread(HandleClientStreaming, + &service, cqs_[1].get()); TestAllMethods(); echo_handler_thread.join(); request_stream_handler_thread.join(); @@ -380,15 +382,15 @@ TEST_F(HybridEnd2endTest, AsyncEchoRequestStream) { TEST_F(HybridEnd2endTest, AsyncRequestStreamResponseStream) { typedef EchoTestService::WithAsyncMethod_RequestStream< - EchoTestService::WithAsyncMethod_ResponseStream> - SType; + EchoTestService::WithAsyncMethod_ResponseStream> + SType; SType service; SetUpServer(&service, nullptr, nullptr); ResetStub(); std::thread response_stream_handler_thread(HandleServerStreaming, - &service, cqs_[0].get()); + &service, cqs_[0].get()); std::thread request_stream_handler_thread(HandleClientStreaming, - &service, cqs_[1].get()); + &service, cqs_[1].get()); TestAllMethods(); response_stream_handler_thread.join(); request_stream_handler_thread.join(); @@ -397,16 +399,16 @@ TEST_F(HybridEnd2endTest, AsyncRequestStreamResponseStream) { // Add a second service with one sync method. TEST_F(HybridEnd2endTest, AsyncRequestStreamResponseStream_SyncDupService) { typedef EchoTestService::WithAsyncMethod_RequestStream< - EchoTestService::WithAsyncMethod_ResponseStream> - SType; + EchoTestService::WithAsyncMethod_ResponseStream> + SType; SType service; TestServiceImplDupPkg dup_service; SetUpServer(&service, &dup_service, nullptr); ResetStub(); std::thread response_stream_handler_thread(HandleServerStreaming, - &service, cqs_[0].get()); + &service, cqs_[0].get()); std::thread request_stream_handler_thread(HandleClientStreaming, - &service, cqs_[1].get()); + &service, cqs_[1].get()); TestAllMethods(); SendEchoToDupService(); response_stream_handler_thread.join(); @@ -417,16 +419,18 @@ TEST_F(HybridEnd2endTest, AsyncRequestStreamResponseStream_SyncDupService) { TEST_F(HybridEnd2endTest, AsyncRequestStreamResponseStream_AsyncDupService) { typedef EchoTestService::WithAsyncMethod_RequestStream< EchoTestService::WithAsyncMethod_ResponseStream> - SType; + SType; SType service; duplicate::EchoTestService::AsyncService dup_service; SetUpServer(&service, &dup_service, nullptr); ResetStub(); std::thread response_stream_handler_thread(HandleServerStreaming, - &service, cqs_[0].get()); + &service, cqs_[0].get()); std::thread request_stream_handler_thread(HandleClientStreaming, - &service, cqs_[1].get()); - std::thread echo_handler_thread(HandleEcho, &dup_service, cqs_[2].get(), true); + &service, cqs_[1].get()); + std::thread echo_handler_thread( + HandleEcho, &dup_service, + cqs_[2].get(), true); TestAllMethods(); SendEchoToDupService(); response_stream_handler_thread.join(); @@ -440,7 +444,7 @@ TEST_F(HybridEnd2endTest, GenericEcho) { SetUpServer(&service, nullptr, &generic_service); ResetStub(); std::thread generic_handler_thread(HandleGenericCall, &generic_service, - cqs_[0].get()); + cqs_[0].get()); TestAllMethods(); generic_handler_thread.join(); } @@ -448,15 +452,15 @@ TEST_F(HybridEnd2endTest, GenericEcho) { TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream) { typedef EchoTestService::WithAsyncMethod_RequestStream< EchoTestService::WithGenericMethod_Echo> - SType; + SType; SType service; AsyncGenericService generic_service; SetUpServer(&service, nullptr, &generic_service); ResetStub(); std::thread generic_handler_thread(HandleGenericCall, &generic_service, - cqs_[0].get()); + cqs_[0].get()); std::thread request_stream_handler_thread(HandleClientStreaming, - &service, cqs_[1].get()); + &service, cqs_[1].get()); TestAllMethods(); generic_handler_thread.join(); request_stream_handler_thread.join(); @@ -465,17 +469,17 @@ TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream) { // Add a second service with one sync method. TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream_SyncDupService) { typedef EchoTestService::WithAsyncMethod_RequestStream< - EchoTestService::WithGenericMethod_Echo> - SType; + EchoTestService::WithGenericMethod_Echo> + SType; SType service; AsyncGenericService generic_service; TestServiceImplDupPkg dup_service; SetUpServer(&service, &dup_service, &generic_service); ResetStub(); std::thread generic_handler_thread(HandleGenericCall, &generic_service, - cqs_[0].get()); + cqs_[0].get()); std::thread request_stream_handler_thread(HandleClientStreaming, - &service, cqs_[1].get()); + &service, cqs_[1].get()); TestAllMethods(); SendEchoToDupService(); generic_handler_thread.join(); @@ -486,17 +490,19 @@ TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream_SyncDupService) { TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStream_AsyncDupService) { typedef EchoTestService::WithAsyncMethod_RequestStream< EchoTestService::WithGenericMethod_Echo> - SType; + SType; SType service; AsyncGenericService generic_service; duplicate::EchoTestService::AsyncService dup_service; SetUpServer(&service, &dup_service, &generic_service); ResetStub(); std::thread generic_handler_thread(HandleGenericCall, &generic_service, - cqs_[0].get()); + cqs_[0].get()); std::thread request_stream_handler_thread(HandleClientStreaming, - &service, cqs_[1].get()); - std::thread echo_handler_thread(HandleEcho, &dup_service, cqs_[2].get(), true); + &service, cqs_[1].get()); + std::thread echo_handler_thread( + HandleEcho, &dup_service, + cqs_[2].get(), true); TestAllMethods(); SendEchoToDupService(); generic_handler_thread.join(); @@ -508,17 +514,17 @@ TEST_F(HybridEnd2endTest, GenericEchoAsyncRequestStreamResponseStream) { typedef EchoTestService::WithAsyncMethod_RequestStream< EchoTestService::WithGenericMethod_Echo< EchoTestService::WithAsyncMethod_ResponseStream>> - SType; + SType; SType service; AsyncGenericService generic_service; SetUpServer(&service, nullptr, &generic_service); ResetStub(); std::thread generic_handler_thread(HandleGenericCall, &generic_service, - cqs_[0].get()); + cqs_[0].get()); std::thread request_stream_handler_thread(HandleClientStreaming, - &service, cqs_[1].get()); + &service, cqs_[1].get()); std::thread response_stream_handler_thread(HandleServerStreaming, - &service, cqs_[2].get()); + &service, cqs_[2].get()); TestAllMethods(); generic_handler_thread.join(); request_stream_handler_thread.join(); @@ -529,17 +535,17 @@ TEST_F(HybridEnd2endTest, GenericEchoRequestStreamAsyncResponseStream) { typedef EchoTestService::WithGenericMethod_RequestStream< EchoTestService::WithGenericMethod_Echo< EchoTestService::WithAsyncMethod_ResponseStream>> - SType; + SType; SType service; AsyncGenericService generic_service; SetUpServer(&service, nullptr, &generic_service); ResetStub(); std::thread generic_handler_thread(HandleGenericCall, &generic_service, - cqs_[0].get()); + cqs_[0].get()); std::thread generic_handler_thread2(HandleGenericCall, &generic_service, - cqs_[1].get()); + cqs_[1].get()); std::thread response_stream_handler_thread(HandleServerStreaming, - &service, cqs_[2].get()); + &service, cqs_[2].get()); TestAllMethods(); generic_handler_thread.join(); generic_handler_thread2.join(); From 3fb8f7360b033874978e517043c7eec59e295e42 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 15 Jun 2016 22:53:08 -0700 Subject: [PATCH 1119/1894] gRPC LB policy --- BUILD | 3 + Makefile | 38 + binding.gyp | 1 + build.yaml | 14 + config.m4 | 1 + gRPC.podspec | 1 + grpc.gemspec | 1 + package.xml | 1 + src/core/ext/client_config/lb_policy.c | 5 +- src/core/ext/client_config/lb_policy.h | 13 +- src/core/ext/lb_policy/grpclb/grpclb.c | 836 ++++++++++++++++++ src/core/ext/lb_policy/grpclb/grpclb.h | 44 + .../ext/lb_policy/grpclb/load_balancer_api.c | 77 ++ .../ext/lb_policy/grpclb/load_balancer_api.h | 16 + .../plugin_registry/grpc_plugin_registry.c | 4 + .../grpc_unsecure_plugin_registry.c | 4 + src/python/grpcio/grpc_core_dependencies.py | 1 + test/core/client_config/grpclb_test.c | 670 ++++++++++++++ test/core/end2end/cq_verifier.c | 9 +- test/core/end2end/cq_verifier.h | 3 + .../codegen/core/gen_grpclb_test_response.py | 97 ++ tools/doxygen/Doxyfile.core.internal | 1 + tools/run_tests/sources_and_headers.json | 19 + tools/run_tests/tests.json | 21 + vsprojects/buildtests_c.sln | 27 + vsprojects/vcxproj/grpc/grpc.vcxproj | 2 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 3 + .../grpc_unsecure/grpc_unsecure.vcxproj | 2 + .../grpc_unsecure.vcxproj.filters | 3 + .../test/grpclb_test/grpclb_test.vcxproj | 199 +++++ .../grpclb_test/grpclb_test.vcxproj.filters | 21 + 31 files changed, 2128 insertions(+), 9 deletions(-) create mode 100644 src/core/ext/lb_policy/grpclb/grpclb.c create mode 100644 src/core/ext/lb_policy/grpclb/grpclb.h create mode 100644 test/core/client_config/grpclb_test.c create mode 100755 tools/codegen/core/gen_grpclb_test_response.py create mode 100644 vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj create mode 100644 vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj.filters diff --git a/BUILD b/BUILD index f049e3c4056..42a35a310d6 100644 --- a/BUILD +++ b/BUILD @@ -467,6 +467,7 @@ cc_library( "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c", + "src/core/ext/lb_policy/grpclb/grpclb.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", @@ -1141,6 +1142,7 @@ cc_library( "src/core/ext/resolver/sockaddr/sockaddr_resolver.c", "src/core/ext/load_reporting/load_reporting.c", "src/core/ext/load_reporting/load_reporting_filter.c", + "src/core/ext/lb_policy/grpclb/grpclb.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", @@ -1943,6 +1945,7 @@ objc_library( "src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c", "src/core/ext/transport/chttp2/client/insecure/channel_create.c", "src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c", + "src/core/ext/lb_policy/grpclb/grpclb.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", "src/core/ext/lb_policy/pick_first/pick_first.c", diff --git a/Makefile b/Makefile index 6eccd06952c..e316d4b1533 100644 --- a/Makefile +++ b/Makefile @@ -946,6 +946,7 @@ grpc_jwt_verifier_test: $(BINDIR)/$(CONFIG)/grpc_jwt_verifier_test grpc_print_google_default_creds_token: $(BINDIR)/$(CONFIG)/grpc_print_google_default_creds_token grpc_security_connector_test: $(BINDIR)/$(CONFIG)/grpc_security_connector_test grpc_verify_jwt: $(BINDIR)/$(CONFIG)/grpc_verify_jwt +grpclb_test: $(BINDIR)/$(CONFIG)/grpclb_test hpack_parser_fuzzer_test: $(BINDIR)/$(CONFIG)/hpack_parser_fuzzer_test hpack_parser_test: $(BINDIR)/$(CONFIG)/hpack_parser_test hpack_table_test: $(BINDIR)/$(CONFIG)/hpack_table_test @@ -1277,6 +1278,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/grpc_json_token_test \ $(BINDIR)/$(CONFIG)/grpc_jwt_verifier_test \ $(BINDIR)/$(CONFIG)/grpc_security_connector_test \ + $(BINDIR)/$(CONFIG)/grpclb_test \ $(BINDIR)/$(CONFIG)/hpack_parser_test \ $(BINDIR)/$(CONFIG)/hpack_table_test \ $(BINDIR)/$(CONFIG)/http_parser_test \ @@ -1579,6 +1581,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/grpc_jwt_verifier_test || ( echo test grpc_jwt_verifier_test failed ; exit 1 ) $(E) "[RUN] Testing grpc_security_connector_test" $(Q) $(BINDIR)/$(CONFIG)/grpc_security_connector_test || ( echo test grpc_security_connector_test failed ; exit 1 ) + $(E) "[RUN] Testing grpclb_test" + $(Q) $(BINDIR)/$(CONFIG)/grpclb_test || ( echo test grpclb_test failed ; exit 1 ) $(E) "[RUN] Testing hpack_parser_test" $(Q) $(BINDIR)/$(CONFIG)/hpack_parser_test || ( echo test hpack_parser_test failed ; exit 1 ) $(E) "[RUN] Testing hpack_table_test" @@ -2662,6 +2666,7 @@ LIBGRPC_SRC = \ src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \ + src/core/ext/lb_policy/grpclb/grpclb.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ @@ -3240,6 +3245,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/ext/resolver/sockaddr/sockaddr_resolver.c \ src/core/ext/load_reporting/load_reporting.c \ src/core/ext/load_reporting/load_reporting_filter.c \ + src/core/ext/lb_policy/grpclb/grpclb.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ @@ -8470,6 +8476,38 @@ endif endif +GRPCLB_TEST_SRC = \ + test/core/client_config/grpclb_test.c \ + +GRPCLB_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPCLB_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/grpclb_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/grpclb_test: $(GRPCLB_TEST_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) $(GRPCLB_TEST_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)/grpclb_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/client_config/grpclb_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_grpclb_test: $(GRPCLB_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(GRPCLB_TEST_OBJS:.o=.dep) +endif +endif + + HPACK_PARSER_FUZZER_TEST_SRC = \ test/core/transport/chttp2/hpack_parser_fuzzer_test.c \ diff --git a/binding.gyp b/binding.gyp index fc61a9d01fc..f6cb59b4115 100644 --- a/binding.gyp +++ b/binding.gyp @@ -722,6 +722,7 @@ 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c', + 'src/core/ext/lb_policy/grpclb/grpclb.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c', 'third_party/nanopb/pb_common.c', diff --git a/build.yaml b/build.yaml index a83ebc595ad..d5d1b816a68 100644 --- a/build.yaml +++ b/build.yaml @@ -377,8 +377,10 @@ filegroups: - src/core/ext/lb_policy/grpclb/load_balancer_api.h - src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h src: + - src/core/ext/lb_policy/grpclb/grpclb.c - src/core/ext/lb_policy/grpclb/load_balancer_api.c - src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c + plugin: grpc_lb_policy_grpclb uses: - grpc_base - grpc_client_config @@ -796,6 +798,7 @@ libs: - grpc_lb_policy_grpclb - grpc_lb_policy_pick_first - grpc_lb_policy_round_robin + - grpc_lb_policy_grpclb - grpc_resolver_dns_native - grpc_resolver_sockaddr - grpc_load_reporting @@ -893,6 +896,7 @@ libs: - grpc_lb_policy_grpclb - grpc_lb_policy_pick_first - grpc_lb_policy_round_robin + - grpc_lb_policy_grpclb - census generate_plugin_registry: true secure: false @@ -1815,6 +1819,16 @@ targets: - grpc - gpr_test_util - gpr +- name: grpclb_test + build: test + language: c + src: + - test/core/client_config/grpclb_test.c + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr - name: hpack_parser_fuzzer_test build: fuzzer language: c diff --git a/config.m4 b/config.m4 index bf5aa244ff2..17dc3c86ec9 100644 --- a/config.m4 +++ b/config.m4 @@ -241,6 +241,7 @@ if test "$PHP_GRPC" != "no"; then src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \ + src/core/ext/lb_policy/grpclb/grpclb.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ diff --git a/gRPC.podspec b/gRPC.podspec index d3665d51744..ab04e494a31 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -504,6 +504,7 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c', + 'src/core/ext/lb_policy/grpclb/grpclb.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c', 'third_party/nanopb/pb_common.c', diff --git a/grpc.gemspec b/grpc.gemspec index 9f3ae048a70..d30d7ae30e9 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -483,6 +483,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c ) s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create.c ) s.files += %w( src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c ) + s.files += %w( src/core/ext/lb_policy/grpclb/grpclb.c ) s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.c ) s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c ) s.files += %w( third_party/nanopb/pb_common.c ) diff --git a/package.xml b/package.xml index b25e42c1c01..2c718608647 100644 --- a/package.xml +++ b/package.xml @@ -490,6 +490,7 @@ + diff --git a/src/core/ext/client_config/lb_policy.c b/src/core/ext/client_config/lb_policy.c index 20535398d69..dc1612428ec 100644 --- a/src/core/ext/client_config/lb_policy.c +++ b/src/core/ext/client_config/lb_policy.c @@ -60,8 +60,9 @@ static gpr_atm ref_mutate(grpc_lb_policy *c, gpr_atm delta, : gpr_atm_no_barrier_fetch_add(&c->ref_pair, delta); #ifdef GRPC_LB_POLICY_REFCOUNT_DEBUG gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, - "LB_POLICY: %p % 12s 0x%08x -> 0x%08x [%s]", c, purpose, old_val, - old_val + delta, reason); + "LB_POLICY: 0x%" PRIxPTR " %12s 0x%" PRIxPTR " -> 0x%" PRIxPTR + " [%s]", + (intptr_t)c, purpose, old_val, old_val + delta, reason); #endif return old_val; } diff --git a/src/core/ext/client_config/lb_policy.h b/src/core/ext/client_config/lb_policy.h index 56fa11198b7..b07824ae1ba 100644 --- a/src/core/ext/client_config/lb_policy.h +++ b/src/core/ext/client_config/lb_policy.h @@ -73,15 +73,17 @@ struct grpc_lb_policy_vtable { void (*ping_one)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, grpc_closure *closure); - /** try to enter a READY connectivity state */ + /** Try to enter a READY connectivity state */ void (*exit_idle)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy); - /** check the current connectivity of the lb_policy */ + /** Check the current connectivity */ grpc_connectivity_state (*check_connectivity)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy); /** call notify when the connectivity state of a channel changes from *state. - Updates *state with the new state of the policy */ + Updates *state with the new state of the policy. Calling with a NULL \a + state cancels the subscription. + */ void (*notify_on_state_change)(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, grpc_connectivity_state *state, @@ -124,7 +126,7 @@ void grpc_lb_policy_init(grpc_lb_policy *policy, /** Given initial metadata in \a initial_metadata, find an appropriate target for this rpc, and 'return' it by calling \a on_complete after setting \a target. - Picking can be asynchronous. Any IO should be done under \a pollset. */ + Picking can be asynchronous. Any IO should be done under \a pollent. */ int grpc_lb_policy_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, grpc_polling_entity *pollent, grpc_metadata_batch *initial_metadata, @@ -146,8 +148,11 @@ void grpc_lb_policy_cancel_picks(grpc_exec_ctx *exec_ctx, uint32_t initial_metadata_flags_mask, uint32_t initial_metadata_flags_eq); +/** Try to enter a READY connectivity state */ void grpc_lb_policy_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy); +/* Call notify when the connectivity state of a channel changes from \a *state. + * Updates \a *state with the new state of the policy */ void grpc_lb_policy_notify_on_state_change(grpc_exec_ctx *exec_ctx, grpc_lb_policy *policy, grpc_connectivity_state *state, diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c new file mode 100644 index 00000000000..cfa9669e0a2 --- /dev/null +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -0,0 +1,836 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/ext/lb_policy/grpclb/grpclb.h" +#include "src/core/ext/client_config/client_channel_factory.h" +#include "src/core/ext/client_config/lb_policy_registry.h" +#include "src/core/ext/client_config/parse_address.h" +#include "src/core/ext/lb_policy/grpclb/load_balancer_api.h" +#include "src/core/lib/iomgr/sockaddr_utils.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/surface/call.h" +#include "src/core/lib/surface/channel.h" + +#include + +#include +#include +#include +#include +#include + +int grpc_lb_glb_trace = 0; + +typedef struct wrapped_rr_closure_arg { + grpc_closure *wrapped_closure; + grpc_lb_policy *rr_policy; +} wrapped_rr_closure_arg; + +/* The \a on_complete closure passed as part of the pick requires keeping a + * reference to its associated round robin instance. We wrap this closure in + * order to unref the round robin instance upon its invocation */ +static void wrapped_rr_closure(grpc_exec_ctx *exec_ctx, void *arg, + bool success) { + wrapped_rr_closure_arg *wc = arg; + + if (wc->rr_policy != NULL) { + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, "Unreffing RR %p", wc->rr_policy); + } + GRPC_LB_POLICY_UNREF(exec_ctx, wc->rr_policy, "wrapped_rr_closure"); + } + + if (wc->wrapped_closure != NULL) { + grpc_exec_ctx_enqueue(exec_ctx, wc->wrapped_closure, success, NULL); + } + gpr_free(wc); +} + +typedef struct pending_pick { + struct pending_pick *next; + grpc_polling_entity *pollent; + grpc_metadata_batch *initial_metadata; + uint32_t initial_metadata_flags; + grpc_connected_subchannel **target; + grpc_closure *wrapped_on_complete; + wrapped_rr_closure_arg *wrapped_on_complete_arg; +} pending_pick; + +typedef struct pending_ping { + struct pending_ping *next; + grpc_closure *wrapped_notify; + wrapped_rr_closure_arg *wrapped_notify_arg; +} pending_ping; + +typedef struct glb_lb_policy glb_lb_policy; + +#define MAX_LBCD_OPS_LEN 6 +typedef struct lb_client_data { + gpr_mu mu; + grpc_closure md_sent; + grpc_closure md_rcvd; + grpc_closure req_sent; + grpc_closure res_rcvd; + grpc_closure close_sent; + grpc_closure srv_status_rcvd; + + grpc_call *c; + gpr_timespec deadline; + + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + + grpc_byte_buffer *request_payload; + grpc_byte_buffer *response_payload; + + grpc_status_code status; + char *status_details; + size_t status_details_capacity; + + glb_lb_policy *p; +} lb_client_data; + +/* Keeps track and reacts to changes in connectivity of the RR instance */ +typedef struct rr_connectivity_data { + grpc_closure on_change; + grpc_connectivity_state state; + glb_lb_policy *p; +} rr_connectivity_data; + +struct glb_lb_policy { + /** base policy: must be first */ + grpc_lb_policy base; + + /** mutex protecting remaining members */ + gpr_mu mu; + + grpc_client_channel_factory *cc_factory; + + /** for communicating with the LB server */ + grpc_channel *lb_server_channel; + + /** the RR policy to use of the backend servers returned by the LB server */ + grpc_lb_policy *rr_policy; + + bool started_picking; + + /** our connectivity state tracker */ + grpc_connectivity_state_tracker state_tracker; + + grpc_grpclb_serverlist *serverlist; + + /** list of picks that are waiting on connectivity */ + pending_pick *pending_picks; + + /** list of pings that are waiting on connectivity */ + pending_ping *pending_pings; + + /** data associated with the communication with the LB server */ + lb_client_data *lbcd; + + /** for tracking of the RR connectivity */ + rr_connectivity_data *rr_connectivity; +}; + +static void rr_handover(grpc_exec_ctx *exec_ctx, glb_lb_policy *p); +static void rr_connectivity_changed(grpc_exec_ctx *exec_ctx, void *arg, + bool iomgr_success) { + rr_connectivity_data *rrcd = arg; + if (!iomgr_success) { + gpr_free(rrcd); + return; + } + glb_lb_policy *p = rrcd->p; + const grpc_connectivity_state new_state = p->rr_connectivity->state; + if (new_state == GRPC_CHANNEL_SHUTDOWN && p->serverlist != NULL) { + /* a RR policy is shutting down but there's a serverlist available -> + * perform a handover */ + rr_handover(exec_ctx, p); + } else { + grpc_connectivity_state_set(exec_ctx, &p->state_tracker, new_state, + "rr_connectivity_changed"); + /* resubscribe */ + grpc_lb_policy_notify_on_state_change(exec_ctx, p->rr_policy, + &p->rr_connectivity->state, + &p->rr_connectivity->on_change); + } +} + +static void add_pending_pick(pending_pick **root, grpc_polling_entity *pollent, + grpc_metadata_batch *initial_metadata, + uint32_t initial_metadata_flags, + grpc_connected_subchannel **target, + grpc_closure *on_complete) { + pending_pick *pp = gpr_malloc(sizeof(*pp)); + memset(pp, 0, sizeof(pending_pick)); + pp->wrapped_on_complete_arg = gpr_malloc(sizeof(wrapped_rr_closure_arg)); + memset(pp->wrapped_on_complete_arg, 0, sizeof(wrapped_rr_closure_arg)); + pp->next = *root; + pp->pollent = pollent; + pp->target = target; + pp->initial_metadata = initial_metadata; + pp->initial_metadata_flags = initial_metadata_flags; + pp->wrapped_on_complete = + grpc_closure_create(wrapped_rr_closure, pp->wrapped_on_complete_arg); + pp->wrapped_on_complete_arg->wrapped_closure = on_complete; + *root = pp; +} + +static void add_pending_ping(pending_ping **root, grpc_closure *notify) { + pending_ping *pping = gpr_malloc(sizeof(*pping)); + memset(pping, 0, sizeof(pending_ping)); + pping->wrapped_notify_arg = gpr_malloc(sizeof(wrapped_rr_closure_arg)); + memset(pping->wrapped_notify_arg, 0, sizeof(wrapped_rr_closure_arg)); + pping->next = *root; + pping->wrapped_notify = + grpc_closure_create(wrapped_rr_closure, pping->wrapped_notify_arg); + pping->wrapped_notify_arg->wrapped_closure = notify; + *root = pping; +} + +static void lb_client_data_destroy(lb_client_data *lbcd); + +static void md_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, bool success) { + lb_client_data *lbcd = arg; + GPR_ASSERT(lbcd->c); + grpc_call_error error; + grpc_op ops[1]; + memset(ops, 0, sizeof(ops)); + grpc_op *op = ops; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata = &lbcd->initial_metadata_recv; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch_and_execute(exec_ctx, lbcd->c, ops, + (size_t)(op - ops), &lbcd->md_rcvd); + GPR_ASSERT(GRPC_CALL_OK == error); +} + +static void md_recv_cb(grpc_exec_ctx *exec_ctx, void *arg, bool success) { + lb_client_data *lbcd = arg; + GPR_ASSERT(lbcd->c); + grpc_call_error error; + grpc_op ops[1]; + memset(ops, 0, sizeof(ops)); + grpc_op *op = ops; + + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message = lbcd->request_payload; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch_and_execute( + exec_ctx, lbcd->c, ops, (size_t)(op - ops), &lbcd->req_sent); + GPR_ASSERT(GRPC_CALL_OK == error); +} + +static void req_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, bool success) { + lb_client_data *lbcd = arg; + grpc_call_error error; + + grpc_op ops[1]; + memset(ops, 0, sizeof(ops)); + grpc_op *op = ops; + + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &lbcd->response_payload; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch_and_execute( + exec_ctx, lbcd->c, ops, (size_t)(op - ops), &lbcd->res_rcvd); + GPR_ASSERT(GRPC_CALL_OK == error); +} + +static void res_rcvd_cb(grpc_exec_ctx *exec_ctx, void *arg, bool success) { + /* look inside lbcd->response_payload, ideally to send it back as the + * serverlist. */ + lb_client_data *lbcd = arg; + grpc_op ops[2]; + memset(ops, 0, sizeof(ops)); + grpc_op *op = ops; + if (lbcd->response_payload) { + grpc_byte_buffer_reader bbr; + grpc_byte_buffer_reader_init(&bbr, lbcd->response_payload); + gpr_slice response_slice = grpc_byte_buffer_reader_readall(&bbr); + grpc_byte_buffer_destroy(lbcd->response_payload); + grpc_grpclb_serverlist *serverlist = + grpc_grpclb_response_parse_serverlist(response_slice); + if (serverlist) { + gpr_slice_unref(response_slice); + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, "Serverlist with %zu servers received", + serverlist->num_servers); + } + /* update serverlist */ + if (serverlist->num_servers > 0) { + if (grpc_grpclb_serverlist_equals(lbcd->p->serverlist, serverlist)) { + gpr_log(GPR_INFO, + "Incoming server list identical to current, ignoring."); + } else { + if (lbcd->p->serverlist != NULL) { + grpc_grpclb_destroy_serverlist(lbcd->p->serverlist); + } + lbcd->p->serverlist = serverlist; + } + } + if (lbcd->p->rr_policy == NULL) { + /* initial "handover", in this case from a null RR policy, meaning it'll + * just create the first one */ + rr_handover(exec_ctx, lbcd->p); + } else { + /* unref the RR policy, eventually leading to its substitution with a + * new one constructed from the received serverlist (see + * rr_connectivity_changed) */ + GRPC_LB_POLICY_UNREF(exec_ctx, lbcd->p->rr_policy, + "serverlist_received"); + } + + /* listen for a potential serverlist update */ + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &lbcd->response_payload; + op->flags = 0; + op->reserved = NULL; + op++; + const grpc_call_error error = grpc_call_start_batch_and_execute( + exec_ctx, lbcd->c, ops, (size_t)(op - ops), + &lbcd->res_rcvd); /* loop */ + GPR_ASSERT(GRPC_CALL_OK == error); + return; + } else { + gpr_log(GPR_ERROR, "Invalid LB response received: '%s'", + gpr_dump_slice(response_slice, GPR_DUMP_ASCII)); + gpr_slice_unref(response_slice); + + /* Disconnect from server returning invalid response. */ + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op->flags = 0; + op->reserved = NULL; + op++; + grpc_call_error error = grpc_call_start_batch_and_execute( + exec_ctx, lbcd->c, ops, (size_t)(op - ops), &lbcd->close_sent); + GPR_ASSERT(GRPC_CALL_OK == error); + } + } + /* empty payload: call cancelled by server. Cleanups happening in + * srv_status_rcvd_cb */ +} +static void close_sent_cb(grpc_exec_ctx *exec_ctx, void *arg, bool success) { + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, + "Close from LB client sent. Waiting from server status now"); + } +} +static void srv_status_rcvd_cb(grpc_exec_ctx *exec_ctx, void *arg, + bool success) { + lb_client_data *lbcd = arg; + glb_lb_policy *p = lbcd->p; + if (grpc_lb_glb_trace) { + gpr_log( + GPR_INFO, + "status from lb server received. Status = %d, Details = '%s', Capaticy " + "= %zu", + lbcd->status, lbcd->status_details, lbcd->status_details_capacity); + } + + grpc_call_destroy(lbcd->c); + grpc_channel_destroy(lbcd->p->lb_server_channel); + lbcd->p->lb_server_channel = NULL; + lb_client_data_destroy(lbcd); + p->lbcd = NULL; +} + +static lb_client_data *lb_client_data_create(glb_lb_policy *p) { + lb_client_data *lbcd = gpr_malloc(sizeof(lb_client_data)); + memset(lbcd, 0, sizeof(lb_client_data)); + + gpr_mu_init(&lbcd->mu); + grpc_closure_init(&lbcd->md_sent, md_sent_cb, lbcd); + + grpc_closure_init(&lbcd->md_rcvd, md_recv_cb, lbcd); + grpc_closure_init(&lbcd->req_sent, req_sent_cb, lbcd); + grpc_closure_init(&lbcd->res_rcvd, res_rcvd_cb, lbcd); + grpc_closure_init(&lbcd->close_sent, close_sent_cb, lbcd); + grpc_closure_init(&lbcd->srv_status_rcvd, srv_status_rcvd_cb, lbcd); + + /* TODO(dgq): get the deadline from the client/user instead of fabricating + * one + * here. Make it a policy arg? */ + lbcd->deadline = gpr_time_add(gpr_now(GPR_CLOCK_MONOTONIC), + gpr_time_from_seconds(3, GPR_TIMESPAN)); + + lbcd->c = grpc_channel_create_pollset_set_call( + p->lb_server_channel, NULL, GRPC_PROPAGATE_DEFAULTS, + p->base.interested_parties, "/BalanceLoad", + NULL, /* FIXME(dgq): which "host" value to use? */ + lbcd->deadline, NULL); + + grpc_metadata_array_init(&lbcd->initial_metadata_recv); + grpc_metadata_array_init(&lbcd->trailing_metadata_recv); + + grpc_grpclb_request *request = grpc_grpclb_request_create( + "load.balanced.service.name"); /* FIXME(dgq): get the name of the load + balanced service from above. */ + gpr_slice request_payload_slice = grpc_grpclb_request_encode(request); + lbcd->request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + gpr_slice_unref(request_payload_slice); + grpc_grpclb_request_destroy(request); + + lbcd->status_details = NULL; + lbcd->status_details_capacity = 0; + lbcd->p = p; + return lbcd; +} + +static void lb_client_data_destroy(lb_client_data *lbcd) { + grpc_metadata_array_destroy(&lbcd->initial_metadata_recv); + grpc_metadata_array_destroy(&lbcd->trailing_metadata_recv); + + grpc_byte_buffer_destroy(lbcd->request_payload); + + gpr_free(lbcd->status_details); + gpr_mu_destroy(&lbcd->mu); + gpr_free(lbcd); +} + +static void glb_destroy(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { + glb_lb_policy *p = (glb_lb_policy *)pol; + GPR_ASSERT(p->pending_picks == NULL); + GPR_ASSERT(p->pending_pings == NULL); + grpc_connectivity_state_destroy(exec_ctx, &p->state_tracker); + if (p->serverlist != NULL) { + grpc_grpclb_destroy_serverlist(p->serverlist); + } + gpr_mu_destroy(&p->mu); + gpr_free(p); +} + +static void glb_shutdown(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { + glb_lb_policy *p = (glb_lb_policy *)pol; + gpr_mu_lock(&p->mu); + + pending_pick *pp = p->pending_picks; + p->pending_picks = NULL; + pending_ping *pping = p->pending_pings; + p->pending_pings = NULL; + gpr_mu_unlock(&p->mu); + + while (pp != NULL) { + pending_pick *next = pp->next; + *pp->target = NULL; + grpc_exec_ctx_enqueue(exec_ctx, pp->wrapped_on_complete, true, NULL); + gpr_free(pp); + pp = next; + } + + while (pping != NULL) { + pending_ping *next = pping->next; + grpc_exec_ctx_enqueue(exec_ctx, pping->wrapped_notify, true, NULL); + pping = next; + } + + if (p->rr_policy) { + /* unsubscribe */ + grpc_lb_policy_notify_on_state_change(exec_ctx, p->rr_policy, NULL, + &p->rr_connectivity->on_change); + GRPC_LB_POLICY_UNREF(exec_ctx, p->rr_policy, "glb_shutdown"); + } + + grpc_connectivity_state_set(exec_ctx, &p->state_tracker, + GRPC_CHANNEL_SHUTDOWN, "glb_shutdown"); +} + +static void glb_cancel_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, + grpc_connected_subchannel **target) { + glb_lb_policy *p = (glb_lb_policy *)pol; + gpr_mu_lock(&p->mu); + pending_pick *pp = p->pending_picks; + p->pending_picks = NULL; + while (pp != NULL) { + pending_pick *next = pp->next; + if (pp->target == target) { + grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, + p->base.interested_parties); + *target = NULL; + grpc_exec_ctx_enqueue(exec_ctx, pp->wrapped_on_complete, false, NULL); + gpr_free(pp); + } else { + pp->next = p->pending_picks; + p->pending_picks = pp; + } + pp = next; + } + gpr_mu_unlock(&p->mu); +} + +static void glb_cancel_picks(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, + uint32_t initial_metadata_flags_mask, + uint32_t initial_metadata_flags_eq) { + glb_lb_policy *p = (glb_lb_policy *)pol; + gpr_mu_lock(&p->mu); + if (p->lbcd != NULL) { + /* cancel the call to the load balancer service, if any */ + grpc_call_cancel(p->lbcd->c, NULL); + } + pending_pick *pp = p->pending_picks; + p->pending_picks = NULL; + while (pp != NULL) { + pending_pick *next = pp->next; + if ((pp->initial_metadata_flags & initial_metadata_flags_mask) == + initial_metadata_flags_eq) { + grpc_polling_entity_del_from_pollset_set(exec_ctx, pp->pollent, + p->base.interested_parties); + grpc_exec_ctx_enqueue(exec_ctx, pp->wrapped_on_complete, false, NULL); + gpr_free(pp); + } else { + pp->next = p->pending_picks; + p->pending_picks = pp; + } + pp = next; + } + gpr_mu_unlock(&p->mu); +} + +static void query_for_backends(grpc_exec_ctx *exec_ctx, glb_lb_policy *p) { + GPR_ASSERT(p->lb_server_channel != NULL); + + p->lbcd = lb_client_data_create(p); + grpc_call_error error; + grpc_op ops[1]; + memset(ops, 0, sizeof(ops)); + grpc_op *op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch_and_execute( + exec_ctx, p->lbcd->c, ops, (size_t)(op - ops), &p->lbcd->md_sent); + GPR_ASSERT(GRPC_CALL_OK == error); + + op = ops; + op->op = GRPC_OP_RECV_STATUS_ON_CLIENT; + op->data.recv_status_on_client.trailing_metadata = + &p->lbcd->trailing_metadata_recv; + op->data.recv_status_on_client.status = &p->lbcd->status; + op->data.recv_status_on_client.status_details = &p->lbcd->status_details; + op->data.recv_status_on_client.status_details_capacity = + &p->lbcd->status_details_capacity; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch_and_execute( + exec_ctx, p->lbcd->c, ops, (size_t)(op - ops), &p->lbcd->srv_status_rcvd); + GPR_ASSERT(GRPC_CALL_OK == error); +} + +static grpc_lb_policy *create_rr(grpc_exec_ctx *exec_ctx, + const grpc_grpclb_serverlist *serverlist, + glb_lb_policy *p) { + /* TODO(dgq): support mixed ip version */ + GPR_ASSERT(serverlist != NULL && serverlist->num_servers > 0); + char **host_ports = gpr_malloc(sizeof(char *) * serverlist->num_servers); + for (size_t i = 0; i < serverlist->num_servers; ++i) { + gpr_join_host_port(&host_ports[i], serverlist->servers[i]->ip_address, + serverlist->servers[i]->port); + } + + size_t uri_path_len; + char *concat_ipports = gpr_strjoin_sep( + (const char **)host_ports, serverlist->num_servers, ",", &uri_path_len); + + grpc_lb_policy_args args; + args.client_channel_factory = p->cc_factory; + args.addresses = gpr_malloc(sizeof(grpc_resolved_addresses)); + args.addresses->naddrs = serverlist->num_servers; + args.addresses->addrs = + gpr_malloc(sizeof(grpc_resolved_address) * args.addresses->naddrs); + size_t out_addrs_idx = 0; + for (size_t i = 0; i < serverlist->num_servers; ++i) { + grpc_uri uri; + struct sockaddr_storage sa; + size_t sa_len; + uri.path = host_ports[i]; + if (parse_ipv4(&uri, &sa, &sa_len)) { /* TODO(dgq): add support for ipv6 */ + memcpy(args.addresses->addrs[out_addrs_idx].addr, &sa, sa_len); + args.addresses->addrs[out_addrs_idx].len = sa_len; + ++out_addrs_idx; + } else { + gpr_log(GPR_ERROR, "Invalid LB service address '%s', ignoring.", + host_ports[i]); + } + } + + grpc_lb_policy *rr = grpc_lb_policy_create(exec_ctx, "round_robin", &args); + + gpr_free(concat_ipports); + for (size_t i = 0; i < serverlist->num_servers; i++) { + gpr_free(host_ports[i]); + } + gpr_free(host_ports); + + gpr_free(args.addresses->addrs); + gpr_free(args.addresses); + + return rr; +} + +static void start_picking(grpc_exec_ctx *exec_ctx, glb_lb_policy *p) { + p->started_picking = true; + query_for_backends(exec_ctx, p); +} + +static void rr_handover(grpc_exec_ctx *exec_ctx, glb_lb_policy *p) { + p->rr_policy = create_rr(exec_ctx, p->serverlist, p); + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, "Created RR policy (0x%" PRIxPTR ")", + (intptr_t)p->rr_policy); + } + GPR_ASSERT(p->rr_policy != NULL); + p->rr_connectivity->state = + grpc_lb_policy_check_connectivity(exec_ctx, p->rr_policy); + grpc_lb_policy_notify_on_state_change(exec_ctx, p->rr_policy, + &p->rr_connectivity->state, + &p->rr_connectivity->on_change); + grpc_connectivity_state_set(exec_ctx, &p->state_tracker, + p->rr_connectivity->state, "rr_handover"); + grpc_lb_policy_exit_idle(exec_ctx, p->rr_policy); + + /* flush pending ops */ + pending_pick *pp; + while ((pp = p->pending_picks)) { + p->pending_picks = pp->next; + GRPC_LB_POLICY_REF(p->rr_policy, "rr_handover_pending_pick"); + pp->wrapped_on_complete_arg->rr_policy = p->rr_policy; + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, "Pending pick about to PICK from 0x%"PRIxPTR"", (intptr_t)p->rr_policy); + } + grpc_lb_policy_pick(exec_ctx, p->rr_policy, pp->pollent, + pp->initial_metadata, pp->initial_metadata_flags, + pp->target, pp->wrapped_on_complete); + gpr_free(pp); + } + + pending_ping *pping; + while ((pping = p->pending_pings)) { + p->pending_pings = pping->next; + GRPC_LB_POLICY_REF(p->rr_policy, "rr_handover_pending_ping"); + pping->wrapped_notify_arg->rr_policy = p->rr_policy; + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, "Pending ping about to PING from 0x%"PRIxPTR"", (intptr_t)p->rr_policy); + } + grpc_lb_policy_ping_one(exec_ctx, p->rr_policy, pping->wrapped_notify); + gpr_free(pping); + } +} + +static void glb_exit_idle(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol) { + glb_lb_policy *p = (glb_lb_policy *)pol; + gpr_mu_lock(&p->mu); + if (!p->started_picking) { + start_picking(exec_ctx, p); + } + gpr_mu_unlock(&p->mu); +} + +static int glb_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, + grpc_polling_entity *pollent, + grpc_metadata_batch *initial_metadata, + uint32_t initial_metadata_flags, + grpc_connected_subchannel **target, + grpc_closure *on_complete) { + glb_lb_policy *p = (glb_lb_policy *)pol; + gpr_mu_lock(&p->mu); + int r; + + if (p->rr_policy != NULL) { + if (grpc_lb_glb_trace) { + gpr_log(GPR_INFO, "about to PICK from 0x%"PRIxPTR"", (intptr_t)p->rr_policy); + } + GRPC_LB_POLICY_REF(p->rr_policy, "rr_pick"); + wrapped_rr_closure_arg *warg = gpr_malloc(sizeof(wrapped_rr_closure_arg)); + warg->rr_policy = p->rr_policy; + warg->wrapped_closure = on_complete; + grpc_closure *wrapped_on_complete = + grpc_closure_create(wrapped_rr_closure, warg); + r = grpc_lb_policy_pick(exec_ctx, p->rr_policy, pollent, initial_metadata, + initial_metadata_flags, target, + wrapped_on_complete); + if (r != 0) { + /* the call to grpc_lb_policy_pick has been sychronous. Invoke a neutered + * wrapped closure */ + warg->wrapped_closure = NULL; + grpc_exec_ctx_enqueue(exec_ctx, wrapped_on_complete, false, NULL); + } + } else { + grpc_polling_entity_add_to_pollset_set(exec_ctx, pollent, + p->base.interested_parties); + add_pending_pick(&p->pending_picks, pollent, initial_metadata, + initial_metadata_flags, target, on_complete); + + if (!p->started_picking) { + start_picking(exec_ctx, p); + } + r = 0; + } + gpr_mu_unlock(&p->mu); + return r; +} + +static grpc_connectivity_state glb_check_connectivity(grpc_exec_ctx *exec_ctx, + grpc_lb_policy *pol) { + glb_lb_policy *p = (glb_lb_policy *)pol; + grpc_connectivity_state st; + gpr_mu_lock(&p->mu); + st = grpc_connectivity_state_check(&p->state_tracker); + gpr_mu_unlock(&p->mu); + return st; +} + +static void glb_ping_one(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, + grpc_closure *closure) { + glb_lb_policy *p = (glb_lb_policy *)pol; + gpr_mu_lock(&p->mu); + if (p->rr_policy) { + grpc_lb_policy_ping_one(exec_ctx, p->rr_policy, closure); + } else { + add_pending_ping(&p->pending_pings, closure); + if (!p->started_picking) { + start_picking(exec_ctx, p); + } + } + gpr_mu_unlock(&p->mu); +} + +static void glb_notify_on_state_change(grpc_exec_ctx *exec_ctx, + grpc_lb_policy *pol, + grpc_connectivity_state *current, + grpc_closure *notify) { + glb_lb_policy *p = (glb_lb_policy *)pol; + gpr_mu_lock(&p->mu); + grpc_connectivity_state_notify_on_state_change(exec_ctx, &p->state_tracker, + current, notify); + + gpr_mu_unlock(&p->mu); +} + +static const grpc_lb_policy_vtable glb_lb_policy_vtable = { + glb_destroy, glb_shutdown, glb_pick, + glb_cancel_pick, glb_cancel_picks, glb_ping_one, + glb_exit_idle, glb_check_connectivity, glb_notify_on_state_change}; + +static void glb_factory_ref(grpc_lb_policy_factory *factory) {} + +static void glb_factory_unref(grpc_lb_policy_factory *factory) {} + +static grpc_lb_policy *glb_create(grpc_exec_ctx *exec_ctx, + grpc_lb_policy_factory *factory, + grpc_lb_policy_args *args) { + glb_lb_policy *p = gpr_malloc(sizeof(*p)); + memset(p, 0, sizeof(*p)); + + /* all input addresses in args->addresses come from a resolver that claims + * they are LB services. + * + * Create a client channel over them to communicate with a LB service */ + p->cc_factory = args->client_channel_factory; + GPR_ASSERT(p->cc_factory != NULL); + if (args->addresses->naddrs == 0) { + return NULL; + } + + /* construct a target from the args->addresses, in the form + * ipvX://ip1:port1,ip2:port2,... + * TODO(dgq): support mixed ip version */ + char **addr_strs = gpr_malloc(sizeof(char *) * args->addresses->naddrs); + addr_strs[0] = + grpc_sockaddr_to_uri((const struct sockaddr *)&args->addresses->addrs[0]); + for (size_t i = 1; i < args->addresses->naddrs; i++) { + GPR_ASSERT(grpc_sockaddr_to_string( + &addr_strs[i], + (const struct sockaddr *)&args->addresses->addrs[i], + true) == 0); + } + size_t uri_path_len; + char *target_uri_str = gpr_strjoin_sep( + (const char **)addr_strs, args->addresses->naddrs, ",", &uri_path_len); + + /* will pick using pick_first */ + p->lb_server_channel = grpc_client_channel_factory_create_channel( + exec_ctx, p->cc_factory, target_uri_str, + GRPC_CLIENT_CHANNEL_TYPE_LOAD_BALANCING, NULL); + + gpr_free(target_uri_str); + for (size_t i = 0; i < args->addresses->naddrs; i++) { + gpr_free(addr_strs[i]); + } + gpr_free(addr_strs); + + if (p->lb_server_channel == NULL) { + gpr_free(p); + return NULL; + } + + rr_connectivity_data *rr_connectivity = + gpr_malloc(sizeof(rr_connectivity_data)); + memset(rr_connectivity, 0, sizeof(rr_connectivity_data)); + grpc_closure_init(&rr_connectivity->on_change, rr_connectivity_changed, + rr_connectivity); + rr_connectivity->p = p; + p->rr_connectivity = rr_connectivity; + + grpc_lb_policy_init(&p->base, &glb_lb_policy_vtable); + gpr_mu_init(&p->mu); + grpc_connectivity_state_init(&p->state_tracker, GRPC_CHANNEL_IDLE, "grpclb"); + return &p->base; +} + +static const grpc_lb_policy_factory_vtable glb_factory_vtable = { + glb_factory_ref, glb_factory_unref, glb_create, "grpclb"}; + +static grpc_lb_policy_factory glb_lb_policy_factory = {&glb_factory_vtable}; + +grpc_lb_policy_factory *grpc_glb_lb_factory_create() { + return &glb_lb_policy_factory; +} + +/* Plugin registration */ + +void grpc_lb_policy_grpclb_init() { + grpc_register_lb_policy(grpc_glb_lb_factory_create()); + grpc_register_tracer("glb", &grpc_lb_glb_trace); +} + +void grpc_lb_policy_grpclb_shutdown() {} diff --git a/src/core/ext/lb_policy/grpclb/grpclb.h b/src/core/ext/lb_policy/grpclb/grpclb.h new file mode 100644 index 00000000000..83552b4fa02 --- /dev/null +++ b/src/core/ext/lb_policy/grpclb/grpclb.h @@ -0,0 +1,44 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_EXT_LB_POLICY_GRPCLB_GRPCLB_H +#define GRPC_CORE_EXT_LB_POLICY_GRPCLB_GRPCLB_H + +#include "src/core/ext/client_config/lb_policy_factory.h" + +/** Returns a load balancing factory for the glb policy, which tries to connect + * to a load balancing server to decide the next successfully connected + * subchannel to pick. */ +grpc_lb_policy_factory *grpc_glb_lb_factory_create(); + +#endif /* GRPC_CORE_EXT_LB_POLICY_GRPCLB_GRPCLB_H */ diff --git a/src/core/ext/lb_policy/grpclb/load_balancer_api.c b/src/core/ext/lb_policy/grpclb/load_balancer_api.c index 59b89997dd9..c3b3888e90b 100644 --- a/src/core/ext/lb_policy/grpclb/load_balancer_api.c +++ b/src/core/ext/lb_policy/grpclb/load_balancer_api.c @@ -56,6 +56,7 @@ static bool decode_serverlist(pb_istream_t *stream, const pb_field_t *field, dec_arg->num_servers++; } else { /* second pass */ grpc_grpclb_server *server = gpr_malloc(sizeof(grpc_grpclb_server)); + memset(server, 0, sizeof(grpc_grpclb_server)); GPR_ASSERT(dec_arg->num_servers > 0); if (dec_arg->i == 0) { /* first iteration of second pass */ dec_arg->servers = @@ -147,6 +148,7 @@ grpc_grpclb_serverlist *grpc_grpclb_response_parse_serverlist( } grpc_grpclb_serverlist *sl = gpr_malloc(sizeof(grpc_grpclb_serverlist)); + memset(sl, 0, sizeof(*sl)); sl->num_servers = arg.num_servers; sl->servers = arg.servers; if (res->server_list.has_expiration_interval) { @@ -167,6 +169,81 @@ void grpc_grpclb_destroy_serverlist(grpc_grpclb_serverlist *serverlist) { gpr_free(serverlist); } +grpc_grpclb_serverlist *grpc_grpclb_serverlist_copy( + const grpc_grpclb_serverlist *sl) { + grpc_grpclb_serverlist *copy = gpr_malloc(sizeof(grpc_grpclb_serverlist)); + memset(copy, 0, sizeof(grpc_grpclb_serverlist)); + copy->num_servers = sl->num_servers; + memcpy(©->expiration_interval, &sl->expiration_interval, + sizeof(grpc_grpclb_duration)); + copy->servers = gpr_malloc(sizeof(grpc_grpclb_server*) * sl->num_servers); + for (size_t i = 0; i < sl->num_servers; i++) { + copy->servers[i] = gpr_malloc(sizeof(grpc_grpclb_server)); + memcpy(copy->servers[i], sl->servers[i], sizeof(grpc_grpclb_server)); + } + return copy; +} + +bool grpc_grpclb_serverlist_equals(const grpc_grpclb_serverlist *lhs, + const grpc_grpclb_serverlist *rhs) { + if ((lhs == NULL) || (rhs == NULL)) { + return false; + } + if (lhs->num_servers != rhs->num_servers) { + return false; + } + if (grpc_grpclb_duration_compare(&lhs->expiration_interval, + &rhs->expiration_interval) != 0) { + return false; + } + for (size_t i = 0; i < lhs->num_servers; i++) { + if (!grpc_grpclb_server_equals(lhs->servers[i], rhs->servers[i])) { + return false; + } + } + return true; +} + +bool grpc_grpclb_server_equals(const grpc_grpclb_server *lhs, + const grpc_grpclb_server *rhs) { + return memcmp(lhs, rhs, sizeof(grpc_grpclb_server)) == 0; +} + +int grpc_grpclb_duration_compare(const grpc_grpclb_duration *lhs, + const grpc_grpclb_duration *rhs) { + GPR_ASSERT(lhs && rhs); + if (lhs->has_seconds && rhs->has_seconds) { + if (lhs->seconds < rhs->seconds) { + return -1; + } + if (lhs->seconds > rhs->seconds) { + return 1; + } + goto compare_nanos; + } + if (lhs->has_seconds + rhs->has_seconds == 0) { + goto compare_nanos; + } + // only lhs or rhs have seconds + return rhs->has_seconds ? 1 : -1; + +compare_nanos: + if (lhs->has_nanos && rhs->has_nanos) { + if (lhs->nanos < rhs->nanos) { + return -1; + } + if (lhs->nanos > rhs->nanos) { + return 1; + } + return 0; + } + if (lhs->has_nanos + rhs->has_nanos == 0) { + return 0; + } + // only lhs or rhs have nanos + return rhs->has_nanos ? 1 : -1; +} + void grpc_grpclb_response_destroy(grpc_grpclb_response *response) { gpr_free(response); } diff --git a/src/core/ext/lb_policy/grpclb/load_balancer_api.h b/src/core/ext/lb_policy/grpclb/load_balancer_api.h index 71b5616d0c8..cc5c4e93439 100644 --- a/src/core/ext/lb_policy/grpclb/load_balancer_api.h +++ b/src/core/ext/lb_policy/grpclb/load_balancer_api.h @@ -68,6 +68,11 @@ void grpc_grpclb_request_destroy(grpc_grpclb_request *request); * grpc_grpclb_response */ grpc_grpclb_response *grpc_grpclb_response_parse(gpr_slice encoded_response); +/** Return a copy of \a sl. The caller is responsible for calling \a + * grpc_grpclb_destroy_serverlist on the returned copy. */ +grpc_grpclb_serverlist *grpc_grpclb_serverlist_copy( + const grpc_grpclb_serverlist *sl); + /** Destroy \a serverlist */ void grpc_grpclb_destroy_serverlist(grpc_grpclb_serverlist *serverlist); @@ -75,6 +80,17 @@ void grpc_grpclb_destroy_serverlist(grpc_grpclb_serverlist *serverlist); grpc_grpclb_serverlist *grpc_grpclb_response_parse_serverlist( gpr_slice encoded_response); +bool grpc_grpclb_serverlist_equals(const grpc_grpclb_serverlist *lhs, + const grpc_grpclb_serverlist *rhs); + +bool grpc_grpclb_server_equals(const grpc_grpclb_server *lhs, + const grpc_grpclb_server *rhs); + +/** Compare \a lhs against \a rhs and return 0 if \a lhs and \a rhs are equal, + * < 0 if \a lhs represents a duration shorter than \a rhs and > 0 otherwise */ +int grpc_grpclb_duration_compare(const grpc_grpclb_duration *lhs, + const grpc_grpclb_duration *rhs); + /** Destroy \a response */ void grpc_grpclb_response_destroy(grpc_grpclb_response *response); diff --git a/src/core/plugin_registry/grpc_plugin_registry.c b/src/core/plugin_registry/grpc_plugin_registry.c index 905cd59e23d..7a7a9ce477a 100644 --- a/src/core/plugin_registry/grpc_plugin_registry.c +++ b/src/core/plugin_registry/grpc_plugin_registry.c @@ -37,6 +37,8 @@ extern void grpc_chttp2_plugin_init(void); extern void grpc_chttp2_plugin_shutdown(void); extern void grpc_client_config_init(void); extern void grpc_client_config_shutdown(void); +extern void grpc_lb_policy_grpclb_init(void); +extern void grpc_lb_policy_grpclb_shutdown(void); extern void grpc_lb_policy_pick_first_init(void); extern void grpc_lb_policy_pick_first_shutdown(void); extern void grpc_lb_policy_round_robin_init(void); @@ -55,6 +57,8 @@ void grpc_register_built_in_plugins(void) { grpc_chttp2_plugin_shutdown); grpc_register_plugin(grpc_client_config_init, grpc_client_config_shutdown); + grpc_register_plugin(grpc_lb_policy_grpclb_init, + grpc_lb_policy_grpclb_shutdown); grpc_register_plugin(grpc_lb_policy_pick_first_init, grpc_lb_policy_pick_first_shutdown); grpc_register_plugin(grpc_lb_policy_round_robin_init, diff --git a/src/core/plugin_registry/grpc_unsecure_plugin_registry.c b/src/core/plugin_registry/grpc_unsecure_plugin_registry.c index 79950787258..ad4ddf0ff48 100644 --- a/src/core/plugin_registry/grpc_unsecure_plugin_registry.c +++ b/src/core/plugin_registry/grpc_unsecure_plugin_registry.c @@ -43,6 +43,8 @@ extern void grpc_resolver_sockaddr_init(void); extern void grpc_resolver_sockaddr_shutdown(void); extern void grpc_load_reporting_plugin_init(void); extern void grpc_load_reporting_plugin_shutdown(void); +extern void grpc_lb_policy_grpclb_init(void); +extern void grpc_lb_policy_grpclb_shutdown(void); extern void grpc_lb_policy_pick_first_init(void); extern void grpc_lb_policy_pick_first_shutdown(void); extern void grpc_lb_policy_round_robin_init(void); @@ -61,6 +63,8 @@ void grpc_register_built_in_plugins(void) { grpc_resolver_sockaddr_shutdown); grpc_register_plugin(grpc_load_reporting_plugin_init, grpc_load_reporting_plugin_shutdown); + grpc_register_plugin(grpc_lb_policy_grpclb_init, + grpc_lb_policy_grpclb_shutdown); grpc_register_plugin(grpc_lb_policy_pick_first_init, grpc_lb_policy_pick_first_shutdown); grpc_register_plugin(grpc_lb_policy_round_robin_init, diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 2a5229434c9..5768403a040 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -235,6 +235,7 @@ CORE_SOURCE_FILES = [ 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c', + 'src/core/ext/lb_policy/grpclb/grpclb.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c', 'third_party/nanopb/pb_common.c', diff --git a/test/core/client_config/grpclb_test.c b/test/core/client_config/grpclb_test.c new file mode 100644 index 00000000000..2080fefd1ae --- /dev/null +++ b/test/core/client_config/grpclb_test.c @@ -0,0 +1,670 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include "src/core/ext/client_config/client_channel.h" +#include "src/core/lib/channel/channel_stack.h" +#include "src/core/lib/support/string.h" +#include "src/core/lib/support/tmpfile.h" +#include "src/core/lib/surface/channel.h" +#include "src/core/lib/surface/server.h" +#include "test/core/end2end/cq_verifier.h" +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" + +#define NUM_BACKENDS 4 + +typedef struct client_fixture { + grpc_channel *client; + char *server_uri; + grpc_completion_queue *cq; +} client_fixture; + +typedef struct server_fixture { + grpc_server *server; + grpc_call *server_call; + grpc_completion_queue *cq; + char *servers_hostport; + int port; + gpr_thd_id tid; + int num_calls_serviced; +} server_fixture; + +typedef struct test_fixture { + server_fixture lb_server; + server_fixture lb_backends[NUM_BACKENDS]; + client_fixture client; + int lb_server_update_delay_ms; +} test_fixture; + +static gpr_timespec n_seconds_time(int n) { + return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(n); +} + +static void *tag(intptr_t t) { return (void *)t; } + +static gpr_slice build_response_payload_slice(const char *host, int *ports, + size_t nports) { + /* + server_list { + servers { + ip_address: "127.0.0.1" + port: ... + load_balance_token: "token..." + } + ... + } */ + char **hostports_vec = gpr_malloc(sizeof(char *) * nports); + for (size_t i = 0; i < nports; i++) { + gpr_join_host_port(&hostports_vec[i], "127.0.0.1", ports[i]); + } + char *hostports_str = + gpr_strjoin_sep((const char **)hostports_vec, nports, " ", NULL); + gpr_log(GPR_INFO, "generating response for %s", hostports_str); + + char *output_fname; + FILE *tmpfd = gpr_tmpfile("grpclb_test", &output_fname); + fclose(tmpfd); + char *cmdline; + gpr_asprintf(&cmdline, + "./tools/codegen/core/gen_grpclb_test_response.py --lb_proto " + "src/proto/grpc/lb/v1/load_balancer.proto %s " + "--output %s --quiet", + hostports_str, output_fname); + GPR_ASSERT(system(cmdline) == 0); + FILE *f = fopen(output_fname, "rb"); + fseek(f, 0, SEEK_END); + const size_t fsize = (size_t)ftell(f); + rewind(f); + + char *serialized_response = gpr_malloc(fsize); + GPR_ASSERT(fread(serialized_response, fsize, 1, f) == 1); + fclose(f); + gpr_free(output_fname); + gpr_free(cmdline); + + for (size_t i = 0; i < nports; i++) { + gpr_free(hostports_vec[i]); + } + gpr_free(hostports_vec); + gpr_free(hostports_str); + + const gpr_slice response_slice = + gpr_slice_from_copied_buffer(serialized_response, fsize); + gpr_free(serialized_response); + return response_slice; +} + +static void drain_cq(grpc_completion_queue *cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, n_seconds_time(5), NULL); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void sleep_ms(int delay_ms) { + gpr_sleep_until(gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), + gpr_time_from_millis(delay_ms, GPR_TIMESPAN))); +} + +static void start_lb_server(server_fixture *sf, int *ports, size_t nports, + int update_delay_ms) { + grpc_call *s; + cq_verifier *cqv = cq_verifier_create(sf->cq); + grpc_op ops[6]; + grpc_op *op; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_call_error error; + int was_cancelled = 2; + grpc_byte_buffer *request_payload_recv; + grpc_byte_buffer *response_payload; + + memset(ops, 0, sizeof(ops)); + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + + error = grpc_server_request_call(sf->server, &s, &call_details, + &request_metadata_recv, sf->cq, sf->cq, + tag(200)); + GPR_ASSERT(GRPC_CALL_OK == error); + gpr_log(GPR_INFO, "LB Server[%s] up", sf->servers_hostport); + cq_expect_completion(cqv, tag(200), 1); + cq_verify(cqv); + gpr_log(GPR_INFO, "LB Server[%s] after tag 200", sf->servers_hostport); + + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(201), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + gpr_log(GPR_INFO, "LB Server[%s] after tag 201", sf->servers_hostport); + + /* receive request for backends */ + op = ops; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &request_payload_recv; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(202), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + cq_expect_completion(cqv, tag(202), 1); + cq_verify(cqv); + gpr_log(GPR_INFO, "LB Server[%s] after RECV_MSG", sf->servers_hostport); + // TODO(dgq): validate request. + grpc_byte_buffer_destroy(request_payload_recv); + gpr_slice response_payload_slice; + for (int i = 0; i < 2; i++) { + if (i == 0) { + // First half of the ports. + response_payload_slice = + build_response_payload_slice("127.0.0.1", ports, nports / 2); + } else { + // Second half of the ports. + sleep_ms(update_delay_ms); + response_payload_slice = build_response_payload_slice( + "127.0.0.1", ports + (nports / 2), (nports + 1) / 2 /* ceil */); + } + + response_payload = grpc_raw_byte_buffer_create(&response_payload_slice, 1); + op = ops; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message = response_payload; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(203), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + cq_expect_completion(cqv, tag(203), 1); + cq_verify(cqv); + gpr_log(GPR_INFO, "LB Server[%s] after SEND_MESSAGE, iter %d", + sf->servers_hostport, i); + + grpc_byte_buffer_destroy(response_payload); + gpr_slice_unref(response_payload_slice); + } + gpr_log(GPR_INFO, "LB Server[%s] shutting down", sf->servers_hostport); + + op = ops; + 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_OK; + op->data.send_status_from_server.status_details = "xyz"; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(204), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + cq_expect_completion(cqv, tag(201), 1); + cq_expect_completion(cqv, tag(204), 1); + cq_verify(cqv); + gpr_log(GPR_INFO, "LB Server[%s] after tag 204. All done. LB server out", + sf->servers_hostport); + + grpc_call_destroy(s); + + cq_verifier_destroy(cqv); + + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); +} + +static void start_backend_server(server_fixture *sf) { + grpc_call *s; + cq_verifier *cqv; + grpc_op ops[6]; + grpc_op *op; + grpc_metadata_array request_metadata_recv; + grpc_call_details call_details; + grpc_call_error error; + int was_cancelled; + grpc_byte_buffer *request_payload_recv; + grpc_byte_buffer *response_payload; + grpc_event ev; + + while (true) { + memset(ops, 0, sizeof(ops)); + cqv = cq_verifier_create(sf->cq); + was_cancelled = 2; + grpc_metadata_array_init(&request_metadata_recv); + grpc_call_details_init(&call_details); + + error = grpc_server_request_call(sf->server, &s, &call_details, + &request_metadata_recv, sf->cq, sf->cq, + tag(100)); + GPR_ASSERT(GRPC_CALL_OK == error); + gpr_log(GPR_INFO, "Server[%s] up", sf->servers_hostport); + ev = grpc_completion_queue_next(sf->cq, n_seconds_time(60), NULL); + if (!ev.success) { + gpr_log(GPR_INFO, "Server[%s] being torn down", sf->servers_hostport); + cq_verifier_destroy(cqv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + return; + } + GPR_ASSERT(ev.type == GRPC_OP_COMPLETE); + gpr_log(GPR_INFO, "Server[%s] after tag 100", sf->servers_hostport); + + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(101), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + gpr_log(GPR_INFO, "Server[%s] after tag 101", sf->servers_hostport); + + bool exit = false; + gpr_slice response_payload_slice = + gpr_slice_from_copied_string("hello you"); + while (!exit) { + op = ops; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &request_payload_recv; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + ev = grpc_completion_queue_next(sf->cq, n_seconds_time(3), NULL); + if (ev.type == GRPC_OP_COMPLETE && ev.success) { + GPR_ASSERT(ev.tag = tag(102)); + if (request_payload_recv == NULL) { + exit = true; + gpr_log(GPR_INFO, + "Server[%s] recv \"close\" from client, exiting. Call #%d", + sf->servers_hostport, sf->num_calls_serviced); + } + } else { + gpr_log(GPR_INFO, "Server[%s] forced to shutdown. Call #%d", + sf->servers_hostport, sf->num_calls_serviced); + exit = true; + } + gpr_log(GPR_INFO, "Server[%s] after tag 102. Call #%d", + sf->servers_hostport, sf->num_calls_serviced); + + if (!exit) { + response_payload = + grpc_raw_byte_buffer_create(&response_payload_slice, 1); + op = ops; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message = response_payload; + op->flags = 0; + op->reserved = NULL; + op++; + error = + grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + ev = grpc_completion_queue_next(sf->cq, n_seconds_time(3), NULL); + if (ev.type == GRPC_OP_COMPLETE && ev.success) { + GPR_ASSERT(ev.tag = tag(103)); + } else { + gpr_log(GPR_INFO, "Server[%s] forced to shutdown. Call #%d", + sf->servers_hostport, sf->num_calls_serviced); + exit = true; + } + gpr_log(GPR_INFO, "Server[%s] after tag 103. Call #%d", + sf->servers_hostport, sf->num_calls_serviced); + grpc_byte_buffer_destroy(response_payload); + } + + grpc_byte_buffer_destroy(request_payload_recv); + } + ++sf->num_calls_serviced; + + gpr_log(GPR_INFO, "Server[%s] OUT OF THE LOOP", sf->servers_hostport); + gpr_slice_unref(response_payload_slice); + + op = ops; + 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_OK; + op->data.send_status_from_server.status_details = "Backend server out a-ok"; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(104), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + cq_expect_completion(cqv, tag(101), 1); + cq_expect_completion(cqv, tag(104), 1); + cq_verify(cqv); + gpr_log(GPR_INFO, "Server[%s] DONE. After servicing %d calls", + sf->servers_hostport, sf->num_calls_serviced); + + grpc_call_destroy(s); + cq_verifier_destroy(cqv); + grpc_metadata_array_destroy(&request_metadata_recv); + grpc_call_details_destroy(&call_details); + } +} + +static void perform_request(client_fixture *cf) { + grpc_call *c; + cq_verifier *cqv = cq_verifier_create(cf->cq); + grpc_op ops[6]; + grpc_op *op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_status_code status; + grpc_call_error error; + char *details = NULL; + size_t details_capacity = 0; + grpc_byte_buffer *request_payload; + grpc_byte_buffer *response_payload_recv; + int i; + + memset(ops, 0, sizeof(ops)); + gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + + c = grpc_channel_create_call(cf->client, NULL, GRPC_PROPAGATE_DEFAULTS, + cf->cq, "/foo", "foo.test.google.fr:1234", + n_seconds_time(1000), NULL); + gpr_log(GPR_INFO, "Call 0x%" PRIxPTR " created", (intptr_t)c); + GPR_ASSERT(c); + char *peer; + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata = &initial_metadata_recv; + op->flags = 0; + op->reserved = NULL; + op++; + 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->data.recv_status_on_client.status_details_capacity = &details_capacity; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + for (i = 0; i < 4; i++) { + request_payload = grpc_raw_byte_buffer_create(&request_payload_slice, 1); + + op = ops; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message = request_payload; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &response_payload_recv; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(2), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + peer = grpc_call_get_peer(c); + cq_expect_completion(cqv, tag(2), 1); + cq_verify(cqv); + gpr_free(peer); + + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(response_payload_recv); + } + + gpr_slice_unref(request_payload_slice); + + op = ops; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(3), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + cq_expect_completion(cqv, tag(1), 1); + cq_expect_completion(cqv, tag(3), 1); + cq_verify(cqv); + peer = grpc_call_get_peer(c); + gpr_log(GPR_INFO, "Client DONE WITH SERVER %s ", peer); + gpr_free(peer); + + grpc_call_destroy(c); + + cq_verify_empty_timeout(cqv, 1); + cq_verifier_destroy(cqv); + + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); + gpr_free(details); +} + +static void setup_client(const char *server_hostport, client_fixture *cf) { + cf->cq = grpc_completion_queue_create(NULL); + cf->server_uri = gpr_strdup(server_hostport); + cf->client = grpc_insecure_channel_create(cf->server_uri, NULL, NULL); +} + +static void teardown_client(client_fixture *cf) { + grpc_completion_queue_shutdown(cf->cq); + drain_cq(cf->cq); + grpc_completion_queue_destroy(cf->cq); + cf->cq = NULL; + grpc_channel_destroy(cf->client); + cf->client = NULL; + gpr_free(cf->server_uri); +} + +static void setup_server(const char *host, server_fixture *sf) { + int assigned_port; + + sf->cq = grpc_completion_queue_create(NULL); + char *colon_idx = strchr(host, ':'); + if (colon_idx) { + char *port_str = colon_idx + 1; + sf->port = atoi(port_str); + sf->servers_hostport = gpr_strdup(host); + } else { + sf->port = grpc_pick_unused_port_or_die(); + gpr_join_host_port(&sf->servers_hostport, host, sf->port); + } + + sf->server = grpc_server_create(NULL, NULL); + grpc_server_register_completion_queue(sf->server, sf->cq, NULL); + GPR_ASSERT((assigned_port = grpc_server_add_insecure_http2_port( + sf->server, sf->servers_hostport)) > 0); + GPR_ASSERT(sf->port == assigned_port); + grpc_server_start(sf->server); +} + +static void teardown_server(server_fixture *sf) { + if (!sf->server) return; + + gpr_log(GPR_INFO, "Server[%s] shutting down", sf->servers_hostport); + grpc_server_shutdown_and_notify(sf->server, sf->cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck( + sf->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(sf->server); + gpr_thd_join(sf->tid); + + sf->server = NULL; + grpc_completion_queue_shutdown(sf->cq); + drain_cq(sf->cq); + grpc_completion_queue_destroy(sf->cq); + + gpr_log(GPR_INFO, "Server[%s] bye bye", sf->servers_hostport); + gpr_free(sf->servers_hostport); +} + +static void fork_backend_server(void *arg) { + server_fixture *sf = arg; + start_backend_server(sf); +} + +static void fork_lb_server(void *arg) { + test_fixture *tf = arg; + int ports[NUM_BACKENDS]; + for (int i = 0; i < NUM_BACKENDS; i++) { + ports[i] = tf->lb_backends[i].port; + } + start_lb_server(&tf->lb_server, ports, NUM_BACKENDS, + tf->lb_server_update_delay_ms); +} + +static void setup_test_fixture(test_fixture *tf, + int lb_server_update_delay_ms) { + tf->lb_server_update_delay_ms = lb_server_update_delay_ms; + + gpr_thd_options options = gpr_thd_options_default(); + gpr_thd_options_set_joinable(&options); + + for (int i = 0; i < NUM_BACKENDS; ++i) { + setup_server("127.0.0.1", &tf->lb_backends[i]); + gpr_thd_new(&tf->lb_backends[i].tid, fork_backend_server, + &tf->lb_backends[i], &options); + } + + setup_server("127.0.0.1", &tf->lb_server); + gpr_thd_new(&tf->lb_server.tid, fork_lb_server, &tf->lb_server, &options); + + char *server_uri; + gpr_asprintf(&server_uri, "ipv4:%s?lb_policy=grpclb&lb_enabled=1", + tf->lb_server.servers_hostport); + setup_client(server_uri, &tf->client); + gpr_free(server_uri); +} + +static void teardown_test_fixture(test_fixture *tf) { + teardown_client(&tf->client); + for (int i = 0; i < NUM_BACKENDS; ++i) { + teardown_server(&tf->lb_backends[i]); + } + teardown_server(&tf->lb_server); +} + +// The LB server will send two updates: batch 1 and batch 2. Each batch contains +// two addresses, both of a valid and running backend server. Batch 1 is readily +// available and provided as soon as the client establishes the streaming call. +// Batch 2 is sent after a delay of \a lb_server_update_delay_ms milliseconds. +static test_fixture test_update(int lb_server_update_delay_ms) { + test_fixture tf; + memset(&tf, 0, sizeof(tf)); + setup_test_fixture(&tf, lb_server_update_delay_ms); + perform_request( + &tf.client); // "consumes" 1st backend server of 1st serverlist + perform_request( + &tf.client); // "consumes" 2nd backend server of 1st serverlist + + perform_request( + &tf.client); // "consumes" 1st backend server of 2nd serverlist + perform_request( + &tf.client); // "consumes" 2nd backend server of 2nd serverlist + + teardown_test_fixture(&tf); + return tf; +} + +int main(int argc, char **argv) { + grpc_test_init(argc, argv); + grpc_init(); + + test_fixture tf_result; + // Clients take a bit over one second to complete a call (the last part of the + // call sleeps for 1 second while verifying the client's completion queue is + // empty). Therefore: + // + // If the LB server waits 800ms before sending an update, it will arrive + // before the first client request is done, skipping the second server from + // batch 1 altogether: the 2nd client request will go to the 1st server of + // batch 2 (ie, the third one out of the four total servers). + tf_result = test_update(800); + GPR_ASSERT(tf_result.lb_backends[0].num_calls_serviced == 1); + GPR_ASSERT(tf_result.lb_backends[1].num_calls_serviced == 0); + GPR_ASSERT(tf_result.lb_backends[2].num_calls_serviced == 2); + GPR_ASSERT(tf_result.lb_backends[3].num_calls_serviced == 1); + + // If the LB server waits 1500ms, the update arrives after having picked the + // 2nd server from batch 1 but before the next pick for the first server of + // batch 2. All server are used. + tf_result = test_update(1500); + GPR_ASSERT(tf_result.lb_backends[0].num_calls_serviced == 1); + GPR_ASSERT(tf_result.lb_backends[1].num_calls_serviced == 1); + GPR_ASSERT(tf_result.lb_backends[2].num_calls_serviced == 1); + GPR_ASSERT(tf_result.lb_backends[3].num_calls_serviced == 1); + + // If the LB server waits >= 2000ms, the update arrives after the first two + // request are done and the third pick is performed, which returns, in RR + // fashion, the 1st server of the 1st update. Therefore, the second server of + // batch 1 is hit twice, whereas the first server of batch 2 is never hit. + tf_result = test_update(2000); + GPR_ASSERT(tf_result.lb_backends[0].num_calls_serviced == 2); + GPR_ASSERT(tf_result.lb_backends[1].num_calls_serviced == 1); + GPR_ASSERT(tf_result.lb_backends[2].num_calls_serviced == 1); + GPR_ASSERT(tf_result.lb_backends[3].num_calls_serviced == 0); + + grpc_shutdown(); + return 0; +} diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c index 8e9fa70b0ec..060e166e6eb 100644 --- a/test/core/end2end/cq_verifier.c +++ b/test/core/end2end/cq_verifier.c @@ -258,9 +258,10 @@ void cq_verify(cq_verifier *v) { gpr_strvec_destroy(&have_tags); } -void cq_verify_empty(cq_verifier *v) { - gpr_timespec deadline = gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), - gpr_time_from_seconds(1, GPR_TIMESPAN)); +void cq_verify_empty_timeout(cq_verifier *v, int timeout_sec) { + gpr_timespec deadline = + gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), + gpr_time_from_seconds(timeout_sec, GPR_TIMESPAN)); grpc_event ev; GPR_ASSERT(v->expect.next == &v->expect && "expectation queue must be empty"); @@ -274,6 +275,8 @@ void cq_verify_empty(cq_verifier *v) { } } +void cq_verify_empty(cq_verifier *v) { cq_verify_empty_timeout(v, 1); } + static expectation *add(cq_verifier *v, grpc_completion_type type, void *tag) { expectation *e = gpr_malloc(sizeof(expectation)); e->type = type; diff --git a/test/core/end2end/cq_verifier.h b/test/core/end2end/cq_verifier.h index 8c9a85c2187..bf82468c9a2 100644 --- a/test/core/end2end/cq_verifier.h +++ b/test/core/end2end/cq_verifier.h @@ -55,6 +55,9 @@ void cq_verify(cq_verifier *v); /* ensure that the completion queue is empty */ void cq_verify_empty(cq_verifier *v); +/* ensure that the completion queue is empty, waiting up to \a timeout secs. */ +void cq_verify_empty_timeout(cq_verifier *v, int timeout_sec); + /* Various expectation matchers Any functions taking ... expect a NULL terminated list of key/value pairs (each pair using two parameter slots) of metadata that MUST be present in diff --git a/tools/codegen/core/gen_grpclb_test_response.py b/tools/codegen/core/gen_grpclb_test_response.py new file mode 100755 index 00000000000..4535efc738c --- /dev/null +++ b/tools/codegen/core/gen_grpclb_test_response.py @@ -0,0 +1,97 @@ +#!/usr/bin/env python2.7 + +# Copyright 2015-2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +from __future__ import print_function +import argparse +import subprocess +import sys +import os.path +import sys +import tempfile +import importlib + +# Example: tools/codegen/core/gen_grpclb_test_response.py \ +# --lb_proto src/proto/grpc/lb/v1/load_balancer.proto \ +# 127.0.0.1:1234 10.0.0.1:4321 + +# 1) Compile src/proto/grpc/lb/v1/load_balancer.proto to a temp location +parser = argparse.ArgumentParser() +parser.add_argument('--lb_proto', required=True) +parser.add_argument('-e', '--expiration_interval_secs', type=int) +parser.add_argument('-o', '--output') +parser.add_argument('-q', '--quiet', default=False, action='store_true') +parser.add_argument('ipports', nargs='+') +args = parser.parse_args() + +if not os.path.isfile(args.lb_proto): + print("ERROR: file '{}' cannot be accessed (not found, no permissions, etc.)" + .format(args.lb_proto), file=sys.stderr) + sys.exit(1) + +proto_dirname = os.path.dirname(args.lb_proto) +output_dir = tempfile.mkdtemp() + +protoc_cmd = 'protoc -I{} --python_out={} {}'.format( + proto_dirname, output_dir, args.lb_proto) + +with tempfile.TemporaryFile() as stderr_tmpfile: + if subprocess.call(protoc_cmd, stderr=stderr_tmpfile, shell=True) != 0: + stderr_tmpfile.seek(0) + print("ERROR: while running '{}': {}". + format(protoc_cmd, stderr_tmpfile.read())) + sys.exit(2) + +# 2) import the output .py file. +module_name = os.path.splitext(os.path.basename(args.lb_proto))[0] + '_pb2' +sys.path.append(output_dir) +pb_module = importlib.import_module(module_name) + +# 3) Generate! +lb_response = pb_module.LoadBalanceResponse() +if args.expiration_interval_secs: + lb_response.server_list.expiration_interval.seconds = \ + args.expiration_interval_secs + +for ipport in args.ipports: + ip, port = ipport.split(':') + server = lb_response.server_list.servers.add() + server.ip_address = ip + server.port = int(port) + server.load_balance_token = b'token{}'.format(port) + +serialized_bytes = lb_response.SerializeToString() +serialized_hex = ''.join('\\x{:02x}'.format(ord(c)) for c in serialized_bytes) +if args.output: + with open(args.output, 'w') as f: + f.write(serialized_bytes) +if not args.quiet: + print(str(lb_response)) + print(serialized_hex) diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index aee866adf46..62ae97a9a3c 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -1100,6 +1100,7 @@ src/core/ext/transport/chttp2/server/insecure/server_chttp2.c \ src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c \ src/core/ext/transport/chttp2/client/insecure/channel_create.c \ src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c \ +src/core/ext/lb_policy/grpclb/grpclb.c \ src/core/ext/lb_policy/grpclb/load_balancer_api.c \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c \ third_party/nanopb/pb_common.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 4aad52c69d0..b2b0d5bf997 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -944,6 +944,22 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "grpclb_test", + "src": [ + "test/core/client_config/grpclb_test.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", @@ -4152,6 +4168,7 @@ "gpr", "grpc_base", "grpc_lb_policy_grpclb", + "grpc_lb_policy_grpclb", "grpc_lb_policy_pick_first", "grpc_lb_policy_round_robin", "grpc_load_reporting", @@ -4246,6 +4263,7 @@ "gpr", "grpc_base", "grpc_lb_policy_grpclb", + "grpc_lb_policy_grpclb", "grpc_lb_policy_pick_first", "grpc_lb_policy_round_robin", "grpc_load_reporting", @@ -6048,6 +6066,7 @@ "language": "c", "name": "grpc_lb_policy_grpclb", "src": [ + "src/core/ext/lb_policy/grpclb/grpclb.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 5a84a41b638..bf439b43e9c 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -1079,6 +1079,27 @@ "windows" ] }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "grpclb_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index 3a214a4ad41..070f6559b7b 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -643,6 +643,17 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_verify_jwt", "vcxproj\ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpclb_test", "vcxproj\test\grpclb_test\grpclb_test.vcxproj", "{9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_census_nosec_test", "vcxproj\test/end2end/fixtures\h2_census_nosec_test\h2_census_nosec_test.vcxproj", "{A8039D43-910E-4248-2A22-74366E8C4DCD}" ProjectSection(myProperties) = preProject lib = "False" @@ -2455,6 +2466,22 @@ Global {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release-DLL|Win32.Build.0 = Release|Win32 {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release-DLL|x64.ActiveCfg = Release|x64 {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release-DLL|x64.Build.0 = Release|x64 + {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Debug|Win32.ActiveCfg = Debug|Win32 + {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Debug|x64.ActiveCfg = Debug|x64 + {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Release|Win32.ActiveCfg = Release|Win32 + {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Release|x64.ActiveCfg = Release|x64 + {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Debug|Win32.Build.0 = Debug|Win32 + {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Debug|x64.Build.0 = Debug|x64 + {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Release|Win32.Build.0 = Release|Win32 + {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Release|x64.Build.0 = Release|x64 + {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Debug-DLL|x64.Build.0 = Debug|x64 + {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Release-DLL|Win32.Build.0 = Release|Win32 + {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Release-DLL|x64.ActiveCfg = Release|x64 + {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Release-DLL|x64.Build.0 = Release|x64 {A8039D43-910E-4248-2A22-74366E8C4DCD}.Debug|Win32.ActiveCfg = Debug|Win32 {A8039D43-910E-4248-2A22-74366E8C4DCD}.Debug|x64.ActiveCfg = Debug|x64 {A8039D43-910E-4248-2A22-74366E8C4DCD}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index ec0c984f2e7..2473525a97f 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -770,6 +770,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 273f73b2a30..28c6483cf2a 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -478,6 +478,9 @@ src\core\ext\transport\chttp2\client\insecure + + src\core\ext\lb_policy\grpclb + src\core\ext\lb_policy\grpclb diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index bba099d803c..6e1b3ad05aa 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -688,6 +688,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 78a8777f942..ce599a6e66f 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -406,6 +406,9 @@ src\core\ext\load_reporting + + src\core\ext\lb_policy\grpclb + src\core\ext\lb_policy\grpclb diff --git a/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj b/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj new file mode 100644 index 00000000000..7ea8e06d74a --- /dev/null +++ b/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj @@ -0,0 +1,199 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + grpclb_test + static + Debug + static + Debug + + + grpclb_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj.filters b/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj.filters new file mode 100644 index 00000000000..7a70c0b5e1c --- /dev/null +++ b/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj.filters @@ -0,0 +1,21 @@ + + + + + test\core\client_config + + + + + + {e0ba55a2-37d9-5029-6f4e-64f097307340} + + + {6d1d02a2-d635-142d-16d4-45bd59f5c83a} + + + {356b8663-f1cf-f0df-39d0-d2de958699d0} + + + + From 4425828d1d8a7ac882e34d76a2f26e47e8d1b22f Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 16 Jun 2016 06:42:01 +0000 Subject: [PATCH 1120/1894] Should not explicitly initialize these pointers to nullptr in gcc-4.4 case because nullptr assignment actually requires the calling of a constructor. As a result, the order in which these nullptr initializations take place is not defined with respect to other initializations. A pointer that is left without explicit initialization automatically gets nullptr anyway, so just don't explicitly initialize these. --- src/cpp/codegen/codegen_init.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cpp/codegen/codegen_init.cc b/src/cpp/codegen/codegen_init.cc index c5d22124b71..103a7c12589 100644 --- a/src/cpp/codegen/codegen_init.cc +++ b/src/cpp/codegen/codegen_init.cc @@ -34,12 +34,12 @@ #include #include -/// Initializes the global gRPC variables for the codegen library. These will +/// Null-initializes the global gRPC variables for the codegen library. These /// stay null in the absence of of grpc++ library. In this case, no gRPC /// features such as the ability to perform calls will be available. Trying to /// perform them would result in a segmentation fault when trying to deference /// the following nulled globals. These should be associated with actual /// as part of the instantiation of a \a grpc::GrpcLibraryInitializer variable. -grpc::CoreCodegenInterface* grpc::g_core_codegen_interface = nullptr; -grpc::GrpcLibraryInterface* grpc::g_glip = nullptr; +grpc::CoreCodegenInterface* grpc::g_core_codegen_interface; +grpc::GrpcLibraryInterface* grpc::g_glip; From eaef69b572265d3b282cadf33f5e452f31e164ae Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 15 Jun 2016 23:52:25 -0700 Subject: [PATCH 1121/1894] removed unused includes --- test/core/client_config/grpclb_test.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/test/core/client_config/grpclb_test.c b/test/core/client_config/grpclb_test.c index 2080fefd1ae..63f32c241d3 100644 --- a/test/core/client_config/grpclb_test.c +++ b/test/core/client_config/grpclb_test.c @@ -32,9 +32,7 @@ */ #include -#include #include -#include #include #include From 22e8f1db07889afc85f935ad3f5a64b876b73339 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 15 Jun 2016 23:53:00 -0700 Subject: [PATCH 1122/1894] reordered includes --- src/core/ext/lb_policy/grpclb/grpclb.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index cfa9669e0a2..852e78f0202 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -31,6 +31,14 @@ * */ +#include + +#include +#include +#include +#include +#include + #include "src/core/ext/lb_policy/grpclb/grpclb.h" #include "src/core/ext/client_config/client_channel_factory.h" #include "src/core/ext/client_config/lb_policy_registry.h" @@ -41,14 +49,6 @@ #include "src/core/lib/surface/call.h" #include "src/core/lib/surface/channel.h" -#include - -#include -#include -#include -#include -#include - int grpc_lb_glb_trace = 0; typedef struct wrapped_rr_closure_arg { From b2e986b3fa333135533b3e050229c259aac7376c Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 15 Jun 2016 23:55:50 -0700 Subject: [PATCH 1123/1894] added missing grpclb.h dep in build.yaml --- BUILD | 3 +++ build.yaml | 1 + gRPC.podspec | 2 ++ grpc.gemspec | 1 + package.xml | 1 + tools/doxygen/Doxyfile.core.internal | 1 + tools/run_tests/sources_and_headers.json | 2 ++ vsprojects/vcxproj/grpc/grpc.vcxproj | 1 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 3 +++ vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj | 1 + vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters | 3 +++ 11 files changed, 19 insertions(+) diff --git a/BUILD b/BUILD index 42a35a310d6..e0de092d674 100644 --- a/BUILD +++ b/BUILD @@ -297,6 +297,7 @@ cc_library( "src/core/ext/client_config/subchannel_call_holder.h", "src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/uri_parser.h", + "src/core/ext/lb_policy/grpclb/grpclb.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", "src/core/ext/load_reporting/load_reporting.h", @@ -998,6 +999,7 @@ cc_library( "src/core/ext/client_config/uri_parser.h", "src/core/ext/load_reporting/load_reporting.h", "src/core/ext/load_reporting/load_reporting_filter.h", + "src/core/ext/lb_policy/grpclb/grpclb.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", "src/core/ext/census/aggregation.h", @@ -2133,6 +2135,7 @@ objc_library( "src/core/ext/client_config/subchannel_call_holder.h", "src/core/ext/client_config/subchannel_index.h", "src/core/ext/client_config/uri_parser.h", + "src/core/ext/lb_policy/grpclb/grpclb.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h", "src/core/ext/load_reporting/load_reporting.h", diff --git a/build.yaml b/build.yaml index d5d1b816a68..ee854361a19 100644 --- a/build.yaml +++ b/build.yaml @@ -374,6 +374,7 @@ filegroups: - gpr_codegen - name: grpc_lb_policy_grpclb headers: + - src/core/ext/lb_policy/grpclb/grpclb.h - src/core/ext/lb_policy/grpclb/load_balancer_api.h - src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h src: diff --git a/gRPC.podspec b/gRPC.podspec index ab04e494a31..bbf18ee0e59 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -300,6 +300,7 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/subchannel_call_holder.h', 'src/core/ext/client_config/subchannel_index.h', 'src/core/ext/client_config/uri_parser.h', + 'src/core/ext/lb_policy/grpclb/grpclb.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h', 'third_party/nanopb/pb.h', @@ -676,6 +677,7 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/subchannel_call_holder.h', 'src/core/ext/client_config/subchannel_index.h', 'src/core/ext/client_config/uri_parser.h', + 'src/core/ext/lb_policy/grpclb/grpclb.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h', 'third_party/nanopb/pb.h', diff --git a/grpc.gemspec b/grpc.gemspec index d30d7ae30e9..dea6d4f5189 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -309,6 +309,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/ext/client_config/subchannel_call_holder.h ) s.files += %w( src/core/ext/client_config/subchannel_index.h ) s.files += %w( src/core/ext/client_config/uri_parser.h ) + s.files += %w( src/core/ext/lb_policy/grpclb/grpclb.h ) s.files += %w( src/core/ext/lb_policy/grpclb/load_balancer_api.h ) s.files += %w( src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h ) s.files += %w( third_party/nanopb/pb.h ) diff --git a/package.xml b/package.xml index 2c718608647..ef52eba3fed 100644 --- a/package.xml +++ b/package.xml @@ -316,6 +316,7 @@ + diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index 62ae97a9a3c..057c385dd04 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -926,6 +926,7 @@ src/core/ext/client_config/subchannel.h \ src/core/ext/client_config/subchannel_call_holder.h \ src/core/ext/client_config/subchannel_index.h \ src/core/ext/client_config/uri_parser.h \ +src/core/ext/lb_policy/grpclb/grpclb.h \ src/core/ext/lb_policy/grpclb/load_balancer_api.h \ src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h \ third_party/nanopb/pb.h \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index b2b0d5bf997..492be7322f6 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -6060,6 +6060,7 @@ "nanopb" ], "headers": [ + "src/core/ext/lb_policy/grpclb/grpclb.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h" ], @@ -6067,6 +6068,7 @@ "name": "grpc_lb_policy_grpclb", "src": [ "src/core/ext/lb_policy/grpclb/grpclb.c", + "src/core/ext/lb_policy/grpclb/grpclb.h", "src/core/ext/lb_policy/grpclb/load_balancer_api.c", "src/core/ext/lb_policy/grpclb/load_balancer_api.h", "src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c", diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 2473525a97f..ee1a6a979fb 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -435,6 +435,7 @@ + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 28c6483cf2a..ea349a3ed69 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -1049,6 +1049,9 @@ src\core\ext\client_config + + src\core\ext\lb_policy\grpclb + src\core\ext\lb_policy\grpclb diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index 6e1b3ad05aa..2ad6dd7d664 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -403,6 +403,7 @@ + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index ce599a6e66f..1612cef4392 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -896,6 +896,9 @@ src\core\ext\load_reporting + + src\core\ext\lb_policy\grpclb + src\core\ext\lb_policy\grpclb From 8782d1b7e104b74e0bf1ecba386420088140c76c Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 15 Jun 2016 23:58:44 -0700 Subject: [PATCH 1124/1894] clang-format --- src/core/ext/lb_policy/grpclb/grpclb.c | 11 +++++++---- src/core/ext/lb_policy/grpclb/load_balancer_api.c | 2 +- test/core/client_config/grpclb_test.c | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/src/core/ext/lb_policy/grpclb/grpclb.c b/src/core/ext/lb_policy/grpclb/grpclb.c index 852e78f0202..26cead51b0e 100644 --- a/src/core/ext/lb_policy/grpclb/grpclb.c +++ b/src/core/ext/lb_policy/grpclb/grpclb.c @@ -39,10 +39,10 @@ #include #include -#include "src/core/ext/lb_policy/grpclb/grpclb.h" #include "src/core/ext/client_config/client_channel_factory.h" #include "src/core/ext/client_config/lb_policy_registry.h" #include "src/core/ext/client_config/parse_address.h" +#include "src/core/ext/lb_policy/grpclb/grpclb.h" #include "src/core/ext/lb_policy/grpclb/load_balancer_api.h" #include "src/core/lib/iomgr/sockaddr_utils.h" #include "src/core/lib/support/string.h" @@ -635,7 +635,8 @@ static void rr_handover(grpc_exec_ctx *exec_ctx, glb_lb_policy *p) { GRPC_LB_POLICY_REF(p->rr_policy, "rr_handover_pending_pick"); pp->wrapped_on_complete_arg->rr_policy = p->rr_policy; if (grpc_lb_glb_trace) { - gpr_log(GPR_INFO, "Pending pick about to PICK from 0x%"PRIxPTR"", (intptr_t)p->rr_policy); + gpr_log(GPR_INFO, "Pending pick about to PICK from 0x%" PRIxPTR "", + (intptr_t)p->rr_policy); } grpc_lb_policy_pick(exec_ctx, p->rr_policy, pp->pollent, pp->initial_metadata, pp->initial_metadata_flags, @@ -649,7 +650,8 @@ static void rr_handover(grpc_exec_ctx *exec_ctx, glb_lb_policy *p) { GRPC_LB_POLICY_REF(p->rr_policy, "rr_handover_pending_ping"); pping->wrapped_notify_arg->rr_policy = p->rr_policy; if (grpc_lb_glb_trace) { - gpr_log(GPR_INFO, "Pending ping about to PING from 0x%"PRIxPTR"", (intptr_t)p->rr_policy); + gpr_log(GPR_INFO, "Pending ping about to PING from 0x%" PRIxPTR "", + (intptr_t)p->rr_policy); } grpc_lb_policy_ping_one(exec_ctx, p->rr_policy, pping->wrapped_notify); gpr_free(pping); @@ -677,7 +679,8 @@ static int glb_pick(grpc_exec_ctx *exec_ctx, grpc_lb_policy *pol, if (p->rr_policy != NULL) { if (grpc_lb_glb_trace) { - gpr_log(GPR_INFO, "about to PICK from 0x%"PRIxPTR"", (intptr_t)p->rr_policy); + gpr_log(GPR_INFO, "about to PICK from 0x%" PRIxPTR "", + (intptr_t)p->rr_policy); } GRPC_LB_POLICY_REF(p->rr_policy, "rr_pick"); wrapped_rr_closure_arg *warg = gpr_malloc(sizeof(wrapped_rr_closure_arg)); diff --git a/src/core/ext/lb_policy/grpclb/load_balancer_api.c b/src/core/ext/lb_policy/grpclb/load_balancer_api.c index c3b3888e90b..6c77612e0d4 100644 --- a/src/core/ext/lb_policy/grpclb/load_balancer_api.c +++ b/src/core/ext/lb_policy/grpclb/load_balancer_api.c @@ -176,7 +176,7 @@ grpc_grpclb_serverlist *grpc_grpclb_serverlist_copy( copy->num_servers = sl->num_servers; memcpy(©->expiration_interval, &sl->expiration_interval, sizeof(grpc_grpclb_duration)); - copy->servers = gpr_malloc(sizeof(grpc_grpclb_server*) * sl->num_servers); + copy->servers = gpr_malloc(sizeof(grpc_grpclb_server *) * sl->num_servers); for (size_t i = 0; i < sl->num_servers; i++) { copy->servers[i] = gpr_malloc(sizeof(grpc_grpclb_server)); memcpy(copy->servers[i], sl->servers[i], sizeof(grpc_grpclb_server)); diff --git a/test/core/client_config/grpclb_test.c b/test/core/client_config/grpclb_test.c index 63f32c241d3..85cfe80748f 100644 --- a/test/core/client_config/grpclb_test.c +++ b/test/core/client_config/grpclb_test.c @@ -387,7 +387,7 @@ static void start_backend_server(server_fixture *sf) { cq_expect_completion(cqv, tag(104), 1); cq_verify(cqv); gpr_log(GPR_INFO, "Server[%s] DONE. After servicing %d calls", - sf->servers_hostport, sf->num_calls_serviced); + sf->servers_hostport, sf->num_calls_serviced); grpc_call_destroy(s); cq_verifier_destroy(cqv); From dc45677d3dfd0d628a62e9e5937747e3fd230ad5 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 16 Jun 2016 00:23:32 -0700 Subject: [PATCH 1125/1894] Keeping this up-to-date --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 08d8f2ec7b8..52a4cb4ebed 100644 --- a/Makefile +++ b/Makefile @@ -1494,6 +1494,7 @@ buildtests_cxx: buildtests_zookeeper privatelibs_cxx \ $(BINDIR)/$(CONFIG)/json_run_localhost \ $(BINDIR)/$(CONFIG)/metrics_client \ $(BINDIR)/$(CONFIG)/mock_test \ + $(BINDIR)/$(CONFIG)/proto_server_reflection_test \ $(BINDIR)/$(CONFIG)/qps_interarrival_test \ $(BINDIR)/$(CONFIG)/qps_json_driver \ $(BINDIR)/$(CONFIG)/qps_openloop_test \ From 90460fadf6269fdcbb6cb58fd3669cb26b00d923 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 16 Jun 2016 00:28:57 -0700 Subject: [PATCH 1126/1894] Digraph --- include/grpc++/ext/proto_server_reflection_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/ext/proto_server_reflection_plugin.h b/include/grpc++/ext/proto_server_reflection_plugin.h index 517c4737f59..2b618672589 100644 --- a/include/grpc++/ext/proto_server_reflection_plugin.h +++ b/include/grpc++/ext/proto_server_reflection_plugin.h @@ -56,7 +56,7 @@ class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin { bool has_sync_methods() const GRPC_OVERRIDE; private: - std::shared_ptr<::grpc::ProtoServerReflection> reflection_service_; + std::shared_ptr< ::grpc::ProtoServerReflection> reflection_service_; }; // Add proto reflection plugin to ServerBuilder. This function should be called From 4e1a883a5f3a0e5eea104a27d8e3ec93874fedf5 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 16 Jun 2016 07:32:42 +0000 Subject: [PATCH 1127/1894] Digraph --- src/cpp/ext/proto_server_reflection_plugin.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpp/ext/proto_server_reflection_plugin.cc b/src/cpp/ext/proto_server_reflection_plugin.cc index f31d102a9e6..7f9b6673561 100644 --- a/src/cpp/ext/proto_server_reflection_plugin.cc +++ b/src/cpp/ext/proto_server_reflection_plugin.cc @@ -73,8 +73,8 @@ bool ProtoServerReflectionPlugin::has_async_methods() const { return false; } -static std::unique_ptr<::grpc::ServerBuilderPlugin> CreateProtoReflection() { - return std::unique_ptr<::grpc::ServerBuilderPlugin>( +static std::unique_ptr< ::grpc::ServerBuilderPlugin> CreateProtoReflection() { + return std::unique_ptr< ::grpc::ServerBuilderPlugin>( new ProtoServerReflectionPlugin()); } From 6b668cc93f4158f6074488d32ed2bb2c20079450 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 16 Jun 2016 07:49:36 +0000 Subject: [PATCH 1128/1894] Remove range-based for, comparisons to nullptr --- src/cpp/ext/proto_server_reflection.cc | 4 ++-- src/cpp/ext/proto_server_reflection_plugin.cc | 4 ++-- test/cpp/util/proto_reflection_descriptor_database.cc | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/cpp/ext/proto_server_reflection.cc b/src/cpp/ext/proto_server_reflection.cc index 348a035f0f3..3973bfb58ea 100644 --- a/src/cpp/ext/proto_server_reflection.cc +++ b/src/cpp/ext/proto_server_reflection.cc @@ -197,8 +197,8 @@ Status ProtoServerReflection::GetAllExtensionNumbers( std::vector extensions; descriptor_pool_->FindAllExtensions(desc, &extensions); - for (auto extension : extensions) { - response->add_extension_number(extension->number()); + for (auto it = extensions.begin(); it != extensions.end(); it++) { + response->add_extension_number((*it)->number()); } response->set_base_type_name(type); return Status::OK; diff --git a/src/cpp/ext/proto_server_reflection_plugin.cc b/src/cpp/ext/proto_server_reflection_plugin.cc index 7f9b6673561..5b806ce1ae1 100644 --- a/src/cpp/ext/proto_server_reflection_plugin.cc +++ b/src/cpp/ext/proto_server_reflection_plugin.cc @@ -60,14 +60,14 @@ void ProtoServerReflectionPlugin::ChangeArguments(const grpc::string& name, void* value) {} bool ProtoServerReflectionPlugin::has_sync_methods() const { - if (reflection_service_ != nullptr) { + if (reflection_service_) { return reflection_service_->has_synchronous_methods(); } return false; } bool ProtoServerReflectionPlugin::has_async_methods() const { - if (reflection_service_ != nullptr) { + if (reflection_service_) { return reflection_service_->has_async_methods(); } return false; diff --git a/test/cpp/util/proto_reflection_descriptor_database.cc b/test/cpp/util/proto_reflection_descriptor_database.cc index 6907d97bd5e..25b720aee0a 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.cc +++ b/test/cpp/util/proto_reflection_descriptor_database.cc @@ -298,7 +298,7 @@ void ProtoReflectionDescriptorDatabase::AddFileFromResponse( const std::shared_ptr ProtoReflectionDescriptorDatabase::GetStream() { - if (stream_ == nullptr) { + if (!stream_) { stream_ = stub_->ServerReflectionInfo(&ctx_); } return stream_; From b31a9a0900463fb29c6a3c9cbcfc038292eda6d5 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 16 Jun 2016 07:50:20 +0000 Subject: [PATCH 1129/1894] Include for PRIuPTR. Not clear why this is needed. --- test/cpp/end2end/async_end2end_test.cc | 1 + test/cpp/interop/interop_client.cc | 7 +++---- test/cpp/qps/driver.cc | 1 + 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/cpp/end2end/async_end2end_test.cc b/test/cpp/end2end/async_end2end_test.cc index fc96ea56f03..6c7eae53a40 100644 --- a/test/cpp/end2end/async_end2end_test.cc +++ b/test/cpp/end2end/async_end2end_test.cc @@ -31,6 +31,7 @@ * */ +#include #include #include diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index 0bf1fd6f737..5772060a591 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -31,12 +31,10 @@ * */ -#include "test/cpp/interop/interop_client.h" - -#include - +#include #include #include +#include #include #include @@ -51,6 +49,7 @@ #include "src/proto/grpc/testing/messages.grpc.pb.h" #include "src/proto/grpc/testing/test.grpc.pb.h" #include "test/cpp/interop/client_helper.h" +#include "test/cpp/interop/interop_client.h" namespace grpc { namespace testing { diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 83dbdc3e59e..08bf0458832 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -31,6 +31,7 @@ * */ +#include #include #include #include From a9e62c2ddbcbe15c95880e08ac794708a25985a2 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 16 Jun 2016 02:05:45 -0700 Subject: [PATCH 1130/1894] no ccache --- tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile b/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile index 1e43e6b25c8..679c342c422 100644 --- a/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile +++ b/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile @@ -68,12 +68,12 @@ RUN apt-get update && apt-get install -y time && apt-get clean RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean # Prepare ccache -RUN ln -s /usr/bin/ccache /usr/local/bin/gcc -RUN ln -s /usr/bin/ccache /usr/local/bin/g++ -RUN ln -s /usr/bin/ccache /usr/local/bin/cc -RUN ln -s /usr/bin/ccache /usr/local/bin/c++ -RUN ln -s /usr/bin/ccache /usr/local/bin/clang -RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ +#RUN ln -s /usr/bin/ccache /usr/local/bin/gcc +#RUN ln -s /usr/bin/ccache /usr/local/bin/g++ +#RUN ln -s /usr/bin/ccache /usr/local/bin/cc +#RUN ln -s /usr/bin/ccache /usr/local/bin/c++ +#RUN ln -s /usr/bin/ccache /usr/local/bin/clang +#RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ #====================== # Zookeeper dependencies From 8b79fdef7a1407abe40372191593e34e456c35bf Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 16 Jun 2016 02:12:31 -0700 Subject: [PATCH 1131/1894] Disable ccache for clang-3.4 on Ubuntu 14.04 as this is not currently working. Disabling it allows clang-3.4 to run C/C++ on docker --- templates/tools/dockerfile/run_tests_addons.include | 7 +------ .../tools/dockerfile/run_tests_addons_nocache.include | 6 ++++++ .../test/cxx_ubuntu1404_x64/Dockerfile.template | 3 +-- tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile | 8 -------- 4 files changed, 8 insertions(+), 16 deletions(-) create mode 100644 templates/tools/dockerfile/run_tests_addons_nocache.include diff --git a/templates/tools/dockerfile/run_tests_addons.include b/templates/tools/dockerfile/run_tests_addons.include index 27ac67f5d8f..3f0a1899c5a 100644 --- a/templates/tools/dockerfile/run_tests_addons.include +++ b/templates/tools/dockerfile/run_tests_addons.include @@ -1,7 +1,2 @@ <%include file="ccache_setup.include"/> -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev - -RUN mkdir /var/local/jenkins +<%include file="run_tests_addons_nocache.include"/> \ No newline at end of file diff --git a/templates/tools/dockerfile/run_tests_addons_nocache.include b/templates/tools/dockerfile/run_tests_addons_nocache.include new file mode 100644 index 00000000000..242a1acfb3a --- /dev/null +++ b/templates/tools/dockerfile/run_tests_addons_nocache.include @@ -0,0 +1,6 @@ +#====================== +# Zookeeper dependencies +# TODO(jtattermusch): is zookeeper still needed? +RUN apt-get install -y libzookeeper-mt-dev + +RUN mkdir /var/local/jenkins diff --git a/templates/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile.template b/templates/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile.template index fbed53930b6..4950a82d2d7 100644 --- a/templates/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile.template +++ b/templates/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile.template @@ -33,7 +33,6 @@ <%include file="../../apt_get_basic.include"/> <%include file="../../cxx_deps.include"/> - <%include file="../../run_tests_addons.include"/> + <%include file="../../run_tests_addons_nocache.include"/> # Define the default command. CMD ["bash"] - \ No newline at end of file diff --git a/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile b/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile index 679c342c422..5982c9783e0 100644 --- a/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile +++ b/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile @@ -67,14 +67,6 @@ RUN apt-get update && apt-get install -y time && apt-get clean # C++ dependencies RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean -# Prepare ccache -#RUN ln -s /usr/bin/ccache /usr/local/bin/gcc -#RUN ln -s /usr/bin/ccache /usr/local/bin/g++ -#RUN ln -s /usr/bin/ccache /usr/local/bin/cc -#RUN ln -s /usr/bin/ccache /usr/local/bin/c++ -#RUN ln -s /usr/bin/ccache /usr/local/bin/clang -#RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ - #====================== # Zookeeper dependencies # TODO(jtattermusch): is zookeeper still needed? From b8916aa22fe1d2c1163986b834f5bd0543476573 Mon Sep 17 00:00:00 2001 From: vjpai Date: Thu, 16 Jun 2016 09:16:00 -0700 Subject: [PATCH 1132/1894] Don't global initialize anything to nullptr --- doc/cpp-style-guide.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/doc/cpp-style-guide.md b/doc/cpp-style-guide.md index 9408c4abd68..0138ceb7371 100644 --- a/doc/cpp-style-guide.md +++ b/doc/cpp-style-guide.md @@ -53,6 +53,12 @@ default capture). Other C++ functional features such as (../include/grpc++/impl/codegen/config.h). Instead, pointers should be checked for validity using their implicit conversion to `bool`. In other words, use `if (p)` rather than `if (p != nullptr)` +- Do not initialize global/static pointer variables to `nullptr`. Just let + the compiler implicitly initialize them to `nullptr` (which it will + definitely do). The reason is that `nullptr` is an actual object in + our implementation rather than just a constant pointer value, so + static/global constructors will be called in a potentially + undesirable sequence. - Do not use `final` or `override` as these are not supported by some compilers. Instead use `GRPC_FINAL` and `GRPC_OVERRIDE` . These compile down to the traditional C++ forms for compilers that support From bb2bd6553938ca1a192414084e5800178f67c4a3 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 16 Jun 2016 09:29:53 -0700 Subject: [PATCH 1133/1894] Clang format --- src/core/lib/surface/completion_queue.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index de2b674d0e0..03de97bc2b5 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -93,12 +93,12 @@ static grpc_completion_queue *g_freelist; int grpc_cq_pluck_trace; int grpc_cq_event_timeout_trace; -#define GRPC_SURFACE_TRACE_RETURNED_EVENT(cq, event) \ - if (grpc_api_trace && \ - (grpc_cq_pluck_trace || (event)->type != GRPC_QUEUE_TIMEOUT)) { \ - char *_ev = grpc_event_string(event); \ - gpr_log(GPR_INFO, "RETURN_EVENT[%p]: %s", cq, _ev); \ - gpr_free(_ev); \ +#define GRPC_SURFACE_TRACE_RETURNED_EVENT(cq, event) \ + if (grpc_api_trace && \ + (grpc_cq_pluck_trace || (event)->type != GRPC_QUEUE_TIMEOUT)) { \ + char *_ev = grpc_event_string(event); \ + gpr_log(GPR_INFO, "RETURN_EVENT[%p]: %s", cq, _ev); \ + gpr_free(_ev); \ } From a7cc90055e91b1bda2e916c5884b5305c7f73b53 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Thu, 16 Jun 2016 09:59:51 -0700 Subject: [PATCH 1134/1894] Modified route_guide sample app to show RPC log Modified the screens to show meaningful information about RPC progress. When you click on each tab the screen now shows log messages that previously only went to the debug console. --- .../Misc/Base.lproj/Main.storyboard | 108 ++++++++++-------- .../objective-c/route_guide/ViewControllers.m | 41 +++++++ 2 files changed, 102 insertions(+), 47 deletions(-) diff --git a/examples/objective-c/route_guide/Misc/Base.lproj/Main.storyboard b/examples/objective-c/route_guide/Misc/Base.lproj/Main.storyboard index 9bf9498d62c..306320f7d89 100644 --- a/examples/objective-c/route_guide/Misc/Base.lproj/Main.storyboard +++ b/examples/objective-c/route_guide/Misc/Base.lproj/Main.storyboard @@ -1,7 +1,8 @@ - + - + + @@ -16,33 +17,35 @@ - - - - - + + + + - + @@ -56,29 +59,35 @@ - + + + - - - - + + + + + @@ -117,29 +126,32 @@ - - - - - + + + + + @@ -157,29 +169,31 @@ - - - - - + + + + diff --git a/examples/objective-c/route_guide/ViewControllers.m b/examples/objective-c/route_guide/ViewControllers.m index e32978240b6..b916a4ee0c4 100644 --- a/examples/objective-c/route_guide/ViewControllers.m +++ b/examples/objective-c/route_guide/ViewControllers.m @@ -83,6 +83,7 @@ static NSString * const kHostAddress = @"localhost:50051"; @interface GetFeatureViewController : UIViewController { RTGRouteGuide *service; } +@property (weak, nonatomic) IBOutlet UILabel *output_label; @end @implementation GetFeatureViewController @@ -90,10 +91,16 @@ static NSString * const kHostAddress = @"localhost:50051"; - (void)execRequest { void (^handler)(RTGFeature *response, NSError *error) = ^(RTGFeature *response, NSError *error) { if (response.name.length) { + NSString *str =[NSString stringWithFormat:@"%@\nFound feature called %@ at %@.", self.output_label.text, response.location, response.name]; + self.output_label.text = str; NSLog(@"Found feature called %@ at %@.", response.name, response.location); } else if (response) { + NSString *str =[NSString stringWithFormat:@"%@\nFound no features at %@", self.output_label.text,response.location]; + self.output_label.text = str; NSLog(@"Found no features at %@", response.location); } else { + NSString *str =[NSString stringWithFormat:@"%@\nRPC error: %@", self.output_label.text, error]; + self.output_label.text = str; NSLog(@"RPC error: %@", error); } }; @@ -116,6 +123,9 @@ static NSString * const kHostAddress = @"localhost:50051"; } - (void)viewDidAppear:(BOOL)animated { + self.output_label.text = @"RPC log:"; + self.output_label.numberOfLines = 0; + self.output_label.font = [UIFont fontWithName:@"Helvetica Neue" size:8.0]; [self execRequest]; } @@ -131,6 +141,7 @@ static NSString * const kHostAddress = @"localhost:50051"; @interface ListFeaturesViewController : UIViewController { RTGRouteGuide *service; } +@property (weak, nonatomic) IBOutlet UILabel *output_label; @end @@ -147,8 +158,12 @@ static NSString * const kHostAddress = @"localhost:50051"; [service listFeaturesWithRequest:rectangle eventHandler:^(BOOL done, RTGFeature *response, NSError *error) { if (response) { + NSString *str =[NSString stringWithFormat:@"%@\nFound feature at %@ called %@.", self.output_label.text, response.location, response.name]; + self.output_label.text = str; NSLog(@"Found feature at %@ called %@.", response.location, response.name); } else if (error) { + NSString *str =[NSString stringWithFormat:@"%@\nRPC error: %@", self.output_label.text, error]; + self.output_label.text = str; NSLog(@"RPC error: %@", error); } }]; @@ -161,6 +176,9 @@ static NSString * const kHostAddress = @"localhost:50051"; } - (void)viewDidAppear:(BOOL)animated { + self.output_label.text = @"RPC log:"; + self.output_label.numberOfLines = 0; + self.output_label.font = [UIFont fontWithName:@"Helvetica Neue" size:8.0]; [self execRequest]; } @@ -177,6 +195,7 @@ static NSString * const kHostAddress = @"localhost:50051"; @interface RecordRouteViewController : UIViewController { RTGRouteGuide *service; } +@property (weak, nonatomic) IBOutlet UILabel *output_label; @end @@ -192,6 +211,8 @@ static NSString * const kHostAddress = @"localhost:50051"; RTGPoint *location = [RTGPoint message]; location.longitude = [((NSNumber *) feature[@"location"][@"longitude"]) intValue]; location.latitude = [((NSNumber *) feature[@"location"][@"latitude"]) intValue]; + NSString *str =[NSString stringWithFormat:@"%@\nVisiting point %@", self.output_label.text, location]; + self.output_label.text = str; NSLog(@"Visiting point %@", location); return location; }]; @@ -199,11 +220,19 @@ static NSString * const kHostAddress = @"localhost:50051"; [service recordRouteWithRequestsWriter:locations handler:^(RTGRouteSummary *response, NSError *error) { if (response) { + NSString *str =[NSString stringWithFormat: + @"%@\nFinished trip with %i points\nPassed %i features\n" + "Travelled %i meters\nIt took %i seconds", + self.output_label.text, response.pointCount, response.featureCount, + response.distance, response.elapsedTime]; + self.output_label.text = str; NSLog(@"Finished trip with %i points", response.pointCount); NSLog(@"Passed %i features", response.featureCount); NSLog(@"Travelled %i meters", response.distance); NSLog(@"It took %i seconds", response.elapsedTime); } else { + NSString *str =[NSString stringWithFormat:@"%@\nRPC error: %@", self.output_label.text, error]; + self.output_label.text = str; NSLog(@"RPC error: %@", error); } }]; @@ -216,6 +245,9 @@ static NSString * const kHostAddress = @"localhost:50051"; } - (void)viewDidAppear:(BOOL)animated { + self.output_label.text = @"RPC log:"; + self.output_label.numberOfLines = 0; + self.output_label.font = [UIFont fontWithName:@"Helvetica Neue" size:8.0]; [self execRequest]; } @@ -231,6 +263,7 @@ static NSString * const kHostAddress = @"localhost:50051"; @interface RouteChatViewController : UIViewController { RTGRouteGuide *service; } +@property (weak, nonatomic) IBOutlet UILabel *output_label; @end @@ -249,8 +282,13 @@ static NSString * const kHostAddress = @"localhost:50051"; [service routeChatWithRequestsWriter:notesWriter eventHandler:^(BOOL done, RTGRouteNote *note, NSError *error) { if (note) { + NSString *str =[NSString stringWithFormat:@"%@\nGot message %@ at %@", + self.output_label.text, note.message, note.location]; + self.output_label.text = str; NSLog(@"Got message %@ at %@", note.message, note.location); } else if (error) { + NSString *str =[NSString stringWithFormat:@"%@\nRPC error: %@", self.output_label.text, error]; + self.output_label.text = str; NSLog(@"RPC error: %@", error); } if (done) { @@ -266,6 +304,9 @@ static NSString * const kHostAddress = @"localhost:50051"; } - (void)viewDidAppear:(BOOL)animated { + self.output_label.text = @"RPC log:"; + self.output_label.numberOfLines = 0; + self.output_label.font = [UIFont fontWithName:@"Helvetica Neue" size:8.0]; [self execRequest]; } From 3eba9075ef612f83c363868c24d106580ab25223 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Thu, 16 Jun 2016 10:15:32 -0700 Subject: [PATCH 1135/1894] using camelCase for output_label now --- .../Misc/Base.lproj/Main.storyboard | 8 +- .../objective-c/route_guide/ViewControllers.m | 74 +++++++++---------- 2 files changed, 41 insertions(+), 41 deletions(-) diff --git a/examples/objective-c/route_guide/Misc/Base.lproj/Main.storyboard b/examples/objective-c/route_guide/Misc/Base.lproj/Main.storyboard index 306320f7d89..5ca9f4642b9 100644 --- a/examples/objective-c/route_guide/Misc/Base.lproj/Main.storyboard +++ b/examples/objective-c/route_guide/Misc/Base.lproj/Main.storyboard @@ -40,7 +40,7 @@ - + @@ -86,7 +86,7 @@ - + @@ -150,7 +150,7 @@ - + @@ -192,7 +192,7 @@ - + diff --git a/examples/objective-c/route_guide/ViewControllers.m b/examples/objective-c/route_guide/ViewControllers.m index b916a4ee0c4..1e84c334728 100644 --- a/examples/objective-c/route_guide/ViewControllers.m +++ b/examples/objective-c/route_guide/ViewControllers.m @@ -37,7 +37,7 @@ #import #import -static NSString * const kHostAddress = @"localhost:50051"; +static NSString * const kHostAddress = @"192.168.1.120:50051"; /** Category to override RTGPoint's description. */ @interface RTGPoint (Description) @@ -83,7 +83,7 @@ static NSString * const kHostAddress = @"localhost:50051"; @interface GetFeatureViewController : UIViewController { RTGRouteGuide *service; } -@property (weak, nonatomic) IBOutlet UILabel *output_label; +@property (weak, nonatomic) IBOutlet UILabel *outputLabel; @end @implementation GetFeatureViewController @@ -91,16 +91,16 @@ static NSString * const kHostAddress = @"localhost:50051"; - (void)execRequest { void (^handler)(RTGFeature *response, NSError *error) = ^(RTGFeature *response, NSError *error) { if (response.name.length) { - NSString *str =[NSString stringWithFormat:@"%@\nFound feature called %@ at %@.", self.output_label.text, response.location, response.name]; - self.output_label.text = str; + NSString *str =[NSString stringWithFormat:@"%@\nFound feature called %@ at %@.", self.outputLabel.text, response.location, response.name]; + self.outputLabel.text = str; NSLog(@"Found feature called %@ at %@.", response.name, response.location); } else if (response) { - NSString *str =[NSString stringWithFormat:@"%@\nFound no features at %@", self.output_label.text,response.location]; - self.output_label.text = str; + NSString *str =[NSString stringWithFormat:@"%@\nFound no features at %@", self.outputLabel.text,response.location]; + self.outputLabel.text = str; NSLog(@"Found no features at %@", response.location); } else { - NSString *str =[NSString stringWithFormat:@"%@\nRPC error: %@", self.output_label.text, error]; - self.output_label.text = str; + NSString *str =[NSString stringWithFormat:@"%@\nRPC error: %@", self.outputLabel.text, error]; + self.outputLabel.text = str; NSLog(@"RPC error: %@", error); } }; @@ -123,9 +123,9 @@ static NSString * const kHostAddress = @"localhost:50051"; } - (void)viewDidAppear:(BOOL)animated { - self.output_label.text = @"RPC log:"; - self.output_label.numberOfLines = 0; - self.output_label.font = [UIFont fontWithName:@"Helvetica Neue" size:8.0]; + self.outputLabel.text = @"RPC log:"; + self.outputLabel.numberOfLines = 0; + self.outputLabel.font = [UIFont fontWithName:@"Helvetica Neue" size:8.0]; [self execRequest]; } @@ -141,7 +141,7 @@ static NSString * const kHostAddress = @"localhost:50051"; @interface ListFeaturesViewController : UIViewController { RTGRouteGuide *service; } -@property (weak, nonatomic) IBOutlet UILabel *output_label; +@property (weak, nonatomic) IBOutlet UILabel *outputLabel; @end @@ -158,12 +158,12 @@ static NSString * const kHostAddress = @"localhost:50051"; [service listFeaturesWithRequest:rectangle eventHandler:^(BOOL done, RTGFeature *response, NSError *error) { if (response) { - NSString *str =[NSString stringWithFormat:@"%@\nFound feature at %@ called %@.", self.output_label.text, response.location, response.name]; - self.output_label.text = str; + NSString *str =[NSString stringWithFormat:@"%@\nFound feature at %@ called %@.", self.outputLabel.text, response.location, response.name]; + self.outputLabel.text = str; NSLog(@"Found feature at %@ called %@.", response.location, response.name); } else if (error) { - NSString *str =[NSString stringWithFormat:@"%@\nRPC error: %@", self.output_label.text, error]; - self.output_label.text = str; + NSString *str =[NSString stringWithFormat:@"%@\nRPC error: %@", self.outputLabel.text, error]; + self.outputLabel.text = str; NSLog(@"RPC error: %@", error); } }]; @@ -176,9 +176,9 @@ static NSString * const kHostAddress = @"localhost:50051"; } - (void)viewDidAppear:(BOOL)animated { - self.output_label.text = @"RPC log:"; - self.output_label.numberOfLines = 0; - self.output_label.font = [UIFont fontWithName:@"Helvetica Neue" size:8.0]; + self.outputLabel.text = @"RPC log:"; + self.outputLabel.numberOfLines = 0; + self.outputLabel.font = [UIFont fontWithName:@"Helvetica Neue" size:8.0]; [self execRequest]; } @@ -195,7 +195,7 @@ static NSString * const kHostAddress = @"localhost:50051"; @interface RecordRouteViewController : UIViewController { RTGRouteGuide *service; } -@property (weak, nonatomic) IBOutlet UILabel *output_label; +@property (weak, nonatomic) IBOutlet UILabel *outputLabel; @end @@ -211,8 +211,8 @@ static NSString * const kHostAddress = @"localhost:50051"; RTGPoint *location = [RTGPoint message]; location.longitude = [((NSNumber *) feature[@"location"][@"longitude"]) intValue]; location.latitude = [((NSNumber *) feature[@"location"][@"latitude"]) intValue]; - NSString *str =[NSString stringWithFormat:@"%@\nVisiting point %@", self.output_label.text, location]; - self.output_label.text = str; + NSString *str =[NSString stringWithFormat:@"%@\nVisiting point %@", self.outputLabel.text, location]; + self.outputLabel.text = str; NSLog(@"Visiting point %@", location); return location; }]; @@ -223,16 +223,16 @@ static NSString * const kHostAddress = @"localhost:50051"; NSString *str =[NSString stringWithFormat: @"%@\nFinished trip with %i points\nPassed %i features\n" "Travelled %i meters\nIt took %i seconds", - self.output_label.text, response.pointCount, response.featureCount, + self.outputLabel.text, response.pointCount, response.featureCount, response.distance, response.elapsedTime]; - self.output_label.text = str; + self.outputLabel.text = str; NSLog(@"Finished trip with %i points", response.pointCount); NSLog(@"Passed %i features", response.featureCount); NSLog(@"Travelled %i meters", response.distance); NSLog(@"It took %i seconds", response.elapsedTime); } else { - NSString *str =[NSString stringWithFormat:@"%@\nRPC error: %@", self.output_label.text, error]; - self.output_label.text = str; + NSString *str =[NSString stringWithFormat:@"%@\nRPC error: %@", self.outputLabel.text, error]; + self.outputLabel.text = str; NSLog(@"RPC error: %@", error); } }]; @@ -245,9 +245,9 @@ static NSString * const kHostAddress = @"localhost:50051"; } - (void)viewDidAppear:(BOOL)animated { - self.output_label.text = @"RPC log:"; - self.output_label.numberOfLines = 0; - self.output_label.font = [UIFont fontWithName:@"Helvetica Neue" size:8.0]; + self.outputLabel.text = @"RPC log:"; + self.outputLabel.numberOfLines = 0; + self.outputLabel.font = [UIFont fontWithName:@"Helvetica Neue" size:8.0]; [self execRequest]; } @@ -263,7 +263,7 @@ static NSString * const kHostAddress = @"localhost:50051"; @interface RouteChatViewController : UIViewController { RTGRouteGuide *service; } -@property (weak, nonatomic) IBOutlet UILabel *output_label; +@property (weak, nonatomic) IBOutlet UILabel *outputLabel; @end @@ -283,12 +283,12 @@ static NSString * const kHostAddress = @"localhost:50051"; eventHandler:^(BOOL done, RTGRouteNote *note, NSError *error) { if (note) { NSString *str =[NSString stringWithFormat:@"%@\nGot message %@ at %@", - self.output_label.text, note.message, note.location]; - self.output_label.text = str; + self.outputLabel.text, note.message, note.location]; + self.outputLabel.text = str; NSLog(@"Got message %@ at %@", note.message, note.location); } else if (error) { - NSString *str =[NSString stringWithFormat:@"%@\nRPC error: %@", self.output_label.text, error]; - self.output_label.text = str; + NSString *str =[NSString stringWithFormat:@"%@\nRPC error: %@", self.outputLabel.text, error]; + self.outputLabel.text = str; NSLog(@"RPC error: %@", error); } if (done) { @@ -304,9 +304,9 @@ static NSString * const kHostAddress = @"localhost:50051"; } - (void)viewDidAppear:(BOOL)animated { - self.output_label.text = @"RPC log:"; - self.output_label.numberOfLines = 0; - self.output_label.font = [UIFont fontWithName:@"Helvetica Neue" size:8.0]; + self.outputLabel.text = @"RPC log:"; + self.outputLabel.numberOfLines = 0; + self.outputLabel.font = [UIFont fontWithName:@"Helvetica Neue" size:8.0]; [self execRequest]; } From 05998dc6939bb7ad4230775bb5ac87696ae9e29b Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 16 Jun 2016 10:16:44 -0700 Subject: [PATCH 1136/1894] More formatting fixes --- src/core/lib/surface/completion_queue.c | 1 - 1 file changed, 1 deletion(-) diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index 03de97bc2b5..d70f1721463 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -101,7 +101,6 @@ int grpc_cq_event_timeout_trace; gpr_free(_ev); \ } - static void on_pollset_shutdown_done(grpc_exec_ctx *exec_ctx, void *cc, bool success); From 4412c85a1079f2ac55a9a27641076ca34c1a2c62 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Thu, 16 Jun 2016 10:37:51 -0700 Subject: [PATCH 1137/1894] crud removal --- examples/objective-c/route_guide/ViewControllers.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/objective-c/route_guide/ViewControllers.m b/examples/objective-c/route_guide/ViewControllers.m index 1e84c334728..5fd411e3ba6 100644 --- a/examples/objective-c/route_guide/ViewControllers.m +++ b/examples/objective-c/route_guide/ViewControllers.m @@ -37,7 +37,7 @@ #import #import -static NSString * const kHostAddress = @"192.168.1.120:50051"; +static NSString * const kHostAddress = @"localhost:50051"; /** Category to override RTGPoint's description. */ @interface RTGPoint (Description) From 00f41c1eed57f84a2efdfbd96a59dd00d523cde0 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 16 Jun 2016 12:46:52 -0700 Subject: [PATCH 1138/1894] Add comment about new trace flags --- src/core/lib/surface/completion_queue.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/lib/surface/completion_queue.h b/src/core/lib/surface/completion_queue.h index 108445b28f1..e4018695e27 100644 --- a/src/core/lib/surface/completion_queue.h +++ b/src/core/lib/surface/completion_queue.h @@ -39,6 +39,8 @@ #include #include "src/core/lib/iomgr/pollset.h" +/* These trace flags default to 1. The corresponding lines are only traced + if grpc_api_trace is also truthy */ extern int grpc_cq_pluck_trace; extern int grpc_cq_event_timeout_trace; From 3e1379a35d9af751cad6046c82cf5b0bfc782fa7 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Thu, 16 Jun 2016 21:11:06 +0000 Subject: [PATCH 1139/1894] grpc.__all__ definition --- src/python/grpcio/grpc/__init__.py | 46 ++++++++++ src/python/grpcio/tests/tests.json | 1 + src/python/grpcio/tests/unit/_api_test.py | 90 +++++++++++++++++++ .../tests/unit/_from_grpc_import_star.py | 38 ++++++++ 4 files changed, 175 insertions(+) create mode 100644 src/python/grpcio/tests/unit/_api_test.py create mode 100644 src/python/grpcio/tests/unit/_from_grpc_import_star.py diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py index 2fbb9f45e6f..1cc0c3a2505 100644 --- a/src/python/grpcio/grpc/__init__.py +++ b/src/python/grpcio/grpc/__init__.py @@ -1193,3 +1193,49 @@ def server(generic_rpc_handlers, thread_pool, options=None): """ from grpc import _server return _server.Server(generic_rpc_handlers, thread_pool) + + +################################### __all__ ################################# + + +__all__ = ( + 'FutureTimeoutError', + 'FutureCancelledError', + 'Future', + 'ChannelConnectivity', + 'StatusCode', + 'RpcError', + 'RpcContext', + 'Call', + 'ChannelCredentials', + 'CallCredentials', + 'AuthMetadataContext', + 'AuthMetadataPluginCallback', + 'AuthMetadataPlugin', + 'ServerCredentials', + 'UnaryUnaryMultiCallable', + 'UnaryStreamMultiCallable', + 'StreamUnaryMultiCallable', + 'StreamStreamMultiCallable', + 'Channel', + 'ServicerContext', + 'RpcMethodHandler', + 'HandlerCallDetails', + 'GenericRpcHandler', + 'Server', + 'unary_unary_rpc_method_handler', + 'unary_stream_rpc_method_handler', + 'stream_unary_rpc_method_handler', + 'stream_stream_rpc_method_handler', + 'method_handlers_generic_handler', + 'ssl_channel_credentials', + 'metadata_call_credentials', + 'access_token_call_credentials', + 'composite_call_credentials', + 'composite_channel_credentials', + 'ssl_server_credentials', + 'channel_ready_future', + 'insecure_channel', + 'secure_channel', + 'server', +) diff --git a/src/python/grpcio/tests/tests.json b/src/python/grpcio/tests/tests.json index e64d2d04a78..c13031fa8ec 100644 --- a/src/python/grpcio/tests/tests.json +++ b/src/python/grpcio/tests/tests.json @@ -1,4 +1,5 @@ [ + "_api_test.AllTest", "_auth_test.AccessTokenCallCredentialsTest", "_auth_test.GoogleCallCredentialsTest", "_base_interface_test.AsyncEasyTest", diff --git a/src/python/grpcio/tests/unit/_api_test.py b/src/python/grpcio/tests/unit/_api_test.py new file mode 100644 index 00000000000..1d724c3ed4f --- /dev/null +++ b/src/python/grpcio/tests/unit/_api_test.py @@ -0,0 +1,90 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""Test of gRPC Python's application-layer API.""" + +import unittest + +import six + +from tests.unit import _from_grpc_import_star + + +class AllTest(unittest.TestCase): + + def testAll(self): + expected_grpc_code_elements = ( + 'FutureTimeoutError', + 'FutureCancelledError', + 'Future', + 'ChannelConnectivity', + 'StatusCode', + 'RpcError', + 'RpcContext', + 'Call', + 'ChannelCredentials', + 'CallCredentials', + 'AuthMetadataContext', + 'AuthMetadataPluginCallback', + 'AuthMetadataPlugin', + 'ServerCredentials', + 'UnaryUnaryMultiCallable', + 'UnaryStreamMultiCallable', + 'StreamUnaryMultiCallable', + 'StreamStreamMultiCallable', + 'Channel', + 'ServicerContext', + 'RpcMethodHandler', + 'HandlerCallDetails', + 'GenericRpcHandler', + 'Server', + 'unary_unary_rpc_method_handler', + 'unary_stream_rpc_method_handler', + 'stream_unary_rpc_method_handler', + 'stream_stream_rpc_method_handler', + 'method_handlers_generic_handler', + 'ssl_channel_credentials', + 'metadata_call_credentials', + 'access_token_call_credentials', + 'composite_call_credentials', + 'composite_channel_credentials', + 'ssl_server_credentials', + 'channel_ready_future', + 'insecure_channel', + 'secure_channel', + 'server', + ) + + six.assertCountEqual( + self, expected_grpc_code_elements, + _from_grpc_import_star.GRPC_ELEMENTS) + + +if __name__ == '__main__': + unittest.main(verbosity=2) diff --git a/src/python/grpcio/tests/unit/_from_grpc_import_star.py b/src/python/grpcio/tests/unit/_from_grpc_import_star.py new file mode 100644 index 00000000000..78d2fb7dc56 --- /dev/null +++ b/src/python/grpcio/tests/unit/_from_grpc_import_star.py @@ -0,0 +1,38 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +_BEFORE_IMPORT = tuple(globals()) + +from grpc import * + +_AFTER_IMPORT = tuple(globals()) + +GRPC_ELEMENTS = tuple( + element for element in _AFTER_IMPORT + if element not in _BEFORE_IMPORT and element != '_BEFORE_IMPORT') From 474a574ba7ebd425d140c31b264c39b8e48d303d Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 15 Jun 2016 16:17:56 -0700 Subject: [PATCH 1140/1894] update readme.md --- src/csharp/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/csharp/README.md b/src/csharp/README.md index 201c5ab0b56..acfb5ec6ddb 100644 --- a/src/csharp/README.md +++ b/src/csharp/README.md @@ -100,6 +100,12 @@ different languages. tools/run_tests/run_tests.py -l csharp ``` +ON .NET CORE SUPPORT +------------------ + +We are committed to providing full support for [.NET Core](https://dotnet.github.io/) in near future, +but currently, the support is for .NET Core is experimental/work-in-progress. + DOCUMENTATION ------------- - the gRPC C# reference documentation is available online at [grpc.io][] From 5444bed32f1405ebb53b0c37d3b3246d097ace89 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Thu, 16 Jun 2016 23:37:12 +0000 Subject: [PATCH 1141/1894] Rename FATAL_FAILURE SHUTDOWN --- src/python/grpcio/grpc/__init__.py | 4 ++-- src/python/grpcio/grpc/_adapter/_types.py | 2 +- src/python/grpcio/grpc/_common.py | 4 ++-- .../grpcio/grpc/_cython/_cygrpc/records.pyx.pxi | 2 +- src/python/grpcio/grpc/beta/interfaces.py | 3 +++ src/python/grpcio/tests/tests.json | 2 ++ src/python/grpcio/tests/unit/_api_test.py | 14 ++++++++++++++ .../tests/unit/beta/_connectivity_channel_test.py | 10 ++++++++++ 8 files changed, 35 insertions(+), 6 deletions(-) diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py index 1cc0c3a2505..28adca37723 100644 --- a/src/python/grpcio/grpc/__init__.py +++ b/src/python/grpcio/grpc/__init__.py @@ -212,14 +212,14 @@ class ChannelConnectivity(enum.Enum): READY: The channel is ready to conduct RPCs. TRANSIENT_FAILURE: The channel has seen a failure from which it expects to recover. - FATAL_FAILURE: The channel has seen a failure from which it cannot recover. + SHUTDOWN: The channel has seen a failure from which it cannot recover. """ IDLE = (_cygrpc.ConnectivityState.idle, 'idle') CONNECTING = (_cygrpc.ConnectivityState.connecting, 'connecting') READY = (_cygrpc.ConnectivityState.ready, 'ready') TRANSIENT_FAILURE = ( _cygrpc.ConnectivityState.transient_failure, 'transient failure') - FATAL_FAILURE = (_cygrpc.ConnectivityState.fatal_failure, 'fatal failure') + SHUTDOWN = (_cygrpc.ConnectivityState.shutdown, 'shutdown') @enum.unique diff --git a/src/python/grpcio/grpc/_adapter/_types.py b/src/python/grpcio/grpc/_adapter/_types.py index f8405949d43..b7cc6fbbb59 100644 --- a/src/python/grpcio/grpc/_adapter/_types.py +++ b/src/python/grpcio/grpc/_adapter/_types.py @@ -114,7 +114,7 @@ class ConnectivityState(enum.IntEnum): CONNECTING = cygrpc.ConnectivityState.connecting READY = cygrpc.ConnectivityState.ready TRANSIENT_FAILURE = cygrpc.ConnectivityState.transient_failure - FATAL_FAILURE = cygrpc.ConnectivityState.fatal_failure + FATAL_FAILURE = cygrpc.ConnectivityState.shutdown class Status(collections.namedtuple( diff --git a/src/python/grpcio/grpc/_common.py b/src/python/grpcio/grpc/_common.py index 1fd1704f18b..f351bea9e39 100644 --- a/src/python/grpcio/grpc/_common.py +++ b/src/python/grpcio/grpc/_common.py @@ -46,8 +46,8 @@ CYGRPC_CONNECTIVITY_STATE_TO_CHANNEL_CONNECTIVITY = { cygrpc.ConnectivityState.ready: grpc.ChannelConnectivity.READY, cygrpc.ConnectivityState.transient_failure: grpc.ChannelConnectivity.TRANSIENT_FAILURE, - cygrpc.ConnectivityState.fatal_failure: - grpc.ChannelConnectivity.FATAL_FAILURE, + cygrpc.ConnectivityState.shutdown: + grpc.ChannelConnectivity.SHUTDOWN, } CYGRPC_STATUS_CODE_TO_STATUS_CODE = { diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi index 2e52953c0a3..0055d0d3a28 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi @@ -33,7 +33,7 @@ class ConnectivityState: connecting = GRPC_CHANNEL_CONNECTING ready = GRPC_CHANNEL_READY transient_failure = GRPC_CHANNEL_TRANSIENT_FAILURE - fatal_failure = GRPC_CHANNEL_SHUTDOWN + shutdown = GRPC_CHANNEL_SHUTDOWN class ChannelArgKey: diff --git a/src/python/grpcio/grpc/beta/interfaces.py b/src/python/grpcio/grpc/beta/interfaces.py index 4343b6c4b52..90f6bbbfcc1 100644 --- a/src/python/grpcio/grpc/beta/interfaces.py +++ b/src/python/grpcio/grpc/beta/interfaces.py @@ -36,6 +36,9 @@ import six import grpc ChannelConnectivity = grpc.ChannelConnectivity +# FATAL_FAILURE was a Beta-API name for SHUTDOWN +ChannelConnectivity.FATAL_FAILURE = ChannelConnectivity.SHUTDOWN + StatusCode = grpc.StatusCode diff --git a/src/python/grpcio/tests/tests.json b/src/python/grpcio/tests/tests.json index c13031fa8ec..782dc00cdc8 100644 --- a/src/python/grpcio/tests/tests.json +++ b/src/python/grpcio/tests/tests.json @@ -1,5 +1,6 @@ [ "_api_test.AllTest", + "_api_test.ChannelConnectivityTest", "_auth_test.AccessTokenCallCredentialsTest", "_auth_test.GoogleCallCredentialsTest", "_base_interface_test.AsyncEasyTest", @@ -13,6 +14,7 @@ "_channel_ready_future_test.ChannelReadyFutureTest", "_channel_test.ChannelTest", "_connectivity_channel_test.ChannelConnectivityTest", + "_connectivity_channel_test.ConnectivityStatesTest", "_core_over_links_base_interface_test.AsyncEasyTest", "_core_over_links_base_interface_test.AsyncPeasyTest", "_core_over_links_base_interface_test.SyncEasyTest", diff --git a/src/python/grpcio/tests/unit/_api_test.py b/src/python/grpcio/tests/unit/_api_test.py index 1d724c3ed4f..1501ec2a047 100644 --- a/src/python/grpcio/tests/unit/_api_test.py +++ b/src/python/grpcio/tests/unit/_api_test.py @@ -33,6 +33,8 @@ import unittest import six +import grpc + from tests.unit import _from_grpc_import_star @@ -86,5 +88,17 @@ class AllTest(unittest.TestCase): _from_grpc_import_star.GRPC_ELEMENTS) +class ChannelConnectivityTest(unittest.TestCase): + + def testChannelConnectivity(self): + self.assertSequenceEqual( + (grpc.ChannelConnectivity.IDLE, + grpc.ChannelConnectivity.CONNECTING, + grpc.ChannelConnectivity.READY, + grpc.ChannelConnectivity.TRANSIENT_FAILURE, + grpc.ChannelConnectivity.SHUTDOWN,), + tuple(grpc.ChannelConnectivity)) + + if __name__ == '__main__': unittest.main(verbosity=2) diff --git a/src/python/grpcio/tests/unit/beta/_connectivity_channel_test.py b/src/python/grpcio/tests/unit/beta/_connectivity_channel_test.py index 5dc87206394..488f7d7141b 100644 --- a/src/python/grpcio/tests/unit/beta/_connectivity_channel_test.py +++ b/src/python/grpcio/tests/unit/beta/_connectivity_channel_test.py @@ -187,5 +187,15 @@ class ChannelConnectivityTest(unittest.TestCase): server_completion_queue_thread.join() +class ConnectivityStatesTest(unittest.TestCase): + + def testBetaConnectivityStates(self): + self.assertIsNotNone(interfaces.ChannelConnectivity.IDLE) + self.assertIsNotNone(interfaces.ChannelConnectivity.CONNECTING) + self.assertIsNotNone(interfaces.ChannelConnectivity.READY) + self.assertIsNotNone(interfaces.ChannelConnectivity.TRANSIENT_FAILURE) + self.assertIsNotNone(interfaces.ChannelConnectivity.FATAL_FAILURE) + + if __name__ == '__main__': unittest.main(verbosity=2) From bef286f034497ae5b391e00a1046e7c178d4ad32 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Thu, 16 Jun 2016 16:39:04 -0700 Subject: [PATCH 1142/1894] Wait for channel to be connected for each client --- src/python/grpcio/tests/qps/benchmark_client.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/python/grpcio/tests/qps/benchmark_client.py b/src/python/grpcio/tests/qps/benchmark_client.py index 1b100bb168d..080281415d4 100644 --- a/src/python/grpcio/tests/qps/benchmark_client.py +++ b/src/python/grpcio/tests/qps/benchmark_client.py @@ -30,11 +30,13 @@ """Defines test client behaviors (UNARY/STREAMING) (SYNC/ASYNC).""" import abc +import threading import time from concurrent import futures from six.moves import queue +import grpc from grpc.beta import implementations from grpc.framework.interfaces.face import face from src.proto.grpc.testing import messages_pb2 @@ -62,6 +64,13 @@ class BenchmarkClient: else: channel = implementations.insecure_channel(host, port) + connected_event = threading.Event() + def wait_for_ready(connectivity): + if connectivity == grpc.ChannelConnectivity.READY: + connected_event.set() + channel.subscribe(wait_for_ready, try_to_connect=True) + connected_event.wait() + if config.payload_config.WhichOneof('payload') == 'simple_params': self._generic = False self._stub = services_pb2.beta_create_BenchmarkService_stub(channel) From 34f1b555aef416917a38cdbbb4191d388c6a4c83 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 16 Jun 2016 16:51:20 -0700 Subject: [PATCH 1143/1894] better test_case flag help formating --- test/cpp/interop/client.cc | 96 ++++++++++++++++++-------------------- 1 file changed, 46 insertions(+), 50 deletions(-) diff --git a/test/cpp/interop/client.cc b/test/cpp/interop/client.cc index c7d081100e2..e8ae6ee5723 100644 --- a/test/cpp/interop/client.cc +++ b/test/cpp/interop/client.cc @@ -54,34 +54,31 @@ DEFINE_string(server_host, "127.0.0.1", "Server host to connect to"); DEFINE_string(server_host_override, "foo.test.google.fr", "Override the server host which is sent in HTTP header"); DEFINE_string(test_case, "large_unary", - "Configure different test cases. Valid options are: " - "empty_unary : empty (zero bytes) request and response; " - "large_unary : single request and (large) response; " - - "client_compressed_unary : single compressed request; " - "server_compressed_unary : single compressed response; " - - "client_streaming : request streaming with single response; " - "server_streaming : single request with response streaming; " + "Configure different test cases. Valid options are:\n\n" + "all : all test cases;\n" + "cancel_after_begin : cancel stream after starting it;\n" + "cancel_after_first_response: cancel on first response;\n" "client_compressed_streaming : compressed request streaming with " - "single response; " + "client_compressed_unary : single compressed request;\n" + "client_streaming : request streaming with single response;\n" + "compute_engine_creds: large_unary with compute engine auth;\n" + "custom_metadata: server will echo custom metadata;\n" + "empty_stream : bi-di stream with no request/response;\n" + "empty_unary : empty (zero bytes) request and response;\n" + "half_duplex : half-duplex streaming;\n" + "jwt_token_creds: large_unary with JWT token auth;\n" + "large_unary : single request and (large) response;\n" + "oauth2_auth_token: raw oauth2 access token auth;\n" + "per_rpc_creds: raw oauth2 access token on a single rpc;\n" + "ping_pong : full-duplex streaming;\n" + "response streaming;\n" "server_compressed_streaming : single request with compressed " - "response streaming; " - "slow_consumer : single request with response; " - " streaming with slow client consumer; " - "half_duplex : half-duplex streaming; " - "ping_pong : full-duplex streaming; " - "cancel_after_begin : cancel stream after starting it; " - "cancel_after_first_response: cancel on first response; " - "timeout_on_sleeping_server: deadline exceeds on stream; " - "empty_stream : bi-di stream with no request/response; " - "compute_engine_creds: large_unary with compute engine auth; " - "jwt_token_creds: large_unary with JWT token auth; " - "oauth2_auth_token: raw oauth2 access token auth; " - "per_rpc_creds: raw oauth2 access token on a single rpc; " - "status_code_and_message: verify status code & message; " - "custom_metadata: server will echo custom metadata;" - "all : all of above."); + "server_compressed_unary : single compressed response;\n" + "server_streaming : single request with response streaming;\n" + "slow_consumer : single request with response streaming with " + "slow client consumer;\n" + "status_code_and_message: verify status code & message;\n" + "timeout_on_sleeping_server: deadline exceeds on stream;\n"); DEFINE_string(default_service_account, "", "Email of GCE default service account"); DEFINE_string(service_account_key_file, "", @@ -178,30 +175,29 @@ int main(int argc, char** argv) { } // compute_engine_creds only runs in GCE. } else { - const char* testcases[] = - { "all", - "cancel_after_begin", - "cancel_after_first_response", - "client_compressed_streaming", - "client_compressed_unary", - "client_streaming", - "compute_engine_creds", - "custom_metadata", - "empty_stream", - "empty_unary", - "half_duplex", - "jwt_token_creds", - "large_unary", - "oauth2_auth_token", - "oauth2_auth_token", - "per_rpc_creds", - "per_rpc_creds", - "ping_pong", - "server_compressed_streaming", - "server_compressed_unary", - "server_streaming", - "status_code_and_message", - "timeout_on_sleeping_server"}; + const char* testcases[] = {"all", + "cancel_after_begin", + "cancel_after_first_response", + "client_compressed_streaming", + "client_compressed_unary", + "client_streaming", + "compute_engine_creds", + "custom_metadata", + "empty_stream", + "empty_unary", + "half_duplex", + "jwt_token_creds", + "large_unary", + "oauth2_auth_token", + "oauth2_auth_token", + "per_rpc_creds", + "per_rpc_creds", + "ping_pong", + "server_compressed_streaming", + "server_compressed_unary", + "server_streaming", + "status_code_and_message", + "timeout_on_sleeping_server"}; char* joined_testcases = gpr_strjoin_sep(testcases, GPR_ARRAY_SIZE(testcases), "\n", NULL); From 560875239e4ce883b9c02d0bf003ce07d430154b Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 16 Jun 2016 16:52:11 -0700 Subject: [PATCH 1144/1894] c++ client & server changes to bring code up to spec --- test/cpp/interop/interop_client.cc | 337 ++++++++++++++++------------- test/cpp/interop/interop_server.cc | 86 ++++---- 2 files changed, 227 insertions(+), 196 deletions(-) diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index e5d37514028..509e8b97aba 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -68,12 +68,12 @@ const int kLargeResponseSize = 314159; void NoopChecks(const InteropClientContextInspector& inspector, const SimpleRequest* request, const SimpleResponse* response) {} -void CompressionChecks(const InteropClientContextInspector& inspector, - const SimpleRequest* request, - const SimpleResponse* response) { +void UnaryCompressionChecks(const InteropClientContextInspector& inspector, + const SimpleRequest* request, + const SimpleResponse* response) { const grpc_compression_algorithm received_compression = inspector.GetCallCompressionAlgorithm(); - if (request->request_compressed_response()) { + if (request->response_compressed().value()) { if (received_compression == GRPC_COMPRESS_NONE) { // Requested some compression, got NONE. This is an error. gpr_log(GPR_ERROR, @@ -81,11 +81,7 @@ void CompressionChecks(const InteropClientContextInspector& inspector, "from server."); abort(); } - if (request->response_type() == PayloadType::COMPRESSABLE) { - // requested compression and compressable response => results should - // always be compressed. - GPR_ASSERT(inspector.GetMessageFlags() & GRPC_WRITE_INTERNAL_COMPRESS); - } + GPR_ASSERT(inspector.GetMessageFlags() & GRPC_WRITE_INTERNAL_COMPRESS); } else { // Didn't request compression -> make sure the response is uncompressed GPR_ASSERT(!(inspector.GetMessageFlags() & GRPC_WRITE_INTERNAL_COMPRESS)); @@ -190,11 +186,16 @@ bool InteropClient::PerformLargeUnary(SimpleRequest* request, CheckerFn custom_checks_fn) { ClientContext context; InteropClientContextInspector inspector(context); - // If the request doesn't already specify the response type, default to - // COMPRESSABLE. request->set_response_size(kLargeResponseSize); grpc::string payload(kLargeRequestSize, '\0'); request->mutable_payload()->set_body(payload.c_str(), kLargeRequestSize); + if (request->has_expect_compressed()) { + if (request->expect_compressed().value()) { + context.set_compression_algorithm(GRPC_COMPRESS_GZIP); + } else { + context.set_compression_algorithm(GRPC_COMPRESS_NONE); + } + } Status s = serviceStub_.Get()->UnaryCall(&context, *request, response); if (!AssertStatusOk(s)) { @@ -204,16 +205,8 @@ bool InteropClient::PerformLargeUnary(SimpleRequest* request, custom_checks_fn(inspector, request, response); // Payload related checks. - GPR_ASSERT(response->payload().type() == request->response_type()); - switch (response->payload().type()) { - case PayloadType::COMPRESSABLE: - GPR_ASSERT(response->payload().body() == - grpc::string(kLargeResponseSize, '\0')); - break; - default: - GPR_ASSERT(false); - } - + GPR_ASSERT(response->payload().body() == + grpc::string(kLargeResponseSize, '\0')); return true; } @@ -226,7 +219,6 @@ bool InteropClient::DoComputeEngineCreds( SimpleResponse response; request.set_fill_username(true); request.set_fill_oauth_scope(true); - request.set_response_type(PayloadType::COMPRESSABLE); if (!PerformLargeUnary(&request, &response)) { return false; @@ -300,7 +292,6 @@ bool InteropClient::DoJwtTokenCreds(const grpc::string& username) { SimpleRequest request; SimpleResponse response; request.set_fill_username(true); - request.set_response_type(PayloadType::COMPRESSABLE); if (!PerformLargeUnary(&request, &response)) { return false; @@ -316,7 +307,6 @@ bool InteropClient::DoLargeUnary() { gpr_log(GPR_DEBUG, "Sending a large unary rpc..."); SimpleRequest request; SimpleResponse response; - request.set_response_type(PayloadType::COMPRESSABLE); if (!PerformLargeUnary(&request, &response)) { return false; } @@ -325,62 +315,72 @@ bool InteropClient::DoLargeUnary() { } bool InteropClient::DoClientCompressedUnary() { - const bool expect_compression[] = {false, true}; - const PayloadType payload_types[] = {COMPRESSABLE}; - for (size_t i = 0; i < GPR_ARRAY_SIZE(payload_types); i++) { - for (size_t j = 0; j < GPR_ARRAY_SIZE(expect_compression); j++) { - char* log_suffix; - gpr_asprintf(&log_suffix, "(compression=%s; payload=%s)", - expect_compression[j] ? "true" : "false", - PayloadType_Name(payload_types[i]).c_str()); - - gpr_log(GPR_DEBUG, "Sending compressed unary request %s.", log_suffix); - SimpleRequest request; - SimpleResponse response; - request.set_response_type(payload_types[i]); - request.set_expect_compressed_request(expect_compression[j]); - - if (!PerformLargeUnary(&request, &response, CompressionChecks)) { - gpr_log(GPR_ERROR, "Compressed unary request failed %s", log_suffix); - gpr_free(log_suffix); - return false; - } - - gpr_log(GPR_DEBUG, "Compressed unary request failed %s", log_suffix); + // Probing for compression-checks support. + ClientContext probe_context; + SimpleRequest probe_req; + SimpleResponse probe_res; + + probe_context.set_compression_algorithm(GRPC_COMPRESS_NONE); + probe_req.mutable_expect_compressed()->set_value(true); // lies! + + probe_req.set_response_size(kLargeResponseSize); + probe_req.mutable_payload()->set_body(grpc::string(kLargeRequestSize, '\0')); + + gpr_log(GPR_DEBUG, "Sending probe for compressed unary request."); + const Status s = + serviceStub_.Get()->UnaryCall(&probe_context, probe_req, &probe_res); + if (s.error_code() != grpc::StatusCode::INVALID_ARGUMENT) { + // The server isn't able to evaluate incoming compression, making the rest + // of this test moot. + gpr_log(GPR_DEBUG, "Compressed unary request probe failed %s"); + return false; + } + gpr_log(GPR_DEBUG, "Compressed unary request probe succeeded. Proceeding."); + + const std::vector compressions = {true, false}; + for (size_t i = 0; i < compressions.size(); i++) { + char* log_suffix; + gpr_asprintf(&log_suffix, "(compression=%s)", + compressions[i] ? "true" : "false"); + + gpr_log(GPR_DEBUG, "Sending compressed unary request %s.", log_suffix); + SimpleRequest request; + SimpleResponse response; + request.mutable_expect_compressed()->set_value(compressions[i]); + if (!PerformLargeUnary(&request, &response, UnaryCompressionChecks)) { + gpr_log(GPR_ERROR, "Compressed unary request failed %s", log_suffix); gpr_free(log_suffix); + return false; } + + gpr_log(GPR_DEBUG, "Compressed unary request failed %s", log_suffix); + gpr_free(log_suffix); } return true; } bool InteropClient::DoServerCompressedUnary() { - const bool request_compression[] = {false, true}; - const PayloadType payload_types[] = {COMPRESSABLE}; - for (size_t i = 0; i < GPR_ARRAY_SIZE(payload_types); i++) { - for (size_t j = 0; j < GPR_ARRAY_SIZE(request_compression); j++) { - char* log_suffix; - gpr_asprintf(&log_suffix, "(compression=%s; payload=%s)", - request_compression[j] ? "true" : "false", - PayloadType_Name(payload_types[i]).c_str()); - - gpr_log(GPR_DEBUG, "Sending unary request for compressed response %s.", - log_suffix); - SimpleRequest request; - SimpleResponse response; - request.set_response_type(payload_types[i]); - request.set_request_compressed_response(request_compression[j]); - - if (!PerformLargeUnary(&request, &response, CompressionChecks)) { - gpr_log(GPR_ERROR, "Request for compressed unary failed %s", - log_suffix); - gpr_free(log_suffix); - return false; - } - - gpr_log(GPR_DEBUG, "Request for compressed unary failed %s", log_suffix); + const std::vector compressions = {true, false}; + for (size_t i = 0; i < compressions.size(); i++) { + char* log_suffix; + gpr_asprintf(&log_suffix, "(compression=%s)", + compressions[i] ? "true" : "false"); + + gpr_log(GPR_DEBUG, "Sending unary request for compressed response %s.", + log_suffix); + SimpleRequest request; + SimpleResponse response; + request.mutable_response_compressed()->set_value(compressions[i]); + + if (!PerformLargeUnary(&request, &response, UnaryCompressionChecks)) { + gpr_log(GPR_ERROR, "Request for compressed unary failed %s", log_suffix); gpr_free(log_suffix); + return false; } + + gpr_log(GPR_DEBUG, "Request for compressed unary failed %s", log_suffix); + gpr_free(log_suffix); } return true; @@ -407,7 +407,7 @@ bool InteropClient::DoRequestStreaming() { serviceStub_.Get()->StreamingInputCall(&context, &response)); int aggregated_payload_size = 0; - for (unsigned int i = 0; i < request_stream_sizes.size(); ++i) { + for (size_t i = 0; i < request_stream_sizes.size(); ++i) { Payload* payload = request.mutable_payload(); payload->set_body(grpc::string(request_stream_sizes[i], '\0')); if (!stream->Write(request)) { @@ -416,7 +416,7 @@ bool InteropClient::DoRequestStreaming() { } aggregated_payload_size += request_stream_sizes[i]; } - stream->WritesDone(); + GPR_ASSERT(stream->WritesDone()); Status s = stream->Finish(); if (!AssertStatusOk(s)) { @@ -467,94 +467,128 @@ bool InteropClient::DoResponseStreaming() { } bool InteropClient::DoClientCompressedStreaming() { - // XXX - return false; + // Probing for compression-checks support. + ClientContext probe_context; + StreamingInputCallRequest probe_req; + StreamingInputCallResponse probe_res; + + probe_context.set_compression_algorithm(GRPC_COMPRESS_NONE); + probe_req.mutable_expect_compressed()->set_value(true); // lies! + probe_req.mutable_payload()->set_body(grpc::string(27182, '\0')); + + gpr_log(GPR_DEBUG, "Sending probe for compressed streaming request."); + + std::unique_ptr> probe_stream( + serviceStub_.Get()->StreamingInputCall(&probe_context, &probe_res)); + + if (!probe_stream->Write(probe_req)) { + gpr_log(GPR_ERROR, "%s(): stream->Write() failed", __func__); + return TransientFailureOrAbort(); + } + Status s = probe_stream->Finish(); + if (s.error_code() != grpc::StatusCode::INVALID_ARGUMENT) { + // The server isn't able to evaluate incoming compression, making the rest + // of this test moot. + gpr_log(GPR_DEBUG, "Compressed streaming request probe failed %s"); + return false; + } + gpr_log(GPR_DEBUG, + "Compressed streaming request probe succeeded. Proceeding."); + + ClientContext context; + StreamingInputCallRequest request; + StreamingInputCallResponse response; + + context.set_compression_algorithm(GRPC_COMPRESS_GZIP); + std::unique_ptr> stream( + serviceStub_.Get()->StreamingInputCall(&context, &response)); + + request.mutable_payload()->set_body(grpc::string(27182, '\0')); + request.mutable_expect_compressed()->set_value(true); + gpr_log(GPR_DEBUG, "Sending streaming request with compression enabled"); + if (!stream->Write(request)) { + gpr_log(GPR_ERROR, "%s(): stream->Write() failed", __func__); + return TransientFailureOrAbort(); + } + + WriteOptions wopts; + wopts.set_no_compression(); + request.mutable_payload()->set_body(grpc::string(45904, '\0')); + request.mutable_expect_compressed()->set_value(false); + gpr_log(GPR_DEBUG, "Sending streaming request with compression disabled"); + if (!stream->Write(request, wopts)) { + gpr_log(GPR_ERROR, "%s(): stream->Write() failed", __func__); + return TransientFailureOrAbort(); + } + GPR_ASSERT(stream->WritesDone()); + + s = stream->Finish(); + if (!AssertStatusOk(s)) { + return false; + } + + return true; } bool InteropClient::DoServerCompressedStreaming() { - const bool request_compression[] = {false, true}; - const PayloadType payload_types[] = {COMPRESSABLE}; - const std::vector response_stream_sizes = {31415, 58979}; + const std::vector compressions = {true, false}; + const std::vector sizes = {31415, 92653}; - for (size_t i = 0; i < GPR_ARRAY_SIZE(payload_types); i++) { - for (size_t j = 0; j < GPR_ARRAY_SIZE(request_compression); j++) { - ClientContext context; - InteropClientContextInspector inspector(context); - StreamingOutputCallRequest request; + ClientContext context; + InteropClientContextInspector inspector(context); + StreamingOutputCallRequest request; + for (size_t i = 0; i < compressions.size(); i++) { + for (size_t j = 0; j < sizes.size(); j++) { char* log_suffix; - gpr_asprintf(&log_suffix, "(compression=%s; payload=%s)", - request_compression[j] ? "true" : "false", - PayloadType_Name(payload_types[i]).c_str()); - - gpr_log(GPR_DEBUG, "Receiving response streaming rpc %s.", log_suffix); - - request.set_response_type(payload_types[i]); - request.set_request_compressed_response(request_compression[j]); - - for (size_t k = 0; k < response_stream_sizes.size(); ++k) { - ResponseParameters* response_parameter = - request.add_response_parameters(); - response_parameter->set_size(response_stream_sizes[k]); - } - StreamingOutputCallResponse response; - - std::unique_ptr> stream( - serviceStub_.Get()->StreamingOutputCall(&context, request)); - - size_t k = 0; - while (stream->Read(&response)) { - // Payload related checks. - GPR_ASSERT(response.payload().type() == request.response_type()); - switch (response.payload().type()) { - case PayloadType::COMPRESSABLE: - GPR_ASSERT(response.payload().body() == - grpc::string(response_stream_sizes[k], '\0')); - break; - default: - GPR_ASSERT(false); - } - - // Compression related checks. - if (request.request_compressed_response()) { - GPR_ASSERT(inspector.GetCallCompressionAlgorithm() > - GRPC_COMPRESS_NONE); - if (request.response_type() == PayloadType::COMPRESSABLE) { - // requested compression and compressable response => results should - // always be compressed. - GPR_ASSERT(inspector.GetMessageFlags() & - GRPC_WRITE_INTERNAL_COMPRESS); - } - } else { - // requested *no* compression. - GPR_ASSERT( - !(inspector.GetMessageFlags() & GRPC_WRITE_INTERNAL_COMPRESS)); - } - - ++k; - } - - gpr_log(GPR_DEBUG, "Response streaming done %s.", log_suffix); + gpr_asprintf(&log_suffix, "(compression=%s; size=%d)", + compressions[i] ? "true" : "false", sizes[j]); + + gpr_log(GPR_DEBUG, "Sending request streaming rpc %s.", log_suffix); gpr_free(log_suffix); - if (k < response_stream_sizes.size()) { - // stream->Read() failed before reading all the expected messages. This - // is most likely due to a connection failure. - gpr_log(GPR_ERROR, - "DoServerCompressedStreaming(): Responses read (k=%d) is " - "less than the expected messages (i.e " - "response_stream_sizes.size()/2 (%d)). (i=%d, j=%d)", - k, response_stream_sizes.size(), i, j); - return TransientFailureOrAbort(); - } - - Status s = stream->Finish(); - if (!AssertStatusOk(s)) { - return false; - } + ResponseParameters* const response_parameter = + request.add_response_parameters(); + response_parameter->mutable_compressed()->set_value(compressions[i]); + response_parameter->set_size(sizes[j]); } } + std::unique_ptr> stream( + serviceStub_.Get()->StreamingOutputCall(&context, request)); + + size_t k = 0; + StreamingOutputCallResponse response; + while (stream->Read(&response)) { + // Payload size checks. + GPR_ASSERT(response.payload().body() == + grpc::string(request.response_parameters(k).size(), '\0')); + + // Compression checks. + GPR_ASSERT(request.response_parameters(k).has_compressed()); + if (request.response_parameters(k).compressed().value()) { + GPR_ASSERT(inspector.GetCallCompressionAlgorithm() > GRPC_COMPRESS_NONE); + GPR_ASSERT(inspector.GetMessageFlags() & GRPC_WRITE_INTERNAL_COMPRESS); + } else { + // requested *no* compression. + GPR_ASSERT(!(inspector.GetMessageFlags() & GRPC_WRITE_INTERNAL_COMPRESS)); + } + ++k; + } + + if (k < response_stream_sizes.size()) { + // stream->Read() failed before reading all the expected messages. This + // is most likely due to a connection failure. + gpr_log(GPR_ERROR, + "%s(): Responses read (k=%d) is " + "less than the expected number of messages (%d)).", + __func__, k, response_stream_sizes.size()); + return TransientFailureOrAbort(); + } + Status s = stream->Finish(); + if (!AssertStatusOk(s)) { + return false; + } return true; } @@ -655,7 +689,6 @@ bool InteropClient::DoPingPong() { stream(serviceStub_.Get()->FullDuplexCall(&context)); StreamingOutputCallRequest request; - request.set_response_type(PayloadType::COMPRESSABLE); ResponseParameters* response_parameter = request.add_response_parameters(); Payload* payload = request.mutable_payload(); StreamingOutputCallResponse response; @@ -722,7 +755,6 @@ bool InteropClient::DoCancelAfterFirstResponse() { stream(serviceStub_.Get()->FullDuplexCall(&context)); StreamingOutputCallRequest request; - request.set_response_type(PayloadType::COMPRESSABLE); ResponseParameters* response_parameter = request.add_response_parameters(); response_parameter->set_size(31415); request.mutable_payload()->set_body(grpc::string(27182, '\0')); @@ -862,7 +894,6 @@ bool InteropClient::DoCustomMetadata() { stream(serviceStub_.Get()->FullDuplexCall(&context)); StreamingOutputCallRequest request; - request.set_response_type(PayloadType::COMPRESSABLE); ResponseParameters* response_parameter = request.add_response_parameters(); response_parameter->set_size(kLargeResponseSize); grpc::string payload(kLargeRequestSize, '\0'); diff --git a/test/cpp/interop/interop_server.cc b/test/cpp/interop/interop_server.cc index b328f478fa0..8c5c0e24e19 100644 --- a/test/cpp/interop/interop_server.cc +++ b/test/cpp/interop/interop_server.cc @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without @@ -65,10 +65,10 @@ using grpc::ServerCredentials; using grpc::ServerReader; using grpc::ServerReaderWriter; using grpc::ServerWriter; +using grpc::WriteOptions; using grpc::SslServerCredentialsOptions; using grpc::testing::InteropServerContextInspector; using grpc::testing::Payload; -using grpc::testing::PayloadType; using grpc::testing::SimpleRequest; using grpc::testing::SimpleResponse; using grpc::testing::StreamingInputCallRequest; @@ -110,50 +110,30 @@ void MaybeEchoMetadata(ServerContext* context) { } } -bool SetPayload(PayloadType response_type, int size, Payload* payload) { - payload->set_type(response_type); - switch (response_type) { - case PayloadType::COMPRESSABLE: { - std::unique_ptr body(new char[size]()); - payload->set_body(body.get(), size); - } break; - default: - return false; - } +bool SetPayload(int size, Payload* payload) { + std::unique_ptr body(new char[size]()); + payload->set_body(body.get(), size); return true; } -template -void SetResponseCompression(ServerContext* context, - const RequestType& request) { - if (request.request_compressed_response()) { - // Any level would do, let's go for HIGH because we are overachievers. - context->set_compression_level(GRPC_COMPRESS_LEVEL_HIGH); - } -} - -template bool CheckExpectedCompression(const ServerContext& context, - const RequestType& request) { + const bool compression_expected) { const InteropServerContextInspector inspector(context); const grpc_compression_algorithm received_compression = inspector.GetCallCompressionAlgorithm(); - if (request.expect_compressed_request()) { + if (compression_expected) { if (received_compression == GRPC_COMPRESS_NONE) { // Expected some compression, got NONE. This is an error. gpr_log(GPR_ERROR, - "Failure: Expected compression but got uncompressed request " - "from client."); + "Expected compression but got uncompressed request from client."); return false; } - if (request.payload_type() == PayloadType::COMPRESSABLE) { - if (!(inspector.GetMessageFlags() & GRPC_WRITE_INTERNAL_COMPRESS)) { - gpr_log(GPR_ERROR, - "Failure: Requested compression in a compressable request, but " - "compression bit in message flags not set."); - return false; - } + if (!(inspector.GetMessageFlags() & GRPC_WRITE_INTERNAL_COMPRESS)) { + gpr_log(GPR_ERROR, + "Failure: Requested compression in a compressable request, but " + "compression bit in message flags not set."); + return false; } } else { // Didn't expect compression -> make sure the request is uncompressed @@ -178,14 +158,24 @@ class TestServiceImpl : public TestService::Service { Status UnaryCall(ServerContext* context, const SimpleRequest* request, SimpleResponse* response) { MaybeEchoMetadata(context); - SetResponseCompression(context, *request); - if (!CheckExpectedCompression(*context, *request)) { + if (request->has_response_compressed()) { + const bool compression_requested = request->response_compressed().value(); + gpr_log(GPR_DEBUG, "Request for compression (%s) present for %s", + compression_requested ? "enabled" : "disabled", __func__); + if (compression_requested) { + // Any level would do, let's go for HIGH because we are overachievers. + context->set_compression_level(GRPC_COMPRESS_LEVEL_HIGH); + } else { + context->set_compression_level(GRPC_COMPRESS_LEVEL_NONE); + } + } + if (!CheckExpectedCompression(*context, + request->expect_compressed().value())) { return Status(grpc::StatusCode::INVALID_ARGUMENT, "Compressed request expectation not met."); } if (request->response_size() > 0) { - if (!SetPayload(request->response_type(), request->response_size(), - response->mutable_payload())) { + if (!SetPayload(request->response_size(), response->mutable_payload())) { return Status(grpc::StatusCode::INVALID_ARGUMENT, "Error creating payload."); } @@ -203,18 +193,28 @@ class TestServiceImpl : public TestService::Service { Status StreamingOutputCall( ServerContext* context, const StreamingOutputCallRequest* request, ServerWriter* writer) { - SetResponseCompression(context, *request); StreamingOutputCallResponse response; + // Compress by default. Disabled on a per-message basis. + context->set_compression_level(GRPC_COMPRESS_LEVEL_HIGH); bool write_success = true; for (int i = 0; write_success && i < request->response_parameters_size(); i++) { - if (!SetPayload(request->response_type(), - request->response_parameters(i).size(), + if (!SetPayload(request->response_parameters(i).size(), response.mutable_payload())) { return Status(grpc::StatusCode::INVALID_ARGUMENT, "Error creating payload."); } - write_success = writer->Write(response); + WriteOptions wopts; + if (request->response_parameters(i).has_compressed()) { + const bool compression_requested = + request->response_parameters(i).compressed().value(); + gpr_log(GPR_DEBUG, "Request for compression (%s) present for %s", + compression_requested ? "enabled" : "disabled", __func__); + if (!compression_requested) { + wopts.set_no_compression(); + } // else, compression is already enabled via the context. + } + write_success = writer->Write(response, wopts); } if (write_success) { return Status::OK; @@ -229,7 +229,8 @@ class TestServiceImpl : public TestService::Service { StreamingInputCallRequest request; int aggregated_payload_size = 0; while (reader->Read(&request)) { - if (!CheckExpectedCompression(*context, request)) { + if (!CheckExpectedCompression(*context, + request.expect_compressed().value())) { return Status(grpc::StatusCode::INVALID_ARGUMENT, "Compressed request expectation not met."); } @@ -250,7 +251,6 @@ class TestServiceImpl : public TestService::Service { StreamingOutputCallResponse response; bool write_success = true; while (write_success && stream->Read(&request)) { - SetResponseCompression(context, request); if (request.response_parameters_size() != 0) { response.mutable_payload()->set_type(request.payload().type()); response.mutable_payload()->set_body( From 317b8acf995ef3360df4c04ba180355e6b62e59c Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 16 Jun 2016 09:36:11 -0700 Subject: [PATCH 1145/1894] migrate everything to netstandard1.5 --- src/csharp/Grpc.Auth/project.json | 8 ++--- .../Grpc.Core.Tests/AppDomainUnloadTest.cs | 2 +- src/csharp/Grpc.Core.Tests/NUnitMain.cs | 2 +- src/csharp/Grpc.Core.Tests/SanityTest.cs | 3 +- src/csharp/Grpc.Core.Tests/project.json | 15 ++++---- src/csharp/Grpc.Core/GrpcEnvironment.cs | 2 +- .../Grpc.Core/Internal/NativeExtension.cs | 4 +-- src/csharp/Grpc.Core/Internal/PlatformApis.cs | 2 +- src/csharp/Grpc.Core/project.json | 17 ++-------- .../Grpc.Examples.MathClient/project.json | 15 ++++---- .../Grpc.Examples.MathServer/project.json | 15 ++++---- src/csharp/Grpc.Examples.Tests/NUnitMain.cs | 2 +- src/csharp/Grpc.Examples.Tests/project.json | 15 ++++---- src/csharp/Grpc.Examples/project.json | 12 +++---- .../Grpc.HealthCheck.Tests/NUnitMain.cs | 2 +- .../Grpc.HealthCheck.Tests/project.json | 15 ++++---- src/csharp/Grpc.HealthCheck/project.json | 4 +-- .../project.json | 19 +++++++++-- .../project.json | 19 +++++++++-- .../project.json | 19 +++++++++-- .../GeneratedClientTest.cs | 12 ++++--- .../GeneratedServiceBaseTest.cs | 1 - .../Grpc.IntegrationTesting/InteropClient.cs | 32 ++++++++++++++--- .../MetadataCredentialsTest.cs | 21 +++++------- .../Grpc.IntegrationTesting/NUnitMain.cs | 2 +- .../TestCredentials.cs | 2 +- .../Grpc.IntegrationTesting/project.json | 34 +++++++++++++++++-- 27 files changed, 198 insertions(+), 98 deletions(-) diff --git a/src/csharp/Grpc.Auth/project.json b/src/csharp/Grpc.Auth/project.json index 25579982a9d..57539f2976b 100644 --- a/src/csharp/Grpc.Auth/project.json +++ b/src/csharp/Grpc.Auth/project.json @@ -18,14 +18,14 @@ }, "frameworks": { "net45": { }, - "dotnet54": { + "netstandard1.5": { "imports": [ "net45" ], "dependencies": { - "Microsoft.CSharp": "4.0.1-beta-23516", - "Microsoft.NETCore.Portable.Compatibility": "1.0.1-beta-23516", - "System.Threading.Tasks": "4.0.11-beta-23516" + "Microsoft.NETCore.Portable.Compatibility": "1.0.1-rc2-24027", + "NETStandard.Library": "1.5.0-rc2-24027", + "System.Threading.Tasks": "4.0.11-rc2-24027" } } } diff --git a/src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs b/src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs index d2c641cf2f8..064bc13cabb 100644 --- a/src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs +++ b/src/csharp/Grpc.Core.Tests/AppDomainUnloadTest.cs @@ -40,7 +40,7 @@ namespace Grpc.Core.Tests { public class AppDomainUnloadTest { -#if DOTNET5_4 +#if NETSTANDARD1_5 [Test] [Ignore("Not supported for CoreCLR")] public void AppDomainUnloadHookCanCleanupAbandonedCall() diff --git a/src/csharp/Grpc.Core.Tests/NUnitMain.cs b/src/csharp/Grpc.Core.Tests/NUnitMain.cs index 9c1d7bf3c8a..24a9f846d10 100644 --- a/src/csharp/Grpc.Core.Tests/NUnitMain.cs +++ b/src/csharp/Grpc.Core.Tests/NUnitMain.cs @@ -49,7 +49,7 @@ namespace Grpc.Core.Tests { // Make logger immune to NUnit capturing stdout and stderr to workaround https://github.com/nunit/nunit/issues/1406. GrpcEnvironment.SetLogger(new TextWriterLogger(Console.Error)); -#if DOTNET5_4 +#if NETSTANDARD1_5 return new AutoRun(typeof(NUnitMain).GetTypeInfo().Assembly).Execute(args, new ExtendedTextWrapper(Console.Out), Console.In); #else return new AutoRun().Execute(args); diff --git a/src/csharp/Grpc.Core.Tests/SanityTest.cs b/src/csharp/Grpc.Core.Tests/SanityTest.cs index 9e995d40c03..501992c5695 100644 --- a/src/csharp/Grpc.Core.Tests/SanityTest.cs +++ b/src/csharp/Grpc.Core.Tests/SanityTest.cs @@ -45,7 +45,8 @@ namespace Grpc.Core.Tests { public class SanityTest { -#if !DOTNET5_4 + // TODO: make sanity test work for CoreCLR as well +#if !NETSTANDARD1_5 /// /// Because we depend on a native library, sometimes when things go wrong, the /// entire NUnit test process crashes. To be able to track down problems better, diff --git a/src/csharp/Grpc.Core.Tests/project.json b/src/csharp/Grpc.Core.Tests/project.json index dc90e04ccfb..06718043142 100644 --- a/src/csharp/Grpc.Core.Tests/project.json +++ b/src/csharp/Grpc.Core.Tests/project.json @@ -10,23 +10,26 @@ "emitEntryPoint": true }, "dependencies": { - "Grpc.Core": "0.14.0-anexperiment", + "Grpc.Core": { + "version": "0.0.1", + "taget": "project" + }, "Newtonsoft.Json": "8.0.3", "NUnit": "3.2.0", "NUnitLite": "3.2.0-*" }, "frameworks": { "net45": { }, - "dotnet54": { + "netstandard1.5": { "imports": [ "portable-net45" ], "dependencies": { - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.0.0-rc2-23931" - } + "NETStandard.Library": "1.5.0-rc2-24027" } } + }, + "runtimes": { + "win7-x64": { } } } diff --git a/src/csharp/Grpc.Core/GrpcEnvironment.cs b/src/csharp/Grpc.Core/GrpcEnvironment.cs index 37f9dce7c2f..f4642c91577 100644 --- a/src/csharp/Grpc.Core/GrpcEnvironment.cs +++ b/src/csharp/Grpc.Core/GrpcEnvironment.cs @@ -353,7 +353,7 @@ namespace Grpc.Core if (!hooksRegistered) { // TODO(jtattermusch): register shutdownhooks for CoreCLR as well -#if !DOTNET5_4 +#if !NETSTANDARD1_5 AppDomain.CurrentDomain.ProcessExit += ShutdownHookHandler; AppDomain.CurrentDomain.DomainUnload += ShutdownHookHandler; diff --git a/src/csharp/Grpc.Core/Internal/NativeExtension.cs b/src/csharp/Grpc.Core/Internal/NativeExtension.cs index 6c219621df5..a6d79258162 100644 --- a/src/csharp/Grpc.Core/Internal/NativeExtension.cs +++ b/src/csharp/Grpc.Core/Internal/NativeExtension.cs @@ -117,7 +117,7 @@ namespace Grpc.Core.Internal private static string GetAssemblyPath() { var assembly = typeof(NativeExtension).GetTypeInfo().Assembly; -#if DOTNET5_4 +#if NETSTANDARD1_5 // Assembly.EscapedCodeBase does not exist under CoreCLR, but assemblies imported from a nuget package // don't seem to be shadowed by DNX-based projects at all. return assembly.Location; @@ -136,7 +136,7 @@ namespace Grpc.Core.Internal #endif } -#if !DOTNET5_4 +#if !NETSTANDARD1_5 private static bool IsFileUri(string uri) { return uri.ToLowerInvariant().StartsWith(Uri.UriSchemeFile); diff --git a/src/csharp/Grpc.Core/Internal/PlatformApis.cs b/src/csharp/Grpc.Core/Internal/PlatformApis.cs index 3331a1f9fac..15391ddc647 100644 --- a/src/csharp/Grpc.Core/Internal/PlatformApis.cs +++ b/src/csharp/Grpc.Core/Internal/PlatformApis.cs @@ -53,7 +53,7 @@ namespace Grpc.Core.Internal static PlatformApis() { -#if DOTNET5_4 +#if NETSTANDARD1_5 isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux); isMacOSX = RuntimeInformation.IsOSPlatform(OSPlatform.OSX); isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows); diff --git a/src/csharp/Grpc.Core/project.json b/src/csharp/Grpc.Core/project.json index a916bbd09ab..b5b7722bba2 100644 --- a/src/csharp/Grpc.Core/project.json +++ b/src/csharp/Grpc.Core/project.json @@ -30,24 +30,13 @@ }, "frameworks": { "net45": { }, - "dotnet54": { + "netstandard1.5": { "imports": [ "portable-net45" ], "dependencies": { - "Microsoft.CSharp": "4.0.1-beta-23516", - "System.Collections": "4.0.11-beta-23516", - "System.Collections.Concurrent": "4.0.11-beta-23516", - "System.Console": "4.0.0-beta-23516", - "System.Linq": "4.0.1-beta-23516", - "System.Threading": "4.0.11-beta-23516", - "System.Threading.Thread": "4.0.0-beta-23516", - "System.Reflection": "4.1.0-beta-23516", - "System.Text.Encoding": "4.0.11-beta-23516", - "System.Text.RegularExpressions": "4.0.11-beta-23516", - "System.IO": "4.0.11-beta-23516", - "System.IO.FileSystem": "4.0.1-beta-23516", - "System.Runtime.InteropServices.RuntimeInformation": "4.0.0-beta-23516" + "NETStandard.Library": "1.5.0-rc2-24027", + "System.Threading.Thread": "4.0.0-rc2-24027" } } } diff --git a/src/csharp/Grpc.Examples.MathClient/project.json b/src/csharp/Grpc.Examples.MathClient/project.json index 4abf8a5e34f..791cd1dcb80 100644 --- a/src/csharp/Grpc.Examples.MathClient/project.json +++ b/src/csharp/Grpc.Examples.MathClient/project.json @@ -10,20 +10,23 @@ "emitEntryPoint": true }, "dependencies": { - "Grpc.Examples": "1.0.0" + "Grpc.Examples": { + "version": "1.0.0", + "taget": "project" + } }, "frameworks": { "net45": { }, - "dotnet54": { + "netstandard1.5": { "imports": [ "portable-net45" ], "dependencies": { - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.0.0-rc2-23931" - } + "NETStandard.Library": "1.5.0-rc2-24027" } } + }, + "runtimes": { + "win7-x64": { } } } diff --git a/src/csharp/Grpc.Examples.MathServer/project.json b/src/csharp/Grpc.Examples.MathServer/project.json index 4abf8a5e34f..791cd1dcb80 100644 --- a/src/csharp/Grpc.Examples.MathServer/project.json +++ b/src/csharp/Grpc.Examples.MathServer/project.json @@ -10,20 +10,23 @@ "emitEntryPoint": true }, "dependencies": { - "Grpc.Examples": "1.0.0" + "Grpc.Examples": { + "version": "1.0.0", + "taget": "project" + } }, "frameworks": { "net45": { }, - "dotnet54": { + "netstandard1.5": { "imports": [ "portable-net45" ], "dependencies": { - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.0.0-rc2-23931" - } + "NETStandard.Library": "1.5.0-rc2-24027" } } + }, + "runtimes": { + "win7-x64": { } } } diff --git a/src/csharp/Grpc.Examples.Tests/NUnitMain.cs b/src/csharp/Grpc.Examples.Tests/NUnitMain.cs index ea87802766b..1a522cab932 100644 --- a/src/csharp/Grpc.Examples.Tests/NUnitMain.cs +++ b/src/csharp/Grpc.Examples.Tests/NUnitMain.cs @@ -49,7 +49,7 @@ namespace Grpc.Examples.Tests { // Make logger immune to NUnit capturing stdout and stderr to workaround https://github.com/nunit/nunit/issues/1406. GrpcEnvironment.SetLogger(new TextWriterLogger(Console.Error)); -#if DOTNET5_4 +#if NETSTANDARD1_5 return new AutoRun(typeof(NUnitMain).GetTypeInfo().Assembly).Execute(args, new ExtendedTextWrapper(Console.Out), Console.In); #else return new AutoRun().Execute(args); diff --git a/src/csharp/Grpc.Examples.Tests/project.json b/src/csharp/Grpc.Examples.Tests/project.json index bd74812c153..6ef440e27dd 100644 --- a/src/csharp/Grpc.Examples.Tests/project.json +++ b/src/csharp/Grpc.Examples.Tests/project.json @@ -10,22 +10,25 @@ "emitEntryPoint": true }, "dependencies": { - "Grpc.Examples": "1.0.0", + "Grpc.Examples": { + "version": "1.0.0", + "taget": "project" + }, "NUnit": "3.2.0", "NUnitLite": "3.2.0-*" }, "frameworks": { "net45": { }, - "dotnet54": { + "netstandard1.5": { "imports": [ "portable-net45" ], "dependencies": { - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.0.0-rc2-23931" - } + "NETStandard.Library": "1.5.0-rc2-24027" } } + }, + "runtimes": { + "win7-x64": { } } } diff --git a/src/csharp/Grpc.Examples/project.json b/src/csharp/Grpc.Examples/project.json index e2b4c10422f..4a3810596b0 100644 --- a/src/csharp/Grpc.Examples/project.json +++ b/src/csharp/Grpc.Examples/project.json @@ -4,7 +4,10 @@ }, "dependencies": { - "Grpc.Core": "0.0.1", + "Grpc.Core": { + "version": "0.0.1", + "taget": "project" + }, "Google.Protobuf": "3.0.0-beta3" }, "frameworks": { @@ -14,15 +17,12 @@ "System.IO": "" } }, - "dotnet54": { + "netstandard1.5": { "imports": [ "portable-net45" ], "dependencies": { - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.0.0-rc2-23931" - } + "NETStandard.Library": "1.5.0-rc2-24027" } } } diff --git a/src/csharp/Grpc.HealthCheck.Tests/NUnitMain.cs b/src/csharp/Grpc.HealthCheck.Tests/NUnitMain.cs index 0820523f35c..44634671ce5 100644 --- a/src/csharp/Grpc.HealthCheck.Tests/NUnitMain.cs +++ b/src/csharp/Grpc.HealthCheck.Tests/NUnitMain.cs @@ -49,7 +49,7 @@ namespace Grpc.HealthCheck.Tests { // Make logger immune to NUnit capturing stdout and stderr to workaround https://github.com/nunit/nunit/issues/1406. GrpcEnvironment.SetLogger(new TextWriterLogger(Console.Error)); -#if DOTNET5_4 +#if NETSTANDARD1_5 return new AutoRun(typeof(NUnitMain).GetTypeInfo().Assembly).Execute(args, new ExtendedTextWrapper(Console.Out), Console.In); #else return new AutoRun().Execute(args); diff --git a/src/csharp/Grpc.HealthCheck.Tests/project.json b/src/csharp/Grpc.HealthCheck.Tests/project.json index 248a1324f60..fde21f1b7e0 100644 --- a/src/csharp/Grpc.HealthCheck.Tests/project.json +++ b/src/csharp/Grpc.HealthCheck.Tests/project.json @@ -10,22 +10,25 @@ "emitEntryPoint": true }, "dependencies": { - "Grpc.HealthCheck": "0.0.1", + "Grpc.HealthCheck": { + "version": "0.0.1", + "taget": "project" + }, "NUnit": "3.2.0", "NUnitLite": "3.2.0-*" }, "frameworks": { "net45": { }, - "dotnet54": { + "netstandard1.5": { "imports": [ "portable-net45" ], "dependencies": { - "Microsoft.NETCore.App": { - "type": "platform", - "version": "1.0.0-rc2-23931" - } + "NETStandard.Library": "1.5.0-rc2-24027" } } + }, + "runtimes": { + "win7-x64": { } } } diff --git a/src/csharp/Grpc.HealthCheck/project.json b/src/csharp/Grpc.HealthCheck/project.json index ad42df595d4..c69db5f997d 100644 --- a/src/csharp/Grpc.HealthCheck/project.json +++ b/src/csharp/Grpc.HealthCheck/project.json @@ -26,12 +26,12 @@ "System.IO": "" } }, - "dotnet54": { + "netstandard1.5": { "imports": [ "portable-net45" ], "dependencies": { - "Microsoft.CSharp": "4.0.1-beta-23516" + "NETStandard.Library": "1.5.0-rc2-24027" } } } diff --git a/src/csharp/Grpc.IntegrationTesting.Client/project.json b/src/csharp/Grpc.IntegrationTesting.Client/project.json index 6ad74d59984..a5a87f9882d 100644 --- a/src/csharp/Grpc.IntegrationTesting.Client/project.json +++ b/src/csharp/Grpc.IntegrationTesting.Client/project.json @@ -10,9 +10,24 @@ "emitEntryPoint": true }, "dependencies": { - "Grpc.IntegrationTesting": "1.0.0" + "Grpc.IntegrationTesting": { + "version": "1.0.0", + "taget": "project" + } }, "frameworks": { - "net45": { } + "net45": { }, + "netstandard1.5": { + "imports": [ + "portable-net45", + "net45" + ], + "dependencies": { + "NETStandard.Library": "1.5.0-rc2-24027" + } + } + }, + "runtimes": { + "win7-x64": { } } } diff --git a/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json index 6ad74d59984..a5a87f9882d 100644 --- a/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json +++ b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json @@ -10,9 +10,24 @@ "emitEntryPoint": true }, "dependencies": { - "Grpc.IntegrationTesting": "1.0.0" + "Grpc.IntegrationTesting": { + "version": "1.0.0", + "taget": "project" + } }, "frameworks": { - "net45": { } + "net45": { }, + "netstandard1.5": { + "imports": [ + "portable-net45", + "net45" + ], + "dependencies": { + "NETStandard.Library": "1.5.0-rc2-24027" + } + } + }, + "runtimes": { + "win7-x64": { } } } diff --git a/src/csharp/Grpc.IntegrationTesting.Server/project.json b/src/csharp/Grpc.IntegrationTesting.Server/project.json index 6ad74d59984..a5a87f9882d 100644 --- a/src/csharp/Grpc.IntegrationTesting.Server/project.json +++ b/src/csharp/Grpc.IntegrationTesting.Server/project.json @@ -10,9 +10,24 @@ "emitEntryPoint": true }, "dependencies": { - "Grpc.IntegrationTesting": "1.0.0" + "Grpc.IntegrationTesting": { + "version": "1.0.0", + "taget": "project" + } }, "frameworks": { - "net45": { } + "net45": { }, + "netstandard1.5": { + "imports": [ + "portable-net45", + "net45" + ], + "dependencies": { + "NETStandard.Library": "1.5.0-rc2-24027" + } + } + }, + "runtimes": { + "win7-x64": { } } } diff --git a/src/csharp/Grpc.IntegrationTesting/GeneratedClientTest.cs b/src/csharp/Grpc.IntegrationTesting/GeneratedClientTest.cs index 37786b6c30a..eb7b55a2863 100644 --- a/src/csharp/Grpc.IntegrationTesting/GeneratedClientTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/GeneratedClientTest.cs @@ -40,7 +40,6 @@ using System.Threading.Tasks; using Grpc.Core; using Grpc.Core.Utils; using Grpc.Testing; -using Moq; using NUnit.Framework; namespace Grpc.IntegrationTesting @@ -49,14 +48,16 @@ namespace Grpc.IntegrationTesting { TestService.TestServiceClient unimplementedClient = new UnimplementedTestServiceClient(); + // TODO: replace Moq by some mocking library with CoreCLR support. +#if !NETSTANDARD1_5 [Test] public void ExpandedParamOverloadCanBeMocked() { var expected = new SimpleResponse(); - var mockClient = new Mock(); + var mockClient = new Moq.Mock(); // mocking is relatively clumsy because one needs to specify value for all the optional params. - mockClient.Setup(m => m.UnaryCall(It.IsAny(), null, null, CancellationToken.None)).Returns(expected); + mockClient.Setup(m => m.UnaryCall(Moq.It.IsAny(), null, null, CancellationToken.None)).Returns(expected); Assert.AreSame(expected, mockClient.Object.UnaryCall(new SimpleRequest())); } @@ -66,11 +67,12 @@ namespace Grpc.IntegrationTesting { var expected = new SimpleResponse(); - var mockClient = new Mock(); - mockClient.Setup(m => m.UnaryCall(It.IsAny(), It.IsAny())).Returns(expected); + var mockClient = new Moq.Mock(); + mockClient.Setup(m => m.UnaryCall(Moq.It.IsAny(), Moq.It.IsAny())).Returns(expected); Assert.AreSame(expected, mockClient.Object.UnaryCall(new SimpleRequest(), new CallOptions())); } +#endif [Test] public void DefaultMethodStubThrows_UnaryCall() diff --git a/src/csharp/Grpc.IntegrationTesting/GeneratedServiceBaseTest.cs b/src/csharp/Grpc.IntegrationTesting/GeneratedServiceBaseTest.cs index 5fd0e14e78d..001533ce315 100644 --- a/src/csharp/Grpc.IntegrationTesting/GeneratedServiceBaseTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/GeneratedServiceBaseTest.cs @@ -40,7 +40,6 @@ using System.Threading.Tasks; using Grpc.Core; using Grpc.Core.Utils; using Grpc.Testing; -using Moq; using NUnit.Framework; namespace Grpc.IntegrationTesting diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs index aea40afee2c..d273867a6a7 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs @@ -145,16 +145,26 @@ namespace Grpc.IntegrationTesting if (options.TestCase == "jwt_token_creds") { +#if !NETSTANDARD1_5 var googleCredential = await GoogleCredential.GetApplicationDefaultAsync(); Assert.IsTrue(googleCredential.IsCreateScopedRequired); credentials = ChannelCredentials.Create(credentials, googleCredential.ToCallCredentials()); +#else + // TODO(jtattermusch): implement this + throw new NotImplementedException("Not supported on CoreCLR yet"); +#endif } if (options.TestCase == "compute_engine_creds") { +#if !NETSTANDARD1_5 var googleCredential = await GoogleCredential.GetApplicationDefaultAsync(); Assert.IsFalse(googleCredential.IsCreateScopedRequired); credentials = ChannelCredentials.Create(credentials, googleCredential.ToCallCredentials()); +#else + // TODO(jtattermusch): implement this + throw new NotImplementedException("Not supported on CoreCLR yet"); +#endif } return credentials; } @@ -245,7 +255,7 @@ namespace Grpc.IntegrationTesting { Console.WriteLine("running client_streaming"); - var bodySizes = new List { 27182, 8, 1828, 45904 }.ConvertAll((size) => new StreamingInputCallRequest { Payload = CreateZerosPayload(size) }); + var bodySizes = new List { 27182, 8, 1828, 45904 }.Select((size) => new StreamingInputCallRequest { Payload = CreateZerosPayload(size) }); using (var call = client.StreamingInputCall()) { @@ -266,7 +276,7 @@ namespace Grpc.IntegrationTesting var request = new StreamingOutputCallRequest { ResponseType = PayloadType.Compressable, - ResponseParameters = { bodySizes.ConvertAll((size) => new ResponseParameters { Size = size }) } + ResponseParameters = { bodySizes.Select((size) => new ResponseParameters { Size = size }) } }; using (var call = client.StreamingOutputCall(request)) @@ -276,7 +286,7 @@ namespace Grpc.IntegrationTesting { Assert.AreEqual(PayloadType.Compressable, res.Payload.Type); } - CollectionAssert.AreEqual(bodySizes, responseList.ConvertAll((item) => item.Payload.Body.Length)); + CollectionAssert.AreEqual(bodySizes, responseList.Select((item) => item.Payload.Body.Length)); } Console.WriteLine("Passed!"); } @@ -398,6 +408,7 @@ namespace Grpc.IntegrationTesting public static async Task RunOAuth2AuthTokenAsync(TestService.TestServiceClient client, string oauthScope) { +#if !NETSTANDARD1_5 Console.WriteLine("running oauth2_auth_token"); ITokenAccess credential = (await GoogleCredential.GetApplicationDefaultAsync()).CreateScoped(new[] { oauthScope }); string oauth2Token = await credential.GetAccessTokenForRequestAsync(); @@ -415,10 +426,15 @@ namespace Grpc.IntegrationTesting Assert.True(oauthScope.Contains(response.OauthScope)); Assert.AreEqual(GetEmailFromServiceAccountFile(), response.Username); Console.WriteLine("Passed!"); +#else + // TODO(jtattermusch): implement this + throw new NotImplementedException("Not supported on CoreCLR yet"); +#endif } public static async Task RunPerRpcCredsAsync(TestService.TestServiceClient client, string oauthScope) { +#if !NETSTANDARD1_5 Console.WriteLine("running per_rpc_creds"); ITokenAccess googleCredential = await GoogleCredential.GetApplicationDefaultAsync(); @@ -432,6 +448,10 @@ namespace Grpc.IntegrationTesting Assert.AreEqual(GetEmailFromServiceAccountFile(), response.Username); Console.WriteLine("Passed!"); +#else + // TODO(jtattermusch): implement this + throw new NotImplementedException("Not supported on CoreCLR yet"); +#endif } public static async Task RunCancelAfterBeginAsync(TestService.TestServiceClient client) @@ -626,13 +646,17 @@ namespace Grpc.IntegrationTesting // extracts the client_email field from service account file used for auth test cases private static string GetEmailFromServiceAccountFile() { +#if !NETSTANDARD1_5 string keyFile = Environment.GetEnvironmentVariable("GOOGLE_APPLICATION_CREDENTIALS"); Assert.IsNotNull(keyFile); - var jobject = JObject.Parse(File.ReadAllText(keyFile)); string email = jobject.GetValue("client_email").Value(); Assert.IsTrue(email.Length > 0); // spec requires nonempty client email. return email; +#else + // TODO(jtattermusch): implement this + throw new NotImplementedException("Not supported on CoreCLR yet"); +#endif } private static Metadata CreateTestMetadata() diff --git a/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs b/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs index f95af5008f1..9fd575f1900 100644 --- a/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs @@ -40,7 +40,6 @@ using System.Threading.Tasks; using Grpc.Core; using Grpc.Core.Utils; using Grpc.Testing; -using Moq; using NUnit.Framework; namespace Grpc.IntegrationTesting @@ -52,19 +51,14 @@ namespace Grpc.IntegrationTesting Channel channel; TestService.TestServiceClient client; List options; - Mock serviceMock; AsyncAuthInterceptor asyncAuthInterceptor; [SetUp] public void Init() { - serviceMock = new Mock(); - serviceMock.Setup(m => m.UnaryCall(It.IsAny(), It.IsAny())) - .Returns(new Func>(UnaryCallHandler)); - server = new Server { - Services = { TestService.BindService(serviceMock.Object) }, + Services = { TestService.BindService(new FakeTestService()) }, Ports = { { Host, ServerPort.PickUnused, TestCredentials.CreateSslServerCredentials() } } }; server.Start(); @@ -96,7 +90,7 @@ namespace Grpc.IntegrationTesting channel = new Channel(Host, server.Ports.Single().BoundPort, channelCredentials, options); client = TestService.NewClient(channel); - client.UnaryCall(new SimpleRequest {}); + client.UnaryCall(new SimpleRequest { }); } [Test] @@ -109,11 +103,14 @@ namespace Grpc.IntegrationTesting client.UnaryCall(new SimpleRequest { }, new CallOptions(credentials: callCredentials)); } - private Task UnaryCallHandler(SimpleRequest request, ServerCallContext context) + private class FakeTestService : TestService.TestServiceBase { - var authToken = context.RequestHeaders.First((entry) => entry.Key == "authorization").Value; - Assert.AreEqual("SECRET_TOKEN", authToken); - return Task.FromResult(new SimpleResponse()); + public override Task UnaryCall(SimpleRequest request, ServerCallContext context) + { + var authToken = context.RequestHeaders.First((entry) => entry.Key == "authorization").Value; + Assert.AreEqual("SECRET_TOKEN", authToken); + return Task.FromResult(new SimpleResponse()); + } } } } diff --git a/src/csharp/Grpc.IntegrationTesting/NUnitMain.cs b/src/csharp/Grpc.IntegrationTesting/NUnitMain.cs index d8902de08f5..100ff0b5de9 100644 --- a/src/csharp/Grpc.IntegrationTesting/NUnitMain.cs +++ b/src/csharp/Grpc.IntegrationTesting/NUnitMain.cs @@ -49,7 +49,7 @@ namespace Grpc.IntegrationTesting { // Make logger immune to NUnit capturing stdout and stderr to workaround https://github.com/nunit/nunit/issues/1406. GrpcEnvironment.SetLogger(new TextWriterLogger(Console.Error)); -#if DOTNET5_4 +#if NETSTANDARD1_5 return new AutoRun(typeof(NUnitMain).GetTypeInfo().Assembly).Execute(args, new ExtendedTextWrapper(Console.Out), Console.In); #else return new AutoRun().Execute(args); diff --git a/src/csharp/Grpc.IntegrationTesting/TestCredentials.cs b/src/csharp/Grpc.IntegrationTesting/TestCredentials.cs index 774563d752f..60b9cf4e0b7 100644 --- a/src/csharp/Grpc.IntegrationTesting/TestCredentials.cs +++ b/src/csharp/Grpc.IntegrationTesting/TestCredentials.cs @@ -90,7 +90,7 @@ namespace Grpc.IntegrationTesting private static string GetPath(string relativePath) { - var assemblyDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); + var assemblyDir = Path.GetDirectoryName(typeof(TestCredentials).GetTypeInfo().Assembly.Location); return Path.Combine(assemblyDir, relativePath); } } diff --git a/src/csharp/Grpc.IntegrationTesting/project.json b/src/csharp/Grpc.IntegrationTesting/project.json index 0093531fa9e..6c1d31b3c45 100644 --- a/src/csharp/Grpc.IntegrationTesting/project.json +++ b/src/csharp/Grpc.IntegrationTesting/project.json @@ -1,23 +1,51 @@ { "buildOptions": { "compile": "**/*.cs", + "copyToOutput": { + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll" + }, + "include": "data/*" + }, "emitEntryPoint": true }, "dependencies": { - "Grpc.Auth": "0.0.1", - "Grpc.Core": "0.0.1", + "Grpc.Auth": { + "version": "0.0.1", + "taget": "project" + }, + "Grpc.Core": { + "version": "0.0.1", + "taget": "project" + }, "Google.Protobuf": "3.0.0-beta3", "CommandLineParser": "1.9.71", - "Moq": "4.2.1510.2205", "NUnit": "3.2.0", "NUnitLite": "3.2.0-*" }, "frameworks": { "net45": { + "dependencies": { + "Moq": "4.2.1510.2205" + }, "frameworkAssemblies": { "System.Runtime": "", "System.IO": "" } + }, + "netstandard1.5": { + "imports": [ + "portable-net45", + "net45" + ], + "dependencies": { + "NETStandard.Library": "1.5.0-rc2-24027", + "System.Linq.Expressions": "4.0.11-rc2-24027" + } } + }, + "runtimes": { + "win7-x64": { } } } From f3bc3b62a776c34b916c7771177629b4620dbfec Mon Sep 17 00:00:00 2001 From: thinkerou Date: Thu, 9 Jun 2016 11:57:15 +0800 Subject: [PATCH 1146/1894] Load default roots.pem in PHP via grpc_set_ssl_roots_override_callback --- src/php/ext/grpc/channel_credentials.c | 33 +++++++++++++++++++ src/php/lib/Grpc/BaseStub.php | 4 +++ .../grpc_interop_php/build_interop.sh | 2 -- 3 files changed, 37 insertions(+), 2 deletions(-) diff --git a/src/php/ext/grpc/channel_credentials.c b/src/php/ext/grpc/channel_credentials.c index 5c537378a62..b76fb105f36 100644 --- a/src/php/ext/grpc/channel_credentials.c +++ b/src/php/ext/grpc/channel_credentials.c @@ -47,11 +47,23 @@ #include #include +#include #include #include zend_class_entry *grpc_ce_channel_credentials; +static char *default_pem_root_certs = NULL; + +static grpc_ssl_roots_override_result get_ssl_roots_override( + char **pem_root_certs) { + *pem_root_certs = default_pem_root_certs; + if (default_pem_root_certs == NULL) { + return GRPC_SSL_ROOTS_OVERRIDE_FAIL; + } + return GRPC_SSL_ROOTS_OVERRIDE_OK; +} + /* Frees and destroys an instance of wrapped_grpc_channel_credentials */ void free_wrapped_grpc_channel_credentials(void *object TSRMLS_DC) { wrapped_grpc_channel_credentials *creds = @@ -93,6 +105,24 @@ zval *grpc_php_wrap_channel_credentials(grpc_channel_credentials *wrapped TSRMLS return credentials_object; } +/** + * Set default roots pem. + * @param string pem_roots PEM encoding of the server root certificates + * @return void + */ +PHP_METHOD(ChannelCredentials, setDefaultRootsPem) { + char *pem_roots; + int pem_roots_length; + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &pem_roots, + &pem_roots_length) == FAILURE) { + zend_throw_exception(spl_ce_InvalidArgumentException, + "setDefaultRootsPem expects 1 string", 1 TSRMLS_CC); + return; + } + default_pem_root_certs = gpr_malloc((pem_roots_length + 1) * sizeof(char)); + memcpy(default_pem_root_certs, pem_roots, pem_roots_length + 1); +} + /** * Create a default channel credentials object. * @return ChannelCredentials The new default channel credentials object @@ -178,6 +208,8 @@ PHP_METHOD(ChannelCredentials, createInsecure) { } static zend_function_entry channel_credentials_methods[] = { + PHP_ME(ChannelCredentials, setDefaultRootsPem, NULL, + ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) PHP_ME(ChannelCredentials, createDefault, NULL, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC) PHP_ME(ChannelCredentials, createSsl, NULL, @@ -192,6 +224,7 @@ void grpc_init_channel_credentials(TSRMLS_D) { zend_class_entry ce; INIT_CLASS_ENTRY(ce, "Grpc\\ChannelCredentials", channel_credentials_methods); + grpc_set_ssl_roots_override_callback(get_ssl_roots_override); ce.create_object = create_wrapped_grpc_channel_credentials; grpc_ce_channel_credentials = zend_register_internal_class(&ce TSRMLS_CC); } diff --git a/src/php/lib/Grpc/BaseStub.php b/src/php/lib/Grpc/BaseStub.php index 70644fac872..df3fe85d447 100755 --- a/src/php/lib/Grpc/BaseStub.php +++ b/src/php/lib/Grpc/BaseStub.php @@ -56,6 +56,10 @@ class BaseStub */ public function __construct($hostname, $opts, $channel = null) { + $ssl_roots = file_get_contents( + dirname(__FILE__).'/../../../../etc/roots.pem'); + ChannelCredentials::setDefaultRootsPem($ssl_roots); + $this->hostname = $hostname; $this->update_metadata = null; if (isset($opts['update_metadata'])) { diff --git a/tools/dockerfile/interoptest/grpc_interop_php/build_interop.sh b/tools/dockerfile/interoptest/grpc_interop_php/build_interop.sh index 87262f1d629..a84a450221e 100755 --- a/tools/dockerfile/interoptest/grpc_interop_php/build_interop.sh +++ b/tools/dockerfile/interoptest/grpc_interop_php/build_interop.sh @@ -40,8 +40,6 @@ cp -r /var/local/jenkins/service_account $HOME || true cd /var/local/git/grpc rvm --default use ruby-2.1 -make install-certs - # gRPC core and protobuf need to be installed make install From 2e12db9c319bcbdbb2fa570149f88e4b496b558c Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 16 Jun 2016 16:53:59 -0700 Subject: [PATCH 1147/1894] Test polling island merges --- Makefile | 36 ++++ build.yaml | 12 ++ src/core/lib/iomgr/ev_epoll_linux.c | 51 +++++- src/core/lib/iomgr/ev_epoll_linux.h | 6 + src/core/lib/iomgr/ev_posix.c | 7 + src/core/lib/iomgr/ev_posix.h | 3 + test/core/iomgr/ev_epoll_linux_test.c | 222 +++++++++++++++++++++++ tools/run_tests/sources_and_headers.json | 16 ++ tools/run_tests/tests.json | 15 ++ 9 files changed, 366 insertions(+), 2 deletions(-) create mode 100644 test/core/iomgr/ev_epoll_linux_test.c diff --git a/Makefile b/Makefile index e615704395b..825684cc2dd 100644 --- a/Makefile +++ b/Makefile @@ -905,6 +905,7 @@ dns_resolver_connectivity_test: $(BINDIR)/$(CONFIG)/dns_resolver_connectivity_te dns_resolver_test: $(BINDIR)/$(CONFIG)/dns_resolver_test dualstack_socket_test: $(BINDIR)/$(CONFIG)/dualstack_socket_test endpoint_pair_test: $(BINDIR)/$(CONFIG)/endpoint_pair_test +ev_epoll_linux_test: $(BINDIR)/$(CONFIG)/ev_epoll_linux_test fd_conservation_posix_test: $(BINDIR)/$(CONFIG)/fd_conservation_posix_test fd_posix_test: $(BINDIR)/$(CONFIG)/fd_posix_test fling_client: $(BINDIR)/$(CONFIG)/fling_client @@ -1242,6 +1243,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/dns_resolver_test \ $(BINDIR)/$(CONFIG)/dualstack_socket_test \ $(BINDIR)/$(CONFIG)/endpoint_pair_test \ + $(BINDIR)/$(CONFIG)/ev_epoll_linux_test \ $(BINDIR)/$(CONFIG)/fd_conservation_posix_test \ $(BINDIR)/$(CONFIG)/fd_posix_test \ $(BINDIR)/$(CONFIG)/fling_client \ @@ -1512,6 +1514,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/dualstack_socket_test || ( echo test dualstack_socket_test failed ; exit 1 ) $(E) "[RUN] Testing endpoint_pair_test" $(Q) $(BINDIR)/$(CONFIG)/endpoint_pair_test || ( echo test endpoint_pair_test failed ; exit 1 ) + $(E) "[RUN] Testing ev_epoll_linux_test" + $(Q) $(BINDIR)/$(CONFIG)/ev_epoll_linux_test || ( echo test ev_epoll_linux_test failed ; exit 1 ) $(E) "[RUN] Testing fd_conservation_posix_test" $(Q) $(BINDIR)/$(CONFIG)/fd_conservation_posix_test || ( echo test fd_conservation_posix_test failed ; exit 1 ) $(E) "[RUN] Testing fd_posix_test" @@ -7130,6 +7134,38 @@ endif endif +EV_EPOLL_LINUX_TEST_SRC = \ + test/core/iomgr/ev_epoll_linux_test.c \ + +EV_EPOLL_LINUX_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(EV_EPOLL_LINUX_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/ev_epoll_linux_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/ev_epoll_linux_test: $(EV_EPOLL_LINUX_TEST_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) $(EV_EPOLL_LINUX_TEST_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)/ev_epoll_linux_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/iomgr/ev_epoll_linux_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_ev_epoll_linux_test: $(EV_EPOLL_LINUX_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(EV_EPOLL_LINUX_TEST_OBJS:.o=.dep) +endif +endif + + FD_CONSERVATION_POSIX_TEST_SRC = \ test/core/iomgr/fd_conservation_posix_test.c \ diff --git a/build.yaml b/build.yaml index 7790e0c5174..84f4ea521be 100644 --- a/build.yaml +++ b/build.yaml @@ -1407,6 +1407,18 @@ targets: - grpc - gpr_test_util - gpr +- name: ev_epoll_linux_test + build: test + language: c + src: + - test/core/iomgr/ev_epoll_linux_test.c + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr + platforms: + - linux - name: fd_conservation_posix_test build: test language: c diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 1fb59474640..ed2c494b783 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -317,8 +317,9 @@ static void polling_island_remove_all_fds_locked(polling_island *pi, if (err < 0 && errno != ENOENT) { /* TODO: sreek - We need a better way to bubble up this error instead of * just logging a message */ - gpr_log(GPR_ERROR, "epoll_ctl deleting fds[%zu]: %d failed with error: %s", - i, pi->fds[i]->fd, strerror(errno)); + gpr_log(GPR_ERROR, + "epoll_ctl deleting fds[%zu]: %d failed with error: %s", i, + pi->fds[i]->fd, strerror(errno)); } if (remove_fd_refs) { @@ -1458,6 +1459,52 @@ static void pollset_set_del_pollset_set(grpc_exec_ctx *exec_ctx, gpr_mu_unlock(&bag->mu); } +/* Test helper functions + * */ +void *grpc_fd_get_polling_island(grpc_fd *fd) { + polling_island *pi; + + gpr_mu_lock(&fd->pi_mu); + pi = fd->polling_island; + gpr_mu_unlock(&fd->pi_mu); + + return pi; +} + +void *grpc_pollset_get_polling_island(grpc_pollset *ps) { + polling_island *pi; + + gpr_mu_lock(&ps->pi_mu); + pi = ps->polling_island; + gpr_mu_unlock(&ps->pi_mu); + + return pi; +} + +static polling_island *get_polling_island(polling_island *p) { + if (p == NULL) { + return NULL; + } + + polling_island *next; + gpr_mu_lock(&p->mu); + while (p->merged_to != NULL) { + next = p->merged_to; + gpr_mu_unlock(&p->mu); + p = next; + gpr_mu_lock(&p->mu); + } + gpr_mu_unlock(&p->mu); + + return p; +} + +bool grpc_are_polling_islands_equal(void *p, void *q) { + p = get_polling_island(p); + q = get_polling_island(q); + return p == q; +} + /******************************************************************************* * Event engine binding */ diff --git a/src/core/lib/iomgr/ev_epoll_linux.h b/src/core/lib/iomgr/ev_epoll_linux.h index 8c819975a4c..7a494aba198 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.h +++ b/src/core/lib/iomgr/ev_epoll_linux.h @@ -38,4 +38,10 @@ const grpc_event_engine_vtable *grpc_init_epoll_linux(void); +#ifdef GPR_LINUX_EPOLL +void *grpc_fd_get_polling_island(grpc_fd *fd); +void *grpc_pollset_get_polling_island(grpc_pollset *ps); +bool grpc_are_polling_islands_equal(void *p, void *q); +#endif /* defined(GPR_LINUX_EPOLL) */ + #endif /* GRPC_CORE_LIB_IOMGR_EV_EPOLL_LINUX_H */ diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index 2b15967adcc..5b20600a6f7 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -54,6 +54,7 @@ grpc_poll_function_type grpc_poll_function = poll; static const grpc_event_engine_vtable *g_event_engine; +static const char* g_poll_strategy_name = NULL; typedef const grpc_event_engine_vtable *(*event_engine_factory_fn)(void); @@ -101,6 +102,7 @@ static void try_engine(const char *engine) { for (size_t i = 0; i < GPR_ARRAY_SIZE(g_factories); i++) { if (is(engine, g_factories[i].name)) { if ((g_event_engine = g_factories[i].factory())) { + g_poll_strategy_name = g_factories[i].name; gpr_log(GPR_DEBUG, "Using polling engine: %s", g_factories[i].name); return; } @@ -108,6 +110,11 @@ static void try_engine(const char *engine) { } } +/* Call this only after calling grpc_event_engine_init() */ +const char *grpc_get_poll_strategy_name() { + return g_poll_strategy_name; +} + void grpc_event_engine_init(void) { char *s = gpr_getenv("GRPC_POLL_STRATEGY"); if (s == NULL) { diff --git a/src/core/lib/iomgr/ev_posix.h b/src/core/lib/iomgr/ev_posix.h index 344bf63438a..3ed5a5f9562 100644 --- a/src/core/lib/iomgr/ev_posix.h +++ b/src/core/lib/iomgr/ev_posix.h @@ -98,6 +98,9 @@ typedef struct grpc_event_engine_vtable { void grpc_event_engine_init(void); void grpc_event_engine_shutdown(void); +/* Return the name of the poll strategy */ +const char* grpc_get_poll_strategy_name(); + /* Create a wrapped file descriptor. Requires fd is a non-blocking file descriptor. This takes ownership of closing fd. */ diff --git a/test/core/iomgr/ev_epoll_linux_test.c b/test/core/iomgr/ev_epoll_linux_test.c new file mode 100644 index 00000000000..51da15faa7a --- /dev/null +++ b/test/core/iomgr/ev_epoll_linux_test.c @@ -0,0 +1,222 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/iomgr/ev_epoll_linux.h" +#include "src/core/lib/iomgr/ev_posix.h" + +#include +#include +#include +#include + +#include +#include + +#include "src/core/lib/iomgr/iomgr.h" +#include "test/core/util/test_config.h" + +typedef struct test_pollset { + grpc_pollset *pollset; + gpr_mu *mu; +} test_pollset; + +typedef struct test_fd { + int inner_fd; + grpc_fd *fd; +} test_fd; + +static void test_fd_init(test_fd *fds, int num_fds) { + int i; + for (i = 0; i < num_fds; i++) { + fds[i].inner_fd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); + fds[i].fd = grpc_fd_create(fds[i].inner_fd, "test_fd"); + } +} + +static void test_fd_cleanup(grpc_exec_ctx *exec_ctx, test_fd *fds, + int num_fds) { + int release_fd; + int i; + + for (i = 0; i < num_fds; i++) { + grpc_fd_shutdown(exec_ctx, fds[i].fd); + grpc_exec_ctx_flush(exec_ctx); + + grpc_fd_orphan(exec_ctx, fds[i].fd, NULL, &release_fd, "test_fd_cleanup"); + grpc_exec_ctx_flush(exec_ctx); + + GPR_ASSERT(release_fd == fds[i].inner_fd); + close(fds[i].inner_fd); + } +} + +static void test_pollset_init(test_pollset *pollsets, int num_pollsets) { + int i; + for (i = 0; i < num_pollsets; i++) { + pollsets[i].pollset = gpr_malloc(grpc_pollset_size()); + grpc_pollset_init(pollsets[i].pollset, &pollsets[i].mu); + } +} + +static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) { + grpc_pollset_destroy(p); +} + +static void test_pollset_cleanup(grpc_exec_ctx *exec_ctx, + test_pollset *pollsets, int num_pollsets) { + grpc_closure destroyed; + int i; + + for (i = 0; i < num_pollsets; i++) { + grpc_closure_init(&destroyed, destroy_pollset, pollsets[i].pollset); + grpc_pollset_shutdown(exec_ctx, pollsets[i].pollset, &destroyed); + + grpc_exec_ctx_flush(exec_ctx); + gpr_free(pollsets[i].pollset); + } +} + +#define NUM_FDS 8 +#define NUM_POLLSETS 4 +/* + * Cases to test: + * case 1) Polling islands of both fd and pollset are NULL + * case 2) Polling island of fd is NULL but that of pollset is not-NULL + * case 3) Polling island of fd is not-NULL but that of pollset is NULL + * case 4) Polling islands of both fd and pollset are not-NULL and: + * case 4.1) Polling islands of fd and pollset are equal + * case 4.2) Polling islands of fd and pollset are NOT-equal (This results + * in a merge) + * */ +static void test_add_fd_to_pollset() { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + test_fd fds[NUM_FDS]; + test_pollset pollsets[NUM_POLLSETS]; + void *expected_pi = NULL; + int i; + + test_fd_init(fds, NUM_FDS); + test_pollset_init(pollsets, NUM_POLLSETS); + + /*Step 1. + * Create three polling islands (This will exercise test case 1 and 2) with + * the following configuration: + * polling island 0 = { fds:0,1,2, pollsets:0} + * polling island 1 = { fds:3,4, pollsets:1} + * polling island 2 = { fds:5,6,7 pollsets:2} + * + *Step 2. + * Add pollset 3 to polling island 0 (by adding fds 0 and 1 to pollset 3) + * (This will exercise test cases 3 and 4.1). The configuration becomes: + * polling island 0 = { fds:0,1,2, pollsets:0,3} <<< pollset 3 added here + * polling island 1 = { fds:3,4, pollsets:1} + * polling island 2 = { fds:5,6,7 pollsets:2} + * + *Step 3. + * Merge polling islands 0 and 1 by adding fd 0 to pollset 1 (This will + * exercise test case 4.2). The configuration becomes: + * polling island (merged) = {fds: 0,1,2,3,4, pollsets: 0,1,3} + * polling island 2 = {fds: 5,6,7 pollsets: 2} + * + *Step 4. + * Finally do one more merge by adding fd 3 to pollset 2. + * polling island (merged) = {fds: 0,1,2,3,4,5,6,7, pollsets: 0,1,2,3} + */ + + /* == Step 1 == */ + for (i = 0; i <= 2; i++) { + grpc_pollset_add_fd(&exec_ctx, pollsets[0].pollset, fds[i].fd); + grpc_exec_ctx_flush(&exec_ctx); + } + + for (i = 3; i <= 4; i++) { + grpc_pollset_add_fd(&exec_ctx, pollsets[1].pollset, fds[i].fd); + grpc_exec_ctx_flush(&exec_ctx); + } + + for (i = 5; i <= 7; i++) { + grpc_pollset_add_fd(&exec_ctx, pollsets[2].pollset, fds[i].fd); + grpc_exec_ctx_flush(&exec_ctx); + } + + /* == Step 2 == */ + for (i = 0; i <= 1; i++) { + grpc_pollset_add_fd(&exec_ctx, pollsets[3].pollset, fds[i].fd); + grpc_exec_ctx_flush(&exec_ctx); + } + + /* == Step 3 == */ + grpc_pollset_add_fd(&exec_ctx, pollsets[1].pollset, fds[0].fd); + grpc_exec_ctx_flush(&exec_ctx); + + /* == Step 4 == */ + grpc_pollset_add_fd(&exec_ctx, pollsets[2].pollset, fds[3].fd); + grpc_exec_ctx_flush(&exec_ctx); + + /* All polling islands are merged at this point */ + + /* Compare Fd:0's polling island with that of all other Fds */ + expected_pi = grpc_fd_get_polling_island(fds[0].fd); + for (i = 1; i < NUM_FDS; i++) { + GPR_ASSERT(grpc_are_polling_islands_equal( + expected_pi, grpc_fd_get_polling_island(fds[i].fd))); + } + + /* Compare Fd:0's polling island with that of all other pollsets */ + for (i = 0; i < NUM_POLLSETS; i++) { + GPR_ASSERT(grpc_are_polling_islands_equal( + expected_pi, grpc_pollset_get_polling_island(pollsets[i].pollset))); + } + + test_fd_cleanup(&exec_ctx, fds, NUM_FDS); + test_pollset_cleanup(&exec_ctx, pollsets, NUM_POLLSETS); + grpc_exec_ctx_finish(&exec_ctx); +} + +int main(int argc, char **argv) { + const char *poll_strategy = NULL; + grpc_test_init(argc, argv); + grpc_iomgr_init(); + + poll_strategy = grpc_get_poll_strategy_name(); + if (poll_strategy != NULL && strcmp(poll_strategy, "epoll") == 0) { + test_add_fd_to_pollset(); + } else { + gpr_log(GPR_INFO, + "Skipping the test. The test is only relevant for 'epoll' " + "strategy. and the current strategy is: '%s'", + poll_strategy); + } + grpc_iomgr_shutdown(); + return 0; +} diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index e8ff61dc3fb..e9df72e43a1 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -315,6 +315,22 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "ev_epoll_linux_test", + "src": [ + "test/core/iomgr/ev_epoll_linux_test.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 5a84a41b638..ba661840dad 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -377,6 +377,21 @@ "windows" ] }, + { + "args": [], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "ev_epoll_linux_test", + "platforms": [ + "linux" + ] + }, { "args": [], "ci_platforms": [ From f09ab0c5add9289d40429df63b9f85b6545e9558 Mon Sep 17 00:00:00 2001 From: thinkerou Date: Fri, 3 Jun 2016 18:42:48 +0800 Subject: [PATCH 1148/1894] Make PHP work correctly when receiving a compressed message --- src/php/ext/grpc/byte_buffer.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/src/php/ext/grpc/byte_buffer.c b/src/php/ext/grpc/byte_buffer.c index 7a726de5db4..92ec39952c8 100644 --- a/src/php/ext/grpc/byte_buffer.c +++ b/src/php/ext/grpc/byte_buffer.c @@ -63,17 +63,15 @@ void byte_buffer_to_string(grpc_byte_buffer *buffer, char **out_string, *out_length = 0; return; } - size_t length = grpc_byte_buffer_length(buffer); - char *string = ecalloc(length + 1, sizeof(char)); - size_t offset = 0; + grpc_byte_buffer_reader reader; grpc_byte_buffer_reader_init(&reader, buffer); - gpr_slice next; - while (grpc_byte_buffer_reader_next(&reader, &next) != 0) { - memcpy(string + offset, GPR_SLICE_START_PTR(next), GPR_SLICE_LENGTH(next)); - offset += GPR_SLICE_LENGTH(next); - gpr_slice_unref(next); - } + gpr_slice slice = grpc_byte_buffer_reader_readall(&reader); + size_t length = GPR_SLICE_LENGTH(slice); + char *string = ecalloc(length + 1, sizeof(char)); + memcpy(string, GPR_SLICE_START_PTR(slice), length); + gpr_slice_unref(slice); + *out_string = string; *out_length = length; } From 87e6770a1819d44f352e7ba5782ca1f7dd8cffca Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 16 Jun 2016 22:04:08 -0700 Subject: [PATCH 1149/1894] pr comments --- doc/compression.md | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/doc/compression.md b/doc/compression.md index ddbbff1c541..6e455636021 100644 --- a/doc/compression.md +++ b/doc/compression.md @@ -41,13 +41,14 @@ of the request, including not performing any compression, regardless of channel and RPC settings (for example, if compression would result in small or negative gains). -A compressed message from a client with an algorithm unsupported by a server, -WILL result in an INVALID\_ARGUMENT error, alongside the receiving peer's -`grpc-accept-encoding` header specifying the algorithms it accepts. If an -INTERNAL error is returned from the server despite having used one of the -algorithms from the `grpc-accept-encoding h`eader, the cause MUST NOT be related -to compression. Data sent from a server compressed with an algorithm not -supported by the client will also result in an INTERNAL error. +When a message from a client compressed with an unsupported algorithm is +processed by a server, it WILL result in an INVALID\_ARGUMENT error. The server +will include in its response a `grpc-accept-encoding` header specifying the +algorithms it does accept. If an INTERNAL error is returned from the server +despite having used one of the algorithms from the `grpc-accept-encoding` +header, the cause MUST NOT be related to compression. Data sent from a server +compressed with an algorithm not supported by the client WILL result in an +INTERNAL error on the client side. Note that a peer MAY choose to not disclose all the encodings it supports. However, if it receives a message compressed in an undisclosed but supported @@ -67,16 +68,21 @@ cases. ### Compression Levels and Algorithms -We currently (as of July 2015) support _gzip_ and _deflate_ as algorithms (with -the possible future addition of snappy). In order to simplify the public API, -it's intended to abstract the algorithms as _compression levels_ (such as "low", -"medium", "high") that'd map to concrete algorithms and/or their settings (such -as "low" mapping to "gzip -3" and "high" mapping to "gzip -9"). However, we -can't presently (July 2015) implement said compression levels at the client side -without either a initial negotiation of capabilities or an automatic retry -mechanism. Therefore, compression levels are only supported at the server side, -which is aware of the client's capabilities by virtue of the incoming -Message-Accept-Encoding header. +The set of supported algorithm is implementation dependent. In order to simplify +the public API and to operate seamlessly across implementations (both in terms +of languages but also different version of the same one), we introduce the idea +of _compression levels_ (such as "low", "medium", "high"). + +Levels map to concrete algorithms and/or their settings (such as "low" mapping +to "gzip -3" and "high" mapping to "gzip -9") automatically depending on what a +peer is known to support. A server is always aware of what its clients support, +as clients disclose it in their Message-Accept-Encoding header as part of their +initial call. A client doesn't a priori (presently) know which algorithms a +server supports. This issue can be addressed with an initial negotiation of +capabilities or an automatic retry mechanism. These features will be implemented +in the future. Currently however, compression levels are only supported at the +server side, which is aware of the client's capabilities by virtue of the +incoming. ### Propagation to child RPCs From b9df2760ed15930429305f01407914db106510d5 Mon Sep 17 00:00:00 2001 From: vjpai Date: Fri, 17 Jun 2016 00:27:00 -0700 Subject: [PATCH 1150/1894] Add proper documentation of ordering and thread-safety for streaming (sync and async) APIs --- include/grpc++/impl/codegen/async_stream.h | 10 +++++++++- include/grpc++/impl/codegen/completion_queue.h | 14 ++++++++++++-- include/grpc++/impl/codegen/sync_stream.h | 10 ++++++++-- 3 files changed, 29 insertions(+), 5 deletions(-) diff --git a/include/grpc++/impl/codegen/async_stream.h b/include/grpc++/impl/codegen/async_stream.h index 0606441549e..c74737ce5f8 100644 --- a/include/grpc++/impl/codegen/async_stream.h +++ b/include/grpc++/impl/codegen/async_stream.h @@ -52,11 +52,14 @@ class ClientAsyncStreamingInterface { /// Request notification of the reading of the initial metadata. Completion /// will be notified by \a tag on the associated completion queue. + /// This call is optional, but if it is used, it cannot be used concurrently + /// with Read /// /// \param[in] tag Tag identifying this request. virtual void ReadInitialMetadata(void* tag) = 0; - /// Request notification completion. + /// Indicate that the stream is to be finished and request notification + /// Should not be used concurrently with other operations /// /// \param[out] status To be updated with the operation status. /// \param[in] tag Tag identifying this request. @@ -71,6 +74,8 @@ class AsyncReaderInterface { /// Read a message of type \a R into \a msg. Completion will be notified by \a /// tag on the associated completion queue. + /// This is thread-safe with respect to other streaming APIs except for Finish + /// on the same stream. /// /// \param[out] msg Where to eventually store the read message. /// \param[in] tag The tag identifying the operation. @@ -88,6 +93,7 @@ class AsyncWriterInterface { /// Only one write may be outstanding at any given time. This means that /// after calling Write, one must wait to receive \a tag from the completion /// queue BEFORE calling Write again. + /// This is thread-safe with respect to Read /// /// \param[in] msg The message to be written. /// \param[in] tag The tag identifying the operation. @@ -158,6 +164,7 @@ class ClientAsyncWriterInterface : public ClientAsyncStreamingInterface, public AsyncWriterInterface { public: /// Signal the client is done with the writes. + /// Thread-safe with respect to Read /// /// \param[in] tag The tag identifying the operation. virtual void WritesDone(void* tag) = 0; @@ -229,6 +236,7 @@ class ClientAsyncReaderWriterInterface : public ClientAsyncStreamingInterface, public AsyncReaderInterface { public: /// Signal the client is done with the writes. + /// Thread-safe with respect to Read /// /// \param[in] tag The tag identifying the operation. virtual void WritesDone(void* tag) = 0; diff --git a/include/grpc++/impl/codegen/completion_queue.h b/include/grpc++/impl/codegen/completion_queue.h index 1b84b447050..f138ebe7de2 100644 --- a/include/grpc++/impl/codegen/completion_queue.h +++ b/include/grpc++/impl/codegen/completion_queue.h @@ -31,8 +31,18 @@ * */ -/// A completion queue implements a concurrent producer-consumer queue, with two -/// main methods, \a Next and \a AsyncNext. +/// A completion queue implements a concurrent producer-consumer queue, with +/// two main API-exposed methods: \a Next and \a AsyncNext. These +/// methods are the essential component of the gRPC C++ asynchronous API. +/// There is also a Shutdown method to indicate that a given completion queue +/// will no longer have regular events. This must be called before the +/// completion queue is destroyed. +/// All completion queue APIs are thread-safe and may be used concurrently with +/// any other completion queue API invocation; it is acceptable to have +/// multiple threads calling Next or AsyncNext on the same or different +/// completion queues, or to call these methods concurrently with a Shutdown +/// elsewhere. All of these should be completed, though, before a completion +/// queue destructor is called. #ifndef GRPCXX_IMPL_CODEGEN_COMPLETION_QUEUE_H #define GRPCXX_IMPL_CODEGEN_COMPLETION_QUEUE_H diff --git a/include/grpc++/impl/codegen/sync_stream.h b/include/grpc++/impl/codegen/sync_stream.h index e94ffe58422..9d7966ba04b 100644 --- a/include/grpc++/impl/codegen/sync_stream.h +++ b/include/grpc++/impl/codegen/sync_stream.h @@ -71,6 +71,8 @@ class ReaderInterface { virtual ~ReaderInterface() {} /// Blocking read a message and parse to \a msg. Returns \a true on success. + /// This is thread-safe with respect to other streaming APIs except for Finish + /// on the same stream. (Finish must be called as described above.) /// /// \param[out] msg The read message. /// @@ -87,6 +89,7 @@ class WriterInterface { virtual ~WriterInterface() {} /// Blocking write \a msg to the stream with options. + /// This is thread-safe with respect to Read /// /// \param msg The message to be written to the stream. /// \param options Options affecting the write operation. @@ -95,6 +98,7 @@ class WriterInterface { virtual bool Write(const W& msg, const WriteOptions& options) = 0; /// Blocking write \a msg to the stream with default options. + /// This is thread-safe with respect to Read /// /// \param msg The message to be written to the stream. /// @@ -174,7 +178,8 @@ class ClientWriterInterface : public ClientStreamingInterface, public WriterInterface { public: /// Half close writing from the client. - /// Block until writes are completed. + /// Block until currently-pending writes are completed. + /// Thread safe with respect to Read operations only /// /// \return Whether the writes were successful. virtual bool WritesDone() = 0; @@ -257,7 +262,8 @@ class ClientReaderWriterInterface : public ClientStreamingInterface, /// the metadata will be available in ClientContext after the first read. virtual void WaitForInitialMetadata() = 0; - /// Block until writes are completed. + /// Block until currently-pending writes are completed. + /// Thread-safe with respect to Read /// /// \return Whether the writes were successful. virtual bool WritesDone() = 0; From 6ab4788ae91c08a6b659e61773609c24d9deb305 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Fri, 17 Jun 2016 00:31:23 -0700 Subject: [PATCH 1151/1894] clang-format changes --- test/cpp/end2end/thread_stress_test.cc | 2 +- test/cpp/interop/interop_client.cc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cpp/end2end/thread_stress_test.cc b/test/cpp/end2end/thread_stress_test.cc index 1e73f88917b..b021b345236 100644 --- a/test/cpp/end2end/thread_stress_test.cc +++ b/test/cpp/end2end/thread_stress_test.cc @@ -230,7 +230,7 @@ class CommonStressTestSyncServer : public CommonStressTest { }; class CommonStressTestAsyncServer - : public CommonStressTest< ::grpc::testing::EchoTestService::AsyncService> { + : public CommonStressTest { public: void SetUp() GRPC_OVERRIDE { shutting_down_ = false; diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index 5772060a591..608f902d6fe 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -31,10 +31,10 @@ * */ +#include #include #include #include -#include #include #include From 814b80e8e91df31a29ca6e7653e4c4e084145c4e Mon Sep 17 00:00:00 2001 From: thinkerou Date: Thu, 26 May 2016 11:28:50 +0800 Subject: [PATCH 1152/1894] change README for node dir changed --- examples/php/README.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/php/README.md b/examples/php/README.md index ea9ccb67908..ba7f8c060f0 100644 --- a/examples/php/README.md +++ b/examples/php/README.md @@ -37,7 +37,8 @@ TRY IT! ``` $ cd examples/node $ npm install - $ nodejs greeter_server.js + $ cd dynamic_codegen or cd static_codegen + $ node greeter_server.js ``` - Run the client From 40f572657970b26337fa7f89a6c506a02cc9fd05 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 17 Jun 2016 09:42:19 -0700 Subject: [PATCH 1153/1894] Node QPS worker: wait for clients to be ready before making calls --- src/node/performance/benchmark_client.js | 50 ++++++++++++++++++------ 1 file changed, 38 insertions(+), 12 deletions(-) diff --git a/src/node/performance/benchmark_client.js b/src/node/performance/benchmark_client.js index 262aa338629..5ef5260a96d 100644 --- a/src/node/performance/benchmark_client.js +++ b/src/node/performance/benchmark_client.js @@ -42,6 +42,8 @@ var fs = require('fs'); var path = require('path'); var util = require('util'); var EventEmitter = require('events'); + +var async = require('async'); var _ = require('lodash'); var PoissonProcess = require('poisson-process'); var Histogram = require('./histogram'); @@ -127,6 +129,36 @@ function BenchmarkClient(server_targets, channels, histogram_params, util.inherits(BenchmarkClient, EventEmitter); +/** + * Start every client in the list of clients by waiting for each to be ready, + * then starting outstanding_rpcs_per_channel calls on each of them + * @param {Array} client_list The list of clients + * @param {Number} outstanding_rpcs_per_channel The number of calls to start + * on each client + * @param {function(grpc.Client)} makeCall Function to make a single call on + * a single client + * @param {EventEmitter} emitter The event emitter to send errors on, if + * necessary + */ +function startAllClients(client_list, outstanding_rpcs_per_channel, makeCall, + emitter) { + var ready_wait_funcs = _.map(client_list, function(client) { + return _.partial(grpc.waitForClientReady, client, Infinity); + }); + async.parallel(ready_wait_funcs, function(err) { + if (err) { + emitter.emit('error', err); + return; + } + + _.each(client_list, function(client) { + _.times(outstanding_rpcs_per_channel, function() { + makeCall(client); + }); + }); + }); +} + /** * Start a closed-loop test. For each channel, start * outstanding_rpcs_per_channel RPCs. Then, whenever an RPC finishes, start @@ -212,11 +244,7 @@ BenchmarkClient.prototype.startClosedLoop = function( }; } - _.each(client_list, function(client) { - _.times(outstanding_rpcs_per_channel, function() { - makeCall(client); - }); - }); + startAllClients(client_list, outstanding_rpcs_per_channel, makeCall, self); }; /** @@ -310,14 +338,12 @@ BenchmarkClient.prototype.startPoisson = function( var averageIntervalMs = (1 / offered_load) * 1000; - _.each(client_list, function(client) { - _.times(outstanding_rpcs_per_channel, function() { - var p = PoissonProcess.create(averageIntervalMs, function() { - makeCall(client, p); - }); - p.start(); + startAllClients(client_list, outstanding_rpcs_per_channel, function(client){ + var p = PoissonProcess.create(averageIntervalMs, function() { + makeCall(client, p); }); - }); + p.start(); + }, self); }; /** From 20e5d9eb0a5f4442b7fd4427a66cd5fd01065f9a Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 17 Jun 2016 11:31:22 -0700 Subject: [PATCH 1154/1894] Update Node plugin to handle well known type changes --- src/compiler/node_generator.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/compiler/node_generator.cc b/src/compiler/node_generator.cc index 986b97c26e9..1fe090d17af 100644 --- a/src/compiler/node_generator.cc +++ b/src/compiler/node_generator.cc @@ -74,8 +74,16 @@ grpc::string GetJSMessageFilename(const grpc::string& filename) { // Given a filename like foo/bar/baz.proto, returns the root directory // path ../../ -grpc::string GetRootPath(const grpc::string& filename) { - size_t slashes = std::count(filename.begin(), filename.end(), '/'); +grpc::string GetRootPath(const grpc::string& from_filename, + const grpc::string& to_filename) { + if (to_filename.find("google/protobuf") == 0) { + // Well-known types (.proto files in the google/protobuf directory) are + // assumed to come from the 'google-protobuf' npm package. We may want to + // generalize this exception later by letting others put generated code in + // their own npm packages. + return "google-protobuf/"; + } + size_t slashes = std::count(from_filename.begin(), from_filename.end(), '/'); if (slashes == 0) { return "./"; } @@ -90,7 +98,7 @@ grpc::string GetRootPath(const grpc::string& filename) { // from_file, assuming that both paths are relative to the same directory grpc::string GetRelativePath(const grpc::string& from_file, const grpc::string& to_file) { - return GetRootPath(from_file) + to_file; + return GetRootPath(from_file, to_file) + to_file; } /* Finds all message types used in all services in the file, and returns them From 2c7caa10f468ec3ed38f850c91cbf6b213ebf4a4 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 17 Jun 2016 11:46:47 -0700 Subject: [PATCH 1155/1894] update third_party/protobuf to v3.0.0-beta-3.2 --- third_party/protobuf | 2 +- tools/run_tests/sanity/check_submodules.sh | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/third_party/protobuf b/third_party/protobuf index 3470b6895aa..d4d13a4349e 160000 --- a/third_party/protobuf +++ b/third_party/protobuf @@ -1 +1 @@ -Subproject commit 3470b6895aa659b7559ed678e029a5338e535f14 +Subproject commit d4d13a4349e4e59d67f311185ddcc1890d956d7a diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index 6e858fa9c92..f2d7a1429ea 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -41,11 +41,11 @@ want_submodules=`mktemp /tmp/submXXXXXX` git submodule | awk '{ print $1 }' | sort > $submodules cat << EOF | awk '{ print $1 }' | sort > $want_submodules - c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9 third_party/boringssl (heads/2661) + c880e42ba1c8032d4cdde2aba0541d8a9d9fa2e9 third_party/boringssl (version_for_cocoapods_2.0-100-gc880e42) 05b155ff59114735ec8cd089f669c4c3d8f59029 third_party/gflags (v2.1.0-45-g05b155f) c99458533a9b4c743ed51537e25989ea55944908 third_party/googletest (release-1.7.0) f8ac463766281625ad710900479130c7fcb4d63b third_party/nanopb (nanopb-0.3.4-29-gf8ac463) - 3470b6895aa659b7559ed678e029a5338e535f14 third_party/protobuf (v3.0.0-beta-2-441-g3470b68) + d4d13a4349e4e59d67f311185ddcc1890d956d7a third_party/protobuf (v3.0.0-beta-3.2) 50893291621658f355bc5b4d450a8d06a563053d third_party/zlib (v1.2.8) EOF From e2e08735e5226195ed3706bc10a9d297dd88bdf0 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Wed, 18 May 2016 14:37:20 -0700 Subject: [PATCH 1156/1894] php: implement custom_metadata interop test --- src/php/tests/interop/interop_client.php | 61 ++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/src/php/tests/interop/interop_client.php b/src/php/tests/interop/interop_client.php index c5bb7c490e2..e3c234e8695 100755 --- a/src/php/tests/interop/interop_client.php +++ b/src/php/tests/interop/interop_client.php @@ -388,6 +388,64 @@ function timeoutOnSleepingServer($stub) 'Call status was not DEADLINE_EXCEEDED'); } +function customMetadata($stub) +{ + $ECHO_INITIAL_KEY = 'x-grpc-test-echo-initial'; + $ECHO_INITIAL_VALUE = 'test_initial_metadata_value'; + $ECHO_TRAILING_KEY = 'x-grpc-test-echo-trailing-bin'; + $ECHO_TRAILING_VALUE = 'ababab'; + $request_len = 271828; + $response_len = 314159; + + $request = new grpc\testing\SimpleRequest(); + $request->setResponseType(grpc\testing\PayloadType::COMPRESSABLE); + $request->setResponseSize($response_len); + $payload = new grpc\testing\Payload(); + $payload->setType(grpc\testing\PayloadType::COMPRESSABLE); + $payload->setBody(str_repeat("\0", $request_len)); + $request->setPayload($payload); + + $metadata = [ + $ECHO_INITIAL_KEY => [$ECHO_INITIAL_VALUE], + $ECHO_TRAILING_KEY => [$ECHO_TRAILING_VALUE], + ]; + $call = $stub->UnaryCall($request, $metadata); + + $initial_metadata = $call->getMetadata(); + hardAssert(array_key_exists($ECHO_INITIAL_KEY, $initial_metadata), + 'Initial metadata does not contain expected key'); + hardAssert($initial_metadata[$ECHO_INITIAL_KEY][0] == + $ECHO_INITIAL_VALUE, + 'Incorrect initial metadata value'); + + list($result, $status) = $call->wait(); + hardAssert($status->code === Grpc\STATUS_OK, + 'Call did not complete successfully'); + + $trailing_metadata = $call->getTrailingMetadata(); + hardAssert(array_key_exists($ECHO_TRAILING_KEY, $trailing_metadata), + 'Trailing metadata does not contain expected key'); + hardAssert($trailing_metadata[$ECHO_TRAILING_KEY][0] == + $ECHO_TRAILING_VALUE, 'Incorrect trailing metadata value'); + + $streaming_call = $stub->FullDuplexCall($metadata); + + $streaming_request = new grpc\testing\StreamingOutputCallRequest(); + $streaming_request->setPayload($payload); + $streaming_call->write($streaming_request); + $streaming_call->writesDone(); + + hardAssert($streaming_call->getStatus()->code === Grpc\STATUS_OK, + 'Call did not complete successfully'); + + $streaming_trailing_metadata = $streaming_call->getTrailingMetadata(); + hardAssert(array_key_exists($ECHO_TRAILING_KEY, + $streaming_trailing_metadata), + 'Trailing metadata does not contain expected key'); + hardAssert($streaming_trailing_metadata[$ECHO_TRAILING_KEY][0] == + $ECHO_TRAILING_VALUE, 'Incorrect trailing metadata value'); +} + function _makeStub($args) { if (!array_key_exists('server_host', $args)) { @@ -514,6 +572,9 @@ function interop_main($args, $stub = false) case 'timeout_on_sleeping_server': timeoutOnSleepingServer($stub); break; + case 'custom_metadata': + customMetadata($stub); + break; case 'service_account_creds': serviceAccountCreds($stub, $args); break; From 89391406cddd8f0ff89992835d89baa716465447 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Fri, 17 Jun 2016 11:20:19 -0700 Subject: [PATCH 1157/1894] php: implement 2 more interop tests --- src/php/tests/interop/interop_client.php | 45 ++++++++++++++++++++++++ src/php/tests/interop/messages.proto | 38 +++++++++++++++++--- src/php/tests/interop/test.proto | 3 ++ 3 files changed, 82 insertions(+), 4 deletions(-) diff --git a/src/php/tests/interop/interop_client.php b/src/php/tests/interop/interop_client.php index e3c234e8695..92a27d17aad 100755 --- a/src/php/tests/interop/interop_client.php +++ b/src/php/tests/interop/interop_client.php @@ -446,6 +446,45 @@ function customMetadata($stub) $ECHO_TRAILING_VALUE, 'Incorrect trailing metadata value'); } +function statusCodeAndMessage($stub) +{ + $echo_status = new grpc\testing\EchoStatus(); + $echo_status->setCode(2); + $echo_status->setMessage("test status message"); + + $request = new grpc\testing\SimpleRequest(); + $request->setResponseStatus($echo_status); + + $call = $stub->UnaryCall($request); + list($result, $status) = $call->wait(); + + hardAssert($status->code === 2, + 'Received unexpected status code'); + hardAssert($status->details === "test status message", + 'Received unexpected status details'); + + $streaming_call = $stub->FullDuplexCall(); + + $streaming_request = new grpc\testing\StreamingOutputCallRequest(); + $streaming_request->setResponseStatus($echo_status); + $streaming_call->write($streaming_request); + $streaming_call->writesDone(); + + $status = $streaming_call->getStatus(); + hardAssert($status->code === 2, + 'Received unexpected status code'); + hardAssert($status->details === "test status message", + 'Received unexpected status details'); +} + +function unimplementedMethod($stub) +{ + $call = $stub->UnimplementedCall(new grpc\testing\EmptyMessage()); + list($result, $status) = $call->wait(); + hardAssert($status->code === Grpc\STATUS_UNIMPLEMENTED, + 'Received unexpected status code'); +} + function _makeStub($args) { if (!array_key_exists('server_host', $args)) { @@ -575,6 +614,12 @@ function interop_main($args, $stub = false) case 'custom_metadata': customMetadata($stub); break; + case 'status_code_and_message': + statusCodeAndMessage($stub); + break; + case 'unimplemented_method': + unimplementedMethod($stub); + break; case 'service_account_creds': serviceAccountCreds($stub, $args); break; diff --git a/src/php/tests/interop/messages.proto b/src/php/tests/interop/messages.proto index de0b1a23205..44e3c3b8f97 100644 --- a/src/php/tests/interop/messages.proto +++ b/src/php/tests/interop/messages.proto @@ -1,5 +1,5 @@ -// Copyright 2015, Google Inc. +// Copyright 2015-2016, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -41,9 +41,6 @@ enum PayloadType { // Uncompressable binary format. UNCOMPRESSABLE = 1; - - // Randomly chosen from all other formats defined in this enum. - RANDOM = 2; } // A block of data, to simply increase gRPC message size. @@ -54,6 +51,13 @@ message Payload { optional bytes body = 2; } +// A protobuf representation for grpc status. This is used by test +// clients to specify a status that the server should attempt to return. +message EchoStatus { + optional int32 code = 1; + optional string message = 2; +} + // Unary request. message SimpleRequest { // Desired payload type in the response from the server. @@ -72,6 +76,12 @@ message SimpleRequest { // Whether SimpleResponse should include OAuth scope. optional bool fill_oauth_scope = 5; + + // Whether to request the server to compress the response. + optional bool request_compressed_response = 6; + + // Whether server should return a given status + optional EchoStatus response_status = 7; } // Unary response, as configured by the request. @@ -123,6 +133,12 @@ message StreamingOutputCallRequest { // Optional input payload sent along with the request. optional Payload payload = 3; + + // Whether to request the server to compress the response. + optional bool request_compressed_response = 6; + + // Whether server should return a given status + optional EchoStatus response_status = 7; } // Server-streaming response, as configured by the request and parameters. @@ -130,3 +146,17 @@ message StreamingOutputCallResponse { // Payload to increase response size. optional Payload payload = 1; } + +// For reconnect interop test only. +// Client tells server what reconnection parameters it used. +message ReconnectParams { + optional int32 max_reconnect_backoff_ms = 1; +} + +// For reconnect interop test only. +// Server tells client whether its reconnects are following the spec and the +// reconnect backoffs it saw. +message ReconnectInfo { + optional bool passed = 1; + repeated int32 backoff_ms = 2; +} diff --git a/src/php/tests/interop/test.proto b/src/php/tests/interop/test.proto index 0d169e7f640..da03237a936 100644 --- a/src/php/tests/interop/test.proto +++ b/src/php/tests/interop/test.proto @@ -68,4 +68,7 @@ service TestService { // first request. rpc HalfDuplexCall(stream StreamingOutputCallRequest) returns (stream StreamingOutputCallResponse); + + // An unimplemented method on the server + rpc UnimplementedCall(grpc.testing.EmptyMessage) returns (grpc.testing.EmptyMessage); } From 83d8e3740e28080c4dff1e3660a4f2a1b843ce14 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Fri, 17 Jun 2016 11:53:33 -0700 Subject: [PATCH 1158/1894] php: run advanced interop tests --- tools/run_tests/run_interop_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index 5aaefb1ae14..0787637d758 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -252,7 +252,7 @@ class PHPLanguage: return {} def unimplemented_test_cases(self): - return _SKIP_ADVANCED + _SKIP_COMPRESSION + return _SKIP_COMPRESSION def unimplemented_test_cases_server(self): return [] From dc44e179507697ba23ce2d6180872af660b185a9 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 17 Jun 2016 12:47:10 -0700 Subject: [PATCH 1159/1894] Added third_party/protobuf/src to protoc's include path --- Makefile | 52 ++++++++++++++++++------------------- templates/Makefile.template | 4 +-- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Makefile b/Makefile index f500c7472f1..3df98b9f386 100644 --- a/Makefile +++ b/Makefile @@ -1891,12 +1891,12 @@ else $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.pb.cc: src/proto/grpc/lb/v1/load_balancer.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.grpc.pb.cc: src/proto/grpc/lb/v1/load_balancer.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1906,12 +1906,12 @@ else $(GENDIR)/src/proto/grpc/testing/compiler_test.pb.cc: src/proto/grpc/testing/compiler_test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/compiler_test.grpc.pb.cc: src/proto/grpc/testing/compiler_test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1921,12 +1921,12 @@ else $(GENDIR)/src/proto/grpc/testing/control.pb.cc: src/proto/grpc/testing/control.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc: src/proto/grpc/testing/control.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(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 $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1936,12 +1936,12 @@ else $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc: src/proto/grpc/testing/duplicate/echo_duplicate.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc: src/proto/grpc/testing/duplicate/echo_duplicate.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1951,12 +1951,12 @@ else $(GENDIR)/src/proto/grpc/testing/echo.pb.cc: src/proto/grpc/testing/echo.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc: src/proto/grpc/testing/echo.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1966,12 +1966,12 @@ else $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc: src/proto/grpc/testing/echo_messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc: src/proto/grpc/testing/echo_messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1981,12 +1981,12 @@ else $(GENDIR)/src/proto/grpc/testing/empty.pb.cc: src/proto/grpc/testing/empty.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc: src/proto/grpc/testing/empty.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1996,12 +1996,12 @@ else $(GENDIR)/src/proto/grpc/testing/messages.pb.cc: src/proto/grpc/testing/messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc: src/proto/grpc/testing/messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -2011,12 +2011,12 @@ else $(GENDIR)/src/proto/grpc/testing/metrics.pb.cc: src/proto/grpc/testing/metrics.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/metrics.grpc.pb.cc: src/proto/grpc/testing/metrics.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -2026,12 +2026,12 @@ else $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc: src/proto/grpc/testing/payloads.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc: src/proto/grpc/testing/payloads.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -2041,12 +2041,12 @@ 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 $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(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 $(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 $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -2056,12 +2056,12 @@ else $(GENDIR)/src/proto/grpc/testing/stats.pb.cc: src/proto/grpc/testing/stats.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc: src/proto/grpc/testing/stats.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -2071,12 +2071,12 @@ else $(GENDIR)/src/proto/grpc/testing/test.pb.cc: src/proto/grpc/testing/test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc: src/proto/grpc/testing/test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc $(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) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif diff --git a/templates/Makefile.template b/templates/Makefile.template index 079fef65ae8..f3e21c10ba4 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -1227,12 +1227,12 @@ $(GENDIR)/${p}.pb.cc: ${p}.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) ${' '.join('$(GENDIR)/%s.pb.cc' % q for q in proto_deps.get(p, []))} $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/${p}.grpc.pb.cc: ${p}.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) ${' '.join('$(GENDIR)/%s.pb.cc $(GENDIR)/%s.grpc.pb.cc' % (q,q) for q in proto_deps.get(p, []))} $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif % endfor From e68ed6f8f4d838fe588a381e57025341961dc66b Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 17 Jun 2016 12:49:14 -0700 Subject: [PATCH 1160/1894] Added third_party/protobuf/src to protoc's include path --- Makefile | 52 ++++++++++++++++++------------------- templates/Makefile.template | 4 +-- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/Makefile b/Makefile index 6eccd06952c..923e7472d06 100644 --- a/Makefile +++ b/Makefile @@ -1891,12 +1891,12 @@ else $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.pb.cc: src/proto/grpc/lb/v1/load_balancer.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.grpc.pb.cc: src/proto/grpc/lb/v1/load_balancer.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1906,12 +1906,12 @@ else $(GENDIR)/src/proto/grpc/testing/compiler_test.pb.cc: src/proto/grpc/testing/compiler_test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/compiler_test.grpc.pb.cc: src/proto/grpc/testing/compiler_test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1921,12 +1921,12 @@ else $(GENDIR)/src/proto/grpc/testing/control.pb.cc: src/proto/grpc/testing/control.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc $(GENDIR)/src/proto/grpc/testing/stats.pb.cc $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/control.grpc.pb.cc: src/proto/grpc/testing/control.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(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 $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1936,12 +1936,12 @@ else $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.pb.cc: src/proto/grpc/testing/duplicate/echo_duplicate.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/duplicate/echo_duplicate.grpc.pb.cc: src/proto/grpc/testing/duplicate/echo_duplicate.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1951,12 +1951,12 @@ else $(GENDIR)/src/proto/grpc/testing/echo.pb.cc: src/proto/grpc/testing/echo.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/echo.grpc.pb.cc: src/proto/grpc/testing/echo.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1966,12 +1966,12 @@ else $(GENDIR)/src/proto/grpc/testing/echo_messages.pb.cc: src/proto/grpc/testing/echo_messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/echo_messages.grpc.pb.cc: src/proto/grpc/testing/echo_messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1981,12 +1981,12 @@ else $(GENDIR)/src/proto/grpc/testing/empty.pb.cc: src/proto/grpc/testing/empty.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc: src/proto/grpc/testing/empty.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -1996,12 +1996,12 @@ else $(GENDIR)/src/proto/grpc/testing/messages.pb.cc: src/proto/grpc/testing/messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/messages.grpc.pb.cc: src/proto/grpc/testing/messages.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -2011,12 +2011,12 @@ else $(GENDIR)/src/proto/grpc/testing/metrics.pb.cc: src/proto/grpc/testing/metrics.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/metrics.grpc.pb.cc: src/proto/grpc/testing/metrics.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -2026,12 +2026,12 @@ else $(GENDIR)/src/proto/grpc/testing/payloads.pb.cc: src/proto/grpc/testing/payloads.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/payloads.grpc.pb.cc: src/proto/grpc/testing/payloads.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -2041,12 +2041,12 @@ 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 $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(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 $(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 $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -2056,12 +2056,12 @@ else $(GENDIR)/src/proto/grpc/testing/stats.pb.cc: src/proto/grpc/testing/stats.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/stats.grpc.pb.cc: src/proto/grpc/testing/stats.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif ifeq ($(NO_PROTOC),true) @@ -2071,12 +2071,12 @@ else $(GENDIR)/src/proto/grpc/testing/test.pb.cc: src/proto/grpc/testing/test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/messages.pb.cc $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/src/proto/grpc/testing/test.grpc.pb.cc: src/proto/grpc/testing/test.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) $(GENDIR)/src/proto/grpc/testing/empty.pb.cc $(GENDIR)/src/proto/grpc/testing/empty.grpc.pb.cc $(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) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif diff --git a/templates/Makefile.template b/templates/Makefile.template index 079fef65ae8..f3e21c10ba4 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -1227,12 +1227,12 @@ $(GENDIR)/${p}.pb.cc: ${p}.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) ${' '.join('$(GENDIR)/%s.pb.cc' % q for q in proto_deps.get(p, []))} $(E) "[PROTOC] Generating protobuf CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --cpp_out=$(GENDIR) $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --cpp_out=$(GENDIR) $< $(GENDIR)/${p}.grpc.pb.cc: ${p}.proto $(PROTOBUF_DEP) $(PROTOC_PLUGINS) ${' '.join('$(GENDIR)/%s.pb.cc $(GENDIR)/%s.grpc.pb.cc' % (q,q) for q in proto_deps.get(p, []))} $(E) "[GRPC] Generating gRPC's protobuf service CC file from $<" $(Q) mkdir -p `dirname $@` - $(Q) $(PROTOC) --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< + $(Q) $(PROTOC) -Ithird_party/protobuf/src -I. --grpc_out=$(GENDIR) --plugin=protoc-gen-grpc=$(BINDIR)/$(CONFIG)/grpc_cpp_plugin $< endif % endfor From a66e075144fe3219ea2bf0371e502286c51ddebc Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Fri, 17 Jun 2016 13:06:36 -0700 Subject: [PATCH 1161/1894] php: there is an unimplemented service --- src/php/tests/interop/interop_client.php | 6 +++++- src/php/tests/interop/test.proto | 8 ++++++-- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/php/tests/interop/interop_client.php b/src/php/tests/interop/interop_client.php index 92a27d17aad..43b3199d92c 100755 --- a/src/php/tests/interop/interop_client.php +++ b/src/php/tests/interop/interop_client.php @@ -569,7 +569,11 @@ function _makeStub($args) $opts['update_metadata'] = $update_metadata; } - $stub = new grpc\testing\TestServiceClient($server_address, $opts); + if ($test_case == 'unimplemented_method') { + $stub = new grpc\testing\UnimplementedServiceClient($server_address, $opts); + } else { + $stub = new grpc\testing\TestServiceClient($server_address, $opts); + } return $stub; } diff --git a/src/php/tests/interop/test.proto b/src/php/tests/interop/test.proto index da03237a936..57ef30ee1c1 100644 --- a/src/php/tests/interop/test.proto +++ b/src/php/tests/interop/test.proto @@ -1,5 +1,5 @@ -// Copyright 2015, Google Inc. +// Copyright 2015-2016, Google Inc. // All rights reserved. // // Redistribution and use in source and binary forms, with or without @@ -68,7 +68,11 @@ service TestService { // first request. rpc HalfDuplexCall(stream StreamingOutputCallRequest) returns (stream StreamingOutputCallResponse); +} - // An unimplemented method on the server +// A simple service NOT implemented at servers so clients can test for +// that case. +service UnimplementedService { + // A call that no server should implement rpc UnimplementedCall(grpc.testing.EmptyMessage) returns (grpc.testing.EmptyMessage); } From 7264f14b5551d16f2c1252332842585f594ed05a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 17 Jun 2016 13:44:55 -0700 Subject: [PATCH 1162/1894] Cleanup spam --- src/core/lib/security/transport/handshake.c | 23 --------------------- 1 file changed, 23 deletions(-) diff --git a/src/core/lib/security/transport/handshake.c b/src/core/lib/security/transport/handshake.c index 45af6cb08af..b374ca7633b 100644 --- a/src/core/lib/security/transport/handshake.c +++ b/src/core/lib/security/transport/handshake.c @@ -66,17 +66,6 @@ typedef struct { gpr_refcount refs; } grpc_security_handshake; -static void dump_state(const char *state, grpc_security_handshake *h, - grpc_error *error) { - gpr_timespec ttl = - gpr_time_sub(h->timer.deadline, gpr_now(h->timer.deadline.clock_type)); - const char *msg = grpc_error_string(error); - gpr_log(GPR_DEBUG, "%p: %s ttl=%" PRId64 ".%09d err=%s", h, state, ttl.tv_sec, - ttl.tv_nsec, msg); - grpc_error_free_string(msg); - GRPC_ERROR_UNREF(error); -} - static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, void *setup, grpc_error *error); @@ -127,7 +116,6 @@ static void unref_handshake(grpc_security_handshake *h) { static void security_handshake_done(grpc_exec_ctx *exec_ctx, grpc_security_handshake *h, grpc_error *error) { - dump_state("done", h, GRPC_ERROR_REF(error)); grpc_timer_cancel(exec_ctx, &h->timer); if (!h->is_client_side) { security_connector_remove_handshake(h); @@ -156,9 +144,6 @@ static void on_peer_checked(grpc_exec_ctx *exec_ctx, void *user_data, grpc_security_status status, grpc_auth_context *auth_context) { grpc_security_handshake *h = user_data; - dump_state("on_peer_checked", h, - grpc_error_set_int(GRPC_ERROR_CREATE("on_peer_checked"), - GRPC_ERROR_INT_SECURITY_STATUS, status)); tsi_frame_protector *protector; tsi_result result; if (status != GRPC_SECURITY_OK) { @@ -191,9 +176,6 @@ static void check_peer(grpc_exec_ctx *exec_ctx, grpc_security_handshake *h) { tsi_peer peer; tsi_result result = tsi_handshaker_extract_peer(h->handshaker, &peer); - dump_state( - "check_peer", h, - grpc_set_tsi_error_result(GRPC_ERROR_CREATE("peer_extraction"), result)); if (result != TSI_OK) { security_handshake_done( exec_ctx, h, grpc_set_tsi_error_result( @@ -210,7 +192,6 @@ static void send_handshake_bytes_to_peer(grpc_exec_ctx *exec_ctx, tsi_result result = TSI_OK; gpr_slice to_send; - dump_state("send_handshake_bytes_to_peer", h, GRPC_ERROR_NONE); do { size_t to_send_size = h->handshake_buffer_size - offset; result = tsi_handshaker_get_bytes_to_send_to_peer( @@ -250,7 +231,6 @@ static void on_handshake_data_received_from_peer(grpc_exec_ctx *exec_ctx, size_t num_left_overs; int has_left_overs_in_current_slice = 0; - dump_state("on_handshake_data_received_from_peer", h, GRPC_ERROR_REF(error)); if (error != GRPC_ERROR_NONE) { security_handshake_done( exec_ctx, h, @@ -314,7 +294,6 @@ static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, void *handshake, grpc_error *error) { grpc_security_handshake *h = handshake; - dump_state("on_handshake_data_sent_to_peer", h, GRPC_ERROR_REF(error)); /* Make sure that write is OK. */ if (error != GRPC_ERROR_NONE) { if (handshake != NULL) @@ -337,7 +316,6 @@ static void on_handshake_data_sent_to_peer(grpc_exec_ctx *exec_ctx, static void on_timeout(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { grpc_security_handshake *h = arg; - dump_state("on_timeout", h, GRPC_ERROR_REF(error)); if (error == GRPC_ERROR_NONE) { grpc_endpoint_shutdown(exec_ctx, h->wrapped_endpoint); } @@ -368,7 +346,6 @@ void grpc_do_security_handshake( gpr_slice_buffer_init(&h->left_overs); gpr_slice_buffer_init(&h->outgoing); gpr_slice_buffer_init(&h->incoming); - dump_state("grpc_do_security_handshake", h, GRPC_ERROR_NONE); if (!is_client_side) { grpc_server_security_connector *server_connector = (grpc_server_security_connector *)connector; From 955a364e340cc1954938ae2269693b0a57bec389 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 17 Jun 2016 13:48:03 -0700 Subject: [PATCH 1163/1894] Add bad_server_response_test --- Makefile | 36 ++ build.yaml | 11 + examples/cpp/helloworld/greeter_client.cc | 2 + test/core/end2end/bad_server_response_test.c | 335 ++++++++++++++++++ tools/run_tests/sources_and_headers.json | 17 + tools/run_tests/tests.json | 21 ++ vsprojects/buildtests_c.sln | 28 ++ .../bad_server_response_test.vcxproj | 202 +++++++++++ .../bad_server_response_test.vcxproj.filters | 21 ++ 9 files changed, 673 insertions(+) create mode 100644 test/core/end2end/bad_server_response_test.c create mode 100644 vsprojects/vcxproj/test/bad_server_response_test/bad_server_response_test.vcxproj create mode 100644 vsprojects/vcxproj/test/bad_server_response_test/bad_server_response_test.vcxproj.filters diff --git a/Makefile b/Makefile index da841af6b5d..5d768357783 100644 --- a/Makefile +++ b/Makefile @@ -889,6 +889,7 @@ algorithm_test: $(BINDIR)/$(CONFIG)/algorithm_test alloc_test: $(BINDIR)/$(CONFIG)/alloc_test alpn_test: $(BINDIR)/$(CONFIG)/alpn_test api_fuzzer: $(BINDIR)/$(CONFIG)/api_fuzzer +bad_server_response_test: $(BINDIR)/$(CONFIG)/bad_server_response_test bin_encoder_test: $(BINDIR)/$(CONFIG)/bin_encoder_test census_context_test: $(BINDIR)/$(CONFIG)/census_context_test channel_create_test: $(BINDIR)/$(CONFIG)/channel_create_test @@ -1226,6 +1227,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/algorithm_test \ $(BINDIR)/$(CONFIG)/alloc_test \ $(BINDIR)/$(CONFIG)/alpn_test \ + $(BINDIR)/$(CONFIG)/bad_server_response_test \ $(BINDIR)/$(CONFIG)/bin_encoder_test \ $(BINDIR)/$(CONFIG)/census_context_test \ $(BINDIR)/$(CONFIG)/channel_create_test \ @@ -1481,6 +1483,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/alloc_test || ( echo test alloc_test failed ; exit 1 ) $(E) "[RUN] Testing alpn_test" $(Q) $(BINDIR)/$(CONFIG)/alpn_test || ( echo test alpn_test failed ; exit 1 ) + $(E) "[RUN] Testing bad_server_response_test" + $(Q) $(BINDIR)/$(CONFIG)/bad_server_response_test || ( echo test bad_server_response_test failed ; exit 1 ) $(E) "[RUN] Testing bin_encoder_test" $(Q) $(BINDIR)/$(CONFIG)/bin_encoder_test || ( echo test bin_encoder_test failed ; exit 1 ) $(E) "[RUN] Testing census_context_test" @@ -6639,6 +6643,38 @@ endif endif +BAD_SERVER_RESPONSE_TEST_SRC = \ + test/core/end2end/bad_server_response_test.c \ + +BAD_SERVER_RESPONSE_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(BAD_SERVER_RESPONSE_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/bad_server_response_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/bad_server_response_test: $(BAD_SERVER_RESPONSE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LD) $(LDFLAGS) $(BAD_SERVER_RESPONSE_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/bad_server_response_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/end2end/bad_server_response_test.o: $(LIBDIR)/$(CONFIG)/libtest_tcp_server.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_bad_server_response_test: $(BAD_SERVER_RESPONSE_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(BAD_SERVER_RESPONSE_TEST_OBJS:.o=.dep) +endif +endif + + BIN_ENCODER_TEST_SRC = \ test/core/transport/chttp2/bin_encoder_test.c \ diff --git a/build.yaml b/build.yaml index 3d1e9b18835..5fa8ad75a1f 100644 --- a/build.yaml +++ b/build.yaml @@ -1247,6 +1247,17 @@ targets: - test/core/end2end/fuzzers/api_fuzzer_corpus dict: test/core/end2end/fuzzers/api_fuzzer.dictionary maxlen: 2048 +- name: bad_server_response_test + build: test + language: c + src: + - test/core/end2end/bad_server_response_test.c + deps: + - test_tcp_server + - grpc_test_util + - grpc + - gpr_test_util + - gpr - name: bin_encoder_test build: test language: c diff --git a/examples/cpp/helloworld/greeter_client.cc b/examples/cpp/helloworld/greeter_client.cc index bf3b63cb577..12209f37dfd 100644 --- a/examples/cpp/helloworld/greeter_client.cc +++ b/examples/cpp/helloworld/greeter_client.cc @@ -72,6 +72,8 @@ class GreeterClient { if (status.ok()) { return reply.message(); } else { + std::cout << status.error_code() << ": " << status.error_message() + << std::endl; return "RPC failed"; } } diff --git a/test/core/end2end/bad_server_response_test.c b/test/core/end2end/bad_server_response_test.c new file mode 100644 index 00000000000..6c00942fb75 --- /dev/null +++ b/test/core/end2end/bad_server_response_test.c @@ -0,0 +1,335 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ +#include + +#include +#include +#include +#include +#include +#include + +#include "src/core/ext/transport/chttp2/transport/internal.h" +#include "src/core/lib/iomgr/sockaddr.h" +#include "src/core/lib/support/string.h" +#include "test/core/end2end/cq_verifier.h" +#include "test/core/util/port.h" +#include "test/core/util/test_config.h" +#include "test/core/util/test_tcp_server.h" + +#define HTTP1_RESP \ + "HTTP/1.0 400 Bad Request\n" \ + "Content-Type: text/html; charset=UTF-8\n" \ + "Content-Length: 0\n" \ + "Date: Tue, 07 Jun 2016 17:43:20 GMT\n\n" + +#define HTTP2_RESP(STATUS_CODE) \ + "\x00\x00\x00\x04\x00\x00\x00\x00\x00" \ + "\x00\x00" \ + "7\x01\x04\x00\x00\x00\x01" \ + "\x10\x0e" \ + "content-length\x01" \ + "0" \ + "\x10\x0c" \ + "content-type\x09text/html" \ + "\x10\x07:status\x03" #STATUS_CODE + +#define UNPARSEABLE_RESP "Bad Request\n" + +#define HTTP1_DETAIL_MSG "Connection dropped: received http1.x response" + +#define HTTP2_DETAIL_MSG(STATUS_CODE) \ + "Received http2 header with status: " #STATUS_CODE + +#define UNPARSEABLE_DETAIL_MSG \ + "Connection dropped: received unparseable response" + +struct rpc_state { + char *target; + grpc_completion_queue *cq; + grpc_channel *channel; + grpc_call *call; + size_t incoming_data_length; + gpr_slice_buffer temp_incoming_buffer; + gpr_slice_buffer outgoing_buffer; + grpc_endpoint *tcp; + gpr_atm done_atm; + bool write_done; + const char *response_payload; + size_t response_payload_length; +}; + +static int server_port; +static struct rpc_state state; +static grpc_closure on_read; +static grpc_closure on_write; + +static void *tag(intptr_t t) { return (void *)t; } + +static void done_write(grpc_exec_ctx *exec_ctx, void *arg, bool success) { + GPR_ASSERT(success); + + gpr_atm_rel_store(&state.done_atm, 1); +} + +static void handle_write(grpc_exec_ctx *exec_ctx) { + gpr_slice slice = gpr_slice_from_copied_buffer(state.response_payload, + state.response_payload_length); + + gpr_slice_buffer_reset_and_unref(&state.outgoing_buffer); + gpr_slice_buffer_add(&state.outgoing_buffer, slice); + grpc_endpoint_write(exec_ctx, state.tcp, &state.outgoing_buffer, &on_write); +} + +static void handle_read(grpc_exec_ctx *exec_ctx, void *arg, bool success) { + GPR_ASSERT(success); + state.incoming_data_length += state.temp_incoming_buffer.length; + + size_t i; + gpr_log(GPR_DEBUG, "read: success=%d", success); + for (i = 0; i < state.temp_incoming_buffer.count; i++) { + char *dump = gpr_dump_slice(state.temp_incoming_buffer.slices[i], + GPR_DUMP_HEX | GPR_DUMP_ASCII); + gpr_log(GPR_DEBUG, "%s", dump); + gpr_free(dump); + } + + gpr_log(GPR_DEBUG, "got %d bytes, http2 connect string is %d bytes", + state.incoming_data_length, GRPC_CHTTP2_CLIENT_CONNECT_STRLEN); + if (state.incoming_data_length > GRPC_CHTTP2_CLIENT_CONNECT_STRLEN) { + handle_write(exec_ctx); + } else { + grpc_endpoint_read(exec_ctx, state.tcp, &state.temp_incoming_buffer, + &on_read); + } +} + +static void on_connect(grpc_exec_ctx *exec_ctx, void *arg, grpc_endpoint *tcp, + grpc_pollset *accepting_pollset, + grpc_tcp_server_acceptor *acceptor) { + test_tcp_server *server = arg; + grpc_closure_init(&on_read, handle_read, NULL); + grpc_closure_init(&on_write, done_write, NULL); + gpr_slice_buffer_init(&state.temp_incoming_buffer); + gpr_slice_buffer_init(&state.outgoing_buffer); + state.tcp = tcp; + grpc_endpoint_add_to_pollset(exec_ctx, tcp, server->pollset); + grpc_endpoint_read(exec_ctx, tcp, &state.temp_incoming_buffer, &on_read); +} + +static gpr_timespec n_sec_deadline(int seconds) { + return gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), + gpr_time_from_seconds(seconds, GPR_TIMESPAN)); +} + +static void start_rpc(int target_port, grpc_status_code expected_status, + const char *expected_detail) { + grpc_op ops[6]; + grpc_op *op; + grpc_metadata_array initial_metadata_recv; + grpc_metadata_array trailing_metadata_recv; + grpc_status_code status; + grpc_call_error error; + cq_verifier *cqv; + char *details = NULL; + size_t details_capacity = 0; + + state.cq = grpc_completion_queue_create(NULL); + cqv = cq_verifier_create(state.cq); + gpr_join_host_port(&state.target, "127.0.0.1", target_port); + state.channel = grpc_insecure_channel_create(state.target, NULL, NULL); + state.call = grpc_channel_create_call( + state.channel, NULL, GRPC_PROPAGATE_DEFAULTS, state.cq, "/Service/Method", + "localhost", gpr_inf_future(GPR_CLOCK_REALTIME), NULL); + + grpc_metadata_array_init(&initial_metadata_recv); + grpc_metadata_array_init(&trailing_metadata_recv); + + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata = &initial_metadata_recv; + op->flags = 0; + op->reserved = NULL; + op++; + 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->data.recv_status_on_client.status_details_capacity = &details_capacity; + op->flags = 0; + op->reserved = NULL; + op++; + error = + grpc_call_start_batch(state.call, ops, (size_t)(op - ops), tag(1), NULL); + + GPR_ASSERT(GRPC_CALL_OK == error); + + cq_expect_completion(cqv, tag(1), 1); + cq_verify(cqv); + + gpr_log(GPR_DEBUG, "Rpc status: %d, details: %s", status, details); + GPR_ASSERT(status == expected_status); + GPR_ASSERT(0 == strcmp(details, expected_detail)); + gpr_free(details); + cq_verifier_destroy(cqv); +} + +static void cleanup_rpc(void) { + grpc_event ev; + gpr_slice_buffer_destroy(&state.temp_incoming_buffer); + gpr_slice_buffer_destroy(&state.outgoing_buffer); + grpc_call_destroy(state.call); + grpc_completion_queue_shutdown(state.cq); + do { + ev = grpc_completion_queue_next(state.cq, n_sec_deadline(1), NULL); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); + grpc_completion_queue_destroy(state.cq); + grpc_channel_destroy(state.channel); + gpr_free(state.target); +} + +typedef struct { + test_tcp_server *server; + gpr_event *signal_when_done; +} poll_args; + +static void actually_poll_server(void *arg) { + poll_args *pa = arg; + gpr_timespec deadline = n_sec_deadline(10); + while (true) { + bool done = gpr_atm_acq_load(&state.done_atm) != 0; + gpr_timespec time_left = + gpr_time_sub(deadline, gpr_now(GPR_CLOCK_REALTIME)); + gpr_log(GPR_DEBUG, "done=%d, time_left=%d.%09d", done, time_left.tv_sec, + time_left.tv_nsec); + if (done || gpr_time_cmp(time_left, gpr_time_0(GPR_TIMESPAN)) < 0) { + break; + } + test_tcp_server_poll(pa->server, 1); + } + gpr_event_set(pa->signal_when_done, (void *)1); + gpr_free(pa); +} + +static void poll_server_until_read_done(test_tcp_server *server, + gpr_event *signal_when_done) { + gpr_atm_rel_store(&state.done_atm, 0); + state.write_done = 0; + gpr_thd_id id; + poll_args *pa = gpr_malloc(sizeof(*pa)); + pa->server = server; + pa->signal_when_done = signal_when_done; + gpr_thd_new(&id, actually_poll_server, pa, NULL); +} + +static void run_test(const char *response_payload, + size_t response_payload_length, + grpc_status_code expected_status, + const char *expected_detail) { + test_tcp_server test_server; + server_port = grpc_pick_unused_port_or_die(); + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + gpr_event ev; + gpr_event_init(&ev); + + test_tcp_server_init(&test_server, on_connect, &test_server); + test_tcp_server_start(&test_server, server_port); + state.response_payload = response_payload; + state.response_payload_length = response_payload_length; + + /* poll server until sending out the response */ + poll_server_until_read_done(&test_server, &ev); + start_rpc(server_port, expected_status, expected_detail); + gpr_event_wait(&ev, gpr_inf_future(GPR_CLOCK_REALTIME)); + + /* clean up */ + grpc_endpoint_shutdown(&exec_ctx, state.tcp); + grpc_endpoint_destroy(&exec_ctx, state.tcp); + grpc_exec_ctx_finish(&exec_ctx); + cleanup_rpc(); + test_tcp_server_destroy(&test_server); +} + +int main(int argc, char **argv) { + grpc_test_init(argc, argv); + grpc_init(); + + /* status defined in hpack static table */ + run_test(HTTP2_RESP(204), sizeof(HTTP2_RESP(204)) - 1, GRPC_STATUS_CANCELLED, + HTTP2_DETAIL_MSG(204)); + + run_test(HTTP2_RESP(206), sizeof(HTTP2_RESP(206)) - 1, GRPC_STATUS_CANCELLED, + HTTP2_DETAIL_MSG(206)); + + run_test(HTTP2_RESP(304), sizeof(HTTP2_RESP(304)) - 1, GRPC_STATUS_CANCELLED, + HTTP2_DETAIL_MSG(304)); + + run_test(HTTP2_RESP(400), sizeof(HTTP2_RESP(400)) - 1, GRPC_STATUS_CANCELLED, + HTTP2_DETAIL_MSG(400)); + + run_test(HTTP2_RESP(404), sizeof(HTTP2_RESP(404)) - 1, GRPC_STATUS_CANCELLED, + HTTP2_DETAIL_MSG(404)); + + run_test(HTTP2_RESP(500), sizeof(HTTP2_RESP(500)) - 1, GRPC_STATUS_CANCELLED, + HTTP2_DETAIL_MSG(500)); + + /* status not defined in hpack static table */ + run_test(HTTP2_RESP(401), sizeof(HTTP2_RESP(401)) - 1, GRPC_STATUS_CANCELLED, + HTTP2_DETAIL_MSG(401)); + + run_test(HTTP2_RESP(403), sizeof(HTTP2_RESP(403)) - 1, GRPC_STATUS_CANCELLED, + HTTP2_DETAIL_MSG(403)); + + run_test(HTTP2_RESP(502), sizeof(HTTP2_RESP(502)) - 1, GRPC_STATUS_CANCELLED, + HTTP2_DETAIL_MSG(502)); + + /* unparseable response */ + run_test(UNPARSEABLE_RESP, sizeof(UNPARSEABLE_RESP) - 1, + GRPC_STATUS_UNAVAILABLE, UNPARSEABLE_DETAIL_MSG); + + /* http1 response */ + run_test(HTTP1_RESP, sizeof(HTTP1_RESP) - 1, GRPC_STATUS_UNAVAILABLE, + HTTP1_DETAIL_MSG); + + grpc_shutdown(); + return 0; +} diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 4cd5a816fb2..c1f98ddfc39 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -79,6 +79,23 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util", + "test_tcp_server" + ], + "headers": [], + "language": "c", + "name": "bad_server_response_test", + "src": [ + "test/core/end2end/bad_server_response_test.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "grpc", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 2304ce72df8..08259ed5e7c 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -85,6 +85,27 @@ "windows" ] }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "bad_server_response_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index ca43dad1e68..76cf9a59ab7 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -56,6 +56,18 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bad_client_test", "vcxproj\ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bad_server_response_test", "vcxproj\test\bad_server_response_test\bad_server_response_test.vcxproj", "{2B73DA77-EF66-362C-24AD-317E3B8B28C1}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {E3110C46-A148-FF65-08FD-3324829BE7FE} = {E3110C46-A148-FF65-08FD-3324829BE7FE} + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "badreq_bad_client_test", "vcxproj\test\badreq_bad_client_test\badreq_bad_client_test.vcxproj", "{8A811C28-E04E-A444-E4C1-7588DF5B90AE}" ProjectSection(myProperties) = preProject lib = "False" @@ -1502,6 +1514,22 @@ Global {BA67B418-B699-E41A-9CC4-0279C49481A5}.Release-DLL|Win32.Build.0 = Release|Win32 {BA67B418-B699-E41A-9CC4-0279C49481A5}.Release-DLL|x64.ActiveCfg = Release|x64 {BA67B418-B699-E41A-9CC4-0279C49481A5}.Release-DLL|x64.Build.0 = Release|x64 + {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Debug|Win32.ActiveCfg = Debug|Win32 + {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Debug|x64.ActiveCfg = Debug|x64 + {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Release|Win32.ActiveCfg = Release|Win32 + {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Release|x64.ActiveCfg = Release|x64 + {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Debug|Win32.Build.0 = Debug|Win32 + {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Debug|x64.Build.0 = Debug|x64 + {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Release|Win32.Build.0 = Release|Win32 + {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Release|x64.Build.0 = Release|x64 + {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Debug-DLL|x64.Build.0 = Debug|x64 + {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Release-DLL|Win32.Build.0 = Release|Win32 + {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Release-DLL|x64.ActiveCfg = Release|x64 + {2B73DA77-EF66-362C-24AD-317E3B8B28C1}.Release-DLL|x64.Build.0 = Release|x64 {8A811C28-E04E-A444-E4C1-7588DF5B90AE}.Debug|Win32.ActiveCfg = Debug|Win32 {8A811C28-E04E-A444-E4C1-7588DF5B90AE}.Debug|x64.ActiveCfg = Debug|x64 {8A811C28-E04E-A444-E4C1-7588DF5B90AE}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/test/bad_server_response_test/bad_server_response_test.vcxproj b/vsprojects/vcxproj/test/bad_server_response_test/bad_server_response_test.vcxproj new file mode 100644 index 00000000000..4676f3f6b6d --- /dev/null +++ b/vsprojects/vcxproj/test/bad_server_response_test/bad_server_response_test.vcxproj @@ -0,0 +1,202 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {2B73DA77-EF66-362C-24AD-317E3B8B28C1} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + bad_server_response_test + static + Debug + static + Debug + + + bad_server_response_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {E3110C46-A148-FF65-08FD-3324829BE7FE} + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/bad_server_response_test/bad_server_response_test.vcxproj.filters b/vsprojects/vcxproj/test/bad_server_response_test/bad_server_response_test.vcxproj.filters new file mode 100644 index 00000000000..13b11ec9472 --- /dev/null +++ b/vsprojects/vcxproj/test/bad_server_response_test/bad_server_response_test.vcxproj.filters @@ -0,0 +1,21 @@ + + + + + test\core\end2end + + + + + + {d29396a6-e5cf-3f1f-a33d-d1e9f2fa1b38} + + + {332f26c8-dd3f-091d-9e10-5b704377e991} + + + {158709cc-74ed-274f-fe50-b8e64cc9830e} + + + + From 3c65d24fabbee3f88fc505b54d82280c31b5e0f5 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 17 Jun 2016 15:18:18 -0700 Subject: [PATCH 1164/1894] updated stress test with new tests cases --- test/cpp/interop/stress_interop_client.cc | 14 +++++++-- test/cpp/interop/stress_interop_client.h | 36 +++++++++++++---------- 2 files changed, 31 insertions(+), 19 deletions(-) diff --git a/test/cpp/interop/stress_interop_client.cc b/test/cpp/interop/stress_interop_client.cc index aa95682e741..1d5fc80cf26 100644 --- a/test/cpp/interop/stress_interop_client.cc +++ b/test/cpp/interop/stress_interop_client.cc @@ -138,8 +138,12 @@ bool StressTestInteropClient::RunTest(TestCaseType test_case) { is_success = interop_client_->DoLargeUnary(); break; } - case LARGE_COMPRESSED_UNARY: { - is_success = interop_client_->DoLargeCompressedUnary(); + case CLIENT_COMPRESSED_UNARY: { + is_success = interop_client_->DoClientCompressedUnary(); + break; + } + case CLIENT_COMPRESSED_STREAMING: { + is_success = interop_client_->DoClientCompressedStreaming(); break; } case CLIENT_STREAMING: { @@ -150,8 +154,12 @@ bool StressTestInteropClient::RunTest(TestCaseType test_case) { is_success = interop_client_->DoResponseStreaming(); break; } + case SERVER_COMPRESSED_UNARY: { + is_success = interop_client_->DoServerCompressedUnary(); + break; + } case SERVER_COMPRESSED_STREAMING: { - is_success = interop_client_->DoResponseCompressedStreaming(); + is_success = interop_client_->DoServerCompressedStreaming(); break; } case SLOW_CONSUMER: { diff --git a/test/cpp/interop/stress_interop_client.h b/test/cpp/interop/stress_interop_client.h index aa93b58b4a7..cf6a7134739 100644 --- a/test/cpp/interop/stress_interop_client.h +++ b/test/cpp/interop/stress_interop_client.h @@ -51,29 +51,33 @@ using std::vector; enum TestCaseType { UNKNOWN_TEST = -1, - EMPTY_UNARY = 0, - LARGE_UNARY = 1, - LARGE_COMPRESSED_UNARY = 2, - CLIENT_STREAMING = 3, - SERVER_STREAMING = 4, - SERVER_COMPRESSED_STREAMING = 5, - SLOW_CONSUMER = 6, - HALF_DUPLEX = 7, - PING_PONG = 8, - CANCEL_AFTER_BEGIN = 9, - CANCEL_AFTER_FIRST_RESPONSE = 10, - TIMEOUT_ON_SLEEPING_SERVER = 11, - EMPTY_STREAM = 12, - STATUS_CODE_AND_MESSAGE = 13, - CUSTOM_METADATA = 14 + EMPTY_UNARY, + LARGE_UNARY, + CLIENT_COMPRESSED_UNARY, + CLIENT_COMPRESSED_STREAMING, + CLIENT_STREAMING, + SERVER_STREAMING, + SERVER_COMPRESSED_UNARY, + SERVER_COMPRESSED_STREAMING, + SLOW_CONSUMER, + HALF_DUPLEX, + PING_PONG, + CANCEL_AFTER_BEGIN, + CANCEL_AFTER_FIRST_RESPONSE, + TIMEOUT_ON_SLEEPING_SERVER, + EMPTY_STREAM, + STATUS_CODE_AND_MESSAGE, + CUSTOM_METADATA }; const vector> kTestCaseList = { {EMPTY_UNARY, "empty_unary"}, {LARGE_UNARY, "large_unary"}, - {LARGE_COMPRESSED_UNARY, "large_compressed_unary"}, + {CLIENT_COMPRESSED_UNARY, "client_compressed_unary"}, + {CLIENT_COMPRESSED_STREAMING, "client_compressed_streaming"}, {CLIENT_STREAMING, "client_streaming"}, {SERVER_STREAMING, "server_streaming"}, + {SERVER_COMPRESSED_UNARY, "server_compressed_unary"}, {SERVER_COMPRESSED_STREAMING, "server_compressed_streaming"}, {SLOW_CONSUMER, "slow_consumer"}, {HALF_DUPLEX, "half_duplex"}, From 7b4dc532dd37271f883f9b30f28c7dd50baf41cb Mon Sep 17 00:00:00 2001 From: vjpai Date: Fri, 17 Jun 2016 15:55:00 -0700 Subject: [PATCH 1165/1894] Stop using global namespace on a template param --- include/grpc++/ext/proto_server_reflection_plugin.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc++/ext/proto_server_reflection_plugin.h b/include/grpc++/ext/proto_server_reflection_plugin.h index 2b618672589..3e54882d41f 100644 --- a/include/grpc++/ext/proto_server_reflection_plugin.h +++ b/include/grpc++/ext/proto_server_reflection_plugin.h @@ -56,7 +56,7 @@ class ProtoServerReflectionPlugin : public ::grpc::ServerBuilderPlugin { bool has_sync_methods() const GRPC_OVERRIDE; private: - std::shared_ptr< ::grpc::ProtoServerReflection> reflection_service_; + std::shared_ptr reflection_service_; }; // Add proto reflection plugin to ServerBuilder. This function should be called From 97fe0a6d5a5558825816b4201a91ab45a268107f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 17 Jun 2016 16:05:00 -0700 Subject: [PATCH 1166/1894] clang-format code --- src/core/ext/transport/chttp2/transport/parsing.c | 4 ++-- src/core/lib/surface/completion_queue.c | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index 91977d4571f..785134091f5 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -87,8 +87,8 @@ void grpc_chttp2_prepare_to_read( transport_global->settings[GRPC_SENT_SETTINGS], sizeof(transport_parsing->last_sent_settings)); transport_parsing->max_frame_size = - transport_global - ->settings[GRPC_ACKED_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; + transport_global->settings[GRPC_ACKED_SETTINGS] + [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; /* update the parsing view of incoming window */ while (grpc_chttp2_list_pop_unannounced_incoming_window_available( diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index eaad6148425..2cc6aa74e02 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -233,15 +233,16 @@ void grpc_cq_end_op(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc, #endif GPR_TIMER_BEGIN("grpc_cq_end_op", 0); - if (grpc_api_trace || (grpc_trace_operation_failures && error != GRPC_ERROR_NONE)) { + if (grpc_api_trace || + (grpc_trace_operation_failures && error != GRPC_ERROR_NONE)) { const char *errmsg = grpc_error_string(error); GRPC_API_TRACE( "grpc_cq_end_op(exec_ctx=%p, cc=%p, tag=%p, error=%s, done=%p, " "done_arg=%p, storage=%p)", 7, (exec_ctx, cc, tag, errmsg, done, done_arg, storage)); if (grpc_trace_operation_failures) { - gpr_log(GPR_ERROR, "Operation failed: tag=%p, error=%s", tag, errmsg); - } + gpr_log(GPR_ERROR, "Operation failed: tag=%p, error=%s", tag, errmsg); + } grpc_error_free_string(errmsg); } From 7cbfc3eba719b7ffec220bc8aabbc6163d53c280 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 17 Jun 2016 16:55:23 -0700 Subject: [PATCH 1167/1894] Adjust cpu_cost of some tests to better reflect reality --- build.yaml | 13 +++--- test/core/end2end/gen_build_yaml.py | 3 +- tools/run_tests/tests.json | 66 ++++++++++++++--------------- 3 files changed, 42 insertions(+), 40 deletions(-) diff --git a/build.yaml b/build.yaml index a83ebc595ad..48693aa8417 100644 --- a/build.yaml +++ b/build.yaml @@ -1456,7 +1456,7 @@ targets: - gpr_test_util - gpr - name: fling_stream_test - cpu_cost: 2 + cpu_cost: 1.5 build: test language: c src: @@ -1471,7 +1471,7 @@ targets: - linux - posix - name: fling_test - cpu_cost: 2 + cpu_cost: 1.5 build: test language: c src: @@ -1603,7 +1603,7 @@ targets: - gpr_test_util - gpr - name: gpr_stack_lockfree_test - cpu_cost: 10 + cpu_cost: 7 build: test language: c src: @@ -1620,7 +1620,7 @@ targets: - gpr_test_util - gpr - name: gpr_sync_test - cpu_cost: 10 + cpu_cost: 3 build: test language: c src: @@ -1629,7 +1629,7 @@ targets: - gpr_test_util - gpr - name: gpr_thd_test - cpu_cost: 10 + cpu_cost: 1 build: test language: c src: @@ -1954,6 +1954,7 @@ targets: - gpr_test_util - gpr - name: invalid_call_argument_test + cpu_cost: 0.1 build: test language: c src: @@ -2253,7 +2254,7 @@ targets: - linux - posix - name: tcp_posix_test - cpu_cost: 0.5 + cpu_cost: 0.2 build: test language: c src: diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index 3d3bec1a69e..5264f6e7163 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -118,7 +118,8 @@ END2END_TESTS = { 'ping_pong_streaming': default_test_options, 'ping': connectivity_test_options._replace(proxyable=False), 'registered_call': default_test_options, - 'request_with_flags': default_test_options._replace(proxyable=False), + 'request_with_flags': default_test_options._replace( + proxyable=False, cpu_cost=LOWCPU), 'request_with_payload': default_test_options, 'server_finishes_request': default_test_options, 'shutdown_finishes_calls': default_test_options, diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 86f7ea4a61c..dd743d61cd0 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -422,7 +422,7 @@ "mac", "posix" ], - "cpu_cost": 2, + "cpu_cost": 1.5, "exclude_configs": [], "flaky": false, "gtest": false, @@ -441,7 +441,7 @@ "mac", "posix" ], - "cpu_cost": 2, + "cpu_cost": 1.5, "exclude_configs": [], "flaky": false, "gtest": false, @@ -711,7 +711,7 @@ "posix", "windows" ], - "cpu_cost": 10, + "cpu_cost": 7, "exclude_configs": [], "flaky": false, "gtest": false, @@ -753,7 +753,7 @@ "posix", "windows" ], - "cpu_cost": 10, + "cpu_cost": 3, "exclude_configs": [], "flaky": false, "gtest": false, @@ -774,7 +774,7 @@ "posix", "windows" ], - "cpu_cost": 10, + "cpu_cost": 1, "exclude_configs": [], "flaky": false, "gtest": false, @@ -1226,7 +1226,7 @@ "posix", "windows" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "gtest": false, @@ -1662,7 +1662,7 @@ "mac", "posix" ], - "cpu_cost": 0.5, + "cpu_cost": 0.2, "exclude_configs": [], "flaky": false, "gtest": false, @@ -4999,7 +4999,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -5835,7 +5835,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -6641,7 +6641,7 @@ "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -7330,7 +7330,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -8129,7 +8129,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -8788,7 +8788,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -9551,7 +9551,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -10387,7 +10387,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -11193,7 +11193,7 @@ "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -12579,7 +12579,7 @@ "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -13251,7 +13251,7 @@ "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -13944,7 +13944,7 @@ "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -14751,7 +14751,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -15587,7 +15587,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -17016,7 +17016,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -17813,7 +17813,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -18627,7 +18627,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -19304,7 +19304,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -20081,7 +20081,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -20724,7 +20724,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -21465,7 +21465,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -22279,7 +22279,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -23631,7 +23631,7 @@ "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -24282,7 +24282,7 @@ "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -25002,7 +25002,7 @@ "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [ "msan" ], @@ -25726,7 +25726,7 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", From b544c291b05c179503e3c4ac427d23f15db580b2 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 17 Jun 2016 16:58:00 -0700 Subject: [PATCH 1168/1894] Adjust cpu_cost of some tests to better reflect reality --- test/core/end2end/gen_build_yaml.py | 12 +- tools/run_tests/tests.json | 268 ++++++++++++++-------------- 2 files changed, 139 insertions(+), 141 deletions(-) diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index 5264f6e7163..325d9b3cad0 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -89,13 +89,12 @@ END2END_TESTS = { 'binary_metadata': default_test_options, 'call_creds': default_test_options._replace(secure=True), 'cancel_after_accept': default_test_options._replace(cpu_cost=LOWCPU), - 'cancel_after_client_done': default_test_options._replace(cpu_cost=LOWCPU), + 'cancel_after_client_done': default_test_options, 'cancel_after_invoke': default_test_options._replace(cpu_cost=LOWCPU), 'cancel_before_invoke': default_test_options._replace(cpu_cost=LOWCPU), 'cancel_in_a_vacuum': default_test_options._replace(cpu_cost=LOWCPU), 'cancel_with_status': default_test_options._replace(cpu_cost=LOWCPU), - 'compressed_payload': default_test_options._replace(proxyable=False, - cpu_cost=LOWCPU), + 'compressed_payload': default_test_options._replace(proxyable=False), 'connectivity': connectivity_test_options._replace(proxyable=False, cpu_cost=LOWCPU), 'default_host': default_test_options._replace(needs_fullstack=True, @@ -111,10 +110,10 @@ END2END_TESTS = { 'invoke_large_request': default_test_options, 'large_metadata': default_test_options, 'max_concurrent_streams': default_test_options._replace(proxyable=False), - 'max_message_length': default_test_options._replace(cpu_cost=LOWCPU), + 'max_message_length': default_test_options, 'negative_deadline': default_test_options, 'no_op': default_test_options, - 'payload': default_test_options._replace(cpu_cost=LOWCPU), + 'payload': default_test_options, 'ping_pong_streaming': default_test_options, 'ping': connectivity_test_options._replace(proxyable=False), 'registered_call': default_test_options, @@ -124,8 +123,7 @@ END2END_TESTS = { 'server_finishes_request': default_test_options, 'shutdown_finishes_calls': default_test_options, 'shutdown_finishes_tags': default_test_options, - 'simple_delayed_request': connectivity_test_options._replace( - cpu_cost=LOWCPU), + 'simple_delayed_request': connectivity_test_options, 'simple_metadata': default_test_options, 'simple_request': default_test_options, 'trailing_metadata': default_test_options, diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index dd743d61cd0..d9893af662e 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -4449,7 +4449,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -4559,7 +4559,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -4845,7 +4845,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -4911,7 +4911,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -5109,7 +5109,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -5285,7 +5285,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -5395,7 +5395,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -5681,7 +5681,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -5747,7 +5747,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -5945,7 +5945,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -6116,7 +6116,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -6221,7 +6221,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -6494,7 +6494,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -6557,7 +6557,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -6746,7 +6746,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -6910,7 +6910,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -7010,7 +7010,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -7210,7 +7210,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -7270,7 +7270,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -7579,7 +7579,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -7689,7 +7689,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -7975,7 +7975,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -8041,7 +8041,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -8239,7 +8239,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -8388,7 +8388,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -8468,7 +8468,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -8676,7 +8676,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -8724,7 +8724,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -8868,7 +8868,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -9023,7 +9023,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -9133,7 +9133,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -9397,7 +9397,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -9463,7 +9463,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -9661,7 +9661,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -9837,7 +9837,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -9947,7 +9947,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -10233,7 +10233,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -10299,7 +10299,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -10497,7 +10497,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -10668,7 +10668,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -10773,7 +10773,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -11046,7 +11046,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -11109,7 +11109,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -11298,7 +11298,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -11466,7 +11466,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -11760,7 +11760,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -11823,7 +11823,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -11970,7 +11970,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -12138,7 +12138,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -12243,7 +12243,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -12453,7 +12453,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -12516,7 +12516,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -12831,7 +12831,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -12936,7 +12936,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -13125,7 +13125,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -13188,7 +13188,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -13503,7 +13503,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -13608,7 +13608,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -13818,7 +13818,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -13881,7 +13881,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -14201,7 +14201,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -14311,7 +14311,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -14597,7 +14597,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -14663,7 +14663,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -14861,7 +14861,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -15037,7 +15037,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -15147,7 +15147,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -15433,7 +15433,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -15499,7 +15499,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -15697,7 +15697,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -15868,7 +15868,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -16162,7 +16162,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -16225,7 +16225,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -16372,7 +16372,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -16536,7 +16536,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -16636,7 +16636,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -16876,7 +16876,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -16936,7 +16936,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -17116,7 +17116,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -17263,7 +17263,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -17373,7 +17373,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -17659,7 +17659,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -17725,7 +17725,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -17923,7 +17923,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -18077,7 +18077,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -18187,7 +18187,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -18473,7 +18473,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -18539,7 +18539,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -18737,7 +18737,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -18884,7 +18884,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -18984,7 +18984,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -19184,7 +19184,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -19244,7 +19244,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -19531,7 +19531,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -19641,7 +19641,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -19927,7 +19927,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -19993,7 +19993,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -20191,7 +20191,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -20324,7 +20324,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -20404,7 +20404,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -20612,7 +20612,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -20660,7 +20660,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -20804,7 +20804,7 @@ "ci_platforms": [ "linux" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -20937,7 +20937,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -21047,7 +21047,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -21311,7 +21311,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -21377,7 +21377,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -21575,7 +21575,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -21729,7 +21729,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -21839,7 +21839,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -22125,7 +22125,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -22191,7 +22191,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -22389,7 +22389,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -22539,7 +22539,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -22833,7 +22833,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -22896,7 +22896,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -23043,7 +23043,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -23190,7 +23190,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -23295,7 +23295,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -23505,7 +23505,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -23568,7 +23568,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -23862,7 +23862,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -23967,7 +23967,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -24156,7 +24156,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -24219,7 +24219,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -24519,7 +24519,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [ "msan" ], @@ -24634,7 +24634,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [ "msan" ], @@ -24864,7 +24864,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [ "msan" ], @@ -24933,7 +24933,7 @@ "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [ "msan" ], @@ -25246,7 +25246,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -25346,7 +25346,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -25586,7 +25586,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -25646,7 +25646,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -25826,7 +25826,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", From fab857eefc20a0dc96cd4e6a39a95892e3c105dc Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 17 Jun 2016 16:53:43 -0700 Subject: [PATCH 1169/1894] address review comments --- src/csharp/Grpc.Core.Tests/project.json | 3 +- .../Grpc.Examples.MathClient/project.json | 3 +- .../Grpc.Examples.MathServer/project.json | 3 +- src/csharp/Grpc.Examples.Tests/project.json | 3 +- src/csharp/Grpc.Examples/project.json | 3 +- .../Grpc.HealthCheck.Tests/project.json | 3 +- .../project.json | 3 +- .../project.json | 3 +- .../project.json | 3 +- .../project.json | 32 +++++++++++++++++++ .../Grpc.IntegrationTesting/project.json | 6 ++-- 11 files changed, 43 insertions(+), 22 deletions(-) create mode 100644 src/csharp/Grpc.IntegrationTesting.StressClient/project.json diff --git a/src/csharp/Grpc.Core.Tests/project.json b/src/csharp/Grpc.Core.Tests/project.json index 06718043142..13705a22227 100644 --- a/src/csharp/Grpc.Core.Tests/project.json +++ b/src/csharp/Grpc.Core.Tests/project.json @@ -11,8 +11,7 @@ }, "dependencies": { "Grpc.Core": { - "version": "0.0.1", - "taget": "project" + "target": "project" }, "Newtonsoft.Json": "8.0.3", "NUnit": "3.2.0", diff --git a/src/csharp/Grpc.Examples.MathClient/project.json b/src/csharp/Grpc.Examples.MathClient/project.json index 791cd1dcb80..be9e123ff8b 100644 --- a/src/csharp/Grpc.Examples.MathClient/project.json +++ b/src/csharp/Grpc.Examples.MathClient/project.json @@ -11,8 +11,7 @@ }, "dependencies": { "Grpc.Examples": { - "version": "1.0.0", - "taget": "project" + "target": "project" } }, "frameworks": { diff --git a/src/csharp/Grpc.Examples.MathServer/project.json b/src/csharp/Grpc.Examples.MathServer/project.json index 791cd1dcb80..be9e123ff8b 100644 --- a/src/csharp/Grpc.Examples.MathServer/project.json +++ b/src/csharp/Grpc.Examples.MathServer/project.json @@ -11,8 +11,7 @@ }, "dependencies": { "Grpc.Examples": { - "version": "1.0.0", - "taget": "project" + "target": "project" } }, "frameworks": { diff --git a/src/csharp/Grpc.Examples.Tests/project.json b/src/csharp/Grpc.Examples.Tests/project.json index 6ef440e27dd..86f06a5aa9b 100644 --- a/src/csharp/Grpc.Examples.Tests/project.json +++ b/src/csharp/Grpc.Examples.Tests/project.json @@ -11,8 +11,7 @@ }, "dependencies": { "Grpc.Examples": { - "version": "1.0.0", - "taget": "project" + "target": "project" }, "NUnit": "3.2.0", "NUnitLite": "3.2.0-*" diff --git a/src/csharp/Grpc.Examples/project.json b/src/csharp/Grpc.Examples/project.json index 4a3810596b0..610712f6460 100644 --- a/src/csharp/Grpc.Examples/project.json +++ b/src/csharp/Grpc.Examples/project.json @@ -5,8 +5,7 @@ "dependencies": { "Grpc.Core": { - "version": "0.0.1", - "taget": "project" + "target": "project" }, "Google.Protobuf": "3.0.0-beta3" }, diff --git a/src/csharp/Grpc.HealthCheck.Tests/project.json b/src/csharp/Grpc.HealthCheck.Tests/project.json index fde21f1b7e0..9b28d2b4ba0 100644 --- a/src/csharp/Grpc.HealthCheck.Tests/project.json +++ b/src/csharp/Grpc.HealthCheck.Tests/project.json @@ -11,8 +11,7 @@ }, "dependencies": { "Grpc.HealthCheck": { - "version": "0.0.1", - "taget": "project" + "target": "project" }, "NUnit": "3.2.0", "NUnitLite": "3.2.0-*" diff --git a/src/csharp/Grpc.IntegrationTesting.Client/project.json b/src/csharp/Grpc.IntegrationTesting.Client/project.json index a5a87f9882d..d8e47b1169b 100644 --- a/src/csharp/Grpc.IntegrationTesting.Client/project.json +++ b/src/csharp/Grpc.IntegrationTesting.Client/project.json @@ -11,8 +11,7 @@ }, "dependencies": { "Grpc.IntegrationTesting": { - "version": "1.0.0", - "taget": "project" + "target": "project" } }, "frameworks": { diff --git a/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json index a5a87f9882d..d8e47b1169b 100644 --- a/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json +++ b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json @@ -11,8 +11,7 @@ }, "dependencies": { "Grpc.IntegrationTesting": { - "version": "1.0.0", - "taget": "project" + "target": "project" } }, "frameworks": { diff --git a/src/csharp/Grpc.IntegrationTesting.Server/project.json b/src/csharp/Grpc.IntegrationTesting.Server/project.json index a5a87f9882d..d8e47b1169b 100644 --- a/src/csharp/Grpc.IntegrationTesting.Server/project.json +++ b/src/csharp/Grpc.IntegrationTesting.Server/project.json @@ -11,8 +11,7 @@ }, "dependencies": { "Grpc.IntegrationTesting": { - "version": "1.0.0", - "taget": "project" + "target": "project" } }, "frameworks": { diff --git a/src/csharp/Grpc.IntegrationTesting.StressClient/project.json b/src/csharp/Grpc.IntegrationTesting.StressClient/project.json new file mode 100644 index 00000000000..d8e47b1169b --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.StressClient/project.json @@ -0,0 +1,32 @@ +{ + "buildOptions": { + "compile": "**/*.cs", + "copyToOutput": { + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll" + } + }, + "emitEntryPoint": true + }, + "dependencies": { + "Grpc.IntegrationTesting": { + "target": "project" + } + }, + "frameworks": { + "net45": { }, + "netstandard1.5": { + "imports": [ + "portable-net45", + "net45" + ], + "dependencies": { + "NETStandard.Library": "1.5.0-rc2-24027" + } + } + }, + "runtimes": { + "win7-x64": { } + } +} diff --git a/src/csharp/Grpc.IntegrationTesting/project.json b/src/csharp/Grpc.IntegrationTesting/project.json index 6c1d31b3c45..8964dcc1970 100644 --- a/src/csharp/Grpc.IntegrationTesting/project.json +++ b/src/csharp/Grpc.IntegrationTesting/project.json @@ -12,12 +12,10 @@ }, "dependencies": { "Grpc.Auth": { - "version": "0.0.1", - "taget": "project" + "target": "project" }, "Grpc.Core": { - "version": "0.0.1", - "taget": "project" + "target": "project" }, "Google.Protobuf": "3.0.0-beta3", "CommandLineParser": "1.9.71", From 39ec1cbd7aed31ad1ce95cd263dff5f28d15fe1a Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 17 Jun 2016 10:00:43 -0700 Subject: [PATCH 1170/1894] add csharp CoreCLR docker image --- .../csharp_coreclr_x64/Dockerfile.template | 38 +++++++++ .../test/csharp_coreclr_x64/Dockerfile | 82 +++++++++++++++++++ 2 files changed, 120 insertions(+) create mode 100644 templates/tools/dockerfile/test/csharp_coreclr_x64/Dockerfile.template create mode 100644 tools/dockerfile/test/csharp_coreclr_x64/Dockerfile diff --git a/templates/tools/dockerfile/test/csharp_coreclr_x64/Dockerfile.template b/templates/tools/dockerfile/test/csharp_coreclr_x64/Dockerfile.template new file mode 100644 index 00000000000..35782d6665f --- /dev/null +++ b/templates/tools/dockerfile/test/csharp_coreclr_x64/Dockerfile.template @@ -0,0 +1,38 @@ +%YAML 1.2 +--- | + # Copyright 2015, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + FROM microsoft/dotnet:1.0.0-preview1 + + <%include file="../../apt_get_basic.include"/> + <%include file="../../run_tests_addons.include"/> + # Define the default command. + CMD ["bash"] + diff --git a/tools/dockerfile/test/csharp_coreclr_x64/Dockerfile b/tools/dockerfile/test/csharp_coreclr_x64/Dockerfile new file mode 100644 index 00000000000..9dfc040d736 --- /dev/null +++ b/tools/dockerfile/test/csharp_coreclr_x64/Dockerfile @@ -0,0 +1,82 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +FROM microsoft/dotnet:1.0.0-preview1 + +# Install Git and basic packages. +RUN apt-get update && apt-get install -y \ + autoconf \ + autotools-dev \ + build-essential \ + bzip2 \ + ccache \ + curl \ + gcc \ + gcc-multilib \ + git \ + golang \ + gyp \ + lcov \ + libc6 \ + libc6-dbg \ + libc6-dev \ + libgtest-dev \ + libtool \ + make \ + perl \ + strace \ + python-dev \ + python-setuptools \ + python-yaml \ + telnet \ + unzip \ + wget \ + zip && apt-get clean + +#================ +# Build profiling +RUN apt-get update && apt-get install -y time && apt-get clean + +# Prepare ccache +RUN ln -s /usr/bin/ccache /usr/local/bin/gcc +RUN ln -s /usr/bin/ccache /usr/local/bin/g++ +RUN ln -s /usr/bin/ccache /usr/local/bin/cc +RUN ln -s /usr/bin/ccache /usr/local/bin/c++ +RUN ln -s /usr/bin/ccache /usr/local/bin/clang +RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ + +#====================== +# Zookeeper dependencies +# TODO(jtattermusch): is zookeeper still needed? +RUN apt-get install -y libzookeeper-mt-dev + +RUN mkdir /var/local/jenkins + +# Define the default command. +CMD ["bash"] From 099cbf84aad8da27fba9ee7cb698d8e2d5c01fd1 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 17 Jun 2016 16:58:11 -0700 Subject: [PATCH 1171/1894] add debian.8-x64 to the list of runtimes --- src/csharp/Grpc.Core.Tests/project.json | 3 ++- src/csharp/Grpc.Examples.MathClient/project.json | 3 ++- src/csharp/Grpc.Examples.MathServer/project.json | 3 ++- src/csharp/Grpc.Examples.Tests/project.json | 3 ++- src/csharp/Grpc.HealthCheck.Tests/project.json | 3 ++- src/csharp/Grpc.IntegrationTesting.Client/project.json | 3 ++- src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json | 3 ++- src/csharp/Grpc.IntegrationTesting.Server/project.json | 3 ++- src/csharp/Grpc.IntegrationTesting.StressClient/project.json | 3 ++- src/csharp/Grpc.IntegrationTesting/project.json | 3 ++- 10 files changed, 20 insertions(+), 10 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/project.json b/src/csharp/Grpc.Core.Tests/project.json index 13705a22227..a59e6390d9d 100644 --- a/src/csharp/Grpc.Core.Tests/project.json +++ b/src/csharp/Grpc.Core.Tests/project.json @@ -29,6 +29,7 @@ } }, "runtimes": { - "win7-x64": { } + "win7-x64": { }, + "debian.8-x64": {} } } diff --git a/src/csharp/Grpc.Examples.MathClient/project.json b/src/csharp/Grpc.Examples.MathClient/project.json index be9e123ff8b..9c070c76ba5 100644 --- a/src/csharp/Grpc.Examples.MathClient/project.json +++ b/src/csharp/Grpc.Examples.MathClient/project.json @@ -26,6 +26,7 @@ } }, "runtimes": { - "win7-x64": { } + "win7-x64": { }, + "debian.8-x64": {} } } diff --git a/src/csharp/Grpc.Examples.MathServer/project.json b/src/csharp/Grpc.Examples.MathServer/project.json index be9e123ff8b..9c070c76ba5 100644 --- a/src/csharp/Grpc.Examples.MathServer/project.json +++ b/src/csharp/Grpc.Examples.MathServer/project.json @@ -26,6 +26,7 @@ } }, "runtimes": { - "win7-x64": { } + "win7-x64": { }, + "debian.8-x64": {} } } diff --git a/src/csharp/Grpc.Examples.Tests/project.json b/src/csharp/Grpc.Examples.Tests/project.json index 86f06a5aa9b..7dd938cfb16 100644 --- a/src/csharp/Grpc.Examples.Tests/project.json +++ b/src/csharp/Grpc.Examples.Tests/project.json @@ -28,6 +28,7 @@ } }, "runtimes": { - "win7-x64": { } + "win7-x64": { }, + "debian.8-x64": {} } } diff --git a/src/csharp/Grpc.HealthCheck.Tests/project.json b/src/csharp/Grpc.HealthCheck.Tests/project.json index 9b28d2b4ba0..be2b3a0459f 100644 --- a/src/csharp/Grpc.HealthCheck.Tests/project.json +++ b/src/csharp/Grpc.HealthCheck.Tests/project.json @@ -28,6 +28,7 @@ } }, "runtimes": { - "win7-x64": { } + "win7-x64": { }, + "debian.8-x64": {} } } diff --git a/src/csharp/Grpc.IntegrationTesting.Client/project.json b/src/csharp/Grpc.IntegrationTesting.Client/project.json index d8e47b1169b..fabf906a738 100644 --- a/src/csharp/Grpc.IntegrationTesting.Client/project.json +++ b/src/csharp/Grpc.IntegrationTesting.Client/project.json @@ -27,6 +27,7 @@ } }, "runtimes": { - "win7-x64": { } + "win7-x64": { }, + "debian.8-x64": {} } } diff --git a/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json index d8e47b1169b..fabf906a738 100644 --- a/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json +++ b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json @@ -27,6 +27,7 @@ } }, "runtimes": { - "win7-x64": { } + "win7-x64": { }, + "debian.8-x64": {} } } diff --git a/src/csharp/Grpc.IntegrationTesting.Server/project.json b/src/csharp/Grpc.IntegrationTesting.Server/project.json index d8e47b1169b..fabf906a738 100644 --- a/src/csharp/Grpc.IntegrationTesting.Server/project.json +++ b/src/csharp/Grpc.IntegrationTesting.Server/project.json @@ -27,6 +27,7 @@ } }, "runtimes": { - "win7-x64": { } + "win7-x64": { }, + "debian.8-x64": {} } } diff --git a/src/csharp/Grpc.IntegrationTesting.StressClient/project.json b/src/csharp/Grpc.IntegrationTesting.StressClient/project.json index d8e47b1169b..fabf906a738 100644 --- a/src/csharp/Grpc.IntegrationTesting.StressClient/project.json +++ b/src/csharp/Grpc.IntegrationTesting.StressClient/project.json @@ -27,6 +27,7 @@ } }, "runtimes": { - "win7-x64": { } + "win7-x64": { }, + "debian.8-x64": {} } } diff --git a/src/csharp/Grpc.IntegrationTesting/project.json b/src/csharp/Grpc.IntegrationTesting/project.json index 8964dcc1970..d5ac6f108ba 100644 --- a/src/csharp/Grpc.IntegrationTesting/project.json +++ b/src/csharp/Grpc.IntegrationTesting/project.json @@ -44,6 +44,7 @@ } }, "runtimes": { - "win7-x64": { } + "win7-x64": { }, + "debian.8-x64": {} } } From 76511a5cb7b8e70ce43c36a152a69d64a4b92c9a Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 17 Jun 2016 14:00:57 -0700 Subject: [PATCH 1172/1894] attempt for run_tests.py --- tools/run_tests/build_csharp_coreclr.sh | 38 ++++++++++++++++++++++ tools/run_tests/run_tests.py | 43 +++++++++++++++++++------ 2 files changed, 71 insertions(+), 10 deletions(-) create mode 100755 tools/run_tests/build_csharp_coreclr.sh diff --git a/tools/run_tests/build_csharp_coreclr.sh b/tools/run_tests/build_csharp_coreclr.sh new file mode 100755 index 00000000000..733b1a2083c --- /dev/null +++ b/tools/run_tests/build_csharp_coreclr.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -ex + +cd $(dirname $0)/../../src/csharp + +# TODO(jtattermusch): introduce caching +dotnet restore . + +dotnet build -f netstandard1.5 --configuration $MSBUILD_CONFIG '**/project.json' diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 3080d19c8d1..473eb460b46 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -504,7 +504,14 @@ class CSharpLanguage(object): self._make_options = [_windows_toolset_option(self.args.compiler), _windows_arch_option(self.args.arch)] else: - _check_compiler(self.args.compiler, ['default']) + if self.platform == 'linux': + if self.args.compiler == 'coreclr': + self._docker_distro = 'coreclr' + else: + self._docker_distro = 'jessie' + else: + _check_compiler(self.args.compiler, ['default']) + if self.platform == 'mac': # On Mac, official distribution of mono is 32bit. # TODO(jtattermusch): EMBED_ZLIB=true currently breaks the mac build @@ -521,14 +528,25 @@ class CSharpLanguage(object): nunit_args = ['--labels=All', '--noresult', '--workers=1'] - if self.platform == 'windows': + assembly_subdir = 'bin/%s' % msbuild_config + assembly_extension = '.exe' + + if self.args.compiler == 'coreclr': + # TODO(jtattermusch): make the runtime string platform-specific + assembly_subdir += '/netstandard1.5/debian.8-x64' + assembly_extension = '' + runtime_cmd = [] + elif self.platform == 'windows': runtime_cmd = [] else: runtime_cmd = ['mono'] specs = [] for assembly in tests_by_assembly.iterkeys(): - assembly_file = 'src/csharp/%s/bin/%s/%s.exe' % (assembly, msbuild_config, assembly) + assembly_file = 'src/csharp/%s/%s/%s%s' % (assembly, + assembly_subdir, + assembly, + assembly_extension) if self.config.build_config != 'gcov' or self.platform != 'windows': # normally, run each test as a separate process for test in tests_by_assembly[assembly]: @@ -571,12 +589,15 @@ class CSharpLanguage(object): return self._make_options; def build_steps(self): - if self.platform == 'windows': - return [[_windows_build_bat(self.args.compiler), - 'src/csharp/Grpc.sln', - '/p:Configuration=%s' % _MSBUILD_CONFIG[self.config.build_config]]] + if self.args.compiler == 'coreclr': + return [['tools/run_tests/build_csharp_coreclr.sh']] else: - return [['tools/run_tests/build_csharp.sh']] + if self.platform == 'windows': + return [[_windows_build_bat(self.args.compiler), + 'src/csharp/Grpc.sln', + '/p:Configuration=%s' % _MSBUILD_CONFIG[self.config.build_config]]] + else: + return [['tools/run_tests/build_csharp.sh']] def post_tests_steps(self): if self.platform == 'windows': @@ -588,7 +609,8 @@ class CSharpLanguage(object): return 'Makefile' def dockerfile_dir(self): - return 'tools/dockerfile/test/csharp_jessie_%s' % _docker_arch_suffix(self.args.arch) + return 'tools/dockerfile/test/csharp_%s_%s' % (self._docker_distro, + _docker_arch_suffix(self.args.arch)) def __str__(self): return 'csharp' @@ -838,7 +860,8 @@ argp.add_argument('--compiler', 'clang3.4', 'clang3.5', 'clang3.6', 'clang3.7', 'vs2010', 'vs2013', 'vs2015', 'python2.7', 'python3.4', - 'node0.12', 'node4', 'node5'], + 'node0.12', 'node4', 'node5', + 'coreclr'], default='default', help='Selects compiler to use. Allowed values depend on the platform and language.') argp.add_argument('--build_only', From e2715df1abd3895963f849a8645d235d5ba7bf0f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 17 Jun 2016 17:37:40 -0700 Subject: [PATCH 1173/1894] Reduce cost of some heavyweight tests --- test/core/end2end/tests/hpack_size.c | 317 ++++++++---------- test/core/fling/client.c | 10 +- test/core/support/tls_test.c | 2 +- test/core/transport/chttp2/hpack_table_test.c | 2 +- 4 files changed, 146 insertions(+), 185 deletions(-) diff --git a/test/core/end2end/tests/hpack_size.c b/test/core/end2end/tests/hpack_size.c index ee889b77a1c..7ff0461f5f6 100644 --- a/test/core/end2end/tests/hpack_size.c +++ b/test/core/end2end/tests/hpack_size.c @@ -49,187 +49,142 @@ static void *tag(intptr_t t) { return (void *)t; } -const char *hobbits[][2] = {{"Adaldrida", "Brandybuck"}, - {"Adamanta", "Took"}, - {"Adalgrim", "Took"}, - {"Adelard", "Took"}, - {"Amaranth", "Brandybuck"}, - {"Andwise", "Roper"}, - {"Angelica", "Baggins"}, - {"Asphodel", "Burrows"}, - {"Balbo", "Baggins"}, - {"Bandobras", "Took"}, - {"Belba", "Bolger"}, - {"Bell", "Gamgee"}, - {"Belladonna", "Baggins"}, - {"Berylla", "Baggins"}, - {"Bilbo", "Baggins"}, - {"Bilbo", "Gardner"}, - {"Bill", "Butcher"}, - {"Bingo", "Baggins"}, - {"Bodo", "Proudfoot"}, - {"Bowman", "Cotton"}, - {"Bungo", "Baggins"}, - {"Camellia", "Sackville"}, - {"Carl", "Cotton"}, - {"Celandine", "Brandybuck"}, - {"Chica", "Baggins"}, - {"Daddy", "Twofoot"}, - {"Daisy", "Boffin"}, - {"Diamond", "Took"}, - {"Dinodas", "Brandybuck"}, - {"Doderic", "Brandybuck"}, - {"Dodinas", "Brandybuck"}, - {"Donnamira", "Boffin"}, - {"Dora", "Baggins"}, - {"Drogo", "Baggins"}, - {"Dudo", "Baggins"}, - {"Eglantine", "Took"}, - {"Elanor", "Fairbairn"}, - {"Elfstan", "Fairbairn"}, - {"Esmeralda", "Brandybuck"}, - {"Estella", "Brandybuck"}, - {"Everard", "Took"}, - {"Falco", "Chubb-Baggins"}, - {"Faramir", "Took"}, - {"Farmer", "Maggot"}, - {"Fastolph", "Bolger"}, - {"Ferdibrand", "Took"}, - {"Ferdinand", "Took"}, - {"Ferumbras", "Took"}, - {"Ferumbras", "Took"}, - {"Filibert", "Bolger"}, - {"Firiel", "Fairbairn"}, - {"Flambard", "Took"}, - {"Folco", "Boffin"}, - {"Fortinbras", "Took"}, - {"Fortinbras", "Took"}, - {"Fosco", "Baggins"}, - {"Fredegar", "Bolger"}, - {"Frodo", "Baggins"}, - {"Frodo", "Gardner"}, - {"Gerontius", "Took"}, - {"Gilly", "Baggins"}, - {"Goldilocks", "Took"}, - {"Gorbadoc", "Brandybuck"}, - {"Gorbulas", "Brandybuck"}, - {"Gorhendad", "Brandybuck"}, - {"Gormadoc", "Brandybuck"}, - {"Griffo", "Boffin"}, - {"Halfast", "Gamgee"}, - {"Halfred", "Gamgee"}, - {"Halfred", "Greenhand"}, - {"Hanna", "Brandybuck"}, - {"Hamfast", "Gamgee"}, - {"Hamfast", "Gardner"}, - {"Hamson", "Gamgee"}, - {"Harding", "Gardner"}, - {"Hilda", "Brandybuck"}, - {"Hildibrand", "Took"}, - {"Hildifons", "Took"}, - {"Hildigard", "Took"}, - {"Hildigrim", "Took"}, - {"Hob", "Gammidge"}, - {"Hob", "Hayward"}, - {"Hobson", "Gamgee"}, - {"Holfast", "Gardner"}, - {"Holman", "Cotton"}, - {"Holman", "Greenhand"}, - {"Hugo", "Boffin"}, - {"Hugo", "Bracegirdle"}, - {"Ilberic", "Brandybuck"}, - {"Isembard", "Took"}, - {"Isembold", "Took"}, - {"Isengar", "Took"}, - {"Isengrim", "Took"}, - {"Isengrim", "Took"}, - {"Isumbras", "Took"}, - {"Isumbras", "Took"}, - {"Jolly", "Cotton"}, - {"Lalia", "Took"}, - {"Largo", "Baggins"}, - {"Laura", "Baggins"}, - {"Lily", "Goodbody"}, - {"Lily", "Cotton"}, - {"Linda", "Proudfoot"}, - {"Lobelia", "Sackville-Baggins"}, - {"Longo", "Baggins"}, - {"Lotho", "Sackville-Baggins"}, - {"Madoc", "Brandybuck"}, - {"Malva", "Brandybuck"}, - {"Marigold", "Cotton"}, - {"Marmadas", "Brandybuck"}, - {"Marmadoc", "Brandybuck"}, - {"Marroc", "Brandybuck"}, - {"May", "Gamgee"}, - {"Melilot", "Brandybuck"}, - {"Menegilda", "Brandybuck"}, - {"Mentha", "Brandybuck"}, - {"Meriadoc", "Brandybuck"}, - {"Merimac", "Brandybuck"}, - {"Merimas", "Brandybuck"}, - {"Merry", "Gardner"}, - {"Milo", "Burrows"}, - {"Mimosa", "Baggins"}, - {"Minto", "Burrows"}, - {"Mirabella", "Brandybuck"}, - {"Moro", "Burrows"}, - {"Mosco", "Burrows"}, - {"Mungo", "Baggins"}, - {"Myrtle", "Burrows"}, - {"Odo", "Proudfoot"}, - {"Odovacar", "Bolger"}, - {"Olo", "Proudfoot"}, - {"Orgulas", "Brandybuck"}, - {"Otho", "Sackville-Baggins"}, - {"Paladin", "Took"}, - {"Pansy", "Bolger"}, - {"Pearl", "Took"}, - {"Peony", "Burrows"}, - {"Peregrin", "Took"}, - {"Pervinca", "Took"}, - {"Pimpernel", "Took"}, - {"Pippin", "Gardner"}, - {"Polo", "Baggins"}, - {"Ponto", "Baggins"}, - {"Porto", "Baggins"}, - {"Posco", "Baggins"}, - {"Poppy", "Bolger"}, - {"Primrose", "Gardner"}, - {"Primula", "Baggins"}, - {"Prisca", "Bolger"}, - {"Reginard", "Took"}, - {"Robin", "Smallburrow"}, - {"Robin", "Gardner"}, - {"Rorimac", "Brandybuck"}, - {"Rosa", "Took"}, - {"Rosamunda", "Bolger"}, - {"Rose", "Gardner"}, - {"Ruby", "Baggins"}, - {"Ruby", "Gardner"}, - {"Rudigar", "Bolger"}, - {"Rufus", "Burrows"}, - {"Sadoc", "Brandybuck"}, - {"Salvia", "Bolger"}, - {"Samwise", "Gamgee"}, - {"Sancho", "Proudfoot"}, - {"Saradas", "Brandybuck"}, - {"Saradoc", "Brandybuck"}, - {"Seredic", "Brandybuck"}, - {"Sigismond", "Took"}, - {"Smeagol", "Gollum"}, - {"Tanta", "Baggins"}, - {"Ted", "Sandyman"}, - {"Tobold", "Hornblower"}, - {"Togo", "Goodbody"}, - {"Tolman", "Cotton"}, - {"Tolman", "Gardner"}, - {"Widow", "Rumble"}, - {"Wilcome", "Cotton"}, - {"Wilcome", "Cotton"}, - {"Wilibald", "Bolger"}, - {"Will", "Whitfoot"}, - {"Wiseman", "Gamwich"}}; +const char *hobbits[][2] = { + {"Adaldrida", "Brandybuck"}, {"Adamanta", "Took"}, + {"Adalgrim", "Took"}, {"Adelard", "Took"}, + {"Amaranth", "Brandybuck"}, {"Andwise", "Roper"}, + {"Angelica", "Baggins"}, {"Asphodel", "Burrows"}, + {"Balbo", "Baggins"}, {"Bandobras", "Took"}, + {"Belba", "Bolger"}, {"Bell", "Gamgee"}, + {"Belladonna", "Baggins"}, {"Berylla", "Baggins"}, + {"Bilbo", "Baggins"}, {"Bilbo", "Gardner"}, + {"Bill", "Butcher"}, {"Bingo", "Baggins"}, + {"Bodo", "Proudfoot"}, {"Bowman", "Cotton"}, + {"Bungo", "Baggins"}, {"Camellia", "Sackville"}, + {"Carl", "Cotton"}, {"Celandine", "Brandybuck"}, + {"Chica", "Baggins"}, {"Daddy", "Twofoot"}, + {"Daisy", "Boffin"}, {"Diamond", "Took"}, + {"Dinodas", "Brandybuck"}, {"Doderic", "Brandybuck"}, + {"Dodinas", "Brandybuck"}, {"Donnamira", "Boffin"}, + {"Dora", "Baggins"}, {"Drogo", "Baggins"}, + {"Dudo", "Baggins"}, {"Eglantine", "Took"}, + {"Elanor", "Fairbairn"}, {"Elfstan", "Fairbairn"}, + {"Esmeralda", "Brandybuck"}, {"Estella", "Brandybuck"}, + {"Everard", "Took"}, {"Falco", "Chubb-Baggins"}, + {"Faramir", "Took"}, {"Farmer", "Maggot"}, + {"Fastolph", "Bolger"}, {"Ferdibrand", "Took"}, + {"Ferdinand", "Took"}, {"Ferumbras", "Took"}, + {"Ferumbras", "Took"}, {"Filibert", "Bolger"}, + {"Firiel", "Fairbairn"}, {"Flambard", "Took"}, + {"Folco", "Boffin"}, {"Fortinbras", "Took"}, + {"Fortinbras", "Took"}, {"Fosco", "Baggins"}, + {"Fredegar", "Bolger"}, {"Frodo", "Baggins"}, + {"Frodo", "Gardner"}, {"Gerontius", "Took"}, + {"Gilly", "Baggins"}, {"Goldilocks", "Took"}, + {"Gorbadoc", "Brandybuck"}, {"Gorbulas", "Brandybuck"}, + {"Gorhendad", "Brandybuck"}, {"Gormadoc", "Brandybuck"}, + {"Griffo", "Boffin"}, {"Halfast", "Gamgee"}, + {"Halfred", "Gamgee"}, {"Halfred", "Greenhand"}, + {"Hanna", "Brandybuck"}, {"Hamfast", "Gamgee"}, + {"Hamfast", "Gardner"}, {"Hamson", "Gamgee"}, + {"Harding", "Gardner"}, {"Hilda", "Brandybuck"}, + {"Hildibrand", "Took"}, {"Hildifons", "Took"}, + {"Hildigard", "Took"}, {"Hildigrim", "Took"}, + {"Hob", "Gammidge"}, {"Hob", "Hayward"}, + {"Hobson", "Gamgee"}, {"Holfast", "Gardner"}, + {"Holman", "Cotton"}, {"Holman", "Greenhand"}, + {"Hugo", "Boffin"}, {"Hugo", "Bracegirdle"}, + {"Ilberic", "Brandybuck"}, {"Isembard", "Took"}, + {"Isembold", "Took"}, {"Isengar", "Took"}, + {"Isengrim", "Took"}, {"Isengrim", "Took"}, + {"Isumbras", "Took"}, {"Isumbras", "Took"}, + {"Jolly", "Cotton"}, + /* + {"Lalia", "Took"}, + {"Largo", "Baggins"}, + {"Laura", "Baggins"}, + {"Lily", "Goodbody"}, + {"Lily", "Cotton"}, + {"Linda", "Proudfoot"}, + {"Lobelia", "Sackville-Baggins"}, + {"Longo", "Baggins"}, + {"Lotho", "Sackville-Baggins"}, + {"Madoc", "Brandybuck"}, + {"Malva", "Brandybuck"}, + {"Marigold", "Cotton"}, + {"Marmadas", "Brandybuck"}, + {"Marmadoc", "Brandybuck"}, + {"Marroc", "Brandybuck"}, + {"May", "Gamgee"}, + {"Melilot", "Brandybuck"}, + {"Menegilda", "Brandybuck"}, + {"Mentha", "Brandybuck"}, + {"Meriadoc", "Brandybuck"}, + {"Merimac", "Brandybuck"}, + {"Merimas", "Brandybuck"}, + {"Merry", "Gardner"}, + {"Milo", "Burrows"}, + {"Mimosa", "Baggins"}, + {"Minto", "Burrows"}, + {"Mirabella", "Brandybuck"}, + {"Moro", "Burrows"}, + {"Mosco", "Burrows"}, + {"Mungo", "Baggins"}, + {"Myrtle", "Burrows"}, + {"Odo", "Proudfoot"}, + {"Odovacar", "Bolger"}, + {"Olo", "Proudfoot"}, + {"Orgulas", "Brandybuck"}, + {"Otho", "Sackville-Baggins"}, + {"Paladin", "Took"}, + {"Pansy", "Bolger"}, + {"Pearl", "Took"}, + {"Peony", "Burrows"}, + {"Peregrin", "Took"}, + {"Pervinca", "Took"}, + {"Pimpernel", "Took"}, + {"Pippin", "Gardner"}, + {"Polo", "Baggins"}, + {"Ponto", "Baggins"}, + {"Porto", "Baggins"}, + {"Posco", "Baggins"}, + {"Poppy", "Bolger"}, + {"Primrose", "Gardner"}, + {"Primula", "Baggins"}, + {"Prisca", "Bolger"}, + {"Reginard", "Took"}, + {"Robin", "Smallburrow"}, + {"Robin", "Gardner"}, + {"Rorimac", "Brandybuck"}, + {"Rosa", "Took"}, + {"Rosamunda", "Bolger"}, + {"Rose", "Gardner"}, + {"Ruby", "Baggins"}, + {"Ruby", "Gardner"}, + {"Rudigar", "Bolger"}, + {"Rufus", "Burrows"}, + {"Sadoc", "Brandybuck"}, + {"Salvia", "Bolger"}, + {"Samwise", "Gamgee"}, + {"Sancho", "Proudfoot"}, + {"Saradas", "Brandybuck"}, + {"Saradoc", "Brandybuck"}, + {"Seredic", "Brandybuck"}, + {"Sigismond", "Took"}, + {"Smeagol", "Gollum"}, + {"Tanta", "Baggins"}, + {"Ted", "Sandyman"}, + {"Tobold", "Hornblower"}, + {"Togo", "Goodbody"}, + {"Tolman", "Cotton"}, + {"Tolman", "Gardner"}, + {"Widow", "Rumble"}, + {"Wilcome", "Cotton"}, + {"Wilcome", "Cotton"}, + {"Wilibald", "Bolger"}, + {"Will", "Whitfoot"}, + {"Wiseman", "Gamwich"}*/ +}; const char *dragons[] = {"Ancalagon", "Glaurung", "Scatha", "Smaug the Magnificent"}; diff --git a/test/core/fling/client.c b/test/core/fling/client.c index 123f2b5bbed..bcc195a92f9 100644 --- a/test/core/fling/client.c +++ b/test/core/fling/client.c @@ -177,12 +177,17 @@ int main(int argc, char **argv) { fake_argv[0] = argv[0]; grpc_test_init(1, fake_argv); + int warmup_seconds = 1; + int benchmark_seconds = 5; + cl = gpr_cmdline_create("fling client"); gpr_cmdline_add_int(cl, "payload_size", "Size of the payload to send", &payload_size); gpr_cmdline_add_string(cl, "target", "Target host:port", &target); gpr_cmdline_add_flag(cl, "secure", "Run with security?", &secure); gpr_cmdline_add_string(cl, "scenario", "Scenario", &scenario_name); + gpr_cmdline_add_int(cl, "warmup", "Warmup seconds", &warmup_seconds); + gpr_cmdline_add_int(cl, "benchmark", "Benchmark seconds", &benchmark_seconds); gpr_cmdline_parse(cl, argc, argv); gpr_cmdline_destroy(cl); @@ -206,8 +211,9 @@ int main(int argc, char **argv) { sc.init(); - gpr_timespec end_warmup = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(3); - gpr_timespec end_profiling = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(30); + gpr_timespec end_warmup = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(warmup_seconds); + gpr_timespec end_profiling = + GRPC_TIMEOUT_SECONDS_TO_DEADLINE(warmup_seconds + benchmark_seconds); while (gpr_time_cmp(gpr_now(end_warmup.clock_type), end_warmup) < 0) { sc.do_one_step(); diff --git a/test/core/support/tls_test.c b/test/core/support/tls_test.c index 7b732ee10ea..2acc302ef28 100644 --- a/test/core/support/tls_test.c +++ b/test/core/support/tls_test.c @@ -50,7 +50,7 @@ static void thd_body(void *arg) { GPR_ASSERT(gpr_tls_get(&test_var) == 0); - for (i = 0; i < 10000000; i++) { + for (i = 0; i < 100000; i++) { gpr_tls_set(&test_var, i); GPR_ASSERT(gpr_tls_get(&test_var) == i); } diff --git a/test/core/transport/chttp2/hpack_table_test.c b/test/core/transport/chttp2/hpack_table_test.c index 73e59f1536e..90ee662c3df 100644 --- a/test/core/transport/chttp2/hpack_table_test.c +++ b/test/core/transport/chttp2/hpack_table_test.c @@ -139,7 +139,7 @@ static void test_many_additions(void) { grpc_chttp2_hptbl_init(&tbl); - for (i = 0; i < 1000000; i++) { + for (i = 0; i < 100000; i++) { grpc_mdelem *elem; gpr_asprintf(&key, "K:%d", i); gpr_asprintf(&value, "VALUE:%d", i); From e5f0f95101b40e00f3f7147d18514dbedf81d5a2 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 17 Jun 2016 18:56:55 -0700 Subject: [PATCH 1174/1894] fixed syntax errors in proto --- src/proto/grpc/binary_log/v1alpha/log.proto | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/proto/grpc/binary_log/v1alpha/log.proto b/src/proto/grpc/binary_log/v1alpha/log.proto index 83166cd4104..46656109bc9 100644 --- a/src/proto/grpc/binary_log/v1alpha/log.proto +++ b/src/proto/grpc/binary_log/v1alpha/log.proto @@ -29,20 +29,20 @@ syntax = "proto3"; -import "google/protobuf/timestamp.proto" +import "google/protobuf/timestamp.proto"; package grpc.binary_log.v1alpha; enum Direction { - SERVER_SEND; - SERVER_RECV; - CLIENT_SEND; - CLIENT_RECV; + SERVER_SEND = 0; + SERVER_RECV = 1; + CLIENT_SEND = 2; + CLIENT_RECV = 3; } message KeyValuePair { - string key; - string value; + string key = 1; + string value = 2; } // Any sort of metadata that may be sent in either direction during a call From 377bfdef920ef36ab53f409f7037f3f683020f9f Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 17 Jun 2016 18:17:47 -0700 Subject: [PATCH 1175/1894] added extra path to python protoc --- src/python/grpcio/commands.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py index 3e974eba0a3..7f9c292d659 100644 --- a/src/python/grpcio/commands.py +++ b/src/python/grpcio/commands.py @@ -182,6 +182,8 @@ class BuildProtoModules(setuptools.Command): '--plugin=protoc-gen-python-grpc={}'.format( self.grpc_python_plugin_command), '-I {}'.format(GRPC_STEM), + '-I .'.format(GRPC_STEM), + '-I {}/third_party/protobuf/src'.format(GRPC_STEM), '--python_out={}'.format(PROTO_GEN_STEM), '--python-grpc_out={}'.format(PROTO_GEN_STEM), ] + [path] From 5ad70a6953635da45542d1b3cb93672e6b51ae64 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 17 Jun 2016 19:03:10 -0700 Subject: [PATCH 1176/1894] removed spurious .format() --- src/python/grpcio/commands.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py index 7f9c292d659..f498ed41901 100644 --- a/src/python/grpcio/commands.py +++ b/src/python/grpcio/commands.py @@ -182,7 +182,7 @@ class BuildProtoModules(setuptools.Command): '--plugin=protoc-gen-python-grpc={}'.format( self.grpc_python_plugin_command), '-I {}'.format(GRPC_STEM), - '-I .'.format(GRPC_STEM), + '-I .', '-I {}/third_party/protobuf/src'.format(GRPC_STEM), '--python_out={}'.format(PROTO_GEN_STEM), '--python-grpc_out={}'.format(PROTO_GEN_STEM), From 6efe7c7ecf790cb53cc59c79257184beba3cbbda Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Sat, 18 Jun 2016 02:03:44 +0000 Subject: [PATCH 1177/1894] Fix secure channel construction --- src/python/grpcio/grpc/__init__.py | 2 +- src/python/grpcio/grpc/_channel.py | 7 +++++++ src/python/grpcio/tests/tests.json | 1 + src/python/grpcio/tests/unit/_api_test.py | 7 +++++++ src/python/grpcio/tests/unit/beta/test_utilities.py | 2 +- 5 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py index 28adca37723..9e784c8157b 100644 --- a/src/python/grpcio/grpc/__init__.py +++ b/src/python/grpcio/grpc/__init__.py @@ -1171,7 +1171,7 @@ def secure_channel(target, credentials, options=None): A Channel to the target through which RPCs may be conducted. """ from grpc import _channel - return _channel.Channel(target, options, credentials) + return _channel.Channel(target, options, credentials._credentials) def server(generic_rpc_handlers, thread_pool, options=None): diff --git a/src/python/grpcio/grpc/_channel.py b/src/python/grpcio/grpc/_channel.py index d9315d2e6cd..7cdd542de27 100644 --- a/src/python/grpcio/grpc/_channel.py +++ b/src/python/grpcio/grpc/_channel.py @@ -814,6 +814,13 @@ def _options(options): class Channel(grpc.Channel): def __init__(self, target, options, credentials): + """Constructor. + + Args: + target: The target to which to connect. + options: Configuration options for the channel. + credentials: A cygrpc.ChannelCredentials or None. + """ self._channel = cygrpc.Channel(target, _options(options), credentials) self._call_state = _ChannelCallState(self._channel) self._connectivity_state = _ChannelConnectivityState(self._channel) diff --git a/src/python/grpcio/tests/tests.json b/src/python/grpcio/tests/tests.json index 20d11b20b5d..66e29ef2537 100644 --- a/src/python/grpcio/tests/tests.json +++ b/src/python/grpcio/tests/tests.json @@ -1,6 +1,7 @@ [ "_api_test.AllTest", "_api_test.ChannelConnectivityTest", + "_api_test.ChannelTest", "_auth_test.AccessTokenCallCredentialsTest", "_auth_test.GoogleCallCredentialsTest", "_base_interface_test.AsyncEasyTest", diff --git a/src/python/grpcio/tests/unit/_api_test.py b/src/python/grpcio/tests/unit/_api_test.py index 1501ec2a047..2fe89499f51 100644 --- a/src/python/grpcio/tests/unit/_api_test.py +++ b/src/python/grpcio/tests/unit/_api_test.py @@ -100,5 +100,12 @@ class ChannelConnectivityTest(unittest.TestCase): tuple(grpc.ChannelConnectivity)) +class ChannelTest(unittest.TestCase): + + def test_secure_channel(self): + channel_credentials = grpc.ssl_channel_credentials() + channel = grpc.secure_channel('google.com:443', channel_credentials) + + if __name__ == '__main__': unittest.main(verbosity=2) diff --git a/src/python/grpcio/tests/unit/beta/test_utilities.py b/src/python/grpcio/tests/unit/beta/test_utilities.py index e374b203ce9..8ccad04e056 100644 --- a/src/python/grpcio/tests/unit/beta/test_utilities.py +++ b/src/python/grpcio/tests/unit/beta/test_utilities.py @@ -50,6 +50,6 @@ def not_really_secure_channel( """ target = '%s:%d' % (host, port) channel = grpc.secure_channel( - target, channel_credentials._credentials, + target, channel_credentials, ((b'grpc.ssl_target_name_override', server_host_override,),)) return implementations.Channel(channel) From 76233f5c2fc67247414fb4ac85676706a647555e Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Sat, 18 Jun 2016 02:37:23 +0000 Subject: [PATCH 1178/1894] Delete tests of dead pre-GA code --- src/python/grpcio/tests/tests.json | 30 -- .../unit/_adapter/_intermediary_low_test.py | 429 ------------------ .../grpcio/tests/unit/_adapter/_low_test.py | 319 ------------- .../_core_over_links_base_interface_test.py | 157 ------- ...ver_core_over_links_face_interface_test.py | 163 ------- .../_links/_lonely_invocation_link_test.py | 88 ---- .../tests/unit/_links/_transmission_test.py | 239 ---------- .../_crust_over_core_face_interface_test.py | 113 ----- .../framework/core/_base_interface_test.py | 96 ---- .../unit/framework/foundation/_later_test.py | 151 ------ 10 files changed, 1785 deletions(-) delete mode 100644 src/python/grpcio/tests/unit/_adapter/_intermediary_low_test.py delete mode 100644 src/python/grpcio/tests/unit/_adapter/_low_test.py delete mode 100644 src/python/grpcio/tests/unit/_core_over_links_base_interface_test.py delete mode 100644 src/python/grpcio/tests/unit/_crust_over_core_over_links_face_interface_test.py delete mode 100644 src/python/grpcio/tests/unit/_links/_lonely_invocation_link_test.py delete mode 100644 src/python/grpcio/tests/unit/_links/_transmission_test.py delete mode 100644 src/python/grpcio/tests/unit/framework/_crust_over_core_face_interface_test.py delete mode 100644 src/python/grpcio/tests/unit/framework/core/_base_interface_test.py delete mode 100644 src/python/grpcio/tests/unit/framework/foundation/_later_test.py diff --git a/src/python/grpcio/tests/tests.json b/src/python/grpcio/tests/tests.json index 20d11b20b5d..ba93158d225 100644 --- a/src/python/grpcio/tests/tests.json +++ b/src/python/grpcio/tests/tests.json @@ -3,10 +3,6 @@ "_api_test.ChannelConnectivityTest", "_auth_test.AccessTokenCallCredentialsTest", "_auth_test.GoogleCallCredentialsTest", - "_base_interface_test.AsyncEasyTest", - "_base_interface_test.AsyncPeasyTest", - "_base_interface_test.SyncEasyTest", - "_base_interface_test.SyncPeasyTest", "_beta_features_test.BetaFeaturesTest", "_beta_features_test.ContextManagementAndLifecycleTest", "_cancel_many_calls_test.CancelManyCallsTest", @@ -15,22 +11,6 @@ "_channel_test.ChannelTest", "_connectivity_channel_test.ChannelConnectivityTest", "_connectivity_channel_test.ConnectivityStatesTest", - "_core_over_links_base_interface_test.AsyncEasyTest", - "_core_over_links_base_interface_test.AsyncPeasyTest", - "_core_over_links_base_interface_test.SyncEasyTest", - "_core_over_links_base_interface_test.SyncPeasyTest", - "_crust_over_core_face_interface_test.DynamicInvokerBlockingInvocationInlineServiceTest", - "_crust_over_core_face_interface_test.DynamicInvokerFutureInvocationAsynchronousEventServiceTest", - "_crust_over_core_face_interface_test.GenericInvokerBlockingInvocationInlineServiceTest", - "_crust_over_core_face_interface_test.GenericInvokerFutureInvocationAsynchronousEventServiceTest", - "_crust_over_core_face_interface_test.MultiCallableInvokerBlockingInvocationInlineServiceTest", - "_crust_over_core_face_interface_test.MultiCallableInvokerFutureInvocationAsynchronousEventServiceTest", - "_crust_over_core_over_links_face_interface_test.DynamicInvokerBlockingInvocationInlineServiceTest", - "_crust_over_core_over_links_face_interface_test.DynamicInvokerFutureInvocationAsynchronousEventServiceTest", - "_crust_over_core_over_links_face_interface_test.GenericInvokerBlockingInvocationInlineServiceTest", - "_crust_over_core_over_links_face_interface_test.GenericInvokerFutureInvocationAsynchronousEventServiceTest", - "_crust_over_core_over_links_face_interface_test.MultiCallableInvokerBlockingInvocationInlineServiceTest", - "_crust_over_core_over_links_face_interface_test.MultiCallableInvokerFutureInvocationAsynchronousEventServiceTest", "_empty_message_test.EmptyMessageTest", "_face_interface_test.DynamicInvokerBlockingInvocationInlineServiceTest", "_face_interface_test.DynamicInvokerFutureInvocationAsynchronousEventServiceTest", @@ -42,15 +22,7 @@ "_implementations_test.CallCredentialsTest", "_implementations_test.ChannelCredentialsTest", "_insecure_interop_test.InsecureInteropTest", - "_intermediary_low_test.CancellationTest", - "_intermediary_low_test.EchoTest", - "_intermediary_low_test.ExpirationTest", - "_intermediary_low_test.LonelyClientTest", - "_later_test.LaterTest", "_logging_pool_test.LoggingPoolTest", - "_lonely_invocation_link_test.LonelyInvocationLinkTest", - "_low_test.HangingServerShutdown", - "_low_test.InsecureServerInsecureClient", "_metadata_test.MetadataTest", "_not_found_test.NotFoundTest", "_python_plugin_test.PythonPluginTest", @@ -59,8 +31,6 @@ "_sanity_test.Sanity", "_secure_interop_test.SecureInteropTest", "_thread_cleanup_test.CleanupThreadTest", - "_transmission_test.RoundTripTest", - "_transmission_test.TransmissionTest", "_utilities_test.ChannelConnectivityTest", "beta_python_plugin_test.PythonPluginTest", "cygrpc_test.InsecureServerInsecureClient", diff --git a/src/python/grpcio/tests/unit/_adapter/_intermediary_low_test.py b/src/python/grpcio/tests/unit/_adapter/_intermediary_low_test.py deleted file mode 100644 index 09ebdeff335..00000000000 --- a/src/python/grpcio/tests/unit/_adapter/_intermediary_low_test.py +++ /dev/null @@ -1,429 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Tests for the old '_low'.""" - -import threading -import time -import unittest - -import six -from six.moves import queue - -from grpc._adapter import _intermediary_low as _low - -_STREAM_LENGTH = 300 -_TIMEOUT = 5 -_AFTER_DELAY = 2 -_FUTURE = time.time() + 60 * 60 * 24 -_BYTE_SEQUENCE = b'\abcdefghijklmnopqrstuvwxyz0123456789' * 200 -_BYTE_SEQUENCE_SEQUENCE = tuple( - bytes(bytearray((row + column) % 256 for column in range(row))) - for row in range(_STREAM_LENGTH)) - - -class LonelyClientTest(unittest.TestCase): - - def testLonelyClient(self): - host = 'nosuchhostexists' - port = 54321 - method = 'test method' - deadline = time.time() + _TIMEOUT - after_deadline = deadline + _AFTER_DELAY - metadata_tag = object() - finish_tag = object() - - completion_queue = _low.CompletionQueue() - channel = _low.Channel('%s:%d' % (host, port), None) - client_call = _low.Call(channel, completion_queue, method, host, deadline) - - client_call.invoke(completion_queue, metadata_tag, finish_tag) - first_event = completion_queue.get(after_deadline) - self.assertIsNotNone(first_event) - second_event = completion_queue.get(after_deadline) - self.assertIsNotNone(second_event) - kinds = [event.kind for event in (first_event, second_event)] - six.assertCountEqual(self, - (_low.Event.Kind.METADATA_ACCEPTED, _low.Event.Kind.FINISH), - kinds) - - self.assertIsNone(completion_queue.get(after_deadline)) - - completion_queue.stop() - stop_event = completion_queue.get(_FUTURE) - self.assertEqual(_low.Event.Kind.STOP, stop_event.kind) - - del client_call - del channel - del completion_queue - - -def _drive_completion_queue(completion_queue, event_queue): - while True: - event = completion_queue.get(_FUTURE) - if event.kind is _low.Event.Kind.STOP: - break - event_queue.put(event) - - -class EchoTest(unittest.TestCase): - - def setUp(self): - self.host = 'localhost' - - self.server_completion_queue = _low.CompletionQueue() - self.server = _low.Server(self.server_completion_queue) - port = self.server.add_http2_addr('[::]:0') - self.server.start() - self.server_events = queue.Queue() - self.server_completion_queue_thread = threading.Thread( - target=_drive_completion_queue, - args=(self.server_completion_queue, self.server_events)) - self.server_completion_queue_thread.start() - - self.client_completion_queue = _low.CompletionQueue() - self.channel = _low.Channel('%s:%d' % (self.host, port), None) - self.client_events = queue.Queue() - self.client_completion_queue_thread = threading.Thread( - target=_drive_completion_queue, - args=(self.client_completion_queue, self.client_events)) - self.client_completion_queue_thread.start() - - def tearDown(self): - self.server.stop() - self.server.cancel_all_calls() - self.server_completion_queue.stop() - self.client_completion_queue.stop() - self.server_completion_queue_thread.join() - self.client_completion_queue_thread.join() - del self.server - - def _perform_echo_test(self, test_data): - method = 'test method' - details = 'test details' - server_leading_metadata_key = 'my_server_leading_key' - server_leading_metadata_value = 'my_server_leading_value' - server_trailing_metadata_key = 'my_server_trailing_key' - server_trailing_metadata_value = 'my_server_trailing_value' - client_metadata_key = 'my_client_key' - client_metadata_value = 'my_client_value' - server_leading_binary_metadata_key = 'my_server_leading_key-bin' - server_leading_binary_metadata_value = b'\0'*2047 - server_trailing_binary_metadata_key = 'my_server_trailing_key-bin' - server_trailing_binary_metadata_value = b'\0'*2047 - client_binary_metadata_key = 'my_client_key-bin' - client_binary_metadata_value = b'\0'*2047 - deadline = _FUTURE - metadata_tag = object() - finish_tag = object() - write_tag = object() - complete_tag = object() - service_tag = object() - read_tag = object() - status_tag = object() - - server_data = [] - client_data = [] - - client_call = _low.Call(self.channel, self.client_completion_queue, - method, self.host, deadline) - client_call.add_metadata(client_metadata_key, client_metadata_value) - client_call.add_metadata(client_binary_metadata_key, - client_binary_metadata_value) - - client_call.invoke(self.client_completion_queue, metadata_tag, finish_tag) - - self.server.service(service_tag) - service_accepted = self.server_events.get() - self.assertIsNotNone(service_accepted) - self.assertIs(service_accepted.kind, _low.Event.Kind.SERVICE_ACCEPTED) - self.assertIs(service_accepted.tag, service_tag) - self.assertEqual(method.encode(), service_accepted.service_acceptance.method) - self.assertEqual(self.host.encode(), service_accepted.service_acceptance.host) - self.assertIsNotNone(service_accepted.service_acceptance.call) - metadata = dict(service_accepted.metadata) - self.assertIn(client_metadata_key.encode(), metadata) - self.assertEqual(client_metadata_value.encode(), metadata[client_metadata_key.encode()]) - self.assertIn(client_binary_metadata_key.encode(), metadata) - self.assertEqual(client_binary_metadata_value, - metadata[client_binary_metadata_key.encode()]) - server_call = service_accepted.service_acceptance.call - server_call.accept(self.server_completion_queue, finish_tag) - server_call.add_metadata(server_leading_metadata_key, - server_leading_metadata_value) - server_call.add_metadata(server_leading_binary_metadata_key, - server_leading_binary_metadata_value) - server_call.premetadata() - - metadata_accepted = self.client_events.get() - self.assertIsNotNone(metadata_accepted) - self.assertEqual(_low.Event.Kind.METADATA_ACCEPTED, metadata_accepted.kind) - self.assertEqual(metadata_tag, metadata_accepted.tag) - metadata = dict(metadata_accepted.metadata) - self.assertIn(server_leading_metadata_key.encode(), metadata) - self.assertEqual(server_leading_metadata_value.encode(), - metadata[server_leading_metadata_key.encode()]) - self.assertIn(server_leading_binary_metadata_key.encode(), metadata) - self.assertEqual(server_leading_binary_metadata_value, - metadata[server_leading_binary_metadata_key.encode()]) - - for datum in test_data: - client_call.write(datum, write_tag, _low.WriteFlags.WRITE_NO_COMPRESS) - write_accepted = self.client_events.get() - self.assertIsNotNone(write_accepted) - self.assertIs(write_accepted.kind, _low.Event.Kind.WRITE_ACCEPTED) - self.assertIs(write_accepted.tag, write_tag) - self.assertIs(write_accepted.write_accepted, True) - - server_call.read(read_tag) - read_accepted = self.server_events.get() - self.assertIsNotNone(read_accepted) - self.assertEqual(_low.Event.Kind.READ_ACCEPTED, read_accepted.kind) - self.assertEqual(read_tag, read_accepted.tag) - self.assertIsNotNone(read_accepted.bytes) - server_data.append(read_accepted.bytes) - - server_call.write(read_accepted.bytes, write_tag, 0) - write_accepted = self.server_events.get() - self.assertIsNotNone(write_accepted) - self.assertEqual(_low.Event.Kind.WRITE_ACCEPTED, write_accepted.kind) - self.assertEqual(write_tag, write_accepted.tag) - self.assertTrue(write_accepted.write_accepted) - - client_call.read(read_tag) - read_accepted = self.client_events.get() - self.assertIsNotNone(read_accepted) - self.assertEqual(_low.Event.Kind.READ_ACCEPTED, read_accepted.kind) - self.assertEqual(read_tag, read_accepted.tag) - self.assertIsNotNone(read_accepted.bytes) - client_data.append(read_accepted.bytes) - - client_call.complete(complete_tag) - complete_accepted = self.client_events.get() - self.assertIsNotNone(complete_accepted) - self.assertIs(complete_accepted.kind, _low.Event.Kind.COMPLETE_ACCEPTED) - self.assertIs(complete_accepted.tag, complete_tag) - self.assertIs(complete_accepted.complete_accepted, True) - - server_call.read(read_tag) - read_accepted = self.server_events.get() - self.assertIsNotNone(read_accepted) - self.assertEqual(_low.Event.Kind.READ_ACCEPTED, read_accepted.kind) - self.assertEqual(read_tag, read_accepted.tag) - self.assertIsNone(read_accepted.bytes) - - server_call.add_metadata(server_trailing_metadata_key, - server_trailing_metadata_value) - server_call.add_metadata(server_trailing_binary_metadata_key, - server_trailing_binary_metadata_value) - - server_call.status(_low.Status(_low.Code.OK, details), status_tag) - server_terminal_event_one = self.server_events.get() - server_terminal_event_two = self.server_events.get() - if server_terminal_event_one.kind == _low.Event.Kind.COMPLETE_ACCEPTED: - status_accepted = server_terminal_event_one - rpc_accepted = server_terminal_event_two - else: - status_accepted = server_terminal_event_two - rpc_accepted = server_terminal_event_one - self.assertIsNotNone(status_accepted) - self.assertIsNotNone(rpc_accepted) - self.assertEqual(_low.Event.Kind.COMPLETE_ACCEPTED, status_accepted.kind) - self.assertEqual(status_tag, status_accepted.tag) - self.assertTrue(status_accepted.complete_accepted) - self.assertEqual(_low.Event.Kind.FINISH, rpc_accepted.kind) - self.assertEqual(finish_tag, rpc_accepted.tag) - self.assertEqual(_low.Status(_low.Code.OK, ''), rpc_accepted.status) - - client_call.read(read_tag) - client_terminal_event_one = self.client_events.get() - client_terminal_event_two = self.client_events.get() - if client_terminal_event_one.kind == _low.Event.Kind.READ_ACCEPTED: - read_accepted = client_terminal_event_one - finish_accepted = client_terminal_event_two - else: - read_accepted = client_terminal_event_two - finish_accepted = client_terminal_event_one - self.assertIsNotNone(read_accepted) - self.assertIsNotNone(finish_accepted) - self.assertEqual(_low.Event.Kind.READ_ACCEPTED, read_accepted.kind) - self.assertEqual(read_tag, read_accepted.tag) - self.assertIsNone(read_accepted.bytes) - self.assertEqual(_low.Event.Kind.FINISH, finish_accepted.kind) - self.assertEqual(finish_tag, finish_accepted.tag) - self.assertEqual(_low.Status(_low.Code.OK, details.encode()), finish_accepted.status) - metadata = dict(finish_accepted.metadata) - self.assertIn(server_trailing_metadata_key.encode(), metadata) - self.assertEqual(server_trailing_metadata_value.encode(), - metadata[server_trailing_metadata_key.encode()]) - self.assertIn(server_trailing_binary_metadata_key.encode(), metadata) - self.assertEqual(server_trailing_binary_metadata_value, - metadata[server_trailing_binary_metadata_key.encode()]) - self.assertSetEqual(set(key for key, _ in finish_accepted.metadata), - set((server_trailing_metadata_key.encode(), - server_trailing_binary_metadata_key.encode(),))) - - self.assertSequenceEqual(test_data, server_data) - self.assertSequenceEqual(test_data, client_data) - - def testNoEcho(self): - self._perform_echo_test(()) - - def testOneByteEcho(self): - self._perform_echo_test([b'\x07']) - - def testOneManyByteEcho(self): - self._perform_echo_test([_BYTE_SEQUENCE]) - - def testManyOneByteEchoes(self): - self._perform_echo_test( - [_BYTE_SEQUENCE[i:i+1] for i in range(len(_BYTE_SEQUENCE))]) - - def testManyManyByteEchoes(self): - self._perform_echo_test(_BYTE_SEQUENCE_SEQUENCE) - - -class CancellationTest(unittest.TestCase): - - def setUp(self): - self.host = 'localhost' - - self.server_completion_queue = _low.CompletionQueue() - self.server = _low.Server(self.server_completion_queue) - port = self.server.add_http2_addr('[::]:0') - self.server.start() - self.server_events = queue.Queue() - self.server_completion_queue_thread = threading.Thread( - target=_drive_completion_queue, - args=(self.server_completion_queue, self.server_events)) - self.server_completion_queue_thread.start() - - self.client_completion_queue = _low.CompletionQueue() - self.channel = _low.Channel('%s:%d' % (self.host, port), None) - self.client_events = queue.Queue() - self.client_completion_queue_thread = threading.Thread( - target=_drive_completion_queue, - args=(self.client_completion_queue, self.client_events)) - self.client_completion_queue_thread.start() - - def tearDown(self): - self.server.stop() - self.server.cancel_all_calls() - self.server_completion_queue.stop() - self.client_completion_queue.stop() - self.server_completion_queue_thread.join() - self.client_completion_queue_thread.join() - del self.server - - def testCancellation(self): - method = 'test method' - deadline = _FUTURE - metadata_tag = object() - finish_tag = object() - write_tag = object() - service_tag = object() - read_tag = object() - test_data = _BYTE_SEQUENCE_SEQUENCE - - server_data = [] - client_data = [] - - client_call = _low.Call(self.channel, self.client_completion_queue, - method, self.host, deadline) - - client_call.invoke(self.client_completion_queue, metadata_tag, finish_tag) - - self.server.service(service_tag) - service_accepted = self.server_events.get() - server_call = service_accepted.service_acceptance.call - - server_call.accept(self.server_completion_queue, finish_tag) - server_call.premetadata() - - metadata_accepted = self.client_events.get() - self.assertIsNotNone(metadata_accepted) - - for datum in test_data: - client_call.write(datum, write_tag, 0) - write_accepted = self.client_events.get() - - server_call.read(read_tag) - read_accepted = self.server_events.get() - server_data.append(read_accepted.bytes) - - server_call.write(read_accepted.bytes, write_tag, 0) - write_accepted = self.server_events.get() - self.assertIsNotNone(write_accepted) - - client_call.read(read_tag) - read_accepted = self.client_events.get() - client_data.append(read_accepted.bytes) - - client_call.cancel() - # cancel() is idempotent. - client_call.cancel() - client_call.cancel() - client_call.cancel() - - server_call.read(read_tag) - - server_terminal_event_one = self.server_events.get() - server_terminal_event_two = self.server_events.get() - if server_terminal_event_one.kind == _low.Event.Kind.READ_ACCEPTED: - read_accepted = server_terminal_event_one - rpc_accepted = server_terminal_event_two - else: - read_accepted = server_terminal_event_two - rpc_accepted = server_terminal_event_one - self.assertIsNotNone(read_accepted) - self.assertIsNotNone(rpc_accepted) - self.assertEqual(_low.Event.Kind.READ_ACCEPTED, read_accepted.kind) - self.assertIsNone(read_accepted.bytes) - self.assertEqual(_low.Event.Kind.FINISH, rpc_accepted.kind) - self.assertEqual(_low.Status(_low.Code.CANCELLED, ''), rpc_accepted.status) - - finish_event = self.client_events.get() - self.assertEqual(_low.Event.Kind.FINISH, finish_event.kind) - self.assertEqual(_low.Status(_low.Code.CANCELLED, b'Cancelled'), - finish_event.status) - - self.assertSequenceEqual(test_data, server_data) - self.assertSequenceEqual(test_data, client_data) - - -class ExpirationTest(unittest.TestCase): - - @unittest.skip('TODO(nathaniel): Expiration test!') - def testExpiration(self): - pass - - -if __name__ == '__main__': - unittest.main(verbosity=2) - diff --git a/src/python/grpcio/tests/unit/_adapter/_low_test.py b/src/python/grpcio/tests/unit/_adapter/_low_test.py deleted file mode 100644 index e09a1f2564f..00000000000 --- a/src/python/grpcio/tests/unit/_adapter/_low_test.py +++ /dev/null @@ -1,319 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -import threading -import time -import unittest - -from grpc import _grpcio_metadata -from grpc._adapter import _types -from grpc._adapter import _low -from tests.unit import test_common - - -def wait_for_events(completion_queues, deadline): - """ - Args: - completion_queues: list of completion queues to wait for events on - deadline: absolute deadline to wait until - - Returns: - a sequence of events of length len(completion_queues). - """ - - results = [None] * len(completion_queues) - lock = threading.Lock() - threads = [] - def set_ith_result(i, completion_queue): - result = completion_queue.next(deadline) - with lock: - results[i] = result - for i, completion_queue in enumerate(completion_queues): - thread = threading.Thread(target=set_ith_result, - args=[i, completion_queue]) - thread.start() - threads.append(thread) - for thread in threads: - thread.join() - return results - - -class InsecureServerInsecureClient(unittest.TestCase): - - def setUp(self): - self.server_completion_queue = _low.CompletionQueue() - self.server = _low.Server(self.server_completion_queue, []) - self.port = self.server.add_http2_port('[::]:0') - self.client_completion_queue = _low.CompletionQueue() - self.client_channel = _low.Channel('localhost:%d'%self.port, []) - - self.server.start() - - def tearDown(self): - self.server.shutdown() - del self.client_channel - - self.client_completion_queue.shutdown() - while (self.client_completion_queue.next(float('+inf')).type != - _types.EventType.QUEUE_SHUTDOWN): - pass - self.server_completion_queue.shutdown() - while (self.server_completion_queue.next(float('+inf')).type != - _types.EventType.QUEUE_SHUTDOWN): - pass - - del self.client_completion_queue - del self.server_completion_queue - del self.server - - def testEcho(self): - deadline = time.time() + 5 - event_time_tolerance = 2 - deadline_tolerance = 0.25 - client_metadata_ascii_key = 'key' - client_metadata_ascii_value = 'val' - client_metadata_bin_key = 'key-bin' - client_metadata_bin_value = b'\0'*1000 - server_initial_metadata_key = 'init_me_me_me' - server_initial_metadata_value = 'whodawha?' - server_trailing_metadata_key = 'california_is_in_a_drought' - server_trailing_metadata_value = 'zomg it is' - server_status_code = _types.StatusCode.OK - server_status_details = 'our work is never over' - request = 'blarghaflargh' - response = 'his name is robert paulson' - method = 'twinkies' - host = 'hostess' - server_request_tag = object() - request_call_result = self.server.request_call(self.server_completion_queue, - server_request_tag) - - self.assertEqual(_types.CallError.OK, request_call_result) - - client_call_tag = object() - client_call = self.client_channel.create_call( - self.client_completion_queue, method, host, deadline) - client_initial_metadata = [ - (client_metadata_ascii_key, client_metadata_ascii_value), - (client_metadata_bin_key, client_metadata_bin_value) - ] - client_start_batch_result = client_call.start_batch([ - _types.OpArgs.send_initial_metadata(client_initial_metadata), - _types.OpArgs.send_message(request, 0), - _types.OpArgs.send_close_from_client(), - _types.OpArgs.recv_initial_metadata(), - _types.OpArgs.recv_message(), - _types.OpArgs.recv_status_on_client() - ], client_call_tag) - self.assertEqual(_types.CallError.OK, client_start_batch_result) - - client_no_event, request_event, = wait_for_events( - [self.client_completion_queue, self.server_completion_queue], - time.time() + event_time_tolerance) - self.assertEqual(client_no_event, None) - self.assertEqual(_types.EventType.OP_COMPLETE, request_event.type) - self.assertIsInstance(request_event.call, _low.Call) - self.assertIs(server_request_tag, request_event.tag) - self.assertEqual(1, len(request_event.results)) - received_initial_metadata = request_event.results[0].initial_metadata - # Check that our metadata were transmitted - self.assertTrue(test_common.metadata_transmitted(client_initial_metadata, - received_initial_metadata)) - # Check that Python's user agent string is a part of the full user agent - # string - received_initial_metadata_dict = dict(received_initial_metadata) - self.assertIn(b'user-agent', received_initial_metadata_dict) - self.assertIn('Python-gRPC-{}'.format(_grpcio_metadata.__version__).encode(), - received_initial_metadata_dict[b'user-agent']) - self.assertEqual(method.encode(), request_event.call_details.method) - self.assertEqual(host.encode(), request_event.call_details.host) - self.assertLess(abs(deadline - request_event.call_details.deadline), - deadline_tolerance) - - # Check that the channel is connected, and that both it and the call have - # the proper target and peer; do this after the first flurry of messages to - # avoid the possibility that connection was delayed by the core until the - # first message was sent. - self.assertEqual(_types.ConnectivityState.READY, - self.client_channel.check_connectivity_state(False)) - self.assertIsNotNone(self.client_channel.target()) - self.assertIsNotNone(client_call.peer()) - - server_call_tag = object() - server_call = request_event.call - server_initial_metadata = [ - (server_initial_metadata_key, server_initial_metadata_value) - ] - server_trailing_metadata = [ - (server_trailing_metadata_key, server_trailing_metadata_value) - ] - server_start_batch_result = server_call.start_batch([ - _types.OpArgs.send_initial_metadata(server_initial_metadata), - _types.OpArgs.recv_message(), - _types.OpArgs.send_message(response, 0), - _types.OpArgs.recv_close_on_server(), - _types.OpArgs.send_status_from_server( - server_trailing_metadata, server_status_code, server_status_details) - ], server_call_tag) - self.assertEqual(_types.CallError.OK, server_start_batch_result) - - client_event, server_event, = wait_for_events( - [self.client_completion_queue, self.server_completion_queue], - time.time() + event_time_tolerance) - - self.assertEqual(6, len(client_event.results)) - found_client_op_types = set() - for client_result in client_event.results: - # we expect each op type to be unique - self.assertNotIn(client_result.type, found_client_op_types) - found_client_op_types.add(client_result.type) - if client_result.type == _types.OpType.RECV_INITIAL_METADATA: - self.assertTrue( - test_common.metadata_transmitted(server_initial_metadata, - client_result.initial_metadata)) - elif client_result.type == _types.OpType.RECV_MESSAGE: - self.assertEqual(response.encode(), client_result.message) - elif client_result.type == _types.OpType.RECV_STATUS_ON_CLIENT: - self.assertTrue( - test_common.metadata_transmitted(server_trailing_metadata, - client_result.trailing_metadata)) - self.assertEqual(server_status_details.encode(), client_result.status.details) - self.assertEqual(server_status_code, client_result.status.code) - self.assertEqual(set([ - _types.OpType.SEND_INITIAL_METADATA, - _types.OpType.SEND_MESSAGE, - _types.OpType.SEND_CLOSE_FROM_CLIENT, - _types.OpType.RECV_INITIAL_METADATA, - _types.OpType.RECV_MESSAGE, - _types.OpType.RECV_STATUS_ON_CLIENT - ]), found_client_op_types) - - self.assertEqual(5, len(server_event.results)) - found_server_op_types = set() - for server_result in server_event.results: - self.assertNotIn(client_result.type, found_server_op_types) - found_server_op_types.add(server_result.type) - if server_result.type == _types.OpType.RECV_MESSAGE: - self.assertEqual(request.encode(), server_result.message) - elif server_result.type == _types.OpType.RECV_CLOSE_ON_SERVER: - self.assertFalse(server_result.cancelled) - self.assertEqual(set([ - _types.OpType.SEND_INITIAL_METADATA, - _types.OpType.RECV_MESSAGE, - _types.OpType.SEND_MESSAGE, - _types.OpType.RECV_CLOSE_ON_SERVER, - _types.OpType.SEND_STATUS_FROM_SERVER - ]), found_server_op_types) - - del client_call - del server_call - - -class HangingServerShutdown(unittest.TestCase): - - def setUp(self): - self.server_completion_queue = _low.CompletionQueue() - self.server = _low.Server(self.server_completion_queue, []) - self.port = self.server.add_http2_port('[::]:0') - self.client_completion_queue = _low.CompletionQueue() - self.client_channel = _low.Channel('localhost:%d'%self.port, []) - - self.server.start() - - def tearDown(self): - self.server.shutdown() - del self.client_channel - - self.client_completion_queue.shutdown() - self.server_completion_queue.shutdown() - while True: - client_event, server_event = wait_for_events( - [self.client_completion_queue, self.server_completion_queue], - float("+inf")) - if (client_event.type == _types.EventType.QUEUE_SHUTDOWN and - server_event.type == _types.EventType.QUEUE_SHUTDOWN): - break - - del self.client_completion_queue - del self.server_completion_queue - del self.server - - def testHangingServerCall(self): - deadline = time.time() + 5 - deadline_tolerance = 0.25 - event_time_tolerance = 2 - cancel_all_calls_time_tolerance = 0.5 - request = 'blarghaflargh' - method = 'twinkies' - host = 'hostess' - server_request_tag = object() - request_call_result = self.server.request_call(self.server_completion_queue, - server_request_tag) - - client_call_tag = object() - client_call = self.client_channel.create_call(self.client_completion_queue, - method, host, deadline) - client_start_batch_result = client_call.start_batch([ - _types.OpArgs.send_initial_metadata([]), - _types.OpArgs.send_message(request, 0), - _types.OpArgs.send_close_from_client(), - _types.OpArgs.recv_initial_metadata(), - _types.OpArgs.recv_message(), - _types.OpArgs.recv_status_on_client() - ], client_call_tag) - - client_no_event, request_event, = wait_for_events( - [self.client_completion_queue, self.server_completion_queue], - time.time() + event_time_tolerance) - - # Now try to shutdown the server and expect that we see server shutdown - # almost immediately after calling cancel_all_calls. - - # First attempt to cancel all calls before shutting down, and expect - # our state machine to catch the erroneous API use. - with self.assertRaises(RuntimeError): - self.server.cancel_all_calls() - - shutdown_tag = object() - self.server.shutdown(shutdown_tag) - pre_cancel_timestamp = time.time() - self.server.cancel_all_calls() - finish_shutdown_timestamp = None - client_call_event, server_shutdown_event = wait_for_events( - [self.client_completion_queue, self.server_completion_queue], - time.time() + event_time_tolerance) - self.assertIs(shutdown_tag, server_shutdown_event.tag) - self.assertGreater(pre_cancel_timestamp + cancel_all_calls_time_tolerance, - time.time()) - - del client_call - - -if __name__ == '__main__': - unittest.main(verbosity=2) diff --git a/src/python/grpcio/tests/unit/_core_over_links_base_interface_test.py b/src/python/grpcio/tests/unit/_core_over_links_base_interface_test.py deleted file mode 100644 index 2b8981c7523..00000000000 --- a/src/python/grpcio/tests/unit/_core_over_links_base_interface_test.py +++ /dev/null @@ -1,157 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Tests Base interface compliance of the core-over-gRPC-links stack.""" - -import collections -import logging -import random -import time -import unittest - -import six - -from grpc._adapter import _intermediary_low -from grpc._links import invocation -from grpc._links import service -from grpc.beta import interfaces as beta_interfaces -from grpc.framework.core import implementations -from grpc.framework.interfaces.base import utilities -from tests.unit import test_common as grpc_test_common -from tests.unit.framework.common import test_constants -from tests.unit.framework.interfaces.base import test_cases -from tests.unit.framework.interfaces.base import test_interfaces - - -class _SerializationBehaviors( - collections.namedtuple( - '_SerializationBehaviors', - ('request_serializers', 'request_deserializers', 'response_serializers', - 'response_deserializers',))): - pass - - -class _Links( - collections.namedtuple( - '_Links', - ('invocation_end_link', 'invocation_grpc_link', 'service_grpc_link', - 'service_end_link'))): - pass - - -def _serialization_behaviors_from_serializations(serializations): - request_serializers = {} - request_deserializers = {} - response_serializers = {} - response_deserializers = {} - for (group, method), serialization in six.iteritems(serializations): - request_serializers[group, method] = serialization.serialize_request - request_deserializers[group, method] = serialization.deserialize_request - response_serializers[group, method] = serialization.serialize_response - response_deserializers[group, method] = serialization.deserialize_response - return _SerializationBehaviors( - request_serializers, request_deserializers, response_serializers, - response_deserializers) - - -class _Implementation(test_interfaces.Implementation): - - def instantiate(self, serializations, servicer): - serialization_behaviors = _serialization_behaviors_from_serializations( - serializations) - invocation_end_link = implementations.invocation_end_link() - service_end_link = implementations.service_end_link( - servicer, test_constants.DEFAULT_TIMEOUT, - test_constants.MAXIMUM_TIMEOUT) - service_grpc_link = service.service_link( - serialization_behaviors.request_deserializers, - serialization_behaviors.response_serializers) - port = service_grpc_link.add_port('[::]:0', None) - channel = _intermediary_low.Channel('localhost:%d' % port, None) - invocation_grpc_link = invocation.invocation_link( - channel, b'localhost', None, - serialization_behaviors.request_serializers, - serialization_behaviors.response_deserializers) - - invocation_end_link.join_link(invocation_grpc_link) - invocation_grpc_link.join_link(invocation_end_link) - service_end_link.join_link(service_grpc_link) - service_grpc_link.join_link(service_end_link) - invocation_grpc_link.start() - service_grpc_link.start() - return invocation_end_link, service_end_link, ( - invocation_grpc_link, service_grpc_link) - - def destantiate(self, memo): - invocation_grpc_link, service_grpc_link = memo - invocation_grpc_link.stop() - service_grpc_link.begin_stop() - service_grpc_link.end_stop() - - def invocation_initial_metadata(self): - return grpc_test_common.INVOCATION_INITIAL_METADATA - - def service_initial_metadata(self): - return grpc_test_common.SERVICE_INITIAL_METADATA - - def invocation_completion(self): - return utilities.completion(None, None, None) - - def service_completion(self): - return utilities.completion( - grpc_test_common.SERVICE_TERMINAL_METADATA, - beta_interfaces.StatusCode.OK, grpc_test_common.DETAILS) - - def metadata_transmitted(self, original_metadata, transmitted_metadata): - return original_metadata is None or grpc_test_common.metadata_transmitted( - original_metadata, transmitted_metadata) - - def completion_transmitted(self, original_completion, transmitted_completion): - if (original_completion.terminal_metadata is not None and - not grpc_test_common.metadata_transmitted( - original_completion.terminal_metadata, - transmitted_completion.terminal_metadata)): - return False - elif original_completion.code is not transmitted_completion.code: - return False - elif original_completion.message != transmitted_completion.message: - return False - else: - return True - - -def load_tests(loader, tests, pattern): - return unittest.TestSuite( - tests=tuple( - loader.loadTestsFromTestCase(test_case_class) - for test_case_class in test_cases.test_cases(_Implementation()))) - - -if __name__ == '__main__': - unittest.main(verbosity=2) diff --git a/src/python/grpcio/tests/unit/_crust_over_core_over_links_face_interface_test.py b/src/python/grpcio/tests/unit/_crust_over_core_over_links_face_interface_test.py deleted file mode 100644 index 50b9a5a8244..00000000000 --- a/src/python/grpcio/tests/unit/_crust_over_core_over_links_face_interface_test.py +++ /dev/null @@ -1,163 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Tests Face compliance of the crust-over-core-over-gRPC-links stack.""" - -import collections -import unittest - -import six - -from grpc._adapter import _intermediary_low -from grpc._links import invocation -from grpc._links import service -from grpc.beta import interfaces as beta_interfaces -from grpc.framework.core import implementations as core_implementations -from grpc.framework.crust import implementations as crust_implementations -from grpc.framework.foundation import logging_pool -from grpc.framework.interfaces.links import utilities -from tests.unit import test_common as grpc_test_common -from tests.unit.framework.common import test_constants -from tests.unit.framework.interfaces.face import test_cases -from tests.unit.framework.interfaces.face import test_interfaces - - -class _SerializationBehaviors( - collections.namedtuple( - '_SerializationBehaviors', - ('request_serializers', 'request_deserializers', 'response_serializers', - 'response_deserializers',))): - pass - - -def _serialization_behaviors_from_test_methods(test_methods): - request_serializers = {} - request_deserializers = {} - response_serializers = {} - response_deserializers = {} - for (group, method), test_method in six.iteritems(test_methods): - request_serializers[group, method] = test_method.serialize_request - request_deserializers[group, method] = test_method.deserialize_request - response_serializers[group, method] = test_method.serialize_response - response_deserializers[group, method] = test_method.deserialize_response - return _SerializationBehaviors( - request_serializers, request_deserializers, response_serializers, - response_deserializers) - - -class _Implementation(test_interfaces.Implementation): - - def instantiate( - self, methods, method_implementations, multi_method_implementation): - pool = logging_pool.pool(test_constants.POOL_SIZE) - servicer = crust_implementations.servicer( - method_implementations, multi_method_implementation, pool) - serialization_behaviors = _serialization_behaviors_from_test_methods( - methods) - invocation_end_link = core_implementations.invocation_end_link() - service_end_link = core_implementations.service_end_link( - servicer, test_constants.DEFAULT_TIMEOUT, - test_constants.MAXIMUM_TIMEOUT) - service_grpc_link = service.service_link( - serialization_behaviors.request_deserializers, - serialization_behaviors.response_serializers) - port = service_grpc_link.add_port('[::]:0', None) - channel = _intermediary_low.Channel('localhost:%d' % port, None) - invocation_grpc_link = invocation.invocation_link( - channel, b'localhost', None, - serialization_behaviors.request_serializers, - serialization_behaviors.response_deserializers) - - invocation_end_link.join_link(invocation_grpc_link) - invocation_grpc_link.join_link(invocation_end_link) - service_grpc_link.join_link(service_end_link) - service_end_link.join_link(service_grpc_link) - service_end_link.start() - invocation_end_link.start() - invocation_grpc_link.start() - service_grpc_link.start() - - generic_stub = crust_implementations.generic_stub(invocation_end_link, pool) - # TODO(nathaniel): Add a "groups" attribute to _digest.TestServiceDigest. - group = next(iter(methods))[0] - # TODO(nathaniel): Add a "cardinalities_by_group" attribute to - # _digest.TestServiceDigest. - cardinalities = { - method: method_object.cardinality() - for (group, method), method_object in six.iteritems(methods)} - dynamic_stub = crust_implementations.dynamic_stub( - invocation_end_link, group, cardinalities, pool) - - return generic_stub, {group: dynamic_stub}, ( - invocation_end_link, invocation_grpc_link, service_grpc_link, - service_end_link, pool) - - def destantiate(self, memo): - (invocation_end_link, invocation_grpc_link, service_grpc_link, - service_end_link, pool) = memo - invocation_end_link.stop(0).wait() - invocation_grpc_link.stop() - service_grpc_link.begin_stop() - service_end_link.stop(0).wait() - service_grpc_link.end_stop() - invocation_end_link.join_link(utilities.NULL_LINK) - invocation_grpc_link.join_link(utilities.NULL_LINK) - service_grpc_link.join_link(utilities.NULL_LINK) - service_end_link.join_link(utilities.NULL_LINK) - pool.shutdown(wait=True) - - def invocation_metadata(self): - return grpc_test_common.INVOCATION_INITIAL_METADATA - - def initial_metadata(self): - return grpc_test_common.SERVICE_INITIAL_METADATA - - def terminal_metadata(self): - return grpc_test_common.SERVICE_TERMINAL_METADATA - - def code(self): - return beta_interfaces.StatusCode.OK - - def details(self): - return grpc_test_common.DETAILS - - def metadata_transmitted(self, original_metadata, transmitted_metadata): - return original_metadata is None or grpc_test_common.metadata_transmitted( - original_metadata, transmitted_metadata) - - -def load_tests(loader, tests, pattern): - return unittest.TestSuite( - tests=tuple( - loader.loadTestsFromTestCase(test_case_class) - for test_case_class in test_cases.test_cases(_Implementation()))) - - -if __name__ == '__main__': - unittest.main(verbosity=2) diff --git a/src/python/grpcio/tests/unit/_links/_lonely_invocation_link_test.py b/src/python/grpcio/tests/unit/_links/_lonely_invocation_link_test.py deleted file mode 100644 index 890755f81c5..00000000000 --- a/src/python/grpcio/tests/unit/_links/_lonely_invocation_link_test.py +++ /dev/null @@ -1,88 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""A test of invocation-side code unconnected to an RPC server.""" - -import unittest - -from grpc._adapter import _intermediary_low -from grpc._links import invocation -from grpc.framework.interfaces.links import links -from tests.unit.framework.common import test_constants -from tests.unit.framework.interfaces.links import test_cases -from tests.unit.framework.interfaces.links import test_utilities - -_NULL_BEHAVIOR = lambda unused_argument: None - - -class LonelyInvocationLinkTest(unittest.TestCase): - - def testUpAndDown(self): - channel = _intermediary_low.Channel('nonexistent:54321', None) - invocation_link = invocation.invocation_link( - channel, 'nonexistent', None, {}, {}) - - invocation_link.start() - invocation_link.stop() - - def _test_lonely_invocation_with_termination(self, termination): - test_operation_id = object() - test_group = 'test package.Test Service' - test_method = 'test method' - invocation_link_mate = test_utilities.RecordingLink() - - channel = _intermediary_low.Channel('nonexistent:54321', None) - invocation_link = invocation.invocation_link( - channel, 'nonexistent', None, {}, {}) - invocation_link.join_link(invocation_link_mate) - invocation_link.start() - - ticket = links.Ticket( - test_operation_id, 0, test_group, test_method, - links.Ticket.Subscription.FULL, test_constants.SHORT_TIMEOUT, 1, None, - None, None, None, None, termination, None) - invocation_link.accept_ticket(ticket) - invocation_link_mate.block_until_tickets_satisfy(test_cases.terminated) - - invocation_link.stop() - - self.assertIsNot( - invocation_link_mate.tickets()[-1].termination, - links.Ticket.Termination.COMPLETION) - - def testLonelyInvocationLinkWithCommencementTicket(self): - self._test_lonely_invocation_with_termination(None) - - def testLonelyInvocationLinkWithEntireTicket(self): - self._test_lonely_invocation_with_termination( - links.Ticket.Termination.COMPLETION) - - -if __name__ == '__main__': - unittest.main() diff --git a/src/python/grpcio/tests/unit/_links/_transmission_test.py b/src/python/grpcio/tests/unit/_links/_transmission_test.py deleted file mode 100644 index 1f6edd18ca7..00000000000 --- a/src/python/grpcio/tests/unit/_links/_transmission_test.py +++ /dev/null @@ -1,239 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Tests transmission of tickets across gRPC-on-the-wire.""" - -import unittest - -from grpc._adapter import _intermediary_low -from grpc._links import invocation -from grpc._links import service -from grpc.beta import interfaces as beta_interfaces -from grpc.framework.interfaces.links import links -from tests.unit import test_common -from tests.unit._links import _proto_scenarios -from tests.unit.framework.common import test_constants -from tests.unit.framework.interfaces.links import test_cases -from tests.unit.framework.interfaces.links import test_utilities - -_IDENTITY = lambda x: x - - -class TransmissionTest(test_cases.TransmissionTest, unittest.TestCase): - - def create_transmitting_links(self): - service_link = service.service_link( - {self.group_and_method(): self.deserialize_request}, - {self.group_and_method(): self.serialize_response}) - port = service_link.add_port('[::]:0', None) - service_link.start() - channel = _intermediary_low.Channel('localhost:%d' % port, None) - invocation_link = invocation.invocation_link( - channel, 'localhost', None, - {self.group_and_method(): self.serialize_request}, - {self.group_and_method(): self.deserialize_response}) - invocation_link.start() - return invocation_link, service_link - - def destroy_transmitting_links(self, invocation_side_link, service_side_link): - invocation_side_link.stop() - service_side_link.begin_stop() - service_side_link.end_stop() - - def create_invocation_initial_metadata(self): - return ( - ('first_invocation_initial_metadata_key', 'just a string value'), - ('second_invocation_initial_metadata_key', '0123456789'), - ('third_invocation_initial_metadata_key-bin', '\x00\x57' * 100), - ) - - def create_invocation_terminal_metadata(self): - return None - - def create_service_initial_metadata(self): - return ( - ('first_service_initial_metadata_key', 'just another string value'), - ('second_service_initial_metadata_key', '9876543210'), - ('third_service_initial_metadata_key-bin', '\x00\x59\x02' * 100), - ) - - def create_service_terminal_metadata(self): - return ( - ('first_service_terminal_metadata_key', 'yet another string value'), - ('second_service_terminal_metadata_key', 'abcdefghij'), - ('third_service_terminal_metadata_key-bin', '\x00\x37' * 100), - ) - - def create_invocation_completion(self): - return None, None - - def create_service_completion(self): - return ( - beta_interfaces.StatusCode.OK, b'An exuberant test "details" message!') - - def assertMetadataTransmitted(self, original_metadata, transmitted_metadata): - self.assertTrue( - test_common.metadata_transmitted( - original_metadata, transmitted_metadata), - '%s erroneously transmitted as %s' % ( - original_metadata, transmitted_metadata)) - - -class RoundTripTest(unittest.TestCase): - - def testZeroMessageRoundTrip(self): - test_operation_id = object() - test_group = 'test package.Test Group' - test_method = 'test method' - identity_transformation = {(test_group, test_method): _IDENTITY} - test_code = beta_interfaces.StatusCode.OK - test_message = 'a test message' - - service_link = service.service_link( - identity_transformation, identity_transformation) - service_mate = test_utilities.RecordingLink() - service_link.join_link(service_mate) - port = service_link.add_port('[::]:0', None) - service_link.start() - channel = _intermediary_low.Channel('localhost:%d' % port, None) - invocation_link = invocation.invocation_link( - channel, None, None, identity_transformation, identity_transformation) - invocation_mate = test_utilities.RecordingLink() - invocation_link.join_link(invocation_mate) - invocation_link.start() - - invocation_ticket = links.Ticket( - test_operation_id, 0, test_group, test_method, - links.Ticket.Subscription.FULL, test_constants.LONG_TIMEOUT, None, None, - None, None, None, None, links.Ticket.Termination.COMPLETION, None) - invocation_link.accept_ticket(invocation_ticket) - service_mate.block_until_tickets_satisfy(test_cases.terminated) - - service_ticket = links.Ticket( - service_mate.tickets()[-1].operation_id, 0, None, None, None, None, - None, None, None, None, test_code, test_message, - links.Ticket.Termination.COMPLETION, None) - service_link.accept_ticket(service_ticket) - invocation_mate.block_until_tickets_satisfy(test_cases.terminated) - - invocation_link.stop() - service_link.begin_stop() - service_link.end_stop() - - self.assertIs( - service_mate.tickets()[-1].termination, - links.Ticket.Termination.COMPLETION) - self.assertIs( - invocation_mate.tickets()[-1].termination, - links.Ticket.Termination.COMPLETION) - self.assertIs(invocation_mate.tickets()[-1].code, test_code) - self.assertEqual(invocation_mate.tickets()[-1].message, test_message.encode()) - - def _perform_scenario_test(self, scenario): - test_operation_id = object() - test_group, test_method = scenario.group_and_method() - test_code = beta_interfaces.StatusCode.OK - test_message = 'a scenario test message' - - service_link = service.service_link( - {(test_group, test_method): scenario.deserialize_request}, - {(test_group, test_method): scenario.serialize_response}) - service_mate = test_utilities.RecordingLink() - service_link.join_link(service_mate) - port = service_link.add_port('[::]:0', None) - service_link.start() - channel = _intermediary_low.Channel('localhost:%d' % port, None) - invocation_link = invocation.invocation_link( - channel, 'localhost', None, - {(test_group, test_method): scenario.serialize_request}, - {(test_group, test_method): scenario.deserialize_response}) - invocation_mate = test_utilities.RecordingLink() - invocation_link.join_link(invocation_mate) - invocation_link.start() - - invocation_ticket = links.Ticket( - test_operation_id, 0, test_group, test_method, - links.Ticket.Subscription.FULL, test_constants.LONG_TIMEOUT, None, None, - None, None, None, None, None, None) - invocation_link.accept_ticket(invocation_ticket) - requests = scenario.requests() - for request_index, request in enumerate(requests): - request_ticket = links.Ticket( - test_operation_id, 1 + request_index, None, None, None, None, 1, None, - request, None, None, None, None, None) - invocation_link.accept_ticket(request_ticket) - service_mate.block_until_tickets_satisfy( - test_cases.at_least_n_payloads_received_predicate(1 + request_index)) - response_ticket = links.Ticket( - service_mate.tickets()[0].operation_id, request_index, None, None, - None, None, 1, None, scenario.response_for_request(request), None, - None, None, None, None) - service_link.accept_ticket(response_ticket) - invocation_mate.block_until_tickets_satisfy( - test_cases.at_least_n_payloads_received_predicate(1 + request_index)) - request_count = len(requests) - invocation_completion_ticket = links.Ticket( - test_operation_id, request_count + 1, None, None, None, None, None, - None, None, None, None, None, links.Ticket.Termination.COMPLETION, - None) - invocation_link.accept_ticket(invocation_completion_ticket) - service_mate.block_until_tickets_satisfy(test_cases.terminated) - service_completion_ticket = links.Ticket( - service_mate.tickets()[0].operation_id, request_count, None, None, None, - None, None, None, None, None, test_code, test_message, - links.Ticket.Termination.COMPLETION, None) - service_link.accept_ticket(service_completion_ticket) - invocation_mate.block_until_tickets_satisfy(test_cases.terminated) - - invocation_link.stop() - service_link.begin_stop() - service_link.end_stop() - - observed_requests = tuple( - ticket.payload for ticket in service_mate.tickets() - if ticket.payload is not None) - observed_responses = tuple( - ticket.payload for ticket in invocation_mate.tickets() - if ticket.payload is not None) - self.assertTrue(scenario.verify_requests(observed_requests)) - self.assertTrue(scenario.verify_responses(observed_responses)) - - def testEmptyScenario(self): - self._perform_scenario_test(_proto_scenarios.EmptyScenario()) - - def testBidirectionallyUnaryScenario(self): - self._perform_scenario_test(_proto_scenarios.BidirectionallyUnaryScenario()) - - def testBidirectionallyStreamingScenario(self): - self._perform_scenario_test( - _proto_scenarios.BidirectionallyStreamingScenario()) - - -if __name__ == '__main__': - unittest.main(verbosity=2) diff --git a/src/python/grpcio/tests/unit/framework/_crust_over_core_face_interface_test.py b/src/python/grpcio/tests/unit/framework/_crust_over_core_face_interface_test.py deleted file mode 100644 index 43457be362a..00000000000 --- a/src/python/grpcio/tests/unit/framework/_crust_over_core_face_interface_test.py +++ /dev/null @@ -1,113 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Tests Face interface compliance of the crust-over-core stack.""" - -import collections -import unittest - -import six - -from grpc.framework.core import implementations as core_implementations -from grpc.framework.crust import implementations as crust_implementations -from grpc.framework.foundation import logging_pool -from grpc.framework.interfaces.links import utilities -from tests.unit.framework.common import test_constants -from tests.unit.framework.interfaces.face import test_cases -from tests.unit.framework.interfaces.face import test_interfaces -from tests.unit.framework.interfaces.links import test_utilities - - -class _Implementation(test_interfaces.Implementation): - - def instantiate( - self, methods, method_implementations, multi_method_implementation): - pool = logging_pool.pool(test_constants.POOL_SIZE) - servicer = crust_implementations.servicer( - method_implementations, multi_method_implementation, pool) - - service_end_link = core_implementations.service_end_link( - servicer, test_constants.DEFAULT_TIMEOUT, - test_constants.MAXIMUM_TIMEOUT) - invocation_end_link = core_implementations.invocation_end_link() - invocation_end_link.join_link(service_end_link) - service_end_link.join_link(invocation_end_link) - service_end_link.start() - invocation_end_link.start() - - generic_stub = crust_implementations.generic_stub(invocation_end_link, pool) - # TODO(nathaniel): Add a "groups" attribute to _digest.TestServiceDigest. - group = next(iter(methods))[0] - # TODO(nathaniel): Add a "cardinalities_by_group" attribute to - # _digest.TestServiceDigest. - cardinalities = { - method: method_object.cardinality() - for (group, method), method_object in six.iteritems(methods)} - dynamic_stub = crust_implementations.dynamic_stub( - invocation_end_link, group, cardinalities, pool) - - return generic_stub, {group: dynamic_stub}, ( - invocation_end_link, service_end_link, pool) - - def destantiate(self, memo): - invocation_end_link, service_end_link, pool = memo - invocation_end_link.stop(0).wait() - service_end_link.stop(0).wait() - invocation_end_link.join_link(utilities.NULL_LINK) - service_end_link.join_link(utilities.NULL_LINK) - pool.shutdown(wait=True) - - def invocation_metadata(self): - return object() - - def initial_metadata(self): - return object() - - def terminal_metadata(self): - return object() - - def code(self): - return object() - - def details(self): - return object() - - def metadata_transmitted(self, original_metadata, transmitted_metadata): - return original_metadata is transmitted_metadata - - -def load_tests(loader, tests, pattern): - return unittest.TestSuite( - tests=tuple( - loader.loadTestsFromTestCase(test_case_class) - for test_case_class in test_cases.test_cases(_Implementation()))) - - -if __name__ == '__main__': - unittest.main(verbosity=2) diff --git a/src/python/grpcio/tests/unit/framework/core/_base_interface_test.py b/src/python/grpcio/tests/unit/framework/core/_base_interface_test.py deleted file mode 100644 index 13102923061..00000000000 --- a/src/python/grpcio/tests/unit/framework/core/_base_interface_test.py +++ /dev/null @@ -1,96 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Tests the RPC Framework Core's implementation of the Base interface.""" - -import logging -import random -import time -import unittest - -from grpc.framework.core import implementations -from grpc.framework.interfaces.base import utilities -from tests.unit.framework.common import test_constants -from tests.unit.framework.interfaces.base import test_cases -from tests.unit.framework.interfaces.base import test_interfaces - - -class _Implementation(test_interfaces.Implementation): - - def __init__(self): - self._invocation_initial_metadata = object() - self._service_initial_metadata = object() - self._invocation_terminal_metadata = object() - self._service_terminal_metadata = object() - - def instantiate(self, serializations, servicer): - invocation = implementations.invocation_end_link() - service = implementations.service_end_link( - servicer, test_constants.DEFAULT_TIMEOUT, - test_constants.MAXIMUM_TIMEOUT) - invocation.join_link(service) - service.join_link(invocation) - return invocation, service, None - - def destantiate(self, memo): - pass - - def invocation_initial_metadata(self): - return self._invocation_initial_metadata - - def service_initial_metadata(self): - return self._service_initial_metadata - - def invocation_completion(self): - return utilities.completion(self._invocation_terminal_metadata, None, None) - - def service_completion(self): - return utilities.completion(self._service_terminal_metadata, None, None) - - def metadata_transmitted(self, original_metadata, transmitted_metadata): - return transmitted_metadata is original_metadata - - def completion_transmitted(self, original_completion, transmitted_completion): - return ( - (original_completion.terminal_metadata is - transmitted_completion.terminal_metadata) and - original_completion.code is transmitted_completion.code and - original_completion.message is transmitted_completion.message - ) - - -def load_tests(loader, tests, pattern): - return unittest.TestSuite( - tests=tuple( - loader.loadTestsFromTestCase(test_case_class) - for test_case_class in test_cases.test_cases(_Implementation()))) - - -if __name__ == '__main__': - unittest.main(verbosity=2) diff --git a/src/python/grpcio/tests/unit/framework/foundation/_later_test.py b/src/python/grpcio/tests/unit/framework/foundation/_later_test.py deleted file mode 100644 index 6c2459e1851..00000000000 --- a/src/python/grpcio/tests/unit/framework/foundation/_later_test.py +++ /dev/null @@ -1,151 +0,0 @@ -# Copyright 2015, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -"""Tests of the later module.""" - -import threading -import time -import unittest - -from grpc.framework.foundation import later - -TICK = 0.1 - - -class LaterTest(unittest.TestCase): - - def test_simple_delay(self): - lock = threading.Lock() - cell = [0] - return_value = object() - - def computation(): - with lock: - cell[0] += 1 - return return_value - computation_future = later.later(TICK * 2, computation) - - self.assertFalse(computation_future.done()) - self.assertFalse(computation_future.cancelled()) - time.sleep(TICK) - self.assertFalse(computation_future.done()) - self.assertFalse(computation_future.cancelled()) - with lock: - self.assertEqual(0, cell[0]) - time.sleep(TICK * 2) - self.assertTrue(computation_future.done()) - self.assertFalse(computation_future.cancelled()) - with lock: - self.assertEqual(1, cell[0]) - self.assertEqual(return_value, computation_future.result()) - - def test_callback(self): - lock = threading.Lock() - cell = [0] - callback_called = [False] - future_passed_to_callback = [None] - def computation(): - with lock: - cell[0] += 1 - computation_future = later.later(TICK * 2, computation) - def callback(outcome): - with lock: - callback_called[0] = True - future_passed_to_callback[0] = outcome - computation_future.add_done_callback(callback) - time.sleep(TICK) - with lock: - self.assertFalse(callback_called[0]) - time.sleep(TICK * 2) - with lock: - self.assertTrue(callback_called[0]) - self.assertTrue(future_passed_to_callback[0].done()) - - callback_called[0] = False - future_passed_to_callback[0] = None - - computation_future.add_done_callback(callback) - with lock: - self.assertTrue(callback_called[0]) - self.assertTrue(future_passed_to_callback[0].done()) - - def test_cancel(self): - lock = threading.Lock() - cell = [0] - callback_called = [False] - future_passed_to_callback = [None] - def computation(): - with lock: - cell[0] += 1 - computation_future = later.later(TICK * 2, computation) - def callback(outcome): - with lock: - callback_called[0] = True - future_passed_to_callback[0] = outcome - computation_future.add_done_callback(callback) - time.sleep(TICK) - with lock: - self.assertFalse(callback_called[0]) - computation_future.cancel() - self.assertTrue(computation_future.cancelled()) - self.assertFalse(computation_future.running()) - self.assertTrue(computation_future.done()) - with lock: - self.assertTrue(callback_called[0]) - self.assertTrue(future_passed_to_callback[0].cancelled()) - - def test_result(self): - lock = threading.Lock() - cell = [0] - callback_called = [False] - future_passed_to_callback_cell = [None] - return_value = object() - - def computation(): - with lock: - cell[0] += 1 - return return_value - computation_future = later.later(TICK * 2, computation) - - def callback(future_passed_to_callback): - with lock: - callback_called[0] = True - future_passed_to_callback_cell[0] = future_passed_to_callback - computation_future.add_done_callback(callback) - returned_value = computation_future.result() - self.assertEqual(return_value, returned_value) - - # The callback may not yet have been called! Sleep a tick. - time.sleep(TICK) - with lock: - self.assertTrue(callback_called[0]) - self.assertEqual(return_value, future_passed_to_callback_cell[0].result()) - -if __name__ == '__main__': - unittest.main(verbosity=2) From 78a73333b705a9d184da7f3174533500d05b2a21 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 20 Jun 2016 08:24:44 -0700 Subject: [PATCH 1179/1894] Fix memory leak upon receiving two RST_STREAMs --- .../chttp2/transport/frame_rst_stream.c | 14 +- .../2c452818a10ddef09b90c89a53db14b9b56b21f3 | Bin 0 -> 52 bytes .../42ead79c94eccdf8a8c3d8036be73e14fa260dd5 | Bin 0 -> 64 bytes .../4e05d6cf1c3f0c04f6ee92d09a53ee0fe35c085a | Bin 0 -> 64 bytes .../8f980dd25f1c77e3536131c2c620aa32e8c13180 | Bin 0 -> 14 bytes .../aef36c49d7dec0dcf8cdc224d9e9221fa2cb1db0 | Bin 0 -> 53 bytes ...h-14ed70cd9ea7987cdd0c8f6e39398ee7c60ee2ff | Bin 0 -> 719 bytes .../dcb06a6e34cbed15515e5b3581ca666f704777bd | Bin 0 -> 238 bytes .../ea46b684f1e67a27c231f2d536c41da631189b9c | Bin 0 -> 696 bytes tools/run_tests/tests.json | 152 ++++++++++++++++++ 10 files changed, 160 insertions(+), 6 deletions(-) create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/2c452818a10ddef09b90c89a53db14b9b56b21f3 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/42ead79c94eccdf8a8c3d8036be73e14fa260dd5 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/4e05d6cf1c3f0c04f6ee92d09a53ee0fe35c085a create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/8f980dd25f1c77e3536131c2c620aa32e8c13180 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/aef36c49d7dec0dcf8cdc224d9e9221fa2cb1db0 create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/crash-14ed70cd9ea7987cdd0c8f6e39398ee7c60ee2ff create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/dcb06a6e34cbed15515e5b3581ca666f704777bd create mode 100644 test/core/end2end/fuzzers/client_fuzzer_corpus/ea46b684f1e67a27c231f2d536c41da631189b9c diff --git a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c index a7aefb99158..e3a3c9e4a7c 100644 --- a/src/core/ext/transport/chttp2/transport/frame_rst_stream.c +++ b/src/core/ext/transport/chttp2/transport/frame_rst_stream.c @@ -102,12 +102,14 @@ grpc_error *grpc_chttp2_rst_stream_parser_parse( if (p->byte == 4) { GPR_ASSERT(is_last); stream_parsing->received_close = 1; - stream_parsing->forced_close_error = grpc_error_set_int( - GRPC_ERROR_CREATE("RST_STREAM"), GRPC_ERROR_INT_HTTP2_ERROR, - (intptr_t)((((uint32_t)p->reason_bytes[0]) << 24) | - (((uint32_t)p->reason_bytes[1]) << 16) | - (((uint32_t)p->reason_bytes[2]) << 8) | - (((uint32_t)p->reason_bytes[3])))); + if (stream_parsing->forced_close_error == GRPC_ERROR_NONE) { + stream_parsing->forced_close_error = grpc_error_set_int( + GRPC_ERROR_CREATE("RST_STREAM"), GRPC_ERROR_INT_HTTP2_ERROR, + (intptr_t)((((uint32_t)p->reason_bytes[0]) << 24) | + (((uint32_t)p->reason_bytes[1]) << 16) | + (((uint32_t)p->reason_bytes[2]) << 8) | + (((uint32_t)p->reason_bytes[3])))); + } } return GRPC_ERROR_NONE; diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/2c452818a10ddef09b90c89a53db14b9b56b21f3 b/test/core/end2end/fuzzers/client_fuzzer_corpus/2c452818a10ddef09b90c89a53db14b9b56b21f3 new file mode 100644 index 0000000000000000000000000000000000000000..059634fda10a679b7bb4f753fe06660888b26dd4 GIT binary patch literal 52 zcmZS3WMpJ#`1cCr>)SNic&kq1P C_Z2e$ literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/42ead79c94eccdf8a8c3d8036be73e14fa260dd5 b/test/core/end2end/fuzzers/client_fuzzer_corpus/42ead79c94eccdf8a8c3d8036be73e14fa260dd5 new file mode 100644 index 0000000000000000000000000000000000000000..b9c53b26edd94105bc4bdb24e73697cc4be93dc4 GIT binary patch literal 64 zcmZQz&|+j^U|?Wm;7KnkNY*XM%uUTNE#U@pic1npN{a=Jfbu+y3``8!3=GU5r40Z7 LGqQs;X{`VNxT6g} literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/4e05d6cf1c3f0c04f6ee92d09a53ee0fe35c085a b/test/core/end2end/fuzzers/client_fuzzer_corpus/4e05d6cf1c3f0c04f6ee92d09a53ee0fe35c085a new file mode 100644 index 0000000000000000000000000000000000000000..8a4a279998d72b2aa9b94310364f40c2580515c2 GIT binary patch literal 64 zcmZQz&|+j^U|?Wm;7KnkNY*XM%uUTNE#X!Naf(Y4OG=9cjeznzj0{W+*$fQKAf*id M|1+|KG-<5>0Is79{{R30 literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/8f980dd25f1c77e3536131c2c620aa32e8c13180 b/test/core/end2end/fuzzers/client_fuzzer_corpus/8f980dd25f1c77e3536131c2c620aa32e8c13180 new file mode 100644 index 0000000000000000000000000000000000000000..fcebab7a64f25b8dfad2cbb19851b76833a674b7 GIT binary patch literal 14 TcmZS3WMpJ#`1cCKLz? literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/aef36c49d7dec0dcf8cdc224d9e9221fa2cb1db0 b/test/core/end2end/fuzzers/client_fuzzer_corpus/aef36c49d7dec0dcf8cdc224d9e9221fa2cb1db0 new file mode 100644 index 0000000000000000000000000000000000000000..6b015fe66e6131d746ff41da4b961b0ea074a02f GIT binary patch literal 53 wcmZQzU||3OMg|5&AjJ%3v*hM7Fz|zz42+Dqxr(`e{sRfWsS`IUP6RU40etxhaR2}S literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/crash-14ed70cd9ea7987cdd0c8f6e39398ee7c60ee2ff b/test/core/end2end/fuzzers/client_fuzzer_corpus/crash-14ed70cd9ea7987cdd0c8f6e39398ee7c60ee2ff new file mode 100644 index 0000000000000000000000000000000000000000..be6366049d93b585d80d625c72ec8eabc458f8f5 GIT binary patch literal 719 zcma))!A%1(5Jl~fL&S-#01X$%d*ezZL|E_oKS9FwrjM^T*-qe*OC#i~h0zgCtcA1q!ShX>2v)Qh6$Z`_$uwt&j-F4ZR; z5Sv7_I-eYEmYW?vcl;IP1o{i~ad|8#&gc-zlgX7X`Jb@uP`1h)s-Wx}23A)%p@>wE za!C@8^?ad=qK}-dq9bit8{GOE-Go^{jRIXY;!;t6Li0vv6=jI|D`%R^2vry~vi7F? zj%DqTNjKogO;hm+{BgT~2z2|($`EkI19~LJC`TB;F;RQr8{}99X|={K^4w4OLpkCM RBFep{S=%Njy`zq%`UA}C*FFFM literal 0 HcmV?d00001 diff --git a/test/core/end2end/fuzzers/client_fuzzer_corpus/dcb06a6e34cbed15515e5b3581ca666f704777bd b/test/core/end2end/fuzzers/client_fuzzer_corpus/dcb06a6e34cbed15515e5b3581ca666f704777bd new file mode 100644 index 0000000000000000000000000000000000000000..92750f94a32152bdd71d388f47c4bcefb6ec34b8 GIT binary patch literal 238 zcmY+7F%AMj2t~o2!q`|@8)C7Jm9en!5Zu87aF}11*jjo!PvH2O)odig1Rng4NKyI5 zR^;7UGq%I&coxyJ30Y55)dt5*_uO3%k6!p!;!iRS_{tfJY8zgY`Q<}Y|ly-<3XI{!F o4-v0C#t0){Z=6m|-N-+eun0W93o~cbV+vGj(5A~7+}Qfx0kNN|?f?J) literal 0 HcmV?d00001 diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 3ed7a6bc476..2353ac85831 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -54188,6 +54188,25 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/2c452818a10ddef09b90c89a53db14b9b56b21f3" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/client_fuzzer_corpus/2c6e69067c68c145dc5d3a60b86d8081fdf95d0d" @@ -54986,6 +55005,25 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/42ead79c94eccdf8a8c3d8036be73e14fa260dd5" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/client_fuzzer_corpus/43202ad9b1a689d919ab9ae91c2d0223394867bf" @@ -55328,6 +55366,25 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/4e05d6cf1c3f0c04f6ee92d09a53ee0fe35c085a" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/client_fuzzer_corpus/4e21c4b5c454df51c102f09ea1ba78c42133ee16" @@ -57247,6 +57304,25 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/8f980dd25f1c77e3536131c2c620aa32e8c13180" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/client_fuzzer_corpus/90a9c3390752b94ca19a58cb2fe6267bc818f718" @@ -58463,6 +58539,25 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/aef36c49d7dec0dcf8cdc224d9e9221fa2cb1db0" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/client_fuzzer_corpus/af8b24ffaecdfaf96c0cd7c76f31dc9e1b4d0935" @@ -59508,6 +59603,25 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/crash-14ed70cd9ea7987cdd0c8f6e39398ee7c60ee2ff" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/client_fuzzer_corpus/crash-3bd02c98286bfa7be8e13c5500ddb587bba74fbb" @@ -60173,6 +60287,25 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/dcb06a6e34cbed15515e5b3581ca666f704777bd" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/client_fuzzer_corpus/dccd1fd6d3394f5f68c87950ed7356a2e9ef0f6f" @@ -60667,6 +60800,25 @@ ], "uses_polling": false }, + { + "args": [ + "test/core/end2end/fuzzers/client_fuzzer_corpus/ea46b684f1e67a27c231f2d536c41da631189b9c" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 0.1, + "exclude_configs": [ + "tsan" + ], + "flaky": false, + "language": "c", + "name": "client_fuzzer_one_entry", + "platforms": [ + "linux" + ], + "uses_polling": false + }, { "args": [ "test/core/end2end/fuzzers/client_fuzzer_corpus/eb969b9ab1b0d6b5d197795223ba7a091ebd8460" From 56565fca7532fcc559cd8149e437eb0a7ecdfd9b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 20 Jun 2016 08:36:53 -0700 Subject: [PATCH 1180/1894] Force receiving a SETTINGS frame as the first frame --- .../ext/transport/chttp2/transport/chttp2_transport.c | 3 ++- src/core/ext/transport/chttp2/transport/internal.h | 1 + src/core/ext/transport/chttp2/transport/parsing.c | 11 +++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 9aa39ba26c2..a8c4b271fe1 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -264,6 +264,7 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, t->parsing.is_client = is_client; t->parsing.deframe_state = is_client ? GRPC_DTS_FH_0 : GRPC_DTS_CLIENT_PREFIX_0; + t->parsing.is_first_frame = true; t->writing.is_client = is_client; t->optional_drop_message = gpr_empty_slice(); grpc_connectivity_state_init( @@ -1805,7 +1806,7 @@ static void post_reading_action_locked(grpc_exec_ctx *exec_ctx, UNREF_TRANSPORT(exec_ctx, t, "reading_action"); } - GRPC_ERROR_UNREF(error); + GRPC_LOG_IF_ERROR("close_transport", error); } /******************************************************************************* diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 54e72ebd249..64385b43724 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -265,6 +265,7 @@ struct grpc_chttp2_transport_parsing { uint8_t incoming_frame_type; uint8_t incoming_frame_flags; uint8_t header_eof; + bool is_first_frame; uint32_t expect_continuation_stream_id; uint32_t incoming_frame_size; uint32_t incoming_stream_id; diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index 785134091f5..991d7729af4 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -468,6 +468,17 @@ grpc_error *grpc_chttp2_perform_read( static grpc_error *init_frame_parser( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_parsing *transport_parsing) { + if (transport_parsing->is_first_frame && + transport_parsing->incoming_frame_type != GRPC_CHTTP2_FRAME_SETTINGS) { + char *msg; + gpr_asprintf( + &msg, "Expected SETTINGS frame as the first frame, got frame type %d", + transport_parsing->incoming_frame_type); + grpc_error *err = GRPC_ERROR_CREATE(msg); + gpr_free(msg); + return err; + } + transport_parsing->is_first_frame = false; if (transport_parsing->expect_continuation_stream_id != 0) { if (transport_parsing->incoming_frame_type != GRPC_CHTTP2_FRAME_CONTINUATION) { From b187895fc43a84d75b64aa58d21d5caf9b80ba61 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 20 Jun 2016 09:11:54 -0700 Subject: [PATCH 1181/1894] Fix windows build error --- src/core/lib/iomgr/tcp_server_windows.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index 2a51671ec71..4604f56dac7 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -103,6 +103,7 @@ struct grpc_tcp_server { /* Public function. Allocates the proper data structures to hold a grpc_tcp_server. */ grpc_error *grpc_tcp_server_create(grpc_closure *shutdown_complete, + const grpc_channel_args *args, grpc_tcp_server **server) { grpc_tcp_server *s = gpr_malloc(sizeof(grpc_tcp_server)); gpr_ref_init(&s->refs, 1); From daec5f94d2805db094cd748dbb691e25185af3c6 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 20 Jun 2016 09:24:45 -0700 Subject: [PATCH 1182/1894] We dont need to account for parsing or not when writing --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 3 +-- src/core/ext/transport/chttp2/transport/internal.h | 3 +-- src/core/ext/transport/chttp2/transport/writing.c | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index a8c4b271fe1..4eb5ba8270e 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -644,8 +644,7 @@ static void finish_global_actions(grpc_exec_ctx *exec_ctx, for (;;) { if (!t->executor.writing_active && !t->closed && - grpc_chttp2_unlocking_check_writes(exec_ctx, &t->global, &t->writing, - t->executor.parsing_active)) { + grpc_chttp2_unlocking_check_writes(exec_ctx, &t->global, &t->writing)) { t->executor.writing_active = 1; REF_TRANSPORT(t, "writing"); prevent_endpoint_shutdown(t); diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 64385b43724..909c406f8a8 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -525,8 +525,7 @@ struct grpc_chttp2_stream { are required, and schedule them if so */ int grpc_chttp2_unlocking_check_writes(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *global, - grpc_chttp2_transport_writing *writing, - int is_parsing); + grpc_chttp2_transport_writing *writing); void grpc_chttp2_perform_writes( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_writing *transport_writing, grpc_endpoint *endpoint); diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index add76781827..b19f5f068df 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -45,7 +45,7 @@ static void finalize_outbuf(grpc_exec_ctx *exec_ctx, int grpc_chttp2_unlocking_check_writes( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, - grpc_chttp2_transport_writing *transport_writing, int is_parsing) { + grpc_chttp2_transport_writing *transport_writing) { grpc_chttp2_stream_global *stream_global; grpc_chttp2_stream_writing *stream_writing; @@ -61,7 +61,7 @@ int grpc_chttp2_unlocking_check_writes( [GRPC_CHTTP2_SETTINGS_HEADER_TABLE_SIZE]); if (transport_global->dirtied_local_settings && - !transport_global->sent_local_settings && !is_parsing) { + !transport_global->sent_local_settings) { gpr_slice_buffer_add( &transport_writing->outbuf, grpc_chttp2_settings_create( From 04e47f308ec57c42ec9a0dcdc25e72c03b66bc9e Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Mon, 20 Jun 2016 11:03:15 -0700 Subject: [PATCH 1183/1894] Direct additional log statement through custom logger --- src/node/src/server.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node/src/server.js b/src/node/src/server.js index fd5153f1244..b3b414969ab 100644 --- a/src/node/src/server.js +++ b/src/node/src/server.js @@ -735,8 +735,8 @@ Server.prototype.addService = function(service, implementation) { } var impl; if (implementation[name] === undefined) { - console.warn('Method handler for %s expected but not provided', - attrs.path); + common.log(grpc.logVerbosity.ERROR, 'Method handler for ' + + attrs.path + ' expected but not provided'); impl = defaultHandler[method_type]; } else { impl = _.bind(implementation[name], implementation); From fa1f74e2267d8dfe97d617357033d2a0bf8423be Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 20 Jun 2016 11:11:44 -0700 Subject: [PATCH 1184/1894] Fix errored streams prematurely terminating, add a test --- Makefile | 2 + .../chttp2/transport/chttp2_transport.c | 4 +- .../ext/transport/chttp2/transport/internal.h | 1 + test/core/end2end/end2end_nosec_tests.c | 8 + test/core/end2end/end2end_tests.c | 8 + test/core/end2end/gen_build_yaml.py | 1 + .../end2end/tests/streaming_error_response.c | 278 ++++++++ tools/run_tests/sources_and_headers.json | 2 + tools/run_tests/tests.json | 629 +++++++++++++++++- .../end2end_nosec_tests.vcxproj | 2 + .../end2end_nosec_tests.vcxproj.filters | 3 + .../tests/end2end_tests/end2end_tests.vcxproj | 2 + .../end2end_tests.vcxproj.filters | 3 + 13 files changed, 932 insertions(+), 11 deletions(-) create mode 100644 test/core/end2end/tests/streaming_error_response.c diff --git a/Makefile b/Makefile index 13bc2f1871c..23e40cfb075 100644 --- a/Makefile +++ b/Makefile @@ -6389,6 +6389,7 @@ LIBEND2END_TESTS_SRC = \ test/core/end2end/tests/simple_delayed_request.c \ test/core/end2end/tests/simple_metadata.c \ test/core/end2end/tests/simple_request.c \ + test/core/end2end/tests/streaming_error_response.c \ test/core/end2end/tests/trailing_metadata.c \ PUBLIC_HEADERS_C += \ @@ -6465,6 +6466,7 @@ LIBEND2END_NOSEC_TESTS_SRC = \ test/core/end2end/tests/simple_delayed_request.c \ test/core/end2end/tests/simple_metadata.c \ test/core/end2end/tests/simple_request.c \ + test/core/end2end/tests/streaming_error_response.c \ test/core/end2end/tests/trailing_metadata.c \ PUBLIC_HEADERS_C += \ diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 9aa39ba26c2..63d07108a7c 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1093,6 +1093,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, stream_global->recv_trailing_metadata_finished = add_closure_barrier(on_complete); stream_global->recv_trailing_metadata = op->recv_trailing_metadata; + stream_global->final_metadata_requested = true; grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); } @@ -1246,7 +1247,8 @@ static void check_read_ops(grpc_exec_ctx *exec_ctx, stream_global->recv_initial_metadata_ready = NULL; } if (stream_global->recv_message_ready != NULL) { - while (stream_global->seen_error && + while (stream_global->final_metadata_requested && + stream_global->seen_error && (bs = grpc_chttp2_incoming_frame_queue_pop( &stream_global->incoming_frames)) != NULL) { incoming_byte_stream_destroy_locked(exec_ctx, NULL, NULL, bs); diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 54e72ebd249..48602fb47ce 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -440,6 +440,7 @@ typedef struct { bool published_initial_metadata; bool published_trailing_metadata; + bool final_metadata_requested; grpc_chttp2_incoming_metadata_buffer received_initial_metadata; grpc_chttp2_incoming_metadata_buffer received_trailing_metadata; diff --git a/test/core/end2end/end2end_nosec_tests.c b/test/core/end2end/end2end_nosec_tests.c index b71299c09e0..2893bddc43c 100644 --- a/test/core/end2end/end2end_nosec_tests.c +++ b/test/core/end2end/end2end_nosec_tests.c @@ -115,6 +115,8 @@ extern void simple_metadata(grpc_end2end_test_config config); extern void simple_metadata_pre_init(void); extern void simple_request(grpc_end2end_test_config config); extern void simple_request_pre_init(void); +extern void streaming_error_response(grpc_end2end_test_config config); +extern void streaming_error_response_pre_init(void); extern void trailing_metadata(grpc_end2end_test_config config); extern void trailing_metadata_pre_init(void); @@ -157,6 +159,7 @@ void grpc_end2end_tests_pre_init(void) { simple_delayed_request_pre_init(); simple_metadata_pre_init(); simple_request_pre_init(); + streaming_error_response_pre_init(); trailing_metadata_pre_init(); } @@ -203,6 +206,7 @@ void grpc_end2end_tests(int argc, char **argv, simple_delayed_request(config); simple_metadata(config); simple_request(config); + streaming_error_response(config); trailing_metadata(config); return; } @@ -352,6 +356,10 @@ void grpc_end2end_tests(int argc, char **argv, simple_request(config); continue; } + if (0 == strcmp("streaming_error_response", argv[i])) { + streaming_error_response(config); + continue; + } if (0 == strcmp("trailing_metadata", argv[i])) { trailing_metadata(config); continue; diff --git a/test/core/end2end/end2end_tests.c b/test/core/end2end/end2end_tests.c index 00c9c44a78c..96a38e76dcc 100644 --- a/test/core/end2end/end2end_tests.c +++ b/test/core/end2end/end2end_tests.c @@ -117,6 +117,8 @@ extern void simple_metadata(grpc_end2end_test_config config); extern void simple_metadata_pre_init(void); extern void simple_request(grpc_end2end_test_config config); extern void simple_request_pre_init(void); +extern void streaming_error_response(grpc_end2end_test_config config); +extern void streaming_error_response_pre_init(void); extern void trailing_metadata(grpc_end2end_test_config config); extern void trailing_metadata_pre_init(void); @@ -160,6 +162,7 @@ void grpc_end2end_tests_pre_init(void) { simple_delayed_request_pre_init(); simple_metadata_pre_init(); simple_request_pre_init(); + streaming_error_response_pre_init(); trailing_metadata_pre_init(); } @@ -207,6 +210,7 @@ void grpc_end2end_tests(int argc, char **argv, simple_delayed_request(config); simple_metadata(config); simple_request(config); + streaming_error_response(config); trailing_metadata(config); return; } @@ -360,6 +364,10 @@ void grpc_end2end_tests(int argc, char **argv, simple_request(config); continue; } + if (0 == strcmp("streaming_error_response", argv[i])) { + streaming_error_response(config); + continue; + } if (0 == strcmp("trailing_metadata", argv[i])) { trailing_metadata(config); continue; diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index 325d9b3cad0..6d3d8f8d3c4 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -126,6 +126,7 @@ END2END_TESTS = { 'simple_delayed_request': connectivity_test_options, 'simple_metadata': default_test_options, 'simple_request': default_test_options, + 'streaming_error_response': default_test_options, 'trailing_metadata': default_test_options, } diff --git a/test/core/end2end/tests/streaming_error_response.c b/test/core/end2end/tests/streaming_error_response.c new file mode 100644 index 00000000000..c1d6f73ecdc --- /dev/null +++ b/test/core/end2end/tests/streaming_error_response.c @@ -0,0 +1,278 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include +#include +#include +#include "test/core/end2end/cq_verifier.h" + +enum { TIMEOUT = 200000 }; + +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, + bool request_status_early) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "%s/%s/request_status_early=%s", test_name, config.name, + request_status_early ? "true" : "false"); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_time(int n) { + return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(n); +} + +static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); } + +static void drain_cq(grpc_completion_queue *cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_time(), NULL); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture *f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = NULL; +} + +static void shutdown_client(grpc_end2end_test_fixture *f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = NULL; +} + +static void end_test(grpc_end2end_test_fixture *f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); +} + +/* Client sends a request with payload, server reads then returns status. */ +static void test(grpc_end2end_test_config config, bool request_status_early) { + grpc_call *c; + grpc_call *s; + gpr_slice response_payload1_slice = gpr_slice_from_copied_string("hello"); + grpc_byte_buffer *response_payload1 = + grpc_raw_byte_buffer_create(&response_payload1_slice, 1); + gpr_slice response_payload2_slice = gpr_slice_from_copied_string("world"); + grpc_byte_buffer *response_payload2 = + grpc_raw_byte_buffer_create(&response_payload2_slice, 1); + gpr_timespec deadline = five_seconds_time(); + grpc_end2end_test_fixture f = begin_test(config, "streaming_error_response", + NULL, NULL, request_status_early); + cq_verifier *cqv = cq_verifier_create(f.cq); + 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_byte_buffer *response_payload1_recv = NULL; + grpc_byte_buffer *response_payload2_recv = NULL; + grpc_call_details call_details; + grpc_status_code status; + grpc_call_error error; + char *details = NULL; + size_t details_capacity = 0; + int was_cancelled = 2; + + c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, + "/foo", "foo.test.google.fr", deadline, NULL); + GPR_ASSERT(c); + + 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); + + 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_CLOSE_FROM_CLIENT; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata = &initial_metadata_recv; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &response_payload1_recv; + op++; + if (request_status_early) { + 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->data.recv_status_on_client.status_details_capacity = &details_capacity; + op++; + } + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + GPR_ASSERT(GRPC_CALL_OK == grpc_server_request_call( + f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101))); + cq_expect_completion(cqv, tag(101), 1); + cq_verify(cqv); + + 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 = response_payload1; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + cq_expect_completion(cqv, tag(102), 1); + cq_verify(cqv); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message = response_payload2; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + cq_expect_completion(cqv, tag(103), 1); + if (!request_status_early) { + cq_expect_completion(cqv, tag(1), 1); + } + cq_verify(cqv); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + 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_FAILED_PRECONDITION; + op->data.send_status_from_server.status_details = "xyz"; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(104), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + if (!request_status_early) { + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &response_payload2_recv; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(2), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + } + + cq_expect_completion(cqv, tag(104), 1); + if (request_status_early) { + cq_expect_completion(cqv, tag(1), 1); + } else { + cq_expect_completion(cqv, tag(2), 1); + } + cq_verify(cqv); + + if (!request_status_early) { + 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->data.recv_status_on_client.status_details_capacity = &details_capacity; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(3), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + cq_expect_completion(cqv, tag(3), 1); + cq_verify(cqv); + + GPR_ASSERT(response_payload1_recv != NULL); + GPR_ASSERT(response_payload2_recv != NULL); + } + + GPR_ASSERT(status == GRPC_STATUS_FAILED_PRECONDITION); + GPR_ASSERT(0 == strcmp(details, "xyz")); + GPR_ASSERT(0 == strcmp(call_details.method, "/foo")); + GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr")); + GPR_ASSERT(was_cancelled == 1); + + gpr_free(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_call_destroy(c); + grpc_call_destroy(s); + + cq_verifier_destroy(cqv); + + grpc_byte_buffer_destroy(response_payload1); + grpc_byte_buffer_destroy(response_payload2); + grpc_byte_buffer_destroy(response_payload1_recv); + grpc_byte_buffer_destroy(response_payload2_recv); + + end_test(&f); + config.tear_down_data(&f); +} + +void streaming_error_response(grpc_end2end_test_config config) { + test(config, false); + test(config, true); +} + +void streaming_error_response_pre_init(void) {} diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 57e3bd63f42..750d98b0be0 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5400,6 +5400,7 @@ "test/core/end2end/tests/simple_delayed_request.c", "test/core/end2end/tests/simple_metadata.c", "test/core/end2end/tests/simple_request.c", + "test/core/end2end/tests/streaming_error_response.c", "test/core/end2end/tests/trailing_metadata.c" ], "third_party": false, @@ -5458,6 +5459,7 @@ "test/core/end2end/tests/simple_delayed_request.c", "test/core/end2end/tests/simple_metadata.c", "test/core/end2end/tests/simple_request.c", + "test/core/end2end/tests/streaming_error_response.c", "test/core/end2end/tests/trailing_metadata.c" ], "third_party": false, diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 3ed7a6bc476..f0e4849ec99 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -5186,6 +5186,28 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_census_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -6022,6 +6044,28 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -6821,6 +6865,27 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -7482,6 +7547,26 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fd_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -8316,6 +8401,28 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -8930,6 +9037,22 @@ "linux" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, { "args": [ "trailing_metadata" @@ -9738,6 +9861,28 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -10574,6 +10719,28 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_loadreporting_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -11373,6 +11540,27 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -12045,6 +12233,27 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -12738,6 +12947,27 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -13410,6 +13640,27 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -14105,7 +14356,7 @@ }, { "args": [ - "trailing_metadata" + "streaming_error_response" ], "ci_platforms": [ "windows", @@ -14126,19 +14377,18 @@ }, { "args": [ - "bad_hostname" + "trailing_metadata" ], "ci_platforms": [ "windows", "linux", - "mac", "posix" ], "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", - "name": "h2_ssl_test", + "name": "h2_sockpair_1byte_test", "platforms": [ "windows", "linux", @@ -14148,7 +14398,7 @@ }, { "args": [ - "binary_metadata" + "bad_hostname" ], "ci_platforms": [ "windows", @@ -14170,7 +14420,7 @@ }, { "args": [ - "call_creds" + "binary_metadata" ], "ci_platforms": [ "windows", @@ -14192,7 +14442,7 @@ }, { "args": [ - "cancel_after_accept" + "call_creds" ], "ci_platforms": [ "windows", @@ -14200,7 +14450,7 @@ "mac", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -14214,7 +14464,7 @@ }, { "args": [ - "cancel_after_client_done" + "cancel_after_accept" ], "ci_platforms": [ "windows", @@ -14222,7 +14472,29 @@ "mac", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "cancel_after_client_done" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -14938,6 +15210,28 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -15774,6 +16068,28 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -16447,6 +16763,27 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -17188,6 +17525,26 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -18000,6 +18357,28 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -18814,6 +19193,28 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -19456,6 +19857,26 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -20268,6 +20689,28 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -20866,6 +21309,22 @@ "linux" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, { "args": [ "trailing_metadata" @@ -21652,6 +22111,28 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -22466,6 +22947,28 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_loadreporting_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -23118,6 +23621,27 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -23790,6 +24314,27 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -24441,6 +24986,27 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -25175,6 +25741,29 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [ + "msan" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" @@ -25898,6 +26487,26 @@ "posix" ] }, + { + "args": [ + "streaming_error_response" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "trailing_metadata" diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj index 22cd102d116..923c1d1ab41 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj @@ -225,6 +225,8 @@ + + diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters index 1bb208bba8e..6533eaa057b 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters @@ -112,6 +112,9 @@ test\core\end2end\tests + + test\core\end2end\tests + test\core\end2end\tests diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj index bfd437e8717..0b859e25ce4 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj @@ -227,6 +227,8 @@ + + diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters index 61c065f77ca..ea1c5e3c237 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters @@ -115,6 +115,9 @@ test\core\end2end\tests + + test\core\end2end\tests + test\core\end2end\tests From 89dde5e5681a7a718b234311e302897f5861723c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Mon, 20 Jun 2016 11:13:11 -0700 Subject: [PATCH 1185/1894] Fix copyright --- test/core/end2end/tests/streaming_error_response.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/end2end/tests/streaming_error_response.c b/test/core/end2end/tests/streaming_error_response.c index c1d6f73ecdc..e15c132d633 100644 --- a/test/core/end2end/tests/streaming_error_response.c +++ b/test/core/end2end/tests/streaming_error_response.c @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without From ffaafe6fa3fbb308c00619bef45e9f43a3d8e4ba Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Mon, 20 Jun 2016 19:36:49 +0000 Subject: [PATCH 1186/1894] Change with_call from parameter to attribute --- src/python/grpcio/grpc/__init__.py | 57 +++++++++++++++---- src/python/grpcio/grpc/_channel.py | 32 ++++++++--- .../grpcio/grpc/beta/_client_adaptations.py | 8 +-- .../grpcio/tests/unit/_metadata_test.py | 8 +-- src/python/grpcio/tests/unit/_rpc_test.py | 21 +++---- 5 files changed, 87 insertions(+), 39 deletions(-) diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py index 28adca37723..f9b09b4cf14 100644 --- a/src/python/grpcio/grpc/__init__.py +++ b/src/python/grpcio/grpc/__init__.py @@ -438,9 +438,7 @@ class UnaryUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): """Affords invoking a unary-unary RPC.""" @abc.abstractmethod - def __call__( - self, request, timeout=None, metadata=None, credentials=None, - with_call=False): + def __call__(self, request, timeout=None, metadata=None, credentials=None): """Synchronously invokes the underlying RPC. Args: @@ -449,12 +447,30 @@ class UnaryUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): metadata: An optional sequence of pairs of bytes to be transmitted to the service-side of the RPC. credentials: An optional CallCredentials for the RPC. - with_call: Whether or not to include return a Call for the RPC in addition - to the response. Returns: - The response value for the RPC, and a Call for the RPC if with_call was - set to True at invocation. + The response value for the RPC. + + Raises: + RpcError: Indicating that the RPC terminated with non-OK status. The + raised RpcError will also be a Call for the RPC affording the RPC's + metadata, status code, and details. + """ + raise NotImplementedError() + + @abc.abstractmethod + def with_call(self, request, timeout=None, metadata=None, credentials=None): + """Synchronously invokes the underlying RPC. + + Args: + request: The request value for the RPC. + timeout: An optional durating of time in seconds to allow for the RPC. + metadata: An optional sequence of pairs of bytes to be transmitted to the + service-side of the RPC. + credentials: An optional CallCredentials for the RPC. + + Returns: + The response value for the RPC and a Call value for the RPC. Raises: RpcError: Indicating that the RPC terminated with non-OK status. The @@ -510,8 +526,7 @@ class StreamUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): @abc.abstractmethod def __call__( - self, request_iterator, timeout=None, metadata=None, credentials=None, - with_call=False): + self, request_iterator, timeout=None, metadata=None, credentials=None): """Synchronously invokes the underlying RPC. Args: @@ -520,8 +535,6 @@ class StreamUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): metadata: An optional sequence of pairs of bytes to be transmitted to the service-side of the RPC. credentials: An optional CallCredentials for the RPC. - with_call: Whether or not to include return a Call for the RPC in addition - to the response. Returns: The response value for the RPC, and a Call for the RPC if with_call was @@ -534,6 +547,28 @@ class StreamUnaryMultiCallable(six.with_metaclass(abc.ABCMeta)): """ raise NotImplementedError() + @abc.abstractmethod + def with_call( + self, request_iterator, timeout=None, metadata=None, credentials=None): + """Synchronously invokes the underlying RPC. + + Args: + request_iterator: An iterator that yields request values for the RPC. + timeout: An optional duration of time in seconds to allow for the RPC. + metadata: An optional sequence of pairs of bytes to be transmitted to the + service-side of the RPC. + credentials: An optional CallCredentials for the RPC. + + Returns: + The response value for the RPC and a Call for the RPC. + + Raises: + RpcError: Indicating that the RPC terminated with non-OK status. The + raised RpcError will also be a Call for the RPC affording the RPC's + metadata, status code, and details. + """ + raise NotImplementedError() + @abc.abstractmethod def future( self, request_iterator, timeout=None, metadata=None, credentials=None): diff --git a/src/python/grpcio/grpc/_channel.py b/src/python/grpcio/grpc/_channel.py index d9315d2e6cd..8b774c44488 100644 --- a/src/python/grpcio/grpc/_channel.py +++ b/src/python/grpcio/grpc/_channel.py @@ -449,9 +449,7 @@ class _UnaryUnaryMultiCallable(grpc.UnaryUnaryMultiCallable): ) return state, operations, deadline, deadline_timespec, None - def __call__( - self, request, timeout=None, metadata=None, credentials=None, - with_call=False): + def _blocking(self, request, timeout, metadata, credentials): state, operations, deadline, deadline_timespec, rendezvous = self._prepare( request, timeout, metadata) if rendezvous: @@ -464,7 +462,15 @@ class _UnaryUnaryMultiCallable(grpc.UnaryUnaryMultiCallable): call.set_credentials(credentials._credentials) call.start_batch(cygrpc.Operations(operations), None) _handle_event(completion_queue.poll(), state, self._response_deserializer) - return _end_unary_response_blocking(state, with_call, deadline) + return state, deadline + + def __call__(self, request, timeout=None, metadata=None, credentials=None): + state, deadline, = self._blocking(request, timeout, metadata, credentials) + return _end_unary_response_blocking(state, False, deadline) + + def with_call(self, request, timeout=None, metadata=None, credentials=None): + state, deadline, = self._blocking(request, timeout, metadata, credentials) + return _end_unary_response_blocking(state, True, deadline) def future(self, request, timeout=None, metadata=None, credentials=None): state, operations, deadline, deadline_timespec, rendezvous = self._prepare( @@ -532,9 +538,7 @@ class _StreamUnaryMultiCallable(grpc.StreamUnaryMultiCallable): self._request_serializer = request_serializer self._response_deserializer = response_deserializer - def __call__( - self, request_iterator, timeout=None, metadata=None, credentials=None, - with_call=False): + def _blocking(self, request_iterator, timeout, metadata, credentials): deadline, deadline_timespec = _deadline(timeout) state = _RPCState(_STREAM_UNARY_INITIAL_DUE, None, None, None, None) completion_queue = cygrpc.CompletionQueue() @@ -563,7 +567,19 @@ class _StreamUnaryMultiCallable(grpc.StreamUnaryMultiCallable): state.condition.notify_all() if not state.due: break - return _end_unary_response_blocking(state, with_call, deadline) + return state, deadline + + def __call__( + self, request_iterator, timeout=None, metadata=None, credentials=None): + state, deadline, = self._blocking( + request_iterator, timeout, metadata, credentials) + return _end_unary_response_blocking(state, False, deadline) + + def with_call( + self, request_iterator, timeout=None, metadata=None, credentials=None): + state, deadline, = self._blocking( + request_iterator, timeout, metadata, credentials) + return _end_unary_response_blocking(state, True, deadline) def future( self, request_iterator, timeout=None, metadata=None, credentials=None): diff --git a/src/python/grpcio/grpc/beta/_client_adaptations.py b/src/python/grpcio/grpc/beta/_client_adaptations.py index 024808c5404..56456cc117f 100644 --- a/src/python/grpcio/grpc/beta/_client_adaptations.py +++ b/src/python/grpcio/grpc/beta/_client_adaptations.py @@ -186,9 +186,9 @@ def _blocking_unary_unary( response_deserializer=response_deserializer) effective_metadata = _effective_metadata(metadata, metadata_transformer) if with_call: - response, call = multi_callable( + response, call = multi_callable.with_call( request, timeout=timeout, metadata=effective_metadata, - credentials=_credentials(protocol_options), with_call=True) + credentials=_credentials(protocol_options)) return response, _Rendezvous(None, None, call) else: return multi_callable( @@ -237,9 +237,9 @@ def _blocking_stream_unary( response_deserializer=response_deserializer) effective_metadata = _effective_metadata(metadata, metadata_transformer) if with_call: - response, call = multi_callable( + response, call = multi_callable.with_call( request_iterator, timeout=timeout, metadata=effective_metadata, - credentials=_credentials(protocol_options), with_call=True) + credentials=_credentials(protocol_options)) return response, _Rendezvous(None, None, call) else: return multi_callable( diff --git a/src/python/grpcio/tests/unit/_metadata_test.py b/src/python/grpcio/tests/unit/_metadata_test.py index 77b39012619..2cb13f236bd 100644 --- a/src/python/grpcio/tests/unit/_metadata_test.py +++ b/src/python/grpcio/tests/unit/_metadata_test.py @@ -173,8 +173,8 @@ class MetadataTest(unittest.TestCase): def testUnaryUnary(self): multi_callable = self._channel.unary_unary(_UNARY_UNARY) - unused_response, call = multi_callable( - _REQUEST, metadata=_CLIENT_METADATA, with_call=True) + unused_response, call = multi_callable.with_call( + _REQUEST, metadata=_CLIENT_METADATA) self.assertTrue(test_common.metadata_transmitted( _SERVER_INITIAL_METADATA, call.initial_metadata())) self.assertTrue(test_common.metadata_transmitted( @@ -192,9 +192,9 @@ class MetadataTest(unittest.TestCase): def testStreamUnary(self): multi_callable = self._channel.stream_unary(_STREAM_UNARY) - unused_response, call = multi_callable( + unused_response, call = multi_callable.with_call( [_REQUEST] * test_constants.STREAM_LENGTH, - metadata=_CLIENT_METADATA, with_call=True) + metadata=_CLIENT_METADATA) self.assertTrue(test_common.metadata_transmitted( _SERVER_INITIAL_METADATA, call.initial_metadata())) self.assertTrue(test_common.metadata_transmitted( diff --git a/src/python/grpcio/tests/unit/_rpc_test.py b/src/python/grpcio/tests/unit/_rpc_test.py index 8407593c86d..9814504edff 100644 --- a/src/python/grpcio/tests/unit/_rpc_test.py +++ b/src/python/grpcio/tests/unit/_rpc_test.py @@ -27,7 +27,7 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -"""Test of gRPC Python's application-layer API.""" +"""Test of RPCs made against gRPC Python's application-layer API.""" import itertools import threading @@ -216,10 +216,9 @@ class RPCTest(unittest.TestCase): expected_response = self._handler.handle_unary_unary(request, None) multi_callable = _unary_unary_multi_callable(self._channel) - response, call = multi_callable( + response, call = multi_callable.with_call( request, metadata=( - (b'test', b'SuccessfulUnaryRequestBlockingUnaryResponseWithCall'),), - with_call=True) + (b'test', b'SuccessfulUnaryRequestBlockingUnaryResponseWithCall'),)) self.assertEqual(expected_response, response) self.assertIs(grpc.StatusCode.OK, call.code()) @@ -266,11 +265,11 @@ class RPCTest(unittest.TestCase): request_iterator = iter(requests) multi_callable = _stream_unary_multi_callable(self._channel) - response, call = multi_callable( + response, call = multi_callable.with_call( request_iterator, metadata=( (b'test', b'SuccessfulStreamRequestBlockingUnaryResponseWithCall'), - ), with_call=True) + )) self.assertEqual(expected_response, response) self.assertIs(grpc.StatusCode.OK, call.code()) @@ -525,10 +524,9 @@ class RPCTest(unittest.TestCase): multi_callable = _unary_unary_multi_callable(self._channel) with self._control.pause(): with self.assertRaises(grpc.RpcError) as exception_context: - multi_callable( + multi_callable.with_call( request, timeout=test_constants.SHORT_TIMEOUT, - metadata=((b'test', b'ExpiredUnaryRequestBlockingUnaryResponse'),), - with_call=True) + metadata=((b'test', b'ExpiredUnaryRequestBlockingUnaryResponse'),)) self.assertIsNotNone(exception_context.exception.initial_metadata()) self.assertIs( @@ -640,10 +638,9 @@ class RPCTest(unittest.TestCase): multi_callable = _unary_unary_multi_callable(self._channel) with self._control.fail(): with self.assertRaises(grpc.RpcError) as exception_context: - multi_callable( + multi_callable.with_call( request, - metadata=((b'test', b'FailedUnaryRequestBlockingUnaryResponse'),), - with_call=True) + metadata=((b'test', b'FailedUnaryRequestBlockingUnaryResponse'),)) self.assertIs(grpc.StatusCode.UNKNOWN, exception_context.exception.code()) From 36a58a7928e6a10b44b6cffdc118337ef7e0b8c1 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Mon, 20 Jun 2016 14:01:07 -0700 Subject: [PATCH 1187/1894] Enable treating warnings as errors for target gRPC --- .../GRPCClient/GRPCCall+ChannelCredentials.h | 4 ++-- src/objective-c/ProtoRPC/ProtoMethod.h | 3 +++ src/objective-c/ProtoRPC/ProtoRPC.h | 3 +++ src/objective-c/ProtoRPC/ProtoService.h | 3 +++ src/objective-c/ProtoRPC/ProtoService.m | 6 +++--- src/objective-c/tests/Podfile | 21 ++++++++++++++++--- 6 files changed, 32 insertions(+), 8 deletions(-) diff --git a/src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h b/src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h index 343dd48a14e..ac2a37d75f2 100644 --- a/src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h +++ b/src/objective-c/GRPCClient/GRPCCall+ChannelCredentials.h @@ -41,7 +41,7 @@ */ + (BOOL)setTLSPEMRootCerts:(nullable NSString *)pemRootCert forHost:(nonnull NSString *)host - error:(NSError **)errorPtr; + error:(NSError * _Nullable * _Nullable)errorPtr; /** * Configures @c host with TLS/SSL Client Credentials and optionally trusted root Certificate * Authorities. If @c pemRootCerts is nil, the default CA Certificates bundled with gRPC will be @@ -51,6 +51,6 @@ withPrivateKey:(nullable NSString *)pemPrivateKey withCertChain:(nullable NSString *)pemCertChain forHost:(nonnull NSString *)host - error:(NSError **)errorPtr; + error:(NSError * _Nullable * _Nullable)errorPtr; @end diff --git a/src/objective-c/ProtoRPC/ProtoMethod.h b/src/objective-c/ProtoRPC/ProtoMethod.h index f9fdbb35ffd..ae3a2723fc4 100644 --- a/src/objective-c/ProtoRPC/ProtoMethod.h +++ b/src/objective-c/ProtoRPC/ProtoMethod.h @@ -54,6 +54,9 @@ __attribute__((deprecated("Please use GRPCProtoMethod."))) * This subclass is empty now. Eventually we'll remove ProtoMethod class * to avoid potential naming conflict */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" @interface GRPCProtoMethod : ProtoMethod +#pragma clang diagnostic pop @end diff --git a/src/objective-c/ProtoRPC/ProtoRPC.h b/src/objective-c/ProtoRPC/ProtoRPC.h index 5f91f6bce1e..04fc1e45f16 100644 --- a/src/objective-c/ProtoRPC/ProtoRPC.h +++ b/src/objective-c/ProtoRPC/ProtoRPC.h @@ -56,6 +56,9 @@ __attribute__((deprecated("Please use GRPCProtoCall."))) * This subclass is empty now. Eventually we'll remove ProtoRPC class * to avoid potential naming conflict */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" @interface GRPCProtoCall : ProtoRPC +#pragma clang diagnostic pop @end diff --git a/src/objective-c/ProtoRPC/ProtoService.h b/src/objective-c/ProtoRPC/ProtoService.h index 87d06e1ae59..7faae1b49c9 100644 --- a/src/objective-c/ProtoRPC/ProtoService.h +++ b/src/objective-c/ProtoRPC/ProtoService.h @@ -55,6 +55,9 @@ __attribute__((deprecated("Please use GRPCProtoService."))) * This subclass is empty now. Eventually we'll remove ProtoService class * to avoid potential naming conflict */ +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wdeprecated-declarations" @interface GRPCProtoService : ProtoService +#pragma clang diagnostic pop @end diff --git a/src/objective-c/ProtoRPC/ProtoService.m b/src/objective-c/ProtoRPC/ProtoService.m index 597c3cf0fed..4a14570d818 100644 --- a/src/objective-c/ProtoRPC/ProtoService.m +++ b/src/objective-c/ProtoRPC/ProtoService.m @@ -65,14 +65,14 @@ return self; } -- (ProtoRPC *)RPCToMethod:(NSString *)method +- (GRPCProtoCall *)RPCToMethod:(NSString *)method requestsWriter:(GRXWriter *)requestsWriter responseClass:(Class)responseClass responsesWriteable:(id)responsesWriteable { - ProtoMethod *methodName = [[ProtoMethod alloc] initWithPackage:_packageName + GRPCProtoMethod *methodName = [[GRPCProtoMethod alloc] initWithPackage:_packageName service:_serviceName method:method]; - return [[ProtoRPC alloc] initWithHost:_host + return [[GRPCProtoCall alloc] initWithHost:_host method:methodName requestsWriter:requestsWriter responseClass:responseClass diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile index 508641d681a..53edf8c890a 100644 --- a/src/objective-c/tests/Podfile +++ b/src/objective-c/tests/Podfile @@ -1,9 +1,9 @@ source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' -pod 'Protobuf', :path => "../../../third_party/protobuf" -pod 'BoringSSL', :podspec => ".." -pod 'CronetFramework', :podspec => ".." +pod 'Protobuf', :path => "../../../third_party/protobuf", :inhibit_warnings => true +pod 'BoringSSL', :podspec => "..", :inhibit_warnings => true +pod 'CronetFramework', :podspec => "..", :inhibit_warnings => true pod 'gRPC', :path => "../../.." pod 'RemoteTest', :path => "RemoteTestClient" @@ -30,3 +30,18 @@ end target 'InteropTestsLocalCleartext' do end + +post_install do |installer| + installer.pods_project.targets.each do |target| + target.build_configurations.each do |config| + config.build_settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'YES' + end + if target.name == 'gRPC' + target.build_configurations.each do |config| + # GPR_UNREACHABLE_CODE causes "Control may reach end of non-void + # function" warning + config.build_settings['GCC_WARN_ABOUT_RETURN_TYPE'] = 'NO' + end + end + end +end From abc7427a4d113aeb7fde6d732c63ffea1f615998 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Mon, 20 Jun 2016 14:40:57 -0700 Subject: [PATCH 1188/1894] Update podfiles for objc examples --- examples/objective-c/auth_sample/AuthTestService.podspec | 4 ++++ examples/objective-c/helloworld/HelloWorld.podspec | 4 ++++ examples/objective-c/route_guide/RouteGuide.podspec | 4 ++++ src/objective-c/examples/RemoteTestClient/RemoteTest.podspec | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/examples/objective-c/auth_sample/AuthTestService.podspec b/examples/objective-c/auth_sample/AuthTestService.podspec index e9356260534..d246653ea79 100644 --- a/examples/objective-c/auth_sample/AuthTestService.podspec +++ b/examples/objective-c/auth_sample/AuthTestService.podspec @@ -2,6 +2,10 @@ Pod::Spec.new do |s| s.name = "AuthTestService" s.version = "0.0.1" s.license = "New BSD" + s.authors = { 'gRPC contributors' => 'grpc-io@googlegroups.com' } + s.homepage = "http://www.grpc.io/" + s.summary = "AuthTestService example" + s.source = { :git => 'https://github.com/grpc/grpc.git' } s.ios.deployment_target = "7.1" s.osx.deployment_target = "10.9" diff --git a/examples/objective-c/helloworld/HelloWorld.podspec b/examples/objective-c/helloworld/HelloWorld.podspec index bdf782f6eaf..17b016b31a1 100644 --- a/examples/objective-c/helloworld/HelloWorld.podspec +++ b/examples/objective-c/helloworld/HelloWorld.podspec @@ -2,6 +2,10 @@ Pod::Spec.new do |s| s.name = "HelloWorld" s.version = "0.0.1" s.license = "New BSD" + s.authors = { 'gRPC contributors' => 'grpc-io@googlegroups.com' } + s.homepage = "http://www.grpc.io/" + s.summary = "HelloWorld example" + s.source = { :git => 'https://github.com/grpc/grpc.git' } s.ios.deployment_target = "7.1" s.osx.deployment_target = "10.9" diff --git a/examples/objective-c/route_guide/RouteGuide.podspec b/examples/objective-c/route_guide/RouteGuide.podspec index 4bc2c42cbb8..97a61ff51a5 100644 --- a/examples/objective-c/route_guide/RouteGuide.podspec +++ b/examples/objective-c/route_guide/RouteGuide.podspec @@ -2,6 +2,10 @@ Pod::Spec.new do |s| s.name = "RouteGuide" s.version = "0.0.1" s.license = "New BSD" + s.authors = { 'gRPC contributors' => 'grpc-io@googlegroups.com' } + s.homepage = "http://www.grpc.io/" + s.summary = "RouteGuide example" + s.source = { :git => 'https://github.com/grpc/grpc.git' } s.ios.deployment_target = "7.1" s.osx.deployment_target = "10.9" diff --git a/src/objective-c/examples/RemoteTestClient/RemoteTest.podspec b/src/objective-c/examples/RemoteTestClient/RemoteTest.podspec index 5addf26fc46..107e6de4e21 100644 --- a/src/objective-c/examples/RemoteTestClient/RemoteTest.podspec +++ b/src/objective-c/examples/RemoteTestClient/RemoteTest.podspec @@ -2,6 +2,10 @@ Pod::Spec.new do |s| s.name = "RemoteTest" s.version = "0.0.1" s.license = "New BSD" + s.authors = { 'gRPC contributors' => 'grpc-io@googlegroups.com' } + s.homepage = "http://www.grpc.io/" + s.summary = "RemoteTest example" + s.source = { :git => 'https://github.com/grpc/grpc.git' } s.ios.deployment_target = '7.1' s.osx.deployment_target = '10.9' From 3b5ae53cd149ecb821c8950b19b06c8330e288c0 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Mon, 20 Jun 2016 22:09:39 +0000 Subject: [PATCH 1189/1894] Correct lingering FATAL_FAILURE sites This should have been done as part of 5444bed32f1405ebb53b0c37d3b. --- src/python/grpcio/tests/unit/_channel_connectivity_test.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python/grpcio/tests/unit/_channel_connectivity_test.py b/src/python/grpcio/tests/unit/_channel_connectivity_test.py index a1575efada7..ae8de523ecf 100644 --- a/src/python/grpcio/tests/unit/_channel_connectivity_test.py +++ b/src/python/grpcio/tests/unit/_channel_connectivity_test.py @@ -135,12 +135,12 @@ class ChannelConnectivityTest(unittest.TestCase): self.assertNotIn( grpc.ChannelConnectivity.TRANSIENT_FAILURE, third_connectivities) self.assertNotIn( - grpc.ChannelConnectivity.FATAL_FAILURE, third_connectivities) + grpc.ChannelConnectivity.SHUTDOWN, third_connectivities) self.assertNotIn( grpc.ChannelConnectivity.TRANSIENT_FAILURE, fourth_connectivities) self.assertNotIn( - grpc.ChannelConnectivity.FATAL_FAILURE, fourth_connectivities) + grpc.ChannelConnectivity.SHUTDOWN, fourth_connectivities) def test_reachable_then_unreachable_channel_connectivity(self): server = _server.Server((), futures.ThreadPoolExecutor(max_workers=0)) From 7981e1905f61471f8caece6eea6051b2522b9235 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Mon, 20 Jun 2016 15:38:15 -0700 Subject: [PATCH 1190/1894] Network status tracking Recreated the old PR (https://github.com/grpc/grpc/pull/6283) in a new repo since the old repo was destroyed. Removed changes to tcp_posix.c and tpc_windows.c, instead depending on the idempotent endpoint shutdown code from https://github.com/grpc/grpc/pull/6911. --- src/core/lib/iomgr/network_status_tracker.c | 82 ++++++ src/core/lib/iomgr/network_status_tracker.h | 40 +++ .../end2end/tests/network_status_change.c | 243 ++++++++++++++++++ 3 files changed, 365 insertions(+) create mode 100644 src/core/lib/iomgr/network_status_tracker.c create mode 100644 src/core/lib/iomgr/network_status_tracker.h create mode 100644 test/core/end2end/tests/network_status_change.c diff --git a/src/core/lib/iomgr/network_status_tracker.c b/src/core/lib/iomgr/network_status_tracker.c new file mode 100644 index 00000000000..6e432368cf1 --- /dev/null +++ b/src/core/lib/iomgr/network_status_tracker.c @@ -0,0 +1,82 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/iomgr/endpoint.h" +#include + +typedef struct endpoint_ll_node { + grpc_endpoint *ep; + struct endpoint_ll_node *next; +} endpoint_ll_node; + +static endpoint_ll_node *head = NULL; + +// TODO(makarandd): Install callback with OS to monitor network status. +void grpc_initialize_network_status_monitor() { +} + +void grpc_destroy_network_status_monitor() { + for (endpoint_ll_node *curr = head; curr != NULL; ) { + endpoint_ll_node *next = curr->next; + gpr_free(curr); + curr = next; + } +} + +void grpc_network_status_register_endpoint(grpc_endpoint *ep) { + if (head == NULL) { + head = (endpoint_ll_node *)gpr_malloc(sizeof(endpoint_ll_node)); + head->ep = ep; + head->next = NULL; + } else { + endpoint_ll_node *prev_head = head; + head = (endpoint_ll_node *)gpr_malloc(sizeof(endpoint_ll_node)); + head->ep = ep; + head->next = prev_head; + } +} + +// Walk the linked-list from head and execute shutdown. It is possible that +// other threads might be in the process of shutdown as well, but that has +// no side effect. +void grpc_network_status_shutdown_all_endpoints() { + if (head == NULL) { + return; + } + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + + for (endpoint_ll_node *curr = head; curr != NULL; curr = curr->next) { + curr->ep->vtable->shutdown(&exec_ctx, curr->ep); + } + grpc_exec_ctx_finish(&exec_ctx); +} diff --git a/src/core/lib/iomgr/network_status_tracker.h b/src/core/lib/iomgr/network_status_tracker.h new file mode 100644 index 00000000000..4154151927f --- /dev/null +++ b/src/core/lib/iomgr/network_status_tracker.h @@ -0,0 +1,40 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#ifndef GRPC_CORE_LIB_IOMGR_NETWORK_STATUS_TRACKER_H +#define GRPC_CORE_LIB_IOMGR_NETWORK_STATUS_TRACKER_H +#include "src/core/lib/iomgr/endpoint.h" + +void grpc_network_status_register_endpoint(grpc_endpoint *ep); +void grpc_network_status_shutdown_all_endpoints(); +#endif /* GRPC_CORE_LIB_IOMGR_NETWORK_STATUS_TRACKER_H */ diff --git a/test/core/end2end/tests/network_status_change.c b/test/core/end2end/tests/network_status_change.c new file mode 100644 index 00000000000..bbc85007022 --- /dev/null +++ b/test/core/end2end/tests/network_status_change.c @@ -0,0 +1,243 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include + +#include +#include +#include +#include +#include +#include "test/core/end2end/cq_verifier.h" + +/* this is a private API but exposed here for testing*/ +extern void grpc_network_status_shutdown_all_endpoints(); + +enum { TIMEOUT = 200000 }; + +static void *tag(intptr_t t) { return (void *)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char *test_name, + grpc_channel_args *client_args, + grpc_channel_args *server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "%s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_time(int n) { + return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(n); +} + +static gpr_timespec five_seconds_time(void) { return n_seconds_time(500); } + +static void drain_cq(grpc_completion_queue *cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_time(), NULL); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture *f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = NULL; +} + +static void shutdown_client(grpc_end2end_test_fixture *f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = NULL; +} + +static void end_test(grpc_end2end_test_fixture *f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); +} + +/* Client sends a request with payload, server reads then returns status. */ +static void test_invoke_network_status_change(grpc_end2end_test_config config) { + grpc_call *c; + grpc_call *s; + gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_byte_buffer *request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + gpr_timespec deadline = five_seconds_time(); + grpc_end2end_test_fixture f = + begin_test(config, "test_invoke_request_with_payload", NULL, NULL); + cq_verifier *cqv = cq_verifier_create(f.cq); + 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_byte_buffer *request_payload_recv = NULL; + grpc_call_details call_details; + grpc_status_code status; + grpc_call_error error; + char *details = NULL; + size_t details_capacity = 0; + int was_cancelled = 2; + + c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, + "/foo", "foo.test.google.fr", deadline, NULL); + GPR_ASSERT(c); + + 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); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message = request_payload; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata = &initial_metadata_recv; + op->flags = 0; + op->reserved = NULL; + op++; + 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->data.recv_status_on_client.status_details_capacity = &details_capacity; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + GPR_ASSERT(GRPC_CALL_OK == grpc_server_request_call( + f.server, &s, &call_details, + &request_metadata_recv, f.cq, f.cq, tag(101))); + cq_expect_completion(cqv, tag(101), 1); + cq_verify(cqv); + + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_RECV_MESSAGE; + op->data.recv_message = &request_payload_recv; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(102), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + cq_expect_completion(cqv, tag(102), 1); + // Simulate the network loss event + grpc_network_status_shutdown_all_endpoints(); + cq_verify(cqv); + + op = ops; + op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; + op->data.recv_close_on_server.cancelled = &was_cancelled; + op->flags = 0; + op->reserved = NULL; + 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_OK; + op->data.send_status_from_server.status_details = "xyz"; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + void shutdown_all_endpoints(); + cq_expect_completion(cqv, tag(103), 1); + cq_expect_completion(cqv, tag(1), 1); + cq_verify(cqv); + + // Expected behavior of a RPC when network is lost. + GPR_ASSERT(status == GRPC_STATUS_UNAVAILABLE); + GPR_ASSERT(0 == strcmp(details, "")); + GPR_ASSERT(0 == strcmp(call_details.method, "/foo")); + GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr")); + GPR_ASSERT(was_cancelled == 0); + + + gpr_free(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_call_destroy(c); + grpc_call_destroy(s); + + cq_verifier_destroy(cqv); + + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(request_payload_recv); + + end_test(&f); + config.tear_down_data(&f); +} + +void network_status_change(grpc_end2end_test_config config) { + test_invoke_network_status_change(config); +} + +void network_status_change_pre_init(void) {} From 0579cfc334794a32e243e971f77e01b5fd8f3c55 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Mon, 20 Jun 2016 15:45:24 -0700 Subject: [PATCH 1191/1894] more files after running build.yaml changes through --- BUILD | 8 + Makefile | 5 + binding.gyp | 1 + build.yaml | 2 + config.m4 | 1 + gRPC.podspec | 3 + grpc.gemspec | 2 + package.xml | 2 + src/core/lib/iomgr/tcp_posix.c | 3 + src/core/lib/iomgr/tcp_windows.c | 4 + src/python/grpcio/grpc_core_dependencies.py | 1 + test/core/end2end/end2end_nosec_tests.c | 8 + test/core/end2end/end2end_tests.c | 8 + test/core/end2end/gen_build_yaml.py | 1 + tools/doxygen/Doxyfile.core.internal | 2 + tools/run_tests/sources_and_headers.json | 5 + tools/run_tests/tests.json | 627 +++++++++++++++++- vsprojects/vcxproj/grpc/grpc.vcxproj | 3 + vsprojects/vcxproj/grpc/grpc.vcxproj.filters | 6 + .../grpc_unsecure/grpc_unsecure.vcxproj | 3 + .../grpc_unsecure.vcxproj.filters | 6 + .../end2end_nosec_tests.vcxproj | 2 + .../end2end_nosec_tests.vcxproj.filters | 3 + .../tests/end2end_tests/end2end_tests.vcxproj | 2 + .../end2end_tests.vcxproj.filters | 3 + 25 files changed, 702 insertions(+), 9 deletions(-) diff --git a/BUILD b/BUILD index ac0eb8e403d..55c2ea87c65 100644 --- a/BUILD +++ b/BUILD @@ -187,6 +187,7 @@ cc_library( "src/core/lib/iomgr/iomgr_internal.h", "src/core/lib/iomgr/iomgr_posix.h", "src/core/lib/iomgr/load_file.h", + "src/core/lib/iomgr/network_status_tracker.h", "src/core/lib/iomgr/polling_entity.h", "src/core/lib/iomgr/pollset.h", "src/core/lib/iomgr/pollset_set.h", @@ -338,6 +339,7 @@ cc_library( "src/core/lib/iomgr/iomgr_posix.c", "src/core/lib/iomgr/iomgr_windows.c", "src/core/lib/iomgr/load_file.c", + "src/core/lib/iomgr/network_status_tracker.c", "src/core/lib/iomgr/polling_entity.c", "src/core/lib/iomgr/pollset_set_windows.c", "src/core/lib/iomgr/pollset_windows.c", @@ -571,6 +573,7 @@ cc_library( "src/core/lib/iomgr/iomgr_internal.h", "src/core/lib/iomgr/iomgr_posix.h", "src/core/lib/iomgr/load_file.h", + "src/core/lib/iomgr/network_status_tracker.h", "src/core/lib/iomgr/polling_entity.h", "src/core/lib/iomgr/pollset.h", "src/core/lib/iomgr/pollset_set.h", @@ -712,6 +715,7 @@ cc_library( "src/core/lib/iomgr/iomgr_posix.c", "src/core/lib/iomgr/iomgr_windows.c", "src/core/lib/iomgr/load_file.c", + "src/core/lib/iomgr/network_status_tracker.c", "src/core/lib/iomgr/polling_entity.c", "src/core/lib/iomgr/pollset_set_windows.c", "src/core/lib/iomgr/pollset_windows.c", @@ -920,6 +924,7 @@ cc_library( "src/core/lib/iomgr/iomgr_internal.h", "src/core/lib/iomgr/iomgr_posix.h", "src/core/lib/iomgr/load_file.h", + "src/core/lib/iomgr/network_status_tracker.h", "src/core/lib/iomgr/polling_entity.h", "src/core/lib/iomgr/pollset.h", "src/core/lib/iomgr/pollset_set.h", @@ -1048,6 +1053,7 @@ cc_library( "src/core/lib/iomgr/iomgr_posix.c", "src/core/lib/iomgr/iomgr_windows.c", "src/core/lib/iomgr/load_file.c", + "src/core/lib/iomgr/network_status_tracker.c", "src/core/lib/iomgr/polling_entity.c", "src/core/lib/iomgr/pollset_set_windows.c", "src/core/lib/iomgr/pollset_windows.c", @@ -1805,6 +1811,7 @@ objc_library( "src/core/lib/iomgr/iomgr_posix.c", "src/core/lib/iomgr/iomgr_windows.c", "src/core/lib/iomgr/load_file.c", + "src/core/lib/iomgr/network_status_tracker.c", "src/core/lib/iomgr/polling_entity.c", "src/core/lib/iomgr/pollset_set_windows.c", "src/core/lib/iomgr/pollset_windows.c", @@ -2017,6 +2024,7 @@ objc_library( "src/core/lib/iomgr/iomgr_internal.h", "src/core/lib/iomgr/iomgr_posix.h", "src/core/lib/iomgr/load_file.h", + "src/core/lib/iomgr/network_status_tracker.h", "src/core/lib/iomgr/polling_entity.h", "src/core/lib/iomgr/pollset.h", "src/core/lib/iomgr/pollset_set.h", diff --git a/Makefile b/Makefile index d93ce337632..961485b3b80 100644 --- a/Makefile +++ b/Makefile @@ -2574,6 +2574,7 @@ LIBGRPC_SRC = \ src/core/lib/iomgr/iomgr_posix.c \ src/core/lib/iomgr/iomgr_windows.c \ src/core/lib/iomgr/load_file.c \ + src/core/lib/iomgr/network_status_tracker.c \ src/core/lib/iomgr/polling_entity.c \ src/core/lib/iomgr/pollset_set_windows.c \ src/core/lib/iomgr/pollset_windows.c \ @@ -2844,6 +2845,7 @@ LIBGRPC_CRONET_SRC = \ src/core/lib/iomgr/iomgr_posix.c \ src/core/lib/iomgr/iomgr_windows.c \ src/core/lib/iomgr/load_file.c \ + src/core/lib/iomgr/network_status_tracker.c \ src/core/lib/iomgr/polling_entity.c \ src/core/lib/iomgr/pollset_set_windows.c \ src/core/lib/iomgr/pollset_windows.c \ @@ -3183,6 +3185,7 @@ LIBGRPC_UNSECURE_SRC = \ src/core/lib/iomgr/iomgr_posix.c \ src/core/lib/iomgr/iomgr_windows.c \ src/core/lib/iomgr/load_file.c \ + src/core/lib/iomgr/network_status_tracker.c \ src/core/lib/iomgr/polling_entity.c \ src/core/lib/iomgr/pollset_set_windows.c \ src/core/lib/iomgr/pollset_windows.c \ @@ -6376,6 +6379,7 @@ LIBEND2END_TESTS_SRC = \ test/core/end2end/tests/max_concurrent_streams.c \ test/core/end2end/tests/max_message_length.c \ test/core/end2end/tests/negative_deadline.c \ + test/core/end2end/tests/network_status_change.c \ test/core/end2end/tests/no_op.c \ test/core/end2end/tests/payload.c \ test/core/end2end/tests/ping.c \ @@ -6452,6 +6456,7 @@ LIBEND2END_NOSEC_TESTS_SRC = \ test/core/end2end/tests/max_concurrent_streams.c \ test/core/end2end/tests/max_message_length.c \ test/core/end2end/tests/negative_deadline.c \ + test/core/end2end/tests/network_status_change.c \ test/core/end2end/tests/no_op.c \ test/core/end2end/tests/payload.c \ test/core/end2end/tests/ping.c \ diff --git a/binding.gyp b/binding.gyp index 3150d1083b0..9a4b46141ff 100644 --- a/binding.gyp +++ b/binding.gyp @@ -591,6 +591,7 @@ 'src/core/lib/iomgr/iomgr_posix.c', 'src/core/lib/iomgr/iomgr_windows.c', 'src/core/lib/iomgr/load_file.c', + 'src/core/lib/iomgr/network_status_tracker.c', 'src/core/lib/iomgr/polling_entity.c', 'src/core/lib/iomgr/pollset_set_windows.c', 'src/core/lib/iomgr/pollset_windows.c', diff --git a/build.yaml b/build.yaml index d41f4195947..54dae5b6ac2 100644 --- a/build.yaml +++ b/build.yaml @@ -183,6 +183,7 @@ filegroups: - src/core/lib/iomgr/iomgr_internal.h - src/core/lib/iomgr/iomgr_posix.h - src/core/lib/iomgr/load_file.h + - src/core/lib/iomgr/network_status_tracker.h - src/core/lib/iomgr/polling_entity.h - src/core/lib/iomgr/pollset.h - src/core/lib/iomgr/pollset_set.h @@ -261,6 +262,7 @@ filegroups: - src/core/lib/iomgr/iomgr_posix.c - src/core/lib/iomgr/iomgr_windows.c - src/core/lib/iomgr/load_file.c + - src/core/lib/iomgr/network_status_tracker.c - src/core/lib/iomgr/polling_entity.c - src/core/lib/iomgr/pollset_set_windows.c - src/core/lib/iomgr/pollset_windows.c diff --git a/config.m4 b/config.m4 index 716eb9841fb..6cf8b3a33fd 100644 --- a/config.m4 +++ b/config.m4 @@ -110,6 +110,7 @@ if test "$PHP_GRPC" != "no"; then src/core/lib/iomgr/iomgr_posix.c \ src/core/lib/iomgr/iomgr_windows.c \ src/core/lib/iomgr/load_file.c \ + src/core/lib/iomgr/network_status_tracker.c \ src/core/lib/iomgr/polling_entity.c \ src/core/lib/iomgr/pollset_set_windows.c \ src/core/lib/iomgr/pollset_windows.c \ diff --git a/gRPC.podspec b/gRPC.podspec index ff8373637a6..48da2322e73 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -190,6 +190,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/iomgr_internal.h', 'src/core/lib/iomgr/iomgr_posix.h', 'src/core/lib/iomgr/load_file.h', + 'src/core/lib/iomgr/network_status_tracker.h', 'src/core/lib/iomgr/polling_entity.h', 'src/core/lib/iomgr/pollset.h', 'src/core/lib/iomgr/pollset_set.h', @@ -375,6 +376,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/iomgr_posix.c', 'src/core/lib/iomgr/iomgr_windows.c', 'src/core/lib/iomgr/load_file.c', + 'src/core/lib/iomgr/network_status_tracker.c', 'src/core/lib/iomgr/polling_entity.c', 'src/core/lib/iomgr/pollset_set_windows.c', 'src/core/lib/iomgr/pollset_windows.c', @@ -570,6 +572,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/iomgr_internal.h', 'src/core/lib/iomgr/iomgr_posix.h', 'src/core/lib/iomgr/load_file.h', + 'src/core/lib/iomgr/network_status_tracker.h', 'src/core/lib/iomgr/polling_entity.h', 'src/core/lib/iomgr/pollset.h', 'src/core/lib/iomgr/pollset_set.h', diff --git a/grpc.gemspec b/grpc.gemspec index 184a5485917..5796cd68bc2 100755 --- a/grpc.gemspec +++ b/grpc.gemspec @@ -199,6 +199,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/iomgr_internal.h ) s.files += %w( src/core/lib/iomgr/iomgr_posix.h ) s.files += %w( src/core/lib/iomgr/load_file.h ) + s.files += %w( src/core/lib/iomgr/network_status_tracker.h ) s.files += %w( src/core/lib/iomgr/polling_entity.h ) s.files += %w( src/core/lib/iomgr/pollset.h ) s.files += %w( src/core/lib/iomgr/pollset_set.h ) @@ -354,6 +355,7 @@ Gem::Specification.new do |s| s.files += %w( src/core/lib/iomgr/iomgr_posix.c ) s.files += %w( src/core/lib/iomgr/iomgr_windows.c ) s.files += %w( src/core/lib/iomgr/load_file.c ) + s.files += %w( src/core/lib/iomgr/network_status_tracker.c ) s.files += %w( src/core/lib/iomgr/polling_entity.c ) s.files += %w( src/core/lib/iomgr/pollset_set_windows.c ) s.files += %w( src/core/lib/iomgr/pollset_windows.c ) diff --git a/package.xml b/package.xml index 67e9bb2c282..623174ad016 100644 --- a/package.xml +++ b/package.xml @@ -206,6 +206,7 @@ + @@ -361,6 +362,7 @@ + diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 017f52c3677..f7818353b0a 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -35,6 +35,7 @@ #ifdef GPR_POSIX_SOCKET +#include "src/core/lib/iomgr/network_status_tracker.h" #include "src/core/lib/iomgr/tcp_posix.h" #include @@ -474,6 +475,8 @@ grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, size_t slice_size, tcp->write_closure.cb = tcp_handle_write; tcp->write_closure.cb_arg = tcp; gpr_slice_buffer_init(&tcp->last_read_buffer); + /* Tell network status tracker about new endpoint */ + grpc_network_status_register_endpoint(&tcp->base); return &tcp->base; } diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index b2af8030aaa..8140d1d8cd2 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -37,6 +37,7 @@ #include +#include "src/core/lib/iomgr/network_status_tracker.h" #include "src/core/lib/iomgr/sockaddr_windows.h" #include @@ -401,6 +402,9 @@ grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, char *peer_string) { grpc_closure_init(&tcp->on_read, on_read, tcp); grpc_closure_init(&tcp->on_write, on_write, tcp); tcp->peer_string = gpr_strdup(peer_string); + /* Tell network status tracking code about the new endpoint */ + grpc_network_status_register_endpoint(&tcp->base); + return &tcp->base; } diff --git a/src/python/grpcio/grpc_core_dependencies.py b/src/python/grpcio/grpc_core_dependencies.py index 839c555f055..575dfa9dbde 100644 --- a/src/python/grpcio/grpc_core_dependencies.py +++ b/src/python/grpcio/grpc_core_dependencies.py @@ -104,6 +104,7 @@ CORE_SOURCE_FILES = [ 'src/core/lib/iomgr/iomgr_posix.c', 'src/core/lib/iomgr/iomgr_windows.c', 'src/core/lib/iomgr/load_file.c', + 'src/core/lib/iomgr/network_status_tracker.c', 'src/core/lib/iomgr/polling_entity.c', 'src/core/lib/iomgr/pollset_set_windows.c', 'src/core/lib/iomgr/pollset_windows.c', diff --git a/test/core/end2end/end2end_nosec_tests.c b/test/core/end2end/end2end_nosec_tests.c index b71299c09e0..09ed6e6d688 100644 --- a/test/core/end2end/end2end_nosec_tests.c +++ b/test/core/end2end/end2end_nosec_tests.c @@ -89,6 +89,8 @@ extern void max_message_length(grpc_end2end_test_config config); extern void max_message_length_pre_init(void); extern void negative_deadline(grpc_end2end_test_config config); extern void negative_deadline_pre_init(void); +extern void network_status_change(grpc_end2end_test_config config); +extern void network_status_change_pre_init(void); extern void no_op(grpc_end2end_test_config config); extern void no_op_pre_init(void); extern void payload(grpc_end2end_test_config config); @@ -144,6 +146,7 @@ void grpc_end2end_tests_pre_init(void) { max_concurrent_streams_pre_init(); max_message_length_pre_init(); negative_deadline_pre_init(); + network_status_change_pre_init(); no_op_pre_init(); payload_pre_init(); ping_pre_init(); @@ -190,6 +193,7 @@ void grpc_end2end_tests(int argc, char **argv, max_concurrent_streams(config); max_message_length(config); negative_deadline(config); + network_status_change(config); no_op(config); payload(config); ping(config); @@ -300,6 +304,10 @@ void grpc_end2end_tests(int argc, char **argv, negative_deadline(config); continue; } + if (0 == strcmp("network_status_change", argv[i])) { + network_status_change(config); + continue; + } if (0 == strcmp("no_op", argv[i])) { no_op(config); continue; diff --git a/test/core/end2end/end2end_tests.c b/test/core/end2end/end2end_tests.c index 00c9c44a78c..312700646cd 100644 --- a/test/core/end2end/end2end_tests.c +++ b/test/core/end2end/end2end_tests.c @@ -91,6 +91,8 @@ extern void max_message_length(grpc_end2end_test_config config); extern void max_message_length_pre_init(void); extern void negative_deadline(grpc_end2end_test_config config); extern void negative_deadline_pre_init(void); +extern void network_status_change(grpc_end2end_test_config config); +extern void network_status_change_pre_init(void); extern void no_op(grpc_end2end_test_config config); extern void no_op_pre_init(void); extern void payload(grpc_end2end_test_config config); @@ -147,6 +149,7 @@ void grpc_end2end_tests_pre_init(void) { max_concurrent_streams_pre_init(); max_message_length_pre_init(); negative_deadline_pre_init(); + network_status_change_pre_init(); no_op_pre_init(); payload_pre_init(); ping_pre_init(); @@ -194,6 +197,7 @@ void grpc_end2end_tests(int argc, char **argv, max_concurrent_streams(config); max_message_length(config); negative_deadline(config); + network_status_change(config); no_op(config); payload(config); ping(config); @@ -308,6 +312,10 @@ void grpc_end2end_tests(int argc, char **argv, negative_deadline(config); continue; } + if (0 == strcmp("network_status_change", argv[i])) { + network_status_change(config); + continue; + } if (0 == strcmp("no_op", argv[i])) { no_op(config); continue; diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index 325d9b3cad0..716dca20bb1 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -112,6 +112,7 @@ END2END_TESTS = { 'max_concurrent_streams': default_test_options._replace(proxyable=False), 'max_message_length': default_test_options, 'negative_deadline': default_test_options, + 'network_status_change': default_test_options, 'no_op': default_test_options, 'payload': default_test_options, 'ping_pong_streaming': default_test_options, diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index e1555930e91..545536c97c4 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -818,6 +818,7 @@ src/core/lib/iomgr/iomgr.h \ src/core/lib/iomgr/iomgr_internal.h \ src/core/lib/iomgr/iomgr_posix.h \ src/core/lib/iomgr/load_file.h \ +src/core/lib/iomgr/network_status_tracker.h \ src/core/lib/iomgr/polling_entity.h \ src/core/lib/iomgr/pollset.h \ src/core/lib/iomgr/pollset_set.h \ @@ -973,6 +974,7 @@ src/core/lib/iomgr/iomgr.c \ src/core/lib/iomgr/iomgr_posix.c \ src/core/lib/iomgr/iomgr_windows.c \ src/core/lib/iomgr/load_file.c \ +src/core/lib/iomgr/network_status_tracker.c \ src/core/lib/iomgr/polling_entity.c \ src/core/lib/iomgr/pollset_set_windows.c \ src/core/lib/iomgr/pollset_windows.c \ diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 57e3bd63f42..7f8cc8ad436 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5387,6 +5387,7 @@ "test/core/end2end/tests/max_concurrent_streams.c", "test/core/end2end/tests/max_message_length.c", "test/core/end2end/tests/negative_deadline.c", + "test/core/end2end/tests/network_status_change.c", "test/core/end2end/tests/no_op.c", "test/core/end2end/tests/payload.c", "test/core/end2end/tests/ping.c", @@ -5445,6 +5446,7 @@ "test/core/end2end/tests/max_concurrent_streams.c", "test/core/end2end/tests/max_message_length.c", "test/core/end2end/tests/negative_deadline.c", + "test/core/end2end/tests/network_status_change.c", "test/core/end2end/tests/no_op.c", "test/core/end2end/tests/payload.c", "test/core/end2end/tests/ping.c", @@ -5732,6 +5734,7 @@ "src/core/lib/iomgr/iomgr_internal.h", "src/core/lib/iomgr/iomgr_posix.h", "src/core/lib/iomgr/load_file.h", + "src/core/lib/iomgr/network_status_tracker.h", "src/core/lib/iomgr/polling_entity.h", "src/core/lib/iomgr/pollset.h", "src/core/lib/iomgr/pollset_set.h", @@ -5847,6 +5850,8 @@ "src/core/lib/iomgr/iomgr_windows.c", "src/core/lib/iomgr/load_file.c", "src/core/lib/iomgr/load_file.h", + "src/core/lib/iomgr/network_status_tracker.c", + "src/core/lib/iomgr/network_status_tracker.h", "src/core/lib/iomgr/polling_entity.c", "src/core/lib/iomgr/polling_entity.h", "src/core/lib/iomgr/pollset.h", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 3ed7a6bc476..bf5ff5be191 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -4900,6 +4900,28 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_census_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -5736,6 +5758,28 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -6548,6 +6592,27 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -7262,6 +7327,26 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fd_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -8030,6 +8115,28 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -8722,6 +8829,22 @@ "linux" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, { "args": [ "no_op" @@ -9452,6 +9575,28 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -10288,6 +10433,28 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_loadreporting_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -11100,6 +11267,27 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -11814,6 +12002,27 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -12507,6 +12716,27 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -13179,6 +13409,27 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -13874,7 +14125,7 @@ }, { "args": [ - "no_op" + "network_status_change" ], "ci_platforms": [ "windows", @@ -13895,7 +14146,7 @@ }, { "args": [ - "payload" + "no_op" ], "ci_platforms": [ "windows", @@ -13916,7 +14167,7 @@ }, { "args": [ - "ping_pong_streaming" + "payload" ], "ci_platforms": [ "windows", @@ -13937,7 +14188,7 @@ }, { "args": [ - "registered_call" + "ping_pong_streaming" ], "ci_platforms": [ "windows", @@ -13958,14 +14209,14 @@ }, { "args": [ - "request_with_flags" + "registered_call" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -13979,14 +14230,14 @@ }, { "args": [ - "request_with_payload" + "request_with_flags" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -14000,7 +14251,28 @@ }, { "args": [ - "server_finishes_request" + "request_with_payload" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "server_finishes_request" ], "ci_platforms": [ "windows", @@ -14652,6 +14924,28 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -15488,6 +15782,28 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -16216,6 +16532,27 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -16928,6 +17265,26 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -17714,6 +18071,28 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -18528,6 +18907,28 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -19236,6 +19637,26 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -19982,6 +20403,28 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -20658,6 +21101,22 @@ "linux" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, { "args": [ "no_op" @@ -21366,6 +21825,28 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -22180,6 +22661,28 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_loadreporting_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -22887,6 +23390,27 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -23559,6 +24083,27 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -24210,6 +24755,27 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -24922,6 +25488,29 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [ + "msan" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" @@ -25638,6 +26227,26 @@ "posix" ] }, + { + "args": [ + "network_status_change" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "no_op" diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj b/vsprojects/vcxproj/grpc/grpc.vcxproj index 84e03f70561..be4a28d5ecf 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj @@ -327,6 +327,7 @@ + @@ -513,6 +514,8 @@ + + diff --git a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters index 0f817e0562d..086b62d572c 100644 --- a/vsprojects/vcxproj/grpc/grpc.vcxproj.filters +++ b/vsprojects/vcxproj/grpc/grpc.vcxproj.filters @@ -88,6 +88,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -731,6 +734,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj index ac9bb186b71..d88fc0eef0a 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj @@ -316,6 +316,7 @@ + @@ -480,6 +481,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters index 1341474142c..e1bc1801f2f 100644 --- a/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_unsecure/grpc_unsecure.vcxproj.filters @@ -91,6 +91,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -638,6 +641,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj index 22cd102d116..5297d79e263 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj @@ -199,6 +199,8 @@ + + diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters index 1bb208bba8e..897a42386f4 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters @@ -73,6 +73,9 @@ test\core\end2end\tests + + test\core\end2end\tests + test\core\end2end\tests diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj index bfd437e8717..3bc61fc581d 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj @@ -201,6 +201,8 @@ + + diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters index 61c065f77ca..b896ff8bf1f 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters @@ -76,6 +76,9 @@ test\core\end2end\tests + + test\core\end2end\tests + test\core\end2end\tests From adb65a6a4905ee8a74e6f6cb222c0b95ed1b7b1b Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Mon, 20 Jun 2016 15:56:43 -0700 Subject: [PATCH 1192/1894] Fixed gpr_log format issues --- .../chttp2/transport/chttp2_transport.c | 2 +- test/core/end2end/bad_server_response_test.c | 16 ++++++++-------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index aad655effde..2a5b503c0c4 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1705,7 +1705,7 @@ static void parsing_action(grpc_exec_ctx *exec_ctx, void *arg, errors[1] = grpc_chttp2_perform_read(exec_ctx, &t->parsing, t->read_buffer.slices[i]); }; - if (i != t->read_buffer.count) { + if (i != t->read_buffer.count || errors[1] != GRPC_ERROR_NONE) { gpr_slice_unref(t->optional_drop_message); errors[2] = try_http_parsing(exec_ctx, t); if (errors[2] != GRPC_ERROR_NONE) { diff --git a/test/core/end2end/bad_server_response_test.c b/test/core/end2end/bad_server_response_test.c index 6c00942fb75..c2882b62434 100644 --- a/test/core/end2end/bad_server_response_test.c +++ b/test/core/end2end/bad_server_response_test.c @@ -96,8 +96,8 @@ static grpc_closure on_write; static void *tag(intptr_t t) { return (void *)t; } -static void done_write(grpc_exec_ctx *exec_ctx, void *arg, bool success) { - GPR_ASSERT(success); +static void done_write(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { + GPR_ASSERT(error == GRPC_ERROR_NONE); gpr_atm_rel_store(&state.done_atm, 1); } @@ -111,12 +111,11 @@ static void handle_write(grpc_exec_ctx *exec_ctx) { grpc_endpoint_write(exec_ctx, state.tcp, &state.outgoing_buffer, &on_write); } -static void handle_read(grpc_exec_ctx *exec_ctx, void *arg, bool success) { - GPR_ASSERT(success); +static void handle_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { + GPR_ASSERT(error == GRPC_ERROR_NONE); state.incoming_data_length += state.temp_incoming_buffer.length; size_t i; - gpr_log(GPR_DEBUG, "read: success=%d", success); for (i = 0; i < state.temp_incoming_buffer.count; i++) { char *dump = gpr_dump_slice(state.temp_incoming_buffer.slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); @@ -124,7 +123,8 @@ static void handle_read(grpc_exec_ctx *exec_ctx, void *arg, bool success) { gpr_free(dump); } - gpr_log(GPR_DEBUG, "got %d bytes, http2 connect string is %d bytes", + gpr_log(GPR_DEBUG, + "got %" PRIuPTR " bytes, http2 connect string is %" PRIuMAX " bytes", state.incoming_data_length, GRPC_CHTTP2_CLIENT_CONNECT_STRLEN); if (state.incoming_data_length > GRPC_CHTTP2_CLIENT_CONNECT_STRLEN) { handle_write(exec_ctx); @@ -239,8 +239,8 @@ static void actually_poll_server(void *arg) { bool done = gpr_atm_acq_load(&state.done_atm) != 0; gpr_timespec time_left = gpr_time_sub(deadline, gpr_now(GPR_CLOCK_REALTIME)); - gpr_log(GPR_DEBUG, "done=%d, time_left=%d.%09d", done, time_left.tv_sec, - time_left.tv_nsec); + gpr_log(GPR_DEBUG, "done=%d, time_left=%" PRId64 ".%09d", done, + time_left.tv_sec, time_left.tv_nsec); if (done || gpr_time_cmp(time_left, gpr_time_0(GPR_TIMESPAN)) < 0) { break; } From 2f8ade0b9df48990e3617a302a5da946f032d4f6 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 17 Jun 2016 13:28:38 -0700 Subject: [PATCH 1193/1894] Significantly refactor the polling island locking and refcounting code --- src/core/lib/iomgr/ev_epoll_linux.c | 462 ++++++++++++++++------------ 1 file changed, 270 insertions(+), 192 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index ed2c494b783..72288889c02 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -140,18 +140,40 @@ static void fd_global_shutdown(void); #define CLOSURE_READY ((grpc_closure *)1) /******************************************************************************* - * Polling-island Declarations + * Polling island Declarations */ -/* TODO: sree: Consider making ref_cnt and merged_to to gpr_atm - This would - * significantly reduce the number of mutex acquisition calls. */ + +// #define GRPC_PI_REF_COUNT_DEBUG +#ifdef GRPC_PI_REF_COUNT_DEBUG + +#define PI_ADD_REF(p, r) pi_add_ref_dbg((p), 1, (r), __FILE__, __LINE__) +#define PI_UNREF(p, r) pi_unref_dbg((p), 1, (r), __FILE__, __LINE__) + +#else /* defined(GRPC_PI_REF_COUNT_DEBUG) */ + +#define PI_ADD_REF(p, r) pi_add_ref((p), 1) +#define PI_UNREF(p, r) pi_unref((p), 1) + +#endif /* !defined(GPRC_PI_REF_COUNT_DEBUG) */ + typedef struct polling_island { gpr_mu mu; - int ref_cnt; - - /* Points to the polling_island this merged into. - * If merged_to is not NULL, all the remaining fields (except mu and ref_cnt) - * are invalid and must be ignored */ - struct polling_island *merged_to; + /* Ref count. Use PI_ADD_REF() and PI_UNREF() macros to increment/decrement + the refcount. + Once the ref count becomes zero, this structure is destroyed which means + we should ensure that there is never a scenario where a PI_ADD_REF() is + racing with a PI_UNREF() that just made the ref_count zero. */ + gpr_atm ref_count; + + /* Pointer to the polling_island this merged into. + * merged_to value is only set once in polling_island's lifetime (and that too + * only if the island is merged with another island). Because of this, we can + * use gpr_atm type here so that we can do atomic access on this and reduce + * lock contention on 'mu' mutex. + * + * Note that if this field is not NULL (i.e not 0), all the remaining fields + * (except mu and ref_count) are invalid and must be ignored. */ + gpr_atm merged_to; /* The fd of the underlying epoll set */ int epoll_fd; @@ -236,6 +258,8 @@ static grpc_wakeup_fd polling_island_wakeup_fd; static gpr_mu g_pi_freelist_mu; static polling_island *g_pi_freelist = NULL; +static void polling_island_delete(); /* Forward declaration */ + #ifdef GRPC_TSAN /* Currently TSAN may incorrectly flag data races between epoll_ctl and epoll_wait for any grpc_fd structs that are added to the epoll set via @@ -247,6 +271,51 @@ static polling_island *g_pi_freelist = NULL; gpr_atm g_epoll_sync; #endif /* defined(GRPC_TSAN) */ +#ifdef GRPC_PI_REF_COUNT_DEBUG +long pi_add_ref(polling_island *pi, int ref_cnt); +long pi_unref(polling_island *pi, int ref_cnt); + +void pi_add_ref_dbg(polling_island *pi, int ref_cnt, char *reason, char *file, + int line) { + long old_cnt = pi_add_ref(pi, ref_cnt); + gpr_log(GPR_DEBUG, "Add ref pi: %p, old:%ld -> new:%ld (%s) - (%s, %d)", + (void *)pi, old_cnt, (old_cnt + ref_cnt), reason, file, line); +} + +void pi_unref_dbg(polling_island *pi, int ref_cnt, char *reason, char *file, + int line) { + long old_cnt = pi_unref(pi, ref_cnt); + gpr_log(GPR_DEBUG, "Unref pi: %p, old:%ld -> new:%ld (%s) - (%s, %d)", + (void *)pi, old_cnt, (old_cnt - ref_cnt), reason, file, line); +} +#endif + +long pi_add_ref(polling_island *pi, int ref_cnt) { + return gpr_atm_no_barrier_fetch_add(&pi->ref_count, ref_cnt); +} + +long pi_unref(polling_island *pi, int ref_cnt) { + long old_cnt = gpr_atm_no_barrier_fetch_add(&pi->ref_count, -ref_cnt); + + /* If ref count went to zero, delete the polling island. Note that this need + not be done under a lock. Once the ref count goes to zero, we are + guaranteed that no one else holds a reference to the polling island (and + that there is no racing pi_add_ref() call either. + + Also, if we are deleting the polling island and the merged_to field is + non-empty, we should remove a ref to the merged_to polling island + */ + if (old_cnt == ref_cnt) { + polling_island *next = (polling_island *)gpr_atm_acq_load(&pi->merged_to); + polling_island_delete(pi); + if (next != NULL) { + PI_UNREF(next, "pi_delete"); /* Recursive call */ + } + } + + return old_cnt; +} + /* The caller is expected to hold pi->mu lock before calling this function */ static void polling_island_add_fds_locked(polling_island *pi, grpc_fd **fds, size_t fd_count, bool add_fd_refs) { @@ -355,8 +424,7 @@ static void polling_island_remove_fd_locked(polling_island *pi, grpc_fd *fd, } } -static polling_island *polling_island_create(grpc_fd *initial_fd, - int initial_ref_cnt) { +static polling_island *polling_island_create(grpc_fd *initial_fd) { polling_island *pi = NULL; /* Try to get one from the polling island freelist */ @@ -377,6 +445,9 @@ static polling_island *polling_island_create(grpc_fd *initial_fd, pi->fds = NULL; } + gpr_atm_no_barrier_store(&pi->ref_count, 0); + gpr_atm_no_barrier_store(&pi->merged_to, NULL); + pi->epoll_fd = epoll_create1(EPOLL_CLOEXEC); if (pi->epoll_fd < 0) { @@ -387,14 +458,12 @@ static polling_island *polling_island_create(grpc_fd *initial_fd, polling_island_add_wakeup_fd_locked(pi, &grpc_global_wakeup_fd); - pi->ref_cnt = initial_ref_cnt; - pi->merged_to = NULL; pi->next_free = NULL; if (initial_fd != NULL) { - /* It is not really needed to get the pi->mu lock here. If this is a newly - created polling island (or one that we got from the freelist), no one - else would be holding a lock to it anyway */ + /* Lock the polling island here just in case we got this structure from the + freelist and the polling island lock was not released yet (by the code + that adds the polling island to the freelist) */ gpr_mu_lock(&pi->mu); polling_island_add_fds_locked(pi, &initial_fd, 1, true); gpr_mu_unlock(&pi->mu); @@ -404,140 +473,136 @@ static polling_island *polling_island_create(grpc_fd *initial_fd, } static void polling_island_delete(polling_island *pi) { - GPR_ASSERT(pi->ref_cnt == 0); GPR_ASSERT(pi->fd_cnt == 0); + gpr_atm_rel_store(&pi->merged_to, NULL); + close(pi->epoll_fd); pi->epoll_fd = -1; - pi->merged_to = NULL; - gpr_mu_lock(&g_pi_freelist_mu); pi->next_free = g_pi_freelist; g_pi_freelist = pi; gpr_mu_unlock(&g_pi_freelist_mu); } -void polling_island_unref_and_unlock(polling_island *pi, int unref_by) { - pi->ref_cnt -= unref_by; - int ref_cnt = pi->ref_cnt; - GPR_ASSERT(ref_cnt >= 0); - - gpr_mu_unlock(&pi->mu); - - if (ref_cnt == 0) { - polling_island_delete(pi); - } -} - -polling_island *polling_island_update_and_lock(polling_island *pi, int unref_by, - int add_ref_by) { +/* Gets the lock on the *latest* polling island i.e the last polling island in + the linked list (linked by 'merged_to' link). Call gpr_mu_unlock on the + returned polling island's mu. + Usage: To lock/unlock polling island "pi", do the following: + polling_island *pi_latest = polling_island_lock(pi); + ... + ... critical section .. + ... + gpr_mu_unlock(&pi_latest->mu); //NOTE: use pi_latest->mu. NOT pi->mu */ +polling_island *polling_island_lock(polling_island *pi) { polling_island *next = NULL; - gpr_mu_lock(&pi->mu); - while (pi->merged_to != NULL) { - next = pi->merged_to; - polling_island_unref_and_unlock(pi, unref_by); + while (true) { + next = (polling_island *)gpr_atm_acq_load(&pi->merged_to); + if (next == NULL) { + /* pi is the last node in the linked list. Get the lock and check again + (under the pi->mu lock) that pi is still the last node (because a merge + may have happend after the (next == NULL) check above and before + getting the pi->mu lock. + If pi is the last node, we are done. If not, unlock and continue + traversing the list */ + gpr_mu_lock(&pi->mu); + next = (polling_island *)gpr_atm_acq_load(&pi->merged_to); + if (next == NULL) { + break; + } + gpr_mu_unlock(&pi->mu); + } + pi = next; - gpr_mu_lock(&pi->mu); } - pi->ref_cnt += add_ref_by; return pi; } -void polling_island_pair_update_and_lock(polling_island **p, - polling_island **q) { +/* Gets the lock on the *latest* polling islands pointed by *p and *q. + This function is needed because calling the following block of code to obtain + locks on polling islands (*p and *q) is prone to deadlocks. + { + polling_island_lock(*p); + polling_island_lock(*q); + } + + Usage/exmaple: + polling_island *p1; + polling_island *p2; + .. + polling_island_lock_pair(&p1, &p2); + .. + .. Critical section with both p1 and p2 locked + .. + // Release locks + // **IMPORTANT**: Make sure you check p1 == p2 AFTER the function + // polling_island_lock_pair() was called and if so, release the lock only + // once. Note: Even if p1 != p2 beforec calling polling_island_lock_pair(), + // they might be after the function returns: + if (p1 == p2) { + gpr_mu_unlock(&p1->mu) + } else { + gpr_mu_unlock(&p1->mu); + gpr_mu_unlock(&p2->mu); + } + +*/ +void polling_island_lock_pair(polling_island **p, polling_island **q) { polling_island *pi_1 = *p; polling_island *pi_2 = *q; - polling_island *temp = NULL; - bool pi_1_locked = false; - bool pi_2_locked = false; - int num_swaps = 0; - - /* Loop until either pi_1 == pi_2 or until we acquired locks on both pi_1 - and pi_2 */ - while (pi_1 != pi_2 && !(pi_1_locked && pi_2_locked)) { - /* The following assertions are true at this point: - - pi_1 != pi_2 (else, the while loop would have exited) - - pi_1 MAY be locked - - pi_2 is NOT locked */ - - /* To maintain lock order consistency, always lock polling_island node with - lower address first. - First, make sure pi_1 < pi_2 before proceeding any further. If it turns - out that pi_1 > pi_2, unlock pi_1 if locked (because pi_2 is not locked - at this point and having pi_1 locked would violate the lock order) and - swap pi_1 and pi_2 so that pi_1 becomes less than pi_2 */ - if (pi_1 > pi_2) { - if (pi_1_locked) { - gpr_mu_unlock(&pi_1->mu); - pi_1_locked = false; - } + polling_island *next_1 = NULL; + polling_island *next_2 = NULL; + + /* The algorithm is simple: + - Go to the last polling islands in the linked lists *pi_1 and *pi_2 (and + keep updating pi_1 and pi_2) + - Then obtain locks on the islands by following a lock order rule of + locking polling_island with lower address first + Special case: Before obtaining the locks, check if pi_1 and pi_2 are + pointing to the same island. If that is the case, we can just call + polling_island_lock() + - After obtaining both the locks, double check that the polling islands + are still the last polling islands in their respective linked lists + (this is because there might have been polling island merges before + we got the lock) + - If the polling islands are the last islands, we are done. If not, + release the locks and continue the process from the first step */ + while (true) { + next_1 = (polling_island *)gpr_atm_acq_load(&pi_1->merged_to); + while (next_1 != NULL) { + pi_1 = next_1; + next_1 = (polling_island *)gpr_atm_acq_load(&pi_1->merged_to); + } - GPR_SWAP(polling_island *, pi_1, pi_2); - num_swaps++; + next_2 = (polling_island *)gpr_atm_acq_load(&pi_2->merged_to); + while (next_2 != NULL) { + pi_2 = next_2; + next_2 = (polling_island *)gpr_atm_acq_load(&pi_2->merged_to); } - /* The following assertions are true at this point: - - pi_1 != pi_2 - - pi_1 < pi_2 (address of pi_1 is less than that of pi_2) - - pi_1 MAYBE locked - - pi_2 is NOT locked */ + if (pi_1 == pi_2) { + pi_1 = pi_2 = polling_island_lock(pi_1); + break; + } - /* Lock pi_1 (if pi_1 is pointing to the terminal node in the list) */ - if (!pi_1_locked) { + if (pi_1 < pi_2) { + gpr_mu_lock(&pi_1->mu); + gpr_mu_lock(&pi_2->mu); + } else { + gpr_mu_lock(&pi_2->mu); gpr_mu_lock(&pi_1->mu); - pi_1_locked = true; - - /* If pi_1 is not terminal node (i.e pi_1->merged_to != NULL), we are not - done locking this polling_island yet. Release the lock on this node and - advance pi_1 to the next node in the list; and go to the beginning of - the loop (we can't proceed to locking pi_2 unless we locked pi_1 first) - */ - if (pi_1->merged_to != NULL) { - temp = pi_1->merged_to; - polling_island_unref_and_unlock(pi_1, 1); - pi_1 = temp; - pi_1_locked = false; - - continue; - } } - /* The following assertions are true at this point: - - pi_1 is locked - - pi_2 is unlocked - - pi_1 != pi_2 */ - - gpr_mu_lock(&pi_2->mu); - pi_2_locked = true; - - /* If pi_2 is not terminal node, we are not done locking this polling_island - yet. Release the lock and update pi_2 to the next node in the list */ - if (pi_2->merged_to != NULL) { - temp = pi_2->merged_to; - polling_island_unref_and_unlock(pi_2, 1); - pi_2 = temp; - pi_2_locked = false; + next_1 = (polling_island *)gpr_atm_acq_load(&pi_1->merged_to); + next_2 = (polling_island *)gpr_atm_acq_load(&pi_2->merged_to); + if (next_1 == NULL && next_2 == NULL) { + break; } - } - /* At this point, either pi_1 == pi_2 AND/OR we got both locks */ - if (pi_1 == pi_2) { - /* We may or may not have gotten the lock. If we didn't, walk the rest of - the polling_island list and get the lock */ - GPR_ASSERT(pi_1_locked || (!pi_1_locked && !pi_2_locked)); - if (!pi_1_locked) { - pi_1 = pi_2 = polling_island_update_and_lock(pi_1, 2, 0); - } - } else { - GPR_ASSERT(pi_1_locked && pi_2_locked); - /* If we swapped pi_1 and pi_2 odd number of times, do one more swap so that - pi_1 and pi_2 point to the same polling_island lists they started off - with at the beginning of this function (i.e *p and *q respectively) */ - if (num_swaps % 2 > 0) { - GPR_SWAP(polling_island *, pi_1, pi_2); - } + gpr_mu_unlock(&pi_1->mu); + gpr_mu_unlock(&pi_2->mu); } *p = pi_1; @@ -546,7 +611,7 @@ void polling_island_pair_update_and_lock(polling_island **p, polling_island *polling_island_merge(polling_island *p, polling_island *q) { /* Get locks on both the polling islands */ - polling_island_pair_update_and_lock(&p, &q); + polling_island_lock_pair(&p, &q); if (p == q) { /* Nothing needs to be done here */ @@ -568,15 +633,14 @@ polling_island *polling_island_merge(polling_island *p, polling_island *q) { /* Wakeup all the pollers (if any) on p so that they can pickup this change */ polling_island_add_wakeup_fd_locked(p, &polling_island_wakeup_fd); - p->merged_to = q; + /* Add the 'merged_to' link from p --> q */ + gpr_atm_rel_store(&p->merged_to, q); + PI_ADD_REF(q, "pi_merge"); /* To account for the new incoming ref from p */ - /* - The merged polling island (i.e q) inherits all the ref counts of the - island merging with it (i.e p) - - The island p will lose a ref count */ - q->ref_cnt += p->ref_cnt; - polling_island_unref_and_unlock(p, 1); /* Decrement refcount */ - polling_island_unref_and_unlock(q, 0); /* Just Unlock. Don't decrement ref */ + gpr_mu_unlock(&p->mu); + gpr_mu_unlock(&q->mu); + /* Return the merged polling island */ return q; } @@ -667,6 +731,7 @@ static void unref_by(grpc_fd *fd, int n) { fd->freelist_next = fd_freelist; fd_freelist = fd; grpc_iomgr_unregister_object(&fd->iomgr_object); + gpr_mu_unlock(&fd_freelist_mu); } else { GPR_ASSERT(old > n); @@ -785,16 +850,20 @@ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, REF_BY(fd, 1, reason); /* Remove the fd from the polling island: - - Update the fd->polling_island to point to the latest polling island - - Remove the fd from the polling island. - - Remove a ref to the polling island and set fd->polling_island to NULL */ + - Get a lock on the latest polling island (i.e the last island in the + linked list pointed by fd->polling_island). This is the island that + would actually contain the fd + - Remove the fd from the latest polling island + - Unlock the latest polling island + - Set fd->polling_island to NULL (but remove the ref on the polling island + before doing this.) */ gpr_mu_lock(&fd->pi_mu); if (fd->polling_island != NULL) { - fd->polling_island = - polling_island_update_and_lock(fd->polling_island, 1, 0); - polling_island_remove_fd_locked(fd->polling_island, fd, is_fd_closed); + polling_island *pi_latest = polling_island_lock(fd->polling_island); + polling_island_remove_fd_locked(pi_latest, fd, is_fd_closed); + gpr_mu_unlock(&pi_latest->mu); - polling_island_unref_and_unlock(fd->polling_island, 1); + PI_UNREF(fd->polling_island, "fd_orphan"); fd->polling_island = NULL; } gpr_mu_unlock(&fd->pi_mu); @@ -1050,17 +1119,13 @@ static void fd_become_writable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { gpr_mu_unlock(&fd->mu); } -/* Release the reference to pollset->polling_island and set it to NULL. - pollset->mu must be held */ -static void pollset_release_polling_island_locked(grpc_pollset *pollset) { - gpr_mu_lock(&pollset->pi_mu); - if (pollset->polling_island) { - pollset->polling_island = - polling_island_update_and_lock(pollset->polling_island, 1, 0); - polling_island_unref_and_unlock(pollset->polling_island, 1); - pollset->polling_island = NULL; +static void pollset_release_polling_island(grpc_pollset *ps, char *reason) { + gpr_mu_lock(&ps->pi_mu); + if (ps->polling_island != NULL) { + PI_UNREF(ps->polling_island, reason); } - gpr_mu_unlock(&pollset->pi_mu); + ps->polling_island = NULL; + gpr_mu_unlock(&ps->pi_mu); } static void finish_shutdown_locked(grpc_exec_ctx *exec_ctx, @@ -1069,8 +1134,9 @@ static void finish_shutdown_locked(grpc_exec_ctx *exec_ctx, GPR_ASSERT(!pollset_has_workers(pollset)); pollset->finish_shutdown_called = true; - pollset_release_polling_island_locked(pollset); + /* Release the ref and set pollset->polling_island to NULL */ + pollset_release_polling_island(pollset, "ps_shutdown"); grpc_exec_ctx_enqueue(exec_ctx, pollset->shutdown_done, true, NULL); } @@ -1110,7 +1176,7 @@ static void pollset_reset(grpc_pollset *pollset) { pollset->finish_shutdown_called = false; pollset->kicked_without_pollers = false; pollset->shutdown_done = NULL; - pollset_release_polling_island_locked(pollset); + pollset_release_polling_island(pollset, "ps_reset"); } #define GRPC_EPOLL_MAX_EVENTS 1000 @@ -1124,28 +1190,37 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, GPR_TIMER_BEGIN("pollset_work_and_unlock", 0); /* We need to get the epoll_fd to wait on. The epoll_fd is in inside the - polling island pointed by pollset->polling_island. + latest polling island pointed by pollset->polling_island. Acquire the following locks: - pollset->mu (which we already have) - pollset->pi_mu - - pollset->polling_island->mu (call polling_island_update_and_lock())*/ + - pollset->polling_island lock */ gpr_mu_lock(&pollset->pi_mu); - pi = pollset->polling_island; - if (pi == NULL) { - pi = polling_island_create(NULL, 1); + if (pollset->polling_island == NULL) { + pollset->polling_island = polling_island_create(NULL); + PI_ADD_REF(pollset->polling_island, "ps"); } - /* In addition to locking the polling island, add a ref so that the island - does not get destroyed (which means the epoll_fd won't be closed) while - we are are doing an epoll_wait() on the epoll_fd */ - pi = polling_island_update_and_lock(pi, 1, 1); + pi = polling_island_lock(pollset->polling_island); epoll_fd = pi->epoll_fd; - /* Update the pollset->polling_island */ - pollset->polling_island = pi; + /* Update the pollset->polling_island since the island being pointed by + pollset->polling_island may not be the latest (i.e pi) */ + if (pollset->polling_island != pi) { + /* Always do PI_ADD_REF before PI_UNREF because PI_UNREF may cause the + polling island to be deleted */ + PI_ADD_REF(pi, "ps"); + PI_UNREF(pollset->polling_island, "ps"); + pollset->polling_island = pi; + } + + /* Add an extra ref so that the island does not get destroyed (which means + the epoll_fd won't be closed) while we are are doing an epoll_wait() on the + epoll_fd */ + PI_ADD_REF(pi, "ps_work"); - polling_island_unref_and_unlock(pollset->polling_island, 0); /* Keep the ref*/ + gpr_mu_unlock(&pi->mu); gpr_mu_unlock(&pollset->pi_mu); gpr_mu_unlock(&pollset->mu); @@ -1193,14 +1268,12 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, GPR_ASSERT(pi != NULL); - /* Before leaving, release the extra ref we added to the polling island */ - /* It is important to note that at this point 'pi' may not be the same as - * pollset->polling_island. This is because pollset->polling_island pointer - * gets updated whenever the underlying polling island is merged with another - * island and while we are doing epoll_wait() above, the polling island may - * have been merged */ - pi = polling_island_update_and_lock(pi, 1, 0); /* No new ref added */ - polling_island_unref_and_unlock(pi, 1); + /* Before leaving, release the extra ref we added to the polling island. It + is important to use "pi" here (i.e our old copy of pollset->polling_island + that we got before releasing the polling island lock). This is because + pollset->polling_island pointer might get udpated in other parts of the + code when there is an island merge while we are doing epoll_wait() above */ + PI_UNREF(pi, "ps_work"); GPR_TIMER_END("pollset_work_and_unlock", 0); } @@ -1297,20 +1370,34 @@ static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, if (fd->polling_island == pollset->polling_island) { pi_new = fd->polling_island; if (pi_new == NULL) { - pi_new = polling_island_create(fd, 2); + pi_new = polling_island_create(fd); } } else if (fd->polling_island == NULL) { - pi_new = polling_island_update_and_lock(pollset->polling_island, 1, 1); - polling_island_add_fds_locked(pollset->polling_island, &fd, 1, true); + pi_new = polling_island_lock(pollset->polling_island); + polling_island_add_fds_locked(pi_new, &fd, 1, true); gpr_mu_unlock(&pi_new->mu); } else if (pollset->polling_island == NULL) { - pi_new = polling_island_update_and_lock(fd->polling_island, 1, 1); + pi_new = polling_island_lock(fd->polling_island); gpr_mu_unlock(&pi_new->mu); } else { pi_new = polling_island_merge(fd->polling_island, pollset->polling_island); } - fd->polling_island = pollset->polling_island = pi_new; + if (fd->polling_island != pi_new) { + PI_ADD_REF(pi_new, "fd"); + if (fd->polling_island != NULL) { + PI_UNREF(fd->polling_island, "fd"); + } + fd->polling_island = pi_new; + } + + if (pollset->polling_island != pi_new) { + PI_ADD_REF(pi_new, "ps"); + if (pollset->polling_island != NULL) { + PI_UNREF(pollset->polling_island, "ps"); + } + pollset->polling_island = pi_new; + } gpr_mu_unlock(&fd->pi_mu); gpr_mu_unlock(&pollset->pi_mu); @@ -1481,28 +1568,19 @@ void *grpc_pollset_get_polling_island(grpc_pollset *ps) { return pi; } -static polling_island *get_polling_island(polling_island *p) { - if (p == NULL) { - return NULL; - } +bool grpc_are_polling_islands_equal(void *p, void *q) { + polling_island *p1 = p; + polling_island *p2 = q; - polling_island *next; - gpr_mu_lock(&p->mu); - while (p->merged_to != NULL) { - next = p->merged_to; - gpr_mu_unlock(&p->mu); - p = next; - gpr_mu_lock(&p->mu); + polling_island_lock_pair(&p1, &p2); + if (p1 == p2) { + gpr_mu_unlock(&p1->mu); + } else { + gpr_mu_unlock(&p1->mu); + gpr_mu_unlock(&p2->mu); } - gpr_mu_unlock(&p->mu); - - return p; -} -bool grpc_are_polling_islands_equal(void *p, void *q) { - p = get_polling_island(p); - q = get_polling_island(q); - return p == q; + return p1 == p2; } /******************************************************************************* From bc98af18fabd94fbc6673dc021fdc45b20432028 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 17 Jun 2016 18:38:27 -0700 Subject: [PATCH 1194/1894] make run_tests.py support coreclr on windows --- tools/run_tests/build_csharp_coreclr.bat | 44 ++++++++++++++++++++++++ tools/run_tests/run_tests.py | 38 ++++++++++---------- 2 files changed, 64 insertions(+), 18 deletions(-) create mode 100644 tools/run_tests/build_csharp_coreclr.bat diff --git a/tools/run_tests/build_csharp_coreclr.bat b/tools/run_tests/build_csharp_coreclr.bat new file mode 100644 index 00000000000..cead6d0e02c --- /dev/null +++ b/tools/run_tests/build_csharp_coreclr.bat @@ -0,0 +1,44 @@ +@rem Copyright 2016, Google Inc. +@rem All rights reserved. +@rem +@rem Redistribution and use in source and binary forms, with or without +@rem modification, are permitted provided that the following conditions are +@rem met: +@rem +@rem * Redistributions of source code must retain the above copyright +@rem notice, this list of conditions and the following disclaimer. +@rem * Redistributions in binary form must reproduce the above +@rem copyright notice, this list of conditions and the following disclaimer +@rem in the documentation and/or other materials provided with the +@rem distribution. +@rem * Neither the name of Google Inc. nor the names of its +@rem contributors may be used to endorse or promote products derived from +@rem this software without specific prior written permission. +@rem +@rem THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +@rem "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +@rem LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +@rem A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +@rem OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +@rem SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +@rem LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +@rem DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +@rem THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +@rem (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +@rem OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +setlocal + +cd /d %~dp0\..\..\src\csharp + +dotnet restore . || goto :error + +dotnet build -f netstandard1.5 --configuration %MSBUILD_CONFIG% "**/project.json" || goto :error + +endlocal + +goto :EOF + +:error +echo Failed! +exit /b %errorlevel% diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 473eb460b46..3cb0be579da 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -504,13 +504,9 @@ class CSharpLanguage(object): self._make_options = [_windows_toolset_option(self.args.compiler), _windows_arch_option(self.args.arch)] else: - if self.platform == 'linux': - if self.args.compiler == 'coreclr': - self._docker_distro = 'coreclr' - else: - self._docker_distro = 'jessie' - else: - _check_compiler(self.args.compiler, ['default']) + _check_compiler(self.args.compiler, ['default', 'coreclr']) + if self.platform == 'linux' and self.args.compiler == 'coreclr': + self._docker_distro = 'coreclr' if self.platform == 'mac': # On Mac, official distribution of mono is 32bit. @@ -525,21 +521,22 @@ class CSharpLanguage(object): tests_by_assembly = json.load(f) msbuild_config = _MSBUILD_CONFIG[self.config.build_config] - nunit_args = ['--labels=All', - '--noresult', - '--workers=1'] + nunit_args = ['--labels=All'] assembly_subdir = 'bin/%s' % msbuild_config assembly_extension = '.exe' if self.args.compiler == 'coreclr': # TODO(jtattermusch): make the runtime string platform-specific - assembly_subdir += '/netstandard1.5/debian.8-x64' - assembly_extension = '' - runtime_cmd = [] - elif self.platform == 'windows': + #assembly_subdir += '/netstandard1.5/debian.8-x64' + #assembly_extension = '' + assembly_subdir += '/netstandard1.5/win7-x64' runtime_cmd = [] else: - runtime_cmd = ['mono'] + nunit_args += ['--noresult', '--workers=1'] + if self.platform == 'windows': + runtime_cmd = [] + else: + runtime_cmd = ['mono'] specs = [] for assembly in tests_by_assembly.iterkeys(): @@ -590,7 +587,10 @@ class CSharpLanguage(object): def build_steps(self): if self.args.compiler == 'coreclr': - return [['tools/run_tests/build_csharp_coreclr.sh']] + if self.platform == 'windows': + return [['tools\\run_tests\\build_csharp_coreclr.bat']] + else: + return [['tools/run_tests/build_csharp_coreclr.sh']] else: if self.platform == 'windows': return [[_windows_build_bat(self.args.compiler), @@ -752,7 +752,8 @@ def _check_arch_option(arch): def _windows_build_bat(compiler): """Returns name of build.bat for selected compiler.""" - if compiler == 'default' or compiler == 'vs2013': + # For CoreCLR, fall back to the default compiler for C core + if compiler == 'default' or compiler == 'vs2013' or compiler == 'coreclr': return 'vsprojects\\build_vs2013.bat' elif compiler == 'vs2015': return 'vsprojects\\build_vs2015.bat' @@ -765,7 +766,8 @@ def _windows_build_bat(compiler): def _windows_toolset_option(compiler): """Returns msbuild PlatformToolset for selected compiler.""" - if compiler == 'default' or compiler == 'vs2013': + # For CoreCLR, fall back to the default compiler for C core + if compiler == 'default' or compiler == 'vs2013' or compiler == 'coreclr': return '/p:PlatformToolset=v120' elif compiler == 'vs2015': return '/p:PlatformToolset=v140' From 74330130a3becaced929b2502fdea72bc5589314 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 20 Jun 2016 15:54:27 -0700 Subject: [PATCH 1195/1894] improve project.json files --- src/csharp/Grpc.Core.Tests/project.json | 1 - src/csharp/Grpc.Core/project.json | 1 - src/csharp/Grpc.Dotnet.sln | 6 ++++++ .../Grpc.Examples.MathClient/project.json | 1 - .../Grpc.Examples.MathServer/project.json | 1 - src/csharp/Grpc.Examples.Tests/project.json | 1 - src/csharp/Grpc.Examples/project.json | 4 ---- .../Grpc.HealthCheck.Tests/project.json | 1 - src/csharp/Grpc.HealthCheck/project.json | 3 --- .../project.json | 1 - .../project.json | 1 - .../project.json | 1 - ...Grpc.IntegrationTesting.StressClient.xproj | 19 +++++++++++++++++++ .../project.json | 1 - .../Grpc.IntegrationTesting/project.json | 1 - 15 files changed, 25 insertions(+), 18 deletions(-) create mode 100644 src/csharp/Grpc.IntegrationTesting.StressClient/Grpc.IntegrationTesting.StressClient.xproj diff --git a/src/csharp/Grpc.Core.Tests/project.json b/src/csharp/Grpc.Core.Tests/project.json index a59e6390d9d..95f40fdbbde 100644 --- a/src/csharp/Grpc.Core.Tests/project.json +++ b/src/csharp/Grpc.Core.Tests/project.json @@ -1,6 +1,5 @@ { "buildOptions": { - "compile": "**/*.cs", "copyToOutput": { "mappings": { "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", diff --git a/src/csharp/Grpc.Core/project.json b/src/csharp/Grpc.Core/project.json index b5b7722bba2..ba3dc15495d 100644 --- a/src/csharp/Grpc.Core/project.json +++ b/src/csharp/Grpc.Core/project.json @@ -22,7 +22,6 @@ } }, "buildOptions": { - "compile": "**/*.cs", "embed": [ "../../../etc/roots.pem" ] }, "dependencies": { diff --git a/src/csharp/Grpc.Dotnet.sln b/src/csharp/Grpc.Dotnet.sln index 6a7e2e27482..98b3cd54abb 100644 --- a/src/csharp/Grpc.Dotnet.sln +++ b/src/csharp/Grpc.Dotnet.sln @@ -29,6 +29,8 @@ Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Grpc.IntegrationTesting.Qps EndProject Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Grpc.IntegrationTesting.Server", "Grpc.IntegrationTesting.Server\Grpc.IntegrationTesting.Server.xproj", "{881F7AD1-A84E-47A2-9402-115C63C4031E}" EndProject +Project("{8BB2217D-0F2D-49D1-97BC-3654ED321F3B}") = "Grpc.IntegrationTesting.StressClient", "Grpc.IntegrationTesting.StressClient\Grpc.IntegrationTesting.StressClient.xproj", "{0EBC910B-8867-4D3E-8686-91F34183D839}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -87,6 +89,10 @@ Global {881F7AD1-A84E-47A2-9402-115C63C4031E}.Debug|Any CPU.Build.0 = Debug|Any CPU {881F7AD1-A84E-47A2-9402-115C63C4031E}.Release|Any CPU.ActiveCfg = Release|Any CPU {881F7AD1-A84E-47A2-9402-115C63C4031E}.Release|Any CPU.Build.0 = Release|Any CPU + {0EBC910B-8867-4D3E-8686-91F34183D839}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {0EBC910B-8867-4D3E-8686-91F34183D839}.Debug|Any CPU.Build.0 = Debug|Any CPU + {0EBC910B-8867-4D3E-8686-91F34183D839}.Release|Any CPU.ActiveCfg = Release|Any CPU + {0EBC910B-8867-4D3E-8686-91F34183D839}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/src/csharp/Grpc.Examples.MathClient/project.json b/src/csharp/Grpc.Examples.MathClient/project.json index 9c070c76ba5..4c1ea780412 100644 --- a/src/csharp/Grpc.Examples.MathClient/project.json +++ b/src/csharp/Grpc.Examples.MathClient/project.json @@ -1,6 +1,5 @@ { "buildOptions": { - "compile": "**/*.cs", "copyToOutput": { "mappings": { "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", diff --git a/src/csharp/Grpc.Examples.MathServer/project.json b/src/csharp/Grpc.Examples.MathServer/project.json index 9c070c76ba5..4c1ea780412 100644 --- a/src/csharp/Grpc.Examples.MathServer/project.json +++ b/src/csharp/Grpc.Examples.MathServer/project.json @@ -1,6 +1,5 @@ { "buildOptions": { - "compile": "**/*.cs", "copyToOutput": { "mappings": { "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", diff --git a/src/csharp/Grpc.Examples.Tests/project.json b/src/csharp/Grpc.Examples.Tests/project.json index 7dd938cfb16..f41be82bd53 100644 --- a/src/csharp/Grpc.Examples.Tests/project.json +++ b/src/csharp/Grpc.Examples.Tests/project.json @@ -1,6 +1,5 @@ { "buildOptions": { - "compile": "**/*.cs", "copyToOutput": { "mappings": { "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", diff --git a/src/csharp/Grpc.Examples/project.json b/src/csharp/Grpc.Examples/project.json index 610712f6460..fe580eb165b 100644 --- a/src/csharp/Grpc.Examples/project.json +++ b/src/csharp/Grpc.Examples/project.json @@ -1,8 +1,4 @@ { - "buildOptions": { - "compile": "**/*.cs" - }, - "dependencies": { "Grpc.Core": { "target": "project" diff --git a/src/csharp/Grpc.HealthCheck.Tests/project.json b/src/csharp/Grpc.HealthCheck.Tests/project.json index be2b3a0459f..5a5f063258a 100644 --- a/src/csharp/Grpc.HealthCheck.Tests/project.json +++ b/src/csharp/Grpc.HealthCheck.Tests/project.json @@ -1,6 +1,5 @@ { "buildOptions": { - "compile": "**/*.cs", "copyToOutput": { "mappings": { "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", diff --git a/src/csharp/Grpc.HealthCheck/project.json b/src/csharp/Grpc.HealthCheck/project.json index c69db5f997d..e9fdfad4731 100644 --- a/src/csharp/Grpc.HealthCheck/project.json +++ b/src/csharp/Grpc.HealthCheck/project.json @@ -12,9 +12,6 @@ "requireLicenseAcceptance": false, "tags": [ "gRPC health check" ] }, - "buildOptions": { - "compile": "**/*.cs" - }, "dependencies": { "Grpc.Core": "0.14.0-anexperiment", "Google.Protobuf": "3.0.0-beta3" diff --git a/src/csharp/Grpc.IntegrationTesting.Client/project.json b/src/csharp/Grpc.IntegrationTesting.Client/project.json index fabf906a738..b19b76c6ccf 100644 --- a/src/csharp/Grpc.IntegrationTesting.Client/project.json +++ b/src/csharp/Grpc.IntegrationTesting.Client/project.json @@ -1,6 +1,5 @@ { "buildOptions": { - "compile": "**/*.cs", "copyToOutput": { "mappings": { "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", diff --git a/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json index fabf906a738..b19b76c6ccf 100644 --- a/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json +++ b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json @@ -1,6 +1,5 @@ { "buildOptions": { - "compile": "**/*.cs", "copyToOutput": { "mappings": { "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", diff --git a/src/csharp/Grpc.IntegrationTesting.Server/project.json b/src/csharp/Grpc.IntegrationTesting.Server/project.json index fabf906a738..b19b76c6ccf 100644 --- a/src/csharp/Grpc.IntegrationTesting.Server/project.json +++ b/src/csharp/Grpc.IntegrationTesting.Server/project.json @@ -1,6 +1,5 @@ { "buildOptions": { - "compile": "**/*.cs", "copyToOutput": { "mappings": { "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", diff --git a/src/csharp/Grpc.IntegrationTesting.StressClient/Grpc.IntegrationTesting.StressClient.xproj b/src/csharp/Grpc.IntegrationTesting.StressClient/Grpc.IntegrationTesting.StressClient.xproj new file mode 100644 index 00000000000..2f4fdcbb470 --- /dev/null +++ b/src/csharp/Grpc.IntegrationTesting.StressClient/Grpc.IntegrationTesting.StressClient.xproj @@ -0,0 +1,19 @@ + + + + 14.0.25123 + $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion) + + + + 0ebc910b-8867-4d3e-8686-91f34183d839 + Grpc.IntegrationTesting.StressClient + .\obj + .\bin\ + + + + 2.0 + + + \ No newline at end of file diff --git a/src/csharp/Grpc.IntegrationTesting.StressClient/project.json b/src/csharp/Grpc.IntegrationTesting.StressClient/project.json index fabf906a738..b19b76c6ccf 100644 --- a/src/csharp/Grpc.IntegrationTesting.StressClient/project.json +++ b/src/csharp/Grpc.IntegrationTesting.StressClient/project.json @@ -1,6 +1,5 @@ { "buildOptions": { - "compile": "**/*.cs", "copyToOutput": { "mappings": { "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", diff --git a/src/csharp/Grpc.IntegrationTesting/project.json b/src/csharp/Grpc.IntegrationTesting/project.json index d5ac6f108ba..be857279892 100644 --- a/src/csharp/Grpc.IntegrationTesting/project.json +++ b/src/csharp/Grpc.IntegrationTesting/project.json @@ -1,6 +1,5 @@ { "buildOptions": { - "compile": "**/*.cs", "copyToOutput": { "mappings": { "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", From aa338326ed399832394078282664c6bcf66d11e7 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Mon, 20 Jun 2016 16:47:40 -0700 Subject: [PATCH 1196/1894] Revert ProtoService.m, add an exception for its incompatible-pointer-types warning --- src/objective-c/ProtoRPC/ProtoService.m | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/objective-c/ProtoRPC/ProtoService.m b/src/objective-c/ProtoRPC/ProtoService.m index 4a14570d818..cd9bc7aeac4 100644 --- a/src/objective-c/ProtoRPC/ProtoService.m +++ b/src/objective-c/ProtoRPC/ProtoService.m @@ -65,19 +65,22 @@ return self; } -- (GRPCProtoCall *)RPCToMethod:(NSString *)method +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wincompatible-pointer-types" +- (ProtoRPC *)RPCToMethod:(NSString *)method requestsWriter:(GRXWriter *)requestsWriter responseClass:(Class)responseClass responsesWriteable:(id)responsesWriteable { - GRPCProtoMethod *methodName = [[GRPCProtoMethod alloc] initWithPackage:_packageName + ProtoMethod *methodName = [[ProtoMethod alloc] initWithPackage:_packageName service:_serviceName method:method]; - return [[GRPCProtoCall alloc] initWithHost:_host + return [[ProtoRPC alloc] initWithHost:_host method:methodName requestsWriter:requestsWriter responseClass:responseClass responsesWriteable:responsesWriteable]; } +#pragma clang diagnostic pop @end @implementation GRPCProtoService From 113cdb4fc3a9c35f5493fd3a5ba53814a6470b9b Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Mon, 20 Jun 2016 17:08:29 -0700 Subject: [PATCH 1197/1894] Fixed gpr_log format issues in linux_x86_default_bo --- test/core/end2end/bad_server_response_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/end2end/bad_server_response_test.c b/test/core/end2end/bad_server_response_test.c index c2882b62434..4a2355b5f6d 100644 --- a/test/core/end2end/bad_server_response_test.c +++ b/test/core/end2end/bad_server_response_test.c @@ -124,7 +124,7 @@ static void handle_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { } gpr_log(GPR_DEBUG, - "got %" PRIuPTR " bytes, http2 connect string is %" PRIuMAX " bytes", + "got %" PRIuPTR " bytes, http2 connect string is %" PRIuPTR " bytes", state.incoming_data_length, GRPC_CHTTP2_CLIENT_CONNECT_STRLEN); if (state.incoming_data_length > GRPC_CHTTP2_CLIENT_CONNECT_STRLEN) { handle_write(exec_ctx); From bbe601ab7ca1ba763f95415fbcd391947987341a Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 20 Jun 2016 17:49:34 -0700 Subject: [PATCH 1198/1894] add a hack --- tools/run_tests/build_csharp_coreclr.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/run_tests/build_csharp_coreclr.sh b/tools/run_tests/build_csharp_coreclr.sh index 733b1a2083c..68c19cb6c9d 100755 --- a/tools/run_tests/build_csharp_coreclr.sh +++ b/tools/run_tests/build_csharp_coreclr.sh @@ -36,3 +36,7 @@ cd $(dirname $0)/../../src/csharp dotnet restore . dotnet build -f netstandard1.5 --configuration $MSBUILD_CONFIG '**/project.json' + +# Grpc.IntegrationTesting doesn't get built by the previous command for some reason. +# TODO(jtattermusch): get rid of the hack +dotnet build -f netstandard1.5 --configuration $MSBUILD_CONFIG Grpc.IntegrationTesting/project.json From 64c137c4f5e23e898d5fbc6306b191daaf147ec0 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Mon, 20 Jun 2016 17:54:19 -0700 Subject: [PATCH 1199/1894] select runtime dir --- tools/run_tests/run_tests.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 3cb0be579da..c5cf0135f73 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -526,10 +526,11 @@ class CSharpLanguage(object): assembly_extension = '.exe' if self.args.compiler == 'coreclr': - # TODO(jtattermusch): make the runtime string platform-specific - #assembly_subdir += '/netstandard1.5/debian.8-x64' - #assembly_extension = '' - assembly_subdir += '/netstandard1.5/win7-x64' + if self.platform == 'linux': + assembly_subdir += '/netstandard1.5/debian.8-x64' + assembly_extension = '' + else: + assembly_subdir += '/netstandard1.5/win7-x64' runtime_cmd = [] else: nunit_args += ['--noresult', '--workers=1'] From 74ea91d55229a654d0987d2f39cddf8514926f14 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Mon, 20 Jun 2016 18:19:41 -0700 Subject: [PATCH 1200/1894] use qps_json_driver for latency profiling --- .../latency_profile/run_latency_profile.sh | 94 ++++++++++++------- 1 file changed, 58 insertions(+), 36 deletions(-) diff --git a/tools/profiling/latency_profile/run_latency_profile.sh b/tools/profiling/latency_profile/run_latency_profile.sh index 54a25a9cb73..40c6fcb4314 100755 --- a/tools/profiling/latency_profile/run_latency_profile.sh +++ b/tools/profiling/latency_profile/run_latency_profile.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2015, Google Inc. +# Copyright 2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -28,17 +28,61 @@ # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# format argument via +# $ echo '{...}' | python -mjson.tool +read -r -d '' SCENARIOS_JSON_ARG <<'EOF' +{ + "scenarios": [ + { + "benchmark_seconds": 5, + "client_config": { + "client_channels": 1, + "client_type": "SYNC_CLIENT", + "histogram_params": { + "max_possible": 60000000000.0, + "resolution": 0.01 + }, + "load_params": { + "closed_loop": {} + }, + "outstanding_rpcs_per_channel": 1, + "payload_config": { + "simple_params": { + "req_size": 0, + "resp_size": 0 + } + }, + "rpc_type": "UNARY", + "security_params": { + "server_host_override": "foo.test.google.fr", + "use_test_ca": true + } + }, + "name": "cpp_protobuf_sync_unary_ping_pong_secure", + "num_clients": 1, + "num_servers": 1, + "server_config": { + "core_limit": 1, + "security_params": { + "server_host_override": "foo.test.google.fr", + "use_test_ca": true + }, + "server_type": "SYNC_SERVER" + }, + "spawn_local_worker_count": 2, + "warmup_seconds": 5 + } + ] +} + +EOF + set -ex cd $(dirname $0)/../../.. -BINS="sync_unary_ping_pong_test sync_streaming_ping_pong_test" CPUS=`python -c 'import multiprocessing; print multiprocessing.cpu_count()'` -make CONFIG=basicprof -j$CPUS $BINS - -mkdir -p reports - # try to use pypy for generating reports # each trace dumps 7-8gig of text to disk, and processing this into a report is # heavyweight - so any speed boost is worthwhile @@ -49,35 +93,13 @@ else PYTHON=python2.7 fi -# start processes, interleaving report index generation +make CONFIG=basicprof -j$CPUS qps_json_driver + +mkdir -p reports echo '' > reports/index.html -for bin in $BINS -do - bins/basicprof/$bin - mv latency_trace.txt $bin.trace - echo "$bin
" >> reports/index.html -done -pids="" -# generate report pages... this will take some time -# run them in parallel: they take 1 cpu each -for bin in $BINS -do - $PYTHON tools/profiling/latency_profile/profile_analyzer.py \ - --source=$bin.trace --fmt=simple > reports/$bin.txt & - pids+=" $!" -done +bins/basicprof/qps_json_driver --scenarios_json="$SCENARIOS_JSON_ARG" +echo '
' >> reports/index.html
+$PYTHON tools/profiling/latency_profile/profile_analyzer.py \
+    --source=latency_trace.txt --fmt=simple >> reports/index.html
+echo '
' >> reports/index.html echo '' >> reports/index.html - -# make sure we kill the report generation if something goes wrong -trap "kill $pids || true" 0 - -# finally, wait for the background report generation to finish -for pid in $pids -do - if wait $pid - then - echo "Finished $pid" - else - exit 1 - fi -done From ea74f915771c0665daea12004f99cc50a11cbfbd Mon Sep 17 00:00:00 2001 From: Tamas Berghammer Date: Tue, 21 Jun 2016 13:27:58 +0100 Subject: [PATCH 1201/1894] Remove an unneccessary dependency from grpc++_base Previously grpc++_base was dependning on grpc what caused a transitive dependency on ssl for grpc++_unsecure. Removing the grpc dependency shouldn't cause any issue as grpc++_base is a filegroup and all library using it already depends on grpc directly. This fixes https://github.com/grpc/grpc/issues/6784 --- BUILD | 1 - Makefile | 10 +++++----- build.yaml | 2 -- tools/run_tests/sources_and_headers.json | 2 -- vsprojects/grpc.sln | 1 - .../vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj | 3 --- 6 files changed, 5 insertions(+), 14 deletions(-) diff --git a/BUILD b/BUILD index ac0eb8e403d..1627f7233f8 100644 --- a/BUILD +++ b/BUILD @@ -1594,7 +1594,6 @@ cc_library( "//external:protobuf_clib", ":gpr", ":grpc_unsecure", - ":grpc", ], ) diff --git a/Makefile b/Makefile index d93ce337632..ca642429519 100644 --- a/Makefile +++ b/Makefile @@ -4101,18 +4101,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/gpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/grpc_unsecure.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/grpc.$(SHARED_EXT) +$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/gpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/grpc_unsecure.$(SHARED_EXT) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr-imp -lgrpc_unsecure-imp -lgrpc-imp + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr-imp -lgrpc_unsecure-imp else -$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT) +$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure -lgrpc + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_unsecure.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure -lgrpc + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_unsecure.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).so endif diff --git a/build.yaml b/build.yaml index d41f4195947..59f7d19dfcc 100644 --- a/build.yaml +++ b/build.yaml @@ -714,8 +714,6 @@ filegroups: - src/cpp/util/status.cc - src/cpp/util/string_ref.cc - src/cpp/util/time.cc - deps: - - grpc uses: - grpc++_codegen_base - name: grpc++_codegen_base diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 57e3bd63f42..4cfd1c51f8f 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4447,7 +4447,6 @@ { "deps": [ "gpr", - "grpc", "grpc++_base", "grpc++_codegen_base", "grpc++_codegen_base_src", @@ -6509,7 +6508,6 @@ }, { "deps": [ - "grpc", "grpc++_codegen_base" ], "headers": [ diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln index a43daaf294c..771fefc56bd 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -66,7 +66,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_unsecure", "vcxproj\ ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_create_jwt", "vcxproj\.\grpc_create_jwt\grpc_create_jwt.vcxproj", "{77971F8D-F583-3E77-0E3C-6C1FB6B1749C}" diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index 03be485b297..f37fefc65a4 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -427,9 +427,6 @@ {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - From d798a7d80e80ad1e57b08baec81b860c7f136c47 Mon Sep 17 00:00:00 2001 From: Tamas Berghammer Date: Tue, 21 Jun 2016 13:58:18 +0100 Subject: [PATCH 1202/1894] Generate a simple cmake build file This cmake file only builds the C and C++ code and all the third party dependencies with very few configuration options but it supports building on Linux and OSX as well as cross compiling. (tested {Linux, OSX} -> Android { arm, aarch64, x86 }) --- CMakeLists.txt | 950 ++++++++++++++++++++++++++++++ templates/CMakeLists.txt.template | 133 +++++ 2 files changed, 1083 insertions(+) create mode 100644 CMakeLists.txt create mode 100644 templates/CMakeLists.txt.template diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 00000000000..5bd48b78ea9 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,950 @@ +# GRPC global cmake file +# This currently builds C and C++ code. +# This file has been automatically generated from a template file. +# Please look at the templates directory instead. +# This file can be regenerated from the template by running +# tools/buildgen/generate_projects.sh + +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + + +cmake_minimum_required(VERSION 2.8) + +if (NOT BORINGSSL_ROOT_DIR) + set(BORINGSSL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/boringssl) +endif() +if (NOT PROTOBUF_ROOT_DIR) + set(PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/protobuf) +endif() +if (NOT ZLIB_ROOT_DIR) + set(ZLIB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zlib) +endif() + +add_subdirectory(${BORINGSSL_ROOT_DIR} third_party/boringssl) +add_subdirectory(${PROTOBUF_ROOT_DIR}/cmake third_party/protobuf) +add_subdirectory(${ZLIB_ROOT_DIR} third_party/zlib) + +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11") +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") + + +add_library(gpr + src/core/lib/profiling/basic_timers.c + src/core/lib/profiling/stap_timers.c + src/core/lib/support/alloc.c + src/core/lib/support/avl.c + src/core/lib/support/backoff.c + src/core/lib/support/cmdline.c + src/core/lib/support/cpu_iphone.c + src/core/lib/support/cpu_linux.c + src/core/lib/support/cpu_posix.c + src/core/lib/support/cpu_windows.c + src/core/lib/support/env_linux.c + src/core/lib/support/env_posix.c + src/core/lib/support/env_windows.c + src/core/lib/support/histogram.c + src/core/lib/support/host_port.c + src/core/lib/support/log.c + src/core/lib/support/log_android.c + src/core/lib/support/log_linux.c + src/core/lib/support/log_posix.c + src/core/lib/support/log_windows.c + src/core/lib/support/murmur_hash.c + src/core/lib/support/slice.c + src/core/lib/support/slice_buffer.c + src/core/lib/support/stack_lockfree.c + src/core/lib/support/string.c + src/core/lib/support/string_posix.c + src/core/lib/support/string_util_windows.c + src/core/lib/support/string_windows.c + src/core/lib/support/subprocess_posix.c + src/core/lib/support/subprocess_windows.c + src/core/lib/support/sync.c + src/core/lib/support/sync_posix.c + src/core/lib/support/sync_windows.c + src/core/lib/support/thd.c + src/core/lib/support/thd_posix.c + src/core/lib/support/thd_windows.c + src/core/lib/support/time.c + src/core/lib/support/time_posix.c + src/core/lib/support/time_precise.c + src/core/lib/support/time_windows.c + src/core/lib/support/tls_pthread.c + src/core/lib/support/tmpfile_msys.c + src/core/lib/support/tmpfile_posix.c + src/core/lib/support/tmpfile_windows.c + src/core/lib/support/wrap_memcpy.c +) + +target_include_directories(gpr + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + + + +add_library(grpc + src/core/lib/surface/init.c + src/core/lib/channel/channel_args.c + src/core/lib/channel/channel_stack.c + src/core/lib/channel/channel_stack_builder.c + src/core/lib/channel/compress_filter.c + src/core/lib/channel/connected_channel.c + src/core/lib/channel/http_client_filter.c + src/core/lib/channel/http_server_filter.c + src/core/lib/compression/compression.c + src/core/lib/compression/message_compress.c + src/core/lib/debug/trace.c + src/core/lib/http/format_request.c + src/core/lib/http/httpcli.c + src/core/lib/http/parser.c + src/core/lib/iomgr/closure.c + src/core/lib/iomgr/endpoint.c + src/core/lib/iomgr/endpoint_pair_posix.c + src/core/lib/iomgr/endpoint_pair_windows.c + src/core/lib/iomgr/error.c + src/core/lib/iomgr/ev_poll_and_epoll_posix.c + src/core/lib/iomgr/ev_poll_posix.c + src/core/lib/iomgr/ev_posix.c + src/core/lib/iomgr/exec_ctx.c + src/core/lib/iomgr/executor.c + src/core/lib/iomgr/iocp_windows.c + src/core/lib/iomgr/iomgr.c + src/core/lib/iomgr/iomgr_posix.c + src/core/lib/iomgr/iomgr_windows.c + src/core/lib/iomgr/load_file.c + src/core/lib/iomgr/polling_entity.c + src/core/lib/iomgr/pollset_set_windows.c + src/core/lib/iomgr/pollset_windows.c + src/core/lib/iomgr/resolve_address_posix.c + src/core/lib/iomgr/resolve_address_windows.c + src/core/lib/iomgr/sockaddr_utils.c + src/core/lib/iomgr/socket_utils_common_posix.c + src/core/lib/iomgr/socket_utils_linux.c + src/core/lib/iomgr/socket_utils_posix.c + src/core/lib/iomgr/socket_windows.c + src/core/lib/iomgr/tcp_client_posix.c + src/core/lib/iomgr/tcp_client_windows.c + src/core/lib/iomgr/tcp_posix.c + src/core/lib/iomgr/tcp_server_posix.c + src/core/lib/iomgr/tcp_server_windows.c + src/core/lib/iomgr/tcp_windows.c + src/core/lib/iomgr/time_averaged_stats.c + src/core/lib/iomgr/timer.c + src/core/lib/iomgr/timer_heap.c + src/core/lib/iomgr/udp_server.c + src/core/lib/iomgr/unix_sockets_posix.c + src/core/lib/iomgr/unix_sockets_posix_noop.c + src/core/lib/iomgr/wakeup_fd_eventfd.c + src/core/lib/iomgr/wakeup_fd_nospecial.c + src/core/lib/iomgr/wakeup_fd_pipe.c + src/core/lib/iomgr/wakeup_fd_posix.c + src/core/lib/iomgr/workqueue_posix.c + src/core/lib/iomgr/workqueue_windows.c + src/core/lib/json/json.c + src/core/lib/json/json_reader.c + src/core/lib/json/json_string.c + src/core/lib/json/json_writer.c + src/core/lib/surface/alarm.c + src/core/lib/surface/api_trace.c + src/core/lib/surface/byte_buffer.c + src/core/lib/surface/byte_buffer_reader.c + src/core/lib/surface/call.c + src/core/lib/surface/call_details.c + src/core/lib/surface/call_log_batch.c + src/core/lib/surface/channel.c + src/core/lib/surface/channel_init.c + src/core/lib/surface/channel_ping.c + src/core/lib/surface/channel_stack_type.c + src/core/lib/surface/completion_queue.c + src/core/lib/surface/event_string.c + src/core/lib/surface/lame_client.c + src/core/lib/surface/metadata_array.c + src/core/lib/surface/server.c + src/core/lib/surface/validate_metadata.c + src/core/lib/surface/version.c + src/core/lib/transport/byte_stream.c + src/core/lib/transport/connectivity_state.c + src/core/lib/transport/metadata.c + src/core/lib/transport/metadata_batch.c + src/core/lib/transport/static_metadata.c + src/core/lib/transport/transport.c + src/core/lib/transport/transport_op_string.c + src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c + src/core/ext/transport/chttp2/transport/bin_decoder.c + src/core/ext/transport/chttp2/transport/bin_encoder.c + src/core/ext/transport/chttp2/transport/chttp2_plugin.c + src/core/ext/transport/chttp2/transport/chttp2_transport.c + src/core/ext/transport/chttp2/transport/frame_data.c + src/core/ext/transport/chttp2/transport/frame_goaway.c + src/core/ext/transport/chttp2/transport/frame_ping.c + src/core/ext/transport/chttp2/transport/frame_rst_stream.c + src/core/ext/transport/chttp2/transport/frame_settings.c + src/core/ext/transport/chttp2/transport/frame_window_update.c + src/core/ext/transport/chttp2/transport/hpack_encoder.c + src/core/ext/transport/chttp2/transport/hpack_parser.c + src/core/ext/transport/chttp2/transport/hpack_table.c + src/core/ext/transport/chttp2/transport/huffsyms.c + src/core/ext/transport/chttp2/transport/incoming_metadata.c + src/core/ext/transport/chttp2/transport/parsing.c + src/core/ext/transport/chttp2/transport/status_conversion.c + src/core/ext/transport/chttp2/transport/stream_lists.c + src/core/ext/transport/chttp2/transport/stream_map.c + src/core/ext/transport/chttp2/transport/timeout_encoding.c + src/core/ext/transport/chttp2/transport/varint.c + src/core/ext/transport/chttp2/transport/writing.c + src/core/ext/transport/chttp2/alpn/alpn.c + src/core/lib/http/httpcli_security_connector.c + src/core/lib/security/context/security_context.c + src/core/lib/security/credentials/composite/composite_credentials.c + src/core/lib/security/credentials/credentials.c + src/core/lib/security/credentials/credentials_metadata.c + src/core/lib/security/credentials/fake/fake_credentials.c + src/core/lib/security/credentials/google_default/credentials_posix.c + src/core/lib/security/credentials/google_default/credentials_windows.c + src/core/lib/security/credentials/google_default/google_default_credentials.c + src/core/lib/security/credentials/iam/iam_credentials.c + src/core/lib/security/credentials/jwt/json_token.c + src/core/lib/security/credentials/jwt/jwt_credentials.c + src/core/lib/security/credentials/jwt/jwt_verifier.c + src/core/lib/security/credentials/oauth2/oauth2_credentials.c + src/core/lib/security/credentials/plugin/plugin_credentials.c + src/core/lib/security/credentials/ssl/ssl_credentials.c + src/core/lib/security/transport/client_auth_filter.c + src/core/lib/security/transport/handshake.c + src/core/lib/security/transport/secure_endpoint.c + src/core/lib/security/transport/security_connector.c + src/core/lib/security/transport/server_auth_filter.c + src/core/lib/security/transport/tsi_error.c + src/core/lib/security/util/b64.c + src/core/lib/security/util/json_util.c + src/core/lib/surface/init_secure.c + src/core/lib/tsi/fake_transport_security.c + src/core/lib/tsi/ssl_transport_security.c + src/core/lib/tsi/transport_security.c + src/core/ext/transport/chttp2/client/secure/secure_channel_create.c + src/core/ext/client_config/channel_connectivity.c + src/core/ext/client_config/client_channel.c + src/core/ext/client_config/client_channel_factory.c + src/core/ext/client_config/client_config.c + src/core/ext/client_config/client_config_plugin.c + src/core/ext/client_config/connector.c + src/core/ext/client_config/default_initial_connect_string.c + src/core/ext/client_config/initial_connect_string.c + src/core/ext/client_config/lb_policy.c + src/core/ext/client_config/lb_policy_factory.c + src/core/ext/client_config/lb_policy_registry.c + src/core/ext/client_config/parse_address.c + src/core/ext/client_config/resolver.c + src/core/ext/client_config/resolver_factory.c + src/core/ext/client_config/resolver_registry.c + src/core/ext/client_config/subchannel.c + src/core/ext/client_config/subchannel_call_holder.c + src/core/ext/client_config/subchannel_index.c + src/core/ext/client_config/uri_parser.c + src/core/ext/transport/chttp2/server/insecure/server_chttp2.c + src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c + src/core/ext/transport/chttp2/client/insecure/channel_create.c + src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c + src/core/ext/lb_policy/grpclb/load_balancer_api.c + src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c + third_party/nanopb/pb_common.c + third_party/nanopb/pb_decode.c + third_party/nanopb/pb_encode.c + src/core/ext/lb_policy/pick_first/pick_first.c + src/core/ext/lb_policy/round_robin/round_robin.c + src/core/ext/resolver/dns/native/dns_resolver.c + src/core/ext/resolver/sockaddr/sockaddr_resolver.c + src/core/ext/load_reporting/load_reporting.c + src/core/ext/load_reporting/load_reporting_filter.c + src/core/ext/census/context.c + src/core/ext/census/gen/census.pb.c + src/core/ext/census/grpc_context.c + src/core/ext/census/grpc_filter.c + src/core/ext/census/grpc_plugin.c + src/core/ext/census/initialize.c + src/core/ext/census/mlog.c + src/core/ext/census/operation.c + src/core/ext/census/placeholders.c + src/core/ext/census/tracing.c + src/core/plugin_registry/grpc_plugin_registry.c +) + +target_include_directories(grpc + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + +target_link_libraries(grpc + ssl + gpr +) + + +add_library(grpc_cronet + src/core/lib/surface/init.c + src/core/lib/channel/channel_args.c + src/core/lib/channel/channel_stack.c + src/core/lib/channel/channel_stack_builder.c + src/core/lib/channel/compress_filter.c + src/core/lib/channel/connected_channel.c + src/core/lib/channel/http_client_filter.c + src/core/lib/channel/http_server_filter.c + src/core/lib/compression/compression.c + src/core/lib/compression/message_compress.c + src/core/lib/debug/trace.c + src/core/lib/http/format_request.c + src/core/lib/http/httpcli.c + src/core/lib/http/parser.c + src/core/lib/iomgr/closure.c + src/core/lib/iomgr/endpoint.c + src/core/lib/iomgr/endpoint_pair_posix.c + src/core/lib/iomgr/endpoint_pair_windows.c + src/core/lib/iomgr/error.c + src/core/lib/iomgr/ev_poll_and_epoll_posix.c + src/core/lib/iomgr/ev_poll_posix.c + src/core/lib/iomgr/ev_posix.c + src/core/lib/iomgr/exec_ctx.c + src/core/lib/iomgr/executor.c + src/core/lib/iomgr/iocp_windows.c + src/core/lib/iomgr/iomgr.c + src/core/lib/iomgr/iomgr_posix.c + src/core/lib/iomgr/iomgr_windows.c + src/core/lib/iomgr/load_file.c + src/core/lib/iomgr/polling_entity.c + src/core/lib/iomgr/pollset_set_windows.c + src/core/lib/iomgr/pollset_windows.c + src/core/lib/iomgr/resolve_address_posix.c + src/core/lib/iomgr/resolve_address_windows.c + src/core/lib/iomgr/sockaddr_utils.c + src/core/lib/iomgr/socket_utils_common_posix.c + src/core/lib/iomgr/socket_utils_linux.c + src/core/lib/iomgr/socket_utils_posix.c + src/core/lib/iomgr/socket_windows.c + src/core/lib/iomgr/tcp_client_posix.c + src/core/lib/iomgr/tcp_client_windows.c + src/core/lib/iomgr/tcp_posix.c + src/core/lib/iomgr/tcp_server_posix.c + src/core/lib/iomgr/tcp_server_windows.c + src/core/lib/iomgr/tcp_windows.c + src/core/lib/iomgr/time_averaged_stats.c + src/core/lib/iomgr/timer.c + src/core/lib/iomgr/timer_heap.c + src/core/lib/iomgr/udp_server.c + src/core/lib/iomgr/unix_sockets_posix.c + src/core/lib/iomgr/unix_sockets_posix_noop.c + src/core/lib/iomgr/wakeup_fd_eventfd.c + src/core/lib/iomgr/wakeup_fd_nospecial.c + src/core/lib/iomgr/wakeup_fd_pipe.c + src/core/lib/iomgr/wakeup_fd_posix.c + src/core/lib/iomgr/workqueue_posix.c + src/core/lib/iomgr/workqueue_windows.c + src/core/lib/json/json.c + src/core/lib/json/json_reader.c + src/core/lib/json/json_string.c + src/core/lib/json/json_writer.c + src/core/lib/surface/alarm.c + src/core/lib/surface/api_trace.c + src/core/lib/surface/byte_buffer.c + src/core/lib/surface/byte_buffer_reader.c + src/core/lib/surface/call.c + src/core/lib/surface/call_details.c + src/core/lib/surface/call_log_batch.c + src/core/lib/surface/channel.c + src/core/lib/surface/channel_init.c + src/core/lib/surface/channel_ping.c + src/core/lib/surface/channel_stack_type.c + src/core/lib/surface/completion_queue.c + src/core/lib/surface/event_string.c + src/core/lib/surface/lame_client.c + src/core/lib/surface/metadata_array.c + src/core/lib/surface/server.c + src/core/lib/surface/validate_metadata.c + src/core/lib/surface/version.c + src/core/lib/transport/byte_stream.c + src/core/lib/transport/connectivity_state.c + src/core/lib/transport/metadata.c + src/core/lib/transport/metadata_batch.c + src/core/lib/transport/static_metadata.c + src/core/lib/transport/transport.c + src/core/lib/transport/transport_op_string.c + src/core/ext/transport/cronet/client/secure/cronet_channel_create.c + src/core/ext/transport/cronet/transport/cronet_api_dummy.c + src/core/ext/transport/cronet/transport/cronet_transport.c + src/core/ext/transport/chttp2/client/secure/secure_channel_create.c + src/core/ext/transport/chttp2/transport/bin_decoder.c + src/core/ext/transport/chttp2/transport/bin_encoder.c + src/core/ext/transport/chttp2/transport/chttp2_plugin.c + src/core/ext/transport/chttp2/transport/chttp2_transport.c + src/core/ext/transport/chttp2/transport/frame_data.c + src/core/ext/transport/chttp2/transport/frame_goaway.c + src/core/ext/transport/chttp2/transport/frame_ping.c + src/core/ext/transport/chttp2/transport/frame_rst_stream.c + src/core/ext/transport/chttp2/transport/frame_settings.c + src/core/ext/transport/chttp2/transport/frame_window_update.c + src/core/ext/transport/chttp2/transport/hpack_encoder.c + src/core/ext/transport/chttp2/transport/hpack_parser.c + src/core/ext/transport/chttp2/transport/hpack_table.c + src/core/ext/transport/chttp2/transport/huffsyms.c + src/core/ext/transport/chttp2/transport/incoming_metadata.c + src/core/ext/transport/chttp2/transport/parsing.c + src/core/ext/transport/chttp2/transport/status_conversion.c + src/core/ext/transport/chttp2/transport/stream_lists.c + src/core/ext/transport/chttp2/transport/stream_map.c + src/core/ext/transport/chttp2/transport/timeout_encoding.c + src/core/ext/transport/chttp2/transport/varint.c + src/core/ext/transport/chttp2/transport/writing.c + src/core/ext/transport/chttp2/alpn/alpn.c + src/core/ext/client_config/channel_connectivity.c + src/core/ext/client_config/client_channel.c + src/core/ext/client_config/client_channel_factory.c + src/core/ext/client_config/client_config.c + src/core/ext/client_config/client_config_plugin.c + src/core/ext/client_config/connector.c + src/core/ext/client_config/default_initial_connect_string.c + src/core/ext/client_config/initial_connect_string.c + src/core/ext/client_config/lb_policy.c + src/core/ext/client_config/lb_policy_factory.c + src/core/ext/client_config/lb_policy_registry.c + src/core/ext/client_config/parse_address.c + src/core/ext/client_config/resolver.c + src/core/ext/client_config/resolver_factory.c + src/core/ext/client_config/resolver_registry.c + src/core/ext/client_config/subchannel.c + src/core/ext/client_config/subchannel_call_holder.c + src/core/ext/client_config/subchannel_index.c + src/core/ext/client_config/uri_parser.c + src/core/lib/http/httpcli_security_connector.c + src/core/lib/security/context/security_context.c + src/core/lib/security/credentials/composite/composite_credentials.c + src/core/lib/security/credentials/credentials.c + src/core/lib/security/credentials/credentials_metadata.c + src/core/lib/security/credentials/fake/fake_credentials.c + src/core/lib/security/credentials/google_default/credentials_posix.c + src/core/lib/security/credentials/google_default/credentials_windows.c + src/core/lib/security/credentials/google_default/google_default_credentials.c + src/core/lib/security/credentials/iam/iam_credentials.c + src/core/lib/security/credentials/jwt/json_token.c + src/core/lib/security/credentials/jwt/jwt_credentials.c + src/core/lib/security/credentials/jwt/jwt_verifier.c + src/core/lib/security/credentials/oauth2/oauth2_credentials.c + src/core/lib/security/credentials/plugin/plugin_credentials.c + src/core/lib/security/credentials/ssl/ssl_credentials.c + src/core/lib/security/transport/client_auth_filter.c + src/core/lib/security/transport/handshake.c + src/core/lib/security/transport/secure_endpoint.c + src/core/lib/security/transport/security_connector.c + src/core/lib/security/transport/server_auth_filter.c + src/core/lib/security/transport/tsi_error.c + src/core/lib/security/util/b64.c + src/core/lib/security/util/json_util.c + src/core/lib/surface/init_secure.c + src/core/lib/tsi/fake_transport_security.c + src/core/lib/tsi/ssl_transport_security.c + src/core/lib/tsi/transport_security.c + src/core/plugin_registry/grpc_cronet_plugin_registry.c +) + +target_include_directories(grpc_cronet + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + +target_link_libraries(grpc_cronet + ssl + gpr +) + + +add_library(grpc_unsecure + src/core/lib/surface/init.c + src/core/lib/surface/init_unsecure.c + src/core/lib/channel/channel_args.c + src/core/lib/channel/channel_stack.c + src/core/lib/channel/channel_stack_builder.c + src/core/lib/channel/compress_filter.c + src/core/lib/channel/connected_channel.c + src/core/lib/channel/http_client_filter.c + src/core/lib/channel/http_server_filter.c + src/core/lib/compression/compression.c + src/core/lib/compression/message_compress.c + src/core/lib/debug/trace.c + src/core/lib/http/format_request.c + src/core/lib/http/httpcli.c + src/core/lib/http/parser.c + src/core/lib/iomgr/closure.c + src/core/lib/iomgr/endpoint.c + src/core/lib/iomgr/endpoint_pair_posix.c + src/core/lib/iomgr/endpoint_pair_windows.c + src/core/lib/iomgr/error.c + src/core/lib/iomgr/ev_poll_and_epoll_posix.c + src/core/lib/iomgr/ev_poll_posix.c + src/core/lib/iomgr/ev_posix.c + src/core/lib/iomgr/exec_ctx.c + src/core/lib/iomgr/executor.c + src/core/lib/iomgr/iocp_windows.c + src/core/lib/iomgr/iomgr.c + src/core/lib/iomgr/iomgr_posix.c + src/core/lib/iomgr/iomgr_windows.c + src/core/lib/iomgr/load_file.c + src/core/lib/iomgr/polling_entity.c + src/core/lib/iomgr/pollset_set_windows.c + src/core/lib/iomgr/pollset_windows.c + src/core/lib/iomgr/resolve_address_posix.c + src/core/lib/iomgr/resolve_address_windows.c + src/core/lib/iomgr/sockaddr_utils.c + src/core/lib/iomgr/socket_utils_common_posix.c + src/core/lib/iomgr/socket_utils_linux.c + src/core/lib/iomgr/socket_utils_posix.c + src/core/lib/iomgr/socket_windows.c + src/core/lib/iomgr/tcp_client_posix.c + src/core/lib/iomgr/tcp_client_windows.c + src/core/lib/iomgr/tcp_posix.c + src/core/lib/iomgr/tcp_server_posix.c + src/core/lib/iomgr/tcp_server_windows.c + src/core/lib/iomgr/tcp_windows.c + src/core/lib/iomgr/time_averaged_stats.c + src/core/lib/iomgr/timer.c + src/core/lib/iomgr/timer_heap.c + src/core/lib/iomgr/udp_server.c + src/core/lib/iomgr/unix_sockets_posix.c + src/core/lib/iomgr/unix_sockets_posix_noop.c + src/core/lib/iomgr/wakeup_fd_eventfd.c + src/core/lib/iomgr/wakeup_fd_nospecial.c + src/core/lib/iomgr/wakeup_fd_pipe.c + src/core/lib/iomgr/wakeup_fd_posix.c + src/core/lib/iomgr/workqueue_posix.c + src/core/lib/iomgr/workqueue_windows.c + src/core/lib/json/json.c + src/core/lib/json/json_reader.c + src/core/lib/json/json_string.c + src/core/lib/json/json_writer.c + src/core/lib/surface/alarm.c + src/core/lib/surface/api_trace.c + src/core/lib/surface/byte_buffer.c + src/core/lib/surface/byte_buffer_reader.c + src/core/lib/surface/call.c + src/core/lib/surface/call_details.c + src/core/lib/surface/call_log_batch.c + src/core/lib/surface/channel.c + src/core/lib/surface/channel_init.c + src/core/lib/surface/channel_ping.c + src/core/lib/surface/channel_stack_type.c + src/core/lib/surface/completion_queue.c + src/core/lib/surface/event_string.c + src/core/lib/surface/lame_client.c + src/core/lib/surface/metadata_array.c + src/core/lib/surface/server.c + src/core/lib/surface/validate_metadata.c + src/core/lib/surface/version.c + src/core/lib/transport/byte_stream.c + src/core/lib/transport/connectivity_state.c + src/core/lib/transport/metadata.c + src/core/lib/transport/metadata_batch.c + src/core/lib/transport/static_metadata.c + src/core/lib/transport/transport.c + src/core/lib/transport/transport_op_string.c + src/core/ext/transport/chttp2/server/insecure/server_chttp2.c + src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c + src/core/ext/transport/chttp2/transport/bin_decoder.c + src/core/ext/transport/chttp2/transport/bin_encoder.c + src/core/ext/transport/chttp2/transport/chttp2_plugin.c + src/core/ext/transport/chttp2/transport/chttp2_transport.c + src/core/ext/transport/chttp2/transport/frame_data.c + src/core/ext/transport/chttp2/transport/frame_goaway.c + src/core/ext/transport/chttp2/transport/frame_ping.c + src/core/ext/transport/chttp2/transport/frame_rst_stream.c + src/core/ext/transport/chttp2/transport/frame_settings.c + src/core/ext/transport/chttp2/transport/frame_window_update.c + src/core/ext/transport/chttp2/transport/hpack_encoder.c + src/core/ext/transport/chttp2/transport/hpack_parser.c + src/core/ext/transport/chttp2/transport/hpack_table.c + src/core/ext/transport/chttp2/transport/huffsyms.c + src/core/ext/transport/chttp2/transport/incoming_metadata.c + src/core/ext/transport/chttp2/transport/parsing.c + src/core/ext/transport/chttp2/transport/status_conversion.c + src/core/ext/transport/chttp2/transport/stream_lists.c + src/core/ext/transport/chttp2/transport/stream_map.c + src/core/ext/transport/chttp2/transport/timeout_encoding.c + src/core/ext/transport/chttp2/transport/varint.c + src/core/ext/transport/chttp2/transport/writing.c + src/core/ext/transport/chttp2/alpn/alpn.c + src/core/ext/transport/chttp2/client/insecure/channel_create.c + src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c + src/core/ext/client_config/channel_connectivity.c + src/core/ext/client_config/client_channel.c + src/core/ext/client_config/client_channel_factory.c + src/core/ext/client_config/client_config.c + src/core/ext/client_config/client_config_plugin.c + src/core/ext/client_config/connector.c + src/core/ext/client_config/default_initial_connect_string.c + src/core/ext/client_config/initial_connect_string.c + src/core/ext/client_config/lb_policy.c + src/core/ext/client_config/lb_policy_factory.c + src/core/ext/client_config/lb_policy_registry.c + src/core/ext/client_config/parse_address.c + src/core/ext/client_config/resolver.c + src/core/ext/client_config/resolver_factory.c + src/core/ext/client_config/resolver_registry.c + src/core/ext/client_config/subchannel.c + src/core/ext/client_config/subchannel_call_holder.c + src/core/ext/client_config/subchannel_index.c + src/core/ext/client_config/uri_parser.c + src/core/ext/resolver/dns/native/dns_resolver.c + src/core/ext/resolver/sockaddr/sockaddr_resolver.c + src/core/ext/load_reporting/load_reporting.c + src/core/ext/load_reporting/load_reporting_filter.c + src/core/ext/lb_policy/grpclb/load_balancer_api.c + src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c + third_party/nanopb/pb_common.c + third_party/nanopb/pb_decode.c + third_party/nanopb/pb_encode.c + src/core/ext/lb_policy/pick_first/pick_first.c + src/core/ext/lb_policy/round_robin/round_robin.c + src/core/ext/census/context.c + src/core/ext/census/gen/census.pb.c + src/core/ext/census/grpc_context.c + src/core/ext/census/grpc_filter.c + src/core/ext/census/grpc_plugin.c + src/core/ext/census/initialize.c + src/core/ext/census/mlog.c + src/core/ext/census/operation.c + src/core/ext/census/placeholders.c + src/core/ext/census/tracing.c + src/core/plugin_registry/grpc_unsecure_plugin_registry.c +) + +target_include_directories(grpc_unsecure + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + +target_link_libraries(grpc_unsecure + gpr +) + + +add_library(grpc++ + src/cpp/client/secure_credentials.cc + src/cpp/common/auth_property_iterator.cc + src/cpp/common/secure_auth_context.cc + src/cpp/common/secure_channel_arguments.cc + src/cpp/common/secure_create_auth_context.cc + src/cpp/server/secure_server_credentials.cc + src/cpp/client/channel.cc + src/cpp/client/client_context.cc + src/cpp/client/create_channel.cc + src/cpp/client/create_channel_internal.cc + src/cpp/client/create_channel_posix.cc + src/cpp/client/credentials.cc + src/cpp/client/generic_stub.cc + src/cpp/client/insecure_credentials.cc + src/cpp/common/channel_arguments.cc + src/cpp/common/completion_queue.cc + src/cpp/common/core_codegen.cc + src/cpp/common/rpc_method.cc + src/cpp/server/async_generic_service.cc + src/cpp/server/create_default_thread_pool.cc + src/cpp/server/dynamic_thread_pool.cc + src/cpp/server/insecure_server_credentials.cc + src/cpp/server/server.cc + src/cpp/server/server_builder.cc + src/cpp/server/server_context.cc + src/cpp/server/server_credentials.cc + src/cpp/server/server_posix.cc + src/cpp/util/byte_buffer.cc + src/cpp/util/slice.cc + src/cpp/util/status.cc + src/cpp/util/string_ref.cc + src/cpp/util/time.cc + src/cpp/codegen/codegen_init.cc +) + +target_include_directories(grpc++ + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + +target_link_libraries(grpc++ + ssl + libprotobuf + grpc +) + + +add_library(grpc++_reflection + src/cpp/ext/proto_server_reflection.cc + src/cpp/ext/proto_server_reflection_plugin.cc + src/cpp/ext/reflection.grpc.pb.cc + src/cpp/ext/reflection.pb.cc +) + +target_include_directories(grpc++_reflection + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + +target_link_libraries(grpc++_reflection + grpc++ +) + + +add_library(grpc++_unsecure + src/cpp/common/insecure_create_auth_context.cc + src/cpp/client/channel.cc + src/cpp/client/client_context.cc + src/cpp/client/create_channel.cc + src/cpp/client/create_channel_internal.cc + src/cpp/client/create_channel_posix.cc + src/cpp/client/credentials.cc + src/cpp/client/generic_stub.cc + src/cpp/client/insecure_credentials.cc + src/cpp/common/channel_arguments.cc + src/cpp/common/completion_queue.cc + src/cpp/common/core_codegen.cc + src/cpp/common/rpc_method.cc + src/cpp/server/async_generic_service.cc + src/cpp/server/create_default_thread_pool.cc + src/cpp/server/dynamic_thread_pool.cc + src/cpp/server/insecure_server_credentials.cc + src/cpp/server/server.cc + src/cpp/server/server_builder.cc + src/cpp/server/server_context.cc + src/cpp/server/server_credentials.cc + src/cpp/server/server_posix.cc + src/cpp/util/byte_buffer.cc + src/cpp/util/slice.cc + src/cpp/util/status.cc + src/cpp/util/string_ref.cc + src/cpp/util/time.cc + src/cpp/codegen/codegen_init.cc +) + +target_include_directories(grpc++_unsecure + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + +target_link_libraries(grpc++_unsecure + libprotobuf + gpr + grpc_unsecure +) + + +add_library(grpc_plugin_support + src/compiler/cpp_generator.cc + src/compiler/csharp_generator.cc + src/compiler/node_generator.cc + src/compiler/objective_c_generator.cc + src/compiler/python_generator.cc + src/compiler/ruby_generator.cc +) + +target_include_directories(grpc_plugin_support + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + +target_link_libraries(grpc_plugin_support + libprotoc +) + + +add_library(grpc_csharp_ext + src/csharp/ext/grpc_csharp_ext.c +) + +target_include_directories(grpc_csharp_ext + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + +target_link_libraries(grpc_csharp_ext + grpc + gpr +) + + + +add_executable(grpc_cpp_plugin + src/compiler/cpp_plugin.cc +) + +target_include_directories(grpc_cpp_plugin + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + +target_link_libraries(grpc_cpp_plugin + libprotoc + grpc_plugin_support +) + + +add_executable(grpc_csharp_plugin + src/compiler/csharp_plugin.cc +) + +target_include_directories(grpc_csharp_plugin + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + +target_link_libraries(grpc_csharp_plugin + libprotoc + grpc_plugin_support +) + + +add_executable(grpc_node_plugin + src/compiler/node_plugin.cc +) + +target_include_directories(grpc_node_plugin + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + +target_link_libraries(grpc_node_plugin + libprotoc + grpc_plugin_support +) + + +add_executable(grpc_objective_c_plugin + src/compiler/objective_c_plugin.cc +) + +target_include_directories(grpc_objective_c_plugin + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + +target_link_libraries(grpc_objective_c_plugin + libprotoc + grpc_plugin_support +) + + +add_executable(grpc_python_plugin + src/compiler/python_plugin.cc +) + +target_include_directories(grpc_python_plugin + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + +target_link_libraries(grpc_python_plugin + libprotoc + grpc_plugin_support +) + + +add_executable(grpc_ruby_plugin + src/compiler/ruby_plugin.cc +) + +target_include_directories(grpc_ruby_plugin + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + +target_link_libraries(grpc_ruby_plugin + libprotoc + grpc_plugin_support +) + + + + + diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template new file mode 100644 index 00000000000..00a37de3cb9 --- /dev/null +++ b/templates/CMakeLists.txt.template @@ -0,0 +1,133 @@ +%YAML 1.2 +--- | + # GRPC global cmake file + # This currently builds C and C++ code. + # This file has been automatically generated from a template file. + # Please look at the templates directory instead. + # This file can be regenerated from the template by running + # tools/buildgen/generate_projects.sh + + # Copyright 2015, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + <%! + def get_deps(target_dict): + deps = [] + if target_dict.get('build', None) in ['protoc']: + deps.append("libprotoc") + if target_dict.get('secure', False): + deps = ["ssl"] + if target_dict['name'] in ['grpc++', 'grpc++_unsecure', 'grpc++_codegen_lib']: + deps.append("libprotobuf") + for d in target_dict.get('deps', []): + deps.append(d) + return deps + %> + + cmake_minimum_required(VERSION 2.8) + + if (NOT BORINGSSL_ROOT_DIR) + set(BORINGSSL_ROOT_DIR <%text>${CMAKE_CURRENT_SOURCE_DIR}/third_party/boringssl) + endif() + if (NOT PROTOBUF_ROOT_DIR) + set(PROTOBUF_ROOT_DIR <%text>${CMAKE_CURRENT_SOURCE_DIR}/third_party/protobuf) + endif() + if (NOT ZLIB_ROOT_DIR) + set(ZLIB_ROOT_DIR <%text>${CMAKE_CURRENT_SOURCE_DIR}/third_party/zlib) + endif() + + add_subdirectory(<%text>${BORINGSSL_ROOT_DIR} third_party/boringssl) + add_subdirectory(<%text>${PROTOBUF_ROOT_DIR}/cmake third_party/protobuf) + add_subdirectory(<%text>${ZLIB_ROOT_DIR} third_party/zlib) + + set(CMAKE_C_FLAGS "<%text>${CMAKE_C_FLAGS} -std=c11") + set(CMAKE_CXX_FLAGS "<%text>${CMAKE_CXX_FLAGS} -std=c++11") + + % for lib in libs: + % if lib.build in ["all", "protoc"]: + ${cc_library(lib)} + % endif + % endfor + + % for tgt in targets: + % if tgt.build == 'protoc': + ${cc_binary(tgt)} + % endif + % endfor + + <%def name="cc_library(lib)"> + add_library(${lib.name} + % for src in lib.src: + ${src} + % endfor + ) + + target_include_directories(${lib.name} + PRIVATE <%text>${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE <%text>${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE <%text>${BORINGSSL_ROOT_DIR}/include + PRIVATE <%text>${PROTOBUF_ROOT_DIR}/src + PRIVATE <%text>${ZLIB_ROOT_DIR} + PRIVATE <%text>${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib + ) + + % if len(get_deps(lib)) > 0: + target_link_libraries(${lib.name} + % for dep in get_deps(lib): + ${dep} + % endfor + ) + % endif + + + <%def name="cc_binary(tgt)"> + add_executable(${tgt.name} + % for src in tgt.src: + ${src} + % endfor + ) + + target_include_directories(${tgt.name} + PRIVATE <%text>${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE <%text>${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE <%text>${BORINGSSL_ROOT_DIR}/include + PRIVATE <%text>${PROTOBUF_ROOT_DIR}/src + PRIVATE <%text>${ZLIB_ROOT_DIR} + PRIVATE <%text>${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib + ) + + % if len(get_deps(tgt)) > 0: + target_link_libraries(${tgt.name} + % for dep in get_deps(tgt): + ${dep} + % endfor + ) + % endif + + From cddf697ab44a7bab1821915e1e3f6a0f08ca1706 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Tue, 21 Jun 2016 08:27:07 -0700 Subject: [PATCH 1203/1894] Fix refcounting tsan failures and grab pollset lock in the function pollset_add_fd --- src/core/lib/iomgr/ev_epoll_linux.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 72288889c02..7cc69c876db 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -291,11 +291,11 @@ void pi_unref_dbg(polling_island *pi, int ref_cnt, char *reason, char *file, #endif long pi_add_ref(polling_island *pi, int ref_cnt) { - return gpr_atm_no_barrier_fetch_add(&pi->ref_count, ref_cnt); + return gpr_atm_full_fetch_add(&pi->ref_count, ref_cnt); } long pi_unref(polling_island *pi, int ref_cnt) { - long old_cnt = gpr_atm_no_barrier_fetch_add(&pi->ref_count, -ref_cnt); + long old_cnt = gpr_atm_full_fetch_add(&pi->ref_count, -ref_cnt); /* If ref count went to zero, delete the polling island. Note that this need not be done under a lock. Once the ref count goes to zero, we are @@ -311,6 +311,8 @@ long pi_unref(polling_island *pi, int ref_cnt) { if (next != NULL) { PI_UNREF(next, "pi_delete"); /* Recursive call */ } + } else { + GPR_ASSERT(old_cnt > ref_cnt); } return old_cnt; @@ -445,8 +447,8 @@ static polling_island *polling_island_create(grpc_fd *initial_fd) { pi->fds = NULL; } - gpr_atm_no_barrier_store(&pi->ref_count, 0); - gpr_atm_no_barrier_store(&pi->merged_to, NULL); + gpr_atm_rel_store(&pi->ref_count, 0); + gpr_atm_rel_store(&pi->merged_to, NULL); pi->epoll_fd = epoll_create1(EPOLL_CLOEXEC); @@ -1347,7 +1349,7 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_fd *fd) { - /* TODO sreek - Double check if we need to get a pollset->mu lock here */ + gpr_mu_lock(&pollset->mu); gpr_mu_lock(&pollset->pi_mu); gpr_mu_lock(&fd->pi_mu); @@ -1401,6 +1403,7 @@ static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, gpr_mu_unlock(&fd->pi_mu); gpr_mu_unlock(&pollset->pi_mu); + gpr_mu_unlock(&pollset->mu); } /******************************************************************************* From e63246d1007516ca5c74043139304a371c0ce672 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 21 Jun 2016 09:03:11 -0700 Subject: [PATCH 1204/1894] clang-format --- test/core/iomgr/tcp_server_posix_test.c | 2 +- test/core/surface/server_chttp2_test.c | 2 +- test/core/util/test_tcp_server.c | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/test/core/iomgr/tcp_server_posix_test.c b/test/core/iomgr/tcp_server_posix_test.c index 6361e7afcbc..6e2d1d0fc9e 100644 --- a/test/core/iomgr/tcp_server_posix_test.c +++ b/test/core/iomgr/tcp_server_posix_test.c @@ -166,7 +166,7 @@ static void test_no_op_with_port_and_start(void) { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; struct sockaddr_in addr; grpc_tcp_server *s; - GPR_ASSERT(GRPC_ERROR_NONE == grpc_tcp_server_create(NULL, NULL, &s)); + GPR_ASSERT(GRPC_ERROR_NONE == grpc_tcp_server_create(NULL, NULL, &s)); LOG_TEST("test_no_op_with_port_and_start"); int port; diff --git a/test/core/surface/server_chttp2_test.c b/test/core/surface/server_chttp2_test.c index 40cfa6b5989..6310b6f00b0 100644 --- a/test/core/surface/server_chttp2_test.c +++ b/test/core/surface/server_chttp2_test.c @@ -54,7 +54,7 @@ void test_add_same_port_twice() { a.key = GRPC_ARG_ALLOW_REUSEPORT; a.value.integer = 0; grpc_channel_args args = {1, &a}; - + int port = grpc_pick_unused_port_or_die(); char *addr = NULL; grpc_completion_queue *cq = grpc_completion_queue_create(NULL); diff --git a/test/core/util/test_tcp_server.c b/test/core/util/test_tcp_server.c index c1d307fc779..8a0b3932d86 100644 --- a/test/core/util/test_tcp_server.c +++ b/test/core/util/test_tcp_server.c @@ -72,8 +72,8 @@ void test_tcp_server_start(test_tcp_server *server, int port) { addr.sin_port = htons((uint16_t)port); memset(&addr.sin_addr, 0, sizeof(addr.sin_addr)); - grpc_error *error = - grpc_tcp_server_create(&server->shutdown_complete, NULL, &server->tcp_server); + grpc_error *error = grpc_tcp_server_create(&server->shutdown_complete, NULL, + &server->tcp_server); GPR_ASSERT(error == GRPC_ERROR_NONE); error = grpc_tcp_server_add_port(server->tcp_server, &addr, sizeof(addr), &port_added); From 39f9ac9b2a51fdcdbd3693d8a04eec3473eb9438 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 16 Jun 2016 16:53:59 -0700 Subject: [PATCH 1205/1894] Test polling island merges --- Makefile | 36 ++++ build.yaml | 12 ++ src/core/lib/iomgr/ev_epoll_linux.c | 51 +++++- src/core/lib/iomgr/ev_epoll_linux.h | 6 + src/core/lib/iomgr/ev_posix.c | 7 + src/core/lib/iomgr/ev_posix.h | 3 + test/core/iomgr/ev_epoll_linux_test.c | 222 +++++++++++++++++++++++ tools/run_tests/sources_and_headers.json | 16 ++ tools/run_tests/tests.json | 15 ++ 9 files changed, 366 insertions(+), 2 deletions(-) create mode 100644 test/core/iomgr/ev_epoll_linux_test.c diff --git a/Makefile b/Makefile index e615704395b..825684cc2dd 100644 --- a/Makefile +++ b/Makefile @@ -905,6 +905,7 @@ dns_resolver_connectivity_test: $(BINDIR)/$(CONFIG)/dns_resolver_connectivity_te dns_resolver_test: $(BINDIR)/$(CONFIG)/dns_resolver_test dualstack_socket_test: $(BINDIR)/$(CONFIG)/dualstack_socket_test endpoint_pair_test: $(BINDIR)/$(CONFIG)/endpoint_pair_test +ev_epoll_linux_test: $(BINDIR)/$(CONFIG)/ev_epoll_linux_test fd_conservation_posix_test: $(BINDIR)/$(CONFIG)/fd_conservation_posix_test fd_posix_test: $(BINDIR)/$(CONFIG)/fd_posix_test fling_client: $(BINDIR)/$(CONFIG)/fling_client @@ -1242,6 +1243,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/dns_resolver_test \ $(BINDIR)/$(CONFIG)/dualstack_socket_test \ $(BINDIR)/$(CONFIG)/endpoint_pair_test \ + $(BINDIR)/$(CONFIG)/ev_epoll_linux_test \ $(BINDIR)/$(CONFIG)/fd_conservation_posix_test \ $(BINDIR)/$(CONFIG)/fd_posix_test \ $(BINDIR)/$(CONFIG)/fling_client \ @@ -1512,6 +1514,8 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/dualstack_socket_test || ( echo test dualstack_socket_test failed ; exit 1 ) $(E) "[RUN] Testing endpoint_pair_test" $(Q) $(BINDIR)/$(CONFIG)/endpoint_pair_test || ( echo test endpoint_pair_test failed ; exit 1 ) + $(E) "[RUN] Testing ev_epoll_linux_test" + $(Q) $(BINDIR)/$(CONFIG)/ev_epoll_linux_test || ( echo test ev_epoll_linux_test failed ; exit 1 ) $(E) "[RUN] Testing fd_conservation_posix_test" $(Q) $(BINDIR)/$(CONFIG)/fd_conservation_posix_test || ( echo test fd_conservation_posix_test failed ; exit 1 ) $(E) "[RUN] Testing fd_posix_test" @@ -7130,6 +7134,38 @@ endif endif +EV_EPOLL_LINUX_TEST_SRC = \ + test/core/iomgr/ev_epoll_linux_test.c \ + +EV_EPOLL_LINUX_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(EV_EPOLL_LINUX_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/ev_epoll_linux_test: openssl_dep_error + +else + + + +$(BINDIR)/$(CONFIG)/ev_epoll_linux_test: $(EV_EPOLL_LINUX_TEST_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) $(EV_EPOLL_LINUX_TEST_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)/ev_epoll_linux_test + +endif + +$(OBJDIR)/$(CONFIG)/test/core/iomgr/ev_epoll_linux_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a + +deps_ev_epoll_linux_test: $(EV_EPOLL_LINUX_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(EV_EPOLL_LINUX_TEST_OBJS:.o=.dep) +endif +endif + + FD_CONSERVATION_POSIX_TEST_SRC = \ test/core/iomgr/fd_conservation_posix_test.c \ diff --git a/build.yaml b/build.yaml index 7790e0c5174..84f4ea521be 100644 --- a/build.yaml +++ b/build.yaml @@ -1407,6 +1407,18 @@ targets: - grpc - gpr_test_util - gpr +- name: ev_epoll_linux_test + build: test + language: c + src: + - test/core/iomgr/ev_epoll_linux_test.c + deps: + - grpc_test_util + - grpc + - gpr_test_util + - gpr + platforms: + - linux - name: fd_conservation_posix_test build: test language: c diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 1fb59474640..ed2c494b783 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -317,8 +317,9 @@ static void polling_island_remove_all_fds_locked(polling_island *pi, if (err < 0 && errno != ENOENT) { /* TODO: sreek - We need a better way to bubble up this error instead of * just logging a message */ - gpr_log(GPR_ERROR, "epoll_ctl deleting fds[%zu]: %d failed with error: %s", - i, pi->fds[i]->fd, strerror(errno)); + gpr_log(GPR_ERROR, + "epoll_ctl deleting fds[%zu]: %d failed with error: %s", i, + pi->fds[i]->fd, strerror(errno)); } if (remove_fd_refs) { @@ -1458,6 +1459,52 @@ static void pollset_set_del_pollset_set(grpc_exec_ctx *exec_ctx, gpr_mu_unlock(&bag->mu); } +/* Test helper functions + * */ +void *grpc_fd_get_polling_island(grpc_fd *fd) { + polling_island *pi; + + gpr_mu_lock(&fd->pi_mu); + pi = fd->polling_island; + gpr_mu_unlock(&fd->pi_mu); + + return pi; +} + +void *grpc_pollset_get_polling_island(grpc_pollset *ps) { + polling_island *pi; + + gpr_mu_lock(&ps->pi_mu); + pi = ps->polling_island; + gpr_mu_unlock(&ps->pi_mu); + + return pi; +} + +static polling_island *get_polling_island(polling_island *p) { + if (p == NULL) { + return NULL; + } + + polling_island *next; + gpr_mu_lock(&p->mu); + while (p->merged_to != NULL) { + next = p->merged_to; + gpr_mu_unlock(&p->mu); + p = next; + gpr_mu_lock(&p->mu); + } + gpr_mu_unlock(&p->mu); + + return p; +} + +bool grpc_are_polling_islands_equal(void *p, void *q) { + p = get_polling_island(p); + q = get_polling_island(q); + return p == q; +} + /******************************************************************************* * Event engine binding */ diff --git a/src/core/lib/iomgr/ev_epoll_linux.h b/src/core/lib/iomgr/ev_epoll_linux.h index 8c819975a4c..7a494aba198 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.h +++ b/src/core/lib/iomgr/ev_epoll_linux.h @@ -38,4 +38,10 @@ const grpc_event_engine_vtable *grpc_init_epoll_linux(void); +#ifdef GPR_LINUX_EPOLL +void *grpc_fd_get_polling_island(grpc_fd *fd); +void *grpc_pollset_get_polling_island(grpc_pollset *ps); +bool grpc_are_polling_islands_equal(void *p, void *q); +#endif /* defined(GPR_LINUX_EPOLL) */ + #endif /* GRPC_CORE_LIB_IOMGR_EV_EPOLL_LINUX_H */ diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index 2b15967adcc..5b20600a6f7 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -54,6 +54,7 @@ grpc_poll_function_type grpc_poll_function = poll; static const grpc_event_engine_vtable *g_event_engine; +static const char* g_poll_strategy_name = NULL; typedef const grpc_event_engine_vtable *(*event_engine_factory_fn)(void); @@ -101,6 +102,7 @@ static void try_engine(const char *engine) { for (size_t i = 0; i < GPR_ARRAY_SIZE(g_factories); i++) { if (is(engine, g_factories[i].name)) { if ((g_event_engine = g_factories[i].factory())) { + g_poll_strategy_name = g_factories[i].name; gpr_log(GPR_DEBUG, "Using polling engine: %s", g_factories[i].name); return; } @@ -108,6 +110,11 @@ static void try_engine(const char *engine) { } } +/* Call this only after calling grpc_event_engine_init() */ +const char *grpc_get_poll_strategy_name() { + return g_poll_strategy_name; +} + void grpc_event_engine_init(void) { char *s = gpr_getenv("GRPC_POLL_STRATEGY"); if (s == NULL) { diff --git a/src/core/lib/iomgr/ev_posix.h b/src/core/lib/iomgr/ev_posix.h index 344bf63438a..3ed5a5f9562 100644 --- a/src/core/lib/iomgr/ev_posix.h +++ b/src/core/lib/iomgr/ev_posix.h @@ -98,6 +98,9 @@ typedef struct grpc_event_engine_vtable { void grpc_event_engine_init(void); void grpc_event_engine_shutdown(void); +/* Return the name of the poll strategy */ +const char* grpc_get_poll_strategy_name(); + /* Create a wrapped file descriptor. Requires fd is a non-blocking file descriptor. This takes ownership of closing fd. */ diff --git a/test/core/iomgr/ev_epoll_linux_test.c b/test/core/iomgr/ev_epoll_linux_test.c new file mode 100644 index 00000000000..51da15faa7a --- /dev/null +++ b/test/core/iomgr/ev_epoll_linux_test.c @@ -0,0 +1,222 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "src/core/lib/iomgr/ev_epoll_linux.h" +#include "src/core/lib/iomgr/ev_posix.h" + +#include +#include +#include +#include + +#include +#include + +#include "src/core/lib/iomgr/iomgr.h" +#include "test/core/util/test_config.h" + +typedef struct test_pollset { + grpc_pollset *pollset; + gpr_mu *mu; +} test_pollset; + +typedef struct test_fd { + int inner_fd; + grpc_fd *fd; +} test_fd; + +static void test_fd_init(test_fd *fds, int num_fds) { + int i; + for (i = 0; i < num_fds; i++) { + fds[i].inner_fd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); + fds[i].fd = grpc_fd_create(fds[i].inner_fd, "test_fd"); + } +} + +static void test_fd_cleanup(grpc_exec_ctx *exec_ctx, test_fd *fds, + int num_fds) { + int release_fd; + int i; + + for (i = 0; i < num_fds; i++) { + grpc_fd_shutdown(exec_ctx, fds[i].fd); + grpc_exec_ctx_flush(exec_ctx); + + grpc_fd_orphan(exec_ctx, fds[i].fd, NULL, &release_fd, "test_fd_cleanup"); + grpc_exec_ctx_flush(exec_ctx); + + GPR_ASSERT(release_fd == fds[i].inner_fd); + close(fds[i].inner_fd); + } +} + +static void test_pollset_init(test_pollset *pollsets, int num_pollsets) { + int i; + for (i = 0; i < num_pollsets; i++) { + pollsets[i].pollset = gpr_malloc(grpc_pollset_size()); + grpc_pollset_init(pollsets[i].pollset, &pollsets[i].mu); + } +} + +static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) { + grpc_pollset_destroy(p); +} + +static void test_pollset_cleanup(grpc_exec_ctx *exec_ctx, + test_pollset *pollsets, int num_pollsets) { + grpc_closure destroyed; + int i; + + for (i = 0; i < num_pollsets; i++) { + grpc_closure_init(&destroyed, destroy_pollset, pollsets[i].pollset); + grpc_pollset_shutdown(exec_ctx, pollsets[i].pollset, &destroyed); + + grpc_exec_ctx_flush(exec_ctx); + gpr_free(pollsets[i].pollset); + } +} + +#define NUM_FDS 8 +#define NUM_POLLSETS 4 +/* + * Cases to test: + * case 1) Polling islands of both fd and pollset are NULL + * case 2) Polling island of fd is NULL but that of pollset is not-NULL + * case 3) Polling island of fd is not-NULL but that of pollset is NULL + * case 4) Polling islands of both fd and pollset are not-NULL and: + * case 4.1) Polling islands of fd and pollset are equal + * case 4.2) Polling islands of fd and pollset are NOT-equal (This results + * in a merge) + * */ +static void test_add_fd_to_pollset() { + grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; + test_fd fds[NUM_FDS]; + test_pollset pollsets[NUM_POLLSETS]; + void *expected_pi = NULL; + int i; + + test_fd_init(fds, NUM_FDS); + test_pollset_init(pollsets, NUM_POLLSETS); + + /*Step 1. + * Create three polling islands (This will exercise test case 1 and 2) with + * the following configuration: + * polling island 0 = { fds:0,1,2, pollsets:0} + * polling island 1 = { fds:3,4, pollsets:1} + * polling island 2 = { fds:5,6,7 pollsets:2} + * + *Step 2. + * Add pollset 3 to polling island 0 (by adding fds 0 and 1 to pollset 3) + * (This will exercise test cases 3 and 4.1). The configuration becomes: + * polling island 0 = { fds:0,1,2, pollsets:0,3} <<< pollset 3 added here + * polling island 1 = { fds:3,4, pollsets:1} + * polling island 2 = { fds:5,6,7 pollsets:2} + * + *Step 3. + * Merge polling islands 0 and 1 by adding fd 0 to pollset 1 (This will + * exercise test case 4.2). The configuration becomes: + * polling island (merged) = {fds: 0,1,2,3,4, pollsets: 0,1,3} + * polling island 2 = {fds: 5,6,7 pollsets: 2} + * + *Step 4. + * Finally do one more merge by adding fd 3 to pollset 2. + * polling island (merged) = {fds: 0,1,2,3,4,5,6,7, pollsets: 0,1,2,3} + */ + + /* == Step 1 == */ + for (i = 0; i <= 2; i++) { + grpc_pollset_add_fd(&exec_ctx, pollsets[0].pollset, fds[i].fd); + grpc_exec_ctx_flush(&exec_ctx); + } + + for (i = 3; i <= 4; i++) { + grpc_pollset_add_fd(&exec_ctx, pollsets[1].pollset, fds[i].fd); + grpc_exec_ctx_flush(&exec_ctx); + } + + for (i = 5; i <= 7; i++) { + grpc_pollset_add_fd(&exec_ctx, pollsets[2].pollset, fds[i].fd); + grpc_exec_ctx_flush(&exec_ctx); + } + + /* == Step 2 == */ + for (i = 0; i <= 1; i++) { + grpc_pollset_add_fd(&exec_ctx, pollsets[3].pollset, fds[i].fd); + grpc_exec_ctx_flush(&exec_ctx); + } + + /* == Step 3 == */ + grpc_pollset_add_fd(&exec_ctx, pollsets[1].pollset, fds[0].fd); + grpc_exec_ctx_flush(&exec_ctx); + + /* == Step 4 == */ + grpc_pollset_add_fd(&exec_ctx, pollsets[2].pollset, fds[3].fd); + grpc_exec_ctx_flush(&exec_ctx); + + /* All polling islands are merged at this point */ + + /* Compare Fd:0's polling island with that of all other Fds */ + expected_pi = grpc_fd_get_polling_island(fds[0].fd); + for (i = 1; i < NUM_FDS; i++) { + GPR_ASSERT(grpc_are_polling_islands_equal( + expected_pi, grpc_fd_get_polling_island(fds[i].fd))); + } + + /* Compare Fd:0's polling island with that of all other pollsets */ + for (i = 0; i < NUM_POLLSETS; i++) { + GPR_ASSERT(grpc_are_polling_islands_equal( + expected_pi, grpc_pollset_get_polling_island(pollsets[i].pollset))); + } + + test_fd_cleanup(&exec_ctx, fds, NUM_FDS); + test_pollset_cleanup(&exec_ctx, pollsets, NUM_POLLSETS); + grpc_exec_ctx_finish(&exec_ctx); +} + +int main(int argc, char **argv) { + const char *poll_strategy = NULL; + grpc_test_init(argc, argv); + grpc_iomgr_init(); + + poll_strategy = grpc_get_poll_strategy_name(); + if (poll_strategy != NULL && strcmp(poll_strategy, "epoll") == 0) { + test_add_fd_to_pollset(); + } else { + gpr_log(GPR_INFO, + "Skipping the test. The test is only relevant for 'epoll' " + "strategy. and the current strategy is: '%s'", + poll_strategy); + } + grpc_iomgr_shutdown(); + return 0; +} diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index e8ff61dc3fb..e9df72e43a1 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -315,6 +315,22 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc_test_util" + ], + "headers": [], + "language": "c", + "name": "ev_epoll_linux_test", + "src": [ + "test/core/iomgr/ev_epoll_linux_test.c" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 5a84a41b638..ba661840dad 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -377,6 +377,21 @@ "windows" ] }, + { + "args": [], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "gtest": false, + "language": "c", + "name": "ev_epoll_linux_test", + "platforms": [ + "linux" + ] + }, { "args": [], "ci_platforms": [ From 94cda1a9c6ae86ab176d357b8822332d70283cde Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 17 Jun 2016 13:28:38 -0700 Subject: [PATCH 1206/1894] Significantly refactor the polling island locking and refcounting code --- src/core/lib/iomgr/ev_epoll_linux.c | 462 ++++++++++++++++------------ 1 file changed, 270 insertions(+), 192 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index ed2c494b783..72288889c02 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -140,18 +140,40 @@ static void fd_global_shutdown(void); #define CLOSURE_READY ((grpc_closure *)1) /******************************************************************************* - * Polling-island Declarations + * Polling island Declarations */ -/* TODO: sree: Consider making ref_cnt and merged_to to gpr_atm - This would - * significantly reduce the number of mutex acquisition calls. */ + +// #define GRPC_PI_REF_COUNT_DEBUG +#ifdef GRPC_PI_REF_COUNT_DEBUG + +#define PI_ADD_REF(p, r) pi_add_ref_dbg((p), 1, (r), __FILE__, __LINE__) +#define PI_UNREF(p, r) pi_unref_dbg((p), 1, (r), __FILE__, __LINE__) + +#else /* defined(GRPC_PI_REF_COUNT_DEBUG) */ + +#define PI_ADD_REF(p, r) pi_add_ref((p), 1) +#define PI_UNREF(p, r) pi_unref((p), 1) + +#endif /* !defined(GPRC_PI_REF_COUNT_DEBUG) */ + typedef struct polling_island { gpr_mu mu; - int ref_cnt; - - /* Points to the polling_island this merged into. - * If merged_to is not NULL, all the remaining fields (except mu and ref_cnt) - * are invalid and must be ignored */ - struct polling_island *merged_to; + /* Ref count. Use PI_ADD_REF() and PI_UNREF() macros to increment/decrement + the refcount. + Once the ref count becomes zero, this structure is destroyed which means + we should ensure that there is never a scenario where a PI_ADD_REF() is + racing with a PI_UNREF() that just made the ref_count zero. */ + gpr_atm ref_count; + + /* Pointer to the polling_island this merged into. + * merged_to value is only set once in polling_island's lifetime (and that too + * only if the island is merged with another island). Because of this, we can + * use gpr_atm type here so that we can do atomic access on this and reduce + * lock contention on 'mu' mutex. + * + * Note that if this field is not NULL (i.e not 0), all the remaining fields + * (except mu and ref_count) are invalid and must be ignored. */ + gpr_atm merged_to; /* The fd of the underlying epoll set */ int epoll_fd; @@ -236,6 +258,8 @@ static grpc_wakeup_fd polling_island_wakeup_fd; static gpr_mu g_pi_freelist_mu; static polling_island *g_pi_freelist = NULL; +static void polling_island_delete(); /* Forward declaration */ + #ifdef GRPC_TSAN /* Currently TSAN may incorrectly flag data races between epoll_ctl and epoll_wait for any grpc_fd structs that are added to the epoll set via @@ -247,6 +271,51 @@ static polling_island *g_pi_freelist = NULL; gpr_atm g_epoll_sync; #endif /* defined(GRPC_TSAN) */ +#ifdef GRPC_PI_REF_COUNT_DEBUG +long pi_add_ref(polling_island *pi, int ref_cnt); +long pi_unref(polling_island *pi, int ref_cnt); + +void pi_add_ref_dbg(polling_island *pi, int ref_cnt, char *reason, char *file, + int line) { + long old_cnt = pi_add_ref(pi, ref_cnt); + gpr_log(GPR_DEBUG, "Add ref pi: %p, old:%ld -> new:%ld (%s) - (%s, %d)", + (void *)pi, old_cnt, (old_cnt + ref_cnt), reason, file, line); +} + +void pi_unref_dbg(polling_island *pi, int ref_cnt, char *reason, char *file, + int line) { + long old_cnt = pi_unref(pi, ref_cnt); + gpr_log(GPR_DEBUG, "Unref pi: %p, old:%ld -> new:%ld (%s) - (%s, %d)", + (void *)pi, old_cnt, (old_cnt - ref_cnt), reason, file, line); +} +#endif + +long pi_add_ref(polling_island *pi, int ref_cnt) { + return gpr_atm_no_barrier_fetch_add(&pi->ref_count, ref_cnt); +} + +long pi_unref(polling_island *pi, int ref_cnt) { + long old_cnt = gpr_atm_no_barrier_fetch_add(&pi->ref_count, -ref_cnt); + + /* If ref count went to zero, delete the polling island. Note that this need + not be done under a lock. Once the ref count goes to zero, we are + guaranteed that no one else holds a reference to the polling island (and + that there is no racing pi_add_ref() call either. + + Also, if we are deleting the polling island and the merged_to field is + non-empty, we should remove a ref to the merged_to polling island + */ + if (old_cnt == ref_cnt) { + polling_island *next = (polling_island *)gpr_atm_acq_load(&pi->merged_to); + polling_island_delete(pi); + if (next != NULL) { + PI_UNREF(next, "pi_delete"); /* Recursive call */ + } + } + + return old_cnt; +} + /* The caller is expected to hold pi->mu lock before calling this function */ static void polling_island_add_fds_locked(polling_island *pi, grpc_fd **fds, size_t fd_count, bool add_fd_refs) { @@ -355,8 +424,7 @@ static void polling_island_remove_fd_locked(polling_island *pi, grpc_fd *fd, } } -static polling_island *polling_island_create(grpc_fd *initial_fd, - int initial_ref_cnt) { +static polling_island *polling_island_create(grpc_fd *initial_fd) { polling_island *pi = NULL; /* Try to get one from the polling island freelist */ @@ -377,6 +445,9 @@ static polling_island *polling_island_create(grpc_fd *initial_fd, pi->fds = NULL; } + gpr_atm_no_barrier_store(&pi->ref_count, 0); + gpr_atm_no_barrier_store(&pi->merged_to, NULL); + pi->epoll_fd = epoll_create1(EPOLL_CLOEXEC); if (pi->epoll_fd < 0) { @@ -387,14 +458,12 @@ static polling_island *polling_island_create(grpc_fd *initial_fd, polling_island_add_wakeup_fd_locked(pi, &grpc_global_wakeup_fd); - pi->ref_cnt = initial_ref_cnt; - pi->merged_to = NULL; pi->next_free = NULL; if (initial_fd != NULL) { - /* It is not really needed to get the pi->mu lock here. If this is a newly - created polling island (or one that we got from the freelist), no one - else would be holding a lock to it anyway */ + /* Lock the polling island here just in case we got this structure from the + freelist and the polling island lock was not released yet (by the code + that adds the polling island to the freelist) */ gpr_mu_lock(&pi->mu); polling_island_add_fds_locked(pi, &initial_fd, 1, true); gpr_mu_unlock(&pi->mu); @@ -404,140 +473,136 @@ static polling_island *polling_island_create(grpc_fd *initial_fd, } static void polling_island_delete(polling_island *pi) { - GPR_ASSERT(pi->ref_cnt == 0); GPR_ASSERT(pi->fd_cnt == 0); + gpr_atm_rel_store(&pi->merged_to, NULL); + close(pi->epoll_fd); pi->epoll_fd = -1; - pi->merged_to = NULL; - gpr_mu_lock(&g_pi_freelist_mu); pi->next_free = g_pi_freelist; g_pi_freelist = pi; gpr_mu_unlock(&g_pi_freelist_mu); } -void polling_island_unref_and_unlock(polling_island *pi, int unref_by) { - pi->ref_cnt -= unref_by; - int ref_cnt = pi->ref_cnt; - GPR_ASSERT(ref_cnt >= 0); - - gpr_mu_unlock(&pi->mu); - - if (ref_cnt == 0) { - polling_island_delete(pi); - } -} - -polling_island *polling_island_update_and_lock(polling_island *pi, int unref_by, - int add_ref_by) { +/* Gets the lock on the *latest* polling island i.e the last polling island in + the linked list (linked by 'merged_to' link). Call gpr_mu_unlock on the + returned polling island's mu. + Usage: To lock/unlock polling island "pi", do the following: + polling_island *pi_latest = polling_island_lock(pi); + ... + ... critical section .. + ... + gpr_mu_unlock(&pi_latest->mu); //NOTE: use pi_latest->mu. NOT pi->mu */ +polling_island *polling_island_lock(polling_island *pi) { polling_island *next = NULL; - gpr_mu_lock(&pi->mu); - while (pi->merged_to != NULL) { - next = pi->merged_to; - polling_island_unref_and_unlock(pi, unref_by); + while (true) { + next = (polling_island *)gpr_atm_acq_load(&pi->merged_to); + if (next == NULL) { + /* pi is the last node in the linked list. Get the lock and check again + (under the pi->mu lock) that pi is still the last node (because a merge + may have happend after the (next == NULL) check above and before + getting the pi->mu lock. + If pi is the last node, we are done. If not, unlock and continue + traversing the list */ + gpr_mu_lock(&pi->mu); + next = (polling_island *)gpr_atm_acq_load(&pi->merged_to); + if (next == NULL) { + break; + } + gpr_mu_unlock(&pi->mu); + } + pi = next; - gpr_mu_lock(&pi->mu); } - pi->ref_cnt += add_ref_by; return pi; } -void polling_island_pair_update_and_lock(polling_island **p, - polling_island **q) { +/* Gets the lock on the *latest* polling islands pointed by *p and *q. + This function is needed because calling the following block of code to obtain + locks on polling islands (*p and *q) is prone to deadlocks. + { + polling_island_lock(*p); + polling_island_lock(*q); + } + + Usage/exmaple: + polling_island *p1; + polling_island *p2; + .. + polling_island_lock_pair(&p1, &p2); + .. + .. Critical section with both p1 and p2 locked + .. + // Release locks + // **IMPORTANT**: Make sure you check p1 == p2 AFTER the function + // polling_island_lock_pair() was called and if so, release the lock only + // once. Note: Even if p1 != p2 beforec calling polling_island_lock_pair(), + // they might be after the function returns: + if (p1 == p2) { + gpr_mu_unlock(&p1->mu) + } else { + gpr_mu_unlock(&p1->mu); + gpr_mu_unlock(&p2->mu); + } + +*/ +void polling_island_lock_pair(polling_island **p, polling_island **q) { polling_island *pi_1 = *p; polling_island *pi_2 = *q; - polling_island *temp = NULL; - bool pi_1_locked = false; - bool pi_2_locked = false; - int num_swaps = 0; - - /* Loop until either pi_1 == pi_2 or until we acquired locks on both pi_1 - and pi_2 */ - while (pi_1 != pi_2 && !(pi_1_locked && pi_2_locked)) { - /* The following assertions are true at this point: - - pi_1 != pi_2 (else, the while loop would have exited) - - pi_1 MAY be locked - - pi_2 is NOT locked */ - - /* To maintain lock order consistency, always lock polling_island node with - lower address first. - First, make sure pi_1 < pi_2 before proceeding any further. If it turns - out that pi_1 > pi_2, unlock pi_1 if locked (because pi_2 is not locked - at this point and having pi_1 locked would violate the lock order) and - swap pi_1 and pi_2 so that pi_1 becomes less than pi_2 */ - if (pi_1 > pi_2) { - if (pi_1_locked) { - gpr_mu_unlock(&pi_1->mu); - pi_1_locked = false; - } + polling_island *next_1 = NULL; + polling_island *next_2 = NULL; + + /* The algorithm is simple: + - Go to the last polling islands in the linked lists *pi_1 and *pi_2 (and + keep updating pi_1 and pi_2) + - Then obtain locks on the islands by following a lock order rule of + locking polling_island with lower address first + Special case: Before obtaining the locks, check if pi_1 and pi_2 are + pointing to the same island. If that is the case, we can just call + polling_island_lock() + - After obtaining both the locks, double check that the polling islands + are still the last polling islands in their respective linked lists + (this is because there might have been polling island merges before + we got the lock) + - If the polling islands are the last islands, we are done. If not, + release the locks and continue the process from the first step */ + while (true) { + next_1 = (polling_island *)gpr_atm_acq_load(&pi_1->merged_to); + while (next_1 != NULL) { + pi_1 = next_1; + next_1 = (polling_island *)gpr_atm_acq_load(&pi_1->merged_to); + } - GPR_SWAP(polling_island *, pi_1, pi_2); - num_swaps++; + next_2 = (polling_island *)gpr_atm_acq_load(&pi_2->merged_to); + while (next_2 != NULL) { + pi_2 = next_2; + next_2 = (polling_island *)gpr_atm_acq_load(&pi_2->merged_to); } - /* The following assertions are true at this point: - - pi_1 != pi_2 - - pi_1 < pi_2 (address of pi_1 is less than that of pi_2) - - pi_1 MAYBE locked - - pi_2 is NOT locked */ + if (pi_1 == pi_2) { + pi_1 = pi_2 = polling_island_lock(pi_1); + break; + } - /* Lock pi_1 (if pi_1 is pointing to the terminal node in the list) */ - if (!pi_1_locked) { + if (pi_1 < pi_2) { + gpr_mu_lock(&pi_1->mu); + gpr_mu_lock(&pi_2->mu); + } else { + gpr_mu_lock(&pi_2->mu); gpr_mu_lock(&pi_1->mu); - pi_1_locked = true; - - /* If pi_1 is not terminal node (i.e pi_1->merged_to != NULL), we are not - done locking this polling_island yet. Release the lock on this node and - advance pi_1 to the next node in the list; and go to the beginning of - the loop (we can't proceed to locking pi_2 unless we locked pi_1 first) - */ - if (pi_1->merged_to != NULL) { - temp = pi_1->merged_to; - polling_island_unref_and_unlock(pi_1, 1); - pi_1 = temp; - pi_1_locked = false; - - continue; - } } - /* The following assertions are true at this point: - - pi_1 is locked - - pi_2 is unlocked - - pi_1 != pi_2 */ - - gpr_mu_lock(&pi_2->mu); - pi_2_locked = true; - - /* If pi_2 is not terminal node, we are not done locking this polling_island - yet. Release the lock and update pi_2 to the next node in the list */ - if (pi_2->merged_to != NULL) { - temp = pi_2->merged_to; - polling_island_unref_and_unlock(pi_2, 1); - pi_2 = temp; - pi_2_locked = false; + next_1 = (polling_island *)gpr_atm_acq_load(&pi_1->merged_to); + next_2 = (polling_island *)gpr_atm_acq_load(&pi_2->merged_to); + if (next_1 == NULL && next_2 == NULL) { + break; } - } - /* At this point, either pi_1 == pi_2 AND/OR we got both locks */ - if (pi_1 == pi_2) { - /* We may or may not have gotten the lock. If we didn't, walk the rest of - the polling_island list and get the lock */ - GPR_ASSERT(pi_1_locked || (!pi_1_locked && !pi_2_locked)); - if (!pi_1_locked) { - pi_1 = pi_2 = polling_island_update_and_lock(pi_1, 2, 0); - } - } else { - GPR_ASSERT(pi_1_locked && pi_2_locked); - /* If we swapped pi_1 and pi_2 odd number of times, do one more swap so that - pi_1 and pi_2 point to the same polling_island lists they started off - with at the beginning of this function (i.e *p and *q respectively) */ - if (num_swaps % 2 > 0) { - GPR_SWAP(polling_island *, pi_1, pi_2); - } + gpr_mu_unlock(&pi_1->mu); + gpr_mu_unlock(&pi_2->mu); } *p = pi_1; @@ -546,7 +611,7 @@ void polling_island_pair_update_and_lock(polling_island **p, polling_island *polling_island_merge(polling_island *p, polling_island *q) { /* Get locks on both the polling islands */ - polling_island_pair_update_and_lock(&p, &q); + polling_island_lock_pair(&p, &q); if (p == q) { /* Nothing needs to be done here */ @@ -568,15 +633,14 @@ polling_island *polling_island_merge(polling_island *p, polling_island *q) { /* Wakeup all the pollers (if any) on p so that they can pickup this change */ polling_island_add_wakeup_fd_locked(p, &polling_island_wakeup_fd); - p->merged_to = q; + /* Add the 'merged_to' link from p --> q */ + gpr_atm_rel_store(&p->merged_to, q); + PI_ADD_REF(q, "pi_merge"); /* To account for the new incoming ref from p */ - /* - The merged polling island (i.e q) inherits all the ref counts of the - island merging with it (i.e p) - - The island p will lose a ref count */ - q->ref_cnt += p->ref_cnt; - polling_island_unref_and_unlock(p, 1); /* Decrement refcount */ - polling_island_unref_and_unlock(q, 0); /* Just Unlock. Don't decrement ref */ + gpr_mu_unlock(&p->mu); + gpr_mu_unlock(&q->mu); + /* Return the merged polling island */ return q; } @@ -667,6 +731,7 @@ static void unref_by(grpc_fd *fd, int n) { fd->freelist_next = fd_freelist; fd_freelist = fd; grpc_iomgr_unregister_object(&fd->iomgr_object); + gpr_mu_unlock(&fd_freelist_mu); } else { GPR_ASSERT(old > n); @@ -785,16 +850,20 @@ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, REF_BY(fd, 1, reason); /* Remove the fd from the polling island: - - Update the fd->polling_island to point to the latest polling island - - Remove the fd from the polling island. - - Remove a ref to the polling island and set fd->polling_island to NULL */ + - Get a lock on the latest polling island (i.e the last island in the + linked list pointed by fd->polling_island). This is the island that + would actually contain the fd + - Remove the fd from the latest polling island + - Unlock the latest polling island + - Set fd->polling_island to NULL (but remove the ref on the polling island + before doing this.) */ gpr_mu_lock(&fd->pi_mu); if (fd->polling_island != NULL) { - fd->polling_island = - polling_island_update_and_lock(fd->polling_island, 1, 0); - polling_island_remove_fd_locked(fd->polling_island, fd, is_fd_closed); + polling_island *pi_latest = polling_island_lock(fd->polling_island); + polling_island_remove_fd_locked(pi_latest, fd, is_fd_closed); + gpr_mu_unlock(&pi_latest->mu); - polling_island_unref_and_unlock(fd->polling_island, 1); + PI_UNREF(fd->polling_island, "fd_orphan"); fd->polling_island = NULL; } gpr_mu_unlock(&fd->pi_mu); @@ -1050,17 +1119,13 @@ static void fd_become_writable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { gpr_mu_unlock(&fd->mu); } -/* Release the reference to pollset->polling_island and set it to NULL. - pollset->mu must be held */ -static void pollset_release_polling_island_locked(grpc_pollset *pollset) { - gpr_mu_lock(&pollset->pi_mu); - if (pollset->polling_island) { - pollset->polling_island = - polling_island_update_and_lock(pollset->polling_island, 1, 0); - polling_island_unref_and_unlock(pollset->polling_island, 1); - pollset->polling_island = NULL; +static void pollset_release_polling_island(grpc_pollset *ps, char *reason) { + gpr_mu_lock(&ps->pi_mu); + if (ps->polling_island != NULL) { + PI_UNREF(ps->polling_island, reason); } - gpr_mu_unlock(&pollset->pi_mu); + ps->polling_island = NULL; + gpr_mu_unlock(&ps->pi_mu); } static void finish_shutdown_locked(grpc_exec_ctx *exec_ctx, @@ -1069,8 +1134,9 @@ static void finish_shutdown_locked(grpc_exec_ctx *exec_ctx, GPR_ASSERT(!pollset_has_workers(pollset)); pollset->finish_shutdown_called = true; - pollset_release_polling_island_locked(pollset); + /* Release the ref and set pollset->polling_island to NULL */ + pollset_release_polling_island(pollset, "ps_shutdown"); grpc_exec_ctx_enqueue(exec_ctx, pollset->shutdown_done, true, NULL); } @@ -1110,7 +1176,7 @@ static void pollset_reset(grpc_pollset *pollset) { pollset->finish_shutdown_called = false; pollset->kicked_without_pollers = false; pollset->shutdown_done = NULL; - pollset_release_polling_island_locked(pollset); + pollset_release_polling_island(pollset, "ps_reset"); } #define GRPC_EPOLL_MAX_EVENTS 1000 @@ -1124,28 +1190,37 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, GPR_TIMER_BEGIN("pollset_work_and_unlock", 0); /* We need to get the epoll_fd to wait on. The epoll_fd is in inside the - polling island pointed by pollset->polling_island. + latest polling island pointed by pollset->polling_island. Acquire the following locks: - pollset->mu (which we already have) - pollset->pi_mu - - pollset->polling_island->mu (call polling_island_update_and_lock())*/ + - pollset->polling_island lock */ gpr_mu_lock(&pollset->pi_mu); - pi = pollset->polling_island; - if (pi == NULL) { - pi = polling_island_create(NULL, 1); + if (pollset->polling_island == NULL) { + pollset->polling_island = polling_island_create(NULL); + PI_ADD_REF(pollset->polling_island, "ps"); } - /* In addition to locking the polling island, add a ref so that the island - does not get destroyed (which means the epoll_fd won't be closed) while - we are are doing an epoll_wait() on the epoll_fd */ - pi = polling_island_update_and_lock(pi, 1, 1); + pi = polling_island_lock(pollset->polling_island); epoll_fd = pi->epoll_fd; - /* Update the pollset->polling_island */ - pollset->polling_island = pi; + /* Update the pollset->polling_island since the island being pointed by + pollset->polling_island may not be the latest (i.e pi) */ + if (pollset->polling_island != pi) { + /* Always do PI_ADD_REF before PI_UNREF because PI_UNREF may cause the + polling island to be deleted */ + PI_ADD_REF(pi, "ps"); + PI_UNREF(pollset->polling_island, "ps"); + pollset->polling_island = pi; + } + + /* Add an extra ref so that the island does not get destroyed (which means + the epoll_fd won't be closed) while we are are doing an epoll_wait() on the + epoll_fd */ + PI_ADD_REF(pi, "ps_work"); - polling_island_unref_and_unlock(pollset->polling_island, 0); /* Keep the ref*/ + gpr_mu_unlock(&pi->mu); gpr_mu_unlock(&pollset->pi_mu); gpr_mu_unlock(&pollset->mu); @@ -1193,14 +1268,12 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, GPR_ASSERT(pi != NULL); - /* Before leaving, release the extra ref we added to the polling island */ - /* It is important to note that at this point 'pi' may not be the same as - * pollset->polling_island. This is because pollset->polling_island pointer - * gets updated whenever the underlying polling island is merged with another - * island and while we are doing epoll_wait() above, the polling island may - * have been merged */ - pi = polling_island_update_and_lock(pi, 1, 0); /* No new ref added */ - polling_island_unref_and_unlock(pi, 1); + /* Before leaving, release the extra ref we added to the polling island. It + is important to use "pi" here (i.e our old copy of pollset->polling_island + that we got before releasing the polling island lock). This is because + pollset->polling_island pointer might get udpated in other parts of the + code when there is an island merge while we are doing epoll_wait() above */ + PI_UNREF(pi, "ps_work"); GPR_TIMER_END("pollset_work_and_unlock", 0); } @@ -1297,20 +1370,34 @@ static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, if (fd->polling_island == pollset->polling_island) { pi_new = fd->polling_island; if (pi_new == NULL) { - pi_new = polling_island_create(fd, 2); + pi_new = polling_island_create(fd); } } else if (fd->polling_island == NULL) { - pi_new = polling_island_update_and_lock(pollset->polling_island, 1, 1); - polling_island_add_fds_locked(pollset->polling_island, &fd, 1, true); + pi_new = polling_island_lock(pollset->polling_island); + polling_island_add_fds_locked(pi_new, &fd, 1, true); gpr_mu_unlock(&pi_new->mu); } else if (pollset->polling_island == NULL) { - pi_new = polling_island_update_and_lock(fd->polling_island, 1, 1); + pi_new = polling_island_lock(fd->polling_island); gpr_mu_unlock(&pi_new->mu); } else { pi_new = polling_island_merge(fd->polling_island, pollset->polling_island); } - fd->polling_island = pollset->polling_island = pi_new; + if (fd->polling_island != pi_new) { + PI_ADD_REF(pi_new, "fd"); + if (fd->polling_island != NULL) { + PI_UNREF(fd->polling_island, "fd"); + } + fd->polling_island = pi_new; + } + + if (pollset->polling_island != pi_new) { + PI_ADD_REF(pi_new, "ps"); + if (pollset->polling_island != NULL) { + PI_UNREF(pollset->polling_island, "ps"); + } + pollset->polling_island = pi_new; + } gpr_mu_unlock(&fd->pi_mu); gpr_mu_unlock(&pollset->pi_mu); @@ -1481,28 +1568,19 @@ void *grpc_pollset_get_polling_island(grpc_pollset *ps) { return pi; } -static polling_island *get_polling_island(polling_island *p) { - if (p == NULL) { - return NULL; - } +bool grpc_are_polling_islands_equal(void *p, void *q) { + polling_island *p1 = p; + polling_island *p2 = q; - polling_island *next; - gpr_mu_lock(&p->mu); - while (p->merged_to != NULL) { - next = p->merged_to; - gpr_mu_unlock(&p->mu); - p = next; - gpr_mu_lock(&p->mu); + polling_island_lock_pair(&p1, &p2); + if (p1 == p2) { + gpr_mu_unlock(&p1->mu); + } else { + gpr_mu_unlock(&p1->mu); + gpr_mu_unlock(&p2->mu); } - gpr_mu_unlock(&p->mu); - - return p; -} -bool grpc_are_polling_islands_equal(void *p, void *q) { - p = get_polling_island(p); - q = get_polling_island(q); - return p == q; + return p1 == p2; } /******************************************************************************* From 65c6c59bcddd2847eb26eb7518747ebeea839d0b Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Tue, 21 Jun 2016 08:27:07 -0700 Subject: [PATCH 1207/1894] Fix refcounting tsan failures and grab pollset lock in the function pollset_add_fd --- src/core/lib/iomgr/ev_epoll_linux.c | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 72288889c02..7cc69c876db 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -291,11 +291,11 @@ void pi_unref_dbg(polling_island *pi, int ref_cnt, char *reason, char *file, #endif long pi_add_ref(polling_island *pi, int ref_cnt) { - return gpr_atm_no_barrier_fetch_add(&pi->ref_count, ref_cnt); + return gpr_atm_full_fetch_add(&pi->ref_count, ref_cnt); } long pi_unref(polling_island *pi, int ref_cnt) { - long old_cnt = gpr_atm_no_barrier_fetch_add(&pi->ref_count, -ref_cnt); + long old_cnt = gpr_atm_full_fetch_add(&pi->ref_count, -ref_cnt); /* If ref count went to zero, delete the polling island. Note that this need not be done under a lock. Once the ref count goes to zero, we are @@ -311,6 +311,8 @@ long pi_unref(polling_island *pi, int ref_cnt) { if (next != NULL) { PI_UNREF(next, "pi_delete"); /* Recursive call */ } + } else { + GPR_ASSERT(old_cnt > ref_cnt); } return old_cnt; @@ -445,8 +447,8 @@ static polling_island *polling_island_create(grpc_fd *initial_fd) { pi->fds = NULL; } - gpr_atm_no_barrier_store(&pi->ref_count, 0); - gpr_atm_no_barrier_store(&pi->merged_to, NULL); + gpr_atm_rel_store(&pi->ref_count, 0); + gpr_atm_rel_store(&pi->merged_to, NULL); pi->epoll_fd = epoll_create1(EPOLL_CLOEXEC); @@ -1347,7 +1349,7 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_fd *fd) { - /* TODO sreek - Double check if we need to get a pollset->mu lock here */ + gpr_mu_lock(&pollset->mu); gpr_mu_lock(&pollset->pi_mu); gpr_mu_lock(&fd->pi_mu); @@ -1401,6 +1403,7 @@ static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, gpr_mu_unlock(&fd->pi_mu); gpr_mu_unlock(&pollset->pi_mu); + gpr_mu_unlock(&pollset->mu); } /******************************************************************************* From d263b925e8b8ce36042f34eda34715696b6eef3e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 21 Jun 2016 09:15:57 -0700 Subject: [PATCH 1208/1894] Make sure to poll cq --- test/cpp/end2end/server_builder_plugin_test.cc | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/test/cpp/end2end/server_builder_plugin_test.cc b/test/cpp/end2end/server_builder_plugin_test.cc index 75f23b64a73..7d0b467d816 100644 --- a/test/cpp/end2end/server_builder_plugin_test.cc +++ b/test/cpp/end2end/server_builder_plugin_test.cc @@ -37,6 +37,7 @@ #include #include #include +#include #include #include #include @@ -188,6 +189,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam { grpc::string server_address = "localhost:" + to_string(port_); builder_->AddListeningPort(server_address, InsecureServerCredentials()); cq_ = builder_->AddCompletionQueue(); + cq_thread_ = grpc::thread(std::bind(&ServerBuilderPluginTest::RunCQ, this)); server_ = builder_->BuildAndStart(); EXPECT_TRUE(CheckPresent()); } @@ -204,11 +206,8 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam { EXPECT_TRUE(plugin->init_server_is_called()); EXPECT_TRUE(plugin->finish_is_called()); server_->Shutdown(); - void* tag; - bool ok; cq_->Shutdown(); - while (cq_->Next(&tag, &ok)) - ; + cq_thread_.join(); } string to_string(const int number) { @@ -223,6 +222,7 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam { std::unique_ptr stub_; std::unique_ptr cq_; std::unique_ptr server_; + grpc::thread cq_thread_; TestServiceImpl service_; int port_; @@ -238,6 +238,13 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam { return nullptr; } } + + void RunCQ() { + void* tag; + bool ok; + while (cq_->Next(&tag, &ok)) + ; + } }; TEST_P(ServerBuilderPluginTest, PluginWithoutServiceTest) { From 04a468122f0072cbd8a67d66dfd8243ce3ddface Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Tue, 21 Jun 2016 09:16:57 -0700 Subject: [PATCH 1209/1894] Add comment --- test/cpp/end2end/server_builder_plugin_test.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/test/cpp/end2end/server_builder_plugin_test.cc b/test/cpp/end2end/server_builder_plugin_test.cc index 7d0b467d816..778a2be573e 100644 --- a/test/cpp/end2end/server_builder_plugin_test.cc +++ b/test/cpp/end2end/server_builder_plugin_test.cc @@ -188,6 +188,8 @@ class ServerBuilderPluginTest : public ::testing::TestWithParam { void StartServer() { grpc::string server_address = "localhost:" + to_string(port_); builder_->AddListeningPort(server_address, InsecureServerCredentials()); + // we run some tests without a service, and for those we need to supply a + // frequently polled completion queue cq_ = builder_->AddCompletionQueue(); cq_thread_ = grpc::thread(std::bind(&ServerBuilderPluginTest::RunCQ, this)); server_ = builder_->BuildAndStart(); From 939e9ca6d82f2558702e5fa859d16ca7052f746b Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 21 Jun 2016 08:00:42 -0700 Subject: [PATCH 1210/1894] use template to generate project.json files --- .../csharp/Grpc.Auth/project.json.template | 34 ++++++++++++++ .../Grpc.Core.Tests/project.json.template | 24 ++++++++++ .../csharp/Grpc.Core/project.json.template | 44 ++++++++++++++++++ .../project.json.template | 21 +++++++++ .../project.json.template | 21 +++++++++ .../Grpc.Examples.Tests/project.json.template | 23 ++++++++++ .../Grpc.Examples/project.json.template | 27 +++++++++++ .../project.json.template | 23 ++++++++++ .../Grpc.HealthCheck/project.json.template | 37 +++++++++++++++ .../project.json.template | 22 +++++++++ .../project.json.template | 22 +++++++++ .../project.json.template | 22 +++++++++ .../project.json.template | 22 +++++++++ .../project.json.template | 38 ++++++++++++++++ templates/src/csharp/build_options.include | 45 +++++++++++++++++++ 15 files changed, 425 insertions(+) create mode 100644 templates/src/csharp/Grpc.Auth/project.json.template create mode 100644 templates/src/csharp/Grpc.Core.Tests/project.json.template create mode 100644 templates/src/csharp/Grpc.Core/project.json.template create mode 100644 templates/src/csharp/Grpc.Examples.MathClient/project.json.template create mode 100644 templates/src/csharp/Grpc.Examples.MathServer/project.json.template create mode 100644 templates/src/csharp/Grpc.Examples.Tests/project.json.template create mode 100644 templates/src/csharp/Grpc.Examples/project.json.template create mode 100644 templates/src/csharp/Grpc.HealthCheck.Tests/project.json.template create mode 100644 templates/src/csharp/Grpc.HealthCheck/project.json.template create mode 100644 templates/src/csharp/Grpc.IntegrationTesting.Client/project.json.template create mode 100644 templates/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json.template create mode 100644 templates/src/csharp/Grpc.IntegrationTesting.Server/project.json.template create mode 100644 templates/src/csharp/Grpc.IntegrationTesting.StressClient/project.json.template create mode 100644 templates/src/csharp/Grpc.IntegrationTesting/project.json.template create mode 100644 templates/src/csharp/build_options.include diff --git a/templates/src/csharp/Grpc.Auth/project.json.template b/templates/src/csharp/Grpc.Auth/project.json.template new file mode 100644 index 00000000000..90ad0eb0891 --- /dev/null +++ b/templates/src/csharp/Grpc.Auth/project.json.template @@ -0,0 +1,34 @@ +%YAML 1.2 +--- | + { + "version": "${settings.csharp_version}", + "title": "gRPC C# Auth", + "authors": [ "Google Inc." ], + "copyright": "Copyright 2015, Google Inc.", + "packOptions": { + "summary": "Auth library for C# implementation of gRPC - an RPC library and framework", + "description": "Auth library for C# implementation of gRPC - an RPC library and framework. See project site for more info.", + "owners": [ "grpc-packages" ], + "licenseUrl": "https://github.com/grpc/grpc/blob/master/LICENSE", + "projectUrl": "https://github.com/grpc/grpc", + "requireLicenseAcceptance": false, + "tags": [ "gRPC RPC Protocol HTTP/2 Auth OAuth2" ], + }, + "dependencies": { + "Grpc.Core": "${settings.csharp_version}", + "Google.Apis.Auth": "1.11.1" + }, + "frameworks": { + "net45": { }, + "netstandard1.5": { + "imports": [ + "net45" + ], + "dependencies": { + "Microsoft.NETCore.Portable.Compatibility": "1.0.1-rc2-24027", + "NETStandard.Library": "1.5.0-rc2-24027", + "System.Threading.Tasks": "4.0.11-rc2-24027" + } + } + } + } diff --git a/templates/src/csharp/Grpc.Core.Tests/project.json.template b/templates/src/csharp/Grpc.Core.Tests/project.json.template new file mode 100644 index 00000000000..bc9fa3e63a9 --- /dev/null +++ b/templates/src/csharp/Grpc.Core.Tests/project.json.template @@ -0,0 +1,24 @@ +%YAML 1.2 +--- | + { + <%include file="../build_options.include" args="executable=True"/> + "dependencies": { + "Grpc.Core": { + "target": "project" + }, + "Newtonsoft.Json": "8.0.3", + "NUnit": "3.2.0", + "NUnitLite": "3.2.0-*" + }, + "frameworks": { + "net45": { }, + "netstandard1.5": { + "imports": [ + "portable-net45" + ], + "dependencies": { + "NETStandard.Library": "1.5.0-rc2-24027" + } + } + }, + } diff --git a/templates/src/csharp/Grpc.Core/project.json.template b/templates/src/csharp/Grpc.Core/project.json.template new file mode 100644 index 00000000000..6f9197f572f --- /dev/null +++ b/templates/src/csharp/Grpc.Core/project.json.template @@ -0,0 +1,44 @@ +%YAML 1.2 +--- | + { + "version": "${settings.csharp_version}", + "title": "gRPC C# Core", + "authors": [ "Google Inc." ], + "copyright": "Copyright 2015, Google Inc.", + "packOptions": { + "summary": "Core C# implementation of gRPC - an RPC library and framework", + "description": "Core C# implementation of gRPC - an RPC library and framework. See project site for more info.", + "owners": [ "grpc-packages" ], + "licenseUrl": "https://github.com/grpc/grpc/blob/master/LICENSE", + "projectUrl": "https://github.com/grpc/grpc", + "requireLicenseAcceptance": false, + "tags": [ "gRPC RPC Protocol HTTP/2" ], + "files": { + "build/net45/": "Grpc.Core.targets", + "build/native/bin/windows_x86/": "../nativelibs/windows_x86/grpc_csharp_ext.dll", + "build/native/bin/windows_x64/": "../nativelibs/windows_x64/grpc_csharp_ext.dll", + "build/native/bin/linux_x86/": "../nativelibs/linux_x86/libgrpc_csharp_ext.so", + "build/native/bin/linux_x64/": "../nativelibs/linux_x64/libgrpc_csharp_ext.so", + "build/native/bin/macosx_x86/": "../nativelibs/macosx_x86/libgrpc_csharp_ext.dylib", + "build/native/bin/macosx_x64/": "../nativelibs/macosx_x64/libgrpc_csharp_ext.dylib" + } + }, + "buildOptions": { + "embed": [ "../../../etc/roots.pem" ] + }, + "dependencies": { + "Ix-Async": "1.2.5" + }, + "frameworks": { + "net45": { }, + "netstandard1.5": { + "imports": [ + "portable-net45" + ], + "dependencies": { + "NETStandard.Library": "1.5.0-rc2-24027", + "System.Threading.Thread": "4.0.0-rc2-24027" + } + } + } + } diff --git a/templates/src/csharp/Grpc.Examples.MathClient/project.json.template b/templates/src/csharp/Grpc.Examples.MathClient/project.json.template new file mode 100644 index 00000000000..fba401c3a47 --- /dev/null +++ b/templates/src/csharp/Grpc.Examples.MathClient/project.json.template @@ -0,0 +1,21 @@ +%YAML 1.2 +--- | + { + <%include file="../build_options.include" args="executable=True"/> + "dependencies": { + "Grpc.Examples": { + "target": "project" + } + }, + "frameworks": { + "net45": { }, + "netstandard1.5": { + "imports": [ + "portable-net45" + ], + "dependencies": { + "NETStandard.Library": "1.5.0-rc2-24027" + } + } + } + } diff --git a/templates/src/csharp/Grpc.Examples.MathServer/project.json.template b/templates/src/csharp/Grpc.Examples.MathServer/project.json.template new file mode 100644 index 00000000000..fba401c3a47 --- /dev/null +++ b/templates/src/csharp/Grpc.Examples.MathServer/project.json.template @@ -0,0 +1,21 @@ +%YAML 1.2 +--- | + { + <%include file="../build_options.include" args="executable=True"/> + "dependencies": { + "Grpc.Examples": { + "target": "project" + } + }, + "frameworks": { + "net45": { }, + "netstandard1.5": { + "imports": [ + "portable-net45" + ], + "dependencies": { + "NETStandard.Library": "1.5.0-rc2-24027" + } + } + } + } diff --git a/templates/src/csharp/Grpc.Examples.Tests/project.json.template b/templates/src/csharp/Grpc.Examples.Tests/project.json.template new file mode 100644 index 00000000000..21765f0565c --- /dev/null +++ b/templates/src/csharp/Grpc.Examples.Tests/project.json.template @@ -0,0 +1,23 @@ +%YAML 1.2 +--- | + { + <%include file="../build_options.include" args="executable=True"/> + "dependencies": { + "Grpc.Examples": { + "target": "project" + }, + "NUnit": "3.2.0", + "NUnitLite": "3.2.0-*" + }, + "frameworks": { + "net45": { }, + "netstandard1.5": { + "imports": [ + "portable-net45" + ], + "dependencies": { + "NETStandard.Library": "1.5.0-rc2-24027" + } + } + } + } diff --git a/templates/src/csharp/Grpc.Examples/project.json.template b/templates/src/csharp/Grpc.Examples/project.json.template new file mode 100644 index 00000000000..715fc087256 --- /dev/null +++ b/templates/src/csharp/Grpc.Examples/project.json.template @@ -0,0 +1,27 @@ +%YAML 1.2 +--- | + { + <%include file="../build_options.include" args="executable=False"/> + "dependencies": { + "Grpc.Core": { + "target": "project" + }, + "Google.Protobuf": "3.0.0-beta3" + }, + "frameworks": { + "net45": { + "frameworkAssemblies": { + "System.Runtime": "", + "System.IO": "" + } + }, + "netstandard1.5": { + "imports": [ + "portable-net45" + ], + "dependencies": { + "NETStandard.Library": "1.5.0-rc2-24027" + } + } + } + } diff --git a/templates/src/csharp/Grpc.HealthCheck.Tests/project.json.template b/templates/src/csharp/Grpc.HealthCheck.Tests/project.json.template new file mode 100644 index 00000000000..79e67226cb4 --- /dev/null +++ b/templates/src/csharp/Grpc.HealthCheck.Tests/project.json.template @@ -0,0 +1,23 @@ +%YAML 1.2 +--- | + { + <%include file="../build_options.include" args="executable=True"/> + "dependencies": { + "Grpc.HealthCheck": { + "target": "project" + }, + "NUnit": "3.2.0", + "NUnitLite": "3.2.0-*" + }, + "frameworks": { + "net45": { }, + "netstandard1.5": { + "imports": [ + "portable-net45" + ], + "dependencies": { + "NETStandard.Library": "1.5.0-rc2-24027" + } + } + } + } diff --git a/templates/src/csharp/Grpc.HealthCheck/project.json.template b/templates/src/csharp/Grpc.HealthCheck/project.json.template new file mode 100644 index 00000000000..59073af7eec --- /dev/null +++ b/templates/src/csharp/Grpc.HealthCheck/project.json.template @@ -0,0 +1,37 @@ +%YAML 1.2 +--- | + { + "version": "${settings.csharp_version}", + "title": "gRPC C# Healthchecking", + "authors": [ "Google Inc." ], + "copyright": "Copyright 2015, Google Inc.", + "packOptions": { + "summary": "Implementation of gRPC health service", + "description": "Example implementation of grpc.health.v1 service that can be used for health-checking.", + "owners": [ "grpc-packages" ], + "licenseUrl": "https://github.com/grpc/grpc/blob/master/LICENSE", + "projectUrl": "https://github.com/grpc/grpc", + "requireLicenseAcceptance": false, + "tags": [ "gRPC health check" ] + }, + "dependencies": { + "Grpc.Core": "${settings.csharp_version}", + "Google.Protobuf": "3.0.0-beta3" + }, + "frameworks": { + "net45": { + "frameworkAssemblies": { + "System.Runtime": "", + "System.IO": "" + } + }, + "netstandard1.5": { + "imports": [ + "portable-net45" + ], + "dependencies": { + "NETStandard.Library": "1.5.0-rc2-24027" + } + } + } + } diff --git a/templates/src/csharp/Grpc.IntegrationTesting.Client/project.json.template b/templates/src/csharp/Grpc.IntegrationTesting.Client/project.json.template new file mode 100644 index 00000000000..10ed5493477 --- /dev/null +++ b/templates/src/csharp/Grpc.IntegrationTesting.Client/project.json.template @@ -0,0 +1,22 @@ +%YAML 1.2 +--- | + { + <%include file="../build_options.include" args="executable=True,includeData=True"/> + "dependencies": { + "Grpc.IntegrationTesting": { + "target": "project" + } + }, + "frameworks": { + "net45": { }, + "netstandard1.5": { + "imports": [ + "portable-net45", + "net45" + ], + "dependencies": { + "NETStandard.Library": "1.5.0-rc2-24027" + } + } + } + } diff --git a/templates/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json.template b/templates/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json.template new file mode 100644 index 00000000000..10ed5493477 --- /dev/null +++ b/templates/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json.template @@ -0,0 +1,22 @@ +%YAML 1.2 +--- | + { + <%include file="../build_options.include" args="executable=True,includeData=True"/> + "dependencies": { + "Grpc.IntegrationTesting": { + "target": "project" + } + }, + "frameworks": { + "net45": { }, + "netstandard1.5": { + "imports": [ + "portable-net45", + "net45" + ], + "dependencies": { + "NETStandard.Library": "1.5.0-rc2-24027" + } + } + } + } diff --git a/templates/src/csharp/Grpc.IntegrationTesting.Server/project.json.template b/templates/src/csharp/Grpc.IntegrationTesting.Server/project.json.template new file mode 100644 index 00000000000..10ed5493477 --- /dev/null +++ b/templates/src/csharp/Grpc.IntegrationTesting.Server/project.json.template @@ -0,0 +1,22 @@ +%YAML 1.2 +--- | + { + <%include file="../build_options.include" args="executable=True,includeData=True"/> + "dependencies": { + "Grpc.IntegrationTesting": { + "target": "project" + } + }, + "frameworks": { + "net45": { }, + "netstandard1.5": { + "imports": [ + "portable-net45", + "net45" + ], + "dependencies": { + "NETStandard.Library": "1.5.0-rc2-24027" + } + } + } + } diff --git a/templates/src/csharp/Grpc.IntegrationTesting.StressClient/project.json.template b/templates/src/csharp/Grpc.IntegrationTesting.StressClient/project.json.template new file mode 100644 index 00000000000..10ed5493477 --- /dev/null +++ b/templates/src/csharp/Grpc.IntegrationTesting.StressClient/project.json.template @@ -0,0 +1,22 @@ +%YAML 1.2 +--- | + { + <%include file="../build_options.include" args="executable=True,includeData=True"/> + "dependencies": { + "Grpc.IntegrationTesting": { + "target": "project" + } + }, + "frameworks": { + "net45": { }, + "netstandard1.5": { + "imports": [ + "portable-net45", + "net45" + ], + "dependencies": { + "NETStandard.Library": "1.5.0-rc2-24027" + } + } + } + } diff --git a/templates/src/csharp/Grpc.IntegrationTesting/project.json.template b/templates/src/csharp/Grpc.IntegrationTesting/project.json.template new file mode 100644 index 00000000000..31815114857 --- /dev/null +++ b/templates/src/csharp/Grpc.IntegrationTesting/project.json.template @@ -0,0 +1,38 @@ +%YAML 1.2 +--- | + { + <%include file="../build_options.include" args="executable=True,includeData=True"/> + "dependencies": { + "Grpc.Auth": { + "target": "project" + }, + "Grpc.Core": { + "target": "project" + }, + "Google.Protobuf": "3.0.0-beta3", + "CommandLineParser": "1.9.71", + "NUnit": "3.2.0", + "NUnitLite": "3.2.0-*" + }, + "frameworks": { + "net45": { + "dependencies": { + "Moq": "4.2.1510.2205" + }, + "frameworkAssemblies": { + "System.Runtime": "", + "System.IO": "" + } + }, + "netstandard1.5": { + "imports": [ + "portable-net45", + "net45" + ], + "dependencies": { + "NETStandard.Library": "1.5.0-rc2-24027", + "System.Linq.Expressions": "4.0.11-rc2-24027" + } + } + } + } diff --git a/templates/src/csharp/build_options.include b/templates/src/csharp/build_options.include new file mode 100644 index 00000000000..468d281618c --- /dev/null +++ b/templates/src/csharp/build_options.include @@ -0,0 +1,45 @@ +<%page args="executable=False,includeData=False"/>\ +"buildOptions": { + % if executable: + "emitEntryPoint": true + % endif + }, + % if executable: + "configurations": { + "Debug": { + "buildOptions": { + "copyToOutput": { + % if includeData: + "include": "data/*", + % endif + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/dbg/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/dbg/libgrpc_csharp_ext.dylib" + } + } + } + }, + "Release": { + "buildOptions": { + "copyToOutput": { + % if includeData: + "include": "data/*", + % endif + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/opt/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/opt/libgrpc_csharp_ext.dylib" + } + } + } + } + }, + "runtimes": { + "win7-x64": { }, + "debian.8-x64": { }, + "osx.10.11-x64": { } + }, + % endif \ No newline at end of file From 381e26a21eb0d23f55653da1f611ace55ee8b662 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 21 Jun 2016 08:37:22 -0700 Subject: [PATCH 1211/1894] regenerate project.json files --- src/csharp/Grpc.Auth/project.json | 4 +- src/csharp/Grpc.Core.Tests/project.json | 40 +++++++++++++---- src/csharp/Grpc.Core/project.json | 2 +- .../Grpc.Examples.MathClient/project.json | 40 +++++++++++++---- .../Grpc.Examples.MathServer/project.json | 40 +++++++++++++---- src/csharp/Grpc.Examples.Tests/project.json | 40 +++++++++++++---- src/csharp/Grpc.Examples/project.json | 3 ++ .../Grpc.HealthCheck.Tests/project.json | 40 +++++++++++++---- src/csharp/Grpc.HealthCheck/project.json | 4 +- .../project.json | 42 +++++++++++++---- .../project.json | 42 +++++++++++++---- .../project.json | 42 +++++++++++++---- .../project.json | 42 +++++++++++++---- .../Grpc.IntegrationTesting/project.json | 45 ++++++++++++++----- 14 files changed, 329 insertions(+), 97 deletions(-) diff --git a/src/csharp/Grpc.Auth/project.json b/src/csharp/Grpc.Auth/project.json index 57539f2976b..1677565824b 100644 --- a/src/csharp/Grpc.Auth/project.json +++ b/src/csharp/Grpc.Auth/project.json @@ -1,5 +1,5 @@ { - "version": "0.14.0-anexperiment", + "version": "0.15.0-dev", "title": "gRPC C# Auth", "authors": [ "Google Inc." ], "copyright": "Copyright 2015, Google Inc.", @@ -13,7 +13,7 @@ "tags": [ "gRPC RPC Protocol HTTP/2 Auth OAuth2" ], }, "dependencies": { - "Grpc.Core": "0.14.0-anexperiment", + "Grpc.Core": "0.15.0-dev", "Google.Apis.Auth": "1.11.1" }, "frameworks": { diff --git a/src/csharp/Grpc.Core.Tests/project.json b/src/csharp/Grpc.Core.Tests/project.json index 95f40fdbbde..3ad081df39e 100644 --- a/src/csharp/Grpc.Core.Tests/project.json +++ b/src/csharp/Grpc.Core.Tests/project.json @@ -1,13 +1,39 @@ { "buildOptions": { - "copyToOutput": { - "mappings": { - "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", - "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll" + "emitEntryPoint": true + }, + "configurations": { + "Debug": { + "buildOptions": { + "copyToOutput": { + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/dbg/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/dbg/libgrpc_csharp_ext.dylib" + } + } } }, - "emitEntryPoint": true + "Release": { + "buildOptions": { + "copyToOutput": { + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/opt/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/opt/libgrpc_csharp_ext.dylib" + } + } + } + } }, + "runtimes": { + "win7-x64": { }, + "debian.8-x64": { }, + "osx.10.11-x64": { } + }, + "dependencies": { "Grpc.Core": { "target": "project" @@ -27,8 +53,4 @@ } } }, - "runtimes": { - "win7-x64": { }, - "debian.8-x64": {} - } } diff --git a/src/csharp/Grpc.Core/project.json b/src/csharp/Grpc.Core/project.json index ba3dc15495d..7253107e04a 100644 --- a/src/csharp/Grpc.Core/project.json +++ b/src/csharp/Grpc.Core/project.json @@ -1,5 +1,5 @@ { - "version": "0.14.0-anexperiment", + "version": "0.15.0-dev", "title": "gRPC C# Core", "authors": [ "Google Inc." ], "copyright": "Copyright 2015, Google Inc.", diff --git a/src/csharp/Grpc.Examples.MathClient/project.json b/src/csharp/Grpc.Examples.MathClient/project.json index 4c1ea780412..b254f15af87 100644 --- a/src/csharp/Grpc.Examples.MathClient/project.json +++ b/src/csharp/Grpc.Examples.MathClient/project.json @@ -1,13 +1,39 @@ { "buildOptions": { - "copyToOutput": { - "mappings": { - "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", - "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll" + "emitEntryPoint": true + }, + "configurations": { + "Debug": { + "buildOptions": { + "copyToOutput": { + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/dbg/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/dbg/libgrpc_csharp_ext.dylib" + } + } } }, - "emitEntryPoint": true + "Release": { + "buildOptions": { + "copyToOutput": { + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/opt/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/opt/libgrpc_csharp_ext.dylib" + } + } + } + } }, + "runtimes": { + "win7-x64": { }, + "debian.8-x64": { }, + "osx.10.11-x64": { } + }, + "dependencies": { "Grpc.Examples": { "target": "project" @@ -23,9 +49,5 @@ "NETStandard.Library": "1.5.0-rc2-24027" } } - }, - "runtimes": { - "win7-x64": { }, - "debian.8-x64": {} } } diff --git a/src/csharp/Grpc.Examples.MathServer/project.json b/src/csharp/Grpc.Examples.MathServer/project.json index 4c1ea780412..b254f15af87 100644 --- a/src/csharp/Grpc.Examples.MathServer/project.json +++ b/src/csharp/Grpc.Examples.MathServer/project.json @@ -1,13 +1,39 @@ { "buildOptions": { - "copyToOutput": { - "mappings": { - "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", - "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll" + "emitEntryPoint": true + }, + "configurations": { + "Debug": { + "buildOptions": { + "copyToOutput": { + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/dbg/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/dbg/libgrpc_csharp_ext.dylib" + } + } } }, - "emitEntryPoint": true + "Release": { + "buildOptions": { + "copyToOutput": { + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/opt/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/opt/libgrpc_csharp_ext.dylib" + } + } + } + } }, + "runtimes": { + "win7-x64": { }, + "debian.8-x64": { }, + "osx.10.11-x64": { } + }, + "dependencies": { "Grpc.Examples": { "target": "project" @@ -23,9 +49,5 @@ "NETStandard.Library": "1.5.0-rc2-24027" } } - }, - "runtimes": { - "win7-x64": { }, - "debian.8-x64": {} } } diff --git a/src/csharp/Grpc.Examples.Tests/project.json b/src/csharp/Grpc.Examples.Tests/project.json index f41be82bd53..d2779e814f9 100644 --- a/src/csharp/Grpc.Examples.Tests/project.json +++ b/src/csharp/Grpc.Examples.Tests/project.json @@ -1,13 +1,39 @@ { "buildOptions": { - "copyToOutput": { - "mappings": { - "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", - "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll" + "emitEntryPoint": true + }, + "configurations": { + "Debug": { + "buildOptions": { + "copyToOutput": { + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/dbg/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/dbg/libgrpc_csharp_ext.dylib" + } + } } }, - "emitEntryPoint": true + "Release": { + "buildOptions": { + "copyToOutput": { + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/opt/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/opt/libgrpc_csharp_ext.dylib" + } + } + } + } }, + "runtimes": { + "win7-x64": { }, + "debian.8-x64": { }, + "osx.10.11-x64": { } + }, + "dependencies": { "Grpc.Examples": { "target": "project" @@ -25,9 +51,5 @@ "NETStandard.Library": "1.5.0-rc2-24027" } } - }, - "runtimes": { - "win7-x64": { }, - "debian.8-x64": {} } } diff --git a/src/csharp/Grpc.Examples/project.json b/src/csharp/Grpc.Examples/project.json index fe580eb165b..7d3f4dcbb1e 100644 --- a/src/csharp/Grpc.Examples/project.json +++ b/src/csharp/Grpc.Examples/project.json @@ -1,4 +1,7 @@ { + "buildOptions": { + }, + "dependencies": { "Grpc.Core": { "target": "project" diff --git a/src/csharp/Grpc.HealthCheck.Tests/project.json b/src/csharp/Grpc.HealthCheck.Tests/project.json index 5a5f063258a..74599bd4b9e 100644 --- a/src/csharp/Grpc.HealthCheck.Tests/project.json +++ b/src/csharp/Grpc.HealthCheck.Tests/project.json @@ -1,13 +1,39 @@ { "buildOptions": { - "copyToOutput": { - "mappings": { - "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", - "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll" + "emitEntryPoint": true + }, + "configurations": { + "Debug": { + "buildOptions": { + "copyToOutput": { + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/dbg/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/dbg/libgrpc_csharp_ext.dylib" + } + } } }, - "emitEntryPoint": true + "Release": { + "buildOptions": { + "copyToOutput": { + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/opt/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/opt/libgrpc_csharp_ext.dylib" + } + } + } + } }, + "runtimes": { + "win7-x64": { }, + "debian.8-x64": { }, + "osx.10.11-x64": { } + }, + "dependencies": { "Grpc.HealthCheck": { "target": "project" @@ -25,9 +51,5 @@ "NETStandard.Library": "1.5.0-rc2-24027" } } - }, - "runtimes": { - "win7-x64": { }, - "debian.8-x64": {} } } diff --git a/src/csharp/Grpc.HealthCheck/project.json b/src/csharp/Grpc.HealthCheck/project.json index e9fdfad4731..eb57608957a 100644 --- a/src/csharp/Grpc.HealthCheck/project.json +++ b/src/csharp/Grpc.HealthCheck/project.json @@ -1,5 +1,5 @@ { - "version": "0.14.0-anexperiment", + "version": "0.15.0-dev", "title": "gRPC C# Healthchecking", "authors": [ "Google Inc." ], "copyright": "Copyright 2015, Google Inc.", @@ -13,7 +13,7 @@ "tags": [ "gRPC health check" ] }, "dependencies": { - "Grpc.Core": "0.14.0-anexperiment", + "Grpc.Core": "0.15.0-dev", "Google.Protobuf": "3.0.0-beta3" }, "frameworks": { diff --git a/src/csharp/Grpc.IntegrationTesting.Client/project.json b/src/csharp/Grpc.IntegrationTesting.Client/project.json index b19b76c6ccf..e5ba04d7173 100644 --- a/src/csharp/Grpc.IntegrationTesting.Client/project.json +++ b/src/csharp/Grpc.IntegrationTesting.Client/project.json @@ -1,13 +1,41 @@ { "buildOptions": { - "copyToOutput": { - "mappings": { - "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", - "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll" + "emitEntryPoint": true + }, + "configurations": { + "Debug": { + "buildOptions": { + "copyToOutput": { + "include": "data/*", + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/dbg/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/dbg/libgrpc_csharp_ext.dylib" + } + } } }, - "emitEntryPoint": true + "Release": { + "buildOptions": { + "copyToOutput": { + "include": "data/*", + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/opt/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/opt/libgrpc_csharp_ext.dylib" + } + } + } + } }, + "runtimes": { + "win7-x64": { }, + "debian.8-x64": { }, + "osx.10.11-x64": { } + }, + "dependencies": { "Grpc.IntegrationTesting": { "target": "project" @@ -24,9 +52,5 @@ "NETStandard.Library": "1.5.0-rc2-24027" } } - }, - "runtimes": { - "win7-x64": { }, - "debian.8-x64": {} } } diff --git a/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json index b19b76c6ccf..e5ba04d7173 100644 --- a/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json +++ b/src/csharp/Grpc.IntegrationTesting.QpsWorker/project.json @@ -1,13 +1,41 @@ { "buildOptions": { - "copyToOutput": { - "mappings": { - "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", - "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll" + "emitEntryPoint": true + }, + "configurations": { + "Debug": { + "buildOptions": { + "copyToOutput": { + "include": "data/*", + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/dbg/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/dbg/libgrpc_csharp_ext.dylib" + } + } } }, - "emitEntryPoint": true + "Release": { + "buildOptions": { + "copyToOutput": { + "include": "data/*", + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/opt/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/opt/libgrpc_csharp_ext.dylib" + } + } + } + } }, + "runtimes": { + "win7-x64": { }, + "debian.8-x64": { }, + "osx.10.11-x64": { } + }, + "dependencies": { "Grpc.IntegrationTesting": { "target": "project" @@ -24,9 +52,5 @@ "NETStandard.Library": "1.5.0-rc2-24027" } } - }, - "runtimes": { - "win7-x64": { }, - "debian.8-x64": {} } } diff --git a/src/csharp/Grpc.IntegrationTesting.Server/project.json b/src/csharp/Grpc.IntegrationTesting.Server/project.json index b19b76c6ccf..e5ba04d7173 100644 --- a/src/csharp/Grpc.IntegrationTesting.Server/project.json +++ b/src/csharp/Grpc.IntegrationTesting.Server/project.json @@ -1,13 +1,41 @@ { "buildOptions": { - "copyToOutput": { - "mappings": { - "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", - "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll" + "emitEntryPoint": true + }, + "configurations": { + "Debug": { + "buildOptions": { + "copyToOutput": { + "include": "data/*", + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/dbg/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/dbg/libgrpc_csharp_ext.dylib" + } + } } }, - "emitEntryPoint": true + "Release": { + "buildOptions": { + "copyToOutput": { + "include": "data/*", + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/opt/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/opt/libgrpc_csharp_ext.dylib" + } + } + } + } }, + "runtimes": { + "win7-x64": { }, + "debian.8-x64": { }, + "osx.10.11-x64": { } + }, + "dependencies": { "Grpc.IntegrationTesting": { "target": "project" @@ -24,9 +52,5 @@ "NETStandard.Library": "1.5.0-rc2-24027" } } - }, - "runtimes": { - "win7-x64": { }, - "debian.8-x64": {} } } diff --git a/src/csharp/Grpc.IntegrationTesting.StressClient/project.json b/src/csharp/Grpc.IntegrationTesting.StressClient/project.json index b19b76c6ccf..e5ba04d7173 100644 --- a/src/csharp/Grpc.IntegrationTesting.StressClient/project.json +++ b/src/csharp/Grpc.IntegrationTesting.StressClient/project.json @@ -1,13 +1,41 @@ { "buildOptions": { - "copyToOutput": { - "mappings": { - "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", - "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll" + "emitEntryPoint": true + }, + "configurations": { + "Debug": { + "buildOptions": { + "copyToOutput": { + "include": "data/*", + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/dbg/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/dbg/libgrpc_csharp_ext.dylib" + } + } } }, - "emitEntryPoint": true + "Release": { + "buildOptions": { + "copyToOutput": { + "include": "data/*", + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/opt/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/opt/libgrpc_csharp_ext.dylib" + } + } + } + } }, + "runtimes": { + "win7-x64": { }, + "debian.8-x64": { }, + "osx.10.11-x64": { } + }, + "dependencies": { "Grpc.IntegrationTesting": { "target": "project" @@ -24,9 +52,5 @@ "NETStandard.Library": "1.5.0-rc2-24027" } } - }, - "runtimes": { - "win7-x64": { }, - "debian.8-x64": {} } } diff --git a/src/csharp/Grpc.IntegrationTesting/project.json b/src/csharp/Grpc.IntegrationTesting/project.json index be857279892..3493ab0c228 100644 --- a/src/csharp/Grpc.IntegrationTesting/project.json +++ b/src/csharp/Grpc.IntegrationTesting/project.json @@ -1,14 +1,41 @@ { "buildOptions": { - "copyToOutput": { - "mappings": { - "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", - "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll" - }, - "include": "data/*" - }, "emitEntryPoint": true }, + "configurations": { + "Debug": { + "buildOptions": { + "copyToOutput": { + "include": "data/*", + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Debug/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Debug/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/dbg/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/dbg/libgrpc_csharp_ext.dylib" + } + } + } + }, + "Release": { + "buildOptions": { + "copyToOutput": { + "include": "data/*", + "mappings": { + "nativelibs/windows_x64/grpc_csharp_ext.dll": "../../../vsprojects/x64/Release/grpc_csharp_ext.dll", + "nativelibs/windows_x86/grpc_csharp_ext.dll": "../../../vsprojects/Release/grpc_csharp_ext.dll", + "nativelibs/linux_x64/libgrpc_csharp_ext.so": "../../../libs/opt/libgrpc_csharp_ext.so", + "nativelibs/macosx_x64/libgrpc_csharp_ext.dylib": "../../../libs/opt/libgrpc_csharp_ext.dylib" + } + } + } + } + }, + "runtimes": { + "win7-x64": { }, + "debian.8-x64": { }, + "osx.10.11-x64": { } + }, + "dependencies": { "Grpc.Auth": { "target": "project" @@ -41,9 +68,5 @@ "System.Linq.Expressions": "4.0.11-rc2-24027" } } - }, - "runtimes": { - "win7-x64": { }, - "debian.8-x64": {} } } From 6d082203eb23b4abe31e3e80d4ab01bc9bb6f3af Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 21 Jun 2016 10:03:38 -0700 Subject: [PATCH 1212/1894] try making C# tests work on coreclr on mac --- tools/run_tests/run_tests.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index c5cf0135f73..3881c075d46 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -509,10 +509,11 @@ class CSharpLanguage(object): self._docker_distro = 'coreclr' if self.platform == 'mac': - # On Mac, official distribution of mono is 32bit. # TODO(jtattermusch): EMBED_ZLIB=true currently breaks the mac build - self._make_options = ['EMBED_OPENSSL=true', - 'CFLAGS=-m32', 'LDFLAGS=-m32'] + self._make_options = ['EMBED_OPENSSL=true'] + if self.args.compiler != 'coreclr': + # On Mac, official distribution of mono is 32bit. + self._make_options += ['CFLAGS=-m32', 'LDFLAGS=-m32'] else: self._make_options = ['EMBED_OPENSSL=true', 'EMBED_ZLIB=true'] @@ -529,6 +530,9 @@ class CSharpLanguage(object): if self.platform == 'linux': assembly_subdir += '/netstandard1.5/debian.8-x64' assembly_extension = '' + if self.platform == 'mac': + assembly_subdir += '/netstandard1.5/osx.10.11-x64' + assembly_extension = '' else: assembly_subdir += '/netstandard1.5/win7-x64' runtime_cmd = [] From 9f26a149a5da48364ec62dd607e34104bb851c6d Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 21 Jun 2016 10:15:01 -0700 Subject: [PATCH 1213/1894] fixed incomplete sentence --- doc/compression.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/compression.md b/doc/compression.md index 6e455636021..a116ac50a16 100644 --- a/doc/compression.md +++ b/doc/compression.md @@ -81,8 +81,8 @@ initial call. A client doesn't a priori (presently) know which algorithms a server supports. This issue can be addressed with an initial negotiation of capabilities or an automatic retry mechanism. These features will be implemented in the future. Currently however, compression levels are only supported at the -server side, which is aware of the client's capabilities by virtue of the -incoming. +server side, which is aware of the client's capabilities through the incoming +Message-Accept-Encoding header. ### Propagation to child RPCs From 6e2f88c9fd21a06ad265c494325999c679c53375 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 21 Jun 2016 10:52:40 -0700 Subject: [PATCH 1214/1894] compile 64bit extension for coreclr on windows --- tools/run_tests/run_tests.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 3881c075d46..d3819c08840 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -501,8 +501,10 @@ class CSharpLanguage(object): if self.platform == 'windows': # Explicitly choosing between x86 and x64 arch doesn't work yet _check_arch(self.args.arch, ['default']) + # CoreCLR use 64bit runtime by default. + arch_option = 'x64' if self.args.compiler == 'coreclr' else self.args.arch self._make_options = [_windows_toolset_option(self.args.compiler), - _windows_arch_option(self.args.arch)] + _windows_arch_option(arch_option)] else: _check_compiler(self.args.compiler, ['default', 'coreclr']) if self.platform == 'linux' and self.args.compiler == 'coreclr': From d5fd7ddc70e658a0364bd2e43c8a486a25db267c Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Tue, 21 Jun 2016 11:13:23 -0700 Subject: [PATCH 1215/1894] Addressed review comments Removed the silencing for incompatible-pointer-types Removed unused objects Fixed format issues --- src/objective-c/ProtoRPC/ProtoService.m | 9 +++------ src/objective-c/tests/GRPCClientTests.m | 24 ++++++++++++------------ src/objective-c/tests/Podfile | 3 ++- 3 files changed, 17 insertions(+), 19 deletions(-) diff --git a/src/objective-c/ProtoRPC/ProtoService.m b/src/objective-c/ProtoRPC/ProtoService.m index cd9bc7aeac4..97401908519 100644 --- a/src/objective-c/ProtoRPC/ProtoService.m +++ b/src/objective-c/ProtoRPC/ProtoService.m @@ -65,22 +65,19 @@ return self; } -#pragma clang diagnostic push -#pragma clang diagnostic ignored "-Wincompatible-pointer-types" - (ProtoRPC *)RPCToMethod:(NSString *)method requestsWriter:(GRXWriter *)requestsWriter responseClass:(Class)responseClass responsesWriteable:(id)responsesWriteable { - ProtoMethod *methodName = [[ProtoMethod alloc] initWithPackage:_packageName - service:_serviceName - method:method]; + GRPCProtoMethod *methodName = [[GRPCProtoMethod alloc] initWithPackage:_packageName + service:_serviceName + method:method]; return [[ProtoRPC alloc] initWithHost:_host method:methodName requestsWriter:requestsWriter responseClass:responseClass responsesWriteable:responsesWriteable]; } -#pragma clang diagnostic pop @end @implementation GRPCProtoService diff --git a/src/objective-c/tests/GRPCClientTests.m b/src/objective-c/tests/GRPCClientTests.m index 2eca7bf5498..1167a715bb9 100644 --- a/src/objective-c/tests/GRPCClientTests.m +++ b/src/objective-c/tests/GRPCClientTests.m @@ -110,14 +110,14 @@ static GRPCProtoMethod *kUnaryCallMethod; // This method isn't implemented by the remote server. kInexistentMethod = [[GRPCProtoMethod alloc] initWithPackage:kPackage - service:kService - method:@"Inexistent"]; + service:kService + method:@"Inexistent"]; kEmptyCallMethod = [[GRPCProtoMethod alloc] initWithPackage:kPackage - service:kService - method:@"EmptyCall"]; + service:kService + method:@"EmptyCall"]; kUnaryCallMethod = [[GRPCProtoMethod alloc] initWithPackage:kPackage - service:kService - method:@"UnaryCall"]; + service:kService + method:@"UnaryCall"]; } - (void)testConnectionToRemoteServer { @@ -303,9 +303,9 @@ static GRPCProtoMethod *kUnaryCallMethod; // Try to set parameters to nil for GRPCCall. This should cause an exception @try { - GRPCCall *call __unused = [[GRPCCall alloc] initWithHost:nil - path:nil - requestsWriter:nil]; + (void)[[GRPCCall alloc] initWithHost:nil + path:nil + requestsWriter:nil]; XCTFail(@"Did not receive an exception when parameters are nil"); } @catch(NSException *theException) { NSLog(@"Received exception as expected: %@", theException.name); @@ -316,9 +316,9 @@ static GRPCProtoMethod *kUnaryCallMethod; GRXWriter *requestsWriter = [GRXWriter emptyWriter]; [requestsWriter finishWithError:nil]; @try { - GRPCCall *call __unused = [[GRPCCall alloc] initWithHost:kHostAddress - path:kUnaryCallMethod.HTTPPath - requestsWriter:requestsWriter]; + (void)[[GRPCCall alloc] initWithHost:kHostAddress + path:kUnaryCallMethod.HTTPPath + requestsWriter:requestsWriter]; XCTFail(@"Did not receive an exception when GRXWriter has incorrect state."); } @catch(NSException *theException) { NSLog(@"Received exception as expected: %@", theException.name); diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile index d51b18cc34d..6d5f94cbda1 100644 --- a/src/objective-c/tests/Podfile +++ b/src/objective-c/tests/Podfile @@ -6,7 +6,7 @@ install! 'cocoapods', :deterministic_uuids => false def shared_pods pod 'Protobuf', :path => "../../../third_party/protobuf", :inhibit_warnings => true pod 'BoringSSL', :podspec => "..", :inhibit_warnings => true - pod 'CronetFramework', :podspec => "..", :inhibit_warnings => true + pod 'CronetFramework', :podspec => ".." pod 'gRPC', :path => "../../.." pod 'RemoteTest', :path => "RemoteTestClient" end @@ -42,6 +42,7 @@ post_install do |installer| end if target.name == 'gRPC' target.build_configurations.each do |config| + # TODO(zyc) Remove this setting after the issue is resolved # GPR_UNREACHABLE_CODE causes "Control may reach end of non-void # function" warning config.build_settings['GCC_WARN_ABOUT_RETURN_TYPE'] = 'NO' From 8d9e83806d24ad5e1a47bb705d88816bfc8b4864 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Tue, 21 Jun 2016 11:21:48 -0700 Subject: [PATCH 1216/1894] Fixed format issues --- src/objective-c/tests/InteropTests.m | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/objective-c/tests/InteropTests.m b/src/objective-c/tests/InteropTests.m index 60a83259fa6..15ce120c551 100644 --- a/src/objective-c/tests/InteropTests.m +++ b/src/objective-c/tests/InteropTests.m @@ -285,8 +285,8 @@ static cronet_engine *cronetEngine = NULL; GRXBufferedPipe *requestsBuffer = [[GRXBufferedPipe alloc] init]; GRPCProtoCall *call = [_service RPCToStreamingInputCallWithRequestsWriter:requestsBuffer - handler:^(RMTStreamingInputCallResponse *response, - NSError *error) { + handler:^(RMTStreamingInputCallResponse *response, + NSError *error) { XCTAssertEqual(error.code, GRPC_STATUS_CANCELLED); [expectation fulfill]; }]; From 743decdafa3fe9b5e315748e61ff368245ec4b9d Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 21 Jun 2016 11:40:47 -0700 Subject: [PATCH 1217/1894] fix C# --use_docker on linux --- tools/run_tests/run_tests.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index d3819c08840..2a80706e6a8 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -509,6 +509,8 @@ class CSharpLanguage(object): _check_compiler(self.args.compiler, ['default', 'coreclr']) if self.platform == 'linux' and self.args.compiler == 'coreclr': self._docker_distro = 'coreclr' + else: + self._docker_distro = 'jessie' if self.platform == 'mac': # TODO(jtattermusch): EMBED_ZLIB=true currently breaks the mac build From b665dd2722371e5c4a28bbf6cb5f791f8ab5cca9 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 21 Jun 2016 11:52:29 -0700 Subject: [PATCH 1218/1894] reworded some --- doc/compression.md | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/doc/compression.md b/doc/compression.md index a116ac50a16..15fae4d29bf 100644 --- a/doc/compression.md +++ b/doc/compression.md @@ -42,13 +42,13 @@ and RPC settings (for example, if compression would result in small or negative gains). When a message from a client compressed with an unsupported algorithm is -processed by a server, it WILL result in an INVALID\_ARGUMENT error. The server -will include in its response a `grpc-accept-encoding` header specifying the -algorithms it does accept. If an INTERNAL error is returned from the server -despite having used one of the algorithms from the `grpc-accept-encoding` -header, the cause MUST NOT be related to compression. Data sent from a server -compressed with an algorithm not supported by the client WILL result in an -INTERNAL error on the client side. +processed by a server, it WILL result in an INVALID\_ARGUMENT error on the +server. The server will then include in its response a `grpc-accept-encoding` +header specifying the algorithms it does accept. If an INTERNAL error is +returned from the server despite having used one of the algorithms from the +`grpc-accept-encoding` header, the cause MUST NOT be related to compression. +Data sent from a server compressed with an algorithm not supported by the client +WILL result in an INTERNAL error on the client side. Note that a peer MAY choose to not disclose all the encodings it supports. However, if it receives a message compressed in an undisclosed but supported From 3d399cb102510e46ca252213ad2799b40704d33d Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Tue, 21 Jun 2016 11:57:46 -0700 Subject: [PATCH 1219/1894] Fix format issues --- src/objective-c/tests/InteropTests.m | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/objective-c/tests/InteropTests.m b/src/objective-c/tests/InteropTests.m index 15ce120c551..3102cf597a0 100644 --- a/src/objective-c/tests/InteropTests.m +++ b/src/objective-c/tests/InteropTests.m @@ -284,9 +284,10 @@ static cronet_engine *cronetEngine = NULL; // A buffered pipe to which we never write any value acts as a writer that just hangs. GRXBufferedPipe *requestsBuffer = [[GRXBufferedPipe alloc] init]; - GRPCProtoCall *call = [_service RPCToStreamingInputCallWithRequestsWriter:requestsBuffer - handler:^(RMTStreamingInputCallResponse *response, - NSError *error) { + GRPCProtoCall *call = + [_service RPCToStreamingInputCallWithRequestsWriter:requestsBuffer + handler:^(RMTStreamingInputCallResponse *response, + NSError *error) { XCTAssertEqual(error.code, GRPC_STATUS_CANCELLED); [expectation fulfill]; }]; From 7edfcb021f56a1fe0cf1154740cfad7a4be21cc7 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 21 Jun 2016 12:02:33 -0700 Subject: [PATCH 1220/1894] Using inlined BoolValue in lieu of wrappers.proto due to lack of node support --- src/proto/grpc/testing/messages.proto | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/proto/grpc/testing/messages.proto b/src/proto/grpc/testing/messages.proto index e4e748a6913..367752d77bb 100644 --- a/src/proto/grpc/testing/messages.proto +++ b/src/proto/grpc/testing/messages.proto @@ -32,7 +32,13 @@ syntax = "proto3"; -import "google/protobuf/wrappers.proto"; +// TODO(dgq): Go back to using well-known types once +// https://github.com/grpc/grpc/issues/6980 has been fixed. +// import "google/protobuf/wrappers.proto"; +message BoolValue { + // The bool value. + bool value = 1; +} package grpc.testing; @@ -82,13 +88,13 @@ message SimpleRequest { // "nullable" in order to interoperate seamlessly with clients not able to // implement the full compression tests by introspecting the call to verify // the response's compression status. - google.protobuf.BoolValue response_compressed = 6; + BoolValue response_compressed = 6; // Whether server should return a given status EchoStatus response_status = 7; // Whether the server should expect this request to be compressed. - google.protobuf.BoolValue expect_compressed = 8; + BoolValue expect_compressed = 8; } // Unary response, as configured by the request. @@ -111,7 +117,7 @@ message StreamingInputCallRequest { // is "nullable" in order to interoperate seamlessly with servers not able to // implement the full compression tests by introspecting the call to verify // the request's compression status. - google.protobuf.BoolValue expect_compressed = 2; + BoolValue expect_compressed = 2; // Not expecting any payload from the response. } @@ -135,7 +141,7 @@ message ResponseParameters { // "nullable" in order to interoperate seamlessly with clients not able to // implement the full compression tests by introspecting the call to verify // the response's compression status. - google.protobuf.BoolValue compressed = 3; + BoolValue compressed = 3; } // Server-streaming request. From ad8723f6473034aacbfd7c0e80c0ad2b93156db8 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 21 Jun 2016 13:09:29 -0700 Subject: [PATCH 1221/1894] moved up 'package' statement. --- src/proto/grpc/testing/messages.proto | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/proto/grpc/testing/messages.proto b/src/proto/grpc/testing/messages.proto index 367752d77bb..64998c2f231 100644 --- a/src/proto/grpc/testing/messages.proto +++ b/src/proto/grpc/testing/messages.proto @@ -32,6 +32,8 @@ syntax = "proto3"; +package grpc.testing; + // TODO(dgq): Go back to using well-known types once // https://github.com/grpc/grpc/issues/6980 has been fixed. // import "google/protobuf/wrappers.proto"; @@ -40,8 +42,6 @@ message BoolValue { bool value = 1; } -package grpc.testing; - // DEPRECATED, don't use. To be removed shortly. // The type of payload that should be returned. enum PayloadType { From f8bbe72a00ef3827879ea8d377c595c8e96d6a66 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Tue, 21 Jun 2016 14:05:16 -0700 Subject: [PATCH 1222/1894] Make src/node/tools/package.json consistent with its template --- templates/src/node/tools/package.json.template | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/src/node/tools/package.json.template b/templates/src/node/tools/package.json.template index 69ad71a3b83..02824259767 100644 --- a/templates/src/node/tools/package.json.template +++ b/templates/src/node/tools/package.json.template @@ -36,6 +36,7 @@ "index.js", "bin/protoc.js", "bin/protoc_plugin.js", + "bin/google/protobuf", "LICENSE" ], "main": "index.js" From 55145c03d2a164d207e4a112963c91036cae7b28 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 21 Jun 2016 14:51:54 -0700 Subject: [PATCH 1223/1894] first step in transforming grpclb_test to C++ --- Makefile | 197 ++++-- build.yaml | 25 +- .../grpclb/grpclb_test.cc} | 15 +- tools/run_tests/sources_and_headers.json | 38 +- tools/run_tests/tests.json | 42 +- vsprojects/buildtests_c.sln | 27 - .../grpc_test_util/grpc_test_util.vcxproj | 270 ++++++++ .../grpc_test_util.vcxproj.filters | 602 ++++++++++++++++++ .../test/grpclb_test/grpclb_test.vcxproj | 30 +- .../grpclb_test/grpclb_test.vcxproj.filters | 30 +- 10 files changed, 1147 insertions(+), 129 deletions(-) rename test/{core/client_config/grpclb_test.c => cpp/grpclb/grpclb_test.cc} (98%) diff --git a/Makefile b/Makefile index e316d4b1533..7c88917f11e 100644 --- a/Makefile +++ b/Makefile @@ -946,7 +946,6 @@ grpc_jwt_verifier_test: $(BINDIR)/$(CONFIG)/grpc_jwt_verifier_test grpc_print_google_default_creds_token: $(BINDIR)/$(CONFIG)/grpc_print_google_default_creds_token grpc_security_connector_test: $(BINDIR)/$(CONFIG)/grpc_security_connector_test grpc_verify_jwt: $(BINDIR)/$(CONFIG)/grpc_verify_jwt -grpclb_test: $(BINDIR)/$(CONFIG)/grpclb_test hpack_parser_fuzzer_test: $(BINDIR)/$(CONFIG)/hpack_parser_fuzzer_test hpack_parser_test: $(BINDIR)/$(CONFIG)/hpack_parser_test hpack_table_test: $(BINDIR)/$(CONFIG)/hpack_table_test @@ -1025,6 +1024,7 @@ grpc_objective_c_plugin: $(BINDIR)/$(CONFIG)/grpc_objective_c_plugin grpc_python_plugin: $(BINDIR)/$(CONFIG)/grpc_python_plugin grpc_ruby_plugin: $(BINDIR)/$(CONFIG)/grpc_ruby_plugin grpclb_api_test: $(BINDIR)/$(CONFIG)/grpclb_api_test +grpclb_test: $(BINDIR)/$(CONFIG)/grpclb_test hybrid_end2end_test: $(BINDIR)/$(CONFIG)/hybrid_end2end_test interop_client: $(BINDIR)/$(CONFIG)/interop_client interop_server: $(BINDIR)/$(CONFIG)/interop_server @@ -1278,7 +1278,6 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/grpc_json_token_test \ $(BINDIR)/$(CONFIG)/grpc_jwt_verifier_test \ $(BINDIR)/$(CONFIG)/grpc_security_connector_test \ - $(BINDIR)/$(CONFIG)/grpclb_test \ $(BINDIR)/$(CONFIG)/hpack_parser_test \ $(BINDIR)/$(CONFIG)/hpack_table_test \ $(BINDIR)/$(CONFIG)/http_parser_test \ @@ -1399,6 +1398,7 @@ buildtests_cxx: buildtests_zookeeper privatelibs_cxx \ $(BINDIR)/$(CONFIG)/golden_file_test \ $(BINDIR)/$(CONFIG)/grpc_cli \ $(BINDIR)/$(CONFIG)/grpclb_api_test \ + $(BINDIR)/$(CONFIG)/grpclb_test \ $(BINDIR)/$(CONFIG)/hybrid_end2end_test \ $(BINDIR)/$(CONFIG)/interop_client \ $(BINDIR)/$(CONFIG)/interop_server \ @@ -1581,8 +1581,6 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/grpc_jwt_verifier_test || ( echo test grpc_jwt_verifier_test failed ; exit 1 ) $(E) "[RUN] Testing grpc_security_connector_test" $(Q) $(BINDIR)/$(CONFIG)/grpc_security_connector_test || ( echo test grpc_security_connector_test failed ; exit 1 ) - $(E) "[RUN] Testing grpclb_test" - $(Q) $(BINDIR)/$(CONFIG)/grpclb_test || ( echo test grpclb_test failed ; exit 1 ) $(E) "[RUN] Testing hpack_parser_test" $(Q) $(BINDIR)/$(CONFIG)/hpack_parser_test || ( echo test hpack_parser_test failed ; exit 1 ) $(E) "[RUN] Testing hpack_table_test" @@ -1731,6 +1729,8 @@ test_cxx: test_zookeeper buildtests_cxx $(Q) $(BINDIR)/$(CONFIG)/golden_file_test || ( echo test golden_file_test failed ; exit 1 ) $(E) "[RUN] Testing grpclb_api_test" $(Q) $(BINDIR)/$(CONFIG)/grpclb_api_test || ( echo test grpclb_api_test failed ; exit 1 ) + $(E) "[RUN] Testing grpclb_test" + $(Q) $(BINDIR)/$(CONFIG)/grpclb_test || ( echo test grpclb_test failed ; exit 1 ) $(E) "[RUN] Testing hybrid_end2end_test" $(Q) $(BINDIR)/$(CONFIG)/hybrid_end2end_test || ( echo test hybrid_end2end_test failed ; exit 1 ) $(E) "[RUN] Testing interop_test" @@ -3036,8 +3036,118 @@ LIBGRPC_TEST_UTIL_SRC = \ test/core/util/port_server_client.c \ test/core/util/port_windows.c \ test/core/util/slice_splitter.c \ + src/core/lib/channel/channel_args.c \ + src/core/lib/channel/channel_stack.c \ + src/core/lib/channel/channel_stack_builder.c \ + src/core/lib/channel/compress_filter.c \ + src/core/lib/channel/connected_channel.c \ + src/core/lib/channel/http_client_filter.c \ + src/core/lib/channel/http_server_filter.c \ + src/core/lib/compression/compression.c \ + src/core/lib/compression/message_compress.c \ + src/core/lib/debug/trace.c \ + src/core/lib/http/format_request.c \ + src/core/lib/http/httpcli.c \ + src/core/lib/http/parser.c \ + src/core/lib/iomgr/closure.c \ + src/core/lib/iomgr/endpoint.c \ + src/core/lib/iomgr/endpoint_pair_posix.c \ + src/core/lib/iomgr/endpoint_pair_windows.c \ + src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ + src/core/lib/iomgr/ev_poll_posix.c \ + src/core/lib/iomgr/ev_posix.c \ + src/core/lib/iomgr/exec_ctx.c \ + src/core/lib/iomgr/executor.c \ + src/core/lib/iomgr/iocp_windows.c \ + src/core/lib/iomgr/iomgr.c \ + src/core/lib/iomgr/iomgr_posix.c \ + src/core/lib/iomgr/iomgr_windows.c \ + src/core/lib/iomgr/polling_entity.c \ + src/core/lib/iomgr/pollset_set_windows.c \ + src/core/lib/iomgr/pollset_windows.c \ + src/core/lib/iomgr/resolve_address_posix.c \ + src/core/lib/iomgr/resolve_address_windows.c \ + src/core/lib/iomgr/sockaddr_utils.c \ + src/core/lib/iomgr/socket_utils_common_posix.c \ + src/core/lib/iomgr/socket_utils_linux.c \ + src/core/lib/iomgr/socket_utils_posix.c \ + src/core/lib/iomgr/socket_windows.c \ + src/core/lib/iomgr/tcp_client_posix.c \ + src/core/lib/iomgr/tcp_client_windows.c \ + src/core/lib/iomgr/tcp_posix.c \ + src/core/lib/iomgr/tcp_server_posix.c \ + src/core/lib/iomgr/tcp_server_windows.c \ + src/core/lib/iomgr/tcp_windows.c \ + src/core/lib/iomgr/time_averaged_stats.c \ + src/core/lib/iomgr/timer.c \ + src/core/lib/iomgr/timer_heap.c \ + src/core/lib/iomgr/udp_server.c \ + src/core/lib/iomgr/unix_sockets_posix.c \ + src/core/lib/iomgr/unix_sockets_posix_noop.c \ + src/core/lib/iomgr/wakeup_fd_eventfd.c \ + src/core/lib/iomgr/wakeup_fd_nospecial.c \ + src/core/lib/iomgr/wakeup_fd_pipe.c \ + src/core/lib/iomgr/wakeup_fd_posix.c \ + src/core/lib/iomgr/workqueue_posix.c \ + src/core/lib/iomgr/workqueue_windows.c \ + src/core/lib/json/json.c \ + src/core/lib/json/json_reader.c \ + src/core/lib/json/json_string.c \ + src/core/lib/json/json_writer.c \ + src/core/lib/surface/alarm.c \ + src/core/lib/surface/api_trace.c \ + src/core/lib/surface/byte_buffer.c \ + src/core/lib/surface/byte_buffer_reader.c \ + src/core/lib/surface/call.c \ + src/core/lib/surface/call_details.c \ + src/core/lib/surface/call_log_batch.c \ + src/core/lib/surface/channel.c \ + src/core/lib/surface/channel_init.c \ + src/core/lib/surface/channel_ping.c \ + src/core/lib/surface/channel_stack_type.c \ + src/core/lib/surface/completion_queue.c \ + src/core/lib/surface/event_string.c \ + src/core/lib/surface/lame_client.c \ + src/core/lib/surface/metadata_array.c \ + src/core/lib/surface/server.c \ + src/core/lib/surface/validate_metadata.c \ + src/core/lib/surface/version.c \ + src/core/lib/transport/byte_stream.c \ + src/core/lib/transport/connectivity_state.c \ + src/core/lib/transport/metadata.c \ + src/core/lib/transport/metadata_batch.c \ + src/core/lib/transport/static_metadata.c \ + src/core/lib/transport/transport.c \ + src/core/lib/transport/transport_op_string.c \ PUBLIC_HEADERS_C += \ + include/grpc/byte_buffer.h \ + include/grpc/byte_buffer_reader.h \ + include/grpc/compression.h \ + include/grpc/grpc.h \ + include/grpc/grpc_posix.h \ + include/grpc/status.h \ + include/grpc/impl/codegen/byte_buffer.h \ + include/grpc/impl/codegen/byte_buffer_reader.h \ + include/grpc/impl/codegen/compression_types.h \ + include/grpc/impl/codegen/connectivity_state.h \ + include/grpc/impl/codegen/grpc_types.h \ + include/grpc/impl/codegen/propagation_bits.h \ + include/grpc/impl/codegen/status.h \ + include/grpc/impl/codegen/alloc.h \ + include/grpc/impl/codegen/atm.h \ + include/grpc/impl/codegen/atm_gcc_atomic.h \ + include/grpc/impl/codegen/atm_gcc_sync.h \ + include/grpc/impl/codegen/atm_windows.h \ + include/grpc/impl/codegen/log.h \ + include/grpc/impl/codegen/port_platform.h \ + include/grpc/impl/codegen/slice.h \ + include/grpc/impl/codegen/slice_buffer.h \ + include/grpc/impl/codegen/sync.h \ + include/grpc/impl/codegen/sync_generic.h \ + include/grpc/impl/codegen/sync_posix.h \ + include/grpc/impl/codegen/sync_windows.h \ + include/grpc/impl/codegen/time.h \ LIBGRPC_TEST_UTIL_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC_TEST_UTIL_SRC)))) @@ -8476,38 +8586,6 @@ endif endif -GRPCLB_TEST_SRC = \ - test/core/client_config/grpclb_test.c \ - -GRPCLB_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPCLB_TEST_SRC)))) -ifeq ($(NO_SECURE),true) - -# You can't build secure targets if you don't have OpenSSL. - -$(BINDIR)/$(CONFIG)/grpclb_test: openssl_dep_error - -else - - - -$(BINDIR)/$(CONFIG)/grpclb_test: $(GRPCLB_TEST_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) $(GRPCLB_TEST_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)/grpclb_test - -endif - -$(OBJDIR)/$(CONFIG)/test/core/client_config/grpclb_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a - -deps_grpclb_test: $(GRPCLB_TEST_OBJS:.o=.dep) - -ifneq ($(NO_SECURE),true) -ifneq ($(NO_DEPS),true) --include $(GRPCLB_TEST_OBJS:.o=.dep) -endif -endif - - HPACK_PARSER_FUZZER_TEST_SRC = \ test/core/transport/chttp2/hpack_parser_fuzzer_test.c \ @@ -11251,6 +11329,53 @@ endif $(OBJDIR)/$(CONFIG)/test/cpp/grpclb/grpclb_api_test.o: $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.pb.cc $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.grpc.pb.cc +GRPCLB_TEST_SRC = \ + $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.pb.cc $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.grpc.pb.cc \ + test/cpp/grpclb/grpclb_test.cc \ + +GRPCLB_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(GRPCLB_TEST_SRC)))) +ifeq ($(NO_SECURE),true) + +# You can't build secure targets if you don't have OpenSSL. + +$(BINDIR)/$(CONFIG)/grpclb_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.0.0+. + +$(BINDIR)/$(CONFIG)/grpclb_test: protobuf_dep_error + +else + +$(BINDIR)/$(CONFIG)/grpclb_test: $(PROTOBUF_DEP) $(GRPCLB_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a + $(E) "[LD] Linking $@" + $(Q) mkdir -p `dirname $@` + $(Q) $(LDXX) $(LDFLAGS) $(GRPCLB_TEST_OBJS) $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/grpclb_test + +endif + +endif + +$(OBJDIR)/$(CONFIG)/src/proto/grpc/lb/v1/load_balancer.o: $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a + +$(OBJDIR)/$(CONFIG)/test/cpp/grpclb/grpclb_test.o: $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a + +deps_grpclb_test: $(GRPCLB_TEST_OBJS:.o=.dep) + +ifneq ($(NO_SECURE),true) +ifneq ($(NO_DEPS),true) +-include $(GRPCLB_TEST_OBJS:.o=.dep) +endif +endif +$(OBJDIR)/$(CONFIG)/test/cpp/grpclb/grpclb_test.o: $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.pb.cc $(GENDIR)/src/proto/grpc/lb/v1/load_balancer.grpc.pb.cc + + HYBRID_END2END_TEST_SRC = \ test/cpp/end2end/hybrid_end2end_test.cc \ diff --git a/build.yaml b/build.yaml index ee854361a19..d62b0a03f70 100644 --- a/build.yaml +++ b/build.yaml @@ -866,6 +866,7 @@ libs: - grpc filegroups: - grpc_test_util_base + - grpc_base vs_project_guid: '{17BCAFC0-5FDC-4C94-AEB9-95F3E220614B}' - name: grpc_test_util_unsecure build: private @@ -1820,16 +1821,6 @@ targets: - grpc - gpr_test_util - gpr -- name: grpclb_test - build: test - language: c - src: - - test/core/client_config/grpclb_test.c - deps: - - grpc_test_util - - grpc - - gpr_test_util - - gpr - name: hpack_parser_fuzzer_test build: fuzzer language: c @@ -2734,6 +2725,20 @@ targets: - grpc_test_util - grpc++ - grpc +- name: grpclb_test + gtest: false + build: test + language: c++ + src: + - src/proto/grpc/lb/v1/load_balancer.proto + - test/cpp/grpclb/grpclb_test.cc + deps: + - gpr + - gpr_test_util + - grpc + - grpc++ + - grpc++_test_util + - grpc_test_util - name: hybrid_end2end_test gtest: true build: test diff --git a/test/core/client_config/grpclb_test.c b/test/cpp/grpclb/grpclb_test.cc similarity index 98% rename from test/core/client_config/grpclb_test.c rename to test/cpp/grpclb/grpclb_test.cc index 85cfe80748f..4805bf024d5 100644 --- a/test/core/client_config/grpclb_test.c +++ b/test/cpp/grpclb/grpclb_test.cc @@ -34,6 +34,7 @@ #include #include +extern "C" { #include #include #include @@ -52,6 +53,7 @@ #include "test/core/end2end/cq_verifier.h" #include "test/core/util/port.h" #include "test/core/util/test_config.h" +} #define NUM_BACKENDS 4 @@ -95,7 +97,8 @@ static gpr_slice build_response_payload_slice(const char *host, int *ports, } ... } */ - char **hostports_vec = gpr_malloc(sizeof(char *) * nports); + char **hostports_vec = + static_cast(gpr_malloc(sizeof(char *) * nports)); for (size_t i = 0; i < nports; i++) { gpr_join_host_port(&hostports_vec[i], "127.0.0.1", ports[i]); } @@ -118,7 +121,7 @@ static gpr_slice build_response_payload_slice(const char *host, int *ports, const size_t fsize = (size_t)ftell(f); rewind(f); - char *serialized_response = gpr_malloc(fsize); + char *serialized_response = static_cast(gpr_malloc(fsize)); GPR_ASSERT(fread(serialized_response, fsize, 1, f) == 1); fclose(f); gpr_free(output_fname); @@ -519,9 +522,9 @@ static void setup_server(const char *host, server_fixture *sf) { int assigned_port; sf->cq = grpc_completion_queue_create(NULL); - char *colon_idx = strchr(host, ':'); + const char *colon_idx = strchr(host, ':'); if (colon_idx) { - char *port_str = colon_idx + 1; + const char *port_str = colon_idx + 1; sf->port = atoi(port_str); sf->servers_hostport = gpr_strdup(host); } else { @@ -558,12 +561,12 @@ static void teardown_server(server_fixture *sf) { } static void fork_backend_server(void *arg) { - server_fixture *sf = arg; + server_fixture *sf = static_cast(arg); start_backend_server(sf); } static void fork_lb_server(void *arg) { - test_fixture *tf = arg; + test_fixture *tf = static_cast(arg); int ports[NUM_BACKENDS]; for (int i = 0; i < NUM_BACKENDS; i++) { ports[i] = tf->lb_backends[i].port; diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 492be7322f6..6e292e5983e 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -944,22 +944,6 @@ "third_party": false, "type": "target" }, - { - "deps": [ - "gpr", - "gpr_test_util", - "grpc", - "grpc_test_util" - ], - "headers": [], - "language": "c", - "name": "grpclb_test", - "src": [ - "test/core/client_config/grpclb_test.c" - ], - "third_party": false, - "type": "target" - }, { "deps": [ "gpr", @@ -2231,6 +2215,27 @@ "third_party": false, "type": "target" }, + { + "deps": [ + "gpr", + "gpr_test_util", + "grpc", + "grpc++", + "grpc++_test_util", + "grpc_test_util" + ], + "headers": [ + "src/proto/grpc/lb/v1/load_balancer.grpc.pb.h", + "src/proto/grpc/lb/v1/load_balancer.pb.h" + ], + "language": "c++", + "name": "grpclb_test", + "src": [ + "test/cpp/grpclb/grpclb_test.cc" + ], + "third_party": false, + "type": "target" + }, { "deps": [ "gpr", @@ -4222,6 +4227,7 @@ "gpr", "gpr_test_util", "grpc", + "grpc_base", "grpc_test_util_base" ], "headers": [ diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index bf439b43e9c..b69bea4242f 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -1079,27 +1079,6 @@ "windows" ] }, - { - "args": [], - "ci_platforms": [ - "linux", - "mac", - "posix", - "windows" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "gtest": false, - "language": "c", - "name": "grpclb_test", - "platforms": [ - "linux", - "mac", - "posix", - "windows" - ] - }, { "args": [], "ci_platforms": [ @@ -2294,6 +2273,27 @@ "windows" ] }, + { + "args": [], + "ci_platforms": [ + "linux", + "mac", + "posix", + "windows" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "gtest": false, + "language": "c++", + "name": "grpclb_test", + "platforms": [ + "linux", + "mac", + "posix", + "windows" + ] + }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index 070f6559b7b..3a214a4ad41 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -643,17 +643,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_verify_jwt", "vcxproj\ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpclb_test", "vcxproj\test\grpclb_test\grpclb_test.vcxproj", "{9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "h2_census_nosec_test", "vcxproj\test/end2end/fixtures\h2_census_nosec_test\h2_census_nosec_test.vcxproj", "{A8039D43-910E-4248-2A22-74366E8C4DCD}" ProjectSection(myProperties) = preProject lib = "False" @@ -2466,22 +2455,6 @@ Global {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release-DLL|Win32.Build.0 = Release|Win32 {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release-DLL|x64.ActiveCfg = Release|x64 {02FAC25F-5FF6-34A0-00AE-B82BFBA851A9}.Release-DLL|x64.Build.0 = Release|x64 - {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Debug|Win32.ActiveCfg = Debug|Win32 - {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Debug|x64.ActiveCfg = Debug|x64 - {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Release|Win32.ActiveCfg = Release|Win32 - {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Release|x64.ActiveCfg = Release|x64 - {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Debug|Win32.Build.0 = Debug|Win32 - {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Debug|x64.Build.0 = Debug|x64 - {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Release|Win32.Build.0 = Release|Win32 - {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Release|x64.Build.0 = Release|x64 - {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Debug-DLL|x64.Build.0 = Debug|x64 - {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Release-DLL|Win32.Build.0 = Release|Win32 - {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Release-DLL|x64.ActiveCfg = Release|x64 - {9D6FFE17-ABF0-A851-268E-9E3E8C573CBB}.Release-DLL|x64.Build.0 = Release|x64 {A8039D43-910E-4248-2A22-74366E8C4DCD}.Debug|Win32.ActiveCfg = Debug|Win32 {A8039D43-910E-4248-2A22-74366E8C4DCD}.Debug|x64.ActiveCfg = Debug|x64 {A8039D43-910E-4248-2A22-74366E8C4DCD}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index f0a8f7b6b9e..fd37c566921 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -146,6 +146,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -160,6 +189,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -196,6 +300,172 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index a1d31eb54e0..f04c6ea773c 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -52,6 +52,338 @@ test\core\util + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\compression + + + src\core\lib\compression + + + src\core\lib\debug + + + src\core\lib\http + + + src\core\lib\http + + + src\core\lib\http + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + + + include\grpc\impl\codegen + @@ -93,9 +425,279 @@ test\core\util + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\compression + + + src\core\lib\compression + + + src\core\lib\debug + + + src\core\lib\http + + + src\core\lib\http + + + src\core\lib\http + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + {50129440-aff7-7df7-682c-b9671be19a6f} + + + {d448b078-95a6-6fca-fe4a-8b44dd71f359} + + + {314a6801-6fe3-9211-33d8-ecf3332c1151} + + + {8e97f1e1-f4d1-a56e-0837-7901778fb3b9} + + + {7d107d7c-1da3-9525-3ba1-3a411b552ea8} + + + {f7bfac91-5eb2-dea7-4601-6c63edbbf997} + + + {f4e8c61e-1ca6-0fdd-7b5e-b7f9a30c9a21} + + + {1cd1503c-bec0-5ade-c75f-aa25c80975ec} + + + {09632582-2cc3-5618-d673-65d3884f8ce5} + + + {2c1a72e9-886e-8082-9d2f-0fc9cb3ab996} + + + {4862ecce-fa07-eb5e-5c05-bfa753c8bfe5} + + + {fc7f488e-08b4-8366-3720-1f7ffaa0b0b3} + + + {89bc8f83-e29a-ddab-8f6b-22df11cdc867} + + + {7f2b7dca-395f-94dd-c9ad-9a286bd9751e} + + + {5249e884-ea07-6782-531d-ec622c54b9af} + {a2783de3-4fcf-718d-a859-c2108350ff33} diff --git a/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj b/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj index 7ea8e06d74a..91b9a6eaccc 100644 --- a/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj +++ b/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj @@ -53,8 +53,10 @@ + + @@ -158,21 +160,35 @@ - + + + + + + + + + - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + {0BE77741-552A-929B-A497-4EF7ECE17A64} + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} diff --git a/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj.filters b/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj.filters index 7a70c0b5e1c..5493df2e7b2 100644 --- a/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj.filters +++ b/vsprojects/vcxproj/test/grpclb_test/grpclb_test.vcxproj.filters @@ -1,20 +1,38 @@ - - test\core\client_config + + src\proto\grpc\lb\v1 + + + test\cpp\grpclb + + {082bbcbc-bbd8-db7d-afe9-fa0fec76863d} + + + {7c61995a-80c2-ef3d-0a4b-baf2221c12f8} + + + {fc2920d4-902c-fdf0-d4b8-6b22e1361105} + + + {4778352a-559f-b008-e3d2-4ae9181260df} + + + {36a4326b-4f2a-4720-b730-e40fe078fd40} + {e0ba55a2-37d9-5029-6f4e-64f097307340} - - {6d1d02a2-d635-142d-16d4-45bd59f5c83a} + + {ad67d6ba-d08b-7879-2929-20f0f01c9918} - - {356b8663-f1cf-f0df-39d0-d2de958699d0} + + {4498fa30-2dab-584c-5711-a1055cec30f6} From be3745529715745901245073233bf2fd8f282b00 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 21 Jun 2016 15:11:33 -0700 Subject: [PATCH 1224/1894] add missing ConfigureAwait(false) --- src/csharp/Grpc.Core/GrpcEnvironment.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/csharp/Grpc.Core/GrpcEnvironment.cs b/src/csharp/Grpc.Core/GrpcEnvironment.cs index e9e4cb4cbb3..58bb1802510 100644 --- a/src/csharp/Grpc.Core/GrpcEnvironment.cs +++ b/src/csharp/Grpc.Core/GrpcEnvironment.cs @@ -105,7 +105,7 @@ namespace Grpc.Core if (instanceToShutdown != null) { - await instanceToShutdown.ShutdownAsync(); + await instanceToShutdown.ShutdownAsync().ConfigureAwait(false); } } From 9d393a5d3c1a2609c3aa44caa3879e590f659c21 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 21 Jun 2016 15:20:19 -0700 Subject: [PATCH 1225/1894] slightly fancier output --- tools/profiling/latency_profile/run_latency_profile.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/profiling/latency_profile/run_latency_profile.sh b/tools/profiling/latency_profile/run_latency_profile.sh index 40c6fcb4314..618db202dc4 100755 --- a/tools/profiling/latency_profile/run_latency_profile.sh +++ b/tools/profiling/latency_profile/run_latency_profile.sh @@ -96,10 +96,11 @@ fi make CONFIG=basicprof -j$CPUS qps_json_driver mkdir -p reports -echo '' > reports/index.html bins/basicprof/qps_json_driver --scenarios_json="$SCENARIOS_JSON_ARG" -echo '
' >> reports/index.html
+
+echo 'Latency profile for:
' > reports/index.html +echo "

${SCENARIOS_JSON_ARG}

" >> reports/index.html +echo '

' >> reports/index.html
 $PYTHON tools/profiling/latency_profile/profile_analyzer.py \
     --source=latency_trace.txt --fmt=simple >> reports/index.html
-echo '
' >> reports/index.html -echo '' >> reports/index.html +echo '

' >> reports/index.html From dacce7a1e11543ee3b3b49becc3466d967daa733 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 21 Jun 2016 16:40:20 -0700 Subject: [PATCH 1226/1894] fixed bad merge. c++ tests should work again --- test/cpp/interop/interop_client.cc | 34 ++++++++++++++---------------- test/cpp/interop/interop_server.cc | 2 +- 2 files changed, 17 insertions(+), 19 deletions(-) diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index cfa17e5b76c..89f841dbe96 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -537,20 +537,19 @@ bool InteropClient::DoServerCompressedStreaming() { InteropClientContextInspector inspector(context); StreamingOutputCallRequest request; - for (size_t i = 0; i < compressions.size(); i++) { - for (size_t j = 0; j < sizes.size(); j++) { - char* log_suffix; - gpr_asprintf(&log_suffix, "(compression=%s; size=%d)", - compressions[i] ? "true" : "false", sizes[j]); + GPR_ASSERT(compressions.size() == sizes.size()); + for (size_t i = 0; i < sizes.size(); i++) { + char* log_suffix; + gpr_asprintf(&log_suffix, "(compression=%s; size=%d)", + compressions[i] ? "true" : "false", sizes[i]); - gpr_log(GPR_DEBUG, "Sending request streaming rpc %s.", log_suffix); - gpr_free(log_suffix); + gpr_log(GPR_DEBUG, "Sending request streaming rpc %s.", log_suffix); + gpr_free(log_suffix); - ResponseParameters* const response_parameter = - request.add_response_parameters(); - response_parameter->mutable_compressed()->set_value(compressions[i]); - response_parameter->set_size(sizes[j]); - } + ResponseParameters* const response_parameter = + request.add_response_parameters(); + response_parameter->mutable_compressed()->set_value(compressions[i]); + response_parameter->set_size(sizes[i]); } std::unique_ptr> stream( serviceStub_.Get()->StreamingOutputCall(&context, request)); @@ -574,14 +573,13 @@ bool InteropClient::DoServerCompressedStreaming() { ++k; } - if (k < response_stream_sizes.size()) { + if (k < sizes.size()) { // stream->Read() failed before reading all the expected messages. This // is most likely due to a connection failure. - gpr_log(GPR_ERROR, - "%s(): Responses read (k=%" PRIuPTR - ") is " - "less than the expected messages (i.e " - "response_stream_sizes.size() (%" PRIuPTR ")).", + gpr_log(GPR_ERROR, "%s(): Responses read (k=%" PRIuPTR + ") is " + "less than the expected messages (i.e " + "response_stream_sizes.size() (%" PRIuPTR ")).", __func__, k, response_stream_sizes.size()); return TransientFailureOrAbort(); } diff --git a/test/cpp/interop/interop_server.cc b/test/cpp/interop/interop_server.cc index f0a182f2309..199fef5455b 100644 --- a/test/cpp/interop/interop_server.cc +++ b/test/cpp/interop/interop_server.cc @@ -222,7 +222,7 @@ class TestServiceImpl : public TestService::Service { gpr_time_from_micros(time_us, GPR_TIMESPAN)); gpr_sleep_until(sleep_time); } - write_success = writer->Write(response); + write_success = writer->Write(response, wopts); } if (write_success) { return Status::OK; From ef01edf5b7c6eb008c7b0581354678aeeabd7680 Mon Sep 17 00:00:00 2001 From: vjpai Date: Tue, 21 Jun 2016 16:42:08 -0700 Subject: [PATCH 1227/1894] Fix review comments --- include/grpc++/impl/codegen/async_stream.h | 12 ++++++------ include/grpc++/impl/codegen/completion_queue.h | 11 ++++++----- include/grpc++/impl/codegen/sync_stream.h | 12 ++++++------ 3 files changed, 18 insertions(+), 17 deletions(-) diff --git a/include/grpc++/impl/codegen/async_stream.h b/include/grpc++/impl/codegen/async_stream.h index c74737ce5f8..cbc5d944295 100644 --- a/include/grpc++/impl/codegen/async_stream.h +++ b/include/grpc++/impl/codegen/async_stream.h @@ -53,7 +53,7 @@ class ClientAsyncStreamingInterface { /// Request notification of the reading of the initial metadata. Completion /// will be notified by \a tag on the associated completion queue. /// This call is optional, but if it is used, it cannot be used concurrently - /// with Read + /// with or after the \a Read method. /// /// \param[in] tag Tag identifying this request. virtual void ReadInitialMetadata(void* tag) = 0; @@ -74,8 +74,8 @@ class AsyncReaderInterface { /// Read a message of type \a R into \a msg. Completion will be notified by \a /// tag on the associated completion queue. - /// This is thread-safe with respect to other streaming APIs except for Finish - /// on the same stream. + /// This is thread-safe with respect to other streaming APIs except for \a + /// Finish on the same stream. /// /// \param[out] msg Where to eventually store the read message. /// \param[in] tag The tag identifying the operation. @@ -93,7 +93,7 @@ class AsyncWriterInterface { /// Only one write may be outstanding at any given time. This means that /// after calling Write, one must wait to receive \a tag from the completion /// queue BEFORE calling Write again. - /// This is thread-safe with respect to Read + /// This is thread-safe with respect to \a Read /// /// \param[in] msg The message to be written. /// \param[in] tag The tag identifying the operation. @@ -164,7 +164,7 @@ class ClientAsyncWriterInterface : public ClientAsyncStreamingInterface, public AsyncWriterInterface { public: /// Signal the client is done with the writes. - /// Thread-safe with respect to Read + /// Thread-safe with respect to \a Read /// /// \param[in] tag The tag identifying the operation. virtual void WritesDone(void* tag) = 0; @@ -236,7 +236,7 @@ class ClientAsyncReaderWriterInterface : public ClientAsyncStreamingInterface, public AsyncReaderInterface { public: /// Signal the client is done with the writes. - /// Thread-safe with respect to Read + /// Thread-safe with respect to \a Read /// /// \param[in] tag The tag identifying the operation. virtual void WritesDone(void* tag) = 0; diff --git a/include/grpc++/impl/codegen/completion_queue.h b/include/grpc++/impl/codegen/completion_queue.h index f138ebe7de2..03009e0561d 100644 --- a/include/grpc++/impl/codegen/completion_queue.h +++ b/include/grpc++/impl/codegen/completion_queue.h @@ -34,15 +34,16 @@ /// A completion queue implements a concurrent producer-consumer queue, with /// two main API-exposed methods: \a Next and \a AsyncNext. These /// methods are the essential component of the gRPC C++ asynchronous API. -/// There is also a Shutdown method to indicate that a given completion queue +/// There is also a \a Shutdown method to indicate that a given completion queue /// will no longer have regular events. This must be called before the /// completion queue is destroyed. /// All completion queue APIs are thread-safe and may be used concurrently with /// any other completion queue API invocation; it is acceptable to have -/// multiple threads calling Next or AsyncNext on the same or different -/// completion queues, or to call these methods concurrently with a Shutdown -/// elsewhere. All of these should be completed, though, before a completion -/// queue destructor is called. +/// multiple threads calling \a Next or \a AsyncNext on the same or different +/// completion queues, or to call these methods concurrently with a \a Shutdown +/// elsewhere. +/// \remark{All other API calls on completion queue should be completed before +/// a completion queue destructor is called.} #ifndef GRPCXX_IMPL_CODEGEN_COMPLETION_QUEUE_H #define GRPCXX_IMPL_CODEGEN_COMPLETION_QUEUE_H diff --git a/include/grpc++/impl/codegen/sync_stream.h b/include/grpc++/impl/codegen/sync_stream.h index 9d7966ba04b..e53717cabfc 100644 --- a/include/grpc++/impl/codegen/sync_stream.h +++ b/include/grpc++/impl/codegen/sync_stream.h @@ -71,8 +71,8 @@ class ReaderInterface { virtual ~ReaderInterface() {} /// Blocking read a message and parse to \a msg. Returns \a true on success. - /// This is thread-safe with respect to other streaming APIs except for Finish - /// on the same stream. (Finish must be called as described above.) + /// This is thread-safe with respect to other streaming APIs except for \a + /// Finish on the same stream. (\a Finish must be called as described above.) /// /// \param[out] msg The read message. /// @@ -89,7 +89,7 @@ class WriterInterface { virtual ~WriterInterface() {} /// Blocking write \a msg to the stream with options. - /// This is thread-safe with respect to Read + /// This is thread-safe with respect to \a Read /// /// \param msg The message to be written to the stream. /// \param options Options affecting the write operation. @@ -98,7 +98,7 @@ class WriterInterface { virtual bool Write(const W& msg, const WriteOptions& options) = 0; /// Blocking write \a msg to the stream with default options. - /// This is thread-safe with respect to Read + /// This is thread-safe with respect to \a Read /// /// \param msg The message to be written to the stream. /// @@ -179,7 +179,7 @@ class ClientWriterInterface : public ClientStreamingInterface, public: /// Half close writing from the client. /// Block until currently-pending writes are completed. - /// Thread safe with respect to Read operations only + /// Thread safe with respect to \a Read operations only /// /// \return Whether the writes were successful. virtual bool WritesDone() = 0; @@ -263,7 +263,7 @@ class ClientReaderWriterInterface : public ClientStreamingInterface, virtual void WaitForInitialMetadata() = 0; /// Block until currently-pending writes are completed. - /// Thread-safe with respect to Read + /// Thread-safe with respect to \a Read /// /// \return Whether the writes were successful. virtual bool WritesDone() = 0; From e89aad02bf236190f1855d1481b5549a02cf8749 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 21 Jun 2016 16:43:31 -0700 Subject: [PATCH 1228/1894] updated node interop server --- src/node/interop/interop_server.js | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) diff --git a/src/node/interop/interop_server.js b/src/node/interop/interop_server.js index 72807623054..05f52a1083d 100644 --- a/src/node/interop/interop_server.js +++ b/src/node/interop/interop_server.js @@ -45,9 +45,6 @@ var testProto = grpc.load({ var ECHO_INITIAL_KEY = 'x-grpc-test-echo-initial'; var ECHO_TRAILING_KEY = 'x-grpc-test-echo-trailing-bin'; -var incompressible_data = fs.readFileSync( - __dirname + '/../../../test/cpp/interop/rnd.dat'); - /** * Create a buffer filled with size zeroes * @param {number} size The length of the buffer @@ -88,15 +85,7 @@ function getEchoTrailer(call) { } function getPayload(payload_type, size) { - if (payload_type === 'RANDOM') { - payload_type = ['COMPRESSABLE', - 'UNCOMPRESSABLE'][Math.random() < 0.5 ? 0 : 1]; - } - var body; - switch (payload_type) { - case 'COMPRESSABLE': body = zeroBuffer(size); break; - case 'UNCOMPRESSABLE': incompressible_data.slice(size); break; - } + var body = zeroBuffer(size); return {type: payload_type, body: body}; } From ff32a8648270ccf9fce9d8950eee06e917177715 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 21 Jun 2016 17:07:20 -0700 Subject: [PATCH 1229/1894] updated the interop tests driver --- tools/run_tests/run_interop_tests.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index 0787637d758..cc146f800ac 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -54,7 +54,9 @@ os.chdir(ROOT) _DEFAULT_SERVER_PORT=8080 -_SKIP_COMPRESSION = ['large_compressed_unary', +_SKIP_COMPRESSION = ['client_compressed_unary', + 'client_compressed_streaming' + 'server_compressed_unary', 'server_compressed_streaming'] _SKIP_ADVANCED = ['custom_metadata', 'status_code_and_message', @@ -345,7 +347,8 @@ _TEST_CASES = ['large_unary', 'empty_unary', 'ping_pong', 'cancel_after_begin', 'cancel_after_first_response', 'timeout_on_sleeping_server', 'custom_metadata', 'status_code_and_message', 'unimplemented_method', - 'large_compressed_unary', 'server_compressed_streaming'] + 'client_compressed_unary', 'server_compressed_unary', + 'client_compressed_streaming', 'server_compressed_streaming'] _AUTH_TEST_CASES = ['compute_engine_creds', 'jwt_token_creds', 'oauth2_auth_token', 'per_rpc_creds'] From 47031a8b14a501a40d8217b2a2e37764da8b5afb Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Wed, 4 May 2016 16:39:06 -0700 Subject: [PATCH 1230/1894] Add egg-info to python distribution. Currently, grpcio cannot be used as a dependency for egg packages (https://github.com/grpc/grpc/issues/6939) There is likely a better solution, but this is intended as a patch for the 0.15.0 release. --- PYTHON-MANIFEST.in | 1 + 1 file changed, 1 insertion(+) diff --git a/PYTHON-MANIFEST.in b/PYTHON-MANIFEST.in index 534f4c1251a..3ebba6ec3fc 100644 --- a/PYTHON-MANIFEST.in +++ b/PYTHON-MANIFEST.in @@ -1,6 +1,7 @@ recursive-include src/python/grpcio/grpc *.c *.h *.py *.pyx *.pxd *.pxi *.python *.pem recursive-exclude src/python/grpcio/grpc/_cython *.so *.pyd graft src/python/grpcio/tests +graft src/python/grpcio/grpcio.egg-info graft src/core graft src/boringssl graft include/grpc From 446f70e3843d9cdf40b6cf80d74bcd153032c2cf Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 21 Jun 2016 17:13:28 -0700 Subject: [PATCH 1231/1894] fixed faulty server streaming c++ test case --- test/cpp/interop/interop_server.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/cpp/interop/interop_server.cc b/test/cpp/interop/interop_server.cc index 199fef5455b..ebef0002a3c 100644 --- a/test/cpp/interop/interop_server.cc +++ b/test/cpp/interop/interop_server.cc @@ -194,8 +194,6 @@ class TestServiceImpl : public TestService::Service { ServerContext* context, const StreamingOutputCallRequest* request, ServerWriter* writer) { StreamingOutputCallResponse response; - // Compress by default. Disabled on a per-message basis. - context->set_compression_level(GRPC_COMPRESS_LEVEL_HIGH); bool write_success = true; for (int i = 0; write_success && i < request->response_parameters_size(); i++) { @@ -206,6 +204,8 @@ class TestServiceImpl : public TestService::Service { } WriteOptions wopts; if (request->response_parameters(i).has_compressed()) { + // Compress by default. Disabled on a per-message basis. + context->set_compression_level(GRPC_COMPRESS_LEVEL_HIGH); const bool compression_requested = request->response_parameters(i).compressed().value(); gpr_log(GPR_DEBUG, "Request for compression (%s) present for %s", From 396f9435d5c24c4f7179cfc5f789669d3900f7fe Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Tue, 21 Jun 2016 17:33:03 -0700 Subject: [PATCH 1232/1894] added freaking missing comma --- tools/run_tests/run_interop_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index cc146f800ac..e3af721ee53 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -55,7 +55,7 @@ os.chdir(ROOT) _DEFAULT_SERVER_PORT=8080 _SKIP_COMPRESSION = ['client_compressed_unary', - 'client_compressed_streaming' + 'client_compressed_streaming', 'server_compressed_unary', 'server_compressed_streaming'] From 3131c269c14f97294ebf8b6e3d1a235d4acf3317 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Tue, 21 Jun 2016 17:28:28 -0700 Subject: [PATCH 1233/1894] Integrate with unified error reporting --- src/core/lib/iomgr/ev_epoll_linux.c | 116 +++++++++++++++++++------- test/core/iomgr/ev_epoll_linux_test.c | 3 +- 2 files changed, 90 insertions(+), 29 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 7cc69c876db..d625b096a10 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -646,11 +646,18 @@ polling_island *polling_island_merge(polling_island *p, polling_island *q) { return q; } -static void polling_island_global_init() { +static grpc_error *polling_island_global_init() { + grpc_error *error = GRPC_ERROR_NONE; + gpr_mu_init(&g_pi_freelist_mu); g_pi_freelist = NULL; - grpc_wakeup_fd_init(&polling_island_wakeup_fd); - grpc_wakeup_fd_wakeup(&polling_island_wakeup_fd); + + error = grpc_wakeup_fd_init(&polling_island_wakeup_fd); + if (error == GRPC_ERROR_NONE) { + error = grpc_wakeup_fd_wakeup(&polling_island_wakeup_fd); + } + + return error; } static void polling_island_global_shutdown() { @@ -870,21 +877,33 @@ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, } gpr_mu_unlock(&fd->pi_mu); - grpc_exec_ctx_enqueue(exec_ctx, fd->on_done_closure, true, NULL); + grpc_exec_ctx_sched(exec_ctx, fd->on_done_closure, GRPC_ERROR_NONE, NULL); gpr_mu_unlock(&fd->mu); UNREF_BY(fd, 2, reason); /* Drop the reference */ } +static grpc_error *fd_shutdown_error(bool shutdown) { + if (!shutdown) { + return GRPC_ERROR_NONE; + } else { + return GRPC_ERROR_CREATE("FD shutdown"); + } +} + static void notify_on_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure **st, grpc_closure *closure) { - if (*st == CLOSURE_NOT_READY) { + if (fd->shutdown) { + grpc_exec_ctx_sched(exec_ctx, closure, GRPC_ERROR_CREATE("FD shutdown"), + NULL); + } else if (*st == CLOSURE_NOT_READY) { /* not ready ==> switch to a waiting state by setting the closure */ *st = closure; } else if (*st == CLOSURE_READY) { /* already ready ==> queue the closure to run immediately */ *st = CLOSURE_NOT_READY; - grpc_exec_ctx_enqueue(exec_ctx, closure, !fd->shutdown, NULL); + grpc_exec_ctx_sched(exec_ctx, closure, fd_shutdown_error(fd->shutdown), + NULL); } else { /* upcallptr was set to a different closure. This is an error! */ gpr_log(GPR_ERROR, @@ -906,7 +925,7 @@ static int set_ready_locked(grpc_exec_ctx *exec_ctx, grpc_fd *fd, return 0; } else { /* waiting ==> queue closure */ - grpc_exec_ctx_enqueue(exec_ctx, *st, !fd->shutdown, NULL); + grpc_exec_ctx_sched(exec_ctx, *st, fd_shutdown_error(fd->shutdown), NULL); *st = CLOSURE_NOT_READY; return 1; } @@ -964,11 +983,11 @@ static void sig_handler(int sig_num) { static void poller_kick_init() { signal(grpc_wakeup_signal, sig_handler); } /* Global state management */ -static void pollset_global_init(void) { - grpc_wakeup_fd_init(&grpc_global_wakeup_fd); +static grpc_error *pollset_global_init(void) { gpr_tls_init(&g_current_thread_pollset); gpr_tls_init(&g_current_thread_worker); poller_kick_init(); + return grpc_wakeup_fd_init(&grpc_global_wakeup_fd); } static void pollset_global_shutdown(void) { @@ -977,8 +996,13 @@ static void pollset_global_shutdown(void) { gpr_tls_destroy(&g_current_thread_worker); } -static void pollset_worker_kick(grpc_pollset_worker *worker) { - pthread_kill(worker->pt_id, grpc_wakeup_signal); +static grpc_error *pollset_worker_kick(grpc_pollset_worker *worker) { + grpc_error *err = GRPC_ERROR_NONE; + int err_num = pthread_kill(worker->pt_id, grpc_wakeup_signal); + if (err_num != 0) { + err = GRPC_OS_ERROR(err_num, "pthread_kill"); + } + return err; } /* Return 1 if the pollset has active threads in pollset_work (pollset must @@ -1014,10 +1038,19 @@ static void push_front_worker(grpc_pollset *p, grpc_pollset_worker *worker) { worker->prev->next = worker->next->prev = worker; } +static void kick_append_error(grpc_error **composite, grpc_error *error) { + if (error == GRPC_ERROR_NONE) return; + if (*composite == GRPC_ERROR_NONE) { + *composite = GRPC_ERROR_CREATE("Kick Failure"); + } + *composite = grpc_error_add_child(*composite, error); +} + /* p->mu must be held before calling this function */ -static void pollset_kick(grpc_pollset *p, - grpc_pollset_worker *specific_worker) { +static grpc_error *pollset_kick(grpc_pollset *p, + grpc_pollset_worker *specific_worker) { GPR_TIMER_BEGIN("pollset_kick", 0); + grpc_error *error = GRPC_ERROR_NONE; grpc_pollset_worker *worker = specific_worker; if (worker != NULL) { @@ -1027,7 +1060,7 @@ static void pollset_kick(grpc_pollset *p, for (worker = p->root_worker.next; worker != &p->root_worker; worker = worker->next) { if (gpr_tls_get(&g_current_thread_worker) != (intptr_t)worker) { - pollset_worker_kick(worker); + kick_append_error(&error, pollset_worker_kick(worker)); } } } else { @@ -1037,7 +1070,7 @@ static void pollset_kick(grpc_pollset *p, } else { GPR_TIMER_MARK("kicked_specifically", 0); if (gpr_tls_get(&g_current_thread_worker) != (intptr_t)worker) { - pollset_worker_kick(worker); + kick_append_error(&error, pollset_worker_kick(worker)); } } } else if (gpr_tls_get(&g_current_thread_pollset) != (intptr_t)p) { @@ -1053,7 +1086,7 @@ static void pollset_kick(grpc_pollset *p, if (worker != NULL) { GPR_TIMER_MARK("finally_kick", 0); push_back_worker(p, worker); - pollset_worker_kick(worker); + kick_append_error(&error, pollset_worker_kick(worker)); } else { GPR_TIMER_MARK("kicked_no_pollers", 0); p->kicked_without_pollers = true; @@ -1061,9 +1094,13 @@ static void pollset_kick(grpc_pollset *p, } GPR_TIMER_END("pollset_kick", 0); + GRPC_LOG_IF_ERROR("pollset_kick", GRPC_ERROR_REF(error)); + return error; } -static void kick_poller(void) { grpc_wakeup_fd_wakeup(&grpc_global_wakeup_fd); } +static grpc_error *kick_poller(void) { + return grpc_wakeup_fd_wakeup(&grpc_global_wakeup_fd); +} static void pollset_init(grpc_pollset *pollset, gpr_mu **mu) { gpr_mu_init(&pollset->mu); @@ -1139,7 +1176,7 @@ static void finish_shutdown_locked(grpc_exec_ctx *exec_ctx, /* Release the ref and set pollset->polling_island to NULL */ pollset_release_polling_island(pollset, "ps_shutdown"); - grpc_exec_ctx_enqueue(exec_ctx, pollset->shutdown_done, true, NULL); + grpc_exec_ctx_sched(exec_ctx, pollset->shutdown_done, GRPC_ERROR_NONE, NULL); } /* pollset->mu lock must be held by the caller before calling this */ @@ -1181,14 +1218,23 @@ static void pollset_reset(grpc_pollset *pollset) { pollset_release_polling_island(pollset, "ps_reset"); } +static void work_combine_error(grpc_error **composite, grpc_error *error) { + if (error == GRPC_ERROR_NONE) return; + if (*composite == GRPC_ERROR_NONE) { + *composite = GRPC_ERROR_CREATE("pollset_work"); + } + *composite = grpc_error_add_child(*composite, error); +} + #define GRPC_EPOLL_MAX_EVENTS 1000 -static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, - grpc_pollset *pollset, int timeout_ms, - sigset_t *sig_mask) { +static grpc_error *pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, + grpc_pollset *pollset, + int timeout_ms, sigset_t *sig_mask) { struct epoll_event ep_ev[GRPC_EPOLL_MAX_EVENTS]; int epoll_fd = -1; int ep_rv; polling_island *pi = NULL; + grpc_error *error = GRPC_ERROR_NONE; GPR_TIMER_BEGIN("pollset_work_and_unlock", 0); /* We need to get the epoll_fd to wait on. The epoll_fd is in inside the @@ -1232,6 +1278,7 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, if (ep_rv < 0) { if (errno != EINTR) { gpr_log(GPR_ERROR, "epoll_pwait() failed: %s", strerror(errno)); + work_combine_error(&error, GRPC_OS_ERROR(errno, "epoll_pwait")); } else { /* We were interrupted. Save an interation by doing a zero timeout epoll_wait to see if there are any other events of interest */ @@ -1247,7 +1294,8 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, for (int i = 0; i < ep_rv; ++i) { void *data_ptr = ep_ev[i].data.ptr; if (data_ptr == &grpc_global_wakeup_fd) { - grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd); + work_combine_error( + &error, grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd)); } else if (data_ptr == &polling_island_wakeup_fd) { /* This means that our polling island is merged with a different island. We do not have to do anything here since the subsequent call @@ -1278,16 +1326,18 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, PI_UNREF(pi, "ps_work"); GPR_TIMER_END("pollset_work_and_unlock", 0); + return error; } /* pollset->mu lock must be held by the caller before calling this. The function pollset_work() may temporarily release the lock (pollset->mu) during the course of its execution but it will always re-acquire the lock and ensure that it is held by the time the function returns */ -static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, - grpc_pollset_worker **worker_hdl, gpr_timespec now, - gpr_timespec deadline) { +static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, + grpc_pollset_worker **worker_hdl, + gpr_timespec now, gpr_timespec deadline) { GPR_TIMER_BEGIN("pollset_work", 0); + grpc_error *error = GRPC_ERROR_NONE; int timeout_ms = poll_deadline_to_millis_timeout(deadline, now); sigset_t new_mask; @@ -1316,7 +1366,7 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, push_front_worker(pollset, &worker); - pollset_work_and_unlock(exec_ctx, pollset, timeout_ms, &orig_mask); + error = pollset_work_and_unlock(exec_ctx, pollset, timeout_ms, &orig_mask); grpc_exec_ctx_flush(exec_ctx); gpr_mu_lock(&pollset->mu); @@ -1345,6 +1395,8 @@ static void pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, gpr_tls_set(&g_current_thread_pollset, (intptr_t)0); gpr_tls_set(&g_current_thread_worker, (intptr_t)0); GPR_TIMER_END("pollset_work", 0); + GRPC_LOG_IF_ERROR("pollset_work", GRPC_ERROR_REF(error)); + return error; } static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, @@ -1659,8 +1711,16 @@ const grpc_event_engine_vtable *grpc_init_epoll_linux(void) { } fd_global_init(); - pollset_global_init(); - polling_island_global_init(); + + if (!GRPC_LOG_IF_ERROR("pollset_global_init", pollset_global_init())) { + return NULL; + } + + if (!GRPC_LOG_IF_ERROR("polling_island_global_init", + polling_island_global_init())) { + return NULL; + } + return &vtable; } diff --git a/test/core/iomgr/ev_epoll_linux_test.c b/test/core/iomgr/ev_epoll_linux_test.c index 51da15faa7a..034f17fd58b 100644 --- a/test/core/iomgr/ev_epoll_linux_test.c +++ b/test/core/iomgr/ev_epoll_linux_test.c @@ -88,7 +88,8 @@ static void test_pollset_init(test_pollset *pollsets, int num_pollsets) { } } -static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, bool success) { +static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, + grpc_error *error) { grpc_pollset_destroy(p); } From 0100b2f1c0b08800ba0f7f53fe9cb5fbec7881a7 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Tue, 21 Jun 2016 17:38:13 -0700 Subject: [PATCH 1234/1894] Make fd_shutdown idempotent --- src/core/lib/iomgr/ev_epoll_linux.c | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index d625b096a10..c077987c01b 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -942,15 +942,19 @@ static grpc_pollset *fd_get_read_notifier_pollset(grpc_exec_ctx *exec_ctx, return notifier; } +/* Might be called multiple times */ static void fd_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { gpr_mu_lock(&fd->mu); - GPR_ASSERT(!fd->shutdown); - fd->shutdown = true; - - /* Flush any pending read and write closures. Since fd->shutdown is 'true' at - this point, the closures would be called with 'success = false' */ - set_ready_locked(exec_ctx, fd, &fd->read_closure); - set_ready_locked(exec_ctx, fd, &fd->write_closure); + /* Do the actual shutdown only once */ + if (!fd->shutdown) { + fd->shutdown = true; + + shutdown(fd->fd, SHUT_RDWR); + /* Flush any pending read and write closures. Since fd->shutdown is 'true' + at this point, the closures would be called with 'success = false' */ + set_ready_locked(exec_ctx, fd, &fd->read_closure); + set_ready_locked(exec_ctx, fd, &fd->write_closure); + } gpr_mu_unlock(&fd->mu); } From 24b6eae1fc71a4f5d18eb2e7c1cbca5b4e54a46f Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Tue, 21 Jun 2016 18:01:14 -0700 Subject: [PATCH 1235/1894] Add missing function fd_is_shutdown --- src/core/lib/iomgr/ev_epoll_linux.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index c077987c01b..3a774a8876f 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -942,6 +942,13 @@ static grpc_pollset *fd_get_read_notifier_pollset(grpc_exec_ctx *exec_ctx, return notifier; } +static bool fd_is_shutdown(grpc_fd *fd) { + gpr_mu_lock(&fd->mu); + const bool r = fd->shutdown; + gpr_mu_unlock(&fd->mu); + return r; +} + /* Might be called multiple times */ static void fd_shutdown(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { gpr_mu_lock(&fd->mu); @@ -1659,6 +1666,7 @@ static const grpc_event_engine_vtable vtable = { .fd_wrapped_fd = fd_wrapped_fd, .fd_orphan = fd_orphan, .fd_shutdown = fd_shutdown, + .fd_is_shutdown = fd_is_shutdown, .fd_notify_on_read = fd_notify_on_read, .fd_notify_on_write = fd_notify_on_write, .fd_get_read_notifier_pollset = fd_get_read_notifier_pollset, From bd28936c8648cde481fa20ca64ba00d9281cb119 Mon Sep 17 00:00:00 2001 From: vjpai Date: Tue, 21 Jun 2016 18:03:37 -0700 Subject: [PATCH 1236/1894] Properly handle reviewer comment re concurrent Read --- include/grpc++/impl/codegen/async_stream.h | 7 +++++-- include/grpc++/impl/codegen/sync_stream.h | 5 +++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/include/grpc++/impl/codegen/async_stream.h b/include/grpc++/impl/codegen/async_stream.h index cbc5d944295..e96d224ddbe 100644 --- a/include/grpc++/impl/codegen/async_stream.h +++ b/include/grpc++/impl/codegen/async_stream.h @@ -74,8 +74,11 @@ class AsyncReaderInterface { /// Read a message of type \a R into \a msg. Completion will be notified by \a /// tag on the associated completion queue. - /// This is thread-safe with respect to other streaming APIs except for \a - /// Finish on the same stream. + /// This is thread-safe with respect to \a Write or \a WritesDone methods. It + /// should not be called concurrently with other streaming APIs + /// on the same stream. It is not meaningful to call it concurrently + /// with another \a Read on the same stream since reads on the same stream + /// are delivered in order. /// /// \param[out] msg Where to eventually store the read message. /// \param[in] tag The tag identifying the operation. diff --git a/include/grpc++/impl/codegen/sync_stream.h b/include/grpc++/impl/codegen/sync_stream.h index e53717cabfc..cbfa4106995 100644 --- a/include/grpc++/impl/codegen/sync_stream.h +++ b/include/grpc++/impl/codegen/sync_stream.h @@ -71,8 +71,9 @@ class ReaderInterface { virtual ~ReaderInterface() {} /// Blocking read a message and parse to \a msg. Returns \a true on success. - /// This is thread-safe with respect to other streaming APIs except for \a - /// Finish on the same stream. (\a Finish must be called as described above.) + /// This is thread-safe with respect to \a Write or \WritesDone methods on + /// the same stream. It should not be called concurrently with another \a + /// Read on the same stream as the order of delivery will not be defined. /// /// \param[out] msg The read message. /// From 229533b1e68c4a4b8a67148f7fe25543584131f6 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Tue, 21 Jun 2016 20:42:52 -0700 Subject: [PATCH 1237/1894] Remove pollset->pi_mu since it is redundant. Also do not get polling island lock in the fast-path --- src/core/lib/iomgr/ev_epoll_linux.c | 82 ++++++++++++++++------------- src/core/lib/iomgr/ev_posix.c | 6 +-- 2 files changed, 46 insertions(+), 42 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 3a774a8876f..6464d3ba348 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -207,12 +207,7 @@ struct grpc_pollset { bool finish_shutdown_called; /* Is the 'finish_shutdown_locked()' called ? */ grpc_closure *shutdown_done; /* Called after after shutdown is complete */ - /* The polling island to which this pollset belongs to and the mutex - protecting the field */ - /* TODO: sreek: This lock might actually be adding more overhead to the - critical path (i.e pollset_work() function). Consider removing this lock - and just using the overall pollset lock */ - gpr_mu pi_mu; + /* The polling island to which this pollset belongs to */ struct polling_island *polling_island; }; @@ -488,31 +483,47 @@ static void polling_island_delete(polling_island *pi) { gpr_mu_unlock(&g_pi_freelist_mu); } +/* Attempts to gets the last polling island in the linked list (liked by the + * 'merged_to' field). Since this does not lock the polling island, there are no + * guarantees that the island returned is the last island */ +static polling_island *polling_island_maybe_get_latest(polling_island *pi) { + polling_island *next = (polling_island *)gpr_atm_acq_load(&pi->merged_to); + while (next != NULL) { + pi = next; + next = (polling_island *)gpr_atm_acq_load(&pi->merged_to); + } + + return pi; +} + /* Gets the lock on the *latest* polling island i.e the last polling island in - the linked list (linked by 'merged_to' link). Call gpr_mu_unlock on the + the linked list (linked by the 'merged_to' field). Call gpr_mu_unlock on the returned polling island's mu. Usage: To lock/unlock polling island "pi", do the following: polling_island *pi_latest = polling_island_lock(pi); ... ... critical section .. ... - gpr_mu_unlock(&pi_latest->mu); //NOTE: use pi_latest->mu. NOT pi->mu */ -polling_island *polling_island_lock(polling_island *pi) { + gpr_mu_unlock(&pi_latest->mu); // NOTE: use pi_latest->mu. NOT pi->mu */ +static polling_island *polling_island_lock(polling_island *pi) { polling_island *next = NULL; + while (true) { next = (polling_island *)gpr_atm_acq_load(&pi->merged_to); if (next == NULL) { - /* pi is the last node in the linked list. Get the lock and check again - (under the pi->mu lock) that pi is still the last node (because a merge - may have happend after the (next == NULL) check above and before - getting the pi->mu lock. - If pi is the last node, we are done. If not, unlock and continue - traversing the list */ + /* Looks like 'pi' is the last node in the linked list but unless we check + this by holding the pi->mu lock, we cannot be sure (i.e without the + pi->mu lock, we don't prevent island merges). + To be absolutely sure, check once more by holding the pi->mu lock */ gpr_mu_lock(&pi->mu); next = (polling_island *)gpr_atm_acq_load(&pi->merged_to); if (next == NULL) { + /* pi is infact the last node and we have the pi->mu lock. we're done */ break; } + + /* pi->merged_to is not NULL i.e pi isn't the last node anymore. pi->mu + * isn't the lock we are interested in. Continue traversing the list */ gpr_mu_unlock(&pi->mu); } @@ -526,11 +537,11 @@ polling_island *polling_island_lock(polling_island *pi) { This function is needed because calling the following block of code to obtain locks on polling islands (*p and *q) is prone to deadlocks. { - polling_island_lock(*p); - polling_island_lock(*q); + polling_island_lock(*p, true); + polling_island_lock(*q, true); } - Usage/exmaple: + Usage/example: polling_island *p1; polling_island *p2; .. @@ -551,7 +562,7 @@ polling_island *polling_island_lock(polling_island *pi) { } */ -void polling_island_lock_pair(polling_island **p, polling_island **q) { +static void polling_island_lock_pair(polling_island **p, polling_island **q) { polling_island *pi_1 = *p; polling_island *pi_2 = *q; polling_island *next_1 = NULL; @@ -611,7 +622,8 @@ void polling_island_lock_pair(polling_island **p, polling_island **q) { *q = pi_2; } -polling_island *polling_island_merge(polling_island *p, polling_island *q) { +static polling_island *polling_island_merge(polling_island *p, + polling_island *q) { /* Get locks on both the polling islands */ polling_island_lock_pair(&p, &q); @@ -1124,7 +1136,6 @@ static void pollset_init(grpc_pollset *pollset, gpr_mu **mu) { pollset->finish_shutdown_called = false; pollset->shutdown_done = NULL; - gpr_mu_init(&pollset->pi_mu); pollset->polling_island = NULL; } @@ -1170,12 +1181,10 @@ static void fd_become_writable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { } static void pollset_release_polling_island(grpc_pollset *ps, char *reason) { - gpr_mu_lock(&ps->pi_mu); if (ps->polling_island != NULL) { PI_UNREF(ps->polling_island, reason); } ps->polling_island = NULL; - gpr_mu_unlock(&ps->pi_mu); } static void finish_shutdown_locked(grpc_exec_ctx *exec_ctx, @@ -1215,7 +1224,6 @@ static void pollset_shutdown(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, * here */ static void pollset_destroy(grpc_pollset *pollset) { GPR_ASSERT(!pollset_has_workers(pollset)); - gpr_mu_destroy(&pollset->pi_mu); gpr_mu_destroy(&pollset->mu); } @@ -1250,22 +1258,25 @@ static grpc_error *pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, /* We need to get the epoll_fd to wait on. The epoll_fd is in inside the latest polling island pointed by pollset->polling_island. - Acquire the following locks: - - pollset->mu (which we already have) - - pollset->pi_mu - - pollset->polling_island lock */ - gpr_mu_lock(&pollset->pi_mu); + + Since epoll_fd is immutable, we can read it without obtaining the polling + island lock. There is however a possibility that the polling island (from + which we got the epoll_fd) got merged with another island while we are + in this function. This is still okay because in such a case, we will wakeup + right-away from epoll_wait() and pick up the latest polling_island the next + this function (i.e pollset_work_and_unlock()) is called. + */ if (pollset->polling_island == NULL) { pollset->polling_island = polling_island_create(NULL); PI_ADD_REF(pollset->polling_island, "ps"); } - pi = polling_island_lock(pollset->polling_island); + pi = polling_island_maybe_get_latest(pollset->polling_island); epoll_fd = pi->epoll_fd; /* Update the pollset->polling_island since the island being pointed by - pollset->polling_island may not be the latest (i.e pi) */ + pollset->polling_island maybe older than the one pointed by pi) */ if (pollset->polling_island != pi) { /* Always do PI_ADD_REF before PI_UNREF because PI_UNREF may cause the polling island to be deleted */ @@ -1278,9 +1289,6 @@ static grpc_error *pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, the epoll_fd won't be closed) while we are are doing an epoll_wait() on the epoll_fd */ PI_ADD_REF(pi, "ps_work"); - - gpr_mu_unlock(&pi->mu); - gpr_mu_unlock(&pollset->pi_mu); gpr_mu_unlock(&pollset->mu); do { @@ -1413,7 +1421,6 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_fd *fd) { gpr_mu_lock(&pollset->mu); - gpr_mu_lock(&pollset->pi_mu); gpr_mu_lock(&fd->pi_mu); polling_island *pi_new = NULL; @@ -1465,7 +1472,6 @@ static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, } gpr_mu_unlock(&fd->pi_mu); - gpr_mu_unlock(&pollset->pi_mu); gpr_mu_unlock(&pollset->mu); } @@ -1627,9 +1633,9 @@ void *grpc_fd_get_polling_island(grpc_fd *fd) { void *grpc_pollset_get_polling_island(grpc_pollset *ps) { polling_island *pi; - gpr_mu_lock(&ps->pi_mu); + gpr_mu_lock(&ps->mu); pi = ps->polling_island; - gpr_mu_unlock(&ps->pi_mu); + gpr_mu_unlock(&ps->mu); return pi; } diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index 4cdd13bbdba..a3c1e9db9a0 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -54,7 +54,7 @@ grpc_poll_function_type grpc_poll_function = poll; static const grpc_event_engine_vtable *g_event_engine; -static const char* g_poll_strategy_name = NULL; +static const char *g_poll_strategy_name = NULL; typedef const grpc_event_engine_vtable *(*event_engine_factory_fn)(void); @@ -111,9 +111,7 @@ static void try_engine(const char *engine) { } /* Call this only after calling grpc_event_engine_init() */ -const char *grpc_get_poll_strategy_name() { - return g_poll_strategy_name; -} +const char *grpc_get_poll_strategy_name() { return g_poll_strategy_name; } void grpc_event_engine_init(void) { char *s = gpr_getenv("GRPC_POLL_STRATEGY"); From caca0a15ded56b3732e0f67fe7d1507d9a7abf07 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Tue, 21 Jun 2016 23:07:49 -0700 Subject: [PATCH 1238/1894] Build objc examples as part of automatic tests --- src/objective-c/tests/build_example_test.sh | 56 +++++++++++++++++++ src/objective-c/tests/build_one_example.sh | 62 +++++++++++++++++++++ tools/run_tests/run_tests.py | 4 +- 3 files changed, 121 insertions(+), 1 deletion(-) create mode 100755 src/objective-c/tests/build_example_test.sh create mode 100755 src/objective-c/tests/build_one_example.sh diff --git a/src/objective-c/tests/build_example_test.sh b/src/objective-c/tests/build_example_test.sh new file mode 100755 index 00000000000..3cc0c552349 --- /dev/null +++ b/src/objective-c/tests/build_example_test.sh @@ -0,0 +1,56 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Don't run this script standalone. Instead, run from the repository root: +# ./tools/run_tests/run_tests.py -l objc + +set -eo pipefail + +cd `dirname $0` + +EXAMPLE_PATH=examples/objective-c/helloworld \ +SCHEME=HelloWorld \ +./build_one_example.sh + +EXAMPLE_PATH=examples/objective-c/route_guide \ +SCHEME=RouteGuideClient \ +./build_one_example.sh + +EXAMPLE_PATH=examples/objective-c/auth_sample \ +SCHEME=AuthSample \ +./build_one_example.sh + +EXAMPLE_PATH=src/objective-c/examples/Sample \ +SCHEME=Sample \ +./build_one_example.sh + +EXAMPLE_PATH=src/objective-c/examples/SwiftSample \ +SCHEME=SwiftSample \ +./build_one_example.sh diff --git a/src/objective-c/tests/build_one_example.sh b/src/objective-c/tests/build_one_example.sh new file mode 100755 index 00000000000..131fbd780df --- /dev/null +++ b/src/objective-c/tests/build_one_example.sh @@ -0,0 +1,62 @@ +#!/bin/bash +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# Don't run this script standalone. Instead, run from the repository root: +# ./tools/run_tests/run_tests.py -l objc + +set -e + +# Params: +# EXAMPLE_PATH - directory of the example +# SCHEME - scheme of the example, used by xcodebuild + +# CocoaPods requires the terminal to be using UTF-8 encoding. +export LANG=en_US.UTF-8 + +cd `dirname $0`/../../.. + +cd $EXAMPLE_PATH + +# clean the directory +git checkout . +git clean -df . +rm -rf Pods + +pod install + +set -o pipefail +XCODEBUILD_FILTER='(^===|^\*\*|\bfatal\b|\berror\b|\bwarning\b|\bfail)' +xcodebuild \ + clean build \ + -workspace *.xcworkspace \ + -scheme $SCHEME \ + -destination name="iPhone 6" \ + | egrep "$XCODEBUILD_FILTER" \ + | egrep -v "(GPBDictionary|GPBArray)" - diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 9ef12c5b07e..0d77f0dbf97 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -425,7 +425,7 @@ class PythonLanguage(object): return [] def build_steps(self): - return [['tools/run_tests/build_python.sh', tox_env] + return [['tools/run_tests/build_python.sh', tox_env] for tox_env in self._tox_envs] def post_tests_steps(self): @@ -602,6 +602,8 @@ class ObjCLanguage(object): def test_specs(self): return [self.config.job_spec(['src/objective-c/tests/run_tests.sh'], None, + environ=_FORCE_ENVIRON_FOR_WRAPPERS), + self.config.job_spec(['src/objective-c/tests/build_example_test.sh'], None, environ=_FORCE_ENVIRON_FOR_WRAPPERS)] def pre_build_steps(self): From f95a4898abd5888c34b31354cdbe9a909958aa08 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Tue, 21 Jun 2016 23:27:46 -0700 Subject: [PATCH 1239/1894] Fixed format issues --- src/objective-c/tests/build_example_test.sh | 2 +- src/objective-c/tests/build_one_example.sh | 2 +- tools/run_tests/run_tests.py | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/objective-c/tests/build_example_test.sh b/src/objective-c/tests/build_example_test.sh index 3cc0c552349..73405695e8e 100755 --- a/src/objective-c/tests/build_example_test.sh +++ b/src/objective-c/tests/build_example_test.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2015, Google Inc. +# Copyright 2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/src/objective-c/tests/build_one_example.sh b/src/objective-c/tests/build_one_example.sh index 131fbd780df..56f686319e1 100755 --- a/src/objective-c/tests/build_one_example.sh +++ b/src/objective-c/tests/build_one_example.sh @@ -1,5 +1,5 @@ #!/bin/bash -# Copyright 2015, Google Inc. +# Copyright 2016, Google Inc. # All rights reserved. # # Redistribution and use in source and binary forms, with or without diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 0d77f0dbf97..580afc32de4 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -603,8 +603,8 @@ class ObjCLanguage(object): def test_specs(self): return [self.config.job_spec(['src/objective-c/tests/run_tests.sh'], None, environ=_FORCE_ENVIRON_FOR_WRAPPERS), - self.config.job_spec(['src/objective-c/tests/build_example_test.sh'], None, - environ=_FORCE_ENVIRON_FOR_WRAPPERS)] + self.config.job_spec(['src/objective-c/tests/build_example_test.sh'], + None, environ=_FORCE_ENVIRON_FOR_WRAPPERS)] def pre_build_steps(self): return [] From 892f8f952ae28696ff4d900aeffb0c05f1699f63 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 21 Jun 2016 23:46:32 -0700 Subject: [PATCH 1240/1894] Update c# readme. --- src/csharp/README.md | 62 ++++++++++---------------------------------- 1 file changed, 14 insertions(+), 48 deletions(-) diff --git a/src/csharp/README.md b/src/csharp/README.md index 201c5ab0b56..b33d87ed383 100644 --- a/src/csharp/README.md +++ b/src/csharp/README.md @@ -19,33 +19,13 @@ PREREQUISITES HOW TO USE -------------- -**Windows** +**Windows, Linux, Mac OS X** -- Open Visual Studio and start a new project/solution. +- Open Visual Studio / MonoDevelop / Xamarin Studio and start a new project/solution. - Add NuGet package `Grpc` as a dependency (Project options -> Manage NuGet Packages). - That will also pull all the transitive dependencies (including the gRPC native library that - gRPC C# is using internally). - -**Linux (Debian)** - -- Open MonoDevelop and start a new project/solution. - -- Add NuGet package `Grpc` as a dependency (Project -> Add NuGet packages). - That will also pull all the transitive dependencies (including the gRPC native library that - gRPC C# is using internally). - -- NOTE: gRPC C# doesn't have a good story yet for shipping precompiled Linux version of Protocol Buffers compiler (_protoc_) and the gRPC _protoc_ plugin. You can install them using [gRPC Linuxbrew instructions][]. - -**Mac OS X** - -- Open Xamarin Studio and start a new project/solution. - -- Add NuGet package `Grpc` as a dependency (Project -> Add NuGet packages). - That will also pull all the transitive dependencies (including the gRPC native library that - gRPC C# is using internally). -- NOTE: gRPC C# doesn't have a good story yet for shipping precompiled Mac OS X version of Protocol Buffers compiler (_protoc_) and the gRPC _protoc_ plugin. You can install them using [gRPC Homebrew instructions][]. +- To be able to generate code from Protocol Buffer (`.proto`) file definitions, add NuGet package `Grpc.Tools` that contains Protocol Buffers compiler (_protoc_) and the gRPC _protoc_ plugin. BUILD FROM SOURCE ----------------- @@ -61,26 +41,15 @@ If you are a user of gRPC C#, go to Usage section above. - Open `src\csharp\Grpc.sln` (path is relative to gRPC repository root) using Visual Studio -**Linux** +**Linux and Mac OS X** - The grpc_csharp_ext native library needs to be built so you can build the gRPC C# solution: - ```sh - # from the gRPC repository root - $ make CONFIG=dbg grpc_csharp_ext - ``` - -- Use MonoDevelop to open the solution Grpc.sln - -**Mac OS X** - -- The grpc_csharp_ext native library needs to be built so you can build the gRPC C# solution. - ```sh # from the gRPC repository root $ tools/run_tests/run_tests.py -c dbg -l csharp --build_only ``` -- Use Xamarin Studio to open the solution Grpc.sln +- Use MonoDevelop / Xamarin Studio to open the solution Grpc.sln RUNNING TESTS ------------- @@ -102,8 +71,9 @@ tools/run_tests/run_tests.py -l csharp DOCUMENTATION ------------- -- the gRPC C# reference documentation is available online at [grpc.io][] -- [Helloworld example][] +- [API Reference][] +- [Helloworld Example][] +- [RouteGuide Tutorial][] CONTENTS -------- @@ -111,15 +81,15 @@ CONTENTS - ext: The extension library that wraps C API to be more digestible by C#. - Grpc.Auth: - gRPC OAuth2 support. + gRPC OAuth2/JWT support. - Grpc.Core: The main gRPC C# library. - Grpc.Examples: API examples for math.proto - Grpc.Examples.MathClient: - An example client that sends some requests to math server. + An example client that sends requests to math server. - Grpc.Examples.MathServer: - An example client that sends some requests to math server. + An example server that implements a simple math service. - Grpc.IntegrationTesting: Cross-language gRPC implementation testing (interop testing). @@ -130,10 +100,6 @@ Internally, gRPC C# uses a native library written in C (gRPC C core) and invokes Prior to version 0.13, installing `grpc_csharp_ext` was required to make gRPC work on Linux and MacOS. Starting with version 0.13, we have improved the packaging story significantly and precompiled versions of the native library for all supported platforms are now shipped with the NuGet package. Just installing the `Grpc` NuGet package should be the only step needed to use gRPC C#, regardless of your platform (Windows, Linux or Mac) and the bitness (32 or 64bit). -[gRPC Linuxbrew instructions]:https://github.com/grpc/homebrew-grpc#quick-install-linux -[gRPC Homebrew instructions]:https://github.com/grpc/homebrew-grpc#quick-install-linux -[homebrew]:http://brew.sh -[gRPC install script]:https://raw.githubusercontent.com/grpc/homebrew-grpc/master/scripts/install -[grpc.io]: http://www.grpc.io/docs/installation/csharp.html -[Debian jessie-backports]:http://backports.debian.org/Instructions/ -[Helloworld example]:../../examples/csharp/helloworld +[API Reference]: http://www.grpc.io/grpc/csharp/ +[Helloworld Example]: ../../examples/csharp/helloworld +[RouteGuide Tutorial]: http://www.grpc.io/docs/tutorials/basic/csharp.html From db3ffe13cbb37ea797890c455a4543c9d030adf5 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Wed, 22 Jun 2016 01:12:42 -0700 Subject: [PATCH 1241/1894] Update examples with Cocoapods 1.0.0 --- .../AuthSample.xcodeproj/project.pbxproj | 28 ++++++++--- .../HelloWorld.xcodeproj/project.pbxproj | 24 ++++----- .../project.pbxproj | 18 +++---- .../Sample/Sample.xcodeproj/project.pbxproj | 50 ++++++++++++------- .../SwiftSample.xcodeproj/project.pbxproj | 42 ++++++++-------- 5 files changed, 95 insertions(+), 67 deletions(-) diff --git a/examples/objective-c/auth_sample/AuthSample.xcodeproj/project.pbxproj b/examples/objective-c/auth_sample/AuthSample.xcodeproj/project.pbxproj index 51a39c578c7..ab7419c9bcd 100644 --- a/examples/objective-c/auth_sample/AuthSample.xcodeproj/project.pbxproj +++ b/examples/objective-c/auth_sample/AuthSample.xcodeproj/project.pbxproj @@ -116,11 +116,12 @@ isa = PBXNativeTarget; buildConfigurationList = 63E1E9A21B28CB2100EF0978 /* Build configuration list for PBXNativeTarget "AuthSample" */; buildPhases = ( - DAABBA7B5788A39108D7CA83 /* Check Pods Manifest.lock */, + DAABBA7B5788A39108D7CA83 /* [CP] Check Pods Manifest.lock */, 63E1E9781B28CB2000EF0978 /* Sources */, 63E1E9791B28CB2000EF0978 /* Frameworks */, 63E1E97A1B28CB2000EF0978 /* Resources */, - AEFCCC69DD59CE8F6EB769D7 /* Copy Pods Resources */, + AEFCCC69DD59CE8F6EB769D7 /* [CP] Copy Pods Resources */, + D24F6598302C412D4B863D6F /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -177,14 +178,14 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - AEFCCC69DD59CE8F6EB769D7 /* Copy Pods Resources */ = { + AEFCCC69DD59CE8F6EB769D7 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -192,14 +193,29 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AuthSample/Pods-AuthSample-resources.sh\"\n"; showEnvVarsInLog = 0; }; - DAABBA7B5788A39108D7CA83 /* Check Pods Manifest.lock */ = { + D24F6598302C412D4B863D6F /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Check Pods Manifest.lock"; + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-AuthSample/Pods-AuthSample-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; + DAABBA7B5788A39108D7CA83 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; diff --git a/examples/objective-c/helloworld/HelloWorld.xcodeproj/project.pbxproj b/examples/objective-c/helloworld/HelloWorld.xcodeproj/project.pbxproj index 250f009996f..df5c40cda20 100644 --- a/examples/objective-c/helloworld/HelloWorld.xcodeproj/project.pbxproj +++ b/examples/objective-c/helloworld/HelloWorld.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 3EF35C14BDC2B65E21837F02 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 43AB08B32839A6700EA00DD4 /* libPods.a */; }; 5E3690661B2A23800040F884 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3690651B2A23800040F884 /* main.m */; }; 5E3690691B2A23800040F884 /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E3690681B2A23800040F884 /* AppDelegate.m */; }; 5E36906C1B2A23800040F884 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 5E36906B1B2A23800040F884 /* ViewController.m */; }; @@ -18,7 +17,6 @@ /* Begin PBXFileReference section */ 0C432EF610DB15C0F47A66BB /* Pods-HelloWorld.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-HelloWorld.release.xcconfig"; path = "Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld.release.xcconfig"; sourceTree = ""; }; - 43AB08B32839A6700EA00DD4 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; 5E3690601B2A23800040F884 /* HelloWorld.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloWorld.app; sourceTree = BUILT_PRODUCTS_DIR; }; 5E3690641B2A23800040F884 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 5E3690651B2A23800040F884 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; @@ -37,7 +35,6 @@ buildActionMask = 2147483647; files = ( EF61CF6AE2536A31D47F0E63 /* libPods-HelloWorld.a in Frameworks */, - 3EF35C14BDC2B65E21837F02 /* libPods.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -88,7 +85,6 @@ isa = PBXGroup; children = ( 6B4E1F55F8A2EC95A0E7EE88 /* libPods-HelloWorld.a */, - 43AB08B32839A6700EA00DD4 /* libPods.a */, ); name = Frameworks; sourceTree = ""; @@ -109,12 +105,12 @@ isa = PBXNativeTarget; buildConfigurationList = 5E3690831B2A23810040F884 /* Build configuration list for PBXNativeTarget "HelloWorld" */; buildPhases = ( - ACF9162361FB8F24C70657DE /* Check Pods Manifest.lock */, + ACF9162361FB8F24C70657DE /* [CP] Check Pods Manifest.lock */, 5E36905C1B2A23800040F884 /* Sources */, 5E36905D1B2A23800040F884 /* Frameworks */, 5E36905E1B2A23800040F884 /* Resources */, - 4C7D815378D98AB3BFC1A7D5 /* Copy Pods Resources */, - BB76529986A8BFAF19A385B1 /* Embed Pods Frameworks */, + 4C7D815378D98AB3BFC1A7D5 /* [CP] Copy Pods Resources */, + BB76529986A8BFAF19A385B1 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -170,14 +166,14 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 4C7D815378D98AB3BFC1A7D5 /* Copy Pods Resources */ = { + 4C7D815378D98AB3BFC1A7D5 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -185,14 +181,14 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-resources.sh\"\n"; showEnvVarsInLog = 0; }; - ACF9162361FB8F24C70657DE /* Check Pods Manifest.lock */ = { + ACF9162361FB8F24C70657DE /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Check Pods Manifest.lock"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -200,19 +196,19 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - BB76529986A8BFAF19A385B1 /* Embed Pods Frameworks */ = { + BB76529986A8BFAF19A385B1 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Embed Pods Frameworks"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-HelloWorld/Pods-HelloWorld-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ diff --git a/examples/objective-c/route_guide/RouteGuideClient.xcodeproj/project.pbxproj b/examples/objective-c/route_guide/RouteGuideClient.xcodeproj/project.pbxproj index f99775562c0..0bb84b3b905 100644 --- a/examples/objective-c/route_guide/RouteGuideClient.xcodeproj/project.pbxproj +++ b/examples/objective-c/route_guide/RouteGuideClient.xcodeproj/project.pbxproj @@ -116,12 +116,12 @@ isa = PBXNativeTarget; buildConfigurationList = 632527A31B1D0396003073D9 /* Build configuration list for PBXNativeTarget "RouteGuideClient" */; buildPhases = ( - C6FC30AD2376EC04317237C5 /* Check Pods Manifest.lock */, + C6FC30AD2376EC04317237C5 /* [CP] Check Pods Manifest.lock */, 632527791B1D0395003073D9 /* Sources */, 6325277A1B1D0395003073D9 /* Frameworks */, 6325277B1B1D0395003073D9 /* Resources */, - FFE0BCF30339E7A50A989EAB /* Copy Pods Resources */, - B5388EC5A25E89021740B916 /* Embed Pods Frameworks */, + FFE0BCF30339E7A50A989EAB /* [CP] Copy Pods Resources */, + B5388EC5A25E89021740B916 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -178,14 +178,14 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - B5388EC5A25E89021740B916 /* Embed Pods Frameworks */ = { + B5388EC5A25E89021740B916 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Embed Pods Frameworks"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -193,14 +193,14 @@ shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-RouteGuideClient/Pods-RouteGuideClient-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - C6FC30AD2376EC04317237C5 /* Check Pods Manifest.lock */ = { + C6FC30AD2376EC04317237C5 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Check Pods Manifest.lock"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -208,14 +208,14 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - FFE0BCF30339E7A50A989EAB /* Copy Pods Resources */ = { + FFE0BCF30339E7A50A989EAB /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; diff --git a/src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj b/src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj index 611eb6032d5..5c2a6d14f96 100644 --- a/src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj +++ b/src/objective-c/examples/Sample/Sample.xcodeproj/project.pbxproj @@ -7,16 +7,16 @@ objects = { /* Begin PBXBuildFile section */ + 426A5020E0E158A101BCA1D9 /* libPods-Sample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C20055928615A6F8434E26B4 /* libPods-Sample.a */; }; 6369A2701A9322E20015FC5C /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 6369A26F1A9322E20015FC5C /* main.m */; }; 6369A2731A9322E20015FC5C /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 6369A2721A9322E20015FC5C /* AppDelegate.m */; }; 6369A2761A9322E20015FC5C /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 6369A2751A9322E20015FC5C /* ViewController.m */; }; 6369A2791A9322E20015FC5C /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 6369A2771A9322E20015FC5C /* Main.storyboard */; }; 6369A27B1A9322E20015FC5C /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 6369A27A1A9322E20015FC5C /* Images.xcassets */; }; - FC81FE63CA655031F3524EC0 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 2DC7B7C4C0410F43B9621631 /* libPods.a */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 2DC7B7C4C0410F43B9621631 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 5A8C9F4B28733B249DE4AB6D /* Pods-Sample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Sample.release.xcconfig"; path = "Pods/Target Support Files/Pods-Sample/Pods-Sample.release.xcconfig"; sourceTree = ""; }; 6369A26A1A9322E20015FC5C /* Sample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Sample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 6369A26E1A9322E20015FC5C /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 6369A26F1A9322E20015FC5C /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; @@ -26,8 +26,8 @@ 6369A2751A9322E20015FC5C /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = ""; }; 6369A2781A9322E20015FC5C /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 6369A27A1A9322E20015FC5C /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; - AC29DD6FCDF962F519FEBB0D /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; - C68330F8D451CC6ACEABA09F /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; + C20055928615A6F8434E26B4 /* libPods-Sample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-Sample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + E3C01DF315C4E7433BCEC6E6 /* Pods-Sample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-Sample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-Sample/Pods-Sample.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -35,7 +35,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - FC81FE63CA655031F3524EC0 /* libPods.a in Frameworks */, + 426A5020E0E158A101BCA1D9 /* libPods-Sample.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -86,8 +86,8 @@ AB3331C9AE6488E61B2B094E /* Pods */ = { isa = PBXGroup; children = ( - AC29DD6FCDF962F519FEBB0D /* Pods.debug.xcconfig */, - C68330F8D451CC6ACEABA09F /* Pods.release.xcconfig */, + E3C01DF315C4E7433BCEC6E6 /* Pods-Sample.debug.xcconfig */, + 5A8C9F4B28733B249DE4AB6D /* Pods-Sample.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -95,7 +95,7 @@ C4C2C5219053E079C9EFB930 /* Frameworks */ = { isa = PBXGroup; children = ( - 2DC7B7C4C0410F43B9621631 /* libPods.a */, + C20055928615A6F8434E26B4 /* libPods-Sample.a */, ); name = Frameworks; sourceTree = ""; @@ -107,11 +107,12 @@ isa = PBXNativeTarget; buildConfigurationList = 6369A28D1A9322E20015FC5C /* Build configuration list for PBXNativeTarget "Sample" */; buildPhases = ( - 41F7486D8F66994B0BFB84AF /* Check Pods Manifest.lock */, + 41F7486D8F66994B0BFB84AF /* [CP] Check Pods Manifest.lock */, 6369A2661A9322E20015FC5C /* Sources */, 6369A2671A9322E20015FC5C /* Frameworks */, 6369A2681A9322E20015FC5C /* Resources */, - 04554623324BE4A838846086 /* Copy Pods Resources */, + 04554623324BE4A838846086 /* [CP] Copy Pods Resources */, + C7FAD018D05AB5F0B0FE81E2 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -167,29 +168,29 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 04554623324BE4A838846086 /* Copy Pods Resources */ = { + 04554623324BE4A838846086 /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Sample/Pods-Sample-resources.sh\"\n"; showEnvVarsInLog = 0; }; - 41F7486D8F66994B0BFB84AF /* Check Pods Manifest.lock */ = { + 41F7486D8F66994B0BFB84AF /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Check Pods Manifest.lock"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -197,6 +198,21 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; + C7FAD018D05AB5F0B0FE81E2 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-Sample/Pods-Sample-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; /* End PBXShellScriptBuildPhase section */ /* Begin PBXSourcesBuildPhase section */ @@ -304,7 +320,7 @@ }; 6369A28E1A9322E20015FC5C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = AC29DD6FCDF962F519FEBB0D /* Pods.debug.xcconfig */; + baseConfigurationReference = E3C01DF315C4E7433BCEC6E6 /* Pods-Sample.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Sample/Info.plist; @@ -315,7 +331,7 @@ }; 6369A28F1A9322E20015FC5C /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C68330F8D451CC6ACEABA09F /* Pods.release.xcconfig */; + baseConfigurationReference = 5A8C9F4B28733B249DE4AB6D /* Pods-Sample.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Sample/Info.plist; diff --git a/src/objective-c/examples/SwiftSample/SwiftSample.xcodeproj/project.pbxproj b/src/objective-c/examples/SwiftSample/SwiftSample.xcodeproj/project.pbxproj index 2f5716082bf..2a1b30f2cf9 100644 --- a/src/objective-c/examples/SwiftSample/SwiftSample.xcodeproj/project.pbxproj +++ b/src/objective-c/examples/SwiftSample/SwiftSample.xcodeproj/project.pbxproj @@ -7,15 +7,14 @@ objects = { /* Begin PBXBuildFile section */ - 253D3A297105CA46DA960A11 /* libPods.a in Frameworks */ = {isa = PBXBuildFile; fileRef = DC58ACA18DCCB1553531B885 /* libPods.a */; }; 633BFFC81B950B210007E424 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 633BFFC71B950B210007E424 /* AppDelegate.swift */; }; 633BFFCA1B950B210007E424 /* ViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 633BFFC91B950B210007E424 /* ViewController.swift */; }; 633BFFCD1B950B210007E424 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 633BFFCB1B950B210007E424 /* Main.storyboard */; }; 633BFFCF1B950B210007E424 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 633BFFCE1B950B210007E424 /* Images.xcassets */; }; + 92EDB1408A1E1E7DDAB25D9C /* libPods-SwiftSample.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 69BB5C6CA3C1F97E007AC527 /* libPods-SwiftSample.a */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ - 12C7B447AA80E624D93B5C54 /* Pods.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.debug.xcconfig; path = "Pods/Target Support Files/Pods/Pods.debug.xcconfig"; sourceTree = ""; }; 633BFFC21B950B210007E424 /* SwiftSample.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SwiftSample.app; sourceTree = BUILT_PRODUCTS_DIR; }; 633BFFC61B950B210007E424 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 633BFFC71B950B210007E424 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; }; @@ -23,8 +22,9 @@ 633BFFCC1B950B210007E424 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 633BFFCE1B950B210007E424 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; }; 6367AD231B951655007FD3A4 /* Bridging-Header.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "Bridging-Header.h"; sourceTree = ""; }; - C335CBC4C160E0D9EDEE646B /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; - DC58ACA18DCCB1553531B885 /* libPods.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = libPods.a; sourceTree = BUILT_PRODUCTS_DIR; }; + 69BB5C6CA3C1F97E007AC527 /* libPods-SwiftSample.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-SwiftSample.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + A7E614A494D89D01BB395761 /* Pods-SwiftSample.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftSample.debug.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftSample/Pods-SwiftSample.debug.xcconfig"; sourceTree = ""; }; + C314E3E246AF23AC29B38FCF /* Pods-SwiftSample.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-SwiftSample.release.xcconfig"; path = "Pods/Target Support Files/Pods-SwiftSample/Pods-SwiftSample.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -32,7 +32,7 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 253D3A297105CA46DA960A11 /* libPods.a in Frameworks */, + 92EDB1408A1E1E7DDAB25D9C /* libPods-SwiftSample.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -42,8 +42,8 @@ 31F283C976AE97586C17CCD9 /* Pods */ = { isa = PBXGroup; children = ( - 12C7B447AA80E624D93B5C54 /* Pods.debug.xcconfig */, - C335CBC4C160E0D9EDEE646B /* Pods.release.xcconfig */, + A7E614A494D89D01BB395761 /* Pods-SwiftSample.debug.xcconfig */, + C314E3E246AF23AC29B38FCF /* Pods-SwiftSample.release.xcconfig */, ); name = Pods; sourceTree = ""; @@ -90,7 +90,7 @@ 9D63A7F6423989BA306810CA /* Frameworks */ = { isa = PBXGroup; children = ( - DC58ACA18DCCB1553531B885 /* libPods.a */, + 69BB5C6CA3C1F97E007AC527 /* libPods-SwiftSample.a */, ); name = Frameworks; sourceTree = ""; @@ -102,12 +102,12 @@ isa = PBXNativeTarget; buildConfigurationList = 633BFFE11B950B210007E424 /* Build configuration list for PBXNativeTarget "SwiftSample" */; buildPhases = ( - 6BEEB33CA2705D7D2F2210E6 /* Check Pods Manifest.lock */, + 6BEEB33CA2705D7D2F2210E6 /* [CP] Check Pods Manifest.lock */, 633BFFBE1B950B210007E424 /* Sources */, 633BFFBF1B950B210007E424 /* Frameworks */, 633BFFC01B950B210007E424 /* Resources */, - AC2F6F9AB1C090BB0BEE6E4D /* Copy Pods Resources */, - A1738A987353B0BF2C64F0F7 /* Embed Pods Frameworks */, + AC2F6F9AB1C090BB0BEE6E4D /* [CP] Copy Pods Resources */, + A1738A987353B0BF2C64F0F7 /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -164,14 +164,14 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 6BEEB33CA2705D7D2F2210E6 /* Check Pods Manifest.lock */ = { + 6BEEB33CA2705D7D2F2210E6 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Check Pods Manifest.lock"; + name = "[CP] Check Pods Manifest.lock"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; @@ -179,34 +179,34 @@ shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; showEnvVarsInLog = 0; }; - A1738A987353B0BF2C64F0F7 /* Embed Pods Frameworks */ = { + A1738A987353B0BF2C64F0F7 /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Embed Pods Frameworks"; + name = "[CP] Embed Pods Frameworks"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwiftSample/Pods-SwiftSample-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - AC2F6F9AB1C090BB0BEE6E4D /* Copy Pods Resources */ = { + AC2F6F9AB1C090BB0BEE6E4D /* [CP] Copy Pods Resources */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); inputPaths = ( ); - name = "Copy Pods Resources"; + name = "[CP] Copy Pods Resources"; outputPaths = ( ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-resources.sh\"\n"; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-SwiftSample/Pods-SwiftSample-resources.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -320,7 +320,7 @@ }; 633BFFE21B950B210007E424 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 12C7B447AA80E624D93B5C54 /* Pods.debug.xcconfig */; + baseConfigurationReference = A7E614A494D89D01BB395761 /* Pods-SwiftSample.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Info.plist; @@ -333,7 +333,7 @@ }; 633BFFE31B950B210007E424 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C335CBC4C160E0D9EDEE646B /* Pods.release.xcconfig */; + baseConfigurationReference = C314E3E246AF23AC29B38FCF /* Pods-SwiftSample.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Info.plist; From c0668c837b0ee48f64d0a912e2c6120f2ab719c5 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Wed, 22 Jun 2016 01:30:47 -0700 Subject: [PATCH 1242/1894] Increase timeout_seconds for build_example_test --- tools/run_tests/run_tests.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 580afc32de4..5c8f6f2a0e7 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -604,7 +604,8 @@ class ObjCLanguage(object): return [self.config.job_spec(['src/objective-c/tests/run_tests.sh'], None, environ=_FORCE_ENVIRON_FOR_WRAPPERS), self.config.job_spec(['src/objective-c/tests/build_example_test.sh'], - None, environ=_FORCE_ENVIRON_FOR_WRAPPERS)] + timeout_seconds=15*60, None, + environ=_FORCE_ENVIRON_FOR_WRAPPERS)] def pre_build_steps(self): return [] From c82324fa499c17c0458abaaea9caac49c1553356 Mon Sep 17 00:00:00 2001 From: Tamas Berghammer Date: Wed, 22 Jun 2016 13:23:27 +0100 Subject: [PATCH 1243/1894] Remove some unneccessary dependency from build.yaml This is the copy of the build.yaml changes from the following CL: https://github.com/grpc/grpc/pull/4124/files#diff-5b123ecec7bf9d216a1323f790a0602a --- Makefile | 21 ++++++------ build.yaml | 10 ++---- tools/run_tests/sources_and_headers.json | 12 ++----- vsprojects/buildtests_c.sln | 8 +---- vsprojects/grpc.sln | 33 ------------------- .../grpc_create_jwt/grpc_create_jwt.vcxproj | 6 ---- ...c_print_google_default_creds_token.vcxproj | 6 ---- .../grpc_verify_jwt/grpc_verify_jwt.vcxproj | 6 ---- .../grpc_fetch_oauth2.vcxproj | 27 +++++++++++++-- .../grpc_fetch_oauth2.vcxproj.filters | 0 10 files changed, 43 insertions(+), 86 deletions(-) rename vsprojects/vcxproj/{ => test}/grpc_fetch_oauth2/grpc_fetch_oauth2.vcxproj (67%) rename vsprojects/vcxproj/{ => test}/grpc_fetch_oauth2/grpc_fetch_oauth2.vcxproj.filters (100%) diff --git a/Makefile b/Makefile index ca642429519..3d6566c8110 100644 --- a/Makefile +++ b/Makefile @@ -1279,6 +1279,7 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/grpc_channel_stack_test \ $(BINDIR)/$(CONFIG)/grpc_completion_queue_test \ $(BINDIR)/$(CONFIG)/grpc_credentials_test \ + $(BINDIR)/$(CONFIG)/grpc_fetch_oauth2 \ $(BINDIR)/$(CONFIG)/grpc_invalid_channel_args_test \ $(BINDIR)/$(CONFIG)/grpc_json_token_test \ $(BINDIR)/$(CONFIG)/grpc_jwt_verifier_test \ @@ -1837,7 +1838,7 @@ test_python: static_c tools: tools_c tools_cxx -tools_c: privatelibs_c $(BINDIR)/$(CONFIG)/gen_hpack_tables $(BINDIR)/$(CONFIG)/gen_legal_metadata_characters $(BINDIR)/$(CONFIG)/grpc_create_jwt $(BINDIR)/$(CONFIG)/grpc_fetch_oauth2 $(BINDIR)/$(CONFIG)/grpc_print_google_default_creds_token $(BINDIR)/$(CONFIG)/grpc_verify_jwt +tools_c: privatelibs_c $(BINDIR)/$(CONFIG)/gen_hpack_tables $(BINDIR)/$(CONFIG)/gen_legal_metadata_characters $(BINDIR)/$(CONFIG)/grpc_create_jwt $(BINDIR)/$(CONFIG)/grpc_print_google_default_creds_token $(BINDIR)/$(CONFIG)/grpc_verify_jwt tools_cxx: privatelibs_cxx @@ -8171,14 +8172,14 @@ else -$(BINDIR)/$(CONFIG)/grpc_create_jwt: $(GRPC_CREATE_JWT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/grpc_create_jwt: $(GRPC_CREATE_JWT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_CREATE_JWT_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)/grpc_create_jwt + $(Q) $(LD) $(LDFLAGS) $(GRPC_CREATE_JWT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_create_jwt endif -$(OBJDIR)/$(CONFIG)/test/core/security/create_jwt.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/security/create_jwt.o: $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_grpc_create_jwt: $(GRPC_CREATE_JWT_OBJS:.o=.dep) @@ -8363,14 +8364,14 @@ else -$(BINDIR)/$(CONFIG)/grpc_print_google_default_creds_token: $(GRPC_PRINT_GOOGLE_DEFAULT_CREDS_TOKEN_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/grpc_print_google_default_creds_token: $(GRPC_PRINT_GOOGLE_DEFAULT_CREDS_TOKEN_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_PRINT_GOOGLE_DEFAULT_CREDS_TOKEN_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)/grpc_print_google_default_creds_token + $(Q) $(LD) $(LDFLAGS) $(GRPC_PRINT_GOOGLE_DEFAULT_CREDS_TOKEN_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_print_google_default_creds_token endif -$(OBJDIR)/$(CONFIG)/test/core/security/print_google_default_creds_token.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/security/print_google_default_creds_token.o: $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_grpc_print_google_default_creds_token: $(GRPC_PRINT_GOOGLE_DEFAULT_CREDS_TOKEN_OBJS:.o=.dep) @@ -8427,14 +8428,14 @@ else -$(BINDIR)/$(CONFIG)/grpc_verify_jwt: $(GRPC_VERIFY_JWT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a +$(BINDIR)/$(CONFIG)/grpc_verify_jwt: $(GRPC_VERIFY_JWT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LD) $(LDFLAGS) $(GRPC_VERIFY_JWT_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)/grpc_verify_jwt + $(Q) $(LD) $(LDFLAGS) $(GRPC_VERIFY_JWT_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LDLIBS) $(LDLIBS_SECURE) -o $(BINDIR)/$(CONFIG)/grpc_verify_jwt endif -$(OBJDIR)/$(CONFIG)/test/core/security/verify_jwt.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/security/verify_jwt.o: $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr.a deps_grpc_verify_jwt: $(GRPC_VERIFY_JWT_OBJS:.o=.dep) diff --git a/build.yaml b/build.yaml index 59f7d19dfcc..2d93e20fa62 100644 --- a/build.yaml +++ b/build.yaml @@ -1706,10 +1706,9 @@ targets: src: - test/core/security/create_jwt.c deps: - - grpc_test_util - grpc - - gpr_test_util - gpr + secure: true - name: grpc_credentials_test build: test language: c @@ -1721,7 +1720,8 @@ targets: - gpr_test_util - gpr - name: grpc_fetch_oauth2 - build: tool + build: test + run: false language: c src: - test/core/security/fetch_oauth2.c @@ -1770,9 +1770,7 @@ targets: src: - test/core/security/print_google_default_creds_token.c deps: - - grpc_test_util - grpc - - gpr_test_util - gpr - name: grpc_security_connector_test build: test @@ -1790,9 +1788,7 @@ targets: src: - test/core/security/verify_jwt.c deps: - - grpc_test_util - grpc - - gpr_test_util - gpr - name: hpack_parser_fuzzer_test build: fuzzer diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 4cfd1c51f8f..c3a219b06e6 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -789,9 +789,7 @@ { "deps": [ "gpr", - "gpr_test_util", - "grpc", - "grpc_test_util" + "grpc" ], "headers": [], "language": "c", @@ -885,9 +883,7 @@ { "deps": [ "gpr", - "gpr_test_util", - "grpc", - "grpc_test_util" + "grpc" ], "headers": [], "language": "c", @@ -917,9 +913,7 @@ { "deps": [ "gpr", - "gpr_test_util", - "grpc", - "grpc_test_util" + "grpc" ], "headers": [], "language": "c", diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index a847add7730..0ead8845ed9 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -522,9 +522,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_create_jwt", "vcxproj\ lib = "False" EndProjectSection ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject @@ -539,7 +537,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_credentials_test", "vc {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_fetch_oauth2", "vcxproj\.\grpc_fetch_oauth2\grpc_fetch_oauth2.vcxproj", "{43722E98-54EC-5058-3DAC-327F45964971}" +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_fetch_oauth2", "vcxproj\test\grpc_fetch_oauth2\grpc_fetch_oauth2.vcxproj", "{43722E98-54EC-5058-3DAC-327F45964971}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection @@ -577,9 +575,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_print_google_default_c lib = "False" EndProjectSection ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject @@ -628,9 +624,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_verify_jwt", "vcxproj\ lib = "False" EndProjectSection ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln index 771fefc56bd..6105f724c9f 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -73,9 +73,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_create_jwt", "vcxproj\ lib = "False" EndProjectSection ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject @@ -88,25 +86,12 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_dll", "vcxproj\.\grpc_ {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_fetch_oauth2", "vcxproj\.\grpc_fetch_oauth2\grpc_fetch_oauth2.vcxproj", "{43722E98-54EC-5058-3DAC-327F45964971}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_print_google_default_creds_token", "vcxproj\.\grpc_print_google_default_creds_token\grpc_print_google_default_creds_token.vcxproj", "{C002965C-8457-CCE5-B1BA-E748FF9A11B6}" ProjectSection(myProperties) = preProject lib = "False" EndProjectSection ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject @@ -144,9 +129,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_verify_jwt", "vcxproj\ lib = "False" EndProjectSection ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject @@ -366,22 +349,6 @@ Global {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release-DLL|Win32.Build.0 = Release|Win32 {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release-DLL|x64.ActiveCfg = Release|x64 {A2F6CBBA-A553-41B3-A7DE-F26DECCC27F0}.Release-DLL|x64.Build.0 = Release|x64 - {43722E98-54EC-5058-3DAC-327F45964971}.Debug|Win32.ActiveCfg = Debug|Win32 - {43722E98-54EC-5058-3DAC-327F45964971}.Debug|x64.ActiveCfg = Debug|x64 - {43722E98-54EC-5058-3DAC-327F45964971}.Release|Win32.ActiveCfg = Release|Win32 - {43722E98-54EC-5058-3DAC-327F45964971}.Release|x64.ActiveCfg = Release|x64 - {43722E98-54EC-5058-3DAC-327F45964971}.Debug|Win32.Build.0 = Debug|Win32 - {43722E98-54EC-5058-3DAC-327F45964971}.Debug|x64.Build.0 = Debug|x64 - {43722E98-54EC-5058-3DAC-327F45964971}.Release|Win32.Build.0 = Release|Win32 - {43722E98-54EC-5058-3DAC-327F45964971}.Release|x64.Build.0 = Release|x64 - {43722E98-54EC-5058-3DAC-327F45964971}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {43722E98-54EC-5058-3DAC-327F45964971}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {43722E98-54EC-5058-3DAC-327F45964971}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {43722E98-54EC-5058-3DAC-327F45964971}.Debug-DLL|x64.Build.0 = Debug|x64 - {43722E98-54EC-5058-3DAC-327F45964971}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {43722E98-54EC-5058-3DAC-327F45964971}.Release-DLL|Win32.Build.0 = Release|Win32 - {43722E98-54EC-5058-3DAC-327F45964971}.Release-DLL|x64.ActiveCfg = Release|x64 - {43722E98-54EC-5058-3DAC-327F45964971}.Release-DLL|x64.Build.0 = Release|x64 {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Debug|Win32.ActiveCfg = Debug|Win32 {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Debug|x64.ActiveCfg = Debug|x64 {C002965C-8457-CCE5-B1BA-E748FF9A11B6}.Release|Win32.ActiveCfg = Release|Win32 diff --git a/vsprojects/vcxproj/grpc_create_jwt/grpc_create_jwt.vcxproj b/vsprojects/vcxproj/grpc_create_jwt/grpc_create_jwt.vcxproj index ec4ec4a461f..4e8c088e2d7 100644 --- a/vsprojects/vcxproj/grpc_create_jwt/grpc_create_jwt.vcxproj +++ b/vsprojects/vcxproj/grpc_create_jwt/grpc_create_jwt.vcxproj @@ -151,15 +151,9 @@
- - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} diff --git a/vsprojects/vcxproj/grpc_print_google_default_creds_token/grpc_print_google_default_creds_token.vcxproj b/vsprojects/vcxproj/grpc_print_google_default_creds_token/grpc_print_google_default_creds_token.vcxproj index 87a4a6e9e42..ed0b98c6122 100644 --- a/vsprojects/vcxproj/grpc_print_google_default_creds_token/grpc_print_google_default_creds_token.vcxproj +++ b/vsprojects/vcxproj/grpc_print_google_default_creds_token/grpc_print_google_default_creds_token.vcxproj @@ -151,15 +151,9 @@ - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} diff --git a/vsprojects/vcxproj/grpc_verify_jwt/grpc_verify_jwt.vcxproj b/vsprojects/vcxproj/grpc_verify_jwt/grpc_verify_jwt.vcxproj index 27b166582a7..e75143bee6d 100644 --- a/vsprojects/vcxproj/grpc_verify_jwt/grpc_verify_jwt.vcxproj +++ b/vsprojects/vcxproj/grpc_verify_jwt/grpc_verify_jwt.vcxproj @@ -151,15 +151,9 @@ - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} diff --git a/vsprojects/vcxproj/grpc_fetch_oauth2/grpc_fetch_oauth2.vcxproj b/vsprojects/vcxproj/test/grpc_fetch_oauth2/grpc_fetch_oauth2.vcxproj similarity index 67% rename from vsprojects/vcxproj/grpc_fetch_oauth2/grpc_fetch_oauth2.vcxproj rename to vsprojects/vcxproj/test/grpc_fetch_oauth2/grpc_fetch_oauth2.vcxproj index 393f8e59024..52bb2697662 100644 --- a/vsprojects/vcxproj/grpc_fetch_oauth2/grpc_fetch_oauth2.vcxproj +++ b/vsprojects/vcxproj/test/grpc_fetch_oauth2/grpc_fetch_oauth2.vcxproj @@ -1,5 +1,6 @@ + Debug @@ -37,12 +38,12 @@ v140 - StaticLibrary + Application true Unicode - StaticLibrary + Application false true Unicode @@ -53,14 +54,24 @@ + + grpc_fetch_oauth2 + static + Debug + static + Debug grpc_fetch_oauth2 + static + Release + static + Release @@ -164,13 +175,25 @@ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + diff --git a/vsprojects/vcxproj/grpc_fetch_oauth2/grpc_fetch_oauth2.vcxproj.filters b/vsprojects/vcxproj/test/grpc_fetch_oauth2/grpc_fetch_oauth2.vcxproj.filters similarity index 100% rename from vsprojects/vcxproj/grpc_fetch_oauth2/grpc_fetch_oauth2.vcxproj.filters rename to vsprojects/vcxproj/test/grpc_fetch_oauth2/grpc_fetch_oauth2.vcxproj.filters From df6a44cd93ba069b6927006cd761b44921e6da41 Mon Sep 17 00:00:00 2001 From: Tamas Berghammer Date: Wed, 22 Jun 2016 13:38:55 +0100 Subject: [PATCH 1244/1894] Improve the generated cmake build files * Add project name and version number * Fix zlib dependency of grpc * Include more target (all, protoc, tool groups) --- CMakeLists.txt | 108 ++++++++++++++++++++++++++++-- templates/CMakeLists.txt.template | 21 ++++-- 2 files changed, 119 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5bd48b78ea9..a81517a6a0b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -38,13 +38,20 @@ cmake_minimum_required(VERSION 2.8) -if (NOT BORINGSSL_ROOT_DIR) +set(PACKAGE_NAME "grpc") +set(PACKAGE_VERSION "0.15.0-dev") +set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") +set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}") +set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/") +project(${PACKAGE_NAME} C CXX) + +if(NOT BORINGSSL_ROOT_DIR) set(BORINGSSL_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/boringssl) endif() -if (NOT PROTOBUF_ROOT_DIR) +if(NOT PROTOBUF_ROOT_DIR) set(PROTOBUF_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/protobuf) endif() -if (NOT ZLIB_ROOT_DIR) +if(NOT ZLIB_ROOT_DIR) set(ZLIB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zlib) endif() @@ -52,7 +59,7 @@ add_subdirectory(${BORINGSSL_ROOT_DIR} third_party/boringssl) add_subdirectory(${PROTOBUF_ROOT_DIR}/cmake third_party/protobuf) add_subdirectory(${ZLIB_ROOT_DIR} third_party/zlib) -set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c11") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11") @@ -313,6 +320,7 @@ target_include_directories(grpc target_link_libraries(grpc ssl + zlibstatic gpr ) @@ -831,6 +839,98 @@ target_link_libraries(grpc_csharp_ext +add_executable(gen_hpack_tables + tools/codegen/core/gen_hpack_tables.c +) + +target_include_directories(gen_hpack_tables + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + +target_link_libraries(gen_hpack_tables + gpr + grpc +) + + +add_executable(gen_legal_metadata_characters + tools/codegen/core/gen_legal_metadata_characters.c +) + +target_include_directories(gen_legal_metadata_characters + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + + + +add_executable(grpc_create_jwt + test/core/security/create_jwt.c +) + +target_include_directories(grpc_create_jwt + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + +target_link_libraries(grpc_create_jwt + ssl + grpc + gpr +) + + +add_executable(grpc_print_google_default_creds_token + test/core/security/print_google_default_creds_token.c +) + +target_include_directories(grpc_print_google_default_creds_token + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + +target_link_libraries(grpc_print_google_default_creds_token + grpc + gpr +) + + +add_executable(grpc_verify_jwt + test/core/security/verify_jwt.c +) + +target_include_directories(grpc_verify_jwt + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include + PRIVATE ${BORINGSSL_ROOT_DIR}/include + PRIVATE ${PROTOBUF_ROOT_DIR}/src + PRIVATE ${ZLIB_ROOT_DIR} + PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/third_party/zlib +) + +target_link_libraries(grpc_verify_jwt + grpc + gpr +) + + add_executable(grpc_cpp_plugin src/compiler/cpp_plugin.cc ) diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template index 00a37de3cb9..06085eb722b 100644 --- a/templates/CMakeLists.txt.template +++ b/templates/CMakeLists.txt.template @@ -45,6 +45,8 @@ deps = ["ssl"] if target_dict['name'] in ['grpc++', 'grpc++_unsecure', 'grpc++_codegen_lib']: deps.append("libprotobuf") + elif target_dict['name'] in ['grpc']: + deps.append("zlibstatic") for d in target_dict.get('deps', []): deps.append(d) return deps @@ -52,13 +54,20 @@ cmake_minimum_required(VERSION 2.8) - if (NOT BORINGSSL_ROOT_DIR) + set(PACKAGE_NAME "grpc") + set(PACKAGE_VERSION "${settings.core_version}") + set(PACKAGE_STRING "<%text>${PACKAGE_NAME} ${PACKAGE_VERSION}") + set(PACKAGE_TARNAME "<%text>${PACKAGE_NAME}-${PACKAGE_VERSION}") + set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/") + project(<%text>${PACKAGE_NAME} C CXX) + + if(NOT BORINGSSL_ROOT_DIR) set(BORINGSSL_ROOT_DIR <%text>${CMAKE_CURRENT_SOURCE_DIR}/third_party/boringssl) endif() - if (NOT PROTOBUF_ROOT_DIR) + if(NOT PROTOBUF_ROOT_DIR) set(PROTOBUF_ROOT_DIR <%text>${CMAKE_CURRENT_SOURCE_DIR}/third_party/protobuf) endif() - if (NOT ZLIB_ROOT_DIR) + if(NOT ZLIB_ROOT_DIR) set(ZLIB_ROOT_DIR <%text>${CMAKE_CURRENT_SOURCE_DIR}/third_party/zlib) endif() @@ -66,17 +75,17 @@ add_subdirectory(<%text>${PROTOBUF_ROOT_DIR}/cmake third_party/protobuf) add_subdirectory(<%text>${ZLIB_ROOT_DIR} third_party/zlib) - set(CMAKE_C_FLAGS "<%text>${CMAKE_C_FLAGS} -std=c11") + set(CMAKE_C_FLAGS "<%text>${CMAKE_C_FLAGS} -std=c11") set(CMAKE_CXX_FLAGS "<%text>${CMAKE_CXX_FLAGS} -std=c++11") % for lib in libs: - % if lib.build in ["all", "protoc"]: + % if lib.build in ["all", "protoc", "tool"]: ${cc_library(lib)} % endif % endfor % for tgt in targets: - % if tgt.build == 'protoc': + % if tgt.build in ["all", "protoc", "tool"]: ${cc_binary(tgt)} % endif % endfor From a2dd8385f95259b8a6886902dac87d5df7c7b953 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 22 Jun 2016 10:26:03 -0700 Subject: [PATCH 1245/1894] Use pipe fds instead of event fds for the test --- test/core/iomgr/ev_epoll_linux_test.c | 55 +++++++++++++++++---------- 1 file changed, 34 insertions(+), 21 deletions(-) diff --git a/test/core/iomgr/ev_epoll_linux_test.c b/test/core/iomgr/ev_epoll_linux_test.c index 034f17fd58b..35eb6791302 100644 --- a/test/core/iomgr/ev_epoll_linux_test.c +++ b/test/core/iomgr/ev_epoll_linux_test.c @@ -34,9 +34,8 @@ #include "src/core/lib/iomgr/ev_epoll_linux.h" #include "src/core/lib/iomgr/ev_posix.h" -#include +#include #include -#include #include #include @@ -55,28 +54,29 @@ typedef struct test_fd { grpc_fd *fd; } test_fd; -static void test_fd_init(test_fd *fds, int num_fds) { +/* num_fds should be an even number */ +static void test_fd_init(test_fd *tfds, int *fds, int num_fds) { int i; for (i = 0; i < num_fds; i++) { - fds[i].inner_fd = eventfd(0, EFD_NONBLOCK | EFD_CLOEXEC); - fds[i].fd = grpc_fd_create(fds[i].inner_fd, "test_fd"); + tfds[i].inner_fd = fds[i]; + tfds[i].fd = grpc_fd_create(fds[i], "test_fd"); } } -static void test_fd_cleanup(grpc_exec_ctx *exec_ctx, test_fd *fds, +static void test_fd_cleanup(grpc_exec_ctx *exec_ctx, test_fd *tfds, int num_fds) { int release_fd; int i; for (i = 0; i < num_fds; i++) { - grpc_fd_shutdown(exec_ctx, fds[i].fd); + grpc_fd_shutdown(exec_ctx, tfds[i].fd); grpc_exec_ctx_flush(exec_ctx); - grpc_fd_orphan(exec_ctx, fds[i].fd, NULL, &release_fd, "test_fd_cleanup"); + grpc_fd_orphan(exec_ctx, tfds[i].fd, NULL, &release_fd, "test_fd_cleanup"); grpc_exec_ctx_flush(exec_ctx); - GPR_ASSERT(release_fd == fds[i].inner_fd); - close(fds[i].inner_fd); + GPR_ASSERT(release_fd == tfds[i].inner_fd); + close(tfds[i].inner_fd); } } @@ -121,12 +121,25 @@ static void test_pollset_cleanup(grpc_exec_ctx *exec_ctx, * */ static void test_add_fd_to_pollset() { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - test_fd fds[NUM_FDS]; + test_fd tfds[NUM_FDS]; + int fds[NUM_FDS]; test_pollset pollsets[NUM_POLLSETS]; void *expected_pi = NULL; int i; + int r; + + /* Create some dummy file descriptors (using pipe fds for this test. Could be + anything). Also NUM_FDS should be even for this test. */ + for (i = 0; i < NUM_FDS; i = i + 2) { + r = pipe(fds + i); + if (r != 0) { + gpr_log(GPR_ERROR, "Error in creating pipe. %d (%s)", errno, + strerror(errno)); + return; + } + } - test_fd_init(fds, NUM_FDS); + test_fd_init(tfds, fds, NUM_FDS); test_pollset_init(pollsets, NUM_POLLSETS); /*Step 1. @@ -156,41 +169,41 @@ static void test_add_fd_to_pollset() { /* == Step 1 == */ for (i = 0; i <= 2; i++) { - grpc_pollset_add_fd(&exec_ctx, pollsets[0].pollset, fds[i].fd); + grpc_pollset_add_fd(&exec_ctx, pollsets[0].pollset, tfds[i].fd); grpc_exec_ctx_flush(&exec_ctx); } for (i = 3; i <= 4; i++) { - grpc_pollset_add_fd(&exec_ctx, pollsets[1].pollset, fds[i].fd); + grpc_pollset_add_fd(&exec_ctx, pollsets[1].pollset, tfds[i].fd); grpc_exec_ctx_flush(&exec_ctx); } for (i = 5; i <= 7; i++) { - grpc_pollset_add_fd(&exec_ctx, pollsets[2].pollset, fds[i].fd); + grpc_pollset_add_fd(&exec_ctx, pollsets[2].pollset, tfds[i].fd); grpc_exec_ctx_flush(&exec_ctx); } /* == Step 2 == */ for (i = 0; i <= 1; i++) { - grpc_pollset_add_fd(&exec_ctx, pollsets[3].pollset, fds[i].fd); + grpc_pollset_add_fd(&exec_ctx, pollsets[3].pollset, tfds[i].fd); grpc_exec_ctx_flush(&exec_ctx); } /* == Step 3 == */ - grpc_pollset_add_fd(&exec_ctx, pollsets[1].pollset, fds[0].fd); + grpc_pollset_add_fd(&exec_ctx, pollsets[1].pollset, tfds[0].fd); grpc_exec_ctx_flush(&exec_ctx); /* == Step 4 == */ - grpc_pollset_add_fd(&exec_ctx, pollsets[2].pollset, fds[3].fd); + grpc_pollset_add_fd(&exec_ctx, pollsets[2].pollset, tfds[3].fd); grpc_exec_ctx_flush(&exec_ctx); /* All polling islands are merged at this point */ /* Compare Fd:0's polling island with that of all other Fds */ - expected_pi = grpc_fd_get_polling_island(fds[0].fd); + expected_pi = grpc_fd_get_polling_island(tfds[0].fd); for (i = 1; i < NUM_FDS; i++) { GPR_ASSERT(grpc_are_polling_islands_equal( - expected_pi, grpc_fd_get_polling_island(fds[i].fd))); + expected_pi, grpc_fd_get_polling_island(tfds[i].fd))); } /* Compare Fd:0's polling island with that of all other pollsets */ @@ -199,7 +212,7 @@ static void test_add_fd_to_pollset() { expected_pi, grpc_pollset_get_polling_island(pollsets[i].pollset))); } - test_fd_cleanup(&exec_ctx, fds, NUM_FDS); + test_fd_cleanup(&exec_ctx, tfds, NUM_FDS); test_pollset_cleanup(&exec_ctx, pollsets, NUM_POLLSETS); grpc_exec_ctx_finish(&exec_ctx); } From 82393efe0c930f7756e9d0e427d2e9ae61e0a88e Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Wed, 22 Jun 2016 10:29:17 -0700 Subject: [PATCH 1246/1894] Fix run_test.py --- tools/run_tests/run_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 5c8f6f2a0e7..2a404df0d41 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -604,7 +604,7 @@ class ObjCLanguage(object): return [self.config.job_spec(['src/objective-c/tests/run_tests.sh'], None, environ=_FORCE_ENVIRON_FOR_WRAPPERS), self.config.job_spec(['src/objective-c/tests/build_example_test.sh'], - timeout_seconds=15*60, None, + None, timeout_seconds=15*60, environ=_FORCE_ENVIRON_FOR_WRAPPERS)] def pre_build_steps(self): From d9c6ac09625e548faf286b73f0b0d74fb1b3bb1d Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Wed, 22 Jun 2016 11:11:46 -0700 Subject: [PATCH 1247/1894] Memset ops before being used, destroy metadata_recv after beign used --- test/core/end2end/bad_server_response_test.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/test/core/end2end/bad_server_response_test.c b/test/core/end2end/bad_server_response_test.c index 4a2355b5f6d..ebf2caa0702 100644 --- a/test/core/end2end/bad_server_response_test.c +++ b/test/core/end2end/bad_server_response_test.c @@ -55,13 +55,13 @@ #define HTTP2_RESP(STATUS_CODE) \ "\x00\x00\x00\x04\x00\x00\x00\x00\x00" \ - "\x00\x00" \ - "7\x01\x04\x00\x00\x00\x01" \ + "\x00\x00>\x01\x04\x00\x00\x00\x01" \ "\x10\x0e" \ "content-length\x01" \ "0" \ "\x10\x0c" \ - "content-type\x09text/html" \ + "content-type\x10" \ + "application/grpc" \ "\x10\x07:status\x03" #STATUS_CODE #define UNPARSEABLE_RESP "Bad Request\n" @@ -119,7 +119,7 @@ static void handle_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error) { for (i = 0; i < state.temp_incoming_buffer.count; i++) { char *dump = gpr_dump_slice(state.temp_incoming_buffer.slices[i], GPR_DUMP_HEX | GPR_DUMP_ASCII); - gpr_log(GPR_DEBUG, "%s", dump); + gpr_log(GPR_DEBUG, "Server received: %s", dump); gpr_free(dump); } @@ -175,6 +175,7 @@ static void start_rpc(int target_port, grpc_status_code expected_status, grpc_metadata_array_init(&initial_metadata_recv); grpc_metadata_array_init(&trailing_metadata_recv); + memset(ops, 0, sizeof(ops)); op = ops; op->op = GRPC_OP_SEND_INITIAL_METADATA; op->data.send_initial_metadata.count = 0; @@ -209,6 +210,9 @@ static void start_rpc(int target_port, grpc_status_code expected_status, gpr_log(GPR_DEBUG, "Rpc status: %d, details: %s", status, details); GPR_ASSERT(status == expected_status); GPR_ASSERT(0 == strcmp(details, expected_detail)); + + grpc_metadata_array_destroy(&initial_metadata_recv); + grpc_metadata_array_destroy(&trailing_metadata_recv); gpr_free(details); cq_verifier_destroy(cqv); } From 0d896ef906f6a57f10832764611598d457d0e947 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 21 Jun 2016 18:17:27 -0700 Subject: [PATCH 1248/1894] fix reading of compressed byte_buffer in C# --- src/csharp/ext/grpc_csharp_ext.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 4782654250c..9b8d050ea51 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -249,10 +249,12 @@ grpcsharp_batch_context_recv_initial_metadata( GPR_EXPORT intptr_t GPR_CALLTYPE grpcsharp_batch_context_recv_message_length( const grpcsharp_batch_context *ctx) { + grpc_byte_buffer_reader reader; if (!ctx->recv_message) { return -1; } - return (intptr_t)grpc_byte_buffer_length(ctx->recv_message); + grpc_byte_buffer_reader_init(&reader, ctx->recv_message); + return (intptr_t)grpc_byte_buffer_length(reader.buffer_out); } /* From 4047d5d4b642a3eb33100feda4b82d04179263f6 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 21 Jun 2016 20:53:56 -0700 Subject: [PATCH 1249/1894] add test that C# can read compressed messages --- src/csharp/Grpc.Core.Tests/CompressionTest.cs | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/src/csharp/Grpc.Core.Tests/CompressionTest.cs b/src/csharp/Grpc.Core.Tests/CompressionTest.cs index 378c81851c0..f2f2931e480 100644 --- a/src/csharp/Grpc.Core.Tests/CompressionTest.cs +++ b/src/csharp/Grpc.Core.Tests/CompressionTest.cs @@ -34,6 +34,7 @@ using System; using System.Diagnostics; using System.Linq; +using System.Text; using System.Threading; using System.Threading.Tasks; using Grpc.Core; @@ -118,5 +119,30 @@ namespace Grpc.Core.Tests await call.ResponseStream.ToListAsync(); } + + [Test] + public void CanReadCompressedMessages() + { + var compressionMetadata = new Metadata + { + { new Metadata.Entry("grpc-internal-encoding-request", "gzip") } + }; + + helper.UnaryHandler = new UnaryServerMethod(async (req, context) => + { + await context.WriteResponseHeadersAsync(compressionMetadata); + return req; + }); + + var stringBuilder = new StringBuilder(); + for (int i = 0; i < 200000; i++) + { + stringBuilder.Append('a'); + } + var request = stringBuilder.ToString(); + var response = Calls.BlockingUnaryCall(helper.CreateUnaryCall(new CallOptions(compressionMetadata)), request); + + Assert.AreEqual(request, response); + } } } From 67ceba531971a2344a11be21ef5685b66e2609f1 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 21 Jun 2016 18:29:09 -0700 Subject: [PATCH 1250/1894] regenerate messages.proto --- .../Grpc.IntegrationTesting/Messages.cs | 414 +++++++++++++----- 1 file changed, 301 insertions(+), 113 deletions(-) diff --git a/src/csharp/Grpc.IntegrationTesting/Messages.cs b/src/csharp/Grpc.IntegrationTesting/Messages.cs index d42501aa5b8..1240db128b0 100644 --- a/src/csharp/Grpc.IntegrationTesting/Messages.cs +++ b/src/csharp/Grpc.IntegrationTesting/Messages.cs @@ -24,46 +24,48 @@ namespace Grpc.Testing { byte[] descriptorData = global::System.Convert.FromBase64String( string.Concat( "CiVzcmMvcHJvdG8vZ3JwYy90ZXN0aW5nL21lc3NhZ2VzLnByb3RvEgxncnBj", - "LnRlc3RpbmciQAoHUGF5bG9hZBInCgR0eXBlGAEgASgOMhkuZ3JwYy50ZXN0", - "aW5nLlBheWxvYWRUeXBlEgwKBGJvZHkYAiABKAwiKwoKRWNob1N0YXR1cxIM", - "CgRjb2RlGAEgASgFEg8KB21lc3NhZ2UYAiABKAkioQIKDVNpbXBsZVJlcXVl", - "c3QSMAoNcmVzcG9uc2VfdHlwZRgBIAEoDjIZLmdycGMudGVzdGluZy5QYXls", - "b2FkVHlwZRIVCg1yZXNwb25zZV9zaXplGAIgASgFEiYKB3BheWxvYWQYAyAB", - "KAsyFS5ncnBjLnRlc3RpbmcuUGF5bG9hZBIVCg1maWxsX3VzZXJuYW1lGAQg", - "ASgIEhgKEGZpbGxfb2F1dGhfc2NvcGUYBSABKAgSOwoUcmVzcG9uc2VfY29t", - "cHJlc3Npb24YBiABKA4yHS5ncnBjLnRlc3RpbmcuQ29tcHJlc3Npb25UeXBl", - "EjEKD3Jlc3BvbnNlX3N0YXR1cxgHIAEoCzIYLmdycGMudGVzdGluZy5FY2hv", - "U3RhdHVzIl8KDlNpbXBsZVJlc3BvbnNlEiYKB3BheWxvYWQYASABKAsyFS5n", - "cnBjLnRlc3RpbmcuUGF5bG9hZBIQCgh1c2VybmFtZRgCIAEoCRITCgtvYXV0", - "aF9zY29wZRgDIAEoCSJDChlTdHJlYW1pbmdJbnB1dENhbGxSZXF1ZXN0EiYK", - "B3BheWxvYWQYASABKAsyFS5ncnBjLnRlc3RpbmcuUGF5bG9hZCI9ChpTdHJl", - "YW1pbmdJbnB1dENhbGxSZXNwb25zZRIfChdhZ2dyZWdhdGVkX3BheWxvYWRf", - "c2l6ZRgBIAEoBSI3ChJSZXNwb25zZVBhcmFtZXRlcnMSDAoEc2l6ZRgBIAEo", - "BRITCgtpbnRlcnZhbF91cxgCIAEoBSKlAgoaU3RyZWFtaW5nT3V0cHV0Q2Fs", - "bFJlcXVlc3QSMAoNcmVzcG9uc2VfdHlwZRgBIAEoDjIZLmdycGMudGVzdGlu", - "Zy5QYXlsb2FkVHlwZRI9ChNyZXNwb25zZV9wYXJhbWV0ZXJzGAIgAygLMiAu", - "Z3JwYy50ZXN0aW5nLlJlc3BvbnNlUGFyYW1ldGVycxImCgdwYXlsb2FkGAMg", - "ASgLMhUuZ3JwYy50ZXN0aW5nLlBheWxvYWQSOwoUcmVzcG9uc2VfY29tcHJl", - "c3Npb24YBiABKA4yHS5ncnBjLnRlc3RpbmcuQ29tcHJlc3Npb25UeXBlEjEK", - "D3Jlc3BvbnNlX3N0YXR1cxgHIAEoCzIYLmdycGMudGVzdGluZy5FY2hvU3Rh", - "dHVzIkUKG1N0cmVhbWluZ091dHB1dENhbGxSZXNwb25zZRImCgdwYXlsb2Fk", - "GAEgASgLMhUuZ3JwYy50ZXN0aW5nLlBheWxvYWQiMwoPUmVjb25uZWN0UGFy", - "YW1zEiAKGG1heF9yZWNvbm5lY3RfYmFja29mZl9tcxgBIAEoBSIzCg1SZWNv", - "bm5lY3RJbmZvEg4KBnBhc3NlZBgBIAEoCBISCgpiYWNrb2ZmX21zGAIgAygF", - "Kj8KC1BheWxvYWRUeXBlEhAKDENPTVBSRVNTQUJMRRAAEhIKDlVOQ09NUFJF", - "U1NBQkxFEAESCgoGUkFORE9NEAIqMgoPQ29tcHJlc3Npb25UeXBlEggKBE5P", - "TkUQABIICgRHWklQEAESCwoHREVGTEFURRACYgZwcm90bzM=")); + "LnRlc3RpbmciGgoJQm9vbFZhbHVlEg0KBXZhbHVlGAEgASgIIkAKB1BheWxv", + "YWQSJwoEdHlwZRgBIAEoDjIZLmdycGMudGVzdGluZy5QYXlsb2FkVHlwZRIM", + "CgRib2R5GAIgASgMIisKCkVjaG9TdGF0dXMSDAoEY29kZRgBIAEoBRIPCgdt", + "ZXNzYWdlGAIgASgJIs4CCg1TaW1wbGVSZXF1ZXN0EjAKDXJlc3BvbnNlX3R5", + "cGUYASABKA4yGS5ncnBjLnRlc3RpbmcuUGF5bG9hZFR5cGUSFQoNcmVzcG9u", + "c2Vfc2l6ZRgCIAEoBRImCgdwYXlsb2FkGAMgASgLMhUuZ3JwYy50ZXN0aW5n", + "LlBheWxvYWQSFQoNZmlsbF91c2VybmFtZRgEIAEoCBIYChBmaWxsX29hdXRo", + "X3Njb3BlGAUgASgIEjQKE3Jlc3BvbnNlX2NvbXByZXNzZWQYBiABKAsyFy5n", + "cnBjLnRlc3RpbmcuQm9vbFZhbHVlEjEKD3Jlc3BvbnNlX3N0YXR1cxgHIAEo", + "CzIYLmdycGMudGVzdGluZy5FY2hvU3RhdHVzEjIKEWV4cGVjdF9jb21wcmVz", + "c2VkGAggASgLMhcuZ3JwYy50ZXN0aW5nLkJvb2xWYWx1ZSJfCg5TaW1wbGVS", + "ZXNwb25zZRImCgdwYXlsb2FkGAEgASgLMhUuZ3JwYy50ZXN0aW5nLlBheWxv", + "YWQSEAoIdXNlcm5hbWUYAiABKAkSEwoLb2F1dGhfc2NvcGUYAyABKAkidwoZ", + "U3RyZWFtaW5nSW5wdXRDYWxsUmVxdWVzdBImCgdwYXlsb2FkGAEgASgLMhUu", + "Z3JwYy50ZXN0aW5nLlBheWxvYWQSMgoRZXhwZWN0X2NvbXByZXNzZWQYAiAB", + "KAsyFy5ncnBjLnRlc3RpbmcuQm9vbFZhbHVlIj0KGlN0cmVhbWluZ0lucHV0", + "Q2FsbFJlc3BvbnNlEh8KF2FnZ3JlZ2F0ZWRfcGF5bG9hZF9zaXplGAEgASgF", + "ImQKElJlc3BvbnNlUGFyYW1ldGVycxIMCgRzaXplGAEgASgFEhMKC2ludGVy", + "dmFsX3VzGAIgASgFEisKCmNvbXByZXNzZWQYAyABKAsyFy5ncnBjLnRlc3Rp", + "bmcuQm9vbFZhbHVlIugBChpTdHJlYW1pbmdPdXRwdXRDYWxsUmVxdWVzdBIw", + "Cg1yZXNwb25zZV90eXBlGAEgASgOMhkuZ3JwYy50ZXN0aW5nLlBheWxvYWRU", + "eXBlEj0KE3Jlc3BvbnNlX3BhcmFtZXRlcnMYAiADKAsyIC5ncnBjLnRlc3Rp", + "bmcuUmVzcG9uc2VQYXJhbWV0ZXJzEiYKB3BheWxvYWQYAyABKAsyFS5ncnBj", + "LnRlc3RpbmcuUGF5bG9hZBIxCg9yZXNwb25zZV9zdGF0dXMYByABKAsyGC5n", + "cnBjLnRlc3RpbmcuRWNob1N0YXR1cyJFChtTdHJlYW1pbmdPdXRwdXRDYWxs", + "UmVzcG9uc2USJgoHcGF5bG9hZBgBIAEoCzIVLmdycGMudGVzdGluZy5QYXls", + "b2FkIjMKD1JlY29ubmVjdFBhcmFtcxIgChhtYXhfcmVjb25uZWN0X2JhY2tv", + "ZmZfbXMYASABKAUiMwoNUmVjb25uZWN0SW5mbxIOCgZwYXNzZWQYASABKAgS", + "EgoKYmFja29mZl9tcxgCIAMoBSofCgtQYXlsb2FkVHlwZRIQCgxDT01QUkVT", + "U0FCTEUQAGIGcHJvdG8z")); descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData, new pbr::FileDescriptor[] { }, - new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Grpc.Testing.PayloadType), typeof(global::Grpc.Testing.CompressionType), }, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(new[] {typeof(global::Grpc.Testing.PayloadType), }, new pbr::GeneratedClrTypeInfo[] { + new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.BoolValue), global::Grpc.Testing.BoolValue.Parser, new[]{ "Value" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.Payload), global::Grpc.Testing.Payload.Parser, new[]{ "Type", "Body" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.EchoStatus), global::Grpc.Testing.EchoStatus.Parser, new[]{ "Code", "Message" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.SimpleRequest), global::Grpc.Testing.SimpleRequest.Parser, new[]{ "ResponseType", "ResponseSize", "Payload", "FillUsername", "FillOauthScope", "ResponseCompression", "ResponseStatus" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.SimpleRequest), global::Grpc.Testing.SimpleRequest.Parser, new[]{ "ResponseType", "ResponseSize", "Payload", "FillUsername", "FillOauthScope", "ResponseCompressed", "ResponseStatus", "ExpectCompressed" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.SimpleResponse), global::Grpc.Testing.SimpleResponse.Parser, new[]{ "Payload", "Username", "OauthScope" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.StreamingInputCallRequest), global::Grpc.Testing.StreamingInputCallRequest.Parser, new[]{ "Payload" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.StreamingInputCallRequest), global::Grpc.Testing.StreamingInputCallRequest.Parser, new[]{ "Payload", "ExpectCompressed" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.StreamingInputCallResponse), global::Grpc.Testing.StreamingInputCallResponse.Parser, new[]{ "AggregatedPayloadSize" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ResponseParameters), global::Grpc.Testing.ResponseParameters.Parser, new[]{ "Size", "IntervalUs" }, null, null, null), - new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.StreamingOutputCallRequest), global::Grpc.Testing.StreamingOutputCallRequest.Parser, new[]{ "ResponseType", "ResponseParameters", "Payload", "ResponseCompression", "ResponseStatus" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ResponseParameters), global::Grpc.Testing.ResponseParameters.Parser, new[]{ "Size", "IntervalUs", "Compressed" }, null, null, null), + new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.StreamingOutputCallRequest), global::Grpc.Testing.StreamingOutputCallRequest.Parser, new[]{ "ResponseType", "ResponseParameters", "Payload", "ResponseStatus" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.StreamingOutputCallResponse), global::Grpc.Testing.StreamingOutputCallResponse.Parser, new[]{ "Payload" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ReconnectParams), global::Grpc.Testing.ReconnectParams.Parser, new[]{ "MaxReconnectBackoffMs" }, null, null, null), new pbr::GeneratedClrTypeInfo(typeof(global::Grpc.Testing.ReconnectInfo), global::Grpc.Testing.ReconnectInfo.Parser, new[]{ "Passed", "BackoffMs" }, null, null, null) @@ -74,6 +76,7 @@ namespace Grpc.Testing { } #region Enums /// + /// DEPRECATED, don't use. To be removed shortly. /// The type of payload that should be returned. /// public enum PayloadType { @@ -81,31 +84,122 @@ namespace Grpc.Testing { /// Compressable text format. ///
[pbr::OriginalName("COMPRESSABLE")] Compressable = 0, - /// - /// Uncompressable binary format. - /// - [pbr::OriginalName("UNCOMPRESSABLE")] Uncompressable = 1, - /// - /// Randomly chosen from all other formats defined in this enum. - /// - [pbr::OriginalName("RANDOM")] Random = 2, } + #endregion + + #region Messages /// - /// Compression algorithms + /// TODO(dgq): Go back to using well-known types once + /// https://github.com/grpc/grpc/issues/6980 has been fixed. + /// import "google/protobuf/wrappers.proto"; /// - public enum CompressionType { + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + public sealed partial class BoolValue : pb::IMessage { + private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new BoolValue()); + public static pb::MessageParser Parser { get { return _parser; } } + + public static pbr::MessageDescriptor Descriptor { + get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[0]; } + } + + pbr::MessageDescriptor pb::IMessage.Descriptor { + get { return Descriptor; } + } + + public BoolValue() { + OnConstruction(); + } + + partial void OnConstruction(); + + public BoolValue(BoolValue other) : this() { + value_ = other.value_; + } + + public BoolValue Clone() { + return new BoolValue(this); + } + + /// Field number for the "value" field. + public const int ValueFieldNumber = 1; + private bool value_; /// - /// No compression + /// The bool value. /// - [pbr::OriginalName("NONE")] None = 0, - [pbr::OriginalName("GZIP")] Gzip = 1, - [pbr::OriginalName("DEFLATE")] Deflate = 2, - } + public bool Value { + get { return value_; } + set { + value_ = value; + } + } - #endregion + public override bool Equals(object other) { + return Equals(other as BoolValue); + } + + public bool Equals(BoolValue other) { + if (ReferenceEquals(other, null)) { + return false; + } + if (ReferenceEquals(other, this)) { + return true; + } + if (Value != other.Value) return false; + return true; + } + + public override int GetHashCode() { + int hash = 1; + if (Value != false) hash ^= Value.GetHashCode(); + return hash; + } + + public override string ToString() { + return pb::JsonFormatter.ToDiagnosticString(this); + } + + public void WriteTo(pb::CodedOutputStream output) { + if (Value != false) { + output.WriteRawTag(8); + output.WriteBool(Value); + } + } + + public int CalculateSize() { + int size = 0; + if (Value != false) { + size += 1 + 1; + } + return size; + } + + public void MergeFrom(BoolValue other) { + if (other == null) { + return; + } + if (other.Value != false) { + Value = other.Value; + } + } + + public void MergeFrom(pb::CodedInputStream input) { + uint tag; + while ((tag = input.ReadTag()) != 0) { + switch(tag) { + default: + input.SkipLastField(); + break; + case 8: { + Value = input.ReadBool(); + break; + } + } + } + } + + } - #region Messages /// /// A block of data, to simply increase gRPC message size. /// @@ -115,7 +209,7 @@ namespace Grpc.Testing { public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[0]; } + get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[1]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { @@ -141,6 +235,7 @@ namespace Grpc.Testing { public const int TypeFieldNumber = 1; private global::Grpc.Testing.PayloadType type_ = 0; /// + /// DEPRECATED, don't use. To be removed shortly. /// The type of data in body. /// public global::Grpc.Testing.PayloadType Type { @@ -255,7 +350,7 @@ namespace Grpc.Testing { public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[1]; } + get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[2]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { @@ -388,7 +483,7 @@ namespace Grpc.Testing { public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[2]; } + get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[3]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { @@ -407,8 +502,9 @@ namespace Grpc.Testing { Payload = other.payload_ != null ? other.Payload.Clone() : null; fillUsername_ = other.fillUsername_; fillOauthScope_ = other.fillOauthScope_; - responseCompression_ = other.responseCompression_; + ResponseCompressed = other.responseCompressed_ != null ? other.ResponseCompressed.Clone() : null; ResponseStatus = other.responseStatus_ != null ? other.ResponseStatus.Clone() : null; + ExpectCompressed = other.expectCompressed_ != null ? other.ExpectCompressed.Clone() : null; } public SimpleRequest Clone() { @@ -419,6 +515,7 @@ namespace Grpc.Testing { public const int ResponseTypeFieldNumber = 1; private global::Grpc.Testing.PayloadType responseType_ = 0; /// + /// DEPRECATED, don't use. To be removed shortly. /// Desired payload type in the response from the server. /// If response_type is RANDOM, server randomly chooses one from other formats. /// @@ -434,7 +531,6 @@ namespace Grpc.Testing { private int responseSize_; /// /// Desired payload size in the response from the server. - /// If response_type is COMPRESSABLE, this denotes the size before compression. /// public int ResponseSize { get { return responseSize_; } @@ -482,16 +578,19 @@ namespace Grpc.Testing { } } - /// Field number for the "response_compression" field. - public const int ResponseCompressionFieldNumber = 6; - private global::Grpc.Testing.CompressionType responseCompression_ = 0; + /// Field number for the "response_compressed" field. + public const int ResponseCompressedFieldNumber = 6; + private global::Grpc.Testing.BoolValue responseCompressed_; /// - /// Compression algorithm to be used by the server for the response (stream) + /// Whether to request the server to compress the response. This field is + /// "nullable" in order to interoperate seamlessly with clients not able to + /// implement the full compression tests by introspecting the call to verify + /// the response's compression status. /// - public global::Grpc.Testing.CompressionType ResponseCompression { - get { return responseCompression_; } + public global::Grpc.Testing.BoolValue ResponseCompressed { + get { return responseCompressed_; } set { - responseCompression_ = value; + responseCompressed_ = value; } } @@ -508,6 +607,19 @@ namespace Grpc.Testing { } } + /// Field number for the "expect_compressed" field. + public const int ExpectCompressedFieldNumber = 8; + private global::Grpc.Testing.BoolValue expectCompressed_; + /// + /// Whether the server should expect this request to be compressed. + /// + public global::Grpc.Testing.BoolValue ExpectCompressed { + get { return expectCompressed_; } + set { + expectCompressed_ = value; + } + } + public override bool Equals(object other) { return Equals(other as SimpleRequest); } @@ -524,8 +636,9 @@ namespace Grpc.Testing { if (!object.Equals(Payload, other.Payload)) return false; if (FillUsername != other.FillUsername) return false; if (FillOauthScope != other.FillOauthScope) return false; - if (ResponseCompression != other.ResponseCompression) return false; + if (!object.Equals(ResponseCompressed, other.ResponseCompressed)) return false; if (!object.Equals(ResponseStatus, other.ResponseStatus)) return false; + if (!object.Equals(ExpectCompressed, other.ExpectCompressed)) return false; return true; } @@ -536,8 +649,9 @@ namespace Grpc.Testing { if (payload_ != null) hash ^= Payload.GetHashCode(); if (FillUsername != false) hash ^= FillUsername.GetHashCode(); if (FillOauthScope != false) hash ^= FillOauthScope.GetHashCode(); - if (ResponseCompression != 0) hash ^= ResponseCompression.GetHashCode(); + if (responseCompressed_ != null) hash ^= ResponseCompressed.GetHashCode(); if (responseStatus_ != null) hash ^= ResponseStatus.GetHashCode(); + if (expectCompressed_ != null) hash ^= ExpectCompressed.GetHashCode(); return hash; } @@ -566,14 +680,18 @@ namespace Grpc.Testing { output.WriteRawTag(40); output.WriteBool(FillOauthScope); } - if (ResponseCompression != 0) { - output.WriteRawTag(48); - output.WriteEnum((int) ResponseCompression); + if (responseCompressed_ != null) { + output.WriteRawTag(50); + output.WriteMessage(ResponseCompressed); } if (responseStatus_ != null) { output.WriteRawTag(58); output.WriteMessage(ResponseStatus); } + if (expectCompressed_ != null) { + output.WriteRawTag(66); + output.WriteMessage(ExpectCompressed); + } } public int CalculateSize() { @@ -593,12 +711,15 @@ namespace Grpc.Testing { if (FillOauthScope != false) { size += 1 + 1; } - if (ResponseCompression != 0) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ResponseCompression); + if (responseCompressed_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ResponseCompressed); } if (responseStatus_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(ResponseStatus); } + if (expectCompressed_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ExpectCompressed); + } return size; } @@ -624,8 +745,11 @@ namespace Grpc.Testing { if (other.FillOauthScope != false) { FillOauthScope = other.FillOauthScope; } - if (other.ResponseCompression != 0) { - ResponseCompression = other.ResponseCompression; + if (other.responseCompressed_ != null) { + if (responseCompressed_ == null) { + responseCompressed_ = new global::Grpc.Testing.BoolValue(); + } + ResponseCompressed.MergeFrom(other.ResponseCompressed); } if (other.responseStatus_ != null) { if (responseStatus_ == null) { @@ -633,6 +757,12 @@ namespace Grpc.Testing { } ResponseStatus.MergeFrom(other.ResponseStatus); } + if (other.expectCompressed_ != null) { + if (expectCompressed_ == null) { + expectCompressed_ = new global::Grpc.Testing.BoolValue(); + } + ExpectCompressed.MergeFrom(other.ExpectCompressed); + } } public void MergeFrom(pb::CodedInputStream input) { @@ -665,8 +795,11 @@ namespace Grpc.Testing { FillOauthScope = input.ReadBool(); break; } - case 48: { - responseCompression_ = (global::Grpc.Testing.CompressionType) input.ReadEnum(); + case 50: { + if (responseCompressed_ == null) { + responseCompressed_ = new global::Grpc.Testing.BoolValue(); + } + input.ReadMessage(responseCompressed_); break; } case 58: { @@ -676,6 +809,13 @@ namespace Grpc.Testing { input.ReadMessage(responseStatus_); break; } + case 66: { + if (expectCompressed_ == null) { + expectCompressed_ = new global::Grpc.Testing.BoolValue(); + } + input.ReadMessage(expectCompressed_); + break; + } } } } @@ -691,7 +831,7 @@ namespace Grpc.Testing { public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[3]; } + get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[4]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { @@ -867,7 +1007,7 @@ namespace Grpc.Testing { public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[4]; } + get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[5]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { @@ -882,6 +1022,7 @@ namespace Grpc.Testing { public StreamingInputCallRequest(StreamingInputCallRequest other) : this() { Payload = other.payload_ != null ? other.Payload.Clone() : null; + ExpectCompressed = other.expectCompressed_ != null ? other.ExpectCompressed.Clone() : null; } public StreamingInputCallRequest Clone() { @@ -901,6 +1042,22 @@ namespace Grpc.Testing { } } + /// Field number for the "expect_compressed" field. + public const int ExpectCompressedFieldNumber = 2; + private global::Grpc.Testing.BoolValue expectCompressed_; + /// + /// Whether the server should expect this request to be compressed. This field + /// is "nullable" in order to interoperate seamlessly with servers not able to + /// implement the full compression tests by introspecting the call to verify + /// the request's compression status. + /// + public global::Grpc.Testing.BoolValue ExpectCompressed { + get { return expectCompressed_; } + set { + expectCompressed_ = value; + } + } + public override bool Equals(object other) { return Equals(other as StreamingInputCallRequest); } @@ -913,12 +1070,14 @@ namespace Grpc.Testing { return true; } if (!object.Equals(Payload, other.Payload)) return false; + if (!object.Equals(ExpectCompressed, other.ExpectCompressed)) return false; return true; } public override int GetHashCode() { int hash = 1; if (payload_ != null) hash ^= Payload.GetHashCode(); + if (expectCompressed_ != null) hash ^= ExpectCompressed.GetHashCode(); return hash; } @@ -931,6 +1090,10 @@ namespace Grpc.Testing { output.WriteRawTag(10); output.WriteMessage(Payload); } + if (expectCompressed_ != null) { + output.WriteRawTag(18); + output.WriteMessage(ExpectCompressed); + } } public int CalculateSize() { @@ -938,6 +1101,9 @@ namespace Grpc.Testing { if (payload_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(Payload); } + if (expectCompressed_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(ExpectCompressed); + } return size; } @@ -951,6 +1117,12 @@ namespace Grpc.Testing { } Payload.MergeFrom(other.Payload); } + if (other.expectCompressed_ != null) { + if (expectCompressed_ == null) { + expectCompressed_ = new global::Grpc.Testing.BoolValue(); + } + ExpectCompressed.MergeFrom(other.ExpectCompressed); + } } public void MergeFrom(pb::CodedInputStream input) { @@ -967,6 +1139,13 @@ namespace Grpc.Testing { input.ReadMessage(payload_); break; } + case 18: { + if (expectCompressed_ == null) { + expectCompressed_ = new global::Grpc.Testing.BoolValue(); + } + input.ReadMessage(expectCompressed_); + break; + } } } } @@ -982,7 +1161,7 @@ namespace Grpc.Testing { public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[5]; } + get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[6]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { @@ -1091,7 +1270,7 @@ namespace Grpc.Testing { public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[6]; } + get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[7]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { @@ -1107,6 +1286,7 @@ namespace Grpc.Testing { public ResponseParameters(ResponseParameters other) : this() { size_ = other.size_; intervalUs_ = other.intervalUs_; + Compressed = other.compressed_ != null ? other.Compressed.Clone() : null; } public ResponseParameters Clone() { @@ -1118,7 +1298,6 @@ namespace Grpc.Testing { private int size_; /// /// Desired payload sizes in responses from the server. - /// If response_type is COMPRESSABLE, this denotes the size before compression. /// public int Size { get { return size_; } @@ -1141,6 +1320,22 @@ namespace Grpc.Testing { } } + /// Field number for the "compressed" field. + public const int CompressedFieldNumber = 3; + private global::Grpc.Testing.BoolValue compressed_; + /// + /// Whether to request the server to compress the response. This field is + /// "nullable" in order to interoperate seamlessly with clients not able to + /// implement the full compression tests by introspecting the call to verify + /// the response's compression status. + /// + public global::Grpc.Testing.BoolValue Compressed { + get { return compressed_; } + set { + compressed_ = value; + } + } + public override bool Equals(object other) { return Equals(other as ResponseParameters); } @@ -1154,6 +1349,7 @@ namespace Grpc.Testing { } if (Size != other.Size) return false; if (IntervalUs != other.IntervalUs) return false; + if (!object.Equals(Compressed, other.Compressed)) return false; return true; } @@ -1161,6 +1357,7 @@ namespace Grpc.Testing { int hash = 1; if (Size != 0) hash ^= Size.GetHashCode(); if (IntervalUs != 0) hash ^= IntervalUs.GetHashCode(); + if (compressed_ != null) hash ^= Compressed.GetHashCode(); return hash; } @@ -1177,6 +1374,10 @@ namespace Grpc.Testing { output.WriteRawTag(16); output.WriteInt32(IntervalUs); } + if (compressed_ != null) { + output.WriteRawTag(26); + output.WriteMessage(Compressed); + } } public int CalculateSize() { @@ -1187,6 +1388,9 @@ namespace Grpc.Testing { if (IntervalUs != 0) { size += 1 + pb::CodedOutputStream.ComputeInt32Size(IntervalUs); } + if (compressed_ != null) { + size += 1 + pb::CodedOutputStream.ComputeMessageSize(Compressed); + } return size; } @@ -1200,6 +1404,12 @@ namespace Grpc.Testing { if (other.IntervalUs != 0) { IntervalUs = other.IntervalUs; } + if (other.compressed_ != null) { + if (compressed_ == null) { + compressed_ = new global::Grpc.Testing.BoolValue(); + } + Compressed.MergeFrom(other.Compressed); + } } public void MergeFrom(pb::CodedInputStream input) { @@ -1217,6 +1427,13 @@ namespace Grpc.Testing { IntervalUs = input.ReadInt32(); break; } + case 26: { + if (compressed_ == null) { + compressed_ = new global::Grpc.Testing.BoolValue(); + } + input.ReadMessage(compressed_); + break; + } } } } @@ -1232,7 +1449,7 @@ namespace Grpc.Testing { public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[7]; } + get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[8]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { @@ -1249,7 +1466,6 @@ namespace Grpc.Testing { responseType_ = other.responseType_; responseParameters_ = other.responseParameters_.Clone(); Payload = other.payload_ != null ? other.Payload.Clone() : null; - responseCompression_ = other.responseCompression_; ResponseStatus = other.responseStatus_ != null ? other.ResponseStatus.Clone() : null; } @@ -1261,6 +1477,7 @@ namespace Grpc.Testing { public const int ResponseTypeFieldNumber = 1; private global::Grpc.Testing.PayloadType responseType_ = 0; /// + /// DEPRECATED, don't use. To be removed shortly. /// Desired payload type in the response from the server. /// If response_type is RANDOM, the payload from each response in the stream /// might be of different types. This is to simulate a mixed type of payload @@ -1298,19 +1515,6 @@ namespace Grpc.Testing { } } - /// Field number for the "response_compression" field. - public const int ResponseCompressionFieldNumber = 6; - private global::Grpc.Testing.CompressionType responseCompression_ = 0; - /// - /// Compression algorithm to be used by the server for the response (stream) - /// - public global::Grpc.Testing.CompressionType ResponseCompression { - get { return responseCompression_; } - set { - responseCompression_ = value; - } - } - /// Field number for the "response_status" field. public const int ResponseStatusFieldNumber = 7; private global::Grpc.Testing.EchoStatus responseStatus_; @@ -1338,7 +1542,6 @@ namespace Grpc.Testing { if (ResponseType != other.ResponseType) return false; if(!responseParameters_.Equals(other.responseParameters_)) return false; if (!object.Equals(Payload, other.Payload)) return false; - if (ResponseCompression != other.ResponseCompression) return false; if (!object.Equals(ResponseStatus, other.ResponseStatus)) return false; return true; } @@ -1348,7 +1551,6 @@ namespace Grpc.Testing { if (ResponseType != 0) hash ^= ResponseType.GetHashCode(); hash ^= responseParameters_.GetHashCode(); if (payload_ != null) hash ^= Payload.GetHashCode(); - if (ResponseCompression != 0) hash ^= ResponseCompression.GetHashCode(); if (responseStatus_ != null) hash ^= ResponseStatus.GetHashCode(); return hash; } @@ -1367,10 +1569,6 @@ namespace Grpc.Testing { output.WriteRawTag(26); output.WriteMessage(Payload); } - if (ResponseCompression != 0) { - output.WriteRawTag(48); - output.WriteEnum((int) ResponseCompression); - } if (responseStatus_ != null) { output.WriteRawTag(58); output.WriteMessage(ResponseStatus); @@ -1386,9 +1584,6 @@ namespace Grpc.Testing { if (payload_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(Payload); } - if (ResponseCompression != 0) { - size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) ResponseCompression); - } if (responseStatus_ != null) { size += 1 + pb::CodedOutputStream.ComputeMessageSize(ResponseStatus); } @@ -1409,9 +1604,6 @@ namespace Grpc.Testing { } Payload.MergeFrom(other.Payload); } - if (other.ResponseCompression != 0) { - ResponseCompression = other.ResponseCompression; - } if (other.responseStatus_ != null) { if (responseStatus_ == null) { responseStatus_ = new global::Grpc.Testing.EchoStatus(); @@ -1442,10 +1634,6 @@ namespace Grpc.Testing { input.ReadMessage(payload_); break; } - case 48: { - responseCompression_ = (global::Grpc.Testing.CompressionType) input.ReadEnum(); - break; - } case 58: { if (responseStatus_ == null) { responseStatus_ = new global::Grpc.Testing.EchoStatus(); @@ -1468,7 +1656,7 @@ namespace Grpc.Testing { public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[8]; } + get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[9]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { @@ -1584,7 +1772,7 @@ namespace Grpc.Testing { public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[9]; } + get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[10]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { @@ -1692,7 +1880,7 @@ namespace Grpc.Testing { public static pb::MessageParser Parser { get { return _parser; } } public static pbr::MessageDescriptor Descriptor { - get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[10]; } + get { return global::Grpc.Testing.MessagesReflection.Descriptor.MessageTypes[11]; } } pbr::MessageDescriptor pb::IMessage.Descriptor { From f8135f6b05238237ec5ed635ecf1f5a4ba9b3301 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 21 Jun 2016 18:41:09 -0700 Subject: [PATCH 1251/1894] remove occurences of compressable payload type --- .../Grpc.IntegrationTesting/InteropClient.cs | 23 ------------------- 1 file changed, 23 deletions(-) diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs index d273867a6a7..834c276c64d 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs @@ -240,13 +240,11 @@ namespace Grpc.IntegrationTesting Console.WriteLine("running large_unary"); var request = new SimpleRequest { - ResponseType = PayloadType.Compressable, ResponseSize = 314159, Payload = CreateZerosPayload(271828) }; var response = client.UnaryCall(request); - Assert.AreEqual(PayloadType.Compressable, response.Payload.Type); Assert.AreEqual(314159, response.Payload.Body.Length); Console.WriteLine("Passed!"); } @@ -275,17 +273,12 @@ namespace Grpc.IntegrationTesting var request = new StreamingOutputCallRequest { - ResponseType = PayloadType.Compressable, ResponseParameters = { bodySizes.Select((size) => new ResponseParameters { Size = size }) } }; using (var call = client.StreamingOutputCall(request)) { var responseList = await call.ResponseStream.ToListAsync(); - foreach (var res in responseList) - { - Assert.AreEqual(PayloadType.Compressable, res.Payload.Type); - } CollectionAssert.AreEqual(bodySizes, responseList.Select((item) => item.Payload.Body.Length)); } Console.WriteLine("Passed!"); @@ -299,46 +292,38 @@ namespace Grpc.IntegrationTesting { await call.RequestStream.WriteAsync(new StreamingOutputCallRequest { - ResponseType = PayloadType.Compressable, ResponseParameters = { new ResponseParameters { Size = 31415 } }, Payload = CreateZerosPayload(27182) }); Assert.IsTrue(await call.ResponseStream.MoveNext()); - Assert.AreEqual(PayloadType.Compressable, call.ResponseStream.Current.Payload.Type); Assert.AreEqual(31415, call.ResponseStream.Current.Payload.Body.Length); await call.RequestStream.WriteAsync(new StreamingOutputCallRequest { - ResponseType = PayloadType.Compressable, ResponseParameters = { new ResponseParameters { Size = 9 } }, Payload = CreateZerosPayload(8) }); Assert.IsTrue(await call.ResponseStream.MoveNext()); - Assert.AreEqual(PayloadType.Compressable, call.ResponseStream.Current.Payload.Type); Assert.AreEqual(9, call.ResponseStream.Current.Payload.Body.Length); await call.RequestStream.WriteAsync(new StreamingOutputCallRequest { - ResponseType = PayloadType.Compressable, ResponseParameters = { new ResponseParameters { Size = 2653 } }, Payload = CreateZerosPayload(1828) }); Assert.IsTrue(await call.ResponseStream.MoveNext()); - Assert.AreEqual(PayloadType.Compressable, call.ResponseStream.Current.Payload.Type); Assert.AreEqual(2653, call.ResponseStream.Current.Payload.Body.Length); await call.RequestStream.WriteAsync(new StreamingOutputCallRequest { - ResponseType = PayloadType.Compressable, ResponseParameters = { new ResponseParameters { Size = 58979 } }, Payload = CreateZerosPayload(45904) }); Assert.IsTrue(await call.ResponseStream.MoveNext()); - Assert.AreEqual(PayloadType.Compressable, call.ResponseStream.Current.Payload.Type); Assert.AreEqual(58979, call.ResponseStream.Current.Payload.Body.Length); await call.RequestStream.CompleteAsync(); @@ -367,7 +352,6 @@ namespace Grpc.IntegrationTesting var request = new SimpleRequest { - ResponseType = PayloadType.Compressable, ResponseSize = 314159, Payload = CreateZerosPayload(271828), FillUsername = true, @@ -377,7 +361,6 @@ namespace Grpc.IntegrationTesting // not setting credentials here because they were set on channel already var response = client.UnaryCall(request); - Assert.AreEqual(PayloadType.Compressable, response.Payload.Type); Assert.AreEqual(314159, response.Payload.Body.Length); Assert.False(string.IsNullOrEmpty(response.OauthScope)); Assert.True(oauthScope.Contains(response.OauthScope)); @@ -391,7 +374,6 @@ namespace Grpc.IntegrationTesting var request = new SimpleRequest { - ResponseType = PayloadType.Compressable, ResponseSize = 314159, Payload = CreateZerosPayload(271828), FillUsername = true, @@ -400,7 +382,6 @@ namespace Grpc.IntegrationTesting // not setting credentials here because they were set on channel already var response = client.UnaryCall(request); - Assert.AreEqual(PayloadType.Compressable, response.Payload.Type); Assert.AreEqual(314159, response.Payload.Body.Length); Assert.AreEqual(GetEmailFromServiceAccountFile(), response.Username); Console.WriteLine("Passed!"); @@ -480,13 +461,11 @@ namespace Grpc.IntegrationTesting { await call.RequestStream.WriteAsync(new StreamingOutputCallRequest { - ResponseType = PayloadType.Compressable, ResponseParameters = { new ResponseParameters { Size = 31415 } }, Payload = CreateZerosPayload(27182) }); Assert.IsTrue(await call.ResponseStream.MoveNext()); - Assert.AreEqual(PayloadType.Compressable, call.ResponseStream.Current.Payload.Type); Assert.AreEqual(31415, call.ResponseStream.Current.Payload.Body.Length); cts.Cancel(); @@ -546,7 +525,6 @@ namespace Grpc.IntegrationTesting // step 1: test unary call var request = new SimpleRequest { - ResponseType = PayloadType.Compressable, ResponseSize = 314159, Payload = CreateZerosPayload(271828) }; @@ -565,7 +543,6 @@ namespace Grpc.IntegrationTesting // step 2: test full duplex call var request = new StreamingOutputCallRequest { - ResponseType = PayloadType.Compressable, ResponseParameters = { new ResponseParameters { Size = 31415 } }, Payload = CreateZerosPayload(27182) }; From a7daf1edc2b336908918589c4de632197ebb92dc Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 21 Jun 2016 19:11:49 -0700 Subject: [PATCH 1252/1894] implement C# client compression interop tests --- .../Grpc.IntegrationTesting/InteropClient.cs | 108 ++++++++++++++++++ 1 file changed, 108 insertions(+) diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs index 834c276c64d..17ef587d168 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs @@ -222,6 +222,12 @@ namespace Grpc.IntegrationTesting case "unimplemented_method": RunUnimplementedMethod(new UnimplementedService.UnimplementedServiceClient(channel)); break; + case "client_compressed_unary": + RunClientCompressedUnary(client); + break; + case "client_compressed_streaming": + await RunClientCompressedStreamingAsync(client); + break; default: throw new ArgumentException("Unknown test case " + options.TestCase); } @@ -615,11 +621,113 @@ namespace Grpc.IntegrationTesting Console.WriteLine("Passed!"); } + public static void RunClientCompressedUnary(TestService.TestServiceClient client) + { + Console.WriteLine("running client_compressed_unary"); + var probeRequest = new SimpleRequest + { + ExpectCompressed = new BoolValue + { + Value = true // lie about compression + }, + ResponseSize = 314159, + Payload = CreateZerosPayload(271828) + }; + var e = Assert.Throws(() => client.UnaryCall(probeRequest, CreateClientCompressionMetadata(false))); + Assert.AreEqual(StatusCode.InvalidArgument, e.Status.StatusCode); + + var compressedRequest = new SimpleRequest + { + ExpectCompressed = new BoolValue + { + Value = true + }, + ResponseSize = 314159, + Payload = CreateZerosPayload(271828) + }; + var response1 = client.UnaryCall(compressedRequest, CreateClientCompressionMetadata(true)); + Assert.AreEqual(314159, response1.Payload.Body.Length); + + var uncompressedRequest = new SimpleRequest + { + ExpectCompressed = new BoolValue + { + Value = false + }, + ResponseSize = 314159, + Payload = CreateZerosPayload(271828) + }; + var response2 = client.UnaryCall(uncompressedRequest, CreateClientCompressionMetadata(false)); + Assert.AreEqual(314159, response2.Payload.Body.Length); + + Console.WriteLine("Passed!"); + } + + public static async Task RunClientCompressedStreamingAsync(TestService.TestServiceClient client) + { + Console.WriteLine("running client_compressed_streaming"); + try + { + var probeCall = client.StreamingInputCall(CreateClientCompressionMetadata(false)); + await probeCall.RequestStream.WriteAsync(new StreamingInputCallRequest + { + ExpectCompressed = new BoolValue + { + Value = true + }, + Payload = CreateZerosPayload(27182) + }); + + // cannot use Assert.ThrowsAsync because it uses Task.Wait and would deadlock. + await probeCall; + Assert.Fail(); + } + catch (RpcException e) + { + Assert.AreEqual(StatusCode.InvalidArgument, e.Status.StatusCode); + } + + var call = client.StreamingInputCall(CreateClientCompressionMetadata(true)); + await call.RequestStream.WriteAsync(new StreamingInputCallRequest + { + ExpectCompressed = new BoolValue + { + Value = true + }, + Payload = CreateZerosPayload(27182) + }); + + call.RequestStream.WriteOptions = new WriteOptions(WriteFlags.NoCompress); + await call.RequestStream.WriteAsync(new StreamingInputCallRequest + { + ExpectCompressed = new BoolValue + { + Value = false + }, + Payload = CreateZerosPayload(45904) + }); + await call.RequestStream.CompleteAsync(); + + var response = await call.ResponseAsync; + Assert.AreEqual(73086, response.AggregatedPayloadSize); + + Console.WriteLine("Passed!"); + } + private static Payload CreateZerosPayload(int size) { return new Payload { Body = ByteString.CopyFrom(new byte[size]) }; } + private static Metadata CreateClientCompressionMetadata(bool compressed) + { + var algorithmName = compressed ? "gzip" : "identity"; + return new Metadata + { + { new Metadata.Entry("grpc-internal-encoding-request", algorithmName) } + }; + } + // extracts the client_email field from service account file used for auth test cases private static string GetEmailFromServiceAccountFile() { From 9fc079fddd2fc1bad958d6f7f7063363437426a5 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 21 Jun 2016 19:53:31 -0700 Subject: [PATCH 1253/1894] enable client compression interop tests for C# --- tools/run_tests/run_interop_tests.py | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index e3af721ee53..d76dd4b7d26 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -54,10 +54,13 @@ os.chdir(ROOT) _DEFAULT_SERVER_PORT=8080 -_SKIP_COMPRESSION = ['client_compressed_unary', - 'client_compressed_streaming', - 'server_compressed_unary', - 'server_compressed_streaming'] +_SKIP_CLIENT_COMPRESSION = ['client_compressed_unary', + 'client_compressed_streaming'] + +_SKIP_SERVER_COMPRESSION = ['server_compressed_unary', + 'server_compressed_streaming'] + +_SKIP_COMPRESSION = _SKIP_CLIENT_COMPRESSION + _SKIP_SERVER_COMPRESSION _SKIP_ADVANCED = ['custom_metadata', 'status_code_and_message', 'unimplemented_method'] @@ -113,7 +116,7 @@ class CSharpLanguage: return {} def unimplemented_test_cases(self): - return _SKIP_COMPRESSION + return _SKIP_SERVER_COMPRESSION def unimplemented_test_cases_server(self): return _SKIP_COMPRESSION From 606e35a4fb2a6e7dd711e7a2eec6c59bf6f2258b Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 22 Jun 2016 12:26:36 -0700 Subject: [PATCH 1254/1894] add C# constant for GRPC_COMPRESSION_REQUEST_ALGORITHM_MD_KEY --- src/csharp/Grpc.Core.Tests/CompressionTest.cs | 2 +- src/csharp/Grpc.Core/Metadata.cs | 7 +++++++ src/csharp/Grpc.IntegrationTesting/InteropClient.cs | 2 +- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/csharp/Grpc.Core.Tests/CompressionTest.cs b/src/csharp/Grpc.Core.Tests/CompressionTest.cs index f2f2931e480..16be210508a 100644 --- a/src/csharp/Grpc.Core.Tests/CompressionTest.cs +++ b/src/csharp/Grpc.Core.Tests/CompressionTest.cs @@ -125,7 +125,7 @@ namespace Grpc.Core.Tests { var compressionMetadata = new Metadata { - { new Metadata.Entry("grpc-internal-encoding-request", "gzip") } + { new Metadata.Entry(Metadata.CompressionRequestAlgorithmMetadataKey, "gzip") } }; helper.UnaryHandler = new UnaryServerMethod(async (req, context) => diff --git a/src/csharp/Grpc.Core/Metadata.cs b/src/csharp/Grpc.Core/Metadata.cs index f73f720094a..915bec146c9 100644 --- a/src/csharp/Grpc.Core/Metadata.cs +++ b/src/csharp/Grpc.Core/Metadata.cs @@ -63,6 +63,13 @@ namespace Grpc.Core /// public static readonly Metadata Empty = new Metadata().Freeze(); + /// + /// To be used in initial metadata to request specific compression algorithm + /// for given call. Direct selection of compression algorithms is an internal + /// feature and is not part of public API. + /// + internal const string CompressionRequestAlgorithmMetadataKey = "grpc-internal-encoding-request"; + readonly List entries; bool readOnly; diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs index 17ef587d168..e27fe5b3d80 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClient.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClient.cs @@ -724,7 +724,7 @@ namespace Grpc.IntegrationTesting var algorithmName = compressed ? "gzip" : "identity"; return new Metadata { - { new Metadata.Entry("grpc-internal-encoding-request", algorithmName) } + { new Metadata.Entry(Metadata.CompressionRequestAlgorithmMetadataKey, algorithmName) } }; } From b16e4518b765f82b9b65222bd56738cda44e7259 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Tue, 21 Jun 2016 23:24:06 +0000 Subject: [PATCH 1255/1894] Add a test of metadata, status code, and details --- src/python/grpcio/tests/tests.json | 1 + .../tests/unit/_metadata_code_details_test.py | 523 ++++++++++++++++++ 2 files changed, 524 insertions(+) create mode 100644 src/python/grpcio/tests/unit/_metadata_code_details_test.py diff --git a/src/python/grpcio/tests/tests.json b/src/python/grpcio/tests/tests.json index 8e509621a84..e384a2fc135 100644 --- a/src/python/grpcio/tests/tests.json +++ b/src/python/grpcio/tests/tests.json @@ -24,6 +24,7 @@ "_implementations_test.ChannelCredentialsTest", "_insecure_interop_test.InsecureInteropTest", "_logging_pool_test.LoggingPoolTest", + "_metadata_code_details_test.MetadataCodeDetailsTest", "_metadata_test.MetadataTest", "_not_found_test.NotFoundTest", "_python_plugin_test.PythonPluginTest", diff --git a/src/python/grpcio/tests/unit/_metadata_code_details_test.py b/src/python/grpcio/tests/unit/_metadata_code_details_test.py new file mode 100644 index 00000000000..dd74268cbf1 --- /dev/null +++ b/src/python/grpcio/tests/unit/_metadata_code_details_test.py @@ -0,0 +1,523 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""Tests application-provided metadata, status code, and details.""" + +import threading +import unittest + +import grpc +from grpc.framework.foundation import logging_pool + +from tests.unit import test_common +from tests.unit.framework.common import test_constants +from tests.unit.framework.common import test_control + +_SERIALIZED_REQUEST = b'\x46\x47\x48' +_SERIALIZED_RESPONSE = b'\x49\x50\x51' + +_REQUEST_SERIALIZER = lambda unused_request: _SERIALIZED_REQUEST +_REQUEST_DESERIALIZER = lambda unused_serialized_request: object() +_RESPONSE_SERIALIZER = lambda unused_response: _SERIALIZED_RESPONSE +_RESPONSE_DESERIALIZER = lambda unused_serialized_resopnse: object() + +_SERVICE = b'test.TestService' +_UNARY_UNARY = b'UnaryUnary' +_UNARY_STREAM = b'UnaryStream' +_STREAM_UNARY = b'StreamUnary' +_STREAM_STREAM = b'StreamStream' + +_CLIENT_METADATA = ( + (b'client-md-key', b'client-md-key'), + (b'client-md-key-bin', b'\x00\x01') +) + +_SERVER_INITIAL_METADATA = ( + (b'server-initial-md-key', b'server-initial-md-value'), + (b'server-initial-md-key-bin', b'\x00\x02') +) + +_SERVER_TRAILING_METADATA = ( + (b'server-trailing-md-key', b'server-trailing-md-value'), + (b'server-trailing-md-key-bin', b'\x00\x03') +) + +_NON_OK_CODE = grpc.StatusCode.NOT_FOUND +_DETAILS = b'Test details!' + + +class _Servicer(object): + + def __init__(self): + self._lock = threading.Lock() + self._code = None + self._details = None + self._exception = False + self._return_none = False + self._received_client_metadata = None + + def unary_unary(self, request, context): + with self._lock: + self._received_client_metadata = context.invocation_metadata() + context.send_initial_metadata(_SERVER_INITIAL_METADATA) + context.set_trailing_metadata(_SERVER_TRAILING_METADATA) + if self._code is not None: + context.set_code(self._code) + if self._details is not None: + context.set_details(self._details) + if self._exception: + raise test_control.Defect() + else: + return None if self._return_none else object() + + def unary_stream(self, request, context): + with self._lock: + self._received_client_metadata = context.invocation_metadata() + context.send_initial_metadata(_SERVER_INITIAL_METADATA) + context.set_trailing_metadata(_SERVER_TRAILING_METADATA) + if self._code is not None: + context.set_code(self._code) + if self._details is not None: + context.set_details(self._details) + for _ in range(test_constants.STREAM_LENGTH // 2): + yield _SERIALIZED_RESPONSE + if self._exception: + raise test_control.Defect() + + def stream_unary(self, request_iterator, context): + with self._lock: + self._received_client_metadata = context.invocation_metadata() + context.send_initial_metadata(_SERVER_INITIAL_METADATA) + context.set_trailing_metadata(_SERVER_TRAILING_METADATA) + if self._code is not None: + context.set_code(self._code) + if self._details is not None: + context.set_details(self._details) + # TODO(https://github.com/grpc/grpc/issues/6891): just ignore the + # request iterator. + for ignored_request in request_iterator: + pass + if self._exception: + raise test_control.Defect() + else: + return None if self._return_none else _SERIALIZED_RESPONSE + + def stream_stream(self, request_iterator, context): + with self._lock: + self._received_client_metadata = context.invocation_metadata() + context.send_initial_metadata(_SERVER_INITIAL_METADATA) + context.set_trailing_metadata(_SERVER_TRAILING_METADATA) + if self._code is not None: + context.set_code(self._code) + if self._details is not None: + context.set_details(self._details) + # TODO(https://github.com/grpc/grpc/issues/6891): just ignore the + # request iterator. + for ignored_request in request_iterator: + pass + for _ in range(test_constants.STREAM_LENGTH // 3): + yield object() + if self._exception: + raise test_control.Defect() + + def set_code(self, code): + with self._lock: + self._code = code + + def set_details(self, details): + with self._lock: + self._details = details + + def set_exception(self): + with self._lock: + self._exception = True + + def set_return_none(self): + with self._lock: + self._return_none = True + + def received_client_metadata(self): + with self._lock: + return self._received_client_metadata + + +def _generic_handler(servicer): + method_handlers = { + _UNARY_UNARY: grpc.unary_unary_rpc_method_handler( + servicer.unary_unary, request_deserializer=_REQUEST_DESERIALIZER, + response_serializer=_RESPONSE_SERIALIZER), + _UNARY_STREAM: grpc.unary_stream_rpc_method_handler( + servicer.unary_stream), + _STREAM_UNARY: grpc.stream_unary_rpc_method_handler( + servicer.stream_unary), + _STREAM_STREAM: grpc.stream_stream_rpc_method_handler( + servicer.stream_stream, request_deserializer=_REQUEST_DESERIALIZER, + response_serializer=_RESPONSE_SERIALIZER), + } + return grpc.method_handlers_generic_handler(_SERVICE, method_handlers) + + +class MetadataCodeDetailsTest(unittest.TestCase): + + def setUp(self): + self._servicer = _Servicer() + self._server_pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY) + self._server = grpc.server( + (_generic_handler(self._servicer),), self._server_pool) + port = self._server.add_insecure_port('[::]:0') + self._server.start() + + channel = grpc.insecure_channel('localhost:{}'.format(port)) + self._unary_unary = channel.unary_unary( + b'/'.join((b'', _SERVICE, _UNARY_UNARY,)), + request_serializer=_REQUEST_SERIALIZER, + response_deserializer=_RESPONSE_DESERIALIZER,) + self._unary_stream = channel.unary_stream( + b'/'.join((b'', _SERVICE, _UNARY_STREAM,)),) + self._stream_unary = channel.stream_unary( + b'/'.join((b'', _SERVICE, _STREAM_UNARY,)),) + self._stream_stream = channel.stream_stream( + b'/'.join((b'', _SERVICE, _STREAM_STREAM,)), + request_serializer=_REQUEST_SERIALIZER, + response_deserializer=_RESPONSE_DESERIALIZER,) + + + def testSuccessfulUnaryUnary(self): + self._servicer.set_details(_DETAILS) + + unused_response, call = self._unary_unary.with_call( + object(), metadata=_CLIENT_METADATA) + + self.assertTrue( + test_common.metadata_transmitted( + _CLIENT_METADATA, self._servicer.received_client_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_INITIAL_METADATA, call.initial_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_TRAILING_METADATA, call.trailing_metadata())) + self.assertIs(grpc.StatusCode.OK, call.code()) + self.assertEqual(_DETAILS, call.details()) + + def testSuccessfulUnaryStream(self): + self._servicer.set_details(_DETAILS) + + call = self._unary_stream(_SERIALIZED_REQUEST, metadata=_CLIENT_METADATA) + received_initial_metadata = call.initial_metadata() + for _ in call: + pass + + self.assertTrue( + test_common.metadata_transmitted( + _CLIENT_METADATA, self._servicer.received_client_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_INITIAL_METADATA, received_initial_metadata)) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_TRAILING_METADATA, call.trailing_metadata())) + self.assertIs(grpc.StatusCode.OK, call.code()) + self.assertEqual(_DETAILS, call.details()) + + def testSuccessfulStreamUnary(self): + self._servicer.set_details(_DETAILS) + + unused_response, call = self._stream_unary.with_call( + iter([_SERIALIZED_REQUEST] * test_constants.STREAM_LENGTH), + metadata=_CLIENT_METADATA) + + self.assertTrue( + test_common.metadata_transmitted( + _CLIENT_METADATA, self._servicer.received_client_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_INITIAL_METADATA, call.initial_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_TRAILING_METADATA, call.trailing_metadata())) + self.assertIs(grpc.StatusCode.OK, call.code()) + self.assertEqual(_DETAILS, call.details()) + + def testSuccessfulStreamStream(self): + self._servicer.set_details(_DETAILS) + + call = self._stream_stream( + iter([object()] * test_constants.STREAM_LENGTH), + metadata=_CLIENT_METADATA) + received_initial_metadata = call.initial_metadata() + for _ in call: + pass + + self.assertTrue( + test_common.metadata_transmitted( + _CLIENT_METADATA, self._servicer.received_client_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_INITIAL_METADATA, received_initial_metadata)) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_TRAILING_METADATA, call.trailing_metadata())) + self.assertIs(grpc.StatusCode.OK, call.code()) + self.assertEqual(_DETAILS, call.details()) + + def testCustomCodeUnaryUnary(self): + self._servicer.set_code(_NON_OK_CODE) + self._servicer.set_details(_DETAILS) + + with self.assertRaises(grpc.RpcError) as exception_context: + self._unary_unary.with_call(object(), metadata=_CLIENT_METADATA) + + self.assertTrue( + test_common.metadata_transmitted( + _CLIENT_METADATA, self._servicer.received_client_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_INITIAL_METADATA, + exception_context.exception.initial_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_TRAILING_METADATA, + exception_context.exception.trailing_metadata())) + self.assertIs(_NON_OK_CODE, exception_context.exception.code()) + self.assertEqual(_DETAILS, exception_context.exception.details()) + + def testCustomCodeUnaryStream(self): + self._servicer.set_code(_NON_OK_CODE) + self._servicer.set_details(_DETAILS) + + call = self._unary_stream(_SERIALIZED_REQUEST, metadata=_CLIENT_METADATA) + received_initial_metadata = call.initial_metadata() + with self.assertRaises(grpc.RpcError): + for _ in call: + pass + + self.assertTrue( + test_common.metadata_transmitted( + _CLIENT_METADATA, self._servicer.received_client_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_INITIAL_METADATA, received_initial_metadata)) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_TRAILING_METADATA, call.trailing_metadata())) + self.assertIs(_NON_OK_CODE, call.code()) + self.assertEqual(_DETAILS, call.details()) + + def testCustomCodeStreamUnary(self): + self._servicer.set_code(_NON_OK_CODE) + self._servicer.set_details(_DETAILS) + + with self.assertRaises(grpc.RpcError) as exception_context: + self._stream_unary.with_call( + iter([_SERIALIZED_REQUEST] * test_constants.STREAM_LENGTH), + metadata=_CLIENT_METADATA) + + self.assertTrue( + test_common.metadata_transmitted( + _CLIENT_METADATA, self._servicer.received_client_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_INITIAL_METADATA, + exception_context.exception.initial_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_TRAILING_METADATA, + exception_context.exception.trailing_metadata())) + self.assertIs(_NON_OK_CODE, exception_context.exception.code()) + self.assertEqual(_DETAILS, exception_context.exception.details()) + + def testCustomCodeStreamStream(self): + self._servicer.set_code(_NON_OK_CODE) + self._servicer.set_details(_DETAILS) + + call = self._stream_stream( + iter([object()] * test_constants.STREAM_LENGTH), + metadata=_CLIENT_METADATA) + received_initial_metadata = call.initial_metadata() + with self.assertRaises(grpc.RpcError) as exception_context: + for _ in call: + pass + + self.assertTrue( + test_common.metadata_transmitted( + _CLIENT_METADATA, self._servicer.received_client_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_INITIAL_METADATA, received_initial_metadata)) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_TRAILING_METADATA, + exception_context.exception.trailing_metadata())) + self.assertIs(_NON_OK_CODE, exception_context.exception.code()) + self.assertEqual(_DETAILS, exception_context.exception.details()) + + def testCustomCodeExceptionUnaryUnary(self): + self._servicer.set_code(_NON_OK_CODE) + self._servicer.set_details(_DETAILS) + self._servicer.set_exception() + + with self.assertRaises(grpc.RpcError) as exception_context: + self._unary_unary.with_call(object(), metadata=_CLIENT_METADATA) + + self.assertTrue( + test_common.metadata_transmitted( + _CLIENT_METADATA, self._servicer.received_client_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_INITIAL_METADATA, + exception_context.exception.initial_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_TRAILING_METADATA, + exception_context.exception.trailing_metadata())) + self.assertIs(_NON_OK_CODE, exception_context.exception.code()) + self.assertEqual(_DETAILS, exception_context.exception.details()) + + def testCustomCodeExceptionUnaryStream(self): + self._servicer.set_code(_NON_OK_CODE) + self._servicer.set_details(_DETAILS) + self._servicer.set_exception() + + call = self._unary_stream(_SERIALIZED_REQUEST, metadata=_CLIENT_METADATA) + received_initial_metadata = call.initial_metadata() + with self.assertRaises(grpc.RpcError): + for _ in call: + pass + + self.assertTrue( + test_common.metadata_transmitted( + _CLIENT_METADATA, self._servicer.received_client_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_INITIAL_METADATA, received_initial_metadata)) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_TRAILING_METADATA, call.trailing_metadata())) + self.assertIs(_NON_OK_CODE, call.code()) + self.assertEqual(_DETAILS, call.details()) + + def testCustomCodeExceptionStreamUnary(self): + self._servicer.set_code(_NON_OK_CODE) + self._servicer.set_details(_DETAILS) + self._servicer.set_exception() + + with self.assertRaises(grpc.RpcError) as exception_context: + self._stream_unary.with_call( + iter([_SERIALIZED_REQUEST] * test_constants.STREAM_LENGTH), + metadata=_CLIENT_METADATA) + + self.assertTrue( + test_common.metadata_transmitted( + _CLIENT_METADATA, self._servicer.received_client_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_INITIAL_METADATA, + exception_context.exception.initial_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_TRAILING_METADATA, + exception_context.exception.trailing_metadata())) + self.assertIs(_NON_OK_CODE, exception_context.exception.code()) + self.assertEqual(_DETAILS, exception_context.exception.details()) + + def testCustomCodeExceptionStreamStream(self): + self._servicer.set_code(_NON_OK_CODE) + self._servicer.set_details(_DETAILS) + self._servicer.set_exception() + + call = self._stream_stream( + iter([object()] * test_constants.STREAM_LENGTH), + metadata=_CLIENT_METADATA) + received_initial_metadata = call.initial_metadata() + with self.assertRaises(grpc.RpcError): + for _ in call: + pass + + self.assertTrue( + test_common.metadata_transmitted( + _CLIENT_METADATA, self._servicer.received_client_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_INITIAL_METADATA, received_initial_metadata)) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_TRAILING_METADATA, call.trailing_metadata())) + self.assertIs(_NON_OK_CODE, call.code()) + self.assertEqual(_DETAILS, call.details()) + + def testCustomCodeReturnNoneUnaryUnary(self): + self._servicer.set_code(_NON_OK_CODE) + self._servicer.set_details(_DETAILS) + self._servicer.set_return_none() + + with self.assertRaises(grpc.RpcError) as exception_context: + self._unary_unary.with_call(object(), metadata=_CLIENT_METADATA) + + self.assertTrue( + test_common.metadata_transmitted( + _CLIENT_METADATA, self._servicer.received_client_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_INITIAL_METADATA, + exception_context.exception.initial_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_TRAILING_METADATA, + exception_context.exception.trailing_metadata())) + self.assertIs(_NON_OK_CODE, exception_context.exception.code()) + self.assertEqual(_DETAILS, exception_context.exception.details()) + + def testCustomCodeReturnNoneStreamUnary(self): + self._servicer.set_code(_NON_OK_CODE) + self._servicer.set_details(_DETAILS) + self._servicer.set_return_none() + + with self.assertRaises(grpc.RpcError) as exception_context: + self._stream_unary.with_call( + iter([_SERIALIZED_REQUEST] * test_constants.STREAM_LENGTH), + metadata=_CLIENT_METADATA) + + self.assertTrue( + test_common.metadata_transmitted( + _CLIENT_METADATA, self._servicer.received_client_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_INITIAL_METADATA, + exception_context.exception.initial_metadata())) + self.assertTrue( + test_common.metadata_transmitted( + _SERVER_TRAILING_METADATA, + exception_context.exception.trailing_metadata())) + self.assertIs(_NON_OK_CODE, exception_context.exception.code()) + self.assertEqual(_DETAILS, exception_context.exception.details()) + + +if __name__ == '__main__': + unittest.main(verbosity=2) From edfebc909a7e4a2ada5e07d2012a227fb15d4064 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Tue, 21 Jun 2016 16:39:21 -0700 Subject: [PATCH 1256/1894] dont generate NewClient method for C# services --- src/compiler/csharp_generator.cc | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/src/compiler/csharp_generator.cc b/src/compiler/csharp_generator.cc index fc8feaf0fcc..8c1c6f2c826 100644 --- a/src/compiler/csharp_generator.cc +++ b/src/compiler/csharp_generator.cc @@ -485,20 +485,6 @@ void GenerateBindServiceMethod(Printer* out, const ServiceDescriptor *service) { out->Print("\n"); } -void GenerateNewStubMethods(Printer* out, const ServiceDescriptor *service) { - out->Print("/// Creates a new client for $servicename$\n", - "servicename", GetServiceClassName(service)); - out->Print("public static $classname$ NewClient(Channel channel)\n", - "classname", GetClientClassName(service)); - out->Print("{\n"); - out->Indent(); - out->Print("return new $classname$(channel);\n", "classname", - GetClientClassName(service)); - out->Outdent(); - out->Print("}\n"); - out->Print("\n"); -} - void GenerateService(Printer* out, const ServiceDescriptor *service, bool generate_client, bool generate_server, bool internal_access) { @@ -524,7 +510,6 @@ void GenerateService(Printer* out, const ServiceDescriptor *service, } if (generate_client) { GenerateClientStub(out, service); - GenerateNewStubMethods(out, service); } if (generate_server) { GenerateBindServiceMethod(out, service); From 614944324246b2b4eef9fc2e989af20375c49cd5 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Wed, 22 Jun 2016 13:34:59 -0700 Subject: [PATCH 1257/1894] add code to unregister endpoints --- src/core/lib/iomgr/network_status_tracker.c | 46 ++++++++++++++++++++- src/core/lib/iomgr/network_status_tracker.h | 1 + src/core/lib/iomgr/tcp_posix.c | 1 + src/core/lib/iomgr/tcp_windows.c | 1 + 4 files changed, 47 insertions(+), 2 deletions(-) diff --git a/src/core/lib/iomgr/network_status_tracker.c b/src/core/lib/iomgr/network_status_tracker.c index 6e432368cf1..f4f8e97a252 100644 --- a/src/core/lib/iomgr/network_status_tracker.c +++ b/src/core/lib/iomgr/network_status_tracker.c @@ -33,6 +33,7 @@ #include "src/core/lib/iomgr/endpoint.h" #include +#include typedef struct endpoint_ll_node { grpc_endpoint *ep; @@ -40,9 +41,13 @@ typedef struct endpoint_ll_node { } endpoint_ll_node; static endpoint_ll_node *head = NULL; +static gpr_mu g_endpoint_mutex; +static bool g_init_done = false; -// TODO(makarandd): Install callback with OS to monitor network status. void grpc_initialize_network_status_monitor() { + g_init_done = true; + gpr_mu_init(&g_endpoint_mutex); + // TODO(makarandd): Install callback with OS to monitor network status. } void grpc_destroy_network_status_monitor() { @@ -51,9 +56,15 @@ void grpc_destroy_network_status_monitor() { gpr_free(curr); curr = next; } + gpr_mu_destroy(&g_endpoint_mutex); } void grpc_network_status_register_endpoint(grpc_endpoint *ep) { + if (!g_init_done) { + grpc_initialize_network_status_monitor(); + } + gpr_mu_lock(&g_endpoint_mutex); + gpr_log(GPR_DEBUG, "Register endpoint %p", ep); if (head == NULL) { head = (endpoint_ll_node *)gpr_malloc(sizeof(endpoint_ll_node)); head->ep = ep; @@ -64,19 +75,50 @@ void grpc_network_status_register_endpoint(grpc_endpoint *ep) { head->ep = ep; head->next = prev_head; } + gpr_mu_unlock(&g_endpoint_mutex); +} + +void grpc_network_status_unregister_endpoint(grpc_endpoint *ep) { + gpr_mu_lock(&g_endpoint_mutex); + GPR_ASSERT(head); + gpr_log(GPR_DEBUG, "Unregister endpoint %p", ep); + bool found = false; + endpoint_ll_node *prev = head; + // if we're unregistering the head, just move head to the next + if (ep == head->ep) { + head = head->next; + gpr_free(prev); + found = true; + } else { + for (endpoint_ll_node *curr = head->next; curr != NULL; curr = curr->next) { + if (ep == curr->ep) { + prev->next = curr->next; + gpr_free(curr); + found = true; + break; + } + prev = curr; + } + } + gpr_mu_unlock(&g_endpoint_mutex); + GPR_ASSERT(found); } // Walk the linked-list from head and execute shutdown. It is possible that // other threads might be in the process of shutdown as well, but that has -// no side effect. +// no side effect since endpoint shutdown is idempotent. void grpc_network_status_shutdown_all_endpoints() { + gpr_mu_lock(&g_endpoint_mutex); if (head == NULL) { + gpr_mu_unlock(&g_endpoint_mutex); return; } grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; for (endpoint_ll_node *curr = head; curr != NULL; curr = curr->next) { + gpr_log(GPR_DEBUG, "Shutting down endpoint %p", curr->ep); curr->ep->vtable->shutdown(&exec_ctx, curr->ep); } + gpr_mu_unlock(&g_endpoint_mutex); grpc_exec_ctx_finish(&exec_ctx); } diff --git a/src/core/lib/iomgr/network_status_tracker.h b/src/core/lib/iomgr/network_status_tracker.h index 4154151927f..74a1aa8135f 100644 --- a/src/core/lib/iomgr/network_status_tracker.h +++ b/src/core/lib/iomgr/network_status_tracker.h @@ -36,5 +36,6 @@ #include "src/core/lib/iomgr/endpoint.h" void grpc_network_status_register_endpoint(grpc_endpoint *ep); +void grpc_network_status_unregister_endpoint(grpc_endpoint *ep); void grpc_network_status_shutdown_all_endpoints(); #endif /* GRPC_CORE_LIB_IOMGR_NETWORK_STATUS_TRACKER_H */ diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index f7818353b0a..56c1eef024c 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -153,6 +153,7 @@ static void tcp_ref(grpc_tcp *tcp) { gpr_ref(&tcp->refcount); } #endif static void tcp_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { + grpc_network_status_unregister_endpoint(ep); grpc_tcp *tcp = (grpc_tcp *)ep; TCP_UNREF(exec_ctx, tcp, "destroy"); } diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 8140d1d8cd2..37ab59021e3 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -379,6 +379,7 @@ static void win_shutdown(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { } static void win_destroy(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep) { + grpc_network_status_unregister_endpoint(ep); grpc_tcp *tcp = (grpc_tcp *)ep; TCP_UNREF(tcp, "destroy"); } From f7c7f330a8efa7f264a52973a0c62dc1016f0648 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Wed, 22 Jun 2016 13:37:02 -0700 Subject: [PATCH 1258/1894] Init grpc for each test --- test/core/end2end/bad_server_response_test.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/test/core/end2end/bad_server_response_test.c b/test/core/end2end/bad_server_response_test.c index ebf2caa0702..878dfaed5af 100644 --- a/test/core/end2end/bad_server_response_test.c +++ b/test/core/end2end/bad_server_response_test.c @@ -270,11 +270,12 @@ static void run_test(const char *response_payload, grpc_status_code expected_status, const char *expected_detail) { test_tcp_server test_server; - server_port = grpc_pick_unused_port_or_die(); grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; gpr_event ev; - gpr_event_init(&ev); + grpc_init(); + gpr_event_init(&ev); + server_port = grpc_pick_unused_port_or_die(); test_tcp_server_init(&test_server, on_connect, &test_server); test_tcp_server_start(&test_server, server_port); state.response_payload = response_payload; @@ -291,11 +292,12 @@ static void run_test(const char *response_payload, grpc_exec_ctx_finish(&exec_ctx); cleanup_rpc(); test_tcp_server_destroy(&test_server); + + grpc_shutdown(); } int main(int argc, char **argv) { grpc_test_init(argc, argv); - grpc_init(); /* status defined in hpack static table */ run_test(HTTP2_RESP(204), sizeof(HTTP2_RESP(204)) - 1, GRPC_STATUS_CANCELLED, @@ -334,6 +336,5 @@ int main(int argc, char **argv) { run_test(HTTP1_RESP, sizeof(HTTP1_RESP) - 1, GRPC_STATUS_UNAVAILABLE, HTTP1_DETAIL_MSG); - grpc_shutdown(); return 0; } From 76a0795b73ad2632c435fc338bb49368d1d68d9f Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 22 Jun 2016 15:09:06 -0700 Subject: [PATCH 1259/1894] Fix build errors on some configurations --- src/core/lib/iomgr/ev_epoll_linux.c | 13 +++++++------ test/core/iomgr/ev_epoll_linux_test.c | 10 ++++++++-- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 6464d3ba348..88cbc586349 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -34,6 +34,7 @@ #include #include +/* This polling engine is only relevant on linux kernels supporting epoll() */ #ifdef GPR_LINUX_EPOLL #include "src/core/lib/iomgr/ev_epoll_linux.h" @@ -322,7 +323,7 @@ static void polling_island_add_fds_locked(polling_island *pi, grpc_fd **fds, #ifdef GRPC_TSAN /* See the definition of g_epoll_sync for more context */ - gpr_atm_rel_store(&g_epoll_sync, 0); + gpr_atm_rel_store(&g_epoll_sync, (gpr_atm) 0); #endif /* defined(GRPC_TSAN) */ for (i = 0; i < fd_count; i++) { @@ -442,8 +443,8 @@ static polling_island *polling_island_create(grpc_fd *initial_fd) { pi->fds = NULL; } - gpr_atm_rel_store(&pi->ref_count, 0); - gpr_atm_rel_store(&pi->merged_to, NULL); + gpr_atm_rel_store(&pi->ref_count, (gpr_atm) 0); + gpr_atm_rel_store(&pi->merged_to, (gpr_atm) NULL); pi->epoll_fd = epoll_create1(EPOLL_CLOEXEC); @@ -472,7 +473,7 @@ static polling_island *polling_island_create(grpc_fd *initial_fd) { static void polling_island_delete(polling_island *pi) { GPR_ASSERT(pi->fd_cnt == 0); - gpr_atm_rel_store(&pi->merged_to, NULL); + gpr_atm_rel_store(&pi->merged_to, (gpr_atm) NULL); close(pi->epoll_fd); pi->epoll_fd = -1; @@ -648,7 +649,7 @@ static polling_island *polling_island_merge(polling_island *p, polling_island_add_wakeup_fd_locked(p, &polling_island_wakeup_fd); /* Add the 'merged_to' link from p --> q */ - gpr_atm_rel_store(&p->merged_to, q); + gpr_atm_rel_store(&p->merged_to, (gpr_atm) q); PI_ADD_REF(q, "pi_merge"); /* To account for the new incoming ref from p */ gpr_mu_unlock(&p->mu); @@ -810,7 +811,7 @@ static grpc_fd *fd_create(int fd, const char *name) { holding a lock to it anyway. */ gpr_mu_lock(&new_fd->mu); - gpr_atm_rel_store(&new_fd->refst, 1); + gpr_atm_rel_store(&new_fd->refst, (gpr_atm) 1); new_fd->fd = fd; new_fd->shutdown = false; new_fd->orphaned = false; diff --git a/test/core/iomgr/ev_epoll_linux_test.c b/test/core/iomgr/ev_epoll_linux_test.c index 35eb6791302..66a69f52cdb 100644 --- a/test/core/iomgr/ev_epoll_linux_test.c +++ b/test/core/iomgr/ev_epoll_linux_test.c @@ -30,7 +30,10 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * */ +#include +/* This test only relevant on linux systems where epoll() is available */ +#ifdef GPR_LINUX_EPOLL #include "src/core/lib/iomgr/ev_epoll_linux.h" #include "src/core/lib/iomgr/ev_posix.h" @@ -128,8 +131,10 @@ static void test_add_fd_to_pollset() { int i; int r; - /* Create some dummy file descriptors (using pipe fds for this test. Could be - anything). Also NUM_FDS should be even for this test. */ + /* Create some dummy file descriptors. Currently using pipe file descriptors + * for this test but we could use any other type of file descriptors. Also, + * since pipe() used in this test creates two fds in each call, NUM_FDS should + * be an even number */ for (i = 0; i < NUM_FDS; i = i + 2) { r = pipe(fds + i); if (r != 0) { @@ -234,3 +239,4 @@ int main(int argc, char **argv) { grpc_iomgr_shutdown(); return 0; } +#endif /* defined(GPR_LINUX_EPOLL) */ From fcb304f493f72fa5e487b364f78126e01c550288 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 22 Jun 2016 15:25:41 -0700 Subject: [PATCH 1260/1894] Compilation failure --- test/core/iomgr/ev_epoll_linux_test.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/core/iomgr/ev_epoll_linux_test.c b/test/core/iomgr/ev_epoll_linux_test.c index 66a69f52cdb..2547dc98718 100644 --- a/test/core/iomgr/ev_epoll_linux_test.c +++ b/test/core/iomgr/ev_epoll_linux_test.c @@ -239,4 +239,6 @@ int main(int argc, char **argv) { grpc_iomgr_shutdown(); return 0; } -#endif /* defined(GPR_LINUX_EPOLL) */ +#else /* defined(GPR_LINUX_EPOLL) */ +int main(int argc, char **argv) { return 0; } +#endif /* !defined(GPR_LINUX_EPOLL) */ From 932d02725200028415f8420bdaf35d9484f419d4 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Wed, 22 Jun 2016 16:17:15 -0700 Subject: [PATCH 1261/1894] clang-format fixes --- src/core/lib/iomgr/network_status_tracker.c | 10 +++++----- test/core/end2end/tests/network_status_change.c | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/core/lib/iomgr/network_status_tracker.c b/src/core/lib/iomgr/network_status_tracker.c index f4f8e97a252..0e34605c81d 100644 --- a/src/core/lib/iomgr/network_status_tracker.c +++ b/src/core/lib/iomgr/network_status_tracker.c @@ -31,9 +31,9 @@ * */ -#include "src/core/lib/iomgr/endpoint.h" #include #include +#include "src/core/lib/iomgr/endpoint.h" typedef struct endpoint_ll_node { grpc_endpoint *ep; @@ -51,7 +51,7 @@ void grpc_initialize_network_status_monitor() { } void grpc_destroy_network_status_monitor() { - for (endpoint_ll_node *curr = head; curr != NULL; ) { + for (endpoint_ll_node *curr = head; curr != NULL;) { endpoint_ll_node *next = curr->next; gpr_free(curr); curr = next; @@ -86,9 +86,9 @@ void grpc_network_status_unregister_endpoint(grpc_endpoint *ep) { endpoint_ll_node *prev = head; // if we're unregistering the head, just move head to the next if (ep == head->ep) { - head = head->next; - gpr_free(prev); - found = true; + head = head->next; + gpr_free(prev); + found = true; } else { for (endpoint_ll_node *curr = head->next; curr != NULL; curr = curr->next) { if (ep == curr->ep) { diff --git a/test/core/end2end/tests/network_status_change.c b/test/core/end2end/tests/network_status_change.c index bbc85007022..7e7628391de 100644 --- a/test/core/end2end/tests/network_status_change.c +++ b/test/core/end2end/tests/network_status_change.c @@ -217,7 +217,6 @@ static void test_invoke_network_status_change(grpc_end2end_test_config config) { GPR_ASSERT(0 == strcmp(call_details.host, "foo.test.google.fr")); GPR_ASSERT(was_cancelled == 0); - gpr_free(details); grpc_metadata_array_destroy(&initial_metadata_recv); grpc_metadata_array_destroy(&trailing_metadata_recv); From 8891ef50eef2e858b2290de36691c4b535de3acc Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Wed, 22 Jun 2016 16:47:52 -0700 Subject: [PATCH 1262/1894] Initialize port to -1 --- src/core/lib/iomgr/tcp_server_windows.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/iomgr/tcp_server_windows.c b/src/core/lib/iomgr/tcp_server_windows.c index 2a51671ec71..86982bc1836 100644 --- a/src/core/lib/iomgr/tcp_server_windows.c +++ b/src/core/lib/iomgr/tcp_server_windows.c @@ -396,7 +396,7 @@ static grpc_error *add_socket_to_server(grpc_tcp_server *s, SOCKET sock, size_t addr_len, unsigned port_index, grpc_tcp_listener **listener) { grpc_tcp_listener *sp = NULL; - int port; + int port = -1; int status; GUID guid = WSAID_ACCEPTEX; DWORD ioctl_num_bytes; From 9c578c7a734937f67b928f4511dd40448c621174 Mon Sep 17 00:00:00 2001 From: Bill Clarke Date: Wed, 22 Jun 2016 16:48:08 -0700 Subject: [PATCH 1263/1894] Const correctness for ClientContext and ServerContext getters --- include/grpc++/impl/codegen/client_context.h | 10 +++++----- include/grpc++/impl/codegen/server_context.h | 7 ++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h index e23fd4eda34..a132c9a57aa 100644 --- a/include/grpc++/impl/codegen/client_context.h +++ b/include/grpc++/impl/codegen/client_context.h @@ -193,7 +193,7 @@ class ClientContext { /// /// \return A multimap of initial metadata key-value pairs from the server. const std::multimap& - GetServerInitialMetadata() { + GetServerInitialMetadata() const { GPR_CODEGEN_ASSERT(initial_metadata_received_); return recv_initial_metadata_; } @@ -205,7 +205,7 @@ class ClientContext { /// /// \return A multimap of metadata trailing key-value pairs from the server. const std::multimap& - GetServerTrailingMetadata() { + GetServerTrailingMetadata() const { // TODO(yangg) check finished return trailing_metadata_; } @@ -230,13 +230,13 @@ class ClientContext { #ifndef GRPC_CXX0X_NO_CHRONO /// Return the deadline for the client call. - std::chrono::system_clock::time_point deadline() { + std::chrono::system_clock::time_point deadline() const { return Timespec2Timepoint(deadline_); } #endif // !GRPC_CXX0X_NO_CHRONO /// Return a \a gpr_timespec representation of the client call's deadline. - gpr_timespec raw_deadline() { return deadline_; } + gpr_timespec raw_deadline() const { return deadline_; } /// Set the per call authority header (see /// https://tools.ietf.org/html/rfc7540#section-8.1.2.3). @@ -337,7 +337,7 @@ class ClientContext { const InputMessage& request, OutputMessage* result); - grpc_call* call() { return call_; } + grpc_call* call() const { return call_; } void set_call(grpc_call* call, const std::shared_ptr& channel); uint32_t initial_metadata_flags() const { diff --git a/include/grpc++/impl/codegen/server_context.h b/include/grpc++/impl/codegen/server_context.h index a1e1ed176f6..cea13a513f6 100644 --- a/include/grpc++/impl/codegen/server_context.h +++ b/include/grpc++/impl/codegen/server_context.h @@ -94,12 +94,12 @@ class ServerContext { ~ServerContext(); #ifndef GRPC_CXX0X_NO_CHRONO - std::chrono::system_clock::time_point deadline() { + std::chrono::system_clock::time_point deadline() const { return Timespec2Timepoint(deadline_); } #endif // !GRPC_CXX0X_NO_CHRONO - gpr_timespec raw_deadline() { return deadline_; } + gpr_timespec raw_deadline() const { return deadline_; } void AddInitialMetadata(const grpc::string& key, const grpc::string& value); void AddTrailingMetadata(const grpc::string& key, const grpc::string& value); @@ -122,7 +122,8 @@ class ServerContext { // was called. void TryCancel() const; - const std::multimap& client_metadata() { + const std::multimap& client_metadata() + const { return client_metadata_; } From c072c927a885e49cb13afaad11a93379a1255b9f Mon Sep 17 00:00:00 2001 From: Bill Clarke Date: Wed, 22 Jun 2016 16:48:08 -0700 Subject: [PATCH 1264/1894] Const correctness for ClientContext and ServerContext getters --- include/grpc++/impl/codegen/client_context.h | 10 +++++----- include/grpc++/impl/codegen/server_context.h | 7 ++++--- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/include/grpc++/impl/codegen/client_context.h b/include/grpc++/impl/codegen/client_context.h index e23fd4eda34..a132c9a57aa 100644 --- a/include/grpc++/impl/codegen/client_context.h +++ b/include/grpc++/impl/codegen/client_context.h @@ -193,7 +193,7 @@ class ClientContext { /// /// \return A multimap of initial metadata key-value pairs from the server. const std::multimap& - GetServerInitialMetadata() { + GetServerInitialMetadata() const { GPR_CODEGEN_ASSERT(initial_metadata_received_); return recv_initial_metadata_; } @@ -205,7 +205,7 @@ class ClientContext { /// /// \return A multimap of metadata trailing key-value pairs from the server. const std::multimap& - GetServerTrailingMetadata() { + GetServerTrailingMetadata() const { // TODO(yangg) check finished return trailing_metadata_; } @@ -230,13 +230,13 @@ class ClientContext { #ifndef GRPC_CXX0X_NO_CHRONO /// Return the deadline for the client call. - std::chrono::system_clock::time_point deadline() { + std::chrono::system_clock::time_point deadline() const { return Timespec2Timepoint(deadline_); } #endif // !GRPC_CXX0X_NO_CHRONO /// Return a \a gpr_timespec representation of the client call's deadline. - gpr_timespec raw_deadline() { return deadline_; } + gpr_timespec raw_deadline() const { return deadline_; } /// Set the per call authority header (see /// https://tools.ietf.org/html/rfc7540#section-8.1.2.3). @@ -337,7 +337,7 @@ class ClientContext { const InputMessage& request, OutputMessage* result); - grpc_call* call() { return call_; } + grpc_call* call() const { return call_; } void set_call(grpc_call* call, const std::shared_ptr& channel); uint32_t initial_metadata_flags() const { diff --git a/include/grpc++/impl/codegen/server_context.h b/include/grpc++/impl/codegen/server_context.h index a1e1ed176f6..cea13a513f6 100644 --- a/include/grpc++/impl/codegen/server_context.h +++ b/include/grpc++/impl/codegen/server_context.h @@ -94,12 +94,12 @@ class ServerContext { ~ServerContext(); #ifndef GRPC_CXX0X_NO_CHRONO - std::chrono::system_clock::time_point deadline() { + std::chrono::system_clock::time_point deadline() const { return Timespec2Timepoint(deadline_); } #endif // !GRPC_CXX0X_NO_CHRONO - gpr_timespec raw_deadline() { return deadline_; } + gpr_timespec raw_deadline() const { return deadline_; } void AddInitialMetadata(const grpc::string& key, const grpc::string& value); void AddTrailingMetadata(const grpc::string& key, const grpc::string& value); @@ -122,7 +122,8 @@ class ServerContext { // was called. void TryCancel() const; - const std::multimap& client_metadata() { + const std::multimap& client_metadata() + const { return client_metadata_; } From 17233ceaa9a0150eeb0959cd7953ac8be100b413 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Wed, 22 Jun 2016 17:16:15 -0700 Subject: [PATCH 1265/1894] Ignore unused variables in ruby compilation --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index f208a24fd33..f44946fe937 100755 --- a/Rakefile +++ b/Rakefile @@ -77,7 +77,7 @@ task 'dlls' do grpc_config = ENV['GRPC_CONFIG'] || 'opt' verbose = ENV['V'] || '0' - env = 'CPPFLAGS="-D_WIN32_WINNT=0x600 -DUNICODE -D_UNICODE" ' + env = 'CPPFLAGS="-D_WIN32_WINNT=0x600 -DUNICODE -D_UNICODE -Wno-unused-variable -Wno-unused-result" ' env += 'LDFLAGS=-static ' env += 'SYSTEM=MINGW32 ' env += 'EMBED_ZLIB=true ' From f41ebc3968ef06439d6d1468256ac5000940ea8f Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 22 Jun 2016 12:47:14 -0700 Subject: [PATCH 1266/1894] remove occurences of NewClient factory method --- examples/csharp/helloworld/GreeterClient/Program.cs | 2 +- examples/csharp/route_guide/RouteGuideClient/Program.cs | 2 +- src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs | 2 +- src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs | 2 +- src/csharp/Grpc.IntegrationTesting/ClientRunners.cs | 6 +++--- .../Grpc.IntegrationTesting/GeneratedServiceBaseTest.cs | 2 +- .../Grpc.IntegrationTesting/InteropClientServerTest.cs | 4 ++-- .../Grpc.IntegrationTesting/MetadataCredentialsTest.cs | 4 ++-- src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs | 2 +- src/csharp/Grpc.IntegrationTesting/StressTestClient.cs | 2 +- 10 files changed, 14 insertions(+), 14 deletions(-) diff --git a/examples/csharp/helloworld/GreeterClient/Program.cs b/examples/csharp/helloworld/GreeterClient/Program.cs index 4393f2f3c29..444d4735095 100644 --- a/examples/csharp/helloworld/GreeterClient/Program.cs +++ b/examples/csharp/helloworld/GreeterClient/Program.cs @@ -39,7 +39,7 @@ namespace GreeterClient { Channel channel = new Channel("127.0.0.1:50051", ChannelCredentials.Insecure); - var client = Greeter.NewClient(channel); + var client = new Greeter.GreeterClient(channel); String user = "you"; var reply = client.SayHello(new HelloRequest { Name = user }); diff --git a/examples/csharp/route_guide/RouteGuideClient/Program.cs b/examples/csharp/route_guide/RouteGuideClient/Program.cs index ee51fbe8e04..8a173dcc3b3 100644 --- a/examples/csharp/route_guide/RouteGuideClient/Program.cs +++ b/examples/csharp/route_guide/RouteGuideClient/Program.cs @@ -231,7 +231,7 @@ namespace Routeguide static void Main(string[] args) { var channel = new Channel("127.0.0.1:50052", ChannelCredentials.Insecure); - var client = new RouteGuideClient(RouteGuide.NewClient(channel)); + var client = new RouteGuideClient(new RouteGuide.RouteGuideClient(channel)); // Looking for a valid feature client.GetFeature(409146138, -746188906); diff --git a/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs b/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs index 324c209ca1d..50dacc2eaaf 100644 --- a/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs +++ b/src/csharp/Grpc.Examples.Tests/MathClientServerTests.cs @@ -62,7 +62,7 @@ namespace Math.Tests }; server.Start(); channel = new Channel(Host, server.Ports.Single().BoundPort, ChannelCredentials.Insecure); - client = Math.NewClient(channel); + client = new Math.MathClient(channel); } [TestFixtureTearDown] diff --git a/src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs b/src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs index 070674bae9d..25a58fb3864 100644 --- a/src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs +++ b/src/csharp/Grpc.HealthCheck.Tests/HealthClientServerTest.cs @@ -65,7 +65,7 @@ namespace Grpc.HealthCheck.Tests server.Start(); channel = new Channel(Host, server.Ports.Single().BoundPort, ChannelCredentials.Insecure); - client = Grpc.Health.V1.Health.NewClient(channel); + client = new Grpc.Health.V1.Health.HealthClient(channel); } [TestFixtureTearDown] diff --git a/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs b/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs index 39b9ae08e64..b9c0fe6d0d8 100644 --- a/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs +++ b/src/csharp/Grpc.IntegrationTesting/ClientRunners.cs @@ -211,7 +211,7 @@ namespace Grpc.IntegrationTesting bool profilerReset = false; - var client = BenchmarkService.NewClient(channel); + var client = new BenchmarkService.BenchmarkServiceClient(channel); var request = CreateSimpleRequest(); var stopwatch = new Stopwatch(); @@ -237,7 +237,7 @@ namespace Grpc.IntegrationTesting private async Task RunUnaryAsync(Channel channel, IInterarrivalTimer timer) { - var client = BenchmarkService.NewClient(channel); + var client = new BenchmarkService.BenchmarkServiceClient(channel); var request = CreateSimpleRequest(); var stopwatch = new Stopwatch(); @@ -256,7 +256,7 @@ namespace Grpc.IntegrationTesting private async Task RunStreamingPingPongAsync(Channel channel, IInterarrivalTimer timer) { - var client = BenchmarkService.NewClient(channel); + var client = new BenchmarkService.BenchmarkServiceClient(channel); var request = CreateSimpleRequest(); var stopwatch = new Stopwatch(); diff --git a/src/csharp/Grpc.IntegrationTesting/GeneratedServiceBaseTest.cs b/src/csharp/Grpc.IntegrationTesting/GeneratedServiceBaseTest.cs index 001533ce315..4216dc1d6be 100644 --- a/src/csharp/Grpc.IntegrationTesting/GeneratedServiceBaseTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/GeneratedServiceBaseTest.cs @@ -61,7 +61,7 @@ namespace Grpc.IntegrationTesting }; server.Start(); channel = new Channel(Host, server.Ports.Single().BoundPort, ChannelCredentials.Insecure); - client = TestService.NewClient(channel); + client = new TestService.TestServiceClient(channel); } [TearDown] diff --git a/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs b/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs index 4ee1ff5ec8a..f907f630dab 100644 --- a/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/InteropClientServerTest.cs @@ -69,7 +69,7 @@ namespace Grpc.IntegrationTesting }; int port = server.Ports.Single().BoundPort; channel = new Channel(Host, port, TestCredentials.CreateSslCredentials(), options); - client = TestService.NewClient(channel); + client = new TestService.TestServiceClient(channel); } [TestFixtureTearDown] @@ -148,7 +148,7 @@ namespace Grpc.IntegrationTesting [Test] public void UnimplementedMethod() { - InteropClient.RunUnimplementedMethod(UnimplementedService.NewClient(channel)); + InteropClient.RunUnimplementedMethod(new UnimplementedService.UnimplementedServiceClient(channel)); } } } diff --git a/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs b/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs index 9fd575f1900..eb3bb8a28bb 100644 --- a/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/MetadataCredentialsTest.cs @@ -88,7 +88,7 @@ namespace Grpc.IntegrationTesting var channelCredentials = ChannelCredentials.Create(TestCredentials.CreateSslCredentials(), CallCredentials.FromInterceptor(asyncAuthInterceptor)); channel = new Channel(Host, server.Ports.Single().BoundPort, channelCredentials, options); - client = TestService.NewClient(channel); + client = new TestService.TestServiceClient(channel); client.UnaryCall(new SimpleRequest { }); } @@ -97,7 +97,7 @@ namespace Grpc.IntegrationTesting public void MetadataCredentials_PerCall() { channel = new Channel(Host, server.Ports.Single().BoundPort, TestCredentials.CreateSslCredentials(), options); - client = TestService.NewClient(channel); + client = new TestService.TestServiceClient(channel); var callCredentials = CallCredentials.FromInterceptor(asyncAuthInterceptor); client.UnaryCall(new SimpleRequest { }, new CallOptions(credentials: callCredentials)); diff --git a/src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs b/src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs index 3df45b5f708..f85e272711f 100644 --- a/src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs +++ b/src/csharp/Grpc.IntegrationTesting/SslCredentialsTest.cs @@ -79,7 +79,7 @@ namespace Grpc.IntegrationTesting }; channel = new Channel(Host, server.Ports.Single().BoundPort, clientCredentials, options); - client = TestService.NewClient(channel); + client = new TestService.TestServiceClient(channel); } [TestFixtureTearDown] diff --git a/src/csharp/Grpc.IntegrationTesting/StressTestClient.cs b/src/csharp/Grpc.IntegrationTesting/StressTestClient.cs index 4d6ca7ece57..74ee040ae49 100644 --- a/src/csharp/Grpc.IntegrationTesting/StressTestClient.cs +++ b/src/csharp/Grpc.IntegrationTesting/StressTestClient.cs @@ -148,7 +148,7 @@ namespace Grpc.IntegrationTesting channels.Add(channel); for (int j = 0; j < options.NumStubsPerChannel; j++) { - var client = TestService.NewClient(channel); + var client = new TestService.TestServiceClient(channel); var task = Task.Factory.StartNew(() => RunBodyAsync(client).GetAwaiter().GetResult(), TaskCreationOptions.LongRunning); tasks.Add(task); From bfcd6b627ece5ddab1aa690e4bf205a6c66d8fe3 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 22 Jun 2016 16:52:46 -0700 Subject: [PATCH 1267/1894] generate comments for C# client constructors --- src/compiler/csharp_generator.cc | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/compiler/csharp_generator.cc b/src/compiler/csharp_generator.cc index 8c1c6f2c826..f5a0876cf98 100644 --- a/src/compiler/csharp_generator.cc +++ b/src/compiler/csharp_generator.cc @@ -333,22 +333,28 @@ void GenerateClientStub(Printer* out, const ServiceDescriptor *service) { out->Indent(); // constructors + out->Print("/// Creates a new client for $servicename$\n" + "/// The channel to use to make remote calls.\n", + "servicename", GetServiceClassName(service)); out->Print("public $name$(Channel channel) : base(channel)\n", "name", GetClientClassName(service)); out->Print("{\n"); out->Print("}\n"); + out->Print("/// Creates a new client for $servicename$ that uses a custom CallInvoker.\n" + "/// The callInvoker to use to make remote calls.\n", + "servicename", GetServiceClassName(service)); out->Print("public $name$(CallInvoker callInvoker) : base(callInvoker)\n", "name", GetClientClassName(service)); out->Print("{\n"); out->Print("}\n"); - out->Print("///Protected parameterless constructor to allow creation" + out->Print("/// Protected parameterless constructor to allow creation" " of test doubles.\n"); out->Print("protected $name$() : base()\n", "name", GetClientClassName(service)); out->Print("{\n"); out->Print("}\n"); - out->Print("///Protected constructor to allow creation of configured" - " clients.\n"); + out->Print("/// Protected constructor to allow creation of configured clients.\n" + "/// The client configuration.\n"); out->Print("protected $name$(ClientBaseConfiguration configuration)" " : base(configuration)\n", "name", GetClientClassName(service)); From ed6ea4c691193483223fdb3a7ada5095b8a2494e Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Wed, 22 Jun 2016 12:38:44 -0700 Subject: [PATCH 1268/1894] regenerate protos --- src/csharp/Grpc.Examples/MathGrpc.cs | 15 +++---- src/csharp/Grpc.HealthCheck/HealthGrpc.cs | 15 +++---- .../Grpc.IntegrationTesting/MetricsGrpc.cs | 15 +++---- .../Grpc.IntegrationTesting/ServicesGrpc.cs | 30 ++++++------- .../Grpc.IntegrationTesting/TestGrpc.cs | 45 +++++++++---------- 5 files changed, 56 insertions(+), 64 deletions(-) diff --git a/src/csharp/Grpc.Examples/MathGrpc.cs b/src/csharp/Grpc.Examples/MathGrpc.cs index 4bbefcbe01a..25abc514195 100644 --- a/src/csharp/Grpc.Examples/MathGrpc.cs +++ b/src/csharp/Grpc.Examples/MathGrpc.cs @@ -128,17 +128,22 @@ namespace Math { /// Client for Math public class MathClient : ClientBase { + /// Creates a new client for Math + /// The channel to use to make remote calls. public MathClient(Channel channel) : base(channel) { } + /// Creates a new client for Math that uses a custom CallInvoker. + /// The callInvoker to use to make remote calls. public MathClient(CallInvoker callInvoker) : base(callInvoker) { } - ///Protected parameterless constructor to allow creation of test doubles. + /// Protected parameterless constructor to allow creation of test doubles. protected MathClient() : base() { } - ///Protected constructor to allow creation of configured clients. + /// Protected constructor to allow creation of configured clients. + /// The client configuration. protected MathClient(ClientBaseConfiguration configuration) : base(configuration) { } @@ -235,12 +240,6 @@ namespace Math { } } - /// Creates a new client for Math - public static MathClient NewClient(Channel channel) - { - return new MathClient(channel); - } - /// Creates service definition that can be registered with a server public static ServerServiceDefinition BindService(MathBase serviceImpl) { diff --git a/src/csharp/Grpc.HealthCheck/HealthGrpc.cs b/src/csharp/Grpc.HealthCheck/HealthGrpc.cs index d0ade7d02be..43eea0f22f5 100644 --- a/src/csharp/Grpc.HealthCheck/HealthGrpc.cs +++ b/src/csharp/Grpc.HealthCheck/HealthGrpc.cs @@ -71,17 +71,22 @@ namespace Grpc.Health.V1 { /// Client for Health public class HealthClient : ClientBase { + /// Creates a new client for Health + /// The channel to use to make remote calls. public HealthClient(Channel channel) : base(channel) { } + /// Creates a new client for Health that uses a custom CallInvoker. + /// The callInvoker to use to make remote calls. public HealthClient(CallInvoker callInvoker) : base(callInvoker) { } - ///Protected parameterless constructor to allow creation of test doubles. + /// Protected parameterless constructor to allow creation of test doubles. protected HealthClient() : base() { } - ///Protected constructor to allow creation of configured clients. + /// Protected constructor to allow creation of configured clients. + /// The client configuration. protected HealthClient(ClientBaseConfiguration configuration) : base(configuration) { } @@ -108,12 +113,6 @@ namespace Grpc.Health.V1 { } } - /// Creates a new client for Health - public static HealthClient NewClient(Channel channel) - { - return new HealthClient(channel); - } - /// Creates service definition that can be registered with a server public static ServerServiceDefinition BindService(HealthBase serviceImpl) { diff --git a/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs b/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs index 22bd27ec0aa..040798e3c21 100644 --- a/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/MetricsGrpc.cs @@ -97,17 +97,22 @@ namespace Grpc.Testing { /// Client for MetricsService public class MetricsServiceClient : ClientBase { + /// Creates a new client for MetricsService + /// The channel to use to make remote calls. public MetricsServiceClient(Channel channel) : base(channel) { } + /// Creates a new client for MetricsService that uses a custom CallInvoker. + /// The callInvoker to use to make remote calls. public MetricsServiceClient(CallInvoker callInvoker) : base(callInvoker) { } - ///Protected parameterless constructor to allow creation of test doubles. + /// Protected parameterless constructor to allow creation of test doubles. protected MetricsServiceClient() : base() { } - ///Protected constructor to allow creation of configured clients. + /// Protected constructor to allow creation of configured clients. + /// The client configuration. protected MetricsServiceClient(ClientBaseConfiguration configuration) : base(configuration) { } @@ -162,12 +167,6 @@ namespace Grpc.Testing { } } - /// Creates a new client for MetricsService - public static MetricsServiceClient NewClient(Channel channel) - { - return new MetricsServiceClient(channel); - } - /// Creates service definition that can be registered with a server public static ServerServiceDefinition BindService(MetricsServiceBase serviceImpl) { diff --git a/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs b/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs index 9c99296115c..e205dea93ea 100644 --- a/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/ServicesGrpc.cs @@ -93,17 +93,22 @@ namespace Grpc.Testing { /// Client for BenchmarkService public class BenchmarkServiceClient : ClientBase { + /// Creates a new client for BenchmarkService + /// The channel to use to make remote calls. public BenchmarkServiceClient(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(CallInvoker callInvoker) : base(callInvoker) { } - ///Protected parameterless constructor to allow creation of test doubles. + /// Protected parameterless constructor to allow creation of test doubles. protected BenchmarkServiceClient() : base() { } - ///Protected constructor to allow creation of configured clients. + /// Protected constructor to allow creation of configured clients. + /// The client configuration. protected BenchmarkServiceClient(ClientBaseConfiguration configuration) : base(configuration) { } @@ -162,12 +167,6 @@ namespace Grpc.Testing { } } - /// Creates a new client for BenchmarkService - public static BenchmarkServiceClient NewClient(Channel channel) - { - return new BenchmarkServiceClient(channel); - } - /// Creates service definition that can be registered with a server public static ServerServiceDefinition BindService(BenchmarkServiceBase serviceImpl) { @@ -273,17 +272,22 @@ namespace Grpc.Testing { /// Client for WorkerService public class WorkerServiceClient : ClientBase { + /// Creates a new client for WorkerService + /// The channel to use to make remote calls. public WorkerServiceClient(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(CallInvoker callInvoker) : base(callInvoker) { } - ///Protected parameterless constructor to allow creation of test doubles. + /// Protected parameterless constructor to allow creation of test doubles. protected WorkerServiceClient() : base() { } - ///Protected constructor to allow creation of configured clients. + /// Protected constructor to allow creation of configured clients. + /// The client configuration. protected WorkerServiceClient(ClientBaseConfiguration configuration) : base(configuration) { } @@ -398,12 +402,6 @@ namespace Grpc.Testing { } } - /// Creates a new client for WorkerService - public static WorkerServiceClient NewClient(Channel channel) - { - return new WorkerServiceClient(channel); - } - /// Creates service definition that can be registered with a server public static ServerServiceDefinition BindService(WorkerServiceBase serviceImpl) { diff --git a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs index 6c252013f84..3e149da3e01 100644 --- a/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs +++ b/src/csharp/Grpc.IntegrationTesting/TestGrpc.cs @@ -168,17 +168,22 @@ namespace Grpc.Testing { /// Client for TestService public class TestServiceClient : ClientBase { + /// Creates a new client for TestService + /// The channel to use to make remote calls. public TestServiceClient(Channel channel) : base(channel) { } + /// Creates a new client for TestService that uses a custom CallInvoker. + /// The callInvoker to use to make remote calls. public TestServiceClient(CallInvoker callInvoker) : base(callInvoker) { } - ///Protected parameterless constructor to allow creation of test doubles. + /// Protected parameterless constructor to allow creation of test doubles. protected TestServiceClient() : base() { } - ///Protected constructor to allow creation of configured clients. + /// Protected constructor to allow creation of configured clients. + /// The client configuration. protected TestServiceClient(ClientBaseConfiguration configuration) : base(configuration) { } @@ -315,12 +320,6 @@ namespace Grpc.Testing { } } - /// Creates a new client for TestService - public static TestServiceClient NewClient(Channel channel) - { - return new TestServiceClient(channel); - } - /// Creates service definition that can be registered with a server public static ServerServiceDefinition BindService(TestServiceBase serviceImpl) { @@ -373,17 +372,22 @@ namespace Grpc.Testing { /// Client for UnimplementedService public class UnimplementedServiceClient : ClientBase { + /// Creates a new client for UnimplementedService + /// The channel to use to make remote calls. public UnimplementedServiceClient(Channel channel) : base(channel) { } + /// Creates a new client for UnimplementedService that uses a custom CallInvoker. + /// The callInvoker to use to make remote calls. public UnimplementedServiceClient(CallInvoker callInvoker) : base(callInvoker) { } - ///Protected parameterless constructor to allow creation of test doubles. + /// Protected parameterless constructor to allow creation of test doubles. protected UnimplementedServiceClient() : base() { } - ///Protected constructor to allow creation of configured clients. + /// Protected constructor to allow creation of configured clients. + /// The client configuration. protected UnimplementedServiceClient(ClientBaseConfiguration configuration) : base(configuration) { } @@ -422,12 +426,6 @@ namespace Grpc.Testing { } } - /// Creates a new client for UnimplementedService - public static UnimplementedServiceClient NewClient(Channel channel) - { - return new UnimplementedServiceClient(channel); - } - /// Creates service definition that can be registered with a server public static ServerServiceDefinition BindService(UnimplementedServiceBase serviceImpl) { @@ -485,17 +483,22 @@ namespace Grpc.Testing { /// Client for ReconnectService public class ReconnectServiceClient : ClientBase { + /// Creates a new client for ReconnectService + /// The channel to use to make remote calls. public ReconnectServiceClient(Channel channel) : base(channel) { } + /// Creates a new client for ReconnectService that uses a custom CallInvoker. + /// The callInvoker to use to make remote calls. public ReconnectServiceClient(CallInvoker callInvoker) : base(callInvoker) { } - ///Protected parameterless constructor to allow creation of test doubles. + /// Protected parameterless constructor to allow creation of test doubles. protected ReconnectServiceClient() : base() { } - ///Protected constructor to allow creation of configured clients. + /// Protected constructor to allow creation of configured clients. + /// The client configuration. protected ReconnectServiceClient(ClientBaseConfiguration configuration) : base(configuration) { } @@ -538,12 +541,6 @@ namespace Grpc.Testing { } } - /// Creates a new client for ReconnectService - public static ReconnectServiceClient NewClient(Channel channel) - { - return new ReconnectServiceClient(channel); - } - /// Creates service definition that can be registered with a server public static ServerServiceDefinition BindService(ReconnectServiceBase serviceImpl) { From 0224dcc2dcda932a171776de325fa2e66c95478f Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Wed, 22 Jun 2016 18:04:00 -0700 Subject: [PATCH 1269/1894] clang format --- src/core/lib/iomgr/ev_epoll_linux.c | 12 ++++++------ src/core/lib/iomgr/ev_posix.h | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 88cbc586349..b1e9ac8a631 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -323,7 +323,7 @@ static void polling_island_add_fds_locked(polling_island *pi, grpc_fd **fds, #ifdef GRPC_TSAN /* See the definition of g_epoll_sync for more context */ - gpr_atm_rel_store(&g_epoll_sync, (gpr_atm) 0); + gpr_atm_rel_store(&g_epoll_sync, (gpr_atm)0); #endif /* defined(GRPC_TSAN) */ for (i = 0; i < fd_count; i++) { @@ -443,8 +443,8 @@ static polling_island *polling_island_create(grpc_fd *initial_fd) { pi->fds = NULL; } - gpr_atm_rel_store(&pi->ref_count, (gpr_atm) 0); - gpr_atm_rel_store(&pi->merged_to, (gpr_atm) NULL); + gpr_atm_rel_store(&pi->ref_count, (gpr_atm)0); + gpr_atm_rel_store(&pi->merged_to, (gpr_atm)NULL); pi->epoll_fd = epoll_create1(EPOLL_CLOEXEC); @@ -473,7 +473,7 @@ static polling_island *polling_island_create(grpc_fd *initial_fd) { static void polling_island_delete(polling_island *pi) { GPR_ASSERT(pi->fd_cnt == 0); - gpr_atm_rel_store(&pi->merged_to, (gpr_atm) NULL); + gpr_atm_rel_store(&pi->merged_to, (gpr_atm)NULL); close(pi->epoll_fd); pi->epoll_fd = -1; @@ -649,7 +649,7 @@ static polling_island *polling_island_merge(polling_island *p, polling_island_add_wakeup_fd_locked(p, &polling_island_wakeup_fd); /* Add the 'merged_to' link from p --> q */ - gpr_atm_rel_store(&p->merged_to, (gpr_atm) q); + gpr_atm_rel_store(&p->merged_to, (gpr_atm)q); PI_ADD_REF(q, "pi_merge"); /* To account for the new incoming ref from p */ gpr_mu_unlock(&p->mu); @@ -811,7 +811,7 @@ static grpc_fd *fd_create(int fd, const char *name) { holding a lock to it anyway. */ gpr_mu_lock(&new_fd->mu); - gpr_atm_rel_store(&new_fd->refst, (gpr_atm) 1); + gpr_atm_rel_store(&new_fd->refst, (gpr_atm)1); new_fd->fd = fd; new_fd->shutdown = false; new_fd->orphaned = false; diff --git a/src/core/lib/iomgr/ev_posix.h b/src/core/lib/iomgr/ev_posix.h index 32260fe2ee5..579c84ef707 100644 --- a/src/core/lib/iomgr/ev_posix.h +++ b/src/core/lib/iomgr/ev_posix.h @@ -100,7 +100,7 @@ void grpc_event_engine_init(void); void grpc_event_engine_shutdown(void); /* Return the name of the poll strategy */ -const char* grpc_get_poll_strategy_name(); +const char *grpc_get_poll_strategy_name(); /* Create a wrapped file descriptor. Requires fd is a non-blocking file descriptor. From aaba1313469440a887ad70be276d8b790e91146a Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 22 Jun 2016 18:10:37 -0700 Subject: [PATCH 1270/1894] finally got rid of external deps to generate the lb response proto --- test/cpp/grpclb/grpclb_test.cc | 102 +++++++++++++++++---------------- 1 file changed, 52 insertions(+), 50 deletions(-) diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index 4805bf024d5..8a366a49284 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -31,8 +31,9 @@ * */ -#include -#include +#include +#include +#include extern "C" { #include @@ -55,8 +56,13 @@ extern "C" { #include "test/core/util/test_config.h" } +#include "src/proto/grpc/lb/v1/load_balancer.pb.h" + #define NUM_BACKENDS 4 +namespace grpc { +namespace { + typedef struct client_fixture { grpc_channel *client; char *server_uri; @@ -86,8 +92,9 @@ static gpr_timespec n_seconds_time(int n) { static void *tag(intptr_t t) { return (void *)t; } -static gpr_slice build_response_payload_slice(const char *host, int *ports, - size_t nports) { +static gpr_slice build_response_payload_slice( + const char *host, int *ports, size_t nports, + int64_t expiration_interval_secs, int32_t expiration_interval_nanos) { /* server_list { servers { @@ -97,45 +104,30 @@ static gpr_slice build_response_payload_slice(const char *host, int *ports, } ... } */ - char **hostports_vec = - static_cast(gpr_malloc(sizeof(char *) * nports)); - for (size_t i = 0; i < nports; i++) { - gpr_join_host_port(&hostports_vec[i], "127.0.0.1", ports[i]); - } - char *hostports_str = - gpr_strjoin_sep((const char **)hostports_vec, nports, " ", NULL); - gpr_log(GPR_INFO, "generating response for %s", hostports_str); - - char *output_fname; - FILE *tmpfd = gpr_tmpfile("grpclb_test", &output_fname); - fclose(tmpfd); - char *cmdline; - gpr_asprintf(&cmdline, - "./tools/codegen/core/gen_grpclb_test_response.py --lb_proto " - "src/proto/grpc/lb/v1/load_balancer.proto %s " - "--output %s --quiet", - hostports_str, output_fname); - GPR_ASSERT(system(cmdline) == 0); - FILE *f = fopen(output_fname, "rb"); - fseek(f, 0, SEEK_END); - const size_t fsize = (size_t)ftell(f); - rewind(f); - - char *serialized_response = static_cast(gpr_malloc(fsize)); - GPR_ASSERT(fread(serialized_response, fsize, 1, f) == 1); - fclose(f); - gpr_free(output_fname); - gpr_free(cmdline); + grpc::lb::v1::LoadBalanceResponse response; + auto *serverlist = response.mutable_server_list(); + if (expiration_interval_secs > 0 || expiration_interval_nanos > 0) { + auto *expiration_interval = serverlist->mutable_expiration_interval(); + if (expiration_interval_secs > 0) { + expiration_interval->set_seconds(expiration_interval_secs); + } + if (expiration_interval_nanos > 0) { + expiration_interval->set_nanos(expiration_interval_nanos); + } + } for (size_t i = 0; i < nports; i++) { - gpr_free(hostports_vec[i]); + auto *server = serverlist->add_servers(); + server->set_ip_address(host); + server->set_port(ports[i]); + server->set_load_balance_token("token" + std::to_string(ports[i])); } - gpr_free(hostports_vec); - gpr_free(hostports_str); + + gpr_log(GPR_INFO, "generating response: %s", + response.ShortDebugString().c_str()); const gpr_slice response_slice = - gpr_slice_from_copied_buffer(serialized_response, fsize); - gpr_free(serialized_response); + gpr_slice_from_copied_string(response.SerializeAsString().c_str()); return response_slice; } @@ -211,12 +203,13 @@ static void start_lb_server(server_fixture *sf, int *ports, size_t nports, if (i == 0) { // First half of the ports. response_payload_slice = - build_response_payload_slice("127.0.0.1", ports, nports / 2); + build_response_payload_slice("127.0.0.1", ports, nports / 2, -1, -1); } else { // Second half of the ports. sleep_ms(update_delay_ms); - response_payload_slice = build_response_payload_slice( - "127.0.0.1", ports + (nports / 2), (nports + 1) / 2 /* ceil */); + response_payload_slice = + build_response_payload_slice("127.0.0.1", ports + (nports / 2), + (nports + 1) / 2 /* ceil */, -1, -1); } response_payload = grpc_raw_byte_buffer_create(&response_payload_slice, 1); @@ -606,11 +599,16 @@ static void teardown_test_fixture(test_fixture *tf) { teardown_server(&tf->lb_server); } -// The LB server will send two updates: batch 1 and batch 2. Each batch contains -// two addresses, both of a valid and running backend server. Batch 1 is readily -// available and provided as soon as the client establishes the streaming call. -// Batch 2 is sent after a delay of \a lb_server_update_delay_ms milliseconds. +// The LB server will send two updates: batch 1 and batch 2. Each batch +// contains +// two addresses, both of a valid and running backend server. Batch 1 is +// readily +// available and provided as soon as the client establishes the streaming +// call. +// Batch 2 is sent after a delay of \a lb_server_update_delay_ms +// milliseconds. static test_fixture test_update(int lb_server_update_delay_ms) { + gpr_log(GPR_INFO, "start %s(%d)", __func__, lb_server_update_delay_ms); test_fixture tf; memset(&tf, 0, sizeof(tf)); setup_test_fixture(&tf, lb_server_update_delay_ms); @@ -625,14 +623,18 @@ static test_fixture test_update(int lb_server_update_delay_ms) { &tf.client); // "consumes" 2nd backend server of 2nd serverlist teardown_test_fixture(&tf); + gpr_log(GPR_INFO, "end %s(%d)", __func__, lb_server_update_delay_ms); return tf; } +} // namespace +} // namespace grpc + int main(int argc, char **argv) { grpc_test_init(argc, argv); grpc_init(); - test_fixture tf_result; + grpc::test_fixture tf_result; // Clients take a bit over one second to complete a call (the last part of the // call sleeps for 1 second while verifying the client's completion queue is // empty). Therefore: @@ -641,7 +643,7 @@ int main(int argc, char **argv) { // before the first client request is done, skipping the second server from // batch 1 altogether: the 2nd client request will go to the 1st server of // batch 2 (ie, the third one out of the four total servers). - tf_result = test_update(800); + tf_result = grpc::test_update(800); GPR_ASSERT(tf_result.lb_backends[0].num_calls_serviced == 1); GPR_ASSERT(tf_result.lb_backends[1].num_calls_serviced == 0); GPR_ASSERT(tf_result.lb_backends[2].num_calls_serviced == 2); @@ -650,17 +652,17 @@ int main(int argc, char **argv) { // If the LB server waits 1500ms, the update arrives after having picked the // 2nd server from batch 1 but before the next pick for the first server of // batch 2. All server are used. - tf_result = test_update(1500); + tf_result = grpc::test_update(1500); GPR_ASSERT(tf_result.lb_backends[0].num_calls_serviced == 1); GPR_ASSERT(tf_result.lb_backends[1].num_calls_serviced == 1); GPR_ASSERT(tf_result.lb_backends[2].num_calls_serviced == 1); GPR_ASSERT(tf_result.lb_backends[3].num_calls_serviced == 1); - // If the LB server waits >= 2000ms, the update arrives after the first two + // If the LB server waits > 2000ms, the update arrives after the first two // request are done and the third pick is performed, which returns, in RR // fashion, the 1st server of the 1st update. Therefore, the second server of // batch 1 is hit twice, whereas the first server of batch 2 is never hit. - tf_result = test_update(2000); + tf_result = grpc::test_update(2100); GPR_ASSERT(tf_result.lb_backends[0].num_calls_serviced == 2); GPR_ASSERT(tf_result.lb_backends[1].num_calls_serviced == 1); GPR_ASSERT(tf_result.lb_backends[2].num_calls_serviced == 1); From 86a00a67c40ff1f4d574d08a8b8421af3cf38e7a Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 22 Jun 2016 18:10:55 -0700 Subject: [PATCH 1271/1894] regenerated projects --- Makefile | 3 +++ src/node/tools/package.json | 1 - .../vcxproj/grpc_test_util/grpc_test_util.vcxproj | 6 ++++++ .../grpc_test_util/grpc_test_util.vcxproj.filters | 12 ++++++++++++ 4 files changed, 21 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c21c24d422d..385330cc74c 100644 --- a/Makefile +++ b/Makefile @@ -1493,6 +1493,7 @@ buildtests_cxx: buildtests_zookeeper privatelibs_cxx \ $(BINDIR)/$(CONFIG)/golden_file_test \ $(BINDIR)/$(CONFIG)/grpc_cli \ $(BINDIR)/$(CONFIG)/grpclb_api_test \ + $(BINDIR)/$(CONFIG)/grpclb_test \ $(BINDIR)/$(CONFIG)/hybrid_end2end_test \ $(BINDIR)/$(CONFIG)/interop_client \ $(BINDIR)/$(CONFIG)/interop_server \ @@ -3101,6 +3102,7 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/iomgr/endpoint.c \ src/core/lib/iomgr/endpoint_pair_posix.c \ src/core/lib/iomgr/endpoint_pair_windows.c \ + src/core/lib/iomgr/error.c \ src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ src/core/lib/iomgr/ev_poll_posix.c \ src/core/lib/iomgr/ev_posix.c \ @@ -3110,6 +3112,7 @@ LIBGRPC_TEST_UTIL_SRC = \ src/core/lib/iomgr/iomgr.c \ src/core/lib/iomgr/iomgr_posix.c \ src/core/lib/iomgr/iomgr_windows.c \ + src/core/lib/iomgr/load_file.c \ src/core/lib/iomgr/polling_entity.c \ src/core/lib/iomgr/pollset_set_windows.c \ src/core/lib/iomgr/pollset_windows.c \ diff --git a/src/node/tools/package.json b/src/node/tools/package.json index c34b259e2e0..d4849c2e388 100644 --- a/src/node/tools/package.json +++ b/src/node/tools/package.json @@ -34,7 +34,6 @@ "index.js", "bin/protoc.js", "bin/protoc_plugin.js", - "bin/google/protobuf", "LICENSE" ], "main": "index.js" diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj index fd37c566921..17e6876830e 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj @@ -206,6 +206,7 @@ + @@ -215,6 +216,7 @@ + @@ -334,6 +336,8 @@ + + @@ -352,6 +356,8 @@ + + diff --git a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters index f04c6ea773c..bb30a294e80 100644 --- a/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_test_util/grpc_test_util.vcxproj.filters @@ -103,6 +103,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -130,6 +133,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -476,6 +482,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr @@ -503,6 +512,9 @@ src\core\lib\iomgr + + src\core\lib\iomgr + src\core\lib\iomgr From d84cec7380cbc264cb1b620ebd39c3099b6cbe12 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 22 Jun 2016 18:15:01 -0700 Subject: [PATCH 1272/1894] removed unnecessary lb response generator --- .../codegen/core/gen_grpclb_test_response.py | 97 ------------------- 1 file changed, 97 deletions(-) delete mode 100755 tools/codegen/core/gen_grpclb_test_response.py diff --git a/tools/codegen/core/gen_grpclb_test_response.py b/tools/codegen/core/gen_grpclb_test_response.py deleted file mode 100755 index 4535efc738c..00000000000 --- a/tools/codegen/core/gen_grpclb_test_response.py +++ /dev/null @@ -1,97 +0,0 @@ -#!/usr/bin/env python2.7 - -# Copyright 2015-2016, Google Inc. -# All rights reserved. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are -# met: -# -# * Redistributions of source code must retain the above copyright -# notice, this list of conditions and the following disclaimer. -# * Redistributions in binary form must reproduce the above -# copyright notice, this list of conditions and the following disclaimer -# in the documentation and/or other materials provided with the -# distribution. -# * Neither the name of Google Inc. nor the names of its -# contributors may be used to endorse or promote products derived from -# this software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -from __future__ import print_function -import argparse -import subprocess -import sys -import os.path -import sys -import tempfile -import importlib - -# Example: tools/codegen/core/gen_grpclb_test_response.py \ -# --lb_proto src/proto/grpc/lb/v1/load_balancer.proto \ -# 127.0.0.1:1234 10.0.0.1:4321 - -# 1) Compile src/proto/grpc/lb/v1/load_balancer.proto to a temp location -parser = argparse.ArgumentParser() -parser.add_argument('--lb_proto', required=True) -parser.add_argument('-e', '--expiration_interval_secs', type=int) -parser.add_argument('-o', '--output') -parser.add_argument('-q', '--quiet', default=False, action='store_true') -parser.add_argument('ipports', nargs='+') -args = parser.parse_args() - -if not os.path.isfile(args.lb_proto): - print("ERROR: file '{}' cannot be accessed (not found, no permissions, etc.)" - .format(args.lb_proto), file=sys.stderr) - sys.exit(1) - -proto_dirname = os.path.dirname(args.lb_proto) -output_dir = tempfile.mkdtemp() - -protoc_cmd = 'protoc -I{} --python_out={} {}'.format( - proto_dirname, output_dir, args.lb_proto) - -with tempfile.TemporaryFile() as stderr_tmpfile: - if subprocess.call(protoc_cmd, stderr=stderr_tmpfile, shell=True) != 0: - stderr_tmpfile.seek(0) - print("ERROR: while running '{}': {}". - format(protoc_cmd, stderr_tmpfile.read())) - sys.exit(2) - -# 2) import the output .py file. -module_name = os.path.splitext(os.path.basename(args.lb_proto))[0] + '_pb2' -sys.path.append(output_dir) -pb_module = importlib.import_module(module_name) - -# 3) Generate! -lb_response = pb_module.LoadBalanceResponse() -if args.expiration_interval_secs: - lb_response.server_list.expiration_interval.seconds = \ - args.expiration_interval_secs - -for ipport in args.ipports: - ip, port = ipport.split(':') - server = lb_response.server_list.servers.add() - server.ip_address = ip - server.port = int(port) - server.load_balance_token = b'token{}'.format(port) - -serialized_bytes = lb_response.SerializeToString() -serialized_hex = ''.join('\\x{:02x}'.format(ord(c)) for c in serialized_bytes) -if args.output: - with open(args.output, 'w') as f: - f.write(serialized_bytes) -if not args.quiet: - print(str(lb_response)) - print(serialized_hex) From f9f856bb890246d39e6f8d25a664269b8d10f8e6 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 22 Jun 2016 18:25:53 -0700 Subject: [PATCH 1273/1894] Added todos for more grpclb tests. --- test/cpp/grpclb/grpclb_test.cc | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/test/cpp/grpclb/grpclb_test.cc b/test/cpp/grpclb/grpclb_test.cc index 8a366a49284..faf8d878848 100644 --- a/test/cpp/grpclb/grpclb_test.cc +++ b/test/cpp/grpclb/grpclb_test.cc @@ -60,6 +60,11 @@ extern "C" { #define NUM_BACKENDS 4 +// TODO(dgq): Other scenarios in need of testing: +// - Send identical serverlist update +// - Test reception of invalid serverlist +// - Test pinging + namespace grpc { namespace { @@ -95,15 +100,14 @@ static void *tag(intptr_t t) { return (void *)t; } static gpr_slice build_response_payload_slice( const char *host, int *ports, size_t nports, int64_t expiration_interval_secs, int32_t expiration_interval_nanos) { - /* - server_list { - servers { - ip_address: "127.0.0.1" - port: ... - load_balance_token: "token..." - } - ... - } */ + // server_list { + // servers { + // ip_address: "127.0.0.1" + // port: ... + // load_balance_token: "token..." + // } + // ... + // } grpc::lb::v1::LoadBalanceResponse response; auto *serverlist = response.mutable_server_list(); @@ -184,7 +188,7 @@ static void start_lb_server(server_fixture *sf, int *ports, size_t nports, GPR_ASSERT(GRPC_CALL_OK == error); gpr_log(GPR_INFO, "LB Server[%s] after tag 201", sf->servers_hostport); - /* receive request for backends */ + // receive request for backends op = ops; op->op = GRPC_OP_RECV_MESSAGE; op->data.recv_message = &request_payload_recv; From cc00745e8c6e160665e753c9fda6bf2650b1823d Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 23 Jun 2016 00:18:15 -0700 Subject: [PATCH 1274/1894] brought spec up to date --- doc/compression.md | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/doc/compression.md b/doc/compression.md index 15fae4d29bf..9229ef9af10 100644 --- a/doc/compression.md +++ b/doc/compression.md @@ -42,13 +42,13 @@ and RPC settings (for example, if compression would result in small or negative gains). When a message from a client compressed with an unsupported algorithm is -processed by a server, it WILL result in an INVALID\_ARGUMENT error on the +processed by a server, it WILL result in a `UNIMPLEMENTED` error status on the server. The server will then include in its response a `grpc-accept-encoding` -header specifying the algorithms it does accept. If an INTERNAL error is -returned from the server despite having used one of the algorithms from the -`grpc-accept-encoding` header, the cause MUST NOT be related to compression. -Data sent from a server compressed with an algorithm not supported by the client -WILL result in an INTERNAL error on the client side. +header specifying the algorithms it does accept. If an `UNIMPLEMENTED` error +status is returned from the server despite having used one of the algorithms +from the `grpc-accept-encoding` header, the cause MUST NOT be related to +compression. Data sent from a server compressed with an algorithm not supported +by the client WILL result in an `INTERNAL` error status on the client side. Note that a peer MAY choose to not disclose all the encodings it supports. However, if it receives a message compressed in an undisclosed but supported @@ -99,13 +99,20 @@ compressed. channel compression configuration MUST be used. 1. When a compression method (including no compression) is specified for an outgoing message, the message MUST be compressed accordingly. -1. A message compressed in a way not supported by its endpoint MUST fail with -INVALID\_ARGUMENT status, its associated description indicating the unsupported -condition as well as the supported ones. The returned `grpc-accept-encoding` -header MUST NOT contain the compression method (encoding) used. +1. A message compressed by a client in a way not supported by its server MUST +fail with status `UNIMPLEMENTED`, its associated description indicating the +unsupported condition as well as the supported ones. The returned +`grpc-accept-encoding` header MUST NOT contain the compression method +(encoding) used. +1. A message compressed by a server in a way not supported by its client MUST +fail with status `INTERNAL`, its associated description indicating the +unsupported condition as well as the supported ones. The returned +`grpc-accept-encoding` header MUST NOT contain the compression method +(encoding) used. 1. An ill-constructed message with its [Compressed-Flag bit](PROTOCOL-HTTP2.md#compressed-flag) set but lacking a "[grpc-encoding](PROTOCOL-HTTP2.md#message-encoding)" -entry different from _identity_ in its metadata MUST fail with INTERNAL status, -its associated description indicating the invalid Compressed-Flag condition. +entry different from _identity_ in its metadata MUST fail with `INTERNAL` +status, its associated description indicating the invalid Compressed-Flag +condition. From c9b7ad0c0a541ac7559bb7081c260de195fe8315 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Thu, 23 Jun 2016 02:38:20 -0700 Subject: [PATCH 1275/1894] Updated grpcio c extension build for windows to use mingw. The default compiler for Python c extensions is VS2008 or VS2010 depending on the Python version. Since c-core moved onto the c99 standard, these compilers are not compatible. --- tools/run_tests/build_artifact_python.bat | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/tools/run_tests/build_artifact_python.bat b/tools/run_tests/build_artifact_python.bat index fea0275426f..295347e947c 100644 --- a/tools/run_tests/build_artifact_python.bat +++ b/tools/run_tests/build_artifact_python.bat @@ -37,10 +37,11 @@ set NUGET=C:\nuget\nuget.exe mkdir src\python\grpcio\grpc\_cython\_windows +@rem TODO(atash): maybe we could avoid the grpc_c.(32|64).python shim below if +@rem this used the right python build? copy /Y vsprojects\Release\grpc_dll.dll src\python\grpcio\grpc\_cython\_windows\grpc_c.32.python || goto :error copy /Y vsprojects\x64\Release\grpc_dll.dll src\python\grpcio\grpc\_cython\_windows\grpc_c.64.python || goto :error - set PATH=C:\%1;C:\%1\scripts;C:\msys64\mingw%2\bin;%PATH% pip install --upgrade six @@ -50,12 +51,6 @@ pip install -rrequirements.txt set GRPC_PYTHON_USE_CUSTOM_BDIST=0 set GRPC_PYTHON_BUILD_WITH_CYTHON=1 -@rem TODO(atash): maybe we could avoid the grpc_c.(32|64).python shim above if -@rem this used the right python build? -python setup.py bdist_wheel - -@rem Build gRPC Python tools -@rem @rem Because this is windows and *everything seems to hate Windows* we have to @rem set all of these flags ourselves because Python won't help us (see the @rem setup.py of the grpcio_tools project). @@ -70,6 +65,18 @@ set GRPC_PYTHON_CFLAGS=-fno-wrapv -frtti -std=c++11 python -c "from distutils.cygwinccompiler import get_msvcr; print(get_msvcr()[0])" > temp.txt set /p PYTHON_MSVCR= Date: Thu, 23 Jun 2016 08:22:30 -0700 Subject: [PATCH 1276/1894] Re-enable accidentally disabled traces --- src/core/lib/iomgr/tcp_posix.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 017f52c3677..1046b60bcc9 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -160,7 +160,7 @@ static void call_read_cb(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, grpc_error *error) { grpc_closure *cb = tcp->read_cb; - if (false && grpc_tcp_trace) { + if (grpc_tcp_trace) { size_t i; const char *str = grpc_error_string(error); gpr_log(GPR_DEBUG, "read: error=%s", str); @@ -394,7 +394,7 @@ static void tcp_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, grpc_tcp *tcp = (grpc_tcp *)ep; grpc_error *error = GRPC_ERROR_NONE; - if (false && grpc_tcp_trace) { + if (grpc_tcp_trace) { size_t i; for (i = 0; i < buf->count; i++) { From 0badbe8b119c7375dfb0f8e6f853180009a2ffb7 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 23 Jun 2016 10:15:12 -0700 Subject: [PATCH 1277/1894] Change grpc_channel_filter init_call_elem() method to return grpc_error. --- src/core/ext/census/grpc_filter.c | 14 ++++++++------ src/core/ext/client_config/client_channel.c | 6 ++++-- src/core/ext/client_config/subchannel.c | 7 +++++-- .../load_reporting/load_reporting_filter.c | 6 ++++-- src/core/lib/channel/channel_stack.c | 19 ++++++++++++------- src/core/lib/channel/channel_stack.h | 18 ++++++++++-------- src/core/lib/channel/compress_filter.c | 7 +++++-- src/core/lib/channel/connected_channel.c | 13 +++++++------ src/core/lib/channel/http_client_filter.c | 6 ++++-- src/core/lib/channel/http_server_filter.c | 6 ++++-- .../security/transport/client_auth_filter.c | 6 ++++-- .../security/transport/server_auth_filter.c | 7 +++++-- src/core/lib/surface/call.c | 9 ++++++--- src/core/lib/surface/lame_client.c | 7 +++++-- src/core/lib/surface/server.c | 6 ++++-- test/core/channel/channel_stack_test.c | 12 ++++++++---- test/core/end2end/tests/filter_causes_close.c | 7 +++++-- 17 files changed, 100 insertions(+), 56 deletions(-) diff --git a/src/core/ext/census/grpc_filter.c b/src/core/ext/census/grpc_filter.c index 72e4e5427eb..dd2e2e01244 100644 --- a/src/core/ext/census/grpc_filter.c +++ b/src/core/ext/census/grpc_filter.c @@ -124,13 +124,14 @@ static void server_start_transport_op(grpc_exec_ctx *exec_ctx, grpc_call_next_op(exec_ctx, elem, op); } -static void client_init_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem, - grpc_call_element_args *args) { +static grpc_error* client_init_call_elem(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_call_element_args *args) { call_data *d = elem->call_data; GPR_ASSERT(d != NULL); memset(d, 0, sizeof(*d)); d->start_ts = gpr_now(GPR_CLOCK_REALTIME); + return GRPC_ERROR_NONE; } static void client_destroy_call_elem(grpc_exec_ctx *exec_ctx, @@ -142,15 +143,16 @@ static void client_destroy_call_elem(grpc_exec_ctx *exec_ctx, /* TODO(hongyu): record rpc client stats and census_rpc_end_op here */ } -static void server_init_call_elem(grpc_exec_ctx *exec_ctx, - grpc_call_element *elem, - grpc_call_element_args *args) { +static grpc_error* server_init_call_elem(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_call_element_args *args) { call_data *d = elem->call_data; GPR_ASSERT(d != NULL); memset(d, 0, sizeof(*d)); d->start_ts = gpr_now(GPR_CLOCK_REALTIME); /* TODO(hongyu): call census_tracing_start_op here. */ grpc_closure_init(&d->finish_recv, server_on_done_recv, elem); + return GRPC_ERROR_NONE; } static void server_destroy_call_elem(grpc_exec_ctx *exec_ctx, diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index 1d5a7d52246..b0a09dab932 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -430,10 +430,12 @@ static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *elemp, } /* Constructor for call_data */ -static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_call_element_args *args) { +static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_call_element_args *args) { grpc_subchannel_call_holder_init(elem->call_data, cc_pick_subchannel, elem, args->call_stack); + return GRPC_ERROR_NONE; } /* Destructor for call_data */ diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c index 468067ea57c..2e9cf7d7d4e 100644 --- a/src/core/ext/client_config/subchannel.c +++ b/src/core/ext/client_config/subchannel.c @@ -709,8 +709,11 @@ grpc_subchannel_call *grpc_connected_subchannel_create_call( grpc_call_stack *callstk = SUBCHANNEL_CALL_TO_CALL_STACK(call); call->connection = con; GRPC_CONNECTED_SUBCHANNEL_REF(con, "subchannel_call"); - grpc_call_stack_init(exec_ctx, chanstk, 1, subchannel_call_destroy, call, - NULL, NULL, callstk); + grpc_error* error = grpc_call_stack_init(exec_ctx, chanstk, 1, + subchannel_call_destroy, call, + NULL, NULL, callstk); +// FIXME: handle error (probably requires changing this function's API) +GPR_ASSERT(error == GRPC_ERROR_NONE); grpc_call_stack_set_pollset_or_pollset_set(exec_ctx, callstk, pollent); return call; } diff --git a/src/core/ext/load_reporting/load_reporting_filter.c b/src/core/ext/load_reporting/load_reporting_filter.c index f372f88c3a6..cfe752d6e2b 100644 --- a/src/core/ext/load_reporting/load_reporting_filter.c +++ b/src/core/ext/load_reporting/load_reporting_filter.c @@ -56,10 +56,12 @@ static void invoke_lr_fn_locked(grpc_load_reporting_config *lrc, } /* Constructor for call_data */ -static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_call_element_args *args) { +static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_call_element_args *args) { call_data *calld = elem->call_data; memset(calld, 0, sizeof(call_data)); + return GRPC_ERROR_NONE; } /* Destructor for call_data */ diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index bbba85d80ba..0613f94c299 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -157,12 +157,13 @@ void grpc_channel_stack_destroy(grpc_exec_ctx *exec_ctx, } } -void grpc_call_stack_init(grpc_exec_ctx *exec_ctx, - grpc_channel_stack *channel_stack, int initial_refs, - grpc_iomgr_cb_func destroy, void *destroy_arg, - grpc_call_context_element *context, - const void *transport_server_data, - grpc_call_stack *call_stack) { +grpc_error* grpc_call_stack_init(grpc_exec_ctx *exec_ctx, + grpc_channel_stack *channel_stack, + int initial_refs, grpc_iomgr_cb_func destroy, + void *destroy_arg, + grpc_call_context_element *context, + const void *transport_server_data, + grpc_call_stack *call_stack) { grpc_channel_element *channel_elems = CHANNEL_ELEMS_FROM_STACK(channel_stack); grpc_call_element_args args; size_t count = channel_stack->count; @@ -185,10 +186,14 @@ void grpc_call_stack_init(grpc_exec_ctx *exec_ctx, call_elems[i].filter = channel_elems[i].filter; call_elems[i].channel_data = channel_elems[i].channel_data; call_elems[i].call_data = user_data; - call_elems[i].filter->init_call_elem(exec_ctx, &call_elems[i], &args); + grpc_error* error = call_elems[i].filter->init_call_elem( + exec_ctx, &call_elems[i], &args); + if (error != GRPC_ERROR_NONE) + return error; user_data += ROUND_UP_TO_ALIGNMENT_SIZE(call_elems[i].filter->sizeof_call_data); } + return GRPC_ERROR_NONE; } void grpc_call_stack_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index 41dd4a0d8a1..f56c6540674 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -110,8 +110,9 @@ typedef struct { on a client; if it is non-NULL, then it points to memory owned by the transport and is on the server. Most filters want to ignore this argument. */ - void (*init_call_elem)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_call_element_args *args); + grpc_error* (*init_call_elem)(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_call_element_args *args); void (*set_pollset_or_pollset_set)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_polling_entity *pollent); @@ -209,12 +210,13 @@ void grpc_channel_stack_destroy(grpc_exec_ctx *exec_ctx, /* Initialize a call stack given a channel stack. transport_server_data is expected to be NULL on a client, or an opaque transport owned pointer on the server. */ -void grpc_call_stack_init(grpc_exec_ctx *exec_ctx, - grpc_channel_stack *channel_stack, int initial_refs, - grpc_iomgr_cb_func destroy, void *destroy_arg, - grpc_call_context_element *context, - const void *transport_server_data, - grpc_call_stack *call_stack); +grpc_error* grpc_call_stack_init(grpc_exec_ctx *exec_ctx, + grpc_channel_stack *channel_stack, + int initial_refs, grpc_iomgr_cb_func destroy, + void *destroy_arg, + grpc_call_context_element *context, + const void *transport_server_data, + grpc_call_stack *call_stack); /* Set a pollset or a pollset_set for a call stack: must occur before the first * op is started */ void grpc_call_stack_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index 32ebe53ee64..bcc8e17a9db 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -256,8 +256,9 @@ static void compress_start_transport_stream_op(grpc_exec_ctx *exec_ctx, } /* Constructor for call_data */ -static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_call_element_args *args) { +static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_call_element_args *args) { /* grab pointers to our data from the call element */ call_data *calld = elem->call_data; @@ -266,6 +267,8 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, calld->has_compression_algorithm = 0; grpc_closure_init(&calld->got_slice, got_slice, elem); grpc_closure_init(&calld->send_done, send_done, elem); + + return GRPC_ERROR_NONE; } /* Destructor for call_data */ diff --git a/src/core/lib/channel/connected_channel.c b/src/core/lib/channel/connected_channel.c index 0a7d27a1dc5..8dde688df2c 100644 --- a/src/core/lib/channel/connected_channel.c +++ b/src/core/lib/channel/connected_channel.c @@ -81,16 +81,17 @@ static void con_start_transport_op(grpc_exec_ctx *exec_ctx, } /* Constructor for call_data */ -static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_call_element_args *args) { +static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_call_element_args *args) { call_data *calld = elem->call_data; channel_data *chand = elem->channel_data; - int r; - - r = grpc_transport_init_stream( + int r = grpc_transport_init_stream( exec_ctx, chand->transport, TRANSPORT_STREAM_FROM_CALL_DATA(calld), &args->call_stack->refcount, args->server_transport_data); - GPR_ASSERT(r == 0); + return r == 0 + ? GRPC_ERROR_NONE + : GRPC_ERROR_CREATE("transport initialization failed"); } static void set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c index ab6c6c9ef00..30f4ed1f6fc 100644 --- a/src/core/lib/channel/http_client_filter.c +++ b/src/core/lib/channel/http_client_filter.c @@ -169,11 +169,13 @@ static void hc_start_transport_op(grpc_exec_ctx *exec_ctx, } /* Constructor for call_data */ -static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_call_element_args *args) { +static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_call_element_args *args) { call_data *calld = elem->call_data; calld->on_done_recv = NULL; grpc_closure_init(&calld->hc_on_recv, hc_on_recv, elem); + return GRPC_ERROR_NONE; } /* Destructor for call_data */ diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index d0beebd817f..960d1ce45e5 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -224,13 +224,15 @@ static void hs_start_transport_op(grpc_exec_ctx *exec_ctx, } /* Constructor for call_data */ -static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_call_element_args *args) { +static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_call_element_args *args) { /* grab pointers to our data from the call element */ call_data *calld = elem->call_data; /* initialize members */ memset(calld, 0, sizeof(*calld)); grpc_closure_init(&calld->hs_on_recv, hs_on_recv, elem); + return GRPC_ERROR_NONE; } /* Destructor for call_data */ diff --git a/src/core/lib/security/transport/client_auth_filter.c b/src/core/lib/security/transport/client_auth_filter.c index 76be2acd728..6179b9e18cf 100644 --- a/src/core/lib/security/transport/client_auth_filter.c +++ b/src/core/lib/security/transport/client_auth_filter.c @@ -264,10 +264,12 @@ static void auth_start_transport_op(grpc_exec_ctx *exec_ctx, } /* Constructor for call_data */ -static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_call_element_args *args) { +static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_call_element_args *args) { call_data *calld = elem->call_data; memset(calld, 0, sizeof(*calld)); + return GRPC_ERROR_NONE; } static void set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/security/transport/server_auth_filter.c b/src/core/lib/security/transport/server_auth_filter.c index 12e789bde92..379247131b6 100644 --- a/src/core/lib/security/transport/server_auth_filter.c +++ b/src/core/lib/security/transport/server_auth_filter.c @@ -199,8 +199,9 @@ static void auth_start_transport_op(grpc_exec_ctx *exec_ctx, } /* Constructor for call_data */ -static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_call_element_args *args) { +static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_call_element_args *args) { /* grab pointers to our data from the call element */ call_data *calld = elem->call_data; channel_data *chand = elem->channel_data; @@ -222,6 +223,8 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, args->context[GRPC_CONTEXT_SECURITY].value = server_ctx; args->context[GRPC_CONTEXT_SECURITY].destroy = grpc_server_security_context_destroy; + + return GRPC_ERROR_NONE; } /* Destructor for call_data */ diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 04291b0ee0a..d64ca64a15f 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -262,9 +262,12 @@ grpc_call *grpc_call_create( call->send_deadline = send_deadline; GRPC_CHANNEL_INTERNAL_REF(channel, "call"); /* initial refcount dropped by grpc_call_destroy */ - grpc_call_stack_init(&exec_ctx, channel_stack, 1, destroy_call, call, - call->context, server_transport_data, - CALL_STACK_FROM_CALL(call)); + grpc_error* error = grpc_call_stack_init(&exec_ctx, channel_stack, 1, + destroy_call, call, call->context, + server_transport_data, + CALL_STACK_FROM_CALL(call)); +// FIXME: handle error (probably requires changing this function's API) +GPR_ASSERT(error == GRPC_ERROR_NONE); if (cq != NULL) { GPR_ASSERT( pollset_set_alternative == NULL && diff --git a/src/core/lib/surface/lame_client.c b/src/core/lib/surface/lame_client.c index 5ea4cba5d1a..7d9168f2e0b 100644 --- a/src/core/lib/surface/lame_client.c +++ b/src/core/lib/surface/lame_client.c @@ -107,8 +107,11 @@ static void lame_start_transport_op(grpc_exec_ctx *exec_ctx, GRPC_ERROR_UNREF(op->disconnect_with_error); } -static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_call_element_args *args) {} +static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_call_element_args *args) { + return GRPC_ERROR_NONE; +} static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, const grpc_call_stats *stats, diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index def6e5068b0..0a0c224b4d6 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -848,8 +848,9 @@ static void channel_connectivity_changed(grpc_exec_ctx *exec_ctx, void *cd, } } -static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_call_element_args *args) { +static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_call_element_args *args) { call_data *calld = elem->call_data; channel_data *chand = elem->channel_data; memset(calld, 0, sizeof(call_data)); @@ -861,6 +862,7 @@ static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, server_on_recv_initial_metadata, elem); server_ref(chand->server); + return GRPC_ERROR_NONE; } static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, diff --git a/test/core/channel/channel_stack_test.c b/test/core/channel/channel_stack_test.c index f9561bed707..9c6a47eb520 100644 --- a/test/core/channel/channel_stack_test.c +++ b/test/core/channel/channel_stack_test.c @@ -53,10 +53,12 @@ static void channel_init_func(grpc_exec_ctx *exec_ctx, *(int *)(elem->channel_data) = 0; } -static void call_init_func(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_call_element_args *args) { +static grpc_error* call_init_func(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_call_element_args *args) { ++*(int *)(elem->channel_data); *(int *)(elem->call_data) = 0; + return GRPC_ERROR_NONE; } static void channel_destroy_func(grpc_exec_ctx *exec_ctx, @@ -132,8 +134,10 @@ static void test_create_channel_stack(void) { GPR_ASSERT(*channel_data == 0); call_stack = gpr_malloc(channel_stack->call_stack_size); - grpc_call_stack_init(&exec_ctx, channel_stack, 1, free_call, call_stack, NULL, - NULL, call_stack); + grpc_error* error = grpc_call_stack_init(&exec_ctx, channel_stack, 1, + free_call, call_stack, NULL, NULL, + call_stack); + GPR_ASSERT(error == GRPC_ERROR_NONE); GPR_ASSERT(call_stack->count == 1); call_elem = grpc_call_stack_element(call_stack, 0); GPR_ASSERT(call_elem->filter == channel_elem->filter); diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c index 526c05ca3e8..3ff0abed637 100644 --- a/test/core/end2end/tests/filter_causes_close.c +++ b/test/core/end2end/tests/filter_causes_close.c @@ -233,8 +233,11 @@ static void start_transport_stream_op(grpc_exec_ctx *exec_ctx, grpc_call_next_op(exec_ctx, elem, op); } -static void init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, - grpc_call_element_args *args) {} +static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_call_element_args *args) { + return GRPC_ERROR_NONE; +} static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, const grpc_call_stats *stats, From 75f6828636a432ff32435ac06a6121b8396c67fd Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 23 Jun 2016 10:16:16 -0700 Subject: [PATCH 1278/1894] Fixed typo --- doc/compression.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/compression.md b/doc/compression.md index 9229ef9af10..de245d90fee 100644 --- a/doc/compression.md +++ b/doc/compression.md @@ -42,7 +42,7 @@ and RPC settings (for example, if compression would result in small or negative gains). When a message from a client compressed with an unsupported algorithm is -processed by a server, it WILL result in a `UNIMPLEMENTED` error status on the +processed by a server, it WILL result in an `UNIMPLEMENTED` error status on the server. The server will then include in its response a `grpc-accept-encoding` header specifying the algorithms it does accept. If an `UNIMPLEMENTED` error status is returned from the server despite having used one of the algorithms From dde4fc66fb55291434a017c667d6a961332801e6 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Thu, 23 Jun 2016 10:35:19 -0700 Subject: [PATCH 1279/1894] changed service to _service, and added a TODO TODO for removing boilerplate code --- .../objective-c/route_guide/ViewControllers.m | 27 ++++++++++--------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/examples/objective-c/route_guide/ViewControllers.m b/examples/objective-c/route_guide/ViewControllers.m index 5fd411e3ba6..a5c03e9cfca 100644 --- a/examples/objective-c/route_guide/ViewControllers.m +++ b/examples/objective-c/route_guide/ViewControllers.m @@ -81,7 +81,7 @@ static NSString * const kHostAddress = @"localhost:50051"; * not to have a feature. */ @interface GetFeatureViewController : UIViewController { - RTGRouteGuide *service; + RTGRouteGuide *_service; } @property (weak, nonatomic) IBOutlet UILabel *outputLabel; @end @@ -90,6 +90,7 @@ static NSString * const kHostAddress = @"localhost:50051"; - (void)execRequest { void (^handler)(RTGFeature *response, NSError *error) = ^(RTGFeature *response, NSError *error) { + // TODO(makdharma): Remove boilerplate by consolidating into one log function. if (response.name.length) { NSString *str =[NSString stringWithFormat:@"%@\nFound feature called %@ at %@.", self.outputLabel.text, response.location, response.name]; self.outputLabel.text = str; @@ -109,8 +110,8 @@ static NSString * const kHostAddress = @"localhost:50051"; point.latitude = 409146138; point.longitude = -746188906; - [service getFeatureWithRequest:point handler:handler]; - [service getFeatureWithRequest:[RTGPoint message] handler:handler]; + [_service getFeatureWithRequest:point handler:handler]; + [_service getFeatureWithRequest:[RTGPoint message] handler:handler]; } - (void)viewDidLoad { @@ -119,7 +120,7 @@ static NSString * const kHostAddress = @"localhost:50051"; // This only needs to be done once per host, before creating service objects for that host. [GRPCCall useInsecureConnectionsForHost:kHostAddress]; - service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; + _service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; } - (void)viewDidAppear:(BOOL)animated { @@ -139,7 +140,7 @@ static NSString * const kHostAddress = @"localhost:50051"; * the pre-generated database. Prints each response as it comes in. */ @interface ListFeaturesViewController : UIViewController { - RTGRouteGuide *service; + RTGRouteGuide *_service; } @property (weak, nonatomic) IBOutlet UILabel *outputLabel; @@ -155,7 +156,7 @@ static NSString * const kHostAddress = @"localhost:50051"; rectangle.hi.longitude = -745E6; NSLog(@"Looking for features between %@ and %@", rectangle.lo, rectangle.hi); - [service listFeaturesWithRequest:rectangle + [_service listFeaturesWithRequest:rectangle eventHandler:^(BOOL done, RTGFeature *response, NSError *error) { if (response) { NSString *str =[NSString stringWithFormat:@"%@\nFound feature at %@ called %@.", self.outputLabel.text, response.location, response.name]; @@ -172,7 +173,7 @@ static NSString * const kHostAddress = @"localhost:50051"; - (void)viewDidLoad { [super viewDidLoad]; - service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; + _service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; } - (void)viewDidAppear:(BOOL)animated { @@ -193,7 +194,7 @@ static NSString * const kHostAddress = @"localhost:50051"; * server. */ @interface RecordRouteViewController : UIViewController { - RTGRouteGuide *service; + RTGRouteGuide *_service; } @property (weak, nonatomic) IBOutlet UILabel *outputLabel; @@ -217,7 +218,7 @@ static NSString * const kHostAddress = @"localhost:50051"; return location; }]; - [service recordRouteWithRequestsWriter:locations + [_service recordRouteWithRequestsWriter:locations handler:^(RTGRouteSummary *response, NSError *error) { if (response) { NSString *str =[NSString stringWithFormat: @@ -241,7 +242,7 @@ static NSString * const kHostAddress = @"localhost:50051"; - (void)viewDidLoad { [super viewDidLoad]; - service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; + _service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; } - (void)viewDidAppear:(BOOL)animated { @@ -261,7 +262,7 @@ static NSString * const kHostAddress = @"localhost:50051"; * the server. */ @interface RouteChatViewController : UIViewController { - RTGRouteGuide *service; + RTGRouteGuide *_service; } @property (weak, nonatomic) IBOutlet UILabel *outputLabel; @@ -279,7 +280,7 @@ static NSString * const kHostAddress = @"localhost:50051"; return note; }]; - [service routeChatWithRequestsWriter:notesWriter + [_service routeChatWithRequestsWriter:notesWriter eventHandler:^(BOOL done, RTGRouteNote *note, NSError *error) { if (note) { NSString *str =[NSString stringWithFormat:@"%@\nGot message %@ at %@", @@ -300,7 +301,7 @@ static NSString * const kHostAddress = @"localhost:50051"; - (void)viewDidLoad { [super viewDidLoad]; - service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; + _service = [[RTGRouteGuide alloc] initWithHost:kHostAddress]; } - (void)viewDidAppear:(BOOL)animated { From d139da8b9a9c482a83b23c926690f01b49025640 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 23 Jun 2016 10:37:21 -0700 Subject: [PATCH 1280/1894] Remove unnecessary changes --- tools/run_tests/run_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 2a404df0d41..532f7187408 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -425,7 +425,7 @@ class PythonLanguage(object): return [] def build_steps(self): - return [['tools/run_tests/build_python.sh', tox_env] + return [['tools/run_tests/build_python.sh', tox_env] for tox_env in self._tox_envs] def post_tests_steps(self): From 9f97cca37b21fbac12d840fa2337f1fba251e77c Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 23 Jun 2016 10:47:05 -0700 Subject: [PATCH 1281/1894] Fix error handling in grpc_call_create(). --- src/core/lib/surface/call.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index d64ca64a15f..2e89393815f 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -266,8 +266,18 @@ grpc_call *grpc_call_create( destroy_call, call, call->context, server_transport_data, CALL_STACK_FROM_CALL(call)); -// FIXME: handle error (probably requires changing this function's API) -GPR_ASSERT(error == GRPC_ERROR_NONE); + if (error != GRPC_ERROR_NONE) { + intptr_t status; + if (!grpc_error_get_int(error, GRPC_ERROR_INT_GRPC_STATUS, &status)) + status = GRPC_STATUS_UNKNOWN; + const char* error_string = grpc_error_string(error); + received_status* status_struct = &call->status[STATUS_FROM_CORE]; + status_struct->is_set = true; + status_struct->code = status; + status_struct->details = grpc_mdstr_from_string(error_string); + grpc_error_free_string(error_string); + grpc_error_unref(error); + } if (cq != NULL) { GPR_ASSERT( pollset_set_alternative == NULL && From 09e669878f57e4e4a56bb920d4e3e48615fde55d Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 23 Jun 2016 11:14:18 -0700 Subject: [PATCH 1282/1894] Propagate error up through grpc_connected_subchannel_create_call(). --- src/core/ext/client_config/subchannel.c | 23 ++++++----- src/core/ext/client_config/subchannel.h | 4 +- .../client_config/subchannel_call_holder.c | 38 ++++++++++++++----- 3 files changed, 44 insertions(+), 21 deletions(-) diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c index 2e9cf7d7d4e..80cf154f96a 100644 --- a/src/core/ext/client_config/subchannel.c +++ b/src/core/ext/client_config/subchannel.c @@ -700,22 +700,25 @@ grpc_connected_subchannel *grpc_subchannel_get_connected_subchannel( return GET_CONNECTED_SUBCHANNEL(c, acq); } -grpc_subchannel_call *grpc_connected_subchannel_create_call( +grpc_error *grpc_connected_subchannel_create_call( grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *con, - grpc_polling_entity *pollent) { + grpc_polling_entity *pollent, grpc_subchannel_call **call) { grpc_channel_stack *chanstk = CHANNEL_STACK_FROM_CONNECTION(con); - grpc_subchannel_call *call = - gpr_malloc(sizeof(grpc_subchannel_call) + chanstk->call_stack_size); - grpc_call_stack *callstk = SUBCHANNEL_CALL_TO_CALL_STACK(call); - call->connection = con; + *call = gpr_malloc(sizeof(grpc_subchannel_call) + chanstk->call_stack_size); + grpc_call_stack *callstk = SUBCHANNEL_CALL_TO_CALL_STACK(*call); + (*call)->connection = con; GRPC_CONNECTED_SUBCHANNEL_REF(con, "subchannel_call"); grpc_error* error = grpc_call_stack_init(exec_ctx, chanstk, 1, - subchannel_call_destroy, call, + subchannel_call_destroy, *call, NULL, NULL, callstk); -// FIXME: handle error (probably requires changing this function's API) -GPR_ASSERT(error == GRPC_ERROR_NONE); + if (error != GRPC_ERROR_NONE) { + const char* error_string = grpc_error_string(error); + gpr_log(GPR_ERROR, "error: %s", error_string); + grpc_error_free_string(error_string); + return error; + } grpc_call_stack_set_pollset_or_pollset_set(exec_ctx, callstk, pollent); - return call; + return GRPC_ERROR_NONE; } grpc_call_stack *grpc_subchannel_call_get_call_stack( diff --git a/src/core/ext/client_config/subchannel.h b/src/core/ext/client_config/subchannel.h index b6d39f5dc52..21454cb7a4d 100644 --- a/src/core/ext/client_config/subchannel.h +++ b/src/core/ext/client_config/subchannel.h @@ -108,9 +108,9 @@ void grpc_subchannel_call_unref(grpc_exec_ctx *exec_ctx, GRPC_SUBCHANNEL_REF_EXTRA_ARGS); /** construct a subchannel call */ -grpc_subchannel_call *grpc_connected_subchannel_create_call( +grpc_error *grpc_connected_subchannel_create_call( grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *connected_subchannel, - grpc_polling_entity *pollent); + grpc_polling_entity *pollent, grpc_subchannel_call** subchannel_call); /** process a transport level op */ void grpc_connected_subchannel_process_transport_op( diff --git a/src/core/ext/client_config/subchannel_call_holder.c b/src/core/ext/client_config/subchannel_call_holder.c index e31800edd98..25bd9798f0a 100644 --- a/src/core/ext/client_config/subchannel_call_holder.c +++ b/src/core/ext/client_config/subchannel_call_holder.c @@ -84,6 +84,11 @@ void grpc_subchannel_call_holder_destroy(grpc_exec_ctx *exec_ctx, gpr_free(holder->waiting_ops); } +// The logic here is fairly complicated, due to (a) the fact that we +// need to handle the case where we receive the send op before the +// initial metadata op, and (b) the need for efficiency, especially in +// the streaming case. +// TODO(ctiller): Explain this more thoroughly. void grpc_subchannel_call_holder_perform_op(grpc_exec_ctx *exec_ctx, grpc_subchannel_call_holder *holder, grpc_transport_stream_op *op) { @@ -121,7 +126,8 @@ retry: } /* if this is a cancellation, then we can raise our cancelled flag */ if (op->cancel_with_status != GRPC_STATUS_OK) { - if (!gpr_atm_rel_cas(&holder->subchannel_call, 0, 1)) { + if (!gpr_atm_rel_cas(&holder->subchannel_call, 0, + (gpr_atm)(uintptr_t)CANCELLED_CALL)) { goto retry; } else { switch (holder->creation_phase) { @@ -161,10 +167,17 @@ retry: /* if we've got a subchannel, then let's ask it to create a call */ if (holder->creation_phase == GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING && holder->connected_subchannel != NULL) { - gpr_atm_rel_store( - &holder->subchannel_call, - (gpr_atm)(uintptr_t)grpc_connected_subchannel_create_call( - exec_ctx, holder->connected_subchannel, holder->pollent)); + grpc_subchannel_call* subchannel_call = NULL; + grpc_error* error = grpc_connected_subchannel_create_call( + exec_ctx, holder->connected_subchannel, holder->pollent, + &subchannel_call); + if (error != GRPC_ERROR_NONE) { + subchannel_call = CANCELLED_CALL; + fail_locked(exec_ctx, holder, error); + grpc_transport_stream_op_finish_with_failure(exec_ctx, op, error); + } + gpr_atm_rel_store(&holder->subchannel_call, + (gpr_atm)(uintptr_t)subchannel_call); retry_waiting_locked(exec_ctx, holder); goto retry; } @@ -192,10 +205,17 @@ static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *arg, GRPC_ERROR_CREATE_REFERENCING( "Cancelled before creating subchannel", &error, 1)); } else { - gpr_atm_rel_store( - &holder->subchannel_call, - (gpr_atm)(uintptr_t)grpc_connected_subchannel_create_call( - exec_ctx, holder->connected_subchannel, holder->pollent)); + grpc_subchannel_call* subchannel_call = NULL; + grpc_error* new_error = grpc_connected_subchannel_create_call( + exec_ctx, holder->connected_subchannel, holder->pollent, + &subchannel_call); + if (new_error != GRPC_ERROR_NONE) { + grpc_error_add_child(new_error, error); + subchannel_call = CANCELLED_CALL; + fail_locked(exec_ctx, holder, new_error); + } + gpr_atm_rel_store(&holder->subchannel_call, + (gpr_atm)(uintptr_t)subchannel_call); retry_waiting_locked(exec_ctx, holder); } gpr_mu_unlock(&holder->mu); From 820c1f3fda95853e791ffe396b15b32d1bda356b Mon Sep 17 00:00:00 2001 From: Robbie Shade Date: Thu, 23 Jun 2016 14:31:28 -0400 Subject: [PATCH 1283/1894] ASSERT vector size before directly accessing first element --- test/cpp/end2end/end2end_test.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 8de9d339f63..ea04ab97db2 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -1407,7 +1407,7 @@ TEST_P(SecureEnd2endTest, ClientAuthContext) { std::shared_ptr auth_ctx = context.auth_context(); std::vector tst = auth_ctx->FindPropertyValues("transport_security_type"); - EXPECT_EQ(1u, tst.size()); + ASSERT_EQ(1u, tst.size()); EXPECT_EQ(GetParam().credentials_type, ToString(tst[0])); if (GetParam().credentials_type == kTlsCredentialsType) { EXPECT_EQ("x509_subject_alternative_name", From 83a6a828b047cc24922a6d143e30f4ab6eb63239 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 23 Jun 2016 11:33:13 -0700 Subject: [PATCH 1284/1894] Fixed error messages for C++ interop client. --- test/cpp/interop/interop_client.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/test/cpp/interop/interop_client.cc b/test/cpp/interop/interop_client.cc index 89f841dbe96..ec0729d9c5d 100644 --- a/test/cpp/interop/interop_client.cc +++ b/test/cpp/interop/interop_client.cc @@ -451,7 +451,7 @@ bool InteropClient::DoResponseStreaming() { // most likely due to connection failure. gpr_log(GPR_ERROR, "DoResponseStreaming(): Read fewer streams (%d) than " - "response_stream_sizes.size() (%" PRIuPTR ")", + "response_stream_sizes.size() (%zu)", i, response_stream_sizes.size()); return TransientFailureOrAbort(); } @@ -576,11 +576,10 @@ bool InteropClient::DoServerCompressedStreaming() { if (k < sizes.size()) { // stream->Read() failed before reading all the expected messages. This // is most likely due to a connection failure. - gpr_log(GPR_ERROR, "%s(): Responses read (k=%" PRIuPTR - ") is " - "less than the expected messages (i.e " - "response_stream_sizes.size() (%" PRIuPTR ")).", - __func__, k, response_stream_sizes.size()); + gpr_log(GPR_ERROR, + "%s(): Responses read (k=%zu) is less than the expected number of " + "messages (%zu).", + __func__, k, sizes.size()); return TransientFailureOrAbort(); } @@ -665,7 +664,7 @@ bool InteropClient::DoHalfDuplex() { // most likely due to a connection failure gpr_log(GPR_ERROR, "DoHalfDuplex(): Responses read (i=%d) are less than the expected " - "number of messages response_stream_sizes.size() (%" PRIuPTR ")", + "number of messages response_stream_sizes.size() (%zu)", i, response_stream_sizes.size()); return TransientFailureOrAbort(); } From 674f55a9ac7536b001abcac73db89e4260e935e2 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 23 Jun 2016 11:40:53 -0700 Subject: [PATCH 1285/1894] Fixed missing variable propagation --- src/ruby/lib/grpc/generic/active_call.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/ruby/lib/grpc/generic/active_call.rb b/src/ruby/lib/grpc/generic/active_call.rb index 18126c44323..a3ac0d48a3b 100644 --- a/src/ruby/lib/grpc/generic/active_call.rb +++ b/src/ruby/lib/grpc/generic/active_call.rb @@ -412,7 +412,8 @@ module GRPC # # @param gen_each_reply [Proc] generates the BiDi stream replies def run_server_bidi(gen_each_reply) - bd = BidiCall.new(@call, @marshal, @unmarshal) + bd = BidiCall.new(@call, @marshal, @unmarshal, + metadata_received: @metadata_received) bd.run_on_server(gen_each_reply) end From a4b34c290d5f91866a3eff2f9793c00eb12f16f0 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Wed, 22 Jun 2016 15:31:15 -0700 Subject: [PATCH 1286/1894] Changed %lld to use mingw supported PRId64 --- src/core/ext/client_config/channel_connectivity.c | 6 +++--- src/core/lib/profiling/basic_timers.c | 4 ++-- .../lib/security/credentials/jwt/jwt_credentials.c | 4 ++-- src/core/lib/surface/channel.c | 10 +++++----- src/core/lib/surface/completion_queue.c | 8 ++++---- src/core/lib/transport/transport_op_string.c | 4 ++-- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/core/ext/client_config/channel_connectivity.c b/src/core/ext/client_config/channel_connectivity.c index 20c01a9a7cf..2fd8e0e1232 100644 --- a/src/core/ext/client_config/channel_connectivity.c +++ b/src/core/ext/client_config/channel_connectivity.c @@ -189,10 +189,10 @@ void grpc_channel_watch_connectivity_state( GRPC_API_TRACE( "grpc_channel_watch_connectivity_state(" "channel=%p, last_observed_state=%d, " - "deadline=gpr_timespec { tv_sec: %lld, tv_nsec: %d, clock_type: %d }, " + "deadline=gpr_timespec { tv_sec: %"PRId64", tv_nsec: %d, clock_type: %d }, " "cq=%p, tag=%p)", - 7, (channel, (int)last_observed_state, (long long)deadline.tv_sec, - (int)deadline.tv_nsec, (int)deadline.clock_type, cq, tag)); + 7, (channel, (int)last_observed_state, deadline.tv_sec, + deadline.tv_nsec, (int)deadline.clock_type, cq, tag)); grpc_cq_begin_op(cq, tag); diff --git a/src/core/lib/profiling/basic_timers.c b/src/core/lib/profiling/basic_timers.c index 50082cd7ee4..ee464f310f4 100644 --- a/src/core/lib/profiling/basic_timers.c +++ b/src/core/lib/profiling/basic_timers.c @@ -141,9 +141,9 @@ static void write_log(gpr_timer_log *log) { entry->tm = gpr_time_0(entry->tm.clock_type); } fprintf(output_file, - "{\"t\": %lld.%09d, \"thd\": \"%d\", \"type\": \"%c\", \"tag\": " + "{\"t\": %"PRId64".%09d, \"thd\": \"%d\", \"type\": \"%c\", \"tag\": " "\"%s\", \"file\": \"%s\", \"line\": %d, \"imp\": %d}\n", - (long long)entry->tm.tv_sec, (int)entry->tm.tv_nsec, entry->thd, + entry->tm.tv_sec, entry->tm.tv_nsec, entry->thd, entry->type, entry->tagstr, entry->file, entry->line, entry->important); } diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.c b/src/core/lib/security/credentials/jwt/jwt_credentials.c index 973fb75eaab..f4dd9208610 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.c +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.c @@ -149,10 +149,10 @@ grpc_call_credentials *grpc_service_account_jwt_access_credentials_create( "grpc_service_account_jwt_access_credentials_create(" "json_key=%s, " "token_lifetime=" - "gpr_timespec { tv_sec: %lld, tv_nsec: %d, clock_type: %d }, " + "gpr_timespec { tv_sec: %"PRId64", tv_nsec: %d, clock_type: %d }, " "reserved=%p)", 5, - (json_key, (long long)token_lifetime.tv_sec, (int)token_lifetime.tv_nsec, + (json_key, token_lifetime.tv_sec, token_lifetime.tv_nsec, (int)token_lifetime.clock_type, reserved)); GPR_ASSERT(reserved == NULL); return grpc_service_account_jwt_access_credentials_create_from_auth_json_key( diff --git a/src/core/lib/surface/channel.c b/src/core/lib/surface/channel.c index 8936e7164f4..952a769de1d 100644 --- a/src/core/lib/surface/channel.c +++ b/src/core/lib/surface/channel.c @@ -223,10 +223,10 @@ grpc_call *grpc_channel_create_call(grpc_channel *channel, "grpc_channel_create_call(" "channel=%p, parent_call=%p, propagation_mask=%x, cq=%p, method=%s, " "host=%s, " - "deadline=gpr_timespec { tv_sec: %lld, tv_nsec: %d, clock_type: %d }, " + "deadline=gpr_timespec { tv_sec: %"PRId64", tv_nsec: %d, clock_type: %d }, " "reserved=%p)", 10, (channel, parent_call, (unsigned)propagation_mask, cq, method, host, - (long long)deadline.tv_sec, (int)deadline.tv_nsec, + deadline.tv_sec, deadline.tv_nsec, (int)deadline.clock_type, reserved)); GPR_ASSERT(!reserved); return grpc_channel_create_call_internal( @@ -282,11 +282,11 @@ grpc_call *grpc_channel_create_registered_call( "grpc_channel_create_registered_call(" "channel=%p, parent_call=%p, propagation_mask=%x, completion_queue=%p, " "registered_call_handle=%p, " - "deadline=gpr_timespec { tv_sec: %lld, tv_nsec: %d, clock_type: %d }, " + "deadline=gpr_timespec { tv_sec: %"PRId64", tv_nsec: %d, clock_type: %d }, " "reserved=%p)", 9, (channel, parent_call, (unsigned)propagation_mask, completion_queue, - registered_call_handle, (long long)deadline.tv_sec, - (int)deadline.tv_nsec, (int)deadline.clock_type, reserved)); + registered_call_handle, deadline.tv_sec, + deadline.tv_nsec, (int)deadline.clock_type, reserved)); GPR_ASSERT(!reserved); return grpc_channel_create_call_internal( channel, parent_call, propagation_mask, completion_queue, NULL, diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index 2cc6aa74e02..aa35ae02fe2 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -316,9 +316,9 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, GRPC_API_TRACE( "grpc_completion_queue_next(" "cc=%p, " - "deadline=gpr_timespec { tv_sec: %lld, tv_nsec: %d, clock_type: %d }, " + "deadline=gpr_timespec { tv_sec: %"PRId64", tv_nsec: %d, clock_type: %d }, " "reserved=%p)", - 5, (cc, (long long)deadline.tv_sec, (int)deadline.tv_nsec, + 5, (cc, deadline.tv_sec, deadline.tv_nsec, (int)deadline.clock_type, reserved)); GPR_ASSERT(!reserved); @@ -428,9 +428,9 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, GRPC_API_TRACE( "grpc_completion_queue_pluck(" "cc=%p, tag=%p, " - "deadline=gpr_timespec { tv_sec: %lld, tv_nsec: %d, clock_type: %d }, " + "deadline=gpr_timespec { tv_sec: %"PRId64", tv_nsec: %d, clock_type: %d }, " "reserved=%p)", - 6, (cc, tag, (long long)deadline.tv_sec, (int)deadline.tv_nsec, + 6, (cc, tag, deadline.tv_sec, deadline.tv_nsec, (int)deadline.clock_type, reserved)); GPR_ASSERT(!reserved); diff --git a/src/core/lib/transport/transport_op_string.c b/src/core/lib/transport/transport_op_string.c index df04c611270..d8fae7805e4 100644 --- a/src/core/lib/transport/transport_op_string.c +++ b/src/core/lib/transport/transport_op_string.c @@ -63,8 +63,8 @@ static void put_metadata_list(gpr_strvec *b, grpc_metadata_batch md) { } if (gpr_time_cmp(md.deadline, gpr_inf_future(md.deadline.clock_type)) != 0) { char *tmp; - gpr_asprintf(&tmp, " deadline=%lld.%09d", (long long)md.deadline.tv_sec, - (int)md.deadline.tv_nsec); + gpr_asprintf(&tmp, " deadline=%"PRId64".%09d", md.deadline.tv_sec, + md.deadline.tv_nsec); gpr_strvec_add(b, tmp); } } From fe754b4e996415300ff29b6e4c378d3d5704852a Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Thu, 23 Jun 2016 12:32:07 -0700 Subject: [PATCH 1287/1894] Use GRPC_PYTHON_CFLAGS/GRPC_PYTHON_LDFLAGS in setup.py. This is needed for building grpcio with mingw, see https://github.com/grpc/grpc/pull/7012. --- setup.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.py b/setup.py index f73501b8b35..7e625b937a7 100644 --- a/setup.py +++ b/setup.py @@ -31,6 +31,7 @@ import os import os.path +import shlex import shutil import sys import sysconfig @@ -99,8 +100,9 @@ if not "win32" in sys.platform: DEFINE_MACROS = (('OPENSSL_NO_ASM', 1), ('_WIN32_WINNT', 0x600), ('GPR_BACKWARDS_COMPATIBILITY_MODE', 1),) -LDFLAGS = () -CFLAGS = () +LDFLAGS = shlex.split(os.environ.get('GRPC_PYTHON_LDFLAGS', '')) +CFLAGS = shlex.split(os.environ.get('GRPC_PYTHON_CFLAGS', '')) + if "linux" in sys.platform: LDFLAGS += ('-Wl,-wrap,memcpy',) if "linux" in sys.platform or "darwin" in sys.platform: From 51d4f0194963e60cca2e28c08a53070f2135b4f0 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 23 Jun 2016 13:01:43 -0700 Subject: [PATCH 1288/1894] prevent race between grpcsharp_server_request_call and grpc_completion_queue_shutdown --- .../Grpc.Core/Internal/ServerSafeHandle.cs | 23 +++++++++++++------ 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/src/csharp/Grpc.Core/Internal/ServerSafeHandle.cs b/src/csharp/Grpc.Core/Internal/ServerSafeHandle.cs index 85813027064..014a8db78f2 100644 --- a/src/csharp/Grpc.Core/Internal/ServerSafeHandle.cs +++ b/src/csharp/Grpc.Core/Internal/ServerSafeHandle.cs @@ -54,7 +54,10 @@ namespace Grpc.Core.Internal public void RegisterCompletionQueue(CompletionQueueSafeHandle cq) { - Native.grpcsharp_server_register_completion_queue(this, cq); + using (cq.NewScope()) + { + Native.grpcsharp_server_register_completion_queue(this, cq); + } } public int AddInsecurePort(string addr) @@ -74,16 +77,22 @@ namespace Grpc.Core.Internal public void ShutdownAndNotify(BatchCompletionDelegate callback, CompletionQueueSafeHandle completionQueue) { - var ctx = BatchContextSafeHandle.Create(); - completionQueue.CompletionRegistry.RegisterBatchCompletion(ctx, callback); - Native.grpcsharp_server_shutdown_and_notify_callback(this, completionQueue, ctx); + using (completionQueue.NewScope()) + { + var ctx = BatchContextSafeHandle.Create(); + completionQueue.CompletionRegistry.RegisterBatchCompletion(ctx, callback); + Native.grpcsharp_server_shutdown_and_notify_callback(this, completionQueue, ctx); + } } public void RequestCall(BatchCompletionDelegate callback, CompletionQueueSafeHandle completionQueue) { - var ctx = BatchContextSafeHandle.Create(); - completionQueue.CompletionRegistry.RegisterBatchCompletion(ctx, callback); - Native.grpcsharp_server_request_call(this, completionQueue, ctx).CheckOk(); + using (completionQueue.NewScope()) + { + var ctx = BatchContextSafeHandle.Create(); + completionQueue.CompletionRegistry.RegisterBatchCompletion(ctx, callback); + Native.grpcsharp_server_request_call(this, completionQueue, ctx).CheckOk(); + } } protected override bool ReleaseHandle() From 5d11e43ce34b371fb0ab1fa69e541a4d513025b8 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 23 Jun 2016 13:14:05 -0700 Subject: [PATCH 1289/1894] Added test for filter whose call initialization fails, and fixed bugs uncovered by the test. --- Makefile | 2 + src/core/lib/channel/channel_stack.c | 7 +- src/core/lib/iomgr/error.c | 6 + src/core/lib/iomgr/error.h | 3 + src/core/lib/surface/call.c | 10 +- test/core/end2end/end2end_nosec_tests.c | 8 + test/core/end2end/end2end_tests.c | 8 + test/core/end2end/gen_build_yaml.py | 1 + .../end2end/tests/filter_call_init_fails.c | 263 ++++++++ tools/run_tests/sources_and_headers.json | 2 + tools/run_tests/tests.json | 627 +++++++++++++++++- .../end2end_nosec_tests.vcxproj | 2 + .../end2end_nosec_tests.vcxproj.filters | 3 + .../tests/end2end_tests/end2end_tests.vcxproj | 2 + .../end2end_tests.vcxproj.filters | 3 + 15 files changed, 929 insertions(+), 18 deletions(-) create mode 100644 test/core/end2end/tests/filter_call_init_fails.c diff --git a/Makefile b/Makefile index 9be3e5784cc..8e5d0102c3f 100644 --- a/Makefile +++ b/Makefile @@ -6366,6 +6366,7 @@ LIBEND2END_TESTS_SRC = \ test/core/end2end/tests/default_host.c \ test/core/end2end/tests/disappearing_server.c \ test/core/end2end/tests/empty_batch.c \ + test/core/end2end/tests/filter_call_init_fails.c \ test/core/end2end/tests/filter_causes_close.c \ test/core/end2end/tests/graceful_server_shutdown.c \ test/core/end2end/tests/high_initial_seqno.c \ @@ -6443,6 +6444,7 @@ LIBEND2END_NOSEC_TESTS_SRC = \ test/core/end2end/tests/default_host.c \ test/core/end2end/tests/disappearing_server.c \ test/core/end2end/tests/empty_batch.c \ + test/core/end2end/tests/filter_call_init_fails.c \ test/core/end2end/tests/filter_causes_close.c \ test/core/end2end/tests/graceful_server_shutdown.c \ test/core/end2end/tests/high_initial_seqno.c \ diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index 0613f94c299..715f6316254 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -179,6 +179,7 @@ grpc_error* grpc_call_stack_init(grpc_exec_ctx *exec_ctx, ROUND_UP_TO_ALIGNMENT_SIZE(count * sizeof(grpc_call_element)); /* init per-filter data */ + grpc_error* first_error = GRPC_ERROR_NONE; for (i = 0; i < count; i++) { args.call_stack = call_stack; args.server_transport_data = transport_server_data; @@ -188,12 +189,12 @@ grpc_error* grpc_call_stack_init(grpc_exec_ctx *exec_ctx, call_elems[i].call_data = user_data; grpc_error* error = call_elems[i].filter->init_call_elem( exec_ctx, &call_elems[i], &args); - if (error != GRPC_ERROR_NONE) - return error; + if (error != GRPC_ERROR_NONE && first_error == GRPC_ERROR_NONE) + first_error = error; user_data += ROUND_UP_TO_ALIGNMENT_SIZE(call_elems[i].filter->sizeof_call_data); } - return GRPC_ERROR_NONE; + return first_error; } void grpc_call_stack_set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index 540fb4fa7e4..1b15963e57d 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -286,6 +286,12 @@ grpc_error *grpc_error_set_str(grpc_error *src, grpc_error_strs which, return new; } +const char *grpc_error_get_str(grpc_error *error, grpc_error_strs which) { + void *s = NULL; + gpr_avl_maybe_get(error->strs, (void *)(uintptr_t)which, &s); + return s; +} + grpc_error *grpc_error_add_child(grpc_error *src, grpc_error *child) { grpc_error *new = copy_error_and_unref(src); new->errs = gpr_avl_add(new->errs, (void *)(new->next_err++), child); diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index 69cdf3028e4..4bff591fe31 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -169,6 +169,9 @@ grpc_error *grpc_error_set_time(grpc_error *src, grpc_error_times which, gpr_timespec value); grpc_error *grpc_error_set_str(grpc_error *src, grpc_error_strs which, const char *value); +/// Returns NULL if the specified string is not set. +/// Caller does NOT own return value. +const char *grpc_error_get_str(grpc_error *error, grpc_error_strs which); /// Add a child error: an error that is believed to have contributed to this /// error occurring. Allows root causing high level errors from lower level /// errors that contributed to them. diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 2e89393815f..d68afff39f7 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -270,12 +270,10 @@ grpc_call *grpc_call_create( intptr_t status; if (!grpc_error_get_int(error, GRPC_ERROR_INT_GRPC_STATUS, &status)) status = GRPC_STATUS_UNKNOWN; - const char* error_string = grpc_error_string(error); - received_status* status_struct = &call->status[STATUS_FROM_CORE]; - status_struct->is_set = true; - status_struct->code = status; - status_struct->details = grpc_mdstr_from_string(error_string); - grpc_error_free_string(error_string); + const char* error_str = grpc_error_get_str(error, + GRPC_ERROR_STR_DESCRIPTION); + close_with_status(&exec_ctx, call, status, + error_str == NULL ? "unknown error" : error_str); grpc_error_unref(error); } if (cq != NULL) { diff --git a/test/core/end2end/end2end_nosec_tests.c b/test/core/end2end/end2end_nosec_tests.c index 2893bddc43c..03959308987 100644 --- a/test/core/end2end/end2end_nosec_tests.c +++ b/test/core/end2end/end2end_nosec_tests.c @@ -69,6 +69,8 @@ extern void disappearing_server(grpc_end2end_test_config config); extern void disappearing_server_pre_init(void); extern void empty_batch(grpc_end2end_test_config config); extern void empty_batch_pre_init(void); +extern void filter_call_init_fails(grpc_end2end_test_config config); +extern void filter_call_init_fails_pre_init(void); extern void filter_causes_close(grpc_end2end_test_config config); extern void filter_causes_close_pre_init(void); extern void graceful_server_shutdown(grpc_end2end_test_config config); @@ -136,6 +138,7 @@ void grpc_end2end_tests_pre_init(void) { default_host_pre_init(); disappearing_server_pre_init(); empty_batch_pre_init(); + filter_call_init_fails_pre_init(); filter_causes_close_pre_init(); graceful_server_shutdown_pre_init(); high_initial_seqno_pre_init(); @@ -183,6 +186,7 @@ void grpc_end2end_tests(int argc, char **argv, default_host(config); disappearing_server(config); empty_batch(config); + filter_call_init_fails(config); filter_causes_close(config); graceful_server_shutdown(config); high_initial_seqno(config); @@ -264,6 +268,10 @@ void grpc_end2end_tests(int argc, char **argv, empty_batch(config); continue; } + if (0 == strcmp("filter_call_init_fails", argv[i])) { + filter_call_init_fails(config); + continue; + } if (0 == strcmp("filter_causes_close", argv[i])) { filter_causes_close(config); continue; diff --git a/test/core/end2end/end2end_tests.c b/test/core/end2end/end2end_tests.c index 96a38e76dcc..1d6ada72540 100644 --- a/test/core/end2end/end2end_tests.c +++ b/test/core/end2end/end2end_tests.c @@ -71,6 +71,8 @@ extern void disappearing_server(grpc_end2end_test_config config); extern void disappearing_server_pre_init(void); extern void empty_batch(grpc_end2end_test_config config); extern void empty_batch_pre_init(void); +extern void filter_call_init_fails(grpc_end2end_test_config config); +extern void filter_call_init_fails_pre_init(void); extern void filter_causes_close(grpc_end2end_test_config config); extern void filter_causes_close_pre_init(void); extern void graceful_server_shutdown(grpc_end2end_test_config config); @@ -139,6 +141,7 @@ void grpc_end2end_tests_pre_init(void) { default_host_pre_init(); disappearing_server_pre_init(); empty_batch_pre_init(); + filter_call_init_fails_pre_init(); filter_causes_close_pre_init(); graceful_server_shutdown_pre_init(); high_initial_seqno_pre_init(); @@ -187,6 +190,7 @@ void grpc_end2end_tests(int argc, char **argv, default_host(config); disappearing_server(config); empty_batch(config); + filter_call_init_fails(config); filter_causes_close(config); graceful_server_shutdown(config); high_initial_seqno(config); @@ -272,6 +276,10 @@ void grpc_end2end_tests(int argc, char **argv, empty_batch(config); continue; } + if (0 == strcmp("filter_call_init_fails", argv[i])) { + filter_call_init_fails(config); + continue; + } if (0 == strcmp("filter_causes_close", argv[i])) { filter_causes_close(config); continue; diff --git a/test/core/end2end/gen_build_yaml.py b/test/core/end2end/gen_build_yaml.py index 6d3d8f8d3c4..5037559fea0 100755 --- a/test/core/end2end/gen_build_yaml.py +++ b/test/core/end2end/gen_build_yaml.py @@ -102,6 +102,7 @@ END2END_TESTS = { 'disappearing_server': connectivity_test_options, 'empty_batch': default_test_options, 'filter_causes_close': default_test_options, + 'filter_call_init_fails': default_test_options, 'graceful_server_shutdown': default_test_options._replace(cpu_cost=LOWCPU), 'hpack_size': default_test_options._replace(proxyable=False, traceable=False), diff --git a/test/core/end2end/tests/filter_call_init_fails.c b/test/core/end2end/tests/filter_call_init_fails.c new file mode 100644 index 00000000000..d97369fa98b --- /dev/null +++ b/test/core/end2end/tests/filter_call_init_fails.c @@ -0,0 +1,263 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#include "test/core/end2end/end2end_tests.h" + +#include +#include +#include + +#include +#include +#include +#include +#include +#include "src/core/lib/channel/channel_stack_builder.h" +#include "src/core/lib/surface/channel_init.h" +#include "test/core/end2end/cq_verifier.h" + +enum { TIMEOUT = 200000 }; + +static bool g_enable_filter = false; + +static void *tag(intptr_t t) { return (void *)t; } + +static grpc_end2end_test_fixture begin_test(grpc_end2end_test_config config, + const char *test_name, + grpc_channel_args *client_args, + grpc_channel_args *server_args) { + grpc_end2end_test_fixture f; + gpr_log(GPR_INFO, "%s/%s", test_name, config.name); + f = config.create_fixture(client_args, server_args); + config.init_server(&f, server_args); + config.init_client(&f, client_args); + return f; +} + +static gpr_timespec n_seconds_time(int n) { + return GRPC_TIMEOUT_SECONDS_TO_DEADLINE(n); +} + +static gpr_timespec five_seconds_time(void) { return n_seconds_time(5); } + +static void drain_cq(grpc_completion_queue *cq) { + grpc_event ev; + do { + ev = grpc_completion_queue_next(cq, five_seconds_time(), NULL); + } while (ev.type != GRPC_QUEUE_SHUTDOWN); +} + +static void shutdown_server(grpc_end2end_test_fixture *f) { + if (!f->server) return; + grpc_server_shutdown_and_notify(f->server, f->cq, tag(1000)); + GPR_ASSERT(grpc_completion_queue_pluck( + f->cq, tag(1000), GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5), NULL) + .type == GRPC_OP_COMPLETE); + grpc_server_destroy(f->server); + f->server = NULL; +} + +static void shutdown_client(grpc_end2end_test_fixture *f) { + if (!f->client) return; + grpc_channel_destroy(f->client); + f->client = NULL; +} + +static void end_test(grpc_end2end_test_fixture *f) { + shutdown_server(f); + shutdown_client(f); + + grpc_completion_queue_shutdown(f->cq); + drain_cq(f->cq); + grpc_completion_queue_destroy(f->cq); +} + +// Simple request via a server filter that always fails to initialize +// the call. +static void test_request(grpc_end2end_test_config config) { + grpc_call *c; + grpc_call *s; + gpr_slice request_payload_slice = gpr_slice_from_copied_string("hello world"); + grpc_byte_buffer *request_payload = + grpc_raw_byte_buffer_create(&request_payload_slice, 1); + gpr_timespec deadline = five_seconds_time(); + grpc_end2end_test_fixture f = + begin_test(config, "filter_call_init_fails", NULL, NULL); + cq_verifier *cqv = cq_verifier_create(f.cq); + 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_byte_buffer *request_payload_recv = NULL; + grpc_call_details call_details; + grpc_status_code status; + grpc_call_error error; + char *details = NULL; + size_t details_capacity = 0; + + c = grpc_channel_create_call(f.client, NULL, GRPC_PROPAGATE_DEFAULTS, f.cq, + "/foo", "foo.test.google.fr", deadline, NULL); + GPR_ASSERT(c); + + 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); + + memset(ops, 0, sizeof(ops)); + op = ops; + op->op = GRPC_OP_SEND_INITIAL_METADATA; + op->data.send_initial_metadata.count = 0; + op->data.send_initial_metadata.metadata = NULL; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_SEND_MESSAGE; + op->data.send_message = request_payload; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_SEND_CLOSE_FROM_CLIENT; + op->flags = 0; + op->reserved = NULL; + op++; + op->op = GRPC_OP_RECV_INITIAL_METADATA; + op->data.recv_initial_metadata = &initial_metadata_recv; + op->flags = 0; + op->reserved = NULL; + op++; + 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->data.recv_status_on_client.status_details_capacity = &details_capacity; + op->flags = 0; + op->reserved = NULL; + op++; + error = grpc_call_start_batch(c, ops, (size_t)(op - ops), tag(1), NULL); + GPR_ASSERT(GRPC_CALL_OK == error); + + 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(1), 1); + cq_verify(cqv); + + GPR_ASSERT(status == GRPC_STATUS_PERMISSION_DENIED); + GPR_ASSERT(0 == strcmp(details, "access denied")); + + gpr_free(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_call_destroy(c); + + cq_verifier_destroy(cqv); + + grpc_byte_buffer_destroy(request_payload); + grpc_byte_buffer_destroy(request_payload_recv); + + end_test(&f); + config.tear_down_data(&f); +} + +/******************************************************************************* + * Test filter - always fails to initialize a call + */ + +static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, + grpc_call_element *elem, + grpc_call_element_args *args) { + return grpc_error_set_int(GRPC_ERROR_CREATE("access denied"), + GRPC_ERROR_INT_GRPC_STATUS, + GRPC_STATUS_PERMISSION_DENIED); +} + +static void destroy_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, + const grpc_call_stats *stats, + void *and_free_memory) {} + +static void init_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem, + grpc_channel_element_args *args) {} + +static void destroy_channel_elem(grpc_exec_ctx *exec_ctx, + grpc_channel_element *elem) {} + +static const grpc_channel_filter test_filter = { + grpc_call_next_op, + grpc_channel_next_op, + 0, + init_call_elem, + grpc_call_stack_ignore_set_pollset_or_pollset_set, + destroy_call_elem, + 0, + init_channel_elem, + destroy_channel_elem, + grpc_call_next_get_peer, + "filter_call_init_fails"}; + +/******************************************************************************* + * Registration + */ + +static bool maybe_add_filter(grpc_channel_stack_builder *builder, void *arg) { + if (g_enable_filter) { + return grpc_channel_stack_builder_prepend_filter(builder, &test_filter, + NULL, NULL); + } else { + return true; + } +} + +static void init_plugin(void) { + grpc_channel_init_register_stage(GRPC_SERVER_CHANNEL, 0, maybe_add_filter, + NULL); +} + +static void destroy_plugin(void) {} + +void filter_call_init_fails(grpc_end2end_test_config config) { + g_enable_filter = true; + test_request(config); + g_enable_filter = false; +} + +void filter_call_init_fails_pre_init(void) { + grpc_register_plugin(init_plugin, destroy_plugin); +} diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 00018834af9..2bea121baad 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -5377,6 +5377,7 @@ "test/core/end2end/tests/default_host.c", "test/core/end2end/tests/disappearing_server.c", "test/core/end2end/tests/empty_batch.c", + "test/core/end2end/tests/filter_call_init_fails.c", "test/core/end2end/tests/filter_causes_close.c", "test/core/end2end/tests/graceful_server_shutdown.c", "test/core/end2end/tests/high_initial_seqno.c", @@ -5436,6 +5437,7 @@ "test/core/end2end/tests/default_host.c", "test/core/end2end/tests/disappearing_server.c", "test/core/end2end/tests/empty_batch.c", + "test/core/end2end/tests/filter_call_init_fails.c", "test/core/end2end/tests/filter_causes_close.c", "test/core/end2end/tests/graceful_server_shutdown.c", "test/core/end2end/tests/high_initial_seqno.c", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index c62058ede4e..381931db0fa 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -4680,6 +4680,28 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_census_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -5538,6 +5560,28 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -6382,6 +6426,27 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fakesec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -7127,6 +7192,26 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fd_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -7895,6 +7980,28 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -8669,6 +8776,22 @@ "linux" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_test", + "platforms": [ + "linux" + ] + }, { "args": [ "filter_causes_close" @@ -9377,6 +9500,28 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -10213,6 +10358,28 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_loadreporting_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -11057,6 +11224,27 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_oauth2_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -11834,6 +12022,27 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -12506,6 +12715,27 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -13220,6 +13450,27 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -13915,7 +14166,7 @@ }, { "args": [ - "filter_causes_close" + "filter_call_init_fails" ], "ci_platforms": [ "windows", @@ -13936,14 +14187,14 @@ }, { "args": [ - "graceful_server_shutdown" + "filter_causes_close" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 0.1, + "cpu_cost": 1.0, "exclude_configs": [], "flaky": false, "language": "c", @@ -13957,14 +14208,14 @@ }, { "args": [ - "high_initial_seqno" + "graceful_server_shutdown" ], "ci_platforms": [ "windows", "linux", "posix" ], - "cpu_cost": 1.0, + "cpu_cost": 0.1, "exclude_configs": [], "flaky": false, "language": "c", @@ -13978,7 +14229,7 @@ }, { "args": [ - "hpack_size" + "high_initial_seqno" ], "ci_platforms": [ "windows", @@ -13999,7 +14250,7 @@ }, { "args": [ - "idempotent_request" + "hpack_size" ], "ci_platforms": [ "windows", @@ -14020,7 +14271,7 @@ }, { "args": [ - "invoke_large_request" + "idempotent_request" ], "ci_platforms": [ "windows", @@ -14041,7 +14292,28 @@ }, { "args": [ - "large_metadata" + "invoke_large_request" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, + { + "args": [ + "large_metadata" ], "ci_platforms": [ "windows", @@ -14704,6 +14976,28 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -15562,6 +15856,28 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_cert_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -16364,6 +16680,27 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_ssl_proxy_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -17065,6 +17402,26 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -17851,6 +18208,28 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_census_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -18687,6 +19066,28 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_compress_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -19437,6 +19838,26 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_fd_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -20183,6 +20604,28 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -20941,6 +21384,22 @@ "linux" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "linux" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+pipe_nosec_test", + "platforms": [ + "linux" + ] + }, { "args": [ "filter_causes_close" @@ -21627,6 +22086,28 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_full+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -22441,6 +22922,28 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_loadreporting_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -23222,6 +23725,27 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_proxy_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -23873,6 +24397,27 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -24566,6 +25111,27 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_sockpair+trace_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -25258,6 +25824,29 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "windows", + "linux", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [ + "msan" + ], + "flaky": false, + "language": "c", + "name": "h2_sockpair_1byte_nosec_test", + "platforms": [ + "windows", + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" @@ -26027,6 +26616,26 @@ "posix" ] }, + { + "args": [ + "filter_call_init_fails" + ], + "ci_platforms": [ + "linux", + "mac", + "posix" + ], + "cpu_cost": 1.0, + "exclude_configs": [], + "flaky": false, + "language": "c", + "name": "h2_uds_nosec_test", + "platforms": [ + "linux", + "mac", + "posix" + ] + }, { "args": [ "filter_causes_close" diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj index 923c1d1ab41..eb5f285c663 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj @@ -179,6 +179,8 @@ + + diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters index 6533eaa057b..9995b92ae56 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_nosec_tests/end2end_nosec_tests.vcxproj.filters @@ -43,6 +43,9 @@ test\core\end2end\tests + + test\core\end2end\tests + test\core\end2end\tests diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj index 0b859e25ce4..33132e1138f 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj @@ -181,6 +181,8 @@ + + diff --git a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters index ea1c5e3c237..484fb0c9cc5 100644 --- a/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters +++ b/vsprojects/vcxproj/test/end2end/tests/end2end_tests/end2end_tests.vcxproj.filters @@ -46,6 +46,9 @@ test\core\end2end\tests + + test\core\end2end\tests + test\core\end2end\tests From 76d24420d7a6471dc3b135b62318277991ebdb08 Mon Sep 17 00:00:00 2001 From: "Mark D. Roth" Date: Thu, 23 Jun 2016 13:22:10 -0700 Subject: [PATCH 1290/1894] clang-format --- src/core/ext/census/grpc_filter.c | 4 ++-- src/core/ext/client_config/client_channel.c | 2 +- src/core/ext/client_config/subchannel.c | 8 ++++---- src/core/ext/client_config/subchannel.h | 2 +- src/core/ext/client_config/subchannel_call_holder.c | 8 ++++---- src/core/ext/load_reporting/load_reporting_filter.c | 2 +- src/core/lib/channel/channel_stack.c | 8 ++++---- src/core/lib/channel/channel_stack.h | 4 ++-- src/core/lib/channel/compress_filter.c | 2 +- src/core/lib/channel/connected_channel.c | 7 +++---- src/core/lib/channel/http_client_filter.c | 2 +- src/core/lib/channel/http_server_filter.c | 2 +- .../lib/security/transport/client_auth_filter.c | 2 +- .../lib/security/transport/server_auth_filter.c | 2 +- src/core/lib/surface/call.c | 13 ++++++------- src/core/lib/surface/lame_client.c | 2 +- src/core/lib/surface/server.c | 2 +- test/core/channel/channel_stack_test.c | 8 ++++---- test/core/end2end/tests/filter_call_init_fails.c | 2 +- test/core/end2end/tests/filter_causes_close.c | 2 +- 20 files changed, 41 insertions(+), 43 deletions(-) diff --git a/src/core/ext/census/grpc_filter.c b/src/core/ext/census/grpc_filter.c index dd2e2e01244..c5a6e6d3dc2 100644 --- a/src/core/ext/census/grpc_filter.c +++ b/src/core/ext/census/grpc_filter.c @@ -124,7 +124,7 @@ static void server_start_transport_op(grpc_exec_ctx *exec_ctx, grpc_call_next_op(exec_ctx, elem, op); } -static grpc_error* client_init_call_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *client_init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) { call_data *d = elem->call_data; @@ -143,7 +143,7 @@ static void client_destroy_call_elem(grpc_exec_ctx *exec_ctx, /* TODO(hongyu): record rpc client stats and census_rpc_end_op here */ } -static grpc_error* server_init_call_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *server_init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) { call_data *d = elem->call_data; diff --git a/src/core/ext/client_config/client_channel.c b/src/core/ext/client_config/client_channel.c index b0a09dab932..84e3fb4da65 100644 --- a/src/core/ext/client_config/client_channel.c +++ b/src/core/ext/client_config/client_channel.c @@ -430,7 +430,7 @@ static int cc_pick_subchannel(grpc_exec_ctx *exec_ctx, void *elemp, } /* Constructor for call_data */ -static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) { grpc_subchannel_call_holder_init(elem->call_data, cc_pick_subchannel, elem, diff --git a/src/core/ext/client_config/subchannel.c b/src/core/ext/client_config/subchannel.c index 80cf154f96a..8a1ac68c6e3 100644 --- a/src/core/ext/client_config/subchannel.c +++ b/src/core/ext/client_config/subchannel.c @@ -708,11 +708,11 @@ grpc_error *grpc_connected_subchannel_create_call( grpc_call_stack *callstk = SUBCHANNEL_CALL_TO_CALL_STACK(*call); (*call)->connection = con; GRPC_CONNECTED_SUBCHANNEL_REF(con, "subchannel_call"); - grpc_error* error = grpc_call_stack_init(exec_ctx, chanstk, 1, - subchannel_call_destroy, *call, - NULL, NULL, callstk); + grpc_error *error = + grpc_call_stack_init(exec_ctx, chanstk, 1, subchannel_call_destroy, *call, + NULL, NULL, callstk); if (error != GRPC_ERROR_NONE) { - const char* error_string = grpc_error_string(error); + const char *error_string = grpc_error_string(error); gpr_log(GPR_ERROR, "error: %s", error_string); grpc_error_free_string(error_string); return error; diff --git a/src/core/ext/client_config/subchannel.h b/src/core/ext/client_config/subchannel.h index 21454cb7a4d..ae1d96e6400 100644 --- a/src/core/ext/client_config/subchannel.h +++ b/src/core/ext/client_config/subchannel.h @@ -110,7 +110,7 @@ void grpc_subchannel_call_unref(grpc_exec_ctx *exec_ctx, /** construct a subchannel call */ grpc_error *grpc_connected_subchannel_create_call( grpc_exec_ctx *exec_ctx, grpc_connected_subchannel *connected_subchannel, - grpc_polling_entity *pollent, grpc_subchannel_call** subchannel_call); + grpc_polling_entity *pollent, grpc_subchannel_call **subchannel_call); /** process a transport level op */ void grpc_connected_subchannel_process_transport_op( diff --git a/src/core/ext/client_config/subchannel_call_holder.c b/src/core/ext/client_config/subchannel_call_holder.c index 25bd9798f0a..5b542331538 100644 --- a/src/core/ext/client_config/subchannel_call_holder.c +++ b/src/core/ext/client_config/subchannel_call_holder.c @@ -167,8 +167,8 @@ retry: /* if we've got a subchannel, then let's ask it to create a call */ if (holder->creation_phase == GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING && holder->connected_subchannel != NULL) { - grpc_subchannel_call* subchannel_call = NULL; - grpc_error* error = grpc_connected_subchannel_create_call( + grpc_subchannel_call *subchannel_call = NULL; + grpc_error *error = grpc_connected_subchannel_create_call( exec_ctx, holder->connected_subchannel, holder->pollent, &subchannel_call); if (error != GRPC_ERROR_NONE) { @@ -205,8 +205,8 @@ static void subchannel_ready(grpc_exec_ctx *exec_ctx, void *arg, GRPC_ERROR_CREATE_REFERENCING( "Cancelled before creating subchannel", &error, 1)); } else { - grpc_subchannel_call* subchannel_call = NULL; - grpc_error* new_error = grpc_connected_subchannel_create_call( + grpc_subchannel_call *subchannel_call = NULL; + grpc_error *new_error = grpc_connected_subchannel_create_call( exec_ctx, holder->connected_subchannel, holder->pollent, &subchannel_call); if (new_error != GRPC_ERROR_NONE) { diff --git a/src/core/ext/load_reporting/load_reporting_filter.c b/src/core/ext/load_reporting/load_reporting_filter.c index cfe752d6e2b..b584e31c5dd 100644 --- a/src/core/ext/load_reporting/load_reporting_filter.c +++ b/src/core/ext/load_reporting/load_reporting_filter.c @@ -56,7 +56,7 @@ static void invoke_lr_fn_locked(grpc_load_reporting_config *lrc, } /* Constructor for call_data */ -static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) { call_data *calld = elem->call_data; diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index 715f6316254..ff824c781f1 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -157,7 +157,7 @@ void grpc_channel_stack_destroy(grpc_exec_ctx *exec_ctx, } } -grpc_error* grpc_call_stack_init(grpc_exec_ctx *exec_ctx, +grpc_error *grpc_call_stack_init(grpc_exec_ctx *exec_ctx, grpc_channel_stack *channel_stack, int initial_refs, grpc_iomgr_cb_func destroy, void *destroy_arg, @@ -179,7 +179,7 @@ grpc_error* grpc_call_stack_init(grpc_exec_ctx *exec_ctx, ROUND_UP_TO_ALIGNMENT_SIZE(count * sizeof(grpc_call_element)); /* init per-filter data */ - grpc_error* first_error = GRPC_ERROR_NONE; + grpc_error *first_error = GRPC_ERROR_NONE; for (i = 0; i < count; i++) { args.call_stack = call_stack; args.server_transport_data = transport_server_data; @@ -187,8 +187,8 @@ grpc_error* grpc_call_stack_init(grpc_exec_ctx *exec_ctx, call_elems[i].filter = channel_elems[i].filter; call_elems[i].channel_data = channel_elems[i].channel_data; call_elems[i].call_data = user_data; - grpc_error* error = call_elems[i].filter->init_call_elem( - exec_ctx, &call_elems[i], &args); + grpc_error *error = + call_elems[i].filter->init_call_elem(exec_ctx, &call_elems[i], &args); if (error != GRPC_ERROR_NONE && first_error == GRPC_ERROR_NONE) first_error = error; user_data += diff --git a/src/core/lib/channel/channel_stack.h b/src/core/lib/channel/channel_stack.h index f56c6540674..ba7baeb23fc 100644 --- a/src/core/lib/channel/channel_stack.h +++ b/src/core/lib/channel/channel_stack.h @@ -110,7 +110,7 @@ typedef struct { on a client; if it is non-NULL, then it points to memory owned by the transport and is on the server. Most filters want to ignore this argument. */ - grpc_error* (*init_call_elem)(grpc_exec_ctx *exec_ctx, + grpc_error *(*init_call_elem)(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args); void (*set_pollset_or_pollset_set)(grpc_exec_ctx *exec_ctx, @@ -210,7 +210,7 @@ void grpc_channel_stack_destroy(grpc_exec_ctx *exec_ctx, /* Initialize a call stack given a channel stack. transport_server_data is expected to be NULL on a client, or an opaque transport owned pointer on the server. */ -grpc_error* grpc_call_stack_init(grpc_exec_ctx *exec_ctx, +grpc_error *grpc_call_stack_init(grpc_exec_ctx *exec_ctx, grpc_channel_stack *channel_stack, int initial_refs, grpc_iomgr_cb_func destroy, void *destroy_arg, diff --git a/src/core/lib/channel/compress_filter.c b/src/core/lib/channel/compress_filter.c index bcc8e17a9db..5be32929dad 100644 --- a/src/core/lib/channel/compress_filter.c +++ b/src/core/lib/channel/compress_filter.c @@ -256,7 +256,7 @@ static void compress_start_transport_stream_op(grpc_exec_ctx *exec_ctx, } /* Constructor for call_data */ -static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) { /* grab pointers to our data from the call element */ diff --git a/src/core/lib/channel/connected_channel.c b/src/core/lib/channel/connected_channel.c index 8dde688df2c..ecafcc99c79 100644 --- a/src/core/lib/channel/connected_channel.c +++ b/src/core/lib/channel/connected_channel.c @@ -81,7 +81,7 @@ static void con_start_transport_op(grpc_exec_ctx *exec_ctx, } /* Constructor for call_data */ -static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) { call_data *calld = elem->call_data; @@ -89,9 +89,8 @@ static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, int r = grpc_transport_init_stream( exec_ctx, chand->transport, TRANSPORT_STREAM_FROM_CALL_DATA(calld), &args->call_stack->refcount, args->server_transport_data); - return r == 0 - ? GRPC_ERROR_NONE - : GRPC_ERROR_CREATE("transport initialization failed"); + return r == 0 ? GRPC_ERROR_NONE + : GRPC_ERROR_CREATE("transport initialization failed"); } static void set_pollset_or_pollset_set(grpc_exec_ctx *exec_ctx, diff --git a/src/core/lib/channel/http_client_filter.c b/src/core/lib/channel/http_client_filter.c index 30f4ed1f6fc..7f8ca1dc9f4 100644 --- a/src/core/lib/channel/http_client_filter.c +++ b/src/core/lib/channel/http_client_filter.c @@ -169,7 +169,7 @@ static void hc_start_transport_op(grpc_exec_ctx *exec_ctx, } /* Constructor for call_data */ -static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) { call_data *calld = elem->call_data; diff --git a/src/core/lib/channel/http_server_filter.c b/src/core/lib/channel/http_server_filter.c index 960d1ce45e5..e1f76510b63 100644 --- a/src/core/lib/channel/http_server_filter.c +++ b/src/core/lib/channel/http_server_filter.c @@ -224,7 +224,7 @@ static void hs_start_transport_op(grpc_exec_ctx *exec_ctx, } /* Constructor for call_data */ -static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) { /* grab pointers to our data from the call element */ diff --git a/src/core/lib/security/transport/client_auth_filter.c b/src/core/lib/security/transport/client_auth_filter.c index 6179b9e18cf..bccb8f755e5 100644 --- a/src/core/lib/security/transport/client_auth_filter.c +++ b/src/core/lib/security/transport/client_auth_filter.c @@ -264,7 +264,7 @@ static void auth_start_transport_op(grpc_exec_ctx *exec_ctx, } /* Constructor for call_data */ -static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) { call_data *calld = elem->call_data; diff --git a/src/core/lib/security/transport/server_auth_filter.c b/src/core/lib/security/transport/server_auth_filter.c index 379247131b6..86d4d616371 100644 --- a/src/core/lib/security/transport/server_auth_filter.c +++ b/src/core/lib/security/transport/server_auth_filter.c @@ -199,7 +199,7 @@ static void auth_start_transport_op(grpc_exec_ctx *exec_ctx, } /* Constructor for call_data */ -static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) { /* grab pointers to our data from the call element */ diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index d68afff39f7..f862e8dee99 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -262,18 +262,17 @@ grpc_call *grpc_call_create( call->send_deadline = send_deadline; GRPC_CHANNEL_INTERNAL_REF(channel, "call"); /* initial refcount dropped by grpc_call_destroy */ - grpc_error* error = grpc_call_stack_init(&exec_ctx, channel_stack, 1, - destroy_call, call, call->context, - server_transport_data, - CALL_STACK_FROM_CALL(call)); + grpc_error *error = grpc_call_stack_init( + &exec_ctx, channel_stack, 1, destroy_call, call, call->context, + server_transport_data, CALL_STACK_FROM_CALL(call)); if (error != GRPC_ERROR_NONE) { intptr_t status; if (!grpc_error_get_int(error, GRPC_ERROR_INT_GRPC_STATUS, &status)) status = GRPC_STATUS_UNKNOWN; - const char* error_str = grpc_error_get_str(error, - GRPC_ERROR_STR_DESCRIPTION); + const char *error_str = + grpc_error_get_str(error, GRPC_ERROR_STR_DESCRIPTION); close_with_status(&exec_ctx, call, status, - error_str == NULL ? "unknown error" : error_str); + error_str == NULL ? "unknown error" : error_str); grpc_error_unref(error); } if (cq != NULL) { diff --git a/src/core/lib/surface/lame_client.c b/src/core/lib/surface/lame_client.c index 7d9168f2e0b..1cf18ba0605 100644 --- a/src/core/lib/surface/lame_client.c +++ b/src/core/lib/surface/lame_client.c @@ -107,7 +107,7 @@ static void lame_start_transport_op(grpc_exec_ctx *exec_ctx, GRPC_ERROR_UNREF(op->disconnect_with_error); } -static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) { return GRPC_ERROR_NONE; diff --git a/src/core/lib/surface/server.c b/src/core/lib/surface/server.c index 0a0c224b4d6..165d8aa647a 100644 --- a/src/core/lib/surface/server.c +++ b/src/core/lib/surface/server.c @@ -848,7 +848,7 @@ static void channel_connectivity_changed(grpc_exec_ctx *exec_ctx, void *cd, } } -static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) { call_data *calld = elem->call_data; diff --git a/test/core/channel/channel_stack_test.c b/test/core/channel/channel_stack_test.c index 9c6a47eb520..d6c8a9a1428 100644 --- a/test/core/channel/channel_stack_test.c +++ b/test/core/channel/channel_stack_test.c @@ -53,7 +53,7 @@ static void channel_init_func(grpc_exec_ctx *exec_ctx, *(int *)(elem->channel_data) = 0; } -static grpc_error* call_init_func(grpc_exec_ctx *exec_ctx, +static grpc_error *call_init_func(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) { ++*(int *)(elem->channel_data); @@ -134,9 +134,9 @@ static void test_create_channel_stack(void) { GPR_ASSERT(*channel_data == 0); call_stack = gpr_malloc(channel_stack->call_stack_size); - grpc_error* error = grpc_call_stack_init(&exec_ctx, channel_stack, 1, - free_call, call_stack, NULL, NULL, - call_stack); + grpc_error *error = + grpc_call_stack_init(&exec_ctx, channel_stack, 1, free_call, call_stack, + NULL, NULL, call_stack); GPR_ASSERT(error == GRPC_ERROR_NONE); GPR_ASSERT(call_stack->count == 1); call_elem = grpc_call_stack_element(call_stack, 0); diff --git a/test/core/end2end/tests/filter_call_init_fails.c b/test/core/end2end/tests/filter_call_init_fails.c index d97369fa98b..e8ceb33eb7e 100644 --- a/test/core/end2end/tests/filter_call_init_fails.c +++ b/test/core/end2end/tests/filter_call_init_fails.c @@ -200,7 +200,7 @@ static void test_request(grpc_end2end_test_config config) { * Test filter - always fails to initialize a call */ -static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) { return grpc_error_set_int(GRPC_ERROR_CREATE("access denied"), diff --git a/test/core/end2end/tests/filter_causes_close.c b/test/core/end2end/tests/filter_causes_close.c index 3ff0abed637..8b0c8dba61d 100644 --- a/test/core/end2end/tests/filter_causes_close.c +++ b/test/core/end2end/tests/filter_causes_close.c @@ -233,7 +233,7 @@ static void start_transport_stream_op(grpc_exec_ctx *exec_ctx, grpc_call_next_op(exec_ctx, elem, op); } -static grpc_error* init_call_elem(grpc_exec_ctx *exec_ctx, +static grpc_error *init_call_elem(grpc_exec_ctx *exec_ctx, grpc_call_element *elem, grpc_call_element_args *args) { return GRPC_ERROR_NONE; From abd285aed813ff55329e76a9dc19eb3a1bc86166 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Thu, 23 Jun 2016 13:30:19 -0700 Subject: [PATCH 1291/1894] Added missing todo and moved _service To Implementation --- .../objective-c/route_guide/ViewControllers.m | 28 ++++++++++--------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/examples/objective-c/route_guide/ViewControllers.m b/examples/objective-c/route_guide/ViewControllers.m index a5c03e9cfca..26ca9d6220b 100644 --- a/examples/objective-c/route_guide/ViewControllers.m +++ b/examples/objective-c/route_guide/ViewControllers.m @@ -80,13 +80,14 @@ static NSString * const kHostAddress = @"localhost:50051"; * Run the getFeature demo. Calls getFeature with a point known to have a feature and a point known * not to have a feature. */ -@interface GetFeatureViewController : UIViewController { - RTGRouteGuide *_service; -} +@interface GetFeatureViewController : UIViewController + @property (weak, nonatomic) IBOutlet UILabel *outputLabel; + @end @implementation GetFeatureViewController +RTGRouteGuide *_service; - (void)execRequest { void (^handler)(RTGFeature *response, NSError *error) = ^(RTGFeature *response, NSError *error) { @@ -139,14 +140,14 @@ static NSString * const kHostAddress = @"localhost:50051"; * Run the listFeatures demo. Calls listFeatures with a rectangle containing all of the features in * the pre-generated database. Prints each response as it comes in. */ -@interface ListFeaturesViewController : UIViewController { - RTGRouteGuide *_service; -} +@interface ListFeaturesViewController : UIViewController + @property (weak, nonatomic) IBOutlet UILabel *outputLabel; @end @implementation ListFeaturesViewController +RTGRouteGuide *_service; - (void)execRequest { RTGRectangle *rectangle = [RTGRectangle message]; @@ -193,14 +194,14 @@ static NSString * const kHostAddress = @"localhost:50051"; * database with a variable delay in between. Prints the statistics when they are sent from the * server. */ -@interface RecordRouteViewController : UIViewController { - RTGRouteGuide *_service; -} +@interface RecordRouteViewController : UIViewController + @property (weak, nonatomic) IBOutlet UILabel *outputLabel; @end @implementation RecordRouteViewController +RTGRouteGuide *_service; - (void)execRequest { NSString *dataBasePath = [NSBundle.mainBundle pathForResource:@"route_guide_db" @@ -233,7 +234,7 @@ static NSString * const kHostAddress = @"localhost:50051"; NSLog(@"It took %i seconds", response.elapsedTime); } else { NSString *str =[NSString stringWithFormat:@"%@\nRPC error: %@", self.outputLabel.text, error]; - self.outputLabel.text = str; + self.outputLabel.text = str; NSLog(@"RPC error: %@", error); } }]; @@ -261,14 +262,14 @@ static NSString * const kHostAddress = @"localhost:50051"; * Run the routeChat demo. Send some chat messages, and print any chat messages that are sent from * the server. */ -@interface RouteChatViewController : UIViewController { - RTGRouteGuide *_service; -} +@interface RouteChatViewController : UIViewController + @property (weak, nonatomic) IBOutlet UILabel *outputLabel; @end @implementation RouteChatViewController +RTGRouteGuide *_service; - (void)execRequest { NSArray *notes = @[[RTGRouteNote noteWithMessage:@"First message" latitude:0 longitude:0], @@ -305,6 +306,7 @@ static NSString * const kHostAddress = @"localhost:50051"; } - (void)viewDidAppear:(BOOL)animated { + // TODO(makarandd): Set these properties through UI builder self.outputLabel.text = @"RPC log:"; self.outputLabel.numberOfLines = 0; self.outputLabel.font = [UIFont fontWithName:@"Helvetica Neue" size:8.0]; From f0f70a8a68c107f9fcff2dd35867fd762c2c13d6 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 23 Jun 2016 13:55:06 -0700 Subject: [PATCH 1292/1894] Make transport-level errors be reflected in status messages on calls Allows us to eliminate logging those errors by default (since they are explicitly passed up to the application). Required plumbing errors through the stack a little more deeply than we had previously. --- .../client_config/subchannel_call_holder.c | 7 +- .../chttp2/transport/chttp2_transport.c | 229 +++++++++++------- .../ext/transport/chttp2/transport/internal.h | 3 - src/core/lib/channel/channel_stack.c | 2 +- src/core/lib/iomgr/error.c | 14 ++ src/core/lib/iomgr/error.h | 16 +- .../security/transport/client_auth_filter.c | 3 +- src/core/lib/surface/call.c | 105 ++++---- src/core/lib/surface/completion_queue.c | 2 +- src/core/lib/transport/transport.c | 65 ++--- src/core/lib/transport/transport.h | 9 +- src/core/lib/transport/transport_op_string.c | 15 +- 12 files changed, 279 insertions(+), 191 deletions(-) diff --git a/src/core/ext/client_config/subchannel_call_holder.c b/src/core/ext/client_config/subchannel_call_holder.c index e31800edd98..b96a0ad0937 100644 --- a/src/core/ext/client_config/subchannel_call_holder.c +++ b/src/core/ext/client_config/subchannel_call_holder.c @@ -120,16 +120,13 @@ retry: return; } /* if this is a cancellation, then we can raise our cancelled flag */ - if (op->cancel_with_status != GRPC_STATUS_OK) { + if (op->cancel_error != GRPC_ERROR_NONE) { if (!gpr_atm_rel_cas(&holder->subchannel_call, 0, 1)) { goto retry; } else { switch (holder->creation_phase) { case GRPC_SUBCHANNEL_CALL_HOLDER_NOT_CREATING: - fail_locked(exec_ctx, holder, - grpc_error_set_int(GRPC_ERROR_CREATE("Cancelled"), - GRPC_ERROR_INT_GRPC_STATUS, - op->cancel_with_status)); + fail_locked(exec_ctx, holder, GRPC_ERROR_REF(op->cancel_error)); break; case GRPC_SUBCHANNEL_CALL_HOLDER_PICKING_SUBCHANNEL: holder->pick_subchannel(exec_ctx, holder->pick_subchannel_arg, NULL, diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 9c99ff883af..f34ab98b036 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -106,14 +106,12 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, static void cancel_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, - grpc_status_code status, - gpr_slice *optional_message); + grpc_error *error); static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, - grpc_status_code status, - gpr_slice *optional_message); + grpc_error *error); /** Add endpoint from this transport to pollset */ static void add_to_pollset_locked(grpc_exec_ctx *exec_ctx, @@ -163,8 +161,6 @@ static void destruct_transport(grpc_exec_ctx *exec_ctx, GPR_ASSERT(t->ep == NULL); - gpr_slice_unref(t->optional_drop_message); - gpr_slice_buffer_destroy(&t->global.qbuf); gpr_slice_buffer_destroy(&t->writing.outbuf); @@ -266,7 +262,6 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, is_client ? GRPC_DTS_FH_0 : GRPC_DTS_CLIENT_PREFIX_0; t->parsing.is_first_frame = true; t->writing.is_client = is_client; - t->optional_drop_message = gpr_empty_slice(); grpc_connectivity_state_init( &t->channel_callback.state_tracker, GRPC_CHANNEL_READY, is_client ? "client_transport" : "server_transport"); @@ -876,7 +871,9 @@ static void maybe_start_some_streams( grpc_chttp2_list_pop_waiting_for_concurrency(transport_global, &stream_global)) { cancel_from_api(exec_ctx, transport_global, stream_global, - GRPC_STATUS_UNAVAILABLE, NULL); + grpc_error_set_int( + GRPC_ERROR_CREATE("Stream IDs exhausted"), + GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_UNAVAILABLE)); } } @@ -958,14 +955,14 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, on_complete->next_data.scratch |= CLOSURE_BARRIER_STATS_BIT; } - if (op->cancel_with_status != GRPC_STATUS_OK) { + if (op->cancel_error != GRPC_ERROR_NONE) { cancel_from_api(exec_ctx, transport_global, stream_global, - op->cancel_with_status, op->optional_close_message); + GRPC_ERROR_REF(op->cancel_error)); } - if (op->close_with_status != GRPC_STATUS_OK) { + if (op->close_error != GRPC_ERROR_NONE) { close_from_api(exec_ctx, transport_global, stream_global, - op->close_with_status, op->optional_close_message); + GRPC_ERROR_REF(op->close_error)); } if (op->send_initial_metadata != NULL) { @@ -979,12 +976,16 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, transport_global->settings[GRPC_PEER_SETTINGS] [GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE]; if (metadata_size > metadata_peer_limit) { - gpr_log(GPR_DEBUG, - "to-be-sent initial metadata size exceeds peer limit " - "(%" PRIuPTR " vs. %" PRIuPTR ")", - metadata_size, metadata_peer_limit); - cancel_from_api(exec_ctx, transport_global, stream_global, - GRPC_STATUS_RESOURCE_EXHAUSTED, NULL); + cancel_from_api( + exec_ctx, transport_global, stream_global, + grpc_error_set_int( + grpc_error_set_int( + grpc_error_set_int( + GRPC_ERROR_CREATE("to-be-sent initial metadata size " + "exceeds peer limit"), + GRPC_ERROR_INT_SIZE, (intptr_t)metadata_size), + GRPC_ERROR_INT_LIMIT, (intptr_t)metadata_peer_limit), + GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_RESOURCE_EXHAUSTED)); } else { if (contains_non_ok_status(transport_global, op->send_initial_metadata)) { stream_global->seen_error = true; @@ -1038,12 +1039,16 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, transport_global->settings[GRPC_PEER_SETTINGS] [GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE]; if (metadata_size > metadata_peer_limit) { - gpr_log(GPR_DEBUG, - "to-be-sent trailing metadata size exceeds peer limit " - "(%" PRIuPTR " vs. %" PRIuPTR ")", - metadata_size, metadata_peer_limit); - cancel_from_api(exec_ctx, transport_global, stream_global, - GRPC_STATUS_RESOURCE_EXHAUSTED, NULL); + cancel_from_api( + exec_ctx, transport_global, stream_global, + grpc_error_set_int( + grpc_error_set_int( + grpc_error_set_int( + GRPC_ERROR_CREATE("to-be-sent trailing metadata size " + "exceeds peer limit"), + GRPC_ERROR_INT_SIZE, (intptr_t)metadata_size), + GRPC_ERROR_INT_LIMIT, (intptr_t)metadata_peer_limit), + GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_RESOURCE_EXHAUSTED)); } else { if (contains_non_ok_status(transport_global, op->send_trailing_metadata)) { @@ -1235,8 +1240,12 @@ static void check_read_ops(grpc_exec_ctx *exec_ctx, incoming_byte_stream_destroy_locked(exec_ctx, NULL, NULL, bs); } if (stream_global->exceeded_metadata_size) { - cancel_from_api(exec_ctx, transport_global, stream_global, - GRPC_STATUS_RESOURCE_EXHAUSTED, NULL); + cancel_from_api( + exec_ctx, transport_global, stream_global, + grpc_error_set_int( + GRPC_ERROR_CREATE( + "received initial metadata size exceeds limit"), + GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_RESOURCE_EXHAUSTED)); } } grpc_chttp2_incoming_metadata_buffer_publish( @@ -1275,8 +1284,12 @@ static void check_read_ops(grpc_exec_ctx *exec_ctx, incoming_byte_stream_destroy_locked(exec_ctx, NULL, NULL, bs); } if (stream_global->exceeded_metadata_size) { - cancel_from_api(exec_ctx, transport_global, stream_global, - GRPC_STATUS_RESOURCE_EXHAUSTED, NULL); + cancel_from_api( + exec_ctx, transport_global, stream_global, + grpc_error_set_int( + GRPC_ERROR_CREATE( + "received trailing metadata size exceeds limit"), + GRPC_ERROR_INT_GRPC_STATUS, GRPC_STATUS_RESOURCE_EXHAUSTED)); } } if (stream_global->all_incoming_byte_streams_finished) { @@ -1340,35 +1353,67 @@ static void remove_stream(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, GRPC_ERROR_UNREF(error); } +static void status_codes_from_error(grpc_error *error, + grpc_chttp2_error_code *http2_error, + grpc_status_code *grpc_status) { + intptr_t ip_http; + intptr_t ip_grpc; + bool have_http = + grpc_error_get_int(error, GRPC_ERROR_INT_HTTP2_ERROR, &ip_http); + bool have_grpc = + grpc_error_get_int(error, GRPC_ERROR_INT_GRPC_STATUS, &ip_grpc); + if (have_http) { + *http2_error = (grpc_chttp2_error_code)ip_http; + } else if (have_grpc) { + *http2_error = + grpc_chttp2_grpc_status_to_http2_error((grpc_status_code)ip_grpc); + } else { + *http2_error = GRPC_CHTTP2_INTERNAL_ERROR; + } + if (have_grpc) { + *grpc_status = (grpc_status_code)ip_grpc; + } else if (have_http) { + *grpc_status = + grpc_chttp2_http2_error_to_grpc_status((grpc_chttp2_error_code)ip_http); + } else { + *grpc_status = GRPC_STATUS_INTERNAL; + } +} + static void cancel_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, - grpc_status_code status, - gpr_slice *optional_message) { + grpc_error *due_to_error) { if (!stream_global->read_closed || !stream_global->write_closed) { + grpc_status_code grpc_status; + grpc_chttp2_error_code http_error; + status_codes_from_error(due_to_error, &http_error, &grpc_status); + if (stream_global->id != 0) { gpr_slice_buffer_add( &transport_global->qbuf, - grpc_chttp2_rst_stream_create( - stream_global->id, - (uint32_t)grpc_chttp2_grpc_status_to_http2_error(status), - &stream_global->stats.outgoing)); + grpc_chttp2_rst_stream_create(stream_global->id, (uint32_t)http_error, + &stream_global->stats.outgoing)); } - if (optional_message) { - gpr_slice_ref(*optional_message); + const char *msg = + grpc_error_get_str(due_to_error, GRPC_ERROR_STR_GRPC_MESSAGE); + bool free_msg = false; + if (msg == NULL) { + free_msg = true; + msg = grpc_error_string(due_to_error); } - grpc_chttp2_fake_status(exec_ctx, transport_global, stream_global, status, - optional_message); + gpr_slice msg_slice = gpr_slice_from_copied_string(msg); + grpc_chttp2_fake_status(exec_ctx, transport_global, stream_global, + grpc_status, &msg_slice); + if (free_msg) grpc_error_free_string(msg); } - if (status != GRPC_STATUS_OK && !stream_global->seen_error) { + if (due_to_error != GRPC_ERROR_NONE && !stream_global->seen_error) { stream_global->seen_error = true; grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); } - grpc_chttp2_mark_stream_closed( - exec_ctx, transport_global, stream_global, 1, 1, - grpc_error_set_int(GRPC_ERROR_CREATE("Cancelled"), - GRPC_ERROR_INT_GRPC_STATUS, status)); + grpc_chttp2_mark_stream_closed(exec_ctx, transport_global, stream_global, 1, + 1, due_to_error); } void grpc_chttp2_fake_status(grpc_exec_ctx *exec_ctx, @@ -1469,15 +1514,17 @@ void grpc_chttp2_mark_stream_closed( static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, - grpc_status_code status, - gpr_slice *optional_message) { + grpc_error *error) { gpr_slice hdr; gpr_slice status_hdr; gpr_slice message_pfx; uint8_t *p; uint32_t len = 0; + grpc_status_code grpc_status; + grpc_chttp2_error_code http_error; + status_codes_from_error(error, &http_error, &grpc_status); - GPR_ASSERT(status >= 0 && (int)status < 100); + GPR_ASSERT(grpc_status >= 0 && (int)grpc_status < 100); if (stream_global->id != 0 && !transport_global->is_client) { /* Hand roll a header block. @@ -1487,7 +1534,7 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, time we got around to sending this, so instead we ignore HPACK compression and just write the uncompressed bytes onto the wire. */ - status_hdr = gpr_slice_malloc(15 + (status >= 10)); + status_hdr = gpr_slice_malloc(15 + (grpc_status >= 10)); p = GPR_SLICE_START_PTR(status_hdr); *p++ = 0x40; /* literal header */ *p++ = 11; /* len(grpc-status) */ @@ -1502,19 +1549,23 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, *p++ = 't'; *p++ = 'u'; *p++ = 's'; - if (status < 10) { + if (grpc_status < 10) { *p++ = 1; - *p++ = (uint8_t)('0' + status); + *p++ = (uint8_t)('0' + grpc_status); } else { *p++ = 2; - *p++ = (uint8_t)('0' + (status / 10)); - *p++ = (uint8_t)('0' + (status % 10)); + *p++ = (uint8_t)('0' + (grpc_status / 10)); + *p++ = (uint8_t)('0' + (grpc_status % 10)); } GPR_ASSERT(p == GPR_SLICE_END_PTR(status_hdr)); len += (uint32_t)GPR_SLICE_LENGTH(status_hdr); - if (optional_message) { - GPR_ASSERT(GPR_SLICE_LENGTH(*optional_message) < 127); + const char *optional_message = + grpc_error_get_str(error, GRPC_ERROR_STR_GRPC_MESSAGE); + + if (optional_message != NULL) { + size_t msg_len = strlen(optional_message); + GPR_ASSERT(msg_len < 127); message_pfx = gpr_slice_malloc(15); p = GPR_SLICE_START_PTR(message_pfx); *p++ = 0x40; @@ -1531,10 +1582,10 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, *p++ = 'a'; *p++ = 'g'; *p++ = 'e'; - *p++ = (uint8_t)GPR_SLICE_LENGTH(*optional_message); + *p++ = (uint8_t)msg_len; GPR_ASSERT(p == GPR_SLICE_END_PTR(message_pfx)); len += (uint32_t)GPR_SLICE_LENGTH(message_pfx); - len += (uint32_t)GPR_SLICE_LENGTH(*optional_message); + len += (uint32_t)msg_len; } hdr = gpr_slice_malloc(9); @@ -1555,53 +1606,54 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, if (optional_message) { gpr_slice_buffer_add(&transport_global->qbuf, message_pfx); gpr_slice_buffer_add(&transport_global->qbuf, - gpr_slice_ref(*optional_message)); + gpr_slice_from_copied_string(optional_message)); } gpr_slice_buffer_add( &transport_global->qbuf, grpc_chttp2_rst_stream_create(stream_global->id, GRPC_CHTTP2_NO_ERROR, &stream_global->stats.outgoing)); - - if (optional_message) { - gpr_slice_ref(*optional_message); - } } - grpc_chttp2_fake_status(exec_ctx, transport_global, stream_global, status, - optional_message); - grpc_error *err = GRPC_ERROR_CREATE("Stream closed"); - err = grpc_error_set_int(err, GRPC_ERROR_INT_GRPC_STATUS, status); - if (optional_message) { - char *str = - gpr_dump_slice(*optional_message, GPR_DUMP_HEX | GPR_DUMP_ASCII); - err = grpc_error_set_str(err, GRPC_ERROR_STR_GRPC_MESSAGE, str); - gpr_free(str); + const char *msg = grpc_error_get_str(error, GRPC_ERROR_STR_GRPC_MESSAGE); + bool free_msg = false; + if (msg == NULL) { + free_msg = true; + msg = grpc_error_string(error); } + gpr_slice msg_slice = gpr_slice_from_copied_string(msg); + grpc_chttp2_fake_status(exec_ctx, transport_global, stream_global, + grpc_status, &msg_slice); + if (free_msg) grpc_error_free_string(msg); + grpc_chttp2_mark_stream_closed(exec_ctx, transport_global, stream_global, 1, - 1, err); + 1, error); } +typedef struct { + grpc_exec_ctx *exec_ctx; + grpc_error *error; +} cancel_stream_cb_args; + static void cancel_stream_cb(grpc_chttp2_transport_global *transport_global, void *user_data, grpc_chttp2_stream_global *stream_global) { - grpc_chttp2_transport *transport = TRANSPORT_FROM_GLOBAL(transport_global); - cancel_from_api(user_data, transport_global, stream_global, - GRPC_STATUS_UNAVAILABLE, - GPR_SLICE_IS_EMPTY(transport->optional_drop_message) - ? NULL - : &transport->optional_drop_message); + cancel_stream_cb_args *args = user_data; + cancel_from_api(args->exec_ctx, transport_global, stream_global, + GRPC_ERROR_REF(args->error)); } -static void end_all_the_calls(grpc_exec_ctx *exec_ctx, - grpc_chttp2_transport *t) { - grpc_chttp2_for_all_streams(&t->global, exec_ctx, cancel_stream_cb); +static void end_all_the_calls(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, + grpc_error *error) { + cancel_stream_cb_args args = {exec_ctx, error}; + grpc_chttp2_for_all_streams(&t->global, &args, cancel_stream_cb); + GRPC_ERROR_UNREF(error); } static void drop_connection(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, grpc_error *error) { - close_transport_locked(exec_ctx, t, error); - end_all_the_calls(exec_ctx, t); + close_transport_locked(exec_ctx, t, GRPC_ERROR_REF(error)); + end_all_the_calls(exec_ctx, t, error); } /** update window from a settings change */ @@ -1708,15 +1760,7 @@ static void parsing_action(grpc_exec_ctx *exec_ctx, void *arg, t->read_buffer.slices[i]); }; if (i != t->read_buffer.count) { - gpr_slice_unref(t->optional_drop_message); errors[2] = try_http_parsing(exec_ctx, t); - if (errors[2] != GRPC_ERROR_NONE) { - t->optional_drop_message = gpr_slice_from_copied_string( - "Connection dropped: received http1.x response"); - } else { - t->optional_drop_message = gpr_slice_from_copied_string( - "Connection dropped: received unparseable response"); - } } grpc_error *err = errors[0] == GRPC_ERROR_NONE && errors[1] == GRPC_ERROR_NONE && @@ -1784,6 +1828,10 @@ static void post_reading_action_locked(grpc_exec_ctx *exec_ctx, error = GRPC_ERROR_CREATE("Transport closed"); } if (error != GRPC_ERROR_NONE) { + if (!grpc_error_get_int(error, GRPC_ERROR_INT_GRPC_STATUS, NULL)) { + error = grpc_error_set_int(error, GRPC_ERROR_INT_GRPC_STATUS, + GRPC_STATUS_UNAVAILABLE); + } drop_connection(exec_ctx, t, GRPC_ERROR_REF(error)); t->endpoint_reading = 0; if (!t->executor.writing_active && t->ep) { @@ -1798,6 +1846,7 @@ static void post_reading_action_locked(grpc_exec_ctx *exec_ctx, prevent_endpoint_shutdown(t); } gpr_slice_buffer_reset_and_unref(&t->read_buffer); + GRPC_ERROR_UNREF(error); if (keep_reading) { grpc_endpoint_read(exec_ctx, t->ep, &t->read_buffer, &t->reading_action); @@ -1806,8 +1855,6 @@ static void post_reading_action_locked(grpc_exec_ctx *exec_ctx, } else { UNREF_TRANSPORT(exec_ctx, t, "reading_action"); } - - GRPC_LOG_IF_ERROR("close_transport", error); } /******************************************************************************* diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index d63170e350b..7e281f1b1a2 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -384,9 +384,6 @@ struct grpc_chttp2_transport { /** Transport op to be applied post-parsing */ grpc_transport_op *post_parsing_op; - - /** Message explaining the reason of dropping connection */ - gpr_slice optional_drop_message; }; typedef struct { diff --git a/src/core/lib/channel/channel_stack.c b/src/core/lib/channel/channel_stack.c index bbba85d80ba..42075b127bd 100644 --- a/src/core/lib/channel/channel_stack.c +++ b/src/core/lib/channel/channel_stack.c @@ -263,6 +263,6 @@ void grpc_call_element_send_cancel(grpc_exec_ctx *exec_ctx, grpc_call_element *cur_elem) { grpc_transport_stream_op op; memset(&op, 0, sizeof(op)); - op.cancel_with_status = GRPC_STATUS_CANCELLED; + op.cancel_error = GRPC_ERROR_CANCELLED; grpc_call_next_op(exec_ctx, cur_elem, &op); } diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index 540fb4fa7e4..da0d6972360 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -37,6 +37,7 @@ #include #include +#include #include #include #include @@ -115,6 +116,8 @@ static const char *error_int_name(grpc_error_ints key) { return "wsa_error"; case GRPC_ERROR_INT_HTTP_STATUS: return "http_status"; + case GRPC_ERROR_INT_LIMIT: + return "limit"; } GPR_UNREACHABLE_CODE(return "unknown"); } @@ -271,6 +274,12 @@ grpc_error *grpc_error_set_int(grpc_error *src, grpc_error_ints which, bool grpc_error_get_int(grpc_error *err, grpc_error_ints which, intptr_t *p) { void *pp; + if (is_special(err)) { + if (err == GRPC_ERROR_CANCELLED && which == GRPC_ERROR_INT_GRPC_STATUS) { + return GRPC_STATUS_CANCELLED; + } + return false; + } if (gpr_avl_maybe_get(err->ints, (void *)(uintptr_t)which, &pp)) { if (p != NULL) *p = (intptr_t)pp; return true; @@ -286,6 +295,11 @@ grpc_error *grpc_error_set_str(grpc_error *src, grpc_error_strs which, return new; } +const char *grpc_error_get_str(grpc_error *err, grpc_error_strs which) { + if (is_special(err)) return NULL; + return gpr_avl_get(err->strs, (void *)(uintptr_t)which); +} + grpc_error *grpc_error_add_child(grpc_error *src, grpc_error *child) { grpc_error *new = copy_error_and_unref(src); new->errs = gpr_avl_add(new->errs, (void *)(new->next_err++), child); diff --git a/src/core/lib/iomgr/error.h b/src/core/lib/iomgr/error.h index 69cdf3028e4..13f898e31ad 100644 --- a/src/core/lib/iomgr/error.h +++ b/src/core/lib/iomgr/error.h @@ -92,6 +92,8 @@ typedef enum { GRPC_ERROR_INT_FD, /// HTTP status (i.e. 404) GRPC_ERROR_INT_HTTP_STATUS, + /// context sensitive limit associated with the error + GRPC_ERROR_INT_LIMIT, } grpc_error_ints; typedef enum { @@ -163,23 +165,25 @@ void grpc_error_unref(grpc_error *err); #endif grpc_error *grpc_error_set_int(grpc_error *src, grpc_error_ints which, - intptr_t value); + intptr_t value) GRPC_MUST_USE_RESULT; bool grpc_error_get_int(grpc_error *error, grpc_error_ints which, intptr_t *p); grpc_error *grpc_error_set_time(grpc_error *src, grpc_error_times which, - gpr_timespec value); + gpr_timespec value) GRPC_MUST_USE_RESULT; grpc_error *grpc_error_set_str(grpc_error *src, grpc_error_strs which, - const char *value); + const char *value) GRPC_MUST_USE_RESULT; +const char *grpc_error_get_str(grpc_error *error, grpc_error_strs which); /// Add a child error: an error that is believed to have contributed to this /// error occurring. Allows root causing high level errors from lower level /// errors that contributed to them. -grpc_error *grpc_error_add_child(grpc_error *src, grpc_error *child); +grpc_error *grpc_error_add_child(grpc_error *src, + grpc_error *child) GRPC_MUST_USE_RESULT; grpc_error *grpc_os_error(const char *file, int line, int err, - const char *call_name); + const char *call_name) GRPC_MUST_USE_RESULT; /// create an error associated with errno!=0 (an 'operating system' error) #define GRPC_OS_ERROR(err, call_name) \ grpc_os_error(__FILE__, __LINE__, err, call_name) grpc_error *grpc_wsa_error(const char *file, int line, int err, - const char *call_name); + const char *call_name) GRPC_MUST_USE_RESULT; /// windows only: create an error associated with WSAGetLastError()!=0 #define GRPC_WSA_ERROR(err, call_name) \ grpc_wsa_error(__FILE__, __LINE__, err, call_name) diff --git a/src/core/lib/security/transport/client_auth_filter.c b/src/core/lib/security/transport/client_auth_filter.c index 76be2acd728..e053afc745c 100644 --- a/src/core/lib/security/transport/client_auth_filter.c +++ b/src/core/lib/security/transport/client_auth_filter.c @@ -220,8 +220,7 @@ static void auth_start_transport_op(grpc_exec_ctx *exec_ctx, grpc_linked_mdelem *l; grpc_client_security_context *sec_ctx = NULL; - if (calld->security_context_set == 0 && - op->cancel_with_status == GRPC_STATUS_OK) { + if (calld->security_context_set == 0 && op->cancel_error == GRPC_ERROR_NONE) { calld->security_context_set = 1; GPR_ASSERT(op->context); if (op->context[GRPC_CONTEXT_SECURITY].value == NULL) { diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 04291b0ee0a..77c17a4975b 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -402,8 +402,50 @@ static void set_status_code(grpc_call *call, status_source source, call->status[source].is_set = 1; call->status[source].code = (grpc_status_code)status; +} + +static void set_status_details(grpc_call *call, status_source source, + grpc_mdstr *status) { + if (call->status[source].details != NULL) { + GRPC_MDSTR_UNREF(call->status[source].details); + } + call->status[source].details = status; +} + +static void get_final_status(grpc_call *call, + void (*set_value)(grpc_status_code code, + void *user_data), + void *set_value_user_data) { + int i; + for (i = 0; i < STATUS_SOURCE_COUNT; i++) { + if (call->status[i].is_set) { + set_value(call->status[i].code, set_value_user_data); + return; + } + } + if (call->is_client) { + set_value(GRPC_STATUS_UNKNOWN, set_value_user_data); + } else { + set_value(GRPC_STATUS_OK, set_value_user_data); + } +} - /* TODO(ctiller): what to do about the flush that was previously here */ +static void set_status_from_error(grpc_call *call, status_source source, + grpc_error *error) { + intptr_t status; + if (grpc_error_get_int(error, GRPC_ERROR_INT_GRPC_STATUS, &status)) { + set_status_code(call, source, (uint32_t)status); + } else { + set_status_code(call, source, GRPC_STATUS_INTERNAL); + } + const char *msg = grpc_error_get_str(error, GRPC_ERROR_STR_GRPC_MESSAGE); + bool free_msg = false; + if (msg == NULL) { + free_msg = true; + msg = grpc_error_string(error); + } + set_status_details(call, source, grpc_mdstr_from_string(msg)); + if (free_msg) grpc_error_free_string(msg); } static void set_incoming_compression_algorithm( @@ -492,32 +534,6 @@ uint32_t grpc_call_test_only_get_encodings_accepted_by_peer(grpc_call *call) { return encodings_accepted_by_peer; } -static void set_status_details(grpc_call *call, status_source source, - grpc_mdstr *status) { - if (call->status[source].details != NULL) { - GRPC_MDSTR_UNREF(call->status[source].details); - } - call->status[source].details = status; -} - -static void get_final_status(grpc_call *call, - void (*set_value)(grpc_status_code code, - void *user_data), - void *set_value_user_data) { - int i; - for (i = 0; i < STATUS_SOURCE_COUNT; i++) { - if (call->status[i].is_set) { - set_value(call->status[i].code, set_value_user_data); - return; - } - } - if (call->is_client) { - set_value(GRPC_STATUS_UNKNOWN, set_value_user_data); - } else { - set_value(GRPC_STATUS_OK, set_value_user_data); - } -} - static void get_final_details(grpc_call *call, char **out_details, size_t *out_details_capacity) { int i; @@ -741,8 +757,7 @@ grpc_call_error grpc_call_cancel_with_status(grpc_call *c, typedef struct termination_closure { grpc_closure closure; grpc_call *call; - grpc_status_code status; - gpr_slice optional_message; + grpc_error *error; grpc_closure *op_closure; enum { TC_CANCEL, TC_CLOSE } type; } termination_closure; @@ -758,7 +773,7 @@ static void done_termination(grpc_exec_ctx *exec_ctx, void *tcp, GRPC_CALL_INTERNAL_UNREF(exec_ctx, tc->call, "close"); break; } - gpr_slice_unref(tc->optional_message); + GRPC_ERROR_UNREF(tc->error); grpc_exec_ctx_sched(exec_ctx, tc->op_closure, GRPC_ERROR_NONE, NULL); gpr_free(tc); } @@ -767,7 +782,7 @@ static void send_cancel(grpc_exec_ctx *exec_ctx, void *tcp, grpc_error *error) { grpc_transport_stream_op op; termination_closure *tc = tcp; memset(&op, 0, sizeof(op)); - op.cancel_with_status = tc->status; + op.cancel_error = tc->error; /* reuse closure to catch completion */ grpc_closure_init(&tc->closure, done_termination, tc); op.on_complete = &tc->closure; @@ -778,8 +793,7 @@ static void send_close(grpc_exec_ctx *exec_ctx, void *tcp, grpc_error *error) { grpc_transport_stream_op op; termination_closure *tc = tcp; memset(&op, 0, sizeof(op)); - tc->optional_message = gpr_slice_ref(tc->optional_message); - grpc_transport_stream_op_add_close(&op, tc->status, &tc->optional_message); + op.close_error = tc->error; /* reuse closure to catch completion */ grpc_closure_init(&tc->closure, done_termination, tc); tc->op_closure = op.on_complete; @@ -789,14 +803,7 @@ static void send_close(grpc_exec_ctx *exec_ctx, void *tcp, grpc_error *error) { static grpc_call_error terminate_with_status(grpc_exec_ctx *exec_ctx, termination_closure *tc) { - grpc_mdstr *details = NULL; - if (GPR_SLICE_LENGTH(tc->optional_message) > 0) { - tc->optional_message = gpr_slice_ref(tc->optional_message); - details = grpc_mdstr_from_slice(tc->optional_message); - } - - set_status_code(tc->call, STATUS_FROM_API_OVERRIDE, (uint32_t)tc->status); - set_status_details(tc->call, STATUS_FROM_API_OVERRIDE, details); + set_status_from_error(tc->call, STATUS_FROM_API_OVERRIDE, tc->error); if (tc->type == TC_CANCEL) { grpc_closure_init(&tc->closure, send_cancel, tc); @@ -812,13 +819,15 @@ static grpc_call_error terminate_with_status(grpc_exec_ctx *exec_ctx, static grpc_call_error cancel_with_status(grpc_exec_ctx *exec_ctx, grpc_call *c, grpc_status_code status, const char *description) { + GPR_ASSERT(status != GRPC_STATUS_OK); termination_closure *tc = gpr_malloc(sizeof(*tc)); memset(tc, 0, sizeof(termination_closure)); tc->type = TC_CANCEL; tc->call = c; - tc->optional_message = gpr_slice_from_copied_string(description); - GPR_ASSERT(status != GRPC_STATUS_OK); - tc->status = status; + tc->error = grpc_error_set_int( + grpc_error_set_str(GRPC_ERROR_CREATE(description), + GRPC_ERROR_STR_GRPC_MESSAGE, description), + GRPC_ERROR_INT_GRPC_STATUS, status); return terminate_with_status(exec_ctx, tc); } @@ -826,13 +835,15 @@ static grpc_call_error cancel_with_status(grpc_exec_ctx *exec_ctx, grpc_call *c, static grpc_call_error close_with_status(grpc_exec_ctx *exec_ctx, grpc_call *c, grpc_status_code status, const char *description) { + GPR_ASSERT(status != GRPC_STATUS_OK); termination_closure *tc = gpr_malloc(sizeof(*tc)); memset(tc, 0, sizeof(termination_closure)); tc->type = TC_CLOSE; tc->call = c; - tc->optional_message = gpr_slice_from_copied_string(description); - GPR_ASSERT(status != GRPC_STATUS_OK); - tc->status = status; + tc->error = grpc_error_set_int( + grpc_error_set_str(GRPC_ERROR_CREATE(description), + GRPC_ERROR_STR_GRPC_MESSAGE, description), + GRPC_ERROR_INT_GRPC_STATUS, status); return terminate_with_status(exec_ctx, tc); } diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index 2cc6aa74e02..db8010ef9a1 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -240,7 +240,7 @@ void grpc_cq_end_op(grpc_exec_ctx *exec_ctx, grpc_completion_queue *cc, "grpc_cq_end_op(exec_ctx=%p, cc=%p, tag=%p, error=%s, done=%p, " "done_arg=%p, storage=%p)", 7, (exec_ctx, cc, tag, errmsg, done, done_arg, storage)); - if (grpc_trace_operation_failures) { + if (grpc_trace_operation_failures && error != GRPC_ERROR_NONE) { gpr_log(GPR_ERROR, "Operation failed: tag=%p, error=%s", tag, errmsg); } grpc_error_free_string(errmsg); diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c index 1105494a85c..67920b05279 100644 --- a/src/core/lib/transport/transport.c +++ b/src/core/lib/transport/transport.c @@ -36,6 +36,7 @@ #include #include #include +#include "src/core/lib/support/string.h" #include "src/core/lib/transport/transport_impl.h" #ifdef GRPC_STREAM_REFCOUNT_DEBUG @@ -162,55 +163,63 @@ void grpc_transport_stream_op_finish_with_failure(grpc_exec_ctx *exec_ctx, grpc_exec_ctx_sched(exec_ctx, op->on_complete, error, NULL); } -void grpc_transport_stream_op_add_cancellation(grpc_transport_stream_op *op, - grpc_status_code status) { - GPR_ASSERT(status != GRPC_STATUS_OK); - if (op->cancel_with_status == GRPC_STATUS_OK) { - op->cancel_with_status = status; - } - if (op->close_with_status != GRPC_STATUS_OK) { - op->close_with_status = GRPC_STATUS_OK; - if (op->optional_close_message != NULL) { - gpr_slice_unref(*op->optional_close_message); - op->optional_close_message = NULL; - } - } -} - typedef struct { - gpr_slice message; + grpc_error *error; grpc_closure *then_call; grpc_closure closure; } close_message_data; static void free_message(grpc_exec_ctx *exec_ctx, void *p, grpc_error *error) { close_message_data *cmd = p; - gpr_slice_unref(cmd->message); + GRPC_ERROR_UNREF(cmd->error); if (cmd->then_call != NULL) { cmd->then_call->cb(exec_ctx, cmd->then_call->cb_arg, GRPC_ERROR_REF(error)); } gpr_free(cmd); } +static void add_error(grpc_transport_stream_op *op, grpc_error **which, + grpc_error *error) { + close_message_data *cmd; + cmd = gpr_malloc(sizeof(*cmd)); + cmd->error = error; + cmd->then_call = op->on_complete; + grpc_closure_init(&cmd->closure, free_message, cmd); + op->on_complete = &cmd->closure; + *which = error; +} + +void grpc_transport_stream_op_add_cancellation(grpc_transport_stream_op *op, + grpc_status_code status) { + GPR_ASSERT(status != GRPC_STATUS_OK); + if (op->cancel_error == GRPC_STATUS_OK) { + op->cancel_error = grpc_error_set_int(GRPC_ERROR_CANCELLED, + GRPC_ERROR_INT_GRPC_STATUS, status); + op->close_error = GRPC_ERROR_NONE; + } +} + void grpc_transport_stream_op_add_close(grpc_transport_stream_op *op, grpc_status_code status, gpr_slice *optional_message) { - close_message_data *cmd; GPR_ASSERT(status != GRPC_STATUS_OK); - if (op->cancel_with_status != GRPC_STATUS_OK || - op->close_with_status != GRPC_STATUS_OK) { + if (op->cancel_error != GRPC_ERROR_NONE || + op->close_error != GRPC_ERROR_NONE) { if (optional_message) { gpr_slice_unref(*optional_message); } return; } - if (optional_message) { - cmd = gpr_malloc(sizeof(*cmd)); - cmd->message = *optional_message; - cmd->then_call = op->on_complete; - grpc_closure_init(&cmd->closure, free_message, cmd); - op->on_complete = &cmd->closure; - op->optional_close_message = &cmd->message; + grpc_error *error; + if (optional_message != NULL) { + char *msg = gpr_dump_slice(*optional_message, GPR_DUMP_ASCII); + error = grpc_error_set_str(GRPC_ERROR_CREATE(msg), + GRPC_ERROR_STR_GRPC_MESSAGE, msg); + gpr_free(msg); + gpr_slice_unref(*optional_message); + } else { + error = GRPC_ERROR_CREATE("Call force closed"); } - op->close_with_status = status; + error = grpc_error_set_int(error, GRPC_ERROR_INT_GRPC_STATUS, status); + add_error(op, &op->close_error, error); } diff --git a/src/core/lib/transport/transport.h b/src/core/lib/transport/transport.h index a46ccb643ce..d2f6344ee3c 100644 --- a/src/core/lib/transport/transport.h +++ b/src/core/lib/transport/transport.h @@ -135,13 +135,12 @@ typedef struct grpc_transport_stream_op { /** Collect any stats into provided buffer, zero internal stat counters */ grpc_transport_stream_stats *collect_stats; - /** If != GRPC_STATUS_OK, cancel this stream */ - grpc_status_code cancel_with_status; + /** If != GRPC_ERROR_NONE, cancel this stream */ + grpc_error *cancel_error; - /** If != GRPC_STATUS_OK, send grpc-status, grpc-message, and close this + /** If != GRPC_ERROR, send grpc-status, grpc-message, and close this stream for both reading and writing */ - grpc_status_code close_with_status; - gpr_slice *optional_close_message; + grpc_error *close_error; /* Indexes correspond to grpc_context_index enum values */ grpc_call_context_element *context; diff --git a/src/core/lib/transport/transport_op_string.c b/src/core/lib/transport/transport_op_string.c index df04c611270..a862401df2c 100644 --- a/src/core/lib/transport/transport_op_string.c +++ b/src/core/lib/transport/transport_op_string.c @@ -119,10 +119,21 @@ char *grpc_transport_stream_op_string(grpc_transport_stream_op *op) { gpr_strvec_add(&b, gpr_strdup("RECV_TRAILING_METADATA")); } - if (op->cancel_with_status != GRPC_STATUS_OK) { + if (op->cancel_error != GRPC_STATUS_OK) { if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); first = 0; - gpr_asprintf(&tmp, "CANCEL:%d", op->cancel_with_status); + const char *msg = grpc_error_string(op->cancel_error); + gpr_asprintf(&tmp, "CANCEL:%s", msg); + grpc_error_free_string(msg); + gpr_strvec_add(&b, tmp); + } + + if (op->close_error != GRPC_STATUS_OK) { + if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); + first = 0; + const char *msg = grpc_error_string(op->close_error); + gpr_asprintf(&tmp, "CLOSE:%s", msg); + grpc_error_free_string(msg); gpr_strvec_add(&b, tmp); } From 5a3c6389edeaf19e7e0f0a6c0771c7548f0e0997 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Thu, 23 Jun 2016 14:02:33 -0700 Subject: [PATCH 1293/1894] Added braces around _service --- .../objective-c/route_guide/ViewControllers.m | 20 +++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/examples/objective-c/route_guide/ViewControllers.m b/examples/objective-c/route_guide/ViewControllers.m index 26ca9d6220b..b2f99c437e7 100644 --- a/examples/objective-c/route_guide/ViewControllers.m +++ b/examples/objective-c/route_guide/ViewControllers.m @@ -86,8 +86,9 @@ static NSString * const kHostAddress = @"localhost:50051"; @end -@implementation GetFeatureViewController -RTGRouteGuide *_service; +@implementation GetFeatureViewController { + RTGRouteGuide *_service; +} - (void)execRequest { void (^handler)(RTGFeature *response, NSError *error) = ^(RTGFeature *response, NSError *error) { @@ -146,8 +147,9 @@ RTGRouteGuide *_service; @end -@implementation ListFeaturesViewController -RTGRouteGuide *_service; +@implementation ListFeaturesViewController { + RTGRouteGuide *_service; +} - (void)execRequest { RTGRectangle *rectangle = [RTGRectangle message]; @@ -200,8 +202,9 @@ RTGRouteGuide *_service; @end -@implementation RecordRouteViewController -RTGRouteGuide *_service; +@implementation RecordRouteViewController { + RTGRouteGuide *_service; +} - (void)execRequest { NSString *dataBasePath = [NSBundle.mainBundle pathForResource:@"route_guide_db" @@ -268,8 +271,9 @@ RTGRouteGuide *_service; @end -@implementation RouteChatViewController -RTGRouteGuide *_service; +@implementation RouteChatViewController { + RTGRouteGuide *_service; +} - (void)execRequest { NSArray *notes = @[[RTGRouteNote noteWithMessage:@"First message" latitude:0 longitude:0], From 733e3fc209f78695896b2d721069afad866cd2f7 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 23 Jun 2016 14:07:11 -0700 Subject: [PATCH 1294/1894] Fix comparison --- src/core/lib/transport/transport_op_string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/lib/transport/transport_op_string.c b/src/core/lib/transport/transport_op_string.c index a862401df2c..aede337e7cb 100644 --- a/src/core/lib/transport/transport_op_string.c +++ b/src/core/lib/transport/transport_op_string.c @@ -119,7 +119,7 @@ char *grpc_transport_stream_op_string(grpc_transport_stream_op *op) { gpr_strvec_add(&b, gpr_strdup("RECV_TRAILING_METADATA")); } - if (op->cancel_error != GRPC_STATUS_OK) { + if (op->cancel_error != GRPC_ERROR_NONE) { if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); first = 0; const char *msg = grpc_error_string(op->cancel_error); @@ -128,7 +128,7 @@ char *grpc_transport_stream_op_string(grpc_transport_stream_op *op) { gpr_strvec_add(&b, tmp); } - if (op->close_error != GRPC_STATUS_OK) { + if (op->close_error != GRPC_ERROR_NONE) { if (!first) gpr_strvec_add(&b, gpr_strdup(" ")); first = 0; const char *msg = grpc_error_string(op->close_error); From ea0dc6af37469a45c2750df4bf852d12d75e9240 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Thu, 23 Jun 2016 14:10:38 -0700 Subject: [PATCH 1295/1894] Added a comment --- src/objective-c/GRPCClient/private/GRPCChannel.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objective-c/GRPCClient/private/GRPCChannel.m b/src/objective-c/GRPCClient/private/GRPCChannel.m index 6cd4cb0ca30..7b7b79e1c62 100644 --- a/src/objective-c/GRPCClient/private/GRPCChannel.m +++ b/src/objective-c/GRPCClient/private/GRPCChannel.m @@ -199,7 +199,7 @@ grpc_channel_args * buildChannelArgs(NSDictionary *dictionary) { NULL, GRPC_PROPAGATE_DEFAULTS, queue.unmanagedQueue, path.UTF8String, - NULL, + NULL, // Passing NULL for host gpr_inf_future(GPR_CLOCK_REALTIME), NULL); } From eb429c3067e54b0dcdae21d005a4e98a022caad8 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Thu, 23 Jun 2016 14:18:49 -0700 Subject: [PATCH 1296/1894] Removed gpr_log statement --- src/core/lib/iomgr/network_status_tracker.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/core/lib/iomgr/network_status_tracker.c b/src/core/lib/iomgr/network_status_tracker.c index 0e34605c81d..38a1c9b7d41 100644 --- a/src/core/lib/iomgr/network_status_tracker.c +++ b/src/core/lib/iomgr/network_status_tracker.c @@ -64,7 +64,6 @@ void grpc_network_status_register_endpoint(grpc_endpoint *ep) { grpc_initialize_network_status_monitor(); } gpr_mu_lock(&g_endpoint_mutex); - gpr_log(GPR_DEBUG, "Register endpoint %p", ep); if (head == NULL) { head = (endpoint_ll_node *)gpr_malloc(sizeof(endpoint_ll_node)); head->ep = ep; @@ -81,7 +80,6 @@ void grpc_network_status_register_endpoint(grpc_endpoint *ep) { void grpc_network_status_unregister_endpoint(grpc_endpoint *ep) { gpr_mu_lock(&g_endpoint_mutex); GPR_ASSERT(head); - gpr_log(GPR_DEBUG, "Unregister endpoint %p", ep); bool found = false; endpoint_ll_node *prev = head; // if we're unregistering the head, just move head to the next @@ -116,7 +114,6 @@ void grpc_network_status_shutdown_all_endpoints() { grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; for (endpoint_ll_node *curr = head; curr != NULL; curr = curr->next) { - gpr_log(GPR_DEBUG, "Shutting down endpoint %p", curr->ep); curr->ep->vtable->shutdown(&exec_ctx, curr->ep); } gpr_mu_unlock(&g_endpoint_mutex); From 565c6a0dacf0e1c8434dc88617e8c838108791d4 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Thu, 23 Jun 2016 14:22:12 -0700 Subject: [PATCH 1297/1894] Bump Protobuf to beta-3.1 --- .gitmodules | 2 +- gRPC-ProtoRPC.podspec | 2 +- src/objective-c/examples/RemoteTestClient/RemoteTest.podspec | 2 +- src/objective-c/tests/RemoteTestClient/RemoteTest.podspec | 2 +- third_party/protobuf | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.gitmodules b/.gitmodules index c85a53943a7..1e1876b724e 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,7 +4,7 @@ [submodule "third_party/protobuf"] path = third_party/protobuf url = https://github.com/google/protobuf.git - branch = v3.0.0-beta-2 + branch = v3.0.0-beta-3.1 [submodule "third_party/gflags"] path = third_party/gflags url = https://github.com/gflags/gflags.git diff --git a/gRPC-ProtoRPC.podspec b/gRPC-ProtoRPC.podspec index 6f66f928e6b..9cc33c7dbd0 100644 --- a/gRPC-ProtoRPC.podspec +++ b/gRPC-ProtoRPC.podspec @@ -61,7 +61,7 @@ Pod::Spec.new do |s| s.dependency 'gRPC', version s.dependency 'gRPC-RxLibrary', version - s.dependency 'Protobuf', '~> 3.0.0-beta-2' + s.dependency 'Protobuf', '~> 3.0.0-beta-3.1' # This is needed by all pods that depend on Protobuf: s.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1', diff --git a/src/objective-c/examples/RemoteTestClient/RemoteTest.podspec b/src/objective-c/examples/RemoteTestClient/RemoteTest.podspec index 18a9443944a..e3b50ddea50 100644 --- a/src/objective-c/examples/RemoteTestClient/RemoteTest.podspec +++ b/src/objective-c/examples/RemoteTestClient/RemoteTest.podspec @@ -19,7 +19,7 @@ Pod::Spec.new do |s| ms.source_files = '*.pbobjc.{h,m}' ms.header_mappings_dir = '.' ms.requires_arc = false - ms.dependency 'Protobuf', '~> 3.0.0-beta-2' + ms.dependency 'Protobuf', '~> 3.0.0-beta-3.1' # This is needed by all pods that depend on Protobuf: ms.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1', diff --git a/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec b/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec index 8e72b2c8fe3..887380eb55f 100644 --- a/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec +++ b/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec @@ -22,7 +22,7 @@ Pod::Spec.new do |s| ms.source_files = "*.pbobjc.{h,m}" ms.header_mappings_dir = "." ms.requires_arc = false - ms.dependency "Protobuf", "~> 3.0.0-beta-2" + ms.dependency "Protobuf", "~> 3.0.0-beta-3.1" # This is needed by all pods that depend on Protobuf: ms.pod_target_xcconfig = { 'GCC_PREPROCESSOR_DEFINITIONS' => '$(inherited) GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS=1', diff --git a/third_party/protobuf b/third_party/protobuf index 3470b6895aa..137d6a09bbb 160000 --- a/third_party/protobuf +++ b/third_party/protobuf @@ -1 +1 @@ -Subproject commit 3470b6895aa659b7559ed678e029a5338e535f14 +Subproject commit 137d6a09bbbbfa801d653224703ddc59e3700704 From 67e2525892c57be3b20d517810c25a5e861cb515 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 23 Jun 2016 14:30:40 -0700 Subject: [PATCH 1298/1894] Fix handling of one error in bidi calls, and one interop server method --- src/ruby/lib/grpc/generic/bidi_call.rb | 8 ++++++++ src/ruby/pb/test/server.rb | 12 +++++++----- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/ruby/lib/grpc/generic/bidi_call.rb b/src/ruby/lib/grpc/generic/bidi_call.rb index f4f9d1b3ddc..e2a026cacc0 100644 --- a/src/ruby/lib/grpc/generic/bidi_call.rb +++ b/src/ruby/lib/grpc/generic/bidi_call.rb @@ -173,6 +173,14 @@ module GRPC finished end GRPC.logger.debug('bidi-write-loop: finished') + rescue GRPC::Core::CallError => e + # This is almost definitely caused by a status arriving while still + # writing. Don't re-throw the error + GRPC.logger.warn('bidi-write-loop: ended with error') + GRPC.logger.warn(e) + notify_done + @writes_complete = true + finished rescue StandardError => e GRPC.logger.warn('bidi-write-loop: failed') GRPC.logger.warn(e) diff --git a/src/ruby/pb/test/server.rb b/src/ruby/pb/test/server.rb index 914c7cc79d7..088f281dc47 100755 --- a/src/ruby/pb/test/server.rb +++ b/src/ruby/pb/test/server.rb @@ -188,11 +188,13 @@ class TestTarget < Grpc::Testing::TestService::Service begin GRPC.logger.info('interop-server: started receiving') reqs.each do |req| - resp_size = req.response_parameters[0].size - GRPC.logger.info("read a req, response size is #{resp_size}") - resp = cls.new(payload: Payload.new(type: req.response_type, - body: nulls(resp_size))) - q.push(resp) + req.response_parameters.each do |params| + resp_size = params.size + GRPC.logger.info("read a req, response size is #{resp_size}") + resp = cls.new(payload: Payload.new(type: req.response_type, + body: nulls(resp_size))) + q.push(resp) + end end GRPC.logger.info('interop-server: finished receiving') q.push(self) From d4d4c6f6f62a547da9136f57ddd6406facaf4ce5 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 23 Jun 2016 14:37:30 -0700 Subject: [PATCH 1299/1894] Fix comparison --- src/core/lib/transport/transport.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c index 67920b05279..79a20e12626 100644 --- a/src/core/lib/transport/transport.c +++ b/src/core/lib/transport/transport.c @@ -192,7 +192,7 @@ static void add_error(grpc_transport_stream_op *op, grpc_error **which, void grpc_transport_stream_op_add_cancellation(grpc_transport_stream_op *op, grpc_status_code status) { GPR_ASSERT(status != GRPC_STATUS_OK); - if (op->cancel_error == GRPC_STATUS_OK) { + if (op->cancel_error == GRPC_ERROR_NONE) { op->cancel_error = grpc_error_set_int(GRPC_ERROR_CANCELLED, GRPC_ERROR_INT_GRPC_STATUS, status); op->close_error = GRPC_ERROR_NONE; From 20d0a167beb287f61a7f33943fddfc34cae75860 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 23 Jun 2016 15:14:03 -0700 Subject: [PATCH 1300/1894] Better error handling and add polling_island_unlock_pair() helper --- src/core/lib/iomgr/ev_epoll_linux.c | 300 +++++++++++++++++----------- 1 file changed, 182 insertions(+), 118 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index b1e9ac8a631..a77044edc50 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -237,6 +237,19 @@ struct grpc_pollset_set { grpc_fd **fds; }; +/******************************************************************************* + * Common helpers + */ + +static void append_error(grpc_error **composite, grpc_error *error, + const char *desc) { + if (error == GRPC_ERROR_NONE) return; + if (*composite == GRPC_ERROR_NONE) { + *composite = GRPC_ERROR_CREATE(desc); + } + *composite = grpc_error_add_child(*composite, error); +} + /******************************************************************************* * Polling island Definitions */ @@ -316,10 +329,13 @@ long pi_unref(polling_island *pi, int ref_cnt) { /* The caller is expected to hold pi->mu lock before calling this function */ static void polling_island_add_fds_locked(polling_island *pi, grpc_fd **fds, - size_t fd_count, bool add_fd_refs) { + size_t fd_count, bool add_fd_refs, + grpc_error **error) { int err; size_t i; struct epoll_event ev; + char *err_msg; + const char *err_desc = "polling_island_add_fds"; #ifdef GRPC_TSAN /* See the definition of g_epoll_sync for more context */ @@ -333,10 +349,12 @@ static void polling_island_add_fds_locked(polling_island *pi, grpc_fd **fds, if (err < 0) { if (errno != EEXIST) { - /* TODO: sreek - We need a better way to bubble up this error instead of - just logging a message */ - gpr_log(GPR_ERROR, "epoll_ctl add for fd: %d failed with error: %s", - fds[i]->fd, strerror(errno)); + gpr_asprintf( + &err_msg, + "epoll_ctl (epoll_fd: %d) add fd: %d failed with error: %d (%s)", + pi->epoll_fd, fds[i]->fd, errno, strerror(errno)); + append_error(error, GRPC_OS_ERROR(errno, err_msg), err_desc); + gpr_free(err_msg); } continue; @@ -356,37 +374,47 @@ static void polling_island_add_fds_locked(polling_island *pi, grpc_fd **fds, /* The caller is expected to hold pi->mu before calling this */ static void polling_island_add_wakeup_fd_locked(polling_island *pi, - grpc_wakeup_fd *wakeup_fd) { + grpc_wakeup_fd *wakeup_fd, + grpc_error **error) { struct epoll_event ev; int err; + char *err_msg; + const char *err_desc = "polling_island_add_wakeup_fd"; ev.events = (uint32_t)(EPOLLIN | EPOLLET); ev.data.ptr = wakeup_fd; err = epoll_ctl(pi->epoll_fd, EPOLL_CTL_ADD, GRPC_WAKEUP_FD_GET_READ_FD(wakeup_fd), &ev); - if (err < 0) { - gpr_log(GPR_ERROR, - "Failed to add grpc_wake_up_fd (%d) to the epoll set (epoll_fd: %d)" - ". Error: %s", - GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd), pi->epoll_fd, - strerror(errno)); + if (err < 0 && errno != EEXIST) { + gpr_asprintf(&err_msg, + "epoll_ctl (epoll_fd: %d) add wakeup fd: %d failed with " + "error: %d (%s)", + pi->epoll_fd, + GRPC_WAKEUP_FD_GET_READ_FD(&grpc_global_wakeup_fd), errno, + strerror(errno)); + append_error(error, GRPC_OS_ERROR(errno, err_msg), err_desc); + gpr_free(err_msg); } } /* The caller is expected to hold pi->mu lock before calling this function */ static void polling_island_remove_all_fds_locked(polling_island *pi, - bool remove_fd_refs) { + bool remove_fd_refs, + grpc_error **error) { int err; size_t i; + char *err_msg; + const char *err_desc = "polling_island_remove_fds"; for (i = 0; i < pi->fd_cnt; i++) { err = epoll_ctl(pi->epoll_fd, EPOLL_CTL_DEL, pi->fds[i]->fd, NULL); if (err < 0 && errno != ENOENT) { - /* TODO: sreek - We need a better way to bubble up this error instead of - * just logging a message */ - gpr_log(GPR_ERROR, - "epoll_ctl deleting fds[%zu]: %d failed with error: %s", i, - pi->fds[i]->fd, strerror(errno)); + gpr_asprintf(&err_msg, + "epoll_ctl (epoll_fd: %d) delete fds[%zu]: %d failed with " + "error: %d (%s)", + pi->epoll_fd, i, pi->fds[i]->fd, errno, strerror(errno)); + append_error(error, GRPC_OS_ERROR(errno, err_msg), err_desc); + gpr_free(err_msg); } if (remove_fd_refs) { @@ -399,17 +427,24 @@ static void polling_island_remove_all_fds_locked(polling_island *pi, /* The caller is expected to hold pi->mu lock before calling this function */ static void polling_island_remove_fd_locked(polling_island *pi, grpc_fd *fd, - bool is_fd_closed) { + bool is_fd_closed, + grpc_error **error) { int err; size_t i; + char *err_msg; + const char *err_desc = "polling_island_remove_fd"; /* If fd is already closed, then it would have been automatically been removed from the epoll set */ if (!is_fd_closed) { err = epoll_ctl(pi->epoll_fd, EPOLL_CTL_DEL, fd->fd, NULL); if (err < 0 && errno != ENOENT) { - gpr_log(GPR_ERROR, "epoll_ctl deleting fd: %d failed with error; %s", - fd->fd, strerror(errno)); + gpr_asprintf( + &err_msg, + "epoll_ctl (epoll_fd: %d) del fd: %d failed with error: %d (%s)", + pi->epoll_fd, fd->fd, errno, strerror(errno)); + append_error(error, GRPC_OS_ERROR(errno, err_msg), err_desc); + gpr_free(err_msg); } } @@ -422,8 +457,12 @@ static void polling_island_remove_fd_locked(polling_island *pi, grpc_fd *fd, } } -static polling_island *polling_island_create(grpc_fd *initial_fd) { +/* Might return NULL in case of an error */ +static polling_island *polling_island_create(grpc_fd *initial_fd, + grpc_error **error) { polling_island *pi = NULL; + char *err_msg; + const char *err_desc = "polling_island_create"; /* Try to get one from the polling island freelist */ gpr_mu_lock(&g_pi_freelist_mu); @@ -449,22 +488,22 @@ static polling_island *polling_island_create(grpc_fd *initial_fd) { pi->epoll_fd = epoll_create1(EPOLL_CLOEXEC); if (pi->epoll_fd < 0) { - gpr_log(GPR_ERROR, "epoll_create1() failed with error: %s", - strerror(errno)); - } - GPR_ASSERT(pi->epoll_fd >= 0); - - polling_island_add_wakeup_fd_locked(pi, &grpc_global_wakeup_fd); - - pi->next_free = NULL; + gpr_asprintf(&err_msg, "epoll_create1 failed with error %d (%s)", errno, + strerror(errno)); + append_error(error, GRPC_OS_ERROR(errno, err_msg), err_desc); + gpr_free(err_msg); + } else { + polling_island_add_wakeup_fd_locked(pi, &grpc_global_wakeup_fd, error); + pi->next_free = NULL; - if (initial_fd != NULL) { - /* Lock the polling island here just in case we got this structure from the - freelist and the polling island lock was not released yet (by the code - that adds the polling island to the freelist) */ - gpr_mu_lock(&pi->mu); - polling_island_add_fds_locked(pi, &initial_fd, 1, true); - gpr_mu_unlock(&pi->mu); + if (initial_fd != NULL) { + /* Lock the polling island here just in case we got this structure from + the freelist and the polling island lock was not released yet (by the + code that adds the polling island to the freelist) */ + gpr_mu_lock(&pi->mu); + polling_island_add_fds_locked(pi, &initial_fd, 1, true, error); + gpr_mu_unlock(&pi->mu); + } } return pi; @@ -534,7 +573,9 @@ static polling_island *polling_island_lock(polling_island *pi) { return pi; } -/* Gets the lock on the *latest* polling islands pointed by *p and *q. +/* Gets the lock on the *latest* polling islands in the linked lists pointed by + *p and *q (and also updates *p and *q to point to the latest polling islands) + This function is needed because calling the following block of code to obtain locks on polling islands (*p and *q) is prone to deadlocks. { @@ -550,18 +591,8 @@ static polling_island *polling_island_lock(polling_island *pi) { .. .. Critical section with both p1 and p2 locked .. - // Release locks - // **IMPORTANT**: Make sure you check p1 == p2 AFTER the function - // polling_island_lock_pair() was called and if so, release the lock only - // once. Note: Even if p1 != p2 beforec calling polling_island_lock_pair(), - // they might be after the function returns: - if (p1 == p2) { - gpr_mu_unlock(&p1->mu) - } else { - gpr_mu_unlock(&p1->mu); - gpr_mu_unlock(&p2->mu); - } - + // Release locks: Always call polling_island_unlock_pair() to release locks + polling_island_unlock_pair(p1, p2); */ static void polling_island_lock_pair(polling_island **p, polling_island **q) { polling_island *pi_1 = *p; @@ -623,39 +654,46 @@ static void polling_island_lock_pair(polling_island **p, polling_island **q) { *q = pi_2; } -static polling_island *polling_island_merge(polling_island *p, - polling_island *q) { - /* Get locks on both the polling islands */ - polling_island_lock_pair(&p, &q); - +static void polling_island_unlock_pair(polling_island *p, polling_island *q) { if (p == q) { - /* Nothing needs to be done here */ gpr_mu_unlock(&p->mu); - return p; + } else { + gpr_mu_unlock(&p->mu); + gpr_mu_unlock(&q->mu); } +} - /* Make sure that p points to the polling island with fewer fds than q */ - if (p->fd_cnt > q->fd_cnt) { - GPR_SWAP(polling_island *, p, q); - } +static polling_island *polling_island_merge(polling_island *p, + polling_island *q, + grpc_error **error) { + /* Get locks on both the polling islands */ + polling_island_lock_pair(&p, &q); - /* "Merge" p with q i.e move all the fds from p (The one with fewer fds) to q - Note that the refcounts on the fds being moved will not change here. This - is why the last parameter in the following two functions is 'false') */ - polling_island_add_fds_locked(q, p->fds, p->fd_cnt, false); - polling_island_remove_all_fds_locked(p, false); + if (p != q) { + /* Make sure that p points to the polling island with fewer fds than q */ + if (p->fd_cnt > q->fd_cnt) { + GPR_SWAP(polling_island *, p, q); + } + + /* Merge p with q i.e move all the fds from p (The one with fewer fds) to q + Note that the refcounts on the fds being moved will not change here. + This is why the last param in the following two functions is 'false') */ + polling_island_add_fds_locked(q, p->fds, p->fd_cnt, false, error); + polling_island_remove_all_fds_locked(p, false, error); - /* Wakeup all the pollers (if any) on p so that they can pickup this change */ - polling_island_add_wakeup_fd_locked(p, &polling_island_wakeup_fd); + /* Wakeup all the pollers (if any) on p so that they pickup this change */ + polling_island_add_wakeup_fd_locked(p, &polling_island_wakeup_fd, error); - /* Add the 'merged_to' link from p --> q */ - gpr_atm_rel_store(&p->merged_to, (gpr_atm)q); - PI_ADD_REF(q, "pi_merge"); /* To account for the new incoming ref from p */ + /* Add the 'merged_to' link from p --> q */ + gpr_atm_rel_store(&p->merged_to, (gpr_atm)q); + PI_ADD_REF(q, "pi_merge"); /* To account for the new incoming ref from p */ + } + /* else if p == q, nothing needs to be done */ - gpr_mu_unlock(&p->mu); - gpr_mu_unlock(&q->mu); + polling_island_unlock_pair(p, q); - /* Return the merged polling island */ + /* Return the merged polling island (Note that no merge would have happened + if p == q which is ok) */ return q; } @@ -853,6 +891,8 @@ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *on_done, int *release_fd, const char *reason) { bool is_fd_closed = false; + grpc_error *error = GRPC_ERROR_NONE; + gpr_mu_lock(&fd->mu); fd->on_done_closure = on_done; @@ -882,7 +922,7 @@ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, gpr_mu_lock(&fd->pi_mu); if (fd->polling_island != NULL) { polling_island *pi_latest = polling_island_lock(fd->polling_island); - polling_island_remove_fd_locked(pi_latest, fd, is_fd_closed); + polling_island_remove_fd_locked(pi_latest, fd, is_fd_closed, &error); gpr_mu_unlock(&pi_latest->mu); PI_UNREF(fd->polling_island, "fd_orphan"); @@ -890,10 +930,11 @@ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, } gpr_mu_unlock(&fd->pi_mu); - grpc_exec_ctx_sched(exec_ctx, fd->on_done_closure, GRPC_ERROR_NONE, NULL); + grpc_exec_ctx_sched(exec_ctx, fd->on_done_closure, error, NULL); gpr_mu_unlock(&fd->mu); UNREF_BY(fd, 2, reason); /* Drop the reference */ + GRPC_LOG_IF_ERROR("fd_orphan", GRPC_ERROR_REF(error)); } static grpc_error *fd_shutdown_error(bool shutdown) { @@ -1062,19 +1103,12 @@ static void push_front_worker(grpc_pollset *p, grpc_pollset_worker *worker) { worker->prev->next = worker->next->prev = worker; } -static void kick_append_error(grpc_error **composite, grpc_error *error) { - if (error == GRPC_ERROR_NONE) return; - if (*composite == GRPC_ERROR_NONE) { - *composite = GRPC_ERROR_CREATE("Kick Failure"); - } - *composite = grpc_error_add_child(*composite, error); -} - /* p->mu must be held before calling this function */ static grpc_error *pollset_kick(grpc_pollset *p, grpc_pollset_worker *specific_worker) { GPR_TIMER_BEGIN("pollset_kick", 0); grpc_error *error = GRPC_ERROR_NONE; + const char *err_desc = "Kick Failure"; grpc_pollset_worker *worker = specific_worker; if (worker != NULL) { @@ -1084,7 +1118,7 @@ static grpc_error *pollset_kick(grpc_pollset *p, for (worker = p->root_worker.next; worker != &p->root_worker; worker = worker->next) { if (gpr_tls_get(&g_current_thread_worker) != (intptr_t)worker) { - kick_append_error(&error, pollset_worker_kick(worker)); + append_error(&error, pollset_worker_kick(worker), err_desc); } } } else { @@ -1094,7 +1128,7 @@ static grpc_error *pollset_kick(grpc_pollset *p, } else { GPR_TIMER_MARK("kicked_specifically", 0); if (gpr_tls_get(&g_current_thread_worker) != (intptr_t)worker) { - kick_append_error(&error, pollset_worker_kick(worker)); + append_error(&error, pollset_worker_kick(worker), err_desc); } } } else if (gpr_tls_get(&g_current_thread_pollset) != (intptr_t)p) { @@ -1110,7 +1144,7 @@ static grpc_error *pollset_kick(grpc_pollset *p, if (worker != NULL) { GPR_TIMER_MARK("finally_kick", 0); push_back_worker(p, worker); - kick_append_error(&error, pollset_worker_kick(worker)); + append_error(&error, pollset_worker_kick(worker), err_desc); } else { GPR_TIMER_MARK("kicked_no_pollers", 0); p->kicked_without_pollers = true; @@ -1238,23 +1272,17 @@ static void pollset_reset(grpc_pollset *pollset) { pollset_release_polling_island(pollset, "ps_reset"); } -static void work_combine_error(grpc_error **composite, grpc_error *error) { - if (error == GRPC_ERROR_NONE) return; - if (*composite == GRPC_ERROR_NONE) { - *composite = GRPC_ERROR_CREATE("pollset_work"); - } - *composite = grpc_error_add_child(*composite, error); -} - #define GRPC_EPOLL_MAX_EVENTS 1000 -static grpc_error *pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, - grpc_pollset *pollset, - int timeout_ms, sigset_t *sig_mask) { +/* Note: sig_mask contains the signal mask to use *during* epoll_wait() */ +static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, + grpc_pollset *pollset, int timeout_ms, + sigset_t *sig_mask, grpc_error **error) { struct epoll_event ep_ev[GRPC_EPOLL_MAX_EVENTS]; int epoll_fd = -1; int ep_rv; polling_island *pi = NULL; - grpc_error *error = GRPC_ERROR_NONE; + char *err_msg; + const char *err_desc = "pollset_work_and_unlock"; GPR_TIMER_BEGIN("pollset_work_and_unlock", 0); /* We need to get the epoll_fd to wait on. The epoll_fd is in inside the @@ -1265,11 +1293,15 @@ static grpc_error *pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, which we got the epoll_fd) got merged with another island while we are in this function. This is still okay because in such a case, we will wakeup right-away from epoll_wait() and pick up the latest polling_island the next - this function (i.e pollset_work_and_unlock()) is called. - */ + this function (i.e pollset_work_and_unlock()) is called */ if (pollset->polling_island == NULL) { - pollset->polling_island = polling_island_create(NULL); + pollset->polling_island = polling_island_create(NULL, error); + if (pollset->polling_island == NULL) { + GPR_TIMER_END("pollset_work_and_unlock", 0); + return; /* Fatal error. We cannot continue */ + } + PI_ADD_REF(pollset->polling_island, "ps"); } @@ -1297,8 +1329,10 @@ static grpc_error *pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, sig_mask); if (ep_rv < 0) { if (errno != EINTR) { - gpr_log(GPR_ERROR, "epoll_pwait() failed: %s", strerror(errno)); - work_combine_error(&error, GRPC_OS_ERROR(errno, "epoll_pwait")); + gpr_asprintf(&err_msg, + "epoll_wait() epoll fd: %d failed with error: %d (%s)", + epoll_fd, errno, strerror(errno)); + append_error(error, GRPC_OS_ERROR(errno, err_msg), err_desc); } else { /* We were interrupted. Save an interation by doing a zero timeout epoll_wait to see if there are any other events of interest */ @@ -1314,8 +1348,9 @@ static grpc_error *pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, for (int i = 0; i < ep_rv; ++i) { void *data_ptr = ep_ev[i].data.ptr; if (data_ptr == &grpc_global_wakeup_fd) { - work_combine_error( - &error, grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd)); + append_error(error, + grpc_wakeup_fd_consume_wakeup(&grpc_global_wakeup_fd), + err_desc); } else if (data_ptr == &polling_island_wakeup_fd) { /* This means that our polling island is merged with a different island. We do not have to do anything here since the subsequent call @@ -1346,7 +1381,6 @@ static grpc_error *pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, PI_UNREF(pi, "ps_work"); GPR_TIMER_END("pollset_work_and_unlock", 0); - return error; } /* pollset->mu lock must be held by the caller before calling this. @@ -1368,6 +1402,7 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, worker.pt_id = pthread_self(); *worker_hdl = &worker; + gpr_tls_set(&g_current_thread_pollset, (intptr_t)pollset); gpr_tls_set(&g_current_thread_worker, (intptr_t)&worker); @@ -1379,14 +1414,37 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, GPR_TIMER_MARK("pollset_work.kicked_without_pollers", 0); pollset->kicked_without_pollers = 0; } else if (!pollset->shutting_down) { + /* We use the posix-signal with number 'grpc_wakeup_signal' for waking up + (i.e 'kicking') a worker in the pollset. + A 'kick' is a way to inform that worker that there is some pending work + that needs immediate attention (like an event on the completion queue, + or a polling island merge that results in a new epoll-fd to wait on) and + that the worker should not spend time waiting in epoll_pwait(). + + A kick can come at anytime (i.e before/during or after the worker calls + epoll_pwait()) but in all cases we have to make sure that when a worker + gets a kick, it does not spend time in epoll_pwait(). In other words, one + kick should result in skipping/exiting of one epoll_pwait(); + + To accomplish this, we mask 'grpc_wakeup_signal' on this worker at all + times *except* when it is in epoll_pwait(). This way, the worker never + misses acting on a kick */ + sigemptyset(&new_mask); sigaddset(&new_mask, grpc_wakeup_signal); pthread_sigmask(SIG_BLOCK, &new_mask, &orig_mask); sigdelset(&orig_mask, grpc_wakeup_signal); + /* new_mask: The new thread mask which blocks 'grpc_wakeup_signal'. This is + the mask used at all times *except during epoll_wait()*" + orig_mask: The thread mask which allows 'grpc_wakeup_signal' and this is + the mask to use *during epoll_wait()* + + The new_mask is set on the worker before it is added to the pollset (i.e + before it can be kicked) */ - push_front_worker(pollset, &worker); + push_front_worker(pollset, &worker); /* Add worker to pollset */ - error = pollset_work_and_unlock(exec_ctx, pollset, timeout_ms, &orig_mask); + pollset_work_and_unlock(exec_ctx, pollset, timeout_ms, &orig_mask, &error); grpc_exec_ctx_flush(exec_ctx); gpr_mu_lock(&pollset->mu); @@ -1412,15 +1470,20 @@ static grpc_error *pollset_work(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, } *worker_hdl = NULL; + gpr_tls_set(&g_current_thread_pollset, (intptr_t)0); gpr_tls_set(&g_current_thread_worker, (intptr_t)0); + GPR_TIMER_END("pollset_work", 0); + GRPC_LOG_IF_ERROR("pollset_work", GRPC_ERROR_REF(error)); return error; } static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_fd *fd) { + grpc_error *error = GRPC_ERROR_NONE; + gpr_mu_lock(&pollset->mu); gpr_mu_lock(&fd->pi_mu); @@ -1443,19 +1506,23 @@ static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, if (fd->polling_island == pollset->polling_island) { pi_new = fd->polling_island; if (pi_new == NULL) { - pi_new = polling_island_create(fd); + pi_new = polling_island_create(fd, &error); } } else if (fd->polling_island == NULL) { pi_new = polling_island_lock(pollset->polling_island); - polling_island_add_fds_locked(pi_new, &fd, 1, true); + polling_island_add_fds_locked(pi_new, &fd, 1, true, &error); gpr_mu_unlock(&pi_new->mu); } else if (pollset->polling_island == NULL) { pi_new = polling_island_lock(fd->polling_island); gpr_mu_unlock(&pi_new->mu); } else { - pi_new = polling_island_merge(fd->polling_island, pollset->polling_island); + pi_new = polling_island_merge(fd->polling_island, pollset->polling_island, + &error); } + /* At this point, pi_new is the polling island that both fd->polling_island + and pollset->polling_island must be pointing to */ + if (fd->polling_island != pi_new) { PI_ADD_REF(pi_new, "fd"); if (fd->polling_island != NULL) { @@ -1645,13 +1712,10 @@ bool grpc_are_polling_islands_equal(void *p, void *q) { polling_island *p1 = p; polling_island *p2 = q; + /* Note: polling_island_lock_pair() may change p1 and p2 to point to the + latest polling islands in their respective linked lists */ polling_island_lock_pair(&p1, &p2); - if (p1 == p2) { - gpr_mu_unlock(&p1->mu); - } else { - gpr_mu_unlock(&p1->mu); - gpr_mu_unlock(&p2->mu); - } + polling_island_unlock_pair(p1, p2); return p1 == p2; } From 74189cd94b49be086e9320bf9536ab4bacfa6d61 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 23 Jun 2016 15:39:06 -0700 Subject: [PATCH 1301/1894] Remove caching of results by run_tests SIGNIFICANTLY increases the performance of actually running tests... --- tools/run_tests/jobset.py | 68 ++++++++---------------------------- tools/run_tests/run_tests.py | 63 ++------------------------------- 2 files changed, 18 insertions(+), 113 deletions(-) diff --git a/tools/run_tests/jobset.py b/tools/run_tests/jobset.py index d3259e724df..40409c43948 100755 --- a/tools/run_tests/jobset.py +++ b/tools/run_tests/jobset.py @@ -29,7 +29,6 @@ """Run a group of subprocesses and then finish.""" -import hashlib import multiprocessing import os import platform @@ -149,7 +148,7 @@ def which(filename): class JobSpec(object): """Specifies what to run for a job.""" - def __init__(self, cmdline, shortname=None, environ=None, hash_targets=None, + def __init__(self, cmdline, shortname=None, environ=None, cwd=None, shell=False, timeout_seconds=5*60, flake_retries=0, timeout_retries=0, kill_handler=None, cpu_cost=1.0, verbose_success=False): @@ -157,19 +156,14 @@ class JobSpec(object): Arguments: cmdline: a list of arguments to pass as the command line environ: a dictionary of environment variables to set in the child process - hash_targets: which files to include in the hash representing the jobs version - (or empty, indicating the job should not be hashed) kill_handler: a handler that will be called whenever job.kill() is invoked cpu_cost: number of cores per second this job needs """ if environ is None: environ = {} - if hash_targets is None: - hash_targets = [] self.cmdline = cmdline self.environ = environ self.shortname = cmdline[0] if shortname is None else shortname - self.hash_targets = hash_targets or [] self.cwd = cwd self.shell = shell self.timeout_seconds = timeout_seconds @@ -180,7 +174,7 @@ class JobSpec(object): self.verbose_success = verbose_success def identity(self): - return '%r %r %r' % (self.cmdline, self.environ, self.hash_targets) + return '%r %r' % (self.cmdline, self.environ) def __hash__(self): return hash(self.identity()) @@ -205,9 +199,8 @@ class JobResult(object): class Job(object): """Manages one job.""" - def __init__(self, spec, bin_hash, newline_on_success, travis, add_env): + def __init__(self, spec, newline_on_success, travis, add_env): self._spec = spec - self._bin_hash = bin_hash self._newline_on_success = newline_on_success self._travis = travis self._add_env = add_env.copy() @@ -249,7 +242,7 @@ class Job(object): self._process = try_start() self._state = _RUNNING - def state(self, update_cache): + def state(self): """Poll current state of the job. Prints messages at completion.""" def stdout(self=self): self._tempfile.seek(0) @@ -293,8 +286,6 @@ class Job(object): stdout() if self._spec.verbose_success else None, do_newline=self._newline_on_success or self._travis) self.result.state = 'PASSED' - if self._bin_hash: - update_cache.finished(self._spec.identity(), self._bin_hash) elif (self._state == _RUNNING and self._spec.timeout_seconds is not None and time.time() - self._start > self._spec.timeout_seconds): @@ -329,7 +320,7 @@ class Jobset(object): """Manages one run of jobs.""" def __init__(self, check_cancelled, maxjobs, newline_on_success, travis, - stop_on_failure, add_env, cache): + stop_on_failure, add_env): self._running = set() self._check_cancelled = check_cancelled self._cancelled = False @@ -338,9 +329,7 @@ class Jobset(object): self._maxjobs = maxjobs self._newline_on_success = newline_on_success self._travis = travis - self._cache = cache self._stop_on_failure = stop_on_failure - self._hashes = {} self._add_env = add_env self.resultset = {} self._remaining = None @@ -367,37 +356,21 @@ class Jobset(object): if current_cpu_cost + spec.cpu_cost <= self._maxjobs: break self.reap() if self.cancelled(): return False - if spec.hash_targets: - if spec.identity() in self._hashes: - bin_hash = self._hashes[spec.identity()] - else: - bin_hash = hashlib.sha1() - for fn in spec.hash_targets: - with open(which(fn)) as f: - bin_hash.update(f.read()) - bin_hash = bin_hash.hexdigest() - self._hashes[spec.identity()] = bin_hash - should_run = self._cache.should_run(spec.identity(), bin_hash) - else: - bin_hash = None - should_run = True - if should_run: - job = Job(spec, - bin_hash, - self._newline_on_success, - self._travis, - self._add_env) - self._running.add(job) - if not self.resultset.has_key(job.GetSpec().shortname): - self.resultset[job.GetSpec().shortname] = [] - return True + job = Job(spec, + self._newline_on_success, + self._travis, + self._add_env) + self._running.add(job) + if not self.resultset.has_key(job.GetSpec().shortname): + self.resultset[job.GetSpec().shortname] = [] + return True def reap(self): """Collect the dead jobs.""" while self._running: dead = set() for job in self._running: - st = job.state(self._cache) + st = job.state() if st == _RUNNING: continue if st == _FAILURE or st == _KILLED: self._failures += 1 @@ -450,15 +423,6 @@ def _never_cancelled(): return False -# cache class that caches nothing -class NoCache(object): - def should_run(self, cmdline, bin_hash): - return True - - def finished(self, cmdline, bin_hash): - pass - - def tag_remaining(xs): staging = [] for x in xs: @@ -477,12 +441,10 @@ def run(cmdlines, travis=False, infinite_runs=False, stop_on_failure=False, - cache=None, add_env={}): js = Jobset(check_cancelled, maxjobs if maxjobs is not None else _DEFAULT_MAX_JOBS, - newline_on_success, travis, stop_on_failure, add_env, - cache if cache is not None else NoCache()) + newline_on_success, travis, stop_on_failure, add_env) for cmdline, remaining in tag_remaining(cmdlines): if not js.start(cmdline): break diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index e4779e3a4e8..c571a81eb28 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -33,7 +33,6 @@ import argparse import ast import glob -import hashlib import itertools import json import multiprocessing @@ -78,24 +77,18 @@ class Config(object): if environ is None: environ = {} self.build_config = config - self.allow_hashing = (config != 'gcov') self.environ = environ self.environ['CONFIG'] = config self.tool_prefix = tool_prefix self.timeout_multiplier = timeout_multiplier - def job_spec(self, cmdline, hash_targets, timeout_seconds=5*60, + def job_spec(self, cmdline, timeout_seconds=5*60, shortname=None, environ={}, cpu_cost=1.0, flaky=False): """Construct a jobset.JobSpec for a test under this config Args: cmdline: a list of strings specifying the command line the test would like to run - hash_targets: either None (don't do caching of test results), or - a list of strings specifying files to include in a - binary hash to check if a test has changed - -- if used, all artifacts needed to run the test must - be listed """ actual_environ = self.environ.copy() for k, v in environ.iteritems(): @@ -105,8 +98,6 @@ class Config(object): environ=actual_environ, cpu_cost=cpu_cost, timeout_seconds=(self.timeout_multiplier * timeout_seconds if timeout_seconds else None), - hash_targets=hash_targets - if self.allow_hashing else None, flake_retries=5 if flaky or args.allow_flakes else 0, timeout_retries=3 if args.allow_flakes else 0) @@ -425,7 +416,7 @@ class PythonLanguage(object): return [] def build_steps(self): - return [['tools/run_tests/build_python.sh', tox_env] + return [['tools/run_tests/build_python.sh', tox_env] for tox_env in self._tox_envs] def post_tests_steps(self): @@ -1058,46 +1049,6 @@ runs_per_test = args.runs_per_test forever = args.forever -class TestCache(object): - """Cache for running tests.""" - - def __init__(self, use_cache_results): - self._last_successful_run = {} - self._use_cache_results = use_cache_results - self._last_save = time.time() - - def should_run(self, cmdline, bin_hash): - if cmdline not in self._last_successful_run: - return True - if self._last_successful_run[cmdline] != bin_hash: - return True - if not self._use_cache_results: - return True - return False - - def finished(self, cmdline, bin_hash): - self._last_successful_run[cmdline] = bin_hash - if time.time() - self._last_save > 1: - self.save() - - def dump(self): - return [{'cmdline': k, 'hash': v} - for k, v in self._last_successful_run.iteritems()] - - def parse(self, exdump): - self._last_successful_run = dict((o['cmdline'], o['hash']) for o in exdump) - - def save(self): - with open('.run_tests_cache', 'w') as f: - f.write(json.dumps(self.dump())) - self._last_save = time.time() - - def maybe_load(self): - if os.path.exists('.run_tests_cache'): - with open('.run_tests_cache') as f: - self.parse(json.loads(f.read())) - - def _start_port_server(port_server_port): # check if a compatible port server is running # if incompatible (version mismatch) ==> start a new one @@ -1217,7 +1168,7 @@ class BuildAndRunError(object): # returns a list of things that failed (or an empty list on success) def _build_and_run( - check_cancelled, newline_on_success, cache, xml_report=None, build_only=False): + check_cancelled, newline_on_success, xml_report=None, build_only=False): """Do one pass of building & running tests.""" # build latest sequentially num_failures, resultset = jobset.run( @@ -1266,7 +1217,6 @@ def _build_and_run( all_runs, check_cancelled, newline_on_success=newline_on_success, travis=args.travis, infinite_runs=infinite_runs, maxjobs=args.jobs, stop_on_failure=args.stop_on_failure, - cache=cache if not xml_report else None, add_env={'GRPC_TEST_PORT_SERVER': 'localhost:%d' % port_server_port}) if resultset: for k, v in sorted(resultset.items()): @@ -1295,14 +1245,9 @@ def _build_and_run( if num_test_failures: out.append(BuildAndRunError.TEST) - if cache: cache.save() - return out -test_cache = TestCache(runs_per_test == 1) -test_cache.maybe_load() - if forever: success = True while True: @@ -1312,7 +1257,6 @@ if forever: previous_success = success errors = _build_and_run(check_cancelled=have_files_changed, newline_on_success=False, - cache=test_cache, build_only=args.build_only) == 0 if not previous_success and not errors: jobset.message('SUCCESS', @@ -1324,7 +1268,6 @@ if forever: else: errors = _build_and_run(check_cancelled=lambda: False, newline_on_success=args.newline_on_success, - cache=test_cache, xml_report=args.xml_report, build_only=args.build_only) if not errors: From 98d31d1a40fe0d320f2488794d97a0bad5a8060d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 23 Jun 2016 15:43:22 -0700 Subject: [PATCH 1302/1894] Fix special value lookup --- src/core/lib/iomgr/error.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index da0d6972360..9f5ba76fd6c 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -276,7 +276,8 @@ bool grpc_error_get_int(grpc_error *err, grpc_error_ints which, intptr_t *p) { void *pp; if (is_special(err)) { if (err == GRPC_ERROR_CANCELLED && which == GRPC_ERROR_INT_GRPC_STATUS) { - return GRPC_STATUS_CANCELLED; + *p = GRPC_STATUS_CANCELLED; + return true; } return false; } From 6a29545c8c5ef61346af3a9b0bdd2ddb39ba15c8 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Thu, 23 Jun 2016 15:53:10 -0700 Subject: [PATCH 1303/1894] Change the type of 'ref_count' in polling_island from gpr_atm to gpr_refcount --- src/core/lib/iomgr/ev_epoll_linux.c | 69 +++++++++++++---------------- 1 file changed, 31 insertions(+), 38 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index a77044edc50..4dca551e1e1 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -121,6 +121,7 @@ struct grpc_fd { }; /* Reference counting for fds */ +// #define GRPC_FD_REF_COUNT_DEBUG #ifdef GRPC_FD_REF_COUNT_DEBUG static void fd_ref(grpc_fd *fd, const char *reason, const char *file, int line); static void fd_unref(grpc_fd *fd, const char *reason, const char *file, @@ -147,13 +148,13 @@ static void fd_global_shutdown(void); // #define GRPC_PI_REF_COUNT_DEBUG #ifdef GRPC_PI_REF_COUNT_DEBUG -#define PI_ADD_REF(p, r) pi_add_ref_dbg((p), 1, (r), __FILE__, __LINE__) -#define PI_UNREF(p, r) pi_unref_dbg((p), 1, (r), __FILE__, __LINE__) +#define PI_ADD_REF(p, r) pi_add_ref_dbg((p), (r), __FILE__, __LINE__) +#define PI_UNREF(p, r) pi_unref_dbg((p), (r), __FILE__, __LINE__) #else /* defined(GRPC_PI_REF_COUNT_DEBUG) */ -#define PI_ADD_REF(p, r) pi_add_ref((p), 1) -#define PI_UNREF(p, r) pi_unref((p), 1) +#define PI_ADD_REF(p, r) pi_add_ref((p)) +#define PI_UNREF(p, r) pi_unref((p)) #endif /* !defined(GPRC_PI_REF_COUNT_DEBUG) */ @@ -164,7 +165,7 @@ typedef struct polling_island { Once the ref count becomes zero, this structure is destroyed which means we should ensure that there is never a scenario where a PI_ADD_REF() is racing with a PI_UNREF() that just made the ref_count zero. */ - gpr_atm ref_count; + gpr_refcount ref_count; /* Pointer to the polling_island this merged into. * merged_to value is only set once in polling_island's lifetime (and that too @@ -281,50 +282,42 @@ gpr_atm g_epoll_sync; #endif /* defined(GRPC_TSAN) */ #ifdef GRPC_PI_REF_COUNT_DEBUG -long pi_add_ref(polling_island *pi, int ref_cnt); -long pi_unref(polling_island *pi, int ref_cnt); +void pi_add_ref(polling_island *pi); +void pi_unref(polling_island *pi); -void pi_add_ref_dbg(polling_island *pi, int ref_cnt, char *reason, char *file, - int line) { - long old_cnt = pi_add_ref(pi, ref_cnt); - gpr_log(GPR_DEBUG, "Add ref pi: %p, old:%ld -> new:%ld (%s) - (%s, %d)", - (void *)pi, old_cnt, (old_cnt + ref_cnt), reason, file, line); +void pi_add_ref_dbg(polling_island *pi, char *reason, char *file, int line) { + long old_cnt = gpr_atm_acq_load(&(pi->ref_count.count)); + pi_add_ref(pi); + gpr_log(GPR_DEBUG, "Add ref pi: %p, old: %ld -> new:%ld (%s) - (%s, %d)", + (void *)pi, old_cnt, old_cnt + 1, reason, file, line); } -void pi_unref_dbg(polling_island *pi, int ref_cnt, char *reason, char *file, - int line) { - long old_cnt = pi_unref(pi, ref_cnt); +void pi_unref_dbg(polling_island *pi, char *reason, char *file, int line) { + long old_cnt = gpr_atm_acq_load(&(pi->ref_count.count)); + pi_unref(pi); gpr_log(GPR_DEBUG, "Unref pi: %p, old:%ld -> new:%ld (%s) - (%s, %d)", - (void *)pi, old_cnt, (old_cnt - ref_cnt), reason, file, line); + (void *)pi, old_cnt, (old_cnt - 1), reason, file, line); } #endif -long pi_add_ref(polling_island *pi, int ref_cnt) { - return gpr_atm_full_fetch_add(&pi->ref_count, ref_cnt); -} - -long pi_unref(polling_island *pi, int ref_cnt) { - long old_cnt = gpr_atm_full_fetch_add(&pi->ref_count, -ref_cnt); +void pi_add_ref(polling_island *pi) { gpr_ref(&pi->ref_count); } - /* If ref count went to zero, delete the polling island. Note that this need - not be done under a lock. Once the ref count goes to zero, we are - guaranteed that no one else holds a reference to the polling island (and - that there is no racing pi_add_ref() call either. +void pi_unref(polling_island *pi) { + /* If ref count went to zero, delete the polling island. + Note that this deletion not be done under a lock. Once the ref count goes + to zero, we are guaranteed that no one else holds a reference to the + polling island (and that there is no racing pi_add_ref() call either). Also, if we are deleting the polling island and the merged_to field is non-empty, we should remove a ref to the merged_to polling island */ - if (old_cnt == ref_cnt) { + if (gpr_unref(&pi->ref_count)) { polling_island *next = (polling_island *)gpr_atm_acq_load(&pi->merged_to); polling_island_delete(pi); if (next != NULL) { PI_UNREF(next, "pi_delete"); /* Recursive call */ } - } else { - GPR_ASSERT(old_cnt > ref_cnt); } - - return old_cnt; } /* The caller is expected to hold pi->mu lock before calling this function */ @@ -482,7 +475,7 @@ static polling_island *polling_island_create(grpc_fd *initial_fd, pi->fds = NULL; } - gpr_atm_rel_store(&pi->ref_count, (gpr_atm)0); + gpr_ref_init(&pi->ref_count, 0); gpr_atm_rel_store(&pi->merged_to, (gpr_atm)NULL); pi->epoll_fd = epoll_create1(EPOLL_CLOEXEC); @@ -762,8 +755,8 @@ static gpr_mu fd_freelist_mu; #define UNREF_BY(fd, n, reason) unref_by(fd, n, reason, __FILE__, __LINE__) static void ref_by(grpc_fd *fd, int n, const char *reason, const char *file, int line) { - gpr_log(GPR_DEBUG, "FD %d %p ref %d %d -> %d [%s; %s:%d]", fd->fd, fd, n, - gpr_atm_no_barrier_load(&fd->refst), + gpr_log(GPR_DEBUG, "FD %d %p ref %d %ld -> %ld [%s; %s:%d]", fd->fd, + (void *)fd, n, gpr_atm_no_barrier_load(&fd->refst), gpr_atm_no_barrier_load(&fd->refst) + n, reason, file, line); #else #define REF_BY(fd, n, reason) ref_by(fd, n) @@ -777,8 +770,8 @@ static void ref_by(grpc_fd *fd, int n) { static void unref_by(grpc_fd *fd, int n, const char *reason, const char *file, int line) { gpr_atm old; - gpr_log(GPR_DEBUG, "FD %d %p unref %d %d -> %d [%s; %s:%d]", fd->fd, fd, n, - gpr_atm_no_barrier_load(&fd->refst), + gpr_log(GPR_DEBUG, "FD %d %p unref %d %ld -> %ld [%s; %s:%d]", fd->fd, + (void *)fd, n, gpr_atm_no_barrier_load(&fd->refst), gpr_atm_no_barrier_load(&fd->refst) - n, reason, file, line); #else static void unref_by(grpc_fd *fd, int n) { @@ -865,10 +858,10 @@ static grpc_fd *fd_create(int fd, const char *name) { char *fd_name; gpr_asprintf(&fd_name, "%s fd=%d", name, fd); grpc_iomgr_register_object(&new_fd->iomgr_object, fd_name); - gpr_free(fd_name); #ifdef GRPC_FD_REF_COUNT_DEBUG - gpr_log(GPR_DEBUG, "FD %d %p create %s", fd, r, fd_name); + gpr_log(GPR_DEBUG, "FD %d %p create %s", fd, (void *)new_fd, fd_name); #endif + gpr_free(fd_name); return new_fd; } From eb5e43762be40f78775dfd3728e105daf1169d90 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 23 Jun 2016 16:16:10 -0700 Subject: [PATCH 1304/1894] Fix ruby tests --- tools/run_tests/run_tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index c571a81eb28..61cef0a9d57 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -451,7 +451,7 @@ class RubyLanguage(object): _check_compiler(self.args.compiler, ['default']) def test_specs(self): - return [self.config.job_spec(['tools/run_tests/run_ruby.sh'], None, + return [self.config.job_spec(['tools/run_tests/run_ruby.sh'], timeout_seconds=10*60, environ=_FORCE_ENVIRON_FOR_WRAPPERS)] From 2e1a1fe56f4276d670362c5aae1b493df0834c2e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 23 Jun 2016 16:18:31 -0700 Subject: [PATCH 1305/1894] Fixes --- tools/run_tests/dockerjob.py | 4 ++-- tools/run_tests/run_performance_tests.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tools/run_tests/dockerjob.py b/tools/run_tests/dockerjob.py index 326c4faed95..e4ca3b7faaf 100755 --- a/tools/run_tests/dockerjob.py +++ b/tools/run_tests/dockerjob.py @@ -104,7 +104,7 @@ class DockerJob: def __init__(self, spec): self._spec = spec - self._job = jobset.Job(spec, bin_hash=None, newline_on_success=True, travis=True, add_env={}) + self._job = jobset.Job(spec, newline_on_success=True, travis=True, add_env={}) self._container_name = spec.container_name def mapped_port(self, port): @@ -118,4 +118,4 @@ class DockerJob: def is_running(self): """Polls a job and returns True if given job is still running.""" - return self._job.state(jobset.NoCache()) == jobset._RUNNING + return self._job.state() == jobset._RUNNING diff --git a/tools/run_tests/run_performance_tests.py b/tools/run_tests/run_performance_tests.py index f037d0d17d9..14901caf07f 100755 --- a/tools/run_tests/run_performance_tests.py +++ b/tools/run_tests/run_performance_tests.py @@ -61,11 +61,11 @@ class QpsWorkerJob: self._spec = spec self.language = language self.host_and_port = host_and_port - self._job = jobset.Job(spec, bin_hash=None, newline_on_success=True, travis=True, add_env={}) + self._job = jobset.Job(spec, newline_on_success=True, travis=True, add_env={}) def is_running(self): """Polls a job and returns True if given job is still running.""" - return self._job.state(jobset.NoCache()) == jobset._RUNNING + return self._job.state() == jobset._RUNNING def kill(self): return self._job.kill() From d6f8f0b7cd9c1e92219027919eb8a562763e029b Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 23 Jun 2016 17:33:01 -0700 Subject: [PATCH 1306/1894] Add TODO --- src/objective-c/examples/SwiftSample/ViewController.swift | 1 + 1 file changed, 1 insertion(+) diff --git a/src/objective-c/examples/SwiftSample/ViewController.swift b/src/objective-c/examples/SwiftSample/ViewController.swift index 80d7a47917f..2a95d2de516 100644 --- a/src/objective-c/examples/SwiftSample/ViewController.swift +++ b/src/objective-c/examples/SwiftSample/ViewController.swift @@ -71,6 +71,7 @@ class ViewController: UIViewController { NSLog("2. Response trailers: \(RPC.responseTrailers)") } + // TODO(jcanizales): Revert to using subscript syntax once XCode 8 is released. RPC.requestHeaders.setObject("My value", forKey: "My-Header") RPC.start() From 33b767a7701c373767bf29a49c93c9e515eb17f8 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 24 Jun 2016 09:13:03 -0700 Subject: [PATCH 1307/1894] fix build node package --- tools/run_tests/build_package_node.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/run_tests/build_package_node.sh b/tools/run_tests/build_package_node.sh index 6f7211b53fe..ff4cfdb8bf9 100755 --- a/tools/run_tests/build_package_node.sh +++ b/tools/run_tests/build_package_node.sh @@ -86,6 +86,7 @@ for arch in {x86,x64}; do cp $input_dir/protoc* bin/ cp $input_dir/grpc_node_plugin* bin/ mkdir -p bin/google/protobuf + mkdir -p bin/google/protobuf/compiler # needed for plugin.proto for proto in "${well_known_protos[@]}"; do cp $base/third_party/protobuf/src/google/protobuf/$proto.proto bin/google/protobuf/$proto.proto done From e07b83ba9fde162fe0e61f97c657492f4d948e95 Mon Sep 17 00:00:00 2001 From: Sree Kuchibhotla Date: Fri, 24 Jun 2016 09:27:00 -0700 Subject: [PATCH 1308/1894] generate_projects.sh --- src/node/tools/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/src/node/tools/package.json b/src/node/tools/package.json index d4849c2e388..c34b259e2e0 100644 --- a/src/node/tools/package.json +++ b/src/node/tools/package.json @@ -34,6 +34,7 @@ "index.js", "bin/protoc.js", "bin/protoc_plugin.js", + "bin/google/protobuf", "LICENSE" ], "main": "index.js" From 886c512832464a5aa5e61b51f1fcd1da356ca847 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 24 Jun 2016 09:48:58 -0700 Subject: [PATCH 1309/1894] fix C# nuget build --- src/csharp/Grpc.Core/Grpc.Core.nuspec | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/csharp/Grpc.Core/Grpc.Core.nuspec b/src/csharp/Grpc.Core/Grpc.Core.nuspec index fa2c1fbff22..47593f787b1 100644 --- a/src/csharp/Grpc.Core/Grpc.Core.nuspec +++ b/src/csharp/Grpc.Core/Grpc.Core.nuspec @@ -24,11 +24,12 @@ - - - - - - + + + + + + + From d29a3bf004e23eb481b33b9a69fd10ae9221fc98 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 24 Jun 2016 10:26:14 -0700 Subject: [PATCH 1310/1894] Update master branch to 0.16.0-dev --- Makefile | 2 +- build.yaml | 2 +- package.json | 2 +- package.xml | 4 ++-- src/core/lib/surface/version.c | 2 +- src/csharp/Grpc.Auth/project.json | 4 ++-- src/csharp/Grpc.Core/VersionInfo.cs | 4 ++-- src/csharp/Grpc.Core/project.json | 2 +- src/csharp/Grpc.HealthCheck/project.json | 4 ++-- src/csharp/build_packages.bat | 2 +- src/node/tools/package.json | 2 +- src/python/grpcio/grpc_version.py | 2 +- src/ruby/lib/grpc/version.rb | 2 +- src/ruby/tools/version.rb | 2 +- tools/distrib/python/grpcio_tools/grpc_version.py | 2 +- tools/doxygen/Doxyfile.c++ | 2 +- tools/doxygen/Doxyfile.c++.internal | 2 +- tools/doxygen/Doxyfile.core | 2 +- tools/doxygen/Doxyfile.core.internal | 2 +- 19 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Makefile b/Makefile index 9be3e5784cc..2f49e7712fd 100644 --- a/Makefile +++ b/Makefile @@ -414,7 +414,7 @@ E = @echo Q = @ endif -VERSION = 0.15.0-dev +VERSION = 0.16.0-dev CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) diff --git a/build.yaml b/build.yaml index 1f06e20cf9b..7d570e4dab9 100644 --- a/build.yaml +++ b/build.yaml @@ -7,7 +7,7 @@ settings: '#3': Use "-preN" suffixes to identify pre-release versions '#4': Per-language overrides are possible with (eg) ruby_version tag here '#5': See the expand_version.py for all the quirks here - version: 0.15.0-dev + version: 0.16.0-dev filegroups: - name: census public_headers: diff --git a/package.json b/package.json index 5bdaa761e28..68a31d794c5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "0.15.0-dev", + "version": "0.16.0-dev", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "http://www.grpc.io/", diff --git a/package.xml b/package.xml index 67e9bb2c282..c1ecae8b806 100644 --- a/package.xml +++ b/package.xml @@ -13,8 +13,8 @@ 2016-05-19 - 0.15.0 - 0.15.0 + 0.16.0 + 0.16.0 beta diff --git a/src/core/lib/surface/version.c b/src/core/lib/surface/version.c index aca76d2bb79..53f3c438541 100644 --- a/src/core/lib/surface/version.c +++ b/src/core/lib/surface/version.c @@ -36,4 +36,4 @@ #include -const char *grpc_version_string(void) { return "0.15.0-dev"; } +const char *grpc_version_string(void) { return "0.16.0-dev"; } diff --git a/src/csharp/Grpc.Auth/project.json b/src/csharp/Grpc.Auth/project.json index 1677565824b..4c5c960204e 100644 --- a/src/csharp/Grpc.Auth/project.json +++ b/src/csharp/Grpc.Auth/project.json @@ -1,5 +1,5 @@ { - "version": "0.15.0-dev", + "version": "0.16.0-dev", "title": "gRPC C# Auth", "authors": [ "Google Inc." ], "copyright": "Copyright 2015, Google Inc.", @@ -13,7 +13,7 @@ "tags": [ "gRPC RPC Protocol HTTP/2 Auth OAuth2" ], }, "dependencies": { - "Grpc.Core": "0.15.0-dev", + "Grpc.Core": "0.16.0-dev", "Google.Apis.Auth": "1.11.1" }, "frameworks": { diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index e1609341d9a..cb20967680e 100644 --- a/src/csharp/Grpc.Core/VersionInfo.cs +++ b/src/csharp/Grpc.Core/VersionInfo.cs @@ -48,11 +48,11 @@ namespace Grpc.Core /// /// Current AssemblyFileVersion of gRPC C# assemblies /// - public const string CurrentAssemblyFileVersion = "0.15.0.0"; + public const string CurrentAssemblyFileVersion = "0.16.0.0"; /// /// Current version of gRPC C# /// - public const string CurrentVersion = "0.15.0-dev"; + public const string CurrentVersion = "0.16.0-dev"; } } diff --git a/src/csharp/Grpc.Core/project.json b/src/csharp/Grpc.Core/project.json index 7253107e04a..4729a9346cb 100644 --- a/src/csharp/Grpc.Core/project.json +++ b/src/csharp/Grpc.Core/project.json @@ -1,5 +1,5 @@ { - "version": "0.15.0-dev", + "version": "0.16.0-dev", "title": "gRPC C# Core", "authors": [ "Google Inc." ], "copyright": "Copyright 2015, Google Inc.", diff --git a/src/csharp/Grpc.HealthCheck/project.json b/src/csharp/Grpc.HealthCheck/project.json index eb57608957a..c4895c2ad3c 100644 --- a/src/csharp/Grpc.HealthCheck/project.json +++ b/src/csharp/Grpc.HealthCheck/project.json @@ -1,5 +1,5 @@ { - "version": "0.15.0-dev", + "version": "0.16.0-dev", "title": "gRPC C# Healthchecking", "authors": [ "Google Inc." ], "copyright": "Copyright 2015, Google Inc.", @@ -13,7 +13,7 @@ "tags": [ "gRPC health check" ] }, "dependencies": { - "Grpc.Core": "0.15.0-dev", + "Grpc.Core": "0.16.0-dev", "Google.Protobuf": "3.0.0-beta3" }, "frameworks": { diff --git a/src/csharp/build_packages.bat b/src/csharp/build_packages.bat index 63f8c30bc7e..272b30f385d 100644 --- a/src/csharp/build_packages.bat +++ b/src/csharp/build_packages.bat @@ -30,7 +30,7 @@ @rem Builds gRPC NuGet packages @rem Current package versions -set VERSION=0.15.0-dev +set VERSION=0.16.0-dev set PROTOBUF_VERSION=3.0.0-beta3 @rem Packages that depend on prerelease packages (like Google.Protobuf) need to have prerelease suffix as well. diff --git a/src/node/tools/package.json b/src/node/tools/package.json index c34b259e2e0..7c256d7ba0d 100644 --- a/src/node/tools/package.json +++ b/src/node/tools/package.json @@ -1,6 +1,6 @@ { "name": "grpc-tools", - "version": "0.15.0-dev", + "version": "0.16.0-dev", "author": "Google Inc.", "description": "Tools for developing with gRPC on Node.js", "homepage": "http://www.grpc.io/", diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py index 0c13104d9da..0f4db9d972e 100644 --- a/src/python/grpcio/grpc_version.py +++ b/src/python/grpcio/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! -VERSION='0.15.0.dev0' +VERSION='0.16.0.dev0' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index 01c8c5ac8f1..5e6aaef2eb5 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -29,5 +29,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '0.15.0.dev' + VERSION = '0.16.0.dev' end diff --git a/src/ruby/tools/version.rb b/src/ruby/tools/version.rb index dca7fd7e72c..68c1bf369d2 100644 --- a/src/ruby/tools/version.rb +++ b/src/ruby/tools/version.rb @@ -29,6 +29,6 @@ module GRPC module Tools - VERSION = '0.15.0.dev' + VERSION = '0.16.0.dev' end end diff --git a/tools/distrib/python/grpcio_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_version.py index 1267d0e45dc..4b1e7fcd584 100644 --- a/tools/distrib/python/grpcio_tools/grpc_version.py +++ b/tools/distrib/python/grpcio_tools/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! -VERSION='0.15.0.dev0' +VERSION='0.16.0.dev0' diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 7f9d2df6f6c..de7acd7777e 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.15.0-dev +PROJECT_NUMBER = 0.16.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index dcf1a4c8c40..76bb3b6c59e 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.15.0-dev +PROJECT_NUMBER = 0.16.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index 72102b2fc50..53ae4e4cf4b 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.15.0-dev +PROJECT_NUMBER = 0.16.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index e1555930e91..1c75c941c27 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.15.0-dev +PROJECT_NUMBER = 0.16.0-dev # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a From f4c1bff0d8caedf716b460c4ee6114ac126e8872 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Sun, 12 Jun 2016 15:23:36 -0700 Subject: [PATCH 1311/1894] Moved grpc_shutdown to end of Py_Finalize() We currently rely on the __del__ method of a module scope object to call grpc_shutdown(). __del__ methods are not guaranteed to be called, and furthermore there are no guarantees about ordering, leading to shutdown race conditions. This moves grpc_shutdown to Py_Finalize(), which gets called after the Python context is completely cleaned up. --- .../grpcio/grpc/_cython/_cygrpc/grpc.pxi | 1 + src/python/grpcio/grpc/_cython/cygrpc.pyx | 32 +++++++------------ src/python/grpcio/grpc/_cython/loader.c | 7 ++++ src/python/grpcio/grpc/_cython/loader.h | 5 +++ 4 files changed, 24 insertions(+), 21 deletions(-) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi index 05b8886df73..35e394d02f8 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi @@ -37,6 +37,7 @@ cdef extern from "grpc/_cython/loader.h": ctypedef long int64_t int pygrpc_load_core(char*) + int pygrpc_initialize_core() void *gpr_malloc(size_t size) nogil void gpr_free(void *ptr) nogil diff --git a/src/python/grpcio/grpc/_cython/cygrpc.pyx b/src/python/grpcio/grpc/_cython/cygrpc.pyx index cf146f5a048..c92a8d19a77 100644 --- a/src/python/grpcio/grpc/_cython/cygrpc.pyx +++ b/src/python/grpcio/grpc/_cython/cygrpc.pyx @@ -45,30 +45,20 @@ include "grpc/_cython/_cygrpc/security.pyx.pxi" include "grpc/_cython/_cygrpc/server.pyx.pxi" # -# Global state +# initialize gRPC # -cdef class _ModuleState: - cdef bint is_loaded +def _initialize(): + if 'win32' in sys.platform: + filename = pkg_resources.resource_filename( + 'grpc._cython', '_windows/grpc_c.64.python') + if not pygrpc_load_core(filename): + raise ImportError('failed to load core gRPC library') + if not pygrpc_initialize_core(): + raise ImportError('failed to initialize core gRPC library') - def __cinit__(self): - if 'win32' in sys.platform: - filename = pkg_resources.resource_filename( - 'grpc._cython', '_windows/grpc_c.64.python') - if not pygrpc_load_core(filename): - raise ImportError('failed to load core gRPC library') - with nogil: - grpc_init() - self.is_loaded = True - with nogil: - grpc_set_ssl_roots_override_callback( + grpc_set_ssl_roots_override_callback( ssl_roots_override_callback) - def __dealloc__(self): - if self.is_loaded: - with nogil: - grpc_shutdown() - -_module_state = _ModuleState() - +_initialize() diff --git a/src/python/grpcio/grpc/_cython/loader.c b/src/python/grpcio/grpc/_cython/loader.c index b909ad594ed..86b70dbb02d 100644 --- a/src/python/grpcio/grpc/_cython/loader.c +++ b/src/python/grpcio/grpc/_cython/loader.c @@ -31,6 +31,7 @@ * */ +#include #include "loader.h" #ifdef __cplusplus @@ -62,6 +63,12 @@ int pygrpc_load_core(char *path) { return 1; } #endif /* !GPR_WINDOWS */ +// Cython doesn't have Py_AtExit bindings, so we call the C_API directly +int pygrpc_initialize_core(void) { + grpc_init(); + return Py_AtExit(grpc_shutdown) < 0 ? 0 : 1; +} + #ifdef __cplusplus } #endif /* __cpluslus */ diff --git a/src/python/grpcio/grpc/_cython/loader.h b/src/python/grpcio/grpc/_cython/loader.h index 3b8796d39f7..eb4b1a1b018 100644 --- a/src/python/grpcio/grpc/_cython/loader.h +++ b/src/python/grpcio/grpc/_cython/loader.h @@ -46,6 +46,11 @@ extern "C" { /* Attempts to load the core if necessary, and return non-zero upon succes. */ int pygrpc_load_core(char *path); +/* Initializes grpc and registers grpc_shutdown() to be called right before + * interpreter exit. Returns non-zero upon success. + */ +int pygrpc_initialize_core(void); + #ifdef __cplusplus } #endif /* __cpluslus */ From 2dfcf14705f24bdf6d95d1b16265beb52fe33b02 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 24 Jun 2016 11:06:28 -0700 Subject: [PATCH 1312/1894] Fix Node Windows build error --- src/node/ext/node_grpc.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node/ext/node_grpc.cc b/src/node/ext/node_grpc.cc index ce988f9dfa9..745b5023d59 100644 --- a/src/node/ext/node_grpc.cc +++ b/src/node/ext/node_grpc.cc @@ -265,8 +265,8 @@ void InitLogConstants(Local exports) { Nan::Set(log_verbosity, Nan::New("DEBUG").ToLocalChecked(), DEBUG); Local INFO(Nan::New(GPR_LOG_SEVERITY_INFO)); Nan::Set(log_verbosity, Nan::New("INFO").ToLocalChecked(), INFO); - Local ERROR(Nan::New(GPR_LOG_SEVERITY_ERROR)); - Nan::Set(log_verbosity, Nan::New("ERROR").ToLocalChecked(), ERROR); + Local LOG_ERROR(Nan::New(GPR_LOG_SEVERITY_ERROR)); + Nan::Set(log_verbosity, Nan::New("ERROR").ToLocalChecked(), LOG_ERROR); } NAN_METHOD(MetadataKeyIsLegal) { From f519df8147e80b6ef21a576e8e08742e4f957e87 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 24 Jun 2016 11:12:03 -0700 Subject: [PATCH 1313/1894] Update version to 0.15.0 --- Makefile | 2 +- build.yaml | 2 +- package.json | 2 +- src/core/lib/surface/version.c | 2 +- src/csharp/Grpc.Auth/project.json | 4 ++-- src/csharp/Grpc.Core/VersionInfo.cs | 2 +- src/csharp/Grpc.Core/project.json | 2 +- src/csharp/Grpc.HealthCheck/project.json | 4 ++-- src/csharp/build_packages.bat | 2 +- src/node/tools/package.json | 2 +- src/python/grpcio/grpc_version.py | 2 +- src/ruby/lib/grpc/version.rb | 2 +- src/ruby/tools/version.rb | 2 +- tools/distrib/python/grpcio_tools/grpc_version.py | 2 +- tools/doxygen/Doxyfile.c++ | 2 +- tools/doxygen/Doxyfile.c++.internal | 2 +- tools/doxygen/Doxyfile.core | 2 +- tools/doxygen/Doxyfile.core.internal | 2 +- 18 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index 9be3e5784cc..d369653be3c 100644 --- a/Makefile +++ b/Makefile @@ -414,7 +414,7 @@ E = @echo Q = @ endif -VERSION = 0.15.0-dev +VERSION = 0.15.0 CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) diff --git a/build.yaml b/build.yaml index 1f06e20cf9b..ffc681d9028 100644 --- a/build.yaml +++ b/build.yaml @@ -7,7 +7,7 @@ settings: '#3': Use "-preN" suffixes to identify pre-release versions '#4': Per-language overrides are possible with (eg) ruby_version tag here '#5': See the expand_version.py for all the quirks here - version: 0.15.0-dev + version: 0.15.0 filegroups: - name: census public_headers: diff --git a/package.json b/package.json index 5bdaa761e28..1b2920c6bc4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "0.15.0-dev", + "version": "0.15.0", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "http://www.grpc.io/", diff --git a/src/core/lib/surface/version.c b/src/core/lib/surface/version.c index aca76d2bb79..e4a3358c351 100644 --- a/src/core/lib/surface/version.c +++ b/src/core/lib/surface/version.c @@ -36,4 +36,4 @@ #include -const char *grpc_version_string(void) { return "0.15.0-dev"; } +const char *grpc_version_string(void) { return "0.15.0"; } diff --git a/src/csharp/Grpc.Auth/project.json b/src/csharp/Grpc.Auth/project.json index 1677565824b..ae83c3be2b8 100644 --- a/src/csharp/Grpc.Auth/project.json +++ b/src/csharp/Grpc.Auth/project.json @@ -1,5 +1,5 @@ { - "version": "0.15.0-dev", + "version": "0.15.0", "title": "gRPC C# Auth", "authors": [ "Google Inc." ], "copyright": "Copyright 2015, Google Inc.", @@ -13,7 +13,7 @@ "tags": [ "gRPC RPC Protocol HTTP/2 Auth OAuth2" ], }, "dependencies": { - "Grpc.Core": "0.15.0-dev", + "Grpc.Core": "0.15.0", "Google.Apis.Auth": "1.11.1" }, "frameworks": { diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index e1609341d9a..d89a2b5c6ee 100644 --- a/src/csharp/Grpc.Core/VersionInfo.cs +++ b/src/csharp/Grpc.Core/VersionInfo.cs @@ -53,6 +53,6 @@ namespace Grpc.Core /// /// Current version of gRPC C# /// - public const string CurrentVersion = "0.15.0-dev"; + public const string CurrentVersion = "0.15.0"; } } diff --git a/src/csharp/Grpc.Core/project.json b/src/csharp/Grpc.Core/project.json index 7253107e04a..c7f2bf4fb12 100644 --- a/src/csharp/Grpc.Core/project.json +++ b/src/csharp/Grpc.Core/project.json @@ -1,5 +1,5 @@ { - "version": "0.15.0-dev", + "version": "0.15.0", "title": "gRPC C# Core", "authors": [ "Google Inc." ], "copyright": "Copyright 2015, Google Inc.", diff --git a/src/csharp/Grpc.HealthCheck/project.json b/src/csharp/Grpc.HealthCheck/project.json index eb57608957a..98ea21a436a 100644 --- a/src/csharp/Grpc.HealthCheck/project.json +++ b/src/csharp/Grpc.HealthCheck/project.json @@ -1,5 +1,5 @@ { - "version": "0.15.0-dev", + "version": "0.15.0", "title": "gRPC C# Healthchecking", "authors": [ "Google Inc." ], "copyright": "Copyright 2015, Google Inc.", @@ -13,7 +13,7 @@ "tags": [ "gRPC health check" ] }, "dependencies": { - "Grpc.Core": "0.15.0-dev", + "Grpc.Core": "0.15.0", "Google.Protobuf": "3.0.0-beta3" }, "frameworks": { diff --git a/src/csharp/build_packages.bat b/src/csharp/build_packages.bat index 63f8c30bc7e..e387efcc2da 100644 --- a/src/csharp/build_packages.bat +++ b/src/csharp/build_packages.bat @@ -30,7 +30,7 @@ @rem Builds gRPC NuGet packages @rem Current package versions -set VERSION=0.15.0-dev +set VERSION=0.15.0 set PROTOBUF_VERSION=3.0.0-beta3 @rem Packages that depend on prerelease packages (like Google.Protobuf) need to have prerelease suffix as well. diff --git a/src/node/tools/package.json b/src/node/tools/package.json index c34b259e2e0..b2cadd3f47a 100644 --- a/src/node/tools/package.json +++ b/src/node/tools/package.json @@ -1,6 +1,6 @@ { "name": "grpc-tools", - "version": "0.15.0-dev", + "version": "0.15.0", "author": "Google Inc.", "description": "Tools for developing with gRPC on Node.js", "homepage": "http://www.grpc.io/", diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py index 0c13104d9da..c6c07afb443 100644 --- a/src/python/grpcio/grpc_version.py +++ b/src/python/grpcio/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! -VERSION='0.15.0.dev0' +VERSION='0.15.0' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index 01c8c5ac8f1..7f512e47aab 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -29,5 +29,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '0.15.0.dev' + VERSION = '0.15.0' end diff --git a/src/ruby/tools/version.rb b/src/ruby/tools/version.rb index dca7fd7e72c..6a7a1d5bd33 100644 --- a/src/ruby/tools/version.rb +++ b/src/ruby/tools/version.rb @@ -29,6 +29,6 @@ module GRPC module Tools - VERSION = '0.15.0.dev' + VERSION = '0.15.0' end end diff --git a/tools/distrib/python/grpcio_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_version.py index 1267d0e45dc..9a33c6e5d14 100644 --- a/tools/distrib/python/grpcio_tools/grpc_version.py +++ b/tools/distrib/python/grpcio_tools/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! -VERSION='0.15.0.dev0' +VERSION='0.15.0' diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 7f9d2df6f6c..066d29ac001 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.15.0-dev +PROJECT_NUMBER = 0.15.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index dcf1a4c8c40..6a0e8b2129c 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.15.0-dev +PROJECT_NUMBER = 0.15.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index 72102b2fc50..fa9fd5a3123 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.15.0-dev +PROJECT_NUMBER = 0.15.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index e1555930e91..e4c9f991d31 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.15.0-dev +PROJECT_NUMBER = 0.15.0 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a From 5e824fa42e691d8e04c6218eb75b26ef80e86918 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Fri, 24 Jun 2016 11:32:51 -0700 Subject: [PATCH 1314/1894] Restore fix undid by https://github.com/grpc/grpc/pull/5893 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit That PR wasn’t tested nor reviewed adecuately. --- src/objective-c/GRPCClient/GRPCCall.m | 1 + src/objective-c/GRPCClient/private/GRPCWrappedCall.m | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m index 0eb10656ddc..c34df99d9f4 100644 --- a/src/objective-c/GRPCClient/GRPCCall.m +++ b/src/objective-c/GRPCClient/GRPCCall.m @@ -378,6 +378,7 @@ NSString * const kGRPCTrailersKey = @"io.grpc.TrailersKey"; [strongSelf finishWithError:[NSError errorWithDomain:kGRPCErrorDomain code:GRPCErrorCodeUnavailable userInfo:@{NSLocalizedDescriptionKey: @"Connectivity lost."}]]; + [[GRPCHost hostWithAddress:strongSelf->_host] discardChannel:channel]; } }]; } diff --git a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m index 16e5bff7ff7..160344a7a69 100644 --- a/src/objective-c/GRPCClient/private/GRPCWrappedCall.m +++ b/src/objective-c/GRPCClient/private/GRPCWrappedCall.m @@ -250,7 +250,7 @@ // Each completion queue consumes one thread. There's a trade to be made between creating and // consuming too many threads and having contention of multiple calls in a single completion - // queue. Currently we favor latency and use one per call. + // queue. Currently we use a singleton queue. _queue = [GRPCCompletionQueue completionQueue]; _call = [[GRPCHost hostWithAddress:host] unmanagedCallWithPath:path completionQueue:_queue]; From 06b4d6c353455a2af9fee3bdc57307cbb426d2cf Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Fri, 24 Jun 2016 11:35:32 -0700 Subject: [PATCH 1315/1894] =?UTF-8?q?Don=E2=80=99t=20checkout=20specific?= =?UTF-8?q?=20proto=20versions=20in=20Travis=20anymore?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Now that the submodule points to 3.0.0-beta-3.1, which is what we need. --- .travis.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 16c6390a54a..75b14406306 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,9 +11,6 @@ before_install: - gem install cocoapods -v '1.0.0' - pod --version - brew install gflags - - pushd third_party/protobuf - - git checkout v3.0.0-beta-3 - - popd install: - make grpc_objective_c_plugin - pushd src/objective-c/tests From a324c4fea63840eb06dadb4f0d920226b034404e Mon Sep 17 00:00:00 2001 From: yang-g Date: Fri, 24 Jun 2016 11:57:07 -0700 Subject: [PATCH 1316/1894] Add API to get c slice from c++ Slice. --- include/grpc++/support/slice.h | 3 +++ test/cpp/util/slice_test.cc | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/include/grpc++/support/slice.h b/include/grpc++/support/slice.h index cec9062d4fd..5874b4f5ae3 100644 --- a/include/grpc++/support/slice.h +++ b/include/grpc++/support/slice.h @@ -77,6 +77,9 @@ class Slice GRPC_FINAL { /// Raw pointer to the end (one byte \em past the last element) of the slice. const uint8_t* end() const { return GPR_SLICE_END_PTR(slice_); } + /// Raw C slice. Caller needs to call gpr_slice_unref when done. + gpr_slice c_slice() const { return gpr_slice_ref(slice_); } + private: friend class ByteBuffer; diff --git a/test/cpp/util/slice_test.cc b/test/cpp/util/slice_test.cc index de7ff031ab8..45799ae157c 100644 --- a/test/cpp/util/slice_test.cc +++ b/test/cpp/util/slice_test.cc @@ -68,6 +68,16 @@ TEST_F(SliceTest, Empty) { CheckSlice(empty_slice, ""); } +TEST_F(SliceTest, Cslice) { + gpr_slice s = gpr_slice_from_copied_string(kContent); + Slice spp(s, Slice::STEAL_REF); + CheckSlice(spp, kContent); + gpr_slice c_slice = spp.c_slice(); + EXPECT_EQ(GPR_SLICE_START_PTR(s), GPR_SLICE_START_PTR(c_slice)); + EXPECT_EQ(GPR_SLICE_END_PTR(s), GPR_SLICE_END_PTR(c_slice)); + gpr_slice_unref(c_slice); +} + } // namespace } // namespace grpc From be1b9a718a09722e95ab04b08ccaf353dc3a51e9 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 24 Jun 2016 13:22:11 -0700 Subject: [PATCH 1317/1894] Fixes --- src/core/lib/iomgr/error.c | 5 ++++- src/core/lib/iomgr/tcp_posix.c | 4 ++-- src/core/lib/surface/call.c | 5 +++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index 9f5ba76fd6c..aa94bb7fdf7 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -248,7 +248,10 @@ static grpc_error *copy_error_and_unref(grpc_error *in) { if (is_special(in)) { if (in == GRPC_ERROR_NONE) return GRPC_ERROR_CREATE("no error"); if (in == GRPC_ERROR_OOM) return GRPC_ERROR_CREATE("oom"); - if (in == GRPC_ERROR_CANCELLED) return GRPC_ERROR_CREATE("cancelled"); + if (in == GRPC_ERROR_CANCELLED) + return grpc_error_set_int(GRPC_ERROR_CREATE("cancelled"), + GRPC_ERROR_INT_GRPC_STATUS, + GRPC_STATUS_CANCELLED); return GRPC_ERROR_CREATE("unknown"); } grpc_error *out = gpr_malloc(sizeof(*out)); diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 017f52c3677..1046b60bcc9 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -160,7 +160,7 @@ static void call_read_cb(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, grpc_error *error) { grpc_closure *cb = tcp->read_cb; - if (false && grpc_tcp_trace) { + if (grpc_tcp_trace) { size_t i; const char *str = grpc_error_string(error); gpr_log(GPR_DEBUG, "read: error=%s", str); @@ -394,7 +394,7 @@ static void tcp_write(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, grpc_tcp *tcp = (grpc_tcp *)ep; grpc_error *error = GRPC_ERROR_NONE; - if (false && grpc_tcp_trace) { + if (grpc_tcp_trace) { size_t i; for (i = 0; i < buf->count; i++) { diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 77c17a4975b..708ea3502af 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -407,9 +407,10 @@ static void set_status_code(grpc_call *call, status_source source, static void set_status_details(grpc_call *call, status_source source, grpc_mdstr *status) { if (call->status[source].details != NULL) { - GRPC_MDSTR_UNREF(call->status[source].details); + GRPC_MDSTR_UNREF(status); + } else { + call->status[source].details = status; } - call->status[source].details = status; } static void get_final_status(grpc_call *call, From bd96e8a6a38c0afe01c8bfcb0849d7f10ff634e8 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Fri, 24 Jun 2016 11:53:54 -0700 Subject: [PATCH 1318/1894] Fix clang formatting --- .../ext/client_config/channel_connectivity.c | 7 ++++--- src/core/lib/profiling/basic_timers.c | 8 ++++---- .../security/credentials/jwt/jwt_credentials.c | 8 ++++---- src/core/lib/surface/channel.c | 16 +++++++++------- src/core/lib/surface/completion_queue.c | 14 ++++++++------ src/core/lib/transport/transport_op_string.c | 2 +- 6 files changed, 30 insertions(+), 25 deletions(-) diff --git a/src/core/ext/client_config/channel_connectivity.c b/src/core/ext/client_config/channel_connectivity.c index 2fd8e0e1232..c1220e3a8c3 100644 --- a/src/core/ext/client_config/channel_connectivity.c +++ b/src/core/ext/client_config/channel_connectivity.c @@ -189,10 +189,11 @@ void grpc_channel_watch_connectivity_state( GRPC_API_TRACE( "grpc_channel_watch_connectivity_state(" "channel=%p, last_observed_state=%d, " - "deadline=gpr_timespec { tv_sec: %"PRId64", tv_nsec: %d, clock_type: %d }, " + "deadline=gpr_timespec { tv_sec: %" PRId64 + ", tv_nsec: %d, clock_type: %d }, " "cq=%p, tag=%p)", - 7, (channel, (int)last_observed_state, deadline.tv_sec, - deadline.tv_nsec, (int)deadline.clock_type, cq, tag)); + 7, (channel, (int)last_observed_state, deadline.tv_sec, deadline.tv_nsec, + (int)deadline.clock_type, cq, tag)); grpc_cq_begin_op(cq, tag); diff --git a/src/core/lib/profiling/basic_timers.c b/src/core/lib/profiling/basic_timers.c index ee464f310f4..51813d04617 100644 --- a/src/core/lib/profiling/basic_timers.c +++ b/src/core/lib/profiling/basic_timers.c @@ -141,11 +141,11 @@ static void write_log(gpr_timer_log *log) { entry->tm = gpr_time_0(entry->tm.clock_type); } fprintf(output_file, - "{\"t\": %"PRId64".%09d, \"thd\": \"%d\", \"type\": \"%c\", \"tag\": " + "{\"t\": %" PRId64 + ".%09d, \"thd\": \"%d\", \"type\": \"%c\", \"tag\": " "\"%s\", \"file\": \"%s\", \"line\": %d, \"imp\": %d}\n", - entry->tm.tv_sec, entry->tm.tv_nsec, entry->thd, - entry->type, entry->tagstr, entry->file, entry->line, - entry->important); + entry->tm.tv_sec, entry->tm.tv_nsec, entry->thd, entry->type, + entry->tagstr, entry->file, entry->line, entry->important); } } diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.c b/src/core/lib/security/credentials/jwt/jwt_credentials.c index f4dd9208610..1ae9f701fbd 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.c +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.c @@ -149,11 +149,11 @@ grpc_call_credentials *grpc_service_account_jwt_access_credentials_create( "grpc_service_account_jwt_access_credentials_create(" "json_key=%s, " "token_lifetime=" - "gpr_timespec { tv_sec: %"PRId64", tv_nsec: %d, clock_type: %d }, " + "gpr_timespec { tv_sec: %" PRId64 + ", tv_nsec: %d, clock_type: %d }, " "reserved=%p)", - 5, - (json_key, token_lifetime.tv_sec, token_lifetime.tv_nsec, - (int)token_lifetime.clock_type, reserved)); + 5, (json_key, token_lifetime.tv_sec, token_lifetime.tv_nsec, + (int)token_lifetime.clock_type, reserved)); GPR_ASSERT(reserved == NULL); return grpc_service_account_jwt_access_credentials_create_from_auth_json_key( grpc_auth_json_key_create_from_string(json_key), token_lifetime); diff --git a/src/core/lib/surface/channel.c b/src/core/lib/surface/channel.c index 952a769de1d..2cf6d8890a3 100644 --- a/src/core/lib/surface/channel.c +++ b/src/core/lib/surface/channel.c @@ -223,11 +223,12 @@ grpc_call *grpc_channel_create_call(grpc_channel *channel, "grpc_channel_create_call(" "channel=%p, parent_call=%p, propagation_mask=%x, cq=%p, method=%s, " "host=%s, " - "deadline=gpr_timespec { tv_sec: %"PRId64", tv_nsec: %d, clock_type: %d }, " + "deadline=gpr_timespec { tv_sec: %" PRId64 + ", tv_nsec: %d, clock_type: %d }, " "reserved=%p)", - 10, (channel, parent_call, (unsigned)propagation_mask, cq, method, host, - deadline.tv_sec, deadline.tv_nsec, - (int)deadline.clock_type, reserved)); + 10, + (channel, parent_call, (unsigned)propagation_mask, cq, method, host, + deadline.tv_sec, deadline.tv_nsec, (int)deadline.clock_type, reserved)); GPR_ASSERT(!reserved); return grpc_channel_create_call_internal( channel, parent_call, propagation_mask, cq, NULL, @@ -282,11 +283,12 @@ grpc_call *grpc_channel_create_registered_call( "grpc_channel_create_registered_call(" "channel=%p, parent_call=%p, propagation_mask=%x, completion_queue=%p, " "registered_call_handle=%p, " - "deadline=gpr_timespec { tv_sec: %"PRId64", tv_nsec: %d, clock_type: %d }, " + "deadline=gpr_timespec { tv_sec: %" PRId64 + ", tv_nsec: %d, clock_type: %d }, " "reserved=%p)", 9, (channel, parent_call, (unsigned)propagation_mask, completion_queue, - registered_call_handle, deadline.tv_sec, - deadline.tv_nsec, (int)deadline.clock_type, reserved)); + registered_call_handle, deadline.tv_sec, deadline.tv_nsec, + (int)deadline.clock_type, reserved)); GPR_ASSERT(!reserved); return grpc_channel_create_call_internal( channel, parent_call, propagation_mask, completion_queue, NULL, diff --git a/src/core/lib/surface/completion_queue.c b/src/core/lib/surface/completion_queue.c index aa35ae02fe2..b5f2f65e5c0 100644 --- a/src/core/lib/surface/completion_queue.c +++ b/src/core/lib/surface/completion_queue.c @@ -316,10 +316,11 @@ grpc_event grpc_completion_queue_next(grpc_completion_queue *cc, GRPC_API_TRACE( "grpc_completion_queue_next(" "cc=%p, " - "deadline=gpr_timespec { tv_sec: %"PRId64", tv_nsec: %d, clock_type: %d }, " + "deadline=gpr_timespec { tv_sec: %" PRId64 + ", tv_nsec: %d, clock_type: %d }, " "reserved=%p)", - 5, (cc, deadline.tv_sec, deadline.tv_nsec, - (int)deadline.clock_type, reserved)); + 5, (cc, deadline.tv_sec, deadline.tv_nsec, (int)deadline.clock_type, + reserved)); GPR_ASSERT(!reserved); deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC); @@ -428,10 +429,11 @@ grpc_event grpc_completion_queue_pluck(grpc_completion_queue *cc, void *tag, GRPC_API_TRACE( "grpc_completion_queue_pluck(" "cc=%p, tag=%p, " - "deadline=gpr_timespec { tv_sec: %"PRId64", tv_nsec: %d, clock_type: %d }, " + "deadline=gpr_timespec { tv_sec: %" PRId64 + ", tv_nsec: %d, clock_type: %d }, " "reserved=%p)", - 6, (cc, tag, deadline.tv_sec, deadline.tv_nsec, - (int)deadline.clock_type, reserved)); + 6, (cc, tag, deadline.tv_sec, deadline.tv_nsec, (int)deadline.clock_type, + reserved)); GPR_ASSERT(!reserved); deadline = gpr_convert_clock_type(deadline, GPR_CLOCK_MONOTONIC); diff --git a/src/core/lib/transport/transport_op_string.c b/src/core/lib/transport/transport_op_string.c index d8fae7805e4..aeaba5339fd 100644 --- a/src/core/lib/transport/transport_op_string.c +++ b/src/core/lib/transport/transport_op_string.c @@ -63,7 +63,7 @@ static void put_metadata_list(gpr_strvec *b, grpc_metadata_batch md) { } if (gpr_time_cmp(md.deadline, gpr_inf_future(md.deadline.clock_type)) != 0) { char *tmp; - gpr_asprintf(&tmp, " deadline=%"PRId64".%09d", md.deadline.tv_sec, + gpr_asprintf(&tmp, " deadline=%" PRId64 ".%09d", md.deadline.tv_sec, md.deadline.tv_nsec); gpr_strvec_add(b, tmp); } From ddf02c1c3ff6efb15a9c47b5da7bd76b3654ad94 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 24 Jun 2016 14:04:01 -0700 Subject: [PATCH 1319/1894] Fix bad indentation --- tools/run_tests/jobset.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/run_tests/jobset.py b/tools/run_tests/jobset.py index 40409c43948..4fe77487f96 100755 --- a/tools/run_tests/jobset.py +++ b/tools/run_tests/jobset.py @@ -363,7 +363,7 @@ class Jobset(object): self._running.add(job) if not self.resultset.has_key(job.GetSpec().shortname): self.resultset[job.GetSpec().shortname] = [] - return True + return True def reap(self): """Collect the dead jobs.""" From d3b0dda9b8c5ac7dda843e46b240e99a3973d3b6 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 24 Jun 2016 15:13:08 -0700 Subject: [PATCH 1320/1894] update grpc nugets to 0.15 --- examples/csharp/helloworld/.nuget/packages.config | 2 +- examples/csharp/helloworld/Greeter/Greeter.csproj | 10 +++++----- examples/csharp/helloworld/Greeter/packages.config | 6 +++--- .../helloworld/GreeterClient/GreeterClient.csproj | 10 +++++----- .../csharp/helloworld/GreeterClient/packages.config | 6 +++--- .../helloworld/GreeterServer/GreeterServer.csproj | 10 +++++----- .../csharp/helloworld/GreeterServer/packages.config | 6 +++--- examples/csharp/helloworld/generate_protos.bat | 2 +- examples/csharp/route_guide/.nuget/packages.config | 2 +- .../csharp/route_guide/RouteGuide/RouteGuide.csproj | 10 +++++----- examples/csharp/route_guide/RouteGuide/packages.config | 6 +++--- .../RouteGuideClient/RouteGuideClient.csproj | 10 +++++----- .../route_guide/RouteGuideClient/packages.config | 6 +++--- .../RouteGuideServer/RouteGuideServer.csproj | 10 +++++----- .../route_guide/RouteGuideServer/packages.config | 6 +++--- examples/csharp/route_guide/generate_protos.bat | 2 +- 16 files changed, 52 insertions(+), 52 deletions(-) diff --git a/examples/csharp/helloworld/.nuget/packages.config b/examples/csharp/helloworld/.nuget/packages.config index bfd6c6723d9..aa060800c19 100644 --- a/examples/csharp/helloworld/.nuget/packages.config +++ b/examples/csharp/helloworld/.nuget/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/examples/csharp/helloworld/Greeter/Greeter.csproj b/examples/csharp/helloworld/Greeter/Greeter.csproj index 0270cc25f7a..20b85db8b60 100644 --- a/examples/csharp/helloworld/Greeter/Greeter.csproj +++ b/examples/csharp/helloworld/Greeter/Greeter.csproj @@ -10,7 +10,7 @@ Greeter Greeter v4.5 - 745ac60f + 2669b4f2 true @@ -33,11 +33,11 @@ False - ..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll + ..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll False - ..\packages\Grpc.Core.0.14.0\lib\net45\Grpc.Core.dll + ..\packages\Grpc.Core.0.15.0\lib\net45\Grpc.Core.dll @@ -61,11 +61,11 @@ - + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/examples/csharp/helloworld/Greeter/packages.config b/examples/csharp/helloworld/Greeter/packages.config index 617fe6da7be..ff9d6bbf73f 100644 --- a/examples/csharp/helloworld/Greeter/packages.config +++ b/examples/csharp/helloworld/Greeter/packages.config @@ -1,7 +1,7 @@  - - - + + + \ No newline at end of file diff --git a/examples/csharp/helloworld/GreeterClient/GreeterClient.csproj b/examples/csharp/helloworld/GreeterClient/GreeterClient.csproj index 877c450a50e..2b38ce290e9 100644 --- a/examples/csharp/helloworld/GreeterClient/GreeterClient.csproj +++ b/examples/csharp/helloworld/GreeterClient/GreeterClient.csproj @@ -10,7 +10,7 @@ GreeterClient GreeterClient v4.5 - 63b59176 + 5e942a7d true @@ -33,11 +33,11 @@ False - ..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll + ..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll False - ..\packages\Grpc.Core.0.14.0\lib\net45\Grpc.Core.dll + ..\packages\Grpc.Core.0.15.0\lib\net45\Grpc.Core.dll @@ -59,11 +59,11 @@ - + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/examples/csharp/helloworld/GreeterClient/packages.config b/examples/csharp/helloworld/GreeterClient/packages.config index 617fe6da7be..ff9d6bbf73f 100644 --- a/examples/csharp/helloworld/GreeterClient/packages.config +++ b/examples/csharp/helloworld/GreeterClient/packages.config @@ -1,7 +1,7 @@  - - - + + + \ No newline at end of file diff --git a/examples/csharp/helloworld/GreeterServer/GreeterServer.csproj b/examples/csharp/helloworld/GreeterServer/GreeterServer.csproj index 4d792dcf32e..43c633678b1 100644 --- a/examples/csharp/helloworld/GreeterServer/GreeterServer.csproj +++ b/examples/csharp/helloworld/GreeterServer/GreeterServer.csproj @@ -10,7 +10,7 @@ GreeterServer GreeterServer v4.5 - 25ac2e80 + 9c7b2963 true @@ -33,11 +33,11 @@ False - ..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll + ..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll False - ..\packages\Grpc.Core.0.14.0\lib\net45\Grpc.Core.dll + ..\packages\Grpc.Core.0.15.0\lib\net45\Grpc.Core.dll @@ -59,11 +59,11 @@ - + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + \ No newline at end of file diff --git a/examples/csharp/helloworld/GreeterServer/packages.config b/examples/csharp/helloworld/GreeterServer/packages.config index 617fe6da7be..ff9d6bbf73f 100644 --- a/examples/csharp/helloworld/GreeterServer/packages.config +++ b/examples/csharp/helloworld/GreeterServer/packages.config @@ -1,7 +1,7 @@  - - - + + + \ No newline at end of file diff --git a/examples/csharp/helloworld/generate_protos.bat b/examples/csharp/helloworld/generate_protos.bat index b9f68d6745a..a952bb46cdc 100644 --- a/examples/csharp/helloworld/generate_protos.bat +++ b/examples/csharp/helloworld/generate_protos.bat @@ -34,7 +34,7 @@ setlocal @rem enter this directory cd /d %~dp0 -set TOOLS_PATH=packages\Grpc.Tools.0.14.0\tools\windows_x86 +set TOOLS_PATH=packages\Grpc.Tools.0.15.0\tools\windows_x86 %TOOLS_PATH%\protoc.exe -I../../protos --csharp_out Greeter ../../protos/helloworld.proto --grpc_out Greeter --plugin=protoc-gen-grpc=%TOOLS_PATH%\grpc_csharp_plugin.exe diff --git a/examples/csharp/route_guide/.nuget/packages.config b/examples/csharp/route_guide/.nuget/packages.config index bfd6c6723d9..aa060800c19 100644 --- a/examples/csharp/route_guide/.nuget/packages.config +++ b/examples/csharp/route_guide/.nuget/packages.config @@ -1,4 +1,4 @@  - + \ No newline at end of file diff --git a/examples/csharp/route_guide/RouteGuide/RouteGuide.csproj b/examples/csharp/route_guide/RouteGuide/RouteGuide.csproj index 4f7222ebba3..601d16ba24d 100644 --- a/examples/csharp/route_guide/RouteGuide/RouteGuide.csproj +++ b/examples/csharp/route_guide/RouteGuide/RouteGuide.csproj @@ -11,7 +11,7 @@ RouteGuide v4.5 512 - 0a9fcb7a + de2137f9 true @@ -33,11 +33,11 @@ False - ..\packages\Google.Protobuf.3.0.0-beta2\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll + ..\packages\Google.Protobuf.3.0.0-beta3\lib\portable-net45+netcore45+wpa81+wp8\Google.Protobuf.dll False - ..\packages\Grpc.Core.0.14.0\lib\net45\Grpc.Core.dll + ..\packages\Grpc.Core.0.15.0\lib\net45\Grpc.Core.dll False @@ -74,12 +74,12 @@ - + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - + + + + + + + + + diff --git a/src/objective-c/tests/Connectivity/ConnectivityTestingApp.xcodeproj/project.pbxproj b/src/objective-c/tests/Connectivity/ConnectivityTestingApp.xcodeproj/project.pbxproj new file mode 100644 index 00000000000..1b1aca74d3b --- /dev/null +++ b/src/objective-c/tests/Connectivity/ConnectivityTestingApp.xcodeproj/project.pbxproj @@ -0,0 +1,274 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 46; + objects = { + +/* Begin PBXBuildFile section */ + 63BFB9CC1D2478DD00E17927 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 63BFB9CB1D2478DD00E17927 /* main.m */; }; + 63BFB9D21D2478DD00E17927 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 63BFB9D11D2478DD00E17927 /* ViewController.m */; }; + 63BFB9D51D2478DD00E17927 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 63BFB9D31D2478DD00E17927 /* Main.storyboard */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 63BFB9C71D2478DD00E17927 /* ConnectivityTestingApp.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ConnectivityTestingApp.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 63BFB9CB1D2478DD00E17927 /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = SOURCE_ROOT; }; + 63BFB9D11D2478DD00E17927 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = SOURCE_ROOT; }; + 63BFB9D41D2478DD00E17927 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; + 63BFB9DB1D2478DD00E17927 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = SOURCE_ROOT; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 63BFB9C41D2478DD00E17927 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 63BFB9BE1D2478DD00E17927 = { + isa = PBXGroup; + children = ( + 63BFB9D11D2478DD00E17927 /* ViewController.m */, + 63BFB9D31D2478DD00E17927 /* Main.storyboard */, + 63BFB9DB1D2478DD00E17927 /* Info.plist */, + 63BFB9CB1D2478DD00E17927 /* main.m */, + 63BFB9C81D2478DD00E17927 /* Products */, + ); + sourceTree = ""; + }; + 63BFB9C81D2478DD00E17927 /* Products */ = { + isa = PBXGroup; + children = ( + 63BFB9C71D2478DD00E17927 /* ConnectivityTestingApp.app */, + ); + name = Products; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 63BFB9C61D2478DD00E17927 /* ConnectivityTestingApp */ = { + isa = PBXNativeTarget; + buildConfigurationList = 63BFB9DE1D2478DD00E17927 /* Build configuration list for PBXNativeTarget "ConnectivityTestingApp" */; + buildPhases = ( + 63BFB9C31D2478DD00E17927 /* Sources */, + 63BFB9C41D2478DD00E17927 /* Frameworks */, + 63BFB9C51D2478DD00E17927 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = ConnectivityTestingApp; + productName = ConnectivityTestingApp; + productReference = 63BFB9C71D2478DD00E17927 /* ConnectivityTestingApp.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 63BFB9BF1D2478DD00E17927 /* Project object */ = { + isa = PBXProject; + attributes = { + LastUpgradeCheck = 0800; + ORGANIZATIONNAME = gRPC; + TargetAttributes = { + 63BFB9C61D2478DD00E17927 = { + CreatedOnToolsVersion = 8.0; + DevelopmentTeam = EQHXZ8M8AV; + DevelopmentTeamName = "Google, Inc."; + ProvisioningStyle = Automatic; + }; + }; + }; + buildConfigurationList = 63BFB9C21D2478DD00E17927 /* Build configuration list for PBXProject "ConnectivityTestingApp" */; + compatibilityVersion = "Xcode 3.2"; + developmentRegion = English; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 63BFB9BE1D2478DD00E17927; + productRefGroup = 63BFB9C81D2478DD00E17927 /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 63BFB9C61D2478DD00E17927 /* ConnectivityTestingApp */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 63BFB9C51D2478DD00E17927 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 63BFB9D51D2478DD00E17927 /* Main.storyboard in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 63BFB9C31D2478DD00E17927 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 63BFB9D21D2478DD00E17927 /* ViewController.m in Sources */, + 63BFB9CC1D2478DD00E17927 /* main.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 63BFB9D31D2478DD00E17927 /* Main.storyboard */ = { + isa = PBXVariantGroup; + children = ( + 63BFB9D41D2478DD00E17927 /* Base */, + ); + name = Main.storyboard; + path = .; + sourceTree = SOURCE_ROOT; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + 63BFB9DC1D2478DD00E17927 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + }; + name = Debug; + }; + 63BFB9DD1D2478DD00E17927 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 10.0; + MTL_ENABLE_DEBUG_INFO = NO; + SDKROOT = iphoneos; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 63BFB9DF1D2478DD00E17927 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = io.grpc.ConnectivityTestingApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Debug; + }; + 63BFB9E01D2478DD00E17927 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + INFOPLIST_FILE = Info.plist; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; + PRODUCT_BUNDLE_IDENTIFIER = io.grpc.ConnectivityTestingApp; + PRODUCT_NAME = "$(TARGET_NAME)"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 63BFB9C21D2478DD00E17927 /* Build configuration list for PBXProject "ConnectivityTestingApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 63BFB9DC1D2478DD00E17927 /* Debug */, + 63BFB9DD1D2478DD00E17927 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 63BFB9DE1D2478DD00E17927 /* Build configuration list for PBXNativeTarget "ConnectivityTestingApp" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 63BFB9DF1D2478DD00E17927 /* Debug */, + 63BFB9E01D2478DD00E17927 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 63BFB9BF1D2478DD00E17927 /* Project object */; +} diff --git a/src/objective-c/tests/Connectivity/ConnectivityTestingApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/src/objective-c/tests/Connectivity/ConnectivityTestingApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 00000000000..b541b4b44d5 --- /dev/null +++ b/src/objective-c/tests/Connectivity/ConnectivityTestingApp.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/src/objective-c/tests/Connectivity/Info.plist b/src/objective-c/tests/Connectivity/Info.plist new file mode 100644 index 00000000000..8a9fb887013 --- /dev/null +++ b/src/objective-c/tests/Connectivity/Info.plist @@ -0,0 +1,40 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + $(EXECUTABLE_NAME) + CFBundleIdentifier + $(PRODUCT_BUNDLE_IDENTIFIER) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 1.0 + CFBundleSignature + ???? + CFBundleVersion + 1 + LSRequiresIPhoneOS + + UILaunchStoryboardName + Main + UIMainStoryboardFile + Main + UIRequiredDeviceCapabilities + + armv7 + + UISupportedInterfaceOrientations + + UIInterfaceOrientationPortrait + UIInterfaceOrientationLandscapeLeft + UIInterfaceOrientationLandscapeRight + + + diff --git a/src/objective-c/tests/Connectivity/ViewController.m b/src/objective-c/tests/Connectivity/ViewController.m new file mode 100644 index 00000000000..cb0321c0c10 --- /dev/null +++ b/src/objective-c/tests/Connectivity/ViewController.m @@ -0,0 +1,43 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#import + +@interface ViewController : UIViewController +@end + +@implementation ViewController +- (void)viewDidLoad { + [super viewDidLoad]; +} +@end diff --git a/src/objective-c/tests/Connectivity/main.m b/src/objective-c/tests/Connectivity/main.m new file mode 100644 index 00000000000..5e09196d549 --- /dev/null +++ b/src/objective-c/tests/Connectivity/main.m @@ -0,0 +1,46 @@ +/* + * + * Copyright 2015, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +#import + +@interface AppDelegate : UIResponder +@property (strong, nonatomic) UIWindow *window; +@end +@implementation AppDelegate +@end + +int main(int argc, char * argv[]) { + @autoreleasepool { + return UIApplicationMain(argc, argv, nil, NSStringFromClass(AppDelegate.class)); + } +} From 3325c0b2a248c28666d9a0a7c9a27e1dd33099e9 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Wed, 29 Jun 2016 17:02:16 -0700 Subject: [PATCH 1407/1894] Add Podfile and pod install --- .../project.pbxproj | 79 +++++++++++++++++++ src/objective-c/tests/Connectivity/Podfile | 10 +++ 2 files changed, 89 insertions(+) create mode 100644 src/objective-c/tests/Connectivity/Podfile diff --git a/src/objective-c/tests/Connectivity/ConnectivityTestingApp.xcodeproj/project.pbxproj b/src/objective-c/tests/Connectivity/ConnectivityTestingApp.xcodeproj/project.pbxproj index 1b1aca74d3b..2a9466c03f1 100644 --- a/src/objective-c/tests/Connectivity/ConnectivityTestingApp.xcodeproj/project.pbxproj +++ b/src/objective-c/tests/Connectivity/ConnectivityTestingApp.xcodeproj/project.pbxproj @@ -7,6 +7,7 @@ objects = { /* Begin PBXBuildFile section */ + 500A4E0AC9D489EB214D1ED4 /* libPods-ConnectivityTestingApp.a in Frameworks */ = {isa = PBXBuildFile; fileRef = C2AF815D8242A2172891621D /* libPods-ConnectivityTestingApp.a */; }; 63BFB9CC1D2478DD00E17927 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 63BFB9CB1D2478DD00E17927 /* main.m */; }; 63BFB9D21D2478DD00E17927 /* ViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 63BFB9D11D2478DD00E17927 /* ViewController.m */; }; 63BFB9D51D2478DD00E17927 /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 63BFB9D31D2478DD00E17927 /* Main.storyboard */; }; @@ -18,6 +19,9 @@ 63BFB9D11D2478DD00E17927 /* ViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ViewController.m; sourceTree = SOURCE_ROOT; }; 63BFB9D41D2478DD00E17927 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; }; 63BFB9DB1D2478DD00E17927 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = SOURCE_ROOT; }; + BA96CBC1612BD2F70E66246C /* Pods-ConnectivityTestingApp.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ConnectivityTestingApp.release.xcconfig"; path = "Pods/Target Support Files/Pods-ConnectivityTestingApp/Pods-ConnectivityTestingApp.release.xcconfig"; sourceTree = ""; }; + C2AF815D8242A2172891621D /* libPods-ConnectivityTestingApp.a */ = {isa = PBXFileReference; explicitFileType = archive.ar; includeInIndex = 0; path = "libPods-ConnectivityTestingApp.a"; sourceTree = BUILT_PRODUCTS_DIR; }; + FC9BD3AE427396EDB4CD13E3 /* Pods-ConnectivityTestingApp.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ConnectivityTestingApp.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ConnectivityTestingApp/Pods-ConnectivityTestingApp.debug.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -25,12 +29,30 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 500A4E0AC9D489EB214D1ED4 /* libPods-ConnectivityTestingApp.a in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 16E6C67F2E48B42376DFFD2A /* Pods */ = { + isa = PBXGroup; + children = ( + FC9BD3AE427396EDB4CD13E3 /* Pods-ConnectivityTestingApp.debug.xcconfig */, + BA96CBC1612BD2F70E66246C /* Pods-ConnectivityTestingApp.release.xcconfig */, + ); + name = Pods; + sourceTree = ""; + }; + 48F8EC18C66D3416A41F76F5 /* Frameworks */ = { + isa = PBXGroup; + children = ( + C2AF815D8242A2172891621D /* libPods-ConnectivityTestingApp.a */, + ); + name = Frameworks; + sourceTree = ""; + }; 63BFB9BE1D2478DD00E17927 = { isa = PBXGroup; children = ( @@ -39,6 +61,8 @@ 63BFB9DB1D2478DD00E17927 /* Info.plist */, 63BFB9CB1D2478DD00E17927 /* main.m */, 63BFB9C81D2478DD00E17927 /* Products */, + 16E6C67F2E48B42376DFFD2A /* Pods */, + 48F8EC18C66D3416A41F76F5 /* Frameworks */, ); sourceTree = ""; }; @@ -57,9 +81,12 @@ isa = PBXNativeTarget; buildConfigurationList = 63BFB9DE1D2478DD00E17927 /* Build configuration list for PBXNativeTarget "ConnectivityTestingApp" */; buildPhases = ( + 4DCA2703A0AA5DC1BD2751B8 /* [CP] Check Pods Manifest.lock */, 63BFB9C31D2478DD00E17927 /* Sources */, 63BFB9C41D2478DD00E17927 /* Frameworks */, 63BFB9C51D2478DD00E17927 /* Resources */, + 8593A2388A8F7BF5A7E98D26 /* [CP] Embed Pods Frameworks */, + 5347BF6C41E7888C1C05CD88 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -116,6 +143,54 @@ }; /* End PBXResourcesBuildPhase section */ +/* Begin PBXShellScriptBuildPhase section */ + 4DCA2703A0AA5DC1BD2751B8 /* [CP] Check Pods Manifest.lock */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Check Pods Manifest.lock"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n"; + showEnvVarsInLog = 0; + }; + 5347BF6C41E7888C1C05CD88 /* [CP] Copy Pods Resources */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Copy Pods Resources"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ConnectivityTestingApp/Pods-ConnectivityTestingApp-resources.sh\"\n"; + showEnvVarsInLog = 0; + }; + 8593A2388A8F7BF5A7E98D26 /* [CP] Embed Pods Frameworks */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + ); + name = "[CP] Embed Pods Frameworks"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ConnectivityTestingApp/Pods-ConnectivityTestingApp-frameworks.sh\"\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ 63BFB9C31D2478DD00E17927 /* Sources */ = { isa = PBXSourcesBuildPhase; @@ -227,9 +302,11 @@ }; 63BFB9DF1D2478DD00E17927 /* Debug */ = { isa = XCBuildConfiguration; + baseConfigurationReference = FC9BD3AE427396EDB4CD13E3 /* Pods-ConnectivityTestingApp.debug.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.grpc.ConnectivityTestingApp; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -238,9 +315,11 @@ }; 63BFB9E01D2478DD00E17927 /* Release */ = { isa = XCBuildConfiguration; + baseConfigurationReference = BA96CBC1612BD2F70E66246C /* Pods-ConnectivityTestingApp.release.xcconfig */; buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 9.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = io.grpc.ConnectivityTestingApp; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/src/objective-c/tests/Connectivity/Podfile b/src/objective-c/tests/Connectivity/Podfile new file mode 100644 index 00000000000..f9224d9e4e9 --- /dev/null +++ b/src/objective-c/tests/Connectivity/Podfile @@ -0,0 +1,10 @@ +install! 'cocoapods', :deterministic_uuids => false + +# Location of gRPC's repo root relative to this file. +GRPC_LOCAL_SRC = '../../../..' + +target 'ConnectivityTestingApp' do + pod 'gRPC', :path => GRPC_LOCAL_SRC + pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf" + pod 'BoringSSL', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c" +end From 10cc76cbe7f4a717e5da800837ee9d69144684f1 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Wed, 29 Jun 2016 17:02:45 -0700 Subject: [PATCH 1408/1894] Make RPCs on a loop --- .../tests/Connectivity/ViewController.m | 39 +++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/src/objective-c/tests/Connectivity/ViewController.m b/src/objective-c/tests/Connectivity/ViewController.m index cb0321c0c10..2b199c9617f 100644 --- a/src/objective-c/tests/Connectivity/ViewController.m +++ b/src/objective-c/tests/Connectivity/ViewController.m @@ -33,11 +33,50 @@ #import +#import +#import +#import +#import + @interface ViewController : UIViewController @end @implementation ViewController - (void)viewDidLoad { [super viewDidLoad]; + + NSString *host = @"grpc-test.sandbox.googleapis.com"; + + GRPCProtoMethod *method = [[GRPCProtoMethod alloc] initWithPackage:@"grpc.testing" + service:@"TestService" + method:@"StreamingOutputCall"]; + + __block void (^startCall)() = ^{ + GRXWriter *loggingRequestWriter = [[GRXWriter writerWithValue:[NSData data]] map:^id(id value) { + NSLog(@"Sending request."); + return value; + }]; + + GRPCCall *call = [[GRPCCall alloc] initWithHost:host + path:method.HTTPPath + requestsWriter:loggingRequestWriter]; + + [call startWithWriteable:[GRXWriteable writeableWithEventHandler:^(BOOL done, id value, + NSError *error) { + if (!done) { + return; + } + if (error) { + NSLog(@"Finished with error %@", error); + } else { + NSLog(@"Finished successfully."); + } + + dispatch_time_t oneSecond = dispatch_time(DISPATCH_TIME_NOW, (int64_t)(1 * NSEC_PER_SEC)); + dispatch_after(oneSecond, dispatch_get_main_queue(), startCall); + }]]; + }; + + startCall(); } @end From 28820575ff722d3332cebcae11d2b77d5be67316 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Wed, 29 Jun 2016 17:09:11 -0700 Subject: [PATCH 1409/1894] Add README.md explaining use of the app --- src/objective-c/tests/Connectivity/README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 src/objective-c/tests/Connectivity/README.md diff --git a/src/objective-c/tests/Connectivity/README.md b/src/objective-c/tests/Connectivity/README.md new file mode 100644 index 00000000000..851cb9d1dab --- /dev/null +++ b/src/objective-c/tests/Connectivity/README.md @@ -0,0 +1,16 @@ +This app can be used to manually test gRPC under changing network conditions. + +It makes RPCs in a loop, logging when the request is sent and the response is received. + +To test on the simulator, run `pod install`, open the workspace created by Cocoapods, and run the app. +Once running, disable WiFi (or ethernet) _in your computer_, then enable it again after a while. Don't +bother with the simulator's WiFi or cell settings, as they have no effect: Simulator apps are just Mac +apps running within the simulator UI. + +The expected result is to never see a "hanged" RPC: success or failure should happen almost immediately +after sending the request. Symptom of a hanged RPC is a log like the following being the last in your +console: + +``` +2016-06-29 16:51:29.443 ConnectivityTestingApp[73129:3567949] Sending request. +``` From 42812723893b08c466b830b0515c20bd5edb21dc Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 29 Jun 2016 17:39:07 -0700 Subject: [PATCH 1410/1894] Updated git clone URL --- INSTALL.md | 2 +- examples/cpp/README.md | 2 +- examples/cpp/cpptutorial.md | 2 +- examples/cpp/helloworld/README.md | 2 +- examples/node/README.md | 2 +- examples/objective-c/helloworld/README.md | 2 +- examples/php/README.md | 2 +- src/cpp/README.md | 2 +- src/php/README.md | 4 ++-- src/python/grpcio/README.rst | 2 +- tools/distrib/python/grpcio_tools/README.rst | 2 +- 11 files changed, 12 insertions(+), 12 deletions(-) diff --git a/INSTALL.md b/INSTALL.md index 66e6c33a775..6718aad120d 100644 --- a/INSTALL.md +++ b/INSTALL.md @@ -49,7 +49,7 @@ For developers who are interested to contribute, here is how to compile the gRPC C Core library. ```sh - $ git clone https://github.com/grpc/grpc.git + $ git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc $ cd grpc $ git submodule update --init $ make diff --git a/examples/cpp/README.md b/examples/cpp/README.md index d93cbacf7b2..3fa7ad4c784 100644 --- a/examples/cpp/README.md +++ b/examples/cpp/README.md @@ -14,7 +14,7 @@ following command: ```sh -$ git clone https://github.com/grpc/grpc.git +$ git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc ``` Change your current directory to examples/cpp/helloworld diff --git a/examples/cpp/cpptutorial.md b/examples/cpp/cpptutorial.md index ef9ca99c0fe..80fef07192e 100644 --- a/examples/cpp/cpptutorial.md +++ b/examples/cpp/cpptutorial.md @@ -20,7 +20,7 @@ With gRPC we can define our service once in a .proto file and implement clients The example code for our tutorial is in [examples/cpp/route_guide](route_guide). To download the example, clone this repository by running the following command: ```shell -$ git clone https://github.com/grpc/grpc.git +$ git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc ``` Then change your current directory to `examples/cpp/route_guide`: diff --git a/examples/cpp/helloworld/README.md b/examples/cpp/helloworld/README.md index 04283eabc35..db953f53628 100644 --- a/examples/cpp/helloworld/README.md +++ b/examples/cpp/helloworld/README.md @@ -12,7 +12,7 @@ following command: ```sh -$ git clone https://github.com/grpc/grpc.git +$ git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc ``` Change your current directory to examples/cpp/helloworld diff --git a/examples/node/README.md b/examples/node/README.md index 59fb4a17f59..b92ca383c47 100644 --- a/examples/node/README.md +++ b/examples/node/README.md @@ -12,7 +12,7 @@ INSTALL ```sh $ # Get the gRPC repository $ export REPO_ROOT=grpc # REPO root can be any directory of your choice - $ git clone https://github.com/grpc/grpc.git $REPO_ROOT + $ git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc $REPO_ROOT $ cd $REPO_ROOT $ cd examples/node diff --git a/examples/objective-c/helloworld/README.md b/examples/objective-c/helloworld/README.md index 81c5aaa7bcb..fdff938a978 100644 --- a/examples/objective-c/helloworld/README.md +++ b/examples/objective-c/helloworld/README.md @@ -16,7 +16,7 @@ this repository to your local machine by running the following commands: ```sh -$ git clone https://github.com/grpc/grpc.git +$ git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc $ cd grpc $ git submodule update --init ``` diff --git a/examples/php/README.md b/examples/php/README.md index ea9ccb67908..e56b0178730 100644 --- a/examples/php/README.md +++ b/examples/php/README.md @@ -17,7 +17,7 @@ INSTALL - Clone this repository ```sh - $ git clone https://github.com/grpc/grpc.git + $ git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc ``` - Install composer diff --git a/src/cpp/README.md b/src/cpp/README.md index f2935e52d9e..8c0f85e5ff7 100644 --- a/src/cpp/README.md +++ b/src/cpp/README.md @@ -51,7 +51,7 @@ below. #Build from Source ```sh - $ git clone https://github.com/grpc/grpc.git + $ git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc $ cd grpc $ git submodule update --init $ make diff --git a/src/php/README.md b/src/php/README.md index cf8f2c11b0f..6cc1ba4d462 100644 --- a/src/php/README.md +++ b/src/php/README.md @@ -58,7 +58,7 @@ To run tests with generated stub code from `.proto` files, you will also need th Clone this repository ```sh -$ git clone https://github.com/grpc/grpc.git +$ git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc ``` Build and install the gRPC C core library @@ -101,7 +101,7 @@ extension=grpc.so You will need the source code to run tests ```sh -$ git clone https://github.com/grpc/grpc.git +$ git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc $ cd grpc $ git pull --recurse-submodules && git submodule update --init --recursive ``` diff --git a/src/python/grpcio/README.rst b/src/python/grpcio/README.rst index afc4fe6a370..3fc318539ea 100644 --- a/src/python/grpcio/README.rst +++ b/src/python/grpcio/README.rst @@ -46,7 +46,7 @@ package named :code:`python-dev`). :: $ export REPO_ROOT=grpc # REPO_ROOT can be any directory of your choice - $ git clone https://github.com/grpc/grpc.git $REPO_ROOT + $ git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc $REPO_ROOT $ cd $REPO_ROOT $ git submodule update --init diff --git a/tools/distrib/python/grpcio_tools/README.rst b/tools/distrib/python/grpcio_tools/README.rst index e9f137493ba..8946a1d5b31 100644 --- a/tools/distrib/python/grpcio_tools/README.rst +++ b/tools/distrib/python/grpcio_tools/README.rst @@ -53,7 +53,7 @@ GCC-like stuff, but you may end up having a bad time. :: $ export REPO_ROOT=grpc # REPO_ROOT can be any directory of your choice - $ git clone https://github.com/grpc/grpc.git $REPO_ROOT + $ git clone -b $(curl -L http://grpc.io/release) https://github.com/grpc/grpc $REPO_ROOT $ cd $REPO_ROOT $ git submodule update --init From 6a654dd400cc204a1ceb059785821c8ea15acde9 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Mon, 27 Jun 2016 14:12:08 -0700 Subject: [PATCH 1411/1894] Changed default string type to be str This impacts the following APIs: Metadata: Key is always a str, Value is bytes for binary metadata, str otherwise Call Details: str type gRPC method: str type hostname/target: str type --- src/python/grpcio/grpc/_channel.py | 46 +++++---- src/python/grpcio/grpc/_common.py | 43 ++++++--- .../grpc/_cython/_cygrpc/channel.pyx.pxi | 5 +- .../grpc/_cython/_cygrpc/credentials.pyx.pxi | 8 +- .../grpc/_cython/_cygrpc/records.pyx.pxi | 36 +++---- .../grpc/_cython/_cygrpc/server.pyx.pxi | 2 +- src/python/grpcio/grpc/_plugin_wrapping.py | 14 +-- src/python/grpcio/grpc/_server.py | 42 ++++---- .../grpcio/grpc/beta/_server_adaptations.py | 3 +- .../grpcio/tests/unit/_compression_test.py | 4 +- .../unit/_cython/_cancel_many_calls_test.py | 4 +- .../tests/unit/_cython/_channel_test.py | 2 +- .../_read_some_but_not_all_responses_test.py | 4 +- .../grpcio/tests/unit/_cython/cygrpc_test.py | 40 ++++---- .../grpcio/tests/unit/_empty_message_test.py | 8 +- .../tests/unit/_metadata_code_details_test.py | 32 +++---- .../grpcio/tests/unit/_metadata_test.py | 24 ++--- src/python/grpcio/tests/unit/_rpc_test.py | 96 +++++++++---------- .../grpcio/tests/unit/beta/_utilities_test.py | 21 +--- .../grpcio/tests/unit/beta/test_utilities.py | 2 +- src/python/grpcio/tests/unit/test_common.py | 18 ++-- 21 files changed, 225 insertions(+), 229 deletions(-) diff --git a/src/python/grpcio/grpc/_channel.py b/src/python/grpcio/grpc/_channel.py index cf6175d0314..a89b5013030 100644 --- a/src/python/grpcio/grpc/_channel.py +++ b/src/python/grpcio/grpc/_channel.py @@ -364,13 +364,13 @@ class _Rendezvous(grpc.RpcError, grpc.Future, grpc.Call): with self._state.condition: while self._state.initial_metadata is None: self._state.condition.wait() - return self._state.initial_metadata + return _common.application_metadata(self._state.initial_metadata) def trailing_metadata(self): with self._state.condition: while self._state.trailing_metadata is None: self._state.condition.wait() - return self._state.trailing_metadata + return _common.application_metadata(self._state.trailing_metadata) def code(self): with self._state.condition: @@ -382,7 +382,7 @@ class _Rendezvous(grpc.RpcError, grpc.Future, grpc.Call): with self._state.condition: while self._state.details is None: self._state.condition.wait() - return self._state.details + return _common.decode(self._state.details) def _repr(self): with self._state.condition: @@ -390,7 +390,7 @@ class _Rendezvous(grpc.RpcError, grpc.Future, grpc.Call): return '<_Rendezvous object of in-flight RPC>' else: return '<_Rendezvous of RPC that terminated with ({}, {})>'.format( - self._state.code, self._state.details) + self._state.code, _common.decode(self._state.details)) def __repr__(self): return self._repr() @@ -451,7 +451,7 @@ class _UnaryUnaryMultiCallable(grpc.UnaryUnaryMultiCallable): state = _RPCState(_UNARY_UNARY_INITIAL_DUE, None, None, None, None) operations = ( cygrpc.operation_send_initial_metadata( - _common.metadata(metadata), _EMPTY_FLAGS), + _common.cygrpc_metadata(metadata), _EMPTY_FLAGS), cygrpc.operation_send_message(serialized_request, _EMPTY_FLAGS), cygrpc.operation_send_close_from_client(_EMPTY_FLAGS), cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS), @@ -529,7 +529,7 @@ class _UnaryStreamMultiCallable(grpc.UnaryStreamMultiCallable): event_handler) operations = ( cygrpc.operation_send_initial_metadata( - _common.metadata(metadata), _EMPTY_FLAGS), + _common.cygrpc_metadata(metadata), _EMPTY_FLAGS), cygrpc.operation_send_message(serialized_request, _EMPTY_FLAGS), cygrpc.operation_send_close_from_client(_EMPTY_FLAGS), cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS), @@ -564,7 +564,7 @@ class _StreamUnaryMultiCallable(grpc.StreamUnaryMultiCallable): None) operations = ( cygrpc.operation_send_initial_metadata( - _common.metadata(metadata), _EMPTY_FLAGS), + _common.cygrpc_metadata(metadata), _EMPTY_FLAGS), cygrpc.operation_receive_message(_EMPTY_FLAGS), cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS), ) @@ -608,7 +608,7 @@ class _StreamUnaryMultiCallable(grpc.StreamUnaryMultiCallable): event_handler) operations = ( cygrpc.operation_send_initial_metadata( - _common.metadata(metadata), _EMPTY_FLAGS), + _common.cygrpc_metadata(metadata), _EMPTY_FLAGS), cygrpc.operation_receive_message(_EMPTY_FLAGS), cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS), ) @@ -645,7 +645,7 @@ class _StreamStreamMultiCallable(grpc.StreamStreamMultiCallable): event_handler) operations = ( cygrpc.operation_send_initial_metadata( - _common.metadata(metadata), _EMPTY_FLAGS), + _common.cygrpc_metadata(metadata), _EMPTY_FLAGS), cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS), ) call.start_batch(cygrpc.Operations(operations), event_handler) @@ -846,8 +846,13 @@ def _options(options): else: pairs = list(options) + [ (cygrpc.ChannelArgKey.primary_user_agent_string, _USER_AGENT)] - return cygrpc.ChannelArgs( - cygrpc.ChannelArg(arg_name, arg_value) for arg_name, arg_value in pairs) + encoded_pairs = [ + (_common.encode(arg_name), arg_value) if isinstance(arg_value, int) + else (_common.encode(arg_name), _common.encode(arg_value)) + for arg_name, arg_value in pairs] + return cygrpc.ChannelArgs([ + cygrpc.ChannelArg(arg_name, arg_value) + for arg_name, arg_value in encoded_pairs]) class Channel(grpc.Channel): @@ -860,7 +865,8 @@ class Channel(grpc.Channel): options: Configuration options for the channel. credentials: A cygrpc.ChannelCredentials or None. """ - self._channel = cygrpc.Channel(target, _options(options), credentials) + self._channel = cygrpc.Channel( + _common.encode(target), _options(options), credentials) self._call_state = _ChannelCallState(self._channel) self._connectivity_state = _ChannelConnectivityState(self._channel) @@ -873,26 +879,26 @@ class Channel(grpc.Channel): def unary_unary( self, method, request_serializer=None, response_deserializer=None): return _UnaryUnaryMultiCallable( - self._channel, _create_channel_managed_call(self._call_state), method, - request_serializer, response_deserializer) + self._channel, _create_channel_managed_call(self._call_state), + _common.encode(method), request_serializer, response_deserializer) def unary_stream( self, method, request_serializer=None, response_deserializer=None): return _UnaryStreamMultiCallable( - self._channel, _create_channel_managed_call(self._call_state), method, - request_serializer, response_deserializer) + self._channel, _create_channel_managed_call(self._call_state), + _common.encode(method), request_serializer, response_deserializer) def stream_unary( self, method, request_serializer=None, response_deserializer=None): return _StreamUnaryMultiCallable( - self._channel, _create_channel_managed_call(self._call_state), method, - request_serializer, response_deserializer) + self._channel, _create_channel_managed_call(self._call_state), + _common.encode(method), request_serializer, response_deserializer) def stream_stream( self, method, request_serializer=None, response_deserializer=None): return _StreamStreamMultiCallable( - self._channel, _create_channel_managed_call(self._call_state), method, - request_serializer, response_deserializer) + self._channel, _create_channel_managed_call(self._call_state), + _common.encode(method), request_serializer, response_deserializer) def __del__(self): _moot(self._connectivity_state) diff --git a/src/python/grpcio/grpc/_common.py b/src/python/grpcio/grpc/_common.py index f351bea9e39..4d7d5214195 100644 --- a/src/python/grpcio/grpc/_common.py +++ b/src/python/grpcio/grpc/_common.py @@ -76,9 +76,37 @@ STATUS_CODE_TO_CYGRPC_STATUS_CODE = { } -def metadata(application_metadata): +def encode(s): + if isinstance(s, bytes): + return s + else: + return s.encode('ascii') + + +def decode(b): + if isinstance(b, str): + return b + else: + try: + return b.decode('utf8') + except UnicodeDecodeError: + logging.exception('Invalid encoding on {}'.format(b)) + return b.decode('latin1') + + +def cygrpc_metadata(application_metadata): return _EMPTY_METADATA if application_metadata is None else cygrpc.Metadata( - cygrpc.Metadatum(key, value) for key, value in application_metadata) + cygrpc.Metadatum(encode(key), encode(value)) + for key, value in application_metadata) + + +def application_metadata(cygrpc_metadata): + if cygrpc_metadata is None: + return () + else: + return tuple( + (decode(key), value if key[-4:] == b'-bin' else decode(value)) + for key, value in cygrpc_metadata) def _transform(message, transformer, exception_message): @@ -101,17 +129,8 @@ def deserialize(serialized_message, deserializer): 'Exception deserializing message!') -def _encode(s): - if isinstance(s, bytes): - return s - else: - return s.encode('ascii') - - def fully_qualified_method(group, method): - group = _encode(group) - method = _encode(method) - return b'/' + group + b'/' + method + return '/{}/{}'.format(group, method) class CleanupThread(threading.Thread): diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi index 866cff0d019..14066965104 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/channel.pyx.pxi @@ -32,9 +32,8 @@ cimport cpython cdef class Channel: - def __cinit__(self, target, ChannelArgs arguments=None, + def __cinit__(self, bytes target, ChannelArgs arguments=None, ChannelCredentials channel_credentials=None): - target = str_to_bytes(target) cdef grpc_channel_args *c_arguments = NULL cdef char *c_target = NULL self.c_channel = NULL @@ -57,8 +56,6 @@ cdef class Channel: def create_call(self, Call parent, int flags, CompletionQueue queue not None, method, host, Timespec deadline not None): - method = str_to_bytes(method) - host = str_to_bytes(host) if queue.is_shutting_down: raise ValueError("queue must not be shutting down or shutdown") cdef char *method_c_string = method diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi index 470382d6091..b24e69243e9 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/credentials.pyx.pxi @@ -82,7 +82,7 @@ cdef class ServerCredentials: cdef class CredentialsMetadataPlugin: - def __cinit__(self, object plugin_callback, name): + def __cinit__(self, object plugin_callback, bytes name): """ Args: plugin_callback (callable): Callback accepting a service URL (str/bytes) @@ -91,9 +91,8 @@ cdef class CredentialsMetadataPlugin: when called should be non-blocking and eventually call the callback object with the appropriate status code/details and metadata (if successful). - name (str): Plugin name. + name (bytes): Plugin name. """ - name = str_to_bytes(name) if not callable(plugin_callback): raise ValueError('expected callable plugin_callback') self.plugin_callback = plugin_callback @@ -130,8 +129,7 @@ cdef void plugin_get_metadata( grpc_credentials_plugin_metadata_cb cb, void *user_data) with gil: def python_callback( Metadata metadata, grpc_status_code status, - error_details): - error_details = str_to_bytes(error_details) + bytes error_details): cb(user_data, metadata.c_metadata_array.metadata, metadata.c_metadata_array.count, status, error_details) cdef CredentialsMetadataPlugin self = state diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi index 0055d0d3a28..8e651e880f3 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi @@ -231,17 +231,10 @@ cdef class Event: cdef class ByteBuffer: - def __cinit__(self, data): + def __cinit__(self, bytes data): if data is None: self.c_byte_buffer = NULL return - if isinstance(data, ByteBuffer): - data = (data).bytes() - if data is None: - self.c_byte_buffer = NULL - return - else: - data = str_to_bytes(data) cdef char *c_data = data cdef gpr_slice data_slice @@ -296,26 +289,28 @@ cdef class ByteBuffer: cdef class SslPemKeyCertPair: - def __cinit__(self, private_key, certificate_chain): - self.private_key = str_to_bytes(private_key) - self.certificate_chain = str_to_bytes(certificate_chain) + def __cinit__(self, bytes private_key, bytes certificate_chain): + self.private_key = private_key + self.certificate_chain = certificate_chain self.c_pair.private_key = self.private_key self.c_pair.certificate_chain = self.certificate_chain cdef class ChannelArg: - def __cinit__(self, key, value): - self.key = str_to_bytes(key) + def __cinit__(self, bytes key, value): + self.key = key self.c_arg.key = self.key if isinstance(value, int): - self.value = int(value) + self.value = value self.c_arg.type = GRPC_ARG_INTEGER self.c_arg.value.integer = self.value - else: - self.value = str_to_bytes(value) + elif isinstance(value, bytes): + self.value = value self.c_arg.type = GRPC_ARG_STRING self.c_arg.value.string = self.value + else: + raise TypeError('Expected int or bytes, got {}'.format(type(value))) cdef class ChannelArgs: @@ -347,9 +342,9 @@ cdef class ChannelArgs: cdef class Metadatum: - def __cinit__(self, key, value): - self._key = str_to_bytes(key) - self._value = str_to_bytes(value) + def __cinit__(self, bytes key, bytes value): + self._key = key + self._value = value self.c_metadata.key = self._key self.c_metadata.value = self._value self.c_metadata.value_length = len(self._value) @@ -563,8 +558,7 @@ def operation_send_close_from_client(int flags): return op def operation_send_status_from_server( - Metadata metadata, grpc_status_code code, details, int flags): - details = str_to_bytes(details) + Metadata metadata, grpc_status_code code, bytes details, int flags): cdef Operation op = Operation() op.c_op.type = GRPC_OP_SEND_STATUS_FROM_SERVER op.c_op.flags = flags diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi index 42afeb84987..3e03b6efe10 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/server.pyx.pxi @@ -101,7 +101,7 @@ cdef class Server: # Ensure the core has gotten a chance to do the start-up work self.backup_shutdown_queue.poll(Timespec(None)) - def add_http2_port(self, address, + def add_http2_port(self, bytes address, ServerCredentials server_credentials=None): address = str_to_bytes(address) self.references.append(address) diff --git a/src/python/grpcio/grpc/_plugin_wrapping.py b/src/python/grpcio/grpc/_plugin_wrapping.py index 4e9cfe710cd..7cb5218c22b 100644 --- a/src/python/grpcio/grpc/_plugin_wrapping.py +++ b/src/python/grpcio/grpc/_plugin_wrapping.py @@ -31,6 +31,7 @@ import collections import threading import grpc +from grpc import _common from grpc._cython import cygrpc @@ -62,17 +63,16 @@ class _WrappedCygrpcCallback(object): # TODO(atash) translate different Exception superclasses into different # status codes. self.cygrpc_callback( - cygrpc.Metadata([]), cygrpc.StatusCode.internal, error.message) + _common.EMPTY_METADATA, cygrpc.StatusCode.internal, + _common.encode(str(error))) def _invoke_success(self, metadata): try: - cygrpc_metadata = cygrpc.Metadata( - cygrpc.Metadatum(key, value) - for key, value in metadata) + cygrpc_metadata = _common.cygrpc_metadata(metadata) except Exception as error: self._invoke_failure(error) return - self.cygrpc_callback(cygrpc_metadata, cygrpc.StatusCode.ok, '') + self.cygrpc_callback(cygrpc_metadata, cygrpc.StatusCode.ok, b'') def __call__(self, metadata, error): with self.is_called_lock: @@ -101,7 +101,7 @@ class _WrappedPlugin(object): def __call__(self, context, cygrpc_callback): wrapped_cygrpc_callback = _WrappedCygrpcCallback(cygrpc_callback) wrapped_context = AuthMetadataContext( - context.service_url, context.method_name) + _common.decode(context.service_url), _common.decode(context.method_name)) try: self.plugin( wrapped_context, AuthMetadataPluginCallback(wrapped_cygrpc_callback)) @@ -120,4 +120,4 @@ def call_credentials_metadata_plugin(plugin, name): plugin's invocation must be non-blocking. """ return cygrpc.call_credentials_metadata_plugin( - cygrpc.CredentialsMetadataPlugin(_WrappedPlugin(plugin), name)) + cygrpc.CredentialsMetadataPlugin(_WrappedPlugin(plugin), _common.encode(name))) diff --git a/src/python/grpcio/grpc/_server.py b/src/python/grpcio/grpc/_server.py index bf20f15f729..f4c114056fe 100644 --- a/src/python/grpcio/grpc/_server.py +++ b/src/python/grpcio/grpc/_server.py @@ -87,7 +87,7 @@ def _abortion_code(state, code): def _details(state): - return '' if state.details is None else state.details + return b'' if state.details is None else state.details class _HandlerCallDetails( @@ -146,14 +146,14 @@ def _abort(state, call, code, details): cygrpc.operation_send_initial_metadata( _EMPTY_METADATA, _EMPTY_FLAGS), cygrpc.operation_send_status_from_server( - _common.metadata(state.trailing_metadata), effective_code, + _common.cygrpc_metadata(state.trailing_metadata), effective_code, effective_details, _EMPTY_FLAGS), ) token = _SEND_INITIAL_METADATA_AND_SEND_STATUS_FROM_SERVER_TOKEN else: operations = ( cygrpc.operation_send_status_from_server( - _common.metadata(state.trailing_metadata), effective_code, + _common.cygrpc_metadata(state.trailing_metadata), effective_code, effective_details, _EMPTY_FLAGS), ) token = _SEND_STATUS_FROM_SERVER_TOKEN @@ -191,7 +191,7 @@ def _receive_message(state, call, request_deserializer): if request is None: _abort( state, call, cygrpc.StatusCode.internal, - 'Exception deserializing request!') + b'Exception deserializing request!') else: state.request = request state.condition.notify_all() @@ -244,10 +244,10 @@ class _Context(grpc.ServicerContext): self._state.disable_next_compression = True def invocation_metadata(self): - return self._rpc_event.request_metadata + return _common.application_metadata(self._rpc_event.request_metadata) def peer(self): - return self._rpc_event.operation_call.peer() + return _common.decode(self._rpc_event.operation_call.peer()) def send_initial_metadata(self, initial_metadata): with self._state.condition: @@ -256,7 +256,7 @@ class _Context(grpc.ServicerContext): else: if self._state.initial_metadata_allowed: operation = cygrpc.operation_send_initial_metadata( - _common.metadata(initial_metadata), _EMPTY_FLAGS) + _common.cygrpc_metadata(initial_metadata), _EMPTY_FLAGS) self._rpc_event.operation_call.start_batch( cygrpc.Operations((operation,)), _send_initial_metadata(self._state)) @@ -267,7 +267,8 @@ class _Context(grpc.ServicerContext): def set_trailing_metadata(self, trailing_metadata): with self._state.condition: - self._state.trailing_metadata = trailing_metadata + self._state.trailing_metadata = _common.cygrpc_metadata( + trailing_metadata) def set_code(self, code): with self._state.condition: @@ -275,7 +276,7 @@ class _Context(grpc.ServicerContext): def set_details(self, details): with self._state.condition: - self._state.details = details + self._state.details = _common.encode(details) class _RequestIterator(object): @@ -346,7 +347,7 @@ def _unary_request(rpc_event, state, request_deserializer): rpc_event.request_call_details.method) _abort( state, rpc_event.operation_call, - cygrpc.StatusCode.unimplemented, details) + cygrpc.StatusCode.unimplemented, _common.encode(details)) return None elif state.client is _CANCELLED: return None @@ -366,8 +367,8 @@ def _call_behavior(rpc_event, state, behavior, argument, request_deserializer): if e not in state.rpc_errors: details = 'Exception calling application: {}'.format(e) logging.exception(details) - _abort( - state, rpc_event.operation_call, cygrpc.StatusCode.unknown, details) + _abort(state, rpc_event.operation_call, + cygrpc.StatusCode.unknown, _common.encode(details)) return None, False @@ -381,8 +382,8 @@ def _take_response_from_response_iterator(rpc_event, state, response_iterator): if e not in state.rpc_errors: details = 'Exception iterating responses: {}'.format(e) logging.exception(details) - _abort( - state, rpc_event.operation_call, cygrpc.StatusCode.unknown, details) + _abort(state, rpc_event.operation_call, + cygrpc.StatusCode.unknown, _common.encode(details)) return None, False @@ -392,7 +393,7 @@ def _serialize_response(rpc_event, state, response, response_serializer): with state.condition: _abort( state, rpc_event.operation_call, cygrpc.StatusCode.internal, - 'Failed to serialize response!') + b'Failed to serialize response!') return None else: return serialized_response @@ -428,7 +429,7 @@ def _send_response(rpc_event, state, serialized_response): def _status(rpc_event, state, serialized_response): with state.condition: if state.client is not _CANCELLED: - trailing_metadata = _common.metadata(state.trailing_metadata) + trailing_metadata = _common.cygrpc_metadata(state.trailing_metadata) code = _completion_code(state) details = _details(state) operations = [ @@ -532,7 +533,8 @@ def _find_method_handler(rpc_event, generic_handlers): for generic_handler in generic_handlers: method_handler = generic_handler.service( _HandlerCallDetails( - rpc_event.request_call_details.method, rpc_event.request_metadata)) + _common.decode(rpc_event.request_call_details.method), + rpc_event.request_metadata)) if method_handler is not None: return method_handler else: @@ -545,7 +547,7 @@ def _handle_unrecognized_method(rpc_event): cygrpc.operation_receive_close_on_server(_EMPTY_FLAGS), cygrpc.operation_send_status_from_server( _EMPTY_METADATA, cygrpc.StatusCode.unimplemented, - 'Method not found!', _EMPTY_FLAGS), + b'Method not found!', _EMPTY_FLAGS), ) rpc_state = _RPCState() rpc_event.operation_call.start_batch( @@ -740,10 +742,10 @@ class Server(grpc.Server): _add_generic_handlers(self._state, generic_rpc_handlers) def add_insecure_port(self, address): - return _add_insecure_port(self._state, address) + return _add_insecure_port(self._state, _common.encode(address)) def add_secure_port(self, address, server_credentials): - return _add_secure_port(self._state, address, server_credentials) + return _add_secure_port(self._state, _common.encode(address), server_credentials) def start(self): _start(self._state) diff --git a/src/python/grpcio/grpc/beta/_server_adaptations.py b/src/python/grpcio/grpc/beta/_server_adaptations.py index c695434dacf..1e1f80156ac 100644 --- a/src/python/grpcio/grpc/beta/_server_adaptations.py +++ b/src/python/grpcio/grpc/beta/_server_adaptations.py @@ -79,7 +79,8 @@ class _FaceServicerContext(face.ServicerContext): return _ServerProtocolContext(self._servicer_context) def invocation_metadata(self): - return self._servicer_context.invocation_metadata() + return _common.cygrpc_metadata( + self._servicer_context.invocation_metadata()) def initial_metadata(self, initial_metadata): self._servicer_context.send_initial_metadata(initial_metadata) diff --git a/src/python/grpcio/tests/unit/_compression_test.py b/src/python/grpcio/tests/unit/_compression_test.py index 6eddb6f83f3..9e8b8578c1e 100644 --- a/src/python/grpcio/tests/unit/_compression_test.py +++ b/src/python/grpcio/tests/unit/_compression_test.py @@ -37,8 +37,8 @@ from grpc.framework.foundation import logging_pool from tests.unit import test_common from tests.unit.framework.common import test_constants -_UNARY_UNARY = b'/test/UnaryUnary' -_STREAM_STREAM = b'/test/StreamStream' +_UNARY_UNARY = '/test/UnaryUnary' +_STREAM_STREAM = '/test/StreamStream' def handle_unary(request, servicer_context): diff --git a/src/python/grpcio/tests/unit/_cython/_cancel_many_calls_test.py b/src/python/grpcio/tests/unit/_cython/_cancel_many_calls_test.py index c1de7790145..cac0c8b3b93 100644 --- a/src/python/grpcio/tests/unit/_cython/_cancel_many_calls_test.py +++ b/src/python/grpcio/tests/unit/_cython/_cancel_many_calls_test.py @@ -159,9 +159,9 @@ class CancelManyCallsTest(unittest.TestCase): server_completion_queue = cygrpc.CompletionQueue() server = cygrpc.Server() server.register_completion_queue(server_completion_queue) - port = server.add_http2_port('[::]:0') + port = server.add_http2_port(b'[::]:0') server.start() - channel = cygrpc.Channel('localhost:{}'.format(port)) + channel = cygrpc.Channel('localhost:{}'.format(port).encode()) state = _State() diff --git a/src/python/grpcio/tests/unit/_cython/_channel_test.py b/src/python/grpcio/tests/unit/_cython/_channel_test.py index 3dc7a246aee..f9c8a3ac62b 100644 --- a/src/python/grpcio/tests/unit/_cython/_channel_test.py +++ b/src/python/grpcio/tests/unit/_cython/_channel_test.py @@ -37,7 +37,7 @@ from tests.unit.framework.common import test_constants def _channel_and_completion_queue(): - channel = cygrpc.Channel('localhost:54321', cygrpc.ChannelArgs(())) + channel = cygrpc.Channel(b'localhost:54321', cygrpc.ChannelArgs(())) completion_queue = cygrpc.CompletionQueue() return channel, completion_queue diff --git a/src/python/grpcio/tests/unit/_cython/_read_some_but_not_all_responses_test.py b/src/python/grpcio/tests/unit/_cython/_read_some_but_not_all_responses_test.py index 6ae7a90fbed..27fcee0d6f1 100644 --- a/src/python/grpcio/tests/unit/_cython/_read_some_but_not_all_responses_test.py +++ b/src/python/grpcio/tests/unit/_cython/_read_some_but_not_all_responses_test.py @@ -126,9 +126,9 @@ class ReadSomeButNotAllResponsesTest(unittest.TestCase): server_completion_queue = cygrpc.CompletionQueue() server = cygrpc.Server() server.register_completion_queue(server_completion_queue) - port = server.add_http2_port('[::]:0') + port = server.add_http2_port(b'[::]:0') server.start() - channel = cygrpc.Channel('localhost:{}'.format(port)) + channel = cygrpc.Channel('localhost:{}'.format(port).encode()) server_shutdown_tag = 'server_shutdown_tag' server_driver = _ServerDriver(server_completion_queue, server_shutdown_tag) diff --git a/src/python/grpcio/tests/unit/_cython/cygrpc_test.py b/src/python/grpcio/tests/unit/_cython/cygrpc_test.py index a006a20ce3f..b740695e35b 100644 --- a/src/python/grpcio/tests/unit/_cython/cygrpc_test.py +++ b/src/python/grpcio/tests/unit/_cython/cygrpc_test.py @@ -46,38 +46,38 @@ def _metadata_plugin_callback(context, callback): callback(cygrpc.Metadata( [cygrpc.Metadatum(_CALL_CREDENTIALS_METADATA_KEY, _CALL_CREDENTIALS_METADATA_VALUE)]), - cygrpc.StatusCode.ok, '') + cygrpc.StatusCode.ok, b'') class TypeSmokeTest(unittest.TestCase): def testStringsInUtilitiesUpDown(self): self.assertEqual(0, cygrpc.StatusCode.ok) - metadatum = cygrpc.Metadatum('a', 'b') - self.assertEqual('a'.encode(), metadatum.key) - self.assertEqual('b'.encode(), metadatum.value) + metadatum = cygrpc.Metadatum(b'a', b'b') + self.assertEqual(b'a', metadatum.key) + self.assertEqual(b'b', metadatum.value) metadata = cygrpc.Metadata([metadatum]) self.assertEqual(1, len(metadata)) self.assertEqual(metadatum.key, metadata[0].key) def testMetadataIteration(self): metadata = cygrpc.Metadata([ - cygrpc.Metadatum('a', 'b'), cygrpc.Metadatum('c', 'd')]) + cygrpc.Metadatum(b'a', b'b'), cygrpc.Metadatum(b'c', b'd')]) iterator = iter(metadata) metadatum = next(iterator) self.assertIsInstance(metadatum, cygrpc.Metadatum) - self.assertEqual(metadatum.key, 'a'.encode()) - self.assertEqual(metadatum.value, 'b'.encode()) + self.assertEqual(metadatum.key, b'a') + self.assertEqual(metadatum.value, b'b') metadatum = next(iterator) self.assertIsInstance(metadatum, cygrpc.Metadatum) - self.assertEqual(metadatum.key, 'c'.encode()) - self.assertEqual(metadatum.value, 'd'.encode()) + self.assertEqual(metadatum.key, b'c') + self.assertEqual(metadatum.value, b'd') with self.assertRaises(StopIteration): next(iterator) def testOperationsIteration(self): operations = cygrpc.Operations([ - cygrpc.operation_send_message('asdf', _EMPTY_FLAGS)]) + cygrpc.operation_send_message(b'asdf', _EMPTY_FLAGS)]) iterator = iter(operations) operation = next(iterator) self.assertIsInstance(operation, cygrpc.Operation) @@ -87,7 +87,7 @@ class TypeSmokeTest(unittest.TestCase): next(iterator) def testOperationFlags(self): - operation = cygrpc.operation_send_message('asdf', + operation = cygrpc.operation_send_message(b'asdf', cygrpc.WriteFlag.no_compress) self.assertEqual(cygrpc.WriteFlag.no_compress, operation.flags) @@ -105,16 +105,16 @@ class TypeSmokeTest(unittest.TestCase): del server def testChannelUpDown(self): - channel = cygrpc.Channel('[::]:0', cygrpc.ChannelArgs([])) + channel = cygrpc.Channel(b'[::]:0', cygrpc.ChannelArgs([])) del channel def testCredentialsMetadataPluginUpDown(self): plugin = cygrpc.CredentialsMetadataPlugin( - lambda ignored_a, ignored_b: None, '') + lambda ignored_a, ignored_b: None, b'') del plugin def testCallCredentialsFromPluginUpDown(self): - plugin = cygrpc.CredentialsMetadataPlugin(_metadata_plugin_callback, '') + plugin = cygrpc.CredentialsMetadataPlugin(_metadata_plugin_callback, b'') call_credentials = cygrpc.call_credentials_metadata_plugin(plugin) del plugin del call_credentials @@ -123,7 +123,7 @@ class TypeSmokeTest(unittest.TestCase): server = cygrpc.Server() completion_queue = cygrpc.CompletionQueue() server.register_completion_queue(completion_queue) - port = server.add_http2_port('[::]:0') + port = server.add_http2_port(b'[::]:0') self.assertIsInstance(port, int) server.start() del server @@ -131,7 +131,7 @@ class TypeSmokeTest(unittest.TestCase): def testServerStartShutdown(self): completion_queue = cygrpc.CompletionQueue() server = cygrpc.Server() - server.add_http2_port('[::]:0') + server.add_http2_port(b'[::]:0') server.register_completion_queue(completion_queue) server.start() shutdown_tag = object() @@ -150,9 +150,9 @@ class ServerClientMixin(object): self.server = cygrpc.Server() self.server.register_completion_queue(self.server_completion_queue) if server_credentials: - self.port = self.server.add_http2_port('[::]:0', server_credentials) + self.port = self.server.add_http2_port(b'[::]:0', server_credentials) else: - self.port = self.server.add_http2_port('[::]:0') + self.port = self.server.add_http2_port(b'[::]:0') self.server.start() self.client_completion_queue = cygrpc.CompletionQueue() if client_credentials: @@ -160,10 +160,10 @@ class ServerClientMixin(object): cygrpc.ChannelArg(cygrpc.ChannelArgKey.ssl_target_name_override, host_override)]) self.client_channel = cygrpc.Channel( - 'localhost:{}'.format(self.port), client_channel_arguments, + 'localhost:{}'.format(self.port).encode(), client_channel_arguments, client_credentials) else: - self.client_channel = cygrpc.Channel('localhost:{}'.format(self.port)) + self.client_channel = cygrpc.Channel('localhost:{}'.format(self.port).encode()) if host_override: self.host_argument = None # default host self.expected_host = host_override diff --git a/src/python/grpcio/tests/unit/_empty_message_test.py b/src/python/grpcio/tests/unit/_empty_message_test.py index f324f6216b7..8c7d697728b 100644 --- a/src/python/grpcio/tests/unit/_empty_message_test.py +++ b/src/python/grpcio/tests/unit/_empty_message_test.py @@ -37,10 +37,10 @@ from tests.unit.framework.common import test_constants _REQUEST = b'' _RESPONSE = b'' -_UNARY_UNARY = b'/test/UnaryUnary' -_UNARY_STREAM = b'/test/UnaryStream' -_STREAM_UNARY = b'/test/StreamUnary' -_STREAM_STREAM = b'/test/StreamStream' +_UNARY_UNARY = '/test/UnaryUnary' +_UNARY_STREAM = '/test/UnaryStream' +_STREAM_UNARY = '/test/StreamUnary' +_STREAM_STREAM = '/test/StreamStream' def handle_unary_unary(request, servicer_context): diff --git a/src/python/grpcio/tests/unit/_metadata_code_details_test.py b/src/python/grpcio/tests/unit/_metadata_code_details_test.py index dd74268cbf1..0fd02d2a227 100644 --- a/src/python/grpcio/tests/unit/_metadata_code_details_test.py +++ b/src/python/grpcio/tests/unit/_metadata_code_details_test.py @@ -47,29 +47,29 @@ _REQUEST_DESERIALIZER = lambda unused_serialized_request: object() _RESPONSE_SERIALIZER = lambda unused_response: _SERIALIZED_RESPONSE _RESPONSE_DESERIALIZER = lambda unused_serialized_resopnse: object() -_SERVICE = b'test.TestService' -_UNARY_UNARY = b'UnaryUnary' -_UNARY_STREAM = b'UnaryStream' -_STREAM_UNARY = b'StreamUnary' -_STREAM_STREAM = b'StreamStream' +_SERVICE = 'test.TestService' +_UNARY_UNARY = 'UnaryUnary' +_UNARY_STREAM = 'UnaryStream' +_STREAM_UNARY = 'StreamUnary' +_STREAM_STREAM = 'StreamStream' _CLIENT_METADATA = ( - (b'client-md-key', b'client-md-key'), - (b'client-md-key-bin', b'\x00\x01') + ('client-md-key', 'client-md-key'), + ('client-md-key-bin', b'\x00\x01') ) _SERVER_INITIAL_METADATA = ( - (b'server-initial-md-key', b'server-initial-md-value'), - (b'server-initial-md-key-bin', b'\x00\x02') + ('server-initial-md-key', 'server-initial-md-value'), + ('server-initial-md-key-bin', b'\x00\x02') ) _SERVER_TRAILING_METADATA = ( - (b'server-trailing-md-key', b'server-trailing-md-value'), - (b'server-trailing-md-key-bin', b'\x00\x03') + ('server-trailing-md-key', 'server-trailing-md-value'), + ('server-trailing-md-key-bin', b'\x00\x03') ) _NON_OK_CODE = grpc.StatusCode.NOT_FOUND -_DETAILS = b'Test details!' +_DETAILS = 'Test details!' class _Servicer(object): @@ -195,15 +195,15 @@ class MetadataCodeDetailsTest(unittest.TestCase): channel = grpc.insecure_channel('localhost:{}'.format(port)) self._unary_unary = channel.unary_unary( - b'/'.join((b'', _SERVICE, _UNARY_UNARY,)), + '/'.join(('', _SERVICE, _UNARY_UNARY,)), request_serializer=_REQUEST_SERIALIZER, response_deserializer=_RESPONSE_DESERIALIZER,) self._unary_stream = channel.unary_stream( - b'/'.join((b'', _SERVICE, _UNARY_STREAM,)),) + '/'.join(('', _SERVICE, _UNARY_STREAM,)),) self._stream_unary = channel.stream_unary( - b'/'.join((b'', _SERVICE, _STREAM_UNARY,)),) + '/'.join(('', _SERVICE, _STREAM_UNARY,)),) self._stream_stream = channel.stream_stream( - b'/'.join((b'', _SERVICE, _STREAM_STREAM,)), + '/'.join(('', _SERVICE, _STREAM_STREAM,)), request_serializer=_REQUEST_SERIALIZER, response_deserializer=_RESPONSE_DESERIALIZER,) diff --git a/src/python/grpcio/tests/unit/_metadata_test.py b/src/python/grpcio/tests/unit/_metadata_test.py index 2cb13f236bd..c637a28039d 100644 --- a/src/python/grpcio/tests/unit/_metadata_test.py +++ b/src/python/grpcio/tests/unit/_metadata_test.py @@ -44,33 +44,33 @@ _CHANNEL_ARGS = (('grpc.primary_user_agent', 'primary-agent'), _REQUEST = b'\x00\x00\x00' _RESPONSE = b'\x00\x00\x00' -_UNARY_UNARY = b'/test/UnaryUnary' -_UNARY_STREAM = b'/test/UnaryStream' -_STREAM_UNARY = b'/test/StreamUnary' -_STREAM_STREAM = b'/test/StreamStream' +_UNARY_UNARY = '/test/UnaryUnary' +_UNARY_STREAM = '/test/UnaryStream' +_STREAM_UNARY = '/test/StreamUnary' +_STREAM_STREAM = '/test/StreamStream' _USER_AGENT = 'Python-gRPC-{}'.format(_grpcio_metadata.__version__) _CLIENT_METADATA = ( - (b'client-md-key', b'client-md-key'), - (b'client-md-key-bin', b'\x00\x01') + ('client-md-key', 'client-md-key'), + ('client-md-key-bin', b'\x00\x01') ) _SERVER_INITIAL_METADATA = ( - (b'server-initial-md-key', b'server-initial-md-value'), - (b'server-initial-md-key-bin', b'\x00\x02') + ('server-initial-md-key', 'server-initial-md-value'), + ('server-initial-md-key-bin', b'\x00\x02') ) _SERVER_TRAILING_METADATA = ( - (b'server-trailing-md-key', b'server-trailing-md-value'), - (b'server-trailing-md-key-bin', b'\x00\x03') + ('server-trailing-md-key', 'server-trailing-md-value'), + ('server-trailing-md-key-bin', b'\x00\x03') ) def user_agent(metadata): for key, val in metadata: - if key == b'user-agent': - return val.decode('ascii') + if key == 'user-agent': + return val raise KeyError('No user agent!') diff --git a/src/python/grpcio/tests/unit/_rpc_test.py b/src/python/grpcio/tests/unit/_rpc_test.py index 9814504edff..c70d65a6dfb 100644 --- a/src/python/grpcio/tests/unit/_rpc_test.py +++ b/src/python/grpcio/tests/unit/_rpc_test.py @@ -45,10 +45,10 @@ _DESERIALIZE_REQUEST = lambda bytestring: bytestring[len(bytestring) // 2:] _SERIALIZE_RESPONSE = lambda bytestring: bytestring * 3 _DESERIALIZE_RESPONSE = lambda bytestring: bytestring[:len(bytestring) // 3] -_UNARY_UNARY = b'/test/UnaryUnary' -_UNARY_STREAM = b'/test/UnaryStream' -_STREAM_UNARY = b'/test/StreamUnary' -_STREAM_STREAM = b'/test/StreamStream' +_UNARY_UNARY = '/test/UnaryUnary' +_UNARY_STREAM = '/test/UnaryStream' +_STREAM_UNARY = '/test/StreamUnary' +_STREAM_STREAM = '/test/StreamStream' class _Callback(object): @@ -79,7 +79,7 @@ class _Handler(object): def handle_unary_unary(self, request, servicer_context): self._control.control() if servicer_context is not None: - servicer_context.set_trailing_metadata(((b'testkey', b'testvalue',),)) + servicer_context.set_trailing_metadata((('testkey', 'testvalue',),)) return request def handle_unary_stream(self, request, servicer_context): @@ -88,7 +88,7 @@ class _Handler(object): yield request self._control.control() if servicer_context is not None: - servicer_context.set_trailing_metadata(((b'testkey', b'testvalue',),)) + servicer_context.set_trailing_metadata((('testkey', 'testvalue',),)) def handle_stream_unary(self, request_iterator, servicer_context): if servicer_context is not None: @@ -100,13 +100,13 @@ class _Handler(object): response_elements.append(request) self._control.control() if servicer_context is not None: - servicer_context.set_trailing_metadata(((b'testkey', b'testvalue',),)) + servicer_context.set_trailing_metadata((('testkey', 'testvalue',),)) return b''.join(response_elements) def handle_stream_stream(self, request_iterator, servicer_context): self._control.control() if servicer_context is not None: - servicer_context.set_trailing_metadata(((b'testkey', b'testvalue',),)) + servicer_context.set_trailing_metadata((('testkey', 'testvalue',),)) for request in request_iterator: self._control.control() yield request @@ -185,7 +185,7 @@ class RPCTest(unittest.TestCase): self._server_pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY) self._server = grpc.server((), self._server_pool) - port = self._server.add_insecure_port(b'[::]:0') + port = self._server.add_insecure_port('[::]:0') self._server.add_generic_rpc_handlers((_GenericHandler(self._handler),)) self._server.start() @@ -195,7 +195,7 @@ class RPCTest(unittest.TestCase): request = b'abc' with self.assertRaises(grpc.RpcError) as exception_context: - self._channel.unary_unary(b'NoSuchMethod')(request) + self._channel.unary_unary('NoSuchMethod')(request) self.assertEqual( grpc.StatusCode.UNIMPLEMENTED, exception_context.exception.code()) @@ -207,7 +207,7 @@ class RPCTest(unittest.TestCase): multi_callable = _unary_unary_multi_callable(self._channel) response = multi_callable( request, metadata=( - (b'test', b'SuccessfulUnaryRequestBlockingUnaryResponse'),)) + ('test', 'SuccessfulUnaryRequestBlockingUnaryResponse'),)) self.assertEqual(expected_response, response) @@ -218,7 +218,7 @@ class RPCTest(unittest.TestCase): multi_callable = _unary_unary_multi_callable(self._channel) response, call = multi_callable.with_call( request, metadata=( - (b'test', b'SuccessfulUnaryRequestBlockingUnaryResponseWithCall'),)) + ('test', 'SuccessfulUnaryRequestBlockingUnaryResponseWithCall'),)) self.assertEqual(expected_response, response) self.assertIs(grpc.StatusCode.OK, call.code()) @@ -230,7 +230,7 @@ class RPCTest(unittest.TestCase): multi_callable = _unary_unary_multi_callable(self._channel) response_future = multi_callable.future( request, metadata=( - (b'test', b'SuccessfulUnaryRequestFutureUnaryResponse'),)) + ('test', 'SuccessfulUnaryRequestFutureUnaryResponse'),)) response = response_future.result() self.assertEqual(expected_response, response) @@ -242,7 +242,7 @@ class RPCTest(unittest.TestCase): multi_callable = _unary_stream_multi_callable(self._channel) response_iterator = multi_callable( request, - metadata=((b'test', b'SuccessfulUnaryRequestStreamResponse'),)) + metadata=(('test', 'SuccessfulUnaryRequestStreamResponse'),)) responses = tuple(response_iterator) self.assertSequenceEqual(expected_responses, responses) @@ -255,7 +255,7 @@ class RPCTest(unittest.TestCase): multi_callable = _stream_unary_multi_callable(self._channel) response = multi_callable( request_iterator, - metadata=((b'test', b'SuccessfulStreamRequestBlockingUnaryResponse'),)) + metadata=(('test', 'SuccessfulStreamRequestBlockingUnaryResponse'),)) self.assertEqual(expected_response, response) @@ -268,7 +268,7 @@ class RPCTest(unittest.TestCase): response, call = multi_callable.with_call( request_iterator, metadata=( - (b'test', b'SuccessfulStreamRequestBlockingUnaryResponseWithCall'), + ('test', 'SuccessfulStreamRequestBlockingUnaryResponseWithCall'), )) self.assertEqual(expected_response, response) @@ -283,7 +283,7 @@ class RPCTest(unittest.TestCase): response_future = multi_callable.future( request_iterator, metadata=( - (b'test', b'SuccessfulStreamRequestFutureUnaryResponse'),)) + ('test', 'SuccessfulStreamRequestFutureUnaryResponse'),)) response = response_future.result() self.assertEqual(expected_response, response) @@ -297,7 +297,7 @@ class RPCTest(unittest.TestCase): multi_callable = _stream_stream_multi_callable(self._channel) response_iterator = multi_callable( request_iterator, - metadata=((b'test', b'SuccessfulStreamRequestStreamResponse'),)) + metadata=(('test', 'SuccessfulStreamRequestStreamResponse'),)) responses = tuple(response_iterator) self.assertSequenceEqual(expected_responses, responses) @@ -312,9 +312,9 @@ class RPCTest(unittest.TestCase): multi_callable = _unary_unary_multi_callable(self._channel) first_response = multi_callable( - first_request, metadata=((b'test', b'SequentialInvocations'),)) + first_request, metadata=(('test', 'SequentialInvocations'),)) second_response = multi_callable( - second_request, metadata=((b'test', b'SequentialInvocations'),)) + second_request, metadata=(('test', 'SequentialInvocations'),)) self.assertEqual(expected_first_response, first_response) self.assertEqual(expected_second_response, second_response) @@ -331,7 +331,7 @@ class RPCTest(unittest.TestCase): request_iterator = iter(requests) response_future = pool.submit( multi_callable, request_iterator, - metadata=((b'test', b'ConcurrentBlockingInvocations'),)) + metadata=(('test', 'ConcurrentBlockingInvocations'),)) response_futures[index] = response_future responses = tuple( response_future.result() for response_future in response_futures) @@ -350,7 +350,7 @@ class RPCTest(unittest.TestCase): request_iterator = iter(requests) response_future = multi_callable.future( request_iterator, - metadata=((b'test', b'ConcurrentFutureInvocations'),)) + metadata=(('test', 'ConcurrentFutureInvocations'),)) response_futures[index] = response_future responses = tuple( response_future.result() for response_future in response_futures) @@ -380,8 +380,8 @@ class RPCTest(unittest.TestCase): inner_response_future = multi_callable.future( request, metadata=( - (b'test', - b'WaitingForSomeButNotAllConcurrentFutureInvocations'),)) + ('test', + 'WaitingForSomeButNotAllConcurrentFutureInvocations'),)) outer_response_future = pool.submit(wrap_future(inner_response_future)) response_futures[index] = outer_response_future @@ -400,7 +400,7 @@ class RPCTest(unittest.TestCase): response_iterator = multi_callable( request, metadata=( - (b'test', b'ConsumingOneStreamResponseUnaryRequest'),)) + ('test', 'ConsumingOneStreamResponseUnaryRequest'),)) next(response_iterator) def testConsumingSomeButNotAllStreamResponsesUnaryRequest(self): @@ -410,7 +410,7 @@ class RPCTest(unittest.TestCase): response_iterator = multi_callable( request, metadata=( - (b'test', b'ConsumingSomeButNotAllStreamResponsesUnaryRequest'),)) + ('test', 'ConsumingSomeButNotAllStreamResponsesUnaryRequest'),)) for _ in range(test_constants.STREAM_LENGTH // 2): next(response_iterator) @@ -422,7 +422,7 @@ class RPCTest(unittest.TestCase): response_iterator = multi_callable( request_iterator, metadata=( - (b'test', b'ConsumingSomeButNotAllStreamResponsesStreamRequest'),)) + ('test', 'ConsumingSomeButNotAllStreamResponsesStreamRequest'),)) for _ in range(test_constants.STREAM_LENGTH // 2): next(response_iterator) @@ -434,7 +434,7 @@ class RPCTest(unittest.TestCase): response_iterator = multi_callable( request_iterator, metadata=( - (b'test', b'ConsumingTooManyStreamResponsesStreamRequest'),)) + ('test', 'ConsumingTooManyStreamResponsesStreamRequest'),)) for _ in range(test_constants.STREAM_LENGTH): next(response_iterator) for _ in range(test_constants.STREAM_LENGTH): @@ -453,7 +453,7 @@ class RPCTest(unittest.TestCase): with self._control.pause(): response_future = multi_callable.future( request, - metadata=((b'test', b'CancelledUnaryRequestUnaryResponse'),)) + metadata=(('test', 'CancelledUnaryRequestUnaryResponse'),)) response_future.cancel() self.assertTrue(response_future.cancelled()) @@ -468,7 +468,7 @@ class RPCTest(unittest.TestCase): with self._control.pause(): response_iterator = multi_callable( request, - metadata=((b'test', b'CancelledUnaryRequestStreamResponse'),)) + metadata=(('test', 'CancelledUnaryRequestStreamResponse'),)) self._control.block_until_paused() response_iterator.cancel() @@ -488,7 +488,7 @@ class RPCTest(unittest.TestCase): with self._control.pause(): response_future = multi_callable.future( request_iterator, - metadata=((b'test', b'CancelledStreamRequestUnaryResponse'),)) + metadata=(('test', 'CancelledStreamRequestUnaryResponse'),)) self._control.block_until_paused() response_future.cancel() @@ -508,7 +508,7 @@ class RPCTest(unittest.TestCase): with self._control.pause(): response_iterator = multi_callable( request_iterator, - metadata=((b'test', b'CancelledStreamRequestStreamResponse'),)) + metadata=(('test', 'CancelledStreamRequestStreamResponse'),)) response_iterator.cancel() with self.assertRaises(grpc.RpcError): @@ -526,7 +526,7 @@ class RPCTest(unittest.TestCase): with self.assertRaises(grpc.RpcError) as exception_context: multi_callable.with_call( request, timeout=test_constants.SHORT_TIMEOUT, - metadata=((b'test', b'ExpiredUnaryRequestBlockingUnaryResponse'),)) + metadata=(('test', 'ExpiredUnaryRequestBlockingUnaryResponse'),)) self.assertIsNotNone(exception_context.exception.initial_metadata()) self.assertIs( @@ -542,7 +542,7 @@ class RPCTest(unittest.TestCase): with self._control.pause(): response_future = multi_callable.future( request, timeout=test_constants.SHORT_TIMEOUT, - metadata=((b'test', b'ExpiredUnaryRequestFutureUnaryResponse'),)) + metadata=(('test', 'ExpiredUnaryRequestFutureUnaryResponse'),)) response_future.add_done_callback(callback) value_passed_to_callback = callback.value() @@ -567,7 +567,7 @@ class RPCTest(unittest.TestCase): with self.assertRaises(grpc.RpcError) as exception_context: response_iterator = multi_callable( request, timeout=test_constants.SHORT_TIMEOUT, - metadata=((b'test', b'ExpiredUnaryRequestStreamResponse'),)) + metadata=(('test', 'ExpiredUnaryRequestStreamResponse'),)) next(response_iterator) self.assertIs( @@ -583,7 +583,7 @@ class RPCTest(unittest.TestCase): with self.assertRaises(grpc.RpcError) as exception_context: multi_callable( request_iterator, timeout=test_constants.SHORT_TIMEOUT, - metadata=((b'test', b'ExpiredStreamRequestBlockingUnaryResponse'),)) + metadata=(('test', 'ExpiredStreamRequestBlockingUnaryResponse'),)) self.assertIsNotNone(exception_context.exception.initial_metadata()) self.assertIs( @@ -600,7 +600,7 @@ class RPCTest(unittest.TestCase): with self._control.pause(): response_future = multi_callable.future( request_iterator, timeout=test_constants.SHORT_TIMEOUT, - metadata=((b'test', b'ExpiredStreamRequestFutureUnaryResponse'),)) + metadata=(('test', 'ExpiredStreamRequestFutureUnaryResponse'),)) response_future.add_done_callback(callback) value_passed_to_callback = callback.value() @@ -625,7 +625,7 @@ class RPCTest(unittest.TestCase): with self.assertRaises(grpc.RpcError) as exception_context: response_iterator = multi_callable( request_iterator, timeout=test_constants.SHORT_TIMEOUT, - metadata=((b'test', b'ExpiredStreamRequestStreamResponse'),)) + metadata=(('test', 'ExpiredStreamRequestStreamResponse'),)) next(response_iterator) self.assertIs( @@ -640,7 +640,7 @@ class RPCTest(unittest.TestCase): with self.assertRaises(grpc.RpcError) as exception_context: multi_callable.with_call( request, - metadata=((b'test', b'FailedUnaryRequestBlockingUnaryResponse'),)) + metadata=(('test', 'FailedUnaryRequestBlockingUnaryResponse'),)) self.assertIs(grpc.StatusCode.UNKNOWN, exception_context.exception.code()) @@ -652,7 +652,7 @@ class RPCTest(unittest.TestCase): with self._control.fail(): response_future = multi_callable.future( request, - metadata=((b'test', b'FailedUnaryRequestFutureUnaryResponse'),)) + metadata=(('test', 'FailedUnaryRequestFutureUnaryResponse'),)) response_future.add_done_callback(callback) value_passed_to_callback = callback.value() @@ -672,7 +672,7 @@ class RPCTest(unittest.TestCase): with self._control.fail(): response_iterator = multi_callable( request, - metadata=((b'test', b'FailedUnaryRequestStreamResponse'),)) + metadata=(('test', 'FailedUnaryRequestStreamResponse'),)) next(response_iterator) self.assertIs(grpc.StatusCode.UNKNOWN, exception_context.exception.code()) @@ -686,7 +686,7 @@ class RPCTest(unittest.TestCase): with self.assertRaises(grpc.RpcError) as exception_context: multi_callable( request_iterator, - metadata=((b'test', b'FailedStreamRequestBlockingUnaryResponse'),)) + metadata=(('test', 'FailedStreamRequestBlockingUnaryResponse'),)) self.assertIs(grpc.StatusCode.UNKNOWN, exception_context.exception.code()) @@ -699,7 +699,7 @@ class RPCTest(unittest.TestCase): with self._control.fail(): response_future = multi_callable.future( request_iterator, - metadata=((b'test', b'FailedStreamRequestFutureUnaryResponse'),)) + metadata=(('test', 'FailedStreamRequestFutureUnaryResponse'),)) response_future.add_done_callback(callback) value_passed_to_callback = callback.value() @@ -720,7 +720,7 @@ class RPCTest(unittest.TestCase): with self.assertRaises(grpc.RpcError) as exception_context: response_iterator = multi_callable( request_iterator, - metadata=((b'test', b'FailedStreamRequestStreamResponse'),)) + metadata=(('test', 'FailedStreamRequestStreamResponse'),)) tuple(response_iterator) self.assertIs(grpc.StatusCode.UNKNOWN, exception_context.exception.code()) @@ -732,7 +732,7 @@ class RPCTest(unittest.TestCase): multi_callable = _unary_unary_multi_callable(self._channel) multi_callable.future( request, - metadata=((b'test', b'IgnoredUnaryRequestFutureUnaryResponse'),)) + metadata=(('test', 'IgnoredUnaryRequestFutureUnaryResponse'),)) def testIgnoredUnaryRequestStreamResponse(self): request = b'\x37\x17' @@ -740,7 +740,7 @@ class RPCTest(unittest.TestCase): multi_callable = _unary_stream_multi_callable(self._channel) multi_callable( request, - metadata=((b'test', b'IgnoredUnaryRequestStreamResponse'),)) + metadata=(('test', 'IgnoredUnaryRequestStreamResponse'),)) def testIgnoredStreamRequestFutureUnaryResponse(self): requests = tuple(b'\x07\x18' for _ in range(test_constants.STREAM_LENGTH)) @@ -749,7 +749,7 @@ class RPCTest(unittest.TestCase): multi_callable = _stream_unary_multi_callable(self._channel) multi_callable.future( request_iterator, - metadata=((b'test', b'IgnoredStreamRequestFutureUnaryResponse'),)) + metadata=(('test', 'IgnoredStreamRequestFutureUnaryResponse'),)) def testIgnoredStreamRequestStreamResponse(self): requests = tuple(b'\x67\x88' for _ in range(test_constants.STREAM_LENGTH)) @@ -758,7 +758,7 @@ class RPCTest(unittest.TestCase): multi_callable = _stream_stream_multi_callable(self._channel) multi_callable( request_iterator, - metadata=((b'test', b'IgnoredStreamRequestStreamResponse'),)) + metadata=(('test', 'IgnoredStreamRequestStreamResponse'),)) if __name__ == '__main__': diff --git a/src/python/grpcio/tests/unit/beta/_utilities_test.py b/src/python/grpcio/tests/unit/beta/_utilities_test.py index 08ce98e7516..90fe10c77ce 100644 --- a/src/python/grpcio/tests/unit/beta/_utilities_test.py +++ b/src/python/grpcio/tests/unit/beta/_utilities_test.py @@ -33,21 +33,12 @@ import threading import time import unittest -from grpc._adapter import _low -from grpc._adapter import _types from grpc.beta import implementations from grpc.beta import utilities from grpc.framework.foundation import future from tests.unit.framework.common import test_constants -def _drive_completion_queue(completion_queue): - while True: - event = completion_queue.next(time.time() + 24 * 60 * 60) - if event.type == _types.EventType.QUEUE_SHUTDOWN: - break - - class _Callback(object): def __init__(self): @@ -87,13 +78,9 @@ class ChannelConnectivityTest(unittest.TestCase): self.assertFalse(ready_future.running()) def test_immediately_connectable_channel_connectivity(self): - server_completion_queue = _low.CompletionQueue() - server = _low.Server(server_completion_queue, []) - port = server.add_http2_port('[::]:0') + server = implementations.server({}) + port = server.add_insecure_port('[::]:0') server.start() - server_completion_queue_thread = threading.Thread( - target=_drive_completion_queue, args=(server_completion_queue,)) - server_completion_queue_thread.start() channel = implementations.insecure_channel('localhost', port) callback = _Callback() @@ -114,9 +101,7 @@ class ChannelConnectivityTest(unittest.TestCase): self.assertFalse(ready_future.running()) finally: ready_future.cancel() - server.shutdown() - server_completion_queue.shutdown() - server_completion_queue_thread.join() + server.stop(0) if __name__ == '__main__': diff --git a/src/python/grpcio/tests/unit/beta/test_utilities.py b/src/python/grpcio/tests/unit/beta/test_utilities.py index 8ccad04e056..692da9c97d7 100644 --- a/src/python/grpcio/tests/unit/beta/test_utilities.py +++ b/src/python/grpcio/tests/unit/beta/test_utilities.py @@ -51,5 +51,5 @@ def not_really_secure_channel( target = '%s:%d' % (host, port) channel = grpc.secure_channel( target, channel_credentials, - ((b'grpc.ssl_target_name_override', server_host_override,),)) + (('grpc.ssl_target_name_override', server_host_override,),)) return implementations.Channel(channel) diff --git a/src/python/grpcio/tests/unit/test_common.py b/src/python/grpcio/tests/unit/test_common.py index b779f65e7e9..c8886bf4ca5 100644 --- a/src/python/grpcio/tests/unit/test_common.py +++ b/src/python/grpcio/tests/unit/test_common.py @@ -33,10 +33,10 @@ import collections import six -INVOCATION_INITIAL_METADATA = ((b'0', b'abc'), (b'1', b'def'), (b'2', b'ghi'),) -SERVICE_INITIAL_METADATA = ((b'3', b'jkl'), (b'4', b'mno'), (b'5', b'pqr'),) -SERVICE_TERMINAL_METADATA = ((b'6', b'stu'), (b'7', b'vwx'), (b'8', b'yza'),) -DETAILS = b'test details' +INVOCATION_INITIAL_METADATA = (('0', 'abc'), ('1', 'def'), ('2', 'ghi'),) +SERVICE_INITIAL_METADATA = (('3', 'jkl'), ('4', 'mno'), ('5', 'pqr'),) +SERVICE_TERMINAL_METADATA = (('6', 'stu'), ('7', 'vwx'), ('8', 'yza'),) +DETAILS = 'test details' def metadata_transmitted(original_metadata, transmitted_metadata): @@ -59,16 +59,10 @@ def metadata_transmitted(original_metadata, transmitted_metadata): original_metadata after having been transmitted via gRPC. """ original = collections.defaultdict(list) - for key_value_pair in original_metadata: - key, value = tuple(key_value_pair) - if not isinstance(key, bytes): - key = key.encode() - if not isinstance(value, bytes): - value = value.encode() + for key, value in original_metadata: original[key].append(value) transmitted = collections.defaultdict(list) - for key_value_pair in transmitted_metadata: - key, value = tuple(key_value_pair) + for key, value in transmitted_metadata: transmitted[key].append(value) for key, values in six.iteritems(original): From a45e24eb3e3a8f437303ad982abdd0c0a7327905 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 29 Jun 2016 17:55:01 -0700 Subject: [PATCH 1412/1894] Removed invalid sentence --- doc/interop-test-descriptions.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/interop-test-descriptions.md b/doc/interop-test-descriptions.md index a4f9abecfae..b23ceac8e1b 100644 --- a/doc/interop-test-descriptions.md +++ b/doc/interop-test-descriptions.md @@ -30,8 +30,7 @@ Clients should accept these arguments: [ca.pem](https://github.com/grpc/grpc/blob/master/src/core/lib/tsi/test_creds/ca.pem) as the CA root * --default_service_account=ACCOUNT_EMAIL - * Email of the GCE default service account. Only applicable - for compute_engine_creds test. + * Email of the GCE default service account. * --oauth_scope=SCOPE * OAuth scope. For example, "https://www.googleapis.com/auth/xapi.zoo" * --service_account_key_file=PATH From 0287be8e609c0dd3974025509a590720ab947c6b Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Wed, 29 Jun 2016 17:55:14 -0700 Subject: [PATCH 1413/1894] Use protoc and objc plugins built by run_test --- src/objective-c/tests/build_example_test.sh | 43 ++++++++++++++------- 1 file changed, 28 insertions(+), 15 deletions(-) diff --git a/src/objective-c/tests/build_example_test.sh b/src/objective-c/tests/build_example_test.sh index 73405695e8e..93af0a1cfc2 100755 --- a/src/objective-c/tests/build_example_test.sh +++ b/src/objective-c/tests/build_example_test.sh @@ -35,22 +35,35 @@ set -eo pipefail cd `dirname $0` -EXAMPLE_PATH=examples/objective-c/helloworld \ -SCHEME=HelloWorld \ -./build_one_example.sh +BINDIR=`pwd`/../../../bins/$CONFIG +TMP_PATH=$PATH +hash protoc 2>/dev/null || TMP_PATH=$BINDIR/protobuf:$TMP_PATH +PATH=$TMP_PATH hash protoc-gen-objcgrpc 2>/dev/null || { + ln -sf $BINDIR/grpc_objective_c_plugin $BINDIR/protoc-gen-objcgrpc + TMP_PATH=$BINDIR:$TMP_PATH +} -EXAMPLE_PATH=examples/objective-c/route_guide \ -SCHEME=RouteGuideClient \ -./build_one_example.sh +SCHEME=HelloWorld \ + EXAMPLE_PATH=examples/objective-c/helloworld \ + PATH=$TMP_PATH \ + ./build_one_example.sh -EXAMPLE_PATH=examples/objective-c/auth_sample \ -SCHEME=AuthSample \ -./build_one_example.sh +SCHEME=RouteGuideClient \ + EXAMPLE_PATH=examples/objective-c/route_guide \ + PATH=$TMP_PATH \ + ./build_one_example.sh -EXAMPLE_PATH=src/objective-c/examples/Sample \ -SCHEME=Sample \ -./build_one_example.sh +SCHEME=AuthSample \ + EXAMPLE_PATH=examples/objective-c/auth_sample \ + PATH=$TMP_PATH \ + ./build_one_example.sh -EXAMPLE_PATH=src/objective-c/examples/SwiftSample \ -SCHEME=SwiftSample \ -./build_one_example.sh +SCHEME=Sample \ + EXAMPLE_PATH=src/objective-c/examples/Sample \ + PATH=$TMP_PATH \ + ./build_one_example.sh + +SCHEME=SwiftSample \ + EXAMPLE_PATH=src/objective-c/examples/SwiftSample \ + PATH=$TMP_PATH \ + ./build_one_example.sh From 1e1a816c3f72b83e5ba304f32db57557a61e0f2f Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 29 Jun 2016 20:12:40 -0700 Subject: [PATCH 1414/1894] fixed size_t format string --- test/core/network_benchmarks/low_level_ping_pong.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/network_benchmarks/low_level_ping_pong.c b/test/core/network_benchmarks/low_level_ping_pong.c index 1b40895a719..9038d076755 100644 --- a/test/core/network_benchmarks/low_level_ping_pong.c +++ b/test/core/network_benchmarks/low_level_ping_pong.c @@ -583,7 +583,7 @@ static int run_benchmark(char *socket_type, thread_args *client_args, return rv; } - gpr_log(GPR_INFO, "Starting test %s %s %d", client_args->strategy_name, + gpr_log(GPR_INFO, "Starting test %s %s %zu", client_args->strategy_name, socket_type, client_args->msg_size); gpr_thd_new(&tid, server_thread_wrap, server_args, NULL); From 314d3350d928179cfd810b72e95c87ee86cebb5c Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 30 Jun 2016 09:51:02 -0700 Subject: [PATCH 1415/1894] removed unused version of status_code_enum.h --- .../impl/codegen/impl/status_code_enum.h | 152 ------------------ 1 file changed, 152 deletions(-) delete mode 100644 include/grpc++/impl/codegen/impl/status_code_enum.h diff --git a/include/grpc++/impl/codegen/impl/status_code_enum.h b/include/grpc++/impl/codegen/impl/status_code_enum.h deleted file mode 100644 index f8caec0c119..00000000000 --- a/include/grpc++/impl/codegen/impl/status_code_enum.h +++ /dev/null @@ -1,152 +0,0 @@ -/* - * - * Copyright 2016, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#ifndef GRPCXX_IMPL_CODEGEN_IMPL_STATUS_CODE_ENUM_H -#define GRPCXX_IMPL_CODEGEN_IMPL_STATUS_CODE_ENUM_H - -namespace grpc { - -enum StatusCode { - /// Not an error; returned on success. - OK = 0, - - /// The operation was cancelled (typically by the caller). - CANCELLED = 1, - - /// Unknown error. An example of where this error may be returned is if a - /// Status value received from another address space belongs to an error-space - /// that is not known in this address space. Also errors raised by APIs that - /// do not return enough error information may be converted to this error. - UNKNOWN = 2, - - /// Client specified an invalid argument. Note that this differs from - /// FAILED_PRECONDITION. INVALID_ARGUMENT indicates arguments that are - /// problematic regardless of the state of the system (e.g., a malformed file - /// name). - INVALID_ARGUMENT = 3, - - /// Deadline expired before operation could complete. For operations that - /// change the state of the system, this error may be returned even if the - /// operation has completed successfully. For example, a successful response - /// from a server could have been delayed long enough for the deadline to - /// expire. - DEADLINE_EXCEEDED = 4, - - /// Some requested entity (e.g., file or directory) was not found. - NOT_FOUND = 5, - - /// Some entity that we attempted to create (e.g., file or directory) already - /// exists. - ALREADY_EXISTS = 6, - - /// The caller does not have permission to execute the specified operation. - /// PERMISSION_DENIED must not be used for rejections caused by exhausting - /// some resource (use RESOURCE_EXHAUSTED instead for those errors). - /// PERMISSION_DENIED must not be used if the caller can not be identified - /// (use UNAUTHENTICATED instead for those errors). - PERMISSION_DENIED = 7, - - /// The request does not have valid authentication credentials for the - /// operation. - UNAUTHENTICATED = 16, - - /// Some resource has been exhausted, perhaps a per-user quota, or perhaps the - /// entire file system is out of space. - RESOURCE_EXHAUSTED = 8, - - /// Operation was rejected because the system is not in a state required for - /// the operation's execution. For example, directory to be deleted may be - /// non-empty, an rmdir operation is applied to a non-directory, etc. - /// - /// A litmus test that may help a service implementor in deciding - /// between FAILED_PRECONDITION, ABORTED, and UNAVAILABLE: - /// (a) Use UNAVAILABLE if the client can retry just the failing call. - /// (b) Use ABORTED if the client should retry at a higher-level - /// (e.g., restarting a read-modify-write sequence). - /// (c) Use FAILED_PRECONDITION if the client should not retry until - /// the system state has been explicitly fixed. E.g., if an "rmdir" - /// fails because the directory is non-empty, FAILED_PRECONDITION - /// should be returned since the client should not retry unless - /// they have first fixed up the directory by deleting files from it. - /// (d) Use FAILED_PRECONDITION if the client performs conditional - /// REST Get/Update/Delete on a resource and the resource on the - /// server does not match the condition. E.g., conflicting - /// read-modify-write on the same resource. - FAILED_PRECONDITION = 9, - - /// The operation was aborted, typically due to a concurrency issue like - /// sequencer check failures, transaction aborts, etc. - /// - /// See litmus test above for deciding between FAILED_PRECONDITION, ABORTED, - /// and UNAVAILABLE. - ABORTED = 10, - - /// Operation was attempted past the valid range. E.g., seeking or reading - /// past end of file. - /// - /// Unlike INVALID_ARGUMENT, this error indicates a problem that may be fixed - /// if the system state changes. For example, a 32-bit file system will - /// generate INVALID_ARGUMENT if asked to read at an offset that is not in the - /// range [0,2^32-1], but it will generate OUT_OF_RANGE if asked to read from - /// an offset past the current file size. - /// - /// There is a fair bit of overlap between FAILED_PRECONDITION and - /// OUT_OF_RANGE. We recommend using OUT_OF_RANGE (the more specific error) - /// when it applies so that callers who are iterating through a space can - /// easily look for an OUT_OF_RANGE error to detect when they are done. - OUT_OF_RANGE = 11, - - /// Operation is not implemented or not supported/enabled in this service. - UNIMPLEMENTED = 12, - - /// Internal errors. Means some invariants expected by underlying System has - /// been broken. If you see one of these errors, Something is very broken. - INTERNAL = 13, - - /// The service is currently unavailable. This is a most likely a transient - /// condition and may be corrected by retrying with a backoff. - /// - /// See litmus test above for deciding between FAILED_PRECONDITION, ABORTED, - /// and UNAVAILABLE. - UNAVAILABLE = 14, - - /// Unrecoverable data loss or corruption. - DATA_LOSS = 15, - - /// Force users to include a default branch: - DO_NOT_USE = -1 -}; - -} // namespace grpc - -#endif // GRPCXX_IMPL_CODEGEN_IMPL_STATUS_CODE_ENUM_H From 1ff168ac810011a43e446bbbc8ee908ee0098269 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 30 Jun 2016 10:25:04 -0700 Subject: [PATCH 1416/1894] Initialize variables --- src/core/lib/surface/call.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index 708ea3502af..e5668be47fe 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -1206,7 +1206,7 @@ static void validate_filtered_metadata(grpc_exec_ctx *exec_ctx, } else if (grpc_compression_options_is_algorithm_enabled( &compression_options, algo) == 0) { /* check if algorithm is supported by current channel config */ - char *algo_name; + char *algo_name = NULL; grpc_compression_algorithm_name(algo, &algo_name); gpr_asprintf(&error_msg, "Compression algorithm '%s' is disabled.", algo_name); @@ -1225,7 +1225,7 @@ static void validate_filtered_metadata(grpc_exec_ctx *exec_ctx, call->incoming_compression_algorithm)) { extern int grpc_compression_trace; if (grpc_compression_trace) { - char *algo_name; + char *algo_name = NULL; grpc_compression_algorithm_name(call->incoming_compression_algorithm, &algo_name); gpr_log(GPR_ERROR, @@ -1426,7 +1426,7 @@ static grpc_call_error call_start_batch(grpc_exec_ctx *exec_ctx, const grpc_compression_algorithm calgo = compression_algorithm_for_level_locked( call, effective_compression_level); - char *calgo_name; + char *calgo_name = NULL; grpc_compression_algorithm_name(calgo, &calgo_name); // the following will be picked up by the compress filter and used as // the call's compression algorithm. From f329395514182ef61f01552daabba471ae28085e Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 30 Jun 2016 10:44:30 -0700 Subject: [PATCH 1417/1894] Add comments in build_example_test.sh --- src/objective-c/tests/build_example_test.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/objective-c/tests/build_example_test.sh b/src/objective-c/tests/build_example_test.sh index 93af0a1cfc2..5c3766b4c0b 100755 --- a/src/objective-c/tests/build_example_test.sh +++ b/src/objective-c/tests/build_example_test.sh @@ -37,7 +37,12 @@ cd `dirname $0` BINDIR=`pwd`/../../../bins/$CONFIG TMP_PATH=$PATH + +# If `protoc` is not found, add bins/$CONFIG/protobuf/protoc to the search path hash protoc 2>/dev/null || TMP_PATH=$BINDIR/protobuf:$TMP_PATH + +# If `protoc-gen-objcgrpc` is not found, make a symlink from +# bins/$CONGIF/grpc_objective_c_plugin and add it to the search path PATH=$TMP_PATH hash protoc-gen-objcgrpc 2>/dev/null || { ln -sf $BINDIR/grpc_objective_c_plugin $BINDIR/protoc-gen-objcgrpc TMP_PATH=$BINDIR:$TMP_PATH From 97d1cd87670f6eb082d2243bc7cfd4a21d33a78f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 30 Jun 2016 11:31:23 -0700 Subject: [PATCH 1418/1894] Fix memory leak, fix error.c refcount reporting --- src/core/lib/iomgr/error.c | 8 ++++---- src/core/lib/transport/transport.c | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/lib/iomgr/error.c b/src/core/lib/iomgr/error.c index e20a0169c50..149c55663c0 100644 --- a/src/core/lib/iomgr/error.c +++ b/src/core/lib/iomgr/error.c @@ -174,8 +174,8 @@ static bool is_special(grpc_error *err) { grpc_error *grpc_error_ref(grpc_error *err, const char *file, int line, const char *func) { if (is_special(err)) return err; - gpr_log(GPR_DEBUG, "%p: %d -> %d [%s:%d %s]", err, err->refs.count, - err->refs.count + 1, file, line, func); + gpr_log(GPR_DEBUG, "%p: %" PRIdPTR " -> %" PRIdPTR " [%s:%d %s]", err, + err->refs.count, err->refs.count + 1, file, line, func); gpr_ref(&err->refs); return err; } @@ -200,8 +200,8 @@ static void error_destroy(grpc_error *err) { void grpc_error_unref(grpc_error *err, const char *file, int line, const char *func) { if (is_special(err)) return; - gpr_log(GPR_DEBUG, "%p: %d -> %d [%s:%d %s]", err, err->refs.count, - err->refs.count - 1, file, line, func); + gpr_log(GPR_DEBUG, "%p: %" PRIdPTR " -> %" PRIdPTR " [%s:%d %s]", err, + err->refs.count, err->refs.count - 1, file, line, func); if (gpr_unref(&err->refs)) { error_destroy(err); } diff --git a/src/core/lib/transport/transport.c b/src/core/lib/transport/transport.c index 79a20e12626..f8ddf5774a1 100644 --- a/src/core/lib/transport/transport.c +++ b/src/core/lib/transport/transport.c @@ -173,7 +173,7 @@ static void free_message(grpc_exec_ctx *exec_ctx, void *p, grpc_error *error) { close_message_data *cmd = p; GRPC_ERROR_UNREF(cmd->error); if (cmd->then_call != NULL) { - cmd->then_call->cb(exec_ctx, cmd->then_call->cb_arg, GRPC_ERROR_REF(error)); + cmd->then_call->cb(exec_ctx, cmd->then_call->cb_arg, error); } gpr_free(cmd); } From 2cb69ad2039345e71b7b2d9eb2530bc806568df0 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Thu, 30 Jun 2016 11:47:14 -0700 Subject: [PATCH 1419/1894] php: update package.xml --- package.xml | 26 ++++++++++++++++++++++---- templates/package.xml.template | 26 ++++++++++++++++++++++---- 2 files changed, 44 insertions(+), 8 deletions(-) diff --git a/package.xml b/package.xml index ebe4af90e43..49a6d900f12 100644 --- a/package.xml +++ b/package.xml @@ -10,7 +10,7 @@ grpc-packages@google.com yes - 2016-05-19 + 2016-06-30 0.16.0 @@ -22,7 +22,7 @@ BSD -- TBD +- Fix shutdown hang problem #4017 @@ -1034,6 +1034,7 @@ Update to wrap gRPC C Core version 0.10.0 BSD - Simplify gRPC PHP installation #4517 +- Wrap gRPC core library version 0.13 @@ -1063,13 +1064,14 @@ Update to wrap gRPC C Core version 0.10.0 2016-04-19 BSD +- wrap grpc C core version 0.14.0 - destroy grpc_byte_buffer after startBatch #6096 - 0.14.2 - 0.14.2 + 0.15.0 + 0.15.0 beta @@ -1079,6 +1081,22 @@ Update to wrap gRPC C Core version 0.10.0 BSD - Updated functions with TSRM macros for ZTS support #6607 +- Load default roots.pem via grpc_set_ssl_roots_override_callback #6848 + + + + + 0.15.1 + 0.15.1 + + + beta + beta + + 2016-06-30 + BSD + +- Fix shutdown hang problem #4017 diff --git a/templates/package.xml.template b/templates/package.xml.template index a620a2d6a50..d8155cdd823 100644 --- a/templates/package.xml.template +++ b/templates/package.xml.template @@ -12,7 +12,7 @@ grpc-packages@google.com yes - 2016-05-19 + 2016-06-30 ${settings.php_version.php()} @@ -24,7 +24,7 @@ BSD - - TBD + - Fix shutdown hang problem #4017 @@ -153,6 +153,7 @@ BSD - Simplify gRPC PHP installation #4517 + - Wrap gRPC core library version 0.13 @@ -182,13 +183,14 @@ 2016-04-19 BSD + - wrap grpc C core version 0.14.0 - destroy grpc_byte_buffer after startBatch #6096 - 0.14.2 - 0.14.2 + 0.15.0 + 0.15.0 beta @@ -198,6 +200,22 @@ BSD - Updated functions with TSRM macros for ZTS support #6607 + - Load default roots.pem via grpc_set_ssl_roots_override_callback #6848 + + + + + 0.15.1 + 0.15.1 + + + beta + beta + + 2016-06-30 + BSD + + - Fix shutdown hang problem #4017 From 6f7f00b5736196d067ac91cab87fa1d043264e68 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Thu, 30 Jun 2016 11:49:30 -0700 Subject: [PATCH 1420/1894] php: update package.xml --- package.xml | 26 ++++++++++++++++++++++---- templates/package.xml.template | 26 ++++++++++++++++++++++---- 2 files changed, 44 insertions(+), 8 deletions(-) diff --git a/package.xml b/package.xml index 67e9bb2c282..1304eb06fa3 100644 --- a/package.xml +++ b/package.xml @@ -10,7 +10,7 @@ grpc-packages@google.com yes - 2016-05-19 + 2016-06-30 0.15.0 @@ -22,7 +22,7 @@ BSD -- TBD +- Fix shutdown hang problem #4017 @@ -1031,6 +1031,7 @@ Update to wrap gRPC C Core version 0.10.0 BSD - Simplify gRPC PHP installation #4517 +- Wrap gRPC core library version 0.13 @@ -1060,13 +1061,14 @@ Update to wrap gRPC C Core version 0.10.0 2016-04-19 BSD +- wrap grpc C core version 0.14.0 - destroy grpc_byte_buffer after startBatch #6096 - 0.14.2 - 0.14.2 + 0.15.0 + 0.15.0 beta @@ -1076,6 +1078,22 @@ Update to wrap gRPC C Core version 0.10.0 BSD - Updated functions with TSRM macros for ZTS support #6607 +- Load default roots.pem via grpc_set_ssl_roots_override_callback #6848 + + + + + 0.15.1 + 0.15.1 + + + beta + beta + + 2016-06-30 + BSD + +- Fix shutdown hang problem #4017 diff --git a/templates/package.xml.template b/templates/package.xml.template index a620a2d6a50..d8155cdd823 100644 --- a/templates/package.xml.template +++ b/templates/package.xml.template @@ -12,7 +12,7 @@ grpc-packages@google.com yes - 2016-05-19 + 2016-06-30 ${settings.php_version.php()} @@ -24,7 +24,7 @@ BSD - - TBD + - Fix shutdown hang problem #4017 @@ -153,6 +153,7 @@ BSD - Simplify gRPC PHP installation #4517 + - Wrap gRPC core library version 0.13 @@ -182,13 +183,14 @@ 2016-04-19 BSD + - wrap grpc C core version 0.14.0 - destroy grpc_byte_buffer after startBatch #6096 - 0.14.2 - 0.14.2 + 0.15.0 + 0.15.0 beta @@ -198,6 +200,22 @@ BSD - Updated functions with TSRM macros for ZTS support #6607 + - Load default roots.pem via grpc_set_ssl_roots_override_callback #6848 + + + + + 0.15.1 + 0.15.1 + + + beta + beta + + 2016-06-30 + BSD + + - Fix shutdown hang problem #4017 From 5c88bc660cb1d5b3569ed85ec9eed30d10257470 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Thu, 30 Jun 2016 11:54:50 -0700 Subject: [PATCH 1421/1894] Updated example codegen to use grpcio-tools --- examples/python/helloworld/run_codegen.sh | 2 +- examples/python/route_guide/run_codegen.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/python/helloworld/run_codegen.sh b/examples/python/helloworld/run_codegen.sh index 42b58e50217..34224e5c418 100755 --- a/examples/python/helloworld/run_codegen.sh +++ b/examples/python/helloworld/run_codegen.sh @@ -29,4 +29,4 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # Runs the protoc with gRPC plugin to generate protocol messages and gRPC stubs. -protoc -I ../../protos --python_out=. --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_python_plugin` ../../protos/helloworld.proto +python -m grpc.tools.protoc -I../../protos --python_out=. --grpc_python_out=. ../../protos/helloworld.proto diff --git a/examples/python/route_guide/run_codegen.sh b/examples/python/route_guide/run_codegen.sh index d9d56c2d7ab..a377a1ab409 100755 --- a/examples/python/route_guide/run_codegen.sh +++ b/examples/python/route_guide/run_codegen.sh @@ -29,4 +29,4 @@ # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # Runs the protoc with gRPC plugin to generate protocol messages and gRPC stubs. -protoc -I ../../protos --python_out=. --grpc_out=. --plugin=protoc-gen-grpc=`which grpc_python_plugin` ../../protos/route_guide.proto +python -m grpc.tools.protoc -I../../protos --python_out=. --grpc_python_out=. ../../protos/route_guide.proto From 9acc40f9b6753a0d43434b30393c4996c8002b28 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 30 Jun 2016 13:54:09 -0700 Subject: [PATCH 1422/1894] Simplified Ruby completion queue destruction code --- src/ruby/ext/grpc/rb_channel.c | 1 + src/ruby/ext/grpc/rb_completion_queue.c | 57 +---------------------- src/ruby/ext/grpc/rb_server.c | 1 + src/ruby/ext/grpc/rb_server_credentials.c | 1 + 4 files changed, 5 insertions(+), 55 deletions(-) diff --git a/src/ruby/ext/grpc/rb_channel.c b/src/ruby/ext/grpc/rb_channel.c index 346b0d12381..18a15d01252 100644 --- a/src/ruby/ext/grpc/rb_channel.c +++ b/src/ruby/ext/grpc/rb_channel.c @@ -39,6 +39,7 @@ #include #include #include +#include #include "rb_grpc.h" #include "rb_call.h" #include "rb_channel_args.h" diff --git a/src/ruby/ext/grpc/rb_completion_queue.c b/src/ruby/ext/grpc/rb_completion_queue.c index 1a69a175c4c..87ff9083ff8 100644 --- a/src/ruby/ext/grpc/rb_completion_queue.c +++ b/src/ruby/ext/grpc/rb_completion_queue.c @@ -40,6 +40,7 @@ #include #include +#include #include "rb_grpc.h" /* Used to allow grpc_completion_queue_next call to release the GIL */ @@ -51,23 +52,6 @@ typedef struct next_call_stack { volatile int interrupted; } next_call_stack; -/* Calls grpc_completion_queue_next without holding the ruby GIL */ -static void *grpc_rb_completion_queue_next_no_gil(void *param) { - next_call_stack *const next_call = (next_call_stack*)param; - gpr_timespec increment = gpr_time_from_millis(20, GPR_TIMESPAN); - gpr_timespec deadline; - do { - deadline = gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), increment); - next_call->event = grpc_completion_queue_next(next_call->cq, - deadline, NULL); - if (next_call->event.type != GRPC_QUEUE_TIMEOUT || - gpr_time_cmp(deadline, next_call->timeout) > 0) { - break; - } - } while (!next_call->interrupted); - return NULL; -} - /* Calls grpc_completion_queue_pluck without holding the ruby GIL */ static void *grpc_rb_completion_queue_pluck_no_gil(void *param) { next_call_stack *const next_call = (next_call_stack*)param; @@ -86,46 +70,9 @@ static void *grpc_rb_completion_queue_pluck_no_gil(void *param) { return NULL; } -/* Shuts down and drains the completion queue if necessary. - * - * This is done when the ruby completion queue object is about to be GCed. - */ -static void grpc_rb_completion_queue_shutdown_drain(grpc_completion_queue *cq) { - next_call_stack next_call; - grpc_completion_type type; - int drained = 0; - MEMZERO(&next_call, next_call_stack, 1); - - grpc_completion_queue_shutdown(cq); - next_call.cq = cq; - next_call.event.type = GRPC_QUEUE_TIMEOUT; - /* TODO: the timeout should be a module level constant that defaults - * to gpr_inf_future(GPR_CLOCK_REALTIME). - * - * - at the moment this does not work, it stalls. Using a small timeout like - * this one works, and leads to fast test run times; a longer timeout was - * causing unnecessary delays in the test runs. - * - * - investigate further, this is probably another example of C-level cleanup - * not working consistently in all cases. - */ - next_call.timeout = gpr_time_add(gpr_now(GPR_CLOCK_REALTIME), - gpr_time_from_micros(5e3, GPR_TIMESPAN)); - do { - rb_thread_call_without_gvl(grpc_rb_completion_queue_next_no_gil, - (void *)&next_call, NULL, NULL); - type = next_call.event.type; - if (type == GRPC_QUEUE_TIMEOUT) break; - if (type != GRPC_QUEUE_SHUTDOWN) { - ++drained; - rb_warning("completion queue shutdown: %d undrained events", drained); - } - } while (type != GRPC_QUEUE_SHUTDOWN); -} - /* Helper function to free a completion queue. */ void grpc_rb_completion_queue_destroy(grpc_completion_queue *cq) { - grpc_rb_completion_queue_shutdown_drain(cq); + grpc_completion_queue_shutdown(cq); grpc_completion_queue_destroy(cq); } diff --git a/src/ruby/ext/grpc/rb_server.c b/src/ruby/ext/grpc/rb_server.c index a7d53350920..bf26841fd22 100644 --- a/src/ruby/ext/grpc/rb_server.c +++ b/src/ruby/ext/grpc/rb_server.c @@ -38,6 +38,7 @@ #include #include +#include #include "rb_call.h" #include "rb_channel_args.h" #include "rb_completion_queue.h" diff --git a/src/ruby/ext/grpc/rb_server_credentials.c b/src/ruby/ext/grpc/rb_server_credentials.c index cb7545b3645..a44ce715ae8 100644 --- a/src/ruby/ext/grpc/rb_server_credentials.c +++ b/src/ruby/ext/grpc/rb_server_credentials.c @@ -38,6 +38,7 @@ #include #include +#include #include "rb_grpc.h" From 5756c6862bc4e65102ff5409d46e85fbdb09ccea Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 30 Jun 2016 13:58:18 -0700 Subject: [PATCH 1423/1894] Added a comment about Ruby queue destruction --- src/ruby/ext/grpc/rb_completion_queue.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ruby/ext/grpc/rb_completion_queue.c b/src/ruby/ext/grpc/rb_completion_queue.c index 87ff9083ff8..fd75d2f691f 100644 --- a/src/ruby/ext/grpc/rb_completion_queue.c +++ b/src/ruby/ext/grpc/rb_completion_queue.c @@ -72,6 +72,10 @@ static void *grpc_rb_completion_queue_pluck_no_gil(void *param) { /* Helper function to free a completion queue. */ void grpc_rb_completion_queue_destroy(grpc_completion_queue *cq) { + /* Every function that adds an event to a queue also synchronously plucks + that event from the queue, and holds a reference to the Ruby object that + holds the queue, so we only get to this point if all of those functions + have completed, and the queue is empty */ grpc_completion_queue_shutdown(cq); grpc_completion_queue_destroy(cq); } From 70bd4839bc93feab530494d7a75c821b540be906 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 30 Jun 2016 14:20:46 -0700 Subject: [PATCH 1424/1894] Allow returning a workqueue somehow associated with an endpoint --- src/core/lib/iomgr/endpoint.c | 4 ++++ src/core/lib/iomgr/endpoint.h | 4 ++++ src/core/lib/iomgr/ev_epoll_linux.c | 3 +++ src/core/lib/iomgr/ev_poll_and_epoll_posix.c | 3 +++ src/core/lib/iomgr/ev_poll_posix.c | 3 +++ src/core/lib/iomgr/ev_posix.c | 4 ++++ src/core/lib/iomgr/ev_posix.h | 4 ++++ src/core/lib/iomgr/tcp_posix.c | 16 +++++++++++++--- src/core/lib/iomgr/workqueue.h | 4 ++-- .../lib/security/transport/secure_endpoint.c | 18 +++++++++++++----- test/core/internal_api_canaries/iomgr.c | 13 ++++++++----- test/core/util/mock_endpoint.c | 12 ++++++++++-- test/core/util/passthru_endpoint.c | 12 ++++++++++-- 13 files changed, 81 insertions(+), 19 deletions(-) diff --git a/src/core/lib/iomgr/endpoint.c b/src/core/lib/iomgr/endpoint.c index 1ab3733d381..f901fcf9622 100644 --- a/src/core/lib/iomgr/endpoint.c +++ b/src/core/lib/iomgr/endpoint.c @@ -65,3 +65,7 @@ void grpc_endpoint_destroy(grpc_exec_ctx* exec_ctx, grpc_endpoint* ep) { char* grpc_endpoint_get_peer(grpc_endpoint* ep) { return ep->vtable->get_peer(ep); } + +grpc_workqueue* grpc_endpoint_get_workqueue(grpc_endpoint* ep) { + return ep->vtable->get_workqueue(ep); +} diff --git a/src/core/lib/iomgr/endpoint.h b/src/core/lib/iomgr/endpoint.h index f9808bbda18..894efc0b238 100644 --- a/src/core/lib/iomgr/endpoint.h +++ b/src/core/lib/iomgr/endpoint.h @@ -51,6 +51,7 @@ struct grpc_endpoint_vtable { gpr_slice_buffer *slices, grpc_closure *cb); void (*write)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, gpr_slice_buffer *slices, grpc_closure *cb); + grpc_workqueue *(*get_workqueue)(grpc_endpoint *ep); void (*add_to_pollset)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, grpc_pollset *pollset); void (*add_to_pollset_set)(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, @@ -69,6 +70,9 @@ void grpc_endpoint_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, char *grpc_endpoint_get_peer(grpc_endpoint *ep); +/* Retrieve a reference to the workqueue associated with this endpoint */ +grpc_workqueue *grpc_endpoint_get_workqueue(grpc_endpoint *ep); + /* Write slices out to the socket. If the connection is ready for more data after the end of the call, it diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index cf0fe736a0b..116de76e6a0 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -1037,6 +1037,8 @@ static void fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, gpr_mu_unlock(&fd->mu); } +static grpc_workqueue *fd_get_workqueue(grpc_fd *fd) { return NULL; } + /******************************************************************************* * Pollset Definitions */ @@ -1794,6 +1796,7 @@ static const grpc_event_engine_vtable vtable = { .fd_notify_on_read = fd_notify_on_read, .fd_notify_on_write = fd_notify_on_write, .fd_get_read_notifier_pollset = fd_get_read_notifier_pollset, + .fd_get_workqueue = fd_get_workqueue, .pollset_init = pollset_init, .pollset_shutdown = pollset_shutdown, diff --git a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c index 9e306af5fac..c2107e5e393 100644 --- a/src/core/lib/iomgr/ev_poll_and_epoll_posix.c +++ b/src/core/lib/iomgr/ev_poll_and_epoll_posix.c @@ -725,6 +725,8 @@ static void fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *watcher, GRPC_FD_UNREF(fd, "poll"); } +static grpc_workqueue *fd_get_workqueue(grpc_fd *fd) { return NULL; } + /******************************************************************************* * pollset_posix.c */ @@ -2006,6 +2008,7 @@ static const grpc_event_engine_vtable vtable = { .fd_notify_on_read = fd_notify_on_read, .fd_notify_on_write = fd_notify_on_write, .fd_get_read_notifier_pollset = fd_get_read_notifier_pollset, + .fd_get_workqueue = fd_get_workqueue, .pollset_init = pollset_init, .pollset_shutdown = pollset_shutdown, diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 45c0a5e9546..4b593f4b2c2 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -617,6 +617,8 @@ static void fd_end_poll(grpc_exec_ctx *exec_ctx, grpc_fd_watcher *watcher, GRPC_FD_UNREF(fd, "poll"); } +static grpc_workqueue *fd_get_workqueue(grpc_fd *fd) { return NULL; } + /******************************************************************************* * pollset_posix.c */ @@ -1234,6 +1236,7 @@ static const grpc_event_engine_vtable vtable = { .fd_notify_on_read = fd_notify_on_read, .fd_notify_on_write = fd_notify_on_write, .fd_get_read_notifier_pollset = fd_get_read_notifier_pollset, + .fd_get_workqueue = fd_get_workqueue, .pollset_init = pollset_init, .pollset_shutdown = pollset_shutdown, diff --git a/src/core/lib/iomgr/ev_posix.c b/src/core/lib/iomgr/ev_posix.c index a3c1e9db9a0..65366726859 100644 --- a/src/core/lib/iomgr/ev_posix.c +++ b/src/core/lib/iomgr/ev_posix.c @@ -148,6 +148,10 @@ grpc_fd *grpc_fd_create(int fd, const char *name) { return g_event_engine->fd_create(fd, name); } +grpc_workqueue *grpc_fd_get_workqueue(grpc_fd *fd) { + return g_event_engine->fd_get_workqueue(fd); +} + int grpc_fd_wrapped_fd(grpc_fd *fd) { return g_event_engine->fd_wrapped_fd(fd); } diff --git a/src/core/lib/iomgr/ev_posix.h b/src/core/lib/iomgr/ev_posix.h index 579c84ef707..c2aa1756ea2 100644 --- a/src/core/lib/iomgr/ev_posix.h +++ b/src/core/lib/iomgr/ev_posix.h @@ -56,6 +56,7 @@ typedef struct grpc_event_engine_vtable { void (*fd_notify_on_write)(grpc_exec_ctx *exec_ctx, grpc_fd *fd, grpc_closure *closure); bool (*fd_is_shutdown)(grpc_fd *fd); + grpc_workqueue *(*fd_get_workqueue)(grpc_fd *fd); grpc_pollset *(*fd_get_read_notifier_pollset)(grpc_exec_ctx *exec_ctx, grpc_fd *fd); @@ -107,6 +108,9 @@ const char *grpc_get_poll_strategy_name(); This takes ownership of closing fd. */ grpc_fd *grpc_fd_create(int fd, const char *name); +/* Get a workqueue that's associated with this fd */ +grpc_workqueue *grpc_fd_get_workqueue(grpc_fd *fd); + /* Return the wrapped fd, or -1 if it has been released or closed. */ int grpc_fd_wrapped_fd(grpc_fd *fd); diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 2ab45e33ce3..b5bac152fb6 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -450,9 +450,19 @@ static char *tcp_get_peer(grpc_endpoint *ep) { return gpr_strdup(tcp->peer_string); } -static const grpc_endpoint_vtable vtable = { - tcp_read, tcp_write, tcp_add_to_pollset, tcp_add_to_pollset_set, - tcp_shutdown, tcp_destroy, tcp_get_peer}; +static grpc_workqueue *tcp_get_workqueue(grpc_endpoint *ep) { + grpc_tcp *tcp = (grpc_tcp *)ep; + return grpc_fd_get_workqueue(tcp->em_fd); +} + +static const grpc_endpoint_vtable vtable = {tcp_read, + tcp_write, + tcp_get_workqueue, + tcp_add_to_pollset, + tcp_add_to_pollset_set, + tcp_shutdown, + tcp_destroy, + tcp_get_peer}; grpc_endpoint *grpc_tcp_create(grpc_fd *em_fd, size_t slice_size, const char *peer_string) { diff --git a/src/core/lib/iomgr/workqueue.h b/src/core/lib/iomgr/workqueue.h index 5cc40eea505..498b7a300a5 100644 --- a/src/core/lib/iomgr/workqueue.h +++ b/src/core/lib/iomgr/workqueue.h @@ -58,7 +58,7 @@ void grpc_workqueue_flush(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue); #define GRPC_WORKQUEUE_REFCOUNT_DEBUG #ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG #define GRPC_WORKQUEUE_REF(p, r) \ - grpc_workqueue_ref((p), __FILE__, __LINE__, (r)) + (grpc_workqueue_ref((p), __FILE__, __LINE__, (r)), (p)) #define GRPC_WORKQUEUE_UNREF(cl, p, r) \ grpc_workqueue_unref((cl), (p), __FILE__, __LINE__, (r)) void grpc_workqueue_ref(grpc_workqueue *workqueue, const char *file, int line, @@ -66,7 +66,7 @@ void grpc_workqueue_ref(grpc_workqueue *workqueue, const char *file, int line, void grpc_workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, const char *file, int line, const char *reason); #else -#define GRPC_WORKQUEUE_REF(p, r) grpc_workqueue_ref((p)) +#define GRPC_WORKQUEUE_REF(p, r) (grpc_workqueue_ref((p)), (p)) #define GRPC_WORKQUEUE_UNREF(cl, p, r) grpc_workqueue_unref((cl), (p)) void grpc_workqueue_ref(grpc_workqueue *workqueue); void grpc_workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue); diff --git a/src/core/lib/security/transport/secure_endpoint.c b/src/core/lib/security/transport/secure_endpoint.c index 7650d68e892..bc50f9d1b00 100644 --- a/src/core/lib/security/transport/secure_endpoint.c +++ b/src/core/lib/security/transport/secure_endpoint.c @@ -360,11 +360,19 @@ static char *endpoint_get_peer(grpc_endpoint *secure_ep) { return grpc_endpoint_get_peer(ep->wrapped_ep); } -static const grpc_endpoint_vtable vtable = { - endpoint_read, endpoint_write, - endpoint_add_to_pollset, endpoint_add_to_pollset_set, - endpoint_shutdown, endpoint_destroy, - endpoint_get_peer}; +static grpc_workqueue *endpoint_get_workqueue(grpc_endpoint *secure_ep) { + secure_endpoint *ep = (secure_endpoint *)secure_ep; + return grpc_endpoint_get_workqueue(ep->wrapped_ep); +} + +static const grpc_endpoint_vtable vtable = {endpoint_read, + endpoint_write, + endpoint_get_workqueue, + endpoint_add_to_pollset, + endpoint_add_to_pollset_set, + endpoint_shutdown, + endpoint_destroy, + endpoint_get_peer}; grpc_endpoint *grpc_secure_endpoint_create( struct tsi_frame_protector *protector, grpc_endpoint *transport, diff --git a/test/core/internal_api_canaries/iomgr.c b/test/core/internal_api_canaries/iomgr.c index 5e86c423095..27d630623ed 100644 --- a/test/core/internal_api_canaries/iomgr.c +++ b/test/core/internal_api_canaries/iomgr.c @@ -77,11 +77,14 @@ static void test_code(void) { /* endpoint.h */ grpc_endpoint endpoint; - grpc_endpoint_vtable vtable = { - grpc_endpoint_read, grpc_endpoint_write, - grpc_endpoint_add_to_pollset, grpc_endpoint_add_to_pollset_set, - grpc_endpoint_shutdown, grpc_endpoint_destroy, - grpc_endpoint_get_peer}; + grpc_endpoint_vtable vtable = {grpc_endpoint_read, + grpc_endpoint_write, + grpc_endpoint_get_workqueue, + grpc_endpoint_add_to_pollset, + grpc_endpoint_add_to_pollset_set, + grpc_endpoint_shutdown, + grpc_endpoint_destroy, + grpc_endpoint_get_peer}; endpoint.vtable = &vtable; grpc_endpoint_read(&exec_ctx, &endpoint, NULL, NULL); diff --git a/test/core/util/mock_endpoint.c b/test/core/util/mock_endpoint.c index ed9545e9df2..13e0e918fbe 100644 --- a/test/core/util/mock_endpoint.c +++ b/test/core/util/mock_endpoint.c @@ -95,9 +95,17 @@ static char *me_get_peer(grpc_endpoint *ep) { return gpr_strdup("fake:mock_endpoint"); } +static grpc_workqueue *me_get_workqueue(grpc_endpoint *ep) { return NULL; } + static const grpc_endpoint_vtable vtable = { - me_read, me_write, me_add_to_pollset, me_add_to_pollset_set, - me_shutdown, me_destroy, me_get_peer, + me_read, + me_write, + me_get_workqueue, + me_add_to_pollset, + me_add_to_pollset_set, + me_shutdown, + me_destroy, + me_get_peer, }; grpc_endpoint *grpc_mock_endpoint_create(void (*on_write)(gpr_slice slice)) { diff --git a/test/core/util/passthru_endpoint.c b/test/core/util/passthru_endpoint.c index a39f3dd66e2..7ed9e97bd6a 100644 --- a/test/core/util/passthru_endpoint.c +++ b/test/core/util/passthru_endpoint.c @@ -140,9 +140,17 @@ static char *me_get_peer(grpc_endpoint *ep) { return gpr_strdup("fake:mock_endpoint"); } +static grpc_workqueue *me_get_workqueue(grpc_endpoint *ep) { return NULL; } + static const grpc_endpoint_vtable vtable = { - me_read, me_write, me_add_to_pollset, me_add_to_pollset_set, - me_shutdown, me_destroy, me_get_peer, + me_read, + me_write, + me_get_workqueue, + me_add_to_pollset, + me_add_to_pollset_set, + me_shutdown, + me_destroy, + me_get_peer, }; static void half_init(half *m, passthru_endpoint *parent) { From efe7a6e3380c9ddaa7d70b516fda281a441a7e7f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 30 Jun 2016 14:34:04 -0700 Subject: [PATCH 1425/1894] Use endpoint workqueue via execution context --- .../transport/chttp2/transport/chttp2_transport.c | 12 ++---------- src/core/ext/transport/chttp2/transport/internal.h | 1 - 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 197cee7e0ce..92722b50f4f 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -204,8 +204,6 @@ static void destruct_transport(grpc_exec_ctx *exec_ctx, gpr_free(ping); } - GRPC_WORKQUEUE_UNREF(exec_ctx, t->executor.workqueue, "transport"); - gpr_free(t->peer_string); gpr_free(t); } @@ -257,9 +255,6 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, /* ref is dropped at transport close() */ gpr_ref_init(&t->shutdown_ep_refs, 1); gpr_mu_init(&t->executor.mu); - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "workqueue_create", - grpc_workqueue_create(exec_ctx, &t->executor.workqueue))); t->peer_string = grpc_endpoint_get_peer(ep); t->endpoint_reading = 1; t->global.next_stream_id = is_client ? 1 : 2; @@ -715,8 +710,8 @@ static void finish_global_actions(grpc_exec_ctx *exec_ctx, set_write_state(t, GRPC_CHTTP2_WRITE_SCHEDULED, "unlocking"); REF_TRANSPORT(t, "initiate_writing"); gpr_mu_unlock(&t->executor.mu); - grpc_workqueue_enqueue(exec_ctx, t->executor.workqueue, - &t->initiate_writing, GRPC_ERROR_NONE); + grpc_exec_ctx_sched(exec_ctx, &t->initiate_writing, GRPC_ERROR_NONE, + grpc_endpoint_get_workqueue(t->ep)); break; case GRPC_CHTTP2_WRITE_REQUESTED_NO_POLLER: start_writing(exec_ctx, t); @@ -2082,7 +2077,6 @@ static void add_to_pollset_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_stream *s_unused, void *pollset) { if (t->ep) { grpc_endpoint_add_to_pollset(exec_ctx, t->ep, pollset); - grpc_workqueue_add_to_pollset(exec_ctx, t->executor.workqueue, pollset); } } @@ -2092,8 +2086,6 @@ static void add_to_pollset_set_locked(grpc_exec_ctx *exec_ctx, void *pollset_set) { if (t->ep) { grpc_endpoint_add_to_pollset_set(exec_ctx, t->ep, pollset_set); - grpc_workqueue_add_to_pollset_set(exec_ctx, t->executor.workqueue, - pollset_set); } } diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 2ef1c9df7a6..4e0c31c1110 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -332,7 +332,6 @@ struct grpc_chttp2_transport { struct { gpr_mu mu; - grpc_workqueue *workqueue; /** is a thread currently in the global lock */ bool global_active; From 5e4fb0eedeb0a92f00ec10942ab65408550138bf Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 30 Jun 2016 14:53:51 -0700 Subject: [PATCH 1426/1894] Windows implementation of get_workqueue --- src/core/lib/iomgr/tcp_windows.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/core/lib/iomgr/tcp_windows.c b/src/core/lib/iomgr/tcp_windows.c index 37ab59021e3..35054c42b55 100644 --- a/src/core/lib/iomgr/tcp_windows.c +++ b/src/core/lib/iomgr/tcp_windows.c @@ -389,9 +389,16 @@ static char *win_get_peer(grpc_endpoint *ep) { return gpr_strdup(tcp->peer_string); } -static grpc_endpoint_vtable vtable = { - win_read, win_write, win_add_to_pollset, win_add_to_pollset_set, - win_shutdown, win_destroy, win_get_peer}; +static grpc_workqueue *win_get_workqueue(grpc_endpoint *ep) { return NULL; } + +static grpc_endpoint_vtable vtable = {win_read, + win_write, + win_get_workqueue, + win_add_to_pollset, + win_add_to_pollset_set, + win_shutdown, + win_destroy, + win_get_peer}; grpc_endpoint *grpc_tcp_create(grpc_winsocket *socket, char *peer_string) { grpc_tcp *tcp = (grpc_tcp *)gpr_malloc(sizeof(grpc_tcp)); From 7be0595600013003fd856c057a039655e7da7fc6 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 30 Jun 2016 15:04:32 -0700 Subject: [PATCH 1427/1894] Implement minimal exec_ctx offloading --- src/core/lib/iomgr/exec_ctx.c | 9 ++++++--- src/core/lib/iomgr/exec_ctx.h | 6 +++++- 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/src/core/lib/iomgr/exec_ctx.c b/src/core/lib/iomgr/exec_ctx.c index c44aafcddf0..059133f8796 100644 --- a/src/core/lib/iomgr/exec_ctx.c +++ b/src/core/lib/iomgr/exec_ctx.c @@ -85,14 +85,17 @@ void grpc_exec_ctx_finish(grpc_exec_ctx *exec_ctx) { void grpc_exec_ctx_sched(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_error *error, grpc_workqueue *offload_target_or_null) { - GPR_ASSERT(offload_target_or_null == NULL); - grpc_closure_list_append(&exec_ctx->closure_list, closure, error); + if (offload_target_or_null == NULL) { + grpc_closure_list_append(&exec_ctx->closure_list, closure, error); + } else { + grpc_workqueue_enqueue(exec_ctx, offload_target_or_null, closure, error); + GRPC_WORKQUEUE_UNREF(exec_ctx, offload_target_or_null, "exec_ctx_sched"); + } } void grpc_exec_ctx_enqueue_list(grpc_exec_ctx *exec_ctx, grpc_closure_list *list, grpc_workqueue *offload_target_or_null) { - GPR_ASSERT(offload_target_or_null == NULL); grpc_closure_list_move(list, &exec_ctx->closure_list); } diff --git a/src/core/lib/iomgr/exec_ctx.h b/src/core/lib/iomgr/exec_ctx.h index 38f27d9b136..917f332f03d 100644 --- a/src/core/lib/iomgr/exec_ctx.h +++ b/src/core/lib/iomgr/exec_ctx.h @@ -93,7 +93,11 @@ bool grpc_exec_ctx_flush(grpc_exec_ctx *exec_ctx); /** Finish any pending work for a grpc_exec_ctx. Must be called before * the instance is destroyed, or work may be lost. */ void grpc_exec_ctx_finish(grpc_exec_ctx *exec_ctx); -/** Add a closure to be executed at the next flush/finish point */ +/** Add a closure to be executed in the future. + If \a offload_target_or_null is NULL, the closure will be executed at the + next exec_ctx.{finish,flush} point. + If \a offload_target_or_null is non-NULL, the closure will be scheduled + against the workqueue, and a reference to the workqueue will be consumed. */ void grpc_exec_ctx_sched(grpc_exec_ctx *exec_ctx, grpc_closure *closure, grpc_error *error, grpc_workqueue *offload_target_or_null); From 099eb6ee4bd9c2a9484d5a794ccf6e97d353ad2e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 30 Jun 2016 15:10:12 -0700 Subject: [PATCH 1428/1894] Get it compiling --- src/core/lib/iomgr/exec_ctx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/core/lib/iomgr/exec_ctx.c b/src/core/lib/iomgr/exec_ctx.c index 059133f8796..ac7785ec135 100644 --- a/src/core/lib/iomgr/exec_ctx.c +++ b/src/core/lib/iomgr/exec_ctx.c @@ -37,6 +37,7 @@ #include #include +#include "src/core/lib/iomgr/workqueue.h" #include "src/core/lib/profiling/timers.h" bool grpc_exec_ctx_ready_to_finish(grpc_exec_ctx *exec_ctx) { From b39307d2bcf859b9e7dfa485fae263f6a73e35b6 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 30 Jun 2016 15:39:13 -0700 Subject: [PATCH 1429/1894] Add workqueues to polling_islands Also: - remove pooling of polling_islands (it's unnecessary) - add some 'statics' to function calls --- src/core/lib/iomgr/ev_epoll_linux.c | 162 +++++++++++++--------------- 1 file changed, 75 insertions(+), 87 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 116de76e6a0..ac6a2157256 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -57,6 +57,7 @@ #include "src/core/lib/iomgr/ev_posix.h" #include "src/core/lib/iomgr/iomgr_internal.h" #include "src/core/lib/iomgr/wakeup_fd_posix.h" +#include "src/core/lib/iomgr/workqueue.h" #include "src/core/lib/profiling/timers.h" #include "src/core/lib/support/block_annotate.h" @@ -156,12 +157,13 @@ static void fd_global_shutdown(void); #ifdef GRPC_PI_REF_COUNT_DEBUG #define PI_ADD_REF(p, r) pi_add_ref_dbg((p), (r), __FILE__, __LINE__) -#define PI_UNREF(p, r) pi_unref_dbg((p), (r), __FILE__, __LINE__) +#define PI_UNREF(exec_ctx, p, r) \ + pi_unref_dbg((exec_ctx), (p), (r), __FILE__, __LINE__) #else /* defined(GRPC_PI_REF_COUNT_DEBUG) */ #define PI_ADD_REF(p, r) pi_add_ref((p)) -#define PI_UNREF(p, r) pi_unref((p)) +#define PI_UNREF(exec_ctx, p, r) pi_unref((exec_ctx), (p)) #endif /* !defined(GPRC_PI_REF_COUNT_DEBUG) */ @@ -184,6 +186,9 @@ typedef struct polling_island { * (except mu and ref_count) are invalid and must be ignored. */ gpr_atm merged_to; + /* The workqueue associated with this polling island */ + grpc_workqueue *workqueue; + /* The fd of the underlying epoll set */ int epoll_fd; @@ -191,11 +196,6 @@ typedef struct polling_island { size_t fd_cnt; size_t fd_capacity; grpc_fd **fds; - - /* Polling islands that are no longer needed are kept in a freelist so that - they can be reused. This field points to the next polling island in the - free list */ - struct polling_island *next_free; } polling_island; /******************************************************************************* @@ -275,11 +275,8 @@ static void append_error(grpc_error **composite, grpc_error *error, threads that woke up MUST NOT call grpc_wakeup_fd_consume_wakeup() */ static grpc_wakeup_fd polling_island_wakeup_fd; -/* Polling island freelist */ -static gpr_mu g_pi_freelist_mu; -static polling_island *g_pi_freelist = NULL; - -static void polling_island_delete(); /* Forward declaration */ +/* Forward declaration */ +static void polling_island_delete(grpc_exec_ctx *exec_ctx); #ifdef GRPC_TSAN /* Currently TSAN may incorrectly flag data races between epoll_ctl and @@ -293,27 +290,29 @@ gpr_atm g_epoll_sync; #endif /* defined(GRPC_TSAN) */ #ifdef GRPC_PI_REF_COUNT_DEBUG -void pi_add_ref(polling_island *pi); -void pi_unref(polling_island *pi); +static void pi_add_ref(polling_island *pi); +static void pi_unref(grpc_exec_ctx *exec_ctx, polling_island *pi); -void pi_add_ref_dbg(polling_island *pi, char *reason, char *file, int line) { +static void pi_add_ref_dbg(polling_island *pi, char *reason, char *file, + int line) { long old_cnt = gpr_atm_acq_load(&(pi->ref_count.count)); pi_add_ref(pi); gpr_log(GPR_DEBUG, "Add ref pi: %p, old: %ld -> new:%ld (%s) - (%s, %d)", (void *)pi, old_cnt, old_cnt + 1, reason, file, line); } -void pi_unref_dbg(polling_island *pi, char *reason, char *file, int line) { +static void pi_unref_dbg(grpc_exec_ctx *exec_ctx, polling_island *pi, + char *reason, char *file, int line) { long old_cnt = gpr_atm_acq_load(&(pi->ref_count.count)); - pi_unref(pi); + pi_unref(exec_ctx, pi); gpr_log(GPR_DEBUG, "Unref pi: %p, old:%ld -> new:%ld (%s) - (%s, %d)", (void *)pi, old_cnt, (old_cnt - 1), reason, file, line); } #endif -void pi_add_ref(polling_island *pi) { gpr_ref(&pi->ref_count); } +static void pi_add_ref(polling_island *pi) { gpr_ref(&pi->ref_count); } -void pi_unref(polling_island *pi) { +static void pi_unref(grpc_exec_ctx *exec_ctx, polling_island *pi) { /* If ref count went to zero, delete the polling island. Note that this deletion not be done under a lock. Once the ref count goes to zero, we are guaranteed that no one else holds a reference to the @@ -324,7 +323,7 @@ void pi_unref(polling_island *pi) { */ if (gpr_unref(&pi->ref_count)) { polling_island *next = (polling_island *)gpr_atm_acq_load(&pi->merged_to); - polling_island_delete(pi); + polling_island_delete(exec_ctx, pi); if (next != NULL) { PI_UNREF(next, "pi_delete"); /* Recursive call */ } @@ -462,29 +461,22 @@ static void polling_island_remove_fd_locked(polling_island *pi, grpc_fd *fd, } /* Might return NULL in case of an error */ -static polling_island *polling_island_create(grpc_fd *initial_fd, +static polling_island *polling_island_create(grpc_exec_ctx *exec_ctx, + grpc_fd *initial_fd, grpc_error **error) { polling_island *pi = NULL; char *err_msg; const char *err_desc = "polling_island_create"; - /* Try to get one from the polling island freelist */ - gpr_mu_lock(&g_pi_freelist_mu); - if (g_pi_freelist != NULL) { - pi = g_pi_freelist; - g_pi_freelist = g_pi_freelist->next_free; - pi->next_free = NULL; - } - gpr_mu_unlock(&g_pi_freelist_mu); - - /* Create new polling island if we could not get one from the free list */ - if (pi == NULL) { - pi = gpr_malloc(sizeof(*pi)); - gpr_mu_init(&pi->mu); - pi->fd_cnt = 0; - pi->fd_capacity = 0; - pi->fds = NULL; - } + *error = GRPC_ERROR_NONE; + + pi = gpr_malloc(sizeof(*pi)); + gpr_mu_init(&pi->mu); + pi->fd_cnt = 0; + pi->fd_capacity = 0; + pi->fds = NULL; + pi->epoll_fd = -1; + pi->workqueue = NULL; gpr_ref_init(&pi->ref_count, 0); gpr_atm_rel_store(&pi->merged_to, (gpr_atm)NULL); @@ -492,39 +484,49 @@ static polling_island *polling_island_create(grpc_fd *initial_fd, pi->epoll_fd = epoll_create1(EPOLL_CLOEXEC); if (pi->epoll_fd < 0) { - gpr_asprintf(&err_msg, "epoll_create1 failed with error %d (%s)", errno, - strerror(errno)); - append_error(error, GRPC_OS_ERROR(errno, err_msg), err_desc); - gpr_free(err_msg); - } else { - polling_island_add_wakeup_fd_locked(pi, &grpc_global_wakeup_fd, error); - pi->next_free = NULL; + append_error(error, GRPC_OS_ERROR(errno, "epoll_create1"), err_desc); + goto done; + } - if (initial_fd != NULL) { - /* Lock the polling island here just in case we got this structure from - the freelist and the polling island lock was not released yet (by the - code that adds the polling island to the freelist) */ - gpr_mu_lock(&pi->mu); - polling_island_add_fds_locked(pi, &initial_fd, 1, true, error); - gpr_mu_unlock(&pi->mu); - } + polling_island_add_wakeup_fd_locked(pi, &grpc_global_wakeup_fd, error); + + if (initial_fd != NULL) { + /* Lock the polling island here just in case we got this structure from + the freelist and the polling island lock was not released yet (by the + code that adds the polling island to the freelist) */ + gpr_mu_lock(&pi->mu); + polling_island_add_fds_locked(pi, &initial_fd, 1, true, error); + gpr_mu_unlock(&pi->mu); } + append_error(error, grpc_workqueue_create(exec_ctx, &pi->workqueue), + err_desc); + +done: + if (*error != GRPC_ERROR_NONE) { + if (pi->epoll_fd < 0) { + close(pi->epoll_fd); + } + if (pi->workqueue != NULL) { + GRPC_WORKQUEUE_UNREF(exec_ctx, pi->workqueue, "polling_island"); + } + gpr_mu_destroy(&pi->mu); + gpr_free(pi); + pi = NULL; + } return pi; } -static void polling_island_delete(polling_island *pi) { +static void polling_island_delete(grpc_exec_ctx *exec_ctx, polling_island *pi) { GPR_ASSERT(pi->fd_cnt == 0); gpr_atm_rel_store(&pi->merged_to, (gpr_atm)NULL); close(pi->epoll_fd); - pi->epoll_fd = -1; - - gpr_mu_lock(&g_pi_freelist_mu); - pi->next_free = g_pi_freelist; - g_pi_freelist = pi; - gpr_mu_unlock(&g_pi_freelist_mu); + GRPC_WORKQUEUE_UNREF(exec_ctx, pi->workqueue, "polling_island"); + gpr_mu_destroy(&pi->mu); + gpr_free(pi->fds); + gpr_free(pi); } /* Attempts to gets the last polling island in the linked list (liked by the @@ -704,9 +706,6 @@ static polling_island *polling_island_merge(polling_island *p, static grpc_error *polling_island_global_init() { grpc_error *error = GRPC_ERROR_NONE; - gpr_mu_init(&g_pi_freelist_mu); - g_pi_freelist = NULL; - error = grpc_wakeup_fd_init(&polling_island_wakeup_fd); if (error == GRPC_ERROR_NONE) { error = grpc_wakeup_fd_wakeup(&polling_island_wakeup_fd); @@ -716,18 +715,6 @@ static grpc_error *polling_island_global_init() { } static void polling_island_global_shutdown() { - polling_island *next; - gpr_mu_lock(&g_pi_freelist_mu); - gpr_mu_unlock(&g_pi_freelist_mu); - while (g_pi_freelist != NULL) { - next = g_pi_freelist->next_free; - gpr_mu_destroy(&g_pi_freelist->mu); - gpr_free(g_pi_freelist->fds); - gpr_free(g_pi_freelist); - g_pi_freelist = next; - } - gpr_mu_destroy(&g_pi_freelist_mu); - grpc_wakeup_fd_destroy(&polling_island_wakeup_fd); } @@ -929,7 +916,7 @@ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, polling_island_remove_fd_locked(pi_latest, fd, is_fd_closed, &error); gpr_mu_unlock(&pi_latest->mu); - PI_UNREF(fd->polling_island, "fd_orphan"); + PI_UNREF(exec_ctx, fd->polling_island, "fd_orphan"); fd->polling_island = NULL; } gpr_mu_unlock(&fd->pi_mu); @@ -1229,9 +1216,10 @@ static void fd_become_writable(grpc_exec_ctx *exec_ctx, grpc_fd *fd) { gpr_mu_unlock(&fd->mu); } -static void pollset_release_polling_island(grpc_pollset *ps, char *reason) { +static void pollset_release_polling_island(grpc_exec_ctx *exec_ctx, + grpc_pollset *ps, char *reason) { if (ps->polling_island != NULL) { - PI_UNREF(ps->polling_island, reason); + PI_UNREF(exec_ctx, ps->polling_island, reason); } ps->polling_island = NULL; } @@ -1244,7 +1232,7 @@ static void finish_shutdown_locked(grpc_exec_ctx *exec_ctx, pollset->finish_shutdown_called = true; /* Release the ref and set pollset->polling_island to NULL */ - pollset_release_polling_island(pollset, "ps_shutdown"); + pollset_release_polling_island(exec_ctx, pollset, "ps_shutdown"); grpc_exec_ctx_sched(exec_ctx, pollset->shutdown_done, GRPC_ERROR_NONE, NULL); } @@ -1276,14 +1264,14 @@ static void pollset_destroy(grpc_pollset *pollset) { gpr_mu_destroy(&pollset->mu); } -static void pollset_reset(grpc_pollset *pollset) { +static void pollset_reset(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset) { GPR_ASSERT(pollset->shutting_down); GPR_ASSERT(!pollset_has_workers(pollset)); pollset->shutting_down = false; pollset->finish_shutdown_called = false; pollset->kicked_without_pollers = false; pollset->shutdown_done = NULL; - pollset_release_polling_island(pollset, "ps_reset"); + GPR_ASSERT(pollset->polling_island == NULL); } #define GRPC_EPOLL_MAX_EVENTS 1000 @@ -1311,7 +1299,7 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, this function (i.e pollset_work_and_unlock()) is called */ if (pollset->polling_island == NULL) { - pollset->polling_island = polling_island_create(NULL, error); + pollset->polling_island = polling_island_create(exec_ctx, NULL, error); if (pollset->polling_island == NULL) { GPR_TIMER_END("pollset_work_and_unlock", 0); return; /* Fatal error. We cannot continue */ @@ -1331,7 +1319,7 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, /* Always do PI_ADD_REF before PI_UNREF because PI_UNREF may cause the polling island to be deleted */ PI_ADD_REF(pi, "ps"); - PI_UNREF(pollset->polling_island, "ps"); + PI_UNREF(exec_ctx, pollset->polling_island, "ps"); pollset->polling_island = pi; } @@ -1402,7 +1390,7 @@ static void pollset_work_and_unlock(grpc_exec_ctx *exec_ctx, that we got before releasing the polling island lock). This is because pollset->polling_island pointer might get udpated in other parts of the code when there is an island merge while we are doing epoll_wait() above */ - PI_UNREF(pi, "ps_work"); + PI_UNREF(exec_ctx, pi, "ps_work"); GPR_TIMER_END("pollset_work_and_unlock", 0); } @@ -1540,7 +1528,7 @@ static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, if (fd->polling_island == pollset->polling_island) { pi_new = fd->polling_island; if (pi_new == NULL) { - pi_new = polling_island_create(fd, &error); + pi_new = polling_island_create(exec_ctx, fd, &error); GRPC_POLLING_TRACE( "pollset_add_fd: Created new polling island. pi_new: %p (fd: %d, " @@ -1581,7 +1569,7 @@ static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, if (fd->polling_island != pi_new) { PI_ADD_REF(pi_new, "fd"); if (fd->polling_island != NULL) { - PI_UNREF(fd->polling_island, "fd"); + PI_UNREF(exec_ctx, fd->polling_island, "fd"); } fd->polling_island = pi_new; } @@ -1589,7 +1577,7 @@ static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, if (pollset->polling_island != pi_new) { PI_ADD_REF(pi_new, "ps"); if (pollset->polling_island != NULL) { - PI_UNREF(pollset->polling_island, "ps"); + PI_UNREF(exec_ctx, pollset->polling_island, "ps"); } pollset->polling_island = pi_new; } From d6ba6192b048fd3f8be1e6d13dd9d95489ce2065 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 30 Jun 2016 15:42:41 -0700 Subject: [PATCH 1430/1894] Add accessor for fd related workqueue --- src/core/lib/iomgr/ev_epoll_linux.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index ac6a2157256..6dfd363b0b5 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -1024,7 +1024,16 @@ static void fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, gpr_mu_unlock(&fd->mu); } -static grpc_workqueue *fd_get_workqueue(grpc_fd *fd) { return NULL; } +static grpc_workqueue *fd_get_workqueue(grpc_fd *fd) { + gpr_mu_lock(&fd->pi_mu); + grpc_workqueue *workqueue = NULL; + if (fd->polling_island != NULL) { + workqueue = + GRPC_WORKQUEUE_REF(fd->polling_island->workqueue, "get_workqueue"); + } + gpr_mu_unlock(&fd->pi_mu); + return workqueue; +} /******************************************************************************* * Pollset Definitions From 8a15dd2fae54ebb809402c24ebaa86cb8da36597 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Wed, 29 Jun 2016 11:41:24 -0700 Subject: [PATCH 1431/1894] Use open-source defaults to propagate Python plugin configuration --- src/compiler/python_generator.cc | 3 +++ src/compiler/python_generator.h | 1 + src/compiler/python_plugin.cc | 2 -- tools/distrib/python/grpcio_tools/grpc/tools/main.cc | 1 - 4 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/compiler/python_generator.cc b/src/compiler/python_generator.cc index 15cda474ccd..c5f1ed80611 100644 --- a/src/compiler/python_generator.cc +++ b/src/compiler/python_generator.cc @@ -66,6 +66,9 @@ using std::vector; namespace grpc_python_generator { +GeneratorConfiguration::GeneratorConfiguration() + : grpc_package_root("grpc"), beta_package_root("grpc.beta") {} + PythonGrpcGenerator::PythonGrpcGenerator(const GeneratorConfiguration& config) : config_(config) {} diff --git a/src/compiler/python_generator.h b/src/compiler/python_generator.h index fc51b48daec..7ed99eff0bf 100644 --- a/src/compiler/python_generator.h +++ b/src/compiler/python_generator.h @@ -43,6 +43,7 @@ namespace grpc_python_generator { // Data pertaining to configuration of the generator with respect to anything // that may be used internally at Google. struct GeneratorConfiguration { + GeneratorConfiguration(); grpc::string grpc_package_root; grpc::string beta_package_root; }; diff --git a/src/compiler/python_plugin.cc b/src/compiler/python_plugin.cc index fc76ee5ec6d..3457aa631a3 100644 --- a/src/compiler/python_plugin.cc +++ b/src/compiler/python_plugin.cc @@ -38,8 +38,6 @@ int main(int argc, char* argv[]) { grpc_python_generator::GeneratorConfiguration config; - config.grpc_package_root = "grpc"; - config.beta_package_root = "grpc.beta"; grpc_python_generator::PythonGrpcGenerator generator(config); return grpc::protobuf::compiler::PluginMain(argc, argv, &generator); } diff --git a/tools/distrib/python/grpcio_tools/grpc/tools/main.cc b/tools/distrib/python/grpcio_tools/grpc/tools/main.cc index 81675b4e6fc..83918395135 100644 --- a/tools/distrib/python/grpcio_tools/grpc/tools/main.cc +++ b/tools/distrib/python/grpcio_tools/grpc/tools/main.cc @@ -45,7 +45,6 @@ int protoc_main(int argc, char* argv[]) { // gRPC Python grpc_python_generator::GeneratorConfiguration grpc_py_config; - grpc_py_config.beta_package_root = "grpc.beta"; grpc_python_generator::PythonGrpcGenerator grpc_py_generator(grpc_py_config); cli.RegisterGenerator("--grpc_python_out", &grpc_py_generator, "Generate Python source file."); From 6721d4f0f18c71f5e4ab1cef904944185ed86b89 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 30 Jun 2016 17:17:23 -0700 Subject: [PATCH 1432/1894] Return success status of grpc_byte_buffer_reader --- include/grpc++/impl/codegen/core_codegen.h | 4 ++-- .../impl/codegen/core_codegen_interface.h | 5 +++-- include/grpc++/impl/codegen/proto_utils.h | 17 +++++++++++++-- include/grpc++/support/byte_buffer.h | 2 +- include/grpc/impl/codegen/byte_buffer.h | 7 ++++--- src/core/lib/surface/byte_buffer_reader.c | 8 ++++--- src/cpp/common/core_codegen.cc | 6 +++--- src/cpp/util/byte_buffer.cc | 10 ++++++--- src/csharp/ext/grpc_csharp_ext.c | 2 ++ src/node/ext/byte_buffer.cc | 5 ++++- .../GRPCClient/private/NSData+GRPC.m | 6 +++++- src/php/ext/grpc/byte_buffer.c | 5 ++--- .../grpc/_cython/_cygrpc/records.pyx.pxi | 1 + src/ruby/ext/grpc/rb_byte_buffer.c | 5 ++++- test/core/end2end/cq_verifier.c | 3 ++- test/core/surface/byte_buffer_reader_test.c | 21 ++++++++++++------- 16 files changed, 74 insertions(+), 33 deletions(-) diff --git a/include/grpc++/impl/codegen/core_codegen.h b/include/grpc++/impl/codegen/core_codegen.h index b0c4c57e66a..9699abfb438 100644 --- a/include/grpc++/impl/codegen/core_codegen.h +++ b/include/grpc++/impl/codegen/core_codegen.h @@ -54,8 +54,8 @@ class CoreCodegen : public CoreCodegenInterface { void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) GRPC_OVERRIDE; - void grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader, - grpc_byte_buffer* buffer) GRPC_OVERRIDE; + int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader, + grpc_byte_buffer* buffer) GRPC_OVERRIDE; void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader* reader) GRPC_OVERRIDE; int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader, diff --git a/include/grpc++/impl/codegen/core_codegen_interface.h b/include/grpc++/impl/codegen/core_codegen_interface.h index 64d882ed5db..f9a8f9b980b 100644 --- a/include/grpc++/impl/codegen/core_codegen_interface.h +++ b/include/grpc++/impl/codegen/core_codegen_interface.h @@ -65,8 +65,9 @@ class CoreCodegenInterface { virtual void grpc_byte_buffer_destroy(grpc_byte_buffer* bb) = 0; - virtual void grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader, - grpc_byte_buffer* buffer) = 0; + virtual int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader, + grpc_byte_buffer* buffer) + GRPC_MUST_USE_RESULT = 0; virtual void grpc_byte_buffer_reader_destroy( grpc_byte_buffer_reader* reader) = 0; virtual int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader* reader, diff --git a/include/grpc++/impl/codegen/proto_utils.h b/include/grpc++/impl/codegen/proto_utils.h index 3bad468a74e..d4599c5ffff 100644 --- a/include/grpc++/impl/codegen/proto_utils.h +++ b/include/grpc++/impl/codegen/proto_utils.h @@ -111,14 +111,21 @@ class GrpcBufferReader GRPC_FINAL : public ::grpc::protobuf::io::ZeroCopyInputStream { public: explicit GrpcBufferReader(grpc_byte_buffer* buffer) - : byte_count_(0), backup_count_(0) { - g_core_codegen_interface->grpc_byte_buffer_reader_init(&reader_, buffer); + : byte_count_(0), backup_count_(0), status_() { + if (!g_core_codegen_interface->grpc_byte_buffer_reader_init(&reader_, + buffer)) { + status_ = Status(StatusCode::INTERNAL, + "Couldn't initialize byte buffer reader"); + } } ~GrpcBufferReader() GRPC_OVERRIDE { g_core_codegen_interface->grpc_byte_buffer_reader_destroy(&reader_); } bool Next(const void** data, int* size) GRPC_OVERRIDE { + if (!status_.ok()) { + return false; + } if (backup_count_ > 0) { *data = GPR_SLICE_START_PTR(slice_) + GPR_SLICE_LENGTH(slice_) - backup_count_; @@ -139,6 +146,8 @@ class GrpcBufferReader GRPC_FINAL return true; } + Status status() const { return status_; } + void BackUp(int count) GRPC_OVERRIDE { backup_count_ = count; } bool Skip(int count) GRPC_OVERRIDE { @@ -165,6 +174,7 @@ class GrpcBufferReader GRPC_FINAL int64_t backup_count_; grpc_byte_buffer_reader reader_; gpr_slice slice_; + Status status_; }; } // namespace internal @@ -202,6 +212,9 @@ class SerializationTraitsok(); { internal::GrpcBufferReader reader(buffer); + if (!reader.status().ok()) { + return reader.status(); + } ::grpc::protobuf::io::CodedInputStream decoder(&reader); if (max_message_size > 0) { decoder.SetTotalBytesLimit(max_message_size, max_message_size); diff --git a/include/grpc++/support/byte_buffer.h b/include/grpc++/support/byte_buffer.h index f6eb09638f5..20bd4071091 100644 --- a/include/grpc++/support/byte_buffer.h +++ b/include/grpc++/support/byte_buffer.h @@ -64,7 +64,7 @@ class ByteBuffer GRPC_FINAL { ByteBuffer& operator=(const ByteBuffer&); /// Dump (read) the buffer contents into \a slices. - void Dump(std::vector* slices) const; + Status Dump(std::vector* slices) const; /// Remove all data. void Clear(); diff --git a/include/grpc/impl/codegen/byte_buffer.h b/include/grpc/impl/codegen/byte_buffer.h index 3ae8ac50ba1..4cec21d1312 100644 --- a/include/grpc/impl/codegen/byte_buffer.h +++ b/include/grpc/impl/codegen/byte_buffer.h @@ -93,9 +93,10 @@ GRPCAPI void grpc_byte_buffer_destroy(grpc_byte_buffer *byte_buffer); struct grpc_byte_buffer_reader; typedef struct grpc_byte_buffer_reader grpc_byte_buffer_reader; -/** Initialize \a reader to read over \a buffer */ -GRPCAPI void grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, - grpc_byte_buffer *buffer); +/** Initialize \a reader to read over \a buffer. + * Returns 1 upon success, 0 otherwise. */ +GRPCAPI int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, + grpc_byte_buffer *buffer); /** Cleanup and destroy \a reader */ GRPCAPI void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader); diff --git a/src/core/lib/surface/byte_buffer_reader.c b/src/core/lib/surface/byte_buffer_reader.c index c97079f6385..3a85f1f1f93 100644 --- a/src/core/lib/surface/byte_buffer_reader.c +++ b/src/core/lib/surface/byte_buffer_reader.c @@ -54,8 +54,8 @@ static int is_compressed(grpc_byte_buffer *buffer) { return 1 /* GPR_TRUE */; } -void grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, - grpc_byte_buffer *buffer) { +int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, + grpc_byte_buffer *buffer) { gpr_slice_buffer decompressed_slices_buffer; reader->buffer_in = buffer; switch (reader->buffer_in->type) { @@ -69,7 +69,8 @@ void grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, "Unexpected error decompressing data for algorithm with enum " "value '%d'. Reading data as if it were uncompressed.", reader->buffer_in->data.raw.compression); - reader->buffer_out = reader->buffer_in; + return 0; + memset(reader, 0, sizeof(*reader)); } else { /* all fine */ reader->buffer_out = grpc_raw_byte_buffer_create(decompressed_slices_buffer.slices, @@ -82,6 +83,7 @@ void grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, reader->current.index = 0; break; } + return 1; } void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader) { diff --git a/src/cpp/common/core_codegen.cc b/src/cpp/common/core_codegen.cc index cc35aa69bab..3d6780bcb8c 100644 --- a/src/cpp/common/core_codegen.cc +++ b/src/cpp/common/core_codegen.cc @@ -74,9 +74,9 @@ void CoreCodegen::grpc_byte_buffer_destroy(grpc_byte_buffer* bb) { ::grpc_byte_buffer_destroy(bb); } -void CoreCodegen::grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader, - grpc_byte_buffer* buffer) { - ::grpc_byte_buffer_reader_init(reader, buffer); +int CoreCodegen::grpc_byte_buffer_reader_init(grpc_byte_buffer_reader* reader, + grpc_byte_buffer* buffer) { + return ::grpc_byte_buffer_reader_init(reader, buffer); } void CoreCodegen::grpc_byte_buffer_reader_destroy( diff --git a/src/cpp/util/byte_buffer.cc b/src/cpp/util/byte_buffer.cc index c0a14de418a..c2cd20ee07f 100644 --- a/src/cpp/util/byte_buffer.cc +++ b/src/cpp/util/byte_buffer.cc @@ -58,18 +58,22 @@ void ByteBuffer::Clear() { } } -void ByteBuffer::Dump(std::vector* slices) const { +Status ByteBuffer::Dump(std::vector* slices) const { slices->clear(); if (!buffer_) { - return; + return Status(StatusCode::FAILED_PRECONDITION, "Buffer not initialized"); } grpc_byte_buffer_reader reader; - grpc_byte_buffer_reader_init(&reader, buffer_); + if (!grpc_byte_buffer_reader_init(&reader, buffer_)) { + return Status(StatusCode::INTERNAL, + "Couldn't initialize byte buffer reader"); + } gpr_slice s; while (grpc_byte_buffer_reader_next(&reader, &s)) { slices->push_back(Slice(s, Slice::STEAL_REF)); } grpc_byte_buffer_reader_destroy(&reader); + return Status::OK; } size_t ByteBuffer::Length() const { diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 9b8d050ea51..4009748157b 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -253,6 +253,7 @@ GPR_EXPORT intptr_t GPR_CALLTYPE grpcsharp_batch_context_recv_message_length( if (!ctx->recv_message) { return -1; } + /* TODO(dgq): check the return value of grpc_byte_buffer_reader_init. */ grpc_byte_buffer_reader_init(&reader, ctx->recv_message); return (intptr_t)grpc_byte_buffer_length(reader.buffer_out); } @@ -267,6 +268,7 @@ GPR_EXPORT void GPR_CALLTYPE grpcsharp_batch_context_recv_message_to_buffer( gpr_slice slice; size_t offset = 0; + /* TODO(dgq): check the return value of grpc_byte_buffer_reader_init. */ grpc_byte_buffer_reader_init(&reader, ctx->recv_message); while (grpc_byte_buffer_reader_next(&reader, &slice)) { diff --git a/src/node/ext/byte_buffer.cc b/src/node/ext/byte_buffer.cc index 3479a677029..a3f678f32c6 100644 --- a/src/node/ext/byte_buffer.cc +++ b/src/node/ext/byte_buffer.cc @@ -73,7 +73,10 @@ Local ByteBufferToBuffer(grpc_byte_buffer *buffer) { return scope.Escape(Nan::Null()); } grpc_byte_buffer_reader reader; - grpc_byte_buffer_reader_init(&reader, buffer); + if (!grpc_byte_buffer_reader_init(&reader, buffer)) { + Nan::ThrowError("Error initializing byte buffer reader."); + return scope.Escape(Nan::Undefined()); + } gpr_slice slice = grpc_byte_buffer_reader_readall(&reader); size_t length = GPR_SLICE_LENGTH(slice); char *result = new char[length]; diff --git a/src/objective-c/GRPCClient/private/NSData+GRPC.m b/src/objective-c/GRPCClient/private/NSData+GRPC.m index 1238374af3d..ee72e9068ee 100644 --- a/src/objective-c/GRPCClient/private/NSData+GRPC.m +++ b/src/objective-c/GRPCClient/private/NSData+GRPC.m @@ -42,7 +42,11 @@ static void MallocAndCopyByteBufferToCharArray(grpc_byte_buffer *buffer, size_t *length, char **array) { grpc_byte_buffer_reader reader; - grpc_byte_buffer_reader_init(&reader, buffer); + if (!grpc_byte_buffer_reader_init(&reader, buffer)) { + *array = NULL; + *lenght = 0; + return; + } // The slice contains uncompressed data even if compressed data was received // because the reader takes care of automatically decompressing it gpr_slice slice = grpc_byte_buffer_reader_readall(&reader); diff --git a/src/php/ext/grpc/byte_buffer.c b/src/php/ext/grpc/byte_buffer.c index 7a726de5db4..9e20a4ef9b2 100644 --- a/src/php/ext/grpc/byte_buffer.c +++ b/src/php/ext/grpc/byte_buffer.c @@ -58,7 +58,8 @@ grpc_byte_buffer *string_to_byte_buffer(char *string, size_t length) { void byte_buffer_to_string(grpc_byte_buffer *buffer, char **out_string, size_t *out_length) { - if (buffer == NULL) { + grpc_byte_buffer_reader reader; + if (buffer == NULL || !grpc_byte_buffer_reader_init(&reader, buffer)) { *out_string = NULL; *out_length = 0; return; @@ -66,8 +67,6 @@ void byte_buffer_to_string(grpc_byte_buffer *buffer, char **out_string, size_t length = grpc_byte_buffer_length(buffer); char *string = ecalloc(length + 1, sizeof(char)); size_t offset = 0; - grpc_byte_buffer_reader reader; - grpc_byte_buffer_reader_init(&reader, buffer); gpr_slice next; while (grpc_byte_buffer_reader_next(&reader, &next) != 0) { memcpy(string + offset, GPR_SLICE_START_PTR(next), GPR_SLICE_LENGTH(next)); diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi index 8e651e880f3..337cf7fa3bb 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi @@ -254,6 +254,7 @@ cdef class ByteBuffer: cdef void *data_slice_pointer if self.c_byte_buffer != NULL: with nogil: + # TODO(dgq): check the return value of grpc_byte_buffer_reader_init. grpc_byte_buffer_reader_init(&reader, self.c_byte_buffer) result = bytearray() with nogil: diff --git a/src/ruby/ext/grpc/rb_byte_buffer.c b/src/ruby/ext/grpc/rb_byte_buffer.c index 1172691116c..61b7c30315d 100644 --- a/src/ruby/ext/grpc/rb_byte_buffer.c +++ b/src/ruby/ext/grpc/rb_byte_buffer.c @@ -56,7 +56,10 @@ VALUE grpc_rb_byte_buffer_to_s(grpc_byte_buffer *buffer) { return Qnil; } rb_string = rb_str_buf_new(grpc_byte_buffer_length(buffer)); - grpc_byte_buffer_reader_init(&reader, buffer); + if (!grpc_byte_buffer_reader_init(&reader, buffer)) { + rb_raise(rb_eRuntimeError, "Error initializing byte buffer reader."); + return Qnil; + } while (grpc_byte_buffer_reader_next(&reader, &next) != 0) { rb_str_cat(rb_string, (const char *) GPR_SLICE_START_PTR(next), GPR_SLICE_LENGTH(next)); diff --git a/test/core/end2end/cq_verifier.c b/test/core/end2end/cq_verifier.c index 8e9fa70b0ec..890309c44a8 100644 --- a/test/core/end2end/cq_verifier.c +++ b/test/core/end2end/cq_verifier.c @@ -149,7 +149,8 @@ int byte_buffer_eq_string(grpc_byte_buffer *bb, const char *str) { grpc_byte_buffer *rbb; int res; - grpc_byte_buffer_reader_init(&reader, bb); + GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, bb) && + "Couldn't init byte buffer reader"); rbb = grpc_raw_byte_buffer_from_reader(&reader); res = byte_buffer_eq_slice(rbb, gpr_slice_from_copied_string(str)); grpc_byte_buffer_reader_destroy(&reader); diff --git a/test/core/surface/byte_buffer_reader_test.c b/test/core/surface/byte_buffer_reader_test.c index 9c6734e1799..1c779a8a847 100644 --- a/test/core/surface/byte_buffer_reader_test.c +++ b/test/core/surface/byte_buffer_reader_test.c @@ -59,7 +59,8 @@ static void test_read_one_slice(void) { slice = gpr_slice_from_copied_string("test"); buffer = grpc_raw_byte_buffer_create(&slice, 1); gpr_slice_unref(slice); - grpc_byte_buffer_reader_init(&reader, buffer); + GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && + "Couldn't init byte buffer reader"); first_code = grpc_byte_buffer_reader_next(&reader, &first_slice); GPR_ASSERT(first_code != 0); GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(first_slice), "test", 4) == 0); @@ -81,7 +82,8 @@ static void test_read_one_slice_malloc(void) { memcpy(GPR_SLICE_START_PTR(slice), "test", 4); buffer = grpc_raw_byte_buffer_create(&slice, 1); gpr_slice_unref(slice); - grpc_byte_buffer_reader_init(&reader, buffer); + GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && + "Couldn't init byte buffer reader"); first_code = grpc_byte_buffer_reader_next(&reader, &first_slice); GPR_ASSERT(first_code != 0); GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(first_slice), "test", 4) == 0); @@ -102,7 +104,8 @@ static void test_read_none_compressed_slice(void) { slice = gpr_slice_from_copied_string("test"); buffer = grpc_raw_byte_buffer_create(&slice, 1); gpr_slice_unref(slice); - grpc_byte_buffer_reader_init(&reader, buffer); + GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && + "Couldn't init byte buffer reader"); first_code = grpc_byte_buffer_reader_next(&reader, &first_slice); GPR_ASSERT(first_code != 0); GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(first_slice), "test", 4) == 0); @@ -132,7 +135,8 @@ static void read_compressed_slice(grpc_compression_algorithm algorithm, buffer = grpc_raw_compressed_byte_buffer_create(sliceb_out.slices, sliceb_out.count, algorithm); - grpc_byte_buffer_reader_init(&reader, buffer); + GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && + "Couldn't init byte buffer reader"); while (grpc_byte_buffer_reader_next(&reader, &read_slice)) { GPR_ASSERT(memcmp(GPR_SLICE_START_PTR(read_slice), @@ -170,7 +174,8 @@ static void test_byte_buffer_from_reader(void) { memcpy(GPR_SLICE_START_PTR(slice), "test", 4); buffer = grpc_raw_byte_buffer_create(&slice, 1); gpr_slice_unref(slice); - grpc_byte_buffer_reader_init(&reader, buffer); + GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && + "Couldn't init byte buffer reader"); buffer_from_reader = grpc_raw_byte_buffer_from_reader(&reader); GPR_ASSERT(buffer->type == buffer_from_reader->type); @@ -206,7 +211,8 @@ static void test_readall(void) { gpr_slice_unref(slices[0]); gpr_slice_unref(slices[1]); - grpc_byte_buffer_reader_init(&reader, buffer); + GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && + "Couldn't init byte buffer reader"); slice_out = grpc_byte_buffer_reader_readall(&reader); GPR_ASSERT(GPR_SLICE_LENGTH(slice_out) == 512 + 1024); @@ -241,7 +247,8 @@ static void test_byte_buffer_copy(void) { gpr_slice_unref(slices[1]); copied_buffer = grpc_byte_buffer_copy(buffer); - grpc_byte_buffer_reader_init(&reader, copied_buffer); + GPR_ASSERT(grpc_byte_buffer_reader_init(&reader, buffer) && + "Couldn't init byte buffer reader"); slice_out = grpc_byte_buffer_reader_readall(&reader); GPR_ASSERT(GPR_SLICE_LENGTH(slice_out) == 512 + 1024); From 9ac997acf2f67eb76ce43359d7a7881f320f4c9c Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 30 Jun 2016 17:59:01 -0700 Subject: [PATCH 1433/1894] Added TODO for php. --- src/objective-c/GRPCClient/private/NSData+GRPC.m | 2 +- src/php/ext/grpc/byte_buffer.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/objective-c/GRPCClient/private/NSData+GRPC.m b/src/objective-c/GRPCClient/private/NSData+GRPC.m index ee72e9068ee..99c882ee922 100644 --- a/src/objective-c/GRPCClient/private/NSData+GRPC.m +++ b/src/objective-c/GRPCClient/private/NSData+GRPC.m @@ -44,7 +44,7 @@ static void MallocAndCopyByteBufferToCharArray(grpc_byte_buffer *buffer, grpc_byte_buffer_reader reader; if (!grpc_byte_buffer_reader_init(&reader, buffer)) { *array = NULL; - *lenght = 0; + *length = 0; return; } // The slice contains uncompressed data even if compressed data was received diff --git a/src/php/ext/grpc/byte_buffer.c b/src/php/ext/grpc/byte_buffer.c index 9e20a4ef9b2..2bf9e003050 100644 --- a/src/php/ext/grpc/byte_buffer.c +++ b/src/php/ext/grpc/byte_buffer.c @@ -60,6 +60,7 @@ void byte_buffer_to_string(grpc_byte_buffer *buffer, char **out_string, size_t *out_length) { grpc_byte_buffer_reader reader; if (buffer == NULL || !grpc_byte_buffer_reader_init(&reader, buffer)) { + /* TODO(dgq): distinguish between the error cases. */ *out_string = NULL; *out_length = 0; return; From 00d3f2789b3610d2dedb4b098b6e229ac2055009 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 30 Jun 2016 18:14:40 -0700 Subject: [PATCH 1434/1894] updated copyright --- include/grpc/impl/codegen/byte_buffer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/grpc/impl/codegen/byte_buffer.h b/include/grpc/impl/codegen/byte_buffer.h index 4cec21d1312..fe1e2159793 100644 --- a/include/grpc/impl/codegen/byte_buffer.h +++ b/include/grpc/impl/codegen/byte_buffer.h @@ -1,6 +1,6 @@ /* * - * Copyright 2015, Google Inc. + * Copyright 2015-2016, Google Inc. * All rights reserved. * * Redistribution and use in source and binary forms, with or without From 9a2320e40e105ec2ffc1d9b892b12b5afb8f9e17 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 30 Jun 2016 18:15:12 -0700 Subject: [PATCH 1435/1894] regenerated projects --- src/python/grpcio/grpc/_cython/imports.generated.h | 2 +- src/ruby/ext/grpc/rb_grpc_imports.generated.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index b3e341fe25e..f87c4da7878 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -470,7 +470,7 @@ extern grpc_byte_buffer_length_type grpc_byte_buffer_length_import; typedef void(*grpc_byte_buffer_destroy_type)(grpc_byte_buffer *byte_buffer); extern grpc_byte_buffer_destroy_type grpc_byte_buffer_destroy_import; #define grpc_byte_buffer_destroy grpc_byte_buffer_destroy_import -typedef void(*grpc_byte_buffer_reader_init_type)(grpc_byte_buffer_reader *reader, grpc_byte_buffer *buffer); +typedef int(*grpc_byte_buffer_reader_init_type)(grpc_byte_buffer_reader *reader, grpc_byte_buffer *buffer); extern grpc_byte_buffer_reader_init_type grpc_byte_buffer_reader_init_import; #define grpc_byte_buffer_reader_init grpc_byte_buffer_reader_init_import typedef void(*grpc_byte_buffer_reader_destroy_type)(grpc_byte_buffer_reader *reader); diff --git a/src/ruby/ext/grpc/rb_grpc_imports.generated.h b/src/ruby/ext/grpc/rb_grpc_imports.generated.h index 13f961495cf..6f0974e31b4 100644 --- a/src/ruby/ext/grpc/rb_grpc_imports.generated.h +++ b/src/ruby/ext/grpc/rb_grpc_imports.generated.h @@ -470,7 +470,7 @@ extern grpc_byte_buffer_length_type grpc_byte_buffer_length_import; typedef void(*grpc_byte_buffer_destroy_type)(grpc_byte_buffer *byte_buffer); extern grpc_byte_buffer_destroy_type grpc_byte_buffer_destroy_import; #define grpc_byte_buffer_destroy grpc_byte_buffer_destroy_import -typedef void(*grpc_byte_buffer_reader_init_type)(grpc_byte_buffer_reader *reader, grpc_byte_buffer *buffer); +typedef int(*grpc_byte_buffer_reader_init_type)(grpc_byte_buffer_reader *reader, grpc_byte_buffer *buffer); extern grpc_byte_buffer_reader_init_type grpc_byte_buffer_reader_init_import; #define grpc_byte_buffer_reader_init grpc_byte_buffer_reader_init_import typedef void(*grpc_byte_buffer_reader_destroy_type)(grpc_byte_buffer_reader *reader); From 89d8f1697c2bf4a6691203d4a5f6fd495241696e Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Thu, 30 Jun 2016 18:17:27 -0700 Subject: [PATCH 1436/1894] Added comment for obj-c --- src/objective-c/GRPCClient/private/NSData+GRPC.m | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/objective-c/GRPCClient/private/NSData+GRPC.m b/src/objective-c/GRPCClient/private/NSData+GRPC.m index 99c882ee922..98337799e91 100644 --- a/src/objective-c/GRPCClient/private/NSData+GRPC.m +++ b/src/objective-c/GRPCClient/private/NSData+GRPC.m @@ -43,6 +43,10 @@ static void MallocAndCopyByteBufferToCharArray(grpc_byte_buffer *buffer, size_t *length, char **array) { grpc_byte_buffer_reader reader; if (!grpc_byte_buffer_reader_init(&reader, buffer)) { + // grpc_byte_buffer_reader_init can fail if the data sent by the server + // could not be decompressed for any reason. This is an issue with the data + // coming from the server and thus we want the RPC to fail with error code + // INTERNAL. *array = NULL; *length = 0; return; From 3bdaa5e72684a271445f945f3d6aa6ea33681dd1 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Thu, 30 Jun 2016 19:15:21 -0700 Subject: [PATCH 1437/1894] Regenerate list of gRPC-Core files --- gRPC-Core.podspec | 177 ++++++++++++++++++++++++++++++---------------- 1 file changed, 117 insertions(+), 60 deletions(-) diff --git a/gRPC-Core.podspec b/gRPC-Core.podspec index 7e9fe0a9afd..e10e05387b1 100644 --- a/gRPC-Core.podspec +++ b/gRPC-Core.podspec @@ -118,14 +118,14 @@ Pod::Spec.new do |s| 'include/grpc/support/atm.h', 'include/grpc/support/atm_gcc_atomic.h', 'include/grpc/support/atm_gcc_sync.h', - 'include/grpc/support/atm_win32.h', + 'include/grpc/support/atm_windows.h', 'include/grpc/support/avl.h', 'include/grpc/support/cmdline.h', 'include/grpc/support/cpu.h', 'include/grpc/support/histogram.h', 'include/grpc/support/host_port.h', 'include/grpc/support/log.h', - 'include/grpc/support/log_win32.h', + 'include/grpc/support/log_windows.h', 'include/grpc/support/port_platform.h', 'include/grpc/support/slice.h', 'include/grpc/support/slice_buffer.h', @@ -134,7 +134,7 @@ Pod::Spec.new do |s| 'include/grpc/support/sync.h', 'include/grpc/support/sync_generic.h', 'include/grpc/support/sync_posix.h', - 'include/grpc/support/sync_win32.h', + 'include/grpc/support/sync_windows.h', 'include/grpc/support/thd.h', 'include/grpc/support/time.h', 'include/grpc/support/tls.h', @@ -146,7 +146,7 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/atm.h', 'include/grpc/impl/codegen/atm_gcc_atomic.h', 'include/grpc/impl/codegen/atm_gcc_sync.h', - 'include/grpc/impl/codegen/atm_win32.h', + 'include/grpc/impl/codegen/atm_windows.h', 'include/grpc/impl/codegen/log.h', 'include/grpc/impl/codegen/port_platform.h', 'include/grpc/impl/codegen/slice.h', @@ -154,12 +154,13 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/sync.h', 'include/grpc/impl/codegen/sync_generic.h', 'include/grpc/impl/codegen/sync_posix.h', - 'include/grpc/impl/codegen/sync_win32.h', + 'include/grpc/impl/codegen/sync_windows.h', 'include/grpc/impl/codegen/time.h', 'include/grpc/byte_buffer.h', 'include/grpc/byte_buffer_reader.h', 'include/grpc/compression.h', 'include/grpc/grpc.h', + 'include/grpc/grpc_posix.h', 'include/grpc/status.h', 'include/grpc/impl/codegen/byte_buffer.h', 'include/grpc/impl/codegen/byte_buffer_reader.h', @@ -172,7 +173,7 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/atm.h', 'include/grpc/impl/codegen/atm_gcc_atomic.h', 'include/grpc/impl/codegen/atm_gcc_sync.h', - 'include/grpc/impl/codegen/atm_win32.h', + 'include/grpc/impl/codegen/atm_windows.h', 'include/grpc/impl/codegen/log.h', 'include/grpc/impl/codegen/port_platform.h', 'include/grpc/impl/codegen/slice.h', @@ -180,7 +181,7 @@ Pod::Spec.new do |s| 'include/grpc/impl/codegen/sync.h', 'include/grpc/impl/codegen/sync_generic.h', 'include/grpc/impl/codegen/sync_posix.h', - 'include/grpc/impl/codegen/sync_win32.h', + 'include/grpc/impl/codegen/sync_windows.h', 'include/grpc/impl/codegen/time.h', 'include/grpc/grpc_security.h', 'include/grpc/grpc_security_constants.h', @@ -197,11 +198,10 @@ Pod::Spec.new do |s| 'src/core/lib/support/backoff.h', 'src/core/lib/support/block_annotate.h', 'src/core/lib/support/env.h', - 'src/core/lib/support/load_file.h', 'src/core/lib/support/murmur_hash.h', 'src/core/lib/support/stack_lockfree.h', 'src/core/lib/support/string.h', - 'src/core/lib/support/string_win32.h', + 'src/core/lib/support/string_windows.h', 'src/core/lib/support/thd_internal.h', 'src/core/lib/support/time_precise.h', 'src/core/lib/support/tmpfile.h', @@ -217,39 +217,38 @@ Pod::Spec.new do |s| 'src/core/lib/support/cpu_windows.c', 'src/core/lib/support/env_linux.c', 'src/core/lib/support/env_posix.c', - 'src/core/lib/support/env_win32.c', + 'src/core/lib/support/env_windows.c', 'src/core/lib/support/histogram.c', 'src/core/lib/support/host_port.c', - 'src/core/lib/support/load_file.c', 'src/core/lib/support/log.c', 'src/core/lib/support/log_android.c', 'src/core/lib/support/log_linux.c', 'src/core/lib/support/log_posix.c', - 'src/core/lib/support/log_win32.c', + 'src/core/lib/support/log_windows.c', 'src/core/lib/support/murmur_hash.c', 'src/core/lib/support/slice.c', 'src/core/lib/support/slice_buffer.c', 'src/core/lib/support/stack_lockfree.c', 'src/core/lib/support/string.c', 'src/core/lib/support/string_posix.c', - 'src/core/lib/support/string_util_win32.c', - 'src/core/lib/support/string_win32.c', + 'src/core/lib/support/string_util_windows.c', + 'src/core/lib/support/string_windows.c', 'src/core/lib/support/subprocess_posix.c', 'src/core/lib/support/subprocess_windows.c', 'src/core/lib/support/sync.c', 'src/core/lib/support/sync_posix.c', - 'src/core/lib/support/sync_win32.c', + 'src/core/lib/support/sync_windows.c', 'src/core/lib/support/thd.c', 'src/core/lib/support/thd_posix.c', - 'src/core/lib/support/thd_win32.c', + 'src/core/lib/support/thd_windows.c', 'src/core/lib/support/time.c', 'src/core/lib/support/time_posix.c', 'src/core/lib/support/time_precise.c', - 'src/core/lib/support/time_win32.c', + 'src/core/lib/support/time_windows.c', 'src/core/lib/support/tls_pthread.c', 'src/core/lib/support/tmpfile_msys.c', 'src/core/lib/support/tmpfile_posix.c', - 'src/core/lib/support/tmpfile_win32.c', + 'src/core/lib/support/tmpfile_windows.c', 'src/core/lib/support/wrap_memcpy.c', 'src/core/lib/channel/channel_args.h', 'src/core/lib/channel/channel_stack.h', @@ -268,7 +267,10 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/closure.h', 'src/core/lib/iomgr/endpoint.h', 'src/core/lib/iomgr/endpoint_pair.h', + 'src/core/lib/iomgr/error.h', + 'src/core/lib/iomgr/ev_epoll_linux.h', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.h', + 'src/core/lib/iomgr/ev_poll_posix.h', 'src/core/lib/iomgr/ev_posix.h', 'src/core/lib/iomgr/exec_ctx.h', 'src/core/lib/iomgr/executor.h', @@ -276,6 +278,9 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/iomgr.h', 'src/core/lib/iomgr/iomgr_internal.h', 'src/core/lib/iomgr/iomgr_posix.h', + 'src/core/lib/iomgr/load_file.h', + 'src/core/lib/iomgr/network_status_tracker.h', + 'src/core/lib/iomgr/polling_entity.h', 'src/core/lib/iomgr/pollset.h', 'src/core/lib/iomgr/pollset_set.h', 'src/core/lib/iomgr/pollset_set_windows.h', @@ -284,7 +289,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/sockaddr.h', 'src/core/lib/iomgr/sockaddr_posix.h', 'src/core/lib/iomgr/sockaddr_utils.h', - 'src/core/lib/iomgr/sockaddr_win32.h', + 'src/core/lib/iomgr/sockaddr_windows.h', 'src/core/lib/iomgr/socket_utils_posix.h', 'src/core/lib/iomgr/socket_windows.h', 'src/core/lib/iomgr/tcp_client.h', @@ -316,7 +321,6 @@ Pod::Spec.new do |s| 'src/core/lib/surface/init.h', 'src/core/lib/surface/lame_client.h', 'src/core/lib/surface/server.h', - 'src/core/lib/surface/surface_trace.h', 'src/core/lib/transport/byte_stream.h', 'src/core/lib/transport/connectivity_state.h', 'src/core/lib/transport/metadata.h', @@ -324,6 +328,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/static_metadata.h', 'src/core/lib/transport/transport.h', 'src/core/lib/transport/transport_impl.h', + 'src/core/ext/transport/chttp2/transport/bin_decoder.h', 'src/core/ext/transport/chttp2/transport/bin_encoder.h', 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', 'src/core/ext/transport/chttp2/transport/frame.h', @@ -345,15 +350,25 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/transport/timeout_encoding.h', 'src/core/ext/transport/chttp2/transport/varint.h', 'src/core/ext/transport/chttp2/alpn/alpn.h', - 'src/core/lib/security/auth_filters.h', - 'src/core/lib/security/b64.h', - 'src/core/lib/security/credentials.h', - 'src/core/lib/security/handshake.h', - 'src/core/lib/security/json_token.h', - 'src/core/lib/security/jwt_verifier.h', - 'src/core/lib/security/secure_endpoint.h', - 'src/core/lib/security/security_connector.h', - 'src/core/lib/security/security_context.h', + 'src/core/lib/security/context/security_context.h', + 'src/core/lib/security/credentials/composite/composite_credentials.h', + 'src/core/lib/security/credentials/credentials.h', + 'src/core/lib/security/credentials/fake/fake_credentials.h', + 'src/core/lib/security/credentials/google_default/google_default_credentials.h', + 'src/core/lib/security/credentials/iam/iam_credentials.h', + 'src/core/lib/security/credentials/jwt/json_token.h', + 'src/core/lib/security/credentials/jwt/jwt_credentials.h', + 'src/core/lib/security/credentials/jwt/jwt_verifier.h', + 'src/core/lib/security/credentials/oauth2/oauth2_credentials.h', + 'src/core/lib/security/credentials/plugin/plugin_credentials.h', + 'src/core/lib/security/credentials/ssl/ssl_credentials.h', + 'src/core/lib/security/transport/auth_filters.h', + 'src/core/lib/security/transport/handshake.h', + 'src/core/lib/security/transport/secure_endpoint.h', + 'src/core/lib/security/transport/security_connector.h', + 'src/core/lib/security/transport/tsi_error.h', + 'src/core/lib/security/util/b64.h', + 'src/core/lib/security/util/json_util.h', 'src/core/lib/tsi/fake_transport_security.h', 'src/core/lib/tsi/ssl_transport_security.h', 'src/core/lib/tsi/ssl_types.h', @@ -376,14 +391,17 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/subchannel_index.h', 'src/core/ext/client_config/uri_parser.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', - 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h', + 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h', 'third_party/nanopb/pb.h', 'third_party/nanopb/pb_common.h', 'third_party/nanopb/pb_decode.h', 'third_party/nanopb/pb_encode.h', + 'src/core/ext/load_reporting/load_reporting.h', + 'src/core/ext/load_reporting/load_reporting_filter.h', 'src/core/ext/census/aggregation.h', 'src/core/ext/census/census_interface.h', 'src/core/ext/census/census_rpc_stats.h', + 'src/core/ext/census/gen/census.pb.h', 'src/core/ext/census/grpc_filter.h', 'src/core/ext/census/mlog.h', 'src/core/ext/census/rpc_metric_id.h', @@ -395,7 +413,7 @@ Pod::Spec.new do |s| 'src/core/lib/channel/connected_channel.c', 'src/core/lib/channel/http_client_filter.c', 'src/core/lib/channel/http_server_filter.c', - 'src/core/lib/compression/compression_algorithm.c', + 'src/core/lib/compression/compression.c', 'src/core/lib/compression/message_compress.c', 'src/core/lib/debug/trace.c', 'src/core/lib/http/format_request.c', @@ -405,7 +423,10 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/endpoint.c', 'src/core/lib/iomgr/endpoint_pair_posix.c', 'src/core/lib/iomgr/endpoint_pair_windows.c', + 'src/core/lib/iomgr/error.c', + 'src/core/lib/iomgr/ev_epoll_linux.c', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.c', + 'src/core/lib/iomgr/ev_poll_posix.c', 'src/core/lib/iomgr/ev_posix.c', 'src/core/lib/iomgr/exec_ctx.c', 'src/core/lib/iomgr/executor.c', @@ -413,6 +434,9 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/iomgr.c', 'src/core/lib/iomgr/iomgr_posix.c', 'src/core/lib/iomgr/iomgr_windows.c', + 'src/core/lib/iomgr/load_file.c', + 'src/core/lib/iomgr/network_status_tracker.c', + 'src/core/lib/iomgr/polling_entity.c', 'src/core/lib/iomgr/pollset_set_windows.c', 'src/core/lib/iomgr/pollset_windows.c', 'src/core/lib/iomgr/resolve_address_posix.c', @@ -470,6 +494,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/transport.c', 'src/core/lib/transport/transport_op_string.c', 'src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c', + 'src/core/ext/transport/chttp2/transport/bin_decoder.c', 'src/core/ext/transport/chttp2/transport/bin_encoder.c', 'src/core/ext/transport/chttp2/transport/chttp2_plugin.c', 'src/core/ext/transport/chttp2/transport/chttp2_transport.c', @@ -493,20 +518,29 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/transport/writing.c', 'src/core/ext/transport/chttp2/alpn/alpn.c', 'src/core/lib/http/httpcli_security_connector.c', - 'src/core/lib/security/b64.c', - 'src/core/lib/security/client_auth_filter.c', - 'src/core/lib/security/credentials.c', - 'src/core/lib/security/credentials_metadata.c', - 'src/core/lib/security/credentials_posix.c', - 'src/core/lib/security/credentials_win32.c', - 'src/core/lib/security/google_default_credentials.c', - 'src/core/lib/security/handshake.c', - 'src/core/lib/security/json_token.c', - 'src/core/lib/security/jwt_verifier.c', - 'src/core/lib/security/secure_endpoint.c', - 'src/core/lib/security/security_connector.c', - 'src/core/lib/security/security_context.c', - 'src/core/lib/security/server_auth_filter.c', + 'src/core/lib/security/context/security_context.c', + 'src/core/lib/security/credentials/composite/composite_credentials.c', + 'src/core/lib/security/credentials/credentials.c', + 'src/core/lib/security/credentials/credentials_metadata.c', + 'src/core/lib/security/credentials/fake/fake_credentials.c', + 'src/core/lib/security/credentials/google_default/credentials_posix.c', + 'src/core/lib/security/credentials/google_default/credentials_windows.c', + 'src/core/lib/security/credentials/google_default/google_default_credentials.c', + 'src/core/lib/security/credentials/iam/iam_credentials.c', + 'src/core/lib/security/credentials/jwt/json_token.c', + 'src/core/lib/security/credentials/jwt/jwt_credentials.c', + 'src/core/lib/security/credentials/jwt/jwt_verifier.c', + 'src/core/lib/security/credentials/oauth2/oauth2_credentials.c', + 'src/core/lib/security/credentials/plugin/plugin_credentials.c', + 'src/core/lib/security/credentials/ssl/ssl_credentials.c', + 'src/core/lib/security/transport/client_auth_filter.c', + 'src/core/lib/security/transport/handshake.c', + 'src/core/lib/security/transport/secure_endpoint.c', + 'src/core/lib/security/transport/security_connector.c', + 'src/core/lib/security/transport/server_auth_filter.c', + 'src/core/lib/security/transport/tsi_error.c', + 'src/core/lib/security/util/b64.c', + 'src/core/lib/security/util/json_util.c', 'src/core/lib/surface/init_secure.c', 'src/core/lib/tsi/fake_transport_security.c', 'src/core/lib/tsi/ssl_transport_security.c', @@ -532,9 +566,11 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/subchannel_index.c', 'src/core/ext/client_config/uri_parser.c', 'src/core/ext/transport/chttp2/server/insecure/server_chttp2.c', + 'src/core/ext/transport/chttp2/server/insecure/server_chttp2_posix.c', 'src/core/ext/transport/chttp2/client/insecure/channel_create.c', + 'src/core/ext/transport/chttp2/client/insecure/channel_create_posix.c', 'src/core/ext/lb_policy/grpclb/load_balancer_api.c', - 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.c', + 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.c', 'third_party/nanopb/pb_common.c', 'third_party/nanopb/pb_decode.c', 'third_party/nanopb/pb_encode.c', @@ -542,7 +578,10 @@ Pod::Spec.new do |s| 'src/core/ext/lb_policy/round_robin/round_robin.c', 'src/core/ext/resolver/dns/native/dns_resolver.c', 'src/core/ext/resolver/sockaddr/sockaddr_resolver.c', + 'src/core/ext/load_reporting/load_reporting.c', + 'src/core/ext/load_reporting/load_reporting_filter.c', 'src/core/ext/census/context.c', + 'src/core/ext/census/gen/census.pb.c', 'src/core/ext/census/grpc_context.c', 'src/core/ext/census/grpc_filter.c', 'src/core/ext/census/grpc_plugin.c', @@ -557,11 +596,10 @@ Pod::Spec.new do |s| 'src/core/lib/support/backoff.h', 'src/core/lib/support/block_annotate.h', 'src/core/lib/support/env.h', - 'src/core/lib/support/load_file.h', 'src/core/lib/support/murmur_hash.h', 'src/core/lib/support/stack_lockfree.h', 'src/core/lib/support/string.h', - 'src/core/lib/support/string_win32.h', + 'src/core/lib/support/string_windows.h', 'src/core/lib/support/thd_internal.h', 'src/core/lib/support/time_precise.h', 'src/core/lib/support/tmpfile.h', @@ -582,7 +620,10 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/closure.h', 'src/core/lib/iomgr/endpoint.h', 'src/core/lib/iomgr/endpoint_pair.h', + 'src/core/lib/iomgr/error.h', + 'src/core/lib/iomgr/ev_epoll_linux.h', 'src/core/lib/iomgr/ev_poll_and_epoll_posix.h', + 'src/core/lib/iomgr/ev_poll_posix.h', 'src/core/lib/iomgr/ev_posix.h', 'src/core/lib/iomgr/exec_ctx.h', 'src/core/lib/iomgr/executor.h', @@ -590,6 +631,9 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/iomgr.h', 'src/core/lib/iomgr/iomgr_internal.h', 'src/core/lib/iomgr/iomgr_posix.h', + 'src/core/lib/iomgr/load_file.h', + 'src/core/lib/iomgr/network_status_tracker.h', + 'src/core/lib/iomgr/polling_entity.h', 'src/core/lib/iomgr/pollset.h', 'src/core/lib/iomgr/pollset_set.h', 'src/core/lib/iomgr/pollset_set_windows.h', @@ -598,7 +642,7 @@ Pod::Spec.new do |s| 'src/core/lib/iomgr/sockaddr.h', 'src/core/lib/iomgr/sockaddr_posix.h', 'src/core/lib/iomgr/sockaddr_utils.h', - 'src/core/lib/iomgr/sockaddr_win32.h', + 'src/core/lib/iomgr/sockaddr_windows.h', 'src/core/lib/iomgr/socket_utils_posix.h', 'src/core/lib/iomgr/socket_windows.h', 'src/core/lib/iomgr/tcp_client.h', @@ -630,7 +674,6 @@ Pod::Spec.new do |s| 'src/core/lib/surface/init.h', 'src/core/lib/surface/lame_client.h', 'src/core/lib/surface/server.h', - 'src/core/lib/surface/surface_trace.h', 'src/core/lib/transport/byte_stream.h', 'src/core/lib/transport/connectivity_state.h', 'src/core/lib/transport/metadata.h', @@ -638,6 +681,7 @@ Pod::Spec.new do |s| 'src/core/lib/transport/static_metadata.h', 'src/core/lib/transport/transport.h', 'src/core/lib/transport/transport_impl.h', + 'src/core/ext/transport/chttp2/transport/bin_decoder.h', 'src/core/ext/transport/chttp2/transport/bin_encoder.h', 'src/core/ext/transport/chttp2/transport/chttp2_transport.h', 'src/core/ext/transport/chttp2/transport/frame.h', @@ -659,15 +703,25 @@ Pod::Spec.new do |s| 'src/core/ext/transport/chttp2/transport/timeout_encoding.h', 'src/core/ext/transport/chttp2/transport/varint.h', 'src/core/ext/transport/chttp2/alpn/alpn.h', - 'src/core/lib/security/auth_filters.h', - 'src/core/lib/security/b64.h', - 'src/core/lib/security/credentials.h', - 'src/core/lib/security/handshake.h', - 'src/core/lib/security/json_token.h', - 'src/core/lib/security/jwt_verifier.h', - 'src/core/lib/security/secure_endpoint.h', - 'src/core/lib/security/security_connector.h', - 'src/core/lib/security/security_context.h', + 'src/core/lib/security/context/security_context.h', + 'src/core/lib/security/credentials/composite/composite_credentials.h', + 'src/core/lib/security/credentials/credentials.h', + 'src/core/lib/security/credentials/fake/fake_credentials.h', + 'src/core/lib/security/credentials/google_default/google_default_credentials.h', + 'src/core/lib/security/credentials/iam/iam_credentials.h', + 'src/core/lib/security/credentials/jwt/json_token.h', + 'src/core/lib/security/credentials/jwt/jwt_credentials.h', + 'src/core/lib/security/credentials/jwt/jwt_verifier.h', + 'src/core/lib/security/credentials/oauth2/oauth2_credentials.h', + 'src/core/lib/security/credentials/plugin/plugin_credentials.h', + 'src/core/lib/security/credentials/ssl/ssl_credentials.h', + 'src/core/lib/security/transport/auth_filters.h', + 'src/core/lib/security/transport/handshake.h', + 'src/core/lib/security/transport/secure_endpoint.h', + 'src/core/lib/security/transport/security_connector.h', + 'src/core/lib/security/transport/tsi_error.h', + 'src/core/lib/security/util/b64.h', + 'src/core/lib/security/util/json_util.h', 'src/core/lib/tsi/fake_transport_security.h', 'src/core/lib/tsi/ssl_transport_security.h', 'src/core/lib/tsi/ssl_types.h', @@ -690,14 +744,17 @@ Pod::Spec.new do |s| 'src/core/ext/client_config/subchannel_index.h', 'src/core/ext/client_config/uri_parser.h', 'src/core/ext/lb_policy/grpclb/load_balancer_api.h', - 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v0/load_balancer.pb.h', + 'src/core/ext/lb_policy/grpclb/proto/grpc/lb/v1/load_balancer.pb.h', 'third_party/nanopb/pb.h', 'third_party/nanopb/pb_common.h', 'third_party/nanopb/pb_decode.h', 'third_party/nanopb/pb_encode.h', + 'src/core/ext/load_reporting/load_reporting.h', + 'src/core/ext/load_reporting/load_reporting_filter.h', 'src/core/ext/census/aggregation.h', 'src/core/ext/census/census_interface.h', 'src/core/ext/census/census_rpc_stats.h', + 'src/core/ext/census/gen/census.pb.h', 'src/core/ext/census/grpc_filter.h', 'src/core/ext/census/mlog.h', 'src/core/ext/census/rpc_metric_id.h' From fa51de5d3dcd030de2d462130aa74ad83a01e16a Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Thu, 30 Jun 2016 23:50:48 -0700 Subject: [PATCH 1438/1894] Change port_server.py to use port 32766 32767 is used by filenet-powsrm --- tools/run_tests/port_server.py | 4 ++-- tools/run_tests/run_tests.py | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/tools/run_tests/port_server.py b/tools/run_tests/port_server.py index 14e82b601ea..e2be26d182c 100755 --- a/tools/run_tests/port_server.py +++ b/tools/run_tests/port_server.py @@ -42,7 +42,7 @@ import time # increment this number whenever making a change to ensure that # the changes are picked up by running CI servers # note that all changes must be backwards compatible -_MY_VERSION = 7 +_MY_VERSION = 8 if len(sys.argv) == 2 and sys.argv[1] == 'dump_version': @@ -70,7 +70,7 @@ in_use = {} def refill_pool(max_timeout, req): """Scan for ports not marked for being in use""" - for i in range(1025, 32767): + for i in range(1025, 32766): if len(pool) > 100: break if i in in_use: age = time.time() - in_use[i] diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index c1254275e6c..413d4145601 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -1050,7 +1050,23 @@ runs_per_test = args.runs_per_test forever = args.forever +def _shut_down_legacy_server(legacy_server_port): + try: + version = int(urllib2.urlopen( + 'http://localhost:%d/version_number' % legacy_server_port, + timeout=10).read()) + except: + pass + else: + urllib2.urlopen( + 'http://localhost:%d/quitquitquit' % legacy_server_port).read() + + def _start_port_server(port_server_port): + # Temporary patch to switch the port_server port + # see https://github.com/grpc/grpc/issues/7145 + _shut_down_legacy_server(32767) + # check if a compatible port server is running # if incompatible (version mismatch) ==> start a new one # if not running ==> start a new one @@ -1186,7 +1202,7 @@ def _build_and_run( # start antagonists antagonists = [subprocess.Popen(['tools/run_tests/antagonist.py']) for _ in range(0, args.antagonists)] - port_server_port = 32767 + port_server_port = 32766 _start_port_server(port_server_port) resultset = None num_test_failures = 0 From ce14c30460394336c42b8304ad2fd3e0d775d61f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 1 Jul 2016 09:06:38 -0700 Subject: [PATCH 1439/1894] Fix race in network status monitor --- src/core/lib/iomgr/network_status_tracker.c | 27 +++++++++------------ 1 file changed, 12 insertions(+), 15 deletions(-) diff --git a/src/core/lib/iomgr/network_status_tracker.c b/src/core/lib/iomgr/network_status_tracker.c index 38a1c9b7d41..d3f0ea53f87 100644 --- a/src/core/lib/iomgr/network_status_tracker.c +++ b/src/core/lib/iomgr/network_status_tracker.c @@ -42,27 +42,24 @@ typedef struct endpoint_ll_node { static endpoint_ll_node *head = NULL; static gpr_mu g_endpoint_mutex; -static bool g_init_done = false; +static gpr_once g_once_init = GPR_ONCE_INIT; -void grpc_initialize_network_status_monitor() { - g_init_done = true; - gpr_mu_init(&g_endpoint_mutex); - // TODO(makarandd): Install callback with OS to monitor network status. -} - -void grpc_destroy_network_status_monitor() { - for (endpoint_ll_node *curr = head; curr != NULL;) { - endpoint_ll_node *next = curr->next; - gpr_free(curr); - curr = next; +static void destroy_network_status_monitor() { + if (head != NULL) { + gpr_log(GPR_ERROR, + "Memory leaked as all network endpoints were not shut down"); } gpr_mu_destroy(&g_endpoint_mutex); } +static void initialize_network_status_monitor() { + gpr_mu_init(&g_endpoint_mutex); + atexit(destroy_network_status_monitor); + // TODO(makarandd): Install callback with OS to monitor network status. +} + void grpc_network_status_register_endpoint(grpc_endpoint *ep) { - if (!g_init_done) { - grpc_initialize_network_status_monitor(); - } + gpr_once_init(&g_once_init, initialize_network_status_monitor); gpr_mu_lock(&g_endpoint_mutex); if (head == NULL) { head = (endpoint_ll_node *)gpr_malloc(sizeof(endpoint_ll_node)); From 356758a7eec71b3abf4336bd0665476e7756fd2f Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 1 Jul 2016 09:56:50 -0700 Subject: [PATCH 1440/1894] Split Node health check code into a separate package and make it use static codegen --- package.json | 1 - src/node/health_check/health.js | 18 +++--- src/node/test/health_test.js | 60 +++++++++++-------- templates/package.json.template | 1 - .../node/health_check/package.json.template | 31 ++++++++++ 5 files changed, 76 insertions(+), 35 deletions(-) create mode 100644 templates/src/node/health_check/package.json.template diff --git a/package.json b/package.json index 68a31d794c5..1fec9cb40f8 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,6 @@ "files": [ "LICENSE", "src/node/README.md", - "src/node/health_check", "src/proto", "etc", "src/node/index.js", diff --git a/src/node/health_check/health.js b/src/node/health_check/health.js index 52366830881..64ba9fb9601 100644 --- a/src/node/health_check/health.js +++ b/src/node/health_check/health.js @@ -33,14 +33,12 @@ 'use strict'; -var grpc = require('../'); +var grpc = require('grpc'); var _ = require('lodash'); -var health_proto = grpc.load(__dirname + - '/../../proto/grpc/health/v1/health.proto'); - -var HealthClient = health_proto.grpc.health.v1.Health; +var health_messages = require('./v1/health_pb'); +var health_service = require('./v1/health_grpc_pb'); function HealthImplementation(statusMap) { this.statusMap = _.clone(statusMap); @@ -51,17 +49,19 @@ HealthImplementation.prototype.setStatus = function(service, status) { }; HealthImplementation.prototype.check = function(call, callback){ - var service = call.request.service; + var service = call.request.getService(); var status = _.get(this.statusMap, service, null); if (status === null) { callback({code:grpc.status.NOT_FOUND}); } else { - callback(null, {status: status}); + var response = new health_messages.HealthCheckResponse(); + response.setStatus(status); + callback(null, response); } }; module.exports = { - Client: HealthClient, - service: HealthClient.service, + Client: health_service.HealthClient, + service: health_service.HealthService, Implementation: HealthImplementation }; diff --git a/src/node/test/health_test.js b/src/node/test/health_test.js index c93b528d42f..efbca46c2dc 100644 --- a/src/node/test/health_test.js +++ b/src/node/test/health_test.js @@ -35,15 +35,19 @@ var assert = require('assert'); -var health = require('../health_check/health.js'); +var health = require('../health_check/health'); + +var health_messages = require('../health_check/v1/health_pb'); + +var ServingStatus = health_messages.HealthCheckResponse.ServingStatus; var grpc = require('../'); describe('Health Checking', function() { var statusMap = { - '': 'SERVING', - 'grpc.test.TestServiceNotServing': 'NOT_SERVING', - 'grpc.test.TestServiceServing': 'SERVING' + '': ServingStatus.SERVING, + 'grpc.test.TestServiceNotServing': ServingStatus.NOT_SERVING, + 'grpc.test.TestServiceServing': ServingStatus.SERVING }; var healthServer; var healthImpl; @@ -51,7 +55,7 @@ describe('Health Checking', function() { before(function() { healthServer = new grpc.Server(); healthImpl = new health.Implementation(statusMap); - healthServer.addProtoService(health.service, healthImpl); + healthServer.addService(health.service, healthImpl); var port_num = healthServer.bind('0.0.0.0:0', grpc.ServerCredentials.createInsecure()); healthServer.start(); @@ -62,43 +66,51 @@ describe('Health Checking', function() { healthServer.forceShutdown(); }); it('should say an enabled service is SERVING', function(done) { - healthClient.check({service: ''}, function(err, response) { + var request = new health_messages.HealthCheckRequest(); + request.setService(''); + healthClient.check(request, function(err, response) { assert.ifError(err); - assert.strictEqual(response.status, 'SERVING'); + assert.strictEqual(response.getStatus(), ServingStatus.SERVING); done(); }); }); it('should say that a disabled service is NOT_SERVING', function(done) { - healthClient.check({service: 'grpc.test.TestServiceNotServing'}, - function(err, response) { - assert.ifError(err); - assert.strictEqual(response.status, 'NOT_SERVING'); - done(); - }); + var request = new health_messages.HealthCheckRequest(); + request.setService('grpc.test.TestServiceNotServing'); + healthClient.check(request, function(err, response) { + assert.ifError(err); + assert.strictEqual(response.getStatus(), ServingStatus.NOT_SERVING); + done(); + }); }); it('should say that an enabled service is SERVING', function(done) { - healthClient.check({service: 'grpc.test.TestServiceServing'}, - function(err, response) { - assert.ifError(err); - assert.strictEqual(response.status, 'SERVING'); - done(); - }); + var request = new health_messages.HealthCheckRequest(); + request.setService('grpc.test.TestServiceServing'); + healthClient.check(request, function(err, response) { + assert.ifError(err); + assert.strictEqual(response.getStatus(), ServingStatus.SERVING); + done(); + }); }); it('should get NOT_FOUND if the service is not registered', function(done) { - healthClient.check({service: 'not_registered'}, function(err, response) { + var request = new health_messages.HealthCheckRequest(); + request.setService('not_registered'); + healthClient.check(request, function(err, response) { assert(err); assert.strictEqual(err.code, grpc.status.NOT_FOUND); done(); }); }); it('should get a different response if the status changes', function(done) { - healthClient.check({service: 'transient'}, function(err, response) { + var request = new health_messages.HealthCheckRequest(); + request.setService('transient'); + healthClient.check(request, function(err, response) { assert(err); assert.strictEqual(err.code, grpc.status.NOT_FOUND); - healthImpl.setStatus('transient', 'SERVING'); - healthClient.check({service: 'transient'}, function(err, response) { + healthImpl.setStatus('transient', ServingStatus.SERVING); + healthClient.check(request, function(err, response) { assert.ifError(err); - assert.strictEqual(response.status, 'SERVING'); + assert.strictEqual(response.getStatus(), ServingStatus.SERVING); done(); }); }); diff --git a/templates/package.json.template b/templates/package.json.template index 9d19ca06293..f68f64d0475 100644 --- a/templates/package.json.template +++ b/templates/package.json.template @@ -61,7 +61,6 @@ "files": [ "LICENSE", "src/node/README.md", - "src/node/health_check", "src/proto", "etc", "src/node/index.js", diff --git a/templates/src/node/health_check/package.json.template b/templates/src/node/health_check/package.json.template new file mode 100644 index 00000000000..1248ced1e16 --- /dev/null +++ b/templates/src/node/health_check/package.json.template @@ -0,0 +1,31 @@ +%YAML 1.2 +--- | + { + "name": "grpc-health-check", + "version": "${settings.node_version}", + "author": "Google Inc.", + "description": "Health check service for use with gRPC", + "repository": { + "type": "git", + "url": "https://github.com/grpc/grpc.git" + }, + "bugs": "https://github.com/grpc/grpc/issues", + "contributors": [ + { + "name": "Michael Lumish", + "email": "mlumish@google.com" + } + ], + "dependencies": { + "grpc": "^0.15.0", + "lodash": "^3.9.3", + "google-protobuf": "^3.0.0-alpha.5" + }, + "files": { + "LICENSE", + "health.js", + "v1" + }, + "main": "src/node/index.js", + "license": "BSD-3-Clause" + } From c9579be13f56f889caaf8e910a374a9ba428da93 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 1 Jul 2016 10:02:32 -0700 Subject: [PATCH 1441/1894] Add Node health check package.json --- src/node/health_check/package.json | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/node/health_check/package.json diff --git a/src/node/health_check/package.json b/src/node/health_check/package.json new file mode 100644 index 00000000000..ad65b319177 --- /dev/null +++ b/src/node/health_check/package.json @@ -0,0 +1,29 @@ +{ + "name": "grpc-health-check", + "version": "0.16.0-dev", + "author": "Google Inc.", + "description": "Health check service for use with gRPC", + "repository": { + "type": "git", + "url": "https://github.com/grpc/grpc.git" + }, + "bugs": "https://github.com/grpc/grpc/issues", + "contributors": [ + { + "name": "Michael Lumish", + "email": "mlumish@google.com" + } + ], + "dependencies": { + "grpc": "^0.15.0", + "lodash": "^3.9.3", + "google-protobuf": "^3.0.0-alpha.5" + }, + "files": { + "LICENSE", + "health.js", + "v1" + }, + "main": "src/node/index.js", + "license": "BSD-3-Clause" +} From bb160258407289e9ab0dbb60c7d369c801bb3311 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Fri, 1 Jul 2016 10:09:16 -0700 Subject: [PATCH 1442/1894] Merge fixup: version, deployment target & spec name --- gRPC.podspec | 2 +- src/objective-c/CronetFramework.podspec | 2 +- src/objective-c/tests/Podfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/gRPC.podspec b/gRPC.podspec index f5744cdac55..e5556cc5448 100644 --- a/gRPC.podspec +++ b/gRPC.podspec @@ -36,7 +36,7 @@ Pod::Spec.new do |s| s.name = 'gRPC' - version = '0.12.0' + version = '0.14.0' s.version = version s.summary = 'gRPC client library for iOS/OSX' s.homepage = 'http://www.grpc.io' diff --git a/src/objective-c/CronetFramework.podspec b/src/objective-c/CronetFramework.podspec index 20af7647f70..3ebcacf0554 100644 --- a/src/objective-c/CronetFramework.podspec +++ b/src/objective-c/CronetFramework.podspec @@ -36,7 +36,7 @@ Pod::Spec.new do |s| s.license = { :type => 'BSD' } s.vendored_framework = "Cronet.framework" s.author = "The Chromium Authors" - s.ios.deployment_target = "8.0" + s.ios.deployment_target = "7.1" s.source = { :http => 'https://storage.googleapis.com/grpc-precompiled-binaries/cronet/Cronet.framework.zip' } s.preserve_paths = "Cronet.framework" s.public_header_files = "Cronet.framework/Headers/**/*{.h}" diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile index 64b0009eb15..30a34260d40 100644 --- a/src/objective-c/tests/Podfile +++ b/src/objective-c/tests/Podfile @@ -63,7 +63,7 @@ post_install do |installer| target.build_configurations.each do |config| config.build_settings['GCC_TREAT_WARNINGS_AS_ERRORS'] = 'YES' end - if target.name == 'gRPC' + if target.name == 'gRPC-Core' target.build_configurations.each do |config| # TODO(zyc) Remove this setting after the issue is resolved # GPR_UNREACHABLE_CODE causes "Control may reach end of non-void From d5fee35f932c5aa3234d0aafaaf1e7ac7af82f3e Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Wed, 29 Jun 2016 11:14:53 -0700 Subject: [PATCH 1443/1894] Build Python3 grpcio-tools on OS X --- tools/distrib/python/grpcio_tools/setup.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py index fbe69f43d56..f9cb0534d54 100644 --- a/tools/distrib/python/grpcio_tools/setup.py +++ b/tools/distrib/python/grpcio_tools/setup.py @@ -31,9 +31,11 @@ from distutils import extension import errno import os import os.path +import pkg_resources import shlex import shutil import sys +import sysconfig import setuptools from setuptools.command import build_ext @@ -43,6 +45,8 @@ from setuptools.command import build_ext os.chdir(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, os.path.abspath('.')) +PY3 = sys.version_info.major == 3 + # There are some situations (like on Windows) where CC, CFLAGS, and LDFLAGS are # entirely ignored/dropped/forgotten by distutils and its Cygwin/MinGW support. # We use these environment variables to thus get around that without locking @@ -59,6 +63,15 @@ GRPC_PYTHON_PROTO_RESOURCES_NAME = '_proto' import protoc_lib_deps import grpc_version +# By default, Python3 distutils enforces compatibility of +# c plugins (.so files) with the OSX version Python3 was built with. +# For Python3.4, this is OSX 10.6, but we need Thread Local Support (__thread) +if 'darwin' in sys.platform and PY3: + mac_target = sysconfig.get_config_var('MACOSX_DEPLOYMENT_TARGET') + if mac_target and (pkg_resources.parse_version(mac_target) < + pkg_resources.parse_version('10.9.0')): + os.environ['MACOSX_DEPLOYMENT_TARGET'] = '10.9' + def package_data(): tools_path = GRPC_PYTHON_TOOLS_PACKAGE.replace('.', os.path.sep) proto_resources_path = os.path.join(tools_path, From ebf81e7a0540a01079ac03661426cd3771664de7 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Wed, 1 Jun 2016 15:57:20 -0700 Subject: [PATCH 1444/1894] Add programmatic access to protoc in grpcio-tools --- ...otoc_compiler.pyx => _protoc_compiler.pyx} | 0 .../python/grpcio_tools/grpc/tools/command.py | 70 +++++++++++++++++++ .../python/grpcio_tools/grpc/tools/protoc.py | 13 +++- tools/distrib/python/grpcio_tools/setup.py | 4 +- 4 files changed, 82 insertions(+), 5 deletions(-) rename tools/distrib/python/grpcio_tools/grpc/tools/{protoc_compiler.pyx => _protoc_compiler.pyx} (100%) create mode 100644 tools/distrib/python/grpcio_tools/grpc/tools/command.py diff --git a/tools/distrib/python/grpcio_tools/grpc/tools/protoc_compiler.pyx b/tools/distrib/python/grpcio_tools/grpc/tools/_protoc_compiler.pyx similarity index 100% rename from tools/distrib/python/grpcio_tools/grpc/tools/protoc_compiler.pyx rename to tools/distrib/python/grpcio_tools/grpc/tools/_protoc_compiler.pyx diff --git a/tools/distrib/python/grpcio_tools/grpc/tools/command.py b/tools/distrib/python/grpcio_tools/grpc/tools/command.py new file mode 100644 index 00000000000..ccf38b7d569 --- /dev/null +++ b/tools/distrib/python/grpcio_tools/grpc/tools/command.py @@ -0,0 +1,70 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +import os +import sys + +import setuptools + +from grpc.tools import protoc + + +class BuildProtoModules(setuptools.Command): + """Command to generate project *_pb2.py modules from proto files.""" + + description = 'build grpc protobuf modules' + user_options = [] + + def initialize_options(self): + pass + + def finalize_options(self): + pass + + def run(self): + # due to limitations of the proto generator, we require that only *one* + # directory is provided as an 'include' directory. We assume it's the '' key + # to `self.distribution.package_dir` (and get a key error if it's not + # there). + proto_files = [] + inclusion_root = os.path.abspath(self.distribution.package_dir['']) + for root, _, files in os.walk(inclusion_root): + for filename in files: + if filename.endswith('.proto'): + proto_files.append(os.path.abspath(os.path.join(root, filename))) + + for proto_file in proto_files: + command = [ + 'grpc.tools.protoc', + '--proto_path={}'.format(inclusion_root), + '--python_out={}'.format(inclusion_root), + '--grpc_python_out={}'.format(inclusion_root), + ] + [proto_file] + if protoc.main(command) != 0: + sys.stderr.write('warning: {} failed'.format(command)) diff --git a/tools/distrib/python/grpcio_tools/grpc/tools/protoc.py b/tools/distrib/python/grpcio_tools/grpc/tools/protoc.py index 1c69e78920c..931fda27d26 100644 --- a/tools/distrib/python/grpcio_tools/grpc/tools/protoc.py +++ b/tools/distrib/python/grpcio_tools/grpc/tools/protoc.py @@ -32,10 +32,17 @@ import pkg_resources import sys -from grpc.tools import protoc_compiler +from grpc.tools import _protoc_compiler +def main(command_arguments): + """Run the protocol buffer compiler with the given command-line arguments. + + Args: + command_arguments: a list of strings representing command line arguments to + `protoc`. + """ + return _protoc_compiler.run_main(command_arguments) if __name__ == '__main__': proto_include = pkg_resources.resource_filename('grpc.tools', '_proto') - protoc_compiler.run_main( - sys.argv + ['-I{}'.format(proto_include)]) + sys.exit(main(sys.argv + ['-I{}'.format(proto_include)])) diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py index f9cb0534d54..afb6063906e 100644 --- a/tools/distrib/python/grpcio_tools/setup.py +++ b/tools/distrib/python/grpcio_tools/setup.py @@ -99,8 +99,8 @@ def protoc_ext_module(): os.path.join(protoc_lib_deps.CC_INCLUDE, cc_file) for cc_file in protoc_lib_deps.CC_FILES] plugin_ext = extension.Extension( - name='grpc.tools.protoc_compiler', - sources=['grpc/tools/protoc_compiler.pyx'] + plugin_sources, + name='grpc.tools._protoc_compiler', + sources=['grpc/tools/_protoc_compiler.pyx'] + plugin_sources, include_dirs=[ '.', 'grpc_root', From b926ef2fb7e10df1f45166296e9e3a8a44f7060f Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Fri, 3 Jun 2016 12:26:48 -0700 Subject: [PATCH 1445/1894] Ignore cython debug information --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index ca61bda124c..26d51236705 100644 --- a/.gitignore +++ b/.gitignore @@ -5,6 +5,7 @@ libs objs # Python items +cython_debug/ python_build/ .coverage* .eggs From 1ff429da2a94bc79300ebce3f8aae7efb10e9a75 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 2 Jun 2016 16:39:20 -0700 Subject: [PATCH 1446/1894] Organize Python tests to use grpcio-tools directly Moves all tests into a separate package. This does not change existing supported means of running tests (e.g. through run_tests.py). --- .gitignore | 2 + setup.py | 44 +--- src/python/grpcio/commands.py | 146 ----------- .../grpcio_health_checking/health_commands.py | 47 +--- src/python/grpcio_health_checking/setup.py | 34 ++- src/python/grpcio_tests/.gitignore | 4 + src/python/grpcio_tests/commands.py | 217 ++++++++++++++++ src/python/grpcio_tests/grpc_version.py | 32 +++ src/python/grpcio_tests/setup.py | 124 ++++++++++ .../tests/__init__.py | 0 .../{grpcio => grpcio_tests}/tests/_loader.py | 0 .../{grpcio => grpcio_tests}/tests/_result.py | 0 .../{grpcio => grpcio_tests}/tests/_runner.py | 0 .../tests/health_check/__init__.py | 0 .../health_check/_health_servicer_test.py | 0 .../tests/interop/__init__.py | 0 .../tests/interop/_insecure_interop_test.py | 0 .../tests/interop/_interop_test_case.py | 0 .../tests/interop/_secure_interop_test.py | 0 .../tests/interop/client.py | 0 .../tests/interop/credentials/README | 0 .../tests/interop/credentials/ca.pem | 0 .../tests/interop/credentials/server1.key | 0 .../tests/interop/credentials/server1.pem | 0 .../tests/interop/methods.py | 0 .../tests/interop/resources.py | 0 .../tests/interop/server.py | 0 .../tests/protoc_plugin/__init__.py | 0 .../protoc_plugin/_python_plugin_test.py | 232 ++++++----------- .../protoc_plugin/beta_python_plugin_test.py | 234 ++++++------------ .../tests/protoc_plugin/protos}/__init__.py | 0 .../protoc_plugin/protos/payload}/__init__.py | 0 .../protos/payload/test_payload.proto | 0 .../protos/requests}/__init__.py | 0 .../protos/requests/r}/__init__.py | 0 .../protos/requests/r/test_requests.proto | 2 +- .../protos/responses}/__init__.py | 0 .../protos/responses/test_responses.proto | 2 +- .../protoc_plugin/protos/service}/__init__.py | 0 .../protos/service/test_service.proto | 4 +- .../tests/qps/__init__.py | 0 .../tests/qps/benchmark_client.py | 0 .../tests/qps/benchmark_server.py | 0 .../tests/qps/client_runner.py | 0 .../tests/qps/histogram.py | 0 .../tests/qps/qps_worker.py | 0 .../tests/qps/worker_server.py | 0 .../tests/stress/__init__.py | 0 .../tests/stress/client.py | 0 .../tests/stress/metrics_server.py | 0 .../tests/stress/test_runner.py | 0 .../{grpcio => grpcio_tests}/tests/tests.json | 0 .../tests/unit}/__init__.py | 0 .../tests/unit/_adapter/.gitignore | 0 .../tests/unit/_adapter}/__init__.py | 0 .../tests/unit/_adapter/_proto_scenarios.py | 0 .../tests/unit/_api_test.py | 0 .../tests/unit/_auth_test.py | 0 .../tests/unit/_channel_connectivity_test.py | 0 .../tests/unit/_channel_ready_future_test.py | 0 .../tests/unit/_compression_test.py | 0 .../tests/unit/_cython/.gitignore | 0 .../tests/unit/_cython/__init__.py | 0 .../unit/_cython/_cancel_many_calls_test.py | 0 .../tests/unit/_cython/_channel_test.py | 0 .../_read_some_but_not_all_responses_test.py | 0 .../tests/unit/_cython/cygrpc_test.py | 0 .../tests/unit/_cython/test_utilities.py | 0 .../tests/unit/_empty_message_test.py | 0 .../tests/unit/_exit_scenarios.py | 0 .../tests/unit/_exit_test.py | 0 .../tests/unit/_from_grpc_import_star.py | 0 .../tests/unit/_junkdrawer}/__init__.py | 0 .../tests/unit/_junkdrawer/math_pb2.py | 0 .../tests/unit/_junkdrawer/stock_pb2.py | 0 .../tests/unit/_links}/__init__.py | 0 .../tests/unit/_links/_proto_scenarios.py | 0 .../tests/unit/_metadata_code_details_test.py | 0 .../tests/unit/_metadata_test.py | 0 .../tests/unit/_rpc_test.py | 0 .../tests/unit/_sanity/__init__.py | 0 .../tests/unit/_sanity/_sanity_test.py | 9 +- .../tests/unit/_thread_cleanup_test.py | 0 .../tests/unit/beta}/__init__.py | 0 .../tests/unit/beta/_beta_features_test.py | 0 .../unit/beta/_connectivity_channel_test.py | 0 .../tests/unit/beta/_face_interface_test.py | 0 .../tests/unit/beta/_implementations_test.py | 0 .../tests/unit/beta/_not_found_test.py | 0 .../tests/unit/beta/_utilities_test.py | 0 .../tests/unit/beta/test_utilities.py | 0 .../tests/unit/credentials/README | 0 .../tests/unit/credentials/ca.pem | 0 .../tests/unit/credentials/server1.key | 0 .../tests/unit/credentials/server1.pem | 0 .../tests/unit/framework}/__init__.py | 0 .../tests/unit/framework/common}/__init__.py | 0 .../unit/framework/common/test_constants.py | 0 .../unit/framework/common/test_control.py | 0 .../unit/framework/common/test_coverage.py | 0 .../tests/unit/framework/core/__init__.py | 30 +++ .../unit/framework/foundation/__init__.py | 30 +++ .../foundation/_logging_pool_test.py | 0 .../framework/foundation/stream_testing.py | 0 .../unit/framework/interfaces/__init__.py | 30 +++ .../framework/interfaces/base/__init__.py | 30 +++ .../framework/interfaces/base/_control.py | 0 .../framework/interfaces/base/_sequence.py | 0 .../unit/framework/interfaces/base/_state.py | 0 .../framework/interfaces/base/test_cases.py | 0 .../interfaces/base/test_interfaces.py | 0 .../interfaces/face/_3069_test_constant.py | 0 .../framework/interfaces/face/__init__.py | 30 +++ .../_blocking_invocation_inline_service.py | 0 .../unit/framework/interfaces/face/_digest.py | 0 ...e_invocation_asynchronous_event_service.py | 0 .../framework/interfaces/face/_invocation.py | 0 .../framework/interfaces/face/_receiver.py | 0 .../framework/interfaces/face/_service.py | 0 .../interfaces/face/_stock_service.py | 0 .../framework/interfaces/face/test_cases.py | 0 .../interfaces/face/test_interfaces.py | 0 .../framework/interfaces/links/__init__.py | 30 +++ .../framework/interfaces/links/test_cases.py | 0 .../interfaces/links/test_utilities.py | 0 .../tests/unit/resources.py | 0 .../tests/unit/test_common.py | 0 .../grpcio_tests/grpc_version.py.template | 34 +++ tools/distrib/python/grpcio_tools/.gitignore | 1 + tools/run_tests/build_python.sh | 37 +-- .../performance/run_worker_python.sh | 2 +- tools/run_tests/run_python.sh | 2 +- tools/run_tests/run_tests.py | 5 +- tox.ini | 4 +- 134 files changed, 787 insertions(+), 611 deletions(-) create mode 100644 src/python/grpcio_tests/.gitignore create mode 100644 src/python/grpcio_tests/commands.py create mode 100644 src/python/grpcio_tests/grpc_version.py create mode 100644 src/python/grpcio_tests/setup.py rename src/python/{grpcio => grpcio_tests}/tests/__init__.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/_loader.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/_result.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/_runner.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/health_check/__init__.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/health_check/_health_servicer_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/interop/__init__.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/interop/_insecure_interop_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/interop/_interop_test_case.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/interop/_secure_interop_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/interop/client.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/interop/credentials/README (100%) rename src/python/{grpcio => grpcio_tests}/tests/interop/credentials/ca.pem (100%) rename src/python/{grpcio => grpcio_tests}/tests/interop/credentials/server1.key (100%) rename src/python/{grpcio => grpcio_tests}/tests/interop/credentials/server1.pem (100%) rename src/python/{grpcio => grpcio_tests}/tests/interop/methods.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/interop/resources.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/interop/server.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/protoc_plugin/__init__.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/protoc_plugin/_python_plugin_test.py (67%) rename src/python/{grpcio => grpcio_tests}/tests/protoc_plugin/beta_python_plugin_test.py (64%) rename src/python/{grpcio/tests/unit => grpcio_tests/tests/protoc_plugin/protos}/__init__.py (100%) rename src/python/{grpcio/tests/unit/_adapter => grpcio_tests/tests/protoc_plugin/protos/payload}/__init__.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/protoc_plugin/protos/payload/test_payload.proto (100%) rename src/python/{grpcio/tests/unit/_junkdrawer => grpcio_tests/tests/protoc_plugin/protos/requests}/__init__.py (100%) rename src/python/{grpcio/tests/unit/_links => grpcio_tests/tests/protoc_plugin/protos/requests/r}/__init__.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/protoc_plugin/protos/requests/r/test_requests.proto (97%) rename src/python/{grpcio/tests/unit/beta => grpcio_tests/tests/protoc_plugin/protos/responses}/__init__.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/protoc_plugin/protos/responses/test_responses.proto (96%) rename src/python/{grpcio/tests/unit/framework => grpcio_tests/tests/protoc_plugin/protos/service}/__init__.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/protoc_plugin/protos/service/test_service.proto (95%) rename src/python/{grpcio => grpcio_tests}/tests/qps/__init__.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/qps/benchmark_client.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/qps/benchmark_server.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/qps/client_runner.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/qps/histogram.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/qps/qps_worker.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/qps/worker_server.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/stress/__init__.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/stress/client.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/stress/metrics_server.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/stress/test_runner.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/tests.json (100%) rename src/python/{grpcio/tests/unit/framework/common => grpcio_tests/tests/unit}/__init__.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_adapter/.gitignore (100%) rename src/python/{grpcio/tests/unit/framework/core => grpcio_tests/tests/unit/_adapter}/__init__.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_adapter/_proto_scenarios.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_api_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_auth_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_channel_connectivity_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_channel_ready_future_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_compression_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_cython/.gitignore (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_cython/__init__.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_cython/_cancel_many_calls_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_cython/_channel_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_cython/_read_some_but_not_all_responses_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_cython/cygrpc_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_cython/test_utilities.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_empty_message_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_exit_scenarios.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_exit_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_from_grpc_import_star.py (100%) rename src/python/{grpcio/tests/unit/framework/foundation => grpcio_tests/tests/unit/_junkdrawer}/__init__.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_junkdrawer/math_pb2.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_junkdrawer/stock_pb2.py (100%) rename src/python/{grpcio/tests/unit/framework/interfaces => grpcio_tests/tests/unit/_links}/__init__.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_links/_proto_scenarios.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_metadata_code_details_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_metadata_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_rpc_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_sanity/__init__.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_sanity/_sanity_test.py (90%) rename src/python/{grpcio => grpcio_tests}/tests/unit/_thread_cleanup_test.py (100%) rename src/python/{grpcio/tests/unit/framework/interfaces/base => grpcio_tests/tests/unit/beta}/__init__.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/beta/_beta_features_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/beta/_connectivity_channel_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/beta/_face_interface_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/beta/_implementations_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/beta/_not_found_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/beta/_utilities_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/beta/test_utilities.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/credentials/README (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/credentials/ca.pem (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/credentials/server1.key (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/credentials/server1.pem (100%) rename src/python/{grpcio/tests/unit/framework/interfaces/face => grpcio_tests/tests/unit/framework}/__init__.py (100%) rename src/python/{grpcio/tests/unit/framework/interfaces/links => grpcio_tests/tests/unit/framework/common}/__init__.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/common/test_constants.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/common/test_control.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/common/test_coverage.py (100%) create mode 100644 src/python/grpcio_tests/tests/unit/framework/core/__init__.py create mode 100644 src/python/grpcio_tests/tests/unit/framework/foundation/__init__.py rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/foundation/_logging_pool_test.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/foundation/stream_testing.py (100%) create mode 100644 src/python/grpcio_tests/tests/unit/framework/interfaces/__init__.py create mode 100644 src/python/grpcio_tests/tests/unit/framework/interfaces/base/__init__.py rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/interfaces/base/_control.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/interfaces/base/_sequence.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/interfaces/base/_state.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/interfaces/base/test_cases.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/interfaces/base/test_interfaces.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/interfaces/face/_3069_test_constant.py (100%) create mode 100644 src/python/grpcio_tests/tests/unit/framework/interfaces/face/__init__.py rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/interfaces/face/_blocking_invocation_inline_service.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/interfaces/face/_digest.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/interfaces/face/_invocation.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/interfaces/face/_receiver.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/interfaces/face/_service.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/interfaces/face/_stock_service.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/interfaces/face/test_cases.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/interfaces/face/test_interfaces.py (100%) create mode 100644 src/python/grpcio_tests/tests/unit/framework/interfaces/links/__init__.py rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/interfaces/links/test_cases.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/framework/interfaces/links/test_utilities.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/resources.py (100%) rename src/python/{grpcio => grpcio_tests}/tests/unit/test_common.py (100%) create mode 100644 templates/src/python/grpcio_tests/grpc_version.py.template diff --git a/.gitignore b/.gitignore index 26d51236705..d985a797949 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,8 @@ python_build/ htmlcov/ dist/ *.egg +py27/ +py34/ # Node installation output ^node_modules diff --git a/setup.py b/setup.py index c1341187cad..d9c46ba77a1 100644 --- a/setup.py +++ b/setup.py @@ -72,10 +72,6 @@ BUILD_WITH_CYTHON = os.environ.get('GRPC_PYTHON_BUILD_WITH_CYTHON', False) ENABLE_CYTHON_TRACING = os.environ.get( 'GRPC_PYTHON_ENABLE_CYTHON_TRACING', False) -# Environment variable to determine whether or not to include the test files in -# the installation. -INSTALL_TESTS = os.environ.get('GRPC_PYTHON_INSTALL_TESTS', False) - CYTHON_EXTENSION_PACKAGE_NAMES = () CYTHON_EXTENSION_MODULE_NAMES = ('grpc._cython.cygrpc',) @@ -183,13 +179,10 @@ SETUP_REQUIRES = INSTALL_REQUIRES + ( COMMAND_CLASS = { 'doc': commands.SphinxDocumentation, - 'build_proto_modules': commands.BuildProtoModules, 'build_project_metadata': commands.BuildProjectMetadata, 'build_py': commands.BuildPy, 'build_ext': commands.BuildExt, 'gather': commands.Gather, - 'run_interop': commands.RunInterop, - 'test_lite': commands.TestLite } # Ensure that package data is copied over before any commands have been run: @@ -200,32 +193,6 @@ except OSError: pass shutil.copyfile('etc/roots.pem', os.path.join(credentials_dir, 'roots.pem')) -TEST_PACKAGE_DATA = { - 'tests.interop': [ - 'credentials/ca.pem', - 'credentials/server1.key', - 'credentials/server1.pem', - ], - 'tests.protoc_plugin': [ - 'protoc_plugin_test.proto', - ], - 'tests.unit': [ - 'credentials/ca.pem', - 'credentials/server1.key', - 'credentials/server1.pem', - ], -} - -TESTS_REQUIRE = ( - 'oauth2client>=2.1.0', - 'protobuf>=3.0.0a3', - 'coverage>=4.0', -) + INSTALL_REQUIRES - -TEST_SUITE = 'tests' -TEST_LOADER = 'tests:Loader' -TEST_RUNNER = 'tests:Runner' - PACKAGE_DATA = { # Binaries that may or may not be present in the final installation, but are # mentioned here for completeness. @@ -235,12 +202,7 @@ PACKAGE_DATA = { '_windows/grpc_c.64.python', ], } -if INSTALL_TESTS: - PACKAGE_DATA = dict(PACKAGE_DATA, **TEST_PACKAGE_DATA) - PACKAGES = setuptools.find_packages(PYTHON_STEM) -else: - PACKAGES = setuptools.find_packages( - PYTHON_STEM, exclude=['tests', 'tests.*']) +PACKAGES = setuptools.find_packages(PYTHON_STEM) setuptools.setup( name='grpcio', @@ -253,8 +215,4 @@ setuptools.setup( install_requires=INSTALL_REQUIRES, setup_requires=SETUP_REQUIRES, cmdclass=COMMAND_CLASS, - tests_require=TESTS_REQUIRE, - test_suite=TEST_SUITE, - test_loader=TEST_LOADER, - test_runner=TEST_RUNNER, ) diff --git a/src/python/grpcio/commands.py b/src/python/grpcio/commands.py index f498ed41901..3f91954d5f0 100644 --- a/src/python/grpcio/commands.py +++ b/src/python/grpcio/commands.py @@ -134,75 +134,6 @@ class SphinxDocumentation(setuptools.Command): sphinx.main(['', os.path.join('doc', 'src'), os.path.join('doc', 'build')]) -class BuildProtoModules(setuptools.Command): - """Command to generate project *_pb2.py modules from proto files.""" - - description = 'build protobuf modules' - user_options = [ - ('include=', None, 'path patterns to include in protobuf generation'), - ('exclude=', None, 'path patterns to exclude from protobuf generation') - ] - - def initialize_options(self): - self.exclude = None - self.include = r'.*\.proto$' - self.protoc_command = None - self.grpc_python_plugin_command = None - - def finalize_options(self): - self.protoc_command = distutils.spawn.find_executable('protoc') - self.grpc_python_plugin_command = distutils.spawn.find_executable( - 'grpc_python_plugin') - - def run(self): - if not self.protoc_command: - raise CommandError('could not find protoc') - if not self.grpc_python_plugin_command: - raise CommandError('could not find grpc_python_plugin ' - '(protoc plugin for GRPC Python)') - - if not os.path.exists(PROTO_GEN_STEM): - os.makedirs(PROTO_GEN_STEM) - - include_regex = re.compile(self.include) - exclude_regex = re.compile(self.exclude) if self.exclude else None - paths = [] - for walk_root, directories, filenames in os.walk(PROTO_STEM): - for filename in filenames: - path = os.path.join(walk_root, filename) - if include_regex.match(path) and not ( - exclude_regex and exclude_regex.match(path)): - paths.append(path) - - # TODO(kpayson): It would be nice to do this in a batch command, - # but we currently have name conflicts in src/proto - for path in paths: - command = [ - self.protoc_command, - '--plugin=protoc-gen-python-grpc={}'.format( - self.grpc_python_plugin_command), - '-I {}'.format(GRPC_STEM), - '-I .', - '-I {}/third_party/protobuf/src'.format(GRPC_STEM), - '--python_out={}'.format(PROTO_GEN_STEM), - '--python-grpc_out={}'.format(PROTO_GEN_STEM), - ] + [path] - try: - subprocess.check_output(' '.join(command), cwd=PYTHON_STEM, shell=True, - stderr=subprocess.STDOUT) - except subprocess.CalledProcessError as e: - sys.stderr.write( - 'warning: Command:\n{}\nMessage:\n{}\nOutput:\n{}'.format( - command, str(e), e.output)) - - # Generated proto directories dont include __init__.py, but - # these are needed for python package resolution - for walk_root, _, _ in os.walk(PROTO_GEN_STEM): - if walk_root != PROTO_GEN_STEM: - path = os.path.join(walk_root, '__init__.py') - open(path, 'a').close() - - class BuildProjectMetadata(setuptools.Command): """Command to generate project metadata in a module.""" @@ -225,10 +156,6 @@ class BuildPy(build_py.build_py): """Custom project build command.""" def run(self): - try: - self.run_command('build_proto_modules') - except CommandError as error: - sys.stderr.write('warning: %s\n' % error.message) self.run_command('build_project_metadata') build_py.build_py.run(self) @@ -281,76 +208,3 @@ class Gather(setuptools.Command): self.distribution.fetch_build_eggs(self.distribution.install_requires) if self.test and self.distribution.tests_require: self.distribution.fetch_build_eggs(self.distribution.tests_require) - - -class TestLite(setuptools.Command): - """Command to run tests without fetching or building anything.""" - - description = 'run tests without fetching or building anything.' - user_options = [] - - def initialize_options(self): - pass - - def finalize_options(self): - # distutils requires this override. - pass - - def run(self): - self._add_eggs_to_path() - - import tests - loader = tests.Loader() - loader.loadTestsFromNames(['tests']) - runner = tests.Runner() - result = runner.run(loader.suite) - if not result.wasSuccessful(): - sys.exit('Test failure') - - def _add_eggs_to_path(self): - """Fetch install and test requirements""" - self.distribution.fetch_build_eggs(self.distribution.install_requires) - self.distribution.fetch_build_eggs(self.distribution.tests_require) - - -class RunInterop(test.test): - - description = 'run interop test client/server' - user_options = [ - ('args=', 'a', 'pass-thru arguments for the client/server'), - ('client', 'c', 'flag indicating to run the client'), - ('server', 's', 'flag indicating to run the server') - ] - - def initialize_options(self): - self.args = '' - self.client = False - self.server = False - - def finalize_options(self): - if self.client and self.server: - raise DistutilsOptionError('you may only specify one of client or server') - - def run(self): - if self.distribution.install_requires: - self.distribution.fetch_build_eggs(self.distribution.install_requires) - if self.distribution.tests_require: - self.distribution.fetch_build_eggs(self.distribution.tests_require) - if self.client: - self.run_client() - elif self.server: - self.run_server() - - def run_server(self): - # We import here to ensure that our setuptools parent has had a chance to - # edit the Python system path. - from tests.interop import server - sys.argv[1:] = self.args.split() - server.serve() - - def run_client(self): - # We import here to ensure that our setuptools parent has had a chance to - # edit the Python system path. - from tests.interop import client - sys.argv[1:] = self.args.split() - client.test_interoperability() diff --git a/src/python/grpcio_health_checking/health_commands.py b/src/python/grpcio_health_checking/health_commands.py index 631066f3310..a7a59f6974b 100644 --- a/src/python/grpcio_health_checking/health_commands.py +++ b/src/python/grpcio_health_checking/health_commands.py @@ -39,51 +39,17 @@ import sys import setuptools from setuptools.command import build_py -from setuptools.command import sdist ROOT_DIR = os.path.abspath(os.path.dirname(os.path.abspath(__file__))) HEALTH_PROTO = os.path.join(ROOT_DIR, '../../proto/grpc/health/v1/health.proto') -class BuildProtoModules(setuptools.Command): - """Command to generate project *_pb2.py modules from proto files.""" +class CopyProtoModules(setuptools.Command): + """Command to copy proto modules from grpc/src/proto.""" description = '' user_options = [] - def initialize_options(self): - pass - - def finalize_options(self): - self.protoc_command = distutils.spawn.find_executable('protoc') - self.grpc_python_plugin_command = distutils.spawn.find_executable( - 'grpc_python_plugin') - - def run(self): - paths = [] - root_directory = os.getcwd() - for walk_root, directories, filenames in os.walk(root_directory): - for filename in filenames: - if filename.endswith('.proto'): - paths.append(os.path.join(walk_root, filename)) - command = [ - self.protoc_command, - '--plugin=protoc-gen-python-grpc={}'.format( - self.grpc_python_plugin_command), - '-I {}'.format(root_directory), - '--python_out={}'.format(root_directory), - '--python-grpc_out={}'.format(root_directory), - ] + paths - try: - subprocess.check_output(' '.join(command), cwd=root_directory, shell=True, - stderr=subprocess.STDOUT) - except subprocess.CalledProcessError as e: - raise Exception('{}\nOutput:\n{}'.format(e.message, e.output)) - - -class CopyProtoModules(setuptools.Command): - """Command to copy proto modules from grpc/src/proto.""" - def initialize_options(self): pass @@ -101,14 +67,5 @@ class BuildPy(build_py.build_py): """Custom project build command.""" def run(self): - self.run_command('copy_proto_modules') self.run_command('build_proto_modules') build_py.build_py.run(self) - - -class SDist(sdist.sdist): - """Custom project build command.""" - - def run(self): - self.run_command('copy_proto_modules') - sdist.sdist.run(self) diff --git a/src/python/grpcio_health_checking/setup.py b/src/python/grpcio_health_checking/setup.py index d68a7ced8ed..70b4575bf5d 100644 --- a/src/python/grpcio_health_checking/setup.py +++ b/src/python/grpcio_health_checking/setup.py @@ -36,36 +36,44 @@ import sys from distutils import core as _core import setuptools +import grpc.tools.command + # Ensure we're in the proper directory whether or not we're being used by pip. os.chdir(os.path.dirname(os.path.abspath(__file__))) # Break import-style to ensure we can actually find our commands module. import health_commands -_PACKAGES = ( +PACKAGES = ( setuptools.find_packages('.') ) -_PACKAGE_DIRECTORIES = { +PACKAGE_DIRECTORIES = { '': '.', } -_INSTALL_REQUIRES = ( +SETUP_REQUIRES = ( + 'grpcio-tools>=0.14.0', +) + +INSTALL_REQUIRES = ( 'grpcio>=0.13.1', ) -_COMMAND_CLASS = { - 'copy_proto_modules': health_commands.CopyProtoModules, - 'build_proto_modules': health_commands.BuildProtoModules, +COMMAND_CLASS = { + # Run preprocess from the repository *before* doing any packaging! + 'preprocess': health_commands.CopyProtoModules, + + 'build_proto_modules': grpc.tools.command.BuildProtoModules, 'build_py': health_commands.BuildPy, - 'sdist': health_commands.SDist, } setuptools.setup( - name='grpcio_health_checking', - version='0.14.0b0', - packages=list(_PACKAGES), - package_dir=_PACKAGE_DIRECTORIES, - install_requires=_INSTALL_REQUIRES, - cmdclass=_COMMAND_CLASS + name='grpcio-health-checking', + version='0.14.0', + packages=list(PACKAGES), + package_dir=PACKAGE_DIRECTORIES, + install_requires=INSTALL_REQUIRES, + setup_requires=SETUP_REQUIRES, + cmdclass=COMMAND_CLASS ) diff --git a/src/python/grpcio_tests/.gitignore b/src/python/grpcio_tests/.gitignore new file mode 100644 index 00000000000..fc620135dc7 --- /dev/null +++ b/src/python/grpcio_tests/.gitignore @@ -0,0 +1,4 @@ +proto/ +src/ +*_pb2.py +*.egg-info/ diff --git a/src/python/grpcio_tests/commands.py b/src/python/grpcio_tests/commands.py new file mode 100644 index 00000000000..171829b62fc --- /dev/null +++ b/src/python/grpcio_tests/commands.py @@ -0,0 +1,217 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""Provides distutils command classes for the gRPC Python setup process.""" + +import distutils +import glob +import os +import os.path +import platform +import re +import shutil +import subprocess +import sys +import traceback + +import setuptools +from setuptools.command import build_ext +from setuptools.command import build_py +from setuptools.command import easy_install +from setuptools.command import install +from setuptools.command import test + +PYTHON_STEM = os.path.dirname(os.path.abspath(__file__)) +GRPC_STEM = os.path.abspath(PYTHON_STEM + '../../../../') +GRPC_PROTO_STEM = os.path.join(GRPC_STEM, 'src', 'proto') +PROTO_STEM = os.path.join(PYTHON_STEM, 'src', 'proto') +PYTHON_PROTO_TOP_LEVEL = os.path.join(PYTHON_STEM, 'src') + + +class CommandError(object): + pass + + +class GatherProto(setuptools.Command): + + description = 'gather proto dependencies' + user_options = [] + + def initialize_options(self): + pass + + def finalize_options(self): + pass + + def run(self): + # TODO(atash) ensure that we're running from the repository directory when + # this command is used + try: + shutil.rmtree(PROTO_STEM) + except Exception as error: + # We don't care if this command fails + pass + shutil.copytree(GRPC_PROTO_STEM, PROTO_STEM) + for root, _, _ in os.walk(PYTHON_PROTO_TOP_LEVEL): + path = os.path.join(root, '__init__.py') + open(path, 'a').close() + + +class BuildProtoModules(setuptools.Command): + """Command to generate project *_pb2.py modules from proto files.""" + + description = 'build protobuf modules' + user_options = [ + ('include=', None, 'path patterns to include in protobuf generation'), + ('exclude=', None, 'path patterns to exclude from protobuf generation') + ] + + def initialize_options(self): + self.exclude = None + self.include = r'.*\.proto$' + + def finalize_options(self): + pass + + def run(self): + import grpc.tools.protoc as protoc + + include_regex = re.compile(self.include) + exclude_regex = re.compile(self.exclude) if self.exclude else None + paths = [] + for walk_root, directories, filenames in os.walk(PROTO_STEM): + for filename in filenames: + path = os.path.join(walk_root, filename) + if include_regex.match(path) and not ( + exclude_regex and exclude_regex.match(path)): + paths.append(path) + + # TODO(kpayson): It would be nice to do this in a batch command, + # but we currently have name conflicts in src/proto + for path in paths: + command = [ + 'grpc.tools.protoc', + '-I {}'.format(PROTO_STEM), + '--python_out={}'.format(PROTO_STEM), + '--grpc_python_out={}'.format(PROTO_STEM), + ] + [path] + if protoc.main(command) != 0: + sys.stderr.write( + 'warning: Command:\n{}\nFailed'.format( + command)) + + # Generated proto directories dont include __init__.py, but + # these are needed for python package resolution + for walk_root, _, _ in os.walk(PROTO_STEM): + path = os.path.join(walk_root, '__init__.py') + open(path, 'a').close() + + +class BuildPy(build_py.build_py): + """Custom project build command.""" + + def run(self): + try: + self.run_command('build_proto_modules') + except CommandError as error: + sys.stderr.write('warning: %s\n' % error.message) + build_py.build_py.run(self) + + +class TestLite(setuptools.Command): + """Command to run tests without fetching or building anything.""" + + description = 'run tests without fetching or building anything.' + user_options = [] + + def initialize_options(self): + pass + + def finalize_options(self): + # distutils requires this override. + pass + + def run(self): + self._add_eggs_to_path() + + import tests + loader = tests.Loader() + loader.loadTestsFromNames(['tests']) + runner = tests.Runner() + result = runner.run(loader.suite) + if not result.wasSuccessful(): + sys.exit('Test failure') + + def _add_eggs_to_path(self): + """Fetch install and test requirements""" + self.distribution.fetch_build_eggs(self.distribution.install_requires) + self.distribution.fetch_build_eggs(self.distribution.tests_require) + + +class RunInterop(test.test): + + description = 'run interop test client/server' + user_options = [ + ('args=', 'a', 'pass-thru arguments for the client/server'), + ('client', 'c', 'flag indicating to run the client'), + ('server', 's', 'flag indicating to run the server') + ] + + def initialize_options(self): + self.args = '' + self.client = False + self.server = False + + def finalize_options(self): + if self.client and self.server: + raise DistutilsOptionError('you may only specify one of client or server') + + def run(self): + if self.distribution.install_requires: + self.distribution.fetch_build_eggs(self.distribution.install_requires) + if self.distribution.tests_require: + self.distribution.fetch_build_eggs(self.distribution.tests_require) + if self.client: + self.run_client() + elif self.server: + self.run_server() + + def run_server(self): + # We import here to ensure that our setuptools parent has had a chance to + # edit the Python system path. + from tests.interop import server + sys.argv[1:] = self.args.split() + server.serve() + + def run_client(self): + # We import here to ensure that our setuptools parent has had a chance to + # edit the Python system path. + from tests.interop import client + sys.argv[1:] = self.args.split() + client.test_interoperability() diff --git a/src/python/grpcio_tests/grpc_version.py b/src/python/grpcio_tests/grpc_version.py new file mode 100644 index 00000000000..478b5d62d6a --- /dev/null +++ b/src/python/grpcio_tests/grpc_version.py @@ -0,0 +1,32 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_tests/grpc_version.py.template`!!! + +VERSION='0.15.0.dev0' diff --git a/src/python/grpcio_tests/setup.py b/src/python/grpcio_tests/setup.py new file mode 100644 index 00000000000..7eef420bdb0 --- /dev/null +++ b/src/python/grpcio_tests/setup.py @@ -0,0 +1,124 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""A setup module for the gRPC Python package.""" + +import os +import os.path +import shutil +import sys + +from distutils import core as _core +from distutils import extension as _extension +import setuptools +from setuptools.command import egg_info + +import grpc.tools.command + +PY3 = sys.version_info.major == 3 + +# Ensure we're in the proper directory whether or not we're being used by pip. +os.chdir(os.path.dirname(os.path.abspath(__file__))) + +# Break import-style to ensure we can actually find our in-repo dependencies. +import commands +import grpc_version + +LICENSE = '3-clause BSD' + +PACKAGE_DIRECTORIES = { + '': '.', +} + +INSTALL_REQUIRES = ( + 'coverage>=4.0', + 'enum34>=1.0.4', + 'futures>=2.2.0', + 'grpcio>=0.14.0', + 'grpcio-health-checking>=0.14.0', + 'oauth2client>=1.4.7', + 'protobuf>=3.0.0a3', + 'six>=1.10', +) + +SETUP_REQUIRES = ( + 'grpcio-tools>=0.14.0', +) + +COMMAND_CLASS = { + # Run `preprocess` *before* doing any packaging! + 'preprocess': commands.GatherProto, + + 'build_proto_modules': grpc.tools.command.BuildProtoModules, + 'build_py': commands.BuildPy, + 'run_interop': commands.RunInterop, + 'test_lite': commands.TestLite +} + +PACKAGE_DATA = { + 'tests.interop': [ + 'credentials/ca.pem', + 'credentials/server1.key', + 'credentials/server1.pem', + ], + 'tests.protoc_plugin': [ + 'protoc_plugin_test.proto', + ], + 'tests.unit': [ + 'credentials/ca.pem', + 'credentials/server1.key', + 'credentials/server1.pem', + ], + 'tests': [ + 'tests.json' + ], +} + +TEST_SUITE = 'tests' +TEST_LOADER = 'tests:Loader' +TEST_RUNNER = 'tests:Runner' +TESTS_REQUIRE = INSTALL_REQUIRES + +PACKAGES = setuptools.find_packages('.') + +setuptools.setup( + name='grpcio-tests', + version=grpc_version.VERSION, + license=LICENSE, + packages=list(PACKAGES), + package_dir=PACKAGE_DIRECTORIES, + package_data=PACKAGE_DATA, + install_requires=INSTALL_REQUIRES, + setup_requires=SETUP_REQUIRES, + cmdclass=COMMAND_CLASS, + tests_require=TESTS_REQUIRE, + test_suite=TEST_SUITE, + test_loader=TEST_LOADER, + test_runner=TEST_RUNNER, +) diff --git a/src/python/grpcio/tests/__init__.py b/src/python/grpcio_tests/tests/__init__.py similarity index 100% rename from src/python/grpcio/tests/__init__.py rename to src/python/grpcio_tests/tests/__init__.py diff --git a/src/python/grpcio/tests/_loader.py b/src/python/grpcio_tests/tests/_loader.py similarity index 100% rename from src/python/grpcio/tests/_loader.py rename to src/python/grpcio_tests/tests/_loader.py diff --git a/src/python/grpcio/tests/_result.py b/src/python/grpcio_tests/tests/_result.py similarity index 100% rename from src/python/grpcio/tests/_result.py rename to src/python/grpcio_tests/tests/_result.py diff --git a/src/python/grpcio/tests/_runner.py b/src/python/grpcio_tests/tests/_runner.py similarity index 100% rename from src/python/grpcio/tests/_runner.py rename to src/python/grpcio_tests/tests/_runner.py diff --git a/src/python/grpcio/tests/health_check/__init__.py b/src/python/grpcio_tests/tests/health_check/__init__.py similarity index 100% rename from src/python/grpcio/tests/health_check/__init__.py rename to src/python/grpcio_tests/tests/health_check/__init__.py diff --git a/src/python/grpcio/tests/health_check/_health_servicer_test.py b/src/python/grpcio_tests/tests/health_check/_health_servicer_test.py similarity index 100% rename from src/python/grpcio/tests/health_check/_health_servicer_test.py rename to src/python/grpcio_tests/tests/health_check/_health_servicer_test.py diff --git a/src/python/grpcio/tests/interop/__init__.py b/src/python/grpcio_tests/tests/interop/__init__.py similarity index 100% rename from src/python/grpcio/tests/interop/__init__.py rename to src/python/grpcio_tests/tests/interop/__init__.py diff --git a/src/python/grpcio/tests/interop/_insecure_interop_test.py b/src/python/grpcio_tests/tests/interop/_insecure_interop_test.py similarity index 100% rename from src/python/grpcio/tests/interop/_insecure_interop_test.py rename to src/python/grpcio_tests/tests/interop/_insecure_interop_test.py diff --git a/src/python/grpcio/tests/interop/_interop_test_case.py b/src/python/grpcio_tests/tests/interop/_interop_test_case.py similarity index 100% rename from src/python/grpcio/tests/interop/_interop_test_case.py rename to src/python/grpcio_tests/tests/interop/_interop_test_case.py diff --git a/src/python/grpcio/tests/interop/_secure_interop_test.py b/src/python/grpcio_tests/tests/interop/_secure_interop_test.py similarity index 100% rename from src/python/grpcio/tests/interop/_secure_interop_test.py rename to src/python/grpcio_tests/tests/interop/_secure_interop_test.py diff --git a/src/python/grpcio/tests/interop/client.py b/src/python/grpcio_tests/tests/interop/client.py similarity index 100% rename from src/python/grpcio/tests/interop/client.py rename to src/python/grpcio_tests/tests/interop/client.py diff --git a/src/python/grpcio/tests/interop/credentials/README b/src/python/grpcio_tests/tests/interop/credentials/README similarity index 100% rename from src/python/grpcio/tests/interop/credentials/README rename to src/python/grpcio_tests/tests/interop/credentials/README diff --git a/src/python/grpcio/tests/interop/credentials/ca.pem b/src/python/grpcio_tests/tests/interop/credentials/ca.pem similarity index 100% rename from src/python/grpcio/tests/interop/credentials/ca.pem rename to src/python/grpcio_tests/tests/interop/credentials/ca.pem diff --git a/src/python/grpcio/tests/interop/credentials/server1.key b/src/python/grpcio_tests/tests/interop/credentials/server1.key similarity index 100% rename from src/python/grpcio/tests/interop/credentials/server1.key rename to src/python/grpcio_tests/tests/interop/credentials/server1.key diff --git a/src/python/grpcio/tests/interop/credentials/server1.pem b/src/python/grpcio_tests/tests/interop/credentials/server1.pem similarity index 100% rename from src/python/grpcio/tests/interop/credentials/server1.pem rename to src/python/grpcio_tests/tests/interop/credentials/server1.pem diff --git a/src/python/grpcio/tests/interop/methods.py b/src/python/grpcio_tests/tests/interop/methods.py similarity index 100% rename from src/python/grpcio/tests/interop/methods.py rename to src/python/grpcio_tests/tests/interop/methods.py diff --git a/src/python/grpcio/tests/interop/resources.py b/src/python/grpcio_tests/tests/interop/resources.py similarity index 100% rename from src/python/grpcio/tests/interop/resources.py rename to src/python/grpcio_tests/tests/interop/resources.py diff --git a/src/python/grpcio/tests/interop/server.py b/src/python/grpcio_tests/tests/interop/server.py similarity index 100% rename from src/python/grpcio/tests/interop/server.py rename to src/python/grpcio_tests/tests/interop/server.py diff --git a/src/python/grpcio/tests/protoc_plugin/__init__.py b/src/python/grpcio_tests/tests/protoc_plugin/__init__.py similarity index 100% rename from src/python/grpcio/tests/protoc_plugin/__init__.py rename to src/python/grpcio_tests/tests/protoc_plugin/__init__.py diff --git a/src/python/grpcio/tests/protoc_plugin/_python_plugin_test.py b/src/python/grpcio_tests/tests/protoc_plugin/_python_plugin_test.py similarity index 67% rename from src/python/grpcio/tests/protoc_plugin/_python_plugin_test.py rename to src/python/grpcio_tests/tests/protoc_plugin/_python_plugin_test.py index 1c9cbb0d0c3..bf09380c85b 100644 --- a/src/python/grpcio/tests/protoc_plugin/_python_plugin_test.py +++ b/src/python/grpcio_tests/tests/protoc_plugin/_python_plugin_test.py @@ -45,6 +45,11 @@ from six import moves import grpc from tests.unit.framework.common import test_constants +import tests.protoc_plugin.protos.payload.test_payload_pb2 as payload_pb2 +import tests.protoc_plugin.protos.requests.r.test_requests_pb2 as request_pb2 +import tests.protoc_plugin.protos.responses.test_responses_pb2 as response_pb2 +import tests.protoc_plugin.protos.service.test_service_pb2 as service_pb2 + # Identifiers of entities we expect to find in the generated module. STUB_IDENTIFIER = 'TestServiceStub' SERVICER_IDENTIFIER = 'TestServiceServicer' @@ -53,12 +58,10 @@ ADD_SERVICER_TO_SERVER_IDENTIFIER = 'add_TestServiceServicer_to_server' class _ServicerMethods(object): - def __init__(self, response_pb2, payload_pb2): + def __init__(self): self._condition = threading.Condition() self._paused = False self._fail = False - self._response_pb2 = response_pb2 - self._payload_pb2 = payload_pb2 @contextlib.contextmanager def pause(self): # pylint: disable=invalid-name @@ -85,22 +88,22 @@ class _ServicerMethods(object): self._condition.wait() def UnaryCall(self, request, unused_rpc_context): - response = self._response_pb2.SimpleResponse() - response.payload.payload_type = self._payload_pb2.COMPRESSABLE + response = response_pb2.SimpleResponse() + response.payload.payload_type = payload_pb2.COMPRESSABLE response.payload.payload_compressable = 'a' * request.response_size self._control() return response def StreamingOutputCall(self, request, unused_rpc_context): for parameter in request.response_parameters: - response = self._response_pb2.StreamingOutputCallResponse() - response.payload.payload_type = self._payload_pb2.COMPRESSABLE + response = response_pb2.StreamingOutputCallResponse() + response.payload.payload_type = payload_pb2.COMPRESSABLE response.payload.payload_compressable = 'a' * parameter.size self._control() yield response def StreamingInputCall(self, request_iter, unused_rpc_context): - response = self._response_pb2.StreamingInputCallResponse() + response = response_pb2.StreamingInputCallResponse() aggregated_payload_size = 0 for request in request_iter: aggregated_payload_size += len(request.payload.payload_compressable) @@ -111,8 +114,8 @@ class _ServicerMethods(object): def FullDuplexCall(self, request_iter, unused_rpc_context): for request in request_iter: for parameter in request.response_parameters: - response = self._response_pb2.StreamingOutputCallResponse() - response.payload.payload_type = self._payload_pb2.COMPRESSABLE + response = response_pb2.StreamingOutputCallResponse() + response.payload.payload_type = payload_pb2.COMPRESSABLE response.payload.payload_compressable = 'a' * parameter.size self._control() yield response @@ -121,8 +124,8 @@ class _ServicerMethods(object): responses = [] for request in request_iter: for parameter in request.response_parameters: - response = self._response_pb2.StreamingOutputCallResponse() - response.payload.payload_type = self._payload_pb2.COMPRESSABLE + response = response_pb2.StreamingOutputCallResponse() + response.payload.payload_type = payload_pb2.COMPRESSABLE response.payload.payload_compressable = 'a' * parameter.size self._control() responses.append(response) @@ -142,18 +145,13 @@ class _Service( """ -def _CreateService(service_pb2, response_pb2, payload_pb2): +def _CreateService(): """Provides a servicer backend and a stub. - Args: - service_pb2: The service_pb2 module generated by this test. - response_pb2: The response_pb2 module generated by this test. - payload_pb2: The payload_pb2 module generated by this test. - Returns: A _Service with which to test RPCs. """ - servicer_methods = _ServicerMethods(response_pb2, payload_pb2) + servicer_methods = _ServicerMethods() class Servicer(getattr(service_pb2, SERVICER_IDENTIFIER)): @@ -182,12 +180,9 @@ def _CreateService(service_pb2, response_pb2, payload_pb2): return _Service(servicer_methods, server, stub) -def _CreateIncompleteService(service_pb2): +def _CreateIncompleteService(): """Provides a servicer backend that fails to implement methods and its stub. - Args: - service_pb2: The service_pb2 module generated by this test. - Returns: A _Service with which to test RPCs. The returned _Service's servicer_methods implements none of the methods required of it. @@ -206,7 +201,7 @@ def _CreateIncompleteService(service_pb2): return _Service(None, server, stub) -def _streaming_input_request_iterator(request_pb2, payload_pb2): +def _streaming_input_request_iterator(): for _ in range(3): request = request_pb2.StreamingInputCallRequest() request.payload.payload_type = payload_pb2.COMPRESSABLE @@ -214,7 +209,7 @@ def _streaming_input_request_iterator(request_pb2, payload_pb2): yield request -def _streaming_output_request(request_pb2): +def _streaming_output_request(): request = request_pb2.StreamingOutputCallRequest() sizes = [1, 2, 3] request.response_parameters.add(size=sizes[0], interval_us=0) @@ -223,7 +218,7 @@ def _streaming_output_request(request_pb2): return request -def _full_duplex_request_iterator(request_pb2): +def _full_duplex_request_iterator(): request = request_pb2.StreamingOutputCallRequest() request.response_parameters.add(size=1, interval_us=0) yield request @@ -241,102 +236,40 @@ class PythonPluginTest(unittest.TestCase): methods and does not exist for response-streaming methods. """ - def setUp(self): - # Assume that the appropriate protoc and grpc_python_plugins are on the - # path. - protoc_command = 'protoc' - protoc_plugin_filename = distutils.spawn.find_executable( - 'grpc_python_plugin') - if not os.path.isfile(protoc_command): - # Assume that if we haven't built protoc that it's on the system. - protoc_command = 'protoc' - - # Ensure that the output directory exists. - self.outdir = tempfile.mkdtemp() - - # Find all proto files - paths = [] - root_dir = os.path.dirname(os.path.realpath(__file__)) - proto_dir = os.path.join(root_dir, 'protos') - for walk_root, _, filenames in os.walk(proto_dir): - for filename in filenames: - if filename.endswith('.proto'): - path = os.path.join(walk_root, filename) - paths.append(path) - - # Invoke protoc with the plugin. - cmd = [ - protoc_command, - '--plugin=protoc-gen-python-grpc=%s' % protoc_plugin_filename, - '-I %s' % root_dir, - '--python_out=%s' % self.outdir, - '--python-grpc_out=%s' % self.outdir - ] + paths - subprocess.check_call(' '.join(cmd), shell=True, env=os.environ, - cwd=os.path.dirname(os.path.realpath(__file__))) - - # Generated proto directories dont include __init__.py, but - # these are needed for python package resolution - for walk_root, _, _ in os.walk(os.path.join(self.outdir, 'protos')): - path = os.path.join(walk_root, '__init__.py') - open(path, 'a').close() - - sys.path.insert(0, self.outdir) - - import protos.payload.test_payload_pb2 as payload_pb2 - import protos.requests.r.test_requests_pb2 as request_pb2 - import protos.responses.test_responses_pb2 as response_pb2 - import protos.service.test_service_pb2 as service_pb2 - self._payload_pb2 = payload_pb2 - self._request_pb2 = request_pb2 - self._response_pb2 = response_pb2 - self._service_pb2 = service_pb2 - - def tearDown(self): - try: - shutil.rmtree(self.outdir) - except OSError as exc: - if exc.errno != errno.ENOENT: - raise - sys.path.remove(self.outdir) - def testImportAttributes(self): # check that we can access the generated module and its members. self.assertIsNotNone( - getattr(self._service_pb2, STUB_IDENTIFIER, None)) + getattr(service_pb2, STUB_IDENTIFIER, None)) self.assertIsNotNone( - getattr(self._service_pb2, SERVICER_IDENTIFIER, None)) + getattr(service_pb2, SERVICER_IDENTIFIER, None)) self.assertIsNotNone( - getattr(self._service_pb2, ADD_SERVICER_TO_SERVER_IDENTIFIER, None)) + getattr(service_pb2, ADD_SERVICER_TO_SERVER_IDENTIFIER, None)) def testUpDown(self): - service = _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2) + service = _CreateService() self.assertIsNotNone(service.servicer_methods) self.assertIsNotNone(service.server) self.assertIsNotNone(service.stub) def testIncompleteServicer(self): - service = _CreateIncompleteService(self._service_pb2) - request = self._request_pb2.SimpleRequest(response_size=13) + service = _CreateIncompleteService() + request = request_pb2.SimpleRequest(response_size=13) with self.assertRaises(grpc.RpcError) as exception_context: service.stub.UnaryCall(request) self.assertIs( exception_context.exception.code(), grpc.StatusCode.UNIMPLEMENTED) def testUnaryCall(self): - service = _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2) - request = self._request_pb2.SimpleRequest(response_size=13) + service = _CreateService() + request = request_pb2.SimpleRequest(response_size=13) response = service.stub.UnaryCall(request) expected_response = service.servicer_methods.UnaryCall( request, 'not a real context!') self.assertEqual(expected_response, response) def testUnaryCallFuture(self): - service = _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2) - request = self._request_pb2.SimpleRequest(response_size=13) + service = _CreateService() + request = request_pb2.SimpleRequest(response_size=13) # Check that the call does not block waiting for the server to respond. with service.servicer_methods.pause(): response_future = service.stub.UnaryCall.future(request) @@ -346,9 +279,8 @@ class PythonPluginTest(unittest.TestCase): self.assertEqual(expected_response, response) def testUnaryCallFutureExpired(self): - service = _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2) - request = self._request_pb2.SimpleRequest(response_size=13) + service = _CreateService() + request = request_pb2.SimpleRequest(response_size=13) with service.servicer_methods.pause(): response_future = service.stub.UnaryCall.future( request, timeout=test_constants.SHORT_TIMEOUT) @@ -359,9 +291,8 @@ class PythonPluginTest(unittest.TestCase): self.assertIs(response_future.code(), grpc.StatusCode.DEADLINE_EXCEEDED) def testUnaryCallFutureCancelled(self): - service = _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2) - request = self._request_pb2.SimpleRequest(response_size=13) + service = _CreateService() + request = request_pb2.SimpleRequest(response_size=13) with service.servicer_methods.pause(): response_future = service.stub.UnaryCall.future(request) response_future.cancel() @@ -369,18 +300,16 @@ class PythonPluginTest(unittest.TestCase): self.assertIs(response_future.code(), grpc.StatusCode.CANCELLED) def testUnaryCallFutureFailed(self): - service = _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2) - request = self._request_pb2.SimpleRequest(response_size=13) + service = _CreateService() + request = request_pb2.SimpleRequest(response_size=13) with service.servicer_methods.fail(): response_future = service.stub.UnaryCall.future(request) self.assertIsNotNone(response_future.exception()) self.assertIs(response_future.code(), grpc.StatusCode.UNKNOWN) def testStreamingOutputCall(self): - service = _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2) - request = _streaming_output_request(self._request_pb2) + service = _CreateService() + request = _streaming_output_request() responses = service.stub.StreamingOutputCall(request) expected_responses = service.servicer_methods.StreamingOutputCall( request, 'not a real RpcContext!') @@ -389,9 +318,8 @@ class PythonPluginTest(unittest.TestCase): self.assertEqual(expected_response, response) def testStreamingOutputCallExpired(self): - service = _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2) - request = _streaming_output_request(self._request_pb2) + service = _CreateService() + request = _streaming_output_request() with service.servicer_methods.pause(): responses = service.stub.StreamingOutputCall( request, timeout=test_constants.SHORT_TIMEOUT) @@ -401,9 +329,8 @@ class PythonPluginTest(unittest.TestCase): exception_context.exception.code(), grpc.StatusCode.DEADLINE_EXCEEDED) def testStreamingOutputCallCancelled(self): - service = _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2) - request = _streaming_output_request(self._request_pb2) + service = _CreateService() + request = _streaming_output_request() responses = service.stub.StreamingOutputCall(request) next(responses) responses.cancel() @@ -412,9 +339,8 @@ class PythonPluginTest(unittest.TestCase): self.assertIs(responses.code(), grpc.StatusCode.CANCELLED) def testStreamingOutputCallFailed(self): - service = _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2) - request = _streaming_output_request(self._request_pb2) + service = _CreateService() + request = _streaming_output_request() with service.servicer_methods.fail(): responses = service.stub.StreamingOutputCall(request) self.assertIsNotNone(responses) @@ -423,36 +349,30 @@ class PythonPluginTest(unittest.TestCase): self.assertIs(exception_context.exception.code(), grpc.StatusCode.UNKNOWN) def testStreamingInputCall(self): - service = _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2) + service = _CreateService() response = service.stub.StreamingInputCall( - _streaming_input_request_iterator( - self._request_pb2, self._payload_pb2)) + _streaming_input_request_iterator()) expected_response = service.servicer_methods.StreamingInputCall( - _streaming_input_request_iterator(self._request_pb2, self._payload_pb2), + _streaming_input_request_iterator(), 'not a real RpcContext!') self.assertEqual(expected_response, response) def testStreamingInputCallFuture(self): - service = _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2) + service = _CreateService() with service.servicer_methods.pause(): response_future = service.stub.StreamingInputCall.future( - _streaming_input_request_iterator( - self._request_pb2, self._payload_pb2)) + _streaming_input_request_iterator()) response = response_future.result() expected_response = service.servicer_methods.StreamingInputCall( - _streaming_input_request_iterator(self._request_pb2, self._payload_pb2), + _streaming_input_request_iterator(), 'not a real RpcContext!') self.assertEqual(expected_response, response) def testStreamingInputCallFutureExpired(self): - service = _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2) + service = _CreateService() with service.servicer_methods.pause(): response_future = service.stub.StreamingInputCall.future( - _streaming_input_request_iterator( - self._request_pb2, self._payload_pb2), + _streaming_input_request_iterator(), timeout=test_constants.SHORT_TIMEOUT) with self.assertRaises(grpc.RpcError) as exception_context: response_future.result() @@ -463,43 +383,37 @@ class PythonPluginTest(unittest.TestCase): exception_context.exception.code(), grpc.StatusCode.DEADLINE_EXCEEDED) def testStreamingInputCallFutureCancelled(self): - service = _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2) + service = _CreateService() with service.servicer_methods.pause(): response_future = service.stub.StreamingInputCall.future( - _streaming_input_request_iterator( - self._request_pb2, self._payload_pb2)) + _streaming_input_request_iterator()) response_future.cancel() self.assertTrue(response_future.cancelled()) with self.assertRaises(grpc.FutureCancelledError): response_future.result() def testStreamingInputCallFutureFailed(self): - service = _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2) + service = _CreateService() with service.servicer_methods.fail(): response_future = service.stub.StreamingInputCall.future( - _streaming_input_request_iterator( - self._request_pb2, self._payload_pb2)) + _streaming_input_request_iterator()) self.assertIsNotNone(response_future.exception()) self.assertIs(response_future.code(), grpc.StatusCode.UNKNOWN) def testFullDuplexCall(self): - service = _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2) + service = _CreateService() responses = service.stub.FullDuplexCall( - _full_duplex_request_iterator(self._request_pb2)) + _full_duplex_request_iterator()) expected_responses = service.servicer_methods.FullDuplexCall( - _full_duplex_request_iterator(self._request_pb2), + _full_duplex_request_iterator(), 'not a real RpcContext!') for expected_response, response in moves.zip_longest( expected_responses, responses): self.assertEqual(expected_response, response) def testFullDuplexCallExpired(self): - request_iterator = _full_duplex_request_iterator(self._request_pb2) - service = _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2) + request_iterator = _full_duplex_request_iterator() + service = _CreateService() with service.servicer_methods.pause(): responses = service.stub.FullDuplexCall( request_iterator, timeout=test_constants.SHORT_TIMEOUT) @@ -509,9 +423,8 @@ class PythonPluginTest(unittest.TestCase): exception_context.exception.code(), grpc.StatusCode.DEADLINE_EXCEEDED) def testFullDuplexCallCancelled(self): - service = _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2) - request_iterator = _full_duplex_request_iterator(self._request_pb2) + service = _CreateService() + request_iterator = _full_duplex_request_iterator() responses = service.stub.FullDuplexCall(request_iterator) next(responses) responses.cancel() @@ -521,9 +434,8 @@ class PythonPluginTest(unittest.TestCase): exception_context.exception.code(), grpc.StatusCode.CANCELLED) def testFullDuplexCallFailed(self): - request_iterator = _full_duplex_request_iterator(self._request_pb2) - service = _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2) + request_iterator = _full_duplex_request_iterator() + service = _CreateService() with service.servicer_methods.fail(): responses = service.stub.FullDuplexCall(request_iterator) with self.assertRaises(grpc.RpcError) as exception_context: @@ -531,13 +443,12 @@ class PythonPluginTest(unittest.TestCase): self.assertIs(exception_context.exception.code(), grpc.StatusCode.UNKNOWN) def testHalfDuplexCall(self): - service = _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2) + service = _CreateService() def half_duplex_request_iterator(): - request = self._request_pb2.StreamingOutputCallRequest() + request = request_pb2.StreamingOutputCallRequest() request.response_parameters.add(size=1, interval_us=0) yield request - request = self._request_pb2.StreamingOutputCallRequest() + request = request_pb2.StreamingOutputCallRequest() request.response_parameters.add(size=2, interval_us=0) request.response_parameters.add(size=3, interval_us=0) yield request @@ -561,14 +472,13 @@ class PythonPluginTest(unittest.TestCase): wait_cell[0] = False condition.notify_all() def half_duplex_request_iterator(): - request = self._request_pb2.StreamingOutputCallRequest() + request = request_pb2.StreamingOutputCallRequest() request.response_parameters.add(size=1, interval_us=0) yield request with condition: while wait_cell[0]: condition.wait() - service = _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2) + service = _CreateService() with wait(): responses = service.stub.HalfDuplexCall( half_duplex_request_iterator(), timeout=test_constants.SHORT_TIMEOUT) diff --git a/src/python/grpcio/tests/protoc_plugin/beta_python_plugin_test.py b/src/python/grpcio_tests/tests/protoc_plugin/beta_python_plugin_test.py similarity index 64% rename from src/python/grpcio/tests/protoc_plugin/beta_python_plugin_test.py rename to src/python/grpcio_tests/tests/protoc_plugin/beta_python_plugin_test.py index 7466f880597..1eba9c93543 100644 --- a/src/python/grpcio/tests/protoc_plugin/beta_python_plugin_test.py +++ b/src/python/grpcio_tests/tests/protoc_plugin/beta_python_plugin_test.py @@ -50,6 +50,11 @@ from grpc.framework.foundation import future from grpc.framework.interfaces.face import face from tests.unit.framework.common import test_constants +import tests.protoc_plugin.protos.payload.test_payload_pb2 as payload_pb2 +import tests.protoc_plugin.protos.requests.r.test_requests_pb2 as request_pb2 +import tests.protoc_plugin.protos.responses.test_responses_pb2 as response_pb2 +import tests.protoc_plugin.protos.service.test_service_pb2 as service_pb2 + # Identifiers of entities we expect to find in the generated module. SERVICER_IDENTIFIER = 'BetaTestServiceServicer' STUB_IDENTIFIER = 'BetaTestServiceStub' @@ -59,12 +64,10 @@ STUB_FACTORY_IDENTIFIER = 'beta_create_TestService_stub' class _ServicerMethods(object): - def __init__(self, response_pb2, payload_pb2): + def __init__(self): self._condition = threading.Condition() self._paused = False self._fail = False - self._response_pb2 = response_pb2 - self._payload_pb2 = payload_pb2 @contextlib.contextmanager def pause(self): # pylint: disable=invalid-name @@ -91,22 +94,22 @@ class _ServicerMethods(object): self._condition.wait() def UnaryCall(self, request, unused_rpc_context): - response = self._response_pb2.SimpleResponse() - response.payload.payload_type = self._payload_pb2.COMPRESSABLE + response = response_pb2.SimpleResponse() + response.payload.payload_type = payload_pb2.COMPRESSABLE response.payload.payload_compressable = 'a' * request.response_size self._control() return response def StreamingOutputCall(self, request, unused_rpc_context): for parameter in request.response_parameters: - response = self._response_pb2.StreamingOutputCallResponse() - response.payload.payload_type = self._payload_pb2.COMPRESSABLE + response = response_pb2.StreamingOutputCallResponse() + response.payload.payload_type = payload_pb2.COMPRESSABLE response.payload.payload_compressable = 'a' * parameter.size self._control() yield response def StreamingInputCall(self, request_iter, unused_rpc_context): - response = self._response_pb2.StreamingInputCallResponse() + response = response_pb2.StreamingInputCallResponse() aggregated_payload_size = 0 for request in request_iter: aggregated_payload_size += len(request.payload.payload_compressable) @@ -117,8 +120,8 @@ class _ServicerMethods(object): def FullDuplexCall(self, request_iter, unused_rpc_context): for request in request_iter: for parameter in request.response_parameters: - response = self._response_pb2.StreamingOutputCallResponse() - response.payload.payload_type = self._payload_pb2.COMPRESSABLE + response = response_pb2.StreamingOutputCallResponse() + response.payload.payload_type = payload_pb2.COMPRESSABLE response.payload.payload_compressable = 'a' * parameter.size self._control() yield response @@ -127,8 +130,8 @@ class _ServicerMethods(object): responses = [] for request in request_iter: for parameter in request.response_parameters: - response = self._response_pb2.StreamingOutputCallResponse() - response.payload.payload_type = self._payload_pb2.COMPRESSABLE + response = response_pb2.StreamingOutputCallResponse() + response.payload.payload_type = payload_pb2.COMPRESSABLE response.payload.payload_compressable = 'a' * parameter.size self._control() responses.append(response) @@ -137,23 +140,18 @@ class _ServicerMethods(object): @contextlib.contextmanager -def _CreateService(service_pb2, response_pb2, payload_pb2): +def _CreateService(): """Provides a servicer backend and a stub. The servicer is just the implementation of the actual servicer passed to the face player of the python RPC implementation; the two are detached. - Args: - service_pb2: The service_pb2 module generated by this test. - response_pb2: The response_pb2 module generated by this test - payload_pb2: The payload_pb2 module generated by this test - Yields: A (servicer_methods, stub) pair where servicer_methods is the back-end of the service bound to the stub and and stub is the stub on which to invoke RPCs. """ - servicer_methods = _ServicerMethods(response_pb2, payload_pb2) + servicer_methods = _ServicerMethods() class Servicer(getattr(service_pb2, SERVICER_IDENTIFIER)): @@ -183,7 +181,7 @@ def _CreateService(service_pb2, response_pb2, payload_pb2): @contextlib.contextmanager -def _CreateIncompleteService(service_pb2): +def _CreateIncompleteService(): """Provides a servicer backend that fails to implement methods and its stub. The servicer is just the implementation of the actual servicer passed to the @@ -209,7 +207,7 @@ def _CreateIncompleteService(service_pb2): server.stop(0) -def _streaming_input_request_iterator(request_pb2, payload_pb2): +def _streaming_input_request_iterator(): for _ in range(3): request = request_pb2.StreamingInputCallRequest() request.payload.payload_type = payload_pb2.COMPRESSABLE @@ -217,7 +215,7 @@ def _streaming_input_request_iterator(request_pb2, payload_pb2): yield request -def _streaming_output_request(request_pb2): +def _streaming_output_request(): request = request_pb2.StreamingOutputCallRequest() sizes = [1, 2, 3] request.response_parameters.add(size=sizes[0], interval_us=0) @@ -226,7 +224,7 @@ def _streaming_output_request(request_pb2): return request -def _full_duplex_request_iterator(request_pb2): +def _full_duplex_request_iterator(): request = request_pb2.StreamingOutputCallRequest() request.response_parameters.add(size=1, interval_us=0) yield request @@ -244,101 +242,39 @@ class PythonPluginTest(unittest.TestCase): methods and does not exist for response-streaming methods. """ - def setUp(self): - # Assume that the appropriate protoc and grpc_python_plugins are on the - # path. - protoc_command = 'protoc' - protoc_plugin_filename = distutils.spawn.find_executable( - 'grpc_python_plugin') - if not os.path.isfile(protoc_command): - # Assume that if we haven't built protoc that it's on the system. - protoc_command = 'protoc' - - # Ensure that the output directory exists. - self.outdir = tempfile.mkdtemp() - - # Find all proto files - paths = [] - root_dir = os.path.dirname(os.path.realpath(__file__)) - proto_dir = os.path.join(root_dir, 'protos') - for walk_root, _, filenames in os.walk(proto_dir): - for filename in filenames: - if filename.endswith('.proto'): - path = os.path.join(walk_root, filename) - paths.append(path) - - # Invoke protoc with the plugin. - cmd = [ - protoc_command, - '--plugin=protoc-gen-python-grpc=%s' % protoc_plugin_filename, - '-I %s' % root_dir, - '--python_out=%s' % self.outdir, - '--python-grpc_out=%s' % self.outdir - ] + paths - subprocess.check_call(' '.join(cmd), shell=True, env=os.environ, - cwd=os.path.dirname(os.path.realpath(__file__))) - - # Generated proto directories dont include __init__.py, but - # these are needed for python package resolution - for walk_root, _, _ in os.walk(os.path.join(self.outdir, 'protos')): - path = os.path.join(walk_root, '__init__.py') - open(path, 'a').close() - - sys.path.insert(0, self.outdir) - - import protos.payload.test_payload_pb2 as payload_pb2 # pylint: disable=g-import-not-at-top - import protos.requests.r.test_requests_pb2 as request_pb2 # pylint: disable=g-import-not-at-top - import protos.responses.test_responses_pb2 as response_pb2 # pylint: disable=g-import-not-at-top - import protos.service.test_service_pb2 as service_pb2 # pylint: disable=g-import-not-at-top - self._payload_pb2 = payload_pb2 - self._request_pb2 = request_pb2 - self._response_pb2 = response_pb2 - self._service_pb2 = service_pb2 - - def tearDown(self): - try: - shutil.rmtree(self.outdir) - except OSError as exc: - if exc.errno != errno.ENOENT: - raise - sys.path.remove(self.outdir) - def testImportAttributes(self): # check that we can access the generated module and its members. self.assertIsNotNone( - getattr(self._service_pb2, SERVICER_IDENTIFIER, None)) + getattr(service_pb2, SERVICER_IDENTIFIER, None)) self.assertIsNotNone( - getattr(self._service_pb2, STUB_IDENTIFIER, None)) + getattr(service_pb2, STUB_IDENTIFIER, None)) self.assertIsNotNone( - getattr(self._service_pb2, SERVER_FACTORY_IDENTIFIER, None)) + getattr(service_pb2, SERVER_FACTORY_IDENTIFIER, None)) self.assertIsNotNone( - getattr(self._service_pb2, STUB_FACTORY_IDENTIFIER, None)) + getattr(service_pb2, STUB_FACTORY_IDENTIFIER, None)) def testUpDown(self): - with _CreateService( - self._service_pb2, self._response_pb2, self._payload_pb2): - self._request_pb2.SimpleRequest(response_size=13) + with _CreateService(): + request_pb2.SimpleRequest(response_size=13) def testIncompleteServicer(self): - with _CreateIncompleteService(self._service_pb2) as (_, stub): - request = self._request_pb2.SimpleRequest(response_size=13) + with _CreateIncompleteService() as (_, stub): + request = request_pb2.SimpleRequest(response_size=13) try: stub.UnaryCall(request, test_constants.LONG_TIMEOUT) except face.AbortionError as error: self.assertEqual(interfaces.StatusCode.UNIMPLEMENTED, error.code) def testUnaryCall(self): - with _CreateService(self._service_pb2, self._response_pb2, - self._payload_pb2) as (methods, stub): - request = self._request_pb2.SimpleRequest(response_size=13) + with _CreateService() as (methods, stub): + request = request_pb2.SimpleRequest(response_size=13) response = stub.UnaryCall(request, test_constants.LONG_TIMEOUT) expected_response = methods.UnaryCall(request, 'not a real context!') self.assertEqual(expected_response, response) def testUnaryCallFuture(self): - with _CreateService(self._service_pb2, self._response_pb2, - self._payload_pb2) as (methods, stub): - request = self._request_pb2.SimpleRequest(response_size=13) + with _CreateService() as (methods, stub): + request = request_pb2.SimpleRequest(response_size=13) # Check that the call does not block waiting for the server to respond. with methods.pause(): response_future = stub.UnaryCall.future( @@ -348,9 +284,8 @@ class PythonPluginTest(unittest.TestCase): self.assertEqual(expected_response, response) def testUnaryCallFutureExpired(self): - with _CreateService(self._service_pb2, self._response_pb2, - self._payload_pb2) as (methods, stub): - request = self._request_pb2.SimpleRequest(response_size=13) + with _CreateService() as (methods, stub): + request = request_pb2.SimpleRequest(response_size=13) with methods.pause(): response_future = stub.UnaryCall.future( request, test_constants.SHORT_TIMEOUT) @@ -358,27 +293,24 @@ class PythonPluginTest(unittest.TestCase): response_future.result() def testUnaryCallFutureCancelled(self): - with _CreateService(self._service_pb2, self._response_pb2, - self._payload_pb2) as (methods, stub): - request = self._request_pb2.SimpleRequest(response_size=13) + with _CreateService() as (methods, stub): + request = request_pb2.SimpleRequest(response_size=13) with methods.pause(): response_future = stub.UnaryCall.future(request, 1) response_future.cancel() self.assertTrue(response_future.cancelled()) def testUnaryCallFutureFailed(self): - with _CreateService(self._service_pb2, self._response_pb2, - self._payload_pb2) as (methods, stub): - request = self._request_pb2.SimpleRequest(response_size=13) + with _CreateService() as (methods, stub): + request = request_pb2.SimpleRequest(response_size=13) with methods.fail(): response_future = stub.UnaryCall.future( request, test_constants.LONG_TIMEOUT) self.assertIsNotNone(response_future.exception()) def testStreamingOutputCall(self): - with _CreateService(self._service_pb2, self._response_pb2, - self._payload_pb2) as (methods, stub): - request = _streaming_output_request(self._request_pb2) + with _CreateService() as (methods, stub): + request = _streaming_output_request() responses = stub.StreamingOutputCall( request, test_constants.LONG_TIMEOUT) expected_responses = methods.StreamingOutputCall( @@ -388,9 +320,8 @@ class PythonPluginTest(unittest.TestCase): self.assertEqual(expected_response, response) def testStreamingOutputCallExpired(self): - with _CreateService(self._service_pb2, self._response_pb2, - self._payload_pb2) as (methods, stub): - request = _streaming_output_request(self._request_pb2) + with _CreateService() as (methods, stub): + request = _streaming_output_request() with methods.pause(): responses = stub.StreamingOutputCall( request, test_constants.SHORT_TIMEOUT) @@ -398,9 +329,8 @@ class PythonPluginTest(unittest.TestCase): list(responses) def testStreamingOutputCallCancelled(self): - with _CreateService(self._service_pb2, self._response_pb2, - self._payload_pb2) as (methods, stub): - request = _streaming_output_request(self._request_pb2) + with _CreateService() as (methods, stub): + request = _streaming_output_request() responses = stub.StreamingOutputCall( request, test_constants.LONG_TIMEOUT) next(responses) @@ -409,9 +339,8 @@ class PythonPluginTest(unittest.TestCase): next(responses) def testStreamingOutputCallFailed(self): - with _CreateService(self._service_pb2, self._response_pb2, - self._payload_pb2) as (methods, stub): - request = _streaming_output_request(self._request_pb2) + with _CreateService() as (methods, stub): + request = _streaming_output_request() with methods.fail(): responses = stub.StreamingOutputCall(request, 1) self.assertIsNotNone(responses) @@ -419,38 +348,32 @@ class PythonPluginTest(unittest.TestCase): next(responses) def testStreamingInputCall(self): - with _CreateService(self._service_pb2, self._response_pb2, - self._payload_pb2) as (methods, stub): + with _CreateService() as (methods, stub): response = stub.StreamingInputCall( - _streaming_input_request_iterator( - self._request_pb2, self._payload_pb2), + _streaming_input_request_iterator(), test_constants.LONG_TIMEOUT) expected_response = methods.StreamingInputCall( - _streaming_input_request_iterator(self._request_pb2, self._payload_pb2), + _streaming_input_request_iterator(), 'not a real RpcContext!') self.assertEqual(expected_response, response) def testStreamingInputCallFuture(self): - with _CreateService(self._service_pb2, self._response_pb2, - self._payload_pb2) as (methods, stub): + with _CreateService() as (methods, stub): with methods.pause(): response_future = stub.StreamingInputCall.future( - _streaming_input_request_iterator( - self._request_pb2, self._payload_pb2), + _streaming_input_request_iterator(), test_constants.LONG_TIMEOUT) response = response_future.result() expected_response = methods.StreamingInputCall( - _streaming_input_request_iterator(self._request_pb2, self._payload_pb2), + _streaming_input_request_iterator(), 'not a real RpcContext!') self.assertEqual(expected_response, response) def testStreamingInputCallFutureExpired(self): - with _CreateService(self._service_pb2, self._response_pb2, - self._payload_pb2) as (methods, stub): + with _CreateService() as (methods, stub): with methods.pause(): response_future = stub.StreamingInputCall.future( - _streaming_input_request_iterator( - self._request_pb2, self._payload_pb2), + _streaming_input_request_iterator(), test_constants.SHORT_TIMEOUT) with self.assertRaises(face.ExpirationError): response_future.result() @@ -458,12 +381,10 @@ class PythonPluginTest(unittest.TestCase): response_future.exception(), face.ExpirationError) def testStreamingInputCallFutureCancelled(self): - with _CreateService(self._service_pb2, self._response_pb2, - self._payload_pb2) as (methods, stub): + with _CreateService() as (methods, stub): with methods.pause(): response_future = stub.StreamingInputCall.future( - _streaming_input_request_iterator( - self._request_pb2, self._payload_pb2), + _streaming_input_request_iterator(), test_constants.LONG_TIMEOUT) response_future.cancel() self.assertTrue(response_future.cancelled()) @@ -471,32 +392,28 @@ class PythonPluginTest(unittest.TestCase): response_future.result() def testStreamingInputCallFutureFailed(self): - with _CreateService(self._service_pb2, self._response_pb2, - self._payload_pb2) as (methods, stub): + with _CreateService() as (methods, stub): with methods.fail(): response_future = stub.StreamingInputCall.future( - _streaming_input_request_iterator( - self._request_pb2, self._payload_pb2), + _streaming_input_request_iterator(), test_constants.LONG_TIMEOUT) self.assertIsNotNone(response_future.exception()) def testFullDuplexCall(self): - with _CreateService(self._service_pb2, self._response_pb2, - self._payload_pb2) as (methods, stub): + with _CreateService() as (methods, stub): responses = stub.FullDuplexCall( - _full_duplex_request_iterator(self._request_pb2), + _full_duplex_request_iterator(), test_constants.LONG_TIMEOUT) expected_responses = methods.FullDuplexCall( - _full_duplex_request_iterator(self._request_pb2), + _full_duplex_request_iterator(), 'not a real RpcContext!') for expected_response, response in moves.zip_longest( expected_responses, responses): self.assertEqual(expected_response, response) def testFullDuplexCallExpired(self): - request_iterator = _full_duplex_request_iterator(self._request_pb2) - with _CreateService(self._service_pb2, self._response_pb2, - self._payload_pb2) as (methods, stub): + request_iterator = _full_duplex_request_iterator() + with _CreateService() as (methods, stub): with methods.pause(): responses = stub.FullDuplexCall( request_iterator, test_constants.SHORT_TIMEOUT) @@ -504,9 +421,8 @@ class PythonPluginTest(unittest.TestCase): list(responses) def testFullDuplexCallCancelled(self): - with _CreateService(self._service_pb2, self._response_pb2, - self._payload_pb2) as (methods, stub): - request_iterator = _full_duplex_request_iterator(self._request_pb2) + with _CreateService() as (methods, stub): + request_iterator = _full_duplex_request_iterator() responses = stub.FullDuplexCall( request_iterator, test_constants.LONG_TIMEOUT) next(responses) @@ -515,9 +431,8 @@ class PythonPluginTest(unittest.TestCase): next(responses) def testFullDuplexCallFailed(self): - request_iterator = _full_duplex_request_iterator(self._request_pb2) - with _CreateService(self._service_pb2, self._response_pb2, - self._payload_pb2) as (methods, stub): + request_iterator = _full_duplex_request_iterator() + with _CreateService() as (methods, stub): with methods.fail(): responses = stub.FullDuplexCall( request_iterator, test_constants.LONG_TIMEOUT) @@ -526,13 +441,12 @@ class PythonPluginTest(unittest.TestCase): next(responses) def testHalfDuplexCall(self): - with _CreateService(self._service_pb2, self._response_pb2, - self._payload_pb2) as (methods, stub): + with _CreateService() as (methods, stub): def half_duplex_request_iterator(): - request = self._request_pb2.StreamingOutputCallRequest() + request = request_pb2.StreamingOutputCallRequest() request.response_parameters.add(size=1, interval_us=0) yield request - request = self._request_pb2.StreamingOutputCallRequest() + request = request_pb2.StreamingOutputCallRequest() request.response_parameters.add(size=2, interval_us=0) request.response_parameters.add(size=3, interval_us=0) yield request @@ -557,14 +471,13 @@ class PythonPluginTest(unittest.TestCase): wait_cell[0] = False condition.notify_all() def half_duplex_request_iterator(): - request = self._request_pb2.StreamingOutputCallRequest() + request = request_pb2.StreamingOutputCallRequest() request.response_parameters.add(size=1, interval_us=0) yield request with condition: while wait_cell[0]: condition.wait() - with _CreateService(self._service_pb2, self._response_pb2, - self._payload_pb2) as (methods, stub): + with _CreateService() as (methods, stub): with wait(): responses = stub.HalfDuplexCall( half_duplex_request_iterator(), test_constants.SHORT_TIMEOUT) @@ -574,5 +487,4 @@ class PythonPluginTest(unittest.TestCase): if __name__ == '__main__': - #os.chdir(os.path.dirname(sys.argv[0])) unittest.main(verbosity=2) diff --git a/src/python/grpcio/tests/unit/__init__.py b/src/python/grpcio_tests/tests/protoc_plugin/protos/__init__.py similarity index 100% rename from src/python/grpcio/tests/unit/__init__.py rename to src/python/grpcio_tests/tests/protoc_plugin/protos/__init__.py diff --git a/src/python/grpcio/tests/unit/_adapter/__init__.py b/src/python/grpcio_tests/tests/protoc_plugin/protos/payload/__init__.py similarity index 100% rename from src/python/grpcio/tests/unit/_adapter/__init__.py rename to src/python/grpcio_tests/tests/protoc_plugin/protos/payload/__init__.py diff --git a/src/python/grpcio/tests/protoc_plugin/protos/payload/test_payload.proto b/src/python/grpcio_tests/tests/protoc_plugin/protos/payload/test_payload.proto similarity index 100% rename from src/python/grpcio/tests/protoc_plugin/protos/payload/test_payload.proto rename to src/python/grpcio_tests/tests/protoc_plugin/protos/payload/test_payload.proto diff --git a/src/python/grpcio/tests/unit/_junkdrawer/__init__.py b/src/python/grpcio_tests/tests/protoc_plugin/protos/requests/__init__.py similarity index 100% rename from src/python/grpcio/tests/unit/_junkdrawer/__init__.py rename to src/python/grpcio_tests/tests/protoc_plugin/protos/requests/__init__.py diff --git a/src/python/grpcio/tests/unit/_links/__init__.py b/src/python/grpcio_tests/tests/protoc_plugin/protos/requests/r/__init__.py similarity index 100% rename from src/python/grpcio/tests/unit/_links/__init__.py rename to src/python/grpcio_tests/tests/protoc_plugin/protos/requests/r/__init__.py diff --git a/src/python/grpcio/tests/protoc_plugin/protos/requests/r/test_requests.proto b/src/python/grpcio_tests/tests/protoc_plugin/protos/requests/r/test_requests.proto similarity index 97% rename from src/python/grpcio/tests/protoc_plugin/protos/requests/r/test_requests.proto rename to src/python/grpcio_tests/tests/protoc_plugin/protos/requests/r/test_requests.proto index 54105df6a56..365ae738e14 100644 --- a/src/python/grpcio/tests/protoc_plugin/protos/requests/r/test_requests.proto +++ b/src/python/grpcio_tests/tests/protoc_plugin/protos/requests/r/test_requests.proto @@ -29,7 +29,7 @@ syntax = "proto3"; -import "protos/payload/test_payload.proto"; +import "tests/protoc_plugin/protos/payload/test_payload.proto"; package grpc_protoc_plugin; diff --git a/src/python/grpcio/tests/unit/beta/__init__.py b/src/python/grpcio_tests/tests/protoc_plugin/protos/responses/__init__.py similarity index 100% rename from src/python/grpcio/tests/unit/beta/__init__.py rename to src/python/grpcio_tests/tests/protoc_plugin/protos/responses/__init__.py diff --git a/src/python/grpcio/tests/protoc_plugin/protos/responses/test_responses.proto b/src/python/grpcio_tests/tests/protoc_plugin/protos/responses/test_responses.proto similarity index 96% rename from src/python/grpcio/tests/protoc_plugin/protos/responses/test_responses.proto rename to src/python/grpcio_tests/tests/protoc_plugin/protos/responses/test_responses.proto index 734fbda86e9..1d54d58db1e 100644 --- a/src/python/grpcio/tests/protoc_plugin/protos/responses/test_responses.proto +++ b/src/python/grpcio_tests/tests/protoc_plugin/protos/responses/test_responses.proto @@ -29,7 +29,7 @@ syntax = "proto3"; -import "protos/payload/test_payload.proto"; +import "tests/protoc_plugin/protos/payload/test_payload.proto"; package grpc_protoc_plugin; diff --git a/src/python/grpcio/tests/unit/framework/__init__.py b/src/python/grpcio_tests/tests/protoc_plugin/protos/service/__init__.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/__init__.py rename to src/python/grpcio_tests/tests/protoc_plugin/protos/service/__init__.py diff --git a/src/python/grpcio/tests/protoc_plugin/protos/service/test_service.proto b/src/python/grpcio_tests/tests/protoc_plugin/protos/service/test_service.proto similarity index 95% rename from src/python/grpcio/tests/protoc_plugin/protos/service/test_service.proto rename to src/python/grpcio_tests/tests/protoc_plugin/protos/service/test_service.proto index fe715ee7f92..003dbbb9eb4 100644 --- a/src/python/grpcio/tests/protoc_plugin/protos/service/test_service.proto +++ b/src/python/grpcio_tests/tests/protoc_plugin/protos/service/test_service.proto @@ -29,8 +29,8 @@ syntax = "proto3"; -import "protos/requests/r/test_requests.proto"; -import "protos/responses/test_responses.proto"; +import "tests/protoc_plugin/protos/requests/r/test_requests.proto"; +import "tests/protoc_plugin/protos/responses/test_responses.proto"; package grpc_protoc_plugin; diff --git a/src/python/grpcio/tests/qps/__init__.py b/src/python/grpcio_tests/tests/qps/__init__.py similarity index 100% rename from src/python/grpcio/tests/qps/__init__.py rename to src/python/grpcio_tests/tests/qps/__init__.py diff --git a/src/python/grpcio/tests/qps/benchmark_client.py b/src/python/grpcio_tests/tests/qps/benchmark_client.py similarity index 100% rename from src/python/grpcio/tests/qps/benchmark_client.py rename to src/python/grpcio_tests/tests/qps/benchmark_client.py diff --git a/src/python/grpcio/tests/qps/benchmark_server.py b/src/python/grpcio_tests/tests/qps/benchmark_server.py similarity index 100% rename from src/python/grpcio/tests/qps/benchmark_server.py rename to src/python/grpcio_tests/tests/qps/benchmark_server.py diff --git a/src/python/grpcio/tests/qps/client_runner.py b/src/python/grpcio_tests/tests/qps/client_runner.py similarity index 100% rename from src/python/grpcio/tests/qps/client_runner.py rename to src/python/grpcio_tests/tests/qps/client_runner.py diff --git a/src/python/grpcio/tests/qps/histogram.py b/src/python/grpcio_tests/tests/qps/histogram.py similarity index 100% rename from src/python/grpcio/tests/qps/histogram.py rename to src/python/grpcio_tests/tests/qps/histogram.py diff --git a/src/python/grpcio/tests/qps/qps_worker.py b/src/python/grpcio_tests/tests/qps/qps_worker.py similarity index 100% rename from src/python/grpcio/tests/qps/qps_worker.py rename to src/python/grpcio_tests/tests/qps/qps_worker.py diff --git a/src/python/grpcio/tests/qps/worker_server.py b/src/python/grpcio_tests/tests/qps/worker_server.py similarity index 100% rename from src/python/grpcio/tests/qps/worker_server.py rename to src/python/grpcio_tests/tests/qps/worker_server.py diff --git a/src/python/grpcio/tests/stress/__init__.py b/src/python/grpcio_tests/tests/stress/__init__.py similarity index 100% rename from src/python/grpcio/tests/stress/__init__.py rename to src/python/grpcio_tests/tests/stress/__init__.py diff --git a/src/python/grpcio/tests/stress/client.py b/src/python/grpcio_tests/tests/stress/client.py similarity index 100% rename from src/python/grpcio/tests/stress/client.py rename to src/python/grpcio_tests/tests/stress/client.py diff --git a/src/python/grpcio/tests/stress/metrics_server.py b/src/python/grpcio_tests/tests/stress/metrics_server.py similarity index 100% rename from src/python/grpcio/tests/stress/metrics_server.py rename to src/python/grpcio_tests/tests/stress/metrics_server.py diff --git a/src/python/grpcio/tests/stress/test_runner.py b/src/python/grpcio_tests/tests/stress/test_runner.py similarity index 100% rename from src/python/grpcio/tests/stress/test_runner.py rename to src/python/grpcio_tests/tests/stress/test_runner.py diff --git a/src/python/grpcio/tests/tests.json b/src/python/grpcio_tests/tests/tests.json similarity index 100% rename from src/python/grpcio/tests/tests.json rename to src/python/grpcio_tests/tests/tests.json diff --git a/src/python/grpcio/tests/unit/framework/common/__init__.py b/src/python/grpcio_tests/tests/unit/__init__.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/common/__init__.py rename to src/python/grpcio_tests/tests/unit/__init__.py diff --git a/src/python/grpcio/tests/unit/_adapter/.gitignore b/src/python/grpcio_tests/tests/unit/_adapter/.gitignore similarity index 100% rename from src/python/grpcio/tests/unit/_adapter/.gitignore rename to src/python/grpcio_tests/tests/unit/_adapter/.gitignore diff --git a/src/python/grpcio/tests/unit/framework/core/__init__.py b/src/python/grpcio_tests/tests/unit/_adapter/__init__.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/core/__init__.py rename to src/python/grpcio_tests/tests/unit/_adapter/__init__.py diff --git a/src/python/grpcio/tests/unit/_adapter/_proto_scenarios.py b/src/python/grpcio_tests/tests/unit/_adapter/_proto_scenarios.py similarity index 100% rename from src/python/grpcio/tests/unit/_adapter/_proto_scenarios.py rename to src/python/grpcio_tests/tests/unit/_adapter/_proto_scenarios.py diff --git a/src/python/grpcio/tests/unit/_api_test.py b/src/python/grpcio_tests/tests/unit/_api_test.py similarity index 100% rename from src/python/grpcio/tests/unit/_api_test.py rename to src/python/grpcio_tests/tests/unit/_api_test.py diff --git a/src/python/grpcio/tests/unit/_auth_test.py b/src/python/grpcio_tests/tests/unit/_auth_test.py similarity index 100% rename from src/python/grpcio/tests/unit/_auth_test.py rename to src/python/grpcio_tests/tests/unit/_auth_test.py diff --git a/src/python/grpcio/tests/unit/_channel_connectivity_test.py b/src/python/grpcio_tests/tests/unit/_channel_connectivity_test.py similarity index 100% rename from src/python/grpcio/tests/unit/_channel_connectivity_test.py rename to src/python/grpcio_tests/tests/unit/_channel_connectivity_test.py diff --git a/src/python/grpcio/tests/unit/_channel_ready_future_test.py b/src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py similarity index 100% rename from src/python/grpcio/tests/unit/_channel_ready_future_test.py rename to src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py diff --git a/src/python/grpcio/tests/unit/_compression_test.py b/src/python/grpcio_tests/tests/unit/_compression_test.py similarity index 100% rename from src/python/grpcio/tests/unit/_compression_test.py rename to src/python/grpcio_tests/tests/unit/_compression_test.py diff --git a/src/python/grpcio/tests/unit/_cython/.gitignore b/src/python/grpcio_tests/tests/unit/_cython/.gitignore similarity index 100% rename from src/python/grpcio/tests/unit/_cython/.gitignore rename to src/python/grpcio_tests/tests/unit/_cython/.gitignore diff --git a/src/python/grpcio/tests/unit/_cython/__init__.py b/src/python/grpcio_tests/tests/unit/_cython/__init__.py similarity index 100% rename from src/python/grpcio/tests/unit/_cython/__init__.py rename to src/python/grpcio_tests/tests/unit/_cython/__init__.py diff --git a/src/python/grpcio/tests/unit/_cython/_cancel_many_calls_test.py b/src/python/grpcio_tests/tests/unit/_cython/_cancel_many_calls_test.py similarity index 100% rename from src/python/grpcio/tests/unit/_cython/_cancel_many_calls_test.py rename to src/python/grpcio_tests/tests/unit/_cython/_cancel_many_calls_test.py diff --git a/src/python/grpcio/tests/unit/_cython/_channel_test.py b/src/python/grpcio_tests/tests/unit/_cython/_channel_test.py similarity index 100% rename from src/python/grpcio/tests/unit/_cython/_channel_test.py rename to src/python/grpcio_tests/tests/unit/_cython/_channel_test.py diff --git a/src/python/grpcio/tests/unit/_cython/_read_some_but_not_all_responses_test.py b/src/python/grpcio_tests/tests/unit/_cython/_read_some_but_not_all_responses_test.py similarity index 100% rename from src/python/grpcio/tests/unit/_cython/_read_some_but_not_all_responses_test.py rename to src/python/grpcio_tests/tests/unit/_cython/_read_some_but_not_all_responses_test.py diff --git a/src/python/grpcio/tests/unit/_cython/cygrpc_test.py b/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py similarity index 100% rename from src/python/grpcio/tests/unit/_cython/cygrpc_test.py rename to src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py diff --git a/src/python/grpcio/tests/unit/_cython/test_utilities.py b/src/python/grpcio_tests/tests/unit/_cython/test_utilities.py similarity index 100% rename from src/python/grpcio/tests/unit/_cython/test_utilities.py rename to src/python/grpcio_tests/tests/unit/_cython/test_utilities.py diff --git a/src/python/grpcio/tests/unit/_empty_message_test.py b/src/python/grpcio_tests/tests/unit/_empty_message_test.py similarity index 100% rename from src/python/grpcio/tests/unit/_empty_message_test.py rename to src/python/grpcio_tests/tests/unit/_empty_message_test.py diff --git a/src/python/grpcio/tests/unit/_exit_scenarios.py b/src/python/grpcio_tests/tests/unit/_exit_scenarios.py similarity index 100% rename from src/python/grpcio/tests/unit/_exit_scenarios.py rename to src/python/grpcio_tests/tests/unit/_exit_scenarios.py diff --git a/src/python/grpcio/tests/unit/_exit_test.py b/src/python/grpcio_tests/tests/unit/_exit_test.py similarity index 100% rename from src/python/grpcio/tests/unit/_exit_test.py rename to src/python/grpcio_tests/tests/unit/_exit_test.py diff --git a/src/python/grpcio/tests/unit/_from_grpc_import_star.py b/src/python/grpcio_tests/tests/unit/_from_grpc_import_star.py similarity index 100% rename from src/python/grpcio/tests/unit/_from_grpc_import_star.py rename to src/python/grpcio_tests/tests/unit/_from_grpc_import_star.py diff --git a/src/python/grpcio/tests/unit/framework/foundation/__init__.py b/src/python/grpcio_tests/tests/unit/_junkdrawer/__init__.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/foundation/__init__.py rename to src/python/grpcio_tests/tests/unit/_junkdrawer/__init__.py diff --git a/src/python/grpcio/tests/unit/_junkdrawer/math_pb2.py b/src/python/grpcio_tests/tests/unit/_junkdrawer/math_pb2.py similarity index 100% rename from src/python/grpcio/tests/unit/_junkdrawer/math_pb2.py rename to src/python/grpcio_tests/tests/unit/_junkdrawer/math_pb2.py diff --git a/src/python/grpcio/tests/unit/_junkdrawer/stock_pb2.py b/src/python/grpcio_tests/tests/unit/_junkdrawer/stock_pb2.py similarity index 100% rename from src/python/grpcio/tests/unit/_junkdrawer/stock_pb2.py rename to src/python/grpcio_tests/tests/unit/_junkdrawer/stock_pb2.py diff --git a/src/python/grpcio/tests/unit/framework/interfaces/__init__.py b/src/python/grpcio_tests/tests/unit/_links/__init__.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/interfaces/__init__.py rename to src/python/grpcio_tests/tests/unit/_links/__init__.py diff --git a/src/python/grpcio/tests/unit/_links/_proto_scenarios.py b/src/python/grpcio_tests/tests/unit/_links/_proto_scenarios.py similarity index 100% rename from src/python/grpcio/tests/unit/_links/_proto_scenarios.py rename to src/python/grpcio_tests/tests/unit/_links/_proto_scenarios.py diff --git a/src/python/grpcio/tests/unit/_metadata_code_details_test.py b/src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py similarity index 100% rename from src/python/grpcio/tests/unit/_metadata_code_details_test.py rename to src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py diff --git a/src/python/grpcio/tests/unit/_metadata_test.py b/src/python/grpcio_tests/tests/unit/_metadata_test.py similarity index 100% rename from src/python/grpcio/tests/unit/_metadata_test.py rename to src/python/grpcio_tests/tests/unit/_metadata_test.py diff --git a/src/python/grpcio/tests/unit/_rpc_test.py b/src/python/grpcio_tests/tests/unit/_rpc_test.py similarity index 100% rename from src/python/grpcio/tests/unit/_rpc_test.py rename to src/python/grpcio_tests/tests/unit/_rpc_test.py diff --git a/src/python/grpcio/tests/unit/_sanity/__init__.py b/src/python/grpcio_tests/tests/unit/_sanity/__init__.py similarity index 100% rename from src/python/grpcio/tests/unit/_sanity/__init__.py rename to src/python/grpcio_tests/tests/unit/_sanity/__init__.py diff --git a/src/python/grpcio/tests/unit/_sanity/_sanity_test.py b/src/python/grpcio_tests/tests/unit/_sanity/_sanity_test.py similarity index 90% rename from src/python/grpcio/tests/unit/_sanity/_sanity_test.py rename to src/python/grpcio_tests/tests/unit/_sanity/_sanity_test.py index 0a5a715c0e1..e9fdf217aef 100644 --- a/src/python/grpcio/tests/unit/_sanity/_sanity_test.py +++ b/src/python/grpcio_tests/tests/unit/_sanity/_sanity_test.py @@ -30,6 +30,9 @@ import json import unittest +import pkg_resources +import six + import tests @@ -44,8 +47,10 @@ class Sanity(unittest.TestCase): for test_case_class in tests._loader.iterate_suite_cases(loader.suite)] test_suite_names = sorted(set(test_suite_names)) - with open('src/python/grpcio/tests/tests.json') as tests_json_file: - tests_json = json.load(tests_json_file) + tests_json_string = pkg_resources.resource_string('tests', 'tests.json') + if six.PY3: + tests_json_string = tests_json_string.decode() + tests_json = json.loads(tests_json_string) self.assertListEqual(test_suite_names, tests_json) diff --git a/src/python/grpcio/tests/unit/_thread_cleanup_test.py b/src/python/grpcio_tests/tests/unit/_thread_cleanup_test.py similarity index 100% rename from src/python/grpcio/tests/unit/_thread_cleanup_test.py rename to src/python/grpcio_tests/tests/unit/_thread_cleanup_test.py diff --git a/src/python/grpcio/tests/unit/framework/interfaces/base/__init__.py b/src/python/grpcio_tests/tests/unit/beta/__init__.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/interfaces/base/__init__.py rename to src/python/grpcio_tests/tests/unit/beta/__init__.py diff --git a/src/python/grpcio/tests/unit/beta/_beta_features_test.py b/src/python/grpcio_tests/tests/unit/beta/_beta_features_test.py similarity index 100% rename from src/python/grpcio/tests/unit/beta/_beta_features_test.py rename to src/python/grpcio_tests/tests/unit/beta/_beta_features_test.py diff --git a/src/python/grpcio/tests/unit/beta/_connectivity_channel_test.py b/src/python/grpcio_tests/tests/unit/beta/_connectivity_channel_test.py similarity index 100% rename from src/python/grpcio/tests/unit/beta/_connectivity_channel_test.py rename to src/python/grpcio_tests/tests/unit/beta/_connectivity_channel_test.py diff --git a/src/python/grpcio/tests/unit/beta/_face_interface_test.py b/src/python/grpcio_tests/tests/unit/beta/_face_interface_test.py similarity index 100% rename from src/python/grpcio/tests/unit/beta/_face_interface_test.py rename to src/python/grpcio_tests/tests/unit/beta/_face_interface_test.py diff --git a/src/python/grpcio/tests/unit/beta/_implementations_test.py b/src/python/grpcio_tests/tests/unit/beta/_implementations_test.py similarity index 100% rename from src/python/grpcio/tests/unit/beta/_implementations_test.py rename to src/python/grpcio_tests/tests/unit/beta/_implementations_test.py diff --git a/src/python/grpcio/tests/unit/beta/_not_found_test.py b/src/python/grpcio_tests/tests/unit/beta/_not_found_test.py similarity index 100% rename from src/python/grpcio/tests/unit/beta/_not_found_test.py rename to src/python/grpcio_tests/tests/unit/beta/_not_found_test.py diff --git a/src/python/grpcio/tests/unit/beta/_utilities_test.py b/src/python/grpcio_tests/tests/unit/beta/_utilities_test.py similarity index 100% rename from src/python/grpcio/tests/unit/beta/_utilities_test.py rename to src/python/grpcio_tests/tests/unit/beta/_utilities_test.py diff --git a/src/python/grpcio/tests/unit/beta/test_utilities.py b/src/python/grpcio_tests/tests/unit/beta/test_utilities.py similarity index 100% rename from src/python/grpcio/tests/unit/beta/test_utilities.py rename to src/python/grpcio_tests/tests/unit/beta/test_utilities.py diff --git a/src/python/grpcio/tests/unit/credentials/README b/src/python/grpcio_tests/tests/unit/credentials/README similarity index 100% rename from src/python/grpcio/tests/unit/credentials/README rename to src/python/grpcio_tests/tests/unit/credentials/README diff --git a/src/python/grpcio/tests/unit/credentials/ca.pem b/src/python/grpcio_tests/tests/unit/credentials/ca.pem similarity index 100% rename from src/python/grpcio/tests/unit/credentials/ca.pem rename to src/python/grpcio_tests/tests/unit/credentials/ca.pem diff --git a/src/python/grpcio/tests/unit/credentials/server1.key b/src/python/grpcio_tests/tests/unit/credentials/server1.key similarity index 100% rename from src/python/grpcio/tests/unit/credentials/server1.key rename to src/python/grpcio_tests/tests/unit/credentials/server1.key diff --git a/src/python/grpcio/tests/unit/credentials/server1.pem b/src/python/grpcio_tests/tests/unit/credentials/server1.pem similarity index 100% rename from src/python/grpcio/tests/unit/credentials/server1.pem rename to src/python/grpcio_tests/tests/unit/credentials/server1.pem diff --git a/src/python/grpcio/tests/unit/framework/interfaces/face/__init__.py b/src/python/grpcio_tests/tests/unit/framework/__init__.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/interfaces/face/__init__.py rename to src/python/grpcio_tests/tests/unit/framework/__init__.py diff --git a/src/python/grpcio/tests/unit/framework/interfaces/links/__init__.py b/src/python/grpcio_tests/tests/unit/framework/common/__init__.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/interfaces/links/__init__.py rename to src/python/grpcio_tests/tests/unit/framework/common/__init__.py diff --git a/src/python/grpcio/tests/unit/framework/common/test_constants.py b/src/python/grpcio_tests/tests/unit/framework/common/test_constants.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/common/test_constants.py rename to src/python/grpcio_tests/tests/unit/framework/common/test_constants.py diff --git a/src/python/grpcio/tests/unit/framework/common/test_control.py b/src/python/grpcio_tests/tests/unit/framework/common/test_control.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/common/test_control.py rename to src/python/grpcio_tests/tests/unit/framework/common/test_control.py diff --git a/src/python/grpcio/tests/unit/framework/common/test_coverage.py b/src/python/grpcio_tests/tests/unit/framework/common/test_coverage.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/common/test_coverage.py rename to src/python/grpcio_tests/tests/unit/framework/common/test_coverage.py diff --git a/src/python/grpcio_tests/tests/unit/framework/core/__init__.py b/src/python/grpcio_tests/tests/unit/framework/core/__init__.py new file mode 100644 index 00000000000..70865191060 --- /dev/null +++ b/src/python/grpcio_tests/tests/unit/framework/core/__init__.py @@ -0,0 +1,30 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + diff --git a/src/python/grpcio_tests/tests/unit/framework/foundation/__init__.py b/src/python/grpcio_tests/tests/unit/framework/foundation/__init__.py new file mode 100644 index 00000000000..70865191060 --- /dev/null +++ b/src/python/grpcio_tests/tests/unit/framework/foundation/__init__.py @@ -0,0 +1,30 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + diff --git a/src/python/grpcio/tests/unit/framework/foundation/_logging_pool_test.py b/src/python/grpcio_tests/tests/unit/framework/foundation/_logging_pool_test.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/foundation/_logging_pool_test.py rename to src/python/grpcio_tests/tests/unit/framework/foundation/_logging_pool_test.py diff --git a/src/python/grpcio/tests/unit/framework/foundation/stream_testing.py b/src/python/grpcio_tests/tests/unit/framework/foundation/stream_testing.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/foundation/stream_testing.py rename to src/python/grpcio_tests/tests/unit/framework/foundation/stream_testing.py diff --git a/src/python/grpcio_tests/tests/unit/framework/interfaces/__init__.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/__init__.py new file mode 100644 index 00000000000..70865191060 --- /dev/null +++ b/src/python/grpcio_tests/tests/unit/framework/interfaces/__init__.py @@ -0,0 +1,30 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + diff --git a/src/python/grpcio_tests/tests/unit/framework/interfaces/base/__init__.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/base/__init__.py new file mode 100644 index 00000000000..70865191060 --- /dev/null +++ b/src/python/grpcio_tests/tests/unit/framework/interfaces/base/__init__.py @@ -0,0 +1,30 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + diff --git a/src/python/grpcio/tests/unit/framework/interfaces/base/_control.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/base/_control.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/interfaces/base/_control.py rename to src/python/grpcio_tests/tests/unit/framework/interfaces/base/_control.py diff --git a/src/python/grpcio/tests/unit/framework/interfaces/base/_sequence.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/base/_sequence.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/interfaces/base/_sequence.py rename to src/python/grpcio_tests/tests/unit/framework/interfaces/base/_sequence.py diff --git a/src/python/grpcio/tests/unit/framework/interfaces/base/_state.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/base/_state.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/interfaces/base/_state.py rename to src/python/grpcio_tests/tests/unit/framework/interfaces/base/_state.py diff --git a/src/python/grpcio/tests/unit/framework/interfaces/base/test_cases.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/base/test_cases.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/interfaces/base/test_cases.py rename to src/python/grpcio_tests/tests/unit/framework/interfaces/base/test_cases.py diff --git a/src/python/grpcio/tests/unit/framework/interfaces/base/test_interfaces.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/base/test_interfaces.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/interfaces/base/test_interfaces.py rename to src/python/grpcio_tests/tests/unit/framework/interfaces/base/test_interfaces.py diff --git a/src/python/grpcio/tests/unit/framework/interfaces/face/_3069_test_constant.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_3069_test_constant.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/interfaces/face/_3069_test_constant.py rename to src/python/grpcio_tests/tests/unit/framework/interfaces/face/_3069_test_constant.py diff --git a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/__init__.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/__init__.py new file mode 100644 index 00000000000..70865191060 --- /dev/null +++ b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/__init__.py @@ -0,0 +1,30 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + diff --git a/src/python/grpcio/tests/unit/framework/interfaces/face/_blocking_invocation_inline_service.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_blocking_invocation_inline_service.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/interfaces/face/_blocking_invocation_inline_service.py rename to src/python/grpcio_tests/tests/unit/framework/interfaces/face/_blocking_invocation_inline_service.py diff --git a/src/python/grpcio/tests/unit/framework/interfaces/face/_digest.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_digest.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/interfaces/face/_digest.py rename to src/python/grpcio_tests/tests/unit/framework/interfaces/face/_digest.py diff --git a/src/python/grpcio/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py rename to src/python/grpcio_tests/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py diff --git a/src/python/grpcio/tests/unit/framework/interfaces/face/_invocation.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_invocation.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/interfaces/face/_invocation.py rename to src/python/grpcio_tests/tests/unit/framework/interfaces/face/_invocation.py diff --git a/src/python/grpcio/tests/unit/framework/interfaces/face/_receiver.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_receiver.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/interfaces/face/_receiver.py rename to src/python/grpcio_tests/tests/unit/framework/interfaces/face/_receiver.py diff --git a/src/python/grpcio/tests/unit/framework/interfaces/face/_service.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_service.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/interfaces/face/_service.py rename to src/python/grpcio_tests/tests/unit/framework/interfaces/face/_service.py diff --git a/src/python/grpcio/tests/unit/framework/interfaces/face/_stock_service.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_stock_service.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/interfaces/face/_stock_service.py rename to src/python/grpcio_tests/tests/unit/framework/interfaces/face/_stock_service.py diff --git a/src/python/grpcio/tests/unit/framework/interfaces/face/test_cases.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/test_cases.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/interfaces/face/test_cases.py rename to src/python/grpcio_tests/tests/unit/framework/interfaces/face/test_cases.py diff --git a/src/python/grpcio/tests/unit/framework/interfaces/face/test_interfaces.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/test_interfaces.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/interfaces/face/test_interfaces.py rename to src/python/grpcio_tests/tests/unit/framework/interfaces/face/test_interfaces.py diff --git a/src/python/grpcio_tests/tests/unit/framework/interfaces/links/__init__.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/links/__init__.py new file mode 100644 index 00000000000..70865191060 --- /dev/null +++ b/src/python/grpcio_tests/tests/unit/framework/interfaces/links/__init__.py @@ -0,0 +1,30 @@ +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + diff --git a/src/python/grpcio/tests/unit/framework/interfaces/links/test_cases.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/links/test_cases.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/interfaces/links/test_cases.py rename to src/python/grpcio_tests/tests/unit/framework/interfaces/links/test_cases.py diff --git a/src/python/grpcio/tests/unit/framework/interfaces/links/test_utilities.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/links/test_utilities.py similarity index 100% rename from src/python/grpcio/tests/unit/framework/interfaces/links/test_utilities.py rename to src/python/grpcio_tests/tests/unit/framework/interfaces/links/test_utilities.py diff --git a/src/python/grpcio/tests/unit/resources.py b/src/python/grpcio_tests/tests/unit/resources.py similarity index 100% rename from src/python/grpcio/tests/unit/resources.py rename to src/python/grpcio_tests/tests/unit/resources.py diff --git a/src/python/grpcio/tests/unit/test_common.py b/src/python/grpcio_tests/tests/unit/test_common.py similarity index 100% rename from src/python/grpcio/tests/unit/test_common.py rename to src/python/grpcio_tests/tests/unit/test_common.py diff --git a/templates/src/python/grpcio_tests/grpc_version.py.template b/templates/src/python/grpcio_tests/grpc_version.py.template new file mode 100644 index 00000000000..1f1bf2956dc --- /dev/null +++ b/templates/src/python/grpcio_tests/grpc_version.py.template @@ -0,0 +1,34 @@ +%YAML 1.2 +--- | + # Copyright 2016, Google Inc. + # All rights reserved. + # + # Redistribution and use in source and binary forms, with or without + # modification, are permitted provided that the following conditions are + # met: + # + # * Redistributions of source code must retain the above copyright + # notice, this list of conditions and the following disclaimer. + # * Redistributions in binary form must reproduce the above + # copyright notice, this list of conditions and the following disclaimer + # in the documentation and/or other materials provided with the + # distribution. + # * Neither the name of Google Inc. nor the names of its + # contributors may be used to endorse or promote products derived from + # this software without specific prior written permission. + # + # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + # "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + # LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + # A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + # OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + # LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_tests/grpc_version.py.template`!!! + + VERSION='${settings.python_version.pep440()}' diff --git a/tools/distrib/python/grpcio_tools/.gitignore b/tools/distrib/python/grpcio_tools/.gitignore index 979704d970b..9f3a7360ee6 100644 --- a/tools/distrib/python/grpcio_tools/.gitignore +++ b/tools/distrib/python/grpcio_tools/.gitignore @@ -5,3 +5,4 @@ grpc_root/ *.c *.cpp *.egg-info +*.so diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh index b1c90df824c..3b1c7d2d40e 100755 --- a/tools/run_tests/build_python.sh +++ b/tools/run_tests/build_python.sh @@ -37,13 +37,8 @@ TOX_PYTHON_ENV="$1" PY_VERSION="${TOX_PYTHON_ENV: -2}" ROOT=`pwd` -export LD_LIBRARY_PATH=$ROOT/libs/$CONFIG -export DYLD_LIBRARY_PATH=$ROOT/libs/$CONFIG -export PATH=$ROOT/bins/$CONFIG:$ROOT/bins/$CONFIG/protobuf:$PATH -export CFLAGS="-I$ROOT/include -std=gnu99" -export LDFLAGS="-L$ROOT/libs/$CONFIG" +export CFLAGS="-I$ROOT/include -std=gnu99 -fno-wrapv" export GRPC_PYTHON_BUILD_WITH_CYTHON=1 -export GRPC_PYTHON_USE_PRECOMPILED_BINARIES=0 if [ "$CONFIG" = "gcov" ] then @@ -52,25 +47,11 @@ fi tox -e ${TOX_PYTHON_ENV} --notest -# We force the .so naming convention in PEP 3149 for side by side installation support -# Note this is the default in Python3, but explicitly disabled for Darwin, so we only -# use this hack for our testing environment. -if [ "$PY_VERSION" -gt "27" ] -then - mv $ROOT/src/python/grpcio/grpc/_cython/cygrpc.so $ROOT/src/python/grpcio/grpc/_cython/cygrpc.so.backup || true -fi - -$ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/setup.py build -$ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/setup.py build_py -$ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/setup.py build_ext --inplace -$ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/setup.py gather --test - -if [ "$PY_VERSION" -gt "27" ] -then - mv $ROOT/src/python/grpcio/grpc/_cython/cygrpc.so $ROOT/src/python/grpcio/grpc/_cython/cygrpc.cpython-${PY_VERSION}m.so || true - mv $ROOT/src/python/grpcio/grpc/_cython/cygrpc.so.backup $ROOT/src/python/grpcio/grpc/_cython/cygrpc.so || true -fi - -# Build the health checker -$ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/src/python/grpcio_health_checking/setup.py build -$ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/src/python/grpcio_health_checking/setup.py build_py +$ROOT/.tox/${TOX_PYTHON_ENV}/bin/pip install cython +$ROOT/.tox/${TOX_PYTHON_ENV}/bin/pip install $ROOT +$ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/tools/distrib/python/make_grpcio_tools.py +$ROOT/.tox/${TOX_PYTHON_ENV}/bin/pip install $ROOT/tools/distrib/python/grpcio_tools +$ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/src/python/grpcio_health_checking/setup.py preprocess +$ROOT/.tox/${TOX_PYTHON_ENV}/bin/pip install $ROOT/src/python/grpcio_health_checking +$ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/src/python/grpcio_tests/setup.py preprocess +$ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/src/python/grpcio_tests/setup.py build_proto_modules diff --git a/tools/run_tests/performance/run_worker_python.sh b/tools/run_tests/performance/run_worker_python.sh index 0da8deda58e..2bca5e16952 100755 --- a/tools/run_tests/performance/run_worker_python.sh +++ b/tools/run_tests/performance/run_worker_python.sh @@ -32,4 +32,4 @@ set -ex cd $(dirname $0)/../../.. -PYTHONPATH=src/python/grpcio:src/python/gens .tox/py27/bin/python src/python/grpcio/tests/qps/qps_worker.py $@ +PYTHONPATH=src/python/grpcio_tests:src/python/grpcio:src/python/gens .tox/py27/bin/python src/python/grpcio_tests/tests/qps/qps_worker.py $@ diff --git a/tools/run_tests/run_python.sh b/tools/run_tests/run_python.sh index 8059059d41b..b05efd1c76a 100755 --- a/tools/run_tests/run_python.sh +++ b/tools/run_tests/run_python.sh @@ -49,7 +49,7 @@ then export GRPC_PYTHON_ENABLE_CYTHON_TRACING=1 tox -e ${TOX_PYTHON_ENV} else - $ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/setup.py test_lite + $ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/src/python/grpcio_tests/setup.py test_lite fi mkdir -p $ROOT/reports diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index c1254275e6c..f32a621ee46 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -381,12 +381,9 @@ class PythonLanguage(object): def test_specs(self): # load list of known test suites - with open('src/python/grpcio/tests/tests.json') as tests_json_file: + with open('src/python/grpcio_tests/tests/tests.json') as tests_json_file: tests_json = json.load(tests_json_file) environment = dict(_FORCE_ENVIRON_FOR_WRAPPERS) - environment['PYTHONPATH'] = '{}:{}'.format( - os.path.abspath('src/python/gens'), - os.path.abspath('src/python/grpcio_health_checking')) if self.config.build_config != 'gcov': return [self.config.job_spec( ['tools/run_tests/run_python.sh', tox_env], diff --git a/tox.ini b/tox.ini index 66b74a32db0..8f580047e18 100644 --- a/tox.ini +++ b/tox.ini @@ -19,8 +19,8 @@ passenv = * [testenv:interop_client] commands = - {envpython} setup.py run_interop --client --args='{posargs}' + {envpython} src/python/grpcio_tests/setup.py run_interop --client --args='{posargs}' [testenv:interop_server] commands = - {envpython} setup.py run_interop --server --args='{posargs}' + {envpython} src/python/grpcio_tests/setup.py run_interop --server --args='{posargs}' From 3b5b20682bf64e2f7275adec6983d6e390e7caf2 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 2 Jun 2016 20:27:20 -0700 Subject: [PATCH 1447/1894] Make running individual Python tests less painful Before this change, running Python tests individually required building a tox environment via the run_tests script and then specifying long environment variables to filter out just the test we wanted to run (and then we wouldn't be able to get the output on interrupt, nor would we have an easy way of determining the PID of the process for debugger attachment). Now invoking the build_python.sh script creates a workable python virtual environment that includes all necessary libraries and tests (s.t. running a single test is now possible by just knowing the module name). This does not change existing supported means of running tests (e.g. through run_tests.py). An additional way of running individual tests has been introduced. Following invocation of `./tools/run_tests/build_python.sh` (or run_tests.py), one may invoke ./$VENV/bin/python -m $TEST_MODULE_NAME and acquire a single running process that *is* the test process (rather than a parent of the process). $VENV is the virtual environment name specified to `build_python.sh` (defaults to `py27`) and $TEST_MODULE_NAME is what it says on the tin. --- PYTHON-MANIFEST.in | 1 - tools/run_tests/build_python.sh | 71 +++++++++++++++---- .../performance/run_worker_python.sh | 2 +- tools/run_tests/run_interop_tests.py | 14 ++-- tools/run_tests/run_python.sh | 17 +---- tools/run_tests/run_tests.py | 60 +++++++++++----- 6 files changed, 114 insertions(+), 51 deletions(-) diff --git a/PYTHON-MANIFEST.in b/PYTHON-MANIFEST.in index 3ebba6ec3fc..635e77b875c 100644 --- a/PYTHON-MANIFEST.in +++ b/PYTHON-MANIFEST.in @@ -1,6 +1,5 @@ recursive-include src/python/grpcio/grpc *.c *.h *.py *.pyx *.pxd *.pxi *.python *.pem recursive-exclude src/python/grpcio/grpc/_cython *.so *.pyd -graft src/python/grpcio/tests graft src/python/grpcio/grpcio.egg-info graft src/core graft src/boringssl diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh index 3b1c7d2d40e..9d2813fa192 100755 --- a/tools/run_tests/build_python.sh +++ b/tools/run_tests/build_python.sh @@ -33,25 +33,70 @@ set -ex # change to grpc repo root cd $(dirname $0)/../.. -TOX_PYTHON_ENV="$1" -PY_VERSION="${TOX_PYTHON_ENV: -2}" +PYTHON=${1:-python2.7} +VENV=${2:-py27} +VENV_RELATIVE_PYTHON=${3:-bin/python} +TOOLCHAIN=${4:-unix} ROOT=`pwd` export CFLAGS="-I$ROOT/include -std=gnu99 -fno-wrapv" export GRPC_PYTHON_BUILD_WITH_CYTHON=1 -if [ "$CONFIG" = "gcov" ] -then +# If ccache is available, use it... unless we're on Mac, then all hell breaks +# loose because Python does hacky things to support other hacky things done to +# hacky things on Mac OS X +PLATFORM=`uname -s` +if [ "${PLATFORM/Darwin}" = "$PLATFORM" ]; then + # We're not on Darwin (Mac OS X) + if [ -x "$(command -v ccache)" ]; then + if [ -x "$(command -v gcc)" ]; then + export CC='ccache gcc' + elif [ -x "$(command -v clang)" ]; then + export CC='ccache clang' + fi + fi +fi + +# Find `realpath` +if [ -x "$(command -v realpath)" ]; then + export REALPATH=realpath +elif [ -x "$(command -v grealpath)" ]; then + export REALPATH=grealpath +else + echo 'Couldn'"'"'t find `realpath` or `grealpath`' + exit 1 +fi + +if [ "$CONFIG" = "gcov" ]; then export GRPC_PYTHON_ENABLE_CYTHON_TRACING=1 fi -tox -e ${TOX_PYTHON_ENV} --notest +($PYTHON -m virtualenv $VENV || true) +VENV_PYTHON=`$REALPATH -s "$VENV/$VENV_RELATIVE_PYTHON"` + +# pip-installs the directory specified. Used because on MSYS the vanilla Windows +# Python gets confused when parsing paths. +pip_install_dir() { + PWD=`pwd` + cd $1 + ($VENV_PYTHON setup.py build_ext -c $TOOLCHAIN || true) + # install the dependencies + $VENV_PYTHON -m pip install --upgrade . + # ensure that we've reinstalled the test packages + $VENV_PYTHON -m pip install --upgrade --force-reinstall --no-deps . + cd $PWD +} -$ROOT/.tox/${TOX_PYTHON_ENV}/bin/pip install cython -$ROOT/.tox/${TOX_PYTHON_ENV}/bin/pip install $ROOT -$ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/tools/distrib/python/make_grpcio_tools.py -$ROOT/.tox/${TOX_PYTHON_ENV}/bin/pip install $ROOT/tools/distrib/python/grpcio_tools -$ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/src/python/grpcio_health_checking/setup.py preprocess -$ROOT/.tox/${TOX_PYTHON_ENV}/bin/pip install $ROOT/src/python/grpcio_health_checking -$ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/src/python/grpcio_tests/setup.py preprocess -$ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/src/python/grpcio_tests/setup.py build_proto_modules +$VENV_PYTHON -m pip install --upgrade pip setuptools +$VENV_PYTHON -m pip install cython +pip_install_dir $ROOT +$VENV_PYTHON $ROOT/tools/distrib/python/make_grpcio_tools.py +pip_install_dir $ROOT/tools/distrib/python/grpcio_tools +# TODO(atash) figure out namespace packages and grpcio-tools and auditwheel +# etc... +pip_install_dir $ROOT +$VENV_PYTHON $ROOT/src/python/grpcio_health_checking/setup.py preprocess +pip_install_dir $ROOT/src/python/grpcio_health_checking +$VENV_PYTHON $ROOT/src/python/grpcio_tests/setup.py preprocess +$VENV_PYTHON $ROOT/src/python/grpcio_tests/setup.py build_proto_modules +pip_install_dir $ROOT/src/python/grpcio_tests diff --git a/tools/run_tests/performance/run_worker_python.sh b/tools/run_tests/performance/run_worker_python.sh index 2bca5e16952..3b8ba6f4e4a 100755 --- a/tools/run_tests/performance/run_worker_python.sh +++ b/tools/run_tests/performance/run_worker_python.sh @@ -32,4 +32,4 @@ set -ex cd $(dirname $0)/../../.. -PYTHONPATH=src/python/grpcio_tests:src/python/grpcio:src/python/gens .tox/py27/bin/python src/python/grpcio_tests/tests/qps/qps_worker.py $@ +PYTHONPATH=src/python/grpcio_tests:src/python/grpcio:src/python/gens py27/bin/python src/python/grpcio_tests/tests/qps/qps_worker.py $@ diff --git a/tools/run_tests/run_interop_tests.py b/tools/run_tests/run_interop_tests.py index adf9adaf136..13a4a49325a 100755 --- a/tools/run_tests/run_interop_tests.py +++ b/tools/run_tests/run_interop_tests.py @@ -304,8 +304,11 @@ class PythonLanguage: def client_cmd(self, args): return [ - 'tox -einterop_client --', - ' '.join(args) + 'py27/bin/python', + 'src/python/grpcio_tests/setup.py', + 'run_interop', + '--client', + '--args="{}"'.format(' '.join(args)) ] def cloud_to_prod_env(self): @@ -313,8 +316,11 @@ class PythonLanguage: def server_cmd(self, args): return [ - 'tox -einterop_server --', - ' '.join(args) + ' --use_tls=true' + 'py27/bin/python', + 'src/python/grpcio_tests/setup.py', + 'run_interop', + '--server', + '--args="{}"'.format(' '.join(args) + ' --use_tls=true') ] def global_env(self): diff --git a/tools/run_tests/run_python.sh b/tools/run_tests/run_python.sh index b05efd1c76a..17e0186f2a8 100755 --- a/tools/run_tests/run_python.sh +++ b/tools/run_tests/run_python.sh @@ -33,24 +33,11 @@ set -ex # change to grpc repo root cd $(dirname $0)/../.. -TOX_PYTHON_ENV="$1" +PYTHON=`realpath -s "${1:-py27/bin/python}"` ROOT=`pwd` -export LD_LIBRARY_PATH=$ROOT/libs/$CONFIG -export DYLD_LIBRARY_PATH=$ROOT/libs/$CONFIG -export PATH=$ROOT/bins/$CONFIG:$ROOT/bins/$CONFIG/protobuf:$PATH -export CFLAGS="-I$ROOT/include -std=c89" -export LDFLAGS="-L$ROOT/libs/$CONFIG" -export GRPC_PYTHON_BUILD_WITH_CYTHON=1 -export GRPC_PYTHON_USE_PRECOMPILED_BINARIES=0 -if [ "$CONFIG" = "gcov" ] -then - export GRPC_PYTHON_ENABLE_CYTHON_TRACING=1 - tox -e ${TOX_PYTHON_ENV} -else - $ROOT/.tox/${TOX_PYTHON_ENV}/bin/python $ROOT/src/python/grpcio_tests/setup.py test_lite -fi +$PYTHON $ROOT/src/python/grpcio_tests/setup.py test_lite mkdir -p $ROOT/reports rm -rf $ROOT/reports/python-coverage diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index f32a621ee46..fbc5729c758 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -32,11 +32,13 @@ import argparse import ast +import collections import glob import itertools import json import multiprocessing import os +import os.path import platform import random import re @@ -372,12 +374,20 @@ class PhpLanguage(object): return 'php' +class PythonConfig(collections.namedtuple('PythonConfig', [ + 'python', 'venv', 'venv_relative_python', 'toolchain',])): + + @property + def venv_python(self): + return os.path.abspath('{}/{}'.format(self.venv, self.venv_relative_python)) + + class PythonLanguage(object): def configure(self, config, args): self.config = config self.args = args - self._tox_envs = self._get_tox_envs(self.args.compiler) + self.pythons = self._get_pythons(self.args.compiler) def test_specs(self): # load list of known test suites @@ -386,33 +396,42 @@ class PythonLanguage(object): environment = dict(_FORCE_ENVIRON_FOR_WRAPPERS) if self.config.build_config != 'gcov': return [self.config.job_spec( - ['tools/run_tests/run_python.sh', tox_env], + ['tools/run_tests/run_python.sh', config.venv_python], + None, environ=dict(environment.items() + [('GRPC_PYTHON_TESTRUNNER_FILTER', suite_name)]), - shortname='%s.test.%s' % (tox_env, suite_name), + shortname='%s.test.%s' % (config.venv, suite_name), timeout_seconds=5*60) for suite_name in tests_json - for tox_env in self._tox_envs] + for config in self.pythons] else: - return [self.config.job_spec(['tools/run_tests/run_python.sh', tox_env], - environ=environment, - shortname='%s.test.coverage' % tox_env, - timeout_seconds=15*60) - for tox_env in self._tox_envs] + return [self.config.job_spec( + ['tools/run_tests/run_python.sh', config.venv_python], + None, + environ=environment, + shortname='%s.test.coverage' % config.venv, + timeout_seconds=15*60) + for config in self.pythons] def pre_build_steps(self): return [] def make_targets(self): - return ['static_c', 'grpc_python_plugin', 'shared_c'] + return [] def make_options(self): return [] def build_steps(self): - return [['tools/run_tests/build_python.sh', tox_env] - for tox_env in self._tox_envs] + return [ + [ + 'tools/run_tests/build_python.sh', + config.python, config.venv, + config.venv_relative_python, config.toolchain + ] + for config in self.pythons + ] def post_tests_steps(self): return [] @@ -423,14 +442,21 @@ class PythonLanguage(object): def dockerfile_dir(self): return 'tools/dockerfile/test/python_jessie_%s' % _docker_arch_suffix(self.args.arch) - def _get_tox_envs(self, compiler): - """Returns name of tox environment based on selected compiler.""" + def _get_pythons(self, compiler): + if os.name == 'nt': + venv_relative_python = 'Scripts/python.exe' + toolchain = 'mingw32' + else: + venv_relative_python = 'bin/python' + toolchain = 'unix' + python27_config = PythonConfig('python2.7', 'py27', venv_relative_python, toolchain) + python34_config = PythonConfig('python3.4', 'py34', venv_relative_python, toolchain) if compiler == 'default': - return ('py27', 'py34') + return (python27_config, python34_config,) elif compiler == 'python2.7': - return ('py27',) + return (python27_config,) elif compiler == 'python3.4': - return ('py34',) + return (python34_config,) else: raise Exception('Compiler %s not supported.' % compiler) From ac586ba21e385319a17b8150b1cd681b96807898 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Sat, 4 Jun 2016 03:24:46 -0700 Subject: [PATCH 1448/1894] Remove tox --- .gitignore | 1 - MANIFEST.md | 1 - src/python/grpcio/.gitignore | 1 - .../tools/dockerfile/python_deps.include | 2 +- .../grpc_artifact_linux_x64/Dockerfile | 2 +- .../grpc_artifact_linux_x86/Dockerfile | 2 +- .../grpc_interop_python/Dockerfile | 2 +- .../grpc_interop_stress_python/Dockerfile | 2 +- .../test/multilang_jessie_x64/Dockerfile | 2 +- .../test/python_jessie_x64/Dockerfile | 2 +- tools/gce/linux_performance_worker_init.sh | 2 -- tox.ini | 26 ------------------- 12 files changed, 7 insertions(+), 38 deletions(-) delete mode 100644 tox.ini diff --git a/.gitignore b/.gitignore index d985a797949..f37989176ea 100644 --- a/.gitignore +++ b/.gitignore @@ -9,7 +9,6 @@ cython_debug/ python_build/ .coverage* .eggs -.tox htmlcov/ dist/ *.egg diff --git a/MANIFEST.md b/MANIFEST.md index 77e014002d9..a0e79e85327 100644 --- a/MANIFEST.md +++ b/MANIFEST.md @@ -19,7 +19,6 @@ * [requirements.txt](requirements.txt) * [setup.cfg](setup.cfg) * [setup.py](setup.py) -* [tox.ini](tox.ini) * [PYTHON-MANIFEST.in](PYTHON-MANIFEST.in) ## Ruby diff --git a/src/python/grpcio/.gitignore b/src/python/grpcio/.gitignore index 6e5e65096c8..7cd8fab2735 100644 --- a/src/python/grpcio/.gitignore +++ b/src/python/grpcio/.gitignore @@ -9,7 +9,6 @@ dist/ .coverage .coverage.* .cache/ -.tox/ nosetests.xml doc/ _grpcio_metadata.py diff --git a/templates/tools/dockerfile/python_deps.include b/templates/tools/dockerfile/python_deps.include index a559f96394c..31623640482 100644 --- a/templates/tools/dockerfile/python_deps.include +++ b/templates/tools/dockerfile/python_deps.include @@ -11,4 +11,4 @@ RUN apt-get update && apt-get install -y ${'\\'} # Install Python packages from PyPI RUN pip install pip --upgrade RUN pip install virtualenv -RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 tox +RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 diff --git a/tools/dockerfile/grpc_artifact_linux_x64/Dockerfile b/tools/dockerfile/grpc_artifact_linux_x64/Dockerfile index 4ae4ebdb06d..669e3557b89 100644 --- a/tools/dockerfile/grpc_artifact_linux_x64/Dockerfile +++ b/tools/dockerfile/grpc_artifact_linux_x64/Dockerfile @@ -76,7 +76,7 @@ RUN apt-get update && apt-get install -y \ RUN pip install pip --upgrade RUN pip install virtualenv -RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 tox +RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 ################## diff --git a/tools/dockerfile/grpc_artifact_linux_x86/Dockerfile b/tools/dockerfile/grpc_artifact_linux_x86/Dockerfile index 9c2fd52eee1..860b8f4fb94 100644 --- a/tools/dockerfile/grpc_artifact_linux_x86/Dockerfile +++ b/tools/dockerfile/grpc_artifact_linux_x86/Dockerfile @@ -76,7 +76,7 @@ RUN apt-get update && apt-get install -y \ RUN pip install pip --upgrade RUN pip install virtualenv -RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 tox +RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 ################## diff --git a/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile index 071fb2c93b1..6ff9aeca95c 100644 --- a/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile @@ -76,7 +76,7 @@ RUN apt-get update && apt-get install -y \ # Install Python packages from PyPI RUN pip install pip --upgrade RUN pip install virtualenv -RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 tox +RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 # Prepare ccache RUN ln -s /usr/bin/ccache /usr/local/bin/gcc diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_python/Dockerfile b/tools/dockerfile/stress_test/grpc_interop_stress_python/Dockerfile index 606b7654576..ee6249d381e 100644 --- a/tools/dockerfile/stress_test/grpc_interop_stress_python/Dockerfile +++ b/tools/dockerfile/stress_test/grpc_interop_stress_python/Dockerfile @@ -93,7 +93,7 @@ RUN apt-get update && apt-get install -y \ # Install Python packages from PyPI RUN pip install pip --upgrade RUN pip install virtualenv -RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 tox +RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 RUN pip install coverage diff --git a/tools/dockerfile/test/multilang_jessie_x64/Dockerfile b/tools/dockerfile/test/multilang_jessie_x64/Dockerfile index 5c3f77405ea..66d25a02304 100644 --- a/tools/dockerfile/test/multilang_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/multilang_jessie_x64/Dockerfile @@ -137,7 +137,7 @@ RUN apt-get update && apt-get install -y \ # Install Python packages from PyPI RUN pip install pip --upgrade RUN pip install virtualenv -RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 tox +RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 # Prepare ccache RUN ln -s /usr/bin/ccache /usr/local/bin/gcc diff --git a/tools/dockerfile/test/python_jessie_x64/Dockerfile b/tools/dockerfile/test/python_jessie_x64/Dockerfile index 071fb2c93b1..6ff9aeca95c 100644 --- a/tools/dockerfile/test/python_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/python_jessie_x64/Dockerfile @@ -76,7 +76,7 @@ RUN apt-get update && apt-get install -y \ # Install Python packages from PyPI RUN pip install pip --upgrade RUN pip install virtualenv -RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 tox +RUN pip install futures==2.2.0 enum34==1.0.4 protobuf==3.0.0a2 # Prepare ccache RUN ln -s /usr/bin/ccache /usr/local/bin/gcc diff --git a/tools/gce/linux_performance_worker_init.sh b/tools/gce/linux_performance_worker_init.sh index 9b8d1d1eb74..23a8f082b26 100755 --- a/tools/gce/linux_performance_worker_init.sh +++ b/tools/gce/linux_performance_worker_init.sh @@ -90,13 +90,11 @@ sudo apt-get install -y libgflags-dev libgtest-dev libc++-dev clang # Python dependencies sudo pip install tabulate sudo pip install google-api-python-client -sudo pip install tox curl -O https://bootstrap.pypa.io/get-pip.py sudo pypy get-pip.py sudo pypy -m pip install tabulate sudo pip install google-api-python-client -sudo pip install tox # Node dependencies (nvm has to be installed under user jenkins) touch .profile diff --git a/tox.ini b/tox.ini deleted file mode 100644 index 8f580047e18..00000000000 --- a/tox.ini +++ /dev/null @@ -1,26 +0,0 @@ -# GRPC Python tox (test environment) settings -[tox] -skipsdist = true -envlist = py27,py34 - -[testenv] -setenv = - PYGRPC_ROOT = {toxinidir}/src/python/grpcio/ -commands = - {envpython} setup.py build_py - {envpython} setup.py test - {envbindir}/coverage combine -# TODO(atash): we currently ignore cygrpc.pyx due to an insufficiency in Cython's coverage plug-in. Discussion is ongoing. - {envbindir}/coverage html --include='{env:PYGRPC_ROOT}/grpc/*' --omit='{env:PYGRPC_ROOT}/grpc/framework/alpha/*','{env:PYGRPC_ROOT}/grpc/early_adopter/*','{env:PYGRPC_ROOT}/grpc/framework/base/*','{env:PYGRPC_ROOT}/grpc/framework/face/*','{env:PYGRPC_ROOT}/grpc/_adapter/fore.py','{env:PYGRPC_ROOT}/grpc/_adapter/rear.py','{env:PYGRPC_ROOT}/grpc/_cython/cygrpc.pyx' - {envbindir}/coverage report --include='{env:PYGRPC_ROOT}/grpc/*' --omit='{env:PYGRPC_ROOT}/grpc/framework/alpha/*','{env:PYGRPC_ROOT}/grpc/early_adopter/*','{env:PYGRPC_ROOT}/grpc/framework/base/*','{env:PYGRPC_ROOT}/grpc/framework/face/*','{env:PYGRPC_ROOT}/grpc/_adapter/fore.py','{env:PYGRPC_ROOT}/grpc/_adapter/rear.py','{env:PYGRPC_ROOT}/grpc/_cython/cygrpc.pyx' -deps = - -rrequirements.txt -passenv = * - -[testenv:interop_client] -commands = - {envpython} src/python/grpcio_tests/setup.py run_interop --client --args='{posargs}' - -[testenv:interop_server] -commands = - {envpython} src/python/grpcio_tests/setup.py run_interop --server --args='{posargs}' From 6db60b9041ce8d7bf33254d2daa87ccafd493498 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Mon, 13 Jun 2016 12:16:33 -0700 Subject: [PATCH 1449/1894] Sanitize grpcio-tools command arguments --- tools/distrib/python/grpcio_tools/grpc/tools/protoc.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/distrib/python/grpcio_tools/grpc/tools/protoc.py b/tools/distrib/python/grpcio_tools/grpc/tools/protoc.py index 931fda27d26..e1256a7dd9b 100644 --- a/tools/distrib/python/grpcio_tools/grpc/tools/protoc.py +++ b/tools/distrib/python/grpcio_tools/grpc/tools/protoc.py @@ -41,6 +41,7 @@ def main(command_arguments): command_arguments: a list of strings representing command line arguments to `protoc`. """ + command_arguments = [argument.encode() for argument in command_arguments] return _protoc_compiler.run_main(command_arguments) if __name__ == '__main__': From 0bd13ed8d0ee0f5600b0b8d05907e86d24a7ab1b Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Mon, 13 Jun 2016 19:22:43 -0700 Subject: [PATCH 1450/1894] Fall back to default python for test virtualenvs --- tools/run_tests/build_python.sh | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh index 9d2813fa192..1ad928f2da8 100755 --- a/tools/run_tests/build_python.sh +++ b/tools/run_tests/build_python.sh @@ -33,6 +33,7 @@ set -ex # change to grpc repo root cd $(dirname $0)/../.. +# Arguments PYTHON=${1:-python2.7} VENV=${2:-py27} VENV_RELATIVE_PYTHON=${3:-bin/python} @@ -42,6 +43,10 @@ ROOT=`pwd` export CFLAGS="-I$ROOT/include -std=gnu99 -fno-wrapv" export GRPC_PYTHON_BUILD_WITH_CYTHON=1 +# Default python on the host to fall back to when instantiating e.g. the +# virtualenv. +HOST_PYTHON=${HOST_PYTHON:-python} + # If ccache is available, use it... unless we're on Mac, then all hell breaks # loose because Python does hacky things to support other hacky things done to # hacky things on Mac OS X @@ -71,7 +76,14 @@ if [ "$CONFIG" = "gcov" ]; then export GRPC_PYTHON_ENABLE_CYTHON_TRACING=1 fi -($PYTHON -m virtualenv $VENV || true) +# Instnatiate the virtualenv, preferring to do so from the relevant python +# version. Even if these commands fail (e.g. on Windows due to name conflicts) +# it's possible that the virtualenv is still usable and we trust the tester to +# be able to 'figure it out' instead of us e.g. doing potentially expensive and +# unnecessary error recovery by `rm -rf`ing the virtualenv. +($PYTHON -m virtualenv $VENV || + $HOST_PYTHON -m virtualenv -p $PYTHON $VENV || + true) VENV_PYTHON=`$REALPATH -s "$VENV/$VENV_RELATIVE_PYTHON"` # pip-installs the directory specified. Used because on MSYS the vanilla Windows From 1c062bdd8cedccbfdd3474668e4c6f43af098e23 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Mon, 13 Jun 2016 18:41:36 -0700 Subject: [PATCH 1451/1894] Remove gcov special-casing for Python tests We'll need to fix coverage testing in the future anyway (see #6894). --- tools/run_tests/build_python.sh | 4 ---- tools/run_tests/run_tests.py | 27 +++++++++------------------ 2 files changed, 9 insertions(+), 22 deletions(-) diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh index 1ad928f2da8..687b04e954c 100755 --- a/tools/run_tests/build_python.sh +++ b/tools/run_tests/build_python.sh @@ -72,10 +72,6 @@ else exit 1 fi -if [ "$CONFIG" = "gcov" ]; then - export GRPC_PYTHON_ENABLE_CYTHON_TRACING=1 -fi - # Instnatiate the virtualenv, preferring to do so from the relevant python # version. Even if these commands fail (e.g. on Windows due to name conflicts) # it's possible that the virtualenv is still usable and we trust the tester to diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index fbc5729c758..e9c663695b3 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -394,24 +394,15 @@ class PythonLanguage(object): with open('src/python/grpcio_tests/tests/tests.json') as tests_json_file: tests_json = json.load(tests_json_file) environment = dict(_FORCE_ENVIRON_FOR_WRAPPERS) - if self.config.build_config != 'gcov': - return [self.config.job_spec( - ['tools/run_tests/run_python.sh', config.venv_python], - None, - environ=dict(environment.items() + - [('GRPC_PYTHON_TESTRUNNER_FILTER', suite_name)]), - shortname='%s.test.%s' % (config.venv, suite_name), - timeout_seconds=5*60) - for suite_name in tests_json - for config in self.pythons] - else: - return [self.config.job_spec( - ['tools/run_tests/run_python.sh', config.venv_python], - None, - environ=environment, - shortname='%s.test.coverage' % config.venv, - timeout_seconds=15*60) - for config in self.pythons] + return [self.config.job_spec( + ['tools/run_tests/run_python.sh', config.venv_python], + None, + environ=dict(environment.items() + + [('GRPC_PYTHON_TESTRUNNER_FILTER', suite_name)]), + shortname='%s.test.%s' % (config.venv, suite_name), + timeout_seconds=5*60) + for suite_name in tests_json + for config in self.pythons] def pre_build_steps(self): From e6a23e255bb01eb0006a627b261da67983a0c021 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Tue, 28 Jun 2016 13:58:42 -0700 Subject: [PATCH 1452/1894] Fix job_spec invocation for Python run_tests --- tools/run_tests/run_tests.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index e9c663695b3..8913e9ded30 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -396,15 +396,13 @@ class PythonLanguage(object): environment = dict(_FORCE_ENVIRON_FOR_WRAPPERS) return [self.config.job_spec( ['tools/run_tests/run_python.sh', config.venv_python], - None, + timeout_seconds=5*60, environ=dict(environment.items() + [('GRPC_PYTHON_TESTRUNNER_FILTER', suite_name)]), - shortname='%s.test.%s' % (config.venv, suite_name), - timeout_seconds=5*60) + shortname='%s.test.%s' % (config.venv, suite_name),) for suite_name in tests_json for config in self.pythons] - def pre_build_steps(self): return [] From 4763678016a253b5ed2e33579e52b124f1d8fa21 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Thu, 30 Jun 2016 12:55:01 +0000 Subject: [PATCH 1453/1894] Regenerate project files --- src/python/grpcio_tests/grpc_version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/python/grpcio_tests/grpc_version.py b/src/python/grpcio_tests/grpc_version.py index 478b5d62d6a..7aa600728a8 100644 --- a/src/python/grpcio_tests/grpc_version.py +++ b/src/python/grpcio_tests/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio_tests/grpc_version.py.template`!!! -VERSION='0.15.0.dev0' +VERSION='0.16.0.dev0' From c09854b8feb97c2ac741be4e094897e6f74694a6 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Fri, 1 Jul 2016 10:24:17 -0700 Subject: [PATCH 1454/1894] Fix example Podfiles, and document better --- examples/objective-c/auth_sample/Podfile | 18 +++++++++++++++--- examples/objective-c/helloworld/Podfile | 18 +++++++++++++++--- examples/objective-c/route_guide/Podfile | 19 ++++++++++++++++--- src/objective-c/examples/Sample/Podfile | 7 +++++-- src/objective-c/examples/SwiftSample/Podfile | 7 +++++-- 5 files changed, 56 insertions(+), 13 deletions(-) diff --git a/examples/objective-c/auth_sample/Podfile b/examples/objective-c/auth_sample/Podfile index 7affe08743c..5020df9d752 100644 --- a/examples/objective-c/auth_sample/Podfile +++ b/examples/objective-c/auth_sample/Podfile @@ -1,9 +1,10 @@ source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' -pod 'Protobuf', :path => "../../../third_party/protobuf" -pod 'BoringSSL', :podspec => "../../../src/objective-c" -pod 'gRPC', :path => "../../.." +install! 'cocoapods', :deterministic_uuids => false + +# Location of gRPC's repo root relative to this file. +GRPC_LOCAL_SRC = '../../..' target 'AuthSample' do # Depend on the generated AuthTestService library. @@ -11,4 +12,15 @@ target 'AuthSample' do # Depend on Google's OAuth2 library pod 'Google/SignIn' + + # Use the local versions of Protobuf, BoringSSL, and gRPC. You don't need any of the following + # lines in your application. + pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf" + + pod 'BoringSSL', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c" + + pod 'gRPC', :path => GRPC_LOCAL_SRC + pod 'gRPC-Core', :path => GRPC_LOCAL_SRC + pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC + pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC end diff --git a/examples/objective-c/helloworld/Podfile b/examples/objective-c/helloworld/Podfile index eebf05470d1..a9f309bd15c 100644 --- a/examples/objective-c/helloworld/Podfile +++ b/examples/objective-c/helloworld/Podfile @@ -1,11 +1,23 @@ source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' -pod 'Protobuf', :path => "../../../third_party/protobuf" -pod 'BoringSSL', :podspec => "../../../src/objective-c" -pod 'gRPC', :path => "../../.." +install! 'cocoapods', :deterministic_uuids => false + +# Location of gRPC's repo root relative to this file. +GRPC_LOCAL_SRC = '../../..' target 'HelloWorld' do # Depend on the generated HelloWorld library. pod 'HelloWorld', :path => '.' + + # Use the local versions of Protobuf, BoringSSL, and gRPC. You don't need any of the following + # lines in your application. + pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf" + + pod 'BoringSSL', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c" + + pod 'gRPC', :path => GRPC_LOCAL_SRC + pod 'gRPC-Core', :path => GRPC_LOCAL_SRC + pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC + pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC end diff --git a/examples/objective-c/route_guide/Podfile b/examples/objective-c/route_guide/Podfile index b9f2fefd6d2..645309052ed 100644 --- a/examples/objective-c/route_guide/Podfile +++ b/examples/objective-c/route_guide/Podfile @@ -1,10 +1,23 @@ source 'https://github.com/CocoaPods/Specs.git' platform :ios, '8.0' +install! 'cocoapods', :deterministic_uuids => false + +# Location of gRPC's repo root relative to this file. +GRPC_LOCAL_SRC = '../../..' + target 'RouteGuideClient' do - pod 'Protobuf', :path => "../../../third_party/protobuf" - pod 'BoringSSL', :podspec => "../../../src/objective-c" - pod 'gRPC', :path => "../../.." # Depend on the generated RouteGuide library. pod 'RouteGuide', :path => '.' + + # Use the local versions of Protobuf, BoringSSL, and gRPC. You don't need any of the following + # lines in your application. + pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf" + + pod 'BoringSSL', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c" + + pod 'gRPC', :path => GRPC_LOCAL_SRC + pod 'gRPC-Core', :path => GRPC_LOCAL_SRC + pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC + pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC end diff --git a/src/objective-c/examples/Sample/Podfile b/src/objective-c/examples/Sample/Podfile index 77e37e98afd..acb5f7374a3 100644 --- a/src/objective-c/examples/Sample/Podfile +++ b/src/objective-c/examples/Sample/Podfile @@ -7,6 +7,11 @@ install! 'cocoapods', :deterministic_uuids => false GRPC_LOCAL_SRC = '../../../..' target 'Sample' do + # Depend on the generated RemoteTestClient library + pod 'RemoteTest', :path => "../RemoteTestClient" + + # Use the local versions of Protobuf, BoringSSL, and gRPC. You don't need any of the following + # lines in your application. pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf" pod 'BoringSSL', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c" @@ -15,6 +20,4 @@ target 'Sample' do pod 'gRPC-Core', :path => GRPC_LOCAL_SRC pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC - - pod 'RemoteTest', :path => "../RemoteTestClient" end diff --git a/src/objective-c/examples/SwiftSample/Podfile b/src/objective-c/examples/SwiftSample/Podfile index 2e789c3ef1c..624e5bb9e0f 100644 --- a/src/objective-c/examples/SwiftSample/Podfile +++ b/src/objective-c/examples/SwiftSample/Podfile @@ -7,6 +7,11 @@ install! 'cocoapods', :deterministic_uuids => false GRPC_LOCAL_SRC = '../../../..' target 'SwiftSample' do + # Depend on the generated RemoteTestClient library + pod 'RemoteTest', :path => "../RemoteTestClient" + + # Use the local versions of Protobuf, BoringSSL, and gRPC. You don't need any of the following + # lines in your application. pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf" pod 'BoringSSL', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c" @@ -15,6 +20,4 @@ target 'SwiftSample' do pod 'gRPC-Core', :path => GRPC_LOCAL_SRC pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC - - pod 'RemoteTest', :path => "../RemoteTestClient" end From b76471d53b93f9f472c0e50b7058e8b2e0738d69 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 1 Jul 2016 10:24:56 -0700 Subject: [PATCH 1455/1894] Fix TSAN failure in tcp_server (shown via qps_openloop_test) --- src/core/lib/iomgr/tcp_server_posix.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/lib/iomgr/tcp_server_posix.c b/src/core/lib/iomgr/tcp_server_posix.c index a1a463550ae..d3803c3bd0e 100644 --- a/src/core/lib/iomgr/tcp_server_posix.c +++ b/src/core/lib/iomgr/tcp_server_posix.c @@ -134,7 +134,7 @@ struct grpc_tcp_server { size_t pollset_count; /* next pollset to assign a channel to */ - size_t next_pollset_to_assign; + gpr_atm next_pollset_to_assign; }; static gpr_once check_init = GPR_ONCE_INIT; @@ -181,7 +181,7 @@ grpc_error *grpc_tcp_server_create(grpc_closure *shutdown_complete, s->head = NULL; s->tail = NULL; s->nports = 0; - s->next_pollset_to_assign = 0; + gpr_atm_no_barrier_store(&s->next_pollset_to_assign, 0); *server = s; return GRPC_ERROR_NONE; } @@ -369,7 +369,8 @@ static void on_read(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *err) { } read_notifier_pollset = - sp->server->pollsets[(sp->server->next_pollset_to_assign++) % + sp->server->pollsets[(size_t)gpr_atm_no_barrier_fetch_add( + &sp->server->next_pollset_to_assign, 1) % sp->server->pollset_count]; /* loop until accept4 returns EAGAIN, and then re-arm notification */ From b19ca30b43401cf5b550ba91498e6daced1dde6b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 1 Jul 2016 11:26:07 -0700 Subject: [PATCH 1456/1894] Enable workqueue_test on Windows --- build.yaml | 4 - tools/run_tests/tests.json | 6 +- vsprojects/buildtests_c.sln | 27 +++ .../workqueue_test/workqueue_test.vcxproj | 199 ++++++++++++++++++ .../workqueue_test.vcxproj.filters | 21 ++ 5 files changed, 251 insertions(+), 6 deletions(-) create mode 100644 vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj create mode 100644 vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj.filters diff --git a/build.yaml b/build.yaml index 2446b9feb67..681ab54d5b1 100644 --- a/build.yaml +++ b/build.yaml @@ -2433,10 +2433,6 @@ targets: - grpc - gpr_test_util - gpr - platforms: - - mac - - linux - - posix - name: alarm_cpp_test gtest: true build: test diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index dedd55774b6..291ae415a49 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -1919,7 +1919,8 @@ "ci_platforms": [ "linux", "mac", - "posix" + "posix", + "windows" ], "cpu_cost": 1.0, "exclude_configs": [], @@ -1930,7 +1931,8 @@ "platforms": [ "linux", "mac", - "posix" + "posix", + "windows" ] }, { diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index 10be520b5f1..fcf9b1fc22a 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -1421,6 +1421,17 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "window_overflow_bad_client_ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "workqueue_test", "vcxproj\test\workqueue_test\workqueue_test.vcxproj", "{1B6E9651-4D88-2ACB-BEE0-26599919361D}" + ProjectSection(myProperties) = preProject + lib = "False" + EndProjectSection + ProjectSection(ProjectDependencies) = postProject + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + EndProjectSection +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -3545,6 +3556,22 @@ Global {658D7F7F-9628-6545-743C-D949301DC5DC}.Release-DLL|Win32.Build.0 = Release|Win32 {658D7F7F-9628-6545-743C-D949301DC5DC}.Release-DLL|x64.ActiveCfg = Release|x64 {658D7F7F-9628-6545-743C-D949301DC5DC}.Release-DLL|x64.Build.0 = Release|x64 + {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug|Win32.ActiveCfg = Debug|Win32 + {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug|x64.ActiveCfg = Debug|x64 + {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release|Win32.ActiveCfg = Release|Win32 + {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release|x64.ActiveCfg = Release|x64 + {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug|Win32.Build.0 = Debug|Win32 + {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug|x64.Build.0 = Debug|x64 + {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release|Win32.Build.0 = Release|Win32 + {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release|x64.Build.0 = Release|x64 + {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 + {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug-DLL|Win32.Build.0 = Debug|Win32 + {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug-DLL|x64.ActiveCfg = Debug|x64 + {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug-DLL|x64.Build.0 = Debug|x64 + {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release-DLL|Win32.ActiveCfg = Release|Win32 + {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release-DLL|Win32.Build.0 = Release|Win32 + {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release-DLL|x64.ActiveCfg = Release|x64 + {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release-DLL|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj b/vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj new file mode 100644 index 00000000000..35665fa1833 --- /dev/null +++ b/vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj @@ -0,0 +1,199 @@ + + + + + + Debug + Win32 + + + Debug + x64 + + + Release + Win32 + + + Release + x64 + + + + {1B6E9651-4D88-2ACB-BEE0-26599919361D} + true + $(SolutionDir)IntDir\$(MSBuildProjectName)\ + + + + v100 + + + v110 + + + v120 + + + v140 + + + Application + true + Unicode + + + Application + false + true + Unicode + + + + + + + + + + + + + + workqueue_test + static + Debug + static + Debug + + + workqueue_test + static + Release + static + Release + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + Disabled + WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) + true + MultiThreadedDebug + true + None + false + + + Console + true + false + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + NotUsing + Level3 + MaxSpeed + WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) + true + true + true + MultiThreaded + true + None + false + + + Console + true + false + true + true + + + + + + + + + + {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + + {EAB0A629-17A9-44DB-B5FF-E91A721FE037} + + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + + + + diff --git a/vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj.filters b/vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj.filters new file mode 100644 index 00000000000..0c5979e66ae --- /dev/null +++ b/vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj.filters @@ -0,0 +1,21 @@ + + + + + test\core\iomgr + + + + + + {3c17ce2b-b57b-9278-8494-48ab4df88ec8} + + + {7035b4d7-88e6-ce95-0011-0ea3cc64eddd} + + + {f0fb09d4-0bdc-a53c-1b5f-d71acbf72a5d} + + + + From 0910e4c0f6e99e621c9e11ac900d65ff7b2eeebb Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Fri, 1 Jul 2016 11:25:01 -0700 Subject: [PATCH 1457/1894] pr comments --- src/core/lib/surface/byte_buffer_reader.c | 2 +- src/csharp/ext/grpc_csharp_ext.c | 4 ++-- src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/core/lib/surface/byte_buffer_reader.c b/src/core/lib/surface/byte_buffer_reader.c index 3a85f1f1f93..fb38bf51027 100644 --- a/src/core/lib/surface/byte_buffer_reader.c +++ b/src/core/lib/surface/byte_buffer_reader.c @@ -69,8 +69,8 @@ int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, "Unexpected error decompressing data for algorithm with enum " "value '%d'. Reading data as if it were uncompressed.", reader->buffer_in->data.raw.compression); - return 0; memset(reader, 0, sizeof(*reader)); + return 0; } else { /* all fine */ reader->buffer_out = grpc_raw_byte_buffer_create(decompressed_slices_buffer.slices, diff --git a/src/csharp/ext/grpc_csharp_ext.c b/src/csharp/ext/grpc_csharp_ext.c index 4009748157b..c670ea65c79 100644 --- a/src/csharp/ext/grpc_csharp_ext.c +++ b/src/csharp/ext/grpc_csharp_ext.c @@ -253,7 +253,7 @@ GPR_EXPORT intptr_t GPR_CALLTYPE grpcsharp_batch_context_recv_message_length( if (!ctx->recv_message) { return -1; } - /* TODO(dgq): check the return value of grpc_byte_buffer_reader_init. */ + /* TODO(issue:#7206): check return value of grpc_byte_buffer_reader_init. */ grpc_byte_buffer_reader_init(&reader, ctx->recv_message); return (intptr_t)grpc_byte_buffer_length(reader.buffer_out); } @@ -268,7 +268,7 @@ GPR_EXPORT void GPR_CALLTYPE grpcsharp_batch_context_recv_message_to_buffer( gpr_slice slice; size_t offset = 0; - /* TODO(dgq): check the return value of grpc_byte_buffer_reader_init. */ + /* TODO(issue:#7206): check return value of grpc_byte_buffer_reader_init. */ grpc_byte_buffer_reader_init(&reader, ctx->recv_message); while (grpc_byte_buffer_reader_next(&reader, &slice)) { diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi index 337cf7fa3bb..7510cc98958 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi @@ -254,7 +254,8 @@ cdef class ByteBuffer: cdef void *data_slice_pointer if self.c_byte_buffer != NULL: with nogil: - # TODO(dgq): check the return value of grpc_byte_buffer_reader_init. + # TODO(issue:#7205): check the return value of + # grpc_byte_buffer_reader_init. grpc_byte_buffer_reader_init(&reader, self.c_byte_buffer) result = bytearray() with nogil: From 6ec3b532977550d6343920104eefe71440b94790 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Fri, 1 Jul 2016 11:34:32 -0700 Subject: [PATCH 1458/1894] Fix runtest.py breakage --- tools/run_tests/run_tests.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index c1254275e6c..b2cc213f808 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -621,10 +621,13 @@ class ObjCLanguage(object): _check_compiler(self.args.compiler, ['default']) def test_specs(self): - return [self.config.job_spec(['src/objective-c/tests/run_tests.sh'], None, - environ=_FORCE_ENVIRON_FOR_WRAPPERS), + return [self.config.job_spec(['src/objective-c/tests/run_tests.sh'], + timeout_seconds=None, + shortname='objc-tests', + environ=_FORCE_ENVIRON_FOR_WRAPPERS), self.config.job_spec(['src/objective-c/tests/build_example_test.sh'], - None, timeout_seconds=15*60, + timeout_seconds=15*60, + shortname='objc-examples-build', environ=_FORCE_ENVIRON_FOR_WRAPPERS)] def pre_build_steps(self): From bf6fd294d26e8a504d45f1f96ac1eb909bc367f4 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 1 Jul 2016 11:35:06 -0700 Subject: [PATCH 1459/1894] Add a minimal (but correct) implementation of workqueue to Windows --- src/core/lib/iomgr/workqueue_windows.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/core/lib/iomgr/workqueue_windows.c b/src/core/lib/iomgr/workqueue_windows.c index 275f040b1cc..6dde80b0b2e 100644 --- a/src/core/lib/iomgr/workqueue_windows.c +++ b/src/core/lib/iomgr/workqueue_windows.c @@ -37,4 +37,28 @@ #include "src/core/lib/iomgr/workqueue.h" +grpc_error *grpc_workqueue_create(grpc_exec_ctx *exec_ctx, grpc_workqueue **workqueue) { + return GRPC_ERROR_NONE; +} + +void grpc_workqueue_flush(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) {} + +#ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG +void grpc_workqueue_ref(grpc_workqueue *workqueue, const char *file, int line, + const char *reason) { +} +void grpc_workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, + const char *file, int line, const char *reason) { +} +#else +void grpc_workqueue_ref(grpc_workqueue *workqueue) {} +void grpc_workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) {} +#endif + +void grpc_workqueue_add_to_pollset(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, grpc_pollset *pollset) {} + +void grpc_workqueue_enqueue(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, grpc_closure *closure, grpc_error *error) { + grpc_exec_ctx_sched(exec_ctx, closure, error, NULL); +} + #endif /* GPR_WINDOWS */ From d7addc50279dc7f679231f0392d375983415f332 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 1 Jul 2016 11:36:04 -0700 Subject: [PATCH 1460/1894] clang-format --- src/core/lib/iomgr/workqueue_windows.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/src/core/lib/iomgr/workqueue_windows.c b/src/core/lib/iomgr/workqueue_windows.c index 6dde80b0b2e..789e5687c6c 100644 --- a/src/core/lib/iomgr/workqueue_windows.c +++ b/src/core/lib/iomgr/workqueue_windows.c @@ -37,7 +37,8 @@ #include "src/core/lib/iomgr/workqueue.h" -grpc_error *grpc_workqueue_create(grpc_exec_ctx *exec_ctx, grpc_workqueue **workqueue) { +grpc_error *grpc_workqueue_create(grpc_exec_ctx *exec_ctx, + grpc_workqueue **workqueue) { return GRPC_ERROR_NONE; } @@ -45,19 +46,20 @@ void grpc_workqueue_flush(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) {} #ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG void grpc_workqueue_ref(grpc_workqueue *workqueue, const char *file, int line, - const char *reason) { -} + const char *reason) {} void grpc_workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, - const char *file, int line, const char *reason) { -} + const char *file, int line, const char *reason) {} #else void grpc_workqueue_ref(grpc_workqueue *workqueue) {} void grpc_workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) {} #endif -void grpc_workqueue_add_to_pollset(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, grpc_pollset *pollset) {} +void grpc_workqueue_add_to_pollset(grpc_exec_ctx *exec_ctx, + grpc_workqueue *workqueue, + grpc_pollset *pollset) {} -void grpc_workqueue_enqueue(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, grpc_closure *closure, grpc_error *error) { +void grpc_workqueue_enqueue(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, + grpc_closure *closure, grpc_error *error) { grpc_exec_ctx_sched(exec_ctx, closure, error, NULL); } From be4e6803444f12bb75e21f37f04004280f74b764 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 1 Jul 2016 11:38:07 -0700 Subject: [PATCH 1461/1894] Add comment, make sure object value is set --- src/core/lib/iomgr/workqueue_windows.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/lib/iomgr/workqueue_windows.c b/src/core/lib/iomgr/workqueue_windows.c index 789e5687c6c..52a3e47f376 100644 --- a/src/core/lib/iomgr/workqueue_windows.c +++ b/src/core/lib/iomgr/workqueue_windows.c @@ -37,8 +37,14 @@ #include "src/core/lib/iomgr/workqueue.h" +// Minimal implementation of grpc_workqueue for Windows +// Works by directly enqueuing workqueue items onto the current execution +// context, which is at least correct, if not performant or in the spirit of +// workqueues. + grpc_error *grpc_workqueue_create(grpc_exec_ctx *exec_ctx, grpc_workqueue **workqueue) { + *workqueue = (grpc_workqueue *)1; return GRPC_ERROR_NONE; } From 0f213c399c5e4025146cbd6fb2a63925f37e8b82 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Fri, 1 Jul 2016 11:54:35 -0700 Subject: [PATCH 1462/1894] Fix examples to work with local gRPC-Core --- examples/objective-c/auth_sample/Podfile | 20 ++++++++++++++++++++ examples/objective-c/helloworld/Podfile | 20 ++++++++++++++++++++ examples/objective-c/route_guide/Podfile | 20 ++++++++++++++++++++ src/objective-c/examples/Sample/Podfile | 20 ++++++++++++++++++++ src/objective-c/examples/SwiftSample/Podfile | 20 ++++++++++++++++++++ 5 files changed, 100 insertions(+) diff --git a/examples/objective-c/auth_sample/Podfile b/examples/objective-c/auth_sample/Podfile index 5020df9d752..32157a9dcee 100644 --- a/examples/objective-c/auth_sample/Podfile +++ b/examples/objective-c/auth_sample/Podfile @@ -24,3 +24,23 @@ target 'AuthSample' do pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC end + +# This pre_install hook is only needed to use the local version of gRPC-Core. You don't need it in +# your application. +pre_install do |installer| + # This is the gRPC-Core podspec object, as initialized by its podspec file. + grpc_core_spec = installer.pod_targets.find{|t| t.name == 'gRPC-Core'}.root_spec + + # Copied from gRPC-Core.podspec, except for the adjusted src_root: + src_root = "$(PODS_ROOT)/../#{GRPC_LOCAL_SRC}" + grpc_core_spec.pod_target_xcconfig = { + 'GRPC_SRC_ROOT' => src_root, + 'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(GRPC_SRC_ROOT)/include"', + 'USER_HEADER_SEARCH_PATHS' => '"$(GRPC_SRC_ROOT)"', + # If we don't set these two settings, `include/grpc/support/time.h` and + # `src/core/lib/support/string.h` shadow the system `` and ``, breaking the + # build. + 'USE_HEADERMAP' => 'NO', + 'ALWAYS_SEARCH_USER_PATHS' => 'NO', + } +end diff --git a/examples/objective-c/helloworld/Podfile b/examples/objective-c/helloworld/Podfile index a9f309bd15c..e1bb4ddfd5e 100644 --- a/examples/objective-c/helloworld/Podfile +++ b/examples/objective-c/helloworld/Podfile @@ -21,3 +21,23 @@ target 'HelloWorld' do pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC end + +# This pre_install hook is only needed to use the local version of gRPC-Core. You don't need it in +# your application. +pre_install do |installer| + # This is the gRPC-Core podspec object, as initialized by its podspec file. + grpc_core_spec = installer.pod_targets.find{|t| t.name == 'gRPC-Core'}.root_spec + + # Copied from gRPC-Core.podspec, except for the adjusted src_root: + src_root = "$(PODS_ROOT)/../#{GRPC_LOCAL_SRC}" + grpc_core_spec.pod_target_xcconfig = { + 'GRPC_SRC_ROOT' => src_root, + 'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(GRPC_SRC_ROOT)/include"', + 'USER_HEADER_SEARCH_PATHS' => '"$(GRPC_SRC_ROOT)"', + # If we don't set these two settings, `include/grpc/support/time.h` and + # `src/core/lib/support/string.h` shadow the system `` and ``, breaking the + # build. + 'USE_HEADERMAP' => 'NO', + 'ALWAYS_SEARCH_USER_PATHS' => 'NO', + } +end diff --git a/examples/objective-c/route_guide/Podfile b/examples/objective-c/route_guide/Podfile index 645309052ed..943f5464d89 100644 --- a/examples/objective-c/route_guide/Podfile +++ b/examples/objective-c/route_guide/Podfile @@ -21,3 +21,23 @@ target 'RouteGuideClient' do pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC end + +# This pre_install hook is only needed to use the local version of gRPC-Core. You don't need it in +# your application. +pre_install do |installer| + # This is the gRPC-Core podspec object, as initialized by its podspec file. + grpc_core_spec = installer.pod_targets.find{|t| t.name == 'gRPC-Core'}.root_spec + + # Copied from gRPC-Core.podspec, except for the adjusted src_root: + src_root = "$(PODS_ROOT)/../#{GRPC_LOCAL_SRC}" + grpc_core_spec.pod_target_xcconfig = { + 'GRPC_SRC_ROOT' => src_root, + 'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(GRPC_SRC_ROOT)/include"', + 'USER_HEADER_SEARCH_PATHS' => '"$(GRPC_SRC_ROOT)"', + # If we don't set these two settings, `include/grpc/support/time.h` and + # `src/core/lib/support/string.h` shadow the system `` and ``, breaking the + # build. + 'USE_HEADERMAP' => 'NO', + 'ALWAYS_SEARCH_USER_PATHS' => 'NO', + } +end diff --git a/src/objective-c/examples/Sample/Podfile b/src/objective-c/examples/Sample/Podfile index acb5f7374a3..80ab2c320d4 100644 --- a/src/objective-c/examples/Sample/Podfile +++ b/src/objective-c/examples/Sample/Podfile @@ -21,3 +21,23 @@ target 'Sample' do pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC end + +# This pre_install hook is only needed to use the local version of gRPC-Core. You don't need it in +# your application. +pre_install do |installer| + # This is the gRPC-Core podspec object, as initialized by its podspec file. + grpc_core_spec = installer.pod_targets.find{|t| t.name == 'gRPC-Core'}.root_spec + + # Copied from gRPC-Core.podspec, except for the adjusted src_root: + src_root = "$(PODS_ROOT)/../#{GRPC_LOCAL_SRC}" + grpc_core_spec.pod_target_xcconfig = { + 'GRPC_SRC_ROOT' => src_root, + 'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(GRPC_SRC_ROOT)/include"', + 'USER_HEADER_SEARCH_PATHS' => '"$(GRPC_SRC_ROOT)"', + # If we don't set these two settings, `include/grpc/support/time.h` and + # `src/core/lib/support/string.h` shadow the system `` and ``, breaking the + # build. + 'USE_HEADERMAP' => 'NO', + 'ALWAYS_SEARCH_USER_PATHS' => 'NO', + } +end diff --git a/src/objective-c/examples/SwiftSample/Podfile b/src/objective-c/examples/SwiftSample/Podfile index 624e5bb9e0f..b675fd29ef5 100644 --- a/src/objective-c/examples/SwiftSample/Podfile +++ b/src/objective-c/examples/SwiftSample/Podfile @@ -21,3 +21,23 @@ target 'SwiftSample' do pod 'gRPC-RxLibrary', :path => GRPC_LOCAL_SRC pod 'gRPC-ProtoRPC', :path => GRPC_LOCAL_SRC end + +# This pre_install hook is only needed to use the local version of gRPC-Core. You don't need it in +# your application. +pre_install do |installer| + # This is the gRPC-Core podspec object, as initialized by its podspec file. + grpc_core_spec = installer.pod_targets.find{|t| t.name == 'gRPC-Core'}.root_spec + + # Copied from gRPC-Core.podspec, except for the adjusted src_root: + src_root = "$(PODS_ROOT)/../#{GRPC_LOCAL_SRC}" + grpc_core_spec.pod_target_xcconfig = { + 'GRPC_SRC_ROOT' => src_root, + 'HEADER_SEARCH_PATHS' => '"$(inherited)" "$(GRPC_SRC_ROOT)/include"', + 'USER_HEADER_SEARCH_PATHS' => '"$(GRPC_SRC_ROOT)"', + # If we don't set these two settings, `include/grpc/support/time.h` and + # `src/core/lib/support/string.h` shadow the system `` and ``, breaking the + # build. + 'USE_HEADERMAP' => 'NO', + 'ALWAYS_SEARCH_USER_PATHS' => 'NO', + } +end From eda85c6765bf9b201fe5fa3185b704490f14026e Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 1 Jul 2016 12:45:19 -0700 Subject: [PATCH 1463/1894] Expunge all references to zookeeper --- Makefile | 96 +------- doc/naming.md | 22 -- include/grpc/grpc_zookeeper.h | 59 ----- src/core/ext/resolver/zookeeper/README.md | 1 - templates/Makefile.template | 199 +--------------- .../run_tests_addons_nocache.include | 4 - test/build/zookeeper.c | 43 ---- test/cpp/end2end/shutdown_test.cc | 1 - test/cpp/end2end/zookeeper_test.cc | 219 ------------------ .../grpc_check_generated_pb_files/Dockerfile | 5 - .../grpc_interop_csharp/Dockerfile | 4 - .../interoptest/grpc_interop_cxx/Dockerfile | 4 - .../interoptest/grpc_interop_node/Dockerfile | 4 - .../interoptest/grpc_interop_php/Dockerfile | 4 - .../grpc_interop_python/Dockerfile | 4 - .../interoptest/grpc_interop_ruby/Dockerfile | 4 - .../grpc_interop_stress_node/Dockerfile | 4 - .../grpc_interop_stress_php/Dockerfile | 4 - .../test/csharp_coreclr_x64/Dockerfile | 4 - .../test/csharp_jessie_x64/Dockerfile | 4 - .../dockerfile/test/cxx_jessie_x64/Dockerfile | 4 - .../dockerfile/test/cxx_jessie_x86/Dockerfile | 4 - .../test/cxx_ubuntu1404_x64/Dockerfile | 4 - .../test/cxx_ubuntu1604_x64/Dockerfile | 4 - .../dockerfile/test/cxx_wheezy_x64/Dockerfile | 4 - tools/dockerfile/test/fuzzer/Dockerfile | 4 - .../test/multilang_jessie_x64/Dockerfile | 4 - .../test/node_jessie_x64/Dockerfile | 4 - .../dockerfile/test/php_jessie_x64/Dockerfile | 4 - .../test/python_jessie_x64/Dockerfile | 4 - .../test/ruby_jessie_x64/Dockerfile | 4 - 31 files changed, 20 insertions(+), 713 deletions(-) delete mode 100644 include/grpc/grpc_zookeeper.h delete mode 100644 src/core/ext/resolver/zookeeper/README.md delete mode 100644 test/build/zookeeper.c delete mode 100644 test/cpp/end2end/zookeeper_test.cc diff --git a/Makefile b/Makefile index 8fd86e78ed0..f1d908dce73 100644 --- a/Makefile +++ b/Makefile @@ -492,7 +492,6 @@ PROTOC_CHECK_CMD = which protoc > /dev/null PROTOC_CHECK_VERSION_CMD = protoc --version | grep -q libprotoc.3 DTRACE_CHECK_CMD = which dtrace > /dev/null SYSTEMTAP_HEADERS_CHECK_CMD = $(CC) $(CPPFLAGS) $(CFLAGS) -o $(TMPOUT) test/build/systemtap.c $(LDFLAGS) -ZOOKEEPER_CHECK_CMD = $(CC) $(CPPFLAGS) $(CFLAGS) -o $(TMPOUT) test/build/zookeeper.c $(LDFLAGS) -lzookeeper_mt ifndef REQUIRE_CUSTOM_LIBRARIES_$(CONFIG) HAS_SYSTEM_PERFTOOLS ?= $(shell $(PERFTOOLS_CHECK_CMD) 2> /dev/null && echo true || echo false) @@ -560,8 +559,6 @@ ifeq ($(HAS_SYSTEMTAP),true) CACHE_MK += HAS_SYSTEMTAP = true, endif -HAS_ZOOKEEPER = $(shell $(ZOOKEEPER_CHECK_CMD) 2> /dev/null && echo true || echo false) - # Note that for testing purposes, one can do: # make HAS_EMBEDDED_OPENSSL_ALPN=false # to emulate the fact we do not have OpenSSL in the third_party folder. @@ -705,14 +702,6 @@ PC_LIBS_PRIVATE = $(PC_LIBS_GRPC) PC_LIB = -lgrpc GRPC_UNSECURE_PC_FILE := $(PC_TEMPLATE) -# grpc_zookeeper .pc file -PC_NAME = gRPC zookeeper -PC_DESCRIPTION = gRPC's zookeeper plugin -PC_CFLAGS = -PC_REQUIRES_PRIVATE = -PC_LIBS_PRIVATE = -lzookeeper_mt -GRPC_ZOOKEEPER_PC_FILE := $(PC_TEMPLATE) - PROTOBUF_PKG_CONFIG = false PC_REQUIRES_GRPCXX = @@ -1151,7 +1140,6 @@ run_dep_checks: $(PERFTOOLS_CHECK_CMD) || true $(PROTOBUF_CHECK_CMD) || true $(PROTOC_CHECK_VERSION_CMD) || true - $(ZOOKEEPER_CHECK_CMD) || true third_party/protobuf/configure: $(E) "[AUTOGEN] Preparing protobuf" @@ -1170,29 +1158,16 @@ $(LIBDIR)/$(CONFIG)/protobuf/libprotobuf.a: third_party/protobuf/configure static: static_c static_cxx -static_c: pc_c pc_c_unsecure cache.mk pc_c_zookeeper $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgrpc_cronet.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a static_zookeeper_libs - +static_c: pc_c pc_c_unsecure cache.mk $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgrpc_cronet.a $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a static_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure.a shared: shared_c shared_cxx -shared_c: pc_c pc_c_unsecure cache.mk pc_c_zookeeper $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) shared_zookeeper_libs - +shared_c: pc_c pc_c_unsecure cache.mk $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)gpr$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) shared_cxx: pc_cxx pc_cxx_unsecure cache.mk $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_reflection$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) shared_csharp: shared_c $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) -ifeq ($(HAS_ZOOKEEPER),true) -static_zookeeper_libs: -shared_zookeeper_libs: -else - -static_zookeeper_libs: - -shared_zookeeper_libs: - -endif - grpc_csharp_ext: shared_csharp plugins: $(PROTOC_PLUGINS) @@ -1204,12 +1179,6 @@ pc_c: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc.pc pc_c_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc -ifeq ($(HAS_ZOOKEEPER),true) -pc_c_zookeeper: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_zookeeper.pc -else -pc_c_zookeeper: -endif - pc_cxx: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc pc_cxx_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc @@ -1221,14 +1190,7 @@ privatelibs_cxx: $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LIBDIR)/$(CONFIG endif -ifeq ($(HAS_ZOOKEEPER),true) -privatelibs_zookeeper: -else -privatelibs_zookeeper: -endif - - -buildtests: buildtests_c buildtests_cxx buildtests_zookeeper +buildtests: buildtests_c buildtests_cxx buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/alarm_test \ @@ -1388,7 +1350,7 @@ buildtests_c: privatelibs_c \ ifeq ($(EMBED_OPENSSL),true) -buildtests_cxx: buildtests_zookeeper privatelibs_cxx \ +buildtests_cxx: privatelibs_cxx \ $(BINDIR)/$(CONFIG)/alarm_cpp_test \ $(BINDIR)/$(CONFIG)/async_end2end_test \ $(BINDIR)/$(CONFIG)/auth_property_iterator_test \ @@ -1472,7 +1434,7 @@ buildtests_cxx: buildtests_zookeeper privatelibs_cxx \ $(BINDIR)/$(CONFIG)/boringssl_ssl_test \ else -buildtests_cxx: buildtests_zookeeper privatelibs_cxx \ +buildtests_cxx: privatelibs_cxx \ $(BINDIR)/$(CONFIG)/alarm_cpp_test \ $(BINDIR)/$(CONFIG)/async_end2end_test \ $(BINDIR)/$(CONFIG)/auth_property_iterator_test \ @@ -1520,17 +1482,9 @@ buildtests_cxx: buildtests_zookeeper privatelibs_cxx \ endif -ifeq ($(HAS_ZOOKEEPER),true) -buildtests_zookeeper: privatelibs_zookeeper \ - -else -buildtests_zookeeper: -endif - - -test: test_c test_cxx test_zookeeper +test: test_c test_cxx -flaky_test: flaky_test_c flaky_test_cxx flaky_test_zookeeper +flaky_test: flaky_test_c flaky_test_cxx test_c: buildtests_c $(E) "[RUN] Testing alarm_test" @@ -1752,7 +1706,7 @@ flaky_test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/mlog_test || ( echo test mlog_test failed ; exit 1 ) -test_cxx: test_zookeeper buildtests_cxx +test_cxx: buildtests_cxx $(E) "[RUN] Testing alarm_cpp_test" $(Q) $(BINDIR)/$(CONFIG)/alarm_cpp_test || ( echo test alarm_cpp_test failed ; exit 1 ) $(E) "[RUN] Testing async_end2end_test" @@ -1818,18 +1772,6 @@ test_cxx: test_zookeeper buildtests_cxx flaky_test_cxx: buildtests_cxx -ifeq ($(HAS_ZOOKEEPER),true) -test_zookeeper: buildtests_zookeeper - - -flaky_test_zookeeper: buildtests_zookeeper - -else -test_zookeeper: -flaky_test_zookeeper: -endif - - test_python: static_c $(E) "[RUN] Testing python code" $(Q) tools/run_tests/run_tests.py -lpython -c$(CONFIG) @@ -1867,8 +1809,6 @@ ifeq ($(CONFIG),opt) $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc_cronet.a $(E) "[STRIP] Stripping libgrpc_unsecure.a" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a -ifeq ($(HAS_ZOOKEEPER),true) -endif endif strip-static_cxx: static_cxx @@ -1891,8 +1831,6 @@ ifeq ($(CONFIG),opt) $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_cronet$(SHARED_VERSION).$(SHARED_EXT) $(E) "[STRIP] Stripping $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT)" $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) -ifeq ($(HAS_ZOOKEEPER),true) -endif endif strip-shared_cxx: shared_cxx @@ -1925,11 +1863,6 @@ $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc: $(Q) mkdir -p $(@D) $(Q) echo "$(GRPC_UNSECURE_PC_FILE)" | tr , '\n' >$@ -$(LIBDIR)/$(CONFIG)/pkgconfig/grpc_zookeeper.pc: - $(E) "[MAKE] Generating $@" - $(Q) mkdir -p $(@D) - $(Q) echo "$(GRPC_ZOOKEEPER_PC_FILE)" | tr , '\n' >$@ - $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc: $(E) "[MAKE] Generating $@" $(Q) mkdir -p $(@D) @@ -2205,8 +2138,6 @@ install-static_c: static_c strip-static_c install-pkg-config_c $(E) "[INSTALL] Installing libgrpc_unsecure.a" $(Q) $(INSTALL) -d $(prefix)/lib $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.a $(prefix)/lib/libgrpc_unsecure.a -ifeq ($(HAS_ZOOKEEPER),true) -endif install-static_cxx: static_cxx strip-static_cxx install-pkg-config_cxx $(E) "[INSTALL] Installing libgrpc++.a" @@ -2258,8 +2189,6 @@ else ifneq ($(SYSTEM),Darwin) $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_unsecure.so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_unsecure.so endif -ifeq ($(HAS_ZOOKEEPER),true) -endif ifneq ($(SYSTEM),MINGW32) ifneq ($(SYSTEM),Darwin) $(Q) ldconfig || true @@ -2295,8 +2224,6 @@ else ifneq ($(SYSTEM),Darwin) $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_unsecure.so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc++_unsecure.so endif -ifeq ($(HAS_ZOOKEEPER),true) -endif ifneq ($(SYSTEM),MINGW32) ifneq ($(SYSTEM),Darwin) $(Q) ldconfig || true @@ -2314,8 +2241,6 @@ else ifneq ($(SYSTEM),Darwin) $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_csharp_ext.so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc_csharp_ext$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/libgrpc_csharp_ext.so endif -ifeq ($(HAS_ZOOKEEPER),true) -endif ifneq ($(SYSTEM),MINGW32) ifneq ($(SYSTEM),Darwin) $(Q) ldconfig || true @@ -2342,14 +2267,11 @@ else $(Q) $(INSTALL) $(BINDIR)/$(CONFIG)/grpc_ruby_plugin $(prefix)/bin/grpc_ruby_plugin endif -install-pkg-config_c: pc_c pc_c_unsecure pc_c_zookeeper +install-pkg-config_c: pc_c pc_c_unsecure $(E) "[INSTALL] Installing C pkg-config files" $(Q) $(INSTALL) -d $(prefix)/lib/pkgconfig $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/pkgconfig/grpc.pc $(prefix)/lib/pkgconfig/grpc.pc $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc $(prefix)/lib/pkgconfig/grpc_unsecure.pc -ifeq ($(HAS_ZOOKEEPER),true) - $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_zookeeper.pc $(prefix)/lib/pkgconfig/grpc_zookeeper.pc -endif install-pkg-config_cxx: pc_cxx pc_cxx_unsecure $(E) "[INSTALL] Installing C++ pkg-config files" diff --git a/doc/naming.md b/doc/naming.md index 5ad7e6622ed..d0c892e8d92 100644 --- a/doc/naming.md +++ b/doc/naming.md @@ -16,8 +16,6 @@ Here, scheme indicates the name-system to be used. Example schemes to be support * `dns` -* `zookeeper` - * `etcd` Authority indicates some scheme-specific bootstrap information, e.g., for DNS, the authority may include the IP[:port] of the DNS server to use. Often, a DNS name may used as the authority, since the ability to resolve DNS names is already built into all gRPC client libraries. @@ -30,23 +28,3 @@ The gRPC client library will switch on the scheme to pick the right resolver plu Resolvers should be able to contact the authority and get a resolution that they return back to the gRPC client library. The returned contents include a list of IP:port, an optional config and optional auth config data to be used for channel authentication. The plugin API allows the resolvers to continuously watch an endpoint_name and return updated resolutions as needed. -## Zookeeper - -Apache [ZooKeeper](https://zookeeper.apache.org/) is a popular solution for building name-systems. Curator is a service discovery system built on to of ZooKeeper. We propose to organize names hierarchically as `/path/service/instance` similar to Apache Curator. - -A fully-qualified ZooKeeper name used to construct a gRPC channel will look as follows: - -``` -zookeeper://host:port/path/service/instance -``` -Here `zookeeper` is the scheme identifying the name-system. `host:port` identifies an authoritative name-server for this scheme (i.e., a Zookeeper server). The host can be an IP address or a DNS name. -Finally `/path/service/instance` is the Zookeeper name to be resolved. - -## Service Registration - - -Service providers can register their services in Zookeeper by using a Zookeeper client. - -Each service is a zookeeper node, and each instance is a child node of the corresponding service. For example, a MySQL service may have multiple instances, `/mysql/1`, `/mysql/2`, `/mysql/3`. The name of the service or instance, as well as an optional path is specified by the service provider. - -The data in service nodes is empty. Each instance node stores its address in the format of `host:port`, where host can be either hostname or IP address. diff --git a/include/grpc/grpc_zookeeper.h b/include/grpc/grpc_zookeeper.h deleted file mode 100644 index 2b195c18bff..00000000000 --- a/include/grpc/grpc_zookeeper.h +++ /dev/null @@ -1,59 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/** Support zookeeper as alternative name system in addition to DNS - * Zookeeper name in gRPC is represented as a URI: - * zookeeper://host:port/path/service/instance - * - * Where zookeeper is the name system scheme - * host:port is the address of a zookeeper server - * /path/service/instance is the zookeeper name to be resolved - * - * Refer doc/naming.md for more details - */ - -#ifndef GRPC_GRPC_ZOOKEEPER_H -#define GRPC_GRPC_ZOOKEEPER_H - -#ifdef __cplusplus -extern "C" { -#endif - -/** Register zookeeper name resolver in grpc */ -void grpc_zookeeper_register(); - -#ifdef __cplusplus -} -#endif - -#endif /* GRPC_GRPC_ZOOKEEPER_H */ diff --git a/src/core/ext/resolver/zookeeper/README.md b/src/core/ext/resolver/zookeeper/README.md deleted file mode 100644 index ce6f39683bb..00000000000 --- a/src/core/ext/resolver/zookeeper/README.md +++ /dev/null @@ -1 +0,0 @@ -Zookeeper based name resolver: WIP diff --git a/templates/Makefile.template b/templates/Makefile.template index 0e3b9926b7d..0cbd8bfdd55 100644 --- a/templates/Makefile.template +++ b/templates/Makefile.template @@ -380,7 +380,6 @@ PROTOC_CHECK_VERSION_CMD = protoc --version | grep -q libprotoc.3 DTRACE_CHECK_CMD = which dtrace > /dev/null SYSTEMTAP_HEADERS_CHECK_CMD = $(CC) $(CPPFLAGS) $(CFLAGS) -o $(TMPOUT) test/build/systemtap.c $(LDFLAGS) - ZOOKEEPER_CHECK_CMD = $(CC) $(CPPFLAGS) $(CFLAGS) -o $(TMPOUT) test/build/zookeeper.c $(LDFLAGS) -lzookeeper_mt ifndef REQUIRE_CUSTOM_LIBRARIES_$(CONFIG) HAS_SYSTEM_PERFTOOLS ?= $(shell $(PERFTOOLS_CHECK_CMD) 2> /dev/null && echo true || echo false) @@ -448,8 +447,6 @@ CACHE_MK += HAS_SYSTEMTAP = true, endif - HAS_ZOOKEEPER = $(shell $(ZOOKEEPER_CHECK_CMD) 2> /dev/null && echo true || echo false) - # Note that for testing purposes, one can do: # make HAS_EMBEDDED_OPENSSL_ALPN=false # to emulate the fact we do not have OpenSSL in the third_party folder. @@ -593,14 +590,6 @@ PC_LIB = -lgrpc GRPC_UNSECURE_PC_FILE := $(PC_TEMPLATE) - # grpc_zookeeper .pc file - PC_NAME = gRPC zookeeper - PC_DESCRIPTION = gRPC's zookeeper plugin - PC_CFLAGS = - PC_REQUIRES_PRIVATE = - PC_LIBS_PRIVATE = -lzookeeper_mt - GRPC_ZOOKEEPER_PC_FILE := $(PC_TEMPLATE) - PROTOBUF_PKG_CONFIG = false PC_REQUIRES_GRPCXX = @@ -796,7 +785,6 @@ $(PERFTOOLS_CHECK_CMD) || true $(PROTOBUF_CHECK_CMD) || true $(PROTOC_CHECK_VERSION_CMD) || true - $(ZOOKEEPER_CHECK_CMD) || true third_party/protobuf/configure: $(E) "[AUTOGEN] Preparing protobuf" @@ -815,7 +803,7 @@ static: static_c static_cxx - static_c: pc_c pc_c_unsecure cache.mk pc_c_zookeeper\ + static_c: pc_c pc_c_unsecure cache.mk \ % for lib in libs: % if 'Makefile' in lib.get('build_system', ['Makefile']): % if lib.build == 'all' and lib.language == 'c' and not lib.get('external_deps', None): @@ -823,7 +811,6 @@ % endif % endif % endfor - static_zookeeper_libs static_cxx: pc_cxx pc_cxx_unsecure cache.mk \ @@ -838,7 +825,7 @@ shared: shared_c shared_cxx - shared_c: pc_c pc_c_unsecure cache.mk pc_c_zookeeper\ + shared_c: pc_c pc_c_unsecure cache.mk\ % for lib in libs: % if 'Makefile' in lib.get('build_system', ['Makefile']): % if lib.build == 'all' and lib.language == 'c' and not lib.get('external_deps', None): @@ -846,7 +833,6 @@ % endif % endif % endfor - shared_zookeeper_libs shared_cxx: pc_cxx pc_cxx_unsecure cache.mk\ % for lib in libs: @@ -867,33 +853,6 @@ % endif % endfor - ifeq ($(HAS_ZOOKEEPER),true) - static_zookeeper_libs:\ - % for lib in libs: - % if 'Makefile' in lib.get('build_system', ['Makefile']): - % if lib.build == 'all' and lib.language == 'c' and 'zookeeper' in lib.get('external_deps', []): - $(LIBDIR)/$(CONFIG)/lib${lib.name}.a\ - % endif - % endif - % endfor - - shared_zookeeper_libs:\ - % for lib in libs: - % if 'Makefile' in lib.get('build_system', ['Makefile']): - % if lib.build == 'all' and lib.language == 'c' and 'zookeeper' in lib.get('external_deps', []): - $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT)\ - % endif - % endif - % endfor - - else - - static_zookeeper_libs: - - shared_zookeeper_libs: - - endif - grpc_csharp_ext: shared_csharp plugins: $(PROTOC_PLUGINS) @@ -913,12 +872,6 @@ pc_c_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc - ifeq ($(HAS_ZOOKEEPER),true) - pc_c_zookeeper: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_zookeeper.pc - else - pc_c_zookeeper: - endif - pc_cxx: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc pc_cxx_unsecure: $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++_unsecure.pc @@ -932,7 +885,7 @@ % endif % endif % endfor - + else privatelibs_cxx: \ % for lib in libs: @@ -942,26 +895,11 @@ % endif % endif % endfor - - endif - - - ifeq ($(HAS_ZOOKEEPER),true) - privatelibs_zookeeper: \ - % for lib in libs: - % if 'Makefile' in lib.get('build_system', ['Makefile']): - % if lib.build == 'private' and lib.language == 'c++' and zookeeper in lib.get('external_deps', []): - $(LIBDIR)/$(CONFIG)/lib${lib.name}.a\ - % endif - % endif - % endfor - else - privatelibs_zookeeper: endif - buildtests: buildtests_c buildtests_cxx buildtests_zookeeper + buildtests: buildtests_c buildtests_cxx buildtests_c: privatelibs_c <%text>\ % for tgt in targets: @@ -972,40 +910,27 @@ ifeq ($(EMBED_OPENSSL),true) - buildtests_cxx: buildtests_zookeeper privatelibs_cxx <%text>\ + buildtests_cxx: privatelibs_cxx <%text>\ % for tgt in targets: % if tgt.build == 'test' and tgt.language == 'c++' and not tgt.get('external_deps', None): $(BINDIR)/$(CONFIG)/${tgt.name} <%text>\ % endif % endfor - + else - buildtests_cxx: buildtests_zookeeper privatelibs_cxx <%text>\ + buildtests_cxx: privatelibs_cxx <%text>\ % for tgt in targets: % if tgt.build == 'test' and tgt.language == 'c++' and not tgt.get('external_deps', None) and not tgt.boringssl: $(BINDIR)/$(CONFIG)/${tgt.name} <%text>\ % endif % endfor - - endif - - - ifeq ($(HAS_ZOOKEEPER),true) - buildtests_zookeeper: privatelibs_zookeeper <%text>\ - % for tgt in targets: - % if tgt.build == 'test' and tgt.language == 'c++' and 'zookeeper' in tgt.get('external_deps', []): - $(BINDIR)/$(CONFIG)/${tgt.name} <%text>\ - % endif - % endfor - else - buildtests_zookeeper: endif - test: test_c test_cxx test_zookeeper + test: test_c test_cxx - flaky_test: flaky_test_c flaky_test_cxx flaky_test_zookeeper + flaky_test: flaky_test_c flaky_test_cxx test_c: buildtests_c % for tgt in targets: @@ -1025,7 +950,7 @@ % endfor - test_cxx: test_zookeeper buildtests_cxx + test_cxx: buildtests_cxx % for tgt in targets: % if tgt.build == 'test' and tgt.get('run', True) and tgt.language == 'c++' and not tgt.get('flaky', False) and not tgt.get('external_deps', None): $(E) "[RUN] Testing ${tgt.name}" @@ -1043,30 +968,6 @@ % endfor - ifeq ($(HAS_ZOOKEEPER),true) - test_zookeeper: buildtests_zookeeper - % for tgt in targets: - % if tgt.build == 'test' and tgt.get('run', True) and tgt.language == 'c++' and not tgt.get('flaky', False) and 'zookeeper' in tgt.get('external_deps', []): - $(E) "[RUN] Testing ${tgt.name}" - $(Q) $(BINDIR)/$(CONFIG)/${tgt.name} || ( echo test ${tgt.name} failed ; exit 1 ) - % endif - % endfor - - - flaky_test_zookeeper: buildtests_zookeeper - % for tgt in targets: - % if tgt.build == 'test' and tgt.get('run', True) and tgt.language == 'c++' and tgt.get('flaky', False) and 'zookeeper' in tgt.get('external_deps', []): - $(E) "[RUN] Testing ${tgt.name}" - $(Q) $(BINDIR)/$(CONFIG)/${tgt.name} || ( echo test ${tgt.name} failed ; exit 1 ) - % endif - % endfor - - else - test_zookeeper: - flaky_test_zookeeper: - endif - - test_python: static_c $(E) "[RUN] Testing python code" $(Q) tools/run_tests/run_tests.py -lpython -c$(CONFIG) @@ -1126,20 +1027,6 @@ % endif % endif % endfor - ifeq ($(HAS_ZOOKEEPER),true) - % for lib in libs: - % if 'Makefile' in lib.get('build_system', ['Makefile']): - % if lib.language == "c": - % if lib.build == "all": - % if 'zookeeper' in lib.get('external_deps', []): - $(E) "[STRIP] Stripping lib${lib.name}.a" - $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/lib${lib.name}.a - % endif - % endif - % endif - % endif - % endfor - endif endif strip-static_cxx: static_cxx @@ -1170,20 +1057,6 @@ % endif % endif % endfor - ifeq ($(HAS_ZOOKEEPER),true) - % for lib in libs: - % if 'Makefile' in lib.get('build_system', ['Makefile']): - % if lib.language == "c": - % if lib.build == "all": - % if 'zookeeper' in lib.get('external_deps', []): - $(E) "[STRIP] Stripping $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT)" - $(Q) $(STRIP) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) - % endif - % endif - % endif - % endif - % endfor - endif endif strip-shared_cxx: shared_cxx @@ -1228,11 +1101,6 @@ $(Q) mkdir -p $(@D) $(Q) echo "$(GRPC_UNSECURE_PC_FILE)" | tr , '\n' >$@ - $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_zookeeper.pc: - $(E) "[MAKE] Generating $@" - $(Q) mkdir -p $(@D) - $(Q) echo "$(GRPC_ZOOKEEPER_PC_FILE)" | tr , '\n' >$@ - $(LIBDIR)/$(CONFIG)/pkgconfig/grpc++.pc: $(E) "[MAKE] Generating $@" $(Q) mkdir -p $(@D) @@ -1331,21 +1199,6 @@ % endif % endif % endfor - ifeq ($(HAS_ZOOKEEPER),true) - % for lib in libs: - % if 'Makefile' in lib.get('build_system', ['Makefile']): - % if lib.language == "c": - % if lib.build == "all": - % if 'zookeeper' in lib.get('external_deps', []): - $(E) "[INSTALL] Installing lib${lib.name}.a" - $(Q) $(INSTALL) -d $(prefix)/lib - $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/lib${lib.name}.a $(prefix)/lib/lib${lib.name}.a - % endif - % endif - % endif - % endif - % endfor - endif install-static_cxx: static_cxx strip-static_cxx install-pkg-config_cxx % for lib in libs: @@ -1380,27 +1233,6 @@ % endif % endif % endfor - ifeq ($(HAS_ZOOKEEPER),true) - % for lib in libs: - % if 'Makefile' in lib.get('build_system', ['Makefile']): - % if lib.language == lang_filter: - % if lib.build == "all": - % if 'zookeeper' in lib.get('external_deps', []): - $(E) "[INSTALL] Installing $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT)" - $(Q) $(INSTALL) -d $(prefix)/lib - $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/$(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) - ifeq ($(SYSTEM),MINGW32) - $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/lib${lib.name}-imp.a $(prefix)/lib/lib${lib.name}-imp.a - else ifneq ($(SYSTEM),Darwin) - $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.so.${settings.core_version.major} - $(Q) ln -sf $(SHARED_PREFIX)${lib.name}$(SHARED_VERSION).$(SHARED_EXT) $(prefix)/lib/lib${lib.name}.so - endif - % endif - % endif - % endif - % endif - % endfor - endif ifneq ($(SYSTEM),MINGW32) ifneq ($(SYSTEM),Darwin) $(Q) ldconfig || true @@ -1430,14 +1262,11 @@ % endfor endif - install-pkg-config_c: pc_c pc_c_unsecure pc_c_zookeeper + install-pkg-config_c: pc_c pc_c_unsecure $(E) "[INSTALL] Installing C pkg-config files" $(Q) $(INSTALL) -d $(prefix)/lib/pkgconfig $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/pkgconfig/grpc.pc $(prefix)/lib/pkgconfig/grpc.pc $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_unsecure.pc $(prefix)/lib/pkgconfig/grpc_unsecure.pc - ifeq ($(HAS_ZOOKEEPER),true) - $(Q) $(INSTALL) $(LIBDIR)/$(CONFIG)/pkgconfig/grpc_zookeeper.pc $(prefix)/lib/pkgconfig/grpc_zookeeper.pc - endif install-pkg-config_cxx: pc_cxx pc_cxx_unsecure $(E) "[INSTALL] Installing C++ pkg-config files" @@ -1645,9 +1474,6 @@ for src in lib.src: sources_that_don_t_need_openssl.add(src) - if 'zookeeper' in lib.get('external_deps', []): - libs = libs + ' -lzookeeper_mt' - if lib.get('secure', 'check') == True or lib.get('secure', 'check') == 'check': lib_deps = lib_deps + ' $(OPENSSL_DEP)' mingw_lib_deps = mingw_lib_deps + ' $(OPENSSL_DEP)' @@ -1802,9 +1628,6 @@ % for dep in tgt.deps: $(LIBDIR)/$(CONFIG)/lib${dep}.a\ % endfor - % if 'zookeeper' in tgt.get('external_deps', []): - -lzookeeper_mt\ - % endif % if tgt.language == "c++": % if tgt.build == 'protoc': $(HOST_LDLIBSXX) $(HOST_LDLIBS_PROTOC)\ diff --git a/templates/tools/dockerfile/run_tests_addons_nocache.include b/templates/tools/dockerfile/run_tests_addons_nocache.include index 242a1acfb3a..74b01e386c3 100644 --- a/templates/tools/dockerfile/run_tests_addons_nocache.include +++ b/templates/tools/dockerfile/run_tests_addons_nocache.include @@ -1,6 +1,2 @@ -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/test/build/zookeeper.c b/test/build/zookeeper.c deleted file mode 100644 index 7cd3d0da9e9..00000000000 --- a/test/build/zookeeper.c +++ /dev/null @@ -1,43 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -/* This is just a compilation test, to see if we have Zookeeper C client - library installed. */ - -#include -#include - -int main() { - zookeeper_init(NULL, NULL, 0, 0, 0, 0); - return 0; -} diff --git a/test/cpp/end2end/shutdown_test.cc b/test/cpp/end2end/shutdown_test.cc index aa8d42141d4..3f98de6db7b 100644 --- a/test/cpp/end2end/shutdown_test.cc +++ b/test/cpp/end2end/shutdown_test.cc @@ -123,7 +123,6 @@ class ShutdownTest : public ::testing::Test { TestServiceImpl service_; }; -// Tests zookeeper state change between two RPCs // TODO(ctiller): leaked objects in this test TEST_F(ShutdownTest, ShutdownTest) { ResetStub(); diff --git a/test/cpp/end2end/zookeeper_test.cc b/test/cpp/end2end/zookeeper_test.cc deleted file mode 100644 index fdc500e5352..00000000000 --- a/test/cpp/end2end/zookeeper_test.cc +++ /dev/null @@ -1,219 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include "src/core/lib/support/env.h" -#include "src/proto/grpc/testing/echo.grpc.pb.h" -#include "test/core/util/port.h" -#include "test/core/util/test_config.h" - -using grpc::testing::EchoRequest; -using grpc::testing::EchoResponse; - -namespace grpc { -namespace testing { - -class ZookeeperTestServiceImpl - : public ::grpc::testing::EchoTestService::Service { - public: - Status Echo(ServerContext* context, const EchoRequest* request, - EchoResponse* response) GRPC_OVERRIDE { - response->set_message(request->message()); - return Status::OK; - } -}; - -class ZookeeperTest : public ::testing::Test { - protected: - ZookeeperTest() {} - - void SetUp() GRPC_OVERRIDE { - SetUpZookeeper(); - - // Sets up two servers - int port1 = grpc_pick_unused_port_or_die(); - server1_ = SetUpServer(port1); - - int port2 = grpc_pick_unused_port_or_die(); - server2_ = SetUpServer(port2); - - // Registers service /test in zookeeper - RegisterService("/test", "test"); - - // Registers service instance /test/1 in zookeeper - string value = - "{\"host\":\"localhost\",\"port\":\"" + to_string(port1) + "\"}"; - RegisterService("/test/1", value); - - // Registers service instance /test/2 in zookeeper - value = "{\"host\":\"localhost\",\"port\":\"" + to_string(port2) + "\"}"; - RegisterService("/test/2", value); - } - - // Requires zookeeper server running - void SetUpZookeeper() { - // Finds zookeeper server address in environment - // Default is localhost:2181 - zookeeper_address_ = "localhost:2181"; - char* addr = gpr_getenv("GRPC_ZOOKEEPER_SERVER_TEST"); - if (addr != NULL) { - string addr_str(addr); - zookeeper_address_ = addr_str; - gpr_free(addr); - } - gpr_log(GPR_DEBUG, "%s", zookeeper_address_.c_str()); - - // Connects to zookeeper server - zoo_set_debug_level(ZOO_LOG_LEVEL_WARN); - zookeeper_handle_ = - zookeeper_init(zookeeper_address_.c_str(), NULL, 15000, 0, 0, 0); - GPR_ASSERT(zookeeper_handle_ != NULL); - - // Registers zookeeper name resolver in grpc - grpc_zookeeper_register(); - } - - std::unique_ptr SetUpServer(const int port) { - string server_address = "localhost:" + to_string(port); - - ServerBuilder builder; - builder.AddListeningPort(server_address, InsecureServerCredentials()); - builder.RegisterService(&service_); - std::unique_ptr server = builder.BuildAndStart(); - return server; - } - - void RegisterService(const string& name, const string& value) { - char* path = (char*)gpr_malloc(name.size()); - - int status = zoo_exists(zookeeper_handle_, name.c_str(), 0, NULL); - if (status == ZNONODE) { - status = - zoo_create(zookeeper_handle_, name.c_str(), value.c_str(), - value.size(), &ZOO_OPEN_ACL_UNSAFE, 0, path, name.size()); - } else { - status = zoo_set(zookeeper_handle_, name.c_str(), value.c_str(), - value.size(), -1); - } - gpr_free(path); - GPR_ASSERT(status == 0); - } - - void DeleteService(const string& name) { - int status = zoo_delete(zookeeper_handle_, name.c_str(), -1); - GPR_ASSERT(status == 0); - } - - void ChangeZookeeperState() { - server1_->Shutdown(); - DeleteService("/test/1"); - } - - void TearDown() GRPC_OVERRIDE { - server1_->Shutdown(); - server2_->Shutdown(); - zookeeper_close(zookeeper_handle_); - } - - void ResetStub() { - string target = "zookeeper://" + zookeeper_address_ + "/test"; - channel_ = CreateChannel(target, InsecureChannelCredentials()); - stub_ = grpc::testing::EchoTestService::NewStub(channel_); - } - - string to_string(const int number) { - std::stringstream strs; - strs << number; - return strs.str(); - } - - std::shared_ptr channel_; - std::unique_ptr stub_; - std::unique_ptr server1_; - std::unique_ptr server2_; - ZookeeperTestServiceImpl service_; - zhandle_t* zookeeper_handle_; - string zookeeper_address_; -}; - -// Tests zookeeper state change between two RPCs -// TODO(ctiller): leaked objects in this test -TEST_F(ZookeeperTest, ZookeeperStateChangeTwoRpc) { - ResetStub(); - - // First RPC - EchoRequest request1; - EchoResponse response1; - ClientContext context1; - context1.set_authority("test"); - request1.set_message("Hello"); - Status s1 = stub_->Echo(&context1, request1, &response1); - EXPECT_EQ(response1.message(), request1.message()); - EXPECT_TRUE(s1.ok()); - - // Zookeeper state changes - gpr_log(GPR_DEBUG, "Zookeeper state change"); - ChangeZookeeperState(); - // Waits for re-resolving addresses - // TODO(ctiller): RPC will probably fail if not waiting - sleep(1); - - // Second RPC - EchoRequest request2; - EchoResponse response2; - ClientContext context2; - context2.set_authority("test"); - request2.set_message("World"); - Status s2 = stub_->Echo(&context2, request2, &response2); - EXPECT_EQ(response2.message(), request2.message()); - EXPECT_TRUE(s2.ok()); -} - -} // 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/dockerfile/grpc_check_generated_pb_files/Dockerfile b/tools/dockerfile/grpc_check_generated_pb_files/Dockerfile index 7658991462d..d19bc67120f 100644 --- a/tools/dockerfile/grpc_check_generated_pb_files/Dockerfile +++ b/tools/dockerfile/grpc_check_generated_pb_files/Dockerfile @@ -67,11 +67,6 @@ RUN apt-get update && apt-get install -y time && apt-get clean # C++ dependencies RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev - RUN mkdir /var/local/jenkins # Define the default command. diff --git a/tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile index baab2f56380..150dde4f212 100644 --- a/tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_csharp/Dockerfile @@ -88,10 +88,6 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/interoptest/grpc_interop_cxx/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_cxx/Dockerfile index 2bbccca9e51..bbd903e2696 100644 --- a/tools/dockerfile/interoptest/grpc_interop_cxx/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_cxx/Dockerfile @@ -75,10 +75,6 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile index 2a8d35a5dc1..be07094cd27 100644 --- a/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_node/Dockerfile @@ -82,10 +82,6 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/interoptest/grpc_interop_php/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_php/Dockerfile index e27a6a23013..af83ee61646 100644 --- a/tools/dockerfile/interoptest/grpc_interop_php/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_php/Dockerfile @@ -100,10 +100,6 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile index 071fb2c93b1..db01e301dec 100644 --- a/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_python/Dockerfile @@ -86,10 +86,6 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile b/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile index df8eef54385..88b513032ac 100644 --- a/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile +++ b/tools/dockerfile/interoptest/grpc_interop_ruby/Dockerfile @@ -86,10 +86,6 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_node/Dockerfile b/tools/dockerfile/stress_test/grpc_interop_stress_node/Dockerfile index 4fd7cc29a3c..0738e95e9bc 100644 --- a/tools/dockerfile/stress_test/grpc_interop_stress_node/Dockerfile +++ b/tools/dockerfile/stress_test/grpc_interop_stress_node/Dockerfile @@ -87,10 +87,6 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile b/tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile index c29aaf7c3f3..3092bd955e2 100644 --- a/tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile +++ b/tools/dockerfile/stress_test/grpc_interop_stress_php/Dockerfile @@ -105,10 +105,6 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/test/csharp_coreclr_x64/Dockerfile b/tools/dockerfile/test/csharp_coreclr_x64/Dockerfile index fd7215716d3..98515aa5d73 100644 --- a/tools/dockerfile/test/csharp_coreclr_x64/Dockerfile +++ b/tools/dockerfile/test/csharp_coreclr_x64/Dockerfile @@ -103,10 +103,6 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/test/csharp_jessie_x64/Dockerfile b/tools/dockerfile/test/csharp_jessie_x64/Dockerfile index baab2f56380..150dde4f212 100644 --- a/tools/dockerfile/test/csharp_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/csharp_jessie_x64/Dockerfile @@ -88,10 +88,6 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/test/cxx_jessie_x64/Dockerfile b/tools/dockerfile/test/cxx_jessie_x64/Dockerfile index 64921589299..a8aa74dd0e0 100644 --- a/tools/dockerfile/test/cxx_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/cxx_jessie_x64/Dockerfile @@ -108,10 +108,6 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/test/cxx_jessie_x86/Dockerfile b/tools/dockerfile/test/cxx_jessie_x86/Dockerfile index 92c9c4ce86e..abd3e42f266 100644 --- a/tools/dockerfile/test/cxx_jessie_x86/Dockerfile +++ b/tools/dockerfile/test/cxx_jessie_x86/Dockerfile @@ -75,10 +75,6 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile b/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile index 5982c9783e0..5ef25e80b47 100644 --- a/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile +++ b/tools/dockerfile/test/cxx_ubuntu1404_x64/Dockerfile @@ -67,10 +67,6 @@ RUN apt-get update && apt-get install -y time && apt-get clean # C++ dependencies RUN apt-get update && apt-get -y install libgflags-dev libgtest-dev libc++-dev clang && apt-get clean -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile b/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile index d356433163e..c65fc619778 100644 --- a/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile +++ b/tools/dockerfile/test/cxx_ubuntu1604_x64/Dockerfile @@ -75,10 +75,6 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile b/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile index dd9a79b1ed5..9d5dd52c18f 100644 --- a/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile +++ b/tools/dockerfile/test/cxx_wheezy_x64/Dockerfile @@ -86,10 +86,6 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/test/fuzzer/Dockerfile b/tools/dockerfile/test/fuzzer/Dockerfile index 6ba31114ab6..3ac134ad7da 100644 --- a/tools/dockerfile/test/fuzzer/Dockerfile +++ b/tools/dockerfile/test/fuzzer/Dockerfile @@ -108,10 +108,6 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/test/multilang_jessie_x64/Dockerfile b/tools/dockerfile/test/multilang_jessie_x64/Dockerfile index 5c3f77405ea..5e5969cda2f 100644 --- a/tools/dockerfile/test/multilang_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/multilang_jessie_x64/Dockerfile @@ -147,10 +147,6 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/test/node_jessie_x64/Dockerfile b/tools/dockerfile/test/node_jessie_x64/Dockerfile index 2a8d35a5dc1..be07094cd27 100644 --- a/tools/dockerfile/test/node_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/node_jessie_x64/Dockerfile @@ -82,10 +82,6 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/test/php_jessie_x64/Dockerfile b/tools/dockerfile/test/php_jessie_x64/Dockerfile index d8d27846c16..e477295722a 100644 --- a/tools/dockerfile/test/php_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/php_jessie_x64/Dockerfile @@ -85,10 +85,6 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/test/python_jessie_x64/Dockerfile b/tools/dockerfile/test/python_jessie_x64/Dockerfile index 071fb2c93b1..db01e301dec 100644 --- a/tools/dockerfile/test/python_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/python_jessie_x64/Dockerfile @@ -86,10 +86,6 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins diff --git a/tools/dockerfile/test/ruby_jessie_x64/Dockerfile b/tools/dockerfile/test/ruby_jessie_x64/Dockerfile index df8eef54385..88b513032ac 100644 --- a/tools/dockerfile/test/ruby_jessie_x64/Dockerfile +++ b/tools/dockerfile/test/ruby_jessie_x64/Dockerfile @@ -86,10 +86,6 @@ RUN ln -s /usr/bin/ccache /usr/local/bin/c++ RUN ln -s /usr/bin/ccache /usr/local/bin/clang RUN ln -s /usr/bin/ccache /usr/local/bin/clang++ -#====================== -# Zookeeper dependencies -# TODO(jtattermusch): is zookeeper still needed? -RUN apt-get install -y libzookeeper-mt-dev RUN mkdir /var/local/jenkins From 98716b3bb71c9005189918f928ff7bf2f4f90e84 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Fri, 1 Jul 2016 13:10:32 -0700 Subject: [PATCH 1464/1894] Change port_server.py to use port 32766 --- tools/run_tests/port_server.py | 4 ++-- tools/run_tests/run_tests.py | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/tools/run_tests/port_server.py b/tools/run_tests/port_server.py index 14e82b601ea..e2be26d182c 100755 --- a/tools/run_tests/port_server.py +++ b/tools/run_tests/port_server.py @@ -42,7 +42,7 @@ import time # increment this number whenever making a change to ensure that # the changes are picked up by running CI servers # note that all changes must be backwards compatible -_MY_VERSION = 7 +_MY_VERSION = 8 if len(sys.argv) == 2 and sys.argv[1] == 'dump_version': @@ -70,7 +70,7 @@ in_use = {} def refill_pool(max_timeout, req): """Scan for ports not marked for being in use""" - for i in range(1025, 32767): + for i in range(1025, 32766): if len(pool) > 100: break if i in in_use: age = time.time() - in_use[i] diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index 4fc1be199cf..82c835fe5da 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -1031,7 +1031,23 @@ class TestCache(object): self.parse(json.loads(f.read())) +def _shut_down_legacy_server(legacy_server_port): + try: + version = int(urllib2.urlopen( + 'http://localhost:%d/version_number' % legacy_server_port, + timeout=10).read()) + except: + pass + else: + urllib2.urlopen( + 'http://localhost:%d/quitquitquit' % legacy_server_port).read() + + def _start_port_server(port_server_port): + # Temporary patch to switch the port_server port + # see https://github.com/grpc/grpc/issues/7145 + _shut_down_legacy_server(32767) + # check if a compatible port server is running # if incompatible (version mismatch) ==> start a new one # if not running ==> start a new one @@ -1167,7 +1183,7 @@ def _build_and_run( # start antagonists antagonists = [subprocess.Popen(['tools/run_tests/antagonist.py']) for _ in range(0, args.antagonists)] - port_server_port = 32767 + port_server_port = 32766 _start_port_server(port_server_port) resultset = None num_test_failures = 0 From d9dfc673fc5af5b7904833704a3b9f5b44038419 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Thu, 30 Jun 2016 23:50:48 -0700 Subject: [PATCH 1465/1894] Change port_server.py to use port 32766 32767 is used by filenet-powsrm --- tools/run_tests/port_server.py | 4 ++-- tools/run_tests/run_tests.py | 18 +++++++++++++++++- 2 files changed, 19 insertions(+), 3 deletions(-) diff --git a/tools/run_tests/port_server.py b/tools/run_tests/port_server.py index 14e82b601ea..e2be26d182c 100755 --- a/tools/run_tests/port_server.py +++ b/tools/run_tests/port_server.py @@ -42,7 +42,7 @@ import time # increment this number whenever making a change to ensure that # the changes are picked up by running CI servers # note that all changes must be backwards compatible -_MY_VERSION = 7 +_MY_VERSION = 8 if len(sys.argv) == 2 and sys.argv[1] == 'dump_version': @@ -70,7 +70,7 @@ in_use = {} def refill_pool(max_timeout, req): """Scan for ports not marked for being in use""" - for i in range(1025, 32767): + for i in range(1025, 32766): if len(pool) > 100: break if i in in_use: age = time.time() - in_use[i] diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index e4779e3a4e8..a1aa8d7c097 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -1098,7 +1098,23 @@ class TestCache(object): self.parse(json.loads(f.read())) +def _shut_down_legacy_server(legacy_server_port): + try: + version = int(urllib2.urlopen( + 'http://localhost:%d/version_number' % legacy_server_port, + timeout=10).read()) + except: + pass + else: + urllib2.urlopen( + 'http://localhost:%d/quitquitquit' % legacy_server_port).read() + + def _start_port_server(port_server_port): + # Temporary patch to switch the port_server port + # see https://github.com/grpc/grpc/issues/7145 + _shut_down_legacy_server(32767) + # check if a compatible port server is running # if incompatible (version mismatch) ==> start a new one # if not running ==> start a new one @@ -1234,7 +1250,7 @@ def _build_and_run( # start antagonists antagonists = [subprocess.Popen(['tools/run_tests/antagonist.py']) for _ in range(0, args.antagonists)] - port_server_port = 32767 + port_server_port = 32766 _start_port_server(port_server_port) resultset = None num_test_failures = 0 From 88eb42b2cfa61a8c6214d0a855dfe4da36be8959 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 1 Jul 2016 13:17:04 -0700 Subject: [PATCH 1466/1894] Add grpc module pointer file for Node health check tests --- src/node/health_check/node_modules/grpc.js | 37 ++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 src/node/health_check/node_modules/grpc.js diff --git a/src/node/health_check/node_modules/grpc.js b/src/node/health_check/node_modules/grpc.js new file mode 100644 index 00000000000..42161198ccd --- /dev/null +++ b/src/node/health_check/node_modules/grpc.js @@ -0,0 +1,37 @@ +/* + * + * Copyright 2016, Google Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are + * met: + * + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above + * copyright notice, this list of conditions and the following disclaimer + * in the documentation and/or other materials provided with the + * distribution. + * * Neither the name of Google Inc. nor the names of its + * contributors may be used to endorse or promote products derived from + * this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS + * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT + * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR + * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT + * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE + * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + * + */ + +/* This exists solely to allow the generated code to import the grpc module + * without using a relative path */ + +module.exports = require('../..'); From 2b49ea9d54bb3605f6b39672f68a1fbf6cf95df2 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 1 Jul 2016 13:21:27 -0700 Subject: [PATCH 1467/1894] Fix compile erors --- src/core/lib/iomgr/ev_epoll_linux.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 6dfd363b0b5..af23e35ca3d 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -276,7 +276,7 @@ static void append_error(grpc_error **composite, grpc_error *error, static grpc_wakeup_fd polling_island_wakeup_fd; /* Forward declaration */ -static void polling_island_delete(grpc_exec_ctx *exec_ctx); +static void polling_island_delete(grpc_exec_ctx *exec_ctx, polling_island *pi); #ifdef GRPC_TSAN /* Currently TSAN may incorrectly flag data races between epoll_ctl and @@ -325,7 +325,7 @@ static void pi_unref(grpc_exec_ctx *exec_ctx, polling_island *pi) { polling_island *next = (polling_island *)gpr_atm_acq_load(&pi->merged_to); polling_island_delete(exec_ctx, pi); if (next != NULL) { - PI_UNREF(next, "pi_delete"); /* Recursive call */ + PI_UNREF(exec_ctx, next, "pi_delete"); /* Recursive call */ } } } @@ -465,7 +465,6 @@ static polling_island *polling_island_create(grpc_exec_ctx *exec_ctx, grpc_fd *initial_fd, grpc_error **error) { polling_island *pi = NULL; - char *err_msg; const char *err_desc = "polling_island_create"; *error = GRPC_ERROR_NONE; @@ -1273,7 +1272,7 @@ static void pollset_destroy(grpc_pollset *pollset) { gpr_mu_destroy(&pollset->mu); } -static void pollset_reset(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset) { +static void pollset_reset(grpc_pollset *pollset) { GPR_ASSERT(pollset->shutting_down); GPR_ASSERT(!pollset_has_workers(pollset)); pollset->shutting_down = false; From e38b917f9ee0e9f801384f6c89fe822f72eefa24 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Fri, 1 Jul 2016 13:48:06 -0700 Subject: [PATCH 1468/1894] Check Python ByteBuffer reader init status --- src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi | 4 ++-- src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi index f3b3d612736..7714504d1bb 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/grpc.pxi @@ -132,8 +132,8 @@ cdef extern from "grpc/_cython/loader.h": size_t grpc_byte_buffer_length(grpc_byte_buffer *bb) nogil void grpc_byte_buffer_destroy(grpc_byte_buffer *byte_buffer) nogil - void grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, - grpc_byte_buffer *buffer) nogil + int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, + grpc_byte_buffer *buffer) nogil int grpc_byte_buffer_reader_next(grpc_byte_buffer_reader *reader, gpr_slice *slice) nogil void grpc_byte_buffer_reader_destroy(grpc_byte_buffer_reader *reader) nogil diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi index 8e651e880f3..b39b2f08de7 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pyx.pxi @@ -252,9 +252,13 @@ cdef class ByteBuffer: cdef gpr_slice data_slice cdef size_t data_slice_length cdef void *data_slice_pointer + cdef bint reader_status if self.c_byte_buffer != NULL: with nogil: - grpc_byte_buffer_reader_init(&reader, self.c_byte_buffer) + reader_status = grpc_byte_buffer_reader_init( + &reader, self.c_byte_buffer) + if not reader_status: + return None result = bytearray() with nogil: while grpc_byte_buffer_reader_next(&reader, &data_slice): From e4123f308342cf6985f04c41e375d8cb995a9121 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Fri, 1 Jul 2016 14:54:52 -0700 Subject: [PATCH 1469/1894] Updated release version to 0.15.1 --- Makefile | 2 +- build.yaml | 2 +- package.json | 2 +- package.xml | 4 ++-- src/core/lib/surface/version.c | 2 +- src/csharp/Grpc.Auth/project.json | 4 ++-- src/csharp/Grpc.Core/VersionInfo.cs | 4 ++-- src/csharp/Grpc.Core/project.json | 2 +- src/csharp/Grpc.HealthCheck/project.json | 4 ++-- src/csharp/build_packages.bat | 2 +- src/node/tools/package.json | 2 +- src/python/grpcio/grpc_version.py | 2 +- src/ruby/lib/grpc/version.rb | 2 +- src/ruby/tools/version.rb | 2 +- tools/distrib/python/grpcio_tools/grpc_version.py | 2 +- tools/distrib/python/grpcio_tools/setup.py | 2 +- tools/doxygen/Doxyfile.c++ | 2 +- tools/doxygen/Doxyfile.c++.internal | 2 +- tools/doxygen/Doxyfile.core | 2 +- tools/doxygen/Doxyfile.core.internal | 2 +- 20 files changed, 24 insertions(+), 24 deletions(-) diff --git a/Makefile b/Makefile index d369653be3c..dabc02bd2e0 100644 --- a/Makefile +++ b/Makefile @@ -414,7 +414,7 @@ E = @echo Q = @ endif -VERSION = 0.15.0 +VERSION = 0.15.1 CPPFLAGS_NO_ARCH += $(addprefix -I, $(INCLUDES)) $(addprefix -D, $(DEFINES)) CPPFLAGS += $(CPPFLAGS_NO_ARCH) $(ARCH_FLAGS) diff --git a/build.yaml b/build.yaml index ffc681d9028..d550c0107fa 100644 --- a/build.yaml +++ b/build.yaml @@ -7,7 +7,7 @@ settings: '#3': Use "-preN" suffixes to identify pre-release versions '#4': Per-language overrides are possible with (eg) ruby_version tag here '#5': See the expand_version.py for all the quirks here - version: 0.15.0 + version: 0.15.1 filegroups: - name: census public_headers: diff --git a/package.json b/package.json index 1b2920c6bc4..f0e1f033f23 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "grpc", - "version": "0.15.0", + "version": "0.15.1", "author": "Google Inc.", "description": "gRPC Library for Node", "homepage": "http://www.grpc.io/", diff --git a/package.xml b/package.xml index 1304eb06fa3..c88314480a4 100644 --- a/package.xml +++ b/package.xml @@ -13,8 +13,8 @@ 2016-06-30 - 0.15.0 - 0.15.0 + 0.15.1 + 0.15.1 beta diff --git a/src/core/lib/surface/version.c b/src/core/lib/surface/version.c index e4a3358c351..8ad93e8ac34 100644 --- a/src/core/lib/surface/version.c +++ b/src/core/lib/surface/version.c @@ -36,4 +36,4 @@ #include -const char *grpc_version_string(void) { return "0.15.0"; } +const char *grpc_version_string(void) { return "0.15.1"; } diff --git a/src/csharp/Grpc.Auth/project.json b/src/csharp/Grpc.Auth/project.json index ae83c3be2b8..7865203ab8a 100644 --- a/src/csharp/Grpc.Auth/project.json +++ b/src/csharp/Grpc.Auth/project.json @@ -1,5 +1,5 @@ { - "version": "0.15.0", + "version": "0.15.1", "title": "gRPC C# Auth", "authors": [ "Google Inc." ], "copyright": "Copyright 2015, Google Inc.", @@ -13,7 +13,7 @@ "tags": [ "gRPC RPC Protocol HTTP/2 Auth OAuth2" ], }, "dependencies": { - "Grpc.Core": "0.15.0", + "Grpc.Core": "0.15.1", "Google.Apis.Auth": "1.11.1" }, "frameworks": { diff --git a/src/csharp/Grpc.Core/VersionInfo.cs b/src/csharp/Grpc.Core/VersionInfo.cs index d89a2b5c6ee..d928f0dc3b7 100644 --- a/src/csharp/Grpc.Core/VersionInfo.cs +++ b/src/csharp/Grpc.Core/VersionInfo.cs @@ -48,11 +48,11 @@ namespace Grpc.Core /// /// Current AssemblyFileVersion of gRPC C# assemblies /// - public const string CurrentAssemblyFileVersion = "0.15.0.0"; + public const string CurrentAssemblyFileVersion = "0.15.1.0"; /// /// Current version of gRPC C# /// - public const string CurrentVersion = "0.15.0"; + public const string CurrentVersion = "0.15.1"; } } diff --git a/src/csharp/Grpc.Core/project.json b/src/csharp/Grpc.Core/project.json index c7f2bf4fb12..030b8680f65 100644 --- a/src/csharp/Grpc.Core/project.json +++ b/src/csharp/Grpc.Core/project.json @@ -1,5 +1,5 @@ { - "version": "0.15.0", + "version": "0.15.1", "title": "gRPC C# Core", "authors": [ "Google Inc." ], "copyright": "Copyright 2015, Google Inc.", diff --git a/src/csharp/Grpc.HealthCheck/project.json b/src/csharp/Grpc.HealthCheck/project.json index 98ea21a436a..853b7131f27 100644 --- a/src/csharp/Grpc.HealthCheck/project.json +++ b/src/csharp/Grpc.HealthCheck/project.json @@ -1,5 +1,5 @@ { - "version": "0.15.0", + "version": "0.15.1", "title": "gRPC C# Healthchecking", "authors": [ "Google Inc." ], "copyright": "Copyright 2015, Google Inc.", @@ -13,7 +13,7 @@ "tags": [ "gRPC health check" ] }, "dependencies": { - "Grpc.Core": "0.15.0", + "Grpc.Core": "0.15.1", "Google.Protobuf": "3.0.0-beta3" }, "frameworks": { diff --git a/src/csharp/build_packages.bat b/src/csharp/build_packages.bat index e387efcc2da..d7631ed4396 100644 --- a/src/csharp/build_packages.bat +++ b/src/csharp/build_packages.bat @@ -30,7 +30,7 @@ @rem Builds gRPC NuGet packages @rem Current package versions -set VERSION=0.15.0 +set VERSION=0.15.1 set PROTOBUF_VERSION=3.0.0-beta3 @rem Packages that depend on prerelease packages (like Google.Protobuf) need to have prerelease suffix as well. diff --git a/src/node/tools/package.json b/src/node/tools/package.json index b2cadd3f47a..ad273d4d5a5 100644 --- a/src/node/tools/package.json +++ b/src/node/tools/package.json @@ -1,6 +1,6 @@ { "name": "grpc-tools", - "version": "0.15.0", + "version": "0.15.1", "author": "Google Inc.", "description": "Tools for developing with gRPC on Node.js", "homepage": "http://www.grpc.io/", diff --git a/src/python/grpcio/grpc_version.py b/src/python/grpcio/grpc_version.py index c6c07afb443..80cc397737c 100644 --- a/src/python/grpcio/grpc_version.py +++ b/src/python/grpcio/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/src/python/grpcio/grpc_version.py.template`!!! -VERSION='0.15.0' +VERSION='0.15.1' diff --git a/src/ruby/lib/grpc/version.rb b/src/ruby/lib/grpc/version.rb index 7f512e47aab..5c840da5491 100644 --- a/src/ruby/lib/grpc/version.rb +++ b/src/ruby/lib/grpc/version.rb @@ -29,5 +29,5 @@ # GRPC contains the General RPC module. module GRPC - VERSION = '0.15.0' + VERSION = '0.15.1' end diff --git a/src/ruby/tools/version.rb b/src/ruby/tools/version.rb index 6a7a1d5bd33..7b286d1d703 100644 --- a/src/ruby/tools/version.rb +++ b/src/ruby/tools/version.rb @@ -29,6 +29,6 @@ module GRPC module Tools - VERSION = '0.15.0' + VERSION = '0.15.1' end end diff --git a/tools/distrib/python/grpcio_tools/grpc_version.py b/tools/distrib/python/grpcio_tools/grpc_version.py index 9a33c6e5d14..31309923a91 100644 --- a/tools/distrib/python/grpcio_tools/grpc_version.py +++ b/tools/distrib/python/grpcio_tools/grpc_version.py @@ -29,4 +29,4 @@ # AUTO-GENERATED FROM `$REPO_ROOT/templates/tools/distrib/python/grpcio_tools/grpc_version.py.template`!!! -VERSION='0.15.0' +VERSION='0.15.1' diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py index fbe69f43d56..a21e090ae34 100644 --- a/tools/distrib/python/grpcio_tools/setup.py +++ b/tools/distrib/python/grpcio_tools/setup.py @@ -116,7 +116,7 @@ setuptools.setup( namespace_packages=['grpc'], install_requires=[ 'protobuf>=3.0.0a3', - 'grpcio>=0.14.0', + 'grpcio>=0.15.0', ], package_data=package_data(), ) diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index 066d29ac001..09bc73f59ef 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.15.0 +PROJECT_NUMBER = 0.15.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 6a0e8b2129c..4114d2c755d 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC C++" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.15.0 +PROJECT_NUMBER = 0.15.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core b/tools/doxygen/Doxyfile.core index fa9fd5a3123..cd0dd76b4e2 100644 --- a/tools/doxygen/Doxyfile.core +++ b/tools/doxygen/Doxyfile.core @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.15.0 +PROJECT_NUMBER = 0.15.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a diff --git a/tools/doxygen/Doxyfile.core.internal b/tools/doxygen/Doxyfile.core.internal index e4c9f991d31..93cea985d28 100644 --- a/tools/doxygen/Doxyfile.core.internal +++ b/tools/doxygen/Doxyfile.core.internal @@ -40,7 +40,7 @@ PROJECT_NAME = "GRPC Core" # could be handy for archiving the generated documentation or if some version # control system is used. -PROJECT_NUMBER = 0.15.0 +PROJECT_NUMBER = 0.15.1 # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer a From f975f74c016d5850d10644c4865e76e05e4b7815 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 1 Jul 2016 14:56:27 -0700 Subject: [PATCH 1470/1894] Refactor workqueues a little to make them great again --- Makefile | 36 ---- build.yaml | 10 - src/core/lib/iomgr/ev_epoll_linux.c | 21 +- src/core/lib/iomgr/tcp_posix.c | 2 +- src/core/lib/iomgr/workqueue.h | 9 - src/core/lib/iomgr/workqueue_posix.c | 6 - src/core/lib/iomgr/workqueue_posix.h | 4 + src/core/lib/iomgr/workqueue_windows.c | 10 - test/core/iomgr/workqueue_test.c | 150 ------------- tools/run_tests/sources_and_headers.json | 16 -- tools/run_tests/tests.json | 21 -- vsprojects/buildtests_c.sln | 27 --- .../workqueue_test/workqueue_test.vcxproj | 199 ------------------ .../workqueue_test.vcxproj.filters | 21 -- 14 files changed, 17 insertions(+), 515 deletions(-) delete mode 100644 test/core/iomgr/workqueue_test.c delete mode 100644 vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj delete mode 100644 vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj.filters diff --git a/Makefile b/Makefile index 8fd86e78ed0..d7d7b8f3d90 100644 --- a/Makefile +++ b/Makefile @@ -1001,7 +1001,6 @@ transport_security_test: $(BINDIR)/$(CONFIG)/transport_security_test udp_server_test: $(BINDIR)/$(CONFIG)/udp_server_test uri_fuzzer_test: $(BINDIR)/$(CONFIG)/uri_fuzzer_test uri_parser_test: $(BINDIR)/$(CONFIG)/uri_parser_test -workqueue_test: $(BINDIR)/$(CONFIG)/workqueue_test alarm_cpp_test: $(BINDIR)/$(CONFIG)/alarm_cpp_test async_end2end_test: $(BINDIR)/$(CONFIG)/async_end2end_test auth_property_iterator_test: $(BINDIR)/$(CONFIG)/auth_property_iterator_test @@ -1330,7 +1329,6 @@ buildtests_c: privatelibs_c \ $(BINDIR)/$(CONFIG)/transport_security_test \ $(BINDIR)/$(CONFIG)/udp_server_test \ $(BINDIR)/$(CONFIG)/uri_parser_test \ - $(BINDIR)/$(CONFIG)/workqueue_test \ $(BINDIR)/$(CONFIG)/public_headers_must_be_c89 \ $(BINDIR)/$(CONFIG)/badreq_bad_client_test \ $(BINDIR)/$(CONFIG)/connection_prefix_bad_client_test \ @@ -1715,8 +1713,6 @@ test_c: buildtests_c $(Q) $(BINDIR)/$(CONFIG)/udp_server_test || ( echo test udp_server_test failed ; exit 1 ) $(E) "[RUN] Testing uri_parser_test" $(Q) $(BINDIR)/$(CONFIG)/uri_parser_test || ( echo test uri_parser_test failed ; exit 1 ) - $(E) "[RUN] Testing workqueue_test" - $(Q) $(BINDIR)/$(CONFIG)/workqueue_test || ( echo test workqueue_test failed ; exit 1 ) $(E) "[RUN] Testing public_headers_must_be_c89" $(Q) $(BINDIR)/$(CONFIG)/public_headers_must_be_c89 || ( echo test public_headers_must_be_c89 failed ; exit 1 ) $(E) "[RUN] Testing badreq_bad_client_test" @@ -10216,38 +10212,6 @@ endif endif -WORKQUEUE_TEST_SRC = \ - test/core/iomgr/workqueue_test.c \ - -WORKQUEUE_TEST_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(WORKQUEUE_TEST_SRC)))) -ifeq ($(NO_SECURE),true) - -# You can't build secure targets if you don't have OpenSSL. - -$(BINDIR)/$(CONFIG)/workqueue_test: openssl_dep_error - -else - - - -$(BINDIR)/$(CONFIG)/workqueue_test: $(WORKQUEUE_TEST_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) $(WORKQUEUE_TEST_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)/workqueue_test - -endif - -$(OBJDIR)/$(CONFIG)/test/core/iomgr/workqueue_test.o: $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a - -deps_workqueue_test: $(WORKQUEUE_TEST_OBJS:.o=.dep) - -ifneq ($(NO_SECURE),true) -ifneq ($(NO_DEPS),true) --include $(WORKQUEUE_TEST_OBJS:.o=.dep) -endif -endif - - ALARM_CPP_TEST_SRC = \ test/cpp/common/alarm_cpp_test.cc \ diff --git a/build.yaml b/build.yaml index 681ab54d5b1..44716927ae4 100644 --- a/build.yaml +++ b/build.yaml @@ -2423,16 +2423,6 @@ targets: - grpc - gpr_test_util - gpr -- name: workqueue_test - build: test - language: c - src: - - test/core/iomgr/workqueue_test.c - deps: - - grpc_test_util - - grpc - - gpr_test_util - - gpr - name: alarm_cpp_test gtest: true build: test diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index af23e35ca3d..e5aab293bd3 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -253,13 +253,14 @@ struct grpc_pollset_set { * Common helpers */ -static void append_error(grpc_error **composite, grpc_error *error, +static bool append_error(grpc_error **composite, grpc_error *error, const char *desc) { - if (error == GRPC_ERROR_NONE) return; + if (error == GRPC_ERROR_NONE) return true; if (*composite == GRPC_ERROR_NONE) { *composite = GRPC_ERROR_CREATE(desc); } *composite = grpc_error_add_child(*composite, error); + return false; } /******************************************************************************* @@ -490,16 +491,18 @@ static polling_island *polling_island_create(grpc_exec_ctx *exec_ctx, polling_island_add_wakeup_fd_locked(pi, &grpc_global_wakeup_fd, error); if (initial_fd != NULL) { - /* Lock the polling island here just in case we got this structure from - the freelist and the polling island lock was not released yet (by the - code that adds the polling island to the freelist) */ - gpr_mu_lock(&pi->mu); polling_island_add_fds_locked(pi, &initial_fd, 1, true, error); - gpr_mu_unlock(&pi->mu); } - append_error(error, grpc_workqueue_create(exec_ctx, &pi->workqueue), - err_desc); + if (append_error(error, grpc_workqueue_create(exec_ctx, &pi->workqueue), + err_desc) && + *error == GRPC_ERROR_NONE) { + polling_island_add_fds_locked(pi, &pi->workqueue->wakeup_read_fd, 1, true, + error); + GPR_ASSERT(pi->workqueue->wakeup_read_fd->polling_island == NULL); + pi->workqueue->wakeup_read_fd->polling_island = pi; + PI_ADD_REF(pi, 1); + } done: if (*error != GRPC_ERROR_NONE) { diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index b5bac152fb6..ec21e039448 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -284,7 +284,7 @@ static void tcp_read(grpc_exec_ctx *exec_ctx, grpc_endpoint *ep, } /* returns true if done, false if pending; if returning true, *error is set */ -#define MAX_WRITE_IOVEC 16 +#define MAX_WRITE_IOVEC 1024 static bool tcp_flush(grpc_tcp *tcp, grpc_error **error) { struct msghdr msg; struct iovec iov[MAX_WRITE_IOVEC]; diff --git a/src/core/lib/iomgr/workqueue.h b/src/core/lib/iomgr/workqueue.h index 498b7a300a5..064a551ed0a 100644 --- a/src/core/lib/iomgr/workqueue.h +++ b/src/core/lib/iomgr/workqueue.h @@ -49,10 +49,6 @@ /* grpc_workqueue is forward declared in exec_ctx.h */ -/** Create a work queue */ -grpc_error *grpc_workqueue_create(grpc_exec_ctx *exec_ctx, - grpc_workqueue **workqueue); - void grpc_workqueue_flush(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue); #define GRPC_WORKQUEUE_REFCOUNT_DEBUG @@ -72,11 +68,6 @@ void grpc_workqueue_ref(grpc_workqueue *workqueue); void grpc_workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue); #endif -/** Bind this workqueue to a pollset */ -void grpc_workqueue_add_to_pollset(grpc_exec_ctx *exec_ctx, - grpc_workqueue *workqueue, - grpc_pollset *pollset); - /** Add a work item to a workqueue */ void grpc_workqueue_enqueue(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, grpc_closure *closure, grpc_error *error); diff --git a/src/core/lib/iomgr/workqueue_posix.c b/src/core/lib/iomgr/workqueue_posix.c index 45e0f6063b4..fef1709954f 100644 --- a/src/core/lib/iomgr/workqueue_posix.c +++ b/src/core/lib/iomgr/workqueue_posix.c @@ -100,12 +100,6 @@ void grpc_workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) { } } -void grpc_workqueue_add_to_pollset(grpc_exec_ctx *exec_ctx, - grpc_workqueue *workqueue, - grpc_pollset *pollset) { - grpc_pollset_add_fd(exec_ctx, pollset, workqueue->wakeup_read_fd); -} - void grpc_workqueue_flush(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) { gpr_mu_lock(&workqueue->mu); grpc_exec_ctx_enqueue_list(exec_ctx, &workqueue->closure_list, NULL); diff --git a/src/core/lib/iomgr/workqueue_posix.h b/src/core/lib/iomgr/workqueue_posix.h index dcb47e7b59d..2e8aca18164 100644 --- a/src/core/lib/iomgr/workqueue_posix.h +++ b/src/core/lib/iomgr/workqueue_posix.h @@ -50,4 +50,8 @@ struct grpc_workqueue { grpc_closure read_closure; }; +/** Create a work queue */ +grpc_error *grpc_workqueue_create(grpc_exec_ctx *exec_ctx, + grpc_workqueue **workqueue); + #endif /* GRPC_CORE_LIB_IOMGR_WORKQUEUE_POSIX_H */ diff --git a/src/core/lib/iomgr/workqueue_windows.c b/src/core/lib/iomgr/workqueue_windows.c index 52a3e47f376..23e2dea1859 100644 --- a/src/core/lib/iomgr/workqueue_windows.c +++ b/src/core/lib/iomgr/workqueue_windows.c @@ -42,12 +42,6 @@ // context, which is at least correct, if not performant or in the spirit of // workqueues. -grpc_error *grpc_workqueue_create(grpc_exec_ctx *exec_ctx, - grpc_workqueue **workqueue) { - *workqueue = (grpc_workqueue *)1; - return GRPC_ERROR_NONE; -} - void grpc_workqueue_flush(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) {} #ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG @@ -60,10 +54,6 @@ void grpc_workqueue_ref(grpc_workqueue *workqueue) {} void grpc_workqueue_unref(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue) {} #endif -void grpc_workqueue_add_to_pollset(grpc_exec_ctx *exec_ctx, - grpc_workqueue *workqueue, - grpc_pollset *pollset) {} - void grpc_workqueue_enqueue(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue, grpc_closure *closure, grpc_error *error) { grpc_exec_ctx_sched(exec_ctx, closure, error, NULL); diff --git a/test/core/iomgr/workqueue_test.c b/test/core/iomgr/workqueue_test.c deleted file mode 100644 index 76ecfae74b8..00000000000 --- a/test/core/iomgr/workqueue_test.c +++ /dev/null @@ -1,150 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "src/core/lib/iomgr/workqueue.h" - -#include -#include -#include - -#include "test/core/util/test_config.h" - -static gpr_mu *g_mu; -static grpc_pollset *g_pollset; - -static void must_succeed(grpc_exec_ctx *exec_ctx, void *p, grpc_error *error) { - GPR_ASSERT(error == GRPC_ERROR_NONE); - gpr_mu_lock(g_mu); - *(int *)p = 1; - GPR_ASSERT( - GRPC_LOG_IF_ERROR("pollset_kick", grpc_pollset_kick(g_pollset, NULL))); - gpr_mu_unlock(g_mu); -} - -static void test_ref_unref(void) { - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_workqueue *wq; - GPR_ASSERT(GRPC_LOG_IF_ERROR("grpc_workqueue_create", - grpc_workqueue_create(&exec_ctx, &wq))); - GRPC_WORKQUEUE_REF(wq, "test"); - GRPC_WORKQUEUE_UNREF(&exec_ctx, wq, "test"); - GRPC_WORKQUEUE_UNREF(&exec_ctx, wq, "destroy"); - grpc_exec_ctx_finish(&exec_ctx); -} - -static void test_add_closure(void) { - grpc_closure c; - int done = 0; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_workqueue *wq; - GPR_ASSERT(GRPC_LOG_IF_ERROR("grpc_workqueue_create", - grpc_workqueue_create(&exec_ctx, &wq))); - gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5); - grpc_pollset_worker *worker = NULL; - grpc_closure_init(&c, must_succeed, &done); - - grpc_workqueue_enqueue(&exec_ctx, wq, &c, GRPC_ERROR_NONE); - grpc_workqueue_add_to_pollset(&exec_ctx, wq, g_pollset); - - gpr_mu_lock(g_mu); - GPR_ASSERT(!done); - while (!done) { - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "pollset_work", - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(deadline.clock_type), deadline))); - } - gpr_mu_unlock(g_mu); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(done); - - GRPC_WORKQUEUE_UNREF(&exec_ctx, wq, "destroy"); - grpc_exec_ctx_finish(&exec_ctx); -} - -static void test_flush(void) { - grpc_closure c; - int done = 0; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_workqueue *wq; - GPR_ASSERT(GRPC_LOG_IF_ERROR("grpc_workqueue_create", - grpc_workqueue_create(&exec_ctx, &wq))); - gpr_timespec deadline = GRPC_TIMEOUT_SECONDS_TO_DEADLINE(5); - grpc_pollset_worker *worker = NULL; - grpc_closure_init(&c, must_succeed, &done); - - grpc_exec_ctx_sched(&exec_ctx, &c, GRPC_ERROR_NONE, NULL); - grpc_workqueue_flush(&exec_ctx, wq); - grpc_workqueue_add_to_pollset(&exec_ctx, wq, g_pollset); - - gpr_mu_lock(g_mu); - GPR_ASSERT(!done); - while (!done) { - GPR_ASSERT(GRPC_LOG_IF_ERROR( - "pollset_work", - grpc_pollset_work(&exec_ctx, g_pollset, &worker, - gpr_now(deadline.clock_type), deadline))); - } - gpr_mu_unlock(g_mu); - grpc_exec_ctx_finish(&exec_ctx); - GPR_ASSERT(done); - - GRPC_WORKQUEUE_UNREF(&exec_ctx, wq, "destroy"); - grpc_exec_ctx_finish(&exec_ctx); -} - -static void destroy_pollset(grpc_exec_ctx *exec_ctx, void *p, - grpc_error *error) { - grpc_pollset_destroy(p); -} - -int main(int argc, char **argv) { - grpc_closure destroyed; - grpc_exec_ctx exec_ctx = GRPC_EXEC_CTX_INIT; - grpc_test_init(argc, argv); - grpc_init(); - g_pollset = gpr_malloc(grpc_pollset_size()); - grpc_pollset_init(g_pollset, &g_mu); - - test_ref_unref(); - test_add_closure(); - test_flush(); - - grpc_closure_init(&destroyed, destroy_pollset, g_pollset); - grpc_pollset_shutdown(&exec_ctx, g_pollset, &destroyed); - grpc_exec_ctx_finish(&exec_ctx); - grpc_shutdown(); - - gpr_free(g_pollset); - return 0; -} diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 65de89c0ab0..0b3314a4419 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -1807,22 +1807,6 @@ "third_party": false, "type": "target" }, - { - "deps": [ - "gpr", - "gpr_test_util", - "grpc", - "grpc_test_util" - ], - "headers": [], - "language": "c", - "name": "workqueue_test", - "src": [ - "test/core/iomgr/workqueue_test.c" - ], - "third_party": false, - "type": "target" - }, { "deps": [ "gpr", diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 291ae415a49..8dee7c8f0f3 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -1914,27 +1914,6 @@ "windows" ] }, - { - "args": [], - "ci_platforms": [ - "linux", - "mac", - "posix", - "windows" - ], - "cpu_cost": 1.0, - "exclude_configs": [], - "flaky": false, - "gtest": false, - "language": "c", - "name": "workqueue_test", - "platforms": [ - "linux", - "mac", - "posix", - "windows" - ] - }, { "args": [], "ci_platforms": [ diff --git a/vsprojects/buildtests_c.sln b/vsprojects/buildtests_c.sln index fcf9b1fc22a..10be520b5f1 100644 --- a/vsprojects/buildtests_c.sln +++ b/vsprojects/buildtests_c.sln @@ -1421,17 +1421,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "window_overflow_bad_client_ {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "workqueue_test", "vcxproj\test\workqueue_test\workqueue_test.vcxproj", "{1B6E9651-4D88-2ACB-BEE0-26599919361D}" - ProjectSection(myProperties) = preProject - lib = "False" - EndProjectSection - ProjectSection(ProjectDependencies) = postProject - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} = {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} = {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - EndProjectSection -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -3556,22 +3545,6 @@ Global {658D7F7F-9628-6545-743C-D949301DC5DC}.Release-DLL|Win32.Build.0 = Release|Win32 {658D7F7F-9628-6545-743C-D949301DC5DC}.Release-DLL|x64.ActiveCfg = Release|x64 {658D7F7F-9628-6545-743C-D949301DC5DC}.Release-DLL|x64.Build.0 = Release|x64 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug|Win32.ActiveCfg = Debug|Win32 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug|x64.ActiveCfg = Debug|x64 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release|Win32.ActiveCfg = Release|Win32 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release|x64.ActiveCfg = Release|x64 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug|Win32.Build.0 = Debug|Win32 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug|x64.Build.0 = Debug|x64 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release|Win32.Build.0 = Release|Win32 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release|x64.Build.0 = Release|x64 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug-DLL|Win32.ActiveCfg = Debug|Win32 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug-DLL|Win32.Build.0 = Debug|Win32 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug-DLL|x64.ActiveCfg = Debug|x64 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Debug-DLL|x64.Build.0 = Debug|x64 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release-DLL|Win32.ActiveCfg = Release|Win32 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release-DLL|Win32.Build.0 = Release|Win32 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release-DLL|x64.ActiveCfg = Release|x64 - {1B6E9651-4D88-2ACB-BEE0-26599919361D}.Release-DLL|x64.Build.0 = Release|x64 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj b/vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj deleted file mode 100644 index 35665fa1833..00000000000 --- a/vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj +++ /dev/null @@ -1,199 +0,0 @@ - - - - - - Debug - Win32 - - - Debug - x64 - - - Release - Win32 - - - Release - x64 - - - - {1B6E9651-4D88-2ACB-BEE0-26599919361D} - true - $(SolutionDir)IntDir\$(MSBuildProjectName)\ - - - - v100 - - - v110 - - - v120 - - - v140 - - - Application - true - Unicode - - - Application - false - true - Unicode - - - - - - - - - - - - - - workqueue_test - static - Debug - static - Debug - - - workqueue_test - static - Release - static - Release - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - Disabled - WIN32;_DEBUG;_LIB;%(PreprocessorDefinitions) - true - MultiThreadedDebug - true - None - false - - - Console - true - false - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - NotUsing - Level3 - MaxSpeed - WIN32;NDEBUG;_LIB;%(PreprocessorDefinitions) - true - true - true - MultiThreaded - true - None - false - - - Console - true - false - true - true - - - - - - - - - - {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} - - - {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - - {EAB0A629-17A9-44DB-B5FF-E91A721FE037} - - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Enable NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - - - diff --git a/vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj.filters b/vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj.filters deleted file mode 100644 index 0c5979e66ae..00000000000 --- a/vsprojects/vcxproj/test/workqueue_test/workqueue_test.vcxproj.filters +++ /dev/null @@ -1,21 +0,0 @@ - - - - - test\core\iomgr - - - - - - {3c17ce2b-b57b-9278-8494-48ab4df88ec8} - - - {7035b4d7-88e6-ce95-0011-0ea3cc64eddd} - - - {f0fb09d4-0bdc-a53c-1b5f-d71acbf72a5d} - - - - From b360c8acc7b53aabb2af7f76ddf7310f3d025acc Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Sat, 2 Jul 2016 00:54:28 +0200 Subject: [PATCH 1471/1894] Regenerating project files, and adding experimental disclaimer. --- CMakeLists.txt | 13 +++++++++++-- templates/CMakeLists.txt.template | 5 ++++- third_party/protobuf | 2 +- 3 files changed, 16 insertions(+), 4 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a81517a6a0b..9caf03191fa 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,10 @@ # Please look at the templates directory instead. # This file can be regenerated from the template by running # tools/buildgen/generate_projects.sh - +# +# Additionally, this is currently very experimental, and unsupported. +# Further work will happen on that file. +# # Copyright 2015, Google Inc. # All rights reserved. # @@ -39,7 +42,7 @@ cmake_minimum_required(VERSION 2.8) set(PACKAGE_NAME "grpc") -set(PACKAGE_VERSION "0.15.0-dev") +set(PACKAGE_VERSION "0.16.0-dev") set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}") set(PACKAGE_TARNAME "${PACKAGE_NAME}-${PACKAGE_VERSION}") set(PACKAGE_BUGREPORT "https://github.com/grpc/grpc/issues/") @@ -142,6 +145,7 @@ add_library(grpc src/core/lib/iomgr/endpoint_pair_posix.c src/core/lib/iomgr/endpoint_pair_windows.c src/core/lib/iomgr/error.c + src/core/lib/iomgr/ev_epoll_linux.c src/core/lib/iomgr/ev_poll_and_epoll_posix.c src/core/lib/iomgr/ev_poll_posix.c src/core/lib/iomgr/ev_posix.c @@ -152,6 +156,7 @@ add_library(grpc src/core/lib/iomgr/iomgr_posix.c src/core/lib/iomgr/iomgr_windows.c src/core/lib/iomgr/load_file.c + src/core/lib/iomgr/network_status_tracker.c src/core/lib/iomgr/polling_entity.c src/core/lib/iomgr/pollset_set_windows.c src/core/lib/iomgr/pollset_windows.c @@ -345,6 +350,7 @@ add_library(grpc_cronet src/core/lib/iomgr/endpoint_pair_posix.c src/core/lib/iomgr/endpoint_pair_windows.c src/core/lib/iomgr/error.c + src/core/lib/iomgr/ev_epoll_linux.c src/core/lib/iomgr/ev_poll_and_epoll_posix.c src/core/lib/iomgr/ev_poll_posix.c src/core/lib/iomgr/ev_posix.c @@ -355,6 +361,7 @@ add_library(grpc_cronet src/core/lib/iomgr/iomgr_posix.c src/core/lib/iomgr/iomgr_windows.c src/core/lib/iomgr/load_file.c + src/core/lib/iomgr/network_status_tracker.c src/core/lib/iomgr/polling_entity.c src/core/lib/iomgr/pollset_set_windows.c src/core/lib/iomgr/pollset_windows.c @@ -525,6 +532,7 @@ add_library(grpc_unsecure src/core/lib/iomgr/endpoint_pair_posix.c src/core/lib/iomgr/endpoint_pair_windows.c src/core/lib/iomgr/error.c + src/core/lib/iomgr/ev_epoll_linux.c src/core/lib/iomgr/ev_poll_and_epoll_posix.c src/core/lib/iomgr/ev_poll_posix.c src/core/lib/iomgr/ev_posix.c @@ -535,6 +543,7 @@ add_library(grpc_unsecure src/core/lib/iomgr/iomgr_posix.c src/core/lib/iomgr/iomgr_windows.c src/core/lib/iomgr/load_file.c + src/core/lib/iomgr/network_status_tracker.c src/core/lib/iomgr/polling_entity.c src/core/lib/iomgr/pollset_set_windows.c src/core/lib/iomgr/pollset_windows.c diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template index 06085eb722b..76299cb21bf 100644 --- a/templates/CMakeLists.txt.template +++ b/templates/CMakeLists.txt.template @@ -6,7 +6,10 @@ # Please look at the templates directory instead. # This file can be regenerated from the template by running # tools/buildgen/generate_projects.sh - + # + # Additionally, this is currently very experimental, and unsupported. + # Further work will happen on that file. + # # Copyright 2015, Google Inc. # All rights reserved. # diff --git a/third_party/protobuf b/third_party/protobuf index d4d13a4349e..3470b6895aa 160000 --- a/third_party/protobuf +++ b/third_party/protobuf @@ -1 +1 @@ -Subproject commit d4d13a4349e4e59d67f311185ddcc1890d956d7a +Subproject commit 3470b6895aa659b7559ed678e029a5338e535f14 From f29e364168240bc472e22a6b55d2f27d501fceea Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Fri, 1 Jul 2016 15:56:57 -0700 Subject: [PATCH 1472/1894] Bump protobuf version to beta-3.3 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It’s just the merge of beta-3.1 and beta-3.2, both of which we need. --- .gitmodules | 2 +- examples/cpp/helloworld/Makefile | 2 +- examples/cpp/route_guide/Makefile | 2 +- third_party/protobuf | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitmodules b/.gitmodules index 1e1876b724e..ce647f3c455 100644 --- a/.gitmodules +++ b/.gitmodules @@ -4,7 +4,7 @@ [submodule "third_party/protobuf"] path = third_party/protobuf url = https://github.com/google/protobuf.git - branch = v3.0.0-beta-3.1 + branch = 3.0.0-beta-3 [submodule "third_party/gflags"] path = third_party/gflags url = https://github.com/gflags/gflags.git diff --git a/examples/cpp/helloworld/Makefile b/examples/cpp/helloworld/Makefile index 780e5e427a7..b45b3c7ee0c 100644 --- a/examples/cpp/helloworld/Makefile +++ b/examples/cpp/helloworld/Makefile @@ -97,7 +97,7 @@ ifneq ($(HAS_VALID_PROTOC),true) @echo "Please install Google protocol buffers 3.0.0 and its compiler." @echo "You can find it here:" @echo - @echo " https://github.com/google/protobuf/releases/tag/v3.0.0-beta-2" + @echo " https://github.com/google/protobuf/releases/tag/v3.0.0-beta-3.3" @echo @echo "Here is what I get when trying to evaluate your version of protoc:" @echo diff --git a/examples/cpp/route_guide/Makefile b/examples/cpp/route_guide/Makefile index 11f2a00cc89..50ecf041f56 100644 --- a/examples/cpp/route_guide/Makefile +++ b/examples/cpp/route_guide/Makefile @@ -86,7 +86,7 @@ ifneq ($(HAS_VALID_PROTOC),true) @echo "Please install Google protocol buffers 3.0.0 and its compiler." @echo "You can find it here:" @echo - @echo " https://github.com/google/protobuf/releases/tag/v3.0.0-beta-2" + @echo " https://github.com/google/protobuf/releases/tag/v3.0.0-beta-3.3" @echo @echo "Here is what I get when trying to evaluate your version of protoc:" @echo diff --git a/third_party/protobuf b/third_party/protobuf index d4d13a4349e..bdeb215cab2 160000 --- a/third_party/protobuf +++ b/third_party/protobuf @@ -1 +1 @@ -Subproject commit d4d13a4349e4e59d67f311185ddcc1890d956d7a +Subproject commit bdeb215cab2985195325fcd5e70c3fa751f46e0f From 3e53e1a5be4ee1d0433a64b73553496fa3f93827 Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Wed, 29 Jun 2016 12:57:44 -0700 Subject: [PATCH 1473/1894] ProtoCompiler podspec MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Still needed: - Make it build protoc if it’s not in the root (i.e. if we're developing locally) - Put the gRPC plugin in the GitHub release page, and add a podspec for it that does the same --- src/objective-c/ProtoCompiler.podspec | 56 +++++++++++++++++++ src/objective-c/tests/Podfile | 1 + .../tests/RemoteTestClient/RemoteTest.podspec | 13 +++-- 3 files changed, 66 insertions(+), 4 deletions(-) create mode 100644 src/objective-c/ProtoCompiler.podspec diff --git a/src/objective-c/ProtoCompiler.podspec b/src/objective-c/ProtoCompiler.podspec new file mode 100644 index 00000000000..2f13853b0b5 --- /dev/null +++ b/src/objective-c/ProtoCompiler.podspec @@ -0,0 +1,56 @@ +# BoringSSL CocoaPods podspec + +# Copyright 2015, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Pod::Spec.new do |s| + s.name = 'ProtoCompiler' + v = '3.0.0-beta-3.1' + s.version = v + s.summary = 'The Protobuf Compiler (protoc) generates Objective-C files from .proto files' + s.description = <<-DESC + This podspec only downloads protoc so that local pods generating protos can execute it as part + of their prepare_command. + The generated code will have a dependency on the Protobuf Objective-C runtime of the same + version. The runtime can be obtained as the "Protobuf" pod. + DESC + s.homepage = 'https://github.com/google/protobuf' + s.license = 'New BSD' + # "The name and email addresses of the library maintainers, not the Podspec maintainer." + s.authors = { 'The Protocol Buffers contributors' => 'protobuf@googlegroups.com' } + + s.source = { + :http => "https://github.com/google/protobuf/releases/download/v#{v}/protoc-#{v}-osx-fat.zip", + # TODO(jcanizales): Add sha1 or sha256 + # :sha1 => '??', + } + + s.preserve_paths = 'protoc', + 'google/**/*.proto' # Well-known protobuf types +end diff --git a/src/objective-c/tests/Podfile b/src/objective-c/tests/Podfile index 30a34260d40..168114da37a 100644 --- a/src/objective-c/tests/Podfile +++ b/src/objective-c/tests/Podfile @@ -17,6 +17,7 @@ GRPC_LOCAL_SRC = '../../..' ).each do |target_name| target target_name do pod 'Protobuf', :path => "#{GRPC_LOCAL_SRC}/third_party/protobuf", :inhibit_warnings => true + pod 'ProtoCompiler', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c" pod 'BoringSSL', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c", :inhibit_warnings => true pod 'CronetFramework', :podspec => "#{GRPC_LOCAL_SRC}/src/objective-c" pod 'gRPC', :path => GRPC_LOCAL_SRC diff --git a/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec b/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec index 887380eb55f..e705310370d 100644 --- a/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec +++ b/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec @@ -11,13 +11,18 @@ Pod::Spec.new do |s| s.osx.deployment_target = '10.9' # Run protoc with the Objective-C and gRPC plugins to generate protocol messages and gRPC clients. + repo_root = '../../../..' + pods_root = "#{repo_root}/src/objective-c/tests/Pods" + bin_dir = "#{repo_root}/bins/$CONFIG" + + protoc = "#{pods_root}/ProtoCompiler/protoc" # "#{bin_dir}/protobuf/protoc" + plugin = "#{bin_dir}/grpc_objective_c_plugin" s.prepare_command = <<-CMD - BINDIR=../../../../bins/$CONFIG - PROTOC=$BINDIR/protobuf/protoc - PLUGIN=$BINDIR/grpc_objective_c_plugin - $PROTOC --plugin=protoc-gen-grpc=$PLUGIN --objc_out=. --grpc_out=. *.proto + #{protoc} --plugin=protoc-gen-grpc=#{plugin} --objc_out=. --grpc_out=. *.proto CMD + s.dependency "ProtoCompiler", "~> 3.0.0-beta-3.1" + s.subspec "Messages" do |ms| ms.source_files = "*.pbobjc.{h,m}" ms.header_mappings_dir = "." From cb58105fd616b5e64659368a37624ef5d6530633 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Sat, 2 Jul 2016 08:18:04 +0000 Subject: [PATCH 1474/1894] Fix _Rendezvous.exception for successful calls --- .../grpcio/grpc/beta/_client_adaptations.py | 5 +++- ...e_invocation_asynchronous_event_service.py | 25 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/python/grpcio/grpc/beta/_client_adaptations.py b/src/python/grpcio/grpc/beta/_client_adaptations.py index 56456cc117f..73415e0be7f 100644 --- a/src/python/grpcio/grpc/beta/_client_adaptations.py +++ b/src/python/grpcio/grpc/beta/_client_adaptations.py @@ -117,7 +117,10 @@ class _Rendezvous(future.Future, face.Call): def exception(self, timeout=None): try: rpc_error_call = self._future.exception(timeout=timeout) - return _abortion_error(rpc_error_call) + if rpc_error_call is None: + return None + else: + return _abortion_error(rpc_error_call) except grpc.FutureTimeoutError: raise future.TimeoutError() except grpc.FutureCancelledError: diff --git a/src/python/grpcio/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py b/src/python/grpcio/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py index 791620307b5..d32208f9eb0 100644 --- a/src/python/grpcio/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py +++ b/src/python/grpcio/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py @@ -41,6 +41,7 @@ from concurrent import futures import six # test_interfaces is referenced from specification in this module. +from grpc.framework.foundation import future from grpc.framework.foundation import logging_pool from grpc.framework.interfaces.face import face from tests.unit.framework.common import test_constants @@ -159,6 +160,8 @@ class TestCase(six.with_metaclass(abc.ABCMeta, test_coverage.Coverage, unittest. test_messages.verify(request, response, self) self.assertIs(callback.future(), response_future) + self.assertIsNone(response_future.exception()) + self.assertIsNone(response_future.traceback()) def testSuccessfulUnaryRequestStreamResponse(self): for (group, method), test_messages_sequence in ( @@ -191,6 +194,8 @@ class TestCase(six.with_metaclass(abc.ABCMeta, test_coverage.Coverage, unittest. test_messages.verify(requests, response, self) self.assertIs(future_passed_to_callback, response_future) + self.assertIsNone(response_future.exception()) + self.assertIsNone(response_future.traceback()) def testSuccessfulStreamRequestStreamResponse(self): for (group, method), test_messages_sequence in ( @@ -301,6 +306,12 @@ class TestCase(six.with_metaclass(abc.ABCMeta, test_coverage.Coverage, unittest. self.assertIs(callback.future(), response_future) self.assertFalse(cancel_method_return_value) self.assertTrue(response_future.cancelled()) + with self.assertRaises(future.CancelledError): + response_future.result() + with self.assertRaises(future.CancelledError): + response_future.exception() + with self.assertRaises(future.CancelledError): + response_future.traceback() def testCancelledUnaryRequestStreamResponse(self): for (group, method), test_messages_sequence in ( @@ -332,6 +343,12 @@ class TestCase(six.with_metaclass(abc.ABCMeta, test_coverage.Coverage, unittest. self.assertIs(callback.future(), response_future) self.assertFalse(cancel_method_return_value) self.assertTrue(response_future.cancelled()) + with self.assertRaises(future.CancelledError): + response_future.result() + with self.assertRaises(future.CancelledError): + response_future.exception() + with self.assertRaises(future.CancelledError): + response_future.traceback() def testCancelledStreamRequestStreamResponse(self): for (group, method), test_messages_sequence in ( @@ -363,6 +380,9 @@ class TestCase(six.with_metaclass(abc.ABCMeta, test_coverage.Coverage, unittest. response_future.exception(), face.ExpirationError) with self.assertRaises(face.ExpirationError): response_future.result() + self.assertIsInstance( + response_future.exception(), face.AbortionError) + self.assertIsNotNone(response_future.traceback()) def testExpiredUnaryRequestStreamResponse(self): for (group, method), test_messages_sequence in ( @@ -392,6 +412,9 @@ class TestCase(six.with_metaclass(abc.ABCMeta, test_coverage.Coverage, unittest. response_future.exception(), face.ExpirationError) with self.assertRaises(face.ExpirationError): response_future.result() + self.assertIsInstance( + response_future.exception(), face.AbortionError) + self.assertIsNotNone(response_future.traceback()) def testExpiredStreamRequestStreamResponse(self): for (group, method), test_messages_sequence in ( @@ -426,6 +449,7 @@ class TestCase(six.with_metaclass(abc.ABCMeta, test_coverage.Coverage, unittest. response_future.exception(), face.ExpirationError) with self.assertRaises(face.ExpirationError): response_future.result() + self.assertIsNotNone(response_future.traceback()) def testFailedUnaryRequestStreamResponse(self): for (group, method), test_messages_sequence in ( @@ -463,6 +487,7 @@ class TestCase(six.with_metaclass(abc.ABCMeta, test_coverage.Coverage, unittest. response_future.exception(), face.ExpirationError) with self.assertRaises(face.ExpirationError): response_future.result() + self.assertIsNotNone(response_future.traceback()) def testFailedStreamRequestStreamResponse(self): for (group, method), test_messages_sequence in ( From ecbe2d52853ee70716479f0eaaef8564667255ec Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Sat, 2 Jul 2016 09:50:17 -0700 Subject: [PATCH 1475/1894] Added test for C --- src/core/lib/surface/byte_buffer_reader.c | 2 +- test/core/surface/byte_buffer_reader_test.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/src/core/lib/surface/byte_buffer_reader.c b/src/core/lib/surface/byte_buffer_reader.c index fb38bf51027..310bacb2c94 100644 --- a/src/core/lib/surface/byte_buffer_reader.c +++ b/src/core/lib/surface/byte_buffer_reader.c @@ -67,7 +67,7 @@ int grpc_byte_buffer_reader_init(grpc_byte_buffer_reader *reader, &decompressed_slices_buffer) == 0) { gpr_log(GPR_ERROR, "Unexpected error decompressing data for algorithm with enum " - "value '%d'. Reading data as if it were uncompressed.", + "value '%d'.", reader->buffer_in->data.raw.compression); memset(reader, 0, sizeof(*reader)); return 0; diff --git a/test/core/surface/byte_buffer_reader_test.c b/test/core/surface/byte_buffer_reader_test.c index 1c779a8a847..4231d899473 100644 --- a/test/core/surface/byte_buffer_reader_test.c +++ b/test/core/surface/byte_buffer_reader_test.c @@ -115,6 +115,20 @@ static void test_read_none_compressed_slice(void) { grpc_byte_buffer_destroy(buffer); } +static void test_read_corrupted_slice(void) { + gpr_slice slice; + grpc_byte_buffer *buffer; + grpc_byte_buffer_reader reader; + + LOG_TEST(__func__); + slice = gpr_slice_from_copied_string("test"); + buffer = grpc_raw_byte_buffer_create(&slice, 1); + buffer->data.raw.compression = GRPC_COMPRESS_GZIP; /* lies! */ + gpr_slice_unref(slice); + GPR_ASSERT(!grpc_byte_buffer_reader_init(&reader, buffer)); + grpc_byte_buffer_destroy(buffer); +} + static void read_compressed_slice(grpc_compression_algorithm algorithm, size_t input_size) { gpr_slice input_slice; @@ -267,6 +281,7 @@ int main(int argc, char **argv) { test_read_none_compressed_slice(); test_read_gzip_compressed_slice(); test_read_deflate_compressed_slice(); + test_read_corrupted_slice(); test_byte_buffer_from_reader(); test_byte_buffer_copy(); test_readall(); From a72712e245ca39d35d67532b0d66cd2dc1959e4d Mon Sep 17 00:00:00 2001 From: Tamas Berghammer Date: Wed, 6 Jul 2016 10:30:25 +0100 Subject: [PATCH 1476/1894] Remove gmock protobuf dependency from cmake build A full build of protobuf depends on gmock even though it is not part of a standrad checkout. This CL explicitly disable the build of the protobuf tests to get rid of this dependency. If somebody want to build the protobuf tests then they have to download gmock to the protobuf directory and specify -Dprotobuf_BUILD_TESTS=ON to the cmake command line. Fixes https://github.com/grpc/grpc/issues/7233 --- CMakeLists.txt | 7 +++++++ templates/CMakeLists.txt.template | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9caf03191fa..dc002a4e342 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -58,6 +58,13 @@ if(NOT ZLIB_ROOT_DIR) set(ZLIB_ROOT_DIR ${CMAKE_CURRENT_SOURCE_DIR}/third_party/zlib) endif() +# Building the protobuf tests require gmock what is not part of a standard protobuf checkout. +# Disable them unless they are explicitly requested from the cmake command line (when we assume +# gmock is downloaded to the right location inside protobuf). +if(NOT protobuf_BUILD_TESTS) + set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests") +endif() + add_subdirectory(${BORINGSSL_ROOT_DIR} third_party/boringssl) add_subdirectory(${PROTOBUF_ROOT_DIR}/cmake third_party/protobuf) add_subdirectory(${ZLIB_ROOT_DIR} third_party/zlib) diff --git a/templates/CMakeLists.txt.template b/templates/CMakeLists.txt.template index 76299cb21bf..52e8b866be1 100644 --- a/templates/CMakeLists.txt.template +++ b/templates/CMakeLists.txt.template @@ -74,6 +74,13 @@ set(ZLIB_ROOT_DIR <%text>${CMAKE_CURRENT_SOURCE_DIR}/third_party/zlib) endif() + # Building the protobuf tests require gmock what is not part of a standard protobuf checkout. + # Disable them unless they are explicitly requested from the cmake command line (when we assume + # gmock is downloaded to the right location inside protobuf). + if(NOT protobuf_BUILD_TESTS) + set(protobuf_BUILD_TESTS OFF CACHE BOOL "Build protobuf tests") + endif() + add_subdirectory(<%text>${BORINGSSL_ROOT_DIR} third_party/boringssl) add_subdirectory(<%text>${PROTOBUF_ROOT_DIR}/cmake third_party/protobuf) add_subdirectory(<%text>${ZLIB_ROOT_DIR} third_party/zlib) From 611bfc21c45c89a7fce23f0f26296404590a0b94 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Wed, 6 Jul 2016 09:25:47 -0700 Subject: [PATCH 1477/1894] Add Node health check generated code and license files --- src/node/health_check/LICENSE | 28 ++ src/node/health_check/v1/health_grpc_pb.js | 74 +++++ src/node/health_check/v1/health_pb.js | 342 +++++++++++++++++++++ 3 files changed, 444 insertions(+) create mode 100644 src/node/health_check/LICENSE create mode 100644 src/node/health_check/v1/health_grpc_pb.js create mode 100644 src/node/health_check/v1/health_pb.js diff --git a/src/node/health_check/LICENSE b/src/node/health_check/LICENSE new file mode 100644 index 00000000000..0209b570e10 --- /dev/null +++ b/src/node/health_check/LICENSE @@ -0,0 +1,28 @@ +Copyright 2015, Google Inc. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are +met: + + * Redistributions of source code must retain the above copyright +notice, this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above +copyright notice, this list of conditions and the following disclaimer +in the documentation and/or other materials provided with the +distribution. + * Neither the name of Google Inc. nor the names of its +contributors may be used to endorse or promote products derived from +this software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/src/node/health_check/v1/health_grpc_pb.js b/src/node/health_check/v1/health_grpc_pb.js new file mode 100644 index 00000000000..89bc304e566 --- /dev/null +++ b/src/node/health_check/v1/health_grpc_pb.js @@ -0,0 +1,74 @@ +// GENERATED CODE -- DO NOT EDIT! + +// Original file comments: +// Copyright 2015, Google Inc. +// All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the names of its +// contributors may be used to endorse or promote products derived from +// this software without specific prior written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +// +'use strict'; +var grpc = require('grpc'); +var v1_health_pb = require('../v1/health_pb.js'); + +function serialize_HealthCheckRequest(arg) { + if (!(arg instanceof v1_health_pb.HealthCheckRequest)) { + throw new Error('Expected argument of type HealthCheckRequest'); + } + return new Buffer(arg.serializeBinary()); +} + +function deserialize_HealthCheckRequest(buffer_arg) { + return v1_health_pb.HealthCheckRequest.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_HealthCheckResponse(arg) { + if (!(arg instanceof v1_health_pb.HealthCheckResponse)) { + throw new Error('Expected argument of type HealthCheckResponse'); + } + return new Buffer(arg.serializeBinary()); +} + +function deserialize_HealthCheckResponse(buffer_arg) { + return v1_health_pb.HealthCheckResponse.deserializeBinary(new Uint8Array(buffer_arg)); +} + + +var HealthService = exports.HealthService = { + check: { + path: '/grpc.health.v1.Health/Check', + requestStream: false, + responseStream: false, + requestType: v1_health_pb.HealthCheckRequest, + responseType: v1_health_pb.HealthCheckResponse, + requestSerialize: serialize_HealthCheckRequest, + requestDeserialize: deserialize_HealthCheckRequest, + responseSerialize: serialize_HealthCheckResponse, + responseDeserialize: deserialize_HealthCheckResponse, + }, +}; + +exports.HealthClient = grpc.makeGenericClientConstructor(HealthService); diff --git a/src/node/health_check/v1/health_pb.js b/src/node/health_check/v1/health_pb.js new file mode 100644 index 00000000000..b36d47cdbb9 --- /dev/null +++ b/src/node/health_check/v1/health_pb.js @@ -0,0 +1,342 @@ +/** + * @fileoverview + * @enhanceable + * @public + */ +// GENERATED CODE -- DO NOT EDIT! + +var jspb = require('google-protobuf'); +var goog = jspb; +var global = Function('return this')(); + +goog.exportSymbol('proto.grpc.health.v1.HealthCheckRequest', null, global); +goog.exportSymbol('proto.grpc.health.v1.HealthCheckResponse', null, global); +goog.exportSymbol('proto.grpc.health.v1.HealthCheckResponse.ServingStatus', null, global); + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.health.v1.HealthCheckRequest = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.health.v1.HealthCheckRequest, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.grpc.health.v1.HealthCheckRequest.displayName = 'proto.grpc.health.v1.HealthCheckRequest'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.health.v1.HealthCheckRequest.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.health.v1.HealthCheckRequest.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.health.v1.HealthCheckRequest} msg The msg instance to transform. + * @return {!Object} + */ +proto.grpc.health.v1.HealthCheckRequest.toObject = function(includeInstance, msg) { + var f, obj = { + service: msg.getService() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.health.v1.HealthCheckRequest} + */ +proto.grpc.health.v1.HealthCheckRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.health.v1.HealthCheckRequest; + return proto.grpc.health.v1.HealthCheckRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.health.v1.HealthCheckRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.health.v1.HealthCheckRequest} + */ +proto.grpc.health.v1.HealthCheckRequest.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setService(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Class method variant: serializes the given message to binary data + * (in protobuf wire format), writing to the given BinaryWriter. + * @param {!proto.grpc.health.v1.HealthCheckRequest} message + * @param {!jspb.BinaryWriter} writer + */ +proto.grpc.health.v1.HealthCheckRequest.serializeBinaryToWriter = function(message, writer) { + message.serializeBinaryToWriter(writer); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.health.v1.HealthCheckRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + this.serializeBinaryToWriter(writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format), + * writing to the given BinaryWriter. + * @param {!jspb.BinaryWriter} writer + */ +proto.grpc.health.v1.HealthCheckRequest.prototype.serializeBinaryToWriter = function (writer) { + var f = undefined; + f = this.getService(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * Creates a deep clone of this proto. No data is shared with the original. + * @return {!proto.grpc.health.v1.HealthCheckRequest} The clone. + */ +proto.grpc.health.v1.HealthCheckRequest.prototype.cloneMessage = function() { + return /** @type {!proto.grpc.health.v1.HealthCheckRequest} */ (jspb.Message.cloneMessage(this)); +}; + + +/** + * optional string service = 1; + * @return {string} + */ +proto.grpc.health.v1.HealthCheckRequest.prototype.getService = function() { + return /** @type {string} */ (jspb.Message.getFieldProto3(this, 1, "")); +}; + + +/** @param {string} value */ +proto.grpc.health.v1.HealthCheckRequest.prototype.setService = function(value) { + jspb.Message.setField(this, 1, value); +}; + + + +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.grpc.health.v1.HealthCheckResponse = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.grpc.health.v1.HealthCheckResponse, jspb.Message); +if (goog.DEBUG && !COMPILED) { + proto.grpc.health.v1.HealthCheckResponse.displayName = 'proto.grpc.health.v1.HealthCheckResponse'; +} + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto suitable for use in Soy templates. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * com.google.apps.jspb.JsClassTemplate.JS_RESERVED_WORDS. + * @param {boolean=} opt_includeInstance Whether to include the JSPB instance + * for transitional soy proto support: http://goto/soy-param-migration + * @return {!Object} + */ +proto.grpc.health.v1.HealthCheckResponse.prototype.toObject = function(opt_includeInstance) { + return proto.grpc.health.v1.HealthCheckResponse.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Whether to include the JSPB + * instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.grpc.health.v1.HealthCheckResponse} msg The msg instance to transform. + * @return {!Object} + */ +proto.grpc.health.v1.HealthCheckResponse.toObject = function(includeInstance, msg) { + var f, obj = { + status: msg.getStatus() + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.grpc.health.v1.HealthCheckResponse} + */ +proto.grpc.health.v1.HealthCheckResponse.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.grpc.health.v1.HealthCheckResponse; + return proto.grpc.health.v1.HealthCheckResponse.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.grpc.health.v1.HealthCheckResponse} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.grpc.health.v1.HealthCheckResponse} + */ +proto.grpc.health.v1.HealthCheckResponse.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.grpc.health.v1.HealthCheckResponse.ServingStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Class method variant: serializes the given message to binary data + * (in protobuf wire format), writing to the given BinaryWriter. + * @param {!proto.grpc.health.v1.HealthCheckResponse} message + * @param {!jspb.BinaryWriter} writer + */ +proto.grpc.health.v1.HealthCheckResponse.serializeBinaryToWriter = function(message, writer) { + message.serializeBinaryToWriter(writer); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.grpc.health.v1.HealthCheckResponse.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + this.serializeBinaryToWriter(writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the message to binary data (in protobuf wire format), + * writing to the given BinaryWriter. + * @param {!jspb.BinaryWriter} writer + */ +proto.grpc.health.v1.HealthCheckResponse.prototype.serializeBinaryToWriter = function (writer) { + var f = undefined; + f = this.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } +}; + + +/** + * Creates a deep clone of this proto. No data is shared with the original. + * @return {!proto.grpc.health.v1.HealthCheckResponse} The clone. + */ +proto.grpc.health.v1.HealthCheckResponse.prototype.cloneMessage = function() { + return /** @type {!proto.grpc.health.v1.HealthCheckResponse} */ (jspb.Message.cloneMessage(this)); +}; + + +/** + * optional ServingStatus status = 1; + * @return {!proto.grpc.health.v1.HealthCheckResponse.ServingStatus} + */ +proto.grpc.health.v1.HealthCheckResponse.prototype.getStatus = function() { + return /** @type {!proto.grpc.health.v1.HealthCheckResponse.ServingStatus} */ (jspb.Message.getFieldProto3(this, 1, 0)); +}; + + +/** @param {!proto.grpc.health.v1.HealthCheckResponse.ServingStatus} value */ +proto.grpc.health.v1.HealthCheckResponse.prototype.setStatus = function(value) { + jspb.Message.setField(this, 1, value); +}; + + +/** + * @enum {number} + */ +proto.grpc.health.v1.HealthCheckResponse.ServingStatus = { + UNKNOWN: 0, + SERVING: 1, + NOT_SERVING: 2 +}; + +goog.object.extend(exports, proto.grpc.health.v1); From 1500761b075abb5971a8662c2ccb6bff828a6a06 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 6 Jul 2016 09:36:16 -0700 Subject: [PATCH 1478/1894] Prevent polling island + workqueue reference loop --- src/core/lib/iomgr/ev_epoll_linux.c | 48 ++++++++++++++++++++--------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index e5aab293bd3..634946a781a 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -153,7 +153,7 @@ static void fd_global_shutdown(void); * Polling island Declarations */ -// #define GRPC_PI_REF_COUNT_DEBUG +//#define GRPC_PI_REF_COUNT_DEBUG #ifdef GRPC_PI_REF_COUNT_DEBUG #define PI_ADD_REF(p, r) pi_add_ref_dbg((p), (r), __FILE__, __LINE__) @@ -174,7 +174,7 @@ typedef struct polling_island { Once the ref count becomes zero, this structure is destroyed which means we should ensure that there is never a scenario where a PI_ADD_REF() is racing with a PI_UNREF() that just made the ref_count zero. */ - gpr_refcount ref_count; + gpr_atm ref_count; /* Pointer to the polling_island this merged into. * merged_to value is only set once in polling_island's lifetime (and that too @@ -296,7 +296,7 @@ static void pi_unref(grpc_exec_ctx *exec_ctx, polling_island *pi); static void pi_add_ref_dbg(polling_island *pi, char *reason, char *file, int line) { - long old_cnt = gpr_atm_acq_load(&(pi->ref_count.count)); + long old_cnt = gpr_atm_acq_load(&pi->ref_count); pi_add_ref(pi); gpr_log(GPR_DEBUG, "Add ref pi: %p, old: %ld -> new:%ld (%s) - (%s, %d)", (void *)pi, old_cnt, old_cnt + 1, reason, file, line); @@ -304,17 +304,22 @@ static void pi_add_ref_dbg(polling_island *pi, char *reason, char *file, static void pi_unref_dbg(grpc_exec_ctx *exec_ctx, polling_island *pi, char *reason, char *file, int line) { - long old_cnt = gpr_atm_acq_load(&(pi->ref_count.count)); + long old_cnt = gpr_atm_acq_load(&pi->ref_count); pi_unref(exec_ctx, pi); gpr_log(GPR_DEBUG, "Unref pi: %p, old:%ld -> new:%ld (%s) - (%s, %d)", (void *)pi, old_cnt, (old_cnt - 1), reason, file, line); } #endif -static void pi_add_ref(polling_island *pi) { gpr_ref(&pi->ref_count); } +static void pi_add_ref(polling_island *pi) { + gpr_atm_no_barrier_fetch_add(&pi->ref_count, 1); +} static void pi_unref(grpc_exec_ctx *exec_ctx, polling_island *pi) { - /* If ref count went to zero, delete the polling island. + /* If ref count went to one, we're back to just the workqueue owning a ref. + Unref the workqueue to break the loop. + + If ref count went to zero, delete the polling island. Note that this deletion not be done under a lock. Once the ref count goes to zero, we are guaranteed that no one else holds a reference to the polling island (and that there is no racing pi_add_ref() call either). @@ -322,12 +327,20 @@ static void pi_unref(grpc_exec_ctx *exec_ctx, polling_island *pi) { Also, if we are deleting the polling island and the merged_to field is non-empty, we should remove a ref to the merged_to polling island */ - if (gpr_unref(&pi->ref_count)) { - polling_island *next = (polling_island *)gpr_atm_acq_load(&pi->merged_to); - polling_island_delete(exec_ctx, pi); - if (next != NULL) { - PI_UNREF(exec_ctx, next, "pi_delete"); /* Recursive call */ + switch (gpr_atm_full_fetch_add(&pi->ref_count, -1)) { + case 2: /* last external ref: the only one now owned is by the workqueue */ + GRPC_WORKQUEUE_UNREF(exec_ctx, pi->workqueue, "polling_island"); + break; + case 1: { + polling_island *next = (polling_island *)gpr_atm_acq_load(&pi->merged_to); + polling_island_delete(exec_ctx, pi); + if (next != NULL) { + PI_UNREF(exec_ctx, next, "pi_delete"); /* Recursive call */ + } + break; } + case 0: + GPR_UNREACHABLE_CODE(return ); } } @@ -478,7 +491,7 @@ static polling_island *polling_island_create(grpc_exec_ctx *exec_ctx, pi->epoll_fd = -1; pi->workqueue = NULL; - gpr_ref_init(&pi->ref_count, 0); + gpr_atm_rel_store(&pi->ref_count, 0); gpr_atm_rel_store(&pi->merged_to, (gpr_atm)NULL); pi->epoll_fd = epoll_create1(EPOLL_CLOEXEC); @@ -501,7 +514,7 @@ static polling_island *polling_island_create(grpc_exec_ctx *exec_ctx, error); GPR_ASSERT(pi->workqueue->wakeup_read_fd->polling_island == NULL); pi->workqueue->wakeup_read_fd->polling_island = pi; - PI_ADD_REF(pi, 1); + PI_ADD_REF(pi, "fd"); } done: @@ -525,7 +538,6 @@ static void polling_island_delete(grpc_exec_ctx *exec_ctx, polling_island *pi) { gpr_atm_rel_store(&pi->merged_to, (gpr_atm)NULL); close(pi->epoll_fd); - GRPC_WORKQUEUE_UNREF(exec_ctx, pi->workqueue, "polling_island"); gpr_mu_destroy(&pi->mu); gpr_free(pi->fds); gpr_free(pi); @@ -885,6 +897,7 @@ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, const char *reason) { bool is_fd_closed = false; grpc_error *error = GRPC_ERROR_NONE; + polling_island *unref_pi = NULL; gpr_mu_lock(&fd->mu); fd->on_done_closure = on_done; @@ -918,7 +931,7 @@ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, polling_island_remove_fd_locked(pi_latest, fd, is_fd_closed, &error); gpr_mu_unlock(&pi_latest->mu); - PI_UNREF(exec_ctx, fd->polling_island, "fd_orphan"); + unref_pi = fd->polling_island; fd->polling_island = NULL; } gpr_mu_unlock(&fd->pi_mu); @@ -927,6 +940,9 @@ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, gpr_mu_unlock(&fd->mu); UNREF_BY(fd, 2, reason); /* Drop the reference */ + if (unref_pi != NULL) { + PI_UNREF(exec_ctx, unref_pi, "fd_orphan"); + } GRPC_LOG_IF_ERROR("fd_orphan", GRPC_ERROR_REF(error)); } @@ -1595,6 +1611,8 @@ static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, gpr_mu_unlock(&fd->pi_mu); gpr_mu_unlock(&pollset->mu); + + GRPC_LOG_IF_ERROR("pollset_add_fd", error); } /******************************************************************************* From f0ae3e39f08313cb7105374d8da97b210edc1ef1 Mon Sep 17 00:00:00 2001 From: Julien Boeuf Date: Wed, 6 Jul 2016 11:23:51 -0700 Subject: [PATCH 1479/1894] Fixing #7182: Change the return status codes according to the documentation. --- src/core/lib/security/transport/client_auth_filter.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/lib/security/transport/client_auth_filter.c b/src/core/lib/security/transport/client_auth_filter.c index 14ccf72dc95..ed7929aa27e 100644 --- a/src/core/lib/security/transport/client_auth_filter.c +++ b/src/core/lib/security/transport/client_auth_filter.c @@ -176,7 +176,7 @@ static void send_security_metadata(grpc_exec_ctx *exec_ctx, calld->creds = grpc_composite_call_credentials_create(channel_call_creds, ctx->creds, NULL); if (calld->creds == NULL) { - bubble_up_error(exec_ctx, elem, GRPC_STATUS_INTERNAL, + bubble_up_error(exec_ctx, elem, GRPC_STATUS_UNAUTHENTICATED, "Incompatible credentials set on channel and call."); return; } @@ -205,7 +205,7 @@ static void on_host_checked(grpc_exec_ctx *exec_ctx, void *user_data, char *error_msg; gpr_asprintf(&error_msg, "Invalid host %s set in :authority metadata.", grpc_mdstr_as_c_string(calld->host)); - bubble_up_error(exec_ctx, elem, GRPC_STATUS_INTERNAL, error_msg); + bubble_up_error(exec_ctx, elem, GRPC_STATUS_UNAUTHENTICATED, error_msg); gpr_free(error_msg); } } From f83f8ca443778dc00b47b6364053970b30df83f9 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 6 Jul 2016 11:34:08 -0700 Subject: [PATCH 1480/1894] Remove pi_mu --- src/core/lib/iomgr/ev_epoll_linux.c | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 634946a781a..0c42d6e99a9 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -114,9 +114,7 @@ struct grpc_fd { grpc_closure *read_closure; grpc_closure *write_closure; - /* The polling island to which this fd belongs to and the mutex protecting the - the field */ - gpr_mu pi_mu; + /* The polling island to which this fd belongs to (protected by mu) */ struct polling_island *polling_island; struct grpc_fd *freelist_next; @@ -846,7 +844,6 @@ static grpc_fd *fd_create(int fd, const char *name) { if (new_fd == NULL) { new_fd = gpr_malloc(sizeof(grpc_fd)); gpr_mu_init(&new_fd->mu); - gpr_mu_init(&new_fd->pi_mu); } /* Note: It is not really needed to get the new_fd->mu lock here. If this is a @@ -925,7 +922,6 @@ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, - Unlock the latest polling island - Set fd->polling_island to NULL (but remove the ref on the polling island before doing this.) */ - gpr_mu_lock(&fd->pi_mu); if (fd->polling_island != NULL) { polling_island *pi_latest = polling_island_lock(fd->polling_island); polling_island_remove_fd_locked(pi_latest, fd, is_fd_closed, &error); @@ -934,7 +930,6 @@ static void fd_orphan(grpc_exec_ctx *exec_ctx, grpc_fd *fd, unref_pi = fd->polling_island; fd->polling_island = NULL; } - gpr_mu_unlock(&fd->pi_mu); grpc_exec_ctx_sched(exec_ctx, fd->on_done_closure, error, NULL); @@ -1043,13 +1038,13 @@ static void fd_notify_on_write(grpc_exec_ctx *exec_ctx, grpc_fd *fd, } static grpc_workqueue *fd_get_workqueue(grpc_fd *fd) { - gpr_mu_lock(&fd->pi_mu); + gpr_mu_lock(&fd->mu); grpc_workqueue *workqueue = NULL; if (fd->polling_island != NULL) { workqueue = GRPC_WORKQUEUE_REF(fd->polling_island->workqueue, "get_workqueue"); } - gpr_mu_unlock(&fd->pi_mu); + gpr_mu_unlock(&fd->mu); return workqueue; } @@ -1534,7 +1529,7 @@ static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, grpc_error *error = GRPC_ERROR_NONE; gpr_mu_lock(&pollset->mu); - gpr_mu_lock(&fd->pi_mu); + gpr_mu_lock(&fd->mu); polling_island *pi_new = NULL; @@ -1609,7 +1604,7 @@ static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, pollset->polling_island = pi_new; } - gpr_mu_unlock(&fd->pi_mu); + gpr_mu_unlock(&fd->mu); gpr_mu_unlock(&pollset->mu); GRPC_LOG_IF_ERROR("pollset_add_fd", error); @@ -1763,9 +1758,9 @@ static void pollset_set_del_pollset_set(grpc_exec_ctx *exec_ctx, void *grpc_fd_get_polling_island(grpc_fd *fd) { polling_island *pi; - gpr_mu_lock(&fd->pi_mu); + gpr_mu_lock(&fd->mu); pi = fd->polling_island; - gpr_mu_unlock(&fd->pi_mu); + gpr_mu_unlock(&fd->mu); return pi; } From 7212c233e84f199742bb98176eef9f8d15ccaabb Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 6 Jul 2016 13:11:09 -0700 Subject: [PATCH 1481/1894] Fix mutex loop --- src/core/lib/iomgr/ev_epoll_linux.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 0c42d6e99a9..30f03c17bc3 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -1533,6 +1533,7 @@ static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, polling_island *pi_new = NULL; +retry: /* 1) If fd->polling_island and pollset->polling_island are both non-NULL and * equal, do nothing. * 2) If fd->polling_island and pollset->polling_island are both NULL, create @@ -1550,7 +1551,12 @@ static void pollset_add_fd(grpc_exec_ctx *exec_ctx, grpc_pollset *pollset, if (fd->polling_island == pollset->polling_island) { pi_new = fd->polling_island; if (pi_new == NULL) { + gpr_mu_unlock(&fd->mu); pi_new = polling_island_create(exec_ctx, fd, &error); + gpr_mu_lock(&fd->mu); + if (fd->polling_island != NULL) { + goto retry; + } GRPC_POLLING_TRACE( "pollset_add_fd: Created new polling island. pi_new: %p (fd: %d, " From 27da642ab990f3a69a11255395d80e71ffcbdd21 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 6 Jul 2016 13:14:46 -0700 Subject: [PATCH 1482/1894] Better implementation of backup loop --- src/core/lib/iomgr/ev_epoll_linux.c | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 30f03c17bc3..0fb4399fa7a 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -1555,13 +1555,19 @@ retry: pi_new = polling_island_create(exec_ctx, fd, &error); gpr_mu_lock(&fd->mu); if (fd->polling_island != NULL) { + GRPC_POLLING_TRACE( + "pollset_add_fd: Raced creating new polling island. pi_new: %p " + "(fd: %d, pollset: %p)", + (void *)pi_new, fd->fd, (void *)pollset); + PI_ADD_REF(pi_new, "dance_of_destruction"); + PI_UNREF(exec_ctx, pi_new, "dance_of_destruction"); goto retry; + } else { + GRPC_POLLING_TRACE( + "pollset_add_fd: Created new polling island. pi_new: %p (fd: %d, " + "pollset: %p)", + (void *)pi_new, fd->fd, (void *)pollset); } - - GRPC_POLLING_TRACE( - "pollset_add_fd: Created new polling island. pi_new: %p (fd: %d, " - "pollset: %p)", - (void *)pi_new, fd->fd, (void *)pollset); } } else if (fd->polling_island == NULL) { pi_new = polling_island_lock(pollset->polling_island); From 19a51a914da88924fa38ce0b6c2beca687d4e3c6 Mon Sep 17 00:00:00 2001 From: yang-g Date: Wed, 6 Jul 2016 13:19:00 -0700 Subject: [PATCH 1483/1894] Remove unused file --- src/core/lib/http/parser.c.orig | 357 -------------------------------- 1 file changed, 357 deletions(-) delete mode 100644 src/core/lib/http/parser.c.orig diff --git a/src/core/lib/http/parser.c.orig b/src/core/lib/http/parser.c.orig deleted file mode 100644 index 74d90fd8bfb..00000000000 --- a/src/core/lib/http/parser.c.orig +++ /dev/null @@ -1,357 +0,0 @@ -/* - * - * Copyright 2015, Google Inc. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are - * met: - * - * * Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * * Redistributions in binary form must reproduce the above - * copyright notice, this list of conditions and the following disclaimer - * in the documentation and/or other materials provided with the - * distribution. - * * Neither the name of Google Inc. nor the names of its - * contributors may be used to endorse or promote products derived from - * this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, - * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - * - */ - -#include "src/core/lib/http/parser.h" - -#include - -#include -#include -#include - -int grpc_http1_trace = 0; - -static char *buf2str(void *buffer, size_t length) { - char *out = gpr_malloc(length + 1); - memcpy(out, buffer, length); - out[length] = 0; - return out; -} - -static grpc_error *handle_response_line(grpc_http_parser *parser) { - uint8_t *beg = parser->cur_line; - uint8_t *cur = beg; - uint8_t *end = beg + parser->cur_line_length; - - if (cur == end || *cur++ != 'H') return GRPC_ERROR_CREATE("Expected 'H'"); - if (cur == end || *cur++ != 'T') return GRPC_ERROR_CREATE("Expected 'T'"); - if (cur == end || *cur++ != 'T') return GRPC_ERROR_CREATE("Expected 'T'"); - if (cur == end || *cur++ != 'P') return GRPC_ERROR_CREATE("Expected 'P'"); - if (cur == end || *cur++ != '/') return GRPC_ERROR_CREATE("Expected '/'"); - if (cur == end || *cur++ != '1') return GRPC_ERROR_CREATE("Expected '1'"); - if (cur == end || *cur++ != '.') return GRPC_ERROR_CREATE("Expected '.'"); - if (cur == end || *cur < '0' || *cur++ > '1') { - return GRPC_ERROR_CREATE("Expected HTTP/1.0 or HTTP/1.1"); - } - if (cur == end || *cur++ != ' ') return GRPC_ERROR_CREATE("Expected ' '"); - if (cur == end || *cur < '1' || *cur++ > '9') - return GRPC_ERROR_CREATE("Expected status code"); - if (cur == end || *cur < '0' || *cur++ > '9') - return GRPC_ERROR_CREATE("Expected status code"); - if (cur == end || *cur < '0' || *cur++ > '9') - return GRPC_ERROR_CREATE("Expected status code"); - parser->http.response->status = - (cur[-3] - '0') * 100 + (cur[-2] - '0') * 10 + (cur[-1] - '0'); - if (cur == end || *cur++ != ' ') return GRPC_ERROR_CREATE("Expected ' '"); - - /* we don't really care about the status code message */ - - return GRPC_ERROR_NONE; -} - -static grpc_error *handle_request_line(grpc_http_parser *parser) { - uint8_t *beg = parser->cur_line; - uint8_t *cur = beg; - uint8_t *end = beg + parser->cur_line_length; - uint8_t vers_major = 0; - uint8_t vers_minor = 0; - - while (cur != end && *cur++ != ' ') - ; - if (cur == end) return GRPC_ERROR_CREATE("No method on HTTP request line"); - parser->http.request->method = buf2str(beg, (size_t)(cur - beg - 1)); - - beg = cur; - while (cur != end && *cur++ != ' ') - ; - if (cur == end) return GRPC_ERROR_CREATE("No path on HTTP request line"); - parser->http.request->path = buf2str(beg, (size_t)(cur - beg - 1)); - - if (cur == end || *cur++ != 'H') return GRPC_ERROR_CREATE("Expected 'H'"); - if (cur == end || *cur++ != 'T') return GRPC_ERROR_CREATE("Expected 'T'"); - if (cur == end || *cur++ != 'T') return GRPC_ERROR_CREATE("Expected 'T'"); - if (cur == end || *cur++ != 'P') return GRPC_ERROR_CREATE("Expected 'P'"); - if (cur == end || *cur++ != '/') return GRPC_ERROR_CREATE("Expected '/'"); - vers_major = (uint8_t)(*cur++ - '1' + 1); - ++cur; - if (cur == end) - return GRPC_ERROR_CREATE("End of line in HTTP version string"); - vers_minor = (uint8_t)(*cur++ - '1' + 1); - - if (vers_major == 1) { - if (vers_minor == 0) { - parser->http.request->version = GRPC_HTTP_HTTP10; - } else if (vers_minor == 1) { - parser->http.request->version = GRPC_HTTP_HTTP11; - } else { - return GRPC_ERROR_CREATE( - "Expected one of HTTP/1.0, HTTP/1.1, or HTTP/2.0"); - } - } else if (vers_major == 2) { - if (vers_minor == 0) { - parser->http.request->version = GRPC_HTTP_HTTP20; - } else { - return GRPC_ERROR_CREATE( - "Expected one of HTTP/1.0, HTTP/1.1, or HTTP/2.0"); - } - } else { - return GRPC_ERROR_CREATE("Expected one of HTTP/1.0, HTTP/1.1, or HTTP/2.0"); - } - - return GRPC_ERROR_NONE; -} - -static grpc_error *handle_first_line(grpc_http_parser *parser) { - switch (parser->type) { - case GRPC_HTTP_REQUEST: - return handle_request_line(parser); - case GRPC_HTTP_RESPONSE: - return handle_response_line(parser); - } - GPR_UNREACHABLE_CODE(return GRPC_ERROR_CREATE("Should never reach here")); -} - -static grpc_error *add_header(grpc_http_parser *parser) { - uint8_t *beg = parser->cur_line; - uint8_t *cur = beg; - uint8_t *end = beg + parser->cur_line_length; - size_t *hdr_count = NULL; - grpc_http_header **hdrs = NULL; - grpc_http_header hdr = {NULL, NULL}; - grpc_error *error = GRPC_ERROR_NONE; - - GPR_ASSERT(cur != end); - - if (*cur == ' ' || *cur == '\t') { - error = GRPC_ERROR_CREATE("Continued header lines not supported yet"); - goto done; - } - - while (cur != end && *cur != ':') { - cur++; - } - if (cur == end) { -<<<<<<< HEAD - error = GRPC_ERROR_CREATE("Didn't find ':' in header string"); - goto done; -======= - if (grpc_http1_trace) { - gpr_log(GPR_ERROR, "Didn't find ':' in header string"); - } - goto error; ->>>>>>> a709afe241d8b264a1c326315f757b4a8d330207 - } - GPR_ASSERT(cur >= beg); - hdr.key = buf2str(beg, (size_t)(cur - beg)); - cur++; /* skip : */ - - while (cur != end && (*cur == ' ' || *cur == '\t')) { - cur++; - } - GPR_ASSERT((size_t)(end - cur) >= parser->cur_line_end_length); - hdr.value = buf2str(cur, (size_t)(end - cur) - parser->cur_line_end_length); - - switch (parser->type) { - case GRPC_HTTP_RESPONSE: - hdr_count = &parser->http.response->hdr_count; - hdrs = &parser->http.response->hdrs; - break; - case GRPC_HTTP_REQUEST: - hdr_count = &parser->http.request->hdr_count; - hdrs = &parser->http.request->hdrs; - break; - } - - if (*hdr_count == parser->hdr_capacity) { - parser->hdr_capacity = - GPR_MAX(parser->hdr_capacity + 1, parser->hdr_capacity * 3 / 2); - *hdrs = gpr_realloc(*hdrs, parser->hdr_capacity * sizeof(**hdrs)); - } - (*hdrs)[(*hdr_count)++] = hdr; - -done: - if (error != GRPC_ERROR_NONE) { - gpr_free(hdr.key); - gpr_free(hdr.value); - } - return error; -} - -static grpc_error *finish_line(grpc_http_parser *parser) { - grpc_error *err; - switch (parser->state) { - case GRPC_HTTP_FIRST_LINE: - err = handle_first_line(parser); - if (err != GRPC_ERROR_NONE) return err; - parser->state = GRPC_HTTP_HEADERS; - break; - case GRPC_HTTP_HEADERS: - if (parser->cur_line_length == parser->cur_line_end_length) { - parser->state = GRPC_HTTP_BODY; - break; - } - err = add_header(parser); - if (err != GRPC_ERROR_NONE) { - return err; - } - break; - case GRPC_HTTP_BODY: - GPR_UNREACHABLE_CODE(return GRPC_ERROR_CREATE("Should never reach here")); - } - - parser->cur_line_length = 0; - return GRPC_ERROR_NONE; -} - -static grpc_error *addbyte_body(grpc_http_parser *parser, uint8_t byte) { - size_t *body_length = NULL; - char **body = NULL; - - if (parser->type == GRPC_HTTP_RESPONSE) { - body_length = &parser->http.response->body_length; - body = &parser->http.response->body; - } else if (parser->type == GRPC_HTTP_REQUEST) { - body_length = &parser->http.request->body_length; - body = &parser->http.request->body; - } else { - GPR_UNREACHABLE_CODE(return GRPC_ERROR_CREATE("Should never reach here")); - } - - if (*body_length == parser->body_capacity) { - parser->body_capacity = GPR_MAX(8, parser->body_capacity * 3 / 2); - *body = gpr_realloc((void *)*body, parser->body_capacity); - } - (*body)[*body_length] = (char)byte; - (*body_length)++; - - return GRPC_ERROR_NONE; -} - -static bool check_line(grpc_http_parser *parser) { - if (parser->cur_line_length >= 2 && - parser->cur_line[parser->cur_line_length - 2] == '\r' && - parser->cur_line[parser->cur_line_length - 1] == '\n') { - return true; - } - - // HTTP request with \n\r line termiantors. - else if (parser->cur_line_length >= 2 && - parser->cur_line[parser->cur_line_length - 2] == '\n' && - parser->cur_line[parser->cur_line_length - 1] == '\r') { - return true; - } - - // HTTP request with only \n line terminators. - else if (parser->cur_line_length >= 1 && - parser->cur_line[parser->cur_line_length - 1] == '\n') { - parser->cur_line_end_length = 1; - return true; - } - - return false; -} - -static grpc_error *addbyte(grpc_http_parser *parser, uint8_t byte) { - switch (parser->state) { - case GRPC_HTTP_FIRST_LINE: - case GRPC_HTTP_HEADERS: - if (parser->cur_line_length >= GRPC_HTTP_PARSER_MAX_HEADER_LENGTH) { - if (grpc_http1_trace) - gpr_log(GPR_ERROR, "HTTP client max line length (%d) exceeded", - GRPC_HTTP_PARSER_MAX_HEADER_LENGTH); - return 0; - } - parser->cur_line[parser->cur_line_length] = byte; - parser->cur_line_length++; - if (check_line(parser)) { - return finish_line(parser); - } else { - return GRPC_ERROR_NONE; - } - GPR_UNREACHABLE_CODE(return 0); - case GRPC_HTTP_BODY: - return addbyte_body(parser, byte); - } - GPR_UNREACHABLE_CODE(return 0); -} - -void grpc_http_parser_init(grpc_http_parser *parser, grpc_http_type type, - void *request_or_response) { - memset(parser, 0, sizeof(*parser)); - parser->state = GRPC_HTTP_FIRST_LINE; - parser->type = type; - parser->http.request_or_response = request_or_response; - parser->cur_line_end_length = 2; -} - -void grpc_http_parser_destroy(grpc_http_parser *parser) {} - -void grpc_http_request_destroy(grpc_http_request *request) { - size_t i; - gpr_free(request->body); - for (i = 0; i < request->hdr_count; i++) { - gpr_free(request->hdrs[i].key); - gpr_free(request->hdrs[i].value); - } - gpr_free(request->hdrs); - gpr_free(request->method); - gpr_free(request->path); -} - -void grpc_http_response_destroy(grpc_http_response *response) { - size_t i; - gpr_free(response->body); - for (i = 0; i < response->hdr_count; i++) { - gpr_free(response->hdrs[i].key); - gpr_free(response->hdrs[i].value); - } - gpr_free(response->hdrs); -} - -grpc_error *grpc_http_parser_parse(grpc_http_parser *parser, gpr_slice slice) { - size_t i; - - for (i = 0; i < GPR_SLICE_LENGTH(slice); i++) { - grpc_error *err = addbyte(parser, GPR_SLICE_START_PTR(slice)[i]); - if (err != GRPC_ERROR_NONE) return err; - } - - return GRPC_ERROR_NONE; -} - -grpc_error *grpc_http_parser_eof(grpc_http_parser *parser) { - if (parser->state != GRPC_HTTP_BODY) { - return GRPC_ERROR_CREATE("Did not finish headers"); - } - return GRPC_ERROR_NONE; -} From d552dbdf4d47c48aa52b25f963e1ea3c7d87351d Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 6 Jul 2016 13:41:32 -0700 Subject: [PATCH 1484/1894] Cleanup test --- test/core/end2end/tests/network_status_change.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/test/core/end2end/tests/network_status_change.c b/test/core/end2end/tests/network_status_change.c index 10207844ab0..39ddc137543 100644 --- a/test/core/end2end/tests/network_status_change.c +++ b/test/core/end2end/tests/network_status_change.c @@ -186,9 +186,10 @@ static void test_invoke_network_status_change(grpc_end2end_test_config config) { GPR_ASSERT(GRPC_CALL_OK == error); cq_expect_completion(cqv, tag(102), 1); + cq_verify(cqv); + // Simulate the network loss event grpc_network_status_shutdown_all_endpoints(); - cq_verify(cqv); op = ops; op->op = GRPC_OP_RECV_CLOSE_ON_SERVER; @@ -205,7 +206,7 @@ static void test_invoke_network_status_change(grpc_end2end_test_config config) { op++; error = grpc_call_start_batch(s, ops, (size_t)(op - ops), tag(103), NULL); GPR_ASSERT(GRPC_CALL_OK == error); - void shutdown_all_endpoints(); + cq_expect_completion(cqv, tag(103), 1); cq_expect_completion(cqv, tag(1), 1); cq_verify(cqv); From 8db469baf6edcee935c58f42613609f7265020a4 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 6 Jul 2016 13:42:13 -0700 Subject: [PATCH 1485/1894] Remove the sea of green to allow focusing on failures --- tools/run_tests/run_tests.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index c1254275e6c..f61821557c4 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -1228,8 +1228,6 @@ def _build_and_run( jobset.message( 'FLAKE', '%s [%d/%d runs flaked]' % (k, num_failures, num_runs), do_newline=True) - else: - jobset.message('PASSED', k, do_newline=True) finally: for antagonist in antagonists: antagonist.kill() From b0f15e8af3622ebffa8414771fa6934568155179 Mon Sep 17 00:00:00 2001 From: vjpai Date: Wed, 6 Jul 2016 13:57:01 -0700 Subject: [PATCH 1486/1894] Reduce assertions, use status codes, increase verbosity on errors --- test/cpp/qps/client_async.cc | 1 - test/cpp/qps/client_sync.cc | 12 ++-- test/cpp/qps/driver.cc | 131 +++++++++++++++++++++++++---------- test/cpp/qps/qps_worker.cc | 35 +++++----- 4 files changed, 122 insertions(+), 57 deletions(-) diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index 1507d1e3d66..2f987fc80d4 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -31,7 +31,6 @@ * */ -#include #include #include #include diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index c88e95b80e5..686c8d750c4 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -31,7 +31,6 @@ * */ -#include #include #include #include @@ -128,11 +127,16 @@ class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient { } ~SynchronousStreamingClient() { EndThreads(); - for (auto stream = &stream_[0]; stream != &stream_[num_threads_]; - stream++) { + for (size_t i = 0; i < num_threads_; i++) { + auto stream = &stream_[i]; if (*stream) { (*stream)->WritesDone(); - EXPECT_TRUE((*stream)->Finish().ok()); + Status s = (*stream)->Finish(); + EXPECT_TRUE(s.ok()); + if (!s.ok()) { + gpr_log(GPR_ERROR, "Stream %zu received an error %s", i, + s.error_message().c_str()); + } } } delete[] stream_; diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index 08bf0458832..ba38de76f31 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -87,7 +87,7 @@ static std::unordered_map> get_hosts_and_cores( CoreRequest dummy; CoreResponse cores; grpc::Status s = stub->CoreCount(&ctx, dummy, &cores); - assert(s.ok()); + GPR_ASSERT(s.ok()); std::deque dq; for (int i = 0; i < cores.cores(); i++) { dq.push_back(i); @@ -289,9 +289,13 @@ std::unique_ptr RunScenario( *args.mutable_setup() = server_config; servers[i].stream = servers[i].stub->RunServer(runsc::AllocContext(&contexts)); - GPR_ASSERT(servers[i].stream->Write(args)); + if (!servers[i].stream->Write(args)) { + gpr_log(GPR_ERROR, "Could not write args to server %zu", i); + } ServerStatus init_status; - GPR_ASSERT(servers[i].stream->Read(&init_status)); + if (!servers[i].stream->Read(&init_status)) { + gpr_log(GPR_ERROR, "Server %zu did not yield initial status", i); + } gpr_join_host_port(&cli_target, host, init_status.port()); client_config.add_server_targets(cli_target); gpr_free(host); @@ -344,10 +348,14 @@ std::unique_ptr RunScenario( ClientArgs args; *args.mutable_setup() = per_client_config; clients[i].stream = - clients[i].stub->RunClient(runsc::AllocContext(&contexts)); - GPR_ASSERT(clients[i].stream->Write(args)); + clients[i].stub->RunClient(runsc::AllocContext(&contexts)); + if (!clients[i].stream->Write(args)) { + gpr_log(GPR_ERROR, "Could not write args to client %zu", i); + } ClientStatus init_status; - GPR_ASSERT(clients[i].stream->Read(&init_status)); + if (!clients[i].stream->Read(&init_status)) { + gpr_log(GPR_ERROR, "Client %zu did not yield initial status", i); + } } // Let everything warmup @@ -362,19 +370,31 @@ std::unique_ptr RunScenario( server_mark.mutable_mark()->set_reset(true); ClientArgs client_mark; client_mark.mutable_mark()->set_reset(true); - for (auto server = &servers[0]; server != &servers[num_servers]; server++) { - GPR_ASSERT(server->stream->Write(server_mark)); + for (size_t i = 0; i < num_servers; i++) { + auto server = &servers[i]; + if (!server->stream->Write(server_mark)) { + gpr_log(GPR_ERROR, "Couldn't write mark to server %zu", i); + } } - for (auto client = &clients[0]; client != &clients[num_clients]; client++) { - GPR_ASSERT(client->stream->Write(client_mark)); + for (size_t i = 0; i < num_clients; i++) { + auto client = &clients[i]; + if (!client->stream->Write(client_mark)) { + gpr_log(GPR_ERROR, "Couldn't write mark to client %zu", i); + } } ServerStatus server_status; ClientStatus client_status; - for (auto server = &servers[0]; server != &servers[num_servers]; server++) { - GPR_ASSERT(server->stream->Read(&server_status)); + for (size_t i = 0; i < num_servers; i++) { + auto server = &servers[i]; + if (!server->stream->Read(&server_status)) { + gpr_log(GPR_ERROR, "Couldn't get status from server %zu", i); + } } - for (auto client = &clients[0]; client != &clients[num_clients]; client++) { - GPR_ASSERT(client->stream->Read(&client_status)); + for (size_t i = 0; i < num_clients; i++) { + auto client = &clients[i]; + if (!client->stream->Read(&client_status)) { + gpr_log(GPR_ERROR, "Couldn't get status from client %zu", i); + } } // Wait some time @@ -390,37 +410,71 @@ std::unique_ptr RunScenario( Histogram merged_latencies; gpr_log(GPR_INFO, "Finishing clients"); - for (auto client = &clients[0]; client != &clients[num_clients]; client++) { - GPR_ASSERT(client->stream->Write(client_mark)); - GPR_ASSERT(client->stream->WritesDone()); + for (size_t i = 0; i < num_clients; i++) { + auto client = &clients[i]; + if (!client->stream->Write(client_mark)) { + gpr_log(GPR_ERROR, "Couldn't write mark to client %zu", i); + } + if (!client->stream->WritesDone()) { + gpr_log(GPR_ERROR, "Failed WritesDone for client %zu", i); + } } - for (auto client = &clients[0]; client != &clients[num_clients]; client++) { - GPR_ASSERT(client->stream->Read(&client_status)); - const auto& stats = client_status.stats(); - merged_latencies.MergeProto(stats.latencies()); - result->add_client_stats()->CopyFrom(stats); - GPR_ASSERT(!client->stream->Read(&client_status)); + for (size_t i = 0; i < num_clients; i++) { + auto client = &clients[i]; + // Read the client final status + if (client->stream->Read(&client_status)) { + gpr_log(GPR_INFO, "Received final status from client %zu", i); + const auto& stats = client_status.stats(); + merged_latencies.MergeProto(stats.latencies()); + result->add_client_stats()->CopyFrom(stats); + // That final status should be the last message on the client stream + GPR_ASSERT(!client->stream->Read(&client_status)); + } else { + gpr_log(GPR_ERROR, "Couldn't get final status from client %zu", i); + } } - for (auto client = &clients[0]; client != &clients[num_clients]; client++) { - GPR_ASSERT(client->stream->Finish().ok()); + for (size_t i = 0; i < num_clients; i++) { + auto client = &clients[i]; + Status s = client->stream->Finish(); + if (!s.ok()) { + gpr_log(GPR_ERROR, "Client %zu had an error %s", i, + s.error_message().c_str()); + } } delete[] clients; merged_latencies.FillProto(result->mutable_latencies()); gpr_log(GPR_INFO, "Finishing servers"); - for (auto server = &servers[0]; server != &servers[num_servers]; server++) { - GPR_ASSERT(server->stream->Write(server_mark)); - GPR_ASSERT(server->stream->WritesDone()); + for (size_t i = 0; i < num_servers; i++) { + auto server = &servers[i]; + if (!server->stream->Write(server_mark)) { + gpr_log(GPR_ERROR, "Couldn't write mark to server %zu", i); + } + if (!server->stream->WritesDone()) { + gpr_log(GPR_ERROR, "Failed WritesDone for server %zu", i); + } } - for (auto server = &servers[0]; server != &servers[num_servers]; server++) { - GPR_ASSERT(server->stream->Read(&server_status)); - result->add_server_stats()->CopyFrom(server_status.stats()); - result->add_server_cores(server_status.cores()); - GPR_ASSERT(!server->stream->Read(&server_status)); + for (size_t i = 0; i < num_servers; i++) { + auto server = &servers[i]; + // Read the server final status + if (server->stream->Read(&server_status)) { + gpr_log(GPR_INFO, "Received final status from server %zu", i); + result->add_server_stats()->CopyFrom(server_status.stats()); + result->add_server_cores(server_status.cores()); + // That final status should be the last message on the server stream + GPR_ASSERT(!server->stream->Read(&server_status)); + } else { + gpr_log(GPR_ERROR, "Couldn't get final status from server %zu", i); + } } - for (auto server = &servers[0]; server != &servers[num_servers]; server++) { - GPR_ASSERT(server->stream->Finish().ok()); + for (size_t i = 0; i < num_servers; i++) { + auto server = &servers[i]; + Status s = server->stream->Finish(); + if (!s.ok()) { + gpr_log(GPR_ERROR, "Server %zu had an error %s", i, + s.error_message().c_str()); + } } delete[] servers; @@ -438,7 +492,12 @@ void RunQuit() { Void dummy; grpc::ClientContext ctx; ctx.set_fail_fast(false); - GPR_ASSERT(stub->QuitWorker(&ctx, dummy, &dummy).ok()); + Status s = stub->QuitWorker(&ctx, dummy, &dummy); + if (!s.ok()) { + gpr_log(GPR_ERROR, "Worker %zu could not be properly quit because %s", + i, s.error_message().c_str()); + GPR_ASSERT(false); + } } } diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index f514e23e854..8456fde0ed3 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -33,7 +33,6 @@ #include "test/cpp/qps/qps_worker.h" -#include #include #include #include @@ -124,7 +123,7 @@ class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service { GRPC_OVERRIDE { InstanceGuard g(this); if (!g.Acquired()) { - return Status(StatusCode::RESOURCE_EXHAUSTED, ""); + return Status(StatusCode::RESOURCE_EXHAUSTED, "Client worker busy"); } ScopedProfile profile("qps_client.prof", false); @@ -137,7 +136,7 @@ class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service { GRPC_OVERRIDE { InstanceGuard g(this); if (!g.Acquired()) { - return Status(StatusCode::RESOURCE_EXHAUSTED, ""); + return Status(StatusCode::RESOURCE_EXHAUSTED, "Server worker busy"); } ScopedProfile profile("qps_server.prof", false); @@ -154,7 +153,7 @@ class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service { Status QuitWorker(ServerContext* ctx, const Void*, Void*) GRPC_OVERRIDE { InstanceGuard g(this); if (!g.Acquired()) { - return Status(StatusCode::RESOURCE_EXHAUSTED, ""); + return Status(StatusCode::RESOURCE_EXHAUSTED, "Quitting worker busy"); } worker_->MarkDone(); @@ -197,30 +196,32 @@ class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service { ServerReaderWriter* stream) { ClientArgs args; if (!stream->Read(&args)) { - return Status(StatusCode::INVALID_ARGUMENT, ""); + return Status(StatusCode::INVALID_ARGUMENT, "Couldn't read args"); } if (!args.has_setup()) { - return Status(StatusCode::INVALID_ARGUMENT, ""); + return Status(StatusCode::INVALID_ARGUMENT, "Invalid setup arg"); } gpr_log(GPR_INFO, "RunClientBody: about to create client"); auto client = CreateClient(args.setup()); if (!client) { - return Status(StatusCode::INVALID_ARGUMENT, ""); + return Status(StatusCode::INVALID_ARGUMENT, "Couldn't create client"); } gpr_log(GPR_INFO, "RunClientBody: client created"); ClientStatus status; if (!stream->Write(status)) { - return Status(StatusCode::UNKNOWN, ""); + return Status(StatusCode::UNKNOWN, "Client couldn't report init status"); } gpr_log(GPR_INFO, "RunClientBody: creation status reported"); while (stream->Read(&args)) { gpr_log(GPR_INFO, "RunClientBody: Message read"); if (!args.has_mark()) { gpr_log(GPR_INFO, "RunClientBody: Message is not a mark!"); - return Status(StatusCode::INVALID_ARGUMENT, ""); + return Status(StatusCode::INVALID_ARGUMENT, "Invalid mark"); } *status.mutable_stats() = client->Mark(args.mark().reset()); - stream->Write(status); + if (!stream->Write(status)) { + return Status(StatusCode::UNKNOWN, "Client couldn't respond to mark"); + } gpr_log(GPR_INFO, "RunClientBody: Mark response given"); } @@ -232,10 +233,10 @@ class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service { ServerReaderWriter* stream) { ServerArgs args; if (!stream->Read(&args)) { - return Status(StatusCode::INVALID_ARGUMENT, ""); + return Status(StatusCode::INVALID_ARGUMENT, "Couldn't read server args"); } if (!args.has_setup()) { - return Status(StatusCode::INVALID_ARGUMENT, ""); + return Status(StatusCode::INVALID_ARGUMENT, "Bad server creation args"); } if (server_port_ != 0) { args.mutable_setup()->set_port(server_port_); @@ -243,24 +244,26 @@ class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service { gpr_log(GPR_INFO, "RunServerBody: about to create server"); auto server = CreateServer(args.setup()); if (!server) { - return Status(StatusCode::INVALID_ARGUMENT, ""); + return Status(StatusCode::INVALID_ARGUMENT, "Couldn't create server"); } gpr_log(GPR_INFO, "RunServerBody: server created"); ServerStatus status; status.set_port(server->port()); status.set_cores(server->cores()); if (!stream->Write(status)) { - return Status(StatusCode::UNKNOWN, ""); + return Status(StatusCode::UNKNOWN, "Server couldn't report init status"); } gpr_log(GPR_INFO, "RunServerBody: creation status reported"); while (stream->Read(&args)) { gpr_log(GPR_INFO, "RunServerBody: Message read"); if (!args.has_mark()) { gpr_log(GPR_INFO, "RunServerBody: Message not a mark!"); - return Status(StatusCode::INVALID_ARGUMENT, ""); + return Status(StatusCode::INVALID_ARGUMENT, "Invalid mark"); } *status.mutable_stats() = server->Mark(args.mark().reset()); - stream->Write(status); + if (!stream->Write(status)) { + return Status(StatusCode::UNKNOWN, "Server couldn't respond to mark"); + } gpr_log(GPR_INFO, "RunServerBody: Mark response given"); } From 571f3e55b4a304cb50b211dd3492ce1664d5bf0c Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 6 Jul 2016 14:00:24 -0700 Subject: [PATCH 1487/1894] Prevent a use-after-free --- src/core/ext/transport/chttp2/transport/chttp2_transport.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 92722b50f4f..b58d93787d7 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -1178,6 +1178,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, true); } } else { + stream_global->send_initial_metadata = NULL; grpc_chttp2_complete_closure_step( exec_ctx, transport_global, stream_global, &stream_global->send_initial_metadata_finished, @@ -1233,6 +1234,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); } if (stream_global->write_closed) { + stream_global->send_trailing_metadata = NULL; grpc_chttp2_complete_closure_step( exec_ctx, transport_global, stream_global, &stream_global->send_trailing_metadata_finished, From fed3e3b0705c2af5ba66f2c81366e05f07a9a937 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 6 Jul 2016 14:02:34 -0700 Subject: [PATCH 1488/1894] Added section about variable initialization --- doc/c-style-guide.md | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/doc/c-style-guide.md b/doc/c-style-guide.md index d6f9bbd7d4a..517f60a2197 100644 --- a/doc/c-style-guide.md +++ b/doc/c-style-guide.md @@ -9,16 +9,17 @@ Here we document style rules for C usage in the gRPC Core library. General ------- -- Layout rules are defined by clang-format, and all code should be passed through - clang-format. A (docker-based) script to do so is included in - [tools/distrib/clang\_format\_code.sh] (../tools/distrib/clang_format_code.sh). +- Layout rules are defined by clang-format, and all code should be passed + through clang-format. A (docker-based) script to do so is included in + [tools/distrib/clang\_format\_code.sh](../tools/distrib/clang_format_code.sh). Header Files ------------ -- Public header files (those in the include/grpc tree) should compile as pedantic C89 -- Public header files should be includable from C++ programs. That is, they should - include the following: +- Public header files (those in the include/grpc tree) should compile as + pedantic C89 +- Public header files should be includable from C++ programs. That is, they + should include the following: ```c #ifdef __cplusplus extern "C" { @@ -34,24 +35,34 @@ Header Files - All header files should have a #define guard to prevent multiple inclusion. To guarantee uniqueness they should be based on the file's path. - For public headers: include/grpc/grpc.h --> GRPC_GRPC_H + For public headers: `include/grpc/grpc.h` → `GRPC_GRPC_H` + + For private headers: + `src/core/channel/channel_stack.h` → + `GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_STACK_H` + +Variable Initialization +----------------------- + +When declaring a (non-static) pointer variable, always initialize it to `NULL`. +Even in the case of static pointer variables, it's recommended to explicitly +initialize them to `NULL`. - For private headers: - src/core/channel/channel_stack.h --> GRPC_INTERNAL_CORE_CHANNEL_CHANNEL_STACK_H C99 Features ------------ - Variable sized arrays are not allowed - Do not use the 'inline' keyword -- Flexible array members are allowed (https://en.wikipedia.org/wiki/Flexible_array_member) +- Flexible array members are allowed + (https://en.wikipedia.org/wiki/Flexible_array_member) Comments -------- Within public header files, only `/* */` comments are allowed. -Within implementation files and private headers, either single line `//` +Within implementation files and private headers, either single line `//` or multi line `/* */` comments are allowed. Only one comment style per file is allowed however (i.e. if single line comments are used anywhere within a file, ALL comments within that file must be single line comments). From fc99ff6644e51297c4d20b686a62783161c8500b Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Wed, 6 Jul 2016 15:08:30 -0700 Subject: [PATCH 1489/1894] Fix error code when client run out of memory in Objective C code base Update Status Codes documentation --- doc/statuscodes.md | 1 + src/objective-c/GRPCClient/GRPCCall.m | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/doc/statuscodes.md b/doc/statuscodes.md index c918f9ed9ab..1cd72df30ad 100644 --- a/doc/statuscodes.md +++ b/doc/statuscodes.md @@ -18,6 +18,7 @@ Only a subset of the pre-defined status codes are generated by the gRPC librarie | Could not decompress, but compression algorithm supported (Server -> Client) | INTERNAL | Client | | Compression mechanism used by client not supported at server | UNIMPLEMENTED | Server | | Server temporarily out of resources (e.g., Flow-control resource limits reached) | RESOURCE_EXHAUSTED | Server| +| Client does not have enough memory to hold the server response | RESOURCE_EXHAUSTED | Client | | Flow-control protocol violation | INTERNAL | Both | | Error parsing returned status | UNKNOWN | Client | | Incorrect Auth metadata ( Credentials failed to get metadata, Incompatible credentials set on channel and call, Invalid host set in `:authority` metadata, etc.) | UNAUTHENTICATED | Both | diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m index e9678f38a9c..71121094afd 100644 --- a/src/objective-c/GRPCClient/GRPCCall.m +++ b/src/objective-c/GRPCClient/GRPCCall.m @@ -213,8 +213,8 @@ NSString * const kGRPCTrailersKey = @"io.grpc.TrailersKey"; // (because it's just a client problem). Use another domain and an // appropriately-documented code. [weakSelf finishWithError:[NSError errorWithDomain:kGRPCErrorDomain - code:GRPCErrorCodeInternal - userInfo:nil]]; + code:GRPCErrorCodeResourceExhausted + userInfo:@{NSLocalizedDescriptionKey: @"Client out of memory."}]]; [weakSelf cancelCall]; return; } From 7ac58464dfa07730c48a63d42290513316496e2b Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 6 Jul 2016 15:42:03 -0700 Subject: [PATCH 1490/1894] removed use of __func__ in test --- test/core/surface/byte_buffer_reader_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/surface/byte_buffer_reader_test.c b/test/core/surface/byte_buffer_reader_test.c index 4231d899473..1ab1a06211e 100644 --- a/test/core/surface/byte_buffer_reader_test.c +++ b/test/core/surface/byte_buffer_reader_test.c @@ -120,7 +120,7 @@ static void test_read_corrupted_slice(void) { grpc_byte_buffer *buffer; grpc_byte_buffer_reader reader; - LOG_TEST(__func__); + LOG_TEST("test_read_corrupted_slice"); slice = gpr_slice_from_copied_string("test"); buffer = grpc_raw_byte_buffer_create(&slice, 1); buffer->data.raw.compression = GRPC_COMPRESS_GZIP; /* lies! */ From 9ef0cd81f74eff88191cff541add28765b59ff46 Mon Sep 17 00:00:00 2001 From: yang-g Date: Wed, 6 Jul 2016 16:17:37 -0700 Subject: [PATCH 1491/1894] Initialize variable. --- test/core/surface/server_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/surface/server_test.c b/test/core/surface/server_test.c index 6dd8a435aa0..3fd1c2c2663 100644 --- a/test/core/surface/server_test.c +++ b/test/core/surface/server_test.c @@ -139,7 +139,7 @@ void test_bind_server_to_addr(const char *host, bool secure) { } static int external_dns_works(const char *host) { - grpc_resolved_addresses *res; + grpc_resolved_addresses *res = NULL; grpc_error *error = grpc_blocking_resolve_address(host, "80", &res); GRPC_ERROR_UNREF(error); if (res != NULL) { From f710ba0095147646503ae9ae3802375602412175 Mon Sep 17 00:00:00 2001 From: yang-g Date: Wed, 6 Jul 2016 16:17:37 -0700 Subject: [PATCH 1492/1894] Initialize variable. --- test/core/surface/server_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/surface/server_test.c b/test/core/surface/server_test.c index 6dd8a435aa0..3fd1c2c2663 100644 --- a/test/core/surface/server_test.c +++ b/test/core/surface/server_test.c @@ -139,7 +139,7 @@ void test_bind_server_to_addr(const char *host, bool secure) { } static int external_dns_works(const char *host) { - grpc_resolved_addresses *res; + grpc_resolved_addresses *res = NULL; grpc_error *error = grpc_blocking_resolve_address(host, "80", &res); GRPC_ERROR_UNREF(error); if (res != NULL) { From b15af069da766abd3764ee06dc9bb7227ab415e6 Mon Sep 17 00:00:00 2001 From: "Nicolas \"Pixel\" Noble" Date: Thu, 7 Jul 2016 01:13:53 +0200 Subject: [PATCH 1493/1894] Pinning to protobuf submodule 3.0.0-beta-3.3. --- third_party/protobuf | 2 +- tools/run_tests/sanity/check_submodules.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/protobuf b/third_party/protobuf index 3470b6895aa..bdeb215cab2 160000 --- a/third_party/protobuf +++ b/third_party/protobuf @@ -1 +1 @@ -Subproject commit 3470b6895aa659b7559ed678e029a5338e535f14 +Subproject commit bdeb215cab2985195325fcd5e70c3fa751f46e0f diff --git a/tools/run_tests/sanity/check_submodules.sh b/tools/run_tests/sanity/check_submodules.sh index f2d7a1429ea..b602d695649 100755 --- a/tools/run_tests/sanity/check_submodules.sh +++ b/tools/run_tests/sanity/check_submodules.sh @@ -45,7 +45,7 @@ cat << EOF | awk '{ print $1 }' | sort > $want_submodules 05b155ff59114735ec8cd089f669c4c3d8f59029 third_party/gflags (v2.1.0-45-g05b155f) c99458533a9b4c743ed51537e25989ea55944908 third_party/googletest (release-1.7.0) f8ac463766281625ad710900479130c7fcb4d63b third_party/nanopb (nanopb-0.3.4-29-gf8ac463) - d4d13a4349e4e59d67f311185ddcc1890d956d7a third_party/protobuf (v3.0.0-beta-3.2) + bdeb215cab2985195325fcd5e70c3fa751f46e0f third_party/protobuf (v3.0.0-beta-3.3) 50893291621658f355bc5b4d450a8d06a563053d third_party/zlib (v1.2.8) EOF From 4ebfe9056063dc27c8e2cfced886b9d0b05bd8e2 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 6 Jul 2016 16:24:45 -0700 Subject: [PATCH 1494/1894] Properly report large metadata errors --- .../chttp2/transport/chttp2_transport.c | 41 ++++++++++++++++--- .../ext/transport/chttp2/transport/internal.h | 6 ++- src/core/lib/iomgr/workqueue.h | 2 +- 3 files changed, 41 insertions(+), 8 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index b58d93787d7..8b7f91d3af8 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -603,7 +603,8 @@ static void destroy_stream_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_incoming_metadata_buffer_destroy( &s->global.received_trailing_metadata); gpr_slice_buffer_destroy(&s->writing.flow_controlled_buffer); - GRPC_ERROR_UNREF(s->global.removal_error); + GRPC_ERROR_UNREF(s->global.read_closed_error); + GRPC_ERROR_UNREF(s->global.write_closed_error); UNREF_TRANSPORT(exec_ctx, t, "stream"); @@ -1178,7 +1179,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, true); } } else { - stream_global->send_initial_metadata = NULL; + stream_global->send_trailing_metadata = NULL; grpc_chttp2_complete_closure_step( exec_ctx, transport_global, stream_global, &stream_global->send_initial_metadata_finished, @@ -1637,10 +1638,38 @@ void grpc_chttp2_fake_status(grpc_exec_ctx *exec_ctx, } } +static void add_error(grpc_error *error, grpc_error **refs, size_t *nrefs) { + if (error == GRPC_ERROR_NONE) return; + for (size_t i = 0; i < *nrefs; i++) { + if (error == refs[i]) { + return; + } + } + refs[*nrefs] = error; + ++*nrefs; +} + +static grpc_error *removal_error(grpc_error *extra_error, + grpc_chttp2_stream_global *stream_global) { + grpc_error *refs[3]; + size_t nrefs = 0; + add_error(stream_global->read_closed_error, refs, &nrefs); + add_error(stream_global->write_closed_error, refs, &nrefs); + add_error(extra_error, refs, &nrefs); + grpc_error *error = GRPC_ERROR_NONE; + if (nrefs > 0) { + error = GRPC_ERROR_CREATE_REFERENCING("Failed due to stream removal", refs, + nrefs); + } + GRPC_ERROR_UNREF(extra_error); + return error; +} + static void fail_pending_writes(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, grpc_error *error) { + error = removal_error(error, stream_global); grpc_chttp2_complete_closure_step( exec_ctx, transport_global, stream_global, &stream_global->send_initial_metadata_finished, GRPC_ERROR_REF(error)); @@ -1663,12 +1692,14 @@ void grpc_chttp2_mark_stream_closed( } grpc_chttp2_list_add_check_read_ops(transport_global, stream_global); if (close_reads && !stream_global->read_closed) { + stream_global->read_closed_error = GRPC_ERROR_REF(error); stream_global->read_closed = true; stream_global->published_initial_metadata = true; stream_global->published_trailing_metadata = true; decrement_active_streams_locked(exec_ctx, transport_global, stream_global); } if (close_writes && !stream_global->write_closed) { + stream_global->write_closed_error = GRPC_ERROR_REF(error); stream_global->write_closed = true; if (TRANSPORT_FROM_GLOBAL(transport_global)->executor.write_state != GRPC_CHTTP2_WRITING_INACTIVE) { @@ -1681,7 +1712,6 @@ void grpc_chttp2_mark_stream_closed( } } if (stream_global->read_closed && stream_global->write_closed) { - stream_global->removal_error = GRPC_ERROR_REF(error); if (stream_global->id != 0 && TRANSPORT_FROM_GLOBAL(transport_global)->executor.parsing_active) { grpc_chttp2_list_add_closed_waiting_for_parsing(transport_global, @@ -1689,7 +1719,8 @@ void grpc_chttp2_mark_stream_closed( } else { if (stream_global->id != 0) { remove_stream(exec_ctx, TRANSPORT_FROM_GLOBAL(transport_global), - stream_global->id, GRPC_ERROR_REF(error)); + stream_global->id, + removal_error(GRPC_ERROR_REF(error), stream_global)); } GRPC_CHTTP2_STREAM_UNREF(exec_ctx, stream_global, "chttp2"); } @@ -2008,7 +2039,7 @@ static void post_parse_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, GPR_ASSERT(stream_global->write_closed); GPR_ASSERT(stream_global->read_closed); remove_stream(exec_ctx, t, stream_global->id, - GRPC_ERROR_REF(stream_global->removal_error)); + removal_error(GRPC_ERROR_NONE, stream_global)); GRPC_CHTTP2_STREAM_UNREF(exec_ctx, stream_global, "chttp2"); } diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 4e0c31c1110..776017bee21 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -454,8 +454,10 @@ typedef struct { bool seen_error; bool exceeded_metadata_size; - /** the error that resulted in this stream being removed */ - grpc_error *removal_error; + /** the error that resulted in this stream being read-closed */ + grpc_error *read_closed_error; + /** the error that resulted in this stream being write-closed */ + grpc_error *write_closed_error; bool published_initial_metadata; bool published_trailing_metadata; diff --git a/src/core/lib/iomgr/workqueue.h b/src/core/lib/iomgr/workqueue.h index b4bd5742ddd..9f7219ebf16 100644 --- a/src/core/lib/iomgr/workqueue.h +++ b/src/core/lib/iomgr/workqueue.h @@ -52,7 +52,7 @@ void grpc_workqueue_flush(grpc_exec_ctx *exec_ctx, grpc_workqueue *workqueue); -/*#define GRPC_WORKQUEUE_REFCOUNT_DEBUG*/ +//#define GRPC_WORKQUEUE_REFCOUNT_DEBUG #ifdef GRPC_WORKQUEUE_REFCOUNT_DEBUG #define GRPC_WORKQUEUE_REF(p, r) \ (grpc_workqueue_ref((p), __FILE__, __LINE__, (r)), (p)) From 5c77320ce0108296223dbf087676196c205a5c18 Mon Sep 17 00:00:00 2001 From: David Garcia Quintas Date: Wed, 6 Jul 2016 16:36:45 -0700 Subject: [PATCH 1495/1894] Added missing dependencies to grpc++_base --- BUILD | 455 +++++++++++ CMakeLists.txt | 233 ++++++ Makefile | 286 ++++++- build.yaml | 2 + tools/doxygen/Doxyfile.c++ | 10 +- tools/doxygen/Doxyfile.c++.internal | 227 ++++++ tools/run_tests/sources_and_headers.json | 6 +- vsprojects/grpc.sln | 1 + vsprojects/vcxproj/grpc++/grpc++.vcxproj | 346 ++++++++ .../vcxproj/grpc++/grpc++.vcxproj.filters | 765 ++++++++++++++++++ .../grpc++_unsecure/grpc++_unsecure.vcxproj | 343 ++++++++ .../grpc++_unsecure.vcxproj.filters | 765 ++++++++++++++++++ 12 files changed, 3404 insertions(+), 35 deletions(-) diff --git a/BUILD b/BUILD index 66e582e6520..8c17065927c 100644 --- a/BUILD +++ b/BUILD @@ -1235,6 +1235,109 @@ cc_library( "src/cpp/client/create_channel_internal.h", "src/cpp/server/dynamic_thread_pool.h", "src/cpp/server/thread_pool_interface.h", + "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/compress_filter.h", + "src/core/lib/channel/connected_channel.h", + "src/core/lib/channel/context.h", + "src/core/lib/channel/http_client_filter.h", + "src/core/lib/channel/http_server_filter.h", + "src/core/lib/compression/algorithm_metadata.h", + "src/core/lib/compression/message_compress.h", + "src/core/lib/debug/trace.h", + "src/core/lib/http/format_request.h", + "src/core/lib/http/httpcli.h", + "src/core/lib/http/parser.h", + "src/core/lib/iomgr/closure.h", + "src/core/lib/iomgr/endpoint.h", + "src/core/lib/iomgr/endpoint_pair.h", + "src/core/lib/iomgr/error.h", + "src/core/lib/iomgr/ev_epoll_linux.h", + "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", + "src/core/lib/iomgr/ev_poll_posix.h", + "src/core/lib/iomgr/ev_posix.h", + "src/core/lib/iomgr/exec_ctx.h", + "src/core/lib/iomgr/executor.h", + "src/core/lib/iomgr/iocp_windows.h", + "src/core/lib/iomgr/iomgr.h", + "src/core/lib/iomgr/iomgr_internal.h", + "src/core/lib/iomgr/iomgr_posix.h", + "src/core/lib/iomgr/load_file.h", + "src/core/lib/iomgr/network_status_tracker.h", + "src/core/lib/iomgr/polling_entity.h", + "src/core/lib/iomgr/pollset.h", + "src/core/lib/iomgr/pollset_set.h", + "src/core/lib/iomgr/pollset_set_windows.h", + "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/resolve_address.h", + "src/core/lib/iomgr/sockaddr.h", + "src/core/lib/iomgr/sockaddr_posix.h", + "src/core/lib/iomgr/sockaddr_utils.h", + "src/core/lib/iomgr/sockaddr_windows.h", + "src/core/lib/iomgr/socket_utils_posix.h", + "src/core/lib/iomgr/socket_windows.h", + "src/core/lib/iomgr/tcp_client.h", + "src/core/lib/iomgr/tcp_posix.h", + "src/core/lib/iomgr/tcp_server.h", + "src/core/lib/iomgr/tcp_windows.h", + "src/core/lib/iomgr/time_averaged_stats.h", + "src/core/lib/iomgr/timer.h", + "src/core/lib/iomgr/timer_heap.h", + "src/core/lib/iomgr/udp_server.h", + "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_pipe.h", + "src/core/lib/iomgr/wakeup_fd_posix.h", + "src/core/lib/iomgr/workqueue.h", + "src/core/lib/iomgr/workqueue_posix.h", + "src/core/lib/iomgr/workqueue_windows.h", + "src/core/lib/json/json.h", + "src/core/lib/json/json_common.h", + "src/core/lib/json/json_reader.h", + "src/core/lib/json/json_writer.h", + "src/core/lib/surface/api_trace.h", + "src/core/lib/surface/call.h", + "src/core/lib/surface/call_test_only.h", + "src/core/lib/surface/channel.h", + "src/core/lib/surface/channel_init.h", + "src/core/lib/surface/channel_stack_type.h", + "src/core/lib/surface/completion_queue.h", + "src/core/lib/surface/event_string.h", + "src/core/lib/surface/init.h", + "src/core/lib/surface/lame_client.h", + "src/core/lib/surface/server.h", + "src/core/lib/transport/byte_stream.h", + "src/core/lib/transport/connectivity_state.h", + "src/core/lib/transport/metadata.h", + "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/static_metadata.h", + "src/core/lib/transport/transport.h", + "src/core/lib/transport/transport_impl.h", + "src/core/lib/security/context/security_context.h", + "src/core/lib/security/credentials/composite/composite_credentials.h", + "src/core/lib/security/credentials/credentials.h", + "src/core/lib/security/credentials/fake/fake_credentials.h", + "src/core/lib/security/credentials/google_default/google_default_credentials.h", + "src/core/lib/security/credentials/iam/iam_credentials.h", + "src/core/lib/security/credentials/jwt/json_token.h", + "src/core/lib/security/credentials/jwt/jwt_credentials.h", + "src/core/lib/security/credentials/jwt/jwt_verifier.h", + "src/core/lib/security/credentials/oauth2/oauth2_credentials.h", + "src/core/lib/security/credentials/plugin/plugin_credentials.h", + "src/core/lib/security/credentials/ssl/ssl_credentials.h", + "src/core/lib/security/transport/auth_filters.h", + "src/core/lib/security/transport/handshake.h", + "src/core/lib/security/transport/secure_endpoint.h", + "src/core/lib/security/transport/security_connector.h", + "src/core/lib/security/transport/tsi_error.h", + "src/core/lib/security/util/b64.h", + "src/core/lib/security/util/json_util.h", + "src/core/ext/transport/chttp2/alpn/alpn.h", + "src/core/lib/tsi/fake_transport_security.h", + "src/core/lib/tsi/ssl_transport_security.h", + "src/core/lib/tsi/ssl_types.h", + "src/core/lib/tsi/transport_security.h", + "src/core/lib/tsi/transport_security_interface.h", "src/cpp/client/secure_credentials.cc", "src/cpp/common/auth_property_iterator.cc", "src/cpp/common/secure_auth_context.cc", @@ -1267,6 +1370,122 @@ cc_library( "src/cpp/util/status.cc", "src/cpp/util/string_ref.cc", "src/cpp/util/time.cc", + "src/core/lib/channel/channel_args.c", + "src/core/lib/channel/channel_stack.c", + "src/core/lib/channel/channel_stack_builder.c", + "src/core/lib/channel/compress_filter.c", + "src/core/lib/channel/connected_channel.c", + "src/core/lib/channel/http_client_filter.c", + "src/core/lib/channel/http_server_filter.c", + "src/core/lib/compression/compression.c", + "src/core/lib/compression/message_compress.c", + "src/core/lib/debug/trace.c", + "src/core/lib/http/format_request.c", + "src/core/lib/http/httpcli.c", + "src/core/lib/http/parser.c", + "src/core/lib/iomgr/closure.c", + "src/core/lib/iomgr/endpoint.c", + "src/core/lib/iomgr/endpoint_pair_posix.c", + "src/core/lib/iomgr/endpoint_pair_windows.c", + "src/core/lib/iomgr/error.c", + "src/core/lib/iomgr/ev_epoll_linux.c", + "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", + "src/core/lib/iomgr/ev_poll_posix.c", + "src/core/lib/iomgr/ev_posix.c", + "src/core/lib/iomgr/exec_ctx.c", + "src/core/lib/iomgr/executor.c", + "src/core/lib/iomgr/iocp_windows.c", + "src/core/lib/iomgr/iomgr.c", + "src/core/lib/iomgr/iomgr_posix.c", + "src/core/lib/iomgr/iomgr_windows.c", + "src/core/lib/iomgr/load_file.c", + "src/core/lib/iomgr/network_status_tracker.c", + "src/core/lib/iomgr/polling_entity.c", + "src/core/lib/iomgr/pollset_set_windows.c", + "src/core/lib/iomgr/pollset_windows.c", + "src/core/lib/iomgr/resolve_address_posix.c", + "src/core/lib/iomgr/resolve_address_windows.c", + "src/core/lib/iomgr/sockaddr_utils.c", + "src/core/lib/iomgr/socket_utils_common_posix.c", + "src/core/lib/iomgr/socket_utils_linux.c", + "src/core/lib/iomgr/socket_utils_posix.c", + "src/core/lib/iomgr/socket_windows.c", + "src/core/lib/iomgr/tcp_client_posix.c", + "src/core/lib/iomgr/tcp_client_windows.c", + "src/core/lib/iomgr/tcp_posix.c", + "src/core/lib/iomgr/tcp_server_posix.c", + "src/core/lib/iomgr/tcp_server_windows.c", + "src/core/lib/iomgr/tcp_windows.c", + "src/core/lib/iomgr/time_averaged_stats.c", + "src/core/lib/iomgr/timer.c", + "src/core/lib/iomgr/timer_heap.c", + "src/core/lib/iomgr/udp_server.c", + "src/core/lib/iomgr/unix_sockets_posix.c", + "src/core/lib/iomgr/unix_sockets_posix_noop.c", + "src/core/lib/iomgr/wakeup_fd_eventfd.c", + "src/core/lib/iomgr/wakeup_fd_nospecial.c", + "src/core/lib/iomgr/wakeup_fd_pipe.c", + "src/core/lib/iomgr/wakeup_fd_posix.c", + "src/core/lib/iomgr/workqueue_posix.c", + "src/core/lib/iomgr/workqueue_windows.c", + "src/core/lib/json/json.c", + "src/core/lib/json/json_reader.c", + "src/core/lib/json/json_string.c", + "src/core/lib/json/json_writer.c", + "src/core/lib/surface/alarm.c", + "src/core/lib/surface/api_trace.c", + "src/core/lib/surface/byte_buffer.c", + "src/core/lib/surface/byte_buffer_reader.c", + "src/core/lib/surface/call.c", + "src/core/lib/surface/call_details.c", + "src/core/lib/surface/call_log_batch.c", + "src/core/lib/surface/channel.c", + "src/core/lib/surface/channel_init.c", + "src/core/lib/surface/channel_ping.c", + "src/core/lib/surface/channel_stack_type.c", + "src/core/lib/surface/completion_queue.c", + "src/core/lib/surface/event_string.c", + "src/core/lib/surface/lame_client.c", + "src/core/lib/surface/metadata_array.c", + "src/core/lib/surface/server.c", + "src/core/lib/surface/validate_metadata.c", + "src/core/lib/surface/version.c", + "src/core/lib/transport/byte_stream.c", + "src/core/lib/transport/connectivity_state.c", + "src/core/lib/transport/metadata.c", + "src/core/lib/transport/metadata_batch.c", + "src/core/lib/transport/static_metadata.c", + "src/core/lib/transport/transport.c", + "src/core/lib/transport/transport_op_string.c", + "src/core/lib/http/httpcli_security_connector.c", + "src/core/lib/security/context/security_context.c", + "src/core/lib/security/credentials/composite/composite_credentials.c", + "src/core/lib/security/credentials/credentials.c", + "src/core/lib/security/credentials/credentials_metadata.c", + "src/core/lib/security/credentials/fake/fake_credentials.c", + "src/core/lib/security/credentials/google_default/credentials_posix.c", + "src/core/lib/security/credentials/google_default/credentials_windows.c", + "src/core/lib/security/credentials/google_default/google_default_credentials.c", + "src/core/lib/security/credentials/iam/iam_credentials.c", + "src/core/lib/security/credentials/jwt/json_token.c", + "src/core/lib/security/credentials/jwt/jwt_credentials.c", + "src/core/lib/security/credentials/jwt/jwt_verifier.c", + "src/core/lib/security/credentials/oauth2/oauth2_credentials.c", + "src/core/lib/security/credentials/plugin/plugin_credentials.c", + "src/core/lib/security/credentials/ssl/ssl_credentials.c", + "src/core/lib/security/transport/client_auth_filter.c", + "src/core/lib/security/transport/handshake.c", + "src/core/lib/security/transport/secure_endpoint.c", + "src/core/lib/security/transport/security_connector.c", + "src/core/lib/security/transport/server_auth_filter.c", + "src/core/lib/security/transport/tsi_error.c", + "src/core/lib/security/util/b64.c", + "src/core/lib/security/util/json_util.c", + "src/core/lib/surface/init_secure.c", + "src/core/ext/transport/chttp2/alpn/alpn.c", + "src/core/lib/tsi/fake_transport_security.c", + "src/core/lib/tsi/ssl_transport_security.c", + "src/core/lib/tsi/transport_security.c", "src/cpp/codegen/codegen_init.cc", ], hdrs = [ @@ -1368,6 +1587,14 @@ cc_library( "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_windows.h", "include/grpc/impl/codegen/time.h", + "include/grpc/byte_buffer.h", + "include/grpc/byte_buffer_reader.h", + "include/grpc/compression.h", + "include/grpc/grpc.h", + "include/grpc/grpc_posix.h", + "include/grpc/status.h", + "include/grpc/grpc_security.h", + "include/grpc/grpc_security_constants.h", ], includes = [ "include", @@ -1377,6 +1604,7 @@ cc_library( "//external:libssl", "//external:protobuf_clib", ":grpc", + ":gpr", ], ) @@ -1466,6 +1694,109 @@ cc_library( "src/cpp/client/create_channel_internal.h", "src/cpp/server/dynamic_thread_pool.h", "src/cpp/server/thread_pool_interface.h", + "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/compress_filter.h", + "src/core/lib/channel/connected_channel.h", + "src/core/lib/channel/context.h", + "src/core/lib/channel/http_client_filter.h", + "src/core/lib/channel/http_server_filter.h", + "src/core/lib/compression/algorithm_metadata.h", + "src/core/lib/compression/message_compress.h", + "src/core/lib/debug/trace.h", + "src/core/lib/http/format_request.h", + "src/core/lib/http/httpcli.h", + "src/core/lib/http/parser.h", + "src/core/lib/iomgr/closure.h", + "src/core/lib/iomgr/endpoint.h", + "src/core/lib/iomgr/endpoint_pair.h", + "src/core/lib/iomgr/error.h", + "src/core/lib/iomgr/ev_epoll_linux.h", + "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", + "src/core/lib/iomgr/ev_poll_posix.h", + "src/core/lib/iomgr/ev_posix.h", + "src/core/lib/iomgr/exec_ctx.h", + "src/core/lib/iomgr/executor.h", + "src/core/lib/iomgr/iocp_windows.h", + "src/core/lib/iomgr/iomgr.h", + "src/core/lib/iomgr/iomgr_internal.h", + "src/core/lib/iomgr/iomgr_posix.h", + "src/core/lib/iomgr/load_file.h", + "src/core/lib/iomgr/network_status_tracker.h", + "src/core/lib/iomgr/polling_entity.h", + "src/core/lib/iomgr/pollset.h", + "src/core/lib/iomgr/pollset_set.h", + "src/core/lib/iomgr/pollset_set_windows.h", + "src/core/lib/iomgr/pollset_windows.h", + "src/core/lib/iomgr/resolve_address.h", + "src/core/lib/iomgr/sockaddr.h", + "src/core/lib/iomgr/sockaddr_posix.h", + "src/core/lib/iomgr/sockaddr_utils.h", + "src/core/lib/iomgr/sockaddr_windows.h", + "src/core/lib/iomgr/socket_utils_posix.h", + "src/core/lib/iomgr/socket_windows.h", + "src/core/lib/iomgr/tcp_client.h", + "src/core/lib/iomgr/tcp_posix.h", + "src/core/lib/iomgr/tcp_server.h", + "src/core/lib/iomgr/tcp_windows.h", + "src/core/lib/iomgr/time_averaged_stats.h", + "src/core/lib/iomgr/timer.h", + "src/core/lib/iomgr/timer_heap.h", + "src/core/lib/iomgr/udp_server.h", + "src/core/lib/iomgr/unix_sockets_posix.h", + "src/core/lib/iomgr/wakeup_fd_pipe.h", + "src/core/lib/iomgr/wakeup_fd_posix.h", + "src/core/lib/iomgr/workqueue.h", + "src/core/lib/iomgr/workqueue_posix.h", + "src/core/lib/iomgr/workqueue_windows.h", + "src/core/lib/json/json.h", + "src/core/lib/json/json_common.h", + "src/core/lib/json/json_reader.h", + "src/core/lib/json/json_writer.h", + "src/core/lib/surface/api_trace.h", + "src/core/lib/surface/call.h", + "src/core/lib/surface/call_test_only.h", + "src/core/lib/surface/channel.h", + "src/core/lib/surface/channel_init.h", + "src/core/lib/surface/channel_stack_type.h", + "src/core/lib/surface/completion_queue.h", + "src/core/lib/surface/event_string.h", + "src/core/lib/surface/init.h", + "src/core/lib/surface/lame_client.h", + "src/core/lib/surface/server.h", + "src/core/lib/transport/byte_stream.h", + "src/core/lib/transport/connectivity_state.h", + "src/core/lib/transport/metadata.h", + "src/core/lib/transport/metadata_batch.h", + "src/core/lib/transport/static_metadata.h", + "src/core/lib/transport/transport.h", + "src/core/lib/transport/transport_impl.h", + "src/core/lib/security/context/security_context.h", + "src/core/lib/security/credentials/composite/composite_credentials.h", + "src/core/lib/security/credentials/credentials.h", + "src/core/lib/security/credentials/fake/fake_credentials.h", + "src/core/lib/security/credentials/google_default/google_default_credentials.h", + "src/core/lib/security/credentials/iam/iam_credentials.h", + "src/core/lib/security/credentials/jwt/json_token.h", + "src/core/lib/security/credentials/jwt/jwt_credentials.h", + "src/core/lib/security/credentials/jwt/jwt_verifier.h", + "src/core/lib/security/credentials/oauth2/oauth2_credentials.h", + "src/core/lib/security/credentials/plugin/plugin_credentials.h", + "src/core/lib/security/credentials/ssl/ssl_credentials.h", + "src/core/lib/security/transport/auth_filters.h", + "src/core/lib/security/transport/handshake.h", + "src/core/lib/security/transport/secure_endpoint.h", + "src/core/lib/security/transport/security_connector.h", + "src/core/lib/security/transport/tsi_error.h", + "src/core/lib/security/util/b64.h", + "src/core/lib/security/util/json_util.h", + "src/core/ext/transport/chttp2/alpn/alpn.h", + "src/core/lib/tsi/fake_transport_security.h", + "src/core/lib/tsi/ssl_transport_security.h", + "src/core/lib/tsi/ssl_types.h", + "src/core/lib/tsi/transport_security.h", + "src/core/lib/tsi/transport_security_interface.h", "src/cpp/common/insecure_create_auth_context.cc", "src/cpp/client/channel.cc", "src/cpp/client/client_context.cc", @@ -1493,6 +1824,122 @@ cc_library( "src/cpp/util/status.cc", "src/cpp/util/string_ref.cc", "src/cpp/util/time.cc", + "src/core/lib/channel/channel_args.c", + "src/core/lib/channel/channel_stack.c", + "src/core/lib/channel/channel_stack_builder.c", + "src/core/lib/channel/compress_filter.c", + "src/core/lib/channel/connected_channel.c", + "src/core/lib/channel/http_client_filter.c", + "src/core/lib/channel/http_server_filter.c", + "src/core/lib/compression/compression.c", + "src/core/lib/compression/message_compress.c", + "src/core/lib/debug/trace.c", + "src/core/lib/http/format_request.c", + "src/core/lib/http/httpcli.c", + "src/core/lib/http/parser.c", + "src/core/lib/iomgr/closure.c", + "src/core/lib/iomgr/endpoint.c", + "src/core/lib/iomgr/endpoint_pair_posix.c", + "src/core/lib/iomgr/endpoint_pair_windows.c", + "src/core/lib/iomgr/error.c", + "src/core/lib/iomgr/ev_epoll_linux.c", + "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", + "src/core/lib/iomgr/ev_poll_posix.c", + "src/core/lib/iomgr/ev_posix.c", + "src/core/lib/iomgr/exec_ctx.c", + "src/core/lib/iomgr/executor.c", + "src/core/lib/iomgr/iocp_windows.c", + "src/core/lib/iomgr/iomgr.c", + "src/core/lib/iomgr/iomgr_posix.c", + "src/core/lib/iomgr/iomgr_windows.c", + "src/core/lib/iomgr/load_file.c", + "src/core/lib/iomgr/network_status_tracker.c", + "src/core/lib/iomgr/polling_entity.c", + "src/core/lib/iomgr/pollset_set_windows.c", + "src/core/lib/iomgr/pollset_windows.c", + "src/core/lib/iomgr/resolve_address_posix.c", + "src/core/lib/iomgr/resolve_address_windows.c", + "src/core/lib/iomgr/sockaddr_utils.c", + "src/core/lib/iomgr/socket_utils_common_posix.c", + "src/core/lib/iomgr/socket_utils_linux.c", + "src/core/lib/iomgr/socket_utils_posix.c", + "src/core/lib/iomgr/socket_windows.c", + "src/core/lib/iomgr/tcp_client_posix.c", + "src/core/lib/iomgr/tcp_client_windows.c", + "src/core/lib/iomgr/tcp_posix.c", + "src/core/lib/iomgr/tcp_server_posix.c", + "src/core/lib/iomgr/tcp_server_windows.c", + "src/core/lib/iomgr/tcp_windows.c", + "src/core/lib/iomgr/time_averaged_stats.c", + "src/core/lib/iomgr/timer.c", + "src/core/lib/iomgr/timer_heap.c", + "src/core/lib/iomgr/udp_server.c", + "src/core/lib/iomgr/unix_sockets_posix.c", + "src/core/lib/iomgr/unix_sockets_posix_noop.c", + "src/core/lib/iomgr/wakeup_fd_eventfd.c", + "src/core/lib/iomgr/wakeup_fd_nospecial.c", + "src/core/lib/iomgr/wakeup_fd_pipe.c", + "src/core/lib/iomgr/wakeup_fd_posix.c", + "src/core/lib/iomgr/workqueue_posix.c", + "src/core/lib/iomgr/workqueue_windows.c", + "src/core/lib/json/json.c", + "src/core/lib/json/json_reader.c", + "src/core/lib/json/json_string.c", + "src/core/lib/json/json_writer.c", + "src/core/lib/surface/alarm.c", + "src/core/lib/surface/api_trace.c", + "src/core/lib/surface/byte_buffer.c", + "src/core/lib/surface/byte_buffer_reader.c", + "src/core/lib/surface/call.c", + "src/core/lib/surface/call_details.c", + "src/core/lib/surface/call_log_batch.c", + "src/core/lib/surface/channel.c", + "src/core/lib/surface/channel_init.c", + "src/core/lib/surface/channel_ping.c", + "src/core/lib/surface/channel_stack_type.c", + "src/core/lib/surface/completion_queue.c", + "src/core/lib/surface/event_string.c", + "src/core/lib/surface/lame_client.c", + "src/core/lib/surface/metadata_array.c", + "src/core/lib/surface/server.c", + "src/core/lib/surface/validate_metadata.c", + "src/core/lib/surface/version.c", + "src/core/lib/transport/byte_stream.c", + "src/core/lib/transport/connectivity_state.c", + "src/core/lib/transport/metadata.c", + "src/core/lib/transport/metadata_batch.c", + "src/core/lib/transport/static_metadata.c", + "src/core/lib/transport/transport.c", + "src/core/lib/transport/transport_op_string.c", + "src/core/lib/http/httpcli_security_connector.c", + "src/core/lib/security/context/security_context.c", + "src/core/lib/security/credentials/composite/composite_credentials.c", + "src/core/lib/security/credentials/credentials.c", + "src/core/lib/security/credentials/credentials_metadata.c", + "src/core/lib/security/credentials/fake/fake_credentials.c", + "src/core/lib/security/credentials/google_default/credentials_posix.c", + "src/core/lib/security/credentials/google_default/credentials_windows.c", + "src/core/lib/security/credentials/google_default/google_default_credentials.c", + "src/core/lib/security/credentials/iam/iam_credentials.c", + "src/core/lib/security/credentials/jwt/json_token.c", + "src/core/lib/security/credentials/jwt/jwt_credentials.c", + "src/core/lib/security/credentials/jwt/jwt_verifier.c", + "src/core/lib/security/credentials/oauth2/oauth2_credentials.c", + "src/core/lib/security/credentials/plugin/plugin_credentials.c", + "src/core/lib/security/credentials/ssl/ssl_credentials.c", + "src/core/lib/security/transport/client_auth_filter.c", + "src/core/lib/security/transport/handshake.c", + "src/core/lib/security/transport/secure_endpoint.c", + "src/core/lib/security/transport/security_connector.c", + "src/core/lib/security/transport/server_auth_filter.c", + "src/core/lib/security/transport/tsi_error.c", + "src/core/lib/security/util/b64.c", + "src/core/lib/security/util/json_util.c", + "src/core/lib/surface/init_secure.c", + "src/core/ext/transport/chttp2/alpn/alpn.c", + "src/core/lib/tsi/fake_transport_security.c", + "src/core/lib/tsi/ssl_transport_security.c", + "src/core/lib/tsi/transport_security.c", "src/cpp/codegen/codegen_init.cc", ], hdrs = [ @@ -1594,6 +2041,14 @@ cc_library( "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_windows.h", "include/grpc/impl/codegen/time.h", + "include/grpc/byte_buffer.h", + "include/grpc/byte_buffer_reader.h", + "include/grpc/compression.h", + "include/grpc/grpc.h", + "include/grpc/grpc_posix.h", + "include/grpc/status.h", + "include/grpc/grpc_security.h", + "include/grpc/grpc_security_constants.h", ], includes = [ "include", diff --git a/CMakeLists.txt b/CMakeLists.txt index 9caf03191fa..3dcd1eb23d1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -718,6 +718,122 @@ add_library(grpc++ src/cpp/util/status.cc src/cpp/util/string_ref.cc src/cpp/util/time.cc + src/core/lib/channel/channel_args.c + src/core/lib/channel/channel_stack.c + src/core/lib/channel/channel_stack_builder.c + src/core/lib/channel/compress_filter.c + src/core/lib/channel/connected_channel.c + src/core/lib/channel/http_client_filter.c + src/core/lib/channel/http_server_filter.c + src/core/lib/compression/compression.c + src/core/lib/compression/message_compress.c + src/core/lib/debug/trace.c + src/core/lib/http/format_request.c + src/core/lib/http/httpcli.c + src/core/lib/http/parser.c + src/core/lib/iomgr/closure.c + src/core/lib/iomgr/endpoint.c + src/core/lib/iomgr/endpoint_pair_posix.c + src/core/lib/iomgr/endpoint_pair_windows.c + src/core/lib/iomgr/error.c + src/core/lib/iomgr/ev_epoll_linux.c + src/core/lib/iomgr/ev_poll_and_epoll_posix.c + src/core/lib/iomgr/ev_poll_posix.c + src/core/lib/iomgr/ev_posix.c + src/core/lib/iomgr/exec_ctx.c + src/core/lib/iomgr/executor.c + src/core/lib/iomgr/iocp_windows.c + src/core/lib/iomgr/iomgr.c + src/core/lib/iomgr/iomgr_posix.c + src/core/lib/iomgr/iomgr_windows.c + src/core/lib/iomgr/load_file.c + src/core/lib/iomgr/network_status_tracker.c + src/core/lib/iomgr/polling_entity.c + src/core/lib/iomgr/pollset_set_windows.c + src/core/lib/iomgr/pollset_windows.c + src/core/lib/iomgr/resolve_address_posix.c + src/core/lib/iomgr/resolve_address_windows.c + src/core/lib/iomgr/sockaddr_utils.c + src/core/lib/iomgr/socket_utils_common_posix.c + src/core/lib/iomgr/socket_utils_linux.c + src/core/lib/iomgr/socket_utils_posix.c + src/core/lib/iomgr/socket_windows.c + src/core/lib/iomgr/tcp_client_posix.c + src/core/lib/iomgr/tcp_client_windows.c + src/core/lib/iomgr/tcp_posix.c + src/core/lib/iomgr/tcp_server_posix.c + src/core/lib/iomgr/tcp_server_windows.c + src/core/lib/iomgr/tcp_windows.c + src/core/lib/iomgr/time_averaged_stats.c + src/core/lib/iomgr/timer.c + src/core/lib/iomgr/timer_heap.c + src/core/lib/iomgr/udp_server.c + src/core/lib/iomgr/unix_sockets_posix.c + src/core/lib/iomgr/unix_sockets_posix_noop.c + src/core/lib/iomgr/wakeup_fd_eventfd.c + src/core/lib/iomgr/wakeup_fd_nospecial.c + src/core/lib/iomgr/wakeup_fd_pipe.c + src/core/lib/iomgr/wakeup_fd_posix.c + src/core/lib/iomgr/workqueue_posix.c + src/core/lib/iomgr/workqueue_windows.c + src/core/lib/json/json.c + src/core/lib/json/json_reader.c + src/core/lib/json/json_string.c + src/core/lib/json/json_writer.c + src/core/lib/surface/alarm.c + src/core/lib/surface/api_trace.c + src/core/lib/surface/byte_buffer.c + src/core/lib/surface/byte_buffer_reader.c + src/core/lib/surface/call.c + src/core/lib/surface/call_details.c + src/core/lib/surface/call_log_batch.c + src/core/lib/surface/channel.c + src/core/lib/surface/channel_init.c + src/core/lib/surface/channel_ping.c + src/core/lib/surface/channel_stack_type.c + src/core/lib/surface/completion_queue.c + src/core/lib/surface/event_string.c + src/core/lib/surface/lame_client.c + src/core/lib/surface/metadata_array.c + src/core/lib/surface/server.c + src/core/lib/surface/validate_metadata.c + src/core/lib/surface/version.c + src/core/lib/transport/byte_stream.c + src/core/lib/transport/connectivity_state.c + src/core/lib/transport/metadata.c + src/core/lib/transport/metadata_batch.c + src/core/lib/transport/static_metadata.c + src/core/lib/transport/transport.c + src/core/lib/transport/transport_op_string.c + src/core/lib/http/httpcli_security_connector.c + src/core/lib/security/context/security_context.c + src/core/lib/security/credentials/composite/composite_credentials.c + src/core/lib/security/credentials/credentials.c + src/core/lib/security/credentials/credentials_metadata.c + src/core/lib/security/credentials/fake/fake_credentials.c + src/core/lib/security/credentials/google_default/credentials_posix.c + src/core/lib/security/credentials/google_default/credentials_windows.c + src/core/lib/security/credentials/google_default/google_default_credentials.c + src/core/lib/security/credentials/iam/iam_credentials.c + src/core/lib/security/credentials/jwt/json_token.c + src/core/lib/security/credentials/jwt/jwt_credentials.c + src/core/lib/security/credentials/jwt/jwt_verifier.c + src/core/lib/security/credentials/oauth2/oauth2_credentials.c + src/core/lib/security/credentials/plugin/plugin_credentials.c + src/core/lib/security/credentials/ssl/ssl_credentials.c + src/core/lib/security/transport/client_auth_filter.c + src/core/lib/security/transport/handshake.c + src/core/lib/security/transport/secure_endpoint.c + src/core/lib/security/transport/security_connector.c + src/core/lib/security/transport/server_auth_filter.c + src/core/lib/security/transport/tsi_error.c + src/core/lib/security/util/b64.c + src/core/lib/security/util/json_util.c + src/core/lib/surface/init_secure.c + src/core/ext/transport/chttp2/alpn/alpn.c + src/core/lib/tsi/fake_transport_security.c + src/core/lib/tsi/ssl_transport_security.c + src/core/lib/tsi/transport_security.c src/cpp/codegen/codegen_init.cc ) @@ -734,6 +850,7 @@ target_link_libraries(grpc++ ssl libprotobuf grpc + gpr ) @@ -786,6 +903,122 @@ add_library(grpc++_unsecure src/cpp/util/status.cc src/cpp/util/string_ref.cc src/cpp/util/time.cc + src/core/lib/channel/channel_args.c + src/core/lib/channel/channel_stack.c + src/core/lib/channel/channel_stack_builder.c + src/core/lib/channel/compress_filter.c + src/core/lib/channel/connected_channel.c + src/core/lib/channel/http_client_filter.c + src/core/lib/channel/http_server_filter.c + src/core/lib/compression/compression.c + src/core/lib/compression/message_compress.c + src/core/lib/debug/trace.c + src/core/lib/http/format_request.c + src/core/lib/http/httpcli.c + src/core/lib/http/parser.c + src/core/lib/iomgr/closure.c + src/core/lib/iomgr/endpoint.c + src/core/lib/iomgr/endpoint_pair_posix.c + src/core/lib/iomgr/endpoint_pair_windows.c + src/core/lib/iomgr/error.c + src/core/lib/iomgr/ev_epoll_linux.c + src/core/lib/iomgr/ev_poll_and_epoll_posix.c + src/core/lib/iomgr/ev_poll_posix.c + src/core/lib/iomgr/ev_posix.c + src/core/lib/iomgr/exec_ctx.c + src/core/lib/iomgr/executor.c + src/core/lib/iomgr/iocp_windows.c + src/core/lib/iomgr/iomgr.c + src/core/lib/iomgr/iomgr_posix.c + src/core/lib/iomgr/iomgr_windows.c + src/core/lib/iomgr/load_file.c + src/core/lib/iomgr/network_status_tracker.c + src/core/lib/iomgr/polling_entity.c + src/core/lib/iomgr/pollset_set_windows.c + src/core/lib/iomgr/pollset_windows.c + src/core/lib/iomgr/resolve_address_posix.c + src/core/lib/iomgr/resolve_address_windows.c + src/core/lib/iomgr/sockaddr_utils.c + src/core/lib/iomgr/socket_utils_common_posix.c + src/core/lib/iomgr/socket_utils_linux.c + src/core/lib/iomgr/socket_utils_posix.c + src/core/lib/iomgr/socket_windows.c + src/core/lib/iomgr/tcp_client_posix.c + src/core/lib/iomgr/tcp_client_windows.c + src/core/lib/iomgr/tcp_posix.c + src/core/lib/iomgr/tcp_server_posix.c + src/core/lib/iomgr/tcp_server_windows.c + src/core/lib/iomgr/tcp_windows.c + src/core/lib/iomgr/time_averaged_stats.c + src/core/lib/iomgr/timer.c + src/core/lib/iomgr/timer_heap.c + src/core/lib/iomgr/udp_server.c + src/core/lib/iomgr/unix_sockets_posix.c + src/core/lib/iomgr/unix_sockets_posix_noop.c + src/core/lib/iomgr/wakeup_fd_eventfd.c + src/core/lib/iomgr/wakeup_fd_nospecial.c + src/core/lib/iomgr/wakeup_fd_pipe.c + src/core/lib/iomgr/wakeup_fd_posix.c + src/core/lib/iomgr/workqueue_posix.c + src/core/lib/iomgr/workqueue_windows.c + src/core/lib/json/json.c + src/core/lib/json/json_reader.c + src/core/lib/json/json_string.c + src/core/lib/json/json_writer.c + src/core/lib/surface/alarm.c + src/core/lib/surface/api_trace.c + src/core/lib/surface/byte_buffer.c + src/core/lib/surface/byte_buffer_reader.c + src/core/lib/surface/call.c + src/core/lib/surface/call_details.c + src/core/lib/surface/call_log_batch.c + src/core/lib/surface/channel.c + src/core/lib/surface/channel_init.c + src/core/lib/surface/channel_ping.c + src/core/lib/surface/channel_stack_type.c + src/core/lib/surface/completion_queue.c + src/core/lib/surface/event_string.c + src/core/lib/surface/lame_client.c + src/core/lib/surface/metadata_array.c + src/core/lib/surface/server.c + src/core/lib/surface/validate_metadata.c + src/core/lib/surface/version.c + src/core/lib/transport/byte_stream.c + src/core/lib/transport/connectivity_state.c + src/core/lib/transport/metadata.c + src/core/lib/transport/metadata_batch.c + src/core/lib/transport/static_metadata.c + src/core/lib/transport/transport.c + src/core/lib/transport/transport_op_string.c + src/core/lib/http/httpcli_security_connector.c + src/core/lib/security/context/security_context.c + src/core/lib/security/credentials/composite/composite_credentials.c + src/core/lib/security/credentials/credentials.c + src/core/lib/security/credentials/credentials_metadata.c + src/core/lib/security/credentials/fake/fake_credentials.c + src/core/lib/security/credentials/google_default/credentials_posix.c + src/core/lib/security/credentials/google_default/credentials_windows.c + src/core/lib/security/credentials/google_default/google_default_credentials.c + src/core/lib/security/credentials/iam/iam_credentials.c + src/core/lib/security/credentials/jwt/json_token.c + src/core/lib/security/credentials/jwt/jwt_credentials.c + src/core/lib/security/credentials/jwt/jwt_verifier.c + src/core/lib/security/credentials/oauth2/oauth2_credentials.c + src/core/lib/security/credentials/plugin/plugin_credentials.c + src/core/lib/security/credentials/ssl/ssl_credentials.c + src/core/lib/security/transport/client_auth_filter.c + src/core/lib/security/transport/handshake.c + src/core/lib/security/transport/secure_endpoint.c + src/core/lib/security/transport/security_connector.c + src/core/lib/security/transport/server_auth_filter.c + src/core/lib/security/transport/tsi_error.c + src/core/lib/security/util/b64.c + src/core/lib/security/util/json_util.c + src/core/lib/surface/init_secure.c + src/core/ext/transport/chttp2/alpn/alpn.c + src/core/lib/tsi/fake_transport_security.c + src/core/lib/tsi/ssl_transport_security.c + src/core/lib/tsi/transport_security.c src/cpp/codegen/codegen_init.cc ) diff --git a/Makefile b/Makefile index 5871c7b39fc..51f5c5e44c3 100644 --- a/Makefile +++ b/Makefile @@ -3421,6 +3421,122 @@ LIBGRPC++_SRC = \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ src/cpp/util/time.cc \ + src/core/lib/channel/channel_args.c \ + src/core/lib/channel/channel_stack.c \ + src/core/lib/channel/channel_stack_builder.c \ + src/core/lib/channel/compress_filter.c \ + src/core/lib/channel/connected_channel.c \ + src/core/lib/channel/http_client_filter.c \ + src/core/lib/channel/http_server_filter.c \ + src/core/lib/compression/compression.c \ + src/core/lib/compression/message_compress.c \ + src/core/lib/debug/trace.c \ + src/core/lib/http/format_request.c \ + src/core/lib/http/httpcli.c \ + src/core/lib/http/parser.c \ + src/core/lib/iomgr/closure.c \ + src/core/lib/iomgr/endpoint.c \ + src/core/lib/iomgr/endpoint_pair_posix.c \ + src/core/lib/iomgr/endpoint_pair_windows.c \ + src/core/lib/iomgr/error.c \ + src/core/lib/iomgr/ev_epoll_linux.c \ + src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ + src/core/lib/iomgr/ev_poll_posix.c \ + src/core/lib/iomgr/ev_posix.c \ + src/core/lib/iomgr/exec_ctx.c \ + src/core/lib/iomgr/executor.c \ + src/core/lib/iomgr/iocp_windows.c \ + src/core/lib/iomgr/iomgr.c \ + src/core/lib/iomgr/iomgr_posix.c \ + src/core/lib/iomgr/iomgr_windows.c \ + src/core/lib/iomgr/load_file.c \ + src/core/lib/iomgr/network_status_tracker.c \ + src/core/lib/iomgr/polling_entity.c \ + src/core/lib/iomgr/pollset_set_windows.c \ + src/core/lib/iomgr/pollset_windows.c \ + src/core/lib/iomgr/resolve_address_posix.c \ + src/core/lib/iomgr/resolve_address_windows.c \ + src/core/lib/iomgr/sockaddr_utils.c \ + src/core/lib/iomgr/socket_utils_common_posix.c \ + src/core/lib/iomgr/socket_utils_linux.c \ + src/core/lib/iomgr/socket_utils_posix.c \ + src/core/lib/iomgr/socket_windows.c \ + src/core/lib/iomgr/tcp_client_posix.c \ + src/core/lib/iomgr/tcp_client_windows.c \ + src/core/lib/iomgr/tcp_posix.c \ + src/core/lib/iomgr/tcp_server_posix.c \ + src/core/lib/iomgr/tcp_server_windows.c \ + src/core/lib/iomgr/tcp_windows.c \ + src/core/lib/iomgr/time_averaged_stats.c \ + src/core/lib/iomgr/timer.c \ + src/core/lib/iomgr/timer_heap.c \ + src/core/lib/iomgr/udp_server.c \ + src/core/lib/iomgr/unix_sockets_posix.c \ + src/core/lib/iomgr/unix_sockets_posix_noop.c \ + src/core/lib/iomgr/wakeup_fd_eventfd.c \ + src/core/lib/iomgr/wakeup_fd_nospecial.c \ + src/core/lib/iomgr/wakeup_fd_pipe.c \ + src/core/lib/iomgr/wakeup_fd_posix.c \ + src/core/lib/iomgr/workqueue_posix.c \ + src/core/lib/iomgr/workqueue_windows.c \ + src/core/lib/json/json.c \ + src/core/lib/json/json_reader.c \ + src/core/lib/json/json_string.c \ + src/core/lib/json/json_writer.c \ + src/core/lib/surface/alarm.c \ + src/core/lib/surface/api_trace.c \ + src/core/lib/surface/byte_buffer.c \ + src/core/lib/surface/byte_buffer_reader.c \ + src/core/lib/surface/call.c \ + src/core/lib/surface/call_details.c \ + src/core/lib/surface/call_log_batch.c \ + src/core/lib/surface/channel.c \ + src/core/lib/surface/channel_init.c \ + src/core/lib/surface/channel_ping.c \ + src/core/lib/surface/channel_stack_type.c \ + src/core/lib/surface/completion_queue.c \ + src/core/lib/surface/event_string.c \ + src/core/lib/surface/lame_client.c \ + src/core/lib/surface/metadata_array.c \ + src/core/lib/surface/server.c \ + src/core/lib/surface/validate_metadata.c \ + src/core/lib/surface/version.c \ + src/core/lib/transport/byte_stream.c \ + src/core/lib/transport/connectivity_state.c \ + src/core/lib/transport/metadata.c \ + src/core/lib/transport/metadata_batch.c \ + src/core/lib/transport/static_metadata.c \ + src/core/lib/transport/transport.c \ + src/core/lib/transport/transport_op_string.c \ + src/core/lib/http/httpcli_security_connector.c \ + src/core/lib/security/context/security_context.c \ + src/core/lib/security/credentials/composite/composite_credentials.c \ + src/core/lib/security/credentials/credentials.c \ + src/core/lib/security/credentials/credentials_metadata.c \ + src/core/lib/security/credentials/fake/fake_credentials.c \ + src/core/lib/security/credentials/google_default/credentials_posix.c \ + src/core/lib/security/credentials/google_default/credentials_windows.c \ + src/core/lib/security/credentials/google_default/google_default_credentials.c \ + src/core/lib/security/credentials/iam/iam_credentials.c \ + src/core/lib/security/credentials/jwt/json_token.c \ + src/core/lib/security/credentials/jwt/jwt_credentials.c \ + src/core/lib/security/credentials/jwt/jwt_verifier.c \ + src/core/lib/security/credentials/oauth2/oauth2_credentials.c \ + src/core/lib/security/credentials/plugin/plugin_credentials.c \ + src/core/lib/security/credentials/ssl/ssl_credentials.c \ + src/core/lib/security/transport/client_auth_filter.c \ + src/core/lib/security/transport/handshake.c \ + src/core/lib/security/transport/secure_endpoint.c \ + src/core/lib/security/transport/security_connector.c \ + src/core/lib/security/transport/server_auth_filter.c \ + src/core/lib/security/transport/tsi_error.c \ + src/core/lib/security/util/b64.c \ + src/core/lib/security/util/json_util.c \ + src/core/lib/surface/init_secure.c \ + src/core/ext/transport/chttp2/alpn/alpn.c \ + src/core/lib/tsi/fake_transport_security.c \ + src/core/lib/tsi/ssl_transport_security.c \ + src/core/lib/tsi/transport_security.c \ src/cpp/codegen/codegen_init.cc \ PUBLIC_HEADERS_CXX += \ @@ -3522,6 +3638,14 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_windows.h \ include/grpc/impl/codegen/time.h \ + include/grpc/byte_buffer.h \ + include/grpc/byte_buffer_reader.h \ + include/grpc/compression.h \ + include/grpc/grpc.h \ + include/grpc/grpc_posix.h \ + include/grpc/status.h \ + include/grpc/grpc_security.h \ + include/grpc/grpc_security_constants.h \ LIBGRPC++_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_SRC)))) @@ -3558,18 +3682,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc.$(SHARED_EXT) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/gpr.$(SHARED_EXT) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc-imp + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc-imp -lgpr-imp else -$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc -lgpr else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc -lgpr $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).so endif @@ -3908,6 +4032,122 @@ LIBGRPC++_UNSECURE_SRC = \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ src/cpp/util/time.cc \ + src/core/lib/channel/channel_args.c \ + src/core/lib/channel/channel_stack.c \ + src/core/lib/channel/channel_stack_builder.c \ + src/core/lib/channel/compress_filter.c \ + src/core/lib/channel/connected_channel.c \ + src/core/lib/channel/http_client_filter.c \ + src/core/lib/channel/http_server_filter.c \ + src/core/lib/compression/compression.c \ + src/core/lib/compression/message_compress.c \ + src/core/lib/debug/trace.c \ + src/core/lib/http/format_request.c \ + src/core/lib/http/httpcli.c \ + src/core/lib/http/parser.c \ + src/core/lib/iomgr/closure.c \ + src/core/lib/iomgr/endpoint.c \ + src/core/lib/iomgr/endpoint_pair_posix.c \ + src/core/lib/iomgr/endpoint_pair_windows.c \ + src/core/lib/iomgr/error.c \ + src/core/lib/iomgr/ev_epoll_linux.c \ + src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ + src/core/lib/iomgr/ev_poll_posix.c \ + src/core/lib/iomgr/ev_posix.c \ + src/core/lib/iomgr/exec_ctx.c \ + src/core/lib/iomgr/executor.c \ + src/core/lib/iomgr/iocp_windows.c \ + src/core/lib/iomgr/iomgr.c \ + src/core/lib/iomgr/iomgr_posix.c \ + src/core/lib/iomgr/iomgr_windows.c \ + src/core/lib/iomgr/load_file.c \ + src/core/lib/iomgr/network_status_tracker.c \ + src/core/lib/iomgr/polling_entity.c \ + src/core/lib/iomgr/pollset_set_windows.c \ + src/core/lib/iomgr/pollset_windows.c \ + src/core/lib/iomgr/resolve_address_posix.c \ + src/core/lib/iomgr/resolve_address_windows.c \ + src/core/lib/iomgr/sockaddr_utils.c \ + src/core/lib/iomgr/socket_utils_common_posix.c \ + src/core/lib/iomgr/socket_utils_linux.c \ + src/core/lib/iomgr/socket_utils_posix.c \ + src/core/lib/iomgr/socket_windows.c \ + src/core/lib/iomgr/tcp_client_posix.c \ + src/core/lib/iomgr/tcp_client_windows.c \ + src/core/lib/iomgr/tcp_posix.c \ + src/core/lib/iomgr/tcp_server_posix.c \ + src/core/lib/iomgr/tcp_server_windows.c \ + src/core/lib/iomgr/tcp_windows.c \ + src/core/lib/iomgr/time_averaged_stats.c \ + src/core/lib/iomgr/timer.c \ + src/core/lib/iomgr/timer_heap.c \ + src/core/lib/iomgr/udp_server.c \ + src/core/lib/iomgr/unix_sockets_posix.c \ + src/core/lib/iomgr/unix_sockets_posix_noop.c \ + src/core/lib/iomgr/wakeup_fd_eventfd.c \ + src/core/lib/iomgr/wakeup_fd_nospecial.c \ + src/core/lib/iomgr/wakeup_fd_pipe.c \ + src/core/lib/iomgr/wakeup_fd_posix.c \ + src/core/lib/iomgr/workqueue_posix.c \ + src/core/lib/iomgr/workqueue_windows.c \ + src/core/lib/json/json.c \ + src/core/lib/json/json_reader.c \ + src/core/lib/json/json_string.c \ + src/core/lib/json/json_writer.c \ + src/core/lib/surface/alarm.c \ + src/core/lib/surface/api_trace.c \ + src/core/lib/surface/byte_buffer.c \ + src/core/lib/surface/byte_buffer_reader.c \ + src/core/lib/surface/call.c \ + src/core/lib/surface/call_details.c \ + src/core/lib/surface/call_log_batch.c \ + src/core/lib/surface/channel.c \ + src/core/lib/surface/channel_init.c \ + src/core/lib/surface/channel_ping.c \ + src/core/lib/surface/channel_stack_type.c \ + src/core/lib/surface/completion_queue.c \ + src/core/lib/surface/event_string.c \ + src/core/lib/surface/lame_client.c \ + src/core/lib/surface/metadata_array.c \ + src/core/lib/surface/server.c \ + src/core/lib/surface/validate_metadata.c \ + src/core/lib/surface/version.c \ + src/core/lib/transport/byte_stream.c \ + src/core/lib/transport/connectivity_state.c \ + src/core/lib/transport/metadata.c \ + src/core/lib/transport/metadata_batch.c \ + src/core/lib/transport/static_metadata.c \ + src/core/lib/transport/transport.c \ + src/core/lib/transport/transport_op_string.c \ + src/core/lib/http/httpcli_security_connector.c \ + src/core/lib/security/context/security_context.c \ + src/core/lib/security/credentials/composite/composite_credentials.c \ + src/core/lib/security/credentials/credentials.c \ + src/core/lib/security/credentials/credentials_metadata.c \ + src/core/lib/security/credentials/fake/fake_credentials.c \ + src/core/lib/security/credentials/google_default/credentials_posix.c \ + src/core/lib/security/credentials/google_default/credentials_windows.c \ + src/core/lib/security/credentials/google_default/google_default_credentials.c \ + src/core/lib/security/credentials/iam/iam_credentials.c \ + src/core/lib/security/credentials/jwt/json_token.c \ + src/core/lib/security/credentials/jwt/jwt_credentials.c \ + src/core/lib/security/credentials/jwt/jwt_verifier.c \ + src/core/lib/security/credentials/oauth2/oauth2_credentials.c \ + src/core/lib/security/credentials/plugin/plugin_credentials.c \ + src/core/lib/security/credentials/ssl/ssl_credentials.c \ + src/core/lib/security/transport/client_auth_filter.c \ + src/core/lib/security/transport/handshake.c \ + src/core/lib/security/transport/secure_endpoint.c \ + src/core/lib/security/transport/security_connector.c \ + src/core/lib/security/transport/server_auth_filter.c \ + src/core/lib/security/transport/tsi_error.c \ + src/core/lib/security/util/b64.c \ + src/core/lib/security/util/json_util.c \ + src/core/lib/surface/init_secure.c \ + src/core/ext/transport/chttp2/alpn/alpn.c \ + src/core/lib/tsi/fake_transport_security.c \ + src/core/lib/tsi/ssl_transport_security.c \ + src/core/lib/tsi/transport_security.c \ src/cpp/codegen/codegen_init.cc \ PUBLIC_HEADERS_CXX += \ @@ -4009,6 +4249,14 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_windows.h \ include/grpc/impl/codegen/time.h \ + include/grpc/byte_buffer.h \ + include/grpc/byte_buffer_reader.h \ + include/grpc/compression.h \ + include/grpc/grpc.h \ + include/grpc/grpc_posix.h \ + include/grpc/status.h \ + include/grpc/grpc_security.h \ + include/grpc/grpc_security_constants.h \ LIBGRPC++_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_UNSECURE_SRC)))) @@ -14851,34 +15099,6 @@ src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c: $(OPENSSL_DE src/core/ext/transport/cronet/client/secure/cronet_channel_create.c: $(OPENSSL_DEP) src/core/ext/transport/cronet/transport/cronet_api_dummy.c: $(OPENSSL_DEP) src/core/ext/transport/cronet/transport/cronet_transport.c: $(OPENSSL_DEP) -src/core/lib/http/httpcli_security_connector.c: $(OPENSSL_DEP) -src/core/lib/security/context/security_context.c: $(OPENSSL_DEP) -src/core/lib/security/credentials/composite/composite_credentials.c: $(OPENSSL_DEP) -src/core/lib/security/credentials/credentials.c: $(OPENSSL_DEP) -src/core/lib/security/credentials/credentials_metadata.c: $(OPENSSL_DEP) -src/core/lib/security/credentials/fake/fake_credentials.c: $(OPENSSL_DEP) -src/core/lib/security/credentials/google_default/credentials_posix.c: $(OPENSSL_DEP) -src/core/lib/security/credentials/google_default/credentials_windows.c: $(OPENSSL_DEP) -src/core/lib/security/credentials/google_default/google_default_credentials.c: $(OPENSSL_DEP) -src/core/lib/security/credentials/iam/iam_credentials.c: $(OPENSSL_DEP) -src/core/lib/security/credentials/jwt/json_token.c: $(OPENSSL_DEP) -src/core/lib/security/credentials/jwt/jwt_credentials.c: $(OPENSSL_DEP) -src/core/lib/security/credentials/jwt/jwt_verifier.c: $(OPENSSL_DEP) -src/core/lib/security/credentials/oauth2/oauth2_credentials.c: $(OPENSSL_DEP) -src/core/lib/security/credentials/plugin/plugin_credentials.c: $(OPENSSL_DEP) -src/core/lib/security/credentials/ssl/ssl_credentials.c: $(OPENSSL_DEP) -src/core/lib/security/transport/client_auth_filter.c: $(OPENSSL_DEP) -src/core/lib/security/transport/handshake.c: $(OPENSSL_DEP) -src/core/lib/security/transport/secure_endpoint.c: $(OPENSSL_DEP) -src/core/lib/security/transport/security_connector.c: $(OPENSSL_DEP) -src/core/lib/security/transport/server_auth_filter.c: $(OPENSSL_DEP) -src/core/lib/security/transport/tsi_error.c: $(OPENSSL_DEP) -src/core/lib/security/util/b64.c: $(OPENSSL_DEP) -src/core/lib/security/util/json_util.c: $(OPENSSL_DEP) -src/core/lib/surface/init_secure.c: $(OPENSSL_DEP) -src/core/lib/tsi/fake_transport_security.c: $(OPENSSL_DEP) -src/core/lib/tsi/ssl_transport_security.c: $(OPENSSL_DEP) -src/core/lib/tsi/transport_security.c: $(OPENSSL_DEP) src/core/plugin_registry/grpc_cronet_plugin_registry.c: $(OPENSSL_DEP) src/core/plugin_registry/grpc_plugin_registry.c: $(OPENSSL_DEP) src/cpp/client/secure_credentials.cc: $(OPENSSL_DEP) diff --git a/build.yaml b/build.yaml index 1c485fd5c9e..dc42a61300e 100644 --- a/build.yaml +++ b/build.yaml @@ -714,6 +714,8 @@ filegroups: - src/cpp/util/time.cc uses: - grpc++_codegen_base + - grpc_base + - grpc_secure - name: grpc++_codegen_base language: c++ public_headers: diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index de7acd7777e..db6b36f8c7b 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -857,7 +857,15 @@ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_windows.h \ -include/grpc/impl/codegen/time.h +include/grpc/impl/codegen/time.h \ +include/grpc/byte_buffer.h \ +include/grpc/byte_buffer_reader.h \ +include/grpc/compression.h \ +include/grpc/grpc.h \ +include/grpc/grpc_posix.h \ +include/grpc/status.h \ +include/grpc/grpc_security.h \ +include/grpc/grpc_security_constants.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 76bb3b6c59e..660e501d713 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -858,6 +858,14 @@ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_windows.h \ include/grpc/impl/codegen/time.h \ +include/grpc/byte_buffer.h \ +include/grpc/byte_buffer_reader.h \ +include/grpc/compression.h \ +include/grpc/grpc.h \ +include/grpc/grpc_posix.h \ +include/grpc/status.h \ +include/grpc/grpc_security.h \ +include/grpc/grpc_security_constants.h \ include/grpc++/impl/codegen/core_codegen.h \ src/cpp/client/secure_credentials.h \ src/cpp/common/secure_auth_context.h \ @@ -865,6 +873,109 @@ src/cpp/server/secure_server_credentials.h \ src/cpp/client/create_channel_internal.h \ src/cpp/server/dynamic_thread_pool.h \ src/cpp/server/thread_pool_interface.h \ +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/compress_filter.h \ +src/core/lib/channel/connected_channel.h \ +src/core/lib/channel/context.h \ +src/core/lib/channel/http_client_filter.h \ +src/core/lib/channel/http_server_filter.h \ +src/core/lib/compression/algorithm_metadata.h \ +src/core/lib/compression/message_compress.h \ +src/core/lib/debug/trace.h \ +src/core/lib/http/format_request.h \ +src/core/lib/http/httpcli.h \ +src/core/lib/http/parser.h \ +src/core/lib/iomgr/closure.h \ +src/core/lib/iomgr/endpoint.h \ +src/core/lib/iomgr/endpoint_pair.h \ +src/core/lib/iomgr/error.h \ +src/core/lib/iomgr/ev_epoll_linux.h \ +src/core/lib/iomgr/ev_poll_and_epoll_posix.h \ +src/core/lib/iomgr/ev_poll_posix.h \ +src/core/lib/iomgr/ev_posix.h \ +src/core/lib/iomgr/exec_ctx.h \ +src/core/lib/iomgr/executor.h \ +src/core/lib/iomgr/iocp_windows.h \ +src/core/lib/iomgr/iomgr.h \ +src/core/lib/iomgr/iomgr_internal.h \ +src/core/lib/iomgr/iomgr_posix.h \ +src/core/lib/iomgr/load_file.h \ +src/core/lib/iomgr/network_status_tracker.h \ +src/core/lib/iomgr/polling_entity.h \ +src/core/lib/iomgr/pollset.h \ +src/core/lib/iomgr/pollset_set.h \ +src/core/lib/iomgr/pollset_set_windows.h \ +src/core/lib/iomgr/pollset_windows.h \ +src/core/lib/iomgr/resolve_address.h \ +src/core/lib/iomgr/sockaddr.h \ +src/core/lib/iomgr/sockaddr_posix.h \ +src/core/lib/iomgr/sockaddr_utils.h \ +src/core/lib/iomgr/sockaddr_windows.h \ +src/core/lib/iomgr/socket_utils_posix.h \ +src/core/lib/iomgr/socket_windows.h \ +src/core/lib/iomgr/tcp_client.h \ +src/core/lib/iomgr/tcp_posix.h \ +src/core/lib/iomgr/tcp_server.h \ +src/core/lib/iomgr/tcp_windows.h \ +src/core/lib/iomgr/time_averaged_stats.h \ +src/core/lib/iomgr/timer.h \ +src/core/lib/iomgr/timer_heap.h \ +src/core/lib/iomgr/udp_server.h \ +src/core/lib/iomgr/unix_sockets_posix.h \ +src/core/lib/iomgr/wakeup_fd_pipe.h \ +src/core/lib/iomgr/wakeup_fd_posix.h \ +src/core/lib/iomgr/workqueue.h \ +src/core/lib/iomgr/workqueue_posix.h \ +src/core/lib/iomgr/workqueue_windows.h \ +src/core/lib/json/json.h \ +src/core/lib/json/json_common.h \ +src/core/lib/json/json_reader.h \ +src/core/lib/json/json_writer.h \ +src/core/lib/surface/api_trace.h \ +src/core/lib/surface/call.h \ +src/core/lib/surface/call_test_only.h \ +src/core/lib/surface/channel.h \ +src/core/lib/surface/channel_init.h \ +src/core/lib/surface/channel_stack_type.h \ +src/core/lib/surface/completion_queue.h \ +src/core/lib/surface/event_string.h \ +src/core/lib/surface/init.h \ +src/core/lib/surface/lame_client.h \ +src/core/lib/surface/server.h \ +src/core/lib/transport/byte_stream.h \ +src/core/lib/transport/connectivity_state.h \ +src/core/lib/transport/metadata.h \ +src/core/lib/transport/metadata_batch.h \ +src/core/lib/transport/static_metadata.h \ +src/core/lib/transport/transport.h \ +src/core/lib/transport/transport_impl.h \ +src/core/lib/security/context/security_context.h \ +src/core/lib/security/credentials/composite/composite_credentials.h \ +src/core/lib/security/credentials/credentials.h \ +src/core/lib/security/credentials/fake/fake_credentials.h \ +src/core/lib/security/credentials/google_default/google_default_credentials.h \ +src/core/lib/security/credentials/iam/iam_credentials.h \ +src/core/lib/security/credentials/jwt/json_token.h \ +src/core/lib/security/credentials/jwt/jwt_credentials.h \ +src/core/lib/security/credentials/jwt/jwt_verifier.h \ +src/core/lib/security/credentials/oauth2/oauth2_credentials.h \ +src/core/lib/security/credentials/plugin/plugin_credentials.h \ +src/core/lib/security/credentials/ssl/ssl_credentials.h \ +src/core/lib/security/transport/auth_filters.h \ +src/core/lib/security/transport/handshake.h \ +src/core/lib/security/transport/secure_endpoint.h \ +src/core/lib/security/transport/security_connector.h \ +src/core/lib/security/transport/tsi_error.h \ +src/core/lib/security/util/b64.h \ +src/core/lib/security/util/json_util.h \ +src/core/ext/transport/chttp2/alpn/alpn.h \ +src/core/lib/tsi/fake_transport_security.h \ +src/core/lib/tsi/ssl_transport_security.h \ +src/core/lib/tsi/ssl_types.h \ +src/core/lib/tsi/transport_security.h \ +src/core/lib/tsi/transport_security_interface.h \ src/cpp/client/secure_credentials.cc \ src/cpp/common/auth_property_iterator.cc \ src/cpp/common/secure_auth_context.cc \ @@ -897,6 +1008,122 @@ src/cpp/util/slice.cc \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ src/cpp/util/time.cc \ +src/core/lib/channel/channel_args.c \ +src/core/lib/channel/channel_stack.c \ +src/core/lib/channel/channel_stack_builder.c \ +src/core/lib/channel/compress_filter.c \ +src/core/lib/channel/connected_channel.c \ +src/core/lib/channel/http_client_filter.c \ +src/core/lib/channel/http_server_filter.c \ +src/core/lib/compression/compression.c \ +src/core/lib/compression/message_compress.c \ +src/core/lib/debug/trace.c \ +src/core/lib/http/format_request.c \ +src/core/lib/http/httpcli.c \ +src/core/lib/http/parser.c \ +src/core/lib/iomgr/closure.c \ +src/core/lib/iomgr/endpoint.c \ +src/core/lib/iomgr/endpoint_pair_posix.c \ +src/core/lib/iomgr/endpoint_pair_windows.c \ +src/core/lib/iomgr/error.c \ +src/core/lib/iomgr/ev_epoll_linux.c \ +src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ +src/core/lib/iomgr/ev_poll_posix.c \ +src/core/lib/iomgr/ev_posix.c \ +src/core/lib/iomgr/exec_ctx.c \ +src/core/lib/iomgr/executor.c \ +src/core/lib/iomgr/iocp_windows.c \ +src/core/lib/iomgr/iomgr.c \ +src/core/lib/iomgr/iomgr_posix.c \ +src/core/lib/iomgr/iomgr_windows.c \ +src/core/lib/iomgr/load_file.c \ +src/core/lib/iomgr/network_status_tracker.c \ +src/core/lib/iomgr/polling_entity.c \ +src/core/lib/iomgr/pollset_set_windows.c \ +src/core/lib/iomgr/pollset_windows.c \ +src/core/lib/iomgr/resolve_address_posix.c \ +src/core/lib/iomgr/resolve_address_windows.c \ +src/core/lib/iomgr/sockaddr_utils.c \ +src/core/lib/iomgr/socket_utils_common_posix.c \ +src/core/lib/iomgr/socket_utils_linux.c \ +src/core/lib/iomgr/socket_utils_posix.c \ +src/core/lib/iomgr/socket_windows.c \ +src/core/lib/iomgr/tcp_client_posix.c \ +src/core/lib/iomgr/tcp_client_windows.c \ +src/core/lib/iomgr/tcp_posix.c \ +src/core/lib/iomgr/tcp_server_posix.c \ +src/core/lib/iomgr/tcp_server_windows.c \ +src/core/lib/iomgr/tcp_windows.c \ +src/core/lib/iomgr/time_averaged_stats.c \ +src/core/lib/iomgr/timer.c \ +src/core/lib/iomgr/timer_heap.c \ +src/core/lib/iomgr/udp_server.c \ +src/core/lib/iomgr/unix_sockets_posix.c \ +src/core/lib/iomgr/unix_sockets_posix_noop.c \ +src/core/lib/iomgr/wakeup_fd_eventfd.c \ +src/core/lib/iomgr/wakeup_fd_nospecial.c \ +src/core/lib/iomgr/wakeup_fd_pipe.c \ +src/core/lib/iomgr/wakeup_fd_posix.c \ +src/core/lib/iomgr/workqueue_posix.c \ +src/core/lib/iomgr/workqueue_windows.c \ +src/core/lib/json/json.c \ +src/core/lib/json/json_reader.c \ +src/core/lib/json/json_string.c \ +src/core/lib/json/json_writer.c \ +src/core/lib/surface/alarm.c \ +src/core/lib/surface/api_trace.c \ +src/core/lib/surface/byte_buffer.c \ +src/core/lib/surface/byte_buffer_reader.c \ +src/core/lib/surface/call.c \ +src/core/lib/surface/call_details.c \ +src/core/lib/surface/call_log_batch.c \ +src/core/lib/surface/channel.c \ +src/core/lib/surface/channel_init.c \ +src/core/lib/surface/channel_ping.c \ +src/core/lib/surface/channel_stack_type.c \ +src/core/lib/surface/completion_queue.c \ +src/core/lib/surface/event_string.c \ +src/core/lib/surface/lame_client.c \ +src/core/lib/surface/metadata_array.c \ +src/core/lib/surface/server.c \ +src/core/lib/surface/validate_metadata.c \ +src/core/lib/surface/version.c \ +src/core/lib/transport/byte_stream.c \ +src/core/lib/transport/connectivity_state.c \ +src/core/lib/transport/metadata.c \ +src/core/lib/transport/metadata_batch.c \ +src/core/lib/transport/static_metadata.c \ +src/core/lib/transport/transport.c \ +src/core/lib/transport/transport_op_string.c \ +src/core/lib/http/httpcli_security_connector.c \ +src/core/lib/security/context/security_context.c \ +src/core/lib/security/credentials/composite/composite_credentials.c \ +src/core/lib/security/credentials/credentials.c \ +src/core/lib/security/credentials/credentials_metadata.c \ +src/core/lib/security/credentials/fake/fake_credentials.c \ +src/core/lib/security/credentials/google_default/credentials_posix.c \ +src/core/lib/security/credentials/google_default/credentials_windows.c \ +src/core/lib/security/credentials/google_default/google_default_credentials.c \ +src/core/lib/security/credentials/iam/iam_credentials.c \ +src/core/lib/security/credentials/jwt/json_token.c \ +src/core/lib/security/credentials/jwt/jwt_credentials.c \ +src/core/lib/security/credentials/jwt/jwt_verifier.c \ +src/core/lib/security/credentials/oauth2/oauth2_credentials.c \ +src/core/lib/security/credentials/plugin/plugin_credentials.c \ +src/core/lib/security/credentials/ssl/ssl_credentials.c \ +src/core/lib/security/transport/client_auth_filter.c \ +src/core/lib/security/transport/handshake.c \ +src/core/lib/security/transport/secure_endpoint.c \ +src/core/lib/security/transport/security_connector.c \ +src/core/lib/security/transport/server_auth_filter.c \ +src/core/lib/security/transport/tsi_error.c \ +src/core/lib/security/util/b64.c \ +src/core/lib/security/util/json_util.c \ +src/core/lib/surface/init_secure.c \ +src/core/ext/transport/chttp2/alpn/alpn.c \ +src/core/lib/tsi/fake_transport_security.c \ +src/core/lib/tsi/ssl_transport_security.c \ +src/core/lib/tsi/transport_security.c \ src/cpp/codegen/codegen_init.cc # This tag can be used to specify the character encoding of the source files diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 6d7cfdaf233..3ebb445b8a8 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4345,6 +4345,7 @@ }, { "deps": [ + "gpr", "grpc", "grpc++_base", "grpc++_codegen_base", @@ -6514,7 +6515,10 @@ }, { "deps": [ - "grpc++_codegen_base" + "gpr", + "grpc++_codegen_base", + "grpc_base", + "grpc_secure" ], "headers": [ "include/grpc++/alarm.h", diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln index 6105f724c9f..8fccc646e5c 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -49,6 +49,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++", "vcxproj\.\grpc++\ EndProjectSection ProjectSection(ProjectDependencies) = postProject {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_reflection", "vcxproj\.\grpc++_reflection\grpc++_reflection.vcxproj", "{5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}" diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index cb9e41ea22f..a2711ca7a46 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -356,6 +356,14 @@ + + + + + + + + @@ -365,6 +373,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -431,6 +542,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -438,6 +781,9 @@ {29D16885-7228-4C31-81ED-5F9187C7F2A9} + + {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} + diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index a9051182b3c..f478ac9839c 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -97,6 +97,354 @@ src\cpp\util + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\compression + + + src\core\lib\compression + + + src\core\lib\debug + + + src\core\lib\http + + + src\core\lib\http + + + src\core\lib\http + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\http + + + src\core\lib\security\context + + + src\core\lib\security\credentials\composite + + + src\core\lib\security\credentials + + + src\core\lib\security\credentials + + + src\core\lib\security\credentials\fake + + + src\core\lib\security\credentials\google_default + + + src\core\lib\security\credentials\google_default + + + src\core\lib\security\credentials\google_default + + + src\core\lib\security\credentials\iam + + + src\core\lib\security\credentials\jwt + + + src\core\lib\security\credentials\jwt + + + src\core\lib\security\credentials\jwt + + + src\core\lib\security\credentials\oauth2 + + + src\core\lib\security\credentials\plugin + + + src\core\lib\security\credentials\ssl + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\util + + + src\core\lib\security\util + + + src\core\lib\surface + + + src\core\ext\transport\chttp2\alpn + + + src\core\lib\tsi + + + src\core\lib\tsi + + + src\core\lib\tsi + src\cpp\codegen @@ -396,6 +744,30 @@ include\grpc\impl\codegen + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + @@ -419,6 +791,315 @@ src\cpp\server + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\compression + + + src\core\lib\compression + + + src\core\lib\debug + + + src\core\lib\http + + + src\core\lib\http + + + src\core\lib\http + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\security\context + + + src\core\lib\security\credentials\composite + + + src\core\lib\security\credentials + + + src\core\lib\security\credentials\fake + + + src\core\lib\security\credentials\google_default + + + src\core\lib\security\credentials\iam + + + src\core\lib\security\credentials\jwt + + + src\core\lib\security\credentials\jwt + + + src\core\lib\security\credentials\jwt + + + src\core\lib\security\credentials\oauth2 + + + src\core\lib\security\credentials\plugin + + + src\core\lib\security\credentials\ssl + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\util + + + src\core\lib\security\util + + + src\core\ext\transport\chttp2\alpn + + + src\core\lib\tsi + + + src\core\lib\tsi + + + src\core\lib\tsi + + + src\core\lib\tsi + + + src\core\lib\tsi + @@ -458,6 +1139,90 @@ {328ff211-2886-406e-56f9-18ba1686f363} + + {d02f1155-7e7e-3736-3c69-dc9146dc523d} + + + {96d09c4a-59f9-3486-6c2f-cbf695b285d8} + + + {202b1172-189f-afc4-f16c-4ca12677b480} + + + {9de393b8-4b6e-6c34-122a-940419ca9989} + + + {efb6b3e6-8c7b-c2a0-12c6-486c68cdb8ec} + + + {80567a8f-622f-a3ce-c12d-aebb63984b07} + + + {e769265c-8abd-cd64-2cc2-a52da484fe7b} + + + {701b2d46-11c6-3640-b189-45287f00bee3} + + + {ada68fd5-8e51-98cb-71a7-baf7989d8ffa} + + + {e770844e-61d4-555e-59be-81288e21a35f} + + + {04dfa1c8-7ffe-4f06-4a7c-37441dc75764} + + + {a5d5bddf-6f19-b655-a03a-f30ff5c253a5} + + + {dbd8cbb6-6308-d6fe-7a36-06cc7045c037} + + + {ecd2c264-808d-0041-2f69-a5200543de91} + + + {0015e481-7e80-8936-a25c-c3fa260cc095} + + + {fad200df-a5e2-1648-7442-cea0f07edd4d} + + + {397464b3-9bbd-15a5-041b-c7deef1662ec} + + + {567691b4-6a06-cc5a-c6ad-e8c080b89ecf} + + + {d5930113-d396-7a70-d273-d07a1feae0ff} + + + {0f6afb67-4b51-6344-9de7-2b1a18a19e7d} + + + {99faa051-ca9f-cb4f-36d5-95f042fb22bc} + + + {b7a9e7e5-2445-6b0f-4677-5095ca10e760} + + + {436bc65a-0c1b-d85a-2c91-6474588c5cb6} + + + {e6a9bf58-3b0f-0b3d-3a35-3ded80d27695} + + + {b4a1cab8-5c2c-909a-8097-7a5c8f0aa9f7} + + + {fb2276d7-5a11-f1d9-82c3-e7c7f1155523} + + + {4bd7971a-68f7-0d5a-f502-6dea3099caaa} + + + {aa0153b8-c9b6-ae1d-ebdd-89754d8579f1} + {2420a905-e4f1-a5aa-a364-6a112878a39e} diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index f37fefc65a4..84e709611df 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -356,11 +356,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -417,6 +528,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index ba99bc53c8c..1e54e1595d4 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -82,6 +82,354 @@ src\cpp\util + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\compression + + + src\core\lib\compression + + + src\core\lib\debug + + + src\core\lib\http + + + src\core\lib\http + + + src\core\lib\http + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\http + + + src\core\lib\security\context + + + src\core\lib\security\credentials\composite + + + src\core\lib\security\credentials + + + src\core\lib\security\credentials + + + src\core\lib\security\credentials\fake + + + src\core\lib\security\credentials\google_default + + + src\core\lib\security\credentials\google_default + + + src\core\lib\security\credentials\google_default + + + src\core\lib\security\credentials\iam + + + src\core\lib\security\credentials\jwt + + + src\core\lib\security\credentials\jwt + + + src\core\lib\security\credentials\jwt + + + src\core\lib\security\credentials\oauth2 + + + src\core\lib\security\credentials\plugin + + + src\core\lib\security\credentials\ssl + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\util + + + src\core\lib\security\util + + + src\core\lib\surface + + + src\core\ext\transport\chttp2\alpn + + + src\core\lib\tsi + + + src\core\lib\tsi + + + src\core\lib\tsi + src\cpp\codegen @@ -381,6 +729,30 @@ include\grpc\impl\codegen + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + + + include\grpc + @@ -392,6 +764,315 @@ src\cpp\server + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\channel + + + src\core\lib\compression + + + src\core\lib\compression + + + src\core\lib\debug + + + src\core\lib\http + + + src\core\lib\http + + + src\core\lib\http + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\iomgr + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\json + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\surface + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\transport + + + src\core\lib\security\context + + + src\core\lib\security\credentials\composite + + + src\core\lib\security\credentials + + + src\core\lib\security\credentials\fake + + + src\core\lib\security\credentials\google_default + + + src\core\lib\security\credentials\iam + + + src\core\lib\security\credentials\jwt + + + src\core\lib\security\credentials\jwt + + + src\core\lib\security\credentials\jwt + + + src\core\lib\security\credentials\oauth2 + + + src\core\lib\security\credentials\plugin + + + src\core\lib\security\credentials\ssl + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\transport + + + src\core\lib\security\util + + + src\core\lib\security\util + + + src\core\ext\transport\chttp2\alpn + + + src\core\lib\tsi + + + src\core\lib\tsi + + + src\core\lib\tsi + + + src\core\lib\tsi + + + src\core\lib\tsi + @@ -431,6 +1112,90 @@ {cce6a85d-1111-3834-6825-31e170d93cff} + + {595f2ea0-aafb-87e5-c938-db3ff0b0c69a} + + + {52eca76b-9502-3d96-9064-6415226a860f} + + + {8e70201f-3b54-d3cb-8b30-ebe0d96a9b2a} + + + {d505ab7b-5e44-f307-5361-500128965cdc} + + + {d54bab94-cab9-803d-2737-5120774f1893} + + + {cf8fd5d8-ff54-331d-2d20-36d6cae0e14b} + + + {7e0225af-000b-4873-1c16-caffffbfd084} + + + {0bbdbf56-83ad-bb4b-c4e2-a6d38c342179} + + + {3875f7d7-ff11-c91d-0f98-810260cb554b} + + + {4bd405b9-af65-f0a6-d67a-433f75900668} + + + {f4b146e4-8fba-83a6-1cc1-1262ebb785e8} + + + {b83c8e70-e491-f6f9-a08c-85f632bb61d2} + + + {7e21ce26-45e2-6baf-037d-8ab4374077a9} + + + {613e655a-e5c0-9f0c-2bb4-62310a7329c0} + + + {30bddf3f-0eda-9f2f-8171-d86b1e4896fc} + + + {b34f8fa3-0fb9-4916-be6d-2a14a0794882} + + + {7e11872b-bfbb-7d23-4783-e56909c520e8} + + + {212855e8-b7bc-d5bb-0734-dd28996f28de} + + + {6d3828d0-5e5f-15c2-7d46-5d4039a88aad} + + + {b31e7015-364c-5701-31d0-644b1a8ae8c9} + + + {43e3cb91-4101-1fee-6833-20f77ab7f4e5} + + + {727c0b51-4544-957f-45f2-00bf42ff7db9} + + + {606a441b-0d57-85d8-8079-1e6e502d18f1} + + + {5b0b16ae-a8ad-81c3-afe4-8ac0b9e15311} + + + {56333427-0f81-b88b-bf49-a1b2f462023d} + + + {1d59dcef-3358-d0ab-fa42-64da74065785} + + + {ba865739-5dd9-6731-6772-48c25d45134f} + + + {dd4e4960-5bc8-395b-09c4-f2cbd6f6432b} + {1e5fd68c-bd87-e803-42b0-75a7fa19b91d} From c7940ba9f01d0f2873c45019a325b6d84b700a9a Mon Sep 17 00:00:00 2001 From: yang-g Date: Wed, 6 Jul 2016 16:48:19 -0700 Subject: [PATCH 1496/1894] init another one --- test/core/end2end/dualstack_socket_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/end2end/dualstack_socket_test.c b/test/core/end2end/dualstack_socket_test.c index 65a8deb663d..348b9ed5f02 100644 --- a/test/core/end2end/dualstack_socket_test.c +++ b/test/core/end2end/dualstack_socket_test.c @@ -273,7 +273,7 @@ void test_connect(const char *server_host, const char *client_host, int port, } int external_dns_works(const char *host) { - grpc_resolved_addresses *res; + grpc_resolved_addresses *res = NULL; grpc_error *error = grpc_blocking_resolve_address(host, "80", &res); GRPC_ERROR_UNREF(error); if (res != NULL) { From 9241c6947fa924b6d961d2e90e1a4f7293ec727e Mon Sep 17 00:00:00 2001 From: yang-g Date: Wed, 6 Jul 2016 17:01:10 -0700 Subject: [PATCH 1497/1894] Use test roots.pem in test --- test/core/surface/sequential_connectivity_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/core/surface/sequential_connectivity_test.c b/test/core/surface/sequential_connectivity_test.c index 2fba3927ba7..fe87f119f2f 100644 --- a/test/core/surface/sequential_connectivity_test.c +++ b/test/core/surface/sequential_connectivity_test.c @@ -154,7 +154,7 @@ static void secure_test_add_port(grpc_server *server, const char *addr) { static grpc_channel *secure_test_create_channel(const char *addr) { grpc_channel_credentials *ssl_creds = - grpc_ssl_credentials_create(NULL, NULL, NULL); + grpc_ssl_credentials_create(test_root_cert, NULL, NULL); grpc_arg ssl_name_override = {GRPC_ARG_STRING, GRPC_SSL_TARGET_NAME_OVERRIDE_ARG, {"foo.test.google.fr"}}; From 42ac6dbe2052913727b29f92d5415c4a5c4b845f Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Wed, 6 Jul 2016 17:13:56 -0700 Subject: [PATCH 1498/1894] Handle orphaned fds --- src/core/lib/iomgr/ev_epoll_linux.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 0fb4399fa7a..0e6cba7e4fe 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -1548,6 +1548,14 @@ retry: * polling_island fields in both fd and pollset to point to the merged * polling island. */ + + if (fd->orphaned) { + gpr_mu_unlock(&fd->mu); + gpr_mu_unlock(&pollset->mu); + /* early out */ + return; + } + if (fd->polling_island == pollset->polling_island) { pi_new = fd->polling_island; if (pi_new == NULL) { From 45c0f2b3051bf1642337e109df57e8031cb654c8 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Wed, 6 Jul 2016 19:26:09 -0700 Subject: [PATCH 1499/1894] Migrated python performance tests to use GA API --- .../tests/qps/benchmark_client.py | 37 +++++++++---------- .../tests/qps/benchmark_server.py | 4 +- .../grpcio_tests/tests/qps/qps_worker.py | 7 +++- .../grpcio_tests/tests/qps/worker_server.py | 36 +++++++++++------- .../grpcio_tests/tests/unit/test_common.py | 22 +++++++++++ .../performance/run_worker_python.sh | 2 +- .../run_tests/performance/scenario_config.py | 25 ++++++------- 7 files changed, 83 insertions(+), 50 deletions(-) diff --git a/src/python/grpcio_tests/tests/qps/benchmark_client.py b/src/python/grpcio_tests/tests/qps/benchmark_client.py index 080281415d4..83b46c914e7 100644 --- a/src/python/grpcio_tests/tests/qps/benchmark_client.py +++ b/src/python/grpcio_tests/tests/qps/benchmark_client.py @@ -37,16 +37,23 @@ from concurrent import futures from six.moves import queue import grpc -from grpc.beta import implementations -from grpc.framework.interfaces.face import face from src.proto.grpc.testing import messages_pb2 from src.proto.grpc.testing import services_pb2 from tests.unit import resources -from tests.unit.beta import test_utilities +from tests.unit import test_common _TIMEOUT = 60 * 60 * 24 +class GenericStub(object): + + def __init__(self, channel): + self.UnaryCall = channel.unary_unary( + '/grpc.testing.BenchmarkService/UnaryCall') + self.StreamingCall = channel.stream_stream( + '/grpc.testing.BenchmarkService/StreamingCall') + + class BenchmarkClient: """Benchmark client interface that exposes a non-blocking send_request().""" @@ -54,15 +61,12 @@ class BenchmarkClient: def __init__(self, server, config, hist): # Create the stub - host, port = server.split(':') - port = int(port) if config.HasField('security_params'): - creds = implementations.ssl_channel_credentials( - resources.test_root_certificates()) - channel = test_utilities.not_really_secure_channel( - host, port, creds, config.security_params.server_host_override) + creds = grpc.ssl_channel_credentials(resources.test_root_certificates()) + channel = test_common.test_secure_channel( + server, creds, config.security_params.server_host_override) else: - channel = implementations.insecure_channel(host, port) + channel = grpc.insecure_channel(server) connected_event = threading.Event() def wait_for_ready(connectivity): @@ -73,7 +77,7 @@ class BenchmarkClient: if config.payload_config.WhichOneof('payload') == 'simple_params': self._generic = False - self._stub = services_pb2.beta_create_BenchmarkService_stub(channel) + self._stub = services_pb2.BenchmarkServiceStub(channel) payload = messages_pb2.Payload( body='\0' * config.payload_config.simple_params.req_size) self._request = messages_pb2.SimpleRequest( @@ -81,7 +85,7 @@ class BenchmarkClient: response_size=config.payload_config.simple_params.resp_size) else: self._generic = True - self._stub = implementations.generic_stub(channel) + self._stub = GenericStub(channel) self._request = '\0' * config.payload_config.bytebuf_params.req_size self._hist = hist @@ -166,13 +170,8 @@ class _SyncStream(object): def start(self): self._is_streaming = True - if self._generic: - stream_callable = self._stub.stream_stream( - 'grpc.testing.BenchmarkService', 'StreamingCall') - else: - stream_callable = self._stub.StreamingCall - - response_stream = stream_callable(self._request_generator(), _TIMEOUT) + response_stream = self._stub.StreamingCall( + self._request_generator(), _TIMEOUT) for _ in response_stream: self._handle_response( self, time.time() - self._send_time_queue.get_nowait()) diff --git a/src/python/grpcio_tests/tests/qps/benchmark_server.py b/src/python/grpcio_tests/tests/qps/benchmark_server.py index 8cbf480d58b..2b76b810cdd 100644 --- a/src/python/grpcio_tests/tests/qps/benchmark_server.py +++ b/src/python/grpcio_tests/tests/qps/benchmark_server.py @@ -31,7 +31,7 @@ from src.proto.grpc.testing import messages_pb2 from src.proto.grpc.testing import services_pb2 -class BenchmarkServer(services_pb2.BetaBenchmarkServiceServicer): +class BenchmarkServer(services_pb2.BenchmarkServiceServicer): """Synchronous Server implementation for the Benchmark service.""" def UnaryCall(self, request, context): @@ -44,7 +44,7 @@ class BenchmarkServer(services_pb2.BetaBenchmarkServiceServicer): yield messages_pb2.SimpleResponse(payload=payload) -class GenericBenchmarkServer(services_pb2.BetaBenchmarkServiceServicer): +class GenericBenchmarkServer(services_pb2.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 16926379a5b..3abf0d08dd9 100644 --- a/src/python/grpcio_tests/tests/qps/qps_worker.py +++ b/src/python/grpcio_tests/tests/qps/qps_worker.py @@ -32,18 +32,21 @@ import argparse import time +from concurrent import futures +import grpc from src.proto.grpc.testing import services_pb2 from tests.qps import worker_server def run_worker_server(port): + server = grpc.server((), futures.ThreadPoolExecutor(max_workers=5)) servicer = worker_server.WorkerServer() - server = services_pb2.beta_create_WorkerService_server(servicer) + services_pb2.add_WorkerServiceServicer_to_server(servicer, server) server.add_insecure_port('[::]:{}'.format(port)) server.start() servicer.wait_for_quit() - server.stop(2) + server.stop(0) if __name__ == '__main__': diff --git a/src/python/grpcio_tests/tests/qps/worker_server.py b/src/python/grpcio_tests/tests/qps/worker_server.py index d41f8377c2a..932a1ffe2b4 100644 --- a/src/python/grpcio_tests/tests/qps/worker_server.py +++ b/src/python/grpcio_tests/tests/qps/worker_server.py @@ -32,8 +32,8 @@ import random import threading import time -from grpc.beta import implementations -from grpc.framework.interfaces.face import utilities +from concurrent import futures +import grpc from src.proto.grpc.testing import control_pb2 from src.proto.grpc.testing import services_pb2 from src.proto.grpc.testing import stats_pb2 @@ -45,7 +45,7 @@ from tests.qps import histogram from tests.unit import resources -class WorkerServer(services_pb2.BetaWorkerServiceServicer): +class WorkerServer(services_pb2.WorkerServiceServicer): """Python Worker Server implementation.""" def __init__(self): @@ -65,7 +65,7 @@ class WorkerServer(services_pb2.BetaWorkerServiceServicer): if request.mark.reset: start_time = end_time yield status - server.stop(0) + server.stop(None) def _get_server_status(self, start_time, end_time, port, cores): end_time = time.time() @@ -76,25 +76,35 @@ class WorkerServer(services_pb2.BetaWorkerServiceServicer): return control_pb2.ServerStatus(stats=stats, port=port, cores=cores) def _create_server(self, config): - if config.server_type == control_pb2.SYNC_SERVER: + if config.async_server_threads == 0: + # This is the default concurrent.futures thread pool size, but + # None doesn't seem to work + server_threads = multiprocessing.cpu_count() * 5 + else: + server_threads = config.async_server_threads + server = grpc.server((), futures.ThreadPoolExecutor( + max_workers=server_threads)) + if config.server_type == control_pb2.ASYNC_SERVER: servicer = benchmark_server.BenchmarkServer() - server = services_pb2.beta_create_BenchmarkService_server(servicer) + services_pb2.add_BenchmarkServiceServicer_to_server(servicer, server) elif config.server_type == control_pb2.ASYNC_GENERIC_SERVER: resp_size = config.payload_config.bytebuf_params.resp_size servicer = benchmark_server.GenericBenchmarkServer(resp_size) method_implementations = { - ('grpc.testing.BenchmarkService', 'StreamingCall'): - utilities.stream_stream_inline(servicer.StreamingCall), - ('grpc.testing.BenchmarkService', 'UnaryCall'): - utilities.unary_unary_inline(servicer.UnaryCall), + 'StreamingCall': + grpc.stream_stream_rpc_method_handler(servicer.StreamingCall), + 'UnaryCall': + grpc.unary_unary_rpc_method_handler(servicer.UnaryCall), } - server = implementations.server(method_implementations) + handler = grpc.method_handlers_generic_handler( + 'grpc.testing.BenchmarkService', method_implementations) + server.add_generic_rpc_handlers((handler,)) else: raise Exception('Unsupported server type {}'.format(config.server_type)) if config.HasField('security_params'): # Use SSL - server_creds = implementations.ssl_server_credentials([( - resources.private_key(), resources.certificate_chain())]) + server_creds = grpc.ssl_server_credentials( + ((resources.private_key(), resources.certificate_chain()),)) port = server.add_secure_port('[::]:{}'.format(config.port), server_creds) else: port = server.add_insecure_port('[::]:{}'.format(config.port)) diff --git a/src/python/grpcio_tests/tests/unit/test_common.py b/src/python/grpcio_tests/tests/unit/test_common.py index c8886bf4ca5..cd71bd80d75 100644 --- a/src/python/grpcio_tests/tests/unit/test_common.py +++ b/src/python/grpcio_tests/tests/unit/test_common.py @@ -31,6 +31,7 @@ import collections +import grpc import six INVOCATION_INITIAL_METADATA = (('0', 'abc'), ('1', 'def'), ('2', 'ghi'),) @@ -78,3 +79,24 @@ def metadata_transmitted(original_metadata, transmitted_metadata): return False else: return True + + +def test_secure_channel( + target, channel_credentials, server_host_override): + """Creates an insecure Channel to a remote host. + + Args: + host: The name of the remote host to which to connect. + port: The port of the remote host to which to connect. + channel_credentials: The implementations.ChannelCredentials with which to + connect. + server_host_override: The target name used for SSL host name checking. + + Returns: + An implementations.Channel to the remote host through which RPCs may be + conducted. + """ + channel = grpc.secure_channel( + target, channel_credentials, + (('grpc.ssl_target_name_override', server_host_override,),)) + return channel diff --git a/tools/run_tests/performance/run_worker_python.sh b/tools/run_tests/performance/run_worker_python.sh index 3b8ba6f4e4a..06cf172d6fe 100755 --- a/tools/run_tests/performance/run_worker_python.sh +++ b/tools/run_tests/performance/run_worker_python.sh @@ -32,4 +32,4 @@ set -ex cd $(dirname $0)/../../.. -PYTHONPATH=src/python/grpcio_tests:src/python/grpcio:src/python/gens py27/bin/python src/python/grpcio_tests/tests/qps/qps_worker.py $@ +PYTHONPATH=src/python/grpcio_tests:src/python/gens py27/bin/python src/python/grpcio_tests/tests/qps/qps_worker.py $@ diff --git a/tools/run_tests/performance/scenario_config.py b/tools/run_tests/performance/scenario_config.py index 2d5130e1e86..4dfd01fc663 100644 --- a/tools/run_tests/performance/scenario_config.py +++ b/tools/run_tests/performance/scenario_config.py @@ -387,45 +387,44 @@ class PythonLanguage: return 500 def scenarios(self): - # TODO(issue #6522): Empty streaming requests does not work for python - #yield _ping_pong_scenario( - # 'python_generic_async_streaming_ping_pong', rpc_type='STREAMING', - # client_type='ASYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', - # use_generic_payload=True, - # categories=[SMOKETEST]) + yield _ping_pong_scenario( + 'python_generic_sync_streaming_ping_pong', rpc_type='STREAMING', + client_type='SYNC_CLIENT', server_type='ASYNC_GENERIC_SERVER', + use_generic_payload=True, + categories=[SMOKETEST]) yield _ping_pong_scenario( 'python_protobuf_sync_streaming_ping_pong', rpc_type='STREAMING', - client_type='SYNC_CLIENT', server_type='SYNC_SERVER') + client_type='SYNC_CLIENT', server_type='ASYNC_SERVER') yield _ping_pong_scenario( 'python_protobuf_async_unary_ping_pong', rpc_type='UNARY', - client_type='ASYNC_CLIENT', server_type='SYNC_SERVER') + client_type='ASYNC_CLIENT', server_type='ASYNC_SERVER') yield _ping_pong_scenario( 'python_protobuf_sync_unary_ping_pong', rpc_type='UNARY', - client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + client_type='SYNC_CLIENT', server_type='ASYNC_SERVER', categories=[SMOKETEST]) yield _ping_pong_scenario( 'python_protobuf_sync_unary_qps_unconstrained', rpc_type='UNARY', - client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + client_type='SYNC_CLIENT', server_type='ASYNC_SERVER', unconstrained_client='sync') yield _ping_pong_scenario( 'python_protobuf_sync_streaming_qps_unconstrained', rpc_type='STREAMING', - client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + client_type='SYNC_CLIENT', server_type='ASYNC_SERVER', unconstrained_client='sync') yield _ping_pong_scenario( 'python_to_cpp_protobuf_sync_unary_ping_pong', rpc_type='UNARY', - client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + client_type='SYNC_CLIENT', server_type='ASYNC_SERVER', server_language='c++', server_core_limit=1, async_server_threads=1, categories=[SMOKETEST]) yield _ping_pong_scenario( 'python_to_cpp_protobuf_sync_streaming_ping_pong', rpc_type='STREAMING', - client_type='SYNC_CLIENT', server_type='SYNC_SERVER', + client_type='SYNC_CLIENT', server_type='ASYNC_SERVER', server_language='c++', server_core_limit=1, async_server_threads=1) def __str__(self): From ccb184068d21758f905ecc3bfd42a2f9626dd5ee Mon Sep 17 00:00:00 2001 From: Jorge Canizales Date: Thu, 7 Jul 2016 01:47:43 -0700 Subject: [PATCH 1500/1894] Add arm_arch.h back to fix compilation for devices --- src/objective-c/BoringSSL.podspec | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/objective-c/BoringSSL.podspec b/src/objective-c/BoringSSL.podspec index 26a0451f7d3..42b4434d0d3 100644 --- a/src/objective-c/BoringSSL.podspec +++ b/src/objective-c/BoringSSL.podspec @@ -109,8 +109,6 @@ Pod::Spec.new do |s| s.subspec 'Interface' do |ss| ss.header_mappings_dir = 'include/openssl' ss.source_files = 'include/openssl/*.h' - # Doesn't compile correctly; but doesn't seem to be needed: - ss.exclude_files = 'include/openssl/arm_arch.h' end s.subspec 'Implementation' do |ss| ss.header_mappings_dir = '.' @@ -147,6 +145,11 @@ Pod::Spec.new do |s| #include "ssl.h" #include "crypto.h" #include "aes.h" + /* The following macros are defined by base.h. The latter is the first file included by the + other headers. */ + #if defined(OPENSSL_ARM) || defined(OPENSSL_AARCH64) + # include "arm_arch.h" + #endif #include "asn1.h" #include "asn1_mac.h" #include "asn1t.h" From c0e73da8c22550070f328a6fd168abced87342d7 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 7 Jul 2016 09:43:24 -0700 Subject: [PATCH 1501/1894] Fix flow control issue, make debugging in the future easier --- .../chttp2/transport/chttp2_transport.c | 47 ++++++++++--------- .../ext/transport/chttp2/transport/internal.h | 7 ++- .../ext/transport/chttp2/transport/parsing.c | 6 +-- .../transport/chttp2/transport/stream_lists.c | 12 ++--- .../ext/transport/chttp2/transport/writing.c | 6 +-- 5 files changed, 36 insertions(+), 42 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 8b7f91d3af8..aeedf417b4a 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -295,7 +295,7 @@ static void init_transport(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, gpr_slice_buffer_add( &t->global.qbuf, gpr_slice_from_copied_string(GRPC_CHTTP2_CLIENT_CONNECT_STRING)); - grpc_chttp2_initiate_write(exec_ctx, &t->global, false); + grpc_chttp2_initiate_write(exec_ctx, &t->global, false, "initial_write"); } /* 8 is a random stab in the dark as to a good initial size: it's small enough that it shouldn't waste memory for infrequently used connections, yet @@ -799,14 +799,14 @@ void grpc_chttp2_run_with_global_lock(grpc_exec_ctx *exec_ctx, void grpc_chttp2_initiate_write(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, - bool covered_by_poller) { + bool covered_by_poller, const char *reason) { grpc_chttp2_transport *t = TRANSPORT_FROM_GLOBAL(transport_global); switch (t->executor.write_state) { case GRPC_CHTTP2_WRITING_INACTIVE: set_write_state(t, covered_by_poller ? GRPC_CHTTP2_WRITE_REQUESTED_WITH_POLLER : GRPC_CHTTP2_WRITE_REQUESTED_NO_POLLER, - "initiate_write"); + reason); break; case GRPC_CHTTP2_WRITE_REQUESTED_WITH_POLLER: /* nothing to do: write already requested */ @@ -815,7 +815,7 @@ void grpc_chttp2_initiate_write(grpc_exec_ctx *exec_ctx, if (covered_by_poller) { /* upgrade to note poller is available to cover the write */ set_write_state(t, GRPC_CHTTP2_WRITE_REQUESTED_WITH_POLLER, - "initiate_write"); + reason); } break; case GRPC_CHTTP2_WRITE_SCHEDULED: @@ -825,7 +825,7 @@ void grpc_chttp2_initiate_write(grpc_exec_ctx *exec_ctx, set_write_state(t, covered_by_poller ? GRPC_CHTTP2_WRITING_STALE_WITH_POLLER : GRPC_CHTTP2_WRITING_STALE_NO_POLLER, - "initiate_write"); + reason); break; case GRPC_CHTTP2_WRITING_STALE_WITH_POLLER: /* nothing to do: write already requested */ @@ -834,7 +834,7 @@ void grpc_chttp2_initiate_write(grpc_exec_ctx *exec_ctx, if (covered_by_poller) { /* upgrade to note poller is available to cover the write */ set_write_state(t, GRPC_CHTTP2_WRITING_STALE_WITH_POLLER, - "initiate_write"); + reason); } break; } @@ -881,11 +881,11 @@ static void initiate_writing(grpc_exec_ctx *exec_ctx, void *arg, void grpc_chttp2_become_writable(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, - bool covered_by_poller) { + bool covered_by_poller, const char *reason) { if (!TRANSPORT_FROM_GLOBAL(transport_global)->closed && grpc_chttp2_list_add_writable_stream(transport_global, stream_global)) { GRPC_CHTTP2_STREAM_REF(stream_global, "chttp2_writing"); - grpc_chttp2_initiate_write(exec_ctx, transport_global, covered_by_poller); + grpc_chttp2_initiate_write(exec_ctx, transport_global, covered_by_poller, reason); } } @@ -901,7 +901,7 @@ static void push_setting(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, if (use_value != t->global.settings[GRPC_LOCAL_SETTINGS][id]) { t->global.settings[GRPC_LOCAL_SETTINGS][id] = use_value; t->global.dirtied_local_settings = 1; - grpc_chttp2_initiate_write(exec_ctx, &t->global, false); + grpc_chttp2_initiate_write(exec_ctx, &t->global, false, "push_setting"); } } @@ -1040,7 +1040,7 @@ static void maybe_start_some_streams( stream_global->in_stream_map = true; transport_global->concurrent_stream_count++; grpc_chttp2_become_writable(exec_ctx, transport_global, stream_global, - true); + true, "new_stream"); } /* cancel out streams that will never be started */ while (transport_global->next_stream_id >= MAX_CLIENT_STREAM_ID && @@ -1176,7 +1176,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, } else { GPR_ASSERT(stream_global->id != 0); grpc_chttp2_become_writable(exec_ctx, transport_global, stream_global, - true); + true, "op.send_initial_metadata"); } } else { stream_global->send_trailing_metadata = NULL; @@ -1202,7 +1202,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, stream_global->send_message = op->send_message; if (stream_global->id != 0) { grpc_chttp2_become_writable(exec_ctx, transport_global, stream_global, - true); + true, "op.send_message"); } } } @@ -1247,7 +1247,7 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, /* TODO(ctiller): check if there's flow control for any outstanding bytes before going writable */ grpc_chttp2_become_writable(exec_ctx, transport_global, stream_global, - true); + true, "op.send_trailing_metadata"); } } } @@ -1313,7 +1313,7 @@ static void send_ping_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, p->id[7] = (uint8_t)(t->global.ping_counter & 0xff); p->on_recv = on_recv; gpr_slice_buffer_add(&t->global.qbuf, grpc_chttp2_ping_create(0, p->id)); - grpc_chttp2_initiate_write(exec_ctx, &t->global, true); + grpc_chttp2_initiate_write(exec_ctx, &t->global, true, "send_ping"); } static void ack_ping_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, @@ -1373,7 +1373,7 @@ static void perform_transport_op_locked(grpc_exec_ctx *exec_ctx, close_transport = grpc_chttp2_has_streams(t) ? GRPC_ERROR_NONE : GRPC_ERROR_CREATE("GOAWAY sent"); - grpc_chttp2_initiate_write(exec_ctx, &t->global, false); + grpc_chttp2_initiate_write(exec_ctx, &t->global, false, "goaway_sent"); } if (op->set_accept_stream) { @@ -1578,7 +1578,7 @@ static void cancel_from_api(grpc_exec_ctx *exec_ctx, &transport_global->qbuf, grpc_chttp2_rst_stream_create(stream_global->id, (uint32_t)http_error, &stream_global->stats.outgoing)); - grpc_chttp2_initiate_write(exec_ctx, transport_global, false); + grpc_chttp2_initiate_write(exec_ctx, transport_global, false, "rst_stream"); } const char *msg = @@ -1844,7 +1844,7 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_mark_stream_closed(exec_ctx, transport_global, stream_global, 1, 1, error); - grpc_chttp2_initiate_write(exec_ctx, transport_global, false); + grpc_chttp2_initiate_write(exec_ctx, transport_global, false, "close_from_api"); } typedef struct { @@ -1896,7 +1896,7 @@ static void update_global_window(void *args, uint32_t id, void *stream) { if (was_zero && !is_zero) { grpc_chttp2_become_writable(a->exec_ctx, transport_global, stream_global, - true); + true, "update_global_window"); } } @@ -2007,7 +2007,7 @@ static void post_parse_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, /* copy parsing qbuf to global qbuf */ if (t->parsing.qbuf.count > 0) { gpr_slice_buffer_move_into(&t->parsing.qbuf, &t->global.qbuf); - grpc_chttp2_initiate_write(exec_ctx, transport_global, false); + grpc_chttp2_initiate_write(exec_ctx, transport_global, false, "parsing_qbuf"); } /* merge stream lists */ grpc_chttp2_stream_map_move_into(&t->new_stream_map, &t->parsing_stream_map); @@ -2176,6 +2176,7 @@ static void incoming_byte_stream_update_flow_control( if (stream_global->max_recv_bytes < max_recv_bytes) { uint32_t add_max_recv_bytes = max_recv_bytes - stream_global->max_recv_bytes; + gpr_log(GPR_DEBUG, "add_max_recv_bytes:%d", add_max_recv_bytes); GRPC_CHTTP2_FLOW_CREDIT_STREAM("op", transport_global, stream_global, max_recv_bytes, add_max_recv_bytes); GRPC_CHTTP2_FLOW_CREDIT_STREAM("op", transport_global, stream_global, @@ -2187,7 +2188,7 @@ static void incoming_byte_stream_update_flow_control( grpc_chttp2_list_add_unannounced_incoming_window_available(transport_global, stream_global); grpc_chttp2_become_writable(exec_ctx, transport_global, stream_global, - false); + false, "read_incoming_stream"); } } @@ -2395,7 +2396,7 @@ static char *format_flowctl_context_var(const char *context, const char *var, if (context == NULL) { *scope = NULL; gpr_asprintf(&buf, "%s(%" PRId64 ")", var, val); - result = gpr_leftpad(buf, ' ', 40); + result = gpr_leftpad(buf, ' ', 60); gpr_free(buf); return result; } @@ -2408,7 +2409,7 @@ static char *format_flowctl_context_var(const char *context, const char *var, gpr_free(tmp); } gpr_asprintf(&buf, "%s.%s(%" PRId64 ")", underscore_pos + 1, var, val); - result = gpr_leftpad(buf, ' ', 40); + result = gpr_leftpad(buf, ' ', 60); gpr_free(buf); return result; } @@ -2441,7 +2442,7 @@ void grpc_chttp2_flowctl_trace(const char *file, int line, const char *phase, tmp_phase = gpr_leftpad(phase, ' ', 8); tmp_scope1 = gpr_leftpad(scope1, ' ', 11); - gpr_asprintf(&prefix, "FLOW %s: %s %s ", phase, clisvr, scope1); + gpr_asprintf(&prefix, "FLOW %s: %s %s ", tmp_phase, clisvr, scope1); gpr_free(tmp_phase); gpr_free(tmp_scope1); diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 776017bee21..2a12afad6ce 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -542,7 +542,7 @@ struct grpc_chttp2_stream { should be performed. */ void grpc_chttp2_initiate_write(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, - bool covered_by_poller); + bool covered_by_poller, const char *reason); /** Someone is unlocking the transport mutex: check to see if writes are required, and schedule them if so */ @@ -631,8 +631,7 @@ void grpc_chttp2_list_add_writing_stalled_by_transport( grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_writing *stream_writing); void grpc_chttp2_list_flush_writing_stalled_by_transport( - grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_writing *transport_writing, - bool is_window_available); + grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_writing *transport_writing); void grpc_chttp2_list_add_stalled_by_transport( grpc_chttp2_transport_writing *transport_writing, @@ -845,6 +844,6 @@ void grpc_chttp2_ack_ping(grpc_exec_ctx *exec_ctx, void grpc_chttp2_become_writable(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_global *transport_global, grpc_chttp2_stream_global *stream_global, - bool covered_by_poller); + bool covered_by_poller, const char *reason); #endif /* GRPC_CORE_EXT_TRANSPORT_CHTTP2_TRANSPORT_INTERNAL_H */ diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index b42d98b3b06..efc27775f00 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -157,7 +157,7 @@ void grpc_chttp2_publish_reads( while (grpc_chttp2_list_pop_stalled_by_transport(transport_global, &stream_global)) { grpc_chttp2_become_writable(exec_ctx, transport_global, stream_global, - false); + false, "transport.read_flow_control"); } } @@ -169,7 +169,7 @@ void grpc_chttp2_publish_reads( announce_incoming_window, announce_bytes); GRPC_CHTTP2_FLOW_CREDIT_TRANSPORT("parsed", transport_parsing, incoming_window, announce_bytes); - grpc_chttp2_initiate_write(exec_ctx, transport_global, false); + grpc_chttp2_initiate_write(exec_ctx, transport_global, false, "global incoming window"); } /* for each stream that saw an update, fixup global state */ @@ -193,7 +193,7 @@ void grpc_chttp2_publish_reads( is_zero = stream_global->outgoing_window <= 0; if (was_zero && !is_zero) { grpc_chttp2_become_writable(exec_ctx, transport_global, stream_global, - false); + false, "stream.read_flow_control"); } stream_global->max_recv_bytes -= (uint32_t)GPR_MIN( diff --git a/src/core/ext/transport/chttp2/transport/stream_lists.c b/src/core/ext/transport/chttp2/transport/stream_lists.c index f227a0af982..aaa4768c7b0 100644 --- a/src/core/ext/transport/chttp2/transport/stream_lists.c +++ b/src/core/ext/transport/chttp2/transport/stream_lists.c @@ -337,19 +337,13 @@ void grpc_chttp2_list_add_writing_stalled_by_transport( } void grpc_chttp2_list_flush_writing_stalled_by_transport( - grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_writing *transport_writing, - bool is_window_available) { + grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_writing *transport_writing) { grpc_chttp2_stream *stream; grpc_chttp2_transport *transport = TRANSPORT_FROM_WRITING(transport_writing); while (stream_list_pop(transport, &stream, GRPC_CHTTP2_LIST_WRITING_STALLED_BY_TRANSPORT)) { - if (is_window_available) { - grpc_chttp2_become_writable(exec_ctx, &transport->global, &stream->global, - true); - } else { - grpc_chttp2_list_add_stalled_by_transport(transport_writing, - &stream->writing); - } + grpc_chttp2_list_add_stalled_by_transport(transport_writing, + &stream->writing); GRPC_CHTTP2_STREAM_UNREF(exec_ctx, &stream->global, "chttp2_writing_stalled"); } diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index b19f5f068df..cbc57d10ad3 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -75,9 +75,6 @@ int grpc_chttp2_unlocking_check_writes( GRPC_CHTTP2_FLOW_MOVE_TRANSPORT("write", transport_writing, outgoing_window, transport_global, outgoing_window); - bool is_window_available = transport_writing->outgoing_window > 0; - grpc_chttp2_list_flush_writing_stalled_by_transport( - exec_ctx, transport_writing, is_window_available); /* for each grpc_chttp2_stream that's become writable, frame it's data (according to available window sizes) and add to the output buffer */ @@ -331,6 +328,9 @@ void grpc_chttp2_cleanup_writing( grpc_chttp2_stream_writing *stream_writing; grpc_chttp2_stream_global *stream_global; + grpc_chttp2_list_flush_writing_stalled_by_transport(exec_ctx, + transport_writing); + while (grpc_chttp2_list_pop_written_stream( transport_global, transport_writing, &stream_global, &stream_writing)) { if (stream_writing->sent_initial_metadata) { From e940d30f4cd99616329164cfe58ee80d4dcb824b Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 7 Jul 2016 09:45:49 -0700 Subject: [PATCH 1502/1894] Remove spam --- .../chttp2/transport/chttp2_transport.c | 23 ++++++++++--------- 1 file changed, 12 insertions(+), 11 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index aeedf417b4a..41506094de1 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -814,8 +814,7 @@ void grpc_chttp2_initiate_write(grpc_exec_ctx *exec_ctx, case GRPC_CHTTP2_WRITE_REQUESTED_NO_POLLER: if (covered_by_poller) { /* upgrade to note poller is available to cover the write */ - set_write_state(t, GRPC_CHTTP2_WRITE_REQUESTED_WITH_POLLER, - reason); + set_write_state(t, GRPC_CHTTP2_WRITE_REQUESTED_WITH_POLLER, reason); } break; case GRPC_CHTTP2_WRITE_SCHEDULED: @@ -833,8 +832,7 @@ void grpc_chttp2_initiate_write(grpc_exec_ctx *exec_ctx, case GRPC_CHTTP2_WRITING_STALE_NO_POLLER: if (covered_by_poller) { /* upgrade to note poller is available to cover the write */ - set_write_state(t, GRPC_CHTTP2_WRITING_STALE_WITH_POLLER, - reason); + set_write_state(t, GRPC_CHTTP2_WRITING_STALE_WITH_POLLER, reason); } break; } @@ -885,7 +883,8 @@ void grpc_chttp2_become_writable(grpc_exec_ctx *exec_ctx, if (!TRANSPORT_FROM_GLOBAL(transport_global)->closed && grpc_chttp2_list_add_writable_stream(transport_global, stream_global)) { GRPC_CHTTP2_STREAM_REF(stream_global, "chttp2_writing"); - grpc_chttp2_initiate_write(exec_ctx, transport_global, covered_by_poller, reason); + grpc_chttp2_initiate_write(exec_ctx, transport_global, covered_by_poller, + reason); } } @@ -1039,8 +1038,8 @@ static void maybe_start_some_streams( stream_global->id, STREAM_FROM_GLOBAL(stream_global)); stream_global->in_stream_map = true; transport_global->concurrent_stream_count++; - grpc_chttp2_become_writable(exec_ctx, transport_global, stream_global, - true, "new_stream"); + grpc_chttp2_become_writable(exec_ctx, transport_global, stream_global, true, + "new_stream"); } /* cancel out streams that will never be started */ while (transport_global->next_stream_id >= MAX_CLIENT_STREAM_ID && @@ -1578,7 +1577,8 @@ static void cancel_from_api(grpc_exec_ctx *exec_ctx, &transport_global->qbuf, grpc_chttp2_rst_stream_create(stream_global->id, (uint32_t)http_error, &stream_global->stats.outgoing)); - grpc_chttp2_initiate_write(exec_ctx, transport_global, false, "rst_stream"); + grpc_chttp2_initiate_write(exec_ctx, transport_global, false, + "rst_stream"); } const char *msg = @@ -1844,7 +1844,8 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, grpc_chttp2_mark_stream_closed(exec_ctx, transport_global, stream_global, 1, 1, error); - grpc_chttp2_initiate_write(exec_ctx, transport_global, false, "close_from_api"); + grpc_chttp2_initiate_write(exec_ctx, transport_global, false, + "close_from_api"); } typedef struct { @@ -2007,7 +2008,8 @@ static void post_parse_locked(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, /* copy parsing qbuf to global qbuf */ if (t->parsing.qbuf.count > 0) { gpr_slice_buffer_move_into(&t->parsing.qbuf, &t->global.qbuf); - grpc_chttp2_initiate_write(exec_ctx, transport_global, false, "parsing_qbuf"); + grpc_chttp2_initiate_write(exec_ctx, transport_global, false, + "parsing_qbuf"); } /* merge stream lists */ grpc_chttp2_stream_map_move_into(&t->new_stream_map, &t->parsing_stream_map); @@ -2176,7 +2178,6 @@ static void incoming_byte_stream_update_flow_control( if (stream_global->max_recv_bytes < max_recv_bytes) { uint32_t add_max_recv_bytes = max_recv_bytes - stream_global->max_recv_bytes; - gpr_log(GPR_DEBUG, "add_max_recv_bytes:%d", add_max_recv_bytes); GRPC_CHTTP2_FLOW_CREDIT_STREAM("op", transport_global, stream_global, max_recv_bytes, add_max_recv_bytes); GRPC_CHTTP2_FLOW_CREDIT_STREAM("op", transport_global, stream_global, From ff6cd70a1b4f8e711d45ed1c127192f92a1bc805 Mon Sep 17 00:00:00 2001 From: Muxi Yan Date: Thu, 7 Jul 2016 09:57:54 -0700 Subject: [PATCH 1503/1894] Update error message when client does not enough memory to hold server response --- src/objective-c/GRPCClient/GRPCCall.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/objective-c/GRPCClient/GRPCCall.m b/src/objective-c/GRPCClient/GRPCCall.m index 71121094afd..a5c6751c89c 100644 --- a/src/objective-c/GRPCClient/GRPCCall.m +++ b/src/objective-c/GRPCClient/GRPCCall.m @@ -214,7 +214,7 @@ NSString * const kGRPCTrailersKey = @"io.grpc.TrailersKey"; // appropriately-documented code. [weakSelf finishWithError:[NSError errorWithDomain:kGRPCErrorDomain code:GRPCErrorCodeResourceExhausted - userInfo:@{NSLocalizedDescriptionKey: @"Client out of memory."}]]; + userInfo:@{NSLocalizedDescriptionKey: @"Client does not have enough memory to hold the server response."}]]; [weakSelf cancelCall]; return; } From 6c8619bbe7a0eb8ca65782886e8253ebbec87b54 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 7 Jul 2016 10:41:48 -0700 Subject: [PATCH 1504/1894] Better fix for flow control bug --- src/core/ext/transport/chttp2/transport/internal.h | 2 +- src/core/ext/transport/chttp2/transport/parsing.c | 14 ++++++-------- .../ext/transport/chttp2/transport/stream_lists.c | 9 ++++++++- src/core/ext/transport/chttp2/transport/writing.c | 14 ++++++++++++-- test/cpp/end2end/end2end_test.cc | 3 +++ 5 files changed, 30 insertions(+), 12 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index 2a12afad6ce..6b47d702aea 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -630,7 +630,7 @@ int grpc_chttp2_list_pop_check_read_ops( void grpc_chttp2_list_add_writing_stalled_by_transport( grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_writing *stream_writing); -void grpc_chttp2_list_flush_writing_stalled_by_transport( +bool grpc_chttp2_list_flush_writing_stalled_by_transport( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_writing *transport_writing); void grpc_chttp2_list_add_stalled_by_transport( diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index efc27775f00..a8ce1db8477 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -87,8 +87,8 @@ void grpc_chttp2_prepare_to_read( transport_global->settings[GRPC_SENT_SETTINGS], sizeof(transport_parsing->last_sent_settings)); transport_parsing->max_frame_size = - transport_global->settings[GRPC_ACKED_SETTINGS] - [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; + transport_global + ->settings[GRPC_ACKED_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; /* update the parsing view of incoming window */ while (grpc_chttp2_list_pop_unannounced_incoming_window_available( @@ -154,11 +154,8 @@ void grpc_chttp2_publish_reads( transport_parsing, outgoing_window); is_zero = transport_global->outgoing_window <= 0; if (was_zero && !is_zero) { - while (grpc_chttp2_list_pop_stalled_by_transport(transport_global, - &stream_global)) { - grpc_chttp2_become_writable(exec_ctx, transport_global, stream_global, - false, "transport.read_flow_control"); - } + grpc_chttp2_initiate_write(exec_ctx, transport_global, false, + "new_global_flow_control"); } if (transport_parsing->incoming_window < @@ -169,7 +166,8 @@ void grpc_chttp2_publish_reads( announce_incoming_window, announce_bytes); GRPC_CHTTP2_FLOW_CREDIT_TRANSPORT("parsed", transport_parsing, incoming_window, announce_bytes); - grpc_chttp2_initiate_write(exec_ctx, transport_global, false, "global incoming window"); + grpc_chttp2_initiate_write(exec_ctx, transport_global, false, + "global incoming window"); } /* for each stream that saw an update, fixup global state */ diff --git a/src/core/ext/transport/chttp2/transport/stream_lists.c b/src/core/ext/transport/chttp2/transport/stream_lists.c index aaa4768c7b0..2eb5f5f632e 100644 --- a/src/core/ext/transport/chttp2/transport/stream_lists.c +++ b/src/core/ext/transport/chttp2/transport/stream_lists.c @@ -329,6 +329,7 @@ void grpc_chttp2_list_add_writing_stalled_by_transport( grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_writing *stream_writing) { grpc_chttp2_stream *stream = STREAM_FROM_WRITING(stream_writing); + gpr_log(GPR_DEBUG, "writing stalled %d", stream->global.id); if (!stream->included[GRPC_CHTTP2_LIST_WRITING_STALLED_BY_TRANSPORT]) { GRPC_CHTTP2_STREAM_REF(&stream->global, "chttp2_writing_stalled"); } @@ -336,22 +337,28 @@ void grpc_chttp2_list_add_writing_stalled_by_transport( GRPC_CHTTP2_LIST_WRITING_STALLED_BY_TRANSPORT); } -void grpc_chttp2_list_flush_writing_stalled_by_transport( +bool grpc_chttp2_list_flush_writing_stalled_by_transport( grpc_exec_ctx *exec_ctx, grpc_chttp2_transport_writing *transport_writing) { grpc_chttp2_stream *stream; + bool out = false; grpc_chttp2_transport *transport = TRANSPORT_FROM_WRITING(transport_writing); while (stream_list_pop(transport, &stream, GRPC_CHTTP2_LIST_WRITING_STALLED_BY_TRANSPORT)) { + gpr_log(GPR_DEBUG, "move %d from writing stalled to just stalled", + stream->global.id); grpc_chttp2_list_add_stalled_by_transport(transport_writing, &stream->writing); GRPC_CHTTP2_STREAM_UNREF(exec_ctx, &stream->global, "chttp2_writing_stalled"); + out = true; } + return out; } void grpc_chttp2_list_add_stalled_by_transport( grpc_chttp2_transport_writing *transport_writing, grpc_chttp2_stream_writing *stream_writing) { + gpr_log(GPR_DEBUG, "stalled %d", stream_writing->id); stream_list_add(TRANSPORT_FROM_WRITING(transport_writing), STREAM_FROM_WRITING(stream_writing), GRPC_CHTTP2_LIST_STALLED_BY_TRANSPORT); diff --git a/src/core/ext/transport/chttp2/transport/writing.c b/src/core/ext/transport/chttp2/transport/writing.c index cbc57d10ad3..e0d87725e9d 100644 --- a/src/core/ext/transport/chttp2/transport/writing.c +++ b/src/core/ext/transport/chttp2/transport/writing.c @@ -75,6 +75,13 @@ int grpc_chttp2_unlocking_check_writes( GRPC_CHTTP2_FLOW_MOVE_TRANSPORT("write", transport_writing, outgoing_window, transport_global, outgoing_window); + if (transport_writing->outgoing_window > 0) { + while (grpc_chttp2_list_pop_stalled_by_transport(transport_global, + &stream_global)) { + grpc_chttp2_become_writable(exec_ctx, transport_global, stream_global, + false, "transport.read_flow_control"); + } + } /* for each grpc_chttp2_stream that's become writable, frame it's data (according to available window sizes) and add to the output buffer */ @@ -328,8 +335,11 @@ void grpc_chttp2_cleanup_writing( grpc_chttp2_stream_writing *stream_writing; grpc_chttp2_stream_global *stream_global; - grpc_chttp2_list_flush_writing_stalled_by_transport(exec_ctx, - transport_writing); + if (grpc_chttp2_list_flush_writing_stalled_by_transport(exec_ctx, + transport_writing)) { + grpc_chttp2_initiate_write(exec_ctx, transport_global, false, + "resume_stalled_stream"); + } while (grpc_chttp2_list_pop_written_stream( transport_global, transport_writing, &stream_global, &stream_writing)) { diff --git a/test/cpp/end2end/end2end_test.cc b/test/cpp/end2end/end2end_test.cc index 354a59cedd5..0f87ae3e440 100644 --- a/test/cpp/end2end/end2end_test.cc +++ b/test/cpp/end2end/end2end_test.cc @@ -1166,6 +1166,9 @@ TEST_P(ProxyEnd2endTest, HugeResponse) { request.mutable_param()->set_response_message_length(kResponseSize); ClientContext context; + std::chrono::system_clock::time_point deadline = + std::chrono::system_clock::now() + std::chrono::seconds(20); + context.set_deadline(deadline); Status s = stub_->Echo(&context, request, &response); EXPECT_EQ(kResponseSize, response.message().size()); EXPECT_TRUE(s.ok()); From 8e8027bad6c4b4720a27e29178a1431fc069f86a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 7 Jul 2016 10:42:09 -0700 Subject: [PATCH 1505/1894] clang-format --- src/core/ext/transport/chttp2/transport/parsing.c | 4 ++-- src/core/lib/iomgr/ev_epoll_linux.c | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index a8ce1db8477..fbb44ec54ab 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -87,8 +87,8 @@ void grpc_chttp2_prepare_to_read( transport_global->settings[GRPC_SENT_SETTINGS], sizeof(transport_parsing->last_sent_settings)); transport_parsing->max_frame_size = - transport_global - ->settings[GRPC_ACKED_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; + transport_global->settings[GRPC_ACKED_SETTINGS] + [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; /* update the parsing view of incoming window */ while (grpc_chttp2_list_pop_unannounced_incoming_window_available( diff --git a/src/core/lib/iomgr/ev_epoll_linux.c b/src/core/lib/iomgr/ev_epoll_linux.c index 0e6cba7e4fe..4282d01a2bf 100644 --- a/src/core/lib/iomgr/ev_epoll_linux.c +++ b/src/core/lib/iomgr/ev_epoll_linux.c @@ -1548,7 +1548,7 @@ retry: * polling_island fields in both fd and pollset to point to the merged * polling island. */ - + if (fd->orphaned) { gpr_mu_unlock(&fd->mu); gpr_mu_unlock(&pollset->mu); From cbff48224916f1a38c3ecc33ddb500a78a3797aa Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 7 Jul 2016 11:00:01 -0700 Subject: [PATCH 1506/1894] Reduce default max message size --- src/core/lib/surface/channel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/core/lib/surface/channel.c b/src/core/lib/surface/channel.c index 2cf6d8890a3..6d2b1c49352 100644 --- a/src/core/lib/surface/channel.c +++ b/src/core/lib/surface/channel.c @@ -81,7 +81,7 @@ struct grpc_channel { CHANNEL_FROM_CHANNEL_STACK(grpc_channel_stack_from_top_element(top_elem)) /* the protobuf library will (by default) start warning at 100megs */ -#define DEFAULT_MAX_MESSAGE_LENGTH (100 * 1024 * 1024) +#define DEFAULT_MAX_MESSAGE_LENGTH (4 * 1024 * 1024) static void destroy_channel(grpc_exec_ctx *exec_ctx, void *arg, grpc_error *error); From ceb1a7d79f04bcee8c153b43fbe8bef408160537 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Thu, 7 Jul 2016 11:06:04 -0700 Subject: [PATCH 1507/1894] Add more information so that we can have a meaningful exit code --- src/proto/grpc/testing/control.proto | 3 +++ test/cpp/qps/driver.cc | 8 ++++++-- test/cpp/qps/driver.h | 2 +- test/cpp/qps/qps_json_driver.cc | 18 +++++++++++++----- 4 files changed, 23 insertions(+), 8 deletions(-) diff --git a/src/proto/grpc/testing/control.proto b/src/proto/grpc/testing/control.proto index 20496a8116b..ece69108158 100644 --- a/src/proto/grpc/testing/control.proto +++ b/src/proto/grpc/testing/control.proto @@ -229,4 +229,7 @@ message ScenarioResult { repeated int32 server_cores = 5; // An after-the-fact computed summary ScenarioResultSummary summary = 6; + // Information on success or failure of each worker + repeated bool client_success = 7; + repeated bool server_success = 8; } diff --git a/test/cpp/qps/driver.cc b/test/cpp/qps/driver.cc index ba38de76f31..7f12ee9c0e4 100644 --- a/test/cpp/qps/driver.cc +++ b/test/cpp/qps/driver.cc @@ -436,6 +436,7 @@ std::unique_ptr RunScenario( for (size_t i = 0; i < num_clients; i++) { auto client = &clients[i]; Status s = client->stream->Finish(); + result->add_client_success(s.ok()); if (!s.ok()) { gpr_log(GPR_ERROR, "Client %zu had an error %s", i, s.error_message().c_str()); @@ -471,6 +472,7 @@ std::unique_ptr RunScenario( for (size_t i = 0; i < num_servers; i++) { auto server = &servers[i]; Status s = server->stream->Finish(); + result->add_server_success(s.ok()); if (!s.ok()) { gpr_log(GPR_ERROR, "Server %zu had an error %s", i, s.error_message().c_str()); @@ -483,8 +485,9 @@ std::unique_ptr RunScenario( return result; } -void RunQuit() { +bool RunQuit() { // Get client, server lists + bool result = true; auto workers = get_workers("QPS_WORKERS"); for (size_t i = 0; i < workers.size(); i++) { auto stub = WorkerService::NewStub( @@ -496,9 +499,10 @@ void RunQuit() { if (!s.ok()) { gpr_log(GPR_ERROR, "Worker %zu could not be properly quit because %s", i, s.error_message().c_str()); - GPR_ASSERT(false); + result = false; } } + return result; } } // namespace testing diff --git a/test/cpp/qps/driver.h b/test/cpp/qps/driver.h index 3a5cf138f11..93f4370cafa 100644 --- a/test/cpp/qps/driver.h +++ b/test/cpp/qps/driver.h @@ -47,7 +47,7 @@ std::unique_ptr RunScenario( const grpc::testing::ServerConfig& server_config, size_t num_servers, int warmup_seconds, int benchmark_seconds, int spawn_local_worker_count); -void RunQuit(); +bool RunQuit(); } // namespace testing } // namespace grpc diff --git a/test/cpp/qps/qps_json_driver.cc b/test/cpp/qps/qps_json_driver.cc index f5d739f893a..1524ebbc389 100644 --- a/test/cpp/qps/qps_json_driver.cc +++ b/test/cpp/qps/qps_json_driver.cc @@ -53,7 +53,7 @@ DEFINE_bool(quit, false, "Quit the workers"); namespace grpc { namespace testing { -static void QpsDriver() { +static bool QpsDriver() { grpc::string json; bool scfile = (FLAGS_scenarios_file != ""); @@ -81,13 +81,13 @@ static void QpsDriver() { } else if (scjson) { json = FLAGS_scenarios_json.c_str(); } else if (FLAGS_quit) { - RunQuit(); - return; + return RunQuit(); } // Parse into an array of scenarios Scenarios scenarios; ParseJson(json.c_str(), "grpc.testing.Scenarios", &scenarios); + bool success = true; // Make sure that there is at least some valid scenario here GPR_ASSERT(scenarios.scenarios_size() > 0); @@ -109,7 +109,15 @@ static void QpsDriver() { GetReporter()->ReportQPSPerCore(*result); GetReporter()->ReportLatency(*result); GetReporter()->ReportTimes(*result); + + for (int i = 0; success && i < result->client_success_size(); i++) { + success = result->client_success(i); + } + for (int i = 0; success && i < result->server_success_size(); i++) { + success = result->server_success(i); + } } + return success; } } // namespace testing @@ -118,7 +126,7 @@ static void QpsDriver() { int main(int argc, char **argv) { grpc::testing::InitBenchmark(&argc, &argv, true); - grpc::testing::QpsDriver(); + bool ok = grpc::testing::QpsDriver(); - return 0; + return ok ? 0 : 1; } From 256cc7aa034f038f8e82f3e278ca61b64252693b Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 7 Jul 2016 11:09:49 -0700 Subject: [PATCH 1508/1894] Support server reflection in CLI --- Makefile | 8 ++-- build.yaml | 4 ++ test/cpp/util/grpc_cli.cc | 44 ++++++++++--------- test/cpp/util/proto_file_parser.cc | 42 ++++++++++++++++-- test/cpp/util/proto_file_parser.h | 11 +++++ .../proto_reflection_descriptor_database.cc | 12 ++++- tools/run_tests/sources_and_headers.json | 8 +++- .../grpc_cli_libs/grpc_cli_libs.vcxproj | 3 ++ .../grpc_cli_libs.vcxproj.filters | 6 +++ .../vcxproj/test/grpc_cli/grpc_cli.vcxproj | 3 ++ 10 files changed, 111 insertions(+), 30 deletions(-) diff --git a/Makefile b/Makefile index 70119963711..6ba584cbdc5 100644 --- a/Makefile +++ b/Makefile @@ -4140,6 +4140,7 @@ endif LIBGRPC_CLI_LIBS_SRC = \ test/cpp/util/cli_call.cc \ test/cpp/util/proto_file_parser.cc \ + test/cpp/util/proto_reflection_descriptor_database.cc \ PUBLIC_HEADERS_CXX += \ @@ -11079,16 +11080,16 @@ $(BINDIR)/$(CONFIG)/grpc_cli: protobuf_dep_error else -$(BINDIR)/$(CONFIG)/grpc_cli: $(PROTOBUF_DEP) $(GRPC_CLI_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a +$(BINDIR)/$(CONFIG)/grpc_cli: $(PROTOBUF_DEP) $(GRPC_CLI_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) $(GRPC_CLI_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/grpc_cli + $(Q) $(LDXX) $(LDFLAGS) $(GRPC_CLI_OBJS) $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a $(LDLIBSXX) $(LDLIBS_PROTOBUF) $(LDLIBS) $(LDLIBS_SECURE) $(GTEST_LIB) -o $(BINDIR)/$(CONFIG)/grpc_cli endif endif -$(OBJDIR)/$(CONFIG)/test/cpp/util/grpc_cli.o: $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a +$(OBJDIR)/$(CONFIG)/test/cpp/util/grpc_cli.o: $(LIBDIR)/$(CONFIG)/libgrpc_cli_libs.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc_test_util.a $(LIBDIR)/$(CONFIG)/libgrpc++_reflection.a $(LIBDIR)/$(CONFIG)/libgrpc++.a $(LIBDIR)/$(CONFIG)/libgrpc.a $(LIBDIR)/$(CONFIG)/libgpr_test_util.a $(LIBDIR)/$(CONFIG)/libgpr.a $(LIBDIR)/$(CONFIG)/libgrpc++_test_config.a deps_grpc_cli: $(GRPC_CLI_OBJS:.o=.dep) @@ -15002,6 +15003,7 @@ test/cpp/util/byte_buffer_proto_helper.cc: $(OPENSSL_DEP) test/cpp/util/cli_call.cc: $(OPENSSL_DEP) test/cpp/util/create_test_channel.cc: $(OPENSSL_DEP) test/cpp/util/proto_file_parser.cc: $(OPENSSL_DEP) +test/cpp/util/proto_reflection_descriptor_database.cc: $(OPENSSL_DEP) test/cpp/util/string_ref_helper.cc: $(OPENSSL_DEP) test/cpp/util/subprocess.cc: $(OPENSSL_DEP) test/cpp/util/test_config.cc: $(OPENSSL_DEP) diff --git a/build.yaml b/build.yaml index 1c485fd5c9e..8fabaad7747 100644 --- a/build.yaml +++ b/build.yaml @@ -1028,10 +1028,13 @@ libs: headers: - test/cpp/util/cli_call.h - test/cpp/util/proto_file_parser.h + - test/cpp/util/proto_reflection_descriptor_database.h src: - test/cpp/util/cli_call.cc - test/cpp/util/proto_file_parser.cc + - test/cpp/util/proto_reflection_descriptor_database.cc deps: + - grpc++_reflection - grpc++ - grpc_plugin_support - name: grpc_plugin_support @@ -2669,6 +2672,7 @@ targets: - grpc_cli_libs - grpc++_test_util - grpc_test_util + - grpc++_reflection - grpc++ - grpc - gpr_test_util diff --git a/test/cpp/util/grpc_cli.cc b/test/cpp/util/grpc_cli.cc index c52e48bae65..71470e5214f 100644 --- a/test/cpp/util/grpc_cli.cc +++ b/test/cpp/util/grpc_cli.cc @@ -86,6 +86,7 @@ DEFINE_string(output_binary_file, "", DEFINE_string(metadata, "", "Metadata to send to server, in the form of key1:val1:key2:val2"); DEFINE_string(proto_path, ".", "Path to look for the proto file."); +DEFINE_string(proto_file, "", "Name of the proto file."); void ParseMetadataFlag( std::multimap* client_metadata) { @@ -129,31 +130,47 @@ void PrintMetadata(const T& m, const grpc::string& message) { int main(int argc, char** argv) { grpc::testing::InitTest(&argc, &argv, true); - if (argc < 4 || argc == 5 || grpc::string(argv[1]) != "call") { + if (argc < 4 || grpc::string(argv[1]) != "call") { std::cout << "Usage: grpc_cli call server_host:port method_name " << "[proto file] [text format request] []" << std::endl; + return 1; } - grpc::string file_name; grpc::string request_text; grpc::string server_address(argv[2]); grpc::string method_name(argv[3]); std::unique_ptr parser; grpc::string serialized_request_proto; - if (argc == 6) { - file_name = argv[4]; + if (argc == 5) { // TODO(yangg) read from stdin as well? - request_text = argv[5]; + request_text = argv[4]; } + std::shared_ptr creds; + if (!FLAGS_enable_ssl) { + creds = grpc::InsecureChannelCredentials(); + } else { + if (FLAGS_use_auth) { + creds = grpc::GoogleDefaultCredentials(); + } else { + creds = grpc::SslCredentials(grpc::SslCredentialsOptions()); + } + } + std::shared_ptr channel = + grpc::CreateChannel(server_address, creds); + if (request_text.empty() && FLAGS_input_binary_file.empty()) { std::cout << "Missing input. Use text format input or " << "--input_binary_file for serialized request" << std::endl; return 1; } else if (!request_text.empty()) { - parser.reset(new grpc::testing::ProtoFileParser(FLAGS_proto_path, file_name, - method_name)); + if (!FLAGS_proto_file.empty()) { + parser.reset(new grpc::testing::ProtoFileParser( + FLAGS_proto_path, FLAGS_proto_file, method_name)); + } else { + parser.reset(new grpc::testing::ProtoFileParser(channel, method_name)); + } method_name = parser->GetFullMethodName(); if (parser->HasError()) { return 1; @@ -175,19 +192,6 @@ int main(int argc, char** argv) { } std::cout << "connecting to " << server_address << std::endl; - std::shared_ptr creds; - if (!FLAGS_enable_ssl) { - creds = grpc::InsecureChannelCredentials(); - } else { - if (FLAGS_use_auth) { - creds = grpc::GoogleDefaultCredentials(); - } else { - creds = grpc::SslCredentials(grpc::SslCredentialsOptions()); - } - } - std::shared_ptr channel = - grpc::CreateChannel(server_address, creds); - grpc::string serialized_response_proto; std::multimap client_metadata; std::multimap server_initial_metadata, diff --git a/test/cpp/util/proto_file_parser.cc b/test/cpp/util/proto_file_parser.cc index 25aec329eb3..2ac19858bf7 100644 --- a/test/cpp/util/proto_file_parser.cc +++ b/test/cpp/util/proto_file_parser.cc @@ -95,9 +95,45 @@ ProtoFileParser::ProtoFileParser(const grpc::string& proto_path, dynamic_factory_.reset( new google::protobuf::DynamicMessageFactory(importer_->pool())); + std::vector service_desc_list; + for (int i = 0; i < file_desc->service_count(); i++) { + service_desc_list.push_back(file_desc->service(i)); + } + InitProtoFileParser(method, service_desc_list); +} + +ProtoFileParser::ProtoFileParser(std::shared_ptr channel, + const grpc::string& method) + : has_error_(false), + desc_db_(new grpc::ProtoReflectionDescriptorDatabase(channel)), + desc_pool_(new google::protobuf::DescriptorPool(desc_db_.get())) { + std::vector service_list; + if (!desc_db_->GetServices(&service_list)) { + LogError("Failed to get services"); + } + if (has_error_) { + return; + } + dynamic_factory_.reset( + new google::protobuf::DynamicMessageFactory(desc_pool_.get())); + + std::vector service_desc_list; + for (auto it = service_list.begin(); it != service_list.end(); it++) { + service_desc_list.push_back(desc_pool_->FindServiceByName(*it)); + } + InitProtoFileParser(method, service_desc_list); +} + +ProtoFileParser::~ProtoFileParser() {} + +void ProtoFileParser::InitProtoFileParser( + const grpc::string& method, + const std::vector + service_desc_list) { const google::protobuf::MethodDescriptor* method_descriptor = nullptr; - for (int i = 0; !method_descriptor && i < file_desc->service_count(); i++) { - const auto* service_desc = file_desc->service(i); + for (auto it = service_desc_list.begin(); it != service_desc_list.end(); + it++) { + const auto* service_desc = *it; for (int j = 0; j < service_desc->method_count(); j++) { const auto* method_desc = service_desc->method(j); if (MethodNameMatch(method_desc->full_name(), method)) { @@ -130,8 +166,6 @@ ProtoFileParser::ProtoFileParser(const grpc::string& proto_path, dynamic_factory_->GetPrototype(method_descriptor->output_type())->New()); } -ProtoFileParser::~ProtoFileParser() {} - grpc::string ProtoFileParser::GetSerializedProto( const grpc::string& text_format_proto, bool is_request) { grpc::string serialized; diff --git a/test/cpp/util/proto_file_parser.h b/test/cpp/util/proto_file_parser.h index 46cdd665038..b442d77db98 100644 --- a/test/cpp/util/proto_file_parser.h +++ b/test/cpp/util/proto_file_parser.h @@ -38,8 +38,10 @@ #include #include +#include #include "src/compiler/config.h" +#include "test/cpp/util/proto_reflection_descriptor_database.h" namespace grpc { namespace testing { @@ -53,6 +55,9 @@ class ProtoFileParser { // even just Method. It will log an error if there is ambiguity. ProtoFileParser(const grpc::string& proto_path, const grpc::string& file_name, const grpc::string& method); + + ProtoFileParser(std::shared_ptr channel, + const grpc::string& method); ~ProtoFileParser(); grpc::string GetFullMethodName() const { return full_method_name_; } @@ -68,12 +73,18 @@ class ProtoFileParser { void LogError(const grpc::string& error_msg); private: + void InitProtoFileParser( + const grpc::string& method, + const std::vector services); + bool has_error_; grpc::string request_text_; grpc::string full_method_name_; google::protobuf::compiler::DiskSourceTree source_tree_; std::unique_ptr error_printer_; std::unique_ptr importer_; + std::unique_ptr desc_db_; + std::unique_ptr desc_pool_; std::unique_ptr dynamic_factory_; std::unique_ptr request_prototype_; std::unique_ptr response_prototype_; diff --git a/test/cpp/util/proto_reflection_descriptor_database.cc b/test/cpp/util/proto_reflection_descriptor_database.cc index 25b720aee0a..48998551a59 100644 --- a/test/cpp/util/proto_reflection_descriptor_database.cc +++ b/test/cpp/util/proto_reflection_descriptor_database.cc @@ -53,7 +53,17 @@ ProtoReflectionDescriptorDatabase::ProtoReflectionDescriptorDatabase( std::shared_ptr channel) : stub_(ServerReflection::NewStub(channel)) {} -ProtoReflectionDescriptorDatabase::~ProtoReflectionDescriptorDatabase() {} +ProtoReflectionDescriptorDatabase::~ProtoReflectionDescriptorDatabase() { + if (!stream_) { + GetStream()->WritesDone(); + Status status = stream_->Finish(); + if (!status.ok()) { + gpr_log(GPR_ERROR, + "ServerReflectionInfo rpc failed. Error code: %d, details: %s", + (int)status.error_code(), status.error_message().c_str()); + } + } +} bool ProtoReflectionDescriptorDatabase::FindFileByName( const string& filename, google::protobuf::FileDescriptorProto* output) { diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 6d7cfdaf233..86383fa0ccc 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -2149,6 +2149,7 @@ "gpr_test_util", "grpc", "grpc++", + "grpc++_reflection", "grpc++_test_config", "grpc++_test_util", "grpc_cli_libs", @@ -4479,7 +4480,8 @@ ], "headers": [ "test/cpp/util/cli_call.h", - "test/cpp/util/proto_file_parser.h" + "test/cpp/util/proto_file_parser.h", + "test/cpp/util/proto_reflection_descriptor_database.h" ], "language": "c++", "name": "grpc_cli_libs", @@ -4487,7 +4489,9 @@ "test/cpp/util/cli_call.cc", "test/cpp/util/cli_call.h", "test/cpp/util/proto_file_parser.cc", - "test/cpp/util/proto_file_parser.h" + "test/cpp/util/proto_file_parser.h", + "test/cpp/util/proto_reflection_descriptor_database.cc", + "test/cpp/util/proto_reflection_descriptor_database.h" ], "third_party": false, "type": "lib" diff --git a/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj b/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj index 39cb1e0cb58..03c82f686cc 100644 --- a/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj +++ b/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj @@ -149,12 +149,15 @@ + + + diff --git a/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj.filters b/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj.filters index 55ef18bf306..4add8ed5e13 100644 --- a/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj.filters +++ b/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj.filters @@ -7,6 +7,9 @@ test\cpp\util + + test\cpp\util + @@ -15,6 +18,9 @@ test\cpp\util + + test\cpp\util + diff --git a/vsprojects/vcxproj/test/grpc_cli/grpc_cli.vcxproj b/vsprojects/vcxproj/test/grpc_cli/grpc_cli.vcxproj index cd844d15794..9c8cdc54c25 100644 --- a/vsprojects/vcxproj/test/grpc_cli/grpc_cli.vcxproj +++ b/vsprojects/vcxproj/test/grpc_cli/grpc_cli.vcxproj @@ -173,6 +173,9 @@ {17BCAFC0-5FDC-4C94-AEB9-95F3E220614B} + + {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB} + {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} From 590092ba28d96ce5107b4e588654af77e414d0fd Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 7 Jul 2016 11:30:10 -0700 Subject: [PATCH 1509/1894] Fix windows compilation --- src/core/lib/iomgr/network_status_tracker.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/lib/iomgr/network_status_tracker.c b/src/core/lib/iomgr/network_status_tracker.c index d3f0ea53f87..ccbe136db92 100644 --- a/src/core/lib/iomgr/network_status_tracker.c +++ b/src/core/lib/iomgr/network_status_tracker.c @@ -44,7 +44,7 @@ static endpoint_ll_node *head = NULL; static gpr_mu g_endpoint_mutex; static gpr_once g_once_init = GPR_ONCE_INIT; -static void destroy_network_status_monitor() { +static void destroy_network_status_monitor(void) { if (head != NULL) { gpr_log(GPR_ERROR, "Memory leaked as all network endpoints were not shut down"); @@ -52,7 +52,7 @@ static void destroy_network_status_monitor() { gpr_mu_destroy(&g_endpoint_mutex); } -static void initialize_network_status_monitor() { +static void initialize_network_status_monitor(void) { gpr_mu_init(&g_endpoint_mutex); atexit(destroy_network_status_monitor); // TODO(makarandd): Install callback with OS to monitor network status. From c24e0ee4f00a348a2f9948c820cf08be813c5f8a Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 7 Jul 2016 11:32:25 -0700 Subject: [PATCH 1510/1894] Update docs --- test/cpp/util/grpc_cli.cc | 21 ++++++++++++--------- test/cpp/util/proto_file_parser.cc | 7 +++++-- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/test/cpp/util/grpc_cli.cc b/test/cpp/util/grpc_cli.cc index 71470e5214f..1a9662694ac 100644 --- a/test/cpp/util/grpc_cli.cc +++ b/test/cpp/util/grpc_cli.cc @@ -34,18 +34,21 @@ /* A command line tool to talk to a grpc server. Example of talking to grpc interop server: - grpc_cli call localhost:50051 UnaryCall src/proto/grpc/testing/test.proto \ - "response_size:10" --enable_ssl=false + grpc_cli call localhost:50051 UnaryCall "response_size:10" \ + --proto_file=src/proto/grpc/testing/test.prot --enable_ssl=false Options: - 1. --proto_path, if your proto file is not under current working directory, + 1. --proto_file, use this flag to provide a proto file if the server does + does not have the reflection service. + 2. --proto_path, if your proto file is not under current working directory, use this flag to provide a search root. It should work similar to the - counterpart in protoc. - 2. --metadata specifies metadata to be sent to the server, such as: + counterpart in protoc. This option is valid only when proto_file is + provided. + 3. --metadata specifies metadata to be sent to the server, such as: --metadata="MyHeaderKey1:Value1:MyHeaderKey2:Value2" - 3. --enable_ssl, whether to use tls. - 4. --use_auth, if set to true, attach a GoogleDefaultCredentials to the call - 3. --input_binary_file, a file containing the serialized request. The file + 4. --enable_ssl, whether to use tls. + 5. --use_auth, if set to true, attach a GoogleDefaultCredentials to the call + 6. --input_binary_file, a file containing the serialized request. The file can be generated by calling something like: protoc --proto_path=src/proto/grpc/testing/ \ --encode=grpc.testing.SimpleRequest \ @@ -53,7 +56,7 @@ < input.txt > input.bin If this is used and no proto file is provided in the argument list, the method string has to be exact in the form of /package.service/method. - 4. --output_binary_file, a file to write binary format response into, it can + 7. --output_binary_file, a file to write binary format response into, it can be later decoded using protoc: protoc --proto_path=src/proto/grpc/testing/ \ --decode=grpc.testing.SimpleResponse \ diff --git a/test/cpp/util/proto_file_parser.cc b/test/cpp/util/proto_file_parser.cc index 2ac19858bf7..b1bf0471e15 100644 --- a/test/cpp/util/proto_file_parser.cc +++ b/test/cpp/util/proto_file_parser.cc @@ -109,7 +109,10 @@ ProtoFileParser::ProtoFileParser(std::shared_ptr channel, desc_pool_(new google::protobuf::DescriptorPool(desc_db_.get())) { std::vector service_list; if (!desc_db_->GetServices(&service_list)) { - LogError("Failed to get services"); + LogError( + "Failed to get services from the server, " + "it may not have the reflection service.\n" + "Please try to use the --proto_file option to provide a proto file."); } if (has_error_) { return; @@ -177,7 +180,7 @@ grpc::string ProtoFileParser::GetSerializedProto( LogError("Failed to parse text format to proto."); return ""; } - ok = request_prototype_->SerializeToString(&serialized); + ok = msg->SerializeToString(&serialized); if (!ok) { LogError("Failed to serialize proto."); return ""; From a17c8d993d3bc4867fcc9d6fcf42e6bfff9c9cd8 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 7 Jul 2016 11:40:05 -0700 Subject: [PATCH 1511/1894] Fix typos --- test/cpp/util/grpc_cli.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/cpp/util/grpc_cli.cc b/test/cpp/util/grpc_cli.cc index 1a9662694ac..7c8e2cdc639 100644 --- a/test/cpp/util/grpc_cli.cc +++ b/test/cpp/util/grpc_cli.cc @@ -35,7 +35,7 @@ A command line tool to talk to a grpc server. Example of talking to grpc interop server: grpc_cli call localhost:50051 UnaryCall "response_size:10" \ - --proto_file=src/proto/grpc/testing/test.prot --enable_ssl=false + --proto_file=src/proto/grpc/testing/test.proto --enable_ssl=false Options: 1. --proto_file, use this flag to provide a proto file if the server does From fbf03c17355e65255862e91a938f4f5cfbcee51a Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Thu, 7 Jul 2016 13:10:09 -0700 Subject: [PATCH 1512/1894] Fix high seqno tests, up runtimes for benchmark tests to flush more bugs --- src/core/lib/transport/connectivity_state.c | 3 ++ test/core/end2end/tests/high_initial_seqno.c | 6 ++++ test/cpp/qps/gen_build_yaml.py | 2 +- tools/run_tests/tests.json | 32 ++++++++++---------- 4 files changed, 26 insertions(+), 17 deletions(-) diff --git a/src/core/lib/transport/connectivity_state.c b/src/core/lib/transport/connectivity_state.c index 054f112127b..68d05e3a858 100644 --- a/src/core/lib/transport/connectivity_state.c +++ b/src/core/lib/transport/connectivity_state.c @@ -179,6 +179,9 @@ void grpc_connectivity_state_set(grpc_exec_ctx *exec_ctx, while ((w = tracker->watchers) != NULL) { *w->current = tracker->current_state; tracker->watchers = w->next; + if (grpc_connectivity_state_trace) { + gpr_log(GPR_DEBUG, "NOTIFY: %p", w->notify); + } grpc_exec_ctx_sched(exec_ctx, w->notify, GRPC_ERROR_REF(tracker->current_error), NULL); gpr_free(w); diff --git a/test/core/end2end/tests/high_initial_seqno.c b/test/core/end2end/tests/high_initial_seqno.c index 50e3c9cb898..db45f5eb5ad 100644 --- a/test/core/end2end/tests/high_initial_seqno.c +++ b/test/core/end2end/tests/high_initial_seqno.c @@ -203,6 +203,12 @@ static void simple_request_body(grpc_end2end_test_fixture f) { grpc_call_destroy(c); grpc_call_destroy(s); + /* TODO(ctiller): this rate limits the test, and it should be removed when + retry has been implemented; until then cross-thread chatter + may result in some requests needing to be cancelled due to + seqno exhaustion. */ + cq_verify_empty(cqv); + cq_verifier_destroy(cqv); } diff --git a/test/cpp/qps/gen_build_yaml.py b/test/cpp/qps/gen_build_yaml.py index 34b81514411..255968256e3 100755 --- a/test/cpp/qps/gen_build_yaml.py +++ b/test/cpp/qps/gen_build_yaml.py @@ -46,7 +46,7 @@ import performance.scenario_config as scenario_config def _scenario_json_string(scenario_json): # tweak parameters to get fast test times scenario_json['warmup_seconds'] = 1 - scenario_json['benchmark_seconds'] = 1 + scenario_json['benchmark_seconds'] = 10 return json.dumps(scenario_config.remove_nonproto_fields(scenario_json)) def threads_of_type(scenario_json, path): diff --git a/tools/run_tests/tests.json b/tools/run_tests/tests.json index 9c38b7e47af..71641cebc95 100644 --- a/tools/run_tests/tests.json +++ b/tools/run_tests/tests.json @@ -27135,7 +27135,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_generic_async_streaming_ping_pong_secure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_generic_async_streaming_ping_pong_secure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 10, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -27161,7 +27161,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_streaming_ping_pong_secure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_protobuf_async_streaming_ping_pong_secure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 10, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -27187,7 +27187,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_unary_ping_pong_secure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_protobuf_async_unary_ping_pong_secure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 10, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -27213,7 +27213,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_sync_unary_ping_pong_secure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_protobuf_sync_unary_ping_pong_secure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 10, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -27239,7 +27239,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_secure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_secure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 10, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -27265,7 +27265,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 10, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -27291,7 +27291,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_secure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 10, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -27317,7 +27317,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_secure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_secure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 10, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": {\"use_test_ca\": true, \"server_host_override\": \"foo.test.google.fr\"}, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -27343,7 +27343,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_generic_async_streaming_ping_pong_insecure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_generic_async_streaming_ping_pong_insecure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 10, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -27369,7 +27369,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_streaming_ping_pong_insecure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_protobuf_async_streaming_ping_pong_insecure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 10, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -27395,7 +27395,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_unary_ping_pong_insecure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_protobuf_async_unary_ping_pong_insecure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 10, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -27421,7 +27421,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_sync_unary_ping_pong_insecure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" + "'{\"name\": \"cpp_protobuf_sync_unary_ping_pong_insecure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 10, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"server_type\": \"SYNC_SERVER\"}, \"client_config\": {\"client_type\": \"SYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 1, \"async_client_threads\": 1, \"outstanding_rpcs_per_channel\": 1, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 1}'" ], "boringssl": true, "ci_platforms": [ @@ -27447,7 +27447,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_insecure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_protobuf_async_unary_qps_unconstrained_insecure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 10, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"UNARY\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -27473,7 +27473,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_protobuf_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 10, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"server_type\": \"ASYNC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"simple_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -27499,7 +27499,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_generic_async_streaming_qps_unconstrained_insecure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 10, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 0, \"core_limit\": 0, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ @@ -27525,7 +27525,7 @@ { "args": [ "--scenario_json", - "'{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_insecure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 1, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" + "'{\"name\": \"cpp_generic_async_streaming_qps_one_server_core_insecure\", \"warmup_seconds\": 1, \"benchmark_seconds\": 10, \"num_servers\": 1, \"server_config\": {\"async_server_threads\": 1, \"core_limit\": 1, \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"server_type\": \"ASYNC_GENERIC_SERVER\"}, \"client_config\": {\"client_type\": \"ASYNC_CLIENT\", \"security_params\": null, \"payload_config\": {\"bytebuf_params\": {\"resp_size\": 0, \"req_size\": 0}}, \"client_channels\": 64, \"async_client_threads\": 0, \"outstanding_rpcs_per_channel\": 100, \"rpc_type\": \"STREAMING\", \"load_params\": {\"closed_loop\": {}}, \"histogram_params\": {\"max_possible\": 60000000000.0, \"resolution\": 0.01}}, \"num_clients\": 0}'" ], "boringssl": true, "ci_platforms": [ From 39070fe3a536819708aaa4422ea912b303cbe30f Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 7 Jul 2016 13:57:12 -0700 Subject: [PATCH 1513/1894] Rerun generate_projects.sh --- tools/run_tests/sources_and_headers.json | 1 + vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj | 3 +++ 2 files changed, 4 insertions(+) diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 86383fa0ccc..141c8982667 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4476,6 +4476,7 @@ { "deps": [ "grpc++", + "grpc++_reflection", "grpc_plugin_support" ], "headers": [ diff --git a/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj b/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj index 03c82f686cc..d25c692e3e8 100644 --- a/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj +++ b/vsprojects/vcxproj/grpc_cli_libs/grpc_cli_libs.vcxproj @@ -160,6 +160,9 @@ + + {5F575402-3F89-5D1A-6910-9DB8BF5D2BAB} + {C187A093-A0FE-489D-A40A-6E33DE0F9FEB} From a6b2a5a090ff057f77976b22d854ff375883c1b9 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Thu, 7 Jul 2016 21:06:17 +0000 Subject: [PATCH 1514/1894] Make handlers optional at server construction --- src/python/grpcio/grpc/__init__.py | 16 +++++++--------- src/python/grpcio/grpc/_server.py | 2 +- .../grpcio/grpc/beta/_server_adaptations.py | 3 ++- .../tests/protoc_plugin/_python_plugin_test.py | 4 ++-- .../tests/unit/_channel_connectivity_test.py | 4 ++-- .../tests/unit/_channel_ready_future_test.py | 2 +- .../grpcio_tests/tests/unit/_compression_test.py | 3 ++- .../tests/unit/_empty_message_test.py | 3 ++- .../tests/unit/_metadata_code_details_test.py | 2 +- .../grpcio_tests/tests/unit/_metadata_test.py | 4 ++-- src/python/grpcio_tests/tests/unit/_rpc_test.py | 2 +- 11 files changed, 23 insertions(+), 22 deletions(-) diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py index b3eeaad1f73..f7d51d2df7e 100644 --- a/src/python/grpcio/grpc/__init__.py +++ b/src/python/grpcio/grpc/__init__.py @@ -1207,25 +1207,23 @@ def secure_channel(target, credentials, options=None): return _channel.Channel(target, options, credentials._credentials) -def server(generic_rpc_handlers, thread_pool, options=None): +def server(thread_pool, handlers=None): """Creates a Server with which RPCs can be serviced. - The GenericRpcHandlers passed to this function needn't be the only - GenericRpcHandlers that will be used to serve RPCs; others may be added later - by calling add_generic_rpc_handlers any time before the returned server is - started. - Args: - generic_rpc_handlers: Some number of GenericRpcHandlers that will be used - to service RPCs after the returned Server is started. thread_pool: A futures.ThreadPoolExecutor to be used by the returned Server to service RPCs. + handlers: An optional sequence of GenericRpcHandlers to be used to service + RPCs after the returned Server is started. These handlers need not be the + only handlers the returned Server will use to service RPCs; other + handlers may later be added to the returned Server by calling its + add_generic_rpc_handlers method any time before it is started. Returns: A Server with which RPCs can be serviced. """ from grpc import _server - return _server.Server(generic_rpc_handlers, thread_pool) + return _server.Server(thread_pool, () if handlers is None else handlers) ################################### __all__ ################################# diff --git a/src/python/grpcio/grpc/_server.py b/src/python/grpcio/grpc/_server.py index f4c114056fe..f8a9d5afd30 100644 --- a/src/python/grpcio/grpc/_server.py +++ b/src/python/grpcio/grpc/_server.py @@ -731,7 +731,7 @@ def _start(state): class Server(grpc.Server): - def __init__(self, generic_handlers, thread_pool): + def __init__(self, thread_pool, generic_handlers): completion_queue = cygrpc.CompletionQueue() server = cygrpc.Server() server.register_completion_queue(completion_queue) diff --git a/src/python/grpcio/grpc/beta/_server_adaptations.py b/src/python/grpcio/grpc/beta/_server_adaptations.py index 1e1f80156ac..cca4a1797a1 100644 --- a/src/python/grpcio/grpc/beta/_server_adaptations.py +++ b/src/python/grpcio/grpc/beta/_server_adaptations.py @@ -371,4 +371,5 @@ def server( _DEFAULT_POOL_SIZE if thread_pool_size is None else thread_pool_size) else: effective_thread_pool = thread_pool - return _Server(grpc.server((generic_rpc_handler,), effective_thread_pool)) + return _Server( + grpc.server(effective_thread_pool, handlers=(generic_rpc_handler,))) diff --git a/src/python/grpcio_tests/tests/protoc_plugin/_python_plugin_test.py b/src/python/grpcio_tests/tests/protoc_plugin/_python_plugin_test.py index bf09380c85b..7ca2bcff383 100644 --- a/src/python/grpcio_tests/tests/protoc_plugin/_python_plugin_test.py +++ b/src/python/grpcio_tests/tests/protoc_plugin/_python_plugin_test.py @@ -171,7 +171,7 @@ def _CreateService(): return servicer_methods.HalfDuplexCall(request_iter, context) server = grpc.server( - (), futures.ThreadPoolExecutor(max_workers=test_constants.POOL_SIZE)) + futures.ThreadPoolExecutor(max_workers=test_constants.POOL_SIZE)) getattr(service_pb2, ADD_SERVICER_TO_SERVER_IDENTIFIER)(Servicer(), server) port = server.add_insecure_port('[::]:0') server.start() @@ -192,7 +192,7 @@ def _CreateIncompleteService(): pass server = grpc.server( - (), futures.ThreadPoolExecutor(max_workers=test_constants.POOL_SIZE)) + futures.ThreadPoolExecutor(max_workers=test_constants.POOL_SIZE)) getattr(service_pb2, ADD_SERVICER_TO_SERVER_IDENTIFIER)(Servicer(), server) port = server.add_insecure_port('[::]:0') server.start() diff --git a/src/python/grpcio_tests/tests/unit/_channel_connectivity_test.py b/src/python/grpcio_tests/tests/unit/_channel_connectivity_test.py index ae8de523ecf..3c00f686cec 100644 --- a/src/python/grpcio_tests/tests/unit/_channel_connectivity_test.py +++ b/src/python/grpcio_tests/tests/unit/_channel_connectivity_test.py @@ -104,7 +104,7 @@ class ChannelConnectivityTest(unittest.TestCase): grpc.ChannelConnectivity.READY, fifth_connectivities) def test_immediately_connectable_channel_connectivity(self): - server = _server.Server((), futures.ThreadPoolExecutor(max_workers=0)) + server = _server.Server(futures.ThreadPoolExecutor(max_workers=0), ()) port = server.add_insecure_port('[::]:0') server.start() first_callback = _Callback() @@ -143,7 +143,7 @@ class ChannelConnectivityTest(unittest.TestCase): grpc.ChannelConnectivity.SHUTDOWN, fourth_connectivities) def test_reachable_then_unreachable_channel_connectivity(self): - server = _server.Server((), futures.ThreadPoolExecutor(max_workers=0)) + server = _server.Server(futures.ThreadPoolExecutor(max_workers=0), ()) port = server.add_insecure_port('[::]:0') server.start() callback = _Callback() diff --git a/src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py b/src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py index b84bc0197a9..e8982ed2ded 100644 --- a/src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py +++ b/src/python/grpcio_tests/tests/unit/_channel_ready_future_test.py @@ -78,7 +78,7 @@ class ChannelReadyFutureTest(unittest.TestCase): self.assertFalse(ready_future.running()) def test_immediately_connectable_channel_connectivity(self): - server = _server.Server((), futures.ThreadPoolExecutor(max_workers=0)) + server = _server.Server(futures.ThreadPoolExecutor(max_workers=0), ()) port = server.add_insecure_port('[::]:0') server.start() channel = grpc.insecure_channel('localhost:{}'.format(port)) diff --git a/src/python/grpcio_tests/tests/unit/_compression_test.py b/src/python/grpcio_tests/tests/unit/_compression_test.py index 9e8b8578c1e..83b91094666 100644 --- a/src/python/grpcio_tests/tests/unit/_compression_test.py +++ b/src/python/grpcio_tests/tests/unit/_compression_test.py @@ -88,7 +88,8 @@ class CompressionTest(unittest.TestCase): def setUp(self): self._server_pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY) - self._server = grpc.server((_GenericHandler(),), self._server_pool) + self._server = grpc.server( + self._server_pool, handlers=(_GenericHandler(),)) self._port = self._server.add_insecure_port('[::]:0') self._server.start() diff --git a/src/python/grpcio_tests/tests/unit/_empty_message_test.py b/src/python/grpcio_tests/tests/unit/_empty_message_test.py index 8c7d697728b..131f6e94525 100644 --- a/src/python/grpcio_tests/tests/unit/_empty_message_test.py +++ b/src/python/grpcio_tests/tests/unit/_empty_message_test.py @@ -103,7 +103,8 @@ class EmptyMessageTest(unittest.TestCase): def setUp(self): self._server_pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY) - self._server = grpc.server((_GenericHandler(),), self._server_pool) + self._server = grpc.server( + self._server_pool, handlers=(_GenericHandler(),)) port = self._server.add_insecure_port('[::]:0') self._server.start() self._channel = grpc.insecure_channel('localhost:%d' % port) diff --git a/src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py b/src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py index 0fd02d2a227..fb3e5477815 100644 --- a/src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py +++ b/src/python/grpcio_tests/tests/unit/_metadata_code_details_test.py @@ -189,7 +189,7 @@ class MetadataCodeDetailsTest(unittest.TestCase): self._servicer = _Servicer() self._server_pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY) self._server = grpc.server( - (_generic_handler(self._servicer),), self._server_pool) + self._server_pool, handlers=(_generic_handler(self._servicer),)) port = self._server.add_insecure_port('[::]:0') self._server.start() diff --git a/src/python/grpcio_tests/tests/unit/_metadata_test.py b/src/python/grpcio_tests/tests/unit/_metadata_test.py index c637a28039d..da734769299 100644 --- a/src/python/grpcio_tests/tests/unit/_metadata_test.py +++ b/src/python/grpcio_tests/tests/unit/_metadata_test.py @@ -161,8 +161,8 @@ class MetadataTest(unittest.TestCase): def setUp(self): self._server_pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY) - self._server = grpc.server((_GenericHandler(weakref.proxy(self)),), - self._server_pool) + self._server = grpc.server( + self._server_pool, handlers=(_GenericHandler(weakref.proxy(self)),)) port = self._server.add_insecure_port('[::]:0') self._server.start() self._channel = grpc.insecure_channel('localhost:%d' % port, diff --git a/src/python/grpcio_tests/tests/unit/_rpc_test.py b/src/python/grpcio_tests/tests/unit/_rpc_test.py index c70d65a6dfb..59bf240d286 100644 --- a/src/python/grpcio_tests/tests/unit/_rpc_test.py +++ b/src/python/grpcio_tests/tests/unit/_rpc_test.py @@ -184,7 +184,7 @@ class RPCTest(unittest.TestCase): self._handler = _Handler(self._control) self._server_pool = logging_pool.pool(test_constants.THREAD_CONCURRENCY) - self._server = grpc.server((), self._server_pool) + self._server = grpc.server(self._server_pool) port = self._server.add_insecure_port('[::]:0') self._server.add_generic_rpc_handlers((_GenericHandler(self._handler),)) self._server.start() From 22869a00fd19459f936ca31ea31fc3c8d16abfd7 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Thu, 7 Jul 2016 21:10:56 +0000 Subject: [PATCH 1515/1894] Composition of arbitrarily many CallCredentials --- src/python/grpcio/grpc/__init__.py | 34 +++++---- .../grpcio/grpc/_credential_composition.py | 48 +++++++++++++ src/python/grpcio_tests/tests/tests.json | 1 + .../tests/unit/_credentials_test.py | 72 +++++++++++++++++++ 4 files changed, 140 insertions(+), 15 deletions(-) create mode 100644 src/python/grpcio/grpc/_credential_composition.py create mode 100644 src/python/grpcio_tests/tests/unit/_credentials_test.py diff --git a/src/python/grpcio/grpc/__init__.py b/src/python/grpcio/grpc/__init__.py index b3eeaad1f73..0efd233d79a 100644 --- a/src/python/grpcio/grpc/__init__.py +++ b/src/python/grpcio/grpc/__init__.py @@ -1091,37 +1091,41 @@ def access_token_call_credentials(access_token): _auth.AccessTokenCallCredentials(access_token)) -def composite_call_credentials(call_credentials, additional_call_credentials): - """Compose two CallCredentials to make a new one. +def composite_call_credentials(*call_credentials): + """Compose multiple CallCredentials to make a new CallCredentials. Args: - call_credentials: A CallCredentials object. - additional_call_credentials: Another CallCredentials object to compose on - top of call_credentials. + *call_credentials: At least two CallCredentials objects. Returns: - A new CallCredentials composed of the two given CallCredentials. + A CallCredentials object composed of the given CallCredentials objects. """ + from grpc import _credential_composition + cygrpc_call_credentials = tuple( + single_call_credentials._credentials + for single_call_credentials in call_credentials) return CallCredentials( - _cygrpc.call_credentials_composite( - call_credentials._credentials, - additional_call_credentials._credentials)) + _credential_composition.call(cygrpc_call_credentials)) -def composite_channel_credentials(channel_credentials, call_credentials): - """Compose a ChannelCredentials and a CallCredentials. +def composite_channel_credentials(channel_credentials, *call_credentials): + """Compose a ChannelCredentials and one or more CallCredentials objects. Args: channel_credentials: A ChannelCredentials. - call_credentials: A CallCredentials. + *call_credentials: One or more CallCredentials objects. Returns: A ChannelCredentials composed of the given ChannelCredentials and - CallCredentials. + CallCredentials objects. """ + from grpc import _credential_composition + cygrpc_call_credentials = tuple( + single_call_credentials._credentials + for single_call_credentials in call_credentials) return ChannelCredentials( - _cygrpc.channel_credentials_composite( - channel_credentials._credentials, call_credentials._credentials)) + _credential_composition.channel( + channel_credentials._credentials, cygrpc_call_credentials)) def ssl_server_credentials( diff --git a/src/python/grpcio/grpc/_credential_composition.py b/src/python/grpcio/grpc/_credential_composition.py new file mode 100644 index 00000000000..9cb5508e27c --- /dev/null +++ b/src/python/grpcio/grpc/_credential_composition.py @@ -0,0 +1,48 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +from grpc._cython import cygrpc + + +def _call(call_credentialses): + call_credentials_iterator = iter(call_credentialses) + composition = next(call_credentials_iterator) + for additional_call_credentials in call_credentials_iterator: + composition = cygrpc.call_credentials_composite( + composition, additional_call_credentials) + return composition + + +def call(call_credentialses): + return _call(call_credentialses) + + +def channel(channel_credentials, call_credentialses): + return cygrpc.channel_credentials_composite( + channel_credentials, _call(call_credentialses)) diff --git a/src/python/grpcio_tests/tests/tests.json b/src/python/grpcio_tests/tests/tests.json index 45eb75b242c..dcaef0db1fa 100644 --- a/src/python/grpcio_tests/tests/tests.json +++ b/src/python/grpcio_tests/tests/tests.json @@ -12,6 +12,7 @@ "_channel_test.ChannelTest", "_compression_test.CompressionTest", "_connectivity_channel_test.ConnectivityStatesTest", + "_credentials_test.CredentialsTest", "_empty_message_test.EmptyMessageTest", "_exit_test.ExitTest", "_face_interface_test.DynamicInvokerBlockingInvocationInlineServiceTest", diff --git a/src/python/grpcio_tests/tests/unit/_credentials_test.py b/src/python/grpcio_tests/tests/unit/_credentials_test.py new file mode 100644 index 00000000000..87af85a0b9b --- /dev/null +++ b/src/python/grpcio_tests/tests/unit/_credentials_test.py @@ -0,0 +1,72 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""Tests of credentials.""" + +import unittest + +import grpc + + +class CredentialsTest(unittest.TestCase): + + def test_call_credentials_composition(self): + first = grpc.access_token_call_credentials('abc') + second = grpc.access_token_call_credentials('def') + third = grpc.access_token_call_credentials('ghi') + + first_and_second = grpc.composite_call_credentials(first, second) + first_second_and_third = grpc.composite_call_credentials( + first, second, third) + + self.assertIsInstance(first_and_second, grpc.CallCredentials) + self.assertIsInstance(first_second_and_third, grpc.CallCredentials) + + def test_channel_credentials_composition(self): + first_call_credentials = grpc.access_token_call_credentials('abc') + second_call_credentials = grpc.access_token_call_credentials('def') + third_call_credentials = grpc.access_token_call_credentials('ghi') + channel_credentials = grpc.ssl_channel_credentials() + + channel_and_first = grpc.composite_channel_credentials( + channel_credentials, first_call_credentials) + channel_first_and_second = grpc.composite_channel_credentials( + channel_credentials, first_call_credentials, second_call_credentials) + channel_first_second_and_third = grpc.composite_channel_credentials( + channel_credentials, first_call_credentials, second_call_credentials, + third_call_credentials) + + self.assertIsInstance(channel_and_first, grpc.ChannelCredentials) + self.assertIsInstance(channel_first_and_second, grpc.ChannelCredentials) + self.assertIsInstance( + channel_first_second_and_third, grpc.ChannelCredentials) + + +if __name__ == '__main__': + unittest.main(verbosity=2) From 1c58bd221da3f67cc612149b99a7efe49bb884cb Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 7 Jul 2016 14:17:32 -0700 Subject: [PATCH 1516/1894] Enable server reflection in c++ examples --- examples/cpp/helloworld/Makefile | 4 +++- examples/cpp/route_guide/Makefile | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/examples/cpp/helloworld/Makefile b/examples/cpp/helloworld/Makefile index 780e5e427a7..a632f1b1262 100644 --- a/examples/cpp/helloworld/Makefile +++ b/examples/cpp/helloworld/Makefile @@ -32,7 +32,9 @@ CXX = g++ CPPFLAGS += -I/usr/local/include -pthread CXXFLAGS += -std=c++11 -LDFLAGS += -L/usr/local/lib `pkg-config --libs grpc++ grpc` -lprotobuf -lpthread -ldl +LDFLAGS += -L/usr/local/lib `pkg-config --libs grpc++ grpc` \ + -Wl,--no-as-needed -lgrpc++_reflection -Wl,--as-needed \ + -lprotobuf -lpthread -ldl PROTOC = protoc GRPC_CPP_PLUGIN = grpc_cpp_plugin GRPC_CPP_PLUGIN_PATH ?= `which $(GRPC_CPP_PLUGIN)` diff --git a/examples/cpp/route_guide/Makefile b/examples/cpp/route_guide/Makefile index 11f2a00cc89..237152ecd32 100644 --- a/examples/cpp/route_guide/Makefile +++ b/examples/cpp/route_guide/Makefile @@ -32,7 +32,9 @@ CXX = g++ CPPFLAGS += -I/usr/local/include -pthread CXXFLAGS += -std=c++11 -LDFLAGS += -L/usr/local/lib `pkg-config --libs grpc++` -lprotobuf -lpthread -ldl +LDFLAGS += -L/usr/local/lib `pkg-config --libs grpc++` \ + -Wl,--no-as-needed -lgrpc++_reflection -Wl,--as-needed \ + -lprotobuf -lpthread -ldl PROTOC = protoc GRPC_CPP_PLUGIN = grpc_cpp_plugin GRPC_CPP_PLUGIN_PATH ?= `which $(GRPC_CPP_PLUGIN)` From b156671023197b2aa015325365a0e6723fdf8b44 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Thu, 7 Jul 2016 15:16:03 -0700 Subject: [PATCH 1517/1894] Change cancelled to cancelled? --- src/ruby/lib/grpc/generic/active_call.rb | 8 ++++---- src/ruby/pb/test/client.rb | 4 ++-- src/ruby/spec/generic/active_call_spec.rb | 4 ++-- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/ruby/lib/grpc/generic/active_call.rb b/src/ruby/lib/grpc/generic/active_call.rb index a3ac0d48a3b..6e411a2b941 100644 --- a/src/ruby/lib/grpc/generic/active_call.rb +++ b/src/ruby/lib/grpc/generic/active_call.rb @@ -120,7 +120,7 @@ module GRPC end # cancelled indicates if the call was cancelled - def cancelled + def cancelled? !@call.status.nil? && @call.status.code == Core::StatusCodes::CANCELLED end @@ -455,17 +455,17 @@ module GRPC # SingleReqView limits access to an ActiveCall's methods for use in server # handlers that receive just one request. - SingleReqView = view_class(:cancelled, :deadline, :metadata, + SingleReqView = view_class(:cancelled?, :deadline, :metadata, :output_metadata, :peer, :peer_cert) # MultiReqView limits access to an ActiveCall's methods for use in # server client_streamer handlers. - MultiReqView = view_class(:cancelled, :deadline, :each_queued_msg, + MultiReqView = view_class(:cancelled?, :deadline, :each_queued_msg, :each_remote_read, :metadata, :output_metadata) # Operation limits access to an ActiveCall's methods for use as # a Operation on the client. - Operation = view_class(:cancel, :cancelled, :deadline, :execute, + Operation = view_class(:cancel, :cancelled?, :deadline, :execute, :metadata, :status, :start_call, :wait, :write_flag, :write_flag=) end diff --git a/src/ruby/pb/test/client.rb b/src/ruby/pb/test/client.rb index 146623e0abf..066a7bb90f1 100755 --- a/src/ruby/pb/test/client.rb +++ b/src/ruby/pb/test/client.rb @@ -369,7 +369,7 @@ class NamedTests op.execute fail 'Should have raised GRPC:Cancelled' rescue GRPC::Cancelled - assert("#{__callee__}: call operation should be CANCELLED") { op.cancelled } + assert("#{__callee__}: call operation should be CANCELLED") { op.cancelled? } end def cancel_after_first_response @@ -380,7 +380,7 @@ class NamedTests op.execute.each { |r| ppp.queue.push(r) } fail 'Should have raised GRPC:Cancelled' rescue GRPC::Cancelled - assert("#{__callee__}: call operation should be CANCELLED") { op.cancelled } + assert("#{__callee__}: call operation should be CANCELLED") { op.cancelled? } op.wait end diff --git a/src/ruby/spec/generic/active_call_spec.rb b/src/ruby/spec/generic/active_call_spec.rb index b4e6f9ee028..018580e0dfa 100644 --- a/src/ruby/spec/generic/active_call_spec.rb +++ b/src/ruby/spec/generic/active_call_spec.rb @@ -61,7 +61,7 @@ describe GRPC::ActiveCall do describe '#multi_req_view' do it 'exposes a fixed subset of the ActiveCall methods' do - want = %w(cancelled, deadline, each_remote_read, metadata, shutdown) + want = %w(cancelled?, deadline, each_remote_read, metadata, shutdown) v = @client_call.multi_req_view want.each do |w| expect(v.methods.include?(w)) @@ -71,7 +71,7 @@ describe GRPC::ActiveCall do describe '#single_req_view' do it 'exposes a fixed subset of the ActiveCall methods' do - want = %w(cancelled, deadline, metadata, shutdown) + want = %w(cancelled?, deadline, metadata, shutdown) v = @client_call.single_req_view want.each do |w| expect(v.methods.include?(w)) From 4dd9ca9a6edb96ac5c880fc98656109c78e8a615 Mon Sep 17 00:00:00 2001 From: Nathaniel Manista Date: Thu, 7 Jul 2016 22:20:33 +0000 Subject: [PATCH 1518/1894] Fix _Rendezvous.exception for successful calls --- .../grpcio/grpc/beta/_client_adaptations.py | 5 +++- ...e_invocation_asynchronous_event_service.py | 25 +++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/src/python/grpcio/grpc/beta/_client_adaptations.py b/src/python/grpcio/grpc/beta/_client_adaptations.py index 56456cc117f..73415e0be7f 100644 --- a/src/python/grpcio/grpc/beta/_client_adaptations.py +++ b/src/python/grpcio/grpc/beta/_client_adaptations.py @@ -117,7 +117,10 @@ class _Rendezvous(future.Future, face.Call): def exception(self, timeout=None): try: rpc_error_call = self._future.exception(timeout=timeout) - return _abortion_error(rpc_error_call) + if rpc_error_call is None: + return None + else: + return _abortion_error(rpc_error_call) except grpc.FutureTimeoutError: raise future.TimeoutError() except grpc.FutureCancelledError: diff --git a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py index 791620307b5..d32208f9eb0 100644 --- a/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py +++ b/src/python/grpcio_tests/tests/unit/framework/interfaces/face/_future_invocation_asynchronous_event_service.py @@ -41,6 +41,7 @@ from concurrent import futures import six # test_interfaces is referenced from specification in this module. +from grpc.framework.foundation import future from grpc.framework.foundation import logging_pool from grpc.framework.interfaces.face import face from tests.unit.framework.common import test_constants @@ -159,6 +160,8 @@ class TestCase(six.with_metaclass(abc.ABCMeta, test_coverage.Coverage, unittest. test_messages.verify(request, response, self) self.assertIs(callback.future(), response_future) + self.assertIsNone(response_future.exception()) + self.assertIsNone(response_future.traceback()) def testSuccessfulUnaryRequestStreamResponse(self): for (group, method), test_messages_sequence in ( @@ -191,6 +194,8 @@ class TestCase(six.with_metaclass(abc.ABCMeta, test_coverage.Coverage, unittest. test_messages.verify(requests, response, self) self.assertIs(future_passed_to_callback, response_future) + self.assertIsNone(response_future.exception()) + self.assertIsNone(response_future.traceback()) def testSuccessfulStreamRequestStreamResponse(self): for (group, method), test_messages_sequence in ( @@ -301,6 +306,12 @@ class TestCase(six.with_metaclass(abc.ABCMeta, test_coverage.Coverage, unittest. self.assertIs(callback.future(), response_future) self.assertFalse(cancel_method_return_value) self.assertTrue(response_future.cancelled()) + with self.assertRaises(future.CancelledError): + response_future.result() + with self.assertRaises(future.CancelledError): + response_future.exception() + with self.assertRaises(future.CancelledError): + response_future.traceback() def testCancelledUnaryRequestStreamResponse(self): for (group, method), test_messages_sequence in ( @@ -332,6 +343,12 @@ class TestCase(six.with_metaclass(abc.ABCMeta, test_coverage.Coverage, unittest. self.assertIs(callback.future(), response_future) self.assertFalse(cancel_method_return_value) self.assertTrue(response_future.cancelled()) + with self.assertRaises(future.CancelledError): + response_future.result() + with self.assertRaises(future.CancelledError): + response_future.exception() + with self.assertRaises(future.CancelledError): + response_future.traceback() def testCancelledStreamRequestStreamResponse(self): for (group, method), test_messages_sequence in ( @@ -363,6 +380,9 @@ class TestCase(six.with_metaclass(abc.ABCMeta, test_coverage.Coverage, unittest. response_future.exception(), face.ExpirationError) with self.assertRaises(face.ExpirationError): response_future.result() + self.assertIsInstance( + response_future.exception(), face.AbortionError) + self.assertIsNotNone(response_future.traceback()) def testExpiredUnaryRequestStreamResponse(self): for (group, method), test_messages_sequence in ( @@ -392,6 +412,9 @@ class TestCase(six.with_metaclass(abc.ABCMeta, test_coverage.Coverage, unittest. response_future.exception(), face.ExpirationError) with self.assertRaises(face.ExpirationError): response_future.result() + self.assertIsInstance( + response_future.exception(), face.AbortionError) + self.assertIsNotNone(response_future.traceback()) def testExpiredStreamRequestStreamResponse(self): for (group, method), test_messages_sequence in ( @@ -426,6 +449,7 @@ class TestCase(six.with_metaclass(abc.ABCMeta, test_coverage.Coverage, unittest. response_future.exception(), face.ExpirationError) with self.assertRaises(face.ExpirationError): response_future.result() + self.assertIsNotNone(response_future.traceback()) def testFailedUnaryRequestStreamResponse(self): for (group, method), test_messages_sequence in ( @@ -463,6 +487,7 @@ class TestCase(six.with_metaclass(abc.ABCMeta, test_coverage.Coverage, unittest. response_future.exception(), face.ExpirationError) with self.assertRaises(face.ExpirationError): response_future.result() + self.assertIsNotNone(response_future.traceback()) def testFailedStreamRequestStreamResponse(self): for (group, method), test_messages_sequence in ( From e69f088cd973e61da445eddae61c67de6edbca17 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Thu, 7 Jul 2016 15:52:27 -0700 Subject: [PATCH 1519/1894] Split incoming initial and trailing metadata in Ruby calls --- src/ruby/ext/grpc/rb_call.c | 33 ++++++++++++++++++++++++ src/ruby/lib/grpc/generic/active_call.rb | 22 ++++++++-------- src/ruby/spec/generic/rpc_server_spec.rb | 4 +-- 3 files changed, 46 insertions(+), 13 deletions(-) diff --git a/src/ruby/ext/grpc/rb_call.c b/src/ruby/ext/grpc/rb_call.c index f62397e79f5..21261244436 100644 --- a/src/ruby/ext/grpc/rb_call.c +++ b/src/ruby/ext/grpc/rb_call.c @@ -71,6 +71,10 @@ static ID id_credentials; * received by the call and subsequently saved on it. */ static ID id_metadata; +/* id_trailing_metadata is the name of the attribute used to access the trailing + * metadata hash received by the call and subsequently saved on it. */ +static ID id_trailing_metadata; + /* id_status is name of the attribute used to access the status object * received by the call and subsequently saved on it. */ static ID id_status; @@ -296,6 +300,30 @@ static VALUE grpc_rb_call_set_metadata(VALUE self, VALUE metadata) { return rb_ivar_set(self, id_metadata, metadata); } +/* + call-seq: + trailing_metadata = call.trailing_metadata + + Gets the trailing metadata object saved on the call */ +static VALUE grpc_rb_call_get_trailing_metadata(VALUE self) { + return rb_ivar_get(self, id_trailing_metadata); +} + +/* + call-seq: + call.trailing_metadata = trailing_metadata + + Saves the trailing metadata hash on the call. */ +static VALUE grpc_rb_call_set_trailing_metadata(VALUE self, VALUE metadata) { + if (!NIL_P(metadata) && TYPE(metadata) != T_HASH) { + rb_raise(rb_eTypeError, "bad metadata: got:<%s> want: ", + rb_obj_classname(metadata)); + return Qnil; + } + + return rb_ivar_set(self, id_trailing_metadata, metadata); +} + /* call-seq: write_flag = call.write_flag @@ -908,6 +936,10 @@ void Init_grpc_call() { rb_define_method(grpc_rb_cCall, "status=", grpc_rb_call_set_status, 1); rb_define_method(grpc_rb_cCall, "metadata", grpc_rb_call_get_metadata, 0); rb_define_method(grpc_rb_cCall, "metadata=", grpc_rb_call_set_metadata, 1); + rb_define_method(grpc_rb_cCall, "trailing_metadata", + grpc_rb_call_get_trailing_metadata, 0); + rb_define_method(grpc_rb_cCall, "trailing_metadata=", + grpc_rb_call_set_trailing_metadata, 1); rb_define_method(grpc_rb_cCall, "write_flag", grpc_rb_call_get_write_flag, 0); rb_define_method(grpc_rb_cCall, "write_flag=", grpc_rb_call_set_write_flag, 1); @@ -916,6 +948,7 @@ void Init_grpc_call() { /* Ids used to support call attributes */ id_metadata = rb_intern("metadata"); + id_trailing_metadata = rb_intern("trailing_metadata"); id_status = rb_intern("status"); id_write_flag = rb_intern("write_flag"); diff --git a/src/ruby/lib/grpc/generic/active_call.rb b/src/ruby/lib/grpc/generic/active_call.rb index a3ac0d48a3b..5c142fb1619 100644 --- a/src/ruby/lib/grpc/generic/active_call.rb +++ b/src/ruby/lib/grpc/generic/active_call.rb @@ -43,8 +43,7 @@ class Struct GRPC.logger.debug("Failing with status #{status}") # raise BadStatus, propagating the metadata if present. md = status.metadata - with_sym_keys = Hash[md.each_pair.collect { |x, y| [x.to_sym, y] }] - fail GRPC::BadStatus.new(status.code, status.details, with_sym_keys) + fail GRPC::BadStatus.new(status.code, status.details, md) end status end @@ -61,7 +60,7 @@ module GRPC extend Forwardable attr_reader(:deadline) def_delegators :@call, :cancel, :metadata, :write_flag, :write_flag=, - :peer, :peer_cert + :peer, :peer_cert, :trailing_metadata # client_invoke begins a client invocation. # @@ -158,6 +157,9 @@ module GRPC ops[RECV_STATUS_ON_CLIENT] = nil if assert_finished batch_result = @call.run_batch(ops) return unless assert_finished + unless batch_result.status.nil? + @call.trailing_metadata = batch_result.status.metadata + end @call.status = batch_result.status op_is_done batch_result.check_status @@ -169,11 +171,7 @@ module GRPC def finished batch_result = @call.run_batch(RECV_STATUS_ON_CLIENT => nil) unless batch_result.status.nil? - if @call.metadata.nil? - @call.metadata = batch_result.status.metadata - else - @call.metadata.merge!(batch_result.status.metadata) - end + @call.trailing_metadata = batch_result.status.metadata end @call.status = batch_result.status op_is_done @@ -456,17 +454,19 @@ module GRPC # SingleReqView limits access to an ActiveCall's methods for use in server # handlers that receive just one request. SingleReqView = view_class(:cancelled, :deadline, :metadata, - :output_metadata, :peer, :peer_cert) + :output_metadata, :peer, :peer_cert, + :trailing_metadata) # MultiReqView limits access to an ActiveCall's methods for use in # server client_streamer handlers. MultiReqView = view_class(:cancelled, :deadline, :each_queued_msg, - :each_remote_read, :metadata, :output_metadata) + :each_remote_read, :metadata, :output_metadata, + :trailing_metadata) # Operation limits access to an ActiveCall's methods for use as # a Operation on the client. Operation = view_class(:cancel, :cancelled, :deadline, :execute, :metadata, :status, :start_call, :wait, :write_flag, - :write_flag=) + :write_flag=, :trailing_metadata) end end diff --git a/src/ruby/spec/generic/rpc_server_spec.rb b/src/ruby/spec/generic/rpc_server_spec.rb index 901c84fc783..31157cf161e 100644 --- a/src/ruby/spec/generic/rpc_server_spec.rb +++ b/src/ruby/spec/generic/rpc_server_spec.rb @@ -95,7 +95,7 @@ class FailingService def initialize(_default_var = 'ignored') @details = 'app error' @code = 101 - @md = { failed_method: 'an_rpc' } + @md = { 'failed_method' => 'an_rpc' } end def an_rpc(_req, _call) @@ -515,7 +515,7 @@ describe GRPC::RpcServer do op = stub.an_rpc(req, return_op: true, metadata: { k1: 'v1', k2: 'v2' }) expect(op.metadata).to be nil expect(op.execute).to be_a(EchoMsg) - expect(op.metadata).to eq(wanted_trailers) + expect(op.trailing_metadata).to eq(wanted_trailers) @srv.stop t.join end From c68640f05cea2cf79bf2703d83da6b76fa6dc5e6 Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Thu, 7 Jul 2016 14:13:35 -0700 Subject: [PATCH 1520/1894] Read from stdin Read from stdin if the request text and binary file are not provided --- test/cpp/util/grpc_cli.cc | 23 +++++++++++++++++------ 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/test/cpp/util/grpc_cli.cc b/test/cpp/util/grpc_cli.cc index 7c8e2cdc639..fdb1a7c2a00 100644 --- a/test/cpp/util/grpc_cli.cc +++ b/test/cpp/util/grpc_cli.cc @@ -64,6 +64,7 @@ < output.bin > output.txt */ +#include #include #include #include @@ -146,7 +147,6 @@ int main(int argc, char** argv) { grpc::string serialized_request_proto; if (argc == 5) { - // TODO(yangg) read from stdin as well? request_text = argv[4]; } @@ -164,10 +164,15 @@ int main(int argc, char** argv) { grpc::CreateChannel(server_address, creds); if (request_text.empty() && FLAGS_input_binary_file.empty()) { - std::cout << "Missing input. Use text format input or " - << "--input_binary_file for serialized request" << std::endl; - return 1; - } else if (!request_text.empty()) { + if (isatty(STDIN_FILENO)) { + std::cout << "reading request message from stdin..." << std::endl; + } + std::stringstream input_stream; + input_stream << std::cin.rdbuf(); + request_text = input_stream.str(); + } + + if (!request_text.empty()) { if (!FLAGS_proto_file.empty()) { parser.reset(new grpc::testing::ProtoFileParser( FLAGS_proto_path, FLAGS_proto_file, method_name)); @@ -178,6 +183,12 @@ int main(int argc, char** argv) { if (parser->HasError()) { return 1; } + + if (!FLAGS_input_binary_file.empty()) { + std::cout + << "warning: request given in argv, ignoring --input_binary_file" + << std::endl; + } } if (parser) { @@ -226,7 +237,7 @@ int main(int argc, char** argv) { } } else { std::cout << "Rpc failed with status code " << s.error_code() - << " error message " << s.error_message() << std::endl; + << ", error message: " << s.error_message() << std::endl; } return 0; From 8b249088b0116d57a489c9882514f646bee0e5ee Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Wed, 29 Jun 2016 15:13:06 -0700 Subject: [PATCH 1521/1894] php: add warning about shutdown function --- src/core/lib/iomgr/ev_poll_posix.c | 4 ++-- src/core/lib/iomgr/tcp_posix.c | 4 ++-- src/php/ext/grpc/php_grpc.c | 2 ++ 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 45c0a5e9546..3b57a0bdfb3 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -254,7 +254,7 @@ struct grpc_pollset_set { #define UNREF_BY(fd, n, reason) unref_by(fd, n, reason, __FILE__, __LINE__) static void ref_by(grpc_fd *fd, int n, const char *reason, const char *file, int line) { - gpr_log(GPR_DEBUG, "FD %d %p ref %d %d -> %d [%s; %s:%d]", fd->fd, fd, n, + gpr_log(GPR_DEBUG, "FD %d %p ref %d %ld -> %ld [%s; %s:%d]", fd->fd, fd, n, gpr_atm_no_barrier_load(&fd->refst), gpr_atm_no_barrier_load(&fd->refst) + n, reason, file, line); #else @@ -269,7 +269,7 @@ static void ref_by(grpc_fd *fd, int n) { static void unref_by(grpc_fd *fd, int n, const char *reason, const char *file, int line) { gpr_atm old; - gpr_log(GPR_DEBUG, "FD %d %p unref %d %d -> %d [%s; %s:%d]", fd->fd, fd, n, + gpr_log(GPR_DEBUG, "FD %d %p unref %d %ld -> %ld [%s; %s:%d]", fd->fd, fd, n, gpr_atm_no_barrier_load(&fd->refst), gpr_atm_no_barrier_load(&fd->refst) - n, reason, file, line); #else diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 2ab45e33ce3..27fd21ba091 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -127,7 +127,7 @@ static void tcp_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { #define TCP_REF(tcp, reason) tcp_ref((tcp), (reason), __FILE__, __LINE__) static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, const char *reason, const char *file, int line) { - gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "TCP unref %p : %s %d -> %d", tcp, + gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "TCP unref %p : %s %ld -> %ld", tcp, reason, tcp->refcount.count, tcp->refcount.count - 1); if (gpr_unref(&tcp->refcount)) { tcp_free(exec_ctx, tcp); @@ -136,7 +136,7 @@ static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, static void tcp_ref(grpc_tcp *tcp, const char *reason, const char *file, int line) { - gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "TCP ref %p : %s %d -> %d", tcp, + gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "TCP ref %p : %s %ld -> %ld", tcp, reason, tcp->refcount.count, tcp->refcount.count + 1); gpr_ref(&tcp->refcount); } diff --git a/src/php/ext/grpc/php_grpc.c b/src/php/ext/grpc/php_grpc.c index f4cb5b28cc8..449ba3cd47b 100644 --- a/src/php/ext/grpc/php_grpc.c +++ b/src/php/ext/grpc/php_grpc.c @@ -248,6 +248,8 @@ PHP_MSHUTDOWN_FUNCTION(grpc) { /* uncomment this line if you have INI entries UNREGISTER_INI_ENTRIES(); */ + // WARNING: This function IS being called by PHP when the extension + // is unloaded but the logs were somehow suppressed. grpc_shutdown_timeval(TSRMLS_C); grpc_php_shutdown_completion_queue(TSRMLS_C); grpc_shutdown(); From 692a38f7fa412f7fc90c23d778f13d4995abf9fa Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Thu, 30 Jun 2016 15:13:29 -0700 Subject: [PATCH 1522/1894] php: update example composer.json --- examples/php/composer.json | 2 +- src/php/composer.json | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/examples/php/composer.json b/examples/php/composer.json index c837bf7ac0f..950e11367d0 100644 --- a/examples/php/composer.json +++ b/examples/php/composer.json @@ -9,6 +9,6 @@ } ], "require": { - "grpc/grpc": "dev-release-0_13" + "grpc/grpc": "v0.15.0" } } diff --git a/src/php/composer.json b/src/php/composer.json index 01674a25db8..2ad73223c65 100644 --- a/src/php/composer.json +++ b/src/php/composer.json @@ -2,7 +2,6 @@ "name": "grpc/grpc", "type": "library", "description": "gRPC library for PHP", - "version": "0.14.0", "keywords": ["rpc"], "homepage": "http://grpc.io", "license": "BSD-3-Clause", From 69f9e448f8bcb52e27fe944f5ac335ef1ef5d93d Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Fri, 1 Jul 2016 08:13:16 -0700 Subject: [PATCH 1523/1894] revert debug log change --- src/core/lib/iomgr/ev_poll_posix.c | 4 ++-- src/core/lib/iomgr/tcp_posix.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/lib/iomgr/ev_poll_posix.c b/src/core/lib/iomgr/ev_poll_posix.c index 3b57a0bdfb3..45c0a5e9546 100644 --- a/src/core/lib/iomgr/ev_poll_posix.c +++ b/src/core/lib/iomgr/ev_poll_posix.c @@ -254,7 +254,7 @@ struct grpc_pollset_set { #define UNREF_BY(fd, n, reason) unref_by(fd, n, reason, __FILE__, __LINE__) static void ref_by(grpc_fd *fd, int n, const char *reason, const char *file, int line) { - gpr_log(GPR_DEBUG, "FD %d %p ref %d %ld -> %ld [%s; %s:%d]", fd->fd, fd, n, + gpr_log(GPR_DEBUG, "FD %d %p ref %d %d -> %d [%s; %s:%d]", fd->fd, fd, n, gpr_atm_no_barrier_load(&fd->refst), gpr_atm_no_barrier_load(&fd->refst) + n, reason, file, line); #else @@ -269,7 +269,7 @@ static void ref_by(grpc_fd *fd, int n) { static void unref_by(grpc_fd *fd, int n, const char *reason, const char *file, int line) { gpr_atm old; - gpr_log(GPR_DEBUG, "FD %d %p unref %d %ld -> %ld [%s; %s:%d]", fd->fd, fd, n, + gpr_log(GPR_DEBUG, "FD %d %p unref %d %d -> %d [%s; %s:%d]", fd->fd, fd, n, gpr_atm_no_barrier_load(&fd->refst), gpr_atm_no_barrier_load(&fd->refst) - n, reason, file, line); #else diff --git a/src/core/lib/iomgr/tcp_posix.c b/src/core/lib/iomgr/tcp_posix.c index 27fd21ba091..2ab45e33ce3 100644 --- a/src/core/lib/iomgr/tcp_posix.c +++ b/src/core/lib/iomgr/tcp_posix.c @@ -127,7 +127,7 @@ static void tcp_free(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp) { #define TCP_REF(tcp, reason) tcp_ref((tcp), (reason), __FILE__, __LINE__) static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, const char *reason, const char *file, int line) { - gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "TCP unref %p : %s %ld -> %ld", tcp, + gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "TCP unref %p : %s %d -> %d", tcp, reason, tcp->refcount.count, tcp->refcount.count - 1); if (gpr_unref(&tcp->refcount)) { tcp_free(exec_ctx, tcp); @@ -136,7 +136,7 @@ static void tcp_unref(grpc_exec_ctx *exec_ctx, grpc_tcp *tcp, static void tcp_ref(grpc_tcp *tcp, const char *reason, const char *file, int line) { - gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "TCP ref %p : %s %ld -> %ld", tcp, + gpr_log(file, line, GPR_LOG_SEVERITY_DEBUG, "TCP ref %p : %s %d -> %d", tcp, reason, tcp->refcount.count, tcp->refcount.count + 1); gpr_ref(&tcp->refcount); } From ea1b16f82f348cc58cf5f932d22d3eb6777b3bd1 Mon Sep 17 00:00:00 2001 From: Ken Payson Date: Thu, 7 Jul 2016 16:44:33 -0700 Subject: [PATCH 1524/1894] Removed cython client-side call tracking This ensures sync calls get cancelled after a keyboard interrupt, as well as all calls getting destroyed before grpc_shutdown() --- src/python/grpcio/grpc/_channel.py | 27 ++++++++++--------- .../grpcio/grpc/_cython/_cygrpc/call.pyx.pxi | 15 +++++++++-- .../grpc/_cython/_cygrpc/records.pxd.pxi | 6 ++--- src/python/grpcio/grpc/_server.py | 16 +++++------ .../unit/_cython/_cancel_many_calls_test.py | 8 +++--- .../_read_some_but_not_all_responses_test.py | 22 +++++++-------- .../tests/unit/_cython/cygrpc_test.py | 9 ++++--- 7 files changed, 58 insertions(+), 45 deletions(-) diff --git a/src/python/grpcio/grpc/_channel.py b/src/python/grpcio/grpc/_channel.py index a89b5013030..29dbc3a668b 100644 --- a/src/python/grpcio/grpc/_channel.py +++ b/src/python/grpcio/grpc/_channel.py @@ -195,7 +195,8 @@ def _consume_request_iterator( cygrpc.operation_send_message( serialized_request, _EMPTY_FLAGS), ) - call.start_batch(cygrpc.Operations(operations), event_handler) + call.start_client_batch(cygrpc.Operations(operations), + event_handler) state.due.add(cygrpc.OperationType.send_message) while True: state.condition.wait() @@ -211,7 +212,7 @@ def _consume_request_iterator( operations = ( cygrpc.operation_send_close_from_client(_EMPTY_FLAGS), ) - call.start_batch(cygrpc.Operations(operations), event_handler) + call.start_client_batch(cygrpc.Operations(operations), event_handler) state.due.add(cygrpc.OperationType.send_close_from_client) def stop_consumption_thread(timeout): @@ -312,7 +313,7 @@ class _Rendezvous(grpc.RpcError, grpc.Future, grpc.Call): if self._state.code is None: event_handler = _event_handler( self._state, self._call, self._response_deserializer) - self._call.start_batch( + self._call.start_client_batch( cygrpc.Operations( (cygrpc.operation_receive_message(_EMPTY_FLAGS),)), event_handler) @@ -471,7 +472,7 @@ class _UnaryUnaryMultiCallable(grpc.UnaryUnaryMultiCallable): None, 0, completion_queue, self._method, None, deadline_timespec) if credentials is not None: call.set_credentials(credentials._credentials) - call.start_batch(cygrpc.Operations(operations), None) + call.start_client_batch(cygrpc.Operations(operations), None) _handle_event(completion_queue.poll(), state, self._response_deserializer) return state, deadline @@ -495,7 +496,7 @@ class _UnaryUnaryMultiCallable(grpc.UnaryUnaryMultiCallable): call.set_credentials(credentials._credentials) event_handler = _event_handler(state, call, self._response_deserializer) with state.condition: - call.start_batch(cygrpc.Operations(operations), event_handler) + call.start_client_batch(cygrpc.Operations(operations), event_handler) return _Rendezvous(state, call, self._response_deserializer, deadline) @@ -523,7 +524,7 @@ class _UnaryStreamMultiCallable(grpc.UnaryStreamMultiCallable): call.set_credentials(credentials._credentials) event_handler = _event_handler(state, call, self._response_deserializer) with state.condition: - call.start_batch( + call.start_client_batch( cygrpc.Operations( (cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS),)), event_handler) @@ -534,7 +535,7 @@ class _UnaryStreamMultiCallable(grpc.UnaryStreamMultiCallable): cygrpc.operation_send_close_from_client(_EMPTY_FLAGS), cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS), ) - call.start_batch(cygrpc.Operations(operations), event_handler) + call.start_client_batch(cygrpc.Operations(operations), event_handler) return _Rendezvous(state, call, self._response_deserializer, deadline) @@ -558,7 +559,7 @@ class _StreamUnaryMultiCallable(grpc.StreamUnaryMultiCallable): if credentials is not None: call.set_credentials(credentials._credentials) with state.condition: - call.start_batch( + call.start_client_batch( cygrpc.Operations( (cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS),)), None) @@ -568,7 +569,7 @@ class _StreamUnaryMultiCallable(grpc.StreamUnaryMultiCallable): cygrpc.operation_receive_message(_EMPTY_FLAGS), cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS), ) - call.start_batch(cygrpc.Operations(operations), None) + call.start_client_batch(cygrpc.Operations(operations), None) _consume_request_iterator( request_iterator, state, call, self._request_serializer) while True: @@ -602,7 +603,7 @@ class _StreamUnaryMultiCallable(grpc.StreamUnaryMultiCallable): call.set_credentials(credentials._credentials) event_handler = _event_handler(state, call, self._response_deserializer) with state.condition: - call.start_batch( + call.start_client_batch( cygrpc.Operations( (cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS),)), event_handler) @@ -612,7 +613,7 @@ class _StreamUnaryMultiCallable(grpc.StreamUnaryMultiCallable): cygrpc.operation_receive_message(_EMPTY_FLAGS), cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS), ) - call.start_batch(cygrpc.Operations(operations), event_handler) + call.start_client_batch(cygrpc.Operations(operations), event_handler) _consume_request_iterator( request_iterator, state, call, self._request_serializer) return _Rendezvous(state, call, self._response_deserializer, deadline) @@ -639,7 +640,7 @@ class _StreamStreamMultiCallable(grpc.StreamStreamMultiCallable): call.set_credentials(credentials._credentials) event_handler = _event_handler(state, call, self._response_deserializer) with state.condition: - call.start_batch( + call.start_client_batch( cygrpc.Operations( (cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS),)), event_handler) @@ -648,7 +649,7 @@ class _StreamStreamMultiCallable(grpc.StreamStreamMultiCallable): _common.cygrpc_metadata(metadata), _EMPTY_FLAGS), cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS), ) - call.start_batch(cygrpc.Operations(operations), event_handler) + call.start_client_batch(cygrpc.Operations(operations), event_handler) _consume_request_iterator( request_iterator, state, call, self._request_serializer) return _Rendezvous(state, call, self._response_deserializer, deadline) diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi index a09bbc75fe6..6570dcdb852 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/call.pyx.pxi @@ -37,13 +37,16 @@ cdef class Call: self.c_call = NULL self.references = [] - def start_batch(self, operations, tag): + def _start_batch(self, operations, tag, retain_self): if not self.is_valid: raise ValueError("invalid call object cannot be used from Python") cdef grpc_call_error result cdef Operations cy_operations = Operations(operations) cdef OperationTag operation_tag = OperationTag(tag) - operation_tag.operation_call = self + if retain_self: + operation_tag.operation_call = self + else: + operation_tag.operation_call = None operation_tag.batch_operations = cy_operations cpython.Py_INCREF(operation_tag) with nogil: @@ -52,6 +55,14 @@ cdef class Call: operation_tag, NULL) return result + def start_client_batch(self, operations, tag): + # We don't reference this call in the operations tag because + # it should be cancelled when it goes out of scope + return self._start_batch(operations, tag, False) + + def start_server_batch(self, operations, tag): + return self._start_batch(operations, tag, True) + def cancel( self, grpc_status_code error_code=GRPC_STATUS__DO_NOT_USE, details=None): diff --git a/src/python/grpcio/grpc/_cython/_cygrpc/records.pxd.pxi b/src/python/grpcio/grpc/_cython/_cygrpc/records.pxd.pxi index 0474697af82..96c5b02bc2e 100644 --- a/src/python/grpcio/grpc/_cython/_cygrpc/records.pxd.pxi +++ b/src/python/grpcio/grpc/_cython/_cygrpc/records.pxd.pxi @@ -58,14 +58,14 @@ cdef class Event: cdef readonly bint success cdef readonly object tag - # For operations with calls - cdef readonly Call operation_call - # For Server.request_call cdef readonly bint is_new_request cdef readonly CallDetails request_call_details cdef readonly Metadata request_metadata + # For server calls + cdef readonly Call operation_call + # For Call.start_batch cdef readonly Operations batch_operations diff --git a/src/python/grpcio/grpc/_server.py b/src/python/grpcio/grpc/_server.py index f4c114056fe..5d805b53e40 100644 --- a/src/python/grpcio/grpc/_server.py +++ b/src/python/grpcio/grpc/_server.py @@ -157,7 +157,7 @@ def _abort(state, call, code, details): effective_details, _EMPTY_FLAGS), ) token = _SEND_STATUS_FROM_SERVER_TOKEN - call.start_batch( + call.start_server_batch( cygrpc.Operations(operations), _send_status_from_server(state, token)) state.statused = True @@ -257,7 +257,7 @@ class _Context(grpc.ServicerContext): if self._state.initial_metadata_allowed: operation = cygrpc.operation_send_initial_metadata( _common.cygrpc_metadata(initial_metadata), _EMPTY_FLAGS) - self._rpc_event.operation_call.start_batch( + self._rpc_event.operation_call.start_server_batch( cygrpc.Operations((operation,)), _send_initial_metadata(self._state)) self._state.initial_metadata_allowed = False @@ -292,7 +292,7 @@ class _RequestIterator(object): elif self._state.client is _CLOSED or self._state.statused: raise StopIteration() else: - self._call.start_batch( + self._call.start_server_batch( cygrpc.Operations((cygrpc.operation_receive_message(_EMPTY_FLAGS),)), _receive_message(self._state, self._call, self._request_deserializer)) self._state.due.add(_RECEIVE_MESSAGE_TOKEN) @@ -333,7 +333,7 @@ def _unary_request(rpc_event, state, request_deserializer): if state.client is _CANCELLED or state.statused: return None else: - start_batch_result = rpc_event.operation_call.start_batch( + start_server_batch_result = rpc_event.operation_call.start_server_batch( cygrpc.Operations( (cygrpc.operation_receive_message(_EMPTY_FLAGS),)), _receive_message( @@ -417,7 +417,7 @@ def _send_response(rpc_event, state, serialized_response): cygrpc.operation_send_message(serialized_response, _EMPTY_FLAGS), ) token = _SEND_MESSAGE_TOKEN - rpc_event.operation_call.start_batch( + rpc_event.operation_call.start_server_batch( cygrpc.Operations(operations), _send_message(state, token)) state.due.add(token) while True: @@ -443,7 +443,7 @@ def _status(rpc_event, state, serialized_response): if serialized_response is not None: operations.append(cygrpc.operation_send_message( serialized_response, _EMPTY_FLAGS)) - rpc_event.operation_call.start_batch( + rpc_event.operation_call.start_server_batch( cygrpc.Operations(operations), _send_status_from_server(state, _SEND_STATUS_FROM_SERVER_TOKEN)) state.statused = True @@ -550,7 +550,7 @@ def _handle_unrecognized_method(rpc_event): b'Method not found!', _EMPTY_FLAGS), ) rpc_state = _RPCState() - rpc_event.operation_call.start_batch( + rpc_event.operation_call.start_server_batch( operations, lambda ignored_event: (rpc_state, (),)) return rpc_state @@ -558,7 +558,7 @@ def _handle_unrecognized_method(rpc_event): def _handle_with_method_handler(rpc_event, method_handler, thread_pool): state = _RPCState() with state.condition: - rpc_event.operation_call.start_batch( + rpc_event.operation_call.start_server_batch( cygrpc.Operations( (cygrpc.operation_receive_close_on_server(_EMPTY_FLAGS),)), _receive_close_on_server(state)) diff --git a/src/python/grpcio_tests/tests/unit/_cython/_cancel_many_calls_test.py b/src/python/grpcio_tests/tests/unit/_cython/_cancel_many_calls_test.py index cac0c8b3b93..cf212c56539 100644 --- a/src/python/grpcio_tests/tests/unit/_cython/_cancel_many_calls_test.py +++ b/src/python/grpcio_tests/tests/unit/_cython/_cancel_many_calls_test.py @@ -81,11 +81,11 @@ class _Handler(object): self._state.condition.wait() with self._lock: - self._call.start_batch( + self._call.start_server_batch( cygrpc.Operations( (cygrpc.operation_receive_close_on_server(_EMPTY_FLAGS),)), _RECEIVE_CLOSE_ON_SERVER_TAG) - self._call.start_batch( + self._call.start_server_batch( cygrpc.Operations((cygrpc.operation_receive_message(_EMPTY_FLAGS),)), _RECEIVE_MESSAGE_TAG) first_event = self._completion_queue.poll() @@ -101,7 +101,7 @@ class _Handler(object): _EMPTY_METADATA, cygrpc.StatusCode.ok, b'test details!', _EMPTY_FLAGS), ) - self._call.start_batch( + self._call.start_server_batch( cygrpc.Operations(operations), _SERVER_COMPLETE_CALL_TAG) self._completion_queue.poll() self._completion_queue.poll() @@ -193,7 +193,7 @@ class CancelManyCallsTest(unittest.TestCase): cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS), ) tag = 'client_complete_call_{0:04d}_tag'.format(index) - client_call.start_batch(cygrpc.Operations(operations), tag) + client_call.start_client_batch(cygrpc.Operations(operations), tag) client_due.add(tag) client_calls.append(client_call) diff --git a/src/python/grpcio_tests/tests/unit/_cython/_read_some_but_not_all_responses_test.py b/src/python/grpcio_tests/tests/unit/_cython/_read_some_but_not_all_responses_test.py index 27fcee0d6f1..152d8edde3b 100644 --- a/src/python/grpcio_tests/tests/unit/_cython/_read_some_but_not_all_responses_test.py +++ b/src/python/grpcio_tests/tests/unit/_cython/_read_some_but_not_all_responses_test.py @@ -168,12 +168,12 @@ class ReadSomeButNotAllResponsesTest(unittest.TestCase): client_complete_rpc_tag = 'client_complete_rpc_tag' with client_condition: client_receive_initial_metadata_start_batch_result = ( - client_call.start_batch(cygrpc.Operations([ + client_call.start_client_batch(cygrpc.Operations([ cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS), ]), client_receive_initial_metadata_tag)) client_due.add(client_receive_initial_metadata_tag) client_complete_rpc_start_batch_result = ( - client_call.start_batch(cygrpc.Operations([ + client_call.start_client_batch(cygrpc.Operations([ cygrpc.operation_send_initial_metadata( _EMPTY_METADATA, _EMPTY_FLAGS), cygrpc.operation_send_close_from_client(_EMPTY_FLAGS), @@ -185,30 +185,30 @@ class ReadSomeButNotAllResponsesTest(unittest.TestCase): with server_call_condition: server_send_initial_metadata_start_batch_result = ( - server_rpc_event.operation_call.start_batch(cygrpc.Operations([ + server_rpc_event.operation_call.start_server_batch([ cygrpc.operation_send_initial_metadata( _EMPTY_METADATA, _EMPTY_FLAGS), - ]), server_send_initial_metadata_tag)) + ], server_send_initial_metadata_tag)) server_send_first_message_start_batch_result = ( - server_rpc_event.operation_call.start_batch(cygrpc.Operations([ + server_rpc_event.operation_call.start_server_batch([ cygrpc.operation_send_message(b'\x07', _EMPTY_FLAGS), - ]), server_send_first_message_tag)) + ], server_send_first_message_tag)) server_send_initial_metadata_event = server_call_driver.event_with_tag( server_send_initial_metadata_tag) server_send_first_message_event = server_call_driver.event_with_tag( server_send_first_message_tag) with server_call_condition: server_send_second_message_start_batch_result = ( - server_rpc_event.operation_call.start_batch(cygrpc.Operations([ + server_rpc_event.operation_call.start_server_batch([ cygrpc.operation_send_message(b'\x07', _EMPTY_FLAGS), - ]), server_send_second_message_tag)) + ], server_send_second_message_tag)) server_complete_rpc_start_batch_result = ( - server_rpc_event.operation_call.start_batch(cygrpc.Operations([ + server_rpc_event.operation_call.start_server_batch([ cygrpc.operation_receive_close_on_server(_EMPTY_FLAGS), cygrpc.operation_send_status_from_server( cygrpc.Metadata(()), cygrpc.StatusCode.ok, b'test details', _EMPTY_FLAGS), - ]), server_complete_rpc_tag)) + ], server_complete_rpc_tag)) server_send_second_message_event = server_call_driver.event_with_tag( server_send_second_message_tag) server_complete_rpc_event = server_call_driver.event_with_tag( @@ -218,7 +218,7 @@ class ReadSomeButNotAllResponsesTest(unittest.TestCase): with client_condition: client_receive_first_message_tag = 'client_receive_first_message_tag' client_receive_first_message_start_batch_result = ( - client_call.start_batch(cygrpc.Operations([ + client_call.start_client_batch(cygrpc.Operations([ cygrpc.operation_receive_message(_EMPTY_FLAGS), ]), client_receive_first_message_tag)) client_due.add(client_receive_first_message_tag) diff --git a/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py b/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py index b740695e35b..9d1dbc189b8 100644 --- a/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py +++ b/src/python/grpcio_tests/tests/unit/_cython/cygrpc_test.py @@ -186,7 +186,8 @@ class ServerClientMixin(object): def performer(): tag = object() try: - call_result = call.start_batch(cygrpc.Operations(operations), tag) + call_result = call.start_client_batch( + cygrpc.Operations(operations), tag) self.assertEqual(cygrpc.CallError.ok, call_result) event = queue.poll(deadline) self.assertEqual(cygrpc.CompletionType.operation_complete, event.type) @@ -231,7 +232,7 @@ class ServerClientMixin(object): cygrpc.Metadatum(CLIENT_METADATA_ASCII_KEY, CLIENT_METADATA_ASCII_VALUE), cygrpc.Metadatum(CLIENT_METADATA_BIN_KEY, CLIENT_METADATA_BIN_VALUE)]) - client_start_batch_result = client_call.start_batch(cygrpc.Operations([ + client_start_batch_result = client_call.start_client_batch([ cygrpc.operation_send_initial_metadata(client_initial_metadata, _EMPTY_FLAGS), cygrpc.operation_send_message(REQUEST, _EMPTY_FLAGS), @@ -239,7 +240,7 @@ class ServerClientMixin(object): cygrpc.operation_receive_initial_metadata(_EMPTY_FLAGS), cygrpc.operation_receive_message(_EMPTY_FLAGS), cygrpc.operation_receive_status_on_client(_EMPTY_FLAGS) - ]), client_call_tag) + ], client_call_tag) self.assertEqual(cygrpc.CallError.ok, client_start_batch_result) client_event_future = test_utilities.CompletionQueuePollFuture( self.client_completion_queue, cygrpc_deadline) @@ -268,7 +269,7 @@ class ServerClientMixin(object): server_trailing_metadata = cygrpc.Metadata([ cygrpc.Metadatum(SERVER_TRAILING_METADATA_KEY, SERVER_TRAILING_METADATA_VALUE)]) - server_start_batch_result = server_call.start_batch([ + server_start_batch_result = server_call.start_server_batch([ cygrpc.operation_send_initial_metadata(server_initial_metadata, _EMPTY_FLAGS), cygrpc.operation_receive_message(_EMPTY_FLAGS), From ae466c8a8d5586b08ef5078febc115775220b8b9 Mon Sep 17 00:00:00 2001 From: murgatroid99 Date: Fri, 8 Jul 2016 09:28:25 -0700 Subject: [PATCH 1525/1894] Revert changes to SingleReqView and MultiReqView --- src/ruby/lib/grpc/generic/active_call.rb | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/ruby/lib/grpc/generic/active_call.rb b/src/ruby/lib/grpc/generic/active_call.rb index 5c142fb1619..47f24989365 100644 --- a/src/ruby/lib/grpc/generic/active_call.rb +++ b/src/ruby/lib/grpc/generic/active_call.rb @@ -454,14 +454,12 @@ module GRPC # SingleReqView limits access to an ActiveCall's methods for use in server # handlers that receive just one request. SingleReqView = view_class(:cancelled, :deadline, :metadata, - :output_metadata, :peer, :peer_cert, - :trailing_metadata) + :output_metadata, :peer, :peer_cert) # MultiReqView limits access to an ActiveCall's methods for use in # server client_streamer handlers. MultiReqView = view_class(:cancelled, :deadline, :each_queued_msg, - :each_remote_read, :metadata, :output_metadata, - :trailing_metadata) + :each_remote_read, :metadata, :output_metadata) # Operation limits access to an ActiveCall's methods for use as # a Operation on the client. From f373f2cf8b9d6f8975e1dd976cddb1e3618e8ff9 Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Fri, 8 Jul 2016 09:40:55 -0700 Subject: [PATCH 1526/1894] Stop holding histogram for a long time --- test/cpp/qps/client.h | 35 +++++++++++++++++++---------------- test/cpp/qps/client_async.cc | 19 +++++++++---------- test/cpp/qps/client_sync.cc | 10 ++++------ 3 files changed, 32 insertions(+), 32 deletions(-) diff --git a/test/cpp/qps/client.h b/test/cpp/qps/client.h index 047bd164082..38478be5d9f 100644 --- a/test/cpp/qps/client.h +++ b/test/cpp/qps/client.h @@ -112,6 +112,17 @@ class ClientRequestCreator { } }; +class HistogramEntry GRPC_FINAL { + public: + HistogramEntry(): used_(false) {} + bool used() const {return used_;} + double value() const {return value_;} + void set_value(double v) {used_ = true; value_ = v;} + private: + bool used_; + double value_; +}; + class Client { public: Client() : timer_(new UsageTimer), interarrival_timer_() {} @@ -162,7 +173,7 @@ class Client { void EndThreads() { threads_.clear(); } - virtual bool ThreadFunc(Histogram* histogram, size_t thread_idx) = 0; + virtual bool ThreadFunc(HistogramEntry* histogram, size_t thread_idx) = 0; void SetupLoadTest(const ClientConfig& config, size_t num_threads) { // Set up the load distribution based on the number of threads @@ -215,7 +226,6 @@ class Client { public: Thread(Client* client, size_t idx) : done_(false), - new_stats_(nullptr), client_(client), idx_(idx), impl_(&Thread::ThreadFunc, this) {} @@ -230,14 +240,10 @@ class Client { void BeginSwap(Histogram* n) { std::lock_guard g(mu_); - new_stats_ = n; + n->Swap(&histogram_); } void EndSwap() { - std::unique_lock g(mu_); - while (new_stats_ != nullptr) { - cv_.wait(g); - }; } void MergeStatsInto(Histogram* hist) { @@ -252,9 +258,13 @@ class Client { void ThreadFunc() { for (;;) { // run the loop body - const bool thread_still_ok = client_->ThreadFunc(&histogram_, idx_); - // lock, see if we're done + HistogramEntry entry; + const bool thread_still_ok = client_->ThreadFunc(&entry, idx_); + // lock, update histogram if needed and see if we're done std::lock_guard g(mu_); + if (entry.used()) { + histogram_.Add(entry.value()); + } if (!thread_still_ok) { gpr_log(GPR_ERROR, "Finishing client thread due to RPC error"); done_ = true; @@ -262,17 +272,10 @@ class Client { if (done_) { return; } - // check if we're resetting stats, swap out the histogram if so - if (new_stats_) { - new_stats_->Swap(&histogram_); - new_stats_ = nullptr; - cv_.notify_one(); - } } } std::mutex mu_; - std::condition_variable cv_; bool done_; Histogram* new_stats_; Histogram histogram_; diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index 1507d1e3d66..c2b69337a3e 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -48,7 +48,6 @@ #include #include #include -#include #include #include "src/proto/grpc/testing/services.grpc.pb.h" @@ -64,7 +63,7 @@ class ClientRpcContext { ClientRpcContext() {} virtual ~ClientRpcContext() {} // next state, return false if done. Collect stats when appropriate - virtual bool RunNextState(bool, Histogram* hist) = 0; + virtual bool RunNextState(bool, HistogramEntry* entry) = 0; virtual ClientRpcContext* StartNewClone() = 0; static void* tag(ClientRpcContext* c) { return reinterpret_cast(c); } static ClientRpcContext* detag(void* t) { @@ -104,7 +103,7 @@ class ClientRpcContextUnaryImpl : public ClientRpcContext { alarm_.reset(new Alarm(cq_, next_issue_(), ClientRpcContext::tag(this))); } } - bool RunNextState(bool ok, Histogram* hist) GRPC_OVERRIDE { + bool RunNextState(bool ok, HistogramEntry* entry) GRPC_OVERRIDE { switch (next_state_) { case State::READY: start_ = UsageTimer::Now(); @@ -114,7 +113,7 @@ class ClientRpcContextUnaryImpl : public ClientRpcContext { next_state_ = State::RESP_DONE; return true; case State::RESP_DONE: - hist->Add((UsageTimer::Now() - start_) * 1e9); + entry->set_value((UsageTimer::Now() - start_) * 1e9); callback_(status_, &response_); next_state_ = State::INVALID; return false; @@ -201,7 +200,7 @@ class AsyncClient : public ClientImpl { } } - bool ThreadFunc(Histogram* histogram, + bool ThreadFunc(HistogramEntry* entry, size_t thread_idx) GRPC_OVERRIDE GRPC_FINAL { void* got_tag; bool ok; @@ -209,7 +208,7 @@ class AsyncClient : public ClientImpl { if (cli_cqs_[thread_idx]->Next(&got_tag, &ok)) { // Got a regular event, so process it ClientRpcContext* ctx = ClientRpcContext::detag(got_tag); - if (!ctx->RunNextState(ok, histogram)) { + if (!ctx->RunNextState(ok, entry)) { // The RPC and callback are done, so clone the ctx // and kickstart the new one auto clone = ctx->StartNewClone(); @@ -298,7 +297,7 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext { stream_ = start_req_(stub_, &context_, cq, ClientRpcContext::tag(this)); next_state_ = State::STREAM_IDLE; } - bool RunNextState(bool ok, Histogram* hist) GRPC_OVERRIDE { + bool RunNextState(bool ok, HistogramEntry* entry) GRPC_OVERRIDE { while (true) { switch (next_state_) { case State::STREAM_IDLE: @@ -330,7 +329,7 @@ class ClientRpcContextStreamingImpl : public ClientRpcContext { return true; break; case State::READ_DONE: - hist->Add((UsageTimer::Now() - start_) * 1e9); + entry->set_value((UsageTimer::Now() - start_) * 1e9); callback_(status_, &response_); next_state_ = State::STREAM_IDLE; break; // loop around @@ -430,7 +429,7 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext { ClientRpcContext::tag(this)); next_state_ = State::STREAM_IDLE; } - bool RunNextState(bool ok, Histogram* hist) GRPC_OVERRIDE { + bool RunNextState(bool ok, HistogramEntry* entry) GRPC_OVERRIDE { while (true) { switch (next_state_) { case State::STREAM_IDLE: @@ -462,7 +461,7 @@ class ClientRpcContextGenericStreamingImpl : public ClientRpcContext { return true; break; case State::READ_DONE: - hist->Add((UsageTimer::Now() - start_) * 1e9); + entry->set_value((UsageTimer::Now() - start_) * 1e9); callback_(status_, &response_); next_state_ = State::STREAM_IDLE; break; // loop around diff --git a/test/cpp/qps/client_sync.cc b/test/cpp/qps/client_sync.cc index c88e95b80e5..f328f492e3d 100644 --- a/test/cpp/qps/client_sync.cc +++ b/test/cpp/qps/client_sync.cc @@ -46,7 +46,6 @@ #include #include #include -#include #include #include #include @@ -55,7 +54,6 @@ #include "src/core/lib/profiling/timers.h" #include "src/proto/grpc/testing/services.grpc.pb.h" #include "test/cpp/qps/client.h" -#include "test/cpp/qps/histogram.h" #include "test/cpp/qps/interarrival.h" #include "test/cpp/qps/usage_timer.h" @@ -100,7 +98,7 @@ class SynchronousUnaryClient GRPC_FINAL : public SynchronousClient { } ~SynchronousUnaryClient() { EndThreads(); } - bool ThreadFunc(Histogram* histogram, size_t thread_idx) GRPC_OVERRIDE { + bool ThreadFunc(HistogramEntry* entry, size_t thread_idx) GRPC_OVERRIDE { WaitToIssue(thread_idx); auto* stub = channels_[thread_idx % channels_.size()].get_stub(); double start = UsageTimer::Now(); @@ -108,7 +106,7 @@ class SynchronousUnaryClient GRPC_FINAL : public SynchronousClient { grpc::ClientContext context; grpc::Status s = stub->UnaryCall(&context, request_, &responses_[thread_idx]); - histogram->Add((UsageTimer::Now() - start) * 1e9); + entry->set_value((UsageTimer::Now() - start) * 1e9); return s.ok(); } }; @@ -139,13 +137,13 @@ class SynchronousStreamingClient GRPC_FINAL : public SynchronousClient { delete[] context_; } - bool ThreadFunc(Histogram* histogram, size_t thread_idx) GRPC_OVERRIDE { + bool ThreadFunc(HistogramEntry* entry, size_t thread_idx) GRPC_OVERRIDE { WaitToIssue(thread_idx); GPR_TIMER_SCOPE("SynchronousStreamingClient::ThreadFunc", 0); double start = UsageTimer::Now(); if (stream_[thread_idx]->Write(request_) && stream_[thread_idx]->Read(&responses_[thread_idx])) { - histogram->Add((UsageTimer::Now() - start) * 1e9); + entry->set_value((UsageTimer::Now() - start) * 1e9); return true; } return false; From f782465fba11864293d858ba91d5e715fc481d7d Mon Sep 17 00:00:00 2001 From: Vijay Pai Date: Fri, 8 Jul 2016 10:33:10 -0700 Subject: [PATCH 1527/1894] Fix some shutdown errors related to CQ/join ordering --- test/cpp/qps/client_async.cc | 43 +++++++++++++++++++++++++----------- test/cpp/qps/qps_worker.cc | 2 ++ 2 files changed, 32 insertions(+), 13 deletions(-) diff --git a/test/cpp/qps/client_async.cc b/test/cpp/qps/client_async.cc index 963a1e1cd05..057e5a0d6be 100644 --- a/test/cpp/qps/client_async.cc +++ b/test/cpp/qps/client_async.cc @@ -189,14 +189,7 @@ class AsyncClient : public ClientImpl { } } virtual ~AsyncClient() { - for (auto cq = cli_cqs_.begin(); cq != cli_cqs_.end(); cq++) { - (*cq)->Shutdown(); - void* got_tag; - bool ok; - while ((*cq)->Next(&got_tag, &ok)) { - delete ClientRpcContext::detag(got_tag); - } - } + FinalShutdownCQs(); } bool ThreadFunc(HistogramEntry* entry, @@ -216,14 +209,29 @@ class AsyncClient : public ClientImpl { delete ctx; } return true; - } else { // queue is shutting down - return false; + } else { // queue is shutting down, so we must be done + return true; } } protected: const int num_async_threads_; + void ShutdownCQs() { + for (auto cq = cli_cqs_.begin(); cq != cli_cqs_.end(); cq++) { + (*cq)->Shutdown(); + } + } + void FinalShutdownCQs() { + for (auto cq = cli_cqs_.begin(); cq != cli_cqs_.end(); cq++) { + void* got_tag; + bool ok; + while ((*cq)->Next(&got_tag, &ok)) { + delete ClientRpcContext::detag(got_tag); + } + } + } + private: int NumThreads(const ClientConfig& config) { int num_threads = config.async_client_threads(); @@ -251,7 +259,10 @@ class AsyncUnaryClient GRPC_FINAL config, SetupCtx, BenchmarkStubCreator) { StartThreads(num_async_threads_); } - ~AsyncUnaryClient() GRPC_OVERRIDE { EndThreads(); } + ~AsyncUnaryClient() GRPC_OVERRIDE { + ShutdownCQs(); + EndThreads(); + } private: static void CheckDone(grpc::Status s, SimpleResponse* response) {} @@ -380,7 +391,10 @@ class AsyncStreamingClient GRPC_FINAL StartThreads(num_async_threads_); } - ~AsyncStreamingClient() GRPC_OVERRIDE { EndThreads(); } + ~AsyncStreamingClient() GRPC_OVERRIDE { + ShutdownCQs(); + EndThreads(); + } private: static void CheckDone(grpc::Status s, SimpleResponse* response) {} @@ -516,7 +530,10 @@ class GenericAsyncStreamingClient GRPC_FINAL StartThreads(num_async_threads_); } - ~GenericAsyncStreamingClient() GRPC_OVERRIDE { EndThreads(); } + ~GenericAsyncStreamingClient() GRPC_OVERRIDE { + ShutdownCQs(); + EndThreads(); + } private: static void CheckDone(grpc::Status s, ByteBuffer* response) {} diff --git a/test/cpp/qps/qps_worker.cc b/test/cpp/qps/qps_worker.cc index 8456fde0ed3..49ef52895c2 100644 --- a/test/cpp/qps/qps_worker.cc +++ b/test/cpp/qps/qps_worker.cc @@ -128,6 +128,7 @@ class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service { ScopedProfile profile("qps_client.prof", false); Status ret = RunClientBody(ctx, stream); + gpr_log(GPR_INFO, "RunClient: Returning"); return ret; } @@ -141,6 +142,7 @@ class WorkerServiceImpl GRPC_FINAL : public WorkerService::Service { ScopedProfile profile("qps_server.prof", false); Status ret = RunServerBody(ctx, stream); + gpr_log(GPR_INFO, "RunServer: Returning"); return ret; } From bcd1015320200ecf3222f885023e2c50003f39c4 Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Fri, 8 Jul 2016 10:40:33 -0700 Subject: [PATCH 1528/1894] php: update composer.json require-dev --- composer.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 05ac0037146..6e7f24b451e 100644 --- a/composer.json +++ b/composer.json @@ -13,8 +13,10 @@ ], "require": { "php": ">=5.5.0", - "datto/protobuf-php": "dev-master", - "google/auth": "v0.7" + "datto/protobuf-php": "dev-master" + }, + "require-dev": { + "google/auth": "v0.9" }, "autoload": { "psr-4": { From 2b220f8be7c80d4d51f9506f359608fce3b78ccb Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Fri, 8 Jul 2016 10:47:57 -0700 Subject: [PATCH 1529/1894] fixes #7219 Modified objc plugin to add two types of import statements for well known protos. Deleted unnecessary empty.proto as we'll be using wellknown empty.proto Modified test to use the well known empty.proto. --- src/compiler/objective_c_plugin.cc | 20 ++++++++- src/objective-c/tests/InteropTests.m | 12 ++--- .../tests/RemoteTestClient/RemoteTest.podspec | 4 +- .../tests/RemoteTestClient/empty.proto | 44 ------------------- .../tests/RemoteTestClient/test.proto | 4 +- 5 files changed, 29 insertions(+), 55 deletions(-) delete mode 100644 src/objective-c/tests/RemoteTestClient/empty.proto diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index 3ccfd5b037c..43e4b3647d0 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -39,6 +39,8 @@ #include "src/compiler/objective_c_generator.h" #include "src/compiler/objective_c_generator_helpers.h" +#include + class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { public: ObjectiveCGrpcGenerator() {} @@ -72,7 +74,21 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { for (int i = 0; i < file->dependency_count(); i++) { ::grpc::string header = grpc_objective_c_generator::MessageHeaderName( file->dependency(i)); - proto_imports += ::grpc::string("#import \"") + header + "\"\n"; + const grpc::protobuf::FileDescriptor *dependency = file->dependency(i); + if (::google::protobuf::compiler::objectivec::IsProtobufLibraryBundledProtoFile(dependency)) { + ::grpc::string base_name = header; + grpc_generator::StripPrefix(&base_name, "google/protobuf/"); + proto_imports += + ::grpc::string("#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS\n") + + ::grpc::string(" #import <") + + ::google::protobuf::compiler::objectivec::ProtobufLibraryFrameworkName + + ("/") + base_name + ">\n" + + ::grpc::string("#else\n") + + ::grpc::string(" #import \"") + header + "\"\n" + + ::grpc::string("#endif\n"); + } else { + proto_imports += ::grpc::string("#import \"") + header + "\"\n"; + } } ::grpc::string declarations; @@ -85,7 +101,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { static const ::grpc::string kNonNullEnd = "\nNS_ASSUME_NONNULL_END\n"; Write(context, file_name + ".pbrpc.h", - imports + '\n' + proto_imports + '\n' + kNonNullBegin + + imports + '\n' + proto_imports + '\n' + kNonNullBegin + declarations + kNonNullEnd); } diff --git a/src/objective-c/tests/InteropTests.m b/src/objective-c/tests/InteropTests.m index a503f020591..a2f63ac40ca 100644 --- a/src/objective-c/tests/InteropTests.m +++ b/src/objective-c/tests/InteropTests.m @@ -110,12 +110,12 @@ static cronet_engine *cronetEngine = NULL; XCTAssertNotNil(self.class.host); __weak XCTestExpectation *expectation = [self expectationWithDescription:@"EmptyUnary"]; - RMTEmpty *request = [RMTEmpty message]; + GPBEmpty *request = [GPBEmpty message]; - [_service emptyCallWithRequest:request handler:^(RMTEmpty *response, NSError *error) { + [_service emptyCallWithRequest:request handler:^(GPBEmpty *response, NSError *error) { XCTAssertNil(error, @"Finished with unexpected error: %@", error); - id expectedResponse = [RMTEmpty message]; + id expectedResponse = [GPBEmpty message]; XCTAssertEqualObjects(response, expectedResponse); [expectation fulfill]; @@ -343,9 +343,9 @@ static cronet_engine *cronetEngine = NULL; __weak XCTestExpectation *expectation = [self expectationWithDescription:@"RPC after closing connection"]; - RMTEmpty *request = [RMTEmpty message]; + GPBEmpty *request = [GPBEmpty message]; - [_service emptyCallWithRequest:request handler:^(RMTEmpty *response, NSError *error) { + [_service emptyCallWithRequest:request handler:^(GPBEmpty *response, NSError *error) { XCTAssertNil(error, @"First RPC finished with unexpected error: %@", error); #pragma clang diagnostic push @@ -353,7 +353,7 @@ static cronet_engine *cronetEngine = NULL; [GRPCCall closeOpenConnections]; #pragma clang diagnostic pop - [_service emptyCallWithRequest:request handler:^(RMTEmpty *response, NSError *error) { + [_service emptyCallWithRequest:request handler:^(GPBEmpty *response, NSError *error) { XCTAssertNil(error, @"Second RPC finished with unexpected error: %@", error); [expectation fulfill]; }]; diff --git a/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec b/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec index 887380eb55f..25c9c7f8418 100644 --- a/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec +++ b/src/objective-c/tests/RemoteTestClient/RemoteTest.podspec @@ -15,7 +15,9 @@ Pod::Spec.new do |s| BINDIR=../../../../bins/$CONFIG PROTOC=$BINDIR/protobuf/protoc PLUGIN=$BINDIR/grpc_objective_c_plugin - $PROTOC --plugin=protoc-gen-grpc=$PLUGIN --objc_out=. --grpc_out=. *.proto + # we use this path to locate well-known proto files + PROTO_SRC=../../../../third_party/protobuf/src + $PROTOC --plugin=protoc-gen-grpc=$PLUGIN --objc_out=. --grpc_out=. *.proto -I $PROTO_SRC -I . CMD s.subspec "Messages" do |ms| diff --git a/src/objective-c/tests/RemoteTestClient/empty.proto b/src/objective-c/tests/RemoteTestClient/empty.proto deleted file mode 100644 index a678048289e..00000000000 --- a/src/objective-c/tests/RemoteTestClient/empty.proto +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright 2015, Google Inc. -// All rights reserved. -// -// Redistribution and use in source and binary forms, with or without -// modification, are permitted provided that the following conditions are -// met: -// -// * Redistributions of source code must retain the above copyright -// notice, this list of conditions and the following disclaimer. -// * Redistributions in binary form must reproduce the above -// copyright notice, this list of conditions and the following disclaimer -// in the documentation and/or other materials provided with the -// distribution. -// * Neither the name of Google Inc. nor the names of its -// contributors may be used to endorse or promote products derived from -// this software without specific prior written permission. -// -// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS -// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT -// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR -// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT -// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, -// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT -// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, -// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY -// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -syntax = "proto3"; - -package grpc.testing; - -option objc_class_prefix = "RMT"; - -// An empty message that you can re-use to avoid defining duplicated empty -// messages in your project. A typical example is to use it as argument or the -// return value of a service API. For instance: -// -// service Foo { -// rpc Bar (grpc.testing.Empty) returns (grpc.testing.Empty) { }; -// }; -// -message Empty {} diff --git a/src/objective-c/tests/RemoteTestClient/test.proto b/src/objective-c/tests/RemoteTestClient/test.proto index 514c3b80955..5c359c5c129 100644 --- a/src/objective-c/tests/RemoteTestClient/test.proto +++ b/src/objective-c/tests/RemoteTestClient/test.proto @@ -31,7 +31,7 @@ // of unary/streaming requests/responses. syntax = "proto3"; -import "empty.proto"; +import "google/protobuf/empty.proto"; import "messages.proto"; package grpc.testing; @@ -42,7 +42,7 @@ option objc_class_prefix = "RMT"; // performance with various types of payload. service TestService { // One empty request followed by one empty response. - rpc EmptyCall(grpc.testing.Empty) returns (grpc.testing.Empty); + rpc EmptyCall(google.protobuf.Empty) returns (google.protobuf.Empty); // One request followed by one response. rpc UnaryCall(SimpleRequest) returns (SimpleResponse); From 771dc7546a34fe2d93159c443cbb58244b0b2274 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Mon, 6 Jun 2016 19:25:36 -0700 Subject: [PATCH 1530/1894] Remove misleading diagnostics message --- src/python/grpcio/support.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/python/grpcio/support.py b/src/python/grpcio/support.py index 33244eb388e..7730374df08 100644 --- a/src/python/grpcio/support.py +++ b/src/python/grpcio/support.py @@ -50,7 +50,6 @@ Could not find . This could mean the following: (check your environment variables or try re-installing?) * You're on Windows and your Python installation was somehow corrupted (check your environment variables or try re-installing?) - * Note: Windows users should look into installing `vcpython27`. """ C_CHECKS = { From af26ce6f4383a6c0e70d4c58f276ec4f2a722dfa Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Sun, 5 Jun 2016 16:47:37 -0700 Subject: [PATCH 1531/1894] Remove unnecessary fcntl module import --- src/python/grpcio_tests/tests/_runner.py | 1 - 1 file changed, 1 deletion(-) diff --git a/src/python/grpcio_tests/tests/_runner.py b/src/python/grpcio_tests/tests/_runner.py index f0718573e2c..81c6100feda 100644 --- a/src/python/grpcio_tests/tests/_runner.py +++ b/src/python/grpcio_tests/tests/_runner.py @@ -30,7 +30,6 @@ from __future__ import absolute_import import collections -import fcntl import multiprocessing import os import select From 46cc9eebb17b2711515007d7af9108cd0d78788a Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Fri, 8 Jul 2016 11:42:07 -0700 Subject: [PATCH 1532/1894] addressed feedback using 'using'. Removed unnecessary grpc::string. fixed indentation. --- src/compiler/objective_c_plugin.cc | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index 43e4b3647d0..3878a332515 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -41,6 +41,9 @@ #include +using ::google::protobuf::compiler::objectivec::ProtobufLibraryFrameworkName; +using ::google::protobuf::compiler::objectivec::IsProtobufLibraryBundledProtoFile; + class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { public: ObjectiveCGrpcGenerator() {} @@ -75,17 +78,16 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { ::grpc::string header = grpc_objective_c_generator::MessageHeaderName( file->dependency(i)); const grpc::protobuf::FileDescriptor *dependency = file->dependency(i); - if (::google::protobuf::compiler::objectivec::IsProtobufLibraryBundledProtoFile(dependency)) { + if (IsProtobufLibraryBundledProtoFile(dependency)) { ::grpc::string base_name = header; grpc_generator::StripPrefix(&base_name, "google/protobuf/"); proto_imports += - ::grpc::string("#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS\n") + - ::grpc::string(" #import <") + - ::google::protobuf::compiler::objectivec::ProtobufLibraryFrameworkName + - ("/") + base_name + ">\n" + - ::grpc::string("#else\n") + - ::grpc::string(" #import \"") + header + "\"\n" + - ::grpc::string("#endif\n"); + "#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS\n" + " #import <" + ::grpc::string(ProtobufLibraryFrameworkName) + + "/" + base_name + ">\n" + "#else\n" + " #import \"" + header + "\"\n" + "#endif\n"; } else { proto_imports += ::grpc::string("#import \"") + header + "\"\n"; } From f17f0f6b071fe42f0d57e6b2f08d797bcbcad88a Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Fri, 8 Jul 2016 12:07:49 -0700 Subject: [PATCH 1533/1894] Fallback to generating files if not generated Even if GRPC_PYTHON_BUILD_WITH_CYTHON is not specified, if the files are not present then we will fall back to generating with Cython. This relegates GRPC_PYTHON_BUILD_WITH_CYTHON to providing a regeneration option rather than being a necessary build environment variable. --- setup.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/setup.py b/setup.py index d9c46ba77a1..2eeb37db830 100644 --- a/setup.py +++ b/setup.py @@ -64,7 +64,9 @@ LICENSE = '3-clause BSD' # Environment variable to determine whether or not the Cython extension should # *use* Cython or use the generated C files. Note that this requires the C files -# to have been generated by building first *with* Cython support. +# to have been generated by building first *with* Cython support. Even if this +# is set to false, if the script detects that the generated `.c` file isn't +# present, then it will still attempt to use Cython. BUILD_WITH_CYTHON = os.environ.get('GRPC_PYTHON_BUILD_WITH_CYTHON', False) # Environment variable to determine whether or not to enable coverage analysis @@ -129,10 +131,20 @@ def cython_extensions(module_names, extra_sources, include_dirs, if ENABLE_CYTHON_TRACING: define_macros = define_macros + [('CYTHON_TRACE_NOGIL', 1)] cython_compiler_directives['linetrace'] = True - file_extension = 'pyx' if build_with_cython else 'c' - module_files = [os.path.join(PYTHON_STEM, - name.replace('.', '/') + '.' + file_extension) - for name in module_names] + pyx_module_files = [os.path.join(PYTHON_STEM, + name.replace('.', '/') + '.pyx') + for name in module_names] + c_module_files = [os.path.join(PYTHON_STEM, + name.replace('.', '/') + '.c') + for name in module_names] + if not build_with_cython: + for module_file in c_module_files: + if not os.path.isfile(module_file): + sys.stderr.write('Cython-generated files are missing; ' + 'forcing Cython build...\n') + build_with_cython = True + break + module_files = pyx_module_files if build_with_cython else c_module_files extensions = [ _extension.Extension( name=module_name, From 586e3835fe01257299a8573df3e7540e5778bc45 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Fri, 3 Jun 2016 19:29:12 -0700 Subject: [PATCH 1534/1894] Make Python build standalone on Windows --- PYTHON-MANIFEST.in | 1 + setup.py | 29 +- src/python/grpcio/build.py | 117 +++ .../grpcio/grpc/_cython/imports.generated.c | 557 +----------- .../grpcio/grpc/_cython/imports.generated.h | 852 +----------------- src/python/grpcio/grpc/_cython/loader.c | 29 +- src/python/grpcio/grpc/_cython/loader.h | 2 + .../grpc/_cython/imports.generated.c.template | 22 +- .../grpc/_cython/imports.generated.h.template | 29 +- tools/distrib/python/grpcio_tools/setup.py | 15 +- tools/run_tests/build_python.sh | 15 +- 11 files changed, 172 insertions(+), 1496 deletions(-) create mode 100644 src/python/grpcio/build.py diff --git a/PYTHON-MANIFEST.in b/PYTHON-MANIFEST.in index 635e77b875c..175a47f1576 100644 --- a/PYTHON-MANIFEST.in +++ b/PYTHON-MANIFEST.in @@ -7,6 +7,7 @@ graft include/grpc graft third_party/boringssl graft third_party/nanopb graft third_party/zlib +include src/python/grpcio/build.py include src/python/grpcio/commands.py include src/python/grpcio/grpc_version.py include src/python/grpcio/grpc_core_dependencies.py diff --git a/setup.py b/setup.py index d9c46ba77a1..c6d3da72994 100644 --- a/setup.py +++ b/setup.py @@ -31,6 +31,7 @@ import os import os.path +import platform import shlex import shutil import sys @@ -56,10 +57,15 @@ os.chdir(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, os.path.abspath(PYTHON_STEM)) # Break import-style to ensure we can actually find our in-repo dependencies. +import build import commands import grpc_core_dependencies import grpc_version +# TODO(atash) make this conditional on being on a mingw32 build +build.monkeypatch_unix_compiler() + + LICENSE = '3-clause BSD' # Environment variable to determine whether or not the Cython extension should @@ -72,6 +78,14 @@ BUILD_WITH_CYTHON = os.environ.get('GRPC_PYTHON_BUILD_WITH_CYTHON', False) ENABLE_CYTHON_TRACING = os.environ.get( 'GRPC_PYTHON_ENABLE_CYTHON_TRACING', False) +# There are some situations (like on Windows) where CC, CFLAGS, and LDFLAGS are +# entirely ignored/dropped/forgotten by distutils and its Cygwin/MinGW support. +# We use these environment variables to thus get around that without locking +# ourselves in w.r.t. the multitude of operating systems this ought to build on. +# By default we assume a GCC-like compiler. +EXTRA_COMPILE_ARGS = shlex.split(os.environ.get('GRPC_PYTHON_CFLAGS', '')) +EXTRA_LINK_ARGS = shlex.split(os.environ.get('GRPC_PYTHON_LDFLAGS', '')) + CYTHON_EXTENSION_PACKAGE_NAMES = () CYTHON_EXTENSION_MODULE_NAMES = ('grpc._cython.cygrpc',) @@ -81,9 +95,7 @@ CYTHON_HELPER_C_FILES = ( os.path.join(PYTHON_STEM, 'grpc/_cython/imports.generated.c'), ) -CORE_C_FILES = () -if not "win32" in sys.platform: - CORE_C_FILES += tuple(grpc_core_dependencies.CORE_SOURCE_FILES) +CORE_C_FILES = tuple(grpc_core_dependencies.CORE_SOURCE_FILES) EXTENSION_INCLUDE_DIRECTORIES = ( (PYTHON_STEM,) + CORE_INCLUDE + BORINGSSL_INCLUDE + ZLIB_INCLUDE) @@ -93,12 +105,17 @@ if "linux" in sys.platform: EXTENSION_LIBRARIES += ('rt',) if not "win32" in sys.platform: EXTENSION_LIBRARIES += ('m',) +if "win32" in sys.platform: + EXTENSION_LIBRARIES += ('ws2_32',) DEFINE_MACROS = (('OPENSSL_NO_ASM', 1), ('_WIN32_WINNT', 0x600), ('GPR_BACKWARDS_COMPATIBILITY_MODE', 1),) +if "win32" in sys.platform: + DEFINE_MACROS += (('OPENSSL_WINDOWS', 1), ('WIN32_LEAN_AND_MEAN', 1),) + if '64bit' in platform.architecture()[0]: + DEFINE_MACROS += (('MS_WIN64', 1),) -LDFLAGS = shlex.split(os.environ.get('GRPC_PYTHON_LDFLAGS', '')) -CFLAGS = shlex.split(os.environ.get('GRPC_PYTHON_CFLAGS', '')) - +LDFLAGS = tuple(EXTRA_LINK_ARGS) +CFLAGS = tuple(EXTRA_COMPILE_ARGS) if "linux" in sys.platform: LDFLAGS += ('-Wl,-wrap,memcpy',) if "linux" in sys.platform or "darwin" in sys.platform: diff --git a/src/python/grpcio/build.py b/src/python/grpcio/build.py new file mode 100644 index 00000000000..df5b54cf69c --- /dev/null +++ b/src/python/grpcio/build.py @@ -0,0 +1,117 @@ +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +"""Covers inadequacies in distutils.""" + +from distutils import ccompiler +from distutils import errors +from distutils import unixccompiler +import os +import os.path +import shutil +import sys +import tempfile + + +def _unix_piecemeal_link( + self, target_desc, objects, output_filename, output_dir=None, + libraries=None, library_dirs=None, runtime_library_dirs=None, + export_symbols=None, debug=0, extra_preargs=None, extra_postargs=None, + build_temp=None, target_lang=None): + """`link` externalized method taken almost verbatim from UnixCCompiler. + + Modifies the link command for unix-like compilers by using a command file so + that long command line argument strings don't break the command shell's + ARG_MAX character limit. + """ + objects, output_dir = self._fix_object_args(objects, output_dir) + libraries, library_dirs, runtime_library_dirs = self._fix_lib_args( + libraries, library_dirs, runtime_library_dirs) + # filter out standard library paths, which are not explicitely needed + # for linking + library_dirs = [dir for dir in library_dirs + if not dir in ('/lib', '/lib64', '/usr/lib', '/usr/lib64')] + runtime_library_dirs = [dir for dir in runtime_library_dirs + if not dir in ('/lib', '/lib64', '/usr/lib', '/usr/lib64')] + lib_opts = ccompiler.gen_lib_options(self, library_dirs, runtime_library_dirs, + libraries) + if not isinstance(output_dir, basestring) and output_dir is not None: + raise TypeError, "'output_dir' must be a string or None" + if output_dir is not None: + output_filename = os.path.join(output_dir, output_filename) + + if self._need_link(objects, output_filename): + ld_args = (objects + self.objects + + lib_opts + ['-o', output_filename]) + if debug: + ld_args[:0] = ['-g'] + if extra_preargs: + ld_args[:0] = extra_preargs + if extra_postargs: + ld_args.extend(extra_postargs) + self.mkpath(os.path.dirname(output_filename)) + try: + if target_desc == ccompiler.CCompiler.EXECUTABLE: + linker = self.linker_exe[:] + else: + linker = self.linker_so[:] + if target_lang == "c++" and self.compiler_cxx: + # skip over environment variable settings if /usr/bin/env + # is used to set up the linker's environment. + # This is needed on OSX. Note: this assumes that the + # normal and C++ compiler have the same environment + # settings. + i = 0 + if os.path.basename(linker[0]) == "env": + i = 1 + while '=' in linker[i]: + i = i + 1 + + linker[i] = self.compiler_cxx[i] + + if sys.platform == 'darwin': + import _osx_support + linker = _osx_support.compiler_fixup(linker, ld_args) + + temporary_directory = tempfile.mkdtemp() + command_filename = os.path.abspath( + os.path.join(temporary_directory, 'command')) + with open(command_filename, 'w') as command_file: + escaped_ld_args = [arg.replace('\\', '\\\\') for arg in ld_args] + command_file.write(' '.join(escaped_ld_args)) + self.spawn(linker + ['@{}'.format(command_filename)]) + except errors.DistutilsExecError, msg: + raise ccompiler.LinkError, msg + else: + log.debug("skipping %s (up-to-date)", output_filename) + +def monkeypatch_unix_compiler(): + """Monkeypatching is dumb, but it's either that or we become maintainers of + something much, much bigger.""" + unixccompiler.UnixCCompiler.link = _unix_piecemeal_link diff --git a/src/python/grpcio/grpc/_cython/imports.generated.c b/src/python/grpcio/grpc/_cython/imports.generated.c index d78ec2f66ed..c0080b5a47a 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.c +++ b/src/python/grpcio/grpc/_cython/imports.generated.c @@ -31,562 +31,7 @@ * */ +/* TODO(atash) remove cruft */ #include #include "imports.generated.h" - -#ifdef GPR_WINDOWS - -census_initialize_type census_initialize_import; -census_shutdown_type census_shutdown_import; -census_supported_type census_supported_import; -census_enabled_type census_enabled_import; -census_context_create_type census_context_create_import; -census_context_destroy_type census_context_destroy_import; -census_context_get_status_type census_context_get_status_import; -census_context_initialize_iterator_type census_context_initialize_iterator_import; -census_context_next_tag_type census_context_next_tag_import; -census_context_get_tag_type census_context_get_tag_import; -census_context_encode_type census_context_encode_import; -census_context_decode_type census_context_decode_import; -census_trace_mask_type census_trace_mask_import; -census_set_trace_mask_type census_set_trace_mask_import; -census_start_rpc_op_timestamp_type census_start_rpc_op_timestamp_import; -census_start_client_rpc_op_type census_start_client_rpc_op_import; -census_set_rpc_client_peer_type census_set_rpc_client_peer_import; -census_start_server_rpc_op_type census_start_server_rpc_op_import; -census_start_op_type census_start_op_import; -census_end_op_type census_end_op_import; -census_trace_print_type census_trace_print_import; -census_trace_scan_start_type census_trace_scan_start_import; -census_get_trace_record_type census_get_trace_record_import; -census_trace_scan_end_type census_trace_scan_end_import; -census_record_values_type census_record_values_import; -census_view_create_type census_view_create_import; -census_view_delete_type census_view_delete_import; -census_view_metric_type census_view_metric_import; -census_view_naggregations_type census_view_naggregations_import; -census_view_tags_type census_view_tags_import; -census_view_aggregrations_type census_view_aggregrations_import; -census_view_get_data_type census_view_get_data_import; -census_view_reset_type census_view_reset_import; -grpc_compression_algorithm_parse_type grpc_compression_algorithm_parse_import; -grpc_compression_algorithm_name_type grpc_compression_algorithm_name_import; -grpc_compression_algorithm_for_level_type grpc_compression_algorithm_for_level_import; -grpc_compression_options_init_type grpc_compression_options_init_import; -grpc_compression_options_enable_algorithm_type grpc_compression_options_enable_algorithm_import; -grpc_compression_options_disable_algorithm_type grpc_compression_options_disable_algorithm_import; -grpc_compression_options_is_algorithm_enabled_type grpc_compression_options_is_algorithm_enabled_import; -grpc_metadata_array_init_type grpc_metadata_array_init_import; -grpc_metadata_array_destroy_type grpc_metadata_array_destroy_import; -grpc_call_details_init_type grpc_call_details_init_import; -grpc_call_details_destroy_type grpc_call_details_destroy_import; -grpc_register_plugin_type grpc_register_plugin_import; -grpc_init_type grpc_init_import; -grpc_shutdown_type grpc_shutdown_import; -grpc_version_string_type grpc_version_string_import; -grpc_completion_queue_create_type grpc_completion_queue_create_import; -grpc_completion_queue_next_type grpc_completion_queue_next_import; -grpc_completion_queue_pluck_type grpc_completion_queue_pluck_import; -grpc_completion_queue_shutdown_type grpc_completion_queue_shutdown_import; -grpc_completion_queue_destroy_type grpc_completion_queue_destroy_import; -grpc_alarm_create_type grpc_alarm_create_import; -grpc_alarm_cancel_type grpc_alarm_cancel_import; -grpc_alarm_destroy_type grpc_alarm_destroy_import; -grpc_channel_check_connectivity_state_type grpc_channel_check_connectivity_state_import; -grpc_channel_watch_connectivity_state_type grpc_channel_watch_connectivity_state_import; -grpc_channel_create_call_type grpc_channel_create_call_import; -grpc_channel_ping_type grpc_channel_ping_import; -grpc_channel_register_call_type grpc_channel_register_call_import; -grpc_channel_create_registered_call_type grpc_channel_create_registered_call_import; -grpc_call_start_batch_type grpc_call_start_batch_import; -grpc_call_get_peer_type grpc_call_get_peer_import; -grpc_census_call_set_context_type grpc_census_call_set_context_import; -grpc_census_call_get_context_type grpc_census_call_get_context_import; -grpc_channel_get_target_type grpc_channel_get_target_import; -grpc_insecure_channel_create_type grpc_insecure_channel_create_import; -grpc_lame_client_channel_create_type grpc_lame_client_channel_create_import; -grpc_channel_destroy_type grpc_channel_destroy_import; -grpc_call_cancel_type grpc_call_cancel_import; -grpc_call_cancel_with_status_type grpc_call_cancel_with_status_import; -grpc_call_destroy_type grpc_call_destroy_import; -grpc_server_request_call_type grpc_server_request_call_import; -grpc_server_register_method_type grpc_server_register_method_import; -grpc_server_request_registered_call_type grpc_server_request_registered_call_import; -grpc_server_create_type grpc_server_create_import; -grpc_server_register_completion_queue_type grpc_server_register_completion_queue_import; -grpc_server_register_non_listening_completion_queue_type grpc_server_register_non_listening_completion_queue_import; -grpc_server_add_insecure_http2_port_type grpc_server_add_insecure_http2_port_import; -grpc_server_start_type grpc_server_start_import; -grpc_server_shutdown_and_notify_type grpc_server_shutdown_and_notify_import; -grpc_server_cancel_all_calls_type grpc_server_cancel_all_calls_import; -grpc_server_destroy_type grpc_server_destroy_import; -grpc_tracer_set_enabled_type grpc_tracer_set_enabled_import; -grpc_header_key_is_legal_type grpc_header_key_is_legal_import; -grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_import; -grpc_is_binary_header_type grpc_is_binary_header_import; -grpc_call_error_to_string_type grpc_call_error_to_string_import; -grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; -grpc_server_add_insecure_channel_from_fd_type grpc_server_add_insecure_channel_from_fd_import; -grpc_use_signal_type grpc_use_signal_import; -grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; -grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import; -grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import; -grpc_auth_context_find_properties_by_name_type grpc_auth_context_find_properties_by_name_import; -grpc_auth_context_peer_identity_property_name_type grpc_auth_context_peer_identity_property_name_import; -grpc_auth_context_peer_is_authenticated_type grpc_auth_context_peer_is_authenticated_import; -grpc_call_auth_context_type grpc_call_auth_context_import; -grpc_auth_context_release_type grpc_auth_context_release_import; -grpc_auth_context_add_property_type grpc_auth_context_add_property_import; -grpc_auth_context_add_cstring_property_type grpc_auth_context_add_cstring_property_import; -grpc_auth_context_set_peer_identity_property_name_type grpc_auth_context_set_peer_identity_property_name_import; -grpc_channel_credentials_release_type grpc_channel_credentials_release_import; -grpc_google_default_credentials_create_type grpc_google_default_credentials_create_import; -grpc_set_ssl_roots_override_callback_type grpc_set_ssl_roots_override_callback_import; -grpc_ssl_credentials_create_type grpc_ssl_credentials_create_import; -grpc_call_credentials_release_type grpc_call_credentials_release_import; -grpc_composite_channel_credentials_create_type grpc_composite_channel_credentials_create_import; -grpc_composite_call_credentials_create_type grpc_composite_call_credentials_create_import; -grpc_google_compute_engine_credentials_create_type grpc_google_compute_engine_credentials_create_import; -grpc_max_auth_token_lifetime_type grpc_max_auth_token_lifetime_import; -grpc_service_account_jwt_access_credentials_create_type grpc_service_account_jwt_access_credentials_create_import; -grpc_google_refresh_token_credentials_create_type grpc_google_refresh_token_credentials_create_import; -grpc_access_token_credentials_create_type grpc_access_token_credentials_create_import; -grpc_google_iam_credentials_create_type grpc_google_iam_credentials_create_import; -grpc_metadata_credentials_create_from_plugin_type grpc_metadata_credentials_create_from_plugin_import; -grpc_secure_channel_create_type grpc_secure_channel_create_import; -grpc_server_credentials_release_type grpc_server_credentials_release_import; -grpc_ssl_server_credentials_create_type grpc_ssl_server_credentials_create_import; -grpc_ssl_server_credentials_create_ex_type grpc_ssl_server_credentials_create_ex_import; -grpc_server_add_secure_http2_port_type grpc_server_add_secure_http2_port_import; -grpc_call_set_credentials_type grpc_call_set_credentials_import; -grpc_server_credentials_set_auth_metadata_processor_type grpc_server_credentials_set_auth_metadata_processor_import; -gpr_malloc_type gpr_malloc_import; -gpr_free_type gpr_free_import; -gpr_realloc_type gpr_realloc_import; -gpr_malloc_aligned_type gpr_malloc_aligned_import; -gpr_free_aligned_type gpr_free_aligned_import; -gpr_set_allocation_functions_type gpr_set_allocation_functions_import; -gpr_get_allocation_functions_type gpr_get_allocation_functions_import; -grpc_raw_byte_buffer_create_type grpc_raw_byte_buffer_create_import; -grpc_raw_compressed_byte_buffer_create_type grpc_raw_compressed_byte_buffer_create_import; -grpc_byte_buffer_copy_type grpc_byte_buffer_copy_import; -grpc_byte_buffer_length_type grpc_byte_buffer_length_import; -grpc_byte_buffer_destroy_type grpc_byte_buffer_destroy_import; -grpc_byte_buffer_reader_init_type grpc_byte_buffer_reader_init_import; -grpc_byte_buffer_reader_destroy_type grpc_byte_buffer_reader_destroy_import; -grpc_byte_buffer_reader_next_type grpc_byte_buffer_reader_next_import; -grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_import; -grpc_raw_byte_buffer_from_reader_type grpc_raw_byte_buffer_from_reader_import; -gpr_log_type gpr_log_import; -gpr_log_message_type gpr_log_message_import; -gpr_set_log_verbosity_type gpr_set_log_verbosity_import; -gpr_log_verbosity_init_type gpr_log_verbosity_init_import; -gpr_set_log_function_type gpr_set_log_function_import; -gpr_slice_ref_type gpr_slice_ref_import; -gpr_slice_unref_type gpr_slice_unref_import; -gpr_slice_new_type gpr_slice_new_import; -gpr_slice_new_with_len_type gpr_slice_new_with_len_import; -gpr_slice_malloc_type gpr_slice_malloc_import; -gpr_slice_from_copied_string_type gpr_slice_from_copied_string_import; -gpr_slice_from_copied_buffer_type gpr_slice_from_copied_buffer_import; -gpr_slice_from_static_string_type gpr_slice_from_static_string_import; -gpr_slice_sub_type gpr_slice_sub_import; -gpr_slice_sub_no_ref_type gpr_slice_sub_no_ref_import; -gpr_slice_split_tail_type gpr_slice_split_tail_import; -gpr_slice_split_head_type gpr_slice_split_head_import; -gpr_empty_slice_type gpr_empty_slice_import; -gpr_slice_cmp_type gpr_slice_cmp_import; -gpr_slice_str_cmp_type gpr_slice_str_cmp_import; -gpr_slice_buffer_init_type gpr_slice_buffer_init_import; -gpr_slice_buffer_destroy_type gpr_slice_buffer_destroy_import; -gpr_slice_buffer_add_type gpr_slice_buffer_add_import; -gpr_slice_buffer_add_indexed_type gpr_slice_buffer_add_indexed_import; -gpr_slice_buffer_addn_type gpr_slice_buffer_addn_import; -gpr_slice_buffer_tiny_add_type gpr_slice_buffer_tiny_add_import; -gpr_slice_buffer_pop_type gpr_slice_buffer_pop_import; -gpr_slice_buffer_reset_and_unref_type gpr_slice_buffer_reset_and_unref_import; -gpr_slice_buffer_swap_type gpr_slice_buffer_swap_import; -gpr_slice_buffer_move_into_type gpr_slice_buffer_move_into_import; -gpr_slice_buffer_trim_end_type gpr_slice_buffer_trim_end_import; -gpr_slice_buffer_move_first_type gpr_slice_buffer_move_first_import; -gpr_slice_buffer_take_first_type gpr_slice_buffer_take_first_import; -gpr_mu_init_type gpr_mu_init_import; -gpr_mu_destroy_type gpr_mu_destroy_import; -gpr_mu_lock_type gpr_mu_lock_import; -gpr_mu_unlock_type gpr_mu_unlock_import; -gpr_mu_trylock_type gpr_mu_trylock_import; -gpr_cv_init_type gpr_cv_init_import; -gpr_cv_destroy_type gpr_cv_destroy_import; -gpr_cv_wait_type gpr_cv_wait_import; -gpr_cv_signal_type gpr_cv_signal_import; -gpr_cv_broadcast_type gpr_cv_broadcast_import; -gpr_once_init_type gpr_once_init_import; -gpr_event_init_type gpr_event_init_import; -gpr_event_set_type gpr_event_set_import; -gpr_event_get_type gpr_event_get_import; -gpr_event_wait_type gpr_event_wait_import; -gpr_ref_init_type gpr_ref_init_import; -gpr_ref_type gpr_ref_import; -gpr_ref_non_zero_type gpr_ref_non_zero_import; -gpr_refn_type gpr_refn_import; -gpr_unref_type gpr_unref_import; -gpr_stats_init_type gpr_stats_init_import; -gpr_stats_inc_type gpr_stats_inc_import; -gpr_stats_read_type gpr_stats_read_import; -gpr_time_0_type gpr_time_0_import; -gpr_inf_future_type gpr_inf_future_import; -gpr_inf_past_type gpr_inf_past_import; -gpr_time_init_type gpr_time_init_import; -gpr_now_type gpr_now_import; -gpr_convert_clock_type_type gpr_convert_clock_type_import; -gpr_time_cmp_type gpr_time_cmp_import; -gpr_time_max_type gpr_time_max_import; -gpr_time_min_type gpr_time_min_import; -gpr_time_add_type gpr_time_add_import; -gpr_time_sub_type gpr_time_sub_import; -gpr_time_from_micros_type gpr_time_from_micros_import; -gpr_time_from_nanos_type gpr_time_from_nanos_import; -gpr_time_from_millis_type gpr_time_from_millis_import; -gpr_time_from_seconds_type gpr_time_from_seconds_import; -gpr_time_from_minutes_type gpr_time_from_minutes_import; -gpr_time_from_hours_type gpr_time_from_hours_import; -gpr_time_to_millis_type gpr_time_to_millis_import; -gpr_time_similar_type gpr_time_similar_import; -gpr_sleep_until_type gpr_sleep_until_import; -gpr_timespec_to_micros_type gpr_timespec_to_micros_import; -gpr_avl_create_type gpr_avl_create_import; -gpr_avl_ref_type gpr_avl_ref_import; -gpr_avl_unref_type gpr_avl_unref_import; -gpr_avl_add_type gpr_avl_add_import; -gpr_avl_remove_type gpr_avl_remove_import; -gpr_avl_get_type gpr_avl_get_import; -gpr_avl_maybe_get_type gpr_avl_maybe_get_import; -gpr_avl_is_empty_type gpr_avl_is_empty_import; -gpr_cmdline_create_type gpr_cmdline_create_import; -gpr_cmdline_add_int_type gpr_cmdline_add_int_import; -gpr_cmdline_add_flag_type gpr_cmdline_add_flag_import; -gpr_cmdline_add_string_type gpr_cmdline_add_string_import; -gpr_cmdline_on_extra_arg_type gpr_cmdline_on_extra_arg_import; -gpr_cmdline_set_survive_failure_type gpr_cmdline_set_survive_failure_import; -gpr_cmdline_parse_type gpr_cmdline_parse_import; -gpr_cmdline_destroy_type gpr_cmdline_destroy_import; -gpr_cmdline_usage_string_type gpr_cmdline_usage_string_import; -gpr_cpu_num_cores_type gpr_cpu_num_cores_import; -gpr_cpu_current_cpu_type gpr_cpu_current_cpu_import; -gpr_histogram_create_type gpr_histogram_create_import; -gpr_histogram_destroy_type gpr_histogram_destroy_import; -gpr_histogram_add_type gpr_histogram_add_import; -gpr_histogram_merge_type gpr_histogram_merge_import; -gpr_histogram_percentile_type gpr_histogram_percentile_import; -gpr_histogram_mean_type gpr_histogram_mean_import; -gpr_histogram_stddev_type gpr_histogram_stddev_import; -gpr_histogram_variance_type gpr_histogram_variance_import; -gpr_histogram_maximum_type gpr_histogram_maximum_import; -gpr_histogram_minimum_type gpr_histogram_minimum_import; -gpr_histogram_count_type gpr_histogram_count_import; -gpr_histogram_sum_type gpr_histogram_sum_import; -gpr_histogram_sum_of_squares_type gpr_histogram_sum_of_squares_import; -gpr_histogram_get_contents_type gpr_histogram_get_contents_import; -gpr_histogram_merge_contents_type gpr_histogram_merge_contents_import; -gpr_join_host_port_type gpr_join_host_port_import; -gpr_split_host_port_type gpr_split_host_port_import; -gpr_format_message_type gpr_format_message_import; -gpr_strdup_type gpr_strdup_import; -gpr_asprintf_type gpr_asprintf_import; -gpr_subprocess_binary_extension_type gpr_subprocess_binary_extension_import; -gpr_subprocess_create_type gpr_subprocess_create_import; -gpr_subprocess_destroy_type gpr_subprocess_destroy_import; -gpr_subprocess_join_type gpr_subprocess_join_import; -gpr_subprocess_interrupt_type gpr_subprocess_interrupt_import; -gpr_thd_new_type gpr_thd_new_import; -gpr_thd_options_default_type gpr_thd_options_default_import; -gpr_thd_options_set_detached_type gpr_thd_options_set_detached_import; -gpr_thd_options_set_joinable_type gpr_thd_options_set_joinable_import; -gpr_thd_options_is_detached_type gpr_thd_options_is_detached_import; -gpr_thd_options_is_joinable_type gpr_thd_options_is_joinable_import; -gpr_thd_currentid_type gpr_thd_currentid_import; -gpr_thd_join_type gpr_thd_join_import; - -#ifdef __cplusplus -extern "C" { -#endif /* __cpluslus */ - -void pygrpc_load_imports(HMODULE library) { - census_initialize_import = (census_initialize_type) GetProcAddress(library, "census_initialize"); - census_shutdown_import = (census_shutdown_type) GetProcAddress(library, "census_shutdown"); - census_supported_import = (census_supported_type) GetProcAddress(library, "census_supported"); - census_enabled_import = (census_enabled_type) GetProcAddress(library, "census_enabled"); - census_context_create_import = (census_context_create_type) GetProcAddress(library, "census_context_create"); - census_context_destroy_import = (census_context_destroy_type) GetProcAddress(library, "census_context_destroy"); - census_context_get_status_import = (census_context_get_status_type) GetProcAddress(library, "census_context_get_status"); - census_context_initialize_iterator_import = (census_context_initialize_iterator_type) GetProcAddress(library, "census_context_initialize_iterator"); - census_context_next_tag_import = (census_context_next_tag_type) GetProcAddress(library, "census_context_next_tag"); - census_context_get_tag_import = (census_context_get_tag_type) GetProcAddress(library, "census_context_get_tag"); - census_context_encode_import = (census_context_encode_type) GetProcAddress(library, "census_context_encode"); - census_context_decode_import = (census_context_decode_type) GetProcAddress(library, "census_context_decode"); - census_trace_mask_import = (census_trace_mask_type) GetProcAddress(library, "census_trace_mask"); - census_set_trace_mask_import = (census_set_trace_mask_type) GetProcAddress(library, "census_set_trace_mask"); - census_start_rpc_op_timestamp_import = (census_start_rpc_op_timestamp_type) GetProcAddress(library, "census_start_rpc_op_timestamp"); - census_start_client_rpc_op_import = (census_start_client_rpc_op_type) GetProcAddress(library, "census_start_client_rpc_op"); - census_set_rpc_client_peer_import = (census_set_rpc_client_peer_type) GetProcAddress(library, "census_set_rpc_client_peer"); - census_start_server_rpc_op_import = (census_start_server_rpc_op_type) GetProcAddress(library, "census_start_server_rpc_op"); - census_start_op_import = (census_start_op_type) GetProcAddress(library, "census_start_op"); - census_end_op_import = (census_end_op_type) GetProcAddress(library, "census_end_op"); - census_trace_print_import = (census_trace_print_type) GetProcAddress(library, "census_trace_print"); - census_trace_scan_start_import = (census_trace_scan_start_type) GetProcAddress(library, "census_trace_scan_start"); - census_get_trace_record_import = (census_get_trace_record_type) GetProcAddress(library, "census_get_trace_record"); - census_trace_scan_end_import = (census_trace_scan_end_type) GetProcAddress(library, "census_trace_scan_end"); - census_record_values_import = (census_record_values_type) GetProcAddress(library, "census_record_values"); - census_view_create_import = (census_view_create_type) GetProcAddress(library, "census_view_create"); - census_view_delete_import = (census_view_delete_type) GetProcAddress(library, "census_view_delete"); - census_view_metric_import = (census_view_metric_type) GetProcAddress(library, "census_view_metric"); - census_view_naggregations_import = (census_view_naggregations_type) GetProcAddress(library, "census_view_naggregations"); - census_view_tags_import = (census_view_tags_type) GetProcAddress(library, "census_view_tags"); - census_view_aggregrations_import = (census_view_aggregrations_type) GetProcAddress(library, "census_view_aggregrations"); - census_view_get_data_import = (census_view_get_data_type) GetProcAddress(library, "census_view_get_data"); - census_view_reset_import = (census_view_reset_type) GetProcAddress(library, "census_view_reset"); - grpc_compression_algorithm_parse_import = (grpc_compression_algorithm_parse_type) GetProcAddress(library, "grpc_compression_algorithm_parse"); - grpc_compression_algorithm_name_import = (grpc_compression_algorithm_name_type) GetProcAddress(library, "grpc_compression_algorithm_name"); - grpc_compression_algorithm_for_level_import = (grpc_compression_algorithm_for_level_type) GetProcAddress(library, "grpc_compression_algorithm_for_level"); - grpc_compression_options_init_import = (grpc_compression_options_init_type) GetProcAddress(library, "grpc_compression_options_init"); - grpc_compression_options_enable_algorithm_import = (grpc_compression_options_enable_algorithm_type) GetProcAddress(library, "grpc_compression_options_enable_algorithm"); - grpc_compression_options_disable_algorithm_import = (grpc_compression_options_disable_algorithm_type) GetProcAddress(library, "grpc_compression_options_disable_algorithm"); - grpc_compression_options_is_algorithm_enabled_import = (grpc_compression_options_is_algorithm_enabled_type) GetProcAddress(library, "grpc_compression_options_is_algorithm_enabled"); - grpc_metadata_array_init_import = (grpc_metadata_array_init_type) GetProcAddress(library, "grpc_metadata_array_init"); - grpc_metadata_array_destroy_import = (grpc_metadata_array_destroy_type) GetProcAddress(library, "grpc_metadata_array_destroy"); - grpc_call_details_init_import = (grpc_call_details_init_type) GetProcAddress(library, "grpc_call_details_init"); - grpc_call_details_destroy_import = (grpc_call_details_destroy_type) GetProcAddress(library, "grpc_call_details_destroy"); - grpc_register_plugin_import = (grpc_register_plugin_type) GetProcAddress(library, "grpc_register_plugin"); - grpc_init_import = (grpc_init_type) GetProcAddress(library, "grpc_init"); - grpc_shutdown_import = (grpc_shutdown_type) GetProcAddress(library, "grpc_shutdown"); - grpc_version_string_import = (grpc_version_string_type) GetProcAddress(library, "grpc_version_string"); - grpc_completion_queue_create_import = (grpc_completion_queue_create_type) GetProcAddress(library, "grpc_completion_queue_create"); - grpc_completion_queue_next_import = (grpc_completion_queue_next_type) GetProcAddress(library, "grpc_completion_queue_next"); - grpc_completion_queue_pluck_import = (grpc_completion_queue_pluck_type) GetProcAddress(library, "grpc_completion_queue_pluck"); - grpc_completion_queue_shutdown_import = (grpc_completion_queue_shutdown_type) GetProcAddress(library, "grpc_completion_queue_shutdown"); - grpc_completion_queue_destroy_import = (grpc_completion_queue_destroy_type) GetProcAddress(library, "grpc_completion_queue_destroy"); - grpc_alarm_create_import = (grpc_alarm_create_type) GetProcAddress(library, "grpc_alarm_create"); - grpc_alarm_cancel_import = (grpc_alarm_cancel_type) GetProcAddress(library, "grpc_alarm_cancel"); - grpc_alarm_destroy_import = (grpc_alarm_destroy_type) GetProcAddress(library, "grpc_alarm_destroy"); - grpc_channel_check_connectivity_state_import = (grpc_channel_check_connectivity_state_type) GetProcAddress(library, "grpc_channel_check_connectivity_state"); - grpc_channel_watch_connectivity_state_import = (grpc_channel_watch_connectivity_state_type) GetProcAddress(library, "grpc_channel_watch_connectivity_state"); - grpc_channel_create_call_import = (grpc_channel_create_call_type) GetProcAddress(library, "grpc_channel_create_call"); - grpc_channel_ping_import = (grpc_channel_ping_type) GetProcAddress(library, "grpc_channel_ping"); - grpc_channel_register_call_import = (grpc_channel_register_call_type) GetProcAddress(library, "grpc_channel_register_call"); - grpc_channel_create_registered_call_import = (grpc_channel_create_registered_call_type) GetProcAddress(library, "grpc_channel_create_registered_call"); - grpc_call_start_batch_import = (grpc_call_start_batch_type) GetProcAddress(library, "grpc_call_start_batch"); - grpc_call_get_peer_import = (grpc_call_get_peer_type) GetProcAddress(library, "grpc_call_get_peer"); - grpc_census_call_set_context_import = (grpc_census_call_set_context_type) GetProcAddress(library, "grpc_census_call_set_context"); - grpc_census_call_get_context_import = (grpc_census_call_get_context_type) GetProcAddress(library, "grpc_census_call_get_context"); - grpc_channel_get_target_import = (grpc_channel_get_target_type) GetProcAddress(library, "grpc_channel_get_target"); - grpc_insecure_channel_create_import = (grpc_insecure_channel_create_type) GetProcAddress(library, "grpc_insecure_channel_create"); - grpc_lame_client_channel_create_import = (grpc_lame_client_channel_create_type) GetProcAddress(library, "grpc_lame_client_channel_create"); - grpc_channel_destroy_import = (grpc_channel_destroy_type) GetProcAddress(library, "grpc_channel_destroy"); - grpc_call_cancel_import = (grpc_call_cancel_type) GetProcAddress(library, "grpc_call_cancel"); - grpc_call_cancel_with_status_import = (grpc_call_cancel_with_status_type) GetProcAddress(library, "grpc_call_cancel_with_status"); - grpc_call_destroy_import = (grpc_call_destroy_type) GetProcAddress(library, "grpc_call_destroy"); - grpc_server_request_call_import = (grpc_server_request_call_type) GetProcAddress(library, "grpc_server_request_call"); - grpc_server_register_method_import = (grpc_server_register_method_type) GetProcAddress(library, "grpc_server_register_method"); - grpc_server_request_registered_call_import = (grpc_server_request_registered_call_type) GetProcAddress(library, "grpc_server_request_registered_call"); - grpc_server_create_import = (grpc_server_create_type) GetProcAddress(library, "grpc_server_create"); - grpc_server_register_completion_queue_import = (grpc_server_register_completion_queue_type) GetProcAddress(library, "grpc_server_register_completion_queue"); - grpc_server_register_non_listening_completion_queue_import = (grpc_server_register_non_listening_completion_queue_type) GetProcAddress(library, "grpc_server_register_non_listening_completion_queue"); - grpc_server_add_insecure_http2_port_import = (grpc_server_add_insecure_http2_port_type) GetProcAddress(library, "grpc_server_add_insecure_http2_port"); - grpc_server_start_import = (grpc_server_start_type) GetProcAddress(library, "grpc_server_start"); - grpc_server_shutdown_and_notify_import = (grpc_server_shutdown_and_notify_type) GetProcAddress(library, "grpc_server_shutdown_and_notify"); - grpc_server_cancel_all_calls_import = (grpc_server_cancel_all_calls_type) GetProcAddress(library, "grpc_server_cancel_all_calls"); - grpc_server_destroy_import = (grpc_server_destroy_type) GetProcAddress(library, "grpc_server_destroy"); - grpc_tracer_set_enabled_import = (grpc_tracer_set_enabled_type) GetProcAddress(library, "grpc_tracer_set_enabled"); - grpc_header_key_is_legal_import = (grpc_header_key_is_legal_type) GetProcAddress(library, "grpc_header_key_is_legal"); - grpc_header_nonbin_value_is_legal_import = (grpc_header_nonbin_value_is_legal_type) GetProcAddress(library, "grpc_header_nonbin_value_is_legal"); - grpc_is_binary_header_import = (grpc_is_binary_header_type) GetProcAddress(library, "grpc_is_binary_header"); - grpc_call_error_to_string_import = (grpc_call_error_to_string_type) GetProcAddress(library, "grpc_call_error_to_string"); - grpc_insecure_channel_create_from_fd_import = (grpc_insecure_channel_create_from_fd_type) GetProcAddress(library, "grpc_insecure_channel_create_from_fd"); - grpc_server_add_insecure_channel_from_fd_import = (grpc_server_add_insecure_channel_from_fd_type) GetProcAddress(library, "grpc_server_add_insecure_channel_from_fd"); - grpc_use_signal_import = (grpc_use_signal_type) GetProcAddress(library, "grpc_use_signal"); - grpc_auth_property_iterator_next_import = (grpc_auth_property_iterator_next_type) GetProcAddress(library, "grpc_auth_property_iterator_next"); - grpc_auth_context_property_iterator_import = (grpc_auth_context_property_iterator_type) GetProcAddress(library, "grpc_auth_context_property_iterator"); - grpc_auth_context_peer_identity_import = (grpc_auth_context_peer_identity_type) GetProcAddress(library, "grpc_auth_context_peer_identity"); - grpc_auth_context_find_properties_by_name_import = (grpc_auth_context_find_properties_by_name_type) GetProcAddress(library, "grpc_auth_context_find_properties_by_name"); - grpc_auth_context_peer_identity_property_name_import = (grpc_auth_context_peer_identity_property_name_type) GetProcAddress(library, "grpc_auth_context_peer_identity_property_name"); - grpc_auth_context_peer_is_authenticated_import = (grpc_auth_context_peer_is_authenticated_type) GetProcAddress(library, "grpc_auth_context_peer_is_authenticated"); - grpc_call_auth_context_import = (grpc_call_auth_context_type) GetProcAddress(library, "grpc_call_auth_context"); - grpc_auth_context_release_import = (grpc_auth_context_release_type) GetProcAddress(library, "grpc_auth_context_release"); - grpc_auth_context_add_property_import = (grpc_auth_context_add_property_type) GetProcAddress(library, "grpc_auth_context_add_property"); - grpc_auth_context_add_cstring_property_import = (grpc_auth_context_add_cstring_property_type) GetProcAddress(library, "grpc_auth_context_add_cstring_property"); - grpc_auth_context_set_peer_identity_property_name_import = (grpc_auth_context_set_peer_identity_property_name_type) GetProcAddress(library, "grpc_auth_context_set_peer_identity_property_name"); - grpc_channel_credentials_release_import = (grpc_channel_credentials_release_type) GetProcAddress(library, "grpc_channel_credentials_release"); - grpc_google_default_credentials_create_import = (grpc_google_default_credentials_create_type) GetProcAddress(library, "grpc_google_default_credentials_create"); - grpc_set_ssl_roots_override_callback_import = (grpc_set_ssl_roots_override_callback_type) GetProcAddress(library, "grpc_set_ssl_roots_override_callback"); - grpc_ssl_credentials_create_import = (grpc_ssl_credentials_create_type) GetProcAddress(library, "grpc_ssl_credentials_create"); - grpc_call_credentials_release_import = (grpc_call_credentials_release_type) GetProcAddress(library, "grpc_call_credentials_release"); - grpc_composite_channel_credentials_create_import = (grpc_composite_channel_credentials_create_type) GetProcAddress(library, "grpc_composite_channel_credentials_create"); - grpc_composite_call_credentials_create_import = (grpc_composite_call_credentials_create_type) GetProcAddress(library, "grpc_composite_call_credentials_create"); - grpc_google_compute_engine_credentials_create_import = (grpc_google_compute_engine_credentials_create_type) GetProcAddress(library, "grpc_google_compute_engine_credentials_create"); - grpc_max_auth_token_lifetime_import = (grpc_max_auth_token_lifetime_type) GetProcAddress(library, "grpc_max_auth_token_lifetime"); - grpc_service_account_jwt_access_credentials_create_import = (grpc_service_account_jwt_access_credentials_create_type) GetProcAddress(library, "grpc_service_account_jwt_access_credentials_create"); - grpc_google_refresh_token_credentials_create_import = (grpc_google_refresh_token_credentials_create_type) GetProcAddress(library, "grpc_google_refresh_token_credentials_create"); - grpc_access_token_credentials_create_import = (grpc_access_token_credentials_create_type) GetProcAddress(library, "grpc_access_token_credentials_create"); - grpc_google_iam_credentials_create_import = (grpc_google_iam_credentials_create_type) GetProcAddress(library, "grpc_google_iam_credentials_create"); - grpc_metadata_credentials_create_from_plugin_import = (grpc_metadata_credentials_create_from_plugin_type) GetProcAddress(library, "grpc_metadata_credentials_create_from_plugin"); - grpc_secure_channel_create_import = (grpc_secure_channel_create_type) GetProcAddress(library, "grpc_secure_channel_create"); - grpc_server_credentials_release_import = (grpc_server_credentials_release_type) GetProcAddress(library, "grpc_server_credentials_release"); - grpc_ssl_server_credentials_create_import = (grpc_ssl_server_credentials_create_type) GetProcAddress(library, "grpc_ssl_server_credentials_create"); - grpc_ssl_server_credentials_create_ex_import = (grpc_ssl_server_credentials_create_ex_type) GetProcAddress(library, "grpc_ssl_server_credentials_create_ex"); - grpc_server_add_secure_http2_port_import = (grpc_server_add_secure_http2_port_type) GetProcAddress(library, "grpc_server_add_secure_http2_port"); - grpc_call_set_credentials_import = (grpc_call_set_credentials_type) GetProcAddress(library, "grpc_call_set_credentials"); - grpc_server_credentials_set_auth_metadata_processor_import = (grpc_server_credentials_set_auth_metadata_processor_type) GetProcAddress(library, "grpc_server_credentials_set_auth_metadata_processor"); - gpr_malloc_import = (gpr_malloc_type) GetProcAddress(library, "gpr_malloc"); - gpr_free_import = (gpr_free_type) GetProcAddress(library, "gpr_free"); - gpr_realloc_import = (gpr_realloc_type) GetProcAddress(library, "gpr_realloc"); - gpr_malloc_aligned_import = (gpr_malloc_aligned_type) GetProcAddress(library, "gpr_malloc_aligned"); - gpr_free_aligned_import = (gpr_free_aligned_type) GetProcAddress(library, "gpr_free_aligned"); - gpr_set_allocation_functions_import = (gpr_set_allocation_functions_type) GetProcAddress(library, "gpr_set_allocation_functions"); - gpr_get_allocation_functions_import = (gpr_get_allocation_functions_type) GetProcAddress(library, "gpr_get_allocation_functions"); - grpc_raw_byte_buffer_create_import = (grpc_raw_byte_buffer_create_type) GetProcAddress(library, "grpc_raw_byte_buffer_create"); - grpc_raw_compressed_byte_buffer_create_import = (grpc_raw_compressed_byte_buffer_create_type) GetProcAddress(library, "grpc_raw_compressed_byte_buffer_create"); - grpc_byte_buffer_copy_import = (grpc_byte_buffer_copy_type) GetProcAddress(library, "grpc_byte_buffer_copy"); - grpc_byte_buffer_length_import = (grpc_byte_buffer_length_type) GetProcAddress(library, "grpc_byte_buffer_length"); - grpc_byte_buffer_destroy_import = (grpc_byte_buffer_destroy_type) GetProcAddress(library, "grpc_byte_buffer_destroy"); - grpc_byte_buffer_reader_init_import = (grpc_byte_buffer_reader_init_type) GetProcAddress(library, "grpc_byte_buffer_reader_init"); - grpc_byte_buffer_reader_destroy_import = (grpc_byte_buffer_reader_destroy_type) GetProcAddress(library, "grpc_byte_buffer_reader_destroy"); - grpc_byte_buffer_reader_next_import = (grpc_byte_buffer_reader_next_type) GetProcAddress(library, "grpc_byte_buffer_reader_next"); - grpc_byte_buffer_reader_readall_import = (grpc_byte_buffer_reader_readall_type) GetProcAddress(library, "grpc_byte_buffer_reader_readall"); - grpc_raw_byte_buffer_from_reader_import = (grpc_raw_byte_buffer_from_reader_type) GetProcAddress(library, "grpc_raw_byte_buffer_from_reader"); - gpr_log_import = (gpr_log_type) GetProcAddress(library, "gpr_log"); - gpr_log_message_import = (gpr_log_message_type) GetProcAddress(library, "gpr_log_message"); - gpr_set_log_verbosity_import = (gpr_set_log_verbosity_type) GetProcAddress(library, "gpr_set_log_verbosity"); - gpr_log_verbosity_init_import = (gpr_log_verbosity_init_type) GetProcAddress(library, "gpr_log_verbosity_init"); - gpr_set_log_function_import = (gpr_set_log_function_type) GetProcAddress(library, "gpr_set_log_function"); - gpr_slice_ref_import = (gpr_slice_ref_type) GetProcAddress(library, "gpr_slice_ref"); - gpr_slice_unref_import = (gpr_slice_unref_type) GetProcAddress(library, "gpr_slice_unref"); - gpr_slice_new_import = (gpr_slice_new_type) GetProcAddress(library, "gpr_slice_new"); - gpr_slice_new_with_len_import = (gpr_slice_new_with_len_type) GetProcAddress(library, "gpr_slice_new_with_len"); - gpr_slice_malloc_import = (gpr_slice_malloc_type) GetProcAddress(library, "gpr_slice_malloc"); - gpr_slice_from_copied_string_import = (gpr_slice_from_copied_string_type) GetProcAddress(library, "gpr_slice_from_copied_string"); - gpr_slice_from_copied_buffer_import = (gpr_slice_from_copied_buffer_type) GetProcAddress(library, "gpr_slice_from_copied_buffer"); - gpr_slice_from_static_string_import = (gpr_slice_from_static_string_type) GetProcAddress(library, "gpr_slice_from_static_string"); - gpr_slice_sub_import = (gpr_slice_sub_type) GetProcAddress(library, "gpr_slice_sub"); - gpr_slice_sub_no_ref_import = (gpr_slice_sub_no_ref_type) GetProcAddress(library, "gpr_slice_sub_no_ref"); - gpr_slice_split_tail_import = (gpr_slice_split_tail_type) GetProcAddress(library, "gpr_slice_split_tail"); - gpr_slice_split_head_import = (gpr_slice_split_head_type) GetProcAddress(library, "gpr_slice_split_head"); - gpr_empty_slice_import = (gpr_empty_slice_type) GetProcAddress(library, "gpr_empty_slice"); - gpr_slice_cmp_import = (gpr_slice_cmp_type) GetProcAddress(library, "gpr_slice_cmp"); - gpr_slice_str_cmp_import = (gpr_slice_str_cmp_type) GetProcAddress(library, "gpr_slice_str_cmp"); - gpr_slice_buffer_init_import = (gpr_slice_buffer_init_type) GetProcAddress(library, "gpr_slice_buffer_init"); - gpr_slice_buffer_destroy_import = (gpr_slice_buffer_destroy_type) GetProcAddress(library, "gpr_slice_buffer_destroy"); - gpr_slice_buffer_add_import = (gpr_slice_buffer_add_type) GetProcAddress(library, "gpr_slice_buffer_add"); - gpr_slice_buffer_add_indexed_import = (gpr_slice_buffer_add_indexed_type) GetProcAddress(library, "gpr_slice_buffer_add_indexed"); - gpr_slice_buffer_addn_import = (gpr_slice_buffer_addn_type) GetProcAddress(library, "gpr_slice_buffer_addn"); - gpr_slice_buffer_tiny_add_import = (gpr_slice_buffer_tiny_add_type) GetProcAddress(library, "gpr_slice_buffer_tiny_add"); - gpr_slice_buffer_pop_import = (gpr_slice_buffer_pop_type) GetProcAddress(library, "gpr_slice_buffer_pop"); - gpr_slice_buffer_reset_and_unref_import = (gpr_slice_buffer_reset_and_unref_type) GetProcAddress(library, "gpr_slice_buffer_reset_and_unref"); - gpr_slice_buffer_swap_import = (gpr_slice_buffer_swap_type) GetProcAddress(library, "gpr_slice_buffer_swap"); - gpr_slice_buffer_move_into_import = (gpr_slice_buffer_move_into_type) GetProcAddress(library, "gpr_slice_buffer_move_into"); - gpr_slice_buffer_trim_end_import = (gpr_slice_buffer_trim_end_type) GetProcAddress(library, "gpr_slice_buffer_trim_end"); - gpr_slice_buffer_move_first_import = (gpr_slice_buffer_move_first_type) GetProcAddress(library, "gpr_slice_buffer_move_first"); - gpr_slice_buffer_take_first_import = (gpr_slice_buffer_take_first_type) GetProcAddress(library, "gpr_slice_buffer_take_first"); - gpr_mu_init_import = (gpr_mu_init_type) GetProcAddress(library, "gpr_mu_init"); - gpr_mu_destroy_import = (gpr_mu_destroy_type) GetProcAddress(library, "gpr_mu_destroy"); - gpr_mu_lock_import = (gpr_mu_lock_type) GetProcAddress(library, "gpr_mu_lock"); - gpr_mu_unlock_import = (gpr_mu_unlock_type) GetProcAddress(library, "gpr_mu_unlock"); - gpr_mu_trylock_import = (gpr_mu_trylock_type) GetProcAddress(library, "gpr_mu_trylock"); - gpr_cv_init_import = (gpr_cv_init_type) GetProcAddress(library, "gpr_cv_init"); - gpr_cv_destroy_import = (gpr_cv_destroy_type) GetProcAddress(library, "gpr_cv_destroy"); - gpr_cv_wait_import = (gpr_cv_wait_type) GetProcAddress(library, "gpr_cv_wait"); - gpr_cv_signal_import = (gpr_cv_signal_type) GetProcAddress(library, "gpr_cv_signal"); - gpr_cv_broadcast_import = (gpr_cv_broadcast_type) GetProcAddress(library, "gpr_cv_broadcast"); - gpr_once_init_import = (gpr_once_init_type) GetProcAddress(library, "gpr_once_init"); - gpr_event_init_import = (gpr_event_init_type) GetProcAddress(library, "gpr_event_init"); - gpr_event_set_import = (gpr_event_set_type) GetProcAddress(library, "gpr_event_set"); - gpr_event_get_import = (gpr_event_get_type) GetProcAddress(library, "gpr_event_get"); - gpr_event_wait_import = (gpr_event_wait_type) GetProcAddress(library, "gpr_event_wait"); - gpr_ref_init_import = (gpr_ref_init_type) GetProcAddress(library, "gpr_ref_init"); - gpr_ref_import = (gpr_ref_type) GetProcAddress(library, "gpr_ref"); - gpr_ref_non_zero_import = (gpr_ref_non_zero_type) GetProcAddress(library, "gpr_ref_non_zero"); - gpr_refn_import = (gpr_refn_type) GetProcAddress(library, "gpr_refn"); - gpr_unref_import = (gpr_unref_type) GetProcAddress(library, "gpr_unref"); - gpr_stats_init_import = (gpr_stats_init_type) GetProcAddress(library, "gpr_stats_init"); - gpr_stats_inc_import = (gpr_stats_inc_type) GetProcAddress(library, "gpr_stats_inc"); - gpr_stats_read_import = (gpr_stats_read_type) GetProcAddress(library, "gpr_stats_read"); - gpr_time_0_import = (gpr_time_0_type) GetProcAddress(library, "gpr_time_0"); - gpr_inf_future_import = (gpr_inf_future_type) GetProcAddress(library, "gpr_inf_future"); - gpr_inf_past_import = (gpr_inf_past_type) GetProcAddress(library, "gpr_inf_past"); - gpr_time_init_import = (gpr_time_init_type) GetProcAddress(library, "gpr_time_init"); - gpr_now_import = (gpr_now_type) GetProcAddress(library, "gpr_now"); - gpr_convert_clock_type_import = (gpr_convert_clock_type_type) GetProcAddress(library, "gpr_convert_clock_type"); - gpr_time_cmp_import = (gpr_time_cmp_type) GetProcAddress(library, "gpr_time_cmp"); - gpr_time_max_import = (gpr_time_max_type) GetProcAddress(library, "gpr_time_max"); - gpr_time_min_import = (gpr_time_min_type) GetProcAddress(library, "gpr_time_min"); - gpr_time_add_import = (gpr_time_add_type) GetProcAddress(library, "gpr_time_add"); - gpr_time_sub_import = (gpr_time_sub_type) GetProcAddress(library, "gpr_time_sub"); - gpr_time_from_micros_import = (gpr_time_from_micros_type) GetProcAddress(library, "gpr_time_from_micros"); - gpr_time_from_nanos_import = (gpr_time_from_nanos_type) GetProcAddress(library, "gpr_time_from_nanos"); - gpr_time_from_millis_import = (gpr_time_from_millis_type) GetProcAddress(library, "gpr_time_from_millis"); - gpr_time_from_seconds_import = (gpr_time_from_seconds_type) GetProcAddress(library, "gpr_time_from_seconds"); - gpr_time_from_minutes_import = (gpr_time_from_minutes_type) GetProcAddress(library, "gpr_time_from_minutes"); - gpr_time_from_hours_import = (gpr_time_from_hours_type) GetProcAddress(library, "gpr_time_from_hours"); - gpr_time_to_millis_import = (gpr_time_to_millis_type) GetProcAddress(library, "gpr_time_to_millis"); - gpr_time_similar_import = (gpr_time_similar_type) GetProcAddress(library, "gpr_time_similar"); - gpr_sleep_until_import = (gpr_sleep_until_type) GetProcAddress(library, "gpr_sleep_until"); - gpr_timespec_to_micros_import = (gpr_timespec_to_micros_type) GetProcAddress(library, "gpr_timespec_to_micros"); - gpr_avl_create_import = (gpr_avl_create_type) GetProcAddress(library, "gpr_avl_create"); - gpr_avl_ref_import = (gpr_avl_ref_type) GetProcAddress(library, "gpr_avl_ref"); - gpr_avl_unref_import = (gpr_avl_unref_type) GetProcAddress(library, "gpr_avl_unref"); - gpr_avl_add_import = (gpr_avl_add_type) GetProcAddress(library, "gpr_avl_add"); - gpr_avl_remove_import = (gpr_avl_remove_type) GetProcAddress(library, "gpr_avl_remove"); - gpr_avl_get_import = (gpr_avl_get_type) GetProcAddress(library, "gpr_avl_get"); - gpr_avl_maybe_get_import = (gpr_avl_maybe_get_type) GetProcAddress(library, "gpr_avl_maybe_get"); - gpr_avl_is_empty_import = (gpr_avl_is_empty_type) GetProcAddress(library, "gpr_avl_is_empty"); - gpr_cmdline_create_import = (gpr_cmdline_create_type) GetProcAddress(library, "gpr_cmdline_create"); - gpr_cmdline_add_int_import = (gpr_cmdline_add_int_type) GetProcAddress(library, "gpr_cmdline_add_int"); - gpr_cmdline_add_flag_import = (gpr_cmdline_add_flag_type) GetProcAddress(library, "gpr_cmdline_add_flag"); - gpr_cmdline_add_string_import = (gpr_cmdline_add_string_type) GetProcAddress(library, "gpr_cmdline_add_string"); - gpr_cmdline_on_extra_arg_import = (gpr_cmdline_on_extra_arg_type) GetProcAddress(library, "gpr_cmdline_on_extra_arg"); - gpr_cmdline_set_survive_failure_import = (gpr_cmdline_set_survive_failure_type) GetProcAddress(library, "gpr_cmdline_set_survive_failure"); - gpr_cmdline_parse_import = (gpr_cmdline_parse_type) GetProcAddress(library, "gpr_cmdline_parse"); - gpr_cmdline_destroy_import = (gpr_cmdline_destroy_type) GetProcAddress(library, "gpr_cmdline_destroy"); - gpr_cmdline_usage_string_import = (gpr_cmdline_usage_string_type) GetProcAddress(library, "gpr_cmdline_usage_string"); - gpr_cpu_num_cores_import = (gpr_cpu_num_cores_type) GetProcAddress(library, "gpr_cpu_num_cores"); - gpr_cpu_current_cpu_import = (gpr_cpu_current_cpu_type) GetProcAddress(library, "gpr_cpu_current_cpu"); - gpr_histogram_create_import = (gpr_histogram_create_type) GetProcAddress(library, "gpr_histogram_create"); - gpr_histogram_destroy_import = (gpr_histogram_destroy_type) GetProcAddress(library, "gpr_histogram_destroy"); - gpr_histogram_add_import = (gpr_histogram_add_type) GetProcAddress(library, "gpr_histogram_add"); - gpr_histogram_merge_import = (gpr_histogram_merge_type) GetProcAddress(library, "gpr_histogram_merge"); - gpr_histogram_percentile_import = (gpr_histogram_percentile_type) GetProcAddress(library, "gpr_histogram_percentile"); - gpr_histogram_mean_import = (gpr_histogram_mean_type) GetProcAddress(library, "gpr_histogram_mean"); - gpr_histogram_stddev_import = (gpr_histogram_stddev_type) GetProcAddress(library, "gpr_histogram_stddev"); - gpr_histogram_variance_import = (gpr_histogram_variance_type) GetProcAddress(library, "gpr_histogram_variance"); - gpr_histogram_maximum_import = (gpr_histogram_maximum_type) GetProcAddress(library, "gpr_histogram_maximum"); - gpr_histogram_minimum_import = (gpr_histogram_minimum_type) GetProcAddress(library, "gpr_histogram_minimum"); - gpr_histogram_count_import = (gpr_histogram_count_type) GetProcAddress(library, "gpr_histogram_count"); - gpr_histogram_sum_import = (gpr_histogram_sum_type) GetProcAddress(library, "gpr_histogram_sum"); - gpr_histogram_sum_of_squares_import = (gpr_histogram_sum_of_squares_type) GetProcAddress(library, "gpr_histogram_sum_of_squares"); - gpr_histogram_get_contents_import = (gpr_histogram_get_contents_type) GetProcAddress(library, "gpr_histogram_get_contents"); - gpr_histogram_merge_contents_import = (gpr_histogram_merge_contents_type) GetProcAddress(library, "gpr_histogram_merge_contents"); - gpr_join_host_port_import = (gpr_join_host_port_type) GetProcAddress(library, "gpr_join_host_port"); - gpr_split_host_port_import = (gpr_split_host_port_type) GetProcAddress(library, "gpr_split_host_port"); - gpr_format_message_import = (gpr_format_message_type) GetProcAddress(library, "gpr_format_message"); - gpr_strdup_import = (gpr_strdup_type) GetProcAddress(library, "gpr_strdup"); - gpr_asprintf_import = (gpr_asprintf_type) GetProcAddress(library, "gpr_asprintf"); - gpr_subprocess_binary_extension_import = (gpr_subprocess_binary_extension_type) GetProcAddress(library, "gpr_subprocess_binary_extension"); - gpr_subprocess_create_import = (gpr_subprocess_create_type) GetProcAddress(library, "gpr_subprocess_create"); - gpr_subprocess_destroy_import = (gpr_subprocess_destroy_type) GetProcAddress(library, "gpr_subprocess_destroy"); - gpr_subprocess_join_import = (gpr_subprocess_join_type) GetProcAddress(library, "gpr_subprocess_join"); - gpr_subprocess_interrupt_import = (gpr_subprocess_interrupt_type) GetProcAddress(library, "gpr_subprocess_interrupt"); - gpr_thd_new_import = (gpr_thd_new_type) GetProcAddress(library, "gpr_thd_new"); - gpr_thd_options_default_import = (gpr_thd_options_default_type) GetProcAddress(library, "gpr_thd_options_default"); - gpr_thd_options_set_detached_import = (gpr_thd_options_set_detached_type) GetProcAddress(library, "gpr_thd_options_set_detached"); - gpr_thd_options_set_joinable_import = (gpr_thd_options_set_joinable_type) GetProcAddress(library, "gpr_thd_options_set_joinable"); - gpr_thd_options_is_detached_import = (gpr_thd_options_is_detached_type) GetProcAddress(library, "gpr_thd_options_is_detached"); - gpr_thd_options_is_joinable_import = (gpr_thd_options_is_joinable_type) GetProcAddress(library, "gpr_thd_options_is_joinable"); - gpr_thd_currentid_import = (gpr_thd_currentid_type) GetProcAddress(library, "gpr_thd_currentid"); - gpr_thd_join_import = (gpr_thd_join_type) GetProcAddress(library, "gpr_thd_join"); -} - -#ifdef __cplusplus -} -#endif /* __cpluslus */ - -#endif /* !GPR_WINDOWS */ diff --git a/src/python/grpcio/grpc/_cython/imports.generated.h b/src/python/grpcio/grpc/_cython/imports.generated.h index f87c4da7878..8e5c9a8ce2b 100644 --- a/src/python/grpcio/grpc/_cython/imports.generated.h +++ b/src/python/grpcio/grpc/_cython/imports.generated.h @@ -31,860 +31,12 @@ * */ +/* TODO(atash) remove cruft */ #ifndef PYGRPC_CYTHON_WINDOWS_IMPORTS_H_ #define PYGRPC_CYTHON_WINDOWS_IMPORTS_H_ #include -#ifdef GPR_WINDOWS - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -typedef int(*census_initialize_type)(int features); -extern census_initialize_type census_initialize_import; -#define census_initialize census_initialize_import -typedef void(*census_shutdown_type)(void); -extern census_shutdown_type census_shutdown_import; -#define census_shutdown census_shutdown_import -typedef int(*census_supported_type)(void); -extern census_supported_type census_supported_import; -#define census_supported census_supported_import -typedef int(*census_enabled_type)(void); -extern census_enabled_type census_enabled_import; -#define census_enabled census_enabled_import -typedef census_context *(*census_context_create_type)(const census_context *base, const census_tag *tags, int ntags, census_context_status const **status); -extern census_context_create_type census_context_create_import; -#define census_context_create census_context_create_import -typedef void(*census_context_destroy_type)(census_context *context); -extern census_context_destroy_type census_context_destroy_import; -#define census_context_destroy census_context_destroy_import -typedef const census_context_status *(*census_context_get_status_type)(const census_context *context); -extern census_context_get_status_type census_context_get_status_import; -#define census_context_get_status census_context_get_status_import -typedef void(*census_context_initialize_iterator_type)(const census_context *context, census_context_iterator *iterator); -extern census_context_initialize_iterator_type census_context_initialize_iterator_import; -#define census_context_initialize_iterator census_context_initialize_iterator_import -typedef int(*census_context_next_tag_type)(census_context_iterator *iterator, census_tag *tag); -extern census_context_next_tag_type census_context_next_tag_import; -#define census_context_next_tag census_context_next_tag_import -typedef int(*census_context_get_tag_type)(const census_context *context, const char *key, census_tag *tag); -extern census_context_get_tag_type census_context_get_tag_import; -#define census_context_get_tag census_context_get_tag_import -typedef size_t(*census_context_encode_type)(const census_context *context, char *buffer, size_t buf_size); -extern census_context_encode_type census_context_encode_import; -#define census_context_encode census_context_encode_import -typedef census_context *(*census_context_decode_type)(const char *buffer, size_t size); -extern census_context_decode_type census_context_decode_import; -#define census_context_decode census_context_decode_import -typedef int(*census_trace_mask_type)(const census_context *context); -extern census_trace_mask_type census_trace_mask_import; -#define census_trace_mask census_trace_mask_import -typedef void(*census_set_trace_mask_type)(int trace_mask); -extern census_set_trace_mask_type census_set_trace_mask_import; -#define census_set_trace_mask census_set_trace_mask_import -typedef census_timestamp(*census_start_rpc_op_timestamp_type)(void); -extern census_start_rpc_op_timestamp_type census_start_rpc_op_timestamp_import; -#define census_start_rpc_op_timestamp census_start_rpc_op_timestamp_import -typedef census_context *(*census_start_client_rpc_op_type)(const census_context *context, int64_t rpc_name_id, const census_rpc_name_info *rpc_name_info, const char *peer, int trace_mask, const census_timestamp *start_time); -extern census_start_client_rpc_op_type census_start_client_rpc_op_import; -#define census_start_client_rpc_op census_start_client_rpc_op_import -typedef void(*census_set_rpc_client_peer_type)(census_context *context, const char *peer); -extern census_set_rpc_client_peer_type census_set_rpc_client_peer_import; -#define census_set_rpc_client_peer census_set_rpc_client_peer_import -typedef census_context *(*census_start_server_rpc_op_type)(const char *buffer, int64_t rpc_name_id, const census_rpc_name_info *rpc_name_info, const char *peer, int trace_mask, census_timestamp *start_time); -extern census_start_server_rpc_op_type census_start_server_rpc_op_import; -#define census_start_server_rpc_op census_start_server_rpc_op_import -typedef census_context *(*census_start_op_type)(census_context *context, const char *family, const char *name, int trace_mask); -extern census_start_op_type census_start_op_import; -#define census_start_op census_start_op_import -typedef void(*census_end_op_type)(census_context *context, int status); -extern census_end_op_type census_end_op_import; -#define census_end_op census_end_op_import -typedef void(*census_trace_print_type)(census_context *context, uint32_t type, const char *buffer, size_t n); -extern census_trace_print_type census_trace_print_import; -#define census_trace_print census_trace_print_import -typedef int(*census_trace_scan_start_type)(int consume); -extern census_trace_scan_start_type census_trace_scan_start_import; -#define census_trace_scan_start census_trace_scan_start_import -typedef int(*census_get_trace_record_type)(census_trace_record *trace_record); -extern census_get_trace_record_type census_get_trace_record_import; -#define census_get_trace_record census_get_trace_record_import -typedef void(*census_trace_scan_end_type)(); -extern census_trace_scan_end_type census_trace_scan_end_import; -#define census_trace_scan_end census_trace_scan_end_import -typedef void(*census_record_values_type)(census_context *context, census_value *values, size_t nvalues); -extern census_record_values_type census_record_values_import; -#define census_record_values census_record_values_import -typedef census_view *(*census_view_create_type)(uint32_t metric_id, const census_context *tags, const census_aggregation *aggregations, size_t naggregations); -extern census_view_create_type census_view_create_import; -#define census_view_create census_view_create_import -typedef void(*census_view_delete_type)(census_view *view); -extern census_view_delete_type census_view_delete_import; -#define census_view_delete census_view_delete_import -typedef size_t(*census_view_metric_type)(const census_view *view); -extern census_view_metric_type census_view_metric_import; -#define census_view_metric census_view_metric_import -typedef size_t(*census_view_naggregations_type)(const census_view *view); -extern census_view_naggregations_type census_view_naggregations_import; -#define census_view_naggregations census_view_naggregations_import -typedef const census_context *(*census_view_tags_type)(const census_view *view); -extern census_view_tags_type census_view_tags_import; -#define census_view_tags census_view_tags_import -typedef const census_aggregation *(*census_view_aggregrations_type)(const census_view *view); -extern census_view_aggregrations_type census_view_aggregrations_import; -#define census_view_aggregrations census_view_aggregrations_import -typedef const census_view_data *(*census_view_get_data_type)(const census_view *view); -extern census_view_get_data_type census_view_get_data_import; -#define census_view_get_data census_view_get_data_import -typedef void(*census_view_reset_type)(census_view *view); -extern census_view_reset_type census_view_reset_import; -#define census_view_reset census_view_reset_import -typedef int(*grpc_compression_algorithm_parse_type)(const char *name, size_t name_length, grpc_compression_algorithm *algorithm); -extern grpc_compression_algorithm_parse_type grpc_compression_algorithm_parse_import; -#define grpc_compression_algorithm_parse grpc_compression_algorithm_parse_import -typedef int(*grpc_compression_algorithm_name_type)(grpc_compression_algorithm algorithm, char **name); -extern grpc_compression_algorithm_name_type grpc_compression_algorithm_name_import; -#define grpc_compression_algorithm_name grpc_compression_algorithm_name_import -typedef grpc_compression_algorithm(*grpc_compression_algorithm_for_level_type)(grpc_compression_level level, uint32_t accepted_encodings); -extern grpc_compression_algorithm_for_level_type grpc_compression_algorithm_for_level_import; -#define grpc_compression_algorithm_for_level grpc_compression_algorithm_for_level_import -typedef void(*grpc_compression_options_init_type)(grpc_compression_options *opts); -extern grpc_compression_options_init_type grpc_compression_options_init_import; -#define grpc_compression_options_init grpc_compression_options_init_import -typedef void(*grpc_compression_options_enable_algorithm_type)(grpc_compression_options *opts, grpc_compression_algorithm algorithm); -extern grpc_compression_options_enable_algorithm_type grpc_compression_options_enable_algorithm_import; -#define grpc_compression_options_enable_algorithm grpc_compression_options_enable_algorithm_import -typedef void(*grpc_compression_options_disable_algorithm_type)(grpc_compression_options *opts, grpc_compression_algorithm algorithm); -extern grpc_compression_options_disable_algorithm_type grpc_compression_options_disable_algorithm_import; -#define grpc_compression_options_disable_algorithm grpc_compression_options_disable_algorithm_import -typedef int(*grpc_compression_options_is_algorithm_enabled_type)(const grpc_compression_options *opts, grpc_compression_algorithm algorithm); -extern grpc_compression_options_is_algorithm_enabled_type grpc_compression_options_is_algorithm_enabled_import; -#define grpc_compression_options_is_algorithm_enabled grpc_compression_options_is_algorithm_enabled_import -typedef void(*grpc_metadata_array_init_type)(grpc_metadata_array *array); -extern grpc_metadata_array_init_type grpc_metadata_array_init_import; -#define grpc_metadata_array_init grpc_metadata_array_init_import -typedef void(*grpc_metadata_array_destroy_type)(grpc_metadata_array *array); -extern grpc_metadata_array_destroy_type grpc_metadata_array_destroy_import; -#define grpc_metadata_array_destroy grpc_metadata_array_destroy_import -typedef void(*grpc_call_details_init_type)(grpc_call_details *details); -extern grpc_call_details_init_type grpc_call_details_init_import; -#define grpc_call_details_init grpc_call_details_init_import -typedef void(*grpc_call_details_destroy_type)(grpc_call_details *details); -extern grpc_call_details_destroy_type grpc_call_details_destroy_import; -#define grpc_call_details_destroy grpc_call_details_destroy_import -typedef void(*grpc_register_plugin_type)(void (*init)(void), void (*destroy)(void)); -extern grpc_register_plugin_type grpc_register_plugin_import; -#define grpc_register_plugin grpc_register_plugin_import -typedef void(*grpc_init_type)(void); -extern grpc_init_type grpc_init_import; -#define grpc_init grpc_init_import -typedef void(*grpc_shutdown_type)(void); -extern grpc_shutdown_type grpc_shutdown_import; -#define grpc_shutdown grpc_shutdown_import -typedef const char *(*grpc_version_string_type)(void); -extern grpc_version_string_type grpc_version_string_import; -#define grpc_version_string grpc_version_string_import -typedef grpc_completion_queue *(*grpc_completion_queue_create_type)(void *reserved); -extern grpc_completion_queue_create_type grpc_completion_queue_create_import; -#define grpc_completion_queue_create grpc_completion_queue_create_import -typedef grpc_event(*grpc_completion_queue_next_type)(grpc_completion_queue *cq, gpr_timespec deadline, void *reserved); -extern grpc_completion_queue_next_type grpc_completion_queue_next_import; -#define grpc_completion_queue_next grpc_completion_queue_next_import -typedef grpc_event(*grpc_completion_queue_pluck_type)(grpc_completion_queue *cq, void *tag, gpr_timespec deadline, void *reserved); -extern grpc_completion_queue_pluck_type grpc_completion_queue_pluck_import; -#define grpc_completion_queue_pluck grpc_completion_queue_pluck_import -typedef void(*grpc_completion_queue_shutdown_type)(grpc_completion_queue *cq); -extern grpc_completion_queue_shutdown_type grpc_completion_queue_shutdown_import; -#define grpc_completion_queue_shutdown grpc_completion_queue_shutdown_import -typedef void(*grpc_completion_queue_destroy_type)(grpc_completion_queue *cq); -extern grpc_completion_queue_destroy_type grpc_completion_queue_destroy_import; -#define grpc_completion_queue_destroy grpc_completion_queue_destroy_import -typedef grpc_alarm *(*grpc_alarm_create_type)(grpc_completion_queue *cq, gpr_timespec deadline, void *tag); -extern grpc_alarm_create_type grpc_alarm_create_import; -#define grpc_alarm_create grpc_alarm_create_import -typedef void(*grpc_alarm_cancel_type)(grpc_alarm *alarm); -extern grpc_alarm_cancel_type grpc_alarm_cancel_import; -#define grpc_alarm_cancel grpc_alarm_cancel_import -typedef void(*grpc_alarm_destroy_type)(grpc_alarm *alarm); -extern grpc_alarm_destroy_type grpc_alarm_destroy_import; -#define grpc_alarm_destroy grpc_alarm_destroy_import -typedef grpc_connectivity_state(*grpc_channel_check_connectivity_state_type)(grpc_channel *channel, int try_to_connect); -extern grpc_channel_check_connectivity_state_type grpc_channel_check_connectivity_state_import; -#define grpc_channel_check_connectivity_state grpc_channel_check_connectivity_state_import -typedef void(*grpc_channel_watch_connectivity_state_type)(grpc_channel *channel, grpc_connectivity_state last_observed_state, gpr_timespec deadline, grpc_completion_queue *cq, void *tag); -extern grpc_channel_watch_connectivity_state_type grpc_channel_watch_connectivity_state_import; -#define grpc_channel_watch_connectivity_state grpc_channel_watch_connectivity_state_import -typedef grpc_call *(*grpc_channel_create_call_type)(grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, grpc_completion_queue *completion_queue, const char *method, const char *host, gpr_timespec deadline, void *reserved); -extern grpc_channel_create_call_type grpc_channel_create_call_import; -#define grpc_channel_create_call grpc_channel_create_call_import -typedef void(*grpc_channel_ping_type)(grpc_channel *channel, grpc_completion_queue *cq, void *tag, void *reserved); -extern grpc_channel_ping_type grpc_channel_ping_import; -#define grpc_channel_ping grpc_channel_ping_import -typedef void *(*grpc_channel_register_call_type)(grpc_channel *channel, const char *method, const char *host, void *reserved); -extern grpc_channel_register_call_type grpc_channel_register_call_import; -#define grpc_channel_register_call grpc_channel_register_call_import -typedef grpc_call *(*grpc_channel_create_registered_call_type)(grpc_channel *channel, grpc_call *parent_call, uint32_t propagation_mask, grpc_completion_queue *completion_queue, void *registered_call_handle, gpr_timespec deadline, void *reserved); -extern grpc_channel_create_registered_call_type grpc_channel_create_registered_call_import; -#define grpc_channel_create_registered_call grpc_channel_create_registered_call_import -typedef grpc_call_error(*grpc_call_start_batch_type)(grpc_call *call, const grpc_op *ops, size_t nops, void *tag, void *reserved); -extern grpc_call_start_batch_type grpc_call_start_batch_import; -#define grpc_call_start_batch grpc_call_start_batch_import -typedef char *(*grpc_call_get_peer_type)(grpc_call *call); -extern grpc_call_get_peer_type grpc_call_get_peer_import; -#define grpc_call_get_peer grpc_call_get_peer_import -typedef void(*grpc_census_call_set_context_type)(grpc_call *call, struct census_context *context); -extern grpc_census_call_set_context_type grpc_census_call_set_context_import; -#define grpc_census_call_set_context grpc_census_call_set_context_import -typedef struct census_context *(*grpc_census_call_get_context_type)(grpc_call *call); -extern grpc_census_call_get_context_type grpc_census_call_get_context_import; -#define grpc_census_call_get_context grpc_census_call_get_context_import -typedef char *(*grpc_channel_get_target_type)(grpc_channel *channel); -extern grpc_channel_get_target_type grpc_channel_get_target_import; -#define grpc_channel_get_target grpc_channel_get_target_import -typedef grpc_channel *(*grpc_insecure_channel_create_type)(const char *target, const grpc_channel_args *args, void *reserved); -extern grpc_insecure_channel_create_type grpc_insecure_channel_create_import; -#define grpc_insecure_channel_create grpc_insecure_channel_create_import -typedef grpc_channel *(*grpc_lame_client_channel_create_type)(const char *target, grpc_status_code error_code, const char *error_message); -extern grpc_lame_client_channel_create_type grpc_lame_client_channel_create_import; -#define grpc_lame_client_channel_create grpc_lame_client_channel_create_import -typedef void(*grpc_channel_destroy_type)(grpc_channel *channel); -extern grpc_channel_destroy_type grpc_channel_destroy_import; -#define grpc_channel_destroy grpc_channel_destroy_import -typedef grpc_call_error(*grpc_call_cancel_type)(grpc_call *call, void *reserved); -extern grpc_call_cancel_type grpc_call_cancel_import; -#define grpc_call_cancel grpc_call_cancel_import -typedef grpc_call_error(*grpc_call_cancel_with_status_type)(grpc_call *call, grpc_status_code status, const char *description, void *reserved); -extern grpc_call_cancel_with_status_type grpc_call_cancel_with_status_import; -#define grpc_call_cancel_with_status grpc_call_cancel_with_status_import -typedef void(*grpc_call_destroy_type)(grpc_call *call); -extern grpc_call_destroy_type grpc_call_destroy_import; -#define grpc_call_destroy grpc_call_destroy_import -typedef grpc_call_error(*grpc_server_request_call_type)(grpc_server *server, grpc_call **call, grpc_call_details *details, grpc_metadata_array *request_metadata, grpc_completion_queue *cq_bound_to_call, grpc_completion_queue *cq_for_notification, void *tag_new); -extern grpc_server_request_call_type grpc_server_request_call_import; -#define grpc_server_request_call grpc_server_request_call_import -typedef void *(*grpc_server_register_method_type)(grpc_server *server, const char *method, const char *host, grpc_server_register_method_payload_handling payload_handling, uint32_t flags); -extern grpc_server_register_method_type grpc_server_register_method_import; -#define grpc_server_register_method grpc_server_register_method_import -typedef grpc_call_error(*grpc_server_request_registered_call_type)(grpc_server *server, void *registered_method, grpc_call **call, gpr_timespec *deadline, grpc_metadata_array *request_metadata, grpc_byte_buffer **optional_payload, grpc_completion_queue *cq_bound_to_call, grpc_completion_queue *cq_for_notification, void *tag_new); -extern grpc_server_request_registered_call_type grpc_server_request_registered_call_import; -#define grpc_server_request_registered_call grpc_server_request_registered_call_import -typedef grpc_server *(*grpc_server_create_type)(const grpc_channel_args *args, void *reserved); -extern grpc_server_create_type grpc_server_create_import; -#define grpc_server_create grpc_server_create_import -typedef void(*grpc_server_register_completion_queue_type)(grpc_server *server, grpc_completion_queue *cq, void *reserved); -extern grpc_server_register_completion_queue_type grpc_server_register_completion_queue_import; -#define grpc_server_register_completion_queue grpc_server_register_completion_queue_import -typedef void(*grpc_server_register_non_listening_completion_queue_type)(grpc_server *server, grpc_completion_queue *q, void *reserved); -extern grpc_server_register_non_listening_completion_queue_type grpc_server_register_non_listening_completion_queue_import; -#define grpc_server_register_non_listening_completion_queue grpc_server_register_non_listening_completion_queue_import -typedef int(*grpc_server_add_insecure_http2_port_type)(grpc_server *server, const char *addr); -extern grpc_server_add_insecure_http2_port_type grpc_server_add_insecure_http2_port_import; -#define grpc_server_add_insecure_http2_port grpc_server_add_insecure_http2_port_import -typedef void(*grpc_server_start_type)(grpc_server *server); -extern grpc_server_start_type grpc_server_start_import; -#define grpc_server_start grpc_server_start_import -typedef void(*grpc_server_shutdown_and_notify_type)(grpc_server *server, grpc_completion_queue *cq, void *tag); -extern grpc_server_shutdown_and_notify_type grpc_server_shutdown_and_notify_import; -#define grpc_server_shutdown_and_notify grpc_server_shutdown_and_notify_import -typedef void(*grpc_server_cancel_all_calls_type)(grpc_server *server); -extern grpc_server_cancel_all_calls_type grpc_server_cancel_all_calls_import; -#define grpc_server_cancel_all_calls grpc_server_cancel_all_calls_import -typedef void(*grpc_server_destroy_type)(grpc_server *server); -extern grpc_server_destroy_type grpc_server_destroy_import; -#define grpc_server_destroy grpc_server_destroy_import -typedef int(*grpc_tracer_set_enabled_type)(const char *name, int enabled); -extern grpc_tracer_set_enabled_type grpc_tracer_set_enabled_import; -#define grpc_tracer_set_enabled grpc_tracer_set_enabled_import -typedef int(*grpc_header_key_is_legal_type)(const char *key, size_t length); -extern grpc_header_key_is_legal_type grpc_header_key_is_legal_import; -#define grpc_header_key_is_legal grpc_header_key_is_legal_import -typedef int(*grpc_header_nonbin_value_is_legal_type)(const char *value, size_t length); -extern grpc_header_nonbin_value_is_legal_type grpc_header_nonbin_value_is_legal_import; -#define grpc_header_nonbin_value_is_legal grpc_header_nonbin_value_is_legal_import -typedef int(*grpc_is_binary_header_type)(const char *key, size_t length); -extern grpc_is_binary_header_type grpc_is_binary_header_import; -#define grpc_is_binary_header grpc_is_binary_header_import -typedef const char *(*grpc_call_error_to_string_type)(grpc_call_error error); -extern grpc_call_error_to_string_type grpc_call_error_to_string_import; -#define grpc_call_error_to_string grpc_call_error_to_string_import -typedef grpc_channel *(*grpc_insecure_channel_create_from_fd_type)(const char *target, int fd, const grpc_channel_args *args); -extern grpc_insecure_channel_create_from_fd_type grpc_insecure_channel_create_from_fd_import; -#define grpc_insecure_channel_create_from_fd grpc_insecure_channel_create_from_fd_import -typedef void(*grpc_server_add_insecure_channel_from_fd_type)(grpc_server *server, grpc_completion_queue *cq, int fd); -extern grpc_server_add_insecure_channel_from_fd_type grpc_server_add_insecure_channel_from_fd_import; -#define grpc_server_add_insecure_channel_from_fd grpc_server_add_insecure_channel_from_fd_import -typedef void(*grpc_use_signal_type)(int signum); -extern grpc_use_signal_type grpc_use_signal_import; -#define grpc_use_signal grpc_use_signal_import -typedef const grpc_auth_property *(*grpc_auth_property_iterator_next_type)(grpc_auth_property_iterator *it); -extern grpc_auth_property_iterator_next_type grpc_auth_property_iterator_next_import; -#define grpc_auth_property_iterator_next grpc_auth_property_iterator_next_import -typedef grpc_auth_property_iterator(*grpc_auth_context_property_iterator_type)(const grpc_auth_context *ctx); -extern grpc_auth_context_property_iterator_type grpc_auth_context_property_iterator_import; -#define grpc_auth_context_property_iterator grpc_auth_context_property_iterator_import -typedef grpc_auth_property_iterator(*grpc_auth_context_peer_identity_type)(const grpc_auth_context *ctx); -extern grpc_auth_context_peer_identity_type grpc_auth_context_peer_identity_import; -#define grpc_auth_context_peer_identity grpc_auth_context_peer_identity_import -typedef grpc_auth_property_iterator(*grpc_auth_context_find_properties_by_name_type)(const grpc_auth_context *ctx, const char *name); -extern grpc_auth_context_find_properties_by_name_type grpc_auth_context_find_properties_by_name_import; -#define grpc_auth_context_find_properties_by_name grpc_auth_context_find_properties_by_name_import -typedef const char *(*grpc_auth_context_peer_identity_property_name_type)(const grpc_auth_context *ctx); -extern grpc_auth_context_peer_identity_property_name_type grpc_auth_context_peer_identity_property_name_import; -#define grpc_auth_context_peer_identity_property_name grpc_auth_context_peer_identity_property_name_import -typedef int(*grpc_auth_context_peer_is_authenticated_type)(const grpc_auth_context *ctx); -extern grpc_auth_context_peer_is_authenticated_type grpc_auth_context_peer_is_authenticated_import; -#define grpc_auth_context_peer_is_authenticated grpc_auth_context_peer_is_authenticated_import -typedef grpc_auth_context *(*grpc_call_auth_context_type)(grpc_call *call); -extern grpc_call_auth_context_type grpc_call_auth_context_import; -#define grpc_call_auth_context grpc_call_auth_context_import -typedef void(*grpc_auth_context_release_type)(grpc_auth_context *context); -extern grpc_auth_context_release_type grpc_auth_context_release_import; -#define grpc_auth_context_release grpc_auth_context_release_import -typedef void(*grpc_auth_context_add_property_type)(grpc_auth_context *ctx, const char *name, const char *value, size_t value_length); -extern grpc_auth_context_add_property_type grpc_auth_context_add_property_import; -#define grpc_auth_context_add_property grpc_auth_context_add_property_import -typedef void(*grpc_auth_context_add_cstring_property_type)(grpc_auth_context *ctx, const char *name, const char *value); -extern grpc_auth_context_add_cstring_property_type grpc_auth_context_add_cstring_property_import; -#define grpc_auth_context_add_cstring_property grpc_auth_context_add_cstring_property_import -typedef int(*grpc_auth_context_set_peer_identity_property_name_type)(grpc_auth_context *ctx, const char *name); -extern grpc_auth_context_set_peer_identity_property_name_type grpc_auth_context_set_peer_identity_property_name_import; -#define grpc_auth_context_set_peer_identity_property_name grpc_auth_context_set_peer_identity_property_name_import -typedef void(*grpc_channel_credentials_release_type)(grpc_channel_credentials *creds); -extern grpc_channel_credentials_release_type grpc_channel_credentials_release_import; -#define grpc_channel_credentials_release grpc_channel_credentials_release_import -typedef grpc_channel_credentials *(*grpc_google_default_credentials_create_type)(void); -extern grpc_google_default_credentials_create_type grpc_google_default_credentials_create_import; -#define grpc_google_default_credentials_create grpc_google_default_credentials_create_import -typedef void(*grpc_set_ssl_roots_override_callback_type)(grpc_ssl_roots_override_callback cb); -extern grpc_set_ssl_roots_override_callback_type grpc_set_ssl_roots_override_callback_import; -#define grpc_set_ssl_roots_override_callback grpc_set_ssl_roots_override_callback_import -typedef grpc_channel_credentials *(*grpc_ssl_credentials_create_type)(const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pair, void *reserved); -extern grpc_ssl_credentials_create_type grpc_ssl_credentials_create_import; -#define grpc_ssl_credentials_create grpc_ssl_credentials_create_import -typedef void(*grpc_call_credentials_release_type)(grpc_call_credentials *creds); -extern grpc_call_credentials_release_type grpc_call_credentials_release_import; -#define grpc_call_credentials_release grpc_call_credentials_release_import -typedef grpc_channel_credentials *(*grpc_composite_channel_credentials_create_type)(grpc_channel_credentials *channel_creds, grpc_call_credentials *call_creds, void *reserved); -extern grpc_composite_channel_credentials_create_type grpc_composite_channel_credentials_create_import; -#define grpc_composite_channel_credentials_create grpc_composite_channel_credentials_create_import -typedef grpc_call_credentials *(*grpc_composite_call_credentials_create_type)(grpc_call_credentials *creds1, grpc_call_credentials *creds2, void *reserved); -extern grpc_composite_call_credentials_create_type grpc_composite_call_credentials_create_import; -#define grpc_composite_call_credentials_create grpc_composite_call_credentials_create_import -typedef grpc_call_credentials *(*grpc_google_compute_engine_credentials_create_type)(void *reserved); -extern grpc_google_compute_engine_credentials_create_type grpc_google_compute_engine_credentials_create_import; -#define grpc_google_compute_engine_credentials_create grpc_google_compute_engine_credentials_create_import -typedef gpr_timespec(*grpc_max_auth_token_lifetime_type)(); -extern grpc_max_auth_token_lifetime_type grpc_max_auth_token_lifetime_import; -#define grpc_max_auth_token_lifetime grpc_max_auth_token_lifetime_import -typedef grpc_call_credentials *(*grpc_service_account_jwt_access_credentials_create_type)(const char *json_key, gpr_timespec token_lifetime, void *reserved); -extern grpc_service_account_jwt_access_credentials_create_type grpc_service_account_jwt_access_credentials_create_import; -#define grpc_service_account_jwt_access_credentials_create grpc_service_account_jwt_access_credentials_create_import -typedef grpc_call_credentials *(*grpc_google_refresh_token_credentials_create_type)(const char *json_refresh_token, void *reserved); -extern grpc_google_refresh_token_credentials_create_type grpc_google_refresh_token_credentials_create_import; -#define grpc_google_refresh_token_credentials_create grpc_google_refresh_token_credentials_create_import -typedef grpc_call_credentials *(*grpc_access_token_credentials_create_type)(const char *access_token, void *reserved); -extern grpc_access_token_credentials_create_type grpc_access_token_credentials_create_import; -#define grpc_access_token_credentials_create grpc_access_token_credentials_create_import -typedef grpc_call_credentials *(*grpc_google_iam_credentials_create_type)(const char *authorization_token, const char *authority_selector, void *reserved); -extern grpc_google_iam_credentials_create_type grpc_google_iam_credentials_create_import; -#define grpc_google_iam_credentials_create grpc_google_iam_credentials_create_import -typedef grpc_call_credentials *(*grpc_metadata_credentials_create_from_plugin_type)(grpc_metadata_credentials_plugin plugin, void *reserved); -extern grpc_metadata_credentials_create_from_plugin_type grpc_metadata_credentials_create_from_plugin_import; -#define grpc_metadata_credentials_create_from_plugin grpc_metadata_credentials_create_from_plugin_import -typedef grpc_channel *(*grpc_secure_channel_create_type)(grpc_channel_credentials *creds, const char *target, const grpc_channel_args *args, void *reserved); -extern grpc_secure_channel_create_type grpc_secure_channel_create_import; -#define grpc_secure_channel_create grpc_secure_channel_create_import -typedef void(*grpc_server_credentials_release_type)(grpc_server_credentials *creds); -extern grpc_server_credentials_release_type grpc_server_credentials_release_import; -#define grpc_server_credentials_release grpc_server_credentials_release_import -typedef grpc_server_credentials *(*grpc_ssl_server_credentials_create_type)(const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, size_t num_key_cert_pairs, int force_client_auth, void *reserved); -extern grpc_ssl_server_credentials_create_type grpc_ssl_server_credentials_create_import; -#define grpc_ssl_server_credentials_create grpc_ssl_server_credentials_create_import -typedef grpc_server_credentials *(*grpc_ssl_server_credentials_create_ex_type)(const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs, size_t num_key_cert_pairs, grpc_ssl_client_certificate_request_type client_certificate_request, void *reserved); -extern grpc_ssl_server_credentials_create_ex_type grpc_ssl_server_credentials_create_ex_import; -#define grpc_ssl_server_credentials_create_ex grpc_ssl_server_credentials_create_ex_import -typedef int(*grpc_server_add_secure_http2_port_type)(grpc_server *server, const char *addr, grpc_server_credentials *creds); -extern grpc_server_add_secure_http2_port_type grpc_server_add_secure_http2_port_import; -#define grpc_server_add_secure_http2_port grpc_server_add_secure_http2_port_import -typedef grpc_call_error(*grpc_call_set_credentials_type)(grpc_call *call, grpc_call_credentials *creds); -extern grpc_call_set_credentials_type grpc_call_set_credentials_import; -#define grpc_call_set_credentials grpc_call_set_credentials_import -typedef void(*grpc_server_credentials_set_auth_metadata_processor_type)(grpc_server_credentials *creds, grpc_auth_metadata_processor processor); -extern grpc_server_credentials_set_auth_metadata_processor_type grpc_server_credentials_set_auth_metadata_processor_import; -#define grpc_server_credentials_set_auth_metadata_processor grpc_server_credentials_set_auth_metadata_processor_import -typedef void *(*gpr_malloc_type)(size_t size); -extern gpr_malloc_type gpr_malloc_import; -#define gpr_malloc gpr_malloc_import -typedef void(*gpr_free_type)(void *ptr); -extern gpr_free_type gpr_free_import; -#define gpr_free gpr_free_import -typedef void *(*gpr_realloc_type)(void *p, size_t size); -extern gpr_realloc_type gpr_realloc_import; -#define gpr_realloc gpr_realloc_import -typedef void *(*gpr_malloc_aligned_type)(size_t size, size_t alignment_log); -extern gpr_malloc_aligned_type gpr_malloc_aligned_import; -#define gpr_malloc_aligned gpr_malloc_aligned_import -typedef void(*gpr_free_aligned_type)(void *ptr); -extern gpr_free_aligned_type gpr_free_aligned_import; -#define gpr_free_aligned gpr_free_aligned_import -typedef void(*gpr_set_allocation_functions_type)(gpr_allocation_functions functions); -extern gpr_set_allocation_functions_type gpr_set_allocation_functions_import; -#define gpr_set_allocation_functions gpr_set_allocation_functions_import -typedef gpr_allocation_functions(*gpr_get_allocation_functions_type)(); -extern gpr_get_allocation_functions_type gpr_get_allocation_functions_import; -#define gpr_get_allocation_functions gpr_get_allocation_functions_import -typedef grpc_byte_buffer *(*grpc_raw_byte_buffer_create_type)(gpr_slice *slices, size_t nslices); -extern grpc_raw_byte_buffer_create_type grpc_raw_byte_buffer_create_import; -#define grpc_raw_byte_buffer_create grpc_raw_byte_buffer_create_import -typedef grpc_byte_buffer *(*grpc_raw_compressed_byte_buffer_create_type)(gpr_slice *slices, size_t nslices, grpc_compression_algorithm compression); -extern grpc_raw_compressed_byte_buffer_create_type grpc_raw_compressed_byte_buffer_create_import; -#define grpc_raw_compressed_byte_buffer_create grpc_raw_compressed_byte_buffer_create_import -typedef grpc_byte_buffer *(*grpc_byte_buffer_copy_type)(grpc_byte_buffer *bb); -extern grpc_byte_buffer_copy_type grpc_byte_buffer_copy_import; -#define grpc_byte_buffer_copy grpc_byte_buffer_copy_import -typedef size_t(*grpc_byte_buffer_length_type)(grpc_byte_buffer *bb); -extern grpc_byte_buffer_length_type grpc_byte_buffer_length_import; -#define grpc_byte_buffer_length grpc_byte_buffer_length_import -typedef void(*grpc_byte_buffer_destroy_type)(grpc_byte_buffer *byte_buffer); -extern grpc_byte_buffer_destroy_type grpc_byte_buffer_destroy_import; -#define grpc_byte_buffer_destroy grpc_byte_buffer_destroy_import -typedef int(*grpc_byte_buffer_reader_init_type)(grpc_byte_buffer_reader *reader, grpc_byte_buffer *buffer); -extern grpc_byte_buffer_reader_init_type grpc_byte_buffer_reader_init_import; -#define grpc_byte_buffer_reader_init grpc_byte_buffer_reader_init_import -typedef void(*grpc_byte_buffer_reader_destroy_type)(grpc_byte_buffer_reader *reader); -extern grpc_byte_buffer_reader_destroy_type grpc_byte_buffer_reader_destroy_import; -#define grpc_byte_buffer_reader_destroy grpc_byte_buffer_reader_destroy_import -typedef int(*grpc_byte_buffer_reader_next_type)(grpc_byte_buffer_reader *reader, gpr_slice *slice); -extern grpc_byte_buffer_reader_next_type grpc_byte_buffer_reader_next_import; -#define grpc_byte_buffer_reader_next grpc_byte_buffer_reader_next_import -typedef gpr_slice(*grpc_byte_buffer_reader_readall_type)(grpc_byte_buffer_reader *reader); -extern grpc_byte_buffer_reader_readall_type grpc_byte_buffer_reader_readall_import; -#define grpc_byte_buffer_reader_readall grpc_byte_buffer_reader_readall_import -typedef grpc_byte_buffer *(*grpc_raw_byte_buffer_from_reader_type)(grpc_byte_buffer_reader *reader); -extern grpc_raw_byte_buffer_from_reader_type grpc_raw_byte_buffer_from_reader_import; -#define grpc_raw_byte_buffer_from_reader grpc_raw_byte_buffer_from_reader_import -typedef void(*gpr_log_type)(const char *file, int line, gpr_log_severity severity, const char *format, ...) GPRC_PRINT_FORMAT_CHECK(4, 5); -extern gpr_log_type gpr_log_import; -#define gpr_log gpr_log_import -typedef void(*gpr_log_message_type)(const char *file, int line, gpr_log_severity severity, const char *message); -extern gpr_log_message_type gpr_log_message_import; -#define gpr_log_message gpr_log_message_import -typedef void(*gpr_set_log_verbosity_type)(gpr_log_severity min_severity_to_print); -extern gpr_set_log_verbosity_type gpr_set_log_verbosity_import; -#define gpr_set_log_verbosity gpr_set_log_verbosity_import -typedef void(*gpr_log_verbosity_init_type)(); -extern gpr_log_verbosity_init_type gpr_log_verbosity_init_import; -#define gpr_log_verbosity_init gpr_log_verbosity_init_import -typedef void(*gpr_set_log_function_type)(gpr_log_func func); -extern gpr_set_log_function_type gpr_set_log_function_import; -#define gpr_set_log_function gpr_set_log_function_import -typedef gpr_slice(*gpr_slice_ref_type)(gpr_slice s); -extern gpr_slice_ref_type gpr_slice_ref_import; -#define gpr_slice_ref gpr_slice_ref_import -typedef void(*gpr_slice_unref_type)(gpr_slice s); -extern gpr_slice_unref_type gpr_slice_unref_import; -#define gpr_slice_unref gpr_slice_unref_import -typedef gpr_slice(*gpr_slice_new_type)(void *p, size_t len, void (*destroy)(void *)); -extern gpr_slice_new_type gpr_slice_new_import; -#define gpr_slice_new gpr_slice_new_import -typedef gpr_slice(*gpr_slice_new_with_len_type)(void *p, size_t len, void (*destroy)(void *, size_t)); -extern gpr_slice_new_with_len_type gpr_slice_new_with_len_import; -#define gpr_slice_new_with_len gpr_slice_new_with_len_import -typedef gpr_slice(*gpr_slice_malloc_type)(size_t length); -extern gpr_slice_malloc_type gpr_slice_malloc_import; -#define gpr_slice_malloc gpr_slice_malloc_import -typedef gpr_slice(*gpr_slice_from_copied_string_type)(const char *source); -extern gpr_slice_from_copied_string_type gpr_slice_from_copied_string_import; -#define gpr_slice_from_copied_string gpr_slice_from_copied_string_import -typedef gpr_slice(*gpr_slice_from_copied_buffer_type)(const char *source, size_t len); -extern gpr_slice_from_copied_buffer_type gpr_slice_from_copied_buffer_import; -#define gpr_slice_from_copied_buffer gpr_slice_from_copied_buffer_import -typedef gpr_slice(*gpr_slice_from_static_string_type)(const char *source); -extern gpr_slice_from_static_string_type gpr_slice_from_static_string_import; -#define gpr_slice_from_static_string gpr_slice_from_static_string_import -typedef gpr_slice(*gpr_slice_sub_type)(gpr_slice s, size_t begin, size_t end); -extern gpr_slice_sub_type gpr_slice_sub_import; -#define gpr_slice_sub gpr_slice_sub_import -typedef gpr_slice(*gpr_slice_sub_no_ref_type)(gpr_slice s, size_t begin, size_t end); -extern gpr_slice_sub_no_ref_type gpr_slice_sub_no_ref_import; -#define gpr_slice_sub_no_ref gpr_slice_sub_no_ref_import -typedef gpr_slice(*gpr_slice_split_tail_type)(gpr_slice *s, size_t split); -extern gpr_slice_split_tail_type gpr_slice_split_tail_import; -#define gpr_slice_split_tail gpr_slice_split_tail_import -typedef gpr_slice(*gpr_slice_split_head_type)(gpr_slice *s, size_t split); -extern gpr_slice_split_head_type gpr_slice_split_head_import; -#define gpr_slice_split_head gpr_slice_split_head_import -typedef gpr_slice(*gpr_empty_slice_type)(void); -extern gpr_empty_slice_type gpr_empty_slice_import; -#define gpr_empty_slice gpr_empty_slice_import -typedef int(*gpr_slice_cmp_type)(gpr_slice a, gpr_slice b); -extern gpr_slice_cmp_type gpr_slice_cmp_import; -#define gpr_slice_cmp gpr_slice_cmp_import -typedef int(*gpr_slice_str_cmp_type)(gpr_slice a, const char *b); -extern gpr_slice_str_cmp_type gpr_slice_str_cmp_import; -#define gpr_slice_str_cmp gpr_slice_str_cmp_import -typedef void(*gpr_slice_buffer_init_type)(gpr_slice_buffer *sb); -extern gpr_slice_buffer_init_type gpr_slice_buffer_init_import; -#define gpr_slice_buffer_init gpr_slice_buffer_init_import -typedef void(*gpr_slice_buffer_destroy_type)(gpr_slice_buffer *sb); -extern gpr_slice_buffer_destroy_type gpr_slice_buffer_destroy_import; -#define gpr_slice_buffer_destroy gpr_slice_buffer_destroy_import -typedef void(*gpr_slice_buffer_add_type)(gpr_slice_buffer *sb, gpr_slice slice); -extern gpr_slice_buffer_add_type gpr_slice_buffer_add_import; -#define gpr_slice_buffer_add gpr_slice_buffer_add_import -typedef size_t(*gpr_slice_buffer_add_indexed_type)(gpr_slice_buffer *sb, gpr_slice slice); -extern gpr_slice_buffer_add_indexed_type gpr_slice_buffer_add_indexed_import; -#define gpr_slice_buffer_add_indexed gpr_slice_buffer_add_indexed_import -typedef void(*gpr_slice_buffer_addn_type)(gpr_slice_buffer *sb, gpr_slice *slices, size_t n); -extern gpr_slice_buffer_addn_type gpr_slice_buffer_addn_import; -#define gpr_slice_buffer_addn gpr_slice_buffer_addn_import -typedef uint8_t *(*gpr_slice_buffer_tiny_add_type)(gpr_slice_buffer *sb, size_t len); -extern gpr_slice_buffer_tiny_add_type gpr_slice_buffer_tiny_add_import; -#define gpr_slice_buffer_tiny_add gpr_slice_buffer_tiny_add_import -typedef void(*gpr_slice_buffer_pop_type)(gpr_slice_buffer *sb); -extern gpr_slice_buffer_pop_type gpr_slice_buffer_pop_import; -#define gpr_slice_buffer_pop gpr_slice_buffer_pop_import -typedef void(*gpr_slice_buffer_reset_and_unref_type)(gpr_slice_buffer *sb); -extern gpr_slice_buffer_reset_and_unref_type gpr_slice_buffer_reset_and_unref_import; -#define gpr_slice_buffer_reset_and_unref gpr_slice_buffer_reset_and_unref_import -typedef void(*gpr_slice_buffer_swap_type)(gpr_slice_buffer *a, gpr_slice_buffer *b); -extern gpr_slice_buffer_swap_type gpr_slice_buffer_swap_import; -#define gpr_slice_buffer_swap gpr_slice_buffer_swap_import -typedef void(*gpr_slice_buffer_move_into_type)(gpr_slice_buffer *src, gpr_slice_buffer *dst); -extern gpr_slice_buffer_move_into_type gpr_slice_buffer_move_into_import; -#define gpr_slice_buffer_move_into gpr_slice_buffer_move_into_import -typedef void(*gpr_slice_buffer_trim_end_type)(gpr_slice_buffer *src, size_t n, gpr_slice_buffer *garbage); -extern gpr_slice_buffer_trim_end_type gpr_slice_buffer_trim_end_import; -#define gpr_slice_buffer_trim_end gpr_slice_buffer_trim_end_import -typedef void(*gpr_slice_buffer_move_first_type)(gpr_slice_buffer *src, size_t n, gpr_slice_buffer *dst); -extern gpr_slice_buffer_move_first_type gpr_slice_buffer_move_first_import; -#define gpr_slice_buffer_move_first gpr_slice_buffer_move_first_import -typedef gpr_slice(*gpr_slice_buffer_take_first_type)(gpr_slice_buffer *src); -extern gpr_slice_buffer_take_first_type gpr_slice_buffer_take_first_import; -#define gpr_slice_buffer_take_first gpr_slice_buffer_take_first_import -typedef void(*gpr_mu_init_type)(gpr_mu *mu); -extern gpr_mu_init_type gpr_mu_init_import; -#define gpr_mu_init gpr_mu_init_import -typedef void(*gpr_mu_destroy_type)(gpr_mu *mu); -extern gpr_mu_destroy_type gpr_mu_destroy_import; -#define gpr_mu_destroy gpr_mu_destroy_import -typedef void(*gpr_mu_lock_type)(gpr_mu *mu); -extern gpr_mu_lock_type gpr_mu_lock_import; -#define gpr_mu_lock gpr_mu_lock_import -typedef void(*gpr_mu_unlock_type)(gpr_mu *mu); -extern gpr_mu_unlock_type gpr_mu_unlock_import; -#define gpr_mu_unlock gpr_mu_unlock_import -typedef int(*gpr_mu_trylock_type)(gpr_mu *mu); -extern gpr_mu_trylock_type gpr_mu_trylock_import; -#define gpr_mu_trylock gpr_mu_trylock_import -typedef void(*gpr_cv_init_type)(gpr_cv *cv); -extern gpr_cv_init_type gpr_cv_init_import; -#define gpr_cv_init gpr_cv_init_import -typedef void(*gpr_cv_destroy_type)(gpr_cv *cv); -extern gpr_cv_destroy_type gpr_cv_destroy_import; -#define gpr_cv_destroy gpr_cv_destroy_import -typedef int(*gpr_cv_wait_type)(gpr_cv *cv, gpr_mu *mu, gpr_timespec abs_deadline); -extern gpr_cv_wait_type gpr_cv_wait_import; -#define gpr_cv_wait gpr_cv_wait_import -typedef void(*gpr_cv_signal_type)(gpr_cv *cv); -extern gpr_cv_signal_type gpr_cv_signal_import; -#define gpr_cv_signal gpr_cv_signal_import -typedef void(*gpr_cv_broadcast_type)(gpr_cv *cv); -extern gpr_cv_broadcast_type gpr_cv_broadcast_import; -#define gpr_cv_broadcast gpr_cv_broadcast_import -typedef void(*gpr_once_init_type)(gpr_once *once, void (*init_routine)(void)); -extern gpr_once_init_type gpr_once_init_import; -#define gpr_once_init gpr_once_init_import -typedef void(*gpr_event_init_type)(gpr_event *ev); -extern gpr_event_init_type gpr_event_init_import; -#define gpr_event_init gpr_event_init_import -typedef void(*gpr_event_set_type)(gpr_event *ev, void *value); -extern gpr_event_set_type gpr_event_set_import; -#define gpr_event_set gpr_event_set_import -typedef void *(*gpr_event_get_type)(gpr_event *ev); -extern gpr_event_get_type gpr_event_get_import; -#define gpr_event_get gpr_event_get_import -typedef void *(*gpr_event_wait_type)(gpr_event *ev, gpr_timespec abs_deadline); -extern gpr_event_wait_type gpr_event_wait_import; -#define gpr_event_wait gpr_event_wait_import -typedef void(*gpr_ref_init_type)(gpr_refcount *r, int n); -extern gpr_ref_init_type gpr_ref_init_import; -#define gpr_ref_init gpr_ref_init_import -typedef void(*gpr_ref_type)(gpr_refcount *r); -extern gpr_ref_type gpr_ref_import; -#define gpr_ref gpr_ref_import -typedef void(*gpr_ref_non_zero_type)(gpr_refcount *r); -extern gpr_ref_non_zero_type gpr_ref_non_zero_import; -#define gpr_ref_non_zero gpr_ref_non_zero_import -typedef void(*gpr_refn_type)(gpr_refcount *r, int n); -extern gpr_refn_type gpr_refn_import; -#define gpr_refn gpr_refn_import -typedef int(*gpr_unref_type)(gpr_refcount *r); -extern gpr_unref_type gpr_unref_import; -#define gpr_unref gpr_unref_import -typedef void(*gpr_stats_init_type)(gpr_stats_counter *c, intptr_t n); -extern gpr_stats_init_type gpr_stats_init_import; -#define gpr_stats_init gpr_stats_init_import -typedef void(*gpr_stats_inc_type)(gpr_stats_counter *c, intptr_t inc); -extern gpr_stats_inc_type gpr_stats_inc_import; -#define gpr_stats_inc gpr_stats_inc_import -typedef intptr_t(*gpr_stats_read_type)(const gpr_stats_counter *c); -extern gpr_stats_read_type gpr_stats_read_import; -#define gpr_stats_read gpr_stats_read_import -typedef gpr_timespec(*gpr_time_0_type)(gpr_clock_type type); -extern gpr_time_0_type gpr_time_0_import; -#define gpr_time_0 gpr_time_0_import -typedef gpr_timespec(*gpr_inf_future_type)(gpr_clock_type type); -extern gpr_inf_future_type gpr_inf_future_import; -#define gpr_inf_future gpr_inf_future_import -typedef gpr_timespec(*gpr_inf_past_type)(gpr_clock_type type); -extern gpr_inf_past_type gpr_inf_past_import; -#define gpr_inf_past gpr_inf_past_import -typedef void(*gpr_time_init_type)(void); -extern gpr_time_init_type gpr_time_init_import; -#define gpr_time_init gpr_time_init_import -typedef gpr_timespec(*gpr_now_type)(gpr_clock_type clock); -extern gpr_now_type gpr_now_import; -#define gpr_now gpr_now_import -typedef gpr_timespec(*gpr_convert_clock_type_type)(gpr_timespec t, gpr_clock_type target_clock); -extern gpr_convert_clock_type_type gpr_convert_clock_type_import; -#define gpr_convert_clock_type gpr_convert_clock_type_import -typedef int(*gpr_time_cmp_type)(gpr_timespec a, gpr_timespec b); -extern gpr_time_cmp_type gpr_time_cmp_import; -#define gpr_time_cmp gpr_time_cmp_import -typedef gpr_timespec(*gpr_time_max_type)(gpr_timespec a, gpr_timespec b); -extern gpr_time_max_type gpr_time_max_import; -#define gpr_time_max gpr_time_max_import -typedef gpr_timespec(*gpr_time_min_type)(gpr_timespec a, gpr_timespec b); -extern gpr_time_min_type gpr_time_min_import; -#define gpr_time_min gpr_time_min_import -typedef gpr_timespec(*gpr_time_add_type)(gpr_timespec a, gpr_timespec b); -extern gpr_time_add_type gpr_time_add_import; -#define gpr_time_add gpr_time_add_import -typedef gpr_timespec(*gpr_time_sub_type)(gpr_timespec a, gpr_timespec b); -extern gpr_time_sub_type gpr_time_sub_import; -#define gpr_time_sub gpr_time_sub_import -typedef gpr_timespec(*gpr_time_from_micros_type)(int64_t x, gpr_clock_type clock_type); -extern gpr_time_from_micros_type gpr_time_from_micros_import; -#define gpr_time_from_micros gpr_time_from_micros_import -typedef gpr_timespec(*gpr_time_from_nanos_type)(int64_t x, gpr_clock_type clock_type); -extern gpr_time_from_nanos_type gpr_time_from_nanos_import; -#define gpr_time_from_nanos gpr_time_from_nanos_import -typedef gpr_timespec(*gpr_time_from_millis_type)(int64_t x, gpr_clock_type clock_type); -extern gpr_time_from_millis_type gpr_time_from_millis_import; -#define gpr_time_from_millis gpr_time_from_millis_import -typedef gpr_timespec(*gpr_time_from_seconds_type)(int64_t x, gpr_clock_type clock_type); -extern gpr_time_from_seconds_type gpr_time_from_seconds_import; -#define gpr_time_from_seconds gpr_time_from_seconds_import -typedef gpr_timespec(*gpr_time_from_minutes_type)(int64_t x, gpr_clock_type clock_type); -extern gpr_time_from_minutes_type gpr_time_from_minutes_import; -#define gpr_time_from_minutes gpr_time_from_minutes_import -typedef gpr_timespec(*gpr_time_from_hours_type)(int64_t x, gpr_clock_type clock_type); -extern gpr_time_from_hours_type gpr_time_from_hours_import; -#define gpr_time_from_hours gpr_time_from_hours_import -typedef int32_t(*gpr_time_to_millis_type)(gpr_timespec timespec); -extern gpr_time_to_millis_type gpr_time_to_millis_import; -#define gpr_time_to_millis gpr_time_to_millis_import -typedef int(*gpr_time_similar_type)(gpr_timespec a, gpr_timespec b, gpr_timespec threshold); -extern gpr_time_similar_type gpr_time_similar_import; -#define gpr_time_similar gpr_time_similar_import -typedef void(*gpr_sleep_until_type)(gpr_timespec until); -extern gpr_sleep_until_type gpr_sleep_until_import; -#define gpr_sleep_until gpr_sleep_until_import -typedef double(*gpr_timespec_to_micros_type)(gpr_timespec t); -extern gpr_timespec_to_micros_type gpr_timespec_to_micros_import; -#define gpr_timespec_to_micros gpr_timespec_to_micros_import -typedef gpr_avl(*gpr_avl_create_type)(const gpr_avl_vtable *vtable); -extern gpr_avl_create_type gpr_avl_create_import; -#define gpr_avl_create gpr_avl_create_import -typedef gpr_avl(*gpr_avl_ref_type)(gpr_avl avl); -extern gpr_avl_ref_type gpr_avl_ref_import; -#define gpr_avl_ref gpr_avl_ref_import -typedef void(*gpr_avl_unref_type)(gpr_avl avl); -extern gpr_avl_unref_type gpr_avl_unref_import; -#define gpr_avl_unref gpr_avl_unref_import -typedef gpr_avl(*gpr_avl_add_type)(gpr_avl avl, void *key, void *value); -extern gpr_avl_add_type gpr_avl_add_import; -#define gpr_avl_add gpr_avl_add_import -typedef gpr_avl(*gpr_avl_remove_type)(gpr_avl avl, void *key); -extern gpr_avl_remove_type gpr_avl_remove_import; -#define gpr_avl_remove gpr_avl_remove_import -typedef void *(*gpr_avl_get_type)(gpr_avl avl, void *key); -extern gpr_avl_get_type gpr_avl_get_import; -#define gpr_avl_get gpr_avl_get_import -typedef int(*gpr_avl_maybe_get_type)(gpr_avl avl, void *key, void **value); -extern gpr_avl_maybe_get_type gpr_avl_maybe_get_import; -#define gpr_avl_maybe_get gpr_avl_maybe_get_import -typedef int(*gpr_avl_is_empty_type)(gpr_avl avl); -extern gpr_avl_is_empty_type gpr_avl_is_empty_import; -#define gpr_avl_is_empty gpr_avl_is_empty_import -typedef gpr_cmdline *(*gpr_cmdline_create_type)(const char *description); -extern gpr_cmdline_create_type gpr_cmdline_create_import; -#define gpr_cmdline_create gpr_cmdline_create_import -typedef void(*gpr_cmdline_add_int_type)(gpr_cmdline *cl, const char *name, const char *help, int *value); -extern gpr_cmdline_add_int_type gpr_cmdline_add_int_import; -#define gpr_cmdline_add_int gpr_cmdline_add_int_import -typedef void(*gpr_cmdline_add_flag_type)(gpr_cmdline *cl, const char *name, const char *help, int *value); -extern gpr_cmdline_add_flag_type gpr_cmdline_add_flag_import; -#define gpr_cmdline_add_flag gpr_cmdline_add_flag_import -typedef void(*gpr_cmdline_add_string_type)(gpr_cmdline *cl, const char *name, const char *help, char **value); -extern gpr_cmdline_add_string_type gpr_cmdline_add_string_import; -#define gpr_cmdline_add_string gpr_cmdline_add_string_import -typedef void(*gpr_cmdline_on_extra_arg_type)(gpr_cmdline *cl, const char *name, const char *help, void (*on_extra_arg)(void *user_data, const char *arg), void *user_data); -extern gpr_cmdline_on_extra_arg_type gpr_cmdline_on_extra_arg_import; -#define gpr_cmdline_on_extra_arg gpr_cmdline_on_extra_arg_import -typedef void(*gpr_cmdline_set_survive_failure_type)(gpr_cmdline *cl); -extern gpr_cmdline_set_survive_failure_type gpr_cmdline_set_survive_failure_import; -#define gpr_cmdline_set_survive_failure gpr_cmdline_set_survive_failure_import -typedef int(*gpr_cmdline_parse_type)(gpr_cmdline *cl, int argc, char **argv); -extern gpr_cmdline_parse_type gpr_cmdline_parse_import; -#define gpr_cmdline_parse gpr_cmdline_parse_import -typedef void(*gpr_cmdline_destroy_type)(gpr_cmdline *cl); -extern gpr_cmdline_destroy_type gpr_cmdline_destroy_import; -#define gpr_cmdline_destroy gpr_cmdline_destroy_import -typedef char *(*gpr_cmdline_usage_string_type)(gpr_cmdline *cl, const char *argv0); -extern gpr_cmdline_usage_string_type gpr_cmdline_usage_string_import; -#define gpr_cmdline_usage_string gpr_cmdline_usage_string_import -typedef unsigned(*gpr_cpu_num_cores_type)(void); -extern gpr_cpu_num_cores_type gpr_cpu_num_cores_import; -#define gpr_cpu_num_cores gpr_cpu_num_cores_import -typedef unsigned(*gpr_cpu_current_cpu_type)(void); -extern gpr_cpu_current_cpu_type gpr_cpu_current_cpu_import; -#define gpr_cpu_current_cpu gpr_cpu_current_cpu_import -typedef gpr_histogram *(*gpr_histogram_create_type)(double resolution, double max_bucket_start); -extern gpr_histogram_create_type gpr_histogram_create_import; -#define gpr_histogram_create gpr_histogram_create_import -typedef void(*gpr_histogram_destroy_type)(gpr_histogram *h); -extern gpr_histogram_destroy_type gpr_histogram_destroy_import; -#define gpr_histogram_destroy gpr_histogram_destroy_import -typedef void(*gpr_histogram_add_type)(gpr_histogram *h, double x); -extern gpr_histogram_add_type gpr_histogram_add_import; -#define gpr_histogram_add gpr_histogram_add_import -typedef int(*gpr_histogram_merge_type)(gpr_histogram *dst, const gpr_histogram *src); -extern gpr_histogram_merge_type gpr_histogram_merge_import; -#define gpr_histogram_merge gpr_histogram_merge_import -typedef double(*gpr_histogram_percentile_type)(gpr_histogram *histogram, double percentile); -extern gpr_histogram_percentile_type gpr_histogram_percentile_import; -#define gpr_histogram_percentile gpr_histogram_percentile_import -typedef double(*gpr_histogram_mean_type)(gpr_histogram *histogram); -extern gpr_histogram_mean_type gpr_histogram_mean_import; -#define gpr_histogram_mean gpr_histogram_mean_import -typedef double(*gpr_histogram_stddev_type)(gpr_histogram *histogram); -extern gpr_histogram_stddev_type gpr_histogram_stddev_import; -#define gpr_histogram_stddev gpr_histogram_stddev_import -typedef double(*gpr_histogram_variance_type)(gpr_histogram *histogram); -extern gpr_histogram_variance_type gpr_histogram_variance_import; -#define gpr_histogram_variance gpr_histogram_variance_import -typedef double(*gpr_histogram_maximum_type)(gpr_histogram *histogram); -extern gpr_histogram_maximum_type gpr_histogram_maximum_import; -#define gpr_histogram_maximum gpr_histogram_maximum_import -typedef double(*gpr_histogram_minimum_type)(gpr_histogram *histogram); -extern gpr_histogram_minimum_type gpr_histogram_minimum_import; -#define gpr_histogram_minimum gpr_histogram_minimum_import -typedef double(*gpr_histogram_count_type)(gpr_histogram *histogram); -extern gpr_histogram_count_type gpr_histogram_count_import; -#define gpr_histogram_count gpr_histogram_count_import -typedef double(*gpr_histogram_sum_type)(gpr_histogram *histogram); -extern gpr_histogram_sum_type gpr_histogram_sum_import; -#define gpr_histogram_sum gpr_histogram_sum_import -typedef double(*gpr_histogram_sum_of_squares_type)(gpr_histogram *histogram); -extern gpr_histogram_sum_of_squares_type gpr_histogram_sum_of_squares_import; -#define gpr_histogram_sum_of_squares gpr_histogram_sum_of_squares_import -typedef const uint32_t *(*gpr_histogram_get_contents_type)(gpr_histogram *histogram, size_t *count); -extern gpr_histogram_get_contents_type gpr_histogram_get_contents_import; -#define gpr_histogram_get_contents gpr_histogram_get_contents_import -typedef void(*gpr_histogram_merge_contents_type)(gpr_histogram *histogram, const uint32_t *data, size_t data_count, double min_seen, double max_seen, double sum, double sum_of_squares, double count); -extern gpr_histogram_merge_contents_type gpr_histogram_merge_contents_import; -#define gpr_histogram_merge_contents gpr_histogram_merge_contents_import -typedef int(*gpr_join_host_port_type)(char **out, const char *host, int port); -extern gpr_join_host_port_type gpr_join_host_port_import; -#define gpr_join_host_port gpr_join_host_port_import -typedef int(*gpr_split_host_port_type)(const char *name, char **host, char **port); -extern gpr_split_host_port_type gpr_split_host_port_import; -#define gpr_split_host_port gpr_split_host_port_import -typedef char *(*gpr_format_message_type)(int messageid); -extern gpr_format_message_type gpr_format_message_import; -#define gpr_format_message gpr_format_message_import -typedef char *(*gpr_strdup_type)(const char *src); -extern gpr_strdup_type gpr_strdup_import; -#define gpr_strdup gpr_strdup_import -typedef int(*gpr_asprintf_type)(char **strp, const char *format, ...) GPRC_PRINT_FORMAT_CHECK(2, 3); -extern gpr_asprintf_type gpr_asprintf_import; -#define gpr_asprintf gpr_asprintf_import -typedef const char *(*gpr_subprocess_binary_extension_type)(); -extern gpr_subprocess_binary_extension_type gpr_subprocess_binary_extension_import; -#define gpr_subprocess_binary_extension gpr_subprocess_binary_extension_import -typedef gpr_subprocess *(*gpr_subprocess_create_type)(int argc, const char **argv); -extern gpr_subprocess_create_type gpr_subprocess_create_import; -#define gpr_subprocess_create gpr_subprocess_create_import -typedef void(*gpr_subprocess_destroy_type)(gpr_subprocess *p); -extern gpr_subprocess_destroy_type gpr_subprocess_destroy_import; -#define gpr_subprocess_destroy gpr_subprocess_destroy_import -typedef int(*gpr_subprocess_join_type)(gpr_subprocess *p); -extern gpr_subprocess_join_type gpr_subprocess_join_import; -#define gpr_subprocess_join gpr_subprocess_join_import -typedef void(*gpr_subprocess_interrupt_type)(gpr_subprocess *p); -extern gpr_subprocess_interrupt_type gpr_subprocess_interrupt_import; -#define gpr_subprocess_interrupt gpr_subprocess_interrupt_import -typedef int(*gpr_thd_new_type)(gpr_thd_id *t, void (*thd_body)(void *arg), void *arg, const gpr_thd_options *options); -extern gpr_thd_new_type gpr_thd_new_import; -#define gpr_thd_new gpr_thd_new_import -typedef gpr_thd_options(*gpr_thd_options_default_type)(void); -extern gpr_thd_options_default_type gpr_thd_options_default_import; -#define gpr_thd_options_default gpr_thd_options_default_import -typedef void(*gpr_thd_options_set_detached_type)(gpr_thd_options *options); -extern gpr_thd_options_set_detached_type gpr_thd_options_set_detached_import; -#define gpr_thd_options_set_detached gpr_thd_options_set_detached_import -typedef void(*gpr_thd_options_set_joinable_type)(gpr_thd_options *options); -extern gpr_thd_options_set_joinable_type gpr_thd_options_set_joinable_import; -#define gpr_thd_options_set_joinable gpr_thd_options_set_joinable_import -typedef int(*gpr_thd_options_is_detached_type)(const gpr_thd_options *options); -extern gpr_thd_options_is_detached_type gpr_thd_options_is_detached_import; -#define gpr_thd_options_is_detached gpr_thd_options_is_detached_import -typedef int(*gpr_thd_options_is_joinable_type)(const gpr_thd_options *options); -extern gpr_thd_options_is_joinable_type gpr_thd_options_is_joinable_import; -#define gpr_thd_options_is_joinable gpr_thd_options_is_joinable_import -typedef gpr_thd_id(*gpr_thd_currentid_type)(void); -extern gpr_thd_currentid_type gpr_thd_currentid_import; -#define gpr_thd_currentid gpr_thd_currentid_import -typedef void(*gpr_thd_join_type)(gpr_thd_id t); -extern gpr_thd_join_type gpr_thd_join_import; -#define gpr_thd_join gpr_thd_join_import - -#ifdef __cplusplus -extern "C" { -#endif /* __cpluslus */ - -void pygrpc_load_imports(HMODULE library); - -#ifdef __cplusplus -} -#endif /* __cpluslus */ - -#else /* !GPR_WINDOWS */ - #include #include #include @@ -895,6 +47,4 @@ void pygrpc_load_imports(HMODULE library); #include #include -#endif /* !GPR_WINDOWS */ - #endif diff --git a/src/python/grpcio/grpc/_cython/loader.c b/src/python/grpcio/grpc/_cython/loader.c index 86b70dbb02d..750a9f6fa38 100644 --- a/src/python/grpcio/grpc/_cython/loader.c +++ b/src/python/grpcio/grpc/_cython/loader.c @@ -38,37 +38,10 @@ extern "C" { #endif /* __cpluslus */ -#if GPR_WINDOWS - -int pygrpc_load_core(char *path) { - HMODULE grpc_c; -#ifdef GPR_ARCH_32 - /* Close your eyes for a moment, it'll all be over soon. */ - char *six = strrchr(path, '6'); - *six++ = '3'; - *six = '2'; -#endif - grpc_c = LoadLibraryA(path); - if (grpc_c) { - pygrpc_load_imports(grpc_c); - return 1; - } - - return 0; -} - -#else +/* TODO(atash) remove cruft */ int pygrpc_load_core(char *path) { return 1; } -#endif /* !GPR_WINDOWS */ - -// Cython doesn't have Py_AtExit bindings, so we call the C_API directly -int pygrpc_initialize_core(void) { - grpc_init(); - return Py_AtExit(grpc_shutdown) < 0 ? 0 : 1; -} - #ifdef __cplusplus } #endif /* __cpluslus */ diff --git a/src/python/grpcio/grpc/_cython/loader.h b/src/python/grpcio/grpc/_cython/loader.h index eb4b1a1b018..62fd2252047 100644 --- a/src/python/grpcio/grpc/_cython/loader.h +++ b/src/python/grpcio/grpc/_cython/loader.h @@ -39,6 +39,8 @@ /* Additional inclusions not covered by "imports.generated.h" */ #include +/* TODO(atash) remove cruft */ + #ifdef __cplusplus extern "C" { #endif /* __cpluslus */ diff --git a/templates/src/python/grpcio/grpc/_cython/imports.generated.c.template b/templates/src/python/grpcio/grpc/_cython/imports.generated.c.template index 84fa5e62bfe..d83bccad1db 100644 --- a/templates/src/python/grpcio/grpc/_cython/imports.generated.c.template +++ b/templates/src/python/grpcio/grpc/_cython/imports.generated.c.template @@ -33,29 +33,9 @@ * */ + /* TODO(atash) remove cruft */ #include #include "imports.generated.h" - #ifdef GPR_WINDOWS - - %for api in c_apis: - ${api.name}_type ${api.name}_import; - %endfor - - #ifdef __cplusplus - extern "C" { - #endif /* __cpluslus */ - - void pygrpc_load_imports(HMODULE library) { - %for api in c_apis: - ${api.name}_import = (${api.name}_type) GetProcAddress(library, "${api.name}"); - %endfor - } - - #ifdef __cplusplus - } - #endif /* __cpluslus */ - - #endif /* !GPR_WINDOWS */ diff --git a/templates/src/python/grpcio/grpc/_cython/imports.generated.h.template b/templates/src/python/grpcio/grpc/_cython/imports.generated.h.template index d0f60dc0a50..b85bc3dbd8b 100644 --- a/templates/src/python/grpcio/grpc/_cython/imports.generated.h.template +++ b/templates/src/python/grpcio/grpc/_cython/imports.generated.h.template @@ -33,37 +33,12 @@ * */ + /* TODO(atash) remove cruft */ #ifndef PYGRPC_CYTHON_WINDOWS_IMPORTS_H_ #define PYGRPC_CYTHON_WINDOWS_IMPORTS_H_ #include - #ifdef GPR_WINDOWS - - #include - - %for header in sorted(set(api.header for api in c_apis)): - #include <${'/'.join(header.split('/')[1:])}> - %endfor - - %for api in c_apis: - typedef ${api.return_type}(*${api.name}_type)(${api.arguments}); - extern ${api.name}_type ${api.name}_import; - #define ${api.name} ${api.name}_import - %endfor - - #ifdef __cplusplus - extern "C" { - #endif /* __cpluslus */ - - void pygrpc_load_imports(HMODULE library); - - #ifdef __cplusplus - } - #endif /* __cpluslus */ - - #else /* !GPR_WINDOWS */ - #include #include #include @@ -74,6 +49,4 @@ #include #include - #endif /* !GPR_WINDOWS */ - #endif diff --git a/tools/distrib/python/grpcio_tools/setup.py b/tools/distrib/python/grpcio_tools/setup.py index afb6063906e..e025158a82b 100644 --- a/tools/distrib/python/grpcio_tools/setup.py +++ b/tools/distrib/python/grpcio_tools/setup.py @@ -32,6 +32,7 @@ import errno import os import os.path import pkg_resources +import platform import shlex import shutil import sys @@ -45,6 +46,9 @@ from setuptools.command import build_ext os.chdir(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, os.path.abspath('.')) +import protoc_lib_deps +import grpc_version + PY3 = sys.version_info.major == 3 # There are some situations (like on Windows) where CC, CFLAGS, and LDFLAGS are @@ -60,8 +64,9 @@ EXTRA_LINK_ARGS = shlex.split(os.environ.get('GRPC_PYTHON_LDFLAGS', GRPC_PYTHON_TOOLS_PACKAGE = 'grpc.tools' GRPC_PYTHON_PROTO_RESOURCES_NAME = '_proto' -import protoc_lib_deps -import grpc_version +DEFINE_MACROS = (('HAVE_PTHREAD', 1),) +if "win32" in sys.platform and '64bit' in platform.architecture()[0]: + DEFINE_MACROS += (('MS_WIN64', 1),) # By default, Python3 distutils enforces compatibility of # c plugins (.so files) with the OSX version Python3 was built with. @@ -108,9 +113,9 @@ def protoc_ext_module(): protoc_lib_deps.CC_INCLUDE, ], language='c++', - define_macros=[('HAVE_PTHREAD', 1)], - extra_compile_args=EXTRA_COMPILE_ARGS, - extra_link_args=EXTRA_LINK_ARGS, + define_macros=list(DEFINE_MACROS), + extra_compile_args=list(EXTRA_COMPILE_ARGS), + extra_link_args=list(EXTRA_LINK_ARGS), ) return plugin_ext diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh index 687b04e954c..63b15dd09e4 100755 --- a/tools/run_tests/build_python.sh +++ b/tools/run_tests/build_python.sh @@ -40,7 +40,7 @@ VENV_RELATIVE_PYTHON=${3:-bin/python} TOOLCHAIN=${4:-unix} ROOT=`pwd` -export CFLAGS="-I$ROOT/include -std=gnu99 -fno-wrapv" +export CFLAGS="-I$ROOT/include -std=gnu99 -fno-wrapv $CFLAGS" export GRPC_PYTHON_BUILD_WITH_CYTHON=1 # Default python on the host to fall back to when instantiating e.g. the @@ -61,6 +61,19 @@ if [ "${PLATFORM/Darwin}" = "$PLATFORM" ]; then fi fi fi +# TODO(atash) consider conceptualizing MinGW as a first-class platform and move +# these flags into our `setup.py`s +if [ "${PLATFORM/MINGW}" != "$PLATFORM" ]; then + # We're on MinGW, and our CFLAGS and LDFLAGS will be eaten by the void. Use + # our work-around environment variables instead. + PYTHON_MSVCR=`$PYTHON -c "from distutils.cygwinccompiler import get_msvcr; print(get_msvcr()[0])"` + export GRPC_PYTHON_LDFLAGS="-static-libgcc -static-libstdc++ -mcrtdll=$PYTHON_MSVCR -static -lpthread" + # See https://sourceforge.net/p/mingw-w64/bugs/363/ + export GRPC_PYTHON_CFLAGS="-D_ftime=_ftime64 -D_timeb=__timeb64" + # TODO(atash) set these flags for only grpcio-tools (they don't do any harm to + # grpcio, but they result in noisy warnings). + export GRPC_PYTHON_CFLAGS="-frtti -std=c++11 $GRPC_PYTHON_CFLAGS" +fi # Find `realpath` if [ -x "$(command -v realpath)" ]; then From 06c857cb86586755ab5f01f1a8fecc614f23dffa Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Mon, 13 Jun 2016 20:53:02 -0700 Subject: [PATCH 1535/1894] Patch monkeypatch link function to work in Python3 The modified link command was originally taken from a Python 2.x distutils. --- setup.py | 4 ++-- .../grpcio/{build.py => _unixccompiler_patch.py} | 12 ++++++++---- 2 files changed, 10 insertions(+), 6 deletions(-) rename src/python/grpcio/{build.py => _unixccompiler_patch.py} (91%) diff --git a/setup.py b/setup.py index c6d3da72994..700515b894d 100644 --- a/setup.py +++ b/setup.py @@ -57,13 +57,13 @@ os.chdir(os.path.dirname(os.path.abspath(__file__))) sys.path.insert(0, os.path.abspath(PYTHON_STEM)) # Break import-style to ensure we can actually find our in-repo dependencies. -import build +import _unixccompiler_patch import commands import grpc_core_dependencies import grpc_version # TODO(atash) make this conditional on being on a mingw32 build -build.monkeypatch_unix_compiler() +_unixccompiler_patch.monkeypatch_unix_compiler() LICENSE = '3-clause BSD' diff --git a/src/python/grpcio/build.py b/src/python/grpcio/_unixccompiler_patch.py similarity index 91% rename from src/python/grpcio/build.py rename to src/python/grpcio/_unixccompiler_patch.py index df5b54cf69c..9a697989b30 100644 --- a/src/python/grpcio/build.py +++ b/src/python/grpcio/_unixccompiler_patch.py @@ -61,8 +61,9 @@ def _unix_piecemeal_link( if not dir in ('/lib', '/lib64', '/usr/lib', '/usr/lib64')] lib_opts = ccompiler.gen_lib_options(self, library_dirs, runtime_library_dirs, libraries) - if not isinstance(output_dir, basestring) and output_dir is not None: - raise TypeError, "'output_dir' must be a string or None" + if (not (isinstance(output_dir, str) or isinstance(output_dir, bytes)) + and output_dir is not None): + raise TypeError("'output_dir' must be a string or None") if output_dir is not None: output_filename = os.path.join(output_dir, output_filename) @@ -106,11 +107,14 @@ def _unix_piecemeal_link( escaped_ld_args = [arg.replace('\\', '\\\\') for arg in ld_args] command_file.write(' '.join(escaped_ld_args)) self.spawn(linker + ['@{}'.format(command_filename)]) - except errors.DistutilsExecError, msg: - raise ccompiler.LinkError, msg + except errors.DistutilsExecError: + raise ccompiler.LinkError else: log.debug("skipping %s (up-to-date)", output_filename) +# TODO(atash) try replacing this monkeypatch of the compiler harness' link +# operation with a monkeypatch of the distutils `spawn` that applies +# command-argument-file hacks where it can. Might be cleaner. def monkeypatch_unix_compiler(): """Monkeypatching is dumb, but it's either that or we become maintainers of something much, much bigger.""" From 639bb3996fa5b4f9d1785376c19ab69f747e0da8 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Sun, 5 Jun 2016 17:04:44 -0700 Subject: [PATCH 1536/1894] Build Python distributions standalone for Windows --- src/python/grpcio/grpc/_cython/cygrpc.pyx | 7 ---- src/python/grpcio/grpc/_cython/loader.c | 8 +++- tools/run_tests/build_artifact_python.bat | 48 ++++++++--------------- 3 files changed, 23 insertions(+), 40 deletions(-) diff --git a/src/python/grpcio/grpc/_cython/cygrpc.pyx b/src/python/grpcio/grpc/_cython/cygrpc.pyx index 7a8d0dd8a1d..e055d321bc7 100644 --- a/src/python/grpcio/grpc/_cython/cygrpc.pyx +++ b/src/python/grpcio/grpc/_cython/cygrpc.pyx @@ -50,13 +50,6 @@ include "grpc/_cython/_cygrpc/server.pyx.pxi" def _initialize(): - if 'win32' in sys.platform: - filename = pkg_resources.resource_filename( - 'grpc._cython', '_windows/grpc_c.64.python') - if not isinstance(filename, bytes): - filename = filename.encode() - if not pygrpc_load_core(filename): - raise ImportError('failed to load core gRPC library') if not pygrpc_initialize_core(): raise ImportError('failed to initialize core gRPC library') diff --git a/src/python/grpcio/grpc/_cython/loader.c b/src/python/grpcio/grpc/_cython/loader.c index 750a9f6fa38..34bd8975495 100644 --- a/src/python/grpcio/grpc/_cython/loader.c +++ b/src/python/grpcio/grpc/_cython/loader.c @@ -38,10 +38,14 @@ extern "C" { #endif /* __cpluslus */ -/* TODO(atash) remove cruft */ - int pygrpc_load_core(char *path) { return 1; } +// Cython doesn't have Py_AtExit bindings, so we call the C_API directly +int pygrpc_initialize_core(void) { + grpc_init(); + return Py_AtExit(grpc_shutdown) < 0 ? 0 : 1; +} + #ifdef __cplusplus } #endif /* __cpluslus */ diff --git a/tools/run_tests/build_artifact_python.bat b/tools/run_tests/build_artifact_python.bat index 295347e947c..7c8c2aa12d7 100644 --- a/tools/run_tests/build_artifact_python.bat +++ b/tools/run_tests/build_artifact_python.bat @@ -28,33 +28,24 @@ @rem OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -set NUGET=C:\nuget\nuget.exe -%NUGET% restore vsprojects\grpc.sln || goto :error - - -@call vsprojects\build_vs2013.bat vsprojects\grpc.sln /t:grpc_dll /p:Configuration=Release /p:PlatformToolset=v120 /p:Platform=Win32 || goto :error -@call vsprojects\build_vs2013.bat vsprojects\grpc.sln /t:grpc_dll /p:Configuration=Release /p:PlatformToolset=v120 /p:Platform=x64 || goto :error - -mkdir src\python\grpcio\grpc\_cython\_windows - -@rem TODO(atash): maybe we could avoid the grpc_c.(32|64).python shim below if -@rem this used the right python build? -copy /Y vsprojects\Release\grpc_dll.dll src\python\grpcio\grpc\_cython\_windows\grpc_c.32.python || goto :error -copy /Y vsprojects\x64\Release\grpc_dll.dll src\python\grpcio\grpc\_cython\_windows\grpc_c.64.python || goto :error - set PATH=C:\%1;C:\%1\scripts;C:\msys64\mingw%2\bin;%PATH% pip install --upgrade six pip install --upgrade setuptools pip install -rrequirements.txt -set GRPC_PYTHON_USE_CUSTOM_BDIST=0 -set GRPC_PYTHON_BUILD_WITH_CYTHON=1 - @rem Because this is windows and *everything seems to hate Windows* we have to @rem set all of these flags ourselves because Python won't help us (see the @rem setup.py of the grpcio_tools project). set GRPC_PYTHON_CFLAGS=-fno-wrapv -frtti -std=c++11 + +@rem See https://sourceforge.net/p/mingw-w64/bugs/363/ +if %2 == 32 ( + set GRPC_PYTHON_CFLAGS=%GRPC_PYTHON_CFLAGS% -D_ftime=_ftime32 -D_timeb=__timeb32 -D_ftime_s=_ftime32_s +) else ( + set GRPC_PYTHON_CFLAGS=%GRPC_PYTHON_CFLAGS% -D_ftime=_ftime64 -D_timeb=__timeb64 +) + @rem Further confusing things, MSYS2's mingw64 tries to dynamically link @rem libgcc, libstdc++, and winpthreads. We have to override this or our @rem extensions end up linking to MSYS2 DLLs, which the normal Python on @@ -66,23 +57,18 @@ python -c "from distutils.cygwinccompiler import get_msvcr; print(get_msvcr()[0] set /p PYTHON_MSVCR= Date: Tue, 28 Jun 2016 09:09:31 -0700 Subject: [PATCH 1537/1894] Make Python tests run on Windows --- src/python/grpcio_tests/tests/_runner.py | 19 +++--- tools/run_tests/build_python_msys2.sh | 36 ++++++++++++ tools/run_tests/run_tests.py | 74 ++++++++++++++---------- 3 files changed, 93 insertions(+), 36 deletions(-) create mode 100644 tools/run_tests/build_python_msys2.sh diff --git a/src/python/grpcio_tests/tests/_runner.py b/src/python/grpcio_tests/tests/_runner.py index 81c6100feda..926dcbe23a1 100644 --- a/src/python/grpcio_tests/tests/_runner.py +++ b/src/python/grpcio_tests/tests/_runner.py @@ -177,15 +177,20 @@ class Runner(object): stderr_pipe.write_bypass( '\ninterrupted stderr:\n{}\n'.format(stderr_pipe.output().decode())) os._exit(1) - signal.signal(signal.SIGINT, sigint_handler) - signal.signal(signal.SIGSEGV, fault_handler) - signal.signal(signal.SIGBUS, fault_handler) - signal.signal(signal.SIGABRT, fault_handler) - signal.signal(signal.SIGFPE, fault_handler) - signal.signal(signal.SIGILL, fault_handler) + def try_set_handler(name, handler): + try: + signal.signal(getattr(signal, name), handler) + except AttributeError: + pass + try_set_handler('SIGINT', sigint_handler) + try_set_handler('SIGSEGV', fault_handler) + try_set_handler('SIGBUS', fault_handler) + try_set_handler('SIGABRT', fault_handler) + try_set_handler('SIGFPE', fault_handler) + try_set_handler('SIGILL', fault_handler) # Sometimes output will lag after a test has successfully finished; we # ignore such writes to our pipes. - signal.signal(signal.SIGPIPE, signal.SIG_IGN) + try_set_handler('SIGPIPE', signal.SIG_IGN) # Run the tests result.startTestRun() diff --git a/tools/run_tests/build_python_msys2.sh b/tools/run_tests/build_python_msys2.sh new file mode 100644 index 00000000000..6e9d3690180 --- /dev/null +++ b/tools/run_tests/build_python_msys2.sh @@ -0,0 +1,36 @@ +#!/bin/bash +# Copyright 2016, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +set -ex + +BUILD_PYTHON=`realpath "$(dirname $0)/build_python.sh"` +export MSYSTEM=$1 +shift 1 +bash --login $BUILD_PYTHON "$@" diff --git a/tools/run_tests/run_tests.py b/tools/run_tests/run_tests.py index cbe17ee2ad7..3bc83c24799 100755 --- a/tools/run_tests/run_tests.py +++ b/tools/run_tests/run_tests.py @@ -375,19 +375,15 @@ class PhpLanguage(object): class PythonConfig(collections.namedtuple('PythonConfig', [ - 'python', 'venv', 'venv_relative_python', 'toolchain',])): - - @property - def venv_python(self): - return os.path.abspath('{}/{}'.format(self.venv, self.venv_relative_python)) - + 'name', 'build', 'run'])): + """Tuple of commands (named s.t. 'what it says on the tin' applies)""" class PythonLanguage(object): def configure(self, config, args): self.config = config self.args = args - self.pythons = self._get_pythons(self.args.compiler) + self.pythons = self._get_pythons(self.args) def test_specs(self): # load list of known test suites @@ -395,11 +391,11 @@ class PythonLanguage(object): tests_json = json.load(tests_json_file) environment = dict(_FORCE_ENVIRON_FOR_WRAPPERS) return [self.config.job_spec( - ['tools/run_tests/run_python.sh', config.venv_python], + config.run, timeout_seconds=5*60, environ=dict(environment.items() + [('GRPC_PYTHON_TESTRUNNER_FILTER', suite_name)]), - shortname='%s.test.%s' % (config.venv, suite_name),) + shortname='%s.test.%s' % (config.name, suite_name),) for suite_name in tests_json for config in self.pythons] @@ -413,14 +409,7 @@ class PythonLanguage(object): return [] def build_steps(self): - return [ - [ - 'tools/run_tests/build_python.sh', - config.python, config.venv, - config.venv_relative_python, config.toolchain - ] - for config in self.pythons - ] + return [config.build for config in self.pythons] def post_tests_steps(self): return [] @@ -431,23 +420,50 @@ class PythonLanguage(object): def dockerfile_dir(self): return 'tools/dockerfile/test/python_jessie_%s' % _docker_arch_suffix(self.args.arch) - def _get_pythons(self, compiler): + def _get_pythons(self, args): + if args.arch == 'x86': + bits = '32' + else: + bits = '64' if os.name == 'nt': - venv_relative_python = 'Scripts/python.exe' - toolchain = 'mingw32' + shell = ['bash'] + builder = [os.path.abspath('tools/run_tests/build_python_msys2.sh')] + builder_prefix_arguments = ['MINGW{}'.format(bits)] + venv_relative_python = ['Scripts/python.exe'] + toolchain = ['mingw32'] + python_pattern_function = lambda major, minor, bits: ( + '/c/Python{major}{minor}/python.exe'.format(major=major, minor=minor, bits=bits) + if bits == '64' else + '/c/Python{major}{minor}_{bits}bits/python.exe'.format( + major=major, minor=minor, bits=bits)) else: - venv_relative_python = 'bin/python' - toolchain = 'unix' - python27_config = PythonConfig('python2.7', 'py27', venv_relative_python, toolchain) - python34_config = PythonConfig('python3.4', 'py34', venv_relative_python, toolchain) - if compiler == 'default': - return (python27_config, python34_config,) - elif compiler == 'python2.7': + shell = [] + builder = [os.path.abspath('tools/run_tests/build_python.sh')] + builder_prefix_arguments = [] + venv_relative_python = ['bin/python'] + toolchain = ['unix'] + # Bit-ness is handled by the test machine's environment + python_pattern_function = lambda major, minor, bits: 'python{major}.{minor}'.format(major=major, minor=minor) + runner = [os.path.abspath('tools/run_tests/run_python.sh')] + python_config_generator = lambda name, major, minor, bits: PythonConfig( + name, + shell + builder + builder_prefix_arguments + + [python_pattern_function(major=major, minor=minor, bits=bits)] + + [name] + venv_relative_python + toolchain, + shell + runner + [os.path.join(name, venv_relative_python[0])]) + python27_config = python_config_generator(name='py27', major='2', minor='7', bits=bits) + python34_config = python_config_generator(name='py34', major='3', minor='4', bits=bits) + if args.compiler == 'default': + if os.name == 'nt': + return (python27_config,) + else: + return (python27_config, python34_config,) + elif args.compiler == 'python2.7': return (python27_config,) - elif compiler == 'python3.4': + elif args.compiler == 'python3.4': return (python34_config,) else: - raise Exception('Compiler %s not supported.' % compiler) + raise Exception('Compiler %s not supported.' % args.compiler) def __str__(self): return 'python' From 768b1db4df9726bf241690b70cf06e01e7fb126e Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Mon, 6 Jun 2016 16:45:19 -0700 Subject: [PATCH 1538/1894] Sanitize environment variables in run_tests `jobset` --- tools/run_tests/jobset.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/run_tests/jobset.py b/tools/run_tests/jobset.py index 4fe77487f96..3999537c40e 100755 --- a/tools/run_tests/jobset.py +++ b/tools/run_tests/jobset.py @@ -47,6 +47,12 @@ measure_cpu_costs = False _DEFAULT_MAX_JOBS = 16 * multiprocessing.cpu_count() _MAX_RESULT_SIZE = 8192 +def sanitized_environment(env): + sanitized = {} + for key, value in env.items(): + sanitized[str(key).encode()] = str(value).encode() + return sanitized + def platform_string(): if platform.system() == 'Windows': return 'windows' @@ -219,6 +225,7 @@ class Job(object): env = dict(os.environ) env.update(self._spec.environ) env.update(self._add_env) + env = sanitized_environment(env) self._start = time.time() cmdline = self._spec.cmdline if measure_cpu_costs: From fbf15e436ff316c8ec77de7bd37e0e66d53599e9 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Tue, 7 Jun 2016 19:13:11 -0700 Subject: [PATCH 1539/1894] Make build_python.sh script smarter Now reasonable defaults are auto-detected by platform (and by specific Python implementation). --- tools/run_tests/build_python.sh | 100 +++++++++++++++++++++++++------- 1 file changed, 80 insertions(+), 20 deletions(-) diff --git a/tools/run_tests/build_python.sh b/tools/run_tests/build_python.sh index 63b15dd09e4..a3fa8200d5d 100755 --- a/tools/run_tests/build_python.sh +++ b/tools/run_tests/build_python.sh @@ -33,11 +33,80 @@ set -ex # change to grpc repo root cd $(dirname $0)/../.. -# Arguments +########################## +# Portability operations # +########################## + +PLATFORM=`uname -s` + +function is_mingw() { + if [ "${PLATFORM/MINGW}" != "$PLATFORM" ]; then + echo true + else + exit 1 + fi +} + +function is_darwin() { + if [ "${PLATFORM/Darwin}" != "$PLATFORM" ]; then + echo true + else + exit 1 + fi +} + +function is_linux() { + if [ "${PLATFORM/Linux}" != "$PLATFORM" ]; then + echo true + else + exit 1 + fi +} + +# Associated virtual environment name for the given python command. +function venv() { + $1 -c "import sys; print('py{}{}'.format(*sys.version_info[:2]))" +} + +# Path to python executable within a virtual environment depending on the +# system. +function venv_relative_python() { + if [ $(is_mingw) ]; then + echo 'Scripts/python.exe' + else + echo 'bin/python' + fi +} + +# Distutils toolchain to use depending on the system. +function toolchain() { + if [ $(is_mingw) ]; then + echo 'mingw32' + else + echo 'unix' + fi +} + +# Command to invoke the linux command `realpath` or equivalent. +function script_realpath() { + # Find `realpath` + if [ -x "$(command -v realpath)" ]; then + realpath "$@" + elif [ -x "$(command -v grealpath)" ]; then + grealpath "$@" + else + exit 1 + fi +} + +#################### +# Script Arguments # +#################### + PYTHON=${1:-python2.7} -VENV=${2:-py27} -VENV_RELATIVE_PYTHON=${3:-bin/python} -TOOLCHAIN=${4:-unix} +VENV=${2:-$(venv $PYTHON)} +VENV_RELATIVE_PYTHON=${3:-$(venv_relative_python)} +TOOLCHAIN=${4:-$(toolchain)} ROOT=`pwd` export CFLAGS="-I$ROOT/include -std=gnu99 -fno-wrapv $CFLAGS" @@ -47,11 +116,8 @@ export GRPC_PYTHON_BUILD_WITH_CYTHON=1 # virtualenv. HOST_PYTHON=${HOST_PYTHON:-python} -# If ccache is available, use it... unless we're on Mac, then all hell breaks -# loose because Python does hacky things to support other hacky things done to -# hacky things on Mac OS X -PLATFORM=`uname -s` -if [ "${PLATFORM/Darwin}" = "$PLATFORM" ]; then +# If ccache is available on Linux, use it. +if [ $(is_linux) ]; then # We're not on Darwin (Mac OS X) if [ -x "$(command -v ccache)" ]; then if [ -x "$(command -v gcc)" ]; then @@ -63,7 +129,7 @@ if [ "${PLATFORM/Darwin}" = "$PLATFORM" ]; then fi # TODO(atash) consider conceptualizing MinGW as a first-class platform and move # these flags into our `setup.py`s -if [ "${PLATFORM/MINGW}" != "$PLATFORM" ]; then +if [ $(is_mingw) ]; then # We're on MinGW, and our CFLAGS and LDFLAGS will be eaten by the void. Use # our work-around environment variables instead. PYTHON_MSVCR=`$PYTHON -c "from distutils.cygwinccompiler import get_msvcr; print(get_msvcr()[0])"` @@ -75,15 +141,9 @@ if [ "${PLATFORM/MINGW}" != "$PLATFORM" ]; then export GRPC_PYTHON_CFLAGS="-frtti -std=c++11 $GRPC_PYTHON_CFLAGS" fi -# Find `realpath` -if [ -x "$(command -v realpath)" ]; then - export REALPATH=realpath -elif [ -x "$(command -v grealpath)" ]; then - export REALPATH=grealpath -else - echo 'Couldn'"'"'t find `realpath` or `grealpath`' - exit 1 -fi +############################ +# Perform build operations # +############################ # Instnatiate the virtualenv, preferring to do so from the relevant python # version. Even if these commands fail (e.g. on Windows due to name conflicts) @@ -93,7 +153,7 @@ fi ($PYTHON -m virtualenv $VENV || $HOST_PYTHON -m virtualenv -p $PYTHON $VENV || true) -VENV_PYTHON=`$REALPATH -s "$VENV/$VENV_RELATIVE_PYTHON"` +VENV_PYTHON=`script_realpath -s "$VENV/$VENV_RELATIVE_PYTHON"` # pip-installs the directory specified. Used because on MSYS the vanilla Windows # Python gets confused when parsing paths. From 3a9e6d9770c3c8fb86135a6afea4ef3514996a10 Mon Sep 17 00:00:00 2001 From: Masood Malekghassemi Date: Fri, 1 Jul 2016 06:52:13 -0700 Subject: [PATCH 1540/1894] Fix interop tests on Windows --- src/python/grpcio_tests/tests/interop/_insecure_interop_test.py | 2 +- src/python/grpcio_tests/tests/interop/_secure_interop_test.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/python/grpcio_tests/tests/interop/_insecure_interop_test.py b/src/python/grpcio_tests/tests/interop/_insecure_interop_test.py index 91519b6fba2..c753d6faf05 100644 --- a/src/python/grpcio_tests/tests/interop/_insecure_interop_test.py +++ b/src/python/grpcio_tests/tests/interop/_insecure_interop_test.py @@ -48,7 +48,7 @@ class InsecureInteropTest( port = self.server.add_insecure_port('[::]:0') self.server.start() self.stub = test_pb2.beta_create_TestService_stub( - implementations.insecure_channel('[::]', port)) + implementations.insecure_channel('localhost', port)) def tearDown(self): self.server.stop(0) diff --git a/src/python/grpcio_tests/tests/interop/_secure_interop_test.py b/src/python/grpcio_tests/tests/interop/_secure_interop_test.py index c61547b9778..cb09f54a347 100644 --- a/src/python/grpcio_tests/tests/interop/_secure_interop_test.py +++ b/src/python/grpcio_tests/tests/interop/_secure_interop_test.py @@ -55,7 +55,7 @@ class SecureInteropTest( self.server.start() self.stub = test_pb2.beta_create_TestService_stub( test_utilities.not_really_secure_channel( - '[::]', port, implementations.ssl_channel_credentials( + 'localhost', port, implementations.ssl_channel_credentials( resources.test_root_certificates()), _SERVER_HOST_OVERRIDE)) From 86202529a81ce45a1da160ef1dcc58540785d4b2 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Fri, 8 Jul 2016 12:41:12 -0700 Subject: [PATCH 1541/1894] fixed minor indent and resubmit --- src/compiler/objective_c_plugin.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index 3878a332515..5026088db1e 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -88,9 +88,9 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { "#else\n" " #import \"" + header + "\"\n" "#endif\n"; - } else { + } else { proto_imports += ::grpc::string("#import \"") + header + "\"\n"; - } + } } ::grpc::string declarations; From c22e31fb053d7229aed69e43972cf0c94817a841 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 8 Jul 2016 13:22:18 -0700 Subject: [PATCH 1542/1894] Make it more likely to correctly report deadline exceeded --- .../chttp2/transport/chttp2_transport.c | 18 +++-- .../ext/transport/chttp2/transport/internal.h | 2 + .../ext/transport/chttp2/transport/parsing.c | 11 +-- .../chttp2/transport/status_conversion.c | 10 ++- .../chttp2/transport/status_conversion.h | 2 +- .../transport/chttp2/status_conversion_test.c | 68 ++++++++++++++----- 6 files changed, 81 insertions(+), 30 deletions(-) diff --git a/src/core/ext/transport/chttp2/transport/chttp2_transport.c b/src/core/ext/transport/chttp2/transport/chttp2_transport.c index 38e782b9b4f..5aae753c07d 100644 --- a/src/core/ext/transport/chttp2/transport/chttp2_transport.c +++ b/src/core/ext/transport/chttp2/transport/chttp2_transport.c @@ -513,6 +513,7 @@ static int init_stream(grpc_exec_ctx *exec_ctx, grpc_transport *gt, &s->global.received_trailing_metadata); grpc_chttp2_data_parser_init(&s->parsing.data_parser); gpr_slice_buffer_init(&s->writing.flow_controlled_buffer); + s->global.deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); REF_TRANSPORT(t, "stream"); @@ -988,6 +989,11 @@ static void perform_stream_op_locked(grpc_exec_ctx *exec_ctx, const size_t metadata_peer_limit = transport_global->settings[GRPC_PEER_SETTINGS] [GRPC_CHTTP2_SETTINGS_MAX_HEADER_LIST_SIZE]; + if (transport_global->is_client) { + stream_global->deadline = + gpr_time_min(stream_global->deadline, + stream_global->send_initial_metadata->deadline); + } if (metadata_size > metadata_peer_limit) { cancel_from_api( exec_ctx, transport_global, stream_global, @@ -1366,7 +1372,7 @@ static void remove_stream(grpc_exec_ctx *exec_ctx, grpc_chttp2_transport *t, GRPC_ERROR_UNREF(error); } -static void status_codes_from_error(grpc_error *error, +static void status_codes_from_error(grpc_error *error, gpr_timespec deadline, grpc_chttp2_error_code *http2_error, grpc_status_code *grpc_status) { intptr_t ip_http; @@ -1386,8 +1392,8 @@ static void status_codes_from_error(grpc_error *error, if (have_grpc) { *grpc_status = (grpc_status_code)ip_grpc; } else if (have_http) { - *grpc_status = - grpc_chttp2_http2_error_to_grpc_status((grpc_chttp2_error_code)ip_http); + *grpc_status = grpc_chttp2_http2_error_to_grpc_status( + (grpc_chttp2_error_code)ip_http, deadline); } else { *grpc_status = GRPC_STATUS_INTERNAL; } @@ -1400,7 +1406,8 @@ static void cancel_from_api(grpc_exec_ctx *exec_ctx, if (!stream_global->read_closed || !stream_global->write_closed) { grpc_status_code grpc_status; grpc_chttp2_error_code http_error; - status_codes_from_error(due_to_error, &http_error, &grpc_status); + status_codes_from_error(due_to_error, stream_global->deadline, &http_error, + &grpc_status); if (stream_global->id != 0) { gpr_slice_buffer_add( @@ -1536,7 +1543,8 @@ static void close_from_api(grpc_exec_ctx *exec_ctx, uint32_t len = 0; grpc_status_code grpc_status; grpc_chttp2_error_code http_error; - status_codes_from_error(error, &http_error, &grpc_status); + status_codes_from_error(error, stream_global->deadline, &http_error, + &grpc_status); GPR_ASSERT(grpc_status >= 0 && (int)grpc_status < 100); diff --git a/src/core/ext/transport/chttp2/transport/internal.h b/src/core/ext/transport/chttp2/transport/internal.h index b5180c6fc86..8d79e93ceb3 100644 --- a/src/core/ext/transport/chttp2/transport/internal.h +++ b/src/core/ext/transport/chttp2/transport/internal.h @@ -447,6 +447,8 @@ typedef struct { grpc_chttp2_incoming_metadata_buffer received_trailing_metadata; grpc_chttp2_incoming_frame_queue incoming_frames; + + gpr_timespec deadline; } grpc_chttp2_stream_global; typedef struct { diff --git a/src/core/ext/transport/chttp2/transport/parsing.c b/src/core/ext/transport/chttp2/transport/parsing.c index 991d7729af4..c5240ce38a7 100644 --- a/src/core/ext/transport/chttp2/transport/parsing.c +++ b/src/core/ext/transport/chttp2/transport/parsing.c @@ -87,8 +87,8 @@ void grpc_chttp2_prepare_to_read( transport_global->settings[GRPC_SENT_SETTINGS], sizeof(transport_parsing->last_sent_settings)); transport_parsing->max_frame_size = - transport_global->settings[GRPC_ACKED_SETTINGS] - [GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; + transport_global + ->settings[GRPC_ACKED_SETTINGS][GRPC_CHTTP2_SETTINGS_MAX_FRAME_SIZE]; /* update the parsing view of incoming window */ while (grpc_chttp2_list_pop_unannounced_incoming_window_available( @@ -236,9 +236,10 @@ void grpc_chttp2_publish_reads( GRPC_ERROR_INT_HTTP2_ERROR, &reason); if (has_reason && reason != GRPC_CHTTP2_NO_ERROR) { grpc_status_code status_code = - has_reason ? grpc_chttp2_http2_error_to_grpc_status( - (grpc_chttp2_error_code)reason) - : GRPC_STATUS_INTERNAL; + has_reason + ? grpc_chttp2_http2_error_to_grpc_status( + (grpc_chttp2_error_code)reason, stream_global->deadline) + : GRPC_STATUS_INTERNAL; const char *status_details = grpc_error_string(stream_parsing->forced_close_error); gpr_slice slice_details = gpr_slice_from_copied_string(status_details); diff --git a/src/core/ext/transport/chttp2/transport/status_conversion.c b/src/core/ext/transport/chttp2/transport/status_conversion.c index c42fb9b3a1e..5dce2f2d0cc 100644 --- a/src/core/ext/transport/chttp2/transport/status_conversion.c +++ b/src/core/ext/transport/chttp2/transport/status_conversion.c @@ -39,6 +39,8 @@ int grpc_chttp2_grpc_status_to_http2_error(grpc_status_code status) { return GRPC_CHTTP2_NO_ERROR; case GRPC_STATUS_CANCELLED: return GRPC_CHTTP2_CANCEL; + case GRPC_STATUS_DEADLINE_EXCEEDED: + return GRPC_CHTTP2_CANCEL; case GRPC_STATUS_RESOURCE_EXHAUSTED: return GRPC_CHTTP2_ENHANCE_YOUR_CALM; case GRPC_STATUS_PERMISSION_DENIED: @@ -51,13 +53,17 @@ int grpc_chttp2_grpc_status_to_http2_error(grpc_status_code status) { } grpc_status_code grpc_chttp2_http2_error_to_grpc_status( - grpc_chttp2_error_code error) { + grpc_chttp2_error_code error, gpr_timespec deadline) { switch (error) { case GRPC_CHTTP2_NO_ERROR: /* should never be received */ return GRPC_STATUS_INTERNAL; case GRPC_CHTTP2_CANCEL: - return GRPC_STATUS_CANCELLED; + /* http2 cancel translates to STATUS_CANCELLED iff deadline hasn't been + * exceeded */ + return gpr_time_cmp(gpr_now(deadline.clock_type), deadline) >= 0 + ? GRPC_STATUS_DEADLINE_EXCEEDED + : GRPC_STATUS_CANCELLED; case GRPC_CHTTP2_ENHANCE_YOUR_CALM: return GRPC_STATUS_RESOURCE_EXHAUSTED; case GRPC_CHTTP2_INADEQUATE_SECURITY: diff --git a/src/core/ext/transport/chttp2/transport/status_conversion.h b/src/core/ext/transport/chttp2/transport/status_conversion.h index e7285e6fd51..953bc9f1e1f 100644 --- a/src/core/ext/transport/chttp2/transport/status_conversion.h +++ b/src/core/ext/transport/chttp2/transport/status_conversion.h @@ -41,7 +41,7 @@ grpc_chttp2_error_code grpc_chttp2_grpc_status_to_http2_error( grpc_status_code status); grpc_status_code grpc_chttp2_http2_error_to_grpc_status( - grpc_chttp2_error_code error); + grpc_chttp2_error_code error, gpr_timespec deadline); /* Conversion of HTTP status codes (:status) to grpc status codes */ grpc_status_code grpc_chttp2_http2_status_to_grpc_status(int status); diff --git a/test/core/transport/chttp2/status_conversion_test.c b/test/core/transport/chttp2/status_conversion_test.c index e6fc7857281..f5a5cd1395b 100644 --- a/test/core/transport/chttp2/status_conversion_test.c +++ b/test/core/transport/chttp2/status_conversion_test.c @@ -37,8 +37,8 @@ #define GRPC_STATUS_TO_HTTP2_ERROR(a, b) \ GPR_ASSERT(grpc_chttp2_grpc_status_to_http2_error(a) == (b)) -#define HTTP2_ERROR_TO_GRPC_STATUS(a, b) \ - GPR_ASSERT(grpc_chttp2_http2_error_to_grpc_status(a) == (b)) +#define HTTP2_ERROR_TO_GRPC_STATUS(a, deadline, b) \ + GPR_ASSERT(grpc_chttp2_http2_error_to_grpc_status(a, deadline) == (b)) #define GRPC_STATUS_TO_HTTP2_STATUS(a, b) \ GPR_ASSERT(grpc_chttp2_grpc_status_to_http2_status(a) == (b)) #define HTTP2_STATUS_TO_GRPC_STATUS(a, b) \ @@ -54,8 +54,7 @@ int main(int argc, char **argv) { GRPC_STATUS_TO_HTTP2_ERROR(GRPC_STATUS_UNKNOWN, GRPC_CHTTP2_INTERNAL_ERROR); GRPC_STATUS_TO_HTTP2_ERROR(GRPC_STATUS_INVALID_ARGUMENT, GRPC_CHTTP2_INTERNAL_ERROR); - GRPC_STATUS_TO_HTTP2_ERROR(GRPC_STATUS_DEADLINE_EXCEEDED, - GRPC_CHTTP2_INTERNAL_ERROR); + GRPC_STATUS_TO_HTTP2_ERROR(GRPC_STATUS_DEADLINE_EXCEEDED, GRPC_CHTTP2_CANCEL); GRPC_STATUS_TO_HTTP2_ERROR(GRPC_STATUS_NOT_FOUND, GRPC_CHTTP2_INTERNAL_ERROR); GRPC_STATUS_TO_HTTP2_ERROR(GRPC_STATUS_ALREADY_EXISTS, GRPC_CHTTP2_INTERNAL_ERROR); @@ -95,25 +94,60 @@ int main(int argc, char **argv) { GRPC_STATUS_TO_HTTP2_STATUS(GRPC_STATUS_UNAVAILABLE, 200); GRPC_STATUS_TO_HTTP2_STATUS(GRPC_STATUS_DATA_LOSS, 200); - HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_NO_ERROR, GRPC_STATUS_INTERNAL); - HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_PROTOCOL_ERROR, GRPC_STATUS_INTERNAL); - HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_INTERNAL_ERROR, GRPC_STATUS_INTERNAL); - HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_FLOW_CONTROL_ERROR, + const gpr_timespec before_deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_NO_ERROR, before_deadline, + GRPC_STATUS_INTERNAL); + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_PROTOCOL_ERROR, before_deadline, + GRPC_STATUS_INTERNAL); + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_INTERNAL_ERROR, before_deadline, + GRPC_STATUS_INTERNAL); + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_FLOW_CONTROL_ERROR, before_deadline, + GRPC_STATUS_INTERNAL); + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_SETTINGS_TIMEOUT, before_deadline, GRPC_STATUS_INTERNAL); - HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_SETTINGS_TIMEOUT, + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_STREAM_CLOSED, before_deadline, GRPC_STATUS_INTERNAL); - HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_STREAM_CLOSED, GRPC_STATUS_INTERNAL); - HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_FRAME_SIZE_ERROR, + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_FRAME_SIZE_ERROR, before_deadline, GRPC_STATUS_INTERNAL); - HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_REFUSED_STREAM, + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_REFUSED_STREAM, before_deadline, GRPC_STATUS_UNAVAILABLE); - HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_CANCEL, GRPC_STATUS_CANCELLED); - HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_COMPRESSION_ERROR, + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_CANCEL, before_deadline, + GRPC_STATUS_CANCELLED); + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_COMPRESSION_ERROR, before_deadline, + GRPC_STATUS_INTERNAL); + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_CONNECT_ERROR, before_deadline, + GRPC_STATUS_INTERNAL); + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_ENHANCE_YOUR_CALM, before_deadline, + GRPC_STATUS_RESOURCE_EXHAUSTED); + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_INADEQUATE_SECURITY, before_deadline, + GRPC_STATUS_PERMISSION_DENIED); + + const gpr_timespec after_deadline = gpr_inf_past(GPR_CLOCK_MONOTONIC); + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_NO_ERROR, after_deadline, + GRPC_STATUS_INTERNAL); + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_PROTOCOL_ERROR, after_deadline, + GRPC_STATUS_INTERNAL); + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_INTERNAL_ERROR, after_deadline, + GRPC_STATUS_INTERNAL); + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_FLOW_CONTROL_ERROR, after_deadline, + GRPC_STATUS_INTERNAL); + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_SETTINGS_TIMEOUT, after_deadline, + GRPC_STATUS_INTERNAL); + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_STREAM_CLOSED, after_deadline, + GRPC_STATUS_INTERNAL); + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_FRAME_SIZE_ERROR, after_deadline, + GRPC_STATUS_INTERNAL); + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_REFUSED_STREAM, after_deadline, + GRPC_STATUS_UNAVAILABLE); + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_CANCEL, after_deadline, + GRPC_STATUS_DEADLINE_EXCEEDED); + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_COMPRESSION_ERROR, after_deadline, + GRPC_STATUS_INTERNAL); + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_CONNECT_ERROR, after_deadline, GRPC_STATUS_INTERNAL); - HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_CONNECT_ERROR, GRPC_STATUS_INTERNAL); - HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_ENHANCE_YOUR_CALM, + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_ENHANCE_YOUR_CALM, after_deadline, GRPC_STATUS_RESOURCE_EXHAUSTED); - HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_INADEQUATE_SECURITY, + HTTP2_ERROR_TO_GRPC_STATUS(GRPC_CHTTP2_INADEQUATE_SECURITY, after_deadline, GRPC_STATUS_PERMISSION_DENIED); HTTP2_STATUS_TO_GRPC_STATUS(200, GRPC_STATUS_OK); From f0ec5b673cc525502bec1c945d514b7f021d799c Mon Sep 17 00:00:00 2001 From: Yuchen Zeng Date: Fri, 8 Jul 2016 13:40:40 -0700 Subject: [PATCH 1543/1894] Fix mac build --- BUILD | 456 +---------- CMakeLists.txt | 234 +----- Makefile | 296 +------ build.yaml | 4 +- tools/doxygen/Doxyfile.c++ | 10 +- tools/doxygen/Doxyfile.c++.internal | 227 ------ tools/run_tests/sources_and_headers.json | 8 +- vsprojects/grpc.sln | 2 +- vsprojects/vcxproj/grpc++/grpc++.vcxproj | 346 -------- .../vcxproj/grpc++/grpc++.vcxproj.filters | 765 ------------------ .../grpc++_unsecure/grpc++_unsecure.vcxproj | 346 +------- .../grpc++_unsecure.vcxproj.filters | 765 ------------------ 12 files changed, 50 insertions(+), 3409 deletions(-) diff --git a/BUILD b/BUILD index 8c17065927c..33323be229d 100644 --- a/BUILD +++ b/BUILD @@ -1235,109 +1235,6 @@ cc_library( "src/cpp/client/create_channel_internal.h", "src/cpp/server/dynamic_thread_pool.h", "src/cpp/server/thread_pool_interface.h", - "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/compress_filter.h", - "src/core/lib/channel/connected_channel.h", - "src/core/lib/channel/context.h", - "src/core/lib/channel/http_client_filter.h", - "src/core/lib/channel/http_server_filter.h", - "src/core/lib/compression/algorithm_metadata.h", - "src/core/lib/compression/message_compress.h", - "src/core/lib/debug/trace.h", - "src/core/lib/http/format_request.h", - "src/core/lib/http/httpcli.h", - "src/core/lib/http/parser.h", - "src/core/lib/iomgr/closure.h", - "src/core/lib/iomgr/endpoint.h", - "src/core/lib/iomgr/endpoint_pair.h", - "src/core/lib/iomgr/error.h", - "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", - "src/core/lib/iomgr/ev_poll_posix.h", - "src/core/lib/iomgr/ev_posix.h", - "src/core/lib/iomgr/exec_ctx.h", - "src/core/lib/iomgr/executor.h", - "src/core/lib/iomgr/iocp_windows.h", - "src/core/lib/iomgr/iomgr.h", - "src/core/lib/iomgr/iomgr_internal.h", - "src/core/lib/iomgr/iomgr_posix.h", - "src/core/lib/iomgr/load_file.h", - "src/core/lib/iomgr/network_status_tracker.h", - "src/core/lib/iomgr/polling_entity.h", - "src/core/lib/iomgr/pollset.h", - "src/core/lib/iomgr/pollset_set.h", - "src/core/lib/iomgr/pollset_set_windows.h", - "src/core/lib/iomgr/pollset_windows.h", - "src/core/lib/iomgr/resolve_address.h", - "src/core/lib/iomgr/sockaddr.h", - "src/core/lib/iomgr/sockaddr_posix.h", - "src/core/lib/iomgr/sockaddr_utils.h", - "src/core/lib/iomgr/sockaddr_windows.h", - "src/core/lib/iomgr/socket_utils_posix.h", - "src/core/lib/iomgr/socket_windows.h", - "src/core/lib/iomgr/tcp_client.h", - "src/core/lib/iomgr/tcp_posix.h", - "src/core/lib/iomgr/tcp_server.h", - "src/core/lib/iomgr/tcp_windows.h", - "src/core/lib/iomgr/time_averaged_stats.h", - "src/core/lib/iomgr/timer.h", - "src/core/lib/iomgr/timer_heap.h", - "src/core/lib/iomgr/udp_server.h", - "src/core/lib/iomgr/unix_sockets_posix.h", - "src/core/lib/iomgr/wakeup_fd_pipe.h", - "src/core/lib/iomgr/wakeup_fd_posix.h", - "src/core/lib/iomgr/workqueue.h", - "src/core/lib/iomgr/workqueue_posix.h", - "src/core/lib/iomgr/workqueue_windows.h", - "src/core/lib/json/json.h", - "src/core/lib/json/json_common.h", - "src/core/lib/json/json_reader.h", - "src/core/lib/json/json_writer.h", - "src/core/lib/surface/api_trace.h", - "src/core/lib/surface/call.h", - "src/core/lib/surface/call_test_only.h", - "src/core/lib/surface/channel.h", - "src/core/lib/surface/channel_init.h", - "src/core/lib/surface/channel_stack_type.h", - "src/core/lib/surface/completion_queue.h", - "src/core/lib/surface/event_string.h", - "src/core/lib/surface/init.h", - "src/core/lib/surface/lame_client.h", - "src/core/lib/surface/server.h", - "src/core/lib/transport/byte_stream.h", - "src/core/lib/transport/connectivity_state.h", - "src/core/lib/transport/metadata.h", - "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/static_metadata.h", - "src/core/lib/transport/transport.h", - "src/core/lib/transport/transport_impl.h", - "src/core/lib/security/context/security_context.h", - "src/core/lib/security/credentials/composite/composite_credentials.h", - "src/core/lib/security/credentials/credentials.h", - "src/core/lib/security/credentials/fake/fake_credentials.h", - "src/core/lib/security/credentials/google_default/google_default_credentials.h", - "src/core/lib/security/credentials/iam/iam_credentials.h", - "src/core/lib/security/credentials/jwt/json_token.h", - "src/core/lib/security/credentials/jwt/jwt_credentials.h", - "src/core/lib/security/credentials/jwt/jwt_verifier.h", - "src/core/lib/security/credentials/oauth2/oauth2_credentials.h", - "src/core/lib/security/credentials/plugin/plugin_credentials.h", - "src/core/lib/security/credentials/ssl/ssl_credentials.h", - "src/core/lib/security/transport/auth_filters.h", - "src/core/lib/security/transport/handshake.h", - "src/core/lib/security/transport/secure_endpoint.h", - "src/core/lib/security/transport/security_connector.h", - "src/core/lib/security/transport/tsi_error.h", - "src/core/lib/security/util/b64.h", - "src/core/lib/security/util/json_util.h", - "src/core/ext/transport/chttp2/alpn/alpn.h", - "src/core/lib/tsi/fake_transport_security.h", - "src/core/lib/tsi/ssl_transport_security.h", - "src/core/lib/tsi/ssl_types.h", - "src/core/lib/tsi/transport_security.h", - "src/core/lib/tsi/transport_security_interface.h", "src/cpp/client/secure_credentials.cc", "src/cpp/common/auth_property_iterator.cc", "src/cpp/common/secure_auth_context.cc", @@ -1370,122 +1267,6 @@ cc_library( "src/cpp/util/status.cc", "src/cpp/util/string_ref.cc", "src/cpp/util/time.cc", - "src/core/lib/channel/channel_args.c", - "src/core/lib/channel/channel_stack.c", - "src/core/lib/channel/channel_stack_builder.c", - "src/core/lib/channel/compress_filter.c", - "src/core/lib/channel/connected_channel.c", - "src/core/lib/channel/http_client_filter.c", - "src/core/lib/channel/http_server_filter.c", - "src/core/lib/compression/compression.c", - "src/core/lib/compression/message_compress.c", - "src/core/lib/debug/trace.c", - "src/core/lib/http/format_request.c", - "src/core/lib/http/httpcli.c", - "src/core/lib/http/parser.c", - "src/core/lib/iomgr/closure.c", - "src/core/lib/iomgr/endpoint.c", - "src/core/lib/iomgr/endpoint_pair_posix.c", - "src/core/lib/iomgr/endpoint_pair_windows.c", - "src/core/lib/iomgr/error.c", - "src/core/lib/iomgr/ev_epoll_linux.c", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", - "src/core/lib/iomgr/ev_poll_posix.c", - "src/core/lib/iomgr/ev_posix.c", - "src/core/lib/iomgr/exec_ctx.c", - "src/core/lib/iomgr/executor.c", - "src/core/lib/iomgr/iocp_windows.c", - "src/core/lib/iomgr/iomgr.c", - "src/core/lib/iomgr/iomgr_posix.c", - "src/core/lib/iomgr/iomgr_windows.c", - "src/core/lib/iomgr/load_file.c", - "src/core/lib/iomgr/network_status_tracker.c", - "src/core/lib/iomgr/polling_entity.c", - "src/core/lib/iomgr/pollset_set_windows.c", - "src/core/lib/iomgr/pollset_windows.c", - "src/core/lib/iomgr/resolve_address_posix.c", - "src/core/lib/iomgr/resolve_address_windows.c", - "src/core/lib/iomgr/sockaddr_utils.c", - "src/core/lib/iomgr/socket_utils_common_posix.c", - "src/core/lib/iomgr/socket_utils_linux.c", - "src/core/lib/iomgr/socket_utils_posix.c", - "src/core/lib/iomgr/socket_windows.c", - "src/core/lib/iomgr/tcp_client_posix.c", - "src/core/lib/iomgr/tcp_client_windows.c", - "src/core/lib/iomgr/tcp_posix.c", - "src/core/lib/iomgr/tcp_server_posix.c", - "src/core/lib/iomgr/tcp_server_windows.c", - "src/core/lib/iomgr/tcp_windows.c", - "src/core/lib/iomgr/time_averaged_stats.c", - "src/core/lib/iomgr/timer.c", - "src/core/lib/iomgr/timer_heap.c", - "src/core/lib/iomgr/udp_server.c", - "src/core/lib/iomgr/unix_sockets_posix.c", - "src/core/lib/iomgr/unix_sockets_posix_noop.c", - "src/core/lib/iomgr/wakeup_fd_eventfd.c", - "src/core/lib/iomgr/wakeup_fd_nospecial.c", - "src/core/lib/iomgr/wakeup_fd_pipe.c", - "src/core/lib/iomgr/wakeup_fd_posix.c", - "src/core/lib/iomgr/workqueue_posix.c", - "src/core/lib/iomgr/workqueue_windows.c", - "src/core/lib/json/json.c", - "src/core/lib/json/json_reader.c", - "src/core/lib/json/json_string.c", - "src/core/lib/json/json_writer.c", - "src/core/lib/surface/alarm.c", - "src/core/lib/surface/api_trace.c", - "src/core/lib/surface/byte_buffer.c", - "src/core/lib/surface/byte_buffer_reader.c", - "src/core/lib/surface/call.c", - "src/core/lib/surface/call_details.c", - "src/core/lib/surface/call_log_batch.c", - "src/core/lib/surface/channel.c", - "src/core/lib/surface/channel_init.c", - "src/core/lib/surface/channel_ping.c", - "src/core/lib/surface/channel_stack_type.c", - "src/core/lib/surface/completion_queue.c", - "src/core/lib/surface/event_string.c", - "src/core/lib/surface/lame_client.c", - "src/core/lib/surface/metadata_array.c", - "src/core/lib/surface/server.c", - "src/core/lib/surface/validate_metadata.c", - "src/core/lib/surface/version.c", - "src/core/lib/transport/byte_stream.c", - "src/core/lib/transport/connectivity_state.c", - "src/core/lib/transport/metadata.c", - "src/core/lib/transport/metadata_batch.c", - "src/core/lib/transport/static_metadata.c", - "src/core/lib/transport/transport.c", - "src/core/lib/transport/transport_op_string.c", - "src/core/lib/http/httpcli_security_connector.c", - "src/core/lib/security/context/security_context.c", - "src/core/lib/security/credentials/composite/composite_credentials.c", - "src/core/lib/security/credentials/credentials.c", - "src/core/lib/security/credentials/credentials_metadata.c", - "src/core/lib/security/credentials/fake/fake_credentials.c", - "src/core/lib/security/credentials/google_default/credentials_posix.c", - "src/core/lib/security/credentials/google_default/credentials_windows.c", - "src/core/lib/security/credentials/google_default/google_default_credentials.c", - "src/core/lib/security/credentials/iam/iam_credentials.c", - "src/core/lib/security/credentials/jwt/json_token.c", - "src/core/lib/security/credentials/jwt/jwt_credentials.c", - "src/core/lib/security/credentials/jwt/jwt_verifier.c", - "src/core/lib/security/credentials/oauth2/oauth2_credentials.c", - "src/core/lib/security/credentials/plugin/plugin_credentials.c", - "src/core/lib/security/credentials/ssl/ssl_credentials.c", - "src/core/lib/security/transport/client_auth_filter.c", - "src/core/lib/security/transport/handshake.c", - "src/core/lib/security/transport/secure_endpoint.c", - "src/core/lib/security/transport/security_connector.c", - "src/core/lib/security/transport/server_auth_filter.c", - "src/core/lib/security/transport/tsi_error.c", - "src/core/lib/security/util/b64.c", - "src/core/lib/security/util/json_util.c", - "src/core/lib/surface/init_secure.c", - "src/core/ext/transport/chttp2/alpn/alpn.c", - "src/core/lib/tsi/fake_transport_security.c", - "src/core/lib/tsi/ssl_transport_security.c", - "src/core/lib/tsi/transport_security.c", "src/cpp/codegen/codegen_init.cc", ], hdrs = [ @@ -1587,14 +1368,6 @@ cc_library( "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_windows.h", "include/grpc/impl/codegen/time.h", - "include/grpc/byte_buffer.h", - "include/grpc/byte_buffer_reader.h", - "include/grpc/compression.h", - "include/grpc/grpc.h", - "include/grpc/grpc_posix.h", - "include/grpc/status.h", - "include/grpc/grpc_security.h", - "include/grpc/grpc_security_constants.h", ], includes = [ "include", @@ -1604,7 +1377,6 @@ cc_library( "//external:libssl", "//external:protobuf_clib", ":grpc", - ":gpr", ], ) @@ -1694,109 +1466,6 @@ cc_library( "src/cpp/client/create_channel_internal.h", "src/cpp/server/dynamic_thread_pool.h", "src/cpp/server/thread_pool_interface.h", - "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/compress_filter.h", - "src/core/lib/channel/connected_channel.h", - "src/core/lib/channel/context.h", - "src/core/lib/channel/http_client_filter.h", - "src/core/lib/channel/http_server_filter.h", - "src/core/lib/compression/algorithm_metadata.h", - "src/core/lib/compression/message_compress.h", - "src/core/lib/debug/trace.h", - "src/core/lib/http/format_request.h", - "src/core/lib/http/httpcli.h", - "src/core/lib/http/parser.h", - "src/core/lib/iomgr/closure.h", - "src/core/lib/iomgr/endpoint.h", - "src/core/lib/iomgr/endpoint_pair.h", - "src/core/lib/iomgr/error.h", - "src/core/lib/iomgr/ev_epoll_linux.h", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.h", - "src/core/lib/iomgr/ev_poll_posix.h", - "src/core/lib/iomgr/ev_posix.h", - "src/core/lib/iomgr/exec_ctx.h", - "src/core/lib/iomgr/executor.h", - "src/core/lib/iomgr/iocp_windows.h", - "src/core/lib/iomgr/iomgr.h", - "src/core/lib/iomgr/iomgr_internal.h", - "src/core/lib/iomgr/iomgr_posix.h", - "src/core/lib/iomgr/load_file.h", - "src/core/lib/iomgr/network_status_tracker.h", - "src/core/lib/iomgr/polling_entity.h", - "src/core/lib/iomgr/pollset.h", - "src/core/lib/iomgr/pollset_set.h", - "src/core/lib/iomgr/pollset_set_windows.h", - "src/core/lib/iomgr/pollset_windows.h", - "src/core/lib/iomgr/resolve_address.h", - "src/core/lib/iomgr/sockaddr.h", - "src/core/lib/iomgr/sockaddr_posix.h", - "src/core/lib/iomgr/sockaddr_utils.h", - "src/core/lib/iomgr/sockaddr_windows.h", - "src/core/lib/iomgr/socket_utils_posix.h", - "src/core/lib/iomgr/socket_windows.h", - "src/core/lib/iomgr/tcp_client.h", - "src/core/lib/iomgr/tcp_posix.h", - "src/core/lib/iomgr/tcp_server.h", - "src/core/lib/iomgr/tcp_windows.h", - "src/core/lib/iomgr/time_averaged_stats.h", - "src/core/lib/iomgr/timer.h", - "src/core/lib/iomgr/timer_heap.h", - "src/core/lib/iomgr/udp_server.h", - "src/core/lib/iomgr/unix_sockets_posix.h", - "src/core/lib/iomgr/wakeup_fd_pipe.h", - "src/core/lib/iomgr/wakeup_fd_posix.h", - "src/core/lib/iomgr/workqueue.h", - "src/core/lib/iomgr/workqueue_posix.h", - "src/core/lib/iomgr/workqueue_windows.h", - "src/core/lib/json/json.h", - "src/core/lib/json/json_common.h", - "src/core/lib/json/json_reader.h", - "src/core/lib/json/json_writer.h", - "src/core/lib/surface/api_trace.h", - "src/core/lib/surface/call.h", - "src/core/lib/surface/call_test_only.h", - "src/core/lib/surface/channel.h", - "src/core/lib/surface/channel_init.h", - "src/core/lib/surface/channel_stack_type.h", - "src/core/lib/surface/completion_queue.h", - "src/core/lib/surface/event_string.h", - "src/core/lib/surface/init.h", - "src/core/lib/surface/lame_client.h", - "src/core/lib/surface/server.h", - "src/core/lib/transport/byte_stream.h", - "src/core/lib/transport/connectivity_state.h", - "src/core/lib/transport/metadata.h", - "src/core/lib/transport/metadata_batch.h", - "src/core/lib/transport/static_metadata.h", - "src/core/lib/transport/transport.h", - "src/core/lib/transport/transport_impl.h", - "src/core/lib/security/context/security_context.h", - "src/core/lib/security/credentials/composite/composite_credentials.h", - "src/core/lib/security/credentials/credentials.h", - "src/core/lib/security/credentials/fake/fake_credentials.h", - "src/core/lib/security/credentials/google_default/google_default_credentials.h", - "src/core/lib/security/credentials/iam/iam_credentials.h", - "src/core/lib/security/credentials/jwt/json_token.h", - "src/core/lib/security/credentials/jwt/jwt_credentials.h", - "src/core/lib/security/credentials/jwt/jwt_verifier.h", - "src/core/lib/security/credentials/oauth2/oauth2_credentials.h", - "src/core/lib/security/credentials/plugin/plugin_credentials.h", - "src/core/lib/security/credentials/ssl/ssl_credentials.h", - "src/core/lib/security/transport/auth_filters.h", - "src/core/lib/security/transport/handshake.h", - "src/core/lib/security/transport/secure_endpoint.h", - "src/core/lib/security/transport/security_connector.h", - "src/core/lib/security/transport/tsi_error.h", - "src/core/lib/security/util/b64.h", - "src/core/lib/security/util/json_util.h", - "src/core/ext/transport/chttp2/alpn/alpn.h", - "src/core/lib/tsi/fake_transport_security.h", - "src/core/lib/tsi/ssl_transport_security.h", - "src/core/lib/tsi/ssl_types.h", - "src/core/lib/tsi/transport_security.h", - "src/core/lib/tsi/transport_security_interface.h", "src/cpp/common/insecure_create_auth_context.cc", "src/cpp/client/channel.cc", "src/cpp/client/client_context.cc", @@ -1824,122 +1493,6 @@ cc_library( "src/cpp/util/status.cc", "src/cpp/util/string_ref.cc", "src/cpp/util/time.cc", - "src/core/lib/channel/channel_args.c", - "src/core/lib/channel/channel_stack.c", - "src/core/lib/channel/channel_stack_builder.c", - "src/core/lib/channel/compress_filter.c", - "src/core/lib/channel/connected_channel.c", - "src/core/lib/channel/http_client_filter.c", - "src/core/lib/channel/http_server_filter.c", - "src/core/lib/compression/compression.c", - "src/core/lib/compression/message_compress.c", - "src/core/lib/debug/trace.c", - "src/core/lib/http/format_request.c", - "src/core/lib/http/httpcli.c", - "src/core/lib/http/parser.c", - "src/core/lib/iomgr/closure.c", - "src/core/lib/iomgr/endpoint.c", - "src/core/lib/iomgr/endpoint_pair_posix.c", - "src/core/lib/iomgr/endpoint_pair_windows.c", - "src/core/lib/iomgr/error.c", - "src/core/lib/iomgr/ev_epoll_linux.c", - "src/core/lib/iomgr/ev_poll_and_epoll_posix.c", - "src/core/lib/iomgr/ev_poll_posix.c", - "src/core/lib/iomgr/ev_posix.c", - "src/core/lib/iomgr/exec_ctx.c", - "src/core/lib/iomgr/executor.c", - "src/core/lib/iomgr/iocp_windows.c", - "src/core/lib/iomgr/iomgr.c", - "src/core/lib/iomgr/iomgr_posix.c", - "src/core/lib/iomgr/iomgr_windows.c", - "src/core/lib/iomgr/load_file.c", - "src/core/lib/iomgr/network_status_tracker.c", - "src/core/lib/iomgr/polling_entity.c", - "src/core/lib/iomgr/pollset_set_windows.c", - "src/core/lib/iomgr/pollset_windows.c", - "src/core/lib/iomgr/resolve_address_posix.c", - "src/core/lib/iomgr/resolve_address_windows.c", - "src/core/lib/iomgr/sockaddr_utils.c", - "src/core/lib/iomgr/socket_utils_common_posix.c", - "src/core/lib/iomgr/socket_utils_linux.c", - "src/core/lib/iomgr/socket_utils_posix.c", - "src/core/lib/iomgr/socket_windows.c", - "src/core/lib/iomgr/tcp_client_posix.c", - "src/core/lib/iomgr/tcp_client_windows.c", - "src/core/lib/iomgr/tcp_posix.c", - "src/core/lib/iomgr/tcp_server_posix.c", - "src/core/lib/iomgr/tcp_server_windows.c", - "src/core/lib/iomgr/tcp_windows.c", - "src/core/lib/iomgr/time_averaged_stats.c", - "src/core/lib/iomgr/timer.c", - "src/core/lib/iomgr/timer_heap.c", - "src/core/lib/iomgr/udp_server.c", - "src/core/lib/iomgr/unix_sockets_posix.c", - "src/core/lib/iomgr/unix_sockets_posix_noop.c", - "src/core/lib/iomgr/wakeup_fd_eventfd.c", - "src/core/lib/iomgr/wakeup_fd_nospecial.c", - "src/core/lib/iomgr/wakeup_fd_pipe.c", - "src/core/lib/iomgr/wakeup_fd_posix.c", - "src/core/lib/iomgr/workqueue_posix.c", - "src/core/lib/iomgr/workqueue_windows.c", - "src/core/lib/json/json.c", - "src/core/lib/json/json_reader.c", - "src/core/lib/json/json_string.c", - "src/core/lib/json/json_writer.c", - "src/core/lib/surface/alarm.c", - "src/core/lib/surface/api_trace.c", - "src/core/lib/surface/byte_buffer.c", - "src/core/lib/surface/byte_buffer_reader.c", - "src/core/lib/surface/call.c", - "src/core/lib/surface/call_details.c", - "src/core/lib/surface/call_log_batch.c", - "src/core/lib/surface/channel.c", - "src/core/lib/surface/channel_init.c", - "src/core/lib/surface/channel_ping.c", - "src/core/lib/surface/channel_stack_type.c", - "src/core/lib/surface/completion_queue.c", - "src/core/lib/surface/event_string.c", - "src/core/lib/surface/lame_client.c", - "src/core/lib/surface/metadata_array.c", - "src/core/lib/surface/server.c", - "src/core/lib/surface/validate_metadata.c", - "src/core/lib/surface/version.c", - "src/core/lib/transport/byte_stream.c", - "src/core/lib/transport/connectivity_state.c", - "src/core/lib/transport/metadata.c", - "src/core/lib/transport/metadata_batch.c", - "src/core/lib/transport/static_metadata.c", - "src/core/lib/transport/transport.c", - "src/core/lib/transport/transport_op_string.c", - "src/core/lib/http/httpcli_security_connector.c", - "src/core/lib/security/context/security_context.c", - "src/core/lib/security/credentials/composite/composite_credentials.c", - "src/core/lib/security/credentials/credentials.c", - "src/core/lib/security/credentials/credentials_metadata.c", - "src/core/lib/security/credentials/fake/fake_credentials.c", - "src/core/lib/security/credentials/google_default/credentials_posix.c", - "src/core/lib/security/credentials/google_default/credentials_windows.c", - "src/core/lib/security/credentials/google_default/google_default_credentials.c", - "src/core/lib/security/credentials/iam/iam_credentials.c", - "src/core/lib/security/credentials/jwt/json_token.c", - "src/core/lib/security/credentials/jwt/jwt_credentials.c", - "src/core/lib/security/credentials/jwt/jwt_verifier.c", - "src/core/lib/security/credentials/oauth2/oauth2_credentials.c", - "src/core/lib/security/credentials/plugin/plugin_credentials.c", - "src/core/lib/security/credentials/ssl/ssl_credentials.c", - "src/core/lib/security/transport/client_auth_filter.c", - "src/core/lib/security/transport/handshake.c", - "src/core/lib/security/transport/secure_endpoint.c", - "src/core/lib/security/transport/security_connector.c", - "src/core/lib/security/transport/server_auth_filter.c", - "src/core/lib/security/transport/tsi_error.c", - "src/core/lib/security/util/b64.c", - "src/core/lib/security/util/json_util.c", - "src/core/lib/surface/init_secure.c", - "src/core/ext/transport/chttp2/alpn/alpn.c", - "src/core/lib/tsi/fake_transport_security.c", - "src/core/lib/tsi/ssl_transport_security.c", - "src/core/lib/tsi/transport_security.c", "src/cpp/codegen/codegen_init.cc", ], hdrs = [ @@ -2041,14 +1594,6 @@ cc_library( "include/grpc/impl/codegen/sync_posix.h", "include/grpc/impl/codegen/sync_windows.h", "include/grpc/impl/codegen/time.h", - "include/grpc/byte_buffer.h", - "include/grpc/byte_buffer_reader.h", - "include/grpc/compression.h", - "include/grpc/grpc.h", - "include/grpc/grpc_posix.h", - "include/grpc/status.h", - "include/grpc/grpc_security.h", - "include/grpc/grpc_security_constants.h", ], includes = [ "include", @@ -2058,6 +1603,7 @@ cc_library( "//external:protobuf_clib", ":gpr", ":grpc_unsecure", + ":grpc", ], ) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3dcd1eb23d1..9910bd330cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -718,122 +718,6 @@ add_library(grpc++ src/cpp/util/status.cc src/cpp/util/string_ref.cc src/cpp/util/time.cc - src/core/lib/channel/channel_args.c - src/core/lib/channel/channel_stack.c - src/core/lib/channel/channel_stack_builder.c - src/core/lib/channel/compress_filter.c - src/core/lib/channel/connected_channel.c - src/core/lib/channel/http_client_filter.c - src/core/lib/channel/http_server_filter.c - src/core/lib/compression/compression.c - src/core/lib/compression/message_compress.c - src/core/lib/debug/trace.c - src/core/lib/http/format_request.c - src/core/lib/http/httpcli.c - src/core/lib/http/parser.c - src/core/lib/iomgr/closure.c - src/core/lib/iomgr/endpoint.c - src/core/lib/iomgr/endpoint_pair_posix.c - src/core/lib/iomgr/endpoint_pair_windows.c - src/core/lib/iomgr/error.c - src/core/lib/iomgr/ev_epoll_linux.c - src/core/lib/iomgr/ev_poll_and_epoll_posix.c - src/core/lib/iomgr/ev_poll_posix.c - src/core/lib/iomgr/ev_posix.c - src/core/lib/iomgr/exec_ctx.c - src/core/lib/iomgr/executor.c - src/core/lib/iomgr/iocp_windows.c - src/core/lib/iomgr/iomgr.c - src/core/lib/iomgr/iomgr_posix.c - src/core/lib/iomgr/iomgr_windows.c - src/core/lib/iomgr/load_file.c - src/core/lib/iomgr/network_status_tracker.c - src/core/lib/iomgr/polling_entity.c - src/core/lib/iomgr/pollset_set_windows.c - src/core/lib/iomgr/pollset_windows.c - src/core/lib/iomgr/resolve_address_posix.c - src/core/lib/iomgr/resolve_address_windows.c - src/core/lib/iomgr/sockaddr_utils.c - src/core/lib/iomgr/socket_utils_common_posix.c - src/core/lib/iomgr/socket_utils_linux.c - src/core/lib/iomgr/socket_utils_posix.c - src/core/lib/iomgr/socket_windows.c - src/core/lib/iomgr/tcp_client_posix.c - src/core/lib/iomgr/tcp_client_windows.c - src/core/lib/iomgr/tcp_posix.c - src/core/lib/iomgr/tcp_server_posix.c - src/core/lib/iomgr/tcp_server_windows.c - src/core/lib/iomgr/tcp_windows.c - src/core/lib/iomgr/time_averaged_stats.c - src/core/lib/iomgr/timer.c - src/core/lib/iomgr/timer_heap.c - src/core/lib/iomgr/udp_server.c - src/core/lib/iomgr/unix_sockets_posix.c - src/core/lib/iomgr/unix_sockets_posix_noop.c - src/core/lib/iomgr/wakeup_fd_eventfd.c - src/core/lib/iomgr/wakeup_fd_nospecial.c - src/core/lib/iomgr/wakeup_fd_pipe.c - src/core/lib/iomgr/wakeup_fd_posix.c - src/core/lib/iomgr/workqueue_posix.c - src/core/lib/iomgr/workqueue_windows.c - src/core/lib/json/json.c - src/core/lib/json/json_reader.c - src/core/lib/json/json_string.c - src/core/lib/json/json_writer.c - src/core/lib/surface/alarm.c - src/core/lib/surface/api_trace.c - src/core/lib/surface/byte_buffer.c - src/core/lib/surface/byte_buffer_reader.c - src/core/lib/surface/call.c - src/core/lib/surface/call_details.c - src/core/lib/surface/call_log_batch.c - src/core/lib/surface/channel.c - src/core/lib/surface/channel_init.c - src/core/lib/surface/channel_ping.c - src/core/lib/surface/channel_stack_type.c - src/core/lib/surface/completion_queue.c - src/core/lib/surface/event_string.c - src/core/lib/surface/lame_client.c - src/core/lib/surface/metadata_array.c - src/core/lib/surface/server.c - src/core/lib/surface/validate_metadata.c - src/core/lib/surface/version.c - src/core/lib/transport/byte_stream.c - src/core/lib/transport/connectivity_state.c - src/core/lib/transport/metadata.c - src/core/lib/transport/metadata_batch.c - src/core/lib/transport/static_metadata.c - src/core/lib/transport/transport.c - src/core/lib/transport/transport_op_string.c - src/core/lib/http/httpcli_security_connector.c - src/core/lib/security/context/security_context.c - src/core/lib/security/credentials/composite/composite_credentials.c - src/core/lib/security/credentials/credentials.c - src/core/lib/security/credentials/credentials_metadata.c - src/core/lib/security/credentials/fake/fake_credentials.c - src/core/lib/security/credentials/google_default/credentials_posix.c - src/core/lib/security/credentials/google_default/credentials_windows.c - src/core/lib/security/credentials/google_default/google_default_credentials.c - src/core/lib/security/credentials/iam/iam_credentials.c - src/core/lib/security/credentials/jwt/json_token.c - src/core/lib/security/credentials/jwt/jwt_credentials.c - src/core/lib/security/credentials/jwt/jwt_verifier.c - src/core/lib/security/credentials/oauth2/oauth2_credentials.c - src/core/lib/security/credentials/plugin/plugin_credentials.c - src/core/lib/security/credentials/ssl/ssl_credentials.c - src/core/lib/security/transport/client_auth_filter.c - src/core/lib/security/transport/handshake.c - src/core/lib/security/transport/secure_endpoint.c - src/core/lib/security/transport/security_connector.c - src/core/lib/security/transport/server_auth_filter.c - src/core/lib/security/transport/tsi_error.c - src/core/lib/security/util/b64.c - src/core/lib/security/util/json_util.c - src/core/lib/surface/init_secure.c - src/core/ext/transport/chttp2/alpn/alpn.c - src/core/lib/tsi/fake_transport_security.c - src/core/lib/tsi/ssl_transport_security.c - src/core/lib/tsi/transport_security.c src/cpp/codegen/codegen_init.cc ) @@ -850,7 +734,6 @@ target_link_libraries(grpc++ ssl libprotobuf grpc - gpr ) @@ -903,122 +786,6 @@ add_library(grpc++_unsecure src/cpp/util/status.cc src/cpp/util/string_ref.cc src/cpp/util/time.cc - src/core/lib/channel/channel_args.c - src/core/lib/channel/channel_stack.c - src/core/lib/channel/channel_stack_builder.c - src/core/lib/channel/compress_filter.c - src/core/lib/channel/connected_channel.c - src/core/lib/channel/http_client_filter.c - src/core/lib/channel/http_server_filter.c - src/core/lib/compression/compression.c - src/core/lib/compression/message_compress.c - src/core/lib/debug/trace.c - src/core/lib/http/format_request.c - src/core/lib/http/httpcli.c - src/core/lib/http/parser.c - src/core/lib/iomgr/closure.c - src/core/lib/iomgr/endpoint.c - src/core/lib/iomgr/endpoint_pair_posix.c - src/core/lib/iomgr/endpoint_pair_windows.c - src/core/lib/iomgr/error.c - src/core/lib/iomgr/ev_epoll_linux.c - src/core/lib/iomgr/ev_poll_and_epoll_posix.c - src/core/lib/iomgr/ev_poll_posix.c - src/core/lib/iomgr/ev_posix.c - src/core/lib/iomgr/exec_ctx.c - src/core/lib/iomgr/executor.c - src/core/lib/iomgr/iocp_windows.c - src/core/lib/iomgr/iomgr.c - src/core/lib/iomgr/iomgr_posix.c - src/core/lib/iomgr/iomgr_windows.c - src/core/lib/iomgr/load_file.c - src/core/lib/iomgr/network_status_tracker.c - src/core/lib/iomgr/polling_entity.c - src/core/lib/iomgr/pollset_set_windows.c - src/core/lib/iomgr/pollset_windows.c - src/core/lib/iomgr/resolve_address_posix.c - src/core/lib/iomgr/resolve_address_windows.c - src/core/lib/iomgr/sockaddr_utils.c - src/core/lib/iomgr/socket_utils_common_posix.c - src/core/lib/iomgr/socket_utils_linux.c - src/core/lib/iomgr/socket_utils_posix.c - src/core/lib/iomgr/socket_windows.c - src/core/lib/iomgr/tcp_client_posix.c - src/core/lib/iomgr/tcp_client_windows.c - src/core/lib/iomgr/tcp_posix.c - src/core/lib/iomgr/tcp_server_posix.c - src/core/lib/iomgr/tcp_server_windows.c - src/core/lib/iomgr/tcp_windows.c - src/core/lib/iomgr/time_averaged_stats.c - src/core/lib/iomgr/timer.c - src/core/lib/iomgr/timer_heap.c - src/core/lib/iomgr/udp_server.c - src/core/lib/iomgr/unix_sockets_posix.c - src/core/lib/iomgr/unix_sockets_posix_noop.c - src/core/lib/iomgr/wakeup_fd_eventfd.c - src/core/lib/iomgr/wakeup_fd_nospecial.c - src/core/lib/iomgr/wakeup_fd_pipe.c - src/core/lib/iomgr/wakeup_fd_posix.c - src/core/lib/iomgr/workqueue_posix.c - src/core/lib/iomgr/workqueue_windows.c - src/core/lib/json/json.c - src/core/lib/json/json_reader.c - src/core/lib/json/json_string.c - src/core/lib/json/json_writer.c - src/core/lib/surface/alarm.c - src/core/lib/surface/api_trace.c - src/core/lib/surface/byte_buffer.c - src/core/lib/surface/byte_buffer_reader.c - src/core/lib/surface/call.c - src/core/lib/surface/call_details.c - src/core/lib/surface/call_log_batch.c - src/core/lib/surface/channel.c - src/core/lib/surface/channel_init.c - src/core/lib/surface/channel_ping.c - src/core/lib/surface/channel_stack_type.c - src/core/lib/surface/completion_queue.c - src/core/lib/surface/event_string.c - src/core/lib/surface/lame_client.c - src/core/lib/surface/metadata_array.c - src/core/lib/surface/server.c - src/core/lib/surface/validate_metadata.c - src/core/lib/surface/version.c - src/core/lib/transport/byte_stream.c - src/core/lib/transport/connectivity_state.c - src/core/lib/transport/metadata.c - src/core/lib/transport/metadata_batch.c - src/core/lib/transport/static_metadata.c - src/core/lib/transport/transport.c - src/core/lib/transport/transport_op_string.c - src/core/lib/http/httpcli_security_connector.c - src/core/lib/security/context/security_context.c - src/core/lib/security/credentials/composite/composite_credentials.c - src/core/lib/security/credentials/credentials.c - src/core/lib/security/credentials/credentials_metadata.c - src/core/lib/security/credentials/fake/fake_credentials.c - src/core/lib/security/credentials/google_default/credentials_posix.c - src/core/lib/security/credentials/google_default/credentials_windows.c - src/core/lib/security/credentials/google_default/google_default_credentials.c - src/core/lib/security/credentials/iam/iam_credentials.c - src/core/lib/security/credentials/jwt/json_token.c - src/core/lib/security/credentials/jwt/jwt_credentials.c - src/core/lib/security/credentials/jwt/jwt_verifier.c - src/core/lib/security/credentials/oauth2/oauth2_credentials.c - src/core/lib/security/credentials/plugin/plugin_credentials.c - src/core/lib/security/credentials/ssl/ssl_credentials.c - src/core/lib/security/transport/client_auth_filter.c - src/core/lib/security/transport/handshake.c - src/core/lib/security/transport/secure_endpoint.c - src/core/lib/security/transport/security_connector.c - src/core/lib/security/transport/server_auth_filter.c - src/core/lib/security/transport/tsi_error.c - src/core/lib/security/util/b64.c - src/core/lib/security/util/json_util.c - src/core/lib/surface/init_secure.c - src/core/ext/transport/chttp2/alpn/alpn.c - src/core/lib/tsi/fake_transport_security.c - src/core/lib/tsi/ssl_transport_security.c - src/core/lib/tsi/transport_security.c src/cpp/codegen/codegen_init.cc ) @@ -1035,6 +802,7 @@ target_link_libraries(grpc++_unsecure libprotobuf gpr grpc_unsecure + grpc ) diff --git a/Makefile b/Makefile index 51f5c5e44c3..db479c95849 100644 --- a/Makefile +++ b/Makefile @@ -3421,122 +3421,6 @@ LIBGRPC++_SRC = \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ src/cpp/util/time.cc \ - src/core/lib/channel/channel_args.c \ - src/core/lib/channel/channel_stack.c \ - src/core/lib/channel/channel_stack_builder.c \ - src/core/lib/channel/compress_filter.c \ - src/core/lib/channel/connected_channel.c \ - src/core/lib/channel/http_client_filter.c \ - src/core/lib/channel/http_server_filter.c \ - src/core/lib/compression/compression.c \ - src/core/lib/compression/message_compress.c \ - src/core/lib/debug/trace.c \ - src/core/lib/http/format_request.c \ - src/core/lib/http/httpcli.c \ - src/core/lib/http/parser.c \ - src/core/lib/iomgr/closure.c \ - src/core/lib/iomgr/endpoint.c \ - src/core/lib/iomgr/endpoint_pair_posix.c \ - src/core/lib/iomgr/endpoint_pair_windows.c \ - src/core/lib/iomgr/error.c \ - src/core/lib/iomgr/ev_epoll_linux.c \ - src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ - src/core/lib/iomgr/ev_poll_posix.c \ - src/core/lib/iomgr/ev_posix.c \ - src/core/lib/iomgr/exec_ctx.c \ - src/core/lib/iomgr/executor.c \ - src/core/lib/iomgr/iocp_windows.c \ - src/core/lib/iomgr/iomgr.c \ - src/core/lib/iomgr/iomgr_posix.c \ - src/core/lib/iomgr/iomgr_windows.c \ - src/core/lib/iomgr/load_file.c \ - src/core/lib/iomgr/network_status_tracker.c \ - src/core/lib/iomgr/polling_entity.c \ - src/core/lib/iomgr/pollset_set_windows.c \ - src/core/lib/iomgr/pollset_windows.c \ - src/core/lib/iomgr/resolve_address_posix.c \ - src/core/lib/iomgr/resolve_address_windows.c \ - src/core/lib/iomgr/sockaddr_utils.c \ - src/core/lib/iomgr/socket_utils_common_posix.c \ - src/core/lib/iomgr/socket_utils_linux.c \ - src/core/lib/iomgr/socket_utils_posix.c \ - src/core/lib/iomgr/socket_windows.c \ - src/core/lib/iomgr/tcp_client_posix.c \ - src/core/lib/iomgr/tcp_client_windows.c \ - src/core/lib/iomgr/tcp_posix.c \ - src/core/lib/iomgr/tcp_server_posix.c \ - src/core/lib/iomgr/tcp_server_windows.c \ - src/core/lib/iomgr/tcp_windows.c \ - src/core/lib/iomgr/time_averaged_stats.c \ - src/core/lib/iomgr/timer.c \ - src/core/lib/iomgr/timer_heap.c \ - src/core/lib/iomgr/udp_server.c \ - src/core/lib/iomgr/unix_sockets_posix.c \ - src/core/lib/iomgr/unix_sockets_posix_noop.c \ - src/core/lib/iomgr/wakeup_fd_eventfd.c \ - src/core/lib/iomgr/wakeup_fd_nospecial.c \ - src/core/lib/iomgr/wakeup_fd_pipe.c \ - src/core/lib/iomgr/wakeup_fd_posix.c \ - src/core/lib/iomgr/workqueue_posix.c \ - src/core/lib/iomgr/workqueue_windows.c \ - src/core/lib/json/json.c \ - src/core/lib/json/json_reader.c \ - src/core/lib/json/json_string.c \ - src/core/lib/json/json_writer.c \ - src/core/lib/surface/alarm.c \ - src/core/lib/surface/api_trace.c \ - src/core/lib/surface/byte_buffer.c \ - src/core/lib/surface/byte_buffer_reader.c \ - src/core/lib/surface/call.c \ - src/core/lib/surface/call_details.c \ - src/core/lib/surface/call_log_batch.c \ - src/core/lib/surface/channel.c \ - src/core/lib/surface/channel_init.c \ - src/core/lib/surface/channel_ping.c \ - src/core/lib/surface/channel_stack_type.c \ - src/core/lib/surface/completion_queue.c \ - src/core/lib/surface/event_string.c \ - src/core/lib/surface/lame_client.c \ - src/core/lib/surface/metadata_array.c \ - src/core/lib/surface/server.c \ - src/core/lib/surface/validate_metadata.c \ - src/core/lib/surface/version.c \ - src/core/lib/transport/byte_stream.c \ - src/core/lib/transport/connectivity_state.c \ - src/core/lib/transport/metadata.c \ - src/core/lib/transport/metadata_batch.c \ - src/core/lib/transport/static_metadata.c \ - src/core/lib/transport/transport.c \ - src/core/lib/transport/transport_op_string.c \ - src/core/lib/http/httpcli_security_connector.c \ - src/core/lib/security/context/security_context.c \ - src/core/lib/security/credentials/composite/composite_credentials.c \ - src/core/lib/security/credentials/credentials.c \ - src/core/lib/security/credentials/credentials_metadata.c \ - src/core/lib/security/credentials/fake/fake_credentials.c \ - src/core/lib/security/credentials/google_default/credentials_posix.c \ - src/core/lib/security/credentials/google_default/credentials_windows.c \ - src/core/lib/security/credentials/google_default/google_default_credentials.c \ - src/core/lib/security/credentials/iam/iam_credentials.c \ - src/core/lib/security/credentials/jwt/json_token.c \ - src/core/lib/security/credentials/jwt/jwt_credentials.c \ - src/core/lib/security/credentials/jwt/jwt_verifier.c \ - src/core/lib/security/credentials/oauth2/oauth2_credentials.c \ - src/core/lib/security/credentials/plugin/plugin_credentials.c \ - src/core/lib/security/credentials/ssl/ssl_credentials.c \ - src/core/lib/security/transport/client_auth_filter.c \ - src/core/lib/security/transport/handshake.c \ - src/core/lib/security/transport/secure_endpoint.c \ - src/core/lib/security/transport/security_connector.c \ - src/core/lib/security/transport/server_auth_filter.c \ - src/core/lib/security/transport/tsi_error.c \ - src/core/lib/security/util/b64.c \ - src/core/lib/security/util/json_util.c \ - src/core/lib/surface/init_secure.c \ - src/core/ext/transport/chttp2/alpn/alpn.c \ - src/core/lib/tsi/fake_transport_security.c \ - src/core/lib/tsi/ssl_transport_security.c \ - src/core/lib/tsi/transport_security.c \ src/cpp/codegen/codegen_init.cc \ PUBLIC_HEADERS_CXX += \ @@ -3638,14 +3522,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_windows.h \ include/grpc/impl/codegen/time.h \ - include/grpc/byte_buffer.h \ - include/grpc/byte_buffer_reader.h \ - include/grpc/compression.h \ - include/grpc/grpc.h \ - include/grpc/grpc_posix.h \ - include/grpc/status.h \ - include/grpc/grpc_security.h \ - include/grpc/grpc_security_constants.h \ LIBGRPC++_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_SRC)))) @@ -3682,18 +3558,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/gpr.$(SHARED_EXT) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/grpc.$(SHARED_EXT) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc-imp -lgpr-imp + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc-imp else -$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT) $(OPENSSL_DEP) +$(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT) $(OPENSSL_DEP) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc -lgpr + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc -lgpr + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgrpc $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc++$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++$(SHARED_VERSION).so endif @@ -4032,122 +3908,6 @@ LIBGRPC++_UNSECURE_SRC = \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ src/cpp/util/time.cc \ - src/core/lib/channel/channel_args.c \ - src/core/lib/channel/channel_stack.c \ - src/core/lib/channel/channel_stack_builder.c \ - src/core/lib/channel/compress_filter.c \ - src/core/lib/channel/connected_channel.c \ - src/core/lib/channel/http_client_filter.c \ - src/core/lib/channel/http_server_filter.c \ - src/core/lib/compression/compression.c \ - src/core/lib/compression/message_compress.c \ - src/core/lib/debug/trace.c \ - src/core/lib/http/format_request.c \ - src/core/lib/http/httpcli.c \ - src/core/lib/http/parser.c \ - src/core/lib/iomgr/closure.c \ - src/core/lib/iomgr/endpoint.c \ - src/core/lib/iomgr/endpoint_pair_posix.c \ - src/core/lib/iomgr/endpoint_pair_windows.c \ - src/core/lib/iomgr/error.c \ - src/core/lib/iomgr/ev_epoll_linux.c \ - src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ - src/core/lib/iomgr/ev_poll_posix.c \ - src/core/lib/iomgr/ev_posix.c \ - src/core/lib/iomgr/exec_ctx.c \ - src/core/lib/iomgr/executor.c \ - src/core/lib/iomgr/iocp_windows.c \ - src/core/lib/iomgr/iomgr.c \ - src/core/lib/iomgr/iomgr_posix.c \ - src/core/lib/iomgr/iomgr_windows.c \ - src/core/lib/iomgr/load_file.c \ - src/core/lib/iomgr/network_status_tracker.c \ - src/core/lib/iomgr/polling_entity.c \ - src/core/lib/iomgr/pollset_set_windows.c \ - src/core/lib/iomgr/pollset_windows.c \ - src/core/lib/iomgr/resolve_address_posix.c \ - src/core/lib/iomgr/resolve_address_windows.c \ - src/core/lib/iomgr/sockaddr_utils.c \ - src/core/lib/iomgr/socket_utils_common_posix.c \ - src/core/lib/iomgr/socket_utils_linux.c \ - src/core/lib/iomgr/socket_utils_posix.c \ - src/core/lib/iomgr/socket_windows.c \ - src/core/lib/iomgr/tcp_client_posix.c \ - src/core/lib/iomgr/tcp_client_windows.c \ - src/core/lib/iomgr/tcp_posix.c \ - src/core/lib/iomgr/tcp_server_posix.c \ - src/core/lib/iomgr/tcp_server_windows.c \ - src/core/lib/iomgr/tcp_windows.c \ - src/core/lib/iomgr/time_averaged_stats.c \ - src/core/lib/iomgr/timer.c \ - src/core/lib/iomgr/timer_heap.c \ - src/core/lib/iomgr/udp_server.c \ - src/core/lib/iomgr/unix_sockets_posix.c \ - src/core/lib/iomgr/unix_sockets_posix_noop.c \ - src/core/lib/iomgr/wakeup_fd_eventfd.c \ - src/core/lib/iomgr/wakeup_fd_nospecial.c \ - src/core/lib/iomgr/wakeup_fd_pipe.c \ - src/core/lib/iomgr/wakeup_fd_posix.c \ - src/core/lib/iomgr/workqueue_posix.c \ - src/core/lib/iomgr/workqueue_windows.c \ - src/core/lib/json/json.c \ - src/core/lib/json/json_reader.c \ - src/core/lib/json/json_string.c \ - src/core/lib/json/json_writer.c \ - src/core/lib/surface/alarm.c \ - src/core/lib/surface/api_trace.c \ - src/core/lib/surface/byte_buffer.c \ - src/core/lib/surface/byte_buffer_reader.c \ - src/core/lib/surface/call.c \ - src/core/lib/surface/call_details.c \ - src/core/lib/surface/call_log_batch.c \ - src/core/lib/surface/channel.c \ - src/core/lib/surface/channel_init.c \ - src/core/lib/surface/channel_ping.c \ - src/core/lib/surface/channel_stack_type.c \ - src/core/lib/surface/completion_queue.c \ - src/core/lib/surface/event_string.c \ - src/core/lib/surface/lame_client.c \ - src/core/lib/surface/metadata_array.c \ - src/core/lib/surface/server.c \ - src/core/lib/surface/validate_metadata.c \ - src/core/lib/surface/version.c \ - src/core/lib/transport/byte_stream.c \ - src/core/lib/transport/connectivity_state.c \ - src/core/lib/transport/metadata.c \ - src/core/lib/transport/metadata_batch.c \ - src/core/lib/transport/static_metadata.c \ - src/core/lib/transport/transport.c \ - src/core/lib/transport/transport_op_string.c \ - src/core/lib/http/httpcli_security_connector.c \ - src/core/lib/security/context/security_context.c \ - src/core/lib/security/credentials/composite/composite_credentials.c \ - src/core/lib/security/credentials/credentials.c \ - src/core/lib/security/credentials/credentials_metadata.c \ - src/core/lib/security/credentials/fake/fake_credentials.c \ - src/core/lib/security/credentials/google_default/credentials_posix.c \ - src/core/lib/security/credentials/google_default/credentials_windows.c \ - src/core/lib/security/credentials/google_default/google_default_credentials.c \ - src/core/lib/security/credentials/iam/iam_credentials.c \ - src/core/lib/security/credentials/jwt/json_token.c \ - src/core/lib/security/credentials/jwt/jwt_credentials.c \ - src/core/lib/security/credentials/jwt/jwt_verifier.c \ - src/core/lib/security/credentials/oauth2/oauth2_credentials.c \ - src/core/lib/security/credentials/plugin/plugin_credentials.c \ - src/core/lib/security/credentials/ssl/ssl_credentials.c \ - src/core/lib/security/transport/client_auth_filter.c \ - src/core/lib/security/transport/handshake.c \ - src/core/lib/security/transport/secure_endpoint.c \ - src/core/lib/security/transport/security_connector.c \ - src/core/lib/security/transport/server_auth_filter.c \ - src/core/lib/security/transport/tsi_error.c \ - src/core/lib/security/util/b64.c \ - src/core/lib/security/util/json_util.c \ - src/core/lib/surface/init_secure.c \ - src/core/ext/transport/chttp2/alpn/alpn.c \ - src/core/lib/tsi/fake_transport_security.c \ - src/core/lib/tsi/ssl_transport_security.c \ - src/core/lib/tsi/transport_security.c \ src/cpp/codegen/codegen_init.cc \ PUBLIC_HEADERS_CXX += \ @@ -4249,14 +4009,6 @@ PUBLIC_HEADERS_CXX += \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_windows.h \ include/grpc/impl/codegen/time.h \ - include/grpc/byte_buffer.h \ - include/grpc/byte_buffer_reader.h \ - include/grpc/compression.h \ - include/grpc/grpc.h \ - include/grpc/grpc_posix.h \ - include/grpc/status.h \ - include/grpc/grpc_security.h \ - include/grpc/grpc_security_constants.h \ LIBGRPC++_UNSECURE_OBJS = $(addprefix $(OBJDIR)/$(CONFIG)/, $(addsuffix .o, $(basename $(LIBGRPC++_UNSECURE_SRC)))) @@ -4283,18 +4035,18 @@ endif ifeq ($(SYSTEM),MINGW32) -$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/gpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/grpc_unsecure.$(SHARED_EXT) +$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/gpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/grpc_unsecure.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/grpc.$(SHARED_EXT) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr-imp -lgrpc_unsecure-imp + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared grpc++_unsecure.def -Wl,--output-def=$(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).def -Wl,--out-implib=$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION)-dll.a -o $(LIBDIR)/$(CONFIG)/grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr-imp -lgrpc_unsecure-imp -lgrpc-imp else -$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT) +$(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT): $(LIBGRPC++_UNSECURE_OBJS) $(ZLIB_DEP) $(PROTOBUF_DEP) $(LIBDIR)/$(CONFIG)/libgpr.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc_unsecure.$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc.$(SHARED_EXT) $(E) "[LD] Linking $@" $(Q) mkdir -p `dirname $@` ifeq ($(SYSTEM),Darwin) - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -install_name $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) -dynamiclib -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure -lgrpc else - $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_unsecure.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure + $(Q) $(LDXX) $(LDFLAGS) -L$(LIBDIR)/$(CONFIG) -shared -Wl,-soname,libgrpc++_unsecure.so.0 -o $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBGRPC++_UNSECURE_OBJS) $(LDLIBS) $(ZLIB_MERGE_LIBS) $(LDLIBSXX) $(LDLIBS_PROTOBUF) -lgpr -lgrpc_unsecure -lgrpc $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).so.0 $(Q) ln -sf $(SHARED_PREFIX)grpc++_unsecure$(SHARED_VERSION).$(SHARED_EXT) $(LIBDIR)/$(CONFIG)/libgrpc++_unsecure$(SHARED_VERSION).so endif @@ -15099,6 +14851,34 @@ src/core/ext/transport/chttp2/server/secure/server_secure_chttp2.c: $(OPENSSL_DE src/core/ext/transport/cronet/client/secure/cronet_channel_create.c: $(OPENSSL_DEP) src/core/ext/transport/cronet/transport/cronet_api_dummy.c: $(OPENSSL_DEP) src/core/ext/transport/cronet/transport/cronet_transport.c: $(OPENSSL_DEP) +src/core/lib/http/httpcli_security_connector.c: $(OPENSSL_DEP) +src/core/lib/security/context/security_context.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/composite/composite_credentials.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/credentials.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/credentials_metadata.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/fake/fake_credentials.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/google_default/credentials_posix.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/google_default/credentials_windows.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/google_default/google_default_credentials.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/iam/iam_credentials.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/jwt/json_token.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/jwt/jwt_credentials.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/jwt/jwt_verifier.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/oauth2/oauth2_credentials.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/plugin/plugin_credentials.c: $(OPENSSL_DEP) +src/core/lib/security/credentials/ssl/ssl_credentials.c: $(OPENSSL_DEP) +src/core/lib/security/transport/client_auth_filter.c: $(OPENSSL_DEP) +src/core/lib/security/transport/handshake.c: $(OPENSSL_DEP) +src/core/lib/security/transport/secure_endpoint.c: $(OPENSSL_DEP) +src/core/lib/security/transport/security_connector.c: $(OPENSSL_DEP) +src/core/lib/security/transport/server_auth_filter.c: $(OPENSSL_DEP) +src/core/lib/security/transport/tsi_error.c: $(OPENSSL_DEP) +src/core/lib/security/util/b64.c: $(OPENSSL_DEP) +src/core/lib/security/util/json_util.c: $(OPENSSL_DEP) +src/core/lib/surface/init_secure.c: $(OPENSSL_DEP) +src/core/lib/tsi/fake_transport_security.c: $(OPENSSL_DEP) +src/core/lib/tsi/ssl_transport_security.c: $(OPENSSL_DEP) +src/core/lib/tsi/transport_security.c: $(OPENSSL_DEP) src/core/plugin_registry/grpc_cronet_plugin_registry.c: $(OPENSSL_DEP) src/core/plugin_registry/grpc_plugin_registry.c: $(OPENSSL_DEP) src/cpp/client/secure_credentials.cc: $(OPENSSL_DEP) diff --git a/build.yaml b/build.yaml index dc42a61300e..1b20dde5631 100644 --- a/build.yaml +++ b/build.yaml @@ -712,10 +712,10 @@ filegroups: - src/cpp/util/status.cc - src/cpp/util/string_ref.cc - src/cpp/util/time.cc + deps: + - grpc uses: - grpc++_codegen_base - - grpc_base - - grpc_secure - name: grpc++_codegen_base language: c++ public_headers: diff --git a/tools/doxygen/Doxyfile.c++ b/tools/doxygen/Doxyfile.c++ index db6b36f8c7b..de7acd7777e 100644 --- a/tools/doxygen/Doxyfile.c++ +++ b/tools/doxygen/Doxyfile.c++ @@ -857,15 +857,7 @@ include/grpc/impl/codegen/sync.h \ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_windows.h \ -include/grpc/impl/codegen/time.h \ -include/grpc/byte_buffer.h \ -include/grpc/byte_buffer_reader.h \ -include/grpc/compression.h \ -include/grpc/grpc.h \ -include/grpc/grpc_posix.h \ -include/grpc/status.h \ -include/grpc/grpc_security.h \ -include/grpc/grpc_security_constants.h +include/grpc/impl/codegen/time.h # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses diff --git a/tools/doxygen/Doxyfile.c++.internal b/tools/doxygen/Doxyfile.c++.internal index 660e501d713..76bb3b6c59e 100644 --- a/tools/doxygen/Doxyfile.c++.internal +++ b/tools/doxygen/Doxyfile.c++.internal @@ -858,14 +858,6 @@ include/grpc/impl/codegen/sync_generic.h \ include/grpc/impl/codegen/sync_posix.h \ include/grpc/impl/codegen/sync_windows.h \ include/grpc/impl/codegen/time.h \ -include/grpc/byte_buffer.h \ -include/grpc/byte_buffer_reader.h \ -include/grpc/compression.h \ -include/grpc/grpc.h \ -include/grpc/grpc_posix.h \ -include/grpc/status.h \ -include/grpc/grpc_security.h \ -include/grpc/grpc_security_constants.h \ include/grpc++/impl/codegen/core_codegen.h \ src/cpp/client/secure_credentials.h \ src/cpp/common/secure_auth_context.h \ @@ -873,109 +865,6 @@ src/cpp/server/secure_server_credentials.h \ src/cpp/client/create_channel_internal.h \ src/cpp/server/dynamic_thread_pool.h \ src/cpp/server/thread_pool_interface.h \ -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/compress_filter.h \ -src/core/lib/channel/connected_channel.h \ -src/core/lib/channel/context.h \ -src/core/lib/channel/http_client_filter.h \ -src/core/lib/channel/http_server_filter.h \ -src/core/lib/compression/algorithm_metadata.h \ -src/core/lib/compression/message_compress.h \ -src/core/lib/debug/trace.h \ -src/core/lib/http/format_request.h \ -src/core/lib/http/httpcli.h \ -src/core/lib/http/parser.h \ -src/core/lib/iomgr/closure.h \ -src/core/lib/iomgr/endpoint.h \ -src/core/lib/iomgr/endpoint_pair.h \ -src/core/lib/iomgr/error.h \ -src/core/lib/iomgr/ev_epoll_linux.h \ -src/core/lib/iomgr/ev_poll_and_epoll_posix.h \ -src/core/lib/iomgr/ev_poll_posix.h \ -src/core/lib/iomgr/ev_posix.h \ -src/core/lib/iomgr/exec_ctx.h \ -src/core/lib/iomgr/executor.h \ -src/core/lib/iomgr/iocp_windows.h \ -src/core/lib/iomgr/iomgr.h \ -src/core/lib/iomgr/iomgr_internal.h \ -src/core/lib/iomgr/iomgr_posix.h \ -src/core/lib/iomgr/load_file.h \ -src/core/lib/iomgr/network_status_tracker.h \ -src/core/lib/iomgr/polling_entity.h \ -src/core/lib/iomgr/pollset.h \ -src/core/lib/iomgr/pollset_set.h \ -src/core/lib/iomgr/pollset_set_windows.h \ -src/core/lib/iomgr/pollset_windows.h \ -src/core/lib/iomgr/resolve_address.h \ -src/core/lib/iomgr/sockaddr.h \ -src/core/lib/iomgr/sockaddr_posix.h \ -src/core/lib/iomgr/sockaddr_utils.h \ -src/core/lib/iomgr/sockaddr_windows.h \ -src/core/lib/iomgr/socket_utils_posix.h \ -src/core/lib/iomgr/socket_windows.h \ -src/core/lib/iomgr/tcp_client.h \ -src/core/lib/iomgr/tcp_posix.h \ -src/core/lib/iomgr/tcp_server.h \ -src/core/lib/iomgr/tcp_windows.h \ -src/core/lib/iomgr/time_averaged_stats.h \ -src/core/lib/iomgr/timer.h \ -src/core/lib/iomgr/timer_heap.h \ -src/core/lib/iomgr/udp_server.h \ -src/core/lib/iomgr/unix_sockets_posix.h \ -src/core/lib/iomgr/wakeup_fd_pipe.h \ -src/core/lib/iomgr/wakeup_fd_posix.h \ -src/core/lib/iomgr/workqueue.h \ -src/core/lib/iomgr/workqueue_posix.h \ -src/core/lib/iomgr/workqueue_windows.h \ -src/core/lib/json/json.h \ -src/core/lib/json/json_common.h \ -src/core/lib/json/json_reader.h \ -src/core/lib/json/json_writer.h \ -src/core/lib/surface/api_trace.h \ -src/core/lib/surface/call.h \ -src/core/lib/surface/call_test_only.h \ -src/core/lib/surface/channel.h \ -src/core/lib/surface/channel_init.h \ -src/core/lib/surface/channel_stack_type.h \ -src/core/lib/surface/completion_queue.h \ -src/core/lib/surface/event_string.h \ -src/core/lib/surface/init.h \ -src/core/lib/surface/lame_client.h \ -src/core/lib/surface/server.h \ -src/core/lib/transport/byte_stream.h \ -src/core/lib/transport/connectivity_state.h \ -src/core/lib/transport/metadata.h \ -src/core/lib/transport/metadata_batch.h \ -src/core/lib/transport/static_metadata.h \ -src/core/lib/transport/transport.h \ -src/core/lib/transport/transport_impl.h \ -src/core/lib/security/context/security_context.h \ -src/core/lib/security/credentials/composite/composite_credentials.h \ -src/core/lib/security/credentials/credentials.h \ -src/core/lib/security/credentials/fake/fake_credentials.h \ -src/core/lib/security/credentials/google_default/google_default_credentials.h \ -src/core/lib/security/credentials/iam/iam_credentials.h \ -src/core/lib/security/credentials/jwt/json_token.h \ -src/core/lib/security/credentials/jwt/jwt_credentials.h \ -src/core/lib/security/credentials/jwt/jwt_verifier.h \ -src/core/lib/security/credentials/oauth2/oauth2_credentials.h \ -src/core/lib/security/credentials/plugin/plugin_credentials.h \ -src/core/lib/security/credentials/ssl/ssl_credentials.h \ -src/core/lib/security/transport/auth_filters.h \ -src/core/lib/security/transport/handshake.h \ -src/core/lib/security/transport/secure_endpoint.h \ -src/core/lib/security/transport/security_connector.h \ -src/core/lib/security/transport/tsi_error.h \ -src/core/lib/security/util/b64.h \ -src/core/lib/security/util/json_util.h \ -src/core/ext/transport/chttp2/alpn/alpn.h \ -src/core/lib/tsi/fake_transport_security.h \ -src/core/lib/tsi/ssl_transport_security.h \ -src/core/lib/tsi/ssl_types.h \ -src/core/lib/tsi/transport_security.h \ -src/core/lib/tsi/transport_security_interface.h \ src/cpp/client/secure_credentials.cc \ src/cpp/common/auth_property_iterator.cc \ src/cpp/common/secure_auth_context.cc \ @@ -1008,122 +897,6 @@ src/cpp/util/slice.cc \ src/cpp/util/status.cc \ src/cpp/util/string_ref.cc \ src/cpp/util/time.cc \ -src/core/lib/channel/channel_args.c \ -src/core/lib/channel/channel_stack.c \ -src/core/lib/channel/channel_stack_builder.c \ -src/core/lib/channel/compress_filter.c \ -src/core/lib/channel/connected_channel.c \ -src/core/lib/channel/http_client_filter.c \ -src/core/lib/channel/http_server_filter.c \ -src/core/lib/compression/compression.c \ -src/core/lib/compression/message_compress.c \ -src/core/lib/debug/trace.c \ -src/core/lib/http/format_request.c \ -src/core/lib/http/httpcli.c \ -src/core/lib/http/parser.c \ -src/core/lib/iomgr/closure.c \ -src/core/lib/iomgr/endpoint.c \ -src/core/lib/iomgr/endpoint_pair_posix.c \ -src/core/lib/iomgr/endpoint_pair_windows.c \ -src/core/lib/iomgr/error.c \ -src/core/lib/iomgr/ev_epoll_linux.c \ -src/core/lib/iomgr/ev_poll_and_epoll_posix.c \ -src/core/lib/iomgr/ev_poll_posix.c \ -src/core/lib/iomgr/ev_posix.c \ -src/core/lib/iomgr/exec_ctx.c \ -src/core/lib/iomgr/executor.c \ -src/core/lib/iomgr/iocp_windows.c \ -src/core/lib/iomgr/iomgr.c \ -src/core/lib/iomgr/iomgr_posix.c \ -src/core/lib/iomgr/iomgr_windows.c \ -src/core/lib/iomgr/load_file.c \ -src/core/lib/iomgr/network_status_tracker.c \ -src/core/lib/iomgr/polling_entity.c \ -src/core/lib/iomgr/pollset_set_windows.c \ -src/core/lib/iomgr/pollset_windows.c \ -src/core/lib/iomgr/resolve_address_posix.c \ -src/core/lib/iomgr/resolve_address_windows.c \ -src/core/lib/iomgr/sockaddr_utils.c \ -src/core/lib/iomgr/socket_utils_common_posix.c \ -src/core/lib/iomgr/socket_utils_linux.c \ -src/core/lib/iomgr/socket_utils_posix.c \ -src/core/lib/iomgr/socket_windows.c \ -src/core/lib/iomgr/tcp_client_posix.c \ -src/core/lib/iomgr/tcp_client_windows.c \ -src/core/lib/iomgr/tcp_posix.c \ -src/core/lib/iomgr/tcp_server_posix.c \ -src/core/lib/iomgr/tcp_server_windows.c \ -src/core/lib/iomgr/tcp_windows.c \ -src/core/lib/iomgr/time_averaged_stats.c \ -src/core/lib/iomgr/timer.c \ -src/core/lib/iomgr/timer_heap.c \ -src/core/lib/iomgr/udp_server.c \ -src/core/lib/iomgr/unix_sockets_posix.c \ -src/core/lib/iomgr/unix_sockets_posix_noop.c \ -src/core/lib/iomgr/wakeup_fd_eventfd.c \ -src/core/lib/iomgr/wakeup_fd_nospecial.c \ -src/core/lib/iomgr/wakeup_fd_pipe.c \ -src/core/lib/iomgr/wakeup_fd_posix.c \ -src/core/lib/iomgr/workqueue_posix.c \ -src/core/lib/iomgr/workqueue_windows.c \ -src/core/lib/json/json.c \ -src/core/lib/json/json_reader.c \ -src/core/lib/json/json_string.c \ -src/core/lib/json/json_writer.c \ -src/core/lib/surface/alarm.c \ -src/core/lib/surface/api_trace.c \ -src/core/lib/surface/byte_buffer.c \ -src/core/lib/surface/byte_buffer_reader.c \ -src/core/lib/surface/call.c \ -src/core/lib/surface/call_details.c \ -src/core/lib/surface/call_log_batch.c \ -src/core/lib/surface/channel.c \ -src/core/lib/surface/channel_init.c \ -src/core/lib/surface/channel_ping.c \ -src/core/lib/surface/channel_stack_type.c \ -src/core/lib/surface/completion_queue.c \ -src/core/lib/surface/event_string.c \ -src/core/lib/surface/lame_client.c \ -src/core/lib/surface/metadata_array.c \ -src/core/lib/surface/server.c \ -src/core/lib/surface/validate_metadata.c \ -src/core/lib/surface/version.c \ -src/core/lib/transport/byte_stream.c \ -src/core/lib/transport/connectivity_state.c \ -src/core/lib/transport/metadata.c \ -src/core/lib/transport/metadata_batch.c \ -src/core/lib/transport/static_metadata.c \ -src/core/lib/transport/transport.c \ -src/core/lib/transport/transport_op_string.c \ -src/core/lib/http/httpcli_security_connector.c \ -src/core/lib/security/context/security_context.c \ -src/core/lib/security/credentials/composite/composite_credentials.c \ -src/core/lib/security/credentials/credentials.c \ -src/core/lib/security/credentials/credentials_metadata.c \ -src/core/lib/security/credentials/fake/fake_credentials.c \ -src/core/lib/security/credentials/google_default/credentials_posix.c \ -src/core/lib/security/credentials/google_default/credentials_windows.c \ -src/core/lib/security/credentials/google_default/google_default_credentials.c \ -src/core/lib/security/credentials/iam/iam_credentials.c \ -src/core/lib/security/credentials/jwt/json_token.c \ -src/core/lib/security/credentials/jwt/jwt_credentials.c \ -src/core/lib/security/credentials/jwt/jwt_verifier.c \ -src/core/lib/security/credentials/oauth2/oauth2_credentials.c \ -src/core/lib/security/credentials/plugin/plugin_credentials.c \ -src/core/lib/security/credentials/ssl/ssl_credentials.c \ -src/core/lib/security/transport/client_auth_filter.c \ -src/core/lib/security/transport/handshake.c \ -src/core/lib/security/transport/secure_endpoint.c \ -src/core/lib/security/transport/security_connector.c \ -src/core/lib/security/transport/server_auth_filter.c \ -src/core/lib/security/transport/tsi_error.c \ -src/core/lib/security/util/b64.c \ -src/core/lib/security/util/json_util.c \ -src/core/lib/surface/init_secure.c \ -src/core/ext/transport/chttp2/alpn/alpn.c \ -src/core/lib/tsi/fake_transport_security.c \ -src/core/lib/tsi/ssl_transport_security.c \ -src/core/lib/tsi/transport_security.c \ src/cpp/codegen/codegen_init.cc # This tag can be used to specify the character encoding of the source files diff --git a/tools/run_tests/sources_and_headers.json b/tools/run_tests/sources_and_headers.json index 3ebb445b8a8..cdbc254f430 100644 --- a/tools/run_tests/sources_and_headers.json +++ b/tools/run_tests/sources_and_headers.json @@ -4345,7 +4345,6 @@ }, { "deps": [ - "gpr", "grpc", "grpc++_base", "grpc++_codegen_base", @@ -4459,6 +4458,7 @@ { "deps": [ "gpr", + "grpc", "grpc++_base", "grpc++_codegen_base", "grpc++_codegen_base_src", @@ -6515,10 +6515,8 @@ }, { "deps": [ - "gpr", - "grpc++_codegen_base", - "grpc_base", - "grpc_secure" + "grpc", + "grpc++_codegen_base" ], "headers": [ "include/grpc++/alarm.h", diff --git a/vsprojects/grpc.sln b/vsprojects/grpc.sln index 8fccc646e5c..84720914b0b 100644 --- a/vsprojects/grpc.sln +++ b/vsprojects/grpc.sln @@ -49,7 +49,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++", "vcxproj\.\grpc++\ EndProjectSection ProjectSection(ProjectDependencies) = postProject {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_reflection", "vcxproj\.\grpc++_reflection\grpc++_reflection.vcxproj", "{5F575402-3F89-5D1A-6910-9DB8BF5D2BAB}" @@ -67,6 +66,7 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc++_unsecure", "vcxproj\ ProjectSection(ProjectDependencies) = postProject {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} = {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} = {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + {29D16885-7228-4C31-81ED-5F9187C7F2A9} = {29D16885-7228-4C31-81ED-5F9187C7F2A9} EndProjectSection EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "grpc_create_jwt", "vcxproj\.\grpc_create_jwt\grpc_create_jwt.vcxproj", "{77971F8D-F583-3E77-0E3C-6C1FB6B1749C}" diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj b/vsprojects/vcxproj/grpc++/grpc++.vcxproj index a2711ca7a46..cb9e41ea22f 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj @@ -356,14 +356,6 @@ - - - - - - - - @@ -373,109 +365,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -542,238 +431,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -781,9 +438,6 @@ {29D16885-7228-4C31-81ED-5F9187C7F2A9} - - {B23D3D1A-9438-4EDA-BEB6-9A0A03D17792} - diff --git a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters index f478ac9839c..a9051182b3c 100644 --- a/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++/grpc++.vcxproj.filters @@ -97,354 +97,6 @@ src\cpp\util - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\compression - - - src\core\lib\compression - - - src\core\lib\debug - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\http - - - src\core\lib\security\context - - - src\core\lib\security\credentials\composite - - - src\core\lib\security\credentials - - - src\core\lib\security\credentials - - - src\core\lib\security\credentials\fake - - - src\core\lib\security\credentials\google_default - - - src\core\lib\security\credentials\google_default - - - src\core\lib\security\credentials\google_default - - - src\core\lib\security\credentials\iam - - - src\core\lib\security\credentials\jwt - - - src\core\lib\security\credentials\jwt - - - src\core\lib\security\credentials\jwt - - - src\core\lib\security\credentials\oauth2 - - - src\core\lib\security\credentials\plugin - - - src\core\lib\security\credentials\ssl - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\util - - - src\core\lib\security\util - - - src\core\lib\surface - - - src\core\ext\transport\chttp2\alpn - - - src\core\lib\tsi - - - src\core\lib\tsi - - - src\core\lib\tsi - src\cpp\codegen @@ -744,30 +396,6 @@ include\grpc\impl\codegen - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - @@ -791,315 +419,6 @@ src\cpp\server - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\compression - - - src\core\lib\compression - - - src\core\lib\debug - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\security\context - - - src\core\lib\security\credentials\composite - - - src\core\lib\security\credentials - - - src\core\lib\security\credentials\fake - - - src\core\lib\security\credentials\google_default - - - src\core\lib\security\credentials\iam - - - src\core\lib\security\credentials\jwt - - - src\core\lib\security\credentials\jwt - - - src\core\lib\security\credentials\jwt - - - src\core\lib\security\credentials\oauth2 - - - src\core\lib\security\credentials\plugin - - - src\core\lib\security\credentials\ssl - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\util - - - src\core\lib\security\util - - - src\core\ext\transport\chttp2\alpn - - - src\core\lib\tsi - - - src\core\lib\tsi - - - src\core\lib\tsi - - - src\core\lib\tsi - - - src\core\lib\tsi - @@ -1139,90 +458,6 @@ {328ff211-2886-406e-56f9-18ba1686f363} - - {d02f1155-7e7e-3736-3c69-dc9146dc523d} - - - {96d09c4a-59f9-3486-6c2f-cbf695b285d8} - - - {202b1172-189f-afc4-f16c-4ca12677b480} - - - {9de393b8-4b6e-6c34-122a-940419ca9989} - - - {efb6b3e6-8c7b-c2a0-12c6-486c68cdb8ec} - - - {80567a8f-622f-a3ce-c12d-aebb63984b07} - - - {e769265c-8abd-cd64-2cc2-a52da484fe7b} - - - {701b2d46-11c6-3640-b189-45287f00bee3} - - - {ada68fd5-8e51-98cb-71a7-baf7989d8ffa} - - - {e770844e-61d4-555e-59be-81288e21a35f} - - - {04dfa1c8-7ffe-4f06-4a7c-37441dc75764} - - - {a5d5bddf-6f19-b655-a03a-f30ff5c253a5} - - - {dbd8cbb6-6308-d6fe-7a36-06cc7045c037} - - - {ecd2c264-808d-0041-2f69-a5200543de91} - - - {0015e481-7e80-8936-a25c-c3fa260cc095} - - - {fad200df-a5e2-1648-7442-cea0f07edd4d} - - - {397464b3-9bbd-15a5-041b-c7deef1662ec} - - - {567691b4-6a06-cc5a-c6ad-e8c080b89ecf} - - - {d5930113-d396-7a70-d273-d07a1feae0ff} - - - {0f6afb67-4b51-6344-9de7-2b1a18a19e7d} - - - {99faa051-ca9f-cb4f-36d5-95f042fb22bc} - - - {b7a9e7e5-2445-6b0f-4677-5095ca10e760} - - - {436bc65a-0c1b-d85a-2c91-6474588c5cb6} - - - {e6a9bf58-3b0f-0b3d-3a35-3ded80d27695} - - - {b4a1cab8-5c2c-909a-8097-7a5c8f0aa9f7} - - - {fb2276d7-5a11-f1d9-82c3-e7c7f1155523} - - - {4bd7971a-68f7-0d5a-f502-6dea3099caaa} - - - {aa0153b8-c9b6-ae1d-ebdd-89754d8579f1} - {2420a905-e4f1-a5aa-a364-6a112878a39e} diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj index 84e709611df..03be485b297 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj @@ -356,122 +356,11 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -528,238 +417,6 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - @@ -770,6 +427,9 @@ {46CEDFFF-9692-456A-AA24-38B5D6BCF4C5} + + {29D16885-7228-4C31-81ED-5F9187C7F2A9} + diff --git a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters index 1e54e1595d4..ba99bc53c8c 100644 --- a/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters +++ b/vsprojects/vcxproj/grpc++_unsecure/grpc++_unsecure.vcxproj.filters @@ -82,354 +82,6 @@ src\cpp\util - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\compression - - - src\core\lib\compression - - - src\core\lib\debug - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\http - - - src\core\lib\security\context - - - src\core\lib\security\credentials\composite - - - src\core\lib\security\credentials - - - src\core\lib\security\credentials - - - src\core\lib\security\credentials\fake - - - src\core\lib\security\credentials\google_default - - - src\core\lib\security\credentials\google_default - - - src\core\lib\security\credentials\google_default - - - src\core\lib\security\credentials\iam - - - src\core\lib\security\credentials\jwt - - - src\core\lib\security\credentials\jwt - - - src\core\lib\security\credentials\jwt - - - src\core\lib\security\credentials\oauth2 - - - src\core\lib\security\credentials\plugin - - - src\core\lib\security\credentials\ssl - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\util - - - src\core\lib\security\util - - - src\core\lib\surface - - - src\core\ext\transport\chttp2\alpn - - - src\core\lib\tsi - - - src\core\lib\tsi - - - src\core\lib\tsi - src\cpp\codegen @@ -729,30 +381,6 @@ include\grpc\impl\codegen - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - - - include\grpc - @@ -764,315 +392,6 @@ src\cpp\server - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\channel - - - src\core\lib\compression - - - src\core\lib\compression - - - src\core\lib\debug - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\http - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\iomgr - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\json - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\surface - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\transport - - - src\core\lib\security\context - - - src\core\lib\security\credentials\composite - - - src\core\lib\security\credentials - - - src\core\lib\security\credentials\fake - - - src\core\lib\security\credentials\google_default - - - src\core\lib\security\credentials\iam - - - src\core\lib\security\credentials\jwt - - - src\core\lib\security\credentials\jwt - - - src\core\lib\security\credentials\jwt - - - src\core\lib\security\credentials\oauth2 - - - src\core\lib\security\credentials\plugin - - - src\core\lib\security\credentials\ssl - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\transport - - - src\core\lib\security\util - - - src\core\lib\security\util - - - src\core\ext\transport\chttp2\alpn - - - src\core\lib\tsi - - - src\core\lib\tsi - - - src\core\lib\tsi - - - src\core\lib\tsi - - - src\core\lib\tsi - @@ -1112,90 +431,6 @@ {cce6a85d-1111-3834-6825-31e170d93cff} - - {595f2ea0-aafb-87e5-c938-db3ff0b0c69a} - - - {52eca76b-9502-3d96-9064-6415226a860f} - - - {8e70201f-3b54-d3cb-8b30-ebe0d96a9b2a} - - - {d505ab7b-5e44-f307-5361-500128965cdc} - - - {d54bab94-cab9-803d-2737-5120774f1893} - - - {cf8fd5d8-ff54-331d-2d20-36d6cae0e14b} - - - {7e0225af-000b-4873-1c16-caffffbfd084} - - - {0bbdbf56-83ad-bb4b-c4e2-a6d38c342179} - - - {3875f7d7-ff11-c91d-0f98-810260cb554b} - - - {4bd405b9-af65-f0a6-d67a-433f75900668} - - - {f4b146e4-8fba-83a6-1cc1-1262ebb785e8} - - - {b83c8e70-e491-f6f9-a08c-85f632bb61d2} - - - {7e21ce26-45e2-6baf-037d-8ab4374077a9} - - - {613e655a-e5c0-9f0c-2bb4-62310a7329c0} - - - {30bddf3f-0eda-9f2f-8171-d86b1e4896fc} - - - {b34f8fa3-0fb9-4916-be6d-2a14a0794882} - - - {7e11872b-bfbb-7d23-4783-e56909c520e8} - - - {212855e8-b7bc-d5bb-0734-dd28996f28de} - - - {6d3828d0-5e5f-15c2-7d46-5d4039a88aad} - - - {b31e7015-364c-5701-31d0-644b1a8ae8c9} - - - {43e3cb91-4101-1fee-6833-20f77ab7f4e5} - - - {727c0b51-4544-957f-45f2-00bf42ff7db9} - - - {606a441b-0d57-85d8-8079-1e6e502d18f1} - - - {5b0b16ae-a8ad-81c3-afe4-8ac0b9e15311} - - - {56333427-0f81-b88b-bf49-a1b2f462023d} - - - {1d59dcef-3358-d0ab-fa42-64da74065785} - - - {ba865739-5dd9-6731-6772-48c25d45134f} - - - {dd4e4960-5bc8-395b-09c4-f2cbd6f6432b} - {1e5fd68c-bd87-e803-42b0-75a7fa19b91d} From 43ba180c2189127fb51dacf856fbf7ff4bb70a9f Mon Sep 17 00:00:00 2001 From: Stanley Cheung Date: Fri, 8 Jul 2016 12:07:39 -0700 Subject: [PATCH 1544/1894] php: remove gpr_log debug --- src/php/ext/grpc/channel.c | 2 -- src/php/ext/grpc/server.c | 1 - 2 files changed, 3 deletions(-) diff --git a/src/php/ext/grpc/channel.c b/src/php/ext/grpc/channel.c index 9f0431908f9..8d94c59683e 100644 --- a/src/php/ext/grpc/channel.c +++ b/src/php/ext/grpc/channel.c @@ -48,7 +48,6 @@ #include #include -#include #include #include "completion_queue.h" @@ -172,7 +171,6 @@ PHP_METHOD(Channel, __construct) { if (creds == NULL) { channel->wrapped = grpc_insecure_channel_create(target, &args, NULL); } else { - gpr_log(GPR_DEBUG, "Initialized secure channel"); channel->wrapped = grpc_secure_channel_create(creds->wrapped, target, &args, NULL); } diff --git a/src/php/ext/grpc/server.c b/src/php/ext/grpc/server.c index 6df2e4f9782..c13e7cd1f92 100644 --- a/src/php/ext/grpc/server.c +++ b/src/php/ext/grpc/server.c @@ -48,7 +48,6 @@ #include #include -#include #include #include "completion_queue.h" From 77f8da22eefedbb49c13a414ab3ff748137e93d5 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Fri, 8 Jul 2016 15:03:20 -0700 Subject: [PATCH 1545/1894] added a comment just to retrigger tests --- src/compiler/objective_c_plugin.cc | 1 + 1 file changed, 1 insertion(+) diff --git a/src/compiler/objective_c_plugin.cc b/src/compiler/objective_c_plugin.cc index 5026088db1e..be647764024 100644 --- a/src/compiler/objective_c_plugin.cc +++ b/src/compiler/objective_c_plugin.cc @@ -81,6 +81,7 @@ class ObjectiveCGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator { if (IsProtobufLibraryBundledProtoFile(dependency)) { ::grpc::string base_name = header; grpc_generator::StripPrefix(&base_name, "google/protobuf/"); + // create the import code snippet proto_imports += "#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS\n" " #import <" + ::grpc::string(ProtobufLibraryFrameworkName) + From 33ab1829a54db3949df483ed44b9c59ab9fb2d84 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 8 Jul 2016 15:19:06 -0700 Subject: [PATCH 1546/1894] Convert time to monotonic internally --- src/core/lib/surface/call.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/core/lib/surface/call.c b/src/core/lib/surface/call.c index e5668be47fe..fc9df76dc18 100644 --- a/src/core/lib/surface/call.c +++ b/src/core/lib/surface/call.c @@ -259,7 +259,8 @@ grpc_call *grpc_call_create( call->metadata_batch[i][j].deadline = gpr_inf_future(GPR_CLOCK_MONOTONIC); } } - call->send_deadline = send_deadline; + call->send_deadline = + gpr_convert_clock_type(send_deadline, GPR_CLOCK_MONOTONIC); GRPC_CHANNEL_INTERNAL_REF(channel, "call"); /* initial refcount dropped by grpc_call_destroy */ grpc_call_stack_init(&exec_ctx, channel_stack, 1, destroy_call, call, From 027ae0b4eba2e65d8b4a6e4ff0005d1ac8836689 Mon Sep 17 00:00:00 2001 From: Makarand Dharmapurikar Date: Fri, 8 Jul 2016 16:39:37 -0700 Subject: [PATCH 1547/1894] removed unneeded import. fixes travis build --- src/objective-c/tests/InteropTests.m | 1 - 1 file changed, 1 deletion(-) diff --git a/src/objective-c/tests/InteropTests.m b/src/objective-c/tests/InteropTests.m index a2f63ac40ca..494743d6041 100644 --- a/src/objective-c/tests/InteropTests.m +++ b/src/objective-c/tests/InteropTests.m @@ -40,7 +40,6 @@ #import #import #import -#import #import #import #import From 7d892fbbc324989ed6d20721aa6efbe442ae731c Mon Sep 17 00:00:00 2001 From: yang-g Date: Fri, 8 Jul 2016 17:06:17 -0700 Subject: [PATCH 1548/1894] another one --- tools/doxygen/Doxyfile.c++.internal.orig | 2505 ---------------------- 1 file changed, 2505 deletions(-) delete mode 100644 tools/doxygen/Doxyfile.c++.internal.orig diff --git a/tools/doxygen/Doxyfile.c++.internal.orig b/tools/doxygen/Doxyfile.c++.internal.orig deleted file mode 100644 index c214b3d3c84..00000000000 --- a/tools/doxygen/Doxyfile.c++.internal.orig +++ /dev/null @@ -1,2505 +0,0 @@ - - -# Doxyfile 1.8.9.1 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = "GRPC C++" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = 0.15.0-dev - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = - -# With the PROJECT_LOGO tag one can specify a logo or an icon that is included -# in the documentation. The maximum height of the logo should not exceed 55 -# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy -# the logo to the output directory. - -PROJECT_LOGO = - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = doc/ref/c++.internal - -# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = YES - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new -# page for each member. If set to NO, the documentation of a member will be part -# of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 2 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. - -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = YES - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. -# -# Note: For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by putting a % sign in front of the word or -# globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = YES - -# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO, -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. If set to YES, local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO, only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO, these classes will be included in the various overviews. This option -# has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO, these declarations will be -# included in the documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO, these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES, upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = NO - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES, the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will -# append additional text to a page's title, such as Class Reference. If set to -# YES the compound reference will be hidden. -# The default value is: NO. - -HIDE_COMPOUND_REFERENCE= NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO, the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo -# list. This list is created by putting \todo commands in the documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test -# list. This list is created by putting \test commands in the documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable (YES) or disable (NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or disable (NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES, the -# list will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error (stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO, doxygen will only warn about wrong or incomplete -# parameter documentation, but not about the absence of documentation. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. -# Note: If this tag is empty the current directory is searched. - -INPUT = include/grpc++/alarm.h \ -include/grpc++/channel.h \ -include/grpc++/client_context.h \ -include/grpc++/completion_queue.h \ -include/grpc++/create_channel.h \ -include/grpc++/generic/async_generic_service.h \ -include/grpc++/generic/generic_stub.h \ -include/grpc++/grpc++.h \ -include/grpc++/impl/call.h \ -include/grpc++/impl/client_unary_call.h \ -include/grpc++/impl/codegen/core_codegen.h \ -include/grpc++/impl/grpc_library.h \ -include/grpc++/impl/method_handler_impl.h \ -include/grpc++/impl/rpc_method.h \ -include/grpc++/impl/rpc_service_method.h \ -include/grpc++/impl/serialization_traits.h \ -include/grpc++/impl/server_builder_option.h \ -include/grpc++/impl/server_builder_plugin.h \ -include/grpc++/impl/server_initializer.h \ -include/grpc++/impl/service_type.h \ -include/grpc++/impl/sync.h \ -include/grpc++/impl/sync_cxx11.h \ -include/grpc++/impl/sync_no_cxx11.h \ -include/grpc++/impl/thd.h \ -include/grpc++/impl/thd_cxx11.h \ -include/grpc++/impl/thd_no_cxx11.h \ -include/grpc++/security/auth_context.h \ -include/grpc++/security/auth_metadata_processor.h \ -include/grpc++/security/credentials.h \ -include/grpc++/security/server_credentials.h \ -include/grpc++/server.h \ -include/grpc++/server_builder.h \ -include/grpc++/server_context.h \ -include/grpc++/support/async_stream.h \ -include/grpc++/support/async_unary_call.h \ -include/grpc++/support/byte_buffer.h \ -include/grpc++/support/channel_arguments.h \ -include/grpc++/support/config.h \ -include/grpc++/support/slice.h \ -include/grpc++/support/status.h \ -include/grpc++/support/status_code_enum.h \ -include/grpc++/support/string_ref.h \ -include/grpc++/support/stub_options.h \ -include/grpc++/support/sync_stream.h \ -include/grpc++/support/time.h \ -include/grpc++/impl/codegen/async_stream.h \ -include/grpc++/impl/codegen/async_unary_call.h \ -include/grpc++/impl/codegen/call.h \ -include/grpc++/impl/codegen/call_hook.h \ -include/grpc++/impl/codegen/channel_interface.h \ -include/grpc++/impl/codegen/client_context.h \ -include/grpc++/impl/codegen/client_unary_call.h \ -include/grpc++/impl/codegen/completion_queue.h \ -include/grpc++/impl/codegen/completion_queue_tag.h \ -include/grpc++/impl/codegen/config.h \ -include/grpc++/impl/codegen/core_codegen_interface.h \ -include/grpc++/impl/codegen/create_auth_context.h \ -include/grpc++/impl/codegen/grpc_library.h \ -include/grpc++/impl/codegen/method_handler_impl.h \ -include/grpc++/impl/codegen/rpc_method.h \ -include/grpc++/impl/codegen/rpc_service_method.h \ -include/grpc++/impl/codegen/security/auth_context.h \ -include/grpc++/impl/codegen/serialization_traits.h \ -include/grpc++/impl/codegen/server_context.h \ -include/grpc++/impl/codegen/server_interface.h \ -include/grpc++/impl/codegen/service_type.h \ -include/grpc++/impl/codegen/status.h \ -include/grpc++/impl/codegen/status_code_enum.h \ -include/grpc++/impl/codegen/string_ref.h \ -include/grpc++/impl/codegen/stub_options.h \ -include/grpc++/impl/codegen/sync.h \ -include/grpc++/impl/codegen/sync_cxx11.h \ -include/grpc++/impl/codegen/sync_no_cxx11.h \ -include/grpc++/impl/codegen/sync_stream.h \ -include/grpc++/impl/codegen/time.h \ -include/grpc/impl/codegen/byte_buffer.h \ -include/grpc/impl/codegen/byte_buffer_reader.h \ -include/grpc/impl/codegen/compression_types.h \ -include/grpc/impl/codegen/connectivity_state.h \ -include/grpc/impl/codegen/grpc_types.h \ -include/grpc/impl/codegen/propagation_bits.h \ -include/grpc/impl/codegen/status.h \ -include/grpc/impl/codegen/alloc.h \ -include/grpc/impl/codegen/atm.h \ -include/grpc/impl/codegen/atm_gcc_atomic.h \ -include/grpc/impl/codegen/atm_gcc_sync.h \ -include/grpc/impl/codegen/atm_windows.h \ -include/grpc/impl/codegen/log.h \ -include/grpc/impl/codegen/port_platform.h \ -include/grpc/impl/codegen/slice.h \ -include/grpc/impl/codegen/slice_buffer.h \ -include/grpc/impl/codegen/sync.h \ -include/grpc/impl/codegen/sync_generic.h \ -include/grpc/impl/codegen/sync_posix.h \ -include/grpc/impl/codegen/sync_windows.h \ -include/grpc/impl/codegen/time.h \ -<<<<<<< HEAD -include/grpc++/impl/codegen/config.h \ -include/grpc++/impl/codegen/config_protobuf.h \ -include/grpc++/support/config.h \ -include/grpc++/support/config_protobuf.h \ -include/grpc++/impl/codegen/core_codegen.h \ -======= ->>>>>>> d30d4e279c4a63effaa6e912fc00bd4ad96054c7 -src/cpp/client/secure_credentials.h \ -src/cpp/common/secure_auth_context.h \ -src/cpp/server/secure_server_credentials.h \ -src/cpp/client/create_channel_internal.h \ -src/cpp/server/dynamic_thread_pool.h \ -src/cpp/server/thread_pool_interface.h \ -src/cpp/client/secure_credentials.cc \ -src/cpp/common/auth_property_iterator.cc \ -src/cpp/common/secure_auth_context.cc \ -src/cpp/common/secure_channel_arguments.cc \ -src/cpp/common/secure_create_auth_context.cc \ -src/cpp/server/secure_server_credentials.cc \ -src/cpp/client/channel.cc \ -src/cpp/client/client_context.cc \ -src/cpp/client/create_channel.cc \ -src/cpp/client/create_channel_internal.cc \ -src/cpp/client/credentials.cc \ -src/cpp/client/generic_stub.cc \ -src/cpp/client/insecure_credentials.cc \ -src/cpp/common/channel_arguments.cc \ -src/cpp/common/completion_queue.cc \ -src/cpp/common/core_codegen.cc \ -src/cpp/common/rpc_method.cc \ -src/cpp/server/async_generic_service.cc \ -src/cpp/server/create_default_thread_pool.cc \ -src/cpp/server/dynamic_thread_pool.cc \ -src/cpp/server/insecure_server_credentials.cc \ -src/cpp/server/server.cc \ -src/cpp/server/server_builder.cc \ -src/cpp/server/server_context.cc \ -src/cpp/server/server_credentials.cc \ -src/cpp/util/byte_buffer.cc \ -src/cpp/util/slice.cc \ -src/cpp/util/status.cc \ -src/cpp/util/string_ref.cc \ -src/cpp/util/time.cc \ -src/cpp/codegen/codegen_init.cc - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank the -# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, -# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, -# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, -# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, -# *.qsf, *.as and *.js. - -FILE_PATTERNS = - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = NO - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefore more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra style sheet files is of importance (e.g. the last -# style sheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the style sheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to NO can help when comparing the output of multiple runs. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler (hhc.exe). If non-empty, -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated -# (YES) or that it should be included in the master .chm file (NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index (hhk), content (hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated -# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom style sheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /